@selentar/analitoly 0.1.1
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/LICENSE +21 -0
- package/README.md +93 -0
- package/api/dist/dashboards/dash_1775220041958_v1r8io.json +829 -0
- package/api/dist/dashboards/dash_1775222037264_1rrsrd.json +309 -0
- package/api/dist/src/agent/agent.controller.d.ts +26 -0
- package/api/dist/src/agent/agent.controller.js +124 -0
- package/api/dist/src/agent/agent.controller.js.map +1 -0
- package/api/dist/src/agent/agent.module.d.ts +2 -0
- package/api/dist/src/agent/agent.module.js +23 -0
- package/api/dist/src/agent/agent.module.js.map +1 -0
- package/api/dist/src/agent/agent.service.d.ts +39 -0
- package/api/dist/src/agent/agent.service.js +389 -0
- package/api/dist/src/agent/agent.service.js.map +1 -0
- package/api/dist/src/agent/mcp-config.d.ts +9 -0
- package/api/dist/src/agent/mcp-config.js +51 -0
- package/api/dist/src/agent/mcp-config.js.map +1 -0
- package/api/dist/src/app.module.d.ts +2 -0
- package/api/dist/src/app.module.js +52 -0
- package/api/dist/src/app.module.js.map +1 -0
- package/api/dist/src/chart/chart.controller.d.ts +8 -0
- package/api/dist/src/chart/chart.controller.js +38 -0
- package/api/dist/src/chart/chart.controller.js.map +1 -0
- package/api/dist/src/chart/chart.module.d.ts +2 -0
- package/api/dist/src/chart/chart.module.js +24 -0
- package/api/dist/src/chart/chart.module.js.map +1 -0
- package/api/dist/src/chart/chart.service.d.ts +32 -0
- package/api/dist/src/chart/chart.service.js +106 -0
- package/api/dist/src/chart/chart.service.js.map +1 -0
- package/api/dist/src/chat/chat.controller.d.ts +14 -0
- package/api/dist/src/chat/chat.controller.js +73 -0
- package/api/dist/src/chat/chat.controller.js.map +1 -0
- package/api/dist/src/chat/chat.module.d.ts +2 -0
- package/api/dist/src/chat/chat.module.js +22 -0
- package/api/dist/src/chat/chat.module.js.map +1 -0
- package/api/dist/src/chat/chat.service.d.ts +25 -0
- package/api/dist/src/chat/chat.service.js +168 -0
- package/api/dist/src/chat/chat.service.js.map +1 -0
- package/api/dist/src/connection/connection.controller.d.ts +46 -0
- package/api/dist/src/connection/connection.controller.js +189 -0
- package/api/dist/src/connection/connection.controller.js.map +1 -0
- package/api/dist/src/connection/connection.model.d.ts +116 -0
- package/api/dist/src/connection/connection.model.js +23 -0
- package/api/dist/src/connection/connection.model.js.map +1 -0
- package/api/dist/src/connection/connection.module.d.ts +2 -0
- package/api/dist/src/connection/connection.module.js +31 -0
- package/api/dist/src/connection/connection.module.js.map +1 -0
- package/api/dist/src/connection/connection.repository.d.ts +16 -0
- package/api/dist/src/connection/connection.repository.js +195 -0
- package/api/dist/src/connection/connection.repository.js.map +1 -0
- package/api/dist/src/connection/connection.service.d.ts +50 -0
- package/api/dist/src/connection/connection.service.js +343 -0
- package/api/dist/src/connection/connection.service.js.map +1 -0
- package/api/dist/src/context/context.controller.d.ts +13 -0
- package/api/dist/src/context/context.controller.js +86 -0
- package/api/dist/src/context/context.controller.js.map +1 -0
- package/api/dist/src/context/context.module.d.ts +2 -0
- package/api/dist/src/context/context.module.js +39 -0
- package/api/dist/src/context/context.module.js.map +1 -0
- package/api/dist/src/context/context.service.d.ts +32 -0
- package/api/dist/src/context/context.service.js +177 -0
- package/api/dist/src/context/context.service.js.map +1 -0
- package/api/dist/src/dashboard/dashboard.controller.d.ts +21 -0
- package/api/dist/src/dashboard/dashboard.controller.js +109 -0
- package/api/dist/src/dashboard/dashboard.controller.js.map +1 -0
- package/api/dist/src/dashboard/dashboard.model.d.ts +15 -0
- package/api/dist/src/dashboard/dashboard.model.js +3 -0
- package/api/dist/src/dashboard/dashboard.model.js.map +1 -0
- package/api/dist/src/dashboard/dashboard.module.d.ts +2 -0
- package/api/dist/src/dashboard/dashboard.module.js +24 -0
- package/api/dist/src/dashboard/dashboard.module.js.map +1 -0
- package/api/dist/src/dashboard/dashboard.repository.d.ts +9 -0
- package/api/dist/src/dashboard/dashboard.repository.js +72 -0
- package/api/dist/src/dashboard/dashboard.repository.js.map +1 -0
- package/api/dist/src/dashboard/dashboard.service.d.ts +14 -0
- package/api/dist/src/dashboard/dashboard.service.js +87 -0
- package/api/dist/src/dashboard/dashboard.service.js.map +1 -0
- package/api/dist/src/datasource/connectors/connector.interface.d.ts +6 -0
- package/api/dist/src/datasource/connectors/connector.interface.js +3 -0
- package/api/dist/src/datasource/connectors/connector.interface.js.map +1 -0
- package/api/dist/src/datasource/connectors/mongo.connector.d.ts +30 -0
- package/api/dist/src/datasource/connectors/mongo.connector.js +167 -0
- package/api/dist/src/datasource/connectors/mongo.connector.js.map +1 -0
- package/api/dist/src/datasource/connectors/mongo.connector.test.d.ts +1 -0
- package/api/dist/src/datasource/connectors/mongo.connector.test.js +179 -0
- package/api/dist/src/datasource/connectors/mongo.connector.test.js.map +1 -0
- package/api/dist/src/datasource/connectors/postgres.connector.d.ts +50 -0
- package/api/dist/src/datasource/connectors/postgres.connector.js +213 -0
- package/api/dist/src/datasource/connectors/postgres.connector.js.map +1 -0
- package/api/dist/src/datasource/connectors/postgres.connector.test.d.ts +1 -0
- package/api/dist/src/datasource/connectors/postgres.connector.test.js +197 -0
- package/api/dist/src/datasource/connectors/postgres.connector.test.js.map +1 -0
- package/api/dist/src/datasource/datasource.controller.d.ts +16 -0
- package/api/dist/src/datasource/datasource.controller.js +79 -0
- package/api/dist/src/datasource/datasource.controller.js.map +1 -0
- package/api/dist/src/datasource/datasource.model.d.ts +26 -0
- package/api/dist/src/datasource/datasource.model.js +3 -0
- package/api/dist/src/datasource/datasource.model.js.map +1 -0
- package/api/dist/src/datasource/datasource.module.d.ts +2 -0
- package/api/dist/src/datasource/datasource.module.js +31 -0
- package/api/dist/src/datasource/datasource.module.js.map +1 -0
- package/api/dist/src/datasource/datasource.repository.d.ts +11 -0
- package/api/dist/src/datasource/datasource.repository.js +61 -0
- package/api/dist/src/datasource/datasource.repository.js.map +1 -0
- package/api/dist/src/datasource/datasource.service.d.ts +28 -0
- package/api/dist/src/datasource/datasource.service.js +95 -0
- package/api/dist/src/datasource/datasource.service.js.map +1 -0
- package/api/dist/src/example/example.controller.d.ts +10 -0
- package/api/dist/src/example/example.controller.js +43 -0
- package/api/dist/src/example/example.controller.js.map +1 -0
- package/api/dist/src/example/example.model.d.ts +6 -0
- package/api/dist/src/example/example.model.js +3 -0
- package/api/dist/src/example/example.model.js.map +1 -0
- package/api/dist/src/example/example.module.d.ts +2 -0
- package/api/dist/src/example/example.module.js +23 -0
- package/api/dist/src/example/example.module.js.map +1 -0
- package/api/dist/src/example/example.repository.d.ts +6 -0
- package/api/dist/src/example/example.repository.js +30 -0
- package/api/dist/src/example/example.repository.js.map +1 -0
- package/api/dist/src/example/example.service.d.ts +10 -0
- package/api/dist/src/example/example.service.js +31 -0
- package/api/dist/src/example/example.service.js.map +1 -0
- package/api/dist/src/integration/integration.controller.d.ts +15 -0
- package/api/dist/src/integration/integration.controller.js +69 -0
- package/api/dist/src/integration/integration.controller.js.map +1 -0
- package/api/dist/src/integration/integration.model.d.ts +17 -0
- package/api/dist/src/integration/integration.model.js +3 -0
- package/api/dist/src/integration/integration.model.js.map +1 -0
- package/api/dist/src/integration/integration.module.d.ts +2 -0
- package/api/dist/src/integration/integration.module.js +24 -0
- package/api/dist/src/integration/integration.module.js.map +1 -0
- package/api/dist/src/integration/integration.repository.d.ts +6 -0
- package/api/dist/src/integration/integration.repository.js +45 -0
- package/api/dist/src/integration/integration.repository.js.map +1 -0
- package/api/dist/src/integration/integration.service.d.ts +12 -0
- package/api/dist/src/integration/integration.service.js +78 -0
- package/api/dist/src/integration/integration.service.js.map +1 -0
- package/api/dist/src/main.d.ts +1 -0
- package/api/dist/src/main.js +19 -0
- package/api/dist/src/main.js.map +1 -0
- package/api/dist/src/mcp/grafana.mcp.d.ts +1 -0
- package/api/dist/src/mcp/grafana.mcp.js +95 -0
- package/api/dist/src/mcp/grafana.mcp.js.map +1 -0
- package/api/dist/src/mcp/graylog.mcp.d.ts +1 -0
- package/api/dist/src/mcp/graylog.mcp.js +241 -0
- package/api/dist/src/mcp/graylog.mcp.js.map +1 -0
- package/api/dist/src/mcp/mcp-server.d.ts +1 -0
- package/api/dist/src/mcp/mcp-server.js +336 -0
- package/api/dist/src/mcp/mcp-server.js.map +1 -0
- package/api/dist/src/paths.d.ts +8 -0
- package/api/dist/src/paths.js +50 -0
- package/api/dist/src/paths.js.map +1 -0
- package/api/dist/src/paths.test.d.ts +1 -0
- package/api/dist/src/paths.test.js +60 -0
- package/api/dist/src/paths.test.js.map +1 -0
- package/api/dist/src/project/project.controller.d.ts +44 -0
- package/api/dist/src/project/project.controller.js +79 -0
- package/api/dist/src/project/project.controller.js.map +1 -0
- package/api/dist/src/project/project.model.d.ts +19 -0
- package/api/dist/src/project/project.model.js +3 -0
- package/api/dist/src/project/project.model.js.map +1 -0
- package/api/dist/src/project/project.module.d.ts +2 -0
- package/api/dist/src/project/project.module.js +24 -0
- package/api/dist/src/project/project.module.js.map +1 -0
- package/api/dist/src/project/project.repository.d.ts +6 -0
- package/api/dist/src/project/project.repository.js +52 -0
- package/api/dist/src/project/project.repository.js.map +1 -0
- package/api/dist/src/project/project.service.d.ts +17 -0
- package/api/dist/src/project/project.service.js +163 -0
- package/api/dist/src/project/project.service.js.map +1 -0
- package/api/dist/tsconfig.tsbuildinfo +1 -0
- package/api/dist/vitest.config.d.ts +2 -0
- package/api/dist/vitest.config.js +10 -0
- package/api/dist/vitest.config.js.map +1 -0
- package/api/public/dist/Analitoly.png +0 -0
- package/api/public/dist/AnalitolyShort.png +0 -0
- package/api/public/dist/Gitlab.png +0 -0
- package/api/public/dist/Grafana.png +0 -0
- package/api/public/dist/Graylog.png +0 -0
- package/api/public/dist/Mongodb.png +0 -0
- package/api/public/dist/PostgreSQL.png +0 -0
- package/api/public/dist/assets/index-BPB3ckw4.js +222 -0
- package/api/public/dist/assets/index-CSAGa0SG.js +227 -0
- package/api/public/dist/index.html +12 -0
- package/bin/analitoly-mcp.js +18 -0
- package/bin/analitoly.js +38 -0
- package/package.json +54 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function TR(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var c0={exports:{}},Yc={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var sM;function gP(){if(sM)return Yc;sM=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,a){var o=null;if(a!==void 0&&(o=""+a),i.key!==void 0&&(o=""+i.key),"key"in i){a={};for(var l in i)l!=="key"&&(a[l]=i[l])}else a=i;return i=a.ref,{$$typeof:e,type:r,key:o,ref:i!==void 0?i:null,props:a}}return Yc.Fragment=t,Yc.jsx=n,Yc.jsxs=n,Yc}var uM;function mP(){return uM||(uM=1,c0.exports=gP()),c0.exports}var k=mP(),f0={exports:{}},Ut={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var cM;function yP(){if(cM)return Ut;cM=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),v=Symbol.iterator;function g(Y){return Y===null||typeof Y!="object"?null:(Y=v&&Y[v]||Y["@@iterator"],typeof Y=="function"?Y:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,_={};function b(Y,Z,V){this.props=Y,this.context=Z,this.refs=_,this.updater=V||m}b.prototype.isReactComponent={},b.prototype.setState=function(Y,Z){if(typeof Y!="object"&&typeof Y!="function"&&Y!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,Y,Z,"setState")},b.prototype.forceUpdate=function(Y){this.updater.enqueueForceUpdate(this,Y,"forceUpdate")};function S(){}S.prototype=b.prototype;function w(Y,Z,V){this.props=Y,this.context=Z,this.refs=_,this.updater=V||m}var A=w.prototype=new S;A.constructor=w,x(A,b.prototype),A.isPureReactComponent=!0;var D=Array.isArray;function M(){}var L={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function N(Y,Z,V){var tt=V.ref;return{$$typeof:e,type:Y,key:Z,ref:tt!==void 0?tt:null,props:V}}function E(Y,Z){return N(Y.type,Z,Y.props)}function O(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===e}function j(Y){var Z={"=":"=0",":":"=2"};return"$"+Y.replace(/[=:]/g,function(V){return Z[V]})}var B=/\/+/g;function U(Y,Z){return typeof Y=="object"&&Y!==null&&Y.key!=null?j(""+Y.key):Z.toString(36)}function W(Y){switch(Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason;default:switch(typeof Y.status=="string"?Y.then(M,M):(Y.status="pending",Y.then(function(Z){Y.status==="pending"&&(Y.status="fulfilled",Y.value=Z)},function(Z){Y.status==="pending"&&(Y.status="rejected",Y.reason=Z)})),Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason}}throw Y}function H(Y,Z,V,tt,ut){var gt=typeof Y;(gt==="undefined"||gt==="boolean")&&(Y=null);var wt=!1;if(Y===null)wt=!0;else switch(gt){case"bigint":case"string":case"number":wt=!0;break;case"object":switch(Y.$$typeof){case e:case t:wt=!0;break;case h:return wt=Y._init,H(wt(Y._payload),Z,V,tt,ut)}}if(wt)return ut=ut(Y),wt=tt===""?"."+U(Y,0):tt,D(ut)?(V="",wt!=null&&(V=wt.replace(B,"$&/")+"/"),H(ut,Z,V,"",function(Dt){return Dt})):ut!=null&&(O(ut)&&(ut=E(ut,V+(ut.key==null||Y&&Y.key===ut.key?"":(""+ut.key).replace(B,"$&/")+"/")+wt)),Z.push(ut)),1;wt=0;var pt=tt===""?".":tt+":";if(D(Y))for(var vt=0;vt<Y.length;vt++)tt=Y[vt],gt=pt+U(tt,vt),wt+=H(tt,Z,V,gt,ut);else if(vt=g(Y),typeof vt=="function")for(Y=vt.call(Y),vt=0;!(tt=Y.next()).done;)tt=tt.value,gt=pt+U(tt,vt++),wt+=H(tt,Z,V,gt,ut);else if(gt==="object"){if(typeof Y.then=="function")return H(W(Y),Z,V,tt,ut);throw Z=String(Y),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(Y).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return wt}function q(Y,Z,V){if(Y==null)return Y;var tt=[],ut=0;return H(Y,tt,"","",function(gt){return Z.call(V,gt,ut++)}),tt}function X(Y){if(Y._status===-1){var Z=Y._result;Z=Z(),Z.then(function(V){(Y._status===0||Y._status===-1)&&(Y._status=1,Y._result=V)},function(V){(Y._status===0||Y._status===-1)&&(Y._status=2,Y._result=V)}),Y._status===-1&&(Y._status=0,Y._result=Z)}if(Y._status===1)return Y._result.default;throw Y._result}var J=typeof reportError=="function"?reportError:function(Y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof Y=="object"&&Y!==null&&typeof Y.message=="string"?String(Y.message):String(Y),error:Y});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",Y);return}console.error(Y)},F={map:q,forEach:function(Y,Z,V){q(Y,function(){Z.apply(this,arguments)},V)},count:function(Y){var Z=0;return q(Y,function(){Z++}),Z},toArray:function(Y){return q(Y,function(Z){return Z})||[]},only:function(Y){if(!O(Y))throw Error("React.Children.only expected to receive a single React element child.");return Y}};return Ut.Activity=d,Ut.Children=F,Ut.Component=b,Ut.Fragment=n,Ut.Profiler=i,Ut.PureComponent=w,Ut.StrictMode=r,Ut.Suspense=s,Ut.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Ut.__COMPILER_RUNTIME={__proto__:null,c:function(Y){return L.H.useMemoCache(Y)}},Ut.cache=function(Y){return function(){return Y.apply(null,arguments)}},Ut.cacheSignal=function(){return null},Ut.cloneElement=function(Y,Z,V){if(Y==null)throw Error("The argument must be a React element, but you passed "+Y+".");var tt=x({},Y.props),ut=Y.key;if(Z!=null)for(gt in Z.key!==void 0&&(ut=""+Z.key),Z)!I.call(Z,gt)||gt==="key"||gt==="__self"||gt==="__source"||gt==="ref"&&Z.ref===void 0||(tt[gt]=Z[gt]);var gt=arguments.length-2;if(gt===1)tt.children=V;else if(1<gt){for(var wt=Array(gt),pt=0;pt<gt;pt++)wt[pt]=arguments[pt+2];tt.children=wt}return N(Y.type,ut,tt)},Ut.createContext=function(Y){return Y={$$typeof:o,_currentValue:Y,_currentValue2:Y,_threadCount:0,Provider:null,Consumer:null},Y.Provider=Y,Y.Consumer={$$typeof:a,_context:Y},Y},Ut.createElement=function(Y,Z,V){var tt,ut={},gt=null;if(Z!=null)for(tt in Z.key!==void 0&&(gt=""+Z.key),Z)I.call(Z,tt)&&tt!=="key"&&tt!=="__self"&&tt!=="__source"&&(ut[tt]=Z[tt]);var wt=arguments.length-2;if(wt===1)ut.children=V;else if(1<wt){for(var pt=Array(wt),vt=0;vt<wt;vt++)pt[vt]=arguments[vt+2];ut.children=pt}if(Y&&Y.defaultProps)for(tt in wt=Y.defaultProps,wt)ut[tt]===void 0&&(ut[tt]=wt[tt]);return N(Y,gt,ut)},Ut.createRef=function(){return{current:null}},Ut.forwardRef=function(Y){return{$$typeof:l,render:Y}},Ut.isValidElement=O,Ut.lazy=function(Y){return{$$typeof:h,_payload:{_status:-1,_result:Y},_init:X}},Ut.memo=function(Y,Z){return{$$typeof:c,type:Y,compare:Z===void 0?null:Z}},Ut.startTransition=function(Y){var Z=L.T,V={};L.T=V;try{var tt=Y(),ut=L.S;ut!==null&&ut(V,tt),typeof tt=="object"&&tt!==null&&typeof tt.then=="function"&&tt.then(M,J)}catch(gt){J(gt)}finally{Z!==null&&V.types!==null&&(Z.types=V.types),L.T=Z}},Ut.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Ut.use=function(Y){return L.H.use(Y)},Ut.useActionState=function(Y,Z,V){return L.H.useActionState(Y,Z,V)},Ut.useCallback=function(Y,Z){return L.H.useCallback(Y,Z)},Ut.useContext=function(Y){return L.H.useContext(Y)},Ut.useDebugValue=function(){},Ut.useDeferredValue=function(Y,Z){return L.H.useDeferredValue(Y,Z)},Ut.useEffect=function(Y,Z){return L.H.useEffect(Y,Z)},Ut.useEffectEvent=function(Y){return L.H.useEffectEvent(Y)},Ut.useId=function(){return L.H.useId()},Ut.useImperativeHandle=function(Y,Z,V){return L.H.useImperativeHandle(Y,Z,V)},Ut.useInsertionEffect=function(Y,Z){return L.H.useInsertionEffect(Y,Z)},Ut.useLayoutEffect=function(Y,Z){return L.H.useLayoutEffect(Y,Z)},Ut.useMemo=function(Y,Z){return L.H.useMemo(Y,Z)},Ut.useOptimistic=function(Y,Z){return L.H.useOptimistic(Y,Z)},Ut.useReducer=function(Y,Z,V){return L.H.useReducer(Y,Z,V)},Ut.useRef=function(Y){return L.H.useRef(Y)},Ut.useState=function(Y){return L.H.useState(Y)},Ut.useSyncExternalStore=function(Y,Z,V){return L.H.useSyncExternalStore(Y,Z,V)},Ut.useTransition=function(){return L.H.useTransition()},Ut.version="19.2.4",Ut}var fM;function f_(){return fM||(fM=1,f0.exports=yP()),f0.exports}var at=f_(),h0={exports:{}},Wc={},d0={exports:{}},v0={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var hM;function xP(){return hM||(hM=1,(function(e){function t(H,q){var X=H.length;H.push(q);t:for(;0<X;){var J=X-1>>>1,F=H[J];if(0<i(F,q))H[J]=q,H[X]=F,X=J;else break t}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var q=H[0],X=H.pop();if(X!==q){H[0]=X;t:for(var J=0,F=H.length,Y=F>>>1;J<Y;){var Z=2*(J+1)-1,V=H[Z],tt=Z+1,ut=H[tt];if(0>i(V,X))tt<F&&0>i(ut,V)?(H[J]=ut,H[tt]=X,J=tt):(H[J]=V,H[Z]=X,J=Z);else if(tt<F&&0>i(ut,X))H[J]=ut,H[tt]=X,J=tt;else break t}}return q}function i(H,q){var X=H.sortIndex-q.sortIndex;return X!==0?X:H.id-q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var s=[],c=[],h=1,d=null,v=3,g=!1,m=!1,x=!1,_=!1,b=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function A(H){for(var q=n(c);q!==null;){if(q.callback===null)r(c);else if(q.startTime<=H)r(c),q.sortIndex=q.expirationTime,t(s,q);else break;q=n(c)}}function D(H){if(x=!1,A(H),!m)if(n(s)!==null)m=!0,M||(M=!0,j());else{var q=n(c);q!==null&&W(D,q.startTime-H)}}var M=!1,L=-1,I=5,N=-1;function E(){return _?!0:!(e.unstable_now()-N<I)}function O(){if(_=!1,M){var H=e.unstable_now();N=H;var q=!0;try{t:{m=!1,x&&(x=!1,S(L),L=-1),g=!0;var X=v;try{e:{for(A(H),d=n(s);d!==null&&!(d.expirationTime>H&&E());){var J=d.callback;if(typeof J=="function"){d.callback=null,v=d.priorityLevel;var F=J(d.expirationTime<=H);if(H=e.unstable_now(),typeof F=="function"){d.callback=F,A(H),q=!0;break e}d===n(s)&&r(s),A(H)}else r(s);d=n(s)}if(d!==null)q=!0;else{var Y=n(c);Y!==null&&W(D,Y.startTime-H),q=!1}}break t}finally{d=null,v=X,g=!1}q=void 0}}finally{q?j():M=!1}}}var j;if(typeof w=="function")j=function(){w(O)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,U=B.port2;B.port1.onmessage=O,j=function(){U.postMessage(null)}}else j=function(){b(O,0)};function W(H,q){L=b(function(){H(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(H){switch(v){case 1:case 2:case 3:var q=3;break;default:q=v}var X=v;v=q;try{return H()}finally{v=X}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(H,q){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var X=v;v=H;try{return q()}finally{v=X}},e.unstable_scheduleCallback=function(H,q,X){var J=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?J+X:J):X=J,H){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=X+F,H={id:h++,callback:q,priorityLevel:H,startTime:X,expirationTime:F,sortIndex:-1},X>J?(H.sortIndex=X,t(c,H),n(s)===null&&H===n(c)&&(x?(S(L),L=-1):x=!0,W(D,X-J))):(H.sortIndex=F,t(s,H),m||g||(m=!0,M||(M=!0,j()))),H},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(H){var q=v;return function(){var X=v;v=q;try{return H.apply(this,arguments)}finally{v=X}}}})(v0)),v0}var dM;function bP(){return dM||(dM=1,d0.exports=xP()),d0.exports}var p0={exports:{}},Dn={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var vM;function _P(){if(vM)return Dn;vM=1;var e=f_();function t(s){var c="https://react.dev/errors/"+s;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)c+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+s+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function a(s,c,h){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:d==null?null:""+d,children:s,containerInfo:c,implementation:h}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(s,c){if(s==="font")return"";if(typeof c=="string")return c==="use-credentials"?c:""}return Dn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Dn.createPortal=function(s,c){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error(t(299));return a(s,c,null,h)},Dn.flushSync=function(s){var c=o.T,h=r.p;try{if(o.T=null,r.p=2,s)return s()}finally{o.T=c,r.p=h,r.d.f()}},Dn.preconnect=function(s,c){typeof s=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,r.d.C(s,c))},Dn.prefetchDNS=function(s){typeof s=="string"&&r.d.D(s)},Dn.preinit=function(s,c){if(typeof s=="string"&&c&&typeof c.as=="string"){var h=c.as,d=l(h,c.crossOrigin),v=typeof c.integrity=="string"?c.integrity:void 0,g=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;h==="style"?r.d.S(s,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:d,integrity:v,fetchPriority:g}):h==="script"&&r.d.X(s,{crossOrigin:d,integrity:v,fetchPriority:g,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},Dn.preinitModule=function(s,c){if(typeof s=="string")if(typeof c=="object"&&c!==null){if(c.as==null||c.as==="script"){var h=l(c.as,c.crossOrigin);r.d.M(s,{crossOrigin:h,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})}}else c==null&&r.d.M(s)},Dn.preload=function(s,c){if(typeof s=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){var h=c.as,d=l(h,c.crossOrigin);r.d.L(s,h,{crossOrigin:d,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},Dn.preloadModule=function(s,c){if(typeof s=="string")if(c){var h=l(c.as,c.crossOrigin);r.d.m(s,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:h,integrity:typeof c.integrity=="string"?c.integrity:void 0})}else r.d.m(s)},Dn.requestFormReset=function(s){r.d.r(s)},Dn.unstable_batchedUpdates=function(s,c){return s(c)},Dn.useFormState=function(s,c,h){return o.H.useFormState(s,c,h)},Dn.useFormStatus=function(){return o.H.useHostTransitionStatus()},Dn.version="19.2.4",Dn}var pM;function SP(){if(pM)return p0.exports;pM=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),p0.exports=_P(),p0.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var gM;function wP(){if(gM)return Wc;gM=1;var e=bP(),t=f_(),n=SP();function r(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)}function a(u){var f=u,p=u;if(u.alternate)for(;f.return;)f=f.return;else{u=f;do f=u,(f.flags&4098)!==0&&(p=f.return),u=f.return;while(u)}return f.tag===3?p:null}function o(u){if(u.tag===13){var f=u.memoizedState;if(f===null&&(u=u.alternate,u!==null&&(f=u.memoizedState)),f!==null)return f.dehydrated}return null}function l(u){if(u.tag===31){var f=u.memoizedState;if(f===null&&(u=u.alternate,u!==null&&(f=u.memoizedState)),f!==null)return f.dehydrated}return null}function s(u){if(a(u)!==u)throw Error(r(188))}function c(u){var f=u.alternate;if(!f){if(f=a(u),f===null)throw Error(r(188));return f!==u?null:u}for(var p=u,y=f;;){var T=p.return;if(T===null)break;var C=T.alternate;if(C===null){if(y=T.return,y!==null){p=y;continue}break}if(T.child===C.child){for(C=T.child;C;){if(C===p)return s(T),u;if(C===y)return s(T),f;C=C.sibling}throw Error(r(188))}if(p.return!==y.return)p=T,y=C;else{for(var R=!1,G=T.child;G;){if(G===p){R=!0,p=T,y=C;break}if(G===y){R=!0,y=T,p=C;break}G=G.sibling}if(!R){for(G=C.child;G;){if(G===p){R=!0,p=C,y=T;break}if(G===y){R=!0,y=C,p=T;break}G=G.sibling}if(!R)throw Error(r(189))}}if(p.alternate!==y)throw Error(r(190))}if(p.tag!==3)throw Error(r(188));return p.stateNode.current===p?u:f}function h(u){var f=u.tag;if(f===5||f===26||f===27||f===6)return u;for(u=u.child;u!==null;){if(f=h(u),f!==null)return f;u=u.sibling}return null}var d=Object.assign,v=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),w=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),E=Symbol.for("react.memo_cache_sentinel"),O=Symbol.iterator;function j(u){return u===null||typeof u!="object"?null:(u=O&&u[O]||u["@@iterator"],typeof u=="function"?u:null)}var B=Symbol.for("react.client.reference");function U(u){if(u==null)return null;if(typeof u=="function")return u.$$typeof===B?null:u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case x:return"Fragment";case b:return"Profiler";case _:return"StrictMode";case D:return"Suspense";case M:return"SuspenseList";case N:return"Activity"}if(typeof u=="object")switch(u.$$typeof){case m:return"Portal";case w:return u.displayName||"Context";case S:return(u._context.displayName||"Context")+".Consumer";case A:var f=u.render;return u=u.displayName,u||(u=f.displayName||f.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case L:return f=u.displayName||null,f!==null?f:U(u.type)||"Memo";case I:f=u._payload,u=u._init;try{return U(u(f))}catch{}}return null}var W=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},J=[],F=-1;function Y(u){return{current:u}}function Z(u){0>F||(u.current=J[F],J[F]=null,F--)}function V(u,f){F++,J[F]=u.current,u.current=f}var tt=Y(null),ut=Y(null),gt=Y(null),wt=Y(null);function pt(u,f){switch(V(gt,f),V(ut,u),V(tt,null),f.nodeType){case 9:case 11:u=(u=f.documentElement)&&(u=u.namespaceURI)?E2(u):0;break;default:if(u=f.tagName,f=f.namespaceURI)f=E2(f),u=R2(f,u);else switch(u){case"svg":u=1;break;case"math":u=2;break;default:u=0}}Z(tt),V(tt,u)}function vt(){Z(tt),Z(ut),Z(gt)}function Dt(u){u.memoizedState!==null&&V(wt,u);var f=tt.current,p=R2(f,u.type);f!==p&&(V(ut,u),V(tt,p))}function yt(u){ut.current===u&&(Z(tt),Z(ut)),wt.current===u&&(Z(wt),jc._currentValue=X)}var Mt,_e;function Jt(u){if(Mt===void 0)try{throw Error()}catch(p){var f=p.stack.trim().match(/\n( *(at )?)/);Mt=f&&f[1]||"",_e=-1<p.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Mt+u+_e}var fe=!1;function Ae(u,f){if(!u||fe)return"";fe=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(f){var ht=function(){throw Error()};if(Object.defineProperty(ht.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ht,[])}catch(it){var rt=it}Reflect.construct(u,[],ht)}else{try{ht.call()}catch(it){rt=it}u.call(ht.prototype)}}else{try{throw Error()}catch(it){rt=it}(ht=u())&&typeof ht.catch=="function"&&ht.catch(function(){})}}catch(it){if(it&&rt&&typeof it.stack=="string")return[it.stack,rt.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var T=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");T&&T.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var C=y.DetermineComponentFrameRoot(),R=C[0],G=C[1];if(R&&G){var $=R.split(`
|
|
44
|
+
`),nt=G.split(`
|
|
45
|
+
`);for(T=y=0;y<$.length&&!$[y].includes("DetermineComponentFrameRoot");)y++;for(;T<nt.length&&!nt[T].includes("DetermineComponentFrameRoot");)T++;if(y===$.length||T===nt.length)for(y=$.length-1,T=nt.length-1;1<=y&&0<=T&&$[y]!==nt[T];)T--;for(;1<=y&&0<=T;y--,T--)if($[y]!==nt[T]){if(y!==1||T!==1)do if(y--,T--,0>T||$[y]!==nt[T]){var st=`
|
|
46
|
+
`+$[y].replace(" at new "," at ");return u.displayName&&st.includes("<anonymous>")&&(st=st.replace("<anonymous>",u.displayName)),st}while(1<=y&&0<=T);break}}}finally{fe=!1,Error.prepareStackTrace=p}return(p=u?u.displayName||u.name:"")?Jt(p):""}function Je(u,f){switch(u.tag){case 26:case 27:case 5:return Jt(u.type);case 16:return Jt("Lazy");case 13:return u.child!==f&&f!==null?Jt("Suspense Fallback"):Jt("Suspense");case 19:return Jt("SuspenseList");case 0:case 15:return Ae(u.type,!1);case 11:return Ae(u.type.render,!1);case 1:return Ae(u.type,!0);case 31:return Jt("Activity");default:return""}}function fr(u){try{var f="",p=null;do f+=Je(u,p),p=u,u=u.return;while(u);return f}catch(y){return`
|
|
47
|
+
Error generating stack: `+y.message+`
|
|
48
|
+
`+y.stack}}var An=Object.prototype.hasOwnProperty,ni=e.unstable_scheduleCallback,Zi=e.unstable_cancelCallback,Vo=e.unstable_shouldYield,$g=e.unstable_requestPaint,Nn=e.unstable_now,Qg=e.unstable_getCurrentPriorityLevel,ct=e.unstable_ImmediatePriority,_t=e.unstable_UserBlockingPriority,jt=e.unstable_NormalPriority,te=e.unstable_LowPriority,Se=e.unstable_IdlePriority,hr=e.log,$i=e.unstable_setDisableYieldValue,Pn=null,ln=null;function Zn(u){if(typeof hr=="function"&&$i(u),ln&&typeof ln.setStrictMode=="function")try{ln.setStrictMode(Pn,u)}catch{}}var Ee=Math.clz32?Math.clz32:nN,Ea=Math.log,ri=Math.LN2;function nN(u){return u>>>=0,u===0?32:31-(Ea(u)/ri|0)|0}var Fh=256,Gh=262144,Uh=4194304;function jo(u){var f=u&42;if(f!==0)return f;switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return u&261888;case 262144:case 524288:case 1048576:case 2097152:return u&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return u&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return u}}function Yh(u,f,p){var y=u.pendingLanes;if(y===0)return 0;var T=0,C=u.suspendedLanes,R=u.pingedLanes;u=u.warmLanes;var G=y&134217727;return G!==0?(y=G&~C,y!==0?T=jo(y):(R&=G,R!==0?T=jo(R):p||(p=G&~u,p!==0&&(T=jo(p))))):(G=y&~C,G!==0?T=jo(G):R!==0?T=jo(R):p||(p=y&~u,p!==0&&(T=jo(p)))),T===0?0:f!==0&&f!==T&&(f&C)===0&&(C=T&-T,p=f&-f,C>=p||C===32&&(p&4194048)!==0)?f:T}function tc(u,f){return(u.pendingLanes&~(u.suspendedLanes&~u.pingedLanes)&f)===0}function rN(u,f){switch(u){case 1:case 2:case 4:case 8:case 64:return f+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return f+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hw(){var u=Uh;return Uh<<=1,(Uh&62914560)===0&&(Uh=4194304),u}function Kg(u){for(var f=[],p=0;31>p;p++)f.push(u);return f}function ec(u,f){u.pendingLanes|=f,f!==268435456&&(u.suspendedLanes=0,u.pingedLanes=0,u.warmLanes=0)}function iN(u,f,p,y,T,C){var R=u.pendingLanes;u.pendingLanes=p,u.suspendedLanes=0,u.pingedLanes=0,u.warmLanes=0,u.expiredLanes&=p,u.entangledLanes&=p,u.errorRecoveryDisabledLanes&=p,u.shellSuspendCounter=0;var G=u.entanglements,$=u.expirationTimes,nt=u.hiddenUpdates;for(p=R&~p;0<p;){var st=31-Ee(p),ht=1<<st;G[st]=0,$[st]=-1;var rt=nt[st];if(rt!==null)for(nt[st]=null,st=0;st<rt.length;st++){var it=rt[st];it!==null&&(it.lane&=-536870913)}p&=~ht}y!==0&&dw(u,y,0),C!==0&&T===0&&u.tag!==0&&(u.suspendedLanes|=C&~(R&~f))}function dw(u,f,p){u.pendingLanes|=f,u.suspendedLanes&=~f;var y=31-Ee(f);u.entangledLanes|=f,u.entanglements[y]=u.entanglements[y]|1073741824|p&261930}function vw(u,f){var p=u.entangledLanes|=f;for(u=u.entanglements;p;){var y=31-Ee(p),T=1<<y;T&f|u[y]&f&&(u[y]|=f),p&=~T}}function pw(u,f){var p=f&-f;return p=(p&42)!==0?1:Jg(p),(p&(u.suspendedLanes|f))!==0?0:p}function Jg(u){switch(u){case 2:u=1;break;case 8:u=4;break;case 32:u=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:u=128;break;case 268435456:u=134217728;break;default:u=0}return u}function tm(u){return u&=-u,2<u?8<u?(u&134217727)!==0?32:268435456:8:2}function gw(){var u=q.p;return u!==0?u:(u=window.event,u===void 0?32:eM(u.type))}function mw(u,f){var p=q.p;try{return q.p=u,f()}finally{q.p=p}}var Ra=Math.random().toString(36).slice(2),mn="__reactFiber$"+Ra,$n="__reactProps$"+Ra,ss="__reactContainer$"+Ra,em="__reactEvents$"+Ra,aN="__reactListeners$"+Ra,oN="__reactHandles$"+Ra,yw="__reactResources$"+Ra,nc="__reactMarker$"+Ra;function nm(u){delete u[mn],delete u[$n],delete u[em],delete u[aN],delete u[oN]}function us(u){var f=u[mn];if(f)return f;for(var p=u.parentNode;p;){if(f=p[ss]||p[mn]){if(p=f.alternate,f.child!==null||p!==null&&p.child!==null)for(u=H2(u);u!==null;){if(p=u[mn])return p;u=H2(u)}return f}u=p,p=u.parentNode}return null}function cs(u){if(u=u[mn]||u[ss]){var f=u.tag;if(f===5||f===6||f===13||f===31||f===26||f===27||f===3)return u}return null}function rc(u){var f=u.tag;if(f===5||f===26||f===27||f===6)return u.stateNode;throw Error(r(33))}function fs(u){var f=u[yw];return f||(f=u[yw]={hoistableStyles:new Map,hoistableScripts:new Map}),f}function cn(u){u[nc]=!0}var xw=new Set,bw={};function Fo(u,f){hs(u,f),hs(u+"Capture",f)}function hs(u,f){for(bw[u]=f,u=0;u<f.length;u++)xw.add(f[u])}var lN=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),_w={},Sw={};function sN(u){return An.call(Sw,u)?!0:An.call(_w,u)?!1:lN.test(u)?Sw[u]=!0:(_w[u]=!0,!1)}function Wh(u,f,p){if(sN(f))if(p===null)u.removeAttribute(f);else{switch(typeof p){case"undefined":case"function":case"symbol":u.removeAttribute(f);return;case"boolean":var y=f.toLowerCase().slice(0,5);if(y!=="data-"&&y!=="aria-"){u.removeAttribute(f);return}}u.setAttribute(f,""+p)}}function qh(u,f,p){if(p===null)u.removeAttribute(f);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":u.removeAttribute(f);return}u.setAttribute(f,""+p)}}function Qi(u,f,p,y){if(y===null)u.removeAttribute(p);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":u.removeAttribute(p);return}u.setAttributeNS(f,p,""+y)}}function Dr(u){switch(typeof u){case"bigint":case"boolean":case"number":case"string":case"undefined":return u;case"object":return u;default:return""}}function ww(u){var f=u.type;return(u=u.nodeName)&&u.toLowerCase()==="input"&&(f==="checkbox"||f==="radio")}function uN(u,f,p){var y=Object.getOwnPropertyDescriptor(u.constructor.prototype,f);if(!u.hasOwnProperty(f)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var T=y.get,C=y.set;return Object.defineProperty(u,f,{configurable:!0,get:function(){return T.call(this)},set:function(R){p=""+R,C.call(this,R)}}),Object.defineProperty(u,f,{enumerable:y.enumerable}),{getValue:function(){return p},setValue:function(R){p=""+R},stopTracking:function(){u._valueTracker=null,delete u[f]}}}}function rm(u){if(!u._valueTracker){var f=ww(u)?"checked":"value";u._valueTracker=uN(u,f,""+u[f])}}function Tw(u){if(!u)return!1;var f=u._valueTracker;if(!f)return!0;var p=f.getValue(),y="";return u&&(y=ww(u)?u.checked?"true":"false":u.value),u=y,u!==p?(f.setValue(u),!0):!1}function Xh(u){if(u=u||(typeof document<"u"?document:void 0),typeof u>"u")return null;try{return u.activeElement||u.body}catch{return u.body}}var cN=/[\n"\\]/g;function kr(u){return u.replace(cN,function(f){return"\\"+f.charCodeAt(0).toString(16)+" "})}function im(u,f,p,y,T,C,R,G){u.name="",R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?u.type=R:u.removeAttribute("type"),f!=null?R==="number"?(f===0&&u.value===""||u.value!=f)&&(u.value=""+Dr(f)):u.value!==""+Dr(f)&&(u.value=""+Dr(f)):R!=="submit"&&R!=="reset"||u.removeAttribute("value"),f!=null?am(u,R,Dr(f)):p!=null?am(u,R,Dr(p)):y!=null&&u.removeAttribute("value"),T==null&&C!=null&&(u.defaultChecked=!!C),T!=null&&(u.checked=T&&typeof T!="function"&&typeof T!="symbol"),G!=null&&typeof G!="function"&&typeof G!="symbol"&&typeof G!="boolean"?u.name=""+Dr(G):u.removeAttribute("name")}function Cw(u,f,p,y,T,C,R,G){if(C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(u.type=C),f!=null||p!=null){if(!(C!=="submit"&&C!=="reset"||f!=null)){rm(u);return}p=p!=null?""+Dr(p):"",f=f!=null?""+Dr(f):p,G||f===u.value||(u.value=f),u.defaultValue=f}y=y??T,y=typeof y!="function"&&typeof y!="symbol"&&!!y,u.checked=G?u.checked:!!y,u.defaultChecked=!!y,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(u.name=R),rm(u)}function am(u,f,p){f==="number"&&Xh(u.ownerDocument)===u||u.defaultValue===""+p||(u.defaultValue=""+p)}function ds(u,f,p,y){if(u=u.options,f){f={};for(var T=0;T<p.length;T++)f["$"+p[T]]=!0;for(p=0;p<u.length;p++)T=f.hasOwnProperty("$"+u[p].value),u[p].selected!==T&&(u[p].selected=T),T&&y&&(u[p].defaultSelected=!0)}else{for(p=""+Dr(p),f=null,T=0;T<u.length;T++){if(u[T].value===p){u[T].selected=!0,y&&(u[T].defaultSelected=!0);return}f!==null||u[T].disabled||(f=u[T])}f!==null&&(f.selected=!0)}}function Mw(u,f,p){if(f!=null&&(f=""+Dr(f),f!==u.value&&(u.value=f),p==null)){u.defaultValue!==f&&(u.defaultValue=f);return}u.defaultValue=p!=null?""+Dr(p):""}function Aw(u,f,p,y){if(f==null){if(y!=null){if(p!=null)throw Error(r(92));if(W(y)){if(1<y.length)throw Error(r(93));y=y[0]}p=y}p==null&&(p=""),f=p}p=Dr(f),u.defaultValue=p,y=u.textContent,y===p&&y!==""&&y!==null&&(u.value=y),rm(u)}function vs(u,f){if(f){var p=u.firstChild;if(p&&p===u.lastChild&&p.nodeType===3){p.nodeValue=f;return}}u.textContent=f}var fN=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Dw(u,f,p){var y=f.indexOf("--")===0;p==null||typeof p=="boolean"||p===""?y?u.setProperty(f,""):f==="float"?u.cssFloat="":u[f]="":y?u.setProperty(f,p):typeof p!="number"||p===0||fN.has(f)?f==="float"?u.cssFloat=p:u[f]=(""+p).trim():u[f]=p+"px"}function kw(u,f,p){if(f!=null&&typeof f!="object")throw Error(r(62));if(u=u.style,p!=null){for(var y in p)!p.hasOwnProperty(y)||f!=null&&f.hasOwnProperty(y)||(y.indexOf("--")===0?u.setProperty(y,""):y==="float"?u.cssFloat="":u[y]="");for(var T in f)y=f[T],f.hasOwnProperty(T)&&p[T]!==y&&Dw(u,T,y)}else for(var C in f)f.hasOwnProperty(C)&&Dw(u,C,f[C])}function om(u){if(u.indexOf("-")===-1)return!1;switch(u){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hN=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),dN=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Zh(u){return dN.test(""+u)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":u}function Ki(){}var lm=null;function sm(u){return u=u.target||u.srcElement||window,u.correspondingUseElement&&(u=u.correspondingUseElement),u.nodeType===3?u.parentNode:u}var ps=null,gs=null;function Lw(u){var f=cs(u);if(f&&(u=f.stateNode)){var p=u[$n]||null;t:switch(u=f.stateNode,f.type){case"input":if(im(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name),f=p.name,p.type==="radio"&&f!=null){for(p=u;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll('input[name="'+kr(""+f)+'"][type="radio"]'),f=0;f<p.length;f++){var y=p[f];if(y!==u&&y.form===u.form){var T=y[$n]||null;if(!T)throw Error(r(90));im(y,T.value,T.defaultValue,T.defaultValue,T.checked,T.defaultChecked,T.type,T.name)}}for(f=0;f<p.length;f++)y=p[f],y.form===u.form&&Tw(y)}break t;case"textarea":Mw(u,p.value,p.defaultValue);break t;case"select":f=p.value,f!=null&&ds(u,!!p.multiple,f,!1)}}}var um=!1;function Ew(u,f,p){if(um)return u(f,p);um=!0;try{var y=u(f);return y}finally{if(um=!1,(ps!==null||gs!==null)&&(Bd(),ps&&(f=ps,u=gs,gs=ps=null,Lw(f),u)))for(f=0;f<u.length;f++)Lw(u[f])}}function ic(u,f){var p=u.stateNode;if(p===null)return null;var y=p[$n]||null;if(y===null)return null;p=y[f];t:switch(f){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(u=u.type,y=!(u==="button"||u==="input"||u==="select"||u==="textarea")),u=!y;break t;default:u=!1}if(u)return null;if(p&&typeof p!="function")throw Error(r(231,f,typeof p));return p}var Ji=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cm=!1;if(Ji)try{var ac={};Object.defineProperty(ac,"passive",{get:function(){cm=!0}}),window.addEventListener("test",ac,ac),window.removeEventListener("test",ac,ac)}catch{cm=!1}var Ia=null,fm=null,$h=null;function Rw(){if($h)return $h;var u,f=fm,p=f.length,y,T="value"in Ia?Ia.value:Ia.textContent,C=T.length;for(u=0;u<p&&f[u]===T[u];u++);var R=p-u;for(y=1;y<=R&&f[p-y]===T[C-y];y++);return $h=T.slice(u,1<y?1-y:void 0)}function Qh(u){var f=u.keyCode;return"charCode"in u?(u=u.charCode,u===0&&f===13&&(u=13)):u=f,u===10&&(u=13),32<=u||u===13?u:0}function Kh(){return!0}function Iw(){return!1}function Qn(u){function f(p,y,T,C,R){this._reactName=p,this._targetInst=T,this.type=y,this.nativeEvent=C,this.target=R,this.currentTarget=null;for(var G in u)u.hasOwnProperty(G)&&(p=u[G],this[G]=p?p(C):C[G]);return this.isDefaultPrevented=(C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1)?Kh:Iw,this.isPropagationStopped=Iw,this}return d(f.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=Kh)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=Kh)},persist:function(){},isPersistent:Kh}),f}var Go={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(u){return u.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jh=Qn(Go),oc=d({},Go,{view:0,detail:0}),vN=Qn(oc),hm,dm,lc,td=d({},oc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pm,button:0,buttons:0,relatedTarget:function(u){return u.relatedTarget===void 0?u.fromElement===u.srcElement?u.toElement:u.fromElement:u.relatedTarget},movementX:function(u){return"movementX"in u?u.movementX:(u!==lc&&(lc&&u.type==="mousemove"?(hm=u.screenX-lc.screenX,dm=u.screenY-lc.screenY):dm=hm=0,lc=u),hm)},movementY:function(u){return"movementY"in u?u.movementY:dm}}),Ow=Qn(td),pN=d({},td,{dataTransfer:0}),gN=Qn(pN),mN=d({},oc,{relatedTarget:0}),vm=Qn(mN),yN=d({},Go,{animationName:0,elapsedTime:0,pseudoElement:0}),xN=Qn(yN),bN=d({},Go,{clipboardData:function(u){return"clipboardData"in u?u.clipboardData:window.clipboardData}}),_N=Qn(bN),SN=d({},Go,{data:0}),zw=Qn(SN),wN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},TN={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},CN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function MN(u){var f=this.nativeEvent;return f.getModifierState?f.getModifierState(u):(u=CN[u])?!!f[u]:!1}function pm(){return MN}var AN=d({},oc,{key:function(u){if(u.key){var f=wN[u.key]||u.key;if(f!=="Unidentified")return f}return u.type==="keypress"?(u=Qh(u),u===13?"Enter":String.fromCharCode(u)):u.type==="keydown"||u.type==="keyup"?TN[u.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pm,charCode:function(u){return u.type==="keypress"?Qh(u):0},keyCode:function(u){return u.type==="keydown"||u.type==="keyup"?u.keyCode:0},which:function(u){return u.type==="keypress"?Qh(u):u.type==="keydown"||u.type==="keyup"?u.keyCode:0}}),DN=Qn(AN),kN=d({},td,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bw=Qn(kN),LN=d({},oc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pm}),EN=Qn(LN),RN=d({},Go,{propertyName:0,elapsedTime:0,pseudoElement:0}),IN=Qn(RN),ON=d({},td,{deltaX:function(u){return"deltaX"in u?u.deltaX:"wheelDeltaX"in u?-u.wheelDeltaX:0},deltaY:function(u){return"deltaY"in u?u.deltaY:"wheelDeltaY"in u?-u.wheelDeltaY:"wheelDelta"in u?-u.wheelDelta:0},deltaZ:0,deltaMode:0}),zN=Qn(ON),BN=d({},Go,{newState:0,oldState:0}),NN=Qn(BN),PN=[9,13,27,32],gm=Ji&&"CompositionEvent"in window,sc=null;Ji&&"documentMode"in document&&(sc=document.documentMode);var HN=Ji&&"TextEvent"in window&&!sc,Nw=Ji&&(!gm||sc&&8<sc&&11>=sc),Pw=" ",Hw=!1;function Vw(u,f){switch(u){case"keyup":return PN.indexOf(f.keyCode)!==-1;case"keydown":return f.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jw(u){return u=u.detail,typeof u=="object"&&"data"in u?u.data:null}var ms=!1;function VN(u,f){switch(u){case"compositionend":return jw(f);case"keypress":return f.which!==32?null:(Hw=!0,Pw);case"textInput":return u=f.data,u===Pw&&Hw?null:u;default:return null}}function jN(u,f){if(ms)return u==="compositionend"||!gm&&Vw(u,f)?(u=Rw(),$h=fm=Ia=null,ms=!1,u):null;switch(u){case"paste":return null;case"keypress":if(!(f.ctrlKey||f.altKey||f.metaKey)||f.ctrlKey&&f.altKey){if(f.char&&1<f.char.length)return f.char;if(f.which)return String.fromCharCode(f.which)}return null;case"compositionend":return Nw&&f.locale!=="ko"?null:f.data;default:return null}}var FN={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Fw(u){var f=u&&u.nodeName&&u.nodeName.toLowerCase();return f==="input"?!!FN[u.type]:f==="textarea"}function Gw(u,f,p,y){ps?gs?gs.push(y):gs=[y]:ps=y,f=Gd(f,"onChange"),0<f.length&&(p=new Jh("onChange","change",null,p,y),u.push({event:p,listeners:f}))}var uc=null,cc=null;function GN(u){C2(u,0)}function ed(u){var f=rc(u);if(Tw(f))return u}function Uw(u,f){if(u==="change")return f}var Yw=!1;if(Ji){var mm;if(Ji){var ym="oninput"in document;if(!ym){var Ww=document.createElement("div");Ww.setAttribute("oninput","return;"),ym=typeof Ww.oninput=="function"}mm=ym}else mm=!1;Yw=mm&&(!document.documentMode||9<document.documentMode)}function qw(){uc&&(uc.detachEvent("onpropertychange",Xw),cc=uc=null)}function Xw(u){if(u.propertyName==="value"&&ed(cc)){var f=[];Gw(f,cc,u,sm(u)),Ew(GN,f)}}function UN(u,f,p){u==="focusin"?(qw(),uc=f,cc=p,uc.attachEvent("onpropertychange",Xw)):u==="focusout"&&qw()}function YN(u){if(u==="selectionchange"||u==="keyup"||u==="keydown")return ed(cc)}function WN(u,f){if(u==="click")return ed(f)}function qN(u,f){if(u==="input"||u==="change")return ed(f)}function XN(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var dr=typeof Object.is=="function"?Object.is:XN;function fc(u,f){if(dr(u,f))return!0;if(typeof u!="object"||u===null||typeof f!="object"||f===null)return!1;var p=Object.keys(u),y=Object.keys(f);if(p.length!==y.length)return!1;for(y=0;y<p.length;y++){var T=p[y];if(!An.call(f,T)||!dr(u[T],f[T]))return!1}return!0}function Zw(u){for(;u&&u.firstChild;)u=u.firstChild;return u}function $w(u,f){var p=Zw(u);u=0;for(var y;p;){if(p.nodeType===3){if(y=u+p.textContent.length,u<=f&&y>=f)return{node:p,offset:f-u};u=y}t:{for(;p;){if(p.nextSibling){p=p.nextSibling;break t}p=p.parentNode}p=void 0}p=Zw(p)}}function Qw(u,f){return u&&f?u===f?!0:u&&u.nodeType===3?!1:f&&f.nodeType===3?Qw(u,f.parentNode):"contains"in u?u.contains(f):u.compareDocumentPosition?!!(u.compareDocumentPosition(f)&16):!1:!1}function Kw(u){u=u!=null&&u.ownerDocument!=null&&u.ownerDocument.defaultView!=null?u.ownerDocument.defaultView:window;for(var f=Xh(u.document);f instanceof u.HTMLIFrameElement;){try{var p=typeof f.contentWindow.location.href=="string"}catch{p=!1}if(p)u=f.contentWindow;else break;f=Xh(u.document)}return f}function xm(u){var f=u&&u.nodeName&&u.nodeName.toLowerCase();return f&&(f==="input"&&(u.type==="text"||u.type==="search"||u.type==="tel"||u.type==="url"||u.type==="password")||f==="textarea"||u.contentEditable==="true")}var ZN=Ji&&"documentMode"in document&&11>=document.documentMode,ys=null,bm=null,hc=null,_m=!1;function Jw(u,f,p){var y=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;_m||ys==null||ys!==Xh(y)||(y=ys,"selectionStart"in y&&xm(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),hc&&fc(hc,y)||(hc=y,y=Gd(bm,"onSelect"),0<y.length&&(f=new Jh("onSelect","select",null,f,p),u.push({event:f,listeners:y}),f.target=ys)))}function Uo(u,f){var p={};return p[u.toLowerCase()]=f.toLowerCase(),p["Webkit"+u]="webkit"+f,p["Moz"+u]="moz"+f,p}var xs={animationend:Uo("Animation","AnimationEnd"),animationiteration:Uo("Animation","AnimationIteration"),animationstart:Uo("Animation","AnimationStart"),transitionrun:Uo("Transition","TransitionRun"),transitionstart:Uo("Transition","TransitionStart"),transitioncancel:Uo("Transition","TransitionCancel"),transitionend:Uo("Transition","TransitionEnd")},Sm={},tT={};Ji&&(tT=document.createElement("div").style,"AnimationEvent"in window||(delete xs.animationend.animation,delete xs.animationiteration.animation,delete xs.animationstart.animation),"TransitionEvent"in window||delete xs.transitionend.transition);function Yo(u){if(Sm[u])return Sm[u];if(!xs[u])return u;var f=xs[u],p;for(p in f)if(f.hasOwnProperty(p)&&p in tT)return Sm[u]=f[p];return u}var eT=Yo("animationend"),nT=Yo("animationiteration"),rT=Yo("animationstart"),$N=Yo("transitionrun"),QN=Yo("transitionstart"),KN=Yo("transitioncancel"),iT=Yo("transitionend"),aT=new Map,wm="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");wm.push("scrollEnd");function ii(u,f){aT.set(u,f),Fo(f,[u])}var nd=typeof reportError=="function"?reportError:function(u){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var f=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof u=="object"&&u!==null&&typeof u.message=="string"?String(u.message):String(u),error:u});if(!window.dispatchEvent(f))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",u);return}console.error(u)},Lr=[],bs=0,Tm=0;function rd(){for(var u=bs,f=Tm=bs=0;f<u;){var p=Lr[f];Lr[f++]=null;var y=Lr[f];Lr[f++]=null;var T=Lr[f];Lr[f++]=null;var C=Lr[f];if(Lr[f++]=null,y!==null&&T!==null){var R=y.pending;R===null?T.next=T:(T.next=R.next,R.next=T),y.pending=T}C!==0&&oT(p,T,C)}}function id(u,f,p,y){Lr[bs++]=u,Lr[bs++]=f,Lr[bs++]=p,Lr[bs++]=y,Tm|=y,u.lanes|=y,u=u.alternate,u!==null&&(u.lanes|=y)}function Cm(u,f,p,y){return id(u,f,p,y),ad(u)}function Wo(u,f){return id(u,null,null,f),ad(u)}function oT(u,f,p){u.lanes|=p;var y=u.alternate;y!==null&&(y.lanes|=p);for(var T=!1,C=u.return;C!==null;)C.childLanes|=p,y=C.alternate,y!==null&&(y.childLanes|=p),C.tag===22&&(u=C.stateNode,u===null||u._visibility&1||(T=!0)),u=C,C=C.return;return u.tag===3?(C=u.stateNode,T&&f!==null&&(T=31-Ee(p),u=C.hiddenUpdates,y=u[T],y===null?u[T]=[f]:y.push(f),f.lane=p|536870912),C):null}function ad(u){if(50<Oc)throw Oc=0,Oy=null,Error(r(185));for(var f=u.return;f!==null;)u=f,f=u.return;return u.tag===3?u.stateNode:null}var _s={};function JN(u,f,p,y){this.tag=u,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vr(u,f,p,y){return new JN(u,f,p,y)}function Mm(u){return u=u.prototype,!(!u||!u.isReactComponent)}function ta(u,f){var p=u.alternate;return p===null?(p=vr(u.tag,f,u.key,u.mode),p.elementType=u.elementType,p.type=u.type,p.stateNode=u.stateNode,p.alternate=u,u.alternate=p):(p.pendingProps=f,p.type=u.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=u.flags&65011712,p.childLanes=u.childLanes,p.lanes=u.lanes,p.child=u.child,p.memoizedProps=u.memoizedProps,p.memoizedState=u.memoizedState,p.updateQueue=u.updateQueue,f=u.dependencies,p.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},p.sibling=u.sibling,p.index=u.index,p.ref=u.ref,p.refCleanup=u.refCleanup,p}function lT(u,f){u.flags&=65011714;var p=u.alternate;return p===null?(u.childLanes=0,u.lanes=f,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=p.childLanes,u.lanes=p.lanes,u.child=p.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=p.memoizedProps,u.memoizedState=p.memoizedState,u.updateQueue=p.updateQueue,u.type=p.type,f=p.dependencies,u.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext}),u}function od(u,f,p,y,T,C){var R=0;if(y=u,typeof u=="function")Mm(u)&&(R=1);else if(typeof u=="string")R=iP(u,p,tt.current)?26:u==="html"||u==="head"||u==="body"?27:5;else t:switch(u){case N:return u=vr(31,p,f,T),u.elementType=N,u.lanes=C,u;case x:return qo(p.children,T,C,f);case _:R=8,T|=24;break;case b:return u=vr(12,p,f,T|2),u.elementType=b,u.lanes=C,u;case D:return u=vr(13,p,f,T),u.elementType=D,u.lanes=C,u;case M:return u=vr(19,p,f,T),u.elementType=M,u.lanes=C,u;default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case w:R=10;break t;case S:R=9;break t;case A:R=11;break t;case L:R=14;break t;case I:R=16,y=null;break t}R=29,p=Error(r(130,u===null?"null":typeof u,"")),y=null}return f=vr(R,p,f,T),f.elementType=u,f.type=y,f.lanes=C,f}function qo(u,f,p,y){return u=vr(7,u,y,f),u.lanes=p,u}function Am(u,f,p){return u=vr(6,u,null,f),u.lanes=p,u}function sT(u){var f=vr(18,null,null,0);return f.stateNode=u,f}function Dm(u,f,p){return f=vr(4,u.children!==null?u.children:[],u.key,f),f.lanes=p,f.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},f}var uT=new WeakMap;function Er(u,f){if(typeof u=="object"&&u!==null){var p=uT.get(u);return p!==void 0?p:(f={value:u,source:f,stack:fr(f)},uT.set(u,f),f)}return{value:u,source:f,stack:fr(f)}}var Ss=[],ws=0,ld=null,dc=0,Rr=[],Ir=0,Oa=null,wi=1,Ti="";function ea(u,f){Ss[ws++]=dc,Ss[ws++]=ld,ld=u,dc=f}function cT(u,f,p){Rr[Ir++]=wi,Rr[Ir++]=Ti,Rr[Ir++]=Oa,Oa=u;var y=wi;u=Ti;var T=32-Ee(y)-1;y&=~(1<<T),p+=1;var C=32-Ee(f)+T;if(30<C){var R=T-T%5;C=(y&(1<<R)-1).toString(32),y>>=R,T-=R,wi=1<<32-Ee(f)+T|p<<T|y,Ti=C+u}else wi=1<<C|p<<T|y,Ti=u}function km(u){u.return!==null&&(ea(u,1),cT(u,1,0))}function Lm(u){for(;u===ld;)ld=Ss[--ws],Ss[ws]=null,dc=Ss[--ws],Ss[ws]=null;for(;u===Oa;)Oa=Rr[--Ir],Rr[Ir]=null,Ti=Rr[--Ir],Rr[Ir]=null,wi=Rr[--Ir],Rr[Ir]=null}function fT(u,f){Rr[Ir++]=wi,Rr[Ir++]=Ti,Rr[Ir++]=Oa,wi=f.id,Ti=f.overflow,Oa=u}var yn=null,Ne=null,se=!1,za=null,Or=!1,Em=Error(r(519));function Ba(u){var f=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw vc(Er(f,u)),Em}function hT(u){var f=u.stateNode,p=u.type,y=u.memoizedProps;switch(f[mn]=u,f[$n]=y,p){case"dialog":ne("cancel",f),ne("close",f);break;case"iframe":case"object":case"embed":ne("load",f);break;case"video":case"audio":for(p=0;p<Bc.length;p++)ne(Bc[p],f);break;case"source":ne("error",f);break;case"img":case"image":case"link":ne("error",f),ne("load",f);break;case"details":ne("toggle",f);break;case"input":ne("invalid",f),Cw(f,y.value,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name,!0);break;case"select":ne("invalid",f);break;case"textarea":ne("invalid",f),Aw(f,y.value,y.defaultValue,y.children)}p=y.children,typeof p!="string"&&typeof p!="number"&&typeof p!="bigint"||f.textContent===""+p||y.suppressHydrationWarning===!0||k2(f.textContent,p)?(y.popover!=null&&(ne("beforetoggle",f),ne("toggle",f)),y.onScroll!=null&&ne("scroll",f),y.onScrollEnd!=null&&ne("scrollend",f),y.onClick!=null&&(f.onclick=Ki),f=!0):f=!1,f||Ba(u,!0)}function dT(u){for(yn=u.return;yn;)switch(yn.tag){case 5:case 31:case 13:Or=!1;return;case 27:case 3:Or=!0;return;default:yn=yn.return}}function Ts(u){if(u!==yn)return!1;if(!se)return dT(u),se=!0,!1;var f=u.tag,p;if((p=f!==3&&f!==27)&&((p=f===5)&&(p=u.type,p=!(p!=="form"&&p!=="button")||Zy(u.type,u.memoizedProps)),p=!p),p&&Ne&&Ba(u),dT(u),f===13){if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));Ne=P2(u)}else if(f===31){if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));Ne=P2(u)}else f===27?(f=Ne,$a(u.type)?(u=t0,t0=null,Ne=u):Ne=f):Ne=yn?Br(u.stateNode.nextSibling):null;return!0}function Xo(){Ne=yn=null,se=!1}function Rm(){var u=za;return u!==null&&(er===null?er=u:er.push.apply(er,u),za=null),u}function vc(u){za===null?za=[u]:za.push(u)}var Im=Y(null),Zo=null,na=null;function Na(u,f,p){V(Im,f._currentValue),f._currentValue=p}function ra(u){u._currentValue=Im.current,Z(Im)}function Om(u,f,p){for(;u!==null;){var y=u.alternate;if((u.childLanes&f)!==f?(u.childLanes|=f,y!==null&&(y.childLanes|=f)):y!==null&&(y.childLanes&f)!==f&&(y.childLanes|=f),u===p)break;u=u.return}}function zm(u,f,p,y){var T=u.child;for(T!==null&&(T.return=u);T!==null;){var C=T.dependencies;if(C!==null){var R=T.child;C=C.firstContext;t:for(;C!==null;){var G=C;C=T;for(var $=0;$<f.length;$++)if(G.context===f[$]){C.lanes|=p,G=C.alternate,G!==null&&(G.lanes|=p),Om(C.return,p,u),y||(R=null);break t}C=G.next}}else if(T.tag===18){if(R=T.return,R===null)throw Error(r(341));R.lanes|=p,C=R.alternate,C!==null&&(C.lanes|=p),Om(R,p,u),R=null}else R=T.child;if(R!==null)R.return=T;else for(R=T;R!==null;){if(R===u){R=null;break}if(T=R.sibling,T!==null){T.return=R.return,R=T;break}R=R.return}T=R}}function Cs(u,f,p,y){u=null;for(var T=f,C=!1;T!==null;){if(!C){if((T.flags&524288)!==0)C=!0;else if((T.flags&262144)!==0)break}if(T.tag===10){var R=T.alternate;if(R===null)throw Error(r(387));if(R=R.memoizedProps,R!==null){var G=T.type;dr(T.pendingProps.value,R.value)||(u!==null?u.push(G):u=[G])}}else if(T===wt.current){if(R=T.alternate,R===null)throw Error(r(387));R.memoizedState.memoizedState!==T.memoizedState.memoizedState&&(u!==null?u.push(jc):u=[jc])}T=T.return}u!==null&&zm(f,u,p,y),f.flags|=262144}function sd(u){for(u=u.firstContext;u!==null;){if(!dr(u.context._currentValue,u.memoizedValue))return!0;u=u.next}return!1}function $o(u){Zo=u,na=null,u=u.dependencies,u!==null&&(u.firstContext=null)}function xn(u){return vT(Zo,u)}function ud(u,f){return Zo===null&&$o(u),vT(u,f)}function vT(u,f){var p=f._currentValue;if(f={context:f,memoizedValue:p,next:null},na===null){if(u===null)throw Error(r(308));na=f,u.dependencies={lanes:0,firstContext:f},u.flags|=524288}else na=na.next=f;return p}var t4=typeof AbortController<"u"?AbortController:function(){var u=[],f=this.signal={aborted:!1,addEventListener:function(p,y){u.push(y)}};this.abort=function(){f.aborted=!0,u.forEach(function(p){return p()})}},e4=e.unstable_scheduleCallback,n4=e.unstable_NormalPriority,tn={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bm(){return{controller:new t4,data:new Map,refCount:0}}function pc(u){u.refCount--,u.refCount===0&&e4(n4,function(){u.controller.abort()})}var gc=null,Nm=0,Ms=0,As=null;function r4(u,f){if(gc===null){var p=gc=[];Nm=0,Ms=Vy(),As={status:"pending",value:void 0,then:function(y){p.push(y)}}}return Nm++,f.then(pT,pT),f}function pT(){if(--Nm===0&&gc!==null){As!==null&&(As.status="fulfilled");var u=gc;gc=null,Ms=0,As=null;for(var f=0;f<u.length;f++)(0,u[f])()}}function i4(u,f){var p=[],y={status:"pending",value:null,reason:null,then:function(T){p.push(T)}};return u.then(function(){y.status="fulfilled",y.value=f;for(var T=0;T<p.length;T++)(0,p[T])(f)},function(T){for(y.status="rejected",y.reason=T,T=0;T<p.length;T++)(0,p[T])(void 0)}),y}var gT=H.S;H.S=function(u,f){JC=Nn(),typeof f=="object"&&f!==null&&typeof f.then=="function"&&r4(u,f),gT!==null&&gT(u,f)};var Qo=Y(null);function Pm(){var u=Qo.current;return u!==null?u:Re.pooledCache}function cd(u,f){f===null?V(Qo,Qo.current):V(Qo,f.pool)}function mT(){var u=Pm();return u===null?null:{parent:tn._currentValue,pool:u}}var Ds=Error(r(460)),Hm=Error(r(474)),fd=Error(r(542)),hd={then:function(){}};function yT(u){return u=u.status,u==="fulfilled"||u==="rejected"}function xT(u,f,p){switch(p=u[p],p===void 0?u.push(f):p!==f&&(f.then(Ki,Ki),f=p),f.status){case"fulfilled":return f.value;case"rejected":throw u=f.reason,_T(u),u;default:if(typeof f.status=="string")f.then(Ki,Ki);else{if(u=Re,u!==null&&100<u.shellSuspendCounter)throw Error(r(482));u=f,u.status="pending",u.then(function(y){if(f.status==="pending"){var T=f;T.status="fulfilled",T.value=y}},function(y){if(f.status==="pending"){var T=f;T.status="rejected",T.reason=y}})}switch(f.status){case"fulfilled":return f.value;case"rejected":throw u=f.reason,_T(u),u}throw Jo=f,Ds}}function Ko(u){try{var f=u._init;return f(u._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(Jo=p,Ds):p}}var Jo=null;function bT(){if(Jo===null)throw Error(r(459));var u=Jo;return Jo=null,u}function _T(u){if(u===Ds||u===fd)throw Error(r(483))}var ks=null,mc=0;function dd(u){var f=mc;return mc+=1,ks===null&&(ks=[]),xT(ks,u,f)}function yc(u,f){f=f.props.ref,u.ref=f!==void 0?f:null}function vd(u,f){throw f.$$typeof===v?Error(r(525)):(u=Object.prototype.toString.call(f),Error(r(31,u==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":u)))}function ST(u){function f(K,Q){if(u){var et=K.deletions;et===null?(K.deletions=[Q],K.flags|=16):et.push(Q)}}function p(K,Q){if(!u)return null;for(;Q!==null;)f(K,Q),Q=Q.sibling;return null}function y(K){for(var Q=new Map;K!==null;)K.key!==null?Q.set(K.key,K):Q.set(K.index,K),K=K.sibling;return Q}function T(K,Q){return K=ta(K,Q),K.index=0,K.sibling=null,K}function C(K,Q,et){return K.index=et,u?(et=K.alternate,et!==null?(et=et.index,et<Q?(K.flags|=67108866,Q):et):(K.flags|=67108866,Q)):(K.flags|=1048576,Q)}function R(K){return u&&K.alternate===null&&(K.flags|=67108866),K}function G(K,Q,et,ft){return Q===null||Q.tag!==6?(Q=Am(et,K.mode,ft),Q.return=K,Q):(Q=T(Q,et),Q.return=K,Q)}function $(K,Q,et,ft){var Ot=et.type;return Ot===x?st(K,Q,et.props.children,ft,et.key):Q!==null&&(Q.elementType===Ot||typeof Ot=="object"&&Ot!==null&&Ot.$$typeof===I&&Ko(Ot)===Q.type)?(Q=T(Q,et.props),yc(Q,et),Q.return=K,Q):(Q=od(et.type,et.key,et.props,null,K.mode,ft),yc(Q,et),Q.return=K,Q)}function nt(K,Q,et,ft){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==et.containerInfo||Q.stateNode.implementation!==et.implementation?(Q=Dm(et,K.mode,ft),Q.return=K,Q):(Q=T(Q,et.children||[]),Q.return=K,Q)}function st(K,Q,et,ft,Ot){return Q===null||Q.tag!==7?(Q=qo(et,K.mode,ft,Ot),Q.return=K,Q):(Q=T(Q,et),Q.return=K,Q)}function ht(K,Q,et){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=Am(""+Q,K.mode,et),Q.return=K,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case g:return et=od(Q.type,Q.key,Q.props,null,K.mode,et),yc(et,Q),et.return=K,et;case m:return Q=Dm(Q,K.mode,et),Q.return=K,Q;case I:return Q=Ko(Q),ht(K,Q,et)}if(W(Q)||j(Q))return Q=qo(Q,K.mode,et,null),Q.return=K,Q;if(typeof Q.then=="function")return ht(K,dd(Q),et);if(Q.$$typeof===w)return ht(K,ud(K,Q),et);vd(K,Q)}return null}function rt(K,Q,et,ft){var Ot=Q!==null?Q.key:null;if(typeof et=="string"&&et!==""||typeof et=="number"||typeof et=="bigint")return Ot!==null?null:G(K,Q,""+et,ft);if(typeof et=="object"&&et!==null){switch(et.$$typeof){case g:return et.key===Ot?$(K,Q,et,ft):null;case m:return et.key===Ot?nt(K,Q,et,ft):null;case I:return et=Ko(et),rt(K,Q,et,ft)}if(W(et)||j(et))return Ot!==null?null:st(K,Q,et,ft,null);if(typeof et.then=="function")return rt(K,Q,dd(et),ft);if(et.$$typeof===w)return rt(K,Q,ud(K,et),ft);vd(K,et)}return null}function it(K,Q,et,ft,Ot){if(typeof ft=="string"&&ft!==""||typeof ft=="number"||typeof ft=="bigint")return K=K.get(et)||null,G(Q,K,""+ft,Ot);if(typeof ft=="object"&&ft!==null){switch(ft.$$typeof){case g:return K=K.get(ft.key===null?et:ft.key)||null,$(Q,K,ft,Ot);case m:return K=K.get(ft.key===null?et:ft.key)||null,nt(Q,K,ft,Ot);case I:return ft=Ko(ft),it(K,Q,et,ft,Ot)}if(W(ft)||j(ft))return K=K.get(et)||null,st(Q,K,ft,Ot,null);if(typeof ft.then=="function")return it(K,Q,et,dd(ft),Ot);if(ft.$$typeof===w)return it(K,Q,et,ud(Q,ft),Ot);vd(Q,ft)}return null}function kt(K,Q,et,ft){for(var Ot=null,pe=null,Et=Q,Qt=Q=0,oe=null;Et!==null&&Qt<et.length;Qt++){Et.index>Qt?(oe=Et,Et=null):oe=Et.sibling;var ge=rt(K,Et,et[Qt],ft);if(ge===null){Et===null&&(Et=oe);break}u&&Et&&ge.alternate===null&&f(K,Et),Q=C(ge,Q,Qt),pe===null?Ot=ge:pe.sibling=ge,pe=ge,Et=oe}if(Qt===et.length)return p(K,Et),se&&ea(K,Qt),Ot;if(Et===null){for(;Qt<et.length;Qt++)Et=ht(K,et[Qt],ft),Et!==null&&(Q=C(Et,Q,Qt),pe===null?Ot=Et:pe.sibling=Et,pe=Et);return se&&ea(K,Qt),Ot}for(Et=y(Et);Qt<et.length;Qt++)oe=it(Et,K,Qt,et[Qt],ft),oe!==null&&(u&&oe.alternate!==null&&Et.delete(oe.key===null?Qt:oe.key),Q=C(oe,Q,Qt),pe===null?Ot=oe:pe.sibling=oe,pe=oe);return u&&Et.forEach(function(eo){return f(K,eo)}),se&&ea(K,Qt),Ot}function Ht(K,Q,et,ft){if(et==null)throw Error(r(151));for(var Ot=null,pe=null,Et=Q,Qt=Q=0,oe=null,ge=et.next();Et!==null&&!ge.done;Qt++,ge=et.next()){Et.index>Qt?(oe=Et,Et=null):oe=Et.sibling;var eo=rt(K,Et,ge.value,ft);if(eo===null){Et===null&&(Et=oe);break}u&&Et&&eo.alternate===null&&f(K,Et),Q=C(eo,Q,Qt),pe===null?Ot=eo:pe.sibling=eo,pe=eo,Et=oe}if(ge.done)return p(K,Et),se&&ea(K,Qt),Ot;if(Et===null){for(;!ge.done;Qt++,ge=et.next())ge=ht(K,ge.value,ft),ge!==null&&(Q=C(ge,Q,Qt),pe===null?Ot=ge:pe.sibling=ge,pe=ge);return se&&ea(K,Qt),Ot}for(Et=y(Et);!ge.done;Qt++,ge=et.next())ge=it(Et,K,Qt,ge.value,ft),ge!==null&&(u&&ge.alternate!==null&&Et.delete(ge.key===null?Qt:ge.key),Q=C(ge,Q,Qt),pe===null?Ot=ge:pe.sibling=ge,pe=ge);return u&&Et.forEach(function(pP){return f(K,pP)}),se&&ea(K,Qt),Ot}function Le(K,Q,et,ft){if(typeof et=="object"&&et!==null&&et.type===x&&et.key===null&&(et=et.props.children),typeof et=="object"&&et!==null){switch(et.$$typeof){case g:t:{for(var Ot=et.key;Q!==null;){if(Q.key===Ot){if(Ot=et.type,Ot===x){if(Q.tag===7){p(K,Q.sibling),ft=T(Q,et.props.children),ft.return=K,K=ft;break t}}else if(Q.elementType===Ot||typeof Ot=="object"&&Ot!==null&&Ot.$$typeof===I&&Ko(Ot)===Q.type){p(K,Q.sibling),ft=T(Q,et.props),yc(ft,et),ft.return=K,K=ft;break t}p(K,Q);break}else f(K,Q);Q=Q.sibling}et.type===x?(ft=qo(et.props.children,K.mode,ft,et.key),ft.return=K,K=ft):(ft=od(et.type,et.key,et.props,null,K.mode,ft),yc(ft,et),ft.return=K,K=ft)}return R(K);case m:t:{for(Ot=et.key;Q!==null;){if(Q.key===Ot)if(Q.tag===4&&Q.stateNode.containerInfo===et.containerInfo&&Q.stateNode.implementation===et.implementation){p(K,Q.sibling),ft=T(Q,et.children||[]),ft.return=K,K=ft;break t}else{p(K,Q);break}else f(K,Q);Q=Q.sibling}ft=Dm(et,K.mode,ft),ft.return=K,K=ft}return R(K);case I:return et=Ko(et),Le(K,Q,et,ft)}if(W(et))return kt(K,Q,et,ft);if(j(et)){if(Ot=j(et),typeof Ot!="function")throw Error(r(150));return et=Ot.call(et),Ht(K,Q,et,ft)}if(typeof et.then=="function")return Le(K,Q,dd(et),ft);if(et.$$typeof===w)return Le(K,Q,ud(K,et),ft);vd(K,et)}return typeof et=="string"&&et!==""||typeof et=="number"||typeof et=="bigint"?(et=""+et,Q!==null&&Q.tag===6?(p(K,Q.sibling),ft=T(Q,et),ft.return=K,K=ft):(p(K,Q),ft=Am(et,K.mode,ft),ft.return=K,K=ft),R(K)):p(K,Q)}return function(K,Q,et,ft){try{mc=0;var Ot=Le(K,Q,et,ft);return ks=null,Ot}catch(Et){if(Et===Ds||Et===fd)throw Et;var pe=vr(29,Et,null,K.mode);return pe.lanes=ft,pe.return=K,pe}finally{}}}var tl=ST(!0),wT=ST(!1),Pa=!1;function Vm(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function jm(u,f){u=u.updateQueue,f.updateQueue===u&&(f.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,callbacks:null})}function Ha(u){return{lane:u,tag:0,payload:null,callback:null,next:null}}function Va(u,f,p){var y=u.updateQueue;if(y===null)return null;if(y=y.shared,(ye&2)!==0){var T=y.pending;return T===null?f.next=f:(f.next=T.next,T.next=f),y.pending=f,f=ad(u),oT(u,null,p),f}return id(u,y,f,p),ad(u)}function xc(u,f,p){if(f=f.updateQueue,f!==null&&(f=f.shared,(p&4194048)!==0)){var y=f.lanes;y&=u.pendingLanes,p|=y,f.lanes=p,vw(u,p)}}function Fm(u,f){var p=u.updateQueue,y=u.alternate;if(y!==null&&(y=y.updateQueue,p===y)){var T=null,C=null;if(p=p.firstBaseUpdate,p!==null){do{var R={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};C===null?T=C=R:C=C.next=R,p=p.next}while(p!==null);C===null?T=C=f:C=C.next=f}else T=C=f;p={baseState:y.baseState,firstBaseUpdate:T,lastBaseUpdate:C,shared:y.shared,callbacks:y.callbacks},u.updateQueue=p;return}u=p.lastBaseUpdate,u===null?p.firstBaseUpdate=f:u.next=f,p.lastBaseUpdate=f}var Gm=!1;function bc(){if(Gm){var u=As;if(u!==null)throw u}}function _c(u,f,p,y){Gm=!1;var T=u.updateQueue;Pa=!1;var C=T.firstBaseUpdate,R=T.lastBaseUpdate,G=T.shared.pending;if(G!==null){T.shared.pending=null;var $=G,nt=$.next;$.next=null,R===null?C=nt:R.next=nt,R=$;var st=u.alternate;st!==null&&(st=st.updateQueue,G=st.lastBaseUpdate,G!==R&&(G===null?st.firstBaseUpdate=nt:G.next=nt,st.lastBaseUpdate=$))}if(C!==null){var ht=T.baseState;R=0,st=nt=$=null,G=C;do{var rt=G.lane&-536870913,it=rt!==G.lane;if(it?(ae&rt)===rt:(y&rt)===rt){rt!==0&&rt===Ms&&(Gm=!0),st!==null&&(st=st.next={lane:0,tag:G.tag,payload:G.payload,callback:null,next:null});t:{var kt=u,Ht=G;rt=f;var Le=p;switch(Ht.tag){case 1:if(kt=Ht.payload,typeof kt=="function"){ht=kt.call(Le,ht,rt);break t}ht=kt;break t;case 3:kt.flags=kt.flags&-65537|128;case 0:if(kt=Ht.payload,rt=typeof kt=="function"?kt.call(Le,ht,rt):kt,rt==null)break t;ht=d({},ht,rt);break t;case 2:Pa=!0}}rt=G.callback,rt!==null&&(u.flags|=64,it&&(u.flags|=8192),it=T.callbacks,it===null?T.callbacks=[rt]:it.push(rt))}else it={lane:rt,tag:G.tag,payload:G.payload,callback:G.callback,next:null},st===null?(nt=st=it,$=ht):st=st.next=it,R|=rt;if(G=G.next,G===null){if(G=T.shared.pending,G===null)break;it=G,G=it.next,it.next=null,T.lastBaseUpdate=it,T.shared.pending=null}}while(!0);st===null&&($=ht),T.baseState=$,T.firstBaseUpdate=nt,T.lastBaseUpdate=st,C===null&&(T.shared.lanes=0),Ya|=R,u.lanes=R,u.memoizedState=ht}}function TT(u,f){if(typeof u!="function")throw Error(r(191,u));u.call(f)}function CT(u,f){var p=u.callbacks;if(p!==null)for(u.callbacks=null,u=0;u<p.length;u++)TT(p[u],f)}var Ls=Y(null),pd=Y(0);function MT(u,f){u=ha,V(pd,u),V(Ls,f),ha=u|f.baseLanes}function Um(){V(pd,ha),V(Ls,Ls.current)}function Ym(){ha=pd.current,Z(Ls),Z(pd)}var pr=Y(null),zr=null;function ja(u){var f=u.alternate;V(We,We.current&1),V(pr,u),zr===null&&(f===null||Ls.current!==null||f.memoizedState!==null)&&(zr=u)}function Wm(u){V(We,We.current),V(pr,u),zr===null&&(zr=u)}function AT(u){u.tag===22?(V(We,We.current),V(pr,u),zr===null&&(zr=u)):Fa()}function Fa(){V(We,We.current),V(pr,pr.current)}function gr(u){Z(pr),zr===u&&(zr=null),Z(We)}var We=Y(0);function gd(u){for(var f=u;f!==null;){if(f.tag===13){var p=f.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||Ky(p)||Jy(p)))return f}else if(f.tag===19&&(f.memoizedProps.revealOrder==="forwards"||f.memoizedProps.revealOrder==="backwards"||f.memoizedProps.revealOrder==="unstable_legacy-backwards"||f.memoizedProps.revealOrder==="together")){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===u)break;for(;f.sibling===null;){if(f.return===null||f.return===u)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var ia=0,Xt=null,De=null,en=null,md=!1,Es=!1,el=!1,yd=0,Sc=0,Rs=null,a4=0;function je(){throw Error(r(321))}function qm(u,f){if(f===null)return!1;for(var p=0;p<f.length&&p<u.length;p++)if(!dr(u[p],f[p]))return!1;return!0}function Xm(u,f,p,y,T,C){return ia=C,Xt=f,f.memoizedState=null,f.updateQueue=null,f.lanes=0,H.H=u===null||u.memoizedState===null?cC:uy,el=!1,C=p(y,T),el=!1,Es&&(C=kT(f,p,y,T)),DT(u),C}function DT(u){H.H=Cc;var f=De!==null&&De.next!==null;if(ia=0,en=De=Xt=null,md=!1,Sc=0,Rs=null,f)throw Error(r(300));u===null||nn||(u=u.dependencies,u!==null&&sd(u)&&(nn=!0))}function kT(u,f,p,y){Xt=u;var T=0;do{if(Es&&(Rs=null),Sc=0,Es=!1,25<=T)throw Error(r(301));if(T+=1,en=De=null,u.updateQueue!=null){var C=u.updateQueue;C.lastEffect=null,C.events=null,C.stores=null,C.memoCache!=null&&(C.memoCache.index=0)}H.H=fC,C=f(p,y)}while(Es);return C}function o4(){var u=H.H,f=u.useState()[0];return f=typeof f.then=="function"?wc(f):f,u=u.useState()[0],(De!==null?De.memoizedState:null)!==u&&(Xt.flags|=1024),f}function Zm(){var u=yd!==0;return yd=0,u}function $m(u,f,p){f.updateQueue=u.updateQueue,f.flags&=-2053,u.lanes&=~p}function Qm(u){if(md){for(u=u.memoizedState;u!==null;){var f=u.queue;f!==null&&(f.pending=null),u=u.next}md=!1}ia=0,en=De=Xt=null,Es=!1,Sc=yd=0,Rs=null}function Hn(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?Xt.memoizedState=en=u:en=en.next=u,en}function qe(){if(De===null){var u=Xt.alternate;u=u!==null?u.memoizedState:null}else u=De.next;var f=en===null?Xt.memoizedState:en.next;if(f!==null)en=f,De=u;else{if(u===null)throw Xt.alternate===null?Error(r(467)):Error(r(310));De=u,u={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},en===null?Xt.memoizedState=en=u:en=en.next=u}return en}function xd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wc(u){var f=Sc;return Sc+=1,Rs===null&&(Rs=[]),u=xT(Rs,u,f),f=Xt,(en===null?f.memoizedState:en.next)===null&&(f=f.alternate,H.H=f===null||f.memoizedState===null?cC:uy),u}function bd(u){if(u!==null&&typeof u=="object"){if(typeof u.then=="function")return wc(u);if(u.$$typeof===w)return xn(u)}throw Error(r(438,String(u)))}function Km(u){var f=null,p=Xt.updateQueue;if(p!==null&&(f=p.memoCache),f==null){var y=Xt.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(f={data:y.data.map(function(T){return T.slice()}),index:0})))}if(f==null&&(f={data:[],index:0}),p===null&&(p=xd(),Xt.updateQueue=p),p.memoCache=f,p=f.data[f.index],p===void 0)for(p=f.data[f.index]=Array(u),y=0;y<u;y++)p[y]=E;return f.index++,p}function aa(u,f){return typeof f=="function"?f(u):f}function _d(u){var f=qe();return Jm(f,De,u)}function Jm(u,f,p){var y=u.queue;if(y===null)throw Error(r(311));y.lastRenderedReducer=p;var T=u.baseQueue,C=y.pending;if(C!==null){if(T!==null){var R=T.next;T.next=C.next,C.next=R}f.baseQueue=T=C,y.pending=null}if(C=u.baseState,T===null)u.memoizedState=C;else{f=T.next;var G=R=null,$=null,nt=f,st=!1;do{var ht=nt.lane&-536870913;if(ht!==nt.lane?(ae&ht)===ht:(ia&ht)===ht){var rt=nt.revertLane;if(rt===0)$!==null&&($=$.next={lane:0,revertLane:0,gesture:null,action:nt.action,hasEagerState:nt.hasEagerState,eagerState:nt.eagerState,next:null}),ht===Ms&&(st=!0);else if((ia&rt)===rt){nt=nt.next,rt===Ms&&(st=!0);continue}else ht={lane:0,revertLane:nt.revertLane,gesture:null,action:nt.action,hasEagerState:nt.hasEagerState,eagerState:nt.eagerState,next:null},$===null?(G=$=ht,R=C):$=$.next=ht,Xt.lanes|=rt,Ya|=rt;ht=nt.action,el&&p(C,ht),C=nt.hasEagerState?nt.eagerState:p(C,ht)}else rt={lane:ht,revertLane:nt.revertLane,gesture:nt.gesture,action:nt.action,hasEagerState:nt.hasEagerState,eagerState:nt.eagerState,next:null},$===null?(G=$=rt,R=C):$=$.next=rt,Xt.lanes|=ht,Ya|=ht;nt=nt.next}while(nt!==null&&nt!==f);if($===null?R=C:$.next=G,!dr(C,u.memoizedState)&&(nn=!0,st&&(p=As,p!==null)))throw p;u.memoizedState=C,u.baseState=R,u.baseQueue=$,y.lastRenderedState=C}return T===null&&(y.lanes=0),[u.memoizedState,y.dispatch]}function ty(u){var f=qe(),p=f.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=u;var y=p.dispatch,T=p.pending,C=f.memoizedState;if(T!==null){p.pending=null;var R=T=T.next;do C=u(C,R.action),R=R.next;while(R!==T);dr(C,f.memoizedState)||(nn=!0),f.memoizedState=C,f.baseQueue===null&&(f.baseState=C),p.lastRenderedState=C}return[C,y]}function LT(u,f,p){var y=Xt,T=qe(),C=se;if(C){if(p===void 0)throw Error(r(407));p=p()}else p=f();var R=!dr((De||T).memoizedState,p);if(R&&(T.memoizedState=p,nn=!0),T=T.queue,ry(IT.bind(null,y,T,u),[u]),T.getSnapshot!==f||R||en!==null&&en.memoizedState.tag&1){if(y.flags|=2048,Is(9,{destroy:void 0},RT.bind(null,y,T,p,f),null),Re===null)throw Error(r(349));C||(ia&127)!==0||ET(y,f,p)}return p}function ET(u,f,p){u.flags|=16384,u={getSnapshot:f,value:p},f=Xt.updateQueue,f===null?(f=xd(),Xt.updateQueue=f,f.stores=[u]):(p=f.stores,p===null?f.stores=[u]:p.push(u))}function RT(u,f,p,y){f.value=p,f.getSnapshot=y,OT(f)&&zT(u)}function IT(u,f,p){return p(function(){OT(f)&&zT(u)})}function OT(u){var f=u.getSnapshot;u=u.value;try{var p=f();return!dr(u,p)}catch{return!0}}function zT(u){var f=Wo(u,2);f!==null&&nr(f,u,2)}function ey(u){var f=Hn();if(typeof u=="function"){var p=u;if(u=p(),el){Zn(!0);try{p()}finally{Zn(!1)}}}return f.memoizedState=f.baseState=u,f.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:aa,lastRenderedState:u},f}function BT(u,f,p,y){return u.baseState=p,Jm(u,De,typeof y=="function"?y:aa)}function l4(u,f,p,y,T){if(Td(u))throw Error(r(485));if(u=f.action,u!==null){var C={payload:T,action:u,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(R){C.listeners.push(R)}};H.T!==null?p(!0):C.isTransition=!1,y(C),p=f.pending,p===null?(C.next=f.pending=C,NT(f,C)):(C.next=p.next,f.pending=p.next=C)}}function NT(u,f){var p=f.action,y=f.payload,T=u.state;if(f.isTransition){var C=H.T,R={};H.T=R;try{var G=p(T,y),$=H.S;$!==null&&$(R,G),PT(u,f,G)}catch(nt){ny(u,f,nt)}finally{C!==null&&R.types!==null&&(C.types=R.types),H.T=C}}else try{C=p(T,y),PT(u,f,C)}catch(nt){ny(u,f,nt)}}function PT(u,f,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(y){HT(u,f,y)},function(y){return ny(u,f,y)}):HT(u,f,p)}function HT(u,f,p){f.status="fulfilled",f.value=p,VT(f),u.state=p,f=u.pending,f!==null&&(p=f.next,p===f?u.pending=null:(p=p.next,f.next=p,NT(u,p)))}function ny(u,f,p){var y=u.pending;if(u.pending=null,y!==null){y=y.next;do f.status="rejected",f.reason=p,VT(f),f=f.next;while(f!==y)}u.action=null}function VT(u){u=u.listeners;for(var f=0;f<u.length;f++)(0,u[f])()}function jT(u,f){return f}function FT(u,f){if(se){var p=Re.formState;if(p!==null){t:{var y=Xt;if(se){if(Ne){e:{for(var T=Ne,C=Or;T.nodeType!==8;){if(!C){T=null;break e}if(T=Br(T.nextSibling),T===null){T=null;break e}}C=T.data,T=C==="F!"||C==="F"?T:null}if(T){Ne=Br(T.nextSibling),y=T.data==="F!";break t}}Ba(y)}y=!1}y&&(f=p[0])}}return p=Hn(),p.memoizedState=p.baseState=f,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jT,lastRenderedState:f},p.queue=y,p=lC.bind(null,Xt,y),y.dispatch=p,y=ey(!1),C=sy.bind(null,Xt,!1,y.queue),y=Hn(),T={state:f,dispatch:null,action:u,pending:null},y.queue=T,p=l4.bind(null,Xt,T,C,p),T.dispatch=p,y.memoizedState=u,[f,p,!1]}function GT(u){var f=qe();return UT(f,De,u)}function UT(u,f,p){if(f=Jm(u,f,jT)[0],u=_d(aa)[0],typeof f=="object"&&f!==null&&typeof f.then=="function")try{var y=wc(f)}catch(R){throw R===Ds?fd:R}else y=f;f=qe();var T=f.queue,C=T.dispatch;return p!==f.memoizedState&&(Xt.flags|=2048,Is(9,{destroy:void 0},s4.bind(null,T,p),null)),[y,C,u]}function s4(u,f){u.action=f}function YT(u){var f=qe(),p=De;if(p!==null)return UT(f,p,u);qe(),f=f.memoizedState,p=qe();var y=p.queue.dispatch;return p.memoizedState=u,[f,y,!1]}function Is(u,f,p,y){return u={tag:u,create:p,deps:y,inst:f,next:null},f=Xt.updateQueue,f===null&&(f=xd(),Xt.updateQueue=f),p=f.lastEffect,p===null?f.lastEffect=u.next=u:(y=p.next,p.next=u,u.next=y,f.lastEffect=u),u}function WT(){return qe().memoizedState}function Sd(u,f,p,y){var T=Hn();Xt.flags|=u,T.memoizedState=Is(1|f,{destroy:void 0},p,y===void 0?null:y)}function wd(u,f,p,y){var T=qe();y=y===void 0?null:y;var C=T.memoizedState.inst;De!==null&&y!==null&&qm(y,De.memoizedState.deps)?T.memoizedState=Is(f,C,p,y):(Xt.flags|=u,T.memoizedState=Is(1|f,C,p,y))}function qT(u,f){Sd(8390656,8,u,f)}function ry(u,f){wd(2048,8,u,f)}function u4(u){Xt.flags|=4;var f=Xt.updateQueue;if(f===null)f=xd(),Xt.updateQueue=f,f.events=[u];else{var p=f.events;p===null?f.events=[u]:p.push(u)}}function XT(u){var f=qe().memoizedState;return u4({ref:f,nextImpl:u}),function(){if((ye&2)!==0)throw Error(r(440));return f.impl.apply(void 0,arguments)}}function ZT(u,f){return wd(4,2,u,f)}function $T(u,f){return wd(4,4,u,f)}function QT(u,f){if(typeof f=="function"){u=u();var p=f(u);return function(){typeof p=="function"?p():f(null)}}if(f!=null)return u=u(),f.current=u,function(){f.current=null}}function KT(u,f,p){p=p!=null?p.concat([u]):null,wd(4,4,QT.bind(null,f,u),p)}function iy(){}function JT(u,f){var p=qe();f=f===void 0?null:f;var y=p.memoizedState;return f!==null&&qm(f,y[1])?y[0]:(p.memoizedState=[u,f],u)}function tC(u,f){var p=qe();f=f===void 0?null:f;var y=p.memoizedState;if(f!==null&&qm(f,y[1]))return y[0];if(y=u(),el){Zn(!0);try{u()}finally{Zn(!1)}}return p.memoizedState=[y,f],y}function ay(u,f,p){return p===void 0||(ia&1073741824)!==0&&(ae&261930)===0?u.memoizedState=f:(u.memoizedState=p,u=e2(),Xt.lanes|=u,Ya|=u,p)}function eC(u,f,p,y){return dr(p,f)?p:Ls.current!==null?(u=ay(u,p,y),dr(u,f)||(nn=!0),u):(ia&42)===0||(ia&1073741824)!==0&&(ae&261930)===0?(nn=!0,u.memoizedState=p):(u=e2(),Xt.lanes|=u,Ya|=u,f)}function nC(u,f,p,y,T){var C=q.p;q.p=C!==0&&8>C?C:8;var R=H.T,G={};H.T=G,sy(u,!1,f,p);try{var $=T(),nt=H.S;if(nt!==null&&nt(G,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var st=i4($,y);Tc(u,f,st,xr(u))}else Tc(u,f,y,xr(u))}catch(ht){Tc(u,f,{then:function(){},status:"rejected",reason:ht},xr())}finally{q.p=C,R!==null&&G.types!==null&&(R.types=G.types),H.T=R}}function c4(){}function oy(u,f,p,y){if(u.tag!==5)throw Error(r(476));var T=rC(u).queue;nC(u,T,f,X,p===null?c4:function(){return iC(u),p(y)})}function rC(u){var f=u.memoizedState;if(f!==null)return f;f={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:aa,lastRenderedState:X},next:null};var p={};return f.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:aa,lastRenderedState:p},next:null},u.memoizedState=f,u=u.alternate,u!==null&&(u.memoizedState=f),f}function iC(u){var f=rC(u);f.next===null&&(f=u.alternate.memoizedState),Tc(u,f.next.queue,{},xr())}function ly(){return xn(jc)}function aC(){return qe().memoizedState}function oC(){return qe().memoizedState}function f4(u){for(var f=u.return;f!==null;){switch(f.tag){case 24:case 3:var p=xr();u=Ha(p);var y=Va(f,u,p);y!==null&&(nr(y,f,p),xc(y,f,p)),f={cache:Bm()},u.payload=f;return}f=f.return}}function h4(u,f,p){var y=xr();p={lane:y,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Td(u)?sC(f,p):(p=Cm(u,f,p,y),p!==null&&(nr(p,u,y),uC(p,f,y)))}function lC(u,f,p){var y=xr();Tc(u,f,p,y)}function Tc(u,f,p,y){var T={lane:y,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(Td(u))sC(f,T);else{var C=u.alternate;if(u.lanes===0&&(C===null||C.lanes===0)&&(C=f.lastRenderedReducer,C!==null))try{var R=f.lastRenderedState,G=C(R,p);if(T.hasEagerState=!0,T.eagerState=G,dr(G,R))return id(u,f,T,0),Re===null&&rd(),!1}catch{}finally{}if(p=Cm(u,f,T,y),p!==null)return nr(p,u,y),uC(p,f,y),!0}return!1}function sy(u,f,p,y){if(y={lane:2,revertLane:Vy(),gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},Td(u)){if(f)throw Error(r(479))}else f=Cm(u,p,y,2),f!==null&&nr(f,u,2)}function Td(u){var f=u.alternate;return u===Xt||f!==null&&f===Xt}function sC(u,f){Es=md=!0;var p=u.pending;p===null?f.next=f:(f.next=p.next,p.next=f),u.pending=f}function uC(u,f,p){if((p&4194048)!==0){var y=f.lanes;y&=u.pendingLanes,p|=y,f.lanes=p,vw(u,p)}}var Cc={readContext:xn,use:bd,useCallback:je,useContext:je,useEffect:je,useImperativeHandle:je,useLayoutEffect:je,useInsertionEffect:je,useMemo:je,useReducer:je,useRef:je,useState:je,useDebugValue:je,useDeferredValue:je,useTransition:je,useSyncExternalStore:je,useId:je,useHostTransitionStatus:je,useFormState:je,useActionState:je,useOptimistic:je,useMemoCache:je,useCacheRefresh:je};Cc.useEffectEvent=je;var cC={readContext:xn,use:bd,useCallback:function(u,f){return Hn().memoizedState=[u,f===void 0?null:f],u},useContext:xn,useEffect:qT,useImperativeHandle:function(u,f,p){p=p!=null?p.concat([u]):null,Sd(4194308,4,QT.bind(null,f,u),p)},useLayoutEffect:function(u,f){return Sd(4194308,4,u,f)},useInsertionEffect:function(u,f){Sd(4,2,u,f)},useMemo:function(u,f){var p=Hn();f=f===void 0?null:f;var y=u();if(el){Zn(!0);try{u()}finally{Zn(!1)}}return p.memoizedState=[y,f],y},useReducer:function(u,f,p){var y=Hn();if(p!==void 0){var T=p(f);if(el){Zn(!0);try{p(f)}finally{Zn(!1)}}}else T=f;return y.memoizedState=y.baseState=T,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:T},y.queue=u,u=u.dispatch=h4.bind(null,Xt,u),[y.memoizedState,u]},useRef:function(u){var f=Hn();return u={current:u},f.memoizedState=u},useState:function(u){u=ey(u);var f=u.queue,p=lC.bind(null,Xt,f);return f.dispatch=p,[u.memoizedState,p]},useDebugValue:iy,useDeferredValue:function(u,f){var p=Hn();return ay(p,u,f)},useTransition:function(){var u=ey(!1);return u=nC.bind(null,Xt,u.queue,!0,!1),Hn().memoizedState=u,[!1,u]},useSyncExternalStore:function(u,f,p){var y=Xt,T=Hn();if(se){if(p===void 0)throw Error(r(407));p=p()}else{if(p=f(),Re===null)throw Error(r(349));(ae&127)!==0||ET(y,f,p)}T.memoizedState=p;var C={value:p,getSnapshot:f};return T.queue=C,qT(IT.bind(null,y,C,u),[u]),y.flags|=2048,Is(9,{destroy:void 0},RT.bind(null,y,C,p,f),null),p},useId:function(){var u=Hn(),f=Re.identifierPrefix;if(se){var p=Ti,y=wi;p=(y&~(1<<32-Ee(y)-1)).toString(32)+p,f="_"+f+"R_"+p,p=yd++,0<p&&(f+="H"+p.toString(32)),f+="_"}else p=a4++,f="_"+f+"r_"+p.toString(32)+"_";return u.memoizedState=f},useHostTransitionStatus:ly,useFormState:FT,useActionState:FT,useOptimistic:function(u){var f=Hn();f.memoizedState=f.baseState=u;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return f.queue=p,f=sy.bind(null,Xt,!0,p),p.dispatch=f,[u,f]},useMemoCache:Km,useCacheRefresh:function(){return Hn().memoizedState=f4.bind(null,Xt)},useEffectEvent:function(u){var f=Hn(),p={impl:u};return f.memoizedState=p,function(){if((ye&2)!==0)throw Error(r(440));return p.impl.apply(void 0,arguments)}}},uy={readContext:xn,use:bd,useCallback:JT,useContext:xn,useEffect:ry,useImperativeHandle:KT,useInsertionEffect:ZT,useLayoutEffect:$T,useMemo:tC,useReducer:_d,useRef:WT,useState:function(){return _d(aa)},useDebugValue:iy,useDeferredValue:function(u,f){var p=qe();return eC(p,De.memoizedState,u,f)},useTransition:function(){var u=_d(aa)[0],f=qe().memoizedState;return[typeof u=="boolean"?u:wc(u),f]},useSyncExternalStore:LT,useId:aC,useHostTransitionStatus:ly,useFormState:GT,useActionState:GT,useOptimistic:function(u,f){var p=qe();return BT(p,De,u,f)},useMemoCache:Km,useCacheRefresh:oC};uy.useEffectEvent=XT;var fC={readContext:xn,use:bd,useCallback:JT,useContext:xn,useEffect:ry,useImperativeHandle:KT,useInsertionEffect:ZT,useLayoutEffect:$T,useMemo:tC,useReducer:ty,useRef:WT,useState:function(){return ty(aa)},useDebugValue:iy,useDeferredValue:function(u,f){var p=qe();return De===null?ay(p,u,f):eC(p,De.memoizedState,u,f)},useTransition:function(){var u=ty(aa)[0],f=qe().memoizedState;return[typeof u=="boolean"?u:wc(u),f]},useSyncExternalStore:LT,useId:aC,useHostTransitionStatus:ly,useFormState:YT,useActionState:YT,useOptimistic:function(u,f){var p=qe();return De!==null?BT(p,De,u,f):(p.baseState=u,[u,p.queue.dispatch])},useMemoCache:Km,useCacheRefresh:oC};fC.useEffectEvent=XT;function cy(u,f,p,y){f=u.memoizedState,p=p(y,f),p=p==null?f:d({},f,p),u.memoizedState=p,u.lanes===0&&(u.updateQueue.baseState=p)}var fy={enqueueSetState:function(u,f,p){u=u._reactInternals;var y=xr(),T=Ha(y);T.payload=f,p!=null&&(T.callback=p),f=Va(u,T,y),f!==null&&(nr(f,u,y),xc(f,u,y))},enqueueReplaceState:function(u,f,p){u=u._reactInternals;var y=xr(),T=Ha(y);T.tag=1,T.payload=f,p!=null&&(T.callback=p),f=Va(u,T,y),f!==null&&(nr(f,u,y),xc(f,u,y))},enqueueForceUpdate:function(u,f){u=u._reactInternals;var p=xr(),y=Ha(p);y.tag=2,f!=null&&(y.callback=f),f=Va(u,y,p),f!==null&&(nr(f,u,p),xc(f,u,p))}};function hC(u,f,p,y,T,C,R){return u=u.stateNode,typeof u.shouldComponentUpdate=="function"?u.shouldComponentUpdate(y,C,R):f.prototype&&f.prototype.isPureReactComponent?!fc(p,y)||!fc(T,C):!0}function dC(u,f,p,y){u=f.state,typeof f.componentWillReceiveProps=="function"&&f.componentWillReceiveProps(p,y),typeof f.UNSAFE_componentWillReceiveProps=="function"&&f.UNSAFE_componentWillReceiveProps(p,y),f.state!==u&&fy.enqueueReplaceState(f,f.state,null)}function nl(u,f){var p=f;if("ref"in f){p={};for(var y in f)y!=="ref"&&(p[y]=f[y])}if(u=u.defaultProps){p===f&&(p=d({},p));for(var T in u)p[T]===void 0&&(p[T]=u[T])}return p}function vC(u){nd(u)}function pC(u){console.error(u)}function gC(u){nd(u)}function Cd(u,f){try{var p=u.onUncaughtError;p(f.value,{componentStack:f.stack})}catch(y){setTimeout(function(){throw y})}}function mC(u,f,p){try{var y=u.onCaughtError;y(p.value,{componentStack:p.stack,errorBoundary:f.tag===1?f.stateNode:null})}catch(T){setTimeout(function(){throw T})}}function hy(u,f,p){return p=Ha(p),p.tag=3,p.payload={element:null},p.callback=function(){Cd(u,f)},p}function yC(u){return u=Ha(u),u.tag=3,u}function xC(u,f,p,y){var T=p.type.getDerivedStateFromError;if(typeof T=="function"){var C=y.value;u.payload=function(){return T(C)},u.callback=function(){mC(f,p,y)}}var R=p.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(u.callback=function(){mC(f,p,y),typeof T!="function"&&(Wa===null?Wa=new Set([this]):Wa.add(this));var G=y.stack;this.componentDidCatch(y.value,{componentStack:G!==null?G:""})})}function d4(u,f,p,y,T){if(p.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(f=p.alternate,f!==null&&Cs(f,p,T,!0),p=pr.current,p!==null){switch(p.tag){case 31:case 13:return zr===null?Nd():p.alternate===null&&Fe===0&&(Fe=3),p.flags&=-257,p.flags|=65536,p.lanes=T,y===hd?p.flags|=16384:(f=p.updateQueue,f===null?p.updateQueue=new Set([y]):f.add(y),Ny(u,y,T)),!1;case 22:return p.flags|=65536,y===hd?p.flags|=16384:(f=p.updateQueue,f===null?(f={transitions:null,markerInstances:null,retryQueue:new Set([y])},p.updateQueue=f):(p=f.retryQueue,p===null?f.retryQueue=new Set([y]):p.add(y)),Ny(u,y,T)),!1}throw Error(r(435,p.tag))}return Ny(u,y,T),Nd(),!1}if(se)return f=pr.current,f!==null?((f.flags&65536)===0&&(f.flags|=256),f.flags|=65536,f.lanes=T,y!==Em&&(u=Error(r(422),{cause:y}),vc(Er(u,p)))):(y!==Em&&(f=Error(r(423),{cause:y}),vc(Er(f,p))),u=u.current.alternate,u.flags|=65536,T&=-T,u.lanes|=T,y=Er(y,p),T=hy(u.stateNode,y,T),Fm(u,T),Fe!==4&&(Fe=2)),!1;var C=Error(r(520),{cause:y});if(C=Er(C,p),Ic===null?Ic=[C]:Ic.push(C),Fe!==4&&(Fe=2),f===null)return!0;y=Er(y,p),p=f;do{switch(p.tag){case 3:return p.flags|=65536,u=T&-T,p.lanes|=u,u=hy(p.stateNode,y,u),Fm(p,u),!1;case 1:if(f=p.type,C=p.stateNode,(p.flags&128)===0&&(typeof f.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(Wa===null||!Wa.has(C))))return p.flags|=65536,T&=-T,p.lanes|=T,T=yC(T),xC(T,u,p,y),Fm(p,T),!1}p=p.return}while(p!==null);return!1}var dy=Error(r(461)),nn=!1;function bn(u,f,p,y){f.child=u===null?wT(f,null,p,y):tl(f,u.child,p,y)}function bC(u,f,p,y,T){p=p.render;var C=f.ref;if("ref"in y){var R={};for(var G in y)G!=="ref"&&(R[G]=y[G])}else R=y;return $o(f),y=Xm(u,f,p,R,C,T),G=Zm(),u!==null&&!nn?($m(u,f,T),oa(u,f,T)):(se&&G&&km(f),f.flags|=1,bn(u,f,y,T),f.child)}function _C(u,f,p,y,T){if(u===null){var C=p.type;return typeof C=="function"&&!Mm(C)&&C.defaultProps===void 0&&p.compare===null?(f.tag=15,f.type=C,SC(u,f,C,y,T)):(u=od(p.type,null,y,f,f.mode,T),u.ref=f.ref,u.return=f,f.child=u)}if(C=u.child,!_y(u,T)){var R=C.memoizedProps;if(p=p.compare,p=p!==null?p:fc,p(R,y)&&u.ref===f.ref)return oa(u,f,T)}return f.flags|=1,u=ta(C,y),u.ref=f.ref,u.return=f,f.child=u}function SC(u,f,p,y,T){if(u!==null){var C=u.memoizedProps;if(fc(C,y)&&u.ref===f.ref)if(nn=!1,f.pendingProps=y=C,_y(u,T))(u.flags&131072)!==0&&(nn=!0);else return f.lanes=u.lanes,oa(u,f,T)}return vy(u,f,p,y,T)}function wC(u,f,p,y){var T=y.children,C=u!==null?u.memoizedState:null;if(u===null&&f.stateNode===null&&(f.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),y.mode==="hidden"){if((f.flags&128)!==0){if(C=C!==null?C.baseLanes|p:p,u!==null){for(y=f.child=u.child,T=0;y!==null;)T=T|y.lanes|y.childLanes,y=y.sibling;y=T&~C}else y=0,f.child=null;return TC(u,f,C,p,y)}if((p&536870912)!==0)f.memoizedState={baseLanes:0,cachePool:null},u!==null&&cd(f,C!==null?C.cachePool:null),C!==null?MT(f,C):Um(),AT(f);else return y=f.lanes=536870912,TC(u,f,C!==null?C.baseLanes|p:p,p,y)}else C!==null?(cd(f,C.cachePool),MT(f,C),Fa(),f.memoizedState=null):(u!==null&&cd(f,null),Um(),Fa());return bn(u,f,T,p),f.child}function Mc(u,f){return u!==null&&u.tag===22||f.stateNode!==null||(f.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.sibling}function TC(u,f,p,y,T){var C=Pm();return C=C===null?null:{parent:tn._currentValue,pool:C},f.memoizedState={baseLanes:p,cachePool:C},u!==null&&cd(f,null),Um(),AT(f),u!==null&&Cs(u,f,y,!0),f.childLanes=T,null}function Md(u,f){return f=Dd({mode:f.mode,children:f.children},u.mode),f.ref=u.ref,u.child=f,f.return=u,f}function CC(u,f,p){return tl(f,u.child,null,p),u=Md(f,f.pendingProps),u.flags|=2,gr(f),f.memoizedState=null,u}function v4(u,f,p){var y=f.pendingProps,T=(f.flags&128)!==0;if(f.flags&=-129,u===null){if(se){if(y.mode==="hidden")return u=Md(f,y),f.lanes=536870912,Mc(null,u);if(Wm(f),(u=Ne)?(u=N2(u,Or),u=u!==null&&u.data==="&"?u:null,u!==null&&(f.memoizedState={dehydrated:u,treeContext:Oa!==null?{id:wi,overflow:Ti}:null,retryLane:536870912,hydrationErrors:null},p=sT(u),p.return=f,f.child=p,yn=f,Ne=null)):u=null,u===null)throw Ba(f);return f.lanes=536870912,null}return Md(f,y)}var C=u.memoizedState;if(C!==null){var R=C.dehydrated;if(Wm(f),T)if(f.flags&256)f.flags&=-257,f=CC(u,f,p);else if(f.memoizedState!==null)f.child=u.child,f.flags|=128,f=null;else throw Error(r(558));else if(nn||Cs(u,f,p,!1),T=(p&u.childLanes)!==0,nn||T){if(y=Re,y!==null&&(R=pw(y,p),R!==0&&R!==C.retryLane))throw C.retryLane=R,Wo(u,R),nr(y,u,R),dy;Nd(),f=CC(u,f,p)}else u=C.treeContext,Ne=Br(R.nextSibling),yn=f,se=!0,za=null,Or=!1,u!==null&&fT(f,u),f=Md(f,y),f.flags|=4096;return f}return u=ta(u.child,{mode:y.mode,children:y.children}),u.ref=f.ref,f.child=u,u.return=f,u}function Ad(u,f){var p=f.ref;if(p===null)u!==null&&u.ref!==null&&(f.flags|=4194816);else{if(typeof p!="function"&&typeof p!="object")throw Error(r(284));(u===null||u.ref!==p)&&(f.flags|=4194816)}}function vy(u,f,p,y,T){return $o(f),p=Xm(u,f,p,y,void 0,T),y=Zm(),u!==null&&!nn?($m(u,f,T),oa(u,f,T)):(se&&y&&km(f),f.flags|=1,bn(u,f,p,T),f.child)}function MC(u,f,p,y,T,C){return $o(f),f.updateQueue=null,p=kT(f,y,p,T),DT(u),y=Zm(),u!==null&&!nn?($m(u,f,C),oa(u,f,C)):(se&&y&&km(f),f.flags|=1,bn(u,f,p,C),f.child)}function AC(u,f,p,y,T){if($o(f),f.stateNode===null){var C=_s,R=p.contextType;typeof R=="object"&&R!==null&&(C=xn(R)),C=new p(y,C),f.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,C.updater=fy,f.stateNode=C,C._reactInternals=f,C=f.stateNode,C.props=y,C.state=f.memoizedState,C.refs={},Vm(f),R=p.contextType,C.context=typeof R=="object"&&R!==null?xn(R):_s,C.state=f.memoizedState,R=p.getDerivedStateFromProps,typeof R=="function"&&(cy(f,p,R,y),C.state=f.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof C.getSnapshotBeforeUpdate=="function"||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(R=C.state,typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount(),R!==C.state&&fy.enqueueReplaceState(C,C.state,null),_c(f,y,C,T),bc(),C.state=f.memoizedState),typeof C.componentDidMount=="function"&&(f.flags|=4194308),y=!0}else if(u===null){C=f.stateNode;var G=f.memoizedProps,$=nl(p,G);C.props=$;var nt=C.context,st=p.contextType;R=_s,typeof st=="object"&&st!==null&&(R=xn(st));var ht=p.getDerivedStateFromProps;st=typeof ht=="function"||typeof C.getSnapshotBeforeUpdate=="function",G=f.pendingProps!==G,st||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(G||nt!==R)&&dC(f,C,y,R),Pa=!1;var rt=f.memoizedState;C.state=rt,_c(f,y,C,T),bc(),nt=f.memoizedState,G||rt!==nt||Pa?(typeof ht=="function"&&(cy(f,p,ht,y),nt=f.memoizedState),($=Pa||hC(f,p,$,y,rt,nt,R))?(st||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(f.flags|=4194308)):(typeof C.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=y,f.memoizedState=nt),C.props=y,C.state=nt,C.context=R,y=$):(typeof C.componentDidMount=="function"&&(f.flags|=4194308),y=!1)}else{C=f.stateNode,jm(u,f),R=f.memoizedProps,st=nl(p,R),C.props=st,ht=f.pendingProps,rt=C.context,nt=p.contextType,$=_s,typeof nt=="object"&&nt!==null&&($=xn(nt)),G=p.getDerivedStateFromProps,(nt=typeof G=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(R!==ht||rt!==$)&&dC(f,C,y,$),Pa=!1,rt=f.memoizedState,C.state=rt,_c(f,y,C,T),bc();var it=f.memoizedState;R!==ht||rt!==it||Pa||u!==null&&u.dependencies!==null&&sd(u.dependencies)?(typeof G=="function"&&(cy(f,p,G,y),it=f.memoizedState),(st=Pa||hC(f,p,st,y,rt,it,$)||u!==null&&u.dependencies!==null&&sd(u.dependencies))?(nt||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(y,it,$),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(y,it,$)),typeof C.componentDidUpdate=="function"&&(f.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof C.componentDidUpdate!="function"||R===u.memoizedProps&&rt===u.memoizedState||(f.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||R===u.memoizedProps&&rt===u.memoizedState||(f.flags|=1024),f.memoizedProps=y,f.memoizedState=it),C.props=y,C.state=it,C.context=$,y=st):(typeof C.componentDidUpdate!="function"||R===u.memoizedProps&&rt===u.memoizedState||(f.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||R===u.memoizedProps&&rt===u.memoizedState||(f.flags|=1024),y=!1)}return C=y,Ad(u,f),y=(f.flags&128)!==0,C||y?(C=f.stateNode,p=y&&typeof p.getDerivedStateFromError!="function"?null:C.render(),f.flags|=1,u!==null&&y?(f.child=tl(f,u.child,null,T),f.child=tl(f,null,p,T)):bn(u,f,p,T),f.memoizedState=C.state,u=f.child):u=oa(u,f,T),u}function DC(u,f,p,y){return Xo(),f.flags|=256,bn(u,f,p,y),f.child}var py={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gy(u){return{baseLanes:u,cachePool:mT()}}function my(u,f,p){return u=u!==null?u.childLanes&~p:0,f&&(u|=yr),u}function kC(u,f,p){var y=f.pendingProps,T=!1,C=(f.flags&128)!==0,R;if((R=C)||(R=u!==null&&u.memoizedState===null?!1:(We.current&2)!==0),R&&(T=!0,f.flags&=-129),R=(f.flags&32)!==0,f.flags&=-33,u===null){if(se){if(T?ja(f):Fa(),(u=Ne)?(u=N2(u,Or),u=u!==null&&u.data!=="&"?u:null,u!==null&&(f.memoizedState={dehydrated:u,treeContext:Oa!==null?{id:wi,overflow:Ti}:null,retryLane:536870912,hydrationErrors:null},p=sT(u),p.return=f,f.child=p,yn=f,Ne=null)):u=null,u===null)throw Ba(f);return Jy(u)?f.lanes=32:f.lanes=536870912,null}var G=y.children;return y=y.fallback,T?(Fa(),T=f.mode,G=Dd({mode:"hidden",children:G},T),y=qo(y,T,p,null),G.return=f,y.return=f,G.sibling=y,f.child=G,y=f.child,y.memoizedState=gy(p),y.childLanes=my(u,R,p),f.memoizedState=py,Mc(null,y)):(ja(f),yy(f,G))}var $=u.memoizedState;if($!==null&&(G=$.dehydrated,G!==null)){if(C)f.flags&256?(ja(f),f.flags&=-257,f=xy(u,f,p)):f.memoizedState!==null?(Fa(),f.child=u.child,f.flags|=128,f=null):(Fa(),G=y.fallback,T=f.mode,y=Dd({mode:"visible",children:y.children},T),G=qo(G,T,p,null),G.flags|=2,y.return=f,G.return=f,y.sibling=G,f.child=y,tl(f,u.child,null,p),y=f.child,y.memoizedState=gy(p),y.childLanes=my(u,R,p),f.memoizedState=py,f=Mc(null,y));else if(ja(f),Jy(G)){if(R=G.nextSibling&&G.nextSibling.dataset,R)var nt=R.dgst;R=nt,y=Error(r(419)),y.stack="",y.digest=R,vc({value:y,source:null,stack:null}),f=xy(u,f,p)}else if(nn||Cs(u,f,p,!1),R=(p&u.childLanes)!==0,nn||R){if(R=Re,R!==null&&(y=pw(R,p),y!==0&&y!==$.retryLane))throw $.retryLane=y,Wo(u,y),nr(R,u,y),dy;Ky(G)||Nd(),f=xy(u,f,p)}else Ky(G)?(f.flags|=192,f.child=u.child,f=null):(u=$.treeContext,Ne=Br(G.nextSibling),yn=f,se=!0,za=null,Or=!1,u!==null&&fT(f,u),f=yy(f,y.children),f.flags|=4096);return f}return T?(Fa(),G=y.fallback,T=f.mode,$=u.child,nt=$.sibling,y=ta($,{mode:"hidden",children:y.children}),y.subtreeFlags=$.subtreeFlags&65011712,nt!==null?G=ta(nt,G):(G=qo(G,T,p,null),G.flags|=2),G.return=f,y.return=f,y.sibling=G,f.child=y,Mc(null,y),y=f.child,G=u.child.memoizedState,G===null?G=gy(p):(T=G.cachePool,T!==null?($=tn._currentValue,T=T.parent!==$?{parent:$,pool:$}:T):T=mT(),G={baseLanes:G.baseLanes|p,cachePool:T}),y.memoizedState=G,y.childLanes=my(u,R,p),f.memoizedState=py,Mc(u.child,y)):(ja(f),p=u.child,u=p.sibling,p=ta(p,{mode:"visible",children:y.children}),p.return=f,p.sibling=null,u!==null&&(R=f.deletions,R===null?(f.deletions=[u],f.flags|=16):R.push(u)),f.child=p,f.memoizedState=null,p)}function yy(u,f){return f=Dd({mode:"visible",children:f},u.mode),f.return=u,u.child=f}function Dd(u,f){return u=vr(22,u,null,f),u.lanes=0,u}function xy(u,f,p){return tl(f,u.child,null,p),u=yy(f,f.pendingProps.children),u.flags|=2,f.memoizedState=null,u}function LC(u,f,p){u.lanes|=f;var y=u.alternate;y!==null&&(y.lanes|=f),Om(u.return,f,p)}function by(u,f,p,y,T,C){var R=u.memoizedState;R===null?u.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:y,tail:p,tailMode:T,treeForkCount:C}:(R.isBackwards=f,R.rendering=null,R.renderingStartTime=0,R.last=y,R.tail=p,R.tailMode=T,R.treeForkCount=C)}function EC(u,f,p){var y=f.pendingProps,T=y.revealOrder,C=y.tail;y=y.children;var R=We.current,G=(R&2)!==0;if(G?(R=R&1|2,f.flags|=128):R&=1,V(We,R),bn(u,f,y,p),y=se?dc:0,!G&&u!==null&&(u.flags&128)!==0)t:for(u=f.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&LC(u,p,f);else if(u.tag===19)LC(u,p,f);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===f)break t;for(;u.sibling===null;){if(u.return===null||u.return===f)break t;u=u.return}u.sibling.return=u.return,u=u.sibling}switch(T){case"forwards":for(p=f.child,T=null;p!==null;)u=p.alternate,u!==null&&gd(u)===null&&(T=p),p=p.sibling;p=T,p===null?(T=f.child,f.child=null):(T=p.sibling,p.sibling=null),by(f,!1,T,p,C,y);break;case"backwards":case"unstable_legacy-backwards":for(p=null,T=f.child,f.child=null;T!==null;){if(u=T.alternate,u!==null&&gd(u)===null){f.child=T;break}u=T.sibling,T.sibling=p,p=T,T=u}by(f,!0,p,null,C,y);break;case"together":by(f,!1,null,null,void 0,y);break;default:f.memoizedState=null}return f.child}function oa(u,f,p){if(u!==null&&(f.dependencies=u.dependencies),Ya|=f.lanes,(p&f.childLanes)===0)if(u!==null){if(Cs(u,f,p,!1),(p&f.childLanes)===0)return null}else return null;if(u!==null&&f.child!==u.child)throw Error(r(153));if(f.child!==null){for(u=f.child,p=ta(u,u.pendingProps),f.child=p,p.return=f;u.sibling!==null;)u=u.sibling,p=p.sibling=ta(u,u.pendingProps),p.return=f;p.sibling=null}return f.child}function _y(u,f){return(u.lanes&f)!==0?!0:(u=u.dependencies,!!(u!==null&&sd(u)))}function p4(u,f,p){switch(f.tag){case 3:pt(f,f.stateNode.containerInfo),Na(f,tn,u.memoizedState.cache),Xo();break;case 27:case 5:Dt(f);break;case 4:pt(f,f.stateNode.containerInfo);break;case 10:Na(f,f.type,f.memoizedProps.value);break;case 31:if(f.memoizedState!==null)return f.flags|=128,Wm(f),null;break;case 13:var y=f.memoizedState;if(y!==null)return y.dehydrated!==null?(ja(f),f.flags|=128,null):(p&f.child.childLanes)!==0?kC(u,f,p):(ja(f),u=oa(u,f,p),u!==null?u.sibling:null);ja(f);break;case 19:var T=(u.flags&128)!==0;if(y=(p&f.childLanes)!==0,y||(Cs(u,f,p,!1),y=(p&f.childLanes)!==0),T){if(y)return EC(u,f,p);f.flags|=128}if(T=f.memoizedState,T!==null&&(T.rendering=null,T.tail=null,T.lastEffect=null),V(We,We.current),y)break;return null;case 22:return f.lanes=0,wC(u,f,p,f.pendingProps);case 24:Na(f,tn,u.memoizedState.cache)}return oa(u,f,p)}function RC(u,f,p){if(u!==null)if(u.memoizedProps!==f.pendingProps)nn=!0;else{if(!_y(u,p)&&(f.flags&128)===0)return nn=!1,p4(u,f,p);nn=(u.flags&131072)!==0}else nn=!1,se&&(f.flags&1048576)!==0&&cT(f,dc,f.index);switch(f.lanes=0,f.tag){case 16:t:{var y=f.pendingProps;if(u=Ko(f.elementType),f.type=u,typeof u=="function")Mm(u)?(y=nl(u,y),f.tag=1,f=AC(null,f,u,y,p)):(f.tag=0,f=vy(null,f,u,y,p));else{if(u!=null){var T=u.$$typeof;if(T===A){f.tag=11,f=bC(null,f,u,y,p);break t}else if(T===L){f.tag=14,f=_C(null,f,u,y,p);break t}}throw f=U(u)||u,Error(r(306,f,""))}}return f;case 0:return vy(u,f,f.type,f.pendingProps,p);case 1:return y=f.type,T=nl(y,f.pendingProps),AC(u,f,y,T,p);case 3:t:{if(pt(f,f.stateNode.containerInfo),u===null)throw Error(r(387));y=f.pendingProps;var C=f.memoizedState;T=C.element,jm(u,f),_c(f,y,null,p);var R=f.memoizedState;if(y=R.cache,Na(f,tn,y),y!==C.cache&&zm(f,[tn],p,!0),bc(),y=R.element,C.isDehydrated)if(C={element:y,isDehydrated:!1,cache:R.cache},f.updateQueue.baseState=C,f.memoizedState=C,f.flags&256){f=DC(u,f,y,p);break t}else if(y!==T){T=Er(Error(r(424)),f),vc(T),f=DC(u,f,y,p);break t}else{switch(u=f.stateNode.containerInfo,u.nodeType){case 9:u=u.body;break;default:u=u.nodeName==="HTML"?u.ownerDocument.body:u}for(Ne=Br(u.firstChild),yn=f,se=!0,za=null,Or=!0,p=wT(f,null,y,p),f.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(Xo(),y===T){f=oa(u,f,p);break t}bn(u,f,y,p)}f=f.child}return f;case 26:return Ad(u,f),u===null?(p=G2(f.type,null,f.pendingProps,null))?f.memoizedState=p:se||(p=f.type,u=f.pendingProps,y=Ud(gt.current).createElement(p),y[mn]=f,y[$n]=u,_n(y,p,u),cn(y),f.stateNode=y):f.memoizedState=G2(f.type,u.memoizedProps,f.pendingProps,u.memoizedState),null;case 27:return Dt(f),u===null&&se&&(y=f.stateNode=V2(f.type,f.pendingProps,gt.current),yn=f,Or=!0,T=Ne,$a(f.type)?(t0=T,Ne=Br(y.firstChild)):Ne=T),bn(u,f,f.pendingProps.children,p),Ad(u,f),u===null&&(f.flags|=4194304),f.child;case 5:return u===null&&se&&((T=y=Ne)&&(y=Y4(y,f.type,f.pendingProps,Or),y!==null?(f.stateNode=y,yn=f,Ne=Br(y.firstChild),Or=!1,T=!0):T=!1),T||Ba(f)),Dt(f),T=f.type,C=f.pendingProps,R=u!==null?u.memoizedProps:null,y=C.children,Zy(T,C)?y=null:R!==null&&Zy(T,R)&&(f.flags|=32),f.memoizedState!==null&&(T=Xm(u,f,o4,null,null,p),jc._currentValue=T),Ad(u,f),bn(u,f,y,p),f.child;case 6:return u===null&&se&&((u=p=Ne)&&(p=W4(p,f.pendingProps,Or),p!==null?(f.stateNode=p,yn=f,Ne=null,u=!0):u=!1),u||Ba(f)),null;case 13:return kC(u,f,p);case 4:return pt(f,f.stateNode.containerInfo),y=f.pendingProps,u===null?f.child=tl(f,null,y,p):bn(u,f,y,p),f.child;case 11:return bC(u,f,f.type,f.pendingProps,p);case 7:return bn(u,f,f.pendingProps,p),f.child;case 8:return bn(u,f,f.pendingProps.children,p),f.child;case 12:return bn(u,f,f.pendingProps.children,p),f.child;case 10:return y=f.pendingProps,Na(f,f.type,y.value),bn(u,f,y.children,p),f.child;case 9:return T=f.type._context,y=f.pendingProps.children,$o(f),T=xn(T),y=y(T),f.flags|=1,bn(u,f,y,p),f.child;case 14:return _C(u,f,f.type,f.pendingProps,p);case 15:return SC(u,f,f.type,f.pendingProps,p);case 19:return EC(u,f,p);case 31:return v4(u,f,p);case 22:return wC(u,f,p,f.pendingProps);case 24:return $o(f),y=xn(tn),u===null?(T=Pm(),T===null&&(T=Re,C=Bm(),T.pooledCache=C,C.refCount++,C!==null&&(T.pooledCacheLanes|=p),T=C),f.memoizedState={parent:y,cache:T},Vm(f),Na(f,tn,T)):((u.lanes&p)!==0&&(jm(u,f),_c(f,null,null,p),bc()),T=u.memoizedState,C=f.memoizedState,T.parent!==y?(T={parent:y,cache:y},f.memoizedState=T,f.lanes===0&&(f.memoizedState=f.updateQueue.baseState=T),Na(f,tn,y)):(y=C.cache,Na(f,tn,y),y!==T.cache&&zm(f,[tn],p,!0))),bn(u,f,f.pendingProps.children,p),f.child;case 29:throw f.pendingProps}throw Error(r(156,f.tag))}function la(u){u.flags|=4}function Sy(u,f,p,y,T){if((f=(u.mode&32)!==0)&&(f=!1),f){if(u.flags|=16777216,(T&335544128)===T)if(u.stateNode.complete)u.flags|=8192;else if(a2())u.flags|=8192;else throw Jo=hd,Hm}else u.flags&=-16777217}function IC(u,f){if(f.type!=="stylesheet"||(f.state.loading&4)!==0)u.flags&=-16777217;else if(u.flags|=16777216,!X2(f))if(a2())u.flags|=8192;else throw Jo=hd,Hm}function kd(u,f){f!==null&&(u.flags|=4),u.flags&16384&&(f=u.tag!==22?hw():536870912,u.lanes|=f,Ns|=f)}function Ac(u,f){if(!se)switch(u.tailMode){case"hidden":f=u.tail;for(var p=null;f!==null;)f.alternate!==null&&(p=f),f=f.sibling;p===null?u.tail=null:p.sibling=null;break;case"collapsed":p=u.tail;for(var y=null;p!==null;)p.alternate!==null&&(y=p),p=p.sibling;y===null?f||u.tail===null?u.tail=null:u.tail.sibling=null:y.sibling=null}}function Pe(u){var f=u.alternate!==null&&u.alternate.child===u.child,p=0,y=0;if(f)for(var T=u.child;T!==null;)p|=T.lanes|T.childLanes,y|=T.subtreeFlags&65011712,y|=T.flags&65011712,T.return=u,T=T.sibling;else for(T=u.child;T!==null;)p|=T.lanes|T.childLanes,y|=T.subtreeFlags,y|=T.flags,T.return=u,T=T.sibling;return u.subtreeFlags|=y,u.childLanes=p,f}function g4(u,f,p){var y=f.pendingProps;switch(Lm(f),f.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(f),null;case 1:return Pe(f),null;case 3:return p=f.stateNode,y=null,u!==null&&(y=u.memoizedState.cache),f.memoizedState.cache!==y&&(f.flags|=2048),ra(tn),vt(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(u===null||u.child===null)&&(Ts(f)?la(f):u===null||u.memoizedState.isDehydrated&&(f.flags&256)===0||(f.flags|=1024,Rm())),Pe(f),null;case 26:var T=f.type,C=f.memoizedState;return u===null?(la(f),C!==null?(Pe(f),IC(f,C)):(Pe(f),Sy(f,T,null,y,p))):C?C!==u.memoizedState?(la(f),Pe(f),IC(f,C)):(Pe(f),f.flags&=-16777217):(u=u.memoizedProps,u!==y&&la(f),Pe(f),Sy(f,T,u,y,p)),null;case 27:if(yt(f),p=gt.current,T=f.type,u!==null&&f.stateNode!=null)u.memoizedProps!==y&&la(f);else{if(!y){if(f.stateNode===null)throw Error(r(166));return Pe(f),null}u=tt.current,Ts(f)?hT(f):(u=V2(T,y,p),f.stateNode=u,la(f))}return Pe(f),null;case 5:if(yt(f),T=f.type,u!==null&&f.stateNode!=null)u.memoizedProps!==y&&la(f);else{if(!y){if(f.stateNode===null)throw Error(r(166));return Pe(f),null}if(C=tt.current,Ts(f))hT(f);else{var R=Ud(gt.current);switch(C){case 1:C=R.createElementNS("http://www.w3.org/2000/svg",T);break;case 2:C=R.createElementNS("http://www.w3.org/1998/Math/MathML",T);break;default:switch(T){case"svg":C=R.createElementNS("http://www.w3.org/2000/svg",T);break;case"math":C=R.createElementNS("http://www.w3.org/1998/Math/MathML",T);break;case"script":C=R.createElement("div"),C.innerHTML="<script><\/script>",C=C.removeChild(C.firstChild);break;case"select":C=typeof y.is=="string"?R.createElement("select",{is:y.is}):R.createElement("select"),y.multiple?C.multiple=!0:y.size&&(C.size=y.size);break;default:C=typeof y.is=="string"?R.createElement(T,{is:y.is}):R.createElement(T)}}C[mn]=f,C[$n]=y;t:for(R=f.child;R!==null;){if(R.tag===5||R.tag===6)C.appendChild(R.stateNode);else if(R.tag!==4&&R.tag!==27&&R.child!==null){R.child.return=R,R=R.child;continue}if(R===f)break t;for(;R.sibling===null;){if(R.return===null||R.return===f)break t;R=R.return}R.sibling.return=R.return,R=R.sibling}f.stateNode=C;t:switch(_n(C,T,y),T){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break t;case"img":y=!0;break t;default:y=!1}y&&la(f)}}return Pe(f),Sy(f,f.type,u===null?null:u.memoizedProps,f.pendingProps,p),null;case 6:if(u&&f.stateNode!=null)u.memoizedProps!==y&&la(f);else{if(typeof y!="string"&&f.stateNode===null)throw Error(r(166));if(u=gt.current,Ts(f)){if(u=f.stateNode,p=f.memoizedProps,y=null,T=yn,T!==null)switch(T.tag){case 27:case 5:y=T.memoizedProps}u[mn]=f,u=!!(u.nodeValue===p||y!==null&&y.suppressHydrationWarning===!0||k2(u.nodeValue,p)),u||Ba(f,!0)}else u=Ud(u).createTextNode(y),u[mn]=f,f.stateNode=u}return Pe(f),null;case 31:if(p=f.memoizedState,u===null||u.memoizedState!==null){if(y=Ts(f),p!==null){if(u===null){if(!y)throw Error(r(318));if(u=f.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(557));u[mn]=f}else Xo(),(f.flags&128)===0&&(f.memoizedState=null),f.flags|=4;Pe(f),u=!1}else p=Rm(),u!==null&&u.memoizedState!==null&&(u.memoizedState.hydrationErrors=p),u=!0;if(!u)return f.flags&256?(gr(f),f):(gr(f),null);if((f.flags&128)!==0)throw Error(r(558))}return Pe(f),null;case 13:if(y=f.memoizedState,u===null||u.memoizedState!==null&&u.memoizedState.dehydrated!==null){if(T=Ts(f),y!==null&&y.dehydrated!==null){if(u===null){if(!T)throw Error(r(318));if(T=f.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(r(317));T[mn]=f}else Xo(),(f.flags&128)===0&&(f.memoizedState=null),f.flags|=4;Pe(f),T=!1}else T=Rm(),u!==null&&u.memoizedState!==null&&(u.memoizedState.hydrationErrors=T),T=!0;if(!T)return f.flags&256?(gr(f),f):(gr(f),null)}return gr(f),(f.flags&128)!==0?(f.lanes=p,f):(p=y!==null,u=u!==null&&u.memoizedState!==null,p&&(y=f.child,T=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(T=y.alternate.memoizedState.cachePool.pool),C=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(C=y.memoizedState.cachePool.pool),C!==T&&(y.flags|=2048)),p!==u&&p&&(f.child.flags|=8192),kd(f,f.updateQueue),Pe(f),null);case 4:return vt(),u===null&&Uy(f.stateNode.containerInfo),Pe(f),null;case 10:return ra(f.type),Pe(f),null;case 19:if(Z(We),y=f.memoizedState,y===null)return Pe(f),null;if(T=(f.flags&128)!==0,C=y.rendering,C===null)if(T)Ac(y,!1);else{if(Fe!==0||u!==null&&(u.flags&128)!==0)for(u=f.child;u!==null;){if(C=gd(u),C!==null){for(f.flags|=128,Ac(y,!1),u=C.updateQueue,f.updateQueue=u,kd(f,u),f.subtreeFlags=0,u=p,p=f.child;p!==null;)lT(p,u),p=p.sibling;return V(We,We.current&1|2),se&&ea(f,y.treeForkCount),f.child}u=u.sibling}y.tail!==null&&Nn()>Od&&(f.flags|=128,T=!0,Ac(y,!1),f.lanes=4194304)}else{if(!T)if(u=gd(C),u!==null){if(f.flags|=128,T=!0,u=u.updateQueue,f.updateQueue=u,kd(f,u),Ac(y,!0),y.tail===null&&y.tailMode==="hidden"&&!C.alternate&&!se)return Pe(f),null}else 2*Nn()-y.renderingStartTime>Od&&p!==536870912&&(f.flags|=128,T=!0,Ac(y,!1),f.lanes=4194304);y.isBackwards?(C.sibling=f.child,f.child=C):(u=y.last,u!==null?u.sibling=C:f.child=C,y.last=C)}return y.tail!==null?(u=y.tail,y.rendering=u,y.tail=u.sibling,y.renderingStartTime=Nn(),u.sibling=null,p=We.current,V(We,T?p&1|2:p&1),se&&ea(f,y.treeForkCount),u):(Pe(f),null);case 22:case 23:return gr(f),Ym(),y=f.memoizedState!==null,u!==null?u.memoizedState!==null!==y&&(f.flags|=8192):y&&(f.flags|=8192),y?(p&536870912)!==0&&(f.flags&128)===0&&(Pe(f),f.subtreeFlags&6&&(f.flags|=8192)):Pe(f),p=f.updateQueue,p!==null&&kd(f,p.retryQueue),p=null,u!==null&&u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(p=u.memoizedState.cachePool.pool),y=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(y=f.memoizedState.cachePool.pool),y!==p&&(f.flags|=2048),u!==null&&Z(Qo),null;case 24:return p=null,u!==null&&(p=u.memoizedState.cache),f.memoizedState.cache!==p&&(f.flags|=2048),ra(tn),Pe(f),null;case 25:return null;case 30:return null}throw Error(r(156,f.tag))}function m4(u,f){switch(Lm(f),f.tag){case 1:return u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 3:return ra(tn),vt(),u=f.flags,(u&65536)!==0&&(u&128)===0?(f.flags=u&-65537|128,f):null;case 26:case 27:case 5:return yt(f),null;case 31:if(f.memoizedState!==null){if(gr(f),f.alternate===null)throw Error(r(340));Xo()}return u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 13:if(gr(f),u=f.memoizedState,u!==null&&u.dehydrated!==null){if(f.alternate===null)throw Error(r(340));Xo()}return u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 19:return Z(We),null;case 4:return vt(),null;case 10:return ra(f.type),null;case 22:case 23:return gr(f),Ym(),u!==null&&Z(Qo),u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 24:return ra(tn),null;case 25:return null;default:return null}}function OC(u,f){switch(Lm(f),f.tag){case 3:ra(tn),vt();break;case 26:case 27:case 5:yt(f);break;case 4:vt();break;case 31:f.memoizedState!==null&&gr(f);break;case 13:gr(f);break;case 19:Z(We);break;case 10:ra(f.type);break;case 22:case 23:gr(f),Ym(),u!==null&&Z(Qo);break;case 24:ra(tn)}}function Dc(u,f){try{var p=f.updateQueue,y=p!==null?p.lastEffect:null;if(y!==null){var T=y.next;p=T;do{if((p.tag&u)===u){y=void 0;var C=p.create,R=p.inst;y=C(),R.destroy=y}p=p.next}while(p!==T)}}catch(G){Me(f,f.return,G)}}function Ga(u,f,p){try{var y=f.updateQueue,T=y!==null?y.lastEffect:null;if(T!==null){var C=T.next;y=C;do{if((y.tag&u)===u){var R=y.inst,G=R.destroy;if(G!==void 0){R.destroy=void 0,T=f;var $=p,nt=G;try{nt()}catch(st){Me(T,$,st)}}}y=y.next}while(y!==C)}}catch(st){Me(f,f.return,st)}}function zC(u){var f=u.updateQueue;if(f!==null){var p=u.stateNode;try{CT(f,p)}catch(y){Me(u,u.return,y)}}}function BC(u,f,p){p.props=nl(u.type,u.memoizedProps),p.state=u.memoizedState;try{p.componentWillUnmount()}catch(y){Me(u,f,y)}}function kc(u,f){try{var p=u.ref;if(p!==null){switch(u.tag){case 26:case 27:case 5:var y=u.stateNode;break;case 30:y=u.stateNode;break;default:y=u.stateNode}typeof p=="function"?u.refCleanup=p(y):p.current=y}}catch(T){Me(u,f,T)}}function Ci(u,f){var p=u.ref,y=u.refCleanup;if(p!==null)if(typeof y=="function")try{y()}catch(T){Me(u,f,T)}finally{u.refCleanup=null,u=u.alternate,u!=null&&(u.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(T){Me(u,f,T)}else p.current=null}function NC(u){var f=u.type,p=u.memoizedProps,y=u.stateNode;try{t:switch(f){case"button":case"input":case"select":case"textarea":p.autoFocus&&y.focus();break t;case"img":p.src?y.src=p.src:p.srcSet&&(y.srcset=p.srcSet)}}catch(T){Me(u,u.return,T)}}function wy(u,f,p){try{var y=u.stateNode;H4(y,u.type,p,f),y[$n]=f}catch(T){Me(u,u.return,T)}}function PC(u){return u.tag===5||u.tag===3||u.tag===26||u.tag===27&&$a(u.type)||u.tag===4}function Ty(u){t:for(;;){for(;u.sibling===null;){if(u.return===null||PC(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.tag===27&&$a(u.type)||u.flags&2||u.child===null||u.tag===4)continue t;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function Cy(u,f,p){var y=u.tag;if(y===5||y===6)u=u.stateNode,f?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(u,f):(f=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,f.appendChild(u),p=p._reactRootContainer,p!=null||f.onclick!==null||(f.onclick=Ki));else if(y!==4&&(y===27&&$a(u.type)&&(p=u.stateNode,f=null),u=u.child,u!==null))for(Cy(u,f,p),u=u.sibling;u!==null;)Cy(u,f,p),u=u.sibling}function Ld(u,f,p){var y=u.tag;if(y===5||y===6)u=u.stateNode,f?p.insertBefore(u,f):p.appendChild(u);else if(y!==4&&(y===27&&$a(u.type)&&(p=u.stateNode),u=u.child,u!==null))for(Ld(u,f,p),u=u.sibling;u!==null;)Ld(u,f,p),u=u.sibling}function HC(u){var f=u.stateNode,p=u.memoizedProps;try{for(var y=u.type,T=f.attributes;T.length;)f.removeAttributeNode(T[0]);_n(f,y,p),f[mn]=u,f[$n]=p}catch(C){Me(u,u.return,C)}}var sa=!1,rn=!1,My=!1,VC=typeof WeakSet=="function"?WeakSet:Set,fn=null;function y4(u,f){if(u=u.containerInfo,qy=Qd,u=Kw(u),xm(u)){if("selectionStart"in u)var p={start:u.selectionStart,end:u.selectionEnd};else t:{p=(p=u.ownerDocument)&&p.defaultView||window;var y=p.getSelection&&p.getSelection();if(y&&y.rangeCount!==0){p=y.anchorNode;var T=y.anchorOffset,C=y.focusNode;y=y.focusOffset;try{p.nodeType,C.nodeType}catch{p=null;break t}var R=0,G=-1,$=-1,nt=0,st=0,ht=u,rt=null;e:for(;;){for(var it;ht!==p||T!==0&&ht.nodeType!==3||(G=R+T),ht!==C||y!==0&&ht.nodeType!==3||($=R+y),ht.nodeType===3&&(R+=ht.nodeValue.length),(it=ht.firstChild)!==null;)rt=ht,ht=it;for(;;){if(ht===u)break e;if(rt===p&&++nt===T&&(G=R),rt===C&&++st===y&&($=R),(it=ht.nextSibling)!==null)break;ht=rt,rt=ht.parentNode}ht=it}p=G===-1||$===-1?null:{start:G,end:$}}else p=null}p=p||{start:0,end:0}}else p=null;for(Xy={focusedElem:u,selectionRange:p},Qd=!1,fn=f;fn!==null;)if(f=fn,u=f.child,(f.subtreeFlags&1028)!==0&&u!==null)u.return=f,fn=u;else for(;fn!==null;){switch(f=fn,C=f.alternate,u=f.flags,f.tag){case 0:if((u&4)!==0&&(u=f.updateQueue,u=u!==null?u.events:null,u!==null))for(p=0;p<u.length;p++)T=u[p],T.ref.impl=T.nextImpl;break;case 11:case 15:break;case 1:if((u&1024)!==0&&C!==null){u=void 0,p=f,T=C.memoizedProps,C=C.memoizedState,y=p.stateNode;try{var kt=nl(p.type,T);u=y.getSnapshotBeforeUpdate(kt,C),y.__reactInternalSnapshotBeforeUpdate=u}catch(Ht){Me(p,p.return,Ht)}}break;case 3:if((u&1024)!==0){if(u=f.stateNode.containerInfo,p=u.nodeType,p===9)Qy(u);else if(p===1)switch(u.nodeName){case"HEAD":case"HTML":case"BODY":Qy(u);break;default:u.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((u&1024)!==0)throw Error(r(163))}if(u=f.sibling,u!==null){u.return=f.return,fn=u;break}fn=f.return}}function jC(u,f,p){var y=p.flags;switch(p.tag){case 0:case 11:case 15:ca(u,p),y&4&&Dc(5,p);break;case 1:if(ca(u,p),y&4)if(u=p.stateNode,f===null)try{u.componentDidMount()}catch(R){Me(p,p.return,R)}else{var T=nl(p.type,f.memoizedProps);f=f.memoizedState;try{u.componentDidUpdate(T,f,u.__reactInternalSnapshotBeforeUpdate)}catch(R){Me(p,p.return,R)}}y&64&&zC(p),y&512&&kc(p,p.return);break;case 3:if(ca(u,p),y&64&&(u=p.updateQueue,u!==null)){if(f=null,p.child!==null)switch(p.child.tag){case 27:case 5:f=p.child.stateNode;break;case 1:f=p.child.stateNode}try{CT(u,f)}catch(R){Me(p,p.return,R)}}break;case 27:f===null&&y&4&&HC(p);case 26:case 5:ca(u,p),f===null&&y&4&&NC(p),y&512&&kc(p,p.return);break;case 12:ca(u,p);break;case 31:ca(u,p),y&4&&UC(u,p);break;case 13:ca(u,p),y&4&&YC(u,p),y&64&&(u=p.memoizedState,u!==null&&(u=u.dehydrated,u!==null&&(p=A4.bind(null,p),q4(u,p))));break;case 22:if(y=p.memoizedState!==null||sa,!y){f=f!==null&&f.memoizedState!==null||rn,T=sa;var C=rn;sa=y,(rn=f)&&!C?fa(u,p,(p.subtreeFlags&8772)!==0):ca(u,p),sa=T,rn=C}break;case 30:break;default:ca(u,p)}}function FC(u){var f=u.alternate;f!==null&&(u.alternate=null,FC(f)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(f=u.stateNode,f!==null&&nm(f)),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}var He=null,Kn=!1;function ua(u,f,p){for(p=p.child;p!==null;)GC(u,f,p),p=p.sibling}function GC(u,f,p){if(ln&&typeof ln.onCommitFiberUnmount=="function")try{ln.onCommitFiberUnmount(Pn,p)}catch{}switch(p.tag){case 26:rn||Ci(p,f),ua(u,f,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:rn||Ci(p,f);var y=He,T=Kn;$a(p.type)&&(He=p.stateNode,Kn=!1),ua(u,f,p),Pc(p.stateNode),He=y,Kn=T;break;case 5:rn||Ci(p,f);case 6:if(y=He,T=Kn,He=null,ua(u,f,p),He=y,Kn=T,He!==null)if(Kn)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(p.stateNode)}catch(C){Me(p,f,C)}else try{He.removeChild(p.stateNode)}catch(C){Me(p,f,C)}break;case 18:He!==null&&(Kn?(u=He,z2(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,p.stateNode),Ys(u)):z2(He,p.stateNode));break;case 4:y=He,T=Kn,He=p.stateNode.containerInfo,Kn=!0,ua(u,f,p),He=y,Kn=T;break;case 0:case 11:case 14:case 15:Ga(2,p,f),rn||Ga(4,p,f),ua(u,f,p);break;case 1:rn||(Ci(p,f),y=p.stateNode,typeof y.componentWillUnmount=="function"&&BC(p,f,y)),ua(u,f,p);break;case 21:ua(u,f,p);break;case 22:rn=(y=rn)||p.memoizedState!==null,ua(u,f,p),rn=y;break;default:ua(u,f,p)}}function UC(u,f){if(f.memoizedState===null&&(u=f.alternate,u!==null&&(u=u.memoizedState,u!==null))){u=u.dehydrated;try{Ys(u)}catch(p){Me(f,f.return,p)}}}function YC(u,f){if(f.memoizedState===null&&(u=f.alternate,u!==null&&(u=u.memoizedState,u!==null&&(u=u.dehydrated,u!==null))))try{Ys(u)}catch(p){Me(f,f.return,p)}}function x4(u){switch(u.tag){case 31:case 13:case 19:var f=u.stateNode;return f===null&&(f=u.stateNode=new VC),f;case 22:return u=u.stateNode,f=u._retryCache,f===null&&(f=u._retryCache=new VC),f;default:throw Error(r(435,u.tag))}}function Ed(u,f){var p=x4(u);f.forEach(function(y){if(!p.has(y)){p.add(y);var T=D4.bind(null,u,y);y.then(T,T)}})}function Jn(u,f){var p=f.deletions;if(p!==null)for(var y=0;y<p.length;y++){var T=p[y],C=u,R=f,G=R;t:for(;G!==null;){switch(G.tag){case 27:if($a(G.type)){He=G.stateNode,Kn=!1;break t}break;case 5:He=G.stateNode,Kn=!1;break t;case 3:case 4:He=G.stateNode.containerInfo,Kn=!0;break t}G=G.return}if(He===null)throw Error(r(160));GC(C,R,T),He=null,Kn=!1,C=T.alternate,C!==null&&(C.return=null),T.return=null}if(f.subtreeFlags&13886)for(f=f.child;f!==null;)WC(f,u),f=f.sibling}var ai=null;function WC(u,f){var p=u.alternate,y=u.flags;switch(u.tag){case 0:case 11:case 14:case 15:Jn(f,u),tr(u),y&4&&(Ga(3,u,u.return),Dc(3,u),Ga(5,u,u.return));break;case 1:Jn(f,u),tr(u),y&512&&(rn||p===null||Ci(p,p.return)),y&64&&sa&&(u=u.updateQueue,u!==null&&(y=u.callbacks,y!==null&&(p=u.shared.hiddenCallbacks,u.shared.hiddenCallbacks=p===null?y:p.concat(y))));break;case 26:var T=ai;if(Jn(f,u),tr(u),y&512&&(rn||p===null||Ci(p,p.return)),y&4){var C=p!==null?p.memoizedState:null;if(y=u.memoizedState,p===null)if(y===null)if(u.stateNode===null){t:{y=u.type,p=u.memoizedProps,T=T.ownerDocument||T;e:switch(y){case"title":C=T.getElementsByTagName("title")[0],(!C||C[nc]||C[mn]||C.namespaceURI==="http://www.w3.org/2000/svg"||C.hasAttribute("itemprop"))&&(C=T.createElement(y),T.head.insertBefore(C,T.querySelector("head > title"))),_n(C,y,p),C[mn]=u,cn(C),y=C;break t;case"link":var R=W2("link","href",T).get(y+(p.href||""));if(R){for(var G=0;G<R.length;G++)if(C=R[G],C.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&C.getAttribute("rel")===(p.rel==null?null:p.rel)&&C.getAttribute("title")===(p.title==null?null:p.title)&&C.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){R.splice(G,1);break e}}C=T.createElement(y),_n(C,y,p),T.head.appendChild(C);break;case"meta":if(R=W2("meta","content",T).get(y+(p.content||""))){for(G=0;G<R.length;G++)if(C=R[G],C.getAttribute("content")===(p.content==null?null:""+p.content)&&C.getAttribute("name")===(p.name==null?null:p.name)&&C.getAttribute("property")===(p.property==null?null:p.property)&&C.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&C.getAttribute("charset")===(p.charSet==null?null:p.charSet)){R.splice(G,1);break e}}C=T.createElement(y),_n(C,y,p),T.head.appendChild(C);break;default:throw Error(r(468,y))}C[mn]=u,cn(C),y=C}u.stateNode=y}else q2(T,u.type,u.stateNode);else u.stateNode=Y2(T,y,u.memoizedProps);else C!==y?(C===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):C.count--,y===null?q2(T,u.type,u.stateNode):Y2(T,y,u.memoizedProps)):y===null&&u.stateNode!==null&&wy(u,u.memoizedProps,p.memoizedProps)}break;case 27:Jn(f,u),tr(u),y&512&&(rn||p===null||Ci(p,p.return)),p!==null&&y&4&&wy(u,u.memoizedProps,p.memoizedProps);break;case 5:if(Jn(f,u),tr(u),y&512&&(rn||p===null||Ci(p,p.return)),u.flags&32){T=u.stateNode;try{vs(T,"")}catch(kt){Me(u,u.return,kt)}}y&4&&u.stateNode!=null&&(T=u.memoizedProps,wy(u,T,p!==null?p.memoizedProps:T)),y&1024&&(My=!0);break;case 6:if(Jn(f,u),tr(u),y&4){if(u.stateNode===null)throw Error(r(162));y=u.memoizedProps,p=u.stateNode;try{p.nodeValue=y}catch(kt){Me(u,u.return,kt)}}break;case 3:if(qd=null,T=ai,ai=Yd(f.containerInfo),Jn(f,u),ai=T,tr(u),y&4&&p!==null&&p.memoizedState.isDehydrated)try{Ys(f.containerInfo)}catch(kt){Me(u,u.return,kt)}My&&(My=!1,qC(u));break;case 4:y=ai,ai=Yd(u.stateNode.containerInfo),Jn(f,u),tr(u),ai=y;break;case 12:Jn(f,u),tr(u);break;case 31:Jn(f,u),tr(u),y&4&&(y=u.updateQueue,y!==null&&(u.updateQueue=null,Ed(u,y)));break;case 13:Jn(f,u),tr(u),u.child.flags&8192&&u.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(Id=Nn()),y&4&&(y=u.updateQueue,y!==null&&(u.updateQueue=null,Ed(u,y)));break;case 22:T=u.memoizedState!==null;var $=p!==null&&p.memoizedState!==null,nt=sa,st=rn;if(sa=nt||T,rn=st||$,Jn(f,u),rn=st,sa=nt,tr(u),y&8192)t:for(f=u.stateNode,f._visibility=T?f._visibility&-2:f._visibility|1,T&&(p===null||$||sa||rn||rl(u)),p=null,f=u;;){if(f.tag===5||f.tag===26){if(p===null){$=p=f;try{if(C=$.stateNode,T)R=C.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none";else{G=$.stateNode;var ht=$.memoizedProps.style,rt=ht!=null&&ht.hasOwnProperty("display")?ht.display:null;G.style.display=rt==null||typeof rt=="boolean"?"":(""+rt).trim()}}catch(kt){Me($,$.return,kt)}}}else if(f.tag===6){if(p===null){$=f;try{$.stateNode.nodeValue=T?"":$.memoizedProps}catch(kt){Me($,$.return,kt)}}}else if(f.tag===18){if(p===null){$=f;try{var it=$.stateNode;T?B2(it,!0):B2($.stateNode,!1)}catch(kt){Me($,$.return,kt)}}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===u)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===u)break t;for(;f.sibling===null;){if(f.return===null||f.return===u)break t;p===f&&(p=null),f=f.return}p===f&&(p=null),f.sibling.return=f.return,f=f.sibling}y&4&&(y=u.updateQueue,y!==null&&(p=y.retryQueue,p!==null&&(y.retryQueue=null,Ed(u,p))));break;case 19:Jn(f,u),tr(u),y&4&&(y=u.updateQueue,y!==null&&(u.updateQueue=null,Ed(u,y)));break;case 30:break;case 21:break;default:Jn(f,u),tr(u)}}function tr(u){var f=u.flags;if(f&2){try{for(var p,y=u.return;y!==null;){if(PC(y)){p=y;break}y=y.return}if(p==null)throw Error(r(160));switch(p.tag){case 27:var T=p.stateNode,C=Ty(u);Ld(u,C,T);break;case 5:var R=p.stateNode;p.flags&32&&(vs(R,""),p.flags&=-33);var G=Ty(u);Ld(u,G,R);break;case 3:case 4:var $=p.stateNode.containerInfo,nt=Ty(u);Cy(u,nt,$);break;default:throw Error(r(161))}}catch(st){Me(u,u.return,st)}u.flags&=-3}f&4096&&(u.flags&=-4097)}function qC(u){if(u.subtreeFlags&1024)for(u=u.child;u!==null;){var f=u;qC(f),f.tag===5&&f.flags&1024&&f.stateNode.reset(),u=u.sibling}}function ca(u,f){if(f.subtreeFlags&8772)for(f=f.child;f!==null;)jC(u,f.alternate,f),f=f.sibling}function rl(u){for(u=u.child;u!==null;){var f=u;switch(f.tag){case 0:case 11:case 14:case 15:Ga(4,f,f.return),rl(f);break;case 1:Ci(f,f.return);var p=f.stateNode;typeof p.componentWillUnmount=="function"&&BC(f,f.return,p),rl(f);break;case 27:Pc(f.stateNode);case 26:case 5:Ci(f,f.return),rl(f);break;case 22:f.memoizedState===null&&rl(f);break;case 30:rl(f);break;default:rl(f)}u=u.sibling}}function fa(u,f,p){for(p=p&&(f.subtreeFlags&8772)!==0,f=f.child;f!==null;){var y=f.alternate,T=u,C=f,R=C.flags;switch(C.tag){case 0:case 11:case 15:fa(T,C,p),Dc(4,C);break;case 1:if(fa(T,C,p),y=C,T=y.stateNode,typeof T.componentDidMount=="function")try{T.componentDidMount()}catch(nt){Me(y,y.return,nt)}if(y=C,T=y.updateQueue,T!==null){var G=y.stateNode;try{var $=T.shared.hiddenCallbacks;if($!==null)for(T.shared.hiddenCallbacks=null,T=0;T<$.length;T++)TT($[T],G)}catch(nt){Me(y,y.return,nt)}}p&&R&64&&zC(C),kc(C,C.return);break;case 27:HC(C);case 26:case 5:fa(T,C,p),p&&y===null&&R&4&&NC(C),kc(C,C.return);break;case 12:fa(T,C,p);break;case 31:fa(T,C,p),p&&R&4&&UC(T,C);break;case 13:fa(T,C,p),p&&R&4&&YC(T,C);break;case 22:C.memoizedState===null&&fa(T,C,p),kc(C,C.return);break;case 30:break;default:fa(T,C,p)}f=f.sibling}}function Ay(u,f){var p=null;u!==null&&u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(p=u.memoizedState.cachePool.pool),u=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(u=f.memoizedState.cachePool.pool),u!==p&&(u!=null&&u.refCount++,p!=null&&pc(p))}function Dy(u,f){u=null,f.alternate!==null&&(u=f.alternate.memoizedState.cache),f=f.memoizedState.cache,f!==u&&(f.refCount++,u!=null&&pc(u))}function oi(u,f,p,y){if(f.subtreeFlags&10256)for(f=f.child;f!==null;)XC(u,f,p,y),f=f.sibling}function XC(u,f,p,y){var T=f.flags;switch(f.tag){case 0:case 11:case 15:oi(u,f,p,y),T&2048&&Dc(9,f);break;case 1:oi(u,f,p,y);break;case 3:oi(u,f,p,y),T&2048&&(u=null,f.alternate!==null&&(u=f.alternate.memoizedState.cache),f=f.memoizedState.cache,f!==u&&(f.refCount++,u!=null&&pc(u)));break;case 12:if(T&2048){oi(u,f,p,y),u=f.stateNode;try{var C=f.memoizedProps,R=C.id,G=C.onPostCommit;typeof G=="function"&&G(R,f.alternate===null?"mount":"update",u.passiveEffectDuration,-0)}catch($){Me(f,f.return,$)}}else oi(u,f,p,y);break;case 31:oi(u,f,p,y);break;case 13:oi(u,f,p,y);break;case 23:break;case 22:C=f.stateNode,R=f.alternate,f.memoizedState!==null?C._visibility&2?oi(u,f,p,y):Lc(u,f):C._visibility&2?oi(u,f,p,y):(C._visibility|=2,Os(u,f,p,y,(f.subtreeFlags&10256)!==0||!1)),T&2048&&Ay(R,f);break;case 24:oi(u,f,p,y),T&2048&&Dy(f.alternate,f);break;default:oi(u,f,p,y)}}function Os(u,f,p,y,T){for(T=T&&((f.subtreeFlags&10256)!==0||!1),f=f.child;f!==null;){var C=u,R=f,G=p,$=y,nt=R.flags;switch(R.tag){case 0:case 11:case 15:Os(C,R,G,$,T),Dc(8,R);break;case 23:break;case 22:var st=R.stateNode;R.memoizedState!==null?st._visibility&2?Os(C,R,G,$,T):Lc(C,R):(st._visibility|=2,Os(C,R,G,$,T)),T&&nt&2048&&Ay(R.alternate,R);break;case 24:Os(C,R,G,$,T),T&&nt&2048&&Dy(R.alternate,R);break;default:Os(C,R,G,$,T)}f=f.sibling}}function Lc(u,f){if(f.subtreeFlags&10256)for(f=f.child;f!==null;){var p=u,y=f,T=y.flags;switch(y.tag){case 22:Lc(p,y),T&2048&&Ay(y.alternate,y);break;case 24:Lc(p,y),T&2048&&Dy(y.alternate,y);break;default:Lc(p,y)}f=f.sibling}}var Ec=8192;function zs(u,f,p){if(u.subtreeFlags&Ec)for(u=u.child;u!==null;)ZC(u,f,p),u=u.sibling}function ZC(u,f,p){switch(u.tag){case 26:zs(u,f,p),u.flags&Ec&&u.memoizedState!==null&&aP(p,ai,u.memoizedState,u.memoizedProps);break;case 5:zs(u,f,p);break;case 3:case 4:var y=ai;ai=Yd(u.stateNode.containerInfo),zs(u,f,p),ai=y;break;case 22:u.memoizedState===null&&(y=u.alternate,y!==null&&y.memoizedState!==null?(y=Ec,Ec=16777216,zs(u,f,p),Ec=y):zs(u,f,p));break;default:zs(u,f,p)}}function $C(u){var f=u.alternate;if(f!==null&&(u=f.child,u!==null)){f.child=null;do f=u.sibling,u.sibling=null,u=f;while(u!==null)}}function Rc(u){var f=u.deletions;if((u.flags&16)!==0){if(f!==null)for(var p=0;p<f.length;p++){var y=f[p];fn=y,KC(y,u)}$C(u)}if(u.subtreeFlags&10256)for(u=u.child;u!==null;)QC(u),u=u.sibling}function QC(u){switch(u.tag){case 0:case 11:case 15:Rc(u),u.flags&2048&&Ga(9,u,u.return);break;case 3:Rc(u);break;case 12:Rc(u);break;case 22:var f=u.stateNode;u.memoizedState!==null&&f._visibility&2&&(u.return===null||u.return.tag!==13)?(f._visibility&=-3,Rd(u)):Rc(u);break;default:Rc(u)}}function Rd(u){var f=u.deletions;if((u.flags&16)!==0){if(f!==null)for(var p=0;p<f.length;p++){var y=f[p];fn=y,KC(y,u)}$C(u)}for(u=u.child;u!==null;){switch(f=u,f.tag){case 0:case 11:case 15:Ga(8,f,f.return),Rd(f);break;case 22:p=f.stateNode,p._visibility&2&&(p._visibility&=-3,Rd(f));break;default:Rd(f)}u=u.sibling}}function KC(u,f){for(;fn!==null;){var p=fn;switch(p.tag){case 0:case 11:case 15:Ga(8,p,f);break;case 23:case 22:if(p.memoizedState!==null&&p.memoizedState.cachePool!==null){var y=p.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:pc(p.memoizedState.cache)}if(y=p.child,y!==null)y.return=p,fn=y;else t:for(p=u;fn!==null;){y=fn;var T=y.sibling,C=y.return;if(FC(y),y===p){fn=null;break t}if(T!==null){T.return=C,fn=T;break t}fn=C}}}var b4={getCacheForType:function(u){var f=xn(tn),p=f.data.get(u);return p===void 0&&(p=u(),f.data.set(u,p)),p},cacheSignal:function(){return xn(tn).controller.signal}},_4=typeof WeakMap=="function"?WeakMap:Map,ye=0,Re=null,ee=null,ae=0,Ce=0,mr=null,Ua=!1,Bs=!1,ky=!1,ha=0,Fe=0,Ya=0,il=0,Ly=0,yr=0,Ns=0,Ic=null,er=null,Ey=!1,Id=0,JC=0,Od=1/0,zd=null,Wa=null,sn=0,qa=null,Ps=null,da=0,Ry=0,Iy=null,t2=null,Oc=0,Oy=null;function xr(){return(ye&2)!==0&&ae!==0?ae&-ae:H.T!==null?Vy():gw()}function e2(){if(yr===0)if((ae&536870912)===0||se){var u=Gh;Gh<<=1,(Gh&3932160)===0&&(Gh=262144),yr=u}else yr=536870912;return u=pr.current,u!==null&&(u.flags|=32),yr}function nr(u,f,p){(u===Re&&(Ce===2||Ce===9)||u.cancelPendingCommit!==null)&&(Hs(u,0),Xa(u,ae,yr,!1)),ec(u,p),((ye&2)===0||u!==Re)&&(u===Re&&((ye&2)===0&&(il|=p),Fe===4&&Xa(u,ae,yr,!1)),Mi(u))}function n2(u,f,p){if((ye&6)!==0)throw Error(r(327));var y=!p&&(f&127)===0&&(f&u.expiredLanes)===0||tc(u,f),T=y?T4(u,f):By(u,f,!0),C=y;do{if(T===0){Bs&&!y&&Xa(u,f,0,!1);break}else{if(p=u.current.alternate,C&&!S4(p)){T=By(u,f,!1),C=!1;continue}if(T===2){if(C=f,u.errorRecoveryDisabledLanes&C)var R=0;else R=u.pendingLanes&-536870913,R=R!==0?R:R&536870912?536870912:0;if(R!==0){f=R;t:{var G=u;T=Ic;var $=G.current.memoizedState.isDehydrated;if($&&(Hs(G,R).flags|=256),R=By(G,R,!1),R!==2){if(ky&&!$){G.errorRecoveryDisabledLanes|=C,il|=C,T=4;break t}C=er,er=T,C!==null&&(er===null?er=C:er.push.apply(er,C))}T=R}if(C=!1,T!==2)continue}}if(T===1){Hs(u,0),Xa(u,f,0,!0);break}t:{switch(y=u,C=T,C){case 0:case 1:throw Error(r(345));case 4:if((f&4194048)!==f)break;case 6:Xa(y,f,yr,!Ua);break t;case 2:er=null;break;case 3:case 5:break;default:throw Error(r(329))}if((f&62914560)===f&&(T=Id+300-Nn(),10<T)){if(Xa(y,f,yr,!Ua),Yh(y,0,!0)!==0)break t;da=f,y.timeoutHandle=I2(r2.bind(null,y,p,er,zd,Ey,f,yr,il,Ns,Ua,C,"Throttled",-0,0),T);break t}r2(y,p,er,zd,Ey,f,yr,il,Ns,Ua,C,null,-0,0)}}break}while(!0);Mi(u)}function r2(u,f,p,y,T,C,R,G,$,nt,st,ht,rt,it){if(u.timeoutHandle=-1,ht=f.subtreeFlags,ht&8192||(ht&16785408)===16785408){ht={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ki},ZC(f,C,ht);var kt=(C&62914560)===C?Id-Nn():(C&4194048)===C?JC-Nn():0;if(kt=oP(ht,kt),kt!==null){da=C,u.cancelPendingCommit=kt(f2.bind(null,u,f,C,p,y,T,R,G,$,st,ht,null,rt,it)),Xa(u,C,R,!nt);return}}f2(u,f,C,p,y,T,R,G,$)}function S4(u){for(var f=u;;){var p=f.tag;if((p===0||p===11||p===15)&&f.flags&16384&&(p=f.updateQueue,p!==null&&(p=p.stores,p!==null)))for(var y=0;y<p.length;y++){var T=p[y],C=T.getSnapshot;T=T.value;try{if(!dr(C(),T))return!1}catch{return!1}}if(p=f.child,f.subtreeFlags&16384&&p!==null)p.return=f,f=p;else{if(f===u)break;for(;f.sibling===null;){if(f.return===null||f.return===u)return!0;f=f.return}f.sibling.return=f.return,f=f.sibling}}return!0}function Xa(u,f,p,y){f&=~Ly,f&=~il,u.suspendedLanes|=f,u.pingedLanes&=~f,y&&(u.warmLanes|=f),y=u.expirationTimes;for(var T=f;0<T;){var C=31-Ee(T),R=1<<C;y[C]=-1,T&=~R}p!==0&&dw(u,p,f)}function Bd(){return(ye&6)===0?(zc(0),!1):!0}function zy(){if(ee!==null){if(Ce===0)var u=ee.return;else u=ee,na=Zo=null,Qm(u),ks=null,mc=0,u=ee;for(;u!==null;)OC(u.alternate,u),u=u.return;ee=null}}function Hs(u,f){var p=u.timeoutHandle;p!==-1&&(u.timeoutHandle=-1,F4(p)),p=u.cancelPendingCommit,p!==null&&(u.cancelPendingCommit=null,p()),da=0,zy(),Re=u,ee=p=ta(u.current,null),ae=f,Ce=0,mr=null,Ua=!1,Bs=tc(u,f),ky=!1,Ns=yr=Ly=il=Ya=Fe=0,er=Ic=null,Ey=!1,(f&8)!==0&&(f|=f&32);var y=u.entangledLanes;if(y!==0)for(u=u.entanglements,y&=f;0<y;){var T=31-Ee(y),C=1<<T;f|=u[T],y&=~C}return ha=f,rd(),p}function i2(u,f){Xt=null,H.H=Cc,f===Ds||f===fd?(f=bT(),Ce=3):f===Hm?(f=bT(),Ce=4):Ce=f===dy?8:f!==null&&typeof f=="object"&&typeof f.then=="function"?6:1,mr=f,ee===null&&(Fe=1,Cd(u,Er(f,u.current)))}function a2(){var u=pr.current;return u===null?!0:(ae&4194048)===ae?zr===null:(ae&62914560)===ae||(ae&536870912)!==0?u===zr:!1}function o2(){var u=H.H;return H.H=Cc,u===null?Cc:u}function l2(){var u=H.A;return H.A=b4,u}function Nd(){Fe=4,Ua||(ae&4194048)!==ae&&pr.current!==null||(Bs=!0),(Ya&134217727)===0&&(il&134217727)===0||Re===null||Xa(Re,ae,yr,!1)}function By(u,f,p){var y=ye;ye|=2;var T=o2(),C=l2();(Re!==u||ae!==f)&&(zd=null,Hs(u,f)),f=!1;var R=Fe;t:do try{if(Ce!==0&&ee!==null){var G=ee,$=mr;switch(Ce){case 8:zy(),R=6;break t;case 3:case 2:case 9:case 6:pr.current===null&&(f=!0);var nt=Ce;if(Ce=0,mr=null,Vs(u,G,$,nt),p&&Bs){R=0;break t}break;default:nt=Ce,Ce=0,mr=null,Vs(u,G,$,nt)}}w4(),R=Fe;break}catch(st){i2(u,st)}while(!0);return f&&u.shellSuspendCounter++,na=Zo=null,ye=y,H.H=T,H.A=C,ee===null&&(Re=null,ae=0,rd()),R}function w4(){for(;ee!==null;)s2(ee)}function T4(u,f){var p=ye;ye|=2;var y=o2(),T=l2();Re!==u||ae!==f?(zd=null,Od=Nn()+500,Hs(u,f)):Bs=tc(u,f);t:do try{if(Ce!==0&&ee!==null){f=ee;var C=mr;e:switch(Ce){case 1:Ce=0,mr=null,Vs(u,f,C,1);break;case 2:case 9:if(yT(C)){Ce=0,mr=null,u2(f);break}f=function(){Ce!==2&&Ce!==9||Re!==u||(Ce=7),Mi(u)},C.then(f,f);break t;case 3:Ce=7;break t;case 4:Ce=5;break t;case 7:yT(C)?(Ce=0,mr=null,u2(f)):(Ce=0,mr=null,Vs(u,f,C,7));break;case 5:var R=null;switch(ee.tag){case 26:R=ee.memoizedState;case 5:case 27:var G=ee;if(R?X2(R):G.stateNode.complete){Ce=0,mr=null;var $=G.sibling;if($!==null)ee=$;else{var nt=G.return;nt!==null?(ee=nt,Pd(nt)):ee=null}break e}}Ce=0,mr=null,Vs(u,f,C,5);break;case 6:Ce=0,mr=null,Vs(u,f,C,6);break;case 8:zy(),Fe=6;break t;default:throw Error(r(462))}}C4();break}catch(st){i2(u,st)}while(!0);return na=Zo=null,H.H=y,H.A=T,ye=p,ee!==null?0:(Re=null,ae=0,rd(),Fe)}function C4(){for(;ee!==null&&!Vo();)s2(ee)}function s2(u){var f=RC(u.alternate,u,ha);u.memoizedProps=u.pendingProps,f===null?Pd(u):ee=f}function u2(u){var f=u,p=f.alternate;switch(f.tag){case 15:case 0:f=MC(p,f,f.pendingProps,f.type,void 0,ae);break;case 11:f=MC(p,f,f.pendingProps,f.type.render,f.ref,ae);break;case 5:Qm(f);default:OC(p,f),f=ee=lT(f,ha),f=RC(p,f,ha)}u.memoizedProps=u.pendingProps,f===null?Pd(u):ee=f}function Vs(u,f,p,y){na=Zo=null,Qm(f),ks=null,mc=0;var T=f.return;try{if(d4(u,T,f,p,ae)){Fe=1,Cd(u,Er(p,u.current)),ee=null;return}}catch(C){if(T!==null)throw ee=T,C;Fe=1,Cd(u,Er(p,u.current)),ee=null;return}f.flags&32768?(se||y===1?u=!0:Bs||(ae&536870912)!==0?u=!1:(Ua=u=!0,(y===2||y===9||y===3||y===6)&&(y=pr.current,y!==null&&y.tag===13&&(y.flags|=16384))),c2(f,u)):Pd(f)}function Pd(u){var f=u;do{if((f.flags&32768)!==0){c2(f,Ua);return}u=f.return;var p=g4(f.alternate,f,ha);if(p!==null){ee=p;return}if(f=f.sibling,f!==null){ee=f;return}ee=f=u}while(f!==null);Fe===0&&(Fe=5)}function c2(u,f){do{var p=m4(u.alternate,u);if(p!==null){p.flags&=32767,ee=p;return}if(p=u.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!f&&(u=u.sibling,u!==null)){ee=u;return}ee=u=p}while(u!==null);Fe=6,ee=null}function f2(u,f,p,y,T,C,R,G,$){u.cancelPendingCommit=null;do Hd();while(sn!==0);if((ye&6)!==0)throw Error(r(327));if(f!==null){if(f===u.current)throw Error(r(177));if(C=f.lanes|f.childLanes,C|=Tm,iN(u,p,C,R,G,$),u===Re&&(ee=Re=null,ae=0),Ps=f,qa=u,da=p,Ry=C,Iy=T,t2=y,(f.subtreeFlags&10256)!==0||(f.flags&10256)!==0?(u.callbackNode=null,u.callbackPriority=0,k4(jt,function(){return g2(),null})):(u.callbackNode=null,u.callbackPriority=0),y=(f.flags&13878)!==0,(f.subtreeFlags&13878)!==0||y){y=H.T,H.T=null,T=q.p,q.p=2,R=ye,ye|=4;try{y4(u,f,p)}finally{ye=R,q.p=T,H.T=y}}sn=1,h2(),d2(),v2()}}function h2(){if(sn===1){sn=0;var u=qa,f=Ps,p=(f.flags&13878)!==0;if((f.subtreeFlags&13878)!==0||p){p=H.T,H.T=null;var y=q.p;q.p=2;var T=ye;ye|=4;try{WC(f,u);var C=Xy,R=Kw(u.containerInfo),G=C.focusedElem,$=C.selectionRange;if(R!==G&&G&&G.ownerDocument&&Qw(G.ownerDocument.documentElement,G)){if($!==null&&xm(G)){var nt=$.start,st=$.end;if(st===void 0&&(st=nt),"selectionStart"in G)G.selectionStart=nt,G.selectionEnd=Math.min(st,G.value.length);else{var ht=G.ownerDocument||document,rt=ht&&ht.defaultView||window;if(rt.getSelection){var it=rt.getSelection(),kt=G.textContent.length,Ht=Math.min($.start,kt),Le=$.end===void 0?Ht:Math.min($.end,kt);!it.extend&&Ht>Le&&(R=Le,Le=Ht,Ht=R);var K=$w(G,Ht),Q=$w(G,Le);if(K&&Q&&(it.rangeCount!==1||it.anchorNode!==K.node||it.anchorOffset!==K.offset||it.focusNode!==Q.node||it.focusOffset!==Q.offset)){var et=ht.createRange();et.setStart(K.node,K.offset),it.removeAllRanges(),Ht>Le?(it.addRange(et),it.extend(Q.node,Q.offset)):(et.setEnd(Q.node,Q.offset),it.addRange(et))}}}}for(ht=[],it=G;it=it.parentNode;)it.nodeType===1&&ht.push({element:it,left:it.scrollLeft,top:it.scrollTop});for(typeof G.focus=="function"&&G.focus(),G=0;G<ht.length;G++){var ft=ht[G];ft.element.scrollLeft=ft.left,ft.element.scrollTop=ft.top}}Qd=!!qy,Xy=qy=null}finally{ye=T,q.p=y,H.T=p}}u.current=f,sn=2}}function d2(){if(sn===2){sn=0;var u=qa,f=Ps,p=(f.flags&8772)!==0;if((f.subtreeFlags&8772)!==0||p){p=H.T,H.T=null;var y=q.p;q.p=2;var T=ye;ye|=4;try{jC(u,f.alternate,f)}finally{ye=T,q.p=y,H.T=p}}sn=3}}function v2(){if(sn===4||sn===3){sn=0,$g();var u=qa,f=Ps,p=da,y=t2;(f.subtreeFlags&10256)!==0||(f.flags&10256)!==0?sn=5:(sn=0,Ps=qa=null,p2(u,u.pendingLanes));var T=u.pendingLanes;if(T===0&&(Wa=null),tm(p),f=f.stateNode,ln&&typeof ln.onCommitFiberRoot=="function")try{ln.onCommitFiberRoot(Pn,f,void 0,(f.current.flags&128)===128)}catch{}if(y!==null){f=H.T,T=q.p,q.p=2,H.T=null;try{for(var C=u.onRecoverableError,R=0;R<y.length;R++){var G=y[R];C(G.value,{componentStack:G.stack})}}finally{H.T=f,q.p=T}}(da&3)!==0&&Hd(),Mi(u),T=u.pendingLanes,(p&261930)!==0&&(T&42)!==0?u===Oy?Oc++:(Oc=0,Oy=u):Oc=0,zc(0)}}function p2(u,f){(u.pooledCacheLanes&=f)===0&&(f=u.pooledCache,f!=null&&(u.pooledCache=null,pc(f)))}function Hd(){return h2(),d2(),v2(),g2()}function g2(){if(sn!==5)return!1;var u=qa,f=Ry;Ry=0;var p=tm(da),y=H.T,T=q.p;try{q.p=32>p?32:p,H.T=null,p=Iy,Iy=null;var C=qa,R=da;if(sn=0,Ps=qa=null,da=0,(ye&6)!==0)throw Error(r(331));var G=ye;if(ye|=4,QC(C.current),XC(C,C.current,R,p),ye=G,zc(0,!1),ln&&typeof ln.onPostCommitFiberRoot=="function")try{ln.onPostCommitFiberRoot(Pn,C)}catch{}return!0}finally{q.p=T,H.T=y,p2(u,f)}}function m2(u,f,p){f=Er(p,f),f=hy(u.stateNode,f,2),u=Va(u,f,2),u!==null&&(ec(u,2),Mi(u))}function Me(u,f,p){if(u.tag===3)m2(u,u,p);else for(;f!==null;){if(f.tag===3){m2(f,u,p);break}else if(f.tag===1){var y=f.stateNode;if(typeof f.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Wa===null||!Wa.has(y))){u=Er(p,u),p=yC(2),y=Va(f,p,2),y!==null&&(xC(p,y,f,u),ec(y,2),Mi(y));break}}f=f.return}}function Ny(u,f,p){var y=u.pingCache;if(y===null){y=u.pingCache=new _4;var T=new Set;y.set(f,T)}else T=y.get(f),T===void 0&&(T=new Set,y.set(f,T));T.has(p)||(ky=!0,T.add(p),u=M4.bind(null,u,f,p),f.then(u,u))}function M4(u,f,p){var y=u.pingCache;y!==null&&y.delete(f),u.pingedLanes|=u.suspendedLanes&p,u.warmLanes&=~p,Re===u&&(ae&p)===p&&(Fe===4||Fe===3&&(ae&62914560)===ae&&300>Nn()-Id?(ye&2)===0&&Hs(u,0):Ly|=p,Ns===ae&&(Ns=0)),Mi(u)}function y2(u,f){f===0&&(f=hw()),u=Wo(u,f),u!==null&&(ec(u,f),Mi(u))}function A4(u){var f=u.memoizedState,p=0;f!==null&&(p=f.retryLane),y2(u,p)}function D4(u,f){var p=0;switch(u.tag){case 31:case 13:var y=u.stateNode,T=u.memoizedState;T!==null&&(p=T.retryLane);break;case 19:y=u.stateNode;break;case 22:y=u.stateNode._retryCache;break;default:throw Error(r(314))}y!==null&&y.delete(f),y2(u,p)}function k4(u,f){return ni(u,f)}var Vd=null,js=null,Py=!1,jd=!1,Hy=!1,Za=0;function Mi(u){u!==js&&u.next===null&&(js===null?Vd=js=u:js=js.next=u),jd=!0,Py||(Py=!0,E4())}function zc(u,f){if(!Hy&&jd){Hy=!0;do for(var p=!1,y=Vd;y!==null;){if(u!==0){var T=y.pendingLanes;if(T===0)var C=0;else{var R=y.suspendedLanes,G=y.pingedLanes;C=(1<<31-Ee(42|u)+1)-1,C&=T&~(R&~G),C=C&201326741?C&201326741|1:C?C|2:0}C!==0&&(p=!0,S2(y,C))}else C=ae,C=Yh(y,y===Re?C:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(C&3)===0||tc(y,C)||(p=!0,S2(y,C));y=y.next}while(p);Hy=!1}}function L4(){x2()}function x2(){jd=Py=!1;var u=0;Za!==0&&j4()&&(u=Za);for(var f=Nn(),p=null,y=Vd;y!==null;){var T=y.next,C=b2(y,f);C===0?(y.next=null,p===null?Vd=T:p.next=T,T===null&&(js=p)):(p=y,(u!==0||(C&3)!==0)&&(jd=!0)),y=T}sn!==0&&sn!==5||zc(u),Za!==0&&(Za=0)}function b2(u,f){for(var p=u.suspendedLanes,y=u.pingedLanes,T=u.expirationTimes,C=u.pendingLanes&-62914561;0<C;){var R=31-Ee(C),G=1<<R,$=T[R];$===-1?((G&p)===0||(G&y)!==0)&&(T[R]=rN(G,f)):$<=f&&(u.expiredLanes|=G),C&=~G}if(f=Re,p=ae,p=Yh(u,u===f?p:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),y=u.callbackNode,p===0||u===f&&(Ce===2||Ce===9)||u.cancelPendingCommit!==null)return y!==null&&y!==null&&Zi(y),u.callbackNode=null,u.callbackPriority=0;if((p&3)===0||tc(u,p)){if(f=p&-p,f===u.callbackPriority)return f;switch(y!==null&&Zi(y),tm(p)){case 2:case 8:p=_t;break;case 32:p=jt;break;case 268435456:p=Se;break;default:p=jt}return y=_2.bind(null,u),p=ni(p,y),u.callbackPriority=f,u.callbackNode=p,f}return y!==null&&y!==null&&Zi(y),u.callbackPriority=2,u.callbackNode=null,2}function _2(u,f){if(sn!==0&&sn!==5)return u.callbackNode=null,u.callbackPriority=0,null;var p=u.callbackNode;if(Hd()&&u.callbackNode!==p)return null;var y=ae;return y=Yh(u,u===Re?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),y===0?null:(n2(u,y,f),b2(u,Nn()),u.callbackNode!=null&&u.callbackNode===p?_2.bind(null,u):null)}function S2(u,f){if(Hd())return null;n2(u,f,!0)}function E4(){G4(function(){(ye&6)!==0?ni(ct,L4):x2()})}function Vy(){if(Za===0){var u=Ms;u===0&&(u=Fh,Fh<<=1,(Fh&261888)===0&&(Fh=256)),Za=u}return Za}function w2(u){return u==null||typeof u=="symbol"||typeof u=="boolean"?null:typeof u=="function"?u:Zh(""+u)}function T2(u,f){var p=f.ownerDocument.createElement("input");return p.name=f.name,p.value=f.value,u.id&&p.setAttribute("form",u.id),f.parentNode.insertBefore(p,f),u=new FormData(u),p.parentNode.removeChild(p),u}function R4(u,f,p,y,T){if(f==="submit"&&p&&p.stateNode===T){var C=w2((T[$n]||null).action),R=y.submitter;R&&(f=(f=R[$n]||null)?w2(f.formAction):R.getAttribute("formAction"),f!==null&&(C=f,R=null));var G=new Jh("action","action",null,y,T);u.push({event:G,listeners:[{instance:null,listener:function(){if(y.defaultPrevented){if(Za!==0){var $=R?T2(T,R):new FormData(T);oy(p,{pending:!0,data:$,method:T.method,action:C},null,$)}}else typeof C=="function"&&(G.preventDefault(),$=R?T2(T,R):new FormData(T),oy(p,{pending:!0,data:$,method:T.method,action:C},C,$))},currentTarget:T}]})}}for(var jy=0;jy<wm.length;jy++){var Fy=wm[jy],I4=Fy.toLowerCase(),O4=Fy[0].toUpperCase()+Fy.slice(1);ii(I4,"on"+O4)}ii(eT,"onAnimationEnd"),ii(nT,"onAnimationIteration"),ii(rT,"onAnimationStart"),ii("dblclick","onDoubleClick"),ii("focusin","onFocus"),ii("focusout","onBlur"),ii($N,"onTransitionRun"),ii(QN,"onTransitionStart"),ii(KN,"onTransitionCancel"),ii(iT,"onTransitionEnd"),hs("onMouseEnter",["mouseout","mouseover"]),hs("onMouseLeave",["mouseout","mouseover"]),hs("onPointerEnter",["pointerout","pointerover"]),hs("onPointerLeave",["pointerout","pointerover"]),Fo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fo("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),z4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Bc));function C2(u,f){f=(f&4)!==0;for(var p=0;p<u.length;p++){var y=u[p],T=y.event;y=y.listeners;t:{var C=void 0;if(f)for(var R=y.length-1;0<=R;R--){var G=y[R],$=G.instance,nt=G.currentTarget;if(G=G.listener,$!==C&&T.isPropagationStopped())break t;C=G,T.currentTarget=nt;try{C(T)}catch(st){nd(st)}T.currentTarget=null,C=$}else for(R=0;R<y.length;R++){if(G=y[R],$=G.instance,nt=G.currentTarget,G=G.listener,$!==C&&T.isPropagationStopped())break t;C=G,T.currentTarget=nt;try{C(T)}catch(st){nd(st)}T.currentTarget=null,C=$}}}}function ne(u,f){var p=f[em];p===void 0&&(p=f[em]=new Set);var y=u+"__bubble";p.has(y)||(M2(f,u,2,!1),p.add(y))}function Gy(u,f,p){var y=0;f&&(y|=4),M2(p,u,y,f)}var Fd="_reactListening"+Math.random().toString(36).slice(2);function Uy(u){if(!u[Fd]){u[Fd]=!0,xw.forEach(function(p){p!=="selectionchange"&&(z4.has(p)||Gy(p,!1,u),Gy(p,!0,u))});var f=u.nodeType===9?u:u.ownerDocument;f===null||f[Fd]||(f[Fd]=!0,Gy("selectionchange",!1,f))}}function M2(u,f,p,y){switch(eM(f)){case 2:var T=uP;break;case 8:T=cP;break;default:T=a0}p=T.bind(null,f,p,u),T=void 0,!cm||f!=="touchstart"&&f!=="touchmove"&&f!=="wheel"||(T=!0),y?T!==void 0?u.addEventListener(f,p,{capture:!0,passive:T}):u.addEventListener(f,p,!0):T!==void 0?u.addEventListener(f,p,{passive:T}):u.addEventListener(f,p,!1)}function Yy(u,f,p,y,T){var C=y;if((f&1)===0&&(f&2)===0&&y!==null)t:for(;;){if(y===null)return;var R=y.tag;if(R===3||R===4){var G=y.stateNode.containerInfo;if(G===T)break;if(R===4)for(R=y.return;R!==null;){var $=R.tag;if(($===3||$===4)&&R.stateNode.containerInfo===T)return;R=R.return}for(;G!==null;){if(R=us(G),R===null)return;if($=R.tag,$===5||$===6||$===26||$===27){y=C=R;continue t}G=G.parentNode}}y=y.return}Ew(function(){var nt=C,st=sm(p),ht=[];t:{var rt=aT.get(u);if(rt!==void 0){var it=Jh,kt=u;switch(u){case"keypress":if(Qh(p)===0)break t;case"keydown":case"keyup":it=DN;break;case"focusin":kt="focus",it=vm;break;case"focusout":kt="blur",it=vm;break;case"beforeblur":case"afterblur":it=vm;break;case"click":if(p.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":it=Ow;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":it=gN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":it=EN;break;case eT:case nT:case rT:it=xN;break;case iT:it=IN;break;case"scroll":case"scrollend":it=vN;break;case"wheel":it=zN;break;case"copy":case"cut":case"paste":it=_N;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":it=Bw;break;case"toggle":case"beforetoggle":it=NN}var Ht=(f&4)!==0,Le=!Ht&&(u==="scroll"||u==="scrollend"),K=Ht?rt!==null?rt+"Capture":null:rt;Ht=[];for(var Q=nt,et;Q!==null;){var ft=Q;if(et=ft.stateNode,ft=ft.tag,ft!==5&&ft!==26&&ft!==27||et===null||K===null||(ft=ic(Q,K),ft!=null&&Ht.push(Nc(Q,ft,et))),Le)break;Q=Q.return}0<Ht.length&&(rt=new it(rt,kt,null,p,st),ht.push({event:rt,listeners:Ht}))}}if((f&7)===0){t:{if(rt=u==="mouseover"||u==="pointerover",it=u==="mouseout"||u==="pointerout",rt&&p!==lm&&(kt=p.relatedTarget||p.fromElement)&&(us(kt)||kt[ss]))break t;if((it||rt)&&(rt=st.window===st?st:(rt=st.ownerDocument)?rt.defaultView||rt.parentWindow:window,it?(kt=p.relatedTarget||p.toElement,it=nt,kt=kt?us(kt):null,kt!==null&&(Le=a(kt),Ht=kt.tag,kt!==Le||Ht!==5&&Ht!==27&&Ht!==6)&&(kt=null)):(it=null,kt=nt),it!==kt)){if(Ht=Ow,ft="onMouseLeave",K="onMouseEnter",Q="mouse",(u==="pointerout"||u==="pointerover")&&(Ht=Bw,ft="onPointerLeave",K="onPointerEnter",Q="pointer"),Le=it==null?rt:rc(it),et=kt==null?rt:rc(kt),rt=new Ht(ft,Q+"leave",it,p,st),rt.target=Le,rt.relatedTarget=et,ft=null,us(st)===nt&&(Ht=new Ht(K,Q+"enter",kt,p,st),Ht.target=et,Ht.relatedTarget=Le,ft=Ht),Le=ft,it&&kt)e:{for(Ht=B4,K=it,Q=kt,et=0,ft=K;ft;ft=Ht(ft))et++;ft=0;for(var Ot=Q;Ot;Ot=Ht(Ot))ft++;for(;0<et-ft;)K=Ht(K),et--;for(;0<ft-et;)Q=Ht(Q),ft--;for(;et--;){if(K===Q||Q!==null&&K===Q.alternate){Ht=K;break e}K=Ht(K),Q=Ht(Q)}Ht=null}else Ht=null;it!==null&&A2(ht,rt,it,Ht,!1),kt!==null&&Le!==null&&A2(ht,Le,kt,Ht,!0)}}t:{if(rt=nt?rc(nt):window,it=rt.nodeName&&rt.nodeName.toLowerCase(),it==="select"||it==="input"&&rt.type==="file")var pe=Uw;else if(Fw(rt))if(Yw)pe=qN;else{pe=YN;var Et=UN}else it=rt.nodeName,!it||it.toLowerCase()!=="input"||rt.type!=="checkbox"&&rt.type!=="radio"?nt&&om(nt.elementType)&&(pe=Uw):pe=WN;if(pe&&(pe=pe(u,nt))){Gw(ht,pe,p,st);break t}Et&&Et(u,rt,nt),u==="focusout"&&nt&&rt.type==="number"&&nt.memoizedProps.value!=null&&am(rt,"number",rt.value)}switch(Et=nt?rc(nt):window,u){case"focusin":(Fw(Et)||Et.contentEditable==="true")&&(ys=Et,bm=nt,hc=null);break;case"focusout":hc=bm=ys=null;break;case"mousedown":_m=!0;break;case"contextmenu":case"mouseup":case"dragend":_m=!1,Jw(ht,p,st);break;case"selectionchange":if(ZN)break;case"keydown":case"keyup":Jw(ht,p,st)}var Qt;if(gm)t:{switch(u){case"compositionstart":var oe="onCompositionStart";break t;case"compositionend":oe="onCompositionEnd";break t;case"compositionupdate":oe="onCompositionUpdate";break t}oe=void 0}else ms?Vw(u,p)&&(oe="onCompositionEnd"):u==="keydown"&&p.keyCode===229&&(oe="onCompositionStart");oe&&(Nw&&p.locale!=="ko"&&(ms||oe!=="onCompositionStart"?oe==="onCompositionEnd"&&ms&&(Qt=Rw()):(Ia=st,fm="value"in Ia?Ia.value:Ia.textContent,ms=!0)),Et=Gd(nt,oe),0<Et.length&&(oe=new zw(oe,u,null,p,st),ht.push({event:oe,listeners:Et}),Qt?oe.data=Qt:(Qt=jw(p),Qt!==null&&(oe.data=Qt)))),(Qt=HN?VN(u,p):jN(u,p))&&(oe=Gd(nt,"onBeforeInput"),0<oe.length&&(Et=new zw("onBeforeInput","beforeinput",null,p,st),ht.push({event:Et,listeners:oe}),Et.data=Qt)),R4(ht,u,nt,p,st)}C2(ht,f)})}function Nc(u,f,p){return{instance:u,listener:f,currentTarget:p}}function Gd(u,f){for(var p=f+"Capture",y=[];u!==null;){var T=u,C=T.stateNode;if(T=T.tag,T!==5&&T!==26&&T!==27||C===null||(T=ic(u,p),T!=null&&y.unshift(Nc(u,T,C)),T=ic(u,f),T!=null&&y.push(Nc(u,T,C))),u.tag===3)return y;u=u.return}return[]}function B4(u){if(u===null)return null;do u=u.return;while(u&&u.tag!==5&&u.tag!==27);return u||null}function A2(u,f,p,y,T){for(var C=f._reactName,R=[];p!==null&&p!==y;){var G=p,$=G.alternate,nt=G.stateNode;if(G=G.tag,$!==null&&$===y)break;G!==5&&G!==26&&G!==27||nt===null||($=nt,T?(nt=ic(p,C),nt!=null&&R.unshift(Nc(p,nt,$))):T||(nt=ic(p,C),nt!=null&&R.push(Nc(p,nt,$)))),p=p.return}R.length!==0&&u.push({event:f,listeners:R})}var N4=/\r\n?/g,P4=/\u0000|\uFFFD/g;function D2(u){return(typeof u=="string"?u:""+u).replace(N4,`
|
|
49
|
+
`).replace(P4,"")}function k2(u,f){return f=D2(f),D2(u)===f}function ke(u,f,p,y,T,C){switch(p){case"children":typeof y=="string"?f==="body"||f==="textarea"&&y===""||vs(u,y):(typeof y=="number"||typeof y=="bigint")&&f!=="body"&&vs(u,""+y);break;case"className":qh(u,"class",y);break;case"tabIndex":qh(u,"tabindex",y);break;case"dir":case"role":case"viewBox":case"width":case"height":qh(u,p,y);break;case"style":kw(u,y,C);break;case"data":if(f!=="object"){qh(u,"data",y);break}case"src":case"href":if(y===""&&(f!=="a"||p!=="href")){u.removeAttribute(p);break}if(y==null||typeof y=="function"||typeof y=="symbol"||typeof y=="boolean"){u.removeAttribute(p);break}y=Zh(""+y),u.setAttribute(p,y);break;case"action":case"formAction":if(typeof y=="function"){u.setAttribute(p,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof C=="function"&&(p==="formAction"?(f!=="input"&&ke(u,f,"name",T.name,T,null),ke(u,f,"formEncType",T.formEncType,T,null),ke(u,f,"formMethod",T.formMethod,T,null),ke(u,f,"formTarget",T.formTarget,T,null)):(ke(u,f,"encType",T.encType,T,null),ke(u,f,"method",T.method,T,null),ke(u,f,"target",T.target,T,null)));if(y==null||typeof y=="symbol"||typeof y=="boolean"){u.removeAttribute(p);break}y=Zh(""+y),u.setAttribute(p,y);break;case"onClick":y!=null&&(u.onclick=Ki);break;case"onScroll":y!=null&&ne("scroll",u);break;case"onScrollEnd":y!=null&&ne("scrollend",u);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(p=y.__html,p!=null){if(T.children!=null)throw Error(r(60));u.innerHTML=p}}break;case"multiple":u.multiple=y&&typeof y!="function"&&typeof y!="symbol";break;case"muted":u.muted=y&&typeof y!="function"&&typeof y!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(y==null||typeof y=="function"||typeof y=="boolean"||typeof y=="symbol"){u.removeAttribute("xlink:href");break}p=Zh(""+y),u.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":y!=null&&typeof y!="function"&&typeof y!="symbol"?u.setAttribute(p,""+y):u.removeAttribute(p);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":y&&typeof y!="function"&&typeof y!="symbol"?u.setAttribute(p,""):u.removeAttribute(p);break;case"capture":case"download":y===!0?u.setAttribute(p,""):y!==!1&&y!=null&&typeof y!="function"&&typeof y!="symbol"?u.setAttribute(p,y):u.removeAttribute(p);break;case"cols":case"rows":case"size":case"span":y!=null&&typeof y!="function"&&typeof y!="symbol"&&!isNaN(y)&&1<=y?u.setAttribute(p,y):u.removeAttribute(p);break;case"rowSpan":case"start":y==null||typeof y=="function"||typeof y=="symbol"||isNaN(y)?u.removeAttribute(p):u.setAttribute(p,y);break;case"popover":ne("beforetoggle",u),ne("toggle",u),Wh(u,"popover",y);break;case"xlinkActuate":Qi(u,"http://www.w3.org/1999/xlink","xlink:actuate",y);break;case"xlinkArcrole":Qi(u,"http://www.w3.org/1999/xlink","xlink:arcrole",y);break;case"xlinkRole":Qi(u,"http://www.w3.org/1999/xlink","xlink:role",y);break;case"xlinkShow":Qi(u,"http://www.w3.org/1999/xlink","xlink:show",y);break;case"xlinkTitle":Qi(u,"http://www.w3.org/1999/xlink","xlink:title",y);break;case"xlinkType":Qi(u,"http://www.w3.org/1999/xlink","xlink:type",y);break;case"xmlBase":Qi(u,"http://www.w3.org/XML/1998/namespace","xml:base",y);break;case"xmlLang":Qi(u,"http://www.w3.org/XML/1998/namespace","xml:lang",y);break;case"xmlSpace":Qi(u,"http://www.w3.org/XML/1998/namespace","xml:space",y);break;case"is":Wh(u,"is",y);break;case"innerText":case"textContent":break;default:(!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(p=hN.get(p)||p,Wh(u,p,y))}}function Wy(u,f,p,y,T,C){switch(p){case"style":kw(u,y,C);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(p=y.__html,p!=null){if(T.children!=null)throw Error(r(60));u.innerHTML=p}}break;case"children":typeof y=="string"?vs(u,y):(typeof y=="number"||typeof y=="bigint")&&vs(u,""+y);break;case"onScroll":y!=null&&ne("scroll",u);break;case"onScrollEnd":y!=null&&ne("scrollend",u);break;case"onClick":y!=null&&(u.onclick=Ki);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bw.hasOwnProperty(p))t:{if(p[0]==="o"&&p[1]==="n"&&(T=p.endsWith("Capture"),f=p.slice(2,T?p.length-7:void 0),C=u[$n]||null,C=C!=null?C[p]:null,typeof C=="function"&&u.removeEventListener(f,C,T),typeof y=="function")){typeof C!="function"&&C!==null&&(p in u?u[p]=null:u.hasAttribute(p)&&u.removeAttribute(p)),u.addEventListener(f,y,T);break t}p in u?u[p]=y:y===!0?u.setAttribute(p,""):Wh(u,p,y)}}}function _n(u,f,p){switch(f){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ne("error",u),ne("load",u);var y=!1,T=!1,C;for(C in p)if(p.hasOwnProperty(C)){var R=p[C];if(R!=null)switch(C){case"src":y=!0;break;case"srcSet":T=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,f));default:ke(u,f,C,R,p,null)}}T&&ke(u,f,"srcSet",p.srcSet,p,null),y&&ke(u,f,"src",p.src,p,null);return;case"input":ne("invalid",u);var G=C=R=T=null,$=null,nt=null;for(y in p)if(p.hasOwnProperty(y)){var st=p[y];if(st!=null)switch(y){case"name":T=st;break;case"type":R=st;break;case"checked":$=st;break;case"defaultChecked":nt=st;break;case"value":C=st;break;case"defaultValue":G=st;break;case"children":case"dangerouslySetInnerHTML":if(st!=null)throw Error(r(137,f));break;default:ke(u,f,y,st,p,null)}}Cw(u,C,G,$,nt,R,T,!1);return;case"select":ne("invalid",u),y=R=C=null;for(T in p)if(p.hasOwnProperty(T)&&(G=p[T],G!=null))switch(T){case"value":C=G;break;case"defaultValue":R=G;break;case"multiple":y=G;default:ke(u,f,T,G,p,null)}f=C,p=R,u.multiple=!!y,f!=null?ds(u,!!y,f,!1):p!=null&&ds(u,!!y,p,!0);return;case"textarea":ne("invalid",u),C=T=y=null;for(R in p)if(p.hasOwnProperty(R)&&(G=p[R],G!=null))switch(R){case"value":y=G;break;case"defaultValue":T=G;break;case"children":C=G;break;case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(91));break;default:ke(u,f,R,G,p,null)}Aw(u,y,T,C);return;case"option":for($ in p)if(p.hasOwnProperty($)&&(y=p[$],y!=null))switch($){case"selected":u.selected=y&&typeof y!="function"&&typeof y!="symbol";break;default:ke(u,f,$,y,p,null)}return;case"dialog":ne("beforetoggle",u),ne("toggle",u),ne("cancel",u),ne("close",u);break;case"iframe":case"object":ne("load",u);break;case"video":case"audio":for(y=0;y<Bc.length;y++)ne(Bc[y],u);break;case"image":ne("error",u),ne("load",u);break;case"details":ne("toggle",u);break;case"embed":case"source":case"link":ne("error",u),ne("load",u);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(nt in p)if(p.hasOwnProperty(nt)&&(y=p[nt],y!=null))switch(nt){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,f));default:ke(u,f,nt,y,p,null)}return;default:if(om(f)){for(st in p)p.hasOwnProperty(st)&&(y=p[st],y!==void 0&&Wy(u,f,st,y,p,void 0));return}}for(G in p)p.hasOwnProperty(G)&&(y=p[G],y!=null&&ke(u,f,G,y,p,null))}function H4(u,f,p,y){switch(f){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var T=null,C=null,R=null,G=null,$=null,nt=null,st=null;for(it in p){var ht=p[it];if(p.hasOwnProperty(it)&&ht!=null)switch(it){case"checked":break;case"value":break;case"defaultValue":$=ht;default:y.hasOwnProperty(it)||ke(u,f,it,null,y,ht)}}for(var rt in y){var it=y[rt];if(ht=p[rt],y.hasOwnProperty(rt)&&(it!=null||ht!=null))switch(rt){case"type":C=it;break;case"name":T=it;break;case"checked":nt=it;break;case"defaultChecked":st=it;break;case"value":R=it;break;case"defaultValue":G=it;break;case"children":case"dangerouslySetInnerHTML":if(it!=null)throw Error(r(137,f));break;default:it!==ht&&ke(u,f,rt,it,y,ht)}}im(u,R,G,$,nt,st,C,T);return;case"select":it=R=G=rt=null;for(C in p)if($=p[C],p.hasOwnProperty(C)&&$!=null)switch(C){case"value":break;case"multiple":it=$;default:y.hasOwnProperty(C)||ke(u,f,C,null,y,$)}for(T in y)if(C=y[T],$=p[T],y.hasOwnProperty(T)&&(C!=null||$!=null))switch(T){case"value":rt=C;break;case"defaultValue":G=C;break;case"multiple":R=C;default:C!==$&&ke(u,f,T,C,y,$)}f=G,p=R,y=it,rt!=null?ds(u,!!p,rt,!1):!!y!=!!p&&(f!=null?ds(u,!!p,f,!0):ds(u,!!p,p?[]:"",!1));return;case"textarea":it=rt=null;for(G in p)if(T=p[G],p.hasOwnProperty(G)&&T!=null&&!y.hasOwnProperty(G))switch(G){case"value":break;case"children":break;default:ke(u,f,G,null,y,T)}for(R in y)if(T=y[R],C=p[R],y.hasOwnProperty(R)&&(T!=null||C!=null))switch(R){case"value":rt=T;break;case"defaultValue":it=T;break;case"children":break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(r(91));break;default:T!==C&&ke(u,f,R,T,y,C)}Mw(u,rt,it);return;case"option":for(var kt in p)if(rt=p[kt],p.hasOwnProperty(kt)&&rt!=null&&!y.hasOwnProperty(kt))switch(kt){case"selected":u.selected=!1;break;default:ke(u,f,kt,null,y,rt)}for($ in y)if(rt=y[$],it=p[$],y.hasOwnProperty($)&&rt!==it&&(rt!=null||it!=null))switch($){case"selected":u.selected=rt&&typeof rt!="function"&&typeof rt!="symbol";break;default:ke(u,f,$,rt,y,it)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ht in p)rt=p[Ht],p.hasOwnProperty(Ht)&&rt!=null&&!y.hasOwnProperty(Ht)&&ke(u,f,Ht,null,y,rt);for(nt in y)if(rt=y[nt],it=p[nt],y.hasOwnProperty(nt)&&rt!==it&&(rt!=null||it!=null))switch(nt){case"children":case"dangerouslySetInnerHTML":if(rt!=null)throw Error(r(137,f));break;default:ke(u,f,nt,rt,y,it)}return;default:if(om(f)){for(var Le in p)rt=p[Le],p.hasOwnProperty(Le)&&rt!==void 0&&!y.hasOwnProperty(Le)&&Wy(u,f,Le,void 0,y,rt);for(st in y)rt=y[st],it=p[st],!y.hasOwnProperty(st)||rt===it||rt===void 0&&it===void 0||Wy(u,f,st,rt,y,it);return}}for(var K in p)rt=p[K],p.hasOwnProperty(K)&&rt!=null&&!y.hasOwnProperty(K)&&ke(u,f,K,null,y,rt);for(ht in y)rt=y[ht],it=p[ht],!y.hasOwnProperty(ht)||rt===it||rt==null&&it==null||ke(u,f,ht,rt,y,it)}function L2(u){switch(u){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function V4(){if(typeof performance.getEntriesByType=="function"){for(var u=0,f=0,p=performance.getEntriesByType("resource"),y=0;y<p.length;y++){var T=p[y],C=T.transferSize,R=T.initiatorType,G=T.duration;if(C&&G&&L2(R)){for(R=0,G=T.responseEnd,y+=1;y<p.length;y++){var $=p[y],nt=$.startTime;if(nt>G)break;var st=$.transferSize,ht=$.initiatorType;st&&L2(ht)&&($=$.responseEnd,R+=st*($<G?1:(G-nt)/($-nt)))}if(--y,f+=8*(C+R)/(T.duration/1e3),u++,10<u)break}}if(0<u)return f/u/1e6}return navigator.connection&&(u=navigator.connection.downlink,typeof u=="number")?u:5}var qy=null,Xy=null;function Ud(u){return u.nodeType===9?u:u.ownerDocument}function E2(u){switch(u){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function R2(u,f){if(u===0)switch(f){case"svg":return 1;case"math":return 2;default:return 0}return u===1&&f==="foreignObject"?0:u}function Zy(u,f){return u==="textarea"||u==="noscript"||typeof f.children=="string"||typeof f.children=="number"||typeof f.children=="bigint"||typeof f.dangerouslySetInnerHTML=="object"&&f.dangerouslySetInnerHTML!==null&&f.dangerouslySetInnerHTML.__html!=null}var $y=null;function j4(){var u=window.event;return u&&u.type==="popstate"?u===$y?!1:($y=u,!0):($y=null,!1)}var I2=typeof setTimeout=="function"?setTimeout:void 0,F4=typeof clearTimeout=="function"?clearTimeout:void 0,O2=typeof Promise=="function"?Promise:void 0,G4=typeof queueMicrotask=="function"?queueMicrotask:typeof O2<"u"?function(u){return O2.resolve(null).then(u).catch(U4)}:I2;function U4(u){setTimeout(function(){throw u})}function $a(u){return u==="head"}function z2(u,f){var p=f,y=0;do{var T=p.nextSibling;if(u.removeChild(p),T&&T.nodeType===8)if(p=T.data,p==="/$"||p==="/&"){if(y===0){u.removeChild(T),Ys(f);return}y--}else if(p==="$"||p==="$?"||p==="$~"||p==="$!"||p==="&")y++;else if(p==="html")Pc(u.ownerDocument.documentElement);else if(p==="head"){p=u.ownerDocument.head,Pc(p);for(var C=p.firstChild;C;){var R=C.nextSibling,G=C.nodeName;C[nc]||G==="SCRIPT"||G==="STYLE"||G==="LINK"&&C.rel.toLowerCase()==="stylesheet"||p.removeChild(C),C=R}}else p==="body"&&Pc(u.ownerDocument.body);p=T}while(p);Ys(f)}function B2(u,f){var p=u;u=0;do{var y=p.nextSibling;if(p.nodeType===1?f?(p._stashedDisplay=p.style.display,p.style.display="none"):(p.style.display=p._stashedDisplay||"",p.getAttribute("style")===""&&p.removeAttribute("style")):p.nodeType===3&&(f?(p._stashedText=p.nodeValue,p.nodeValue=""):p.nodeValue=p._stashedText||""),y&&y.nodeType===8)if(p=y.data,p==="/$"){if(u===0)break;u--}else p!=="$"&&p!=="$?"&&p!=="$~"&&p!=="$!"||u++;p=y}while(p)}function Qy(u){var f=u.firstChild;for(f&&f.nodeType===10&&(f=f.nextSibling);f;){var p=f;switch(f=f.nextSibling,p.nodeName){case"HTML":case"HEAD":case"BODY":Qy(p),nm(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}u.removeChild(p)}}function Y4(u,f,p,y){for(;u.nodeType===1;){var T=p;if(u.nodeName.toLowerCase()!==f.toLowerCase()){if(!y&&(u.nodeName!=="INPUT"||u.type!=="hidden"))break}else if(y){if(!u[nc])switch(f){case"meta":if(!u.hasAttribute("itemprop"))break;return u;case"link":if(C=u.getAttribute("rel"),C==="stylesheet"&&u.hasAttribute("data-precedence"))break;if(C!==T.rel||u.getAttribute("href")!==(T.href==null||T.href===""?null:T.href)||u.getAttribute("crossorigin")!==(T.crossOrigin==null?null:T.crossOrigin)||u.getAttribute("title")!==(T.title==null?null:T.title))break;return u;case"style":if(u.hasAttribute("data-precedence"))break;return u;case"script":if(C=u.getAttribute("src"),(C!==(T.src==null?null:T.src)||u.getAttribute("type")!==(T.type==null?null:T.type)||u.getAttribute("crossorigin")!==(T.crossOrigin==null?null:T.crossOrigin))&&C&&u.hasAttribute("async")&&!u.hasAttribute("itemprop"))break;return u;default:return u}}else if(f==="input"&&u.type==="hidden"){var C=T.name==null?null:""+T.name;if(T.type==="hidden"&&u.getAttribute("name")===C)return u}else return u;if(u=Br(u.nextSibling),u===null)break}return null}function W4(u,f,p){if(f==="")return null;for(;u.nodeType!==3;)if((u.nodeType!==1||u.nodeName!=="INPUT"||u.type!=="hidden")&&!p||(u=Br(u.nextSibling),u===null))return null;return u}function N2(u,f){for(;u.nodeType!==8;)if((u.nodeType!==1||u.nodeName!=="INPUT"||u.type!=="hidden")&&!f||(u=Br(u.nextSibling),u===null))return null;return u}function Ky(u){return u.data==="$?"||u.data==="$~"}function Jy(u){return u.data==="$!"||u.data==="$?"&&u.ownerDocument.readyState!=="loading"}function q4(u,f){var p=u.ownerDocument;if(u.data==="$~")u._reactRetry=f;else if(u.data!=="$?"||p.readyState!=="loading")f();else{var y=function(){f(),p.removeEventListener("DOMContentLoaded",y)};p.addEventListener("DOMContentLoaded",y),u._reactRetry=y}}function Br(u){for(;u!=null;u=u.nextSibling){var f=u.nodeType;if(f===1||f===3)break;if(f===8){if(f=u.data,f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"||f==="F!"||f==="F")break;if(f==="/$"||f==="/&")return null}}return u}var t0=null;function P2(u){u=u.nextSibling;for(var f=0;u;){if(u.nodeType===8){var p=u.data;if(p==="/$"||p==="/&"){if(f===0)return Br(u.nextSibling);f--}else p!=="$"&&p!=="$!"&&p!=="$?"&&p!=="$~"&&p!=="&"||f++}u=u.nextSibling}return null}function H2(u){u=u.previousSibling;for(var f=0;u;){if(u.nodeType===8){var p=u.data;if(p==="$"||p==="$!"||p==="$?"||p==="$~"||p==="&"){if(f===0)return u;f--}else p!=="/$"&&p!=="/&"||f++}u=u.previousSibling}return null}function V2(u,f,p){switch(f=Ud(p),u){case"html":if(u=f.documentElement,!u)throw Error(r(452));return u;case"head":if(u=f.head,!u)throw Error(r(453));return u;case"body":if(u=f.body,!u)throw Error(r(454));return u;default:throw Error(r(451))}}function Pc(u){for(var f=u.attributes;f.length;)u.removeAttributeNode(f[0]);nm(u)}var Nr=new Map,j2=new Set;function Yd(u){return typeof u.getRootNode=="function"?u.getRootNode():u.nodeType===9?u:u.ownerDocument}var va=q.d;q.d={f:X4,r:Z4,D:$4,C:Q4,L:K4,m:J4,X:eP,S:tP,M:nP};function X4(){var u=va.f(),f=Bd();return u||f}function Z4(u){var f=cs(u);f!==null&&f.tag===5&&f.type==="form"?iC(f):va.r(u)}var Fs=typeof document>"u"?null:document;function F2(u,f,p){var y=Fs;if(y&&typeof f=="string"&&f){var T=kr(f);T='link[rel="'+u+'"][href="'+T+'"]',typeof p=="string"&&(T+='[crossorigin="'+p+'"]'),j2.has(T)||(j2.add(T),u={rel:u,crossOrigin:p,href:f},y.querySelector(T)===null&&(f=y.createElement("link"),_n(f,"link",u),cn(f),y.head.appendChild(f)))}}function $4(u){va.D(u),F2("dns-prefetch",u,null)}function Q4(u,f){va.C(u,f),F2("preconnect",u,f)}function K4(u,f,p){va.L(u,f,p);var y=Fs;if(y&&u&&f){var T='link[rel="preload"][as="'+kr(f)+'"]';f==="image"&&p&&p.imageSrcSet?(T+='[imagesrcset="'+kr(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(T+='[imagesizes="'+kr(p.imageSizes)+'"]')):T+='[href="'+kr(u)+'"]';var C=T;switch(f){case"style":C=Gs(u);break;case"script":C=Us(u)}Nr.has(C)||(u=d({rel:"preload",href:f==="image"&&p&&p.imageSrcSet?void 0:u,as:f},p),Nr.set(C,u),y.querySelector(T)!==null||f==="style"&&y.querySelector(Hc(C))||f==="script"&&y.querySelector(Vc(C))||(f=y.createElement("link"),_n(f,"link",u),cn(f),y.head.appendChild(f)))}}function J4(u,f){va.m(u,f);var p=Fs;if(p&&u){var y=f&&typeof f.as=="string"?f.as:"script",T='link[rel="modulepreload"][as="'+kr(y)+'"][href="'+kr(u)+'"]',C=T;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":C=Us(u)}if(!Nr.has(C)&&(u=d({rel:"modulepreload",href:u},f),Nr.set(C,u),p.querySelector(T)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(Vc(C)))return}y=p.createElement("link"),_n(y,"link",u),cn(y),p.head.appendChild(y)}}}function tP(u,f,p){va.S(u,f,p);var y=Fs;if(y&&u){var T=fs(y).hoistableStyles,C=Gs(u);f=f||"default";var R=T.get(C);if(!R){var G={loading:0,preload:null};if(R=y.querySelector(Hc(C)))G.loading=5;else{u=d({rel:"stylesheet",href:u,"data-precedence":f},p),(p=Nr.get(C))&&e0(u,p);var $=R=y.createElement("link");cn($),_n($,"link",u),$._p=new Promise(function(nt,st){$.onload=nt,$.onerror=st}),$.addEventListener("load",function(){G.loading|=1}),$.addEventListener("error",function(){G.loading|=2}),G.loading|=4,Wd(R,f,y)}R={type:"stylesheet",instance:R,count:1,state:G},T.set(C,R)}}}function eP(u,f){va.X(u,f);var p=Fs;if(p&&u){var y=fs(p).hoistableScripts,T=Us(u),C=y.get(T);C||(C=p.querySelector(Vc(T)),C||(u=d({src:u,async:!0},f),(f=Nr.get(T))&&n0(u,f),C=p.createElement("script"),cn(C),_n(C,"link",u),p.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},y.set(T,C))}}function nP(u,f){va.M(u,f);var p=Fs;if(p&&u){var y=fs(p).hoistableScripts,T=Us(u),C=y.get(T);C||(C=p.querySelector(Vc(T)),C||(u=d({src:u,async:!0,type:"module"},f),(f=Nr.get(T))&&n0(u,f),C=p.createElement("script"),cn(C),_n(C,"link",u),p.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},y.set(T,C))}}function G2(u,f,p,y){var T=(T=gt.current)?Yd(T):null;if(!T)throw Error(r(446));switch(u){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(f=Gs(p.href),p=fs(T).hoistableStyles,y=p.get(f),y||(y={type:"style",instance:null,count:0,state:null},p.set(f,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){u=Gs(p.href);var C=fs(T).hoistableStyles,R=C.get(u);if(R||(T=T.ownerDocument||T,R={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},C.set(u,R),(C=T.querySelector(Hc(u)))&&!C._p&&(R.instance=C,R.state.loading=5),Nr.has(u)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},Nr.set(u,p),C||rP(T,u,p,R.state))),f&&y===null)throw Error(r(528,""));return R}if(f&&y!==null)throw Error(r(529,""));return null;case"script":return f=p.async,p=p.src,typeof p=="string"&&f&&typeof f!="function"&&typeof f!="symbol"?(f=Us(p),p=fs(T).hoistableScripts,y=p.get(f),y||(y={type:"script",instance:null,count:0,state:null},p.set(f,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,u))}}function Gs(u){return'href="'+kr(u)+'"'}function Hc(u){return'link[rel="stylesheet"]['+u+"]"}function U2(u){return d({},u,{"data-precedence":u.precedence,precedence:null})}function rP(u,f,p,y){u.querySelector('link[rel="preload"][as="style"]['+f+"]")?y.loading=1:(f=u.createElement("link"),y.preload=f,f.addEventListener("load",function(){return y.loading|=1}),f.addEventListener("error",function(){return y.loading|=2}),_n(f,"link",p),cn(f),u.head.appendChild(f))}function Us(u){return'[src="'+kr(u)+'"]'}function Vc(u){return"script[async]"+u}function Y2(u,f,p){if(f.count++,f.instance===null)switch(f.type){case"style":var y=u.querySelector('style[data-href~="'+kr(p.href)+'"]');if(y)return f.instance=y,cn(y),y;var T=d({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return y=(u.ownerDocument||u).createElement("style"),cn(y),_n(y,"style",T),Wd(y,p.precedence,u),f.instance=y;case"stylesheet":T=Gs(p.href);var C=u.querySelector(Hc(T));if(C)return f.state.loading|=4,f.instance=C,cn(C),C;y=U2(p),(T=Nr.get(T))&&e0(y,T),C=(u.ownerDocument||u).createElement("link"),cn(C);var R=C;return R._p=new Promise(function(G,$){R.onload=G,R.onerror=$}),_n(C,"link",y),f.state.loading|=4,Wd(C,p.precedence,u),f.instance=C;case"script":return C=Us(p.src),(T=u.querySelector(Vc(C)))?(f.instance=T,cn(T),T):(y=p,(T=Nr.get(C))&&(y=d({},p),n0(y,T)),u=u.ownerDocument||u,T=u.createElement("script"),cn(T),_n(T,"link",y),u.head.appendChild(T),f.instance=T);case"void":return null;default:throw Error(r(443,f.type))}else f.type==="stylesheet"&&(f.state.loading&4)===0&&(y=f.instance,f.state.loading|=4,Wd(y,p.precedence,u));return f.instance}function Wd(u,f,p){for(var y=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),T=y.length?y[y.length-1]:null,C=T,R=0;R<y.length;R++){var G=y[R];if(G.dataset.precedence===f)C=G;else if(C!==T)break}C?C.parentNode.insertBefore(u,C.nextSibling):(f=p.nodeType===9?p.head:p,f.insertBefore(u,f.firstChild))}function e0(u,f){u.crossOrigin==null&&(u.crossOrigin=f.crossOrigin),u.referrerPolicy==null&&(u.referrerPolicy=f.referrerPolicy),u.title==null&&(u.title=f.title)}function n0(u,f){u.crossOrigin==null&&(u.crossOrigin=f.crossOrigin),u.referrerPolicy==null&&(u.referrerPolicy=f.referrerPolicy),u.integrity==null&&(u.integrity=f.integrity)}var qd=null;function W2(u,f,p){if(qd===null){var y=new Map,T=qd=new Map;T.set(p,y)}else T=qd,y=T.get(p),y||(y=new Map,T.set(p,y));if(y.has(u))return y;for(y.set(u,null),p=p.getElementsByTagName(u),T=0;T<p.length;T++){var C=p[T];if(!(C[nc]||C[mn]||u==="link"&&C.getAttribute("rel")==="stylesheet")&&C.namespaceURI!=="http://www.w3.org/2000/svg"){var R=C.getAttribute(f)||"";R=u+R;var G=y.get(R);G?G.push(C):y.set(R,[C])}}return y}function q2(u,f,p){u=u.ownerDocument||u,u.head.insertBefore(p,f==="title"?u.querySelector("head > title"):null)}function iP(u,f,p){if(p===1||f.itemProp!=null)return!1;switch(u){case"meta":case"title":return!0;case"style":if(typeof f.precedence!="string"||typeof f.href!="string"||f.href==="")break;return!0;case"link":if(typeof f.rel!="string"||typeof f.href!="string"||f.href===""||f.onLoad||f.onError)break;switch(f.rel){case"stylesheet":return u=f.disabled,typeof f.precedence=="string"&&u==null;default:return!0}case"script":if(f.async&&typeof f.async!="function"&&typeof f.async!="symbol"&&!f.onLoad&&!f.onError&&f.src&&typeof f.src=="string")return!0}return!1}function X2(u){return!(u.type==="stylesheet"&&(u.state.loading&3)===0)}function aP(u,f,p,y){if(p.type==="stylesheet"&&(typeof y.media!="string"||matchMedia(y.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var T=Gs(y.href),C=f.querySelector(Hc(T));if(C){f=C._p,f!==null&&typeof f=="object"&&typeof f.then=="function"&&(u.count++,u=Xd.bind(u),f.then(u,u)),p.state.loading|=4,p.instance=C,cn(C);return}C=f.ownerDocument||f,y=U2(y),(T=Nr.get(T))&&e0(y,T),C=C.createElement("link"),cn(C);var R=C;R._p=new Promise(function(G,$){R.onload=G,R.onerror=$}),_n(C,"link",y),p.instance=C}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(p,f),(f=p.state.preload)&&(p.state.loading&3)===0&&(u.count++,p=Xd.bind(u),f.addEventListener("load",p),f.addEventListener("error",p))}}var r0=0;function oP(u,f){return u.stylesheets&&u.count===0&&$d(u,u.stylesheets),0<u.count||0<u.imgCount?function(p){var y=setTimeout(function(){if(u.stylesheets&&$d(u,u.stylesheets),u.unsuspend){var C=u.unsuspend;u.unsuspend=null,C()}},6e4+f);0<u.imgBytes&&r0===0&&(r0=62500*V4());var T=setTimeout(function(){if(u.waitingForImages=!1,u.count===0&&(u.stylesheets&&$d(u,u.stylesheets),u.unsuspend)){var C=u.unsuspend;u.unsuspend=null,C()}},(u.imgBytes>r0?50:800)+f);return u.unsuspend=p,function(){u.unsuspend=null,clearTimeout(y),clearTimeout(T)}}:null}function Xd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$d(this,this.stylesheets);else if(this.unsuspend){var u=this.unsuspend;this.unsuspend=null,u()}}}var Zd=null;function $d(u,f){u.stylesheets=null,u.unsuspend!==null&&(u.count++,Zd=new Map,f.forEach(lP,u),Zd=null,Xd.call(u))}function lP(u,f){if(!(f.state.loading&4)){var p=Zd.get(u);if(p)var y=p.get(null);else{p=new Map,Zd.set(u,p);for(var T=u.querySelectorAll("link[data-precedence],style[data-precedence]"),C=0;C<T.length;C++){var R=T[C];(R.nodeName==="LINK"||R.getAttribute("media")!=="not all")&&(p.set(R.dataset.precedence,R),y=R)}y&&p.set(null,y)}T=f.instance,R=T.getAttribute("data-precedence"),C=p.get(R)||y,C===y&&p.set(null,T),p.set(R,T),this.count++,y=Xd.bind(this),T.addEventListener("load",y),T.addEventListener("error",y),C?C.parentNode.insertBefore(T,C.nextSibling):(u=u.nodeType===9?u.head:u,u.insertBefore(T,u.firstChild)),f.state.loading|=4}}var jc={$$typeof:w,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function sP(u,f,p,y,T,C,R,G,$){this.tag=1,this.containerInfo=u,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Kg(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kg(0),this.hiddenUpdates=Kg(null),this.identifierPrefix=y,this.onUncaughtError=T,this.onCaughtError=C,this.onRecoverableError=R,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function Z2(u,f,p,y,T,C,R,G,$,nt,st,ht){return u=new sP(u,f,p,R,$,nt,st,ht,G),f=1,C===!0&&(f|=24),C=vr(3,null,null,f),u.current=C,C.stateNode=u,f=Bm(),f.refCount++,u.pooledCache=f,f.refCount++,C.memoizedState={element:y,isDehydrated:p,cache:f},Vm(C),u}function $2(u){return u?(u=_s,u):_s}function Q2(u,f,p,y,T,C){T=$2(T),y.context===null?y.context=T:y.pendingContext=T,y=Ha(f),y.payload={element:p},C=C===void 0?null:C,C!==null&&(y.callback=C),p=Va(u,y,f),p!==null&&(nr(p,u,f),xc(p,u,f))}function K2(u,f){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var p=u.retryLane;u.retryLane=p!==0&&p<f?p:f}}function i0(u,f){K2(u,f),(u=u.alternate)&&K2(u,f)}function J2(u){if(u.tag===13||u.tag===31){var f=Wo(u,67108864);f!==null&&nr(f,u,67108864),i0(u,67108864)}}function tM(u){if(u.tag===13||u.tag===31){var f=xr();f=Jg(f);var p=Wo(u,f);p!==null&&nr(p,u,f),i0(u,f)}}var Qd=!0;function uP(u,f,p,y){var T=H.T;H.T=null;var C=q.p;try{q.p=2,a0(u,f,p,y)}finally{q.p=C,H.T=T}}function cP(u,f,p,y){var T=H.T;H.T=null;var C=q.p;try{q.p=8,a0(u,f,p,y)}finally{q.p=C,H.T=T}}function a0(u,f,p,y){if(Qd){var T=o0(y);if(T===null)Yy(u,f,y,Kd,p),nM(u,y);else if(hP(T,u,f,p,y))y.stopPropagation();else if(nM(u,y),f&4&&-1<fP.indexOf(u)){for(;T!==null;){var C=cs(T);if(C!==null)switch(C.tag){case 3:if(C=C.stateNode,C.current.memoizedState.isDehydrated){var R=jo(C.pendingLanes);if(R!==0){var G=C;for(G.pendingLanes|=2,G.entangledLanes|=2;R;){var $=1<<31-Ee(R);G.entanglements[1]|=$,R&=~$}Mi(C),(ye&6)===0&&(Od=Nn()+500,zc(0))}}break;case 31:case 13:G=Wo(C,2),G!==null&&nr(G,C,2),Bd(),i0(C,2)}if(C=o0(y),C===null&&Yy(u,f,y,Kd,p),C===T)break;T=C}T!==null&&y.stopPropagation()}else Yy(u,f,y,null,p)}}function o0(u){return u=sm(u),l0(u)}var Kd=null;function l0(u){if(Kd=null,u=us(u),u!==null){var f=a(u);if(f===null)u=null;else{var p=f.tag;if(p===13){if(u=o(f),u!==null)return u;u=null}else if(p===31){if(u=l(f),u!==null)return u;u=null}else if(p===3){if(f.stateNode.current.memoizedState.isDehydrated)return f.tag===3?f.stateNode.containerInfo:null;u=null}else f!==u&&(u=null)}}return Kd=u,null}function eM(u){switch(u){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Qg()){case ct:return 2;case _t:return 8;case jt:case te:return 32;case Se:return 268435456;default:return 32}default:return 32}}var s0=!1,Qa=null,Ka=null,Ja=null,Fc=new Map,Gc=new Map,to=[],fP="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function nM(u,f){switch(u){case"focusin":case"focusout":Qa=null;break;case"dragenter":case"dragleave":Ka=null;break;case"mouseover":case"mouseout":Ja=null;break;case"pointerover":case"pointerout":Fc.delete(f.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gc.delete(f.pointerId)}}function Uc(u,f,p,y,T,C){return u===null||u.nativeEvent!==C?(u={blockedOn:f,domEventName:p,eventSystemFlags:y,nativeEvent:C,targetContainers:[T]},f!==null&&(f=cs(f),f!==null&&J2(f)),u):(u.eventSystemFlags|=y,f=u.targetContainers,T!==null&&f.indexOf(T)===-1&&f.push(T),u)}function hP(u,f,p,y,T){switch(f){case"focusin":return Qa=Uc(Qa,u,f,p,y,T),!0;case"dragenter":return Ka=Uc(Ka,u,f,p,y,T),!0;case"mouseover":return Ja=Uc(Ja,u,f,p,y,T),!0;case"pointerover":var C=T.pointerId;return Fc.set(C,Uc(Fc.get(C)||null,u,f,p,y,T)),!0;case"gotpointercapture":return C=T.pointerId,Gc.set(C,Uc(Gc.get(C)||null,u,f,p,y,T)),!0}return!1}function rM(u){var f=us(u.target);if(f!==null){var p=a(f);if(p!==null){if(f=p.tag,f===13){if(f=o(p),f!==null){u.blockedOn=f,mw(u.priority,function(){tM(p)});return}}else if(f===31){if(f=l(p),f!==null){u.blockedOn=f,mw(u.priority,function(){tM(p)});return}}else if(f===3&&p.stateNode.current.memoizedState.isDehydrated){u.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}u.blockedOn=null}function Jd(u){if(u.blockedOn!==null)return!1;for(var f=u.targetContainers;0<f.length;){var p=o0(u.nativeEvent);if(p===null){p=u.nativeEvent;var y=new p.constructor(p.type,p);lm=y,p.target.dispatchEvent(y),lm=null}else return f=cs(p),f!==null&&J2(f),u.blockedOn=p,!1;f.shift()}return!0}function iM(u,f,p){Jd(u)&&p.delete(f)}function dP(){s0=!1,Qa!==null&&Jd(Qa)&&(Qa=null),Ka!==null&&Jd(Ka)&&(Ka=null),Ja!==null&&Jd(Ja)&&(Ja=null),Fc.forEach(iM),Gc.forEach(iM)}function tv(u,f){u.blockedOn===f&&(u.blockedOn=null,s0||(s0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,dP)))}var ev=null;function aM(u){ev!==u&&(ev=u,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ev===u&&(ev=null);for(var f=0;f<u.length;f+=3){var p=u[f],y=u[f+1],T=u[f+2];if(typeof y!="function"){if(l0(y||p)===null)continue;break}var C=cs(p);C!==null&&(u.splice(f,3),f-=3,oy(C,{pending:!0,data:T,method:p.method,action:y},y,T))}}))}function Ys(u){function f($){return tv($,u)}Qa!==null&&tv(Qa,u),Ka!==null&&tv(Ka,u),Ja!==null&&tv(Ja,u),Fc.forEach(f),Gc.forEach(f);for(var p=0;p<to.length;p++){var y=to[p];y.blockedOn===u&&(y.blockedOn=null)}for(;0<to.length&&(p=to[0],p.blockedOn===null);)rM(p),p.blockedOn===null&&to.shift();if(p=(u.ownerDocument||u).$$reactFormReplay,p!=null)for(y=0;y<p.length;y+=3){var T=p[y],C=p[y+1],R=T[$n]||null;if(typeof C=="function")R||aM(p);else if(R){var G=null;if(C&&C.hasAttribute("formAction")){if(T=C,R=C[$n]||null)G=R.formAction;else if(l0(T)!==null)continue}else G=R.action;typeof G=="function"?p[y+1]=G:(p.splice(y,3),y-=3),aM(p)}}}function oM(){function u(C){C.canIntercept&&C.info==="react-transition"&&C.intercept({handler:function(){return new Promise(function(R){return T=R})},focusReset:"manual",scroll:"manual"})}function f(){T!==null&&(T(),T=null),y||setTimeout(p,20)}function p(){if(!y&&!navigation.transition){var C=navigation.currentEntry;C&&C.url!=null&&navigation.navigate(C.url,{state:C.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var y=!1,T=null;return navigation.addEventListener("navigate",u),navigation.addEventListener("navigatesuccess",f),navigation.addEventListener("navigateerror",f),setTimeout(p,100),function(){y=!0,navigation.removeEventListener("navigate",u),navigation.removeEventListener("navigatesuccess",f),navigation.removeEventListener("navigateerror",f),T!==null&&(T(),T=null)}}}function u0(u){this._internalRoot=u}nv.prototype.render=u0.prototype.render=function(u){var f=this._internalRoot;if(f===null)throw Error(r(409));var p=f.current,y=xr();Q2(p,y,u,f,null,null)},nv.prototype.unmount=u0.prototype.unmount=function(){var u=this._internalRoot;if(u!==null){this._internalRoot=null;var f=u.containerInfo;Q2(u.current,2,null,u,null,null),Bd(),f[ss]=null}};function nv(u){this._internalRoot=u}nv.prototype.unstable_scheduleHydration=function(u){if(u){var f=gw();u={blockedOn:null,target:u,priority:f};for(var p=0;p<to.length&&f!==0&&f<to[p].priority;p++);to.splice(p,0,u),p===0&&rM(u)}};var lM=t.version;if(lM!=="19.2.4")throw Error(r(527,lM,"19.2.4"));q.findDOMNode=function(u){var f=u._reactInternals;if(f===void 0)throw typeof u.render=="function"?Error(r(188)):(u=Object.keys(u).join(","),Error(r(268,u)));return u=c(f),u=u!==null?h(u):null,u=u===null?null:u.stateNode,u};var vP={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rv.isDisabled&&rv.supportsFiber)try{Pn=rv.inject(vP),ln=rv}catch{}}return Wc.createRoot=function(u,f){if(!i(u))throw Error(r(299));var p=!1,y="",T=vC,C=pC,R=gC;return f!=null&&(f.unstable_strictMode===!0&&(p=!0),f.identifierPrefix!==void 0&&(y=f.identifierPrefix),f.onUncaughtError!==void 0&&(T=f.onUncaughtError),f.onCaughtError!==void 0&&(C=f.onCaughtError),f.onRecoverableError!==void 0&&(R=f.onRecoverableError)),f=Z2(u,1,!1,null,null,p,y,null,T,C,R,oM),u[ss]=f.current,Uy(u),new u0(f)},Wc.hydrateRoot=function(u,f,p){if(!i(u))throw Error(r(299));var y=!1,T="",C=vC,R=pC,G=gC,$=null;return p!=null&&(p.unstable_strictMode===!0&&(y=!0),p.identifierPrefix!==void 0&&(T=p.identifierPrefix),p.onUncaughtError!==void 0&&(C=p.onUncaughtError),p.onCaughtError!==void 0&&(R=p.onCaughtError),p.onRecoverableError!==void 0&&(G=p.onRecoverableError),p.formState!==void 0&&($=p.formState)),f=Z2(u,1,!0,f,p??null,y,T,$,C,R,G,oM),f.context=$2(null),p=f.current,y=xr(),y=Jg(y),T=Ha(y),T.callback=null,Va(p,T,y),p=y,f.current.lanes=p,ec(f,p),Mi(f),u[ss]=f.current,Uy(u),new nv(f)},Wc.version="19.2.4",Wc}var mM;function TP(){if(mM)return h0.exports;mM=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),h0.exports=wP(),h0.exports}var CP=TP();const z={orange:"#FF8C42",orangeHover:"#FF7A28",orangeLight:"#FFE5D6",teal:"#00695C",tealHover:"#00796B",tealLight:"#E0F2F1",tealDark:"#004D40",neutral:"#2C3E50",blue:"#1E88E5",textPrimary:"#1A1A1A",textSecondary:"#666666",textTertiary:"#999999",textDisabled:"#CCCCCC",background:"#FAFAFA",surface:"#FFFFFF",surfaceHover:"#F5F5F5",border:"#E0E0E0",borderLight:"#F0F0F0",divider:"#E8E8E8",error:"#E53935",warning:"#FF9800"},xe={xs:"0 1px 2px rgba(0,0,0,0.05)",sm:"0 1px 3px rgba(0,0,0,0.06)",md:"0 2px 8px rgba(0,0,0,0.08)",lg:"0 4px 16px rgba(0,0,0,0.1)",focusOrange:"0 0 0 3px rgba(255, 140, 66, 0.25)",focusTeal:"0 0 0 3px rgba(0, 105, 92, 0.25)"},Pt={fast:"120ms cubic-bezier(0.4, 0, 0.2, 1)",normal:"200ms cubic-bezier(0.4, 0, 0.2, 1)",slow:"300ms cubic-bezier(0.4, 0, 0.2, 1)"},yM={width:320,minHeight:320,maxHeight:320,padding:"28px 28px",background:z.surface,border:`1.5px solid ${z.border}`,borderRadius:20,boxShadow:xe.md,transition:Pt.normal,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:16,textAlign:"center",overflow:"hidden",boxSizing:"border-box"};function MP(){return k.jsxs("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",children:[k.jsx("rect",{x:"8",y:"8",width:"40",height:"28",rx:"4",stroke:z.orange,strokeWidth:"2.2"}),k.jsx("rect",{x:"12",y:"12",width:"32",height:"20",rx:"2",fill:z.orangeLight}),k.jsx("path",{d:"M17 19L22 23L17 27",stroke:z.orange,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),k.jsx("path",{d:"M24 27H32",stroke:z.orange,strokeWidth:"2",strokeLinecap:"round"}),k.jsx("path",{d:"M22 36H34",stroke:z.orange,strokeWidth:"2.2",strokeLinecap:"round"}),k.jsx("path",{d:"M28 36V40",stroke:z.orange,strokeWidth:"2.2",strokeLinecap:"round"}),k.jsx("path",{d:"M20 40H36",stroke:z.orange,strokeWidth:"2.2",strokeLinecap:"round"}),k.jsx("circle",{cx:"28",cy:"44",r:"0",fill:"none"})]})}function AP(){return k.jsxs("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",children:[k.jsx("circle",{cx:"20",cy:"28",r:"11",stroke:z.orange,strokeWidth:"2.2"}),k.jsx("circle",{cx:"20",cy:"28",r:"5",fill:z.orangeLight,stroke:z.orange,strokeWidth:"1.5"}),k.jsx("path",{d:"M31 28H44Q48 28 48 32V35",stroke:z.orange,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),k.jsx("path",{d:"M40 28V34",stroke:z.orange,strokeWidth:"2.2",strokeLinecap:"round"})]})}function DP({onConnect:e}){const[t,n]=at.useState(""),[r,i]=at.useState(null),[a,o]=at.useState(null),l=async c=>{i(c),o(null);try{await e(c,c==="apikey"?t.trim():void 0)}catch(h){o({target:c,message:h instanceof Error?h.message:String(h)})}finally{i(null)}},s=r!==null;return k.jsxs("div",{style:{minHeight:"100vh",background:`linear-gradient(135deg, ${z.background} 0%, #FFF5EE 50%, ${z.background} 100%)`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",fontFamily:'system-ui, -apple-system, "Segoe UI", sans-serif',padding:24},children:[k.jsx("img",{src:"/Analitoly.png",alt:"Analitoly",style:{height:64,objectFit:"contain",marginBottom:12}}),k.jsx("p",{style:{color:z.textTertiary,fontSize:15,marginBottom:48,letterSpacing:.2},children:"AI-аналитик для вашего продукта"}),k.jsxs("div",{style:{display:"flex",gap:24,flexWrap:"wrap",justifyContent:"center"},children:[k.jsxs("button",{onClick:()=>l("local"),disabled:s,style:{...yM,cursor:s?"not-allowed":"pointer",opacity:s&&r!=="local"?.5:1},onMouseEnter:c=>{s||(c.currentTarget.style.borderColor=z.orange,c.currentTarget.style.boxShadow=xe.lg,c.currentTarget.style.transform="translateY(-2px)")},onMouseLeave:c=>{c.currentTarget.style.borderColor=z.border,c.currentTarget.style.boxShadow=xe.md,c.currentTarget.style.transform="none"},children:[r==="local"?k.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:14},children:[k.jsx("div",{style:{width:48,height:48,border:`3px solid ${z.borderLight}`,borderTopColor:z.orange,borderRadius:"50%",animation:"auth-spin 0.8s linear infinite"}}),k.jsx("span",{style:{fontSize:14,color:z.textTertiary},children:"Подключение..."})]}):k.jsxs(k.Fragment,{children:[k.jsx(MP,{}),k.jsxs("div",{children:[k.jsx("div",{style:{fontSize:17,fontWeight:600,color:z.textPrimary,marginBottom:6},children:"Локальная сессия"}),k.jsxs("div",{style:{fontSize:13,color:z.textTertiary,lineHeight:1.5},children:["Подключиться через ключ,",k.jsx("br",{}),"настроенный на сервере"]})]})]}),(a==null?void 0:a.target)==="local"&&k.jsx("div",{style:{marginTop:4,padding:"10px 14px",background:"#FFF5F5",border:"1px solid #FECACA",borderRadius:10,fontSize:13,color:z.error,lineHeight:1.5,textAlign:"left",width:"100%"},children:a.message})]}),k.jsxs("div",{style:{...yM,opacity:s&&r!=="apikey"?.5:1},children:[r==="apikey"?k.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:14},children:[k.jsx("div",{style:{width:48,height:48,border:`3px solid ${z.borderLight}`,borderTopColor:z.orange,borderRadius:"50%",animation:"auth-spin 0.8s linear infinite"}}),k.jsx("span",{style:{fontSize:14,color:z.textTertiary},children:"Подключение..."})]}):k.jsxs(k.Fragment,{children:[k.jsx(AP,{}),k.jsxs("div",{children:[k.jsx("div",{style:{fontSize:17,fontWeight:600,color:z.textPrimary,marginBottom:6},children:"API ключ"}),k.jsxs("div",{style:{fontSize:13,color:z.textTertiary,lineHeight:1.5},children:["Подключиться с помощью",k.jsx("br",{}),"Anthropic API ключа"]})]})]}),k.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:8},children:[k.jsx("input",{type:"password",value:t,onChange:c=>n(c.target.value),placeholder:"sk-ant-api03-...",disabled:s,onKeyDown:c=>{c.key==="Enter"&&t.trim()&&!s&&l("apikey")},style:{width:"100%",padding:"9px 12px",fontSize:13,fontFamily:'Monaco, "Courier New", monospace',borderRadius:10,border:`1.5px solid ${z.border}`,background:z.background,color:z.textPrimary,outline:"none",transition:Pt.fast,boxSizing:"border-box"},onFocus:c=>{c.currentTarget.style.borderColor=z.teal,c.currentTarget.style.boxShadow=xe.focusTeal},onBlur:c=>{c.currentTarget.style.borderColor=z.border,c.currentTarget.style.boxShadow="none"}}),k.jsx("button",{onClick:()=>l("apikey"),disabled:s||!t.trim(),style:{width:"100%",padding:"9px 14px",fontSize:13,fontWeight:600,background:s||!t.trim()?z.textDisabled:z.teal,color:"#fff",border:"none",borderRadius:10,cursor:s||!t.trim()?"not-allowed":"pointer",transition:Pt.fast},onMouseEnter:c=>{!s&&t.trim()&&(c.currentTarget.style.background=z.tealHover)},onMouseLeave:c=>{!s&&t.trim()&&(c.currentTarget.style.background=z.teal)},children:"Подключиться"})]}),(a==null?void 0:a.target)==="apikey"&&k.jsx("div",{style:{padding:"10px 14px",background:"#FFF5F5",border:"1px solid #FECACA",borderRadius:10,fontSize:13,color:z.error,lineHeight:1.5,textAlign:"left",width:"100%"},children:a.message})]})]}),k.jsx("style",{children:`
|
|
50
|
+
@keyframes auth-spin {
|
|
51
|
+
to { transform: rotate(360deg); }
|
|
52
|
+
}
|
|
53
|
+
`})]})}function kP({message:e}){return k.jsx("div",{style:{marginBottom:16,textAlign:"right"},children:k.jsx("div",{style:{display:"inline-block",maxWidth:"75%",padding:"10px 16px",borderRadius:12,background:z.tealDark,color:z.surface,whiteSpace:"pre-wrap",textAlign:"left",fontSize:14,lineHeight:1.6,boxShadow:xe.sm},children:e.content})})}function LP({onSend:e,onStop:t,disabled:n}){const[r,i]=at.useState(""),[a,o]=at.useState(!1),l=w=>{w.preventDefault();const A=r.trim();!A||n||(i(""),e(A))},s=!n&&r.trim().length>0,c=n&&!!t,h={border:"none",cursor:"pointer",fontSize:c?14:18,fontWeight:600,transition:Pt.normal,display:"flex",alignItems:"center",justifyContent:"center"},d=s?z.orange:z.border,v=z.error,g=c?v:d,m=c||s,x=a?{...h,padding:"10px 16px",borderRadius:12,background:g,color:z.surface,opacity:m?1:.5,cursor:m?"pointer":"not-allowed",flexShrink:0,height:38}:{...h,position:"absolute",right:1,top:1,bottom:1,padding:"0 16px",borderRadius:10,background:g,color:z.surface,opacity:m?1:.5,cursor:m?"pointer":"not-allowed"},_=()=>{c&&t()},b=c?"#C62828":z.orangeHover,S=g;return k.jsxs("form",{onSubmit:l,style:{display:"flex",gap:8,alignItems:"center",position:"relative"},children:[k.jsx("textarea",{value:r,onChange:w=>i(w.target.value),placeholder:"Спроси о структуре данных или выполни запрос...",disabled:n,rows:1,onInput:w=>{const A=w.target;A.style.height="auto";const D=Math.min(A.scrollHeight,200);A.style.height=D+"px",o(D>45)},onKeyDown:w=>{w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),l(w))},style:{flex:1,padding:a?"9px 14px":"9px 50px 9px 14px",fontSize:14,lineHeight:1.6,borderRadius:12,border:`1px solid ${z.border}`,background:z.surface,color:z.textPrimary,outline:"none",transition:Pt.normal,resize:"none",minHeight:38,maxHeight:200,fontFamily:"inherit",overflow:"hidden",boxSizing:"border-box"},onFocus:w=>{w.currentTarget.style.borderColor=z.orange,w.currentTarget.style.boxShadow=xe.focusOrange},onBlur:w=>{w.currentTarget.style.borderColor=z.border,w.currentTarget.style.boxShadow="none"}}),k.jsx("button",{type:c?"button":"submit",disabled:!m,onClick:_,style:x,onMouseEnter:w=>{m&&(w.currentTarget.style.background=b,w.currentTarget.style.boxShadow=c?"0 2px 8px rgba(229, 57, 53, 0.3)":"0 2px 8px rgba(255, 140, 66, 0.3)")},onMouseLeave:w=>{m&&(w.currentTarget.style.background=S,w.currentTarget.style.boxShadow="none")},children:c?"■":"→"})]})}function Of({copied:e}){return e?k.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",children:k.jsx("path",{d:"M3 8L6 11L13 4",stroke:"#00695C",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):k.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",children:[k.jsx("rect",{x:"5",y:"5",width:"8",height:"8",rx:"1.5",fill:"#FF8C42",stroke:"#FF8C42",strokeWidth:"1.3"}),k.jsx("rect",{x:"3",y:"3",width:"8",height:"8",rx:"1.5",fill:"#FFE5D6"})]})}const EP=/\b(SELECT|FROM|WHERE|JOIN|LEFT|RIGHT|INNER|OUTER|ON|AND|OR|NOT|IN|IS|NULL|AS|ORDER|BY|GROUP|HAVING|LIMIT|OFFSET|INSERT|UPDATE|DELETE|CREATE|ALTER|DROP|SET|VALUES|INTO|DISTINCT|COUNT|SUM|AVG|MIN|MAX|CASE|WHEN|THEN|ELSE|END|UNION|ALL|EXISTS|BETWEEN|LIKE|ILIKE|ASC|DESC|WITH|RECURSIVE|EXPLAIN|ANALYZE|VERBOSE|FORMAT)\b/gi,RP=/('[^']*')/g,IP=/\b(\d+(?:\.\d+)?)\b/g,OP=/("[\w$]+")\s*:/g,zP=/:\s*("[^"]*")/g,BP=/:\s*(\d+(?:\.\d+)?)/g,NP=/\b(true|false|null)\b/g,Sa={bg:"#1E1E1E",text:"#D4D4D4",keyword:"#4EC9B0",string:"#CE9178",number:"#B5CEA8",key:"#9CDCFE",boolean:"#569CD6"};function PP(e){const t=e.replace("mcp__analitoly__","");return["execute_query","pg_explain_query","pg_top_queries"].includes(t)}function HP(e){let t=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");return t=t.replace(RP,`<span style="color:${Sa.string}">$1</span>`),t=t.replace(EP,`<span style="color:${Sa.keyword}">$1</span>`),t=t.replace(IP,`<span style="color:${Sa.number}">$1</span>`),t}function VP(e){let t=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");return t=t.replace(zP,`: <span style="color:${Sa.string}">$1</span>`),t=t.replace(OP,`<span style="color:${Sa.key}">$1</span>:`),t=t.replace(BP,`: <span style="color:${Sa.number}">$1</span>`),t=t.replace(NP,`<span style="color:${Sa.boolean}">$1</span>`),t}function CR({query:e,tool:t}){const[n,r]=at.useState(!1),i=PP(t)?HP(e):VP(e),a=()=>{navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),1e3)};return k.jsxs("div",{style:{position:"relative"},className:"copyable-block",children:[k.jsx("style",{children:`.copyable-block .copy-btn { opacity: 0; transition: opacity ${Pt.fast}; }
|
|
54
|
+
.copyable-block:hover .copy-btn { opacity: 1; }`}),k.jsx("button",{className:"copy-btn",onClick:a,style:{position:"absolute",top:8,right:8,background:"rgba(255,255,255,0.1)",border:"1px solid rgba(255,255,255,0.2)",borderRadius:4,color:"#D4D4D4",cursor:"pointer",fontSize:12,padding:"2px 6px"},children:k.jsx(Of,{copied:n})}),k.jsx("pre",{style:{margin:0,padding:12,background:Sa.bg,borderRadius:6,whiteSpace:"pre-wrap",fontSize:13,lineHeight:1.5,fontFamily:'Monaco, "Courier New", monospace',color:Sa.text,overflow:"auto"},dangerouslySetInnerHTML:{__html:i}})]})}function MR(e){if(!e)return!1;if(e.startsWith("Error:")||e.startsWith("error:"))return!0;try{const t=JSON.parse(e);return t&&typeof t=="object"&&"error"in t}catch{return!1}}const xx="Генерация графика...";function jP(e){try{const t=JSON.parse(e);return Array.isArray(t)&&t.length>0&&typeof t[0]=="object"&&t[0]!==null?{type:"table",columns:Array.from(new Set(t.flatMap(r=>Object.keys(r)))),rows:t}:typeof t=="object"&&t!==null&&!Array.isArray(t)?{type:"kv",entries:Object.entries(t)}:{type:"raw"}}catch{return{type:"raw"}}}function FP(e){return e==null?{text:"null",isNull:!0,isNumber:!1}:typeof e=="number"?{text:String(e),isNull:!1,isNumber:!0}:typeof e=="object"?{text:JSON.stringify(e),isNull:!1,isNumber:!1}:{text:String(e),isNull:!1,isNumber:!1}}const AR={padding:"6px 10px",borderBottom:`1px solid ${z.border}`,fontSize:13,fontFamily:'Monaco, "Courier New", monospace',maxWidth:300,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},GP={...AR,position:"sticky",top:0,background:z.surfaceHover,fontWeight:600,color:z.textPrimary,zIndex:1};function UP({result:e}){const[t,n]=at.useState(!1),r=()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1e3)};if(MR(e))return k.jsxs("div",{style:{position:"relative"},className:"copyable-block",children:[k.jsx("style",{children:`.copyable-block .copy-btn { opacity: 0; transition: opacity ${Pt.fast}; }
|
|
55
|
+
.copyable-block:hover .copy-btn { opacity: 1; }`}),k.jsx("button",{className:"copy-btn",onClick:r,style:{position:"absolute",top:8,right:8,background:z.surfaceHover,border:`1px solid ${z.border}`,borderRadius:4,cursor:"pointer",fontSize:12,padding:"2px 6px"},children:k.jsx(Of,{copied:t})}),k.jsx("pre",{style:{margin:0,padding:12,background:"#FFF5F5",border:`1px solid ${z.error}`,borderRadius:6,whiteSpace:"pre-wrap",fontSize:13,lineHeight:1.5,fontFamily:'Monaco, "Courier New", monospace',color:z.error},children:e})]});const i=jP(e);if(i.type==="raw")return k.jsxs("div",{style:{position:"relative"},className:"copyable-block",children:[k.jsx("style",{children:`.copyable-block .copy-btn { opacity: 0; transition: opacity ${Pt.fast}; }
|
|
56
|
+
.copyable-block:hover .copy-btn { opacity: 1; }`}),k.jsx("button",{className:"copy-btn",onClick:r,style:{position:"absolute",top:8,right:8,background:z.surfaceHover,border:`1px solid ${z.border}`,borderRadius:4,cursor:"pointer",fontSize:12,padding:"2px 6px"},children:k.jsx(Of,{copied:t})}),k.jsx("pre",{style:{margin:0,padding:12,background:z.surface,border:`1px solid ${z.border}`,borderRadius:6,whiteSpace:"pre-wrap",fontSize:13,lineHeight:1.5,fontFamily:'Monaco, "Courier New", monospace',maxHeight:300,overflow:"auto"},children:e})]});const a=(l,s)=>k.jsxs("div",{style:{position:"relative"},className:"copyable-block",children:[k.jsx("style",{children:`.copyable-block .copy-btn { opacity: 0; transition: opacity ${Pt.fast}; }
|
|
57
|
+
.copyable-block:hover .copy-btn { opacity: 1; }`}),k.jsx("button",{className:"copy-btn",onClick:r,style:{position:"absolute",top:8,right:8,background:z.surfaceHover,border:`1px solid ${z.border}`,borderRadius:4,cursor:"pointer",padding:"4px 6px",zIndex:2,display:"flex",alignItems:"center",justifyContent:"center"},children:k.jsx(Of,{copied:t})}),k.jsx("div",{style:{maxHeight:300,overflow:"auto",border:`1px solid ${z.border}`,borderRadius:6},children:k.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,fontFamily:'Monaco, "Courier New", monospace'},children:[k.jsx("thead",{children:k.jsx("tr",{children:l.map(c=>k.jsx("th",{style:GP,children:c},c))})}),k.jsx("tbody",{children:s.map((c,h)=>k.jsx("tr",{style:{background:h%2===0?z.surface:z.surfaceHover},children:l.map(d=>{const v=FP(c[d]);return k.jsx("td",{title:v.text,style:{...AR,textAlign:v.isNumber?"right":"left",color:v.isNull?z.textTertiary:z.textPrimary,fontStyle:v.isNull?"italic":"normal"},children:v.text},d)})},h))})]})})]});if(i.type==="table")return a(i.columns,i.rows);const o=i.entries.map(([l,s])=>({key:l,value:s}));return a(["key","value"],o)}function YP(){return k.jsx("svg",{width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",children:k.jsx("path",{d:"M8 2L14 8L8 14L2 8Z",fill:"#FF8C42",opacity:"0.5",stroke:"#00695C",strokeWidth:"1.5",strokeLinejoin:"round",strokeLinecap:"round"})})}function WP(){return k.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 18",fill:"none",stroke:"#FF8C42",strokeWidth:"1.3",strokeLinecap:"round",children:[k.jsx("circle",{cx:"12",cy:"2",r:"1.2",fill:"#FF8C42"}),k.jsx("line",{x1:"12",y1:"3.2",x2:"12",y2:"6"}),k.jsx("line",{x1:"12",y1:"6",x2:"6",y2:"9"}),k.jsx("line",{x1:"12",y1:"6",x2:"18",y2:"9"}),k.jsx("circle",{cx:"6",cy:"9",r:"1.2",fill:"#FF8C42"}),k.jsx("circle",{cx:"18",cy:"9",r:"1.2",fill:"#FF8C42"}),k.jsx("line",{x1:"6",y1:"10.2",x2:"3",y2:"13.5"}),k.jsx("line",{x1:"6",y1:"10.2",x2:"9",y2:"13.5"}),k.jsx("line",{x1:"18",y1:"10.2",x2:"15",y2:"13.5"}),k.jsx("line",{x1:"18",y1:"10.2",x2:"21",y2:"13.5"}),k.jsx("circle",{cx:"3",cy:"15",r:"1.2",fill:"#FF8C42"}),k.jsx("circle",{cx:"9",cy:"15",r:"1.2",fill:"#FF8C42"}),k.jsx("circle",{cx:"15",cy:"15",r:"1.2",fill:"#FF8C42"}),k.jsx("circle",{cx:"21",cy:"15",r:"1.2",fill:"#FF8C42"})]})}function qP(){return k.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",children:[k.jsx("circle",{cx:"6.5",cy:"6.5",r:"5",fill:"#00695C",opacity:"0.5",stroke:"#00695C",strokeWidth:"0.1"}),k.jsx("circle",{cx:"6.5",cy:"6.5",r:"3.5",fill:"#f9b78e",opacity:"1"}),k.jsx("line",{x1:"10.5",y1:"10.5",x2:"14",y2:"14",stroke:"#00695C",strokeWidth:"2",strokeLinecap:"round"})]})}function XP(){return k.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",children:[k.jsx("rect",{x:"2",y:"2",width:"12",height:"12",rx:"1.5",fill:"#00695C",stroke:"#00695C",strokeWidth:"1.5"}),k.jsx("line",{x1:"2",y1:"7",x2:"14",y2:"7",stroke:"#E0F2F1",strokeWidth:"1.3"}),k.jsx("circle",{cx:"4.5",cy:"4.5",r:"0.8",fill:"#E0F2F1"}),k.jsx("circle",{cx:"7.5",cy:"4.5",r:"0.8",fill:"#E0F2F1"}),k.jsx("circle",{cx:"10.5",cy:"4.5",r:"0.8",fill:"#E0F2F1"}),k.jsx("circle",{cx:"4.5",cy:"10.5",r:"0.8",fill:"#E0F2F1"}),k.jsx("circle",{cx:"7.5",cy:"10.5",r:"0.8",fill:"#E0F2F1"}),k.jsx("circle",{cx:"10.5",cy:"10.5",r:"0.8",fill:"#E0F2F1"})]})}const DR={execute_query:"svg",get_schema:"svg",get_datasources:"svg",get_project_info:"svg",render_chart:"svg",pg_explain_query:"/PostgreSQL.png",pg_top_queries:"/PostgreSQL.png",pg_db_health:"/PostgreSQL.png",mongo_explain:"/Mongodb.png",mongo_count:"/Mongodb.png",mongo_stats:"/Mongodb.png",mongo_list_indexes:"/Mongodb.png"};function ZP(e){const t=e.replace("mcp__analitoly__",""),n=DR[t]??"⚙";return n.startsWith("/")||n==="svg"?null:n}function xM(e){const t=e.replace("mcp__analitoly__","");return t==="execute_query"?k.jsx(YP,{}):t==="get_schema"?k.jsx(WP,{}):t==="get_datasources"?k.jsx(XP,{}):t==="get_project_info"?k.jsx(qP,{}):null}function bM(e){const t=e.replace("mcp__analitoly__",""),n=DR[t];return n!=null&&n.startsWith("/")?n:null}const $P=e=>e.replace("mcp__analitoly__","").replace(/_/g," "),QP={pending:"transparent",success:z.teal,error:z.error},KP=`
|
|
58
|
+
@keyframes pulse-dot {
|
|
59
|
+
0%, 100% { opacity: 1; }
|
|
60
|
+
50% { opacity: 0.3; }
|
|
61
|
+
}`;function JP({meta:e}){const[t,n]=at.useState(!1),r=e.status==="pending";return k.jsxs("div",{style:{background:z.surfaceHover,border:`1px solid ${z.border}`,borderLeft:`3px solid ${QP[e.status]}`,borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:13,fontFamily:'Monaco, "Courier New", monospace',transition:Pt.normal},children:[r&&k.jsx("style",{children:KP}),k.jsxs("div",{role:r?void 0:"button",tabIndex:r?void 0:0,onClick:()=>!r&&n(!t),onKeyDown:i=>{!r&&(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),n(!t))},style:{cursor:r?"default":"pointer",display:"flex",alignItems:"center",gap:6},children:[!r&&k.jsx("svg",{width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",style:{transition:Pt.normal,transform:t?"rotate(-90deg)":"none"},children:k.jsx("path",{d:"M10 3L5 8L10 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),r&&k.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:z.orange,animation:"pulse-dot 1.2s ease-in-out infinite"}}),bM(e.tool)?k.jsx("img",{src:bM(e.tool),alt:"",style:{width:18,height:18,objectFit:"contain"}}):xM(e.tool)?xM(e.tool):k.jsx("span",{style:{fontSize:14},children:ZP(e.tool)}),k.jsx("span",{style:{fontWeight:600,color:z.teal,fontSize:13},children:$P(e.tool)}),r&&k.jsx("span",{style:{color:z.textTertiary,fontStyle:"italic",fontSize:12},children:"Выполняется..."})]}),!r&&t&&k.jsxs("div",{style:{marginTop:8},children:[e.query&&k.jsxs("div",{style:{marginBottom:8},children:[k.jsx("div",{style:{color:z.textTertiary,fontSize:11,marginBottom:4,fontWeight:500,letterSpacing:.5},children:"QUERY"}),k.jsx(CR,{query:e.query,tool:e.tool})]}),e.result&&k.jsxs("div",{children:[k.jsx("div",{style:{color:z.textTertiary,fontSize:11,marginBottom:4,fontWeight:500,letterSpacing:.5},children:"RESULT"}),k.jsx(UP,{result:e.result})]})]})]})}/*! *****************************************************************************
|
|
62
|
+
Copyright (c) Microsoft Corporation.
|
|
63
|
+
|
|
64
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
65
|
+
purpose with or without fee is hereby granted.
|
|
66
|
+
|
|
67
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
68
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
69
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
70
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
71
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
72
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
73
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
74
|
+
***************************************************************************** */var bx=function(e,t){return bx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},bx(e,t)};function ot(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");bx(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var tH=(function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e})(),eH=(function(){function e(){this.browser=new tH,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return e})(),Gt=new eH;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Gt.wxa=!0,Gt.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Gt.worker=!0:!Gt.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Gt.node=!0,Gt.svgSupported=!0):nH(navigator.userAgent,Gt);function nH(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(".")[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11);var l=t.domSupported=typeof document<"u";if(l){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var h_=12,rH="sans-serif",Eo=h_+"px "+rH,iH=20,aH=100,oH="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function lH(e){var t={};if(typeof JSON>"u")return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32),i=(e.charCodeAt(n)-iH)/aH;t[r]=i}return t}var sH=lH(oH),mi={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var e,t;return function(n,r){if(!e){var i=mi.createCanvas();e=i&&i.getContext("2d")}if(e)return t!==r&&(t=e.font=r||Eo),e.measureText(n);n=n||"",r=r||Eo;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||h_,l=0;if(r.indexOf("mono")>=0)l=o*n.length;else for(var s=0;s<n.length;s++){var c=sH[n[s]];l+=c==null?o:c*o}return{width:l}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}},kR=Ro(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),LR=Ro(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),Mh=Object.prototype.toString,mg=Array.prototype,uH=mg.forEach,cH=mg.filter,d_=mg.slice,fH=mg.map,_M=(function(){}).constructor,iv=_M?_M.prototype:null,v_="__proto__",hH=2311;function ER(){return hH++}function p_(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<"u"&&console.error.apply(console,e)}function It(e){if(e==null||typeof e!="object")return e;var t=e,n=Mh.call(e);if(n==="[object Array]"){if(!zf(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=It(e[r])}}else if(LR[n]){if(!zf(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!kR[n]&&!zf(e)&&!Ru(e)){t={};for(var o in e)e.hasOwnProperty(o)&&o!==v_&&(t[o]=It(e[o]))}return t}function qt(e,t,n){if(!Lt(t)||!Lt(e))return n?It(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==v_){var i=e[r],a=t[r];Lt(a)&&Lt(i)&&!mt(a)&&!mt(i)&&!Ru(a)&&!Ru(i)&&!SM(a)&&!SM(i)&&!zf(a)&&!zf(i)?qt(i,a,n):(n||!(r in e))&&(e[r]=It(t[r]))}return e}function dt(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==v_&&(e[n]=t[n]);return e}function $t(e,t,n){for(var r=Be(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}function Wt(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function dH(e,t){var n=e.prototype;function r(){}r.prototype=t.prototype,e.prototype=new r;for(var i in n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function Xn(e,t,n){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!=="constructor"&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else $t(e,t,n)}function sr(e){return!e||typeof e=="string"?!1:typeof e.length=="number"}function P(e,t,n){if(e&&t)if(e.forEach&&e.forEach===uH)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}function bt(e,t,n){if(!e)return[];if(!t)return g_(e);if(e.map&&e.map===fH)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function Ro(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function Ze(e,t,n){if(!e)return[];if(!t)return g_(e);if(e.filter&&e.filter===cH)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function RR(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function Be(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function vH(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(d_.call(arguments)))}}var Ct=iv&&Rt(iv.bind)?iv.call.bind(iv.bind):vH;function Yt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(d_.call(arguments)))}}function mt(e){return Array.isArray?Array.isArray(e):Mh.call(e)==="[object Array]"}function Rt(e){return typeof e=="function"}function St(e){return typeof e=="string"}function _x(e){return Mh.call(e)==="[object String]"}function ve(e){return typeof e=="number"}function Lt(e){var t=typeof e;return t==="function"||!!e&&t==="object"}function SM(e){return!!kR[Mh.call(e)]}function ur(e){return!!LR[Mh.call(e)]}function Ru(e){return typeof e=="object"&&typeof e.nodeType=="number"&&typeof e.ownerDocument=="object"}function yg(e){return e.colorStops!=null}function pH(e){return e.image!=null}function To(e){return e!==e}function Io(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(e[n]!=null)return e[n]}function zt(e,t){return e??t}function Co(e,t,n){return e??t??n}function g_(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return d_.apply(e,t)}function xg(e){if(typeof e=="number")return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function $r(e,t){if(!e)throw new Error(t)}function Bi(e){return e==null?null:typeof e.trim=="function"?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var IR="__ec_primitive__";function _p(e){e[IR]=!0}function zf(e){return e[IR]}var gH=(function(){function e(){this.data={}}return e.prototype.delete=function(t){var n=this.has(t);return n&&delete this.data[t],n},e.prototype.has=function(t){return this.data.hasOwnProperty(t)},e.prototype.get=function(t){return this.data[t]},e.prototype.set=function(t,n){return this.data[t]=n,this},e.prototype.keys=function(){return Be(this.data)},e.prototype.forEach=function(t){var n=this.data;for(var r in n)n.hasOwnProperty(r)&&t(n[r],r)},e})(),OR=typeof Map=="function";function mH(){return OR?new Map:new gH}var yH=(function(){function e(t){var n=mt(t);this.data=mH();var r=this;t instanceof e?t.each(i):t&&P(t,i);function i(a,o){n?r.set(a,o):r.set(o,a)}}return e.prototype.hasKey=function(t){return this.data.has(t)},e.prototype.get=function(t){return this.data.get(t)},e.prototype.set=function(t,n){return this.data.set(t,n),n},e.prototype.each=function(t,n){this.data.forEach(function(r,i){t.call(n,r,i)})},e.prototype.keys=function(){var t=this.data.keys();return OR?Array.from(t):t},e.prototype.removeKey=function(t){this.data.delete(t)},e})();function Bt(e){return new yH(e)}function zR(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function bg(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&dt(n,t),n}function BR(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function hi(e,t){return e.hasOwnProperty(t)}function Cn(){}var xH=180/Math.PI;function Gu(e,t){return e==null&&(e=0),t==null&&(t=0),[e,t]}function bH(e,t){return e[0]=t[0],e[1]=t[1],e}function _H(e){return[e[0],e[1]]}function wM(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function SH(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function wH(e){return Math.sqrt(TH(e))}function TH(e){return e[0]*e[0]+e[1]*e[1]}function g0(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function CH(e,t){var n=wH(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Sx(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Tx=Sx;function MH(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Au=MH;function m0(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function Un(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function bu(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function _u(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Ws=(function(){function e(t,n){this.target=t,this.topTarget=n&&n.topTarget}return e})(),AH=(function(){function e(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(t){for(var n=t.target;n&&!n.draggable;)n=n.parent||n.__hostTarget;n&&(this._draggingTarget=n,n.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Ws(n,t),"dragstart",t.event))},e.prototype._drag=function(t){var n=this._draggingTarget;if(n){var r=t.offsetX,i=t.offsetY,a=r-this._x,o=i-this._y;this._x=r,this._y=i,n.drift(a,o,t),this.handler.dispatchToElement(new Ws(n,t),"drag",t.event);var l=this.handler.findHover(r,i,n).target,s=this._dropTarget;this._dropTarget=l,n!==l&&(s&&l!==s&&this.handler.dispatchToElement(new Ws(s,t),"dragleave",t.event),l&&l!==s&&this.handler.dispatchToElement(new Ws(l,t),"dragenter",t.event))}},e.prototype._dragEnd=function(t){var n=this._draggingTarget;n&&(n.dragging=!1),this.handler.dispatchToElement(new Ws(n,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Ws(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},e})(),Kr=(function(){function e(t){t&&(this._$eventProcessor=t)}return e.prototype.on=function(t,n,r,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof n=="function"&&(i=r,r=n,n=null),!r||!t)return this;var o=this._$eventProcessor;n!=null&&o&&o.normalizeQuery&&(n=o.normalizeQuery(n)),a[t]||(a[t]=[]);for(var l=0;l<a[t].length;l++)if(a[t][l].h===r)return this;var s={h:r,query:n,ctx:i||this,callAtLast:r.zrEventfulCallAtLast},c=a[t].length-1,h=a[t][c];return h&&h.callAtLast?a[t].splice(c,0,s):a[t].push(s),this},e.prototype.isSilent=function(t){var n=this._$handlers;return!n||!n[t]||!n[t].length},e.prototype.off=function(t,n){var r=this._$handlers;if(!r)return this;if(!t)return this._$handlers={},this;if(n){if(r[t]){for(var i=[],a=0,o=r[t].length;a<o;a++)r[t][a].h!==n&&i.push(r[t][a]);r[t]=i}r[t]&&r[t].length===0&&delete r[t]}else delete r[t];return this},e.prototype.trigger=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(!this._$handlers)return this;var i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=n.length,l=i.length,s=0;s<l;s++){var c=i[s];if(!(a&&a.filter&&c.query!=null&&!a.filter(t,c.query)))switch(o){case 0:c.h.call(c.ctx);break;case 1:c.h.call(c.ctx,n[0]);break;case 2:c.h.call(c.ctx,n[0],n[1]);break;default:c.h.apply(c.ctx,n);break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},e.prototype.triggerWithContext=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(!this._$handlers)return this;var i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=n.length,l=n[o-1],s=i.length,c=0;c<s;c++){var h=i[c];if(!(a&&a.filter&&h.query!=null&&!a.filter(t,h.query)))switch(o){case 0:h.h.call(l);break;case 1:h.h.call(l,n[0]);break;case 2:h.h.call(l,n[0],n[1]);break;default:h.h.apply(l,n.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},e})(),DH=Math.log(2);function Cx(e,t,n,r,i,a){var o=r+"-"+i,l=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var s=Math.round(Math.log((1<<l)-1&~i)/DH);return e[n][s]}for(var c=r|1<<n,h=n+1;r&1<<h;)h++;for(var d=0,v=0,g=0;v<l;v++){var m=1<<v;m&i||(d+=(g%2?-1:1)*e[n][v]*Cx(e,t-1,h,c,i|m,a),g++)}return a[o]=d,d}function TM(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=Cx(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var l=0;l<8;l++)a[l]==null&&(a[l]=0),a[l]+=((o+l)%2?-1:1)*Cx(n,7,o===0?1:0,1<<o,1<<l,r)/i*t[o];return function(s,c,h){var d=c*a[6]+h*a[7]+1;s[0]=(c*a[0]+h*a[1]+a[2])/d,s[1]=(c*a[3]+h*a[4]+a[5])/d}}}var Sp="___zrEVENTSAVED",y0=[];function kH(e,t,n,r,i){return Mx(y0,t,r,i,!0)&&Mx(e,n,y0[0],y0[1])}function LH(e,t){e&&n(e),t&&n(t);function n(r){var i=r[Sp];i&&(i.clearMarkers&&i.clearMarkers(),delete r[Sp])}}function Mx(e,t,n,r,i){if(t.getBoundingClientRect&&Gt.domSupported&&!NR(t)){var a=t[Sp]||(t[Sp]={}),o=EH(t,a),l=RH(o,a,i);if(l)return l(e,n,r),!0}return!1}function EH(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),l=o.style,s=a%2,c=(a>>1)%2;l.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",i[c]+":0",r[1-s]+":auto",i[1-c]+":auto",""].join("!important;"),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){P(n,function(h){h.parentNode&&h.parentNode.removeChild(h)})},n}function RH(e,t,n){for(var r=n?"invTrans":"trans",i=t[r],a=t.srcCoords,o=[],l=[],s=!0,c=0;c<4;c++){var h=e[c].getBoundingClientRect(),d=2*c,v=h.left,g=h.top;o.push(v,g),s=s&&a&&v===a[d]&&g===a[d+1],l.push(e[c].offsetLeft,e[c].offsetTop)}return s&&i?i:(t.srcCoords=o,t[r]=n?TM(l,o):TM(o,l))}function NR(e){return e.nodeName.toUpperCase()==="CANVAS"}var IH=/([&<>"'])/g,OH={"&":"&","<":"<",">":">",'"':""","'":"'"};function ar(e){return e==null?"":(e+"").replace(IH,function(t,n){return OH[n]})}var zH=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,x0=[],BH=Gt.browser.firefox&&+Gt.browser.version.split(".")[0]<39;function Ax(e,t,n,r){return n=n||{},r?CM(e,t,n):BH&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX!=null?(n.zrX=t.offsetX,n.zrY=t.offsetY):CM(e,t,n),n}function CM(e,t,n){if(Gt.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(NR(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}else if(Mx(x0,e,r,i)){n.zrX=x0[0],n.zrY=x0[1];return}}n.zrX=n.zrY=0}function m_(e){return e||window.event}function Vr(e,t,n){if(t=m_(t),t.zrX!=null)return t;var r=t.type,i=r&&r.indexOf("touch")>=0;if(i){var o=r!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Ax(e,o,t,n)}else{Ax(e,t,t,n);var a=NH(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var l=t.button;return t.which==null&&l!==void 0&&zH.test(t.type)&&(t.which=l&1?1:l&2?3:l&4?2:0),t}function NH(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r!==0?r:n),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function Dx(e,t,n,r){e.addEventListener(t,n,r)}function PH(e,t,n,r){e.removeEventListener(t,n,r)}var Aa=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function MM(e){return e.which===2||e.which===3}var HH=(function(){function e(){this._track=[]}return e.prototype.recognize=function(t,n,r){return this._doTrack(t,n,r),this._recognize(t)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(t,n,r){var i=t.touches;if(i){for(var a={points:[],touches:[],target:n,event:t},o=0,l=i.length;o<l;o++){var s=i[o],c=Ax(r,s,{});a.points.push([c.zrX,c.zrY]),a.touches.push(s)}this._track.push(a)}},e.prototype._recognize=function(t){for(var n in b0)if(b0.hasOwnProperty(n)){var r=b0[n](this._track,t);if(r)return r}},e})();function AM(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function VH(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var b0={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=AM(r)/AM(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=VH(r);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function di(){return[1,0,0,1,0,0]}function y_(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function x_(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Bf(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],l=t[0]*n[4]+t[2]*n[5]+t[4],s=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=l,e[5]=s,e}function Kf(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function b_(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],l=t[1],s=t[3],c=t[5],h=Math.sin(n),d=Math.cos(n);return e[0]=i*d+l*h,e[1]=-i*h+l*d,e[2]=a*d+s*h,e[3]=-a*h+d*s,e[4]=d*(o-r[0])+h*(c-r[1])+r[0],e[5]=d*(c-r[1])-h*(o-r[0])+r[1],e}function PR(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function Uu(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],l=t[5],s=n*o-a*r;return s?(s=1/s,e[0]=o*s,e[1]=-a*s,e[2]=-r*s,e[3]=n*s,e[4]=(r*l-o*i)*s,e[5]=(a*i-n*l)*s,e):null}var Ft=(function(){function e(t,n){this.x=t||0,this.y=n||0}return e.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(t,n){return this.x=t,this.y=n,this},e.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},e.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},e.prototype.scale=function(t){this.x*=t,this.y*=t},e.prototype.scaleAndAdd=function(t,n){this.x+=t.x*n,this.y+=t.y*n},e.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},e.prototype.dot=function(t){return this.x*t.x+this.y*t.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},e.prototype.distance=function(t){var n=this.x-t.x,r=this.y-t.y;return Math.sqrt(n*n+r*r)},e.prototype.distanceSquare=function(t){var n=this.x-t.x,r=this.y-t.y;return n*n+r*r},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(t){if(t){var n=this.x,r=this.y;return this.x=t[0]*n+t[2]*r+t[4],this.y=t[1]*n+t[3]*r+t[5],this}},e.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},e.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},e.set=function(t,n,r){t.x=n,t.y=r},e.copy=function(t,n){t.x=n.x,t.y=n.y},e.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.lenSquare=function(t){return t.x*t.x+t.y*t.y},e.dot=function(t,n){return t.x*n.x+t.y*n.y},e.add=function(t,n,r){t.x=n.x+r.x,t.y=n.y+r.y},e.sub=function(t,n,r){t.x=n.x-r.x,t.y=n.y-r.y},e.scale=function(t,n,r){t.x=n.x*r,t.y=n.y*r},e.scaleAndAdd=function(t,n,r,i){t.x=n.x+r.x*i,t.y=n.y+r.y*i},e.lerp=function(t,n,r,i){var a=1-i;t.x=a*n.x+i*r.x,t.y=a*n.y+i*r.y},e})(),Ol=Math.min,Su=Math.max,kx=Math.abs,DM=["x","y"],jH=["width","height"],al=new Ft,ol=new Ft,ll=new Ft,sl=new Ft,_r=HR(),Mf=_r.minTv,Lx=_r.maxTv,Nf=[0,0],Vt=(function(){function e(t,n,r,i){e.set(this,t,n,r,i)}return e.set=function(t,n,r,i,a){return i<0&&(n=n+i,i=-i),a<0&&(r=r+a,a=-a),t.x=n,t.y=r,t.width=i,t.height=a,t},e.prototype.union=function(t){var n=Ol(t.x,this.x),r=Ol(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Su(t.x+t.width,this.x+this.width)-n:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Su(t.y+t.height,this.y+this.height)-r:this.height=t.height,this.x=n,this.y=r},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(t){var n=this,r=t.width/n.width,i=t.height/n.height,a=di();return Kf(a,a,[-n.x,-n.y]),PR(a,a,[r,i]),Kf(a,a,[t.x,t.y]),a},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&Ft.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=e.set(FH,t.x,t.y,t.width,t.height)),n instanceof e||(n=e.set(GH,n.x,n.y,n.width,n.height));var l=!!r;_r.reset(i,l);var s=_r.touchThreshold,c=t.x+s,h=t.x+t.width-s,d=t.y+s,v=t.y+t.height-s,g=n.x+s,m=n.x+n.width-s,x=n.y+s,_=n.y+n.height-s;if(c>h||d>v||g>m||x>_)return!1;var b=!(h<g||m<c||v<x||_<d);return(l||a)&&(Nf[0]=1/0,Nf[1]=0,kM(c,h,g,m,0,l,a,o),kM(d,v,x,_,1,l,a,o),l&&Ft.copy(r,b?_r.useDir?_r.dirMinTv:Mf:Lx)),b},e.contain=function(t,n,r){return n>=t.x&&n<=t.x+t.width&&r>=t.y&&r<=t.y+t.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(t,n){return t.x=n.x,t.y=n.y,t.width=n.width,t.height=n.height,t},e.applyTransform=function(t,n,r){if(!r){t!==n&&e.copy(t,n);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],a=r[3],o=r[4],l=r[5];t.x=n.x*i+o,t.y=n.y*a+l,t.width=n.width*i,t.height=n.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}al.x=ll.x=n.x,al.y=sl.y=n.y,ol.x=sl.x=n.x+n.width,ol.y=ll.y=n.y+n.height,al.transform(r),sl.transform(r),ol.transform(r),ll.transform(r),t.x=Ol(al.x,ol.x,ll.x,sl.x),t.y=Ol(al.y,ol.y,ll.y,sl.y);var s=Su(al.x,ol.x,ll.x,sl.x),c=Su(al.y,ol.y,ll.y,sl.y);t.width=s-t.x,t.height=c-t.y},e})(),FH=new Vt(0,0,0,0),GH=new Vt(0,0,0,0);function kM(e,t,n,r,i,a,o,l){var s=kx(t-n),c=kx(r-e),h=Ol(s,c),d=DM[i],v=DM[1-i],g=jH[i];t<n||r<e?s<c?(a&&(Lx[d]=-s),l&&(o[d]=t,o[g]=0)):(a&&(Lx[d]=c),l&&(o[d]=e,o[g]=0)):(o&&(o[d]=Su(e,n),o[g]=Ol(t,r)-o[d]),a&&(h<Nf[0]||_r.useDir)&&(Nf[0]=Ol(h,Nf[0]),(s<c||!_r.bidirectional)&&(Mf[d]=s,Mf[v]=0,_r.useDir&&_r.calcDirMTV()),(s>=c||!_r.bidirectional)&&(Mf[d]=-c,Mf[v]=0,_r.useDir&&_r.calcDirMTV())))}function HR(){var e=0,t=new Ft,n=new Ft,r={minTv:new Ft,maxTv:new Ft,useDir:!1,dirMinTv:new Ft,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){r.touchThreshold=0,a&&a.touchThreshold!=null&&(r.touchThreshold=Su(0,a.touchThreshold)),r.negativeSize=!1,o&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,a&&a.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=a.direction,r.bidirectional=a.bidirectional==null||!!a.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,l=a.y*a.y+a.x*a.x,s=Math.sin(e),c=Math.cos(e),h=s*a.y+c*a.x;if(i(h)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=l*c/h,n.y=l*s/h,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n)}};function i(a){return kx(a)<1e-10}return r}var VR="silent";function UH(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:YH}}function YH(){Aa(this.event)}var WH=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.handler=null,n}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t})(Kr),qc=(function(){function e(t,n){this.x=t,this.y=n}return e})(),qH=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],_0=new Vt(0,0,0,0),jR=(function(e){ot(t,e);function t(n,r,i,a,o){var l=e.call(this)||this;return l._hovered=new qc(0,0),l.storage=n,l.painter=r,l.painterRoot=a,l._pointerSize=o,i=i||new WH,l.proxy=null,l.setHandlerProxy(i),l._draggingMgr=new AH(l),l}return t.prototype.setHandlerProxy=function(n){this.proxy&&this.proxy.dispose(),n&&(P(qH,function(r){n.on&&n.on(r,this[r],this)},this),n.handler=this),this.proxy=n},t.prototype.mousemove=function(n){var r=n.zrX,i=n.zrY,a=FR(this,r,i),o=this._hovered,l=o.target;l&&!l.__zr&&(o=this.findHover(o.x,o.y),l=o.target);var s=this._hovered=a?new qc(r,i):this.findHover(r,i),c=s.target,h=this.proxy;h.setCursor&&h.setCursor(c?c.cursor:"default"),l&&c!==l&&this.dispatchToElement(o,"mouseout",n),this.dispatchToElement(s,"mousemove",n),c&&c!==l&&this.dispatchToElement(s,"mouseover",n)},t.prototype.mouseout=function(n){var r=n.zrEventControl;r!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",n),r!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:n})},t.prototype.resize=function(){this._hovered=new qc(0,0)},t.prototype.dispatch=function(n,r){var i=this[n];i&&i.call(this,r)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(n){var r=this.proxy;r.setCursor&&r.setCursor(n)},t.prototype.dispatchToElement=function(n,r,i){n=n||{};var a=n.target;if(!(a&&a.silent)){for(var o="on"+r,l=UH(r,n,i);a&&(a[o]&&(l.cancelBubble=!!a[o].call(a,l)),a.trigger(r,l),a=a.__hostTarget?a.__hostTarget:a.parent,!l.cancelBubble););l.cancelBubble||(this.trigger(r,l),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(s){typeof s[o]=="function"&&s[o].call(s,l),s.trigger&&s.trigger(r,l)}))}},t.prototype.findHover=function(n,r,i){var a=this.storage.getDisplayList(),o=new qc(n,r);if(LM(a,o,n,r,i),this._pointerSize&&!o.target){for(var l=[],s=this._pointerSize,c=s/2,h=new Vt(n-c,r-c,s,s),d=a.length-1;d>=0;d--){var v=a[d];v!==i&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(_0.copy(v.getBoundingRect()),v.transform&&_0.applyTransform(v.transform),_0.intersect(h)&&l.push(v))}if(l.length)for(var g=4,m=Math.PI/12,x=Math.PI*2,_=0;_<c;_+=g)for(var b=0;b<x;b+=m){var S=n+_*Math.cos(b),w=r+_*Math.sin(b);if(LM(l,o,S,w,i),o.target)return o}}return o},t.prototype.processGesture=function(n,r){this._gestureMgr||(this._gestureMgr=new HH);var i=this._gestureMgr;r==="start"&&i.clear();var a=i.recognize(n,this.findHover(n.zrX,n.zrY,null).target,this.proxy.dom);if(r==="end"&&i.clear(),a){var o=a.type;n.gestureEvent=o;var l=new qc;l.target=a.target,this.dispatchToElement(l,o,a.event)}},t})(Kr);P(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){jR.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=FR(this,n,r),a,o;if((e!=="mouseup"||!i)&&(a=this.findHover(n,r),o=a.target),e==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e==="mouseup")this._upEl=o;else if(e==="click"){if(this._downEl!==this._upEl||!this._downPoint||Tx(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function XH(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var l=r.__hostTarget;r=l?r.ignoreHostSilent?null:l:r.parent}return i?VR:!0}return!1}function LM(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],l=void 0;if(o!==i&&!o.ignore&&(l=XH(o,n,r))&&(!t.topTarget&&(t.topTarget=o),l!==VR)){t.target=o;break}}}function FR(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var GR=32,Xc=7;function ZH(e){for(var t=0;e>=GR;)t|=e&1,e>>=1;return e+t}function EM(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;$H(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function $H(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function RM(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,l=r,s;o<l;)s=o+l>>>1,i(a,e[s])<0?l=s:o=s+1;var c=r-o;switch(c){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;c>0;)e[o+c]=e[o+c-1],c--}e[o]=a}}function S0(e,t,n,r,i,a){var o=0,l=0,s=1;if(a(e,t[n+i])>0){for(l=r-i;s<l&&a(e,t[n+i+s])>0;)o=s,s=(s<<1)+1,s<=0&&(s=l);s>l&&(s=l),o+=i,s+=i}else{for(l=i+1;s<l&&a(e,t[n+i-s])<=0;)o=s,s=(s<<1)+1,s<=0&&(s=l);s>l&&(s=l);var c=o;o=i-s,s=i-c}for(o++;o<s;){var h=o+(s-o>>>1);a(e,t[n+h])>0?o=h+1:s=h}return s}function w0(e,t,n,r,i,a){var o=0,l=0,s=1;if(a(e,t[n+i])<0){for(l=i+1;s<l&&a(e,t[n+i-s])<0;)o=s,s=(s<<1)+1,s<=0&&(s=l);s>l&&(s=l);var c=o;o=i-s,s=i-c}else{for(l=r-i;s<l&&a(e,t[n+i+s])>=0;)o=s,s=(s<<1)+1,s<=0&&(s=l);s>l&&(s=l),o+=i,s+=i}for(o++;o<s;){var h=o+(s-o>>>1);a(e,t[n+h])<0?s=h:o=h+1}return s}function QH(e,t){var n=Xc,r,i,a=0,o=[];r=[],i=[];function l(g,m){r[a]=g,i[a]=m,a+=1}function s(){for(;a>1;){var g=a-2;if(g>=1&&i[g-1]<=i[g]+i[g+1]||g>=2&&i[g-2]<=i[g]+i[g-1])i[g-1]<i[g+1]&&g--;else if(i[g]>i[g+1])break;h(g)}}function c(){for(;a>1;){var g=a-2;g>0&&i[g-1]<i[g+1]&&g--,h(g)}}function h(g){var m=r[g],x=i[g],_=r[g+1],b=i[g+1];i[g]=x+b,g===a-3&&(r[g+1]=r[g+2],i[g+1]=i[g+2]),a--;var S=w0(e[_],e,m,x,0,t);m+=S,x-=S,x!==0&&(b=S0(e[m+x-1],e,_,b,b-1,t),b!==0&&(x<=b?d(m,x,_,b):v(m,x,_,b)))}function d(g,m,x,_){var b=0;for(b=0;b<m;b++)o[b]=e[g+b];var S=0,w=x,A=g;if(e[A++]=e[w++],--_===0){for(b=0;b<m;b++)e[A+b]=o[S+b];return}if(m===1){for(b=0;b<_;b++)e[A+b]=e[w+b];e[A+_]=o[S];return}for(var D=n,M,L,I;;){M=0,L=0,I=!1;do if(t(e[w],o[S])<0){if(e[A++]=e[w++],L++,M=0,--_===0){I=!0;break}}else if(e[A++]=o[S++],M++,L=0,--m===1){I=!0;break}while((M|L)<D);if(I)break;do{if(M=w0(e[w],o,S,m,0,t),M!==0){for(b=0;b<M;b++)e[A+b]=o[S+b];if(A+=M,S+=M,m-=M,m<=1){I=!0;break}}if(e[A++]=e[w++],--_===0){I=!0;break}if(L=S0(o[S],e,w,_,0,t),L!==0){for(b=0;b<L;b++)e[A+b]=e[w+b];if(A+=L,w+=L,_-=L,_===0){I=!0;break}}if(e[A++]=o[S++],--m===1){I=!0;break}D--}while(M>=Xc||L>=Xc);if(I)break;D<0&&(D=0),D+=2}if(n=D,n<1&&(n=1),m===1){for(b=0;b<_;b++)e[A+b]=e[w+b];e[A+_]=o[S]}else{if(m===0)throw new Error;for(b=0;b<m;b++)e[A+b]=o[S+b]}}function v(g,m,x,_){var b=0;for(b=0;b<_;b++)o[b]=e[x+b];var S=g+m-1,w=_-1,A=x+_-1,D=0,M=0;if(e[A--]=e[S--],--m===0){for(D=A-(_-1),b=0;b<_;b++)e[D+b]=o[b];return}if(_===1){for(A-=m,S-=m,M=A+1,D=S+1,b=m-1;b>=0;b--)e[M+b]=e[D+b];e[A]=o[w];return}for(var L=n;;){var I=0,N=0,E=!1;do if(t(o[w],e[S])<0){if(e[A--]=e[S--],I++,N=0,--m===0){E=!0;break}}else if(e[A--]=o[w--],N++,I=0,--_===1){E=!0;break}while((I|N)<L);if(E)break;do{if(I=m-w0(o[w],e,g,m,m-1,t),I!==0){for(A-=I,S-=I,m-=I,M=A+1,D=S+1,b=I-1;b>=0;b--)e[M+b]=e[D+b];if(m===0){E=!0;break}}if(e[A--]=o[w--],--_===1){E=!0;break}if(N=_-S0(e[S],o,0,_,_-1,t),N!==0){for(A-=N,w-=N,_-=N,M=A+1,D=w+1,b=0;b<N;b++)e[M+b]=o[D+b];if(_<=1){E=!0;break}}if(e[A--]=e[S--],--m===0){E=!0;break}L--}while(I>=Xc||N>=Xc);if(E)break;L<0&&(L=0),L+=2}if(n=L,n<1&&(n=1),_===1){for(A-=m,S-=m,M=A+1,D=S+1,b=m-1;b>=0;b--)e[M+b]=e[D+b];e[A]=o[w]}else{if(_===0)throw new Error;for(D=A-(_-1),b=0;b<_;b++)e[D+b]=o[b]}}return{mergeRuns:s,forceMergeRuns:c,pushRun:l}}function rp(e,t,n,r){n||(n=0),r||(r=e.length);var i=r-n;if(!(i<2)){var a=0;if(i<GR){a=EM(e,n,r,t),RM(e,n,r,n+a,t);return}var o=QH(e,t),l=ZH(i);do{if(a=EM(e,n,r,t),a<l){var s=i;s>l&&(s=l),RM(e,n,n+s,n+a,t),a=s}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var Sr=1,Af=2,mu=4,IM=!1;function T0(){IM||(IM=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function OM(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var KH=(function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=OM}return e.prototype.traverse=function(t,n){for(var r=0;r<this._roots.length;r++)this._roots[r].traverse(t,n)},e.prototype.getDisplayList=function(t,n){n=n||!1;var r=this._displayList;return(t||!r.length)&&this.updateDisplayList(n),r},e.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var n=this._roots,r=this._displayList,i=0,a=n.length;i<a;i++)this._updateAndAddDisplayable(n[i],null,t);r.length=this._displayListLen,rp(r,OM)},e.prototype._updateAndAddDisplayable=function(t,n,r){if(!(t.ignore&&!r)){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath(),a=n&&n.length,o=0,l=t.__clipPaths;if(!t.ignoreClip&&(a||i)){if(l||(l=t.__clipPaths=[]),a)for(var s=0;s<n.length;s++)l[o++]=n[s];for(var c=i,h=t;c;)c.parent=h,c.updateTransform(),l[o++]=c,h=c,c=c.getClipPath()}if(l&&(l.length=o),t.childrenRef){for(var d=t.childrenRef(),v=0;v<d.length;v++){var g=d[v];t.__dirty&&(g.__dirty|=Sr),this._updateAndAddDisplayable(g,l,r)}t.__dirty=0}else{var m=t;isNaN(m.z)&&(T0(),m.z=0),isNaN(m.z2)&&(T0(),m.z2=0),isNaN(m.zlevel)&&(T0(),m.zlevel=0),this._displayList[this._displayListLen++]=m}var x=t.getDecalElement&&t.getDecalElement();x&&this._updateAndAddDisplayable(x,l,r);var _=t.getTextGuideLine();_&&this._updateAndAddDisplayable(_,l,r);var b=t.getTextContent();b&&this._updateAndAddDisplayable(b,l,r)}},e.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},e.prototype.delRoot=function(t){if(t instanceof Array){for(var n=0,r=t.length;n<r;n++)this.delRoot(t[n]);return}var i=Wt(this._roots,t);i>=0&&this._roots.splice(i,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e})(),wp;wp=Gt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var Pf={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)):n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Pf.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Pf.bounceIn(e*2)*.5:Pf.bounceOut(e*2-1)*.5+.5}},av=Math.pow,Mo=Math.sqrt,Tp=1e-8,UR=1e-4,zM=Mo(3),ov=1/3,Oi=Gu(),Gr=Gu(),Du=Gu();function go(e){return e>-Tp&&e<Tp}function YR(e){return e>Tp||e<-Tp}function Tn(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function BM(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function Cp(e,t,n,r,i,a){var o=r+3*(t-n)-e,l=3*(n-t*2+e),s=3*(t-e),c=e-i,h=l*l-3*o*s,d=l*s-9*o*c,v=s*s-3*l*c,g=0;if(go(h)&&go(d))if(go(l))a[0]=0;else{var m=-s/l;m>=0&&m<=1&&(a[g++]=m)}else{var x=d*d-4*h*v;if(go(x)){var _=d/h,m=-l/o+_,b=-_/2;m>=0&&m<=1&&(a[g++]=m),b>=0&&b<=1&&(a[g++]=b)}else if(x>0){var S=Mo(x),w=h*l+1.5*o*(-d+S),A=h*l+1.5*o*(-d-S);w<0?w=-av(-w,ov):w=av(w,ov),A<0?A=-av(-A,ov):A=av(A,ov);var m=(-l-(w+A))/(3*o);m>=0&&m<=1&&(a[g++]=m)}else{var D=(2*h*l-3*o*d)/(2*Mo(h*h*h)),M=Math.acos(D)/3,L=Mo(h),I=Math.cos(M),m=(-l-2*L*I)/(3*o),b=(-l+L*(I+zM*Math.sin(M)))/(3*o),N=(-l+L*(I-zM*Math.sin(M)))/(3*o);m>=0&&m<=1&&(a[g++]=m),b>=0&&b<=1&&(a[g++]=b),N>=0&&N<=1&&(a[g++]=N)}}return g}function WR(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,l=3*t-3*e,s=0;if(go(o)){if(YR(a)){var c=-l/a;c>=0&&c<=1&&(i[s++]=c)}}else{var h=a*a-4*o*l;if(go(h))i[0]=-a/(2*o);else if(h>0){var d=Mo(h),c=(-a+d)/(2*o),v=(-a-d)/(2*o);c>=0&&c<=1&&(i[s++]=c),v>=0&&v<=1&&(i[s++]=v)}}return s}function Mp(e,t,n,r,i,a){var o=(t-e)*i+e,l=(n-t)*i+t,s=(r-n)*i+n,c=(l-o)*i+o,h=(s-l)*i+l,d=(h-c)*i+c;a[0]=e,a[1]=o,a[2]=c,a[3]=d,a[4]=d,a[5]=h,a[6]=s,a[7]=r}function JH(e,t,n,r,i,a,o,l,s,c,h){var d,v=.005,g=1/0,m,x,_,b;Oi[0]=s,Oi[1]=c;for(var S=0;S<1;S+=.05)Gr[0]=Tn(e,n,i,o,S),Gr[1]=Tn(t,r,a,l,S),_=Au(Oi,Gr),_<g&&(d=S,g=_);g=1/0;for(var w=0;w<32&&!(v<UR);w++)m=d-v,x=d+v,Gr[0]=Tn(e,n,i,o,m),Gr[1]=Tn(t,r,a,l,m),_=Au(Gr,Oi),m>=0&&_<g?(d=m,g=_):(Du[0]=Tn(e,n,i,o,x),Du[1]=Tn(t,r,a,l,x),b=Au(Du,Oi),x<=1&&b<g?(d=x,g=b):v*=.5);return Mo(g)}function t6(e,t,n,r,i,a,o,l,s){for(var c=e,h=t,d=0,v=1/s,g=1;g<=s;g++){var m=g*v,x=Tn(e,n,i,o,m),_=Tn(t,r,a,l,m),b=x-c,S=_-h;d+=Math.sqrt(b*b+S*S),c=x,h=_}return d}function or(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function NM(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function e6(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),l=e-r,s=0;if(go(a)){if(YR(o)){var c=-l/o;c>=0&&c<=1&&(i[s++]=c)}}else{var h=o*o-4*a*l;if(go(h)){var c=-o/(2*a);c>=0&&c<=1&&(i[s++]=c)}else if(h>0){var d=Mo(h),c=(-o+d)/(2*a),v=(-o-d)/(2*a);c>=0&&c<=1&&(i[s++]=c),v>=0&&v<=1&&(i[s++]=v)}}return s}function qR(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Ap(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,l=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=l,i[3]=l,i[4]=o,i[5]=n}function n6(e,t,n,r,i,a,o,l,s){var c,h=.005,d=1/0;Oi[0]=o,Oi[1]=l;for(var v=0;v<1;v+=.05){Gr[0]=or(e,n,i,v),Gr[1]=or(t,r,a,v);var g=Au(Oi,Gr);g<d&&(c=v,d=g)}d=1/0;for(var m=0;m<32&&!(h<UR);m++){var x=c-h,_=c+h;Gr[0]=or(e,n,i,x),Gr[1]=or(t,r,a,x);var g=Au(Gr,Oi);if(x>=0&&g<d)c=x,d=g;else{Du[0]=or(e,n,i,_),Du[1]=or(t,r,a,_);var b=Au(Du,Oi);_<=1&&b<d?(c=_,d=b):h*=.5}}return Mo(d)}function r6(e,t,n,r,i,a,o){for(var l=e,s=t,c=0,h=1/o,d=1;d<=o;d++){var v=d*h,g=or(e,n,i,v),m=or(t,r,a,v),x=g-l,_=m-s;c+=Math.sqrt(x*x+_*_),l=g,s=m}return c}var i6=/cubic-bezier\(([0-9,\.e ]+)\)/;function XR(e){var t=e&&i6.exec(e);if(t){var n=t[1].split(","),r=+Bi(n[0]),i=+Bi(n[1]),a=+Bi(n[2]),o=+Bi(n[3]);if(isNaN(r+i+a+o))return;var l=[];return function(s){return s<=0?0:s>=1?1:Cp(0,r,a,1,s,l)&&Tn(0,i,o,1,l[0])}}}var a6=(function(){function e(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Cn,this.ondestroy=t.ondestroy||Cn,this.onrestart=t.onrestart||Cn,t.easing&&this.setEasing(t.easing)}return e.prototype.step=function(t,n){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=n;return}var r=this._life,i=t-this._startTime-this._pausedTime,a=i/r;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,l=o?o(a):a;if(this.onframe(l),a===1)if(this.loop){var s=i%r;this._startTime=t-s,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Rt(t)?t:Pf[t]||XR(t)},e})(),ZR=(function(){function e(t){this.value=t}return e})(),o6=(function(){function e(){this._len=0}return e.prototype.insert=function(t){var n=new ZR(t);return this.insertEntry(n),n},e.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},e.prototype.remove=function(t){var n=t.prev,r=t.next;n?n.next=r:this.head=r,r?r.prev=n:this.tail=n,t.next=t.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e})(),Iu=(function(){function e(t){this._list=new o6,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,n){var r=this._list,i=this._map,a=null;if(i[t]==null){var o=r.len(),l=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=r.head;r.remove(s),delete i[s.key],a=s.value,this._lastRemovedEntry=s}l?l.value=n:l=new ZR(n),l.key=t,r.insertEntry(l),i[t]=l}return a},e.prototype.get=function(t){var n=this._map[t],r=this._list;if(n!=null)return n!==r.tail&&(r.remove(n),r.insertEntry(n)),n.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e})(),PM={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 vi(e){return e=Math.round(e),e<0?0:e>255?255:e}function l6(e){return e=Math.round(e),e<0?0:e>360?360:e}function Jf(e){return e<0?0:e>1?1:e}function C0(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?vi(parseFloat(t)/100*255):vi(parseInt(t,10))}function jl(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Jf(parseFloat(t)/100):Jf(parseFloat(t))}function M0(e,t,n){return n<0?n+=1:n>1&&(n-=1),n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function mo(e,t,n){return e+(t-e)*n}function Hr(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Ex(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var $R=new Iu(20),lv=null;function qs(e,t){lv&&Ex(lv,t),lv=$R.put(e,lv||t.slice())}function Xr(e,t){if(e){t=t||[];var n=$R.get(e);if(n)return Ex(t,n);e=e+"";var r=e.replace(/ /g,"").toLowerCase();if(r in PM)return Ex(t,PM[r]),qs(e,t),t;var i=r.length;if(r.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Hr(t,0,0,0,1);return}return Hr(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),qs(e,t),t}else if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Hr(t,0,0,0,1);return}return Hr(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),qs(e,t),t}return}var o=r.indexOf("("),l=r.indexOf(")");if(o!==-1&&l+1===i){var s=r.substr(0,o),c=r.substr(o+1,l-(o+1)).split(","),h=1;switch(s){case"rgba":if(c.length!==4)return c.length===3?Hr(t,+c[0],+c[1],+c[2],1):Hr(t,0,0,0,1);h=jl(c.pop());case"rgb":if(c.length>=3)return Hr(t,C0(c[0]),C0(c[1]),C0(c[2]),c.length===3?h:jl(c[3])),qs(e,t),t;Hr(t,0,0,0,1);return;case"hsla":if(c.length!==4){Hr(t,0,0,0,1);return}return c[3]=jl(c[3]),Rx(c,t),qs(e,t),t;case"hsl":if(c.length!==3){Hr(t,0,0,0,1);return}return Rx(c,t),qs(e,t),t;default:return}}Hr(t,0,0,0,1)}}function Rx(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=jl(e[1]),i=jl(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t=t||[],Hr(t,vi(M0(o,a,n+1/3)*255),vi(M0(o,a,n)*255),vi(M0(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function s6(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,l=(a+i)/2,s,c;if(o===0)s=0,c=0;else{l<.5?c=o/(a+i):c=o/(2-a-i);var h=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,v=((a-r)/6+o/2)/o;t===a?s=v-d:n===a?s=1/3+h-v:r===a&&(s=2/3+d-h),s<0&&(s+=1),s>1&&(s-=1)}var g=[s*360,c,l];return e[3]!=null&&g.push(e[3]),g}}function Ix(e,t){var n=Xr(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Ca(n,n.length===4?"rgba":"rgb")}}function A0(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){n=n||[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],l=t[a],s=r-i;return n[0]=vi(mo(o[0],l[0],s)),n[1]=vi(mo(o[1],l[1],s)),n[2]=vi(mo(o[2],l[2],s)),n[3]=Jf(mo(o[3],l[3],s)),n}}function u6(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Xr(t[i]),l=Xr(t[a]),s=r-i,c=Ca([vi(mo(o[0],l[0],s)),vi(mo(o[1],l[1],s)),vi(mo(o[2],l[2],s)),Jf(mo(o[3],l[3],s))],"rgba");return n?{color:c,leftIndex:i,rightIndex:a,value:r}:c}}function Ao(e,t,n,r){var i=Xr(e);if(e)return i=s6(i),t!=null&&(i[0]=l6(Rt(t)?t(i[0]):t)),n!=null&&(i[1]=jl(Rt(n)?n(i[1]):n)),r!=null&&(i[2]=jl(Rt(r)?r(i[2]):r)),Ca(Rx(i),"rgba")}function QR(e,t){var n=Xr(e);if(n&&t!=null)return n[3]=Jf(t),Ca(n,"rgba")}function Ca(e,t){if(!(!e||!e.length)){var n=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(n+=","+e[3]),t+"("+n+")"}}function Dp(e,t){var n=Xr(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var HM=new Iu(100);function VM(e){if(St(e)){var t=HM.get(e);return t||(t=Ix(e,-.1),HM.put(e,t)),t}else if(yg(e)){var n=dt({},e);return n.colorStops=bt(e.colorStops,function(r){return{offset:r.offset,color:Ix(r.color,-.1)}}),n}return e}function c6(e){return e.type==="linear"}function f6(e){return e.type==="radial"}(function(){return Gt.hasGlobalWindow&&Rt(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<"u"?function(e){return Buffer.from(e).toString("base64")}:function(e){return null}})();var Ox=Array.prototype.slice;function ba(e,t,n){return(t-e)*n+e}function D0(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=ba(t[a],n[a],r);return e}function h6(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var l=0;l<a;l++)e[o][l]=ba(t[o][l],n[o][l],r)}return e}function sv(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function jM(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var l=0;l<a;l++)e[o][l]=t[o][l]+n[o][l]*r}return e}function d6(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},l=a;l<Math.max(n,r);l++)i.push({offset:o.offset,color:o.color.slice()})}function v6(e,t,n){var r=e,i=t;if(!(!r.push||!i.push)){var a=r.length,o=i.length;if(a!==o){var l=a>o;if(l)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:Ox.call(i[s]))}for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var h=0;h<c;h++)isNaN(r[s][h])&&(r[s][h]=i[s][h])}}function ip(e){if(sr(e)){var t=e.length;if(sr(e[0])){for(var n=[],r=0;r<t;r++)n.push(Ox.call(e[r]));return n}return Ox.call(e)}return e}function ap(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],"rgba("+e.join(",")+")"}function p6(e){return sr(e&&e[0])?2:1}var uv=0,op=1,KR=2,Df=3,zx=4,Bx=5,FM=6;function GM(e){return e===zx||e===Bx}function cv(e){return e===op||e===KR}var Zc=[0,0,0,0],g6=(function(){function e(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,n,r){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,l=FM,s=n;if(sr(n)){var c=p6(n);l=c,(c===1&&!ve(n[0])||c===2&&!ve(n[0][0]))&&(o=!0)}else if(ve(n)&&!To(n))l=uv;else if(St(n))if(!isNaN(+n))l=uv;else{var h=Xr(n);h&&(s=h,l=Df)}else if(yg(n)){var d=dt({},s);d.colorStops=bt(n.colorStops,function(g){return{offset:g.offset,color:Xr(g.color)}}),c6(n)?l=zx:f6(n)&&(l=Bx),s=d}a===0?this.valType=l:(l!==this.valType||l===FM)&&(o=!0),this.discrete=this.discrete||o;var v={time:t,value:s,rawValue:n,percent:0};return r&&(v.easing=r,v.easingFunc=Rt(r)?r:Pf[r]||XR(r)),i.push(v),v},e.prototype.prepare=function(t,n){var r=this.keyframes;this._needsSort&&r.sort(function(x,_){return x.time-_.time});for(var i=this.valType,a=r.length,o=r[a-1],l=this.discrete,s=cv(i),c=GM(i),h=0;h<a;h++){var d=r[h],v=d.value,g=o.value;d.percent=d.time/t,l||(s&&h!==a-1?v6(v,g,i):c&&d6(v.colorStops,g.colorStops))}if(!l&&i!==Bx&&n&&this.needsAnimate()&&n.needsAnimate()&&i===n.valType&&!n._finished){this._additiveTrack=n;for(var m=r[0].value,h=0;h<a;h++)i===uv?r[h].additiveValue=r[h].value-m:i===Df?r[h].additiveValue=sv([],r[h].value,m,-1):cv(i)&&(r[h].additiveValue=i===op?sv([],r[h].value,m,-1):jM([],r[h].value,m,-1))}},e.prototype.step=function(t,n){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var r=this._additiveTrack!=null,i=r?"additiveValue":"value",a=this.valType,o=this.keyframes,l=o.length,s=this.propName,c=a===Df,h,d=this._lastFr,v=Math.min,g,m;if(l===1)g=m=o[0];else{if(n<0)h=0;else if(n<this._lastFrP){var x=v(d+1,l-1);for(h=x;h>=0&&!(o[h].percent<=n);h--);h=v(h,l-2)}else{for(h=d;h<l&&!(o[h].percent>n);h++);h=v(h-1,l-2)}m=o[h+1],g=o[h]}if(g&&m){this._lastFr=h,this._lastFrP=n;var _=m.percent-g.percent,b=_===0?1:v((n-g.percent)/_,1);m.easingFunc&&(b=m.easingFunc(b));var S=r?this._additiveValue:c?Zc:t[s];if((cv(a)||c)&&!S&&(S=this._additiveValue=[]),this.discrete)t[s]=b<1?g.rawValue:m.rawValue;else if(cv(a))a===op?D0(S,g[i],m[i],b):h6(S,g[i],m[i],b);else if(GM(a)){var w=g[i],A=m[i],D=a===zx;t[s]={type:D?"linear":"radial",x:ba(w.x,A.x,b),y:ba(w.y,A.y,b),colorStops:bt(w.colorStops,function(L,I){var N=A.colorStops[I];return{offset:ba(L.offset,N.offset,b),color:ap(D0([],L.color,N.color,b))}}),global:A.global},D?(t[s].x2=ba(w.x2,A.x2,b),t[s].y2=ba(w.y2,A.y2,b)):t[s].r=ba(w.r,A.r,b)}else if(c)D0(S,g[i],m[i],b),r||(t[s]=ap(S));else{var M=ba(g[i],m[i],b);r?this._additiveValue=M:t[s]=M}r&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var n=this.valType,r=this.propName,i=this._additiveValue;n===uv?t[r]=t[r]+i:n===Df?(Xr(t[r],Zc),sv(Zc,Zc,i,1),t[r]=ap(Zc)):n===op?sv(t[r],t[r],i,1):n===KR&&jM(t[r],t[r],i,1)},e})(),__=(function(){function e(t,n,r,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=n,n&&i){p_("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=r}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(t){this._target=t},e.prototype.when=function(t,n,r){return this.whenWithKeys(t,n,Be(n),r)},e.prototype.whenWithKeys=function(t,n,r,i){for(var a=this._tracks,o=0;o<r.length;o++){var l=r[o],s=a[l];if(!s){s=a[l]=new g6(l);var c=void 0,h=this._getAdditiveTrack(l);if(h){var d=h.keyframes,v=d[d.length-1];c=v&&v.value,h.valType===Df&&c&&(c=ap(c))}else c=this._target[l];if(c==null)continue;t>0&&s.addKeyframe(0,ip(c),i),this._trackKeys.push(l)}s.addKeyframe(t,ip(n[l]),i)}return this._maxTime=Math.max(this._maxTime,t),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var n=t.length,r=0;r<n;r++)t[r].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,n=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,n)for(var r=0;r<n.length;r++)n[r].call(this)},e.prototype._setTracksFinished=function(){for(var t=this._tracks,n=this._trackKeys,r=0;r<n.length;r++)t[n[r]].setFinished()},e.prototype._getAdditiveTrack=function(t){var n,r=this._additiveAnimators;if(r)for(var i=0;i<r.length;i++){var a=r[i].getTrack(t);a&&(n=a)}return n},e.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var n=this,r=[],i=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],l=this._tracks[o],s=this._getAdditiveTrack(o),c=l.keyframes,h=c.length;if(l.prepare(i,s),l.needsAnimate())if(!this._allowDiscrete&&l.discrete){var d=c[h-1];d&&(n._target[l.propName]=d.rawValue),l.setFinished()}else r.push(l)}if(r.length||this._force){var v=new a6({life:i,loop:this._loop,delay:this._delay||0,onframe:function(g){n._started=2;var m=n._additiveAnimators;if(m){for(var x=!1,_=0;_<m.length;_++)if(m[_]._clip){x=!0;break}x||(n._additiveAnimators=null)}for(var _=0;_<r.length;_++)r[_].step(n._target,g);var b=n._onframeCbs;if(b)for(var _=0;_<b.length;_++)b[_](n._target,g)},ondestroy:function(){n._doneCallback()}});this._clip=v,this.animation&&this.animation.addClip(v),t&&v.setEasing(t)}else this._doneCallback();return this}},e.prototype.stop=function(t){if(this._clip){var n=this._clip;t&&n.onframe(1),this._abortedCallback()}},e.prototype.delay=function(t){return this._delay=t,this},e.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},e.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},e.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(t){return this._tracks[t]},e.prototype.getTracks=function(){var t=this;return bt(this._trackKeys,function(n){return t._tracks[n]})},e.prototype.stopTracks=function(t,n){if(!t.length||!this._clip)return!0;for(var r=this._tracks,i=this._trackKeys,a=0;a<t.length;a++){var o=r[t[a]];o&&!o.isFinished()&&(n?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var l=!0,a=0;a<i.length;a++)if(!r[i[a]].isFinished()){l=!1;break}return l&&this._abortedCallback(),l},e.prototype.saveTo=function(t,n,r){if(t){n=n||this._trackKeys;for(var i=0;i<n.length;i++){var a=n[i],o=this._tracks[a];if(!(!o||o.isFinished())){var l=o.keyframes,s=l[r?0:l.length-1];s&&(t[a]=ip(s.rawValue))}}}},e.prototype.__changeFinalValue=function(t,n){n=n||Be(t);for(var r=0;r<n.length;r++){var i=n[r],a=this._tracks[i];if(a){var o=a.keyframes;if(o.length>1){var l=o.pop();a.addKeyframe(l.time,t[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},e})();function wu(){return new Date().getTime()}var m6=(function(e){ot(t,e);function t(n){var r=e.call(this)||this;return r._running=!1,r._time=0,r._pausedTime=0,r._pauseStart=0,r._paused=!1,n=n||{},r.stage=n.stage||{},r}return t.prototype.addClip=function(n){n.animation&&this.removeClip(n),this._head?(this._tail.next=n,n.prev=this._tail,n.next=null,this._tail=n):this._head=this._tail=n,n.animation=this},t.prototype.addAnimator=function(n){n.animation=this;var r=n.getClip();r&&this.addClip(r)},t.prototype.removeClip=function(n){if(n.animation){var r=n.prev,i=n.next;r?r.next=i:this._head=i,i?i.prev=r:this._tail=r,n.next=n.prev=n.animation=null}},t.prototype.removeAnimator=function(n){var r=n.getClip();r&&this.removeClip(r),n.animation=null},t.prototype.update=function(n){for(var r=wu()-this._pausedTime,i=r-this._time,a=this._head;a;){var o=a.next,l=a.step(r,i);l&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=r,n||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var n=this;this._running=!0;function r(){n._running&&(wp(r),!n._paused&&n.update())}wp(r)},t.prototype.start=function(){this._running||(this._time=wu(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=wu(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=wu()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var n=this._head;n;){var r=n.next;n.prev=n.next=n.animation=null,n=r}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(n,r){r=r||{},this.start();var i=new __(n,r.loop);return this.addAnimator(i),i},t})(Kr),y6=300,k0=Gt.domSupported,L0=(function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},r=bt(e,function(i){var a=i.replace("mouse","pointer");return n.hasOwnProperty(a)?a:i});return{mouse:e,touch:t,pointer:r}})(),UM={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},YM=!1;function Nx(e){var t=e.pointerType;return t==="pen"||t==="touch"}function x6(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function E0(e){e&&(e.zrByTouch=!0)}function b6(e,t){return Vr(e.dom,new _6(e,t),!0)}function JR(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var _6=(function(){function e(t,n){this.stopPropagation=Cn,this.stopImmediatePropagation=Cn,this.preventDefault=Cn,this.type=n.type,this.target=this.currentTarget=t.dom,this.pointerType=n.pointerType,this.clientX=n.clientX,this.clientY=n.clientY}return e})(),ui={mousedown:function(e){e=Vr(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Vr(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=Vr(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=Vr(this.dom,e);var t=e.toElement||e.relatedTarget;JR(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){YM=!0,e=Vr(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){YM||(e=Vr(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=Vr(this.dom,e),E0(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),ui.mousemove.call(this,e),ui.mousedown.call(this,e)},touchmove:function(e){e=Vr(this.dom,e),E0(e),this.handler.processGesture(e,"change"),ui.mousemove.call(this,e)},touchend:function(e){e=Vr(this.dom,e),E0(e),this.handler.processGesture(e,"end"),ui.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<y6&&ui.click.call(this,e)},pointerdown:function(e){ui.mousedown.call(this,e)},pointermove:function(e){Nx(e)||ui.mousemove.call(this,e)},pointerup:function(e){ui.mouseup.call(this,e)},pointerout:function(e){Nx(e)||ui.mouseout.call(this,e)}};P(["click","dblclick","contextmenu"],function(e){ui[e]=function(t){t=Vr(this.dom,t),this.trigger(e,t)}});var Px={pointermove:function(e){Nx(e)||Px.mousemove.call(this,e)},pointerup:function(e){Px.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function S6(e,t){var n=t.domHandlers;Gt.pointerEventsSupported?P(L0.pointer,function(r){lp(t,r,function(i){n[r].call(e,i)})}):(Gt.touchEventsSupported&&P(L0.touch,function(r){lp(t,r,function(i){n[r].call(e,i),x6(t)})}),P(L0.mouse,function(r){lp(t,r,function(i){i=m_(i),t.touching||n[r].call(e,i)})}))}function w6(e,t){Gt.pointerEventsSupported?P(UM.pointer,n):Gt.touchEventsSupported||P(UM.mouse,n);function n(r){function i(a){a=m_(a),JR(e,a.target)||(a=b6(e,a),t.domHandlers[r].call(e,a))}lp(t,r,i,{capture:!0})}}function lp(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,Dx(e.domTarget,t,n,r)}function R0(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&PH(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var WM=(function(){function e(t,n){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=n}return e})(),T6=(function(e){ot(t,e);function t(n,r){var i=e.call(this)||this;return i.__pointerCapturing=!1,i.dom=n,i.painterRoot=r,i._localHandlerScope=new WM(n,ui),k0&&(i._globalHandlerScope=new WM(document,Px)),S6(i,i._localHandlerScope),i}return t.prototype.dispose=function(){R0(this._localHandlerScope),k0&&R0(this._globalHandlerScope)},t.prototype.setCursor=function(n){this.dom.style&&(this.dom.style.cursor=n||"default")},t.prototype.__togglePointerCapture=function(n){if(this.__mayPointerCapture=null,k0&&+this.__pointerCapturing^+n){this.__pointerCapturing=n;var r=this._globalHandlerScope;n?w6(this,r):R0(r)}},t})(Kr),tI=1;Gt.hasGlobalWindow&&(tI=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var kp=tI,Hx=.4,Vx="#333",jx="#ccc",C6="#eee",qM=y_,XM=5e-5;function ul(e){return e>XM||e<-XM}var cl=[],Xs=[],I0=di(),O0=Math.abs,zl=(function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return ul(this.rotation)||ul(this.x)||ul(this.y)||ul(this.scaleX-1)||ul(this.scaleY-1)||ul(this.skewX)||ul(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,n=this.needLocalTransform(),r=this.transform;if(!(n||t)){r&&(qM(r),this.invTransform=null);return}r=r||di(),n?this.getLocalTransform(r):qM(r),t&&(n?Bf(r,t,r):x_(r,t)),this.transform=r,this._resolveGlobalScaleRatio(r)},e.prototype._resolveGlobalScaleRatio=function(t){var n=this.globalScaleRatio;if(n!=null&&n!==1){this.getGlobalScale(cl);var r=cl[0]<0?-1:1,i=cl[1]<0?-1:1,a=((cl[0]-r)*n+r)/cl[0]||0,o=((cl[1]-i)*n+i)/cl[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||di(),Uu(this.invTransform,t)},e.prototype.getComputedTransform=function(){for(var t=this,n=[];t;)n.push(t),t=t.parent;for(;t=n.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(t){var n=t[0]*t[0]+t[1]*t[1],r=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]);r=Math.sqrt(r)*Math.cos(a),n=Math.sqrt(n),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=n,this.scaleY=r,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,n=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||di(),Bf(Xs,t.invTransform,n),n=Xs);var r=this.originX,i=this.originY;(r||i)&&(I0[4]=r,I0[5]=i,Bf(Xs,n,I0),Xs[4]-=r,Xs[5]-=i,n=Xs),this.setLocalTransform(n)}},e.prototype.getGlobalScale=function(t){var n=this.transform;return t=t||[],n?(t[0]=Math.sqrt(n[0]*n[0]+n[1]*n[1]),t[1]=Math.sqrt(n[2]*n[2]+n[3]*n[3]),n[0]<0&&(t[0]=-t[0]),n[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},e.prototype.transformCoordToLocal=function(t,n){var r=[t,n],i=this.invTransform;return i&&Un(r,r,i),r},e.prototype.transformCoordToGlobal=function(t,n){var r=[t,n],i=this.transform;return i&&Un(r,r,i),r},e.prototype.getLineScale=function(){var t=this.transform;return t&&O0(t[0]-1)>1e-10&&O0(t[3]-1)>1e-10?Math.sqrt(O0(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){Fx(this,t)},e.getLocalTransform=function(t,n){n=n||[];var r=t.originX||0,i=t.originY||0,a=t.scaleX,o=t.scaleY,l=t.anchorX,s=t.anchorY,c=t.rotation||0,h=t.x,d=t.y,v=t.skewX?Math.tan(t.skewX):0,g=t.skewY?Math.tan(-t.skewY):0;if(r||i||l||s){var m=r+l,x=i+s;n[4]=-m*a-v*x*o,n[5]=-x*o-g*m*a}else n[4]=n[5]=0;return n[0]=a,n[3]=o,n[1]=g*a,n[2]=v*o,c&&b_(n,n,c),n[4]+=r+h,n[5]+=i+d,n},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e})(),th=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Fx(e,t){for(var n=0;n<th.length;n++){var r=th[n];e[r]=t[r]}}function Vi(e){fv||(fv=new Iu(100)),e=e||Eo;var t=fv.get(e);return t||(t={font:e,strWidthCache:new Iu(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:mi.measureText("国",e).width,asciiCharWidth:mi.measureText("a",e).width},fv.put(e,t)),t}var fv;function M6(e){if(!(z0>=ZM)){e=e||Eo;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=mi.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?z0=ZM:i>2&&z0++,t}}var z0=0,ZM=5;function eI(e,t){return e.asciiWidthMapTried||(e.asciiWidthMap=M6(e.font),e.asciiWidthMapTried=!0),0<=t&&t<=127?e.asciiWidthMap!=null?e.asciiWidthMap[t]:e.asciiCharWidth:e.stWideCharWidth}function ji(e,t){var n=e.strWidthCache,r=n.get(t);return r==null&&(r=mi.measureText(t,e.font).width,n.put(t,r)),r}function $M(e,t,n,r){var i=ji(Vi(t),e),a=_g(t),o=Ou(0,i,n),l=Fl(0,a,r),s=new Vt(o,l,i,a);return s}function S_(e,t,n,r){var i=((e||"")+"").split(`
|
|
75
|
+
`),a=i.length;if(a===1)return $M(i[0],t,n,r);for(var o=new Vt(0,0,0,0),l=0;l<i.length;l++){var s=$M(i[l],t,n,r);l===0?o.copy(s):o.union(s)}return o}function Ou(e,t,n,r){return n==="right"?r?e+=t:e-=t:n==="center"&&(r?e+=t/2:e-=t/2),e}function Fl(e,t,n,r){return n==="middle"?r?e+=t/2:e-=t/2:n==="bottom"&&(r?e+=t:e-=t),e}function _g(e){return Vi(e).stWideCharWidth}function Fi(e,t){return typeof e=="string"?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function Lp(e,t,n){var r=t.position||"inside",i=t.distance!=null?t.distance:5,a=n.height,o=n.width,l=a/2,s=n.x,c=n.y,h="left",d="top";if(r instanceof Array)s+=Fi(r[0],n.width),c+=Fi(r[1],n.height),h=null,d=null;else switch(r){case"left":s-=i,c+=l,h="right",d="middle";break;case"right":s+=i+o,c+=l,d="middle";break;case"top":s+=o/2,c-=i,h="center",d="bottom";break;case"bottom":s+=o/2,c+=a+i,h="center";break;case"inside":s+=o/2,c+=l,h="center",d="middle";break;case"insideLeft":s+=i,c+=l,d="middle";break;case"insideRight":s+=o-i,c+=l,h="right",d="middle";break;case"insideTop":s+=o/2,c+=i,h="center";break;case"insideBottom":s+=o/2,c+=a-i,h="center",d="bottom";break;case"insideTopLeft":s+=i,c+=i;break;case"insideTopRight":s+=o-i,c+=i,h="right";break;case"insideBottomLeft":s+=i,c+=a-i,d="bottom";break;case"insideBottomRight":s+=o-i,c+=a-i,h="right",d="bottom";break}return e=e||{},e.x=s,e.y=c,e.align=h,e.verticalAlign=d,e}var B0="__zr_normal__",N0=th.concat(["ignore"]),A6=Ro(th,function(e,t){return e[t]=!0,e},{ignore:!1}),Zs={},D6=new Vt(0,0,0,0),hv=[],Sg=(function(){function e(t){this.id=ER(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return e.prototype._init=function(t){this.attr(t)},e.prototype.drift=function(t,n,r){switch(this.draggable){case"horizontal":n=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]+=n,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(t){var n=this._textContent;if(n&&(!n.ignore||t)){this.textConfig||(this.textConfig={});var r=this.textConfig,i=r.local,a=n.innerTransformable,o=void 0,l=void 0,s=!1;a.parent=i?this:null;var c=!1;a.copyTransform(n);var h=r.position!=null,d=r.autoOverflowArea,v=void 0;if((d||h)&&(v=D6,r.layoutRect?v.copy(r.layoutRect):v.copy(this.getBoundingRect()),i||v.applyTransform(this.transform)),h){this.calculateTextPosition?this.calculateTextPosition(Zs,r,v):Lp(Zs,r,v),a.x=Zs.x,a.y=Zs.y,o=Zs.align,l=Zs.verticalAlign;var g=r.origin;if(g&&r.rotation!=null){var m=void 0,x=void 0;g==="center"?(m=v.width*.5,x=v.height*.5):(m=Fi(g[0],v.width),x=Fi(g[1],v.height)),c=!0,a.originX=-a.x+m+(i?0:v.x),a.originY=-a.y+x+(i?0:v.y)}}r.rotation!=null&&(a.rotation=r.rotation);var _=r.offset;_&&(a.x+=_[0],a.y+=_[1],c||(a.originX=-_[0],a.originY=-_[1]));var b=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(d){var S=b.overflowRect=b.overflowRect||new Vt(0,0,0,0);a.getLocalTransform(hv),Uu(hv,hv),Vt.copy(S,v),S.applyTransform(hv)}else b.overflowRect=null;var w=r.inside==null?typeof r.position=="string"&&r.position.indexOf("inside")>=0:r.inside,A=void 0,D=void 0,M=void 0;w&&this.canBeInsideText()?(A=r.insideFill,D=r.insideStroke,(A==null||A==="auto")&&(A=this.getInsideTextFill()),(D==null||D==="auto")&&(D=this.getInsideTextStroke(A),M=!0)):(A=r.outsideFill,D=r.outsideStroke,(A==null||A==="auto")&&(A=this.getOutsideFill()),(D==null||D==="auto")&&(D=this.getOutsideStroke(A),M=!0)),A=A||"#000",(A!==b.fill||D!==b.stroke||M!==b.autoStroke||o!==b.align||l!==b.verticalAlign)&&(s=!0,b.fill=A,b.stroke=D,b.autoStroke=M,b.align=o,b.verticalAlign=l,n.setDefaultTextStyle(b)),n.__dirty|=Sr,s&&n.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(t){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?jx:Vx},e.prototype.getOutsideStroke=function(t){var n=this.__zr&&this.__zr.getBackgroundColor(),r=typeof n=="string"&&Xr(n);r||(r=[255,255,255,1]);for(var i=r[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)r[o]=r[o]*i+(a?0:255)*(1-i);return r[3]=1,Ca(r,"rgba")},e.prototype.traverse=function(t,n){},e.prototype.attrKV=function(t,n){t==="textConfig"?this.setTextConfig(n):t==="textContent"?this.setTextContent(n):t==="clipPath"?this.setClipPath(n):t==="extra"?(this.extra=this.extra||{},dt(this.extra,n)):this[t]=n},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(t,n){if(typeof t=="string")this.attrKV(t,n);else if(Lt(t))for(var r=t,i=Be(r),a=0;a<i.length;a++){var o=i[a];this.attrKV(o,t[o])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var n=this._normalState,r=0;r<this.animators.length;r++){var i=this.animators[r],a=i.__fromStateTransition;if(!(i.getLoop()||a&&a!==B0)){var o=i.targetName,l=o?n[o]:n;i.saveTo(l)}}},e.prototype._innerSaveToNormal=function(t){var n=this._normalState;n||(n=this._normalState={}),t.textConfig&&!n.textConfig&&(n.textConfig=this.textConfig),this._savePrimaryToNormal(t,n,N0)},e.prototype._savePrimaryToNormal=function(t,n,r){for(var i=0;i<r.length;i++){var a=r[i];t[a]!=null&&!(a in n)&&(n[a]=this[a])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(t){return this.states[t]},e.prototype.ensureState=function(t){var n=this.states;return n[t]||(n[t]={}),n[t]},e.prototype.clearStates=function(t){this.useState(B0,!1,t)},e.prototype.useState=function(t,n,r,i){var a=t===B0,o=this.hasState();if(!(!o&&a)){var l=this.currentStates,s=this.stateTransition;if(!(Wt(l,t)>=0&&(n||l.length===1))){var c;if(this.stateProxy&&!a&&(c=this.stateProxy(t)),c||(c=this.states&&this.states[t]),!c&&!a){p_("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(c);var h=!!(c&&c.hoverLayer||i);h&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,c,this._normalState,n,!r&&!this.__inHover&&s&&s.duration>0,s);var d=this._textContent,v=this._textGuide;return d&&d.useState(t,n,r,h),v&&v.useState(t,n,r,h),a?(this.currentStates=[],this._normalState={}):n?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Sr),c}}},e.prototype.useStates=function(t,n,r){if(!t.length)this.clearStates();else{var i=[],a=this.currentStates,o=t.length,l=o===a.length;if(l){for(var s=0;s<o;s++)if(t[s]!==a[s]){l=!1;break}}if(l)return;for(var s=0;s<o;s++){var c=t[s],h=void 0;this.stateProxy&&(h=this.stateProxy(c,t)),h||(h=this.states[c]),h&&i.push(h)}var d=i[o-1],v=!!(d&&d.hoverLayer||r);v&&this._toggleHoverLayerFlag(!0);var g=this._mergeStates(i),m=this.stateTransition;this.saveCurrentToNormalState(g),this._applyStateObj(t.join(","),g,this._normalState,!1,!n&&!this.__inHover&&m&&m.duration>0,m);var x=this._textContent,_=this._textGuide;x&&x.useStates(t,n,v),_&&_.useStates(t,n,v),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!v&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Sr)}},e.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var n=t.__hostTarget;t=n?t.ignoreHostSilent?null:n:t.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var n=this.animators[t];n.targetName&&n.changeTarget(this[n.targetName])}},e.prototype.removeState=function(t){var n=Wt(this.currentStates,t);if(n>=0){var r=this.currentStates.slice();r.splice(n,1),this.useStates(r)}},e.prototype.replaceState=function(t,n,r){var i=this.currentStates.slice(),a=Wt(i,t),o=Wt(i,n)>=0;a>=0?o?i.splice(a,1):i[a]=n:r&&!o&&i.push(n),this.useStates(i)},e.prototype.toggleState=function(t,n){n?this.useState(t,!0):this.removeState(t)},e.prototype._mergeStates=function(t){for(var n={},r,i=0;i<t.length;i++){var a=t[i];dt(n,a),a.textConfig&&(r=r||{},dt(r,a.textConfig))}return r&&(n.textConfig=r),n},e.prototype._applyStateObj=function(t,n,r,i,a,o){var l=!(n&&i);n&&n.textConfig?(this.textConfig=dt({},i?this.textConfig:r.textConfig),dt(this.textConfig,n.textConfig)):l&&r.textConfig&&(this.textConfig=r.textConfig);for(var s={},c=!1,h=0;h<N0.length;h++){var d=N0[h],v=a&&A6[d];n&&n[d]!=null?v?(c=!0,s[d]=n[d]):this[d]=n[d]:l&&r[d]!=null&&(v?(c=!0,s[d]=r[d]):this[d]=r[d])}if(!a)for(var h=0;h<this.animators.length;h++){var g=this.animators[h],m=g.targetName;g.getLoop()||g.__changeFinalValue(m?(n||r)[m]:n||r)}c&&this._transitionState(t,s,o)},e.prototype._attachComponent=function(t){if(!(t.__zr&&!t.__hostTarget)&&t!==this){var n=this.__zr;n&&t.addSelfToZr(n),t.__zr=n,t.__hostTarget=this}},e.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},e.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(t){var n=this._textContent;n!==t&&(n&&n!==t&&this.removeTextContent(),t.innerTransformable=new zl,this._attachComponent(t),this._textContent=t,this.markRedraw())},e.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),dt(this.textConfig,t),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=Sr;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var n=this._textContent,r=this._textGuide;n&&(n.__inHover=t),r&&(r.__inHover=t)},e.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var n=this.animators;if(n)for(var r=0;r<n.length;r++)t.animation.addAnimator(n[r]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var n=this.animators;if(n)for(var r=0;r<n.length;r++)t.animation.removeAnimator(n[r]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},e.prototype.animate=function(t,n,r){var i=t?this[t]:this,a=new __(i,n,r);return t&&(a.targetName=t),this.addAnimator(a,t),a},e.prototype.addAnimator=function(t,n){var r=this.__zr,i=this;t.during(function(){i.updateDuringAnimation(n)}).done(function(){var a=i.animators,o=Wt(a,t);o>=0&&a.splice(o,1)}),this.animators.push(t),r&&r.animation.addAnimator(t),r&&r.wakeUp()},e.prototype.updateDuringAnimation=function(t){this.markRedraw()},e.prototype.stopAnimation=function(t,n){for(var r=this.animators,i=r.length,a=[],o=0;o<i;o++){var l=r[o];!t||t===l.scope?l.stop(n):a.push(l)}return this.animators=a,this},e.prototype.animateTo=function(t,n,r){P0(this,t,n,r)},e.prototype.animateFrom=function(t,n,r){P0(this,t,n,r,!0)},e.prototype._transitionState=function(t,n,r,i){for(var a=P0(this,n,r,i),o=0;o<a.length;o++)a[o].__fromStateTransition=t},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type="element",t.name="",t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=Sr;function n(r,i,a,o){Object.defineProperty(t,r,{get:function(){if(!this[i]){var s=this[i]=[];l(this,s)}return this[i]},set:function(s){this[a]=s[0],this[o]=s[1],this[i]=s,l(this,s)}});function l(s,c){Object.defineProperty(c,0,{get:function(){return s[a]},set:function(h){s[a]=h}}),Object.defineProperty(c,1,{get:function(){return s[o]},set:function(h){s[o]=h}})}}Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))})(),e})();Xn(Sg,Kr);Xn(Sg,zl);function P0(e,t,n,r,i){n=n||{};var a=[];nI(e,"",e,t,n,r,a,i);var o=a.length,l=!1,s=n.done,c=n.aborted,h=function(){l=!0,o--,o<=0&&(l?s&&s():c&&c())},d=function(){o--,o<=0&&(l?s&&s():c&&c())};o||s&&s(),a.length>0&&n.during&&a[0].during(function(m,x){n.during(x)});for(var v=0;v<a.length;v++){var g=a[v];h&&g.done(h),d&&g.aborted(d),n.force&&g.duration(n.duration),g.start(n.easing)}return a}function H0(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function k6(e){return sr(e[0])}function L6(e,t,n){if(sr(t[n]))if(sr(e[n])||(e[n]=[]),ur(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),H0(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(k6(i))for(var l=i[0].length,s=0;s<o;s++)a[s]?H0(a[s],i[s],l):a[s]=Array.prototype.slice.call(i[s]);else H0(a,i,o);a.length=i.length}else e[n]=t[n]}function E6(e,t){return e===t||sr(e)&&sr(t)&&R6(e,t)}function R6(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function nI(e,t,n,r,i,a,o,l){for(var s=Be(r),c=i.duration,h=i.delay,d=i.additive,v=i.setToFinal,g=!Lt(a),m=e.animators,x=[],_=0;_<s.length;_++){var b=s[_],S=r[b];if(S!=null&&n[b]!=null&&(g||a[b]))if(Lt(S)&&!sr(S)&&!yg(S)){if(t){l||(n[b]=S,e.updateDuringAnimation(t));continue}nI(e,b,n[b],S,i,a&&a[b],o,l)}else x.push(b);else l||(n[b]=S,e.updateDuringAnimation(t),x.push(b))}var w=x.length;if(!d&&w)for(var A=0;A<m.length;A++){var D=m[A];if(D.targetName===t){var M=D.stopTracks(x);if(M){var L=Wt(m,D);m.splice(L,1)}}}if(i.force||(x=Ze(x,function(O){return!E6(r[O],n[O])}),w=x.length),w>0||i.force&&!o.length){var I=void 0,N=void 0,E=void 0;if(l){N={},v&&(I={});for(var A=0;A<w;A++){var b=x[A];N[b]=n[b],v?I[b]=r[b]:n[b]=r[b]}}else if(v){E={};for(var A=0;A<w;A++){var b=x[A];E[b]=ip(n[b]),L6(n,r,b)}}var D=new __(n,!1,!1,d?Ze(m,function(j){return j.targetName===t}):null);D.targetName=t,i.scope&&(D.scope=i.scope),v&&I&&D.whenWithKeys(0,I,x),E&&D.whenWithKeys(0,E,x),D.whenWithKeys(c??500,l?N:r,x).delay(h||0),e.addAnimator(D,t),o.push(D)}}var ie=(function(e){ot(t,e);function t(n){var r=e.call(this)||this;return r.isGroup=!0,r._children=[],r.attr(n),r}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(n){return this._children[n]},t.prototype.childOfName=function(n){for(var r=this._children,i=0;i<r.length;i++)if(r[i].name===n)return r[i]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(n){return n&&n!==this&&n.parent!==this&&(this._children.push(n),this._doAdd(n)),this},t.prototype.addBefore=function(n,r){if(n&&n!==this&&n.parent!==this&&r&&r.parent===this){var i=this._children,a=i.indexOf(r);a>=0&&(i.splice(a,0,n),this._doAdd(n))}return this},t.prototype.replace=function(n,r){var i=Wt(this._children,n);return i>=0&&this.replaceAt(r,i),this},t.prototype.replaceAt=function(n,r){var i=this._children,a=i[r];if(n&&n!==this&&n.parent!==this&&n!==a){i[r]=n,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(n)}return this},t.prototype._doAdd=function(n){n.parent&&n.parent.remove(n),n.parent=this;var r=this.__zr;r&&r!==n.__zr&&n.addSelfToZr(r),r&&r.refresh()},t.prototype.remove=function(n){var r=this.__zr,i=this._children,a=Wt(i,n);return a<0?this:(i.splice(a,1),n.parent=null,r&&n.removeSelfFromZr(r),r&&r.refresh(),this)},t.prototype.removeAll=function(){for(var n=this._children,r=this.__zr,i=0;i<n.length;i++){var a=n[i];r&&a.removeSelfFromZr(r),a.parent=null}return n.length=0,this},t.prototype.eachChild=function(n,r){for(var i=this._children,a=0;a<i.length;a++){var o=i[a];n.call(r,o,a)}return this},t.prototype.traverse=function(n,r){for(var i=0;i<this._children.length;i++){var a=this._children[i],o=n.call(r,a);a.isGroup&&!o&&a.traverse(n,r)}return this},t.prototype.addSelfToZr=function(n){e.prototype.addSelfToZr.call(this,n);for(var r=0;r<this._children.length;r++){var i=this._children[r];i.addSelfToZr(n)}},t.prototype.removeSelfFromZr=function(n){e.prototype.removeSelfFromZr.call(this,n);for(var r=0;r<this._children.length;r++){var i=this._children[r];i.removeSelfFromZr(n)}},t.prototype.getBoundingRect=function(n){for(var r=new Vt(0,0,0,0),i=n||this._children,a=[],o=null,l=0;l<i.length;l++){var s=i[l];if(!(s.ignore||s.invisible)){var c=s.getBoundingRect(),h=s.getLocalTransform(a);h?(Vt.applyTransform(r,c,h),o=o||r.clone(),o.union(r)):(o=o||c.clone(),o.union(c))}}return o||r},t})(Sg);ie.prototype.type="group";/*!
|
|
76
|
+
* ZRender, a high performance 2d drawing library.
|
|
77
|
+
*
|
|
78
|
+
* Copyright (c) 2013, Baidu Inc.
|
|
79
|
+
* All rights reserved.
|
|
80
|
+
*
|
|
81
|
+
* LICENSE
|
|
82
|
+
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
83
|
+
*/var sp={},rI={};function I6(e){delete rI[e]}function O6(e){if(!e)return!1;if(typeof e=="string")return Dp(e,1)<Hx;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=Dp(t[i].color,1);return n/=r,n<Hx}return!1}var z6=(function(){function e(t,n,r){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,r=r||{},this.dom=n,this.id=t;var a=new KH,o=r.renderer||"canvas";sp[o]||(o=Be(sp)[0]),r.useDirtyRect=r.useDirtyRect==null?!1:r.useDirtyRect;var l=new sp[o](n,a,r,t),s=r.ssr||l.ssrOnly;this.storage=a,this.painter=l;var c=!Gt.node&&!Gt.worker&&!s?new T6(l.getViewportRoot(),l.root):null,h=r.useCoarsePointer,d=h==null||h==="auto"?Gt.touchEventsSupported:!!h,v=44,g;d&&(g=zt(r.pointerSize,v)),this.handler=new jR(a,l,c,l.root,g),this.animation=new m6({stage:{update:s?null:function(){return i._flush(!0)}}}),s||this.animation.start()}return e.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},e.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(t,n){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,n),this.refresh())},e.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=O6(t))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(t){this._darkMode=t},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(t){var n,r=wu();this._needsRefresh&&(n=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(n=!0,this.refreshHoverImmediately());var i=wu();n?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-r})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},e.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,n){if(!this._disposed)return this.handler.findHover(t,n)},e.prototype.on=function(t,n,r){return this._disposed||this.handler.on(t,n,r),this},e.prototype.off=function(t,n){this._disposed||this.handler.off(t,n)},e.prototype.trigger=function(t,n){this._disposed||this.handler.trigger(t,n)},e.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),n=0;n<t.length;n++)t[n]instanceof ie&&t[n].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,I6(this.id))},e})();function QM(e,t){var n=new z6(ER(),e,t);return rI[n.id]=n,n}function B6(e,t){sp[e]=t}var KM=1e-4,iI=20;function N6(e){return e.replace(/^\s+|\s+$/g,"")}var eh=Math.min,wr=Math.max,Ni=Math.abs;function ue(e,t,n,r){var i=t[0],a=t[1],o=n[0],l=n[1],s=a-i,c=l-o;if(s===0)return c===0?o:(o+l)/2;if(r)if(s>0){if(e<=i)return o;if(e>=a)return l}else{if(e>=i)return o;if(e<=a)return l}else{if(e===i)return o;if(e===a)return l}return(e-i)/s*c+o}var At=P6;function P6(e,t,n){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return Gx(e,t,n)}function Gx(e,t,n){return St(e)?N6(e).match(/%$/)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function pn(e,t,n){return t==null&&(t=10),t=Math.min(Math.max(0,t),iI),e=(+e).toFixed(t),n?e:+e}function yo(e){return e.sort(function(t,n){return t-n}),e}function wa(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n}return H6(e)}function H6(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-r)}function aI(e,t){var n=Math.log,r=Math.LN10,i=Math.floor(n(e[1]-e[0])/r),a=Math.round(n(Ni(t[1]-t[0]))/r),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function V6(e,t){var n=Ro(e,function(g,m){return g+(isNaN(m)?0:m)},0);if(n===0)return[];for(var r=Math.pow(10,t),i=bt(e,function(g){return(isNaN(g)?0:g)/n*r*100}),a=r*100,o=bt(i,function(g){return Math.floor(g)}),l=Ro(o,function(g,m){return g+m},0),s=bt(i,function(g,m){return g-o[m]});l<a;){for(var c=Number.NEGATIVE_INFINITY,h=null,d=0,v=s.length;d<v;++d)s[d]>c&&(c=s[d],h=d);++o[h],s[h]=0,++l}return bt(o,function(g){return g/r})}function j6(e,t){var n=Math.max(wa(e),wa(t)),r=e+t;return n>iI?r:pn(r,n)}var JM=9007199254740991;function oI(e){var t=Math.PI*2;return(e%t+t)%t}function nh(e){return e>-KM&&e<KM}var F6=/^(?:(\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 Yu(e){if(e instanceof Date)return e;if(St(e)){var t=F6.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(e==null)return new Date(NaN);return new Date(Math.round(e))}function G6(e){return Math.pow(10,w_(e))}function w_(e){if(e===0)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function lI(e,t){var n=w_(e),r=Math.pow(10,n),i=e/r,a;return i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10,e=a*r,n>=-20?+e.toFixed(n<0?-n:0):e}function V0(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],a=n-r;return a?i+a*(e[r]-i):i}function tA(e){e.sort(function(s,c){return l(s,c,0)?-1:1});for(var t=-1/0,n=1,r=0;r<e.length;){for(var i=e[r].interval,a=e[r].close,o=0;o<2;o++)i[o]<=t&&(i[o]=t,a[o]=o?1:1-n),t=i[o],n=a[o];i[0]===i[1]&&a[0]*a[1]!==1?e.splice(r,1):r++}return e;function l(s,c,h){return s.interval[h]<c.interval[h]||s.interval[h]===c.interval[h]&&(s.close[h]-c.close[h]===(h?-1:1)||!h&&l(s,c,1))}}function Ep(e){var t=parseFloat(e);return t==e&&(t!==0||!St(e)||e.indexOf("x")<=0)?t:NaN}function U6(e){return!isNaN(Ep(e))}function sI(){return Math.round(Math.random()*9)}function uI(e,t){return t===0?e:uI(t,e%t)}function eA(e,t){return e==null?t:t==null?e:e*t/uI(e,t)}var Y6="[ECharts] ",W6=typeof console<"u"&&console.warn&&console.log;function q6(e,t,n){W6&&console[e](Y6+t)}function cI(e,t){q6("error",e)}function Fn(e){throw new Error(e)}function nA(e,t,n){return(t-e)*n+e}var fI="series\0",hI="\0_ec_\0";function un(e){return e instanceof Array?e:e==null?[]:[e]}function Rp(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var a=n[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var rA=["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 Ah(e){return Lt(e)&&!mt(e)&&!(e instanceof Date)?e.value:e}function X6(e){return Lt(e)&&!(e instanceof Array)}function Z6(e,t,n){var r=n==="normalMerge",i=n==="replaceMerge",a=n==="replaceAll";e=e||[],t=(t||[]).slice();var o=Bt();P(t,function(s,c){if(!Lt(s)){t[c]=null;return}});var l=$6(e,o,n);return(r||i)&&Q6(l,e,o,t),r&&K6(l,t),r||i?J6(l,t,i):a&&tV(l,t),eV(l),l}function $6(e,t,n){var r=[];if(n==="replaceAll")return r;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),r.push({existing:n==="replaceMerge"||rh(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function Q6(e,t,n,r){P(r,function(i,a){if(!(!i||i.id==null)){var o=Hf(i.id),l=n.get(o);if(l!=null){var s=e[l];$r(!s.newOption,'Duplicated option on id "'+o+'".'),s.newOption=i,s.existing=t[l],r[a]=null}}})}function K6(e,t){P(t,function(n,r){if(!(!n||n.name==null))for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||n.id==null)&&!rh(n)&&!rh(a)&&dI("name",a,n)){e[i].newOption=n,t[r]=null;return}}})}function J6(e,t,n){P(t,function(r){if(r){for(var i,a=0;(i=e[a])&&(i.newOption||rh(i.existing)||i.existing&&r.id!=null&&!dI("id",r,i.existing));)a++;i?(i.newOption=r,i.brandNew=n):e.push({newOption:r,brandNew:n,existing:null,keyInfo:null}),a++}})}function tV(e,t){P(t,function(n){e.push({newOption:n,brandNew:!0,existing:null,keyInfo:null})})}function eV(e){var t=Bt();P(e,function(n){var r=n.existing;r&&t.set(r.id,n)}),P(e,function(n){var r=n.newOption;$r(!r||r.id==null||!t.get(r.id)||t.get(r.id)===n,"id duplicates: "+(r&&r.id)),r&&r.id!=null&&t.set(r.id,n),!n.keyInfo&&(n.keyInfo={})}),P(e,function(n,r){var i=n.existing,a=n.newOption,o=n.keyInfo;if(Lt(a)){if(o.name=a.name!=null?Hf(a.name):i?i.name:fI+r,i)o.id=Hf(i.id);else if(a.id!=null)o.id=Hf(a.id);else{var l=0;do o.id="\0"+o.name+"\0"+l++;while(t.get(o.id))}t.set(o.id,n)}})}function dI(e,t,n){var r=Yn(t[e],null),i=Yn(n[e],null);return r!=null&&i!=null&&r===i}function Hf(e){return Yn(e,"")}function Yn(e,t){return e==null?t:St(e)?e:ve(e)||_x(e)?e+"":t}function T_(e){var t=e.name;return!!(t&&t.indexOf(fI))}function rh(e){return e&&e.id!=null&&Hf(e.id).indexOf(hI)===0}function nV(e){return hI+e}function rV(e,t,n){P(e,function(r){var i=r.newOption;Lt(i)&&(r.keyInfo.mainType=t,r.keyInfo.subType=iV(t,i,r.existing,n))})}function iV(e,t,n,r){var i=t.type?t.type:n?n.subType:r.determineSubType(e,t);return i}function aV(e,t){var n={},r={};return i(e||[],n),i(t||[],r,n),[a(n),a(r)];function i(o,l,s){for(var c=0,h=o.length;c<h;c++){var d=Yn(o[c].seriesId,null);if(d==null)return;for(var v=un(o[c].dataIndex),g=s&&s[d],m=0,x=v.length;m<x;m++){var _=v[m];g&&g[_]?g[_]=null:(l[d]||(l[d]={}))[_]=1}}}function a(o,l){var s=[];for(var c in o)if(o.hasOwnProperty(c)&&o[c]!=null)if(l)s.push(+c);else{var h=a(o[c],!0);h.length&&s.push({seriesId:c,dataIndex:h})}return s}}function Zl(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return mt(t.dataIndex)?bt(t.dataIndex,function(n){return e.indexOfRawIndex(n)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return mt(t.name)?bt(t.name,function(n){return e.indexOfName(n)}):e.indexOfName(t.name)}function be(){var e="__ec_inner_"+oV++;return function(t){return t[e]||(t[e]={})}}var oV=sI();function Vf(e,t,n){var r=C_(t,n),i=r.mainTypeSpecified,a=r.queryOptionMap,o=r.others,l=o,s=n?n.defaultMainType:null;return!i&&s&&a.set(s,{}),a.each(function(c,h){var d=Wu(e,h,c,{useDefault:s===h,enableAll:n&&n.enableAll!=null?n.enableAll:!0,enableNone:n&&n.enableNone!=null?n.enableNone:!0});l[h+"Models"]=d.models,l[h+"Model"]=d.models[0]}),l}function C_(e,t){var n;if(St(e)){var r={};r[e+"Index"]=0,n=r}else n=e;var i=Bt(),a={},o=!1;return P(n,function(l,s){if(s==="dataIndex"||s==="dataIndexInside"){a[s]=l;return}var c=s.match(/^(\w+)(Index|Id|Name)$/)||[],h=c[1],d=(c[2]||"").toLowerCase();if(!(!h||!d||t&&t.includeMainTypes&&Wt(t.includeMainTypes,h)<0)){o=o||!!h;var v=i.get(h)||i.set(h,{});v[d]=l}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var En={useDefault:!0,enableAll:!1,enableNone:!1},lV={useDefault:!1,enableAll:!0,enableNone:!0};function Wu(e,t,n,r){r=r||En;var i=n.index,a=n.id,o=n.name,l={models:null,specified:i!=null||a!=null||o!=null};if(!l.specified){var s=void 0;return l.models=r.useDefault&&(s=e.getComponent(t))?[s]:[],l}if(i==="none"||i===!1){if(r.enableNone)return l.models=[],l;i=-1}return i==="all"&&(r.enableAll?i=a=o=null:i=-1),l.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),l}function vI(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function sV(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function uV(e){return e==="auto"?Gt.domSupported?"html":"richText":e||"html"}function cV(e,t){var n=Bt(),r=[];return P(e,function(i){var a=t(i);(n.get(a)||(r.push(a),n.set(a,[]))).push(i)}),{keys:r,buckets:n}}function pI(e,t,n,r,i){var a=t==null||t==="auto";if(r==null)return r;if(ve(r)){var o=nA(n||0,r,i);return pn(o,a?Math.max(wa(n||0),wa(r)):t)}else{if(St(r))return i<1?n:r;for(var l=[],s=n,c=r,h=Math.max(s?s.length:0,c.length),d=0;d<h;++d){var v=e.getDimensionInfo(d);if(v&&v.type==="ordinal")l[d]=(i<1&&s?s:c)[d];else{var g=s&&s[d]?s[d]:0,m=c[d],o=nA(g,m,i);l[d]=pn(o,a?Math.max(wa(g),wa(m)):t)}}return l}}var fV=".",fl="___EC__COMPONENT__CONTAINER___",gI="___EC__EXTENDED_CLASS___";function Pi(e){var t={main:"",sub:""};if(e){var n=e.split(fV);t.main=n[0]||"",t.sub=n[1]||""}return t}function hV(e){$r(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}function dV(e){return!!(e&&e[gI])}function M_(e,t){e.$constructor=e,e.extend=function(n){var r=this,i;return vV(r)?i=(function(a){ot(o,a);function o(){return a.apply(this,arguments)||this}return o})(r):(i=function(){(n.$constructor||r).apply(this,arguments)},dH(i,this)),dt(i.prototype,n),i[gI]=!0,i.extend=this.extend,i.superCall=mV,i.superApply=yV,i.superClass=r,i}}function vV(e){return Rt(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function mI(e,t){e.extend=t.extend}var pV=Math.round(Math.random()*10);function gV(e){var t=["__\0is_clz",pV++].join("_");e.prototype[t]=!0,e.isInstance=function(n){return!!(n&&n[t])}}function mV(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function yV(e,t,n){return this.superClass.prototype[t].apply(e,n)}function wg(e){var t={};e.registerClass=function(r){var i=r.type||r.prototype.type;if(i){hV(i),r.prototype.type=i;var a=Pi(i);if(!a.sub)t[a.main]=r;else if(a.sub!==fl){var o=n(a);o[a.sub]=r}}return r},e.getClass=function(r,i,a){var o=t[r];if(o&&o[fl]&&(o=i?o[i]:null),a&&!o)throw new Error(i?"Component "+r+"."+(i||"")+" is used but not imported.":r+".type should be specified.");return o},e.getClassesByMainType=function(r){var i=Pi(r),a=[],o=t[i.main];return o&&o[fl]?P(o,function(l,s){s!==fl&&a.push(l)}):a.push(o),a},e.hasClass=function(r){var i=Pi(r);return!!t[i.main]},e.getAllClassMainTypes=function(){var r=[];return P(t,function(i,a){r.push(a)}),r},e.hasSubTypes=function(r){var i=Pi(r),a=t[i.main];return a&&a[fl]};function n(r){var i=t[r.main];return(!i||!i[fl])&&(i=t[r.main]={},i[fl]=!0),i}}function zu(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(r,i,a){for(var o={},l=0;l<e.length;l++){var s=e[l][1];if(!(i&&Wt(i,s)>=0||a&&Wt(a,s)<0)){var c=r.getShallow(s,t);c!=null&&(o[e[l][0]]=c)}}return o}}var xV=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],bV=zu(xV),_V=(function(){function e(){}return e.prototype.getAreaStyle=function(t,n){return bV(this,t,n)},e})(),Ux=new Iu(50);function SV(e){if(typeof e=="string"){var t=Ux.get(e);return t&&t.image}else return e}function yI(e,t,n,r,i){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!n)return t;var a=Ux.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!Tg(t)&&a.pending.push(o)):(t=mi.loadImage(e,iA,iA),t.__zrImageSrc=e,Ux.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function iA(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function Tg(e){return e&&e.width&&e.height}var j0=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function wV(e,t,n,r,i,a){if(!n){e.text="",e.isTruncated=!1;return}var o=(t+"").split(`
|
|
84
|
+
`);a=xI(n,r,i,a);for(var l=!1,s={},c=0,h=o.length;c<h;c++)bI(s,o[c],a),o[c]=s.textLine,l=l||s.isTruncated;e.text=o.join(`
|
|
85
|
+
`),e.isTruncated=l}function xI(e,t,n,r){r=r||{};var i=dt({},r);n=zt(n,"..."),i.maxIterations=zt(r.maxIterations,2);var a=i.minChar=zt(r.minChar,0),o=i.fontMeasureInfo=Vi(t),l=o.asciiCharWidth;i.placeholder=zt(r.placeholder,"");for(var s=e=Math.max(0,e-1),c=0;c<a&&s>=l;c++)s-=l;var h=ji(o,n);return h>s&&(n="",h=0),s=e-h,i.ellipsis=n,i.ellipsisWidth=h,i.contentWidth=s,i.containerWidth=e,i}function bI(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine="",e.isTruncated=!1;return}var o=ji(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var l=0;;l++){if(o<=i||l>=n.maxIterations){t+=n.ellipsis;break}var s=l===0?TV(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,s),o=ji(a,t)}t===""&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function TV(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=eI(n,e.charCodeAt(i));return i}function CV(e,t,n,r){var i=A_(e),a=t.overflow,o=t.padding,l=o?o[1]+o[3]:0,s=o?o[0]+o[2]:0,c=t.font,h=a==="truncate",d=_g(c),v=zt(t.lineHeight,d),g=t.lineOverflow==="truncate",m=!1,x=t.width;x==null&&n!=null&&(x=n-l);var _=t.height;_==null&&r!=null&&(_=r-s);var b;x!=null&&(a==="break"||a==="breakAll")?b=i?_I(i,t.font,x,a==="breakAll",0).lines:[]:b=i?i.split(`
|
|
86
|
+
`):[];var S=b.length*v;if(_==null&&(_=S),S>_&&g){var w=Math.floor(_/v);m=m||b.length>w,b=b.slice(0,w),S=b.length*v}if(i&&h&&x!=null)for(var A=xI(x,c,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),D={},M=0;M<b.length;M++)bI(D,b[M],A),b[M]=D.textLine,m=m||D.isTruncated;for(var L=_,I=0,N=Vi(c),M=0;M<b.length;M++)I=Math.max(ji(N,b[M]),I);x==null&&(x=I);var E=x;return L+=s,E+=l,{lines:b,height:_,outerWidth:E,outerHeight:L,lineHeight:v,calculatedLineHeight:d,contentWidth:I,contentHeight:S,width:x,isTruncated:m}}var MV=(function(){function e(){}return e})(),aA=(function(){function e(t){this.tokens=[],t&&(this.tokens=t)}return e})(),AV=(function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e})();function DV(e,t,n,r,i){var a=new AV,o=A_(e);if(!o)return a;var l=t.padding,s=l?l[1]+l[3]:0,c=l?l[0]+l[2]:0,h=t.width;h==null&&n!=null&&(h=n-s);var d=t.height;d==null&&r!=null&&(d=r-c);for(var v=t.overflow,g=(v==="break"||v==="breakAll")&&h!=null?{width:h,accumWidth:0,breakAll:v==="breakAll"}:null,m=j0.lastIndex=0,x;(x=j0.exec(o))!=null;){var _=x.index;_>m&&F0(a,o.substring(m,_),t,g),F0(a,x[2],t,g,x[1]),m=j0.lastIndex}m<o.length&&F0(a,o.substring(m,o.length),t,g);var b=[],S=0,w=0,A=v==="truncate",D=t.lineOverflow==="truncate",M={};function L(gt,wt,pt){gt.width=wt,gt.lineHeight=pt,S+=pt,w=Math.max(w,wt)}t:for(var I=0;I<a.lines.length;I++){for(var N=a.lines[I],E=0,O=0,j=0;j<N.tokens.length;j++){var B=N.tokens[j],U=B.styleName&&t.rich[B.styleName]||{},W=B.textPadding=U.padding,H=W?W[1]+W[3]:0,q=B.font=U.font||t.font;B.contentHeight=_g(q);var X=zt(U.height,B.contentHeight);if(B.innerHeight=X,W&&(X+=W[0]+W[2]),B.height=X,B.lineHeight=Co(U.lineHeight,t.lineHeight,X),B.align=U&&U.align||i,B.verticalAlign=U&&U.verticalAlign||"middle",D&&d!=null&&S+B.lineHeight>d){var J=a.lines.length;j>0?(N.tokens=N.tokens.slice(0,j),L(N,O,E),a.lines=a.lines.slice(0,I+1)):a.lines=a.lines.slice(0,I),a.isTruncated=a.isTruncated||a.lines.length<J;break t}var F=U.width,Y=F==null||F==="auto";if(typeof F=="string"&&F.charAt(F.length-1)==="%")B.percentWidth=F,b.push(B),B.contentWidth=ji(Vi(q),B.text);else{if(Y){var Z=U.backgroundColor,V=Z&&Z.image;V&&(V=SV(V),Tg(V)&&(B.width=Math.max(B.width,V.width*X/V.height)))}var tt=A&&h!=null?h-O:null;tt!=null&&tt<B.width?!Y||tt<H?(B.text="",B.width=B.contentWidth=0):(wV(M,B.text,tt-H,q,t.ellipsis,{minChar:t.truncateMinChar}),B.text=M.text,a.isTruncated=a.isTruncated||M.isTruncated,B.width=B.contentWidth=ji(Vi(q),B.text)):B.contentWidth=ji(Vi(q),B.text)}B.width+=H,O+=B.width,U&&(E=Math.max(E,B.lineHeight))}L(N,O,E)}a.outerWidth=a.width=zt(h,w),a.outerHeight=a.height=zt(d,S),a.contentHeight=S,a.contentWidth=w,a.outerWidth+=s,a.outerHeight+=c;for(var I=0;I<b.length;I++){var B=b[I],ut=B.percentWidth;B.width=parseInt(ut,10)/100*a.width}return a}function F0(e,t,n,r,i){var a=t==="",o=i&&n.rich[i]||{},l=e.lines,s=o.font||n.font,c=!1,h,d;if(r){var v=o.padding,g=v?v[1]+v[3]:0;if(o.width!=null&&o.width!=="auto"){var m=Fi(o.width,r.width)+g;l.length>0&&m+r.accumWidth>r.width&&(h=t.split(`
|
|
87
|
+
`),c=!0),r.accumWidth=m}else{var x=_I(t,s,r.width,r.breakAll,r.accumWidth);r.accumWidth=x.accumWidth+g,d=x.linesWidths,h=x.lines}}h||(h=t.split(`
|
|
88
|
+
`));for(var _=Vi(s),b=0;b<h.length;b++){var S=h[b],w=new MV;if(w.styleName=i,w.text=S,w.isLineHolder=!S&&!a,typeof o.width=="number"?w.width=o.width:w.width=d?d[b]:ji(_,S),!b&&!c){var A=(l[l.length-1]||(l[0]=new aA)).tokens,D=A.length;D===1&&A[0].isLineHolder?A[0]=w:(S||!D||a)&&A.push(w)}else l.push(new aA([w]))}}function kV(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var LV=Ro(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function EV(e){return kV(e)?!!LV[e]:!0}function _I(e,t,n,r,i){for(var a=[],o=[],l="",s="",c=0,h=0,d=Vi(t),v=0;v<e.length;v++){var g=e.charAt(v);if(g===`
|
|
89
|
+
`){s&&(l+=s,h+=c),a.push(l),o.push(h),l="",s="",c=0,h=0;continue}var m=eI(d,g.charCodeAt(0)),x=r?!1:!EV(g);if(a.length?h+m>n:i+h+m>n){h?(l||s)&&(x?(l||(l=s,s="",c=0,h=c),a.push(l),o.push(h-c),s+=g,c+=m,l="",h=c):(s&&(l+=s,s="",c=0),a.push(l),o.push(h),l=g,h=m)):x?(a.push(s),o.push(c),s=g,c=m):(a.push(g),o.push(m));continue}h+=m,x?(s+=g,c+=m):(s&&(l+=s,s="",c=0),l+=g)}return s&&(l+=s),l&&(a.push(l),o.push(h)),a.length===1&&(h+=i),{accumWidth:h,lines:a,linesWidths:o}}function oA(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,!!t){var o=t.width*2,l=t.height*2;Vt.set(lA,Ou(n,o,i),Fl(r,l,a),o,l),Vt.intersect(t,lA,null,sA);var s=sA.outIntersectRect;e.outerWidth=s.width,e.outerHeight=s.height,e.baseX=Ou(s.x,s.width,i,!0),e.baseY=Fl(s.y,s.height,a,!0)}}var lA=new Vt(0,0,0,0),sA={outIntersectRect:{},clamp:!0};function A_(e){return e!=null?e+="":e=""}function RV(e){var t=A_(e.text),n=e.font,r=ji(Vi(n),t),i=_g(n);return Yx(e,r,i,null)}function Yx(e,t,n,r){var i=new Vt(Ou(e.x||0,t,e.textAlign),Fl(e.y||0,n,e.textBaseline),t,n),a=r??(SI(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function SI(e){var t=e.stroke;return t!=null&&t!=="none"&&e.lineWidth>0}var Wx="__zr_style_"+Math.round(Math.random()*10),Gl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Cg={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Gl[Wx]=!0;var uA=["z","z2","invisible"],IV=["invisible"],qu=(function(e){ot(t,e);function t(n){return e.call(this,n)||this}return t.prototype._init=function(n){for(var r=Be(n),i=0;i<r.length;i++){var a=r[i];a==="style"?this.useStyle(n[a]):e.prototype.attrKV.call(this,a,n[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(n,r,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&OV(this,n,r)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths&&this.__clipPaths.length){for(var l=0;l<this.__clipPaths.length;++l)if(this.__clipPaths[l].isZeroArea())return!1}if(a&&this.parent)for(var s=this.parent;s;){if(s.ignore)return!1;s=s.parent}return!0},t.prototype.contain=function(n,r){return this.rectContain(n,r)},t.prototype.traverse=function(n,r){n.call(r,this)},t.prototype.rectContain=function(n,r){var i=this.transformCoordToLocal(n,r),a=this.getBoundingRect();return a.contain(i[0],i[1])},t.prototype.getPaintRect=function(){var n=this._paintRect;if(!this._paintRect||this.__dirty){var r=this.transform,i=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,l=a.shadowOffsetX||0,s=a.shadowOffsetY||0;n=this._paintRect||(this._paintRect=new Vt(0,0,0,0)),r?Vt.applyTransform(n,i,r):n.copy(i),(o||l||s)&&(n.width+=o*2+Math.abs(l),n.height+=o*2+Math.abs(s),n.x=Math.min(n.x,n.x+l-o),n.y=Math.min(n.y,n.y+s-o));var c=this.dirtyRectTolerance;n.isZero()||(n.x=Math.floor(n.x-c),n.y=Math.floor(n.y-c),n.width=Math.ceil(n.width+1+c*2),n.height=Math.ceil(n.height+1+c*2))}return n},t.prototype.setPrevPaintRect=function(n){n?(this._prevPaintRect=this._prevPaintRect||new Vt(0,0,0,0),this._prevPaintRect.copy(n)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(n){return this.animate("style",n)},t.prototype.updateDuringAnimation=function(n){n==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(n,r){n!=="style"?e.prototype.attrKV.call(this,n,r):this.style?this.setStyle(r):this.useStyle(r)},t.prototype.setStyle=function(n,r){return typeof n=="string"?this.style[n]=r:dt(this.style,n),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(n){n||this.markRedraw(),this.__dirty|=Af,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&Af)},t.prototype.styleUpdated=function(){this.__dirty&=~Af},t.prototype.createStyle=function(n){return bg(Gl,n)},t.prototype.useStyle=function(n){n[Wx]||(n=this.createStyle(n)),this.__inHover?this.__hoverStyle=n:this.style=n,this.dirtyStyle()},t.prototype.isStyleObject=function(n){return n[Wx]},t.prototype._innerSaveToNormal=function(n){e.prototype._innerSaveToNormal.call(this,n);var r=this._normalState;n.style&&!r.style&&(r.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(n,r,uA)},t.prototype._applyStateObj=function(n,r,i,a,o,l){e.prototype._applyStateObj.call(this,n,r,i,a,o,l);var s=!(r&&a),c;if(r&&r.style?o?a?c=r.style:(c=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(c,r.style)):(c=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(c,r.style)):s&&(c=i.style),c)if(o){var h=this.style;if(this.style=this.createStyle(s?{}:h),s)for(var d=Be(h),v=0;v<d.length;v++){var g=d[v];g in c&&(c[g]=c[g],this.style[g]=h[g])}for(var m=Be(c),v=0;v<m.length;v++){var g=m[v];this.style[g]=this.style[g]}this._transitionState(n,{style:c},l,this.getAnimationStyleProps())}else this.useStyle(c);for(var x=this.__inHover?IV:uA,v=0;v<x.length;v++){var g=x[v];r&&r[g]!=null?this[g]=r[g]:s&&i[g]!=null&&(this[g]=i[g])}},t.prototype._mergeStates=function(n){for(var r=e.prototype._mergeStates.call(this,n),i,a=0;a<n.length;a++){var o=n[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(r.style=i),r},t.prototype._mergeStyle=function(n,r){return dt(n,r),n},t.prototype.getAnimationStyleProps=function(){return Cg},t.initDefaultProps=(function(){var n=t.prototype;n.type="displayable",n.invisible=!1,n.z=0,n.z2=0,n.zlevel=0,n.culling=!1,n.cursor="pointer",n.rectHover=!1,n.incremental=!1,n._rect=null,n.dirtyRectTolerance=0,n.__dirty=Sr|Af})(),t})(Sg),G0=new Vt(0,0,0,0),U0=new Vt(0,0,0,0);function OV(e,t,n){return G0.copy(e.getBoundingRect()),e.transform&&G0.applyTransform(e.transform),U0.width=t,U0.height=n,!G0.intersect(U0)}var Ur=Math.min,Yr=Math.max,Y0=Math.sin,W0=Math.cos,hl=Math.PI*2,dv=Gu(),vv=Gu(),pv=Gu();function cA(e,t,n,r,i,a){i[0]=Ur(e,n),i[1]=Ur(t,r),a[0]=Yr(e,n),a[1]=Yr(t,r)}var fA=[],hA=[];function zV(e,t,n,r,i,a,o,l,s,c){var h=WR,d=Tn,v=h(e,n,i,o,fA);s[0]=1/0,s[1]=1/0,c[0]=-1/0,c[1]=-1/0;for(var g=0;g<v;g++){var m=d(e,n,i,o,fA[g]);s[0]=Ur(m,s[0]),c[0]=Yr(m,c[0])}v=h(t,r,a,l,hA);for(var g=0;g<v;g++){var x=d(t,r,a,l,hA[g]);s[1]=Ur(x,s[1]),c[1]=Yr(x,c[1])}s[0]=Ur(e,s[0]),c[0]=Yr(e,c[0]),s[0]=Ur(o,s[0]),c[0]=Yr(o,c[0]),s[1]=Ur(t,s[1]),c[1]=Yr(t,c[1]),s[1]=Ur(l,s[1]),c[1]=Yr(l,c[1])}function BV(e,t,n,r,i,a,o,l){var s=qR,c=or,h=Yr(Ur(s(e,n,i),1),0),d=Yr(Ur(s(t,r,a),1),0),v=c(e,n,i,h),g=c(t,r,a,d);o[0]=Ur(e,i,v),o[1]=Ur(t,a,g),l[0]=Yr(e,i,v),l[1]=Yr(t,a,g)}function NV(e,t,n,r,i,a,o,l,s){var c=bu,h=_u,d=Math.abs(i-a);if(d%hl<1e-4&&d>1e-4){l[0]=e-n,l[1]=t-r,s[0]=e+n,s[1]=t+r;return}if(dv[0]=W0(i)*n+e,dv[1]=Y0(i)*r+t,vv[0]=W0(a)*n+e,vv[1]=Y0(a)*r+t,c(l,dv,vv),h(s,dv,vv),i=i%hl,i<0&&(i=i+hl),a=a%hl,a<0&&(a=a+hl),i>a&&!o?a+=hl:i<a&&o&&(i+=hl),o){var v=a;a=i,i=v}for(var g=0;g<a;g+=Math.PI/2)g>i&&(pv[0]=W0(g)*n+e,pv[1]=Y0(g)*r+t,c(l,pv,l),h(s,pv,s))}var we={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},dl=[],vl=[],Ai=[],no=[],Di=[],ki=[],q0=Math.min,X0=Math.max,pl=Math.cos,gl=Math.sin,pa=Math.abs,qx=Math.PI,ho=qx*2,Z0=typeof Float32Array<"u",$c=[];function $0(e){var t=Math.round(e/qx*1e8)/1e8;return t%2*qx}function D_(e,t){var n=$0(e[0]);n<0&&(n+=ho);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=ho?i=n+ho:t&&n-i>=ho?i=n-ho:!t&&n>i?i=n+(ho-$0(n-i)):t&&n<i&&(i=n-(ho-$0(i-n))),e[0]=n,e[1]=i}var $l=(function(){function e(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(t,n,r){r=r||0,r>0&&(this._ux=pa(r/kp/t)||0,this._uy=pa(r/kp/n)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,n){return this._drawPendingPt(),this.addData(we.M,t,n),this._ctx&&this._ctx.moveTo(t,n),this._x0=t,this._y0=n,this._xi=t,this._yi=n,this},e.prototype.lineTo=function(t,n){var r=pa(t-this._xi),i=pa(n-this._yi),a=r>this._ux||i>this._uy;if(this.addData(we.L,t,n),this._ctx&&a&&this._ctx.lineTo(t,n),a)this._xi=t,this._yi=n,this._pendingPtDist=0;else{var o=r*r+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=n,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,n,r,i,a,o){return this._drawPendingPt(),this.addData(we.C,t,n,r,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,n,r,i,a,o),this._xi=a,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,n,r,i){return this._drawPendingPt(),this.addData(we.Q,t,n,r,i),this._ctx&&this._ctx.quadraticCurveTo(t,n,r,i),this._xi=r,this._yi=i,this},e.prototype.arc=function(t,n,r,i,a,o){this._drawPendingPt(),$c[0]=i,$c[1]=a,D_($c,o),i=$c[0],a=$c[1];var l=a-i;return this.addData(we.A,t,n,r,r,i,l,0,o?0:1),this._ctx&&this._ctx.arc(t,n,r,i,a,o),this._xi=pl(a)*r+t,this._yi=gl(a)*r+n,this},e.prototype.arcTo=function(t,n,r,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,n,r,i,a),this},e.prototype.rect=function(t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,n,r,i),this.addData(we.R,t,n,r,i),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(we.Z);var t=this._ctx,n=this._x0,r=this._y0;return t&&t.closePath(),this._xi=n,this._yi=r,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){if(this._saveData){var n=t.length;!(this.data&&this.data.length===n)&&Z0&&(this.data=new Float32Array(n));for(var r=0;r<n;r++)this.data[r]=t[r];this._len=n}},e.prototype.appendPath=function(t){if(this._saveData){t instanceof Array||(t=[t]);for(var n=t.length,r=0,i=this._len,a=0;a<n;a++)r+=t[a].len();var o=this.data;if(Z0&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(i+r),i>0&&o))for(var l=0;l<i;l++)this.data[l]=o[l];for(var a=0;a<n;a++)for(var s=t[a].data,l=0;l<s.length;l++)this.data[i++]=s[l];this._len=i}},e.prototype.addData=function(t,n,r,i,a,o,l,s,c){if(this._saveData){var h=this.data;this._len+arguments.length>h.length&&(this._expandData(),h=this.data);for(var d=0;d<arguments.length;d++)h[this._len++]=arguments[d]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],n=0;n<this._len;n++)t[n]=this.data[n];this.data=t}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,Z0&&this._len>11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){Ai[0]=Ai[1]=Di[0]=Di[1]=Number.MAX_VALUE,no[0]=no[1]=ki[0]=ki[1]=-Number.MAX_VALUE;var t=this.data,n=0,r=0,i=0,a=0,o;for(o=0;o<this._len;){var l=t[o++],s=o===1;switch(s&&(n=t[o],r=t[o+1],i=n,a=r),l){case we.M:n=i=t[o++],r=a=t[o++],Di[0]=i,Di[1]=a,ki[0]=i,ki[1]=a;break;case we.L:cA(n,r,t[o],t[o+1],Di,ki),n=t[o++],r=t[o++];break;case we.C:zV(n,r,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],Di,ki),n=t[o++],r=t[o++];break;case we.Q:BV(n,r,t[o++],t[o++],t[o],t[o+1],Di,ki),n=t[o++],r=t[o++];break;case we.A:var c=t[o++],h=t[o++],d=t[o++],v=t[o++],g=t[o++],m=t[o++]+g;o+=1;var x=!t[o++];s&&(i=pl(g)*d+c,a=gl(g)*v+h),NV(c,h,d,v,g,m,x,Di,ki),n=pl(m)*d+c,r=gl(m)*v+h;break;case we.R:i=n=t[o++],a=r=t[o++];var _=t[o++],b=t[o++];cA(i,a,i+_,a+b,Di,ki);break;case we.Z:n=i,r=a;break}bu(Ai,Ai,Di),_u(no,no,ki)}return o===0&&(Ai[0]=Ai[1]=no[0]=no[1]=0),new Vt(Ai[0],Ai[1],no[0]-Ai[0],no[1]-Ai[1])},e.prototype._calculateLength=function(){var t=this.data,n=this._len,r=this._ux,i=this._uy,a=0,o=0,l=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var c=this._pathSegLen,h=0,d=0,v=0;v<n;){var g=t[v++],m=v===1;m&&(a=t[v],o=t[v+1],l=a,s=o);var x=-1;switch(g){case we.M:a=l=t[v++],o=s=t[v++];break;case we.L:{var _=t[v++],b=t[v++],S=_-a,w=b-o;(pa(S)>r||pa(w)>i||v===n-1)&&(x=Math.sqrt(S*S+w*w),a=_,o=b);break}case we.C:{var A=t[v++],D=t[v++],_=t[v++],b=t[v++],M=t[v++],L=t[v++];x=t6(a,o,A,D,_,b,M,L,10),a=M,o=L;break}case we.Q:{var A=t[v++],D=t[v++],_=t[v++],b=t[v++];x=r6(a,o,A,D,_,b,10),a=_,o=b;break}case we.A:var I=t[v++],N=t[v++],E=t[v++],O=t[v++],j=t[v++],B=t[v++],U=B+j;v+=1,m&&(l=pl(j)*E+I,s=gl(j)*O+N),x=X0(E,O)*q0(ho,Math.abs(B)),a=pl(U)*E+I,o=gl(U)*O+N;break;case we.R:{l=a=t[v++],s=o=t[v++];var W=t[v++],H=t[v++];x=W*2+H*2;break}case we.Z:{var S=l-a,w=s-o;x=Math.sqrt(S*S+w*w),a=l,o=s;break}}x>=0&&(c[d++]=x,h+=x)}return this._pathLen=h,h},e.prototype.rebuildPath=function(t,n){var r=this.data,i=this._ux,a=this._uy,o=this._len,l,s,c,h,d,v,g=n<1,m,x,_=0,b=0,S,w=0,A,D;if(!(g&&(this._pathSegLen||this._calculateLength(),m=this._pathSegLen,x=this._pathLen,S=n*x,!S)))t:for(var M=0;M<o;){var L=r[M++],I=M===1;switch(I&&(c=r[M],h=r[M+1],l=c,s=h),L!==we.L&&w>0&&(t.lineTo(A,D),w=0),L){case we.M:l=c=r[M++],s=h=r[M++],t.moveTo(c,h);break;case we.L:{d=r[M++],v=r[M++];var N=pa(d-c),E=pa(v-h);if(N>i||E>a){if(g){var O=m[b++];if(_+O>S){var j=(S-_)/O;t.lineTo(c*(1-j)+d*j,h*(1-j)+v*j);break t}_+=O}t.lineTo(d,v),c=d,h=v,w=0}else{var B=N*N+E*E;B>w&&(A=d,D=v,w=B)}break}case we.C:{var U=r[M++],W=r[M++],H=r[M++],q=r[M++],X=r[M++],J=r[M++];if(g){var O=m[b++];if(_+O>S){var j=(S-_)/O;Mp(c,U,H,X,j,dl),Mp(h,W,q,J,j,vl),t.bezierCurveTo(dl[1],vl[1],dl[2],vl[2],dl[3],vl[3]);break t}_+=O}t.bezierCurveTo(U,W,H,q,X,J),c=X,h=J;break}case we.Q:{var U=r[M++],W=r[M++],H=r[M++],q=r[M++];if(g){var O=m[b++];if(_+O>S){var j=(S-_)/O;Ap(c,U,H,j,dl),Ap(h,W,q,j,vl),t.quadraticCurveTo(dl[1],vl[1],dl[2],vl[2]);break t}_+=O}t.quadraticCurveTo(U,W,H,q),c=H,h=q;break}case we.A:var F=r[M++],Y=r[M++],Z=r[M++],V=r[M++],tt=r[M++],ut=r[M++],gt=r[M++],wt=!r[M++],pt=Z>V?Z:V,vt=pa(Z-V)>.001,Dt=tt+ut,yt=!1;if(g){var O=m[b++];_+O>S&&(Dt=tt+ut*(S-_)/O,yt=!0),_+=O}if(vt&&t.ellipse?t.ellipse(F,Y,Z,V,gt,tt,Dt,wt):t.arc(F,Y,pt,tt,Dt,wt),yt)break t;I&&(l=pl(tt)*Z+F,s=gl(tt)*V+Y),c=pl(Dt)*Z+F,h=gl(Dt)*V+Y;break;case we.R:l=c=r[M],s=h=r[M+1],d=r[M++],v=r[M++];var Mt=r[M++],_e=r[M++];if(g){var O=m[b++];if(_+O>S){var Jt=S-_;t.moveTo(d,v),t.lineTo(d+q0(Jt,Mt),v),Jt-=Mt,Jt>0&&t.lineTo(d+Mt,v+q0(Jt,_e)),Jt-=_e,Jt>0&&t.lineTo(d+X0(Mt-Jt,0),v+_e),Jt-=Mt,Jt>0&&t.lineTo(d,v+X0(_e-Jt,0));break t}_+=O}t.rect(d,v,Mt,_e);break;case we.Z:if(g){var O=m[b++];if(_+O>S){var j=(S-_)/O;t.lineTo(c*(1-j)+l*j,h*(1-j)+s*j);break t}_+=O}t.closePath(),c=l,h=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=we,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e})();function $s(e,t,n,r,i,a,o){if(i===0)return!1;var l=i,s=0,c=e;if(o>t+l&&o>r+l||o<t-l&&o<r-l||a>e+l&&a>n+l||a<e-l&&a<n-l)return!1;if(e!==n)s=(t-r)/(e-n),c=(e*r-n*t)/(e-n);else return Math.abs(a-e)<=l/2;var h=s*a-o+c,d=h*h/(s*s+1);return d<=l/2*l/2}function PV(e,t,n,r,i,a,o,l,s,c,h){if(s===0)return!1;var d=s;if(h>t+d&&h>r+d&&h>a+d&&h>l+d||h<t-d&&h<r-d&&h<a-d&&h<l-d||c>e+d&&c>n+d&&c>i+d&&c>o+d||c<e-d&&c<n-d&&c<i-d&&c<o-d)return!1;var v=JH(e,t,n,r,i,a,o,l,c,h);return v<=d/2}function HV(e,t,n,r,i,a,o,l,s){if(o===0)return!1;var c=o;if(s>t+c&&s>r+c&&s>a+c||s<t-c&&s<r-c&&s<a-c||l>e+c&&l>n+c&&l>i+c||l<e-c&&l<n-c&&l<i-c)return!1;var h=n6(e,t,n,r,i,a,l,s);return h<=c/2}var dA=Math.PI*2;function xo(e){return e%=dA,e<0&&(e+=dA),e}var Qc=Math.PI*2;function VV(e,t,n,r,i,a,o,l,s){if(o===0)return!1;var c=o;l-=e,s-=t;var h=Math.sqrt(l*l+s*s);if(h-c>n||h+c<n)return!1;if(Math.abs(r-i)%Qc<1e-4)return!0;if(a){var d=r;r=xo(i),i=xo(d)}else r=xo(r),i=xo(i);r>i&&(i+=Qc);var v=Math.atan2(s,l);return v<0&&(v+=Qc),v>=r&&v<=i||v+Qc>=r&&v+Qc<=i}function ml(e,t,n,r,i,a){if(a>t&&a>r||a<t&&a<r||r===t)return 0;var o=(a-t)/(r-t),l=r<t?1:-1;(o===1||o===0)&&(l=r<t?.5:-.5);var s=o*(n-e)+e;return s===i?1/0:s>i?l:0}var ro=$l.CMD,yl=Math.PI*2,jV=1e-4;function FV(e,t){return Math.abs(e-t)<jV}var Vn=[-1,-1,-1],Fr=[-1,-1];function GV(){var e=Fr[0];Fr[0]=Fr[1],Fr[1]=e}function UV(e,t,n,r,i,a,o,l,s,c){if(c>t&&c>r&&c>a&&c>l||c<t&&c<r&&c<a&&c<l)return 0;var h=Cp(t,r,a,l,c,Vn);if(h===0)return 0;for(var d=0,v=-1,g=void 0,m=void 0,x=0;x<h;x++){var _=Vn[x],b=_===0||_===1?.5:1,S=Tn(e,n,i,o,_);S<s||(v<0&&(v=WR(t,r,a,l,Fr),Fr[1]<Fr[0]&&v>1&&GV(),g=Tn(t,r,a,l,Fr[0]),v>1&&(m=Tn(t,r,a,l,Fr[1]))),v===2?_<Fr[0]?d+=g<t?b:-b:_<Fr[1]?d+=m<g?b:-b:d+=l<m?b:-b:_<Fr[0]?d+=g<t?b:-b:d+=l<g?b:-b)}return d}function YV(e,t,n,r,i,a,o,l){if(l>t&&l>r&&l>a||l<t&&l<r&&l<a)return 0;var s=e6(t,r,a,l,Vn);if(s===0)return 0;var c=qR(t,r,a);if(c>=0&&c<=1){for(var h=0,d=or(t,r,a,c),v=0;v<s;v++){var g=Vn[v]===0||Vn[v]===1?.5:1,m=or(e,n,i,Vn[v]);m<o||(Vn[v]<c?h+=d<t?g:-g:h+=a<d?g:-g)}return h}else{var g=Vn[0]===0||Vn[0]===1?.5:1,m=or(e,n,i,Vn[0]);return m<o?0:a<t?g:-g}}function WV(e,t,n,r,i,a,o,l){if(l-=t,l>n||l<-n)return 0;var s=Math.sqrt(n*n-l*l);Vn[0]=-s,Vn[1]=s;var c=Math.abs(r-i);if(c<1e-4)return 0;if(c>=yl-1e-4){r=0,i=yl;var h=a?1:-1;return o>=Vn[0]+e&&o<=Vn[1]+e?h:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=yl,i+=yl);for(var v=0,g=0;g<2;g++){var m=Vn[g];if(m+e>o){var x=Math.atan2(l,m),h=a?1:-1;x<0&&(x=yl+x),(x>=r&&x<=i||x+yl>=r&&x+yl<=i)&&(x>Math.PI/2&&x<Math.PI*1.5&&(h=-h),v+=h)}}return v}function wI(e,t,n,r,i){for(var a=e.data,o=e.len(),l=0,s=0,c=0,h=0,d=0,v,g,m=0;m<o;){var x=a[m++],_=m===1;switch(x===ro.M&&m>1&&(n||(l+=ml(s,c,h,d,r,i))),_&&(s=a[m],c=a[m+1],h=s,d=c),x){case ro.M:h=a[m++],d=a[m++],s=h,c=d;break;case ro.L:if(n){if($s(s,c,a[m],a[m+1],t,r,i))return!0}else l+=ml(s,c,a[m],a[m+1],r,i)||0;s=a[m++],c=a[m++];break;case ro.C:if(n){if(PV(s,c,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else l+=UV(s,c,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;s=a[m++],c=a[m++];break;case ro.Q:if(n){if(HV(s,c,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else l+=YV(s,c,a[m++],a[m++],a[m],a[m+1],r,i)||0;s=a[m++],c=a[m++];break;case ro.A:var b=a[m++],S=a[m++],w=a[m++],A=a[m++],D=a[m++],M=a[m++];m+=1;var L=!!(1-a[m++]);v=Math.cos(D)*w+b,g=Math.sin(D)*A+S,_?(h=v,d=g):l+=ml(s,c,v,g,r,i);var I=(r-b)*A/w+b;if(n){if(VV(b,S,A,D,D+M,L,t,I,i))return!0}else l+=WV(b,S,A,D,D+M,L,I,i);s=Math.cos(D+M)*w+b,c=Math.sin(D+M)*A+S;break;case ro.R:h=s=a[m++],d=c=a[m++];var N=a[m++],E=a[m++];if(v=h+N,g=d+E,n){if($s(h,d,v,d,t,r,i)||$s(v,d,v,g,t,r,i)||$s(v,g,h,g,t,r,i)||$s(h,g,h,d,t,r,i))return!0}else l+=ml(v,d,v,g,r,i),l+=ml(h,g,h,d,r,i);break;case ro.Z:if(n){if($s(s,c,h,d,t,r,i))return!0}else l+=ml(s,c,h,d,r,i);s=h,c=d;break}}return!n&&!FV(c,d)&&(l+=ml(s,c,h,d,r,i)||0),l!==0}function qV(e,t,n){return wI(e,0,!1,t,n)}function XV(e,t,n,r){return wI(e,t,!0,n,r)}var TI=$t({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Gl),ZV={style:$t({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Cg.style)},Q0=th.concat(["invisible","culling","z","z2","zlevel","parent"]),ce=(function(e){ot(t,e);function t(n){return e.call(this,n)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(s){n.buildPath(s,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var l=0;l<Q0.length;++l)i[Q0[l]]=this[Q0[l]];i.__dirty|=Sr}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(n){var r=Be(n);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var a=0;a<r.length;a++){var o=r[a],l=n[o];o==="style"?this.style?dt(this.style,l):this.useStyle(l):o==="shape"?dt(this.shape,l):e.prototype.attrKV.call(this,o,l)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var n=this.style.fill;if(n!=="none"){if(St(n)){var r=Dp(n,0);return r>.5?Vx:r>.2?C6:jx}else if(n)return jx}return Vx},t.prototype.getInsideTextStroke=function(n){var r=this.style.fill;if(St(r)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Dp(n,0)<Hx;if(a===o)return r}},t.prototype.buildPath=function(n,r,i){},t.prototype.pathUpdated=function(){this.__dirty&=~mu},t.prototype.getUpdatedPathProxy=function(n){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,n),this.path},t.prototype.createPathProxy=function(){this.path=new $l(!1)},t.prototype.hasStroke=function(){var n=this.style,r=n.stroke;return!(r==null||r==="none"||!(n.lineWidth>0))},t.prototype.hasFill=function(){var n=this.style,r=n.fill;return r!=null&&r!=="none"},t.prototype.getBoundingRect=function(){var n=this._rect,r=this.style,i=!n;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&mu)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),n=o.getBoundingRect()}if(this._rect=n,this.hasStroke()&&this.path&&this.path.len()>0){var l=this._rectStroke||(this._rectStroke=n.clone());if(this.__dirty||i){l.copy(n);var s=r.strokeNoScale?this.getLineScale():1,c=r.lineWidth;if(!this.hasFill()){var h=this.strokeContainThreshold;c=Math.max(c,h??4)}s>1e-10&&(l.width+=c/s,l.height+=c/s,l.x-=c/s/2,l.y-=c/s/2)}return l}return n},t.prototype.contain=function(n,r){var i=this.transformCoordToLocal(n,r),a=this.getBoundingRect(),o=this.style;if(n=i[0],r=i[1],a.contain(n,r)){var l=this.path;if(this.hasStroke()){var s=o.lineWidth,c=o.strokeNoScale?this.getLineScale():1;if(c>1e-10&&(this.hasFill()||(s=Math.max(s,this.strokeContainThreshold)),XV(l,s/c,n,r)))return!0}if(this.hasFill())return qV(l,n,r)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=mu,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(n){return this.animate("shape",n)},t.prototype.updateDuringAnimation=function(n){n==="style"?this.dirtyStyle():n==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(n,r){n==="shape"?this.setShape(r):e.prototype.attrKV.call(this,n,r)},t.prototype.setShape=function(n,r){var i=this.shape;return i||(i=this.shape={}),typeof n=="string"?i[n]=r:dt(i,n),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&mu)},t.prototype.createStyle=function(n){return bg(TI,n)},t.prototype._innerSaveToNormal=function(n){e.prototype._innerSaveToNormal.call(this,n);var r=this._normalState;n.shape&&!r.shape&&(r.shape=dt({},this.shape))},t.prototype._applyStateObj=function(n,r,i,a,o,l){e.prototype._applyStateObj.call(this,n,r,i,a,o,l);var s=!(r&&a),c;if(r&&r.shape?o?a?c=r.shape:(c=dt({},i.shape),dt(c,r.shape)):(c=dt({},a?this.shape:i.shape),dt(c,r.shape)):s&&(c=i.shape),c)if(o){this.shape=dt({},this.shape);for(var h={},d=Be(c),v=0;v<d.length;v++){var g=d[v];typeof c[g]=="object"?this.shape[g]=c[g]:h[g]=c[g]}this._transitionState(n,{shape:h},l)}else this.shape=c,this.dirtyShape()},t.prototype._mergeStates=function(n){for(var r=e.prototype._mergeStates.call(this,n),i,a=0;a<n.length;a++){var o=n[a];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(r.shape=i),r},t.prototype.getAnimationStyleProps=function(){return ZV},t.prototype.isZeroArea=function(){return!1},t.extend=function(n){var r=(function(a){ot(o,a);function o(l){var s=a.call(this,l)||this;return n.init&&n.init.call(s,l),s}return o.prototype.getDefaultStyle=function(){return It(n.style)},o.prototype.getDefaultShape=function(){return It(n.shape)},o})(t);for(var i in n)typeof n[i]=="function"&&(r.prototype[i]=n[i]);return r},t.initDefaultProps=(function(){var n=t.prototype;n.type="path",n.strokeContainThreshold=5,n.segmentIgnoreThreshold=0,n.subPixelOptimize=!1,n.autoBatch=!1,n.__dirty=Sr|Af|mu})(),t})(qu),$V=$t({strokeFirst:!0,font:Eo,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},TI),Ip=(function(e){ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return SI(this.style)},t.prototype.hasFill=function(){var n=this.style,r=n.fill;return r!=null&&r!=="none"},t.prototype.createStyle=function(n){return bg($V,n)},t.prototype.setBoundingRect=function(n){this._rect=n},t.prototype.getBoundingRect=function(){return this._rect||(this._rect=RV(this.style)),this._rect},t.initDefaultProps=(function(){var n=t.prototype;n.dirtyRectTolerance=10})(),t})(qu);Ip.prototype.type="tspan";var QV=$t({x:0,y:0},Gl),KV={style:$t({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Cg.style)};function JV(e){return!!(e&&typeof e!="string"&&e.width&&e.height)}var Jr=(function(e){ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(n){return bg(QV,n)},t.prototype._getSize=function(n){var r=this.style,i=r[n];if(i!=null)return i;var a=JV(r.image)?r.image:this.__image;if(!a)return 0;var o=n==="width"?"height":"width",l=r[o];return l==null?a[n]:a[n]/a[o]*l},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return KV},t.prototype.getBoundingRect=function(){var n=this.style;return this._rect||(this._rect=new Vt(n.x||0,n.y||0,this.getWidth(),this.getHeight())),this._rect},t})(qu);Jr.prototype.type="image";function tj(e,t){var n=t.x,r=t.y,i=t.width,a=t.height,o=t.r,l,s,c,h;i<0&&(n=n+i,i=-i),a<0&&(r=r+a,a=-a),typeof o=="number"?l=s=c=h=o:o instanceof Array?o.length===1?l=s=c=h=o[0]:o.length===2?(l=c=o[0],s=h=o[1]):o.length===3?(l=o[0],s=h=o[1],c=o[2]):(l=o[0],s=o[1],c=o[2],h=o[3]):l=s=c=h=0;var d;l+s>i&&(d=l+s,l*=i/d,s*=i/d),c+h>i&&(d=c+h,c*=i/d,h*=i/d),s+c>a&&(d=s+c,s*=a/d,c*=a/d),l+h>a&&(d=l+h,l*=a/d,h*=a/d),e.moveTo(n+l,r),e.lineTo(n+i-s,r),s!==0&&e.arc(n+i-s,r+s,s,-Math.PI/2,0),e.lineTo(n+i,r+a-c),c!==0&&e.arc(n+i-c,r+a-c,c,0,Math.PI/2),e.lineTo(n+h,r+a),h!==0&&e.arc(n+h,r+a-h,h,Math.PI/2,Math.PI),e.lineTo(n,r+l),l!==0&&e.arc(n+l,r+l,l,Math.PI,Math.PI*1.5)}var Tu=Math.round;function CI(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var l=n&&n.lineWidth;return l&&(Tu(r*2)===Tu(i*2)&&(e.x1=e.x2=Bl(r,l,!0)),Tu(a*2)===Tu(o*2)&&(e.y1=e.y2=Bl(a,l,!0))),e}}function MI(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var l=n&&n.lineWidth;return l&&(e.x=Bl(r,l,!0),e.y=Bl(i,l,!0),e.width=Math.max(Bl(r+a,l,!1)-e.x,a===0?0:1),e.height=Math.max(Bl(i+o,l,!1)-e.y,o===0?0:1)),e}}function Bl(e,t,n){if(!t)return e;var r=Tu(e*2);return(r+Tu(t))%2===0?r/2:(r+(n?1:-1))/2}var ej=(function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e})(),nj={},le=(function(e){ot(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new ej},t.prototype.buildPath=function(n,r){var i,a,o,l;if(this.subPixelOptimize){var s=MI(nj,r,this.style);i=s.x,a=s.y,o=s.width,l=s.height,s.r=r.r,r=s}else i=r.x,a=r.y,o=r.width,l=r.height;r.r?tj(n,r):n.rect(i,a,o,l)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t})(ce);le.prototype.type="rect";var vA={fill:"#000"},pA=2,Li={},rj={style:$t({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},Cg.style)},me=(function(e){ot(t,e);function t(n){var r=e.call(this)||this;return r.type="text",r._children=[],r._defaultStyle=vA,r.attr(n),r}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var n=0;n<this._children.length;n++){var r=this._children[n];r.zlevel=this.zlevel,r.z=this.z,r.z2=this.z2,r.culling=this.culling,r.cursor=this.cursor,r.invisible=this.invisible}},t.prototype.updateTransform=function(){var n=this.innerTransformable;n?(n.updateTransform(),n.transform&&(this.transform=n.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(n){var r=this.innerTransformable;return r?r.getLocalTransform(n):e.prototype.getLocalTransform.call(this,n)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,sj(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(n){e.prototype.addSelfToZr.call(this,n);for(var r=0;r<this._children.length;r++)this._children[r].__zr=n},t.prototype.removeSelfFromZr=function(n){e.prototype.removeSelfFromZr.call(this,n);for(var r=0;r<this._children.length;r++)this._children[r].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var n=new Vt(0,0,0,0),r=this._children,i=[],a=null,o=0;o<r.length;o++){var l=r[o],s=l.getBoundingRect(),c=l.getLocalTransform(i);c?(n.copy(s),n.applyTransform(c),a=a||n.clone(),a.union(n)):(a=a||s.clone(),a.union(s))}this._rect=a||n}return this._rect},t.prototype.setDefaultTextStyle=function(n){this._defaultStyle=n||vA},t.prototype.setTextContent=function(n){},t.prototype._mergeStyle=function(n,r){if(!r)return n;var i=r.rich,a=n.rich||i&&{};return dt(n,r),i&&a?(this._mergeRich(a,i),n.rich=a):a&&(n.rich=a),n},t.prototype._mergeRich=function(n,r){for(var i=Be(r),a=0;a<i.length;a++){var o=i[a];n[o]=n[o]||{},dt(n[o],r[o])}},t.prototype.getAnimationStyleProps=function(){return rj},t.prototype._getOrCreateChild=function(n){var r=this._children[this._childCursor];return(!r||!(r instanceof n))&&(r=new n),this._children[this._childCursor++]=r,r.__zr=this.__zr,r.parent=this,r},t.prototype._updatePlainTexts=function(){var n=this.style,r=n.font||Eo,i=n.padding,a=this._defaultStyle,o=n.x||0,l=n.y||0,s=n.align||a.align||"left",c=n.verticalAlign||a.verticalAlign||"top";oA(Li,a.overflowRect,o,l,s,c),o=Li.baseX,l=Li.baseY;var h=SA(n),d=CV(h,n,Li.outerWidth,Li.outerHeight),v=K0(n),g=!!n.backgroundColor,m=d.outerHeight,x=d.outerWidth,_=d.lines,b=d.lineHeight;this.isTruncated=!!d.isTruncated;var S=o,w=Fl(l,d.contentHeight,c);if(v||i){var A=Ou(o,x,s),D=Fl(l,m,c);v&&this._renderBackground(n,n,A,D,x,m)}w+=b/2,i&&(S=_A(o,s,i),c==="top"?w+=i[0]:c==="bottom"&&(w-=i[2]));for(var M=0,L=!1,I=!1,N=bA("fill"in n?n.fill:(I=!0,a.fill)),E=xA("stroke"in n?n.stroke:!g&&(!a.autoStroke||I)?(M=pA,L=!0,a.stroke):null),O=n.textShadowBlur>0,j=0;j<_.length;j++){var B=this._getOrCreateChild(Ip),U=B.createStyle();B.useStyle(U),U.text=_[j],U.x=S,U.y=w,U.textAlign=s,U.textBaseline="middle",U.opacity=n.opacity,U.strokeFirst=!0,O&&(U.shadowBlur=n.textShadowBlur||0,U.shadowColor=n.textShadowColor||"transparent",U.shadowOffsetX=n.textShadowOffsetX||0,U.shadowOffsetY=n.textShadowOffsetY||0),U.stroke=E,U.fill=N,E&&(U.lineWidth=n.lineWidth||M,U.lineDash=n.lineDash,U.lineDashOffset=n.lineDashOffset||0),U.font=r,mA(U,n),w+=b,B.setBoundingRect(Yx(U,d.contentWidth,d.calculatedLineHeight,L?0:null))}},t.prototype._updateRichTexts=function(){var n=this.style,r=this._defaultStyle,i=n.align||r.align,a=n.verticalAlign||r.verticalAlign,o=n.x||0,l=n.y||0;oA(Li,r.overflowRect,o,l,i,a),o=Li.baseX,l=Li.baseY;var s=SA(n),c=DV(s,n,Li.outerWidth,Li.outerHeight,i),h=c.width,d=c.outerWidth,v=c.outerHeight,g=n.padding;this.isTruncated=!!c.isTruncated;var m=Ou(o,d,i),x=Fl(l,v,a),_=m,b=x;g&&(_+=g[3],b+=g[0]);var S=_+h;K0(n)&&this._renderBackground(n,n,m,x,d,v);for(var w=!!n.backgroundColor,A=0;A<c.lines.length;A++){for(var D=c.lines[A],M=D.tokens,L=M.length,I=D.lineHeight,N=D.width,E=0,O=_,j=S,B=L-1,U=void 0;E<L&&(U=M[E],!U.align||U.align==="left");)this._placeToken(U,n,I,b,O,"left",w),N-=U.width,O+=U.width,E++;for(;B>=0&&(U=M[B],U.align==="right");)this._placeToken(U,n,I,b,j,"right",w),N-=U.width,j-=U.width,B--;for(O+=(h-(O-_)-(S-j)-N)/2;E<=B;)U=M[E],this._placeToken(U,n,I,b,O+U.width/2,"center",w),O+=U.width,E++;b+=I}},t.prototype._placeToken=function(n,r,i,a,o,l,s){var c=r.rich[n.styleName]||{};c.text=n.text;var h=n.verticalAlign,d=a+i/2;h==="top"?d=a+n.height/2:h==="bottom"&&(d=a+i-n.height/2);var v=!n.isLineHolder&&K0(c);v&&this._renderBackground(c,r,l==="right"?o-n.width:l==="center"?o-n.width/2:o,d-n.height/2,n.width,n.height);var g=!!c.backgroundColor,m=n.textPadding;m&&(o=_A(o,l,m),d-=n.height/2-m[0]-n.innerHeight/2);var x=this._getOrCreateChild(Ip),_=x.createStyle();x.useStyle(_);var b=this._defaultStyle,S=!1,w=0,A=!1,D=bA("fill"in c?c.fill:"fill"in r?r.fill:(S=!0,b.fill)),M=xA("stroke"in c?c.stroke:"stroke"in r?r.stroke:!g&&!s&&(!b.autoStroke||S)?(w=pA,A=!0,b.stroke):null),L=c.textShadowBlur>0||r.textShadowBlur>0;_.text=n.text,_.x=o,_.y=d,L&&(_.shadowBlur=c.textShadowBlur||r.textShadowBlur||0,_.shadowColor=c.textShadowColor||r.textShadowColor||"transparent",_.shadowOffsetX=c.textShadowOffsetX||r.textShadowOffsetX||0,_.shadowOffsetY=c.textShadowOffsetY||r.textShadowOffsetY||0),_.textAlign=l,_.textBaseline="middle",_.font=n.font||Eo,_.opacity=Co(c.opacity,r.opacity,1),mA(_,c),M&&(_.lineWidth=Co(c.lineWidth,r.lineWidth,w),_.lineDash=zt(c.lineDash,r.lineDash),_.lineDashOffset=r.lineDashOffset||0,_.stroke=M),D&&(_.fill=D),x.setBoundingRect(Yx(_,n.contentWidth,n.contentHeight,A?0:null))},t.prototype._renderBackground=function(n,r,i,a,o,l){var s=n.backgroundColor,c=n.borderWidth,h=n.borderColor,d=s&&s.image,v=s&&!d,g=n.borderRadius,m=this,x,_;if(v||n.lineHeight||c&&h){x=this._getOrCreateChild(le),x.useStyle(x.createStyle()),x.style.fill=null;var b=x.shape;b.x=i,b.y=a,b.width=o,b.height=l,b.r=g,x.dirtyShape()}if(v){var S=x.style;S.fill=s||null,S.fillOpacity=zt(n.fillOpacity,1)}else if(d){_=this._getOrCreateChild(Jr),_.onload=function(){m.dirtyStyle()};var w=_.style;w.image=s.image,w.x=i,w.y=a,w.width=o,w.height=l}if(c&&h){var S=x.style;S.lineWidth=c,S.stroke=h,S.strokeOpacity=zt(n.strokeOpacity,1),S.lineDash=n.borderDash,S.lineDashOffset=n.borderDashOffset||0,x.strokeContainThreshold=0,x.hasFill()&&x.hasStroke()&&(S.strokeFirst=!0,S.lineWidth*=2)}var A=(x||_).style;A.shadowBlur=n.shadowBlur||0,A.shadowColor=n.shadowColor||"transparent",A.shadowOffsetX=n.shadowOffsetX||0,A.shadowOffsetY=n.shadowOffsetY||0,A.opacity=Co(n.opacity,r.opacity,1)},t.makeFont=function(n){var r="";return lj(n)&&(r=[n.fontStyle,n.fontWeight,oj(n.fontSize),n.fontFamily||"sans-serif"].join(" ")),r&&Bi(r)||n.textFont||n.font},t})(qu),ij={left:!0,right:1,center:1},aj={top:1,bottom:1,middle:1},gA=["fontStyle","fontWeight","fontSize","fontFamily"];function oj(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?h_+"px":e+"px"}function mA(e,t){for(var n=0;n<gA.length;n++){var r=gA[n],i=t[r];i!=null&&(e[r]=i)}}function lj(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function sj(e){return yA(e),P(e.rich,yA),e}function yA(e){if(e){e.font=me.makeFont(e);var t=e.align;t==="middle"&&(t="center"),e.align=t==null||ij[t]?t:"left";var n=e.verticalAlign;n==="center"&&(n="middle"),e.verticalAlign=n==null||aj[n]?n:"top";var r=e.padding;r&&(e.padding=xg(e.padding))}}function xA(e,t){return e==null||t<=0||e==="transparent"||e==="none"?null:e.image||e.colorStops?"#000":e}function bA(e){return e==null||e==="none"?null:e.image||e.colorStops?"#000":e}function _A(e,t,n){return t==="right"?e-n[1]:t==="center"?e+n[3]/2-n[1]/2:e+n[3]}function SA(e){var t=e.text;return t!=null&&(t+=""),t}function K0(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var Zt=be(),Xx=function(e,t,n,r){if(r){var i=Zt(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType="chart",r.type==="group"&&r.traverse(function(a){var o=Zt(a);o.seriesIndex=e,o.dataIndex=n,o.dataType=t,o.ssrType="chart"})}},wA=1,TA={},AI=be(),k_=be(),L_=0,Mg=1,Ag=2,Cr=["emphasis","blur","select"],ih=["normal","emphasis","blur","select"],Dh=10,uj=9,Ul="highlight",up="downplay",Op="select",Zx="unselect",zp="toggleSelect",E_="selectchanged";function Qs(e){return e!=null&&e!=="none"}function Dg(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function DI(e){Dg(e,"emphasis",Ag)}function kI(e){e.hoverState===Ag&&Dg(e,"normal",L_)}function R_(e){Dg(e,"blur",Mg)}function LI(e){e.hoverState===Mg&&Dg(e,"normal",L_)}function cj(e){e.selected=!0}function fj(e){e.selected=!1}function CA(e,t,n){t(e,n)}function ka(e,t,n){CA(e,t,n),e.isGroup&&e.traverse(function(r){CA(r,t,n)})}function MA(e,t){switch(t){case"emphasis":e.hoverState=Ag;break;case"normal":e.hoverState=L_;break;case"blur":e.hoverState=Mg;break;case"select":e.selected=!0}}function hj(e,t,n,r){for(var i=e.style,a={},o=0;o<t.length;o++){var l=t[o],s=i[l];a[l]=s??(r&&r[l])}for(var o=0;o<e.animators.length;o++){var c=e.animators[o];c.__fromStateTransition&&c.__fromStateTransition.indexOf(n)<0&&c.targetName==="style"&&c.saveTo(a,t)}return a}function dj(e,t,n,r){var i=n&&Wt(n,"select")>=0,a=!1;if(e instanceof ce){var o=AI(e),l=i&&o.selectFill||o.normalFill,s=i&&o.selectStroke||o.normalStroke;if(Qs(l)||Qs(s)){r=r||{};var c=r.style||{};c.fill==="inherit"?(a=!0,r=dt({},r),c=dt({},c),c.fill=l):!Qs(c.fill)&&Qs(l)?(a=!0,r=dt({},r),c=dt({},c),c.fill=VM(l)):!Qs(c.stroke)&&Qs(s)&&(a||(r=dt({},r),c=dt({},c)),c.stroke=VM(s)),r.style=c}}if(r&&r.z2==null){a||(r=dt({},r));var h=e.z2EmphasisLift;r.z2=e.z2+(h??Dh)}return r}function vj(e,t,n){if(n&&n.z2==null){n=dt({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??uj)}return n}function pj(e,t,n){var r=Wt(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:hj(e,["opacity"],t,{opacity:1});n=n||{};var o=n.style||{};return o.opacity==null&&(n=dt({},n),o=dt({opacity:r?i:a.opacity*.1},o),n.style=o),n}function J0(e,t){var n=this.states[e];if(this.style){if(e==="emphasis")return dj(this,e,t,n);if(e==="blur")return pj(this,e,n);if(e==="select")return vj(this,e,n)}return n}function $x(e){e.stateProxy=J0;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=J0),n&&(n.stateProxy=J0)}function AA(e,t){!OI(e,t)&&!e.__highByOuter&&ka(e,DI)}function DA(e,t){!OI(e,t)&&!e.__highByOuter&&ka(e,kI)}function Ql(e,t){e.__highByOuter|=1<<(t||0),ka(e,DI)}function Kl(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&ka(e,kI)}function gj(e){ka(e,R_)}function EI(e){ka(e,LI)}function RI(e){ka(e,cj)}function II(e){ka(e,fj)}function OI(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function zI(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(i,a){var o=k_(a),l=i==="series",s=l?e.getViewOfSeriesModel(a):e.getViewOfComponentModel(a);!l&&r.push(s),o.isBlured&&(s.group.traverse(function(c){LI(c)}),l&&n.push(a)),o.isBlured=!1}),P(r,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(n,!1,t)})}function Qx(e,t,n,r){var i=r.getModel();n=n||"coordinateSystem";function a(c,h){for(var d=0;d<h.length;d++){var v=c.getItemGraphicEl(h[d]);v&&EI(v)}}if(e!=null&&!(!t||t==="none")){var o=i.getSeriesByIndex(e),l=o.coordinateSystem;l&&l.master&&(l=l.master);var s=[];i.eachSeries(function(c){var h=o===c,d=c.coordinateSystem;d&&d.master&&(d=d.master);var v=d&&l?d===l:h;if(!(n==="series"&&!h||n==="coordinateSystem"&&!v||t==="series"&&h)){var g=r.getViewOfSeriesModel(c);if(g.group.traverse(function(_){_.__highByOuter&&h&&t==="self"||R_(_)}),sr(t))a(c.getData(),t);else if(Lt(t))for(var m=Be(t),x=0;x<m.length;x++)a(c.getData(m[x]),t[m[x]]);s.push(c),k_(c).isBlured=!0}}),i.eachComponent(function(c,h){if(c!=="series"){var d=r.getViewOfComponentModel(h);d&&d.toggleBlurSeries&&d.toggleBlurSeries(s,!0,i)}})}}function Kx(e,t,n){if(!(e==null||t==null)){var r=n.getModel().getComponent(e,t);if(r){k_(r).isBlured=!0;var i=n.getViewOfComponentModel(r);!i||!i.focusBlurEnabled||i.group.traverse(function(a){R_(a)})}}}function mj(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=Zl(i,t);a=(mt(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var l=i.count(),s=0;!o&&s<l;)o=i.getItemGraphicEl(s++);if(o){var c=Zt(o);Qx(r,c.focus,c.blurScope,n)}else{var h=e.get(["emphasis","focus"]),d=e.get(["emphasis","blurScope"]);h!=null&&Qx(r,h,d,n)}}}function I_(e,t,n,r){var i={focusSelf:!1,dispatchers:null};if(e==null||e==="series"||t==null||n==null)return i;var a=r.getModel().getComponent(e,t);if(!a)return i;var o=r.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var l=o.findHighDownDispatchers(n),s,c=0;c<l.length;c++)if(Zt(l[c]).focus==="self"){s=!0;break}return{focusSelf:s,dispatchers:l}}function yj(e,t,n){var r=Zt(e),i=I_(r.componentMainType,r.componentIndex,r.componentHighDownName,n),a=i.dispatchers,o=i.focusSelf;a?(o&&Kx(r.componentMainType,r.componentIndex,n),P(a,function(l){return AA(l,t)})):(Qx(r.seriesIndex,r.focus,r.blurScope,n),r.focus==="self"&&Kx(r.componentMainType,r.componentIndex,n),AA(e,t))}function xj(e,t,n){zI(n);var r=Zt(e),i=I_(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?P(i,function(a){return DA(a,t)}):DA(e,t)}function bj(e,t,n){if(tb(t)){var r=t.dataType,i=e.getData(r),a=Zl(i,t);mt(a)||(a=[a]),e[t.type===zp?"toggleSelect":t.type===Op?"select":"unselect"](a,r)}}function kA(e){var t=e.getAllData();P(t,function(n){var r=n.data,i=n.type;r.eachItemGraphicEl(function(a,o){e.isSelected(o,i)?RI(a):II(a)})})}function _j(e){var t=[];return e.eachSeries(function(n){var r=n.getAllData();P(r,function(i){i.data;var a=i.type,o=n.getSelectedDataIndices();if(o.length>0){var l={dataIndex:o,seriesIndex:n.seriesIndex};a!=null&&(l.dataType=a),t.push(l)}})}),t}function Bp(e,t,n){Nl(e,!0),ka(e,$x),Jx(e,t,n)}function Sj(e){Nl(e,!1)}function In(e,t,n,r){r?Sj(e):Bp(e,t,n)}function Jx(e,t,n){var r=Zt(e);t!=null?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}var LA=["emphasis","blur","select"],wj={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Mr(e,t,n,r){n=n||"itemStyle";for(var i=0;i<LA.length;i++){var a=LA[i],o=t.getModel([a,n]),l=e.ensureState(a);l.style=r?r(o):o[wj[n]]()}}function Nl(e,t){var n=t===!1,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!n||r.__highDownDispatcher)&&(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function ah(e){return!!(e&&e.__highDownDispatcher)}function Tj(e){var t=TA[e];return t==null&&wA<=32&&(t=TA[e]=wA++),t}function tb(e){var t=e.type;return t===Op||t===Zx||t===zp}function EA(e){var t=e.type;return t===Ul||t===up}function Cj(e){var t=AI(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}var Ks=$l.CMD,Mj=[[],[],[]],RA=Math.sqrt,Aj=Math.atan2;function Dj(e,t){if(t){var n=e.data,r=e.len(),i,a,o,l,s,c,h=Ks.M,d=Ks.C,v=Ks.L,g=Ks.R,m=Ks.A,x=Ks.Q;for(o=0,l=0;o<r;){switch(i=n[o++],l=o,a=0,i){case h:a=1;break;case v:a=1;break;case d:a=3;break;case x:a=2;break;case m:var _=t[4],b=t[5],S=RA(t[0]*t[0]+t[1]*t[1]),w=RA(t[2]*t[2]+t[3]*t[3]),A=Aj(-t[1]/w,t[0]/S);n[o]*=S,n[o++]+=_,n[o]*=w,n[o++]+=b,n[o++]*=S,n[o++]*=w,n[o++]+=A,n[o++]+=A,o+=2,l=o;break;case g:c[0]=n[o++],c[1]=n[o++],Un(c,c,t),n[l++]=c[0],n[l++]=c[1],c[0]+=n[o++],c[1]+=n[o++],Un(c,c,t),n[l++]=c[0],n[l++]=c[1]}for(s=0;s<a;s++){var D=Mj[s];D[0]=n[o++],D[1]=n[o++],Un(D,D,t),n[l++]=D[0],n[l++]=D[1]}}e.increaseVersion()}}var t1=Math.sqrt,gv=Math.sin,mv=Math.cos,Kc=Math.PI;function IA(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function eb(e,t){return(e[0]*t[0]+e[1]*t[1])/(IA(e)*IA(t))}function OA(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(eb(e,t))}function zA(e,t,n,r,i,a,o,l,s,c,h){var d=s*(Kc/180),v=mv(d)*(e-n)/2+gv(d)*(t-r)/2,g=-1*gv(d)*(e-n)/2+mv(d)*(t-r)/2,m=v*v/(o*o)+g*g/(l*l);m>1&&(o*=t1(m),l*=t1(m));var x=(i===a?-1:1)*t1((o*o*(l*l)-o*o*(g*g)-l*l*(v*v))/(o*o*(g*g)+l*l*(v*v)))||0,_=x*o*g/l,b=x*-l*v/o,S=(e+n)/2+mv(d)*_-gv(d)*b,w=(t+r)/2+gv(d)*_+mv(d)*b,A=OA([1,0],[(v-_)/o,(g-b)/l]),D=[(v-_)/o,(g-b)/l],M=[(-1*v-_)/o,(-1*g-b)/l],L=OA(D,M);if(eb(D,M)<=-1&&(L=Kc),eb(D,M)>=1&&(L=0),L<0){var I=Math.round(L/Kc*1e6)/1e6;L=Kc*2+I%2*Kc}h.addData(c,S,w,o,l,A,L,d,a)}var kj=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Lj=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Ej(e){var t=new $l;if(!e)return t;var n=0,r=0,i=n,a=r,o,l=$l.CMD,s=e.match(kj);if(!s)return t;for(var c=0;c<s.length;c++){for(var h=s[c],d=h.charAt(0),v=void 0,g=h.match(Lj)||[],m=g.length,x=0;x<m;x++)g[x]=parseFloat(g[x]);for(var _=0;_<m;){var b=void 0,S=void 0,w=void 0,A=void 0,D=void 0,M=void 0,L=void 0,I=n,N=r,E=void 0,O=void 0;switch(d){case"l":n+=g[_++],r+=g[_++],v=l.L,t.addData(v,n,r);break;case"L":n=g[_++],r=g[_++],v=l.L,t.addData(v,n,r);break;case"m":n+=g[_++],r+=g[_++],v=l.M,t.addData(v,n,r),i=n,a=r,d="l";break;case"M":n=g[_++],r=g[_++],v=l.M,t.addData(v,n,r),i=n,a=r,d="L";break;case"h":n+=g[_++],v=l.L,t.addData(v,n,r);break;case"H":n=g[_++],v=l.L,t.addData(v,n,r);break;case"v":r+=g[_++],v=l.L,t.addData(v,n,r);break;case"V":r=g[_++],v=l.L,t.addData(v,n,r);break;case"C":v=l.C,t.addData(v,g[_++],g[_++],g[_++],g[_++],g[_++],g[_++]),n=g[_-2],r=g[_-1];break;case"c":v=l.C,t.addData(v,g[_++]+n,g[_++]+r,g[_++]+n,g[_++]+r,g[_++]+n,g[_++]+r),n+=g[_-2],r+=g[_-1];break;case"S":b=n,S=r,E=t.len(),O=t.data,o===l.C&&(b+=n-O[E-4],S+=r-O[E-3]),v=l.C,I=g[_++],N=g[_++],n=g[_++],r=g[_++],t.addData(v,b,S,I,N,n,r);break;case"s":b=n,S=r,E=t.len(),O=t.data,o===l.C&&(b+=n-O[E-4],S+=r-O[E-3]),v=l.C,I=n+g[_++],N=r+g[_++],n+=g[_++],r+=g[_++],t.addData(v,b,S,I,N,n,r);break;case"Q":I=g[_++],N=g[_++],n=g[_++],r=g[_++],v=l.Q,t.addData(v,I,N,n,r);break;case"q":I=g[_++]+n,N=g[_++]+r,n+=g[_++],r+=g[_++],v=l.Q,t.addData(v,I,N,n,r);break;case"T":b=n,S=r,E=t.len(),O=t.data,o===l.Q&&(b+=n-O[E-4],S+=r-O[E-3]),n=g[_++],r=g[_++],v=l.Q,t.addData(v,b,S,n,r);break;case"t":b=n,S=r,E=t.len(),O=t.data,o===l.Q&&(b+=n-O[E-4],S+=r-O[E-3]),n+=g[_++],r+=g[_++],v=l.Q,t.addData(v,b,S,n,r);break;case"A":w=g[_++],A=g[_++],D=g[_++],M=g[_++],L=g[_++],I=n,N=r,n=g[_++],r=g[_++],v=l.A,zA(I,N,n,r,M,L,w,A,D,v,t);break;case"a":w=g[_++],A=g[_++],D=g[_++],M=g[_++],L=g[_++],I=n,N=r,n+=g[_++],r+=g[_++],v=l.A,zA(I,N,n,r,M,L,w,A,D,v,t);break}}(d==="z"||d==="Z")&&(v=l.Z,t.addData(v),n=i,r=a),o=v}return t.toStatic(),t}var BI=(function(e){ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(n){},t})(ce);function NI(e){return e.setData!=null}function PI(e,t){var n=Ej(e),r=dt({},t);return r.buildPath=function(i){var a=NI(i);if(a&&i.canSave()){i.appendPath(n);var o=i.getContext();o&&i.rebuildPath(o,1)}else{var o=a?i.getContext():i;o&&n.rebuildPath(o,1)}},r.applyTransform=function(i){Dj(n,i),this.dirtyShape()},r}function Rj(e,t){return new BI(PI(e,t))}function Ij(e,t){var n=PI(e,t),r=(function(i){ot(a,i);function a(o){var l=i.call(this,o)||this;return l.applyTransform=n.applyTransform,l.buildPath=n.buildPath,l}return a})(BI);return r}function Oj(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var a=e[i];n.push(a.getUpdatedPathProxy(!0))}var o=new ce(t);return o.createPathProxy(),o.buildPath=function(l){if(NI(l)){l.appendPath(n);var s=l.getContext();s&&l.rebuildPath(s,1)}},o}var zj=(function(){function e(){this.cx=0,this.cy=0,this.r=0}return e})(),kh=(function(e){ot(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new zj},t.prototype.buildPath=function(n,r){n.moveTo(r.cx+r.r,r.cy),n.arc(r.cx,r.cy,r.r,0,Math.PI*2)},t})(ce);kh.prototype.type="circle";var Bj=(function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e})(),O_=(function(e){ot(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new Bj},t.prototype.buildPath=function(n,r){var i=.5522848,a=r.cx,o=r.cy,l=r.rx,s=r.ry,c=l*i,h=s*i;n.moveTo(a-l,o),n.bezierCurveTo(a-l,o-h,a-c,o-s,a,o-s),n.bezierCurveTo(a+c,o-s,a+l,o-h,a+l,o),n.bezierCurveTo(a+l,o+h,a+c,o+s,a,o+s),n.bezierCurveTo(a-c,o+s,a-l,o+h,a-l,o),n.closePath()},t})(ce);O_.prototype.type="ellipse";var HI=Math.PI,e1=HI*2,xl=Math.sin,Js=Math.cos,Nj=Math.acos,kn=Math.atan2,BA=Math.abs,jf=Math.sqrt,kf=Math.max,Ei=Math.min,si=1e-4;function Pj(e,t,n,r,i,a,o,l){var s=n-e,c=r-t,h=o-i,d=l-a,v=d*s-h*c;if(!(v*v<si))return v=(h*(t-a)-d*(e-i))/v,[e+v*s,t+v*c]}function yv(e,t,n,r,i,a,o){var l=e-n,s=t-r,c=(o?a:-a)/jf(l*l+s*s),h=c*s,d=-c*l,v=e+h,g=t+d,m=n+h,x=r+d,_=(v+m)/2,b=(g+x)/2,S=m-v,w=x-g,A=S*S+w*w,D=i-a,M=v*x-m*g,L=(w<0?-1:1)*jf(kf(0,D*D*A-M*M)),I=(M*w-S*L)/A,N=(-M*S-w*L)/A,E=(M*w+S*L)/A,O=(-M*S+w*L)/A,j=I-_,B=N-b,U=E-_,W=O-b;return j*j+B*B>U*U+W*W&&(I=E,N=O),{cx:I,cy:N,x0:-h,y0:-d,x1:I*(i/D-1),y1:N*(i/D-1)}}function Hj(e){var t;if(mt(e)){var n=e.length;if(!n)return e;n===1?t=[e[0],e[0],0,0]:n===2?t=[e[0],e[0],e[1],e[1]]:n===3?t=e.concat(e[2]):t=e}else t=[e,e,e,e];return t}function Vj(e,t){var n,r=kf(t.r,0),i=kf(t.r0||0,0),a=r>0,o=i>0;if(!(!a&&!o)){if(a||(r=i,i=0),i>r){var l=r;r=i,i=l}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var h=t.cx,d=t.cy,v=!!t.clockwise,g=BA(c-s),m=g>e1&&g%e1;if(m>si&&(g=m),!(r>si))e.moveTo(h,d);else if(g>e1-si)e.moveTo(h+r*Js(s),d+r*xl(s)),e.arc(h,d,r,s,c,!v),i>si&&(e.moveTo(h+i*Js(c),d+i*xl(c)),e.arc(h,d,i,c,s,v));else{var x=void 0,_=void 0,b=void 0,S=void 0,w=void 0,A=void 0,D=void 0,M=void 0,L=void 0,I=void 0,N=void 0,E=void 0,O=void 0,j=void 0,B=void 0,U=void 0,W=r*Js(s),H=r*xl(s),q=i*Js(c),X=i*xl(c),J=g>si;if(J){var F=t.cornerRadius;F&&(n=Hj(F),x=n[0],_=n[1],b=n[2],S=n[3]);var Y=BA(r-i)/2;if(w=Ei(Y,b),A=Ei(Y,S),D=Ei(Y,x),M=Ei(Y,_),N=L=kf(w,A),E=I=kf(D,M),(L>si||I>si)&&(O=r*Js(c),j=r*xl(c),B=i*Js(s),U=i*xl(s),g<HI)){var Z=Pj(W,H,B,U,O,j,q,X);if(Z){var V=W-Z[0],tt=H-Z[1],ut=O-Z[0],gt=j-Z[1],wt=1/xl(Nj((V*ut+tt*gt)/(jf(V*V+tt*tt)*jf(ut*ut+gt*gt)))/2),pt=jf(Z[0]*Z[0]+Z[1]*Z[1]);N=Ei(L,(r-pt)/(wt+1)),E=Ei(I,(i-pt)/(wt-1))}}}if(!J)e.moveTo(h+W,d+H);else if(N>si){var vt=Ei(b,N),Dt=Ei(S,N),yt=yv(B,U,W,H,r,vt,v),Mt=yv(O,j,q,X,r,Dt,v);e.moveTo(h+yt.cx+yt.x0,d+yt.cy+yt.y0),N<L&&vt===Dt?e.arc(h+yt.cx,d+yt.cy,N,kn(yt.y0,yt.x0),kn(Mt.y0,Mt.x0),!v):(vt>0&&e.arc(h+yt.cx,d+yt.cy,vt,kn(yt.y0,yt.x0),kn(yt.y1,yt.x1),!v),e.arc(h,d,r,kn(yt.cy+yt.y1,yt.cx+yt.x1),kn(Mt.cy+Mt.y1,Mt.cx+Mt.x1),!v),Dt>0&&e.arc(h+Mt.cx,d+Mt.cy,Dt,kn(Mt.y1,Mt.x1),kn(Mt.y0,Mt.x0),!v))}else e.moveTo(h+W,d+H),e.arc(h,d,r,s,c,!v);if(!(i>si)||!J)e.lineTo(h+q,d+X);else if(E>si){var vt=Ei(x,E),Dt=Ei(_,E),yt=yv(q,X,O,j,i,-Dt,v),Mt=yv(W,H,B,U,i,-vt,v);e.lineTo(h+yt.cx+yt.x0,d+yt.cy+yt.y0),E<I&&vt===Dt?e.arc(h+yt.cx,d+yt.cy,E,kn(yt.y0,yt.x0),kn(Mt.y0,Mt.x0),!v):(Dt>0&&e.arc(h+yt.cx,d+yt.cy,Dt,kn(yt.y0,yt.x0),kn(yt.y1,yt.x1),!v),e.arc(h,d,i,kn(yt.cy+yt.y1,yt.cx+yt.x1),kn(Mt.cy+Mt.y1,Mt.cx+Mt.x1),v),vt>0&&e.arc(h+Mt.cx,d+Mt.cy,vt,kn(Mt.y1,Mt.x1),kn(Mt.y0,Mt.x0),!v))}else e.lineTo(h+q,d+X),e.arc(h,d,i,c,s,v)}e.closePath()}}}var jj=(function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e})(),yi=(function(e){ot(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new jj},t.prototype.buildPath=function(n,r){Vj(n,r)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t})(ce);yi.prototype.type="sector";var Fj=(function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e})(),kg=(function(e){ot(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new Fj},t.prototype.buildPath=function(n,r){var i=r.cx,a=r.cy,o=Math.PI*2;n.moveTo(i+r.r,a),n.arc(i,a,r.r,0,o,!1),n.moveTo(i+r.r0,a),n.arc(i,a,r.r0,0,o,!0)},t})(ce);kg.prototype.type="ring";function Gj(e,t,n,r){var i=[],a=[],o=[],l=[],s,c,h,d;if(r){h=[1/0,1/0],d=[-1/0,-1/0];for(var v=0,g=e.length;v<g;v++)bu(h,h,e[v]),_u(d,d,e[v]);bu(h,h,r[0]),_u(d,d,r[1])}for(var v=0,g=e.length;v<g;v++){var m=e[v];if(n)s=e[v?v-1:g-1],c=e[(v+1)%g];else if(v===0||v===g-1){i.push(_H(e[v]));continue}else s=e[v-1],c=e[v+1];SH(a,c,s),g0(a,a,t);var x=Sx(m,s),_=Sx(m,c),b=x+_;b!==0&&(x/=b,_/=b),g0(o,a,-x),g0(l,a,_);var S=wM([],m,o),w=wM([],m,l);r&&(_u(S,S,h),bu(S,S,d),_u(w,w,h),bu(w,w,d)),i.push(S),i.push(w)}return n&&i.push(i.shift()),i}function VI(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var a=Gj(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,l=0;l<(n?o:o-1);l++){var s=a[l*2],c=a[l*2+1],h=i[(l+1)%o];e.bezierCurveTo(s[0],s[1],c[0],c[1],h[0],h[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var l=1,d=i.length;l<d;l++)e.lineTo(i[l][0],i[l][1])}n&&e.closePath()}}var Uj=(function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e})(),Yi=(function(e){ot(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new Uj},t.prototype.buildPath=function(n,r){VI(n,r,!0)},t})(ce);Yi.prototype.type="polygon";var Yj=(function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e})(),Wi=(function(e){ot(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Yj},t.prototype.buildPath=function(n,r){VI(n,r,!1)},t})(ce);Wi.prototype.type="polyline";var Wj={},qj=(function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e})(),Gi=(function(e){ot(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new qj},t.prototype.buildPath=function(n,r){var i,a,o,l;if(this.subPixelOptimize){var s=CI(Wj,r,this.style);i=s.x1,a=s.y1,o=s.x2,l=s.y2}else i=r.x1,a=r.y1,o=r.x2,l=r.y2;var c=r.percent;c!==0&&(n.moveTo(i,a),c<1&&(o=i*(1-c)+o*c,l=a*(1-c)+l*c),n.lineTo(o,l))},t.prototype.pointAt=function(n){var r=this.shape;return[r.x1*(1-n)+r.x2*n,r.y1*(1-n)+r.y2*n]},t})(ce);Gi.prototype.type="line";var rr=[],Xj=(function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return e})();function NA(e,t,n){var r=e.cpx2,i=e.cpy2;return r!=null||i!=null?[(n?BM:Tn)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?BM:Tn)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?NM:or)(e.x1,e.cpx1,e.x2,t),(n?NM:or)(e.y1,e.cpy1,e.y2,t)]}var z_=(function(e){ot(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Xj},t.prototype.buildPath=function(n,r){var i=r.x1,a=r.y1,o=r.x2,l=r.y2,s=r.cpx1,c=r.cpy1,h=r.cpx2,d=r.cpy2,v=r.percent;v!==0&&(n.moveTo(i,a),h==null||d==null?(v<1&&(Ap(i,s,o,v,rr),s=rr[1],o=rr[2],Ap(a,c,l,v,rr),c=rr[1],l=rr[2]),n.quadraticCurveTo(s,c,o,l)):(v<1&&(Mp(i,s,h,o,v,rr),s=rr[1],h=rr[2],o=rr[3],Mp(a,c,d,l,v,rr),c=rr[1],d=rr[2],l=rr[3]),n.bezierCurveTo(s,c,h,d,o,l)))},t.prototype.pointAt=function(n){return NA(this.shape,n,!1)},t.prototype.tangentAt=function(n){var r=NA(this.shape,n,!0);return CH(r,r)},t})(ce);z_.prototype.type="bezier-curve";var Zj=(function(){function e(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e})(),Lg=(function(e){ot(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Zj},t.prototype.buildPath=function(n,r){var i=r.cx,a=r.cy,o=Math.max(r.r,0),l=r.startAngle,s=r.endAngle,c=r.clockwise,h=Math.cos(l),d=Math.sin(l);n.moveTo(h*o+i,d*o+a),n.arc(i,a,o,l,s,!c)},t})(ce);Lg.prototype.type="arc";var $j=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="compound",n}return t.prototype._updatePathDirty=function(){for(var n=this.shape.paths,r=this.shapeChanged(),i=0;i<n.length;i++)r=r||n[i].shapeChanged();r&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var n=this.shape.paths||[],r=this.getGlobalScale(),i=0;i<n.length;i++)n[i].path||n[i].createPathProxy(),n[i].path.setScale(r[0],r[1],n[i].segmentIgnoreThreshold)},t.prototype.buildPath=function(n,r){for(var i=r.paths||[],a=0;a<i.length;a++)i[a].buildPath(n,i[a].shape,!0)},t.prototype.afterBrush=function(){for(var n=this.shape.paths||[],r=0;r<n.length;r++)n[r].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),ce.prototype.getBoundingRect.call(this)},t})(ce),jI=(function(){function e(t){this.colorStops=t||[]}return e.prototype.addColorStop=function(t,n){this.colorStops.push({offset:t,color:n})},e})(),Eg=(function(e){ot(t,e);function t(n,r,i,a,o,l){var s=e.call(this,o)||this;return s.x=n??0,s.y=r??0,s.x2=i??1,s.y2=a??0,s.type="linear",s.global=l||!1,s}return t})(jI),Qj=(function(e){ot(t,e);function t(n,r,i,a,o){var l=e.call(this,a)||this;return l.x=n??.5,l.y=r??.5,l.r=i??.5,l.type="radial",l.global=o||!1,l}return t})(jI),n1=Math.min,Kj=Math.max,xv=Math.abs,bl=[0,0],_l=[0,0],dn=HR(),bv=dn.minTv,_v=dn.maxTv,FI=(function(){function e(t,n){this._corners=[],this._axes=[],this._origin=[0,0];for(var r=0;r<4;r++)this._corners[r]=new Ft;for(var r=0;r<2;r++)this._axes[r]=new Ft;t&&this.fromBoundingRect(t,n)}return e.prototype.fromBoundingRect=function(t,n){var r=this._corners,i=this._axes,a=t.x,o=t.y,l=a+t.width,s=o+t.height;if(r[0].set(a,o),r[1].set(l,o),r[2].set(l,s),r[3].set(a,s),n)for(var c=0;c<4;c++)r[c].transform(n);Ft.sub(i[0],r[1],r[0]),Ft.sub(i[1],r[3],r[0]),i[0].normalize(),i[1].normalize();for(var c=0;c<2;c++)this._origin[c]=i[c].dot(r[0])},e.prototype.intersect=function(t,n,r){var i=!0,a=!n;return n&&Ft.set(n,0,0),dn.reset(r,!a),!this._intersectCheckOneSide(this,t,a,1)&&(i=!1,a)||!this._intersectCheckOneSide(t,this,a,-1)&&(i=!1,a)||!a&&!dn.negativeSize&&Ft.copy(n,i?dn.useDir?dn.dirMinTv:bv:_v),i},e.prototype._intersectCheckOneSide=function(t,n,r,i){for(var a=!0,o=0;o<2;o++){var l=t._axes[o];if(t._getProjMinMaxOnAxis(o,t._corners,bl),t._getProjMinMaxOnAxis(o,n._corners,_l),dn.negativeSize||bl[1]<_l[0]||bl[0]>_l[1]){if(a=!1,dn.negativeSize||r)return a;var s=xv(_l[0]-bl[1]),c=xv(bl[0]-_l[1]);n1(s,c)>_v.len()&&(s<c?Ft.scale(_v,l,-s*i):Ft.scale(_v,l,c*i))}else if(!r){var s=xv(_l[0]-bl[1]),c=xv(bl[0]-_l[1]);(dn.useDir||n1(s,c)<bv.len())&&((s<c||!dn.bidirectional)&&(Ft.scale(bv,l,s*i),dn.useDir&&dn.calcDirMTV()),(s>=c||!dn.bidirectional)&&(Ft.scale(bv,l,-c*i),dn.useDir&&dn.calcDirMTV()))}}return a},e.prototype._getProjMinMaxOnAxis=function(t,n,r){for(var i=this._axes[t],a=this._origin,o=n[0].dot(i)+a[t],l=o,s=o,c=1;c<n.length;c++){var h=n[c].dot(i)+a[t];l=n1(h,l),s=Kj(h,s)}r[0]=l+dn.touchThreshold,r[1]=s-dn.touchThreshold,dn.negativeSize=r[1]<r[0]},e})(),Jj=[],t8=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.notClear=!0,n.incremental=!0,n._displayables=[],n._temporaryDisplayables=[],n._cursor=0,n}return t.prototype.traverse=function(n,r){n.call(r,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(n,r){r?this._temporaryDisplayables.push(n):this._displayables.push(n),this.markRedraw()},t.prototype.addDisplayables=function(n,r){r=r||!1;for(var i=0;i<n.length;i++)this.addDisplayable(n[i],r)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(n){for(var r=this._cursor;r<this._displayables.length;r++)n&&n(this._displayables[r]);for(var r=0;r<this._temporaryDisplayables.length;r++)n&&n(this._temporaryDisplayables[r])},t.prototype.update=function(){this.updateTransform();for(var n=this._cursor;n<this._displayables.length;n++){var r=this._displayables[n];r.parent=this,r.update(),r.parent=null}for(var n=0;n<this._temporaryDisplayables.length;n++){var r=this._temporaryDisplayables[n];r.parent=this,r.update(),r.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var n=new Vt(1/0,1/0,-1/0,-1/0),r=0;r<this._displayables.length;r++){var i=this._displayables[r],a=i.getBoundingRect().clone();i.needLocalTransform()&&a.applyTransform(i.getLocalTransform(Jj)),n.union(a)}this._rect=n}return this._rect},t.prototype.contain=function(n,r){var i=this.transformCoordToLocal(n,r),a=this.getBoundingRect();if(a.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var l=this._displayables[o];if(l.contain(n,r))return!0}return!1},t})(qu),e8=be();function n8(e,t,n,r,i){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var l=t&&t.isAnimationEnabled(),s=e==="update";if(l){var c=void 0,h=void 0,d=void 0;r?(c=zt(r.duration,200),h=zt(r.easing,"cubicOut"),d=0):(c=t.getShallow(s?"animationDurationUpdate":"animationDuration"),h=t.getShallow(s?"animationEasingUpdate":"animationEasing"),d=t.getShallow(s?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(c=a.duration),a.easing!=null&&(h=a.easing),a.delay!=null&&(d=a.delay)),Rt(d)&&(d=d(n,i)),Rt(c)&&(c=c(n));var v={duration:c||0,delay:d,easing:h};return v}else return null}function B_(e,t,n,r,i,a,o){var l=!1,s;Rt(i)?(o=a,a=i,i=null):Lt(i)&&(a=i.cb,o=i.during,l=i.isFrom,s=i.removeOpt,i=i.dataIndex);var c=e==="leave";c||t.stopAnimation("leave");var h=n8(e,r,i,c?s||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null);if(h&&h.duration>0){var d=h.duration,v=h.delay,g=h.easing,m={duration:d,delay:v||0,easing:g,done:a,force:!!a||!!o,setToFinal:!c,scope:e,during:o};l?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!l&&t.attr(n),o&&o(1),a&&a()}function Ve(e,t,n,r,i,a){B_("update",e,t,n,r,i,a)}function Qe(e,t,n,r,i,a){B_("enter",e,t,n,r,i,a)}function Ff(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++){var n=e.animators[t];if(n.scope==="leave")return!0}return!1}function Np(e,t,n,r,i,a){Ff(e)||B_("leave",e,t,n,r,i,a)}function PA(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),Np(e,{style:{opacity:0}},t,n,r)}function ku(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(i){i.isGroup||PA(i,t,n,r)}):PA(e,t,n,r)}function Da(e){e8(e).oldStyle=e.style}var nb={},po=["x","y"],Bu=["width","height"];function r8(e){return ce.extend(e)}var i8=Ij;function a8(e,t){return i8(e,t)}function _i(e,t){nb[e]=t}function o8(e){if(nb.hasOwnProperty(e))return nb[e]}function N_(e,t,n,r){var i=Rj(e,t);return n&&(r==="center"&&(n=UI(n,i.getBoundingRect())),YI(i,n)),i}function GI(e,t,n){var r=new Jr({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(i){if(n==="center"){var a={width:i.width,height:i.height};r.setStyle(UI(t,a))}}});return r}function UI(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var rb=Oj;function YI(e,t){if(e.applyTransform){var n=e.getBoundingRect(),r=n.calculateTransform(t);e.applyTransform(r)}}function oh(e,t){return CI(e,e,{lineWidth:t}),e}function l8(e,t){return MI(e,e,t),e}var cp=Bl;function Yl(e,t){for(var n=y_([]);e&&e!==t;)Bf(n,e.getLocalTransform(),n),e=e.parent;return n}function Do(e,t,n){return t&&!sr(t)&&(t=zl.getLocalTransform(t)),n&&(t=Uu([],t)),Un([],e,t)}function Rg(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:Ni(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:Ni(2*t[4]/t[2]),a=[e==="left"?-r:e==="right"?r:0,e==="top"?-i:e==="bottom"?i:0];return a=Do(a,t,n),Ni(a[0])>Ni(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function HA(e){return!e.isGroup}function s8(e){return e.shape!=null}function WI(e,t,n){if(!e||!t)return;function r(o){var l={};return o.traverse(function(s){HA(s)&&s.anid&&(l[s.anid]=s)}),l}function i(o){var l={x:o.x,y:o.y,rotation:o.rotation};return s8(o)&&(l.shape=It(o.shape)),l}var a=r(e);t.traverse(function(o){if(HA(o)&&o.anid){var l=a[o.anid];if(l){var s=i(o);o.attr(i(l)),Ve(o,s,n,Zt(o).dataIndex)}}})}function qI(e,t){return bt(e,function(n){var r=n[0];r=wr(r,t.x),r=eh(r,t.x+t.width);var i=n[1];return i=wr(i,t.y),i=eh(i,t.y+t.height),[r,i]})}function u8(e,t){var n=wr(e.x,t.x),r=eh(e.x+e.width,t.x+t.width),i=wr(e.y,t.y),a=eh(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function Ig(e,t,n){var r=dt({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return e.indexOf("image://")===0?(i.image=e.slice(8),$t(i,n),new Jr(r)):N_(e.replace("path://",""),r,n,"center")}function c8(e,t,n,r,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var l=i[a];if(XI(e,t,n,r,l[0],l[1],o[0],o[1]))return!0;o=l}}function XI(e,t,n,r,i,a,o,l){var s=n-e,c=r-t,h=o-i,d=l-a,v=r1(h,d,s,c);if(f8(v))return!1;var g=e-i,m=t-a,x=r1(g,m,s,c)/v;if(x<0||x>1)return!1;var _=r1(g,m,h,d)/v;return!(_<0||_>1)}function r1(e,t,n,r){return e*r-n*t}function f8(e){return e<=1e-6&&e>=-1e-6}function Pp(e,t,n,r,i){return t==null||(ve(t)?Oe[0]=Oe[1]=Oe[2]=Oe[3]=t:(Oe[0]=t[0],Oe[1]=t[1],Oe[2]=t[2],Oe[3]=t[3]),r&&(Oe[0]=wr(0,Oe[0]),Oe[1]=wr(0,Oe[1]),Oe[2]=wr(0,Oe[2]),Oe[3]=wr(0,Oe[3])),n&&(Oe[0]=-Oe[0],Oe[1]=-Oe[1],Oe[2]=-Oe[2],Oe[3]=-Oe[3]),VA(e,Oe,"x","width",3,1,i&&i[0]||0),VA(e,Oe,"y","height",0,2,i&&i[1]||0)),e}var Oe=[0,0,0,0];function VA(e,t,n,r,i,a,o){var l=t[a]+t[i],s=e[r];e[r]+=l,o=wr(0,eh(o,s)),e[r]<o?(e[r]=o,e[n]+=t[i]>=0?-t[i]:t[a]>=0?s+t[a]:Ni(l)>1e-8?(s-o)*t[i]/l:0):e[n]-=t[i]}function Lh(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=St(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,l={componentType:a,name:r,$vars:["name"]};l[a+"Index"]=o;var s=e.formatterParamsExtra;s&&P(Be(s),function(h){hi(l,h)||(l[h]=s[h],l.$vars.push(h))});var c=Zt(e.el);c.componentMainType=a,c.componentIndex=o,c.tooltipConfig={name:r,option:$t({content:r,encodeHTMLContent:!0,formatterParams:l},i)}}function ib(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Xu(e,t){if(e)if(mt(e))for(var n=0;n<e.length;n++)ib(e[n],t);else ib(e,t)}function P_(e){return!e||Ni(e[1])<Sv&&Ni(e[2])<Sv||Ni(e[0])<Sv&&Ni(e[3])<Sv}var Sv=1e-5;function lh(e,t){return e?Vt.copy(e,t):t.clone()}function H_(e,t){return t?x_(e||di(),t):void 0}function sh(e){return{z:e.get("z")||0,zlevel:e.get("zlevel")||0}}function h8(e){var t=-1/0,n=1/0;ib(e,function(a){r(a),r(a.getTextContent()),r(a.getTextGuideLine())});function r(a){if(!(!a||a.isGroup)){var o=a.currentStates;if(o.length)for(var l=0;l<o.length;l++)i(a.states[o[l]]);i(a)}}function i(a){if(a){var o=a.z2;o>t&&(t=o),o<n&&(n=o)}}return n>t&&(n=t=0),{min:n,max:t}}function ZI(e,t,n){$I(e,t,n,-1/0)}function $I(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine(),o=e.isGroup;if(o)for(var l=e.childrenRef(),s=0;s<l.length;s++)r=wr($I(l[s],t,n,r),r);else e.z=t,e.zlevel=n,r=wr(e.z2||0,r);if(i&&(i.z=t,i.zlevel=n,isFinite(r)&&(i.z2=r+2)),a){var c=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(r)&&(a.z2=r+(c&&c.showAbove?1:-1))}return r}_i("circle",kh);_i("ellipse",O_);_i("sector",yi);_i("ring",kg);_i("polygon",Yi);_i("polyline",Wi);_i("rect",le);_i("line",Gi);_i("bezierCurve",z_);_i("arc",Lg);const V_=Object.freeze(Object.defineProperty({__proto__:null,Arc:Lg,BezierCurve:z_,BoundingRect:Vt,Circle:kh,CompoundPath:$j,Ellipse:O_,Group:ie,Image:Jr,IncrementalDisplayable:t8,Line:Gi,LinearGradient:Eg,OrientedBoundingRect:FI,Path:ce,Point:Ft,Polygon:Yi,Polyline:Wi,RadialGradient:Qj,Rect:le,Ring:kg,Sector:yi,Text:me,WH:Bu,XY:po,applyTransform:Do,calcZ2Range:h8,clipPointsByRect:qI,clipRectByRect:u8,createIcon:Ig,ensureCopyRect:lh,ensureCopyTransform:H_,expandOrShrinkRect:Pp,extendPath:a8,extendShape:r8,getShapeClass:o8,getTransform:Yl,groupTransition:WI,initProps:Qe,isBoundingRectAxisAligned:P_,isElementRemoved:Ff,lineLineIntersect:XI,linePolygonIntersect:c8,makeImage:GI,makePath:N_,mergePath:rb,registerShape:_i,removeElement:Np,removeElementWithFadeOut:ku,resizePath:YI,retrieveZInfo:sh,setTooltipConfig:Lh,subPixelOptimize:cp,subPixelOptimizeLine:oh,subPixelOptimizeRect:l8,transformDirection:Rg,traverseElements:Xu,traverseUpdateZ:ZI,updateProps:Ve},Symbol.toStringTag,{value:"Module"}));var Og={};function QI(e,t){for(var n=0;n<Cr.length;n++){var r=Cr[n],i=t[r],a=e.ensureState(r);a.style=a.style||{},a.style.text=i}var o=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(o,!0)}function ab(e,t,n){var r=e.labelFetcher,i=e.labelDataIndex,a=e.labelDimIndex,o=t.normal,l;r&&(l=r.getFormattedLabel(i,"normal",null,a,o&&o.get("formatter"),n!=null?{interpolatedValue:n}:null)),l==null&&(l=Rt(e.defaultText)?e.defaultText(i,e,n):e.defaultText);for(var s={normal:l},c=0;c<Cr.length;c++){var h=Cr[c],d=t[h];s[h]=zt(r?r.getFormattedLabel(i,h,null,a,d&&d.get("formatter")):null,l)}return s}function xi(e,t,n,r){n=n||Og;for(var i=e instanceof me,a=!1,o=0;o<ih.length;o++){var l=t[ih[o]];if(l&&l.getShallow("show")){a=!0;break}}var s=i?e:e.getTextContent();if(a){i||(s||(s=new me,e.setTextContent(s)),e.stateProxy&&(s.stateProxy=e.stateProxy));var c=ab(n,t),h=t.normal,d=!!h.getShallow("show"),v=$e(h,r&&r.normal,n,!1,!i);v.text=c.normal,i||e.setTextConfig(jA(h,n,!1));for(var o=0;o<Cr.length;o++){var g=Cr[o],l=t[g];if(l){var m=s.ensureState(g),x=!!zt(l.getShallow("show"),d);if(x!==d&&(m.ignore=!x),m.style=$e(l,r&&r[g],n,!0,!i),m.style.text=c[g],!i){var _=e.ensureState(g);_.textConfig=jA(l,n,!0)}}}s.silent=!!h.getShallow("silent"),s.style.x!=null&&(v.x=s.style.x),s.style.y!=null&&(v.y=s.style.y),s.ignore=!d,s.useStyle(v),s.dirty(),n.enableTextSetter&&(Eh(s).setLabelText=function(b){var S=ab(n,t,b);QI(s,S)})}else s&&(s.ignore=!0);e.dirty()}function Qr(e,t){t=t||"label";for(var n={normal:e.getModel(t)},r=0;r<Cr.length;r++){var i=Cr[r];n[i]=e.getModel([i,t])}return n}function $e(e,t,n,r,i){var a={};return d8(a,e,n,r,i),t&&dt(a,t),a}function jA(e,t,n){t=t||{};var r={},i,a=e.getShallow("rotate"),o=zt(e.getShallow("distance"),n?null:5),l=e.getShallow("offset");return i=e.getShallow("position")||(n?null:"inside"),i==="outside"&&(i=t.defaultOutsidePosition||"top"),i!=null&&(r.position=i),l!=null&&(r.offset=l),a!=null&&(a*=Math.PI/180,r.rotation=a),o!=null&&(r.distance=o),r.outsideFill=e.get("color")==="inherit"?t.inheritColor||null:"auto",t.autoOverflowArea!=null&&(r.autoOverflowArea=t.autoOverflowArea),t.layoutRect!=null&&(r.layoutRect=t.layoutRect),r}function d8(e,t,n,r,i){n=n||Og;var a=t.ecModel,o=a&&a.option.textStyle,l=v8(t),s;if(l){s={};var c="richInheritPlainLabel",h=zt(t.get(c),a?a.get(c):void 0);for(var d in l)if(l.hasOwnProperty(d)){var v=t.getModel(["rich",d]);YA(s[d]={},v,o,t,h,n,r,i,!1,!0)}}s&&(e.rich=s);var g=t.get("overflow");g&&(e.overflow=g);var m=t.get("lineOverflow");m&&(e.lineOverflow=m);var x=e,_=t.get("minMargin");if(_!=null)_=ve(_)?_/2:0,x.margin=[_,_,_,_],x.__marginType=Cu.minMargin;else{var b=t.get("textMargin");b!=null&&(x.margin=xg(b),x.__marginType=Cu.textMargin)}YA(e,t,o,null,null,n,r,i,!0,!1)}function v8(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||Og).rich;if(n){t=t||{};for(var r=Be(n),i=0;i<r.length;i++){var a=r[i];t[a]=1}}e=e.parentModel}return t}var FA=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],GA=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],UA=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function YA(e,t,n,r,i,a,o,l,s,c){n=!o&&n||Og;var h=a&&a.inheritColor,d=t.getShallow("color"),v=t.getShallow("textBorderColor"),g=zt(t.getShallow("opacity"),n.opacity);(d==="inherit"||d==="auto")&&(h?d=h:d=null),(v==="inherit"||v==="auto")&&(h?v=h:v=null),l||(d=d||n.color,v=v||n.textBorderColor),d!=null&&(e.fill=d),v!=null&&(e.stroke=v);var m=zt(t.getShallow("textBorderWidth"),n.textBorderWidth);m!=null&&(e.lineWidth=m);var x=zt(t.getShallow("textBorderType"),n.textBorderType);x!=null&&(e.lineDash=x);var _=zt(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);_!=null&&(e.lineDashOffset=_),!o&&g==null&&!c&&(g=a&&a.defaultOpacity),g!=null&&(e.opacity=g),!o&&!l&&e.fill==null&&a.inheritColor&&(e.fill=a.inheritColor);for(var b=0;b<FA.length;b++){var S=FA[b],w=i!==!1&&r?Co(t.getShallow(S),r.getShallow(S),n[S]):zt(t.getShallow(S),n[S]);w!=null&&(e[S]=w)}for(var b=0;b<GA.length;b++){var S=GA[b],w=t.getShallow(S);w!=null&&(e[S]=w)}if(e.verticalAlign==null){var A=t.getShallow("baseline");A!=null&&(e.verticalAlign=A)}if(!s||!a.disableBox){for(var b=0;b<UA.length;b++){var S=UA[b],w=t.getShallow(S);w!=null&&(e[S]=w)}var D=t.getShallow("borderType");D!=null&&(e.borderDash=D),(e.backgroundColor==="auto"||e.backgroundColor==="inherit")&&h&&(e.backgroundColor=h),(e.borderColor==="auto"||e.borderColor==="inherit")&&h&&(e.borderColor=h)}}function KI(e,t){var n=t&&t.getModel("textStyle");return Bi([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}var Eh=be();function JI(e,t,n,r){if(e){var i=Eh(e);i.prevValue=i.value,i.value=n;var a=t.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=r,i.statesModels=t)}}function p8(e,t,n,r,i){var a=Eh(e);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,l=zt(a.interpolatedValue,a.prevValue),s=a.value;function c(h){var d=pI(n,a.precision,l,s,h);a.interpolatedValue=h===1?null:d;var v=ab({labelDataIndex:t,labelFetcher:i,defaultText:o?o(d):d+""},a.statesModels,d);QI(e,v)}e.percent=0,(a.prevValue==null?Qe:Ve)(e,{percent:1},r,t,null,c)}var Cu={minMargin:1,textMargin:2},g8=["textStyle","color"],i1=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],a1=new me,m8=(function(){function e(){}return e.prototype.getTextColor=function(t){var n=this.ecModel;return this.getShallow("color")||(!t&&n?n.get(g8):null)},e.prototype.getFont=function(){return KI({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},e.prototype.getTextRect=function(t){for(var n={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},r=0;r<i1.length;r++)n[i1[r]]=this.getShallow(i1[r]);return a1.useStyle(n),a1.update(),a1.getBoundingRect()},e})(),tO=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],y8=zu(tO),x8=(function(){function e(){}return e.prototype.getLineStyle=function(t){return y8(this,t)},e})(),eO=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],b8=zu(eO),_8=(function(){function e(){}return e.prototype.getItemStyle=function(t,n){return b8(this,t,n)},e})(),Te=(function(){function e(t,n,r){this.parentModel=n,this.ecModel=r,this.option=t}return e.prototype.init=function(t,n,r){},e.prototype.mergeOption=function(t,n){qt(this.option,t,!0)},e.prototype.get=function(t,n){return t==null?this.option:this._doGet(this.parsePath(t),!n&&this.parentModel)},e.prototype.getShallow=function(t,n){var r=this.option,i=r==null?r:r[t];if(i==null&&!n){var a=this.parentModel;a&&(i=a.getShallow(t))}return i},e.prototype.getModel=function(t,n){var r=t!=null,i=r?this.parsePath(t):null,a=r?this._doGet(i):this.option;return n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new e(a,n,this.ecModel)},e.prototype.isEmpty=function(){return this.option==null},e.prototype.restoreData=function(){},e.prototype.clone=function(){var t=this.constructor;return new t(It(this.option))},e.prototype.parsePath=function(t){return typeof t=="string"?t.split("."):t},e.prototype.resolveParentPath=function(t){return t},e.prototype.isAnimationEnabled=function(){if(!Gt.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(t,n){var r=this.option;if(!t)return r;for(var i=0;i<t.length&&!(t[i]&&(r=r&&typeof r=="object"?r[t[i]]:null,r==null));i++);return r==null&&n&&(r=n._doGet(this.resolveParentPath(t),n.parentModel)),r},e})();M_(Te);gV(Te);Xn(Te,x8);Xn(Te,_8);Xn(Te,_V);Xn(Te,m8);var S8=Math.round(Math.random()*10);function Rh(e){return[e||"",S8++].join("_")}function w8(e){var t={};e.registerSubTypeDefaulter=function(n,r){var i=Pi(n);t[i.main]=r},e.determineSubType=function(n,r){var i=r.type;if(!i){var a=Pi(n).main;e.hasSubTypes(n)&&t[a]&&(i=t[a](r))}return i}}function T8(e,t){e.topologicalTravel=function(a,o,l,s){if(!a.length)return;var c=n(o),h=c.graph,d=c.noEntryList,v={};for(P(a,function(S){v[S]=!0});d.length;){var g=d.pop(),m=h[g],x=!!v[g];x&&(l.call(s,g,m.originalDeps.slice()),delete v[g]),P(m.successor,x?b:_)}P(v,function(){var S="";throw new Error(S)});function _(S){h[S].entryCount--,h[S].entryCount===0&&d.push(S)}function b(S){v[S]=!0,_(S)}};function n(a){var o={},l=[];return P(a,function(s){var c=r(o,s),h=c.originalDeps=t(s),d=i(h,a);c.entryCount=d.length,c.entryCount===0&&l.push(s),P(d,function(v){Wt(c.predecessor,v)<0&&c.predecessor.push(v);var g=r(o,v);Wt(g.successor,v)<0&&g.successor.push(s)})}),{graph:o,noEntryList:l}}function r(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function i(a,o){var l=[];return P(a,function(s){Wt(o,s)>=0&&l.push(s)}),l}}function Zu(e,t){return qt(qt({},e,!0),t,!0)}const C8={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:". "}}}},M8={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 Hp="ZH",j_="EN",Lu=j_,fp={},F_={},nO=Gt.domSupported?(function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Lu).toUpperCase();return e.indexOf(Hp)>-1?Hp:Lu})():Lu;function rO(e,t){e=e.toUpperCase(),F_[e]=new Te(t),fp[e]=t}function A8(e){if(St(e)){var t=fp[e.toUpperCase()]||{};return e===Hp||e===j_?It(t):qt(It(t),It(fp[Lu]),!1)}else return qt(It(e),It(fp[Lu]),!1)}function D8(e){return F_[e]}function k8(){return F_[Lu]}rO(j_,C8);rO(Hp,M8);var L8=null;function Vp(){return L8}var G_=1e3,U_=G_*60,Gf=U_*60,qr=Gf*24,WA=qr*365,E8={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})/},hp={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},R8="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",wv="{yyyy}-{MM}-{dd}",qA={year:"{yyyy}",month:"{yyyy}-{MM}",day:wv,hour:wv+" "+hp.hour,minute:wv+" "+hp.minute,second:wv+" "+hp.second,millisecond:R8},Wl=["year","month","day","hour","minute","second","millisecond"],I8=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function O8(e){return!St(e)&&!Rt(e)?z8(e):e}function z8(e){e=e||{};var t={},n=!0;return P(Wl,function(r){n&&(n=e[r]==null)}),P(Wl,function(r,i){var a=e[r];t[r]={};for(var o=null,l=i;l>=0;l--){var s=Wl[l],c=Lt(a)&&!mt(a)?a[s]:a,h=void 0;mt(c)?(h=c.slice(),o=h[0]||""):St(c)?(o=c,h=[o]):(o==null?o=hp[r]:E8[s].test(o)||(o=t[s][s][0]+" "+o),h=[o],n&&(h[1]="{primary|"+o+"}")),t[r][s]=h}}),t}function io(e,t){return e+="","0000".substr(0,t-e.length)+e}function Uf(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function B8(e){return e===Uf(e)}function N8(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function zg(e,t,n,r){var i=Yu(e),a=i[iO(n)](),o=i[Y_(n)]()+1,l=Math.floor((o-1)/3)+1,s=i[W_(n)](),c=i["get"+(n?"UTC":"")+"Day"](),h=i[q_(n)](),d=(h-1)%12+1,v=i[X_(n)](),g=i[Z_(n)](),m=i[$_(n)](),x=h>=12?"pm":"am",_=x.toUpperCase(),b=r instanceof Te?r:D8(r||nO)||k8(),S=b.getModel("time"),w=S.get("month"),A=S.get("monthAbbr"),D=S.get("dayOfWeek"),M=S.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,x+"").replace(/{A}/g,_+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,io(a%100+"",2)).replace(/{Q}/g,l+"").replace(/{MMMM}/g,w[o-1]).replace(/{MMM}/g,A[o-1]).replace(/{MM}/g,io(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,io(s,2)).replace(/{d}/g,s+"").replace(/{eeee}/g,D[c]).replace(/{ee}/g,M[c]).replace(/{e}/g,c+"").replace(/{HH}/g,io(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,io(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,io(v,2)).replace(/{m}/g,v+"").replace(/{ss}/g,io(g,2)).replace(/{s}/g,g+"").replace(/{SSS}/g,io(m,3)).replace(/{S}/g,m+"")}function P8(e,t,n,r,i){var a=null;if(St(n))a=n;else if(Rt(n)){var o={time:e.time,level:e.time.level},l=Vp();l&&l.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var s=e.time;if(s){var c=n[s.lowerTimeUnit][s.upperTimeUnit];a=c[Math.min(s.level,c.length-1)]||""}else{var h=jp(e.value,i);a=n[h][h][0]}}return zg(new Date(e.value),a,i,r)}function jp(e,t){var n=Yu(e),r=n[Y_(t)]()+1,i=n[W_(t)](),a=n[q_(t)](),o=n[X_(t)](),l=n[Z_(t)](),s=n[$_(t)](),c=s===0,h=c&&l===0,d=h&&o===0,v=d&&a===0,g=v&&i===1,m=g&&r===1;return m?"year":g?"month":v?"day":d?"hour":h?"minute":c?"second":"millisecond"}function ob(e,t,n){switch(t){case"year":e[aO(n)](0);case"month":e[oO(n)](1);case"day":e[lO(n)](0);case"hour":e[sO(n)](0);case"minute":e[uO(n)](0);case"second":e[cO(n)](0)}return e}function iO(e){return e?"getUTCFullYear":"getFullYear"}function Y_(e){return e?"getUTCMonth":"getMonth"}function W_(e){return e?"getUTCDate":"getDate"}function q_(e){return e?"getUTCHours":"getHours"}function X_(e){return e?"getUTCMinutes":"getMinutes"}function Z_(e){return e?"getUTCSeconds":"getSeconds"}function $_(e){return e?"getUTCMilliseconds":"getMilliseconds"}function H8(e){return e?"setUTCFullYear":"setFullYear"}function aO(e){return e?"setUTCMonth":"setMonth"}function oO(e){return e?"setUTCDate":"setDate"}function lO(e){return e?"setUTCHours":"setHours"}function sO(e){return e?"setUTCMinutes":"setMinutes"}function uO(e){return e?"setUTCSeconds":"setSeconds"}function cO(e){return e?"setUTCMilliseconds":"setMilliseconds"}function fO(e){if(!U6(e))return St(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function hO(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(n,r){return r.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var Ih=xg;function lb(e,t,n){var r="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(h){return h&&Bi(h)?h:"-"}function a(h){return!!(h!=null&&!isNaN(h)&&isFinite(h))}var o=t==="time",l=e instanceof Date;if(o||l){var s=o?Yu(e):e;if(isNaN(+s)){if(l)return"-"}else return zg(s,r,n)}if(t==="ordinal")return _x(e)?i(e):ve(e)&&a(e)?e+"":"-";var c=Ep(e);return a(c)?fO(c):_x(e)?i(e):typeof e=="boolean"?e+"":"-"}var XA=["a","b","c","d","e","f","g"],o1=function(e,t){return"{"+e+(t??"")+"}"};function dO(e,t,n){mt(t)||(t=[t]);var r=t.length;if(!r)return"";for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=XA[a];e=e.replace(o1(o),o1(o,0))}for(var l=0;l<r;l++)for(var s=0;s<i.length;s++){var c=t[l][i[s]];e=e.replace(o1(XA[s],l),n?ar(c):c)}return e}function V8(e,t){var n=St(e)?{color:e,extraCssText:t}:e||{},r=n.color,i=n.type;t=n.extraCssText;var a=n.renderMode||"html";if(!r)return"";if(a==="html")return i==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+ar(r)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+ar(r)+";"+(t||"")+'"></span>';var o=n.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}}function Jl(e,t){return t=t||"transparent",St(e)?e:Lt(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function Fp(e,t){if(t==="_blank"||t==="blank"){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var dp={},l1={},Oh=(function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(t,n){this._nonSeriesBoxMasterList=r(dp),this._normalMasterList=r(l1);function r(i,a){var o=[];return P(i,function(l,s){var c=l.create(t,n);o=o.concat(c||[])}),o}},e.prototype.update=function(t,n){P(this._normalMasterList,function(r){r.update&&r.update(t,n)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(t,n){if(t==="matrix"||t==="calendar"){dp[t]=n;return}l1[t]=n},e.get=function(t){return l1[t]||dp[t]},e})();function j8(e){return!!dp[e]}var sb={coord:1,coord2:2};function F8(e){vO.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var vO=Bt();function G8(e){var t=e.getShallow("coord",!0),n=sb.coord;if(t==null){var r=vO.get(e.type);r&&r.getCoord2&&(n=sb.coord2,t=r.getCoord2(e))}return{coord:t,from:n}}var _a={none:0,dataCoordSys:1,boxCoordSys:2};function U8(e,t){var n=e.getShallow("coordinateSystem"),r=e.getShallow("coordinateSystemUsage",!0),i=_a.none;if(n){var a=e.mainType==="series";r==null&&(r=a?"data":"box"),r==="data"?(i=_a.dataCoordSys,a||(i=_a.none)):r==="box"&&(i=_a.boxCoordSys,!a&&!j8(n)&&(i=_a.none))}return{coordSysType:n,kind:i}}function Y8(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys,a=U8(t),o=a.kind,l=a.coordSysType;if(i&&o!==_a.dataCoordSys&&(o=_a.dataCoordSys,l=n),o===_a.none||l!==n)return!1;var s=r(n,t);return s?(o===_a.dataCoordSys?t.coordinateSystem=s:t.boxCoordinateSystem=s,!0):!1}var vp=P,W8=["left","right","top","bottom","width","height"],Tv=[["width","left","right"],["height","top","bottom"]];function Q_(e,t,n,r,i){var a=0,o=0;r==null&&(r=1/0),i==null&&(i=1/0);var l=0;t.eachChild(function(s,c){var h=s.getBoundingRect(),d=t.childAt(c+1),v=d&&d.getBoundingRect(),g,m;if(e==="horizontal"){var x=h.width+(v?-v.x+h.x:0);g=a+x,g>r||s.newline?(a=0,g=x,o+=l+n,l=h.height):l=Math.max(l,h.height)}else{var _=h.height+(v?-v.y+h.y:0);m=o+_,m>i||s.newline?(a+=l+n,o=0,m=_,l=h.width):l=Math.max(l,h.width)}s.newline||(s.x=a,s.y=o,s.markRedraw(),e==="horizontal"?a=g+n:o=m+n)})}var ql=Q_;Yt(Q_,"vertical");Yt(Q_,"horizontal");function q8(e,t){return{left:e.getShallow("left",t),top:e.getShallow("top",t),right:e.getShallow("right",t),bottom:e.getShallow("bottom",t),width:e.getShallow("width",t),height:e.getShallow("height",t)}}function X8(e,t){var n=ti(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===Lf.point)a=n.refPoint,i=On(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get("center"),l=mt(o)?o:[o,o];i=On(r,n.refContainer),a=n.boxCoordFrom===sb.coord2?n.refPoint:[At(l[0],i.width)+i.x,At(l[1],i.height)+i.y]}return{viewRect:i,center:a}}function Z8(e,t){var n=X8(e,t),r=n.viewRect,i=n.center,a=e.get("radius");mt(a)||(a=[0,a]);var o=At(r.width,t.getWidth()),l=At(r.height,t.getHeight()),s=Math.min(o,l),c=At(a[0],s/2),h=At(a[1],s/2);return{cx:i[0],cy:i[1],r0:c,r:h,viewRect:r}}function On(e,t,n){n=Ih(n||0);var r=t.width,i=t.height,a=At(e.left,r),o=At(e.top,i),l=At(e.right,r),s=At(e.bottom,i),c=At(e.width,r),h=At(e.height,i),d=n[2]+n[0],v=n[1]+n[3],g=e.aspect;switch(isNaN(c)&&(c=r-l-v-a),isNaN(h)&&(h=i-s-d-o),g!=null&&(isNaN(c)&&isNaN(h)&&(g>r/i?c=r*.8:h=i*.8),isNaN(c)&&(c=g*h),isNaN(h)&&(h=c/g)),isNaN(a)&&(a=r-l-c-v),isNaN(o)&&(o=i-s-h-d),e.left||e.right){case"center":a=r/2-c/2-n[3];break;case"right":a=r-c-v;break}switch(e.top||e.bottom){case"middle":case"center":o=i/2-h/2-n[0];break;case"bottom":o=i-h-d;break}a=a||0,o=o||0,isNaN(c)&&(c=r-v-a-(l||0)),isNaN(h)&&(h=i-d-o-(s||0));var m=new Vt((t.x||0)+a+n[3],(t.y||0)+o+n[0],c,h);return m.margin=n,m}var Lf={rect:1,point:2};function ti(e,t,n){var r,i,a,o=e.boxCoordinateSystem,l;if(o){var s=G8(e),c=s.coord,h=s.from;if(o.dataToLayout){a=Lf.rect,l=h;var d=o.dataToLayout(c);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=Lf.point,l=h,i=o.dataToPoint(c))}return a==null&&(a=Lf.rect),a===Lf.rect&&(r||(r={x:0,y:0,width:t.getWidth(),height:t.getHeight()}),i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:l}}function K_(e,t,n,r,i,a){a=a||e,a.x=e.x,a.y=e.y;var o;if(o=e.getBoundingRect(),e.needLocalTransform()){var l=e.getLocalTransform();o=o.clone(),o.applyTransform(l)}var s=On($t({width:o.width,height:o.height},t),n,r),c=s.x-o.x,h=s.y-o.y;return a.x+=c,a.y+=h,a===e&&e.markRedraw(),!0}function uh(e){var t=e.layoutMode||e.constructor.layoutMode;return Lt(t)?t:t?{type:t}:null}function Oo(e,t,n){var r=n&&n.ignoreSize;!mt(r)&&(r=[r,r]);var i=o(Tv[0],0),a=o(Tv[1],1);s(Tv[0],e,i),s(Tv[1],e,a);function o(c,h){var d={},v=0,g={},m=0,x=2;if(vp(c,function(S){g[S]=e[S]}),vp(c,function(S){hi(t,S)&&(d[S]=g[S]=t[S]),l(d,S)&&v++,l(g,S)&&m++}),r[h])return l(t,c[1])?g[c[2]]=null:l(t,c[2])&&(g[c[1]]=null),g;if(m===x||!v)return g;if(v>=x)return d;for(var _=0;_<c.length;_++){var b=c[_];if(!hi(d,b)&&hi(e,b)){d[b]=e[b];break}}return d}function l(c,h){return c[h]!=null&&c[h]!=="auto"}function s(c,h,d){vp(c,function(v){h[v]=d[v]})}}function $u(e){return $8({},e)}function $8(e,t){return t&&e&&vp(W8,function(n){hi(t,n)&&(e[n]=t[n])}),e}var Q8=be(),he=(function(e){ot(t,e);function t(n,r,i){var a=e.call(this,n,r,i)||this;return a.uid=Rh("ec_cpt_model"),a}return t.prototype.init=function(n,r,i){this.mergeDefaultAndTheme(n,i)},t.prototype.mergeDefaultAndTheme=function(n,r){var i=uh(this),a=i?$u(n):{},o=r.getTheme();qt(n,o.get(this.mainType)),qt(n,this.getDefaultOption()),i&&Oo(n,a,i)},t.prototype.mergeOption=function(n,r){qt(this.option,n,!0);var i=uh(this);i&&Oo(this.option,n,i)},t.prototype.optionUpdated=function(n,r){},t.prototype.getDefaultOption=function(){var n=this.constructor;if(!dV(n))return n.defaultOption;var r=Q8(this);if(!r.defaultOption){for(var i=[],a=n;a;){var o=a.prototype.defaultOption;o&&i.push(o),a=a.superClass}for(var l={},s=i.length-1;s>=0;s--)l=qt(l,i[s],!0);r.defaultOption=l}return r.defaultOption},t.prototype.getReferringComponents=function(n,r){var i=n+"Index",a=n+"Id";return Wu(this.ecModel,n,{index:this.get(i,!0),id:this.get(a,!0)},r)},t.prototype.getBoxLayoutParams=function(){return q8(this,!1)},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(n){this.option.zlevel=n},t.protoInitialize=(function(){var n=t.prototype;n.type="component",n.id="",n.name="",n.mainType="",n.subType="",n.componentIndex=0})(),t})(Te);mI(he,Te);wg(he);w8(he);T8(he,K8);function K8(e){var t=[];return P(he.getClassesByMainType(e),function(n){t=t.concat(n.dependencies||n.prototype.dependencies||[])}),t=bt(t,function(n){return Pi(n).main}),e!=="dataset"&&Wt(t,"dataset")<=0&&t.unshift("dataset"),t}var lt={color:{},darkColor:{},size:{}},Ge=lt.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)"};dt(Ge,{primary:Ge.neutral80,secondary:Ge.neutral70,tertiary:Ge.neutral60,quaternary:Ge.neutral50,disabled:Ge.neutral20,border:Ge.neutral30,borderTint:Ge.neutral20,borderShade:Ge.neutral40,background:Ge.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:Ge.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:Ge.neutral70,axisLineTint:Ge.neutral40,axisTick:Ge.neutral70,axisTickMinor:Ge.neutral60,axisLabel:Ge.neutral70,axisSplitLine:Ge.neutral15,axisMinorSplitLine:Ge.neutral05});for(var Sl in Ge)if(Ge.hasOwnProperty(Sl)){var ZA=Ge[Sl];Sl==="theme"?lt.darkColor.theme=Ge.theme.slice():Sl==="highlight"?lt.darkColor.highlight="rgba(255,231,130,0.4)":Sl.indexOf("accent")===0?lt.darkColor[Sl]=Ao(ZA,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):lt.darkColor[Sl]=Ao(ZA,null,function(e){return e*.9},function(e){return 1-Math.pow(e,1.5)})}lt.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var pO="";typeof navigator<"u"&&(pO=navigator.platform||"");var tu="rgba(0, 0, 0, 0.2)",gO=lt.color.theme[0],J8=Ao(gO,null,null,.9);const tF={darkMode:"auto",colorBy:"series",color:lt.color.theme,gradientColor:[J8,gO],aria:{decal:{decals:[{color:tu,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:tu,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:tu,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:tu,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:tu,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:tu,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:pO.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 mO=Bt(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Ar="original",Mn="arrayRows",ei="objectRows",Si="keyedColumns",ko="typedArray",yO="unknown",pi="column",is="row",Sn={Must:1,Might:2,Not:3},xO=be();function eF(e){xO(e).datasetMap=Bt()}function bO(e,t,n){var r={},i=J_(t);if(!i||!e)return r;var a=[],o=[],l=t.ecModel,s=xO(l).datasetMap,c=i.uid+"_"+n.seriesLayoutBy,h,d;e=e.slice(),P(e,function(x,_){var b=Lt(x)?x:e[_]={name:x};b.type==="ordinal"&&h==null&&(h=_,d=m(b)),r[b.name]=[]});var v=s.get(c)||s.set(c,{categoryWayDim:d,valueWayDim:0});P(e,function(x,_){var b=x.name,S=m(x);if(h==null){var w=v.valueWayDim;g(r[b],w,S),g(o,w,S),v.valueWayDim+=S}else if(h===_)g(r[b],0,S),g(a,0,S);else{var w=v.categoryWayDim;g(r[b],w,S),g(o,w,S),v.categoryWayDim+=S}});function g(x,_,b){for(var S=0;S<b;S++)x.push(_+S)}function m(x){var _=x.dimsDef;return _?_.length:1}return a.length&&(r.itemName=a),o.length&&(r.seriesName=o),r}function _O(e,t,n){var r={},i=J_(e);if(!i)return r;var a=t.sourceFormat,o=t.dimensionsDefine,l;(a===ei||a===Si)&&P(o,function(h,d){(Lt(h)?h.name:h)==="name"&&(l=d)});var s=(function(){for(var h={},d={},v=[],g=0,m=Math.min(5,n);g<m;g++){var x=wO(t.data,a,t.seriesLayoutBy,o,t.startIndex,g);v.push(x);var _=x===Sn.Not;if(_&&h.v==null&&g!==l&&(h.v=g),(h.n==null||h.n===h.v||!_&&v[h.n]===Sn.Not)&&(h.n=g),b(h)&&v[h.n]!==Sn.Not)return h;_||(x===Sn.Might&&d.v==null&&g!==l&&(d.v=g),(d.n==null||d.n===d.v)&&(d.n=g))}function b(S){return S.v!=null&&S.n!=null}return b(h)?h:b(d)?d:null})();if(s){r.value=[s.v];var c=l??s.n;r.itemName=[c],r.seriesName=[c]}return r}function J_(e){var t=e.get("data",!0);if(!t)return Wu(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},En).models[0]}function nF(e){return!e.get("transform",!0)&&!e.get("fromTransformResult",!0)?[]:Wu(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},En).models}function SO(e,t){return wO(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function wO(e,t,n,r,i,a){var o,l=5;if(ur(e))return Sn.Not;var s,c;if(r){var h=r[a];Lt(h)?(s=h.name,c=h.type):St(h)&&(s=h)}if(c!=null)return c==="ordinal"?Sn.Must:Sn.Not;if(t===Mn){var d=e;if(n===is){for(var v=d[a],g=0;g<(v||[]).length&&g<l;g++)if((o=A(v[i+g]))!=null)return o}else for(var g=0;g<d.length&&g<l;g++){var m=d[i+g];if(m&&(o=A(m[a]))!=null)return o}}else if(t===ei){var x=e;if(!s)return Sn.Not;for(var g=0;g<x.length&&g<l;g++){var _=x[g];if(_&&(o=A(_[s]))!=null)return o}}else if(t===Si){var b=e;if(!s)return Sn.Not;var v=b[s];if(!v||ur(v))return Sn.Not;for(var g=0;g<v.length&&g<l;g++)if((o=A(v[g]))!=null)return o}else if(t===Ar)for(var S=e,g=0;g<S.length&&g<l;g++){var _=S[g],w=Ah(_);if(!mt(w))return Sn.Not;if((o=A(w[a]))!=null)return o}function A(D){var M=St(D);if(D!=null&&Number.isFinite(Number(D))&&D!=="")return M?Sn.Might:Sn.Not;if(M&&D!=="-")return Sn.Must}return Sn.Not}var ub=Bt();function rF(e,t){$r(ub.get(e)==null&&t),ub.set(e,t)}function iF(e,t,n){var r=ub.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}var $A=be(),aF=be(),tS=(function(){function e(){}return e.prototype.getColorFromPalette=function(t,n,r){var i=un(this.get("color",!0)),a=this.get("colorLayer",!0);return TO(this,$A,i,a,t,n,r)},e.prototype.clearColorPalette=function(){sF(this,$A)},e})();function oF(e,t,n,r){var i=un(e.get(["aria","decal","decals"]));return TO(e,aF,i,null,t,n,r)}function lF(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}function TO(e,t,n,r,i,a,o){a=a||e;var l=t(a),s=l.paletteIdx||0,c=l.paletteNameMap=l.paletteNameMap||{};if(c.hasOwnProperty(i))return c[i];var h=o==null||!r?n:lF(r,o);if(h=h||n,!(!h||!h.length)){var d=h[s];return i&&(c[i]=d),l.paletteIdx=(s+1)%h.length,d}}function sF(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Cv,Jc,QA,KA="\0_ec_inner",uF=1,eS=(function(e){ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(n,r,i,a,o,l){a=a||{},this.option=null,this._theme=new Te(a),this._locale=new Te(o),this._optionManager=l},t.prototype.setOption=function(n,r,i){var a=eD(r);this._optionManager.setOption(n,i,a),this._resetOption(null,a)},t.prototype.resetOption=function(n,r){return this._resetOption(n,eD(r))},t.prototype._resetOption=function(n,r){var i=!1,a=this._optionManager;if(!n||n==="recreate"){var o=a.mountOption(n==="recreate");!this.option||n==="recreate"?QA(this,o):(this.restoreData(),this._mergeOption(o,r)),i=!0}if((n==="timeline"||n==="media")&&this.restoreData(),!n||n==="recreate"||n==="timeline"){var l=a.getTimelineOption(this);l&&(i=!0,this._mergeOption(l,r))}if(!n||n==="recreate"||n==="media"){var s=a.getMediaOption(this);s.length&&P(s,function(c){i=!0,this._mergeOption(c,r)},this)}return i},t.prototype.mergeOption=function(n){this._mergeOption(n,null)},t.prototype._mergeOption=function(n,r){var i=this.option,a=this._componentsMap,o=this._componentsCount,l=[],s=Bt(),c=r&&r.replaceMergeMainTypeMap;eF(this),P(n,function(d,v){d!=null&&(he.hasClass(v)?v&&(l.push(v),s.set(v,!0)):i[v]=i[v]==null?It(d):qt(i[v],d,!0))}),c&&c.each(function(d,v){he.hasClass(v)&&!s.get(v)&&(l.push(v),s.set(v,!0))}),he.topologicalTravel(l,he.getAllClassMainTypes(),h,this);function h(d){var v=iF(this,d,un(n[d])),g=a.get(d),m=g?c&&c.get(d)?"replaceMerge":"normalMerge":"replaceAll",x=Z6(g,v,m);rV(x,d,he),i[d]=null,a.set(d,null),o.set(d,0);var _=[],b=[],S=0,w;P(x,function(A,D){var M=A.existing,L=A.newOption;if(!L)M&&(M.mergeOption({},this),M.optionUpdated({},!1));else{var I=d==="series",N=he.getClass(d,A.keyInfo.subType,!I);if(!N)return;if(d==="tooltip"){if(w)return;w=!0}if(M&&M.constructor===N)M.name=A.keyInfo.name,M.mergeOption(L,this),M.optionUpdated(L,!1);else{var E=dt({componentIndex:D},A.keyInfo);M=new N(L,this,this,E),dt(M,E),A.brandNew&&(M.__requireNewView=!0),M.init(L,this,this),M.optionUpdated(null,!0)}}M?(_.push(M.option),b.push(M),S++):(_.push(void 0),b.push(void 0))},this),i[d]=_,a.set(d,b),o.set(d,S),d==="series"&&Cv(this)}this._seriesIndices||Cv(this)},t.prototype.getOption=function(){var n=It(this.option);return P(n,function(r,i){if(he.hasClass(i)){for(var a=un(r),o=a.length,l=!1,s=o-1;s>=0;s--)a[s]&&!rh(a[s])?l=!0:(a[s]=null,!l&&o--);a.length=o,n[i]=a}}),delete n[KA],n},t.prototype.setTheme=function(n){this._theme=new Te(n),this._resetOption("recreate",null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(n){this._payload=n},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(n,r){var i=this._componentsMap.get(n);if(i){var a=i[r||0];if(a)return a;if(r==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},t.prototype.queryComponents=function(n){var r=n.mainType;if(!r)return[];var i=n.index,a=n.id,o=n.name,l=this._componentsMap.get(r);if(!l||!l.length)return[];var s;return i!=null?(s=[],P(un(i),function(c){l[c]&&s.push(l[c])})):a!=null?s=JA("id",a,l):o!=null?s=JA("name",o,l):s=Ze(l,function(c){return!!c}),tD(s,n)},t.prototype.findComponents=function(n){var r=n.query,i=n.mainType,a=l(r),o=a?this.queryComponents(a):Ze(this._componentsMap.get(i),function(c){return!!c});return s(tD(o,n));function l(c){var h=i+"Index",d=i+"Id",v=i+"Name";return c&&(c[h]!=null||c[d]!=null||c[v]!=null)?{mainType:i,index:c[h],id:c[d],name:c[v]}:null}function s(c){return n.filter?Ze(c,n.filter):c}},t.prototype.eachComponent=function(n,r,i){var a=this._componentsMap;if(Rt(n)){var o=r,l=n;a.each(function(d,v){for(var g=0;d&&g<d.length;g++){var m=d[g];m&&l.call(o,v,m,m.componentIndex)}})}else for(var s=St(n)?a.get(n):Lt(n)?this.findComponents(n):null,c=0;s&&c<s.length;c++){var h=s[c];h&&r.call(i,h,h.componentIndex)}},t.prototype.getSeriesByName=function(n){var r=Yn(n,null);return Ze(this._componentsMap.get("series"),function(i){return!!i&&r!=null&&i.name===r})},t.prototype.getSeriesByIndex=function(n){return this._componentsMap.get("series")[n]},t.prototype.getSeriesByType=function(n){return Ze(this._componentsMap.get("series"),function(r){return!!r&&r.subType===n})},t.prototype.getSeries=function(){return Ze(this._componentsMap.get("series"),function(n){return!!n})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(n,r){Jc(this),P(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];n.call(r,a,i)},this)},t.prototype.eachRawSeries=function(n,r){P(this._componentsMap.get("series"),function(i){i&&n.call(r,i,i.componentIndex)})},t.prototype.eachSeriesByType=function(n,r,i){Jc(this),P(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===n&&r.call(i,o,a)},this)},t.prototype.eachRawSeriesByType=function(n,r,i){return P(this.getSeriesByType(n),r,i)},t.prototype.isSeriesFiltered=function(n){return Jc(this),this._seriesIndicesMap.get(n.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(n,r){Jc(this);var i=[];P(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];n.call(r,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=Bt(i)},t.prototype.restoreData=function(n){Cv(this);var r=this._componentsMap,i=[];r.each(function(a,o){he.hasClass(o)&&i.push(o)}),he.topologicalTravel(i,he.getAllClassMainTypes(),function(a){P(r.get(a),function(o){o&&(a!=="series"||!cF(o,n))&&o.restoreData()})})},t.internalField=(function(){Cv=function(n){var r=n._seriesIndices=[];P(n._componentsMap.get("series"),function(i){i&&r.push(i.componentIndex)}),n._seriesIndicesMap=Bt(r)},Jc=function(n){},QA=function(n,r){n.option={},n.option[KA]=uF,n._componentsMap=Bt({series:[]}),n._componentsCount=Bt();var i=r.aria;Lt(i)&&i.enabled==null&&(i.enabled=!0),fF(r,n._theme.option),qt(r,tF,!1),n._mergeOption(r,null)}})(),t})(Te);function cF(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return n!=null&&e.componentIndex!==n||r!=null&&e.id!==r||i!=null&&e.name!==i}}function fF(e,t){var n=e.color&&!e.colorLayer;P(t,function(r,i){i==="colorLayer"&&n||i==="color"&&e.color||he.hasClass(i)||(typeof r=="object"?e[i]=e[i]?qt(e[i],r,!1):It(r):e[i]==null&&(e[i]=r))})}function JA(e,t,n){if(mt(t)){var r=Bt();return P(t,function(a){if(a!=null){var o=Yn(a,null);o!=null&&r.set(a,!0)}}),Ze(n,function(a){return a&&r.get(a[e])})}else{var i=Yn(t,null);return Ze(n,function(a){return a&&i!=null&&a[e]===i})}}function tD(e,t){return t.hasOwnProperty("subType")?Ze(e,function(n){return n&&n.subType===t.subType}):e}function eD(e){var t=Bt();return e&&P(un(e.replaceMerge),function(n){t.set(n,!0)}),{replaceMergeMainTypeMap:t}}Xn(eS,tS);var hF=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],CO=(function(){function e(t){P(hF,function(n){this[n]=Ct(t[n],t)},this)}return e})(),dF=/^(min|max)?(.+)$/,vF=(function(){function e(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return e.prototype.setOption=function(t,n,r){t&&(P(un(t.series),function(o){o&&o.data&&ur(o.data)&&_p(o.data)}),P(un(t.dataset),function(o){o&&o.source&&ur(o.source)&&_p(o.source)})),t=It(t);var i=this._optionBackup,a=pF(t,n,!i);this._newBaseOption=a.baseOption,i?(a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},e.prototype.mountOption=function(t){var n=this._optionBackup;return this._timelineOptions=n.timelineOptions,this._mediaList=n.mediaList,this._mediaDefault=n.mediaDefault,this._currentMediaIndices=[],It(t?n.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(t){var n,r=this._timelineOptions;if(r.length){var i=t.getComponent("timeline");i&&(n=It(r[i.getCurrentIndex()]))}return n},e.prototype.getMediaOption=function(t){var n=this._api.getWidth(),r=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,o=[],l=[];if(!i.length&&!a)return l;for(var s=0,c=i.length;s<c;s++)gF(i[s].query,n,r)&&o.push(s);return!o.length&&a&&(o=[-1]),o.length&&!yF(o,this._currentMediaIndices)&&(l=bt(o,function(h){return It(h===-1?a.option:i[h].option)})),this._currentMediaIndices=o,l},e})();function pF(e,t,n){var r=[],i,a,o=e.baseOption,l=e.timeline,s=e.options,c=e.media,h=!!e.media,d=!!(s||l||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=l)):((d||h)&&(e.options=e.media=null),a=e),h&&mt(c)&&P(c,function(g){g&&g.option&&(g.query?r.push(g):i||(i=g))}),v(a),P(s,function(g){return v(g)}),P(r,function(g){return v(g.option)});function v(g){P(t,function(m){m(g,n)})}return{baseOption:a,timelineOptions:s||[],mediaDefault:i,mediaList:r}}function gF(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return P(e,function(a,o){var l=o.match(dF);if(!(!l||!l[1]||!l[2])){var s=l[1],c=l[2].toLowerCase();mF(r[c],a,s)||(i=!1)}}),i}function mF(e,t,n){return n==="min"?e>=t:n==="max"?e<=t:e===t}function yF(e,t){return e.join(",")===t.join(",")}var li=P,ch=Lt,nD=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function s1(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=nD.length;n<r;n++){var i=nD[n],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?qt(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?qt(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function Ln(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,$t(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function Ef(e){Ln(e,"itemStyle"),Ln(e,"lineStyle"),Ln(e,"areaStyle"),Ln(e,"label"),Ln(e,"labelLine"),Ln(e,"upperLabel"),Ln(e,"edgeLabel")}function Xe(e,t){var n=ch(e)&&e[t],r=ch(n)&&n.textStyle;if(r)for(var i=0,a=rA.length;i<a;i++){var o=rA[i];r.hasOwnProperty(o)&&(n[o]=r[o])}}function jr(e){e&&(Ef(e),Xe(e,"label"),e.emphasis&&Xe(e.emphasis,"label"))}function xF(e){if(ch(e)){s1(e),Ef(e),Xe(e,"label"),Xe(e,"upperLabel"),Xe(e,"edgeLabel"),e.emphasis&&(Xe(e.emphasis,"label"),Xe(e.emphasis,"upperLabel"),Xe(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(s1(t),jr(t));var n=e.markLine;n&&(s1(n),jr(n));var r=e.markArea;r&&jr(r);var i=e.data;if(e.type==="graph"){i=i||e.nodes;var a=e.links||e.edges;if(a&&!ur(a))for(var o=0;o<a.length;o++)jr(a[o]);P(e.categories,function(c){Ef(c)})}if(i&&!ur(i))for(var o=0;o<i.length;o++)jr(i[o]);if(t=e.markPoint,t&&t.data)for(var l=t.data,o=0;o<l.length;o++)jr(l[o]);if(n=e.markLine,n&&n.data)for(var s=n.data,o=0;o<s.length;o++)mt(s[o])?(jr(s[o][0]),jr(s[o][1])):jr(s[o]);e.type==="gauge"?(Xe(e,"axisLabel"),Xe(e,"title"),Xe(e,"detail")):e.type==="treemap"?(Ln(e.breadcrumb,"itemStyle"),P(e.levels,function(c){Ef(c)})):e.type==="tree"&&Ef(e.leaves)}}function ga(e){return mt(e)?e:e?[e]:[]}function rD(e){return(mt(e)?e[0]:e)||{}}function bF(e,t){li(ga(e.series),function(r){ch(r)&&xF(r)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),li(n,function(r){li(ga(e[r]),function(i){i&&(Xe(i,"axisLabel"),Xe(i.axisPointer,"label"))})}),li(ga(e.parallel),function(r){var i=r&&r.parallelAxisDefault;Xe(i,"axisLabel"),Xe(i&&i.axisPointer,"label")}),li(ga(e.calendar),function(r){Ln(r,"itemStyle"),Xe(r,"dayLabel"),Xe(r,"monthLabel"),Xe(r,"yearLabel")}),li(ga(e.radar),function(r){Xe(r,"name"),r.name&&r.axisName==null&&(r.axisName=r.name,delete r.name),r.nameGap!=null&&r.axisNameGap==null&&(r.axisNameGap=r.nameGap,delete r.nameGap)}),li(ga(e.geo),function(r){ch(r)&&(jr(r),li(ga(r.regions),function(i){jr(i)}))}),li(ga(e.timeline),function(r){jr(r),Ln(r,"label"),Ln(r,"itemStyle"),Ln(r,"controlStyle",!0);var i=r.data;mt(i)&&P(i,function(a){Lt(a)&&(Ln(a,"label"),Ln(a,"itemStyle"))})}),li(ga(e.toolbox),function(r){Ln(r,"iconStyle"),li(r.feature,function(i){Ln(i,"iconStyle")})}),Xe(rD(e.axisPointer),"label"),Xe(rD(e.tooltip).axisPointer,"label")}function _F(e,t){for(var n=t.split(","),r=e,i=0;i<n.length&&(r=r&&r[n[i]],r!=null);i++);return r}function SF(e,t,n,r){for(var i=t.split(","),a=e,o,l=0;l<i.length-1;l++)o=i[l],a[o]==null&&(a[o]={}),a=a[o];a[i[l]]==null&&(a[i[l]]=n)}function iD(e){e&&P(wF,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var wF=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],TF=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],u1=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function tf(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<u1.length;n++){var r=u1[n][1],i=u1[n][0];t[r]!=null&&(t[i]=t[r])}}function aD(e){e&&e.alignTo==="edge"&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function oD(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function CF(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus==null&&(e.emphasis.focus="adjacency"))}function MO(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&MO(e[n].children,t)}function AO(e,t){bF(e,t),e.series=un(e.series),P(e.series,function(n){if(Lt(n)){var r=n.type;if(r==="line")n.clipOverflow!=null&&(n.clip=n.clipOverflow);else if(r==="pie"||r==="gauge"){n.clockWise!=null&&(n.clockwise=n.clockWise),aD(n.label);var i=n.data;if(i&&!ur(i))for(var a=0;a<i.length;a++)aD(i[a]);n.hoverOffset!=null&&(n.emphasis=n.emphasis||{},(n.emphasis.scaleSize=null)&&(n.emphasis.scaleSize=n.hoverOffset))}else if(r==="gauge"){var o=_F(n,"pointer.color");o!=null&&SF(n,"itemStyle.color",o)}else if(r==="bar"){tf(n),tf(n.backgroundStyle),tf(n.emphasis);var i=n.data;if(i&&!ur(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(tf(i[a]),tf(i[a]&&i[a].emphasis))}else if(r==="sunburst"){var l=n.highlightPolicy;l&&(n.emphasis=n.emphasis||{},n.emphasis.focus||(n.emphasis.focus=l)),oD(n),MO(n.data,oD)}else r==="graph"||r==="sankey"?CF(n):r==="map"&&(n.mapType&&!n.map&&(n.map=n.mapType),n.mapLocation&&$t(n,n.mapLocation));n.hoverAnimation!=null&&(n.emphasis=n.emphasis||{},n.emphasis&&n.emphasis.scale==null&&(n.emphasis.scale=n.hoverAnimation)),iD(n)}}),e.dataRange&&(e.visualMap=e.dataRange),P(TF,function(n){var r=e[n];r&&(mt(r)||(r=[r]),P(r,function(i){iD(i)}))})}function MF(e){var t=Bt();e.eachSeries(function(n){var r=n.get("stack");if(r){var i=t.get(r)||t.set(r,[]),a=n.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:n};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.push(o)}}),t.each(function(n){if(n.length!==0){var r=n[0].seriesModel,i=r.get("stackOrder")||"seriesAsc";i==="seriesDesc"&&n.reverse(),P(n,function(a,o){a.data.setCalculationInfo("stackedOnSeries",o>0?n[o-1].seriesModel:null)}),AF(n)}})}function AF(e){P(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,l=t.isStackedByIndex,s=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(c,h,d){var v=o.get(t.stackedDimension,d);if(isNaN(v))return i;var g,m;l?m=o.getRawIndex(d):g=o.get(t.stackedByDimension,d);for(var x=NaN,_=n-1;_>=0;_--){var b=e[_];if(l||(m=b.data.rawIndexOf(b.stackedByDimension,g)),m>=0){var S=b.data.getByRawIndex(b.stackResultDimension,m);if(s==="all"||s==="positive"&&S>0||s==="negative"&&S<0||s==="samesign"&&v>=0&&S>0||s==="samesign"&&v<=0&&S<0){v=j6(v,S),x=S;break}}}return r[0]=v,r[1]=x,r})})}var Bg=(function(){function e(t){this.data=t.data||(t.sourceFormat===Si?{}:[]),this.sourceFormat=t.sourceFormat||yO,this.seriesLayoutBy=t.seriesLayoutBy||pi,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var n=this.dimensionsDefine=t.dimensionsDefine;if(n)for(var r=0;r<n.length;r++){var i=n[r];i.type==null&&SO(this,r)===Sn.Must&&(i.type="ordinal")}}return e})();function nS(e){return e instanceof Bg}function cb(e,t,n){n=n||DO(e);var r=t.seriesLayoutBy,i=kF(e,n,r,t.sourceHeader,t.dimensions),a=new Bg({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:It(t)});return a}function rS(e){return new Bg({data:e,sourceFormat:ur(e)?ko:Ar})}function DF(e){return new Bg({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:It(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function DO(e){var t=yO;if(ur(e))t=ko;else if(mt(e)){e.length===0&&(t=Mn);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i!=null){if(mt(i)||ur(i)){t=Mn;break}else if(Lt(i)){t=ei;break}}}}else if(Lt(e)){for(var a in e)if(hi(e,a)&&sr(e[a])){t=Si;break}}return t}function kF(e,t,n,r,i){var a,o;if(!e)return{dimensionsDefine:lD(i),startIndex:o,dimensionsDetectedCount:a};if(t===Mn){var l=e;r==="auto"||r==null?sD(function(c){c!=null&&c!=="-"&&(St(c)?o==null&&(o=1):o=0)},n,l,10):o=ve(r)?r:r?1:0,!i&&o===1&&(i=[],sD(function(c,h){i[h]=c!=null?c+"":""},n,l,1/0)),a=i?i.length:n===is?l.length:l[0]?l[0].length:null}else if(t===ei)i||(i=LF(e));else if(t===Si)i||(i=[],P(e,function(c,h){i.push(h)}));else if(t===Ar){var s=Ah(e[0]);a=mt(s)&&s.length||1}return{startIndex:o,dimensionsDefine:lD(i),dimensionsDetectedCount:a}}function LF(e){for(var t=0,n;t<e.length&&!(n=e[t++]););if(n)return Be(n)}function lD(e){if(e){var t=Bt();return bt(e,function(n,r){n=Lt(n)?n:{name:n};var i={name:n.name,displayName:n.displayName,type:n.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 sD(e,t,n,r){if(t===is)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else for(var a=n[0]||[],i=0;i<a.length&&i<r;i++)e(a[i],i)}function kO(e){var t=e.sourceFormat;return t===ei||t===Si}var wl,Tl,Cl,Ml,uD,cD,LO=(function(){function e(t,n){var r=nS(t)?t:rS(t);this._source=r;var i=this._data=r.data,a=r.sourceFormat;r.seriesLayoutBy,a===ko&&(this._offset=0,this._dimSize=n,this._data=i),cD(this,i,r)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(t,n){},e.prototype.appendData=function(t){},e.prototype.clean=function(){},e.protoInitialize=(function(){var t=e.prototype;t.pure=!1,t.persistent=!0})(),e.internalField=(function(){var t;cD=function(o,l,s){var c=s.sourceFormat,h=s.seriesLayoutBy,d=s.startIndex,v=s.dimensionsDefine,g=uD[iS(c,h)];if(dt(o,g),c===ko)o.getItem=n,o.count=i,o.fillStorage=r;else{var m=EO(c,h);o.getItem=Ct(m,null,l,d,v);var x=RO(c,h);o.count=Ct(x,null,l,d,v)}};var n=function(o,l){o=o-this._offset,l=l||[];for(var s=this._data,c=this._dimSize,h=c*o,d=0;d<c;d++)l[d]=s[h+d];return l},r=function(o,l,s,c){for(var h=this._data,d=this._dimSize,v=0;v<d;v++){for(var g=c[v],m=g[0]==null?1/0:g[0],x=g[1]==null?-1/0:g[1],_=l-o,b=s[v],S=0;S<_;S++){var w=h[S*d+v];b[o+S]=w,w<m&&(m=w),w>x&&(x=w)}g[0]=m,g[1]=x}},i=function(){return this._data?this._data.length/this._dimSize:0};uD=(t={},t[Mn+"_"+pi]={pure:!0,appendData:a},t[Mn+"_"+is]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[ei]={pure:!0,appendData:a},t[Si]={pure:!0,appendData:function(o){var l=this._data;P(o,function(s,c){for(var h=l[c]||(l[c]=[]),d=0;d<(s||[]).length;d++)h.push(s[d])})}},t[Ar]={appendData:a},t[ko]={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 l=0;l<o.length;l++)this._data.push(o[l])}})(),e})(),Mv=function(e){mt(e)||cI("series.data or dataset.source must be an array.")};wl={},wl[Mn+"_"+pi]=Mv,wl[Mn+"_"+is]=Mv,wl[ei]=Mv,wl[Si]=function(e,t){for(var n=0;n<t.length;n++){var r=t[n].name;r==null&&cI("dimension name must not be null/undefined.")}},wl[Ar]=Mv;var fD=function(e,t,n,r){return e[r]},EF=(Tl={},Tl[Mn+"_"+pi]=function(e,t,n,r){return e[r+t]},Tl[Mn+"_"+is]=function(e,t,n,r,i){r+=t;for(var a=i||[],o=e,l=0;l<o.length;l++){var s=o[l];a[l]=s?s[r]:null}return a},Tl[ei]=fD,Tl[Si]=function(e,t,n,r,i){for(var a=i||[],o=0;o<n.length;o++){var l=n[o].name,s=l!=null?e[l]:null;a[o]=s?s[r]:null}return a},Tl[Ar]=fD,Tl);function EO(e,t){var n=EF[iS(e,t)];return n}var hD=function(e,t,n){return e.length},RF=(Cl={},Cl[Mn+"_"+pi]=function(e,t,n){return Math.max(0,e.length-t)},Cl[Mn+"_"+is]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},Cl[ei]=hD,Cl[Si]=function(e,t,n){var r=n[0].name,i=r!=null?e[r]:null;return i?i.length:0},Cl[Ar]=hD,Cl);function RO(e,t){var n=RF[iS(e,t)];return n}var c1=function(e,t,n){return e[t]},IF=(Ml={},Ml[Mn]=c1,Ml[ei]=function(e,t,n){return e[n]},Ml[Si]=c1,Ml[Ar]=function(e,t,n){var r=Ah(e);return r instanceof Array?r[t]:r},Ml[ko]=c1,Ml);function IO(e){var t=IF[e];return t}function iS(e,t){return e===Mn?e+"_"+t:e}function Nu(e,t,n){if(e){var r=e.getRawDataItem(t);if(r!=null){var i=e.getStore(),a=i.getSource().sourceFormat;if(n!=null){var o=e.getDimensionIndex(n),l=i.getDimensionProperty(o);return IO(a)(r,o,l)}else{var s=r;return a===Ar&&(s=Ah(r)),s}}}}var OF=/\{@(.+?)\}/g,zF=(function(){function e(){}return e.prototype.getDataParams=function(t,n){var r=this.getData(n),i=this.getRawValue(t,n),a=r.getRawIndex(t),o=r.getName(t),l=r.getRawDataItem(t),s=r.getItemVisual(t,"style"),c=s&&s[r.getItemVisual(t,"drawType")||"fill"],h=s&&s.stroke,d=this.mainType,v=d==="series",g=r.userOutput&&r.userOutput.get();return{componentType:d,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:l,dataType:n,value:i,color:c,borderColor:h,dimensionNames:g?g.fullDimensions:null,encode:g?g.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(t,n,r,i,a,o){n=n||"normal";var l=this.getData(r),s=this.getDataParams(t,r);if(o&&(s.value=o.interpolatedValue),i!=null&&mt(s.value)&&(s.value=s.value[i]),!a){var c=l.getItemModel(t);a=c.get(n==="normal"?["label","formatter"]:[n,"label","formatter"])}if(Rt(a))return s.status=n,s.dimensionIndex=i,a(s);if(St(a)){var h=dO(a,s);return h.replace(OF,function(d,v){var g=v.length,m=v;m.charAt(0)==="["&&m.charAt(g-1)==="]"&&(m=+m.slice(1,g-1));var x=Nu(l,t,m);if(o&&mt(o.interpolatedValue)){var _=l.getDimensionIndex(m);_>=0&&(x=o.interpolatedValue[_])}return x!=null?x+"":""})}},e.prototype.getRawValue=function(t,n){return Nu(this.getData(n),t)},e.prototype.formatTooltip=function(t,n,r){},e})();function dD(e){var t,n;return Lt(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function Yf(e){return new BF(e)}var BF=(function(){function e(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return e.prototype.perform=function(t){var n=this._upstream,r=t&&t.skip;if(this._dirty&&n){var i=this.context;i.data=i.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!r&&(a=this._plan(this.context));var o=h(this._modBy),l=this._modDataCount||0,s=h(t&&t.modBy),c=t&&t.modDataCount||0;(o!==s||l!==c)&&(a="reset");function h(S){return!(S>=1)&&(S=1),S}var d;(this._dirty||a==="reset")&&(this._dirty=!1,d=this._doReset(r)),this._modBy=s,this._modDataCount=c;var v=t&&t.step;if(n?this._dueEnd=n._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var g=this._dueIndex,m=Math.min(v!=null?this._dueIndex+v:1/0,this._dueEnd);if(!r&&(d||g<m)){var x=this._progress;if(mt(x))for(var _=0;_<x.length;_++)this._doProgress(x[_],g,m,s,c);else this._doProgress(x,g,m,s,c)}this._dueIndex=m;var b=this._settedOutputEnd!=null?this._settedOutputEnd:m;this._outputDueEnd=b}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(t,n,r,i,a){vD.reset(n,r,i,a),this._callingProgress=t,this._callingProgress({start:n,end:r,count:r-n,next:vD.next},this.context)},e.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var n,r;!t&&this._reset&&(n=this._reset(this.context),n&&n.progress&&(r=n.forceFirstProgress,n=n.progress),mt(n)&&!n.length&&(n=null)),this._progress=n,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),r},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},e})(),vD=(function(){var e,t,n,r,i,a={reset:function(s,c,h,d){t=s,e=c,n=h,r=d,i=Math.ceil(r/n),a.next=n>1&&r>0?l:o}};return a;function o(){return t<e?t++:null}function l(){var s=t%i*n+Math.ceil(t/i),c=t>=e?null:s<r?s:t;return t++,c}})();function pp(e,t){var n=t&&t.type;return n==="ordinal"?e:(n==="time"&&!ve(e)&&e!=null&&e!=="-"&&(e=+Yu(e)),e==null||e===""?NaN:Number(e))}Bt({number:function(e){return parseFloat(e)},time:function(e){return+Yu(e)},trim:function(e){return St(e)?Bi(e):e}});var NF=(function(){function e(t,n){var r=t==="desc";this._resultLT=r?1:-1,n==null&&(n=r?"min":"max"),this._incomparable=n==="min"?-1/0:1/0}return e.prototype.evaluate=function(t,n){var r=ve(t)?t:Ep(t),i=ve(n)?n:Ep(n),a=isNaN(r),o=isNaN(i);if(a&&(r=this._incomparable),o&&(i=this._incomparable),a&&o){var l=St(t),s=St(n);l&&(r=s?t:0),s&&(i=l?n:0)}return r<i?this._resultLT:r>i?-this._resultLT:0},e})(),PF=(function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(t){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(t){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(t,n){},e.prototype.retrieveValueFromItem=function(t,n){},e.prototype.convertValue=function(t,n){return pp(t,n)},e})();function HF(e,t){var n=new PF,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex,o="";e.seriesLayoutBy!==pi&&Fn(o);var l=[],s={},c=e.dimensionsDefine;if(c)P(c,function(x,_){var b=x.name,S={index:_,name:b,displayName:x.displayName};if(l.push(S),b!=null){var w="";hi(s,b)&&Fn(w),s[b]=S}});else for(var h=0;h<e.dimensionsDetectedCount;h++)l.push({index:h});var d=EO(i,pi);t.__isBuiltIn&&(n.getRawDataItem=function(x){return d(r,a,l,x)},n.getRawData=Ct(VF,null,e)),n.cloneRawData=Ct(jF,null,e);var v=RO(i,pi);n.count=Ct(v,null,r,a,l);var g=IO(i);n.retrieveValue=function(x,_){var b=d(r,a,l,x);return m(b,_)};var m=n.retrieveValueFromItem=function(x,_){if(x!=null){var b=l[_];if(b)return g(x,_,b.name)}};return n.getDimensionInfo=Ct(FF,null,l,s),n.cloneAllDimensionInfo=Ct(GF,null,l),n}function VF(e){var t=e.sourceFormat;if(!aS(t)){var n="";Fn(n)}return e.data}function jF(e){var t=e.sourceFormat,n=e.data;if(!aS(t)){var r="";Fn(r)}if(t===Mn){for(var i=[],a=0,o=n.length;a<o;a++)i.push(n[a].slice());return i}else if(t===ei){for(var i=[],a=0,o=n.length;a<o;a++)i.push(dt({},n[a]));return i}}function FF(e,t,n){if(n!=null){if(ve(n)||!isNaN(n)&&!hi(t,n))return e[n];if(hi(t,n))return t[n]}}function GF(e){return It(e)}var OO=Bt();function UF(e){e=It(e);var t=e.type,n="";t||Fn(n);var r=t.split(":");r.length!==2&&Fn(n);var i=!1;r[0]==="echarts"&&(t=r[1],i=!0),e.__isBuiltIn=i,OO.set(t,e)}function YF(e,t,n){var r=un(e),i=r.length,a="";i||Fn(a);for(var o=0,l=i;o<l;o++){var s=r[o];t=WF(s,t),o!==l-1&&(t.length=Math.max(t.length,1))}return t}function WF(e,t,n,r){var i="";t.length||Fn(i),Lt(e)||Fn(i);var a=e.type,o=OO.get(a);o||Fn(i);var l=bt(t,function(c){return HF(c,o)}),s=un(o.transform({upstream:l[0],upstreamList:l,config:It(e.config)}));return bt(s,function(c,h){var d="";Lt(c)||Fn(d),c.data||Fn(d);var v=DO(c.data);aS(v)||Fn(d);var g,m=t[0];if(m&&h===0&&!c.dimensions){var x=m.startIndex;x&&(c.data=m.data.slice(0,x).concat(c.data)),g={seriesLayoutBy:pi,sourceHeader:x,dimensions:m.metaRawOption.dimensions}}else g={seriesLayoutBy:pi,sourceHeader:0,dimensions:c.dimensions};return cb(c.data,g,null)})}function aS(e){return e===Mn||e===ei}var Ng="undefined",qF=typeof Uint32Array===Ng?Array:Uint32Array,XF=typeof Uint16Array===Ng?Array:Uint16Array,zO=typeof Int32Array===Ng?Array:Int32Array,pD=typeof Float64Array===Ng?Array:Float64Array,BO={float:pD,int:zO,ordinal:Array,number:Array,time:pD},f1;function eu(e){return e>65535?qF:XF}function nu(){return[1/0,-1/0]}function ZF(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function gD(e,t,n,r,i){var a=BO[n||"float"];if(i){var o=e[t],l=o&&o.length;if(l!==r){for(var s=new a(r),c=0;c<l;c++)s[c]=o[c];e[t]=s}}else e[t]=new a(r)}var fb=(function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Bt()}return e.prototype.initData=function(t,n,r){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=t.getSource(),a=this.defaultDimValueGetter=f1[i.sourceFormat];this._dimValueGetter=r||a,this._rawExtent=[],kO(i),this._dimensions=bt(n,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,t.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(t,n){var r=this._calcDimNameToIdx,i=this._dimensions,a=r.get(t);if(a!=null){if(i[a].type===n)return a}else a=i.length;return i[a]={type:n},r.set(t,a),this._chunks[a]=new BO[n||"float"](this._rawCount),this._rawExtent[a]=nu(),a},e.prototype.collectOrdinalMeta=function(t,n){var r=this._chunks[t],i=this._dimensions[t],a=this._rawExtent,o=i.ordinalOffset||0,l=r.length;o===0&&(a[t]=nu());for(var s=a[t],c=o;c<l;c++){var h=r[c]=n.parseAndCollect(r[c]);isNaN(h)||(s[0]=Math.min(h,s[0]),s[1]=Math.max(h,s[1]))}i.ordinalMeta=n,i.ordinalOffset=l,i.type="ordinal"},e.prototype.getOrdinalMeta=function(t){var n=this._dimensions[t],r=n.ordinalMeta;return r},e.prototype.getDimensionProperty=function(t){var n=this._dimensions[t];return n&&n.property},e.prototype.appendData=function(t){var n=this._provider,r=this.count();n.appendData(t);var i=n.count();return n.persistent||(i+=r),r<i&&this._initDataFromProvider(r,i,!0),[r,i]},e.prototype.appendValues=function(t,n){for(var r=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,l=this.count(),s=l+Math.max(t.length,n||0),c=0;c<a;c++){var h=i[c];gD(r,c,h.type,s,!0)}for(var d=[],v=l;v<s;v++)for(var g=v-l,m=0;m<a;m++){var h=i[m],x=f1.arrayRows.call(this,t[g]||d,h.property,g,m);r[m][v]=x;var _=o[m];x<_[0]&&(_[0]=x),x>_[1]&&(_[1]=x)}return this._rawCount=this._count=s,{start:l,end:s}},e.prototype._initDataFromProvider=function(t,n,r){for(var i=this._provider,a=this._chunks,o=this._dimensions,l=o.length,s=this._rawExtent,c=bt(o,function(S){return S.property}),h=0;h<l;h++){var d=o[h];s[h]||(s[h]=nu()),gD(a,h,d.type,n,r)}if(i.fillStorage)i.fillStorage(t,n,a,s);else for(var v=[],g=t;g<n;g++){v=i.getItem(g,v);for(var m=0;m<l;m++){var x=a[m],_=this._dimValueGetter(v,c[m],g,m);x[g]=_;var b=s[m];_<b[0]&&(b[0]=_),_>b[1]&&(b[1]=_)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=n,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(t,n){if(!(n>=0&&n<this._count))return NaN;var r=this._chunks[t];return r?r[this.getRawIndex(n)]:NaN},e.prototype.getValues=function(t,n){var r=[],i=[];if(n==null){n=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++)r.push(this.get(i[a],n));return r},e.prototype.getByRawIndex=function(t,n){if(!(n>=0&&n<this._rawCount))return NaN;var r=this._chunks[t];return r?r[n]:NaN},e.prototype.getSum=function(t){var n=this._chunks[t],r=0;if(n)for(var i=0,a=this.count();i<a;i++){var o=this.get(t,i);isNaN(o)||(r+=o)}return r},e.prototype.getMedian=function(t){var n=[];this.each([t],function(a){isNaN(a)||n.push(a)});var r=n.sort(function(a,o){return a-o}),i=this.count();return i===0?0:i%2===1?r[(i-1)/2]:(r[i/2]+r[i/2-1])/2},e.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var n=this._indices,r=n[t];if(r!=null&&r<this._count&&r===t)return t;for(var i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(n[o]<t)i=o+1;else if(n[o]>t)a=o-1;else return o}return-1},e.prototype.getIndices=function(){var t,n=this._indices;if(n){var r=n.constructor,i=this._count;if(r===Array){t=new r(i);for(var a=0;a<i;a++)t[a]=n[a]}else t=new r(n.buffer,0,i)}else{var r=eu(this._rawCount);t=new r(this.count());for(var a=0;a<t.length;a++)t[a]=a}return t},e.prototype.filter=function(t,n){if(!this._count)return this;for(var r=this.clone(),i=r.count(),a=eu(r._rawCount),o=new a(i),l=[],s=t.length,c=0,h=t[0],d=r._chunks,v=0;v<i;v++){var g=void 0,m=r.getRawIndex(v);if(s===0)g=n(v);else if(s===1){var x=d[h][m];g=n(x,v)}else{for(var _=0;_<s;_++)l[_]=d[t[_]][m];l[_]=v,g=n.apply(null,l)}g&&(o[c++]=m)}return c<i&&(r._indices=o),r._count=c,r._extent=[],r._updateGetRawIdx(),r},e.prototype.selectRange=function(t){var n=this.clone(),r=n._count;if(!r)return this;var i=Be(t),a=i.length;if(!a)return this;var o=n.count(),l=eu(n._rawCount),s=new l(o),c=0,h=i[0],d=t[h][0],v=t[h][1],g=n._chunks,m=!1;if(!n._indices){var x=0;if(a===1){for(var _=g[i[0]],b=0;b<r;b++){var S=_[b];(S>=d&&S<=v||isNaN(S))&&(s[c++]=x),x++}m=!0}else if(a===2){for(var _=g[i[0]],w=g[i[1]],A=t[i[1]][0],D=t[i[1]][1],b=0;b<r;b++){var S=_[b],M=w[b];(S>=d&&S<=v||isNaN(S))&&(M>=A&&M<=D||isNaN(M))&&(s[c++]=x),x++}m=!0}}if(!m)if(a===1)for(var b=0;b<o;b++){var L=n.getRawIndex(b),S=g[i[0]][L];(S>=d&&S<=v||isNaN(S))&&(s[c++]=L)}else for(var b=0;b<o;b++){for(var I=!0,L=n.getRawIndex(b),N=0;N<a;N++){var E=i[N],S=g[E][L];(S<t[E][0]||S>t[E][1])&&(I=!1)}I&&(s[c++]=n.getRawIndex(b))}return c<o&&(n._indices=s),n._count=c,n._extent=[],n._updateGetRawIdx(),n},e.prototype.map=function(t,n){var r=this.clone(t);return this._updateDims(r,t,n),r},e.prototype.modify=function(t,n){this._updateDims(this,t,n)},e.prototype._updateDims=function(t,n,r){for(var i=t._chunks,a=[],o=n.length,l=t.count(),s=[],c=t._rawExtent,h=0;h<n.length;h++)c[n[h]]=nu();for(var d=0;d<l;d++){for(var v=t.getRawIndex(d),g=0;g<o;g++)s[g]=i[n[g]][v];s[o]=d;var m=r&&r.apply(null,s);if(m!=null){typeof m!="object"&&(a[0]=m,m=a);for(var h=0;h<m.length;h++){var x=n[h],_=m[h],b=c[x],S=i[x];S&&(S[v]=_),_<b[0]&&(b[0]=_),_>b[1]&&(b[1]=_)}}}},e.prototype.lttbDownSample=function(t,n){var r=this.clone([t],!0),i=r._chunks,a=i[t],o=this.count(),l=0,s=Math.floor(1/n),c=this.getRawIndex(0),h,d,v,g=new(eu(this._rawCount))(Math.min((Math.ceil(o/s)+2)*2,o));g[l++]=c;for(var m=1;m<o-1;m+=s){for(var x=Math.min(m+s,o-1),_=Math.min(m+s*2,o),b=(_+x)/2,S=0,w=x;w<_;w++){var A=this.getRawIndex(w),D=a[A];isNaN(D)||(S+=D)}S/=_-x;var M=m,L=Math.min(m+s,o),I=m-1,N=a[c];h=-1,v=M;for(var E=-1,O=0,w=M;w<L;w++){var A=this.getRawIndex(w),D=a[A];if(isNaN(D)){O++,E<0&&(E=A);continue}d=Math.abs((I-b)*(D-N)-(I-w)*(S-N)),d>h&&(h=d,v=A)}O>0&&O<L-M&&(g[l++]=Math.min(E,v),v=Math.max(E,v)),g[l++]=v,c=v}return g[l++]=this.getRawIndex(o-1),r._count=l,r._indices=g,r.getRawIndex=this._getRawIdx,r},e.prototype.minmaxDownSample=function(t,n){for(var r=this.clone([t],!0),i=r._chunks,a=Math.floor(1/n),o=i[t],l=this.count(),s=new(eu(this._rawCount))(Math.ceil(l/a)*2),c=0,h=0;h<l;h+=a){var d=h,v=o[this.getRawIndex(d)],g=h,m=o[this.getRawIndex(g)],x=a;h+a>l&&(x=l-h);for(var _=0;_<x;_++){var b=this.getRawIndex(h+_),S=o[b];S<v&&(v=S,d=h+_),S>m&&(m=S,g=h+_)}var w=this.getRawIndex(d),A=this.getRawIndex(g);d<g?(s[c++]=w,s[c++]=A):(s[c++]=A,s[c++]=w)}return r._count=c,r._indices=s,r._updateGetRawIdx(),r},e.prototype.downSample=function(t,n,r,i){for(var a=this.clone([t],!0),o=a._chunks,l=[],s=Math.floor(1/n),c=o[t],h=this.count(),d=a._rawExtent[t]=nu(),v=new(eu(this._rawCount))(Math.ceil(h/s)),g=0,m=0;m<h;m+=s){s>h-m&&(s=h-m,l.length=s);for(var x=0;x<s;x++){var _=this.getRawIndex(m+x);l[x]=c[_]}var b=r(l),S=this.getRawIndex(Math.min(m+i(l,b)||0,h-1));c[S]=b,b<d[0]&&(d[0]=b),b>d[1]&&(d[1]=b),v[g++]=S}return a._count=g,a._indices=v,a._updateGetRawIdx(),a},e.prototype.each=function(t,n){if(this._count)for(var r=t.length,i=this._chunks,a=0,o=this.count();a<o;a++){var l=this.getRawIndex(a);switch(r){case 0:n(a);break;case 1:n(i[t[0]][l],a);break;case 2:n(i[t[0]][l],i[t[1]][l],a);break;default:for(var s=0,c=[];s<r;s++)c[s]=i[t[s]][l];c[s]=a,n.apply(null,c)}}},e.prototype.getDataExtent=function(t){var n=this._chunks[t],r=nu();if(!n)return r;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=r;for(var l=o[0],s=o[1],c=0;c<i;c++){var h=this.getRawIndex(c),d=n[h];d<l&&(l=d),d>s&&(s=d)}return o=[l,s],this._extent[t]=o,o},e.prototype.getRawDataItem=function(t){var n=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(n);for(var r=[],i=this._chunks,a=0;a<i.length;a++)r.push(i[a][n]);return r},e.prototype.clone=function(t,n){var r=new e,i=this._chunks,a=t&&Ro(t,function(l,s){return l[s]=!0,l},{});if(a)for(var o=0;o<i.length;o++)r._chunks[o]=a[o]?ZF(i[o]):i[o];else r._chunks=i;return this._copyCommonProps(r),n||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r},e.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=It(this._extent),t._rawExtent=It(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,n=void 0;if(t===Array){var r=this._indices.length;n=new t(r);for(var i=0;i<r;i++)n[i]=this._indices[i]}else n=new t(this._indices);return n}return null},e.prototype._getRawIdxIdentity=function(t){return t},e.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=(function(){function t(n,r,i,a){return pp(n[a],this._dimensions[a])}f1={arrayRows:t,objectRows:function(n,r,i,a){return pp(n[r],this._dimensions[a])},keyedColumns:t,original:function(n,r,i,a){var o=n&&(n.value==null?n:n.value);return pp(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(n,r,i,a){return n[a]}}})(),e})(),NO=(function(){function e(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(t,n){this._sourceList=t,this._upstreamSignList=n,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,n=this._getUpstreamSourceManagers(),r=!!n.length,i,a;if(Av(t)){var o=t,l=void 0,s=void 0,c=void 0;if(r){var h=n[0];h.prepareSource(),c=h.getSource(),l=c.data,s=c.sourceFormat,a=[h._getVersionSign()]}else l=o.get("data",!0),s=ur(l)?ko:Ar,a=[];var d=this._getSourceMetaRawOption()||{},v=c&&c.metaRawOption||{},g=zt(d.seriesLayoutBy,v.seriesLayoutBy)||null,m=zt(d.sourceHeader,v.sourceHeader),x=zt(d.dimensions,v.dimensions),_=g!==v.seriesLayoutBy||!!m!=!!v.sourceHeader||x;i=_?[cb(l,{seriesLayoutBy:g,sourceHeader:m,dimensions:x},s)]:[]}else{var b=t;if(r){var S=this._applyTransform(n);i=S.sourceList,a=S.upstreamSignList}else{var w=b.get("source",!0);i=[cb(w,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},e.prototype._applyTransform=function(t){var n=this._sourceHost,r=n.get("transform",!0),i=n.get("fromTransformResult",!0);if(i!=null){var a="";t.length!==1&&yD(a)}var o,l=[],s=[];return P(t,function(c){c.prepareSource();var h=c.getSource(i||0),d="";i!=null&&!h&&yD(d),l.push(h),s.push(c._getVersionSign())}),r?o=YF(r,l,{datasetIndex:n.componentIndex}):i!=null&&(o=[DF(l[0])]),{sourceList:o,upstreamSignList:s}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),n=0;n<t.length;n++){var r=t[n];if(r._isDirty()||this._upstreamSignList[n]!==r._getVersionSign())return!0}},e.prototype.getSource=function(t){t=t||0;var n=this._sourceList[t];if(!n){var r=this._getUpstreamSourceManagers();return r[0]&&r[0].getSource(t)}return n},e.prototype.getSharedDataStore=function(t){var n=t.makeStoreSchema();return this._innerGetDataStore(n.dimensions,t.source,n.hash)},e.prototype._innerGetDataStore=function(t,n,r){var i=0,a=this._storeList,o=a[i];o||(o=a[i]={});var l=o[r];if(!l){var s=this._getUpstreamSourceManagers()[0];Av(this._sourceHost)&&s?l=s._innerGetDataStore(t,n,r):(l=new fb,l.initData(new LO(n,t.length),t)),o[r]=l}return l},e.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(Av(t)){var n=J_(t);return n?[n.getSourceManager()]:[]}else return bt(nF(t),function(r){return r.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,n,r,i;if(Av(t))n=t.get("seriesLayoutBy",!0),r=t.get("sourceHeader",!0),i=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=t;n=a.get("seriesLayoutBy",!0),r=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:n,sourceHeader:r,dimensions:i}},e})();function mD(e){var t=e.option.transform;t&&_p(e.option.transform)}function Av(e){return e.mainType==="series"}function yD(e){throw new Error(e)}var $F="line-height:1";function PO(e){var t=e.lineHeight;return t==null?$F:"line-height:"+ar(t+"")+"px"}function HO(e,t){var n=e.color||lt.color.tertiary,r=e.fontSize||12,i=e.fontWeight||"400",a=e.color||lt.color.secondary,o=e.fontSize||14,l=e.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+ar(r+"")+"px;color:"+ar(n)+";font-weight:"+ar(i+""),valueStyle:"font-size:"+ar(o+"")+"px;color:"+ar(a)+";font-weight:"+ar(l+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:l}}}var QF=[0,10,20,30],KF=["",`
|
|
90
|
+
`,`
|
|
91
|
+
|
|
92
|
+
`,`
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
`];function Ui(e,t){return t.type=e,t}function hb(e){return e.type==="section"}function VO(e){return hb(e)?JF:tG}function jO(e){if(hb(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return P(e.blocks,function(i){var a=jO(i);a>=t&&(t=a+ +(r&&(!a||hb(i)&&!i.noHeader)))}),t}return 0}function JF(e,t,n,r){var i=t.noHeader,a=eG(jO(t)),o=[],l=t.blocks||[];$r(!l||mt(l)),l=l||[];var s=e.orderMode;if(t.sortBlocks&&s){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(hi(c,s)){var h=new NF(c[s],null);l.sort(function(x,_){return h.evaluate(x.sortParam,_.sortParam)})}else s==="seriesDesc"&&l.reverse()}P(l,function(x,_){var b=t.valueFormatter,S=VO(x)(b?dt(dt({},e),{valueFormatter:b}):e,x,_>0?a.html:0,r);S!=null&&o.push(S)});var d=e.renderMode==="richText"?o.join(a.richText):db(r,o.join(""),i?n:a.html);if(i)return d;var v=lb(t.header,"ordinal",e.useUTC),g=HO(r,e.renderMode).nameStyle,m=PO(r);return e.renderMode==="richText"?FO(e,v,g)+a.richText+d:db(r,'<div style="'+g+";"+m+';">'+ar(v)+"</div>"+d,n)}function tG(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,l=!t.markerType,s=t.name,c=e.useUTC,h=t.valueFormatter||e.valueFormatter||function(A){return A=mt(A)?A:[A],bt(A,function(D,M){return lb(D,mt(g)?g[M]:g,c)})};if(!(a&&o)){var d=l?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||lt.color.secondary,i),v=a?"":lb(s,"ordinal",c),g=t.valueType,m=o?[]:h(t.value,t.dataIndex),x=!l||!a,_=!l&&a,b=HO(r,i),S=b.nameStyle,w=b.valueStyle;return i==="richText"?(l?"":d)+(a?"":FO(e,v,S))+(o?"":iG(e,m,x,_,w)):db(r,(l?"":d)+(a?"":nG(v,!l,S))+(o?"":rG(m,x,_,w)),n)}}function xD(e,t,n,r,i,a){if(e){var o=VO(e),l={useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(l,e,0,a)}}function eG(e){return{html:QF[e],richText:KF[e]}}function db(e,t,n){var r='<div style="clear:both"></div>',i="margin: "+n+"px 0 0",a=PO(e);return'<div style="'+i+";"+a+';">'+t+r+"</div>"}function nG(e,t,n){var r=t?"margin-left:2px":"";return'<span style="'+n+";"+r+'">'+ar(e)+"</span>"}function rG(e,t,n,r){var i=n?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return e=mt(e)?e:[e],'<span style="'+a+";"+r+'">'+bt(e,function(o){return ar(o)}).join(" ")+"</span>"}function FO(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function iG(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(mt(t)?t.join(" "):t,a)}function GO(e,t){var n=e.getData().getItemVisual(t,"style"),r=n[e.visualDrawType];return Jl(r)}function UO(e,t){var n=e.get("padding");return n??(t==="richText"?[8,10]:10)}var h1=(function(){function e(){this.richTextStyles={},this._nextStyleNameId=sI()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,n,r){var i=r==="richText"?this._generateStyleName():null,a=V8({color:n,type:t,renderMode:r,markerId:i});return St(a)?a:(this.richTextStyles[i]=a.style,a.content)},e.prototype.wrapRichTextStyle=function(t,n){var r={};mt(n)?P(n,function(a){return dt(r,a)}):dt(r,n);var i=this._generateStyleName();return this.richTextStyles[i]=r,"{"+i+"|"+t+"}"},e})();function aG(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,l=t.getRawValue(n),s=mt(l),c=GO(t,n),h,d,v,g;if(o>1||s&&!o){var m=oG(l,t,n,a,c);h=m.inlineValues,d=m.inlineValueTypes,v=m.blocks,g=m.inlineValues[0]}else if(o){var x=i.getDimensionInfo(a[0]);g=h=Nu(i,n,a[0]),d=x.type}else g=h=s?l[0]:l;var _=T_(t),b=_&&t.name||"",S=i.getName(n),w=r?b:S;return Ui("section",{header:b,noHeader:r||!_,sortParam:g,blocks:[Ui("nameValue",{markerType:"item",markerColor:c,name:w,noName:!Bi(w),value:h,valueType:d,dataIndex:n})].concat(v||[])})}function oG(e,t,n,r,i){var a=t.getData(),o=Ro(e,function(d,v,g){var m=a.getDimensionInfo(g);return d=d||m&&m.tooltip!==!1&&m.displayName!=null},!1),l=[],s=[],c=[];r.length?P(r,function(d){h(Nu(a,n,d),d)}):P(e,h);function h(d,v){var g=a.getDimensionInfo(v);!g||g.otherDims.tooltip===!1||(o?c.push(Ui("nameValue",{markerType:"subItem",markerColor:i,name:g.displayName,value:d,valueType:g.type})):(l.push(d),s.push(g.type)))}return{inlineValues:l,inlineValueTypes:s,blocks:c}}var ao=be();function Dv(e,t){return e.getName(t)||e.getId(t)}var lG="__universalTransitionEnabled",Ke=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n._selectedDataIndicesMap={},n}return t.prototype.init=function(n,r,i){this.seriesIndex=this.componentIndex,this.dataTask=Yf({count:uG,reset:cG}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(n,i);var a=ao(this).sourceManager=new NO(this);a.prepareSource();var o=this.getInitialData(n,i);_D(o,this),this.dataTask.context.data=o,ao(this).dataBeforeProcessed=o,bD(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(n,r){var i=uh(this),a=i?$u(n):{},o=this.subType;he.hasClass(o)&&(o+="Series"),qt(n,r.getTheme().get(this.subType)),qt(n,this.getDefaultOption()),Rp(n,"label",["show"]),this.fillDataTextStyle(n.data),i&&Oo(n,a,i)},t.prototype.mergeOption=function(n,r){n=qt(this.option,n,!0),this.fillDataTextStyle(n.data);var i=uh(this);i&&Oo(this.option,n,i);var a=ao(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(n,r);_D(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,ao(this).dataBeforeProcessed=o,bD(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(n){if(n&&!ur(n))for(var r=["show"],i=0;i<n.length;i++)n[i]&&n[i].label&&Rp(n[i],"label",r)},t.prototype.getInitialData=function(n,r){},t.prototype.appendData=function(n){var r=this.getRawData();r.appendData(n.data)},t.prototype.getData=function(n){var r=vb(this);if(r){var i=r.context.data;return n==null||!i.getLinkedData?i:i.getLinkedData(n)}else return ao(this).data},t.prototype.getAllData=function(){var n=this.getData();return n&&n.getLinkedDataAll?n.getLinkedDataAll():[{data:n}]},t.prototype.setData=function(n){var r=vb(this);if(r){var i=r.context;i.outputData=n,r!==this.dataTask&&(i.data=n)}ao(this).data=n},t.prototype.getEncode=function(){var n=this.get("encode",!0);if(n)return Bt(n)},t.prototype.getSourceManager=function(){return ao(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return ao(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var n=this.get("colorBy");return n||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var n=this.coordinateSystem;return n&&n.getBaseAxis&&n.getBaseAxis()},t.prototype.indicesOfNearest=function(n,r,i,a){var o=this.getData(),l=this.coordinateSystem,s=l&&l.getAxis(n);if(!l||!s)return[];var c=s.dataToCoord(i);a==null&&(a=1/0);var h=[],d=1/0,v=-1,g=0;return o.each(r,function(m,x){var _=s.dataToCoord(m),b=c-_,S=Math.abs(b);S<=a&&((S<d||S===d&&b>=0&&v<0)&&(d=S,v=b,g=0),b===v&&(h[g++]=x))}),h.length=g,h},t.prototype.formatTooltip=function(n,r,i){return aG({series:this,dataIndex:n,multipleSeries:r})},t.prototype.isAnimationEnabled=function(){var n=this.ecModel;if(Gt.node&&!(n&&n.ssr))return!1;var r=this.getShallow("animation");return r&&this.getData().count()>this.getShallow("animationThreshold")&&(r=!1),!!r},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(n,r,i){var a=this.ecModel,o=tS.prototype.getColorFromPalette.call(this,n,r,i);return o||(o=a.getColorFromPalette(n,r,i)),o},t.prototype.coordDimToDataDim=function(n){return this.getRawData().mapDimensionsAll(n)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(n,r){this._innerSelect(this.getData(r),n)},t.prototype.unselect=function(n,r){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(r);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var l=0;l<n.length;l++){var s=n[l],c=Dv(o,s);i[c]=!1,this._selectedDataIndicesMap[c]=-1}}},t.prototype.toggleSelect=function(n,r){for(var i=[],a=0;a<n.length;a++)i[0]=n[a],this.isSelected(n[a],r)?this.unselect(i,r):this.select(i,r)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var n=this._selectedDataIndicesMap,r=Be(n),i=[],a=0;a<r.length;a++){var o=n[r[a]];o>=0&&i.push(o)}return i},t.prototype.isSelected=function(n,r){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(r);return(i==="all"||i[Dv(a,n)])&&!a.getItemModel(n).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[lG])return!0;var n=this.option.universalTransition;return n?n===!0?!0:n&&n.enabled:!1},t.prototype._innerSelect=function(n,r){var i,a,o=this.option,l=o.selectedMode,s=r.length;if(!(!l||!s)){if(l==="series")o.selectedMap="all";else if(l==="multiple"){Lt(o.selectedMap)||(o.selectedMap={});for(var c=o.selectedMap,h=0;h<s;h++){var d=r[h],v=Dv(n,d);c[v]=!0,this._selectedDataIndicesMap[v]=n.getRawIndex(d)}}else if(l==="single"||l===!0){var g=r[s-1],v=Dv(n,g);o.selectedMap=(i={},i[v]=!0,i),this._selectedDataIndicesMap=(a={},a[v]=n.getRawIndex(g),a)}}},t.prototype._initSelectedMapFromData=function(n){if(!this.option.selectedMap){var r=[];n.hasItemOption&&n.each(function(i){var a=n.getRawDataItem(i);a&&a.selected&&r.push(i)}),r.length>0&&this._innerSelect(n,r)}},t.registerClass=function(n){return he.registerClass(n)},t.protoInitialize=(function(){var n=t.prototype;n.type="series.__base__",n.seriesIndex=0,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",n.visualDrawType="fill"})(),t})(he);Xn(Ke,zF);Xn(Ke,tS);mI(Ke,he);function bD(e){var t=e.name;T_(e)||(e.name=sG(e)||t)}function sG(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return P(n,function(i){var a=t.getDimensionInfo(i);a.displayName&&r.push(a.displayName)}),r.join(" ")}function uG(e){return e.model.getRawData().count()}function cG(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),fG}function fG(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function _D(e,t){P(zR(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,Yt(hG,t))})}function hG(e,t){var n=vb(e);return n&&n.setOutputEnd((t||this).count()),t}function vb(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var zn=(function(){function e(){this.group=new ie,this.uid=Rh("viewComponent")}return e.prototype.init=function(t,n){},e.prototype.render=function(t,n,r,i){},e.prototype.dispose=function(t,n){},e.prototype.updateView=function(t,n,r,i){},e.prototype.updateLayout=function(t,n,r,i){},e.prototype.updateVisual=function(t,n,r,i){},e.prototype.toggleBlurSeries=function(t,n,r){},e.prototype.eachRendered=function(t){var n=this.group;n&&n.traverse(t)},e})();M_(zn);wg(zn);function zh(){var e=be();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,a=!!n.progressiveRender,o=n.large=!!(r&&r.large),l=n.progressiveRender=!!(r&&r.progressiveRender);return(i!==o||a!==l)&&"reset"}}var YO=be(),dG=zh(),Ye=(function(){function e(){this.group=new ie,this.uid=Rh("viewChart"),this.renderTask=Yf({plan:vG,reset:pG}),this.renderTask.context={view:this}}return e.prototype.init=function(t,n){},e.prototype.render=function(t,n,r,i){},e.prototype.highlight=function(t,n,r,i){var a=t.getData(i&&i.dataType);a&&wD(a,i,"emphasis")},e.prototype.downplay=function(t,n,r,i){var a=t.getData(i&&i.dataType);a&&wD(a,i,"normal")},e.prototype.remove=function(t,n){this.group.removeAll()},e.prototype.dispose=function(t,n){},e.prototype.updateView=function(t,n,r,i){this.render(t,n,r,i)},e.prototype.updateLayout=function(t,n,r,i){this.render(t,n,r,i)},e.prototype.updateVisual=function(t,n,r,i){this.render(t,n,r,i)},e.prototype.eachRendered=function(t){Xu(this.group,t)},e.markUpdateMethod=function(t,n){YO(t).updateMethod=n},e.protoInitialize=(function(){var t=e.prototype;t.type="chart"})(),e})();function SD(e,t,n){e&&ah(e)&&(t==="emphasis"?Ql:Kl)(e,n)}function wD(e,t,n){var r=Zl(e,t),i=t&&t.highlightKey!=null?Tj(t.highlightKey):null;r!=null?P(un(r),function(a){SD(e.getItemGraphicEl(a),n,i)}):e.eachItemGraphicEl(function(a){SD(a,n,i)})}M_(Ye);wg(Ye);function vG(e){return dG(e.model)}function pG(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,l=i&&YO(i).updateMethod,s=a?"incrementalPrepareRender":l&&o[l]?l:"render";return s!=="render"&&o[s](t,n,r,i),gG[s]}var gG={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Gp="\0__throttleOriginMethod",TD="\0__throttleRate",CD="\0__throttleType";function oS(e,t,n){var r,i=0,a=0,o=null,l,s,c,h;t=t||0;function d(){a=new Date().getTime(),o=null,e.apply(s,c||[])}var v=function(){for(var g=[],m=0;m<arguments.length;m++)g[m]=arguments[m];r=new Date().getTime(),s=this,c=g;var x=h||t,_=h||n;h=null,l=r-(_?i:a)-x,clearTimeout(o),_?o=setTimeout(d,x):l>=0?d():o=setTimeout(d,-l),i=r};return v.clear=function(){o&&(clearTimeout(o),o=null)},v.debounceNextCall=function(g){h=g},v}function Pg(e,t,n,r){var i=e[t];if(i){var a=i[Gp]||i,o=i[CD],l=i[TD];if(l!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=oS(a,n,r==="debounce"),i[Gp]=a,i[CD]=r,i[TD]=n}return i}}function Up(e,t){var n=e[t];n&&n[Gp]&&(n.clear&&n.clear(),e[t]=n[Gp])}var MD=be(),AD={itemStyle:zu(eO,!0),lineStyle:zu(tO,!0)},mG={lineStyle:"stroke",itemStyle:"fill"};function WO(e,t){var n=e.visualStyleMapper||AD[t];return n||(console.warn("Unknown style type '"+t+"'."),AD.itemStyle)}function qO(e,t){var n=e.visualDrawType||mG[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var yG={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=e.getModel(r),a=WO(e,r),o=a(i),l=i.getShallow("decal");l&&(n.setVisual("decal",l),l.dirty=!0);var s=qO(e,r),c=o[s],h=Rt(c)?c:null,d=o.fill==="auto"||o.stroke==="auto";if(!o[s]||h||d){var v=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[s]||(o[s]=v,n.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Rt(o.fill)?v:o.fill,o.stroke=o.stroke==="auto"||Rt(o.stroke)?v:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&h)return n.setVisual("colorFromPalette",!1),{dataEach:function(g,m){var x=e.getDataParams(m),_=dt({},o);_[s]=h(x),g.setItemVisual(m,"style",_)}}}},ef=new Te,xG={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=WO(e,r),a=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(o,l){var s=o.getRawDataItem(l);if(s&&s[r]){ef.option=s[r];var c=i(ef),h=o.ensureUniqueItemVisual(l,"style");dt(h,c),ef.option.decal&&(o.setItemVisual(l,"decal",ef.option.decal),ef.option.decal.dirty=!0),a in c&&o.setItemVisual(l,"colorFromPalette",!1)}}:null}}}},bG={performRawSeries:!0,overallReset:function(e){var t=Bt();e.eachSeries(function(n){var r=n.getColorBy();if(!n.isColorBySeries()){var i=n.type+"-"+r,a=t.get(i);a||(a={},t.set(i,a)),MD(n).scope=a}}),e.eachSeries(function(n){if(!(n.isColorBySeries()||e.isSeriesFiltered(n))){var r=n.getRawData(),i={},a=n.getData(),o=MD(n).scope,l=n.visualStyleAccessPath||"itemStyle",s=qO(n,l);a.each(function(c){var h=a.getRawIndex(c);i[h]=c}),r.each(function(c){var h=i[c],d=a.getItemVisual(h,"colorFromPalette");if(d){var v=a.ensureUniqueItemVisual(h,"style"),g=r.getName(c)||c+"",m=r.count();v[s]=n.getColorFromPalette(g,o,m)}})}})}},kv=Math.PI;function _G(e,t){t=t||{},$t(t,{text:"loading",textColor:lt.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:lt.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new ie,r=new le({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new me({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 le({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new Lg({shape:{startAngle:-kv/2,endAngle:-kv/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:kv*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:kv*3/2}).delay(300).start("circularInOut"),n.add(o)),n.resize=function(){var l=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&l?10:0)-l)/2-(t.showSpinner&&l?0:5+l/2)+(t.showSpinner?0:l/2)+(l?0:s),h=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:h}),a.setShape({x:c-s,y:h-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var XO=(function(){function e(t,n,r,i){this._stageTaskMap=Bt(),this.ecInstance=t,this.api=n,r=this._dataProcessorHandlers=r.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=r.concat(i)}return e.prototype.restoreData=function(t,n){t.restoreData(n),this._stageTaskMap.each(function(r){var i=r.overallTask;i&&i.dirty()})},e.prototype.getPerformArgs=function(t,n){if(t.__pipeline){var r=this._pipelineMap.get(t.__pipeline.id),i=r.context,a=!n&&r.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>r.blockIndex,o=a?r.step:null,l=i&&i.modDataCount,s=l!=null?Math.ceil(l/o):null;return{step:o,modBy:s,modDataCount:l}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,n){var r=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=r.progressiveEnabled&&n.incrementalPrepareRender&&a>=r.threshold,l=t.get("large")&&a>=t.get("largeThreshold"),s=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=r.context={progressiveRender:o,modDataCount:s,large:l}},e.prototype.restorePipelines=function(t){var n=this,r=n._pipelineMap=Bt();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;r.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}),n._pipe(i,i.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,n=this.api.getModel(),r=this.api;P(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";$r(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,n,r),i.overallReset&&this._createOverallStageTask(i,a,n,r)},this)},e.prototype.prepareView=function(t,n,r,i){var a=t.renderTask,o=a.context;o.model=n,o.ecModel=r,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(n,a)},e.prototype.performDataProcessorTasks=function(t,n){this._performStageTasks(this._dataProcessorHandlers,t,n,{block:!0})},e.prototype.performVisualTasks=function(t,n,r){this._performStageTasks(this._visualHandlers,t,n,r)},e.prototype._performStageTasks=function(t,n,r,i){i=i||{};var a=!1,o=this;P(t,function(s,c){if(!(i.visualType&&i.visualType!==s.visualType)){var h=o._stageTaskMap.get(s.uid),d=h.seriesTaskMap,v=h.overallTask;if(v){var g,m=v.agentStubMap;m.each(function(_){l(i,_)&&(_.dirty(),g=!0)}),g&&v.dirty(),o.updatePayload(v,r);var x=o.getPerformArgs(v,i.block);m.each(function(_){_.perform(x)}),v.perform(x)&&(a=!0)}else d&&d.each(function(_,b){l(i,_)&&_.dirty();var S=o.getPerformArgs(_,i.block);S.skip=!s.performRawSeries&&n.isSeriesFiltered(_.context.model),o.updatePayload(_,r),_.perform(S)&&(a=!0)})}});function l(s,c){return s.setDirty&&(!s.dirtyMap||s.dirtyMap.get(c.__pipeline.id))}this.unfinished=a||this.unfinished},e.prototype.performSeriesTasks=function(t){var n;t.eachSeries(function(r){n=r.dataTask.perform()||n}),this.unfinished=n||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(t){var n=t.tail;do{if(n.__block){t.blockIndex=n.__idxInPipeline;break}n=n.getUpstream()}while(n)})},e.prototype.updatePayload=function(t,n){n!=="remain"&&(t.context.payload=n)},e.prototype._createSeriesStageTask=function(t,n,r,i){var a=this,o=n.seriesTaskMap,l=n.seriesTaskMap=Bt(),s=t.seriesType,c=t.getTargetSeries;t.createOnAllSeries?r.eachRawSeries(h):s?r.eachRawSeriesByType(s,h):c&&c(r,i).each(h);function h(d){var v=d.uid,g=l.set(v,o&&o.get(v)||Yf({plan:MG,reset:AG,count:kG}));g.context={model:d,ecModel:r,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(d,g)}},e.prototype._createOverallStageTask=function(t,n,r,i){var a=this,o=n.overallTask=n.overallTask||Yf({reset:SG});o.context={ecModel:r,api:i,overallReset:t.overallReset,scheduler:a};var l=o.agentStubMap,s=o.agentStubMap=Bt(),c=t.seriesType,h=t.getTargetSeries,d=!0,v=!1,g="";$r(!t.createOnAllSeries,g),c?r.eachRawSeriesByType(c,m):h?h(r,i).each(m):(d=!1,P(r.getSeries(),m));function m(x){var _=x.uid,b=s.set(_,l&&l.get(_)||(v=!0,Yf({reset:wG,onDirty:CG})));b.context={model:x,overallProgress:d},b.agent=o,b.__block=d,a._pipe(x,b)}v&&o.dirty()},e.prototype._pipe=function(t,n){var r=t.uid,i=this._pipelineMap.get(r);!i.head&&(i.head=n),i.tail&&i.tail.pipe(n),i.tail=n,n.__idxInPipeline=i.count++,n.__pipeline=i},e.wrapStageHandler=function(t,n){return Rt(t)&&(t={overallReset:t,seriesType:LG(t)}),t.uid=Rh("stageHandler"),n&&(t.visualType=n),t},e})();function SG(e){e.overallReset(e.ecModel,e.api,e.payload)}function wG(e){return e.overallProgress&&TG}function TG(){this.agent.dirty(),this.getDownstream().dirty()}function CG(){this.agent&&this.agent.dirty()}function MG(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function AG(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=un(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?bt(t,function(n,r){return ZO(r)}):DG}var DG=ZO(0);function ZO(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(r,a);else i&&i.progress&&i.progress(t,r)}}function kG(e){return e.data.count()}function LG(e){Yp=null;try{e(fh,$O)}catch{}return Yp}var fh={},$O={},Yp;QO(fh,eS);QO($O,CO);fh.eachSeriesByType=fh.eachRawSeriesByType=function(e){Yp=e};fh.eachComponent=function(e){e.mainType==="series"&&e.subType&&(Yp=e.subType)};function QO(e,t){for(var n in t.prototype)e[n]=Cn}var Tt=lt.darkColor,EG=Tt.background,nf=function(){return{axisLine:{lineStyle:{color:Tt.axisLine}},splitLine:{lineStyle:{color:Tt.axisSplitLine}},splitArea:{areaStyle:{color:[Tt.backgroundTint,Tt.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:Tt.axisMinorSplitLine}},axisLabel:{color:Tt.axisLabel},axisName:{}}},DD={label:{color:Tt.secondary},itemStyle:{borderColor:Tt.borderTint},dividerLineStyle:{color:Tt.border}},KO={darkMode:!0,color:Tt.theme,backgroundColor:EG,axisPointer:{lineStyle:{color:Tt.border},crossStyle:{color:Tt.borderShade},label:{color:Tt.tertiary}},legend:{textStyle:{color:Tt.secondary},pageTextStyle:{color:Tt.tertiary}},textStyle:{color:Tt.secondary},title:{textStyle:{color:Tt.primary},subtextStyle:{color:Tt.quaternary}},toolbox:{iconStyle:{borderColor:Tt.accent50}},tooltip:{backgroundColor:Tt.neutral20,defaultBorderColor:Tt.border,textStyle:{color:Tt.tertiary}},dataZoom:{borderColor:Tt.accent10,textStyle:{color:Tt.tertiary},brushStyle:{color:Tt.backgroundTint},handleStyle:{color:Tt.neutral00,borderColor:Tt.accent20},moveHandleStyle:{color:Tt.accent40},emphasis:{handleStyle:{borderColor:Tt.accent50}},dataBackground:{lineStyle:{color:Tt.accent30},areaStyle:{color:Tt.accent20}},selectedDataBackground:{lineStyle:{color:Tt.accent50},areaStyle:{color:Tt.accent30}}},visualMap:{textStyle:{color:Tt.secondary},handleStyle:{borderColor:Tt.neutral30}},timeline:{lineStyle:{color:Tt.accent10},label:{color:Tt.tertiary},controlStyle:{color:Tt.accent30,borderColor:Tt.accent30}},calendar:{itemStyle:{color:Tt.neutral00,borderColor:Tt.neutral20},dayLabel:{color:Tt.tertiary},monthLabel:{color:Tt.secondary},yearLabel:{color:Tt.secondary}},matrix:{x:DD,y:DD,backgroundColor:{borderColor:Tt.axisLine},body:{itemStyle:{borderColor:Tt.borderTint}}},timeAxis:nf(),logAxis:nf(),valueAxis:nf(),categoryAxis:nf(),line:{symbol:"circle"},graph:{color:Tt.theme},gauge:{title:{color:Tt.secondary},axisLine:{lineStyle:{color:[[1,Tt.neutral05]]}},axisLabel:{color:Tt.axisLabel},detail:{color:Tt.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:Tt.background}},radar:(function(){var e=nf();return e.axisName={color:Tt.axisLabel},e.axisLine.lineStyle.color=Tt.neutral20,e})(),treemap:{breadcrumb:{itemStyle:{color:Tt.neutral20,textStyle:{color:Tt.secondary}},emphasis:{itemStyle:{color:Tt.neutral30}}}},sunburst:{itemStyle:{borderColor:Tt.background}},map:{itemStyle:{borderColor:Tt.border,areaColor:Tt.neutral10},label:{color:Tt.tertiary},emphasis:{label:{color:Tt.primary},itemStyle:{areaColor:Tt.highlight}},select:{label:{color:Tt.primary},itemStyle:{areaColor:Tt.highlight}}},geo:{itemStyle:{borderColor:Tt.border,areaColor:Tt.neutral10},emphasis:{label:{color:Tt.primary},itemStyle:{areaColor:Tt.highlight}},select:{label:{color:Tt.primary},itemStyle:{color:Tt.highlight}}}};KO.categoryAxis.splitLine.show=!1;var RG=(function(){function e(){}return e.prototype.normalizeQuery=function(t){var n={},r={},i={};if(St(t)){var a=Pi(t);n.mainType=a.main||null,n.subType=a.sub||null}else{var o=["Index","Name","Id"],l={name:1,dataIndex:1,dataType:1};P(t,function(s,c){for(var h=!1,d=0;d<o.length;d++){var v=o[d],g=c.lastIndexOf(v);if(g>0&&g===c.length-v.length){var m=c.slice(0,g);m!=="data"&&(n.mainType=m,n[v.toLowerCase()]=s,h=!0)}}l.hasOwnProperty(c)&&(r[c]=s,h=!0),h||(i[c]=s)})}return{cptQuery:n,dataQuery:r,otherQuery:i}},e.prototype.filter=function(t,n){var r=this.eventInfo;if(!r)return!0;var i=r.targetEl,a=r.packedEvent,o=r.model,l=r.view;if(!o||!l)return!0;var s=n.cptQuery,c=n.dataQuery;return h(s,o,"mainType")&&h(s,o,"subType")&&h(s,o,"index","componentIndex")&&h(s,o,"name")&&h(s,o,"id")&&h(c,a,"name")&&h(c,a,"dataIndex")&&h(c,a,"dataType")&&(!l.filterForExposedEvent||l.filterForExposedEvent(t,n.otherQuery,i,a));function h(d,v,g,m){return d[g]==null||v[m||g]===d[g]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e})(),pb=["symbol","symbolSize","symbolRotate","symbolOffset"],kD=pb.concat(["symbolKeepAspect"]),IG={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o<pb.length;o++){var l=pb[o],s=e.get(l);Rt(s)?(a=!0,i[l]=s):r[l]=s}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(dt({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},r)),t.isSeriesFiltered(e))return;var c=Be(i);function h(d,v){for(var g=e.getRawValue(v),m=e.getDataParams(v),x=0;x<c.length;x++){var _=c[x];d.setItemVisual(v,_,i[_](g,m))}}return{dataEach:a?h:null}}},OG={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var n=e.getData();function r(i,a){for(var o=i.getItemModel(a),l=0;l<kD.length;l++){var s=kD[l],c=o.getShallow(s,!0);c!=null&&i.setItemVisual(a,s,c)}}return{dataEach:n.hasItemOption?r:null}}};function JO(e,t,n){switch(n){case"color":var r=e.getItemVisual(t,"style");return r[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n)}}function tz(e,t){switch(t){case"color":var n=e.getVisual("style");return n[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t)}}function zG(e,t,n,r){switch(n){case"color":var i=e.ensureUniqueItemVisual(t,"style");i[e.getVisual("drawType")]=r,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=r;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,n,r);break}}function BG(e,t){function n(r,i){var a=[];return r.eachComponent({mainType:"series",subType:e,query:i},function(o){a.push(o.seriesIndex)}),a}P([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],function(r){t(r[0],function(i,a,o){i=dt({},i),o.dispatchAction(dt(i,{type:r[1],seriesIndex:n(a,i)}))})})}function ru(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:"series",subType:"pie"},function(o){for(var l=o.seriesIndex,s=o.option.selectedMap,c=i.selected,h=0;h<c.length;h++)if(c[h].seriesIndex===l){var d=o.getData(),v=Zl(d,i.fromActionPayload);n.trigger(a,{type:a,seriesId:o.id,name:mt(v)?d.getName(v[0]):d.getName(v),selected:St(s)?s:dt({},s)})}})}function NG(e,t,n){e.on("selectchanged",function(r){var i=n.getModel();r.isFromClick?(ru("map","selectchanged",t,i,r),ru("pie","selectchanged",t,i,r)):r.fromAction==="select"?(ru("map","selected",t,i,r),ru("pie","selected",t,i,r)):r.fromAction==="unselect"&&(ru("map","unselected",t,i,r),ru("pie","unselected",t,i,r))})}function Mu(e,t,n){for(var r;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}var PG=Math.round(Math.random()*9),HG=typeof Object.defineProperty=="function",VG=(function(){function e(){this._id="__ec_inner_"+PG++}return e.prototype.get=function(t){return this._guard(t)[this._id]},e.prototype.set=function(t,n){var r=this._guard(t);return HG?Object.defineProperty(r,this._id,{value:n,enumerable:!1,configurable:!0}):r[this._id]=n,this},e.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},e.prototype.has=function(t){return!!this._guard(t)[this._id]},e.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},e})(),jG=ce.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),FG=ce.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),GG=ce.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,l=o*o/(a-o),s=r-a+o+l,c=Math.asin(l/o),h=Math.cos(c)*o,d=Math.sin(c),v=Math.cos(c),g=o*.6,m=o*.7;e.moveTo(n-h,s+l),e.arc(n,s,o,Math.PI-c,Math.PI*2+c),e.bezierCurveTo(n+h-d*g,s+l+v*g,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-h+d*g,s+l+v*g,n-h,s+l),e.closePath()}}),UG=ce.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),YG={line:Gi,rect:le,roundRect:le,square:le,circle:kh,diamond:FG,pin:GG,arrow:UG,triangle:jG},WG={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},Wp={};P(YG,function(e,t){Wp[t]=new e});var qG=ce.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=Lp(e,t,n),i=this.shape;return i&&i.symbolType==="pin"&&t.position==="inside"&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!=="none"){var i=Wp[r];i||(r="rect",i=Wp[r]),WG[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function XG(e,t){if(this.type!=="image"){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||lt.color.neutral00,n.lineWidth=2):this.shape.symbolType==="line"?n.stroke=e:n.fill=e,this.markRedraw()}}function Wn(e,t,n,r,i,a,o){var l=e.indexOf("empty")===0;l&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var s;return e.indexOf("image://")===0?s=GI(e.slice(8),new Vt(t,n,r,i),o?"center":"cover"):e.indexOf("path://")===0?s=N_(e.slice(7),{},new Vt(t,n,r,i),o?"center":"cover"):s=new qG({shape:{symbolType:e,x:t,y:n,width:r,height:i}}),s.__isEmptyBrush=l,s.setColor=XG,a&&s.setColor(a),s}function ez(e){return mt(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function nz(e,t){if(e!=null)return mt(e)||(e=[e,e]),[At(e[0],t[0])||0,At(zt(e[1],e[0]),t[1])||0]}function Pl(e){return isFinite(e)}function ZG(e,t,n){var r=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||(r=r*n.width+n.x,i=i*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),r=Pl(r)?r:0,i=Pl(i)?i:1,a=Pl(a)?a:0,o=Pl(o)?o:0;var l=e.createLinearGradient(r,a,i,o);return l}function $G(e,t,n){var r=n.width,i=n.height,a=Math.min(r,i),o=t.x==null?.5:t.x,l=t.y==null?.5:t.y,s=t.r==null?.5:t.r;t.global||(o=o*r+n.x,l=l*i+n.y,s=s*a),o=Pl(o)?o:.5,l=Pl(l)?l:.5,s=s>=0&&Pl(s)?s:.5;var c=e.createRadialGradient(o,l,0,o,l,s);return c}function gb(e,t,n){for(var r=t.type==="radial"?$G(e,t,n):ZG(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}function QG(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function Lv(e){return parseInt(e,10)}function Ev(e,t,n){var r=["width","height"][t],i=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(n[r]!=null&&n[r]!=="auto")return parseFloat(n[r]);var l=document.defaultView.getComputedStyle(e);return(e[i]||Lv(l[r])||Lv(e.style[r]))-(Lv(l[a])||0)-(Lv(l[o])||0)|0}function KG(e,t){return!e||e==="solid"||!(t>0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:ve(e)?[e]:mt(e)?e:null}function rz(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&KG(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=bt(n,function(a){return a/i}),r/=i)}return[n,r]}var JG=new $l(!0);function qp(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function LD(e){return typeof e=="string"&&e!=="none"}function Xp(e){var t=e.fill;return t!=null&&t!=="none"}function ED(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function RD(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function mb(e,t,n){var r=yI(t.image,t.__image,n);if(Tg(r)){var i=e.createPattern(r,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)*xH),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function tU(e,t,n,r){var i,a=qp(n),o=Xp(n),l=n.strokePercent,s=l<1,c=!t.path;(!t.silent||s)&&c&&t.createPathProxy();var h=t.path||JG,d=t.__dirty;if(!r){var v=n.fill,g=n.stroke,m=o&&!!v.colorStops,x=a&&!!g.colorStops,_=o&&!!v.image,b=a&&!!g.image,S=void 0,w=void 0,A=void 0,D=void 0,M=void 0;(m||x)&&(M=t.getBoundingRect()),m&&(S=d?gb(e,v,M):t.__canvasFillGradient,t.__canvasFillGradient=S),x&&(w=d?gb(e,g,M):t.__canvasStrokeGradient,t.__canvasStrokeGradient=w),_&&(A=d||!t.__canvasFillPattern?mb(e,v,t):t.__canvasFillPattern,t.__canvasFillPattern=A),b&&(D=d||!t.__canvasStrokePattern?mb(e,g,t):t.__canvasStrokePattern,t.__canvasStrokePattern=D),m?e.fillStyle=S:_&&(A?e.fillStyle=A:o=!1),x?e.strokeStyle=w:b&&(D?e.strokeStyle=D:a=!1)}var L=t.getGlobalScale();h.setScale(L[0],L[1],t.segmentIgnoreThreshold);var I,N;e.setLineDash&&n.lineDash&&(i=rz(t),I=i[0],N=i[1]);var E=!0;(c||d&mu)&&(h.setDPR(e.dpr),s?h.setContext(null):(h.setContext(e),E=!1),h.reset(),t.buildPath(h,t.shape,r),h.toStatic(),t.pathUpdated()),E&&h.rebuildPath(e,s?l:1),I&&(e.setLineDash(I),e.lineDashOffset=N),r||(n.strokeFirst?(a&&RD(e,n),o&&ED(e,n)):(o&&ED(e,n),a&&RD(e,n))),I&&e.setLineDash([])}function eU(e,t,n){var r=t.__image=yI(n.image,t.__image,t,t.onload);if(!(!r||!Tg(r))){var i=n.x||0,a=n.y||0,o=t.getWidth(),l=t.getHeight(),s=r.width/r.height;if(o==null&&l!=null?o=l*s:l==null&&o!=null?l=o/s:o==null&&l==null&&(o=r.width,l=r.height),n.sWidth&&n.sHeight){var c=n.sx||0,h=n.sy||0;e.drawImage(r,c,h,n.sWidth,n.sHeight,i,a,o,l)}else if(n.sx&&n.sy){var c=n.sx,h=n.sy,d=o-c,v=l-h;e.drawImage(r,c,h,d,v,i,a,o,l)}else e.drawImage(r,i,a,o,l)}}function nU(e,t,n){var r,i=n.text;if(i!=null&&(i+=""),i){e.font=n.font||Eo,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=rz(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(qp(n)&&e.strokeText(i,n.x,n.y),Xp(n)&&e.fillText(i,n.x,n.y)):(Xp(n)&&e.fillText(i,n.x,n.y),qp(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var ID=["shadowBlur","shadowOffsetX","shadowOffsetY"],OD=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function iz(e,t,n,r,i){var a=!1;if(!r&&(n=n||{},t===n))return!1;if(r||t.opacity!==n.opacity){lr(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Gl.opacity:o}(r||t.blend!==n.blend)&&(a||(lr(e,i),a=!0),e.globalCompositeOperation=t.blend||Gl.blend);for(var l=0;l<ID.length;l++){var s=ID[l];(r||t[s]!==n[s])&&(a||(lr(e,i),a=!0),e[s]=e.dpr*(t[s]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||(lr(e,i),a=!0),e.shadowColor=t.shadowColor||Gl.shadowColor),a}function zD(e,t,n,r,i){var a=hh(t,i.inHover),o=r?null:n&&hh(n,i.inHover)||{};if(a===o)return!1;var l=iz(e,a,o,r,i);if((r||a.fill!==o.fill)&&(l||(lr(e,i),l=!0),LD(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(l||(lr(e,i),l=!0),LD(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(l||(lr(e,i),l=!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var s=a.lineWidth,c=s/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==c&&(l||(lr(e,i),l=!0),e.lineWidth=c)}for(var h=0;h<OD.length;h++){var d=OD[h],v=d[0];(r||a[v]!==o[v])&&(l||(lr(e,i),l=!0),e[v]=a[v]||d[1])}return l}function rU(e,t,n,r,i){return iz(e,hh(t,i.inHover),n&&hh(n,i.inHover),r,i)}function az(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function iU(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];r=r||a.isZeroArea(),az(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}n.allClipped=r}function aU(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var BD=1,ND=2,PD=3,HD=4;function oU(e){var t=Xp(e),n=qp(e);return!(e.lineDash||!(+t^+n)||t&&typeof e.fill!="string"||n&&typeof e.stroke!="string"||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function lr(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function hh(e,t){return t&&e.__hoverStyle||e.style}function oz(e,t){Hl(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Hl(e,t,n,r){var i=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){t.__dirty&=~Sr,t.__isRendered=!1;return}var a=t.__clipPaths,o=n.prevElClipPaths,l=!1,s=!1;if((!o||QG(a,o))&&(o&&o.length&&(lr(e,n),e.restore(),s=l=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),a&&a.length&&(lr(e,n),e.save(),iU(a,e,n),l=!0),n.prevElClipPaths=a),n.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var c=n.prevEl;c||(s=l=!0);var h=t instanceof ce&&t.autoBatch&&oU(t.style);l||aU(i,c.transform)?(lr(e,n),az(e,t)):h||lr(e,n);var d=hh(t,n.inHover);t instanceof ce?(n.lastDrawType!==BD&&(s=!0,n.lastDrawType=BD),zD(e,t,c,s,n),(!h||!n.batchFill&&!n.batchStroke)&&e.beginPath(),tU(e,t,d,h),h&&(n.batchFill=d.fill||"",n.batchStroke=d.stroke||"")):t instanceof Ip?(n.lastDrawType!==PD&&(s=!0,n.lastDrawType=PD),zD(e,t,c,s,n),nU(e,t,d)):t instanceof Jr?(n.lastDrawType!==ND&&(s=!0,n.lastDrawType=ND),rU(e,t,c,s,n),eU(e,t,d)):t.getTemporalDisplayables&&(n.lastDrawType!==HD&&(s=!0,n.lastDrawType=HD),lU(e,t,n)),h&&r&&lr(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}function lU(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover},o,l;for(o=t.getCursor(),l=r.length;o<l;o++){var s=r[o];s.beforeBrush&&s.beforeBrush(),s.innerBeforeBrush(),Hl(e,s,a,o===l-1),s.innerAfterBrush(),s.afterBrush&&s.afterBrush(),a.prevEl=s}for(var c=0,h=i.length;c<h;c++){var s=i[c];s.beforeBrush&&s.beforeBrush(),s.innerBeforeBrush(),Hl(e,s,a,c===h-1),s.innerAfterBrush(),s.afterBrush&&s.afterBrush(),a.prevEl=s}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var d1=new VG,VD=new Iu(100),jD=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function Zp(e,t){if(e==="none")return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i=r.painter.type==="svg";e.dirty&&d1.delete(e);var a=d1.get(e);if(a)return a;var o=$t(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var l={repeat:"repeat"};return s(l),l.rotation=o.rotation,l.scaleX=l.scaleY=i?1:1/n,d1.set(e,l),e.dirty=!1,l;function s(c){for(var h=[n],d=!0,v=0;v<jD.length;++v){var g=o[jD[v]];if(g!=null&&!mt(g)&&!St(g)&&!ve(g)&&typeof g!="boolean"){d=!1;break}h.push(g)}var m;if(d){m=h.join(",")+(i?"-svg":"");var x=VD.get(m);x&&(i?c.svgElement=x:c.image=x)}var _=sz(o.dashArrayX),b=sU(o.dashArrayY),S=lz(o.symbol),w=uU(_),A=uz(b),D=!i&&mi.createCanvas(),M=i&&{tag:"g",attrs:{},key:"dcl",children:[]},L=N(),I;D&&(D.width=L.width*n,D.height=L.height*n,I=D.getContext("2d")),E(),d&&VD.put(m,D||M),c.image=D,c.svgElement=M,c.svgWidth=L.width,c.svgHeight=L.height;function N(){for(var O=1,j=0,B=w.length;j<B;++j)O=eA(O,w[j]);for(var U=1,j=0,B=S.length;j<B;++j)U=eA(U,S[j].length);O*=U;var W=A*w.length*S.length;return{width:Math.max(1,Math.min(O,o.maxTileWidth)),height:Math.max(1,Math.min(W,o.maxTileHeight))}}function E(){I&&(I.clearRect(0,0,D.width,D.height),o.backgroundColor&&(I.fillStyle=o.backgroundColor,I.fillRect(0,0,D.width,D.height)));for(var O=0,j=0;j<b.length;++j)O+=b[j];if(O<=0)return;for(var B=-A,U=0,W=0,H=0;B<L.height;){if(U%2===0){for(var q=W/2%S.length,X=0,J=0,F=0;X<L.width*2;){for(var Y=0,j=0;j<_[H].length;++j)Y+=_[H][j];if(Y<=0)break;if(J%2===0){var Z=(1-o.symbolSize)*.5,V=X+_[H][J]*Z,tt=B+b[U]*Z,ut=_[H][J]*o.symbolSize,gt=b[U]*o.symbolSize,wt=F/2%S[q].length;pt(V,tt,ut,gt,S[q][wt])}X+=_[H][J],++F,++J,J===_[H].length&&(J=0)}++H,H===_.length&&(H=0)}B+=b[U],++W,++U,U===b.length&&(U=0)}function pt(vt,Dt,yt,Mt,_e){var Jt=i?1:n,fe=Wn(_e,vt*Jt,Dt*Jt,yt*Jt,Mt*Jt,o.color,o.symbolKeepAspect);if(i){var Ae=r.painter.renderOneToVNode(fe);Ae&&M.children.push(Ae)}else oz(I,fe)}}}}function lz(e){if(!e||e.length===0)return[["rect"]];if(St(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!St(e[n])){t=!1;break}if(t)return lz([e]);for(var r=[],n=0;n<e.length;++n)St(e[n])?r.push([e[n]]):r.push(e[n]);return r}function sz(e){if(!e||e.length===0)return[[0,0]];if(ve(e)){var t=Math.ceil(e);return[[t,t]]}for(var n=!0,r=0;r<e.length;++r)if(!ve(e[r])){n=!1;break}if(n)return sz([e]);for(var i=[],r=0;r<e.length;++r)if(ve(e[r])){var t=Math.ceil(e[r]);i.push([t,t])}else{var t=bt(e[r],function(l){return Math.ceil(l)});t.length%2===1?i.push(t.concat(t)):i.push(t)}return i}function sU(e){if(!e||typeof e=="object"&&e.length===0)return[0,0];if(ve(e)){var t=Math.ceil(e);return[t,t]}var n=bt(e,function(r){return Math.ceil(r)});return e.length%2?n.concat(n):n}function uU(e){return bt(e,function(t){return uz(t)})}function uz(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2===1?t*2:t}function cU(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each(function(o){var l=r.getItemVisual(o,"decal");if(l){var s=r.ensureUniqueItemVisual(o,"style");s.decal=Zp(l,t)}});var i=r.getVisual("decal");if(i){var a=r.getVisual("style");a.decal=Zp(i,t)}}})}var ci=new Kr,cz={};function fU(e,t){cz[e]=t}function hU(e){return cz[e]}var dU=1,vU=800,pU=900,gU=1e3,mU=2e3,yU=5e3,fz=1e3,xU=1100,lS=2e3,hz=3e3,bU=4e3,Hg=4500,_U=4600,SU=5e3,wU=6e3,dz=7e3,TU={PROCESSOR:{FILTER:gU,SERIES_FILTER:vU,STATISTIC:yU},VISUAL:{LAYOUT:fz,PROGRESSIVE_LAYOUT:xU,GLOBAL:lS,CHART:hz,POST_CHART_LAYOUT:_U,COMPONENT:bU,BRUSH:SU,CHART_ITEM:Hg,ARIA:wU,DECAL:dz}},an="__flagInMainProcess",Rv="__mainProcessVersion",hn="__pendingUpdate",v1="__needsUpdateStatus",FD=/^[a-zA-Z0-9_]+$/,p1="__connectUpdateStatus",GD=0,CU=1,MU=2;function vz(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this.isDisposed()){this.id;return}return gz(this,e,t)}}function pz(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return gz(this,e,t)}}function gz(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),Kr.prototype[t].apply(e,n)}var mz=(function(e){ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(Kr),yz=mz.prototype;yz.on=pz("on");yz.off=pz("off");var Al,g1,Iv,ma,Ov,m1,y1,iu,au,UD,YD,x1,WD,zv,qD,xz,Pr,XD,ou,bz=(function(e){ot(t,e);function t(n,r,i){var a=e.call(this,new RG)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},a._dom=n;var o="canvas",l="auto",s=!1;a[Rv]=1,i.ssr;var c=a._zr=QM(n,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:zt(i.useDirtyRect,s),useCoarsePointer:zt(i.useCoarsePointer,l),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=oS(Ct(c.flush,c),17),a._updateTheme(r),a._locale=A8(i.locale||nO),a._coordSysMgr=new Oh;var h=a._api=qD(a);function d(v,g){return v.__prio-g.__prio}return rp(Qp,d),rp(bb,d),a._scheduler=new XO(a,h,bb,Qp),a._messageCenter=new mz,a._initEvents(),a.resize=Ct(a.resize,a),c.animation.on("frame",a._onframe,a),UD(c,a),YD(c,a),_p(a),a}return t.prototype._onframe=function(){if(!this._disposed){XD(this);var n=this._scheduler;if(this[hn]){var r=this[hn].silent;this[an]=!0,ou(this);try{Al(this),ma.update.call(this,null,this[hn].updateParams)}catch(s){throw this[an]=!1,this[hn]=null,s}this._zr.flush(),this[an]=!1,this[hn]=null,iu.call(this,r),au.call(this,r)}else if(n.unfinished){var i=dU,a=this._model,o=this._api;n.unfinished=!1;do{var l=+new Date;n.performSeriesTasks(a),n.performDataProcessorTasks(a),m1(this,a),n.performVisualTasks(a),zv(this,this._model,o,"remain",{}),i-=+new Date-l}while(i>0&&n.unfinished);n.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(n,r,i){if(!this[an]){if(this._disposed){this.id;return}var a,o,l;if(Lt(r)&&(i=r.lazyUpdate,a=r.silent,o=r.replaceMerge,l=r.transition,r=r.notMerge),this[an]=!0,ou(this),!this._model||r){var s=new vF(this._api),c=this._theme,h=this._model=new eS;h.scheduler=this._scheduler,h.ssr=this._ssr,h.init(null,null,null,c,this._locale,s)}this._model.setOption(n,{replaceMerge:o},_b);var d={seriesTransition:l,optionChanged:!0};if(i)this[hn]={silent:a,updateParams:d},this[an]=!1,this.getZr().wakeUp();else{try{Al(this),ma.update.call(this,null,d)}catch(v){throw this[hn]=null,this[an]=!1,v}this._ssr||this._zr.flush(),this[hn]=null,this[an]=!1,iu.call(this,a),au.call(this,a)}}},t.prototype.setTheme=function(n,r){if(!this[an]){if(this._disposed){this.id;return}var i=this._model;if(i){var a=r&&r.silent,o=null;this[hn]&&(a==null&&(a=this[hn].silent),o=this[hn].updateParams,this[hn]=null),this[an]=!0,ou(this);try{this._updateTheme(n),i.setTheme(this._theme),Al(this),ma.update.call(this,{type:"setTheme"},o)}catch(l){throw this[an]=!1,l}this[an]=!1,iu.call(this,a),au.call(this,a)}}},t.prototype._updateTheme=function(n){St(n)&&(n=_z[n]),n&&(n=It(n),n&&AO(n,!0),this._theme=n)},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||Gt.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(n){return this.renderToCanvas(n)},t.prototype.renderToCanvas=function(n){n=n||{};var r=this._zr.painter;return r.getRenderedCanvas({backgroundColor:n.backgroundColor||this._model.get("backgroundColor"),pixelRatio:n.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(n){n=n||{};var r=this._zr.painter;return r.renderToString({useViewBox:n.useViewBox})},t.prototype.getSvgDataURL=function(){var n=this._zr,r=n.storage.getDisplayList();return P(r,function(i){i.stopAnimation(null,!0)}),n.painter.toDataURL()},t.prototype.getDataURL=function(n){if(this._disposed){this.id;return}n=n||{};var r=n.excludeComponents,i=this._model,a=[],o=this;P(r,function(s){i.eachComponent({mainType:s},function(c){var h=o._componentsMap[c.__viewId];h.group.ignore||(a.push(h),h.group.ignore=!0)})});var l=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(n).toDataURL("image/"+(n&&n.type||"png"));return P(a,function(s){s.group.ignore=!1}),l},t.prototype.getConnectedDataURL=function(n){if(this._disposed){this.id;return}var r=n.type==="svg",i=this.group,a=Math.min,o=Math.max,l=1/0;if(ZD[i]){var s=l,c=l,h=-l,d=-l,v=[],g=n&&n.pixelRatio||this.getDevicePixelRatio();P(Wf,function(w,A){if(w.group===i){var D=r?w.getZr().painter.getSvgDom().innerHTML:w.renderToCanvas(It(n)),M=w.getDom().getBoundingClientRect();s=a(M.left,s),c=a(M.top,c),h=o(M.right,h),d=o(M.bottom,d),v.push({dom:D,left:M.left,top:M.top})}}),s*=g,c*=g,h*=g,d*=g;var m=h-s,x=d-c,_=mi.createCanvas(),b=QM(_,{renderer:r?"svg":"canvas"});if(b.resize({width:m,height:x}),r){var S="";return P(v,function(w){var A=w.left-s,D=w.top-c;S+='<g transform="translate('+A+","+D+')">'+w.dom+"</g>"}),b.painter.getSvgRoot().innerHTML=S,n.connectedBackgroundColor&&b.painter.setBackgroundColor(n.connectedBackgroundColor),b.refreshImmediately(),b.painter.toDataURL()}else return n.connectedBackgroundColor&&b.add(new le({shape:{x:0,y:0,width:m,height:x},style:{fill:n.connectedBackgroundColor}})),P(v,function(w){var A=new Jr({style:{x:w.left*g-s,y:w.top*g-c,image:w.dom}});b.add(A)}),b.refreshImmediately(),_.toDataURL("image/"+(n&&n.type||"png"))}else return this.getDataURL(n)},t.prototype.convertToPixel=function(n,r,i){return Ov(this,"convertToPixel",n,r,i)},t.prototype.convertToLayout=function(n,r,i){return Ov(this,"convertToLayout",n,r,i)},t.prototype.convertFromPixel=function(n,r,i){return Ov(this,"convertFromPixel",n,r,i)},t.prototype.containPixel=function(n,r){if(this._disposed){this.id;return}var i=this._model,a,o=Vf(i,n);return P(o,function(l,s){s.indexOf("Models")>=0&&P(l,function(c){var h=c.coordinateSystem;if(h&&h.containPoint)a=a||!!h.containPoint(r);else if(s==="seriesModels"){var d=this._chartsMap[c.__viewId];d&&d.containPoint&&(a=a||d.containPoint(r,c))}},this)},this),!!a},t.prototype.getVisual=function(n,r){var i=this._model,a=Vf(i,n,{defaultMainType:"series"}),o=a.seriesModel,l=o.getData(),s=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?l.indexOfRawIndex(a.dataIndex):null;return s!=null?JO(l,s,r):tz(l,r)},t.prototype.getViewOfComponentModel=function(n){return this._componentsMap[n.__viewId]},t.prototype.getViewOfSeriesModel=function(n){return this._chartsMap[n.__viewId]},t.prototype._initEvents=function(){var n=this;P(AU,function(i){var a=function(o){var l=n.getModel(),s=o.target,c,h=i==="globalout";if(h?c={}:s&&Mu(s,function(x){var _=Zt(x);if(_&&_.dataIndex!=null){var b=_.dataModel||l.getSeriesByIndex(_.seriesIndex);return c=b&&b.getDataParams(_.dataIndex,_.dataType,s)||{},!0}else if(_.eventData)return c=dt({},_.eventData),!0},!0),c){var d=c.componentType,v=c.componentIndex;(d==="markLine"||d==="markPoint"||d==="markArea")&&(d="series",v=c.seriesIndex);var g=d&&v!=null&&l.getComponent(d,v),m=g&&n[g.mainType==="series"?"_chartsMap":"_componentsMap"][g.__viewId];c.event=o,c.type=i,n._$eventProcessor.eventInfo={targetEl:s,packedEvent:c,model:g,view:m},n.trigger(i,c)}};a.zrEventfulCallAtLast=!0,n._zr.on(i,a,n)});var r=this._messageCenter;P(xb,function(i,a){r.on(a,function(o){n.trigger(a,o)})}),NG(r,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 n=this.getDom();n&&vI(this.getDom(),uS,"");var r=this,i=r._api,a=r._model;P(r._componentsViews,function(o){o.dispose(a,i)}),P(r._chartsViews,function(o){o.dispose(a,i)}),r._zr.dispose(),r._dom=r._model=r._chartsMap=r._componentsMap=r._chartsViews=r._componentsViews=r._scheduler=r._api=r._zr=r._throttledZrFlush=r._theme=r._coordSysMgr=r._messageCenter=null,delete Wf[r.id]},t.prototype.resize=function(n){if(!this[an]){if(this._disposed){this.id;return}this._zr.resize(n);var r=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!r){var i=r.resetOption("media"),a=n&&n.silent;this[hn]&&(a==null&&(a=this[hn].silent),i=!0,this[hn]=null),this[an]=!0,ou(this);try{i&&Al(this),ma.update.call(this,{type:"resize",animation:dt({duration:0},n&&n.animation)})}catch(o){throw this[an]=!1,o}this[an]=!1,iu.call(this,a),au.call(this,a)}}},t.prototype.showLoading=function(n,r){if(this._disposed){this.id;return}if(Lt(n)&&(r=n,n=""),n=n||"default",this.hideLoading(),!!Sb[n]){var i=Sb[n](this._api,r),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(n){var r=dt({},n);return r.type=yb[n.type],r},t.prototype.dispatchAction=function(n,r){if(this._disposed){this.id;return}if(Lt(r)||(r={silent:!!r}),!!$p[n.type]&&this._model){if(this[an]){this._pendingActions.push(n);return}var i=r.silent;y1.call(this,n,i);var a=r.flush;a?this._zr.flush():a!==!1&&Gt.browser.weChat&&this._throttledZrFlush(),iu.call(this,i),au.call(this,i)}},t.prototype.updateLabelLayout=function(){ci.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(n){if(this._disposed){this.id;return}var r=n.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(r);a.appendData(n),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){Al=function(d){var v=d._scheduler;v.restorePipelines(d._model),v.prepareStageTasks(),g1(d,!0),g1(d,!1),v.plan()},g1=function(d,v){for(var g=d._model,m=d._scheduler,x=v?d._componentsViews:d._chartsViews,_=v?d._componentsMap:d._chartsMap,b=d._zr,S=d._api,w=0;w<x.length;w++)x[w].__alive=!1;v?g.eachComponent(function(M,L){M!=="series"&&A(L)}):g.eachSeries(A);function A(M){var L=M.__requireNewView;M.__requireNewView=!1;var I="_ec_"+M.id+"_"+M.type,N=!L&&_[I];if(!N){var E=Pi(M.type),O=v?zn.getClass(E.main,E.sub):Ye.getClass(E.sub);N=new O,N.init(g,S),_[I]=N,x.push(N),b.add(N.group)}M.__viewId=N.__id=I,N.__alive=!0,N.__model=M,N.group.__ecComponentInfo={mainType:M.mainType,index:M.componentIndex},!v&&m.prepareView(N,M,g,S)}for(var w=0;w<x.length;){var D=x[w];D.__alive?w++:(!v&&D.renderTask.dispose(),b.remove(D.group),D.dispose(g,S),x.splice(w,1),_[D.__id]===D&&delete _[D.__id],D.__id=D.group.__ecComponentInfo=null)}},Iv=function(d,v,g,m,x){var _=d._model;if(_.setUpdatePayload(g),!m){P([].concat(d._componentsViews).concat(d._chartsViews),D);return}var b={};b[m+"Id"]=g[m+"Id"],b[m+"Index"]=g[m+"Index"],b[m+"Name"]=g[m+"Name"];var S={mainType:m,query:b};x&&(S.subType=x);var w=g.excludeSeriesId,A;w!=null&&(A=Bt(),P(un(w),function(M){var L=Yn(M,null);L!=null&&A.set(L,!0)})),_&&_.eachComponent(S,function(M){var L=A&&A.get(M.id)!=null;if(!L)if(EA(g))if(M instanceof Ke)g.type===Ul&&!g.notBlur&&!M.get(["emphasis","disabled"])&&mj(M,g,d._api);else{var I=I_(M.mainType,M.componentIndex,g.name,d._api),N=I.focusSelf,E=I.dispatchers;g.type===Ul&&N&&!g.notBlur&&Kx(M.mainType,M.componentIndex,d._api),E&&P(E,function(O){g.type===Ul?Ql(O):Kl(O)})}else tb(g)&&M instanceof Ke&&(bj(M,g,d._api),kA(M),Pr(d))},d),_&&_.eachComponent(S,function(M){var L=A&&A.get(M.id)!=null;L||D(d[m==="series"?"_chartsMap":"_componentsMap"][M.__viewId])},d);function D(M){M&&M.__alive&&M[v]&&M[v](M.__model,_,d._api,g)}},ma={prepareAndUpdate:function(d){Al(this),ma.update.call(this,d,d&&{optionChanged:d.newOption!=null})},update:function(d,v){var g=this._model,m=this._api,x=this._zr,_=this._coordSysMgr,b=this._scheduler;if(g){g.setUpdatePayload(d),b.restoreData(g,d),b.performSeriesTasks(g),_.create(g,m),b.performDataProcessorTasks(g,d),m1(this,g),_.update(g,m),r(g),b.performVisualTasks(g,d);var S=g.get("backgroundColor")||"transparent";x.setBackgroundColor(S);var w=g.get("darkMode");w!=null&&w!=="auto"&&x.setDarkMode(w),x1(this,g,m,d,v),ci.trigger("afterupdate",g,m)}},updateTransform:function(d){var v=this,g=this._model,m=this._api;if(g){g.setUpdatePayload(d);var x=[];g.eachComponent(function(b,S){if(b!=="series"){var w=v.getViewOfComponentModel(S);if(w&&w.__alive)if(w.updateTransform){var A=w.updateTransform(S,g,m,d);A&&A.update&&x.push(w)}else x.push(w)}});var _=Bt();g.eachSeries(function(b){var S=v._chartsMap[b.__viewId];if(S.updateTransform){var w=S.updateTransform(b,g,m,d);w&&w.update&&_.set(b.uid,1)}else _.set(b.uid,1)}),r(g),this._scheduler.performVisualTasks(g,d,{setDirty:!0,dirtyMap:_}),zv(this,g,m,d,{},_),ci.trigger("afterupdate",g,m)}},updateView:function(d){var v=this._model;v&&(v.setUpdatePayload(d),Ye.markUpdateMethod(d,"updateView"),r(v),this._scheduler.performVisualTasks(v,d,{setDirty:!0}),x1(this,v,this._api,d,{}),ci.trigger("afterupdate",v,this._api))},updateVisual:function(d){var v=this,g=this._model;g&&(g.setUpdatePayload(d),g.eachSeries(function(m){m.getData().clearAllVisual()}),Ye.markUpdateMethod(d,"updateVisual"),r(g),this._scheduler.performVisualTasks(g,d,{visualType:"visual",setDirty:!0}),g.eachComponent(function(m,x){if(m!=="series"){var _=v.getViewOfComponentModel(x);_&&_.__alive&&_.updateVisual(x,g,v._api,d)}}),g.eachSeries(function(m){var x=v._chartsMap[m.__viewId];x.updateVisual(m,g,v._api,d)}),ci.trigger("afterupdate",g,this._api))},updateLayout:function(d){ma.update.call(this,d)}};function n(d,v,g,m,x){if(d._disposed){d.id;return}for(var _=d._model,b=d._coordSysMgr.getCoordinateSystems(),S,w=Vf(_,g),A=0;A<b.length;A++){var D=b[A];if(D[v]&&(S=D[v](_,w,m,x))!=null)return S}}Ov=n,m1=function(d,v){var g=d._chartsMap,m=d._scheduler;v.eachSeries(function(x){m.updateStreamModes(x,g[x.__viewId])})},y1=function(d,v){var g=this,m=this.getModel(),x=d.type,_=d.escapeConnect,b=$p[x],S=(b.update||"update").split(":"),w=S.pop(),A=S[0]!=null&&Pi(S[0]);this[an]=!0,ou(this);var D=[d],M=!1;d.batch&&(M=!0,D=bt(d.batch,function(H){return H=$t(dt({},H),d),H.batch=null,H}));var L=[],I,N=[],E=b.nonRefinedEventType,O=tb(d),j=EA(d);if(j&&zI(this._api),P(D,function(H){var q=b.action(H,m,g._api);if(b.refineEvent?N.push(q):I=q,I=I||dt({},H),I.type=E,L.push(I),j){var X=C_(d),J=X.queryOptionMap,F=X.mainTypeSpecified,Y=F?J.keys()[0]:"series";Iv(g,w,H,Y),Pr(g)}else O?(Iv(g,w,H,"series"),Pr(g)):A&&Iv(g,w,H,A.main,A.sub)}),w!=="none"&&!j&&!O&&!A)try{this[hn]?(Al(this),ma.update.call(this,d),this[hn]=null):ma[w].call(this,d)}catch(H){throw this[an]=!1,H}if(M?I={type:E,escapeConnect:_,batch:L}:I=L[0],this[an]=!1,!v){var B=void 0;if(b.refineEvent){var U=b.refineEvent(N,d,m,this._api).eventContent;$r(Lt(U)),B=$t({type:b.refinedEventType},U),B.fromAction=d.type,B.fromActionPayload=d,B.escapeConnect=!0}var W=this._messageCenter;W.trigger(I.type,I),B&&W.trigger(B.type,B)}},iu=function(d){for(var v=this._pendingActions;v.length;){var g=v.shift();y1.call(this,g,d)}},au=function(d){!d&&this.trigger("updated")},UD=function(d,v){d.on("rendered",function(g){v.trigger("rendered",g),d.animation.isFinished()&&!v[hn]&&!v._scheduler.unfinished&&!v._pendingActions.length&&v.trigger("finished")})},YD=function(d,v){d.on("mouseover",function(g){var m=g.target,x=Mu(m,ah);x&&(yj(x,g,v._api),Pr(v))}).on("mouseout",function(g){var m=g.target,x=Mu(m,ah);x&&(xj(x,g,v._api),Pr(v))}).on("click",function(g){var m=g.target,x=Mu(m,function(S){return Zt(S).dataIndex!=null},!0);if(x){var _=x.selected?"unselect":"select",b=Zt(x);v._api.dispatchAction({type:_,dataType:b.dataType,dataIndexInside:b.dataIndex,seriesIndex:b.seriesIndex,isFromClick:!0})}})};function r(d){d.clearColorPalette(),d.eachSeries(function(v){v.clearColorPalette()})}function i(d){var v=[],g=[],m=!1;if(d.eachComponent(function(S,w){var A=w.get("zlevel")||0,D=w.get("z")||0,M=w.getZLevelKey();m=m||!!M,(S==="series"?g:v).push({zlevel:A,z:D,idx:w.componentIndex,type:S,key:M})}),m){var x=v.concat(g),_,b;rp(x,function(S,w){return S.zlevel===w.zlevel?S.z-w.z:S.zlevel-w.zlevel}),P(x,function(S){var w=d.getComponent(S.type,S.idx),A=S.zlevel,D=S.key;_!=null&&(A=Math.max(_,A)),D?(A===_&&D!==b&&A++,b=D):b&&(A===_&&A++,b=""),_=A,w.setZLevel(A)})}}x1=function(d,v,g,m,x){i(v),WD(d,v,g,m,x),P(d._chartsViews,function(_){_.__alive=!1}),zv(d,v,g,m,x),P(d._chartsViews,function(_){_.__alive||_.remove(v,g)})},WD=function(d,v,g,m,x,_){P(_||d._componentsViews,function(b){var S=b.__model;c(S,b),b.render(S,v,g,m),s(S,b),h(S,b)})},zv=function(d,v,g,m,x,_){var b=d._scheduler;x=dt(x||{},{updatedSeries:v.getSeries()}),ci.trigger("series:beforeupdate",v,g,x);var S=!1;v.eachSeries(function(w){var A=d._chartsMap[w.__viewId];A.__alive=!0;var D=A.renderTask;b.updatePayload(D,m),c(w,A),_&&_.get(w.uid)&&D.dirty(),D.perform(b.getPerformArgs(D))&&(S=!0),A.group.silent=!!w.get("silent"),l(w,A),kA(w)}),b.unfinished=S||b.unfinished,ci.trigger("series:layoutlabels",v,g,x),ci.trigger("series:transition",v,g,x),v.eachSeries(function(w){var A=d._chartsMap[w.__viewId];s(w,A),h(w,A)}),o(d,v),ci.trigger("series:afterupdate",v,g,x)},Pr=function(d){d[v1]=!0,d.getZr().wakeUp()},ou=function(d){d[Rv]=(d[Rv]+1)%1e3},XD=function(d){d[v1]&&(d.getZr().storage.traverse(function(v){Ff(v)||a(v)}),d[v1]=!1)};function a(d){for(var v=[],g=d.currentStates,m=0;m<g.length;m++){var x=g[m];x==="emphasis"||x==="blur"||x==="select"||v.push(x)}d.selected&&d.states.select&&v.push("select"),d.hoverState===Ag&&d.states.emphasis?v.push("emphasis"):d.hoverState===Mg&&d.states.blur&&v.push("blur"),d.useStates(v)}function o(d,v){var g=d._zr,m=g.storage,x=0;m.traverse(function(_){_.isGroup||x++}),x>v.get("hoverLayerThreshold")&&!Gt.node&&!Gt.worker&&v.eachSeries(function(_){if(!_.preventUsingHoverLayer){var b=d._chartsMap[_.__viewId];b.__alive&&b.eachRendered(function(S){S.states.emphasis&&(S.states.emphasis.hoverLayer=!0)})}})}function l(d,v){var g=d.get("blendMode")||null;v.eachRendered(function(m){m.isGroup||(m.style.blend=g)})}function s(d,v){if(!d.preventAutoZ){var g=sh(d);v.eachRendered(function(m){return ZI(m,g.z,g.zlevel),!0})}}function c(d,v){v.eachRendered(function(g){if(!Ff(g)){var m=g.getTextContent(),x=g.getTextGuideLine();g.stateTransition&&(g.stateTransition=null),m&&m.stateTransition&&(m.stateTransition=null),x&&x.stateTransition&&(x.stateTransition=null),g.hasState()?(g.prevStates=g.currentStates,g.clearStates()):g.prevStates&&(g.prevStates=null)}})}function h(d,v){var g=d.getModel("stateAnimation"),m=d.isAnimationEnabled(),x=g.get("duration"),_=x>0?{duration:x,delay:g.get("delay"),easing:g.get("easing")}:null;v.eachRendered(function(b){if(b.states&&b.states.emphasis){if(Ff(b))return;if(b instanceof ce&&Cj(b),b.__dirty){var S=b.prevStates;S&&b.useStates(S)}if(m){b.stateTransition=_;var w=b.getTextContent(),A=b.getTextGuideLine();w&&(w.stateTransition=_),A&&(A.stateTransition=_)}b.__dirty&&a(b)}})}qD=function(d){return new((function(v){ot(g,v);function g(){return v!==null&&v.apply(this,arguments)||this}return g.prototype.getCoordinateSystems=function(){return d._coordSysMgr.getCoordinateSystems()},g.prototype.getComponentByElement=function(m){for(;m;){var x=m.__ecComponentInfo;if(x!=null)return d._model.getComponent(x.mainType,x.index);m=m.parent}},g.prototype.enterEmphasis=function(m,x){Ql(m,x),Pr(d)},g.prototype.leaveEmphasis=function(m,x){Kl(m,x),Pr(d)},g.prototype.enterBlur=function(m){gj(m),Pr(d)},g.prototype.leaveBlur=function(m){EI(m),Pr(d)},g.prototype.enterSelect=function(m){RI(m),Pr(d)},g.prototype.leaveSelect=function(m){II(m),Pr(d)},g.prototype.getModel=function(){return d.getModel()},g.prototype.getViewOfComponentModel=function(m){return d.getViewOfComponentModel(m)},g.prototype.getViewOfSeriesModel=function(m){return d.getViewOfSeriesModel(m)},g.prototype.getMainProcessVersion=function(){return d[Rv]},g})(CO))(d)},xz=function(d){function v(g,m){for(var x=0;x<g.length;x++){var _=g[x];_[p1]=m}}P(yb,function(g,m){d._messageCenter.on(m,function(x){if(ZD[d.group]&&d[p1]!==GD){if(x&&x.escapeConnect)return;var _=d.makeActionFromEvent(x),b=[];P(Wf,function(S){S!==d&&S.group===d.group&&b.push(S)}),v(b,GD),P(b,function(S){S[p1]!==CU&&S.dispatchAction(_)}),v(b,MU)}})})}})(),t})(Kr),sS=bz.prototype;sS.on=vz("on");sS.off=vz("off");sS.one=function(e,t,n){var r=this;function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];t&&t.apply&&t.apply(this,a),r.off(e,i)}this.on.call(this,e,i,n)};var AU=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var $p={},yb={},xb={},bb=[],_b=[],Qp=[],_z={},Sb={},Wf={},ZD={},DU=+new Date-0,uS="_echarts_instance_";function kU(e,t,n){var r=!(n&&n.ssr);if(r){var i=LU(e);if(i)return i}var a=new bz(e,t,n);return a.id="ec_"+DU++,Wf[a.id]=a,r&&vI(e,uS,a.id),xz(a),ci.trigger("afterinit",a),a}function LU(e){return Wf[sV(e,uS)]}function cS(e,t){_z[e]=t}function Sz(e){Wt(_b,e)<0&&_b.push(e)}function wz(e,t){hS(bb,e,t,mU)}function EU(e){fS("afterinit",e)}function RU(e){fS("afterupdate",e)}function fS(e,t){ci.on(e,t)}function qi(e,t,n){var r,i,a,o,l;Rt(t)&&(n=t,t=""),Lt(e)?(r=e.type,i=e.event,o=e.update,l=e.publishNonRefinedEvent,n||(n=e.action),a=e.refineEvent):(r=e,i=t);function s(h){return h.toLowerCase()}i=s(i||r);var c=a?s(r):i;$p[r]||($r(FD.test(r)&&FD.test(i)),a&&$r(i!==r),$p[r]={actionType:r,refinedEventType:i,nonRefinedEventType:c,update:o,action:n,refineEvent:a},xb[i]=1,a&&l&&(xb[c]=1),yb[c]=r)}function IU(e,t){Oh.register(e,t)}function OU(e,t){hS(Qp,e,t,fz,"layout")}function as(e,t){hS(Qp,e,t,hz,"visual")}var $D=[];function hS(e,t,n,r,i){if((Rt(t)||Lt(t))&&(n=t,t=r),!(Wt($D,n)>=0)){$D.push(n);var a=XO.wrapStageHandler(n,i);a.__prio=t,a.__raw=n,e.push(a)}}function Tz(e,t){Sb[e]=t}function zU(e,t,n){var r=hU("registerMap");r&&r(e,t,n)}var BU=UF;as(lS,yG);as(Hg,xG);as(Hg,bG);as(lS,IG);as(Hg,OG);as(dz,cU);Sz(AO);wz(pU,MF);Tz("default",_G);qi({type:Ul,event:Ul,update:Ul},Cn);qi({type:up,event:up,update:up},Cn);qi({type:Op,event:E_,update:Op,action:Cn,refineEvent:dS,publishNonRefinedEvent:!0});qi({type:Zx,event:E_,update:Zx,action:Cn,refineEvent:dS,publishNonRefinedEvent:!0});qi({type:zp,event:E_,update:zp,action:Cn,refineEvent:dS,publishNonRefinedEvent:!0});function dS(e,t,n,r){return{eventContent:{selected:_j(n),isFromClick:t.isFromClick||!1}}}cS("default",{});cS("dark",KO);function rf(e){return e==null?0:e.length||1}function QD(e){return e}var Bh=(function(){function e(t,n,r,i,a,o){this._old=t,this._new=n,this._oldKeyGetter=r||QD,this._newKeyGetter=i||QD,this.context=a,this._diffModeMultiple=o==="multiple"}return e.prototype.add=function(t){return this._add=t,this},e.prototype.update=function(t){return this._update=t,this},e.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},e.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},e.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},e.prototype.remove=function(t){return this._remove=t,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var t=this._old,n=this._new,r={},i=new Array(t.length),a=new Array(n.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(n,r,a,"_newKeyGetter");for(var o=0;o<t.length;o++){var l=i[o],s=r[l],c=rf(s);if(c>1){var h=s.shift();s.length===1&&(r[l]=s[0]),this._update&&this._update(h,o)}else c===1?(r[l]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(a,r)},e.prototype._executeMultiple=function(){var t=this._old,n=this._new,r={},i={},a=[],o=[];this._initIndexMap(t,r,a,"_oldKeyGetter"),this._initIndexMap(n,i,o,"_newKeyGetter");for(var l=0;l<a.length;l++){var s=a[l],c=r[s],h=i[s],d=rf(c),v=rf(h);if(d>1&&v===1)this._updateManyToOne&&this._updateManyToOne(h,c),i[s]=null;else if(d===1&&v>1)this._updateOneToMany&&this._updateOneToMany(h,c),i[s]=null;else if(d===1&&v===1)this._update&&this._update(h,c),i[s]=null;else if(d>1&&v>1)this._updateManyToMany&&this._updateManyToMany(h,c),i[s]=null;else if(d>1)for(var g=0;g<d;g++)this._remove&&this._remove(c[g]);else this._remove&&this._remove(c)}this._performRestAdd(o,i)},e.prototype._performRestAdd=function(t,n){for(var r=0;r<t.length;r++){var i=t[r],a=n[i],o=rf(a);if(o>1)for(var l=0;l<o;l++)this._add&&this._add(a[l]);else o===1&&this._add&&this._add(a);n[i]=null}},e.prototype._initIndexMap=function(t,n,r,i){for(var a=this._diffModeMultiple,o=0;o<t.length;o++){var l="_ec_"+this[i](t[o],o);if(a||(r[o]=l),!!n){var s=n[l],c=rf(s);c===0?(n[l]=o,a&&r.push(l)):c===1?n[l]=[s,o]:s.push(o)}}},e})(),NU=(function(){function e(t,n){this._encode=t,this._schema=n}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e})();function PU(e,t){var n={},r=n.encode={},i=Bt(),a=[],o=[],l={};P(e.dimensions,function(v){var g=e.getDimensionInfo(v),m=g.coordDim;if(m){var x=g.coordDimIndex;b1(r,m)[x]=v,g.isExtraCoord||(i.set(m,1),HU(g.type)&&(a[0]=v),b1(l,m)[x]=e.getDimensionIndex(g.name)),g.defaultTooltip&&o.push(v)}mO.each(function(_,b){var S=b1(r,b),w=g.otherDims[b];w!=null&&w!==!1&&(S[w]=g.name)})});var s=[],c={};i.each(function(v,g){var m=r[g];c[g]=m[0],s=s.concat(m)}),n.dataDimsOnCoord=s,n.dataDimIndicesOnCoord=bt(s,function(v){return e.getDimensionInfo(v).storeDimIndex}),n.encodeFirstDimNotExtra=c;var h=r.label;h&&h.length&&(a=h.slice());var d=r.tooltip;return d&&d.length?o=d.slice():o.length||(o=a.slice()),r.defaultedLabel=a,r.defaultedTooltip=o,n.userOutput=new NU(l,t),n}function b1(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function wb(e){return e==="category"?"ordinal":e==="time"?"time":"float"}function HU(e){return!(e==="ordinal"||e==="time")}var gp=(function(){function e(t){this.otherDims={},t!=null&&dt(this,t)}return e})(),VU=be(),jU={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Cz=(function(){function e(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=Dz(this.source)))},e.prototype.getSourceDimensionIndex=function(t){return zt(this._dimNameMap.get(t),-1)},e.prototype.getSourceDimension=function(t){var n=this.source.dimensionsDefine;if(n)return n[t]},e.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,n=kO(this.source),r=!kz(t),i="",a=[],o=0,l=0;o<t;o++){var s=void 0,c=void 0,h=void 0,d=this.dimensions[l];if(d&&d.storeDimIndex===o)s=n?d.name:null,c=d.type,h=d.ordinalMeta,l++;else{var v=this.getSourceDimension(o);v&&(s=n?v.name:null,c=v.type)}a.push({property:s,type:c,ordinalMeta:h}),n&&s!=null&&(!d||!d.isCalculationCoord)&&(i+=r?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),i+="$",i+=jU[c]||"f",h&&(i+=h.uid),i+="$"}var g=this.source,m=[g.seriesLayoutBy,g.startIndex,i].join("$$");return{dimensions:a,hash:m}},e.prototype.makeOutputDimensionNames=function(){for(var t=[],n=0,r=0;n<this._fullDimCount;n++){var i=void 0,a=this.dimensions[r];if(a&&a.storeDimIndex===n)a.isCalculationCoord||(i=a.name),r++;else{var o=this.getSourceDimension(n);o&&(i=o.name)}t.push(i)}return t},e.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e})();function Mz(e){return e instanceof Cz}function Az(e){for(var t=Bt(),n=0;n<(e||[]).length;n++){var r=e[n],i=Lt(r)?r.name:r;i!=null&&t.get(i)==null&&t.set(i,n)}return t}function Dz(e){var t=VU(e);return t.dimNameMap||(t.dimNameMap=Az(e.dimensionsDefine))}function kz(e){return e>30}var af=Lt,oo=bt,FU=typeof Int32Array>"u"?Array:Int32Array,GU="e\0\0",KD=-1,UU=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],YU=["_approximateExtent"],JD,Bv,of,lf,_1,sf,S1,dh=(function(){function e(t,n){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 r,i=!1;Mz(t)?(r=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,r=t),r=r||["x","y"];for(var a={},o=[],l={},s=!1,c={},h=0;h<r.length;h++){var d=r[h],v=St(d)?new gp({name:d}):d instanceof gp?d:new gp(d),g=v.name;v.type=v.type||"float",v.coordDim||(v.coordDim=g,v.coordDimIndex=0);var m=v.otherDims=v.otherDims||{};o.push(g),a[g]=v,c[g]!=null&&(s=!0),v.createInvertedIndices&&(l[g]=[]);var x=h;ve(v.storeDimIndex)&&(x=v.storeDimIndex),m.itemName===0&&(this._nameDimIdx=x),m.itemId===0&&(this._idDimIdx=x),i&&(v.storeDimIndex=h)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(s),this.hostModel=n,this._invertedIndicesMap=l,this._dimOmitted){var _=this._dimIdxToName=Bt();P(o,function(b){_.set(a[b].storeDimIndex,b)})}}return e.prototype.getDimension=function(t){var n=this._recognizeDimIndex(t);if(n==null)return t;if(n=t,!this._dimOmitted)return this.dimensions[n];var r=this._dimIdxToName.get(n);if(r!=null)return r;var i=this._schema.getSourceDimension(n);if(i)return i.name},e.prototype.getDimensionIndex=function(t){var n=this._recognizeDimIndex(t);if(n!=null)return n;if(t==null)return-1;var r=this._getDimInfo(t);return r?r.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},e.prototype._recognizeDimIndex=function(t){if(ve(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},e.prototype._getStoreDimIndex=function(t){var n=this.getDimensionIndex(t);return n},e.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},e.prototype._initGetDimensionInfo=function(t){var n=this._dimInfos;this._getDimInfo=t?function(r){return n.hasOwnProperty(r)?n[r]:void 0}:function(r){return n[r]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(t,n){var r=this._dimSummary;if(n==null)return r.encodeFirstDimNotExtra[t];var i=r.encode[t];return i?i[n]:null},e.prototype.mapDimensionsAll=function(t){var n=this._dimSummary,r=n.encode[t];return(r||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(t,n,r){var i=this,a;if(t instanceof fb&&(a=t),!a){var o=this.dimensions,l=nS(t)||sr(t)?new LO(t,o.length):t;a=new fb;var s=oo(o,function(c){return{type:i._dimInfos[c].type,property:c}});a.initData(l,s,r)}this._store=a,this._nameList=(n||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=PU(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(t){var n=this._store.appendData(t);this._doInit(n[0],n[1])},e.prototype.appendValues=function(t,n){var r=this._store.appendValues(t,n&&n.length),i=r.start,a=r.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),n)for(var l=i;l<a;l++){var s=l-i;this._nameList[l]=n[s],o&&S1(this,l)}},e.prototype._updateOrdinalMeta=function(){for(var t=this._store,n=this.dimensions,r=0;r<n.length;r++){var i=this._dimInfos[n[r]];i.ordinalMeta&&t.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==ko&&!t.fillStorage},e.prototype._doInit=function(t,n){if(!(t>=n)){var r=this._store,i=r.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,l=i.getSource().sourceFormat,s=l===Ar;if(s&&!i.pure)for(var c=[],h=t;h<n;h++){var d=i.getItem(h,c);if(!this.hasItemOption&&X6(d)&&(this.hasItemOption=!0),d){var v=d.name;a[h]==null&&v!=null&&(a[h]=Yn(v,null));var g=d.id;o[h]==null&&g!=null&&(o[h]=Yn(g,null))}}if(this._shouldMakeIdFromName())for(var h=t;h<n;h++)S1(this,h);JD(this)}},e.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},e.prototype.setApproximateExtent=function(t,n){n=this.getDimension(n),this._approximateExtent[n]=t.slice()},e.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},e.prototype.setCalculationInfo=function(t,n){af(t)?dt(this._calculationInfo,t):this._calculationInfo[t]=n},e.prototype.getName=function(t){var n=this.getRawIndex(t),r=this._nameList[n];return r==null&&this._nameDimIdx!=null&&(r=of(this,this._nameDimIdx,n)),r==null&&(r=""),r},e.prototype._getCategory=function(t,n){var r=this._store.get(t,n),i=this._store.getOrdinalMeta(t);return i?i.categories[r]:r},e.prototype.getId=function(t){return Bv(this,this.getRawIndex(t))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(t,n){var r=this._store,i=this._dimInfos[t];if(i)return r.get(i.storeDimIndex,n)},e.prototype.getByRawIndex=function(t,n){var r=this._store,i=this._dimInfos[t];if(i)return r.getByRawIndex(i.storeDimIndex,n)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},e.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},e.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},e.prototype.getValues=function(t,n){var r=this,i=this._store;return mt(t)?i.getValues(oo(t,function(a){return r._getStoreDimIndex(a)}),n):i.getValues(t)},e.prototype.hasValue=function(t){for(var n=this._dimSummary.dataDimIndicesOnCoord,r=0,i=n.length;r<i;r++)if(isNaN(this._store.get(n[r],t)))return!1;return!0},e.prototype.indexOfName=function(t){for(var n=0,r=this._store.count();n<r;n++)if(this.getName(n)===t)return n;return-1},e.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},e.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},e.prototype.rawIndexOf=function(t,n){var r=t&&this._invertedIndicesMap[t],i=r&&r[n];return i==null||isNaN(i)?KD:i},e.prototype.each=function(t,n,r){Rt(t)&&(r=n,n=t,t=[]);var i=r||this,a=oo(lf(t),this._getStoreDimIndex,this);this._store.each(a,i?Ct(n,i):n)},e.prototype.filterSelf=function(t,n,r){Rt(t)&&(r=n,n=t,t=[]);var i=r||this,a=oo(lf(t),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?Ct(n,i):n),this},e.prototype.selectRange=function(t){var n=this,r={},i=Be(t);return P(i,function(a){var o=n._getStoreDimIndex(a);r[o]=t[a]}),this._store=this._store.selectRange(r),this},e.prototype.mapArray=function(t,n,r){Rt(t)&&(r=n,n=t,t=[]),r=r||this;var i=[];return this.each(t,function(){i.push(n&&n.apply(this,arguments))},r),i},e.prototype.map=function(t,n,r,i){var a=r||i||this,o=oo(lf(t),this._getStoreDimIndex,this),l=sf(this);return l._store=this._store.map(o,a?Ct(n,a):n),l},e.prototype.modify=function(t,n,r,i){var a=r||i||this,o=oo(lf(t),this._getStoreDimIndex,this);this._store.modify(o,a?Ct(n,a):n)},e.prototype.downSample=function(t,n,r,i){var a=sf(this);return a._store=this._store.downSample(this._getStoreDimIndex(t),n,r,i),a},e.prototype.minmaxDownSample=function(t,n){var r=sf(this);return r._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),n),r},e.prototype.lttbDownSample=function(t,n){var r=sf(this);return r._store=this._store.lttbDownSample(this._getStoreDimIndex(t),n),r},e.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},e.prototype.getItemModel=function(t){var n=this.hostModel,r=this.getRawDataItem(t);return new Te(r,n,n&&n.ecModel)},e.prototype.diff=function(t){var n=this;return new Bh(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(r){return Bv(t,r)},function(r){return Bv(n,r)})},e.prototype.getVisual=function(t){var n=this._visual;return n&&n[t]},e.prototype.setVisual=function(t,n){this._visual=this._visual||{},af(t)?dt(this._visual,t):this._visual[t]=n},e.prototype.getItemVisual=function(t,n){var r=this._itemVisuals[t],i=r&&r[n];return i??this.getVisual(n)},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(t,n){var r=this._itemVisuals,i=r[t];i||(i=r[t]={});var a=i[n];return a==null&&(a=this.getVisual(n),mt(a)?a=a.slice():af(a)&&(a=dt({},a)),i[n]=a),a},e.prototype.setItemVisual=function(t,n,r){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,af(n)?dt(i,n):i[n]=r},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,n){af(t)?dt(this._layout,t):this._layout[t]=n},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,n,r){this._itemLayouts[t]=r?dt(this._itemLayouts[t]||{},n):n},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,n){var r=this.hostModel&&this.hostModel.seriesIndex;Xx(r,this.dataType,t,n),this._graphicEls[t]=n},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,n){P(this._graphicEls,function(r,i){r&&t&&t.call(n,r,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:oo(this.dimensions,this._getDimInfo,this),this.hostModel)),_1(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,n){var r=this[t];Rt(r)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=r.apply(this,arguments);return n.apply(this,[i].concat(g_(arguments)))})},e.internalField=(function(){JD=function(t){var n=t._invertedIndicesMap;P(n,function(r,i){var a=t._dimInfos[i],o=a.ordinalMeta,l=t._store;if(o){r=n[i]=new FU(o.categories.length);for(var s=0;s<r.length;s++)r[s]=KD;for(var s=0;s<l.count();s++)r[l.get(a.storeDimIndex,s)]=s}})},of=function(t,n,r){return Yn(t._getCategory(n,r),null)},Bv=function(t,n){var r=t._idList[n];return r==null&&t._idDimIdx!=null&&(r=of(t,t._idDimIdx,n)),r==null&&(r=GU+n),r},lf=function(t){return mt(t)||(t=t!=null?[t]:[]),t},sf=function(t){var n=new e(t._schema?t._schema:oo(t.dimensions,t._getDimInfo,t),t.hostModel);return _1(n,t),n},_1=function(t,n){P(UU.concat(n.__wrappedMethods||[]),function(r){n.hasOwnProperty(r)&&(t[r]=n[r])}),t.__wrappedMethods=n.__wrappedMethods,P(YU,function(r){t[r]=It(n[r])}),t._calculationInfo=dt({},n._calculationInfo)},S1=function(t,n){var r=t._nameList,i=t._idList,a=t._nameDimIdx,o=t._idDimIdx,l=r[n],s=i[n];if(l==null&&a!=null&&(r[n]=l=of(t,a,n)),s==null&&o!=null&&(i[n]=s=of(t,o,n)),s==null&&l!=null){var c=t._nameRepeatCount,h=c[l]=(c[l]||0)+1;s=l,h>1&&(s+="__ec__"+h),i[n]=s}}})(),e})();function Vg(e,t){nS(e)||(e=rS(e)),t=t||{};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Bt(),a=[],o=qU(e,n,r,t.dimensionsCount),l=t.canOmitUnusedDimensions&&kz(o),s=r===e.dimensionsDefine,c=s?Dz(e):Az(r),h=t.encodeDefine;!h&&t.encodeDefaulter&&(h=t.encodeDefaulter(e,o));for(var d=Bt(h),v=new zO(o),g=0;g<v.length;g++)v[g]=-1;function m(N){var E=v[N];if(E<0){var O=r[N],j=Lt(O)?O:{name:O},B=new gp,U=j.name;U!=null&&c.get(U)!=null&&(B.name=B.displayName=U),j.type!=null&&(B.type=j.type),j.displayName!=null&&(B.displayName=j.displayName);var W=a.length;return v[N]=W,B.storeDimIndex=N,a.push(B),B}return a[E]}if(!l)for(var g=0;g<o;g++)m(g);d.each(function(N,E){var O=un(N).slice();if(O.length===1&&!St(O[0])&&O[0]<0){d.set(E,!1);return}var j=d.set(E,[]);P(O,function(B,U){var W=St(B)?c.get(B):B;W!=null&&W<o&&(j[U]=W,_(m(W),E,U))})});var x=0;P(n,function(N){var E,O,j,B;if(St(N))E=N,B={};else{B=N,E=B.name;var U=B.ordinalMeta;B.ordinalMeta=null,B=dt({},B),B.ordinalMeta=U,O=B.dimsDef,j=B.otherDims,B.name=B.coordDim=B.coordDimIndex=B.dimsDef=B.otherDims=null}var W=d.get(E);if(W!==!1){if(W=un(W),!W.length)for(var H=0;H<(O&&O.length||1);H++){for(;x<o&&m(x).coordDim!=null;)x++;x<o&&W.push(x++)}P(W,function(q,X){var J=m(q);if(s&&B.type!=null&&(J.type=B.type),_($t(J,B),E,X),J.name==null&&O){var F=O[X];!Lt(F)&&(F={name:F}),J.name=J.displayName=F.name,J.defaultTooltip=F.defaultTooltip}j&&$t(J.otherDims,j)})}});function _(N,E,O){mO.get(E)!=null?N.otherDims[E]=O:(N.coordDim=E,N.coordDimIndex=O,i.set(E,!0))}var b=t.generateCoord,S=t.generateCoordCount,w=S!=null;S=b?S||1:0;var A=b||"value";function D(N){N.name==null&&(N.name=N.coordDim)}if(l)P(a,function(N){D(N)}),a.sort(function(N,E){return N.storeDimIndex-E.storeDimIndex});else for(var M=0;M<o;M++){var L=m(M),I=L.coordDim;I==null&&(L.coordDim=XU(A,i,w),L.coordDimIndex=0,(!b||S<=0)&&(L.isExtraCoord=!0),S--),D(L),L.type==null&&(SO(e,M)===Sn.Must||L.isExtraCoord&&(L.otherDims.itemName!=null||L.otherDims.seriesName!=null))&&(L.type="ordinal")}return WU(a),new Cz({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:l})}function WU(e){for(var t=Bt(),n=0;n<e.length;n++){var r=e[n],i=r.name,a=t.get(i)||0;a>0&&(r.name=i+(a-1)),a++,t.set(i,a)}}function qU(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return P(t,function(a){var o;Lt(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function XU(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var ZU=(function(){function e(t){this.coordSysDims=[],this.axisMap=Bt(),this.categoryAxisMap=Bt(),this.coordSysName=t}return e})();function $U(e){var t=e.get("coordinateSystem"),n=new ZU(t),r=QU[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var QU={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents("xAxis",En).models[0],a=e.getReferringComponents("yAxis",En).models[0];t.coordSysDims=["x","y"],n.set("x",i),n.set("y",a),lu(i)&&(r.set("x",i),t.firstCategoryDimIndex=0),lu(a)&&(r.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var i=e.getReferringComponents("singleAxis",En).models[0];t.coordSysDims=["single"],n.set("single",i),lu(i)&&(r.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents("polar",En).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",a),n.set("angle",o),lu(a)&&(r.set("radius",a),t.firstCategoryDimIndex=0),lu(o)&&(r.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();P(a.parallelAxisIndex,function(l,s){var c=i.getComponent("parallelAxis",l),h=o[s];n.set(h,c),lu(c)&&(r.set(h,c),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=s))})},matrix:function(e,t,n,r){var i=e.getReferringComponents("matrix",En).models[0];t.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");n.set("x",a),n.set("y",o),r.set("x",a),r.set("y",o)}};function lu(e){return e.get("type")==="category"}function KU(e,t,n){n=n||{};var r=n.byIndex,i=n.stackedCoordDimension,a,o,l;JU(t)?a=t:(o=t.schema,a=o.dimensions,l=t.store);var s=!!(e&&e.get("stack")),c,h,d,v;if(P(a,function(S,w){St(S)&&(a[w]=S={name:S}),s&&!S.isExtraCoord&&(!r&&!c&&S.ordinalMeta&&(c=S),!h&&S.type!=="ordinal"&&S.type!=="time"&&(!i||i===S.coordDim)&&(h=S))}),h&&!r&&!c&&(r=!0),h){d="__\0ecstackresult_"+e.id,v="__\0ecstackedover_"+e.id,c&&(c.createInvertedIndices=!0);var g=h.coordDim,m=h.type,x=0;P(a,function(S){S.coordDim===g&&x++});var _={name:d,coordDim:g,coordDimIndex:x,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},b={name:v,coordDim:v,coordDimIndex:x+1,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(l&&(_.storeDimIndex=l.ensureCalculationDimension(v,m),b.storeDimIndex=l.ensureCalculationDimension(d,m)),o.appendCalculationDimension(_),o.appendCalculationDimension(b)):(a.push(_),a.push(b))}return{stackedDimension:h&&h.name,stackedByDimension:c&&c.name,isStackedByIndex:r,stackedOverDimension:v,stackResultDimension:d}}function JU(e){return!Mz(e.schema)}function Pu(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function t9(e,t){return Pu(e,t)?e.getCalculationInfo("stackResultDimension"):t}function e9(e,t){var n=e.get("coordinateSystem"),r=Oh.get(n),i;return t&&t.coordSysDims&&(i=bt(t.coordSysDims,function(a){var o={name:a},l=t.axisMap.get(a);if(l){var s=l.get("type");o.type=wb(s)}return o})),i||(i=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),i}function n9(e,t,n){var r,i;return n&&P(e,function(a,o){var l=a.coordDim,s=n.categoryAxisMap.get(l);s&&(r==null&&(r=o),a.ordinalMeta=s.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function Qu(e,t,n){n=n||{};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=rS(e)):(i=r.getSource(),a=i.sourceFormat===Ar);var o=$U(t),l=e9(t,o),s=n.useEncodeDefaulter,c=Rt(s)?s:s?Yt(bO,l,t):null,h={coordDimensions:l,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:c,canOmitUnusedDimensions:!a},d=Vg(i,h),v=n9(d.dimensions,n.createInvertedIndices,o),g=a?null:r.getSharedDataStore(d),m=KU(t,{schema:d,store:g}),x=new dh(d,t);x.setCalculationInfo(m);var _=v!=null&&r9(i)?function(b,S,w,A){return A===v?w:this.defaultDimValueGetter(b,S,w,A)}:null;return x.hasItemOption=!1,x.initData(a?i:g,null,_),x}function r9(e){if(e.sourceFormat===Ar){var t=i9(e.data||[]);return!mt(Ah(t))}}function i9(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}function Tb(e){return e.type==="interval"||e.type==="log"}function a9(e,t,n,r,i){var a={},o=a.interval=lI(t/n);r!=null&&o<r&&(o=a.interval=r),i!=null&&o>i&&(o=a.interval=i);var l=a.intervalPrecision=vh(o),s=a.niceTickExtent=[pn(Math.ceil(e[0]/o)*o,l),pn(Math.floor(e[1]/o)*o,l)];return o9(s,e),a}function w1(e){var t=Math.pow(10,w_(e)),n=e/t;return n?n===2?n=3:n===3?n=5:n*=2:n=1,pn(n*t)}function vh(e){return wa(e)+2}function tk(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function o9(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),tk(e,0,t),tk(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function vS(e,t){return e>=t[0]&&e<=t[1]}var l9=(function(){function e(){this.normalize=ek,this.scale=nk}return e.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=Ct(t.normalize,t),this.scale=Ct(t.scale,t)):(this.normalize=ek,this.scale=nk)},e})();function ek(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function nk(e,t){return e*(t[1]-t[0])+t[0]}function Cb(e,t,n){var r=Math.log(e);return[Math.log(n?t[0]:Math.max(0,t[0]))/r,Math.log(n?t[1]:Math.max(0,t[1]))/r]}var Po=(function(){function e(t){this._calculator=new l9,this._setting=t||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(t){return this._setting[t]},e.prototype._innerUnionExtent=function(t){var n=this._extent;this._innerSetExtent(t[0]<n[0]?t[0]:n[0],t[1]>n[1]?t[1]:n[1])},e.prototype.unionExtentFromData=function(t,n){this._innerUnionExtent(t.getApproximateExtent(n))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,n){this._innerSetExtent(t,n)},e.prototype._innerSetExtent=function(t,n){var r=this._extent;isNaN(t)||(r[0]=t),isNaN(n)||(r[1]=n),this._brkCtx&&this._brkCtx.update(r)},e.prototype.setBreaksFromOption=function(t){},e.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},e.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},e.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},e.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e})();wg(Po);var s9=0,Mb=(function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++s9,this._onCollect=t.onCollect}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&bt(r,u9);return new e({categories:i,needCollect:!i,deduplication:n.dedplication!==!1})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(t){var n,r=this._needCollect;if(!St(t)&&!r)return t;if(r&&!this._deduplication)return n=this.categories.length,this.categories[n]=t,this._onCollect&&this._onCollect(t,n),n;var i=this._getOrCreateMap();return n=i.get(t),n==null&&(r?(n=this.categories.length,this.categories[n]=t,i.set(t,n),this._onCollect&&this._onCollect(t,n)):n=NaN),n},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Bt(this.categories))},e})();function u9(e){return Lt(e)&&e.value!=null?e.value:e+""}var Lz=(function(e){ot(t,e);function t(n){var r=e.call(this,n)||this;r.type="ordinal";var i=r.getSetting("ordinalMeta");return i||(i=new Mb({})),mt(i)&&(i=new Mb({categories:bt(i,function(a){return Lt(a)?a.value:a})})),r._ordinalMeta=i,r._extent=r.getSetting("extent")||[0,i.categories.length-1],r}return t.prototype.parse=function(n){return n==null?NaN:St(n)?this._ordinalMeta.getOrdinal(n):Math.round(n)},t.prototype.contain=function(n){return vS(n,this._extent)&&n>=0&&n<this._ordinalMeta.categories.length},t.prototype.normalize=function(n){return n=this._getTickNumber(n),this._calculator.normalize(n,this._extent)},t.prototype.scale=function(n){return n=Math.round(this._calculator.scale(n,this._extent)),this.getRawOrdinalNumber(n)},t.prototype.getTicks=function(){for(var n=[],r=this._extent,i=r[0];i<=r[1];)n.push({value:i}),i++;return n},t.prototype.getMinorTicks=function(n){},t.prototype.setSortInfo=function(n){if(n==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var r=n.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,l=this._ordinalMeta.categories.length,s=Math.min(l,r.length);o<s;++o){var c=r[o];i[o]=c,a[c]=o}for(var h=0;o<l;++o){for(;a[h]!=null;)h++;i.push(h),a[h]=o}},t.prototype._getTickNumber=function(n){var r=this._ticksByOrdinalNumber;return r&&n>=0&&n<r.length?r[n]:n},t.prototype.getRawOrdinalNumber=function(n){var r=this._ordinalNumbersByTick;return r&&n>=0&&n<r.length?r[n]:n},t.prototype.getLabel=function(n){if(!this.isBlank()){var r=this.getRawOrdinalNumber(n.value),i=this._ordinalMeta.categories[r];return i==null?"":i+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.isInExtentRange=function(n){return n=this._getTickNumber(n),this._extent[0]<=n&&this._extent[1]>=n},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t})(Po);Po.registerClass(Lz);var lo=pn,zo=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="interval",n._interval=0,n._intervalPrecision=2,n}return t.prototype.parse=function(n){return n==null||n===""?NaN:Number(n)},t.prototype.contain=function(n){return vS(n,this._extent)},t.prototype.normalize=function(n){return this._calculator.normalize(n,this._extent)},t.prototype.scale=function(n){return this._calculator.scale(n,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(n){this._interval=n,this._niceExtent=this._extent.slice(),this._intervalPrecision=vh(n)},t.prototype.getTicks=function(n){n=n||{};var r=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,l=Vp(),s=[];if(!r)return s;n.breakTicks;var c=1e4;i[0]<a[0]&&(n.expandToNicedExtent?s.push({value:lo(a[0]-r,o)}):s.push({value:i[0]}));for(var h=function(m,x){return Math.round((x-m)/r)},d=a[0];d<=a[1];){if(s.push({value:d}),d=lo(d+r,o),this._brkCtx){var v=this._brkCtx.calcNiceTickMultiple(d,h);v>=0&&(d=lo(d+v*r,o))}if(s.length>0&&d===s[s.length-1].value)break;if(s.length>c)return[]}var g=s.length?s[s.length-1].value:a[1];return i[1]>g&&(n.expandToNicedExtent?s.push({value:lo(g+r,o)}):s.push({value:i[1]})),n.breakTicks,s},t.prototype.getMinorTicks=function(n){for(var r=this.getTicks({expandToNicedExtent:!0}),i=[],a=this.getExtent(),o=1;o<r.length;o++){var l=r[o],s=r[o-1];if(!(s.break||l.break)){for(var c=0,h=[],d=l.value-s.value,v=d/n,g=vh(v);c<n-1;){var m=lo(s.value+(c+1)*v,g);m>a[0]&&m<a[1]&&h.push(m),c++}var x=Vp();x&&x.pruneTicksByBreak("auto",h,this._getNonTransBreaks(),function(_){return _},this._interval,a),i.push(h)}}return i},t.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.getLabel=function(n,r){if(n==null)return"";var i=r&&r.precision;i==null?i=wa(n.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=lo(n.value,i,!0);return fO(a)},t.prototype.calcNiceTicks=function(n,r,i){n=n||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 l=a9(a,o,n,r,i);this._intervalPrecision=l.intervalPrecision,this._interval=l.interval,this._niceExtent=l.niceTickExtent}},t.prototype.calcNiceExtent=function(n){var r=this._extent.slice();if(r[0]===r[1])if(r[0]!==0){var i=Math.abs(r[0]);n.fixMax||(r[1]+=i/2),r[0]-=i/2}else r[1]=1;var a=r[1]-r[0];isFinite(a)||(r[0]=0,r[1]=1),this._innerSetExtent(r[0],r[1]),r=this._extent.slice(),this.calcNiceTicks(n.splitNumber,n.minInterval,n.maxInterval);var o=this._interval,l=this._intervalPrecision;n.fixMin||(r[0]=lo(Math.floor(r[0]/o)*o,l)),n.fixMax||(r[1]=lo(Math.ceil(r[1]/o)*o,l)),this._innerSetExtent(r[0],r[1])},t.prototype.setNiceExtent=function(n,r){this._niceExtent=[n,r]},t.type="interval",t})(Po);Po.registerClass(zo);var Ez=typeof Float32Array<"u",c9=Ez?Float32Array:Array;function Hi(e){return mt(e)?Ez?new Float32Array(e):e:new c9(e)}var f9="__ec_stack_";function Rz(e){return e.get("stack")||f9+e.seriesIndex}function pS(e){return e.dim+e.index}function Iz(e,t){var n=[];return t.eachSeriesByType(e,function(r){zz(r)&&n.push(r)}),n}function h9(e){var t={};P(e,function(s){var c=s.coordinateSystem,h=c.getBaseAxis();if(!(h.type!=="time"&&h.type!=="value"))for(var d=s.getData(),v=h.dim+"_"+h.index,g=d.getDimensionIndex(d.mapDimension(h.dim)),m=d.getStore(),x=0,_=m.count();x<_;++x){var b=m.get(g,x);t[v]?t[v].push(b):t[v]=[b]}});var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(i){i.sort(function(s,c){return s-c});for(var a=null,o=1;o<i.length;++o){var l=i[o]-i[o-1];l>0&&(a=a===null?l:Math.min(a,l))}n[r]=a}}return n}function Oz(e){var t=h9(e),n=[];return P(e,function(r){var i=r.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),l;if(a.type==="category")l=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var s=a.dim+"_"+a.index,c=t[s],h=Math.abs(o[1]-o[0]),d=a.scale.getExtent(),v=Math.abs(d[1]-d[0]);l=c?h/v*c:h}else{var g=r.getData();l=Math.abs(o[1]-o[0])/g.count()}var m=At(r.get("barWidth"),l),x=At(r.get("barMaxWidth"),l),_=At(r.get("barMinWidth")||(Bz(r)?.5:1),l),b=r.get("barGap"),S=r.get("barCategoryGap"),w=r.get("defaultBarGap");n.push({bandWidth:l,barWidth:m,barMaxWidth:x,barMinWidth:_,barGap:b,barCategoryGap:S,defaultBarGap:w,axisKey:pS(a),stackId:Rz(r)})}),d9(n)}function d9(e){var t={};P(e,function(r,i){var a=r.axisKey,o=r.bandWidth,l=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:r.defaultBarGap||0,stacks:{}},s=l.stacks;t[a]=l;var c=r.stackId;s[c]||l.autoWidthCount++,s[c]=s[c]||{width:0,maxWidth:0};var h=r.barWidth;h&&!s[c].width&&(s[c].width=h,h=Math.min(l.remainedWidth,h),l.remainedWidth-=h);var d=r.barMaxWidth;d&&(s[c].maxWidth=d);var v=r.barMinWidth;v&&(s[c].minWidth=v);var g=r.barGap;g!=null&&(l.gap=g);var m=r.barCategoryGap;m!=null&&(l.categoryGap=m)});var n={};return P(t,function(r,i){n[i]={};var a=r.stacks,o=r.bandWidth,l=r.categoryGap;if(l==null){var s=Be(a).length;l=Math.max(35-s*4,15)+"%"}var c=At(l,o),h=At(r.gap,1),d=r.remainedWidth,v=r.autoWidthCount,g=(d-c)/(v+(v-1)*h);g=Math.max(g,0),P(a,function(b){var S=b.maxWidth,w=b.minWidth;if(b.width){var A=b.width;S&&(A=Math.min(A,S)),w&&(A=Math.max(A,w)),b.width=A,d-=A+h*A,v--}else{var A=g;S&&S<A&&(A=Math.min(S,d)),w&&w>A&&(A=w),A!==g&&(b.width=A,d-=A+h*A,v--)}}),g=(d-c)/(v+(v-1)*h),g=Math.max(g,0);var m=0,x;P(a,function(b,S){b.width||(b.width=g),x=b,m+=b.width*(1+h)}),x&&(m-=x.width*h);var _=-m/2;P(a,function(b,S){n[i][S]=n[i][S]||{bandWidth:o,offset:_,width:b.width},_+=b.width*(1+h)})}),n}function v9(e,t,n){if(e&&t){var r=e[pS(t)];return r}}function p9(e,t){var n=Iz(e,t),r=Oz(n);P(n,function(i){var a=i.getData(),o=i.coordinateSystem,l=o.getBaseAxis(),s=Rz(i),c=r[pS(l)][s],h=c.offset,d=c.width;a.setLayout({bandWidth:c.bandWidth,offset:h,size:d})})}function g9(e){return{seriesType:e,plan:zh(),reset:function(t){if(zz(t)){var n=t.getData(),r=t.coordinateSystem,i=r.getBaseAxis(),a=r.getOtherAxis(i),o=n.getDimensionIndex(n.mapDimension(a.dim)),l=n.getDimensionIndex(n.mapDimension(i.dim)),s=t.get("showBackground",!0),c=n.mapDimension(a.dim),h=n.getCalculationInfo("stackResultDimension"),d=Pu(n,c)&&!!n.getCalculationInfo("stackedOnSeries"),v=a.isHorizontal(),g=m9(i,a),m=Bz(t),x=t.get("barMinHeight")||0,_=h&&n.getDimensionIndex(h),b=n.getLayout("size"),S=n.getLayout("offset");return{progress:function(w,A){for(var D=w.count,M=m&&Hi(D*3),L=m&&s&&Hi(D*3),I=m&&Hi(D),N=r.master.getRect(),E=v?N.width:N.height,O,j=A.getStore(),B=0;(O=w.next())!=null;){var U=j.get(d?_:o,O),W=j.get(l,O),H=g,q=void 0;d&&(q=+U-j.get(o,O));var X=void 0,J=void 0,F=void 0,Y=void 0;if(v){var Z=r.dataToPoint([U,W]);if(d){var V=r.dataToPoint([q,W]);H=V[0]}X=H,J=Z[1]+S,F=Z[0]-H,Y=b,Math.abs(F)<x&&(F=(F<0?-1:1)*x)}else{var Z=r.dataToPoint([W,U]);if(d){var V=r.dataToPoint([W,q]);H=V[1]}X=Z[0]+S,J=H,F=b,Y=Z[1]-H,Math.abs(Y)<x&&(Y=(Y<=0?-1:1)*x)}m?(M[B]=X,M[B+1]=J,M[B+2]=v?F:Y,L&&(L[B]=v?N.x:X,L[B+1]=v?J:N.y,L[B+2]=E),I[O]=O):A.setItemLayout(O,{x:X,y:J,width:F,height:Y}),B+=3}m&&A.setLayout({largePoints:M,largeDataIndices:I,largeBackgroundPoints:L,valueAxisHorizontal:v})}}}}}}function zz(e){return e.coordinateSystem&&e.coordinateSystem.type==="cartesian2d"}function Bz(e){return e.pipelineContext&&e.pipelineContext.large}function m9(e,t){var n=t.model.get("startValue");return n||(n=0),t.toGlobalCoord(t.dataToCoord(t.type==="log"?n>0?n:1:n))}var y9=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},Nz=(function(e){ot(t,e);function t(n){var r=e.call(this,n)||this;return r.type="time",r}return t.prototype.getLabel=function(n){var r=this.getSetting("useUTC");return zg(n.value,qA[N8(Uf(this._minLevelUnit))]||qA.second,r,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(n,r,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return P8(n,r,i,o,a)},t.prototype.getTicks=function(n){var r=this._interval,i=this._extent,a=[];if(!r)return a;var o=this.getSetting("useUTC"),l=jp(i[1],o);a.push({value:i[0],time:{level:0,upperTimeUnit:l,lowerTimeUnit:l}});var s=M9(this._minLevelUnit,this._approxInterval,o,i,this._getExtentSpanWithBreaks(),this._brkCtx);a=a.concat(s);var c=jp(i[1],o);a.push({value:i[1],time:{level:0,upperTimeUnit:c,lowerTimeUnit:c}}),this.getSetting("useUTC");var h=Wl.length-1,d=0;return P(a,function(v){h=Math.min(h,Wt(Wl,v.time.upperTimeUnit)),d=Math.max(d,v.time.level)}),a},t.prototype.calcNiceExtent=function(n){var r=this.getExtent();if(r[0]===r[1]&&(r[0]-=qr,r[1]+=qr),r[1]===-1/0&&r[0]===1/0){var i=new Date;r[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),r[0]=r[1]-qr}this._innerSetExtent(r[0],r[1]),this.calcNiceTicks(n.splitNumber,n.minInterval,n.maxInterval)},t.prototype.calcNiceTicks=function(n,r,i){n=n||10;var a=this._getExtentSpanWithBreaks();this._approxInterval=a/n,r!=null&&this._approxInterval<r&&(this._approxInterval=r),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var o=Nv.length,l=Math.min(y9(Nv,this._approxInterval,0,o),o-1);this._interval=Nv[l][1],this._intervalPrecision=vh(this._interval),this._minLevelUnit=Nv[Math.max(l-1,0)][0]},t.prototype.parse=function(n){return ve(n)?n:+Yu(n)},t.prototype.contain=function(n){return vS(n,this._extent)},t.prototype.normalize=function(n){return this._calculator.normalize(n,this._extent)},t.prototype.scale=function(n){return this._calculator.scale(n,this._extent)},t.type="time",t})(zo),Nv=[["second",G_],["minute",U_],["hour",Gf],["quarter-day",Gf*6],["half-day",Gf*12],["day",qr*1.2],["half-week",qr*3.5],["week",qr*7],["month",qr*31],["quarter",qr*95],["half-year",WA/2],["year",WA]];function x9(e,t,n,r){return ob(new Date(t),e,r).getTime()===ob(new Date(n),e,r).getTime()}function b9(e,t){return e/=qr,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function _9(e){var t=30*qr;return e/=t,e>6?6:e>3?3:e>2?2:1}function S9(e){return e/=Gf,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function rk(e,t){return e/=t?U_:G_,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function w9(e){return lI(e)}function T9(e,t,n){var r=Math.max(0,Wt(Wl,t)-1);return ob(new Date(e),Wl[r],n).getTime()}function C9(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function M9(e,t,n,r,i,a){var o=1e4,l=I8,s=0;function c(B,U,W,H,q,X,J){for(var F=C9(q,B),Y=U,Z=new Date(Y);Y<W&&Y<=r[1]&&(J.push({value:Y}),!(s++>o));)if(Z[q](Z[H]()+B),Y=Z.getTime(),a){var V=a.calcNiceTickMultiple(Y,F);V>0&&(Z[q](Z[H]()+V*B),Y=Z.getTime())}J.push({value:Y,notAdd:!0})}function h(B,U,W){var H=[],q=!U.length;if(!x9(Uf(B),r[0],r[1],n)){q&&(U=[{value:T9(r[0],B,n)},{value:r[1]}]);for(var X=0;X<U.length-1;X++){var J=U[X].value,F=U[X+1].value;if(J!==F){var Y=void 0,Z=void 0,V=void 0,tt=!1;switch(B){case"year":Y=Math.max(1,Math.round(t/qr/365)),Z=iO(n),V=H8(n);break;case"half-year":case"quarter":case"month":Y=_9(t),Z=Y_(n),V=aO(n);break;case"week":case"half-week":case"day":Y=b9(t),Z=W_(n),V=oO(n),tt=!0;break;case"half-day":case"quarter-day":case"hour":Y=S9(t),Z=q_(n),V=lO(n);break;case"minute":Y=rk(t,!0),Z=X_(n),V=sO(n);break;case"second":Y=rk(t,!1),Z=Z_(n),V=uO(n);break;case"millisecond":Y=w9(t),Z=$_(n),V=cO(n);break}F>=r[0]&&J<=r[1]&&c(Y,J,F,Z,V,tt,H),B==="year"&&W.length>1&&X===0&&W.unshift({value:W[0].value-Y})}}for(var X=0;X<H.length;X++)W.push(H[X])}}for(var d=[],v=[],g=0,m=0,x=0;x<l.length;++x){var _=Uf(l[x]);if(B8(l[x])){h(l[x],d[d.length-1]||[],v);var b=l[x+1]?Uf(l[x+1]):null;if(_!==b){if(v.length){m=g,v.sort(function(B,U){return B.value-U.value});for(var S=[],w=0;w<v.length;++w){var A=v[w].value;(w===0||v[w-1].value!==A)&&(S.push(v[w]),A>=r[0]&&A<=r[1]&&g++)}var D=i/t;if(g>D*1.5&&m>D/1.5||(d.push(S),g>D||e===l[x]))break}v=[]}}}for(var M=Ze(bt(d,function(B){return Ze(B,function(U){return U.value>=r[0]&&U.value<=r[1]&&!U.notAdd})}),function(B){return B.length>0}),L=[],I=M.length-1,x=0;x<M.length;++x)for(var N=M[x],E=0;E<N.length;++E){var O=jp(N[E].value,n);L.push({value:N[E].value,time:{level:I-x,upperTimeUnit:O,lowerTimeUnit:O}})}L.sort(function(B,U){return B.value-U.value});for(var j=[],x=0;x<L.length;++x)(x===0||L[x].value!==L[x-1].value)&&j.push(L[x]);return j}Po.registerClass(Nz);var Ab=pn,A9=Math.floor,D9=Math.ceil,Pv=Math.pow,Hv=Math.log,Pz=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="log",n.base=10,n._originalScale=new zo,n}return t.prototype.getTicks=function(n){n=n||{};var r=this._extent.slice(),i=this._originalScale.getExtent(),a=e.prototype.getTicks.call(this,n),o=this.base;return this._originalScale._innerGetBreaks(),bt(a,function(l){var s=l.value,c=null,h=Pv(o,s);s===r[0]&&this._fixMin?c=i[0]:s===r[1]&&this._fixMax&&(c=i[1]);var d;return c!=null&&(h=T1(h,c)),{value:h,break:d}},this)},t.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},t.prototype.setExtent=function(n,r){this._originalScale.setExtent(n,r);var i=Cb(this.base,[n,r]);e.prototype.setExtent.call(this,i[0],i[1])},t.prototype.getExtent=function(){var n=this.base,r=e.prototype.getExtent.call(this);r[0]=Pv(n,r[0]),r[1]=Pv(n,r[1]);var i=this._originalScale.getExtent();return this._fixMin&&(r[0]=T1(r[0],i[0])),this._fixMax&&(r[1]=T1(r[1],i[1])),r},t.prototype.unionExtentFromData=function(n,r){this._originalScale.unionExtentFromData(n,r);var i=Cb(this.base,n.getApproximateExtent(r),!0);this._innerUnionExtent(i)},t.prototype.calcNiceTicks=function(n){n=n||10;var r=this._extent.slice(),i=this._getExtentSpanWithBreaks();if(!(!isFinite(i)||i<=0)){var a=G6(i),o=n/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var l=[Ab(D9(r[0]/a)*a),Ab(A9(r[1]/a)*a)];this._interval=a,this._intervalPrecision=vh(a),this._niceExtent=l}},t.prototype.calcNiceExtent=function(n){e.prototype.calcNiceExtent.call(this,n),this._fixMin=n.fixMin,this._fixMax=n.fixMax},t.prototype.contain=function(n){return n=Hv(n)/Hv(this.base),e.prototype.contain.call(this,n)},t.prototype.normalize=function(n){return n=Hv(n)/Hv(this.base),e.prototype.normalize.call(this,n)},t.prototype.scale=function(n){return n=e.prototype.scale.call(this,n),Pv(this.base,n)},t.prototype.setBreaksFromOption=function(n){},t.type="log",t})(zo);function T1(e,t){return Ab(e,wa(t))}Po.registerClass(Pz);var k9=(function(){function e(t,n,r){this._prepareParams(t,n,r)}return e.prototype._prepareParams=function(t,n,r){r[1]<r[0]&&(r=[NaN,NaN]),this._dataMin=r[0],this._dataMax=r[1];var i=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&n.getNeedCrossZero&&n.getNeedCrossZero();var a=n.get("min",!0);a==null&&(a=n.get("startValue",!0));var o=this._modelMinRaw=a;Rt(o)?this._modelMinNum=Vv(t,o({min:r[0],max:r[1]})):o!=="dataMin"&&(this._modelMinNum=Vv(t,o));var l=this._modelMaxRaw=n.get("max",!0);if(Rt(l)?this._modelMaxNum=Vv(t,l({min:r[0],max:r[1]})):l!=="dataMax"&&(this._modelMaxNum=Vv(t,l)),i)this._axisDataLen=n.getCategories().length;else{var s=n.get("boundaryGap"),c=mt(s)?s:[s||0,s||0];typeof c[0]=="boolean"||typeof c[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Fi(c[0],1),Fi(c[1],1)]}},e.prototype.calculate=function(){var t=this._isOrdinal,n=this._dataMin,r=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=t?null:r-n||Math.abs(n),l=this._modelMinRaw==="dataMin"?n:this._modelMinNum,s=this._modelMaxRaw==="dataMax"?r:this._modelMaxNum,c=l!=null,h=s!=null;l==null&&(l=t?i?0:NaN:n-a[0]*o),s==null&&(s=t?i?i-1:NaN:r+a[1]*o),(l==null||!isFinite(l))&&(l=NaN),(s==null||!isFinite(s))&&(s=NaN);var d=To(l)||To(s)||t&&!i;this._needCrossZero&&(l>0&&s>0&&!c&&(l=0),l<0&&s<0&&!h&&(s=0));var v=this._determinedMin,g=this._determinedMax;return v!=null&&(l=v,c=!0),g!=null&&(s=g,h=!0),{min:l,max:s,minFixed:c,maxFixed:h,isBlank:d}},e.prototype.modifyDataMinMax=function(t,n){this[E9[t]]=n},e.prototype.setDeterminedMinMax=function(t,n){var r=L9[t];this[r]=n},e.prototype.freeze=function(){this.frozen=!0},e})(),L9={min:"_determinedMin",max:"_determinedMax"},E9={min:"_dataMin",max:"_dataMax"};function Hz(e,t,n){var r=e.rawExtentInfo;return r||(r=new k9(e,t,n),e.rawExtentInfo=r,r)}function Vv(e,t){return t==null?null:To(t)?NaN:e.parse(t)}function Vz(e,t){var n=e.type,r=Hz(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var i=r.min,a=r.max,o=t.ecModel;if(o&&n==="time"){var l=Iz("bar",o),s=!1;if(P(l,function(d){s=s||d.getBaseAxis()===t.axis}),s){var c=Oz(l),h=R9(i,a,t,c);i=h.min,a=h.max}}return{extent:[i,a],fixMin:r.minFixed,fixMax:r.maxFixed}}function R9(e,t,n,r){var i=n.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=v9(r,n.axis);if(o===void 0)return{min:e,max:t};var l=1/0;P(o,function(g){l=Math.min(g.offset,l)});var s=-1/0;P(o,function(g){s=Math.max(g.offset+g.width,s)}),l=Math.abs(l),s=Math.abs(s);var c=l+s,h=t-e,d=1-(l+s)/a,v=h/d-h;return t+=v*(s/c),e-=v*(l/c),{min:e,max:t}}function ik(e,t){var n=t,r=Vz(e,n),i=r.extent,a=n.get("splitNumber");e instanceof Pz&&(e.base=n.get("logBase"));var o=e.type,l=n.get("interval"),s=o==="interval"||o==="time";e.setBreaksFromOption(Gz(n)),e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:a,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:s?n.get("minInterval"):null,maxInterval:s?n.get("maxInterval"):null}),l!=null&&e.setInterval&&e.setInterval(l)}function I9(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new Lz({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new Nz({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(Po.getClass(t)||zo)}}function O9(e){var t=e.scale.getExtent(),n=t[0],r=t[1];return!(n>0&&r>0||n<0&&r<0)}function Nh(e){var t=e.getLabelModel().get("formatter");if(e.type==="time"){var n=O8(t);return function(i,a){return e.scale.getFormattedLabel(i,a,n)}}else{if(St(t))return function(i){var a=e.scale.getLabel(i),o=t.replace("{value}",a??"");return o};if(Rt(t)){if(e.type==="category")return function(i,a){return t(Kp(e,i),i.value-e.scale.getExtent()[0],null)};var r=Vp();return function(i,a){var o=null;return r&&(o=r.makeAxisLabelFormatterParamBreak(o,i.break)),t(Kp(e,i),a,o)}}else return function(i){return e.scale.getLabel(i)}}}function Kp(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function gS(e){var t=e.get("interval");return t??"auto"}function jz(e){return e.type==="category"&&gS(e.getLabelModel())===0}function Fz(e,t){var n={};return P(e.mapDimensionsAll(t),function(r){n[t9(e,r)]=!0}),Be(n)}function z9(e,t,n){t&&P(Fz(t,n),function(r){var i=t.getApproximateExtent(r);i[0]<e[0]&&(e[0]=i[0]),i[1]>e[1]&&(e[1]=i[1])})}function Hu(e){return e==="middle"||e==="center"}function ph(e){return e.getShallow("show")}function Gz(e){var t=e.get("breaks",!0);t==null}var Uz=(function(){function e(){}return e.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},e.prototype.getCoordSysModel=function(){},e})(),ak=[],B9={registerPreprocessor:Sz,registerProcessor:wz,registerPostInit:EU,registerPostUpdate:RU,registerUpdateLifecycle:fS,registerAction:qi,registerCoordinateSystem:IU,registerLayout:OU,registerVisual:as,registerTransform:BU,registerLoading:Tz,registerMap:zU,registerImpl:fU,PRIORITY:TU,ComponentModel:he,ComponentView:zn,SeriesModel:Ke,ChartView:Ye,registerComponentModel:function(e){he.registerClass(e)},registerComponentView:function(e){zn.registerClass(e)},registerSeriesModel:function(e){Ke.registerClass(e)},registerChartView:function(e){Ye.registerClass(e)},registerCustomSeries:function(e,t){},registerSubTypeDefaulter:function(e,t){he.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){B6(e,t)}};function qn(e){if(mt(e)){P(e,function(t){qn(t)});return}Wt(ak,e)>=0||(ak.push(e),Rt(e)&&(e={install:e}),e.install(B9))}var N9=be(),qf=be(),bi={estimate:1,determine:2};function Jp(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function Yz(e,t){var n=bt(t,function(r){return e.scale.parse(r)});return e.type==="time"&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function P9(e,t){var n=e.getLabelModel().get("customValues");if(n){var r=Nh(e),i=e.scale.getExtent(),a=Yz(e,n),o=Ze(a,function(l){return l>=i[0]&&l<=i[1]});return{labels:bt(o,function(l){var s={value:l};return{formattedLabel:r(s),rawLabel:e.scale.getLabel(s),tickValue:l,time:void 0,break:void 0}})}}return e.type==="category"?V9(e,t):F9(e)}function H9(e,t,n){var r=e.getTickModel().get("customValues");if(r){var i=e.scale.getExtent(),a=Yz(e,r);return{ticks:Ze(a,function(o){return o>=i[0]&&o<=i[1]})}}return e.type==="category"?j9(e,t):{ticks:bt(e.scale.getTicks(n),function(o){return o.value})}}function V9(e,t){var n=e.getLabelModel(),r=Wz(e,n,t);return!n.get("show")||e.scale.isBlank()?{labels:[]}:r}function Wz(e,t,n){var r=U9(e),i=gS(t),a=n.kind===bi.estimate;if(!a){var o=Xz(r,i);if(o)return o}var l,s;Rt(i)?l=Qz(e,i):(s=i==="auto"?Y9(e,n):i,l=$z(e,s));var c={labels:l,labelCategoryInterval:s};return a?n.out.noPxChangeTryDetermine.push(function(){return Db(r,i,c),!0}):Db(r,i,c),c}function j9(e,t){var n=G9(e),r=gS(t),i=Xz(n,r);if(i)return i;var a,o;if((!t.get("show")||e.scale.isBlank())&&(a=[]),Rt(r))a=Qz(e,r,!0);else if(r==="auto"){var l=Wz(e,e.getLabelModel(),Jp(bi.determine));o=l.labelCategoryInterval,a=bt(l.labels,function(s){return s.tickValue})}else o=r,a=$z(e,o,!0);return Db(n,r,{ticks:a,tickCategoryInterval:o})}function F9(e){var t=e.scale.getTicks(),n=Nh(e);return{labels:bt(t,function(r,i){return{formattedLabel:n(r,i),rawLabel:e.scale.getLabel(r),tickValue:r.value,time:r.time,break:r.break}})}}var G9=qz("axisTick"),U9=qz("axisLabel");function qz(e){return function(n){return qf(n)[e]||(qf(n)[e]={list:[]})}}function Xz(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function Db(e,t,n){return e.list.push({key:t,value:n}),n}function Y9(e,t){if(t.kind===bi.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return qf(e).autoInterval=n,!0}),n}var r=qf(e).autoInterval;return r??(qf(e).autoInterval=e.calculateCategoryInterval(t))}function W9(e,t){var n=t.kind,r=X9(e),i=Nh(e),a=(r.axisRotate-r.labelRotate)/180*Math.PI,o=e.scale,l=o.getExtent(),s=o.count();if(l[1]-l[0]<1)return 0;var c=1,h=40;s>h&&(c=Math.max(1,Math.floor(s/h)));for(var d=l[0],v=e.dataToCoord(d+1)-e.dataToCoord(d),g=Math.abs(v*Math.cos(a)),m=Math.abs(v*Math.sin(a)),x=0,_=0;d<=l[1];d+=c){var b=0,S=0,w=S_(i({value:d}),r.font,"center","top");b=w.width*1.3,S=w.height*1.3,x=Math.max(x,b,7),_=Math.max(_,S,7)}var A=x/g,D=_/m;isNaN(A)&&(A=1/0),isNaN(D)&&(D=1/0);var M=Math.max(0,Math.floor(Math.min(A,D)));if(n===bi.estimate)return t.out.noPxChangeTryDetermine.push(Ct(q9,null,e,M,s)),M;var L=Zz(e,M,s);return L??M}function q9(e,t,n){return Zz(e,t,n)==null}function Zz(e,t,n){var r=N9(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function X9(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function $z(e,t,n){var r=Nh(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),l=[],s=Math.max((t||0)+1,1),c=a[0],h=i.count();c!==0&&s>1&&h/s>2&&(c=Math.round(Math.ceil(c/s)*s));var d=jz(e),v=o.get("showMinLabel")||d,g=o.get("showMaxLabel")||d;v&&c!==a[0]&&x(a[0]);for(var m=c;m<=a[1];m+=s)x(m);g&&m-s!==a[1]&&x(a[1]);function x(_){var b={value:_};l.push(n?_:{formattedLabel:r(b),rawLabel:i.getLabel(b),tickValue:_,time:void 0,break:void 0})}return l}function Qz(e,t,n){var r=e.scale,i=Nh(e),a=[];return P(r.getTicks(),function(o){var l=r.getLabel(o),s=o.value;t(o.value,l)&&a.push(n?s:{formattedLabel:i(o),rawLabel:l,tickValue:s,time:void 0,break:void 0})}),a}var ok=[0,1],Kz=(function(){function e(t,n,r){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=n,this._extent=r||[0,0]}return e.prototype.contain=function(t){var n=this._extent,r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return t>=r&&t<=i},e.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(t){return aI(t||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(t,n){var r=this._extent;r[0]=t,r[1]=n},e.prototype.dataToCoord=function(t,n){var r=this._extent,i=this.scale;return t=i.normalize(i.parse(t)),this.onBand&&i.type==="ordinal"&&(r=r.slice(),lk(r,i.count())),ue(t,ok,r,n)},e.prototype.coordToData=function(t,n){var r=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(r=r.slice(),lk(r,i.count()));var a=ue(t,r,ok,n);return this.scale.scale(a)},e.prototype.pointToData=function(t,n){},e.prototype.getTicksCoords=function(t){t=t||{};var n=t.tickModel||this.getTickModel(),r=H9(this,n,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),i=r.ticks,a=bt(i,function(l){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(l):l),tickValue:l}},this),o=n.get("alignWithLabel");return Z9(this,a,o,t.clamp),a},e.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),n=t.get("splitNumber");n>0&&n<100||(n=5);var r=this.scale.getMinorTicks(n),i=bt(r,function(a){return bt(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},e.prototype.getViewLabels=function(t){return t=t||Jp(bi.determine),P9(this,t).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var t=this._extent,n=this.scale.getExtent(),r=n[1]-n[0]+(this.onBand?1:0);r===0&&(r=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/r},e.prototype.calculateCategoryInterval=function(t){return t=t||Jp(bi.determine),W9(this,t)},e})();function lk(e,t){var n=e[1]-e[0],r=t,i=n/r/2;e[0]+=i,e[1]-=i}function Z9(e,t,n,r){var i=t.length;if(!e.onBand||n||!i)return;var a=e.getExtent(),o,l;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 s=t[i-1].tickValue-t[0].tickValue,c=(t[i-1].coord-t[0].coord)/s;P(t,function(g){g.coord-=c/2,g.onBand=!0});var h=e.scale.getExtent();l=1+h[1]-t[i-1].tickValue,o={coord:t[i-1].coord+c*l,tickValue:h[1]+1,onBand:!0},t.push(o)}var d=a[0]>a[1];v(t[0].coord,a[0])&&(r?t[0].coord=a[0]:t.shift()),r&&v(a[0],t[0].coord)&&t.unshift({coord:a[0],onBand:!0}),v(a[1],o.coord)&&(r?o.coord=a[1]:t.pop()),r&&v(o.coord,a[1])&&t.push({coord:a[1],onBand:!0});function v(g,m){return g=pn(g),m=pn(m),d?g>m:g<m}}function Jz(e,t,n,r,i,a,o,l){var s=i-e,c=a-t,h=n-e,d=r-t,v=Math.sqrt(h*h+d*d);h/=v,d/=v;var g=s*h+c*d,m=g/v;m*=v;var x=o[0]=e+m*h,_=o[1]=t+m*d;return Math.sqrt((x-i)*(x-i)+(_-a)*(_-a))}var bo=new Ft,Ue=new Ft,wn=new Ft,_o=new Ft,zi=new Ft,tg=[],jn=new Ft;function $9(e,t){if(t<=180&&t>0){t=t/180*Math.PI,bo.fromArray(e[0]),Ue.fromArray(e[1]),wn.fromArray(e[2]),Ft.sub(_o,bo,Ue),Ft.sub(zi,wn,Ue);var n=_o.len(),r=zi.len();if(!(n<.001||r<.001)){_o.scale(1/n),zi.scale(1/r);var i=_o.dot(zi),a=Math.cos(t);if(a<i){var o=Jz(Ue.x,Ue.y,wn.x,wn.y,bo.x,bo.y,tg);jn.fromArray(tg),jn.scaleAndAdd(zi,o/Math.tan(Math.PI-t));var l=wn.x!==Ue.x?(jn.x-Ue.x)/(wn.x-Ue.x):(jn.y-Ue.y)/(wn.y-Ue.y);if(isNaN(l))return;l<0?Ft.copy(jn,Ue):l>1&&Ft.copy(jn,wn),jn.toArray(e[1])}}}}function Q9(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,bo.fromArray(e[0]),Ue.fromArray(e[1]),wn.fromArray(e[2]),Ft.sub(_o,Ue,bo),Ft.sub(zi,wn,Ue);var r=_o.len(),i=zi.len();if(!(r<.001||i<.001)){_o.scale(1/r),zi.scale(1/i);var a=_o.dot(t),o=Math.cos(n);if(a<o){var l=Jz(Ue.x,Ue.y,wn.x,wn.y,bo.x,bo.y,tg);jn.fromArray(tg);var s=Math.PI/2,c=Math.acos(zi.dot(t)),h=s+c-n;if(h>=s)Ft.copy(jn,wn);else{jn.scaleAndAdd(zi,l/Math.tan(Math.PI/2-h));var d=wn.x!==Ue.x?(jn.x-Ue.x)/(wn.x-Ue.x):(jn.y-Ue.y)/(wn.y-Ue.y);if(isNaN(d))return;d<0?Ft.copy(jn,Ue):d>1&&Ft.copy(jn,wn)}jn.toArray(e[1])}}}}function C1(e,t,n,r){var i=n==="normal",a=i?e:e.ensureState(n);a.ignore=t;var o=r.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var l=r.getModel("lineStyle").getLineStyle();i?e.useStyle(l):a.style=l}function K9(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=Tx(r[0],r[1]),a=Tx(r[1],r[2]);if(!i||!a){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var o=Math.min(i,a)*n,l=m0([],r[1],r[0],o/i),s=m0([],r[1],r[2],o/a),c=m0([],l,s,.5);e.bezierCurveTo(l[0],l[1],l[0],l[1],c[0],c[1]),e.bezierCurveTo(s[0],s[1],s[0],s[1],r[2][0],r[2][1])}else for(var h=1;h<r.length;h++)e.lineTo(r[h][0],r[h][1])}function t5(e,t,n){var r=e.getTextGuideLine(),i=e.getTextContent();if(!i){r&&e.removeTextGuideLine();return}for(var a=t.normal,o=a.get("show"),l=i.ignore,s=0;s<ih.length;s++){var c=ih[s],h=t[c],d=c==="normal";if(h){var v=h.get("show"),g=d?l:zt(i.states[c]&&i.states[c].ignore,l);if(g||!zt(v,o)){var m=d?r:r&&r.states[c];m&&(m.ignore=!0),r&&C1(r,!0,c,h);continue}r||(r=new Wi,e.setTextGuideLine(r),!d&&(l||!o)&&C1(r,!0,"normal",t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),C1(r,!1,c,h)}}if(r){$t(r.style,n),r.style.fill=null;var x=a.get("showAbove"),_=e.textGuideLineConfig=e.textGuideLineConfig||{};_.showAbove=x||!1,r.buildPath=K9}}function e5(e,t){t=t||"labelLine";for(var n={normal:e.getModel(t)},r=0;r<Cr.length;r++){var i=Cr[r];n[i]=e.getModel([i,t])}return n}var sk=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],J9=1,eg=2,n5=J9|eg;function ng(e,t,n){n=n||n5,t?e.dirty|=n:e.dirty&=~n}function r5(e,t){return t=t||n5,e.dirty==null||!!(e.dirty&t)}function Bo(e){if(e)return r5(e)&&i5(e,e.label,e),e}function i5(e,t,n){var r=t.getComputedTransform();e.transform=H_(e.transform,r);var i=e.localRect=lh(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,l=n&&n.marginForce,s=n&&n.minMarginForce,c=n&&n.marginDefault,h=a.__marginType;h==null&&c&&(o=c,h=Cu.textMargin);for(var d=0;d<4;d++)M1[d]=h===Cu.minMargin&&s&&s[d]!=null?s[d]:l&&l[d]!=null?l[d]:o?o[d]:0;h===Cu.textMargin&&Pp(i,M1,!1,!1);var v=e.rect=lh(e.rect,i);return r&&v.applyTransform(r),h===Cu.minMargin&&Pp(v,M1,!1,!1),e.axisAligned=P_(r),(e.label=e.label||{}).ignore=t.ignore,ng(e,!1),ng(e,!0,eg),e}var M1=[0,0,0,0];function t7(e,t,n){return e.transform=H_(e.transform,n),e.localRect=lh(e.localRect,t),e.rect=lh(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=P_(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function e7(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function uk(e,t){for(var n=0;n<sk.length;n++){var r=sk[n];e[r]==null&&(e[r]=t[r])}return Bo(e)}function ck(e){var t=e.obb;return(!t||r5(e,eg))&&(e.obb=t=t||new FI,t.fromBoundingRect(e.localRect,e.transform),ng(e,!1,eg)),t}function n7(e,t,n,r,i){var a=e.length,o=po[t],l=Bu[t];if(a<2)return!1;e.sort(function(L,I){return L.rect[o]-I.rect[o]});for(var s=0,c,h=!1,d=0;d<a;d++){var v=e[d],g=v.rect;c=g[o]-s,c<0&&(g[o]-=c,v.label[o]-=c,h=!0),s=g[o]+g[l]}var m=e[0],x=e[a-1],_,b;S(),_<0&&D(-_,.8),b<0&&D(b,.8),S(),w(_,b,1),w(b,_,-1),S(),_<0&&M(-_),b<0&&M(b);function S(){_=m.rect[o]-n,b=r-x.rect[o]-x.rect[l]}function w(L,I,N){if(L<0){var E=Math.min(I,-L);if(E>0){A(E*N,0,a);var O=E+L;O<0&&D(-O*N,1)}else D(-L*N,1)}}function A(L,I,N){L!==0&&(h=!0);for(var E=I;E<N;E++){var O=e[E],j=O.rect;j[o]+=L,O.label[o]+=L}}function D(L,I){for(var N=[],E=0,O=1;O<a;O++){var j=e[O-1].rect,B=Math.max(e[O].rect[o]-j[o]-j[l],0);N.push(B),E+=B}if(E){var U=Math.min(Math.abs(L)/E,I);if(L>0)for(var O=0;O<a-1;O++){var W=N[O]*U;A(W,0,O+1)}else for(var O=a-1;O>0;O--){var W=N[O-1]*U;A(-W,O,a)}}}function M(L){var I=L<0?-1:1;L=Math.abs(L);for(var N=Math.ceil(L/(a-1)),E=0;E<a-1;E++)if(I>0?A(N,0,E+1):A(-N,a-E-1,a),L-=N,L<=0)return}return h}function r7(e){var t=[];e.sort(function(c,h){return(h.suggestIgnore?1:0)-(c.suggestIgnore?1:0)||h.priority-c.priority});function n(c){if(!c.ignore){var h=c.ensureState("emphasis");h.ignore==null&&(h.ignore=!1)}c.ignore=!0}for(var r=0;r<e.length;r++){var i=Bo(e[r]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,l=!1,s=0;s<t.length;s++)if(mS(i,t[s],null,{touchThreshold:.05})){l=!0;break}l?(n(a),o&&n(o)):t.push(i)}}}function mS(e,t,n,r){return!e||!t||e.label&&e.label.ignore||t.label&&t.label.ignore||!e.rect.intersect(t.rect,n,r)?!1:e.axisAligned&&t.axisAligned?!0:ck(e).intersect(ck(t),n,r)}var i7=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(n){return Qu(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(n){var r=new ie,i=Wn("line",0,n.itemHeight/2,n.itemWidth,0,n.lineStyle.stroke,!1);r.add(i),i.setStyle(n.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),l=a==="none"?"circle":a,s=n.itemHeight*.8,c=Wn(l,(n.itemWidth-s)/2,(n.itemHeight-s)/2,s,s,n.itemStyle.fill);r.add(c),c.setStyle(n.itemStyle);var h=n.iconRotate==="inherit"?o:n.iconRotate||0;return c.rotation=h*Math.PI/180,c.setOrigin([n.itemWidth/2,n.itemHeight/2]),l.indexOf("empty")>-1&&(c.style.stroke=c.style.fill,c.style.fill=lt.color.neutral00,c.style.lineWidth=2),r},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})(Ke);function yS(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(r===1){var i=Nu(e,t,n[0]);return i!=null?i+"":null}else if(r){for(var a=[],o=0;o<n.length;o++)a.push(Nu(e,t,n[o]));return a.join(" ")}}function a5(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!mt(t))return t+"";for(var r=[],i=0;i<n.length;i++){var a=e.getDimensionIndex(n[i]);a>=0&&r.push(t[a])}return r.join(" ")}var xS=(function(e){ot(t,e);function t(n,r,i,a){var o=e.call(this)||this;return o.updateData(n,r,i,a),o}return t.prototype._createSymbol=function(n,r,i,a,o,l){this.removeAll();var s=Wn(n,-1,-1,2,2,null,l);s.attr({z2:zt(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=a7,this._symbolType=n,this.add(s)},t.prototype.stopSymbolAnimation=function(n){this.childAt(0).stopAnimation(null,n)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Ql(this.childAt(0))},t.prototype.downplay=function(){Kl(this.childAt(0))},t.prototype.setZ=function(n,r){var i=this.childAt(0);i.zlevel=n,i.z=r},t.prototype.setDraggable=function(n,r){var i=this.childAt(0);i.draggable=n,i.cursor=!r&&n?"move":i.cursor},t.prototype.updateData=function(n,r,i,a){this.silent=!1;var o=n.getItemVisual(r,"symbol")||"circle",l=n.hostModel,s=t.getSymbolSize(n,r),c=t.getSymbolZ2(n,r),h=o!==this._symbolType,d=a&&a.disableAnimation;if(h){var v=n.getItemVisual(r,"symbolKeepAspect");this._createSymbol(o,n,r,s,c,v)}else{var g=this.childAt(0);g.silent=!1;var m={scaleX:s[0]/2,scaleY:s[1]/2};d?g.attr(m):Ve(g,m,l,r),Da(g)}if(this._updateCommon(n,r,s,i,a),h){var g=this.childAt(0);if(!d){var m={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:g.style.opacity}};g.scaleX=g.scaleY=0,g.style.opacity=0,Qe(g,m,l,r)}}d&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(n,r,i,a,o){var l=this.childAt(0),s=n.hostModel,c,h,d,v,g,m,x,_,b;if(a&&(c=a.emphasisItemStyle,h=a.blurItemStyle,d=a.selectItemStyle,v=a.focus,g=a.blurScope,x=a.labelStatesModels,_=a.hoverScale,b=a.cursorStyle,m=a.emphasisDisabled),!a||n.hasItemOption){var S=a&&a.itemModel?a.itemModel:n.getItemModel(r),w=S.getModel("emphasis");c=w.getModel("itemStyle").getItemStyle(),d=S.getModel(["select","itemStyle"]).getItemStyle(),h=S.getModel(["blur","itemStyle"]).getItemStyle(),v=w.get("focus"),g=w.get("blurScope"),m=w.get("disabled"),x=Qr(S),_=w.getShallow("scale"),b=S.getShallow("cursor")}var A=n.getItemVisual(r,"symbolRotate");l.attr("rotation",(A||0)*Math.PI/180||0);var D=nz(n.getItemVisual(r,"symbolOffset"),i);D&&(l.x=D[0],l.y=D[1]),b&&l.attr("cursor",b);var M=n.getItemVisual(r,"style"),L=M.fill;if(l instanceof Jr){var I=l.style;l.useStyle(dt({image:I.image,x:I.x,y:I.y,width:I.width,height:I.height},M))}else l.__isEmptyBrush?l.useStyle(dt({},M)):l.useStyle(M),l.style.decal=null,l.setColor(L,o&&o.symbolInnerColor),l.style.strokeNoScale=!0;var N=n.getItemVisual(r,"liftZ"),E=this._z2;N!=null?E==null&&(this._z2=l.z2,l.z2+=N):E!=null&&(l.z2=E,this._z2=null);var O=o&&o.useNameLabel;xi(l,x,{labelFetcher:s,labelDataIndex:r,defaultText:j,inheritColor:L,defaultOpacity:M.opacity});function j(W){return O?n.getName(W):yS(n,W)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var B=l.ensureState("emphasis");B.style=c,l.ensureState("select").style=d,l.ensureState("blur").style=h;var U=_==null||_===!0?Math.max(1.1,3/this._sizeY):isFinite(_)&&_>0?+_:1;B.scaleX=this._sizeX*U,B.scaleY=this._sizeY*U,this.setSymbolScale(1),In(this,v,g,m)},t.prototype.setSymbolScale=function(n){this.scaleX=this.scaleY=n},t.prototype.fadeOut=function(n,r,i){var a=this.childAt(0),o=Zt(this).dataIndex,l=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var s=a.getTextContent();s&&Np(s,{style:{opacity:0}},r,{dataIndex:o,removeOpt:l,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Np(a,{style:{opacity:0},scaleX:0,scaleY:0},r,{dataIndex:o,cb:n,removeOpt:l})},t.getSymbolSize=function(n,r){return ez(n.getItemVisual(r,"symbolSize"))},t.getSymbolZ2=function(n,r){return n.getItemVisual(r,"z2")},t})(ie);function a7(e,t){this.parent.drift(e,t)}function A1(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,"symbol")!=="none"}function fk(e){return e!=null&&!Lt(e)&&(e={isIgnore:e}),e||{}}function hk(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:Qr(t),cursorStyle:t.get("cursor")}}var o5=(function(){function e(t){this.group=new ie,this._SymbolCtor=t||xS}return e.prototype.updateData=function(t,n){this._progressiveEls=null,n=fk(n);var r=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,l=n.disableAnimation,s=hk(t),c={disableAnimation:l},h=n.getSymbolPoint||function(d){return t.getItemLayout(d)};a||r.removeAll(),t.diff(a).add(function(d){var v=h(d);if(A1(t,v,d,n)){var g=new o(t,d,s,c);g.setPosition(v),t.setItemGraphicEl(d,g),r.add(g)}}).update(function(d,v){var g=a.getItemGraphicEl(v),m=h(d);if(!A1(t,m,d,n)){r.remove(g);return}var x=t.getItemVisual(d,"symbol")||"circle",_=g&&g.getSymbolType&&g.getSymbolType();if(!g||_&&_!==x)r.remove(g),g=new o(t,d,s,c),g.setPosition(m);else{g.updateData(t,d,s,c);var b={x:m[0],y:m[1]};l?g.attr(b):Ve(g,b,i)}r.add(g),t.setItemGraphicEl(d,g)}).remove(function(d){var v=a.getItemGraphicEl(d);v&&v.fadeOut(function(){r.remove(v)},i)}).execute(),this._getSymbolPoint=h,this._data=t},e.prototype.updateLayout=function(){var t=this,n=this._data;n&&n.eachItemGraphicEl(function(r,i){var a=t._getSymbolPoint(i);r.setPosition(a),r.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=hk(t),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,n,r){this._progressiveEls=[],r=fk(r);function i(s){s.isGroup||(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var o=n.getItemLayout(a);if(A1(n,o,a,r)){var l=new this._SymbolCtor(n,a,this._seriesScope);l.traverse(i),l.setPosition(o),this.group.add(l),n.setItemGraphicEl(a,l),this._progressiveEls.push(l)}}},e.prototype.eachRendered=function(t){Xu(this._progressiveEls||this.group,t)},e.prototype.remove=function(t){var n=this.group,r=this._data;r&&t?r.eachItemGraphicEl(function(i){i.fadeOut(function(){n.remove(i)},r.hostModel)}):n.removeAll()},e})();function l5(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=o7(i,n),o=r.dim,l=i.dim,s=t.mapDimension(l),c=t.mapDimension(o),h=l==="x"||l==="radius"?1:0,d=bt(e.dimensions,function(m){return t.mapDimension(m)}),v=!1,g=t.getCalculationInfo("stackResultDimension");return Pu(t,d[0])&&(v=!0,d[0]=g),Pu(t,d[1])&&(v=!0,d[1]=g),{dataDimsForPoint:d,valueStart:a,valueAxisDim:l,baseAxisDim:o,stacked:!!v,valueDim:s,baseDim:c,baseDataOffset:h,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function o7(e,t){var n=0,r=e.scale.getExtent();return t==="start"?n=r[0]:t==="end"?n=r[1]:ve(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]),n}function s5(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function l7(e,t){var n=[];return t.diff(e).add(function(r){n.push({cmd:"+",idx:r})}).update(function(r,i){n.push({cmd:"=",idx:i,idx1:r})}).remove(function(r){n.push({cmd:"-",idx:r})}).execute(),n}function s7(e,t,n,r,i,a,o,l){for(var s=l7(e,t),c=[],h=[],d=[],v=[],g=[],m=[],x=[],_=l5(i,t,o),b=e.getLayout("points")||[],S=t.getLayout("points")||[],w=0;w<s.length;w++){var A=s[w],D=!0,M=void 0,L=void 0;switch(A.cmd){case"=":M=A.idx*2,L=A.idx1*2;var I=b[M],N=b[M+1],E=S[L],O=S[L+1];(isNaN(I)||isNaN(N))&&(I=E,N=O),c.push(I,N),h.push(E,O),d.push(n[M],n[M+1]),v.push(r[L],r[L+1]),x.push(t.getRawIndex(A.idx1));break;case"+":var j=A.idx,B=_.dataDimsForPoint,U=i.dataToPoint([t.get(B[0],j),t.get(B[1],j)]);L=j*2,c.push(U[0],U[1]),h.push(S[L],S[L+1]);var W=s5(_,i,t,j);d.push(W[0],W[1]),v.push(r[L],r[L+1]),x.push(t.getRawIndex(j));break;case"-":D=!1}D&&(g.push(A),m.push(m.length))}m.sort(function(ut,gt){return x[ut]-x[gt]});for(var H=c.length,q=Hi(H),X=Hi(H),J=Hi(H),F=Hi(H),Y=[],w=0;w<m.length;w++){var Z=m[w],V=w*2,tt=Z*2;q[V]=c[tt],q[V+1]=c[tt+1],X[V]=h[tt],X[V+1]=h[tt+1],J[V]=d[tt],J[V+1]=d[tt+1],F[V]=v[tt],F[V+1]=v[tt+1],Y[w]=g[Z]}return{current:q,next:X,stackedOnCurrent:J,stackedOnNext:F,status:Y}}var so=Math.min,uo=Math.max;function Xl(e,t){return isNaN(e)||isNaN(t)}function kb(e,t,n,r,i,a,o,l,s){for(var c,h,d,v,g,m,x=n,_=0;_<r;_++){var b=t[x*2],S=t[x*2+1];if(x>=i||x<0)break;if(Xl(b,S)){if(s){x+=a;continue}break}if(x===n)e[a>0?"moveTo":"lineTo"](b,S),d=b,v=S;else{var w=b-c,A=S-h;if(w*w+A*A<.5){x+=a;continue}if(o>0){for(var D=x+a,M=t[D*2],L=t[D*2+1];M===b&&L===S&&_<r;)_++,D+=a,x+=a,M=t[D*2],L=t[D*2+1],b=t[x*2],S=t[x*2+1],w=b-c,A=S-h;var I=_+1;if(s)for(;Xl(M,L)&&I<r;)I++,D+=a,M=t[D*2],L=t[D*2+1];var N=.5,E=0,O=0,j=void 0,B=void 0;if(I>=r||Xl(M,L))g=b,m=S;else{E=M-c,O=L-h;var U=b-c,W=M-b,H=S-h,q=L-S,X=void 0,J=void 0;if(l==="x"){X=Math.abs(U),J=Math.abs(W);var F=E>0?1:-1;g=b-F*X*o,m=S,j=b+F*J*o,B=S}else if(l==="y"){X=Math.abs(H),J=Math.abs(q);var Y=O>0?1:-1;g=b,m=S-Y*X*o,j=b,B=S+Y*J*o}else X=Math.sqrt(U*U+H*H),J=Math.sqrt(W*W+q*q),N=J/(J+X),g=b-E*o*(1-N),m=S-O*o*(1-N),j=b+E*o*N,B=S+O*o*N,j=so(j,uo(M,b)),B=so(B,uo(L,S)),j=uo(j,so(M,b)),B=uo(B,so(L,S)),E=j-b,O=B-S,g=b-E*X/J,m=S-O*X/J,g=so(g,uo(c,b)),m=so(m,uo(h,S)),g=uo(g,so(c,b)),m=uo(m,so(h,S)),E=b-g,O=S-m,j=b+E*J/X,B=S+O*J/X}e.bezierCurveTo(d,v,g,m,b,S),d=j,v=B}else e.lineTo(b,S)}c=b,h=S,x+=a}return _}var u5=(function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e})(),u7=(function(e){ot(t,e);function t(n){var r=e.call(this,n)||this;return r.type="ec-polyline",r}return t.prototype.getDefaultStyle=function(){return{stroke:lt.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new u5},t.prototype.buildPath=function(n,r){var i=r.points,a=0,o=i.length/2;if(r.connectNulls){for(;o>0&&Xl(i[o*2-2],i[o*2-1]);o--);for(;a<o&&Xl(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=kb(n,i,a,o,o,1,r.smooth,r.smoothMonotone,r.connectNulls)+1},t.prototype.getPointOn=function(n,r){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=$l.CMD,l,s,c=r==="x",h=[],d=0;d<a.length;){var v=a[d++],g=void 0,m=void 0,x=void 0,_=void 0,b=void 0,S=void 0,w=void 0;switch(v){case o.M:l=a[d++],s=a[d++];break;case o.L:if(g=a[d++],m=a[d++],w=c?(n-l)/(g-l):(n-s)/(m-s),w<=1&&w>=0){var A=c?(m-s)*w+s:(g-l)*w+l;return c?[n,A]:[A,n]}l=g,s=m;break;case o.C:g=a[d++],m=a[d++],x=a[d++],_=a[d++],b=a[d++],S=a[d++];var D=c?Cp(l,g,x,b,n,h):Cp(s,m,_,S,n,h);if(D>0)for(var M=0;M<D;M++){var L=h[M];if(L<=1&&L>=0){var A=c?Tn(s,m,_,S,L):Tn(l,g,x,b,L);return c?[n,A]:[A,n]}}l=b,s=S;break}}},t})(ce),c7=(function(e){ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(u5),f7=(function(e){ot(t,e);function t(n){var r=e.call(this,n)||this;return r.type="ec-polygon",r}return t.prototype.getDefaultShape=function(){return new c7},t.prototype.buildPath=function(n,r){var i=r.points,a=r.stackedOnPoints,o=0,l=i.length/2,s=r.smoothMonotone;if(r.connectNulls){for(;l>0&&Xl(i[l*2-2],i[l*2-1]);l--);for(;o<l&&Xl(i[o*2],i[o*2+1]);o++);}for(;o<l;){var c=kb(n,i,o,l,l,1,r.smooth,s,r.connectNulls);kb(n,a,o+c-1,c,l,-1,r.stackedOnSmooth,s,r.connectNulls),o+=c+1,n.closePath()}},t})(ce);function c5(e,t,n,r,i){var a=e.getArea(),o=a.x,l=a.y,s=a.width,c=a.height,h=n.get(["lineStyle","width"])||0;o-=h/2,l-=h/2,s+=h,c+=h,s=Math.ceil(s),o!==Math.floor(o)&&(o=Math.floor(o),s++);var d=new le({shape:{x:o,y:l,width:s,height:c}});if(t){var v=e.getBaseAxis(),g=v.isHorizontal(),m=v.inverse;g?(m&&(d.shape.x+=s),d.shape.width=0):(m||(d.shape.y+=c),d.shape.height=0);var x=Rt(i)?function(_){i(_,d)}:null;Qe(d,{shape:{width:s,height:c,x:o,y:l}},n,null,r,x)}return d}function f5(e,t,n){var r=e.getArea(),i=pn(r.r0,1),a=pn(r.r,1),o=new yi({shape:{cx:pn(e.cx,1),cy:pn(e.cy,1),r0:i,r:a,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});if(t){var l=e.getBaseAxis().dim==="angle";l?o.shape.endAngle=r.startAngle:o.shape.r=i,Qe(o,{shape:{endAngle:r.endAngle,r:a}},n)}return o}function h5(e,t,n,r,i){if(e){if(e.type==="polar")return f5(e,t,n);if(e.type==="cartesian2d")return c5(e,t,n,r,i)}else return null;return null}function gh(e,t){return e.type===t}function dk(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function vk(e){for(var t=1/0,n=1/0,r=-1/0,i=-1/0,a=0;a<e.length;){var o=e[a++],l=e[a++];isNaN(o)||(t=Math.min(o,t),r=Math.max(o,r)),isNaN(l)||(n=Math.min(l,n),i=Math.max(l,i))}return[[t,n],[r,i]]}function pk(e,t){var n=vk(e),r=n[0],i=n[1],a=vk(t),o=a[0],l=a[1];return Math.max(Math.abs(r[0]-o[0]),Math.abs(r[1]-o[1]),Math.abs(i[0]-l[0]),Math.abs(i[1]-l[1]))}function gk(e){return ve(e)?e:e?.5:0}function h7(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),i=Hi(r*2),a=0;a<r;a++){var o=s5(n,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function co(e,t,n,r,i){var a=n.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,l=[],s=0,c=[],h=[],d=[],v=[];if(i){for(s=0;s<e.length;s+=2){var g=t||e;!isNaN(g[s])&&!isNaN(g[s+1])&&v.push(e[s],e[s+1])}e=v}for(s=0;s<e.length-2;s+=2)switch(d[0]=e[s+2],d[1]=e[s+3],h[0]=e[s],h[1]=e[s+1],l.push(h[0],h[1]),r){case"end":c[o]=d[o],c[1-o]=h[1-o],l.push(c[0],c[1]);break;case"middle":var m=(h[o]+d[o])/2,x=[];c[o]=x[o]=m,c[1-o]=h[1-o],x[1-o]=d[1-o],l.push(c[0],c[1]),l.push(x[0],x[1]);break;default:c[o]=h[o],c[1-o]=d[1-o],l.push(c[0],c[1])}return l.push(e[s++],e[s++]),l}function d7(e,t){var n=[],r=e.length,i,a;function o(h,d,v){var g=h.coord,m=(v-g)/(d.coord-g),x=u6(m,[h.color,d.color]);return{coord:v,color:x}}for(var l=0;l<r;l++){var s=e[l],c=s.coord;if(c<0)i=s;else if(c>t){a?n.push(o(a,s,t)):i&&n.push(o(i,s,0),o(i,s,t));break}else i&&(n.push(o(i,s,0)),i=null),n.push(s),a=s}return n}function v7(e,t,n){var r=e.getVisual("visualMeta");if(!(!r||!r.length||!e.count())&&t.type==="cartesian2d"){for(var i,a,o=r.length-1;o>=0;o--){var l=e.getDimensionInfo(r[o].dimension);if(i=l&&l.coordDim,i==="x"||i==="y"){a=r[o];break}}if(a){var s=t.getAxis(i),c=bt(a.stops,function(w){return{coord:s.toGlobalCoord(s.dataToCoord(w.value)),color:w.color}}),h=c.length,d=a.outerColors.slice();h&&c[0].coord>c[h-1].coord&&(c.reverse(),d.reverse());var v=d7(c,i==="x"?n.getWidth():n.getHeight()),g=v.length;if(!g&&h)return c[0].coord<0?d[1]?d[1]:c[h-1].color:d[0]?d[0]:c[0].color;var m=10,x=v[0].coord-m,_=v[g-1].coord+m,b=_-x;if(b<.001)return"transparent";P(v,function(w){w.offset=(w.coord-x)/b}),v.push({offset:g?v[g-1].offset:.5,color:d[1]||"transparent"}),v.unshift({offset:g?v[0].offset:.5,color:d[0]||"transparent"});var S=new Eg(0,0,0,0,v,!0);return S[i]=x,S[i+"2"]=_,S}}}function p7(e,t,n){var r=e.get("showAllSymbol"),i=r==="auto";if(!(r&&!i)){var a=n.getAxesByScale("ordinal")[0];if(a&&!(i&&g7(a,t))){var o=t.mapDimension(a.dim),l={};return P(a.getViewLabels(),function(s){var c=a.scale.getRawOrdinalNumber(s.tickValue);l[c]=1}),function(s){return!l.hasOwnProperty(t.get(o,s))}}}}function g7(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(xS.getSymbolSize(t,o)[e.isHorizontal()?1:0]*1.5>r)return!1;return!0}function m7(e,t){return isNaN(e)||isNaN(t)}function y7(e){for(var t=e.length/2;t>0&&m7(e[t*2-2],e[t*2-1]);t--);return t-1}function mk(e,t){return[e[t*2],e[t*2+1]]}function x7(e,t,n){for(var r=e.length/2,i=n==="x"?0:1,a,o,l=0,s=-1,c=0;c<r;c++)if(o=e[c*2+i],!(isNaN(o)||isNaN(e[c*2+1-i]))){if(c===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){s=c;break}l=c,a=o}return{range:[l,s],t:(t-a)/(o-a)}}function d5(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<Cr.length;t++)if(e.get([Cr[t],"endLabel","show"]))return!0;return!1}function D1(e,t,n,r){if(gh(t,"cartesian2d")){var i=r.getModel("endLabel"),a=i.get("valueAnimation"),o=r.getData(),l={lastFrameIndex:0},s=d5(r)?function(g,m){e._endLabelOnDuring(g,m,o,l,a,i,t)}:null,c=t.getBaseAxis().isHorizontal(),h=c5(t,n,r,function(){var g=e._endLabel;g&&n&&l.originalX!=null&&g.attr({x:l.originalX,y:l.originalY})},s);if(!r.get("clip",!0)){var d=h.shape,v=Math.max(d.width,d.height);c?(d.y-=v,d.height+=v*2):(d.x-=v,d.width+=v*2)}return s&&s(1,h),h}else return f5(t,n,r)}function b7(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,a=r?i?"right":"left":"center",o=r?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||a,verticalAlign:e.get("verticalAlign")||o}}}var _7=(function(e){ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var n=new ie,r=new o5;this.group.add(r.group),this._symbolDraw=r,this._lineGroup=n,this._changePolyState=Ct(this._changePolyState,this)},t.prototype.render=function(n,r,i){var a=n.coordinateSystem,o=this.group,l=n.getData(),s=n.getModel("lineStyle"),c=n.getModel("areaStyle"),h=l.getLayout("points")||[],d=a.type==="polar",v=this._coordSys,g=this._symbolDraw,m=this._polyline,x=this._polygon,_=this._lineGroup,b=!r.ssr&&n.get("animation"),S=!c.isEmpty(),w=c.get("origin"),A=l5(a,l,w),D=S&&h7(a,l,A),M=n.get("showSymbol"),L=n.get("connectNulls"),I=M&&!d&&p7(n,l,a),N=this._data;N&&N.eachItemGraphicEl(function(ut,gt){ut.__temp&&(o.remove(ut),N.setItemGraphicEl(gt,null))}),M||g.remove(),o.add(_);var E=d?!1:n.get("step"),O;a&&a.getArea&&n.get("clip",!0)&&(O=a.getArea(),O.width!=null?(O.x-=.1,O.y-=.1,O.width+=.2,O.height+=.2):O.r0&&(O.r0-=.5,O.r+=.5)),this._clipShapeForSymbol=O;var j=v7(l,a,i)||l.getVisual("style")[l.getVisual("drawType")];if(!(m&&v.type===a.type&&E===this._step))M&&g.updateData(l,{isIgnore:I,clipShape:O,disableAnimation:!0,getSymbolPoint:function(ut){return[h[ut*2],h[ut*2+1]]}}),b&&this._initSymbolLabelAnimation(l,a,O),E&&(D&&(D=co(D,h,a,E,L)),h=co(h,null,a,E,L)),m=this._newPolyline(h),S?x=this._newPolygon(h,D):x&&(_.remove(x),x=this._polygon=null),d||this._initOrUpdateEndLabel(n,a,Jl(j)),_.setClipPath(D1(this,a,!0,n));else{S&&!x?x=this._newPolygon(h,D):x&&!S&&(_.remove(x),x=this._polygon=null),d||this._initOrUpdateEndLabel(n,a,Jl(j));var B=_.getClipPath();if(B){var U=D1(this,a,!1,n);Qe(B,{shape:U.shape},n)}else _.setClipPath(D1(this,a,!0,n));M&&g.updateData(l,{isIgnore:I,clipShape:O,disableAnimation:!0,getSymbolPoint:function(ut){return[h[ut*2],h[ut*2+1]]}}),(!dk(this._stackedOnPoints,D)||!dk(this._points,h))&&(b?this._doUpdateAnimation(l,D,a,i,E,w,L):(E&&(D&&(D=co(D,h,a,E,L)),h=co(h,null,a,E,L)),m.setShape({points:h}),x&&x.setShape({points:h,stackedOnPoints:D})))}var W=n.getModel("emphasis"),H=W.get("focus"),q=W.get("blurScope"),X=W.get("disabled");if(m.useStyle($t(s.getLineStyle(),{fill:"none",stroke:j,lineJoin:"bevel"})),Mr(m,n,"lineStyle"),m.style.lineWidth>0&&n.get(["emphasis","lineStyle","width"])==="bolder"){var J=m.getState("emphasis").style;J.lineWidth=+m.style.lineWidth+1}Zt(m).seriesIndex=n.seriesIndex,In(m,H,q,X);var F=gk(n.get("smooth")),Y=n.get("smoothMonotone");if(m.setShape({smooth:F,smoothMonotone:Y,connectNulls:L}),x){var Z=l.getCalculationInfo("stackedOnSeries"),V=0;x.useStyle($t(c.getAreaStyle(),{fill:j,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),Z&&(V=gk(Z.get("smooth"))),x.setShape({smooth:F,stackedOnSmooth:V,smoothMonotone:Y,connectNulls:L}),Mr(x,n,"areaStyle"),Zt(x).seriesIndex=n.seriesIndex,In(x,H,q,X)}var tt=this._changePolyState;l.eachItemGraphicEl(function(ut){ut&&(ut.onHoverStateChange=tt)}),this._polyline.onHoverStateChange=tt,this._data=l,this._coordSys=a,this._stackedOnPoints=D,this._points=h,this._step=E,this._valueOrigin=w,n.get("triggerLineEvent")&&(this.packEventData(n,m),x&&this.packEventData(n,x))},t.prototype.packEventData=function(n,r){Zt(r).eventData={componentType:"series",componentSubType:"line",componentIndex:n.componentIndex,seriesIndex:n.seriesIndex,seriesName:n.name,seriesType:"line"}},t.prototype.highlight=function(n,r,i,a){var o=n.getData(),l=Zl(o,a);if(this._changePolyState("emphasis"),!(l instanceof Array)&&l!=null&&l>=0){var s=o.getLayout("points"),c=o.getItemGraphicEl(l);if(!c){var h=s[l*2],d=s[l*2+1];if(isNaN(h)||isNaN(d)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(h,d))return;var v=n.get("zlevel")||0,g=n.get("z")||0;c=new xS(o,l),c.x=h,c.y=d,c.setZ(v,g);var m=c.getSymbolPath().getTextContent();m&&(m.zlevel=v,m.z=g,m.z2=this._polyline.z2+1),c.__temp=!0,o.setItemGraphicEl(l,c),c.stopSymbolAnimation(!0),this.group.add(c)}c.highlight()}else Ye.prototype.highlight.call(this,n,r,i,a)},t.prototype.downplay=function(n,r,i,a){var o=n.getData(),l=Zl(o,a);if(this._changePolyState("normal"),l!=null&&l>=0){var s=o.getItemGraphicEl(l);s&&(s.__temp?(o.setItemGraphicEl(l,null),this.group.remove(s)):s.downplay())}else Ye.prototype.downplay.call(this,n,r,i,a)},t.prototype._changePolyState=function(n){var r=this._polygon;MA(this._polyline,n),r&&MA(r,n)},t.prototype._newPolyline=function(n){var r=this._polyline;return r&&this._lineGroup.remove(r),r=new u7({shape:{points:n},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(r),this._polyline=r,r},t.prototype._newPolygon=function(n,r){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new f7({shape:{points:n,stackedOnPoints:r},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(n,r,i){var a,o,l=r.getBaseAxis(),s=l.inverse;r.type==="cartesian2d"?(a=l.isHorizontal(),o=!1):r.type==="polar"&&(a=l.dim==="angle",o=!0);var c=n.hostModel,h=c.get("animationDuration");Rt(h)&&(h=h(null));var d=c.get("animationDelay")||0,v=Rt(d)?d(null):d;n.eachItemGraphicEl(function(g,m){var x=g;if(x){var _=[g.x,g.y],b=void 0,S=void 0,w=void 0;if(i)if(o){var A=i,D=r.pointToCoord(_);a?(b=A.startAngle,S=A.endAngle,w=-D[1]/180*Math.PI):(b=A.r0,S=A.r,w=D[0])}else{var M=i;a?(b=M.x,S=M.x+M.width,w=g.x):(b=M.y+M.height,S=M.y,w=g.y)}var L=S===b?0:(w-b)/(S-b);s&&(L=1-L);var I=Rt(d)?d(m):h*L+v,N=x.getSymbolPath(),E=N.getTextContent();x.attr({scaleX:0,scaleY:0}),x.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:I}),E&&E.animateFrom({style:{opacity:0}},{duration:300,delay:I}),N.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(n,r,i){var a=n.getModel("endLabel");if(d5(n)){var o=n.getData(),l=this._polyline,s=o.getLayout("points");if(!s){l.removeTextContent(),this._endLabel=null;return}var c=this._endLabel;c||(c=this._endLabel=new me({z2:200}),c.ignoreClip=!0,l.setTextContent(this._endLabel),l.disableLabelAnimation=!0);var h=y7(s);h>=0&&(xi(l,Qr(n,"endLabel"),{inheritColor:i,labelFetcher:n,labelDataIndex:h,defaultText:function(d,v,g){return g!=null?a5(o,g):yS(o,d)},enableTextSetter:!0},b7(a,r)),l.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(n,r,i,a,o,l,s){var c=this._endLabel,h=this._polyline;if(c){n<1&&a.originalX==null&&(a.originalX=c.x,a.originalY=c.y);var d=i.getLayout("points"),v=i.hostModel,g=v.get("connectNulls"),m=l.get("precision"),x=l.get("distance")||0,_=s.getBaseAxis(),b=_.isHorizontal(),S=_.inverse,w=r.shape,A=S?b?w.x:w.y+w.height:b?w.x+w.width:w.y,D=(b?x:0)*(S?-1:1),M=(b?0:-x)*(S?-1:1),L=b?"x":"y",I=x7(d,A,L),N=I.range,E=N[1]-N[0],O=void 0;if(E>=1){if(E>1&&!g){var j=mk(d,N[0]);c.attr({x:j[0]+D,y:j[1]+M}),o&&(O=v.getRawValue(N[0]))}else{var j=h.getPointOn(A,L);j&&c.attr({x:j[0]+D,y:j[1]+M});var B=v.getRawValue(N[0]),U=v.getRawValue(N[1]);o&&(O=pI(i,m,B,U,I.t))}a.lastFrameIndex=N[0]}else{var W=n===1||a.lastFrameIndex>0?N[0]:0,j=mk(d,W);o&&(O=v.getRawValue(W)),c.attr({x:j[0]+D,y:j[1]+M})}if(o){var H=Eh(c);typeof H.setLabelText=="function"&&H.setLabelText(O)}}},t.prototype._doUpdateAnimation=function(n,r,i,a,o,l,s){var c=this._polyline,h=this._polygon,d=n.hostModel,v=s7(this._data,n,this._stackedOnPoints,r,this._coordSys,i,this._valueOrigin),g=v.current,m=v.stackedOnCurrent,x=v.next,_=v.stackedOnNext;if(o&&(m=co(v.stackedOnCurrent,v.current,i,o,s),g=co(v.current,null,i,o,s),_=co(v.stackedOnNext,v.next,i,o,s),x=co(v.next,null,i,o,s)),pk(g,x)>3e3||h&&pk(m,_)>3e3){c.stopAnimation(),c.setShape({points:x}),h&&(h.stopAnimation(),h.setShape({points:x,stackedOnPoints:_}));return}c.shape.__points=v.current,c.shape.points=g;var b={shape:{points:x}};v.current!==g&&(b.shape.__points=v.next),c.stopAnimation(),Ve(c,b,d),h&&(h.setShape({points:g,stackedOnPoints:m}),h.stopAnimation(),Ve(h,{shape:{stackedOnPoints:_}},d),c.shape.points!==h.shape.points&&(h.shape.points=c.shape.points));for(var S=[],w=v.status,A=0;A<w.length;A++){var D=w[A].cmd;if(D==="="){var M=n.getItemGraphicEl(w[A].idx1);M&&S.push({el:M,ptIdx:A})}}c.animators&&c.animators.length&&c.animators[0].during(function(){h&&h.dirtyShape();for(var L=c.shape.__points,I=0;I<S.length;I++){var N=S[I].el,E=S[I].ptIdx*2;N.x=L[E],N.y=L[E+1],N.markRedraw()}})},t.prototype.remove=function(n){var r=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(r.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})(Ye);function bS(e,t){return{seriesType:e,plan:zh(),reset:function(n){var r=n.getData(),i=n.coordinateSystem,a=n.pipelineContext,o=t||a.large;if(i){var l=bt(i.dimensions,function(g){return r.mapDimension(g)}).slice(0,2),s=l.length,c=r.getCalculationInfo("stackResultDimension");Pu(r,l[0])&&(l[0]=c),Pu(r,l[1])&&(l[1]=c);var h=r.getStore(),d=r.getDimensionIndex(l[0]),v=r.getDimensionIndex(l[1]);return s&&{progress:function(g,m){for(var x=g.end-g.start,_=o&&Hi(x*s),b=[],S=[],w=g.start,A=0;w<g.end;w++){var D=void 0;if(s===1){var M=h.get(d,w);D=i.dataToPoint(M,null,S)}else b[0]=h.get(d,w),b[1]=h.get(v,w),D=i.dataToPoint(b,null,S);o?(_[A++]=D[0],_[A++]=D[1]):m.setItemLayout(w,D.slice())}o&&m.setLayout("points",_)}}}}}}var S7={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return n===0?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},w7=function(e){return Math.round(e.length/2)};function v5(e){return{seriesType:e,reset:function(t,n,r){var i=t.getData(),a=t.get("sampling"),o=t.coordinateSystem,l=i.count();if(l>10&&o.type==="cartesian2d"&&a){var s=o.getBaseAxis(),c=o.getOtherAxis(s),h=s.getExtent(),d=r.getDevicePixelRatio(),v=Math.abs(h[1]-h[0])*(d||1),g=Math.round(l/v);if(isFinite(g)&&g>1){a==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(c.dim),1/g)):a==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(c.dim),1/g));var m=void 0;St(a)?m=S7[a]:Rt(a)&&(m=a),m&&t.setData(i.downSample(i.mapDimension(c.dim),1/g,m,w7))}}}}}function T7(e){e.registerChartView(_7),e.registerSeriesModel(i7),e.registerLayout(bS("line",!0)),e.registerVisual({seriesType:"line",reset:function(t){var n=t.getData(),r=t.getModel("lineStyle").getLineStyle();r&&!r.stroke&&(r.stroke=n.getVisual("style").fill),n.setVisual("legendLineStyle",r)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,v5("line"))}var Lb=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(n,r){return Qu(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(n,r,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(n),l=a.dataToPoint(o);if(i)P(a.getAxes(),function(v,g){if(v.type==="category"&&r!=null){var m=v.getTicksCoords(),x=v.getTickModel().get("alignWithLabel"),_=o[g],b=r[g]==="x1"||r[g]==="y1";if(b&&!x&&(_+=1),m.length<2)return;if(m.length===2){l[g]=v.toGlobalCoord(v.getExtent()[b?1:0]);return}for(var S=void 0,w=void 0,A=1,D=0;D<m.length;D++){var M=m[D].coord,L=D===m.length-1?m[D-1].tickValue+A:m[D].tickValue;if(L===_){w=M;break}else if(L<_)S=M;else if(S!=null&&L>_){w=(M+S)/2;break}D===1&&(A=L-m[0].tickValue)}w==null&&(S?S&&(w=m[m.length-1].coord):w=m[0].coord),l[g]=v.toGlobalCoord(w)}});else{var s=this.getData(),c=s.getLayout("offset"),h=s.getLayout("size"),d=a.getBaseAxis().isHorizontal()?0:1;l[d]+=c+h/2}return l}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})(Ke);Ke.registerClass(Lb);var C7=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return Qu(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 n=this.get("progressiveThreshold"),r=this.get("largeThreshold");return r>n&&(n=r),n},t.prototype.brushSelector=function(n,r,i){return i.rect(r.getItemLayout(n))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Zu(Lb.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:lt.color.primary,borderWidth:2}},realtimeSort:!1}),t})(Lb),M7=(function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e})(),rg=(function(e){ot(t,e);function t(n){var r=e.call(this,n)||this;return r.type="sausage",r}return t.prototype.getDefaultShape=function(){return new M7},t.prototype.buildPath=function(n,r){var i=r.cx,a=r.cy,o=Math.max(r.r0||0,0),l=Math.max(r.r,0),s=(l-o)*.5,c=o+s,h=r.startAngle,d=r.endAngle,v=r.clockwise,g=Math.PI*2,m=v?d-h<g:h-d<g;m||(h=d-(v?g:-g));var x=Math.cos(h),_=Math.sin(h),b=Math.cos(d),S=Math.sin(d);m?(n.moveTo(x*o+i,_*o+a),n.arc(x*c+i,_*c+a,s,-Math.PI+h,h,!v)):n.moveTo(x*l+i,_*l+a),n.arc(i,a,l,h,d,!v),n.arc(b*c+i,S*c+a,s,d-Math.PI*2,d-Math.PI,!v),o!==0&&n.arc(i,a,o,d,h,v)},t})(ce);function A7(e,t){t=t||{};var n=t.isRoundCap;return function(r,i,a){var o=i.position;if(!o||o instanceof Array)return Lp(r,i,a);var l=e(o),s=i.distance!=null?i.distance:5,c=this.shape,h=c.cx,d=c.cy,v=c.r,g=c.r0,m=(v+g)/2,x=c.startAngle,_=c.endAngle,b=(x+_)/2,S=n?Math.abs(v-g)/2:0,w=Math.cos,A=Math.sin,D=h+v*w(x),M=d+v*A(x),L="left",I="top";switch(l){case"startArc":D=h+(g-s)*w(b),M=d+(g-s)*A(b),L="center",I="top";break;case"insideStartArc":D=h+(g+s)*w(b),M=d+(g+s)*A(b),L="center",I="bottom";break;case"startAngle":D=h+m*w(x)+jv(x,s+S,!1),M=d+m*A(x)+Fv(x,s+S,!1),L="right",I="middle";break;case"insideStartAngle":D=h+m*w(x)+jv(x,-s+S,!1),M=d+m*A(x)+Fv(x,-s+S,!1),L="left",I="middle";break;case"middle":D=h+m*w(b),M=d+m*A(b),L="center",I="middle";break;case"endArc":D=h+(v+s)*w(b),M=d+(v+s)*A(b),L="center",I="bottom";break;case"insideEndArc":D=h+(v-s)*w(b),M=d+(v-s)*A(b),L="center",I="top";break;case"endAngle":D=h+m*w(_)+jv(_,s+S,!0),M=d+m*A(_)+Fv(_,s+S,!0),L="left",I="middle";break;case"insideEndAngle":D=h+m*w(_)+jv(_,-s+S,!0),M=d+m*A(_)+Fv(_,-s+S,!0),L="right",I="middle";break;default:return Lp(r,i,a)}return r=r||{},r.x=D,r.y=M,r.align=L,r.verticalAlign=I,r}}function D7(e,t,n,r){if(ve(r)){e.setTextConfig({rotation:r});return}else if(mt(t)){e.setTextConfig({rotation:0});return}var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,l=(a+o)/2,s,c=n(t);switch(c){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":s=l;break;case"startAngle":case"insideStartAngle":s=a;break;case"endAngle":case"insideEndAngle":s=o;break;default:e.setTextConfig({rotation:0});return}var h=Math.PI*1.5-s;c==="middle"&&h>Math.PI/2&&h<Math.PI*1.5&&(h-=Math.PI),e.setTextConfig({rotation:h})}function jv(e,t,n){return t*Math.sin(e)*(n?-1:1)}function Fv(e,t,n){return t*Math.cos(e)*(n?1:-1)}function Vl(e,t,n){var r=e.get("borderRadius");if(r==null)return n?{cornerRadius:0}:null;mt(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:bt(r,function(a){return Fi(a,i)})}}var k1=Math.max,L1=Math.min;function k7(e,t){var n=e.getArea&&e.getArea();if(gh(e,"cartesian2d")){var r=e.getBaseAxis();if(r.type!=="category"||!r.onBand){var i=t.getLayout("bandWidth");r.isHorizontal()?(n.x-=i,n.width+=i*2):(n.y-=i,n.height+=i*2)}}return n}var L7=(function(e){ot(t,e);function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return t.prototype.render=function(n,r,i,a){this._model=n,this._removeOnRenderedListener(i),this._updateDrawMode(n);var o=n.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(n,r,i):this._renderNormal(n,r,i,a))},t.prototype.incrementalPrepareRender=function(n){this._clear(),this._updateDrawMode(n),this._updateLargeClip(n)},t.prototype.incrementalRender=function(n,r){this._progressiveEls=[],this._incrementalRenderLarge(n,r)},t.prototype.eachRendered=function(n){Xu(this._progressiveEls||this.group,n)},t.prototype._updateDrawMode=function(n){var r=n.pipelineContext.large;(this._isLargeDraw==null||r!==this._isLargeDraw)&&(this._isLargeDraw=r,this._clear())},t.prototype._renderNormal=function(n,r,i,a){var o=this.group,l=n.getData(),s=this._data,c=n.coordinateSystem,h=c.getBaseAxis(),d;c.type==="cartesian2d"?d=h.isHorizontal():c.type==="polar"&&(d=h.dim==="angle");var v=n.isAnimationEnabled()?n:null,g=E7(n,c);g&&this._enableRealtimeSort(g,l,i);var m=n.get("clip",!0)||g,x=k7(c,l);o.removeClipPath();var _=n.get("roundCap",!0),b=n.get("showBackground",!0),S=n.getModel("backgroundStyle"),w=S.get("borderRadius")||0,A=[],D=this._backgroundEls,M=a&&a.isInitSort,L=a&&a.type==="changeAxisOrder";function I(O){var j=Gv[c.type](l,O);if(!j)return null;var B=P7(c,d,j);return B.useStyle(S.getItemStyle()),c.type==="cartesian2d"?B.setShape("r",w):B.setShape("cornerRadius",w),A[O]=B,B}l.diff(s).add(function(O){var j=l.getItemModel(O),B=Gv[c.type](l,O,j);if(B&&(b&&I(O),!(!l.hasValue(O)||!Sk[c.type](B)))){var U=!1;m&&(U=yk[c.type](x,B));var W=xk[c.type](n,l,O,B,d,v,h.model,!1,_);g&&(W.forceLabelAnimation=!0),wk(W,l,O,j,B,n,d,c.type==="polar"),M?W.attr({shape:B}):g?bk(g,v,W,B,O,d,!1,!1):Qe(W,{shape:B},n,O),l.setItemGraphicEl(O,W),o.add(W),W.ignore=U}}).update(function(O,j){var B=l.getItemModel(O),U=Gv[c.type](l,O,B);if(U){if(b){var W=void 0;D.length===0?W=I(j):(W=D[j],W.useStyle(S.getItemStyle()),c.type==="cartesian2d"?W.setShape("r",w):W.setShape("cornerRadius",w),A[O]=W);var H=Gv[c.type](l,O),q=g5(d,H,c);Ve(W,{shape:q},v,O)}var X=s.getItemGraphicEl(j);if(!l.hasValue(O)||!Sk[c.type](U)){o.remove(X);return}var J=!1;m&&(J=yk[c.type](x,U),J&&o.remove(X));var F=X&&(X.type==="sector"&&_||X.type==="sausage"&&!_);if(F&&(X&&ku(X,n,j),X=null),X?Da(X):X=xk[c.type](n,l,O,U,d,v,h.model,!0,_),g&&(X.forceLabelAnimation=!0),L){var Y=X.getTextContent();if(Y){var Z=Eh(Y);Z.prevValue!=null&&(Z.prevValue=Z.value)}}else wk(X,l,O,B,U,n,d,c.type==="polar");M?X.attr({shape:U}):g?bk(g,v,X,U,O,d,!0,L):Ve(X,{shape:U},n,O,null),l.setItemGraphicEl(O,X),X.ignore=J,o.add(X)}}).remove(function(O){var j=s.getItemGraphicEl(O);j&&ku(j,n,O)}).execute();var N=this._backgroundGroup||(this._backgroundGroup=new ie);N.removeAll();for(var E=0;E<A.length;++E)N.add(A[E]);o.add(N),this._backgroundEls=A,this._data=l},t.prototype._renderLarge=function(n,r,i){this._clear(),Ck(n,this.group),this._updateLargeClip(n)},t.prototype._incrementalRenderLarge=function(n,r){this._removeBackground(),Ck(r,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(n){var r=n.get("clip",!0)&&h5(n.coordinateSystem,!1,n),i=this.group;r?i.setClipPath(r):i.removeClipPath()},t.prototype._enableRealtimeSort=function(n,r,i){var a=this;if(r.count()){var o=n.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(r,n,i),this._isFirstFrame=!1;else{var l=function(s){var c=r.getItemGraphicEl(s),h=c&&c.shape;return h&&Math.abs(o.isHorizontal()?h.height:h.width)||0};this._onRendered=function(){a._updateSortWithinSameData(r,l,o,i)},i.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(n,r,i){var a=[];return n.each(n.mapDimension(r.dim),function(o,l){var s=i(l);s=s??NaN,a.push({dataIndex:l,mappedValue:s,ordinalNumber:o})}),a.sort(function(o,l){return l.mappedValue-o.mappedValue}),{ordinalNumbers:bt(a,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(n,r,i){for(var a=i.scale,o=n.mapDimension(i.dim),l=Number.MAX_VALUE,s=0,c=a.getOrdinalMeta().categories.length;s<c;++s){var h=n.rawIndexOf(o,a.getRawOrdinalNumber(s)),d=h<0?Number.MIN_VALUE:r(n.indexOfRawIndex(h));if(d>l)return!0;l=d}return!1},t.prototype._isOrderDifferentInView=function(n,r){for(var i=r.scale,a=i.getExtent(),o=Math.max(0,a[0]),l=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=l;++o)if(n.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(n,r,i,a){if(this._isOrderChangedWithinSameData(n,r,i)){var o=this._dataSort(n,i,r);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(n,r,i){var a=r.baseAxis,o=this._dataSort(n,a,function(l){return n.get(n.mapDimension(r.otherAxis.dim),l)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(n,r){this._clear(this._model),this._removeOnRenderedListener(r)},t.prototype.dispose=function(n,r){this._removeOnRenderedListener(r)},t.prototype._removeOnRenderedListener=function(n){this._onRendered&&(n.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(n){var r=this.group,i=this._data;n&&n.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){ku(a,n,Zt(a).dataIndex)})):r.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t})(Ye),yk={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=k1(t.x,e.x),l=L1(t.x+t.width,i),s=k1(t.y,e.y),c=L1(t.y+t.height,a),h=l<o,d=c<s;return t.x=h&&o>i?l:o,t.y=d&&s>a?c:s,t.width=h?0:l-o,t.height=d?0:c-s,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),h||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=L1(t.r,e.r),a=k1(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},xk={cartesian2d:function(e,t,n,r,i,a,o,l,s){var c=new le({shape:dt({},r),z2:1});if(c.__dataIndex=n,c.name="item",a){var h=c.shape,d=i?"height":"width";h[d]=0}return c},polar:function(e,t,n,r,i,a,o,l,s){var c=!i&&s?rg:yi,h=new c({shape:r,z2:1});h.name="item";var d=p5(i);if(h.calculateTextPosition=A7(d,{isRoundCap:c===rg}),a){var v=h.shape,g=i?"r":"endAngle",m={};v[g]=i?r.r0:r.startAngle,m[g]=r[g],(l?Ve:Qe)(h,{shape:m},a)}return h}};function E7(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();if(n&&r.type==="category"&&t.type==="cartesian2d")return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function bk(e,t,n,r,i,a,o,l){var s,c;a?(c={x:r.x,width:r.width},s={y:r.y,height:r.height}):(c={y:r.y,height:r.height},s={x:r.x,width:r.width}),l||(o?Ve:Qe)(n,{shape:s},t,i,null);var h=t?e.baseAxis.model:null;(o?Ve:Qe)(n,{shape:c},h,i)}function _k(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var R7=["x","y","width","height"],I7=["cx","cy","r","startAngle","endAngle"],Sk={cartesian2d:function(e){return!_k(e,R7)},polar:function(e){return!_k(e,I7)}},Gv={cartesian2d:function(e,t,n){var r=e.getItemLayout(t);if(!r)return null;var i=n?z7(n,r):0,a=r.width>0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function O7(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function p5(e){return(function(t){var n=t?"Arc":"Angle";return function(r){switch(r){case"start":case"insideStart":case"end":case"insideEnd":return r+n;default:return r}}})(e)}function wk(e,t,n,r,i,a,o,l){var s=t.getItemVisual(n,"style");if(l){if(!a.get("roundCap")){var h=e.shape,d=Vl(r.getModel("itemStyle"),h,!0);dt(h,d),e.setShape(h)}}else{var c=r.get(["itemStyle","borderRadius"])||0;e.setShape("r",c)}e.useStyle(s);var v=r.getShallow("cursor");v&&e.attr("cursor",v);var g=l?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",m=Qr(r);xi(e,m,{labelFetcher:a,labelDataIndex:n,defaultText:yS(a.getData(),n),inheritColor:s.fill,defaultOpacity:s.opacity,defaultOutsidePosition:g});var x=e.getTextContent();if(l&&x){var _=r.get(["label","position"]);e.textConfig.inside=_==="middle"?!0:null,D7(e,_==="outside"?g:_,p5(o),r.get(["label","rotate"]))}JI(x,m,a.getRawValue(n),function(S){return a5(t,S)});var b=r.getModel(["emphasis"]);In(e,b.get("focus"),b.get("blurScope"),b.get("disabled")),Mr(e,r),O7(i)&&(e.style.fill="none",e.style.stroke="none",P(e.states,function(S){S.style&&(S.style.fill=S.style.stroke="none")}))}function z7(e,t){var n=e.get(["itemStyle","borderColor"]);if(!n||n==="none")return 0;var r=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var B7=(function(){function e(){}return e})(),Tk=(function(e){ot(t,e);function t(n){var r=e.call(this,n)||this;return r.type="largeBar",r}return t.prototype.getDefaultShape=function(){return new B7},t.prototype.buildPath=function(n,r){for(var i=r.points,a=this.baseDimIdx,o=1-this.baseDimIdx,l=[],s=[],c=this.barWidth,h=0;h<i.length;h+=3)s[a]=c,s[o]=i[h+2],l[a]=i[h+a],l[o]=i[h+o],n.rect(l[0],l[1],s[0],s[1])},t})(ce);function Ck(e,t,n,r){var i=e.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),l=i.getLayout("size"),s=e.getModel("backgroundStyle"),c=i.getLayout("largeBackgroundPoints");if(c){var h=new Tk({shape:{points:c},incremental:!!r,silent:!0,z2:0});h.baseDimIdx=a,h.largeDataIndices=o,h.barWidth=l,h.useStyle(s.getItemStyle()),t.add(h),n&&n.push(h)}var d=new Tk({shape:{points:i.getLayout("largePoints")},incremental:!!r,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=l,t.add(d),d.useStyle(i.getVisual("style")),d.style.stroke=null,Zt(d).seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",Mk),d.on("mousemove",Mk)),n&&n.push(d)}var Mk=oS(function(e){var t=this,n=N7(t,e.offsetX,e.offsetY);Zt(t).dataIndex=n>=0?n:null},30,!1);function N7(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,l=[],s=[],c=e.barWidth,h=0,d=a.length/3;h<d;h++){var v=h*3;if(s[r]=c,s[i]=a[v+2],l[r]=a[v+r],l[i]=a[v+i],s[i]<0&&(l[i]+=s[i],s[i]=-s[i]),t>=l[0]&&t<=l[0]+s[0]&&n>=l[1]&&n<=l[1]+s[1])return o[h]}return-1}function g5(e,t,n){if(gh(n,"cartesian2d")){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}else{var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function P7(e,t,n){var r=e.type==="polar"?yi:le;return new r({shape:g5(t,n,e),silent:!0,z2:0})}function H7(e){e.registerChartView(L7),e.registerSeriesModel(C7),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Yt(p9,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,g9("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,v5("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,n){var r=t.componentType||"series";n.eachComponent({mainType:r,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}var Ak=Math.PI*2,Uv=Math.PI/180;function V7(e,t,n){t.eachSeriesByType(e,function(r){var i=r.getData(),a=i.mapDimension("value"),o=Z8(r,n),l=o.cx,s=o.cy,c=o.r,h=o.r0,d=o.viewRect,v=-r.get("startAngle")*Uv,g=r.get("endAngle"),m=r.get("padAngle")*Uv;g=g==="auto"?v-Ak:-g*Uv;var x=r.get("minAngle")*Uv,_=x+m,b=0;i.each(a,function(q){!isNaN(q)&&b++});var S=i.getSum(a),w=Math.PI/(S||b)*2,A=r.get("clockwise"),D=r.get("roseType"),M=r.get("stillShowZeroSum"),L=i.getDataExtent(a);L[0]=0;var I=A?1:-1,N=[v,g],E=I*m/2;D_(N,!A),v=N[0],g=N[1];var O=m5(r);O.startAngle=v,O.endAngle=g,O.clockwise=A,O.cx=l,O.cy=s,O.r=c,O.r0=h;var j=Math.abs(g-v),B=j,U=0,W=v;if(i.setLayout({viewRect:d,r:c}),i.each(a,function(q,X){var J;if(isNaN(q)){i.setItemLayout(X,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:A,cx:l,cy:s,r0:h,r:D?NaN:c});return}D!=="area"?J=S===0&&M?w:q*w:J=j/b,J<_?(J=_,B-=_):U+=q;var F=W+I*J,Y=0,Z=0;m>J?(Y=W+I*J/2,Z=Y):(Y=W+E,Z=F-E),i.setItemLayout(X,{angle:J,startAngle:Y,endAngle:Z,clockwise:A,cx:l,cy:s,r0:h,r:D?ue(q,L,[h,c]):c}),W=F}),B<Ak&&b)if(B<=.001){var H=j/b;i.each(a,function(q,X){if(!isNaN(q)){var J=i.getItemLayout(X);J.angle=H;var F=0,Y=0;H<m?(F=v+I*(X+1/2)*H,Y=F):(F=v+I*X*H+E,Y=v+I*(X+1)*H-E),J.startAngle=F,J.endAngle=Y}})}else w=B/U,W=v,i.each(a,function(q,X){if(!isNaN(q)){var J=i.getItemLayout(X),F=J.angle===_?_:q*w,Y=0,Z=0;F<m?(Y=W+I*F/2,Z=Y):(Y=W+E,Z=W+I*F-E),J.startAngle=Y,J.endAngle=Z,W+=I*F}})})}var m5=be();function jg(e){return{seriesType:e,reset:function(t,n){var r=n.findComponents({mainType:"legend"});if(!(!r||!r.length)){var i=t.getData();i.filterSelf(function(a){for(var o=i.getName(a),l=0;l<r.length;l++)if(!r[l].isSelected(o))return!1;return!0})}}}}var j7=Math.PI/180;function Dk(e,t,n,r,i,a,o,l,s,c){if(e.length<2)return;function h(x){for(var _=x.rB,b=_*_,S=0;S<x.list.length;S++){var w=x.list[S],A=Math.abs(w.label.y-n),D=r+w.len,M=D*D,L=Math.sqrt(Math.abs((1-A*A/b)*M)),I=t+(L+w.len2)*i,N=I-w.label.x,E=w.targetTextWidth-N*i;y5(w,E,!0),w.label.x=I}}function d(x){for(var _={list:[],maxY:0},b={list:[],maxY:0},S=0;S<x.length;S++)if(x[S].labelAlignTo==="none"){var w=x[S],A=w.label.y>n?b:_,D=Math.abs(w.label.y-n);if(D>=A.maxY){var M=w.label.x-t-w.len2*i,L=r+w.len,I=Math.abs(M)<L?Math.sqrt(D*D/(1-M*M/L/L)):L;A.rB=I,A.maxY=D}A.list.push(w)}h(_),h(b)}for(var v=e.length,g=0;g<v;g++)if(e[g].position==="outer"&&e[g].labelAlignTo==="labelLine"){var m=e[g].label.x-c;e[g].linePoints[1][0]+=m,e[g].label.x=c}n7(e,1,s,s+o)&&d(e)}function F7(e,t,n,r,i,a,o,l){for(var s=[],c=[],h=Number.MAX_VALUE,d=-Number.MAX_VALUE,v=0;v<e.length;v++){var g=e[v].label;E1(e[v])||(g.x<t?(h=Math.min(h,g.x),s.push(e[v])):(d=Math.max(d,g.x),c.push(e[v])))}for(var v=0;v<e.length;v++){var m=e[v];if(!E1(m)&&m.linePoints){if(m.labelStyleWidth!=null)continue;var g=m.label,x=m.linePoints,_=void 0;m.labelAlignTo==="edge"?g.x<t?_=x[2][0]-m.labelDistance-o-m.edgeDistance:_=o+i-m.edgeDistance-x[2][0]-m.labelDistance:m.labelAlignTo==="labelLine"?g.x<t?_=h-o-m.bleedMargin:_=o+i-d-m.bleedMargin:g.x<t?_=g.x-o-m.bleedMargin:_=o+i-g.x-m.bleedMargin,m.targetTextWidth=_,y5(m,_,!1)}}Dk(c,t,n,r,1,i,a,o,l,d),Dk(s,t,n,r,-1,i,a,o,l,h);for(var v=0;v<e.length;v++){var m=e[v];if(!E1(m)&&m.linePoints){var g=m.label,x=m.linePoints,b=m.labelAlignTo==="edge",S=g.style.padding,w=S?S[1]+S[3]:0,A=g.style.backgroundColor?0:w,D=m.rect.width+A,M=x[1][0]-x[2][0];b?g.x<t?x[2][0]=o+m.edgeDistance+D+m.labelDistance:x[2][0]=o+i-m.edgeDistance-D-m.labelDistance:(g.x<t?x[2][0]=g.x+m.labelDistance:x[2][0]=g.x-m.labelDistance,x[1][0]=x[2][0]+M),x[1][1]=x[2][1]=g.y}}}function y5(e,t,n){if(e.labelStyleWidth==null){var r=e.label,i=r.style,a=e.rect,o=i.backgroundColor,l=i.padding,s=l?l[1]+l[3]:0,c=i.overflow,h=a.width+(o?0:s);if(t<h||n){if(c&&c.match("break")){r.setStyle("backgroundColor",null),r.setStyle("width",t-s);var d=r.getBoundingRect();r.setStyle("width",Math.ceil(d.width)),r.setStyle("backgroundColor",o)}else{var v=t-s,g=t<h?v:n?v>e.unconstrainedWidth?null:v:null;r.setStyle("width",g)}x5(a,r)}}}function x5(e,t){kk.rect=e,i5(kk,t,G7)}var G7={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},kk={};function E1(e){return e.position==="center"}function U7(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get("minShowLabelAngle")||0)*j7,l=t.getLayout("viewRect"),s=t.getLayout("r"),c=l.width,h=l.x,d=l.y,v=l.height;function g(M){M.ignore=!0}function m(M){if(!M.ignore)return!0;for(var L in M.states)if(M.states[L].ignore===!1)return!0;return!1}t.each(function(M){var L=t.getItemGraphicEl(M),I=L.shape,N=L.getTextContent(),E=L.getTextGuideLine(),O=t.getItemModel(M),j=O.getModel("label"),B=j.get("position")||O.get(["emphasis","label","position"]),U=j.get("distanceToLabelLine"),W=j.get("alignTo"),H=At(j.get("edgeDistance"),c),q=j.get("bleedMargin");q==null&&(q=Math.min(c,v)>200?10:2);var X=O.getModel("labelLine"),J=X.get("length");J=At(J,c);var F=X.get("length2");if(F=At(F,c),Math.abs(I.endAngle-I.startAngle)<o){P(N.states,g),N.ignore=!0,E&&(P(E.states,g),E.ignore=!0);return}if(m(N)){var Y=(I.startAngle+I.endAngle)/2,Z=Math.cos(Y),V=Math.sin(Y),tt,ut,gt,wt;r=I.cx,i=I.cy;var pt=B==="inside"||B==="inner";if(B==="center")tt=I.cx,ut=I.cy,wt="center";else{var vt=(pt?(I.r+I.r0)/2*Z:I.r*Z)+r,Dt=(pt?(I.r+I.r0)/2*V:I.r*V)+i;if(tt=vt+Z*3,ut=Dt+V*3,!pt){var yt=vt+Z*(J+s-I.r),Mt=Dt+V*(J+s-I.r),_e=yt+(Z<0?-1:1)*F,Jt=Mt;W==="edge"?tt=Z<0?h+H:h+c-H:tt=_e+(Z<0?-U:U),ut=Jt,gt=[[vt,Dt],[yt,Mt],[_e,Jt]]}wt=pt?"center":W==="edge"?Z>0?"right":"left":Z>0?"left":"right"}var fe=Math.PI,Ae=0,Je=j.get("rotate");if(ve(Je))Ae=Je*(fe/180);else if(B==="center")Ae=0;else if(Je==="radial"||Je===!0){var fr=Z<0?-Y+fe:-Y;Ae=fr}else if(Je==="tangential"&&B!=="outside"&&B!=="outer"){var An=Math.atan2(Z,V);An<0&&(An=fe*2+An);var ni=V>0;ni&&(An=fe+An),Ae=An-fe}if(a=!!Ae,N.x=tt,N.y=ut,N.rotation=Ae,N.setStyle({verticalAlign:"middle"}),pt){N.setStyle({align:wt});var Vo=N.states.select;Vo&&(Vo.x+=N.x,Vo.y+=N.y)}else{var Zi=new Vt(0,0,0,0);x5(Zi,N),n.push({label:N,labelLine:E,position:B,len:J,len2:F,minTurnAngle:X.get("minTurnAngle"),maxSurfaceAngle:X.get("maxSurfaceAngle"),surfaceNormal:new Ft(Z,V),linePoints:gt,textAlign:wt,labelDistance:U,labelAlignTo:W,edgeDistance:H,bleedMargin:q,rect:Zi,unconstrainedWidth:Zi.width,labelStyleWidth:N.style.width})}L.setTextConfig({inside:pt})}}),!a&&e.get("avoidLabelOverlap")&&F7(n,r,i,s,c,v,h,d);for(var x=0;x<n.length;x++){var _=n[x],b=_.label,S=_.labelLine,w=isNaN(b.x)||isNaN(b.y);if(b){b.setStyle({align:_.textAlign}),w&&(P(b.states,g),b.ignore=!0);var A=b.states.select;A&&(A.x+=b.x,A.y+=b.y)}if(S){var D=_.linePoints;w||!D?(P(S.states,g),S.ignore=!0):($9(D,_.minTurnAngle),Q9(D,_.surfaceNormal,_.maxSurfaceAngle),S.setShape({points:D}),b.__hostTarget.textGuideLineConfig={anchor:new Ft(D[0][0],D[0][1])})}}}var Y7=(function(e){ot(t,e);function t(n,r,i){var a=e.call(this)||this;a.z2=2;var o=new me;return a.setTextContent(o),a.updateData(n,r,i,!0),a}return t.prototype.updateData=function(n,r,i,a){var o=this,l=n.hostModel,s=n.getItemModel(r),c=s.getModel("emphasis"),h=n.getItemLayout(r),d=dt(Vl(s.getModel("itemStyle"),h,!0),h);if(isNaN(d.startAngle)){o.setShape(d);return}if(a){o.setShape(d);var v=l.getShallow("animationType");l.ecModel.ssr?(Qe(o,{scaleX:0,scaleY:0},l,{dataIndex:r,isFrom:!0}),o.originX=d.cx,o.originY=d.cy):v==="scale"?(o.shape.r=h.r0,Qe(o,{shape:{r:h.r}},l,r)):i!=null?(o.setShape({startAngle:i,endAngle:i}),Qe(o,{shape:{startAngle:h.startAngle,endAngle:h.endAngle}},l,r)):(o.shape.endAngle=h.startAngle,Ve(o,{shape:{endAngle:h.endAngle}},l,r))}else Da(o),Ve(o,{shape:d},l,r);o.useStyle(n.getItemVisual(r,"style")),Mr(o,s);var g=(h.startAngle+h.endAngle)/2,m=l.get("selectedOffset"),x=Math.cos(g)*m,_=Math.sin(g)*m,b=s.getShallow("cursor");b&&o.attr("cursor",b),this._updateLabel(l,n,r),o.ensureState("emphasis").shape=dt({r:h.r+(c.get("scale")&&c.get("scaleSize")||0)},Vl(c.getModel("itemStyle"),h)),dt(o.ensureState("select"),{x,y:_,shape:Vl(s.getModel(["select","itemStyle"]),h)}),dt(o.ensureState("blur"),{shape:Vl(s.getModel(["blur","itemStyle"]),h)});var S=o.getTextGuideLine(),w=o.getTextContent();S&&dt(S.ensureState("select"),{x,y:_}),dt(w.ensureState("select"),{x,y:_}),In(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},t.prototype._updateLabel=function(n,r,i){var a=this,o=r.getItemModel(i),l=o.getModel("labelLine"),s=r.getItemVisual(i,"style"),c=s&&s.fill,h=s&&s.opacity;xi(a,Qr(o),{labelFetcher:r.hostModel,labelDataIndex:i,inheritColor:c,defaultOpacity:h,defaultText:n.getFormattedLabel(i,"normal")||r.getName(i)});var d=a.getTextContent();a.setTextConfig({position:null,rotation:null}),d.attr({z2:10});var v=o.get(["label","position"]);if(v!=="outside"&&v!=="outer")a.removeTextGuideLine();else{var g=this.getTextGuideLine();g||(g=new Wi,this.setTextGuideLine(g)),t5(this,e5(o),{stroke:c,opacity:Co(l.get(["lineStyle","opacity"]),h,1)})}},t})(yi),W7=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.ignoreLabelLineUpdate=!0,n}return t.prototype.render=function(n,r,i,a){var o=n.getData(),l=this._data,s=this.group,c;if(!l&&o.count()>0){for(var h=o.getItemLayout(0),d=1;isNaN(h&&h.startAngle)&&d<o.count();++d)h=o.getItemLayout(d);h&&(c=h.startAngle)}if(this._emptyCircleSector&&s.remove(this._emptyCircleSector),o.count()===0&&n.get("showEmptyCircle")){var v=m5(n),g=new yi({shape:It(v)});g.useStyle(n.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=g,s.add(g)}o.diff(l).add(function(m){var x=new Y7(o,m,c);o.setItemGraphicEl(m,x),s.add(x)}).update(function(m,x){var _=l.getItemGraphicEl(x);_.updateData(o,m,c),_.off("click"),s.add(_),o.setItemGraphicEl(m,_)}).remove(function(m){var x=l.getItemGraphicEl(m);ku(x,n,m)}).execute(),U7(n),n.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(n,r){var i=r.getData(),a=i.getItemLayout(0);if(a){var o=n[0]-a.cx,l=n[1]-a.cy,s=Math.sqrt(o*o+l*l);return s<=a.r&&s>=a.r0}},t.type="pie",t})(Ye);function Ph(e,t,n){t=mt(t)&&{coordDimensions:t}||dt({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=Vg(r,t).dimensions,a=new dh(i,e);return a.initData(r,n),a}var _S=(function(){function e(t,n){this._getDataWithEncodedVisual=t,this._getRawData=n}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var n=this._getRawData();return n.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var n=this._getDataWithEncodedVisual();return n.indexOfName(t)},e.prototype.getItemVisual=function(t,n){var r=this._getDataWithEncodedVisual();return r.getItemVisual(t,n)},e})(),q7=be(),b5=(function(e){ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(n){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new _S(Ct(this.getData,this),Ct(this.getRawData,this)),this._defaultLabelLine(n)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Ph(this,{coordDimensions:["value"],encodeDefaulter:Yt(_O,this)})},t.prototype.getDataParams=function(n){var r=this.getData(),i=q7(r),a=i.seats;if(!a){var o=[];r.each(r.mapDimension("value"),function(s){o.push(s)}),a=i.seats=V6(o,r.hostModel.get("percentPrecision"))}var l=e.prototype.getDataParams.call(this,n);return l.percent=a[n]||0,l.$vars.push("percent"),l},t.prototype._defaultLabelLine=function(n){Rp(n,"labelLine",["show"]);var r=n.labelLine,i=n.emphasis.labelLine;r.show=r.show&&n.label.show,i.show=i.show&&n.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})(Ke);F8({fullType:b5.type,getCoord2:function(e){return e.getShallow("center")}});function X7(e){return{seriesType:e,reset:function(t,n){var r=t.getData();r.filterSelf(function(i){var a=r.mapDimension("value"),o=r.get(a,i);return!(ve(o)&&!isNaN(o)&&o<0)})}}}function Z7(e){e.registerChartView(W7),e.registerSeriesModel(b5),BG("pie",e.registerAction),e.registerLayout(Yt(V7,"pie")),e.registerProcessor(jg("pie")),e.registerProcessor(X7("pie"))}var $7=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(n,r){return Qu(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var n=this.option.progressive;return n??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var n=this.option.progressiveThreshold;return n??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(n,r,i){return i.point(r.getItemLayout(n))},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:lt.color.primary}},universalTransition:{divideShape:"clone"}},t})(Ke),_5=4,Q7=(function(){function e(){}return e})(),K7=(function(e){ot(t,e);function t(n){var r=e.call(this,n)||this;return r._off=0,r.hoverDataIdx=-1,r}return t.prototype.getDefaultShape=function(){return new Q7},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(n,r){var i=r.points,a=r.size,o=this.symbolProxy,l=o.shape,s=n.getContext?n.getContext():n,c=s&&a[0]<_5,h=this.softClipShape,d;if(c){this._ctx=s;return}for(this._ctx=null,d=this._off;d<i.length;){var v=i[d++],g=i[d++];isNaN(v)||isNaN(g)||h&&!h.contain(v,g)||(l.x=v-a[0]/2,l.y=g-a[1]/2,l.width=a[0],l.height=a[1],o.buildPath(n,l,!0))}this.incremental&&(this._off=d,this.notClear=!0)},t.prototype.afterBrush=function(){var n=this.shape,r=n.points,i=n.size,a=this._ctx,o=this.softClipShape,l;if(a){for(l=this._off;l<r.length;){var s=r[l++],c=r[l++];isNaN(s)||isNaN(c)||o&&!o.contain(s,c)||a.fillRect(s-i[0]/2,c-i[1]/2,i[0],i[1])}this.incremental&&(this._off=l,this.notClear=!0)}},t.prototype.findDataIndex=function(n,r){for(var i=this.shape,a=i.points,o=i.size,l=Math.max(o[0],4),s=Math.max(o[1],4),c=a.length/2-1;c>=0;c--){var h=c*2,d=a[h]-l/2,v=a[h+1]-s/2;if(n>=d&&r>=v&&n<=d+l&&r<=v+s)return c}return-1},t.prototype.contain=function(n,r){var i=this.transformCoordToLocal(n,r),a=this.getBoundingRect();if(n=i[0],r=i[1],a.contain(n,r)){var o=this.hoverDataIdx=this.findDataIndex(n,r);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var n=this._rect;if(!n){for(var r=this.shape,i=r.points,a=r.size,o=a[0],l=a[1],s=1/0,c=1/0,h=-1/0,d=-1/0,v=0;v<i.length;){var g=i[v++],m=i[v++];s=Math.min(g,s),h=Math.max(g,h),c=Math.min(m,c),d=Math.max(m,d)}n=this._rect=new Vt(s-o/2,c-l/2,h-s+o,d-c+l)}return n},t})(ce),J7=(function(){function e(){this.group=new ie}return e.prototype.updateData=function(t,n){this._clear();var r=this._create();r.setShape({points:t.getLayout("points")}),this._setCommon(r,t,n)},e.prototype.updateLayout=function(t){var n=t.getLayout("points");this.group.eachChild(function(r){if(r.startIndex!=null){var i=(r.endIndex-r.startIndex)*2,a=r.startIndex*4*2;n=new Float32Array(n.buffer,a,i)}r.setShape("points",n),r.reset()})},e.prototype.incrementalPrepareUpdate=function(t){this._clear()},e.prototype.incrementalUpdate=function(t,n,r){var i=this._newAdded[0],a=n.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var l=o.length,s=new Float32Array(l+a.length);s.set(o),s.set(a,l),i.endIndex=t.end,i.setShape({points:s})}else{this._newAdded=[];var c=this._create();c.startIndex=t.start,c.endIndex=t.end,c.incremental=!0,c.setShape({points:a}),this._setCommon(c,n,r)}},e.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},e.prototype._create=function(){var t=new K7({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},e.prototype._setCommon=function(t,n,r){var i=n.hostModel;r=r||{};var a=n.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.softClipShape=r.clipShape||null,t.symbolProxy=Wn(n.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<_5;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var l=n.getVisual("style"),s=l&&l.fill;s&&t.setColor(s);var c=Zt(t);c.seriesIndex=i.seriesIndex,t.on("mousemove",function(h){c.dataIndex=null;var d=t.hoverDataIdx;d>=0&&(c.dataIndex=d+(t.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e})(),tY=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,i){var a=n.getData(),o=this._updateSymbolDraw(a,n);o.updateData(a,{clipShape:this._getClipShape(n)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(n,r,i){var a=n.getData(),o=this._updateSymbolDraw(a,n);o.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(n,r,i){this._symbolDraw.incrementalUpdate(n,r.getData(),{clipShape:this._getClipShape(r)}),this._finished=n.end===r.getData().count()},t.prototype.updateTransform=function(n,r,i){var a=n.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=bS("").reset(n,r,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(n){this._symbolDraw&&this._symbolDraw.eachRendered(n)},t.prototype._getClipShape=function(n){if(n.get("clip",!0)){var r=n.coordinateSystem;return r&&r.getArea&&r.getArea(.1)}},t.prototype._updateSymbolDraw=function(n,r){var i=this._symbolDraw,a=r.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new J7:new o5,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},t.prototype.remove=function(n,r){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t})(Ye),S5={left:0,right:0,top:0,bottom:0},ig=["25%","25%"],eY=(function(e){ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(n,r){var i=$u(n.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&n.outerBounds&&Oo(n.outerBounds,i)},t.prototype.mergeOption=function(n,r){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&n.outerBounds&&Oo(this.option.outerBounds,n.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:S5,outerBoundsContain:"all",outerBoundsClampWidth:ig[0],outerBoundsClampHeight:ig[1],backgroundColor:lt.color.transparent,borderWidth:1,borderColor:lt.color.neutral30},t})(he),Eb=(function(e){ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",En).models[0]},t.type="cartesian2dAxis",t})(he);Xn(Eb,Uz);var w5={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:lt.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:lt.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:lt.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[lt.color.backgroundTint,lt.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:lt.color.neutral00,borderColor:lt.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},nY=qt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},w5),SS=qt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:lt.color.axisMinorSplitLine,width:1}}},w5),rY=qt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},SS),iY=$t({logBase:10},SS);const T5={category:nY,value:SS,time:rY,log:iY};var aY={value:1,category:1,time:1,log:1},oY=null;function lY(){return oY}function Lk(e,t,n,r){P(aY,function(i,a){var o=qt(qt({},T5[a],!0),r,!0),l=(function(s){ot(c,s);function c(){var h=s!==null&&s.apply(this,arguments)||this;return h.type=t+"Axis."+a,h}return c.prototype.mergeDefaultAndTheme=function(h,d){var v=uh(this),g=v?$u(h):{},m=d.getTheme();qt(h,m.get(a+"Axis")),qt(h,this.getDefaultOption()),h.type=Ek(h),v&&Oo(h,g,v)},c.prototype.optionUpdated=function(){var h=this.option;h.type==="category"&&(this.__ordinalMeta=Mb.createByAxisModel(this))},c.prototype.getCategories=function(h){var d=this.option;if(d.type==="category")return h?d.data:this.__ordinalMeta.categories},c.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},c.prototype.updateAxisBreaks=function(h){return{breaks:[]}},c.type=t+"Axis."+a,c.defaultOption=o,c})(n);e.registerComponentModel(l)}),e.registerSubTypeDefaulter(t+"Axis",Ek)}function Ek(e){return e.type||(e.data?"category":"value")}var sY=(function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return bt(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Ze(this.getAxes(),function(n){return n.scale.type===t})},e.prototype.addAxis=function(t){var n=t.dim;this._axes[n]=t,this._dimList.push(n)},e})(),Rb=["x","y"];function Rk(e){return(e.type==="interval"||e.type==="time")&&!e.hasBreaks()}var uY=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="cartesian2d",n.dimensions=Rb,n}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var n=this.getAxis("x").scale,r=this.getAxis("y").scale;if(!(!Rk(n)||!Rk(r))){var i=n.getExtent(),a=r.getExtent(),o=this.dataToPoint([i[0],a[0]]),l=this.dataToPoint([i[1],a[1]]),s=i[1]-i[0],c=a[1]-a[0];if(!(!s||!c)){var h=(l[0]-o[0])/s,d=(l[1]-o[1])/c,v=o[0]-i[0]*h,g=o[1]-a[0]*d,m=this._transform=[h,0,0,d,v,g];this._invTransform=Uu([],m)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(n){var r=this.getAxis("x"),i=this.getAxis("y");return r.contain(r.toLocalCoord(n[0]))&&i.contain(i.toLocalCoord(n[1]))},t.prototype.containData=function(n){return this.getAxis("x").containData(n[0])&&this.getAxis("y").containData(n[1])},t.prototype.containZone=function(n,r){var i=this.dataToPoint(n),a=this.dataToPoint(r),o=this.getArea(),l=new Vt(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(l)},t.prototype.dataToPoint=function(n,r,i){i=i||[];var a=n[0],o=n[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Un(i,n,this._transform);var l=this.getAxis("x"),s=this.getAxis("y");return i[0]=l.toGlobalCoord(l.dataToCoord(a,r)),i[1]=s.toGlobalCoord(s.dataToCoord(o,r)),i},t.prototype.clampData=function(n,r){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),l=a.getExtent(),s=i.parse(n[0]),c=a.parse(n[1]);return r=r||[],r[0]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),r[1]=Math.min(Math.max(Math.min(l[0],l[1]),c),Math.max(l[0],l[1])),r},t.prototype.pointToData=function(n,r,i){if(i=i||[],this._invTransform)return Un(i,n,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(n[0]),r),i[1]=o.coordToData(o.toLocalCoord(n[1]),r),i},t.prototype.getOtherAxis=function(n){return this.getAxis(n.dim==="x"?"y":"x")},t.prototype.getArea=function(n){n=n||0;var r=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(r[0],r[1])-n,o=Math.min(i[0],i[1])-n,l=Math.max(r[0],r[1])-a+n,s=Math.max(i[0],i[1])-o+n;return new Vt(a,o,l,s)},t})(sY),cY=(function(e){ot(t,e);function t(n,r,i,a,o){var l=e.call(this,n,r,i)||this;return l.index=0,l.type=a||"value",l.position=o||"bottom",l}return t.prototype.isHorizontal=function(){var n=this.position;return n==="top"||n==="bottom"},t.prototype.getGlobalExtent=function(n){var r=this.getExtent();return r[0]=this.toGlobalCoord(r[0]),r[1]=this.toGlobalCoord(r[1]),n&&r[0]>r[1]&&r.reverse(),r},t.prototype.pointToData=function(n,r){return this.coordToData(this.toLocalCoord(n[this.dim==="x"?0:1]),r)},t.prototype.setCategorySortInfo=function(n){if(this.type!=="category")return!1;this.model.option.categorySortInfo=n,this.scale.setSortInfo(n)},t})(Kz),fY="expandAxisBreak",So=Math.PI,hY=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],dY=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],mh=be(),C5=be(),M5=(function(){function e(t){this.recordMap={},this.resolveAxisNameOverlap=t}return e.prototype.ensureRecord=function(t){var n=t.axis.dim,r=t.componentIndex,i=this.recordMap,a=i[n]||(i[n]=[]);return a[r]||(a[r]={ready:{}})},e})();function vY(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],l,s=wS(e.axisName)&&Hu(e.nameLocation);P(r,function(m){var x=Bo(m);if(!(!x||x.label.ignore)){o.push(x);var _=a.transGroup;s&&(_.transform?Uu(uf,_.transform):y_(uf),x.transform&&Bf(uf,uf,x.transform),Vt.copy(Yv,x.localRect),Yv.applyTransform(uf),l?l.union(Yv):Vt.copy(l=new Vt(0,0,0,0),Yv))}});var c=Math.abs(a.dirVec.x)>.1?"x":"y",h=a.transGroup[c];if(o.sort(function(m,x){return Math.abs(m.label[c]-h)-Math.abs(x.label[c]-h)}),s&&l){var d=i.getExtent(),v=Math.min(d[0],d[1]),g=Math.max(d[0],d[1])-v;l.union(new Vt(v,0,g,1))}a.stOccupiedRect=l,a.labelInfoList=o}var uf=di(),Yv=new Vt(0,0,0,0),A5=function(e,t,n,r,i,a){if(Hu(e.nameLocation)){var o=a.stOccupiedRect;o&&D5(t7({},o,a.transGroup.transform),r,i)}else k5(a.labelInfoList,a.dirVec,r,i)};function D5(e,t,n){var r=new Ft;mS(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&e7(t,r)}function k5(e,t,n,r){for(var i=Ft.dot(r,t)>=0,a=0,o=e.length;a<o;a++){var l=e[i?a:o-1-a];l.label.ignore||D5(l,n,r)}}var Ma=(function(){function e(t,n,r,i){this.group=new ie,this._axisModel=t,this._api=n,this._local={},this._shared=i||new M5(A5),this._resetCfgDetermined(r)}return e.prototype.updateCfg=function(t){var n=this._cfg.raw;n.position=t.position,n.labelOffset=t.labelOffset,this._resetCfgDetermined(n)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(t){var n=this._axisModel,r=n.getDefaultOption?n.getDefaultOption():{},i=zt(t.axisName,n.get("name")),a=n.get("nameMoveOverlap");(a==null||a==="auto")&&(a=zt(t.defaultNameMoveOverlap,!0));var o={raw:t,position:t.position,rotation:t.rotation,nameDirection:zt(t.nameDirection,1),tickDirection:zt(t.tickDirection,1),labelDirection:zt(t.labelDirection,1),labelOffset:zt(t.labelOffset,0),silent:zt(t.silent,!0),axisName:i,nameLocation:Co(n.get("nameLocation"),r.nameLocation,"end"),shouldNameMoveOverlap:wS(i)&&a,optionHideOverlap:n.get(["axisLabel","hideOverlap"]),showMinorTicks:n.get(["minorTick","show"])};this._cfg=o;var l=new ie({x:o.position[0],y:o.position[1],rotation:o.rotation});l.updateTransform(),this._transformGroup=l;var s=this._shared.ensureRecord(n);s.transGroup=this._transformGroup,s.dirVec=new Ft(Math.cos(-o.rotation),Math.sin(-o.rotation))},e.prototype.build=function(t,n){var r=this;return t||(t={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),P(pY,function(i){t[i]&&gY[i](r._cfg,r._local,r._shared,r._axisModel,r.group,r._transformGroup,r._api,n||{})}),this},e.innerTextLayout=function(t,n,r){var i=oI(n-t),a,o;return nh(i)?(o=r>0?"top":"bottom",a="center"):nh(i-So)?(o=r>0?"bottom":"top",a="center"):(o="middle",i>0&&i<So?a=r>0?"right":"left":a=r>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},e.makeAxisEventDataBase=function(t){var n={componentType:t.mainType,componentIndex:t.componentIndex};return n[t.mainType+"Index"]=t.componentIndex,n},e.isLabelSilent=function(t){var n=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||n&&n.show)},e})(),pY=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],gY={axisLine:function(e,t,n,r,i,a,o){var l=r.get(["axisLine","show"]);if(l==="auto"&&(l=!0,e.raw.axisLineAutoShow!=null&&(l=!!e.raw.axisLineAutoShow)),!!l){var s=r.axis.getExtent(),c=a.transform,h=[s[0],0],d=[s[1],0],v=h[0]>d[0];c&&(Un(h,h,c),Un(d,d,c));var g=dt({lineCap:"round"},r.getModel(["axisLine","lineStyle"]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:g};if(r.get(["axisLine","breakLine"])&&r.axis.scale.hasBreaks())lY().buildAxisBreakLine(r,i,a,m);else{var x=new Gi(dt({shape:{x1:h[0],y1:h[1],x2:d[0],y2:d[1]}},m));oh(x.shape,x.style.lineWidth),x.anid="line",i.add(x)}var _=r.get(["axisLine","symbol"]);if(_!=null){var b=r.get(["axisLine","symbolSize"]);St(_)&&(_=[_,_]),(St(b)||ve(b))&&(b=[b,b]);var S=nz(r.get(["axisLine","symbolOffset"])||0,b),w=b[0],A=b[1];P([{rotate:e.rotation+Math.PI/2,offset:S[0],r:0},{rotate:e.rotation-Math.PI/2,offset:S[1],r:Math.sqrt((h[0]-d[0])*(h[0]-d[0])+(h[1]-d[1])*(h[1]-d[1]))}],function(D,M){if(_[M]!=="none"&&_[M]!=null){var L=Wn(_[M],-w/2,-A/2,w,A,g.stroke,!0),I=D.r+D.offset,N=v?d:h;L.attr({rotation:D.rotate,x:N[0]+I*Math.cos(e.rotation),y:N[1]-I*Math.sin(e.rotation),silent:!0,z2:11}),i.add(L)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,l){var s=Ok(t,i,l);s&&Ik(e,t,n,r,i,a,o,bi.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,l){var s=Ok(t,i,l);s&&Ik(e,t,n,r,i,a,o,bi.determine);var c=bY(e,i,a,r);xY(e,t.labelLayoutList,c),_Y(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,l){var s=n.ensureRecord(r);t.nameEl&&(i.remove(t.nameEl),t.nameEl=s.nameLayout=s.nameLocation=null);var c=e.axisName;if(wS(c)){var h=e.nameLocation,d=e.nameDirection,v=r.getModel("nameTextStyle"),g=r.get("nameGap")||0,m=r.axis.getExtent(),x=r.axis.inverse?-1:1,_=new Ft(0,0),b=new Ft(0,0);h==="start"?(_.x=m[0]-x*g,b.x=-x):h==="end"?(_.x=m[1]+x*g,b.x=x):(_.x=(m[0]+m[1])/2,_.y=e.labelOffset+d*g,b.y=d);var S=di();b.transform(b_(S,S,e.rotation));var w=r.get("nameRotate");w!=null&&(w=w*So/180);var A,D;Hu(h)?A=Ma.innerTextLayout(e.rotation,w??e.rotation,d):(A=mY(e.rotation,h,w||0,m),D=e.raw.axisNameAvailableWidth,D!=null&&(D=Math.abs(D/Math.sin(A.rotation)),!isFinite(D)&&(D=null)));var M=v.getFont(),L=r.get("nameTruncate",!0)||{},I=L.ellipsis,N=Io(e.raw.nameTruncateMaxWidth,L.maxWidth,D),E=l.nameMarginLevel||0,O=new me({x:_.x,y:_.y,rotation:A.rotation,silent:Ma.isLabelSilent(r),style:$e(v,{text:c,font:M,overflow:"truncate",width:N,ellipsis:I,fill:v.getTextColor()||r.get(["axisLine","lineStyle","color"]),align:v.get("align")||A.textAlign,verticalAlign:v.get("verticalAlign")||A.textVerticalAlign}),z2:1});if(Lh({el:O,componentModel:r,itemName:c}),O.__fullText=c,O.anid="name",r.get("triggerEvent")){var j=Ma.makeAxisEventDataBase(r);j.targetType="axisName",j.name=c,Zt(O).eventData=j}a.add(O),O.updateTransform(),t.nameEl=O;var B=s.nameLayout=Bo({label:O,priority:O.z2,defaultAttr:{ignore:O.ignore},marginDefault:Hu(h)?hY[E]:dY[E]});if(s.nameLocation=h,i.add(O),O.decomposeTransform(),e.shouldNameMoveOverlap&&B){var U=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,B,b,U)}}}};function Ik(e,t,n,r,i,a,o,l){E5(t)||SY(e,t,i,l,r,o);var s=t.labelLayoutList;wY(e,r,s,a),e.rotation;var c=e.optionHideOverlap;yY(r,s,c),c&&r7(Ze(s,function(h){return h&&!h.label.ignore})),vY(e,n,r,s)}function mY(e,t,n,r){var i=oI(n-e),a,o,l=r[0]>r[1],s=t==="start"&&!l||t!=="start"&&l;return nh(i-So/2)?(o=s?"bottom":"top",a="center"):nh(i-So*1.5)?(o=s?"top":"bottom",a="center"):(o="middle",i<So*1.5&&i>So/2?a=s?"left":"right":a=s?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function yY(e,t,n){if(jz(e.axis))return;function r(l,s,c){var h=Bo(t[s]),d=Bo(t[c]);if(!(!h||!d)){if(l===!1||h.suggestIgnore){Rf(h.label);return}if(d.suggestIgnore){Rf(d.label);return}var v=.1;if(!n){var g=[0,0,0,0];h=uk({marginForce:g},h),d=uk({marginForce:g},d)}mS(h,d,null,{touchThreshold:v})&&Rf(l?d.label:h.label)}}var i=e.get(["axisLabel","showMinLabel"]),a=e.get(["axisLabel","showMaxLabel"]),o=t.length;r(i,0,1),r(a,o-1,o-2)}function xY(e,t,n){e.showMinorTicks||P(t,function(r){if(r&&r.label.ignore)for(var i=0;i<n.length;i++){var a=n[i],o=C5(a),l=mh(r.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===l.tickValue){Rf(a);return}}})}function Rf(e){e&&(e.ignore=!0)}function L5(e,t,n,r,i){for(var a=[],o=[],l=[],s=0;s<e.length;s++){var c=e[s].coord;o[0]=c,o[1]=0,l[0]=c,l[1]=n,t&&(Un(o,o,t),Un(l,l,t));var h=new Gi({shape:{x1:o[0],y1:o[1],x2:l[0],y2:l[1]},style:r,z2:2,autoBatch:!0,silent:!0});oh(h.shape,h.style.lineWidth),h.anid=i+"_"+e[s].tickValue,a.push(h);var d=C5(h);d.onBand=!!e[s].onBand,d.tickValue=e[s].tickValue}return a}function bY(e,t,n,r){var i=r.axis,a=r.getModel("axisTick"),o=a.get("show");if(o==="auto"&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var l=a.getModel("lineStyle"),s=e.tickDirection*a.get("length"),c=i.getTicksCoords(),h=L5(c,n.transform,s,$t(l.getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])}),"ticks"),d=0;d<h.length;d++)t.add(h[d]);return h}function _Y(e,t,n,r,i){var a=r.axis,o=r.getModel("minorTick");if(!(!e.showMinorTicks||a.scale.isBlank())){var l=a.getMinorTicksCoords();if(l.length)for(var s=o.getModel("lineStyle"),c=i*o.get("length"),h=$t(s.getLineStyle(),$t(r.getModel("axisTick").getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])})),d=0;d<l.length;d++)for(var v=L5(l[d],n.transform,c,h,"minorticks_"+d),g=0;g<v.length;g++)t.add(v[g])}}function Ok(e,t,n){if(E5(e)){var r=e.axisLabelsCreationContext,i=r.out.noPxChangeTryDetermine;if(n.noPxChange){for(var a=!0,o=0;o<i.length;o++)a=a&&i[o]();if(a)return!1}i.length&&(t.remove(e.labelGroup),Ib(e,null,null,null))}return!0}function SY(e,t,n,r,i,a){var o=i.axis,l=Io(e.raw.axisLabelShow,i.get(["axisLabel","show"])),s=new ie;n.add(s);var c=Jp(r);if(!l||o.scale.isBlank()){Ib(t,[],s,c);return}var h=i.getModel("axisLabel"),d=o.getViewLabels(c),v=(Io(e.raw.labelRotate,h.get("rotate"))||0)*So/180,g=Ma.innerTextLayout(e.rotation,v,e.labelDirection),m=i.getCategories&&i.getCategories(!0),x=[],_=i.get("triggerEvent"),b=1/0,S=-1/0;P(d,function(A,D){var M,L=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(A.tickValue):A.tickValue,I=A.formattedLabel,N=A.rawLabel,E=h;if(m&&m[L]){var O=m[L];Lt(O)&&O.textStyle&&(E=new Te(O.textStyle,h,i.ecModel))}var j=E.getTextColor()||i.get(["axisLine","lineStyle","color"]),B=E.getShallow("align",!0)||g.textAlign,U=zt(E.getShallow("alignMinLabel",!0),B),W=zt(E.getShallow("alignMaxLabel",!0),B),H=E.getShallow("verticalAlign",!0)||E.getShallow("baseline",!0)||g.textVerticalAlign,q=zt(E.getShallow("verticalAlignMinLabel",!0),H),X=zt(E.getShallow("verticalAlignMaxLabel",!0),H),J=10+(((M=A.time)===null||M===void 0?void 0:M.level)||0);b=Math.min(b,J),S=Math.max(S,J);var F=new me({x:0,y:0,rotation:0,silent:Ma.isLabelSilent(i),z2:J,style:$e(E,{text:I,align:D===0?U:D===d.length-1?W:B,verticalAlign:D===0?q:D===d.length-1?X:H,fill:Rt(j)?j(o.type==="category"?N:o.type==="value"?L+"":L,D):j})});F.anid="label_"+L;var Y=mh(F);if(Y.break=A.break,Y.tickValue=L,Y.layoutRotation=g.rotation,Lh({el:F,componentModel:i,itemName:I,formatterParamsExtra:{isTruncated:function(){return F.isTruncated},value:N,tickIndex:D}}),_){var Z=Ma.makeAxisEventDataBase(i);Z.targetType="axisLabel",Z.value=N,Z.tickIndex=D,A.break&&(Z.break={start:A.break.parsedBreak.vmin,end:A.break.parsedBreak.vmax}),o.type==="category"&&(Z.dataIndex=L),Zt(F).eventData=Z,A.break&&CY(i,a,F,A.break)}x.push(F),s.add(F)});var w=bt(x,function(A){return{label:A,priority:mh(A).break?A.z2+(S-b+1):A.z2,defaultAttr:{ignore:A.ignore}}});Ib(t,w,s,c)}function E5(e){return!!e.labelLayoutList}function Ib(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}function wY(e,t,n,r){var i=t.get(["axisLabel","margin"]);P(n,function(a,o){var l=Bo(a);if(l){var s=l.label,c=mh(s);l.suggestIgnore=s.ignore,s.ignore=!1,Fx(ya,TY),ya.x=t.axis.dataToCoord(c.tickValue),ya.y=e.labelOffset+e.labelDirection*i,ya.rotation=c.layoutRotation,r.add(ya),ya.updateTransform(),r.remove(ya),ya.decomposeTransform(),Fx(s,ya),s.markRedraw(),ng(l,!0),Bo(l)}})}var ya=new le,TY=new le;function wS(e){return!!e}function CY(e,t,n,r){n.on("click",function(i){var a={type:fY,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};a[e.axis.dim+"AxisIndex"]=e.componentIndex,t.dispatchAction(a)})}function ag(e,t,n){n=n||{};var r=t.axis,i={},a=r.getAxesOnZeroOf()[0],o=r.position,l=a?"onZero":o,s=r.dim,c=[e.x,e.x+e.width,e.y,e.y+e.height],h={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get("offset")||0,v=s==="x"?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));v[h.onZero]=Math.max(Math.min(g,v[1]),v[0])}i.position=[s==="y"?v[h[l]]:c[0],s==="x"?v[h[l]]:c[3]],i.rotation=Math.PI/2*(s==="x"?0:1);var m={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=m[o],i.labelOffset=a?v[h[o]]-v[h.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Io(n.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var x=t.get(["axisLabel","rotate"]);return i.labelRotate=l==="top"?-x:x,i.z2=1,i}function MY(e){return e.coordinateSystem&&e.coordinateSystem.type==="cartesian2d"}function zk(e){var t={xAxisModel:null,yAxisModel:null};return P(t,function(n,r){var i=r.replace(/Model$/,""),a=e.getReferringComponents(i,En).models[0];t[r]=a}),t}function AY(e,t,n,r,i,a){for(var o=ag(e,n),l=!1,s=!1,c=0;c<t.length;c++)Tb(t[c].getOtherAxis(n.axis).scale)&&(l=s=!0,n.axis.type==="category"&&n.axis.onBand&&(s=!1));return o.axisLineAutoShow=l,o.axisTickAutoShow=s,o.defaultNameMoveOverlap=a,new Ma(n,r,o,i)}function DY(e,t,n){var r=ag(t,n);e.updateCfg(r)}function R5(e,t,n){var r=zo.prototype,i=r.getTicks.call(n),a=r.getTicks.call(n,{expandToNicedExtent:!0}),o=i.length-1,l=r.getInterval.call(n),s=Vz(e,t),c=s.extent,h=s.fixMin,d=s.fixMax;e.type==="log"&&(c=Cb(e.base,c,!0)),e.setBreaksFromOption(Gz(t)),e.setExtent(c[0],c[1]),e.calcNiceExtent({splitNumber:o,fixMin:h,fixMax:d});var v=r.getExtent.call(e);h&&(c[0]=v[0]),d&&(c[1]=v[1]);var g=r.getInterval.call(e),m=c[0],x=c[1];if(h&&d)g=(x-m)/o;else if(h)for(x=c[0]+g*o;x<c[1]&&isFinite(x)&&isFinite(c[1]);)g=w1(g),x=c[0]+g*o;else if(d)for(m=c[1]-g*o;m>c[0]&&isFinite(m)&&isFinite(c[0]);)g=w1(g),m=c[1]-g*o;else{var _=e.getTicks().length-1;_>o&&(g=w1(g));var b=g*o;x=Math.ceil(c[1]/g)*g,m=pn(x-b),m<0&&c[0]>=0?(m=0,x=pn(b)):x>0&&c[1]<=0&&(x=0,m=-pn(b))}var S=(i[0].value-a[0].value)/l,w=(i[o].value-a[o].value)/l;r.setExtent.call(e,m+g*S,x+g*w),r.setInterval.call(e,g),(S||w)&&r.setNiceExtent.call(e,m+g,x-g)}var Bk=[[3,1],[0,2]],kY=(function(){function e(t,n,r){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Rb,this._initCartesian(t,n,r),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,n){var r=this._axesMap;this._updateScale(t,this.model);function i(o){var l,s=Be(o),c=s.length;if(c){for(var h=[],d=c-1;d>=0;d--){var v=+s[d],g=o[v],m=g.model,x=g.scale;Tb(x)&&m.get("alignTicks")&&m.get("interval")==null?h.push(g):(ik(x,m),Tb(x)&&(l=g))}h.length&&(l||(l=h.pop(),ik(l.scale,l.model)),P(h,function(_){R5(_.scale,_.model,l.scale)}))}}i(r.x),i(r.y);var a={};P(r.x,function(o){Nk(r,"y",o,a)}),P(r.y,function(o){Nk(r,"x",o,a)}),this.resize(this.model,n)},e.prototype.resize=function(t,n,r){var i=ti(t,n),a=this._rect=On(t.getBoxLayoutParams(),i.refContainer),o=this._axesMap,l=this._coordsList,s=t.get("containLabel");if(I5(o,a),!r){var c=EY(a,l,o,s,n),h=void 0;if(s)h=Vk(a.clone(),"axisLabel",null,a,o,c,i);else{var d=RY(t,a,i),v=d.outerBoundsRect,g=d.parsedOuterBoundsContain,m=d.outerBoundsClamp;v&&(h=Vk(v,g,m,a,o,c,i))}O5(a,o,bi.determine,null,h,i)}P(this._coordsList,function(x){x.calcAffineTransform()})},e.prototype.getAxis=function(t,n){var r=this._axesMap[t];if(r!=null)return r[n||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,n){if(t!=null&&n!=null){var r="x"+t+"y"+n;return this._coordsMap[r]}Lt(t)&&(n=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===n)return a[i]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(t,n,r){var i=this._findConvertTarget(n);return i.cartesian?i.cartesian.dataToPoint(r):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(r)):null},e.prototype.convertFromPixel=function(t,n,r){var i=this._findConvertTarget(n);return i.cartesian?i.cartesian.pointToData(r):i.axis?i.axis.coordToData(i.axis.toLocalCoord(r)):null},e.prototype._findConvertTarget=function(t){var n=t.seriesModel,r=t.xAxisModel||n&&n.getReferringComponents("xAxis",En).models[0],i=t.yAxisModel||n&&n.getReferringComponents("yAxis",En).models[0],a=t.gridModel,o=this._coordsList,l,s;if(n)l=n.coordinateSystem,Wt(o,l)<0&&(l=null);else if(r&&i)l=this.getCartesian(r.componentIndex,i.componentIndex);else if(r)s=this.getAxis("x",r.componentIndex);else if(i)s=this.getAxis("y",i.componentIndex);else if(a){var c=a.coordinateSystem;c===this&&(l=this._coordsList[0])}return{cartesian:l,axis:s}},e.prototype.containPoint=function(t){var n=this._coordsList[0];if(n)return n.containPoint(t)},e.prototype._initCartesian=function(t,n,r){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},l={x:{},y:{}},s={x:0,y:0};if(n.eachComponent("xAxis",c("x"),this),n.eachComponent("yAxis",c("y"),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}this._axesMap=l,P(l.x,function(h,d){P(l.y,function(v,g){var m="x"+d+"y"+g,x=new uY(m);x.master=i,x.model=t,i._coordsMap[m]=x,i._coordsList.push(x),x.addAxis(h),x.addAxis(v)})});function c(h){return function(d,v){if(R1(d,t)){var g=d.get("position");h==="x"?g!=="top"&&g!=="bottom"&&(g=o.bottom?"top":"bottom"):g!=="left"&&g!=="right"&&(g=o.left?"right":"left"),o[g]=!0;var m=new cY(h,I9(d),[0,0],d.get("type"),g),x=m.type==="category";m.onBand=x&&d.get("boundaryGap"),m.inverse=d.get("inverse"),d.axis=m,m.model=d,m.grid=a,m.index=v,a._axesList.push(m),l[h][v]=m,s[h]++}}}},e.prototype._updateScale=function(t,n){P(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(MY(i)){var a=zk(i),o=a.xAxisModel,l=a.yAxisModel;if(!R1(o,n)||!R1(l,n))return;var s=this.getCartesian(o.componentIndex,l.componentIndex),c=i.getData(),h=s.getAxis("x"),d=s.getAxis("y");r(c,h),r(c,d)}},this);function r(i,a){P(Fz(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},e.prototype.getTooltipAxes=function(t){var n=[],r=[];return P(this.getCartesians(),function(i){var a=t!=null&&t!=="auto"?i.getAxis(t):i.getBaseAxis(),o=i.getOtherAxis(a);Wt(n,a)<0&&n.push(a),Wt(r,o)<0&&r.push(o)}),{baseAxes:n,otherAxes:r}},e.create=function(t,n){var r=[];return t.eachComponent("grid",function(i,a){var o=new e(i,t,n);o.name="grid_"+a,o.resize(i,n,!0),i.coordinateSystem=o,r.push(o)}),t.eachSeries(function(i){Y8({targetModel:i,coordSysType:"cartesian2d",coordSysProvider:a});function a(){var o=zk(i),l=o.xAxisModel,s=o.yAxisModel,c=l.getCoordSysModel(),h=c.coordinateSystem;return h.getCartesian(l.componentIndex,s.componentIndex)}}),r},e.dimensions=Rb,e})();function R1(e,t){return e.getCoordSysModel()===t}function Nk(e,t,n,r){n.getAxesOnZeroOf=function(){return a?[a]:[]};var i=e[t],a,o=n.model,l=o.get(["axisLine","onZero"]),s=o.get(["axisLine","onZeroAxisIndex"]);if(!l)return;if(s!=null)Pk(i[s])&&(a=i[s]);else for(var c in i)if(i.hasOwnProperty(c)&&Pk(i[c])&&!r[h(i[c])]){a=i[c];break}a&&(r[h(a)]=!0);function h(d){return d.dim+"_"+d.index}}function Pk(e){return e&&e.type!=="category"&&e.type!=="time"&&O9(e)}function LY(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim==="x"?function(i){return i+t}:function(i){return r-i+t},e.toLocalCoord=e.dim==="x"?function(i){return i-t}:function(i){return r-i+t}}function I5(e,t){P(e.x,function(n){return Hk(n,t.x,t.width)}),P(e.y,function(n){return Hk(n,t.y,t.height)})}function Hk(e,t,n){var r=[0,n],i=e.inverse?1:0;e.setExtent(r[i],r[1-i]),LY(e,t)}function Vk(e,t,n,r,i,a,o){O5(r,i,bi.estimate,t,!1,o);var l=[0,0,0,0];c(0),c(1),h(r,0,NaN),h(r,1,NaN);var s=RR(l,function(v){return v>0})==null;return Pp(r,l,!0,!0,n),I5(i,r),s;function c(v){P(i[po[v]],function(g){if(ph(g.model)){var m=a.ensureRecord(g.model),x=m.labelInfoList;if(x)for(var _=0;_<x.length;_++){var b=x[_],S=g.scale.normalize(mh(b.label).tickValue);S=v===1?1-S:S,h(b.rect,v,S),h(b.rect,1-v,NaN)}var w=m.nameLayout;if(w){var S=Hu(m.nameLocation)?.5:NaN;h(w.rect,v,S),h(w.rect,1-v,NaN)}}})}function h(v,g,m){var x=e[po[g]]-v[po[g]],_=v[Bu[g]]+v[po[g]]-(e[Bu[g]]+e[po[g]]);x=d(x,1-m),_=d(_,m);var b=Bk[g][0],S=Bk[g][1];l[b]=wr(l[b],x),l[S]=wr(l[S],_)}function d(v,g){return v>0&&!To(g)&&g>1e-4&&(v/=g),v}}function EY(e,t,n,r,i){var a=new M5(IY);return P(n,function(o){return P(o,function(l){if(ph(l.model)){var s=!r;l.axisBuilder=AY(e,t,l.model,i,a,s)}})}),a}function O5(e,t,n,r,i,a){var o=n===bi.determine;P(t,function(c){return P(c,function(h){ph(h.model)&&(DY(h.axisBuilder,e,h.model),h.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var l={x:0,y:0};s(0),s(1);function s(c){l[po[1-c]]=e[Bu[c]]<=a.refContainer[Bu[c]]*.5?0:1-c===1?2:1}P(t,function(c,h){return P(c,function(d){ph(d.model)&&((r==="all"||o)&&d.axisBuilder.build({axisName:!0},{nameMarginLevel:l[h]}),o&&d.axisBuilder.build({axisLine:!0}))})})}function RY(e,t,n){var r,i=e.get("outerBoundsMode",!0);i==="same"?r=t.clone():(i==null||i==="auto")&&(r=On(e.get("outerBounds",!0)||S5,n.refContainer));var a=e.get("outerBoundsContain",!0),o;a==null||a==="auto"||Wt(["all","axisLabel"],a)<0?o="all":o=a;var l=[Gx(zt(e.get("outerBoundsClampWidth",!0),ig[0]),t.width),Gx(zt(e.get("outerBoundsClampHeight",!0),ig[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:l}}var IY=function(e,t,n,r,i,a){var o=n.axis.dim==="x"?"y":"x";A5(e,t,n,r,i,a),Hu(e.nameLocation)||P(t.recordMap[o],function(l){l&&l.labelInfoList&&l.dirVec&&k5(l.labelInfoList,l.dirVec,r,i)})};function OY(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return zY(n,e,t),n.seriesInvolved&&NY(n,e),n}function zY(e,t,n){var r=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];P(n.getCoordinateSystems(),function(l){if(!l.axisPointerEnabled)return;var s=yh(l.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=l;var h=l.model,d=h.getModel("tooltip",r);if(P(l.getAxes(),Yt(x,!1,null)),l.getTooltipAxes&&r&&d.get("show")){var v=d.get("trigger")==="axis",g=d.get(["axisPointer","type"])==="cross",m=l.getTooltipAxes(d.get(["axisPointer","axis"]));(v||g)&&P(m.baseAxes,Yt(x,g?"cross":!0,v)),g&&P(m.otherAxes,Yt(x,"cross",!1))}function x(_,b,S){var w=S.model.getModel("axisPointer",i),A=w.get("show");if(!(!A||A==="auto"&&!_&&!Ob(w))){b==null&&(b=w.get("triggerTooltip")),w=_?BY(S,d,i,t,_,b):w;var D=w.get("snap"),M=w.get("triggerEmphasis"),L=yh(S.model),I=b||D||S.type==="category",N=e.axesInfo[L]={key:L,axis:S,coordSys:l,axisPointerModel:w,triggerTooltip:b,triggerEmphasis:M,involveSeries:I,snap:D,useHandle:Ob(w),seriesModels:[],linkGroup:null};c[L]=N,e.seriesInvolved=e.seriesInvolved||I;var E=PY(a,S);if(E!=null){var O=o[E]||(o[E]={axesInfo:{}});O.axesInfo[L]=N,O.mapper=a[E].mapper,N.linkGroup=O}}}})}function BY(e,t,n,r,i,a){var o=t.getModel("axisPointer"),l=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],s={};P(l,function(v){s[v]=It(o.get(v))}),s.snap=e.type!=="category"&&!!a,o.get("type")==="cross"&&(s.type="line");var c=s.label||(s.label={});if(c.show==null&&(c.show=!1),i==="cross"){var h=o.get(["label","show"]);if(c.show=h??!0,!a){var d=s.lineStyle=o.get("crossStyle");d&&$t(c,d.textStyle)}}return e.model.getModel("axisPointer",new Te(s,n,r))}function NY(e,t){t.eachSeries(function(n){var r=n.coordinateSystem,i=n.get(["tooltip","trigger"],!0),a=n.get(["tooltip","show"],!0);!r||!r.model||i==="none"||i===!1||i==="item"||a===!1||n.get(["axisPointer","show"],!0)===!1||P(e.coordSysAxesInfo[yh(r.model)],function(o){var l=o.axis;r.getAxis(l.dim)===l&&(o.seriesModels.push(n),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=n.getData().count())})})}function PY(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(I1(a[r+"AxisId"],n.id)||I1(a[r+"AxisIndex"],n.componentIndex)||I1(a[r+"AxisName"],n.name))return i}}function I1(e,t){return e==="all"||mt(e)&&Wt(e,t)>=0||e===t}function HY(e){var t=TS(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get("status"),o=n.get("value");o!=null&&(o=r.parse(o));var l=Ob(n);a==null&&(i.status=l?"show":"hide");var s=r.getExtent().slice();s[0]>s[1]&&s.reverse(),(o==null||o>s[1])&&(o=s[1]),o<s[0]&&(o=s[0]),i.value=o,l&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}function TS(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[yh(e)]}function VY(e){var t=TS(e);return t&&t.axisPointerModel}function Ob(e){return!!e.get(["handle","show"])}function yh(e){return e.type+"||"+e.id}var jk={},z5=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,i,a){this.axisPointerClass&&HY(n),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(n,i,!0)},t.prototype.updateAxisPointer=function(n,r,i,a){this._doUpdateAxisPointerClass(n,i,!1)},t.prototype.remove=function(n,r){var i=this._axisPointer;i&&i.remove(r)},t.prototype.dispose=function(n,r){this._disposeAxisPointer(r),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(n,r,i){var a=t.getAxisPointerClass(this.axisPointerClass);if(a){var o=VY(n);o?(this._axisPointer||(this._axisPointer=new a)).render(n,o,r,i):this._disposeAxisPointer(r)}},t.prototype._disposeAxisPointer=function(n){this._axisPointer&&this._axisPointer.dispose(n),this._axisPointer=null},t.registerAxisPointerClass=function(n,r){jk[n]=r},t.getAxisPointerClass=function(n){return n&&jk[n]},t.type="axis",t})(zn),zb=be();function jY(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var a=n.getModel("splitArea"),o=a.getModel("areaStyle"),l=o.get("color"),s=r.coordinateSystem.getRect(),c=i.getTicksCoords({tickModel:a,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(c.length){var h=l.length,d=zb(e).splitAreaColors,v=Bt(),g=0;if(d)for(var m=0;m<c.length;m++){var x=d.get(c[m].tickValue);if(x!=null){g=(x+(h-1)*m)%h;break}}var _=i.toGlobalCoord(c[0].coord),b=o.getAreaStyle();l=mt(l)?l:[l];for(var m=1;m<c.length;m++){var S=i.toGlobalCoord(c[m].coord),w=void 0,A=void 0,D=void 0,M=void 0;i.isHorizontal()?(w=_,A=s.y,D=S-w,M=s.height,_=w+D):(w=s.x,A=_,D=s.width,M=S-A,_=A+M);var L=c[m-1].tickValue;L!=null&&v.set(L,g),t.add(new le({anid:L!=null?"area_"+L:null,shape:{x:w,y:A,width:D,height:M},style:$t({fill:l[g]},b),autoBatch:!0,silent:!0})),g=(g+1)%h}zb(e).splitAreaColors=v}}}function FY(e){zb(e).splitAreaColors=null}var GY=["splitArea","splitLine","minorSplitLine","breakArea"],B5=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return t.prototype.render=function(n,r,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new ie,this.group.add(this._axisGroup),!!ph(n)){this._axisGroup.add(n.axis.axisBuilder.group),P(GY,function(s){n.get([s,"show"])&&UY[s](this,this._axisGroup,n,n.getCoordSysModel(),i)},this);var l=a&&a.type==="changeAxisOrder"&&a.isInitSort;l||WI(o,this._axisGroup,n),e.prototype.render.call(this,n,r,i,a)}},t.prototype.remove=function(){FY(this)},t.type="cartesianAxis",t})(z5),UY={splitLine:function(e,t,n,r,i){var a=n.axis;if(!a.scale.isBlank()){var o=n.getModel("splitLine"),l=o.getModel("lineStyle"),s=l.get("color"),c=o.get("showMinLine")!==!1,h=o.get("showMaxLine")!==!1;s=mt(s)?s:[s];for(var d=r.coordinateSystem.getRect(),v=a.isHorizontal(),g=0,m=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),x=[],_=[],b=l.getLineStyle(),S=0;S<m.length;S++){var w=a.toGlobalCoord(m[S].coord);if(!(S===0&&!c||S===m.length-1&&!h)){var A=m[S].tickValue;v?(x[0]=w,x[1]=d.y,_[0]=w,_[1]=d.y+d.height):(x[0]=d.x,x[1]=w,_[0]=d.x+d.width,_[1]=w);var D=g++%s.length,M=new Gi({anid:A!=null?"line_"+A:null,autoBatch:!0,shape:{x1:x[0],y1:x[1],x2:_[0],y2:_[1]},style:$t({stroke:s[D]},b),silent:!0});oh(M.shape,b.lineWidth),t.add(M)}}}},minorSplitLine:function(e,t,n,r,i){var a=n.axis,o=n.getModel("minorSplitLine"),l=o.getModel("lineStyle"),s=r.coordinateSystem.getRect(),c=a.isHorizontal(),h=a.getMinorTicksCoords();if(h.length)for(var d=[],v=[],g=l.getLineStyle(),m=0;m<h.length;m++)for(var x=0;x<h[m].length;x++){var _=a.toGlobalCoord(h[m][x].coord);c?(d[0]=_,d[1]=s.y,v[0]=_,v[1]=s.y+s.height):(d[0]=s.x,d[1]=_,v[0]=s.x+s.width,v[1]=_);var b=new Gi({anid:"minor_line_"+h[m][x].tickValue,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:v[0],y2:v[1]},style:g,silent:!0});oh(b.shape,g.lineWidth),t.add(b)}},splitArea:function(e,t,n,r,i){jY(e,t,n,r)},breakArea:function(e,t,n,r,i){n.axis.scale}},N5=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type="xAxis",t})(B5),YY=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=N5.type,n}return t.type="yAxis",t})(B5),WY=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="grid",n}return t.prototype.render=function(n,r){this.group.removeAll(),n.get("show")&&this.group.add(new le({shape:n.coordinateSystem.getRect(),style:$t({fill:n.get("backgroundColor")},n.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t})(zn),Fk={offset:0};function P5(e){e.registerComponentView(WY),e.registerComponentModel(eY),e.registerCoordinateSystem("cartesian2d",kY),Lk(e,"x",Eb,Fk),Lk(e,"y",Eb,Fk),e.registerComponentView(N5),e.registerComponentView(YY),e.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function qY(e){qn(P5),e.registerSeriesModel($7),e.registerChartView(tY),e.registerLayout(bS("scatter"))}function XY(e){e.eachSeriesByType("radar",function(t){var n=t.getData(),r=[],i=t.coordinateSystem;if(i){var a=i.getIndicatorAxes();P(a,function(o,l){n.each(n.mapDimension(a[l].dim),function(s,c){r[c]=r[c]||[];var h=i.dataToPoint(s,l);r[c][l]=Gk(h)?h:Uk(i)})}),n.each(function(o){var l=RR(r[o],function(s){return Gk(s)})||Uk(i);r[o].push(l.slice()),n.setItemLayout(o,r[o])})}})}function Gk(e){return!isNaN(e[0])&&!isNaN(e[1])}function Uk(e){return[e.cx,e.cy]}function ZY(e){var t=e.polar;if(t){mt(t)||(t=[t]);var n=[];P(t,function(r,i){r.indicator?(r.type&&!r.shape&&(r.shape=r.type),e.radar=e.radar||[],mt(e.radar)||(e.radar=[e.radar]),e.radar.push(r)):n.push(r)}),e.polar=n}P(e.series,function(r){r&&r.type==="radar"&&r.polarIndex&&(r.radarIndex=r.polarIndex)})}var $Y=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,i){var a=n.coordinateSystem,o=this.group,l=n.getData(),s=this._data;function c(v,g){var m=v.getItemVisual(g,"symbol")||"circle";if(m!=="none"){var x=ez(v.getItemVisual(g,"symbolSize")),_=Wn(m,-1,-1,2,2),b=v.getItemVisual(g,"symbolRotate")||0;return _.attr({style:{strokeNoScale:!0},z2:100,scaleX:x[0]/2,scaleY:x[1]/2,rotation:b*Math.PI/180||0}),_}}function h(v,g,m,x,_,b){m.removeAll();for(var S=0;S<g.length-1;S++){var w=c(x,_);w&&(w.__dimIdx=S,v[S]?(w.setPosition(v[S]),V_[b?"initProps":"updateProps"](w,{x:g[S][0],y:g[S][1]},n,_)):w.setPosition(g[S]),m.add(w))}}function d(v){return bt(v,function(g){return[a.cx,a.cy]})}l.diff(s).add(function(v){var g=l.getItemLayout(v);if(g){var m=new Yi,x=new Wi,_={shape:{points:g}};m.shape.points=d(g),x.shape.points=d(g),Qe(m,_,n,v),Qe(x,_,n,v);var b=new ie,S=new ie;b.add(x),b.add(m),b.add(S),h(x.shape.points,g,S,l,v,!0),l.setItemGraphicEl(v,b)}}).update(function(v,g){var m=s.getItemGraphicEl(g),x=m.childAt(0),_=m.childAt(1),b=m.childAt(2),S={shape:{points:l.getItemLayout(v)}};S.shape.points&&(h(x.shape.points,S.shape.points,b,l,v,!1),Da(_),Da(x),Ve(x,S,n),Ve(_,S,n),l.setItemGraphicEl(v,m))}).remove(function(v){o.remove(s.getItemGraphicEl(v))}).execute(),l.eachItemGraphicEl(function(v,g){var m=l.getItemModel(g),x=v.childAt(0),_=v.childAt(1),b=v.childAt(2),S=l.getItemVisual(g,"style"),w=S.fill;o.add(v),x.useStyle($t(m.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:w})),Mr(x,m,"lineStyle"),Mr(_,m,"areaStyle");var A=m.getModel("areaStyle"),D=A.isEmpty()&&A.parentModel.isEmpty();_.ignore=D,P(["emphasis","select","blur"],function(L){var I=m.getModel([L,"areaStyle"]),N=I.isEmpty()&&I.parentModel.isEmpty();_.ensureState(L).ignore=N&&D;var E=m.getModel([L,"lineStyle"]).getLineStyle();x.ensureState(L).style=E;var O=I.getAreaStyle();_.ensureState(L).style=O;var j=m.getModel([L,"itemStyle"]).getItemStyle();b.eachChild(function(B){B.ensureState(L).style=It(j)})}),_.useStyle($t(m.getModel("areaStyle").getAreaStyle(),{fill:w,opacity:.7,decal:S.decal}));var M=m.getModel("emphasis");b.eachChild(function(L){if(L instanceof Jr){var I=L.style;L.useStyle(dt({image:I.image,x:I.x,y:I.y,width:I.width,height:I.height},S))}else L.useStyle(S),L.setColor(w),L.style.strokeNoScale=!0;var N=l.getStore().get(l.getDimensionIndex(L.__dimIdx),g);(N==null||isNaN(N))&&(N=""),xi(L,Qr(m),{labelFetcher:l.hostModel,labelDataIndex:g,labelDimIndex:L.__dimIdx,defaultText:N,inheritColor:w,defaultOpacity:S.opacity})}),In(v,M.get("focus"),M.get("blurScope"),M.get("disabled"))}),this._data=l},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t})(Ye),QY=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.init=function(n){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new _S(Ct(this.getData,this),Ct(this.getRawData,this))},t.prototype.getInitialData=function(n,r){return Ph(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(n,r,i){var a=this.getData(),o=this.coordinateSystem,l=o.getIndicatorAxes(),s=this.getData().getName(n),c=s===""?this.name:s,h=GO(this,n);return Ui("section",{header:c,sortBlocks:!0,blocks:bt(l,function(d){var v=a.get(a.mapDimension(d.dim),n);return Ui("nameValue",{markerType:"subItem",markerColor:h,name:d.name,value:v,sortParam:v})})})},t.prototype.getTooltipPosition=function(n){if(n!=null){for(var r=this.getData(),i=this.coordinateSystem,a=r.getValues(bt(i.dimensions,function(c){return r.mapDimension(c)}),n),o=0,l=a.length;o<l;o++)if(!isNaN(a[o])){var s=i.getIndicatorAxes();return i.coordToPoint(s[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})(Ke),cf=T5.value;function Wv(e,t){return $t({show:t},e)}var KY=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(){var n=this.get("boundaryGap"),r=this.get("splitNumber"),i=this.get("scale"),a=this.get("axisLine"),o=this.get("axisTick"),l=this.get("axisLabel"),s=this.get("axisName"),c=this.get(["axisName","show"]),h=this.get(["axisName","formatter"]),d=this.get("axisNameGap"),v=this.get("triggerEvent"),g=bt(this.get("indicator")||[],function(m){m.max!=null&&m.max>0&&!m.min?m.min=0:m.min!=null&&m.min<0&&!m.max&&(m.max=0);var x=s;m.color!=null&&(x=$t({color:m.color},s));var _=qt(It(m),{boundaryGap:n,splitNumber:r,scale:i,axisLine:a,axisTick:o,axisLabel:l,name:m.text,showName:c,nameLocation:"end",nameGap:d,nameTextStyle:x,triggerEvent:v},!1);if(St(h)){var b=_.name;_.name=h.replace("{value}",b??"")}else Rt(h)&&(_.name=h(_.name,_));var S=new Te(_,null,this.ecModel);return Xn(S,Uz.prototype),S.mainType="radar",S.componentIndex=this.componentIndex,S},this);this._indicatorModels=g},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:lt.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:qt({lineStyle:{color:lt.color.neutral20}},cf.axisLine),axisLabel:Wv(cf.axisLabel,!1),axisTick:Wv(cf.axisTick,!1),splitLine:Wv(cf.splitLine,!0),splitArea:Wv(cf.splitArea,!0),indicator:[]},t})(he),JY=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,i){var a=this.group;a.removeAll(),this._buildAxes(n,i),this._buildSplitLineAndArea(n)},t.prototype._buildAxes=function(n,r){var i=n.coordinateSystem,a=i.getIndicatorAxes(),o=bt(a,function(l){var s=l.model.get("showName")?l.name:"",c=new Ma(l.model,r,{axisName:s,position:[i.cx,i.cy],rotation:l.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return c});P(o,function(l){l.build(),this.group.add(l.group)},this)},t.prototype._buildSplitLineAndArea=function(n){var r=n.coordinateSystem,i=r.getIndicatorAxes();if(!i.length)return;var a=n.get("shape"),o=n.getModel("splitLine"),l=n.getModel("splitArea"),s=o.getModel("lineStyle"),c=l.getModel("areaStyle"),h=o.get("show"),d=l.get("show"),v=s.get("color"),g=c.get("color"),m=mt(v)?v:[v],x=mt(g)?g:[g],_=[],b=[];function S(W,H,q){var X=q%H.length;return W[X]=W[X]||[],X}if(a==="circle")for(var w=i[0].getTicksCoords(),A=r.cx,D=r.cy,M=0;M<w.length;M++){if(h){var L=S(_,m,M);_[L].push(new kh({shape:{cx:A,cy:D,r:w[M].coord}}))}if(d&&M<w.length-1){var L=S(b,x,M);b[L].push(new kg({shape:{cx:A,cy:D,r0:w[M].coord,r:w[M+1].coord}}))}}else for(var I,N=bt(i,function(W,H){var q=W.getTicksCoords();return I=I==null?q.length-1:Math.min(q.length-1,I),bt(q,function(X){return r.coordToPoint(X.coord,H)})}),E=[],M=0;M<=I;M++){for(var O=[],j=0;j<i.length;j++)O.push(N[j][M]);if(O[0]&&O.push(O[0].slice()),h){var L=S(_,m,M);_[L].push(new Wi({shape:{points:O}}))}if(d&&E){var L=S(b,x,M-1);b[L].push(new Yi({shape:{points:O.concat(E)}}))}E=O.slice().reverse()}var B=s.getLineStyle(),U=c.getAreaStyle();P(b,function(W,H){this.group.add(rb(W,{style:$t({stroke:"none",fill:x[H%x.length]},U),silent:!0}))},this),P(_,function(W,H){this.group.add(rb(W,{style:$t({fill:"none",stroke:m[H%m.length]},B),silent:!0}))},this)},t.type="radar",t})(zn),tW=(function(e){ot(t,e);function t(n,r,i){var a=e.call(this,n,r,i)||this;return a.type="value",a.angle=0,a.name="",a}return t})(Kz),eW=(function(){function e(t,n,r){this.dimensions=[],this._model=t,this._indicatorAxes=bt(t.getIndicatorModels(),function(i,a){var o="indicator_"+a,l=new tW(o,new zo);return l.name=i.get("name"),l.model=i,i.axis=l,this.dimensions.push(o),l},this),this.resize(t,r)}return e.prototype.getIndicatorAxes=function(){return this._indicatorAxes},e.prototype.dataToPoint=function(t,n){var r=this._indicatorAxes[n];return this.coordToPoint(r.dataToCoord(t),n)},e.prototype.coordToPoint=function(t,n){var r=this._indicatorAxes[n],i=r.angle,a=this.cx+t*Math.cos(i),o=this.cy-t*Math.sin(i);return[a,o]},e.prototype.pointToData=function(t){var n=t[0]-this.cx,r=t[1]-this.cy,i=Math.sqrt(n*n+r*r);n/=i,r/=i;for(var a=Math.atan2(-r,n),o=1/0,l,s=-1,c=0;c<this._indicatorAxes.length;c++){var h=this._indicatorAxes[c],d=Math.abs(a-h.angle);d<o&&(l=h,s=c,o=d)}return[s,+(l&&l.coordToData(i))]},e.prototype.resize=function(t,n){var r=ti(t,n).refContainer,i=t.get("center"),a=Math.min(r.width,r.height)/2;this.cx=At(i[0],r.width)+r.x,this.cy=At(i[1],r.height)+r.y,this.startAngle=t.get("startAngle")*Math.PI/180;var o=t.get("radius");(St(o)||ve(o))&&(o=[0,o]),this.r0=At(o[0],a),this.r=At(o[1],a),P(this._indicatorAxes,function(l,s){l.setExtent(this.r0,this.r);var c=this.startAngle+s*Math.PI*2/this._indicatorAxes.length;c=Math.atan2(Math.sin(c),Math.cos(c)),l.angle=c},this)},e.prototype.update=function(t,n){var r=this._indicatorAxes,i=this._model;P(r,function(l){l.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(l,s){if(!(l.get("coordinateSystem")!=="radar"||t.getComponent("radar",l.get("radarIndex"))!==i)){var c=l.getData();P(r,function(h){h.scale.unionExtentFromData(c,c.mapDimension(h.dim))})}},this);var a=i.get("splitNumber"),o=new zo;o.setExtent(0,a),o.setInterval(1),P(r,function(l,s){R5(l.scale,l.model,o)})},e.prototype.convertToPixel=function(t,n,r){return console.warn("Not implemented."),null},e.prototype.convertFromPixel=function(t,n,r){return console.warn("Not implemented."),null},e.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},e.create=function(t,n){var r=[];return t.eachComponent("radar",function(i){var a=new e(i,t,n);r.push(a),i.coordinateSystem=a}),t.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=r[i.get("radarIndex")||0])}),r},e.dimensions=[],e})();function nW(e){e.registerCoordinateSystem("radar",eW),e.registerComponentModel(KY),e.registerComponentView(JY),e.registerVisual({seriesType:"radar",reset:function(t){var n=t.getData();n.each(function(r){n.setItemVisual(r,"legendIcon","roundRect")}),n.setVisual("legendIcon","roundRect")}})}function rW(e){qn(nW),e.registerChartView($Y),e.registerSeriesModel(QY),e.registerLayout(XY),e.registerProcessor(jg("radar")),e.registerPreprocessor(ZY)}var CS=be();function iW(e,t,n){CS(e)[t]=n}function aW(e,t,n){var r=CS(e),i=r[t];i===n&&(r[t]=null)}function Yk(e,t){return!!CS(e)[t]}qi({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Cn);var oW={axisPointer:1,tooltip:1,brush:1};function H5(e,t,n){var r=t.getComponentByElement(e.topTarget);if(!r||r===n||oW.hasOwnProperty(r.mainType))return!1;var i=r.coordinateSystem;if(!i||i.model===n)return!1;var a=sh(r),o=sh(n);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var MS=(function(e){ot(t,e);function t(n){var r=e.call(this)||this;r._zr=n;var i=Ct(r._mousedownHandler,r),a=Ct(r._mousemoveHandler,r),o=Ct(r._mouseupHandler,r),l=Ct(r._mousewheelHandler,r),s=Ct(r._pinchHandler,r);return r.enable=function(c,h){var d=h.zInfo,v=sh(d.component),g=v.z,m=v.zlevel,x={component:d.component,z:g,zlevel:m,z2:zt(d.z2,-1/0)},_=dt({},h.triggerInfo);this._opt=$t(dt({},h),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:x,triggerInfo:_}),c==null&&(c=!0),(!this._enabled||this._controlType!==c)&&(this._enabled=!0,this.disable(),(c===!0||c==="move"||c==="pan")&&(hf(n,"mousedown",i,x),hf(n,"mousemove",a,x),hf(n,"mouseup",o,x)),(c===!0||c==="scale"||c==="zoom")&&(hf(n,"mousewheel",l,x),hf(n,"pinch",s,x)))},r.disable=function(){this._enabled=!1,df(n,"mousedown",i),df(n,"mousemove",a),df(n,"mouseup",o),df(n,"mousewheel",l),df(n,"pinch",s)},r}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(n,r,i){var a=this._opt,o=a.zInfoParsed;if(H5(n,a.api,o.component))return!1;var l=a.triggerInfo,s=l.roamTrigger,c=!1;return s==="global"&&(c=!0),c||(c=l.isInSelf(n,r,i)),c&&l.isInClip&&!l.isInClip(n,r,i)&&(c=!1),c},t.prototype._decideCursorStyle=function(n,r,i,a){var o=n.target;if(!o&&this._checkPointer(n,r,i))return"grab";if(a)return o&&o.cursor||"default"},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(n){if(!(MM(n)||ff(n))){for(var r=n.target;r;){if(r.draggable)return;r=r.__hostTarget||r.parent}var i=n.offsetX,a=n.offsetY;this._checkPointer(n,i,a)&&(this._x=i,this._y=a,this._dragging=!0)}},t.prototype._mousemoveHandler=function(n){var r=this._zr;if(!(n.gestureEvent==="pinch"||Yk(r,"globalPan")||ff(n))){var i=n.offsetX,a=n.offsetY;if(!this._dragging||!mp("moveOnMouseMove",n,this._opt)){var o=this._decideCursorStyle(n,i,a,!1);o&&r.setCursorStyle(o);return}r.setCursorStyle("grabbing");var l=this._x,s=this._y,c=i-l,h=a-s;this._x=i,this._y=a,this._opt.preventDefaultMouseMove&&Aa(n.event),n.__ecRoamConsumed=!0,Wk(this,"pan","moveOnMouseMove",n,{dx:c,dy:h,oldX:l,oldY:s,newX:i,newY:a,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(n){if(!ff(n)){var r=this._zr;if(!MM(n)){this._dragging=!1;var i=this._decideCursorStyle(n,n.offsetX,n.offsetY,!0);i&&r.setCursorStyle(i)}}},t.prototype._mousewheelHandler=function(n){if(!ff(n)){var r=mp("zoomOnMouseWheel",n,this._opt),i=mp("moveOnMouseWheel",n,this._opt),a=n.wheelDelta,o=Math.abs(a),l=n.offsetX,s=n.offsetY;if(!(a===0||!r&&!i)){if(r){var c=o>3?1.4:o>1?1.2:1.1,h=a>0?c:1/c;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",n,{scale:h,originX:l,originY:s,isAvailableBehavior:null})}if(i){var d=Math.abs(a),v=(a>0?1:-1)*(d>3?.4:d>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",n,{scrollDelta:v,originX:l,originY:s,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(n){if(!(Yk(this._zr,"globalPan")||ff(n))){var r=n.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,n,{scale:r,originX:n.pinchX,originY:n.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(n,r,i,a,o){n._checkPointer(a,o.originX,o.originY)&&(Aa(a.event),a.__ecRoamConsumed=!0,Wk(n,r,i,a,o))},t})(Kr);function ff(e){return e.__ecRoamConsumed}var lW=be();function Fg(e){var t=lW(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function hf(e,t,n,r){for(var i=Fg(e),a=i.roam,o=a[t]=a[t]||[],l=0;l<o.length;l++){var s=o[l].zInfoParsed;if((s.zlevel-r.zlevel||s.z-r.z||s.z2-r.z2)<=0)break}o.splice(l,0,{listener:n,zInfoParsed:r}),sW(e,t)}function df(e,t,n){for(var r=Fg(e),i=r.roam[t]||[],a=0;a<i.length;a++)if(i[a].listener===n){i.splice(a,1),i.length||uW(e,t);return}}function sW(e,t){var n=Fg(e);n.uniform[t]||e.on(t,n.uniform[t]=function(r){var i=n.roam[t];if(i)for(var a=0;a<i.length;a++)i[a].listener(r)})}function uW(e,t){var n=Fg(e),r=n.uniform;r[t]&&(e.off(t,r[t]),r[t]=null)}function Wk(e,t,n,r,i){i.isAvailableBehavior=Ct(mp,null,n,r),e.trigger(t,i)}function mp(e,t,n){var r=n[e];return!e||r&&(!St(r)||t.event[r+"Key"])}function cW(e,t,n){var r=e.target;r.x+=t,r.y+=n,r.dirty()}function fW(e,t,n,r){var i=e.target,a=e.zoomLimit,o=e.zoom=e.zoom||1;o*=t,o=AS(o,a);var l=o/e.zoom;e.zoom=o,V5(i,n,r,l),i.dirty()}function hW(e,t,n,r,i,a){var o=new Vt(0,0,0,0);r.enable(e.get("roam"),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get("roamTrigger"),isInSelf:function(c,h,d){return o.copy(n.getBoundingRect()),o.applyTransform(n.getComputedTransform()),o.contain(h,d)},isInClip:function(c,h,d){return!0}}}),i.zoomLimit=e.get("scaleLimit");var l=e.coordinateSystem;i.zoom=l?l.getZoom():1;var s=e.subType+"Roam";r.off("pan").off("zoom").on("pan",function(c){cW(i,c.dx,c.dy),t.dispatchAction({seriesId:e.id,type:s,dx:c.dx,dy:c.dy})}).on("zoom",function(c){fW(i,c.scale,c.originX,c.originY),t.dispatchAction({seriesId:e.id,type:s,zoom:c.scale,originX:c.originX,originY:c.originY}),t.updateLabelLayout()})}function qk(e,t){return e.pointToProjected?e.pointToProjected(t):e.pointToData(t)}function dW(e,t,n){var r=e.getZoom(),i=e.getCenter(),a=t.zoom,o=e.projectedToPoint?e.projectedToPoint(i):e.dataToPoint(i);return t.dx!=null&&t.dy!=null&&(o[0]-=t.dx,o[1]-=t.dy,e.setCenter(qk(e,o))),a!=null&&(a=AS(r*a,n)/r,V5(e,t.originX,t.originY,a),e.updateTransform(),e.setCenter(qk(e,o)),e.setZoom(a*r)),{center:e.getCenter(),zoom:e.getZoom()}}function V5(e,t,n,r){e.x-=(t-e.x)*(r-1),e.y-=(n-e.y)*(r-1),e.scaleX*=r,e.scaleY*=r}function AS(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}var Xk=Un,vW=(function(e){ot(t,e);function t(n,r){var i=e.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new zl,i._rawTransformable=new zl,i.name=n,i._opt=r,i}return t.prototype.setBoundingRect=function(n,r,i,a){return this._rect=new Vt(n,r,i,a),this._updateCenterAndZoom(),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(n,r,i,a){this._transformTo(n,r,i,a),this._viewRect=new Vt(n,r,i,a)},t.prototype._transformTo=function(n,r,i,a){var o=this.getBoundingRect(),l=this._rawTransformable;l.transform=o.calculateTransform(new Vt(n,r,i,a));var s=l.parent;l.parent=null,l.decomposeTransform(),l.parent=s,this._updateTransform()},t.prototype.setCenter=function(n){var r=this._opt;r&&r.api&&r.ecModel&&r.ecModel.getShallow("legacyViewCoordSysCenterBase")&&n&&(n=[At(n[0],r.api.getWidth()),At(n[1],r.api.getWidth())]),this._centerOption=It(n),this._updateCenterAndZoom()},t.prototype.setZoom=function(n){this._zoom=AS(n||1,this.zoomLimit),this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var n=this.getBoundingRect(),r=n.x+n.width/2,i=n.y+n.height/2;return[r,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 n=this._centerOption,r=this._rect;n&&r&&(this._center=[At(n[0],r.width,r.x),At(n[1],r.height,r.y)]);var i=this._rawTransformable.getLocalTransform(),a=this._roamTransformable,o=this.getDefaultCenter(),l=this.getCenter(),s=this.getZoom();l=Un([],l,i),o=Un([],o,i),a.originX=l[0],a.originY=l[1],a.x=o[0]-l[0],a.y=o[1]-l[1],a.scaleX=a.scaleY=s,this._updateTransform()},t.prototype._updateTransform=function(){var n=this._roamTransformable,r=this._rawTransformable;r.parent=n,n.updateTransform(),r.updateTransform(),x_(this.transform||(this.transform=[]),r.transform||di()),this._rawTransform=r.getLocalTransform(),this.invTransform=this.invTransform||[],Uu(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var n=this._rawTransformable,r=this._roamTransformable,i=new zl;return i.transform=r.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},raw:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var n=this.getBoundingRect().clone();return n.applyTransform(this.transform),n},t.prototype.dataToPoint=function(n,r,i){var a=r?this._rawTransform:this.transform;return i=i||[],a?Xk(i,n,a):bH(i,n)},t.prototype.pointToData=function(n,r,i){i=i||[];var a=this.invTransform;return a?Xk(i,n,a):(i[0]=n[0],i[1]=n[1],i)},t.prototype.convertToPixel=function(n,r,i){var a=Zk(r);return a===this?a.dataToPoint(i):null},t.prototype.convertFromPixel=function(n,r,i){var a=Zk(r);return a===this?a.pointToData(i):null},t.prototype.containPoint=function(n){return this.getViewRectAfterRoam().contain(n[0],n[1])},t.dimensions=["x","y"],t})(zl);function Zk(e){var t=e.seriesModel;return t?t.coordinateSystem:null}var Zr=be();function j5(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,F5(t,n,e),P(n,function(r){P(t.TRANSFERABLE_METHODS,function(i){r.wrapMethod(i,Yt(pW,e))})}),t.wrapMethod("cloneShallow",Yt(mW,e)),P(t.CHANGABLE_METHODS,function(r){t.wrapMethod(r,Yt(gW,e))}),$r(n[t.dataType]===t)}function pW(e,t){if(bW(this)){var n=dt({},Zr(this).datas);n[this.dataType]=t,F5(t,n,e)}else DS(t,this.dataType,Zr(this).mainData,e);return t}function gW(e,t){return e.struct&&e.struct.update(),t}function mW(e,t){return P(Zr(t).datas,function(n,r){n!==t&&DS(n.cloneShallow(),r,t,e)}),t}function yW(e){var t=Zr(this).mainData;return e==null||t==null?t:Zr(t).datas[e]}function xW(){var e=Zr(this).mainData;return e==null?[{data:e}]:bt(Be(Zr(e).datas),function(t){return{type:t,data:Zr(e).datas[t]}})}function bW(e){return Zr(e).mainData===e}function F5(e,t,n){Zr(e).datas={},P(t,function(r,i){DS(r,i,e,n)})}function DS(e,t,n,r){Zr(n).datas[t]=e,Zr(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=yW,e.getLinkedDataAll=xW}var _W=(function(){function e(t,n){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=n}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(t,n,r){Rt(t)&&(r=n,n=t,t=null),t=t||{},St(t)&&(t={order:t});var i=t.order||"preorder",a=this[t.attr||"children"],o;i==="preorder"&&(o=n.call(r,this));for(var l=0;!o&&l<a.length;l++)a[l].eachNode(t,n,r);i==="postorder"&&n.call(r,this)},e.prototype.updateDepthAndHeight=function(t){var n=0;this.depth=t;for(var r=0;r<this.children.length;r++){var i=this.children[r];i.updateDepthAndHeight(t+1),i.height>n&&(n=i.height)}this.height=n+1},e.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var n=0,r=this.children,i=r.length;n<i;n++){var a=r[n].getNodeById(t);if(a)return a}},e.prototype.contains=function(t){if(t===this)return!0;for(var n=0,r=this.children,i=r.length;n<i;n++){var a=r[n].contains(t);if(a)return a}},e.prototype.getAncestors=function(t){for(var n=[],r=t?this:this.parentNode;r;)n.push(r),r=r.parentNode;return n.reverse(),n},e.prototype.getAncestorsIndices=function(){for(var t=[],n=this;n;)t.push(n.dataIndex),n=n.parentNode;return t.reverse(),t},e.prototype.getDescendantIndices=function(){var t=[];return this.eachNode(function(n){t.push(n.dataIndex)}),t},e.prototype.getValue=function(t){var n=this.hostTree.data;return n.getStore().get(n.getDimensionIndex(t||"value"),this.dataIndex)},e.prototype.setLayout=function(t,n){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,n)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var n=this.hostTree,r=n.data.getItemModel(this.dataIndex);return r.getModel(t)}},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(t,n){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,n)},e.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,n=0;n<t.length;++n)if(t[n]===this)return n;return-1}return-1},e.prototype.isAncestorOf=function(t){for(var n=t.parentNode;n;){if(n===this)return!0;n=n.parentNode}return!1},e.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},e})(),G5=(function(){function e(t){this.type="tree",this._nodes=[],this.hostModel=t}return e.prototype.eachNode=function(t,n,r){this.root.eachNode(t,n,r)},e.prototype.getNodeByDataIndex=function(t){var n=this.data.getRawIndex(t);return this._nodes[n]},e.prototype.getNodeById=function(t){return this.root.getNodeById(t)},e.prototype.update=function(){for(var t=this.data,n=this._nodes,r=0,i=n.length;r<i;r++)n[r].dataIndex=-1;for(var r=0,i=t.count();r<i;r++)n[t.getRawIndex(r)].dataIndex=r},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,n,r){var i=new e(n),a=[],o=1;l(t);function l(h,d){var v=h.value;o=Math.max(o,mt(v)?v.length:1),a.push(h);var g=new _W(Yn(h.name,""),i);d?SW(g,d):i.root=g,i._nodes.push(g);var m=h.children;if(m)for(var x=0;x<m.length;x++)l(m[x],g)}i.root.updateDepthAndHeight(0);var s=Vg(a,{coordDimensions:["value"],dimensionsCount:o}).dimensions,c=new dh(s,n);return c.initData(a),r&&r(c),j5({mainData:c,struct:i,structAttr:"tree"}),i.update(),i},e})();function SW(e,t){var n=t.children;e.parentNode!==t&&(n.push(e),e.parentNode=t)}function xh(e,t,n){if(e&&Wt(t,e.type)>=0){var r=n.getData().tree.root,i=e.targetNode;if(St(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=r.getNodeById(a)))return{node:i}}}function U5(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function kS(e,t){var n=U5(e);return Wt(n,t)>=0}function LS(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var $k=["treemapZoomToNode","treemapRender","treemapMove"];function wW(e){for(var t=0;t<$k.length;t++)e.registerAction({type:$k[t],update:"updateView"},Cn);e.registerAction({type:"treemapRootToNode",update:"updateView"},function(n,r){r.eachComponent({mainType:"series",subType:"treemap",query:n},i);function i(a,o){var l=["treemapZoomToNode","treemapRootToNode"],s=xh(n,l,a);if(s){var c=a.getViewRoot();c&&(n.direction=kS(c,s.node)?"rollUp":"drillDown"),a.resetViewRoot(s.node)}}})}function Y5(e){var t=e.getData(),n=t.tree,r={};n.eachNode(function(i){for(var a=i;a&&a.depth>1;)a=a.parentNode;var o=oF(e.ecModel,a.name||a.dataIndex+"",r);i.setVisual("decal",o)})}var TW=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return t.prototype.getInitialData=function(n,r){var i={name:n.name,children:n.data};W5(i);var a=n.levels||[],o=this.designatedVisualItemStyle={},l=new Te({itemStyle:o},this,r);a=n.levels=CW(a,r);var s=bt(a||[],function(d){return new Te(d,l,r)},this),c=G5.createTree(i,this,h);function h(d){d.wrapMethod("getItemModel",function(v,g){var m=c.getNodeByDataIndex(g),x=m?s[m.depth]:null;return v.parentModel=x||l,v})}return c.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(n,r,i){var a=this.getData(),o=this.getRawValue(n),l=a.getName(n);return Ui("nameValue",{name:l,value:o})},t.prototype.getDataParams=function(n){var r=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(n);return r.treeAncestors=LS(i,this),r.treePathInfo=r.treeAncestors,r},t.prototype.setLayoutInfo=function(n){this.layoutInfo=this.layoutInfo||{},dt(this.layoutInfo,n)},t.prototype.mapIdToIndex=function(n){var r=this._idIndexMap;r||(r=this._idIndexMap=Bt(),this._idIndexMapCount=0);var i=r.get(n);return i==null&&r.set(n,i=this._idIndexMapCount++),i},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(n){n?this._viewRoot=n:n=this._viewRoot;var r=this.getRawData().tree.root;(!n||n!==r&&!r.contains(n))&&(this._viewRoot=r)},t.prototype.enableAriaDecal=function(){Y5(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:lt.size.l,top:lt.size.xxxl,right:lt.size.l,bottom:lt.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:lt.size.m,emptyItemWidth:25,itemStyle:{color:lt.color.backgroundShade,textStyle:{color:lt.color.secondary}},emphasis:{itemStyle:{color:lt.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:lt.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:lt.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})(Ke);function W5(e){var t=0;P(e.children,function(r){W5(r);var i=r.value;mt(i)&&(i=i[0]),t+=i});var n=e.value;mt(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),mt(e.value)?e.value[0]=n:e.value=n}function CW(e,t){var n=un(t.get("color")),r=un(t.get(["aria","decal","decals"]));if(n){e=e||[];var i,a;P(e,function(l){var s=new Te(l),c=s.get("color"),h=s.get("decal");(s.get(["itemStyle","color"])||c&&c!=="none")&&(i=!0),(s.get(["itemStyle","decal"])||h&&h!=="none")&&(a=!0)});var o=e[0]||(e[0]={});return i||(o.color=n.slice()),!a&&r&&(o.decal=r.slice()),e}}var MW=8,Qk=8,O1=5,AW=(function(){function e(t){this.group=new ie,t.add(this.group)}return e.prototype.render=function(t,n,r,i){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!r)){var l=a.getModel("itemStyle"),s=a.getModel("emphasis"),c=l.getModel("textStyle"),h=s.getModel(["itemStyle","textStyle"]),d=ti(t,n).refContainer,v={left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},g={emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]},m=On(v,d);this._prepare(r,g,c),this._renderContent(t,g,m,l,s,c,h,i),K_(o,v,d)}},e.prototype._prepare=function(t,n,r){for(var i=t;i;i=i.parentNode){var a=Yn(i.getModel().get("name"),""),o=r.getTextRect(a),l=Math.max(o.width+MW*2,n.emptyItemWidth);n.totalWidth+=l+Qk,n.renderList.push({node:i,text:a,width:l})}},e.prototype._renderContent=function(t,n,r,i,a,o,l,s){for(var c=0,h=n.emptyItemWidth,d=t.get(["breadcrumb","height"]),v=n.totalWidth,g=n.renderList,m=a.getModel("itemStyle").getItemStyle(),x=g.length-1;x>=0;x--){var _=g[x],b=_.node,S=_.width,w=_.text;v>r.width&&(v-=S-h,S=h,w=null);var A=new Yi({shape:{points:DW(c,0,S,d,x===g.length-1,x===0)},style:$t(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new me({style:$e(o,{text:w})}),textConfig:{position:"inside"},z2:Dh*1e4,onclick:Yt(s,b)});A.disableLabelAnimation=!0,A.getTextContent().ensureState("emphasis").style=$e(l,{text:w}),A.ensureState("emphasis").style=m,In(A,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(A),kW(A,t,b),c+=S+Qk}},e.prototype.remove=function(){this.group.removeAll()},e})();function DW(e,t,n,r,i,a){var o=[[i?e:e-O1,t],[e+n,t],[e+n,t+r],[i?e:e-O1,t+r]];return!a&&o.splice(2,0,[e+n+O1,t+r/2]),!i&&o.push([e,t+r/2]),o}function kW(e,t,n){Zt(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&LS(n,t)}}var LW=(function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(t,n,r,i,a){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:n,duration:r,delay:i,easing:a}),!0)},e.prototype.finished=function(t){return this._finishedCallback=t,this},e.prototype.start=function(){for(var t=this,n=this._storage.length,r=function(){n--,n<=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:r,aborted:r})}return this},e})();function EW(){return new LW}var Bb=ie,Kk=le,Jk=3,tL="label",eL="upperLabel",RW=Dh*10,IW=Dh*2,OW=Dh*3,Ll=zu([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),nL=function(e){var t=Ll(e);return t.stroke=t.fill=t.lineWidth=null,t},og=be(),zW=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._state="ready",n._storage=vf(),n}return t.prototype.render=function(n,r,i,a){var o=r.findComponents({mainType:"series",subType:"treemap",query:a});if(!(Wt(o,n)<0)){this.seriesModel=n,this.api=i,this.ecModel=r;var l=["treemapZoomToNode","treemapRootToNode"],s=xh(a,l,n),c=a&&a.type,h=n.layoutInfo,d=!this._oldTree,v=this._storage,g=c==="treemapRootToNode"&&s&&v?{rootNodeGroup:v.nodeGroup[s.node.getRawIndex()],direction:a.direction}:null,m=this._giveContainerGroup(h),x=n.get("animation"),_=this._doRender(m,n,g);x&&!d&&(!c||c==="treemapZoomToNode"||c==="treemapRootToNode")?this._doAnimation(m,_,n,g):_.renderFinally(),this._resetController(i),this._renderBreadcrumb(n,i,s)}},t.prototype._giveContainerGroup=function(n){var r=this._containerGroup;return r||(r=this._containerGroup=new Bb,this._initEvents(r),this.group.add(r)),r.x=n.x,r.y=n.y,r},t.prototype._doRender=function(n,r,i){var a=r.getData().tree,o=this._oldTree,l=vf(),s=vf(),c=this._storage,h=[];function d(S,w,A,D){return BW(r,s,c,i,l,h,S,w,A,D)}x(a.root?[a.root]:[],o&&o.root?[o.root]:[],n,a===o||!o,0);var v=_(c);if(this._oldTree=a,this._storage=s,this._controllerHost){var g=this.seriesModel.layoutInfo,m=a.root.getLayout();m.width===g.width&&m.height===g.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:l,willDeleteEls:v,renderFinally:b};function x(S,w,A,D,M){D?(w=S,P(S,function(N,E){!N.isRemoved()&&I(E,E)})):new Bh(w,S,L,L).add(I).update(I).remove(Yt(I,null)).execute();function L(N){return N.getId()}function I(N,E){var O=N!=null?S[N]:null,j=E!=null?w[E]:null,B=d(O,j,A,M);B&&x(O&&O.viewChildren||[],j&&j.viewChildren||[],B,D,M+1)}}function _(S){var w=vf();return S&&P(S,function(A,D){var M=w[D];P(A,function(L){L&&(M.push(L),og(L).willDelete=!0)})}),w}function b(){P(v,function(S){P(S,function(w){w.parent&&w.parent.remove(w)})}),P(h,function(S){S.invisible=!0,S.dirty()})}},t.prototype._doAnimation=function(n,r,i,a){var o=i.get("animationDurationUpdate"),l=i.get("animationEasing"),s=(Rt(o)?0:o)||0,c=(Rt(l)?null:l)||"cubicOut",h=EW();P(r.willDeleteEls,function(d,v){P(d,function(g,m){if(!g.invisible){var x=g.parent,_,b=og(x);if(a&&a.direction==="drillDown")_=x===a.rootNodeGroup?{shape:{x:0,y:0,width:b.nodeWidth,height:b.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var S=0,w=0;b.willDelete||(S=b.nodeWidth/2,w=b.nodeHeight/2),_=v==="nodeGroup"?{x:S,y:w,style:{opacity:0}}:{shape:{x:S,y:w,width:0,height:0},style:{opacity:0}}}_&&h.add(g,_,s,0,c)}})}),P(this._storage,function(d,v){P(d,function(g,m){var x=r.lastsForAnimation[v][m],_={};x&&(g instanceof ie?x.oldX!=null&&(_.x=g.x,_.y=g.y,g.x=x.oldX,g.y=x.oldY):(x.oldShape&&(_.shape=dt({},g.shape),g.setShape(x.oldShape)),x.fadein?(g.setStyle("opacity",0),_.style={opacity:1}):g.style.opacity!==1&&(_.style={opacity:1})),h.add(g,_,s,0,c))})},this),this._state="animating",h.finished(Ct(function(){this._state="ready",r.renderFinally()},this)).start()},t.prototype._resetController=function(n){var r=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 MS(n.getZr()),i.on("pan",Ct(this._onPan,this)),i.on("zoom",Ct(this._onZoom,this))),i.enable(o.get("roam"),{api:n,zInfo:{component:o},triggerInfo:{roamTrigger:o.get("roamTrigger"),isInSelf:function(l,s,c){var h=r._containerGroup;return h?h.getBoundingRect().contain(s-h.x,c-h.y):!1}}}),a.zoomLimit=o.get("scaleLimit"),a.zoom=o.get("zoom")},t.prototype._clearController=function(){var n=this._controller;this._controllerHost=null,n&&(n.dispose(),n=null)},t.prototype._onPan=function(n){if(this._state!=="animating"&&(Math.abs(n.dx)>Jk||Math.abs(n.dy)>Jk)){var r=this.seriesModel.getData().tree.root;if(!r)return;var i=r.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+n.dx,y:i.y+n.dy,width:i.width,height:i.height}})}},t.prototype._onZoom=function(n){var r=n.originX,i=n.originY,a=n.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var l=o.getLayout();if(!l)return;var s=new Vt(l.x,l.y,l.width,l.height),c=null,h=this._controllerHost;c=h.zoomLimit;var d=h.zoom=h.zoom||1;if(d*=a,c){var v=c.min||0,g=c.max||1/0;d=Math.max(Math.min(g,d),v)}var m=d/h.zoom;h.zoom=d;var x=this.seriesModel.layoutInfo;r-=x.x,i-=x.y;var _=di();Kf(_,_,[-r,-i]),PR(_,_,[m,m]),Kf(_,_,[r,i]),s.applyTransform(_),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(n){var r=this;n.on("click",function(i){if(r._state==="ready"){var a=r.seriesModel.get("nodeClick",!0);if(a){var o=r.findTarget(i.offsetX,i.offsetY);if(o){var l=o.node;if(l.getLayout().isLeafRoot)r._rootToNode(o);else if(a==="zoomToNode")r._zoomToNode(o);else if(a==="link"){var s=l.hostTree.data.getItemModel(l.dataIndex),c=s.get("link",!0),h=s.get("target",!0)||"blank";c&&Fp(c,h)}}}}},this)},t.prototype._renderBreadcrumb=function(n,r,i){var a=this;i||(i=n.get("leafDepth",!0)!=null?{node:n.getViewRoot()}:this.findTarget(r.getWidth()/2,r.getHeight()/2),i||(i={node:n.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new AW(this.group))).render(n,r,i.node,function(o){a._state!=="animating"&&(kS(n.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=vf(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(n){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:n.node})},t.prototype._rootToNode=function(n){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:n.node})},t.prototype.findTarget=function(n,r){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var l=this._storage.background[o.getRawIndex()];if(l){var s=l.transformCoordToLocal(n,r),c=l.shape;if(c.x<=s[0]&&s[0]<=c.x+c.width&&c.y<=s[1]&&s[1]<=c.y+c.height)i={node:o,offsetX:s[0],offsetY:s[1]};else return!1}},this),i},t.type="treemap",t})(Ye);function vf(){return{nodeGroup:[],background:[],content:[]}}function BW(e,t,n,r,i,a,o,l,s,c){if(!o)return;var h=o.getLayout(),d=e.getData(),v=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!h||!h.isInView)return;var g=h.width,m=h.height,x=h.borderWidth,_=h.invisible,b=o.getRawIndex(),S=l&&l.getRawIndex(),w=o.viewChildren,A=h.upperHeight,D=w&&w.length,M=v.getModel("itemStyle"),L=v.getModel(["emphasis","itemStyle"]),I=v.getModel(["blur","itemStyle"]),N=v.getModel(["select","itemStyle"]),E=M.get("borderRadius")||0,O=ut("nodeGroup",Bb);if(!O)return;if(s.add(O),O.x=h.x||0,O.y=h.y||0,O.markRedraw(),og(O).nodeWidth=g,og(O).nodeHeight=m,h.isAboveViewRoot)return O;var j=ut("background",Kk,c,IW);j&&F(O,j,D&&h.upperLabelHeight);var B=v.getModel("emphasis"),U=B.get("focus"),W=B.get("blurScope"),H=B.get("disabled"),q=U==="ancestor"?o.getAncestorsIndices():U==="descendant"?o.getDescendantIndices():U;if(D)ah(O)&&Nl(O,!1),j&&(Nl(j,!H),d.setItemGraphicEl(o.dataIndex,j),Jx(j,q,W));else{var X=ut("content",Kk,c,OW);X&&Y(O,X),j.disableMorphing=!0,j&&ah(j)&&Nl(j,!1),Nl(O,!H),d.setItemGraphicEl(o.dataIndex,O);var J=v.getShallow("cursor");J&&X.attr("cursor",J),Jx(O,q,W)}return O;function F(pt,vt,Dt){var yt=Zt(vt);if(yt.dataIndex=o.dataIndex,yt.seriesIndex=e.seriesIndex,vt.setShape({x:0,y:0,width:g,height:m,r:E}),_)Z(vt);else{vt.invisible=!1;var Mt=o.getVisual("style"),_e=Mt.stroke,Jt=nL(M);Jt.fill=_e;var fe=Ll(L);fe.fill=L.get("borderColor");var Ae=Ll(I);Ae.fill=I.get("borderColor");var Je=Ll(N);if(Je.fill=N.get("borderColor"),Dt){var fr=g-2*x;V(vt,_e,Mt.opacity,{x,y:0,width:fr,height:A})}else vt.removeTextContent();vt.setStyle(Jt),vt.ensureState("emphasis").style=fe,vt.ensureState("blur").style=Ae,vt.ensureState("select").style=Je,$x(vt)}pt.add(vt)}function Y(pt,vt){var Dt=Zt(vt);Dt.dataIndex=o.dataIndex,Dt.seriesIndex=e.seriesIndex;var yt=Math.max(g-2*x,0),Mt=Math.max(m-2*x,0);if(vt.culling=!0,vt.setShape({x,y:x,width:yt,height:Mt,r:E}),_)Z(vt);else{vt.invisible=!1;var _e=o.getVisual("style"),Jt=_e.fill,fe=nL(M);fe.fill=Jt,fe.decal=_e.decal;var Ae=Ll(L),Je=Ll(I),fr=Ll(N);V(vt,Jt,_e.opacity,null),vt.setStyle(fe),vt.ensureState("emphasis").style=Ae,vt.ensureState("blur").style=Je,vt.ensureState("select").style=fr,$x(vt)}pt.add(vt)}function Z(pt){!pt.invisible&&a.push(pt)}function V(pt,vt,Dt,yt){var Mt=v.getModel(yt?eL:tL),_e=Yn(v.get("name"),null),Jt=Mt.getShallow("show");xi(pt,Qr(v,yt?eL:tL),{defaultText:Jt?_e:null,inheritColor:vt,defaultOpacity:Dt,labelFetcher:e,labelDataIndex:o.dataIndex});var fe=pt.getTextContent();if(fe){var Ae=fe.style,Je=xg(Ae.padding||0);yt&&(pt.setTextConfig({layoutRect:yt}),fe.disableLabelLayout=!0),fe.beforeUpdate=function(){var An=Math.max((yt?yt.width:pt.shape.width)-Je[1]-Je[3],0),ni=Math.max((yt?yt.height:pt.shape.height)-Je[0]-Je[2],0);(Ae.width!==An||Ae.height!==ni)&&fe.setStyle({width:An,height:ni})},Ae.truncateMinChar=2,Ae.lineOverflow="truncate",tt(Ae,yt,h);var fr=fe.getState("emphasis");tt(fr?fr.style:null,yt,h)}}function tt(pt,vt,Dt){var yt=pt?pt.text:null;if(!vt&&Dt.isLeafRoot&&yt!=null){var Mt=e.get("drillDownIcon",!0);pt.text=Mt?Mt+" "+yt:yt}}function ut(pt,vt,Dt,yt){var Mt=S!=null&&n[pt][S],_e=i[pt];return Mt?(n[pt][S]=null,gt(_e,Mt)):_||(Mt=new vt,Mt instanceof qu&&(Mt.z2=NW(Dt,yt)),wt(_e,Mt)),t[pt][b]=Mt}function gt(pt,vt){var Dt=pt[b]={};vt instanceof Bb?(Dt.oldX=vt.x,Dt.oldY=vt.y):Dt.oldShape=dt({},vt.shape)}function wt(pt,vt){var Dt=pt[b]={},yt=o.parentNode,Mt=vt instanceof ie;if(yt&&(!r||r.direction==="drillDown")){var _e=0,Jt=0,fe=i.background[yt.getRawIndex()];!r&&fe&&fe.oldShape&&(_e=fe.oldShape.width,Jt=fe.oldShape.height),Mt?(Dt.oldX=0,Dt.oldY=Jt):Dt.oldShape={x:_e,y:Jt,width:0,height:0}}Dt.fadein=!Mt}}function NW(e,t){return e*RW+t}var bh=P,PW=Lt,lg=-1,gn=(function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=It(t);this.type=r,this.mappingMethod=n,this._normalizeData=jW[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n==="piecewise"?(z1(i),HW(i)):n==="category"?i.categories?VW(i):z1(i,!0):($r(n!=="linear"||i.dataExtent),z1(i))}return e.prototype.mapValueToVisual=function(t){var n=this._normalizeData(t);return this._normalizedToVisual(n,t)},e.prototype.getNormalizer=function(){return Ct(this._normalizeData,this)},e.listVisualTypes=function(){return Be(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(t,n,r){Lt(t)?P(t,n,r):n.call(r,t)},e.mapVisual=function(t,n,r){var i,a=mt(t)?[]:Lt(t)?{}:(i=!0,null);return e.eachVisual(t,function(o,l){var s=n.call(r,o,l);i?a=s:a[l]=s}),a},e.retrieveVisuals=function(t){var n={},r;return t&&bh(e.visualHandlers,function(i,a){t.hasOwnProperty(a)&&(n[a]=t[a],r=!0)}),r?n:null},e.prepareVisualTypes=function(t){if(mt(t))t=t.slice();else if(PW(t)){var n=[];bh(t,function(r,i){n.push(i)}),t=n}else return[];return t.sort(function(r,i){return i==="color"&&r!=="color"&&r.indexOf("color")===0?1:-1}),t},e.dependsOn=function(t,n){return n==="color"?!!(t&&t.indexOf(n)===0):t===n},e.findPieceIndex=function(t,n,r){for(var i,a=1/0,o=0,l=n.length;o<l;o++){var s=n[o].value;if(s!=null){if(s===t||St(s)&&s===t+"")return o;r&&v(s,o)}}for(var o=0,l=n.length;o<l;o++){var c=n[o],h=c.interval,d=c.close;if(h){if(h[0]===-1/0){if(Xv(d[1],t,h[1]))return o}else if(h[1]===1/0){if(Xv(d[0],h[0],t))return o}else if(Xv(d[0],h[0],t)&&Xv(d[1],t,h[1]))return o;r&&v(h[0],o),r&&v(h[1],o)}}if(r)return t===1/0?n.length-1:t===-1/0?0:i;function v(g,m){var x=Math.abs(g-t);x<a&&(a=x,i=m)}},e.visualHandlers={color:{applyVisual:pf("color"),getColorMapper:function(){var t=this.option;return Ct(t.mappingMethod==="category"?function(n,r){return!r&&(n=this._normalizeData(n)),If.call(this,n)}:function(n,r,i){var a=!!i;return!r&&(n=this._normalizeData(n)),i=A0(n,t.parsedVisual,i),a?i:Ca(i,"rgba")},this)},_normalizedToVisual:{linear:function(t){return Ca(A0(t,this.option.parsedVisual),"rgba")},category:If,piecewise:function(t,n){var r=Pb.call(this,n);return r==null&&(r=Ca(A0(t,this.option.parsedVisual),"rgba")),r},fixed:El}},colorHue:qv(function(t,n){return Ao(t,n)}),colorSaturation:qv(function(t,n){return Ao(t,null,n)}),colorLightness:qv(function(t,n){return Ao(t,null,null,n)}),colorAlpha:qv(function(t,n){return QR(t,n)}),decal:{applyVisual:pf("decal"),_normalizedToVisual:{linear:null,category:If,piecewise:null,fixed:null}},opacity:{applyVisual:pf("opacity"),_normalizedToVisual:Nb([0,1])},liftZ:{applyVisual:pf("liftZ"),_normalizedToVisual:{linear:El,category:El,piecewise:El,fixed:El}},symbol:{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r("symbol",i)},_normalizedToVisual:{linear:rL,category:If,piecewise:function(t,n){var r=Pb.call(this,n);return r==null&&(r=rL.call(this,t)),r},fixed:El}},symbolSize:{applyVisual:pf("symbolSize"),_normalizedToVisual:Nb([0,1])}},e})();function HW(e){var t=e.pieceList;e.hasSpecialVisual=!1,P(t,function(n,r){n.originIndex=r,n.visual!=null&&(e.hasSpecialVisual=!0)})}function VW(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(bh(t,function(o,l){n[o]=l}),!mt(r)){var i=[];Lt(r)?bh(r,function(o,l){var s=n[l];i[s??lg]=o}):i[lg]=r,r=q5(e,i)}for(var a=t.length-1;a>=0;a--)r[a]==null&&(delete n[t[a]],t.pop())}function z1(e,t){var n=e.visual,r=[];Lt(n)?bh(n,function(a){r.push(a)}):n!=null&&r.push(n);var i={color:1,symbol:1};!t&&r.length===1&&!i.hasOwnProperty(e.type)&&(r[1]=r[0]),q5(e,r)}function qv(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r("color",e(n("color"),i))},_normalizedToVisual:Nb([0,1])}}function rL(e){var t=this.option.visual;return t[Math.round(ue(e,[0,1],[0,t.length-1],!0))]||{}}function pf(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function If(e){var t=this.option.visual;return t[this.option.loop&&e!==lg?e%t.length:e]}function El(){return this.option.visual[0]}function Nb(e){return{linear:function(t){return ue(t,e,this.option.visual,!0)},category:If,piecewise:function(t,n){var r=Pb.call(this,n);return r==null&&(r=ue(t,e,this.option.visual,!0)),r},fixed:El}}function Pb(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=gn.findPieceIndex(e,n),i=n[r];if(i&&i.visual)return i.visual[this.type]}}function q5(e,t){return e.visual=t,e.type==="color"&&(e.parsedVisual=bt(t,function(n){var r=Xr(n);return r||[0,0,0,1]})),t}var jW={linear:function(e){return ue(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=gn.findPieceIndex(e,t,!0);if(n!=null)return ue(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return t??lg},fixed:Cn};function Xv(e,t,n){return e?t<=n:t<n}var FW="itemStyle",X5=be();const GW={seriesType:"treemap",reset:function(e){var t=e.getData().tree,n=t.root;n.isRemoved()||Z5(n,{},e.getViewRoot().getAncestors(),e)}};function Z5(e,t,n,r){var i=e.getModel(),a=e.getLayout(),o=e.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var l=i.getModel(FW),s=UW(l,t,r),c=o.ensureUniqueItemVisual(e.dataIndex,"style"),h=l.get("borderColor"),d=l.get("borderColorSaturation"),v;d!=null&&(v=iL(s),h=YW(d,v)),c.stroke=h;var g=e.viewChildren;if(!g||!g.length)v=iL(s),c.fill=v;else{var m=WW(e,i,a,l,s,g);P(g,function(x,_){if(x.depth>=n.length||x===n[x.depth]){var b=qW(i,s,x,_,m,r);Z5(x,b,n,r)}})}}}function UW(e,t,n){var r=dt({},t),i=n.designatedVisualItemStyle;return P(["color","colorAlpha","colorSaturation"],function(a){i[a]=t[a];var o=e.get(a);i[a]=null,o!=null&&(r[a]=o)}),r}function iL(e){var t=B1(e,"color");if(t){var n=B1(e,"colorAlpha"),r=B1(e,"colorSaturation");return r&&(t=Ao(t,null,null,r)),n&&(t=QR(t,n)),t}}function YW(e,t){return t!=null?Ao(t,null,null,e):null}function B1(e,t){var n=e[t];if(n!=null&&n!=="none")return n}function WW(e,t,n,r,i,a){if(!(!a||!a.length)){var o=N1(t,"color")||i.color!=null&&i.color!=="none"&&(N1(t,"colorAlpha")||N1(t,"colorSaturation"));if(o){var l=t.get("visualMin"),s=t.get("visualMax"),c=n.dataExtent.slice();l!=null&&l<c[0]&&(c[0]=l),s!=null&&s>c[1]&&(c[1]=s);var h=t.get("colorMappingBy"),d={type:o.name,dataExtent:c,visual:o.range};d.type==="color"&&(h==="index"||h==="id")?(d.mappingMethod="category",d.loop=!0):d.mappingMethod="linear";var v=new gn(d);return X5(v).drColorMappingBy=h,v}}}function N1(e,t){var n=e.get(t);return mt(n)&&n.length?{name:t,range:n}:null}function qW(e,t,n,r,i,a){var o=dt({},t);if(i){var l=i.type,s=l==="color"&&X5(i).drColorMappingBy,c=s==="index"?r:s==="id"?a.mapIdToIndex(n.getId()):n.getValue(e.get("visualDimension"));o[l]=i.mapValueToVisual(c)}return o}var _h=Math.max,sg=Math.min,aL=Io,ES=P,$5=["itemStyle","borderWidth"],XW=["itemStyle","gapWidth"],ZW=["upperLabel","show"],$W=["upperLabel","height"];const QW={seriesType:"treemap",reset:function(e,t,n,r){var i=e.option,a=ti(e,n).refContainer,o=On(e.getBoxLayoutParams(),a),l=i.size||[],s=At(aL(o.width,l[0]),a.width),c=At(aL(o.height,l[1]),a.height),h=r&&r.type,d=["treemapZoomToNode","treemapRootToNode"],v=xh(r,d,e),g=h==="treemapRender"||h==="treemapMove"?r.rootRect:null,m=e.getViewRoot(),x=U5(m);if(h!=="treemapMove"){var _=h==="treemapZoomToNode"?rq(e,v,m,s,c):g?[g.width,g.height]:[s,c],b=i.sort;b&&b!=="asc"&&b!=="desc"&&(b="desc");var S={squareRatio:i.squareRatio,sort:b,leafDepth:i.leafDepth};m.hostTree.clearLayouts();var w={x:0,y:0,width:_[0],height:_[1],area:_[0]*_[1]};m.setLayout(w),Q5(m,S,!1,0),w=m.getLayout(),ES(x,function(D,M){var L=(x[M+1]||m).getValue();D.setLayout(dt({dataExtent:[L,L],borderWidth:0,upperHeight:0},w))})}var A=e.getData().tree.root;A.setLayout(iq(o,g,v),!0),e.setLayoutInfo(o),K5(A,new Vt(-o.x,-o.y,n.getWidth(),n.getHeight()),x,m,0)}};function Q5(e,t,n,r){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var l=e.getModel(),s=l.get($5),c=l.get(XW)/2,h=J5(l),d=Math.max(s,h),v=s-c,g=d-c;e.setLayout({borderWidth:s,upperHeight:d,upperLabelHeight:h},!0),i=_h(i-2*v,0),a=_h(a-v-g,0);var m=i*a,x=KW(e,l,m,t,n,r);if(x.length){var _={x:v,y:g,width:i,height:a},b=sg(i,a),S=1/0,w=[];w.area=0;for(var A=0,D=x.length;A<D;){var M=x[A];w.push(M),w.area+=M.getLayout().area;var L=nq(w,b,t.squareRatio);L<=S?(A++,S=L):(w.area-=w.pop().getLayout().area,oL(w,b,_,c,!1),b=sg(_.width,_.height),w.length=w.area=0,S=1/0)}if(w.length&&oL(w,b,_,c,!0),!n){var I=l.get("childrenVisibleMin");I!=null&&m<I&&(n=!0)}for(var A=0,D=x.length;A<D;A++)Q5(x[A],t,n,r+1)}}}function KW(e,t,n,r,i,a){var o=e.children||[],l=r.sort;l!=="asc"&&l!=="desc"&&(l=null);var s=r.leafDepth!=null&&r.leafDepth<=a;if(i&&!s)return e.viewChildren=[];o=Ze(o,function(g){return!g.isRemoved()}),tq(o,l);var c=eq(t,o,l);if(c.sum===0)return e.viewChildren=[];if(c.sum=JW(t,n,c.sum,l,o),c.sum===0)return e.viewChildren=[];for(var h=0,d=o.length;h<d;h++){var v=o[h].getValue()/c.sum*n;o[h].setLayout({area:v})}return s&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:c.dataExtent},!0),o}function JW(e,t,n,r,i){if(!r)return n;for(var a=e.get("visibleMin"),o=i.length,l=o,s=o-1;s>=0;s--){var c=i[r==="asc"?o-s-1:s].getValue();c/n*t<a&&(l=s,n-=c)}return r==="asc"?i.splice(0,o-l):i.splice(l,o-l),n}function tq(e,t){return t&&e.sort(function(n,r){var i=t==="asc"?n.getValue()-r.getValue():r.getValue()-n.getValue();return i===0?t==="asc"?n.dataIndex-r.dataIndex:r.dataIndex-n.dataIndex:i}),e}function eq(e,t,n){for(var r=0,i=0,a=t.length;i<a;i++)r+=t[i].getValue();var o=e.get("visualDimension"),l;return!t||!t.length?l=[NaN,NaN]:o==="value"&&n?(l=[t[t.length-1].getValue(),t[0].getValue()],n==="asc"&&l.reverse()):(l=[1/0,-1/0],ES(t,function(s){var c=s.getValue(o);c<l[0]&&(l[0]=c),c>l[1]&&(l[1]=c)})),{sum:r,dataExtent:l}}function nq(e,t,n){for(var r=0,i=1/0,a=0,o=void 0,l=e.length;a<l;a++)o=e[a].getLayout().area,o&&(o<i&&(i=o),o>r&&(r=o));var s=e.area*e.area,c=t*t*n;return s?_h(c*r/s,s/(c*i)):1/0}function oL(e,t,n,r,i){var a=t===n.width?0:1,o=1-a,l=["x","y"],s=["width","height"],c=n[l[a]],h=t?e.area/t:0;(i||h>n[s[o]])&&(h=n[s[o]]);for(var d=0,v=e.length;d<v;d++){var g=e[d],m={},x=h?g.getLayout().area/h:0,_=m[s[o]]=_h(h-2*r,0),b=n[l[a]]+n[s[a]]-c,S=d===v-1||b<x?b:x,w=m[s[a]]=_h(S-2*r,0);m[l[o]]=n[l[o]]+sg(r,_/2),m[l[a]]=c+sg(r,w/2),c+=S,g.setLayout(m,!0)}n[l[o]]+=h,n[s[o]]-=h}function rq(e,t,n,r,i){var a=(t||{}).node,o=[r,i];if(!a||a===n)return o;for(var l,s=r*i,c=s*e.option.zoomToNodeRatio;l=a.parentNode;){for(var h=0,d=l.children,v=0,g=d.length;v<g;v++)h+=d[v].getValue();var m=a.getValue();if(m===0)return o;c*=h/m;var x=l.getModel(),_=x.get($5),b=Math.max(_,J5(x));c+=4*_*_+(3*_+b)*Math.pow(c,.5),c>JM&&(c=JM),a=l}c<s&&(c=s);var S=Math.pow(c/s,.5);return[r*S,i*S]}function iq(e,t,n){if(t)return{x:t.x,y:t.y};var r={x:0,y:0};if(!n)return r;var i=n.node,a=i.getLayout();if(!a)return r;for(var o=[a.width/2,a.height/2],l=i;l;){var s=l.getLayout();o[0]+=s.x,o[1]+=s.y,l=l.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}function K5(e,t,n,r,i){var a=e.getLayout(),o=n[i],l=o&&o===e;if(!(o&&!l||i===n.length&&e!==r)){e.setLayout({isInView:!0,invisible:!l&&!t.intersect(a),isAboveViewRoot:l},!0);var s=new Vt(t.x-a.x,t.y-a.y,t.width,t.height);ES(e.viewChildren||[],function(c){K5(c,s,n,r,i+1)})}}function J5(e){return e.get(ZW)?e.get($W):0}function aq(e){e.registerSeriesModel(TW),e.registerChartView(zW),e.registerVisual(GW),e.registerLayout(QW),wW(e)}function su(e){return"_EC_"+e}var oq=(function(){function e(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(t,n){t=t==null?""+n:""+t;var r=this._nodesMap;if(!r[su(t)]){var i=new Rl(t,n);return i.hostGraph=this,this.nodes.push(i),r[su(t)]=i,i}},e.prototype.getNodeByIndex=function(t){var n=this.data.getRawIndex(t);return this.nodes[n]},e.prototype.getNodeById=function(t){return this._nodesMap[su(t)]},e.prototype.addEdge=function(t,n,r){var i=this._nodesMap,a=this._edgesMap;if(ve(t)&&(t=this.nodes[t]),ve(n)&&(n=this.nodes[n]),t instanceof Rl||(t=i[su(t)]),n instanceof Rl||(n=i[su(n)]),!(!t||!n)){var o=t.id+"-"+n.id,l=new tB(t,n,r);return l.hostGraph=this,this._directed&&(t.outEdges.push(l),n.inEdges.push(l)),t.edges.push(l),t!==n&&n.edges.push(l),this.edges.push(l),a[o]=l,l}},e.prototype.getEdgeByIndex=function(t){var n=this.edgeData.getRawIndex(t);return this.edges[n]},e.prototype.getEdge=function(t,n){t instanceof Rl&&(t=t.id),n instanceof Rl&&(n=n.id);var r=this._edgesMap;return this._directed?r[t+"-"+n]:r[t+"-"+n]||r[n+"-"+t]},e.prototype.eachNode=function(t,n){for(var r=this.nodes,i=r.length,a=0;a<i;a++)r[a].dataIndex>=0&&t.call(n,r[a],a)},e.prototype.eachEdge=function(t,n){for(var r=this.edges,i=r.length,a=0;a<i;a++)r[a].dataIndex>=0&&r[a].node1.dataIndex>=0&&r[a].node2.dataIndex>=0&&t.call(n,r[a],a)},e.prototype.breadthFirstTraverse=function(t,n,r,i){if(n instanceof Rl||(n=this._nodesMap[su(n)]),!!n){for(var a=r==="out"?"outEdges":r==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(i,n,null))for(var l=[n];l.length;)for(var s=l.shift(),c=s[a],o=0;o<c.length;o++){var h=c[o],d=h.node1===s?h.node2:h.node1;if(!d.__visited){if(t.call(i,d,s))return;l.push(d),d.__visited=!0}}}},e.prototype.update=function(){for(var t=this.data,n=this.edgeData,r=this.nodes,i=this.edges,a=0,o=r.length;a<o;a++)r[a].dataIndex=-1;for(var a=0,o=t.count();a<o;a++)r[t.getRawIndex(a)].dataIndex=a;n.filterSelf(function(l){var s=i[n.getRawIndex(l)];return s.node1.dataIndex>=0&&s.node2.dataIndex>=0});for(var a=0,o=i.length;a<o;a++)i[a].dataIndex=-1;for(var a=0,o=n.count();a<o;a++)i[n.getRawIndex(a)].dataIndex=a},e.prototype.clone=function(){for(var t=new e(this._directed),n=this.nodes,r=this.edges,i=0;i<n.length;i++)t.addNode(n[i].id,n[i].dataIndex);for(var i=0;i<r.length;i++){var a=r[i];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t},e})(),Rl=(function(){function e(t,n){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=t??"",this.dataIndex=n??-1}return e.prototype.degree=function(){return this.edges.length},e.prototype.inDegree=function(){return this.inEdges.length},e.prototype.outDegree=function(){return this.outEdges.length},e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var n=this.hostGraph,r=n.data.getItemModel(this.dataIndex);return r.getModel(t)}},e.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},n=0;n<this.edges.length;n++){var r=this.edges[n];r.dataIndex<0||(t.edge.push(r.dataIndex),t.node.push(r.node1.dataIndex,r.node2.dataIndex))}return t},e.prototype.getTrajectoryDataIndices=function(){for(var t=Bt(),n=Bt(),r=0,i=this.edges.length;r<i;r++){var a=this.edges[r];if(!(a.dataIndex<0)){t.set(a.dataIndex,!0);for(var o=[a.node1],l=[a.node2],s=0;s<o.length;){var c=o[s];s++,n.set(c.dataIndex,!0);for(var h=c.inEdges,d=0,v=h.length,g=void 0,m=void 0;d<v;d++)g=h[d],m=g.dataIndex,m>=0&&!t.hasKey(m)&&(t.set(m,!0),o.push(g.node1))}for(s=0;s<l.length;){var x=l[s];s++,n.set(x.dataIndex,!0);for(var _=x.outEdges,d=0,b=_.length,S=void 0,w=void 0;d<b;d++)S=_[d],w=S.dataIndex,w>=0&&!t.hasKey(w)&&(t.set(w,!0),l.push(S.node2))}}}return{edge:t.keys(),node:n.keys()}},e})(),tB=(function(){function e(t,n,r){this.dataIndex=-1,this.node1=t,this.node2=n,this.dataIndex=r??-1}return e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var n=this.hostGraph,r=n.edgeData.getItemModel(this.dataIndex);return r.getModel(t)}},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var t=Bt(),n=Bt();t.set(this.dataIndex,!0);for(var r=[this.node1],i=[this.node2],a=0;a<r.length;){var o=r[a];a++,n.set(o.dataIndex,!0);for(var l=o.inEdges,s=0,c=l.length,h=void 0,d=void 0;s<c;s++)h=o.inEdges[s],d=h.dataIndex,d>=0&&!t.hasKey(d)&&(t.set(d,!0),r.push(h.node1))}for(a=0;a<i.length;){var v=i[a];a++,n.set(v.dataIndex,!0);for(var g=v.outEdges,s=0,c=g.length,m=void 0,x=void 0;s<c;s++)m=v.outEdges[s],x=m.dataIndex,x>=0&&!t.hasKey(x)&&(t.set(x,!0),i.push(m.node2))}return{edge:t.keys(),node:n.keys()}},e})();function eB(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||"value"),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}Xn(Rl,eB("hostGraph","data"));Xn(tB,eB("hostGraph","edgeData"));function lq(e,t,n,r,i){for(var a=new oq(r),o=0;o<e.length;o++)a.addNode(Io(e[o].id,e[o].name,o),o);for(var l=[],s=[],c=0,o=0;o<t.length;o++){var h=t[o],d=h.source,v=h.target;a.addEdge(d,v,c)&&(s.push(h),l.push(Io(Yn(h.id,null),d+" > "+v)),c++)}var g=n.get("coordinateSystem"),m;if(g==="cartesian2d"||g==="polar"||g==="matrix")m=Qu(e,n);else{var x=Oh.get(g),_=x?x.dimensions||[]:[];Wt(_,"value")<0&&_.concat(["value"]);var b=Vg(e,{coordDimensions:_,encodeDefine:n.getEncode()}).dimensions;m=new dh(b,n),m.initData(e)}var S=new dh(["value"],n);return S.initData(s,l),i&&i(m,S),j5({mainData:m,struct:a,structAttr:"graph",datas:{node:m,edge:S},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var sq=(function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e})(),uq=(function(e){ot(t,e);function t(n){var r=e.call(this,n)||this;return r.type="pointer",r}return t.prototype.getDefaultShape=function(){return new sq},t.prototype.buildPath=function(n,r){var i=Math.cos,a=Math.sin,o=r.r,l=r.width,s=r.angle,c=r.x-i(s)*l*(l>=o/3?1:2),h=r.y-a(s)*l*(l>=o/3?1:2);s=r.angle-Math.PI/2,n.moveTo(c,h),n.lineTo(r.x+i(s)*l,r.y+a(s)*l),n.lineTo(r.x+i(r.angle)*o,r.y+a(r.angle)*o),n.lineTo(r.x-i(s)*l,r.y-a(s)*l),n.lineTo(c,h)},t})(ce);function cq(e,t){var n=e.get("center"),r=t.getWidth(),i=t.getHeight(),a=Math.min(r,i),o=At(n[0],t.getWidth()),l=At(n[1],t.getHeight()),s=At(e.get("radius"),a/2);return{cx:o,cy:l,r:s}}function Zv(e,t){var n=e==null?"":e+"";return t&&(St(t)?n=t.replace("{value}",n):Rt(t)&&(n=t(e))),n}var fq=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,i){this.group.removeAll();var a=n.get(["axisLine","lineStyle","color"]),o=cq(n,i);this._renderMain(n,r,i,a,o),this._data=n.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(n,r,i,a,o){var l=this.group,s=n.get("clockwise"),c=-n.get("startAngle")/180*Math.PI,h=-n.get("endAngle")/180*Math.PI,d=n.getModel("axisLine"),v=d.get("roundCap"),g=v?rg:yi,m=d.get("show"),x=d.getModel("lineStyle"),_=x.get("width"),b=[c,h];D_(b,!s),c=b[0],h=b[1];for(var S=h-c,w=c,A=[],D=0;m&&D<a.length;D++){var M=Math.min(Math.max(a[D][0],0),1);h=c+S*M;var L=new g({shape:{startAngle:w,endAngle:h,cx:o.cx,cy:o.cy,clockwise:s,r0:o.r-_,r:o.r},silent:!0});L.setStyle({fill:a[D][1]}),L.setStyle(x.getLineStyle(["color","width"])),A.push(L),w=h}A.reverse(),P(A,function(N){return l.add(N)});var I=function(N){if(N<=0)return a[0][1];var E;for(E=0;E<a.length;E++)if(a[E][0]>=N&&(E===0?0:a[E-1][0])<N)return a[E][1];return a[E-1][1]};this._renderTicks(n,r,i,I,o,c,h,s,_),this._renderTitleAndDetail(n,r,i,I,o),this._renderAnchor(n,o),this._renderPointer(n,r,i,I,o,c,h,s,_)},t.prototype._renderTicks=function(n,r,i,a,o,l,s,c,h){for(var d=this.group,v=o.cx,g=o.cy,m=o.r,x=+n.get("min"),_=+n.get("max"),b=n.getModel("splitLine"),S=n.getModel("axisTick"),w=n.getModel("axisLabel"),A=n.get("splitNumber"),D=S.get("splitNumber"),M=At(b.get("length"),m),L=At(S.get("length"),m),I=l,N=(s-l)/A,E=N/D,O=b.getModel("lineStyle").getLineStyle(),j=S.getModel("lineStyle").getLineStyle(),B=b.get("distance"),U,W,H=0;H<=A;H++){if(U=Math.cos(I),W=Math.sin(I),b.get("show")){var q=B?B+h:h,X=new Gi({shape:{x1:U*(m-q)+v,y1:W*(m-q)+g,x2:U*(m-M-q)+v,y2:W*(m-M-q)+g},style:O,silent:!0});O.stroke==="auto"&&X.setStyle({stroke:a(H/A)}),d.add(X)}if(w.get("show")){var q=w.get("distance")+B,J=Zv(pn(H/A*(_-x)+x),w.get("formatter")),F=a(H/A),Y=U*(m-M-q)+v,Z=W*(m-M-q)+g,V=w.get("rotate"),tt=0;V==="radial"?(tt=-I+2*Math.PI,tt>Math.PI/2&&(tt+=Math.PI)):V==="tangential"?tt=-I-Math.PI/2:ve(V)&&(tt=V*Math.PI/180),tt===0?d.add(new me({style:$e(w,{text:J,x:Y,y:Z,verticalAlign:W<-.8?"top":W>.8?"bottom":"middle",align:U<-.4?"left":U>.4?"right":"center"},{inheritColor:F}),silent:!0})):d.add(new me({style:$e(w,{text:J,x:Y,y:Z,verticalAlign:"middle",align:"center"},{inheritColor:F}),silent:!0,originX:Y,originY:Z,rotation:tt}))}if(S.get("show")&&H!==A){var q=S.get("distance");q=q?q+h:h;for(var ut=0;ut<=D;ut++){U=Math.cos(I),W=Math.sin(I);var gt=new Gi({shape:{x1:U*(m-q)+v,y1:W*(m-q)+g,x2:U*(m-L-q)+v,y2:W*(m-L-q)+g},silent:!0,style:j});j.stroke==="auto"&>.setStyle({stroke:a((H+ut/D)/A)}),d.add(gt),I+=E}I-=E}else I+=N}},t.prototype._renderPointer=function(n,r,i,a,o,l,s,c,h){var d=this.group,v=this._data,g=this._progressEls,m=[],x=n.get(["pointer","show"]),_=n.getModel("progress"),b=_.get("show"),S=n.getData(),w=S.mapDimension("value"),A=+n.get("min"),D=+n.get("max"),M=[A,D],L=[l,s];function I(E,O){var j=S.getItemModel(E),B=j.getModel("pointer"),U=At(B.get("width"),o.r),W=At(B.get("length"),o.r),H=n.get(["pointer","icon"]),q=B.get("offsetCenter"),X=At(q[0],o.r),J=At(q[1],o.r),F=B.get("keepAspect"),Y;return H?Y=Wn(H,X-U/2,J-W,U,W,null,F):Y=new uq({shape:{angle:-Math.PI/2,width:U,r:W,x:X,y:J}}),Y.rotation=-(O+Math.PI/2),Y.x=o.cx,Y.y=o.cy,Y}function N(E,O){var j=_.get("roundCap"),B=j?rg:yi,U=_.get("overlap"),W=U?_.get("width"):h/S.count(),H=U?o.r-W:o.r-(E+1)*W,q=U?o.r:o.r-E*W,X=new B({shape:{startAngle:l,endAngle:O,cx:o.cx,cy:o.cy,clockwise:c,r0:H,r:q}});return U&&(X.z2=ue(S.get(w,E),[A,D],[100,0],!0)),X}(b||x)&&(S.diff(v).add(function(E){var O=S.get(w,E);if(x){var j=I(E,l);Qe(j,{rotation:-((isNaN(+O)?L[0]:ue(O,M,L,!0))+Math.PI/2)},n),d.add(j),S.setItemGraphicEl(E,j)}if(b){var B=N(E,l),U=_.get("clip");Qe(B,{shape:{endAngle:ue(O,M,L,U)}},n),d.add(B),Xx(n.seriesIndex,S.dataType,E,B),m[E]=B}}).update(function(E,O){var j=S.get(w,E);if(x){var B=v.getItemGraphicEl(O),U=B?B.rotation:l,W=I(E,U);W.rotation=U,Ve(W,{rotation:-((isNaN(+j)?L[0]:ue(j,M,L,!0))+Math.PI/2)},n),d.add(W),S.setItemGraphicEl(E,W)}if(b){var H=g[O],q=H?H.shape.endAngle:l,X=N(E,q),J=_.get("clip");Ve(X,{shape:{endAngle:ue(j,M,L,J)}},n),d.add(X),Xx(n.seriesIndex,S.dataType,E,X),m[E]=X}}).execute(),S.each(function(E){var O=S.getItemModel(E),j=O.getModel("emphasis"),B=j.get("focus"),U=j.get("blurScope"),W=j.get("disabled");if(x){var H=S.getItemGraphicEl(E),q=S.getItemVisual(E,"style"),X=q.fill;if(H instanceof Jr){var J=H.style;H.useStyle(dt({image:J.image,x:J.x,y:J.y,width:J.width,height:J.height},q))}else H.useStyle(q),H.type!=="pointer"&&H.setColor(X);H.setStyle(O.getModel(["pointer","itemStyle"]).getItemStyle()),H.style.fill==="auto"&&H.setStyle("fill",a(ue(S.get(w,E),M,[0,1],!0))),H.z2EmphasisLift=0,Mr(H,O),In(H,B,U,W)}if(b){var F=m[E];F.useStyle(S.getItemVisual(E,"style")),F.setStyle(O.getModel(["progress","itemStyle"]).getItemStyle()),F.z2EmphasisLift=0,Mr(F,O),In(F,B,U,W)}}),this._progressEls=m)},t.prototype._renderAnchor=function(n,r){var i=n.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),l=i.get("icon"),s=i.get("offsetCenter"),c=i.get("keepAspect"),h=Wn(l,r.cx-o/2+At(s[0],r.r),r.cy-o/2+At(s[1],r.r),o,o,null,c);h.z2=i.get("showAbove")?1:0,h.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(h)}},t.prototype._renderTitleAndDetail=function(n,r,i,a,o){var l=this,s=n.getData(),c=s.mapDimension("value"),h=+n.get("min"),d=+n.get("max"),v=new ie,g=[],m=[],x=n.isAnimationEnabled(),_=n.get(["pointer","showAbove"]);s.diff(this._data).add(function(b){g[b]=new me({silent:!0}),m[b]=new me({silent:!0})}).update(function(b,S){g[b]=l._titleEls[S],m[b]=l._detailEls[S]}).execute(),s.each(function(b){var S=s.getItemModel(b),w=s.get(c,b),A=new ie,D=a(ue(w,[h,d],[0,1],!0)),M=S.getModel("title");if(M.get("show")){var L=M.get("offsetCenter"),I=o.cx+At(L[0],o.r),N=o.cy+At(L[1],o.r),E=g[b];E.attr({z2:_?0:2,style:$e(M,{x:I,y:N,text:s.getName(b),align:"center",verticalAlign:"middle"},{inheritColor:D})}),A.add(E)}var O=S.getModel("detail");if(O.get("show")){var j=O.get("offsetCenter"),B=o.cx+At(j[0],o.r),U=o.cy+At(j[1],o.r),W=At(O.get("width"),o.r),H=At(O.get("height"),o.r),q=n.get(["progress","show"])?s.getItemVisual(b,"style").fill:D,E=m[b],X=O.get("formatter");E.attr({z2:_?0:2,style:$e(O,{x:B,y:U,text:Zv(w,X),width:isNaN(W)?null:W,height:isNaN(H)?null:H,align:"center",verticalAlign:"middle"},{inheritColor:q})}),JI(E,{normal:O},w,function(F){return Zv(F,X)}),x&&p8(E,b,s,n,{getFormattedLabel:function(F,Y,Z,V,tt,ut){return Zv(ut?ut.interpolatedValue:w,X)}}),A.add(E)}v.add(A)}),this.group.add(v),this._titleEls=g,this._detailEls=m},t.type="gauge",t})(Ye),hq=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n}return t.prototype.getInitialData=function(n,r){return Ph(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,lt.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:lt.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:lt.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:lt.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:lt.color.neutral00,borderWidth:0,borderColor:lt.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:lt.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:lt.color.transparent,borderWidth:0,borderColor:lt.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:lt.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t})(Ke);function dq(e){e.registerChartView(fq),e.registerSeriesModel(hq)}var vq=["itemStyle","opacity"],pq=(function(e){ot(t,e);function t(n,r){var i=e.call(this)||this,a=i,o=new Wi,l=new me;return a.setTextContent(l),i.setTextGuideLine(o),i.updateData(n,r,!0),i}return t.prototype.updateData=function(n,r,i){var a=this,o=n.hostModel,l=n.getItemModel(r),s=n.getItemLayout(r),c=l.getModel("emphasis"),h=l.get(vq);h=h??1,i||Da(a),a.useStyle(n.getItemVisual(r,"style")),a.style.lineJoin="round",i?(a.setShape({points:s.points}),a.style.opacity=0,Qe(a,{style:{opacity:h}},o,r)):Ve(a,{style:{opacity:h},shape:{points:s.points}},o,r),Mr(a,l),this._updateLabel(n,r),In(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},t.prototype._updateLabel=function(n,r){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),l=n.hostModel,s=n.getItemModel(r),c=n.getItemLayout(r),h=c.label,d=n.getItemVisual(r,"style"),v=d.fill;xi(o,Qr(s),{labelFetcher:n.hostModel,labelDataIndex:r,defaultOpacity:d.opacity,defaultText:n.getName(r)},{normal:{align:h.textAlign,verticalAlign:h.verticalAlign}});var g=s.getModel("label"),m=g.get("color"),x=m==="inherit"?v:null;i.setTextConfig({local:!0,inside:!!h.inside,insideStroke:x,outsideFill:x});var _=h.linePoints;a.setShape({points:_}),i.textGuideLineConfig={anchor:_?new Ft(_[0][0],_[0][1]):null},Ve(o,{style:{x:h.x,y:h.y}},l,r),o.attr({rotation:h.rotation,originX:h.x,originY:h.y,z2:10}),t5(i,e5(s),{stroke:v})},t})(Yi),gq=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreLabelLineUpdate=!0,n}return t.prototype.render=function(n,r,i){var a=n.getData(),o=this._data,l=this.group;a.diff(o).add(function(s){var c=new pq(a,s);a.setItemGraphicEl(s,c),l.add(c)}).update(function(s,c){var h=o.getItemGraphicEl(c);h.updateData(a,s),l.add(h),a.setItemGraphicEl(s,h)}).remove(function(s){var c=o.getItemGraphicEl(s);ku(c,n,s)}).execute(),this._data=a},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t})(Ye),mq=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(n){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new _S(Ct(this.getData,this),Ct(this.getRawData,this)),this._defaultLabelLine(n)},t.prototype.getInitialData=function(n,r){return Ph(this,{coordDimensions:["value"],encodeDefaulter:Yt(_O,this)})},t.prototype._defaultLabelLine=function(n){Rp(n,"labelLine",["show"]);var r=n.labelLine,i=n.emphasis.labelLine;r.show=r.show&&n.label.show,i.show=i.show&&n.emphasis.label.show},t.prototype.getDataParams=function(n){var r=this.getData(),i=e.prototype.getDataParams.call(this,n),a=r.mapDimension("value"),o=r.getSum(a);return i.percent=o?+(r.get(a,n)/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:lt.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:lt.color.primary}}},t})(Ke);function yq(e,t){for(var n=e.mapDimension("value"),r=e.mapArray(n,function(s){return s}),i=[],a=t==="ascending",o=0,l=e.count();o<l;o++)i[o]=o;return Rt(t)?i.sort(t):t!=="none"&&i.sort(function(s,c){return a?r[s]-r[c]:r[c]-r[s]}),i}function xq(e){var t=e.hostModel,n=t.get("orient");e.each(function(r){var i=e.getItemModel(r),a=i.getModel("label"),o=a.get("position"),l=i.getModel("labelLine"),s=e.getItemLayout(r),c=s.points,h=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",d,v,g,m;if(h)o==="insideLeft"?(v=(c[0][0]+c[3][0])/2+5,g=(c[0][1]+c[3][1])/2,d="left"):o==="insideRight"?(v=(c[1][0]+c[2][0])/2-5,g=(c[1][1]+c[2][1])/2,d="right"):(v=(c[0][0]+c[1][0]+c[2][0]+c[3][0])/4,g=(c[0][1]+c[1][1]+c[2][1]+c[3][1])/4,d="center"),m=[[v,g],[v,g]];else{var x=void 0,_=void 0,b=void 0,S=void 0,w=l.get("length");o==="left"?(x=(c[3][0]+c[0][0])/2,_=(c[3][1]+c[0][1])/2,b=x-w,v=b-5,d="right"):o==="right"?(x=(c[1][0]+c[2][0])/2,_=(c[1][1]+c[2][1])/2,b=x+w,v=b+5,d="left"):o==="top"?(x=(c[3][0]+c[0][0])/2,_=(c[3][1]+c[0][1])/2,S=_-w,g=S-5,d="center"):o==="bottom"?(x=(c[1][0]+c[2][0])/2,_=(c[1][1]+c[2][1])/2,S=_+w,g=S+5,d="center"):o==="rightTop"?(x=n==="horizontal"?c[3][0]:c[1][0],_=n==="horizontal"?c[3][1]:c[1][1],n==="horizontal"?(S=_-w,g=S-5,d="center"):(b=x+w,v=b+5,d="top")):o==="rightBottom"?(x=c[2][0],_=c[2][1],n==="horizontal"?(S=_+w,g=S+5,d="center"):(b=x+w,v=b+5,d="bottom")):o==="leftTop"?(x=c[0][0],_=n==="horizontal"?c[0][1]:c[1][1],n==="horizontal"?(S=_-w,g=S-5,d="center"):(b=x-w,v=b-5,d="right")):o==="leftBottom"?(x=n==="horizontal"?c[1][0]:c[3][0],_=n==="horizontal"?c[1][1]:c[2][1],n==="horizontal"?(S=_+w,g=S+5,d="center"):(b=x-w,v=b-5,d="right")):(x=(c[1][0]+c[2][0])/2,_=(c[1][1]+c[2][1])/2,n==="horizontal"?(S=_+w,g=S+5,d="center"):(b=x+w,v=b+5,d="left")),n==="horizontal"?(b=x,v=b):(S=_,g=S),m=[[x,_],[b,S]]}s.label={linePoints:m,x:v,y:g,verticalAlign:"middle",textAlign:d,inside:h}})}function bq(e,t){e.eachSeriesByType("funnel",function(n){var r=n.getData(),i=r.mapDimension("value"),a=n.get("sort"),o=ti(n,t),l=On(n.getBoxLayoutParams(),o.refContainer),s=n.get("orient"),c=l.width,h=l.height,d=yq(r,a),v=l.x,g=l.y,m=s==="horizontal"?[At(n.get("minSize"),h),At(n.get("maxSize"),h)]:[At(n.get("minSize"),c),At(n.get("maxSize"),c)],x=r.getDataExtent(i),_=n.get("min"),b=n.get("max");_==null&&(_=Math.min(x[0],0)),b==null&&(b=x[1]);var S=n.get("funnelAlign"),w=n.get("gap"),A=s==="horizontal"?c:h,D=(A-w*(r.count()-1))/r.count(),M=function(W,H){if(s==="horizontal"){var q=r.get(i,W)||0,X=ue(q,[_,b],m,!0),J=void 0;switch(S){case"top":J=g;break;case"center":J=g+(h-X)/2;break;case"bottom":J=g+(h-X);break}return[[H,J],[H,J+X]]}var F=r.get(i,W)||0,Y=ue(F,[_,b],m,!0),Z;switch(S){case"left":Z=v;break;case"center":Z=v+(c-Y)/2;break;case"right":Z=v+c-Y;break}return[[Z,H],[Z+Y,H]]};a==="ascending"&&(D=-D,w=-w,s==="horizontal"?v+=c:g+=h,d=d.reverse());for(var L=0;L<d.length;L++){var I=d[L],N=d[L+1],E=r.getItemModel(I);if(s==="horizontal"){var O=E.get(["itemStyle","width"]);O==null?O=D:(O=At(O,c),a==="ascending"&&(O=-O));var j=M(I,v),B=M(N,v+O);v+=O+w,r.setItemLayout(I,{points:j.concat(B.slice().reverse())})}else{var U=E.get(["itemStyle","height"]);U==null?U=D:(U=At(U,h),a==="ascending"&&(U=-U));var j=M(I,g),B=M(N,g+U);g+=U+w,r.setItemLayout(I,{points:j.concat(B.slice().reverse())})}}xq(r)})}function _q(e){e.registerChartView(gq),e.registerSeriesModel(mq),e.registerLayout(bq),e.registerProcessor(jg("funnel"))}function ts(e,t,n,r,i,a){e=e||0;var o=n[1]-n[0];if(i!=null&&(i=uu(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),r==="all"){var l=Math.abs(t[1]-t[0]);l=uu(l,[0,o]),i=a=uu(l,[i,a]),r=0}t[0]=uu(t[0],n),t[1]=uu(t[1],n);var s=P1(t,r);t[r]+=e;var c=i||0,h=n.slice();s.sign<0?h[0]+=c:h[1]-=c,t[r]=uu(t[r],h);var d;return d=P1(t,r),i!=null&&(d.sign!==s.sign||d.span<i)&&(t[1-r]=t[r]+s.sign*i),d=P1(t,r),a!=null&&d.span>a&&(t[1-r]=t[r]+d.sign*a),t}function P1(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function uu(e,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,e))}var es=!0,Sh=Math.min,Vu=Math.max,Sq=Math.pow,wq=1e4,Tq=6,Cq=6,lL="globalPan",Mq={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Aq={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},sL={brushStyle:{lineWidth:2,stroke:lt.color.backgroundTint,fill:lt.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},Dq=0,kq=(function(e){ot(t,e);function t(n){var r=e.call(this)||this;return r._track=[],r._covers=[],r._handlers={},r._zr=n,r.group=new ie,r._uid="brushController_"+Dq++,P(Bq,function(i,a){this._handlers[a]=Ct(i,this)},r),r}return t.prototype.enableBrush=function(n){return this._brushType&&this._doDisableBrush(),n.brushType&&this._doEnableBrush(n),this},t.prototype._doEnableBrush=function(n){var r=this._zr;this._enableGlobalPan||iW(r,lL,this._uid),P(this._handlers,function(i,a){r.on(a,i)}),this._brushType=n.brushType,this._brushOption=qt(It(sL),n,!0)},t.prototype._doDisableBrush=function(){var n=this._zr;aW(n,lL,this._uid),P(this._handlers,function(r,i){n.off(i,r)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(n){if(n&&n.length){var r=this._panels={};P(n,function(i){r[i.panelId]=It(i)})}else this._panels=null;return this},t.prototype.mount=function(n){n=n||{},this._enableGlobalPan=n.enableGlobalPan;var r=this.group;return this._zr.add(r),r.attr({x:n.x||0,y:n.y||0,rotation:n.rotation||0,scaleX:n.scaleX||1,scaleY:n.scaleY||1}),this._transform=r.getLocalTransform(),this},t.prototype.updateCovers=function(n){n=bt(n,function(v){return qt(It(sL),v,!0)});var r="\0-brush-index-",i=this._covers,a=this._covers=[],o=this,l=this._creatingCover;return new Bh(i,n,c,s).add(h).update(h).remove(d).execute(),this;function s(v,g){return(v.id!=null?v.id:r+g)+"-"+v.brushType}function c(v,g){return s(v.__brushOption,g)}function h(v,g){var m=n[v];if(g!=null&&i[g]===l)a[v]=i[g];else{var x=a[v]=g!=null?(i[g].__brushOption=m,i[g]):rB(o,nB(o,m));RS(o,x)}}function d(v){i[v]!==l&&o.group.remove(i[v])}},t.prototype.unmount=function(){return this.enableBrush(!1),Hb(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t})(Kr);function nB(e,t){var n=Gg[t.brushType].createCover(e,t);return n.__brushOption=t,aB(n,t),e.group.add(n),n}function rB(e,t){var n=IS(t);return n.endCreating&&(n.endCreating(e,t),aB(t,t.__brushOption)),t}function iB(e,t){var n=t.__brushOption;IS(t).updateCoverShape(e,t,n.range,n)}function aB(e,t){var n=t.z;n==null&&(n=wq),e.traverse(function(r){r.z=n,r.z2=n})}function RS(e,t){IS(t).updateCommon(e,t),iB(e,t)}function IS(e){return Gg[e.__brushOption.brushType]}function OS(e,t,n){var r=e._panels;if(!r)return es;var i,a=e._transform;return P(r,function(o){o.isTargetByCursor(t,n,a)&&(i=o)}),i}function oB(e,t){var n=e._panels;if(!n)return es;var r=t.__brushOption.panelId;return r!=null?n[r]:es}function Hb(e){var t=e._covers,n=t.length;return P(t,function(r){e.group.remove(r)},e),t.length=0,!!n}function ns(e,t){var n=bt(e._covers,function(r){var i=r.__brushOption,a=It(i.range);return{brushType:i.brushType,panelId:i.panelId,range:a}});e.trigger("brush",{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function Lq(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],r=t[0],i=n[0]-r[0],a=n[1]-r[1],o=Sq(i*i+a*a,.5);return o>Tq}function lB(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function sB(e,t,n,r){var i=new ie;return i.add(new le({name:"main",style:zS(n),silent:!0,draggable:!0,cursor:"move",drift:Yt(uL,e,t,i,["n","s","w","e"]),ondragend:Yt(ns,t,{isEnd:!0})})),P(r,function(a){i.add(new le({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Yt(uL,e,t,i,a),ondragend:Yt(ns,t,{isEnd:!0})}))}),i}function uB(e,t,n,r){var i=r.brushStyle.lineWidth||0,a=Vu(i,Cq),o=n[0][0],l=n[1][0],s=o-i/2,c=l-i/2,h=n[0][1],d=n[1][1],v=h-a+i/2,g=d-a+i/2,m=h-o,x=d-l,_=m+i,b=x+i;xa(e,t,"main",o,l,m,x),r.transformable&&(xa(e,t,"w",s,c,a,b),xa(e,t,"e",v,c,a,b),xa(e,t,"n",s,c,_,a),xa(e,t,"s",s,g,_,a),xa(e,t,"nw",s,c,a,a),xa(e,t,"ne",v,c,a,a),xa(e,t,"sw",s,g,a,a),xa(e,t,"se",v,g,a,a))}function Vb(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(zS(n)),i.attr({silent:!r,cursor:r?"move":"default"}),P([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=t.childOfName(a.join("")),l=a.length===1?jb(e,a[0]):Rq(e,a);o&&o.attr({silent:!r,invisible:!r,cursor:r?Aq[l]+"-resize":null})})}function xa(e,t,n,r,i,a,o){var l=t.childOfName(n);l&&l.setShape(Oq(BS(e,t,[[r,i],[r+a,i+o]])))}function zS(e){return $t({strokeNoScale:!0},e.brushStyle)}function cB(e,t,n,r){var i=[Sh(e,n),Sh(t,r)],a=[Vu(e,n),Vu(t,r)];return[[i[0],a[0]],[i[1],a[1]]]}function Eq(e){return Yl(e.group)}function jb(e,t){var n={w:"left",e:"right",n:"top",s:"bottom"},r={left:"w",right:"e",top:"n",bottom:"s"},i=Rg(n[t],Eq(e));return r[i]}function Rq(e,t){var n=[jb(e,t[0]),jb(e,t[1])];return(n[0]==="e"||n[0]==="w")&&n.reverse(),n.join("")}function uL(e,t,n,r,i,a){var o=n.__brushOption,l=e.toRectRange(o.range),s=fB(t,i,a);P(r,function(c){var h=Mq[c];l[h[0]][h[1]]+=s[h[0]]}),o.range=e.fromRectRange(cB(l[0][0],l[1][0],l[0][1],l[1][1])),RS(t,n),ns(t,{isEnd:!1})}function Iq(e,t,n,r){var i=t.__brushOption.range,a=fB(e,n,r);P(i,function(o){o[0]+=a[0],o[1]+=a[1]}),RS(e,t),ns(e,{isEnd:!1})}function fB(e,t,n){var r=e.group,i=r.transformCoordToLocal(t,n),a=r.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function BS(e,t,n){var r=oB(e,t);return r&&r!==es?r.clipPath(n,e._transform):It(n)}function Oq(e){var t=Sh(e[0][0],e[1][0]),n=Sh(e[0][1],e[1][1]),r=Vu(e[0][0],e[1][0]),i=Vu(e[0][1],e[1][1]);return{x:t,y:n,width:r-t,height:i-n}}function zq(e,t,n){if(!(!e._brushType||Nq(e,t.offsetX,t.offsetY))){var r=e._zr,i=e._covers,a=OS(e,t,n);if(!e._dragging)for(var o=0;o<i.length;o++){var l=i[o].__brushOption;if(a&&(a===es||l.panelId===a.panelId)&&Gg[l.brushType].contain(i[o],n[0],n[1]))return}a&&r.setCursorStyle("crosshair")}}function Fb(e){var t=e.event;t.preventDefault&&t.preventDefault()}function Gb(e,t,n){return e.childOfName("main").contain(t,n)}function hB(e,t,n,r){var i=e._creatingCover,a=e._creatingPanel,o=e._brushOption,l;if(e._track.push(n.slice()),Lq(e)||i){if(a&&!i){o.brushMode==="single"&&Hb(e);var s=It(o);s.brushType=cL(s.brushType,a),s.panelId=a===es?null:a.panelId,i=e._creatingCover=nB(e,s),e._covers.push(i)}if(i){var c=Gg[cL(e._brushType,a)],h=i.__brushOption;h.range=c.getCreatingRange(BS(e,i,e._track)),r&&(rB(e,i),c.updateCommon(e,i)),iB(e,i),l={isEnd:r}}}else r&&o.brushMode==="single"&&o.removeOnClick&&OS(e,t,n)&&Hb(e)&&(l={isEnd:r,removeOnClick:!0});return l}function cL(e,t){return e==="auto"?t.defaultBrushType:e}var Bq={mousedown:function(e){if(this._dragging)fL(this,e);else if(!e.target||!e.target.draggable){Fb(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null;var n=this._creatingPanel=OS(this,e,t);n&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,r=this.group.transformCoordToLocal(t,n);if(zq(this,e,r),this._dragging){Fb(e);var i=hB(this,e,r,!1);i&&ns(this,i)}},mouseup:function(e){fL(this,e)}};function fL(e,t){if(e._dragging){Fb(t);var n=t.offsetX,r=t.offsetY,i=e.group.transformCoordToLocal(n,r),a=hB(e,t,i,!0);e._dragging=!1,e._track=[],e._creatingCover=null,a&&ns(e,a)}}function Nq(e,t,n){var r=e._zr;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var Gg={lineX:hL(0),lineY:hL(1),rect:{createCover:function(e,t){function n(r){return r}return sB({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=lB(e);return cB(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){uB(e,t,n,r)},updateCommon:Vb,contain:Gb},polygon:{createCover:function(e,t){var n=new ie;return n.add(new Wi({name:"main",style:zS(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Yi({name:"main",draggable:!0,drift:Yt(Iq,e,t),ondragend:Yt(ns,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:BS(e,t,n)})},updateCommon:Vb,contain:Gb}};function hL(e){return{createCover:function(t,n){return sB({toRectRange:function(r){var i=[r,[0,100]];return e&&i.reverse(),i},fromRectRange:function(r){return r[e]}},t,n,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var n=lB(t),r=Sh(n[0][e],n[1][e]),i=Vu(n[0][e],n[1][e]);return[r,i]},updateCoverShape:function(t,n,r,i){var a,o=oB(t,n);if(o!==es&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e);else{var l=t._zr;a=[0,[l.getWidth(),l.getHeight()][1-e]]}var s=[r,a];e&&s.reverse(),uB(t,n,s,i)},updateCommon:Vb,contain:Gb}}function Pq(e){return e=NS(e),function(t){return qI(t,e)}}function Hq(e,t){return e=NS(e),function(n){var r=t??n,i=r?e.width:e.height,a=r?e.x:e.y;return[a,a+(i||0)]}}function Vq(e,t,n){var r=NS(e);return function(i,a){return r.contain(a[0],a[1])&&!H5(i,t,n)}}function NS(e){return Vt.create(e)}var jq=(function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e})(),Fq=(function(e){ot(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new jq},t.prototype.buildPath=function(n,r){var i=r.extent;n.moveTo(r.x1,r.y1),n.bezierCurveTo(r.cpx1,r.cpy1,r.cpx2,r.cpy2,r.x2,r.y2),r.orient==="vertical"?(n.lineTo(r.x2+i,r.y2),n.bezierCurveTo(r.cpx2+i,r.cpy2,r.cpx1+i,r.cpy1,r.x1+i,r.y1)):(n.lineTo(r.x2,r.y2+i),n.bezierCurveTo(r.cpx2,r.cpy2+i,r.cpx1,r.cpy1+i,r.x1,r.y1+i)),n.closePath()},t.prototype.highlight=function(){Ql(this)},t.prototype.downplay=function(){Kl(this)},t})(ce),Gq=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._mainGroup=new ie,n._focusAdjacencyDisabled=!1,n}return t.prototype.init=function(n,r){this._controller=new MS(r.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(n,r,i){var a=this,o=n.getGraph(),l=this._mainGroup,s=n.layoutInfo,c=s.width,h=s.height,d=n.getData(),v=n.getData("edge"),g=n.get("orient");this._model=n,l.removeAll(),l.x=s.x,l.y=s.y,this._updateViewCoordSys(n,i),hW(n,i,l,this._controller,this._controllerHost),o.eachEdge(function(m){var x=new Fq,_=Zt(x);_.dataIndex=m.dataIndex,_.seriesIndex=n.seriesIndex,_.dataType="edge";var b=m.getModel(),S=b.getModel("lineStyle"),w=S.get("curveness"),A=m.node1.getLayout(),D=m.node1.getModel(),M=D.get("localX"),L=D.get("localY"),I=m.node2.getLayout(),N=m.node2.getModel(),E=N.get("localX"),O=N.get("localY"),j=m.getLayout(),B,U,W,H,q,X,J,F;x.shape.extent=Math.max(1,j.dy),x.shape.orient=g,g==="vertical"?(B=(M!=null?M*c:A.x)+j.sy,U=(L!=null?L*h:A.y)+A.dy,W=(E!=null?E*c:I.x)+j.ty,H=O!=null?O*h:I.y,q=B,X=U*(1-w)+H*w,J=W,F=U*w+H*(1-w)):(B=(M!=null?M*c:A.x)+A.dx,U=(L!=null?L*h:A.y)+j.sy,W=E!=null?E*c:I.x,H=(O!=null?O*h:I.y)+j.ty,q=B*(1-w)+W*w,X=U,J=B*w+W*(1-w),F=H),x.setShape({x1:B,y1:U,x2:W,y2:H,cpx1:q,cpy1:X,cpx2:J,cpy2:F}),x.useStyle(S.getItemStyle()),dL(x.style,g,m);var Y=""+b.get("value"),Z=Qr(b,"edgeLabel");xi(x,Z,{labelFetcher:{getFormattedLabel:function(ut,gt,wt,pt,vt,Dt){return n.getFormattedLabel(ut,gt,"edge",pt,Co(vt,Z.normal&&Z.normal.get("formatter"),Y),Dt)}},labelDataIndex:m.dataIndex,defaultText:Y}),x.setTextConfig({position:"inside"});var V=b.getModel("emphasis");Mr(x,b,"lineStyle",function(ut){var gt=ut.getItemStyle();return dL(gt,g,m),gt}),l.add(x),v.setItemGraphicEl(m.dataIndex,x);var tt=V.get("focus");In(x,tt==="adjacency"?m.getAdjacentDataIndices():tt==="trajectory"?m.getTrajectoryDataIndices():tt,V.get("blurScope"),V.get("disabled"))}),o.eachNode(function(m){var x=m.getLayout(),_=m.getModel(),b=_.get("localX"),S=_.get("localY"),w=_.getModel("emphasis"),A=_.get(["itemStyle","borderRadius"])||0,D=new le({shape:{x:b!=null?b*c:x.x,y:S!=null?S*h:x.y,width:x.dx,height:x.dy,r:A},style:_.getModel("itemStyle").getItemStyle(),z2:10});xi(D,Qr(_),{labelFetcher:{getFormattedLabel:function(L,I){return n.getFormattedLabel(L,I,"node")}},labelDataIndex:m.dataIndex,defaultText:m.id}),D.disableLabelAnimation=!0,D.setStyle("fill",m.getVisual("color")),D.setStyle("decal",m.getVisual("style").decal),Mr(D,_),l.add(D),d.setItemGraphicEl(m.dataIndex,D),Zt(D).dataType="node";var M=w.get("focus");In(D,M==="adjacency"?m.getAdjacentDataIndices():M==="trajectory"?m.getTrajectoryDataIndices():M,w.get("blurScope"),w.get("disabled"))}),d.eachItemGraphicEl(function(m,x){var _=d.getItemModel(x);_.get("draggable")&&(m.drift=function(b,S){a._focusAdjacencyDisabled=!0,this.shape.x+=b,this.shape.y+=S,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:n.id,dataIndex:d.getRawIndex(x),localX:this.shape.x/c,localY:this.shape.y/h})},m.ondragend=function(){a._focusAdjacencyDisabled=!1},m.draggable=!0,m.cursor="move")}),!this._data&&n.isAnimationEnabled()&&l.setClipPath(Uq(l.getBoundingRect(),n,function(){l.removeClipPath()})),this._data=n.getData()},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._updateViewCoordSys=function(n,r){var i=n.layoutInfo,a=i.width,o=i.height,l=n.coordinateSystem=new vW(null,{api:r,ecModel:n.ecModel});l.zoomLimit=n.get("scaleLimit"),l.setBoundingRect(0,0,a,o),l.setCenter(n.get("center")),l.setZoom(n.get("zoom")),this._controllerHost.target.attr({x:l.x,y:l.y,scaleX:l.scaleX,scaleY:l.scaleY})},t.type="sankey",t})(Ye);function dL(e,t,n){switch(e.fill){case"source":e.fill=n.node1.getVisual("color"),e.decal=n.node1.getVisual("style").decal;break;case"target":e.fill=n.node2.getVisual("color"),e.decal=n.node2.getVisual("style").decal;break;case"gradient":var r=n.node1.getVisual("color"),i=n.node2.getVisual("color");St(r)&&St(i)&&(e.fill=new Eg(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:r,offset:0},{color:i,offset:1}]))}}function Uq(e,t,n){var r=new le({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Qe(r,{shape:{width:e.width+20}},t,n),r}var Yq=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(n,r){var i=n.edges||n.links||[],a=n.data||n.nodes||[],o=n.levels||[];this.levelModels=[];for(var l=this.levelModels,s=0;s<o.length;s++)o[s].depth!=null&&o[s].depth>=0&&(l[o[s].depth]=new Te(o[s],this,r));var c=lq(a,i,this,!0,h);return c.data;function h(d,v){d.wrapMethod("getItemModel",function(g,m){var x=g.parentModel,_=x.getData().getItemLayout(m);if(_){var b=_.depth,S=x.levelModels[b];S&&(g.parentModel=S)}return g}),v.wrapMethod("getItemModel",function(g,m){var x=g.parentModel,_=x.getGraph().getEdgeByIndex(m),b=_.node1.getLayout();if(b){var S=b.depth,w=x.levelModels[S];w&&(g.parentModel=w)}return g})}},t.prototype.setNodePosition=function(n,r){var i=this.option.data||this.option.nodes,a=i[n];a.localX=r[0],a.localY=r[1]},t.prototype.setCenter=function(n){this.option.center=n},t.prototype.setZoom=function(n){this.option.zoom=n},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(n,r,i){function a(g){return isNaN(g)||g==null}if(i==="edge"){var o=this.getDataParams(n,i),l=o.data,s=o.value,c=l.source+" -- "+l.target;return Ui("nameValue",{name:c,value:s,noValue:a(s)})}else{var h=this.getGraph().getNodeByIndex(n),d=h.getLayout().value,v=this.getDataParams(n,i).data.name;return Ui("nameValue",{name:v!=null?v+"":null,value:d,noValue:a(d)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(n,r){var i=e.prototype.getDataParams.call(this,n,r);if(i.value==null&&r==="node"){var a=this.getGraph().getNodeByIndex(n),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:lt.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:lt.color.primary}},animationEasing:"linear",animationDuration:1e3},t})(Ke);function Wq(e,t){e.eachSeriesByType("sankey",function(n){var r=n.get("nodeWidth"),i=n.get("nodeGap"),a=ti(n,t).refContainer,o=On(n.getBoxLayoutParams(),a);n.layoutInfo=o;var l=o.width,s=o.height,c=n.getGraph(),h=c.nodes,d=c.edges;Xq(h);var v=Ze(h,function(_){return _.getLayout().value===0}),g=v.length!==0?0:n.get("layoutIterations"),m=n.get("orient"),x=n.get("nodeAlign");qq(h,d,r,i,l,s,g,m,x)})}function qq(e,t,n,r,i,a,o,l,s){Zq(e,t,n,i,a,l,s),Jq(e,t,a,i,r,o,l),sX(e,l)}function Xq(e){P(e,function(t){var n=Lo(t.outEdges,ug),r=Lo(t.inEdges,ug),i=t.getValue()||0,a=Math.max(n,r,i);t.setLayout({value:a},!0)})}function Zq(e,t,n,r,i,a,o){for(var l=[],s=[],c=[],h=[],d=0,v=0;v<t.length;v++)l[v]=1;for(var v=0;v<e.length;v++)s[v]=e[v].inEdges.length,s[v]===0&&c.push(e[v]);for(var g=-1;c.length;){for(var m=0;m<c.length;m++){var x=c[m],_=x.hostGraph.data.getRawDataItem(x.dataIndex),b=_.depth!=null&&_.depth>=0;b&&_.depth>g&&(g=_.depth),x.setLayout({depth:b?_.depth:d},!0),a==="vertical"?x.setLayout({dy:n},!0):x.setLayout({dx:n},!0);for(var S=0;S<x.outEdges.length;S++){var w=x.outEdges[S],A=t.indexOf(w);l[A]=0;var D=w.node2,M=e.indexOf(D);--s[M]===0&&h.indexOf(D)<0&&h.push(D)}}++d,c=h,h=[]}for(var v=0;v<l.length;v++)if(l[v]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var L=g>d-1?g:d-1;o&&o!=="left"&&$q(e,o,a,L);var I=a==="vertical"?(i-n)/L:(r-n)/L;Kq(e,I,a)}function dB(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function $q(e,t,n,r){if(t==="right"){for(var i=[],a=e,o=0;a.length;){for(var l=0;l<a.length;l++){var s=a[l];s.setLayout({skNodeHeight:o},!0);for(var c=0;c<s.inEdges.length;c++){var h=s.inEdges[c];i.indexOf(h.node1)<0&&i.push(h.node1)}}a=i,i=[],++o}P(e,function(d){dB(d)||d.setLayout({depth:Math.max(0,r-d.getLayout().skNodeHeight)},!0)})}else t==="justify"&&Qq(e,r)}function Qq(e,t){P(e,function(n){!dB(n)&&!n.outEdges.length&&n.setLayout({depth:t},!0)})}function Kq(e,t,n){P(e,function(r){var i=r.getLayout().depth*t;n==="vertical"?r.setLayout({y:i},!0):r.setLayout({x:i},!0)})}function Jq(e,t,n,r,i,a,o){var l=tX(e,o);eX(l,t,n,r,i,o),H1(l,i,n,r,o);for(var s=1;a>0;a--)s*=.99,nX(l,s,o),H1(l,i,n,r,o),lX(l,s,o),H1(l,i,n,r,o)}function tX(e,t){var n=[],r=t==="vertical"?"y":"x",i=cV(e,function(a){return a.getLayout()[r]});return i.keys.sort(function(a,o){return a-o}),P(i.keys,function(a){n.push(i.buckets.get(a))}),n}function eX(e,t,n,r,i,a){var o=1/0;P(e,function(l){var s=l.length,c=0;P(l,function(d){c+=d.getLayout().value});var h=a==="vertical"?(r-(s-1)*i)/c:(n-(s-1)*i)/c;h<o&&(o=h)}),P(e,function(l){P(l,function(s,c){var h=s.getLayout().value*o;a==="vertical"?(s.setLayout({x:c},!0),s.setLayout({dx:h},!0)):(s.setLayout({y:c},!0),s.setLayout({dy:h},!0))})}),P(t,function(l){var s=+l.getValue()*o;l.setLayout({dy:s},!0)})}function H1(e,t,n,r,i){var a=i==="vertical"?"x":"y";P(e,function(o){o.sort(function(x,_){return x.getLayout()[a]-_.getLayout()[a]});for(var l,s,c,h=0,d=o.length,v=i==="vertical"?"dx":"dy",g=0;g<d;g++)s=o[g],c=h-s.getLayout()[a],c>0&&(l=s.getLayout()[a]+c,i==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0)),h=s.getLayout()[a]+s.getLayout()[v]+t;var m=i==="vertical"?r:n;if(c=h-t-m,c>0){l=s.getLayout()[a]-c,i==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0),h=l;for(var g=d-2;g>=0;--g)s=o[g],c=s.getLayout()[a]+s.getLayout()[v]+t-h,c>0&&(l=s.getLayout()[a]-c,i==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0)),h=s.getLayout()[a]}})}function nX(e,t,n){P(e.slice().reverse(),function(r){P(r,function(i){if(i.outEdges.length){var a=Lo(i.outEdges,rX,n)/Lo(i.outEdges,ug);if(isNaN(a)){var o=i.outEdges.length;a=o?Lo(i.outEdges,iX,n)/o:0}if(n==="vertical"){var l=i.getLayout().x+(a-No(i,n))*t;i.setLayout({x:l},!0)}else{var s=i.getLayout().y+(a-No(i,n))*t;i.setLayout({y:s},!0)}}})})}function rX(e,t){return No(e.node2,t)*e.getValue()}function iX(e,t){return No(e.node2,t)}function aX(e,t){return No(e.node1,t)*e.getValue()}function oX(e,t){return No(e.node1,t)}function No(e,t){return t==="vertical"?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function ug(e){return e.getValue()}function Lo(e,t,n){for(var r=0,i=e.length,a=-1;++a<i;){var o=+t(e[a],n);isNaN(o)||(r+=o)}return r}function lX(e,t,n){P(e,function(r){P(r,function(i){if(i.inEdges.length){var a=Lo(i.inEdges,aX,n)/Lo(i.inEdges,ug);if(isNaN(a)){var o=i.inEdges.length;a=o?Lo(i.inEdges,oX,n)/o:0}if(n==="vertical"){var l=i.getLayout().x+(a-No(i,n))*t;i.setLayout({x:l},!0)}else{var s=i.getLayout().y+(a-No(i,n))*t;i.setLayout({y:s},!0)}}})})}function sX(e,t){var n=t==="vertical"?"x":"y";P(e,function(r){r.outEdges.sort(function(i,a){return i.node2.getLayout()[n]-a.node2.getLayout()[n]}),r.inEdges.sort(function(i,a){return i.node1.getLayout()[n]-a.node1.getLayout()[n]})}),P(e,function(r){var i=0,a=0;P(r.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),P(r.inEdges,function(o){o.setLayout({ty:a},!0),a+=o.getLayout().dy})})}function uX(e){e.eachSeriesByType("sankey",function(t){var n=t.getGraph(),r=n.nodes,i=n.edges;if(r.length){var a=1/0,o=-1/0;P(r,function(l){var s=l.getLayout().value;s<a&&(a=s),s>o&&(o=s)}),P(r,function(l){var s=new gn({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:t.get("color")}),c=s.mapValueToVisual(l.getLayout().value),h=l.getModel().get(["itemStyle","color"]);h!=null?(l.setVisual("color",h),l.setVisual("style",{fill:h})):(l.setVisual("color",c),l.setVisual("style",{fill:c}))})}i.length&&P(i,function(l){var s=l.getModel().get("lineStyle");l.setVisual("style",s)})})}function cX(e){e.registerChartView(Gq),e.registerSeriesModel(Yq),e.registerLayout(Wq),e.registerVisual(uX),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,n){n.eachComponent({mainType:"series",subType:"sankey",query:t},function(r){r.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),e.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(t,n,r){n.eachComponent({mainType:"series",subType:"sankey",query:t},function(i){var a=i.coordinateSystem,o=dW(a,t,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var vB=(function(){function e(){}return e.prototype._hasEncodeRule=function(t){var n=this.getEncode();return n&&n.get(t)!=null},e.prototype.getInitialData=function(t,n){var r,i=n.getComponent("xAxis",this.get("xAxisIndex")),a=n.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),l=a.get("type"),s;o==="category"?(t.layout="horizontal",r=i.getOrdinalMeta(),s=!this._hasEncodeRule("x")):l==="category"?(t.layout="vertical",r=a.getOrdinalMeta(),s=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var c=["x","y"],h=t.layout==="horizontal"?0:1,d=this._baseAxisDim=c[h],v=c[1-h],g=[i,a],m=g[h].get("type"),x=g[1-h].get("type"),_=t.data;if(_&&s){var b=[];P(_,function(A,D){var M;mt(A)?(M=A.slice(),A.unshift(D)):mt(A.value)?(M=dt({},A),M.value=M.value.slice(),A.value.unshift(D)):M=A,b.push(M)}),t.data=b}var S=this.defaultValueDimensions,w=[{name:d,type:wb(m),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:v,type:wb(x),dimsDef:S.slice()}];return Ph(this,{coordDimensions:w,dimensionsCount:S.length+1,encodeDefaulter:Yt(bO,w,this)})},e.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},e})(),pB=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}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:lt.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:lt.color.shadow}},animationDuration:800},t})(Ke);Xn(pB,vB,!0);var fX=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,i){var a=n.getData(),o=this.group,l=this._data;this._data||o.removeAll();var s=n.get("layout")==="horizontal"?1:0;a.diff(l).add(function(c){if(a.hasValue(c)){var h=a.getItemLayout(c),d=vL(h,a,c,s,!0);a.setItemGraphicEl(c,d),o.add(d)}}).update(function(c,h){var d=l.getItemGraphicEl(h);if(!a.hasValue(c)){o.remove(d);return}var v=a.getItemLayout(c);d?(Da(d),gB(v,d,a,c)):d=vL(v,a,c,s),o.add(d),a.setItemGraphicEl(c,d)}).remove(function(c){var h=l.getItemGraphicEl(c);h&&o.remove(h)}).execute(),this._data=a},t.prototype.remove=function(n){var r=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&r.remove(a)})},t.type="boxplot",t})(Ye),hX=(function(){function e(){}return e})(),dX=(function(e){ot(t,e);function t(n){var r=e.call(this,n)||this;return r.type="boxplotBoxPath",r}return t.prototype.getDefaultShape=function(){return new hX},t.prototype.buildPath=function(n,r){var i=r.points,a=0;for(n.moveTo(i[a][0],i[a][1]),a++;a<4;a++)n.lineTo(i[a][0],i[a][1]);for(n.closePath();a<i.length;a++)n.moveTo(i[a][0],i[a][1]),a++,n.lineTo(i[a][0],i[a][1])},t})(ce);function vL(e,t,n,r,i){var a=e.ends,o=new dX({shape:{points:i?vX(a,r,e):a}});return gB(e,o,t,n,i),o}function gB(e,t,n,r,i){var a=n.hostModel,o=V_[i?"initProps":"updateProps"];o(t,{shape:{points:e.ends}},a,r),t.useStyle(n.getItemVisual(r,"style")),t.style.strokeNoScale=!0,t.z2=100;var l=n.getItemModel(r),s=l.getModel("emphasis");Mr(t,l),In(t,s.get("focus"),s.get("blurScope"),s.get("disabled"))}function vX(e,t,n){return bt(e,function(r){return r=r.slice(),r[t]=n.initBaseline,r})}var Xf=P;function pX(e){var t=gX(e);Xf(t,function(n){var r=n.seriesModels;r.length&&(mX(n),Xf(r,function(i,a){yX(i,n.boxOffsetList[a],n.boxWidthList[a])}))})}function gX(e){var t=[],n=[];return e.eachSeriesByType("boxplot",function(r){var i=r.getBaseAxis(),a=Wt(n,i);a<0&&(a=n.length,n[a]=i,t[a]={axis:i,seriesModels:[]}),t[a].seriesModels.push(r)}),t}function mX(e){var t=e.axis,n=e.seriesModels,r=n.length,i=e.boxWidthList=[],a=e.boxOffsetList=[],o=[],l;if(t.type==="category")l=t.getBandWidth();else{var s=0;Xf(n,function(m){s=Math.max(s,m.getData().count())});var c=t.getExtent();l=Math.abs(c[1]-c[0])/s}Xf(n,function(m){var x=m.get("boxWidth");mt(x)||(x=[x,x]),o.push([At(x[0],l)||0,At(x[1],l)||0])});var h=l*.8-2,d=h/r*.3,v=(h-d*(r-1))/r,g=v/2-h/2;Xf(n,function(m,x){a.push(g),g+=d+v,i.push(Math.min(Math.max(v,o[x][0]),o[x][1]))})}function yX(e,t,n){var r=e.coordinateSystem,i=e.getData(),a=n/2,o=e.get("layout")==="horizontal"?0:1,l=1-o,s=["x","y"],c=i.mapDimension(s[o]),h=i.mapDimensionsAll(s[l]);if(c==null||h.length<5)return;for(var d=0;d<i.count();d++){var v=i.get(c,d),g=w(v,h[2],d),m=w(v,h[0],d),x=w(v,h[1],d),_=w(v,h[3],d),b=w(v,h[4],d),S=[];A(S,x,!1),A(S,_,!0),S.push(m,x,b,_),D(S,m),D(S,b),D(S,g),i.setItemLayout(d,{initBaseline:g[l],ends:S})}function w(M,L,I){var N=i.get(L,I),E=[];E[o]=M,E[l]=N;var O;return isNaN(M)||isNaN(N)?O=[NaN,NaN]:(O=r.dataToPoint(E),O[o]+=t),O}function A(M,L,I){var N=L.slice(),E=L.slice();N[o]+=a,E[o]-=a,I?M.push(N,E):M.push(E,N)}function D(M,L){var I=L.slice(),N=L.slice();I[o]-=a,N[o]+=a,M.push(I,N)}}function xX(e,t){t=t||{};for(var n=[],r=[],i=t.boundIQR,a=i==="none"||i===0,o=0;o<e.length;o++){var l=yo(e[o].slice()),s=V0(l,.25),c=V0(l,.5),h=V0(l,.75),d=l[0],v=l[l.length-1],g=(i??1.5)*(h-s),m=a?d:Math.max(d,s-g),x=a?v:Math.min(v,h+g),_=t.itemNameFormatter,b=Rt(_)?_({value:o}):St(_)?_.replace("{value}",o+""):o+"";n.push([b,m,s,c,h,x]);for(var S=0;S<l.length;S++){var w=l[S];if(w<m||w>x){var A=[b,w];r.push(A)}}}return{boxData:n,outliers:r}}var bX={type:"echarts:boxplot",transform:function(t){var n=t.upstream;if(n.sourceFormat!==Mn){var r="";Fn(r)}var i=xX(n.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function _X(e){e.registerSeriesModel(pB),e.registerChartView(fX),e.registerLayout(pX),e.registerTransform(bX)}var SX=["itemStyle","borderColor"],wX=["itemStyle","borderColor0"],TX=["itemStyle","borderColorDoji"],CX=["itemStyle","color"],MX=["itemStyle","color0"];function PS(e,t){return t.get(e>0?CX:MX)}function HS(e,t){return t.get(e===0?TX:e>0?SX:wX)}var AX={seriesType:"candlestick",plan:zh(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e)){var n=e.pipelineContext.large;return!n&&{progress:function(r,i){for(var a;(a=r.next())!=null;){var o=i.getItemModel(a),l=i.getItemLayout(a).sign,s=o.getItemStyle();s.fill=PS(l,o),s.stroke=HS(l,o)||s.fill;var c=i.ensureUniqueItemVisual(a,"style");dt(c,s)}}}}}},DX=["color","borderColor"],kX=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(n),this._isLargeDraw?this._renderLarge(n):this._renderNormal(n)},t.prototype.incrementalPrepareRender=function(n,r,i){this._clear(),this._updateDrawMode(n)},t.prototype.incrementalRender=function(n,r,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(n,r):this._incrementalRenderNormal(n,r)},t.prototype.eachRendered=function(n){Xu(this._progressiveEls||this.group,n)},t.prototype._updateDrawMode=function(n){var r=n.pipelineContext.large;(this._isLargeDraw==null||r!==this._isLargeDraw)&&(this._isLargeDraw=r,this._clear())},t.prototype._renderNormal=function(n){var r=n.getData(),i=this._data,a=this.group,o=r.getLayout("isSimpleBox"),l=n.get("clip",!0),s=n.coordinateSystem,c=s.getArea&&s.getArea();this._data||a.removeAll(),r.diff(i).add(function(h){if(r.hasValue(h)){var d=r.getItemLayout(h);if(l&&pL(c,d))return;var v=V1(d,h,!0);Qe(v,{shape:{points:d.ends}},n,h),j1(v,r,h,o),a.add(v),r.setItemGraphicEl(h,v)}}).update(function(h,d){var v=i.getItemGraphicEl(d);if(!r.hasValue(h)){a.remove(v);return}var g=r.getItemLayout(h);if(l&&pL(c,g)){a.remove(v);return}v?(Ve(v,{shape:{points:g.ends}},n,h),Da(v)):v=V1(g),j1(v,r,h,o),a.add(v),r.setItemGraphicEl(h,v)}).remove(function(h){var d=i.getItemGraphicEl(h);d&&a.remove(d)}).execute(),this._data=r},t.prototype._renderLarge=function(n){this._clear(),gL(n,this.group);var r=n.get("clip",!0)?h5(n.coordinateSystem,!1,n):null;r?this.group.setClipPath(r):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(n,r){for(var i=r.getData(),a=i.getLayout("isSimpleBox"),o;(o=n.next())!=null;){var l=i.getItemLayout(o),s=V1(l);j1(s,i,o,a),s.incremental=!0,this.group.add(s),this._progressiveEls.push(s)}},t.prototype._incrementalRenderLarge=function(n,r){gL(r,this.group,this._progressiveEls,!0)},t.prototype.remove=function(n){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t})(Ye),LX=(function(){function e(){}return e})(),EX=(function(e){ot(t,e);function t(n){var r=e.call(this,n)||this;return r.type="normalCandlestickBox",r}return t.prototype.getDefaultShape=function(){return new LX},t.prototype.buildPath=function(n,r){var i=r.points;this.__simpleBox?(n.moveTo(i[4][0],i[4][1]),n.lineTo(i[6][0],i[6][1])):(n.moveTo(i[0][0],i[0][1]),n.lineTo(i[1][0],i[1][1]),n.lineTo(i[2][0],i[2][1]),n.lineTo(i[3][0],i[3][1]),n.closePath(),n.moveTo(i[4][0],i[4][1]),n.lineTo(i[5][0],i[5][1]),n.moveTo(i[6][0],i[6][1]),n.lineTo(i[7][0],i[7][1]))},t})(ce);function V1(e,t,n){var r=e.ends;return new EX({shape:{points:n?RX(r,e):r},z2:100})}function pL(e,t){for(var n=!0,r=0;r<t.ends.length;r++)if(e.contain(t.ends[r][0],t.ends[r][1])){n=!1;break}return n}function j1(e,t,n,r){var i=t.getItemModel(n);e.useStyle(t.getItemVisual(n,"style")),e.style.strokeNoScale=!0,e.__simpleBox=r,Mr(e,i);var a=t.getItemLayout(n).sign;P(e.states,function(l,s){var c=i.getModel(s),h=PS(a,c),d=HS(a,c)||h,v=l.style||(l.style={});h&&(v.fill=h),d&&(v.stroke=d)});var o=i.getModel("emphasis");In(e,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function RX(e,t){return bt(e,function(n){return n=n.slice(),n[1]=t.initBaseline,n})}var IX=(function(){function e(){}return e})(),F1=(function(e){ot(t,e);function t(n){var r=e.call(this,n)||this;return r.type="largeCandlestickBox",r}return t.prototype.getDefaultShape=function(){return new IX},t.prototype.buildPath=function(n,r){for(var i=r.points,a=0;a<i.length;)if(this.__sign===i[a++]){var o=i[a++];n.moveTo(o,i[a++]),n.lineTo(o,i[a++])}else a+=3},t})(ce);function gL(e,t,n,r){var i=e.getData(),a=i.getLayout("largePoints"),o=new F1({shape:{points:a},__sign:1,ignoreCoarsePointer:!0});t.add(o);var l=new F1({shape:{points:a},__sign:-1,ignoreCoarsePointer:!0});t.add(l);var s=new F1({shape:{points:a},__sign:0,ignoreCoarsePointer:!0});t.add(s),G1(1,o,e),G1(-1,l,e),G1(0,s,e),r&&(o.incremental=!0,l.incremental=!0),n&&n.push(o,l)}function G1(e,t,n,r){var i=HS(e,n)||PS(e,n),a=n.getModel("itemStyle").getItemStyle(DX);t.useStyle(a),t.style.fill=null,t.style.stroke=i}var mB=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(n,r,i){var a=r.getItemLayout(n);return a&&i.rect(a.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t})(Ke);Xn(mB,vB,!0);function OX(e){!e||!mt(e.series)||P(e.series,function(t){Lt(t)&&t.type==="k"&&(t.type="candlestick")})}var zX={seriesType:"candlestick",plan:zh(),reset:function(e){var t=e.coordinateSystem,n=e.getData(),r=BX(e,n),i=0,a=1,o=["x","y"],l=n.getDimensionIndex(n.mapDimension(o[i])),s=bt(n.mapDimensionsAll(o[a]),n.getDimensionIndex,n),c=s[0],h=s[1],d=s[2],v=s[3];if(n.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),l<0||s.length<4)return;return{progress:e.pipelineContext.large?m:g};function g(x,_){for(var b,S=_.getStore();(b=x.next())!=null;){var w=S.get(l,b),A=S.get(c,b),D=S.get(h,b),M=S.get(d,b),L=S.get(v,b),I=Math.min(A,D),N=Math.max(A,D),E=q(I,w),O=q(N,w),j=q(M,w),B=q(L,w),U=[];X(U,O,0),X(U,E,1),U.push(F(B),F(O),F(j),F(E));var W=_.getItemModel(b),H=!!W.get(["itemStyle","borderColorDoji"]);_.setItemLayout(b,{sign:mL(S,b,A,D,h,H),initBaseline:A>D?O[a]:E[a],ends:U,brushRect:J(M,L,w)})}function q(Y,Z){var V=[];return V[i]=Z,V[a]=Y,isNaN(Z)||isNaN(Y)?[NaN,NaN]:t.dataToPoint(V)}function X(Y,Z,V){var tt=Z.slice(),ut=Z.slice();tt[i]=cp(tt[i]+r/2,1,!1),ut[i]=cp(ut[i]-r/2,1,!0),V?Y.push(tt,ut):Y.push(ut,tt)}function J(Y,Z,V){var tt=q(Y,V),ut=q(Z,V);return tt[i]-=r/2,ut[i]-=r/2,{x:tt[0],y:tt[1],width:r,height:ut[1]-tt[1]}}function F(Y){return Y[i]=cp(Y[i],1),Y}}function m(x,_){for(var b=Hi(x.count*4),S=0,w,A=[],D=[],M,L=_.getStore(),I=!!e.get(["itemStyle","borderColorDoji"]);(M=x.next())!=null;){var N=L.get(l,M),E=L.get(c,M),O=L.get(h,M),j=L.get(d,M),B=L.get(v,M);if(isNaN(N)||isNaN(j)||isNaN(B)){b[S++]=NaN,S+=3;continue}b[S++]=mL(L,M,E,O,h,I),A[i]=N,A[a]=j,w=t.dataToPoint(A,null,D),b[S++]=w?w[0]:NaN,b[S++]=w?w[1]:NaN,A[a]=B,w=t.dataToPoint(A,null,D),b[S++]=w?w[1]:NaN}_.setLayout("largePoints",b)}}};function mL(e,t,n,r,i,a){var o;return n>r?o=-1:n<r?o=1:o=a?0:t>0?e.get(i,t-1)<=r?1:-1:1,o}function BX(e,t){var n=e.getBaseAxis(),r,i=n.type==="category"?n.getBandWidth():(r=n.getExtent(),Math.abs(r[1]-r[0])/t.count()),a=At(zt(e.get("barMaxWidth"),i),i),o=At(zt(e.get("barMinWidth"),1),i),l=e.get("barWidth");return l!=null?At(l,i):Math.max(Math.min(i/2,a),o)}function NX(e){e.registerChartView(kX),e.registerSeriesModel(mB),e.registerPreprocessor(OX),e.registerVisual(AX),e.registerLayout(zX)}var PX=256,HX=(function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=mi.createCanvas();this.canvas=t}return e.prototype.update=function(t,n,r,i,a,o){var l=this._getBrush(),s=this._getGradient(a,"inRange"),c=this._getGradient(a,"outOfRange"),h=this.pointSize+this.blurSize,d=this.canvas,v=d.getContext("2d"),g=t.length;d.width=n,d.height=r;for(var m=0;m<g;++m){var x=t[m],_=x[0],b=x[1],S=x[2],w=i(S);v.globalAlpha=w,v.drawImage(l,_-h,b-h)}if(!d.width||!d.height)return d;for(var A=v.getImageData(0,0,d.width,d.height),D=A.data,M=0,L=D.length,I=this.minOpacity,N=this.maxOpacity,E=N-I;M<L;){var w=D[M+3]/256,O=Math.floor(w*(PX-1))*4;if(w>0){var j=o(w)?s:c;w>0&&(w=w*E+I),D[M++]=j[O],D[M++]=j[O+1],D[M++]=j[O+2],D[M++]=j[O+3]*w*256}else M+=4}return v.putImageData(A,0,0),d},e.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=mi.createCanvas()),n=this.pointSize+this.blurSize,r=n*2;t.width=r,t.height=r;var i=t.getContext("2d");return i.clearRect(0,0,r,r),i.shadowOffsetX=r,i.shadowBlur=this.blurSize,i.shadowColor=lt.color.neutral99,i.beginPath(),i.arc(-n,n,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),t},e.prototype._getGradient=function(t,n){for(var r=this._gradientPixels,i=r[n]||(r[n]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,l=0;l<256;l++)t[n](l/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},e})();function VX(e,t,n){var r=e[1]-e[0];t=bt(t,function(o){return{interval:[(o.interval[0]-e[0])/r,(o.interval[1]-e[0])/r]}});var i=t.length,a=0;return function(o){var l;for(l=a;l<i;l++){var s=t[l].interval;if(s[0]<=o&&o<=s[1]){a=l;break}}if(l===i)for(l=a-1;l>=0;l--){var s=t[l].interval;if(s[0]<=o&&o<=s[1]){a=l;break}}return l>=0&&l<i&&n[l]}}function jX(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(r){return r>=t[0]&&r<=t[1]}}function yL(e){var t=e.dimensions;return t[0]==="lng"&&t[1]==="lat"}var FX=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,i){var a;r.eachComponent("visualMap",function(l){l.eachTargetSeries(function(s){s===n&&(a=l)})}),this._progressiveEls=null,this.group.removeAll();var o=n.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(n,i,0,n.getData().count()):yL(o)&&this._renderOnGeo(o,n,a,i)},t.prototype.incrementalPrepareRender=function(n,r,i){this.group.removeAll()},t.prototype.incrementalRender=function(n,r,i,a){var o=r.coordinateSystem;o&&(yL(o)?this.render(r,i,a):(this._progressiveEls=[],this._renderOnGridLike(r,a,n.start,n.end,!0)))},t.prototype.eachRendered=function(n){Xu(this._progressiveEls||this.group,n)},t.prototype._renderOnGridLike=function(n,r,i,a,o){var l=n.coordinateSystem,s=gh(l,"cartesian2d"),c=gh(l,"matrix"),h,d,v,g;if(s){var m=l.getAxis("x"),x=l.getAxis("y");h=m.getBandWidth()+.5,d=x.getBandWidth()+.5,v=m.scale.getExtent(),g=x.scale.getExtent()}for(var _=this.group,b=n.getData(),S=n.getModel(["emphasis","itemStyle"]).getItemStyle(),w=n.getModel(["blur","itemStyle"]).getItemStyle(),A=n.getModel(["select","itemStyle"]).getItemStyle(),D=n.get(["itemStyle","borderRadius"]),M=Qr(n),L=n.getModel("emphasis"),I=L.get("focus"),N=L.get("blurScope"),E=L.get("disabled"),O=s||c?[b.mapDimension("x"),b.mapDimension("y"),b.mapDimension("value")]:[b.mapDimension("time"),b.mapDimension("value")],j=i;j<a;j++){var B=void 0,U=b.getItemVisual(j,"style");if(s){var W=b.get(O[0],j),H=b.get(O[1],j);if(isNaN(b.get(O[2],j))||isNaN(W)||isNaN(H)||W<v[0]||W>v[1]||H<g[0]||H>g[1])continue;var q=l.dataToPoint([W,H]);B=new le({shape:{x:q[0]-h/2,y:q[1]-d/2,width:h,height:d},style:U})}else if(c){var X=l.dataToLayout([b.get(O[0],j),b.get(O[1],j)]).rect;if(To(X.x))continue;B=new le({z2:1,shape:X,style:U})}else{if(isNaN(b.get(O[1],j)))continue;var J=l.dataToLayout([b.get(O[0],j)]),X=J.contentRect||J.rect;if(To(X.x)||To(X.y))continue;B=new le({z2:1,shape:X,style:U})}if(b.hasItemOption){var F=b.getItemModel(j),Y=F.getModel("emphasis");S=Y.getModel("itemStyle").getItemStyle(),w=F.getModel(["blur","itemStyle"]).getItemStyle(),A=F.getModel(["select","itemStyle"]).getItemStyle(),D=F.get(["itemStyle","borderRadius"]),I=Y.get("focus"),N=Y.get("blurScope"),E=Y.get("disabled"),M=Qr(F)}B.shape.r=D;var Z=n.getRawValue(j),V="-";Z&&Z[2]!=null&&(V=Z[2]+""),xi(B,M,{labelFetcher:n,labelDataIndex:j,defaultOpacity:U.opacity,defaultText:V}),B.ensureState("emphasis").style=S,B.ensureState("blur").style=w,B.ensureState("select").style=A,In(B,I,N,E),B.incremental=o,o&&(B.states.emphasis.hoverLayer=!0),_.add(B),b.setItemGraphicEl(j,B),this._progressiveEls&&this._progressiveEls.push(B)}},t.prototype._renderOnGeo=function(n,r,i,a){var o=i.targetVisuals.inRange,l=i.targetVisuals.outOfRange,s=r.getData(),c=this._hmLayer||this._hmLayer||new HX;c.blurSize=r.get("blurSize"),c.pointSize=r.get("pointSize"),c.minOpacity=r.get("minOpacity"),c.maxOpacity=r.get("maxOpacity");var h=n.getViewRect().clone(),d=n.getRoamTransform();h.applyTransform(d);var v=Math.max(h.x,0),g=Math.max(h.y,0),m=Math.min(h.width+h.x,a.getWidth()),x=Math.min(h.height+h.y,a.getHeight()),_=m-v,b=x-g,S=[s.mapDimension("lng"),s.mapDimension("lat"),s.mapDimension("value")],w=s.mapArray(S,function(L,I,N){var E=n.dataToPoint([L,I]);return E[0]-=v,E[1]-=g,E.push(N),E}),A=i.getExtent(),D=i.type==="visualMap.continuous"?jX(A,i.option.range):VX(A,i.getPieceList(),i.option.selected);c.update(w,_,b,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:l.color.getColorMapper()},D);var M=new Jr({style:{width:_,height:b,x:v,y:g,image:c.canvas},silent:!0});this.group.add(M)},t.type="heatmap",t})(Ye),GX=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(n,r){return Qu(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var n=Oh.get(this.get("coordinateSystem"));if(n&&n.dimensions)return n.dimensions[0]==="lng"&&n.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:lt.color.primary}}},t})(Ke);function UX(e){e.registerChartView(FX),e.registerSeriesModel(GX)}var YX=2,WX=4,xL=(function(e){ot(t,e);function t(n,r,i,a){var o=e.call(this)||this;o.z2=YX,o.textConfig={inside:!0},Zt(o).seriesIndex=r.seriesIndex;var l=new me({z2:WX,silent:n.getModel().get(["label","silent"])});return o.setTextContent(l),o.updateData(!0,n,r,i,a),o}return t.prototype.updateData=function(n,r,i,a,o){this.node=r,r.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var l=this;Zt(l).dataIndex=r.dataIndex;var s=r.getModel(),c=s.getModel("emphasis"),h=r.getLayout(),d=dt({},h);d.label=null;var v=r.getVisual("style");v.lineJoin="bevel";var g=r.getVisual("decal");g&&(v.decal=Zp(g,o));var m=Vl(s.getModel("itemStyle"),d,!0);dt(d,m),P(Cr,function(S){var w=l.ensureState(S),A=s.getModel([S,"itemStyle"]);w.style=A.getItemStyle();var D=Vl(A,d);D&&(w.shape=D)}),n?(l.setShape(d),l.shape.r=h.r0,Qe(l,{shape:{r:h.r}},i,r.dataIndex)):(Ve(l,{shape:d},i),Da(l)),l.useStyle(v),this._updateLabel(i);var x=s.getShallow("cursor");x&&l.attr("cursor",x),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var _=c.get("focus"),b=_==="relative"?zR(r.getAncestorsIndices(),r.getDescendantIndices()):_==="ancestor"?r.getAncestorsIndices():_==="descendant"?r.getDescendantIndices():_;In(this,b,c.get("blurScope"),c.get("disabled"))},t.prototype._updateLabel=function(n){var r=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),l=o.endAngle-o.startAngle,s=(o.startAngle+o.endAngle)/2,c=Math.cos(s),h=Math.sin(s),d=this,v=d.getTextContent(),g=this.node.dataIndex,m=a.get("minAngle")/180*Math.PI,x=a.get("show")&&!(m!=null&&Math.abs(l)<m);v.ignore=!x,P(ih,function(b){var S=b==="normal"?i.getModel("label"):i.getModel([b,"label"]),w=b==="normal",A=w?v:v.ensureState(b),D=n.getFormattedLabel(g,b);w&&(D=D||r.node.name),A.style=$e(S,{},null,b!=="normal",!0),D&&(A.style.text=D);var M=S.get("show");M!=null&&!w&&(A.ignore=!M);var L=_(S,"position"),I=w?d:d.states[b],N=I.style.fill;I.textConfig={outsideFill:S.get("color")==="inherit"?N:null,inside:L!=="outside"};var E,O=_(S,"distance")||0,j=_(S,"align"),B=_(S,"rotate"),U=Math.PI*.5,W=Math.PI*1.5,H=xo(B==="tangential"?Math.PI/2-s:s),q=H>U&&!nh(H-U)&&H<W;L==="outside"?(E=o.r+O,j=q?"right":"left"):!j||j==="center"?(l===2*Math.PI&&o.r0===0?E=0:E=(o.r+o.r0)/2,j="center"):j==="left"?(E=o.r0+O,j=q?"right":"left"):j==="right"&&(E=o.r-O,j=q?"left":"right"),A.style.align=j,A.style.verticalAlign=_(S,"verticalAlign")||"middle",A.x=E*c+o.cx,A.y=E*h+o.cy;var X=0;B==="radial"?X=xo(-s)+(q?Math.PI:0):B==="tangential"?X=xo(Math.PI/2-s)+(q?Math.PI:0):ve(B)&&(X=B*Math.PI/180),A.rotation=xo(X)});function _(b,S){var w=b.get(S);return w??a.get(S)}v.dirtyStyle()},t})(yi),Ub="sunburstRootToNode",bL="sunburstHighlight",qX="sunburstUnhighlight";function XX(e){e.registerAction({type:Ub,update:"updateView"},function(t,n){n.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(i,a){var o=xh(t,[Ub],i);if(o){var l=i.getViewRoot();l&&(t.direction=kS(l,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),e.registerAction({type:bL,update:"none"},function(t,n,r){t=dt({},t),n.eachComponent({mainType:"series",subType:"sunburst",query:t},i);function i(a){var o=xh(t,[bL],a);o&&(t.dataIndex=o.node.dataIndex)}r.dispatchAction(dt(t,{type:"highlight"}))}),e.registerAction({type:qX,update:"updateView"},function(t,n,r){t=dt({},t),r.dispatchAction(dt(t,{type:"downplay"}))})}var ZX=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,i,a){var o=this;this.seriesModel=n,this.api=i,this.ecModel=r;var l=n.getData(),s=l.tree.root,c=n.getViewRoot(),h=this.group,d=n.get("renderLabelForZeroData"),v=[];c.eachNode(function(S){v.push(S)});var g=this._oldChildren||[];m(v,g),b(s,c),this._initEvents(),this._oldChildren=v;function m(S,w){if(S.length===0&&w.length===0)return;new Bh(w,S,A,A).add(D).update(D).remove(Yt(D,null)).execute();function A(M){return M.getId()}function D(M,L){var I=M==null?null:S[M],N=L==null?null:w[L];x(I,N)}}function x(S,w){if(!d&&S&&!S.getValue()&&(S=null),S!==s&&w!==s){if(w&&w.piece)S?(w.piece.updateData(!1,S,n,r,i),l.setItemGraphicEl(S.dataIndex,w.piece)):_(w);else if(S){var A=new xL(S,n,r,i);h.add(A),l.setItemGraphicEl(S.dataIndex,A)}}}function _(S){S&&S.piece&&(h.remove(S.piece),S.piece=null)}function b(S,w){w.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,S,n,r,i):(o.virtualPiece=new xL(S,n,r,i),h.add(o.virtualPiece)),w.piece.off("click"),o.virtualPiece.on("click",function(A){o._rootToNode(w.parentNode)})):o.virtualPiece&&(h.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var n=this;this.group.off("click"),this.group.on("click",function(r){var i=!1,a=n.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===r.target){var l=o.getModel().get("nodeClick");if(l==="rootToNode")n._rootToNode(o);else if(l==="link"){var s=o.getModel(),c=s.get("link");if(c){var h=s.get("target",!0)||"_blank";Fp(c,h)}}i=!0}})})},t.prototype._rootToNode=function(n){n!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Ub,from:this.uid,seriesId:this.seriesModel.id,targetNode:n})},t.prototype.containPoint=function(n,r){var i=r.getData(),a=i.getItemLayout(0);if(a){var o=n[0]-a.cx,l=n[1]-a.cy,s=Math.sqrt(o*o+l*l);return s<=a.r&&s>=a.r0}},t.type="sunburst",t})(Ye),$X=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreStyleOnData=!0,n}return t.prototype.getInitialData=function(n,r){var i={name:n.name,children:n.data};yB(i);var a=this._levelModels=bt(n.levels||[],function(s){return new Te(s,this,r)},this),o=G5.createTree(i,this,l);function l(s){s.wrapMethod("getItemModel",function(c,h){var d=o.getNodeByDataIndex(h),v=a[d.depth];return v&&(c.parentModel=v),c})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(n){var r=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(n);return r.treePathInfo=LS(i,this),r},t.prototype.getLevelModel=function(n){return this._levelModels&&this._levelModels[n.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(n){n?this._viewRoot=n:n=this._viewRoot;var r=this.getRawData().tree.root;(!n||n!==r&&!r.contains(n))&&(this._viewRoot=r)},t.prototype.enableAriaDecal=function(){Y5(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})(Ke);function yB(e){var t=0;P(e.children,function(r){yB(r);var i=r.value;mt(i)&&(i=i[0]),t+=i});var n=e.value;mt(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),mt(e.value)?e.value[0]=n:e.value=n}var _L=Math.PI/180;function QX(e,t,n){t.eachSeriesByType(e,function(r){var i=r.get("center"),a=r.get("radius");mt(a)||(a=[0,a]),mt(i)||(i=[i,i]);var o=n.getWidth(),l=n.getHeight(),s=Math.min(o,l),c=At(i[0],o),h=At(i[1],l),d=At(a[0],s/2),v=At(a[1],s/2),g=-r.get("startAngle")*_L,m=r.get("minAngle")*_L,x=r.getData().tree.root,_=r.getViewRoot(),b=_.depth,S=r.get("sort");S!=null&&xB(_,S);var w=0;P(_.children,function(H){!isNaN(H.getValue())&&w++});var A=_.getValue(),D=Math.PI/(A||w)*2,M=_.depth>0,L=_.height-(M?-1:1),I=(v-d)/(L||1),N=r.get("clockwise"),E=r.get("stillShowZeroSum"),O=N?1:-1,j=function(H,q){if(H){var X=q;if(H!==x){var J=H.getValue(),F=A===0&&E?D:J*D;F<m&&(F=m),X=q+O*F;var Y=H.depth-b-(M?-1:1),Z=d+I*Y,V=d+I*(Y+1),tt=r.getLevelModel(H);if(tt){var ut=tt.get("r0",!0),gt=tt.get("r",!0),wt=tt.get("radius",!0);wt!=null&&(ut=wt[0],gt=wt[1]),ut!=null&&(Z=At(ut,s/2)),gt!=null&&(V=At(gt,s/2))}H.setLayout({angle:F,startAngle:q,endAngle:X,clockwise:N,cx:c,cy:h,r0:Z,r:V})}if(H.children&&H.children.length){var pt=0;P(H.children,function(vt){pt+=j(vt,q+pt)})}return X-q}};if(M){var B=d,U=d+I,W=Math.PI*2;x.setLayout({angle:W,startAngle:g,endAngle:g+W,clockwise:N,cx:c,cy:h,r0:B,r:U})}j(_,g)})}function xB(e,t){var n=e.children||[];e.children=KX(n,t),n.length&&P(e.children,function(r){xB(r,t)})}function KX(e,t){if(Rt(t)){var n=bt(e,function(i,a){var o=i.getValue();return{params:{depth:i.depth,height:i.height,dataIndex:i.dataIndex,getValue:function(){return o}},index:a}});return n.sort(function(i,a){return t(i.params,a.params)}),bt(n,function(i){return e[i.index]})}else{var r=t==="asc";return e.sort(function(i,a){var o=(i.getValue()-a.getValue())*(r?1:-1);return o===0?(i.dataIndex-a.dataIndex)*(r?-1:1):o})}}function JX(e){var t={};function n(r,i,a){if(r.depth===0)return lt.color.neutral50;for(var o=r;o&&o.depth>1;)o=o.parentNode;var l=i.getColorFromPalette(o.name||o.dataIndex+"",t);return r.depth>1&&St(l)&&(l=Ix(l,(r.depth-1)/(a-1)*.5)),l}e.eachSeriesByType("sunburst",function(r){var i=r.getData(),a=i.tree;a.eachNode(function(o){var l=o.getModel(),s=l.getModel("itemStyle").getItemStyle();s.fill||(s.fill=n(o,r,a.root.height));var c=i.ensureUniqueItemVisual(o.dataIndex,"style");dt(c,s)})})}function tZ(e){e.registerChartView(ZX),e.registerSeriesModel($X),e.registerLayout(Yt(QX,"sunburst")),e.registerProcessor(Yt(jg,"sunburst")),e.registerVisual(JX),XX(e)}var Il=be(),SL=It,U1=Ct,eZ=(function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(t,n,r,i){var a=n.get("value"),o=n.get("status");if(this._axisModel=t,this._axisPointerModel=n,this._api=r,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var l=this._group,s=this._handle;if(!o||o==="hide"){l&&l.hide(),s&&s.hide();return}l&&l.show(),s&&s.show();var c={};this.makeElOption(c,a,t,n,r);var h=c.graphicKey;h!==this._lastGraphicKey&&this.clear(r),this._lastGraphicKey=h;var d=this._moveAnimation=this.determineAnimation(t,n);if(!l)l=this._group=new ie,this.createPointerEl(l,c,t,n),this.createLabelEl(l,c,t,n),r.getZr().add(l);else{var v=Yt(wL,n,d);this.updatePointerEl(l,c,v),this.updateLabelEl(l,c,v,n)}CL(l,n,!0),this._renderHandle(a)}},e.prototype.remove=function(t){this.clear(t)},e.prototype.dispose=function(t){this.clear(t)},e.prototype.determineAnimation=function(t,n){var r=n.get("animation"),i=t.axis,a=i.type==="category",o=n.get("snap");if(!o&&!a)return!1;if(r==="auto"||r==null){var l=this.animationThreshold;if(a&&i.getBandWidth()>l)return!0;if(o){var s=TS(t).seriesDataCount,c=i.getExtent();return Math.abs(c[0]-c[1])/s>l}return!1}return r===!0},e.prototype.makeElOption=function(t,n,r,i,a){},e.prototype.createPointerEl=function(t,n,r,i){var a=n.pointer;if(a){var o=Il(t).pointerEl=new V_[a.type](SL(n.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,n,r,i){if(n.label){var a=Il(t).labelEl=new me(SL(n.label));t.add(a),TL(a,i)}},e.prototype.updatePointerEl=function(t,n,r){var i=Il(t).pointerEl;i&&n.pointer&&(i.setStyle(n.pointer.style),r(i,{shape:n.pointer.shape}))},e.prototype.updateLabelEl=function(t,n,r,i){var a=Il(t).labelEl;a&&(a.setStyle(n.label.style),r(a,{x:n.label.x,y:n.label.y}),TL(a,i))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var n=this._axisPointerModel,r=this._api.getZr(),i=this._handle,a=n.getModel("handle"),o=n.get("status");if(!a.get("show")||!o||o==="hide"){i&&r.remove(i),this._handle=null;return}var l;this._handle||(l=!0,i=this._handle=Ig(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(c){Aa(c.event)},onmousedown:U1(this._onHandleDragMove,this,0,0),drift:U1(this._onHandleDragMove,this),ondragend:U1(this._onHandleDragEnd,this)}),r.add(i)),CL(i,n,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");mt(s)||(s=[s,s]),i.scaleX=s[0]/2,i.scaleY=s[1]/2,Pg(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,l)}},e.prototype._moveHandleToValue=function(t,n){wL(this._axisPointerModel,!n&&this._moveAnimation,this._handle,Y1(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,n){var r=this._handle;if(r){this._dragging=!0;var i=this.updateHandleTransform(Y1(r),[t,n],this._axisModel,this._axisPointerModel);this._payloadInfo=i,r.stopAnimation(),r.attr(Y1(i)),Il(r).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var n=this._payloadInfo,r=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:n.cursorPoint[0],y:n.cursorPoint[1],tooltipOption:n.tooltipOption,axesInfo:[{axisDim:r.axis.dim,axisIndex:r.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var n=this._axisPointerModel.get("value");this._moveHandleToValue(n),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var n=t.getZr(),r=this._group,i=this._handle;n&&r&&(this._lastGraphicKey=null,r&&n.remove(r),i&&n.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Up(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(t,n,r){return r=r||0,{x:t[r],y:t[1-r],width:n[r],height:n[1-r]}},e})();function wL(e,t,n,r){bB(Il(n).lastProp,r)||(Il(n).lastProp=r,t?Ve(n,r,e):(n.stopAnimation(),n.attr(r)))}function bB(e,t){if(Lt(e)&&Lt(t)){var n=!0;return P(t,function(r,i){n=n&&bB(e[i],r)}),!!n}else return e===t}function TL(e,t){e[t.get(["label","show"])?"show":"hide"]()}function Y1(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function CL(e,t,n){var r=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(a){a.type!=="group"&&(r!=null&&(a.z=r),i!=null&&(a.zlevel=i),a.silent=n)})}function nZ(e){var t=e.get("type"),n=e.getModel(t+"Style"),r;return t==="line"?(r=n.getLineStyle(),r.fill=null):t==="shadow"&&(r=n.getAreaStyle(),r.stroke=null),r}function rZ(e,t,n,r,i){var a=n.get("value"),o=_B(a,t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),l=n.getModel("label"),s=Ih(l.get("padding")||0),c=l.getFont(),h=S_(o,c),d=i.position,v=h.width+s[1]+s[3],g=h.height+s[0]+s[2],m=i.align;m==="right"&&(d[0]-=v),m==="center"&&(d[0]-=v/2);var x=i.verticalAlign;x==="bottom"&&(d[1]-=g),x==="middle"&&(d[1]-=g/2),iZ(d,v,g,r);var _=l.get("backgroundColor");(!_||_==="auto")&&(_=t.get(["axisLine","lineStyle","color"])),e.label={x:d[0],y:d[1],style:$e(l,{text:o,font:c,fill:l.getTextColor(),padding:s,backgroundColor:_}),z2:10}}function iZ(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function _B(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var l={value:Kp(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};P(r,function(s){var c=n.getSeriesByIndex(s.seriesIndex),h=s.dataIndexInside,d=c&&c.getDataParams(h);d&&l.seriesData.push(d)}),St(o)?a=o.replace("{value}",a):Rt(o)&&(a=o(l))}return a}function SB(e,t,n){var r=di();return b_(r,r,n.rotation),Kf(r,r,n.position),Do([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function aZ(e,t,n,r,i,a){var o=Ma.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get(["label","margin"]),rZ(t,r,i,a,{position:SB(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function oZ(e,t,n){return n=n||0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function lZ(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}var sZ=(function(e){ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(n,r,i,a,o){var l=i.axis,s=l.grid,c=a.get("type"),h=ML(s,l).getOtherAxis(l).getGlobalExtent(),d=l.toGlobalCoord(l.dataToCoord(r,!0));if(c&&c!=="none"){var v=nZ(a),g=uZ[c](l,d,h);g.style=v,n.graphicKey=g.type,n.pointer=g}var m=ag(s.getRect(),i);aZ(r,n,m,i,a,o)},t.prototype.getHandleTransform=function(n,r,i){var a=ag(r.axis.grid.getRect(),r,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=SB(r.axis,n,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(n,r,i,a){var o=i.axis,l=o.grid,s=o.getGlobalExtent(!0),c=ML(l,o).getOtherAxis(o).getGlobalExtent(),h=o.dim==="x"?0:1,d=[n.x,n.y];d[h]+=r[h],d[h]=Math.min(s[1],d[h]),d[h]=Math.max(s[0],d[h]);var v=(c[1]+c[0])/2,g=[v,v];g[h]=d[h];var m=[{verticalAlign:"middle"},{align:"center"}];return{x:d[0],y:d[1],rotation:n.rotation,cursorPoint:g,tooltipOption:m[h]}},t})(eZ);function ML(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var uZ={line:function(e,t,n){var r=oZ([t,n[0]],[t,n[1]],AL(e));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(e,t,n){var r=Math.max(1,e.getBandWidth()),i=n[1]-n[0];return{type:"Rect",shape:lZ([t-r/2,n[0]],[r,i],AL(e))}}};function AL(e){return e.dim==="x"?0:1}var cZ=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}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:lt.color.border,width:1,type:"dashed"},shadowStyle:{color:lt.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:lt.color.neutral00,padding:[5,7,5,7],backgroundColor:lt.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:lt.color.accent40,throttle:40}},t})(he),Ta=be(),fZ=P;function wB(e,t,n){if(!Gt.node){var r=t.getZr();Ta(r).records||(Ta(r).records={}),hZ(r,t);var i=Ta(r).records[e]||(Ta(r).records[e]={});i.handler=n}}function hZ(e,t){if(Ta(e).initialized)return;Ta(e).initialized=!0,n("click",Yt(DL,"click")),n("mousemove",Yt(DL,"mousemove")),n("globalout",vZ);function n(r,i){e.on(r,function(a){var o=pZ(t);fZ(Ta(e).records,function(l){l&&i(l,a,o.dispatchAction)}),dZ(o.pendings,t)})}}function dZ(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function vZ(e,t,n){e.handler("leave",null,n)}function DL(e,t,n,r){t.handler(e,n,r)}function pZ(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function Yb(e,t){if(!Gt.node){var n=t.getZr(),r=(Ta(n).records||{})[e];r&&(Ta(n).records[e]=null)}}var gZ=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,i){var a=r.getComponent("tooltip"),o=n.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";wB("axisPointer",i,function(l,s,c){o!=="none"&&(l==="leave"||o.indexOf(l)>=0)&&c({type:"updateAxisPointer",currTrigger:l,x:s&&s.offsetX,y:s&&s.offsetY})})},t.prototype.remove=function(n,r){Yb("axisPointer",r)},t.prototype.dispose=function(n,r){Yb("axisPointer",r)},t.type="axisPointer",t})(zn);function TB(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=Zl(a,e);if(o==null||o<0||mt(o))return{point:[]};var l=a.getItemGraphicEl(o),s=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(s&&s.dataToPoint)if(e.isStacked){var c=s.getBaseAxis(),h=s.getOtherAxis(c),d=h.dim,v=c.dim,g=d==="x"||d==="radius"?1:0,m=a.mapDimension(v),x=[];x[g]=a.get(m,o),x[1-g]=a.get(a.getCalculationInfo("stackResultDimension"),o),n=s.dataToPoint(x)||[]}else n=s.dataToPoint(a.getValues(bt(s.dimensions,function(b){return a.mapDimension(b)}),o))||[];else if(l){var _=l.getBoundingRect().clone();_.applyTransform(l.transform),n=[_.x+_.width/2,_.y+_.height/2]}return{point:n,el:l}}var kL=be();function mZ(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||Ct(n.dispatchAction,n),l=t.getComponent("axisPointer").coordSysAxesInfo;if(l){yp(i)&&(i=TB({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var s=yp(i),c=a.axesInfo,h=l.axesInfo,d=r==="leave"||yp(i),v={},g={},m={list:[],map:{}},x={showPointer:Yt(xZ,g),showTooltip:Yt(bZ,m)};P(l.coordSysMap,function(b,S){var w=s||b.containPoint(i);P(l.coordSysAxesInfo[S],function(A,D){var M=A.axis,L=TZ(c,A);if(!d&&w&&(!c||L)){var I=L&&L.value;I==null&&!s&&(I=M.pointToData(i)),I!=null&&LL(A,I,x,!1,v)}})});var _={};return P(h,function(b,S){var w=b.linkGroup;w&&!g[S]&&P(w.axesInfo,function(A,D){var M=g[D];if(A!==b&&M){var L=M.value;w.mapper&&(L=b.axis.scale.parse(w.mapper(L,EL(A),EL(b)))),_[b.key]=L}})}),P(_,function(b,S){LL(h[S],b,x,!0,v)}),_Z(g,h,v),SZ(m,i,e,o),wZ(h,o,n),v}}function LL(e,t,n,r,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){n.showPointer(e,t);return}var o=yZ(t,e),l=o.payloadBatch,s=o.snapToValue;l[0]&&i.seriesIndex==null&&dt(i,l[0]),!r&&e.snap&&a.containData(s)&&s!=null&&(t=s),n.showPointer(e,t,l),n.showTooltip(e,o,s)}}function yZ(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,l=-1;return P(t.seriesModels,function(s,c){var h=s.getData().mapDimensionsAll(r),d,v;if(s.getAxisTooltipData){var g=s.getAxisTooltipData(h,e,n);v=g.dataIndices,d=g.nestestValue}else{if(v=s.indicesOfNearest(r,h[0],e,n.type==="category"?.5:null),!v.length)return;d=s.getData().get(h[0],v[0])}if(!(d==null||!isFinite(d))){var m=e-d,x=Math.abs(m);x<=o&&((x<o||m>=0&&l<0)&&(o=x,l=m,i=d,a.length=0),P(v,function(_){a.push({seriesIndex:s.seriesIndex,dataIndexInside:_,dataIndex:s.getData().getRawIndex(_)})}))}}),{payloadBatch:a,snapToValue:i}}function xZ(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function bZ(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,l=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var s=t.coordSys.model,c=yh(s),h=e.map[c];h||(h=e.map[c]={coordSysId:s.id,coordSysIndex:s.componentIndex,coordSysType:s.type,coordSysMainType:s.mainType,dataByAxis:[]},e.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:l.get(["label","precision"]),formatter:l.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function _Z(e,t,n){var r=n.axesInfo=[];P(t,function(i,a){var o=i.axisPointerModel.option,l=e[a];l?(!i.useHandle&&(o.status="show"),o.value=l.value,o.seriesDataIndices=(l.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&r.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function SZ(e,t,n,r){if(yp(t)||!e.list.length){r({type:"hideTip"});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function wZ(e,t,n){var r=n.getZr(),i="axisPointerLastHighlights",a=kL(r)[i]||{},o=kL(r)[i]={};P(e,function(c,h){var d=c.axisPointerModel.option;d.status==="show"&&c.triggerEmphasis&&P(d.seriesDataIndices,function(v){var g=v.seriesIndex+" | "+v.dataIndex;o[g]=v})});var l=[],s=[];P(a,function(c,h){!o[h]&&s.push(c)}),P(o,function(c,h){!a[h]&&l.push(c)}),s.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:s}),l.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:l})}function TZ(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function EL(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=t.componentIndex,n.axisName=n[r+"AxisName"]=t.name,n.axisId=n[r+"AxisId"]=t.id,n}function yp(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function CB(e){z5.registerAxisPointerClass("CartesianAxisPointer",sZ),e.registerComponentModel(cZ),e.registerComponentView(gZ),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var n=t.axisPointer.link;n&&!mt(n)&&(t.axisPointer.link=[n])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(t,n){t.getComponent("axisPointer").coordSysAxesInfo=OY(t,n)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},mZ)}function CZ(e){qn(P5),qn(CB)}var RL=["x","y","radius","angle","single"],MZ=["cartesian2d","polar","singleAxis"];function AZ(e){var t=e.get("coordinateSystem");return Wt(MZ,t)>=0}function wo(e){return e+"Axis"}function DZ(e,t){var n=Bt(),r=[],i=Bt();e.eachComponent({mainType:"dataZoom",query:t},function(h){i.get(h.uid)||l(h)});var a;do a=!1,e.eachComponent("dataZoom",o);while(a);function o(h){!i.get(h.uid)&&s(h)&&(l(h),a=!0)}function l(h){i.set(h.uid,!0),r.push(h),c(h)}function s(h){var d=!1;return h.eachTargetAxis(function(v,g){var m=n.get(v);m&&m[g]&&(d=!0)}),d}function c(h){h.eachTargetAxis(function(d,v){(n.get(d)||n.set(d,[]))[v]=!0})}return r}function MB(e){var t=e.ecModel,n={infoList:[],infoMap:Bt()};return e.eachTargetAxis(function(r,i){var a=t.getComponent(wo(r),i);if(a){var o=a.getCoordSysModel();if(o){var l=o.uid,s=n.infoMap.get(l);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(l,s)),s.axisModels.push(a)}}}),n}var W1=(function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},e})(),wh=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return t.prototype.init=function(n,r,i){var a=IL(n);this.settledOption=a,this.mergeDefaultAndTheme(n,i),this._doInit(a)},t.prototype.mergeOption=function(n){var r=IL(n);qt(this.option,n,!0),qt(this.settledOption,r,!0),this._doInit(r)},t.prototype._doInit=function(n){var r=this.option;this._setDefaultThrottle(n),this._updateRangeUse(n);var i=this.settledOption;P([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(r[a[0]]=i[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var n=this.get("orient",!0),r=this._targetAxisInfoMap=Bt(),i=this._fillSpecifiedTargetAxis(r);i?this._orient=n||this._makeAutoOrientByTargetAxis():(this._orient=n||"horizontal",this._fillAutoTargetAxisByOrient(r,this._orient)),this._noTarget=!0,r.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(n){var r=!1;return P(RL,function(i){var a=this.getReferringComponents(wo(i),lV);if(a.specified){r=!0;var o=new W1;P(a.models,function(l){o.add(l.componentIndex)}),n.set(i,o)}},this),r},t.prototype._fillAutoTargetAxisByOrient=function(n,r){var i=this.ecModel,a=!0;if(a){var o=r==="vertical"?"y":"x",l=i.findComponents({mainType:o+"Axis"});s(l,o)}if(a){var l=i.findComponents({mainType:"singleAxis",filter:function(h){return h.get("orient",!0)===r}});s(l,"single")}function s(c,h){var d=c[0];if(d){var v=new W1;if(v.add(d.componentIndex),n.set(h,v),a=!1,h==="x"||h==="y"){var g=d.getReferringComponents("grid",En).models[0];g&&P(c,function(m){d.componentIndex!==m.componentIndex&&g===m.getReferringComponents("grid",En).models[0]&&v.add(m.componentIndex)})}}}a&&P(RL,function(c){if(a){var h=i.findComponents({mainType:wo(c),filter:function(v){return v.get("type",!0)==="category"}});if(h[0]){var d=new W1;d.add(h[0].componentIndex),n.set(c,d),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var n;return this.eachTargetAxis(function(r){!n&&(n=r)},this),n==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(n){if(n.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var r=this.ecModel.option;this.option.throttle=r.animation&&r.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(n){var r=this._rangePropMode,i=this.get("rangeMode");P([["start","startValue"],["end","endValue"]],function(a,o){var l=n[a[0]]!=null,s=n[a[1]]!=null;l&&!s?r[o]="percent":!l&&s?r[o]="value":i?r[o]=i[o]:l&&(r[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var n;return this.eachTargetAxis(function(r,i){n==null&&(n=this.ecModel.getComponent(wo(r),i))},this),n},t.prototype.eachTargetAxis=function(n,r){this._targetAxisInfoMap.each(function(i,a){P(i.indexList,function(o){n.call(r,a,o)})})},t.prototype.getAxisProxy=function(n,r){var i=this.getAxisModel(n,r);if(i)return i.__dzAxisProxy},t.prototype.getAxisModel=function(n,r){var i=this._targetAxisInfoMap.get(n);if(i&&i.indexMap[r])return this.ecModel.getComponent(wo(n),r)},t.prototype.setRawRange=function(n){var r=this.option,i=this.settledOption;P([["start","startValue"],["end","endValue"]],function(a){(n[a[0]]!=null||n[a[1]]!=null)&&(r[a[0]]=i[a[0]]=n[a[0]],r[a[1]]=i[a[1]]=n[a[1]])},this),this._updateRangeUse(n)},t.prototype.setCalculatedRange=function(n){var r=this.option;P(["start","startValue","end","endValue"],function(i){r[i]=n[i]})},t.prototype.getPercentRange=function(){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataPercentWindow()},t.prototype.getValueRange=function(n,r){if(n==null&&r==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(n,r).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(n){if(n)return n.__dzAxisProxy;for(var r,i=this._targetAxisInfoMap.keys(),a=0;a<i.length;a++)for(var o=i[a],l=this._targetAxisInfoMap.get(o),s=0;s<l.indexList.length;s++){var c=this.getAxisProxy(o,l.indexList[s]);if(c.hostedBy(this))return c;r||(r=c)}return r},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})(he);function IL(e){var t={};return P(["start","end","startValue","endValue","throttle"],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var kZ=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type="dataZoom.select",t})(wh),VS=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,i,a){this.dataZoomModel=n,this.ecModel=r,this.api=i},t.type="dataZoom",t})(zn),LZ=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type="dataZoom.select",t})(VS),yu=P,OL=yo,EZ=(function(){function e(t,n,r,i){this._dimName=t,this._axisIndex=n,this.ecModel=i,this._dataZoomModel=r}return e.prototype.hostedBy=function(t){return this._dataZoomModel===t},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(n){if(AZ(n)){var r=wo(this._dimName),i=n.getReferringComponents(r,En).models[0];i&&this._axisIndex===i.componentIndex&&t.push(n)}},this),t},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return It(this._minMaxSpan)},e.prototype.calculateDataWindow=function(t){var n=this._dataExtent,r=this.getAxisModel(),i=r.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],l=[],s=[],c;yu(["start","end"],function(v,g){var m=t[v],x=t[v+"Value"];a[g]==="percent"?(m==null&&(m=o[g]),x=i.parse(ue(m,o,n))):(c=!0,x=x==null?n[g]:i.parse(x),m=ue(x,n,o)),s[g]=x==null||isNaN(x)?n[g]:x,l[g]=m==null||isNaN(m)?o[g]:m}),OL(s),OL(l);var h=this._minMaxSpan;c?d(s,l,n,o,!1):d(l,s,o,n,!0);function d(v,g,m,x,_){var b=_?"Span":"ValueSpan";ts(0,v,m,"all",h["min"+b],h["max"+b]);for(var S=0;S<2;S++)g[S]=ue(v[S],m,x,!0),_&&(g[S]=i.parse(g[S]))}return{valueWindow:s,percentWindow:l}},e.prototype.reset=function(t){if(t===this._dataZoomModel){var n=this.getTargetSeriesModels();this._dataExtent=RZ(this,this._dimName,n),this._updateMinMaxSpan();var r=this.calculateDataWindow(t.settledOption);this._valueWindow=r.valueWindow,this._percentWindow=r.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(t,n){if(t!==this._dataZoomModel)return;var r=this._dimName,i=this.getTargetSeriesModels(),a=t.get("filterMode"),o=this._valueWindow;if(a==="none")return;yu(i,function(s){var c=s.getData(),h=c.mapDimensionsAll(r);if(h.length){if(a==="weakFilter"){var d=c.getStore(),v=bt(h,function(g){return c.getDimensionIndex(g)},c);c.filterSelf(function(g){for(var m,x,_,b=0;b<h.length;b++){var S=d.get(v[b],g),w=!isNaN(S),A=S<o[0],D=S>o[1];if(w&&!A&&!D)return!0;w&&(_=!0),A&&(m=!0),D&&(x=!0)}return _&&m&&x})}else yu(h,function(g){if(a==="empty")s.setData(c=c.map(g,function(x){return l(x)?x:NaN}));else{var m={};m[g]=o,c.selectRange(m)}});yu(h,function(g){c.setApproximateExtent(o,g)})}});function l(s){return s>=o[0]&&s<=o[1]}},e.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},n=this._dataZoomModel,r=this._dataExtent;yu(["min","max"],function(i){var a=n.get(i+"Span"),o=n.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=ue(r[0]+o,r,[0,100],!0):a!=null&&(o=ue(a,[0,100],r,!0)-r[0]),t[i+"Span"]=a,t[i+"ValueSpan"]=o},this)},e.prototype._setAxisModel=function(){var t=this.getAxisModel(),n=this._percentWindow,r=this._valueWindow;if(n){var i=aI(r,[0,500]);i=Math.min(i,20);var a=t.axis.scale.rawExtentInfo;n[0]!==0&&a.setDeterminedMinMax("min",+r[0].toFixed(i)),n[1]!==100&&a.setDeterminedMinMax("max",+r[1].toFixed(i)),a.freeze()}},e})();function RZ(e,t,n){var r=[1/0,-1/0];yu(n,function(o){z9(r,o.getData(),t)});var i=e.getAxisModel(),a=Hz(i.axis.scale,i,r).calculate();return[a.min,a.max]}var IZ={getTargetSeries:function(e){function t(i){e.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,l){var s=e.getComponent(wo(o),l);i(o,l,s,a)})})}t(function(i,a,o,l){o.__dzAxisProxy=null});var n=[];t(function(i,a,o,l){o.__dzAxisProxy||(o.__dzAxisProxy=new EZ(i,a,l,e),n.push(o.__dzAxisProxy))});var r=Bt();return P(n,function(i){P(i.getTargetSeriesModels(),function(a){r.set(a.uid,a)})}),r},overallReset:function(e,t){e.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(r,i){n.getAxisProxy(r,i).reset(n)}),n.eachTargetAxis(function(r,i){n.getAxisProxy(r,i).filterData(n,t)})}),e.eachComponent("dataZoom",function(n){var r=n.findRepresentativeAxisProxy();if(r){var i=r.getDataPercentWindow(),a=r.getDataValueWindow();n.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function OZ(e){e.registerAction("dataZoom",function(t,n){var r=DZ(n,t);P(r,function(i){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var zL=!1;function jS(e){zL||(zL=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,IZ),OZ(e),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function zZ(e){e.registerComponentModel(kZ),e.registerComponentView(LZ),jS(e)}var fi=(function(){function e(){}return e})(),AB={};function gf(e,t){AB[e]=t}function DB(e){return AB[e]}var BZ=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var n=this.ecModel;P(this.option.feature,function(r,i){var a=DB(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(n)),qt(r,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:lt.color.border,borderRadius:0,borderWidth:0,padding:lt.size.m,itemSize:15,itemGap:lt.size.s,showTitle:!0,iconStyle:{borderColor:lt.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:lt.color.accent50}},tooltip:{show:!1,position:"bottom"}},t})(he);function kB(e,t){var n=Ih(t.get("padding")),r=t.getItemStyle(["color","opacity"]);r.fill=t.get("backgroundColor");var i=new le({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1});return i}var NZ=(function(e){ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(n,r,i,a){var o=this.group;if(o.removeAll(),!n.get("show"))return;var l=+n.get("itemSize"),s=n.get("orient")==="vertical",c=n.get("feature")||{},h=this._features||(this._features={}),d=[];P(c,function(S,w){d.push(w)}),new Bh(this._featureNames||[],d).add(v).update(v).remove(Yt(v,null)).execute(),this._featureNames=d;function v(S,w){var A=d[S],D=d[w],M=c[A],L=new Te(M,n,n.ecModel),I;if(a&&a.newTitle!=null&&a.featureName===A&&(M.title=a.newTitle),A&&!D){if(PZ(A))I={onclick:L.option.onclick,featureName:A};else{var N=DB(A);if(!N)return;I=new N}h[A]=I}else if(I=h[D],!I)return;I.uid=Rh("toolbox-feature"),I.model=L,I.ecModel=r,I.api=i;var E=I instanceof fi;if(!A&&D){E&&I.dispose&&I.dispose(r,i);return}if(!L.get("show")||E&&I.unusable){E&&I.remove&&I.remove(r,i);return}g(L,I,A),L.setIconStatus=function(O,j){var B=this.option,U=this.iconPaths;B.iconStatus=B.iconStatus||{},B.iconStatus[O]=j,U[O]&&(j==="emphasis"?Ql:Kl)(U[O])},I instanceof fi&&I.render&&I.render(L,r,i,a)}function g(S,w,A){var D=S.getModel("iconStyle"),M=S.getModel(["emphasis","iconStyle"]),L=w instanceof fi&&w.getIcons?w.getIcons():S.get("icon"),I=S.get("title")||{},N,E;St(L)?(N={},N[A]=L):N=L,St(I)?(E={},E[A]=I):E=I;var O=S.iconPaths={};P(N,function(j,B){var U=Ig(j,{},{x:-l/2,y:-l/2,width:l,height:l});U.setStyle(D.getItemStyle());var W=U.ensureState("emphasis");W.style=M.getItemStyle();var H=new me({style:{text:E[B],align:M.get("textAlign"),borderRadius:M.get("textBorderRadius"),padding:M.get("textPadding"),fill:null,font:KI({fontStyle:M.get("textFontStyle"),fontFamily:M.get("textFontFamily"),fontSize:M.get("textFontSize"),fontWeight:M.get("textFontWeight")},r)},ignore:!0});U.setTextContent(H),Lh({el:U,componentModel:n,itemName:B,formatterParamsExtra:{title:E[B]}}),U.__title=E[B],U.on("mouseover",function(){var q=M.getItemStyle(),X=s?n.get("right")==null&&n.get("left")!=="right"?"right":"left":n.get("bottom")==null&&n.get("top")!=="bottom"?"bottom":"top";H.setStyle({fill:M.get("textFill")||q.fill||q.stroke||lt.color.neutral99,backgroundColor:M.get("textBackgroundColor")}),U.setTextConfig({position:M.get("textPosition")||X}),H.ignore=!n.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){S.get(["iconStatus",B])!=="emphasis"&&i.leaveEmphasis(this),H.hide()}),(S.get(["iconStatus",B])==="emphasis"?Ql:Kl)(U),o.add(U),U.on("click",Ct(w.onclick,w,r,i,B)),O[B]=U})}var m=ti(n,i).refContainer,x=n.getBoxLayoutParams(),_=n.get("padding"),b=On(x,m,_);ql(n.get("orient"),o,n.get("itemGap"),b.width,b.height),K_(o,x,m,_),o.add(kB(o.getBoundingRect(),n)),s||o.eachChild(function(S){var w=S.__title,A=S.ensureState("emphasis"),D=A.textConfig||(A.textConfig={}),M=S.getTextContent(),L=M&&M.ensureState("emphasis");if(L&&!Rt(L)&&w){var I=L.style||(L.style={}),N=S_(w,me.makeFont(I)),E=S.x+o.x,O=S.y+o.y+l,j=!1;O+N.height>i.getHeight()&&(D.position="top",j=!0);var B=j?-5-N.height:l+10;E+N.width/2>i.getWidth()?(D.position=["100%",B],I.align="right"):E-N.width/2<0&&(D.position=[0,B],I.align="left")}})},t.prototype.updateView=function(n,r,i,a){P(this._features,function(o){o instanceof fi&&o.updateView&&o.updateView(o.model,r,i,a)})},t.prototype.remove=function(n,r){P(this._features,function(i){i instanceof fi&&i.remove&&i.remove(n,r)}),this.group.removeAll()},t.prototype.dispose=function(n,r){P(this._features,function(i){i instanceof fi&&i.dispose&&i.dispose(n,r)})},t.type="toolbox",t})(zn);function PZ(e){return e.indexOf("my")===0}var HZ=(function(e){ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(n,r){var i=this.model,a=i.get("name")||n.get("title.0.text")||"echarts",o=r.getZr().painter.getType()==="svg",l=o?"svg":i.get("type",!0)||"png",s=r.getConnectedDataURL({type:l,backgroundColor:i.get("backgroundColor",!0)||n.get("backgroundColor")||lt.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),c=Gt.browser;if(typeof MouseEvent=="function"&&(c.newEdge||!c.ie&&!c.edge)){var h=document.createElement("a");h.download=a+"."+l,h.target="_blank",h.href=s;var d=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});h.dispatchEvent(d)}else if(window.navigator.msSaveOrOpenBlob||o){var v=s.split(","),g=v[0].indexOf("base64")>-1,m=o?decodeURIComponent(v[1]):v[1];g&&(m=window.atob(m));var x=a+"."+l;if(window.navigator.msSaveOrOpenBlob){for(var _=m.length,b=new Uint8Array(_);_--;)b[_]=m.charCodeAt(_);var S=new Blob([b]);window.navigator.msSaveOrOpenBlob(S,x)}else{var w=document.createElement("iframe");document.body.appendChild(w);var A=w.contentWindow,D=A.document;D.open("image/svg+xml","replace"),D.write(m),D.close(),A.focus(),D.execCommand("SaveAs",!0,x),document.body.removeChild(w)}}else{var M=i.get("lang"),L='<body style="margin:0;"><img src="'+s+'" style="max-width:100%;" title="'+(M&&M[0]||"")+'" /></body>',I=window.open();I.document.write(L),I.document.title=a}},t.getDefaultOption=function(n){var r={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:n.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:lt.color.neutral00,name:"",excludeComponents:["toolbox"],lang:n.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return r},t})(fi),BL="__ec_magicType_stack__",VZ=[["line","bar"],["stack"]],jZ=(function(e){ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getIcons=function(){var n=this.model,r=n.get("icon"),i={};return P(n.get("type"),function(a){r[a]&&(i[a]=r[a])}),i},t.getDefaultOption=function(n){var r={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:n.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return r},t.prototype.onclick=function(n,r,i){var a=this.model,o=a.get(["seriesIndex",i]);if(NL[i]){var l={series:[]},s=function(d){var v=d.subType,g=d.id,m=NL[i](v,g,d,a);m&&($t(m,d.option),l.series.push(m));var x=d.coordinateSystem;if(x&&x.type==="cartesian2d"&&(i==="line"||i==="bar")){var _=x.getAxesByScale("ordinal")[0];if(_){var b=_.dim,S=b+"Axis",w=d.getReferringComponents(S,En).models[0],A=w.componentIndex;l[S]=l[S]||[];for(var D=0;D<=A;D++)l[S][A]=l[S][A]||{};l[S][A].boundaryGap=i==="bar"}}};P(VZ,function(d){Wt(d,i)>=0&&P(d,function(v){a.setIconStatus(v,"normal")})}),a.setIconStatus(i,"emphasis"),n.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},s);var c,h=i;i==="stack"&&(c=qt({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(h="tiled")),r.dispatchAction({type:"changeMagicType",currentType:h,newOption:l,newTitle:c,featureName:"magicType"})}},t})(fi),NL={line:function(e,t,n,r){if(e==="bar")return qt({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(e,t,n,r){if(e==="line")return qt({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(e,t,n,r){var i=n.get("stack")===BL;if(e==="line"||e==="bar")return r.setIconStatus("stack",i?"normal":"emphasis"),qt({id:t,stack:i?"":BL},r.get(["option","stack"])||{},!0)}};qi({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var Ug=new Array(60).join("-"),ju=" ";function FZ(e){var t={},n=[],r=[];return e.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var l=o.dim+"_"+o.index;t[l]||(t[l]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},r.push({axisDim:o.dim,axisIndex:o.index})),t[l].series.push(i)}else n.push(i)}else n.push(i)}),{seriesGroupByCategoryAxis:t,other:n,meta:r}}function GZ(e){var t=[];return P(e,function(n,r){var i=n.categoryAxis,a=n.valueAxis,o=a.dim,l=[" "].concat(bt(n.series,function(g){return g.name})),s=[i.model.getCategories()];P(n.series,function(g){var m=g.getRawData();s.push(g.getRawData().mapArray(m.mapDimension(o),function(x){return x}))});for(var c=[l.join(ju)],h=0;h<s[0].length;h++){for(var d=[],v=0;v<s.length;v++)d.push(s[v][h]);c.push(d.join(ju))}t.push(c.join(`
|
|
96
|
+
`))}),t.join(`
|
|
97
|
+
|
|
98
|
+
`+Ug+`
|
|
99
|
+
|
|
100
|
+
`)}function UZ(e){return bt(e,function(t){var n=t.getRawData(),r=[t.name],i=[];return n.each(n.dimensions,function(){for(var a=arguments.length,o=arguments[a-1],l=n.getName(o),s=0;s<a-1;s++)i[s]=arguments[s];r.push((l?l+ju:"")+i.join(ju))}),r.join(`
|
|
101
|
+
`)}).join(`
|
|
102
|
+
|
|
103
|
+
`+Ug+`
|
|
104
|
+
|
|
105
|
+
`)}function YZ(e){var t=FZ(e);return{value:Ze([GZ(t.seriesGroupByCategoryAxis),UZ(t.other)],function(n){return!!n.replace(/[\n\t\s]/g,"")}).join(`
|
|
106
|
+
|
|
107
|
+
`+Ug+`
|
|
108
|
+
|
|
109
|
+
`),meta:t.meta}}function cg(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function WZ(e){var t=e.slice(0,e.indexOf(`
|
|
110
|
+
`));if(t.indexOf(ju)>=0)return!0}var Wb=new RegExp("["+ju+"]+","g");function qZ(e){for(var t=e.split(/\n+/g),n=cg(t.shift()).split(Wb),r=[],i=bt(n,function(s){return{name:s,data:[]}}),a=0;a<t.length;a++){var o=cg(t[a]).split(Wb);r.push(o.shift());for(var l=0;l<o.length;l++)i[l]&&(i[l].data[a]=o[l])}return{series:i,categories:r}}function XZ(e){for(var t=e.split(/\n+/g),n=cg(t.shift()),r=[],i=0;i<t.length;i++){var a=cg(t[i]);if(a){var o=a.split(Wb),l="",s=void 0,c=!1;isNaN(o[0])?(c=!0,l=o[0],o=o.slice(1),r[i]={name:l,value:[]},s=r[i].value):s=r[i]=[];for(var h=0;h<o.length;h++)s.push(+o[h]);s.length===1&&(c?r[i].value=s[0]:r[i]=s[0])}}return{name:n,data:r}}function ZZ(e,t){var n=e.split(new RegExp(`
|
|
111
|
+
*`+Ug+`
|
|
112
|
+
*`,"g")),r={series:[]};return P(n,function(i,a){if(WZ(i)){var o=qZ(i),l=t[a],s=l.axisDim+"Axis";l&&(r[s]=r[s]||[],r[s][l.axisIndex]={data:o.categories},r.series=r.series.concat(o.series))}else{var o=XZ(i);r.series.push(o)}}),r}var $Z=(function(e){ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(n,r){setTimeout(function(){r.dispatchAction({type:"hideTip"})});var i=r.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")||lt.color.neutral00;var l=document.createElement("h4"),s=a.get("lang")||[];l.innerHTML=s[0]||a.get("title"),l.style.cssText="margin:10px 20px",l.style.color=a.get("textColor");var c=document.createElement("div"),h=document.createElement("textarea");c.style.cssText="overflow:auto";var d=a.get("optionToContent"),v=a.get("contentToOption"),g=YZ(n);if(Rt(d)){var m=d(r.getOption());St(m)?c.innerHTML=m:Ru(m)&&c.appendChild(m)}else{h.readOnly=a.get("readOnly");var x=h.style;x.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",x.color=a.get("textColor"),x.borderColor=a.get("textareaBorderColor"),x.backgroundColor=a.get("textareaColor"),h.value=g.value,c.appendChild(h)}var _=g.meta,b=document.createElement("div");b.style.cssText="position:absolute;bottom:5px;left:0;right:0";var S="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",w=document.createElement("div"),A=document.createElement("div");S+=";background-color:"+a.get("buttonColor"),S+=";color:"+a.get("buttonTextColor");var D=this;function M(){i.removeChild(o),D._dom=null}Dx(w,"click",M),Dx(A,"click",function(){if(v==null&&d!=null||v!=null&&d==null){M();return}var L;try{Rt(v)?L=v(c,r.getOption()):L=ZZ(h.value,_)}catch(I){throw M(),new Error("Data view format error "+I)}L&&r.dispatchAction({type:"changeDataView",newOption:L}),M()}),w.innerHTML=s[1],A.innerHTML=s[2],A.style.cssText=w.style.cssText=S,!a.get("readOnly")&&b.appendChild(A),b.appendChild(w),o.appendChild(l),o.appendChild(c),o.appendChild(b),c.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},t.prototype.remove=function(n,r){this._dom&&r.getDom().removeChild(this._dom)},t.prototype.dispose=function(n,r){this.remove(n,r)},t.getDefaultOption=function(n){var r={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:n.getLocaleModel().get(["toolbox","dataView","title"]),lang:n.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:lt.color.background,textColor:lt.color.primary,textareaColor:lt.color.background,textareaBorderColor:lt.color.border,buttonColor:lt.color.accent50,buttonTextColor:lt.color.neutral00};return r},t})(fi);function QZ(e,t){return bt(e,function(n,r){var i=t&&t[r];if(Lt(i)&&!mt(i)){var a=Lt(n)&&!mt(n);a||(n={value:n});var o=i.name!=null&&n.name==null;return n=$t(n,i),o&&delete n.name,n}else return n})}qi({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(e,t){var n=[];P(e.newOption.series,function(r){var i=t.getSeriesByName(r.name)[0];if(!i)n.push(dt({type:"scatter"},r));else{var a=i.get("data");n.push({name:r.name,data:QZ(r.data,a)})}}),t.mergeOption($t({series:n},e.newOption))});var LB=P,EB=be();function KZ(e,t){var n=FS(e);LB(t,function(r,i){for(var a=n.length-1;a>=0;a--){var o=n[a];if(o[i])break}if(a<0){var l=e.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(l){var s=l.getPercentRange();n[0][i]={dataZoomId:i,start:s[0],end:s[1]}}}}),n.push(t)}function JZ(e){var t=FS(e),n=t[t.length-1];t.length>1&&t.pop();var r={};return LB(n,function(i,a){for(var o=t.length-1;o>=0;o--)if(i=t[o][a],i){r[a]=i;break}}),r}function t$(e){EB(e).snapshots=null}function e$(e){return FS(e).length}function FS(e){var t=EB(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var n$=(function(e){ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(n,r){t$(n),r.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(n){var r={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:n.getLocaleModel().get(["toolbox","restore","title"])};return r},t})(fi);qi({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var r$=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],RB=(function(){function e(t,n,r){var i=this;this._targetInfoList=[];var a=PL(n,t);P(i$,function(o,l){(!r||!r.include||Wt(r.include,l)>=0)&&o(a,i._targetInfoList)})}return e.prototype.setOutputRanges=function(t,n){return this.matchOutputRanges(t,n,function(r,i,a){if((r.coordRanges||(r.coordRanges=[])).push(i),!r.coordRange){r.coordRange=i;var o=q1[r.brushType](0,a,i);r.__rangeOffset={offset:FL[r.brushType](o.values,r.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},e.prototype.matchOutputRanges=function(t,n,r){P(t,function(i){var a=this.findTargetInfo(i,n);a&&a!==!0&&P(a.coordSyses,function(o){var l=q1[i.brushType](1,o,i.range,!0);r(i,l.values,o,n)})},this)},e.prototype.setInputRanges=function(t,n){P(t,function(r){var i=this.findTargetInfo(r,n);if(r.range=r.range||[],i&&i!==!0){r.panelId=i.panelId;var a=q1[r.brushType](0,i.coordSys,r.coordRange),o=r.__rangeOffset;r.range=o?FL[r.brushType](a.values,o.offset,a$(a.xyMinMax,o.xyMinMax)):a.values}},this)},e.prototype.makePanelOpts=function(t,n){return bt(this._targetInfoList,function(r){var i=r.getPanelRect();return{panelId:r.panelId,defaultBrushType:n?n(r):null,clipPath:Pq(i),isTargetByCursor:Vq(i,t,r.coordSysModel),getLinearBrushOtherExtent:Hq(i)}})},e.prototype.controlSeries=function(t,n,r){var i=this.findTargetInfo(t,r);return i===!0||i&&Wt(i.coordSyses,n.coordinateSystem)>=0},e.prototype.findTargetInfo=function(t,n){for(var r=this._targetInfoList,i=PL(n,t),a=0;a<r.length;a++){var o=r[a],l=t.panelId;if(l){if(o.panelId===l)return o}else for(var s=0;s<HL.length;s++)if(HL[s](i,o))return o}return!0},e})();function qb(e){return e[0]>e[1]&&e.reverse(),e}function PL(e,t){return Vf(e,t,{includeMainTypes:r$})}var i$={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,a=Bt(),o={},l={};!n&&!r&&!i||(P(n,function(s){var c=s.axis.grid.model;a.set(c.id,c),o[c.id]=!0}),P(r,function(s){var c=s.axis.grid.model;a.set(c.id,c),l[c.id]=!0}),P(i,function(s){a.set(s.id,s),o[s.id]=!0,l[s.id]=!0}),a.each(function(s){var c=s.coordinateSystem,h=[];P(c.getCartesians(),function(d,v){(Wt(n,d.getAxis("x").model)>=0||Wt(r,d.getAxis("y").model)>=0)&&h.push(d)}),t.push({panelId:"grid--"+s.id,gridModel:s,coordSysModel:s,coordSys:h[0],coordSyses:h,getPanelRect:VL.grid,xAxisDeclared:o[s.id],yAxisDeclared:l[s.id]})}))},geo:function(e,t){P(e.geoModels,function(n){var r=n.coordinateSystem;t.push({panelId:"geo--"+n.id,geoModel:n,coordSysModel:n,coordSys:r,coordSyses:[r],getPanelRect:VL.geo})})}},HL=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],VL={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(Yl(e)),t}},q1={lineX:Yt(jL,0),lineY:Yt(jL,1),rect:function(e,t,n,r){var i=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),a=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),o=[qb([i[0],a[0]]),qb([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,n,r){var i=[[1/0,-1/0],[1/0,-1/0]],a=bt(n,function(o){var l=e?t.pointToData(o,r):t.dataToPoint(o,r);return i[0][0]=Math.min(i[0][0],l[0]),i[1][0]=Math.min(i[1][0],l[1]),i[0][1]=Math.max(i[0][1],l[0]),i[1][1]=Math.max(i[1][1],l[1]),l});return{values:a,xyMinMax:i}}};function jL(e,t,n,r){var i=n.getAxis(["x","y"][e]),a=qb(bt([0,1],function(l){return t?i.coordToData(i.toLocalCoord(r[l]),!0):i.toGlobalCoord(i.dataToCoord(r[l]))})),o=[];return o[e]=a,o[1-e]=[NaN,NaN],{values:a,xyMinMax:o}}var FL={lineX:Yt(GL,0),lineY:Yt(GL,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return bt(e,function(r,i){return[r[0]-n[0]*t[i][0],r[1]-n[1]*t[i][1]]})}};function GL(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function a$(e,t){var n=UL(e),r=UL(t),i=[n[0]/r[0],n[1]/r[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function UL(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var Xb=P,o$=nV("toolbox-dataZoom_"),l$=(function(e){ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(n,r,i,a){this._brushController||(this._brushController=new kq(i.getZr()),this._brushController.on("brush",Ct(this._onBrush,this)).mount()),c$(n,r,this,a,i),u$(n,r)},t.prototype.onclick=function(n,r,i){s$[i].call(this)},t.prototype.remove=function(n,r){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(n,r){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(n){var r=n.areas;if(!n.isEnd||!r.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new RB(GS(this.model),a,{include:["grid"]});o.matchOutputRanges(r,a,function(c,h,d){if(d.type==="cartesian2d"){var v=c.brushType;v==="rect"?(l("x",d,h[0]),l("y",d,h[1])):l({lineX:"x",lineY:"y"}[v],d,h)}}),KZ(a,i),this._dispatchZoomAction(i);function l(c,h,d){var v=h.getAxis(c),g=v.model,m=s(c,g,a),x=m.findRepresentativeAxisProxy(g).getMinMaxSpan();(x.minValueSpan!=null||x.maxValueSpan!=null)&&(d=ts(0,d.slice(),v.scale.getExtent(),0,x.minValueSpan,x.maxValueSpan)),m&&(i[m.id]={dataZoomId:m.id,startValue:d[0],endValue:d[1]})}function s(c,h,d){var v;return d.eachComponent({mainType:"dataZoom",subType:"select"},function(g){var m=g.getAxisModel(c,h.componentIndex);m&&(v=g)}),v}},t.prototype._dispatchZoomAction=function(n){var r=[];Xb(n,function(i,a){r.push(It(i))}),r.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:r})},t.getDefaultOption=function(n){var r={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:n.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:lt.color.backgroundTint}};return r},t})(fi),s$={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(JZ(this.ecModel))}};function GS(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function u$(e,t){e.setIconStatus("back",e$(t)>1?"emphasis":"normal")}function c$(e,t,n,r,i){var a=n._isZoomActive;r&&r.type==="takeGlobalCursor"&&(a=r.key==="dataZoomSelect"?r.dataZoomSelectActive:!1),n._isZoomActive=a,e.setIconStatus("zoom",a?"emphasis":"normal");var o=new RB(GS(e),t,{include:["grid"]}),l=o.makePanelOpts(i,function(s){return s.xAxisDeclared&&!s.yAxisDeclared?"lineX":!s.xAxisDeclared&&s.yAxisDeclared?"lineY":"rect"});n._brushController.setPanels(l).enableBrush(a&&l.length?{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()}:!1)}rF("dataZoom",function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(!t||t.get(n)==null)return;var r=t.getModel(n),i=[],a=GS(r),o=Vf(e,a);Xb(o.xAxisModels,function(s){return l(s,"xAxis","xAxisIndex")}),Xb(o.yAxisModels,function(s){return l(s,"yAxis","yAxisIndex")});function l(s,c,h){var d=s.componentIndex,v={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:o$+c+d};v[h]=d,i.push(v)}return i});function f$(e){e.registerComponentModel(BZ),e.registerComponentView(NZ),gf("saveAsImage",HZ),gf("magicType",jZ),gf("dataView",$Z),gf("dataZoom",l$),gf("restore",n$),qn(zZ)}var h$=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}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:lt.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:lt.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:lt.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:lt.color.tertiary,fontSize:14}},t})(he);function IB(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function OB(e){if(Gt.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var zB=OB(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),d$=OB(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function BB(e,t){if(!e)return t;t=hO(t,!0);var n=e.indexOf(t);return e=n===-1?t:"-"+e.slice(0,n)+"-"+t,e.toLowerCase()}function v$(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?n[t]:null}var p$=BB(d$,"transition"),US=BB(zB,"transform"),g$="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Gt.transform3dSupported?"will-change:transform;":"");function m$(e){return e=e==="left"?"right":e==="right"?"left":e==="top"?"bottom":"top",e}function y$(e,t,n){if(!St(n)||n==="inside")return"";var r=e.get("backgroundColor"),i=e.get("borderWidth");t=Jl(t);var a=m$(n),o=Math.max(Math.round(i)*1.5,6),l="",s=US+":",c;Wt(["left","right"],a)>-1?(l+="top:50%",s+="translateY(-50%) rotate("+(c=a==="left"?-225:-45)+"deg)"):(l+="left:50%",s+="translateX(-50%) rotate("+(c=a==="top"?225:45)+"deg)");var h=c*Math.PI/180,d=o+i,v=d*Math.abs(Math.cos(h))+d*Math.abs(Math.sin(h)),g=Math.round(((v-Math.SQRT2*i)/2+Math.SQRT2*i-(v-d)/2)*100)/100;l+=";"+a+":-"+g+"px";var m=t+" solid "+i+"px;",x=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",l+";"+s+";","border-bottom:"+m,"border-right:"+m,"background-color:"+r+";"];return'<div style="'+x.join("")+'"></div>'}function x$(e,t,n){var r="cubic-bezier(0.23,1,0.32,1)",i="",a="";return n&&(i=" "+e/2+"s "+r,a="opacity"+i+",visibility"+i),t||(i=" "+e+"s "+r,a+=(a.length?",":"")+(Gt.transformSupported?""+US+i:",left"+i+",top"+i)),p$+":"+a}function YL(e,t,n){var r=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Gt.transformSupported)return n?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var a=Gt.transform3dSupported,o="translate"+(a?"3d":"")+"("+r+","+i+(a?",0":"")+")";return n?"top:0;left:0;"+US+":"+o+";":[["top",0],["left",0],[zB,o]]}function b$(e){var t=[],n=e.get("fontSize"),r=e.getTextColor();r&&t.push("color:"+r),t.push("font:"+e.getFont());var i=zt(e.get("lineHeight"),Math.round(n*3/2));n&&t.push("line-height:"+i+"px");var a=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,l=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+l+"px "+s+"px "+o+"px "+a),P(["decoration","align"],function(c){var h=e.get(c);h&&t.push("text-"+c+":"+h)}),t.join(";")}function _$(e,t,n,r){var i=[],a=e.get("transitionDuration"),o=e.get("backgroundColor"),l=e.get("shadowBlur"),s=e.get("shadowColor"),c=e.get("shadowOffsetX"),h=e.get("shadowOffsetY"),d=e.getModel("textStyle"),v=UO(e,"html"),g=c+"px "+h+"px "+l+"px "+s;return i.push("box-shadow:"+g),t&&a>0&&i.push(x$(a,n,r)),o&&i.push("background-color:"+o),P(["width","color","radius"],function(m){var x="border-"+m,_=hO(x),b=e.get(_);b!=null&&i.push(x+":"+b+(m==="color"?"":"px"))}),i.push(b$(d)),v!=null&&i.push("padding:"+Ih(v).join("px ")+"px"),i.join(";")+";"}function WL(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&kH(e,o,n,r,i)}else{e[0]=r,e[1]=i;var l=a&&a.getViewportRootOffset();l&&(e[0]+=l.offsetLeft,e[1]+=l.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var S$=(function(){function e(t,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Gt.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var i=this._zr=t.getZr(),a=n.appendTo,o=a&&(St(a)?document.querySelector(a):Ru(a)?a:Rt(a)&&a(t.getDom()));WL(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(r),this._api=t,this._container=o;var l=this;r.onmouseenter=function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0},r.onmousemove=function(s){if(s=s||window.event,!l._enterable){var c=i.handler,h=i.painter.getViewportRoot();Vr(h,s,!0),c.dispatch("mousemove",s)}},r.onmouseleave=function(){l._inContent=!1,l._enterable&&l._show&&l.hideLater(l._hideDelay)}}return e.prototype.update=function(t){if(!this._container){var n=this._api.getDom(),r=v$(n,"position"),i=n.style;i.position!=="absolute"&&r!=="absolute"&&(i.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},e.prototype.show=function(t,n){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var r=this.el,i=r.style,a=this._styleCoord;r.innerHTML?i.cssText=g$+_$(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+YL(a[0],a[1],!0)+("border-color:"+Jl(n)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,n,r,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var l="";if(St(a)&&r.get("trigger")==="item"&&!IB(r)&&(l=y$(r,i,a)),St(t))o.innerHTML=t+l;else if(t){o.innerHTML="",mt(t)||(t=[t]);for(var s=0;s<t.length;s++)Ru(t[s])&&t[s].parentNode!==o&&o.appendChild(t[s]);if(l&&o.childNodes.length){var c=document.createElement("div");c.innerHTML=l,o.appendChild(c)}}},e.prototype.setEnterable=function(t){this._enterable=t},e.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},e.prototype.moveTo=function(t,n){if(this.el){var r=this._styleCoord;if(WL(r,this._zr,this._container,t,n),r[0]!=null&&r[1]!=null){var i=this.el.style,a=YL(r[0],r[1]);P(a,function(o){i[o[0]]=o[1]})}}},e.prototype._moveIfResized=function(){var t=this._styleCoord[2],n=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),n*this._zr.getHeight())},e.prototype.hide=function(){var t=this,n=this.el.style;this._enableDisplayTransition?(n.visibility="hidden",n.opacity="0"):n.display="none",Gt.transform3dSupported&&(n.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},e.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(Ct(this.hide,this),t)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this._zr;LH(t&&t.painter&&t.painter.getViewportRoot(),this._container);var n=this.el;if(n){n.onmouseenter=n.onmousemove=n.onmouseleave=null;var r=n.parentNode;r&&r.removeChild(n)}this.el=this._container=null},e})(),w$=(function(){function e(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),XL(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return e.prototype.update=function(t){var n=t.get("alwaysShowContent");n&&this._moveIfResized(),this._alwaysShowContent=n},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(t,n,r,i,a){var o=this;Lt(t)&&Fn(""),this.el&&this._zr.remove(this.el);var l=r.getModel("textStyle");this.el=new me({style:{rich:n.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:l.get("textShadowColor"),fill:r.get(["textStyle","color"]),padding:UO(r,"richText"),verticalAlign:"top",align:"left"},z:r.get("z")}),P(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(c){o.el.style[c]=r.get(c)}),P(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(c){o.el.style[c]=l.get(c)||0}),this._zr.add(this.el);var s=this;this.el.on("mouseover",function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0}),this.el.on("mouseout",function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1})},e.prototype.setEnterable=function(t){this._enterable=t},e.prototype.getSize=function(){var t=this.el,n=this.el.getBoundingRect(),r=qL(t.style);return[n.width+r.left+r.right,n.height+r.top+r.bottom]},e.prototype.moveTo=function(t,n){var r=this.el;if(r){var i=this._styleCoord;XL(i,this._zr,t,n),t=i[0],n=i[1];var a=r.style,o=vo(a.borderWidth||0),l=qL(a);r.x=t+o+l.left,r.y=n+o+l.top,r.markRedraw()}},e.prototype._moveIfResized=function(){var t=this._styleCoord[2],n=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),n*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(Ct(this.hide,this),t)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e})();function vo(e){return Math.max(0,e)}function qL(e){var t=vo(e.shadowBlur||0),n=vo(e.shadowOffsetX||0),r=vo(e.shadowOffsetY||0);return{left:vo(t-n),right:vo(t+n),top:vo(t-r),bottom:vo(t+r)}}function XL(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var T$=new le({shape:{x:-1,y:-1,width:2,height:2}}),C$=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(n,r){if(!(Gt.node||!r.getDom())){var i=n.getComponent("tooltip"),a=this._renderMode=uV(i.get("renderMode"));this._tooltipContent=a==="richText"?new w$(r):new S$(r,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},t.prototype.render=function(n,r,i){if(!(Gt.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=n,this._ecModel=r,this._api=i;var a=this._tooltipContent;a.update(n),a.setEnterable(n.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&n.get("transitionDuration")?Pg(this,"_updatePosition",50,"fixRate"):Up(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var n=this._tooltipModel,r=n.get("triggerOn");wB("itemTooltip",this._api,Ct(function(i,a,o){r!=="none"&&(r.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var n=this._tooltipModel,r=this._ecModel,i=this._api,a=n.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(n,r,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(n,r,i,a){if(!(a.from===this.uid||Gt.node||!i.getDom())){var o=ZL(a,i);this._ticket="";var l=a.dataByCoordSys,s=k$(a,r,i);if(s){var c=s.el.getBoundingRect().clone();c.applyTransform(s.el.transform),this._tryShow({offsetX:c.x+c.width/2,offsetY:c.y+c.height/2,target:s.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var h=T$;h.x=a.x,h.y=a.y,h.update(),Zt(h).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:h},o)}else if(l)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:l,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(n,r,i,a))return;var d=TB(a,r),v=d.point[0],g=d.point[1];v!=null&&g!=null&&this._tryShow({offsetX:v,offsetY:g,target:d.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(n,r,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(ZL(a,i))},t.prototype._manuallyAxisShowTip=function(n,r,i,a){var o=a.seriesIndex,l=a.dataIndex,s=r.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||l==null||s==null)){var c=r.getSeriesByIndex(o);if(c){var h=c.getData(),d=mf([h.getItemModel(l),c,(c.coordinateSystem||{}).model],this._tooltipModel);if(d.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:l,position:a.position}),!0}}},t.prototype._tryShow=function(n,r){var i=n.target,a=this._tooltipModel;if(a){this._lastX=n.offsetX,this._lastY=n.offsetY;var o=n.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,n);else if(i){var l=Zt(i);if(l.ssrType==="legend")return;this._lastDataByCoordSys=null;var s,c;Mu(i,function(h){if(h.tooltipDisabled)return s=c=null,!0;s||c||(Zt(h).dataIndex!=null?s=h:Zt(h).tooltipConfig!=null&&(c=h))},!0),s?this._showSeriesItemTooltip(n,s,r):c?this._showComponentItemTooltip(n,c,r):this._hide(r)}else this._lastDataByCoordSys=null,this._hide(r)}},t.prototype._showOrMove=function(n,r){var i=n.get("showDelay");r=Ct(r,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(r,i):r()},t.prototype._showAxisTooltip=function(n,r){var i=this._ecModel,a=this._tooltipModel,o=[r.offsetX,r.offsetY],l=mf([r.tooltipOption],a),s=this._renderMode,c=[],h=Ui("section",{blocks:[],noHeader:!0}),d=[],v=new h1;P(n,function(S){P(S.dataByAxis,function(w){var A=i.getComponent(w.axisDim+"Axis",w.axisIndex),D=w.value;if(!(!A||D==null)){var M=_B(D,A.axis,i,w.seriesDataIndices,w.valueLabelOpt),L=Ui("section",{header:M,noHeader:!Bi(M),sortBlocks:!0,blocks:[]});h.blocks.push(L),P(w.seriesDataIndices,function(I){var N=i.getSeriesByIndex(I.seriesIndex),E=I.dataIndexInside,O=N.getDataParams(E);if(!(O.dataIndex<0)){O.axisDim=w.axisDim,O.axisIndex=w.axisIndex,O.axisType=w.axisType,O.axisId=w.axisId,O.axisValue=Kp(A.axis,{value:D}),O.axisValueLabel=M,O.marker=v.makeTooltipMarker("item",Jl(O.color),s);var j=dD(N.formatTooltip(E,!0,null)),B=j.frag;if(B){var U=mf([N],a).get("valueFormatter");L.blocks.push(U?dt({valueFormatter:U},B):B)}j.text&&d.push(j.text),c.push(O)}})}})}),h.blocks.reverse(),d.reverse();var g=r.position,m=l.get("order"),x=xD(h,v,s,m,i.get("useUTC"),l.get("textStyle"));x&&d.unshift(x);var _=s==="richText"?`
|
|
113
|
+
|
|
114
|
+
`:"<br/>",b=d.join(_);this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(n,c)?this._updatePosition(l,g,o[0],o[1],this._tooltipContent,c):this._showTooltipContent(l,b,c,Math.random()+"",o[0],o[1],g,null,v)})},t.prototype._showSeriesItemTooltip=function(n,r,i){var a=this._ecModel,o=Zt(r),l=o.seriesIndex,s=a.getSeriesByIndex(l),c=o.dataModel||s,h=o.dataIndex,d=o.dataType,v=c.getData(d),g=this._renderMode,m=n.positionDefault,x=mf([v.getItemModel(h),c,s&&(s.coordinateSystem||{}).model],this._tooltipModel,m?{position:m}:null),_=x.get("trigger");if(!(_!=null&&_!=="item")){var b=c.getDataParams(h,d),S=new h1;b.marker=S.makeTooltipMarker("item",Jl(b.color),g);var w=dD(c.formatTooltip(h,!1,d)),A=x.get("order"),D=x.get("valueFormatter"),M=w.frag,L=M?xD(D?dt({valueFormatter:D},M):M,S,g,A,a.get("useUTC"),x.get("textStyle")):w.text,I="item_"+c.name+"_"+h;this._showOrMove(x,function(){this._showTooltipContent(x,L,b,I,n.offsetX,n.offsetY,n.position,n.target,S)}),i({type:"showTip",dataIndexInside:h,dataIndex:v.getRawIndex(h),seriesIndex:l,from:this.uid})}},t.prototype._showComponentItemTooltip=function(n,r,i){var a=this._renderMode==="html",o=Zt(r),l=o.tooltipConfig,s=l.option||{},c=s.encodeHTMLContent;if(St(s)){var h=s;s={content:h,formatter:h},c=!0}c&&a&&s.content&&(s=It(s),s.content=ar(s.content));var d=[s],v=this._ecModel.getComponent(o.componentMainType,o.componentIndex);v&&d.push(v),d.push({formatter:s.content});var g=n.positionDefault,m=mf(d,this._tooltipModel,g?{position:g}:null),x=m.get("content"),_=Math.random()+"",b=new h1;this._showOrMove(m,function(){var S=It(m.get("formatterParams")||{});this._showTooltipContent(m,x,S,_,n.offsetX,n.offsetY,n.position,r,b)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(n,r,i,a,o,l,s,c,h){if(this._ticket="",!(!n.get("showContent")||!n.get("show"))){var d=this._tooltipContent;d.setEnterable(n.get("enterable"));var v=n.get("formatter");s=s||n.get("position");var g=r,m=this._getNearestPoint([o,l],i,n.get("trigger"),n.get("borderColor"),n.get("defaultBorderColor",!0)),x=m.color;if(v)if(St(v)){var _=n.ecModel.get("useUTC"),b=mt(i)?i[0]:i,S=b&&b.axisType&&b.axisType.indexOf("time")>=0;g=v,S&&(g=zg(b.axisValue,g,_)),g=dO(g,i,!0)}else if(Rt(v)){var w=Ct(function(A,D){A===this._ticket&&(d.setContent(D,h,n,x,s),this._updatePosition(n,s,o,l,d,i,c))},this);this._ticket=a,g=v(i,a,w)}else g=v;d.setContent(g,h,n,x,s),d.show(n,x),this._updatePosition(n,s,o,l,d,i,c)}},t.prototype._getNearestPoint=function(n,r,i,a,o){if(i==="axis"||mt(r))return{color:a||o};if(!mt(r))return{color:a||r.color||r.borderColor}},t.prototype._updatePosition=function(n,r,i,a,o,l,s){var c=this._api.getWidth(),h=this._api.getHeight();r=r||n.get("position");var d=o.getSize(),v=n.get("align"),g=n.get("verticalAlign"),m=s&&s.getBoundingRect().clone();if(s&&m.applyTransform(s.transform),Rt(r)&&(r=r([i,a],l,o.el,m,{viewSize:[c,h],contentSize:d.slice()})),mt(r))i=At(r[0],c),a=At(r[1],h);else if(Lt(r)){var x=r;x.width=d[0],x.height=d[1];var _=On(x,{width:c,height:h});i=_.x,a=_.y,v=null,g=null}else if(St(r)&&s){var b=D$(r,m,d,n.get("borderWidth"));i=b[0],a=b[1]}else{var b=M$(i,a,o,c,h,v?null:20,g?null:20);i=b[0],a=b[1]}if(v&&(i-=$L(v)?d[0]/2:v==="right"?d[0]:0),g&&(a-=$L(g)?d[1]/2:g==="bottom"?d[1]:0),IB(n)){var b=A$(i,a,o,c,h);i=b[0],a=b[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(n,r){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===n.length;return o&&P(i,function(l,s){var c=l.dataByAxis||[],h=n[s]||{},d=h.dataByAxis||[];o=o&&c.length===d.length,o&&P(c,function(v,g){var m=d[g]||{},x=v.seriesDataIndices||[],_=m.seriesDataIndices||[];o=o&&v.value===m.value&&v.axisType===m.axisType&&v.axisId===m.axisId&&x.length===_.length,o&&P(x,function(b,S){var w=_[S];o=o&&b.seriesIndex===w.seriesIndex&&b.dataIndex===w.dataIndex}),a&&P(v.seriesDataIndices,function(b){var S=b.seriesIndex,w=r[S],A=a[S];w&&A&&A.data!==w.data&&(o=!1)})})}),this._lastDataByCoordSys=n,this._cbParamsList=r,!!o},t.prototype._hide=function(n){this._lastDataByCoordSys=null,n({type:"hideTip",from:this.uid})},t.prototype.dispose=function(n,r){Gt.node||!r.getDom()||(Up(this,"_updatePosition"),this._tooltipContent.dispose(),Yb("itemTooltip",r))},t.type="tooltip",t})(zn);function mf(e,t,n){var r=t.ecModel,i;n?(i=new Te(n,r,r),i=new Te(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof Te&&(o=o.get("tooltip",!0)),St(o)&&(o={formatter:o}),o&&(i=new Te(o,i,r)))}return i}function ZL(e,t){return e.dispatchAction||Ct(t.dispatchAction,t)}function M$(e,t,n,r,i,a,o){var l=n.getSize(),s=l[0],c=l[1];return a!=null&&(e+s+a+2>r?e-=s+a:e+=a),o!=null&&(t+c+o>i?t-=c+o:t+=o),[e,t]}function A$(e,t,n,r,i){var a=n.getSize(),o=a[0],l=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+l,i)-l,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function D$(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,l=0,s=0,c=t.width,h=t.height;switch(e){case"inside":l=t.x+c/2-i/2,s=t.y+h/2-a/2;break;case"top":l=t.x+c/2-i/2,s=t.y-a-o;break;case"bottom":l=t.x+c/2-i/2,s=t.y+h+o;break;case"left":l=t.x-i-o,s=t.y+h/2-a/2;break;case"right":l=t.x+c+o,s=t.y+h/2-a/2}return[l,s]}function $L(e){return e==="center"||e==="middle"}function k$(e,t,n){var r=C_(e).queryOptionMap,i=r.keys()[0];if(!(!i||i==="series")){var a=Wu(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var l=n.getViewOfComponentModel(o),s;if(l.group.traverse(function(c){var h=Zt(c).tooltipConfig;if(h&&h.name===e.name)return s=c,!0}),s)return{componentMainType:i,componentIndex:o.componentIndex,el:s}}}}function L$(e){qn(CB),e.registerComponentModel(h$),e.registerComponentView(C$),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Cn),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Cn)}var QL=P;function KL(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function JL(e,t,n){var r={};return QL(t,function(a){var o=r[a]=i();QL(e[a],function(l,s){if(gn.isValidType(s)){var c={type:s,visual:l};n&&n(c,a),o[s]=new gn(c),s==="opacity"&&(c=It(c),c.type="colorAlpha",o.__hidden.__alphaForOpacity=new gn(c))}})}),r;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function E$(e,t,n){var r;P(n,function(i){t.hasOwnProperty(i)&&KL(t[i])&&(r=!0)}),r&&P(n,function(i){t.hasOwnProperty(i)&&KL(t[i])?e[i]=It(t[i]):delete e[i]})}function R$(e,t,n,r){var i={};return P(e,function(a){var o=gn.prepareVisualTypes(t[a]);i[a]=o}),{progress:function(o,l){var s;r!=null&&(s=l.getDimensionIndex(r));function c(D){return JO(l,d,D)}function h(D,M){zG(l,d,D,M)}for(var d,v=l.getStore();(d=o.next())!=null;){var g=l.getRawDataItem(d);if(!(g&&g.visualMap===!1))for(var m=r!=null?v.get(s,d):d,x=n(m),_=t[x],b=i[x],S=0,w=b.length;S<w;S++){var A=b[S];_[A]&&_[A].applyVisual(m,c,h)}}}}}var I$=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:lt.size.m,backgroundColor:lt.color.transparent,borderColor:lt.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:lt.color.primary},subtextStyle:{fontSize:12,color:lt.color.quaternary}},t})(he),O$=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,i){if(this.group.removeAll(),!!n.get("show")){var a=this.group,o=n.getModel("textStyle"),l=n.getModel("subtextStyle"),s=n.get("textAlign"),c=zt(n.get("textBaseline"),n.get("textVerticalAlign")),h=new me({style:$e(o,{text:n.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),d=h.getBoundingRect(),v=n.get("subtext"),g=new me({style:$e(l,{text:v,fill:l.getTextColor(),y:d.height+n.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),m=n.get("link"),x=n.get("sublink"),_=n.get("triggerEvent",!0);h.silent=!m&&!_,g.silent=!x&&!_,m&&h.on("click",function(){Fp(m,"_"+n.get("target"))}),x&&g.on("click",function(){Fp(x,"_"+n.get("subtarget"))}),Zt(h).eventData=Zt(g).eventData=_?{componentType:"title",componentIndex:n.componentIndex}:null,a.add(h),v&&a.add(g);var b=a.getBoundingRect(),S=n.getBoxLayoutParams();S.width=b.width,S.height=b.height;var w=ti(n,i),A=On(S,w.refContainer,n.get("padding"));s||(s=n.get("left")||n.get("right"),s==="middle"&&(s="center"),s==="right"?A.x+=A.width:s==="center"&&(A.x+=A.width/2)),c||(c=n.get("top")||n.get("bottom"),c==="center"&&(c="middle"),c==="bottom"?A.y+=A.height:c==="middle"&&(A.y+=A.height/2),c=c||"top"),a.x=A.x,a.y=A.y,a.markRedraw();var D={align:s,verticalAlign:c};h.setStyle(D),g.setStyle(D),b=a.getBoundingRect();var M=A.margin,L=n.getItemStyle(["color","opacity"]);L.fill=n.get("backgroundColor");var I=new le({shape:{x:b.x-M[3],y:b.y-M[0],width:b.width+M[1]+M[3],height:b.height+M[0]+M[2],r:n.get("borderRadius")},style:L,subPixelOptimize:!0,silent:!0});a.add(I)}},t.type="title",t})(zn);function z$(e){e.registerComponentModel(I$),e.registerComponentView(O$)}var B$=function(e,t){if(t==="all")return{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}},Zb=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return t.prototype.init=function(n,r,i){this.mergeDefaultAndTheme(n,i),n.selected=n.selected||{},this._updateSelector(n)},t.prototype.mergeOption=function(n,r){e.prototype.mergeOption.call(this,n,r),this._updateSelector(n)},t.prototype._updateSelector=function(n){var r=n.selector,i=this.ecModel;r===!0&&(r=n.selector=["all","inverse"]),mt(r)&&P(r,function(a,o){St(a)&&(a={type:a}),r[o]=qt(a,B$(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var n=this._data;if(n[0]&&this.get("selectedMode")==="single"){for(var r=!1,i=0;i<n.length;i++){var a=n[i].get("name");if(this.isSelected(a)){this.select(a),r=!0;break}}!r&&this.select(n[0].get("name"))}},t.prototype._updateData=function(n){var r=[],i=[];n.eachRawSeries(function(s){var c=s.name;i.push(c);var h;if(s.legendVisualProvider){var d=s.legendVisualProvider,v=d.getAllNames();n.isSeriesFiltered(s)||(i=i.concat(v)),v.length?r=r.concat(v):h=!0}else h=!0;h&&T_(s)&&r.push(s.name)}),this._availableNames=i;var a=this.get("data")||r,o=Bt(),l=bt(a,function(s){return(St(s)||ve(s))&&(s={name:s}),o.get(s.name)?null:(o.set(s.name,!0),new Te(s,this,this.ecModel))},this);this._data=Ze(l,function(s){return!!s})},t.prototype.getData=function(){return this._data},t.prototype.select=function(n){var r=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;P(a,function(o){r[o.get("name")]=!1})}r[n]=!0},t.prototype.unSelect=function(n){this.get("selectedMode")!=="single"&&(this.option.selected[n]=!1)},t.prototype.toggleSelected=function(n){var r=this.option.selected;r.hasOwnProperty(n)||(r[n]=!0),this[r[n]?"unSelect":"select"](n)},t.prototype.allSelect=function(){var n=this._data,r=this.option.selected;P(n,function(i){r[i.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var n=this._data,r=this.option.selected;P(n,function(i){var a=i.get("name",!0);r.hasOwnProperty(a)||(r[a]=!0),r[a]=!r[a]})},t.prototype.isSelected=function(n){var r=this.option.selected;return!(r.hasOwnProperty(n)&&!r[n])&&Wt(this._availableNames,n)>=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:lt.size.m,align:"auto",backgroundColor:lt.color.transparent,borderColor:lt.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:lt.color.disabled,inactiveBorderColor:lt.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:lt.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:lt.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:lt.color.tertiary,borderWidth:1,borderColor:lt.color.border},emphasis:{selectorLabel:{show:!0,color:lt.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t})(he),cu=Yt,$b=P,$v=ie,NB=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new $v),this.group.add(this._selectorGroup=new $v),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(n,r,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!n.get("show",!0)){var o=n.get("align"),l=n.get("orient");(!o||o==="auto")&&(o=n.get("left")==="right"&&l==="vertical"?"right":"left");var s=n.get("selector",!0),c=n.get("selectorPosition",!0);s&&(!c||c==="auto")&&(c=l==="horizontal"?"end":"start"),this.renderInner(o,n,r,i,s,l,c);var h=ti(n,i).refContainer,d=n.getBoxLayoutParams(),v=n.get("padding"),g=On(d,h,v),m=this.layoutInner(n,o,g,a,s,c),x=On($t({width:m.width,height:m.height},d),h,v);this.group.x=x.x-m.x,this.group.y=x.y-m.y,this.group.markRedraw(),this.group.add(this._backgroundEl=kB(m,n))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(n,r,i,a,o,l,s){var c=this.getContentGroup(),h=Bt(),d=r.get("selectedMode"),v=r.get("triggerEvent"),g=[];i.eachRawSeries(function(m){!m.get("legendHoverLink")&&g.push(m.id)}),$b(r.getData(),function(m,x){var _=this,b=m.get("name");if(!this.newlineDisabled&&(b===""||b===`
|
|
115
|
+
`)){var S=new $v;S.newline=!0,c.add(S);return}var w=i.getSeriesByName(b)[0];if(!h.get(b))if(w){var A=w.getData(),D=A.getVisual("legendLineStyle")||{},M=A.getVisual("legendIcon"),L=A.getVisual("style"),I=this._createItem(w,b,x,m,r,n,D,L,M,d,a);I.on("click",cu(tE,b,null,a,g)).on("mouseover",cu(Qb,w.name,null,a,g)).on("mouseout",cu(Kb,w.name,null,a,g)),i.ssr&&I.eachChild(function(N){var E=Zt(N);E.seriesIndex=w.seriesIndex,E.dataIndex=x,E.ssrType="legend"}),v&&I.eachChild(function(N){_.packEventData(N,r,w,x,b)}),h.set(b,!0)}else i.eachRawSeries(function(N){var E=this;if(!h.get(b)&&N.legendVisualProvider){var O=N.legendVisualProvider;if(!O.containName(b))return;var j=O.indexOfName(b),B=O.getItemVisual(j,"style"),U=O.getItemVisual(j,"legendIcon"),W=Xr(B.fill);W&&W[3]===0&&(W[3]=.2,B=dt(dt({},B),{fill:Ca(W,"rgba")}));var H=this._createItem(N,b,x,m,r,n,{},B,U,d,a);H.on("click",cu(tE,null,b,a,g)).on("mouseover",cu(Qb,null,b,a,g)).on("mouseout",cu(Kb,null,b,a,g)),i.ssr&&H.eachChild(function(q){var X=Zt(q);X.seriesIndex=N.seriesIndex,X.dataIndex=x,X.ssrType="legend"}),v&&H.eachChild(function(q){E.packEventData(q,r,N,x,b)}),h.set(b,!0)}},this)},this),o&&this._createSelector(o,r,a,l,s)},t.prototype.packEventData=function(n,r,i,a,o){var l={componentType:"legend",componentIndex:r.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};Zt(n).eventData=l},t.prototype._createSelector=function(n,r,i,a,o){var l=this.getSelectorGroup();$b(n,function(c){var h=c.type,d=new me({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:h==="all"?"legendAllSelect":"legendInverseSelect",legendId:r.id})}});l.add(d);var v=r.getModel("selectorLabel"),g=r.getModel(["emphasis","selectorLabel"]);xi(d,{normal:v,emphasis:g},{defaultText:c.title}),Bp(d)})},t.prototype._createItem=function(n,r,i,a,o,l,s,c,h,d,v){var g=n.visualDrawType,m=o.get("itemWidth"),x=o.get("itemHeight"),_=o.isSelected(r),b=a.get("symbolRotate"),S=a.get("symbolKeepAspect"),w=a.get("icon");h=w||h||"roundRect";var A=N$(h,a,s,c,g,_,v),D=new $v,M=a.getModel("textStyle");if(Rt(n.getLegendIcon)&&(!w||w==="inherit"))D.add(n.getLegendIcon({itemWidth:m,itemHeight:x,icon:h,iconRotate:b,itemStyle:A.itemStyle,lineStyle:A.lineStyle,symbolKeepAspect:S}));else{var L=w==="inherit"&&n.getData().getVisual("symbol")?b==="inherit"?n.getData().getVisual("symbolRotate"):b:0;D.add(P$({itemWidth:m,itemHeight:x,icon:h,iconRotate:L,itemStyle:A.itemStyle,symbolKeepAspect:S}))}var I=l==="left"?m+5:-5,N=l,E=o.get("formatter"),O=r;St(E)&&E?O=E.replace("{name}",r??""):Rt(E)&&(O=E(r));var j=_?M.getTextColor():a.get("inactiveColor");D.add(new me({style:$e(M,{text:O,x:I,y:x/2,fill:j,align:N,verticalAlign:"middle"},{inheritColor:j})}));var B=new le({shape:D.getBoundingRect(),style:{fill:"transparent"}}),U=a.getModel("tooltip");return U.get("show")&&Lh({el:B,componentModel:o,itemName:r,itemTooltipOption:U.option}),D.add(B),D.eachChild(function(W){W.silent=!0}),B.silent=!d,this.getContentGroup().add(D),Bp(D),D.__legendDataIndex=i,D},t.prototype.layoutInner=function(n,r,i,a,o,l){var s=this.getContentGroup(),c=this.getSelectorGroup();ql(n.get("orient"),s,n.get("itemGap"),i.width,i.height);var h=s.getBoundingRect(),d=[-h.x,-h.y];if(c.markRedraw(),s.markRedraw(),o){ql("horizontal",c,n.get("selectorItemGap",!0));var v=c.getBoundingRect(),g=[-v.x,-v.y],m=n.get("selectorButtonGap",!0),x=n.getOrient().index,_=x===0?"width":"height",b=x===0?"height":"width",S=x===0?"y":"x";l==="end"?g[x]+=h[_]+m:d[x]+=v[_]+m,g[1-x]+=h[b]/2-v[b]/2,c.x=g[0],c.y=g[1],s.x=d[0],s.y=d[1];var w={x:0,y:0};return w[_]=h[_]+m+v[_],w[b]=Math.max(h[b],v[b]),w[S]=Math.min(0,v[S]+g[1-x]),w}else return s.x=d[0],s.y=d[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})(zn);function N$(e,t,n,r,i,a,o){function l(_,b){_.lineWidth==="auto"&&(_.lineWidth=b.lineWidth>0?2:0),$b(_,function(S,w){_[w]==="inherit"&&(_[w]=b[w])})}var s=t.getModel("itemStyle"),c=s.getItemStyle(),h=e.lastIndexOf("empty",0)===0?"fill":"stroke",d=s.getShallow("decal");c.decal=!d||d==="inherit"?r.decal:Zp(d,o),c.fill==="inherit"&&(c.fill=r[i]),c.stroke==="inherit"&&(c.stroke=r[h]),c.opacity==="inherit"&&(c.opacity=(i==="fill"?r:n).opacity),l(c,r);var v=t.getModel("lineStyle"),g=v.getLineStyle();if(l(g,n),c.fill==="auto"&&(c.fill=r.fill),c.stroke==="auto"&&(c.stroke=r.fill),g.stroke==="auto"&&(g.stroke=r.fill),!a){var m=t.get("inactiveBorderWidth"),x=c[h];c.lineWidth=m==="auto"?r.lineWidth>0&&x?2:0:c.lineWidth,c.fill=t.get("inactiveColor"),c.stroke=t.get("inactiveBorderColor"),g.stroke=v.get("inactiveColor"),g.lineWidth=v.get("inactiveWidth")}return{itemStyle:c,lineStyle:g}}function P$(e){var t=e.icon||"roundRect",n=Wn(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill=lt.color.neutral00,n.style.lineWidth=2),n}function tE(e,t,n,r){Kb(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:e??t}),Qb(e,t,n,r)}function PB(e){for(var t=e.getZr().storage.getDisplayList(),n,r=0,i=t.length;r<i&&!(n=t[r].states.emphasis);)r++;return n&&n.hoverLayer}function Qb(e,t,n,r){PB(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function Kb(e,t,n,r){PB(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}function H$(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(n){for(var r=0;r<t.length;r++)if(!t[r].isSelected(n.name))return!1;return!0})}function yf(e,t,n){var r=e==="allSelect"||e==="inverseSelect",i={},a=[];n.eachComponent({mainType:"legend",query:t},function(l){r?l[e]():l[e](t.name),eE(l,i),a.push(l.componentIndex)});var o={};return n.eachComponent("legend",function(l){P(i,function(s,c){l[s?"select":"unSelect"](c)}),eE(l,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function eE(e,t){var n=t||{};return P(e.getData(),function(r){var i=r.get("name");if(!(i===`
|
|
116
|
+
`||i==="")){var a=e.isSelected(i);hi(n,i)?n[i]=n[i]&&a:n[i]=a}}),n}function V$(e){e.registerAction("legendToggleSelect","legendselectchanged",Yt(yf,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Yt(yf,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Yt(yf,"inverseSelect")),e.registerAction("legendSelect","legendselected",Yt(yf,"select")),e.registerAction("legendUnSelect","legendunselected",Yt(yf,"unSelect"))}function HB(e){e.registerComponentModel(Zb),e.registerComponentView(NB),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,H$),e.registerSubTypeDefaulter("legend",function(){return"plain"}),V$(e)}var j$=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(n){this.option.scrollDataIndex=n},t.prototype.init=function(n,r,i){var a=$u(n);e.prototype.init.call(this,n,r,i),nE(this,n,a)},t.prototype.mergeOption=function(n,r){e.prototype.mergeOption.call(this,n,r),nE(this,this.option,n)},t.type="legend.scroll",t.defaultOption=Zu(Zb.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:lt.color.accent50,pageIconInactiveColor:lt.color.accent10,pageIconSize:15,pageTextStyle:{color:lt.color.tertiary},animationDurationUpdate:800}),t})(Zb);function nE(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,Oo(t,n,{type:"box",ignoreSize:!!i})}var rE=ie,X1=["width","height"],Z1=["x","y"],F$=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new rE),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new rE)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(n,r,i,a,o,l,s){var c=this;e.prototype.renderInner.call(this,n,r,i,a,o,l,s);var h=this._controllerGroup,d=r.get("pageIconSize",!0),v=mt(d)?d:[d,d];m("pagePrev",0);var g=r.getModel("pageTextStyle");h.add(new me({name:"pageText",style:{text:"xx/xx",fill:g.getTextColor(),font:g.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),m("pageNext",1);function m(x,_){var b=x+"DataIndex",S=Ig(r.get("pageIcons",!0)[r.getOrient().name][_],{onclick:Ct(c._pageGo,c,b,r,a)},{x:-v[0]/2,y:-v[1]/2,width:v[0],height:v[1]});S.name=x,h.add(S)}},t.prototype.layoutInner=function(n,r,i,a,o,l){var s=this.getSelectorGroup(),c=n.getOrient().index,h=X1[c],d=Z1[c],v=X1[1-c],g=Z1[1-c];o&&ql("horizontal",s,n.get("selectorItemGap",!0));var m=n.get("selectorButtonGap",!0),x=s.getBoundingRect(),_=[-x.x,-x.y],b=It(i);o&&(b[h]=i[h]-x[h]-m);var S=this._layoutContentAndController(n,a,b,c,h,v,g,d);if(o){if(l==="end")_[c]+=S[h]+m;else{var w=x[h]+m;_[c]-=w,S[d]-=w}S[h]+=x[h]+m,_[1-c]+=S[g]+S[v]/2-x[v]/2,S[v]=Math.max(S[v],x[v]),S[g]=Math.min(S[g],x[g]+_[1-c]),s.x=_[0],s.y=_[1],s.markRedraw()}return S},t.prototype._layoutContentAndController=function(n,r,i,a,o,l,s,c){var h=this.getContentGroup(),d=this._containerGroup,v=this._controllerGroup;ql(n.get("orient"),h,n.get("itemGap"),a?i.width:null,a?null:i.height),ql("horizontal",v,n.get("pageButtonItemGap",!0));var g=h.getBoundingRect(),m=v.getBoundingRect(),x=this._showController=g[o]>i[o],_=[-g.x,-g.y];r||(_[a]=h[c]);var b=[0,0],S=[-m.x,-m.y],w=zt(n.get("pageButtonGap",!0),n.get("itemGap",!0));if(x){var A=n.get("pageButtonPosition",!0);A==="end"?S[a]+=i[o]-m[o]:b[a]+=m[o]+w}S[1-a]+=g[l]/2-m[l]/2,h.setPosition(_),d.setPosition(b),v.setPosition(S);var D={x:0,y:0};if(D[o]=x?i[o]:g[o],D[l]=Math.max(g[l],m[l]),D[s]=Math.min(0,m[s]+S[1-a]),d.__rectSize=i[o],x){var M={x:0,y:0};M[o]=Math.max(i[o]-m[o]-w,0),M[l]=D[l],d.setClipPath(new le({shape:M})),d.__rectSize=M[o]}else v.eachChild(function(I){I.attr({invisible:!0,silent:!0})});var L=this._getPageInfo(n);return L.pageIndex!=null&&Ve(h,{x:L.contentPosition[0],y:L.contentPosition[1]},x?n:null),this._updatePageInfoView(n,L),D},t.prototype._pageGo=function(n,r,i){var a=this._getPageInfo(r)[n];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:r.id})},t.prototype._updatePageInfoView=function(n,r){var i=this._controllerGroup;P(["pagePrev","pageNext"],function(h){var d=h+"DataIndex",v=r[d]!=null,g=i.childOfName(h);g&&(g.setStyle("fill",v?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),g.cursor=v?"pointer":"default")});var a=i.childOfName("pageText"),o=n.get("pageFormatter"),l=r.pageIndex,s=l!=null?l+1:0,c=r.pageCount;a&&o&&a.setStyle("text",St(o)?o.replace("{current}",s==null?"":s+"").replace("{total}",c==null?"":c+""):o({current:s,total:c}))},t.prototype._getPageInfo=function(n){var r=n.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=n.getOrient().index,l=X1[o],s=Z1[o],c=this._findTargetItemIndex(r),h=i.children(),d=h[c],v=h.length,g=v?1:0,m={contentPosition:[i.x,i.y],pageCount:g,pageIndex:g-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!d)return m;var x=A(d);m.contentPosition[o]=-x.s;for(var _=c+1,b=x,S=x,w=null;_<=v;++_)w=A(h[_]),(!w&&S.e>b.s+a||w&&!D(w,b.s))&&(S.i>b.i?b=S:b=w,b&&(m.pageNextDataIndex==null&&(m.pageNextDataIndex=b.i),++m.pageCount)),S=w;for(var _=c-1,b=x,S=x,w=null;_>=-1;--_)w=A(h[_]),(!w||!D(S,w.s))&&b.i<S.i&&(S=b,m.pagePrevDataIndex==null&&(m.pagePrevDataIndex=b.i),++m.pageCount,++m.pageIndex),b=w;return m;function A(M){if(M){var L=M.getBoundingRect(),I=L[s]+M[s];return{s:I,e:I+L[l],i:M.__legendDataIndex}}}function D(M,L){return M.e>=L&&M.s<=L+a}},t.prototype._findTargetItemIndex=function(n){if(!this._showController)return 0;var r,i=this.getContentGroup(),a;return i.eachChild(function(o,l){var s=o.__legendDataIndex;a==null&&s!=null&&(a=l),s===n&&(r=l)}),r??a},t.type="legend.scroll",t})(NB);function G$(e){e.registerAction("legendScroll","legendscroll",function(t,n){var r=t.scrollDataIndex;r!=null&&n.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(r)})})}function U$(e){qn(HB),e.registerComponentModel(j$),e.registerComponentView(F$),G$(e)}function Y$(e){qn(HB),qn(U$)}var W$=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type="dataZoom.inside",t.defaultOption=Zu(wh.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t})(wh),YS=be();function q$(e,t,n){YS(e).coordSysRecordMap.each(function(r){var i=r.dataZoomInfoMap.get(t.uid);i&&(i.getRange=n)})}function X$(e,t){for(var n=YS(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var a=r[i],o=n.get(a),l=o.dataZoomInfoMap;if(l){var s=t.uid,c=l.get(s);c&&(l.removeKey(s),l.keys().length||VB(n,o))}}}function VB(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function Z$(e,t){var n={model:t,containsPoint:Yt(Q$,t),dispatchAction:Yt($$,e),dataZoomInfoMap:null,controller:null},r=n.controller=new MS(e.getZr());return P(["pan","zoom","scrollMove"],function(i){r.on(i,function(a){var o=[];n.dataZoomInfoMap.each(function(l){if(a.isAvailableBehavior(l.model.option)){var s=(l.getRange||{})[i],c=s&&s(l.dzReferCoordSysInfo,n.model.mainType,n.controller,a);!l.model.get("disabled",!0)&&c&&o.push({dataZoomId:l.model.id,start:c[0],end:c[1]})}}),o.length&&n.dispatchAction(o)})}),n}function $$(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function Q$(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function K$(e,t,n){var r,i="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return e.each(function(l){var s=l.model,c=s.get("disabled",!0)?!1:s.get("zoomLock",!0)?"move":!0;a[i+c]>a[i+r]&&(r=c),o=o&&s.get("preventDefaultMouseMove",!0)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:n,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function J$(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(t,n){var r=YS(n),i=r.coordSysRecordMap||(r.coordSysRecordMap=Bt());i.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=MB(a);P(o.infoList,function(l){var s=l.model.uid,c=i.get(s)||i.set(s,Z$(n,l.model)),h=c.dataZoomInfoMap||(c.dataZoomInfoMap=Bt());h.set(a.uid,{dzReferCoordSysInfo:l,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,l,s=a.dataZoomInfoMap;if(s){var c=s.keys()[0];c!=null&&(l=s.get(c))}if(!l){VB(i,a);return}var h=K$(s,a,n);o.enable(h.controlType,h.opt),Pg(a,"dispatchAction",l.model.get("throttle",!0),"fixRate")})})}var tQ=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="dataZoom.inside",n}return t.prototype.render=function(n,r,i){if(e.prototype.render.apply(this,arguments),n.noTarget()){this._clear();return}this.range=n.getPercentRange(),q$(i,n,{pan:Ct($1.pan,this),zoom:Ct($1.zoom,this),scrollMove:Ct($1.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){X$(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t})(VS),$1={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var l=Q1[t](null,[r.originX,r.originY],o,n,e),s=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(a[1]-a[0])+a[0],c=Math.max(1/r.scale,0);a[0]=(a[0]-s)*c+s,a[1]=(a[1]-s)*c+s;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(ts(0,a,[0,100],0,h.minSpan,h.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:iE(function(e,t,n,r,i,a){var o=Q1[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:iE(function(e,t,n,r,i,a){var o=Q1[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n);return o.signal*(e[1]-e[0])*a.scrollDelta})};function iE(e){return function(t,n,r,i){var a=this.range,o=a.slice(),l=t.axisModels[0];if(l){var s=e(o,l,t,n,r,i);if(ts(s,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var Q1={grid:function(e,t,n,r,i){var a=n.axis,o={},l=i.model.coordinateSystem.getRect();return e=e||[0,0],a.dim==="x"?(o.pixel=t[0]-e[0],o.pixelLength=l.width,o.pixelStart=l.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=l.height,o.pixelStart=l.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,n,r,i){var a=n.axis,o={},l=i.model.coordinateSystem,s=l.getRadiusAxis().getExtent(),c=l.getAngleAxis().getExtent();return e=e?l.pointToCoord(e):[0,0],t=l.pointToCoord(t),n.mainType==="radiusAxis"?(o.pixel=t[0]-e[0],o.pixelLength=s[1]-s[0],o.pixelStart=s[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,n,r,i){var a=n.axis,o=i.model.coordinateSystem.getRect(),l={};return e=e||[0,0],a.orient==="horizontal"?(l.pixel=t[0]-e[0],l.pixelLength=o.width,l.pixelStart=o.x,l.signal=a.inverse?1:-1):(l.pixel=t[1]-e[1],l.pixelLength=o.height,l.pixelStart=o.y,l.signal=a.inverse?-1:1),l}};function eQ(e){jS(e),e.registerComponentModel(W$),e.registerComponentView(tQ),J$(e)}var nQ=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Zu(wh.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:lt.color.accent10,borderRadius:0,backgroundColor:lt.color.transparent,dataBackground:{lineStyle:{color:lt.color.accent30,width:.5},areaStyle:{color:lt.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:lt.color.accent40,width:.5},areaStyle:{color:lt.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:lt.color.neutral00,borderColor:lt.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:lt.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:lt.color.tertiary},brushSelect:!0,brushStyle:{color:lt.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:lt.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t})(wh),xf=le,rQ=1,K1=30,iQ=7,bf="horizontal",aE="vertical",aQ=5,oQ=["line","bar","candlestick","scatter"],lQ={easing:"cubicOut",duration:100,delay:0},sQ=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return t.prototype.init=function(n,r){this.api=r,this._onBrush=Ct(this._onBrush,this),this._onBrushEnd=Ct(this._onBrushEnd,this)},t.prototype.render=function(n,r,i,a){if(e.prototype.render.apply(this,arguments),Pg(this,"_dispatchZoomAction",n.get("throttle"),"fixRate"),this._orient=n.getOrient(),n.get("show")===!1){this.group.removeAll();return}if(n.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Up(this,"_dispatchZoomAction");var n=this.api.getZr();n.off("mousemove",this._onBrush),n.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var n=this.group;n.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var r=this._displayables.sliderGroup=new ie;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),n.add(r),this._positionGroup()},t.prototype._resetLocation=function(){var n=this.dataZoomModel,r=this.api,i=n.get("brushSelect"),a=i?iQ:0,o=ti(n,r).refContainer,l=this._findCoordRect(),s=n.get("defaultLocationEdgeGap",!0)||0,c=this._orient===bf?{right:o.width-l.x-l.width,top:o.height-K1-s-a,width:l.width,height:K1}:{right:s,top:l.y,width:K1,height:l.height},h=$u(n.option);P(["right","top","width","height"],function(v){h[v]==="ph"&&(h[v]=c[v])});var d=On(h,o);this._location={x:d.x,y:d.y},this._size=[d.width,d.height],this._orient===aE&&this._size.reverse()},t.prototype._positionGroup=function(){var n=this.group,r=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),l=this._displayables.sliderGroup,s=(this._dataShadowInfo||{}).otherAxisInverse;l.attr(i===bf&&!o?{scaleY:s?1:-1,scaleX:1}:i===bf&&o?{scaleY:s?1:-1,scaleX:-1}:i===aE&&!o?{scaleY:s?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:s?-1:1,scaleX:-1,rotation:Math.PI/2});var c=n.getBoundingRect([l]);n.x=r.x-c.x,n.y=r.y-c.y,n.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var n=this.dataZoomModel,r=this._size,i=this._displayables.sliderGroup,a=n.get("brushSelect");i.add(new xf({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{fill:n.get("backgroundColor")},z2:-40}));var o=new xf({shape:{x:0,y:0,width:r[0],height:r[1]},style:{fill:"transparent"},z2:0,onclick:Ct(this._onClickPanel,this)}),l=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",l.on("mousemove",this._onBrush),l.on("mouseup",this._onBrushEnd)):(l.off("mousemove",this._onBrush),l.off("mouseup",this._onBrushEnd)),i.add(o)},t.prototype._renderDataShadow=function(){var n=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!n)return;var r=this._size,i=this._shadowSize||[],a=n.series,o=a.getRawData(),l=a.getShadowDim&&a.getShadowDim(),s=l&&o.getDimensionInfo(l)?a.getShadowDim():n.otherDim;if(s==null)return;var c=this._shadowPolygonPts,h=this._shadowPolylinePts;if(o!==this._shadowData||s!==this._shadowDim||r[0]!==i[0]||r[1]!==i[1]){var d=o.getDataExtent(n.thisDim),v=o.getDataExtent(s),g=(v[1]-v[0])*.3;v=[v[0]-g,v[1]+g];var m=[0,r[1]],x=[0,r[0]],_=[[r[0],0],[0,0]],b=[],S=x[1]/Math.max(1,o.count()-1),w=r[0]/(d[1]-d[0]),A=n.thisAxis.type==="time",D=-S,M=Math.round(o.count()/r[0]),L;o.each([n.thisDim,s],function(j,B,U){if(M>0&&U%M){A||(D+=S);return}D=A?(+j-d[0])*w:D+S;var W=B==null||isNaN(B)||B==="",H=W?0:ue(B,v,m,!0);W&&!L&&U?(_.push([_[_.length-1][0],0]),b.push([b[b.length-1][0],0])):!W&&L&&(_.push([D,0]),b.push([D,0])),W||(_.push([D,H]),b.push([D,H])),L=W}),c=this._shadowPolygonPts=_,h=this._shadowPolylinePts=b}this._shadowData=o,this._shadowDim=s,this._shadowSize=[r[0],r[1]];var I=this.dataZoomModel;function N(j){var B=I.getModel(j?"selectedDataBackground":"dataBackground"),U=new ie,W=new Yi({shape:{points:c},segmentIgnoreThreshold:1,style:B.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),H=new Wi({shape:{points:h},segmentIgnoreThreshold:1,style:B.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return U.add(W),U.add(H),U}for(var E=0;E<3;E++){var O=N(E===1);this._displayables.sliderGroup.add(O),this._displayables.dataShadowSegs.push(O)}},t.prototype._prepareDataShadowInfo=function(){var n=this.dataZoomModel,r=n.get("showDataShadow");if(r!==!1){var i,a=this.ecModel;return n.eachTargetAxis(function(o,l){var s=n.getAxisProxy(o,l).getTargetSeriesModels();P(s,function(c){if(!i&&!(r!==!0&&Wt(oQ,c.get("type"))<0)){var h=a.getComponent(wo(o),l).axis,d=uQ(o),v,g=c.coordinateSystem;d!=null&&g.getOtherAxis&&(v=g.getOtherAxis(h).inverse),d=c.getData().mapDimension(d);var m=c.getData().mapDimension(o);i={thisAxis:h,series:c,thisDim:m,otherDim:d,otherAxisInverse:v}}},this)},this),i}},t.prototype._renderHandle=function(){var n=this.group,r=this._displayables,i=r.handles=[null,null],a=r.handleLabels=[null,null],o=this._displayables.sliderGroup,l=this._size,s=this.dataZoomModel,c=this.api,h=s.get("borderRadius")||0,d=s.get("brushSelect"),v=r.filler=new xf({silent:d,style:{fill:s.get("fillerColor")},textConfig:{position:"inside"}});o.add(v),o.add(new xf({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:l[0],height:l[1],r:h},style:{stroke:s.get("dataBackgroundColor")||s.get("borderColor"),lineWidth:rQ,fill:lt.color.transparent}})),P([0,1],function(w){var A=s.get("handleIcon");!Wp[A]&&A.indexOf("path://")<0&&A.indexOf("image://")<0&&(A="path://"+A);var D=Wn(A,-1,0,2,2,null,!0);D.attr({cursor:cQ(this._orient),draggable:!0,drift:Ct(this._onDragMove,this,w),ondragend:Ct(this._onDragEnd,this),onmouseover:Ct(this._showDataInfo,this,!0),onmouseout:Ct(this._showDataInfo,this,!1),z2:5});var M=D.getBoundingRect(),L=s.get("handleSize");this._handleHeight=At(L,this._size[1]),this._handleWidth=M.width/M.height*this._handleHeight,D.setStyle(s.getModel("handleStyle").getItemStyle()),D.style.strokeNoScale=!0,D.rectHover=!0,D.ensureState("emphasis").style=s.getModel(["emphasis","handleStyle"]).getItemStyle(),Bp(D);var I=s.get("handleColor");I!=null&&(D.style.fill=I),o.add(i[w]=D);var N=s.getModel("textStyle"),E=s.get("handleLabel")||{},O=E.show||!1;n.add(a[w]=new me({silent:!0,invisible:!O,style:$e(N,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:N.getTextColor(),font:N.getFont()}),z2:10}))},this);var g=v;if(d){var m=At(s.get("moveHandleSize"),l[1]),x=r.moveHandle=new le({style:s.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:l[1]-.5,height:m}}),_=m*.8,b=r.moveHandleIcon=Wn(s.get("moveHandleIcon"),-_/2,-_/2,_,_,lt.color.neutral00,!0);b.silent=!0,b.y=l[1]+m/2-.5,x.ensureState("emphasis").style=s.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var S=Math.min(l[1]/2,Math.max(m,10));g=r.moveZone=new le({invisible:!0,shape:{y:l[1]-S,height:m+S}}),g.on("mouseover",function(){c.enterEmphasis(x)}).on("mouseout",function(){c.leaveEmphasis(x)}),o.add(x),o.add(b),o.add(g)}g.attr({draggable:!0,cursor:"default",drift:Ct(this._onDragMove,this,"all"),ondragstart:Ct(this._showDataInfo,this,!0),ondragend:Ct(this._onDragEnd,this),onmouseover:Ct(this._showDataInfo,this,!0),onmouseout:Ct(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var n=this._range=this.dataZoomModel.getPercentRange(),r=this._getViewExtent();this._handleEnds=[ue(n[0],[0,100],r,!0),ue(n[1],[0,100],r,!0)]},t.prototype._updateInterval=function(n,r){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),l=i.findRepresentativeAxisProxy().getMinMaxSpan(),s=[0,100];ts(r,a,o,i.get("zoomLock")?"all":n,l.minSpan!=null?ue(l.minSpan,s,o,!0):null,l.maxSpan!=null?ue(l.maxSpan,s,o,!0):null);var c=this._range,h=this._range=yo([ue(a[0],o,s,!0),ue(a[1],o,s,!0)]);return!c||c[0]!==h[0]||c[1]!==h[1]},t.prototype._updateView=function(n){var r=this._displayables,i=this._handleEnds,a=yo(i.slice()),o=this._size;P([0,1],function(g){var m=r.handles[g],x=this._handleHeight;m.attr({scaleX:x/2,scaleY:x/2,x:i[g]+(g?-1:1),y:o[1]/2-x/2})},this),r.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var l={x:a[0],width:a[1]-a[0]};r.moveHandle&&(r.moveHandle.setShape(l),r.moveZone.setShape(l),r.moveZone.getBoundingRect(),r.moveHandleIcon&&r.moveHandleIcon.attr("x",l.x+l.width/2));for(var s=r.dataShadowSegs,c=[0,a[0],a[1],o[0]],h=0;h<s.length;h++){var d=s[h],v=d.getClipPath();v||(v=new le,d.setClipPath(v)),v.setShape({x:c[h],y:0,width:c[h+1]-c[h],height:o[1]})}this._updateDataInfo(n)},t.prototype._updateDataInfo=function(n){var r=this.dataZoomModel,i=this._displayables,a=i.handleLabels,o=this._orient,l=["",""];if(r.get("showDetail")){var s=r.findRepresentativeAxisProxy();if(s){var c=s.getAxisModel().axis,h=this._range,d=n?s.calculateDataWindow({start:h[0],end:h[1]}).valueWindow:s.getDataValueWindow();l=[this._formatLabel(d[0],c),this._formatLabel(d[1],c)]}}var v=yo(this._handleEnds.slice());g.call(this,0),g.call(this,1);function g(m){var x=Yl(i.handles[m].parent,this.group),_=Rg(m===0?"right":"left",x),b=this._handleWidth/2+aQ,S=Do([v[m]+(m===0?-b:b),this._size[1]/2],x);a[m].setStyle({x:S[0],y:S[1],verticalAlign:o===bf?"middle":_,align:o===bf?_:"center",text:l[m]})}},t.prototype._formatLabel=function(n,r){var i=this.dataZoomModel,a=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=r.getPixelPrecision());var l=n==null||isNaN(n)?"":r.type==="category"||r.type==="time"?r.scale.getLabel({value:Math.round(n)}):n.toFixed(Math.min(o,20));return Rt(a)?a(n,l):St(a)?a.replace("{value}",l):l},t.prototype._showDataInfo=function(n){var r=this.dataZoomModel.get("handleLabel")||{},i=r.show||!1,a=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=a.get("show")||!1,l=n||this._dragging?o:i,s=this._displayables,c=s.handleLabels;c[0].attr("invisible",!l),c[1].attr("invisible",!l),s.moveHandle&&this.api[l?"enterEmphasis":"leaveEmphasis"](s.moveHandle,1)},t.prototype._onDragMove=function(n,r,i,a){this._dragging=!0,Aa(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),l=Do([r,i],o,!0),s=this._updateInterval(n,l[0]),c=this.dataZoomModel.get("realtime");this._updateView(!c),s&&c&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var n=this.dataZoomModel.get("realtime");!n&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(n){var r=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(n.offsetX,n.offsetY);if(!(i[0]<0||i[0]>r[0]||i[1]<0||i[1]>r[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,l=this._updateInterval("all",i[0]-o);this._updateView(),l&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(n){var r=n.offsetX,i=n.offsetY;this._brushStart=new Ft(r,i),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(n){if(this._brushing){var r=this._displayables.brushRect;if(this._brushing=!1,!!r){r.attr("ignore",!0);var i=r.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),l=[0,100],s=this._handleEnds=[i.x,i.x+i.width],c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();ts(0,s,o,0,c.minSpan!=null?ue(c.minSpan,l,o,!0):null,c.maxSpan!=null?ue(c.maxSpan,l,o,!0):null),this._range=yo([ue(s[0],o,l,!0),ue(s[1],o,l,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(n){this._brushing&&(Aa(n.event),this._updateBrushRect(n.offsetX,n.offsetY))},t.prototype._updateBrushRect=function(n,r){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new xf({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var l=this._brushStart,s=this._displayables.sliderGroup,c=s.transformCoordToLocal(n,r),h=s.transformCoordToLocal(l.x,l.y),d=this._size;c[0]=Math.max(Math.min(d[0],c[0]),0),o.setShape({x:h[0],y:0,width:c[0]-h[0],height:d[1]})},t.prototype._dispatchZoomAction=function(n){var r=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:n?lQ:null,start:r[0],end:r[1]})},t.prototype._findCoordRect=function(){var n,r=MB(this.dataZoomModel).infoList;if(!n&&r.length){var i=r[0].model.coordinateSystem;n=i.getRect&&i.getRect()}if(!n){var a=this.api.getWidth(),o=this.api.getHeight();n={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return n},t.type="dataZoom.slider",t})(VS);function uQ(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}function cQ(e){return e==="vertical"?"ns-resize":"ew-resize"}function fQ(e){e.registerComponentModel(nQ),e.registerComponentView(sQ),jS(e)}function hQ(e){qn(eQ),qn(fQ)}var jB={get:function(e,t,n){var r=It((dQ[e]||{})[t]);return n&&mt(r)?r[r.length-1]:r}},dQ={color:{active:["#006edd","#e0ffff"],inactive:[lt.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]}},oE=gn.mapVisual,vQ=gn.eachVisual,pQ=mt,lE=P,gQ=yo,mQ=ue,fg=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(n,r,i){this.mergeDefaultAndTheme(n,i)},t.prototype.optionUpdated=function(n,r){var i=this.option;!r&&E$(i,n,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(n){var r=this.stateList;n=Ct(n,this),this.controllerVisuals=JL(this.option.controller,r,n),this.targetVisuals=JL(this.option.target,r,n)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var n=this.option.seriesId,r=this.option.seriesIndex;r==null&&n==null&&(r="all");var i=Wu(this.ecModel,"series",{index:r,id:n},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return bt(i,function(a){return a.componentIndex})},t.prototype.eachTargetSeries=function(n,r){P(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&n.call(r,a)},this)},t.prototype.isTargetSeries=function(n){var r=!1;return this.eachTargetSeries(function(i){i===n&&(r=!0)}),r},t.prototype.formatValueText=function(n,r,i){var a=this.option,o=a.precision,l=this.dataBound,s=a.formatter,c;i=i||["<",">"],mt(n)&&(n=n.slice(),c=!0);var h=r?n:c?[d(n[0]),d(n[1])]:d(n);if(St(s))return s.replace("{value}",c?h[0]:h).replace("{value2}",c?h[1]:h);if(Rt(s))return c?s(n[0],n[1]):s(n);if(c)return n[0]===l[0]?i[0]+" "+h[1]:n[1]===l[1]?i[1]+" "+h[0]:h[0]+" - "+h[1];return h;function d(v){return v===l[0]?"min":v===l[1]?"max":(+v).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var n=this.option,r=gQ([n.min,n.max]);this._dataExtent=r},t.prototype.getDataDimensionIndex=function(n){var r=this.option.dimension;if(r!=null)return n.getDimensionIndex(r);for(var i=n.dimensions,a=i.length-1;a>=0;a--){var o=i[a],l=n.getDimensionInfo(o);if(!l.isCalculationCoord)return l.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var n=this.ecModel,r=this.option,i={inRange:r.inRange,outOfRange:r.outOfRange},a=r.target||(r.target={}),o=r.controller||(r.controller={});qt(a,i),qt(o,i);var l=this.isCategory();s.call(this,a),s.call(this,o),c.call(this,a,"inRange","outOfRange"),h.call(this,o);function s(d){pQ(r.color)&&!d.inRange&&(d.inRange={color:r.color.slice().reverse()}),d.inRange=d.inRange||{color:n.get("gradientColor")}}function c(d,v,g){var m=d[v],x=d[g];m&&!x&&(x=d[g]={},lE(m,function(_,b){if(gn.isValidType(b)){var S=jB.get(b,"inactive",l);S!=null&&(x[b]=S,b==="color"&&!x.hasOwnProperty("opacity")&&!x.hasOwnProperty("colorAlpha")&&(x.opacity=[0,0]))}}))}function h(d){var v=(d.inRange||{}).symbol||(d.outOfRange||{}).symbol,g=(d.inRange||{}).symbolSize||(d.outOfRange||{}).symbolSize,m=this.get("inactiveColor"),x=this.getItemSymbol(),_=x||"roundRect";lE(this.stateList,function(b){var S=this.itemSize,w=d[b];w||(w=d[b]={color:l?m:[m]}),w.symbol==null&&(w.symbol=v&&It(v)||(l?_:[_])),w.symbolSize==null&&(w.symbolSize=g&&It(g)||(l?S[0]:[S[0],S[0]])),w.symbol=oE(w.symbol,function(M){return M==="none"?_:M});var A=w.symbolSize;if(A!=null){var D=-1/0;vQ(A,function(M){M>D&&(D=M)}),w.symbolSize=oE(A,function(M){return mQ(M,[0,D],[0,S[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(n){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(n){return null},t.prototype.getVisualMeta=function(n){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:lt.color.transparent,borderColor:lt.color.borderTint,contentColor:lt.color.theme[0],inactiveColor:lt.color.disabled,borderWidth:0,padding:lt.size.m,textGap:10,precision:0,textStyle:{color:lt.color.secondary}},t})(he),sE=[20,140],yQ=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(n,r){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var n=this.itemSize;(n[0]==null||isNaN(n[0]))&&(n[0]=sE[0]),(n[1]==null||isNaN(n[1]))&&(n[1]=sE[1])},t.prototype._resetRange=function(){var n=this.getExtent(),r=this.option.range;!r||r.auto?(n.auto=1,this.option.range=n):mt(r)&&(r[0]>r[1]&&r.reverse(),r[0]=Math.max(r[0],n[0]),r[1]=Math.min(r[1],n[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),P(this.stateList,function(n){var r=this.option.controller[n].symbolSize;r&&r[0]!==r[1]&&(r[0]=r[1]/3)},this)},t.prototype.setSelected=function(n){this.option.range=n.slice(),this._resetRange()},t.prototype.getSelected=function(){var n=this.getExtent(),r=yo((this.get("range")||[]).slice());return r[0]>n[1]&&(r[0]=n[1]),r[1]>n[1]&&(r[1]=n[1]),r[0]<n[0]&&(r[0]=n[0]),r[1]<n[0]&&(r[1]=n[0]),r},t.prototype.getValueState=function(n){var r=this.option.range,i=this.getExtent(),a=zt(this.option.unboundedRange,!0);return(a&&r[0]<=i[0]||r[0]<=n)&&(a&&r[1]>=i[1]||n<=r[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(n){var r=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(l,s){n[0]<=l&&l<=n[1]&&a.push(s)},this),r.push({seriesId:i.id,dataIndex:a})},this),r},t.prototype.getVisualMeta=function(n){var r=uE(this,"outOfRange",this.getExtent()),i=uE(this,"inRange",this.option.range.slice()),a=[];function o(g,m){a.push({value:g,color:n(g,m)})}for(var l=0,s=0,c=i.length,h=r.length;s<h&&(!i.length||r[s]<=i[0]);s++)r[s]<i[l]&&o(r[s],"outOfRange");for(var d=1;l<c;l++,d=0)d&&a.length&&o(i[l],"outOfRange"),o(i[l],"inRange");for(var d=1;s<h;s++)(!i.length||i[i.length-1]<r[s])&&(d&&(a.length&&o(a[a.length-1].value,"outOfRange"),d=0),o(r[s],"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=Zu(fg.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:lt.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:lt.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:lt.color.shadow}}),t})(fg);function uE(e,t,n){if(n[0]===n[1])return n.slice();for(var r=200,i=(n[1]-n[0])/r,a=n[0],o=[],l=0;l<=r&&a<n[1];l++)o.push(a),a+=i;return o.push(n[1]),o}var FB=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return t.prototype.init=function(n,r){this.ecModel=n,this.api=r},t.prototype.render=function(n,r,i,a){if(this.visualMapModel=n,n.get("show")===!1){this.group.removeAll();return}this.doRender(n,r,i,a)},t.prototype.renderBackground=function(n){var r=this.visualMapModel,i=Ih(r.get("padding")||0),a=n.getBoundingRect();n.add(new le({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:r.get("backgroundColor"),stroke:r.get("borderColor"),lineWidth:r.get("borderWidth")}}))},t.prototype.getControllerVisual=function(n,r,i){i=i||{};var a=i.forceState,o=this.visualMapModel,l={};if(r==="color"){var s=o.get("contentColor");l.color=s}function c(g){return l[g]}function h(g,m){l[g]=m}var d=o.controllerVisuals[a||o.getValueState(n)],v=gn.prepareVisualTypes(d);return P(v,function(g){var m=d[g];i.convertOpacityToAlpha&&g==="opacity"&&(g="colorAlpha",m=d.__alphaForOpacity),gn.dependsOn(g,r)&&m&&m.applyVisual(n,c,h)}),l[r]},t.prototype.positionGroup=function(n){var r=this.visualMapModel,i=this.api,a=ti(r,i).refContainer;K_(n,r.getBoxLayoutParams(),a)},t.prototype.doRender=function(n,r,i,a){},t.type="visualMap",t})(zn),cE=[["left","right","width"],["top","bottom","height"]];function GB(e,t,n){var r=e.option,i=r.align;if(i!=null&&i!=="auto")return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=r.orient==="horizontal"?1:0,l=cE[o],s=[0,null,10],c={},h=0;h<3;h++)c[cE[1-o][h]]=s[h],c[l[h]]=h===2?n[0]:r[l[h]];var d=[["x","width",3],["y","height",0]][o],v=On(c,a,r.padding);return l[(v.margin[d[2]]||0)+v[d[0]]+v[d[1]]*.5<a[d[1]]*.5?0:1]}function xp(e,t){return P(e||[],function(n){n.dataIndex!=null&&(n.dataIndexInside=n.dataIndex,n.dataIndex=null),n.highlightKey="visualMap"+(t?t.componentIndex:"")}),e}var Ri=ue,xQ=P,fE=Math.min,J1=Math.max,bQ=12,_Q=6,SQ=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._shapes={},n._dataInterval=[],n._handleEnds=[],n._hoverLinkDataIndices=[],n}return t.prototype.init=function(n,r){e.prototype.init.call(this,n,r),this._hoverLinkFromSeriesMouseOver=Ct(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Ct(this._hideIndicator,this)},t.prototype.doRender=function(n,r,i,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var n=this.visualMapModel,r=this.group;this._orient=n.get("orient"),this._useHandle=n.get("calculable"),this._resetInterval(),this._renderBar(r);var i=n.get("text");this._renderEndsText(r,i,0),this._renderEndsText(r,i,1),this._updateView(!0),this.renderBackground(r),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(r)},t.prototype._renderEndsText=function(n,r,i){if(r){var a=r[1-i];a=a!=null?a+"":"";var o=this.visualMapModel,l=o.get("textGap"),s=o.itemSize,c=this._shapes.mainGroup,h=this._applyTransform([s[0]/2,i===0?-l:s[1]+l],c),d=this._applyTransform(i===0?"bottom":"top",c),v=this._orient,g=this.visualMapModel.textStyleModel;this.group.add(new me({style:$e(g,{x:h[0],y:h[1],verticalAlign:g.get("verticalAlign")||(v==="horizontal"?"middle":d),align:g.get("align")||(v==="horizontal"?d:"center"),text:a})}))}},t.prototype._renderBar=function(n){var r=this.visualMapModel,i=this._shapes,a=r.itemSize,o=this._orient,l=this._useHandle,s=GB(r,this.api,a),c=i.mainGroup=this._createBarGroup(s),h=new ie;c.add(h),h.add(i.outOfRange=hE()),h.add(i.inRange=hE(null,l?vE(this._orient):null,Ct(this._dragHandle,this,"all",!1),Ct(this._dragHandle,this,"all",!0))),h.setClipPath(new le({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var d=r.textStyleModel.getTextRect("国"),v=J1(d.width,d.height);l&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(r,c,0,a,v,o),this._createHandle(r,c,1,a,v,o)),this._createIndicator(r,c,a,v,o),n.add(c)},t.prototype._createHandle=function(n,r,i,a,o,l){var s=Ct(this._dragHandle,this,i,!1),c=Ct(this._dragHandle,this,i,!0),h=Fi(n.get("handleSize"),a[0]),d=Wn(n.get("handleIcon"),-h/2,-h/2,h,h,null,!0),v=vE(this._orient);d.attr({cursor:v,draggable:!0,drift:s,ondragend:c,onmousemove:function(b){Aa(b.event)}}),d.x=a[0]/2,d.useStyle(n.getModel("handleStyle").getItemStyle()),d.setStyle({strokeNoScale:!0,strokeFirst:!0}),d.style.lineWidth*=2,d.ensureState("emphasis").style=n.getModel(["emphasis","handleStyle"]).getItemStyle(),Nl(d,!0),r.add(d);var g=this.visualMapModel.textStyleModel,m=new me({cursor:v,draggable:!0,drift:s,onmousemove:function(b){Aa(b.event)},ondragend:c,style:$e(g,{x:0,y:0,text:""})});m.ensureState("blur").style={opacity:.1},m.stateTransition={duration:200},this.group.add(m);var x=[h,0],_=this._shapes;_.handleThumbs[i]=d,_.handleLabelPoints[i]=x,_.handleLabels[i]=m},t.prototype._createIndicator=function(n,r,i,a,o){var l=Fi(n.get("indicatorSize"),i[0]),s=Wn(n.get("indicatorIcon"),-l/2,-l/2,l,l,null,!0);s.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var c=n.getModel("indicatorStyle").getItemStyle();if(s instanceof Jr){var h=s.style;s.useStyle(dt({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},c))}else s.useStyle(c);r.add(s);var d=this.visualMapModel.textStyleModel,v=new me({silent:!0,invisible:!0,style:$e(d,{x:0,y:0,text:""})});this.group.add(v);var g=[(o==="horizontal"?a/2:_Q)+i[0]/2,0],m=this._shapes;m.indicator=s,m.indicatorLabel=v,m.indicatorLabelPoint=g,this._firstShowIndicator=!0},t.prototype._dragHandle=function(n,r,i,a){if(this._useHandle){if(this._dragging=!r,!r){var o=this._applyTransform([i,a],this._shapes.mainGroup,!0);this._updateInterval(n,o[1]),this._hideIndicator(),this._updateView()}r===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),r?!this._hovering&&this._clearHoverLinkToSeries():dE(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[n],!1)}},t.prototype._resetInterval=function(){var n=this.visualMapModel,r=this._dataInterval=n.getSelected(),i=n.getExtent(),a=[0,n.itemSize[1]];this._handleEnds=[Ri(r[0],i,a,!0),Ri(r[1],i,a,!0)]},t.prototype._updateInterval=function(n,r){r=r||0;var i=this.visualMapModel,a=this._handleEnds,o=[0,i.itemSize[1]];ts(r,a,o,n,0);var l=i.getExtent();this._dataInterval=[Ri(a[0],o,l,!0),Ri(a[1],o,l,!0)]},t.prototype._updateView=function(n){var r=this.visualMapModel,i=r.getExtent(),a=this._shapes,o=[0,r.itemSize[1]],l=n?o:this._handleEnds,s=this._createBarVisual(this._dataInterval,i,l,"inRange"),c=this._createBarVisual(i,i,o,"outOfRange");a.inRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),a.outOfRange.setStyle({fill:c.barColor}).setShape("points",c.barPoints),this._updateHandle(l,s)},t.prototype._createBarVisual=function(n,r,i,a){var o={forceState:a,convertOpacityToAlpha:!0},l=this._makeColorGradient(n,o),s=[this.getControllerVisual(n[0],"symbolSize",o),this.getControllerVisual(n[1],"symbolSize",o)],c=this._createBarPoints(i,s);return{barColor:new Eg(0,0,0,1,l),barPoints:c,handlesColor:[l[0].color,l[l.length-1].color]}},t.prototype._makeColorGradient=function(n,r){var i=100,a=[],o=(n[1]-n[0])/i;a.push({color:this.getControllerVisual(n[0],"color",r),offset:0});for(var l=1;l<i;l++){var s=n[0]+o*l;if(s>n[1])break;a.push({color:this.getControllerVisual(s,"color",r),offset:l/i})}return a.push({color:this.getControllerVisual(n[1],"color",r),offset:1}),a},t.prototype._createBarPoints=function(n,r){var i=this.visualMapModel.itemSize;return[[i[0]-r[0],n[0]],[i[0],n[0]],[i[0],n[1]],[i[0]-r[1],n[1]]]},t.prototype._createBarGroup=function(n){var r=this._orient,i=this.visualMapModel.get("inverse");return new ie(r==="horizontal"&&!i?{scaleX:n==="bottom"?1:-1,rotation:Math.PI/2}:r==="horizontal"&&i?{scaleX:n==="bottom"?-1:1,rotation:-Math.PI/2}:r==="vertical"&&!i?{scaleX:n==="left"?1:-1,scaleY:-1}:{scaleX:n==="left"?1:-1})},t.prototype._updateHandle=function(n,r){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,l=i.handleLabels,s=a.itemSize,c=a.getExtent(),h=this._applyTransform("left",i.mainGroup);xQ([0,1],function(d){var v=o[d];v.setStyle("fill",r.handlesColor[d]),v.y=n[d];var g=Ri(n[d],[0,s[1]],c,!0),m=this.getControllerVisual(g,"symbolSize");v.scaleX=v.scaleY=m/s[0],v.x=s[0]-m/2;var x=Do(i.handleLabelPoints[d],Yl(v,this.group));if(this._orient==="horizontal"){var _=h==="left"||h==="top"?(s[0]-m)/2:(s[0]-m)/-2;x[1]+=_}l[d].setStyle({x:x[0],y:x[1],text:a.formatValueText(this._dataInterval[d]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(n,r,i,a){var o=this.visualMapModel,l=o.getExtent(),s=o.itemSize,c=[0,s[1]],h=this._shapes,d=h.indicator;if(d){d.attr("invisible",!1);var v={convertOpacityToAlpha:!0},g=this.getControllerVisual(n,"color",v),m=this.getControllerVisual(n,"symbolSize"),x=Ri(n,l,c,!0),_=s[0]-m/2,b={x:d.x,y:d.y};d.y=x,d.x=_;var S=Do(h.indicatorLabelPoint,Yl(d,this.group)),w=h.indicatorLabel;w.attr("invisible",!1);var A=this._applyTransform("left",h.mainGroup),D=this._orient,M=D==="horizontal";w.setStyle({text:(i||"")+o.formatValueText(r),verticalAlign:M?A:"middle",align:M?"center":A});var L={x:_,y:x,style:{fill:g}},I={style:{x:S[0],y:S[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var N={duration:100,easing:"cubicInOut",additive:!0};d.x=b.x,d.y=b.y,d.animateTo(L,N),w.animateTo(I,N)}else d.attr(L),w.attr(I);this._firstShowIndicator=!1;var E=this._shapes.handleLabels;if(E)for(var O=0;O<E.length;O++)this.api.enterBlur(E[O])}},t.prototype._enableHoverLinkToSeries=function(){var n=this;this._shapes.mainGroup.on("mousemove",function(r){if(n._hovering=!0,!n._dragging){var i=n.visualMapModel.itemSize,a=n._applyTransform([r.offsetX,r.offsetY],n._shapes.mainGroup,!0,!0);a[1]=fE(J1(0,a[1]),i[1]),n._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=i[0])}}).on("mouseout",function(){n._hovering=!1,!n._dragging&&n._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var n=this.api.getZr();this.visualMapModel.option.hoverLink?(n.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),n.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(n,r){var i=this.visualMapModel,a=i.itemSize;if(i.option.hoverLink){var o=[0,a[1]],l=i.getExtent();n=fE(J1(o[0],n),o[1]);var s=wQ(i,l,o),c=[n-s,n+s],h=Ri(n,o,l,!0),d=[Ri(c[0],o,l,!0),Ri(c[1],o,l,!0)];c[0]<o[0]&&(d[0]=-1/0),c[1]>o[1]&&(d[1]=1/0),r&&(d[0]===-1/0?this._showIndicator(h,d[1],"< ",s):d[1]===1/0?this._showIndicator(h,d[0],"> ",s):this._showIndicator(h,h,"≈ ",s));var v=this._hoverLinkDataIndices,g=[];(r||dE(i))&&(g=this._hoverLinkDataIndices=i.findTargetDataIndices(d));var m=aV(v,g);this._dispatchHighDown("downplay",xp(m[0],i)),this._dispatchHighDown("highlight",xp(m[1],i))}},t.prototype._hoverLinkFromSeriesMouseOver=function(n){var r;if(Mu(n.target,function(s){var c=Zt(s);if(c.dataIndex!=null)return r=c,!0},!0),!!r){var i=this.ecModel.getSeriesByIndex(r.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(r.dataType),l=o.getStore().get(a.getDataDimensionIndex(o),r.dataIndex);isNaN(l)||this._showIndicator(l,l)}}},t.prototype._hideIndicator=function(){var n=this._shapes;n.indicator&&n.indicator.attr("invisible",!0),n.indicatorLabel&&n.indicatorLabel.attr("invisible",!0);var r=this._shapes.handleLabels;if(r)for(var i=0;i<r.length;i++)this.api.leaveBlur(r[i])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var n=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",xp(n,this.visualMapModel)),n.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var n=this.api.getZr();n.off("mouseover",this._hoverLinkFromSeriesMouseOver),n.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(n,r,i,a){var o=Yl(r,a?null:this.group);return mt(n)?Do(n,o,i):Rg(n,o,i)},t.prototype._dispatchHighDown=function(n,r){r&&r.length&&this.api.dispatchAction({type:n,batch:r})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t})(FB);function hE(e,t,n,r){return new Yi({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(i){Aa(i.event)},ondragend:r})}function wQ(e,t,n){var r=bQ/2,i=e.get("hoverLinkDataSize");return i&&(r=Ri(i,t,n,!0)/2),r}function dE(e){var t=e.get("hoverLinkOnHandle");return!!(t??e.get("realtime"))}function vE(e){return e==="vertical"?"ns-resize":"ew-resize"}var TQ={type:"selectDataRange",event:"dataRangeSelected",update:"update"},CQ=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(n){n.setSelected(e.selected)})},MQ=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent("visualMap",function(r){var i=e.pipelineContext;!r.isTargetSeries(e)||i&&i.large||n.push(R$(r.stateList,r.targetVisuals,Ct(r.getValueState,r),r.getDataDimensionIndex(e.getData())))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),r=[];t.eachComponent("visualMap",function(i){if(i.isTargetSeries(e)){var a=i.getVisualMeta(Ct(AQ,null,e,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(n);o>=0&&(a.dimension=o,r.push(a))}}),e.getData().setVisual("visualMeta",r)}}];function AQ(e,t,n,r){for(var i=t.targetVisuals[r],a=gn.prepareVisualTypes(i),o={color:tz(e.getData(),"color")},l=0,s=a.length;l<s;l++){var c=a[l],h=i[c==="opacity"?"__alphaForOpacity":c];h&&h.applyVisual(n,d,v)}return o.color;function d(g){return o[g]}function v(g,m){o[g]=m}}var pE=P;function DQ(e){var t=e&&e.visualMap;mt(t)||(t=t?[t]:[]),pE(t,function(n){if(n){fu(n,"splitList")&&!fu(n,"pieces")&&(n.pieces=n.splitList,delete n.splitList);var r=n.pieces;r&&mt(r)&&pE(r,function(i){Lt(i)&&(fu(i,"start")&&!fu(i,"min")&&(i.min=i.start),fu(i,"end")&&!fu(i,"max")&&(i.max=i.end))})}})}function fu(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var gE=!1;function UB(e){gE||(gE=!0,e.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),e.registerAction(TQ,CQ),P(MQ,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(DQ))}function kQ(e){e.registerComponentModel(yQ),e.registerComponentView(SQ),UB(e)}var LQ=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(n,r){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],EQ[this._mode].call(this,this._pieceList),this._resetSelected(n,r);var a=this.option.categories;this.resetVisual(function(o,l){i==="categories"?(o.mappingMethod="category",o.categories=It(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=bt(this._pieceList,function(s){return s=It(s),l!=="inRange"&&(s.visual=null),s}))})},t.prototype.completeVisualOption=function(){var n=this.option,r={},i=gn.listVisualTypes(),a=this.isCategory();P(n.pieces,function(l){P(i,function(s){l.hasOwnProperty(s)&&(r[s]=1)})}),P(r,function(l,s){var c=!1;P(this.stateList,function(h){c=c||o(n,h,s)||o(n.target,h,s)},this),!c&&P(this.stateList,function(h){(n[h]||(n[h]={}))[s]=jB.get(s,h==="inRange"?"active":"inactive",a)})},this);function o(l,s,c){return l&&l[s]&&l[s].hasOwnProperty(c)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(n,r){var i=this.option,a=this._pieceList,o=(r?i:n).selected||{};if(i.selected=o,P(a,function(s,c){var h=this.getSelectedMapKey(s);o.hasOwnProperty(h)||(o[h]=!0)},this),i.selectedMode==="single"){var l=!1;P(a,function(s,c){var h=this.getSelectedMapKey(s);o[h]&&(l?o[h]=!1:l=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(n){return this._mode==="categories"?n.value+"":n.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var n=this.option;return n.pieces&&n.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(n){this.option.selected=It(n)},t.prototype.getValueState=function(n){var r=gn.findPieceIndex(n,this._pieceList);return r!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[r])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(n){var r=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],l=a.getData();l.each(this.getDataDimensionIndex(l),function(s,c){var h=gn.findPieceIndex(s,i);h===n&&o.push(c)},this),r.push({seriesId:a.id,dataIndex:o})},this),r},t.prototype.getRepresentValue=function(n){var r;if(this.isCategory())r=n.value;else if(n.value!=null)r=n.value;else{var i=n.interval||[];r=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return r},t.prototype.getVisualMeta=function(n){if(this.isCategory())return;var r=[],i=["",""],a=this;function o(h,d){var v=a.getRepresentValue({interval:h});d||(d=a.getValueState(v));var g=n(v,d);h[0]===-1/0?i[0]=g:h[1]===1/0?i[1]=g:r.push({value:h[0],color:g},{value:h[1],color:g})}var l=this._pieceList.slice();if(!l.length)l.push({interval:[-1/0,1/0]});else{var s=l[0].interval[0];s!==-1/0&&l.unshift({interval:[-1/0,s]}),s=l[l.length-1].interval[1],s!==1/0&&l.push({interval:[s,1/0]})}var c=-1/0;return P(l,function(h){var d=h.interval;d&&(d[0]>c&&o([c,d[0]],"outOfRange"),o(d.slice()),c=d[1])},this),{stops:r,outerColors:i}},t.type="visualMap.piecewise",t.defaultOption=Zu(fg.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})(fg),EQ={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,l=r[0];o<i;l+=a,o++){var s=o===i-1?r[1]:l+a;e.push({interval:[l,s],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),tA(e),P(e,function(c,h){c.index=h,c.text=this.formatValueText(c.interval)},this)},categories:function(e){var t=this.option;P(t.categories,function(n){e.push({text:this.formatValueText(n,!0),value:n})},this),mE(t,e)},pieces:function(e){var t=this.option;P(t.pieces,function(n,r){Lt(n)||(n={value:n});var i={text:"",index:r};if(n.label!=null&&(i.text=n.label),n.hasOwnProperty("value")){var a=i.value=n.value;i.interval=[a,a],i.close=[1,1]}else{for(var o=i.interval=[],l=i.close=[0,0],s=[1,0,1],c=[-1/0,1/0],h=[],d=0;d<2;d++){for(var v=[["gte","gt","min"],["lte","lt","max"]][d],g=0;g<3&&o[d]==null;g++)o[d]=n[v[g]],l[d]=s[g],h[d]=g===2;o[d]==null&&(o[d]=c[d])}h[0]&&o[1]===1/0&&(l[0]=0),h[1]&&o[0]===-1/0&&(l[1]=0),o[0]===o[1]&&l[0]&&l[1]&&(i.value=o[0])}i.visual=gn.retrieveVisuals(n),e.push(i)},this),mE(t,e),tA(e),P(e,function(n){var r=n.close,i=[["<","≤"][r[1]],[">","≥"][r[0]]];n.text=n.text||this.formatValueText(n.value!=null?n.value:n.interval,!1,i)},this)}};function mE(e,t){var n=e.inverse;(e.orient==="vertical"?!n:n)&&t.reverse()}var RQ=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var n=this.group;n.removeAll();var r=this.visualMapModel,i=r.get("textGap"),a=r.textStyleModel,o=this._getItemAlign(),l=r.itemSize,s=this._getViewData(),c=s.endsText,h=Io(r.get("showLabel",!0),!c),d=!r.get("selectedMode");c&&this._renderEndsText(n,c[0],l,h,o),P(s.viewPieceList,function(v){var g=v.piece,m=new ie;m.onclick=Ct(this._onItemClick,this,g),this._enableHoverLink(m,v.indexInModelPieceList);var x=r.getRepresentValue(g);if(this._createItemSymbol(m,x,[0,0,l[0],l[1]],d),h){var _=this.visualMapModel.getValueState(x),b=a.get("align")||o;m.add(new me({style:$e(a,{x:b==="right"?-i:l[0]+i,y:l[1]/2,text:g.text,verticalAlign:a.get("verticalAlign")||"middle",align:b,opacity:zt(a.get("opacity"),_==="outOfRange"?.5:1)}),silent:d}))}n.add(m)},this),c&&this._renderEndsText(n,c[1],l,h,o),ql(r.get("orient"),n,r.get("itemGap")),this.renderBackground(n),this.positionGroup(n)},t.prototype._enableHoverLink=function(n,r){var i=this;n.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var l=i.visualMapModel;l.option.hoverLink&&i.api.dispatchAction({type:o,batch:xp(l.findTargetDataIndices(r),l)})}},t.prototype._getItemAlign=function(){var n=this.visualMapModel,r=n.option;if(r.orient==="vertical")return GB(n,this.api,n.itemSize);var i=r.align;return(!i||i==="auto")&&(i="left"),i},t.prototype._renderEndsText=function(n,r,i,a,o){if(r){var l=new ie,s=this.visualMapModel.textStyleModel;l.add(new me({style:$e(s,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:r})})),n.add(l)}},t.prototype._getViewData=function(){var n=this.visualMapModel,r=bt(n.getPieceList(),function(l,s){return{piece:l,indexInModelPieceList:s}}),i=n.get("text"),a=n.get("orient"),o=n.get("inverse");return(a==="horizontal"?o:!o)?r.reverse():i&&(i=i.slice().reverse()),{viewPieceList:r,endsText:i}},t.prototype._createItemSymbol=function(n,r,i,a){var o=Wn(this.getControllerVisual(r,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(r,"color"));o.silent=a,n.add(o)},t.prototype._onItemClick=function(n){var r=this.visualMapModel,i=r.option,a=i.selectedMode;if(a){var o=It(i.selected),l=r.getSelectedMapKey(n);a==="single"||a===!0?(o[l]=!0,P(o,function(s,c){o[c]=c===l})):o[l]=!o[l],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t})(FB);function IQ(e){e.registerComponentModel(LQ),e.registerComponentView(RQ),UB(e)}function OQ(e){qn(kQ),qn(IQ)}var zQ=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="dataset",n}return t.prototype.init=function(n,r,i){e.prototype.init.call(this,n,r,i),this._sourceManager=new NO(this),mD(this)},t.prototype.mergeOption=function(n,r){e.prototype.mergeOption.call(this,n,r),mD(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:pi},t})(he),BQ=(function(e){ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="dataset",n}return t.type="dataset",t})(zn);function NQ(e){e.registerComponentModel(zQ),e.registerComponentView(BQ)}function yE(e,t,n){var r=mi.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=r.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",r.setAttribute("data-zr-dom-id",e)),r.width=i*n,r.height=a*n,r}var tx=(function(e){ot(t,e);function t(n,r,i){var a=e.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||kp,typeof n=="string"?o=yE(n,r,i):Lt(n)&&(o=n,n=o.id),a.id=n,a.dom=o;var l=o.style;return l&&(BR(o),o.onselectstart=function(){return!1},l.padding="0",l.margin="0",l.borderWidth="0"),a.painter=r,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 n=this.dpr;this.domBack=yE("back-"+this.id,this.painter,n),this.ctxBack=this.domBack.getContext("2d"),n!==1&&this.ctxBack.scale(n,n)},t.prototype.createRepaintRects=function(n,r,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],l=this.maxRepaintRectCount,s=!1,c=new Vt(0,0,0,0);function h(S){if(!(!S.isFinite()||S.isZero()))if(o.length===0){var w=new Vt(0,0,0,0);w.copy(S),o.push(w)}else{for(var A=!1,D=1/0,M=0,L=0;L<o.length;++L){var I=o[L];if(I.intersect(S)){var N=new Vt(0,0,0,0);N.copy(I),N.union(S),o[L]=N,A=!0;break}else if(s){c.copy(S),c.union(I);var E=S.width*S.height,O=I.width*I.height,j=c.width*c.height,B=j-E-O;B<D&&(D=B,M=L)}}if(s&&(o[M].union(S),A=!0),!A){var w=new Vt(0,0,0,0);w.copy(S),o.push(w)}s||(s=o.length>=l)}}for(var d=this.__startIndex;d<this.__endIndex;++d){var v=n[d];if(v){var g=v.shouldBePainted(i,a,!0,!0),m=v.__isRendered&&(v.__dirty&Sr||!g)?v.getPrevPaintRect():null;m&&h(m);var x=g&&(v.__dirty&Sr||!v.__isRendered)?v.getPaintRect():null;x&&h(x)}}for(var d=this.__prevStartIndex;d<this.__prevEndIndex;++d){var v=r[d],g=v&&v.shouldBePainted(i,a,!0,!0);if(v&&(!g||!v.__zr)&&v.__isRendered){var m=v.getPrevPaintRect();m&&h(m)}}var _;do{_=!1;for(var d=0;d<o.length;){if(o[d].isZero()){o.splice(d,1);continue}for(var b=d+1;b<o.length;)o[d].intersect(o[b])?(_=!0,o[d].union(o[b]),o.splice(b,1)):b++;d++}}while(_);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(n,r){var i=this.dpr,a=this.dom,o=a.style,l=this.domBack;o&&(o.width=n+"px",o.height=r+"px"),a.width=n*i,a.height=r*i,l&&(l.width=n*i,l.height=r*i,i!==1&&this.ctxBack.scale(i,i))},t.prototype.clear=function(n,r,i){var a=this.dom,o=this.ctx,l=a.width,s=a.height;r=r||this.clearColor;var c=this.motionBlur&&!n,h=this.lastFrameAlpha,d=this.dpr,v=this;c&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,l/d,s/d));var g=this.domBack;function m(x,_,b,S){if(o.clearRect(x,_,b,S),r&&r!=="transparent"){var w=void 0;if(yg(r)){var A=r.global||r.__width===b&&r.__height===S;w=A&&r.__canvasGradient||gb(o,r,{x:0,y:0,width:b,height:S}),r.__canvasGradient=w,r.__width=b,r.__height=S}else pH(r)&&(r.scaleX=r.scaleX||d,r.scaleY=r.scaleY||d,w=mb(o,r,{dirty:function(){v.setUnpainted(),v.painter.refresh()}}));o.save(),o.fillStyle=w||r,o.fillRect(x,_,b,S),o.restore()}c&&(o.save(),o.globalAlpha=h,o.drawImage(g,x,_,b,S),o.restore())}!i||c?m(0,0,l,s):i.length&&P(i,function(x){m(x.x*d,x.y*d,x.width*d,x.height*d)})},t})(Kr),xE=1e5,Dl=314159,Qv=.01,PQ=.001;function HQ(e){return e?e.__builtin__?!0:!(typeof e.resize!="function"||typeof e.refresh!="function"):!1}function VQ(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}var jQ=(function(){function e(t,n,r,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=r=dt({},r||{}),this.dpr=r.devicePixelRatio||kp,this._singleCanvas=a,this.root=t;var o=t.style;o&&(BR(t),t.innerHTML=""),this.storage=n;var l=this._zlevelList;this._prevDisplayList=[];var s=this._layers;if(a){var h=t,d=h.width,v=h.height;r.width!=null&&(d=r.width),r.height!=null&&(v=r.height),this.dpr=r.devicePixelRatio||1,h.width=d*this.dpr,h.height=v*this.dpr,this._width=d,this._height=v;var g=new tx(h,this,this.dpr);g.__builtin__=!0,g.initContext(),s[Dl]=g,g.zlevel=Dl,l.push(Dl),this._domRoot=t}else{this._width=Ev(t,0,r),this._height=Ev(t,1,r);var c=this._domRoot=VQ(this._width,this._height);t.appendChild(c)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.refresh=function(t){var n=this.storage.getDisplayList(!0),r=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(n,r,t,this._redrawId);for(var a=0;a<i.length;a++){var o=i[a],l=this._layers[o];if(!l.__builtin__&&l.refresh){var s=a===0?this._backgroundColor:null;l.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=n.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(t){var n=t.length,r=this._hoverlayer;if(r&&r.clear(),!!n){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<n;o++){var l=t[o];l.__inHover&&(r||(r=this._hoverlayer=this.getLayer(xE)),a||(a=r.ctx,a.save()),Hl(a,l,i,o===n-1))}a&&a.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(xE)},e.prototype.paintOne=function(t,n){oz(t,n)},e.prototype._paintList=function(t,n,r,i){if(this._redrawId===i){r=r||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,n,r),o=a.finished,l=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),l&&this._paintHoverList(t),o)this.eachLayer(function(c){c.afterBrush&&c.afterBrush()});else{var s=this;wp(function(){s._paintList(t,n,r,i)})}}},e.prototype._compositeManually=function(){var t=this.getLayer(Dl).ctx,n=this._domRoot.width,r=this._domRoot.height;t.clearRect(0,0,n,r),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,n,r)})},e.prototype._doPaintList=function(t,n,r){for(var i=this,a=[],o=this._opts.useDirtyRect,l=0;l<this._zlevelList.length;l++){var s=this._zlevelList[l],c=this._layers[s];c.__builtin__&&c!==this._hoverlayer&&(c.__dirty||r)&&a.push(c)}for(var h=!0,d=!1,v=function(x){var _=a[x],b=_.ctx,S=o&&_.createRepaintRects(t,n,g._width,g._height),w=r?_.__startIndex:_.__drawIndex,A=!r&&_.incremental&&Date.now,D=A&&Date.now(),M=_.zlevel===g._zlevelList[0]?g._backgroundColor:null;if(_.__startIndex===_.__endIndex)_.clear(!1,M,S);else if(w===_.__startIndex){var L=t[w];(!L.incremental||!L.notClear||r)&&_.clear(!1,M,S)}w===-1&&(console.error("For some unknown reason. drawIndex is -1"),w=_.__startIndex);var I,N=function(B){var U={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(I=w;I<_.__endIndex;I++){var W=t[I];if(W.__inHover&&(d=!0),i._doPaintEl(W,_,o,B,U,I===_.__endIndex-1),A){var H=Date.now()-D;if(H>15)break}}U.prevElClipPaths&&b.restore()};if(S)if(S.length===0)I=_.__endIndex;else for(var E=g.dpr,O=0;O<S.length;++O){var j=S[O];b.save(),b.beginPath(),b.rect(j.x*E,j.y*E,j.width*E,j.height*E),b.clip(),N(j),b.restore()}else b.save(),N(),b.restore();_.__drawIndex=I,_.__drawIndex<_.__endIndex&&(h=!1)},g=this,m=0;m<a.length;m++)v(m);return Gt.wxa&&P(this._layers,function(x){x&&x.ctx&&x.ctx.draw&&x.ctx.draw()}),{finished:h,needsRefreshHover:d}},e.prototype._doPaintEl=function(t,n,r,i,a,o){var l=n.ctx;if(r){var s=t.getPaintRect();(!i||s&&s.intersect(i))&&(Hl(l,t,a,o),t.setPrevPaintRect(s))}else Hl(l,t,a,o)},e.prototype.getLayer=function(t,n){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Dl);var r=this._layers[t];return r||(r=new tx("zr_"+t,this,this.dpr),r.zlevel=t,r.__builtin__=!0,this._layerConfig[t]?qt(r,this._layerConfig[t],!0):this._layerConfig[t-Qv]&&qt(r,this._layerConfig[t-Qv],!0),n&&(r.virtual=n),this.insertLayer(t,r),r.initContext()),r},e.prototype.insertLayer=function(t,n){var r=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,l=null,s=-1;if(!r[t]&&HQ(n)){if(a>0&&t>i[0]){for(s=0;s<a-1&&!(i[s]<t&&i[s+1]>t);s++);l=r[i[s]]}if(i.splice(s+1,0,t),r[t]=n,!n.virtual)if(l){var c=l.dom;c.nextSibling?o.insertBefore(n.dom,c.nextSibling):o.appendChild(n.dom)}else o.firstChild?o.insertBefore(n.dom,o.firstChild):o.appendChild(n.dom);n.painter||(n.painter=this)}},e.prototype.eachLayer=function(t,n){for(var r=this._zlevelList,i=0;i<r.length;i++){var a=r[i];t.call(n,this._layers[a],a)}},e.prototype.eachBuiltinLayer=function(t,n){for(var r=this._zlevelList,i=0;i<r.length;i++){var a=r[i],o=this._layers[a];o.__builtin__&&t.call(n,o,a)}},e.prototype.eachOtherLayer=function(t,n){for(var r=this._zlevelList,i=0;i<r.length;i++){var a=r[i],o=this._layers[a];o.__builtin__||t.call(n,o,a)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(d,v){d.__dirty=d.__used=!1});function n(d){a&&(a.__endIndex!==d&&(a.__dirty=!0),a.__endIndex=d)}if(this._singleCanvas)for(var r=1;r<t.length;r++){var i=t[r];if(i.zlevel!==t[r-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,l,s;for(s=0;s<t.length;s++){var i=t[s],c=i.zlevel,h=void 0;l!==c&&(l=c,o=0),i.incremental?(h=this.getLayer(c+PQ,this._needsManuallyCompositing),h.incremental=!0,o=1):h=this.getLayer(c+(o>0?Qv:0),this._needsManuallyCompositing),h.__builtin__||p_("ZLevel "+c+" has been used by unkown layer "+h.id),h!==a&&(h.__used=!0,h.__startIndex!==s&&(h.__dirty=!0),h.__startIndex=s,h.incremental?h.__drawIndex=-1:h.__drawIndex=s,n(s),a=h),i.__dirty&Sr&&!i.__inHover&&(h.__dirty=!0,h.incremental&&h.__drawIndex<0&&(h.__drawIndex=s))}n(s),this.eachBuiltinLayer(function(d,v){!d.__used&&d.getElementCount()>0&&(d.__dirty=!0,d.__startIndex=d.__endIndex=d.__drawIndex=0),d.__dirty&&d.__drawIndex<0&&(d.__drawIndex=d.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,P(this._layers,function(n){n.setUnpainted()})},e.prototype.configLayer=function(t,n){if(n){var r=this._layerConfig;r[t]?qt(r[t],n,!0):r[t]=n;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===t||a===t+Qv){var o=this._layers[a];qt(o,r[t],!0)}}}},e.prototype.delLayer=function(t){var n=this._layers,r=this._zlevelList,i=n[t];i&&(i.dom.parentNode.removeChild(i.dom),delete n[t],r.splice(Wt(r,t),1))},e.prototype.resize=function(t,n){if(this._domRoot.style){var r=this._domRoot;r.style.display="none";var i=this._opts,a=this.root;if(t!=null&&(i.width=t),n!=null&&(i.height=n),t=Ev(a,0,i),n=Ev(a,1,i),r.style.display="",this._width!==t||n!==this._height){r.style.width=t+"px",r.style.height=n+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,n);this.refresh(!0)}this._width=t,this._height=n}else{if(t==null||n==null)return;this._width=t,this._height=n,this.getLayer(Dl).resize(t,n)}return this},e.prototype.clearLayer=function(t){var n=this._layers[t];n&&n.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[Dl].dom;var n=new tx("image",this,t.pixelRatio||this.dpr);n.initContext(),n.clear(!1,t.backgroundColor||this._backgroundColor);var r=n.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=n.dom.width,a=n.dom.height;this.eachLayer(function(d){d.__builtin__?r.drawImage(d.dom,0,0,i,a):d.renderToCanvas&&(r.save(),d.renderToCanvas(r),r.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},l=this.storage.getDisplayList(!0),s=0,c=l.length;s<c;s++){var h=l[s];Hl(r,h,o,s===c-1)}return n.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e})();function FQ(e){e.registerPainter("canvas",jQ)}const GQ={color:[z.orange,z.teal,z.blue,"#AB47BC","#66BB6A","#FFD54F","#42A5F5","#EC407A","#26A69A","#8D6E63"],backgroundColor:"transparent",textStyle:{fontFamily:'system-ui, -apple-system, "Segoe UI", sans-serif',color:z.textPrimary},title:{textStyle:{color:z.textPrimary,fontSize:14,fontWeight:600},subtextStyle:{color:z.textSecondary,fontSize:12}},tooltip:{backgroundColor:z.surface,borderColor:"#BDBDBD",borderWidth:1.5,textStyle:{color:z.textPrimary,fontSize:12},extraCssText:"box-shadow: 0 2px 8px rgba(0,0,0,0.12); border-radius: 6px;"},legend:{type:"scroll",pageIconSize:12,textStyle:{color:z.textSecondary,fontSize:12}},categoryAxis:{axisLine:{lineStyle:{color:z.border}},axisTick:{lineStyle:{color:z.border}},axisLabel:{color:z.textSecondary,fontSize:12},splitLine:{lineStyle:{color:z.borderLight,type:"dashed"}}},valueAxis:{axisLine:{lineStyle:{color:z.border}},axisTick:{lineStyle:{color:z.border}},axisLabel:{color:z.textSecondary,fontSize:12},splitLine:{lineStyle:{color:z.borderLight,type:"dashed"}}},dataZoom:{backgroundColor:z.surfaceHover,borderColor:z.border,fillerColor:"rgba(30, 136, 229, 0.08)",handleStyle:{color:z.blue},handleSize:"110%",textStyle:{color:z.textSecondary}},toolbox:{iconStyle:{borderColor:z.textTertiary},emphasis:{iconStyle:{borderColor:z.orange}}},aria:{decal:{show:!0}}};qn([T7,H7,Z7,qY,UX,rW,aq,cX,_q,dq,_X,NX,tZ,z$,L$,Y$,CZ,hQ,f$,NQ,OQ,FQ]);cS("analitoly",GQ);function WS({chartId:e,option:t,height:n=400,interactive:r=!0}){const i=at.useRef(null),a=at.useRef(null),o=(v,g)=>{var m;return Array.isArray(v)?(m=v[0])==null?void 0:m[g]:v==null?void 0:v[g]},l=r?o(t.xAxis,"name"):void 0,s=r?o(t.yAxis,"name"):void 0,c=at.useCallback(()=>{if(!i.current)return;a.current&&a.current.dispose();const v=kU(i.current,"analitoly",{renderer:"canvas"});a.current=v;const g={...t};if(Array.isArray(g.series)){const D=g.series;D.length<=3&&(g.series=D.map(M=>{const{color:L,itemStyle:I,...N}=M;if(I){const{color:E,...O}=I;return Object.keys(O).length>0?{...N,itemStyle:O}:N}return N}))}const m=o(t.yAxis,"type")==="category"||o(t.xAxis,"type")==="value";r?m?g.grid={containLabel:!0,left:4,right:12,top:8,bottom:8}:t.grid||(g.grid={containLabel:!0,left:12,right:12,top:40,bottom:12}):g.grid=m?{containLabel:!0,left:4,right:4,top:4,bottom:4}:{containLabel:!0,left:4,right:4,top:24,bottom:4},t.aria||(g.aria={decal:{show:!0}});const x=(D,M)=>D.length>M?D.slice(0,M)+"…":D,_=r?20:14,b=D=>{if(!D||typeof D!="object")return D;let M=D;if(M.name){const{name:L,nameLocation:I,nameGap:N,nameTextStyle:E,...O}=M;M=O}return M.type==="category"&&Array.isArray(M.data)&&M.data.some(I=>String(I).length>_)&&(M={...M,axisLabel:{...M.axisLabel,formatter:I=>x(String(I),_)}}),!r&&M.axisLabel&&(M={...M,axisLabel:{...M.axisLabel,fontSize:10,rotate:0}}),M};for(const D of["xAxis","yAxis"]){const M=g[D];M&&(Array.isArray(M)?g[D]=M.map(b):g[D]=b(M))}const S=D=>typeof D!="number"||Number.isInteger(D)?D:+D.toFixed(2),w=m?"xAxis":"yAxis",A=D=>{var M;return!D||typeof D!="object"||(M=D.axisLabel)!=null&&M.formatter?D:{...D,axisLabel:{...D.axisLabel,formatter:L=>S(L)}}};if(g[w]){const D=g[w];g[w]=Array.isArray(D)?D.map(A):A(D)}(!t.tooltip||!t.tooltip.valueFormatter)&&(g.tooltip={...t.tooltip||{trigger:"axis"},valueFormatter:D=>S(D)}),!r&&g.legend&&(g.legend={...g.legend,show:!1}),r&&t.xAxis&&!t.dataZoom&&(g.dataZoom=[{type:"inside",xAxisIndex:0}]);try{v.setOption(g)}catch(D){console.error("ECharts setOption error:",D),i.current&&(i.current.innerHTML='<div style="display:flex;align-items:center;justify-content:center;height:100%;color:#999;font-size:13px;">Не удалось отрисовать график</div>');return}return v},[e,t,r]);if(at.useEffect(()=>{const v=c(),g=new ResizeObserver(()=>{v==null||v.resize()});return i.current&&g.observe(i.current),()=>{g.disconnect(),v==null||v.dispose(),a.current=null}},[c]),!(l||s))return k.jsx("div",{ref:i,style:{width:"100%",height:n,minHeight:r?200:160}});const d={fontSize:11,fontWeight:600,color:"#999",letterSpacing:"0.5px",textTransform:"uppercase"};return k.jsxs("div",{style:{width:"100%",height:n,minHeight:200,display:"flex",flexDirection:"column"},children:[k.jsxs("div",{style:{flex:1,display:"flex",minHeight:0},children:[s&&k.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:20,flexShrink:0},children:k.jsx("span",{style:{...d,writingMode:"vertical-rl",transform:"rotate(180deg)",whiteSpace:"nowrap"},children:s})}),k.jsx("div",{ref:i,style:{flex:1,minWidth:0}})]}),l&&k.jsx("div",{style:{textAlign:"center",paddingTop:4,paddingBottom:2},children:k.jsx("span",{style:d,children:l})})]})}function UQ({chart:e,onClick:t}){return k.jsxs("div",{onClick:t,style:{background:z.surface,border:`1px solid ${z.border}`,borderRadius:8,padding:8,marginBottom:8,cursor:"pointer",transition:Pt.normal,boxShadow:xe.sm},onMouseEnter:n=>{n.currentTarget.style.borderColor=z.orange,n.currentTarget.style.boxShadow=xe.md},onMouseLeave:n=>{n.currentTarget.style.borderColor=z.border,n.currentTarget.style.boxShadow=xe.sm},children:[k.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4},children:[k.jsx("span",{style:{fontSize:12,fontWeight:600,color:z.teal},children:e.title}),k.jsx("span",{style:{fontSize:10,color:z.textTertiary,background:z.surfaceHover,padding:"2px 6px",borderRadius:4},children:"Открыть"})]}),e.description&&k.jsx("p",{style:{fontSize:11,color:z.textSecondary,margin:"0 0 4px 0",lineHeight:1.3},children:e.description}),k.jsx("div",{style:{pointerEvents:"none"},children:k.jsx(WS,{chartId:e.chartId,option:e.echartsOption,height:160,interactive:!1})})]})}const YQ=`
|
|
117
|
+
@keyframes wave-dot {
|
|
118
|
+
0%, 100% { transform: translateY(0); opacity: 0.4; }
|
|
119
|
+
50% { transform: translateY(-4px); opacity: 1; }
|
|
120
|
+
}`;function WQ({label:e}){return k.jsxs(k.Fragment,{children:[k.jsx("style",{children:YQ}),k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"8px 14px",background:"rgba(255, 140, 66, 0.06)",borderRadius:8,marginBottom:8},children:[k.jsx("div",{style:{display:"flex",gap:4,alignItems:"end"},children:[0,.2,.4].map((t,n)=>k.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:z.orange,animation:`wave-dot 1.2s ease-in-out infinite ${t}s`}},n))}),k.jsx("span",{style:{color:z.orange,fontSize:12},children:e})]})]})}const qQ=`
|
|
121
|
+
@keyframes chart-bar-grow {
|
|
122
|
+
0%, 100% { transform: scaleY(0.3); }
|
|
123
|
+
50% { transform: scaleY(1); }
|
|
124
|
+
}
|
|
125
|
+
@keyframes chart-line-draw {
|
|
126
|
+
0% { stroke-dashoffset: 60; }
|
|
127
|
+
100% { stroke-dashoffset: 0; }
|
|
128
|
+
}
|
|
129
|
+
@keyframes chart-fade-pulse {
|
|
130
|
+
0%, 100% { opacity: 0.5; }
|
|
131
|
+
50% { opacity: 1; }
|
|
132
|
+
}`;function XQ(){const e=[14,20,10,18,12],t=4,n=3,r=e.length*(t+n)-n;return k.jsxs(k.Fragment,{children:[k.jsx("style",{children:qQ}),k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"12px 16px",background:"linear-gradient(135deg, rgba(0, 105, 92, 0.06), rgba(255, 140, 66, 0.06))",borderRadius:10,marginBottom:8,border:`1px solid ${z.borderLight}`},children:[k.jsx("svg",{width:r+4,height:"26",viewBox:`0 0 ${r+4} 26`,children:e.map((i,a)=>k.jsx("rect",{x:a*(t+n)+2,y:26-i,width:t,height:i,rx:1.5,fill:a%2===0?z.teal:z.orange,style:{transformOrigin:`${a*(t+n)+2+t/2}px 26px`,animation:`chart-bar-grow 1.6s ease-in-out infinite ${a*.15}s`,opacity:.8}},a))}),k.jsx("span",{style:{color:z.teal,fontSize:12,fontWeight:500,animation:"chart-fade-pulse 2s ease-in-out infinite"},children:"Генерация графика..."})]})]})}function ZQ(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const $Q=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,QQ=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,KQ={};function bE(e,t){return(KQ.jsx?QQ:$Q).test(e)}const JQ=/[ \t\n\f\r]/g;function tK(e){return typeof e=="object"?e.type==="text"?_E(e.value):!1:_E(e)}function _E(e){return e.replace(JQ,"")===""}class Hh{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Hh.prototype.normal={};Hh.prototype.property={};Hh.prototype.space=void 0;function YB(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Hh(n,r,t)}function Jb(e){return e.toLowerCase()}class cr{constructor(t,n){this.attribute=n,this.property=t}}cr.prototype.attribute="";cr.prototype.booleanish=!1;cr.prototype.boolean=!1;cr.prototype.commaOrSpaceSeparated=!1;cr.prototype.commaSeparated=!1;cr.prototype.defined=!1;cr.prototype.mustUseProperty=!1;cr.prototype.number=!1;cr.prototype.overloadedBoolean=!1;cr.prototype.property="";cr.prototype.spaceSeparated=!1;cr.prototype.space=void 0;let eK=0;const Kt=os(),on=os(),t_=os(),xt=os(),ze=os(),Eu=os(),br=os();function os(){return 2**++eK}const e_=Object.freeze(Object.defineProperty({__proto__:null,boolean:Kt,booleanish:on,commaOrSpaceSeparated:br,commaSeparated:Eu,number:xt,overloadedBoolean:t_,spaceSeparated:ze},Symbol.toStringTag,{value:"Module"})),ex=Object.keys(e_);class qS extends cr{constructor(t,n,r,i){let a=-1;if(super(t,n),SE(this,"space",i),typeof r=="number")for(;++a<ex.length;){const o=ex[a];SE(this,ex[a],(r&e_[o])===e_[o])}}}qS.prototype.defined=!0;function SE(e,t,n){n&&(e[t]=n)}function Ku(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new qS(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Jb(r)]=r,n[Jb(a.attribute)]=r}return new Hh(t,n,e.space)}const WB=Ku({properties:{ariaActiveDescendant:null,ariaAtomic:on,ariaAutoComplete:null,ariaBusy:on,ariaChecked:on,ariaColCount:xt,ariaColIndex:xt,ariaColSpan:xt,ariaControls:ze,ariaCurrent:null,ariaDescribedBy:ze,ariaDetails:null,ariaDisabled:on,ariaDropEffect:ze,ariaErrorMessage:null,ariaExpanded:on,ariaFlowTo:ze,ariaGrabbed:on,ariaHasPopup:null,ariaHidden:on,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ze,ariaLevel:xt,ariaLive:null,ariaModal:on,ariaMultiLine:on,ariaMultiSelectable:on,ariaOrientation:null,ariaOwns:ze,ariaPlaceholder:null,ariaPosInSet:xt,ariaPressed:on,ariaReadOnly:on,ariaRelevant:null,ariaRequired:on,ariaRoleDescription:ze,ariaRowCount:xt,ariaRowIndex:xt,ariaRowSpan:xt,ariaSelected:on,ariaSetSize:xt,ariaSort:null,ariaValueMax:xt,ariaValueMin:xt,ariaValueNow:xt,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function qB(e,t){return t in e?e[t]:t}function XB(e,t){return qB(e,t.toLowerCase())}const nK=Ku({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Eu,acceptCharset:ze,accessKey:ze,action:null,allow:null,allowFullScreen:Kt,allowPaymentRequest:Kt,allowUserMedia:Kt,alt:null,as:null,async:Kt,autoCapitalize:null,autoComplete:ze,autoFocus:Kt,autoPlay:Kt,blocking:ze,capture:null,charSet:null,checked:Kt,cite:null,className:ze,cols:xt,colSpan:null,content:null,contentEditable:on,controls:Kt,controlsList:ze,coords:xt|Eu,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Kt,defer:Kt,dir:null,dirName:null,disabled:Kt,download:t_,draggable:on,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Kt,formTarget:null,headers:ze,height:xt,hidden:t_,high:xt,href:null,hrefLang:null,htmlFor:ze,httpEquiv:ze,id:null,imageSizes:null,imageSrcSet:null,inert:Kt,inputMode:null,integrity:null,is:null,isMap:Kt,itemId:null,itemProp:ze,itemRef:ze,itemScope:Kt,itemType:ze,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Kt,low:xt,manifest:null,max:null,maxLength:xt,media:null,method:null,min:null,minLength:xt,multiple:Kt,muted:Kt,name:null,nonce:null,noModule:Kt,noValidate:Kt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Kt,optimum:xt,pattern:null,ping:ze,placeholder:null,playsInline:Kt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Kt,referrerPolicy:null,rel:ze,required:Kt,reversed:Kt,rows:xt,rowSpan:xt,sandbox:ze,scope:null,scoped:Kt,seamless:Kt,selected:Kt,shadowRootClonable:Kt,shadowRootDelegatesFocus:Kt,shadowRootMode:null,shape:null,size:xt,sizes:null,slot:null,span:xt,spellCheck:on,src:null,srcDoc:null,srcLang:null,srcSet:null,start:xt,step:null,style:null,tabIndex:xt,target:null,title:null,translate:null,type:null,typeMustMatch:Kt,useMap:null,value:on,width:xt,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ze,axis:null,background:null,bgColor:null,border:xt,borderColor:null,bottomMargin:xt,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Kt,declare:Kt,event:null,face:null,frame:null,frameBorder:null,hSpace:xt,leftMargin:xt,link:null,longDesc:null,lowSrc:null,marginHeight:xt,marginWidth:xt,noResize:Kt,noHref:Kt,noShade:Kt,noWrap:Kt,object:null,profile:null,prompt:null,rev:null,rightMargin:xt,rules:null,scheme:null,scrolling:on,standby:null,summary:null,text:null,topMargin:xt,valueType:null,version:null,vAlign:null,vLink:null,vSpace:xt,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Kt,disableRemotePlayback:Kt,prefix:null,property:null,results:xt,security:null,unselectable:null},space:"html",transform:XB}),rK=Ku({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:br,accentHeight:xt,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:xt,amplitude:xt,arabicForm:null,ascent:xt,attributeName:null,attributeType:null,azimuth:xt,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:xt,by:null,calcMode:null,capHeight:xt,className:ze,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:xt,diffuseConstant:xt,direction:null,display:null,dur:null,divisor:xt,dominantBaseline:null,download:Kt,dx:null,dy:null,edgeMode:null,editable:null,elevation:xt,enableBackground:null,end:null,event:null,exponent:xt,externalResourcesRequired:null,fill:null,fillOpacity:xt,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Eu,g2:Eu,glyphName:Eu,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:xt,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:xt,horizOriginX:xt,horizOriginY:xt,id:null,ideographic:xt,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:xt,k:xt,k1:xt,k2:xt,k3:xt,k4:xt,kernelMatrix:br,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:xt,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:xt,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:xt,overlineThickness:xt,paintOrder:null,panose1:null,path:null,pathLength:xt,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ze,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:xt,pointsAtY:xt,pointsAtZ:xt,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:br,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:br,rev:br,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:br,requiredFeatures:br,requiredFonts:br,requiredFormats:br,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:xt,specularExponent:xt,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:xt,strikethroughThickness:xt,string:null,stroke:null,strokeDashArray:br,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:xt,strokeOpacity:xt,strokeWidth:null,style:null,surfaceScale:xt,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:br,tabIndex:xt,tableValues:null,target:null,targetX:xt,targetY:xt,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:br,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:xt,underlineThickness:xt,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:xt,values:null,vAlphabetic:xt,vMathematical:xt,vectorEffect:null,vHanging:xt,vIdeographic:xt,version:null,vertAdvY:xt,vertOriginX:xt,vertOriginY:xt,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:xt,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:qB}),ZB=Ku({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),$B=Ku({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:XB}),QB=Ku({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),iK={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},aK=/[A-Z]/g,wE=/-[a-z]/g,oK=/^data[-\w.:]+$/i;function lK(e,t){const n=Jb(t);let r=t,i=cr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&oK.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(wE,uK);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!wE.test(a)){let o=a.replace(aK,sK);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=qS}return new i(r,t)}function sK(e){return"-"+e.toLowerCase()}function uK(e){return e.charAt(1).toUpperCase()}const cK=YB([WB,nK,ZB,$B,QB],"html"),XS=YB([WB,rK,ZB,$B,QB],"svg");function fK(e){return e.join(" ").trim()}var hu={},nx,TE;function hK(){if(TE)return nx;TE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,s=`
|
|
133
|
+
`,c="/",h="*",d="",v="comment",g="declaration";function m(_,b){if(typeof _!="string")throw new TypeError("First argument must be a string");if(!_)return[];b=b||{};var S=1,w=1;function A(U){var W=U.match(t);W&&(S+=W.length);var H=U.lastIndexOf(s);w=~H?U.length-H:w+U.length}function D(){var U={line:S,column:w};return function(W){return W.position=new M(U),N(),W}}function M(U){this.start=U,this.end={line:S,column:w},this.source=b.source}M.prototype.content=_;function L(U){var W=new Error(b.source+":"+S+":"+w+": "+U);if(W.reason=U,W.filename=b.source,W.line=S,W.column=w,W.source=_,!b.silent)throw W}function I(U){var W=U.exec(_);if(W){var H=W[0];return A(H),_=_.slice(H.length),W}}function N(){I(n)}function E(U){var W;for(U=U||[];W=O();)W!==!1&&U.push(W);return U}function O(){var U=D();if(!(c!=_.charAt(0)||h!=_.charAt(1))){for(var W=2;d!=_.charAt(W)&&(h!=_.charAt(W)||c!=_.charAt(W+1));)++W;if(W+=2,d===_.charAt(W-1))return L("End of comment missing");var H=_.slice(2,W-2);return w+=2,A(H),_=_.slice(W),w+=2,U({type:v,comment:H})}}function j(){var U=D(),W=I(r);if(W){if(O(),!I(i))return L("property missing ':'");var H=I(a),q=U({type:g,property:x(W[0].replace(e,d)),value:H?x(H[0].replace(e,d)):d});return I(o),q}}function B(){var U=[];E(U);for(var W;W=j();)W!==!1&&(U.push(W),E(U));return U}return N(),B()}function x(_){return _?_.replace(l,d):d}return nx=m,nx}var CE;function dK(){if(CE)return hu;CE=1;var e=hu&&hu.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hu,"__esModule",{value:!0}),hu.default=n;const t=e(hK());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const o=(0,t.default)(r),l=typeof i=="function";return o.forEach(s=>{if(s.type!=="declaration")return;const{property:c,value:h}=s;l?i(c,h,s):h&&(a=a||{},a[c]=h)}),a}return hu}var _f={},ME;function vK(){if(ME)return _f;ME=1,Object.defineProperty(_f,"__esModule",{value:!0}),_f.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(c){return!c||n.test(c)||e.test(c)},o=function(c,h){return h.toUpperCase()},l=function(c,h){return"".concat(h,"-")},s=function(c,h){return h===void 0&&(h={}),a(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(i,l):c=c.replace(r,l),c.replace(t,o))};return _f.camelCase=s,_f}var Sf,AE;function pK(){if(AE)return Sf;AE=1;var e=Sf&&Sf.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(dK()),n=vK();function r(i,a){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(l,s){l&&s&&(o[(0,n.camelCase)(l,a)]=s)}),o}return r.default=r,Sf=r,Sf}var gK=pK();const mK=TR(gK),KB=JB("end"),ZS=JB("start");function JB(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function yK(e){const t=ZS(e),n=KB(e);if(t&&n)return{start:t,end:n}}function Zf(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?DE(e.position):"start"in e||"end"in e?DE(e):"line"in e||"column"in e?n_(e):""}function n_(e){return kE(e&&e.line)+":"+kE(e&&e.column)}function DE(e){return n_(e&&e.start)+"-"+n_(e&&e.end)}function kE(e){return e&&typeof e=="number"?e:1}class Bn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?a.ruleId=r:(a.source=r.slice(0,s),a.ruleId=r.slice(s+1))}if(!a.place&&a.ancestors&&a.ancestors){const s=a.ancestors[a.ancestors.length-1];s&&(a.place=s.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=Zf(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Bn.prototype.file="";Bn.prototype.name="";Bn.prototype.reason="";Bn.prototype.message="";Bn.prototype.stack="";Bn.prototype.column=void 0;Bn.prototype.line=void 0;Bn.prototype.ancestors=void 0;Bn.prototype.cause=void 0;Bn.prototype.fatal=void 0;Bn.prototype.place=void 0;Bn.prototype.ruleId=void 0;Bn.prototype.source=void 0;const $S={}.hasOwnProperty,xK=new Map,bK=/[A-Z]/g,_K=new Set(["table","tbody","thead","tfoot","tr"]),SK=new Set(["td","th"]),t3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wK(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=EK(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=LK(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?XS:cK,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=e3(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function e3(e,t,n){if(t.type==="element")return TK(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return CK(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return AK(e,t,n);if(t.type==="mdxjsEsm")return MK(e,t);if(t.type==="root")return DK(e,t,n);if(t.type==="text")return kK(e,t)}function TK(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=XS,e.schema=i),e.ancestors.push(t);const a=r3(e,t.tagName,!1),o=RK(e,t);let l=KS(e,t);return _K.has(t.tagName)&&(l=l.filter(function(s){return typeof s=="string"?!tK(s):!0})),n3(e,o,a,t),QS(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function CK(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Th(e,t.position)}function MK(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Th(e,t.position)}function AK(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=XS,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:r3(e,t.name,!0),o=IK(e,t),l=KS(e,t);return n3(e,o,a,t),QS(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function DK(e,t,n){const r={};return QS(r,KS(e,t)),e.create(t,e.Fragment,r,n)}function kK(e,t){return t.value}function n3(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function QS(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function LK(e,t,n){return r;function r(i,a,o,l){const c=Array.isArray(o.children)?n:t;return l?c(a,o,l):c(a,o)}}function EK(e,t){return n;function n(r,i,a,o){const l=Array.isArray(a.children),s=ZS(r);return t(i,a,o,l,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function RK(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&$S.call(t.properties,i)){const a=OK(e,i,t.properties[i]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&SK.has(t.tagName)?r=l:n[o]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function IK(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Th(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Th(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function KS(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:xK;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const s=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(s){const c=i.get(s)||0;o=s+"-"+c,i.set(s,c+1)}}const l=e3(e,a,o);l!==void 0&&n.push(l)}return n}function OK(e,t,n){const r=lK(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ZQ(n):fK(n)),r.property==="style"){let i=typeof n=="object"?n:zK(e,String(n));return e.stylePropertyNameCase==="css"&&(i=BK(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?iK[r.property]||r.property:r.attribute,n]}}function zK(e,t){try{return mK(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Bn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=t3+"#cannot-parse-style-attribute",i}}function r3(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const l=bE(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=o}else r=bE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return $S.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Th(e)}function Th(e,t){const n=new Bn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=t3+"#cannot-handle-mdx-estrees-without-createevaluater",n}function BK(e){const t={};let n;for(n in e)$S.call(e,n)&&(t[NK(n)]=e[n]);return t}function NK(e){let t=e.replace(bK,PK);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function PK(e){return"-"+e.toLowerCase()}const rx={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},HK={};function JS(e,t){const n=HK,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return i3(e,r,i)}function i3(e,t,n){if(VK(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return LE(e.children,t,n)}return Array.isArray(e)?LE(e,t,n):""}function LE(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=i3(e[i],t,n);return r.join("")}function VK(e){return!!(e&&typeof e=="object")}const EE=document.createElement("i");function tw(e){const t="&"+e+";";EE.innerHTML=t;const n=EE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Tr(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Wr(e,t){return e.length>0?(Tr(e,e.length,0,t),e):t}const RE={}.hasOwnProperty;function a3(e){const t={};let n=-1;for(;++n<e.length;)jK(t,e[n]);return t}function jK(e,t){let n;for(n in t){const i=(RE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){RE.call(i,o)||(i[o]=[]);const l=a[o];FK(i[o],Array.isArray(l)?l:l?[l]:[])}}}function FK(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Tr(e,0,0,r)}function o3(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function gi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Gn=Ho(/[A-Za-z]/),Rn=Ho(/[\dA-Za-z]/),GK=Ho(/[#-'*+\--9=?A-Z^-~]/);function hg(e){return e!==null&&(e<32||e===127)}const r_=Ho(/\d/),UK=Ho(/[\dA-Fa-f]/),YK=Ho(/[!-/:-@[-`{-~]/);function Nt(e){return e!==null&&e<-2}function Ie(e){return e!==null&&(e<0||e===32)}function re(e){return e===-2||e===-1||e===32}const Yg=Ho(new RegExp("\\p{P}|\\p{S}","u")),rs=Ho(/\s/);function Ho(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ju(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&Rn(e.charCodeAt(n+1))&&Rn(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function de(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(s){return re(s)?(e.enter(n),l(s)):t(s)}function l(s){return re(s)&&a++<i?(e.consume(s),l):(e.exit(n),t(s))}}const WK={tokenize:qK};function qK(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),de(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,o(l)}function o(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Nt(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),o)}}const XK={tokenize:ZK},IE={tokenize:$K};function ZK(e){const t=this,n=[];let r=0,i,a,o;return l;function l(w){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,s,c)(w)}return c(w)}function s(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&S();const A=t.events.length;let D=A,M;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){M=t.events[D][1].end;break}b(r);let L=A;for(;L<t.events.length;)t.events[L][1].end={...M},L++;return Tr(t.events,D+1,0,t.events.slice(A)),t.events.length=L,c(w)}return l(w)}function c(w){if(r===n.length){if(!i)return v(w);if(i.currentConstruct&&i.currentConstruct.concrete)return m(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(IE,h,d)(w)}function h(w){return i&&S(),b(r),v(w)}function d(w){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(w)}function v(w){return t.containerState={},e.attempt(IE,g,m)(w)}function g(w){return r++,n.push([t.currentConstruct,t.containerState]),v(w)}function m(w){if(w===null){i&&S(),b(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),x(w)}function x(w){if(w===null){_(e.exit("chunkFlow"),!0),b(0),e.consume(w);return}return Nt(w)?(e.consume(w),_(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(w),x)}function _(w,A){const D=t.sliceStream(w);if(A&&D.push(null),w.previous=a,a&&(a.next=w),a=w,i.defineSkip(w.start),i.write(D),t.parser.lazy[w.start.line]){let M=i.events.length;for(;M--;)if(i.events[M][1].start.offset<o&&(!i.events[M][1].end||i.events[M][1].end.offset>o))return;const L=t.events.length;let I=L,N,E;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(N){E=t.events[I][1].end;break}N=!0}for(b(r),M=L;M<t.events.length;)t.events[M][1].end={...E},M++;Tr(t.events,I+1,0,t.events.slice(L)),t.events.length=M}}function b(w){let A=n.length;for(;A-- >w;){const D=n[A];t.containerState=D[1],D[0].exit.call(t,e)}n.length=w}function S(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function $K(e,t,n){return de(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fu(e){if(e===null||Ie(e)||rs(e))return 1;if(Yg(e))return 2}function Wg(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const i_={name:"attention",resolveAll:QK,tokenize:KK};function QK(e,t){let n=-1,r,i,a,o,l,s,c,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},v={...e[n][1].start};OE(d,-s),OE(v,s),o={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},l={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},a={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:s>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[r][1].end={...o.start},e[n][1].start={...l.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Wr(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Wr(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),c=Wr(c,Wg(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Wr(c,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,c=Wr(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Tr(e,r-1,n-r+3,c),n=r+c.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function KK(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Fu(r);let a;return o;function o(s){return a=s,e.enter("attentionSequence"),l(s)}function l(s){if(s===a)return e.consume(s),l;const c=e.exit("attentionSequence"),h=Fu(s),d=!h||h===2&&i||n.includes(s),v=!i||i===2&&h||n.includes(r);return c._open=!!(a===42?d:d&&(i||!v)),c._close=!!(a===42?v:v&&(h||!d)),t(s)}}function OE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const JK={name:"autolink",tokenize:tJ};function tJ(e,t,n){let r=0;return i;function i(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(g){return Gn(g)?(e.consume(g),o):g===64?n(g):c(g)}function o(g){return g===43||g===45||g===46||Rn(g)?(r=1,l(g)):c(g)}function l(g){return g===58?(e.consume(g),r=0,s):(g===43||g===45||g===46||Rn(g))&&r++<32?(e.consume(g),l):(r=0,c(g))}function s(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||hg(g)?n(g):(e.consume(g),s)}function c(g){return g===64?(e.consume(g),h):GK(g)?(e.consume(g),c):n(g)}function h(g){return Rn(g)?d(g):n(g)}function d(g){return g===46?(e.consume(g),r=0,h):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):v(g)}function v(g){if((g===45||Rn(g))&&r++<63){const m=g===45?v:d;return e.consume(g),m}return n(g)}}const Vh={partial:!0,tokenize:eJ};function eJ(e,t,n){return r;function r(a){return re(a)?de(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Nt(a)?t(a):n(a)}}const l3={continuation:{tokenize:rJ},exit:iJ,name:"blockQuote",tokenize:nJ};function nJ(e,t,n){const r=this;return i;function i(o){if(o===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return re(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function rJ(e,t,n){const r=this;return i;function i(o){return re(o)?de(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(l3,t,n)(o)}}function iJ(e){e.exit("blockQuote")}const s3={name:"characterEscape",tokenize:aJ};function aJ(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return YK(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const u3={name:"characterReference",tokenize:oJ};function oJ(e,t,n){const r=this;let i=0,a,o;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),s}function s(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,o=Rn,h(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=UK,h):(e.enter("characterReferenceValue"),a=7,o=r_,h(d))}function h(d){if(d===59&&i){const v=e.exit("characterReferenceValue");return o===Rn&&!tw(r.sliceSerialize(v))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<a?(e.consume(d),h):n(d)}}const zE={partial:!0,tokenize:sJ},BE={concrete:!0,name:"codeFenced",tokenize:lJ};function lJ(e,t,n){const r=this,i={partial:!0,tokenize:D};let a=0,o=0,l;return s;function s(M){return c(M)}function c(M){const L=r.events[r.events.length-1];return a=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,l=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(M)}function h(M){return M===l?(o++,e.consume(M),h):o<3?n(M):(e.exit("codeFencedFenceSequence"),re(M)?de(e,d,"whitespace")(M):d(M))}function d(M){return M===null||Nt(M)?(e.exit("codeFencedFence"),r.interrupt?t(M):e.check(zE,x,A)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(M))}function v(M){return M===null||Nt(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(M)):re(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),de(e,g,"whitespace")(M)):M===96&&M===l?n(M):(e.consume(M),v)}function g(M){return M===null||Nt(M)?d(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(M))}function m(M){return M===null||Nt(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(M)):M===96&&M===l?n(M):(e.consume(M),m)}function x(M){return e.attempt(i,A,_)(M)}function _(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),b}function b(M){return a>0&&re(M)?de(e,S,"linePrefix",a+1)(M):S(M)}function S(M){return M===null||Nt(M)?e.check(zE,x,A)(M):(e.enter("codeFlowValue"),w(M))}function w(M){return M===null||Nt(M)?(e.exit("codeFlowValue"),S(M)):(e.consume(M),w)}function A(M){return e.exit("codeFenced"),t(M)}function D(M,L,I){let N=0;return E;function E(W){return M.enter("lineEnding"),M.consume(W),M.exit("lineEnding"),O}function O(W){return M.enter("codeFencedFence"),re(W)?de(M,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):j(W)}function j(W){return W===l?(M.enter("codeFencedFenceSequence"),B(W)):I(W)}function B(W){return W===l?(N++,M.consume(W),B):N>=o?(M.exit("codeFencedFenceSequence"),re(W)?de(M,U,"whitespace")(W):U(W)):I(W)}function U(W){return W===null||Nt(W)?(M.exit("codeFencedFence"),L(W)):I(W)}}}function sJ(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const ix={name:"codeIndented",tokenize:cJ},uJ={partial:!0,tokenize:fJ};function cJ(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),de(e,a,"linePrefix",5)(c)}function a(c){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?s(c):Nt(c)?e.attempt(uJ,o,s)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||Nt(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),l)}function s(c){return e.exit("codeIndented"),t(c)}}function fJ(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Nt(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):de(e,a,"linePrefix",5)(o)}function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):Nt(o)?i(o):n(o)}}const hJ={name:"codeText",previous:vJ,resolve:dJ,tokenize:pJ};function dJ(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function vJ(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function pJ(e,t,n){let r=0,i,a;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),s(d))}function s(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),s):d===96?(a=e.enter("codeTextSequence"),i=0,h(d)):Nt(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),s):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Nt(d)?(e.exit("codeTextData"),s(d)):(e.consume(d),c)}function h(d){return d===96?(e.consume(d),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",c(d))}}class gJ{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&wf(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),wf(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),wf(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);wf(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);wf(this.left,n.reverse())}}}function wf(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function c3(e){const t={};let n=-1,r,i,a,o,l,s,c;const h=new gJ(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,a=0,a<s.length&&s[a][1].type==="lineEndingBlank"&&(a+=2),a<s.length&&s[a][1].type==="content"))for(;++a<s.length&&s[a][1].type!=="content";)s[a][1].type==="chunkText"&&(s[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,mJ(h,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=h.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},l=h.slice(i,n),l.unshift(r),h.splice(i,n-i+1,l))}}return Tr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function mJ(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,s=[],c={};let h,d,v=-1,g=n,m=0,x=0;const _=[x];for(;g;){for(;e.get(++i)[1]!==g;);a.push(i),g._tokenizer||(h=r.sliceStream(g),g.next||h.push(null),d&&o.defineSkip(g.start),g._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(h),g._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=g,g=g.next}for(g=n;++v<l.length;)l[v][0]==="exit"&&l[v-1][0]==="enter"&&l[v][1].type===l[v-1][1].type&&l[v][1].start.line!==l[v][1].end.line&&(x=v+1,_.push(x),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(o.events=[],g?(g._tokenizer=void 0,g.previous=void 0):_.pop(),v=_.length;v--;){const b=l.slice(_[v],_[v+1]),S=a.pop();s.push([S,S+b.length-1]),e.splice(S,2,b)}for(s.reverse(),v=-1;++v<s.length;)c[m+s[v][0]]=m+s[v][1],m+=s[v][1]-s[v][0]-1;return c}const yJ={resolve:bJ,tokenize:_J},xJ={partial:!0,tokenize:SJ};function bJ(e){return c3(e),e}function _J(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):Nt(l)?e.check(xJ,o,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function o(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function SJ(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),de(e,a,"linePrefix")}function a(o){if(o===null||Nt(o))return n(o);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function f3(e,t,n,r,i,a,o,l,s){const c=s||Number.POSITIVE_INFINITY;let h=0;return d;function d(b){return b===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(b),e.exit(a),v):b===null||b===32||b===41||hg(b)?n(b):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(b))}function v(b){return b===62?(e.enter(a),e.consume(b),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===62?(e.exit("chunkString"),e.exit(l),v(b)):b===null||b===60||Nt(b)?n(b):(e.consume(b),b===92?m:g)}function m(b){return b===60||b===62||b===92?(e.consume(b),g):g(b)}function x(b){return!h&&(b===null||b===41||Ie(b))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),t(b)):h<c&&b===40?(e.consume(b),h++,x):b===41?(e.consume(b),h--,x):b===null||b===32||b===40||hg(b)?n(b):(e.consume(b),b===92?_:x)}function _(b){return b===40||b===41||b===92?(e.consume(b),x):x(b)}}function h3(e,t,n,r,i,a){const o=this;let l=0,s;return c;function c(g){return e.enter(r),e.enter(i),e.consume(g),e.exit(i),e.enter(a),h}function h(g){return l>999||g===null||g===91||g===93&&!s||g===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(g):g===93?(e.exit(a),e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):Nt(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===null||g===91||g===93||Nt(g)||l++>999?(e.exit("chunkString"),h(g)):(e.consume(g),s||(s=!re(g)),g===92?v:d)}function v(g){return g===91||g===92||g===93?(e.consume(g),l++,d):d(g)}}function d3(e,t,n,r,i,a){let o;return l;function l(v){return v===34||v===39||v===40?(e.enter(r),e.enter(i),e.consume(v),e.exit(i),o=v===40?41:v,s):n(v)}function s(v){return v===o?(e.enter(i),e.consume(v),e.exit(i),e.exit(r),t):(e.enter(a),c(v))}function c(v){return v===o?(e.exit(a),s(o)):v===null?n(v):Nt(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),de(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===o||v===null||Nt(v)?(e.exit("chunkString"),c(v)):(e.consume(v),v===92?d:h)}function d(v){return v===o||v===92?(e.consume(v),h):h(v)}}function $f(e,t){let n;return r;function r(i){return Nt(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):re(i)?de(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const wJ={name:"definition",tokenize:CJ},TJ={partial:!0,tokenize:MJ};function CJ(e,t,n){const r=this;let i;return a;function a(g){return e.enter("definition"),o(g)}function o(g){return h3.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function l(g){return i=gi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),s):n(g)}function s(g){return Ie(g)?$f(e,c)(g):c(g)}function c(g){return f3(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function h(g){return e.attempt(TJ,d,d)(g)}function d(g){return re(g)?de(e,v,"whitespace")(g):v(g)}function v(g){return g===null||Nt(g)?(e.exit("definition"),r.parser.defined.push(i),t(g)):n(g)}}function MJ(e,t,n){return r;function r(l){return Ie(l)?$f(e,i)(l):n(l)}function i(l){return d3(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return re(l)?de(e,o,"whitespace")(l):o(l)}function o(l){return l===null||Nt(l)?t(l):n(l)}}const AJ={name:"hardBreakEscape",tokenize:DJ};function DJ(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Nt(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const kJ={name:"headingAtx",resolve:LJ,tokenize:EJ};function LJ(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Tr(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function EJ(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),o(h)}function o(h){return h===35&&r++<6?(e.consume(h),o):h===null||Ie(h)?(e.exit("atxHeadingSequence"),l(h)):n(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),s(h)):h===null||Nt(h)?(e.exit("atxHeading"),t(h)):re(h)?de(e,l,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function s(h){return h===35?(e.consume(h),s):(e.exit("atxHeadingSequence"),l(h))}function c(h){return h===null||h===35||Ie(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),c)}}const RJ=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],NE=["pre","script","style","textarea"],IJ={concrete:!0,name:"htmlFlow",resolveTo:BJ,tokenize:NJ},OJ={partial:!0,tokenize:HJ},zJ={partial:!0,tokenize:PJ};function BJ(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function NJ(e,t,n){const r=this;let i,a,o,l,s;return c;function c(V){return h(V)}function h(V){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(V),d}function d(V){return V===33?(e.consume(V),v):V===47?(e.consume(V),a=!0,x):V===63?(e.consume(V),i=3,r.interrupt?t:F):Gn(V)?(e.consume(V),o=String.fromCharCode(V),_):n(V)}function v(V){return V===45?(e.consume(V),i=2,g):V===91?(e.consume(V),i=5,l=0,m):Gn(V)?(e.consume(V),i=4,r.interrupt?t:F):n(V)}function g(V){return V===45?(e.consume(V),r.interrupt?t:F):n(V)}function m(V){const tt="CDATA[";return V===tt.charCodeAt(l++)?(e.consume(V),l===tt.length?r.interrupt?t:j:m):n(V)}function x(V){return Gn(V)?(e.consume(V),o=String.fromCharCode(V),_):n(V)}function _(V){if(V===null||V===47||V===62||Ie(V)){const tt=V===47,ut=o.toLowerCase();return!tt&&!a&&NE.includes(ut)?(i=1,r.interrupt?t(V):j(V)):RJ.includes(o.toLowerCase())?(i=6,tt?(e.consume(V),b):r.interrupt?t(V):j(V)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(V):a?S(V):w(V))}return V===45||Rn(V)?(e.consume(V),o+=String.fromCharCode(V),_):n(V)}function b(V){return V===62?(e.consume(V),r.interrupt?t:j):n(V)}function S(V){return re(V)?(e.consume(V),S):E(V)}function w(V){return V===47?(e.consume(V),E):V===58||V===95||Gn(V)?(e.consume(V),A):re(V)?(e.consume(V),w):E(V)}function A(V){return V===45||V===46||V===58||V===95||Rn(V)?(e.consume(V),A):D(V)}function D(V){return V===61?(e.consume(V),M):re(V)?(e.consume(V),D):w(V)}function M(V){return V===null||V===60||V===61||V===62||V===96?n(V):V===34||V===39?(e.consume(V),s=V,L):re(V)?(e.consume(V),M):I(V)}function L(V){return V===s?(e.consume(V),s=null,N):V===null||Nt(V)?n(V):(e.consume(V),L)}function I(V){return V===null||V===34||V===39||V===47||V===60||V===61||V===62||V===96||Ie(V)?D(V):(e.consume(V),I)}function N(V){return V===47||V===62||re(V)?w(V):n(V)}function E(V){return V===62?(e.consume(V),O):n(V)}function O(V){return V===null||Nt(V)?j(V):re(V)?(e.consume(V),O):n(V)}function j(V){return V===45&&i===2?(e.consume(V),H):V===60&&i===1?(e.consume(V),q):V===62&&i===4?(e.consume(V),Y):V===63&&i===3?(e.consume(V),F):V===93&&i===5?(e.consume(V),J):Nt(V)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(OJ,Z,B)(V)):V===null||Nt(V)?(e.exit("htmlFlowData"),B(V)):(e.consume(V),j)}function B(V){return e.check(zJ,U,Z)(V)}function U(V){return e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),W}function W(V){return V===null||Nt(V)?B(V):(e.enter("htmlFlowData"),j(V))}function H(V){return V===45?(e.consume(V),F):j(V)}function q(V){return V===47?(e.consume(V),o="",X):j(V)}function X(V){if(V===62){const tt=o.toLowerCase();return NE.includes(tt)?(e.consume(V),Y):j(V)}return Gn(V)&&o.length<8?(e.consume(V),o+=String.fromCharCode(V),X):j(V)}function J(V){return V===93?(e.consume(V),F):j(V)}function F(V){return V===62?(e.consume(V),Y):V===45&&i===2?(e.consume(V),F):j(V)}function Y(V){return V===null||Nt(V)?(e.exit("htmlFlowData"),Z(V)):(e.consume(V),Y)}function Z(V){return e.exit("htmlFlow"),t(V)}}function PJ(e,t,n){const r=this;return i;function i(o){return Nt(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function HJ(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Vh,t,n)}}const VJ={name:"htmlText",tokenize:jJ};function jJ(e,t,n){const r=this;let i,a,o;return l;function l(F){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(F),s}function s(F){return F===33?(e.consume(F),c):F===47?(e.consume(F),D):F===63?(e.consume(F),w):Gn(F)?(e.consume(F),I):n(F)}function c(F){return F===45?(e.consume(F),h):F===91?(e.consume(F),a=0,m):Gn(F)?(e.consume(F),S):n(F)}function h(F){return F===45?(e.consume(F),g):n(F)}function d(F){return F===null?n(F):F===45?(e.consume(F),v):Nt(F)?(o=d,q(F)):(e.consume(F),d)}function v(F){return F===45?(e.consume(F),g):d(F)}function g(F){return F===62?H(F):F===45?v(F):d(F)}function m(F){const Y="CDATA[";return F===Y.charCodeAt(a++)?(e.consume(F),a===Y.length?x:m):n(F)}function x(F){return F===null?n(F):F===93?(e.consume(F),_):Nt(F)?(o=x,q(F)):(e.consume(F),x)}function _(F){return F===93?(e.consume(F),b):x(F)}function b(F){return F===62?H(F):F===93?(e.consume(F),b):x(F)}function S(F){return F===null||F===62?H(F):Nt(F)?(o=S,q(F)):(e.consume(F),S)}function w(F){return F===null?n(F):F===63?(e.consume(F),A):Nt(F)?(o=w,q(F)):(e.consume(F),w)}function A(F){return F===62?H(F):w(F)}function D(F){return Gn(F)?(e.consume(F),M):n(F)}function M(F){return F===45||Rn(F)?(e.consume(F),M):L(F)}function L(F){return Nt(F)?(o=L,q(F)):re(F)?(e.consume(F),L):H(F)}function I(F){return F===45||Rn(F)?(e.consume(F),I):F===47||F===62||Ie(F)?N(F):n(F)}function N(F){return F===47?(e.consume(F),H):F===58||F===95||Gn(F)?(e.consume(F),E):Nt(F)?(o=N,q(F)):re(F)?(e.consume(F),N):H(F)}function E(F){return F===45||F===46||F===58||F===95||Rn(F)?(e.consume(F),E):O(F)}function O(F){return F===61?(e.consume(F),j):Nt(F)?(o=O,q(F)):re(F)?(e.consume(F),O):N(F)}function j(F){return F===null||F===60||F===61||F===62||F===96?n(F):F===34||F===39?(e.consume(F),i=F,B):Nt(F)?(o=j,q(F)):re(F)?(e.consume(F),j):(e.consume(F),U)}function B(F){return F===i?(e.consume(F),i=void 0,W):F===null?n(F):Nt(F)?(o=B,q(F)):(e.consume(F),B)}function U(F){return F===null||F===34||F===39||F===60||F===61||F===96?n(F):F===47||F===62||Ie(F)?N(F):(e.consume(F),U)}function W(F){return F===47||F===62||Ie(F)?N(F):n(F)}function H(F){return F===62?(e.consume(F),e.exit("htmlTextData"),e.exit("htmlText"),t):n(F)}function q(F){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),X}function X(F){return re(F)?de(e,J,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):J(F)}function J(F){return e.enter("htmlTextData"),o(F)}}const ew={name:"labelEnd",resolveAll:YJ,resolveTo:WJ,tokenize:qJ},FJ={tokenize:XJ},GJ={tokenize:ZJ},UJ={tokenize:$J};function YJ(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Tr(e,0,e.length,n),e}function WJ(e,t){let n=e.length,r=0,i,a,o,l;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const s={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[o][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return l=[["enter",s,t],["enter",c,t]],l=Wr(l,e.slice(a+1,a+r+3)),l=Wr(l,[["enter",h,t]]),l=Wr(l,Wg(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),l=Wr(l,[["exit",h,t],e[o-2],e[o-1],["exit",c,t]]),l=Wr(l,e.slice(o+1)),l=Wr(l,[["exit",s,t]]),Tr(e,a,e.length,l),e}function qJ(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return l;function l(v){return a?a._inactive?d(v):(o=r.parser.defined.includes(gi(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),s):n(v)}function s(v){return v===40?e.attempt(FJ,h,o?h:d)(v):v===91?e.attempt(GJ,h,o?c:d)(v):o?h(v):d(v)}function c(v){return e.attempt(UJ,h,d)(v)}function h(v){return t(v)}function d(v){return a._balanced=!0,n(v)}}function XJ(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Ie(d)?$f(e,a)(d):a(d)}function a(d){return d===41?h(d):f3(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return Ie(d)?$f(e,s)(d):h(d)}function l(d){return n(d)}function s(d){return d===34||d===39||d===40?d3(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function c(d){return Ie(d)?$f(e,h)(d):h(d)}function h(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function ZJ(e,t,n){const r=this;return i;function i(l){return h3.call(r,e,a,o,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(gi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function o(l){return n(l)}}function $J(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const QJ={name:"labelStartImage",resolveAll:ew.resolveAll,tokenize:KJ};function KJ(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),o):n(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const JJ={name:"labelStartLink",resolveAll:ew.resolveAll,tokenize:ttt};function ttt(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const ax={name:"lineEnding",tokenize:ett};function ett(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),de(e,t,"linePrefix")}}const bp={name:"thematicBreak",tokenize:ntt};function ntt(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,l(c)}function l(c){return c===i?(e.enter("thematicBreakSequence"),s(c)):r>=3&&(c===null||Nt(c))?(e.exit("thematicBreak"),t(c)):n(c)}function s(c){return c===i?(e.consume(c),r++,s):(e.exit("thematicBreakSequence"),re(c)?de(e,l,"whitespace")(c):l(c))}}const ir={continuation:{tokenize:ott},exit:stt,name:"list",tokenize:att},rtt={partial:!0,tokenize:utt},itt={partial:!0,tokenize:ltt};function att(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return l;function l(g){const m=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:r_(g)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(bp,n,c)(g):c(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(g)}return n(g)}function s(g){return r_(g)&&++o<10?(e.consume(g),s):(!r.interrupt||o<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),c(g)):n(g)}function c(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Vh,r.interrupt?n:h,e.attempt(rtt,v,d))}function h(g){return r.containerState.initialBlankLine=!0,a++,v(g)}function d(g){return re(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),v):n(g)}function v(g){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function ott(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Vh,i,a);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,de(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!re(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(itt,t,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,de(e,e.attempt(ir,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function ltt(e,t,n){const r=this;return de(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function stt(e){e.exit(this.containerState.type)}function utt(e,t,n){const r=this;return de(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!re(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const PE={name:"setextUnderline",resolveTo:ctt,tokenize:ftt};function ctt(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function ftt(e,t,n){const r=this;let i;return a;function a(c){let h=r.events.length,d;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){d=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===i?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),re(c)?de(e,s,"lineSuffix")(c):s(c))}function s(c){return c===null||Nt(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const htt={tokenize:dtt};function dtt(e){const t=this,n=e.attempt(Vh,r,e.attempt(this.parser.constructs.flowInitial,i,de(e,e.attempt(this.parser.constructs.flow,i,e.attempt(yJ,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const vtt={resolveAll:p3()},ptt=v3("string"),gtt=v3("text");function v3(e){return{resolveAll:p3(e==="text"?mtt:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,l);return o;function o(h){return c(h)?a(h):l(h)}function l(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),s}function s(h){return c(h)?(n.exit("data"),a(h)):(n.consume(h),s)}function c(h){if(h===null)return!0;const d=i[h];let v=-1;if(d)for(;++v<d.length;){const g=d[v];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function p3(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function mtt(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,o=-1,l=0,s;for(;a--;){const c=i[a];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(c===-2)s=!0,l++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const c={type:n===e.length||s||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const ytt={42:ir,43:ir,45:ir,48:ir,49:ir,50:ir,51:ir,52:ir,53:ir,54:ir,55:ir,56:ir,57:ir,62:l3},xtt={91:wJ},btt={[-2]:ix,[-1]:ix,32:ix},_tt={35:kJ,42:bp,45:[PE,bp],60:IJ,61:PE,95:bp,96:BE,126:BE},Stt={38:u3,92:s3},wtt={[-5]:ax,[-4]:ax,[-3]:ax,33:QJ,38:u3,42:i_,60:[JK,VJ],91:JJ,92:[AJ,s3],93:ew,95:i_,96:hJ},Ttt={null:[i_,vtt]},Ctt={null:[42,95]},Mtt={null:[]},Att=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Ctt,contentInitial:xtt,disable:Mtt,document:ytt,flow:_tt,flowInitial:btt,insideSpan:Ttt,string:Stt,text:wtt},Symbol.toStringTag,{value:"Module"}));function Dtt(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],l=[];const s={attempt:L(D),check:L(M),consume:S,enter:w,exit:A,interrupt:L(M,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:m,parser:e,previous:null,sliceSerialize:v,sliceStream:g,write:d};let h=t.tokenize.call(c,s);return t.resolveAll&&a.push(t),c;function d(O){return o=Wr(o,O),_(),o[o.length-1]!==null?[]:(I(t,0),c.events=Wg(a,c.events,c),c.events)}function v(O,j){return Ltt(g(O),j)}function g(O){return ktt(o,O)}function m(){const{_bufferIndex:O,_index:j,line:B,column:U,offset:W}=r;return{_bufferIndex:O,_index:j,line:B,column:U,offset:W}}function x(O){i[O.line]=O.column,E()}function _(){let O;for(;r._index<o.length;){const j=o[r._index];if(typeof j=="string")for(O=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===O&&r._bufferIndex<j.length;)b(j.charCodeAt(r._bufferIndex));else b(j)}}function b(O){h=h(O)}function S(O){Nt(O)?(r.line++,r.column=1,r.offset+=O===-3?2:1,E()):O!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=O}function w(O,j){const B=j||{};return B.type=O,B.start=m(),c.events.push(["enter",B,c]),l.push(B),B}function A(O){const j=l.pop();return j.end=m(),c.events.push(["exit",j,c]),j}function D(O,j){I(O,j.from)}function M(O,j){j.restore()}function L(O,j){return B;function B(U,W,H){let q,X,J,F;return Array.isArray(U)?Z(U):"tokenize"in U?Z([U]):Y(U);function Y(gt){return wt;function wt(pt){const vt=pt!==null&>[pt],Dt=pt!==null&>.null,yt=[...Array.isArray(vt)?vt:vt?[vt]:[],...Array.isArray(Dt)?Dt:Dt?[Dt]:[]];return Z(yt)(pt)}}function Z(gt){return q=gt,X=0,gt.length===0?H:V(gt[X])}function V(gt){return wt;function wt(pt){return F=N(),J=gt,gt.partial||(c.currentConstruct=gt),gt.name&&c.parser.constructs.disable.null.includes(gt.name)?ut():gt.tokenize.call(j?Object.assign(Object.create(c),j):c,s,tt,ut)(pt)}}function tt(gt){return O(J,F),W}function ut(gt){return F.restore(),++X<q.length?V(q[X]):H}}}function I(O,j){O.resolveAll&&!a.includes(O)&&a.push(O),O.resolve&&Tr(c.events,j,c.events.length-j,O.resolve(c.events.slice(j),c)),O.resolveTo&&(c.events=O.resolveTo(c.events,c))}function N(){const O=m(),j=c.previous,B=c.currentConstruct,U=c.events.length,W=Array.from(l);return{from:U,restore:H};function H(){r=O,c.previous=j,c.currentConstruct=B,c.events.length=U,l=W,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ktt(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Ltt(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
|
|
134
|
+
`;break}case-3:{o=`\r
|
|
135
|
+
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}function Ett(e){const r={constructs:a3([Att,...(e||{}).extensions||[]]),content:i(WK),defined:[],document:i(XK),flow:i(htt),lazy:{},string:i(ptt),text:i(gtt)};return r;function i(a){return o;function o(l){return Dtt(r,a,l)}}}function Rtt(e){for(;!c3(e););return e}const HE=/[\0\t\n\r]/g;function Itt(){let e=1,t="",n=!0,r;return i;function i(a,o,l){const s=[];let c,h,d,v,g;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(HE.lastIndex=d,c=HE.exec(a),v=c&&c.index!==void 0?c.index:a.length,g=a.charCodeAt(v),!c){t=a.slice(d);break}if(g===10&&d===v&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),d<v&&(s.push(a.slice(d,v)),e+=v-d),g){case 0:{s.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,s.push(-2);e++<h;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}d=v+1}return l&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const Ott=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ztt(e){return e.replace(Ott,Btt)}function Btt(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return o3(n.slice(a?2:1),a?16:10)}return tw(n)||e}const g3={}.hasOwnProperty;function Ntt(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Ptt(n)(Rtt(Ett(n).document().write(Itt()(e,t,!0))))}function Ptt(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(An),autolinkProtocol:N,autolinkEmail:N,atxHeading:a(fe),blockQuote:a(Dt),characterEscape:N,characterReference:N,codeFenced:a(yt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(yt,o),codeText:a(Mt,o),codeTextData:N,data:N,codeFlowValue:N,definition:a(_e),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Jt),hardBreakEscape:a(Ae),hardBreakTrailing:a(Ae),htmlFlow:a(Je,o),htmlFlowData:N,htmlText:a(Je,o),htmlTextData:N,image:a(fr),label:o,link:a(An),listItem:a(Zi),listItemValue:v,listOrdered:a(ni,d),listUnordered:a(ni),paragraph:a(Vo),reference:V,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(fe),strong:a($g),thematicBreak:a(Qg)},exit:{atxHeading:s(),atxHeadingSequence:D,autolink:s(),autolinkEmail:vt,autolinkProtocol:pt,blockQuote:s(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ut,characterReferenceMarkerNumeric:ut,characterReferenceValue:gt,characterReference:wt,codeFenced:s(_),codeFencedFence:x,codeFencedFenceInfo:g,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:s(b),codeText:s(W),codeTextData:E,data:E,definition:s(),definitionDestinationString:A,definitionLabelString:S,definitionTitleString:w,emphasis:s(),hardBreakEscape:s(j),hardBreakTrailing:s(j),htmlFlow:s(B),htmlFlowData:E,htmlText:s(U),htmlTextData:E,image:s(q),label:J,labelText:X,lineEnding:O,link:s(H),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:tt,resourceDestinationString:F,resourceTitleString:Y,resource:Z,setextHeading:s(I),setextHeadingLineSequence:L,setextHeadingText:M,strong:s(),thematicBreak:s()}};m3(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ct){let _t={type:"root",children:[]};const jt={stack:[_t],tokenStack:[],config:t,enter:l,exit:c,buffer:o,resume:h,data:n},te=[];let Se=-1;for(;++Se<ct.length;)if(ct[Se][1].type==="listOrdered"||ct[Se][1].type==="listUnordered")if(ct[Se][0]==="enter")te.push(Se);else{const hr=te.pop();Se=i(ct,hr,Se)}for(Se=-1;++Se<ct.length;){const hr=t[ct[Se][0]];g3.call(hr,ct[Se][1].type)&&hr[ct[Se][1].type].call(Object.assign({sliceSerialize:ct[Se][2].sliceSerialize},jt),ct[Se][1])}if(jt.tokenStack.length>0){const hr=jt.tokenStack[jt.tokenStack.length-1];(hr[1]||VE).call(jt,void 0,hr[0])}for(_t.position={start:fo(ct.length>0?ct[0][1].start:{line:1,column:1,offset:0}),end:fo(ct.length>0?ct[ct.length-2][1].end:{line:1,column:1,offset:0})},Se=-1;++Se<t.transforms.length;)_t=t.transforms[Se](_t)||_t;return _t}function i(ct,_t,jt){let te=_t-1,Se=-1,hr=!1,$i,Pn,ln,Zn;for(;++te<=jt;){const Ee=ct[te];switch(Ee[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ee[0]==="enter"?Se++:Se--,Zn=void 0;break}case"lineEndingBlank":{Ee[0]==="enter"&&($i&&!Zn&&!Se&&!ln&&(ln=te),Zn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Zn=void 0}if(!Se&&Ee[0]==="enter"&&Ee[1].type==="listItemPrefix"||Se===-1&&Ee[0]==="exit"&&(Ee[1].type==="listUnordered"||Ee[1].type==="listOrdered")){if($i){let Ea=te;for(Pn=void 0;Ea--;){const ri=ct[Ea];if(ri[1].type==="lineEnding"||ri[1].type==="lineEndingBlank"){if(ri[0]==="exit")continue;Pn&&(ct[Pn][1].type="lineEndingBlank",hr=!0),ri[1].type="lineEnding",Pn=Ea}else if(!(ri[1].type==="linePrefix"||ri[1].type==="blockQuotePrefix"||ri[1].type==="blockQuotePrefixWhitespace"||ri[1].type==="blockQuoteMarker"||ri[1].type==="listItemIndent"))break}ln&&(!Pn||ln<Pn)&&($i._spread=!0),$i.end=Object.assign({},Pn?ct[Pn][1].start:Ee[1].end),ct.splice(Pn||te,0,["exit",$i,Ee[2]]),te++,jt++}if(Ee[1].type==="listItemPrefix"){const Ea={type:"listItem",_spread:!1,start:Object.assign({},Ee[1].start),end:void 0};$i=Ea,ct.splice(te,0,["enter",Ea,Ee[2]]),te++,jt++,ln=void 0,Zn=!0}}}return ct[_t][1]._spread=hr,jt}function a(ct,_t){return jt;function jt(te){l.call(this,ct(te),te),_t&&_t.call(this,te)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(ct,_t,jt){this.stack[this.stack.length-1].children.push(ct),this.stack.push(ct),this.tokenStack.push([_t,jt||void 0]),ct.position={start:fo(_t.start),end:void 0}}function s(ct){return _t;function _t(jt){ct&&ct.call(this,jt),c.call(this,jt)}}function c(ct,_t){const jt=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==ct.type&&(_t?_t.call(this,ct,te[0]):(te[1]||VE).call(this,ct,te[0]));else throw new Error("Cannot close `"+ct.type+"` ("+Zf({start:ct.start,end:ct.end})+"): it’s not open");jt.position.end=fo(ct.end)}function h(){return JS(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function v(ct){if(this.data.expectingFirstListItemValue){const _t=this.stack[this.stack.length-2];_t.start=Number.parseInt(this.sliceSerialize(ct),10),this.data.expectingFirstListItemValue=void 0}}function g(){const ct=this.resume(),_t=this.stack[this.stack.length-1];_t.lang=ct}function m(){const ct=this.resume(),_t=this.stack[this.stack.length-1];_t.meta=ct}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const ct=this.resume(),_t=this.stack[this.stack.length-1];_t.value=ct.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const ct=this.resume(),_t=this.stack[this.stack.length-1];_t.value=ct.replace(/(\r?\n|\r)$/g,"")}function S(ct){const _t=this.resume(),jt=this.stack[this.stack.length-1];jt.label=_t,jt.identifier=gi(this.sliceSerialize(ct)).toLowerCase()}function w(){const ct=this.resume(),_t=this.stack[this.stack.length-1];_t.title=ct}function A(){const ct=this.resume(),_t=this.stack[this.stack.length-1];_t.url=ct}function D(ct){const _t=this.stack[this.stack.length-1];if(!_t.depth){const jt=this.sliceSerialize(ct).length;_t.depth=jt}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function L(ct){const _t=this.stack[this.stack.length-1];_t.depth=this.sliceSerialize(ct).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function N(ct){const jt=this.stack[this.stack.length-1].children;let te=jt[jt.length-1];(!te||te.type!=="text")&&(te=Nn(),te.position={start:fo(ct.start),end:void 0},jt.push(te)),this.stack.push(te)}function E(ct){const _t=this.stack.pop();_t.value+=this.sliceSerialize(ct),_t.position.end=fo(ct.end)}function O(ct){const _t=this.stack[this.stack.length-1];if(this.data.atHardBreak){const jt=_t.children[_t.children.length-1];jt.position.end=fo(ct.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_t.type)&&(N.call(this,ct),E.call(this,ct))}function j(){this.data.atHardBreak=!0}function B(){const ct=this.resume(),_t=this.stack[this.stack.length-1];_t.value=ct}function U(){const ct=this.resume(),_t=this.stack[this.stack.length-1];_t.value=ct}function W(){const ct=this.resume(),_t=this.stack[this.stack.length-1];_t.value=ct}function H(){const ct=this.stack[this.stack.length-1];if(this.data.inReference){const _t=this.data.referenceType||"shortcut";ct.type+="Reference",ct.referenceType=_t,delete ct.url,delete ct.title}else delete ct.identifier,delete ct.label;this.data.referenceType=void 0}function q(){const ct=this.stack[this.stack.length-1];if(this.data.inReference){const _t=this.data.referenceType||"shortcut";ct.type+="Reference",ct.referenceType=_t,delete ct.url,delete ct.title}else delete ct.identifier,delete ct.label;this.data.referenceType=void 0}function X(ct){const _t=this.sliceSerialize(ct),jt=this.stack[this.stack.length-2];jt.label=ztt(_t),jt.identifier=gi(_t).toLowerCase()}function J(){const ct=this.stack[this.stack.length-1],_t=this.resume(),jt=this.stack[this.stack.length-1];if(this.data.inReference=!0,jt.type==="link"){const te=ct.children;jt.children=te}else jt.alt=_t}function F(){const ct=this.resume(),_t=this.stack[this.stack.length-1];_t.url=ct}function Y(){const ct=this.resume(),_t=this.stack[this.stack.length-1];_t.title=ct}function Z(){this.data.inReference=void 0}function V(){this.data.referenceType="collapsed"}function tt(ct){const _t=this.resume(),jt=this.stack[this.stack.length-1];jt.label=_t,jt.identifier=gi(this.sliceSerialize(ct)).toLowerCase(),this.data.referenceType="full"}function ut(ct){this.data.characterReferenceType=ct.type}function gt(ct){const _t=this.sliceSerialize(ct),jt=this.data.characterReferenceType;let te;jt?(te=o3(_t,jt==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=tw(_t);const Se=this.stack[this.stack.length-1];Se.value+=te}function wt(ct){const _t=this.stack.pop();_t.position.end=fo(ct.end)}function pt(ct){E.call(this,ct);const _t=this.stack[this.stack.length-1];_t.url=this.sliceSerialize(ct)}function vt(ct){E.call(this,ct);const _t=this.stack[this.stack.length-1];_t.url="mailto:"+this.sliceSerialize(ct)}function Dt(){return{type:"blockquote",children:[]}}function yt(){return{type:"code",lang:null,meta:null,value:""}}function Mt(){return{type:"inlineCode",value:""}}function _e(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Jt(){return{type:"emphasis",children:[]}}function fe(){return{type:"heading",depth:0,children:[]}}function Ae(){return{type:"break"}}function Je(){return{type:"html",value:""}}function fr(){return{type:"image",title:null,url:"",alt:null}}function An(){return{type:"link",title:null,url:"",children:[]}}function ni(ct){return{type:"list",ordered:ct.type==="listOrdered",start:null,spread:ct._spread,children:[]}}function Zi(ct){return{type:"listItem",spread:ct._spread,checked:null,children:[]}}function Vo(){return{type:"paragraph",children:[]}}function $g(){return{type:"strong",children:[]}}function Nn(){return{type:"text",value:""}}function Qg(){return{type:"thematicBreak"}}}function fo(e){return{line:e.line,column:e.column,offset:e.offset}}function m3(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?m3(e,r):Htt(e,r)}}function Htt(e,t){let n;for(n in t)if(g3.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function VE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Zf({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Zf({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Zf({start:t.start,end:t.end})+") is still open")}function Vtt(e){const t=this;t.parser=n;function n(r){return Ntt(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function jtt(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Ftt(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
136
|
+
`}]}function Gtt(e,t){const n=t.value?t.value+`
|
|
137
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function Utt(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ytt(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Wtt(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ju(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(r,l);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,s);const c={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,c),e.applyData(t,c)}function qtt(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xtt(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function y3(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function Ztt(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return y3(e,t);const i={src:Ju(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function $tt(e,t){const n={src:Ju(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Qtt(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Ktt(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return y3(e,t);const i={href:Ju(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Jtt(e,t){const n={href:Ju(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function tet(e,t,n){const r=e.all(t),i=n?eet(n):x3(t),a={},o=[];if(typeof t.checked=="boolean"){const h=r[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const h=r[l];(i||l!==0||h.type!=="element"||h.tagName!=="p")&&o.push({type:"text",value:`
|
|
138
|
+
`}),h.type==="element"&&h.tagName==="p"&&!i?o.push(...h.children):o.push(h)}const s=r[r.length-1];s&&(i||s.type!=="element"||s.tagName!=="p")&&o.push({type:"text",value:`
|
|
139
|
+
`});const c={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,c),e.applyData(t,c)}function eet(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=x3(n[r])}return t}function x3(e){const t=e.spread;return t??e.children.length>1}function net(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function ret(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iet(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function aet(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oet(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=ZS(t.children[1]),s=KB(t.children[t.children.length-1]);l&&s&&(o.position={start:l,end:s}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function set(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let s=-1;const c=[];for(;++s<l;){const d=t.children[s],v={},g=o?o[s]:void 0;g&&(v.align=g);let m={type:"element",tagName:a,properties:v,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),c.push(m)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,h),e.applyData(t,h)}function uet(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const jE=9,FE=32;function cet(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(GE(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(GE(t.slice(i),i>0,!1)),a.join("")}function GE(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===jE||a===FE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===jE||a===FE;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function fet(e,t){const n={type:"text",value:cet(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function het(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const det={blockquote:jtt,break:Ftt,code:Gtt,delete:Utt,emphasis:Ytt,footnoteReference:Wtt,heading:qtt,html:Xtt,imageReference:Ztt,image:$tt,inlineCode:Qtt,linkReference:Ktt,link:Jtt,listItem:tet,list:net,paragraph:ret,root:iet,strong:aet,table:oet,tableCell:uet,tableRow:set,text:fet,thematicBreak:het,toml:Kv,yaml:Kv,definition:Kv,footnoteDefinition:Kv};function Kv(){}const b3=-1,qg=0,Qf=1,dg=2,nw=3,rw=4,iw=5,aw=6,_3=7,S3=8,UE=typeof self=="object"?self:globalThis,vet=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case qg:case b3:return n(o,i);case Qf:{const l=n([],i);for(const s of o)l.push(r(s));return l}case dg:{const l=n({},i);for(const[s,c]of o)l[r(s)]=r(c);return l}case nw:return n(new Date(o),i);case rw:{const{source:l,flags:s}=o;return n(new RegExp(l,s),i)}case iw:{const l=n(new Map,i);for(const[s,c]of o)l.set(r(s),r(c));return l}case aw:{const l=n(new Set,i);for(const s of o)l.add(r(s));return l}case _3:{const{name:l,message:s}=o;return n(new UE[l](s),i)}case S3:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return n(new DataView(l),o)}}return n(new UE[a](o),i)};return r},YE=e=>vet(new Map,e)(0),du="",{toString:pet}={},{keys:get}=Object,Tf=e=>{const t=typeof e;if(t!=="object"||!e)return[qg,t];const n=pet.call(e).slice(8,-1);switch(n){case"Array":return[Qf,du];case"Object":return[dg,du];case"Date":return[nw,du];case"RegExp":return[rw,du];case"Map":return[iw,du];case"Set":return[aw,du];case"DataView":return[Qf,n]}return n.includes("Array")?[Qf,n]:n.includes("Error")?[_3,n]:[dg,n]},Jv=([e,t])=>e===qg&&(t==="function"||t==="symbol"),met=(e,t,n,r)=>{const i=(o,l)=>{const s=r.push(o)-1;return n.set(l,s),s},a=o=>{if(n.has(o))return n.get(o);let[l,s]=Tf(o);switch(l){case qg:{let h=o;switch(s){case"bigint":l=S3,h=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);h=null;break;case"undefined":return i([b3],o)}return i([l,h],o)}case Qf:{if(s){let v=o;return s==="DataView"?v=new Uint8Array(o.buffer):s==="ArrayBuffer"&&(v=new Uint8Array(o)),i([s,[...v]],o)}const h=[],d=i([l,h],o);for(const v of o)h.push(a(v));return d}case dg:{if(s)switch(s){case"BigInt":return i([s,o.toString()],o);case"Boolean":case"Number":case"String":return i([s,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const h=[],d=i([l,h],o);for(const v of get(o))(e||!Jv(Tf(o[v])))&&h.push([a(v),a(o[v])]);return d}case nw:return i([l,o.toISOString()],o);case rw:{const{source:h,flags:d}=o;return i([l,{source:h,flags:d}],o)}case iw:{const h=[],d=i([l,h],o);for(const[v,g]of o)(e||!(Jv(Tf(v))||Jv(Tf(g))))&&h.push([a(v),a(g)]);return d}case aw:{const h=[],d=i([l,h],o);for(const v of o)(e||!Jv(Tf(v)))&&h.push(a(v));return d}}const{message:c}=o;return i([l,{name:s,message:c}],o)};return a},WE=(e,{json:t,lossy:n}={})=>{const r=[];return met(!(t||n),!!t,new Map,r)(e),r},vg=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?YE(WE(e,t)):structuredClone(e):(e,t)=>YE(WE(e,t));function yet(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function xet(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function bet(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||yet,r=e.options.footnoteBackLabel||xet,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let s=-1;for(;++s<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[s]);if(!c)continue;const h=e.all(c),d=String(c.identifier).toUpperCase(),v=Ju(d.toLowerCase());let g=0;const m=[],x=e.footnoteCounts.get(d);for(;x!==void 0&&++g<=x;){m.length>0&&m.push({type:"text",value:" "});let S=typeof n=="string"?n:n(s,g);typeof S=="string"&&(S={type:"text",value:S}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,g),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const _=h[h.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const S=_.children[_.children.length-1];S&&S.type==="text"?S.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...m)}else h.push(...m);const b={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(h,!0)};e.patch(c,b),l.push(b)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...vg(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
140
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
141
|
+
`}]}}const Xg=(function(e){if(e==null)return Cet;if(typeof e=="function")return Zg(e);if(typeof e=="object")return Array.isArray(e)?_et(e):wet(e);if(typeof e=="string")return Tet(e);throw new Error("Expected function, string, or object as test")});function _et(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Xg(e[n]);return Zg(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function wet(e){const t=e;return Zg(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Tet(e){return Zg(t);function t(n){return n&&n.type===e}}function Zg(e){return t;function t(n,r,i){return!!(Met(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Cet(){return!0}function Met(e){return e!==null&&typeof e=="object"&&"type"in e}const w3=[],Aet=!0,a_=!1,Det="skip";function T3(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Xg(i),o=r?-1:1;l(e,void 0,[])();function l(s,c,h){const d=s&&typeof s=="object"?s:{};if(typeof d.type=="string"){const g=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(s.type+(g?"<"+g+">":""))+")"})}return v;function v(){let g=w3,m,x,_;if((!t||a(s,c,h[h.length-1]||void 0))&&(g=ket(n(s,h)),g[0]===a_))return g;if("children"in s&&s.children){const b=s;if(b.children&&g[0]!==Det)for(x=(r?b.children.length:-1)+o,_=h.concat(b);x>-1&&x<b.children.length;){const S=b.children[x];if(m=l(S,x,_)(),m[0]===a_)return m;x=typeof m[1]=="number"?m[1]:x+o}}return g}}}function ket(e){return Array.isArray(e)?e:typeof e=="number"?[Aet,e]:e==null?w3:[e]}function ow(e,t,n,r){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=r),T3(e,a,l,i);function l(s,c){const h=c[c.length-1],d=h?h.children.indexOf(s):void 0;return o(s,d,h)}}const o_={}.hasOwnProperty,Let={};function Eet(e,t){const n=t||Let,r=new Map,i=new Map,a=new Map,o={...det,...n.handlers},l={all:c,applyData:Iet,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:s,options:n,patch:Ret,wrap:zet};return ow(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?r:i,v=String(h.identifier).toUpperCase();d.has(v)||d.set(v,h)}}),l;function s(h,d){const v=h.type,g=l.handlers[v];if(o_.call(l.handlers,v)&&g)return g(l,h,d);if(l.options.passThrough&&l.options.passThrough.includes(v)){if("children"in h){const{children:x,..._}=h,b=vg(_);return b.children=l.all(h),b}return vg(h)}return(l.options.unknownHandler||Oet)(l,h,d)}function c(h){const d=[];if("children"in h){const v=h.children;let g=-1;for(;++g<v.length;){const m=l.one(v[g],h);if(m){if(g&&v[g-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=qE(m.value)),!Array.isArray(m)&&m.type==="element")){const x=m.children[0];x&&x.type==="text"&&(x.value=qE(x.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function Ret(e,t){e.position&&(t.position=yK(e))}function Iet(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&a&&Object.assign(n.properties,vg(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Oet(e,t){const n=t.data||{},r="value"in t&&!(o_.call(n,"hProperties")||o_.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function zet(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
142
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
143
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
144
|
+
`}),n}function qE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function XE(e,t){const n=Eet(e,t),r=n.one(e,void 0),i=bet(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
145
|
+
`},i),a}function Bet(e,t){return e&&"run"in e?async function(n,r){const i=XE(n,{file:r,...t});await e.run(i,r)}:function(n,r){return XE(n,{file:r,...e||t})}}function ZE(e){if(e)throw e}var ox,$E;function Net(){if($E)return ox;$E=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!d)return!1;var v;for(v in c);return typeof v>"u"||e.call(c,v)},o=function(c,h){n&&h.name==="__proto__"?n(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},l=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(r)return r(c,h).value}else return;return c[h]};return ox=function s(){var c,h,d,v,g,m,x=arguments[0],_=1,b=arguments.length,S=!1;for(typeof x=="boolean"&&(S=x,x=arguments[1]||{},_=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});_<b;++_)if(c=arguments[_],c!=null)for(h in c)d=l(x,h),v=l(c,h),x!==v&&(S&&v&&(a(v)||(g=i(v)))?(g?(g=!1,m=d&&i(d)?d:[]):m=d&&a(d)?d:{},o(x,{name:h,newValue:s(S,m,v)})):typeof v<"u"&&o(x,{name:h,newValue:v}));return x},ox}var Pet=Net();const lx=TR(Pet);function l_(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Het(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...i);function l(s,...c){const h=e[++a];let d=-1;if(s){o(s);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,h?Vet(h,l)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Vet(e,t){let n;return r;function r(...o){const l=e.length>o.length;let s;l&&o.push(i);try{s=e.apply(this,o)}catch(c){const h=c;if(l&&n)throw h;return i(h)}l||(s&&s.then&&typeof s.then=="function"?s.then(a,i):s instanceof Error?i(s):a(s))}function i(o,...l){n||(n=!0,t(o,...l))}function a(o){i(null,o)}}const Ii={basename:jet,dirname:Fet,extname:Get,join:Uet,sep:"/"};function jet(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');jh(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Fet(e){if(jh(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Get(e){jh(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),l===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Uet(...e){let t=-1,n;for(;++t<e.length;)jh(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Yet(n)}function Yet(e){jh(e);const t=e.codePointAt(0)===47;let n=Wet(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Wet(e,t){let n="",r=0,i=-1,a=0,o=-1,l,s;for(;++o<=e.length;){if(o<e.length)l=e.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else l===46&&a>-1?a++:a=-1}return n}function jh(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const qet={cwd:Xet};function Xet(){return"/"}function s_(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Zet(e){if(typeof e=="string")e=new URL(e);else if(!s_(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return $et(e)}function $et(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const sx=["history","path","basename","stem","extname","dirname"];class C3{constructor(t){let n;t?s_(t)?n={path:t}:typeof t=="string"||Qet(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":qet.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<sx.length;){const a=sx[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)sx.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ii.basename(this.path):void 0}set basename(t){cx(t,"basename"),ux(t,"basename"),this.path=Ii.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ii.dirname(this.path):void 0}set dirname(t){QE(this.basename,"dirname"),this.path=Ii.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ii.extname(this.path):void 0}set extname(t){if(ux(t,"extname"),QE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ii.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){s_(t)&&(t=Zet(t)),cx(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ii.basename(this.path,this.extname):void 0}set stem(t){cx(t,"stem"),ux(t,"stem"),this.path=Ii.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Bn(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ux(e,t){if(e&&e.includes(Ii.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ii.sep+"`")}function cx(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function QE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Qet(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ket=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),Jet={}.hasOwnProperty;class lw extends Ket{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Het()}copy(){const t=new lw;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(lx(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(dx("data",this.frozen),this.namespace[t]=n,this):Jet.call(this.namespace,t)&&this.namespace[t]||void 0:t?(dx("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=tp(t),r=this.parser||this.Parser;return fx("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),fx("process",this.parser||this.Parser),hx("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const l=tp(t),s=r.parse(l);r.run(s,l,function(h,d,v){if(h||!d||!v)return c(h);const g=d,m=r.stringify(g,v);nnt(m)?v.value=m:v.result=m,c(h,v)});function c(h,d){h||!d?o(h):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),fx("processSync",this.parser||this.Parser),hx("processSync",this.compiler||this.Compiler),this.process(t,i),JE("processSync","process",n),r;function i(a,o){n=!0,ZE(a),r=o}}run(t,n,r){KE(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,l){const s=tp(n);i.run(t,s,c);function c(h,d,v){const g=d||t;h?l(h):o?o(g):r(void 0,g,v)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),JE("runSync","run",r),i;function a(o,l){ZE(o),i=l,r=!0}}stringify(t,n){this.freeze();const r=tp(n),i=this.compiler||this.Compiler;return hx("stringify",i),KE(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(dx("use",this.frozen),t!=null)if(typeof t=="function")s(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")s(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[h,...d]=c;s(h,d)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(c.plugins),c.settings&&(i.settings=lx(!0,i.settings,c.settings))}function l(c){let h=-1;if(c!=null)if(Array.isArray(c))for(;++h<c.length;){const d=c[h];a(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function s(c,h){let d=-1,v=-1;for(;++d<r.length;)if(r[d][0]===c){v=d;break}if(v===-1)r.push([c,...h]);else if(h.length>0){let[g,...m]=h;const x=r[v][1];l_(x)&&l_(g)&&(g=lx(!0,x,g)),r[v]=[c,g,...m]}}}}const tnt=new lw().freeze();function fx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function hx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function dx(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function KE(e){if(!l_(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function JE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function tp(e){return ent(e)?e:new C3(e)}function ent(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function nnt(e){return typeof e=="string"||rnt(e)}function rnt(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const int="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",tR=[],eR={allowDangerousHtml:!0},ant=/^(https?|ircs?|mailto|xmpp)$/i,ont=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function lnt(e){const t=snt(e),n=unt(e);return cnt(t.runSync(t.parse(n),n),e)}function snt(e){const t=e.rehypePlugins||tR,n=e.remarkPlugins||tR,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...eR}:eR;return tnt().use(Vtt).use(n).use(Bet,r).use(t)}function unt(e){const t=e.children||"",n=new C3;return typeof t=="string"&&(n.value=t),n}function cnt(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,s=t.urlTransform||fnt;for(const h of ont)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+int+h.id,void 0);return ow(e,c),wK(e,{Fragment:k.Fragment,components:i,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0});function c(h,d,v){if(h.type==="raw"&&v&&typeof d=="number")return o?v.children.splice(d,1):v.children[d]={type:"text",value:h.value},d;if(h.type==="element"){let g;for(g in rx)if(Object.hasOwn(rx,g)&&Object.hasOwn(h.properties,g)){const m=h.properties[g],x=rx[g];(x===null||x.includes(h.tagName))&&(h.properties[g]=s(String(m||""),g,h))}}if(h.type==="element"){let g=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!g&&r&&typeof d=="number"&&(g=!r(h,d,v)),g&&v&&typeof d=="number")return l&&h.children?v.children.splice(d,1,...h.children):v.children.splice(d,1),d}}}function fnt(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||ant.test(e.slice(0,t))?e:""}function nR(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function hnt(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function dnt(e,t,n){const i=Xg((n||{}).ignore||[]),a=vnt(t);let o=-1;for(;++o<a.length;)T3(e,"text",l);function l(c,h){let d=-1,v;for(;++d<h.length;){const g=h[d],m=v?v.children:void 0;if(i(g,m?m.indexOf(g):void 0,v))return;v=g}if(v)return s(c,h)}function s(c,h){const d=h[h.length-1],v=a[o][0],g=a[o][1];let m=0;const _=d.children.indexOf(c);let b=!1,S=[];v.lastIndex=0;let w=v.exec(c.value);for(;w;){const A=w.index,D={index:w.index,input:w.input,stack:[...h,c]};let M=g(...w,D);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?v.lastIndex=A+1:(m!==A&&S.push({type:"text",value:c.value.slice(m,A)}),Array.isArray(M)?S.push(...M):M&&S.push(M),m=A+w[0].length,b=!0),!v.global)break;w=v.exec(c.value)}return b?(m<c.value.length&&S.push({type:"text",value:c.value.slice(m)}),d.children.splice(_,1,...S)):S=[c],_+S.length}}function vnt(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([pnt(i[0]),gnt(i[1])])}return t}function pnt(e){return typeof e=="string"?new RegExp(hnt(e),"g"):e}function gnt(e){return typeof e=="function"?e:function(){return e}}const vx="phrasing",px=["autolink","link","image","label"];function mnt(){return{transforms:[Tnt],enter:{literalAutolink:xnt,literalAutolinkEmail:gx,literalAutolinkHttp:gx,literalAutolinkWww:gx},exit:{literalAutolink:wnt,literalAutolinkEmail:Snt,literalAutolinkHttp:bnt,literalAutolinkWww:_nt}}}function ynt(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:vx,notInConstruct:px},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:vx,notInConstruct:px},{character:":",before:"[ps]",after:"\\/",inConstruct:vx,notInConstruct:px}]}}function xnt(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function gx(e){this.config.enter.autolinkProtocol.call(this,e)}function bnt(e){this.config.exit.autolinkProtocol.call(this,e)}function _nt(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Snt(e){this.config.exit.autolinkEmail.call(this,e)}function wnt(e){this.exit(e)}function Tnt(e){dnt(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Cnt],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Mnt]],{ignore:["link","linkReference"]})}function Cnt(e,t,n,r,i){let a="";if(!M3(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!Ant(n)))return!1;const o=Dnt(n+r);if(!o[0])return!1;const l={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[l,{type:"text",value:o[1]}]:l}function Mnt(e,t,n,r){return!M3(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Ant(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Dnt(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=nR(e,"(");let a=nR(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function M3(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||rs(n)||Yg(n))&&(!t||n!==47)}A3.peek=Nnt;function knt(){this.buffer()}function Lnt(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Ent(){this.buffer()}function Rnt(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Int(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ont(e){this.exit(e)}function znt(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Bnt(e){this.exit(e)}function Nnt(){return"["}function A3(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),l=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),o(),a+=i.move("]"),a}function Pnt(){return{enter:{gfmFootnoteCallString:knt,gfmFootnoteCall:Lnt,gfmFootnoteDefinitionLabelString:Ent,gfmFootnoteDefinition:Rnt},exit:{gfmFootnoteCallString:Int,gfmFootnoteCall:Ont,gfmFootnoteDefinitionLabelString:znt,gfmFootnoteDefinition:Bnt}}}function Hnt(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:A3},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,o){const l=a.createTracker(o);let s=l.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return s+=l.move(a.safe(a.associationId(r),{before:s,after:"]"})),h(),s+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),s+=l.move((t?`
|
|
146
|
+
`:" ")+a.indentLines(a.containerFlow(r,l.current()),t?D3:Vnt))),c(),s}}function Vnt(e,t,n){return t===0?e:D3(e,t,n)}function D3(e,t,n){return(n?"":" ")+e}const jnt=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];k3.peek=Wnt;function Fnt(){return{canContainEols:["delete"],enter:{strikethrough:Unt},exit:{strikethrough:Ynt}}}function Gnt(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:jnt}],handlers:{delete:k3}}}function Unt(e){this.enter({type:"delete",children:[]},e)}function Ynt(e){this.exit(e)}function k3(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function Wnt(){return"~"}function qnt(e){return e.length}function Xnt(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||qnt,a=[],o=[],l=[],s=[];let c=0,h=-1;for(;++h<e.length;){const x=[],_=[];let b=-1;for(e[h].length>c&&(c=e[h].length);++b<e[h].length;){const S=Znt(e[h][b]);if(n.alignDelimiters!==!1){const w=i(S);_[b]=w,(s[b]===void 0||w>s[b])&&(s[b]=w)}x.push(S)}o[h]=x,l[h]=_}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)a[d]=rR(r[d]);else{const x=rR(r);for(;++d<c;)a[d]=x}d=-1;const v=[],g=[];for(;++d<c;){const x=a[d];let _="",b="";x===99?(_=":",b=":"):x===108?_=":":x===114&&(b=":");let S=n.alignDelimiters===!1?1:Math.max(1,s[d]-_.length-b.length);const w=_+"-".repeat(S)+b;n.alignDelimiters!==!1&&(S=_.length+S+b.length,S>s[d]&&(s[d]=S),g[d]=S),v[d]=w}o.splice(1,0,v),l.splice(1,0,g),h=-1;const m=[];for(;++h<o.length;){const x=o[h],_=l[h];d=-1;const b=[];for(;++d<c;){const S=x[d]||"";let w="",A="";if(n.alignDelimiters!==!1){const D=s[d]-(_[d]||0),M=a[d];M===114?w=" ".repeat(D):M===99?D%2?(w=" ".repeat(D/2+.5),A=" ".repeat(D/2-.5)):(w=" ".repeat(D/2),A=w):A=" ".repeat(D)}n.delimiterStart!==!1&&!d&&b.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&S==="")&&(n.delimiterStart!==!1||d)&&b.push(" "),n.alignDelimiters!==!1&&b.push(w),b.push(S),n.alignDelimiters!==!1&&b.push(A),n.padding!==!1&&b.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&b.push("|")}m.push(n.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return m.join(`
|
|
147
|
+
`)}function Znt(e){return e==null?"":String(e)}function rR(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function $nt(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),Qnt);return i(),o}function Qnt(e,t,n){return">"+(n?"":" ")+e}function Knt(e,t){return iR(e,t.inConstruct,!0)&&!iR(e,t.notInConstruct,!1)}function iR(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function aR(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
148
|
+
`&&Knt(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
149
|
+
`}function Jnt(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function trt(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function ert(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function nrt(e,t,n,r){const i=ert(n),a=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(trt(e,n)){const d=n.enter("codeIndented"),v=n.indentLines(a,rrt);return d(),v}const l=n.createTracker(r),s=i.repeat(Math.max(Jnt(a,i)+1,3)),c=n.enter("codeFenced");let h=l.move(s);if(e.lang){const d=n.enter(`codeFencedLang${o}`);h+=l.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${o}`);h+=l.move(" "),h+=l.move(n.safe(e.meta,{before:h,after:`
|
|
150
|
+
`,encode:["`"],...l.current()})),d()}return h+=l.move(`
|
|
151
|
+
`),a&&(h+=l.move(a+`
|
|
152
|
+
`)),h+=l.move(s),c(),h}function rrt(e,t,n){return(n?"":" ")+e}function sw(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function irt(e,t,n,r){const i=sw(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let l=n.enter("label");const s=n.createTracker(r);let c=s.move("[");return c+=s.move(n.safe(n.associationId(e),{before:c,after:"]",...s.current()})),c+=s.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
153
|
+
`,...s.current()}))),l(),e.title&&(l=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),l()),o(),c}function art(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ch(e){return"&#x"+e.toString(16).toUpperCase()+";"}function pg(e,t,n){const r=Fu(e),i=Fu(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}L3.peek=ort;function L3(e,t,n,r){const i=art(n),a=n.enter("emphasis"),o=n.createTracker(r),l=o.move(i);let s=o.move(n.containerPhrasing(e,{after:i,before:l,...o.current()}));const c=s.charCodeAt(0),h=pg(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(s=Ch(c)+s.slice(1));const d=s.charCodeAt(s.length-1),v=pg(r.after.charCodeAt(0),d,i);v.inside&&(s=s.slice(0,-1)+Ch(d));const g=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:v.outside,before:h.outside},l+s+g}function ort(e,t,n){return n.options.emphasis||"*"}function lrt(e,t){let n=!1;return ow(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,a_}),!!((!e.depth||e.depth<3)&&JS(e)&&(t.options.setext||n))}function srt(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(lrt(e,n)){const h=n.enter("headingSetext"),d=n.enter("phrasing"),v=n.containerPhrasing(e,{...a.current(),before:`
|
|
154
|
+
`,after:`
|
|
155
|
+
`});return d(),h(),v+`
|
|
156
|
+
`+(i===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
|
|
157
|
+
`))+1))}const o="#".repeat(i),l=n.enter("headingAtx"),s=n.enter("phrasing");a.move(o+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
158
|
+
`,...a.current()});return/^[\t ]/.test(c)&&(c=Ch(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),s(),l(),c}E3.peek=urt;function E3(e){return e.value||""}function urt(){return"<"}R3.peek=crt;function R3(e,t,n,r){const i=sw(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let l=n.enter("label");const s=n.createTracker(r);let c=s.move("![");return c+=s.move(n.safe(e.alt,{before:c,after:"]",...s.current()})),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),l()),c+=s.move(")"),o(),c}function crt(){return"!"}I3.peek=frt;function I3(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const l=n.createTracker(r);let s=l.move("![");const c=n.safe(e.alt,{before:s,after:"]",...l.current()});s+=l.move(c+"]["),o();const h=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:s,after:"]",...l.current()});return o(),n.stack=h,a(),i==="full"||!c||c!==d?s+=l.move(d+"]"):i==="shortcut"?s=s.slice(0,-1):s+=l.move("]"),s}function frt(){return"!"}O3.peek=hrt;function O3(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const o=n.unsafe[a],l=n.compilePattern(o);let s;if(o.atBreak)for(;s=l.exec(r);){let c=s.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(s.index+1)}}return i+r+i}function hrt(){return"`"}function z3(e,t){const n=JS(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}B3.peek=drt;function B3(e,t,n,r){const i=sw(n),a=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let l,s;if(z3(e,n)){const h=n.stack;n.stack=[],l=n.enter("autolink");let d=o.move("<");return d+=o.move(n.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),l(),n.stack=h,d}l=n.enter("link"),s=n.enter("label");let c=o.move("[");return c+=o.move(n.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(s=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),s()),c+=o.move(")"),l(),c}function drt(e,t,n){return z3(e,n)?"<":"["}N3.peek=vrt;function N3(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const l=n.createTracker(r);let s=l.move("[");const c=n.containerPhrasing(e,{before:s,after:"]",...l.current()});s+=l.move(c+"]["),o();const h=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:s,after:"]",...l.current()});return o(),n.stack=h,a(),i==="full"||!c||c!==d?s+=l.move(d+"]"):i==="shortcut"?s=s.slice(0,-1):s+=l.move("]"),s}function vrt(){return"["}function uw(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function prt(e){const t=uw(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function grt(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function P3(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function mrt(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?grt(n):uw(n);const l=e.ordered?o==="."?")":".":prt(n);let s=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(s=!0),P3(n)===o&&h){let d=-1;for(;++d<e.children.length;){const v=e.children[d];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(o=l),n.bulletCurrent=o;const c=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),c}function yrt(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function xrt(e,t,n,r){const i=yrt(n);let a=n.bulletCurrent||uw(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(o-a.length)),l.shift(o);const s=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,l.current()),h);return s(),c;function h(d,v,g){return v?(g?"":" ".repeat(o))+d:(g?a:a+" ".repeat(o-a.length))+d}}function brt(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o}const _rt=Xg(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Srt(e,t,n,r){return(e.children.some(function(o){return _rt(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function wrt(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}H3.peek=Trt;function H3(e,t,n,r){const i=wrt(n),a=n.enter("strong"),o=n.createTracker(r),l=o.move(i+i);let s=o.move(n.containerPhrasing(e,{after:i,before:l,...o.current()}));const c=s.charCodeAt(0),h=pg(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(s=Ch(c)+s.slice(1));const d=s.charCodeAt(s.length-1),v=pg(r.after.charCodeAt(0),d,i);v.inside&&(s=s.slice(0,-1)+Ch(d));const g=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:v.outside,before:h.outside},l+s+g}function Trt(e,t,n){return n.options.strong||"*"}function Crt(e,t,n,r){return n.safe(e.value,r)}function Mrt(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Art(e,t,n){const r=(P3(n)+(n.options.ruleSpaces?" ":"")).repeat(Mrt(n));return n.options.ruleSpaces?r.slice(0,-1):r}const V3={blockquote:$nt,break:aR,code:nrt,definition:irt,emphasis:L3,hardBreak:aR,heading:srt,html:E3,image:R3,imageReference:I3,inlineCode:O3,link:B3,linkReference:N3,list:mrt,listItem:xrt,paragraph:brt,root:Srt,strong:H3,text:Crt,thematicBreak:Art};function Drt(){return{enter:{table:krt,tableData:oR,tableHeader:oR,tableRow:Ert},exit:{codeText:Rrt,table:Lrt,tableData:mx,tableHeader:mx,tableRow:mx}}}function krt(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Lrt(e){this.exit(e),this.data.inTable=void 0}function Ert(e){this.enter({type:"tableRow",children:[]},e)}function mx(e){this.exit(e)}function oR(e){this.enter({type:"tableCell",children:[]},e)}function Rrt(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Irt));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Irt(e,t){return t==="|"?t:e}function Ort(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
159
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:o,tableCell:s,tableRow:l}};function o(g,m,x,_){return c(h(g,x,_),g.align)}function l(g,m,x,_){const b=d(g,x,_),S=c([b]);return S.slice(0,S.indexOf(`
|
|
160
|
+
`))}function s(g,m,x,_){const b=x.enter("tableCell"),S=x.enter("phrasing"),w=x.containerPhrasing(g,{..._,before:a,after:a});return S(),b(),w}function c(g,m){return Xnt(g,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function h(g,m,x){const _=g.children;let b=-1;const S=[],w=m.enter("table");for(;++b<_.length;)S[b]=d(_[b],m,x);return w(),S}function d(g,m,x){const _=g.children;let b=-1;const S=[],w=m.enter("tableRow");for(;++b<_.length;)S[b]=s(_[b],g,m,x);return w(),S}function v(g,m,x){let _=V3.inlineCode(g,m,x);return x.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function zrt(){return{exit:{taskListCheckValueChecked:lR,taskListCheckValueUnchecked:lR,paragraph:Nrt}}}function Brt(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Prt}}}function lR(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Nrt(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){o=l;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Prt(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(o);let s=V3.listItem(e,t,n,{...r,...l.current()});return a&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),s;function c(h){return h+o}}function Hrt(){return[mnt(),Pnt(),Fnt(),Drt(),zrt()]}function Vrt(e){return{extensions:[ynt(),Hnt(e),Gnt(),Ort(e),Brt()]}}const jrt={tokenize:qrt,partial:!0},j3={tokenize:Xrt,partial:!0},F3={tokenize:Zrt,partial:!0},G3={tokenize:$rt,partial:!0},Frt={tokenize:Qrt,partial:!0},U3={name:"wwwAutolink",tokenize:Yrt,previous:W3},Y3={name:"protocolAutolink",tokenize:Wrt,previous:q3},La={name:"emailAutolink",tokenize:Urt,previous:X3},Xi={};function Grt(){return{text:Xi}}let kl=48;for(;kl<123;)Xi[kl]=La,kl++,kl===58?kl=65:kl===91&&(kl=97);Xi[43]=La;Xi[45]=La;Xi[46]=La;Xi[95]=La;Xi[72]=[La,Y3];Xi[104]=[La,Y3];Xi[87]=[La,U3];Xi[119]=[La,U3];function Urt(e,t,n){const r=this;let i,a;return o;function o(d){return!u_(d)||!X3.call(r,r.previous)||cw(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return u_(d)?(e.consume(d),l):d===64?(e.consume(d),s):n(d)}function s(d){return d===46?e.check(Frt,h,c)(d):d===45||d===95||Rn(d)?(a=!0,e.consume(d),s):h(d)}function c(d){return e.consume(d),i=!0,s}function h(d){return a&&i&&Gn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function Yrt(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!W3.call(r,r.previous)||cw(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(jrt,e.attempt(j3,e.attempt(F3,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function Wrt(e,t,n){const r=this;let i="",a=!1;return o;function o(d){return(d===72||d===104)&&q3.call(r,r.previous)&&!cw(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(Gn(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const v=i.toLowerCase();if(v==="http"||v==="https")return e.consume(d),s}return n(d)}function s(d){return d===47?(e.consume(d),a?c:(a=!0,s)):n(d)}function c(d){return d===null||hg(d)||Ie(d)||rs(d)||Yg(d)?n(d):e.attempt(j3,e.attempt(F3,h),n)(d)}function h(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function qrt(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function Xrt(e,t,n){let r,i,a;return o;function o(c){return c===46||c===95?e.check(G3,s,l)(c):c===null||Ie(c)||rs(c)||c!==45&&Yg(c)?s(c):(a=!0,e.consume(c),o)}function l(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),o}function s(c){return i||r||!a?n(c):t(c)}}function Zrt(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(G3,t,a)(o):o===null||Ie(o)||rs(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function $rt(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),i):l===60||l===null||Ie(l)||rs(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||Ie(l)||rs(l)?t(l):r(l)}function a(l){return Gn(l)?o(l):n(l)}function o(l){return l===59?(e.consume(l),r):Gn(l)?(e.consume(l),o):n(l)}}function Qrt(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Rn(a)?n(a):t(a)}}function W3(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ie(e)}function q3(e){return!Gn(e)}function X3(e){return!(e===47||u_(e))}function u_(e){return e===43||e===45||e===46||e===95||Rn(e)}function cw(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Krt={tokenize:oit,partial:!0};function Jrt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:rit,continuation:{tokenize:iit},exit:ait}},text:{91:{name:"gfmFootnoteCall",tokenize:nit},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:tit,resolveTo:eit}}}}function tit(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){o=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return l;function l(s){if(!o||!o._balanced)return n(s);const c=gi(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function eit(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function nit(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),s}function s(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!o||d===null||d===91||Ie(d))return n(d);if(d===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return i.includes(gi(r.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Ie(d)||(o=!0),a++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function rit(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,l;return s;function s(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(m)}function h(m){if(o>999||m===93&&!l||m===null||m===91||Ie(m))return n(m);if(m===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return a=gi(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return Ie(m)||(l=!0),o++,e.consume(m),m===92?d:h}function d(m){return m===91||m===92||m===93?(e.consume(m),o++,h):h(m)}function v(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(a)||i.push(a),de(e,g,"gfmFootnoteDefinitionWhitespace")):n(m)}function g(m){return t(m)}}function iit(e,t,n){return e.check(Vh,t,e.attempt(Krt,t,n))}function ait(e){e.exit("gfmFootnoteDefinition")}function oit(e,t,n){const r=this;return de(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function lit(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,l){let s=-1;for(;++s<o.length;)if(o[s][0]==="enter"&&o[s][1].type==="strikethroughSequenceTemporary"&&o[s][1]._close){let c=s;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[s][1].end.offset-o[s][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[s][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[s][1].end)},d={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[s][1].start)},v=[["enter",h,l],["enter",o[c][1],l],["exit",o[c][1],l],["enter",d,l]],g=l.parser.constructs.insideSpan.null;g&&Tr(v,v.length,0,Wg(g,o.slice(c+1,s),l)),Tr(v,v.length,0,[["exit",d,l],["enter",o[s][1],l],["exit",o[s][1],l],["exit",h,l]]),Tr(o,c-1,s-c+3,v),s=c+v.length-2;break}}for(s=-1;++s<o.length;)o[s][1].type==="strikethroughSequenceTemporary"&&(o[s][1].type="data");return o}function a(o,l,s){const c=this.previous,h=this.events;let d=0;return v;function v(m){return c===126&&h[h.length-1][1].type!=="characterEscape"?s(m):(o.enter("strikethroughSequenceTemporary"),g(m))}function g(m){const x=Fu(c);if(m===126)return d>1?s(m):(o.consume(m),d++,g);if(d<2&&!n)return s(m);const _=o.exit("strikethroughSequenceTemporary"),b=Fu(m);return _._open=!b||b===2&&!!x,_._close=!x||x===2&&!!b,l(m)}}}class sit{constructor(){this.map=[]}add(t,n,r){uit(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function uit(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function cit(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function fit(){return{flow:{null:{name:"table",tokenize:hit,resolveAll:dit}}}}function hit(e,t,n){const r=this;let i=0,a=0,o;return l;function l(E){let O=r.events.length-1;for(;O>-1;){const U=r.events[O][1].type;if(U==="lineEnding"||U==="linePrefix")O--;else break}const j=O>-1?r.events[O][1].type:null,B=j==="tableHead"||j==="tableRow"?M:s;return B===M&&r.parser.lazy[r.now().line]?n(E):B(E)}function s(E){return e.enter("tableHead"),e.enter("tableRow"),c(E)}function c(E){return E===124||(o=!0,a+=1),h(E)}function h(E){return E===null?n(E):Nt(E)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),g):n(E):re(E)?de(e,h,"whitespace")(E):(a+=1,o&&(o=!1,i+=1),E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),d(E)))}function d(E){return E===null||E===124||Ie(E)?(e.exit("data"),h(E)):(e.consume(E),E===92?v:d)}function v(E){return E===92||E===124?(e.consume(E),d):d(E)}function g(E){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(E):(e.enter("tableDelimiterRow"),o=!1,re(E)?de(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):m(E))}function m(E){return E===45||E===58?_(E):E===124?(o=!0,e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),x):D(E)}function x(E){return re(E)?de(e,_,"whitespace")(E):_(E)}function _(E){return E===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),b):E===45?(a+=1,b(E)):E===null||Nt(E)?A(E):D(E)}function b(E){return E===45?(e.enter("tableDelimiterFiller"),S(E)):D(E)}function S(E){return E===45?(e.consume(E),S):E===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(E))}function w(E){return re(E)?de(e,A,"whitespace")(E):A(E)}function A(E){return E===124?m(E):E===null||Nt(E)?!o||i!==a?D(E):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(E)):D(E)}function D(E){return n(E)}function M(E){return e.enter("tableRow"),L(E)}function L(E){return E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),L):E===null||Nt(E)?(e.exit("tableRow"),t(E)):re(E)?de(e,L,"whitespace")(E):(e.enter("data"),I(E))}function I(E){return E===null||E===124||Ie(E)?(e.exit("data"),L(E)):(e.consume(E),E===92?N:I)}function N(E){return E===92||E===124?(e.consume(E),I):I(E)}}function dit(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,s=0,c,h,d;const v=new sit;for(;++n<e.length;){const g=e[n],m=g[1];g[0]==="enter"?m.type==="tableHead"?(l=!1,s!==0&&(sR(v,t,s,c,h),h=void 0,s=0),c={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},v.add(n,0,[["enter",c,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],l&&(l=!1,h={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},v.add(n,0,[["enter",h,t]])),i=m.type==="tableDelimiterRow"?2:h?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=ep(v,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=ep(v,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type==="tableHead"?(l=!0,s=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(s=n,a[1]!==0?(o[0]=o[1],d=ep(v,t,a,i,n,d)):o[1]!==0&&(d=ep(v,t,o,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(o[3]=n)}for(s!==0&&sR(v,t,s,c,h),v.consume(t.events),n=-1;++n<t.events.length;){const g=t.events[n];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=cit(t.events,n))}return e}function ep(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},xu(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const s=xu(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=xu(t.events,n[2]),h=xu(t.events,n[3]),d={type:l,start:Object.assign({},c),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const v=t.events[n[2]],g=t.events[n[3]];if(v[1].end=Object.assign({},g[1].end),v[1].type="chunkText",v[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,x=n[3]-n[2]-1;e.add(m,x,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},xu(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function sR(e,t,n,r,i){const a=[],o=xu(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function xu(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const vit={name:"tasklistCheck",tokenize:git};function pit(){return{text:{91:vit}}}function git(e,t,n){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),a)}function a(s){return Ie(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),o):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),o):n(s)}function o(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(s)}function l(s){return Nt(s)?t(s):re(s)?e.check({tokenize:mit},t,n)(s):n(s)}}function mit(e,t,n){return de(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function yit(e){return a3([Grt(),Jrt(),lit(e),fit(),pit()])}const xit={};function bit(e){const t=this,n=e||xit,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(yit(n)),a.push(Hrt()),o.push(Vrt(n))}const _it=`
|
|
161
|
+
@keyframes streaming-cursor {
|
|
162
|
+
0%, 100% { opacity: 1; }
|
|
163
|
+
50% { opacity: 0; }
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* Кастомный scrollbar для таблиц */
|
|
167
|
+
.markdown-table::-webkit-scrollbar {
|
|
168
|
+
width: 8px;
|
|
169
|
+
height: 8px;
|
|
170
|
+
}
|
|
171
|
+
.markdown-table::-webkit-scrollbar-track {
|
|
172
|
+
background: #F5F5F5;
|
|
173
|
+
border-radius: 4px;
|
|
174
|
+
}
|
|
175
|
+
.markdown-table::-webkit-scrollbar-thumb {
|
|
176
|
+
background: #E0E0E0;
|
|
177
|
+
border-radius: 4px;
|
|
178
|
+
}
|
|
179
|
+
.markdown-table::-webkit-scrollbar-thumb:hover {
|
|
180
|
+
background: #00695C;
|
|
181
|
+
}
|
|
182
|
+
.markdown-table {
|
|
183
|
+
scrollbar-width: thin;
|
|
184
|
+
scrollbar-color: #E0E0E0 #F5F5F5;
|
|
185
|
+
}
|
|
186
|
+
`,Sit={code({children:e,className:t,...n}){return/language-/.test(t||"")?k.jsx("code",{style:{fontFamily:'Monaco, "Courier New", monospace',fontSize:13,lineHeight:1.5},className:t,...n,children:e}):k.jsx("code",{style:{background:z.tealLight,color:z.tealDark,padding:"2px 6px",borderRadius:4,fontSize:13,fontFamily:'Monaco, "Courier New", monospace'},...n,children:e})},pre({children:e}){return k.jsx("pre",{style:{background:z.neutral,color:"#E8E8E8",padding:14,borderRadius:8,overflow:"auto",fontSize:13,lineHeight:1.5,fontFamily:'Monaco, "Courier New", monospace',border:`1px solid ${z.border}`,boxShadow:xe.xs,margin:"8px 0"},children:e})},h1:({children:e})=>k.jsx("h1",{style:{fontSize:20,fontWeight:700,margin:"16px 0 8px",color:z.textPrimary},children:e}),h2:({children:e})=>k.jsx("h2",{style:{fontSize:17,fontWeight:600,margin:"14px 0 6px",color:z.textPrimary},children:e}),h3:({children:e})=>k.jsx("h3",{style:{fontSize:15,fontWeight:600,margin:"12px 0 4px",color:z.textPrimary},children:e}),ul:({children:e})=>k.jsx("ul",{style:{paddingLeft:20,margin:"6px 0"},children:e}),ol:({children:e})=>k.jsx("ol",{style:{paddingLeft:20,margin:"6px 0"},children:e}),li:({children:e})=>k.jsx("li",{style:{marginBottom:4},children:e}),p:({children:e})=>k.jsx("p",{style:{margin:"6px 0"},children:e}),a:({href:e,children:t})=>k.jsx("a",{href:e,style:{color:z.teal,textDecoration:"underline"},target:"_blank",rel:"noopener noreferrer",children:t}),blockquote:({children:e})=>k.jsx("blockquote",{style:{borderLeft:`3px solid ${z.orange}`,paddingLeft:12,margin:"8px 0",color:z.textSecondary},children:e}),table:({children:e})=>k.jsx("div",{style:{margin:"8px 0",borderRadius:8,overflow:"hidden",border:`0.5px solid ${z.border}`},children:k.jsx("table",{style:{borderCollapse:"collapse",fontSize:13,width:"100%"},children:e})}),th:({children:e})=>k.jsx("th",{style:{border:`1px solid ${z.border}`,padding:"6px 10px",background:z.tealLight,fontWeight:600,textAlign:"left"},children:e}),td:({children:e})=>k.jsx("td",{style:{border:`1px solid ${z.border}`,padding:"6px 10px"},children:e})},wit={display:"inline-block",width:2,height:14,background:z.orange,animation:"streaming-cursor 1s step-end infinite",verticalAlign:"middle",marginLeft:2};function Tit({content:e,streaming:t}){return k.jsxs("div",{style:{display:"inline-block",maxWidth:"90%",textAlign:"left",fontSize:14,lineHeight:1.6,color:z.textPrimary,marginBottom:8},children:[t&&k.jsx("style",{children:_it}),k.jsx(lnt,{remarkPlugins:[bit],components:Sit,children:e}),t&&k.jsx("span",{style:wit})]})}const Z3="/api/connections/dashboard";async function Cit(){const e=await fetch(Z3);return e.ok?e.json():{charts:[]}}async function uR(e){const t=await fetch(Z3,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({charts:e})});if(!t.ok)throw new Error("Failed to save dashboard");return t.json()}const $3="analitoly_session_charts",Q3="analitoly_chart_tabs";function Mit(){try{const e=localStorage.getItem($3);return e?JSON.parse(e):[]}catch{return[]}}function Ait(e){try{localStorage.setItem($3,JSON.stringify(e))}catch{}}function Dit(){try{const e=localStorage.getItem(Q3);return e?JSON.parse(e).filter(n=>n.type!=="dashboard"):[]}catch{return[]}}function kit(e){try{const t=e.filter(n=>n.type!=="dashboard");localStorage.setItem(Q3,JSON.stringify(t))}catch{}}const Lit={id:"dashboard",type:"dashboard"};function Eit(){const e=Mit(),t=Dit();return{dashboardCharts:[],dashboardLoaded:!1,sessionCharts:e,tabs:[Lit,...t],activeTabId:"dashboard",brushSelection:null}}let cR=Date.now();function Rit(e,t){var n;switch(t.type){case"LOAD_DASHBOARD_CHARTS":return{...e,dashboardCharts:t.payload,dashboardLoaded:!0};case"ADD_CHART":{const r=t.payload,a=e.sessionCharts.some(c=>c.chartId===r.chartId)?e.sessionCharts:[...e.sessionCharts,r],o=`tab_${++cR}`,l={id:o,type:"chart",chartId:r.chartId},s=[...e.tabs,l];return{...e,sessionCharts:a,tabs:s,activeTabId:o}}case"ADD_TO_DASHBOARD":{const r=t.payload;return e.dashboardCharts.some(a=>a.chartId===r.chartId)?e:{...e,dashboardCharts:[...e.dashboardCharts,r]}}case"REMOVE_FROM_DASHBOARD":{const r=t.payload;return{...e,dashboardCharts:e.dashboardCharts.filter(i=>i.chartId!==r)}}case"OPEN_IN_TAB":{const r=`tab_${++cR}`,i={id:r,type:"chart",chartId:t.payload.chartId};return{...e,tabs:[...e.tabs,i],activeTabId:r}}case"CLOSE_TAB":{const r=t.payload,i=e.tabs.filter(o=>o.id!==r),a=e.activeTabId===r?((n=i[i.length-1])==null?void 0:n.id)??"dashboard":e.activeTabId;return{...e,tabs:i,activeTabId:a,brushSelection:null}}case"SET_ACTIVE_TAB":return{...e,activeTabId:t.payload,brushSelection:null};case"SET_BRUSH":return{...e,brushSelection:t.payload};case"UPDATE_CHART_OPTION":{const{chartId:r,echartsOption:i}=t.payload,a=o=>o.map(l=>l.chartId===r?{...l,echartsOption:i}:l);return{...e,sessionCharts:a(e.sessionCharts),dashboardCharts:a(e.dashboardCharts)}}default:return e}}const K3=at.createContext(null);function Iit({children:e}){const[t,n]=at.useReducer(Rit,void 0,Eit),r=at.useRef(t);r.current=t;const i=at.useCallback(async()=>{try{const{charts:x}=await Cit();n({type:"LOAD_DASHBOARD_CHARTS",payload:x})}catch{n({type:"LOAD_DASHBOARD_CHARTS",payload:[]})}},[]);at.useEffect(()=>{i()},[i]),at.useEffect(()=>{Ait(t.sessionCharts)},[t.sessionCharts]),at.useEffect(()=>{kit(t.tabs)},[t.tabs]);const a=at.useCallback(x=>{n({type:"ADD_CHART",payload:x})},[]),o=at.useCallback(x=>{n({type:"SET_ACTIVE_TAB",payload:x})},[]),l=at.useCallback(x=>{n({type:"SET_BRUSH",payload:x})},[]),s=at.useCallback(async x=>{const _=r.current,b=_.sessionCharts.find(w=>w.chartId===x)??_.dashboardCharts.find(w=>w.chartId===x);if(!b||_.dashboardCharts.some(w=>w.chartId===x))return;n({type:"ADD_TO_DASHBOARD",payload:b});const S=[..._.dashboardCharts,b];try{await uR(S)}catch{}},[]),c=at.useCallback(async x=>{n({type:"REMOVE_FROM_DASHBOARD",payload:x});const S=r.current.dashboardCharts.filter(w=>w.chartId!==x);try{await uR(S)}catch{}},[]),h=at.useCallback(x=>{n({type:"OPEN_IN_TAB",payload:{chartId:x}})},[]),d=at.useCallback(x=>{n({type:"CLOSE_TAB",payload:x})},[]),v=at.useCallback(x=>r.current.sessionCharts.find(_=>_.chartId===x)??r.current.dashboardCharts.find(_=>_.chartId===x),[]),g=at.useCallback(x=>r.current.dashboardCharts.some(_=>_.chartId===x),[]),m=at.useCallback((x,_)=>{n({type:"UPDATE_CHART_OPTION",payload:{chartId:x,echartsOption:_}})},[]);return k.jsx(K3.Provider,{value:{state:t,addChart:a,setActiveTab:o,setBrushSelection:l,addToDashboard:s,removeFromDashboard:c,openInTab:h,closeTab:d,getChart:v,isOnDashboard:g,reloadDashboard:i,updateChartOption:m},children:e})}function ls(){const e=at.useContext(K3);if(!e)throw new Error("useChartContext must be used within ChartProvider");return e}function Oit(e){try{const t=localStorage.getItem(`analitoly_messages_${e}`);return t?JSON.parse(t):[]}catch{return[]}}function vu(e,t){try{const n=t.map(r=>{if(r.role!=="assistant"||!r.segments)return r;const i=r.segments.filter(a=>a.type!=="thinking").map(a=>a.type==="text"&&a.streaming?{...a,streaming:!1}:a);return{...r,segments:i}});localStorage.setItem(`analitoly_messages_${e}`,JSON.stringify(n))}catch{}}const J3=at.createContext(null);function fw(){const e=at.useContext(J3);if(!e)throw new Error("useSession must be used within SessionProvider");return e}function zit({initialSessionId:e,onConnect:t,onLogout:n,children:r}){const[i,a]=at.useState(e),[,o]=at.useState(0),l=at.useCallback(()=>o(D=>D+1),[]),s=at.useRef(new Map),c=at.useRef(i);c.current=i;const{addChart:h}=ls(),d=at.useCallback(D=>{let M=s.current.get(D);return M||(M={messages:Oit(D),loading:!1,abortController:null},s.current.set(D,M)),M},[]),v=d(i),g=at.useCallback(async(D,M)=>{const L=d(D);L.messages=[...L.messages,{role:"user",content:M},{role:"assistant",content:"",segments:[{type:"thinking",label:"Анализирую запрос..."}]}],L.loading=!0,c.current===D&&l();const I=W=>{const H=L.messages,q=H[H.length-1];(q==null?void 0:q.role)==="assistant"&&(H[H.length-1]={...q,segments:W([...q.segments??[]])}),c.current===D&&l()},N=W=>W.filter(H=>H.type!=="thinking"),E=W=>{const H=W[W.length-1];if((H==null?void 0:H.type)==="text"&&H.streaming){const q=[...W];return q[q.length-1]={...H,streaming:!1},q}return W},O=W=>W.map(H=>H.type==="tool"&&H.meta.status==="pending"?{...H,meta:{...H.meta,status:"error",result:"Остановлено"}}:H),j=new AbortController;L.abortController=j;const B=Date.now();let U=null;try{const W=await fetch(`/api/agent/${D}/message`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:M}),signal:j.signal});if(!W.ok||!W.body)throw new Error("Stream failed");const H=W.body.getReader(),q=new TextDecoder;let X="";const J=()=>{U&&clearTimeout(U),U=setTimeout(()=>{const F=L.messages,Y=F[F.length-1],Z=(Y==null?void 0:Y.segments)??[],V=Z[Z.length-1];(V==null?void 0:V.type)==="text"&&V.streaming&&I(tt=>{const ut=E(tt);return ut.push({type:"thinking",label:"Подготовка..."}),ut})},1e3)};for(;;){const{done:F,value:Y}=await H.read();if(F)break;J(),X+=q.decode(Y,{stream:!0});const Z=X.split(`
|
|
187
|
+
`);X=Z.pop()??"";for(const V of Z){if(!V.startsWith("data: "))continue;let tt;try{tt=JSON.parse(V.slice(6))}catch{continue}if(tt.type==="tool_call"||tt.type==="tool_use"){const ut=tt.tool??tt.name,gt=tt.tool_use_id,wt=ut.startsWith("mcp__analitoly__");let pt;if(tt.input){const vt=tt.input;vt.query?pt=vt.query:vt.type&&(pt=JSON.stringify(vt,null,2))}if(gt&&wt){const vt=ut.endsWith("render_chart");I(Dt=>{let yt=N(Dt);return yt=E(yt),vt?yt.some(Mt=>Mt.type==="thinking"&&Mt.label===xx)||yt.push({type:"thinking",label:xx}):yt.push({type:"tool",meta:{tool:ut,toolUseId:gt,query:pt,status:"pending"}}),yt}),await new Promise(Dt=>setTimeout(Dt,0))}}else if(tt.type==="tool_result"){const ut=tt.tool_use_id;if(ut){const gt=tt.result;let wt=null;try{const pt=JSON.parse(gt??"");pt.type==="chart"&&pt.echartsOption&&(wt={chartId:pt.chartId,echartsOption:pt.echartsOption,title:pt.title,description:pt.description??"",sourceQuery:pt.sourceQuery??"",rebuildConfig:pt.rebuildConfig??void 0})}catch{}wt?(h(wt),I(pt=>{const vt=pt.findIndex(yt=>yt.type==="tool"&&yt.meta.toolUseId===ut);if(vt!==-1){const yt=[...pt];return yt[vt]={type:"chart",data:wt},yt.push({type:"thinking",label:"Анализирую результат..."}),yt}const Dt=N(pt);return Dt.push({type:"chart",data:wt}),Dt.push({type:"thinking",label:"Анализирую результат..."}),Dt})):I(pt=>{const vt=pt.findIndex(Mt=>Mt.type==="tool"&&Mt.meta.toolUseId===ut);if(vt===-1)return pt;const Dt=[...pt],yt=pt[vt];return Dt[vt]={type:"tool",meta:{...yt.meta,result:gt,status:MR(gt)?"error":"success"}},Dt.push({type:"thinking",label:"Анализирую результат..."}),Dt})}}else if(tt.type==="text_delta"||tt.type==="text"){const ut=tt.text??tt.content;I(gt=>{let wt=N(gt);const pt=wt[wt.length-1];if((pt==null?void 0:pt.type)==="text"&&pt.streaming){const vt=[...wt];return vt[vt.length-1]={...pt,content:pt.content+ut},vt}return wt.push({type:"text",content:ut,streaming:!0}),wt})}else tt.type==="done"||tt.type==="close"?(I(ut=>E(N(ut))),L.loading=!1,vu(D,L.messages),c.current===D&&l()):tt.type==="error"&&(I(ut=>{let gt=N(ut);return gt.push({type:"text",content:`Ошибка: ${tt.message}`,streaming:!1}),gt}),L.loading=!1,vu(D,L.messages),c.current===D&&l())}}}catch(W){U&&clearTimeout(U);const H=((Date.now()-B)/1e3).toFixed(1);if(W.name==="AbortError"){I(q=>O(E(N(q)))),L.loading=!1,vu(D,L.messages),c.current===D&&l();return}console.error(`[Session] Stream error after ${H}s:`,W),I(q=>{let X=N(q);return X=O(X),X.push({type:"text",content:`Ошибка соединения (${H}с): ${W}`,streaming:!1}),X}),L.loading=!1,vu(D,L.messages),c.current===D&&l()}finally{U&&clearTimeout(U),L.abortController=null,L.loading&&(L.loading=!1,vu(D,L.messages),c.current===D&&l())}},[d,l,h]),m=at.useCallback(D=>{if(!D)return;const M=d(c.current);M.loading||(vu(c.current,[...M.messages,{role:"user",content:D}]),g(c.current,D))},[d,g]),x=at.useCallback(()=>{const D=s.current.get(c.current);D!=null&&D.abortController&&D.abortController.abort()},[]),_=at.useCallback(D=>{a(D),c.current=D,d(D),localStorage.setItem("analitoly_current_session",D)},[d]),b=at.useCallback(async()=>{const D=await t();D&&(s.current.set(D,{messages:[],loading:!1,abortController:null}),a(D),c.current=D,localStorage.setItem("analitoly_current_session",D))},[t]),S=at.useCallback(async D=>{const M=s.current.get(D);if(M!=null&&M.abortController&&M.abortController.abort(),s.current.delete(D),localStorage.removeItem(`analitoly_messages_${D}`),fetch(`/api/agent/${D}`,{method:"DELETE"}).catch(()=>{}),c.current===D){let L=null;try{const I=await fetch("/api/agent/sessions");if(I.ok){const E=(await I.json()).filter(O=>O.sessionId!==D);E.length>0&&(E.sort((O,j)=>new Date(j.createdAt).getTime()-new Date(O.createdAt).getTime()),L=E[0].sessionId)}}catch{}if(L)d(L),a(L),c.current=L,localStorage.setItem("analitoly_current_session",L);else{const I=await t();I&&(s.current.set(I,{messages:[],loading:!1,abortController:null}),a(I),c.current=I,localStorage.setItem("analitoly_current_session",I))}}l()},[l,t]),w=at.useCallback(()=>{for(const D of s.current.values())D.abortController&&D.abortController.abort();n()},[n]),A=at.useCallback(D=>{var M;return((M=s.current.get(D))==null?void 0:M.loading)??!1},[]);return k.jsx(J3.Provider,{value:{activeSessionId:i,messages:v.messages,loading:v.loading,sendMessage:m,stopSession:x,switchSession:_,newSession:b,deleteSession:S,logout:w,isSessionLoading:A},children:r})}function Bit(e){const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return"только что";if(n<60)return`${n} мин назад`;const r=Math.floor(n/60);return r<24?`${r} ч назад`:`${Math.floor(r/24)} дн назад`}function Nit(){const{activeSessionId:e,switchSession:t,newSession:n,deleteSession:r,isSessionLoading:i}=fw(),[a,o]=at.useState(!1),[l,s]=at.useState([]),c=at.useRef(null);return at.useEffect(()=>{a&&fetch("/api/agent/sessions").then(h=>h.json()).then(h=>{h.sort((d,v)=>new Date(v.createdAt).getTime()-new Date(d.createdAt).getTime()),s(h)}).catch(()=>{})},[a]),at.useEffect(()=>{if(!a)return;const h=d=>{c.current&&!c.current.contains(d.target)&&o(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[a]),k.jsxs("div",{ref:c,style:{position:"relative",marginBottom:12},children:[k.jsxs("button",{onClick:()=>o(!a),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:a?z.orangeLight:z.surface,border:`1px solid ${a?z.orange:z.border}`,borderRadius:8,cursor:"pointer",fontSize:13,color:z.textSecondary,fontFamily:"Monaco, monospace",transition:Pt.fast},onMouseEnter:h=>{a||(h.currentTarget.style.borderColor=z.neutral,h.currentTarget.style.background=z.surfaceHover)},onMouseLeave:h=>{a||(h.currentTarget.style.borderColor=z.border,h.currentTarget.style.background=z.surface)},children:[k.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:z.teal}}),e.slice(0,8),k.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",style:{transform:a?"rotate(180deg)":"none",transition:Pt.fast},children:k.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]}),a&&k.jsxs("div",{style:{position:"absolute",top:"100%",left:0,marginTop:4,width:320,background:z.surface,border:`1px solid ${z.border}`,borderRadius:12,boxShadow:xe.lg,zIndex:100,overflow:"hidden"},children:[k.jsxs("button",{onClick:()=>{o(!1),n()},style:{width:"100%",padding:"10px 14px",background:"none",border:"none",borderBottom:`1px solid ${z.borderLight}`,cursor:"pointer",fontSize:13,fontWeight:500,color:z.orange,textAlign:"left",display:"flex",alignItems:"center",gap:8,transition:Pt.fast},onMouseEnter:h=>{h.currentTarget.style.background=z.orangeLight},onMouseLeave:h=>{h.currentTarget.style.background="none"},children:[k.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:k.jsx("path",{d:"M7 2V12M2 7H12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),"Новая сессия"]}),k.jsxs("div",{style:{maxHeight:280,overflowY:"auto"},children:[l.map(h=>{const d=h.sessionId===e,v=i(h.sessionId);return k.jsxs("div",{style:{display:"flex",alignItems:"center",borderBottom:`1px solid ${z.borderLight}`,background:d?z.orangeLight:"none",transition:Pt.fast},onMouseEnter:g=>{d||(g.currentTarget.style.background=z.surfaceHover)},onMouseLeave:g=>{d||(g.currentTarget.style.background="none")},children:[k.jsxs("button",{onClick:()=>{d||t(h.sessionId),o(!1)},style:{flex:1,padding:"10px 14px",background:"none",border:"none",cursor:d?"default":"pointer",textAlign:"left"},children:[k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:2},children:[v&&k.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:z.orange,animation:"pulse 1.5s ease-in-out infinite"}}),k.jsx("span",{style:{fontSize:12,fontFamily:"Monaco, monospace",color:d?z.orange:z.textSecondary,fontWeight:d?600:400},children:h.sessionId.slice(0,8)}),k.jsx("span",{style:{fontSize:11,color:z.textTertiary},children:Bit(h.createdAt)}),h.numTurns>0&&k.jsxs("span",{style:{fontSize:11,color:z.textTertiary,marginLeft:"auto"},children:[h.numTurns," ",h.numTurns===1?"turn":"turns"]})]}),h.lastMessagePreview&&k.jsx("div",{style:{fontSize:12,color:z.textTertiary,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:h.lastMessagePreview})]}),k.jsx("button",{title:"Удалить сессию",onClick:async g=>{g.stopPropagation(),await r(h.sessionId);try{const x=await(await fetch("/api/agent/sessions")).json();x.sort((_,b)=>new Date(b.createdAt).getTime()-new Date(_.createdAt).getTime()),s(x)}catch{}},style:{padding:"6px 10px",background:"none",border:"none",cursor:"pointer",color:z.textTertiary,fontSize:14,transition:Pt.fast,flexShrink:0},onMouseEnter:g=>{g.currentTarget.style.color=z.error},onMouseLeave:g=>{g.currentTarget.style.color=z.textTertiary},children:k.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:k.jsx("path",{d:"M2 4h10M5 4V3a1 1 0 011-1h2a1 1 0 011 1v1M11 4v7a1 1 0 01-1 1H4a1 1 0 01-1-1V4",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})})})]},h.sessionId)}),l.length===0&&k.jsx("div",{style:{padding:14,fontSize:13,color:z.textTertiary,textAlign:"center"},children:"Нет активных сессий"})]})]}),k.jsx("style",{children:`
|
|
188
|
+
@keyframes pulse {
|
|
189
|
+
0%, 100% { opacity: 1; }
|
|
190
|
+
50% { opacity: 0.3; }
|
|
191
|
+
}
|
|
192
|
+
`})]})}const Pit=at.forwardRef(function(t,n){const{messages:r,loading:i,sendMessage:a,stopSession:o,activeSessionId:l}=fw(),{openInTab:s}=ls(),c=at.useRef(null);at.useEffect(()=>{var v;(v=c.current)==null||v.scrollIntoView({behavior:"smooth"})},[r]);const h=at.useCallback(v=>{a(v)},[a]),d=at.useCallback(()=>{o()},[o]);return at.useImperativeHandle(n,()=>({sendProgrammatic:v=>{a(v)}}),[a]),k.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",fontFamily:'system-ui, -apple-system, "Segoe UI", sans-serif'},children:[k.jsx(Nit,{}),k.jsxs("div",{style:{flex:1,overflowY:"auto",border:`1px solid ${z.border}`,borderRadius:12,padding:16,marginBottom:12,background:z.surface},children:[r.length===0&&k.jsx("div",{style:{textAlign:"center",marginTop:40},children:k.jsx("p",{style:{color:z.textTertiary,fontSize:14,marginBottom:8},children:"Напиши что-нибудь, чтобы начать..."})}),r.map((v,g)=>v.role==="user"?k.jsx(kP,{message:v},`${l}-${g}`):k.jsx("div",{style:{marginBottom:16,textAlign:"left"},children:(v.segments??[]).map((m,x)=>{switch(m.type){case"thinking":return m.label===xx?k.jsx(XQ,{},x):k.jsx(WQ,{label:m.label},x);case"text":return k.jsx(Tit,{content:m.content,streaming:m.streaming},x);case"tool":return k.jsx(JP,{meta:m.meta},m.meta.toolUseId??x);case"chart":return k.jsx(UQ,{chart:m.data,onClick:()=>s(m.data.chartId)},x)}})},`${l}-${g}`)),k.jsx("div",{ref:c})]}),k.jsx(LP,{onSend:h,onStop:d,disabled:i})]})});function Hit({onResize:e,minWidth:t=350,maxWidth:n=800}){const[r,i]=at.useState(!1),[a,o]=at.useState(!1),l=at.useRef(0),s=at.useRef(0);at.useEffect(()=>{if(!r)return;const h=v=>{const g=l.current-v.clientX,m=Math.max(t,Math.min(n,s.current+g));e(m)},d=()=>{i(!1)};return document.addEventListener("mousemove",h),document.addEventListener("mouseup",d),()=>{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",d)}},[r,t,n,e]);const c=h=>{h.preventDefault(),i(!0),l.current=h.clientX;const d=h.target.nextElementSibling;d&&(s.current=d.offsetWidth)};return k.jsx("div",{onMouseDown:c,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),style:{width:16,cursor:"col-resize",position:"relative",background:a||r?"rgba(255, 140, 66, 0.1)":"transparent",transition:"background 150ms",userSelect:"none",display:"flex",alignItems:"center",justifyContent:"center"},children:k.jsx("div",{style:{width:4,height:40,background:a||r?z.orange:z.border,borderRadius:4,transition:"background 150ms, width 150ms"}})})}function Vit({sidebar:e,sidebarCollapsed:t,onToggleSidebar:n,children:r,chat:i}){const[a,o]=at.useState(420);return k.jsxs("div",{style:{display:"flex",height:"100vh",background:z.background,fontFamily:'system-ui, -apple-system, "Segoe UI", sans-serif'},children:[e&&k.jsxs("div",{style:{position:"relative",flexShrink:0},children:[k.jsx("div",{style:{width:t?64:240,height:"100%",background:z.surface,borderRight:`1px solid ${z.border}`,padding:t?"16px 8px":16,overflowY:t?"hidden":"auto",overflowX:"hidden",transition:Pt.slow,boxSizing:"border-box"},children:e}),n&&k.jsx("button",{onClick:n,title:t?"Развернуть":"Свернуть",style:{position:"absolute",top:12,right:-14,width:28,height:28,display:"flex",alignItems:"center",justifyContent:"center",background:z.surface,border:`1px solid ${z.border}`,borderRadius:"50%",cursor:"pointer",color:z.textTertiary,boxShadow:xe.sm,transition:Pt.normal,zIndex:10,padding:0},onMouseEnter:l=>{l.currentTarget.style.background=z.surfaceHover,l.currentTarget.style.color=z.textPrimary,l.currentTarget.style.boxShadow=xe.md},onMouseLeave:l=>{l.currentTarget.style.background=z.surface,l.currentTarget.style.color=z.textTertiary,l.currentTarget.style.boxShadow=xe.sm},children:k.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",style:{transition:Pt.normal,transform:t?"rotate(180deg)":"none"},children:k.jsx("path",{d:"M10 3L5 8L10 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),k.jsx("div",{style:{flex:1,paddingBottom:20,paddingTop:24,paddingLeft:20,paddingRight:10,overflowY:"auto",minWidth:400,display:"flex",flexDirection:"column"},children:r}),k.jsx(Hit,{onResize:o,minWidth:350,maxWidth:800}),k.jsx("div",{style:{width:a,flexShrink:0,background:z.surface,borderLeft:`1px solid ${z.border}`,padding:16,overflowY:"hidden"},children:i})]})}if(typeof document<"u"&&!document.getElementById("usage-panel-animation")){const e=document.createElement("style");e.id="usage-panel-animation",e.textContent=`
|
|
193
|
+
@keyframes slideDown {
|
|
194
|
+
from {
|
|
195
|
+
opacity: 0;
|
|
196
|
+
transform: translateY(10px);
|
|
197
|
+
}
|
|
198
|
+
to {
|
|
199
|
+
opacity: 1;
|
|
200
|
+
transform: translateY(0);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
@keyframes spin {
|
|
204
|
+
from { transform: rotate(0deg); }
|
|
205
|
+
to { transform: rotate(360deg); }
|
|
206
|
+
}
|
|
207
|
+
`,document.head.appendChild(e)}function jit({sessionId:e,onClose:t}){const[n,r]=at.useState(null),[i,a]=at.useState(null),[o,l]=at.useState(!1),s=async()=>{l(!0);try{const v=await fetch(`/api/agent/${e}/usage`);if(!v.ok)throw new Error("Failed to fetch usage");r(await v.json()),a(null)}catch(v){a(String(v))}finally{setTimeout(()=>l(!1),800)}};at.useEffect(()=>{s()},[e]);const c=v=>v>=1e6?`${(v/1e6).toFixed(1)}M`:v>=1e3?`${(v/1e3).toFixed(1)}K`:String(v),h=v=>v===0?"$0.00":v<.01?`$${v.toFixed(4)}`:`$${v.toFixed(2)}`,d=v=>v<1e3?`${v}ms`:`${(v/1e3).toFixed(1)}s`;return k.jsxs("div",{style:{position:"relative",width:200},children:[k.jsx("div",{style:{position:"absolute",bottom:-8,left:"50%",transform:"translateX(-50%)",width:1,height:8,background:"linear-gradient(to bottom, rgba(255,140,66,0.3), transparent)"}}),k.jsxs("div",{style:{maxWidth:320,maxHeight:"calc(100vh - 120px)",overflowY:"auto",background:z.surface,border:`1px solid ${z.border}`,borderRadius:12,boxShadow:xe.lg,padding:16,animation:"slideDown 150ms ease-out"},children:[k.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:14},children:[k.jsx("span",{style:{fontWeight:600,fontSize:14,color:z.textPrimary},children:"Использование"}),k.jsx("button",{onClick:s,"aria-label":"Обновить",style:{width:20,height:20,padding:4,background:"none",border:"none",cursor:"pointer",color:z.teal,borderRadius:4,transition:Pt.fast,display:"flex",alignItems:"center",justifyContent:"center"},onMouseEnter:v=>{v.currentTarget.style.background=z.tealLight,v.currentTarget.style.color=z.tealDark},onMouseLeave:v=>{v.currentTarget.style.background="none",v.currentTarget.style.color=z.teal},children:k.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:o?"spin 800ms linear infinite":"none"},children:[k.jsx("path",{d:"M14 8A6 6 0 1 1 8 2"}),k.jsx("path",{d:"M8 2L8 5M8 2L5 2"})]})})]}),i&&k.jsx("div",{style:{color:z.error,fontSize:13,marginBottom:8},children:i}),n?k.jsxs("div",{style:{fontSize:13,lineHeight:1.8},children:[k.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[k.jsx("span",{style:{color:z.textPrimary,fontWeight:600},children:"Стоимость"}),k.jsx("span",{style:{fontWeight:600,color:z.textPrimary},children:h(n.totalCostUsd)})]}),k.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[k.jsx("span",{style:{color:z.textSecondary},children:"Input токены"}),k.jsx("span",{style:{color:z.textPrimary},children:c(n.inputTokens)})]}),k.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[k.jsx("span",{style:{color:z.textSecondary},children:"Output токены"}),k.jsx("span",{style:{color:z.textPrimary},children:c(n.outputTokens)})]}),n.cacheReadTokens>0&&k.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[k.jsx("span",{style:{color:z.textSecondary},children:"Из кеша"}),k.jsx("span",{style:{color:z.textPrimary},children:c(n.cacheReadTokens)})]}),k.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[k.jsx("span",{style:{color:z.textSecondary},children:"Запросов"}),k.jsx("span",{style:{color:z.textPrimary},children:n.numTurns})]}),k.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[k.jsx("span",{style:{color:z.textSecondary},children:"Время API"}),k.jsx("span",{style:{color:z.textPrimary},children:d(n.durationMs)})]}),Object.keys(n.modelUsage).length>0&&k.jsxs(k.Fragment,{children:[k.jsx("div",{style:{borderTop:`1px solid ${z.borderLight}`,margin:"8px 0"}}),k.jsx("div",{style:{fontWeight:600,marginBottom:4,color:z.textPrimary},children:"По моделям"}),Object.entries(n.modelUsage).map(([v,g])=>k.jsxs("div",{style:{marginBottom:6},children:[k.jsx("div",{style:{color:z.textPrimary,fontWeight:500},children:v}),k.jsxs("div",{style:{display:"flex",justifyContent:"space-between",paddingLeft:8},children:[k.jsx("span",{style:{color:z.textSecondary},children:"Токены"}),k.jsxs("span",{style:{color:z.textPrimary},children:[c(g.inputTokens)," / ",c(g.outputTokens)]})]}),k.jsxs("div",{style:{display:"flex",justifyContent:"space-between",paddingLeft:8},children:[k.jsx("span",{style:{color:z.textSecondary},children:"Стоимость"}),k.jsx("span",{style:{color:z.textPrimary},children:h(g.costUSD)})]})]},v))]})]}):k.jsx("div",{style:{color:z.textTertiary,fontSize:13},children:"Загрузка..."})]})]})}const c_=({size:e=14})=>k.jsxs("svg",{width:e,height:e,viewBox:"0 0 18 18",fill:"none",children:[k.jsx("rect",{x:"2",y:"2",width:"6",height:"6",rx:"1.5",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("rect",{x:"10",y:"2",width:"6",height:"6",rx:"1.5",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("rect",{x:"2",y:"10",width:"6",height:"6",rx:"1.5",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("rect",{x:"10",y:"10",width:"6",height:"6",rx:"1.5",stroke:"currentColor",strokeWidth:"1.5"})]}),Fit=()=>k.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[k.jsx("path",{d:"M5 2H3C2.44772 2 2 2.44772 2 3V11C2 11.5523 2.44772 12 3 12H11C11.5523 12 12 11.5523 12 11V9",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"}),k.jsx("path",{d:"M8 2H12V6",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),k.jsx("path",{d:"M12 2L7 7",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]}),Git=()=>k.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:k.jsx("path",{d:"M2 4h10M5 4V3a1 1 0 011-1h2a1 1 0 011 1v1M11 4v7a1 1 0 01-1 1H4a1 1 0 01-1-1V4",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})}),Uit=()=>k.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:k.jsx("path",{d:"M7 2V12M2 7H12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),Yit=({size:e=24})=>k.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[k.jsx("rect",{x:"4",y:"14",width:"4",height:"7",rx:"1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),k.jsx("rect",{x:"10",y:"8",width:"4",height:"13",rx:"1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),k.jsx("rect",{x:"16",y:"3",width:"4",height:"18",rx:"1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Wit=({size:e=24})=>k.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[k.jsx("ellipse",{cx:"12",cy:"6",rx:"8",ry:"3",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("path",{d:"M4 6v6c0 1.657 3.582 3 8 3s8-1.343 8-3V6",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("path",{d:"M4 12v6c0 1.657 3.582 3 8 3s8-1.343 8-3v-6",stroke:"currentColor",strokeWidth:"1.5"})]}),qit=({size:e=24})=>k.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[k.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("path",{d:"M12 7v5l3 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),k.jsx("path",{d:"M8 2l1.5 2M16 2l-1.5 2",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),gg=({size:e=24})=>k.jsxs(k.Fragment,{children:[k.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",style:{animation:"analitoly-spin 0.8s linear infinite"},children:[k.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",opacity:"0.2"}),k.jsx("path",{d:"M12 2a10 10 0 019.8 8",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})]}),k.jsx("style",{children:"@keyframes analitoly-spin { to { transform: rotate(360deg); } }"})]}),Xit={position:"absolute",top:-2,right:-2,minWidth:14,height:14,borderRadius:7,background:z.border,color:z.textSecondary,fontSize:9,fontWeight:600,display:"flex",alignItems:"center",justifyContent:"center",padding:"0 3px",lineHeight:1};function pu({title:e,onClick:t,children:n,style:r}){return k.jsx("button",{onClick:t,title:e,style:{width:32,height:32,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"1px solid transparent",borderRadius:12,cursor:"pointer",color:z.textTertiary,fontSize:15,transition:Pt.fast,...r},onMouseEnter:i=>{i.currentTarget.style.background=z.surfaceHover,i.currentTarget.style.borderColor=z.border,i.currentTarget.style.color=z.textPrimary},onMouseLeave:i=>{i.currentTarget.style.background="none",i.currentTarget.style.borderColor="transparent",i.currentTarget.style.color=z.textTertiary},children:n})}const fR=()=>k.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[k.jsx("circle",{cx:"5",cy:"5",r:"2.5",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("circle",{cx:"13",cy:"13",r:"2.5",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("path",{d:"M7 7L11 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),hR=()=>k.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[k.jsx("path",{d:"M3 14V8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),k.jsx("path",{d:"M7 14V4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),k.jsx("path",{d:"M11 14V9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),k.jsx("path",{d:"M15 14V6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),dR=()=>k.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[k.jsx("path",{d:"M7 2H4C3 2 2 3 2 4V14C2 15 3 16 4 16H7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),k.jsx("path",{d:"M12 12L16 9L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),k.jsx("path",{d:"M6 9H16",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),vR=()=>k.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[k.jsx("path",{d:"M8 10V2M8 10L5 7M8 10L11 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),k.jsx("path",{d:"M2 12V13C2 13.5523 2.44772 14 3 14H13C13.5523 14 14 13.5523 14 13V12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),pR=()=>k.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[k.jsx("path",{d:"M8 2V10M8 2L5 5M8 2L11 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),k.jsx("path",{d:"M2 12V13C2 13.5523 2.44772 14 3 14H13C13.5523 14 14 13.5523 14 13V12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]});function Zit({collapsed:e,showUsage:t,sessionId:n,inactiveConnectionCount:r=0,onShowUsage:i,onShowConnections:a,onShowDashboard:o,onImport:l,onDisconnect:s}){const c=at.useRef(null),h=async()=>{try{const g=await(await fetch("/api/connections/export")).json(),m=new Blob([JSON.stringify(g,null,2)],{type:"application/json"}),x=URL.createObjectURL(m),_=document.createElement("a");_.href=x,_.download=`analitoly-${new Date().toISOString().slice(0,10)}.analitoly`,_.click(),URL.revokeObjectURL(x)}catch{}},d=async v=>{var m;const g=(m=v.target.files)==null?void 0:m[0];if(g){try{const x=await g.text(),_=JSON.parse(x);await fetch("/api/connections/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(_)}),l()}catch{}v.target.value=""}};return e?k.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",alignItems:"center",padding:"12px 0"},children:[k.jsx("img",{src:"/AnalitolyShort.png",alt:"Analitoly",style:{width:32,height:32,objectFit:"contain",marginBottom:16}}),k.jsx("div",{style:{height:1,background:z.divider,width:"80%",marginBottom:12}}),k.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,alignItems:"center"},children:[k.jsx(pu,{title:"Обзор",onClick:o,style:{width:40,height:40,color:z.orange},children:k.jsx(c_,{size:18})}),k.jsxs("div",{style:{position:"relative"},children:[k.jsx(pu,{title:"Источники",onClick:a,style:{width:40,height:40},children:k.jsx(fR,{})}),r>0&&k.jsx("span",{style:Xit,children:r})]})]}),k.jsx("div",{style:{height:1,background:z.divider,width:"80%",margin:"12px 0"}}),k.jsxs("div",{style:{marginTop:"auto",display:"flex",flexDirection:"column",gap:4,alignItems:"center"},children:[k.jsx("div",{style:{position:"relative"},children:k.jsx(pu,{title:"Usage",onClick:i,style:{width:40,height:40,background:t?"rgba(255,140,66,0.15)":"none",borderColor:t?z.orange:"transparent"},children:k.jsx(hR,{})})}),k.jsx(pu,{title:"Импорт",onClick:()=>{var v;return(v=c.current)==null?void 0:v.click()},style:{width:40,height:40},children:k.jsx(vR,{})}),k.jsx(pu,{title:"Экспорт",onClick:h,style:{width:40,height:40},children:k.jsx(pR,{})}),k.jsx("div",{style:{height:1,background:z.divider,width:"80%",margin:"8px 0"}}),k.jsx(pu,{title:"Отключиться",onClick:s,style:{width:40,height:40,color:z.error},children:k.jsx(dR,{})})]}),k.jsx("input",{ref:c,type:"file",accept:".analitoly,.json",onChange:d,style:{display:"none"}})]}):k.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[k.jsxs("div",{style:{marginBottom:20},children:[k.jsx("img",{src:"/Analitoly.png",alt:"Analitoly",style:{height:36,objectFit:"contain"}}),k.jsx("input",{ref:c,type:"file",accept:".analitoly,.json",onChange:d,style:{display:"none"}})]}),k.jsxs("nav",{style:{display:"flex",flexDirection:"column",gap:4},children:[k.jsxs("a",{href:"#",onClick:v=>{v.preventDefault(),o()},style:{padding:"12px 16px",fontSize:14,fontWeight:500,color:z.orange,background:z.orangeLight,borderRadius:12,textDecoration:"none",transition:Pt.normal,display:"flex",alignItems:"center",gap:10},children:[k.jsx(c_,{size:18}),"Обзор"]}),k.jsxs("a",{href:"#",onClick:v=>{v.preventDefault(),a()},style:{padding:"12px 16px",fontSize:14,fontWeight:400,color:z.textSecondary,background:"transparent",borderRadius:12,textDecoration:"none",transition:Pt.normal,display:"flex",alignItems:"center",gap:10,position:"relative"},onMouseEnter:v=>{v.currentTarget.style.background=z.surfaceHover,v.currentTarget.style.color=z.textPrimary},onMouseLeave:v=>{v.currentTarget.style.background="transparent",v.currentTarget.style.color=z.textSecondary},children:[k.jsx(fR,{}),"Источники",r>0&&k.jsx("span",{style:{marginLeft:"auto",minWidth:16,height:16,borderRadius:8,background:z.border,color:z.textSecondary,fontSize:10,fontWeight:600,display:"flex",alignItems:"center",justifyContent:"center",padding:"0 4px",lineHeight:1},children:r})]})]}),k.jsx("div",{style:{height:1,background:z.divider,margin:"16px 0"}}),k.jsxs("div",{style:{marginTop:"auto",display:"flex",flexDirection:"column",gap:8},children:[k.jsxs("div",{style:{position:"relative"},children:[k.jsxs("button",{onClick:i,style:{fontSize:14,fontWeight:500,background:t?"rgba(255,140,66,0.15)":z.surface,border:t?`1px solid ${z.orange}`:`1px solid ${z.border}`,borderRadius:12,padding:"12px 16px",cursor:"pointer",color:z.textPrimary,transition:Pt.normal,textAlign:"left",width:"100%",display:"flex",alignItems:"center",gap:10},onMouseEnter:v=>{t||(v.currentTarget.style.background=z.surfaceHover,v.currentTarget.style.borderColor=z.neutral)},onMouseLeave:v=>{t||(v.currentTarget.style.background=z.surface,v.currentTarget.style.borderColor=z.border)},children:[k.jsx(hR,{}),"Usage"]}),!e&&t&&k.jsx("div",{style:{position:"absolute",left:0,bottom:"100%",marginBottom:8,zIndex:1e3},children:k.jsx(jit,{sessionId:n,onClose:i})})]}),k.jsxs("button",{onClick:()=>{var v;return(v=c.current)==null?void 0:v.click()},style:{fontSize:14,fontWeight:500,background:z.surface,border:`1px solid ${z.border}`,borderRadius:12,padding:"12px 16px",cursor:"pointer",color:z.textPrimary,transition:Pt.normal,textAlign:"left",width:"100%",display:"flex",alignItems:"center",gap:10},onMouseEnter:v=>{v.currentTarget.style.background=z.surfaceHover,v.currentTarget.style.borderColor=z.neutral},onMouseLeave:v=>{v.currentTarget.style.background=z.surface,v.currentTarget.style.borderColor=z.border},children:[k.jsx(vR,{}),"Импорт"]}),k.jsxs("button",{onClick:h,style:{fontSize:14,fontWeight:500,background:z.surface,border:`1px solid ${z.border}`,borderRadius:12,padding:"12px 16px",cursor:"pointer",color:z.textPrimary,transition:Pt.normal,textAlign:"left",width:"100%",display:"flex",alignItems:"center",gap:10},onMouseEnter:v=>{v.currentTarget.style.background=z.surfaceHover,v.currentTarget.style.borderColor=z.neutral},onMouseLeave:v=>{v.currentTarget.style.background=z.surface,v.currentTarget.style.borderColor=z.border},children:[k.jsx(pR,{}),"Экспорт"]}),k.jsx("div",{style:{height:1,background:z.divider,margin:"12px 0"}}),k.jsxs("button",{onClick:s,style:{fontSize:14,fontWeight:500,background:z.surface,border:`1px solid ${z.border}`,borderRadius:12,padding:"12px 16px",cursor:"pointer",color:z.error,transition:Pt.normal,textAlign:"left",width:"100%",display:"flex",alignItems:"center",gap:10},onMouseEnter:v=>{v.currentTarget.style.background="#FFEBEE",v.currentTarget.style.borderColor=z.error},onMouseLeave:v=>{v.currentTarget.style.background=z.surface,v.currentTarget.style.borderColor=z.border},children:[k.jsx(dR,{}),"Отключиться"]})]})]})}const $it={postgresql:"/PostgreSQL.png",mongodb:"/Mongodb.png",graylog:"/Graylog.png",grafana:"/Grafana.png",gitlab:"/Gitlab.png"};function Qit(e){if(!e.active)return{color:z.textDisabled,label:"Не подключено",bg:z.surfaceHover};if(e.state){if(e.state.status==="cloning")return{color:z.warning,label:"Клонирование...",bg:"#fff3e0"};if(e.state.status==="error")return{color:z.error,label:"Ошибка",bg:"#ffebee"}}return{color:z.orange,label:"Подключено",bg:z.orangeLight}}function gR({title:e,onClick:t,children:n,hoverColor:r}){return k.jsx("button",{onClick:i=>{i.stopPropagation(),t()},title:e,style:{width:30,height:30,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",borderRadius:8,cursor:"pointer",color:z.textTertiary,transition:Pt.fast,padding:0},onMouseEnter:i=>{i.currentTarget.style.background=z.surfaceHover,i.currentTarget.style.color=r||z.textPrimary},onMouseLeave:i=>{i.currentTarget.style.background="none",i.currentTarget.style.color=z.textTertiary},children:n})}function Kit({connection:e,onEdit:t,onToggle:n,onDelete:r}){const i=Qit(e),a=$it[e.type];return k.jsxs("div",{onClick:()=>t(e),style:{display:"flex",alignItems:"center",gap:10,padding:"10px 12px",background:z.surface,border:`1px solid ${z.borderLight}`,borderRadius:12,transition:Pt.normal,cursor:"pointer"},onMouseEnter:o=>{o.currentTarget.style.borderColor=z.border,o.currentTarget.style.boxShadow=xe.xs,o.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:o=>{o.currentTarget.style.borderColor=z.borderLight,o.currentTarget.style.boxShadow="none",o.currentTarget.style.transform="none"},children:[k.jsx("div",{style:{width:32,height:32,borderRadius:8,background:z.surfaceHover,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:a?k.jsx("img",{src:a,alt:"",style:{width:20,height:20,objectFit:"contain"}}):k.jsx("span",{style:{fontSize:16},children:"📁"})}),k.jsx("div",{style:{flex:1,minWidth:0},children:k.jsx("div",{style:{fontSize:13,fontWeight:500,color:e.active?z.textPrimary:z.textTertiary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"system-ui, sans-serif"},children:e.name})}),k.jsx("span",{style:{fontSize:11,fontWeight:500,color:i.color,background:i.bg,padding:"2px 8px",borderRadius:12,whiteSpace:"nowrap",flexShrink:0,marginRight:4,fontFamily:"system-ui, sans-serif"},children:i.label}),k.jsxs("div",{style:{display:"flex",gap:2,flexShrink:0},children:[k.jsx(gR,{title:e.active?"Деактивировать":"Активировать",onClick:()=>n(e),hoverColor:e.active?z.warning:z.teal,children:e.active?k.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none",children:[k.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("line",{x1:"5",y1:"5",x2:"11",y2:"11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}):k.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none",children:[k.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("path",{d:"M6 8L7.5 9.5L10.5 6.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),k.jsx(gR,{title:"Удалить",onClick:()=>r(e),hoverColor:z.error,children:k.jsx("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none",children:k.jsx("path",{d:"M3 4.5H13M5.5 4.5V3.5C5.5 2.94772 5.94772 2.5 6.5 2.5H9.5C10.0523 2.5 10.5 2.94772 10.5 3.5V4.5M6.5 7V11.5M9.5 7V11.5M4.5 4.5L5 13C5 13.5523 5.44772 14 6 14H10C10.5523 14 11 13.5523 11 13L11.5 4.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})}const Jit=[{key:"database",title:"Базы данных",tiles:[{type:"postgresql",label:"PostgreSQL",icon:"/PostgreSQL.png",description:"Реляционная БД"},{type:"mongodb",label:"MongoDB",icon:"/Mongodb.png",description:"Документная БД"}]},{key:"analytics",title:"Аналитика",tiles:[{type:"graylog",label:"Graylog",icon:"/Graylog.png",description:"Поиск по логам"},{type:"grafana",label:"Grafana",icon:"/Grafana.png",description:"Метрики и дашборды"}]},{key:"repository",title:"Репозитории",tiles:[{type:"local",label:"Локальный",icon:"",description:"Папка на диске"},{type:"gitlab",label:"GitLab",icon:"/Gitlab.png",description:"Git-репозиторий"}]}];function tat({tile:e,count:t,onClick:n}){return k.jsxs("div",{onClick:n,style:{flex:"1 1 0",minWidth:120,minHeight:130,padding:"16px 12px",background:z.surface,border:`1px solid ${z.border}`,borderRadius:12,cursor:"pointer",transition:Pt.normal,position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:8},onMouseEnter:r=>{r.currentTarget.style.boxShadow=xe.md,r.currentTarget.style.borderColor=z.orange,r.currentTarget.style.transform="translateY(-2px) scale(1.01)"},onMouseLeave:r=>{r.currentTarget.style.boxShadow="none",r.currentTarget.style.borderColor=z.border,r.currentTarget.style.transform="none"},children:[t>0&&k.jsx("span",{style:{position:"absolute",top:-6,right:-6,width:20,height:20,borderRadius:"50%",background:z.teal,color:"#fff",fontSize:10,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",boxShadow:xe.sm,border:`2px solid ${z.surface}`},children:t}),e.icon?k.jsx("img",{src:e.icon,alt:e.label,style:{width:50,height:50,objectFit:"contain"}}):k.jsx("span",{style:{fontSize:30},children:"📁"}),k.jsx("div",{style:{fontSize:15,fontWeight:600,color:z.textPrimary,fontFamily:"system-ui, sans-serif"},children:e.label})]})}function eat({connections:e,onAddNew:t,onEdit:n,onToggle:r,onDelete:i}){const a=e.filter(l=>!l.deletedAt),o=l=>a.filter(s=>s.type===l).length;return k.jsxs("div",{style:{display:"flex",gap:32,minHeight:0},children:[k.jsx("div",{style:{flex:"1 1 55%",minWidth:0},children:Jit.map((l,s)=>k.jsxs("div",{children:[s>0&&k.jsx("div",{style:{height:1,background:z.divider,margin:"20px 0"}}),k.jsx("h4",{style:{fontSize:12,fontWeight:700,color:z.textTertiary,textTransform:"uppercase",letterSpacing:1,marginBottom:12,marginTop:s===0?0:void 0,fontFamily:"system-ui, sans-serif"},children:l.title}),k.jsx("div",{style:{display:"flex",gap:12,flexWrap:"wrap"},children:l.tiles.map(c=>k.jsx(tat,{tile:c,count:o(c.type),onClick:()=>t(c.type)},c.type))})]},l.key))}),k.jsxs("div",{style:{flex:"1 1 45%",minWidth:240,borderLeft:`1px solid ${z.divider}`,paddingLeft:24,display:"flex",flexDirection:"column"},children:[k.jsxs("h4",{style:{fontSize:12,fontWeight:700,color:z.textTertiary,textTransform:"uppercase",letterSpacing:1,marginBottom:12,marginTop:0,fontFamily:"system-ui, sans-serif"},children:["Подключения (",a.length,")"]}),a.length===0?k.jsxs("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",gap:8,color:z.textTertiary,fontSize:13,fontFamily:"system-ui, sans-serif"},children:[k.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 16 16",fill:"none",style:{opacity:.3},children:[k.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1"}),k.jsx("path",{d:"M5.5 8H10.5M8 5.5V10.5",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round"})]}),"Нет подключений"]}):k.jsx("div",{className:"custom-scrollbar",style:{display:"flex",flexDirection:"column",gap:6,overflowY:"auto",flex:1},children:a.map(l=>k.jsx(Kit,{connection:l,onEdit:n,onToggle:r,onDelete:i},l.id))})]})]})}const nat={postgresql:"PostgreSQL",mongodb:"MongoDB",graylog:"Graylog",grafana:"Grafana",local:"Локальный проект",gitlab:"GitLab"},mR={width:"100%",padding:"8px 12px",fontSize:13,lineHeight:1.5,border:`1px solid ${z.border}`,borderRadius:8,boxSizing:"border-box",outline:"none",transition:Pt.normal,background:z.surface,color:z.textPrimary,fontFamily:"system-ui, sans-serif"},yR={fontSize:12,color:z.textSecondary,marginBottom:4,display:"block",fontWeight:500,fontFamily:"system-ui, sans-serif"};function rat({type:e,editing:t,onSave:n,onCancel:r}){const[i,a]=at.useState(""),[o,l]=at.useState({}),[s,c]=at.useState(!1),[h,d]=at.useState(null),[v,g]=at.useState(0),m=at.useRef(null);at.useEffect(()=>(s?(g(0),m.current=setInterval(()=>g(w=>w+1),1e3)):(m.current&&clearInterval(m.current),m.current=null),()=>{m.current&&clearInterval(m.current)}),[s]),at.useEffect(()=>{if(t){a(t.name);const w=t.config,A={};for(const D of Object.keys(w))A[D]=w[D]==="***"?"":String(w[D]??"");l(A)}else a(""),l(iat(e));d(null)},[e,t]);const x=()=>{const w={};for(const[A,D]of Object.entries(o))A==="port"?w[A]=Number(D)||0:D!==""&&(w[A]=D);return w},_=async()=>{c(!0),d(null);try{const w=x();if(t){const N=t.config;for(const[E,O]of Object.entries(N))(!(E in w)||w[E]===""&&O!=="***")&&(w[E]=O)}const D=await(await fetch("/api/connections/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:(t==null?void 0:t.type)??e,config:w}),signal:AbortSignal.timeout(7e4)})).json();if(!D.connected){d(D.error||"Не удалось подключиться");return}const M=x();let L;if(t){const N={};for(const[E,O]of Object.entries(M))["password","serviceAccountToken","token"].includes(E)&&!O||(N[E]=O);L=await fetch(`/api/connections/${t.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,config:N}),signal:AbortSignal.timeout(7e4)})}else L=await fetch("/api/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:e,name:i,config:M}),signal:AbortSignal.timeout(7e4)});if(!L.ok){const N=await L.json().catch(()=>({}));d(N.message||L.statusText);return}let I=await L.json();if(["gitlab","local"].includes(I.type??e)){const N=await fetch(`/api/connections/${I.id}/connect`,{method:"POST",signal:AbortSignal.timeout(12e4)});if(N.ok)I=await N.json();else{const E=await N.json().catch(()=>({}));d(E.message||"Не удалось подключить проект");return}}n(I)}catch(w){w instanceof DOMException&&w.name==="TimeoutError"?d("Превышено время ожидания подключения (70 сек)"):d(String(w))}finally{c(!1)}},b=(w,A,D,M)=>k.jsxs("div",{children:[k.jsx("label",{style:yR,children:A}),k.jsx("input",{value:o[w]||"",onChange:L=>l({...o,[w]:L.target.value}),placeholder:D,type:(M==null?void 0:M.type)||"text",style:mR,onFocus:L=>{L.currentTarget.style.borderColor=z.orange,L.currentTarget.style.boxShadow=xe.focusOrange},onBlur:L=>{L.currentTarget.style.borderColor=z.border,L.currentTarget.style.boxShadow="none"},onMouseEnter:L=>{document.activeElement!==L.currentTarget&&(L.currentTarget.style.borderColor=z.borderLight,L.currentTarget.style.boxShadow=xe.xs)},onMouseLeave:L=>{document.activeElement!==L.currentTarget&&(L.currentTarget.style.borderColor=z.border,L.currentTarget.style.boxShadow="none")}})]},w),S=()=>{switch(e){case"postgresql":case"mongodb":return k.jsxs(k.Fragment,{children:[k.jsxs("div",{style:{display:"flex",gap:8},children:[k.jsx("div",{style:{flex:1},children:b("host","Host","localhost")}),k.jsx("div",{style:{width:100},children:b("port","Port",e==="postgresql"?"5432":"27017")})]}),b("database","Database","mydb"),b("username","Username","user"),b("password","Password",t?"(без изменений)":"",{type:"password"}),e==="postgresql"&&b("schema","Schema","public (авто)")]});case"graylog":return k.jsxs(k.Fragment,{children:[b("baseUrl","Base URL","https://graylog.example.com"),b("username","Username","admin"),b("password","Password",t?"(без изменений)":"",{type:"password"})]});case"grafana":return k.jsxs(k.Fragment,{children:[b("url","URL","https://grafana.example.com"),b("serviceAccountToken","Service Account Token",t?"(без изменений)":"glsa_...",{type:"password"})]});case"local":return b("path","Путь к проекту","/home/user/project");case"gitlab":return k.jsxs(k.Fragment,{children:[b("url","URL репозитория","https://gitlab.com/group/project"),b("token","Access Token",t?"(без изменений)":"",{type:"password"}),b("branch","Branch (опционально)","main")]});default:return null}};return k.jsx("div",{children:k.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:14,maxWidth:460,margin:"0 auto"},children:[k.jsxs("div",{children:[k.jsx("label",{style:yR,children:"Название"}),k.jsx("input",{value:i,onChange:w=>a(w.target.value),placeholder:nat[e]||e,style:mR,onFocus:w=>{w.currentTarget.style.borderColor=z.orange,w.currentTarget.style.boxShadow=xe.focusOrange},onBlur:w=>{w.currentTarget.style.borderColor=z.border,w.currentTarget.style.boxShadow="none"},onMouseEnter:w=>{document.activeElement!==w.currentTarget&&(w.currentTarget.style.borderColor=z.borderLight,w.currentTarget.style.boxShadow=xe.xs)},onMouseLeave:w=>{document.activeElement!==w.currentTarget&&(w.currentTarget.style.borderColor=z.border,w.currentTarget.style.boxShadow="none")}})]}),S(),h&&k.jsxs("div",{style:{fontSize:12,color:z.error,padding:"6px 0",fontFamily:"system-ui, sans-serif"},children:["Ошибка: ",h]}),k.jsxs("div",{style:{display:"flex",gap:16,marginTop:28,justifyContent:"flex-end"},children:[k.jsx("button",{onClick:r,style:{padding:"12px 24px",fontSize:14,fontWeight:500,border:`1px solid ${z.border}`,borderRadius:12,background:z.surfaceHover,color:z.textSecondary,cursor:"pointer",transition:Pt.normal,fontFamily:"system-ui, sans-serif"},onMouseEnter:w=>{w.currentTarget.style.background=z.divider,w.currentTarget.style.color=z.textPrimary},onMouseLeave:w=>{w.currentTarget.style.background=z.surfaceHover,w.currentTarget.style.color=z.textSecondary},children:"Отмена"}),k.jsx("button",{onClick:_,disabled:s||!i.trim(),style:{padding:"14px 36px",fontSize:14,fontWeight:600,border:"none",borderRadius:12,background:s||!i.trim()?z.border:z.orange,color:"#fff",cursor:s||!i.trim()?"not-allowed":"pointer",opacity:s||!i.trim()?.5:1,boxShadow:s||!i.trim()?"none":xe.sm,transition:Pt.normal,fontFamily:"system-ui, sans-serif"},onMouseEnter:w=>{!s&&i.trim()&&(w.currentTarget.style.background=z.orangeHover,w.currentTarget.style.boxShadow=xe.md)},onMouseLeave:w=>{!s&&i.trim()&&(w.currentTarget.style.background=z.orange,w.currentTarget.style.boxShadow=xe.sm)},children:s?`Подключение... ${v}с`:"Подключить"})]})]})})}function iat(e){switch(e){case"postgresql":return{host:"",port:"5432",database:"",username:"",password:"",schema:""};case"mongodb":return{host:"",port:"27017",database:"",username:"",password:""};case"graylog":return{baseUrl:"",username:"",password:""};case"grafana":return{url:"",serviceAccountToken:""};case"local":return{path:""};case"gitlab":return{url:"",token:"",branch:""};default:return{}}}function aat({onClose:e}){const[t,n]=at.useState("categories"),[r,i]=at.useState(""),[a,o]=at.useState(null),[l,s]=at.useState([]),c=async()=>{try{const x=await fetch("/api/connections");x.ok&&s(await x.json())}catch{}};at.useEffect(()=>{c()},[]);const h=x=>{i(x),o(null),n("form")},d=x=>{i(x.type),o(x),n("form")},v=async x=>{const _=x.active?"deactivate":"activate";await fetch(`/api/connections/${x.id}/${_}`,{method:"POST"}),c()},g=async x=>{await fetch(`/api/connections/${x.id}`,{method:"DELETE"}),c()},m=()=>{n("categories"),o(null),c()};return k.jsx("div",{onClick:e,style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"rgba(0, 0, 0, 0.35)",backdropFilter:"blur(4px)",zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center"},children:k.jsxs("div",{onClick:x=>x.stopPropagation(),role:"dialog","aria-label":t==="categories"?"Источники данных":a?"Редактирование подключения":"Новое подключение",style:{width:t==="categories"?"75vw":"65vw",maxWidth:t==="categories"?900:680,maxHeight:"92vh",background:z.surface,borderRadius:20,boxShadow:"0 24px 48px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.08)",display:"flex",flexDirection:"column",overflow:"hidden",fontFamily:"system-ui, sans-serif"},children:[k.jsxs("div",{style:{padding:"18px 28px",borderBottom:`1px solid ${z.border}`,display:"flex",justifyContent:"space-between",alignItems:"center",background:`linear-gradient(135deg, ${z.surface} 0%, ${z.surfaceHover} 100%)`},children:[k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[t==="form"&&k.jsx("button",{onClick:()=>{n("categories"),o(null)},style:{background:"none",border:"none",cursor:"pointer",fontSize:18,color:z.textSecondary,padding:"4px 8px",borderRadius:6,transition:Pt.fast,display:"flex",alignItems:"center"},onMouseEnter:x=>{x.currentTarget.style.background=z.surfaceHover},onMouseLeave:x=>{x.currentTarget.style.background="none"},children:k.jsx("svg",{width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",children:k.jsx("path",{d:"M10 3L5 8L10 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),k.jsx("h2",{style:{margin:0,fontSize:17,fontWeight:600,color:z.textPrimary},children:t==="categories"?"Источники данных":a?"Редактирование":"Новое подключение"})]}),k.jsx("button",{onClick:e,style:{width:32,height:32,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"1px solid transparent",borderRadius:8,cursor:"pointer",color:z.textTertiary,fontSize:16,transition:Pt.fast},onMouseEnter:x=>{x.currentTarget.style.background=z.surfaceHover,x.currentTarget.style.borderColor=z.border,x.currentTarget.style.color=z.textPrimary},onMouseLeave:x=>{x.currentTarget.style.background="none",x.currentTarget.style.borderColor="transparent",x.currentTarget.style.color=z.textTertiary},children:"✕"})]}),k.jsx("div",{style:{flex:1,padding:28,overflowY:"auto"},children:t==="categories"?k.jsx(eat,{connections:l,onAddNew:h,onEdit:d,onToggle:v,onDelete:g}):k.jsx(rat,{type:r,editing:a,onSave:m,onCancel:()=>{n("categories"),o(null)}})})]})})}const oat=200;function xR(e,t){let n,r;return e?(n=z.orange,r="#fff"):t?(n=z.orangeLight,r=z.orange):(n=z.surfaceHover,r=z.textSecondary),{display:"flex",alignItems:"center",gap:6,padding:"12px 14px",fontSize:15,fontWeight:e?600:500,color:r,background:n,border:"none",borderRadius:8,cursor:"pointer",transition:Pt.fast,whiteSpace:"nowrap",flexShrink:0}}const bR={display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:6,border:`1px solid ${z.border}`,background:z.surface,color:z.textSecondary,transition:Pt.fast,flexShrink:0,padding:0},lat=()=>k.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:k.jsx("path",{d:"M8.5 3L4.5 7L8.5 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),sat=()=>k.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:k.jsx("path",{d:"M5.5 3L9.5 7L5.5 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function uat({onCloseTab:e}){const{state:t,setActiveTab:n,getChart:r}=ls(),{tabs:i,activeTabId:a}=t,o=i.filter(x=>x.type!=="dashboard"),l=at.useRef(null),[s,c]=at.useState(!1),[h,d]=at.useState(!1),v=at.useCallback(()=>{const x=l.current;if(!x){c(!1),d(!1);return}c(x.scrollLeft>1),d(x.scrollLeft+x.clientWidth<x.scrollWidth-1)},[]);at.useEffect(()=>{const x=l.current;if(!x)return;x.addEventListener("scroll",v);const _=new ResizeObserver(v);return _.observe(x),v(),()=>{x.removeEventListener("scroll",v),_.disconnect()}},[v,o.length]);const g=x=>{const _=l.current;if(!_)return;const b=Array.from(_.children);if(b.length===0)return;const S=_.getBoundingClientRect();if(x===-1){for(let w=b.length-1;w>=0;w--){const A=b[w].getBoundingClientRect();if(A.left<S.left-1){_.scrollTo({left:_.scrollLeft+(A.left-S.left),behavior:"smooth"});return}}_.scrollTo({left:0,behavior:"smooth"})}else for(const w of b){const A=w.getBoundingClientRect();if(A.right>S.right+1){_.scrollTo({left:_.scrollLeft+(A.right-S.right),behavior:"smooth"});return}}};at.useEffect(()=>{const x=l.current;if(!x)return;const _=o.findIndex(D=>D.id===a);if(_<0)return;const S=Array.from(x.children)[_];if(!S)return;const w=x.getBoundingClientRect(),A=S.getBoundingClientRect();A.left<w.left?x.scrollTo({left:x.scrollLeft+(A.left-w.left),behavior:"smooth"}):A.right>w.right&&x.scrollTo({left:x.scrollLeft+(A.right-w.right),behavior:"smooth"})},[a,o]);const m=o.length>0;return k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexShrink:0,paddingBottom:12,marginBottom:12,borderBottom:`1px solid ${z.border}`},children:[k.jsxs("div",{style:xR(a==="dashboard",!0),onClick:()=>n("dashboard"),children:[k.jsx(c_,{size:18}),k.jsx("span",{children:"Дашборд"})]}),m&&k.jsx("div",{ref:l,className:"analitoly-tab-scroll",style:{display:"flex",gap:6,overflowX:"scroll",flex:1,minWidth:0,scrollbarWidth:"none"},children:o.map(x=>{var S;const _=x.id===a,b=x.type==="chart"?((S=r(x.chartId))==null?void 0:S.title)??"График":"";return k.jsxs("div",{style:xR(_,!1),onClick:()=>n(x.id),children:[k.jsx("span",{style:{maxWidth:oat,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block"},children:b}),x.type==="chart"&&k.jsx("span",{onClick:w=>{w.stopPropagation(),e(x.id,x.chartId)},style:{fontSize:10,color:_?"rgba(255,255,255,0.7)":z.textTertiary,cursor:"pointer",padding:"2px 3px",borderRadius:4,lineHeight:1,marginLeft:2},onMouseEnter:w=>{w.currentTarget.style.color=_?"#fff":z.error},onMouseLeave:w=>{w.currentTarget.style.color=_?"rgba(255,255,255,0.7)":z.textTertiary},children:"✕"})]},x.id)})}),m&&k.jsxs("div",{style:{display:"flex",gap:4,flexShrink:0},children:[k.jsx("button",{disabled:!s,style:{...bR,opacity:s?1:.25,cursor:s?"pointer":"default"},onClick:()=>s&&g(-1),onMouseEnter:x=>{s&&(x.currentTarget.style.borderColor=z.orange)},onMouseLeave:x=>{x.currentTarget.style.borderColor=z.border},children:k.jsx(lat,{})}),k.jsx("button",{disabled:!h,style:{...bR,opacity:h?1:.25,cursor:h?"pointer":"default"},onClick:()=>h&&g(1),onMouseEnter:x=>{h&&(x.currentTarget.style.borderColor=z.orange)},onMouseLeave:x=>{x.currentTarget.style.borderColor=z.border},children:k.jsx(sat,{})})]}),k.jsx("style",{children:".analitoly-tab-scroll::-webkit-scrollbar { display: none; }"})]})}const _R={display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:6,border:"none",background:"rgba(255,255,255,0.9)",cursor:"pointer",color:z.textTertiary,transition:Pt.fast,boxShadow:xe.sm};function cat({chart:e,displayOption:t,loading:n,onOpen:r,onRemove:i}){const[a,o]=at.useState(!1);return k.jsxs("div",{style:{background:z.surface,border:`1px solid ${a?z.orange:z.border}`,borderRadius:12,overflow:"hidden",transition:Pt.normal,boxShadow:a?xe.md:xe.sm,position:"relative"},onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[k.jsx("div",{style:{height:250,pointerEvents:"none",padding:8},children:k.jsx(WS,{chartId:e.chartId,option:t??e.echartsOption,height:230,interactive:!1})}),k.jsxs("div",{style:{padding:"8px 12px 12px",borderTop:`1px solid ${z.borderLight}`},children:[k.jsx("div",{style:{fontSize:13,fontWeight:600,color:z.textPrimary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title}),e.description&&k.jsx("div",{style:{fontSize:11,color:z.textTertiary,marginTop:2,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.description})]}),n&&k.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(255,255,255,0.6)",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:12,zIndex:10,color:z.orange},children:k.jsx(gg,{size:28})}),a&&!n&&k.jsxs("div",{style:{position:"absolute",top:8,right:8,display:"flex",gap:4},children:[k.jsx("button",{title:"Открыть в новой вкладке",style:_R,onClick:r,onMouseEnter:l=>{l.currentTarget.style.color=z.teal},onMouseLeave:l=>{l.currentTarget.style.color=z.textTertiary},children:k.jsx(Fit,{})}),k.jsx("button",{title:"Удалить с дашборда",style:_R,onClick:()=>{confirm("Удалить график с дашборда?")&&i()},onMouseEnter:l=>{l.currentTarget.style.color=z.error},onMouseLeave:l=>{l.currentTarget.style.color=z.textTertiary},children:k.jsx(Git,{})})]})]})}const fat=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],hat=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];function vn(e){return String(e).padStart(2,"0")}function dat(e){if(!e){const n=new Date;return{year:n.getFullYear(),month:n.getMonth(),day:n.getDate(),hour:n.getHours(),minute:n.getMinutes()}}const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth(),day:t.getDate(),hour:t.getHours(),minute:t.getMinutes()}}function vat(e,t){return new Date(e,t+1,0).getDate()}function pat(e,t){const n=new Date(e,t,1).getDay();return n===0?6:n-1}function gat(e){if(!e)return"";const t=new Date(e);return`${vn(t.getDate())}.${vn(t.getMonth()+1)}.${t.getFullYear()} ${vn(t.getHours())}:${vn(t.getMinutes())}`}function SR({value:e,onChange:t,placeholder:n="Выбрать..."}){const[r,i]=at.useState(!1),a=dat(e),[o,l]=at.useState(a.year),[s,c]=at.useState(a.month),[h,d]=at.useState(e?a.day:0),[v,g]=at.useState(a.hour),[m,x]=at.useState(a.minute),_=at.useRef(null);at.useEffect(()=>{if(!r)return;const B=U=>{_.current&&!_.current.contains(U.target)&&i(!1)};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[r]);const b=vat(o,s),S=pat(o,s),w=new Date,A=`${w.getFullYear()}-${vn(w.getMonth()+1)}-${vn(w.getDate())}`,D=()=>{s===0?(l(o-1),c(11)):c(s-1)},M=()=>{s===11?(l(o+1),c(0)):c(s+1)},L=B=>{d(B);const U=`${o}-${vn(s+1)}-${vn(B)}T${vn(v)}:${vn(m)}`;t(U)},I=(B,U)=>{if(g(B),x(U),h>0){const W=`${o}-${vn(s+1)}-${vn(h)}T${vn(B)}:${vn(U)}`;t(W)}},N=B=>e&&h===B&&o===a.year&&s===a.month,E=B=>A===`${o}-${vn(s+1)}-${vn(B)}`,O=[];for(let B=0;B<S;B++)O.push(null);for(let B=1;B<=b;B++)O.push(B);const j={background:"none",border:"none",cursor:"pointer",color:z.textSecondary,padding:"2px 6px",borderRadius:4,fontSize:14,lineHeight:1,transition:Pt.fast};return k.jsxs("div",{ref:_,style:{position:"relative",display:"inline-block"},children:[k.jsx("button",{onClick:()=>i(!r),style:{fontSize:12,padding:"7px 10px",borderRadius:6,border:`1px solid ${r?z.orange:z.border}`,background:z.surface,color:e?z.textPrimary:z.textTertiary,cursor:"pointer",transition:Pt.fast,fontFamily:"inherit",minWidth:140,textAlign:"left"},children:e?gat(e):n}),r&&k.jsxs("div",{style:{position:"absolute",top:"100%",left:0,marginTop:4,background:z.surface,border:`1px solid ${z.border}`,borderRadius:10,boxShadow:xe.lg,padding:12,zIndex:100,width:252,userSelect:"none"},children:[k.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[k.jsx("button",{style:j,onClick:D,onMouseEnter:B=>{B.currentTarget.style.background=z.surfaceHover},onMouseLeave:B=>{B.currentTarget.style.background="none"},children:"‹"}),k.jsxs("span",{style:{fontSize:13,fontWeight:600,color:z.textPrimary},children:[hat[s]," ",o]}),k.jsx("button",{style:j,onClick:M,onMouseEnter:B=>{B.currentTarget.style.background=z.surfaceHover},onMouseLeave:B=>{B.currentTarget.style.background="none"},children:"›"})]}),k.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:0,marginBottom:2},children:fat.map(B=>k.jsx("div",{style:{fontSize:10,fontWeight:500,color:z.textTertiary,textAlign:"center",padding:"2px 0"},children:B},B))}),k.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:1},children:O.map((B,U)=>{if(B===null)return k.jsx("div",{},`e${U}`);const W=N(B),H=E(B);return k.jsx("button",{onClick:()=>L(B),style:{width:32,height:32,borderRadius:8,border:"none",background:W?z.orange:"transparent",color:W?"#fff":H?z.orange:z.textPrimary,fontWeight:W||H?600:400,fontSize:12,cursor:"pointer",transition:Pt.fast,display:"flex",alignItems:"center",justifyContent:"center"},onMouseEnter:q=>{W||(q.currentTarget.style.background=z.surfaceHover)},onMouseLeave:q=>{W||(q.currentTarget.style.background="transparent")},children:B},B)})}),k.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,marginTop:10,padding:"8px 0 0",borderTop:`1px solid ${z.borderLight}`},children:[k.jsx("span",{style:{fontSize:11,color:z.textTertiary,marginRight:4},children:"Время"}),k.jsx("input",{type:"number",min:0,max:23,value:vn(v),onChange:B=>{const U=Math.min(23,Math.max(0,parseInt(B.target.value)||0));I(U,m)},style:{width:36,fontSize:13,fontWeight:500,padding:"4px 0",borderRadius:6,border:`1px solid ${z.border}`,textAlign:"center",outline:"none",color:z.textPrimary,background:z.surface,fontFamily:"inherit",transition:Pt.fast},onFocus:B=>{B.currentTarget.style.borderColor=z.orange},onBlur:B=>{B.currentTarget.style.borderColor=z.border}}),k.jsx("span",{style:{fontSize:13,fontWeight:600,color:z.textTertiary},children:":"}),k.jsx("input",{type:"number",min:0,max:59,value:vn(m),onChange:B=>{const U=Math.min(59,Math.max(0,parseInt(B.target.value)||0));I(v,U)},style:{width:36,fontSize:13,fontWeight:500,padding:"4px 0",borderRadius:6,border:`1px solid ${z.border}`,textAlign:"center",outline:"none",color:z.textPrimary,background:z.surface,fontFamily:"inherit",transition:Pt.fast},onFocus:B=>{B.currentTarget.style.borderColor=z.orange},onBlur:B=>{B.currentTarget.style.borderColor=z.border}})]})]})]})}const mat=[{label:"15м",ms:15*6e4},{label:"1ч",ms:60*6e4},{label:"6ч",ms:360*6e4},{label:"24ч",ms:1440*6e4},{label:"7д",ms:10080*6e4},{label:"30д",ms:720*60*6e4}];function wR(e){const t=n=>String(n).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}T${t(e.getHours())}:${t(e.getMinutes())}`}function tN({onApply:e,onReset:t}){const[n,r]=at.useState(""),[i,a]=at.useState(""),[o,l]=at.useState(!1),[s,c]=at.useState(null),h=(m,x)=>{const _=new Date,b=new Date(_.getTime()-x),S=wR(b),w=wR(_);r(S),a(w),c(m),l(!1),e({from:S,to:w})},d=()=>{!n||!i||(c(null),e({from:n,to:i}))},v=()=>{r(""),a(""),c(null),l(!1),t()},g=s!==null||n&&i;return k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[k.jsx("div",{style:{display:"flex",gap:2,background:z.surfaceHover,borderRadius:8,padding:3},children:mat.map((m,x)=>{const _=s===x;return k.jsx("button",{style:{fontSize:13,fontWeight:500,padding:"6px 12px",borderRadius:6,border:"none",background:_?z.orange:"transparent",color:_?"#fff":z.textSecondary,cursor:"pointer",transition:Pt.fast,lineHeight:1},onClick:()=>h(x,m.ms),onMouseEnter:b=>{_||(b.currentTarget.style.background=z.surface,b.currentTarget.style.color=z.textPrimary)},onMouseLeave:b=>{_||(b.currentTarget.style.background="transparent",b.currentTarget.style.color=z.textSecondary)},children:m.label},m.label)})}),k.jsx("button",{style:{fontSize:13,fontWeight:500,padding:"9px 12px",borderRadius:6,border:"none",background:o?z.orangeLight:z.surfaceHover,color:o?z.orange:z.textTertiary,cursor:"pointer",transition:Pt.fast,lineHeight:1},onClick:()=>l(!o),onMouseEnter:m=>{o||(m.currentTarget.style.color=z.textSecondary)},onMouseLeave:m=>{o||(m.currentTarget.style.color=z.textTertiary)},children:"⋯"}),o&&k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[k.jsx(SR,{value:n,onChange:m=>{r(m),c(null)},placeholder:"От..."}),k.jsx("span",{style:{fontSize:12,color:z.textTertiary},children:"→"}),k.jsx(SR,{value:i,onChange:m=>{a(m),c(null)},placeholder:"До..."}),k.jsx("button",{onClick:d,disabled:!n||!i,style:{fontSize:13,fontWeight:500,padding:"8px 14px",borderRadius:6,border:"none",background:n&&i?z.teal:z.border,color:"#fff",cursor:n&&i?"pointer":"default",opacity:n&&i?1:.4,transition:Pt.fast,lineHeight:1},children:"OK"})]}),g&&k.jsx("button",{style:{fontSize:12,padding:"4px 8px",borderRadius:6,border:"none",background:"transparent",color:z.textTertiary,cursor:"pointer",transition:Pt.fast,lineHeight:1},onClick:v,onMouseEnter:m=>{m.currentTarget.style.color=z.error},onMouseLeave:m=>{m.currentTarget.style.color=z.textTertiary},children:"✕"})]})}async function eN(e,t,n){const r=await fetch("/api/chart/rebuild",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({rebuildConfig:e,timeRange:t,originalOption:n})});if(!r.ok){const i=await r.text();throw new Error(i||"Chart rebuild failed")}return r.json()}function yat({hasActiveConnections:e,contextInitialized:t,onShowConnections:n,onInitialize:r,onComposeDashboard:i,onContextReady:a}){const{state:o,openInTab:l,removeFromDashboard:s,reloadDashboard:c}=ls(),{dashboardCharts:h}=o,[d,v]=at.useState(new Set),[g,m]=at.useState(null),[x,_]=at.useState(new Map),b=h.filter(B=>!!B.rebuildConfig),S=b.length>0,w=at.useCallback(B=>x.get(B.chartId)??B.echartsOption,[x]),A=at.useCallback(async B=>{const U=b;if(U.length===0)return;m(null);const W=new Set(U.map(X=>X.chartId));v(W);const q=(await Promise.allSettled(U.map(async X=>{const{echartsOption:J}=await eN(X.rebuildConfig,B,X.echartsOption);_(F=>new Map(F).set(X.chartId,J)),v(F=>{const Y=new Set(F);return Y.delete(X.chartId),Y})}))).filter(X=>X.status==="rejected").length;q>0&&m(`Не удалось перестроить ${q} из ${U.length} графиков`),v(new Set)},[b]),D=at.useCallback(()=>{_(new Map),m(null)},[]),[M,L]=at.useState(!1),[I,N]=at.useState(!1),E=at.useRef(null),O=at.useRef(null);at.useEffect(()=>{if(M)return E.current=setInterval(async()=>{try{const B=await fetch("/api/context");if(!B.ok)return;(await B.json()).initialized&&(L(!1),a==null||a())}catch{}},5e3),()=>{E.current&&clearInterval(E.current)}},[M,a]),at.useEffect(()=>{if(I)return O.current=setInterval(async()=>{try{const B=await fetch("/api/connections/dashboard");if(!B.ok)return;const U=await B.json();U.charts&&U.charts.length>0&&(N(!1),c())}catch{}},5e3),()=>{O.current&&clearInterval(O.current)}},[I,c]);const j=()=>{L(!0),r()};if(h.length===0){let B,U,W,H=null,q=!1;return e?!t&&!M?(B="Инициализируйте источники",U="Агент изучит подключённые источники и подготовит контекст для анализа",W=k.jsx(qit,{size:48}),H={label:"Инициализировать",onClick:j}):M?(B="Идёт инициализация...",U="Агент анализирует подключённые источники. Следите за прогрессом в чате",W=k.jsx(gg,{size:48})):I?(B="Составляем дашборд...",U="Агент генерирует графики на основе ваших данных. Следите за прогрессом в чате",W=k.jsx(gg,{size:48})):(B="Дашборд пуст",U="Попросите агента построить графики и добавьте их на дашборд кнопкой «На дашборд»",W=k.jsx(Yit,{size:48}),q=!0,H={label:"Составить дашборд",onClick:()=>{N(!0),i()}}):(B="Добавьте источники данных",U="Подключите базы данных, логи или проект, чтобы начать анализ",W=k.jsx(Wit,{size:48}),H={label:"Добавить источники",onClick:n}),k.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:z.textTertiary,gap:12},children:[k.jsx("div",{style:{opacity:M?.5:.25},children:W}),k.jsx("p",{style:{fontSize:14,margin:0,fontWeight:500},children:B}),k.jsx("p",{style:{fontSize:12,margin:0,maxWidth:300,textAlign:"center",lineHeight:1.5},children:U}),q&&k.jsx("p",{style:{fontSize:12,margin:"4px 0 0",color:z.border},children:"или"}),H&&k.jsx("button",{onClick:H.onClick,disabled:H.disabled,style:{marginTop:8,padding:"8px 16px",fontSize:13,fontWeight:500,color:"#fff",background:z.orange,border:"none",borderRadius:8,cursor:"pointer",opacity:H.disabled?.5:1},onMouseEnter:X=>{H.disabled||(X.currentTarget.style.opacity="0.85")},onMouseLeave:X=>{H.disabled||(X.currentTarget.style.opacity="1")},children:H.label})]})}return k.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",minHeight:0},children:[S&&k.jsxs("div",{style:{flexShrink:0,paddingBottom:12},children:[k.jsx(tN,{onApply:A,onReset:D}),g&&k.jsx("div",{style:{fontSize:12,color:z.error,marginTop:4},children:g})]}),k.jsxs("div",{className:"analitoly-dash-scroll",style:{flex:1,overflowY:"auto",padding:"0 0 16px 0",direction:"rtl"},children:[k.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:16,direction:"ltr"},children:h.map(B=>k.jsx(cat,{chart:B,displayOption:w(B),loading:d.has(B.chartId),onOpen:()=>l(B.chartId),onRemove:()=>s(B.chartId)},B.chartId))}),k.jsx("style",{children:`
|
|
208
|
+
.analitoly-dash-scroll {
|
|
209
|
+
scrollbar-width: thin;
|
|
210
|
+
scrollbar-color: ${z.border} transparent;
|
|
211
|
+
}
|
|
212
|
+
.analitoly-dash-scroll::-webkit-scrollbar {
|
|
213
|
+
width: 4px;
|
|
214
|
+
}
|
|
215
|
+
.analitoly-dash-scroll::-webkit-scrollbar-track {
|
|
216
|
+
background: transparent;
|
|
217
|
+
}
|
|
218
|
+
.analitoly-dash-scroll::-webkit-scrollbar-thumb {
|
|
219
|
+
background: ${z.border};
|
|
220
|
+
border-radius: 4px;
|
|
221
|
+
}
|
|
222
|
+
`})]})]})}function xat(e){const t=e.trim();return!t.startsWith("{")&&!t.startsWith("[")}function bat(e){const t=e.trim();if(t.startsWith("{")||t.startsWith("["))try{return JSON.stringify(JSON.parse(t),null,2)}catch{}return e}function _at(e){const t=e.xAxis,n=e.series;if(!(t!=null&&t.data)||!Array.isArray(n))return null;const r=t.data,i=["",...n.map((o,l)=>o.name||`Серия ${l+1}`)],a=r.map((o,l)=>{const s=[String(o)];for(const c of n){const h=Array.isArray(c.data)?c.data[l]:void 0;s.push(h??"")}return s});return{headers:i,rows:a}}const yx={background:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.15)",borderRadius:4,color:"#999",cursor:"pointer",fontSize:11,padding:"3px 8px",lineHeight:1,transition:Pt.fast};function Sat({sourceQuery:e,displayOption:t,expanded:n,onToggle:r}){const[i,a]=at.useState(!1),[o,l]=at.useState(!1),s=()=>{navigator.clipboard.writeText(e),l(!0),setTimeout(()=>l(!1),1500)},c=n?_at(t):null,h=xat(e)?"mcp__analitoly__execute_query":"mcp__analitoly__mongo";return n?k.jsxs("div",{style:{display:"flex",flexDirection:"column",borderRadius:8,border:`1px solid ${z.border}`,background:z.surface,boxShadow:xe.sm,overflow:"hidden",minHeight:0,height:"100%"},children:[k.jsxs("div",{onClick:r,style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px",background:z.surfaceHover,cursor:"pointer",flexShrink:0},children:[k.jsx("span",{style:{fontSize:12,fontWeight:600,color:z.textSecondary},children:"Запрос и данные"}),k.jsx("div",{style:{flex:1}}),k.jsx("span",{style:{fontSize:10,color:z.textTertiary},children:"▼"})]}),k.jsxs("div",{className:"analitoly-qdp-scroll",style:{flex:1,overflowY:"auto",minHeight:0},children:[k.jsx("div",{style:{padding:"0 8px 8px"},children:i?k.jsxs("div",{onClick:()=>a(!1),style:{padding:"6px 10px",background:"#1E1E1E",borderRadius:6,cursor:"pointer",display:"flex",alignItems:"center",gap:6},children:[k.jsx("span",{style:{flex:1,fontSize:12,fontFamily:'Monaco, "Courier New", monospace',color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),k.jsx("span",{style:{...yx,padding:"2px 6px",fontSize:10},children:"▼"})]}):k.jsxs("div",{style:{position:"relative"},className:"qdp-query-block",children:[k.jsx("style",{children:".qdp-query-block .copy-btn { display: none !important; }"}),k.jsx(CR,{query:bat(e),tool:h}),k.jsxs("div",{style:{position:"absolute",top:8,right:8,display:"flex",gap:4},children:[k.jsx("button",{onClick:()=>a(!0),style:yx,children:"▲"}),k.jsx("button",{onClick:s,style:yx,children:k.jsx(Of,{copied:o})})]})]})}),c&&c.rows.length>0&&k.jsxs("div",{style:{padding:"0 12px 12px"},children:[k.jsxs("div",{style:{fontSize:12,fontWeight:600,color:z.textSecondary,marginBottom:6},children:["Данные (",c.rows.length,")"]}),k.jsx("div",{style:{overflow:"auto",borderRadius:6,border:`1px solid ${z.borderLight}`},children:k.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12,fontFamily:'Monaco, "Courier New", monospace'},children:[k.jsx("thead",{children:k.jsx("tr",{children:c.headers.map((d,v)=>k.jsx("th",{style:{position:"sticky",top:0,padding:"6px 10px",textAlign:v===0?"left":"right",fontWeight:600,fontSize:11,color:z.textSecondary,background:z.surfaceHover,borderBottom:`1px solid ${z.border}`,whiteSpace:"nowrap"},children:d},v))})}),k.jsx("tbody",{children:c.rows.map((d,v)=>k.jsx("tr",{style:{background:v%2===0?z.surface:z.background},children:d.map((g,m)=>k.jsx("td",{style:{padding:"4px 10px",textAlign:m===0?"left":"right",color:m===0?z.textSecondary:z.textPrimary,whiteSpace:"nowrap"},children:g},m))},v))})]})})]})]}),k.jsx("style",{children:`
|
|
223
|
+
.analitoly-qdp-scroll { scrollbar-width: thin; scrollbar-color: ${z.border} transparent; }
|
|
224
|
+
.analitoly-qdp-scroll::-webkit-scrollbar { width: 4px; }
|
|
225
|
+
.analitoly-qdp-scroll::-webkit-scrollbar-track { background: transparent; }
|
|
226
|
+
.analitoly-qdp-scroll::-webkit-scrollbar-thumb { background: ${z.border}; border-radius: 4px; }
|
|
227
|
+
`})]}):k.jsxs("div",{onClick:r,style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px",background:z.surfaceHover,borderRadius:8,cursor:"pointer",transition:Pt.fast,flexShrink:0},children:[k.jsx("span",{style:{flex:1,fontSize:12,fontFamily:'Monaco, "Courier New", monospace',color:z.textTertiary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),k.jsx("span",{style:{fontSize:10,color:z.textTertiary,flexShrink:0},children:"▲"})]})}function wat({chart:e,isOnDashboard:t,onSendMessage:n,optionOverride:r,onOptionChange:i}){const{addToDashboard:a}=ls(),[o,l]=at.useState(!1),[s,c]=at.useState(null),[h,d]=at.useState(!1),v=r??e.echartsOption,g=!!e.rebuildConfig,m=at.useCallback(async _=>{if(e.rebuildConfig){l(!0),c(null);try{const{echartsOption:b}=await eN(e.rebuildConfig,_,e.echartsOption);i(b)}catch(b){c(b.message||"Ошибка перестроения графика")}finally{l(!1)}}},[e.rebuildConfig,e.echartsOption,i]),x=at.useCallback(()=>{i(null),c(null)},[i]);return k.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",minHeight:0,paddingTop:12,paddingBottom:12},children:[k.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:8,flexShrink:0,flexWrap:"wrap"},children:[!t&&k.jsxs("button",{onClick:()=>a(e.chartId),style:{display:"flex",alignItems:"center",gap:5,fontSize:13,fontWeight:500,padding:"9px 12px",borderRadius:6,border:"none",background:z.tealLight,color:z.teal,cursor:"pointer",transition:Pt.fast,lineHeight:1},onMouseEnter:_=>{_.currentTarget.style.background=z.teal,_.currentTarget.style.color="#fff"},onMouseLeave:_=>{_.currentTarget.style.background=z.tealLight,_.currentTarget.style.color=z.teal},children:[k.jsx(Uit,{}),"На дашборд"]}),t&&k.jsx("span",{style:{fontSize:13,fontWeight:500,padding:"9px 12px",borderRadius:6,background:z.surfaceHover,color:z.textTertiary,lineHeight:1},children:"✓ На дашборде"}),g&&k.jsx(tN,{onApply:m,onReset:x})]}),s&&k.jsx("div",{style:{fontSize:12,color:z.error,padding:"4px 8px",marginBottom:4,flexShrink:0},children:s}),k.jsxs("div",{style:{marginBottom:8,flexShrink:0},children:[k.jsx("h3",{style:{fontSize:16,fontWeight:600,color:z.textPrimary,margin:0},children:e.title}),e.description&&k.jsx("p",{style:{fontSize:12,color:z.textSecondary,margin:"4px 0 0 0",lineHeight:1.4},children:e.description})]}),k.jsxs("div",{style:{flex:1,background:z.surface,borderRadius:8,border:`1px solid ${z.border}`,boxShadow:xe.sm,padding:12,position:"relative",minHeight:200},children:[k.jsx(WS,{chartId:e.chartId,option:v,height:"100%",interactive:!0}),o&&k.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(255,255,255,0.6)",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:8,zIndex:10,color:z.orange},children:k.jsx(gg,{size:32})})]}),e.sourceQuery&&k.jsx("div",{style:{flexShrink:0,maxHeight:h?"45%":void 0,marginTop:8},children:k.jsx(Sat,{sourceQuery:e.sourceQuery,displayOption:v,expanded:h,onToggle:()=>d(!h)})})]})}function Tat({onSendMessage:e,hasActiveConnections:t,contextInitialized:n,onShowConnections:r,onInitialize:i,onComposeDashboard:a,onContextReady:o}){const{state:l,closeTab:s,getChart:c,isOnDashboard:h}=ls(),{tabs:d,activeTabId:v}=l,[g,m]=at.useState(new Map),x=at.useCallback((A,D)=>{m(M=>{const L=new Map(M);return D?L.set(A,D):L.delete(A),L})},[]),_=d.find(A=>A.id===v)??d[0],b=_.type==="chart"?c(_.chartId):null,S=b?h(b.chartId):!1,w=(A,D)=>{(h(D)||confirm("Закрыть? График не сохранён на дашборде"))&&s(A),m(M=>{const L=new Map(M);return L.delete(A),L})};return k.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",paddingBottom:16},children:[k.jsx(uat,{onCloseTab:w}),_.type==="dashboard"&&k.jsx(yat,{hasActiveConnections:t,contextInitialized:n,onShowConnections:r,onInitialize:i,onComposeDashboard:a,onContextReady:o}),_.type==="chart"&&b&&k.jsx(wat,{chart:b,isOnDashboard:S,onSendMessage:e,optionOverride:g.get(_.id)??null,onOptionChange:A=>x(_.id,A)},_.id),_.type==="chart"&&!b&&k.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",color:z.textTertiary,fontSize:14},children:"График не найден"})]})}const Cf="analitoly_auth_method",gu="analitoly_api_key",np="analitoly_current_session";function Cat(){const[e,t]=at.useState(null),[n,r]=at.useState(!1),i=at.useCallback(async s=>{const c=await fetch("/api/agent/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:s})}),h=await c.text();if(!h)throw new Error("Пустой ответ от сервера");const d=JSON.parse(h);if(!c.ok)throw new Error(d.message||"Ошибка подключения");return localStorage.setItem(np,d.sessionId),d.sessionId},[]),a=at.useCallback(async s=>{try{const c=await fetch("/api/agent/sessions");if(c.ok){const h=await c.json();if(h.length>0){h.sort((v,g)=>new Date(g.createdAt).getTime()-new Date(v.createdAt).getTime());const d=h[0].sessionId;return localStorage.setItem(np,d),d}}}catch{}return i(s)},[i]);at.useEffect(()=>{(async()=>{try{const s=localStorage.getItem(Cf);if(!s)return;const c=localStorage.getItem(np);if(c){try{const v=await fetch(`/api/agent/${c}/exists`),{exists:g}=await v.json();if(g){t(c);return}}catch{}localStorage.removeItem(np)}const h=s==="apikey"?localStorage.getItem(gu)??void 0:void 0,d=await a(h);t(d)}catch{localStorage.removeItem(Cf),localStorage.removeItem(gu)}finally{r(!0)}})()},[a]);const o=at.useCallback(async(s,c)=>{const h=await a(c);localStorage.setItem(Cf,s),s==="apikey"&&c?localStorage.setItem(gu,c):localStorage.removeItem(gu),t(h)},[a]),l=at.useCallback(()=>{localStorage.removeItem(Cf),localStorage.removeItem(gu),t(null)},[]);return n?e?k.jsx(Iit,{children:k.jsx(zit,{initialSessionId:e,onConnect:()=>{const c=localStorage.getItem(Cf)==="apikey"?localStorage.getItem(gu)??void 0:void 0;return i(c)},onLogout:l,children:k.jsx(Mat,{})})}):k.jsx(DP,{onConnect:o}):k.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"system-ui, sans-serif",color:"#999"},children:"Загрузка..."})}function Mat(){const[e,t]=at.useState(!1),[n,r]=at.useState(!1),[i,a]=at.useState(!1),[o,l]=at.useState(0),[s,c]=at.useState(!1),[h,d]=at.useState(!1),v=at.useRef(null),{activeSessionId:g,logout:m}=fw(),{setActiveTab:x,reloadDashboard:_}=ls(),b=at.useCallback(async()=>{try{const A=await fetch("/api/connections");if(!A.ok)return;const D=await A.json();l(D.filter(M=>!M.active).length),c(D.some(M=>M.active))}catch{}},[]),S=at.useCallback(async()=>{try{const A=await fetch("/api/context");if(!A.ok)return;const D=await A.json();d(D.initialized)}catch{}},[]);at.useEffect(()=>{b(),S()},[b,S]);const w=A=>{var D;(D=v.current)==null||D.sendProgrammatic(A)};return k.jsxs("div",{style:{position:"relative"},children:[k.jsx(Vit,{sidebarCollapsed:i,onToggleSidebar:()=>a(!i),sidebar:k.jsx(Zit,{collapsed:i,showUsage:e,sessionId:g,onShowUsage:()=>t(!e),onShowConnections:()=>r(!0),onShowDashboard:()=>x("dashboard"),inactiveConnectionCount:o,onImport:()=>{_(),b()},onDisconnect:m}),chat:k.jsx(Pit,{ref:v}),children:k.jsx("div",{style:{flex:1,minHeight:0},children:k.jsx(Tat,{onSendMessage:w,hasActiveConnections:s,contextInitialized:h,onShowConnections:()=>r(!0),onInitialize:()=>{var A;(A=v.current)==null||A.sendProgrammatic("Проинициализируй контекст")},onComposeDashboard:()=>{var A;(A=v.current)==null||A.sendProgrammatic("Составь дашборд")},onContextReady:S})})}),n&&k.jsx(aat,{onClose:()=>{r(!1),b(),S()}})]})}CP.createRoot(document.getElementById("root")).render(k.jsx(at.StrictMode,{children:k.jsx(Cat,{})}));
|