tax-mega 0.0.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.
@@ -0,0 +1,159 @@
1
+ var gue=Object.defineProperty,yue=Object.defineProperties;var _ue=Object.getOwnPropertyDescriptors;var gd=Object.getOwnPropertySymbols;var m$=Object.prototype.hasOwnProperty,v$=Object.prototype.propertyIsEnumerable;var m0=(Ne,s,R)=>s in Ne?gue(Ne,s,{enumerable:!0,configurable:!0,writable:!0,value:R}):Ne[s]=R,te=(Ne,s)=>{for(var R in s||(s={}))m$.call(s,R)&&m0(Ne,R,s[R]);if(gd)for(var R of gd(s))v$.call(s,R)&&m0(Ne,R,s[R]);return Ne},Ti=(Ne,s)=>yue(Ne,_ue(s));var v0=(Ne,s)=>{var R={};for(var $r in Ne)m$.call(Ne,$r)&&s.indexOf($r)<0&&(R[$r]=Ne[$r]);if(Ne!=null&&gd)for(var $r of gd(Ne))s.indexOf($r)<0&&v$.call(Ne,$r)&&(R[$r]=Ne[$r]);return R};var Lo=(Ne,s,R)=>(m0(Ne,typeof s!="symbol"?s+"":s,R),R);(function(Ne,s){typeof exports=="object"&&typeof module!="undefined"?s(exports,require("vue"),require("ant-design-vue"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","vue","ant-design-vue","vuedraggable"],s):(Ne=typeof globalThis!="undefined"?globalThis:Ne||self,s(Ne.MegaLib={},Ne.Vue,Ne.antd,Ne.draggable))})(this,function(Ne,s,R,$r){var h$,p$;"use strict";function g$(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var Sa=g$($r);const y$={width:"16",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_$=[s.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.862 5.529c.26-.26.682-.26.943 0l3.528 3.528 3.529-3.528a.667.667 0 1 1 .943.942l-4 4a.667.667 0 0 1-.943 0l-4-4a.667.667 0 0 1 0-.942Z",fill:"currentColor"},null,-1)];function w$(t,e){return s.openBlock(),s.createElementBlock("svg",y$,_$)}var xa={render:w$};const b$={width:"16",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S$=[s.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.862 3.529c.26-.26.682-.26.943 0l4 4c.26.26.26.682 0 .942l-4 4a.667.667 0 1 1-.943-.942L9.391 8 5.862 4.471a.667.667 0 0 1 0-.942Z",fill:"#000","fill-opacity":".85"},null,-1)];function x$(t,e){return s.openBlock(),s.createElementBlock("svg",b$,S$)}var g0={render:x$};const C$={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k$=[s.createElementVNode("path",{d:"M16.5 9a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0ZM9.75 6a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm-1.5 2.55v3.9a.3.3 0 0 0 .3.3h.9a.3.3 0 0 0 .3-.3v-3.9a.3.3 0 0 0-.3-.3h-.9a.3.3 0 0 0-.3.3Z",fill:"#000","fill-opacity":".54"},null,-1)];function T$(t,e){return s.openBlock(),s.createElementBlock("svg",C$,k$)}var zt={render:T$};const M$={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$$=[s.createElementVNode("path",{d:"M14.226 15a.226.226 0 0 0-.226.226v5.631a1.143 1.143 0 0 0 2.286 0v-5.631A.226.226 0 0 0 16.06 15h-1.834Zm.917 6.238a.38.38 0 1 1 0-.762.38.38 0 0 1 0 .762ZM21.742 22h-5.338l2.285-2.286h3.053c.142 0 .258.116.258.258v1.77a.258.258 0 0 1-.258.258ZM16.857 20.794l3.853-3.852c.1-.101.1-.265 0-.365l-1.252-1.252c-.1-.1-.264-.1-.365 0l-2.236 2.237v3.232Z",fill:"currentColor"},null,-1),s.createElementVNode("path",{d:"M3.4 3a.4.4 0 0 0-.4.4v7.2c0 .22.18.4.4.4H8v10.6c0 .22.18.4.4.4h4.2a.4.4 0 0 0 .4-.4v-1.2a.4.4 0 0 0-.4-.4H10v-1h2v-1h-2v-2h2v-1h-2v-2h2v-1h-2v-1h4v2.6c0 .22.18.4.4.4h1.2a.4.4 0 0 0 .4-.4V11h4.6a.4.4 0 0 0 .4-.4V3.4a.4.4 0 0 0-.4-.4H3.4ZM17 5h2v4H5V5h2v2h1V5h2v2h1V5h2v2h1V5h2v2h1V5Z",fill:"currentColor"},null,-1)];function N$(t,e){return s.openBlock(),s.createElementBlock("svg",M$,$$)}var E$={render:N$};const A$={width:"24",height:"24",fill:"none","fill-rule":"evenodd",xmlns:"http://www.w3.org/2000/svg"},D$=[s.createElementVNode("path",{d:"M5 5h4v4H5V5ZM3.4 3a.4.4 0 0 0-.4.4v7.2c0 .22.18.4.4.4h7.2a.4.4 0 0 0 .4-.4V3.4a.4.4 0 0 0-.4-.4H3.4ZM15 5h4v4h-4V5Zm-1.6-2a.4.4 0 0 0-.4.4v7.2c0 .22.18.4.4.4h7.2a.4.4 0 0 0 .4-.4V3.4a.4.4 0 0 0-.4-.4h-7.2Zm2 12H15v4h4v-4h-3.6ZM13 13.4c0-.22.18-.4.4-.4h7.2c.22 0 .4.18.4.4v7.2a.4.4 0 0 1-.4.4h-7.2a.4.4 0 0 1-.4-.4v-7.2ZM5 15h4v4H5v-4Zm-1.6-2a.4.4 0 0 0-.4.4v7.2c0 .22.18.4.4.4h7.2a.4.4 0 0 0 .4-.4v-7.2a.4.4 0 0 0-.4-.4H3.4Z",fill:"currentColor"},null,-1)];function O$(t,e){return s.openBlock(),s.createElementBlock("svg",A$,D$)}var L$={render:O$};const P$={width:"18",height:"18",fill:"none","fill-rule":"evenodd",xmlns:"http://www.w3.org/2000/svg"},B$=[s.createElementVNode("path",{d:"M11.18 12.24a6 6 0 1 1 1.06-1.06l4.32 4.32a.3.3 0 0 1 0 .424l-.636.637a.3.3 0 0 1-.424 0l-4.32-4.321ZM12 7.5a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0Z",fill:"currentColor"},null,-1)];function I$(t,e){return s.openBlock(),s.createElementBlock("svg",P$,B$)}var Ca={render:I$};const R$={width:"20",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},V$=[s.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10 20c5.523 0 10-4.477 10-10S15.523 0 10 0 0 4.477 0 10s4.477 10 10 10ZM9.4 6a.4.4 0 0 0-.4.4V9H6.4a.4.4 0 0 0-.4.4v1.2c0 .22.18.4.4.4H9v2.6c0 .22.18.4.4.4h1.2a.4.4 0 0 0 .4-.4V11h2.6a.4.4 0 0 0 .4-.4V9.4a.4.4 0 0 0-.4-.4H11V6.4a.4.4 0 0 0-.4-.4H9.4Z",fill:"currentColor"},null,-1)];function F$(t,e){return s.openBlock(),s.createElementBlock("svg",R$,V$)}var yd={render:F$};const z$={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},H$=[s.createElementVNode("path",{d:"M1.763 2.25a.375.375 0 0 0-.322.568l5.256 8.758a.375.375 0 0 1 .053.193v2.426c0 .142.08.272.207.336l3.75 1.875a.375.375 0 0 0 .543-.336v-4.3c0-.069.018-.135.053-.194l5.255-8.758a.375.375 0 0 0-.321-.568H1.763Zm8.04 8.91a.375.375 0 0 0-.053.194v2.896l-.543-.271-.75-.375-.207-.104v-2.147a.374.374 0 0 0-.053-.191v-.001L4.09 4.318 3.75 3.75H14.25l-.34.567-4.107 6.844Z",fill:"currentColor"},null,-1)];function U$(t,e){return s.openBlock(),s.createElementBlock("svg",z$,H$)}var y0={render:U$};const j$={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y$=[s.createElementVNode("path",{d:"M9.75 2.55a.3.3 0 0 0-.3-.3h-.9a.3.3 0 0 0-.3.3v5.7h-5.7a.3.3 0 0 0-.3.3v.9a.3.3 0 0 0 .3.3h5.7v5.7a.3.3 0 0 0 .3.3h.9a.3.3 0 0 0 .3-.3v-5.7h5.7a.3.3 0 0 0 .3-.3v-.9a.3.3 0 0 0-.3-.3h-5.7v-5.7Z",fill:"currentColor"},null,-1)];function G$(t,e){return s.openBlock(),s.createElementBlock("svg",j$,Y$)}var W$={render:G$};const Z$={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},q$=[s.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.95 3.75h.3V10.376a.3.3 0 0 0 .088.212l.9.9a.3.3 0 0 0 .512-.212V2.55a.3.3 0 0 0-.3-.3H2.55a.3.3 0 0 0-.3.3v12.9a.3.3 0 0 0 .3.3h8.726a.3.3 0 0 0 .212-.512l-.9-.9a.3.3 0 0 0-.212-.088H3.75V3.75H13.95Zm1.599 10.727L9.32 8.25H11.7a.3.3 0 0 0 .3-.3v-.9a.3.3 0 0 0-.3-.3H7.05a.3.3 0 0 0-.3.3v4.65a.3.3 0 0 0 .3.3h.9a.3.3 0 0 0 .3-.3V9.3l6.238 6.238a.3.3 0 0 0 .424 0l.637-.636a.3.3 0 0 0 0-.425Z",fill:"currentColor"},null,-1)];function X$(t,e){return s.openBlock(),s.createElementBlock("svg",Z$,q$)}var K$={render:X$};const J$={width:"14",height:"14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Q$=[s.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.975 2.498a.233.233 0 0 0-.33 0L7 6.143 3.355 2.498a.233.233 0 0 0-.33 0l-.527.527a.233.233 0 0 0 0 .33L6.143 7l-3.645 3.645a.233.233 0 0 0 0 .33l.527.527a.233.233 0 0 0 .33 0L7 7.857l3.645 3.645a.233.233 0 0 0 .33 0l.527-.527a.233.233 0 0 0 0-.33L7.856 7l3.646-3.645a.233.233 0 0 0 0-.33l-.527-.527Z",fill:"currentColor"},null,-1)];function eN(t,e){return s.openBlock(),s.createElementBlock("svg",J$,Q$)}var Mi={render:eN};const tN={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rN=[s.createElementVNode("path",{d:"M13 19.938V13h2.999c-.123 2.043-.918 5.057-2.553 6.87a7.99 7.99 0 0 1-.446.068ZM19.938 13a8 8 0 0 1-3.631 5.743c.953-1.466 1.538-3.398 1.666-5.743h1.965ZM11 19.938a7.99 7.99 0 0 1-.447-.068c-1.635-1.813-2.43-4.827-2.552-6.87H11v6.938Zm-3.307-1.195A8 8 0 0 1 4.062 13h1.965c.128 2.345.713 4.277 1.666 5.743ZM17.973 11c-.128-2.345-.713-4.277-1.666-5.743A8 8 0 0 1 19.938 11h-1.965Zm-4.526-6.87c1.635 1.813 2.43 4.827 2.552 6.87H13V4.062c.15.019.299.042.447.068ZM11 4.062V11H8.001c.122-2.043.917-5.057 2.553-6.87A7.99 7.99 0 0 1 11 4.062ZM4.062 11a8 8 0 0 1 3.631-5.743C6.74 6.723 6.155 8.655 6.027 11H4.062ZM12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z",fill:"currentColor","fill-opacity":".87"},null,-1)];function nN(t,e){return s.openBlock(),s.createElementBlock("svg",tN,rN)}var aN={render:nN};const iN={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},oN=[s.createElementVNode("path",{d:"M17.292 12.58a.4.4 0 0 1 .357-.58H20c0-4.5-3.715-8-8-8-1.578 0-3.05.457-4.29 1.246a.414.414 0 0 1-.515-.051l-.87-.87a.386.386 0 0 1 .05-.594A9.954 9.954 0 0 1 12 2c5.523 0 10 4.477 10 10 0 2.086-1 4.5-1.5 5.5 0 0-.137.3-.4.3-.205 0-.285-.129-.38-.28l-.013-.02-.644-1.375a.41.41 0 0 1-.017-.039l-.005-.013c-.008-.023-.017-.045-.027-.067l-1.722-3.426ZM6.709 11.42a.4.4 0 0 1-.358.58h-2.35c0 4.5 3.715 8 7.999 8 1.578 0 3.05-.457 4.29-1.246a.414.414 0 0 1 .515.051l.87.87a.386.386 0 0 1-.05.594A9.953 9.953 0 0 1 12 22C6.477 22 2 17.523 2 12c0-2.086 1-4.5 1.5-5.5 0 0 .137-.3.4-.3.205 0 .286.129.38.28l.013.02.644 1.375a.399.399 0 0 1 .017.039l.009.022a1.052 1.052 0 0 0 .024.058l1.722 3.426Z",fill:"#000","fill-opacity":".87"},null,-1)];function sN(t,e){return s.openBlock(),s.createElementBlock("svg",iN,oN)}var lN={render:sN};const cN={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},uN=[s.createElementVNode("path",{d:"M17.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm0 2a3.5 3.5 0 1 0-3.4-2.667L9.75 9.094a4 4 0 1 0-.154 5.95l2.69 2.067a3.5 3.5 0 1 0 1.287-1.533l-2.827-2.173a3.997 3.997 0 0 0 .067-2.617l4.3-2.729c.625.584 1.464.941 2.387.941ZM7 14a2 2 0 1 1 0-4 2 2 0 0 1 0 4Zm10 4.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z",fill:"currentColor"},null,-1)];function fN(t,e){return s.openBlock(),s.createElementBlock("svg",cN,uN)}var dN={render:fN};const hN={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},pN=[s.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21 19.4a.4.4 0 0 0-.4-.4H3.4a.4.4 0 0 0-.4.4v1.2c0 .22.18.4.4.4h17.2a.4.4 0 0 0 .4-.4v-1.2ZM3.583 8.576a.4.4 0 0 1 0-.566l.848-.848a.4.4 0 0 1 .566 0L11 13.165V3.4c0-.22.18-.4.4-.4h1.2c.22 0 .4.18.4.4v9.779l6.017-6.017a.4.4 0 0 1 .566 0l.848.848a.4.4 0 0 1 0 .566l-8.141 8.141a.4.4 0 0 1-.566 0L3.583 8.576Z",fill:"currentColor"},null,-1)];function mN(t,e){return s.openBlock(),s.createElementBlock("svg",hN,pN)}var vN={render:mN};const gN={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"none",width:"24",height:"24"},yN=[s.createElementVNode("path",{d:"M920.7 639.4c-22.1 0-40 17.9-40 40v167H143.3v-167c0-22.1-17.9-40-40-40s-40 17.9-40 40v197c0 27.6 22.4 50 50 50h797.3c27.6 0 50-22.4 50-50v-197c.1-22.1-17.8-40-39.9-40z",fill:"#2c2c2c"},null,-1),s.createElementVNode("path",{d:"m482.9 733.8.2.2.8.8.6.6c.3.2.5.5.8.7s.5.4.8.7c.2.2.4.3.6.5.3.2.6.5.9.7.1.1.3.2.4.3 1.8 1.4 3.8 2.5 5.8 3.5.2.1.3.2.5.2.3.1.6.3.9.4.3.1.6.3.9.4.2.1.5.2.7.3.4.2.8.3 1.2.5.2.1.3.1.5.2.5.2.9.3 1.4.5.1 0 .2.1.4.1.5.2 1 .3 1.6.4.1 0 .2 0 .3.1.5.1 1.1.3 1.7.4h.3c.6.1 1.1.2 1.7.3h.4c.5.1 1 .1 1.6.2.2 0 .5 0 .7.1.4 0 .8.1 1.3.1h4c10.5 0 21-4.1 28.8-12.2l255.4-265.1c15.3-15.9 14.9-41.2-1.1-56.6-15.9-15.3-41.2-14.9-56.6 1.1L551.7 608.9V137.5c0-22.1-17.9-40-40-40s-40 17.9-40 40v469.4L285.1 413.2c-15.3-15.9-40.6-16.4-56.6-1.1-15.9 15.3-16.4 40.7-1.1 56.6l255.5 265.1z",fill:"currentColor"},null,-1)];function _N(t,e){return s.openBlock(),s.createElementBlock("svg",gN,yN)}var wN={render:_N};const bN={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},SN=[s.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.4 19a.4.4 0 0 0-.4.4v1.2c0 .22.18.4.4.4h2.2a.4.4 0 0 0 .4-.4v-1.2a.4.4 0 0 0-.4-.4H3.4Zm5 0a.4.4 0 0 0-.4.4v1.2c0 .22.18.4.4.4h12.2a.4.4 0 0 0 .4-.4v-1.2a.4.4 0 0 0-.4-.4H8.4ZM3.4 11a.4.4 0 0 0-.4.4v1.2c0 .22.18.4.4.4h2.2a.4.4 0 0 0 .4-.4v-1.2a.4.4 0 0 0-.4-.4H3.4Zm5 0a.4.4 0 0 0-.4.4v1.2c0 .22.18.4.4.4h12.2a.4.4 0 0 0 .4-.4v-1.2a.4.4 0 0 0-.4-.4H8.4ZM3.4 3a.4.4 0 0 0-.4.4v1.2c0 .22.18.4.4.4h2.2a.4.4 0 0 0 .4-.4V3.4a.4.4 0 0 0-.4-.4H3.4Zm5 0a.4.4 0 0 0-.4.4v1.2c0 .22.18.4.4.4h12.2a.4.4 0 0 0 .4-.4V3.4a.4.4 0 0 0-.4-.4H8.4Z",fill:"currentColor"},null,-1)];function xN(t,e){return s.openBlock(),s.createElementBlock("svg",bN,SN)}var CN={render:xN};const kN={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},TN=[s.createElementVNode("path",{d:"M3.4 21a.4.4 0 0 1-.4-.4V3.4c0-.22.18-.4.4-.4h17.2c.22 0 .4.18.4.4v17.2a.4.4 0 0 1-.4.4H3.4ZM5 9h3V6H5v3Zm5 0h4V6h-4v3Zm6 0h3V6h-3v3ZM5 19h3v-3H5v3Zm0-5h3v-3H5v3Zm5-3v3h4v-3h-4Zm6 0v3h3v-3h-3Zm3 5h-3v3h3v-3Zm-5 3v-3h-4v3h4Z",fill:"currentColor","fill-opacity":".87"},null,-1)];function MN(t,e){return s.openBlock(),s.createElementBlock("svg",kN,TN)}var $N={render:MN};const NN={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},EN=[s.createElementVNode("path",{d:"M821.93 488.192a17.835 17.835 0 0 1-11.263-16.341V213.333H213.333v597.334h258.518c7.253 0 13.61 4.565 16.341 11.264 6.272 15.445 14.037 30.08 23.04 43.818 8.107 12.374-.128 30.251-14.89 30.251H145.066A17.067 17.067 0 0 1 128 878.933V145.067c0-9.387 7.68-17.067 17.067-17.067h733.866c9.387 0 17.067 7.68 17.067 17.067V496.34c0 14.763-17.92 23.04-30.25 14.934a255.232 255.232 0 0 0-43.82-23.083zm-96.597 450.475a213.333 213.333 0 1 0 0-426.667 213.333 213.333 0 0 0 0 426.667zm-42.666-215.552V614.4c0-9.387 7.68-17.067 17.066-17.067h51.2c9.387 0 17.067 7.68 17.067 17.067v133.547a17.067 17.067 0 0 1-4.693 15.232l-66.134 66.133a17.067 17.067 0 0 1-24.149 0L636.8 793.131a17.067 17.067 0 0 1 0-24.15l45.867-45.866zm60.757-406.358a17.067 17.067 0 0 1 0 24.15l-219.35 219.392a17.067 17.067 0 0 1-24.149 0l-61.184-61.227a17.067 17.067 0 0 0-24.149 0l-73.685 73.685a17.067 17.067 0 0 1-24.15 0l-36.181-36.181a17.067 17.067 0 0 1 0-24.15l134.016-133.973a17.067 17.067 0 0 1 24.15 0l61.183 61.184a17.067 17.067 0 0 0 24.15 0L683.093 280.62a17.067 17.067 0 0 1 24.15 0l36.181 36.181z",fill:"currentColor","fill-opacity":".87"},null,-1)];function AN(t,e){return s.openBlock(),s.createElementBlock("svg",NN,EN)}var DN={render:AN};const ON={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},LN=[s.createElementVNode("path",{d:"M19 18.6a.4.4 0 0 1-.4.4H5V5h14v13.6ZM3.4 3a.4.4 0 0 0-.4.4v17.2c0 .22.18.4.4.4h17.2a.4.4 0 0 0 .4-.4V3.4a.4.4 0 0 0-.4-.4H3.4Zm14.024 5.99a.4.4 0 0 0 0-.566l-.848-.848a.4.4 0 0 0-.566 0l-3.727 3.727a.4.4 0 0 1-.566 0l-1.434-1.434a.4.4 0 0 0-.566 0L6.576 13.01a.4.4 0 0 0 0 .566l.848.848a.4.4 0 0 0 .566 0l1.727-1.727a.4.4 0 0 1 .566 0l1.434 1.434a.4.4 0 0 0 .566 0l5.141-5.141Z",fill:"currentColor","fill-opacity":".87"},null,-1)];function PN(t,e){return s.openBlock(),s.createElementBlock("svg",ON,LN)}var _d={render:PN};const BN={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},IN=[s.createElementVNode("path",{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-616-64h536c4.4 0 8-3.6 8-8V284c0-7.2-8.7-10.7-13.7-5.7L592 488.6l-125.4-124a8.03 8.03 0 0 0-11.3 0l-189 189.6a7.87 7.87 0 0 0-2.3 5.6V720c0 4.4 3.6 8 8 8z",fill:"currentColor","fill-opacity":".87"},null,-1)];function RN(t,e){return s.openBlock(),s.createElementBlock("svg",BN,IN)}var wd={render:RN};const VN={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},FN=[s.createStaticVNode('<rect x="3" y="19" width="18" height="2" rx=".4" fill="currentColor" fill-opacity=".87"></rect><rect x="13" y="3" width="14" height="2" rx=".4" transform="rotate(90 13 3)" fill="currentColor" fill-opacity=".87"></rect><rect x="9" y="10" width="7" height="2" rx=".4" transform="rotate(90 9 10)" fill="currentColor" fill-opacity=".87"></rect><rect x="5" y="6" width="11" height="2" rx=".4" transform="rotate(90 5 6)" fill="currentColor" fill-opacity=".87"></rect><rect x="21" y="4" width="13" height="2" rx=".4" transform="rotate(90 21 4)" fill="currentColor" fill-opacity=".87"></rect><rect x="17" y="7" width="10" height="2" rx=".4" transform="rotate(90 17 7)" fill="currentColor" fill-opacity=".87"></rect>',6)];function zN(t,e){return s.openBlock(),s.createElementBlock("svg",VN,FN)}var bd={render:zN};const HN={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},UN=[s.createElementVNode("path",{d:"M166.955 810.667h-23.168A15.83 15.83 0 0 1 128 794.88V333.867c0-8.704 7.125-15.787 15.787-15.787h23.168c8.661 0 15.786 7.083 15.786 15.787V794.88c0 8.661-7.125 15.787-15.786 15.787z",fill:"currentColor","fill-opacity":".87"},null,-1),s.createElementVNode("path",{d:"M879.701 810.667H144.3A16.341 16.341 0 0 1 128 794.368v-23.893c0-8.96 7.339-16.256 16.299-16.256H879.7c8.96 0 16.299 7.338 16.299 16.298v23.894c0 8.96-7.339 16.256-16.299 16.256zM237.483 420.693h109.482v275.371H237.483zM403.37 203.435H512v492.629H403.37zm164.224 275.413h109.482v217.216H567.595zm164.181 108.587h109.483v108.629H731.776z",fill:"currentColor","fill-opacity":".87"},null,-1)];function jN(t,e){return s.openBlock(),s.createElementBlock("svg",HN,UN)}var Sd={render:jN};const YN={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},GN=[s.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.938 13h1.65a.389.389 0 0 0 .392-.361c.013-.211.02-.424.02-.639 0-5.523-4.477-10-10-10-.215 0-.428.007-.639.02a.389.389 0 0 0-.361.392V12.6c0 .22.18.4.4.4h8.538Zm-5.883-8.734a8.018 8.018 0 0 1 5.442 4.937c.264.654.422 1.274.503 1.797h-7V4c.37.074.721.163 1.055.266Zm5.258 10.982a.413.413 0 0 1 .375-.248h1.31c.27 0 .462.262.367.515A10.004 10.004 0 0 1 12 22C6.477 22 2 17.523 2 12c0-4.286 2.696-7.942 6.485-9.365A.384.384 0 0 1 9 3.003v1.309c0 .163-.1.309-.248.375a8.002 8.002 0 1 0 10.561 10.561Z",fill:"currentColor"},null,-1)];function WN(t,e){return s.openBlock(),s.createElementBlock("svg",YN,GN)}var ZN={render:WN};const qN={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},XN=[s.createElementVNode("rect",{x:"15",y:"20",width:"6",height:"2",rx:".4",transform:"rotate(-180 15 20)",fill:"currentColor"},null,-1),s.createElementVNode("rect",{x:"18",y:"13",width:"12",height:"2",rx:".4",transform:"rotate(-180 18 13)",fill:"currentColor"},null,-1),s.createElementVNode("rect",{x:"21",y:"6",width:"18",height:"2",rx:".4",transform:"rotate(-180 21 6)",fill:"currentColor"},null,-1)];function KN(t,e){return s.openBlock(),s.createElementBlock("svg",qN,XN)}var JN={render:KN};const QN={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},eE=[s.createStaticVNode('<circle cx="4" cy="6" r="1" fill="currentColor" fill-opacity=".87"></circle><path d="M17 6.085a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z" fill="currentColor" fill-opacity=".87"></path><circle cx="20" cy="6" r="1" fill="currentColor" fill-opacity=".87"></circle><circle cx="9" cy="12" r="1" fill="currentColor" fill-opacity=".87"></circle><circle cx="4" cy="18" r="1" fill="currentColor" fill-opacity=".87"></circle><path d="M21 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" fill="currentColor" fill-opacity=".87"></path><circle cx="4" cy="12" r="1" fill="currentColor" fill-opacity=".87"></circle><circle cx="13" cy="18" r="1" fill="currentColor" fill-opacity=".87"></circle><path d="M11.95 6a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM20.95 18a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z" fill="currentColor" fill-opacity=".87"></path><circle cx="15" cy="12" r="2" fill="currentColor" fill-opacity=".87"></circle><path d="M10.5 17.937a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z" fill="currentColor" fill-opacity=".87"></path>',11)];function tE(t,e){return s.openBlock(),s.createElementBlock("svg",QN,eE)}var rE={render:tE};const nE={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},aE=[s.createElementVNode("path",{d:"M836.367 796.384H971.17V11.636H836.367v784.748zm-240.716 0h134.802V363.086H595.65v433.298zm-240.723 0h134.803V252.358H354.928v544.026zm-240.718 0h134.804v-284.05H114.21v284.05zm0 0",fill:"currentColor","fill-opacity":".87"},null,-1),s.createElementVNode("path",{d:"M932.655 131.994c4.814 0 9.631 4.819 14.445 4.819 14.445 9.625 19.258 28.884 9.626 43.328l-14.44 14.445c-62.59 28.883-129.99 48.14-192.575 72.211-28.89 14.445-48.146 33.703-62.59 57.774-24.071 48.146-48.142 101.105-72.213 154.06-9.631 19.258-24.076 38.516-38.515 52.96-43.333 38.515-101.106 57.773-158.88 52.96-19.256 0-43.327-9.632-62.585-14.445-9.626-4.814-19.257-9.626-33.701-14.445-62.587-28.884-134.804 0-168.5 62.59-14.445 24.071-24.077 52.955-33.703 77.03 0 4.814-4.814 9.627-9.631 14.44-9.626 4.819-19.258 9.631-28.884 4.819-9.631 0-19.257-9.631-24.07-19.258-4.82-9.631-4.82-19.258 0-24.076 9.625-24.07 24.07-52.954 33.696-77.03 9.632-19.258 24.075-38.515 38.515-52.955 43.334-43.333 96.288-62.592 158.879-57.773 24.07 0 43.329 9.626 67.399 19.257 9.631 4.814 19.258 9.627 33.703 14.44 14.443 4.818 28.883 9.63 43.327 9.63 38.515 4.814 72.218-9.63 101.102-33.7 9.631-9.627 19.257-24.071 28.888-38.516 24.07-48.142 48.14-101.1 72.217-154.06 14.439-28.884 38.515-57.774 67.399-77.032 9.63-4.812 24.07-14.443 33.701-19.257l187.763-72.217h9.627",fill:"currentColor","fill-opacity":".87"},null,-1)];function iE(t,e){return s.openBlock(),s.createElementBlock("svg",nE,aE)}var oE={render:iE};const sE={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},lE=[s.createElementVNode("path",{d:"M20 12a8 8 0 1 0-16 0 8 8 0 0 0 16 0Zm2 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10ZM11 8.4c0-.22.18-.4.4-.4h1.2c.22 0 .4.18.4.4V11h2.6c.22 0 .4.18.4.4v1.2a.4.4 0 0 1-.4.4H13v2.6a.4.4 0 0 1-.4.4h-1.2a.4.4 0 0 1-.4-.4V13H8.4a.4.4 0 0 1-.4-.4v-1.2c0-.22.18-.4.4-.4H11V8.4Z",fill:"#000","fill-opacity":".87"},null,-1)];function cE(t,e){return s.openBlock(),s.createElementBlock("svg",sE,lE)}var _0={render:cE};const uE={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},fE=[s.createElementVNode("path",{d:"M20 12a8 8 0 1 0-16 0 8 8 0 0 0 16 0Zm2 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10ZM11 8.4c0-.22.18-.4.4-.4h1.2c.22 0 .4.18.4.4V11h2.6c.22 0 .4.18.4.4v1.2a.4.4 0 0 1-.4.4H13v2.6a.4.4 0 0 1-.4.4h-1.2a.4.4 0 0 1-.4-.4V13H8.4a.4.4 0 0 1-.4-.4v-1.2c0-.22.18-.4.4-.4H11V8.4Z",fill:"#000","fill-opacity":".87"},null,-1)];function dE(t,e){return s.openBlock(),s.createElementBlock("svg",uE,fE)}var hE={render:dE};const pE={width:"20",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},mE=[s.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.5 4.167h.333v7.362c0 .088.036.173.098.235l1 1c.21.21.569.062.569-.235V2.833a.333.333 0 0 0-.333-.333H2.833a.333.333 0 0 0-.333.333v14.334c0 .184.15.333.333.333h9.696a.333.333 0 0 0 .235-.569l-1-1a.333.333 0 0 0-.235-.098H4.167V4.167H15.5Zm1.776 11.919-6.919-6.92H13c.184 0 .333-.149.333-.333v-1A.333.333 0 0 0 13 7.5H7.833a.333.333 0 0 0-.333.333V13c0 .184.15.333.333.333h1c.184 0 .334-.149.334-.333v-2.667l6.93 6.931c.13.13.342.13.472 0l.707-.707a.333.333 0 0 0 0-.471Z",fill:"#000"},null,-1)];function vE(t,e){return s.openBlock(),s.createElementBlock("svg",pE,mE)}var gE={render:vE};const yE={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_E=[s.createElementVNode("path",{d:"M3 4.4c0-.22.18-.4.4-.4h17.2c.22 0 .4.18.4.4v1.2a.4.4 0 0 1-.4.4H3.4a.4.4 0 0 1-.4-.4V4.4Zm0 15c0-.22.18-.4.4-.4h17.2c.22 0 .4.18.4.4v1.2a.4.4 0 0 1-.4.4H3.4a.4.4 0 0 1-.4-.4v-1.2Zm8-5c0-.22.18-.4.4-.4h9.2c.22 0 .4.18.4.4v1.2a.4.4 0 0 1-.4.4h-9.2a.4.4 0 0 1-.4-.4v-1.2Zm0-5c0-.22.18-.4.4-.4h9.2c.22 0 .4.18.4.4v1.2a.4.4 0 0 1-.4.4h-9.2a.4.4 0 0 1-.4-.4V9.4Zm-7.656 2.799a.4.4 0 0 0 0 .602l2.993 2.618a.4.4 0 0 0 .663-.3V9.881a.4.4 0 0 0-.663-.302L3.344 12.2Z",fill:"currentColor"},null,-1)];function wE(t,e){return s.openBlock(),s.createElementBlock("svg",yE,_E)}var bE={render:wE};const SE={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},xE=[s.createElementVNode("path",{d:"M7.5 1.8V3H2.55a.3.3 0 0 0-.3.3v.9a.3.3 0 0 0 .3.3h1.2v11.7a.3.3 0 0 0 .3.3H13.95a.3.3 0 0 0 .3-.3V4.5h1.2a.3.3 0 0 0 .3-.3v-.9a.3.3 0 0 0-.3-.3H10.5V1.8a.3.3 0 0 0-.3-.3H7.8a.3.3 0 0 0-.3.3ZM12.75 15h-7.5V4.5h7.5V15Z",fill:"currentColor","fill-opacity":".87"},null,-1)];function CE(t,e){return s.openBlock(),s.createElementBlock("svg",SE,xE)}var Po={render:CE};const kE={width:"14",height:"14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},TE=[s.createElementVNode("path",{d:"M7.174 1.363a.233.233 0 0 0-.348 0L2.679 6.028a.233.233 0 0 0 .174.389h2.129v.2a.235.235 0 0 1 .002.033v5.95c0 .129.105.233.233.233h3.605a.233.233 0 0 0 .234-.233V7h-.003v-.583H11.147a.233.233 0 0 0 .175-.389L7.174 1.363Z",fill:"currentColor"},null,-1)];function ME(t,e){return s.openBlock(),s.createElementBlock("svg",kE,TE)}var Il={render:ME};const $E={width:"14",height:"14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},NE=[s.createElementVNode("path",{d:"M7.174 12.755a.233.233 0 0 1-.348 0L2.679 8.09a.233.233 0 0 1 .174-.389h2.129v-.2a.235.235 0 0 0 .002-.033v-5.95c0-.129.105-.233.233-.233h3.605c.13 0 .234.104.234.233v5.6h-.003V7.7H11.147c.201 0 .308.238.175.389l-4.148 4.665Z",fill:"currentColor"},null,-1)];function EE(t,e){return s.openBlock(),s.createElementBlock("svg",$E,NE)}var Rl={render:EE};const AE={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},DE=[s.createElementVNode("path",{d:"M6.3 3a.3.3 0 0 0-.3.3v1.65a.3.3 0 0 0 .3.3h1.65a.3.3 0 0 0 .3-.3V3.3a.3.3 0 0 0-.3-.3H6.3Zm3.75 0a.3.3 0 0 0-.3.3v1.65a.3.3 0 0 0 .3.3h1.65a.3.3 0 0 0 .3-.3V3.3a.3.3 0 0 0-.3-.3h-1.65ZM6 8.175a.3.3 0 0 1 .3-.3h1.65a.3.3 0 0 1 .3.3v1.65a.3.3 0 0 1-.3.3H6.3a.3.3 0 0 1-.3-.3v-1.65Zm4.05-.3a.3.3 0 0 0-.3.3v1.65a.3.3 0 0 0 .3.3h1.65a.3.3 0 0 0 .3-.3v-1.65a.3.3 0 0 0-.3-.3h-1.65ZM6 13.05a.3.3 0 0 1 .3-.3h1.65a.3.3 0 0 1 .3.3v1.65a.3.3 0 0 1-.3.3H6.3a.3.3 0 0 1-.3-.3v-1.65Zm4.05-.3a.3.3 0 0 0-.3.3v1.65a.3.3 0 0 0 .3.3h1.65a.3.3 0 0 0 .3-.3v-1.65a.3.3 0 0 0-.3-.3h-1.65Z",fill:"#000","fill-opacity":".45"},null,-1)];function OE(t,e){return s.openBlock(),s.createElementBlock("svg",AE,DE)}var LE={render:OE};const PE={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},BE=[s.createElementVNode("path",{d:"M7.875 2.55a.3.3 0 0 1 .3-.3h1.65a.3.3 0 0 1 .3.3V4.2a.3.3 0 0 1-.3.3h-1.65a.3.3 0 0 1-.3-.3V2.55ZM7.875 8.175a.3.3 0 0 1 .3-.3h1.65a.3.3 0 0 1 .3.3v1.65a.3.3 0 0 1-.3.3h-1.65a.3.3 0 0 1-.3-.3v-1.65ZM8.175 13.5a.3.3 0 0 0-.3.3v1.65a.3.3 0 0 0 .3.3h1.65a.3.3 0 0 0 .3-.3V13.8a.3.3 0 0 0-.3-.3h-1.65Z",fill:"#000"},null,-1)];function IE(t,e){return s.openBlock(),s.createElementBlock("svg",PE,BE)}var xd={render:IE};const RE={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},VE=[s.createElementVNode("path",{d:"M3.75 6.375V3.75h2.625c.375 0 .375-.375.375-.375v-.75c0-.375-.375-.375-.375-.375H2.55a.3.3 0 0 0-.3.3v3.825s0 .375.375.375h.75c.375 0 .375-.375.375-.375ZM14.25 6.375V3.75h-2.625c-.375 0-.375-.375-.375-.375v-.75c0-.375.375-.375.375-.375h3.825a.3.3 0 0 1 .3.3v3.825s0 .375-.375.375h-.75c-.375 0-.375-.375-.375-.375ZM14.25 11.625v2.625h-2.625c-.375 0-.375.375-.375.375v.75c0 .375.375.375.375.375h3.825a.3.3 0 0 0 .3-.3v-3.825s0-.375-.375-.375h-.75c-.375 0-.375.375-.375.375ZM3.75 11.625v2.625h2.625c.375 0 .375.375.375.375v.75c0 .375-.375.375-.375.375H2.55a.3.3 0 0 1-.3-.3v-3.825s0-.375.375-.375h.75c.375 0 .375.375.375.375Z",fill:"#000","fill-opacity":".87"},null,-1)];function FE(t,e){return s.openBlock(),s.createElementBlock("svg",RE,VE)}var zE={render:FE};const HE={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},UE=[s.createElementVNode("path",{d:"M13.995 3.698a.3.3 0 0 0-.15-.26l-2.948-1.701a.3.3 0 0 0-.3 0L7.65 3.439a.3.3 0 0 0-.15.26v3.403a.3.3 0 0 0 .15.26l2.947 1.702a.3.3 0 0 0 .3 0l2.948-1.702a.3.3 0 0 0 .15-.26V3.698Zm-3.248-.316 1.748 1.01v2.017l-1.748 1.01L9 6.408V4.391l1.747-1.009ZM9.594 9.923a.3.3 0 0 0-.15-.26L5.847 7.587a.3.3 0 0 0-.3 0L1.95 9.663a.3.3 0 0 0-.15.26v4.154a.3.3 0 0 0 .15.26l3.597 2.076a.3.3 0 0 0 .3 0l3.597-2.076a.3.3 0 0 0 .15-.26V9.923Zm-3.897-.691 2.397 1.384v2.768l-2.397 1.384L3.3 13.384v-2.768l2.397-1.384ZM16.146 10.413a.3.3 0 0 1 .15.26v2.654a.3.3 0 0 1-.15.26l-2.298 1.326a.3.3 0 0 1-.3 0l-2.298-1.326a.3.3 0 0 1-.15-.26v-2.654a.3.3 0 0 1 .15-.26l2.298-1.326a.3.3 0 0 1 .3 0l2.298 1.326Zm-3.546.953v1.268l1.098.634 1.098-.634v-1.268l-1.098-.634-1.098.634Z",fill:"#000","fill-opacity":".87"},null,-1)];function jE(t,e){return s.openBlock(),s.createElementBlock("svg",HE,UE)}var YE={render:jE};const GE={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},WE=[s.createElementVNode("path",{d:"M6.129 14.25 14.379 6 12 3.621l-8.25 8.25V12L6 14.25h.129Zm-3.879 1.2v-4.076a.3.3 0 0 1 .088-.212l9.45-9.45a.3.3 0 0 1 .424 0l4.076 4.076a.3.3 0 0 1 0 .424l-9.45 9.45a.3.3 0 0 1-.212.088H2.55a.3.3 0 0 1-.3-.3Z",fill:"currentColor","fill-opacity":".87"},null,-1)];function ZE(t,e){return s.openBlock(),s.createElementBlock("svg",GE,WE)}var Vl={render:ZE};const qE={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16"},XE=[s.createElementVNode("path",{d:"m330.795 782.72 131.2-73.387a102.4 102.4 0 0 1 100.01 0l131.158 73.387-29.27-147.456a102.4 102.4 0 0 1 30.934-95.147L805.205 438.06l-149.333-17.707a102.4 102.4 0 0 1-80.896-58.795L512 225.024l-62.976 136.533a102.4 102.4 0 0 1-80.939 58.795l-149.29 17.707L329.173 540.16a102.4 102.4 0 0 1 30.934 95.147L330.795 782.72zm-87.467 146.773a17.067 17.067 0 0 1-25.045-18.218l58.112-292.608a17.067 17.067 0 0 0-5.12-15.872L52.224 400.256a17.067 17.067 0 0 1 9.557-29.483l296.278-35.157a17.067 17.067 0 0 0 13.482-9.813L496.512 54.912a17.067 17.067 0 0 1 30.976 0l125.013 270.933a17.067 17.067 0 0 0 13.44 9.814l296.278 35.114a17.067 17.067 0 0 1 9.557 29.44l-219.05 202.582a17.067 17.067 0 0 0-5.12 15.872l58.111 292.608a17.067 17.067 0 0 1-25.088 18.218L520.363 783.744a17.067 17.067 0 0 0-16.683 0l-260.31 145.75z",fill:"#ff9800"},null,-1)];function KE(t,e){return s.openBlock(),s.createElementBlock("svg",qE,XE)}var Cd={render:KE};const JE={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},QE=[s.createElementVNode("path",{d:"M9 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z",fill:"#fff"},null,-1),s.createElementVNode("path",{d:"M14.25 6.848V6.75c2.554.71 2.96 3.164 2.997 4.95a.295.295 0 0 1-.297.3h-2.7v1.2a.3.3 0 0 1-.3.3h-9.9a.3.3 0 0 1-.3-.3V12h-2.7a.295.295 0 0 1-.297-.3c.037-1.786.443-4.24 2.997-4.95v.098C3.75 4.63 5.85.75 9 .75s5.25 3.88 5.25 6.098ZM6.402 3.857C5.63 4.903 5.25 6.123 5.25 6.847V12h7.5V6.848c0-.725-.38-1.945-1.151-2.991C10.834 2.819 9.917 2.25 9 2.25c-.917 0-1.834.569-2.598 1.607Z",fill:"currentColor"},null,-1),s.createElementVNode("path",{d:"M5.55 14.25a.3.3 0 0 0-.3.3v2.4a.3.3 0 0 0 .3.3h.9a.3.3 0 0 0 .3-.3v-2.4a.3.3 0 0 0-.3-.3h-.9ZM11.25 14.55a.3.3 0 0 1 .3-.3h.9a.3.3 0 0 1 .3.3v1.65a.3.3 0 0 1-.3.3h-.9a.3.3 0 0 1-.3-.3v-1.65ZM8.55 14.25a.3.3 0 0 0-.3.3v3.15a.3.3 0 0 0 .3.3h.9a.3.3 0 0 0 .3-.3v-3.15a.3.3 0 0 0-.3-.3h-.9Z",fill:"#fff"},null,-1)];function e5(t,e){return s.openBlock(),s.createElementBlock("svg",JE,QE)}var w0={render:e5};const t5={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r5=[s.createElementVNode("path",{d:"M9.75 2.55a.3.3 0 0 0-.3-.3h-.9a.3.3 0 0 0-.3.3v5.7h-5.7a.3.3 0 0 0-.3.3v.9a.3.3 0 0 0 .3.3h5.7v5.7a.3.3 0 0 0 .3.3h.9a.3.3 0 0 0 .3-.3v-5.7h5.7a.3.3 0 0 0 .3-.3v-.9a.3.3 0 0 0-.3-.3h-5.7v-5.7Z",fill:"#000","fill-opacity":".87"},null,-1)];function n5(t,e){return s.openBlock(),s.createElementBlock("svg",t5,r5)}var b0={render:n5};const a5={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18"},i5=[s.createElementVNode("path",{d:"M810.667 341.333a42.667 42.667 0 1 1 0-85.333 42.667 42.667 0 0 1 0 85.333zm0 85.334a128 128 0 1 0-86.742-33.878L691.5 469.632a127.488 127.488 0 0 0-91.819 30.25l-89.941-49.194a128 128 0 1 0-224.427 57.472l-50.09 91.05a128 128 0 1 0 74.41 41.814l48.853-88.917a128.47 128.47 0 0 0 108.203-27.734l90.155 49.366a128 128 0 1 0 212.992-70.144l32.512-77.227c2.773.213 5.546.299 8.32.299zm-85.334 170.666a42.667 42.667 0 1 1-85.333 0 42.667 42.667 0 0 1 85.333 0zM213.333 768a42.667 42.667 0 1 1 0-85.333 42.667 42.667 0 0 1 0 85.333zm213.334-341.333a42.667 42.667 0 1 1-85.334 0 42.667 42.667 0 0 1 85.334 0z",fill:"currentColor"},null,-1)];function o5(t,e){return s.openBlock(),s.createElementBlock("svg",a5,i5)}var S0={render:o5};const s5={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l5=[s.createElementVNode("path",{d:"M9.283 11.717a.4.4 0 0 1-.566 0L5.183 8.183a.4.4 0 0 1 .283-.683h7.068a.4.4 0 0 1 .283.683l-3.534 3.534Z",fill:"currentColor"},null,-1)];function c5(t,e){return s.openBlock(),s.createElementBlock("svg",s5,l5)}var kd={render:c5};const u5={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f5=[s.createElementVNode("path",{d:"M11.717 8.717a.4.4 0 0 1 0 .566l-3.534 3.534a.4.4 0 0 1-.683-.283V5.466a.4.4 0 0 1 .683-.283l3.534 3.534Z",fill:"currentColor"},null,-1)];function d5(t,e){return s.openBlock(),s.createElementBlock("svg",u5,f5)}var x0={render:d5};const h5={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18"},p5=[s.createElementVNode("path",{d:"M938.795 365.227a17.067 17.067 0 0 1 0 24.106L721.536 606.55a17.067 17.067 0 0 1-24.107 0l-36.224-36.181a17.067 17.067 0 0 1 0-24.15l156.886-156.885a17.067 17.067 0 0 0 0-24.106L661.205 208.34a17.067 17.067 0 0 0-24.149 0L480.213 365.227a17.067 17.067 0 0 1-24.149 0L419.84 328.96a17.067 17.067 0 0 1 0-24.15L637.056 87.638a17.067 17.067 0 0 1 24.15 0l277.589 277.547zM88.02 660.907a17.067 17.067 0 0 1 0-24.15L305.195 419.5a17.067 17.067 0 0 1 24.149 0l36.224 36.224a17.067 17.067 0 0 1 0 24.149L208.64 636.757a17.067 17.067 0 0 0 0 24.107l156.885 156.885a17.067 17.067 0 0 0 24.107 0l156.885-156.885a17.067 17.067 0 0 1 24.15 0l36.181 36.224a17.067 17.067 0 0 1 0 24.107L389.675 938.453a17.067 17.067 0 0 1-24.15 0L87.936 660.864zm579.243-265.515a17.067 17.067 0 0 1 0 24.107L419.84 666.923a17.067 17.067 0 0 1-24.107 0l-36.224-36.224a17.067 17.067 0 0 1 0-24.15l247.382-247.381a17.067 17.067 0 0 1 24.149 0l36.224 36.224z",fill:"currentColor"},null,-1)];function m5(t,e){return s.openBlock(),s.createElementBlock("svg",h5,p5)}var v5={render:m5};const g5={width:"170",height:"135",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y5=[s.createStaticVNode('<circle cx="89" cy="67" r="66" fill="#DAE3EE"></circle><path d="M126.5 14.5h12c6.627 0 12 5.373 12 12V28h-24V14.5Z" fill="#C0CEE0"></path><path d="M48.5 26.5c0-6.627 5.373-12 12-12h66v93c0 6.627-5.373 12-12 12h-66v-93Z" fill="#fff"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M138.5 14.5h-12v12c0-6.627 5.373-12 12-12Z" fill="#fff"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M102.5 106H26v1.5c0 6.627 5.373 12 12 12h76.5c-6.627 0-12-5.373-12-12V106Z" fill="#C0CEE0"></path><rect x="75.5" y="41.5" width="30" height="3" rx="1.5" fill="#C0CEE0"></rect><rect x="60.5" y="41.5" width="10.5" height="3" rx="1.5" fill="#DEE6F1"></rect><rect x="80" y="65.5" width="34.5" height="3" rx="1.5" fill="#C0CEE0"></rect><rect x="60.5" y="65.5" width="15" height="3" rx="1.5" fill="#DEE6F1"></rect><rect x="87.5" y="53.5" width="9" height="3" rx="1.5" fill="#DEE6F1"></rect><rect x="101" y="53.5" width="13.5" height="3" rx="1.5" fill="#C0CEE0"></rect><rect x="60.5" y="53.5" width="22.5" height="3" rx="1.5" fill="#C0CEE0"></rect><rect x="60.5" y="29.5" width="54" height="3" rx="1.5" fill="#C0CEE0"></rect><rect x="60.5" y="77.5" width="39" height="3" rx="1.5" fill="#DEE6F1"></rect><rect x="60.5" y="89.5" width="4.5" height="3" rx="1.5" fill="#DEE6F1"></rect><rect x="69.5" y="89.5" width="24" height="3" rx="1.5" fill="#C0CEE0"></rect><circle cx="135.5" cy="106" r="22.5" fill="#79A8FF"></circle><path d="M24.5 28.75c0-8.284 6.716-15 15-15 8.284 0 15 6.716 15 15v13.5a1.5 1.5 0 0 1-1.5 1.5H39.5c-8.284 0-15-6.716-15-15Z" fill="#17E0B9"></path><path d="M39.5 27.997c-4.5 3-1.5 8.25-1.5 8.25l7.5 7.5 9-9.75-12.75-12.75s2.25 3.75-2.25 6.75Z" fill="url(#a)"></path><path d="M37.052 24.168c-.392.462-.504.964-.504 1.09 0 .81-.682 1.466-1.524 1.466s-1.524-.657-1.524-1.466c0-.862.396-2.006 1.19-2.943.846-.999 2.194-1.815 4.06-1.815 1.738 0 3.101.596 4.015 1.58A4.681 4.681 0 0 1 44 25.257c0 .943-.189 1.806-.743 2.613-.518.755-1.275 1.34-2.131 1.894-.67.434-.787.68-.81.736-.042.099-.042.156-.042.68 0 .81-.682 1.467-1.524 1.467s-1.524-.656-1.524-1.466l-.001-.11c-.006-.345-.016-1 .264-1.669.333-.793.978-1.45 1.934-2.07.77-.499 1.113-.82 1.29-1.077.14-.204.239-.46.239-.998 0-.441-.155-.897-.46-1.224-.27-.292-.77-.602-1.742-.602-.843 0-1.359.336-1.698.736ZM40.202 35.534c0 .81-.683 1.466-1.525 1.466-.841 0-1.524-.656-1.524-1.466 0-.81.683-1.466 1.524-1.466.842 0 1.525.656 1.525 1.466Z" fill="#fff"></path><path d="M139.25 109.75c-3.75 3-9 2.25-9 2.25l15 14.25 10.5-10.5-14.25-15s1.5 6-2.25 9Z" fill="url(#b)"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M139.239 112.14a8.236 8.236 0 0 1-12.737-6.898 8.236 8.236 0 1 1 15.135 4.5l2.367 2.366a1.696 1.696 0 0 1-2.398 2.398l-2.367-2.366Zm.344-6.899a4.845 4.845 0 1 0-9.69.001 4.845 4.845 0 0 0 9.69-.001Z" fill="url(#c)"></path><circle cx="159.5" cy="77.5" r="1.5" fill="#17E0B9"></circle><circle r="4.5" transform="matrix(1 0 0 -1 165.5 64)" fill="#DAE3EE"></circle><circle r="2.25" transform="matrix(1 0 0 -1 14.75 54.25)" fill="#DAE2EE"></circle><circle r="6" transform="matrix(1 0 0 -1 6.5 41.5)" fill="#DAE3EE"></circle><path fill-rule="evenodd" clip-rule="evenodd" d="M14 91.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM11.75 91a2.25 2.25 0 1 0 4.5 0 2.25 2.25 0 0 0-4.5 0Z" fill="#17E0B9"></path><circle r="3" transform="matrix(1 0 0 -1 39.5 131.5)" fill="#DAE2EE"></circle><path fill-rule="evenodd" clip-rule="evenodd" d="M127.25 4.6a1.35 1.35 0 1 1 0-2.7 1.35 1.35 0 0 1 0 2.7Zm-3.15-1.35a3.15 3.15 0 1 0 6.3 0 3.15 3.15 0 0 0-6.3 0Z" fill="#79A8FF"></path><defs><linearGradient id="a" x1="35.916" y1="23.163" x2="50.75" y2="37.75" gradientUnits="userSpaceOnUse"><stop stop-color="#1BC5A4"></stop><stop offset="1" stop-color="#17E0B9"></stop></linearGradient><linearGradient id="b" x1="131" y1="101.5" x2="149" y2="119.5" gradientUnits="userSpaceOnUse"><stop stop-color="#4385FF"></stop><stop offset="1" stop-color="#79A8FF"></stop></linearGradient><linearGradient id="c" x1="129.314" y1="102.63" x2="150.695" y2="118.968" gradientUnits="userSpaceOnUse"><stop stop-color="#fff"></stop><stop offset="1" stop-color="#C2D7FF"></stop></linearGradient></defs>',30)];function _5(t,e){return s.openBlock(),s.createElementBlock("svg",g5,y5)}var C0={render:_5};const w5={width:"170",height:"135",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b5=[s.createStaticVNode('<circle cx="89" cy="67" r="66" fill="#DAE3EE"></circle><path d="M49 24.999a6 6 0 0 1 6-6h51l23 23v64a6 6 0 0 1-6 6H55a6 6 0 0 1-6-6v-81Z" fill="#fff"></path><path d="M61 41.499a1.5 1.5 0 0 1 1.5-1.5h14a1.5 1.5 0 0 1 0 3h-14a1.5 1.5 0 0 1-1.5-1.5Z" fill="#C0CEE0"></path><rect x="81" y="66.999" width="36" height="3" rx="1.5" fill="#C0CEE0"></rect><rect x="61" y="66.999" width="15" height="3" rx="1.5" fill="#DEE6F1"></rect><path d="M88 56.499a1.5 1.5 0 0 1 1.5-1.5h26a1.5 1.5 0 0 1 0 3h-26a1.5 1.5 0 0 1-1.5-1.5Z" fill="#DEE6F1"></path><rect x="61" y="54.999" width="22.5" height="3" rx="1.5" fill="#C0CEE0"></rect><rect x="61" y="30.999" width="40" height="3" rx="1.5" fill="#C0CEE0"></rect><rect x="61" y="78.999" width="39" height="3" rx="1.5" fill="#DEE6F1"></rect><rect x="105" y="78.999" width="12" height="3" rx="1.5" fill="#DEE6F1"></rect><rect x="61" y="90.999" width="4.5" height="3" rx="1.5" fill="#DEE6F1"></rect><rect x="70" y="90.999" width="24" height="3" rx="1.5" fill="#C0CEE0"></rect><path d="m106 18.999 23 23h-17a6 6 0 0 1-6-6v-17Z" fill="#C0CEE0"></path><circle cx="126" cy="106.999" r="23" fill="#79A8FF"></circle><path d="M129.25 109.749c-3.75 3-12.25 6.75-12.25 6.75l14 12.5 17-16.5-16.5-14s1.5 8.25-2.25 11.25Z" fill="url(#a)"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M126 94.999a6 6 0 0 0-6 6v2h-2a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-10a2 2 0 0 0-2-2h-2v-2a6 6 0 0 0-6-6Z" fill="url(#b)"></path><path d="M124 100.999a2 2 0 1 1 4 0v2h-4v-2Z" fill="#508EFF"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M126.969 110.749a1.999 1.999 0 0 0-.969-3.75 2 2 0 0 0-.969 3.75c-.02.08-.031.164-.031.25v1a1 1 0 0 0 2 0v-1c0-.086-.011-.17-.031-.25Z" fill="#508EFF"></path><circle cx="159.5" cy="77.5" r="1.5" fill="#17E0B9"></circle><circle r="4.5" transform="matrix(1 0 0 -1 165.5 64)" fill="#DAE3EE"></circle><circle r="2.25" transform="matrix(1 0 0 -1 14.75 54.25)" fill="#DAE2EE"></circle><circle r="6" transform="matrix(1 0 0 -1 6.5 41.5)" fill="#DAE3EE"></circle><path fill-rule="evenodd" clip-rule="evenodd" d="M14 91.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM11.75 91a2.25 2.25 0 1 0 4.5 0 2.25 2.25 0 0 0-4.5 0Z" fill="#17E0B9"></path><circle r="3" transform="matrix(1 0 0 -1 39.5 131.5)" fill="#DAE2EE"></circle><path fill-rule="evenodd" clip-rule="evenodd" d="M127.25 4.596a1.35 1.35 0 1 1 0-2.7 1.35 1.35 0 0 1 0 2.7Zm-3.15-1.35a3.15 3.15 0 1 0 6.3 0 3.15 3.15 0 0 0-6.3 0Z" fill="#79A8FF"></path><defs><linearGradient id="a" x1="121" y1="101.499" x2="139" y2="119.499" gradientUnits="userSpaceOnUse"><stop stop-color="#4385FF"></stop><stop offset="1" stop-color="#79A8FF"></stop></linearGradient><linearGradient id="b" x1="119.125" y1="101.874" x2="144.51" y2="119.506" gradientUnits="userSpaceOnUse"><stop stop-color="#fff"></stop><stop offset="1" stop-color="#C2D7FF"></stop></linearGradient></defs>',26)];function S5(t,e){return s.openBlock(),s.createElementBlock("svg",w5,b5)}var x5={render:S5};const C5={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k5=[s.createElementVNode("path",{d:"M3.75 3.75H14.25V14.25H3.75V3.75Zm-1.2-1.5a.3.3 0 0 0-.3.3v12.9a.3.3 0 0 0 .3.3h12.9a.3.3 0 0 0 .3-.3V2.55a.3.3 0 0 0-.3-.3H2.55ZM6 8.55a.3.3 0 0 1 .3-.3h1.95V6.3a.3.3 0 0 1 .3-.3h.9a.3.3 0 0 1 .3.3v1.95h1.95a.3.3 0 0 1 .3.3v.9a.3.3 0 0 1-.3.3H9.75v1.95a.3.3 0 0 1-.3.3h-.9a.3.3 0 0 1-.3-.3V9.75H6.3a.3.3 0 0 1-.3-.3v-.9Z",fill:"#012FA6"},null,-1)];function T5(t,e){return s.openBlock(),s.createElementBlock("svg",C5,k5)}var M5={render:T5};const $5={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16"},N5=[s.createElementVNode("path",{d:"M336.486 711.885a26.01 26.01 0 0 1-26.01-27.034l4.916-125.952a25.805 25.805 0 0 1 7.578-17.408L809.165 55.706a122.88 122.88 0 0 1 81.92-36.455 109.158 109.158 0 0 1 81.92 31.13 107.11 107.11 0 0 1 31.13 81.92 122.88 122.88 0 0 1-36.455 81.92L480.87 699.597a25.805 25.805 0 0 1-17.408 7.577L337.51 712.09zm125.952-30.72zm-95.436-109.978-3.482 87.86 87.04-3.687 479.642-478.618a71.27 71.27 0 0 0 20.48-47.308 54.682 54.682 0 0 0-58.573-58.573A71.27 71.27 0 0 0 844.8 91.34z"},null,-1),s.createElementVNode("path",{d:"M801.587 1004.954H171.008A150.528 150.528 0 0 1 20.48 854.426v-630.58A150.528 150.528 0 0 1 171.008 73.318h413.286a26.01 26.01 0 0 1 0 51.815H171.008a98.714 98.714 0 0 0-98.509 98.509v630.784a98.714 98.714 0 0 0 98.509 98.508h630.58a98.714 98.714 0 0 0 98.508-98.508V440.934a26.01 26.01 0 1 1 51.814 0v413.492a150.528 150.528 0 0 1-150.323 150.528z"},null,-1)];function E5(t,e){return s.openBlock(),s.createElementBlock("svg",$5,N5)}var A5={render:E5};const D5={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16"},O5=[s.createElementVNode("path",{d:"M283.733 768a27.733 27.733 0 0 1-19.626-47.445l499.2-499.115a27.733 27.733 0 1 1 39.253 39.339l-499.2 499.114A27.648 27.648 0 0 1 283.733 768z",fill:"currentColor","fill-opacity":".87",class:"selected"},null,-1),s.createElementVNode("path",{d:"m469.888 372.95-81.152-92.16-82.475 92.16c-6.826 7.978-27.178 21.631-41.258 11.05-14.08-10.581-6.827-32.341 0-40.32l109.354-123.733a18.944 18.944 0 0 1 28.8 0L512 343.68c4.821 5.632 12.416 24.405 0 35.755s-35.37 0-42.112-6.486zm298.667 239.317-81.152 92.16-82.475-92.16c-6.827-7.979-27.179-21.675-41.259-11.094-14.08 10.624-6.826 32.384 0 40.32l109.355 123.734a18.944 18.944 0 0 0 28.8 0l108.843-123.734c4.821-5.632 12.416-24.362 0-35.712-12.416-11.392-35.371 0-42.112 6.443z",fill:"currentColor","fill-opacity":".87"},null,-1)];function L5(t,e){return s.openBlock(),s.createElementBlock("svg",D5,O5)}var P5={render:L5};const Td=[["Pacific/Honolulu",-10],["America/Anchorage",-9],["America/Los_Angeles",-8],["America/Chihuahua",-7],["America/Guatemala",-6],["America/Bogota",-5],["America/Halifax",-4],["America/Sao_Paulo",-3],["Etc/GMT+2",-2],["Atlantic/Cape_Verde",-1],["UTC",0],["Europe/Budapest",1],["Europe/Istanbul",2],["Asia/Baghdad",3],["Europe/Moscow",4],["Asia/Tashkent",5],["Asia/Almaty",6],["Asia/Bangkok",7],["Asia/Shanghai",8],["Asia/Seoul",9],["Australia/Sydney",10],["Asia/Vladivostok",11],["Pacific/Fiji",12]],Bo=t=>{const e=Td.find(r=>r[0]===t);return e?e[1]:0};function B5(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(a){a(r)}),(n=t.get("*"))&&n.slice().map(function(a){a(e,r)})}}}const ce=B5(),I5={class:"mega-header-widget"},R5={class:"item-list"},V5=["onClick"],F5={class:"primary-color"},z5=s.createTextVNode(") "),H5=s.createTextVNode(),U5={class:"current-label"},j5=s.createTextVNode(),Y5=s.defineComponent({setup(t){const e=s.inject("dashboardState"),r=s.inject("cubeState"),n=s.inject("dataConfig"),a=s.inject("currentState"),i=s.computed(()=>{const f=a.cube.timezones;return Array.isArray(f)?Td.filter(d=>f.includes(d[0])):Td}),o=s.computed(()=>n.layout.type==="cube"),l=s.computed(()=>o.value?r.timezone:e.timezone),c=s.ref(!1),u=f=>{o.value?r.timezone=f[0]:(e.timezone=f[0],s.nextTick(()=>{ce.emit("on-params-change")})),c.value=!1};return(f,d)=>(s.openBlock(),s.createElementBlock("div",I5,[s.createVNode(s.unref(R.Popover),{visible:c.value,"onUpdate:visible":d[0]||(d[0]=h=>c.value=h),placement:"bottom",trigger:"click",overlayClassName:"timezone-container clear-padding"},{content:s.withCtx(()=>[s.createElementVNode("ul",R5,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(i),h=>(s.openBlock(),s.createElementBlock("li",{key:h[1],class:s.normalizeClass({active:s.unref(l)===h[0]}),onClick:p=>u(h)},[s.createElementVNode("div",null,[s.createTextVNode(s.toDisplayString(h[0])+"(",1),s.createElementVNode("span",F5,s.toDisplayString(Number(h[1])>0?`+${h[1]}`:h[1]),1),z5])],10,V5))),128))])]),default:s.withCtx(()=>[s.createVNode(s.unref(R.Space),{size:8},{default:s.withCtx(()=>[s.createVNode(s.unref(aN)),H5,s.createElementVNode("span",U5,s.toDisplayString(s.unref(l)),1),j5,s.createVNode(s.unref(xa))]),_:1})]),_:1},8,["visible"])]))}}),k0=(t,e=!1)=>Object.keys(t).map(n=>e?{label:t[n],value:n}:{label:n,value:t[n]});var Hn;(function(t){t.m="Min",t.h="Hour",t.d="Day",t.month="Month"})(Hn||(Hn={}));const G5=t=>t?Hn[t]:Hn.d,Md=[{id:0,name:"OFF"},{id:1,name:"Every Miniutes"},{id:5,name:"Every 5 Miniutes"},{id:10,name:"Every 10 Miniutes"},{id:30,name:"Every 30 Miniutes"}],W5={class:"mega-header-widget"},Z5=s.createTextVNode(" Refresh"),q5={class:"item-list"},X5=["onClick"],K5=s.defineComponent({setup(t){const e=s.inject("dataConfig");s.inject("currentState");const r=()=>{ce.emit("on-refresh")},n=s.ref(0),a=s.ref(!1),i=s.ref(null),o=l=>{n.value=l.id,a.value=!1,clearInterval(i.value),l.id&&(i.value=setInterval(()=>{ce.emit("on-refresh")},l.id*60*1e3))};return s.onBeforeMount(()=>{clearInterval(i.value)}),s.watch(()=>e.layout.type,(l,c)=>{clearInterval(i.value)}),(l,c)=>(s.openBlock(),s.createElementBlock("div",W5,[s.createVNode(s.unref(R.Space),{size:8},{default:s.withCtx(()=>[s.createElementVNode("div",{class:"cust-flex",onClick:r},[s.createVNode(s.unref(lN)),Z5]),s.createVNode(s.unref(R.Popover),{visible:a.value,"onUpdate:visible":c[0]||(c[0]=u=>a.value=u),placement:"bottomRight",trigger:"click",overlayClassName:"refresh-container clear-padding"},{content:s.withCtx(()=>[s.createElementVNode("ul",q5,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Md),u=>(s.openBlock(),s.createElementBlock("li",{key:u.id,class:s.normalizeClass({active:u.id===n.value}),onClick:f=>o(u)},s.toDisplayString(u.name),11,X5))),128))])]),default:s.withCtx(()=>[s.createVNode(s.unref(xa))]),_:1},8,["visible"])]),_:1})]))}}),at=(t,e=[])=>t.reduce((r,n)=>(n==null?void 0:n.children)?at(n==null?void 0:n.children,r):r.concat(n),e),J5=(t,e)=>{const r=at(t),n=typeof e=="string"?e:e==null?void 0:e.id;return r.find(a=>a.id===n)},Q5=(t,e)=>t.find(r=>r.id===e),Fl=(t,e)=>{const r=at(t),n=typeof e=="string"?e:e==null?void 0:e.id;return r.find(a=>a.id===n)},Io=(t,e)=>t.primaryTimeAttribute===e,Ro=t=>{var e;return(t==null?void 0:t.previous_time)&&((e=t==null?void 0:t.previous_time)==null?void 0:e.length)==2},T0=(t,e=3,r=8,n=8)=>{if(t.length===0)return[0,0];const a=new Array(e).fill(0);t.forEach(l=>{const{x:c,y:u,w:f,h:d}=l;a[c/r]+=d});const i=Math.min(...a.slice(1));return[a.indexOf(i)*r,i]},eA=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),M0=(t,e)=>{if(e&&e.trim()!==""){const r=eA(e),n=new RegExp(`(${r})`,"g");return t.toString().replace(n,'<span class="highlight-code-str">$1</span>')}return t},tA=t=>{if(!t)return 0;let e=0;for(let r=0;r<t.length;r++)t.charCodeAt(r)>127||t.charCodeAt(r)==94?e+=2:e++;return e},zl=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),Yr=t=>t.startsWith("field_"),rA=t=>{const{dataCubes:e,groupCubes:r}=t;if(!r)return[];const n=new Map;e.forEach(o=>{const l=o.id;n.set(l,o)});const a=[],i=new Map;return r.forEach(o=>{const l={id:o.id,title:o.title,group:!0,tables:o.tables,description:o.description||"",children:[]};o.tables.map(c=>{if(n.has(c)){const u=n.get(c),{id:f,title:d,description:h=""}=u;l.children.push({id:f,title:d,description:h}),i.set(f,!0)}}),a.push(l)}),e.forEach(o=>{const{id:l,title:c,description:u=""}=o;i.has(l)||a.push({id:l,title:c,description:u})}),a};class nA{constructor(e,r){Lo(this,"splits");Lo(this,"measures");this.splits=e,this.measures=r}noSelectedSplits(){return this.splits.length===0}numberOfSplitsIsNot(e){return this.splits.length!==e}numberOfSplitsIsLimit(e){return this.splits.length<=e}noSelectedMeasures(){return this.measures.length===0}numberOfMeasuresIsNot(e){return this.measures.length!==e}haveAtLeastSplitKinds(e){const r=this.splits.map(n=>n.kind);return e.every(n=>r.indexOf(n)>-1)}}class Nr{constructor(e="success",r=!0,n=[]){Lo(this,"message");Lo(this,"success");Lo(this,"resolutions");this.message=e,this.success=r,this.resolutions=n}then(e,r){const n={message:this.message,success:this.success};this.success?e(n):r(n)}}const aA={totals:{noSplits:!0,tips_split:0},table:{splitsRequired:!0,splits_max:4,tips_split:"1 or more"},lineChartHour:{splits_max:1,splits_include:["time"],tips_split:"1 time split"},lineChart:{splitsRequired:!0,splits_max:2,splits_include:["time"],tips_split:"1 or 2, and include time"},stackLineChart:{timeRequired:!0,splitsRequired:!0,splits_count:2,splits_include:["time"]},barChart:{timeRequired:!0,splitsRequired:!0,splits_max:2,splits_include:["time"],tips_split:"1 or 2, and include time"},stackBarChart:{timeRequired:!0,splitsRequired:!0,splits_count:2,splits_include:["time"]},ringChart:{splitsRequired:!0,oneSplit:!0,splits_max:1,tips_split:1},heatmapChart:{splitsRequired:!0,splits_count:2,tips_split:2},funnelChart:{splitsRequired:!0,oneSplit:!0,splits_max:1,tips_split:1},dualAxisChart:{timeRequired:!0,splitsRequired:!0,splits_max:1,splits_include:["time"]}};var Vo=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},$0={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Vo,function(){var r=1e3,n=6e4,a=36e5,i="millisecond",o="second",l="minute",c="hour",u="day",f="week",d="month",h="quarter",p="year",m="date",v="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},w=function(M,O,T){var E=String(M);return!E||E.length>=O?M:""+Array(O+1-E.length).join(T)+M},S={s:w,z:function(M){var O=-M.utcOffset(),T=Math.abs(O),E=Math.floor(T/60),D=T%60;return(O<=0?"+":"-")+w(E,2,"0")+":"+w(D,2,"0")},m:function M(O,T){if(O.date()<T.date())return-M(T,O);var E=12*(T.year()-O.year())+(T.month()-O.month()),D=O.clone().add(E,d),P=T-D<0,I=O.clone().add(E+(P?-1:1),d);return+(-(E+(T-D)/(P?D-I:I-D))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:d,y:p,w:f,d:u,D:m,h:c,m:l,s:o,ms:i,Q:h}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},x="en",b={};b[x]=_;var C=function(M){return M instanceof A},k=function(M,O,T){var E;if(!M)return x;if(typeof M=="string")b[M]&&(E=M),O&&(b[M]=O,E=M);else{var D=M.name;b[D]=M,E=D}return!T&&E&&(x=E),E||!T&&x},$=function(M,O){if(C(M))return M.clone();var T=typeof O=="object"?O:{};return T.date=M,T.args=arguments,new A(T)},N=S;N.l=k,N.i=C,N.w=function(M,O){return $(M,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var A=function(){function M(T){this.$L=k(T.locale,null,!0),this.parse(T)}var O=M.prototype;return O.parse=function(T){this.$d=function(E){var D=E.date,P=E.utc;if(D===null)return new Date(NaN);if(N.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var I=D.match(g);if(I){var V=I[2]-1||0,F=(I[7]||"0").substring(0,3);return P?new Date(Date.UTC(I[1],V,I[3]||1,I[4]||0,I[5]||0,I[6]||0,F)):new Date(I[1],V,I[3]||1,I[4]||0,I[5]||0,I[6]||0,F)}}return new Date(D)}(T),this.$x=T.x||{},this.init()},O.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},O.$utils=function(){return N},O.isValid=function(){return this.$d.toString()!==v},O.isSame=function(T,E){var D=$(T);return this.startOf(E)<=D&&D<=this.endOf(E)},O.isAfter=function(T,E){return $(T)<this.startOf(E)},O.isBefore=function(T,E){return this.endOf(E)<$(T)},O.$g=function(T,E,D){return N.u(T)?this[E]:this.set(D,T)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(T,E){var D=this,P=!!N.u(E)||E,I=N.p(T),V=function(de,Z){var K=N.w(D.$u?Date.UTC(D.$y,Z,de):new Date(D.$y,Z,de),D);return P?K:K.endOf(u)},F=function(de,Z){return N.w(D.toDate()[de].apply(D.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(Z)),D)},H=this.$W,Y=this.$M,Q=this.$D,ae="set"+(this.$u?"UTC":"");switch(I){case p:return P?V(1,0):V(31,11);case d:return P?V(1,Y):V(0,Y+1);case f:var le=this.$locale().weekStart||0,ye=(H<le?H+7:H)-le;return V(P?Q-ye:Q+(6-ye),Y);case u:case m:return F(ae+"Hours",0);case c:return F(ae+"Minutes",1);case l:return F(ae+"Seconds",2);case o:return F(ae+"Milliseconds",3);default:return this.clone()}},O.endOf=function(T){return this.startOf(T,!1)},O.$set=function(T,E){var D,P=N.p(T),I="set"+(this.$u?"UTC":""),V=(D={},D[u]=I+"Date",D[m]=I+"Date",D[d]=I+"Month",D[p]=I+"FullYear",D[c]=I+"Hours",D[l]=I+"Minutes",D[o]=I+"Seconds",D[i]=I+"Milliseconds",D)[P],F=P===u?this.$D+(E-this.$W):E;if(P===d||P===p){var H=this.clone().set(m,1);H.$d[V](F),H.init(),this.$d=H.set(m,Math.min(this.$D,H.daysInMonth())).$d}else V&&this.$d[V](F);return this.init(),this},O.set=function(T,E){return this.clone().$set(T,E)},O.get=function(T){return this[N.p(T)]()},O.add=function(T,E){var D,P=this;T=Number(T);var I=N.p(E),V=function(Y){var Q=$(P);return N.w(Q.date(Q.date()+Math.round(Y*T)),P)};if(I===d)return this.set(d,this.$M+T);if(I===p)return this.set(p,this.$y+T);if(I===u)return V(1);if(I===f)return V(7);var F=(D={},D[l]=n,D[c]=a,D[o]=r,D)[I]||1,H=this.$d.getTime()+T*F;return N.w(H,this)},O.subtract=function(T,E){return this.add(-1*T,E)},O.format=function(T){var E=this,D=this.$locale();if(!this.isValid())return D.invalidDate||v;var P=T||"YYYY-MM-DDTHH:mm:ssZ",I=N.z(this),V=this.$H,F=this.$m,H=this.$M,Y=D.weekdays,Q=D.months,ae=function(Z,K,J,oe){return Z&&(Z[K]||Z(E,P))||J[K].substr(0,oe)},le=function(Z){return N.s(V%12||12,Z,"0")},ye=D.meridiem||function(Z,K,J){var oe=Z<12?"AM":"PM";return J?oe.toLowerCase():oe},de={YY:String(this.$y).slice(-2),YYYY:this.$y,M:H+1,MM:N.s(H+1,2,"0"),MMM:ae(D.monthsShort,H,Q,3),MMMM:ae(Q,H),D:this.$D,DD:N.s(this.$D,2,"0"),d:String(this.$W),dd:ae(D.weekdaysMin,this.$W,Y,2),ddd:ae(D.weekdaysShort,this.$W,Y,3),dddd:Y[this.$W],H:String(V),HH:N.s(V,2,"0"),h:le(1),hh:le(2),a:ye(V,F,!0),A:ye(V,F,!1),m:String(F),mm:N.s(F,2,"0"),s:String(this.$s),ss:N.s(this.$s,2,"0"),SSS:N.s(this.$ms,3,"0"),Z:I};return P.replace(y,function(Z,K){return K||de[Z]||I.replace(":","")})},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(T,E,D){var P,I=N.p(E),V=$(T),F=(V.utcOffset()-this.utcOffset())*n,H=this-V,Y=N.m(this,V);return Y=(P={},P[p]=Y/12,P[d]=Y,P[h]=Y/3,P[f]=(H-F)/6048e5,P[u]=(H-F)/864e5,P[c]=H/a,P[l]=H/n,P[o]=H/r,P)[I]||H,D?Y:N.a(Y)},O.daysInMonth=function(){return this.endOf(d).$D},O.$locale=function(){return b[this.$L]},O.locale=function(T,E){if(!T)return this.$L;var D=this.clone(),P=k(T,E,!0);return P&&(D.$L=P),D},O.clone=function(){return N.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},M}(),L=A.prototype;return $.prototype=L,[["$ms",i],["$s",o],["$m",l],["$H",c],["$W",u],["$M",d],["$y",p],["$D",m]].forEach(function(M){L[M[1]]=function(O){return this.$g(O,M[0],M[1])}}),$.extend=function(M,O){return M.$i||(M(O,A,$),M.$i=!0),$},$.locale=k,$.isDayjs=C,$.unix=function(M){return $(1e3*M)},$.en=b[x],$.Ls=b,$.p={},$})})($0);var fe=$0.exports;const $d=(t,e,r,n)=>{const a=aA[t];if((n==null?void 0:n.cube)&&(n==null?void 0:n.range)){const{maxDateRange:o,maxHourlyRange:l,maxMinutesRange:c}=n==null?void 0:n.cube,[u,f]=n.range,d=n==null?void 0:n.granularity;if(d==="d"&&o>0&&fe(f).diff(fe(u),"days")+1>o)return new Nr(`The time interval exceeds the maximum display of ${o} days`,!1);if(d==="h"&&l>0&&fe(f).diff(fe(u),"hours")+1>l)return new Nr(`The time interval exceeds the maximum display of ${l} hours`,!1);if(d==="m"&&c>0&&fe(f).diff(fe(u),"minutes")+1>c)return new Nr(`The time interval exceeds the maximum display of ${c} minutes`,!1)}t==="table"&&(n==null?void 0:n.drillCount)&&(a.splits_max=n==null?void 0:n.drillCount);const i=new nA(e,r);if(t!=="table"&&(n==null?void 0:n.granularity)==="month"){const o="Only table visualization supports setting granularity to Month grouping.";return new Nr(o,!1)}if(i.noSelectedMeasures()){const o="At least one of the measures should be selected";return new Nr(o,!1)}if(a.noSplits&&i.numberOfSplitsIsNot(0)){const o="This visualization needs exactly 0 splits";return new Nr(o,!1)}if(a.splitsRequired&&i.noSelectedSplits()){const o="At least one of the split should be selected";return new Nr(o,!1)}if(a.splits_include&&!i.haveAtLeastSplitKinds(a.splits_include)){const o=`This visualization requires a continuous dimension split of ${a.splits_include.join(",")}`;return new Nr(o,!1)}if(a.splits_max&&!i.numberOfSplitsIsLimit(a.splits_max)){const o=`This visualization needs ${a.splits_max} max splits`;return new Nr(o,!1)}if(a.splits_count&&i.numberOfSplitsIsNot(a.splits_count)){const o=`This visualization needs exactly ${a.splits_count} splits`;return new Nr(o,!1)}return new Nr};var Nd={exports:{}},N0=function(e,r){return function(){for(var a=new Array(arguments.length),i=0;i<a.length;i++)a[i]=arguments[i];return e.apply(r,a)}},iA=N0,ka=Object.prototype.toString;function Ed(t){return ka.call(t)==="[object Array]"}function Ad(t){return typeof t=="undefined"}function oA(t){return t!==null&&!Ad(t)&&t.constructor!==null&&!Ad(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function sA(t){return ka.call(t)==="[object ArrayBuffer]"}function lA(t){return typeof FormData!="undefined"&&t instanceof FormData}function cA(t){var e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function uA(t){return typeof t=="string"}function fA(t){return typeof t=="number"}function E0(t){return t!==null&&typeof t=="object"}function Hl(t){if(ka.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function dA(t){return ka.call(t)==="[object Date]"}function hA(t){return ka.call(t)==="[object File]"}function pA(t){return ka.call(t)==="[object Blob]"}function A0(t){return ka.call(t)==="[object Function]"}function mA(t){return E0(t)&&A0(t.pipe)}function vA(t){return typeof URLSearchParams!="undefined"&&t instanceof URLSearchParams}function gA(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function yA(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function Dd(t,e){if(!(t===null||typeof t=="undefined"))if(typeof t!="object"&&(t=[t]),Ed(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.call(null,t[a],a,t)}function Od(){var t={};function e(a,i){Hl(t[i])&&Hl(a)?t[i]=Od(t[i],a):Hl(a)?t[i]=Od({},a):Ed(a)?t[i]=a.slice():t[i]=a}for(var r=0,n=arguments.length;r<n;r++)Dd(arguments[r],e);return t}function _A(t,e,r){return Dd(e,function(a,i){r&&typeof a=="function"?t[i]=iA(a,r):t[i]=a}),t}function wA(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}var Jt={isArray:Ed,isArrayBuffer:sA,isBuffer:oA,isFormData:lA,isArrayBufferView:cA,isString:uA,isNumber:fA,isObject:E0,isPlainObject:Hl,isUndefined:Ad,isDate:dA,isFile:hA,isBlob:pA,isFunction:A0,isStream:mA,isURLSearchParams:vA,isStandardBrowserEnv:yA,forEach:Dd,merge:Od,extend:_A,trim:gA,stripBOM:wA},$i=Jt;function D0(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var O0=function(e,r,n){if(!r)return e;var a;if(n)a=n(r);else if($i.isURLSearchParams(r))a=r.toString();else{var i=[];$i.forEach(r,function(c,u){c===null||typeof c=="undefined"||($i.isArray(c)?u=u+"[]":c=[c],$i.forEach(c,function(d){$i.isDate(d)?d=d.toISOString():$i.isObject(d)&&(d=JSON.stringify(d)),i.push(D0(u)+"="+D0(d))}))}),a=i.join("&")}if(a){var o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e},bA=Jt;function Ul(){this.handlers=[]}Ul.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1},Ul.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},Ul.prototype.forEach=function(e){bA.forEach(this.handlers,function(n){n!==null&&e(n)})};var SA=Ul,xA=Jt,CA=function(e,r){xA.forEach(e,function(a,i){i!==r&&i.toUpperCase()===r.toUpperCase()&&(e[r]=a,delete e[i])})},L0=function(e,r,n,a,i){return e.config=r,n&&(e.code=n),e.request=a,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e},kA=L0,P0=function(e,r,n,a,i){var o=new Error(e);return kA(o,r,n,a,i)},TA=P0,MA=function(e,r,n){var a=n.config.validateStatus;!n.status||!a||a(n.status)?e(n):r(TA("Request failed with status code "+n.status,n.config,null,n.request,n))},jl=Jt,$A=jl.isStandardBrowserEnv()?function(){return{write:function(r,n,a,i,o,l){var c=[];c.push(r+"="+encodeURIComponent(n)),jl.isNumber(a)&&c.push("expires="+new Date(a).toGMTString()),jl.isString(i)&&c.push("path="+i),jl.isString(o)&&c.push("domain="+o),l===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(r){var n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),NA=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)},EA=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e},AA=NA,DA=EA,OA=function(e,r){return e&&!AA(r)?DA(e,r):r},Ld=Jt,LA=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],PA=function(e){var r={},n,a,i;return e&&Ld.forEach(e.split(`
2
+ `),function(l){if(i=l.indexOf(":"),n=Ld.trim(l.substr(0,i)).toLowerCase(),a=Ld.trim(l.substr(i+1)),n){if(r[n]&&LA.indexOf(n)>=0)return;n==="set-cookie"?r[n]=(r[n]?r[n]:[]).concat([a]):r[n]=r[n]?r[n]+", "+a:a}}),r},B0=Jt,BA=B0.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function a(i){var o=i;return e&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(o){var l=B0.isString(o)?a(o):o;return l.protocol===n.protocol&&l.host===n.host}}():function(){return function(){return!0}}(),Yl=Jt,IA=MA,RA=$A,VA=O0,FA=OA,zA=PA,HA=BA,Pd=P0,I0=function(e){return new Promise(function(n,a){var i=e.data,o=e.headers,l=e.responseType;Yl.isFormData(i)&&delete o["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var u=e.auth.username||"",f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(u+":"+f)}var d=FA(e.baseURL,e.url);c.open(e.method.toUpperCase(),VA(d,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function h(){if(!!c){var m="getAllResponseHeaders"in c?zA(c.getAllResponseHeaders()):null,v=!l||l==="text"||l==="json"?c.responseText:c.response,g={data:v,status:c.status,statusText:c.statusText,headers:m,config:e,request:c};IA(n,a,g),c=null}}if("onloadend"in c?c.onloadend=h:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(h)},c.onabort=function(){!c||(a(Pd("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){a(Pd("Network Error",e,null,c)),c=null},c.ontimeout=function(){var v="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(v=e.timeoutErrorMessage),a(Pd(v,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},Yl.isStandardBrowserEnv()){var p=(e.withCredentials||HA(d))&&e.xsrfCookieName?RA.read(e.xsrfCookieName):void 0;p&&(o[e.xsrfHeaderName]=p)}"setRequestHeader"in c&&Yl.forEach(o,function(v,g){typeof i=="undefined"&&g.toLowerCase()==="content-type"?delete o[g]:c.setRequestHeader(g,v)}),Yl.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),l&&l!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(v){!c||(c.abort(),a(v),c=null)}),i||(i=null),c.send(i)})},bt=Jt,R0=CA,UA=L0,jA={"Content-Type":"application/x-www-form-urlencoded"};function V0(t,e){!bt.isUndefined(t)&&bt.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function YA(){var t;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(t=I0),t}function GA(t,e,r){if(bt.isString(t))try{return(e||JSON.parse)(t),bt.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Gl={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:YA(),transformRequest:[function(e,r){return R0(r,"Accept"),R0(r,"Content-Type"),bt.isFormData(e)||bt.isArrayBuffer(e)||bt.isBuffer(e)||bt.isStream(e)||bt.isFile(e)||bt.isBlob(e)?e:bt.isArrayBufferView(e)?e.buffer:bt.isURLSearchParams(e)?(V0(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):bt.isObject(e)||r&&r["Content-Type"]==="application/json"?(V0(r,"application/json"),GA(e)):e}],transformResponse:[function(e){var r=this.transitional,n=r&&r.silentJSONParsing,a=r&&r.forcedJSONParsing,i=!n&&this.responseType==="json";if(i||a&&bt.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(i)throw o.name==="SyntaxError"?UA(o,this,"E_JSON_PARSE"):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};Gl.headers={common:{Accept:"application/json, text/plain, */*"}},bt.forEach(["delete","get","head"],function(e){Gl.headers[e]={}}),bt.forEach(["post","put","patch"],function(e){Gl.headers[e]=bt.merge(jA)});var Bd=Gl,WA=Jt,ZA=Bd,qA=function(e,r,n){var a=this||ZA;return WA.forEach(n,function(o){e=o.call(a,e,r)}),e},F0=function(e){return!!(e&&e.__CANCEL__)},z0=Jt,Id=qA,XA=F0,KA=Bd;function Rd(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var JA=function(e){Rd(e),e.headers=e.headers||{},e.data=Id.call(e,e.data,e.headers,e.transformRequest),e.headers=z0.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),z0.forEach(["delete","get","head","post","put","patch","common"],function(a){delete e.headers[a]});var r=e.adapter||KA.adapter;return r(e).then(function(a){return Rd(e),a.data=Id.call(e,a.data,a.headers,e.transformResponse),a},function(a){return XA(a)||(Rd(e),a&&a.response&&(a.response.data=Id.call(e,a.response.data,a.response.headers,e.transformResponse))),Promise.reject(a)})},kt=Jt,H0=function(e,r){r=r||{};var n={},a=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],l=["validateStatus"];function c(h,p){return kt.isPlainObject(h)&&kt.isPlainObject(p)?kt.merge(h,p):kt.isPlainObject(p)?kt.merge({},p):kt.isArray(p)?p.slice():p}function u(h){kt.isUndefined(r[h])?kt.isUndefined(e[h])||(n[h]=c(void 0,e[h])):n[h]=c(e[h],r[h])}kt.forEach(a,function(p){kt.isUndefined(r[p])||(n[p]=c(void 0,r[p]))}),kt.forEach(i,u),kt.forEach(o,function(p){kt.isUndefined(r[p])?kt.isUndefined(e[p])||(n[p]=c(void 0,e[p])):n[p]=c(void 0,r[p])}),kt.forEach(l,function(p){p in r?n[p]=c(e[p],r[p]):p in e&&(n[p]=c(void 0,e[p]))});var f=a.concat(i).concat(o).concat(l),d=Object.keys(e).concat(Object.keys(r)).filter(function(p){return f.indexOf(p)===-1});return kt.forEach(d,u),n},QA={name:"axios",version:"0.21.4",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]},U0=QA,Vd={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Vd[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var j0={},e4=U0.version.split(".");function Y0(t,e){for(var r=e?e.split("."):e4,n=t.split("."),a=0;a<3;a++){if(r[a]>n[a])return!0;if(r[a]<n[a])return!1}return!1}Vd.transitional=function(e,r,n){var a=r&&Y0(r);function i(o,l){return"[Axios v"+U0.version+"] Transitional option '"+o+"'"+l+(n?". "+n:"")}return function(o,l,c){if(e===!1)throw new Error(i(l," has been removed in "+r));return a&&!j0[l]&&(j0[l]=!0,console.warn(i(l," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,l,c):!0}};function t4(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var n=Object.keys(t),a=n.length;a-- >0;){var i=n[a],o=e[i];if(o){var l=t[i],c=l===void 0||o(l,i,t);if(c!==!0)throw new TypeError("option "+i+" must be "+c);continue}if(r!==!0)throw Error("Unknown option "+i)}}var r4={isOlderVersion:Y0,assertOptions:t4,validators:Vd},G0=Jt,n4=O0,W0=SA,Z0=JA,Wl=H0,q0=r4,Ni=q0.validators;function Fo(t){this.defaults=t,this.interceptors={request:new W0,response:new W0}}Fo.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=Wl(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;r!==void 0&&q0.assertOptions(r,{silentJSONParsing:Ni.transitional(Ni.boolean,"1.0.0"),forcedJSONParsing:Ni.transitional(Ni.boolean,"1.0.0"),clarifyTimeoutError:Ni.transitional(Ni.boolean,"1.0.0")},!1);var n=[],a=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(e)===!1||(a=a&&h.synchronous,n.unshift(h.fulfilled,h.rejected))});var i=[];this.interceptors.response.forEach(function(h){i.push(h.fulfilled,h.rejected)});var o;if(!a){var l=[Z0,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(i),o=Promise.resolve(e);l.length;)o=o.then(l.shift(),l.shift());return o}for(var c=e;n.length;){var u=n.shift(),f=n.shift();try{c=u(c)}catch(d){f(d);break}}try{o=Z0(c)}catch(d){return Promise.reject(d)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},Fo.prototype.getUri=function(e){return e=Wl(this.defaults,e),n4(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},G0.forEach(["delete","get","head","options"],function(e){Fo.prototype[e]=function(r,n){return this.request(Wl(n||{},{method:e,url:r,data:(n||{}).data}))}}),G0.forEach(["post","put","patch"],function(e){Fo.prototype[e]=function(r,n,a){return this.request(Wl(a||{},{method:e,url:r,data:n}))}});var a4=Fo;function Fd(t){this.message=t}Fd.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Fd.prototype.__CANCEL__=!0;var X0=Fd,i4=X0;function Zl(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(a){e=a});var r=this;t(function(a){r.reason||(r.reason=new i4(a),e(r.reason))})}Zl.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Zl.source=function(){var e,r=new Zl(function(a){e=a});return{token:r,cancel:e}};var o4=Zl,s4=function(e){return function(n){return e.apply(null,n)}},l4=function(e){return typeof e=="object"&&e.isAxiosError===!0},K0=Jt,c4=N0,ql=a4,u4=H0,f4=Bd;function J0(t){var e=new ql(t),r=c4(ql.prototype.request,e);return K0.extend(r,ql.prototype,e),K0.extend(r,e),r}var Er=J0(f4);Er.Axios=ql,Er.create=function(e){return J0(u4(Er.defaults,e))},Er.Cancel=X0,Er.CancelToken=o4,Er.isCancel=F0,Er.all=function(e){return Promise.all(e)},Er.spread=s4,Er.isAxiosError=l4,Nd.exports=Er,Nd.exports.default=Er;var Q0=Nd.exports;const Ei=Q0.create({baseURL:(p$=(h$=window._mega)==null?void 0:h$.base)!=null?p$:"/mega/api/v1/",withCredentials:!0,timeout:5*60*1e3});Ei.interceptors.request.use(t=>t,t=>Promise.reject(t)),Ei.interceptors.response.use(t=>{const e=t.data;return(e==null?void 0:e.code)!=="200"&&((e==null?void 0:e.msg)||(e==null?void 0:e.message))&&R.message.error((e==null?void 0:e.msg)||(e==null?void 0:e.message)),e},t=>((t==null?void 0:t.message)&&(t==null?void 0:t.message)!=="cancel"&&R.message.error(t.message),t.response&&[401].includes(t.response.status)&&ce.emit("request-auth-faild",t.response.status),Promise.reject(t)));var d4=(t,e)=>{var r,n;return Ei.defaults.baseURL=(n=(r=window._mega)==null?void 0:r.base)!=null?n:"/mega/api/v1/",Ei(t).then(a=>{var i;return(e==null?void 0:e.origin)?a:((i=a.data)==null?void 0:i.data)||a.data})};const h4=t=>{var e,r;return Ei.defaults.baseURL=(r=(e=window._mega)==null?void 0:e.base)!=null?r:"/mega/api/v1/",Ei(t).then(n=>{var a;return[((a=n.data)==null?void 0:a.data)||n.data||n,null]}).catch(n=>[null,n])},p4={bid:"settings/",cubes:"settings/data_cubes/",filter:"proxy/filter/",pivot:"proxy/pivot/",download:"proxy/pivot/csv"},zo={api:"report_setting/",apiId:t=>`report_setting/${t}/`},Un={api:"dashboard/",apiId:t=>`dashboard/${t}/`,apiSet:"dashboard/default"};var Xl=()=>{const t=Q0.CancelToken.source();return{cancel(){t.cancel("cancel")},request(e,r,n={},a={}){return d4({url:p4[e],cancelToken:t.token,method:"POST",params:n,data:r,headers:a},{origin:!0})}}},m4=typeof global=="object"&&global&&global.Object===Object&&global,ey=m4,v4=typeof self=="object"&&self&&self.Object===Object&&self,g4=ey||v4||Function("return this")(),Ar=g4,y4=Ar.Symbol,or=y4,ty=Object.prototype,_4=ty.hasOwnProperty,w4=ty.toString,Ho=or?or.toStringTag:void 0;function b4(t){var e=_4.call(t,Ho),r=t[Ho];try{t[Ho]=void 0;var n=!0}catch{}var a=w4.call(t);return n&&(e?t[Ho]=r:delete t[Ho]),a}var S4=Object.prototype,x4=S4.toString;function C4(t){return x4.call(t)}var k4="[object Null]",T4="[object Undefined]",ry=or?or.toStringTag:void 0;function Ai(t){return t==null?t===void 0?T4:k4:ry&&ry in Object(t)?b4(t):C4(t)}function gn(t){return t!=null&&typeof t=="object"}var M4="[object Symbol]";function Ta(t){return typeof t=="symbol"||gn(t)&&Ai(t)==M4}function Uo(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}var $4=Array.isArray,Ht=$4,N4=1/0,ny=or?or.prototype:void 0,ay=ny?ny.toString:void 0;function iy(t){if(typeof t=="string")return t;if(Ht(t))return Uo(t,iy)+"";if(Ta(t))return ay?ay.call(t):"";var e=t+"";return e=="0"&&1/t==-N4?"-0":e}var E4=/\s/;function A4(t){for(var e=t.length;e--&&E4.test(t.charAt(e)););return e}var D4=/^\s+/;function O4(t){return t&&t.slice(0,A4(t)+1).replace(D4,"")}function Gr(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var oy=0/0,L4=/^[-+]0x[0-9a-f]+$/i,P4=/^0b[01]+$/i,B4=/^0o[0-7]+$/i,I4=parseInt;function zd(t){if(typeof t=="number")return t;if(Ta(t))return oy;if(Gr(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Gr(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=O4(t);var r=P4.test(t);return r||B4.test(t)?I4(t.slice(2),r?2:8):L4.test(t)?oy:+t}var sy=1/0,R4=17976931348623157e292;function V4(t){if(!t)return t===0?t:0;if(t=zd(t),t===sy||t===-sy){var e=t<0?-1:1;return e*R4}return t===t?t:0}function F4(t){var e=V4(t),r=e%1;return e===e?r?e-r:e:0}function Kl(t){return t}var z4="[object AsyncFunction]",H4="[object Function]",U4="[object GeneratorFunction]",j4="[object Proxy]";function ly(t){if(!Gr(t))return!1;var e=Ai(t);return e==H4||e==U4||e==z4||e==j4}var Y4=Ar["__core-js_shared__"],Hd=Y4,cy=function(){var t=/[^.]+$/.exec(Hd&&Hd.keys&&Hd.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function G4(t){return!!cy&&cy in t}var W4=Function.prototype,Z4=W4.toString;function Ma(t){if(t!=null){try{return Z4.call(t)}catch{}try{return t+""}catch{}}return""}var q4=/[\\^$.*+?()[\]{}|]/g,X4=/^\[object .+?Constructor\]$/,K4=Function.prototype,J4=Object.prototype,Q4=K4.toString,eD=J4.hasOwnProperty,tD=RegExp("^"+Q4.call(eD).replace(q4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function rD(t){if(!Gr(t)||G4(t))return!1;var e=ly(t)?tD:X4;return e.test(Ma(t))}function nD(t,e){return t==null?void 0:t[e]}function $a(t,e){var r=nD(t,e);return rD(r)?r:void 0}var aD=$a(Ar,"WeakMap"),Ud=aD,uy=Object.create,iD=function(){function t(){}return function(e){if(!Gr(e))return{};if(uy)return uy(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),oD=iD;function sD(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function lD(){}function cD(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var uD=800,fD=16,dD=Date.now;function hD(t){var e=0,r=0;return function(){var n=dD(),a=fD-(n-r);if(r=n,a>0){if(++e>=uD)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function pD(t){return function(){return t}}var mD=function(){try{var t=$a(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Jl=mD,vD=Jl?function(t,e){return Jl(t,"toString",{configurable:!0,enumerable:!1,value:pD(e),writable:!0})}:Kl,gD=vD,yD=hD(gD),_D=yD;function wD(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}function fy(t,e,r,n){for(var a=t.length,i=r+(n?1:-1);n?i--:++i<a;)if(e(t[i],i,t))return i;return-1}function bD(t){return t!==t}function SD(t,e,r){for(var n=r-1,a=t.length;++n<a;)if(t[n]===e)return n;return-1}function xD(t,e,r){return e===e?SD(t,e,r):fy(t,bD,r)}function dy(t,e){var r=t==null?0:t.length;return!!r&&xD(t,e,0)>-1}var CD=9007199254740991,kD=/^(?:0|[1-9]\d*)$/;function jd(t,e){var r=typeof t;return e=e==null?CD:e,!!e&&(r=="number"||r!="symbol"&&kD.test(t))&&t>-1&&t%1==0&&t<e}function Yd(t,e,r){e=="__proto__"&&Jl?Jl(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Ql(t,e){return t===e||t!==t&&e!==e}var TD=Object.prototype,MD=TD.hasOwnProperty;function hy(t,e,r){var n=t[e];(!(MD.call(t,e)&&Ql(n,r))||r===void 0&&!(e in t))&&Yd(t,e,r)}function ec(t,e,r,n){var a=!r;r||(r={});for(var i=-1,o=e.length;++i<o;){var l=e[i],c=n?n(r[l],t[l],l,r,t):void 0;c===void 0&&(c=t[l]),a?Yd(r,l,c):hy(r,l,c)}return r}var py=Math.max;function $D(t,e,r){return e=py(e===void 0?t.length-1:e,0),function(){for(var n=arguments,a=-1,i=py(n.length-e,0),o=Array(i);++a<i;)o[a]=n[e+a];a=-1;for(var l=Array(e+1);++a<e;)l[a]=n[a];return l[e]=r(o),sD(t,this,l)}}function my(t,e){return _D($D(t,e,Kl),t+"")}var ND=9007199254740991;function Gd(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ND}function Na(t){return t!=null&&Gd(t.length)&&!ly(t)}function Wd(t,e,r){if(!Gr(r))return!1;var n=typeof e;return(n=="number"?Na(r)&&jd(e,r.length):n=="string"&&e in r)?Ql(r[e],t):!1}var ED=Object.prototype;function Zd(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||ED;return t===r}function AD(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var DD="[object Arguments]";function vy(t){return gn(t)&&Ai(t)==DD}var gy=Object.prototype,OD=gy.hasOwnProperty,LD=gy.propertyIsEnumerable,PD=vy(function(){return arguments}())?vy:function(t){return gn(t)&&OD.call(t,"callee")&&!LD.call(t,"callee")},qd=PD;function BD(){return!1}var yy=typeof Ne=="object"&&Ne&&!Ne.nodeType&&Ne,_y=yy&&typeof module=="object"&&module&&!module.nodeType&&module,ID=_y&&_y.exports===yy,wy=ID?Ar.Buffer:void 0,RD=wy?wy.isBuffer:void 0,VD=RD||BD,tc=VD,FD="[object Arguments]",zD="[object Array]",HD="[object Boolean]",UD="[object Date]",jD="[object Error]",YD="[object Function]",GD="[object Map]",WD="[object Number]",ZD="[object Object]",qD="[object RegExp]",XD="[object Set]",KD="[object String]",JD="[object WeakMap]",QD="[object ArrayBuffer]",eO="[object DataView]",tO="[object Float32Array]",rO="[object Float64Array]",nO="[object Int8Array]",aO="[object Int16Array]",iO="[object Int32Array]",oO="[object Uint8Array]",sO="[object Uint8ClampedArray]",lO="[object Uint16Array]",cO="[object Uint32Array]",rt={};rt[tO]=rt[rO]=rt[nO]=rt[aO]=rt[iO]=rt[oO]=rt[sO]=rt[lO]=rt[cO]=!0,rt[FD]=rt[zD]=rt[QD]=rt[HD]=rt[eO]=rt[UD]=rt[jD]=rt[YD]=rt[GD]=rt[WD]=rt[ZD]=rt[qD]=rt[XD]=rt[KD]=rt[JD]=!1;function uO(t){return gn(t)&&Gd(t.length)&&!!rt[Ai(t)]}function jo(t){return function(e){return t(e)}}var by=typeof Ne=="object"&&Ne&&!Ne.nodeType&&Ne,Yo=by&&typeof module=="object"&&module&&!module.nodeType&&module,fO=Yo&&Yo.exports===by,Xd=fO&&ey.process,dO=function(){try{var t=Yo&&Yo.require&&Yo.require("util").types;return t||Xd&&Xd.binding&&Xd.binding("util")}catch{}}(),Di=dO,Sy=Di&&Di.isTypedArray,hO=Sy?jo(Sy):uO,xy=hO,pO=Object.prototype,mO=pO.hasOwnProperty;function Cy(t,e){var r=Ht(t),n=!r&&qd(t),a=!r&&!n&&tc(t),i=!r&&!n&&!a&&xy(t),o=r||n||a||i,l=o?AD(t.length,String):[],c=l.length;for(var u in t)(e||mO.call(t,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||jd(u,c)))&&l.push(u);return l}function ky(t,e){return function(r){return t(e(r))}}var vO=ky(Object.keys,Object),gO=vO,yO=Object.prototype,_O=yO.hasOwnProperty;function wO(t){if(!Zd(t))return gO(t);var e=[];for(var r in Object(t))_O.call(t,r)&&r!="constructor"&&e.push(r);return e}function Oi(t){return Na(t)?Cy(t):wO(t)}function bO(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var SO=Object.prototype,xO=SO.hasOwnProperty;function CO(t){if(!Gr(t))return bO(t);var e=Zd(t),r=[];for(var n in t)n=="constructor"&&(e||!xO.call(t,n))||r.push(n);return r}function Kd(t){return Na(t)?Cy(t,!0):CO(t)}var kO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,TO=/^\w*$/;function Jd(t,e){if(Ht(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Ta(t)?!0:TO.test(t)||!kO.test(t)||e!=null&&t in Object(e)}var MO=$a(Object,"create"),Go=MO;function $O(){this.__data__=Go?Go(null):{},this.size=0}function NO(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var EO="__lodash_hash_undefined__",AO=Object.prototype,DO=AO.hasOwnProperty;function OO(t){var e=this.__data__;if(Go){var r=e[t];return r===EO?void 0:r}return DO.call(e,t)?e[t]:void 0}var LO=Object.prototype,PO=LO.hasOwnProperty;function BO(t){var e=this.__data__;return Go?e[t]!==void 0:PO.call(e,t)}var IO="__lodash_hash_undefined__";function RO(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Go&&e===void 0?IO:e,this}function Ea(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ea.prototype.clear=$O,Ea.prototype.delete=NO,Ea.prototype.get=OO,Ea.prototype.has=BO,Ea.prototype.set=RO;function VO(){this.__data__=[],this.size=0}function rc(t,e){for(var r=t.length;r--;)if(Ql(t[r][0],e))return r;return-1}var FO=Array.prototype,zO=FO.splice;function HO(t){var e=this.__data__,r=rc(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():zO.call(e,r,1),--this.size,!0}function UO(t){var e=this.__data__,r=rc(e,t);return r<0?void 0:e[r][1]}function jO(t){return rc(this.__data__,t)>-1}function YO(t,e){var r=this.__data__,n=rc(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function yn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}yn.prototype.clear=VO,yn.prototype.delete=HO,yn.prototype.get=UO,yn.prototype.has=jO,yn.prototype.set=YO;var GO=$a(Ar,"Map"),Wo=GO;function WO(){this.size=0,this.__data__={hash:new Ea,map:new(Wo||yn),string:new Ea}}function ZO(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function nc(t,e){var r=t.__data__;return ZO(e)?r[typeof e=="string"?"string":"hash"]:r.map}function qO(t){var e=nc(this,t).delete(t);return this.size-=e?1:0,e}function XO(t){return nc(this,t).get(t)}function KO(t){return nc(this,t).has(t)}function JO(t,e){var r=nc(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function _n(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}_n.prototype.clear=WO,_n.prototype.delete=qO,_n.prototype.get=XO,_n.prototype.has=KO,_n.prototype.set=JO;var QO="Expected a function";function Qd(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(QO);var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=t.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(Qd.Cache||_n),r}Qd.Cache=_n;var eL=500;function tL(t){var e=Qd(t,function(n){return r.size===eL&&r.clear(),n}),r=e.cache;return e}var rL=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nL=/\\(\\)?/g,aL=tL(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(rL,function(r,n,a,i){e.push(a?i.replace(nL,"$1"):n||r)}),e}),iL=aL;function oL(t){return t==null?"":iy(t)}function Ty(t,e){return Ht(t)?t:Jd(t,e)?[t]:iL(oL(t))}var sL=1/0;function ac(t){if(typeof t=="string"||Ta(t))return t;var e=t+"";return e=="0"&&1/t==-sL?"-0":e}function eh(t,e){e=Ty(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[ac(e[r++])];return r&&r==n?t:void 0}function lL(t,e,r){var n=t==null?void 0:eh(t,e);return n===void 0?r:n}function th(t,e){for(var r=-1,n=e.length,a=t.length;++r<n;)t[a+r]=e[r];return t}var My=or?or.isConcatSpreadable:void 0;function cL(t){return Ht(t)||qd(t)||!!(My&&t&&t[My])}function rh(t,e,r,n,a){var i=-1,o=t.length;for(r||(r=cL),a||(a=[]);++i<o;){var l=t[i];e>0&&r(l)?e>1?rh(l,e-1,r,n,a):th(a,l):n||(a[a.length]=l)}return a}var uL=ky(Object.getPrototypeOf,Object),$y=uL;function fL(){this.__data__=new yn,this.size=0}function dL(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function hL(t){return this.__data__.get(t)}function pL(t){return this.__data__.has(t)}var mL=200;function vL(t,e){var r=this.__data__;if(r instanceof yn){var n=r.__data__;if(!Wo||n.length<mL-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new _n(n)}return r.set(t,e),this.size=r.size,this}function Wr(t){var e=this.__data__=new yn(t);this.size=e.size}Wr.prototype.clear=fL,Wr.prototype.delete=dL,Wr.prototype.get=hL,Wr.prototype.has=pL,Wr.prototype.set=vL;function gL(t,e){return t&&ec(e,Oi(e),t)}function yL(t,e){return t&&ec(e,Kd(e),t)}var Ny=typeof Ne=="object"&&Ne&&!Ne.nodeType&&Ne,Ey=Ny&&typeof module=="object"&&module&&!module.nodeType&&module,_L=Ey&&Ey.exports===Ny,Ay=_L?Ar.Buffer:void 0,Dy=Ay?Ay.allocUnsafe:void 0;function wL(t,e){if(e)return t.slice();var r=t.length,n=Dy?Dy(r):new t.constructor(r);return t.copy(n),n}function Oy(t,e){for(var r=-1,n=t==null?0:t.length,a=0,i=[];++r<n;){var o=t[r];e(o,r,t)&&(i[a++]=o)}return i}function Ly(){return[]}var bL=Object.prototype,SL=bL.propertyIsEnumerable,Py=Object.getOwnPropertySymbols,xL=Py?function(t){return t==null?[]:(t=Object(t),Oy(Py(t),function(e){return SL.call(t,e)}))}:Ly,nh=xL;function CL(t,e){return ec(t,nh(t),e)}var kL=Object.getOwnPropertySymbols,TL=kL?function(t){for(var e=[];t;)th(e,nh(t)),t=$y(t);return e}:Ly,By=TL;function ML(t,e){return ec(t,By(t),e)}function Iy(t,e,r){var n=e(t);return Ht(t)?n:th(n,r(t))}function ah(t){return Iy(t,Oi,nh)}function $L(t){return Iy(t,Kd,By)}var NL=$a(Ar,"DataView"),ih=NL,EL=$a(Ar,"Promise"),oh=EL,AL=$a(Ar,"Set"),Li=AL,Ry="[object Map]",DL="[object Object]",Vy="[object Promise]",Fy="[object Set]",zy="[object WeakMap]",Hy="[object DataView]",OL=Ma(ih),LL=Ma(Wo),PL=Ma(oh),BL=Ma(Li),IL=Ma(Ud),Aa=Ai;(ih&&Aa(new ih(new ArrayBuffer(1)))!=Hy||Wo&&Aa(new Wo)!=Ry||oh&&Aa(oh.resolve())!=Vy||Li&&Aa(new Li)!=Fy||Ud&&Aa(new Ud)!=zy)&&(Aa=function(t){var e=Ai(t),r=e==DL?t.constructor:void 0,n=r?Ma(r):"";if(n)switch(n){case OL:return Hy;case LL:return Ry;case PL:return Vy;case BL:return Fy;case IL:return zy}return e});var Zo=Aa,RL=Object.prototype,VL=RL.hasOwnProperty;function FL(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&VL.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var zL=Ar.Uint8Array,ic=zL;function sh(t){var e=new t.constructor(t.byteLength);return new ic(e).set(new ic(t)),e}function HL(t,e){var r=e?sh(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var UL=/\w*$/;function jL(t){var e=new t.constructor(t.source,UL.exec(t));return e.lastIndex=t.lastIndex,e}var Uy=or?or.prototype:void 0,jy=Uy?Uy.valueOf:void 0;function YL(t){return jy?Object(jy.call(t)):{}}function GL(t,e){var r=e?sh(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var WL="[object Boolean]",ZL="[object Date]",qL="[object Map]",XL="[object Number]",KL="[object RegExp]",JL="[object Set]",QL="[object String]",eP="[object Symbol]",tP="[object ArrayBuffer]",rP="[object DataView]",nP="[object Float32Array]",aP="[object Float64Array]",iP="[object Int8Array]",oP="[object Int16Array]",sP="[object Int32Array]",lP="[object Uint8Array]",cP="[object Uint8ClampedArray]",uP="[object Uint16Array]",fP="[object Uint32Array]";function dP(t,e,r){var n=t.constructor;switch(e){case tP:return sh(t);case WL:case ZL:return new n(+t);case rP:return HL(t,r);case nP:case aP:case iP:case oP:case sP:case lP:case cP:case uP:case fP:return GL(t,r);case qL:return new n;case XL:case QL:return new n(t);case KL:return jL(t);case JL:return new n;case eP:return YL(t)}}function hP(t){return typeof t.constructor=="function"&&!Zd(t)?oD($y(t)):{}}var pP="[object Map]";function mP(t){return gn(t)&&Zo(t)==pP}var Yy=Di&&Di.isMap,vP=Yy?jo(Yy):mP,gP=vP,yP="[object Set]";function _P(t){return gn(t)&&Zo(t)==yP}var Gy=Di&&Di.isSet,wP=Gy?jo(Gy):_P,bP=wP,SP=1,xP=2,CP=4,Wy="[object Arguments]",kP="[object Array]",TP="[object Boolean]",MP="[object Date]",$P="[object Error]",Zy="[object Function]",NP="[object GeneratorFunction]",EP="[object Map]",AP="[object Number]",qy="[object Object]",DP="[object RegExp]",OP="[object Set]",LP="[object String]",PP="[object Symbol]",BP="[object WeakMap]",IP="[object ArrayBuffer]",RP="[object DataView]",VP="[object Float32Array]",FP="[object Float64Array]",zP="[object Int8Array]",HP="[object Int16Array]",UP="[object Int32Array]",jP="[object Uint8Array]",YP="[object Uint8ClampedArray]",GP="[object Uint16Array]",WP="[object Uint32Array]",et={};et[Wy]=et[kP]=et[IP]=et[RP]=et[TP]=et[MP]=et[VP]=et[FP]=et[zP]=et[HP]=et[UP]=et[EP]=et[AP]=et[qy]=et[DP]=et[OP]=et[LP]=et[PP]=et[jP]=et[YP]=et[GP]=et[WP]=!0,et[$P]=et[Zy]=et[BP]=!1;function oc(t,e,r,n,a,i){var o,l=e&SP,c=e&xP,u=e&CP;if(r&&(o=a?r(t,n,a,i):r(t)),o!==void 0)return o;if(!Gr(t))return t;var f=Ht(t);if(f){if(o=FL(t),!l)return cD(t,o)}else{var d=Zo(t),h=d==Zy||d==NP;if(tc(t))return wL(t,l);if(d==qy||d==Wy||h&&!a){if(o=c||h?{}:hP(t),!l)return c?ML(t,yL(o,t)):CL(t,gL(o,t))}else{if(!et[d])return a?t:{};o=dP(t,d,l)}}i||(i=new Wr);var p=i.get(t);if(p)return p;i.set(t,o),bP(t)?t.forEach(function(g){o.add(oc(g,e,r,g,t,i))}):gP(t)&&t.forEach(function(g,y){o.set(y,oc(g,e,r,y,t,i))});var m=u?c?$L:ah:c?Kd:Oi,v=f?void 0:m(t);return wD(v||t,function(g,y){v&&(y=g,g=t[y]),hy(o,y,oc(g,e,r,y,t,i))}),o}var ZP=1,qP=4;function Ye(t){return oc(t,ZP|qP)}var XP="__lodash_hash_undefined__";function KP(t){return this.__data__.set(t,XP),this}function JP(t){return this.__data__.has(t)}function Pi(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new _n;++e<r;)this.add(t[e])}Pi.prototype.add=Pi.prototype.push=KP,Pi.prototype.has=JP;function Xy(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function lh(t,e){return t.has(e)}var QP=1,eB=2;function Ky(t,e,r,n,a,i){var o=r&QP,l=t.length,c=e.length;if(l!=c&&!(o&&c>l))return!1;var u=i.get(t),f=i.get(e);if(u&&f)return u==e&&f==t;var d=-1,h=!0,p=r&eB?new Pi:void 0;for(i.set(t,e),i.set(e,t);++d<l;){var m=t[d],v=e[d];if(n)var g=o?n(v,m,d,e,t,i):n(m,v,d,t,e,i);if(g!==void 0){if(g)continue;h=!1;break}if(p){if(!Xy(e,function(y,_){if(!lh(p,_)&&(m===y||a(m,y,r,n,i)))return p.push(_)})){h=!1;break}}else if(!(m===v||a(m,v,r,n,i))){h=!1;break}}return i.delete(t),i.delete(e),h}function tB(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r}function ch(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var rB=1,nB=2,aB="[object Boolean]",iB="[object Date]",oB="[object Error]",sB="[object Map]",lB="[object Number]",cB="[object RegExp]",uB="[object Set]",fB="[object String]",dB="[object Symbol]",hB="[object ArrayBuffer]",pB="[object DataView]",Jy=or?or.prototype:void 0,uh=Jy?Jy.valueOf:void 0;function mB(t,e,r,n,a,i,o){switch(r){case pB:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case hB:return!(t.byteLength!=e.byteLength||!i(new ic(t),new ic(e)));case aB:case iB:case lB:return Ql(+t,+e);case oB:return t.name==e.name&&t.message==e.message;case cB:case fB:return t==e+"";case sB:var l=tB;case uB:var c=n&rB;if(l||(l=ch),t.size!=e.size&&!c)return!1;var u=o.get(t);if(u)return u==e;n|=nB,o.set(t,e);var f=Ky(l(t),l(e),n,a,i,o);return o.delete(t),f;case dB:if(uh)return uh.call(t)==uh.call(e)}return!1}var vB=1,gB=Object.prototype,yB=gB.hasOwnProperty;function _B(t,e,r,n,a,i){var o=r&vB,l=ah(t),c=l.length,u=ah(e),f=u.length;if(c!=f&&!o)return!1;for(var d=c;d--;){var h=l[d];if(!(o?h in e:yB.call(e,h)))return!1}var p=i.get(t),m=i.get(e);if(p&&m)return p==e&&m==t;var v=!0;i.set(t,e),i.set(e,t);for(var g=o;++d<c;){h=l[d];var y=t[h],_=e[h];if(n)var w=o?n(_,y,h,e,t,i):n(y,_,h,t,e,i);if(!(w===void 0?y===_||a(y,_,r,n,i):w)){v=!1;break}g||(g=h=="constructor")}if(v&&!g){var S=t.constructor,x=e.constructor;S!=x&&"constructor"in t&&"constructor"in e&&!(typeof S=="function"&&S instanceof S&&typeof x=="function"&&x instanceof x)&&(v=!1)}return i.delete(t),i.delete(e),v}var wB=1,Qy="[object Arguments]",e1="[object Array]",sc="[object Object]",bB=Object.prototype,t1=bB.hasOwnProperty;function SB(t,e,r,n,a,i){var o=Ht(t),l=Ht(e),c=o?e1:Zo(t),u=l?e1:Zo(e);c=c==Qy?sc:c,u=u==Qy?sc:u;var f=c==sc,d=u==sc,h=c==u;if(h&&tc(t)){if(!tc(e))return!1;o=!0,f=!1}if(h&&!f)return i||(i=new Wr),o||xy(t)?Ky(t,e,r,n,a,i):mB(t,e,c,r,n,a,i);if(!(r&wB)){var p=f&&t1.call(t,"__wrapped__"),m=d&&t1.call(e,"__wrapped__");if(p||m){var v=p?t.value():t,g=m?e.value():e;return i||(i=new Wr),a(v,g,r,n,i)}}return h?(i||(i=new Wr),_B(t,e,r,n,a,i)):!1}function lc(t,e,r,n,a){return t===e?!0:t==null||e==null||!gn(t)&&!gn(e)?t!==t&&e!==e:SB(t,e,r,n,lc,a)}var xB=1,CB=2;function kB(t,e,r,n){var a=r.length,i=a,o=!n;if(t==null)return!i;for(t=Object(t);a--;){var l=r[a];if(o&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++a<i;){l=r[a];var c=l[0],u=t[c],f=l[1];if(o&&l[2]){if(u===void 0&&!(c in t))return!1}else{var d=new Wr;if(n)var h=n(u,f,c,t,e,d);if(!(h===void 0?lc(f,u,xB|CB,n,d):h))return!1}}return!0}function r1(t){return t===t&&!Gr(t)}function TB(t){for(var e=Oi(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,r1(a)]}return e}function n1(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function MB(t){var e=TB(t);return e.length==1&&e[0][2]?n1(e[0][0],e[0][1]):function(r){return r===t||kB(r,t,e)}}function $B(t,e){return t!=null&&e in Object(t)}function NB(t,e,r){e=Ty(e,t);for(var n=-1,a=e.length,i=!1;++n<a;){var o=ac(e[n]);if(!(i=t!=null&&r(t,o)))break;t=t[o]}return i||++n!=a?i:(a=t==null?0:t.length,!!a&&Gd(a)&&jd(o,a)&&(Ht(t)||qd(t)))}function EB(t,e){return t!=null&&NB(t,e,$B)}var AB=1,DB=2;function OB(t,e){return Jd(t)&&r1(e)?n1(ac(t),e):function(r){var n=lL(r,t);return n===void 0&&n===e?EB(r,t):lc(e,n,AB|DB)}}function LB(t){return function(e){return e==null?void 0:e[t]}}function PB(t){return function(e){return eh(e,t)}}function BB(t){return Jd(t)?LB(ac(t)):PB(t)}function Bi(t){return typeof t=="function"?t:t==null?Kl:typeof t=="object"?Ht(t)?OB(t[0],t[1]):MB(t):BB(t)}function IB(t,e,r,n){for(var a=-1,i=t==null?0:t.length;++a<i;){var o=t[a];e(n,o,r(o),t)}return n}function RB(t){return function(e,r,n){for(var a=-1,i=Object(e),o=n(e),l=o.length;l--;){var c=o[t?l:++a];if(r(i[c],c,i)===!1)break}return e}}var VB=RB(),FB=VB;function zB(t,e){return t&&FB(t,e,Oi)}function HB(t,e){return function(r,n){if(r==null)return r;if(!Na(r))return t(r,n);for(var a=r.length,i=e?a:-1,o=Object(r);(e?i--:++i<a)&&n(o[i],i,o)!==!1;);return r}}var UB=HB(zB),fh=UB;function jB(t,e,r,n){return fh(t,function(a,i,o){e(n,a,r(a),o)}),n}function YB(t,e){return function(r,n){var a=Ht(r)?IB:jB,i=e?e():{};return a(r,t,Bi(n),i)}}var GB=function(){return Ar.Date.now()},dh=GB,WB="Expected a function",ZB=Math.max,qB=Math.min;function a1(t,e,r){var n,a,i,o,l,c,u=0,f=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(WB);e=zd(e)||0,Gr(r)&&(f=!!r.leading,d="maxWait"in r,i=d?ZB(zd(r.maxWait)||0,e):i,h="trailing"in r?!!r.trailing:h);function p(b){var C=n,k=a;return n=a=void 0,u=b,o=t.apply(k,C),o}function m(b){return u=b,l=setTimeout(y,e),f?p(b):o}function v(b){var C=b-c,k=b-u,$=e-C;return d?qB($,i-k):$}function g(b){var C=b-c,k=b-u;return c===void 0||C>=e||C<0||d&&k>=i}function y(){var b=dh();if(g(b))return _(b);l=setTimeout(y,v(b))}function _(b){return l=void 0,h&&n?p(b):(n=a=void 0,o)}function w(){l!==void 0&&clearTimeout(l),u=0,n=c=a=l=void 0}function S(){return l===void 0?o:_(dh())}function x(){var b=dh(),C=g(b);if(n=arguments,a=this,c=b,C){if(l===void 0)return m(c);if(d)return clearTimeout(l),l=setTimeout(y,e),p(c)}return l===void 0&&(l=setTimeout(y,e)),o}return x.cancel=w,x.flush=S,x}function XB(t){return gn(t)&&Na(t)}function i1(t,e,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(r(e,t[n]))return!0;return!1}var KB=200;function JB(t,e,r,n){var a=-1,i=dy,o=!0,l=t.length,c=[],u=e.length;if(!l)return c;r&&(e=Uo(e,jo(r))),n?(i=i1,o=!1):e.length>=KB&&(i=lh,o=!1,e=new Pi(e));e:for(;++a<l;){var f=t[a],d=r==null?f:r(f);if(f=n||f!==0?f:0,o&&d===d){for(var h=u;h--;)if(e[h]===d)continue e;c.push(f)}else i(e,d,n)||c.push(f)}return c}function QB(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function eI(t){return function(e,r,n){var a=Object(e);if(!Na(e)){var i=Bi(r);e=Oi(e),r=function(l){return i(a[l],l,a)}}var o=t(e,r,n);return o>-1?a[i?e[o]:o]:void 0}}var tI=Math.max;function qo(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=r==null?0:F4(r);return a<0&&(a=tI(n+a,0)),fy(t,Bi(e),a)}var rI=eI(qo),Xo=rI;function nI(t,e){var r=-1,n=Na(t)?Array(t.length):[];return fh(t,function(a,i,o){n[++r]=e(a,i,o)}),n}var aI=Object.prototype,iI=aI.hasOwnProperty,oI=YB(function(t,e,r){iI.call(t,r)?t[r].push(e):Yd(t,r,[e])}),o1=oI;function sI(t,e){return t>e}function lI(t,e){return lc(t,e)}function cI(t,e,r){for(var n=-1,a=t.length;++n<a;){var i=t[n],o=e(i);if(o!=null&&(l===void 0?o===o&&!Ta(o):r(o,l)))var l=o,c=i}return c}function uI(t,e){return t&&t.length?cI(t,Bi(e),sI):void 0}function fI(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}function dI(t,e){if(t!==e){var r=t!==void 0,n=t===null,a=t===t,i=Ta(t),o=e!==void 0,l=e===null,c=e===e,u=Ta(e);if(!l&&!u&&!i&&t>e||i&&o&&c&&!l&&!u||n&&o&&c||!r&&c||!a)return 1;if(!n&&!i&&!u&&t<e||u&&r&&a&&!n&&!i||l&&r&&a||!o&&a||!c)return-1}return 0}function hI(t,e,r){for(var n=-1,a=t.criteria,i=e.criteria,o=a.length,l=r.length;++n<o;){var c=dI(a[n],i[n]);if(c){if(n>=l)return c;var u=r[n];return c*(u=="desc"?-1:1)}}return t.index-e.index}function pI(t,e,r){e.length?e=Uo(e,function(i){return Ht(i)?function(o){return eh(o,i.length===1?i[0]:i)}:i}):e=[Kl];var n=-1;e=Uo(e,jo(Bi));var a=nI(t,function(i,o,l){var c=Uo(e,function(u){return u(i)});return{criteria:c,index:++n,value:i}});return fI(a,function(i,o){return hI(i,o,r)})}function mI(t,e){var r;return fh(t,function(n,a,i){return r=e(n,a,i),!r}),!!r}function Ko(t,e,r){var n=Ht(t)?Xy:mI;return r&&Wd(t,e,r)&&(e=void 0),n(t,Bi(e))}var vI=my(function(t,e){if(t==null)return[];var r=e.length;return r>1&&Wd(t,e[0],e[1])?e=[]:r>2&&Wd(e[0],e[1],e[2])&&(e=[e[0]]),pI(t,rh(e,1),[])}),wn=vI,gI=1/0,yI=Li&&1/ch(new Li([,-0]))[1]==gI?function(t){return new Li(t)}:lD,_I=yI,wI=200;function hh(t,e,r){var n=-1,a=dy,i=t.length,o=!0,l=[],c=l;if(r)o=!1,a=i1;else if(i>=wI){var u=e?null:_I(t);if(u)return ch(u);o=!1,a=lh,c=new Pi}else c=e?[]:l;e:for(;++n<i;){var f=t[n],d=e?e(f):f;if(f=r||f!==0?f:0,o&&d===d){for(var h=c.length;h--;)if(c[h]===d)continue e;e&&c.push(d),l.push(f)}else a(c,d,r)||(c!==l&&c.push(d),l.push(f))}return l}function Jo(t){return t&&t.length?hh(t):[]}function bI(t,e,r){var n=t.length;if(n<2)return n?hh(t[0]):[];for(var a=-1,i=Array(n);++a<n;)for(var o=t[a],l=-1;++l<n;)l!=a&&(i[a]=JB(i[a]||o,t[l],e,r));return hh(rh(i,1),e,r)}var SI=my(function(t){var e=QB(t);return e=typeof e=="function"?e:void 0,bI(Oy(t,XB),void 0,e)}),xI=SI,s1={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Vo,function(){var r="minute",n=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(i,o,l){var c=o.prototype;l.utc=function(v){var g={date:v,utc:!0,args:arguments};return new o(g)},c.utc=function(v){var g=l(this.toDate(),{locale:this.$L,utc:!0});return v?g.add(this.utcOffset(),r):g},c.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var u=c.parse;c.parse=function(v){v.utc&&(this.$u=!0),this.$utils().u(v.$offset)||(this.$offset=v.$offset),u.call(this,v)};var f=c.init;c.init=function(){if(this.$u){var v=this.$d;this.$y=v.getUTCFullYear(),this.$M=v.getUTCMonth(),this.$D=v.getUTCDate(),this.$W=v.getUTCDay(),this.$H=v.getUTCHours(),this.$m=v.getUTCMinutes(),this.$s=v.getUTCSeconds(),this.$ms=v.getUTCMilliseconds()}else f.call(this)};var d=c.utcOffset;c.utcOffset=function(v,g){var y=this.$utils().u;if(y(v))return this.$u?0:y(this.$offset)?d.call(this):this.$offset;if(typeof v=="string"&&(v=function(x){x===void 0&&(x="");var b=x.match(n);if(!b)return null;var C=(""+b[0]).match(a)||["-",0,0],k=C[0],$=60*+C[1]+ +C[2];return $===0?0:k==="+"?$:-$}(v))===null)return this;var _=Math.abs(v)<=16?60*v:v,w=this;if(g)return w.$offset=_,w.$u=v===0,w;if(v!==0){var S=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(w=this.local().add(_+S,r)).$offset=_,w.$x.$localOffset=S}else w=this.utc();return w};var h=c.format;c.format=function(v){var g=v||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,g)},c.valueOf=function(){var v=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||new Date().getTimezoneOffset());return this.$d.valueOf()-6e4*v},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var p=c.toDate;c.toDate=function(v){return v==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var m=c.diff;c.diff=function(v,g,y){if(v&&this.$u===v.$u)return m.call(this,v,g,y);var _=this.local(),w=l(v).local();return m.call(_,w,g,y)}}})})(s1);var CI=s1.exports,l1={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Vo,function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(a,i,o){var l,c=function(h,p,m){m===void 0&&(m={});var v=new Date(h);return function(g,y){y===void 0&&(y={});var _=y.timeZoneName||"short",w=g+"|"+_,S=n[w];return S||(S=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:g,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:_}),n[w]=S),S}(p,m).formatToParts(v)},u=function(h,p){for(var m=c(h,p),v=[],g=0;g<m.length;g+=1){var y=m[g],_=y.type,w=y.value,S=r[_];S>=0&&(v[S]=parseInt(w,10))}var x=v[3],b=x===24?0:x,C=v[0]+"-"+v[1]+"-"+v[2]+" "+b+":"+v[4]+":"+v[5]+":000",k=+h;return(o.utc(C).valueOf()-(k-=k%1e3))/6e4},f=i.prototype;f.tz=function(h,p){h===void 0&&(h=l);var m=this.utcOffset(),v=this.toDate(),g=v.toLocaleString("en-US",{timeZone:h}),y=Math.round((v-new Date(g))/1e3/60),_=o(g).$set("millisecond",this.$ms).utcOffset(15*-Math.round(v.getTimezoneOffset()/15)-y,!0);if(p){var w=_.utcOffset();_=_.add(m-w,"minute")}return _.$x.$timezone=h,_},f.offsetName=function(h){var p=this.$x.$timezone||o.tz.guess(),m=c(this.valueOf(),p,{timeZoneName:h}).find(function(v){return v.type.toLowerCase()==="timezonename"});return m&&m.value};var d=f.startOf;f.startOf=function(h,p){if(!this.$x||!this.$x.$timezone)return d.call(this,h,p);var m=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return d.call(m,h,p).tz(this.$x.$timezone,!0)},o.tz=function(h,p,m){var v=m&&p,g=m||p||l,y=u(+o(),g);if(typeof h!="string")return o(h).tz(g);var _=function(b,C,k){var $=b-60*C*1e3,N=u($,k);if(C===N)return[$,C];var A=u($-=60*(N-C)*1e3,k);return N===A?[$,N]:[b-60*Math.min(N,A)*1e3,Math.max(N,A)]}(o.utc(h,v).valueOf(),y,g),w=_[0],S=_[1],x=o(w).utcOffset(S);return x.$x.$timezone=g,x},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(h){l=h}}})})(l1);var kI=l1.exports;fe.extend(CI),fe.extend(kI);const TI=t=>fe.tz(fe().utc(),t),ph=(t,e,r,n)=>{const a=/^P.*H$/.test(t),i="YYYY-MM-DD";let o=[];if(e==="d"&&r==="d"&&(o=[i,i]),(e==="d"&&r==="h"||e==="h")&&(a?o=[`${i} HH:00`,`${i} HH:${r==="m"?"59":"00"}`]:o=[`${i} 00:00`,`${i} 23:00`]),(e==="d"&&r==="m"||e==="m")&&(a?o=[`${i} HH:00`,`${i} HH:59`]:o=[`${i} 00:00`,`${i} 23:59`]),!t)return[fe().format(o[0]),fe().format(o[1])];const l=parseInt(t.substring(1,t.length-1));if(a){const u=Bo(n)>=0?fe().utc().add(Bo(n),"hours"):fe().utc().subtract(-Bo(n),"hours");return[u.subtract(l,"hours").format(o[0]),u.format(o[1])]}return[fe().subtract(l,"days").format(o[0]),fe().format(o[1])]},c1=t=>({days:!0,hours:["h","m"].includes(t),minutes:t==="m",seconds:!1}),MI=(t,e)=>{const r="YYYY-MM-DD";if(["d","month"].includes(t))return[r,r];if(t==="h")return[`${r} HH:00`,`${r} HH:00`];if(t==="m")return[`${r} HH:mm`,`${r} HH:mm`]},jn=(t,e,r)=>{if(!Array.isArray(t)||t.length===0)return[];const n=MI(r);return t.map((i,o)=>fe(i).format(n[o]))},u1=(t,e)=>!Array.isArray(t)||t.length===0?[]:e==="d"?t.map(n=>fe(n).format("YYYY-MM-DD")):t,f1=t=>{const{current_time:e,previous_time:r}=t,n="MMM-DD",a=Jo(e.map(i=>fe(i).format(n))).join(" / ");if(Array.isArray(r)&&r.length>0){const i=Jo(r.map(o=>fe(o).format(n))).join(" / ");return`${a} vs. ${i}`}return a},d1=t=>{if(!Array.isArray(t)||t.length!==2)return[];const e=[...t],r=["YYYY-MM-DD 00:00","YYYY-MM-DD 23:00"];return[fe(e[0]).date(1).format(r[0]),fe(e[1]).date(fe(e[1]).daysInMonth()).format(r[1])]},$I=(t,e,r,n,a,i,o="")=>{const{primaryTimeGranularity:l}=t,c=h1(i,t).filter(u=>(u==null?void 0:u.id)!==(e==null?void 0:e.id));return{table:t.id,timezone:Bo(r),id:e.id,search:o||"",filter:[{id:t.primaryTimeAttribute,time:u1(n,l),compare_time:u1(a,l)},...c]}},NI=(t,e,r)=>{const n=[];return t.forEach(a=>{const{id:i,sortField:o,limit:l,sortType:c,granularity:u,interval:f}=a,d={id:i,order_id:o!=null?o:e,order_by:c||"DESC"};i===r.primaryTimeAttribute?(d.order_id=o||i,!l||l==="None"?d.limit=0:d.limit=l||r.defaultLimit||25,d.granularity=u||r.defaultSelectedGranularity||"d",d.interval=f!=null?f:1):d.limit=l||r.defaultLimit||25,n.push(d)}),n},h1=(t,e)=>{const r=[];return t.forEach(n=>{if(n.id!==e.primaryTimeAttribute){const{id:a,filter_type:i,select:o}=n;i&&o.length>0&&r.push({id:a,type:i,select:o})}}),r},mh=(t,e,r=!1)=>{var p;const n=e.measures.filter(m=>!Yr(m)).map(m=>({id:m}));let a=NI(e.splits,(p=n[0])==null?void 0:p.id,t);const i=h1(e.filters,t),o={},l=["lineChart","barChart","stackBarChart","stackLineChart","lineChartHour"].includes(e.visual);l&&!r&&(o.format="line"),l&&a.length===2&&a[0].id===t.primaryTimeAttribute&&(a=a.reverse());const c=a.find(m=>m.id===t.primaryTimeAttribute),u=c?c.granularity:t.defaultSelectedGranularity,f=Ro(e.range);let d=[],h=[];return u==="month"?(d=d1(e.range.current_time),h=d1(e.range.previous_time)):(d=[...e.range.current_time],h=[...e.range.previous_time]),te({table:t.id,timezone:Bo(e.timezone),filter:[{id:t.primaryTimeAttribute,compare:f,time:jn(d,u,t.primaryTimeGranularity),compare_time:jn(h,u,t.primaryTimeGranularity)},...i],split:a,measure:n},o)},EI={class:"mega-header-widget"},AI=s.defineComponent({setup(t){const e=s.inject("cubeState"),r=()=>{if(c.value){R.message.warn("Downloading, please be patient!");return}i()},n=s.inject("currentState"),a=s.ref({success:!1,message:""}),i=()=>{var g,y,_;const d=at(n.cube.dimensions),h=e.splits.map(w=>w.id),p=d.filter(w=>h.includes(w.id)),m=d.find(w=>w.kind==="time"),v=e.splits.find(w=>w.id===m.id);$d(e.visual,p,e.measures,{drillCount:n.cube.drillCount||n.cube.maxSplit,granularity:(v==null?void 0:v.granularity)||((g=n.cube)==null?void 0:g.defaultSelectedGranularity)||((y=n.cube)==null?void 0:y.primaryTimeGranularity),range:((_=e==null?void 0:e.range)==null?void 0:_.current_time)||[],cube:te({},n.cube)}).then(w=>{a.value=w,f()},w=>{var S;a.value=w,R.message.error((S=a.value.message)!=null?S:"Error!")})},o=s.inject("getHeader"),l=s.inject("getAuth"),c=s.ref(!1),u=s.ref(null),f=()=>{var d;c.value&&(c.value=!1,(d=u.value)==null||d.cancel()),setTimeout(()=>{c.value=!0,u.value=Xl();const h=mh(n.cube,e,!0),p=n.cube.data_cube_id,m=n.cube.data_set_id,v=l();u.value.request("download",h,te({data_cube_id:p,trans_data_set_id:m},v),te({responseType:"blob"},o())).then(g=>{c.value=!1;let y=new Blob([g],{type:"application/vnd.ms-excel;charset=utf-8"}),_=window.URL.createObjectURL(y),w=document.createElement("a");w.style.display="none",w.href=_,w.download=`Report-${fe().format("YYYY-MM-DD-HH-mm")}.csv`,document.body.appendChild(w),w.click(),document.body.removeChild(w)},g=>{c.value=!1})},100)};return(d,h)=>(s.openBlock(),s.createElementBlock("div",EI,[s.createVNode(s.unref(R.Space),{size:8,onClick:r},{default:s.withCtx(()=>[c.value?(s.openBlock(),s.createBlock(s.unref(R.Spin),{key:0,style:{display:"inline-flex"}})):(s.openBlock(),s.createBlock(s.unref(vN),{key:1}))]),_:1})]))}});var p1={exports:{}};/*! @preserve
3
+ * numeral.js
4
+ * version : 2.0.6
5
+ * author : Adam Draper
6
+ * license : MIT
7
+ * http://adamwdraper.github.com/Numeral-js/
8
+ */(function(t){(function(e,r){t.exports?t.exports=r():e.numeral=r()})(Vo,function(){var e,r,n="2.0.6",a={},i={},o={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},l={currentLocale:o.currentLocale,zeroFormat:o.zeroFormat,nullFormat:o.nullFormat,defaultFormat:o.defaultFormat,scalePercentBy100:o.scalePercentBy100};function c(u,f){this._input=u,this._value=f}return e=function(u){var f,d,h,p;if(e.isNumeral(u))f=u.value();else if(u===0||typeof u=="undefined")f=0;else if(u===null||r.isNaN(u))f=null;else if(typeof u=="string")if(l.zeroFormat&&u===l.zeroFormat)f=0;else if(l.nullFormat&&u===l.nullFormat||!u.replace(/[^0-9]+/g,"").length)f=null;else{for(d in a)if(p=typeof a[d].regexps.unformat=="function"?a[d].regexps.unformat():a[d].regexps.unformat,p&&u.match(p)){h=a[d].unformat;break}h=h||e._.stringToNumber,f=h(u)}else f=Number(u)||null;return new c(u,f)},e.version=n,e.isNumeral=function(u){return u instanceof c},e._=r={numberToFormat:function(u,f,d){var h=i[e.options.currentLocale],p=!1,m=!1,v=0,g="",y=1e12,_=1e9,w=1e6,S=1e3,x="",b=!1,C,k,$,N,A,L,M;if(u=u||0,k=Math.abs(u),e._.includes(f,"(")?(p=!0,f=f.replace(/[\(|\)]/g,"")):(e._.includes(f,"+")||e._.includes(f,"-"))&&(A=e._.includes(f,"+")?f.indexOf("+"):u<0?f.indexOf("-"):-1,f=f.replace(/[\+|\-]/g,"")),e._.includes(f,"a")&&(C=f.match(/a(k|m|b|t)?/),C=C?C[1]:!1,e._.includes(f," a")&&(g=" "),f=f.replace(new RegExp(g+"a[kmbt]?"),""),k>=y&&!C||C==="t"?(g+=h.abbreviations.trillion,u=u/y):k<y&&k>=_&&!C||C==="b"?(g+=h.abbreviations.billion,u=u/_):k<_&&k>=w&&!C||C==="m"?(g+=h.abbreviations.million,u=u/w):(k<w&&k>=S&&!C||C==="k")&&(g+=h.abbreviations.thousand,u=u/S)),e._.includes(f,"[.]")&&(m=!0,f=f.replace("[.]",".")),$=u.toString().split(".")[0],N=f.split(".")[1],L=f.indexOf(","),v=(f.split(".")[0].split(",")[0].match(/0/g)||[]).length,N?(e._.includes(N,"[")?(N=N.replace("]",""),N=N.split("["),x=e._.toFixed(u,N[0].length+N[1].length,d,N[1].length)):x=e._.toFixed(u,N.length,d),$=x.split(".")[0],e._.includes(x,".")?x=h.delimiters.decimal+x.split(".")[1]:x="",m&&Number(x.slice(1))===0&&(x="")):$=e._.toFixed(u,0,d),g&&!C&&Number($)>=1e3&&g!==h.abbreviations.trillion)switch($=String(Number($)/1e3),g){case h.abbreviations.thousand:g=h.abbreviations.million;break;case h.abbreviations.million:g=h.abbreviations.billion;break;case h.abbreviations.billion:g=h.abbreviations.trillion;break}if(e._.includes($,"-")&&($=$.slice(1),b=!0),$.length<v)for(var O=v-$.length;O>0;O--)$="0"+$;return L>-1&&($=$.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+h.delimiters.thousands)),f.indexOf(".")===0&&($=""),M=$+x+(g||""),p?M=(p&&b?"(":"")+M+(p&&b?")":""):A>=0?M=A===0?(b?"-":"+")+M:M+(b?"-":"+"):b&&(M="-"+M),M},stringToNumber:function(u){var f=i[l.currentLocale],d=u,h={thousand:3,million:6,billion:9,trillion:12},p,m,v;if(l.zeroFormat&&u===l.zeroFormat)m=0;else if(l.nullFormat&&u===l.nullFormat||!u.replace(/[^0-9]+/g,"").length)m=null;else{m=1,f.delimiters.decimal!=="."&&(u=u.replace(/\./g,"").replace(f.delimiters.decimal,"."));for(p in h)if(v=new RegExp("[^a-zA-Z]"+f.abbreviations[p]+"(?:\\)|(\\"+f.currency.symbol+")?(?:\\))?)?$"),d.match(v)){m*=Math.pow(10,h[p]);break}m*=(u.split("-").length+Math.min(u.split("(").length-1,u.split(")").length-1))%2?1:-1,u=u.replace(/[^0-9\.]+/g,""),m*=Number(u)}return m},isNaN:function(u){return typeof u=="number"&&isNaN(u)},includes:function(u,f){return u.indexOf(f)!==-1},insert:function(u,f,d){return u.slice(0,d)+f+u.slice(d)},reduce:function(u,f){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof f!="function")throw new TypeError(f+" is not a function");var d=Object(u),h=d.length>>>0,p=0,m;if(arguments.length===3)m=arguments[2];else{for(;p<h&&!(p in d);)p++;if(p>=h)throw new TypeError("Reduce of empty array with no initial value");m=d[p++]}for(;p<h;p++)p in d&&(m=f(m,d[p],p,d));return m},multiplier:function(u){var f=u.toString().split(".");return f.length<2?1:Math.pow(10,f[1].length)},correctionFactor:function(){var u=Array.prototype.slice.call(arguments);return u.reduce(function(f,d){var h=r.multiplier(d);return f>h?f:h},1)},toFixed:function(u,f,d,h){var p=u.toString().split("."),m=f-(h||0),v,g,y,_;return p.length===2?v=Math.min(Math.max(p[1].length,m),f):v=m,y=Math.pow(10,v),_=(d(u+"e+"+v)/y).toFixed(v),h>f-v&&(g=new RegExp("\\.?0{1,"+(h-(f-v))+"}$"),_=_.replace(g,"")),_}},e.options=l,e.formats=a,e.locales=i,e.locale=function(u){return u&&(l.currentLocale=u.toLowerCase()),l.currentLocale},e.localeData=function(u){if(!u)return i[l.currentLocale];if(u=u.toLowerCase(),!i[u])throw new Error("Unknown locale : "+u);return i[u]},e.reset=function(){for(var u in o)l[u]=o[u]},e.zeroFormat=function(u){l.zeroFormat=typeof u=="string"?u:null},e.nullFormat=function(u){l.nullFormat=typeof u=="string"?u:null},e.defaultFormat=function(u){l.defaultFormat=typeof u=="string"?u:"0.0"},e.register=function(u,f,d){if(f=f.toLowerCase(),this[u+"s"][f])throw new TypeError(f+" "+u+" already registered.");return this[u+"s"][f]=d,d},e.validate=function(u,f){var d,h,p,m,v,g,y,_;if(typeof u!="string"&&(u+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",u)),u=u.trim(),u.match(/^\d+$/))return!0;if(u==="")return!1;try{y=e.localeData(f)}catch{y=e.localeData(e.locale())}return p=y.currency.symbol,v=y.abbreviations,d=y.delimiters.decimal,y.delimiters.thousands==="."?h="\\.":h=y.delimiters.thousands,_=u.match(/^[^\d]+/),_!==null&&(u=u.substr(1),_[0]!==p)||(_=u.match(/[^\d]+$/),_!==null&&(u=u.slice(0,-1),_[0]!==v.thousand&&_[0]!==v.million&&_[0]!==v.billion&&_[0]!==v.trillion))?!1:(g=new RegExp(h+"{2}"),u.match(/[^\d.,]/g)?!1:(m=u.split(d),m.length>2?!1:m.length<2?!!m[0].match(/^\d+.*\d$/)&&!m[0].match(g):m[0].length===1?!!m[0].match(/^\d+$/)&&!m[0].match(g)&&!!m[1].match(/^\d+$/):!!m[0].match(/^\d+.*\d$/)&&!m[0].match(g)&&!!m[1].match(/^\d+$/)))},e.fn=c.prototype={clone:function(){return e(this)},format:function(u,f){var d=this._value,h=u||l.defaultFormat,p,m,v;if(f=f||Math.round,d===0&&l.zeroFormat!==null)m=l.zeroFormat;else if(d===null&&l.nullFormat!==null)m=l.nullFormat;else{for(p in a)if(h.match(a[p].regexps.format)){v=a[p].format;break}v=v||e._.numberToFormat,m=v(d,h,f)}return m},value:function(){return this._value},input:function(){return this._input},set:function(u){return this._value=Number(u),this},add:function(u){var f=r.correctionFactor.call(null,this._value,u);function d(h,p,m,v){return h+Math.round(f*p)}return this._value=r.reduce([this._value,u],d,0)/f,this},subtract:function(u){var f=r.correctionFactor.call(null,this._value,u);function d(h,p,m,v){return h-Math.round(f*p)}return this._value=r.reduce([u],d,Math.round(this._value*f))/f,this},multiply:function(u){function f(d,h,p,m){var v=r.correctionFactor(d,h);return Math.round(d*v)*Math.round(h*v)/Math.round(v*v)}return this._value=r.reduce([this._value,u],f,1),this},divide:function(u){function f(d,h,p,m){var v=r.correctionFactor(d,h);return Math.round(d*v)/Math.round(h*v)}return this._value=r.reduce([this._value,u],f),this},difference:function(u){return Math.abs(e(this._value).subtract(u).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(u){var f=u%10;return~~(u%100/10)==1?"th":f===1?"st":f===2?"nd":f===3?"rd":"th"},currency:{symbol:"$"}}),function(){e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(u,f,d){var h=e._.includes(f," BPS")?" ":"",p;return u=u*1e4,f=f.replace(/\s?BPS/,""),p=e._.numberToFormat(u,f,d),e._.includes(p,")")?(p=p.split(""),p.splice(-1,0,h+"BPS"),p=p.join("")):p=p+h+"BPS",p},unformat:function(u){return+(e._.stringToNumber(u)*1e-4).toFixed(15)}})}(),function(){var u={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},f={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},d=u.suffixes.concat(f.suffixes.filter(function(p){return u.suffixes.indexOf(p)<0})),h=d.join("|");h="("+h.replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(h)},format:function(p,m,v){var g,y=e._.includes(m,"ib")?f:u,_=e._.includes(m," b")||e._.includes(m," ib")?" ":"",w,S,x;for(m=m.replace(/\s?i?b/,""),w=0;w<=y.suffixes.length;w++)if(S=Math.pow(y.base,w),x=Math.pow(y.base,w+1),p===null||p===0||p>=S&&p<x){_+=y.suffixes[w],S>0&&(p=p/S);break}return g=e._.numberToFormat(p,m,v),g+_},unformat:function(p){var m=e._.stringToNumber(p),v,g;if(m){for(v=u.suffixes.length-1;v>=0;v--){if(e._.includes(p,u.suffixes[v])){g=Math.pow(u.base,v);break}if(e._.includes(p,f.suffixes[v])){g=Math.pow(f.base,v);break}}m*=g||1}return m}})}(),function(){e.register("format","currency",{regexps:{format:/(\$)/},format:function(u,f,d){var h=e.locales[e.options.currentLocale],p={before:f.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:f.match(/([\+|\-|\)|\s|\$]*)$/)[0]},m,v,g;for(f=f.replace(/\s?\$\s?/,""),m=e._.numberToFormat(u,f,d),u>=0?(p.before=p.before.replace(/[\-\(]/,""),p.after=p.after.replace(/[\-\)]/,"")):u<0&&!e._.includes(p.before,"-")&&!e._.includes(p.before,"(")&&(p.before="-"+p.before),g=0;g<p.before.length;g++)switch(v=p.before[g],v){case"$":m=e._.insert(m,h.currency.symbol,g);break;case" ":m=e._.insert(m," ",g+h.currency.symbol.length-1);break}for(g=p.after.length-1;g>=0;g--)switch(v=p.after[g],v){case"$":m=g===p.after.length-1?m+h.currency.symbol:e._.insert(m,h.currency.symbol,-(p.after.length-(1+g)));break;case" ":m=g===p.after.length-1?m+" ":e._.insert(m," ",-(p.after.length-(1+g)+h.currency.symbol.length-1));break}return m}})}(),function(){e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(u,f,d){var h,p=typeof u=="number"&&!e._.isNaN(u)?u.toExponential():"0e+0",m=p.split("e");return f=f.replace(/e[\+|\-]{1}0/,""),h=e._.numberToFormat(Number(m[0]),f,d),h+"e"+m[1]},unformat:function(u){var f=e._.includes(u,"e+")?u.split("e+"):u.split("e-"),d=Number(f[0]),h=Number(f[1]);h=e._.includes(u,"e-")?h*=-1:h;function p(m,v,g,y){var _=e._.correctionFactor(m,v),w=m*_*(v*_)/(_*_);return w}return e._.reduce([d,Math.pow(10,h)],p,1)}})}(),function(){e.register("format","ordinal",{regexps:{format:/(o)/},format:function(u,f,d){var h=e.locales[e.options.currentLocale],p,m=e._.includes(f," o")?" ":"";return f=f.replace(/\s?o/,""),m+=h.ordinal(u),p=e._.numberToFormat(u,f,d),p+m}})}(),function(){e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(u,f,d){var h=e._.includes(f," %")?" ":"",p;return e.options.scalePercentBy100&&(u=u*100),f=f.replace(/\s?\%/,""),p=e._.numberToFormat(u,f,d),e._.includes(p,")")?(p=p.split(""),p.splice(-1,0,h+"%"),p=p.join("")):p=p+h+"%",p},unformat:function(u){var f=e._.stringToNumber(u);return e.options.scalePercentBy100?f*.01:f}})}(),function(){e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(u,f,d){var h=Math.floor(u/60/60),p=Math.floor((u-h*60*60)/60),m=Math.round(u-h*60*60-p*60);return h+":"+(p<10?"0"+p:p)+":"+(m<10?"0"+m:m)},unformat:function(u){var f=u.split(":"),d=0;return f.length===3?(d=d+Number(f[0])*60*60,d=d+Number(f[1])*60,d=d+Number(f[2])):f.length===2&&(d=d+Number(f[0])*60,d=d+Number(f[1])),Number(d)}})}(),e})})(p1);var m1=p1.exports;const Oe=(t,e="0,0.[00]")=>e==="-1"?t:t?m1(t).format(e):"0",DI=(t,e,r=!0,n=!1,a=!1)=>{const i=[],o=n?"160px":"120px";return e.forEach(c=>{const{id:u,name:f,format:d}=c,h={x_measure:te({},c),field:u,title:f,minWidth:o,sortable:r,remoteSort:r,formatter({cellValue:p,row:m}){return p?Oe(p,d):""}};if(i.push(h),n&&!a){const p={x_measure:te({},c),field:`${u}_pre`,title:`Previous ${f}`,minWidth:o,sortable:r,remoteSort:r,formatter({cellValue:v,row:g}){return v?Oe(v,d):""}};i.push(p);const m={x_measure:te({},c),field:`${u}_delta`,title:`Difference ${f}`,minWidth:o,sortable:r,remoteSort:r,formatter({cellValue:v,row:g}){return v?Oe(v,d):""}};i.push(m)}}),[...[{field:"id_name",title:t.map(c=>c.name).join(","),treeNode:!0,fixed:zl()?"":"left",width:a?"250px":"160px",sortable:!1}],...i]},OI=({columns:t})=>[t.map((e,r)=>r===0?"Total":e.property)],LI=(t,e)=>{const r=(o,l,c)=>c?o:l!==0?o/l:0,n=o=>{const l={};return e.forEach(c=>{const{id:u}=c,f=uI(o,u);l[u]=f?f[u]:0}),l},a=(o,l)=>{if(Object.prototype.hasOwnProperty.call(o,"children")){const c=n(o.children);o.children.forEach(u=>a(u,c))}else{const c={};e.forEach(u=>{const{id:f,isPercent:d}=u;c[f]=r(o[f],l[f],d)}),o.x_percent=c}},i=n(t);return t.forEach(o=>a(o,i)),t},PI=(t,e,r)=>{const n=[];return e.forEach(a=>{const{id:i,format:o}=a,l=o.includes("%");n.push({id:i,isPercent:l}),r&&n.push({id:`${i}_pre`,isPercent:l})}),LI(t,n)},v1=(t,e=null)=>(t.forEach((r,n)=>{r._id=`${e||1}-${n+1}`,r._pid=e,r.children&&r.children.length>0&&v1(r.children,r._id||1)}),t),BI=t=>{const e=[...t],r=[];for(const a of e){const n=a,{children:i}=n,o=v0(n,["children"]);r.push(o),i&&i.length>0&&e.push(...i)}return r},II=(t,e,r,n=!1)=>{if(t.length===0)return[];const a=PI(t,e,n),i=v1(a),o=BI(i);return Ye(o)},g1=(t,e,r=[])=>{for(let n=0;n<t.length;n++){const a=[...r];if(a.push(t[n]),t[n]._id===e)return a;if(t[n].children){const i=g1(t[n].children,e,a);if(i)return i}}},y1=(t,e,r,n)=>(r.length===0||t.forEach(a=>{a._proportion={},r.forEach(i=>{a._proportion[i.id]=e[i.id]===0?0:a[i.id]/e[i.id],n&&(a._proportion[i.id+"_pre"]=e[i.id+"_pre"]===0?0:a[i.id+"_pre"]/e[i.id+"_pre"])}),a.children&&y1(a.children,a,r,n)}),t),RI=(t,e)=>{const r=[],n=(a,i=0,o={})=>{var c,u;const l=te({},a);o[e[i].id]=((c=e[i])==null?void 0:c.kind)==="time"?`${a.id}`:a.id_name,a.children?(o[e[i].id]=((u=e[i])==null?void 0:u.kind)==="time"?`${a.id}`:a.id_name,i+=1,a.children.forEach(f=>{n(f,i,o)})):(delete l.id_name,delete l.id,r.push(te(te({},l),o)))};return t.forEach(a=>{n(a)}),r},vh=(t,e,r=2.326)=>{if(e===0)return"None";const n=t/e,a=r*r,i=1+a/e,o=n+a/(2*e),l=r*Math.sqrt(n*(1-n)/e+a/(4*e*e)),c=(o-l)/i,u=(o+l)/i;return`[${c.toFixed(6)},${u.toFixed(6)}]`},gh=t=>{const e=t.match(/\((.*?)\)/);return e?e[1].split(",").map(r=>r.trim()):[]};var _1={};Number.isFinite=Number.isFinite||function(t){return typeof t=="number"&&isFinite(t)},Number.isNaN=Number.isNaN||function(t){return t!==t};var Lt={},yh=function(e){return e&&e.constructor.prototype.isBigNumber||!1};(function(t){function e(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(i){return typeof i}:e=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},e(n)}var r=yh;t.clone=function n(a){var i=e(a);if(i==="number"||i==="string"||i==="boolean"||a===null||a===void 0)return a;if(typeof a.clone=="function")return a.clone();if(Array.isArray(a))return a.map(function(o){return n(o)});if(a instanceof Date)return new Date(a.valueOf());if(r(a))return a;if(a instanceof RegExp)throw new TypeError("Cannot clone "+a);return t.map(a,n)},t.map=function(n,a){var i={};for(var o in n)t.hasOwnProperty(n,o)&&(i[o]=a(n[o]));return i},t.extend=function(n,a){for(var i in a)t.hasOwnProperty(a,i)&&(n[i]=a[i]);return n},t.deepExtend=function n(a,i){if(Array.isArray(i))throw new TypeError("Arrays are not supported by deepExtend");for(var o in i)if(t.hasOwnProperty(i,o))if(i[o]&&i[o].constructor===Object)a[o]===void 0&&(a[o]={}),a[o].constructor===Object?n(a[o],i[o]):a[o]=i[o];else{if(Array.isArray(i[o]))throw new TypeError("Arrays are not supported by deepExtend");a[o]=i[o]}return a},t.deepEqual=function(a,i){var o,l,c;if(Array.isArray(a)){if(!Array.isArray(i)||a.length!==i.length)return!1;for(l=0,c=a.length;l<c;l++)if(!t.deepEqual(a[l],i[l]))return!1;return!0}else if(a instanceof Object){if(Array.isArray(i)||!(i instanceof Object))return!1;for(o in a)if(!t.deepEqual(a[o],i[o]))return!1;for(o in i)if(!t.deepEqual(a[o],i[o]))return!1;return!0}else return a===i},t.canDefineProperty=function(){try{if(Object.defineProperty)return Object.defineProperty({},"x",{get:function(){}}),!0}catch{}return!1},t.lazy=function(n,a,i){if(t.canDefineProperty()){var o=!0,l;Object.defineProperty(n,a,{get:function(){return o&&(l=i(),o=!1),l},set:function(u){l=u,o=!1},configurable:!0,enumerable:!0})}else n[a]=i()},t.traverse=function(n,a){var i=n;if(a)for(var o=a.split("."),l=0;l<o.length;l++){var c=o[l];c in i||(i[c]={}),i=i[c]}return i},t.hasOwnProperty=function(n,a){return n&&Object.hasOwnProperty.call(n,a)},t.isFactory=function(n){return n&&typeof n.factory=="function"}})(Lt);var w1={},b1={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Vo,function(){function r(){return!0}function n(){return!1}function a(){}function i(){var o=[{name:"number",test:function(j){return typeof j=="number"}},{name:"string",test:function(j){return typeof j=="string"}},{name:"boolean",test:function(j){return typeof j=="boolean"}},{name:"Function",test:function(j){return typeof j=="function"}},{name:"Array",test:Array.isArray},{name:"Date",test:function(j){return j instanceof Date}},{name:"RegExp",test:function(j){return j instanceof RegExp}},{name:"Object",test:function(j){return typeof j=="object"&&j.constructor===Object}},{name:"null",test:function(j){return j===null}},{name:"undefined",test:function(j){return j===void 0}}],l={name:"any",test:r},c=[],u=[],f={types:o,conversions:u,ignore:c};function d(j){var W=Se(f.types,function(G){return G.name===j});if(W)return W;if(j==="any")return l;var q=Se(f.types,function(G){return G.name.toLowerCase()===j.toLowerCase()});throw new TypeError('Unknown type "'+j+'"'+(q?'. Did you mean "'+q.name+'"?':""))}function h(j){return j===l?999:f.types.indexOf(j)}function p(j){var W=Se(f.types,function(q){return q.test(j)});if(W)return W.name;throw new TypeError("Value has unknown type. Value: "+j)}function m(j,W){if(!j.signatures)throw new TypeError("Function is no typed-function");var q;if(typeof W=="string"){q=W.split(",");for(var G=0;G<q.length;G++)q[G]=q[G].trim()}else if(Array.isArray(W))q=W;else throw new TypeError("String array or a comma separated string expected");var ue=q.join(","),be=j.signatures[ue];if(be)return be;throw new TypeError("Signature not found (signature: "+(j.name||"unnamed")+"("+q.join(", ")+"))")}function v(j,W){var q=p(j);if(W===q)return j;for(var G=0;G<f.conversions.length;G++){var ue=f.conversions[G];if(ue.from===q&&ue.to===W)return ue.convert(j)}throw new Error("Cannot convert from "+q+" to "+W)}function g(j){return j.map(function(W){var q=W.types.map($);return(W.restParam?"...":"")+q.join("|")}).join(",")}function y(j,W){var q=j.indexOf("...")===0,G=q?j.length>3?j.slice(3):"any":j,ue=G.split("|").map(ae).filter(le).filter(Q),be=D(W,ue),ke=ue.map(function(pe){var De=d(pe);return{name:pe,typeIndex:h(De),test:De.test,conversion:null,conversionIndex:-1}}),we=be.map(function(pe){var De=d(pe.from);return{name:pe.from,typeIndex:h(De),test:De.test,conversion:pe,conversionIndex:W.indexOf(pe)}});return{types:ke.concat(we),restParam:q}}function _(j,W,q){var G=[];return j.trim()!==""&&(G=j.split(",").map(ae).map(function(ue,be,ke){var we=y(ue,q);if(we.restParam&&be!==ke.length-1)throw new SyntaxError('Unexpected rest parameter "'+ue+'": only allowed for the last parameter');return we})),G.some(de)?null:{params:G,fn:W}}function w(j){var W=K(j);return W?W.restParam:!1}function S(j){return j.types.some(function(W){return W.conversion!=null})}function x(j){if(!j||j.types.length===0)return r;if(j.types.length===1)return d(j.types[0].name).test;if(j.types.length===2){var W=d(j.types[0].name).test,q=d(j.types[1].name).test;return function(be){return W(be)||q(be)}}else{var G=j.types.map(function(ue){return d(ue.name).test});return function(be){for(var ke=0;ke<G.length;ke++)if(G[ke](be))return!0;return!1}}}function b(j){var W,q,G;if(w(j)){W=Z(j).map(x);var ue=W.length,be=x(K(j)),ke=function(we){for(var pe=ue;pe<we.length;pe++)if(!be(we[pe]))return!1;return!0};return function(pe){for(var De=0;De<W.length;De++)if(!W[De](pe[De]))return!1;return ke(pe)&&pe.length>=ue+1}}else return j.length===0?function(pe){return pe.length===0}:j.length===1?(q=x(j[0]),function(pe){return q(pe[0])&&pe.length===1}):j.length===2?(q=x(j[0]),G=x(j[1]),function(pe){return q(pe[0])&&G(pe[1])&&pe.length===2}):(W=j.map(x),function(pe){for(var De=0;De<W.length;De++)if(!W[De](pe[De]))return!1;return pe.length===W.length})}function C(j,W){return W<j.params.length?j.params[W]:w(j.params)?K(j.params):null}function k(j,W,q){var G=C(j,W),ue=G?q?G.types.filter(N):G.types:[];return ue.map($)}function $(j){return j.name}function N(j){return j.conversion===null||j.conversion===void 0}function A(j,W){var q=$e(ge(j,function(G){return k(G,W,!1)}));return q.indexOf("any")!==-1?["any"]:q}function L(j,W,q){var G,ue,be=j||"unnamed",ke=q,we;for(we=0;we<W.length;we++){var pe=ke.filter(function(Mr){var Bl=x(C(Mr,we));return(we<Mr.params.length||w(Mr.params))&&Bl(W[we])});if(pe.length===0){if(ue=A(ke,we),ue.length>0){var De=p(W[we]);return G=new TypeError("Unexpected type of argument in function "+be+" (expected: "+ue.join(" or ")+", actual: "+De+", index: "+we+")"),G.data={category:"wrongType",fn:be,index:we,actual:De,expected:ue},G}}else ke=pe}var Vt=ke.map(function(Mr){return w(Mr.params)?1/0:Mr.params.length});if(W.length<Math.min.apply(null,Vt))return ue=A(ke,we),G=new TypeError("Too few arguments in function "+be+" (expected: "+ue.join(" or ")+", index: "+W.length+")"),G.data={category:"tooFewArgs",fn:be,index:W.length,expected:ue},G;var ir=Math.max.apply(null,Vt);return W.length>ir?(G=new TypeError("Too many arguments in function "+be+" (expected: "+ir+", actual: "+W.length+")"),G.data={category:"tooManyArgs",fn:be,index:W.length,expectedLength:ir},G):(G=new TypeError('Arguments of type "'+W.join(", ")+'" do not match any of the defined signatures of function '+be+"."),G.data={category:"mismatch",actual:W.map(p)},G)}function M(j){for(var W=999,q=0;q<j.types.length;q++)N(j.types[q])&&(W=Math.min(W,j.types[q].typeIndex));return W}function O(j){for(var W=999,q=0;q<j.types.length;q++)N(j.types[q])||(W=Math.min(W,j.types[q].conversionIndex));return W}function T(j,W){var q;return q=j.restParam-W.restParam,q!==0||(q=S(j)-S(W),q!==0)||(q=M(j)-M(W),q!==0)?q:O(j)-O(W)}function E(j,W){var q=Math.min(j.params.length,W.params.length),G,ue;if(ue=j.params.some(S)-W.params.some(S),ue!==0)return ue;for(G=0;G<q;G++)if(ue=S(j.params[G])-S(W.params[G]),ue!==0)return ue;for(G=0;G<q;G++)if(ue=T(j.params[G],W.params[G]),ue!==0)return ue;return j.params.length-W.params.length}function D(j,W){var q={};return j.forEach(function(G){W.indexOf(G.from)===-1&&W.indexOf(G.to)!==-1&&!q[G.from]&&(q[G.from]=G)}),Object.keys(q).map(function(G){return q[G]})}function P(j,W){var q=W;if(j.some(S)){var G=w(j),ue=j.map(I);q=function(){for(var pe=[],De=G?arguments.length-1:arguments.length,Vt=0;Vt<De;Vt++)pe[Vt]=ue[Vt](arguments[Vt]);return G&&(pe[De]=arguments[De].map(ue[De])),W.apply(null,pe)}}var be=q;if(w(j)){var ke=j.length-1;be=function(){return q.apply(null,J(arguments,0,ke).concat([J(arguments,ke)]))}}return be}function I(j){var W,q,G,ue,be=[],ke=[];switch(j.types.forEach(function(we){we.conversion&&(be.push(d(we.conversion.from).test),ke.push(we.conversion.convert))}),ke.length){case 0:return function(pe){return pe};case 1:return W=be[0],G=ke[0],function(pe){return W(pe)?G(pe):pe};case 2:return W=be[0],q=be[1],G=ke[0],ue=ke[1],function(pe){return W(pe)?G(pe):q(pe)?ue(pe):pe};default:return function(pe){for(var De=0;De<ke.length;De++)if(be[De](pe))return ke[De](pe);return pe}}}function V(j){var W={};return j.forEach(function(q){q.params.some(S)||F(q.params,!0).forEach(function(G){W[g(G)]=q.fn})}),W}function F(j,W){function q(G,ue,be){if(ue<G.length){var ke=G[ue],we=W?ke.types.filter(N):ke.types,pe;if(ke.restParam){var De=we.filter(N);pe=De.length<we.length?[De,we]:[we]}else pe=we.map(function(ir){return[ir]});return ge(pe,function(ir){return q(G,ue+1,be.concat([ir]))})}else{var Vt=be.map(function(ir,Mr){return{types:ir,restParam:Mr===G.length-1&&w(G)}});return[Vt]}}return q(j,0,[])}function H(j,W){for(var q=Math.max(j.params.length,W.params.length),G=0;G<q;G++){var ue=k(j,G,!0),be=k(W,G,!0);if(!Ce(ue,be))return!1}var ke=j.params.length,we=W.params.length,pe=w(j.params),De=w(W.params);return pe?De?ke===we:we>=ke:De?ke>=we:ke===we}function Y(j,W){if(Object.keys(W).length===0)throw new SyntaxError("No signatures provided");var q=[];Object.keys(W).map(function(wt){return _(wt,W[wt],f.conversions)}).filter(ye).forEach(function(wt){var Ot=Se(q,function(vn){return H(vn,wt)});if(Ot)throw new TypeError('Conflicting signatures "'+g(Ot.params)+'" and "'+g(wt.params)+'".');q.push(wt)});var G=ge(q,function(wt){var Ot=wt?F(wt.params,!1):[];return Ot.map(function(vn){return{params:vn,fn:wt.fn}})}).filter(ye);G.sort(E);var ue=G[0]&&G[0].params.length<=2&&!w(G[0].params),be=G[1]&&G[1].params.length<=2&&!w(G[1].params),ke=G[2]&&G[2].params.length<=2&&!w(G[2].params),we=G[3]&&G[3].params.length<=2&&!w(G[3].params),pe=G[4]&&G[4].params.length<=2&&!w(G[4].params),De=G[5]&&G[5].params.length<=2&&!w(G[5].params),Vt=ue&&be&&ke&&we&&pe&&De,ir=G.map(function(wt){return b(wt.params)}),Mr=ue?x(G[0].params[0]):n,Bl=be?x(G[1].params[0]):n,d0=ke?x(G[2].params[0]):n,md=we?x(G[3].params[0]):n,st=pe?x(G[4].params[0]):n,vd=De?x(G[5].params[0]):n,B=ue?x(G[0].params[1]):n,U=be?x(G[1].params[1]):n,X=ke?x(G[2].params[1]):n,ie=we?x(G[3].params[1]):n,Ie=pe?x(G[4].params[1]):n,Ve=De?x(G[5].params[1]):n,Ft=G.map(function(wt){return P(wt.params,wt.fn)}),h0=ue?Ft[0]:a,nue=be?Ft[1]:a,aue=ke?Ft[2]:a,iue=we?Ft[3]:a,oue=pe?Ft[4]:a,sue=De?Ft[5]:a,lue=ue?G[0].params.length:-1,cue=be?G[1].params.length:-1,uue=ke?G[2].params.length:-1,fue=we?G[3].params.length:-1,due=pe?G[4].params.length:-1,hue=De?G[5].params.length:-1,pue=Vt?6:0,mue=G.length,vue=function(){for(var Ot=pue;Ot<mue;Ot++)if(ir[Ot](arguments))return Ft[Ot].apply(null,arguments);throw L(j,arguments,G)},p0=function(Ot,vn){return arguments.length===lue&&Mr(Ot)&&B(vn)?h0.apply(null,arguments):arguments.length===cue&&Bl(Ot)&&U(vn)?nue.apply(null,arguments):arguments.length===uue&&d0(Ot)&&X(vn)?aue.apply(null,arguments):arguments.length===fue&&md(Ot)&&ie(vn)?iue.apply(null,arguments):arguments.length===due&&st(Ot)&&Ie(vn)?oue.apply(null,arguments):arguments.length===hue&&vd(Ot)&&Ve(vn)?sue.apply(null,arguments):vue.apply(null,arguments)};try{Object.defineProperty(p0,"name",{value:j})}catch{}return p0.signatures=V(G),p0}function Q(j){return f.ignore.indexOf(j)===-1}function ae(j){return j.trim()}function le(j){return!!j}function ye(j){return j!==null}function de(j){return j.types.length===0}function Z(j){return j.slice(0,j.length-1)}function K(j){return j[j.length-1]}function J(j,W,q){return Array.prototype.slice.call(j,W,q)}function oe(j,W){return j.indexOf(W)!==-1}function Ce(j,W){for(var q=0;q<j.length;q++)if(oe(W,j[q]))return!0;return!1}function Se(j,W){for(var q=0;q<j.length;q++)if(W(j[q]))return j[q]}function $e(j){for(var W={},q=0;q<j.length;q++)W[j[q]]=!0;return Object.keys(W)}function ge(j,W){return Array.prototype.concat.apply([],j.map(W))}function Qe(j){for(var W="",q=0;q<j.length;q++){var G=j[q];if((typeof G.signatures=="object"||typeof G.signature=="string")&&G.name!==""){if(W==="")W=G.name;else if(W!==G.name){var ue=new Error("Function names do not match (expected: "+W+", actual: "+G.name+")");throw ue.data={actual:G.name,expected:W},ue}}}return W}function ot(j){var W,q={};function G(we,pe){if(q.hasOwnProperty(we)&&pe!==q[we])throw W=new Error('Signature "'+we+'" is defined twice'),W.data={signature:we},W}for(var ue=0;ue<j.length;ue++){var be=j[ue];if(typeof be.signatures=="object")for(var ke in be.signatures)be.signatures.hasOwnProperty(ke)&&(G(ke,be.signatures[ke]),q[ke]=be.signatures[ke]);else if(typeof be.signature=="string")G(be.signature,be),q[be.signature]=be;else throw W=new TypeError("Function is no typed-function (index: "+ue+")"),W.data={index:ue},W}return q}return f=Y("typed",{"string, Object":Y,Object:function(j){var W=[];for(var q in j)j.hasOwnProperty(q)&&W.push(j[q]);var G=Qe(W);return Y(G,j)},"...Function":function(j){return Y(Qe(j),ot(j))},"string, ...Function":function(j,W){return Y(j,ot(W))}}),f.create=i,f.types=o,f.conversions=u,f.ignore=c,f.convert=v,f.find=m,f.addType=function(j,W){if(!j||typeof j.name!="string"||typeof j.test!="function")throw new TypeError("Object with properties {name: string, test: function} expected");if(W!==!1){for(var q=0;q<f.types.length;q++)if(f.types[q].name==="Object"){f.types.splice(q,0,j);return}}f.types.push(j)},f.addConversion=function(j){if(!j||typeof j.from!="string"||typeof j.to!="string"||typeof j.convert!="function")throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");f.conversions.push(j)},f}return i()})})(b1);var Qo={};(function(t){var e=Lt;t.isNumber=function(n){return typeof n=="number"},t.isInteger=function(n){return typeof n=="boolean"?!0:isFinite(n)?n===Math.round(n):!1},t.sign=Math.sign||function(n){return n>0?1:n<0?-1:0},t.format=function(n,a){if(typeof a=="function")return a(n);if(n===1/0)return"Infinity";if(n===-1/0)return"-Infinity";if(isNaN(n))return"NaN";var i="auto",o;switch(a&&(a.notation&&(i=a.notation),t.isNumber(a)?o=a:t.isNumber(a.precision)&&(o=a.precision)),i){case"fixed":return t.toFixed(n,o);case"exponential":return t.toExponential(n,o);case"engineering":return t.toEngineering(n,o);case"auto":if(a&&a.exponential&&(a.exponential.lower!==void 0||a.exponential.upper!==void 0)){var l=e.map(a,function(c){return c});return l.exponential=void 0,a.exponential.lower!==void 0&&(l.lowerExp=Math.round(Math.log(a.exponential.lower)/Math.LN10)),a.exponential.upper!==void 0&&(l.upperExp=Math.round(Math.log(a.exponential.upper)/Math.LN10)),console.warn("Deprecation warning: Formatting options exponential.lower and exponential.upper (minimum and maximum value) are replaced with exponential.lowerExp and exponential.upperExp (minimum and maximum exponent) since version 4.0.0. Replace "+JSON.stringify(a)+" with "+JSON.stringify(l)),t.toPrecision(n,o,l)}return t.toPrecision(n,o,a&&a).replace(/((\.\d*?)(0+))($|e)/,function(){var c=arguments[2],u=arguments[4];return c!=="."?c+u:u});default:throw new Error('Unknown notation "'+i+'". Choose "auto", "exponential", or "fixed".')}},t.splitNumber=function(n){var a=String(n).toLowerCase().match(/^0*?(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!a)throw new SyntaxError("Invalid number "+n);var i=a[1],o=a[2],l=parseFloat(a[4]||"0"),c=o.indexOf(".");l+=c!==-1?c-1:o.length-1;var u=o.replace(".","").replace(/^0*/,function(f){return l-=f.length,""}).replace(/0*$/,"").split("").map(function(f){return parseInt(f)});return u.length===0&&(u.push(0),l++),{sign:i,coefficients:u,exponent:l}},t.toEngineering=function(n,a){if(isNaN(n)||!isFinite(n))return String(n);var i=t.roundDigits(t.splitNumber(n),a),o=i.exponent,l=i.coefficients,c=o%3==0?o:o<0?o-3-o%3:o-o%3;if(t.isNumber(a))for(;a>l.length||o-c+1>l.length;)l.push(0);else for(var u=o>=0?o:Math.abs(c);l.length-1<u;)l.push(0);for(var f=Math.abs(o-c),d=1;f>0;)d++,f--;var h=l.slice(d).join(""),p=t.isNumber(a)&&h.length||h.match(/[1-9]/)?"."+h:"",m=l.slice(0,d).join("")+p+"e"+(o>=0?"+":"")+c.toString();return i.sign+m},t.toFixed=function(n,a){if(isNaN(n)||!isFinite(n))return String(n);var i=t.splitNumber(n),o=typeof a=="number"?t.roundDigits(i,i.exponent+1+a):i,l=o.coefficients,c=o.exponent+1,u=c+(a||0);return l.length<u&&(l=l.concat(r(u-l.length))),c<0&&(l=r(-c+1).concat(l),c=1),c<l.length&&l.splice(c,0,c===0?"0.":"."),o.sign+l.join("")},t.toExponential=function(n,a){if(isNaN(n)||!isFinite(n))return String(n);var i=t.splitNumber(n),o=a?t.roundDigits(i,a):i,l=o.coefficients,c=o.exponent;l.length<a&&(l=l.concat(r(a-l.length)));var u=l.shift();return o.sign+u+(l.length>0?"."+l.join(""):"")+"e"+(c>=0?"+":"")+c},t.toPrecision=function(n,a,i){if(isNaN(n)||!isFinite(n))return String(n);var o=i&&i.lowerExp!==void 0?i.lowerExp:-3,l=i&&i.upperExp!==void 0?i.upperExp:5,c=t.splitNumber(n);if(c.exponent<o||c.exponent>=l)return t.toExponential(n,a);var u=a?t.roundDigits(c,a):c,f=u.coefficients,d=u.exponent;f.length<a&&(f=f.concat(r(a-f.length))),f=f.concat(r(d-f.length+1+(f.length<a?a-f.length:0))),f=r(-d).concat(f);var h=d>0?d:0;return h<f.length-1&&f.splice(h+1,0,"."),u.sign+f.join("")},t.roundDigits=function(n,a){for(var i={sign:n.sign,coefficients:n.coefficients,exponent:n.exponent},o=i.coefficients;a<=0;)o.unshift(0),i.exponent++,a++;if(o.length>a){var l=o.splice(a,o.length-a);if(l[0]>=5){var c=a-1;for(o[c]++;o[c]===10;)o.pop(),c===0&&(o.unshift(0),i.exponent++,c++),c--,o[c]++}}return i};function r(n){for(var a=[],i=0;i<n;i++)a.push(0);return a}t.digits=function(n){return n.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length},t.DBL_EPSILON=Number.EPSILON||2220446049250313e-31,t.nearlyEqual=function(n,a,i){if(i==null)return n===a;if(n===a)return!0;if(isNaN(n)||isNaN(a))return!1;if(isFinite(n)&&isFinite(a)){var o=Math.abs(n-a);return o<t.DBL_EPSILON?!0:o<=Math.max(Math.abs(n),Math.abs(a))*i}return!1}})(Qo);var VI=function(e){return e&&e.constructor.prototype.isMatrix||!1};function cc(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cc=function(r){return typeof r}:cc=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},cc(t)}var S1=b1.exports,FI=Qo.digits,zI=yh,HI=VI,x1=function(){return x1=S1.create,S1};w1.create=function(e){e.isNumber=function(n){return typeof n=="number"},e.isComplex=function(n){return e.Complex&&n instanceof e.Complex||!1},e.isBigNumber=zI,e.isFraction=function(n){return e.Fraction&&n instanceof e.Fraction||!1},e.isUnit=function(n){return n&&n.constructor.prototype.isUnit||!1},e.isString=function(n){return typeof n=="string"},e.isArray=Array.isArray,e.isMatrix=HI,e.isDenseMatrix=function(n){return n&&n.isDenseMatrix&&n.constructor.prototype.isMatrix||!1},e.isSparseMatrix=function(n){return n&&n.isSparseMatrix&&n.constructor.prototype.isMatrix||!1},e.isRange=function(n){return n&&n.constructor.prototype.isRange||!1},e.isIndex=function(n){return n&&n.constructor.prototype.isIndex||!1},e.isBoolean=function(n){return typeof n=="boolean"},e.isResultSet=function(n){return n&&n.constructor.prototype.isResultSet||!1},e.isHelp=function(n){return n&&n.constructor.prototype.isHelp||!1},e.isFunction=function(n){return typeof n=="function"},e.isDate=function(n){return n instanceof Date},e.isRegExp=function(n){return n instanceof RegExp},e.isObject=function(n){return cc(n)==="object"&&n.constructor===Object&&!e.isComplex(n)&&!e.isFraction(n)},e.isNull=function(n){return n===null},e.isUndefined=function(n){return n===void 0},e.isAccessorNode=function(n){return n&&n.isAccessorNode&&n.constructor.prototype.isNode||!1},e.isArrayNode=function(n){return n&&n.isArrayNode&&n.constructor.prototype.isNode||!1},e.isAssignmentNode=function(n){return n&&n.isAssignmentNode&&n.constructor.prototype.isNode||!1},e.isBlockNode=function(n){return n&&n.isBlockNode&&n.constructor.prototype.isNode||!1},e.isConditionalNode=function(n){return n&&n.isConditionalNode&&n.constructor.prototype.isNode||!1},e.isConstantNode=function(n){return n&&n.isConstantNode&&n.constructor.prototype.isNode||!1},e.isFunctionAssignmentNode=function(n){return n&&n.isFunctionAssignmentNode&&n.constructor.prototype.isNode||!1},e.isFunctionNode=function(n){return n&&n.isFunctionNode&&n.constructor.prototype.isNode||!1},e.isIndexNode=function(n){return n&&n.isIndexNode&&n.constructor.prototype.isNode||!1},e.isNode=function(n){return n&&n.isNode&&n.constructor.prototype.isNode||!1},e.isObjectNode=function(n){return n&&n.isObjectNode&&n.constructor.prototype.isNode||!1},e.isOperatorNode=function(n){return n&&n.isOperatorNode&&n.constructor.prototype.isNode||!1},e.isParenthesisNode=function(n){return n&&n.isParenthesisNode&&n.constructor.prototype.isNode||!1},e.isRangeNode=function(n){return n&&n.isRangeNode&&n.constructor.prototype.isNode||!1},e.isSymbolNode=function(n){return n&&n.isSymbolNode&&n.constructor.prototype.isNode||!1},e.isChain=function(n){return n&&n.constructor.prototype.isChain||!1};var r=x1();return r.types=[{name:"number",test:e.isNumber},{name:"Complex",test:e.isComplex},{name:"BigNumber",test:e.isBigNumber},{name:"Fraction",test:e.isFraction},{name:"Unit",test:e.isUnit},{name:"string",test:e.isString},{name:"Array",test:e.isArray},{name:"Matrix",test:e.isMatrix},{name:"DenseMatrix",test:e.isDenseMatrix},{name:"SparseMatrix",test:e.isSparseMatrix},{name:"Range",test:e.isRange},{name:"Index",test:e.isIndex},{name:"boolean",test:e.isBoolean},{name:"ResultSet",test:e.isResultSet},{name:"Help",test:e.isHelp},{name:"function",test:e.isFunction},{name:"Date",test:e.isDate},{name:"RegExp",test:e.isRegExp},{name:"null",test:e.isNull},{name:"undefined",test:e.isUndefined},{name:"OperatorNode",test:e.isOperatorNode},{name:"ConstantNode",test:e.isConstantNode},{name:"SymbolNode",test:e.isSymbolNode},{name:"ParenthesisNode",test:e.isParenthesisNode},{name:"FunctionNode",test:e.isFunctionNode},{name:"FunctionAssignmentNode",test:e.isFunctionAssignmentNode},{name:"ArrayNode",test:e.isArrayNode},{name:"AssignmentNode",test:e.isAssignmentNode},{name:"BlockNode",test:e.isBlockNode},{name:"ConditionalNode",test:e.isConditionalNode},{name:"IndexNode",test:e.isIndexNode},{name:"RangeNode",test:e.isRangeNode},{name:"Node",test:e.isNode},{name:"Object",test:e.isObject}],r.conversions=[{from:"number",to:"BigNumber",convert:function(a){if(FI(a)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+a+"). Use function bignumber(x) to convert to BigNumber.");return new e.BigNumber(a)}},{from:"number",to:"Complex",convert:function(a){return new e.Complex(a,0)}},{from:"number",to:"string",convert:function(a){return a+""}},{from:"BigNumber",to:"Complex",convert:function(a){return new e.Complex(a.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(a){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(a){return new e.Complex(a.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(a){var i=new e.Fraction(a);if(i.valueOf()!==a)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+a+"). Use function fraction(x) to convert to Fraction.");return new e.Fraction(a)}},{from:"string",to:"number",convert:function(a){var i=Number(a);if(isNaN(i))throw new Error('Cannot convert "'+a+'" to a number');return i}},{from:"string",to:"BigNumber",convert:function(a){try{return new e.BigNumber(a)}catch{throw new Error('Cannot convert "'+a+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(a){try{return new e.Fraction(a)}catch{throw new Error('Cannot convert "'+a+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(a){try{return new e.Complex(a)}catch{throw new Error('Cannot convert "'+a+'" to Complex')}}},{from:"boolean",to:"number",convert:function(a){return+a}},{from:"boolean",to:"BigNumber",convert:function(a){return new e.BigNumber(+a)}},{from:"boolean",to:"Fraction",convert:function(a){return new e.Fraction(+a)}},{from:"boolean",to:"string",convert:function(a){return+a}},{from:"Array",to:"Matrix",convert:function(a){return new e.DenseMatrix(a)}},{from:"Matrix",to:"Array",convert:function(a){return a.valueOf()}}],r};var C1={},_h={exports:{}};function wh(){}wh.prototype={on:function(t,e,r){var n=this.e||(this.e={});return(n[t]||(n[t]=[])).push({fn:e,ctx:r}),this},once:function(t,e,r){var n=this;function a(){n.off(t,a),e.apply(r,arguments)}return a._=e,this.on(t,a,r)},emit:function(t){var e=[].slice.call(arguments,1),r=((this.e||(this.e={}))[t]||[]).slice(),n=0,a=r.length;for(n;n<a;n++)r[n].fn.apply(r[n].ctx,e);return this},off:function(t,e){var r=this.e||(this.e={}),n=r[t],a=[];if(n&&e)for(var i=0,o=n.length;i<o;i++)n[i].fn!==e&&n[i].fn._!==e&&a.push(n[i]);return a.length?r[t]=a:delete r[t],this}},_h.exports=wh,_h.exports.TinyEmitter=wh;var UI=_h.exports;C1.mixin=function(t){var e=new UI;return t.on=e.on.bind(e),t.off=e.off.bind(e),t.once=e.once.bind(e),t.emit=e.emit.bind(e),t};var es={};function Ii(t,e,r,n){if(!(this instanceof Ii))throw new SyntaxError("Constructor must be called with the new operator");this.fn=t,this.count=e,this.min=r,this.max=n,this.message="Wrong number of arguments in function "+t+" ("+e+" provided, "+r+(n!=null?"-"+n:"")+" expected)",this.stack=new Error().stack}Ii.prototype=new Error,Ii.prototype.constructor=Error,Ii.prototype.name="ArgumentsError",Ii.prototype.isArgumentsError=!0;var k1=Ii;function ts(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ts=function(r){return typeof r}:ts=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ts(t)}var T1=Lt.lazy,M1=Lt.isFactory,jI=Lt.traverse,YI=k1;function GI(t,e,r,n,a){function i(g,y){var _=arguments.length;if(_!==1&&_!==2)throw new YI("import",_,1,2);if(y||(y={}),M1(g))f(g,y);else if(Array.isArray(g))g.forEach(function(x){i(x,y)});else if(ts(g)==="object"){for(var w in g)if(g.hasOwnProperty(w)){var S=g[w];d(S)?o(w,S,y):M1(g)?f(g,y):i(S,y)}}else if(!y.silent)throw new TypeError("Factory, Object, or Array expected")}function o(g,y,_){if(_.wrap&&typeof y=="function"&&(y=u(y)),h(a[g])&&h(y)){_.override?y=n(g,y.signatures):y=n(a[g],y),a[g]=y,l(g,y),a.emit("import",g,function(){return y});return}if(a[g]===void 0||_.override){a[g]=y,l(g,y),a.emit("import",g,function(){return y});return}if(!_.silent)throw new Error('Cannot import "'+g+'": already exists')}function l(g,y){y&&typeof y.transform=="function"?(a.expression.transform[g]=y.transform,p(g)&&(a.expression.mathWithTransform[g]=y.transform)):(delete a.expression.transform[g],p(g)&&(a.expression.mathWithTransform[g]=y))}function c(g){delete a.expression.transform[g],p(g)?a.expression.mathWithTransform[g]=a[g]:delete a.expression.mathWithTransform[g]}function u(g){var y=function(){for(var w=[],S=0,x=arguments.length;S<x;S++){var b=arguments[S];w[S]=b&&b.valueOf()}return g.apply(a,w)};return g.transform&&(y.transform=g.transform),y}function f(g,y){if(typeof g.name=="string"){var _=g.name,w=_ in a.expression.transform,S=g.path?jI(a,g.path):a,x=S.hasOwnProperty(_)?S[_]:void 0,b=function(){var k=r(g);if(k&&typeof k.transform=="function")throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(h(x)&&h(k))return y.override||(k=n(x,k)),k;if(x===void 0||y.override)return k;if(!y.silent)throw new Error('Cannot import "'+_+'": already exists')};g.lazy!==!1?(T1(S,_,b),w?c(_):(g.path==="expression.transform"||m(g))&&T1(a.expression.mathWithTransform,_,b)):(S[_]=b(),w?c(_):(g.path==="expression.transform"||m(g))&&(a.expression.mathWithTransform[_]=b())),a.emit("import",_,b,g.path)}else r(g)}function d(g){return typeof g=="function"||typeof g=="number"||typeof g=="string"||typeof g=="boolean"||g===null||g&&t.isUnit(g)||g&&t.isComplex(g)||g&&t.isBigNumber(g)||g&&t.isFraction(g)||g&&t.isMatrix(g)||g&&Array.isArray(g)}function h(g){return typeof g=="function"&&ts(g.signatures)==="object"}function p(g){return!v.hasOwnProperty(g)}function m(g){return g.path===void 0&&!v.hasOwnProperty(g.name)}var v={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return i}es.math=!0,es.name="import",es.factory=GI,es.lazy=!0;var uc={},bn=Lt;function WI(t,e,r,n,a){var i=["Matrix","Array"],o=["number","BigNumber","Fraction"];function l(c){if(c){var u=bn.map(e,bn.clone);$1(c,"matrix",i),$1(c,"number",o),bn.deepExtend(e,c);var f=bn.map(e,bn.clone),d=bn.map(c,bn.clone);return a.emit("config",f,u,d),f}else return bn.map(e,bn.clone)}return l.MATRIX=i,l.NUMBER=o,l}function ZI(t,e){return t.indexOf(e)!==-1}function qI(t,e){return t.map(function(r){return r.toLowerCase()}).indexOf(e.toLowerCase())}function $1(t,e,r){if(t[e]!==void 0&&!ZI(r,t[e])){var n=qI(r,t[e]);n!==-1?(console.warn('Warning: Wrong casing for configuration option "'+e+'", should be "'+r[n]+'" instead of "'+t[e]+'".'),t[e]=r[n]):console.warn('Warning: Unknown value "'+t[e]+'" for configuration option "'+e+'". Available options: '+r.map(JSON.stringify).join(", ")+".")}}uc.name="config",uc.math=!0,uc.factory=WI;var XI=Lt.isFactory,KI=w1,JI=C1,QI=es,e6=uc;_1.create=function(e){if(typeof Object.create!="function")throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var r=[],n=[],a=JI.mixin({});a.type={},a.expression={transform:{},mathWithTransform:{}},a.typed=KI.create(a.type);var i={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function o(l){if(!XI(l))throw new Error("Factory object with properties `type`, `name`, and `factory` expected");var c=r.indexOf(l),u;return c===-1?(l.math===!0?u=l.factory(a.type,i,o,a.typed,a):u=l.factory(a.type,i,o,a.typed),r.push(l),n.push(u)):u=n[c],u}return a.import=o(QI),a.config=o(e6),a.expression.mathWithTransform.config=a.config,e&&a.config(e),a};var t6=_1,bh={},Ri={},Vi=function t(e,r,n){return e&&typeof e.map=="function"?e.map(function(a){return t(a,r)}):r(e)},fc={},rs={};function dc(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dc=function(r){return typeof r}:dc=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},dc(t)}function r6(t,e,r,n){var a=n("_typeof",{any:function(o){var l=dc(o);return l==="object"?o===null?"null":Array.isArray(o)?"Array":o instanceof Date?"Date":o instanceof RegExp?"RegExp":t.isBigNumber(o)?"BigNumber":t.isComplex(o)?"Complex":t.isFraction(o)?"Fraction":t.isMatrix(o)?"Matrix":t.isUnit(o)?"Unit":t.isIndex(o)?"Index":t.isRange(o)?"Range":t.isResultSet(o)?"ResultSet":t.isNode(o)?o.type:t.isChain(o)?"Chain":t.isHelp(o)?"Help":"Object":l==="function"?"Function":l}});return a.toTex=void 0,a}rs.name="typeof",rs.factory=r6;var Sh={},n6=Vi;function a6(t,e,r,n){var a=n("number",{"":function(){return 0},number:function(o){return o},string:function(o){if(o==="NaN")return NaN;var l=Number(o);if(isNaN(l))throw new SyntaxError('String "'+o+'" is no valid number');return l},BigNumber:function(o){return o.toNumber()},Fraction:function(o){return o.valueOf()},Unit:function(o){throw new Error("Second argument with valueless unit expected")},null:function(o){return 0},"Unit, string | Unit":function(o,l){return o.toNumber(l)},"Array | Matrix":function(o){return n6(o,a)}});return a.toTex={0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},a}Sh.name="number",Sh.factory=a6;var xh={},i6=Vi;function o6(t,e,r,n){var a=n("bignumber",{"":function(){return new t.BigNumber(0)},number:function(o){return new t.BigNumber(o+"")},string:function(o){return new t.BigNumber(o)},BigNumber:function(o){return o},Fraction:function(o){return new t.BigNumber(o.n).div(o.d).times(o.s)},null:function(o){return new t.BigNumber(0)},"Array | Matrix":function(o){return i6(o,a)}});return a.toTex={0:"0",1:"\\left(${args[0]}\\right)"},a}xh.name="bignumber",xh.factory=o6;var Ch={},s6=Vi;function l6(t,e,r,n){var a=n("fraction",{number:function(o){if(!isFinite(o)||isNaN(o))throw new Error(o+" cannot be represented as a fraction");return new t.Fraction(o)},string:function(o){return new t.Fraction(o)},"number, number":function(o,l){return new t.Fraction(o,l)},null:function(o){return new t.Fraction(0)},BigNumber:function(o){return new t.Fraction(o.toString())},Fraction:function(o){return o},Object:function(o){return new t.Fraction(o)},"Array | Matrix":function(o){return s6(o,a)}});return a}Ch.name="fraction",Ch.factory=l6;function c6(t,e,r,n){var a=r(rs),i={string:!0,number:!0,BigNumber:!0,Fraction:!0},o={number:r(Sh),BigNumber:r(xh),Fraction:r(Ch)},l=function(u,f){var d=a(u);if(!(d in i))throw new TypeError("Cannot convert "+u+' of type "'+d+'"; valid input types are '+Object.keys(i).join(", "));if(!(f in o))throw new TypeError("Cannot convert "+u+' to type "'+f+'"; valid output types are '+Object.keys(o).join(", "));return f===d?u:o[f](u)};return l.toTex=function(c,u){return c.args[0].toTex()},l}fc.path="type",fc.name="_numeric",fc.factory=c6;var hc={},dt={};function ns(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ns=function(r){return typeof r}:ns=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ns(t)}var kh=Lt.hasOwnProperty;function u6(t,e){if($h(t)&&Th(t,e))return t[e];throw typeof t[e]=="function"&&Mh(t,e)?new Error('Cannot access method "'+e+'" as a property'):new Error('No access to property "'+e+'"')}function f6(t,e,r){if($h(t)&&Th(t,e))return t[e]=r,r;throw new Error('No access to property "'+e+'"')}function Th(t,e){return!t||ns(t)!=="object"?!1:kh(h6,e)?!0:!(e in Object.prototype||e in Function.prototype)}function d6(t,e){if(!Mh(t,e))throw new Error('No access to method "'+e+'"')}function Mh(t,e){return!t||typeof t[e]!="function"||kh(t,e)&&Object.getPrototypeOf&&e in Object.getPrototypeOf(t)?!1:kh(p6,e)?!0:!(e in Object.prototype||e in Function.prototype)}function $h(t){return ns(t)==="object"&&t&&t.constructor===Object}var h6={length:!0,name:!0},p6={toString:!0,valueOf:!0,toLocaleString:!0};dt.getSafeProperty=u6,dt.setSafeProperty=f6,dt.isSafeProperty=Th,dt.validateSafeMethod=d6,dt.isSafeMethod=Mh,dt.isPlainObject=$h;var mt={},N1={end:!0};function Sn(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Sn=function(r){return typeof r}:Sn=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Sn(t)}var m6=N1,v6=Lt.deepEqual,g6=Lt.hasOwnProperty;function y6(t,e,r,n,a){function i(){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator")}i.prototype.eval=function(l){return this.compile().eval(l)},i.prototype.type="Node",i.prototype.isNode=!0,i.prototype.comment="",i.prototype.compile=function(){var l=this._compile(a.expression.mathWithTransform,{}),c={},u=null;return{eval:function(d){var h=d||{};return o(h),l(h,c,u)}}},i.prototype._compile=function(l,c){throw new Error("Method _compile should be implemented by type "+this.type)},i.prototype.forEach=function(l){throw new Error("Cannot run forEach on a Node interface")},i.prototype.map=function(l){throw new Error("Cannot run map on a Node interface")},i.prototype._ifNode=function(l){if(!t.isNode(l))throw new TypeError("Callback function must return a Node");return l},i.prototype.traverse=function(l){l(this,null,null);function c(u,f){u.forEach(function(d,h,p){f(d,h,p),c(d,f)})}c(this,l)},i.prototype.transform=function(l){function c(f,d){return f.map(function(h,p,m){var v=d(h,p,m);return c(v,d)})}var u=l(this,null,null);return c(u,l)},i.prototype.filter=function(l){var c=[];return this.traverse(function(u,f,d){l(u,f,d)&&c.push(u)}),c},i.prototype.find=function(){throw new Error("Function Node.find is deprecated. Use Node.filter instead.")},i.prototype.match=function(){throw new Error("Function Node.match is deprecated. See functions Node.filter, Node.transform, Node.traverse.")},i.prototype.clone=function(){throw new Error("Cannot clone a Node interface")},i.prototype.cloneDeep=function(){return this.map(function(l){return l.cloneDeep()})},i.prototype.equals=function(l){return l?v6(this,l):!1},i.prototype.toString=function(l){var c;if(l&&Sn(l)==="object")switch(Sn(l.handler)){case"object":case"undefined":break;case"function":c=l.handler(this,l);break;default:throw new TypeError("Object or function expected as callback")}return typeof c!="undefined"?c:this._toString(l)},i.prototype.toJSON=function(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)},i.prototype.toHTML=function(l){var c;if(l&&Sn(l)==="object")switch(Sn(l.handler)){case"object":case"undefined":break;case"function":c=l.handler(this,l);break;default:throw new TypeError("Object or function expected as callback")}return typeof c!="undefined"?c:this.toHTML(l)},i.prototype._toString=function(){throw new Error("_toString not implemented for "+this.type)},i.prototype.toTex=function(l){var c;if(l&&Sn(l)==="object")switch(Sn(l.handler)){case"object":case"undefined":break;case"function":c=l.handler(this,l);break;default:throw new TypeError("Object or function expected as callback")}return typeof c!="undefined"?c:this._toTex(l)},i.prototype._toTex=function(l){throw new Error("_toTex not implemented for "+this.type)},i.prototype.getIdentifier=function(){return this.type},i.prototype.getContent=function(){return this};function o(l){for(var c in l)if(g6(l,c)&&c in m6)throw new Error('Scope contains an illegal symbol, "'+c+'" is a reserved keyword')}return i}mt.name="Node",mt.path="expression.node",mt.math=!0,mt.factory=y6;var Nh={},Eh={};function Fi(t,e,r){if(!(this instanceof Fi))throw new SyntaxError("Constructor must be called with the new operator");this.index=t,arguments.length<3?(this.min=0,this.max=e):(this.min=e,this.max=r),this.min!==void 0&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":this.max!==void 0&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}Fi.prototype=new RangeError,Fi.prototype.constructor=RangeError,Fi.prototype.name="IndexError",Fi.prototype.isIndexError=!0;var E1=Fi,_6=E1;Eh.transform=function(t){return t&&t.isIndexError?new _6(t.index+1,t.min+1,t.max!==void 0?t.max+1:void 0):t};var pc={},nt={},sr={},A1={};(function(t){var e=Lt;t.format=function(r,n){if(typeof n=="function")return n(r);if(!r.isFinite())return r.isNaN()?"NaN":r.gt(0)?"Infinity":"-Infinity";var a="auto",i;switch(n!==void 0&&(n.notation&&(a=n.notation),typeof n=="number"?i=n:n.precision&&(i=n.precision)),a){case"fixed":return t.toFixed(r,i);case"exponential":return t.toExponential(r,i);case"engineering":return t.toEngineering(r,i);case"auto":if(n&&n.exponential&&(n.exponential.lower!==void 0||n.exponential.upper!==void 0)){var o=e.map(n,function(d){return d});return o.exponential=void 0,n.exponential.lower!==void 0&&(o.lowerExp=Math.round(Math.log(n.exponential.lower)/Math.LN10)),n.exponential.upper!==void 0&&(o.upperExp=Math.round(Math.log(n.exponential.upper)/Math.LN10)),console.warn("Deprecation warning: Formatting options exponential.lower and exponential.upper (minimum and maximum value) are replaced with exponential.lowerExp and exponential.upperExp (minimum and maximum exponent) since version 4.0.0. Replace "+JSON.stringify(n)+" with "+JSON.stringify(o)),t.format(r,o)}var l=n&&n.lowerExp!==void 0?n.lowerExp:-3,c=n&&n.upperExp!==void 0?n.upperExp:5;if(r.isZero())return"0";var u,f=r.e;return f>=l&&f<c?u=r.toSignificantDigits(i).toFixed():u=t.toExponential(r,i),u.replace(/((\.\d*?)(0+))($|e)/,function(){var d=arguments[2],h=arguments[4];return d!=="."?d+h:h});default:throw new Error('Unknown notation "'+a+'". Choose "auto", "exponential", or "fixed".')}},t.toEngineering=function(r,n){var a=r.e,i=a%3==0?a:a<0?a-3-a%3:a-a%3,o=r.mul(Math.pow(10,-i)),l=o.toPrecision(n);return l.indexOf("e")!==-1&&(l=o.toString()),l+"e"+(a>=0?"+":"")+i.toString()},t.toExponential=function(r,n){return n!==void 0?r.toExponential(n-1):r.toExponential()},t.toFixed=function(r,n){return r.toFixed(n)}})(A1),function(t){function e(l){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(u){return typeof u}:e=function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},e(l)}var r=Qo.format,n=A1.format,a=yh;t.isString=function(l){return typeof l=="string"},t.endsWith=function(l,c){var u=l.length-c.length,f=l.length;return l.substring(u,f)===c},t.format=function(l,c){if(typeof l=="number")return r(l,c);if(a(l))return n(l,c);if(o(l))return!c||c.fraction!=="decimal"?l.s*l.n+"/"+l.d:l.toString();if(Array.isArray(l))return i(l,c);if(t.isString(l))return'"'+l+'"';if(typeof l=="function")return l.syntax?String(l.syntax):"function";if(l&&e(l)==="object"){if(typeof l.format=="function")return l.format(c);if(l&&l.toString()!=={}.toString())return l.toString();var u=[];for(var f in l)l.hasOwnProperty(f)&&u.push('"'+f+'": '+t.format(l[f],c));return"{"+u.join(", ")+"}"}return String(l)},t.stringify=function(l){for(var c=String(l),u="",f=0;f<c.length;){var d=c.charAt(f);d==="\\"?(u+=d,f++,d=c.charAt(f),(d===""||'"\\/bfnrtu'.indexOf(d)===-1)&&(u+="\\"),u+=d):d==='"'?u+='\\"':u+=d,f++}return'"'+u+'"'},t.escape=function(l){var c=String(l);return c=c.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),c};function i(l,c){if(Array.isArray(l)){for(var u="[",f=l.length,d=0;d<f;d++)d!==0&&(u+=", "),u+=i(l[d],c);return u+="]",u}else return t.format(l,c)}function o(l){return l&&e(l)==="object"&&typeof l.s=="number"&&typeof l.n=="number"&&typeof l.d=="number"||!1}}(sr);function zi(t,e,r){if(!(this instanceof zi))throw new SyntaxError("Constructor must be called with the new operator");this.actual=t,this.expected=e,this.relation=r,this.message="Dimension mismatch ("+(Array.isArray(t)?"["+t.join(", ")+"]":t)+" "+(this.relation||"!=")+" "+(Array.isArray(e)?"["+e.join(", ")+"]":e)+")",this.stack=new Error().stack}zi.prototype=new RangeError,zi.prototype.constructor=RangeError,zi.prototype.name="DimensionError",zi.prototype.isDimensionError=!0;var D1=zi;Object.defineProperty(nt,"__esModule",{value:!0}),nt.size=Gn,nt.validate=S6,nt.validateIndex=x6,nt.resize=C6,nt.reshape=k6,nt.squeeze=M6,nt.unsqueeze=$6,nt.flatten=B1,nt.map=N6,nt.forEach=E6,nt.filter=A6,nt.filterRegExp=D6,nt.join=O6,nt.identify=L6,nt.generalize=P6;var mc=vc(Qo),w6=vc(sr),Yn=vc(D1),b6=vc(E1);function vc(t){return t&&t.__esModule?t:{default:t}}function Gn(t){for(var e=[];Array.isArray(t);)e.push(t.length),t=t[0];return e}function O1(t,e,r){var n,a=t.length;if(a!==e[r])throw new Yn.default(a,e[r]);if(r<e.length-1){var i=r+1;for(n=0;n<a;n++){var o=t[n];if(!Array.isArray(o))throw new Yn.default(e.length-1,e.length,"<");O1(t[n],e,i)}}else for(n=0;n<a;n++)if(Array.isArray(t[n]))throw new Yn.default(e.length+1,e.length,">")}function S6(t,e){var r=e.length===0;if(r){if(Array.isArray(t))throw new Yn.default(t.length,0)}else O1(t,e,0)}function x6(t,e){if(!mc.default.isNumber(t)||!mc.default.isInteger(t))throw new TypeError("Index must be an integer (value: "+t+")");if(t<0||typeof e=="number"&&t>=e)throw new b6.default(t,e)}function C6(t,e,r){if(!Array.isArray(t)||!Array.isArray(e))throw new TypeError("Array expected");if(e.length===0)throw new Error("Resizing to scalar is not supported");e.forEach(function(a){if(!mc.default.isNumber(a)||!mc.default.isInteger(a)||a<0)throw new TypeError("Invalid size, must contain positive integers (size: "+w6.default.format(e)+")")});var n=r!==void 0?r:0;return Ah(t,e,0,n),t}function Ah(t,e,r,n){var a,i,o=t.length,l=e[r],c=Math.min(o,l);if(t.length=l,r<e.length-1){var u=r+1;for(a=0;a<c;a++)i=t[a],Array.isArray(i)||(i=[i],t[a]=i),Ah(i,e,u,n);for(a=c;a<l;a++)i=[],t[a]=i,Ah(i,e,u,n)}else{for(a=0;a<c;a++)for(;Array.isArray(t[a]);)t[a]=t[a][0];for(a=c;a<l;a++)t[a]=n}}function k6(t,e){var r=B1(t),n;function a(l){return l.reduce(function(c,u){return c*u})}if(!Array.isArray(t)||!Array.isArray(e))throw new TypeError("Array expected");if(e.length===0)throw new Yn.default(0,a(Gn(t)),"!=");for(var i=1,o=0;o<e.length;o++)i*=e[o];if(r.length!==i)throw new Yn.default(a(e),a(Gn(t)),"!=");try{n=T6(r,e)}catch(l){throw l instanceof Yn.default?new Yn.default(a(e),a(Gn(t)),"!="):l}return n}function T6(t,e){for(var r=t,n,a=e.length-1;a>0;a--){var i=e[a];n=[];for(var o=r.length/i,l=0;l<o;l++)n.push(r.slice(l*i,(l+1)*i));r=n}return r}function M6(t,e){for(var r=e||Gn(t);Array.isArray(t)&&t.length===1;)t=t[0],r.shift();for(var n=r.length;r[n-1]===1;)n--;return n<r.length&&(t=L1(t,n,0),r.length=n),t}function L1(t,e,r){var n,a;if(r<e){var i=r+1;for(n=0,a=t.length;n<a;n++)t[n]=L1(t[n],e,i)}else for(;Array.isArray(t);)t=t[0];return t}function $6(t,e,r,n){var a=n||Gn(t);if(r)for(var i=0;i<r;i++)t=[t],a.unshift(1);for(t=P1(t,e,0);a.length<e;)a.push(1);return t}function P1(t,e,r){var n,a;if(Array.isArray(t)){var i=r+1;for(n=0,a=t.length;n<a;n++)t[n]=P1(t[n],e,i)}else for(var o=r;o<e;o++)t=[t];return t}function B1(t){if(!Array.isArray(t))return t;var e=[];return t.forEach(function r(n){Array.isArray(n)?n.forEach(r):e.push(n)}),e}function N6(t,e){return Array.prototype.map.call(t,e)}function E6(t,e){Array.prototype.forEach.call(t,e)}function A6(t,e){if(Gn(t).length!==1)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(t,e)}function D6(t,e){if(Gn(t).length!==1)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(t,function(r){return e.test(r)})}function O6(t,e){return Array.prototype.join.call(t,e)}function L6(t){if(!Array.isArray(t))throw new TypeError("Array input expected");if(t.length===0)return t;var e=[],r=0;e[0]={value:t[0],identifier:0};for(var n=1;n<t.length;n++)t[n]===t[n-1]?r++:r=0,e.push({value:t[n],identifier:r});return e}function P6(t){if(!Array.isArray(t))throw new TypeError("Array input expected");if(t.length===0)return t;for(var e=[],r=0;r<t.length;r++)e.push(t[r].value);return e}var gc={};function B6(t,e,r,n){var a=n("matrix",{"":function(){return i([])},string:function(l){return i([],l)},"string, string":function(l,c){return i([],l,c)},Array:function(l){return i(l)},Matrix:function(l){return i(l,l.storage())},"Array | Matrix, string":i,"Array | Matrix, string, string":i});return a.toTex={0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},a;function i(o,l,c){var u=t.Matrix.storage(l||"default");return new u(o,c)}}gc.name="matrix",gc.factory=B6;var Dh=Lt.clone,yc=nt.validateIndex,I6=dt.getSafeProperty,R6=dt.setSafeProperty,as=D1;function V6(t,e,r,n){var a=r(gc),i=n("subset",{"Array, Index":function(u,f){var d=a(u),h=d.subset(f);return f.isScalar()?h:h.valueOf()},"Matrix, Index":function(u,f){return u.subset(f)},"Object, Index":F6,"string, Index":o,"Array, Index, any":function(u,f,d){return a(Dh(u)).subset(f,d,void 0).valueOf()},"Array, Index, any, any":function(u,f,d,h){return a(Dh(u)).subset(f,d,h).valueOf()},"Matrix, Index, any":function(u,f,d){return u.clone().subset(f,d)},"Matrix, Index, any, any":function(u,f,d,h){return u.clone().subset(f,d,h)},"string, Index, string":l,"string, Index, string, string":l,"Object, Index, any":z6});return i.toTex=void 0,i;function o(c,u){if(!t.isIndex(u))throw new TypeError("Index expected");if(u.size().length!==1)throw new as(u.size().length,1);var f=c.length;yc(u.min()[0],f),yc(u.max()[0],f);var d=u.dimension(0),h="";return d.forEach(function(p){h+=c.charAt(p)}),h}function l(c,u,f,d){if(!u||u.isIndex!==!0)throw new TypeError("Index expected");if(u.size().length!==1)throw new as(u.size().length,1);if(d!==void 0){if(typeof d!="string"||d.length!==1)throw new TypeError("Single character expected as defaultValue")}else d=" ";var h=u.dimension(0),p=h.size()[0];if(p!==f.length)throw new as(h.size()[0],f.length);var m=c.length;yc(u.min()[0]),yc(u.max()[0]);for(var v=[],g=0;g<m;g++)v[g]=c.charAt(g);if(h.forEach(function(w,S){v[w]=f.charAt(S[0])}),v.length>m)for(var y=m-1,_=v.length;y<_;y++)v[y]||(v[y]=d);return v.join("")}}function F6(t,e){if(e.size().length!==1)throw new as(e.size(),1);var r=e.dimension(0);if(typeof r!="string")throw new TypeError("String expected as index to retrieve an object property");return I6(t,r)}function z6(t,e,r){if(e.size().length!==1)throw new as(e.size(),1);var n=e.dimension(0);if(typeof n!="string")throw new TypeError("String expected as index to retrieve an object property");var a=Dh(t);return R6(a,n,r),a}pc.name="subset",pc.factory=V6;function _c(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_c=function(r){return typeof r}:_c=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_c(t)}var H6=Eh.transform,U6=dt.getSafeProperty;function j6(t,e,r,n){var a=r(pc);return function(o,l){try{if(Array.isArray(o))return a(o,l);if(o&&typeof o.subset=="function")return o.subset(l);if(typeof o=="string")return a(o,l);if(_c(o)==="object"){if(!l.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return U6(o,l.getObjectProperty())}else throw new TypeError("Cannot apply index: unsupported type of object")}catch(c){throw H6(c)}}}Nh.factory=j6;var Y6=dt.getSafeProperty;function G6(t,e,r,n){var a=r(mt),i=r(Nh);function o(c,u){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(!t.isNode(c))throw new TypeError('Node expected for parameter "object"');if(!t.isIndexNode(u))throw new TypeError('IndexNode expected for parameter "index"');this.object=c||null,this.index=u,Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}o.prototype=new a,o.prototype.type="AccessorNode",o.prototype.isAccessorNode=!0,o.prototype._compile=function(c,u){var f=this.object._compile(c,u),d=this.index._compile(c,u);if(this.index.isObjectProperty()){var h=this.index.getObjectProperty();return function(m,v,g){return Y6(f(m,v,g),h)}}else return function(m,v,g){var y=f(m,v,g),_=d(m,v,y);return i(y,_)}},o.prototype.forEach=function(c){c(this.object,"object",this),c(this.index,"index",this)},o.prototype.map=function(c){return new o(this._ifNode(c(this.object,"object",this)),this._ifNode(c(this.index,"index",this)))},o.prototype.clone=function(){return new o(this.object,this.index)},o.prototype._toString=function(c){var u=this.object.toString(c);return l(this.object)&&(u="("+u+")"),u+this.index.toString(c)},o.prototype.toHTML=function(c){var u=this.object.toHTML(c);return l(this.object)&&(u='<span class="math-parenthesis math-round-parenthesis">(</span>'+u+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+this.index.toHTML(c)},o.prototype._toTex=function(c){var u=this.object.toTex(c);return l(this.object)&&(u="\\left(' + object + '\\right)"),u+this.index.toTex(c)},o.prototype.toJSON=function(){return{mathjs:"AccessorNode",object:this.object,index:this.index}},o.fromJSON=function(c){return new o(c.object,c.index)};function l(c){return!(t.isAccessorNode(c)||t.isArrayNode(c)||t.isConstantNode(c)||t.isFunctionNode(c)||t.isObjectNode(c)||t.isParenthesisNode(c)||t.isSymbolNode(c))}return o}hc.name="AccessorNode",hc.path="expression.node",hc.factory=G6;var wc={},Oh=nt.map;function W6(t,e,r,n){var a=r(mt);function i(o){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(this.items=o||[],!Array.isArray(this.items)||!this.items.every(t.isNode))throw new TypeError("Array containing Nodes expected");var l=function(){throw new Error("Property `ArrayNode.nodes` is deprecated, use `ArrayNode.items` instead")};Object.defineProperty(this,"nodes",{get:l,set:l})}return i.prototype=new a,i.prototype.type="ArrayNode",i.prototype.isArrayNode=!0,i.prototype._compile=function(o,l){var c=Oh(this.items,function(d){return d._compile(o,l)}),u=o.config().matrix!=="Array";if(u){var f=o.matrix;return function(h,p,m){return f(Oh(c,function(v){return v(h,p,m)}))}}else return function(h,p,m){return Oh(c,function(v){return v(h,p,m)})}},i.prototype.forEach=function(o){for(var l=0;l<this.items.length;l++){var c=this.items[l];o(c,"items["+l+"]",this)}},i.prototype.map=function(o){for(var l=[],c=0;c<this.items.length;c++)l[c]=this._ifNode(o(this.items[c],"items["+c+"]",this));return new i(l)},i.prototype.clone=function(){return new i(this.items.slice(0))},i.prototype._toString=function(o){var l=this.items.map(function(c){return c.toString(o)});return"["+l.join(", ")+"]"},i.prototype.toJSON=function(){return{mathjs:"ArrayNode",items:this.items}},i.fromJSON=function(o){return new i(o.items)},i.prototype.toHTML=function(o){var l=this.items.map(function(c){return c.toHTML(o)});return'<span class="math-parenthesis math-square-parenthesis">[</span>'+l.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},i.prototype._toTex=function(o){var l="\\begin{bmatrix}";return this.items.forEach(function(c){c.items?l+=c.items.map(function(u){return u.toTex(o)}).join("&"):l+=c.toTex(o),l+="\\\\"}),l+="\\end{bmatrix}",l},i}wc.name="ArrayNode",wc.path="expression.node",wc.factory=W6;var bc={},I1={};function Sc(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Sc=function(r){return typeof r}:Sc=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Sc(t)}var Z6=Eh.transform,q6=dt.setSafeProperty;function X6(t,e,r,n){var a=r(pc),i=r(gc);return function(l,c,u){try{if(Array.isArray(l))return i(l).subset(c,u).valueOf();if(l&&typeof l.subset=="function")return l.subset(c,u);if(typeof l=="string")return a(l,c,u);if(Sc(l)==="object"){if(!c.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return q6(l,c.getObjectProperty(),u),l}else throw new TypeError("Cannot apply index: unsupported type of object")}catch(f){throw Z6(f)}}}I1.factory=X6;var Zr={},is=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{associativity:"left",associativeWith:[]}},{"OperatorNode:and":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{associativity:"left",associativeWith:[]},"OperatorNode:unequal":{associativity:"left",associativeWith:[]},"OperatorNode:smaller":{associativity:"left",associativeWith:[]},"OperatorNode:larger":{associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{associativity:"left",associativeWith:[]}},{"OperatorNode:to":{associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{associativity:"left",associativeWith:[]},"OperatorNode:mod":{associativity:"left",associativeWith:[]}},{"OperatorNode:unaryPlus":{associativity:"right"},"OperatorNode:unaryMinus":{associativity:"right"},"OperatorNode:bitNot":{associativity:"right"},"OperatorNode:not":{associativity:"right"}},{"OperatorNode:pow":{associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{associativity:"left"}},{"OperatorNode:transpose":{associativity:"left"}}];function Lh(t,e){var r=t;e!=="keep"&&(r=t.getContent());for(var n=r.getIdentifier(),a=0;a<is.length;a++)if(n in is[a])return a;return null}function K6(t,e){var r=t;e!=="keep"&&(r=t.getContent());var n=r.getIdentifier(),a=Lh(r,e);if(a===null)return null;var i=is[a][n];if(i.hasOwnProperty("associativity")){if(i.associativity==="left")return"left";if(i.associativity==="right")return"right";throw Error("'"+n+"' has the invalid associativity '"+i.associativity+"'.")}return null}function J6(t,e,r){var n=r!=="keep"?t.getContent():t,a=r!=="keep"?t.getContent():e,i=n.getIdentifier(),o=a.getIdentifier(),l=Lh(n,r);if(l===null)return null;var c=is[l][i];if(c.hasOwnProperty("associativeWith")&&c.associativeWith instanceof Array){for(var u=0;u<c.associativeWith.length;u++)if(c.associativeWith[u]===o)return!0;return!1}return null}Zr.properties=is,Zr.getPrecedence=Lh,Zr.getAssociativity=K6,Zr.isAssociativeWith=J6;var Q6=dt.getSafeProperty,xc=dt.setSafeProperty;function e8(t,e,r,n){var a=r(mt),i=r(I1),o=r(Nh),l=Zr;function c(f,d,h){if(!(this instanceof c))throw new SyntaxError("Constructor must be called with the new operator");if(this.object=f,this.index=h?d:null,this.value=h||d,!t.isSymbolNode(f)&&!t.isAccessorNode(f))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(t.isSymbolNode(f)&&f.name==="end")throw new Error('Cannot assign to symbol "end"');if(this.index&&!t.isIndexNode(this.index))throw new TypeError('IndexNode expected as "index"');if(!t.isNode(this.value))throw new TypeError('Node expected as "value"');Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}c.prototype=new a,c.prototype.type="AssignmentNode",c.prototype.isAssignmentNode=!0,c.prototype._compile=function(f,d){var h=this.object._compile(f,d),p=this.index?this.index._compile(f,d):null,m=this.value._compile(f,d),v=this.object.name;if(this.index)if(this.index.isObjectProperty()){var g=this.index.getObjectProperty();return function(x,b,C){var k=h(x,b,C),$=m(x,b,C);return xc(k,g,$)}}else{if(t.isSymbolNode(this.object))return function(x,b,C){var k=h(x,b,C),$=m(x,b,C),N=p(x,b,k);return xc(x,v,i(k,N,$)),$};var y=this.object.object._compile(f,d);if(this.object.index.isObjectProperty()){var _=this.object.index.getObjectProperty();return function(x,b,C){var k=y(x,b,C),$=Q6(k,_),N=p(x,b,$),A=m(x,b,C);return xc(k,_,i($,N,A)),A}}else{var w=this.object.index._compile(f,d);return function(x,b,C){var k=y(x,b,C),$=w(x,b,k),N=o(k,$),A=p(x,b,N),L=m(x,b,C);return i(k,$,i(N,A,L)),L}}}else{if(!t.isSymbolNode(this.object))throw new TypeError("SymbolNode expected as object");return function(x,b,C){return xc(x,v,m(x,b,C))}}},c.prototype.forEach=function(f){f(this.object,"object",this),this.index&&f(this.index,"index",this),f(this.value,"value",this)},c.prototype.map=function(f){var d=this._ifNode(f(this.object,"object",this)),h=this.index?this._ifNode(f(this.index,"index",this)):null,p=this._ifNode(f(this.value,"value",this));return new c(d,h,p)},c.prototype.clone=function(){return new c(this.object,this.index,this.value)};function u(f,d){d||(d="keep");var h=l.getPrecedence(f,d),p=l.getPrecedence(f.value,d);return d==="all"||p!==null&&p<=h}return c.prototype._toString=function(f){var d=this.object.toString(f),h=this.index?this.index.toString(f):"",p=this.value.toString(f);return u(this,f&&f.parenthesis)&&(p="("+p+")"),d+h+" = "+p},c.prototype.toJSON=function(){return{mathjs:"AssignmentNode",object:this.object,index:this.index,value:this.value}},c.fromJSON=function(f){return new c(f.object,f.index,f.value)},c.prototype.toHTML=function(f){var d=this.object.toHTML(f),h=this.index?this.index.toHTML(f):"",p=this.value.toHTML(f);return u(this,f&&f.parenthesis)&&(p='<span class="math-paranthesis math-round-parenthesis">(</span>'+p+'<span class="math-paranthesis math-round-parenthesis">)</span>'),d+h+'<span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+p},c.prototype._toTex=function(f){var d=this.object.toTex(f),h=this.index?this.index.toTex(f):"",p=this.value.toTex(f);return u(this,f&&f.parenthesis)&&(p="\\left(".concat(p,"\\right)")),d+h+":="+p},c}bc.name="AssignmentNode",bc.path="expression.node",bc.factory=e8;var Cc={},kc={};function t8(t,e,r,n){function a(i){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");this.entries=i||[]}return a.prototype.type="ResultSet",a.prototype.isResultSet=!0,a.prototype.valueOf=function(){return this.entries},a.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},a.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},a.fromJSON=function(i){return new a(i.entries)},a}kc.name="ResultSet",kc.path="type",kc.factory=t8;var r8=nt.forEach,n8=nt.map;function a8(t,e,r,n){var a=r(mt),i=r(kc);function o(l){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(l))throw new Error("Array expected");this.blocks=l.map(function(c){var u=c&&c.node,f=c&&c.visible!==void 0?c.visible:!0;if(!t.isNode(u))throw new TypeError('Property "node" must be a Node');if(typeof f!="boolean")throw new TypeError('Property "visible" must be a boolean');return{node:u,visible:f}})}return o.prototype=new a,o.prototype.type="BlockNode",o.prototype.isBlockNode=!0,o.prototype._compile=function(l,c){var u=n8(this.blocks,function(f){return{eval:f.node._compile(l,c),visible:f.visible}});return function(d,h,p){var m=[];return r8(u,function(g){var y=g.eval(d,h,p);g.visible&&m.push(y)}),new i(m)}},o.prototype.forEach=function(l){for(var c=0;c<this.blocks.length;c++)l(this.blocks[c].node,"blocks["+c+"].node",this)},o.prototype.map=function(l){for(var c=[],u=0;u<this.blocks.length;u++){var f=this.blocks[u],d=this._ifNode(l(f.node,"blocks["+u+"].node",this));c[u]={node:d,visible:f.visible}}return new o(c)},o.prototype.clone=function(){var l=this.blocks.map(function(c){return{node:c.node,visible:c.visible}});return new o(l)},o.prototype._toString=function(l){return this.blocks.map(function(c){return c.node.toString(l)+(c.visible?"":";")}).join(`
9
+ `)},o.prototype.toJSON=function(){return{mathjs:"BlockNode",blocks:this.blocks}},o.fromJSON=function(l){return new o(l.blocks)},o.prototype.toHTML=function(l){return this.blocks.map(function(c){return c.node.toHTML(l)+(c.visible?"":'<span class="math-separator">;</span>')}).join('<span class="math-separator"><br /></span>')},o.prototype._toTex=function(l){return this.blocks.map(function(c){return c.node.toTex(l)+(c.visible?"":";")}).join(`\\;\\;
10
+ `)},o}Cc.name="BlockNode",Cc.path="expression.node",Cc.factory=a8;var Tc={},Wn=Zr;function i8(t,e,r,n){var a=r(mt),i=r(rs);function o(c,u,f){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(!t.isNode(c))throw new TypeError("Parameter condition must be a Node");if(!t.isNode(u))throw new TypeError("Parameter trueExpr must be a Node");if(!t.isNode(f))throw new TypeError("Parameter falseExpr must be a Node");this.condition=c,this.trueExpr=u,this.falseExpr=f}o.prototype=new a,o.prototype.type="ConditionalNode",o.prototype.isConditionalNode=!0,o.prototype._compile=function(c,u){var f=this.condition._compile(c,u),d=this.trueExpr._compile(c,u),h=this.falseExpr._compile(c,u);return function(m,v,g){return l(f(m,v,g))?d(m,v,g):h(m,v,g)}},o.prototype.forEach=function(c){c(this.condition,"condition",this),c(this.trueExpr,"trueExpr",this),c(this.falseExpr,"falseExpr",this)},o.prototype.map=function(c){return new o(this._ifNode(c(this.condition,"condition",this)),this._ifNode(c(this.trueExpr,"trueExpr",this)),this._ifNode(c(this.falseExpr,"falseExpr",this)))},o.prototype.clone=function(){return new o(this.condition,this.trueExpr,this.falseExpr)},o.prototype._toString=function(c){var u=c&&c.parenthesis?c.parenthesis:"keep",f=Wn.getPrecedence(this,u),d=this.condition.toString(c),h=Wn.getPrecedence(this.condition,u);(u==="all"||this.condition.type==="OperatorNode"||h!==null&&h<=f)&&(d="("+d+")");var p=this.trueExpr.toString(c),m=Wn.getPrecedence(this.trueExpr,u);(u==="all"||this.trueExpr.type==="OperatorNode"||m!==null&&m<=f)&&(p="("+p+")");var v=this.falseExpr.toString(c),g=Wn.getPrecedence(this.falseExpr,u);return(u==="all"||this.falseExpr.type==="OperatorNode"||g!==null&&g<=f)&&(v="("+v+")"),d+" ? "+p+" : "+v},o.prototype.toJSON=function(){return{mathjs:"ConditionalNode",condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}},o.fromJSON=function(c){return new o(c.condition,c.trueExpr,c.falseExpr)},o.prototype.toHTML=function(c){var u=c&&c.parenthesis?c.parenthesis:"keep",f=Wn.getPrecedence(this,u),d=this.condition.toHTML(c),h=Wn.getPrecedence(this.condition,u);(u==="all"||this.condition.type==="OperatorNode"||h!==null&&h<=f)&&(d='<span class="math-parenthesis math-round-parenthesis">(</span>'+d+'<span class="math-parenthesis math-round-parenthesis">)</span>');var p=this.trueExpr.toHTML(c),m=Wn.getPrecedence(this.trueExpr,u);(u==="all"||this.trueExpr.type==="OperatorNode"||m!==null&&m<=f)&&(p='<span class="math-parenthesis math-round-parenthesis">(</span>'+p+'<span class="math-parenthesis math-round-parenthesis">)</span>');var v=this.falseExpr.toHTML(c),g=Wn.getPrecedence(this.falseExpr,u);return(u==="all"||this.falseExpr.type==="OperatorNode"||g!==null&&g<=f)&&(v='<span class="math-parenthesis math-round-parenthesis">(</span>'+v+'<span class="math-parenthesis math-round-parenthesis">)</span>'),d+'<span class="math-operator math-conditional-operator">?</span>'+p+'<span class="math-operator math-conditional-operator">:</span>'+v},o.prototype._toTex=function(c){return"\\begin{cases} {"+this.trueExpr.toTex(c)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(c)+"}\\\\{"+this.falseExpr.toTex(c)+"}, &\\quad{\\text{otherwise}}\\end{cases}"};function l(c){if(typeof c=="number"||typeof c=="boolean"||typeof c=="string")return!!c;if(c){if(t.isBigNumber(c))return!c.isZero();if(t.isComplex(c))return!!(c.re||c.im);if(t.isUnit(c))return!!c.value}if(c==null)return!1;throw new TypeError('Unsupported type of condition "'+i(c)+'"')}return o}Tc.name="ConditionalNode",Tc.path="expression.node",Tc.factory=i8;var Mc={},Da={},Ph=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o8={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},s8={"\u2013":"\\--","\u2014":"\\---"," ":"~"," ":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"},l8=function(e,r){return Ph({},e,r)},c8=function(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.preserveFormatting,n=r===void 0?!1:r,a=e.escapeMapFn,i=a===void 0?l8:a,o=String(t),l="",c=i(Ph({},o8),n?Ph({},s8):{}),u=Object.keys(c),f=function(){var h=!1;u.forEach(function(p,m){h||o.length>=p.length&&o.slice(0,p.length)===p&&(l+=c[u[m]],o=o.slice(p.length,o.length),h=!0)}),h||(l+=o.slice(0,1),o=o.slice(1,o.length))};o;)f();return l};(function(t){var e=c8;t.symbols={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},t.operators={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},t.defaultTemplate="\\mathrm{${name}}\\left(${args}\\right)";var r={deg:"^\\circ"};t.escape=function(n){return e(n,{preserveFormatting:!0})},t.toSymbol=function(n,a){return a=typeof a=="undefined"?!1:a,a?r.hasOwnProperty(n)?r[n]:"\\mathrm{"+t.escape(n)+"}":t.symbols.hasOwnProperty(n)?t.symbols[n]:t.escape(n)}})(Da);var u8=sr.format,f8=Da.escape;function d8(t,e,r,n){var a=r(mt),i=r(rs);function o(l){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(arguments.length===2)throw new SyntaxError("new ConstantNode(valueStr, valueType) is not supported anymore since math v4.0.0. Use new ConstantNode(value) instead, where value is a non-stringified value.");this.value=l}return o.prototype=new a,o.prototype.type="ConstantNode",o.prototype.isConstantNode=!0,o.prototype._compile=function(l,c){var u=this.value;return function(){return u}},o.prototype.forEach=function(l){},o.prototype.map=function(l){return this.clone()},o.prototype.clone=function(){return new o(this.value)},o.prototype._toString=function(l){return u8(this.value,l)},o.prototype.toHTML=function(l){var c=this._toString(l);switch(i(this.value)){case"number":case"BigNumber":case"Fraction":return'<span class="math-number">'+c+"</span>";case"string":return'<span class="math-string">'+c+"</span>";case"boolean":return'<span class="math-boolean">'+c+"</span>";case"null":return'<span class="math-null-symbol">'+c+"</span>";case"undefined":return'<span class="math-undefined">'+c+"</span>";default:return'<span class="math-symbol">'+c+"</span>"}},o.prototype.toJSON=function(){return{mathjs:"ConstantNode",value:this.value}},o.fromJSON=function(l){return new o(l.value)},o.prototype._toTex=function(l){var c=this._toString(l);switch(i(this.value)){case"string":return"\\mathtt{"+f8(c)+"}";case"number":case"BigNumber":var u=c.toLowerCase().indexOf("e");return u!==-1?c.substring(0,u)+"\\cdot10^{"+c.substring(u+1)+"}":c;case"Fraction":return this.value.toLatex();default:return c}},o}Mc.name="ConstantNode",Mc.path="expression.node",Mc.factory=d8;var $c={},h8=N1,R1=sr.escape,p8=nt.forEach,V1=nt.join,m8=Da,F1=Zr,v8=dt.setSafeProperty;function g8(t,e,r,n){var a=r(mt);function i(l,c,u){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(typeof l!="string")throw new TypeError('String expected for parameter "name"');if(!Array.isArray(c))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!t.isNode(u))throw new TypeError('Node expected for parameter "expr"');if(l in h8)throw new Error('Illegal function name, "'+l+'" is a reserved keyword');this.name=l,this.params=c.map(function(f){return f&&f.name||f}),this.types=c.map(function(f){return f&&f.type||"any"}),this.expr=u}i.prototype=new a,i.prototype.type="FunctionAssignmentNode",i.prototype.isFunctionAssignmentNode=!0,i.prototype._compile=function(l,c){var u=Object.create(c);p8(this.params,function(v){u[v]=!0});var f=this.expr._compile(l,u),d=this.name,h=this.params,p=V1(this.types,","),m=d+"("+V1(this.params,", ")+")";return function(g,y,_){var w={};w[p]=function(){for(var x=Object.create(y),b=0;b<h.length;b++)x[h[b]]=arguments[b];return f(g,x,_)};var S=n(d,w);return S.syntax=m,v8(g,d,S),S}},i.prototype.forEach=function(l){l(this.expr,"expr",this)},i.prototype.map=function(l){var c=this._ifNode(l(this.expr,"expr",this));return new i(this.name,this.params.slice(0),c)},i.prototype.clone=function(){return new i(this.name,this.params.slice(0),this.expr)};function o(l,c){var u=F1.getPrecedence(l,c),f=F1.getPrecedence(l.expr,c);return c==="all"||f!==null&&f<=u}return i.prototype._toString=function(l){var c=l&&l.parenthesis?l.parenthesis:"keep",u=this.expr.toString(l);return o(this,c)&&(u="("+u+")"),this.name+"("+this.params.join(", ")+") = "+u},i.prototype.toJSON=function(){var l=this.types;return{mathjs:"FunctionAssignmentNode",name:this.name,params:this.params.map(function(c,u){return{name:c,type:l[u]}}),expr:this.expr}},i.fromJSON=function(l){return new i(l.name,l.params,l.expr)},i.prototype.toHTML=function(l){for(var c=l&&l.parenthesis?l.parenthesis:"keep",u=[],f=0;f<this.params.length;f++)u.push('<span class="math-symbol math-parameter">'+R1(this.params[f])+"</span>");var d=this.expr.toHTML(l);return o(this,c)&&(d='<span class="math-parenthesis math-round-parenthesis">(</span>'+d+'<span class="math-parenthesis math-round-parenthesis">)</span>'),'<span class="math-function">'+R1(this.name)+'</span><span class="math-parenthesis math-round-parenthesis">(</span>'+u.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-round-parenthesis">)</span><span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+d},i.prototype._toTex=function(l){var c=l&&l.parenthesis?l.parenthesis:"keep",u=this.expr.toTex(l);return o(this,c)&&(u="\\left(".concat(u,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(m8.toSymbol).join(",")+"\\right):="+u},i}$c.name="FunctionAssignmentNode",$c.path="expression.node",$c.factory=g8;var Nc={},Ec={},os=Qo;function y8(t,e,r,n){function a(i,o,l){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");var c=i!=null,u=o!=null,f=l!=null;if(c){if(t.isBigNumber(i))i=i.toNumber();else if(typeof i!="number")throw new TypeError("Parameter start must be a number")}if(u){if(t.isBigNumber(o))o=o.toNumber();else if(typeof o!="number")throw new TypeError("Parameter end must be a number")}if(f){if(t.isBigNumber(l))l=l.toNumber();else if(typeof l!="number")throw new TypeError("Parameter step must be a number")}this.start=c?parseFloat(i):0,this.end=u?parseFloat(o):0,this.step=f?parseFloat(l):1}return a.prototype.type="Range",a.prototype.isRange=!0,a.parse=function(i){if(typeof i!="string")return null;var o=i.split(":"),l=o.map(function(u){return parseFloat(u)}),c=l.some(function(u){return isNaN(u)});if(c)return null;switch(l.length){case 2:return new a(l[0],l[1]);case 3:return new a(l[0],l[2],l[1]);default:return null}},a.prototype.clone=function(){return new a(this.start,this.end,this.step)},a.prototype.size=function(){var i=0,o=this.start,l=this.step,c=this.end,u=c-o;return os.sign(l)===os.sign(u)?i=Math.ceil(u/l):u===0&&(i=0),isNaN(i)&&(i=0),[i]},a.prototype.min=function(){var i=this.size()[0];if(i>0)return this.step>0?this.start:this.start+(i-1)*this.step},a.prototype.max=function(){var i=this.size()[0];if(i>0)return this.step>0?this.start+(i-1)*this.step:this.start},a.prototype.forEach=function(i){var o=this.start,l=this.step,c=this.end,u=0;if(l>0)for(;o<c;)i(o,[u],this),o+=l,u++;else if(l<0)for(;o>c;)i(o,[u],this),o+=l,u++},a.prototype.map=function(i){var o=[];return this.forEach(function(l,c,u){o[c[0]]=i(l,c,u)}),o},a.prototype.toArray=function(){var i=[];return this.forEach(function(o,l){i[l[0]]=o}),i},a.prototype.valueOf=function(){return this.toArray()},a.prototype.format=function(i){var o=os.format(this.start,i);return this.step!==1&&(o+=":"+os.format(this.step,i)),o+=":"+os.format(this.end,i),o},a.prototype.toString=function(){return this.format()},a.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},a.fromJSON=function(i){return new a(i.start,i.end,i.step)},a}Ec.name="Range",Ec.path="type",Ec.factory=y8;var z1=nt.map,_8=sr.escape;function w8(t,e,r,n){var a=r(mt),i=r(Ec),o=Array.isArray;function l(u,f){if(!(this instanceof l))throw new SyntaxError("Constructor must be called with the new operator");if(this.dimensions=u,this.dotNotation=f||!1,!o(u)||!u.every(t.isNode))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties");var d=function(){throw new Error("Property `IndexNode.object` is deprecated, use `IndexNode.fn` instead")};Object.defineProperty(this,"object",{get:d,set:d})}l.prototype=new a,l.prototype.type="IndexNode",l.prototype.isIndexNode=!0,l.prototype._compile=function(u,f){var d=z1(this.dimensions,function(h,p){if(t.isRangeNode(h))if(h.needsEnd()){var m=Object.create(f);m.end=!0;var v=h.start._compile(u,m),g=h.end._compile(u,m),y=h.step?h.step._compile(u,m):function(){return 1};return function($,N,A){var L=u.size(A).valueOf(),M=Object.create(N);return M.end=L[p],c(v($,M,A),g($,M,A),y($,M,A))}}else{var _=h.start._compile(u,f),w=h.end._compile(u,f),S=h.step?h.step._compile(u,f):function(){return 1};return function($,N,A){return c(_($,N,A),w($,N,A),S($,N,A))}}else if(t.isSymbolNode(h)&&h.name==="end"){var x=Object.create(f);x.end=!0;var b=h._compile(u,x);return function($,N,A){var L=u.size(A).valueOf(),M=Object.create(N);return M.end=L[p],b($,M,A)}}else{var C=h._compile(u,f);return function($,N,A){return C($,N,A)}}});return function(p,m,v){var g=z1(d,function(y){return y(p,m,v)});return u.index.apply(u,g)}},l.prototype.forEach=function(u){for(var f=0;f<this.dimensions.length;f++)u(this.dimensions[f],"dimensions["+f+"]",this)},l.prototype.map=function(u){for(var f=[],d=0;d<this.dimensions.length;d++)f[d]=this._ifNode(u(this.dimensions[d],"dimensions["+d+"]",this));return new l(f)},l.prototype.clone=function(){return new l(this.dimensions.slice(0))},l.prototype.isObjectProperty=function(){return this.dimensions.length===1&&t.isConstantNode(this.dimensions[0])&&typeof this.dimensions[0].value=="string"},l.prototype.getObjectProperty=function(){return this.isObjectProperty()?this.dimensions[0].value:null},l.prototype._toString=function(u){return this.dotNotation?"."+this.getObjectProperty():"["+this.dimensions.join(", ")+"]"},l.prototype.toJSON=function(){return{mathjs:"IndexNode",dimensions:this.dimensions,dotNotation:this.dotNotation}},l.fromJSON=function(u){return new l(u.dimensions,u.dotNotation)},l.prototype.toHTML=function(u){for(var f=[],d=0;d<this.dimensions.length;d++)f[d]=this.dimensions[d].toHTML();return this.dotNotation?'<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">'+_8(this.getObjectProperty())+"</span>":'<span class="math-parenthesis math-square-parenthesis">[</span>'+f.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},l.prototype._toTex=function(u){var f=this.dimensions.map(function(d){return d.toTex(u)});return this.dotNotation?"."+this.getObjectProperty()+"":"_{"+f.join(",")+"}"};function c(u,f,d){return new i(t.isBigNumber(u)?u.toNumber():u,t.isBigNumber(f)?f.toNumber():f,t.isBigNumber(d)?d.toNumber():d)}return l}Nc.name="IndexNode",Nc.path="expression.node",Nc.factory=w8;var Ac={};function Dc(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Dc=function(r){return typeof r}:Dc=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Dc(t)}var Oc=sr.stringify,b8=sr.escape,S8=dt.isSafeProperty,H1=Lt.hasOwnProperty;function x8(t,e,r,n){var a=r(mt);function i(o){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(this.properties=o||{},o&&(Dc(o)!=="object"||!Object.keys(o).every(function(l){return t.isNode(o[l])})))throw new TypeError("Object containing Nodes expected")}return i.prototype=new a,i.prototype.type="ObjectNode",i.prototype.isObjectNode=!0,i.prototype._compile=function(o,l){var c={};for(var u in this.properties)if(H1(this.properties,u)){var f=Oc(u),d=JSON.parse(f);if(!S8(this.properties,d))throw new Error('No access to property "'+d+'"');c[d]=this.properties[u]._compile(o,l)}return function(p,m,v){var g={};for(var y in c)H1(c,y)&&(g[y]=c[y](p,m,v));return g}},i.prototype.forEach=function(o){for(var l in this.properties)this.properties.hasOwnProperty(l)&&o(this.properties[l],"properties["+Oc(l)+"]",this)},i.prototype.map=function(o){var l={};for(var c in this.properties)this.properties.hasOwnProperty(c)&&(l[c]=this._ifNode(o(this.properties[c],"properties["+Oc(c)+"]",this)));return new i(l)},i.prototype.clone=function(){var o={};for(var l in this.properties)this.properties.hasOwnProperty(l)&&(o[l]=this.properties[l]);return new i(o)},i.prototype._toString=function(o){var l=[];for(var c in this.properties)this.properties.hasOwnProperty(c)&&l.push(Oc(c)+": "+this.properties[c].toString(o));return"{"+l.join(", ")+"}"},i.prototype.toJSON=function(){return{mathjs:"ObjectNode",properties:this.properties}},i.fromJSON=function(o){return new i(o.properties)},i.prototype.toHTML=function(o){var l=[];for(var c in this.properties)this.properties.hasOwnProperty(c)&&l.push('<span class="math-symbol math-property">'+b8(c)+'</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>'+this.properties[c].toHTML(o));return'<span class="math-parenthesis math-curly-parenthesis">{</span>'+l.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-curly-parenthesis">}</span>'},i.prototype._toTex=function(o){var l=[];for(var c in this.properties)this.properties.hasOwnProperty(c)&&l.push("\\mathbf{"+c+":} & "+this.properties[c].toTex(o)+"\\\\");return"\\left\\{\\begin{array}{ll}".concat(l.join(`
11
+ `),"\\end{array}\\right\\}")},i}Ac.name="ObjectNode",Ac.path="expression.node",Ac.factory=x8;var Lc={},C8=Da,U1=nt.map,ss=sr.escape,k8=dt.isSafeMethod,T8=dt.getSafeProperty,vt=Zr;function M8(t,e,r,n){var a=r(mt);function i(l,c,u,f){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(typeof l!="string")throw new TypeError('string expected for parameter "op"');if(typeof c!="string")throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(u)||!u.every(t.isNode))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=f===!0,this.op=l,this.fn=c,this.args=u||[]}i.prototype=new a,i.prototype.type="OperatorNode",i.prototype.isOperatorNode=!0,i.prototype._compile=function(l,c){if(typeof this.fn!="string"||!k8(l,this.fn))throw l[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var u=T8(l,this.fn),f=U1(this.args,function(m){return m._compile(l,c)});if(f.length===1){var d=f[0];return function(v,g,y){return u(d(v,g,y))}}else if(f.length===2){var h=f[0],p=f[1];return function(v,g,y){return u(h(v,g,y),p(v,g,y))}}else return function(v,g,y){return u.apply(null,U1(f,function(_){return _(v,g,y)}))}},i.prototype.forEach=function(l){for(var c=0;c<this.args.length;c++)l(this.args[c],"args["+c+"]",this)},i.prototype.map=function(l){for(var c=[],u=0;u<this.args.length;u++)c[u]=this._ifNode(l(this.args[u],"args["+u+"]",this));return new i(this.op,this.fn,c,this.implicit)},i.prototype.clone=function(){return new i(this.op,this.fn,this.args.slice(0),this.implicit)},i.prototype.isUnary=function(){return this.args.length===1},i.prototype.isBinary=function(){return this.args.length===2};function o(l,c,u,f,d){var h=vt.getPrecedence(l,c),p=vt.getAssociativity(l,c);if(c==="all"||f.length>2&&l.getIdentifier()!=="OperatorNode:add"&&l.getIdentifier()!=="OperatorNode:multiply"){var m=f.map(function(L){switch(L.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});return m}var v;switch(f.length){case 0:v=[];break;case 1:var g=vt.getPrecedence(f[0],c);if(d&&g!==null){var y,_;if(c==="keep"?(y=f[0].getIdentifier(),_=l.getIdentifier()):(y=f[0].getContent().getIdentifier(),_=l.getContent().getIdentifier()),vt.properties[h][_].latexLeftParens===!1){v=[!1];break}if(vt.properties[g][y].latexParens===!1){v=[!1];break}}if(g===null){v=[!1];break}if(g<=h){v=[!0];break}v=[!1];break;case 2:var w,S=vt.getPrecedence(f[0],c),x=vt.isAssociativeWith(l,f[0],c);S===null?w=!1:S===h&&p==="right"&&!x||S<h?w=!0:w=!1;var b,C=vt.getPrecedence(f[1],c),k=vt.isAssociativeWith(l,f[1],c);if(C===null?b=!1:C===h&&p==="left"&&!k||C<h?b=!0:b=!1,d){var $,N,A;c==="keep"?($=l.getIdentifier(),N=l.args[0].getIdentifier(),A=l.args[1].getIdentifier()):($=l.getContent().getIdentifier(),N=l.args[0].getContent().getIdentifier(),A=l.args[1].getContent().getIdentifier()),S!==null&&(vt.properties[h][$].latexLeftParens===!1&&(w=!1),vt.properties[S][N].latexParens===!1&&(w=!1)),C!==null&&(vt.properties[h][$].latexRightParens===!1&&(b=!1),vt.properties[C][A].latexParens===!1&&(b=!1))}v=[w,b];break;default:(l.getIdentifier()==="OperatorNode:add"||l.getIdentifier()==="OperatorNode:multiply")&&(v=f.map(function(L){var M=vt.getPrecedence(L,c),O=vt.isAssociativeWith(l,L,c),T=vt.getAssociativity(L,c);return M===null?!1:h===M&&p===T&&!O?!0:M<h}));break}return f.length>=2&&l.getIdentifier()==="OperatorNode:multiply"&&l.implicit&&c==="auto"&&u==="hide"&&(v=f.map(function(L,M){var O=L.getIdentifier()==="ParenthesisNode";return!!(v[M]||O)})),v}return i.prototype._toString=function(l){var c=l&&l.parenthesis?l.parenthesis:"keep",u=l&&l.implicit?l.implicit:"hide",f=this.args,d=o(this,c,u,f,!1);if(f.length===1){var h=vt.getAssociativity(this,c),p=f[0].toString(l);d[0]&&(p="("+p+")");var m=/[a-zA-Z]+/.test(this.op);return h==="right"?this.op+(m?" ":"")+p:h==="left"?p+(m?" ":"")+this.op:p+this.op}else if(f.length===2){var v=f[0].toString(l),g=f[1].toString(l);return d[0]&&(v="("+v+")"),d[1]&&(g="("+g+")"),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?v+" "+g:v+" "+this.op+" "+g}else if(f.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var y=f.map(function(_,w){return _=_.toString(l),d[w]&&(_="("+_+")"),_});return this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?y.join(" "):y.join(" "+this.op+" ")}else return this.fn+"("+this.args.join(", ")+")"},i.prototype.toJSON=function(){return{mathjs:"OperatorNode",op:this.op,fn:this.fn,args:this.args,implicit:this.implicit}},i.fromJSON=function(l){return new i(l.op,l.fn,l.args,l.implicit)},i.prototype.toHTML=function(l){var c=l&&l.parenthesis?l.parenthesis:"keep",u=l&&l.implicit?l.implicit:"hide",f=this.args,d=o(this,c,u,f,!1);if(f.length===1){var h=vt.getAssociativity(this,c),p=f[0].toHTML(l);return d[0]&&(p='<span class="math-parenthesis math-round-parenthesis">(</span>'+p+'<span class="math-parenthesis math-round-parenthesis">)</span>'),h==="right"?'<span class="math-operator math-unary-operator math-lefthand-unary-operator">'+ss(this.op)+"</span>"+p:p+'<span class="math-operator math-unary-operator math-righthand-unary-operator">'+ss(this.op)+"</span>"}else if(f.length===2){var m=f[0].toHTML(l),v=f[1].toHTML(l);return d[0]&&(m='<span class="math-parenthesis math-round-parenthesis">(</span>'+m+'<span class="math-parenthesis math-round-parenthesis">)</span>'),d[1]&&(v='<span class="math-parenthesis math-round-parenthesis">(</span>'+v+'<span class="math-parenthesis math-round-parenthesis">)</span>'),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?m+'<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'+v:m+'<span class="math-operator math-binary-operator math-explicit-binary-operator">'+ss(this.op)+"</span>"+v}else{var g=f.map(function(y,_){return y=y.toHTML(l),d[_]&&(y='<span class="math-parenthesis math-round-parenthesis">(</span>'+y+'<span class="math-parenthesis math-round-parenthesis">)</span>'),y});return f.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")?this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?g.join('<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'):g.join('<span class="math-operator math-binary-operator math-explicit-binary-operator">'+ss(this.op)+"</span>"):'<span class="math-function">'+ss(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+g.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'}},i.prototype._toTex=function(l){var c=l&&l.parenthesis?l.parenthesis:"keep",u=l&&l.implicit?l.implicit:"hide",f=this.args,d=o(this,c,u,f,!0),h=C8.operators[this.fn];if(h=typeof h=="undefined"?this.op:h,f.length===1){var p=vt.getAssociativity(this,c),m=f[0].toTex(l);return d[0]&&(m="\\left(".concat(m,"\\right)")),p==="right"?h+m:m+h}else if(f.length===2){var v=f[0],g=v.toTex(l);d[0]&&(g="\\left(".concat(g,"\\right)"));var y=f[1],_=y.toTex(l);d[1]&&(_="\\left(".concat(_,"\\right)"));var w;switch(c==="keep"?w=v.getIdentifier():w=v.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return h+"{"+g+"}{"+_+"}";case"OperatorNode:pow":switch(g="{"+g+"}",_="{"+_+"}",w){case"ConditionalNode":case"OperatorNode:divide":g="\\left(".concat(g,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&u==="hide")return g+"~"+_}return g+h+_}else if(f.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var S=f.map(function(x,b){return x=x.toTex(l),d[b]&&(x="\\left(".concat(x,"\\right)")),x});return this.getIdentifier()==="OperatorNode:multiply"&&this.implicit?S.join("~"):S.join(h)}else return"\\mathrm{"+this.fn+"}\\left("+f.map(function(x){return x.toTex(l)}).join(",")+"\\right)"},i.prototype.getIdentifier=function(){return this.type+":"+this.fn},i}Lc.name="OperatorNode",Lc.path="expression.node",Lc.factory=M8;var Pc={};function $8(t,e,r,n){var a=r(mt);function i(o){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(!t.isNode(o))throw new TypeError('Node expected for parameter "content"');this.content=o}return i.prototype=new a,i.prototype.type="ParenthesisNode",i.prototype.isParenthesisNode=!0,i.prototype._compile=function(o,l){return this.content._compile(o,l)},i.prototype.getContent=function(){return this.content.getContent()},i.prototype.forEach=function(o){o(this.content,"content",this)},i.prototype.map=function(o){var l=o(this.content,"content",this);return new i(l)},i.prototype.clone=function(){return new i(this.content)},i.prototype._toString=function(o){return!o||o&&!o.parenthesis||o&&o.parenthesis==="keep"?"("+this.content.toString(o)+")":this.content.toString(o)},i.prototype.toJSON=function(){return{mathjs:"ParenthesisNode",content:this.content}},i.fromJSON=function(o){return new i(o.content)},i.prototype.toHTML=function(o){return!o||o&&!o.parenthesis||o&&o.parenthesis==="keep"?'<span class="math-parenthesis math-round-parenthesis">(</span>'+this.content.toHTML(o)+'<span class="math-parenthesis math-round-parenthesis">)</span>':this.content.toHTML(o)},i.prototype._toTex=function(o){return!o||o&&!o.parenthesis||o&&o.parenthesis==="keep"?"\\left(".concat(this.content.toTex(o),"\\right)"):this.content.toTex(o)},i}Pc.name="ParenthesisNode",Pc.path="expression.node",Pc.factory=$8;var ls={},Hi={},N8=Da,E8=sr.escape,A8=Lt.hasOwnProperty,Bh=dt.getSafeProperty;function D8(t,e,r,n,a){var i=r(mt);function o(u){return t.Unit?t.Unit.isValuelessUnit(u):!1}function l(u){if(!(this instanceof l))throw new SyntaxError("Constructor must be called with the new operator");if(typeof u!="string")throw new TypeError('String expected for parameter "name"');this.name=u}l.prototype=new i,l.prototype.type="SymbolNode",l.prototype.isSymbolNode=!0,l.prototype._compile=function(u,f){var d=this.name;if(A8(f,d))return function(p,m,v){return m[d]};if(d in u)return function(p,m,v){return d in p?Bh(p,d):Bh(u,d)};var h=o(d);return function(p,m,v){return d in p?Bh(p,d):h?new t.Unit(null,d):c(d)}},l.prototype.forEach=function(u){},l.prototype.map=function(u){return this.clone()};function c(u){throw new Error("Undefined symbol "+u)}return l.prototype.clone=function(){return new l(this.name)},l.prototype._toString=function(u){return this.name},l.prototype.toHTML=function(u){var f=E8(this.name);return f==="true"||f==="false"?'<span class="math-symbol math-boolean">'+f+"</span>":f==="i"?'<span class="math-symbol math-imaginary-symbol">'+f+"</span>":f==="Infinity"?'<span class="math-symbol math-infinity-symbol">'+f+"</span>":f==="NaN"?'<span class="math-symbol math-nan-symbol">'+f+"</span>":f==="null"?'<span class="math-symbol math-null-symbol">'+f+"</span>":f==="undefined"?'<span class="math-symbol math-undefined-symbol">'+f+"</span>":'<span class="math-symbol">'+f+"</span>"},l.prototype.toJSON=function(){return{mathjs:"SymbolNode",name:this.name}},l.fromJSON=function(u){return new l(u.name)},l.prototype._toTex=function(u){var f=!1;typeof a[this.name]=="undefined"&&o(this.name)&&(f=!0);var d=N8.toSymbol(this.name,f);return d[0]==="\\"?d:" "+d},l}Hi.name="SymbolNode",Hi.path="expression.node",Hi.math=!0,Hi.factory=D8;function xn(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xn=function(r){return typeof r}:xn=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},xn(t)}function cs(){return cs=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},cs.apply(this,arguments)}var O8=Da,L8=sr.escape,j1=Lt.hasOwnProperty,Bc=nt.map,P8=dt.validateSafeMethod,us=dt.getSafeProperty;function B8(t,e,r,n,a){var i=r(mt),o=r(Hi);function l(d,h){if(!(this instanceof l))throw new SyntaxError("Constructor must be called with the new operator");if(typeof d=="string"&&(d=new o(d)),!t.isNode(d))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(h)||!h.every(t.isNode))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=d,this.args=h||[],Object.defineProperty(this,"name",{get:function(){return this.fn.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}});var p=function(){throw new Error("Property `FunctionNode.object` is deprecated, use `FunctionNode.fn` instead")};Object.defineProperty(this,"object",{get:p,set:p})}l.prototype=new i,l.prototype.type="FunctionNode",l.prototype.isFunctionNode=!0,l.prototype._compile=function(d,h){if(!(this instanceof l))throw new TypeError("No valid FunctionNode");var p=Bc(this.args,function(N){return N._compile(d,h)});if(t.isSymbolNode(this.fn)){var m=this.fn.name,v=m in d?us(d,m):void 0,g=typeof v=="function"&&v.rawArgs===!0;if(g){var y=this.args;return function(A,L,M){return(m in A?us(A,m):v)(y,d,cs({},A,L))}}else if(p.length===1){var _=p[0];return function(A,L,M){return(m in A?us(A,m):v)(_(A,L,M))}}else if(p.length===2){var w=p[0],S=p[1];return function(A,L,M){return(m in A?us(A,m):v)(w(A,L,M),S(A,L,M))}}else return function(A,L,M){return(m in A?us(A,m):v).apply(null,Bc(p,function(O){return O(A,L,M)}))}}else if(t.isAccessorNode(this.fn)&&t.isIndexNode(this.fn.index)&&this.fn.index.isObjectProperty()){var x=this.fn.object._compile(d,h),b=this.fn.index.getObjectProperty(),C=this.args;return function(A,L,M){var O=x(A,L,M);P8(O,b);var T=O[b]&&O[b].rawArgs;return T?O[b](C,d,cs({},A,L)):O[b].apply(O,Bc(p,function(E){return E(A,L,M)}))}}else{var k=this.fn._compile(d,h),$=this.args;return function(A,L,M){var O=k(A,L,M),T=O&&O.rawArgs;return T?O($,d,cs({},A,L)):O.apply(O,Bc(p,function(E){return E(A,L,M)}))}}},l.prototype.forEach=function(d){d(this.fn,"fn",this);for(var h=0;h<this.args.length;h++)d(this.args[h],"args["+h+"]",this)},l.prototype.map=function(d){for(var h=this._ifNode(d(this.fn,"fn",this)),p=[],m=0;m<this.args.length;m++)p[m]=this._ifNode(d(this.args[m],"args["+m+"]",this));return new l(h,p)},l.prototype.clone=function(){return new l(this.fn,this.args.slice(0))};var c=l.prototype.toString;l.prototype.toString=function(d){var h,p=this.fn.toString(d);return d&&xn(d.handler)==="object"&&j1(d.handler,p)&&(h=d.handler[p](this,d)),typeof h!="undefined"?h:c.call(this,d)},l.prototype._toString=function(d){var h=this.args.map(function(m){return m.toString(d)}),p=t.isFunctionAssignmentNode(this.fn)?"("+this.fn.toString(d)+")":this.fn.toString(d);return p+"("+h.join(", ")+")"},l.prototype.toJSON=function(){return{mathjs:"FunctionNode",fn:this.fn,args:this.args}},l.fromJSON=function(d){return new l(d.fn,d.args)},l.prototype.toHTML=function(d){var h=this.args.map(function(p){return p.toHTML(d)});return'<span class="math-function">'+L8(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+h.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'};function u(d,h,p){for(var m="",v=new RegExp("\\$(?:\\{([a-z_][a-z_0-9]*)(?:\\[([0-9]+)\\])?\\}|\\$)","ig"),g=0,y;(y=v.exec(d))!==null;)if(m+=d.substring(g,y.index),g=y.index,y[0]==="$$")m+="$",g++;else{g+=y[0].length;var _=h[y[1]];if(!_)throw new ReferenceError("Template: Property "+y[1]+" does not exist.");if(y[2]===void 0)switch(xn(_)){case"string":m+=_;break;case"object":if(t.isNode(_))m+=_.toTex(p);else if(Array.isArray(_))m+=_.map(function(w,S){if(t.isNode(w))return w.toTex(p);throw new TypeError("Template: "+y[1]+"["+S+"] is not a Node.")}).join(",");else throw new TypeError("Template: "+y[1]+" has to be a Node, String or array of Nodes");break;default:throw new TypeError("Template: "+y[1]+" has to be a Node, String or array of Nodes")}else if(t.isNode(_[y[2]]&&_[y[2]]))m+=_[y[2]].toTex(p);else throw new TypeError("Template: "+y[1]+"["+y[2]+"] is not a Node.")}return m+=d.slice(g),m}var f=l.prototype.toTex;return l.prototype.toTex=function(d){var h;return d&&xn(d.handler)==="object"&&j1(d.handler,this.name)&&(h=d.handler[this.name](this,d)),typeof h!="undefined"?h:f.call(this,d)},l.prototype._toTex=function(d){var h=this.args.map(function(v){return v.toTex(d)}),p;a[this.name]&&(typeof a[this.name].toTex=="function"||xn(a[this.name].toTex)==="object"||typeof a[this.name].toTex=="string")&&(p=a[this.name].toTex);var m;switch(xn(p)){case"function":m=p(this,d);break;case"string":m=u(p,this,d);break;case"object":switch(xn(p[h.length])){case"function":m=p[h.length](this,d);break;case"string":m=u(p[h.length],this,d);break}}return typeof m!="undefined"?m:u(O8.defaultTemplate,this,d)},l.prototype.getIdentifier=function(){return this.type+":"+this.name},l}ls.name="FunctionNode",ls.path="expression.node",ls.math=!0,ls.factory=B8;var Ic={},Rc=Zr;function I8(t,e,r,n){var a=r(mt);function i(l,c,u){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(!t.isNode(l))throw new TypeError("Node expected");if(!t.isNode(c))throw new TypeError("Node expected");if(u&&!t.isNode(u))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=l,this.end=c,this.step=u||null}i.prototype=new a,i.prototype.type="RangeNode",i.prototype.isRangeNode=!0,i.prototype.needsEnd=function(){var l=this.filter(function(c){return t.isSymbolNode(c)&&c.name==="end"});return l.length>0},i.prototype._compile=function(l,c){var u=l.range,f=this.start._compile(l,c),d=this.end._compile(l,c);if(this.step){var h=this.step._compile(l,c);return function(m,v,g){return u(f(m,v,g),d(m,v,g),h(m,v,g))}}else return function(m,v,g){return u(f(m,v,g),d(m,v,g))}},i.prototype.forEach=function(l){l(this.start,"start",this),l(this.end,"end",this),this.step&&l(this.step,"step",this)},i.prototype.map=function(l){return new i(this._ifNode(l(this.start,"start",this)),this._ifNode(l(this.end,"end",this)),this.step&&this._ifNode(l(this.step,"step",this)))},i.prototype.clone=function(){return new i(this.start,this.end,this.step&&this.step)};function o(l,c){var u=Rc.getPrecedence(l,c),f={},d=Rc.getPrecedence(l.start,c);if(f.start=d!==null&&d<=u||c==="all",l.step){var h=Rc.getPrecedence(l.step,c);f.step=h!==null&&h<=u||c==="all"}var p=Rc.getPrecedence(l.end,c);return f.end=p!==null&&p<=u||c==="all",f}return i.prototype._toString=function(l){var c=l&&l.parenthesis?l.parenthesis:"keep",u=o(this,c),f,d=this.start.toString(l);if(u.start&&(d="("+d+")"),f=d,this.step){var h=this.step.toString(l);u.step&&(h="("+h+")"),f+=":"+h}var p=this.end.toString(l);return u.end&&(p="("+p+")"),f+=":"+p,f},i.prototype.toJSON=function(){return{mathjs:"RangeNode",start:this.start,end:this.end,step:this.step}},i.fromJSON=function(l){return new i(l.start,l.end,l.step)},i.prototype.toHTML=function(l){var c=l&&l.parenthesis?l.parenthesis:"keep",u=o(this,c),f,d=this.start.toHTML(l);if(u.start&&(d='<span class="math-parenthesis math-round-parenthesis">(</span>'+d+'<span class="math-parenthesis math-round-parenthesis">)</span>'),f=d,this.step){var h=this.step.toHTML(l);u.step&&(h='<span class="math-parenthesis math-round-parenthesis">(</span>'+h+'<span class="math-parenthesis math-round-parenthesis">)</span>'),f+='<span class="math-operator math-range-operator">:</span>'+h}var p=this.end.toHTML(l);return u.end&&(p='<span class="math-parenthesis math-round-parenthesis">(</span>'+p+'<span class="math-parenthesis math-round-parenthesis">)</span>'),f+='<span class="math-operator math-range-operator">:</span>'+p,f},i.prototype._toTex=function(l){var c=l&&l.parenthesis?l.parenthesis:"keep",u=o(this,c),f=this.start.toTex(l);if(u.start&&(f="\\left(".concat(f,"\\right)")),this.step){var d=this.step.toTex(l);u.step&&(d="\\left(".concat(d,"\\right)")),f+=":"+d}var h=this.end.toTex(l);return u.end&&(h="\\left(".concat(h,"\\right)")),f+=":"+h,f},i}Ic.name="RangeNode",Ic.path="expression.node",Ic.factory=I8;var Vc={},Ui=Zr,R8=Da,V8=sr.escape;function F8(t,e,r,n){var a=r(mt),i=dt.getSafeProperty;function o(l,c){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(l))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(c))throw new TypeError("Parameter params must be an array");if(l.length!==c.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=l,this.params=c}return o.prototype=new a,o.prototype.type="RelationalNode",o.prototype.isRelationalNode=!0,o.prototype._compile=function(l,c){var u=this,f=this.params.map(function(d){return d._compile(l,c)});return function(h,p,m){for(var v,g=f[0](h,p,m),y=0;y<u.conditionals.length;y++){v=g,g=f[y+1](h,p,m);var _=i(l,u.conditionals[y]);if(!_(v,g))return!1}return!0}},o.prototype.forEach=function(l){var c=this;this.params.forEach(function(u,f){return l(u,"params["+f+"]",c)},this)},o.prototype.map=function(l){var c=this;return new o(this.conditionals.slice(),this.params.map(function(u,f){return c._ifNode(l(u,"params["+f+"]",c))},this))},o.prototype.clone=function(){return new o(this.conditionals,this.params)},o.prototype._toString=function(l){for(var c=l&&l.parenthesis?l.parenthesis:"keep",u=Ui.getPrecedence(this,c),f=this.params.map(function(m,v){var g=Ui.getPrecedence(m,c);return c==="all"||g!==null&&g<=u?"("+m.toString(l)+")":m.toString(l)}),d={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},h=f[0],p=0;p<this.conditionals.length;p++)h+=" "+d[this.conditionals[p]]+" "+f[p+1];return h},o.prototype.toJSON=function(){return{mathjs:"RelationalNode",conditionals:this.conditionals,params:this.params}},o.fromJSON=function(l){return new o(l.conditionals,l.params)},o.prototype.toHTML=function(l){for(var c=l&&l.parenthesis?l.parenthesis:"keep",u=Ui.getPrecedence(this,c),f=this.params.map(function(m,v){var g=Ui.getPrecedence(m,c);return c==="all"||g!==null&&g<=u?'<span class="math-parenthesis math-round-parenthesis">(</span>'+m.toHTML(l)+'<span class="math-parenthesis math-round-parenthesis">)</span>':m.toHTML(l)}),d={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},h=f[0],p=0;p<this.conditionals.length;p++)h+='<span class="math-operator math-binary-operator math-explicit-binary-operator">'+V8(d[this.conditionals[p]])+"</span>"+f[p+1];return h},o.prototype._toTex=function(l){for(var c=l&&l.parenthesis?l.parenthesis:"keep",u=Ui.getPrecedence(this,c),f=this.params.map(function(p,m){var v=Ui.getPrecedence(p,c);return c==="all"||v!==null&&v<=u?"\\left("+p.toTex(l)+"\right)":p.toTex(l)}),d=f[0],h=0;h<this.conditionals.length;h++)d+=R8.operators[this.conditionals[h]]+f[h+1];return d},o}Vc.name="RelationalNode",Vc.path="expression.node",Vc.factory=F8;function Zn(){return Zn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Zn.apply(this,arguments)}var z8=k1,H8=Vi;function U8(t,e,r,n){var a=r(fc),i=r(hc),o=r(wc),l=r(bc),c=r(Cc),u=r(Tc),f=r(Mc),d=r($c),h=r(Nc),p=r(Ac),m=r(Lc),v=r(Pc),g=r(ls),y=r(Ic),_=r(Vc),w=r(Hi);function S(B,U){if(arguments.length!==1&&arguments.length!==2)throw new z8("parse",arguments.length,1,2);var X=U&&U.nodes?U.nodes:{};if(typeof B=="string")return V(B,X);if(Array.isArray(B)||B instanceof t.Matrix)return H8(B,function(ie){if(typeof ie!="string")throw new TypeError("String expected");return V(ie,X)});throw new TypeError("String or matrix expected")}var x={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},b={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},C={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},k={true:!0,false:!1,null:null,undefined:void 0},$=["NaN","Infinity"];function N(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:x.NULL,nestingLevel:0,conditionalLevel:null}}function A(B,U){return B.expression.substr(B.index,U)}function L(B){return A(B,1)}function M(B){B.index++}function O(B){return B.expression.charAt(B.index-1)}function T(B){return B.expression.charAt(B.index+1)}function E(B){for(B.tokenType=x.NULL,B.token="",B.comment="";S.isWhitespace(L(B),B.nestingLevel);)M(B);if(L(B)==="#")for(;L(B)!==`
12
+ `&&L(B)!=="";)B.comment+=L(B),M(B);if(L(B)===""){B.tokenType=x.DELIMITER;return}if(L(B)===`
13
+ `&&!B.nestingLevel){B.tokenType=x.DELIMITER,B.token=L(B),M(B);return}var U=L(B),X=A(B,2),ie=A(B,3);if(ie.length===3&&b[ie]){B.tokenType=x.DELIMITER,B.token=ie,M(B),M(B),M(B);return}if(X.length===2&&b[X]){B.tokenType=x.DELIMITER,B.token=X,M(B),M(B);return}if(b[U]){B.tokenType=x.DELIMITER,B.token=U,M(B);return}if(S.isDigitDot(U)){if(B.tokenType=x.NUMBER,L(B)===".")B.token+=L(B),M(B),S.isDigit(L(B))||(B.tokenType=x.DELIMITER);else{for(;S.isDigit(L(B));)B.token+=L(B),M(B);S.isDecimalMark(L(B),T(B))&&(B.token+=L(B),M(B))}for(;S.isDigit(L(B));)B.token+=L(B),M(B);if(L(B)==="E"||L(B)==="e"){if(S.isDigit(T(B))||T(B)==="-"||T(B)==="+"){if(B.token+=L(B),M(B),(L(B)==="+"||L(B)==="-")&&(B.token+=L(B),M(B)),!S.isDigit(L(B)))throw st(B,'Digit expected, got "'+L(B)+'"');for(;S.isDigit(L(B));)B.token+=L(B),M(B);if(S.isDecimalMark(L(B),T(B)))throw st(B,'Digit expected, got "'+L(B)+'"')}else if(T(B)===".")throw M(B),st(B,'Digit expected, got "'+L(B)+'"')}return}if(S.isAlpha(L(B),O(B),T(B))){for(;S.isAlpha(L(B),O(B),T(B))||S.isDigit(L(B));)B.token+=L(B),M(B);C.hasOwnProperty(B.token)?B.tokenType=x.DELIMITER:B.tokenType=x.SYMBOL;return}for(B.tokenType=x.UNKNOWN;L(B)!=="";)B.token+=L(B),M(B);throw st(B,'Syntax error in part "'+B.token+'"')}function D(B){do E(B);while(B.token===`
14
+ `)}function P(B){B.nestingLevel++}function I(B){B.nestingLevel--}S.isAlpha=function(U,X,ie){return S.isValidLatinOrGreek(U)||S.isValidMathSymbol(U,ie)||S.isValidMathSymbol(X,U)},S.isValidLatinOrGreek=function(U){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(U)},S.isValidMathSymbol=function(U,X){return/^[\uD835]$/.test(U)&&/^[\uDC00-\uDFFF]$/.test(X)&&/^[^\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]$/.test(X)},S.isWhitespace=function(U,X){return U===" "||U===" "||U===`
15
+ `&&X>0},S.isDecimalMark=function(U,X){return U==="."&&X!=="/"&&X!=="*"&&X!=="^"},S.isDigitDot=function(U){return U>="0"&&U<="9"||U==="."},S.isDigit=function(U){return U>="0"&&U<="9"};function V(B,U){var X=N();Zn(X,{expression:B,extraNodes:U}),E(X);var ie=F(X);if(X.token!=="")throw X.tokenType===x.DELIMITER?vd(X,"Unexpected operator "+X.token):st(X,'Unexpected part "'+X.token+'"');return ie}function F(B){var U,X=[],ie;for(B.token!==""&&B.token!==`
16
+ `&&B.token!==";"&&(U=H(B),U.comment=B.comment);B.token===`
17
+ `||B.token===";";)X.length===0&&U&&(ie=B.token!==";",X.push({node:U,visible:ie})),E(B),B.token!==`
18
+ `&&B.token!==";"&&B.token!==""&&(U=H(B),U.comment=B.comment,ie=B.token!==";",X.push({node:U,visible:ie}));return X.length>0?new c(X):(U||(U=new f(void 0),U.comment=B.comment),U)}function H(B){var U,X,ie,Ie,Ve=Y(B);if(B.token==="="){if(t.isSymbolNode(Ve))return U=Ve.name,D(B),ie=H(B),new l(new w(U),ie);if(t.isAccessorNode(Ve))return D(B),ie=H(B),new l(Ve.object,Ve.index,ie);if(t.isFunctionNode(Ve)&&t.isSymbolNode(Ve.fn)&&(Ie=!0,X=[],U=Ve.name,Ve.args.forEach(function(Ft,h0){t.isSymbolNode(Ft)?X[h0]=Ft.name:Ie=!1}),Ie))return D(B),ie=H(B),new d(U,X,ie);throw st(B,"Invalid left hand side of assignment operator =")}return Ve}function Y(B){for(var U=Q(B);B.token==="?";){var X=B.conditionalLevel;B.conditionalLevel=B.nestingLevel,D(B);var ie=U,Ie=H(B);if(B.token!==":")throw st(B,"False part of conditional expression expected");B.conditionalLevel=null,D(B);var Ve=H(B);U=new u(ie,Ie,Ve),B.conditionalLevel=X}return U}function Q(B){for(var U=ae(B);B.token==="or";)D(B),U=new m("or","or",[U,ae(B)]);return U}function ae(B){for(var U=le(B);B.token==="xor";)D(B),U=new m("xor","xor",[U,le(B)]);return U}function le(B){for(var U=ye(B);B.token==="and";)D(B),U=new m("and","and",[U,ye(B)]);return U}function ye(B){for(var U=de(B);B.token==="|";)D(B),U=new m("|","bitOr",[U,de(B)]);return U}function de(B){for(var U=Z(B);B.token==="^|";)D(B),U=new m("^|","bitXor",[U,Z(B)]);return U}function Z(B){for(var U=K(B);B.token==="&";)D(B),U=new m("&","bitAnd",[U,K(B)]);return U}function K(B){for(var U=[J(B)],X=[],ie={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};ie.hasOwnProperty(B.token);){var Ie={name:B.token,fn:ie[B.token]};X.push(Ie),D(B),U.push(J(B))}return U.length===1?U[0]:U.length===2?new m(X[0].name,X[0].fn,U):new _(X.map(function(Ve){return Ve.fn}),U)}function J(B){var U,X,ie,Ie,Ve;for(U=oe(B),X={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};X.hasOwnProperty(B.token);)ie=B.token,Ie=X[ie],D(B),Ve=[U,oe(B)],U=new m(ie,Ie,Ve);return U}function oe(B){var U,X,ie,Ie,Ve;for(U=Ce(B),X={to:"to",in:"to"};X.hasOwnProperty(B.token);)ie=B.token,Ie=X[ie],D(B),ie==="in"&&B.token===""?U=new m("*","multiply",[U,new w("in")],!0):(Ve=[U,Ce(B)],U=new m(ie,Ie,Ve));return U}function Ce(B){var U,X=[];if(B.token===":"?U=new f(1):U=Se(B),B.token===":"&&B.conditionalLevel!==B.nestingLevel){for(X.push(U);B.token===":"&&X.length<3;)D(B),B.token===")"||B.token==="]"||B.token===","||B.token===""?X.push(new w("end")):X.push(Se(B));X.length===3?U=new y(X[0],X[2],X[1]):U=new y(X[0],X[1])}return U}function Se(B){var U,X,ie,Ie,Ve;for(U=$e(B),X={"+":"add","-":"subtract"};X.hasOwnProperty(B.token);)ie=B.token,Ie=X[ie],D(B),Ve=[U,$e(B)],U=new m(ie,Ie,Ve);return U}function $e(B){var U,X,ie,Ie,Ve;for(U=ge(B),X=U,ie={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide","%":"mod",mod:"mod"};ie.hasOwnProperty(B.token);)Ie=B.token,Ve=ie[Ie],D(B),X=ge(B),U=new m(Ie,Ve,[U,X]);return U}function ge(B){var U,X;for(U=Qe(B),X=U;B.tokenType===x.SYMBOL||B.token==="in"&&t.isConstantNode(U)||B.tokenType===x.NUMBER&&!t.isConstantNode(X)&&(!t.isOperatorNode(X)||X.op==="!")||B.token==="(";)X=Qe(B),U=new m("*","multiply",[U,X],!0);return U}function Qe(B){for(var U=ot(B),X=U,ie=[];B.token==="/"&&t.isConstantNode(X);)if(ie.push(Zn({},B)),D(B),B.tokenType===x.NUMBER)if(ie.push(Zn({},B)),D(B),B.tokenType===x.SYMBOL||B.token==="(")Zn(B,ie.pop()),ie.pop(),X=ot(B),U=new m("/","divide",[U,X]);else{ie.pop(),Zn(B,ie.pop());break}else{Zn(B,ie.pop());break}return U}function ot(B){var U,X,ie,Ie={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Ie.hasOwnProperty(B.token)?(ie=Ie[B.token],U=B.token,D(B),X=[ot(B)],new m(U,ie,X)):j(B)}function j(B){var U,X,ie,Ie;return U=W(B),(B.token==="^"||B.token===".^")&&(X=B.token,ie=X==="^"?"pow":"dotPow",D(B),Ie=[U,ot(B)],U=new m(X,ie,Ie)),U}function W(B){var U,X,ie,Ie,Ve;for(U=q(B),X={"!":"factorial","'":"ctranspose"};X.hasOwnProperty(B.token);)ie=B.token,Ie=X[ie],E(B),Ve=[U],U=new m(ie,Ie,Ve),U=ue(B,U);return U}function q(B){var U=[];if(B.tokenType===x.SYMBOL&&B.extraNodes.hasOwnProperty(B.token)){var X=B.extraNodes[B.token];if(E(B),B.token==="("){if(U=[],P(B),E(B),B.token!==")")for(U.push(H(B));B.token===",";)E(B),U.push(H(B));if(B.token!==")")throw st(B,"Parenthesis ) expected");I(B),E(B)}return new X(U)}return G(B)}function G(B){var U,X;return B.tokenType===x.SYMBOL||B.tokenType===x.DELIMITER&&B.token in C?(X=B.token,E(B),k.hasOwnProperty(X)?U=new f(k[X]):$.indexOf(X)!==-1?U=new f(a(X,"number")):U=new w(X),U=ue(B,U),U):be(B)}function ue(B,U,X){for(var ie;(B.token==="("||B.token==="["||B.token===".")&&(!X||X.indexOf(B.token)!==-1);)if(ie=[],B.token==="(")if(t.isSymbolNode(U)||t.isAccessorNode(U)){if(P(B),E(B),B.token!==")")for(ie.push(H(B));B.token===",";)E(B),ie.push(H(B));if(B.token!==")")throw st(B,"Parenthesis ) expected");I(B),E(B),U=new g(U,ie)}else return U;else if(B.token==="["){if(P(B),E(B),B.token!=="]")for(ie.push(H(B));B.token===",";)E(B),ie.push(H(B));if(B.token!=="]")throw st(B,"Parenthesis ] expected");I(B),E(B),U=new i(U,new h(ie))}else{if(E(B),B.tokenType!==x.SYMBOL)throw st(B,"Property name expected after dot");ie.push(new f(B.token)),E(B);var Ie=!0;U=new i(U,new h(ie,Ie))}return U}function be(B){var U,X;return B.token==='"'?(X=ke(B),U=new f(X),U=ue(B,U),U):we(B)}function ke(B){for(var U="";L(B)!==""&&L(B)!=='"';)L(B)==="\\"&&(U+=L(B),M(B)),U+=L(B),M(B);if(E(B),B.token!=='"')throw st(B,'End of string " expected');return E(B),JSON.parse('"'+U+'"')}function we(B){var U,X;return B.token==="'"?(X=pe(B),U=new f(X),U=ue(B,U),U):De(B)}function pe(B){for(var U="";L(B)!==""&&L(B)!=="'";)L(B)==="\\"&&(U+=L(B),M(B)),U+=L(B),M(B);if(E(B),B.token!=="'")throw st(B,"End of string ' expected");return E(B),JSON.parse('"'+U+'"')}function De(B){var U,X,ie,Ie;if(B.token==="["){if(P(B),E(B),B.token!=="]"){var Ve=Vt(B);if(B.token===";"){for(ie=1,X=[Ve];B.token===";";)E(B),X[ie]=Vt(B),ie++;if(B.token!=="]")throw st(B,"End of matrix ] expected");I(B),E(B),Ie=X[0].items.length;for(var Ft=1;Ft<ie;Ft++)if(X[Ft].items.length!==Ie)throw vd(B,"Column dimensions mismatch ("+X[Ft].items.length+" !== "+Ie+")");U=new o(X)}else{if(B.token!=="]")throw st(B,"End of matrix ] expected");I(B),E(B),U=Ve}}else I(B),E(B),U=new o([]);return ue(B,U)}return ir(B)}function Vt(B){for(var U=[H(B)],X=1;B.token===",";)E(B),U[X]=H(B),X++;return new o(U)}function ir(B){if(B.token==="{"){P(B);var U,X={};do if(E(B),B.token!=="}"){if(B.token==='"')U=ke(B);else if(B.token==="'")U=pe(B);else if(B.tokenType===x.SYMBOL)U=B.token,E(B);else throw st(B,"Symbol or string expected as object key");if(B.token!==":")throw st(B,"Colon : expected after object key");E(B),X[U]=H(B)}while(B.token===",");if(B.token!=="}")throw st(B,"Comma , or bracket } expected after object value");I(B),E(B);var ie=new p(X);return ie=ue(B,ie),ie}return Mr(B)}function Mr(B){var U;return B.tokenType===x.NUMBER?(U=B.token,E(B),new f(a(U,e.number))):Bl(B)}function Bl(B){var U;if(B.token==="("){if(P(B),E(B),U=H(B),B.token!==")")throw st(B,"Parenthesis ) expected");return I(B),E(B),U=new v(U),U=ue(B,U),U}return d0(B)}function d0(B){throw B.token===""?st(B,"Unexpected end of expression"):st(B,"Value expected")}function md(B){return B.index-B.token.length+1}function st(B,U){var X=md(B),ie=new SyntaxError(U+" (char "+X+")");return ie.char=X,ie}function vd(B,U){var X=md(B),ie=new SyntaxError(U+" (char "+X+")");return ie.char=X,ie}return S}Ri.name="parse",Ri.path="expression",Ri.factory=U8;function j8(t,e,r,n){var a=r(Ri);return n("parse",{"string | Array | Matrix":a,"string | Array | Matrix, Object":a})}bh.name="parse",bh.factory=j8;var Ih={},Y8=Vi;function G8(t,e,r,n){var a=r(Ri);return n("compile",{string:function(o){return a(o).compile()},"Array | Matrix":function(o){return Y8(o,function(l){return a(l).compile()})}})}Ih.name="compile",Ih.factory=G8;var Rh={},Y1=Vi;function W8(t,e,r,n){var a=r(Ri);return n("compile",{string:function(o){var l={};return a(o).compile().eval(l)},"string, Object":function(o,l){return a(o).compile().eval(l)},"Array | Matrix":function(o){var l={};return Y1(o,function(c){return a(c).compile().eval(l)})},"Array | Matrix, Object":function(o,l){return Y1(o,function(c){return a(c).compile().eval(l)})}})}Rh.name="eval",Rh.factory=W8;var Vh={},G1=sr;function Z8(t,e,r,n){var a=n("format",{any:G1.format,"any, Object | function | number":G1.format});return a.toTex=void 0,a}Vh.name="format",Vh.factory=Z8;var q8=t6,Oa=q8.create();Oa.import(bh),Oa.import(Ih),Oa.import(Rh),Oa.import(Vh),Oa.import({add:function(t,e){return t+e},subtract:function(t,e){return t-e},multiply:function(t,e){return t*e},divide:function(t,e){return e===0?0:t/e},mod:function(t,e){return t%e},unaryPlus:function(t){return t},unaryMinus:function(t){return-t},bitOr:function(t,e){return t|e},bitXor:function(t,e){return t^e},bitAnd:function(t,e){return t&e},bitNot:function(t){return~t},leftShift:function(t,e){return t<<e},rightArithShift:function(t,e){return t>>e},rightLogShift:function(t,e){return t>>>e},or:function(t,e){return!!(t||e)},xor:function(t,e){return!!t!=!!e},and:function(t,e){return!!(t&&e)},not:function(t){return!t},equal:function(t,e){return t==e},unequal:function(t,e){return t!=e},smaller:function(t,e){return t<e},larger:function(t,e){return t>e},smallerEq:function(t,e){return t<=e},largerEq:function(t,e){return t>=e},matrix:function(){throw new Error("Matrices not supported")},index:function(){throw new Error("Matrix indexes not supported")},pi:Math.PI,e:Math.E,true:!0,false:!1,null:null});var W1={};Object.getOwnPropertyNames(Math).forEach(function(t){Object.prototype.hasOwnProperty(t)||(W1[t]=Math[t])}),Oa.import(W1);var X8=Oa;const Tt=(t,e)=>{try{return X8.eval(t,e)}catch{return 0}},ji=(t,e)=>t.replace(/\b([a-z_][a-z0-9_]*)\b/gi,"$1"+e),K8={class:"mega-header-widget"},J8=s.defineComponent({setup(t){const e=s.inject("cubeState"),r=s.inject("currentState"),n=s.inject("getProps"),a=s.computed(()=>{const g=at(r.cube.measures),y=e.measures;return g.filter(w=>y.includes(w.id)).sort((w,S)=>y.indexOf(w.id)-y.indexOf(S.id))}),i=s.computed(()=>{const g=at(r.cube.dimensions),y=e.splits.map(S=>S.id);return g.filter(S=>y.includes(S.id)).sort((S,x)=>y.indexOf(S.id)-y.indexOf(x.id))}),o=s.computed(()=>Ro(e.range)),l=()=>{const g=["_change","_delta","_pre"],y=i.value.map(S=>{const{id:x,name:b,map:C,kind:k}=S;return{id:C?C.name:x,name:b,kind:k}}),_=a.value.map(S=>({id:S.id,name:S.name})),w=[];return o.value&&_.forEach(S=>{w.push(S),g.forEach(x=>{w.push({id:`${S.id}${x}`,name:`${S.name}${x.toLowerCase()}`})})}),{split:y,measure:o.value?w:_}},c=(g,y)=>y.map(_=>g.map(w=>_[w])),u=()=>r.custom.filter(w=>e.custom_measures.includes(w.id)).sort((w,S)=>e.custom_measures.indexOf(w.id)-e.custom_measures.indexOf(S.id)),f=(g,y)=>g.replace(/\b([a-z_][a-z0-9_]*)\b/gi,"$1"+y),d=g=>g.includes("getWilsonScore"),h=(g,y)=>(g.forEach(_=>{var w;if((_==null?void 0:_.children)&&((w=_==null?void 0:_.children)==null?void 0:w.length)>0)h(_.children,y);else return y.forEach(S=>{if(_[S.id]=Tt(S.formula,_),d(S.formula)){const x=gh(S.formula);x.length!==3?_[S.id]="":_[S.id]=vh(_[x[0]],_[x[1]],Number(x[2]))}else _[S.id]=Tt(S.formula,_);if(o.value&&!d(S.formula)){const x=Tt(S.formula,_),b=Tt(f(S.formula,"_pre"),_);_[`${S.id}_pre`]=b,_[`${S.id}_delta`]=x-b,_[`${S.id}_change`]=b?(x-b)/b:0}}),_}),g),p=s.ref(!1),m=(g,y)=>{var S;const _=new Blob([g],{type:"text/csv;charset=utf-8;"}),w=document.createElement("a");w.style.display="none",w.href=URL.createObjectURL(_),w.download=y,document.body.appendChild(w),w.click(),(S=document.body)==null||S.removeChild(w)},v=()=>{var g;try{p.value=!0;const y=l(),{split:_,measure:w}=y,S=window._mega.data;let x=RI((g=S==null?void 0:S.children)!=null?g:[],_);const b=u(),C=[];b&&b.length>0&&(b.forEach(D=>{C.push({id:D.id,name:D.name}),o.value&&["_change","_delta","_pre"].forEach(I=>{C.push({id:`${D.id}${I}`,name:`${D.name}${I.toLowerCase()}`})})}),x=h(x,b));const k=[..._,...w,...C],$=k.map(D=>D.name),N=k.map(D=>D.id),A=c(N,x),L=[$,...A];let M="";L.forEach(D=>{const P=D;for(let I=0;I<P.length;I++){let F=(P[I]===null?"":P[I].toString()).replace(/"/g,'""');F.search(/("|,|\n)/g)>=0&&(F='"'+F+'"'),I>0&&(M+=","),M+=F}M+=`
19
+ `});const O=[...new Set(e.range.current_time)],T=O.length===1?O[0]:O.join("~"),E=n();(E==null?void 0:E.onBeforeDownload)?E==null||E.onBeforeDownload(M).then(D=>{D&&(m(D,T),p.value=!1)},()=>{p.value=!1}):(m(M,T),p.value=!1)}catch{R.message.error("Export error."),p.value=!1}};return(g,y)=>(s.openBlock(),s.createElementBlock("div",K8,[s.createVNode(s.unref(R.Space),{size:8,onClick:v},{default:s.withCtx(()=>[p.value?(s.openBlock(),s.createBlock(s.unref(R.Spin),{key:0,style:{display:"inline-flex"}})):(s.openBlock(),s.createBlock(s.unref(wN),{key:1}))]),_:1})]))}});var Fh={exports:{}};(function(t){var e=function(){var r=String.fromCharCode,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function o(c,u){if(!i[c]){i[c]={};for(var f=0;f<c.length;f++)i[c][c.charAt(f)]=f}return i[c][u]}var l={compressToBase64:function(c){if(c==null)return"";var u=l._compress(c,6,function(f){return n.charAt(f)});switch(u.length%4){default:case 0:return u;case 1:return u+"===";case 2:return u+"==";case 3:return u+"="}},decompressFromBase64:function(c){return c==null?"":c==""?null:l._decompress(c.length,32,function(u){return o(n,c.charAt(u))})},compressToUTF16:function(c){return c==null?"":l._compress(c,15,function(u){return r(u+32)})+" "},decompressFromUTF16:function(c){return c==null?"":c==""?null:l._decompress(c.length,16384,function(u){return c.charCodeAt(u)-32})},compressToUint8Array:function(c){for(var u=l.compress(c),f=new Uint8Array(u.length*2),d=0,h=u.length;d<h;d++){var p=u.charCodeAt(d);f[d*2]=p>>>8,f[d*2+1]=p%256}return f},decompressFromUint8Array:function(c){if(c==null)return l.decompress(c);for(var u=new Array(c.length/2),f=0,d=u.length;f<d;f++)u[f]=c[f*2]*256+c[f*2+1];var h=[];return u.forEach(function(p){h.push(r(p))}),l.decompress(h.join(""))},compressToEncodedURIComponent:function(c){return c==null?"":l._compress(c,6,function(u){return a.charAt(u)})},decompressFromEncodedURIComponent:function(c){return c==null?"":c==""?null:(c=c.replace(/ /g,"+"),l._decompress(c.length,32,function(u){return o(a,c.charAt(u))}))},compress:function(c){return l._compress(c,16,function(u){return r(u)})},_compress:function(c,u,f){if(c==null)return"";var d,h,p={},m={},v="",g="",y="",_=2,w=3,S=2,x=[],b=0,C=0,k;for(k=0;k<c.length;k+=1)if(v=c.charAt(k),Object.prototype.hasOwnProperty.call(p,v)||(p[v]=w++,m[v]=!0),g=y+v,Object.prototype.hasOwnProperty.call(p,g))y=g;else{if(Object.prototype.hasOwnProperty.call(m,y)){if(y.charCodeAt(0)<256){for(d=0;d<S;d++)b=b<<1,C==u-1?(C=0,x.push(f(b)),b=0):C++;for(h=y.charCodeAt(0),d=0;d<8;d++)b=b<<1|h&1,C==u-1?(C=0,x.push(f(b)),b=0):C++,h=h>>1}else{for(h=1,d=0;d<S;d++)b=b<<1|h,C==u-1?(C=0,x.push(f(b)),b=0):C++,h=0;for(h=y.charCodeAt(0),d=0;d<16;d++)b=b<<1|h&1,C==u-1?(C=0,x.push(f(b)),b=0):C++,h=h>>1}_--,_==0&&(_=Math.pow(2,S),S++),delete m[y]}else for(h=p[y],d=0;d<S;d++)b=b<<1|h&1,C==u-1?(C=0,x.push(f(b)),b=0):C++,h=h>>1;_--,_==0&&(_=Math.pow(2,S),S++),p[g]=w++,y=String(v)}if(y!==""){if(Object.prototype.hasOwnProperty.call(m,y)){if(y.charCodeAt(0)<256){for(d=0;d<S;d++)b=b<<1,C==u-1?(C=0,x.push(f(b)),b=0):C++;for(h=y.charCodeAt(0),d=0;d<8;d++)b=b<<1|h&1,C==u-1?(C=0,x.push(f(b)),b=0):C++,h=h>>1}else{for(h=1,d=0;d<S;d++)b=b<<1|h,C==u-1?(C=0,x.push(f(b)),b=0):C++,h=0;for(h=y.charCodeAt(0),d=0;d<16;d++)b=b<<1|h&1,C==u-1?(C=0,x.push(f(b)),b=0):C++,h=h>>1}_--,_==0&&(_=Math.pow(2,S),S++),delete m[y]}else for(h=p[y],d=0;d<S;d++)b=b<<1|h&1,C==u-1?(C=0,x.push(f(b)),b=0):C++,h=h>>1;_--,_==0&&(_=Math.pow(2,S),S++)}for(h=2,d=0;d<S;d++)b=b<<1|h&1,C==u-1?(C=0,x.push(f(b)),b=0):C++,h=h>>1;for(;;)if(b=b<<1,C==u-1){x.push(f(b));break}else C++;return x.join("")},decompress:function(c){return c==null?"":c==""?null:l._decompress(c.length,32768,function(u){return c.charCodeAt(u)})},_decompress:function(c,u,f){var d=[],h=4,p=4,m=3,v="",g=[],y,_,w,S,x,b,C,k={val:f(0),position:u,index:1};for(y=0;y<3;y+=1)d[y]=y;for(w=0,x=Math.pow(2,2),b=1;b!=x;)S=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=f(k.index++)),w|=(S>0?1:0)*b,b<<=1;switch(w){case 0:for(w=0,x=Math.pow(2,8),b=1;b!=x;)S=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=f(k.index++)),w|=(S>0?1:0)*b,b<<=1;C=r(w);break;case 1:for(w=0,x=Math.pow(2,16),b=1;b!=x;)S=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=f(k.index++)),w|=(S>0?1:0)*b,b<<=1;C=r(w);break;case 2:return""}for(d[3]=C,_=C,g.push(C);;){if(k.index>c)return"";for(w=0,x=Math.pow(2,m),b=1;b!=x;)S=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=f(k.index++)),w|=(S>0?1:0)*b,b<<=1;switch(C=w){case 0:for(w=0,x=Math.pow(2,8),b=1;b!=x;)S=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=f(k.index++)),w|=(S>0?1:0)*b,b<<=1;d[p++]=r(w),C=p-1,h--;break;case 1:for(w=0,x=Math.pow(2,16),b=1;b!=x;)S=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=f(k.index++)),w|=(S>0?1:0)*b,b<<=1;d[p++]=r(w),C=p-1,h--;break;case 2:return g.join("")}if(h==0&&(h=Math.pow(2,m),m++),d[C])v=d[C];else if(C===p)v=_+_.charAt(0);else return null;g.push(v),d[p++]=_+v.charAt(0),h--,_=v,h==0&&(h=Math.pow(2,m),m++)}}};return l}();t!=null&&(t.exports=e)})(Fh);const qn=t=>Fh.exports.compressToEncodedURIComponent(JSON.stringify(t)),zh=t=>{try{const e=JSON.parse(Fh.exports.decompressFromEncodedURIComponent(t));return!e||e.constructor!==Object?null:e}catch{return null}},Z1=(t,e)=>{var w;const r=zh(t);if(!r)return null;const{id:n,range:a,timezone:i,visual:o,expired_time:l,filters:c,splits:u,measures:f,custom_measures:d,config_measures:h}=r,p=Array.isArray(e)?e.find(S=>S.id===n):e;if(!p)return null;const m=new Set(at(p.dimensions).map(S=>S.id)),v=new Set(at(p.measures).concat((w=p.custom_measures)!=null?w:[]).concat(h!=null?h:[]).map(S=>S.id)),g=(c==null?void 0:c.filter(S=>m.has(S.id)))||[],y=(u==null?void 0:u.filter(S=>m.has(S.id)))||[],_=(f==null?void 0:f.filter(S=>v.has(S)))||[];return{id:n,cube:p,filters:g,measures:_,splits:y,range:a,timezone:i,visual:o,expired_time:l,custom_measures:d!=null?d:[],config_measures:h!=null?h:[]}},Q8={class:"mega-header-widget"},e7=s.defineComponent({setup(t){const e=s.inject("dataConfig"),r=s.inject("cubeState"),n=s.inject("currentState"),a=s.inject("dashboardState"),i=s.computed(()=>e.layout.type==="cube"),o=()=>{var u;let l="",c;if(e.expired&&(c=fe().add(e.expired,"days").valueOf()),i.value){const f=Object.assign({},r);if(c&&(f.expired_time=c),((u=r==null?void 0:r.custom_measures)==null?void 0:u.length)>0){const d=n.cube.custom_measures.filter(h=>r==null?void 0:r.custom_measures.includes(h.id));f.config_measures=d}l=qn(f)}else{const{filters:f,range:d,timezone:h,measures:p}=a;l=qn({dashboard:n.dashboard,extraParams:{filters:f,range:d,timezone:h,measures:p}})}ce.emit("report-share",{hashParams:l,type:e.layout.type})};return(l,c)=>(s.openBlock(),s.createElementBlock("div",Q8,[s.createVNode(s.unref(R.Space),{size:8,onClick:o},{default:s.withCtx(()=>[s.createVNode(s.unref(dN))]),_:1})]))}}),t7={class:"vis-total-container vis-inner"},r7={class:"vis-total-item__title"},n7={key:0,class:"remove"},a7={class:"vis-total-item__content"},i7={key:0,class:"vis-total-item__footer"},o7={class:"vis-total-item__pre"},s7={class:"vis-total-item__data"},l7=s.defineComponent({props:{originData:{type:Object,default:null},selectedMeasures:{type:Array,default:null},isCompare:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},currentVisState:{type:Object,default:null},isPush:{type:Boolean,default:!1}},emits:["onRemoveMeasure"],setup(t,{emit:e}){const r=t,n=a=>{const i=r.currentVisState.measures.findIndex(o=>o===a);i!==-1&&e("onRemoveMeasure",i)};return(a,i)=>(s.openBlock(),s.createElementBlock("div",t7,[t.originData?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["vis-total-inner vis-height",{"is-push":t.isPush}])},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.selectedMeasures,o=>{var l;return s.openBlock(),s.createElementBlock("div",{class:"vis-total-item",key:o.id,style:s.normalizeStyle({width:t.isPush&&((l=t.selectedMeasures)==null?void 0:l.length)>0?`${100/t.selectedMeasures.length}%`:"auto"})},[s.createElementVNode("div",r7,[s.createElementVNode("span",null,s.toDisplayString(o.name),1),!t.isReadonly&&!t.isPush?(s.openBlock(),s.createElementBlock("span",n7,[s.createVNode(s.unref(Po),{onClick:c=>n(o.id)},null,8,["onClick"])])):s.createCommentVNode("",!0)]),s.createElementVNode("div",a7,s.toDisplayString(s.unref(Oe)(t.originData[o.id],o.format)),1),t.isCompare?(s.openBlock(),s.createElementBlock("div",i7,[s.createElementVNode("span",o7,s.toDisplayString(s.unref(Oe)(t.originData[`${o.id}_pre`],o.format)),1),s.createElementVNode("div",s7,[s.createElementVNode("span",{class:s.normalizeClass(["change",{up:t.originData[`${o.id}_delta`]>0,down:t.originData[`${o.id}_delta`]<0}])},s.toDisplayString(s.unref(Oe)(t.originData[`${o.id}_change`],"0,00.[00]%")),3),t.originData[`${o.id}_delta`]>0?(s.openBlock(),s.createBlock(s.unref(Il),{key:0,class:"up"})):t.originData[`${o.id}_delta`]<0?(s.openBlock(),s.createBlock(s.unref(Rl),{key:1,class:"down"})):s.createCommentVNode("",!0)])])):s.createCommentVNode("",!0)],4)}),128))],2)):s.createCommentVNode("",!0)]))}});function qr(t){return s.getCurrentScope()?(s.onScopeDispose(t),!0):!1}const Xr=typeof window!="undefined",q1=t=>typeof t=="string",Fc=()=>+Date.now(),Cn=()=>{};function zc(t,e){function r(...n){t(()=>e.apply(this,n),{fn:e,thisArg:this,args:n})}return r}const X1=t=>t();function c7(t,e={}){let r,n;return i=>{const o=s.unref(t),l=s.unref(e.maxWait);if(r&&clearTimeout(r),o<=0||l!==void 0&&l<=0)return n&&(clearTimeout(n),n=null),i();l&&!n&&(n=setTimeout(()=>{r&&clearTimeout(r),n=null,i()},l)),r=setTimeout(()=>{n&&clearTimeout(n),n=null,i()},o)}}function u7(t,e=!0,r=!0){let n=0,a,i=!r;const o=()=>{a&&(clearTimeout(a),a=void 0)};return c=>{const u=s.unref(t),f=Date.now()-n;if(o(),u<=0)return n=Date.now(),c();f>u&&(n=Date.now(),i?i=!1:c()),e&&(a=setTimeout(()=>{n=Date.now(),r||(i=!0),o(),c()},u)),!r&&!a&&(a=setTimeout(()=>i=!0,u))}}function f7(t){let e;function r(){return e||(e=t()),e}return r.reset=async()=>{const n=e;e=void 0,n&&await n},r}function d7(t,e,r=!1){return e.reduce((n,a)=>(a in t&&(!r||!t[a]===void 0)&&(n[a]=t[a]),n),{})}function h7(t,e=200,r={}){return zc(c7(e,r),t)}var K1=Object.getOwnPropertySymbols,p7=Object.prototype.hasOwnProperty,m7=Object.prototype.propertyIsEnumerable,v7=(t,e)=>{var r={};for(var n in t)p7.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&K1)for(var n of K1(t))e.indexOf(n)<0&&m7.call(t,n)&&(r[n]=t[n]);return r};function J1(t,e,r={}){const n=r,{eventFilter:a=X1}=n,i=v7(n,["eventFilter"]);return s.watch(t,zc(a,e),i)}var g7=Object.defineProperty,y7=Object.defineProperties,_7=Object.getOwnPropertyDescriptors,Q1=Object.getOwnPropertySymbols,w7=Object.prototype.hasOwnProperty,b7=Object.prototype.propertyIsEnumerable,e_=(t,e,r)=>e in t?g7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,S7=(t,e)=>{for(var r in e||(e={}))w7.call(e,r)&&e_(t,r,e[r]);if(Q1)for(var r of Q1(e))b7.call(e,r)&&e_(t,r,e[r]);return t},x7=(t,e)=>y7(t,_7(e));function t_(t){if(!s.isRef(t))return s.toRefs(t);const e=Array.isArray(t.value)?new Array(t.value.length):{};for(const r in t.value)e[r]=s.customRef(()=>({get(){return t.value[r]},set(n){if(Array.isArray(t.value)){const a=[...t.value];a[r]=n,t.value=a}else t.value=x7(S7({},t.value),{[r]:n})}}));return e}function La(t,e=!0){s.getCurrentInstance()?s.onMounted(t):e?t():s.nextTick(t)}function r_(t,e=1e3,r={}){const{immediate:n=!0,immediateCallback:a=!1}=r;let i=null;const o=s.ref(!1);function l(){i&&(clearInterval(i),i=null)}function c(){o.value=!1,l()}function u(){e<=0||(o.value=!0,a&&t(),l(),i=setInterval(t,e))}return n&&Xr&&u(),qr(c),{isActive:o,pause:c,resume:u}}function C7(t,e,r={}){const{immediate:n=!0}=r,a=s.ref(!1);let i=null;function o(){i&&(clearTimeout(i),i=null)}function l(){a.value=!1,o()}function c(...u){o(),a.value=!0,i=setTimeout(()=>{a.value=!1,i=null,t(...u)},s.unref(e))}return n&&(a.value=!0,Xr&&c()),qr(l),{isPending:a,start:c,stop:l}}function k7(t=!1){if(s.isRef(t))return e=>{t.value=typeof e=="boolean"?e:!t.value};{const e=s.ref(t);return[e,n=>{e.value=typeof n=="boolean"?n:!e.value}]}}function kn(t){var e;const r=s.unref(t);return(e=r==null?void 0:r.$el)!=null?e:r}const Je=Xr?window:void 0,n_=Xr?window.document:void 0,fs=Xr?window.navigator:void 0;function xe(...t){let e,r,n,a;if(q1(t[0])?([r,n,a]=t,e=Je):[e,r,n,a]=t,!e)return Cn;let i=Cn;const o=s.watch(()=>s.unref(e),c=>{i(),!!c&&(c.addEventListener(r,n,a),i=()=>{c.removeEventListener(r,n,a),i=Cn})},{immediate:!0,flush:"post"}),l=()=>{o(),i()};return qr(l),l}function T7(t,e,r={}){const{window:n=Je}=r;if(!n)return;const a=s.ref(!0),o=[xe(n,"click",c=>{const u=kn(t);!u||u===c.target||c.composedPath().includes(u)||!a.value||e(c)},{passive:!0,capture:!0}),xe(n,"pointerdown",c=>{const u=kn(t);a.value=!!u&&!c.composedPath().includes(u)},{passive:!0})];return()=>o.forEach(c=>c())}function M7(t={}){const{window:e=Je}=t,r=s.ref(0);return e&&(xe(e,"blur",()=>r.value+=1,!0),xe(e,"focus",()=>r.value+=1,!0)),s.computed(()=>(r.value,e==null?void 0:e.document.activeElement))}function $7({navigator:t=fs}={}){const e=["chargingchange","chargingtimechange","dischargingtimechange","levelchange"],r=t&&"getBattery"in t,n=s.ref(!1),a=s.ref(0),i=s.ref(0),o=s.ref(1);let l;function c(){n.value=this.charging,a.value=this.chargingTime||0,i.value=this.dischargingTime||0,o.value=this.level}return r&&t.getBattery().then(u=>{l=u,c.call(l);for(const f of e)xe(l,f,c,{passive:!0})}),{isSupported:r,charging:n,chargingTime:a,dischargingTime:i,level:o}}function ds(t,e={}){const{window:r=Je}=e;let n;const a=s.ref(!1),i=()=>{!r||(n||(n=r.matchMedia(t)),a.value=n.matches)};return La(()=>{i(),!!n&&("addEventListener"in n?n.addEventListener("change",i):n.addListener(i),qr(()=>{"removeEventListener"in i?n.removeEventListener("change",i):n.removeListener(i)}))}),a}function N7({window:t=Je}={}){const e=n=>{const{state:a,length:i}=(t==null?void 0:t.history)||{},{hash:o,host:l,hostname:c,href:u,origin:f,pathname:d,port:h,protocol:p,search:m}=(t==null?void 0:t.location)||{};return{trigger:n,state:a,length:i,hash:o,host:l,hostname:c,href:u,origin:f,pathname:d,port:h,protocol:p,search:m}},r=s.ref(e("load"));return t&&(xe(t,"popstate",()=>r.value=e("popstate"),{passive:!0}),xe(t,"hashchange",()=>r.value=e("hashchange"),{passive:!0})),r}function E7(t={}){const{navigator:e=fs,read:r=!1,source:n,copiedDuring:a=1500}=t,i=["copy","cut"],o=Boolean(e&&"clipboard"in e),l=s.ref(""),c=s.ref(!1),u=C7(()=>c.value=!1,a);function f(){e.clipboard.readText().then(h=>{l.value=h})}if(o&&r)for(const h of i)xe(h,f);async function d(h=s.unref(n)){o&&h!=null&&(await e.clipboard.writeText(h),l.value=h,c.value=!0,u.start())}return{isSupported:o,text:l,copied:c,copy:d}}const Hh="__vueuse_ssr_handlers__";globalThis[Hh]=globalThis[Hh]||{};const A7=globalThis[Hh];function a_(t,e){return A7[t]||e}function D7(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"||Array.isArray(t)?"object":Number.isNaN(t)?"any":"number"}const O7={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))}};function i_(t,e,r,n={}){var a;const{flush:i="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,shallow:u,window:f=Je,eventFilter:d,onError:h=_=>{console.error(_)}}=n,p=s.unref(e),m=D7(p),v=(u?s.shallowRef:s.ref)(e),g=(a=n.serializer)!=null?a:O7[m];if(!r)try{r=a_("getDefaultStorage",()=>{var _;return(_=Je)==null?void 0:_.localStorage})()}catch(_){h(_)}function y(_){if(!(!r||_&&_.key!==t))try{const w=_?_.newValue:r.getItem(t);w==null?(v.value=p,c&&p!==null&&r.setItem(t,g.write(p))):typeof w!="string"?v.value=w:v.value=g.read(w)}catch(w){h(w)}}return y(),f&&l&&xe(f,"storage",_=>setTimeout(()=>y(_),0)),r&&J1(v,()=>{try{v.value==null?r.removeItem(t):r.setItem(t,g.write(v.value))}catch(_){h(_)}},{flush:i,deep:o,eventFilter:d}),v}function Uh(t){return ds("(prefers-color-scheme: dark)",t)}var L7=Object.defineProperty,o_=Object.getOwnPropertySymbols,P7=Object.prototype.hasOwnProperty,B7=Object.prototype.propertyIsEnumerable,s_=(t,e,r)=>e in t?L7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,I7=(t,e)=>{for(var r in e||(e={}))P7.call(e,r)&&s_(t,r,e[r]);if(o_)for(var r of o_(e))B7.call(e,r)&&s_(t,r,e[r]);return t};function R7(t={}){const{selector:e="html",attribute:r="class",window:n=Je,storage:a,storageKey:i="vueuse-color-scheme",listenToStorageChanges:o=!0,storageRef:l}=t,c=I7({auto:"",light:"light",dark:"dark"},t.modes||{}),u=Uh({window:n}),f=s.computed(()=>u.value?"dark":"light"),d=l||(i==null?s.ref("auto"):i_(i,"auto",a,{window:n,listenToStorageChanges:o})),h=s.computed({get(){return d.value==="auto"?f.value:d.value},set(g){d.value=g}}),p=a_("updateHTMLAttrs",(g,y,_)=>{const w=n==null?void 0:n.document.querySelector(g);if(!!w)if(y==="class"){const S=_.split(/\s/g);Object.values(c).flatMap(x=>(x||"").split(/\s/g)).filter(Boolean).forEach(x=>{S.includes(x)?w.classList.add(x):w.classList.remove(x)})}else w.setAttribute(y,_)});function m(g){var y;p(e,r,(y=c[g])!=null?y:g)}function v(g){t.onChanged?t.onChanged(g,m):m(g)}return s.watch(h,v,{flush:"post",immediate:!0}),La(()=>v(h.value)),h}var V7=Object.defineProperty,F7=Object.defineProperties,z7=Object.getOwnPropertyDescriptors,l_=Object.getOwnPropertySymbols,H7=Object.prototype.hasOwnProperty,U7=Object.prototype.propertyIsEnumerable,c_=(t,e,r)=>e in t?V7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,j7=(t,e)=>{for(var r in e||(e={}))H7.call(e,r)&&c_(t,r,e[r]);if(l_)for(var r of l_(e))U7.call(e,r)&&c_(t,r,e[r]);return t},Y7=(t,e)=>F7(t,z7(e));function G7(t={}){const{valueDark:e="dark",valueLight:r="",window:n=Je}=t,a=R7(Y7(j7({},t),{onChanged:(l,c)=>{var u;t.onChanged?(u=t.onChanged)==null||u.call(t,l==="dark"):c(l)},modes:{dark:e,light:r}})),i=Uh({window:n});return s.computed({get(){return a.value==="dark"},set(l){l===i.value?a.value="auto":a.value=l?"dark":"light"}})}function W7(t={}){const{window:e=Je,eventFilter:r=X1}=t,n=s.ref({x:null,y:null,z:null}),a=s.ref({alpha:null,beta:null,gamma:null}),i=s.ref(0),o=s.ref({x:null,y:null,z:null});if(e){const l=zc(r,c=>{n.value=c.acceleration,o.value=c.accelerationIncludingGravity,a.value=c.rotationRate,i.value=c.interval});xe(e,"devicemotion",l)}return{acceleration:n,accelerationIncludingGravity:o,rotationRate:a,interval:i}}function Z7(t={}){const{window:e=Je}=t,r=Boolean(e&&"DeviceOrientationEvent"in e),n=s.ref(!1),a=s.ref(null),i=s.ref(null),o=s.ref(null);return e&&r&&xe(e,"deviceorientation",l=>{n.value=l.absolute,a.value=l.alpha,i.value=l.beta,o.value=l.gamma}),{isSupported:r,isAbsolute:n,alpha:a,beta:i,gamma:o}}const q7=[1,1.325,1.4,1.5,1.8,2,2.4,2.5,2.75,3,3.5,4];function X7({window:t=Je}={}){if(!t)return{pixelRatio:s.ref(1)};const e=s.ref(t.devicePixelRatio),r=()=>{e.value=t.devicePixelRatio};return xe(t,"resize",r,{passive:!0}),q7.forEach(n=>{const a=ds(`screen and (min-resolution: ${n}dppx)`),i=ds(`screen and (max-resolution: ${n}dppx)`);s.watch([a,i],r)}),{pixelRatio:e}}function K7(t,e={}){const{controls:r=!1,navigator:n=fs}=e,a=Boolean(n&&"permissions"in n);let i;const o=typeof t=="string"?{name:t}:t,l=s.ref(),c=()=>{i&&(l.value=i.state)},u=f7(async()=>{if(!!a){if(!i)try{i=await n.permissions.query(o),xe(i,"change",c),c()}catch{l.value="prompt"}return i}});return u(),r?{state:l,isSupported:a,query:u}:l}function J7(t={}){const{navigator:e=fs,requestPermissions:r=!1,constraints:n={audio:!0,video:!0},onUpdated:a}=t,i=s.ref([]),o=s.computed(()=>i.value.filter(p=>p.kind==="videoinput")),l=s.computed(()=>i.value.filter(p=>p.kind==="audioinput")),c=s.computed(()=>i.value.filter(p=>p.kind==="audiooutput"));let u=!1;const f=s.ref(!1);async function d(){!u||(i.value=await e.mediaDevices.enumerateDevices(),a==null||a(i.value))}async function h(){if(!u)return!1;if(f.value)return!0;const{state:p,query:m}=K7("camera",{controls:!0});return await m(),p.value!=="granted"&&((await e.mediaDevices.getUserMedia(n)).getTracks().forEach(g=>g.stop()),d()),f.value=!0,f.value}return e&&(u=Boolean(e.mediaDevices&&e.mediaDevices.enumerateDevices),u&&(r&&h(),xe(e.mediaDevices,"devicechange",d),d())),{devices:i,ensurePermissions:h,permissionGranted:f,videoInputs:o,audioInputs:l,audioOutputs:c,isSupported:u}}function Q7({document:t=n_}={}){if(!t)return s.ref("visible");const e=s.ref(t.visibilityState);return xe(t,"visibilitychange",()=>{e.value=t.visibilityState}),e}var eR=Object.defineProperty,tR=Object.defineProperties,rR=Object.getOwnPropertyDescriptors,u_=Object.getOwnPropertySymbols,nR=Object.prototype.hasOwnProperty,aR=Object.prototype.propertyIsEnumerable,f_=(t,e,r)=>e in t?eR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,iR=(t,e)=>{for(var r in e||(e={}))nR.call(e,r)&&f_(t,r,e[r]);if(u_)for(var r of u_(e))aR.call(e,r)&&f_(t,r,e[r]);return t},oR=(t,e)=>tR(t,rR(e));function sR(t,e={}){var r,n;const a=(r=e.draggingElement)!=null?r:Je,i=s.ref((n=e.initialValue)!=null?n:{x:0,y:0}),o=s.ref(),l=h=>e.pointerTypes?e.pointerTypes.includes(h.pointerType):!0,c=h=>{s.unref(e.preventDefault)&&h.preventDefault()},u=h=>{var p;if(!l(h)||s.unref(e.exact)&&h.target!==s.unref(t))return;const m=s.unref(t).getBoundingClientRect(),v={x:h.pageX-m.left,y:h.pageY-m.top};((p=e.onStart)==null?void 0:p.call(e,v,h))!==!1&&(o.value=v,c(h))},f=h=>{var p;!l(h)||!o.value||(i.value={x:h.pageX-o.value.x,y:h.pageY-o.value.y},(p=e.onMove)==null||p.call(e,i.value,h),c(h))},d=h=>{var p;!l(h)||(o.value=void 0,(p=e.onEnd)==null||p.call(e,i.value,h),c(h))};return Xr&&(xe(t,"pointerdown",u,!0),xe(a,"pointermove",f,!0),xe(a,"pointerup",d,!0)),oR(iR({},t_(i)),{position:i,isDragging:s.computed(()=>!!o.value),style:s.computed(()=>`left:${i.value.x}px;top:${i.value.y}px;`)})}var d_=Object.getOwnPropertySymbols,lR=Object.prototype.hasOwnProperty,cR=Object.prototype.propertyIsEnumerable,uR=(t,e)=>{var r={};for(var n in t)lR.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&d_)for(var n of d_(t))e.indexOf(n)<0&&cR.call(t,n)&&(r[n]=t[n]);return r};function Hc(t,e,r={}){const n=r,{window:a=Je}=n,i=uR(n,["window"]);let o;const l=a&&"ResizeObserver"in a,c=()=>{o&&(o.disconnect(),o=void 0)},u=s.watch(()=>kn(t),d=>{c(),l&&a&&d&&(o=new a.ResizeObserver(e),o.observe(d,i))},{immediate:!0,flush:"post"}),f=()=>{c(),u()};return qr(f),{isSupported:l,stop:f}}function fR(t){const e=s.ref(0),r=s.ref(0),n=s.ref(0),a=s.ref(0),i=s.ref(0),o=s.ref(0),l=s.ref(0),c=s.ref(0);function u(){const f=kn(t);if(!f){e.value=0,r.value=0,n.value=0,a.value=0,i.value=0,o.value=0,l.value=0,c.value=0;return}const d=f.getBoundingClientRect();e.value=d.height,r.value=d.bottom,n.value=d.left,a.value=d.right,i.value=d.top,o.value=d.width,l.value=d.x,c.value=d.y}return xe("scroll",u,!0),Hc(t,u),{height:e,bottom:r,left:n,right:a,top:i,width:o,x:l,y:c,update:u}}function h_(t,e={}){const{immediate:r=!0,window:n=Je}=e,a=s.ref(!1);function i(){!a.value||!n||(t(),n.requestAnimationFrame(i))}function o(){!a.value&&n&&(a.value=!0,i())}function l(){a.value=!1}return r&&o(),qr(l),{isActive:a,pause:l,resume:o}}function p_(t,e={width:0,height:0},r={}){const n=s.ref(e.width),a=s.ref(e.height);return Hc(t,([i])=>{n.value=i.contentRect.width,a.value=i.contentRect.height},r),{width:n,height:a}}function dR(t,{window:e=Je,scrollTarget:r}={}){const n=s.ref(!1),a=()=>{if(!e)return;const i=e.document;if(!t.value)n.value=!1;else{const o=t.value.getBoundingClientRect();n.value=o.top<=(e.innerHeight||i.documentElement.clientHeight)&&o.left<=(e.innerWidth||i.documentElement.clientWidth)&&o.bottom>=0&&o.right>=0}};return La(a),e&&La(()=>xe((r==null?void 0:r.value)||e,"scroll",a,{capture:!1,passive:!0})),n}function hR(t={}){const{initialValue:e=""}=t,r=Boolean(typeof window!="undefined"&&"EyeDropper"in window),n=s.ref(e);async function a(i){if(!r)return;const l=await new window.EyeDropper().open(i);return n.value=l.sRGBHex,l}return{isSupported:r,sRGBHex:n,open:a}}const m_=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];function pR(t,e={}){const{document:r=n_}=e,n=t||(r==null?void 0:r.querySelector("html")),a=s.ref(!1);let i=!1,o=m_[0];if(!r)i=!1;else for(const m of m_)if(m[1]in r){o=m,i=!0;break}const[l,c,u,,f]=o;async function d(){!i||((r==null?void 0:r[u])&&await r[c](),a.value=!1)}async function h(){if(!i)return;await d();const m=kn(n);m&&(await m[l](),a.value=!0)}async function p(){a.value?await d():await h()}return r&&xe(r,f,()=>{a.value=!!(r==null?void 0:r[u])},!1),{isSupported:i,isFullscreen:a,enter:h,exit:d,toggle:p}}function mR(t={}){const{enableHighAccuracy:e=!0,maximumAge:r=3e4,timeout:n=27e3,navigator:a=fs}=t,i=a&&"geolocation"in a,o=s.ref(null),l=s.ref(null),c=s.ref({accuracy:0,latitude:1/0,longitude:1/0,altitude:null,altitudeAccuracy:null,heading:null,speed:null});function u(d){o.value=d.timestamp,c.value=d.coords,l.value=null}let f;return i&&(f=a.geolocation.watchPosition(u,d=>l.value=d,{enableHighAccuracy:e,maximumAge:r,timeout:n})),qr(()=>{f&&a&&a.geolocation.clearWatch(f)}),{isSupported:i,coords:c,locatedAt:o,error:l}}const vR=["mousemove","mousedown","resize","keydown","touchstart","wheel"],gR=6e4;function yR(t=gR,e={}){const{initialState:r=!1,listenForVisibilityChange:n=!0,events:a=vR,window:i=Je,eventFilter:o=u7(50)}=e,l=s.ref(r),c=s.ref(Fc());let u;const f=zc(o,()=>{l.value=!1,c.value=Fc(),clearTimeout(u),u=setTimeout(()=>l.value=!0,t)});if(i){const d=i.document;for(const h of a)xe(i,h,f,{passive:!0});n&&xe(d,"visibilitychange",()=>{d.hidden||f()})}return u=setTimeout(()=>l.value=!0,t),{idle:l,lastActive:c}}function Xn(t,e,r={}){const{root:n,rootMargin:a="0px",threshold:i=.1,window:o=Je}=r,l=o&&"IntersectionObserver"in o;let c=Cn;const u=l?s.watch(()=>({el:kn(t),root:kn(n)}),({el:d,root:h})=>{if(c(),!d)return;const p=new o.IntersectionObserver(e,{root:h,rootMargin:a,threshold:i});p.observe(d),c=()=>{p.disconnect(),c=Cn}},{immediate:!0,flush:"post"}):Cn,f=()=>{c(),u()};return qr(f),{isSupported:l,stop:f}}function v_(t={}){const{type:e="page",touch:r=!0,resetOnTouchEnds:n=!1,initialValue:a={x:0,y:0},window:i=Je}=t,o=s.ref(a.x),l=s.ref(a.y),c=s.ref(null),u=h=>{e==="page"?(o.value=h.pageX,l.value=h.pageY):e==="client"&&(o.value=h.clientX,l.value=h.clientY),c.value="mouse"},f=()=>{o.value=a.x,l.value=a.y},d=h=>{if(h.touches.length>0){const p=h.touches[0];e==="page"?(o.value=p.pageX,l.value=p.pageY):e==="client"&&(o.value=p.clientX,l.value=p.clientY),c.value="touch"}};return i&&(xe(i,"mousemove",u,{passive:!0}),xe(i,"dragover",u,{passive:!0}),r&&(xe(i,"touchstart",d,{passive:!0}),xe(i,"touchmove",d,{passive:!0}),n&&xe(i,"touchend",f,{passive:!0}))),{x:o,y:l,sourceType:c}}function _R(t,e={}){const{handleOutside:r=!0,window:n=Je}=e,{x:a,y:i,sourceType:o}=v_(e),l=s.ref(t!=null?t:n==null?void 0:n.document.body),c=s.ref(0),u=s.ref(0),f=s.ref(0),d=s.ref(0),h=s.ref(0),p=s.ref(0),m=s.ref(!1);let v=()=>{};return n&&(v=s.watch([l,a,i],()=>{const g=kn(l);if(!g)return;const{left:y,top:_,width:w,height:S}=g.getBoundingClientRect();f.value=y+n.pageXOffset,d.value=_+n.pageYOffset,h.value=S,p.value=w;const x=a.value-f.value,b=i.value-d.value;m.value=x<0||b<0||x>p.value||b>h.value,(r||!m.value)&&(c.value=x,u.value=b)},{immediate:!0})),{x:a,y:i,sourceType:o,elementX:c,elementY:u,elementPositionX:f,elementPositionY:d,elementHeight:h,elementWidth:p,isOutside:m,stop:v}}function wR(t={}){const{touch:e=!0,drag:r=!0,initialValue:n=!1,window:a=Je}=t,i=s.ref(n),o=s.ref(null);if(!a)return{pressed:i,sourceType:o};const l=f=>()=>{i.value=!0,o.value=f},c=()=>{i.value=!1,o.value=null},u=s.computed(()=>kn(t.target)||a);return xe(u,"mousedown",l("mouse"),{passive:!0}),xe(a,"mouseleave",c,{passive:!0}),xe(a,"mouseup",c,{passive:!0}),r&&(xe(u,"dragstart",l("mouse"),{passive:!0}),xe(a,"drop",c,{passive:!0}),xe(a,"dragend",c,{passive:!0})),e&&(xe(u,"touchstart",l("touch"),{passive:!0}),xe(a,"touchend",c,{passive:!0}),xe(a,"touchcancel",c,{passive:!0})),{pressed:i,sourceType:o}}function g_(t={}){const{window:e=Je}=t,r=e==null?void 0:e.navigator,n=Boolean(r&&"connection"in r),a=s.ref(!0),i=s.ref(!1),o=s.ref(void 0),l=s.ref(void 0),c=s.ref(void 0),u=s.ref(void 0),f=s.ref(void 0),d=s.ref("unknown"),h=n&&r.connection;function p(){!r||(a.value=r.onLine,o.value=a.value?void 0:Date.now(),h&&(l.value=h.downlink,c.value=h.downlinkMax,f.value=h.effectiveType,u.value=h.rtt,i.value=h.saveData,d.value=h.type))}return e&&(xe(e,"offline",()=>{a.value=!1,o.value=Date.now()}),xe(e,"online",()=>{a.value=!0})),h&&xe(h,"change",p,!1),p(),{isSupported:n,isOnline:a,saveData:i,offlineAt:o,downlink:l,downlinkMax:c,effectiveType:f,rtt:u,type:d}}var bR=Object.defineProperty,y_=Object.getOwnPropertySymbols,SR=Object.prototype.hasOwnProperty,xR=Object.prototype.propertyIsEnumerable,__=(t,e,r)=>e in t?bR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,CR=(t,e)=>{for(var r in e||(e={}))SR.call(e,r)&&__(t,r,e[r]);if(y_)for(var r of y_(e))xR.call(e,r)&&__(t,r,e[r]);return t};function w_(t={}){const{controls:e=!1,interval:r="requestAnimationFrame"}=t,n=s.ref(new Date),a=()=>n.value=new Date,i=r==="requestAnimationFrame"?h_(a,{immediate:!0}):r_(a,r,{immediate:!0});return e?CR({now:n},i):n}function kR(t={}){const{isOnline:e}=g_(t);return e}function TR(t={}){const{window:e=Je}=t,r=s.ref(!1),n=a=>{if(!e)return;a=a||e.event;const i=a.relatedTarget||a.toElement;r.value=!i};return e&&(xe(e,"mouseout",n,{passive:!0}),xe(e.document,"mouseleave",n,{passive:!0}),xe(e.document,"mouseenter",n,{passive:!0})),r}var MR=Object.defineProperty,$R=Object.defineProperties,NR=Object.getOwnPropertyDescriptors,b_=Object.getOwnPropertySymbols,ER=Object.prototype.hasOwnProperty,AR=Object.prototype.propertyIsEnumerable,S_=(t,e,r)=>e in t?MR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,DR=(t,e)=>{for(var r in e||(e={}))ER.call(e,r)&&S_(t,r,e[r]);if(b_)for(var r of b_(e))AR.call(e,r)&&S_(t,r,e[r]);return t},OR=(t,e)=>$R(t,NR(e));const x_={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},LR=Object.keys(x_);function PR(t={}){const{target:e=Je}=t,r=s.ref(!1),n=s.ref(t.initialValue||{});Object.assign(n.value,x_,n.value);const a=i=>{r.value=!0,!(t.pointerTypes&&!t.pointerTypes.includes(i.pointerType))&&(n.value=d7(i,LR,!1))};return e&&(xe(e,"pointerdown",a,{passive:!0}),xe(e,"pointermove",a,{passive:!0}),xe(e,"pointerleave",()=>r.value=!1,{passive:!0})),OR(DR({},t_(n)),{isInside:r})}function BR(t){const e=ds("(prefers-color-scheme: light)",t),r=ds("(prefers-color-scheme: dark)",t);return s.computed(()=>r.value?"dark":e.value?"light":"no-preference")}function IR(t={}){const{window:e=Je}=t;if(!e)return s.ref(["en"]);const r=e.navigator,n=s.ref(r.languages);return xe(e,"languagechange",()=>{n.value=r.languages}),n}var C_,k_;Xr&&(window==null?void 0:window.navigator)&&((C_=window==null?void 0:window.navigator)==null?void 0:C_.platform)&&/iP(ad|hone|od)/.test((k_=window==null?void 0:window.navigator)==null?void 0:k_.platform);var RR=Object.defineProperty,T_=Object.getOwnPropertySymbols,VR=Object.prototype.hasOwnProperty,FR=Object.prototype.propertyIsEnumerable,M_=(t,e,r)=>e in t?RR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,zR=(t,e)=>{for(var r in e||(e={}))VR.call(e,r)&&M_(t,r,e[r]);if(T_)for(var r of T_(e))FR.call(e,r)&&M_(t,r,e[r]);return t};zR({text:""},{top:0,left:0,bottom:0,right:0,height:0,width:0});var HR=Object.defineProperty,Uc=Object.getOwnPropertySymbols,$_=Object.prototype.hasOwnProperty,N_=Object.prototype.propertyIsEnumerable,E_=(t,e,r)=>e in t?HR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,UR=(t,e)=>{for(var r in e||(e={}))$_.call(e,r)&&E_(t,r,e[r]);if(Uc)for(var r of Uc(e))N_.call(e,r)&&E_(t,r,e[r]);return t},jR=(t,e)=>{var r={};for(var n in t)$_.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Uc)for(var n of Uc(t))e.indexOf(n)<0&&N_.call(t,n)&&(r[n]=t[n]);return r};const A_=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:1/0,value:31536e6,name:"year"}],YR={justNow:"just now",past:t=>t.match(/\d/)?`${t} ago`:t,future:t=>t.match(/\d/)?`in ${t}`:t,month:(t,e)=>t===1?e?"last month":"next month":`${t} month${t>1?"s":""}`,year:(t,e)=>t===1?e?"last year":"next year":`${t} year${t>1?"s":""}`,day:(t,e)=>t===1?e?"yesterday":"tomorrow":`${t} day${t>1?"s":""}`,week:(t,e)=>t===1?e?"last week":"next week":`${t} week${t>1?"s":""}`,hour:t=>`${t} hour${t>1?"s":""}`,minute:t=>`${t} minute${t>1?"s":""}`,second:t=>`${t} second${t>1?"s":""}`},GR=t=>t.toISOString().slice(0,10);function WR(t,e={}){const{controls:r=!1,max:n,updateInterval:a=3e4,messages:i=YR,fullDateFormatter:o=GR}=e,{abs:l,round:c}=Math,u=w_({interval:a,controls:!0}),{now:f}=u,d=jR(u,["now"]);function h(g,y){var _;const w=+y-+g,S=l(w);if(S<6e4)return i.justNow;if(typeof n=="number"&&S>n)return o(new Date(g));if(typeof n=="string"){const x=(_=A_.find(b=>b.name===n))==null?void 0:_.max;if(x&&S>x)return o(new Date(g))}for(const x of A_)if(S<x.max)return m(w,x)}function p(g,y,_){const w=i[g];return typeof w=="function"?w(y,_):w.replace("{0}",y.toString())}function m(g,y){const _=c(l(g)/y.value),w=g>0,S=p(y.name,_,w);return p(w?"past":"future",S,w)}const v=s.computed(()=>h(new Date(s.unref(t)),s.unref(f.value)));return r?UR({timeAgo:v},d):v}var ZR=Object.defineProperty,D_=Object.getOwnPropertySymbols,qR=Object.prototype.hasOwnProperty,XR=Object.prototype.propertyIsEnumerable,O_=(t,e,r)=>e in t?ZR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,KR=(t,e)=>{for(var r in e||(e={}))qR.call(e,r)&&O_(t,r,e[r]);if(D_)for(var r of D_(e))XR.call(e,r)&&O_(t,r,e[r]);return t};function JR(t={}){const{controls:e=!1,offset:r=0,immediate:n=!0,interval:a="requestAnimationFrame"}=t,i=s.ref(Fc()+r),o=()=>i.value=Fc()+r,l=a==="requestAnimationFrame"?h_(o,{immediate:n}):r_(o,a,{immediate:n});return e?KR({timestamp:i},l):i}function L_(t,e){const r=s.ref(),n=p_(r),a=s.ref([]),i=s.shallowRef(t),o=s.ref({start:0,end:10}),{itemHeight:l,overscan:c=5}=e,u=_=>{if(typeof l=="number")return Math.ceil(_/l);const{start:w=0}=o.value;let S=0,x=0;for(let b=w;b<i.value.length;b++)if(S+=l(b),S>=_){x=b;break}return x-w},f=_=>{if(typeof l=="number")return Math.floor(_/l)+1;let w=0,S=0;for(let x=0;x<i.value.length;x++)if(w+=l(x),w>=_){S=x;break}return S+1},d=()=>{const _=r.value;if(_){const w=f(_.scrollTop),S=u(_.clientHeight),x=w-c,b=w+S+c;o.value={start:x<0?0:x,end:b>i.value.length?i.value.length:b},a.value=i.value.slice(o.value.start,o.value.end).map((C,k)=>({data:C,index:k+o.value.start}))}};s.watch([n.width,n.height,t],()=>{d()});const h=s.computed(()=>typeof l=="number"?i.value.length*l:i.value.reduce((_,w,S)=>_+l(S),0)),p=_=>typeof l=="number"?_*l:i.value.slice(0,_).reduce((S,x,b)=>S+l(b),0),m=_=>{r.value&&(r.value.scrollTop=p(_),d())},v=s.computed(()=>p(o.value.start)),g=s.computed(()=>({style:{width:"100%",height:`${h.value-v.value}px`,marginTop:`${v.value}px`}}));return{list:a,scrollTo:m,containerProps:{ref:r,onScroll:()=>{d()},style:{overflowY:"auto"}},wrapperProps:g}}function QR({window:t=Je}={}){if(!t)return s.ref(!1);const e=s.ref(t.document.hasFocus());return xe(t,"blur",()=>{e.value=!1}),xe(t,"focus",()=>{e.value=!0}),e}function eV({window:t=Je,initialWidth:e=1/0,initialHeight:r=1/0}={}){const n=s.ref(e),a=s.ref(r),i=()=>{t&&(n.value=t.innerWidth,a.value=t.innerHeight)};return i(),La(i),xe("resize",i,{passive:!0}),{width:n,height:a}}const tV={class:"mega-empty"},rV={class:"mega-empty__content"},nV={key:2,class:"mega-empty__msg"},lr=s.defineComponent({props:{type:{type:String,default:"empty"},loading:{type:Boolean,default:!1},msg:{type:String,default:""}},setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("div",tV,[s.createElementVNode("div",rV,[t.type==="empty"?(s.openBlock(),s.createBlock(s.unref(C0),{key:0,class:"mega-empty__img"})):s.createCommentVNode("",!0),t.type==="access"?(s.openBlock(),s.createBlock(s.unref(x5),{key:1,class:"mega-empty__img"})):s.createCommentVNode("",!0),t.msg?(s.openBlock(),s.createElementBlock("div",nV,[t.loading?(s.openBlock(),s.createBlock(s.unref(R.Spin),{key:0,class:"mega-empty__loading"})):s.createCommentVNode("",!0),s.createTextVNode(" "+s.toDisplayString(t.msg)+" ",1),s.renderSlot(e.$slots,"default")])):s.createCommentVNode("",!0)])]))}}),aV={class:"table-diff-merge"},iV={class:"table-diff-merge__current"},P_=s.defineComponent({props:{column:{type:Object,default:null},columnProperty:{type:String,default:""},row:{type:Object,default:null}},setup(t){return(e,r)=>{var n,a,i,o,l,c,u,f,d,h,p,m,v,g,y;return s.openBlock(),s.createElementBlock("div",aV,[s.createElementVNode("div",{class:"percent",style:s.normalizeStyle({width:`${((a=(n=t.row)==null?void 0:n.x_percent)==null?void 0:a[t.columnProperty])*100}%`})},null,4),s.createElementVNode("div",iV,s.toDisplayString(s.unref(Oe)((i=t.row)==null?void 0:i[t.columnProperty],(l=(o=t.column)==null?void 0:o.x_measure)==null?void 0:l.format)),1),s.createElementVNode("div",{class:s.normalizeClass(["table-diff-merge__compare",{up:((c=t.row)==null?void 0:c[`${t.columnProperty}_delta`])>0,down:((u=t.row)==null?void 0:u[`${t.columnProperty}_delta`])<0}])},[((f=t.row)==null?void 0:f[`${t.columnProperty}_delta`])>0?(s.openBlock(),s.createBlock(s.unref(Il),{key:0})):((d=t.row)==null?void 0:d[`${t.columnProperty}_delta`])<0?(s.openBlock(),s.createBlock(s.unref(Rl),{key:1})):s.createCommentVNode("",!0),s.createElementVNode("span",null,s.toDisplayString(s.unref(Oe)((h=t.row)==null?void 0:h[`${t.columnProperty}_delta`],(m=(p=t.column)==null?void 0:p.x_measure)==null?void 0:m.format)),1),s.createElementVNode("span",null," ("+s.toDisplayString(s.unref(Oe)((y=t.row)==null?void 0:y[`${(g=(v=t.column)==null?void 0:v.x_measure)==null?void 0:g.id}_change`],"0,0.00%"))+") ",1)],2)])}}}),oV={class:"value"},sV={key:0},lV={key:0},cV={key:1},B_=s.defineComponent({props:{column:{type:Object,default:null},columnProperty:{type:String,default:""},row:{type:Object,default:null},proportion:{type:Boolean,default:!1}},setup(t){const e=t,r=s.computed(()=>e.columnProperty.endsWith("_delta"));return(n,a)=>{var i,o,l,c,u,f,d,h,p,m,v,g,y,_,w;return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["table-diff-change",{up:s.unref(r)&&((i=t.row)==null?void 0:i[t.columnProperty])>0,down:s.unref(r)&&((o=t.row)==null?void 0:o[t.columnProperty])<0}])},[s.createElementVNode("div",{class:"percent",style:s.normalizeStyle({width:`${((c=(l=t.row)==null?void 0:l.x_percent)==null?void 0:c[t.columnProperty])*100}%`})},null,4),s.createElementVNode("div",oV,[s.unref(r)?(s.openBlock(),s.createElementBlock("span",sV,[((u=t.row)==null?void 0:u[t.columnProperty])>0?(s.openBlock(),s.createBlock(s.unref(Il),{key:0})):((f=t.row)==null?void 0:f[t.columnProperty])<0?(s.openBlock(),s.createBlock(s.unref(Rl),{key:1})):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0),s.createElementVNode("span",null,[s.createTextVNode(s.toDisplayString(s.unref(Oe)((d=t.row)==null?void 0:d[t.columnProperty],(p=(h=t.column)==null?void 0:h.x_measure)==null?void 0:p.format))+" ",1),t.proportion&&((m=t.row)==null?void 0:m._proportion)&&((v=t.row)==null?void 0:v._proportion[t.columnProperty])?(s.openBlock(),s.createElementBlock("i",lV," ("+s.toDisplayString(s.unref(Oe)((g=t.row)==null?void 0:g._proportion[t.columnProperty],"0[.]00%"))+") ",1)):s.createCommentVNode("",!0)]),s.unref(r)?(s.openBlock(),s.createElementBlock("span",cV," ("+s.toDisplayString(s.unref(Oe)((w=t.row)==null?void 0:w[`${(_=(y=t.column)==null?void 0:y.x_measure)==null?void 0:_.id}_change`],"0,0.00%"))+") ",1)):s.createCommentVNode("",!0)])],2)}}}),uV={class:"table-filter-content"},fV=s.createElementVNode("div",{class:"table-filter-left"},[s.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s.createElementVNode("path",{d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM11 7.4V12.6C11 12.8209 11.1791 13 11.4 13H12.6C12.8209 13 13 12.8209 13 12.6V7.4C13 7.17909 12.8209 7 12.6 7H11.4C11.1791 7 11 7.17909 11 7.4ZM13 16C13 15.4477 12.5523 15 12 15C11.4477 15 11 15.4477 11 16C11 16.5523 11.4477 17 12 17C12.5523 17 13 16.5523 13 16Z",fill:"#FFA94C"})])],-1),dV={class:"table-filter-content"},hV=s.createElementVNode("div",{class:"table-filter-title"}," The following conditions will be appended to the filter. Time dimension is not supported in Dashbord. ",-1),pV={class:"table-filter-tags"},mV=["onClick"],vV=s.createElementVNode("div",{style:{"flex-grow":"1"}},null,-1),gV=s.createTextVNode("Cancel"),yV=s.createTextVNode("OK"),_V=s.defineComponent({props:{dialogVisible:{type:Boolean,default:!1},tags:{type:Array,default:()=>[]},selectedSplits:{type:Array,default:null}},emits:["onOk","onCancel","update:dialogVisible"],setup(t,{emit:e}){const r=t,n=s.ref([]),a=()=>{n.value=[],e("onCancel")},i=()=>{const l=[];n.value.forEach(c=>{l.push({id:c.id,id_name:c.id_name,index:c._index,id_pre:c.id_pre})}),e("onOk",l)},o=(l,c)=>{n.value.splice(c,1)};return s.watch(()=>r.tags,(l,c)=>{const u=Ye(r.tags)||[];n.value=u.map((f,d)=>(f._index=d,f))}),(l,c)=>(s.openBlock(),s.createBlock(s.unref(R.Modal),s.mergeProps({mask:!0,maskClosable:!1,width:500,destroyOnClose:""},l.$attrs,{centered:"",closable:!1}),{footer:s.withCtx(()=>{var u;return[s.renderSlot(l.$slots,"left"),vV,s.createElementVNode("div",null,[s.createVNode(s.unref(R.Button),{onClick:a},{default:s.withCtx(()=>[gV]),_:1}),s.createVNode(s.unref(R.Button),{type:"primary",disabled:((u=n.value)==null?void 0:u.length)===0,onClick:i},{default:s.withCtx(()=>[yV]),_:1},8,["disabled"])])]}),default:s.withCtx(()=>[s.createElementVNode("div",uV,[fV,s.createElementVNode("div",dV,[hV,s.createElementVNode("div",pV,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n.value,(u,f)=>(s.openBlock(),s.createElementBlock("div",{key:u._id,class:"mega-tag"},[s.createTextVNode(s.toDisplayString(u.id_name)+" ",1),s.createElementVNode("div",{class:"mega-tag-action",onClick:s.withModifiers(d=>o(u,f),["stop"])},[s.createVNode(s.unref(Mi))],8,mV)]))),128))])])])]),_:3},16))}}),wV={key:1},bV=["onClick"],SV={key:0},xV=s.defineComponent({props:{originData:{type:Object,default:null},originMeasures:{type:Array,default:null},selectedMeasures:{type:Array,default:null},customMeasures:{type:Array,default:null},selectedSplits:{type:Array,default:null},cube:{type:Object,default:null},isCompare:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isSortable:{type:Boolean,default:!0},isClickable:{type:Boolean,default:!0},isInDashboard:{type:Boolean,default:!1},isPush:{type:Boolean,default:!1},styleState:{type:Object,default:null}},emits:["onAddTableFilter","onChangeTableSort"],setup(t,{emit:e}){const r=t,n=s.computed(()=>r.isCompare&&(r.isPush||r.cube.tableMerge)),a=s.ref(null),i=s.ref(300),o=()=>{var $,N;const k=document.querySelector(".mega-content__vis");k?i.value=k?(k==null?void 0:k.offsetHeight)-32-32:360:i.value=(N=($=a.value)==null?void 0:$.offsetHeight)!=null?N:360},l=s.ref(null),c=s.ref([]),u=s.ref([]),f=s.ref({}),d=k=>k.includes("getWilsonScore"),h=()=>{const k=[];return r.customMeasures.forEach($=>{if(k.push({x_measure:te({},$),field:$.id,title:$.name,minWidth:d($.formula)?"200px":"120px",sortable:!1,remoteSort:!1,formatter({cellValue:N,row:A}){return N?Oe(N,$.format):""}}),r.isCompare&&!d($.formula)){const N={id:`${$.id}`,name:`${$.name}`,format:$.format,formula:ji($.formula,"_pre")};k.push({x_measure:te({},N),field:`${$.id}_pre`,title:`Previous ${$.name}`,minWidth:"120px",sortable:!1,remoteSort:!1,formatter({cellValue:L,row:M}){return L?Oe(L,N.format):""}});const A={id:`${$.id}`,name:`${$.name}`,format:$.format,formula:ji($.formula,"_delta")};k.push({x_measure:te({},A),field:`${$.id}_delta`,title:`Difference ${$.name}`,minWidth:"120px",sortable:!1,remoteSort:!1,formatter({cellValue:L,row:M}){return L?Oe(L,A.format):""}})}}),k},p=k=>(k.forEach($=>{var N;if(($==null?void 0:$.children)&&((N=$==null?void 0:$.children)==null?void 0:N.length)>0)p($.children);else return r.customMeasures.forEach(A=>{if(d(A.formula)){const L=gh(A.formula);L.length!==3?$[A.id]="":$[A.id]=vh($[L[0]],$[L[1]],Number(L[2]))}else $[A.id]=Tt(A.formula,$);if(r.isCompare&&!d(A.formula)){const L=Tt(A.formula,$),M=Tt(ji(A.formula,"_pre"),$);$[`${A.id}_pre`]=M,$[`${A.id}_delta`]=L-M,$[`${A.id}_change`]=M?(L-M)/M:0}}),$}),k),m=k=>(r.customMeasures.forEach($=>{if(d($.formula)){const N=gh($.formula);N.length!==3?k[$.id]="":k[$.id]=vh(k[N[0]],k[N[1]],Number(N[2]))}else k[$.id]=Tt($.formula,k);if(r.isCompare&&!d($.formula)){const N=Tt($.formula,k),A=Tt(ji($.formula,"_pre"),k);k[`${$.id}_pre`]=A,k[`${$.id}_delta`]=N-A,k[`${$.id}_change`]=N?(N-A)/N:0}}),k);s.onMounted(()=>{var $;let k=DI(r.selectedSplits,r.selectedMeasures,r.isSortable,r.isCompare,n.value);if(r.customMeasures){let N=h();k=k.concat(N)}if(r.originMeasures&&(k=k.sort((N,A)=>{var L,M;return r.originMeasures.indexOf((L=N==null?void 0:N.x_measure)==null?void 0:L.id)-r.originMeasures.indexOf((M=A==null?void 0:A.x_measure)==null?void 0:M.id)})),c.value=k,r.originData){const N=Ye(r.originData);delete N.children,r.customMeasures?f.value=m(N):f.value=te({},N);const A=Ye((($=r.originData)==null?void 0:$.children)||[]),L=r.selectedMeasures.filter(T=>T.formula==="sum"),M=y1(A,N,L,r.isCompare);let O=II(M,r.selectedMeasures,r.selectedSplits,r.isCompare);r.customMeasures&&(O=p(O)),u.value=[...O]}s.nextTick(()=>{o(),Hc(document.body,()=>{o()}),Hc(a.value,()=>{o()})})});const v=s.ref(null),g=s.ref(!1),y=s.ref([]),_=({row:k,rowIndex:$,$rowIndex:N,column:A,columnIndex:L,$columnIndex:M,$event:O})=>{var E,D;if(r.isReadonly||!r.isClickable)return;if((D=(E=r.cube)==null?void 0:E.tableCellClick)!=null?D:!0){const P=l.value.getTableData(),I=g1(P.fullData,k._id);y.value=[...I],g.value=!0}},w=k=>{e("onAddTableFilter",k),r.isInDashboard&&ce.emit("addDashTableFilter",{lines:k,splits:r.selectedSplits}),g.value=!1},S=({property:k,order:$})=>{r.isReadonly||!r.isSortable||e("onChangeTableSort",{property:k,order:$})},x=k=>{window.open(k,"_target")},b=k=>{if(k){const{copy:$}=E7({source:k});$(k).then(()=>{R.message.success("Copy successfully.")})}},C=()=>{const k=l.value;k&&(k.getTreeExpandRecords().length>0?k.clearTreeExpand():k.setAllTreeExpand(!0),k.refreshScroll())};return(k,$)=>{var L,M,O,T,E;const N=s.resolveComponent("vxe-column"),A=s.resolveComponent("vxe-table");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["vis-table-container vis-inner vis-height",{isMerge:s.unref(n)}]),ref_key:"visInnerRef",ref:a},[s.createVNode(A,{"show-overflow":"",border:"",resizable:"","auto-resize":"","show-header-overflow":"","highlight-hover-row":"","show-footer-overflow":"",height:i.value,ref_key:"xTable",ref:l,"scroll-y":{enabled:!0,gt:0},data:u.value,"show-footer":(M=(L=t.cube)==null?void 0:L.hideTableFooter)!=null?M:!0,size:"small","footer-method":s.unref(OI),"tree-config":{transform:!0,expandAll:(E=(T=(O=t.styleState)==null?void 0:O.table)==null?void 0:T.expand)!=null?E:!0,rowField:"_id",parentField:"_pid"},onCellDblclick:_,onSortChange:S},{empty:s.withCtx(()=>[s.createVNode(lr)]),default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(c.value,D=>(s.openBlock(),s.createBlock(N,{key:D.field,treeNode:D.treeNode,type:D.type,field:D.field,title:D.title,fixed:D.fixed,width:D.width,"min-width":D.minWidth,sortable:D.sortable,align:D.align,"header-align":D.headerAlign,"footer-align":D.footerAlign,formatter:D.formatter},{header:s.withCtx(({_columnIndex:P,column:I})=>[P===0?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[t.selectedSplits&&t.selectedSplits.length>1?(s.openBlock(),s.createElementBlock("span",{key:0,class:"vxe-cell--sort cursor-pointer",onClick:C},[s.createVNode(s.unref(P5))])):s.createCommentVNode("",!0),s.createElementVNode("span",null,s.toDisplayString(I.title),1)],64)):(s.openBlock(),s.createElementBlock("span",wV,s.toDisplayString(I.title),1))]),default:s.withCtx(({row:P,column:I,_columnIndex:V})=>{var F,H,Y;return[V===0?(s.openBlock(),s.createElementBlock("div",{key:0,onClick:Q=>b(P[I.property]),class:"we-node-column"},[s.createVNode(s.unref(R.Space),null,{default:s.withCtx(()=>{var Q,ae;return[typeof P[I.property]=="string"&&(((Q=P[I.property])==null?void 0:Q.startsWith("http"))||((ae=P[I.property])==null?void 0:ae.startsWith("https")))?(s.openBlock(),s.createBlock(s.unref(v5),{key:0,onClick:s.withModifiers(le=>x(P[I.property]),["prevent","stop"])},null,8,["onClick"])):s.createCommentVNode("",!0),s.createTextVNode(" "+s.toDisplayString(P[I.property]),1)]}),_:2},1024)],8,bV)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.unref(n)?(s.openBlock(),s.createBlock(P_,{key:0,row:P,"column-property":I.property,column:c.value[V]},null,8,["row","column-property","column"])):(s.openBlock(),s.createBlock(B_,{key:1,row:P,"column-property":I.property,column:c.value[V],proportion:(Y=(H=(F=t.styleState)==null?void 0:F.table)==null?void 0:H.proportion)!=null?Y:!1},null,8,["row","column-property","column","proportion"]))],64))]}),footer:s.withCtx(({items:P,column:I,_columnIndex:V})=>{var F,H,Y;return[V===0?(s.openBlock(),s.createElementBlock("div",SV,s.toDisplayString(P[V]),1)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.unref(n)?(s.openBlock(),s.createBlock(P_,{key:0,row:f.value,"column-property":I.property,column:c.value[V]},null,8,["row","column-property","column"])):(s.openBlock(),s.createBlock(B_,{key:1,row:f.value,"column-property":I.property,column:c.value[V],proportion:(Y=(H=(F=t.styleState)==null?void 0:F.table)==null?void 0:H.proportion)!=null?Y:!1},null,8,["row","column-property","column","proportion"]))],64))]}),_:2},1032,["treeNode","type","field","title","fixed","width","min-width","sortable","align","header-align","footer-align","formatter"]))),128))]),_:1},8,["height","data","show-footer","footer-method","tree-config"]),s.createVNode(_V,{visible:g.value,ref_key:"filterRef",ref:v,tags:y.value,selectedSplits:t.selectedSplits,onOnCancel:$[0]||($[0]=()=>g.value=!1),onOnOk:w},null,8,["visible","tags","selectedSplits"])],2)}}}),CV={class:"chart-card"},kV={class:"chart-card__title"},TV={class:"m-title"},MV={class:"m-current"},$V={key:0,class:"m-previous"},NV={key:1,class:"m__data"},EV={class:"action"},AV={class:"chart-card__content"},Tn=s.defineComponent({props:{isCompare:{type:Boolean,default:!1},title:{type:String,default:""},format:{type:String,default:null},delta:{type:Number,default:null},change:{type:Number,default:null},cur:{type:[Number||String],default:null},pre:{type:[Number||String],default:null},showData:{type:Boolean,default:!0}},setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("div",CV,[s.createElementVNode("div",kV,[s.createVNode(s.unref(R.Space),{size:16},{default:s.withCtx(()=>[s.createElementVNode("span",TV,s.toDisplayString(t.title),1),t.showData?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createElementVNode("span",MV,s.toDisplayString(s.unref(Oe)(t.cur,t.format)),1),t.isCompare?(s.openBlock(),s.createElementBlock("span",$V,s.toDisplayString(s.unref(Oe)(t.pre,t.format)),1)):s.createCommentVNode("",!0),t.isCompare?(s.openBlock(),s.createElementBlock("div",NV,[s.createElementVNode("span",{class:s.normalizeClass(["change",{up:t.delta>0,down:t.delta<0}])},s.toDisplayString(s.unref(Oe)(t.change,"0,00.[00]%")),3),t.delta>0?(s.openBlock(),s.createBlock(s.unref(Il),{key:0})):t.delta<0?(s.openBlock(),s.createBlock(s.unref(Rl),{key:1})):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0)],64)):s.createCommentVNode("",!0)]),_:1}),s.createElementVNode("div",EV,[s.renderSlot(e.$slots,"action")])]),s.createElementVNode("div",AV,[s.renderSlot(e.$slots,"default")])]))}});/*! *****************************************************************************
20
+ Copyright (c) Microsoft Corporation.
21
+
22
+ Permission to use, copy, modify, and/or distribute this software for any
23
+ purpose with or without fee is hereby granted.
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
26
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
27
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
28
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
29
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
30
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
31
+ PERFORMANCE OF THIS SOFTWARE.
32
+ ***************************************************************************** */var jh=function(t,e){return jh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},jh(t,e)};function me(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");jh(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var DV=function(){function t(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return t}(),OV=function(){function t(){this.browser=new DV,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!="undefined"}return t}(),Pa=new OV;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Pa.wxa=!0,Pa.touchEventsSupported=!0):typeof document=="undefined"&&typeof self!="undefined"?Pa.worker=!0:typeof navigator=="undefined"?(Pa.node=!0,Pa.svgSupported=!0):LV(navigator.userAgent,Pa);function LV(t,e){var r=e.browser,n=t.match(/Firefox\/([\d.]+)/),a=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),i=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(r.firefox=!0,r.version=n[1]),a&&(r.ie=!0,r.version=a[1]),i&&(r.edge=!0,r.version=i[1],r.newEdge=+i[1].split(".")[0]>18),o&&(r.weChat=!0),e.svgSupported=typeof SVGRect!="undefined",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),e.domSupported=typeof document!="undefined";var l=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in l||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}var Pe=Pa,Yh=12,I_="sans-serif",Kn=Yh+"px "+I_,PV=20,BV=100,IV="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function RV(t){var e={};if(typeof JSON=="undefined")return e;for(var r=0;r<t.length;r++){var n=String.fromCharCode(r+32),a=(t.charCodeAt(r)-PV)/BV;e[n]=a}return e}var VV=RV(IV),Jn={createCanvas:function(){return typeof document!="undefined"&&document.createElement("canvas")},measureText:function(){var t,e;return function(r,n){if(!t){var a=Jn.createCanvas();t=a&&a.getContext("2d")}if(t)return e!==n&&(e=t.font=n||Kn),t.measureText(r);r=r||"",n=n||Kn;var i=/^([0-9]*?)px$/.exec(n),o=+(i&&i[1])||Yh,l=0;if(n.indexOf("mono")>=0)l=o*r.length;else for(var c=0;c<r.length;c++){var u=VV[r[c]];l+=u==null?o:u*o}return{width:l}}}(),loadImage:function(t,e,r){var n=new Image;return n.onload=e,n.onerror=r,n.src=t,n}},R_=Qn(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(t,e){return t["[object "+e+"]"]=!0,t},{}),V_=Qn(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(t,e){return t["[object "+e+"Array]"]=!0,t},{}),hs=Object.prototype.toString,jc=Array.prototype,FV=jc.forEach,zV=jc.filter,Gh=jc.slice,HV=jc.map,F_=function(){}.constructor,Yc=F_?F_.prototype:null,Wh="__proto__",UV=2311;function z_(){return UV++}function Zh(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];typeof console!="undefined"&&console.error.apply(console,t)}function Te(t){if(t==null||typeof t!="object")return t;var e=t,r=hs.call(t);if(r==="[object Array]"){if(!ms(t)){e=[];for(var n=0,a=t.length;n<a;n++)e[n]=Te(t[n])}}else if(V_[r]){if(!ms(t)){var i=t.constructor;if(i.from)e=i.from(t);else{e=new i(t.length);for(var n=0,a=t.length;n<a;n++)e[n]=t[n]}}}else if(!R_[r]&&!ms(t)&&!Gc(t)){e={};for(var o in t)t.hasOwnProperty(o)&&o!==Wh&&(e[o]=Te(t[o]))}return e}function Re(t,e,r){if(!_e(e)||!_e(t))return r?Te(e):t;for(var n in e)if(e.hasOwnProperty(n)&&n!==Wh){var a=t[n],i=e[n];_e(i)&&_e(a)&&!se(i)&&!se(a)&&!Gc(i)&&!Gc(a)&&!H_(i)&&!H_(a)&&!ms(i)&&!ms(a)?Re(a,i,r):(r||!(n in t))&&(t[n]=Te(e[n]))}return t}function re(t,e){if(Object.assign)Object.assign(t,e);else for(var r in e)e.hasOwnProperty(r)&&r!==Wh&&(t[r]=e[r]);return t}function Ue(t,e,r){for(var n=Fe(e),a=0;a<n.length;a++){var i=n[a];(r?e[i]!=null:t[i]==null)&&(t[i]=e[i])}return t}function Ge(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r}return-1}function jV(t,e){var r=t.prototype;function n(){}n.prototype=e.prototype,t.prototype=new n;for(var a in r)r.hasOwnProperty(a)&&(t.prototype[a]=r[a]);t.prototype.constructor=t,t.superClass=e}function Dr(t,e,r){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),a=0;a<n.length;a++){var i=n[a];i!=="constructor"&&(r?e[i]!=null:t[i]==null)&&(t[i]=e[i])}else Ue(t,e,r)}function Ut(t){return!t||typeof t=="string"?!1:typeof t.length=="number"}function z(t,e,r){if(!!(t&&e))if(t.forEach&&t.forEach===FV)t.forEach(e,r);else if(t.length===+t.length)for(var n=0,a=t.length;n<a;n++)e.call(r,t[n],n,t);else for(var i in t)t.hasOwnProperty(i)&&e.call(r,t[i],i,t)}function he(t,e,r){if(!t)return[];if(!e)return Xh(t);if(t.map&&t.map===HV)return t.map(e,r);for(var n=[],a=0,i=t.length;a<i;a++)n.push(e.call(r,t[a],a,t));return n}function Qn(t,e,r,n){if(!!(t&&e)){for(var a=0,i=t.length;a<i;a++)r=e.call(n,r,t[a],a,t);return r}}function Mt(t,e,r){if(!t)return[];if(!e)return Xh(t);if(t.filter&&t.filter===zV)return t.filter(e,r);for(var n=[],a=0,i=t.length;a<i;a++)e.call(r,t[a],a,t)&&n.push(t[a]);return n}function Fe(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);return e}function YV(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return function(){return t.apply(e,r.concat(Gh.call(arguments)))}}var Be=Yc&&Ee(Yc.bind)?Yc.call.bind(Yc.bind):YV;function qe(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return function(){return t.apply(this,e.concat(Gh.call(arguments)))}}function se(t){return Array.isArray?Array.isArray(t):hs.call(t)==="[object Array]"}function Ee(t){return typeof t=="function"}function ve(t){return typeof t=="string"}function qh(t){return hs.call(t)==="[object String]"}function We(t){return typeof t=="number"}function _e(t){var e=typeof t;return e==="function"||!!t&&e==="object"}function H_(t){return!!R_[hs.call(t)]}function Qt(t){return!!V_[hs.call(t)]}function Gc(t){return typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.ownerDocument=="object"}function Wc(t){return t.colorStops!=null}function GV(t){return t.image!=null}function Zc(t){return t!==t}function Ba(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0,n=t.length;r<n;r++)if(t[r]!=null)return t[r]}function Ae(t,e){return t!=null?t:e}function ps(t,e,r){return t!=null?t:e!=null?e:r}function Xh(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return Gh.apply(t,e)}function U_(t){if(typeof t=="number")return[t,t,t,t];var e=t.length;return e===2?[t[0],t[1],t[0],t[1]]:e===3?[t[0],t[1],t[2],t[1]]:t}function cr(t,e){if(!t)throw new Error(e)}function Kr(t){return t==null?null:typeof t.trim=="function"?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var j_="__ec_primitive__";function Kh(t){t[j_]=!0}function ms(t){return t[j_]}var WV=function(){function t(e){this.data={};var r=se(e);this.data={};var n=this;e instanceof t?e.each(a):e&&z(e,a);function a(i,o){r?n.set(i,o):n.set(o,i)}}return t.prototype.get=function(e){return this.data.hasOwnProperty(e)?this.data[e]:null},t.prototype.set=function(e,r){return this.data[e]=r},t.prototype.each=function(e,r){for(var n in this.data)this.data.hasOwnProperty(n)&&e.call(r,this.data[n],n)},t.prototype.keys=function(){return Fe(this.data)},t.prototype.removeKey=function(e){delete this.data[e]},t}();function Le(t){return new WV(t)}function ZV(t,e){for(var r=new t.constructor(t.length+e.length),n=0;n<t.length;n++)r[n]=t[n];for(var a=t.length,n=0;n<e.length;n++)r[n+a]=e[n];return r}function qc(t,e){var r;if(Object.create)r=Object.create(t);else{var n=function(){};n.prototype=t,r=new n}return e&&re(r,e),r}function Y_(t){var e=t.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function Yi(t,e){return t.hasOwnProperty(e)}function Pt(){}var Xc=180/Math.PI;/*! *****************************************************************************
33
+ Copyright (c) Microsoft Corporation.
34
+
35
+ Permission to use, copy, modify, and/or distribute this software for any
36
+ purpose with or without fee is hereby granted.
37
+
38
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
39
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
40
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
41
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
42
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
+ PERFORMANCE OF THIS SOFTWARE.
45
+ ***************************************************************************** */var Jh=function(t,e){return Jh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},Jh(t,e)};function Xe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Jh(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function Gi(t,e){return t==null&&(t=0),e==null&&(e=0),[t,e]}function qV(t){return[t[0],t[1]]}function G_(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function W_(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function XV(t){return Math.sqrt(KV(t))}function KV(t){return t[0]*t[0]+t[1]*t[1]}function Qh(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function ep(t,e){var r=XV(e);return r===0?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t}function tp(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var rp=tp;function JV(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var Wi=JV;function np(t,e,r,n){return t[0]=e[0]+n*(r[0]-e[0]),t[1]=e[1]+n*(r[1]-e[1]),t}function ur(t,e,r){var n=e[0],a=e[1];return t[0]=r[0]*n+r[2]*a+r[4],t[1]=r[1]*n+r[3]*a+r[5],t}function Zi(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t}function qi(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}var Xi=function(){function t(e,r){this.target=e,this.topTarget=r&&r.topTarget}return t}(),QV=function(){function t(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(e){for(var r=e.target;r&&!r.draggable;)r=r.parent||r.__hostTarget;r&&(this._draggingTarget=r,r.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Xi(r,e),"dragstart",e.event))},t.prototype._drag=function(e){var r=this._draggingTarget;if(r){var n=e.offsetX,a=e.offsetY,i=n-this._x,o=a-this._y;this._x=n,this._y=a,r.drift(i,o,e),this.handler.dispatchToElement(new Xi(r,e),"drag",e.event);var l=this.handler.findHover(n,a,r).target,c=this._dropTarget;this._dropTarget=l,r!==l&&(c&&l!==c&&this.handler.dispatchToElement(new Xi(c,e),"dragleave",e.event),l&&l!==c&&this.handler.dispatchToElement(new Xi(l,e),"dragenter",e.event))}},t.prototype._dragEnd=function(e){var r=this._draggingTarget;r&&(r.dragging=!1),this.handler.dispatchToElement(new Xi(r,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Xi(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},t}(),e9=QV,t9=function(){function t(e){e&&(this._$eventProcessor=e)}return t.prototype.on=function(e,r,n,a){this._$handlers||(this._$handlers={});var i=this._$handlers;if(typeof r=="function"&&(a=n,n=r,r=null),!n||!e)return this;var o=this._$eventProcessor;r!=null&&o&&o.normalizeQuery&&(r=o.normalizeQuery(r)),i[e]||(i[e]=[]);for(var l=0;l<i[e].length;l++)if(i[e][l].h===n)return this;var c={h:n,query:r,ctx:a||this,callAtLast:n.zrEventfulCallAtLast},u=i[e].length-1,f=i[e][u];return f&&f.callAtLast?i[e].splice(u,0,c):i[e].push(c),this},t.prototype.isSilent=function(e){var r=this._$handlers;return!r||!r[e]||!r[e].length},t.prototype.off=function(e,r){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(r){if(n[e]){for(var a=[],i=0,o=n[e].length;i<o;i++)n[e][i].h!==r&&a.push(n[e][i]);n[e]=a}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},t.prototype.trigger=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var a=this._$handlers[e],i=this._$eventProcessor;if(a)for(var o=r.length,l=a.length,c=0;c<l;c++){var u=a[c];if(!(i&&i.filter&&u.query!=null&&!i.filter(e,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,r[0]);break;case 2:u.h.call(u.ctx,r[0],r[1]);break;default:u.h.apply(u.ctx,r);break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},t.prototype.triggerWithContext=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var a=this._$handlers[e],i=this._$eventProcessor;if(a)for(var o=r.length,l=r[o-1],c=a.length,u=0;u<c;u++){var f=a[u];if(!(i&&i.filter&&f.query!=null&&!i.filter(e,f.query)))switch(o){case 0:f.h.call(l);break;case 1:f.h.call(l,r[0]);break;case 2:f.h.call(l,r[0],r[1]);break;default:f.h.apply(l,r.slice(1,o-1));break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},t}(),Jr=t9,r9=Math.log(2);function ap(t,e,r,n,a,i){var o=n+"-"+a,l=t.length;if(i.hasOwnProperty(o))return i[o];if(e===1){var c=Math.round(Math.log((1<<l)-1&~a)/r9);return t[r][c]}for(var u=n|1<<r,f=r+1;n&1<<f;)f++;for(var d=0,h=0,p=0;h<l;h++){var m=1<<h;m&a||(d+=(p%2?-1:1)*t[r][h]*ap(t,e-1,f,u,a|m,i),p++)}return i[o]=d,d}function Z_(t,e){var r=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],n={},a=ap(r,8,0,0,0,n);if(a!==0){for(var i=[],o=0;o<8;o++)for(var l=0;l<8;l++)i[l]==null&&(i[l]=0),i[l]+=((o+l)%2?-1:1)*ap(r,7,o===0?1:0,1<<o,1<<l,n)/a*e[o];return function(c,u,f){var d=u*i[6]+f*i[7]+1;c[0]=(u*i[0]+f*i[1]+i[2])/d,c[1]=(u*i[3]+f*i[4]+i[5])/d}}}var q_="___zrEVENTSAVED",ip=[];function n9(t,e,r,n,a){return op(ip,e,n,a,!0)&&op(t,r,ip[0],ip[1])}function op(t,e,r,n,a){if(e.getBoundingClientRect&&Pe.domSupported&&!X_(e)){var i=e[q_]||(e[q_]={}),o=a9(e,i),l=i9(o,i,a);if(l)return l(t,r,n),!0}return!1}function a9(t,e){var r=e.markers;if(r)return r;r=e.markers=[];for(var n=["left","right"],a=["top","bottom"],i=0;i<4;i++){var o=document.createElement("div"),l=o.style,c=i%2,u=(i>>1)%2;l.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[c]+":0",a[u]+":0",n[1-c]+":auto",a[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return r}function i9(t,e,r){for(var n=r?"invTrans":"trans",a=e[n],i=e.srcCoords,o=[],l=[],c=!0,u=0;u<4;u++){var f=t[u].getBoundingClientRect(),d=2*u,h=f.left,p=f.top;o.push(h,p),c=c&&i&&h===i[d]&&p===i[d+1],l.push(t[u].offsetLeft,t[u].offsetTop)}return c&&a?a:(e.srcCoords=o,e[n]=r?Z_(l,o):Z_(o,l))}function X_(t){return t.nodeName.toUpperCase()==="CANVAS"}var o9=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,sp=[],s9=Pe.browser.firefox&&+Pe.browser.version.split(".")[0]<39;function lp(t,e,r,n){return r=r||{},n?K_(t,e,r):s9&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):K_(t,e,r),r}function K_(t,e,r){if(Pe.domSupported&&t.getBoundingClientRect){var n=e.clientX,a=e.clientY;if(X_(t)){var i=t.getBoundingClientRect();r.zrX=n-i.left,r.zrY=a-i.top;return}else if(op(sp,t,n,a)){r.zrX=sp[0],r.zrY=sp[1];return}}r.zrX=r.zrY=0}function cp(t){return t||window.event}function fr(t,e,r){if(e=cp(e),e.zrX!=null)return e;var n=e.type,a=n&&n.indexOf("touch")>=0;if(a){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&lp(t,o,e,r)}else{lp(t,e,e,r);var i=l9(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var l=e.button;return e.which==null&&l!==void 0&&o9.test(e.type)&&(e.which=l&1?1:l&2?3:l&4?2:0),e}function l9(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,n=t.deltaY;if(r==null||n==null)return e;var a=Math.abs(n!==0?n:r),i=n>0?-1:n<0?1:r>0?-1:1;return 3*a*i}function c9(t,e,r,n){t.addEventListener(e,r,n)}function u9(t,e,r,n){t.removeEventListener(e,r,n)}var vs=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0},f9=function(){function t(){this._track=[]}return t.prototype.recognize=function(e,r,n){return this._doTrack(e,r,n),this._recognize(e)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(e,r,n){var a=e.touches;if(!!a){for(var i={points:[],touches:[],target:r,event:e},o=0,l=a.length;o<l;o++){var c=a[o],u=lp(n,c,{});i.points.push([u.zrX,u.zrY]),i.touches.push(c)}this._track.push(i)}},t.prototype._recognize=function(e){for(var r in up)if(up.hasOwnProperty(r)){var n=up[r](this._track,e);if(n)return n}},t}();function J_(t){var e=t[1][0]-t[0][0],r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}function d9(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var up={pinch:function(t,e){var r=t.length;if(!!r){var n=(t[r-1]||{}).points,a=(t[r-2]||{}).points||n;if(a&&a.length>1&&n&&n.length>1){var i=J_(n)/J_(a);!isFinite(i)&&(i=1),e.pinchScale=i;var o=d9(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},Q_="silent";function h9(t,e,r){return{type:t,event:r,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:p9}}function p9(){vs(this.event)}var m9=function(t){Xe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.handler=null,r}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Jr),gs=function(){function t(e,r){this.x=e,this.y=r}return t}(),v9=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ew=function(t){Xe(e,t);function e(r,n,a,i){var o=t.call(this)||this;return o._hovered=new gs(0,0),o.storage=r,o.painter=n,o.painterRoot=i,a=a||new m9,o.proxy=null,o.setHandlerProxy(a),o._draggingMgr=new e9(o),o}return e.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(z(v9,function(n){r.on&&r.on(n,this[n],this)},this),r.handler=this),this.proxy=r},e.prototype.mousemove=function(r){var n=r.zrX,a=r.zrY,i=tw(this,n,a),o=this._hovered,l=o.target;l&&!l.__zr&&(o=this.findHover(o.x,o.y),l=o.target);var c=this._hovered=i?new gs(n,a):this.findHover(n,a),u=c.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),l&&u!==l&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(c,"mousemove",r),u&&u!==l&&this.dispatchToElement(c,"mouseover",r)},e.prototype.mouseout=function(r){var n=r.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},e.prototype.resize=function(){this._hovered=new gs(0,0)},e.prototype.dispatch=function(r,n){var a=this[r];a&&a.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(r){var n=this.proxy;n.setCursor&&n.setCursor(r)},e.prototype.dispatchToElement=function(r,n,a){r=r||{};var i=r.target;if(!(i&&i.silent)){for(var o="on"+n,l=h9(n,r,a);i&&(i[o]&&(l.cancelBubble=!!i[o].call(i,l)),i.trigger(n,l),i=i.__hostTarget?i.__hostTarget:i.parent,!l.cancelBubble););l.cancelBubble||(this.trigger(n,l),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(c){typeof c[o]=="function"&&c[o].call(c,l),c.trigger&&c.trigger(n,l)}))}},e.prototype.findHover=function(r,n,a){for(var i=this.storage.getDisplayList(),o=new gs(r,n),l=i.length-1;l>=0;l--){var c=void 0;if(i[l]!==a&&!i[l].ignore&&(c=g9(i[l],r,n))&&(!o.topTarget&&(o.topTarget=i[l]),c!==Q_)){o.target=i[l];break}}return o},e.prototype.processGesture=function(r,n){this._gestureMgr||(this._gestureMgr=new f9);var a=this._gestureMgr;n==="start"&&a.clear();var i=a.recognize(r,this.findHover(r.zrX,r.zrY,null).target,this.proxy.dom);if(n==="end"&&a.clear(),i){var o=i.type;r.gestureEvent=o;var l=new gs;l.target=i.target,this.dispatchToElement(l,o,i.event)}},e}(Jr);z(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){ew.prototype[t]=function(e){var r=e.zrX,n=e.zrY,a=tw(this,r,n),i,o;if((t!=="mouseup"||!a)&&(i=this.findHover(r,n),o=i.target),t==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(t==="mouseup")this._upEl=o;else if(t==="click"){if(this._downEl!==this._upEl||!this._downPoint||rp(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}});function g9(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var n=t,a=void 0,i=!1;n;){if(n.ignoreClip&&(i=!0),!i){var o=n.getClipPath();if(o&&!o.contain(e,r))return!1;n.silent&&(a=!0)}var l=n.__hostTarget;n=l||n.parent}return a?Q_:!0}return!1}function tw(t,e,r){var n=t.painter;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}var y9=ew,rw=32,ys=7;function _9(t){for(var e=0;t>=rw;)e|=t&1,t>>=1;return t+e}function nw(t,e,r,n){var a=e+1;if(a===r)return 1;if(n(t[a++],t[e])<0){for(;a<r&&n(t[a],t[a-1])<0;)a++;w9(t,e,a)}else for(;a<r&&n(t[a],t[a-1])>=0;)a++;return a-e}function w9(t,e,r){for(r--;e<r;){var n=t[e];t[e++]=t[r],t[r--]=n}}function aw(t,e,r,n,a){for(n===e&&n++;n<r;n++){for(var i=t[n],o=e,l=n,c;o<l;)c=o+l>>>1,a(i,t[c])<0?l=c:o=c+1;var u=n-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=i}}function fp(t,e,r,n,a,i){var o=0,l=0,c=1;if(i(t,e[r+a])>0){for(l=n-a;c<l&&i(t,e[r+a+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=l);c>l&&(c=l),o+=a,c+=a}else{for(l=a+1;c<l&&i(t,e[r+a-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=l);c>l&&(c=l);var u=o;o=a-c,c=a-u}for(o++;o<c;){var f=o+(c-o>>>1);i(t,e[r+f])>0?o=f+1:c=f}return c}function dp(t,e,r,n,a,i){var o=0,l=0,c=1;if(i(t,e[r+a])<0){for(l=a+1;c<l&&i(t,e[r+a-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=l);c>l&&(c=l);var u=o;o=a-c,c=a-u}else{for(l=n-a;c<l&&i(t,e[r+a+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=l);c>l&&(c=l),o+=a,c+=a}for(o++;o<c;){var f=o+(c-o>>>1);i(t,e[r+f])<0?c=f:o=f+1}return c}function b9(t,e){var r=ys,n,a,i=0,o=[];n=[],a=[];function l(p,m){n[i]=p,a[i]=m,i+=1}function c(){for(;i>1;){var p=i-2;if(p>=1&&a[p-1]<=a[p]+a[p+1]||p>=2&&a[p-2]<=a[p]+a[p-1])a[p-1]<a[p+1]&&p--;else if(a[p]>a[p+1])break;f(p)}}function u(){for(;i>1;){var p=i-2;p>0&&a[p-1]<a[p+1]&&p--,f(p)}}function f(p){var m=n[p],v=a[p],g=n[p+1],y=a[p+1];a[p]=v+y,p===i-3&&(n[p+1]=n[p+2],a[p+1]=a[p+2]),i--;var _=dp(t[g],t,m,v,0,e);m+=_,v-=_,v!==0&&(y=fp(t[m+v-1],t,g,y,y-1,e),y!==0&&(v<=y?d(m,v,g,y):h(m,v,g,y)))}function d(p,m,v,g){var y=0;for(y=0;y<m;y++)o[y]=t[p+y];var _=0,w=v,S=p;if(t[S++]=t[w++],--g==0){for(y=0;y<m;y++)t[S+y]=o[_+y];return}if(m===1){for(y=0;y<g;y++)t[S+y]=t[w+y];t[S+g]=o[_];return}for(var x=r,b,C,k;;){b=0,C=0,k=!1;do if(e(t[w],o[_])<0){if(t[S++]=t[w++],C++,b=0,--g==0){k=!0;break}}else if(t[S++]=o[_++],b++,C=0,--m==1){k=!0;break}while((b|C)<x);if(k)break;do{if(b=dp(t[w],o,_,m,0,e),b!==0){for(y=0;y<b;y++)t[S+y]=o[_+y];if(S+=b,_+=b,m-=b,m<=1){k=!0;break}}if(t[S++]=t[w++],--g==0){k=!0;break}if(C=fp(o[_],t,w,g,0,e),C!==0){for(y=0;y<C;y++)t[S+y]=t[w+y];if(S+=C,w+=C,g-=C,g===0){k=!0;break}}if(t[S++]=o[_++],--m==1){k=!0;break}x--}while(b>=ys||C>=ys);if(k)break;x<0&&(x=0),x+=2}if(r=x,r<1&&(r=1),m===1){for(y=0;y<g;y++)t[S+y]=t[w+y];t[S+g]=o[_]}else{if(m===0)throw new Error;for(y=0;y<m;y++)t[S+y]=o[_+y]}}function h(p,m,v,g){var y=0;for(y=0;y<g;y++)o[y]=t[v+y];var _=p+m-1,w=g-1,S=v+g-1,x=0,b=0;if(t[S--]=t[_--],--m==0){for(x=S-(g-1),y=0;y<g;y++)t[x+y]=o[y];return}if(g===1){for(S-=m,_-=m,b=S+1,x=_+1,y=m-1;y>=0;y--)t[b+y]=t[x+y];t[S]=o[w];return}for(var C=r;;){var k=0,$=0,N=!1;do if(e(o[w],t[_])<0){if(t[S--]=t[_--],k++,$=0,--m==0){N=!0;break}}else if(t[S--]=o[w--],$++,k=0,--g==1){N=!0;break}while((k|$)<C);if(N)break;do{if(k=m-dp(o[w],t,p,m,m-1,e),k!==0){for(S-=k,_-=k,m-=k,b=S+1,x=_+1,y=k-1;y>=0;y--)t[b+y]=t[x+y];if(m===0){N=!0;break}}if(t[S--]=o[w--],--g==1){N=!0;break}if($=g-fp(t[_],o,0,g,g-1,e),$!==0){for(S-=$,w-=$,g-=$,b=S+1,x=w+1,y=0;y<$;y++)t[b+y]=o[x+y];if(g<=1){N=!0;break}}if(t[S--]=t[_--],--m==0){N=!0;break}C--}while(k>=ys||$>=ys);if(N)break;C<0&&(C=0),C+=2}if(r=C,r<1&&(r=1),g===1){for(S-=m,_-=m,b=S+1,x=_+1,y=m-1;y>=0;y--)t[b+y]=t[x+y];t[S]=o[w]}else{if(g===0)throw new Error;for(x=S-(g-1),y=0;y<g;y++)t[x+y]=o[y]}}return{mergeRuns:c,forceMergeRuns:u,pushRun:l}}function Kc(t,e,r,n){r||(r=0),n||(n=t.length);var a=n-r;if(!(a<2)){var i=0;if(a<rw){i=nw(t,r,n,e),aw(t,r,n,r+i,e);return}var o=b9(t,e),l=_9(a);do{if(i=nw(t,r,n,e),i<l){var c=a;c>l&&(c=l),aw(t,r,r+c,r+i,e),i=c}o.pushRun(r,i),o.mergeRuns(),a-=i,r+=i}while(a!==0);o.forceMergeRuns()}}var er=1,_s=2,Ki=4,iw=!1;function hp(){iw||(iw=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function ow(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var S9=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=ow}return t.prototype.traverse=function(e,r){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,r)},t.prototype.getDisplayList=function(e,r){r=r||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(r),n},t.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var r=this._roots,n=this._displayList,a=0,i=r.length;a<i;a++)this._updateAndAddDisplayable(r[a],null,e);n.length=this._displayListLen,Kc(n,ow)},t.prototype._updateAndAddDisplayable=function(e,r,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var a=e.getClipPath();if(e.ignoreClip)r=null;else if(a){r?r=r.slice():r=[];for(var i=a,o=e;i;)i.parent=o,i.updateTransform(),r.push(i),o=i,i=i.getClipPath()}if(e.childrenRef){for(var l=e.childrenRef(),c=0;c<l.length;c++){var u=l[c];e.__dirty&&(u.__dirty|=er),this._updateAndAddDisplayable(u,r,n)}e.__dirty=0}else{var f=e;r&&r.length?f.__clipPaths=r:f.__clipPaths&&f.__clipPaths.length>0&&(f.__clipPaths=[]),isNaN(f.z)&&(hp(),f.z=0),isNaN(f.z2)&&(hp(),f.z2=0),isNaN(f.zlevel)&&(hp(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var d=e.getDecalElement&&e.getDecalElement();d&&this._updateAndAddDisplayable(d,r,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,r,n);var p=e.getTextContent();p&&this._updateAndAddDisplayable(p,r,n)}},t.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},t.prototype.delRoot=function(e){if(e instanceof Array){for(var r=0,n=e.length;r<n;r++)this.delRoot(e[r]);return}var a=Ge(this._roots,e);a>=0&&this._roots.splice(a,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),x9=S9,sw;sw=Pe.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var pp=sw,Jc={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=1.70158*1.525;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Jc.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?Jc.bounceIn(t*2)*.5:Jc.bounceOut(t*2-1)*.5+.5}},lw=Jc,Qc=Math.pow,ea=Math.sqrt,eu=1e-8,cw=1e-4,uw=ea(3),tu=1/3,Qr=Gi(),dr=Gi(),Ji=Gi();function ta(t){return t>-eu&&t<eu}function fw(t){return t>eu||t<-eu}function gt(t,e,r,n,a){var i=1-a;return i*i*(i*t+3*a*e)+a*a*(a*n+3*i*r)}function dw(t,e,r,n,a){var i=1-a;return 3*(((e-t)*i+2*(r-e)*a)*i+(n-r)*a*a)}function ru(t,e,r,n,a,i){var o=n+3*(e-r)-t,l=3*(r-e*2+t),c=3*(e-t),u=t-a,f=l*l-3*o*c,d=l*c-9*o*u,h=c*c-3*l*u,p=0;if(ta(f)&&ta(d))if(ta(l))i[0]=0;else{var m=-c/l;m>=0&&m<=1&&(i[p++]=m)}else{var v=d*d-4*f*h;if(ta(v)){var g=d/f,m=-l/o+g,y=-g/2;m>=0&&m<=1&&(i[p++]=m),y>=0&&y<=1&&(i[p++]=y)}else if(v>0){var _=ea(v),w=f*l+1.5*o*(-d+_),S=f*l+1.5*o*(-d-_);w<0?w=-Qc(-w,tu):w=Qc(w,tu),S<0?S=-Qc(-S,tu):S=Qc(S,tu);var m=(-l-(w+S))/(3*o);m>=0&&m<=1&&(i[p++]=m)}else{var x=(2*f*l-3*o*d)/(2*ea(f*f*f)),b=Math.acos(x)/3,C=ea(f),k=Math.cos(b),m=(-l-2*C*k)/(3*o),y=(-l+C*(k+uw*Math.sin(b)))/(3*o),$=(-l+C*(k-uw*Math.sin(b)))/(3*o);m>=0&&m<=1&&(i[p++]=m),y>=0&&y<=1&&(i[p++]=y),$>=0&&$<=1&&(i[p++]=$)}}return p}function hw(t,e,r,n,a){var i=6*r-12*e+6*t,o=9*e+3*n-3*t-9*r,l=3*e-3*t,c=0;if(ta(o)){if(fw(i)){var u=-l/i;u>=0&&u<=1&&(a[c++]=u)}}else{var f=i*i-4*o*l;if(ta(f))a[0]=-i/(2*o);else if(f>0){var d=ea(f),u=(-i+d)/(2*o),h=(-i-d)/(2*o);u>=0&&u<=1&&(a[c++]=u),h>=0&&h<=1&&(a[c++]=h)}}return c}function nu(t,e,r,n,a,i){var o=(e-t)*a+t,l=(r-e)*a+e,c=(n-r)*a+r,u=(l-o)*a+o,f=(c-l)*a+l,d=(f-u)*a+u;i[0]=t,i[1]=o,i[2]=u,i[3]=d,i[4]=d,i[5]=f,i[6]=c,i[7]=n}function C9(t,e,r,n,a,i,o,l,c,u,f){var d,h=.005,p=1/0,m,v,g,y;Qr[0]=c,Qr[1]=u;for(var _=0;_<1;_+=.05)dr[0]=gt(t,r,a,o,_),dr[1]=gt(e,n,i,l,_),g=Wi(Qr,dr),g<p&&(d=_,p=g);p=1/0;for(var w=0;w<32&&!(h<cw);w++)m=d-h,v=d+h,dr[0]=gt(t,r,a,o,m),dr[1]=gt(e,n,i,l,m),g=Wi(dr,Qr),m>=0&&g<p?(d=m,p=g):(Ji[0]=gt(t,r,a,o,v),Ji[1]=gt(e,n,i,l,v),y=Wi(Ji,Qr),v<=1&&y<p?(d=v,p=y):h*=.5);return f&&(f[0]=gt(t,r,a,o,d),f[1]=gt(e,n,i,l,d)),ea(p)}function k9(t,e,r,n,a,i,o,l,c){for(var u=t,f=e,d=0,h=1/c,p=1;p<=c;p++){var m=p*h,v=gt(t,r,a,o,m),g=gt(e,n,i,l,m),y=v-u,_=g-f;d+=Math.sqrt(y*y+_*_),u=v,f=g}return d}function $t(t,e,r,n){var a=1-n;return a*(a*t+2*n*e)+n*n*r}function pw(t,e,r,n){return 2*((1-n)*(e-t)+n*(r-e))}function T9(t,e,r,n,a){var i=t-2*e+r,o=2*(e-t),l=t-n,c=0;if(ta(i)){if(fw(o)){var u=-l/o;u>=0&&u<=1&&(a[c++]=u)}}else{var f=o*o-4*i*l;if(ta(f)){var u=-o/(2*i);u>=0&&u<=1&&(a[c++]=u)}else if(f>0){var d=ea(f),u=(-o+d)/(2*i),h=(-o-d)/(2*i);u>=0&&u<=1&&(a[c++]=u),h>=0&&h<=1&&(a[c++]=h)}}return c}function mw(t,e,r){var n=t+r-2*e;return n===0?.5:(t-e)/n}function au(t,e,r,n,a){var i=(e-t)*n+t,o=(r-e)*n+e,l=(o-i)*n+i;a[0]=t,a[1]=i,a[2]=l,a[3]=l,a[4]=o,a[5]=r}function M9(t,e,r,n,a,i,o,l,c){var u,f=.005,d=1/0;Qr[0]=o,Qr[1]=l;for(var h=0;h<1;h+=.05){dr[0]=$t(t,r,a,h),dr[1]=$t(e,n,i,h);var p=Wi(Qr,dr);p<d&&(u=h,d=p)}d=1/0;for(var m=0;m<32&&!(f<cw);m++){var v=u-f,g=u+f;dr[0]=$t(t,r,a,v),dr[1]=$t(e,n,i,v);var p=Wi(dr,Qr);if(v>=0&&p<d)u=v,d=p;else{Ji[0]=$t(t,r,a,g),Ji[1]=$t(e,n,i,g);var y=Wi(Ji,Qr);g<=1&&y<d?(u=g,d=y):f*=.5}}return c&&(c[0]=$t(t,r,a,u),c[1]=$t(e,n,i,u)),ea(d)}function $9(t,e,r,n,a,i,o){for(var l=t,c=e,u=0,f=1/o,d=1;d<=o;d++){var h=d*f,p=$t(t,r,a,h),m=$t(e,n,i,h),v=p-l,g=m-c;u+=Math.sqrt(v*v+g*g),l=p,c=m}return u}var N9=/cubic-bezier\(([0-9,\.e ]+)\)/;function mp(t){var e=t&&N9.exec(t);if(e){var r=e[1].split(","),n=+Kr(r[0]),a=+Kr(r[1]),i=+Kr(r[2]),o=+Kr(r[3]);if(isNaN(n+a+i+o))return;var l=[];return function(c){return c<=0?0:c>=1?1:ru(0,n,i,1,c,l)&&gt(0,a,o,1,l[0])}}}var E9=function(){function t(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Pt,this.ondestroy=e.ondestroy||Pt,this.onrestart=e.onrestart||Pt,e.easing&&this.setEasing(e.easing)}return t.prototype.step=function(e,r){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,a=e-this._startTime-this._pausedTime,i=a/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,l=o?o(i):i;if(this.onframe(l),i===1)if(this.loop){var c=a%n;this._startTime=e-c,this._pausedTime=0,this.onrestart()}else return!0;return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Ee(e)?e:lw[e]||mp(e)},t}(),A9=E9,vw=function(){function t(e){this.value=e}return t}(),D9=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new vw(e);return this.insertEntry(r),r},t.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},t.prototype.remove=function(e){var r=e.prev,n=e.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),O9=function(){function t(e){this._list=new D9,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var n=this._list,a=this._map,i=null;if(a[e]==null){var o=n.len(),l=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var c=n.head;n.remove(c),delete a[c.key],i=c.value,this._lastRemovedEntry=c}l?l.value=r:l=new vw(r),l.key=e,n.insertEntry(l),a[e]=l}return i},t.prototype.get=function(e){var r=this._map[e],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),ws=O9,gw={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 Or(t){return t=Math.round(t),t<0?0:t>255?255:t}function L9(t){return t=Math.round(t),t<0?0:t>360?360:t}function bs(t){return t<0?0:t>1?1:t}function vp(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Or(parseFloat(e)/100*255):Or(parseInt(e,10))}function Qi(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?bs(parseFloat(e)/100):bs(parseFloat(e))}function gp(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function ra(t,e,r){return t+(e-t)*r}function hr(t,e,r,n,a){return t[0]=e,t[1]=r,t[2]=n,t[3]=a,t}function yp(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var yw=new ws(20),iu=null;function eo(t,e){iu&&yp(iu,e),iu=yw.put(t,iu||e.slice())}function tr(t,e){if(!!t){e=e||[];var r=yw.get(t);if(r)return yp(e,r);t=t+"";var n=t.replace(/ /g,"").toLowerCase();if(n in gw)return yp(e,gw[n]),eo(t,e),e;var a=n.length;if(n.charAt(0)==="#"){if(a===4||a===5){var i=parseInt(n.slice(1,4),16);if(!(i>=0&&i<=4095)){hr(e,0,0,0,1);return}return hr(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,a===5?parseInt(n.slice(4),16)/15:1),eo(t,e),e}else if(a===7||a===9){var i=parseInt(n.slice(1,7),16);if(!(i>=0&&i<=16777215)){hr(e,0,0,0,1);return}return hr(e,(i&16711680)>>16,(i&65280)>>8,i&255,a===9?parseInt(n.slice(7),16)/255:1),eo(t,e),e}return}var o=n.indexOf("("),l=n.indexOf(")");if(o!==-1&&l+1===a){var c=n.substr(0,o),u=n.substr(o+1,l-(o+1)).split(","),f=1;switch(c){case"rgba":if(u.length!==4)return u.length===3?hr(e,+u[0],+u[1],+u[2],1):hr(e,0,0,0,1);f=Qi(u.pop());case"rgb":if(u.length!==3){hr(e,0,0,0,1);return}return hr(e,vp(u[0]),vp(u[1]),vp(u[2]),f),eo(t,e),e;case"hsla":if(u.length!==4){hr(e,0,0,0,1);return}return u[3]=Qi(u[3]),_p(u,e),eo(t,e),e;case"hsl":if(u.length!==3){hr(e,0,0,0,1);return}return _p(u,e),eo(t,e),e;default:return}}hr(e,0,0,0,1)}}function _p(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=Qi(t[1]),a=Qi(t[2]),i=a<=.5?a*(n+1):a+n-a*n,o=a*2-i;return e=e||[],hr(e,Or(gp(o,i,r+1/3)*255),Or(gp(o,i,r)*255),Or(gp(o,i,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function P9(t){if(!!t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,a=Math.min(e,r,n),i=Math.max(e,r,n),o=i-a,l=(i+a)/2,c,u;if(o===0)c=0,u=0;else{l<.5?u=o/(i+a):u=o/(2-i-a);var f=((i-e)/6+o/2)/o,d=((i-r)/6+o/2)/o,h=((i-n)/6+o/2)/o;e===i?c=h-d:r===i?c=1/3+f-h:n===i&&(c=2/3+d-f),c<0&&(c+=1),c>1&&(c-=1)}var p=[c*360,u,l];return t[3]!=null&&p.push(t[3]),p}}function _w(t,e){var r=tr(t);if(r){for(var n=0;n<3;n++)e<0?r[n]=r[n]*(1-e)|0:r[n]=(255-r[n])*e+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return Mn(r,r.length===4?"rgba":"rgb")}}function wp(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){r=r||[];var n=t*(e.length-1),a=Math.floor(n),i=Math.ceil(n),o=e[a],l=e[i],c=n-a;return r[0]=Or(ra(o[0],l[0],c)),r[1]=Or(ra(o[1],l[1],c)),r[2]=Or(ra(o[2],l[2],c)),r[3]=bs(ra(o[3],l[3],c)),r}}function B9(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var n=t*(e.length-1),a=Math.floor(n),i=Math.ceil(n),o=tr(e[a]),l=tr(e[i]),c=n-a,u=Mn([Or(ra(o[0],l[0],c)),Or(ra(o[1],l[1],c)),Or(ra(o[2],l[2],c)),bs(ra(o[3],l[3],c))],"rgba");return r?{color:u,leftIndex:a,rightIndex:i,value:n}:u}}function bp(t,e,r,n){var a=tr(t);if(t)return a=P9(a),e!=null&&(a[0]=L9(e)),r!=null&&(a[1]=Qi(r)),n!=null&&(a[2]=Qi(n)),Mn(_p(a),"rgba")}function I9(t,e){var r=tr(t);if(r&&e!=null)return r[3]=bs(e),Mn(r,"rgba")}function Mn(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}function ou(t,e){var r=tr(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}var su=Math.round;function to(t){var e;if(!t||t==="transparent")t="none";else if(typeof t=="string"&&t.indexOf("rgba")>-1){var r=tr(t);r&&(t="rgb("+r[0]+","+r[1]+","+r[2]+")",e=r[3])}return{color:t,opacity:e==null?1:e}}var ww=1e-4;function na(t){return t<ww&&t>-ww}function lu(t){return su(t*1e3)/1e3}function Sp(t){return su(t*1e4)/1e4}function R9(t){return"matrix("+lu(t[0])+","+lu(t[1])+","+lu(t[2])+","+lu(t[3])+","+Sp(t[4])+","+Sp(t[5])+")"}var V9={left:"start",right:"end",center:"middle",middle:"middle"};function F9(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function z9(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function H9(t){var e=t.style,r=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function bw(t){return t&&!!t.image}function U9(t){return t&&!!t.svgElement}function j9(t){return bw(t)||U9(t)}function Sw(t){return t.type==="linear"}function xw(t){return t.type==="radial"}function Y9(t){return t&&(t.type==="linear"||t.type==="radial")}function cu(t){return"url(#"+t+")"}function Cw(t){var e=t.getGlobalScale(),r=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function kw(t){var e=t.x||0,r=t.y||0,n=(t.rotation||0)*Xc,a=Ae(t.scaleX,1),i=Ae(t.scaleY,1),o=t.skewX||0,l=t.skewY||0,c=[];return(e||r)&&c.push("translate("+e+"px,"+r+"px)"),n&&c.push("rotate("+n+")"),(a!==1||i!==1)&&c.push("scale("+a+","+i+")"),(o||l)&&c.push("skew("+su(o*Xc)+"deg, "+su(l*Xc)+"deg)"),c.join(" ")}var G9=function(){return Pe.hasGlobalWindow&&Ee(window.btoa)?function(t){return window.btoa(unescape(t))}:typeof Buffer!="undefined"?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}}(),xp=Array.prototype.slice;function $n(t,e,r){return(e-t)*r+t}function Cp(t,e,r,n){for(var a=e.length,i=0;i<a;i++)t[i]=$n(e[i],r[i],n);return t}function W9(t,e,r,n){for(var a=e.length,i=a&&e[0].length,o=0;o<a;o++){t[o]||(t[o]=[]);for(var l=0;l<i;l++)t[o][l]=$n(e[o][l],r[o][l],n)}return t}function uu(t,e,r,n){for(var a=e.length,i=0;i<a;i++)t[i]=e[i]+r[i]*n;return t}function Tw(t,e,r,n){for(var a=e.length,i=a&&e[0].length,o=0;o<a;o++){t[o]||(t[o]=[]);for(var l=0;l<i;l++)t[o][l]=e[o][l]+r[o][l]*n}return t}function Z9(t,e){for(var r=t.length,n=e.length,a=r>n?e:t,i=Math.min(r,n),o=a[i-1]||{color:[0,0,0,0],offset:0},l=i;l<Math.max(r,n);l++)a.push({offset:o.offset,color:o.color.slice()})}function q9(t,e,r){var n=t,a=e;if(!(!n.push||!a.push)){var i=n.length,o=a.length;if(i!==o){var l=i>o;if(l)n.length=o;else for(var c=i;c<o;c++)n.push(r===1?a[c]:xp.call(a[c]))}for(var u=n[0]&&n[0].length,c=0;c<n.length;c++)if(r===1)isNaN(n[c])&&(n[c]=a[c]);else for(var f=0;f<u;f++)isNaN(n[c][f])&&(n[c][f]=a[c][f])}}function fu(t){if(Ut(t)){var e=t.length;if(Ut(t[0])){for(var r=[],n=0;n<e;n++)r.push(xp.call(t[n]));return r}return xp.call(t)}return t}function du(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=t[3]==null?1:t[3],"rgba("+t.join(",")+")"}function X9(t){return Ut(t&&t[0])?2:1}var hu=0,pu=1,Mw=2,Ss=3,kp=4,Tp=5,$w=6;function Nw(t){return t===kp||t===Tp}function mu(t){return t===pu||t===Mw}var xs=[0,0,0,0],K9=function(){function t(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return this.keyframes.length>=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(e,r,n){this._needsSort=!0;var a=this.keyframes,i=a.length,o=!1,l=$w,c=r;if(Ut(r)){var u=X9(r);l=u,(u===1&&!We(r[0])||u===2&&!We(r[0][0]))&&(o=!0)}else if(We(r)&&!Zc(r))l=hu;else if(ve(r))if(!isNaN(+r))l=hu;else{var f=tr(r);f&&(c=f,l=Ss)}else if(Wc(r)){var d=re({},c);d.colorStops=he(r.colorStops,function(p){return{offset:p.offset,color:tr(p.color)}}),Sw(r)?l=kp:xw(r)&&(l=Tp),c=d}i===0?this.valType=l:(l!==this.valType||l===$w)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:c,rawValue:r,percent:0};return n&&(h.easing=n,h.easingFunc=Ee(n)?n:lw[n]||mp(n)),a.push(h),h},t.prototype.prepare=function(e,r){var n=this.keyframes;this._needsSort&&n.sort(function(v,g){return v.time-g.time});for(var a=this.valType,i=n.length,o=n[i-1],l=this.discrete,c=mu(a),u=Nw(a),f=0;f<i;f++){var d=n[f],h=d.value,p=o.value;d.percent=d.time/e,l||(c&&f!==i-1?q9(h,p,a):u&&Z9(h.colorStops,p.colorStops))}if(!l&&a!==Tp&&r&&this.needsAnimate()&&r.needsAnimate()&&a===r.valType&&!r._finished){this._additiveTrack=r;for(var m=n[0].value,f=0;f<i;f++)a===hu?n[f].additiveValue=n[f].value-m:a===Ss?n[f].additiveValue=uu([],n[f].value,m,-1):mu(a)&&(n[f].additiveValue=a===pu?uu([],n[f].value,m,-1):Tw([],n[f].value,m,-1))}},t.prototype.step=function(e,r){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,a=n?"additiveValue":"value",i=this.valType,o=this.keyframes,l=o.length,c=this.propName,u=i===Ss,f,d=this._lastFr,h=Math.min,p,m;if(l===1)p=m=o[0];else{if(r<0)f=0;else if(r<this._lastFrP){var v=h(d+1,l-1);for(f=v;f>=0&&!(o[f].percent<=r);f--);f=h(f,l-2)}else{for(f=d;f<l&&!(o[f].percent>r);f++);f=h(f-1,l-2)}m=o[f+1],p=o[f]}if(!!(p&&m)){this._lastFr=f,this._lastFrP=r;var g=m.percent-p.percent,y=g===0?1:h((r-p.percent)/g,1);m.easingFunc&&(y=m.easingFunc(y));var _=n?this._additiveValue:u?xs:e[c];if((mu(i)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)e[c]=y<1?p.rawValue:m.rawValue;else if(mu(i))i===pu?Cp(_,p[a],m[a],y):W9(_,p[a],m[a],y);else if(Nw(i)){var w=p[a],S=m[a],x=i===kp;e[c]={type:x?"linear":"radial",x:$n(w.x,S.x,y),y:$n(w.y,S.y,y),colorStops:he(w.colorStops,function(C,k){var $=S.colorStops[k];return{offset:$n(C.offset,$.offset,y),color:du(Cp([],C.color,$.color,y))}}),global:S.global},x?(e[c].x2=$n(w.x2,S.x2,y),e[c].y2=$n(w.y2,S.y2,y)):e[c].r=$n(w.r,S.r,y)}else if(u)Cp(_,p[a],m[a],y),n||(e[c]=du(_));else{var b=$n(p[a],m[a],y);n?this._additiveValue=b:e[c]=b}n&&this._addToTarget(e)}}},t.prototype._addToTarget=function(e){var r=this.valType,n=this.propName,a=this._additiveValue;r===hu?e[n]=e[n]+a:r===Ss?(tr(e[n],xs),uu(xs,xs,a,1),e[n]=du(xs)):r===pu?uu(e[n],e[n],a,1):r===Mw&&Tw(e[n],e[n],a,1)},t}(),J9=function(){function t(e,r,n,a){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=r,r&&a){Zh("Can' use additive animation on looped animation.");return}this._additiveAnimators=a,this._allowDiscrete=n}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(e){this._target=e},t.prototype.when=function(e,r,n){return this.whenWithKeys(e,r,Fe(r),n)},t.prototype.whenWithKeys=function(e,r,n,a){for(var i=this._tracks,o=0;o<n.length;o++){var l=n[o],c=i[l];if(!c){c=i[l]=new K9(l);var u=void 0,f=this._getAdditiveTrack(l);if(f){var d=f.keyframes,h=d[d.length-1];u=h&&h.value,f.valType===Ss&&u&&(u=du(u))}else u=this._target[l];if(u==null)continue;e>0&&c.addKeyframe(0,fu(u),a),this._trackKeys.push(l)}c.addKeyframe(e,fu(r[l]),a)}return this._maxTime=Math.max(this._maxTime,e),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var r=e.length,n=0;n<r;n++)e[n].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,r=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,r)for(var n=0;n<r.length;n++)r[n].call(this)},t.prototype._setTracksFinished=function(){for(var e=this._tracks,r=this._trackKeys,n=0;n<r.length;n++)e[r[n]].setFinished()},t.prototype._getAdditiveTrack=function(e){var r,n=this._additiveAnimators;if(n)for(var a=0;a<n.length;a++){var i=n[a].getTrack(e);i&&(r=i)}return r},t.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var r=this,n=[],a=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var o=this._trackKeys[i],l=this._tracks[o],c=this._getAdditiveTrack(o),u=l.keyframes,f=u.length;if(l.prepare(a,c),l.needsAnimate())if(!this._allowDiscrete&&l.discrete){var d=u[f-1];d&&(r._target[l.propName]=d.rawValue),l.setFinished()}else n.push(l)}if(n.length||this._force){var h=new A9({life:a,loop:this._loop,delay:this._delay||0,onframe:function(p){r._started=2;var m=r._additiveAnimators;if(m){for(var v=!1,g=0;g<m.length;g++)if(m[g]._clip){v=!0;break}v||(r._additiveAnimators=null)}for(var g=0;g<n.length;g++)n[g].step(r._target,p);var y=r._onframeCbs;if(y)for(var g=0;g<y.length;g++)y[g](r._target,p)},ondestroy:function(){r._doneCallback()}});this._clip=h,this.animation&&this.animation.addClip(h),e&&h.setEasing(e)}else this._doneCallback();return this}},t.prototype.stop=function(e){if(!!this._clip){var r=this._clip;e&&r.onframe(1),this._abortedCallback()}},t.prototype.delay=function(e){return this._delay=e,this},t.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},t.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},t.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},t.prototype.getClip=function(){return this._clip},t.prototype.getTrack=function(e){return this._tracks[e]},t.prototype.getTracks=function(){var e=this;return he(this._trackKeys,function(r){return e._tracks[r]})},t.prototype.stopTracks=function(e,r){if(!e.length||!this._clip)return!0;for(var n=this._tracks,a=this._trackKeys,i=0;i<e.length;i++){var o=n[e[i]];o&&!o.isFinished()&&(r?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var l=!0,i=0;i<a.length;i++)if(!n[a[i]].isFinished()){l=!1;break}return l&&this._abortedCallback(),l},t.prototype.saveTo=function(e,r,n){if(!!e){r=r||this._trackKeys;for(var a=0;a<r.length;a++){var i=r[a],o=this._tracks[i];if(!(!o||o.isFinished())){var l=o.keyframes,c=l[n?0:l.length-1];c&&(e[i]=fu(c.rawValue))}}}},t.prototype.__changeFinalValue=function(e,r){r=r||Fe(e);for(var n=0;n<r.length;n++){var a=r[n],i=this._tracks[a];if(!!i){var o=i.keyframes;if(o.length>1){var l=o.pop();i.addKeyframe(l.time,e[a]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},t}(),Mp=J9;function ro(){return new Date().getTime()}var Q9=function(t){Xe(e,t);function e(r){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return e.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},e.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(r){if(!!r.animation){var n=r.prev,a=r.next;n?n.next=a:this._head=a,a?a.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},e.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},e.prototype.update=function(r){for(var n=ro()-this._pausedTime,a=n-this._time,i=this._head;i;){var o=i.next,l=i.step(n,a);l&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=n,r||(this.trigger("frame",a),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(pp(n),!r._paused&&r.update())}pp(n)},e.prototype.start=function(){this._running||(this._time=ro(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=ro(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=ro()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(r,n){n=n||{},this.start();var a=new Mp(r,n.loop);return this.addAnimator(a),a},e}(Jr),eF=Q9,tF=300,$p=Pe.domSupported,Np=function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=he(t,function(a){var i=a.replace("mouse","pointer");return r.hasOwnProperty(i)?i:a});return{mouse:t,touch:e,pointer:n}}(),Ew={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Aw=!1;function Ep(t){var e=t.pointerType;return e==="pen"||e==="touch"}function rF(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function Ap(t){t&&(t.zrByTouch=!0)}function nF(t,e){return fr(t.dom,new aF(t,e),!0)}function Dw(t,e){for(var r=e,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return n}var aF=function(){function t(e,r){this.stopPropagation=Pt,this.stopImmediatePropagation=Pt,this.preventDefault=Pt,this.type=r.type,this.target=this.currentTarget=e.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return t}(),Lr={mousedown:function(t){t=fr(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=fr(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=fr(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=fr(this.dom,t);var e=t.toElement||t.relatedTarget;Dw(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Aw=!0,t=fr(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Aw||(t=fr(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=fr(this.dom,t),Ap(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Lr.mousemove.call(this,t),Lr.mousedown.call(this,t)},touchmove:function(t){t=fr(this.dom,t),Ap(t),this.handler.processGesture(t,"change"),Lr.mousemove.call(this,t)},touchend:function(t){t=fr(this.dom,t),Ap(t),this.handler.processGesture(t,"end"),Lr.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<tF&&Lr.click.call(this,t)},pointerdown:function(t){Lr.mousedown.call(this,t)},pointermove:function(t){Ep(t)||Lr.mousemove.call(this,t)},pointerup:function(t){Lr.mouseup.call(this,t)},pointerout:function(t){Ep(t)||Lr.mouseout.call(this,t)}};z(["click","dblclick","contextmenu"],function(t){Lr[t]=function(e){e=fr(this.dom,e),this.trigger(t,e)}});var Dp={pointermove:function(t){Ep(t)||Dp.mousemove.call(this,t)},pointerup:function(t){Dp.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function iF(t,e){var r=e.domHandlers;Pe.pointerEventsSupported?z(Np.pointer,function(n){vu(e,n,function(a){r[n].call(t,a)})}):(Pe.touchEventsSupported&&z(Np.touch,function(n){vu(e,n,function(a){r[n].call(t,a),rF(e)})}),z(Np.mouse,function(n){vu(e,n,function(a){a=cp(a),e.touching||r[n].call(t,a)})}))}function oF(t,e){Pe.pointerEventsSupported?z(Ew.pointer,r):Pe.touchEventsSupported||z(Ew.mouse,r);function r(n){function a(i){i=cp(i),Dw(t,i.target)||(i=nF(t,i),e.domHandlers[n].call(t,i))}vu(e,n,a,{capture:!0})}}function vu(t,e,r,n){t.mounted[e]=r,t.listenerOpts[e]=n,c9(t.domTarget,e,r,n)}function Op(t){var e=t.mounted;for(var r in e)e.hasOwnProperty(r)&&u9(t.domTarget,r,e[r],t.listenerOpts[r]);t.mounted={}}var Ow=function(){function t(e,r){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=r}return t}(),sF=function(t){Xe(e,t);function e(r,n){var a=t.call(this)||this;return a.__pointerCapturing=!1,a.dom=r,a.painterRoot=n,a._localHandlerScope=new Ow(r,Lr),$p&&(a._globalHandlerScope=new Ow(document,Dp)),iF(a,a._localHandlerScope),a}return e.prototype.dispose=function(){Op(this._localHandlerScope),$p&&Op(this._globalHandlerScope)},e.prototype.setCursor=function(r){this.dom.style&&(this.dom.style.cursor=r||"default")},e.prototype.__togglePointerCapture=function(r){if(this.__mayPointerCapture=null,$p&&+this.__pointerCapturing^+r){this.__pointerCapturing=r;var n=this._globalHandlerScope;r?oF(this,n):Op(n)}},e}(Jr),lF=sF,Lw=1;Pe.hasGlobalWindow&&(Lw=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var gu=Lw,Lp=.4,Pp="#333",Bp="#ccc",cF="#eee";function Cs(){return[1,0,0,1,0,0]}function Ip(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function uF(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function no(t,e,r){var n=e[0]*r[0]+e[2]*r[1],a=e[1]*r[0]+e[3]*r[1],i=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],l=e[0]*r[4]+e[2]*r[5]+e[4],c=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=a,t[2]=i,t[3]=o,t[4]=l,t[5]=c,t}function Rp(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function Vp(t,e,r){var n=e[0],a=e[2],i=e[4],o=e[1],l=e[3],c=e[5],u=Math.sin(r),f=Math.cos(r);return t[0]=n*f+o*u,t[1]=-n*u+o*f,t[2]=a*f+l*u,t[3]=-a*u+f*l,t[4]=f*i+u*c,t[5]=f*c-u*i,t}function fF(t,e,r){var n=r[0],a=r[1];return t[0]=e[0]*n,t[1]=e[1]*a,t[2]=e[2]*n,t[3]=e[3]*a,t[4]=e[4]*n,t[5]=e[5]*a,t}function Fp(t,e){var r=e[0],n=e[2],a=e[4],i=e[1],o=e[3],l=e[5],c=r*o-i*n;return c?(c=1/c,t[0]=o*c,t[1]=-i*c,t[2]=-n*c,t[3]=r*c,t[4]=(n*l-o*a)*c,t[5]=(i*a-r*l)*c,t):null}var Pw=Ip,Bw=5e-5;function Ia(t){return t>Bw||t<-Bw}var Ra=[],ao=[],zp=Cs(),Hp=Math.abs,Up=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return Ia(this.rotation)||Ia(this.x)||Ia(this.y)||Ia(this.scaleX-1)||Ia(this.scaleY-1)||Ia(this.skewX)||Ia(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||e)){n&&Pw(n);return}n=n||Cs(),r?this.getLocalTransform(n):Pw(n),e&&(r?no(n,e,n):uF(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Ra);var n=Ra[0]<0?-1:1,a=Ra[1]<0?-1:1,i=((Ra[0]-n)*r+n)/Ra[0]||0,o=((Ra[1]-a)*r+a)/Ra[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||Cs(),Fp(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,r=[];e;)r.push(e),e=e.parent;for(;e=r.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(!!e){var r=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],a=Math.atan2(e[1],e[0]),i=Math.PI/2+a-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),r=Math.sqrt(r),this.skewX=i,this.skewY=0,this.rotation=-a,this.x=+e[4],this.y=+e[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(!!this.transform){var e=this.parent,r=this.transform;e&&e.transform&&(no(ao,e.invTransform,r),r=ao);var n=this.originX,a=this.originY;(n||a)&&(zp[4]=n,zp[5]=a,no(ao,r,zp),ao[4]-=n,ao[5]-=a,r=ao),this.setLocalTransform(r)}},t.prototype.getGlobalScale=function(e){var r=this.transform;return e=e||[],r?(e[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),e[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(e[0]=-e[0]),r[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},t.prototype.transformCoordToLocal=function(e,r){var n=[e,r],a=this.invTransform;return a&&ur(n,n,a),n},t.prototype.transformCoordToGlobal=function(e,r){var n=[e,r],a=this.transform;return a&&ur(n,n,a),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&Hp(e[0]-1)>1e-10&&Hp(e[3]-1)>1e-10?Math.sqrt(Hp(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){Iw(this,e)},t.getLocalTransform=function(e,r){r=r||[];var n=e.originX||0,a=e.originY||0,i=e.scaleX,o=e.scaleY,l=e.anchorX,c=e.anchorY,u=e.rotation||0,f=e.x,d=e.y,h=e.skewX?Math.tan(e.skewX):0,p=e.skewY?Math.tan(-e.skewY):0;if(n||a||l||c){var m=n+l,v=a+c;r[4]=-m*i-h*v*o,r[5]=-v*o-p*m*i}else r[4]=r[5]=0;return r[0]=i,r[3]=o,r[1]=p*i,r[2]=h*o,u&&Vp(r,r,u),r[4]+=n+f,r[5]+=a+d,r},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),ks=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Iw(t,e){for(var r=0;r<ks.length;r++){var n=ks[r];t[n]=e[n]}}var dF=function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,n=this.y-e.y;return Math.sqrt(r*r+n*n)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,n=this.y-e.y;return r*r+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(!!e){var r=this.x,n=this.y;return this.x=e[0]*r+e[2]*n+e[4],this.y=e[1]*r+e[3]*n+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,n){e.x=r,e.y=n},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,n){e.x=r.x+n.x,e.y=r.y+n.y},t.sub=function(e,r,n){e.x=r.x-n.x,e.y=r.y-n.y},t.scale=function(e,r,n){e.x=r.x*n,e.y=r.y*n},t.scaleAndAdd=function(e,r,n,a){e.x=r.x+n.x*a,e.y=r.y+n.y*a},t.lerp=function(e,r,n,a){var i=1-a;e.x=i*r.x+a*n.x,e.y=i*r.y+a*n.y},t}(),Me=dF,yu=Math.min,_u=Math.max,Va=new Me,Fa=new Me,za=new Me,Ha=new Me,Ts=new Me,Ms=new Me,hF=function(){function t(e,r,n,a){n<0&&(e=e+n,n=-n),a<0&&(r=r+a,a=-a),this.x=e,this.y=r,this.width=n,this.height=a}return t.prototype.union=function(e){var r=yu(e.x,this.x),n=yu(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=_u(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=_u(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=r,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){var r=this,n=e.width/r.width,a=e.height/r.height,i=Cs();return Rp(i,i,[-r.x,-r.y]),fF(i,i,[n,a]),Rp(i,i,[e.x,e.y]),i},t.prototype.intersect=function(e,r){if(!e)return!1;e instanceof t||(e=t.create(e));var n=this,a=n.x,i=n.x+n.width,o=n.y,l=n.y+n.height,c=e.x,u=e.x+e.width,f=e.y,d=e.y+e.height,h=!(i<c||u<a||l<f||d<o);if(r){var p=1/0,m=0,v=Math.abs(i-c),g=Math.abs(u-a),y=Math.abs(l-f),_=Math.abs(d-o),w=Math.min(v,g),S=Math.min(y,_);i<c||u<a?w>m&&(m=w,v<g?Me.set(Ms,-v,0):Me.set(Ms,g,0)):w<p&&(p=w,v<g?Me.set(Ts,v,0):Me.set(Ts,-g,0)),l<f||d<o?S>m&&(m=S,y<_?Me.set(Ms,0,-y):Me.set(Ms,0,_)):w<p&&(p=w,y<_?Me.set(Ts,0,y):Me.set(Ts,0,-_))}return r&&Me.copy(r,h?Ts:Ms),h},t.prototype.contain=function(e,r){var n=this;return e>=n.x&&e<=n.x+n.width&&r>=n.y&&r<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(e,r){e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height},t.applyTransform=function(e,r,n){if(!n){e!==r&&t.copy(e,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var a=n[0],i=n[3],o=n[4],l=n[5];e.x=r.x*a+o,e.y=r.y*i+l,e.width=r.width*a,e.height=r.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Va.x=za.x=r.x,Va.y=Ha.y=r.y,Fa.x=Ha.x=r.x+r.width,Fa.y=za.y=r.y+r.height,Va.transform(n),Ha.transform(n),Fa.transform(n),za.transform(n),e.x=yu(Va.x,Fa.x,za.x,Ha.x),e.y=yu(Va.y,Fa.y,za.y,Ha.y);var c=_u(Va.x,Fa.x,za.x,Ha.x),u=_u(Va.y,Fa.y,za.y,Ha.y);e.width=c-e.x,e.height=u-e.y},t}(),Ke=hF,Rw={};function rr(t,e){e=e||Kn;var r=Rw[e];r||(r=Rw[e]=new ws(500));var n=r.get(t);return n==null&&(n=Jn.measureText(t,e).width,r.put(t,n)),n}function Vw(t,e,r,n){var a=rr(t,e),i=wu(e),o=$s(0,a,r),l=io(0,i,n),c=new Ke(o,l,a,i);return c}function jp(t,e,r,n){var a=((t||"")+"").split(`
46
+ `),i=a.length;if(i===1)return Vw(a[0],e,r,n);for(var o=new Ke(0,0,0,0),l=0;l<a.length;l++){var c=Vw(a[l],e,r,n);l===0?o.copy(c):o.union(c)}return o}function $s(t,e,r){return r==="right"?t-=e:r==="center"&&(t-=e/2),t}function io(t,e,r){return r==="middle"?t-=e/2:r==="bottom"&&(t-=e),t}function wu(t){return rr("\u56FD",t)}function en(t,e){return typeof t=="string"?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function bu(t,e,r){var n=e.position||"inside",a=e.distance!=null?e.distance:5,i=r.height,o=r.width,l=i/2,c=r.x,u=r.y,f="left",d="top";if(n instanceof Array)c+=en(n[0],r.width),u+=en(n[1],r.height),f=null,d=null;else switch(n){case"left":c-=a,u+=l,f="right",d="middle";break;case"right":c+=a+o,u+=l,d="middle";break;case"top":c+=o/2,u-=a,f="center",d="bottom";break;case"bottom":c+=o/2,u+=i+a,f="center";break;case"inside":c+=o/2,u+=l,f="center",d="middle";break;case"insideLeft":c+=a,u+=l,d="middle";break;case"insideRight":c+=o-a,u+=l,f="right",d="middle";break;case"insideTop":c+=o/2,u+=a,f="center";break;case"insideBottom":c+=o/2,u+=i-a,f="center",d="bottom";break;case"insideTopLeft":c+=a,u+=a;break;case"insideTopRight":c+=o-a,u+=a,f="right";break;case"insideBottomLeft":c+=a,u+=i-a,d="bottom";break;case"insideBottomRight":c+=o-a,u+=i-a,f="right",d="bottom";break}return t=t||{},t.x=c,t.y=u,t.align=f,t.verticalAlign=d,t}var Yp="__zr_normal__",Gp=ks.concat(["ignore"]),pF=Qn(ks,function(t,e){return t[e]=!0,t},{ignore:!1}),oo={},mF=new Ke(0,0,0,0),Wp=function(){function t(e){this.id=z_(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return t.prototype._init=function(e){this.attr(e)},t.prototype.drift=function(e,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":e=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=e,a[5]+=r,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(e){var r=this._textContent;if(r&&(!r.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,a=n.local,i=r.innerTransformable,o=void 0,l=void 0,c=!1;i.parent=a?this:null;var u=!1;if(i.copyTransform(r),n.position!=null){var f=mF;n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),a||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(oo,n,f):bu(oo,n,f),i.x=oo.x,i.y=oo.y,o=oo.align,l=oo.verticalAlign;var d=n.origin;if(d&&n.rotation!=null){var h=void 0,p=void 0;d==="center"?(h=f.width*.5,p=f.height*.5):(h=en(d[0],f.width),p=en(d[1],f.height)),u=!0,i.originX=-i.x+h+(a?0:f.x),i.originY=-i.y+p+(a?0:f.y)}}n.rotation!=null&&(i.rotation=n.rotation);var m=n.offset;m&&(i.x+=m[0],i.y+=m[1],u||(i.originX=-m[0],i.originY=-m[1]));var v=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,_=void 0,w=void 0;v&&this.canBeInsideText()?(y=n.insideFill,_=n.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(_==null||_==="auto")&&(_=this.getInsideTextStroke(y),w=!0)):(y=n.outsideFill,_=n.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(_==null||_==="auto")&&(_=this.getOutsideStroke(y),w=!0)),y=y||"#000",(y!==g.fill||_!==g.stroke||w!==g.autoStroke||o!==g.align||l!==g.verticalAlign)&&(c=!0,g.fill=y,g.stroke=_,g.autoStroke=w,g.align=o,g.verticalAlign=l,r.setDefaultTextStyle(g)),r.__dirty|=er,c&&r.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(e){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Bp:Pp},t.prototype.getOutsideStroke=function(e){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&tr(r);n||(n=[255,255,255,1]);for(var a=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*a+(i?0:255)*(1-a);return n[3]=1,Mn(n,"rgba")},t.prototype.traverse=function(e,r){},t.prototype.attrKV=function(e,r){e==="textConfig"?this.setTextConfig(r):e==="textContent"?this.setTextContent(r):e==="clipPath"?this.setClipPath(r):e==="extra"?(this.extra=this.extra||{},re(this.extra,r)):this[e]=r},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(e,r){if(typeof e=="string")this.attrKV(e,r);else if(_e(e))for(var n=e,a=Fe(n),i=0;i<a.length;i++){var o=a[i];this.attrKV(o,e[o])}return this.markRedraw(),this},t.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var r=this._normalState,n=0;n<this.animators.length;n++){var a=this.animators[n],i=a.__fromStateTransition;if(!(a.getLoop()||i&&i!==Yp)){var o=a.targetName,l=o?r[o]:r;a.saveTo(l)}}},t.prototype._innerSaveToNormal=function(e){var r=this._normalState;r||(r=this._normalState={}),e.textConfig&&!r.textConfig&&(r.textConfig=this.textConfig),this._savePrimaryToNormal(e,r,Gp)},t.prototype._savePrimaryToNormal=function(e,r,n){for(var a=0;a<n.length;a++){var i=n[a];e[i]!=null&&!(i in r)&&(r[i]=this[i])}},t.prototype.hasState=function(){return this.currentStates.length>0},t.prototype.getState=function(e){return this.states[e]},t.prototype.ensureState=function(e){var r=this.states;return r[e]||(r[e]={}),r[e]},t.prototype.clearStates=function(e){this.useState(Yp,!1,e)},t.prototype.useState=function(e,r,n,a){var i=e===Yp,o=this.hasState();if(!(!o&&i)){var l=this.currentStates,c=this.stateTransition;if(!(Ge(l,e)>=0&&(r||l.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!i){Zh("State "+e+" not exists.");return}i||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||a);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,r,!n&&!this.__inHover&&c&&c.duration>0,c);var d=this._textContent,h=this._textGuide;return d&&d.useState(e,r,n,f),h&&h.useState(e,r,n,f),i?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~er),u}}},t.prototype.useStates=function(e,r,n){if(!e.length)this.clearStates();else{var a=[],i=this.currentStates,o=e.length,l=o===i.length;if(l){for(var c=0;c<o;c++)if(e[c]!==i[c]){l=!1;break}}if(l)return;for(var c=0;c<o;c++){var u=e[c],f=void 0;this.stateProxy&&(f=this.stateProxy(u,e)),f||(f=this.states[u]),f&&a.push(f)}var d=a[o-1],h=!!(d&&d.hoverLayer||n);h&&this._toggleHoverLayerFlag(!0);var p=this._mergeStates(a),m=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(e.join(","),p,this._normalState,!1,!r&&!this.__inHover&&m&&m.duration>0,m);var v=this._textContent,g=this._textGuide;v&&v.useStates(e,r,h),g&&g.useStates(e,r,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~er)}},t.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var r=this.animators[e];r.targetName&&r.changeTarget(this[r.targetName])}},t.prototype.removeState=function(e){var r=Ge(this.currentStates,e);if(r>=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},t.prototype.replaceState=function(e,r,n){var a=this.currentStates.slice(),i=Ge(a,e),o=Ge(a,r)>=0;i>=0?o?a.splice(i,1):a[i]=r:n&&!o&&a.push(r),this.useStates(a)},t.prototype.toggleState=function(e,r){r?this.useState(e,!0):this.removeState(e)},t.prototype._mergeStates=function(e){for(var r={},n,a=0;a<e.length;a++){var i=e[a];re(r,i),i.textConfig&&(n=n||{},re(n,i.textConfig))}return n&&(r.textConfig=n),r},t.prototype._applyStateObj=function(e,r,n,a,i,o){var l=!(r&&a);r&&r.textConfig?(this.textConfig=re({},a?this.textConfig:n.textConfig),re(this.textConfig,r.textConfig)):l&&n.textConfig&&(this.textConfig=n.textConfig);for(var c={},u=!1,f=0;f<Gp.length;f++){var d=Gp[f],h=i&&pF[d];r&&r[d]!=null?h?(u=!0,c[d]=r[d]):this[d]=r[d]:l&&n[d]!=null&&(h?(u=!0,c[d]=n[d]):this[d]=n[d])}if(!i)for(var f=0;f<this.animators.length;f++){var p=this.animators[f],m=p.targetName;p.getLoop()||p.__changeFinalValue(m?(r||n)[m]:r||n)}u&&this._transitionState(e,c,o)},t.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var r=this.__zr;r&&e.addSelfToZr(r),e.__zr=r,e.__hostTarget=this}},t.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},t.prototype.getClipPath=function(){return this._clipPath},t.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},t.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},t.prototype.getTextContent=function(){return this._textContent},t.prototype.setTextContent=function(e){var r=this._textContent;r!==e&&(r&&r!==e&&this.removeTextContent(),e.innerTransformable=new Up,this._attachComponent(e),this._textContent=e,this.markRedraw())},t.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),re(this.textConfig,e),this.markRedraw()},t.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},t.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},t.prototype.getTextGuideLine=function(){return this._textGuide},t.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},t.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},t.prototype.markRedraw=function(){this.__dirty|=er;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},t.prototype.dirty=function(){this.markRedraw()},t.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var r=this._textContent,n=this._textGuide;r&&(r.__inHover=e),n&&(n.__inHover=e)},t.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var r=this.animators;if(r)for(var n=0;n<r.length;n++)e.animation.addAnimator(r[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){if(!!this.__zr){this.__zr=null;var r=this.animators;if(r)for(var n=0;n<r.length;n++)e.animation.removeAnimator(r[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},t.prototype.animate=function(e,r,n){var a=e?this[e]:this,i=new Mp(a,r,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},t.prototype.addAnimator=function(e,r){var n=this.__zr,a=this;e.during(function(){a.updateDuringAnimation(r)}).done(function(){var i=a.animators,o=Ge(i,e);o>=0&&i.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(e){this.markRedraw()},t.prototype.stopAnimation=function(e,r){for(var n=this.animators,a=n.length,i=[],o=0;o<a;o++){var l=n[o];!e||e===l.scope?l.stop(r):i.push(l)}return this.animators=i,this},t.prototype.animateTo=function(e,r,n){Zp(this,e,r,n)},t.prototype.animateFrom=function(e,r,n){Zp(this,e,r,n,!0)},t.prototype._transitionState=function(e,r,n,a){for(var i=Zp(this,r,n,a),o=0;o<i.length;o++)i[o].__fromStateTransition=e},t.prototype.getBoundingRect=function(){return null},t.prototype.getPaintRect=function(){return null},t.initDefaultProps=function(){var e=t.prototype;e.type="element",e.name="",e.ignore=e.silent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=er;function r(n,a,i,o){Object.defineProperty(e,n,{get:function(){if(!this[a]){var c=this[a]=[];l(this,c)}return this[a]},set:function(c){this[i]=c[0],this[o]=c[1],this[a]=c,l(this,c)}});function l(c,u){Object.defineProperty(u,0,{get:function(){return c[i]},set:function(f){c[i]=f}}),Object.defineProperty(u,1,{get:function(){return c[o]},set:function(f){c[o]=f}})}}Object.defineProperty&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))}(),t}();Dr(Wp,Jr),Dr(Wp,Up);function Zp(t,e,r,n,a){r=r||{};var i=[];Fw(t,"",t,e,r,n,i,a);var o=i.length,l=!1,c=r.done,u=r.aborted,f=function(){l=!0,o--,o<=0&&(l?c&&c():u&&u())},d=function(){o--,o<=0&&(l?c&&c():u&&u())};o||c&&c(),i.length>0&&r.during&&i[0].during(function(m,v){r.during(v)});for(var h=0;h<i.length;h++){var p=i[h];f&&p.done(f),d&&p.aborted(d),r.force&&p.duration(r.duration),p.start(r.easing)}return i}function qp(t,e,r){for(var n=0;n<r;n++)t[n]=e[n]}function vF(t){return Ut(t[0])}function gF(t,e,r){if(Ut(e[r]))if(Ut(t[r])||(t[r]=[]),Qt(e[r])){var n=e[r].length;t[r].length!==n&&(t[r]=new e[r].constructor(n),qp(t[r],e[r],n))}else{var a=e[r],i=t[r],o=a.length;if(vF(a))for(var l=a[0].length,c=0;c<o;c++)i[c]?qp(i[c],a[c],l):i[c]=Array.prototype.slice.call(a[c]);else qp(i,a,o);i.length=a.length}else t[r]=e[r]}function yF(t,e){return t===e||Ut(t)&&Ut(e)&&_F(t,e)}function _F(t,e){var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function Fw(t,e,r,n,a,i,o,l){for(var c=Fe(n),u=a.duration,f=a.delay,d=a.additive,h=a.setToFinal,p=!_e(i),m=t.animators,v=[],g=0;g<c.length;g++){var y=c[g],_=n[y];if(_!=null&&r[y]!=null&&(p||i[y]))if(_e(_)&&!Ut(_)&&!Wc(_)){if(e){l||(r[y]=_,t.updateDuringAnimation(e));continue}Fw(t,y,r[y],_,a,i&&i[y],o,l)}else v.push(y);else l||(r[y]=_,t.updateDuringAnimation(e),v.push(y))}var w=v.length;if(!d&&w)for(var S=0;S<m.length;S++){var x=m[S];if(x.targetName===e){var b=x.stopTracks(v);if(b){var C=Ge(m,x);m.splice(C,1)}}}if(a.force||(v=Mt(v,function(A){return!yF(n[A],r[A])}),w=v.length),w>0||a.force&&!o.length){var k=void 0,$=void 0,N=void 0;if(l){$={},h&&(k={});for(var S=0;S<w;S++){var y=v[S];$[y]=r[y],h?k[y]=n[y]:r[y]=n[y]}}else if(h){N={};for(var S=0;S<w;S++){var y=v[S];N[y]=fu(r[y]),gF(r,n,y)}}var x=new Mp(r,!1,!1,d?Mt(m,function(L){return L.targetName===e}):null);x.targetName=e,a.scope&&(x.scope=a.scope),h&&k&&x.whenWithKeys(0,k,v),N&&x.whenWithKeys(0,N,v),x.whenWithKeys(u==null?500:u,l?$:n,v).delay(f||0),t.addAnimator(x,e),o.push(x)}}var zw=Wp,Hw=function(t){Xe(e,t);function e(r){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(r){return this._children[r]},e.prototype.childOfName=function(r){for(var n=this._children,a=0;a<n.length;a++)if(n[a].name===r)return n[a]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(r){return r&&r!==this&&r.parent!==this&&(this._children.push(r),this._doAdd(r)),this},e.prototype.addBefore=function(r,n){if(r&&r!==this&&r.parent!==this&&n&&n.parent===this){var a=this._children,i=a.indexOf(n);i>=0&&(a.splice(i,0,r),this._doAdd(r))}return this},e.prototype.replace=function(r,n){var a=Ge(this._children,r);return a>=0&&this.replaceAt(n,a),this},e.prototype.replaceAt=function(r,n){var a=this._children,i=a[n];if(r&&r!==this&&r.parent!==this&&r!==i){a[n]=r,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(r)}return this},e.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(r){var n=this.__zr,a=this._children,i=Ge(a,r);return i<0?this:(a.splice(i,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,a=0;a<r.length;a++){var i=r[a];n&&i.removeSelfFromZr(n),i.parent=null}return r.length=0,this},e.prototype.eachChild=function(r,n){for(var a=this._children,i=0;i<a.length;i++){var o=a[i];r.call(n,o,i)}return this},e.prototype.traverse=function(r,n){for(var a=0;a<this._children.length;a++){var i=this._children[a],o=r.call(n,i);i.isGroup&&!o&&i.traverse(r,n)}return this},e.prototype.addSelfToZr=function(r){t.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++){var a=this._children[n];a.addSelfToZr(r)}},e.prototype.removeSelfFromZr=function(r){t.prototype.removeSelfFromZr.call(this,r);for(var n=0;n<this._children.length;n++){var a=this._children[n];a.removeSelfFromZr(r)}},e.prototype.getBoundingRect=function(r){for(var n=new Ke(0,0,0,0),a=r||this._children,i=[],o=null,l=0;l<a.length;l++){var c=a[l];if(!(c.ignore||c.invisible)){var u=c.getBoundingRect(),f=c.getLocalTransform(i);f?(Ke.applyTransform(n,u,f),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},e}(zw);Hw.prototype.type="group";var lt=Hw;/*!
47
+ * ZRender, a high performance 2d drawing library.
48
+ *
49
+ * Copyright (c) 2013, Baidu Inc.
50
+ * All rights reserved.
51
+ *
52
+ * LICENSE
53
+ * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
54
+ */var Su={},Uw={};function wF(t){delete Uw[t]}function bF(t){if(!t)return!1;if(typeof t=="string")return ou(t,1)<Lp;if(t.colorStops){for(var e=t.colorStops,r=0,n=e.length,a=0;a<n;a++)r+=ou(e[a].color,1);return r/=n,r<Lp}return!1}var SF=function(){function t(e,r,n){var a=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=r,this.id=e;var i=new x9,o=n.renderer||"canvas";Su[o]||(o=Fe(Su)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var l=new Su[o](r,i,n,e),c=n.ssr||l.ssrOnly;this.storage=i,this.painter=l;var u=!Pe.node&&!Pe.worker&&!c?new lF(l.getViewportRoot(),l.root):null;this.handler=new y9(i,l,u,l.root),this.animation=new eF({stage:{update:c?null:function(){return a._flush(!0)}}}),c||this.animation.start()}return t.prototype.add=function(e){!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},t.prototype.remove=function(e){!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(e,r){this.painter.configLayer&&this.painter.configLayer(e,r),this.refresh()},t.prototype.setBackgroundColor=function(e){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=bF(e)},t.prototype.getBackgroundColor=function(){return this._backgroundColor},t.prototype.setDarkMode=function(e){this._darkMode=e},t.prototype.isDarkMode=function(){return this._darkMode},t.prototype.refreshImmediately=function(e){e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},t.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},t.prototype.flush=function(){this._flush(!1)},t.prototype._flush=function(e){var r,n=ro();this._needsRefresh&&(r=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(r=!0,this.refreshHoverImmediately());var a=ro();r?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover()},t.prototype.resize=function(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.setCursorStyle=function(e){this.handler.setCursorStyle(e)},t.prototype.findHover=function(e,r){return this.handler.findHover(e,r)},t.prototype.on=function(e,r,n){return this.handler.on(e,r,n),this},t.prototype.off=function(e,r){this.handler.off(e,r)},t.prototype.trigger=function(e,r){this.handler.trigger(e,r)},t.prototype.clear=function(){for(var e=this.storage.getRoots(),r=0;r<e.length;r++)e[r]instanceof lt&&e[r].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},t.prototype.dispose=function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,wF(this.id)},t}();function jw(t,e){var r=new SF(z_(),t,e);return Uw[r.id]=r,r}function xF(t,e){Su[t]=e}var Yw=1e-4,Gw=20;function CF(t){return t.replace(/^\s+|\s+$/g,"")}function pr(t,e,r,n){var a=e[0],i=e[1],o=r[0],l=r[1],c=i-a,u=l-o;if(c===0)return u===0?o:(o+l)/2;if(n)if(c>0){if(t<=a)return o;if(t>=i)return l}else{if(t>=a)return o;if(t<=i)return l}else{if(t===a)return o;if(t===i)return l}return(t-a)/c*u+o}function ze(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return ve(t)?CF(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):t==null?NaN:+t}function ht(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),Gw),t=(+t).toFixed(e),r?t:+t}function Ww(t){return t.sort(function(e,r){return e-r}),t}function tn(t){if(t=+t,isNaN(t))return 0;if(t>1e-14){for(var e=1,r=0;r<15;r++,e*=10)if(Math.round(t*e)/e===t)return r}return kF(t)}function kF(t){var e=t.toString().toLowerCase(),r=e.indexOf("e"),n=r>0?+e.slice(r+1):0,a=r>0?r:e.length,i=e.indexOf("."),o=i<0?0:a-1-i;return Math.max(0,o-n)}function TF(t,e){var r=Math.log,n=Math.LN10,a=Math.floor(r(t[1]-t[0])/n),i=Math.round(r(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-a+i,0),20);return isFinite(o)?o:20}function MF(t,e,r){if(!t[e])return 0;var n=Qn(t,function(m,v){return m+(isNaN(v)?0:v)},0);if(n===0)return 0;for(var a=Math.pow(10,r),i=he(t,function(m){return(isNaN(m)?0:m)/n*a*100}),o=a*100,l=he(i,function(m){return Math.floor(m)}),c=Qn(l,function(m,v){return m+v},0),u=he(i,function(m,v){return m-l[v]});c<o;){for(var f=Number.NEGATIVE_INFINITY,d=null,h=0,p=u.length;h<p;++h)u[h]>f&&(f=u[h],d=h);++l[d],u[d]=0,++c}return l[e]/a}function $F(t,e){var r=Math.max(tn(t),tn(e)),n=t+e;return r>Gw?n:ht(n,r)}function Zw(t){var e=Math.PI*2;return(t%e+e)%e}function xu(t){return t>-Yw&&t<Yw}var NF=/^(?:(\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 Nn(t){if(t instanceof Date)return t;if(ve(t)){var e=NF.exec(t);if(!e)return new Date(NaN);if(e[8]){var r=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(r-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,r,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}else if(t==null)return new Date(NaN);return new Date(Math.round(t))}function EF(t){return Math.pow(10,Xp(t))}function Xp(t){if(t===0)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function qw(t,e){var r=Xp(t),n=Math.pow(10,r),a=t/n,i;return e?a<1.5?i=1:a<2.5?i=2:a<4?i=3:a<7?i=5:i=10:a<1?i=1:a<2?i=2:a<3?i=3:a<5?i=5:i=10,t=i*n,r>=-20?+t.toFixed(r<0?-r:0):t}function Xw(t){t.sort(function(c,u){return l(c,u,0)?-1:1});for(var e=-1/0,r=1,n=0;n<t.length;){for(var a=t[n].interval,i=t[n].close,o=0;o<2;o++)a[o]<=e&&(a[o]=e,i[o]=o?1:1-r),e=a[o],r=i[o];a[0]===a[1]&&i[0]*i[1]!=1?t.splice(n,1):n++}return t;function l(c,u,f){return c.interval[f]<u.interval[f]||c.interval[f]===u.interval[f]&&(c.close[f]-u.close[f]==(f?-1:1)||!f&&l(c,u,1))}}function Cu(t){var e=parseFloat(t);return e==t&&(e!==0||!ve(t)||t.indexOf("x")<=0)?e:NaN}function AF(t){return!isNaN(Cu(t))}function Kw(){return Math.round(Math.random()*9)}function Jw(t,e){return e===0?t:Jw(e,t%e)}function Qw(t,e){return t==null?e:e==null?t:t*e/Jw(t,e)}var DF="[ECharts] ",eb={},OF=typeof console!="undefined"&&console.warn&&console.log;function LF(t,e,r){if(OF){if(r){if(eb[e])return;eb[e]=!0}console[t](DF+e)}}function Gfe(t,e){LF("warn",t,e)}function jt(t){throw new Error(t)}function tb(t,e,r){return(e-t)*r+t}var rb="series\0",PF="\0_ec_\0";function St(t){return t instanceof Array?t:t==null?[]:[t]}function Ns(t,e,r){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,a=r.length;n<a;n++){var i=r[n];!t.emphasis[e].hasOwnProperty(i)&&t[e].hasOwnProperty(i)&&(t.emphasis[e][i]=t[e][i])}}}var nb=["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 Es(t){return _e(t)&&!se(t)&&!(t instanceof Date)?t.value:t}function BF(t){return _e(t)&&!(t instanceof Array)}function IF(t,e,r){var n=r==="normalMerge",a=r==="replaceMerge",i=r==="replaceAll";t=t||[],e=(e||[]).slice();var o=Le();z(e,function(c,u){if(!_e(c)){e[u]=null;return}});var l=RF(t,o,r);return(n||a)&&VF(l,t,o,e),n&&FF(l,e),n||a?zF(l,e,a):i&&HF(l,e),UF(l),l}function RF(t,e,r){var n=[];if(r==="replaceAll")return n;for(var a=0;a<t.length;a++){var i=t[a];i&&i.id!=null&&e.set(i.id,a),n.push({existing:r==="replaceMerge"||Ds(i)?null:i,newOption:null,keyInfo:null,brandNew:null})}return n}function VF(t,e,r,n){z(n,function(a,i){if(!(!a||a.id==null)){var o=As(a.id),l=r.get(o);if(l!=null){var c=t[l];cr(!c.newOption,'Duplicated option on id "'+o+'".'),c.newOption=a,c.existing=e[l],n[i]=null}}})}function FF(t,e){z(e,function(r,n){if(!(!r||r.name==null))for(var a=0;a<t.length;a++){var i=t[a].existing;if(!t[a].newOption&&i&&(i.id==null||r.id==null)&&!Ds(r)&&!Ds(i)&&ab("name",i,r)){t[a].newOption=r,e[n]=null;return}}})}function zF(t,e,r){z(e,function(n){if(!!n){for(var a,i=0;(a=t[i])&&(a.newOption||Ds(a.existing)||a.existing&&n.id!=null&&!ab("id",n,a.existing));)i++;a?(a.newOption=n,a.brandNew=r):t.push({newOption:n,brandNew:r,existing:null,keyInfo:null}),i++}})}function HF(t,e){z(e,function(r){t.push({newOption:r,brandNew:!0,existing:null,keyInfo:null})})}function UF(t){var e=Le();z(t,function(r){var n=r.existing;n&&e.set(n.id,r)}),z(t,function(r){var n=r.newOption;cr(!n||n.id==null||!e.get(n.id)||e.get(n.id)===r,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&e.set(n.id,r),!r.keyInfo&&(r.keyInfo={})}),z(t,function(r,n){var a=r.existing,i=r.newOption,o=r.keyInfo;if(!!_e(i)){if(o.name=i.name!=null?As(i.name):a?a.name:rb+n,a)o.id=As(a.id);else if(i.id!=null)o.id=As(i.id);else{var l=0;do o.id="\0"+o.name+"\0"+l++;while(e.get(o.id))}e.set(o.id,r)}})}function ab(t,e,r){var n=Pr(e[t],null),a=Pr(r[t],null);return n!=null&&a!=null&&n===a}function As(t){return Pr(t,"")}function Pr(t,e){return t==null?e:ve(t)?t:We(t)||qh(t)?t+"":e}function Kp(t){var e=t.name;return!!(e&&e.indexOf(rb))}function Ds(t){return t&&t.id!=null&&As(t.id).indexOf(PF)===0}function jF(t,e,r){z(t,function(n){var a=n.newOption;_e(a)&&(n.keyInfo.mainType=e,n.keyInfo.subType=YF(e,a,n.existing,r))})}function YF(t,e,r,n){var a=e.type?e.type:r?r.subType:n.determineSubType(t,e);return a}function GF(t,e){var r={},n={};return a(t||[],r),a(e||[],n,r),[i(r),i(n)];function a(o,l,c){for(var u=0,f=o.length;u<f;u++){var d=Pr(o[u].seriesId,null);if(d==null)return;for(var h=St(o[u].dataIndex),p=c&&c[d],m=0,v=h.length;m<v;m++){var g=h[m];p&&p[g]?p[g]=null:(l[d]||(l[d]={}))[g]=1}}}function i(o,l){var c=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(l)c.push(+u);else{var f=i(o[u],!0);f.length&&c.push({seriesId:u,dataIndex:f})}return c}}function Ua(t,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return se(e.dataIndex)?he(e.dataIndex,function(r){return t.indexOfRawIndex(r)}):t.indexOfRawIndex(e.dataIndex);if(e.name!=null)return se(e.name)?he(e.name,function(r){return t.indexOfName(r)}):t.indexOfName(e.name)}function ct(){var t="__ec_inner_"+WF++;return function(e){return e[t]||(e[t]={})}}var WF=Kw();function Jp(t,e,r){var n=Qp(e,r),a=n.mainTypeSpecified,i=n.queryOptionMap,o=n.others,l=o,c=r?r.defaultMainType:null;return!a&&c&&i.set(c,{}),i.each(function(u,f){var d=Os(t,f,u,{useDefault:c===f,enableAll:r&&r.enableAll!=null?r.enableAll:!0,enableNone:r&&r.enableNone!=null?r.enableNone:!0});l[f+"Models"]=d.models,l[f+"Model"]=d.models[0]}),l}function Qp(t,e){var r;if(ve(t)){var n={};n[t+"Index"]=0,r=n}else r=t;var a=Le(),i={},o=!1;return z(r,function(l,c){if(c==="dataIndex"||c==="dataIndexInside"){i[c]=l;return}var u=c.match(/^(\w+)(Index|Id|Name)$/)||[],f=u[1],d=(u[2]||"").toLowerCase();if(!(!f||!d||e&&e.includeMainTypes&&Ge(e.includeMainTypes,f)<0)){o=o||!!f;var h=a.get(f)||a.set(f,{});h[d]=l}}),{mainTypeSpecified:o,queryOptionMap:a,others:i}}var Br={useDefault:!0,enableAll:!1,enableNone:!1};function Os(t,e,r,n){n=n||Br;var a=r.index,i=r.id,o=r.name,l={models:null,specified:a!=null||i!=null||o!=null};if(!l.specified){var c=void 0;return l.models=n.useDefault&&(c=t.getComponent(e))?[c]:[],l}return a==="none"||a===!1?(cr(n.enableNone,'`"none"` or `false` is not a valid value on index option.'),l.models=[],l):(a==="all"&&(cr(n.enableAll,'`"all"` is not a valid value on index option.'),a=i=o=null),l.models=t.queryComponents({mainType:e,index:a,id:i,name:o}),l)}function ib(t,e,r){t.setAttribute?t.setAttribute(e,r):t[e]=r}function ZF(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function qF(t){return t==="auto"?Pe.domSupported?"html":"richText":t||"html"}function XF(t,e,r,n,a){var i=e==null||e==="auto";if(n==null)return n;if(We(n)){var o=tb(r||0,n,a);return ht(o,i?Math.max(tn(r||0),tn(n)):e)}else{if(ve(n))return a<1?r:n;for(var l=[],c=r,u=n,f=Math.max(c?c.length:0,u.length),d=0;d<f;++d){var h=t.getDimensionInfo(d);if(h&&h.type==="ordinal")l[d]=(a<1&&c?c:u)[d];else{var p=c&&c[d]?c[d]:0,m=u[d],o=tb(p,m,a);l[d]=ht(o,i?Math.max(tn(p),tn(m)):e)}}return l}}var KF=".",ja="___EC__COMPONENT__CONTAINER___",ob="___EC__EXTENDED_CLASS___";function rn(t){var e={main:"",sub:""};if(t){var r=t.split(KF);e.main=r[0]||"",e.sub=r[1]||""}return e}function JF(t){cr(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function QF(t){return!!(t&&t[ob])}function em(t,e){t.$constructor=t,t.extend=function(r){var n=this,a;return ez(n)?a=function(i){me(o,i);function o(){return i.apply(this,arguments)||this}return o}(n):(a=function(){(r.$constructor||n).apply(this,arguments)},jV(a,this)),re(a.prototype,r),a[ob]=!0,a.extend=this.extend,a.superCall=nz,a.superApply=az,a.superClass=n,a}}function ez(t){return Ee(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function sb(t,e){t.extend=e.extend}var tz=Math.round(Math.random()*10);function rz(t){var e=["__\0is_clz",tz++].join("_");t.prototype[e]=!0,t.isInstance=function(r){return!!(r&&r[e])}}function nz(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return this.superClass.prototype[e].apply(t,r)}function az(t,e,r){return this.superClass.prototype[e].apply(t,r)}function ku(t){var e={};t.registerClass=function(n){var a=n.type||n.prototype.type;if(a){JF(a),n.prototype.type=a;var i=rn(a);if(!i.sub)e[i.main]=n;else if(i.sub!==ja){var o=r(i);o[i.sub]=n}}return n},t.getClass=function(n,a,i){var o=e[n];if(o&&o[ja]&&(o=a?o[a]:null),i&&!o)throw new Error(a?"Component "+n+"."+(a||"")+" is used but not imported.":n+".type should be specified.");return o},t.getClassesByMainType=function(n){var a=rn(n),i=[],o=e[a.main];return o&&o[ja]?z(o,function(l,c){c!==ja&&i.push(l)}):i.push(o),i},t.hasClass=function(n){var a=rn(n);return!!e[a.main]},t.getAllClassMainTypes=function(){var n=[];return z(e,function(a,i){n.push(i)}),n},t.hasSubTypes=function(n){var a=rn(n),i=e[a.main];return i&&i[ja]};function r(n){var a=e[n.main];return(!a||!a[ja])&&(a=e[n.main]={},a[ja]=!0),a}}function Ls(t,e){for(var r=0;r<t.length;r++)t[r][1]||(t[r][1]=t[r][0]);return e=e||!1,function(n,a,i){for(var o={},l=0;l<t.length;l++){var c=t[l][1];if(!(a&&Ge(a,c)>=0||i&&Ge(i,c)<0)){var u=n.getShallow(c,e);u!=null&&(o[t[l][0]]=u)}}return o}}var iz=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],oz=Ls(iz),sz=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return oz(this,e,r)},t}(),tm=new ws(50);function lz(t){if(typeof t=="string"){var e=tm.get(t);return e&&e.image}else return t}function rm(t,e,r,n,a){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var i=tm.get(t),o={hostEl:r,cb:n,cbPayload:a};if(i)e=i.image,!Tu(e)&&i.pending.push(o);else{var l=Jn.loadImage(t,lb,lb);l.__zrImageSrc=t,tm.put(t,l.__cachedImgObj={image:l,pending:[o]})}return e}else return t;else return e}function lb(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var r=t.pending[e],n=r.cb;n&&n(this,r.cbPayload),r.hostEl.dirty()}t.pending.length=0}function Tu(t){return t&&t.width&&t.height}var nm=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function cz(t,e,r,n,a){if(!e)return"";var i=(t+"").split(`
55
+ `);a=cb(e,r,n,a);for(var o=0,l=i.length;o<l;o++)i[o]=ub(i[o],a);return i.join(`
56
+ `)}function cb(t,e,r,n){n=n||{};var a=re({},n);a.font=e,r=Ae(r,"..."),a.maxIterations=Ae(n.maxIterations,2);var i=a.minChar=Ae(n.minChar,0);a.cnCharWidth=rr("\u56FD",e);var o=a.ascCharWidth=rr("a",e);a.placeholder=Ae(n.placeholder,"");for(var l=t=Math.max(0,t-1),c=0;c<i&&l>=o;c++)l-=o;var u=rr(r,e);return u>l&&(r="",u=0),l=t-u,a.ellipsis=r,a.ellipsisWidth=u,a.contentWidth=l,a.containerWidth=t,a}function ub(t,e){var r=e.containerWidth,n=e.font,a=e.contentWidth;if(!r)return"";var i=rr(t,n);if(i<=r)return t;for(var o=0;;o++){if(i<=a||o>=e.maxIterations){t+=e.ellipsis;break}var l=o===0?uz(t,a,e.ascCharWidth,e.cnCharWidth):i>0?Math.floor(t.length*a/i):0;t=t.substr(0,l),i=rr(t,n)}return t===""&&(t=e.placeholder),t}function uz(t,e,r,n){for(var a=0,i=0,o=t.length;i<o&&a<e;i++){var l=t.charCodeAt(i);a+=0<=l&&l<=127?r:n}return i}function fz(t,e){t!=null&&(t+="");var r=e.overflow,n=e.padding,a=e.font,i=r==="truncate",o=wu(a),l=Ae(e.lineHeight,o),c=!!e.backgroundColor,u=e.lineOverflow==="truncate",f=e.width,d;f!=null&&(r==="break"||r==="breakAll")?d=t?db(t,e.font,f,r==="breakAll",0).lines:[]:d=t?t.split(`
57
+ `):[];var h=d.length*l,p=Ae(e.height,h);if(h>p&&u){var m=Math.floor(p/l);d=d.slice(0,m)}if(t&&i&&f!=null)for(var v=cb(f,a,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),g=0;g<d.length;g++)d[g]=ub(d[g],v);for(var y=p,_=0,g=0;g<d.length;g++)_=Math.max(rr(d[g],a),_);f==null&&(f=_);var w=_;return n&&(y+=n[0]+n[2],w+=n[1]+n[3],f+=n[1]+n[3]),c&&(w=f),{lines:d,height:p,outerWidth:w,outerHeight:y,lineHeight:l,calculatedLineHeight:o,contentWidth:_,contentHeight:h,width:f}}var dz=function(){function t(){}return t}(),fb=function(){function t(e){this.tokens=[],e&&(this.tokens=e)}return t}(),hz=function(){function t(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]}return t}();function pz(t,e){var r=new hz;if(t!=null&&(t+=""),!t)return r;for(var n=e.width,a=e.height,i=e.overflow,o=(i==="break"||i==="breakAll")&&n!=null?{width:n,accumWidth:0,breakAll:i==="breakAll"}:null,l=nm.lastIndex=0,c;(c=nm.exec(t))!=null;){var u=c.index;u>l&&am(r,t.substring(l,u),e,o),am(r,c[2],e,o,c[1]),l=nm.lastIndex}l<t.length&&am(r,t.substring(l,t.length),e,o);var f=[],d=0,h=0,p=e.padding,m=i==="truncate",v=e.lineOverflow==="truncate";function g(P,I,V){P.width=I,P.lineHeight=V,d+=V,h=Math.max(h,I)}e:for(var y=0;y<r.lines.length;y++){for(var _=r.lines[y],w=0,S=0,x=0;x<_.tokens.length;x++){var b=_.tokens[x],C=b.styleName&&e.rich[b.styleName]||{},k=b.textPadding=C.padding,$=k?k[1]+k[3]:0,N=b.font=C.font||e.font;b.contentHeight=wu(N);var A=Ae(C.height,b.contentHeight);if(b.innerHeight=A,k&&(A+=k[0]+k[2]),b.height=A,b.lineHeight=ps(C.lineHeight,e.lineHeight,A),b.align=C&&C.align||e.align,b.verticalAlign=C&&C.verticalAlign||"middle",v&&a!=null&&d+b.lineHeight>a){x>0?(_.tokens=_.tokens.slice(0,x),g(_,S,w),r.lines=r.lines.slice(0,y+1)):r.lines=r.lines.slice(0,y);break e}var L=C.width,M=L==null||L==="auto";if(typeof L=="string"&&L.charAt(L.length-1)==="%")b.percentWidth=L,f.push(b),b.contentWidth=rr(b.text,N);else{if(M){var O=C.backgroundColor,T=O&&O.image;T&&(T=lz(T),Tu(T)&&(b.width=Math.max(b.width,T.width*A/T.height)))}var E=m&&n!=null?n-S:null;E!=null&&E<b.width?!M||E<$?(b.text="",b.width=b.contentWidth=0):(b.text=cz(b.text,E-$,N,e.ellipsis,{minChar:e.truncateMinChar}),b.width=b.contentWidth=rr(b.text,N)):b.contentWidth=rr(b.text,N)}b.width+=$,S+=b.width,C&&(w=Math.max(w,b.lineHeight))}g(_,S,w)}r.outerWidth=r.width=Ae(n,h),r.outerHeight=r.height=Ae(a,d),r.contentHeight=d,r.contentWidth=h,p&&(r.outerWidth+=p[1]+p[3],r.outerHeight+=p[0]+p[2]);for(var y=0;y<f.length;y++){var b=f[y],D=b.percentWidth;b.width=parseInt(D,10)/100*r.width}return r}function am(t,e,r,n,a){var i=e==="",o=a&&r.rich[a]||{},l=t.lines,c=o.font||r.font,u=!1,f,d;if(n){var h=o.padding,p=h?h[1]+h[3]:0;if(o.width!=null&&o.width!=="auto"){var m=en(o.width,n.width)+p;l.length>0&&m+n.accumWidth>n.width&&(f=e.split(`
58
+ `),u=!0),n.accumWidth=m}else{var v=db(e,c,n.width,n.breakAll,n.accumWidth);n.accumWidth=v.accumWidth+p,d=v.linesWidths,f=v.lines}}else f=e.split(`
59
+ `);for(var g=0;g<f.length;g++){var y=f[g],_=new dz;if(_.styleName=a,_.text=y,_.isLineHolder=!y&&!i,typeof o.width=="number"?_.width=o.width:_.width=d?d[g]:rr(y,c),!g&&!u){var w=(l[l.length-1]||(l[0]=new fb)).tokens,S=w.length;S===1&&w[0].isLineHolder?w[0]=_:(y||!S||i)&&w.push(_)}else l.push(new fb([_]))}}function mz(t){var e=t.charCodeAt(0);return e>=33&&e<=383}var vz=Qn(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function gz(t){return mz(t)?!!vz[t]:!0}function db(t,e,r,n,a){for(var i=[],o=[],l="",c="",u=0,f=0,d=0;d<t.length;d++){var h=t.charAt(d);if(h===`
60
+ `){c&&(l+=c,f+=u),i.push(l),o.push(f),l="",c="",u=0,f=0;continue}var p=rr(h,e),m=n?!1:!gz(h);if(i.length?f+p>r:a+f+p>r){f?(l||c)&&(m?(l||(l=c,c="",u=0,f=u),i.push(l),o.push(f-u),c+=h,u+=p,l="",f=u):(c&&(l+=c,c="",u=0),i.push(l),o.push(f),l=h,f=p)):m?(i.push(c),o.push(u),c=h,u=p):(i.push(h),o.push(p));continue}f+=p,m?(c+=h,u+=p):(c&&(l+=c,c="",u=0),l+=h)}return!i.length&&!l&&(l=t,c="",u=0),c&&(l+=c),l&&(i.push(l),o.push(f)),i.length===1&&(f+=a),{accumWidth:f,lines:i,linesWidths:o}}var im="__zr_style_"+Math.round(Math.random()*10),Ya={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Mu={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ya[im]=!0;var hb=["z","z2","invisible"],yz=["invisible"],_z=function(t){Xe(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var n=Fe(r),a=0;a<n.length;a++){var i=n[a];i==="style"?this.useStyle(r[i]):t.prototype.attrKV.call(this,i,r[i])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(r,n,a,i){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&wz(this,r,n)||o&&!o[0]&&!o[3])return!1;if(a&&this.__clipPaths){for(var l=0;l<this.__clipPaths.length;++l)if(this.__clipPaths[l].isZeroArea())return!1}if(i&&this.parent)for(var c=this.parent;c;){if(c.ignore)return!1;c=c.parent}return!0},e.prototype.contain=function(r,n){return this.rectContain(r,n)},e.prototype.traverse=function(r,n){r.call(n,this)},e.prototype.rectContain=function(r,n){var a=this.transformCoordToLocal(r,n),i=this.getBoundingRect();return i.contain(a[0],a[1])},e.prototype.getPaintRect=function(){var r=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,a=this.getBoundingRect(),i=this.style,o=i.shadowBlur||0,l=i.shadowOffsetX||0,c=i.shadowOffsetY||0;r=this._paintRect||(this._paintRect=new Ke(0,0,0,0)),n?Ke.applyTransform(r,a,n):r.copy(a),(o||l||c)&&(r.width+=o*2+Math.abs(l),r.height+=o*2+Math.abs(c),r.x=Math.min(r.x,r.x+l-o),r.y=Math.min(r.y,r.y+c-o));var u=this.dirtyRectTolerance;r.isZero()||(r.x=Math.floor(r.x-u),r.y=Math.floor(r.y-u),r.width=Math.ceil(r.width+1+u*2),r.height=Math.ceil(r.height+1+u*2))}return r},e.prototype.setPrevPaintRect=function(r){r?(this._prevPaintRect=this._prevPaintRect||new Ke(0,0,0,0),this._prevPaintRect.copy(r)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(r){return this.animate("style",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(r,n){r!=="style"?t.prototype.attrKV.call(this,r,n):this.style?this.setStyle(n):this.useStyle(n)},e.prototype.setStyle=function(r,n){return typeof r=="string"?this.style[r]=n:re(this.style,r),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(r){r||this.markRedraw(),this.__dirty|=_s,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&_s)},e.prototype.styleUpdated=function(){this.__dirty&=~_s},e.prototype.createStyle=function(r){return qc(Ya,r)},e.prototype.useStyle=function(r){r[im]||(r=this.createStyle(r)),this.__inHover?this.__hoverStyle=r:this.style=r,this.dirtyStyle()},e.prototype.isStyleObject=function(r){return r[im]},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(r,n,hb)},e.prototype._applyStateObj=function(r,n,a,i,o,l){t.prototype._applyStateObj.call(this,r,n,a,i,o,l);var c=!(n&&i),u;if(n&&n.style?o?i?u=n.style:(u=this._mergeStyle(this.createStyle(),a.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),i?this.style:a.style),this._mergeStyle(u,n.style)):c&&(u=a.style),u)if(o){var f=this.style;if(this.style=this.createStyle(c?{}:f),c)for(var d=Fe(f),h=0;h<d.length;h++){var p=d[h];p in u&&(u[p]=u[p],this.style[p]=f[p])}for(var m=Fe(u),h=0;h<m.length;h++){var p=m[h];this.style[p]=this.style[p]}this._transitionState(r,{style:u},l,this.getAnimationStyleProps())}else this.useStyle(u);for(var v=this.__inHover?yz:hb,h=0;h<v.length;h++){var p=v[h];n&&n[p]!=null?this[p]=n[p]:c&&a[p]!=null&&(this[p]=a[p])}},e.prototype._mergeStates=function(r){for(var n=t.prototype._mergeStates.call(this,r),a,i=0;i<r.length;i++){var o=r[i];o.style&&(a=a||{},this._mergeStyle(a,o.style))}return a&&(n.style=a),n},e.prototype._mergeStyle=function(r,n){return re(r,n),r},e.prototype.getAnimationStyleProps=function(){return Mu},e.initDefaultProps=function(){var r=e.prototype;r.type="displayable",r.invisible=!1,r.z=0,r.z2=0,r.zlevel=0,r.culling=!1,r.cursor="pointer",r.rectHover=!1,r.incremental=!1,r._rect=null,r.dirtyRectTolerance=0,r.__dirty=er|_s}(),e}(zw),om=new Ke(0,0,0,0),sm=new Ke(0,0,0,0);function wz(t,e,r){return om.copy(t.getBoundingRect()),t.transform&&om.applyTransform(t.transform),sm.width=e,sm.height=r,!om.intersect(sm)}var Ps=_z,mr=Math.min,vr=Math.max,lm=Math.sin,cm=Math.cos,Ga=Math.PI*2,$u=Gi(),Nu=Gi(),Eu=Gi();function pb(t,e,r,n,a,i){a[0]=mr(t,r),a[1]=mr(e,n),i[0]=vr(t,r),i[1]=vr(e,n)}var mb=[],vb=[];function bz(t,e,r,n,a,i,o,l,c,u){var f=hw,d=gt,h=f(t,r,a,o,mb);c[0]=1/0,c[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var p=0;p<h;p++){var m=d(t,r,a,o,mb[p]);c[0]=mr(m,c[0]),u[0]=vr(m,u[0])}h=f(e,n,i,l,vb);for(var p=0;p<h;p++){var v=d(e,n,i,l,vb[p]);c[1]=mr(v,c[1]),u[1]=vr(v,u[1])}c[0]=mr(t,c[0]),u[0]=vr(t,u[0]),c[0]=mr(o,c[0]),u[0]=vr(o,u[0]),c[1]=mr(e,c[1]),u[1]=vr(e,u[1]),c[1]=mr(l,c[1]),u[1]=vr(l,u[1])}function Sz(t,e,r,n,a,i,o,l){var c=mw,u=$t,f=vr(mr(c(t,r,a),1),0),d=vr(mr(c(e,n,i),1),0),h=u(t,r,a,f),p=u(e,n,i,d);o[0]=mr(t,a,h),o[1]=mr(e,i,p),l[0]=vr(t,a,h),l[1]=vr(e,i,p)}function xz(t,e,r,n,a,i,o,l,c){var u=Zi,f=qi,d=Math.abs(a-i);if(d%Ga<1e-4&&d>1e-4){l[0]=t-r,l[1]=e-n,c[0]=t+r,c[1]=e+n;return}if($u[0]=cm(a)*r+t,$u[1]=lm(a)*n+e,Nu[0]=cm(i)*r+t,Nu[1]=lm(i)*n+e,u(l,$u,Nu),f(c,$u,Nu),a=a%Ga,a<0&&(a=a+Ga),i=i%Ga,i<0&&(i=i+Ga),a>i&&!o?i+=Ga:a<i&&o&&(a+=Ga),o){var h=i;i=a,a=h}for(var p=0;p<i;p+=Math.PI/2)p>a&&(Eu[0]=cm(p)*r+t,Eu[1]=lm(p)*n+e,u(l,Eu,l),f(c,Eu,c))}var Ze={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Wa=[],Za=[],nn=[],aa=[],an=[],on=[],um=Math.min,fm=Math.max,qa=Math.cos,Xa=Math.sin,En=Math.abs,dm=Math.PI,ia=dm*2,hm=typeof Float32Array!="undefined",Bs=[];function pm(t){var e=Math.round(t/dm*1e8)/1e8;return e%2*dm}function Cz(t,e){var r=pm(t[0]);r<0&&(r+=ia);var n=r-t[0],a=t[1];a+=n,!e&&a-r>=ia?a=r+ia:e&&r-a>=ia?a=r-ia:!e&&r>a?a=r+(ia-pm(r-a)):e&&r<a&&(a=r-(ia-pm(a-r))),t[0]=r,t[1]=a}var kz=function(){function t(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(e,r,n){n=n||0,n>0&&(this._ux=En(n/gu/e)||0,this._uy=En(n/gu/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(Ze.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var n=En(e-this._xi),a=En(r-this._yi),i=n>this._ux||a>this._uy;if(this.addData(Ze.L,e,r),this._ctx&&i&&this._ctx.lineTo(e,r),i)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=n*n+a*a;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,n,a,i,o){return this._drawPendingPt(),this.addData(Ze.C,e,r,n,a,i,o),this._ctx&&this._ctx.bezierCurveTo(e,r,n,a,i,o),this._xi=i,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,n,a){return this._drawPendingPt(),this.addData(Ze.Q,e,r,n,a),this._ctx&&this._ctx.quadraticCurveTo(e,r,n,a),this._xi=n,this._yi=a,this},t.prototype.arc=function(e,r,n,a,i,o){this._drawPendingPt(),Bs[0]=a,Bs[1]=i,Cz(Bs,o),a=Bs[0],i=Bs[1];var l=i-a;return this.addData(Ze.A,e,r,n,n,a,l,0,o?0:1),this._ctx&&this._ctx.arc(e,r,n,a,i,o),this._xi=qa(i)*n+e,this._yi=Xa(i)*n+r,this},t.prototype.arcTo=function(e,r,n,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,n,a,i),this},t.prototype.rect=function(e,r,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,n,a),this.addData(Ze.R,e,r,n,a),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ze.Z);var e=this._ctx,r=this._x0,n=this._y0;return e&&e.closePath(),this._xi=r,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){var r=e.length;!(this.data&&this.data.length===r)&&hm&&(this.data=new Float32Array(r));for(var n=0;n<r;n++)this.data[n]=e[n];this._len=r},t.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var r=e.length,n=0,a=this._len,i=0;i<r;i++)n+=e[i].len();hm&&this.data instanceof Float32Array&&(this.data=new Float32Array(a+n));for(var i=0;i<r;i++)for(var o=e[i].data,l=0;l<o.length;l++)this.data[a++]=o[l];this._len=a},t.prototype.addData=function(e,r,n,a,i,o,l,c,u){if(!!this._saveData){var f=this.data;this._len+arguments.length>f.length&&(this._expandData(),f=this.data);for(var d=0;d<arguments.length;d++)f[this._len++]=arguments[d]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r<this._len;r++)e[r]=this.data[r];this.data=e}},t.prototype.toStatic=function(){if(!!this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,hm&&this._len>11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){nn[0]=nn[1]=an[0]=an[1]=Number.MAX_VALUE,aa[0]=aa[1]=on[0]=on[1]=-Number.MAX_VALUE;var e=this.data,r=0,n=0,a=0,i=0,o;for(o=0;o<this._len;){var l=e[o++],c=o===1;switch(c&&(r=e[o],n=e[o+1],a=r,i=n),l){case Ze.M:r=a=e[o++],n=i=e[o++],an[0]=a,an[1]=i,on[0]=a,on[1]=i;break;case Ze.L:pb(r,n,e[o],e[o+1],an,on),r=e[o++],n=e[o++];break;case Ze.C:bz(r,n,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],an,on),r=e[o++],n=e[o++];break;case Ze.Q:Sz(r,n,e[o++],e[o++],e[o],e[o+1],an,on),r=e[o++],n=e[o++];break;case Ze.A:var u=e[o++],f=e[o++],d=e[o++],h=e[o++],p=e[o++],m=e[o++]+p;o+=1;var v=!e[o++];c&&(a=qa(p)*d+u,i=Xa(p)*h+f),xz(u,f,d,h,p,m,v,an,on),r=qa(m)*d+u,n=Xa(m)*h+f;break;case Ze.R:a=r=e[o++],i=n=e[o++];var g=e[o++],y=e[o++];pb(a,i,a+g,i+y,an,on);break;case Ze.Z:r=a,n=i;break}Zi(nn,nn,an),qi(aa,aa,on)}return o===0&&(nn[0]=nn[1]=aa[0]=aa[1]=0),new Ke(nn[0],nn[1],aa[0]-nn[0],aa[1]-nn[1])},t.prototype._calculateLength=function(){var e=this.data,r=this._len,n=this._ux,a=this._uy,i=0,o=0,l=0,c=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,f=0,d=0,h=0;h<r;){var p=e[h++],m=h===1;m&&(i=e[h],o=e[h+1],l=i,c=o);var v=-1;switch(p){case Ze.M:i=l=e[h++],o=c=e[h++];break;case Ze.L:{var g=e[h++],y=e[h++],_=g-i,w=y-o;(En(_)>n||En(w)>a||h===r-1)&&(v=Math.sqrt(_*_+w*w),i=g,o=y);break}case Ze.C:{var S=e[h++],x=e[h++],g=e[h++],y=e[h++],b=e[h++],C=e[h++];v=k9(i,o,S,x,g,y,b,C,10),i=b,o=C;break}case Ze.Q:{var S=e[h++],x=e[h++],g=e[h++],y=e[h++];v=$9(i,o,S,x,g,y,10),i=g,o=y;break}case Ze.A:var k=e[h++],$=e[h++],N=e[h++],A=e[h++],L=e[h++],M=e[h++],O=M+L;h+=1,e[h++],m&&(l=qa(L)*N+k,c=Xa(L)*A+$),v=fm(N,A)*um(ia,Math.abs(M)),i=qa(O)*N+k,o=Xa(O)*A+$;break;case Ze.R:{l=i=e[h++],c=o=e[h++];var T=e[h++],E=e[h++];v=T*2+E*2;break}case Ze.Z:{var _=l-i,w=c-o;v=Math.sqrt(_*_+w*w),i=l,o=c;break}}v>=0&&(u[d++]=v,f+=v)}return this._pathLen=f,f},t.prototype.rebuildPath=function(e,r){var n=this.data,a=this._ux,i=this._uy,o=this._len,l,c,u,f,d,h,p=r<1,m,v,g=0,y=0,_,w=0,S,x;if(p&&(this._pathSegLen||this._calculateLength(),m=this._pathSegLen,v=this._pathLen,_=r*v,!_))return;e:for(var b=0;b<o;){var C=n[b++],k=b===1;switch(k&&(u=n[b],f=n[b+1],l=u,c=f),C!==Ze.L&&w>0&&(e.lineTo(S,x),w=0),C){case Ze.M:l=u=n[b++],c=f=n[b++],e.moveTo(u,f);break;case Ze.L:{d=n[b++],h=n[b++];var $=En(d-u),N=En(h-f);if($>a||N>i){if(p){var A=m[y++];if(g+A>_){var L=(_-g)/A;e.lineTo(u*(1-L)+d*L,f*(1-L)+h*L);break e}g+=A}e.lineTo(d,h),u=d,f=h,w=0}else{var M=$*$+N*N;M>w&&(S=d,x=h,w=M)}break}case Ze.C:{var O=n[b++],T=n[b++],E=n[b++],D=n[b++],P=n[b++],I=n[b++];if(p){var A=m[y++];if(g+A>_){var L=(_-g)/A;nu(u,O,E,P,L,Wa),nu(f,T,D,I,L,Za),e.bezierCurveTo(Wa[1],Za[1],Wa[2],Za[2],Wa[3],Za[3]);break e}g+=A}e.bezierCurveTo(O,T,E,D,P,I),u=P,f=I;break}case Ze.Q:{var O=n[b++],T=n[b++],E=n[b++],D=n[b++];if(p){var A=m[y++];if(g+A>_){var L=(_-g)/A;au(u,O,E,L,Wa),au(f,T,D,L,Za),e.quadraticCurveTo(Wa[1],Za[1],Wa[2],Za[2]);break e}g+=A}e.quadraticCurveTo(O,T,E,D),u=E,f=D;break}case Ze.A:var V=n[b++],F=n[b++],H=n[b++],Y=n[b++],Q=n[b++],ae=n[b++],le=n[b++],ye=!n[b++],de=H>Y?H:Y,Z=En(H-Y)>.001,K=Q+ae,J=!1;if(p){var A=m[y++];g+A>_&&(K=Q+ae*(_-g)/A,J=!0),g+=A}if(Z&&e.ellipse?e.ellipse(V,F,H,Y,le,Q,K,ye):e.arc(V,F,de,Q,K,ye),J)break e;k&&(l=qa(Q)*H+V,c=Xa(Q)*Y+F),u=qa(K)*H+V,f=Xa(K)*Y+F;break;case Ze.R:l=u=n[b],c=f=n[b+1],d=n[b++],h=n[b++];var oe=n[b++],Ce=n[b++];if(p){var A=m[y++];if(g+A>_){var Se=_-g;e.moveTo(d,h),e.lineTo(d+um(Se,oe),h),Se-=oe,Se>0&&e.lineTo(d+oe,h+um(Se,Ce)),Se-=Ce,Se>0&&e.lineTo(d+fm(oe-Se,0),h+Ce),Se-=oe,Se>0&&e.lineTo(d,h+fm(Ce-Se,0));break e}g+=A}e.rect(d,h,oe,Ce);break;case Ze.Z:if(p){var A=m[y++];if(g+A>_){var L=(_-g)/A;e.lineTo(u*(1-L)+l*L,f*(1-L)+c*L);break e}g+=A}e.closePath(),u=l,f=c}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.CMD=Ze,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}(),An=kz;function so(t,e,r,n,a,i,o){if(a===0)return!1;var l=a,c=0,u=t;if(o>e+l&&o>n+l||o<e-l&&o<n-l||i>t+l&&i>r+l||i<t-l&&i<r-l)return!1;if(t!==r)c=(e-n)/(t-r),u=(t*n-r*e)/(t-r);else return Math.abs(i-t)<=l/2;var f=c*i-o+u,d=f*f/(c*c+1);return d<=l/2*l/2}function Tz(t,e,r,n,a,i,o,l,c,u,f){if(c===0)return!1;var d=c;if(f>e+d&&f>n+d&&f>i+d&&f>l+d||f<e-d&&f<n-d&&f<i-d&&f<l-d||u>t+d&&u>r+d&&u>a+d&&u>o+d||u<t-d&&u<r-d&&u<a-d&&u<o-d)return!1;var h=C9(t,e,r,n,a,i,o,l,u,f,null);return h<=d/2}function Mz(t,e,r,n,a,i,o,l,c){if(o===0)return!1;var u=o;if(c>e+u&&c>n+u&&c>i+u||c<e-u&&c<n-u&&c<i-u||l>t+u&&l>r+u&&l>a+u||l<t-u&&l<r-u&&l<a-u)return!1;var f=M9(t,e,r,n,a,i,l,c,null);return f<=u/2}var gb=Math.PI*2;function Au(t){return t%=gb,t<0&&(t+=gb),t}var Is=Math.PI*2;function $z(t,e,r,n,a,i,o,l,c){if(o===0)return!1;var u=o;l-=t,c-=e;var f=Math.sqrt(l*l+c*c);if(f-u>r||f+u<r)return!1;if(Math.abs(n-a)%Is<1e-4)return!0;if(i){var d=n;n=Au(a),a=Au(d)}else n=Au(n),a=Au(a);n>a&&(a+=Is);var h=Math.atan2(c,l);return h<0&&(h+=Is),h>=n&&h<=a||h+Is>=n&&h+Is<=a}function Ka(t,e,r,n,a,i){if(i>e&&i>n||i<e&&i<n||n===e)return 0;var o=(i-e)/(n-e),l=n<e?1:-1;(o===1||o===0)&&(l=n<e?.5:-.5);var c=o*(r-t)+t;return c===a?1/0:c>a?l:0}var oa=An.CMD,Ja=Math.PI*2,Nz=1e-4;function Ez(t,e){return Math.abs(t-e)<Nz}var Bt=[-1,-1,-1],gr=[-1,-1];function Az(){var t=gr[0];gr[0]=gr[1],gr[1]=t}function Dz(t,e,r,n,a,i,o,l,c,u){if(u>e&&u>n&&u>i&&u>l||u<e&&u<n&&u<i&&u<l)return 0;var f=ru(e,n,i,l,u,Bt);if(f===0)return 0;for(var d=0,h=-1,p=void 0,m=void 0,v=0;v<f;v++){var g=Bt[v],y=g===0||g===1?.5:1,_=gt(t,r,a,o,g);_<c||(h<0&&(h=hw(e,n,i,l,gr),gr[1]<gr[0]&&h>1&&Az(),p=gt(e,n,i,l,gr[0]),h>1&&(m=gt(e,n,i,l,gr[1]))),h===2?g<gr[0]?d+=p<e?y:-y:g<gr[1]?d+=m<p?y:-y:d+=l<m?y:-y:g<gr[0]?d+=p<e?y:-y:d+=l<p?y:-y)}return d}function Oz(t,e,r,n,a,i,o,l){if(l>e&&l>n&&l>i||l<e&&l<n&&l<i)return 0;var c=T9(e,n,i,l,Bt);if(c===0)return 0;var u=mw(e,n,i);if(u>=0&&u<=1){for(var f=0,d=$t(e,n,i,u),h=0;h<c;h++){var p=Bt[h]===0||Bt[h]===1?.5:1,m=$t(t,r,a,Bt[h]);m<o||(Bt[h]<u?f+=d<e?p:-p:f+=i<d?p:-p)}return f}else{var p=Bt[0]===0||Bt[0]===1?.5:1,m=$t(t,r,a,Bt[0]);return m<o?0:i<e?p:-p}}function Lz(t,e,r,n,a,i,o,l){if(l-=e,l>r||l<-r)return 0;var c=Math.sqrt(r*r-l*l);Bt[0]=-c,Bt[1]=c;var u=Math.abs(n-a);if(u<1e-4)return 0;if(u>=Ja-1e-4){n=0,a=Ja;var f=i?1:-1;return o>=Bt[0]+t&&o<=Bt[1]+t?f:0}if(n>a){var d=n;n=a,a=d}n<0&&(n+=Ja,a+=Ja);for(var h=0,p=0;p<2;p++){var m=Bt[p];if(m+t>o){var v=Math.atan2(l,m),f=i?1:-1;v<0&&(v=Ja+v),(v>=n&&v<=a||v+Ja>=n&&v+Ja<=a)&&(v>Math.PI/2&&v<Math.PI*1.5&&(f=-f),h+=f)}}return h}function yb(t,e,r,n,a){for(var i=t.data,o=t.len(),l=0,c=0,u=0,f=0,d=0,h,p,m=0;m<o;){var v=i[m++],g=m===1;switch(v===oa.M&&m>1&&(r||(l+=Ka(c,u,f,d,n,a))),g&&(c=i[m],u=i[m+1],f=c,d=u),v){case oa.M:f=i[m++],d=i[m++],c=f,u=d;break;case oa.L:if(r){if(so(c,u,i[m],i[m+1],e,n,a))return!0}else l+=Ka(c,u,i[m],i[m+1],n,a)||0;c=i[m++],u=i[m++];break;case oa.C:if(r){if(Tz(c,u,i[m++],i[m++],i[m++],i[m++],i[m],i[m+1],e,n,a))return!0}else l+=Dz(c,u,i[m++],i[m++],i[m++],i[m++],i[m],i[m+1],n,a)||0;c=i[m++],u=i[m++];break;case oa.Q:if(r){if(Mz(c,u,i[m++],i[m++],i[m],i[m+1],e,n,a))return!0}else l+=Oz(c,u,i[m++],i[m++],i[m],i[m+1],n,a)||0;c=i[m++],u=i[m++];break;case oa.A:var y=i[m++],_=i[m++],w=i[m++],S=i[m++],x=i[m++],b=i[m++];m+=1;var C=!!(1-i[m++]);h=Math.cos(x)*w+y,p=Math.sin(x)*S+_,g?(f=h,d=p):l+=Ka(c,u,h,p,n,a);var k=(n-y)*S/w+y;if(r){if($z(y,_,S,x,x+b,C,e,k,a))return!0}else l+=Lz(y,_,S,x,x+b,C,k,a);c=Math.cos(x+b)*w+y,u=Math.sin(x+b)*S+_;break;case oa.R:f=c=i[m++],d=u=i[m++];var $=i[m++],N=i[m++];if(h=f+$,p=d+N,r){if(so(f,d,h,d,e,n,a)||so(h,d,h,p,e,n,a)||so(h,p,f,p,e,n,a)||so(f,p,f,d,e,n,a))return!0}else l+=Ka(h,d,h,p,n,a),l+=Ka(f,p,f,d,n,a);break;case oa.Z:if(r){if(so(c,u,f,d,e,n,a))return!0}else l+=Ka(c,u,f,d,n,a);c=f,u=d;break}}return!r&&!Ez(u,d)&&(l+=Ka(c,u,f,d,n,a)||0),l!==0}function Pz(t,e,r){return yb(t,0,!1,e,r)}function Bz(t,e,r,n){return yb(t,e,!0,r,n)}var Du=Ue({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ya),Iz={style:Ue({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Mu.style)},mm=ks.concat(["invisible","culling","z","z2","zlevel","parent"]),Rz=function(t){Xe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var a=this._decalEl=this._decalEl||new e;a.buildPath===e.prototype.buildPath&&(a.buildPath=function(c){r.buildPath(c,r.shape)}),a.silent=!0;var i=a.style;for(var o in n)i[o]!==n[o]&&(i[o]=n[o]);i.fill=n.fill?n.decal:null,i.decal=null,i.shadowColor=null,n.strokeFirst&&(i.stroke=null);for(var l=0;l<mm.length;++l)a[mm[l]]=this[mm[l]];a.__dirty|=er}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(r){var n=Fe(r);this.shape=this.getDefaultShape();var a=this.getDefaultStyle();a&&this.useStyle(a);for(var i=0;i<n.length;i++){var o=n[i],l=r[o];o==="style"?this.style?re(this.style,l):this.useStyle(l):o==="shape"?re(this.shape,l):t.prototype.attrKV.call(this,o,l)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var r=this.style.fill;if(r!=="none"){if(ve(r)){var n=ou(r,0);return n>.5?Pp:n>.2?cF:Bp}else if(r)return Bp}return Pp},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(ve(n)){var a=this.__zr,i=!!(a&&a.isDarkMode()),o=ou(r,0)<Lp;if(i===o)return n}},e.prototype.buildPath=function(r,n,a){},e.prototype.pathUpdated=function(){this.__dirty&=~Ki},e.prototype.getUpdatedPathProxy=function(r){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,r),this.path},e.prototype.createPathProxy=function(){this.path=new An(!1)},e.prototype.hasStroke=function(){var r=this.style,n=r.stroke;return!(n==null||n==="none"||!(r.lineWidth>0))},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,a=!r;if(a){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&Ki)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var l=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||a){l.copy(r);var c=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f==null?4:f)}c>1e-10&&(l.width+=u/c,l.height+=u/c,l.x-=u/c/2,l.y-=u/c/2)}return l}return r},e.prototype.contain=function(r,n){var a=this.transformCoordToLocal(r,n),i=this.getBoundingRect(),o=this.style;if(r=a[0],n=a[1],i.contain(r,n)){var l=this.path;if(this.hasStroke()){var c=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(c=Math.max(c,this.strokeContainThreshold)),Bz(l,c/u,r,n)))return!0}if(this.hasFill())return Pz(l,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Ki,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):t.prototype.attrKV.call(this,r,n)},e.prototype.setShape=function(r,n){var a=this.shape;return a||(a=this.shape={}),typeof r=="string"?a[r]=n:re(a,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Ki)},e.prototype.createStyle=function(r){return qc(Du,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=re({},this.shape))},e.prototype._applyStateObj=function(r,n,a,i,o,l){t.prototype._applyStateObj.call(this,r,n,a,i,o,l);var c=!(n&&i),u;if(n&&n.shape?o?i?u=n.shape:(u=re({},a.shape),re(u,n.shape)):(u=re({},i?this.shape:a.shape),re(u,n.shape)):c&&(u=a.shape),u)if(o){this.shape=re({},this.shape);for(var f={},d=Fe(u),h=0;h<d.length;h++){var p=d[h];typeof u[p]=="object"?this.shape[p]=u[p]:f[p]=u[p]}this._transitionState(r,{shape:f},l)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(r){for(var n=t.prototype._mergeStates.call(this,r),a,i=0;i<r.length;i++){var o=r[i];o.shape&&(a=a||{},this._mergeStyle(a,o.shape))}return a&&(n.shape=a),n},e.prototype.getAnimationStyleProps=function(){return Iz},e.prototype.isZeroArea=function(){return!1},e.extend=function(r){var n=function(i){Xe(o,i);function o(l){var c=i.call(this,l)||this;return r.init&&r.init.call(c,l),c}return o.prototype.getDefaultStyle=function(){return Te(r.style)},o.prototype.getDefaultShape=function(){return Te(r.shape)},o}(e);for(var a in r)typeof r[a]=="function"&&(n.prototype[a]=r[a]);return n},e.initDefaultProps=function(){var r=e.prototype;r.type="path",r.strokeContainThreshold=5,r.segmentIgnoreThreshold=0,r.subPixelOptimize=!1,r.autoBatch=!1,r.__dirty=er|_s|Ki}(),e}(Ps),je=Rz,Vz=Ue({strokeFirst:!0,font:Kn,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Du),_b=function(t){Xe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.hasStroke=function(){var r=this.style,n=r.stroke;return n!=null&&n!=="none"&&r.lineWidth>0},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(r){return qc(Vz,r)},e.prototype.setBoundingRect=function(r){this._rect=r},e.prototype.getBoundingRect=function(){var r=this.style;if(!this._rect){var n=r.text;n!=null?n+="":n="";var a=jp(n,r.font,r.textAlign,r.textBaseline);if(a.x+=r.x||0,a.y+=r.y||0,this.hasStroke()){var i=r.lineWidth;a.x-=i/2,a.y-=i/2,a.width+=i,a.height+=i}this._rect=a}return this._rect},e.initDefaultProps=function(){var r=e.prototype;r.dirtyRectTolerance=10}(),e}(Ps);_b.prototype.type="tspan";var Ou=_b,Fz=Ue({x:0,y:0},Ya),zz={style:Ue({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Mu.style)};function Hz(t){return!!(t&&typeof t!="string"&&t.width&&t.height)}var wb=function(t){Xe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createStyle=function(r){return qc(Fz,r)},e.prototype._getSize=function(r){var n=this.style,a=n[r];if(a!=null)return a;var i=Hz(n.image)?n.image:this.__image;if(!i)return 0;var o=r==="width"?"height":"width",l=n[o];return l==null?i[r]:i[r]/i[o]*l},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return zz},e.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new Ke(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},e}(Ps);wb.prototype.type="image";var Ir=wb;function Uz(t,e){var r=e.x,n=e.y,a=e.width,i=e.height,o=e.r,l,c,u,f;a<0&&(r=r+a,a=-a),i<0&&(n=n+i,i=-i),typeof o=="number"?l=c=u=f=o:o instanceof Array?o.length===1?l=c=u=f=o[0]:o.length===2?(l=u=o[0],c=f=o[1]):o.length===3?(l=o[0],c=f=o[1],u=o[2]):(l=o[0],c=o[1],u=o[2],f=o[3]):l=c=u=f=0;var d;l+c>a&&(d=l+c,l*=a/d,c*=a/d),u+f>a&&(d=u+f,u*=a/d,f*=a/d),c+u>i&&(d=c+u,c*=i/d,u*=i/d),l+f>i&&(d=l+f,l*=i/d,f*=i/d),t.moveTo(r+l,n),t.lineTo(r+a-c,n),c!==0&&t.arc(r+a-c,n+c,c,-Math.PI/2,0),t.lineTo(r+a,n+i-u),u!==0&&t.arc(r+a-u,n+i-u,u,0,Math.PI/2),t.lineTo(r+f,n+i),f!==0&&t.arc(r+f,n+i-f,f,Math.PI/2,Math.PI),t.lineTo(r,n+l),l!==0&&t.arc(r+l,n+l,l,Math.PI,Math.PI*1.5)}var lo=Math.round;function bb(t,e,r){if(!!e){var n=e.x1,a=e.x2,i=e.y1,o=e.y2;t.x1=n,t.x2=a,t.y1=i,t.y2=o;var l=r&&r.lineWidth;return l&&(lo(n*2)===lo(a*2)&&(t.x1=t.x2=Qa(n,l,!0)),lo(i*2)===lo(o*2)&&(t.y1=t.y2=Qa(i,l,!0))),t}}function Sb(t,e,r){if(!!e){var n=e.x,a=e.y,i=e.width,o=e.height;t.x=n,t.y=a,t.width=i,t.height=o;var l=r&&r.lineWidth;return l&&(t.x=Qa(n,l,!0),t.y=Qa(a,l,!0),t.width=Math.max(Qa(n+i,l,!1)-t.x,i===0?0:1),t.height=Math.max(Qa(a+o,l,!1)-t.y,o===0?0:1)),t}}function Qa(t,e,r){if(!e)return t;var n=lo(t*2);return(n+lo(e))%2==0?n/2:(n+(r?1:-1))/2}var jz=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),Yz={},xb=function(t){Xe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new jz},e.prototype.buildPath=function(r,n){var a,i,o,l;if(this.subPixelOptimize){var c=Sb(Yz,n,this.style);a=c.x,i=c.y,o=c.width,l=c.height,c.r=n.r,n=c}else a=n.x,i=n.y,o=n.width,l=n.height;n.r?Uz(r,n):r.rect(a,i,o,l)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(je);xb.prototype.type="rect";var it=xb,Cb={fill:"#000"},kb=2,Gz={style:Ue({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Mu.style)},Tb=function(t){Xe(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Cb,n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r<this._children.length;r++){var n=this._children[r];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},e.prototype.updateTransform=function(){var r=this.innerTransformable;r?(r.updateTransform(),r.transform&&(this.transform=r.transform)):t.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(r){var n=this.innerTransformable;return n?n.getLocalTransform(r):t.prototype.getLocalTransform.call(this,r)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),t.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,qz(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(r){t.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=r},e.prototype.removeSelfFromZr=function(r){t.prototype.removeSelfFromZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var r=new Ke(0,0,0,0),n=this._children,a=[],i=null,o=0;o<n.length;o++){var l=n[o],c=l.getBoundingRect(),u=l.getLocalTransform(a);u?(r.copy(c),r.applyTransform(u),i=i||r.clone(),i.union(r)):(i=i||c.clone(),i.union(c))}this._rect=i||r}return this._rect},e.prototype.setDefaultTextStyle=function(r){this._defaultStyle=r||Cb},e.prototype.setTextContent=function(r){},e.prototype._mergeStyle=function(r,n){if(!n)return r;var a=n.rich,i=r.rich||a&&{};return re(r,n),a&&i?(this._mergeRich(i,a),r.rich=i):i&&(r.rich=i),r},e.prototype._mergeRich=function(r,n){for(var a=Fe(n),i=0;i<a.length;i++){var o=a[i];r[o]=r[o]||{},re(r[o],n[o])}},e.prototype.getAnimationStyleProps=function(){return Gz},e.prototype._getOrCreateChild=function(r){var n=this._children[this._childCursor];return(!n||!(n instanceof r))&&(n=new r),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},e.prototype._updatePlainTexts=function(){var r=this.style,n=r.font||Kn,a=r.padding,i=Pb(r),o=fz(i,r),l=vm(r),c=!!r.backgroundColor,u=o.outerHeight,f=o.outerWidth,d=o.contentWidth,h=o.lines,p=o.lineHeight,m=this._defaultStyle,v=r.x||0,g=r.y||0,y=r.align||m.align||"left",_=r.verticalAlign||m.verticalAlign||"top",w=v,S=io(g,o.contentHeight,_);if(l||a){var x=$s(v,f,y),b=io(g,u,_);l&&this._renderBackground(r,r,x,b,f,u)}S+=p/2,a&&(w=Lb(v,y,a),_==="top"?S+=a[0]:_==="bottom"&&(S-=a[2]));for(var C=0,k=!1,$=Ob("fill"in r?r.fill:(k=!0,m.fill)),N=Db("stroke"in r?r.stroke:!c&&(!m.autoStroke||k)?(C=kb,m.stroke):null),A=r.textShadowBlur>0,L=r.width!=null&&(r.overflow==="truncate"||r.overflow==="break"||r.overflow==="breakAll"),M=o.calculatedLineHeight,O=0;O<h.length;O++){var T=this._getOrCreateChild(Ou),E=T.createStyle();T.useStyle(E),E.text=h[O],E.x=w,E.y=S,y&&(E.textAlign=y),E.textBaseline="middle",E.opacity=r.opacity,E.strokeFirst=!0,A&&(E.shadowBlur=r.textShadowBlur||0,E.shadowColor=r.textShadowColor||"transparent",E.shadowOffsetX=r.textShadowOffsetX||0,E.shadowOffsetY=r.textShadowOffsetY||0),E.stroke=N,E.fill=$,N&&(E.lineWidth=r.lineWidth||C,E.lineDash=r.lineDash,E.lineDashOffset=r.lineDashOffset||0),E.font=n,Nb(E,r),S+=p,L&&T.setBoundingRect(new Ke($s(E.x,r.width,E.textAlign),io(E.y,M,E.textBaseline),d,M))}},e.prototype._updateRichTexts=function(){var r=this.style,n=Pb(r),a=pz(n,r),i=a.width,o=a.outerWidth,l=a.outerHeight,c=r.padding,u=r.x||0,f=r.y||0,d=this._defaultStyle,h=r.align||d.align,p=r.verticalAlign||d.verticalAlign,m=$s(u,o,h),v=io(f,l,p),g=m,y=v;c&&(g+=c[3],y+=c[0]);var _=g+i;vm(r)&&this._renderBackground(r,r,m,v,o,l);for(var w=!!r.backgroundColor,S=0;S<a.lines.length;S++){for(var x=a.lines[S],b=x.tokens,C=b.length,k=x.lineHeight,$=x.width,N=0,A=g,L=_,M=C-1,O=void 0;N<C&&(O=b[N],!O.align||O.align==="left");)this._placeToken(O,r,k,y,A,"left",w),$-=O.width,A+=O.width,N++;for(;M>=0&&(O=b[M],O.align==="right");)this._placeToken(O,r,k,y,L,"right",w),$-=O.width,L-=O.width,M--;for(A+=(i-(A-g)-(_-L)-$)/2;N<=M;)O=b[N],this._placeToken(O,r,k,y,A+O.width/2,"center",w),A+=O.width,N++;y+=k}},e.prototype._placeToken=function(r,n,a,i,o,l,c){var u=n.rich[r.styleName]||{};u.text=r.text;var f=r.verticalAlign,d=i+a/2;f==="top"?d=i+r.height/2:f==="bottom"&&(d=i+a-r.height/2);var h=!r.isLineHolder&&vm(u);h&&this._renderBackground(u,n,l==="right"?o-r.width:l==="center"?o-r.width/2:o,d-r.height/2,r.width,r.height);var p=!!u.backgroundColor,m=r.textPadding;m&&(o=Lb(o,l,m),d-=r.height/2-m[0]-r.innerHeight/2);var v=this._getOrCreateChild(Ou),g=v.createStyle();v.useStyle(g);var y=this._defaultStyle,_=!1,w=0,S=Ob("fill"in u?u.fill:"fill"in n?n.fill:(_=!0,y.fill)),x=Db("stroke"in u?u.stroke:"stroke"in n?n.stroke:!p&&!c&&(!y.autoStroke||_)?(w=kb,y.stroke):null),b=u.textShadowBlur>0||n.textShadowBlur>0;g.text=r.text,g.x=o,g.y=d,b&&(g.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,g.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),g.textAlign=l,g.textBaseline="middle",g.font=r.font||Kn,g.opacity=ps(u.opacity,n.opacity,1),Nb(g,u),x&&(g.lineWidth=ps(u.lineWidth,n.lineWidth,w),g.lineDash=Ae(u.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=x),S&&(g.fill=S);var C=r.contentWidth,k=r.contentHeight;v.setBoundingRect(new Ke($s(g.x,C,g.textAlign),io(g.y,k,g.textBaseline),C,k))},e.prototype._renderBackground=function(r,n,a,i,o,l){var c=r.backgroundColor,u=r.borderWidth,f=r.borderColor,d=c&&c.image,h=c&&!d,p=r.borderRadius,m=this,v,g;if(h||r.lineHeight||u&&f){v=this._getOrCreateChild(it),v.useStyle(v.createStyle()),v.style.fill=null;var y=v.shape;y.x=a,y.y=i,y.width=o,y.height=l,y.r=p,v.dirtyShape()}if(h){var _=v.style;_.fill=c||null,_.fillOpacity=Ae(r.fillOpacity,1)}else if(d){g=this._getOrCreateChild(Ir),g.onload=function(){m.dirtyStyle()};var w=g.style;w.image=c.image,w.x=a,w.y=i,w.width=o,w.height=l}if(u&&f){var _=v.style;_.lineWidth=u,_.stroke=f,_.strokeOpacity=Ae(r.strokeOpacity,1),_.lineDash=r.borderDash,_.lineDashOffset=r.borderDashOffset||0,v.strokeContainThreshold=0,v.hasFill()&&v.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var S=(v||g).style;S.shadowBlur=r.shadowBlur||0,S.shadowColor=r.shadowColor||"transparent",S.shadowOffsetX=r.shadowOffsetX||0,S.shadowOffsetY=r.shadowOffsetY||0,S.opacity=ps(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return Eb(r)&&(n=[r.fontStyle,r.fontWeight,$b(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Kr(n)||r.textFont||r.font},e}(Ps),Wz={left:!0,right:1,center:1},Zz={top:1,bottom:1,middle:1},Mb=["fontStyle","fontWeight","fontSize","fontFamily"];function $b(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?Yh+"px":t+"px"}function Nb(t,e){for(var r=0;r<Mb.length;r++){var n=Mb[r],a=e[n];a!=null&&(t[n]=a)}}function Eb(t){return t.fontSize!=null||t.fontFamily||t.fontWeight}function qz(t){return Ab(t),z(t.rich,Ab),t}function Ab(t){if(t){t.font=Tb.makeFont(t);var e=t.align;e==="middle"&&(e="center"),t.align=e==null||Wz[e]?e:"left";var r=t.verticalAlign;r==="center"&&(r="middle"),t.verticalAlign=r==null||Zz[r]?r:"top";var n=t.padding;n&&(t.padding=U_(t.padding))}}function Db(t,e){return t==null||e<=0||t==="transparent"||t==="none"?null:t.image||t.colorStops?"#000":t}function Ob(t){return t==null||t==="none"?null:t.image||t.colorStops?"#000":t}function Lb(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function Pb(t){var e=t.text;return e!=null&&(e+=""),e}function vm(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var ut=Tb,He=ct(),Xz=function(t,e,r,n){if(n){var a=He(n);a.dataIndex=r,a.dataType=e,a.seriesIndex=t,n.type==="group"&&n.traverse(function(i){var o=He(i);o.seriesIndex=t,o.dataIndex=r,o.dataType=e})}},Bb=1,Ib={},Rb=ct(),gm=ct(),ym=0,Lu=1,Pu=2,Yt=["emphasis","blur","select"],Bu=["normal","emphasis","blur","select"],Kz=10,Jz=9,ei="highlight",Iu="downplay",Rs="select",Ru="unselect",Vs="toggleSelect";function co(t){return t!=null&&t!=="none"}var Vb=new ws(100);function Fb(t){if(ve(t)){var e=Vb.get(t);return e||(e=_w(t,-.1),Vb.put(t,e)),e}else if(Wc(t)){var r=re({},t);return r.colorStops=he(t.colorStops,function(n){return{offset:n.offset,color:_w(n.color,-.1)}}),r}return t}function Vu(t,e,r){t.onHoverStateChange&&(t.hoverState||0)!==r&&t.onHoverStateChange(e),t.hoverState=r}function zb(t){Vu(t,"emphasis",Pu)}function Hb(t){t.hoverState===Pu&&Vu(t,"normal",ym)}function _m(t){Vu(t,"blur",Lu)}function Ub(t){t.hoverState===Lu&&Vu(t,"normal",ym)}function Qz(t){t.selected=!0}function eH(t){t.selected=!1}function jb(t,e,r){e(t,r)}function Dn(t,e,r){jb(t,e,r),t.isGroup&&t.traverse(function(n){jb(n,e,r)})}function Yb(t,e){switch(e){case"emphasis":t.hoverState=Pu;break;case"normal":t.hoverState=ym;break;case"blur":t.hoverState=Lu;break;case"select":t.selected=!0}}function tH(t,e,r,n){for(var a=t.style,i={},o=0;o<e.length;o++){var l=e[o],c=a[l];i[l]=c==null?n&&n[l]:c}for(var o=0;o<t.animators.length;o++){var u=t.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(r)<0&&u.targetName==="style"&&u.saveTo(i,e)}return i}function rH(t,e,r,n){var a=r&&Ge(r,"select")>=0,i=!1;if(t instanceof je){var o=Rb(t),l=a&&o.selectFill||o.normalFill,c=a&&o.selectStroke||o.normalStroke;if(co(l)||co(c)){n=n||{};var u=n.style||{};u.fill==="inherit"?(i=!0,n=re({},n),u=re({},u),u.fill=l):!co(u.fill)&&co(l)?(i=!0,n=re({},n),u=re({},u),u.fill=Fb(l)):!co(u.stroke)&&co(c)&&(i||(n=re({},n),u=re({},u)),u.stroke=Fb(c)),n.style=u}}if(n&&n.z2==null){i||(n=re({},n));var f=t.z2EmphasisLift;n.z2=t.z2+(f!=null?f:Kz)}return n}function nH(t,e,r){if(r&&r.z2==null){r=re({},r);var n=t.z2SelectLift;r.z2=t.z2+(n!=null?n:Jz)}return r}function aH(t,e,r){var n=Ge(t.currentStates,e)>=0,a=t.style.opacity,i=n?null:tH(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=re({},r),o=re({opacity:n?a:i.opacity*.1},o),r.style=o),r}function wm(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return rH(this,t,e,r);if(t==="blur")return aH(this,t,r);if(t==="select")return nH(this,t,r)}return r}function iH(t){t.stateProxy=wm;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=wm),r&&(r.stateProxy=wm)}function Gb(t,e){!Kb(t,e)&&!t.__highByOuter&&Dn(t,zb)}function Wb(t,e){!Kb(t,e)&&!t.__highByOuter&&Dn(t,Hb)}function Fs(t,e){t.__highByOuter|=1<<(e||0),Dn(t,zb)}function zs(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&Dn(t,Hb)}function Zb(t){Dn(t,_m)}function bm(t){Dn(t,Ub)}function qb(t){Dn(t,Qz)}function Xb(t){Dn(t,eH)}function Kb(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Jb(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(a,i){var o=gm(i),l=a==="series",c=l?t.getViewOfSeriesModel(i):t.getViewOfComponentModel(i);!l&&n.push(c),o.isBlured&&(c.group.traverse(function(u){Ub(u)}),l&&r.push(i)),o.isBlured=!1}),z(n,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(r,!1,e)})}function Sm(t,e,r,n){var a=n.getModel();r=r||"coordinateSystem";function i(u,f){for(var d=0;d<f.length;d++){var h=u.getItemGraphicEl(f[d]);h&&bm(h)}}if(t!=null&&!(!e||e==="none")){var o=a.getSeriesByIndex(t),l=o.coordinateSystem;l&&l.master&&(l=l.master);var c=[];a.eachSeries(function(u){var f=o===u,d=u.coordinateSystem;d&&d.master&&(d=d.master);var h=d&&l?d===l:f;if(!(r==="series"&&!f||r==="coordinateSystem"&&!h||e==="series"&&f)){var p=n.getViewOfSeriesModel(u);if(p.group.traverse(function(g){_m(g)}),Ut(e))i(u.getData(),e);else if(_e(e))for(var m=Fe(e),v=0;v<m.length;v++)i(u.getData(m[v]),e[m[v]]);c.push(u),gm(u).isBlured=!0}}),a.eachComponent(function(u,f){if(u!=="series"){var d=n.getViewOfComponentModel(f);d&&d.toggleBlurSeries&&d.toggleBlurSeries(c,!0,a)}})}}function xm(t,e,r){if(!(t==null||e==null)){var n=r.getModel().getComponent(t,e);if(!!n){gm(n).isBlured=!0;var a=r.getViewOfComponentModel(n);!a||!a.focusBlurEnabled||a.group.traverse(function(i){_m(i)})}}}function oH(t,e,r){var n=t.seriesIndex,a=t.getData(e.dataType);if(!!a){var i=Ua(a,e);i=(se(i)?i[0]:i)||0;var o=a.getItemGraphicEl(i);if(!o)for(var l=a.count(),c=0;!o&&c<l;)o=a.getItemGraphicEl(c++);if(o){var u=He(o);Sm(n,u.focus,u.blurScope,r)}else{var f=t.get(["emphasis","focus"]),d=t.get(["emphasis","blurScope"]);f!=null&&Sm(n,f,d,r)}}}function Cm(t,e,r,n){var a={focusSelf:!1,dispatchers:null};if(t==null||t==="series"||e==null||r==null)return a;var i=n.getModel().getComponent(t,e);if(!i)return a;var o=n.getViewOfComponentModel(i);if(!o||!o.findHighDownDispatchers)return a;for(var l=o.findHighDownDispatchers(r),c,u=0;u<l.length;u++)if(He(l[u]).focus==="self"){c=!0;break}return{focusSelf:c,dispatchers:l}}function sH(t,e,r){var n=He(t),a=Cm(n.componentMainType,n.componentIndex,n.componentHighDownName,r),i=a.dispatchers,o=a.focusSelf;i?(o&&xm(n.componentMainType,n.componentIndex,r),z(i,function(l){return Gb(l,e)})):(Sm(n.seriesIndex,n.focus,n.blurScope,r),n.focus==="self"&&xm(n.componentMainType,n.componentIndex,r),Gb(t,e))}function lH(t,e,r){Jb(r);var n=He(t),a=Cm(n.componentMainType,n.componentIndex,n.componentHighDownName,r).dispatchers;a?z(a,function(i){return Wb(i,e)}):Wb(t,e)}function cH(t,e,r){if(!!$m(e)){var n=e.dataType,a=t.getData(n),i=Ua(a,e);se(i)||(i=[i]),t[e.type===Vs?"toggleSelect":e.type===Rs?"select":"unselect"](i,n)}}function Qb(t){var e=t.getAllData();z(e,function(r){var n=r.data,a=r.type;n.eachItemGraphicEl(function(i,o){t.isSelected(o,a)?qb(i):Xb(i)})})}function uH(t){var e=[];return t.eachSeries(function(r){var n=r.getAllData();z(n,function(a){a.data;var i=a.type,o=r.getSelectedDataIndices();if(o.length>0){var l={dataIndex:o,seriesIndex:r.seriesIndex};i!=null&&(l.dataType=i),e.push(l)}})}),e}function km(t,e,r){Tm(t,!0),Dn(t,iH),dH(t,e,r)}function fH(t){Tm(t,!1)}function sa(t,e,r,n){n?fH(t):km(t,e,r)}function dH(t,e,r){var n=He(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var eS=["emphasis","blur","select"],hH={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Hs(t,e,r,n){r=r||"itemStyle";for(var a=0;a<eS.length;a++){var i=eS[a],o=e.getModel([i,r]),l=t.ensureState(i);l.style=n?n(o):o[hH[r]]()}}function Tm(t,e){var r=e===!1,n=t;t.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=t.highDownSilentOnTouch),(!r||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!r)}function Mm(t){return!!(t&&t.__highDownDispatcher)}function pH(t){var e=Ib[t];return e==null&&Bb<=32&&(e=Ib[t]=Bb++),e}function $m(t){var e=t.type;return e===Rs||e===Ru||e===Vs}function tS(t){var e=t.type;return e===ei||e===Iu}function mH(t){var e=Rb(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var r=t.states.select||{};e.selectFill=r.style&&r.style.fill||null,e.selectStroke=r.style&&r.style.stroke||null}var uo=An.CMD,vH=[[],[],[]],rS=Math.sqrt,gH=Math.atan2;function yH(t,e){if(!!e){var r=t.data,n=t.len(),a,i,o,l,c,u,f=uo.M,d=uo.C,h=uo.L,p=uo.R,m=uo.A,v=uo.Q;for(o=0,l=0;o<n;){switch(a=r[o++],l=o,i=0,a){case f:i=1;break;case h:i=1;break;case d:i=3;break;case v:i=2;break;case m:var g=e[4],y=e[5],_=rS(e[0]*e[0]+e[1]*e[1]),w=rS(e[2]*e[2]+e[3]*e[3]),S=gH(-e[1]/w,e[0]/_);r[o]*=_,r[o++]+=g,r[o]*=w,r[o++]+=y,r[o++]*=_,r[o++]*=w,r[o++]+=S,r[o++]+=S,o+=2,l=o;break;case p:u[0]=r[o++],u[1]=r[o++],ur(u,u,e),r[l++]=u[0],r[l++]=u[1],u[0]+=r[o++],u[1]+=r[o++],ur(u,u,e),r[l++]=u[0],r[l++]=u[1]}for(c=0;c<i;c++){var x=vH[c];x[0]=r[o++],x[1]=r[o++],ur(x,x,e),r[l++]=x[0],r[l++]=x[1]}}t.increaseVersion()}}var Nm=Math.sqrt,Fu=Math.sin,zu=Math.cos,Us=Math.PI;function nS(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Em(t,e){return(t[0]*e[0]+t[1]*e[1])/(nS(t)*nS(e))}function aS(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Em(t,e))}function iS(t,e,r,n,a,i,o,l,c,u,f){var d=c*(Us/180),h=zu(d)*(t-r)/2+Fu(d)*(e-n)/2,p=-1*Fu(d)*(t-r)/2+zu(d)*(e-n)/2,m=h*h/(o*o)+p*p/(l*l);m>1&&(o*=Nm(m),l*=Nm(m));var v=(a===i?-1:1)*Nm((o*o*(l*l)-o*o*(p*p)-l*l*(h*h))/(o*o*(p*p)+l*l*(h*h)))||0,g=v*o*p/l,y=v*-l*h/o,_=(t+r)/2+zu(d)*g-Fu(d)*y,w=(e+n)/2+Fu(d)*g+zu(d)*y,S=aS([1,0],[(h-g)/o,(p-y)/l]),x=[(h-g)/o,(p-y)/l],b=[(-1*h-g)/o,(-1*p-y)/l],C=aS(x,b);if(Em(x,b)<=-1&&(C=Us),Em(x,b)>=1&&(C=0),C<0){var k=Math.round(C/Us*1e6)/1e6;C=Us*2+k%2*Us}f.addData(u,_,w,o,l,S,C,d,i)}var _H=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,wH=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function bH(t){var e=new An;if(!t)return e;var r=0,n=0,a=r,i=n,o,l=An.CMD,c=t.match(_H);if(!c)return e;for(var u=0;u<c.length;u++){for(var f=c[u],d=f.charAt(0),h=void 0,p=f.match(wH)||[],m=p.length,v=0;v<m;v++)p[v]=parseFloat(p[v]);for(var g=0;g<m;){var y=void 0,_=void 0,w=void 0,S=void 0,x=void 0,b=void 0,C=void 0,k=r,$=n,N=void 0,A=void 0;switch(d){case"l":r+=p[g++],n+=p[g++],h=l.L,e.addData(h,r,n);break;case"L":r=p[g++],n=p[g++],h=l.L,e.addData(h,r,n);break;case"m":r+=p[g++],n+=p[g++],h=l.M,e.addData(h,r,n),a=r,i=n,d="l";break;case"M":r=p[g++],n=p[g++],h=l.M,e.addData(h,r,n),a=r,i=n,d="L";break;case"h":r+=p[g++],h=l.L,e.addData(h,r,n);break;case"H":r=p[g++],h=l.L,e.addData(h,r,n);break;case"v":n+=p[g++],h=l.L,e.addData(h,r,n);break;case"V":n=p[g++],h=l.L,e.addData(h,r,n);break;case"C":h=l.C,e.addData(h,p[g++],p[g++],p[g++],p[g++],p[g++],p[g++]),r=p[g-2],n=p[g-1];break;case"c":h=l.C,e.addData(h,p[g++]+r,p[g++]+n,p[g++]+r,p[g++]+n,p[g++]+r,p[g++]+n),r+=p[g-2],n+=p[g-1];break;case"S":y=r,_=n,N=e.len(),A=e.data,o===l.C&&(y+=r-A[N-4],_+=n-A[N-3]),h=l.C,k=p[g++],$=p[g++],r=p[g++],n=p[g++],e.addData(h,y,_,k,$,r,n);break;case"s":y=r,_=n,N=e.len(),A=e.data,o===l.C&&(y+=r-A[N-4],_+=n-A[N-3]),h=l.C,k=r+p[g++],$=n+p[g++],r+=p[g++],n+=p[g++],e.addData(h,y,_,k,$,r,n);break;case"Q":k=p[g++],$=p[g++],r=p[g++],n=p[g++],h=l.Q,e.addData(h,k,$,r,n);break;case"q":k=p[g++]+r,$=p[g++]+n,r+=p[g++],n+=p[g++],h=l.Q,e.addData(h,k,$,r,n);break;case"T":y=r,_=n,N=e.len(),A=e.data,o===l.Q&&(y+=r-A[N-4],_+=n-A[N-3]),r=p[g++],n=p[g++],h=l.Q,e.addData(h,y,_,r,n);break;case"t":y=r,_=n,N=e.len(),A=e.data,o===l.Q&&(y+=r-A[N-4],_+=n-A[N-3]),r+=p[g++],n+=p[g++],h=l.Q,e.addData(h,y,_,r,n);break;case"A":w=p[g++],S=p[g++],x=p[g++],b=p[g++],C=p[g++],k=r,$=n,r=p[g++],n=p[g++],h=l.A,iS(k,$,r,n,b,C,w,S,x,h,e);break;case"a":w=p[g++],S=p[g++],x=p[g++],b=p[g++],C=p[g++],k=r,$=n,r+=p[g++],n+=p[g++],h=l.A,iS(k,$,r,n,b,C,w,S,x,h,e);break}}(d==="z"||d==="Z")&&(h=l.Z,e.addData(h),r=a,n=i),o=h}return e.toStatic(),e}var oS=function(t){Xe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.applyTransform=function(r){},e}(je);function sS(t){return t.setData!=null}function lS(t,e){var r=bH(t),n=re({},e);return n.buildPath=function(a){if(sS(a)){a.setData(r.data);var i=a.getContext();i&&a.rebuildPath(i,1)}else{var i=a;r.rebuildPath(i,1)}},n.applyTransform=function(a){yH(r,a),this.dirtyShape()},n}function SH(t,e){return new oS(lS(t,e))}function xH(t,e){var r=lS(t,e),n=function(a){Xe(i,a);function i(o){var l=a.call(this,o)||this;return l.applyTransform=r.applyTransform,l.buildPath=r.buildPath,l}return i}(oS);return n}function CH(t,e){for(var r=[],n=t.length,a=0;a<n;a++){var i=t[a];r.push(i.getUpdatedPathProxy(!0))}var o=new je(e);return o.createPathProxy(),o.buildPath=function(l){if(sS(l)){l.appendPath(r);var c=l.getContext();c&&l.rebuildPath(c,1)}},o}var kH=function(){function t(){this.cx=0,this.cy=0,this.r=0}return t}(),cS=function(t){Xe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new kH},e.prototype.buildPath=function(r,n){r.moveTo(n.cx+n.r,n.cy),r.arc(n.cx,n.cy,n.r,0,Math.PI*2)},e}(je);cS.prototype.type="circle";var Am=cS,TH=function(){function t(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return t}(),uS=function(t){Xe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new TH},e.prototype.buildPath=function(r,n){var a=.5522848,i=n.cx,o=n.cy,l=n.rx,c=n.ry,u=l*a,f=c*a;r.moveTo(i-l,o),r.bezierCurveTo(i-l,o-f,i-u,o-c,i,o-c),r.bezierCurveTo(i+u,o-c,i+l,o-f,i+l,o),r.bezierCurveTo(i+l,o+f,i+u,o+c,i,o+c),r.bezierCurveTo(i-u,o+c,i-l,o+f,i-l,o),r.closePath()},e}(je);uS.prototype.type="ellipse";var fS=uS,dS=Math.PI,Dm=dS*2,ti=Math.sin,fo=Math.cos,MH=Math.acos,Nt=Math.atan2,hS=Math.abs,js=Math.sqrt,Ys=Math.max,sn=Math.min,Rr=1e-4;function $H(t,e,r,n,a,i,o,l){var c=r-t,u=n-e,f=o-a,d=l-i,h=d*c-f*u;if(!(h*h<Rr))return h=(f*(e-i)-d*(t-a))/h,[t+h*c,e+h*u]}function Hu(t,e,r,n,a,i,o){var l=t-r,c=e-n,u=(o?i:-i)/js(l*l+c*c),f=u*c,d=-u*l,h=t+f,p=e+d,m=r+f,v=n+d,g=(h+m)/2,y=(p+v)/2,_=m-h,w=v-p,S=_*_+w*w,x=a-i,b=h*v-m*p,C=(w<0?-1:1)*js(Ys(0,x*x*S-b*b)),k=(b*w-_*C)/S,$=(-b*_-w*C)/S,N=(b*w+_*C)/S,A=(-b*_+w*C)/S,L=k-g,M=$-y,O=N-g,T=A-y;return L*L+M*M>O*O+T*T&&(k=N,$=A),{cx:k,cy:$,x0:-f,y0:-d,x1:k*(a/x-1),y1:$*(a/x-1)}}function NH(t){var e;if(se(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function EH(t,e){var r,n=Ys(e.r,0),a=Ys(e.r0||0,0),i=n>0,o=a>0;if(!(!i&&!o)){if(i||(n=a,a=0),a>n){var l=n;n=a,a=l}var c=e.startAngle,u=e.endAngle;if(!(isNaN(c)||isNaN(u))){var f=e.cx,d=e.cy,h=!!e.clockwise,p=hS(u-c),m=p>Dm&&p%Dm;if(m>Rr&&(p=m),!(n>Rr))t.moveTo(f,d);else if(p>Dm-Rr)t.moveTo(f+n*fo(c),d+n*ti(c)),t.arc(f,d,n,c,u,!h),a>Rr&&(t.moveTo(f+a*fo(u),d+a*ti(u)),t.arc(f,d,a,u,c,h));else{var v=void 0,g=void 0,y=void 0,_=void 0,w=void 0,S=void 0,x=void 0,b=void 0,C=void 0,k=void 0,$=void 0,N=void 0,A=void 0,L=void 0,M=void 0,O=void 0,T=n*fo(c),E=n*ti(c),D=a*fo(u),P=a*ti(u),I=p>Rr;if(I){var V=e.cornerRadius;V&&(r=NH(V),v=r[0],g=r[1],y=r[2],_=r[3]);var F=hS(n-a)/2;if(w=sn(F,y),S=sn(F,_),x=sn(F,v),b=sn(F,g),$=C=Ys(w,S),N=k=Ys(x,b),(C>Rr||k>Rr)&&(A=n*fo(u),L=n*ti(u),M=a*fo(c),O=a*ti(c),p<dS)){var H=$H(T,E,M,O,A,L,D,P);if(H){var Y=T-H[0],Q=E-H[1],ae=A-H[0],le=L-H[1],ye=1/ti(MH((Y*ae+Q*le)/(js(Y*Y+Q*Q)*js(ae*ae+le*le)))/2),de=js(H[0]*H[0]+H[1]*H[1]);$=sn(C,(n-de)/(ye+1)),N=sn(k,(a-de)/(ye-1))}}}if(!I)t.moveTo(f+T,d+E);else if($>Rr){var Z=sn(y,$),K=sn(_,$),J=Hu(M,O,T,E,n,Z,h),oe=Hu(A,L,D,P,n,K,h);t.moveTo(f+J.cx+J.x0,d+J.cy+J.y0),$<C&&Z===K?t.arc(f+J.cx,d+J.cy,$,Nt(J.y0,J.x0),Nt(oe.y0,oe.x0),!h):(Z>0&&t.arc(f+J.cx,d+J.cy,Z,Nt(J.y0,J.x0),Nt(J.y1,J.x1),!h),t.arc(f,d,n,Nt(J.cy+J.y1,J.cx+J.x1),Nt(oe.cy+oe.y1,oe.cx+oe.x1),!h),K>0&&t.arc(f+oe.cx,d+oe.cy,K,Nt(oe.y1,oe.x1),Nt(oe.y0,oe.x0),!h))}else t.moveTo(f+T,d+E),t.arc(f,d,n,c,u,!h);if(!(a>Rr)||!I)t.lineTo(f+D,d+P);else if(N>Rr){var Z=sn(v,N),K=sn(g,N),J=Hu(D,P,A,L,a,-K,h),oe=Hu(T,E,M,O,a,-Z,h);t.lineTo(f+J.cx+J.x0,d+J.cy+J.y0),N<k&&Z===K?t.arc(f+J.cx,d+J.cy,N,Nt(J.y0,J.x0),Nt(oe.y0,oe.x0),!h):(K>0&&t.arc(f+J.cx,d+J.cy,K,Nt(J.y0,J.x0),Nt(J.y1,J.x1),!h),t.arc(f,d,a,Nt(J.cy+J.y1,J.cx+J.x1),Nt(oe.cy+oe.y1,oe.cx+oe.x1),h),Z>0&&t.arc(f+oe.cx,d+oe.cy,Z,Nt(oe.y1,oe.x1),Nt(oe.y0,oe.x0),!h))}else t.lineTo(f+D,d+P),t.arc(f,d,a,u,c,h)}t.closePath()}}}var AH=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return t}(),pS=function(t){Xe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new AH},e.prototype.buildPath=function(r,n){EH(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(je);pS.prototype.type="sector";var ri=pS,DH=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),mS=function(t){Xe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new DH},e.prototype.buildPath=function(r,n){var a=n.cx,i=n.cy,o=Math.PI*2;r.moveTo(a+n.r,i),r.arc(a,i,n.r,0,o,!1),r.moveTo(a+n.r0,i),r.arc(a,i,n.r0,0,o,!0)},e}(je);mS.prototype.type="ring";var vS=mS;function OH(t,e,r,n){var a=[],i=[],o=[],l=[],c,u,f,d;if(n){f=[1/0,1/0],d=[-1/0,-1/0];for(var h=0,p=t.length;h<p;h++)Zi(f,f,t[h]),qi(d,d,t[h]);Zi(f,f,n[0]),qi(d,d,n[1])}for(var h=0,p=t.length;h<p;h++){var m=t[h];if(r)c=t[h?h-1:p-1],u=t[(h+1)%p];else if(h===0||h===p-1){a.push(qV(t[h]));continue}else c=t[h-1],u=t[h+1];W_(i,u,c),Qh(i,i,e);var v=tp(m,c),g=tp(m,u),y=v+g;y!==0&&(v/=y,g/=y),Qh(o,i,-v),Qh(l,i,g);var _=G_([],m,o),w=G_([],m,l);n&&(qi(_,_,f),Zi(_,_,d),qi(w,w,f),Zi(w,w,d)),a.push(_),a.push(w)}return r&&a.push(a.shift()),a}function gS(t,e,r){var n=e.smooth,a=e.points;if(a&&a.length>=2){if(n){var i=OH(a,n,r,e.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var o=a.length,l=0;l<(r?o:o-1);l++){var c=i[l*2],u=i[l*2+1],f=a[(l+1)%o];t.bezierCurveTo(c[0],c[1],u[0],u[1],f[0],f[1])}}else{t.moveTo(a[0][0],a[0][1]);for(var l=1,d=a.length;l<d;l++)t.lineTo(a[l][0],a[l][1])}r&&t.closePath()}}var LH=function(){function t(){this.points=null,this.smooth=0,this.smoothConstraint=null}return t}(),yS=function(t){Xe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new LH},e.prototype.buildPath=function(r,n){gS(r,n,!0)},e}(je);yS.prototype.type="polygon";var Uu=yS,PH=function(){function t(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return t}(),_S=function(t){Xe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new PH},e.prototype.buildPath=function(r,n){gS(r,n,!1)},e}(je);_S.prototype.type="polyline";var Gs=_S,BH={},IH=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return t}(),wS=function(t){Xe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new IH},e.prototype.buildPath=function(r,n){var a,i,o,l;if(this.subPixelOptimize){var c=bb(BH,n,this.style);a=c.x1,i=c.y1,o=c.x2,l=c.y2}else a=n.x1,i=n.y1,o=n.x2,l=n.y2;var u=n.percent;u!==0&&(r.moveTo(a,i),u<1&&(o=a*(1-u)+o*u,l=i*(1-u)+l*u),r.lineTo(o,l))},e.prototype.pointAt=function(r){var n=this.shape;return[n.x1*(1-r)+n.x2*r,n.y1*(1-r)+n.y2*r]},e}(je);wS.prototype.type="line";var la=wS,Gt=[],RH=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return t}();function bS(t,e,r){var n=t.cpx2,a=t.cpy2;return n!=null||a!=null?[(r?dw:gt)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?dw:gt)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?pw:$t)(t.x1,t.cpx1,t.x2,e),(r?pw:$t)(t.y1,t.cpy1,t.y2,e)]}var SS=function(t){Xe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new RH},e.prototype.buildPath=function(r,n){var a=n.x1,i=n.y1,o=n.x2,l=n.y2,c=n.cpx1,u=n.cpy1,f=n.cpx2,d=n.cpy2,h=n.percent;h!==0&&(r.moveTo(a,i),f==null||d==null?(h<1&&(au(a,c,o,h,Gt),c=Gt[1],o=Gt[2],au(i,u,l,h,Gt),u=Gt[1],l=Gt[2]),r.quadraticCurveTo(c,u,o,l)):(h<1&&(nu(a,c,f,o,h,Gt),c=Gt[1],f=Gt[2],o=Gt[3],nu(i,u,d,l,h,Gt),u=Gt[1],d=Gt[2],l=Gt[3]),r.bezierCurveTo(c,u,f,d,o,l)))},e.prototype.pointAt=function(r){return bS(this.shape,r,!1)},e.prototype.tangentAt=function(r){var n=bS(this.shape,r,!0);return ep(n,n)},e}(je);SS.prototype.type="bezier-curve";var Om=SS,VH=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),xS=function(t){Xe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new VH},e.prototype.buildPath=function(r,n){var a=n.cx,i=n.cy,o=Math.max(n.r,0),l=n.startAngle,c=n.endAngle,u=n.clockwise,f=Math.cos(l),d=Math.sin(l);r.moveTo(f*o+a,d*o+i),r.arc(a,i,o,l,c,!u)},e}(je);xS.prototype.type="arc";var Lm=xS,FH=function(t){Xe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="compound",r}return e.prototype._updatePathDirty=function(){for(var r=this.shape.paths,n=this.shapeChanged(),a=0;a<r.length;a++)n=n||r[a].shapeChanged();n&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var r=this.shape.paths||[],n=this.getGlobalScale(),a=0;a<r.length;a++)r[a].path||r[a].createPathProxy(),r[a].path.setScale(n[0],n[1],r[a].segmentIgnoreThreshold)},e.prototype.buildPath=function(r,n){for(var a=n.paths||[],i=0;i<a.length;i++)a[i].buildPath(r,a[i].shape,!0)},e.prototype.afterBrush=function(){for(var r=this.shape.paths||[],n=0;n<r.length;n++)r[n].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),je.prototype.getBoundingRect.call(this)},e}(je),CS=FH,zH=function(){function t(e){this.colorStops=e||[]}return t.prototype.addColorStop=function(e,r){this.colorStops.push({offset:e,color:r})},t}(),kS=zH,HH=function(t){Xe(e,t);function e(r,n,a,i,o,l){var c=t.call(this,o)||this;return c.x=r==null?0:r,c.y=n==null?0:n,c.x2=a==null?1:a,c.y2=i==null?0:i,c.type="linear",c.global=l||!1,c}return e}(kS),Pm=HH,UH=function(t){Xe(e,t);function e(r,n,a,i,o){var l=t.call(this,i)||this;return l.x=r==null?.5:r,l.y=n==null?.5:n,l.r=a==null?.5:a,l.type="radial",l.global=o||!1,l}return e}(kS),jH=UH,ni=[0,0],ai=[0,0],ju=new Me,Yu=new Me,YH=function(){function t(e,r){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Me;for(var n=0;n<2;n++)this._axes[n]=new Me;e&&this.fromBoundingRect(e,r)}return t.prototype.fromBoundingRect=function(e,r){var n=this._corners,a=this._axes,i=e.x,o=e.y,l=i+e.width,c=o+e.height;if(n[0].set(i,o),n[1].set(l,o),n[2].set(l,c),n[3].set(i,c),r)for(var u=0;u<4;u++)n[u].transform(r);Me.sub(a[0],n[1],n[0]),Me.sub(a[1],n[3],n[0]),a[0].normalize(),a[1].normalize();for(var u=0;u<2;u++)this._origin[u]=a[u].dot(n[0])},t.prototype.intersect=function(e,r){var n=!0,a=!r;return ju.set(1/0,1/0),Yu.set(0,0),!this._intersectCheckOneSide(this,e,ju,Yu,a,1)&&(n=!1,a)||!this._intersectCheckOneSide(e,this,ju,Yu,a,-1)&&(n=!1,a)||a||Me.copy(r,n?ju:Yu),n},t.prototype._intersectCheckOneSide=function(e,r,n,a,i,o){for(var l=!0,c=0;c<2;c++){var u=this._axes[c];if(this._getProjMinMaxOnAxis(c,e._corners,ni),this._getProjMinMaxOnAxis(c,r._corners,ai),ni[1]<ai[0]||ni[0]>ai[1]){if(l=!1,i)return l;var f=Math.abs(ai[0]-ni[1]),d=Math.abs(ni[0]-ai[1]);Math.min(f,d)>a.len()&&(f<d?Me.scale(a,u,-f*o):Me.scale(a,u,d*o))}else if(n){var f=Math.abs(ai[0]-ni[1]),d=Math.abs(ni[0]-ai[1]);Math.min(f,d)<n.len()&&(f<d?Me.scale(n,u,f*o):Me.scale(n,u,-d*o))}}return l},t.prototype._getProjMinMaxOnAxis=function(e,r,n){for(var a=this._axes[e],i=this._origin,o=r[0].dot(a)+i[e],l=o,c=o,u=1;u<r.length;u++){var f=r[u].dot(a)+i[e];l=Math.min(f,l),c=Math.max(f,c)}n[0]=l,n[1]=c},t}(),Gu=YH,GH=[],WH=function(t){Xe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.notClear=!0,r.incremental=!0,r._displayables=[],r._temporaryDisplayables=[],r._cursor=0,r}return e.prototype.traverse=function(r,n){r.call(n,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(r,n){n?this._temporaryDisplayables.push(r):this._displayables.push(r),this.markRedraw()},e.prototype.addDisplayables=function(r,n){n=n||!1;for(var a=0;a<r.length;a++)this.addDisplayable(r[a],n)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(r){for(var n=this._cursor;n<this._displayables.length;n++)r&&r(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)r&&r(this._temporaryDisplayables[n])},e.prototype.update=function(){this.updateTransform();for(var r=this._cursor;r<this._displayables.length;r++){var n=this._displayables[r];n.parent=this,n.update(),n.parent=null}for(var r=0;r<this._temporaryDisplayables.length;r++){var n=this._temporaryDisplayables[r];n.parent=this,n.update(),n.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var r=new Ke(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var a=this._displayables[n],i=a.getBoundingRect().clone();a.needLocalTransform()&&i.applyTransform(a.getLocalTransform(GH)),r.union(i)}this._rect=r}return this._rect},e.prototype.contain=function(r,n){var a=this.transformCoordToLocal(r,n),i=this.getBoundingRect();if(i.contain(a[0],a[1]))for(var o=0;o<this._displayables.length;o++){var l=this._displayables[o];if(l.contain(r,n))return!0}return!1},e}(Ps),ZH=WH,qH=ct();function XH(t,e,r,n,a){var i;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();i=o&&o.animation}var l=e&&e.isAnimationEnabled(),c=t==="update";if(l){var u=void 0,f=void 0,d=void 0;n?(u=Ae(n.duration,200),f=Ae(n.easing,"cubicOut"),d=0):(u=e.getShallow(c?"animationDurationUpdate":"animationDuration"),f=e.getShallow(c?"animationEasingUpdate":"animationEasing"),d=e.getShallow(c?"animationDelayUpdate":"animationDelay")),i&&(i.duration!=null&&(u=i.duration),i.easing!=null&&(f=i.easing),i.delay!=null&&(d=i.delay)),Ee(d)&&(d=d(r,a)),Ee(u)&&(u=u(r));var h={duration:u||0,delay:d,easing:f};return h}else return null}function Bm(t,e,r,n,a,i,o){var l=!1,c;Ee(a)?(o=i,i=a,a=null):_e(a)&&(i=a.cb,o=a.during,l=a.isFrom,c=a.removeOpt,a=a.dataIndex);var u=t==="leave";u||e.stopAnimation("leave");var f=XH(t,n,a,u?c||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,a):null);if(f&&f.duration>0){var d=f.duration,h=f.delay,p=f.easing,m={duration:d,delay:h||0,easing:p,done:i,force:!!i||!!o,setToFinal:!u,scope:t,during:o};l?e.animateFrom(r,m):e.animateTo(r,m)}else e.stopAnimation(),!l&&e.attr(r),o&&o(1),i&&i()}function _t(t,e,r,n,a,i){Bm("update",t,e,r,n,a,i)}function Wt(t,e,r,n,a,i){Bm("enter",t,e,r,n,a,i)}function Ws(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++){var r=t.animators[e];if(r.scope==="leave")return!0}return!1}function Wu(t,e,r,n,a,i){Ws(t)||Bm("leave",t,e,r,n,a,i)}function TS(t,e,r,n){t.removeTextContent(),t.removeTextGuideLine(),Wu(t,{style:{opacity:0}},e,r,n)}function Zs(t,e,r){function n(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(a){a.isGroup||TS(a,e,r,n)}):TS(t,e,r,n)}function Zu(t){qH(t).oldStyle=t.style}var qu=Math.max,Xu=Math.min,Im={};function KH(t){return je.extend(t)}var JH=xH;function QH(t,e){return JH(t,e)}function Vr(t,e){Im[t]=e}function eU(t){if(Im.hasOwnProperty(t))return Im[t]}function Rm(t,e,r,n){var a=SH(t,e);return r&&(n==="center"&&(r=$S(r,a.getBoundingRect())),NS(a,r)),a}function MS(t,e,r){var n=new Ir({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(a){if(r==="center"){var i={width:a.width,height:a.height};n.setStyle($S(e,i))}}});return n}function $S(t,e){var r=e.width/e.height,n=t.height*r,a;n<=t.width?a=t.height:(n=t.width,a=n/r);var i=t.x+t.width/2,o=t.y+t.height/2;return{x:i-n/2,y:o-a/2,width:n,height:a}}var tU=CH;function NS(t,e){if(!!t.applyTransform){var r=t.getBoundingRect(),n=r.calculateTransform(e);t.applyTransform(n)}}function rU(t){return bb(t.shape,t.shape,t.style),t}function nU(t){return Sb(t.shape,t.shape,t.style),t}var aU=Qa;function Ku(t,e){for(var r=Ip([]);t&&t!==e;)no(r,t.getLocalTransform(),r),t=t.parent;return r}function ho(t,e,r){return e&&!Ut(e)&&(e=Up.getLocalTransform(e)),r&&(e=Fp([],e)),ur([],t,e)}function ES(t,e,r){var n=e[4]===0||e[5]===0||e[0]===0?1:Math.abs(2*e[4]/e[0]),a=e[4]===0||e[5]===0||e[2]===0?1:Math.abs(2*e[4]/e[2]),i=[t==="left"?-n:t==="right"?n:0,t==="top"?-a:t==="bottom"?a:0];return i=ho(i,e,r),Math.abs(i[0])>Math.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function AS(t){return!t.isGroup}function iU(t){return t.shape!=null}function DS(t,e,r){if(!t||!e)return;function n(o){var l={};return o.traverse(function(c){AS(c)&&c.anid&&(l[c.anid]=c)}),l}function a(o){var l={x:o.x,y:o.y,rotation:o.rotation};return iU(o)&&(l.shape=re({},o.shape)),l}var i=n(t);e.traverse(function(o){if(AS(o)&&o.anid){var l=i[o.anid];if(l){var c=a(o);o.attr(a(l)),_t(o,c,r,He(o).dataIndex)}}})}function oU(t,e){return he(t,function(r){var n=r[0];n=qu(n,e.x),n=Xu(n,e.x+e.width);var a=r[1];return a=qu(a,e.y),a=Xu(a,e.y+e.height),[n,a]})}function sU(t,e){var r=qu(t.x,e.x),n=Xu(t.x+t.width,e.x+e.width),a=qu(t.y,e.y),i=Xu(t.y+t.height,e.y+e.height);if(n>=r&&i>=a)return{x:r,y:a,width:n-r,height:i-a}}function Vm(t,e,r){var n=re({rectHover:!0},e),a=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(a.image=t.slice(8),Ue(a,r),new Ir(n)):Rm(t.replace("path://",""),n,r,"center")}function lU(t,e,r,n,a){for(var i=0,o=a[a.length-1];i<a.length;i++){var l=a[i];if(OS(t,e,r,n,l[0],l[1],o[0],o[1]))return!0;o=l}}function OS(t,e,r,n,a,i,o,l){var c=r-t,u=n-e,f=o-a,d=l-i,h=Fm(f,d,c,u);if(cU(h))return!1;var p=t-a,m=e-i,v=Fm(p,m,c,u)/h;if(v<0||v>1)return!1;var g=Fm(p,m,f,d)/h;return!(g<0||g>1)}function Fm(t,e,r,n){return t*n-r*e}function cU(t){return t<=1e-6&&t>=-1e-6}function zm(t){var e=t.itemTooltipOption,r=t.componentModel,n=t.itemName,a=ve(e)?{formatter:e}:e,i=r.mainType,o=r.componentIndex,l={componentType:i,name:n,$vars:["name"]};l[i+"Index"]=o;var c=t.formatterParamsExtra;c&&z(Fe(c),function(f){Yi(l,f)||(l[f]=c[f],l.$vars.push(f))});var u=He(t.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:n,option:Ue({content:n,formatterParams:l},a)}}function LS(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function po(t,e){if(t)if(se(t))for(var r=0;r<t.length;r++)LS(t[r],e);else LS(t,e)}Vr("circle",Am),Vr("ellipse",fS),Vr("sector",ri),Vr("ring",vS),Vr("polygon",Uu),Vr("polyline",Gs),Vr("rect",it),Vr("line",la),Vr("bezierCurve",Om),Vr("arc",Lm);var uU=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",updateProps:_t,initProps:Wt,removeElement:Wu,removeElementWithFadeOut:Zs,isElementRemoved:Ws,extendShape:KH,extendPath:QH,registerShape:Vr,getShapeClass:eU,makePath:Rm,makeImage:MS,mergePath:tU,resizePath:NS,subPixelOptimizeLine:rU,subPixelOptimizeRect:nU,subPixelOptimize:aU,getTransform:Ku,applyTransform:ho,transformDirection:ES,groupTransition:DS,clipPointsByRect:oU,clipRectByRect:sU,createIcon:Vm,linePolygonIntersect:lU,lineLineIntersect:OS,setTooltipConfig:zm,traverseElements:po,Group:lt,Image:Ir,Text:ut,Circle:Am,Ellipse:fS,Sector:ri,Ring:vS,Polygon:Uu,Polyline:Gs,Rect:it,Line:la,BezierCurve:Om,Arc:Lm,IncrementalDisplayable:ZH,CompoundPath:CS,LinearGradient:Pm,RadialGradient:jH,BoundingRect:Ke,OrientedBoundingRect:Gu,Point:Me,Path:je}),Ju={};function fU(t,e){for(var r=0;r<Yt.length;r++){var n=Yt[r],a=e[n],i=t.ensureState(n);i.style=i.style||{},i.style.text=a}var o=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(o,!0)}function PS(t,e,r){var n=t.labelFetcher,a=t.labelDataIndex,i=t.labelDimIndex,o=e.normal,l;n&&(l=n.getFormattedLabel(a,"normal",null,i,o&&o.get("formatter"),r!=null?{interpolatedValue:r}:null)),l==null&&(l=Ee(t.defaultText)?t.defaultText(a,t,r):t.defaultText);for(var c={normal:l},u=0;u<Yt.length;u++){var f=Yt[u],d=e[f];c[f]=Ae(n?n.getFormattedLabel(a,f,null,i,d&&d.get("formatter")):null,l)}return c}function ca(t,e,r,n){r=r||Ju;for(var a=t instanceof ut,i=!1,o=0;o<Bu.length;o++){var l=e[Bu[o]];if(l&&l.getShallow("show")){i=!0;break}}var c=a?t:t.getTextContent();if(i){a||(c||(c=new ut,t.setTextContent(c)),t.stateProxy&&(c.stateProxy=t.stateProxy));var u=PS(r,e),f=e.normal,d=!!f.getShallow("show"),h=yr(f,n&&n.normal,r,!1,!a);h.text=u.normal,a||t.setTextConfig(BS(f,r,!1));for(var o=0;o<Yt.length;o++){var p=Yt[o],l=e[p];if(l){var m=c.ensureState(p),v=!!Ae(l.getShallow("show"),d);if(v!==d&&(m.ignore=!v),m.style=yr(l,n&&n[p],r,!0,!a),m.style.text=u[p],!a){var g=t.ensureState(p);g.textConfig=BS(l,r,!0)}}}c.silent=!!f.getShallow("silent"),c.style.x!=null&&(h.x=c.style.x),c.style.y!=null&&(h.y=c.style.y),c.ignore=!d,c.useStyle(h),c.dirty(),r.enableTextSetter&&(Qu(c).setLabelText=function(y){var _=PS(r,e,y);fU(c,_)})}else c&&(c.ignore=!0);t.dirty()}function ln(t,e){e=e||"label";for(var r={normal:t.getModel(e)},n=0;n<Yt.length;n++){var a=Yt[n];r[a]=t.getModel([a,e])}return r}function yr(t,e,r,n,a){var i={};return dU(i,t,r,n,a),e&&re(i,e),i}function BS(t,e,r){e=e||{};var n={},a,i=t.getShallow("rotate"),o=Ae(t.getShallow("distance"),r?null:5),l=t.getShallow("offset");return a=t.getShallow("position")||(r?null:"inside"),a==="outside"&&(a=e.defaultOutsidePosition||"top"),a!=null&&(n.position=a),l!=null&&(n.offset=l),i!=null&&(i*=Math.PI/180,n.rotation=i),o!=null&&(n.distance=o),n.outsideFill=t.get("color")==="inherit"?e.inheritColor||null:"auto",n}function dU(t,e,r,n,a){r=r||Ju;var i=e.ecModel,o=i&&i.option.textStyle,l=hU(e),c;if(l){c={};for(var u in l)if(l.hasOwnProperty(u)){var f=e.getModel(["rich",u]);FS(c[u]={},f,o,r,n,a,!1,!0)}}c&&(t.rich=c);var d=e.get("overflow");d&&(t.overflow=d);var h=e.get("minMargin");h!=null&&(t.margin=h),FS(t,e,o,r,n,a,!0,!1)}function hU(t){for(var e;t&&t!==t.ecModel;){var r=(t.option||Ju).rich;if(r){e=e||{};for(var n=Fe(r),a=0;a<n.length;a++){var i=n[a];e[i]=1}}t=t.parentModel}return e}var IS=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],RS=["align","lineHeight","width","height","tag","verticalAlign"],VS=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function FS(t,e,r,n,a,i,o,l){r=!a&&r||Ju;var c=n&&n.inheritColor,u=e.getShallow("color"),f=e.getShallow("textBorderColor"),d=Ae(e.getShallow("opacity"),r.opacity);(u==="inherit"||u==="auto")&&(c?u=c:u=null),(f==="inherit"||f==="auto")&&(c?f=c:f=null),i||(u=u||r.color,f=f||r.textBorderColor),u!=null&&(t.fill=u),f!=null&&(t.stroke=f);var h=Ae(e.getShallow("textBorderWidth"),r.textBorderWidth);h!=null&&(t.lineWidth=h);var p=Ae(e.getShallow("textBorderType"),r.textBorderType);p!=null&&(t.lineDash=p);var m=Ae(e.getShallow("textBorderDashOffset"),r.textBorderDashOffset);m!=null&&(t.lineDashOffset=m),!a&&d==null&&!l&&(d=n&&n.defaultOpacity),d!=null&&(t.opacity=d),!a&&!i&&t.fill==null&&n.inheritColor&&(t.fill=n.inheritColor);for(var v=0;v<IS.length;v++){var g=IS[v],y=Ae(e.getShallow(g),r[g]);y!=null&&(t[g]=y)}for(var v=0;v<RS.length;v++){var g=RS[v],y=e.getShallow(g);y!=null&&(t[g]=y)}if(t.verticalAlign==null){var _=e.getShallow("baseline");_!=null&&(t.verticalAlign=_)}if(!o||!n.disableBox){for(var v=0;v<VS.length;v++){var g=VS[v],y=e.getShallow(g);y!=null&&(t[g]=y)}var w=e.getShallow("borderType");w!=null&&(t.borderDash=w),(t.backgroundColor==="auto"||t.backgroundColor==="inherit")&&c&&(t.backgroundColor=c),(t.borderColor==="auto"||t.borderColor==="inherit")&&c&&(t.borderColor=c)}}function pU(t,e){var r=e&&e.getModel("textStyle");return Kr([t.fontStyle||r&&r.getShallow("fontStyle")||"",t.fontWeight||r&&r.getShallow("fontWeight")||"",(t.fontSize||r&&r.getShallow("fontSize")||12)+"px",t.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))}var Qu=ct();function mU(t,e,r,n){if(!!t){var a=Qu(t);a.prevValue=a.value,a.value=r;var i=e.normal;a.valueAnimation=i.get("valueAnimation"),a.valueAnimation&&(a.precision=i.get("precision"),a.defaultInterpolatedText=n,a.statesModels=e)}}var vU=["textStyle","color"],Hm=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Um=new ut,gU=function(){function t(){}return t.prototype.getTextColor=function(e){var r=this.ecModel;return this.getShallow("color")||(!e&&r?r.get(vU):null)},t.prototype.getFont=function(){return pU({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(e){for(var r={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<Hm.length;n++)r[Hm[n]]=this.getShallow(Hm[n]);return Um.useStyle(r),Um.update(),Um.getBoundingRect()},t}(),yU=gU,zS=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],_U=Ls(zS),wU=function(){function t(){}return t.prototype.getLineStyle=function(e){return _U(this,e)},t}(),HS=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],bU=Ls(HS),SU=function(){function t(){}return t.prototype.getItemStyle=function(e,r){return bU(this,e,r)},t}(),ii=function(){function t(e,r,n){this.parentModel=r,this.ecModel=n,this.option=e}return t.prototype.init=function(e,r,n){for(var a=[],i=3;i<arguments.length;i++)a[i-3]=arguments[i]},t.prototype.mergeOption=function(e,r){Re(this.option,e,!0)},t.prototype.get=function(e,r){return e==null?this.option:this._doGet(this.parsePath(e),!r&&this.parentModel)},t.prototype.getShallow=function(e,r){var n=this.option,a=n==null?n:n[e];if(a==null&&!r){var i=this.parentModel;i&&(a=i.getShallow(e))}return a},t.prototype.getModel=function(e,r){var n=e!=null,a=n?this.parsePath(e):null,i=n?this._doGet(a):this.option;return r=r||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(a)),new t(i,r,this.ecModel)},t.prototype.isEmpty=function(){return this.option==null},t.prototype.restoreData=function(){},t.prototype.clone=function(){var e=this.constructor;return new e(Te(this.option))},t.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},t.prototype.resolveParentPath=function(e){return e},t.prototype.isAnimationEnabled=function(){if(!Pe.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(e,r){var n=this.option;if(!e)return n;for(var a=0;a<e.length&&!(!!e[a]&&(n=n&&typeof n=="object"?n[e[a]]:null,n==null));a++);return n==null&&r&&(n=r._doGet(this.resolveParentPath(e),r.parentModel)),n},t}();em(ii),rz(ii),Dr(ii,wU),Dr(ii,SU),Dr(ii,sz),Dr(ii,yU);var Et=ii,xU=Math.round(Math.random()*10);function ef(t){return[t||"",xU++].join("_")}function CU(t){var e={};t.registerSubTypeDefaulter=function(r,n){var a=rn(r);e[a.main]=n},t.determineSubType=function(r,n){var a=n.type;if(!a){var i=rn(r).main;t.hasSubTypes(r)&&e[i]&&(a=e[i](n))}return a}}function kU(t,e){t.topologicalTravel=function(i,o,l,c){if(!i.length)return;var u=r(o),f=u.graph,d=u.noEntryList,h={};for(z(i,function(_){h[_]=!0});d.length;){var p=d.pop(),m=f[p],v=!!h[p];v&&(l.call(c,p,m.originalDeps.slice()),delete h[p]),z(m.successor,v?y:g)}z(h,function(){var _="";throw new Error(_)});function g(_){f[_].entryCount--,f[_].entryCount===0&&d.push(_)}function y(_){h[_]=!0,g(_)}};function r(i){var o={},l=[];return z(i,function(c){var u=n(o,c),f=u.originalDeps=e(c),d=a(f,i);u.entryCount=d.length,u.entryCount===0&&l.push(c),z(d,function(h){Ge(u.predecessor,h)<0&&u.predecessor.push(h);var p=n(o,h);Ge(p.successor,h)<0&&p.successor.push(c)})}),{graph:o,noEntryList:l}}function n(i,o){return i[o]||(i[o]={predecessor:[],successor:[]}),i[o]}function a(i,o){var l=[];return z(i,function(c){Ge(o,c)>=0&&l.push(c)}),l}}function tf(t,e){return Re(Re({},t,!0),e,!0)}var TU={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"}},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:". "}}}},MU={time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}},rf="ZH",jm="EN",qs=jm,nf={},Ym={},US=Pe.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase();return t.indexOf(rf)>-1?rf:qs}():qs;function jS(t,e){t=t.toUpperCase(),Ym[t]=new Et(e),nf[t]=e}function $U(t){if(ve(t)){var e=nf[t.toUpperCase()]||{};return t===rf||t===jm?Te(e):Re(Te(e),Te(nf[qs]),!1)}else return Re(Te(t),Te(nf[qs]),!1)}function NU(t){return Ym[t]}function EU(){return Ym[qs]}jS(jm,TU),jS(rf,MU);var Gm=1e3,Wm=Gm*60,Xs=Wm*60,_r=Xs*24,YS=_r*365,Ks={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},af="{yyyy}-{MM}-{dd}",GS={year:"{yyyy}",month:"{yyyy}-{MM}",day:af,hour:af+" "+Ks.hour,minute:af+" "+Ks.minute,second:af+" "+Ks.second,millisecond:Ks.none},Zm=["year","month","day","hour","minute","second","millisecond"],WS=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function oi(t,e){return t+="","0000".substr(0,e-t.length)+t}function mo(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function AU(t){return t===mo(t)}function DU(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function of(t,e,r,n){var a=Nn(t),i=a[qm(r)](),o=a[vo(r)]()+1,l=Math.floor((o-1)/4)+1,c=a[sf(r)](),u=a["get"+(r?"UTC":"")+"Day"](),f=a[Js(r)](),d=(f-1)%12+1,h=a[lf(r)](),p=a[cf(r)](),m=a[uf(r)](),v=n instanceof Et?n:NU(n||US)||EU(),g=v.getModel("time"),y=g.get("month"),_=g.get("monthAbbr"),w=g.get("dayOfWeek"),S=g.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,i%100+"").replace(/{Q}/g,l+"").replace(/{MMMM}/g,y[o-1]).replace(/{MMM}/g,_[o-1]).replace(/{MM}/g,oi(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,oi(c,2)).replace(/{d}/g,c+"").replace(/{eeee}/g,w[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,oi(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,oi(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,oi(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,oi(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,oi(m,3)).replace(/{S}/g,m+"")}function OU(t,e,r,n,a){var i=null;if(ve(r))i=r;else if(Ee(r))i=r(t.value,e,{level:t.level});else{var o=re({},Ks);if(t.level>0)for(var l=0;l<Zm.length;++l)o[Zm[l]]="{primary|"+o[Zm[l]]+"}";var c=r?r.inherit===!1?r:Ue(r,o):o,u=ZS(t.value,a);if(c[u])i=c[u];else if(c.inherit){for(var f=WS.indexOf(u),l=f-1;l>=0;--l)if(c[u]){i=c[u];break}i=i||o.none}if(se(i)){var d=t.level==null?0:t.level>=0?t.level:i.length+t.level;d=Math.min(d,i.length-1),i=i[d]}}return of(new Date(t.value),i,a,n)}function ZS(t,e){var r=Nn(t),n=r[vo(e)]()+1,a=r[sf(e)](),i=r[Js(e)](),o=r[lf(e)](),l=r[cf(e)](),c=r[uf(e)](),u=c===0,f=u&&l===0,d=f&&o===0,h=d&&i===0,p=h&&a===1,m=p&&n===1;return m?"year":p?"month":h?"day":d?"hour":f?"minute":u?"second":"millisecond"}function qS(t,e,r){var n=We(t)?Nn(t):t;switch(e=e||ZS(t,r),e){case"year":return n[qm(r)]();case"half-year":return n[vo(r)]()>=6?1:0;case"quarter":return Math.floor((n[vo(r)]()+1)/4);case"month":return n[vo(r)]();case"day":return n[sf(r)]();case"half-day":return n[Js(r)]()/24;case"hour":return n[Js(r)]();case"minute":return n[lf(r)]();case"second":return n[cf(r)]();case"millisecond":return n[uf(r)]()}}function qm(t){return t?"getUTCFullYear":"getFullYear"}function vo(t){return t?"getUTCMonth":"getMonth"}function sf(t){return t?"getUTCDate":"getDate"}function Js(t){return t?"getUTCHours":"getHours"}function lf(t){return t?"getUTCMinutes":"getMinutes"}function cf(t){return t?"getUTCSeconds":"getSeconds"}function uf(t){return t?"getUTCMilliseconds":"getMilliseconds"}function LU(t){return t?"setUTCFullYear":"setFullYear"}function XS(t){return t?"setUTCMonth":"setMonth"}function KS(t){return t?"setUTCDate":"setDate"}function JS(t){return t?"setUTCHours":"setHours"}function QS(t){return t?"setUTCMinutes":"setMinutes"}function ex(t){return t?"setUTCSeconds":"setSeconds"}function tx(t){return t?"setUTCMilliseconds":"setMilliseconds"}function rx(t){if(!AF(t))return ve(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function nx(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var Qs=U_,PU=/([&<>"'])/g,BU={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function wr(t){return t==null?"":(t+"").replace(PU,function(e,r){return BU[r]})}function Xm(t,e,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(f){return f&&Kr(f)?f:"-"}function i(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=e==="time",l=t instanceof Date;if(o||l){var c=o?Nn(t):t;if(isNaN(+c)){if(l)return"-"}else return of(c,n,r)}if(e==="ordinal")return qh(t)?a(t):We(t)&&i(t)?t+"":"-";var u=Cu(t);return i(u)?rx(u):qh(t)?a(t):typeof t=="boolean"?t+"":"-"}var ax=["a","b","c","d","e","f","g"],Km=function(t,e){return"{"+t+(e==null?"":e)+"}"};function ix(t,e,r){se(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],i=0;i<a.length;i++){var o=ax[i];t=t.replace(Km(o),Km(o,0))}for(var l=0;l<n;l++)for(var c=0;c<a.length;c++){var u=e[l][a[c]];t=t.replace(Km(ax[c],l),r?wr(u):u)}return t}function IU(t,e){var r=ve(t)?{color:t,extraCssText:e}:t||{},n=r.color,a=r.type;e=r.extraCssText;var i=r.renderMode||"html";if(!n)return"";if(i==="html")return a==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+wr(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+wr(n)+";"+(e||"")+'"></span>';var o=r.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function si(t,e){return e=e||"transparent",ve(t)?t:_e(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function ox(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location.href=t}else window.open(t,e)}var ff=z,RU=["left","right","top","bottom","width","height"],df=[["width","left","right"],["height","top","bottom"]];function Jm(t,e,r,n,a){var i=0,o=0;n==null&&(n=1/0),a==null&&(a=1/0);var l=0;e.eachChild(function(c,u){var f=c.getBoundingRect(),d=e.childAt(u+1),h=d&&d.getBoundingRect(),p,m;if(t==="horizontal"){var v=f.width+(h?-h.x+f.x:0);p=i+v,p>n||c.newline?(i=0,p=v,o+=l+r,l=f.height):l=Math.max(l,f.height)}else{var g=f.height+(h?-h.y+f.y:0);m=o+g,m>a||c.newline?(i+=l+r,o=0,m=g,l=f.width):l=Math.max(l,f.width)}c.newline||(c.x=i,c.y=o,c.markRedraw(),t==="horizontal"?i=p+r:o=m+r)})}var go=Jm;qe(Jm,"vertical"),qe(Jm,"horizontal");function On(t,e,r){r=Qs(r||0);var n=e.width,a=e.height,i=ze(t.left,n),o=ze(t.top,a),l=ze(t.right,n),c=ze(t.bottom,a),u=ze(t.width,n),f=ze(t.height,a),d=r[2]+r[0],h=r[1]+r[3],p=t.aspect;switch(isNaN(u)&&(u=n-l-h-i),isNaN(f)&&(f=a-c-d-o),p!=null&&(isNaN(u)&&isNaN(f)&&(p>n/a?u=n*.8:f=a*.8),isNaN(u)&&(u=p*f),isNaN(f)&&(f=u/p)),isNaN(i)&&(i=n-l-u-h),isNaN(o)&&(o=a-c-f-d),t.left||t.right){case"center":i=n/2-u/2-r[3];break;case"right":i=n-u-h;break}switch(t.top||t.bottom){case"middle":case"center":o=a/2-f/2-r[0];break;case"bottom":o=a-f-d;break}i=i||0,o=o||0,isNaN(u)&&(u=n-h-i-(l||0)),isNaN(f)&&(f=a-d-o-(c||0));var m=new Ke(i+r[3],o+r[0],u,f);return m.margin=r,m}function VU(t,e,r,n,a,i){var o=!a||!a.hv||a.hv[0],l=!a||!a.hv||a.hv[1],c=a&&a.boundingMode||"all";if(i=i||t,i.x=t.x,i.y=t.y,!o&&!l)return!1;var u;if(c==="raw")u=t.type==="group"?new Ke(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var f=t.getLocalTransform();u=u.clone(),u.applyTransform(f)}var d=On(Ue({width:u.width,height:u.height},e),r,n),h=o?d.x-u.x:0,p=l?d.y-u.y:0;return c==="raw"?(i.x=h,i.y=p):(i.x+=h,i.y+=p),i===t&&t.markRedraw(),!0}function el(t){var e=t.layoutMode||t.constructor.layoutMode;return _e(e)?e:e?{type:e}:null}function yo(t,e,r){var n=r&&r.ignoreSize;!se(n)&&(n=[n,n]);var a=o(df[0],0),i=o(df[1],1);u(df[0],t,a),u(df[1],t,i);function o(f,d){var h={},p=0,m={},v=0,g=2;if(ff(f,function(w){m[w]=t[w]}),ff(f,function(w){l(e,w)&&(h[w]=m[w]=e[w]),c(h,w)&&p++,c(m,w)&&v++}),n[d])return c(e,f[1])?m[f[2]]=null:c(e,f[2])&&(m[f[1]]=null),m;if(v===g||!p)return m;if(p>=g)return h;for(var y=0;y<f.length;y++){var _=f[y];if(!l(h,_)&&l(t,_)){h[_]=t[_];break}}return h}function l(f,d){return f.hasOwnProperty(d)}function c(f,d){return f[d]!=null&&f[d]!=="auto"}function u(f,d,h){ff(f,function(p){d[p]=h[p]})}}function hf(t){return FU({},t)}function FU(t,e){return e&&t&&ff(RU,function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}var zU=ct(),_o=function(t){me(e,t);function e(r,n,a){var i=t.call(this,r,n,a)||this;return i.uid=ef("ec_cpt_model"),i}return e.prototype.init=function(r,n,a){this.mergeDefaultAndTheme(r,a)},e.prototype.mergeDefaultAndTheme=function(r,n){var a=el(this),i=a?hf(r):{},o=n.getTheme();Re(r,o.get(this.mainType)),Re(r,this.getDefaultOption()),a&&yo(r,i,a)},e.prototype.mergeOption=function(r,n){Re(this.option,r,!0);var a=el(this);a&&yo(this.option,r,a)},e.prototype.optionUpdated=function(r,n){},e.prototype.getDefaultOption=function(){var r=this.constructor;if(!QF(r))return r.defaultOption;var n=zU(this);if(!n.defaultOption){for(var a=[],i=r;i;){var o=i.prototype.defaultOption;o&&a.push(o),i=i.superClass}for(var l={},c=a.length-1;c>=0;c--)l=Re(l,a[c],!0);n.defaultOption=l}return n.defaultOption},e.prototype.getReferringComponents=function(r,n){var a=r+"Index",i=r+"Id";return Os(this.ecModel,r,{index:this.get(a,!0),id:this.get(i,!0)},n)},e.prototype.getBoxLayoutParams=function(){var r=this;return{left:r.get("left"),top:r.get("top"),right:r.get("right"),bottom:r.get("bottom"),width:r.get("width"),height:r.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),e}(Et);sb(_o,Et),ku(_o),CU(_o),kU(_o,HU);function HU(t){var e=[];return z(_o.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=he(e,function(r){return rn(r).main}),t!=="dataset"&&Ge(e,"dataset")<=0&&e.unshift("dataset"),e}var tt=_o,sx="";typeof navigator!="undefined"&&(sx=navigator.platform||"");var wo="rgba(0, 0, 0, 0.2)",UU={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:wo,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:wo,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:wo,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:wo,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:wo,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:wo,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:sx.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},lx=Le(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),br="original",Zt="arrayRows",Fr="objectRows",cn="keyedColumns",ua="typedArray",cx="unknown",Ln="column",bo="row",xt={Must:1,Might:2,Not:3},ux=ct();function jU(t){ux(t).datasetMap=Le()}function YU(t,e,r){var n={},a=Qm(e);if(!a||!t)return n;var i=[],o=[],l=e.ecModel,c=ux(l).datasetMap,u=a.uid+"_"+r.seriesLayoutBy,f,d;t=t.slice(),z(t,function(v,g){var y=_e(v)?v:t[g]={name:v};y.type==="ordinal"&&f==null&&(f=g,d=m(y)),n[y.name]=[]});var h=c.get(u)||c.set(u,{categoryWayDim:d,valueWayDim:0});z(t,function(v,g){var y=v.name,_=m(v);if(f==null){var w=h.valueWayDim;p(n[y],w,_),p(o,w,_),h.valueWayDim+=_}else if(f===g)p(n[y],0,_),p(i,0,_);else{var w=h.categoryWayDim;p(n[y],w,_),p(o,w,_),h.categoryWayDim+=_}});function p(v,g,y){for(var _=0;_<y;_++)v.push(g+_)}function m(v){var g=v.dimsDef;return g?g.length:1}return i.length&&(n.itemName=i),o.length&&(n.seriesName=o),n}function fx(t,e,r){var n={},a=Qm(t);if(!a)return n;var i=e.sourceFormat,o=e.dimensionsDefine,l;(i===Fr||i===cn)&&z(o,function(f,d){(_e(f)?f.name:f)==="name"&&(l=d)});var c=function(){for(var f={},d={},h=[],p=0,m=Math.min(5,r);p<m;p++){var v=hx(e.data,i,e.seriesLayoutBy,o,e.startIndex,p);h.push(v);var g=v===xt.Not;if(g&&f.v==null&&p!==l&&(f.v=p),(f.n==null||f.n===f.v||!g&&h[f.n]===xt.Not)&&(f.n=p),y(f)&&h[f.n]!==xt.Not)return f;g||(v===xt.Might&&d.v==null&&p!==l&&(d.v=p),(d.n==null||d.n===d.v)&&(d.n=p))}function y(_){return _.v!=null&&_.n!=null}return y(f)?f:y(d)?d:null}();if(c){n.value=[c.v];var u=l!=null?l:c.n;n.itemName=[u],n.seriesName=[u]}return n}function Qm(t){var e=t.get("data",!0);if(!e)return Os(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},Br).models[0]}function GU(t){return!t.get("transform",!0)&&!t.get("fromTransformResult",!0)?[]:Os(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},Br).models}function dx(t,e){return hx(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function hx(t,e,r,n,a,i){var o,l=5;if(Qt(t))return xt.Not;var c,u;if(n){var f=n[i];_e(f)?(c=f.name,u=f.type):ve(f)&&(c=f)}if(u!=null)return u==="ordinal"?xt.Must:xt.Not;if(e===Zt){var d=t;if(r===bo){for(var h=d[i],p=0;p<(h||[]).length&&p<l;p++)if((o=S(h[a+p]))!=null)return o}else for(var p=0;p<d.length&&p<l;p++){var m=d[a+p];if(m&&(o=S(m[i]))!=null)return o}}else if(e===Fr){var v=t;if(!c)return xt.Not;for(var p=0;p<v.length&&p<l;p++){var g=v[p];if(g&&(o=S(g[c]))!=null)return o}}else if(e===cn){var y=t;if(!c)return xt.Not;var h=y[c];if(!h||Qt(h))return xt.Not;for(var p=0;p<h.length&&p<l;p++)if((o=S(h[p]))!=null)return o}else if(e===br)for(var _=t,p=0;p<_.length&&p<l;p++){var g=_[p],w=Es(g);if(!se(w))return xt.Not;if((o=S(w[i]))!=null)return o}function S(x){var b=ve(x);if(x!=null&&isFinite(x)&&x!=="")return b?xt.Might:xt.Not;if(b&&x!=="-")return xt.Must}return xt.Not}var WU=Le();function ZU(t,e,r){var n=WU.get(e);if(!n)return r;var a=n(t);return a?r.concat(a):r}var px=ct();ct();var ev=function(){function t(){}return t.prototype.getColorFromPalette=function(e,r,n){var a=St(this.get("color",!0)),i=this.get("colorLayer",!0);return XU(this,px,a,i,e,r,n)},t.prototype.clearColorPalette=function(){KU(this,px)},t}();function qU(t,e){for(var r=t.length,n=0;n<r;n++)if(t[n].length>e)return t[n];return t[r-1]}function XU(t,e,r,n,a,i,o){i=i||t;var l=e(i),c=l.paletteIdx||0,u=l.paletteNameMap=l.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var f=o==null||!n?r:qU(n,o);if(f=f||r,!(!f||!f.length)){var d=f[c];return a&&(u[a]=d),l.paletteIdx=(c+1)%f.length,d}}function KU(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var pf,tl,mx,vx="\0_ec_inner",JU=1,gx=function(t){me(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,n,a,i,o,l){i=i||{},this.option=null,this._theme=new Et(i),this._locale=new Et(o),this._optionManager=l},e.prototype.setOption=function(r,n,a){var i=bx(n);this._optionManager.setOption(r,a,i),this._resetOption(null,i)},e.prototype.resetOption=function(r,n){return this._resetOption(r,bx(n))},e.prototype._resetOption=function(r,n){var a=!1,i=this._optionManager;if(!r||r==="recreate"){var o=i.mountOption(r==="recreate");!this.option||r==="recreate"?mx(this,o):(this.restoreData(),this._mergeOption(o,n)),a=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var l=i.getTimelineOption(this);l&&(a=!0,this._mergeOption(l,n))}if(!r||r==="recreate"||r==="media"){var c=i.getMediaOption(this);c.length&&z(c,function(u){a=!0,this._mergeOption(u,n)},this)}return a},e.prototype.mergeOption=function(r){this._mergeOption(r,null)},e.prototype._mergeOption=function(r,n){var a=this.option,i=this._componentsMap,o=this._componentsCount,l=[],c=Le(),u=n&&n.replaceMergeMainTypeMap;jU(this),z(r,function(d,h){d!=null&&(tt.hasClass(h)?h&&(l.push(h),c.set(h,!0)):a[h]=a[h]==null?Te(d):Re(a[h],d,!0))}),u&&u.each(function(d,h){tt.hasClass(h)&&!c.get(h)&&(l.push(h),c.set(h,!0))}),tt.topologicalTravel(l,tt.getAllClassMainTypes(),f,this);function f(d){var h=ZU(this,d,St(r[d])),p=i.get(d),m=p?u&&u.get(d)?"replaceMerge":"normalMerge":"replaceAll",v=IF(p,h,m);jF(v,d,tt),a[d]=null,i.set(d,null),o.set(d,0);var g=[],y=[],_=0,w;z(v,function(S,x){var b=S.existing,C=S.newOption;if(!C)b&&(b.mergeOption({},this),b.optionUpdated({},!1));else{var k=d==="series",$=tt.getClass(d,S.keyInfo.subType,!k);if(!$)return;if(d==="tooltip"){if(w)return;w=!0}if(b&&b.constructor===$)b.name=S.keyInfo.name,b.mergeOption(C,this),b.optionUpdated(C,!1);else{var N=re({componentIndex:x},S.keyInfo);b=new $(C,this,this,N),re(b,N),S.brandNew&&(b.__requireNewView=!0),b.init(C,this,this),b.optionUpdated(null,!0)}}b?(g.push(b.option),y.push(b),_++):(g.push(void 0),y.push(void 0))},this),a[d]=g,i.set(d,y),o.set(d,_),d==="series"&&pf(this)}this._seriesIndices||pf(this)},e.prototype.getOption=function(){var r=Te(this.option);return z(r,function(n,a){if(tt.hasClass(a)){for(var i=St(n),o=i.length,l=!1,c=o-1;c>=0;c--)i[c]&&!Ds(i[c])?l=!0:(i[c]=null,!l&&o--);i.length=o,r[a]=i}}),delete r[vx],r},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(r,n){var a=this._componentsMap.get(r);if(a){var i=a[n||0];if(i)return i;if(n==null){for(var o=0;o<a.length;o++)if(a[o])return a[o]}}},e.prototype.queryComponents=function(r){var n=r.mainType;if(!n)return[];var a=r.index,i=r.id,o=r.name,l=this._componentsMap.get(n);if(!l||!l.length)return[];var c;return a!=null?(c=[],z(St(a),function(u){l[u]&&c.push(l[u])})):i!=null?c=yx("id",i,l):o!=null?c=yx("name",o,l):c=Mt(l,function(u){return!!u}),_x(c,r)},e.prototype.findComponents=function(r){var n=r.query,a=r.mainType,i=l(n),o=i?this.queryComponents(i):Mt(this._componentsMap.get(a),function(u){return!!u});return c(_x(o,r));function l(u){var f=a+"Index",d=a+"Id",h=a+"Name";return u&&(u[f]!=null||u[d]!=null||u[h]!=null)?{mainType:a,index:u[f],id:u[d],name:u[h]}:null}function c(u){return r.filter?Mt(u,r.filter):u}},e.prototype.eachComponent=function(r,n,a){var i=this._componentsMap;if(Ee(r)){var o=n,l=r;i.each(function(d,h){for(var p=0;d&&p<d.length;p++){var m=d[p];m&&l.call(o,h,m,m.componentIndex)}})}else for(var c=ve(r)?i.get(r):_e(r)?this.findComponents(r):null,u=0;c&&u<c.length;u++){var f=c[u];f&&n.call(a,f,f.componentIndex)}},e.prototype.getSeriesByName=function(r){var n=Pr(r,null);return Mt(this._componentsMap.get("series"),function(a){return!!a&&n!=null&&a.name===n})},e.prototype.getSeriesByIndex=function(r){return this._componentsMap.get("series")[r]},e.prototype.getSeriesByType=function(r){return Mt(this._componentsMap.get("series"),function(n){return!!n&&n.subType===r})},e.prototype.getSeries=function(){return Mt(this._componentsMap.get("series"),function(r){return!!r})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(r,n){tl(this),z(this._seriesIndices,function(a){var i=this._componentsMap.get("series")[a];r.call(n,i,a)},this)},e.prototype.eachRawSeries=function(r,n){z(this._componentsMap.get("series"),function(a){a&&r.call(n,a,a.componentIndex)})},e.prototype.eachSeriesByType=function(r,n,a){tl(this),z(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];o.subType===r&&n.call(a,o,i)},this)},e.prototype.eachRawSeriesByType=function(r,n,a){return z(this.getSeriesByType(r),n,a)},e.prototype.isSeriesFiltered=function(r){return tl(this),this._seriesIndicesMap.get(r.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(r,n){tl(this);var a=[];z(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];r.call(n,o,i)&&a.push(i)},this),this._seriesIndices=a,this._seriesIndicesMap=Le(a)},e.prototype.restoreData=function(r){pf(this);var n=this._componentsMap,a=[];n.each(function(i,o){tt.hasClass(o)&&a.push(o)}),tt.topologicalTravel(a,tt.getAllClassMainTypes(),function(i){z(n.get(i),function(o){o&&(i!=="series"||!QU(o,r))&&o.restoreData()})})},e.internalField=function(){pf=function(r){var n=r._seriesIndices=[];z(r._componentsMap.get("series"),function(a){a&&n.push(a.componentIndex)}),r._seriesIndicesMap=Le(n)},tl=function(r){},mx=function(r,n){r.option={},r.option[vx]=JU,r._componentsMap=Le({series:[]}),r._componentsCount=Le();var a=n.aria;_e(a)&&a.enabled==null&&(a.enabled=!0),ej(n,r._theme.option),Re(n,UU,!1),r._mergeOption(n,null)}}(),e}(Et);function QU(t,e){if(e){var r=e.seriesIndex,n=e.seriesId,a=e.seriesName;return r!=null&&t.componentIndex!==r||n!=null&&t.id!==n||a!=null&&t.name!==a}}function ej(t,e){var r=t.color&&!t.colorLayer;z(e,function(n,a){a==="colorLayer"&&r||tt.hasClass(a)||(typeof n=="object"?t[a]=t[a]?Re(t[a],n,!1):Te(n):t[a]==null&&(t[a]=n))})}function yx(t,e,r){if(se(e)){var n=Le();return z(e,function(i){if(i!=null){var o=Pr(i,null);o!=null&&n.set(i,!0)}}),Mt(r,function(i){return i&&n.get(i[t])})}else{var a=Pr(e,null);return Mt(r,function(i){return i&&a!=null&&i[t]===a})}}function _x(t,e){return e.hasOwnProperty("subType")?Mt(t,function(r){return r&&r.subType===e.subType}):t}function bx(t){var e=Le();return t&&z(St(t.replaceMerge),function(r){e.set(r,!0)}),{replaceMergeMainTypeMap:e}}Dr(gx,ev);var Sx=gx,tj=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],rj=function(){function t(e){z(tj,function(r){this[r]=Be(e[r],e)},this)}return t}(),xx=rj,tv={},nj=function(){function t(){this._coordinateSystems=[]}return t.prototype.create=function(e,r){var n=[];z(tv,function(a,i){var o=a.create(e,r);n=n.concat(o||[])}),this._coordinateSystems=n},t.prototype.update=function(e,r){z(this._coordinateSystems,function(n){n.update&&n.update(e,r)})},t.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},t.register=function(e,r){tv[e]=r},t.get=function(e){return tv[e]},t}(),mf=nj,aj=/^(min|max)?(.+)$/,ij=function(){function t(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return t.prototype.setOption=function(e,r,n){e&&(z(St(e.series),function(o){o&&o.data&&Qt(o.data)&&Kh(o.data)}),z(St(e.dataset),function(o){o&&o.source&&Qt(o.source)&&Kh(o.source)})),e=Te(e);var a=this._optionBackup,i=oj(e,r,!a);this._newBaseOption=i.baseOption,a?(i.timelineOptions.length&&(a.timelineOptions=i.timelineOptions),i.mediaList.length&&(a.mediaList=i.mediaList),i.mediaDefault&&(a.mediaDefault=i.mediaDefault)):this._optionBackup=i},t.prototype.mountOption=function(e){var r=this._optionBackup;return this._timelineOptions=r.timelineOptions,this._mediaList=r.mediaList,this._mediaDefault=r.mediaDefault,this._currentMediaIndices=[],Te(e?r.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(e){var r,n=this._timelineOptions;if(n.length){var a=e.getComponent("timeline");a&&(r=Te(n[a.getCurrentIndex()]))}return r},t.prototype.getMediaOption=function(e){var r=this._api.getWidth(),n=this._api.getHeight(),a=this._mediaList,i=this._mediaDefault,o=[],l=[];if(!a.length&&!i)return l;for(var c=0,u=a.length;c<u;c++)sj(a[c].query,r,n)&&o.push(c);return!o.length&&i&&(o=[-1]),o.length&&!cj(o,this._currentMediaIndices)&&(l=he(o,function(f){return Te(f===-1?i.option:a[f].option)})),this._currentMediaIndices=o,l},t}();function oj(t,e,r){var n=[],a,i,o=t.baseOption,l=t.timeline,c=t.options,u=t.media,f=!!t.media,d=!!(c||l||o&&o.timeline);o?(i=o,i.timeline||(i.timeline=l)):((d||f)&&(t.options=t.media=null),i=t),f&&se(u)&&z(u,function(p){p&&p.option&&(p.query?n.push(p):a||(a=p))}),h(i),z(c,function(p){return h(p)}),z(n,function(p){return h(p.option)});function h(p){z(e,function(m){m(p,r)})}return{baseOption:i,timelineOptions:c||[],mediaDefault:a,mediaList:n}}function sj(t,e,r){var n={width:e,height:r,aspectratio:e/r},a=!0;return z(t,function(i,o){var l=o.match(aj);if(!(!l||!l[1]||!l[2])){var c=l[1],u=l[2].toLowerCase();lj(n[u],i,c)||(a=!1)}}),a}function lj(t,e,r){return r==="min"?t>=e:r==="max"?t<=e:t===e}function cj(t,e){return t.join(",")===e.join(",")}var uj=ij,zr=z,rl=_e,Cx=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function rv(t){var e=t&&t.itemStyle;if(!!e)for(var r=0,n=Cx.length;r<n;r++){var a=Cx[r],i=e.normal,o=e.emphasis;i&&i[a]&&(t[a]=t[a]||{},t[a].normal?Re(t[a].normal,i[a]):t[a].normal=i[a],i[a]=null),o&&o[a]&&(t[a]=t[a]||{},t[a].emphasis?Re(t[a].emphasis,o[a]):t[a].emphasis=o[a],o[a]=null)}}function At(t,e,r){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,a=t[e].emphasis;n&&(r?(t[e].normal=t[e].emphasis=null,Ue(t[e],n)):t[e]=n),a&&(t.emphasis=t.emphasis||{},t.emphasis[e]=a,a.focus&&(t.emphasis.focus=a.focus),a.blurScope&&(t.emphasis.blurScope=a.blurScope))}}function nl(t){At(t,"itemStyle"),At(t,"lineStyle"),At(t,"areaStyle"),At(t,"label"),At(t,"labelLine"),At(t,"upperLabel"),At(t,"edgeLabel")}function pt(t,e){var r=rl(t)&&t[e],n=rl(r)&&r.textStyle;if(n)for(var a=0,i=nb.length;a<i;a++){var o=nb[a];n.hasOwnProperty(o)&&(r[o]=n[o])}}function Sr(t){t&&(nl(t),pt(t,"label"),t.emphasis&&pt(t.emphasis,"label"))}function fj(t){if(!!rl(t)){rv(t),nl(t),pt(t,"label"),pt(t,"upperLabel"),pt(t,"edgeLabel"),t.emphasis&&(pt(t.emphasis,"label"),pt(t.emphasis,"upperLabel"),pt(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(rv(e),Sr(e));var r=t.markLine;r&&(rv(r),Sr(r));var n=t.markArea;n&&Sr(n);var a=t.data;if(t.type==="graph"){a=a||t.nodes;var i=t.links||t.edges;if(i&&!Qt(i))for(var o=0;o<i.length;o++)Sr(i[o]);z(t.categories,function(u){nl(u)})}if(a&&!Qt(a))for(var o=0;o<a.length;o++)Sr(a[o]);if(e=t.markPoint,e&&e.data)for(var l=e.data,o=0;o<l.length;o++)Sr(l[o]);if(r=t.markLine,r&&r.data)for(var c=r.data,o=0;o<c.length;o++)se(c[o])?(Sr(c[o][0]),Sr(c[o][1])):Sr(c[o]);t.type==="gauge"?(pt(t,"axisLabel"),pt(t,"title"),pt(t,"detail")):t.type==="treemap"?(At(t.breadcrumb,"itemStyle"),z(t.levels,function(u){nl(u)})):t.type==="tree"&&nl(t.leaves)}}function Pn(t){return se(t)?t:t?[t]:[]}function kx(t){return(se(t)?t[0]:t)||{}}function dj(t,e){zr(Pn(t.series),function(n){rl(n)&&fj(n)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),zr(r,function(n){zr(Pn(t[n]),function(a){a&&(pt(a,"axisLabel"),pt(a.axisPointer,"label"))})}),zr(Pn(t.parallel),function(n){var a=n&&n.parallelAxisDefault;pt(a,"axisLabel"),pt(a&&a.axisPointer,"label")}),zr(Pn(t.calendar),function(n){At(n,"itemStyle"),pt(n,"dayLabel"),pt(n,"monthLabel"),pt(n,"yearLabel")}),zr(Pn(t.radar),function(n){pt(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap)}),zr(Pn(t.geo),function(n){rl(n)&&(Sr(n),zr(Pn(n.regions),function(a){Sr(a)}))}),zr(Pn(t.timeline),function(n){Sr(n),At(n,"label"),At(n,"itemStyle"),At(n,"controlStyle",!0);var a=n.data;se(a)&&z(a,function(i){_e(i)&&(At(i,"label"),At(i,"itemStyle"))})}),zr(Pn(t.toolbox),function(n){At(n,"iconStyle"),zr(n.feature,function(a){At(a,"iconStyle")})}),pt(kx(t.axisPointer),"label"),pt(kx(t.tooltip).axisPointer,"label")}function hj(t,e){for(var r=e.split(","),n=t,a=0;a<r.length&&(n=n&&n[r[a]],n!=null);a++);return n}function pj(t,e,r,n){for(var a=e.split(","),i=t,o,l=0;l<a.length-1;l++)o=a[l],i[o]==null&&(i[o]={}),i=i[o];(n||i[a[l]]==null)&&(i[a[l]]=r)}function Tx(t){t&&z(mj,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var mj=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],vj=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],nv=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function al(t){var e=t&&t.itemStyle;if(e)for(var r=0;r<nv.length;r++){var n=nv[r][1],a=nv[r][0];e[n]!=null&&(e[a]=e[n])}}function Mx(t){!t||t.alignTo==="edge"&&t.margin!=null&&t.edgeDistance==null&&(t.edgeDistance=t.margin)}function $x(t){!t||t.downplay&&!t.blur&&(t.blur=t.downplay)}function gj(t){!t||t.focusNodeAdjacency!=null&&(t.emphasis=t.emphasis||{},t.emphasis.focus==null&&(t.emphasis.focus="adjacency"))}function Nx(t,e){if(t)for(var r=0;r<t.length;r++)e(t[r]),t[r]&&Nx(t[r].children,e)}function Ex(t,e){dj(t,e),t.series=St(t.series),z(t.series,function(r){if(!!_e(r)){var n=r.type;if(n==="line")r.clipOverflow!=null&&(r.clip=r.clipOverflow);else if(n==="pie"||n==="gauge"){r.clockWise!=null&&(r.clockwise=r.clockWise),Mx(r.label);var a=r.data;if(a&&!Qt(a))for(var i=0;i<a.length;i++)Mx(a[i]);r.hoverOffset!=null&&(r.emphasis=r.emphasis||{},(r.emphasis.scaleSize=null)&&(r.emphasis.scaleSize=r.hoverOffset))}else if(n==="gauge"){var o=hj(r,"pointer.color");o!=null&&pj(r,"itemStyle.color",o)}else if(n==="bar"){al(r),al(r.backgroundStyle),al(r.emphasis);var a=r.data;if(a&&!Qt(a))for(var i=0;i<a.length;i++)typeof a[i]=="object"&&(al(a[i]),al(a[i]&&a[i].emphasis))}else if(n==="sunburst"){var l=r.highlightPolicy;l&&(r.emphasis=r.emphasis||{},r.emphasis.focus||(r.emphasis.focus=l)),$x(r),Nx(r.data,$x)}else n==="graph"||n==="sankey"?gj(r):n==="map"&&(r.mapType&&!r.map&&(r.map=r.mapType),r.mapLocation&&Ue(r,r.mapLocation));r.hoverAnimation!=null&&(r.emphasis=r.emphasis||{},r.emphasis&&r.emphasis.scale==null&&(r.emphasis.scale=r.hoverAnimation)),Tx(r)}}),t.dataRange&&(t.visualMap=t.dataRange),z(vj,function(r){var n=t[r];n&&(se(n)||(n=[n]),z(n,function(a){Tx(a)}))})}function yj(t){var e=Le();t.eachSeries(function(r){var n=r.get("stack");if(n){var a=e.get(n)||e.set(n,[]),i=r.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:r};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;a.length&&i.setCalculationInfo("stackedOnSeries",a[a.length-1].seriesModel),a.push(o)}}),e.each(_j)}function _j(t){z(t,function(e,r){var n=[],a=[NaN,NaN],i=[e.stackResultDimension,e.stackedOverDimension],o=e.data,l=e.isStackedByIndex;o.modify(i,function(c,u,f){var d=o.get(e.stackedDimension,f);if(isNaN(d))return a;var h,p;l?p=o.getRawIndex(f):h=o.get(e.stackedByDimension,f);for(var m=NaN,v=r-1;v>=0;v--){var g=t[v];if(l||(p=g.data.rawIndexOf(g.stackedByDimension,h)),p>=0){var y=g.data.getByRawIndex(g.stackResultDimension,p);if(d>=0&&y>0||d<=0&&y<0){d=$F(d,y),m=y;break}}}return n[0]=d,n[1]=m,n})})}var vf=function(){function t(e){this.data=e.data||(e.sourceFormat===cn?{}:[]),this.sourceFormat=e.sourceFormat||cx,this.seriesLayoutBy=e.seriesLayoutBy||Ln,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var n=0;n<r.length;n++){var a=r[n];a.type==null&&dx(this,n)===xt.Must&&(a.type="ordinal")}}return t}();function av(t){return t instanceof vf}function iv(t,e,r){r=r||Ax(t);var n=e.seriesLayoutBy,a=bj(t,r,n,e.sourceHeader,e.dimensions),i=new vf({data:t,sourceFormat:r,seriesLayoutBy:n,dimensionsDefine:a.dimensionsDefine,startIndex:a.startIndex,dimensionsDetectedCount:a.dimensionsDetectedCount,metaRawOption:Te(e)});return i}function ov(t){return new vf({data:t,sourceFormat:Qt(t)?ua:br})}function wj(t){return new vf({data:t.data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:Te(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount})}function Ax(t){var e=cx;if(Qt(t))e=ua;else if(se(t)){t.length===0&&(e=Zt);for(var r=0,n=t.length;r<n;r++){var a=t[r];if(a!=null){if(se(a)){e=Zt;break}else if(_e(a)){e=Fr;break}}}}else if(_e(t)){for(var i in t)if(Yi(t,i)&&Ut(t[i])){e=cn;break}}return e}function bj(t,e,r,n,a){var i,o;if(!t)return{dimensionsDefine:Dx(a),startIndex:o,dimensionsDetectedCount:i};if(e===Zt){var l=t;n==="auto"||n==null?Ox(function(u){u!=null&&u!=="-"&&(ve(u)?o==null&&(o=1):o=0)},r,l,10):o=We(n)?n:n?1:0,!a&&o===1&&(a=[],Ox(function(u,f){a[f]=u!=null?u+"":""},r,l,1/0)),i=a?a.length:r===bo?l.length:l[0]?l[0].length:null}else if(e===Fr)a||(a=Sj(t));else if(e===cn)a||(a=[],z(t,function(u,f){a.push(f)}));else if(e===br){var c=Es(t[0]);i=se(c)&&c.length||1}return{startIndex:o,dimensionsDefine:Dx(a),dimensionsDetectedCount:i}}function Sj(t){for(var e=0,r;e<t.length&&!(r=t[e++]););if(r){var n=[];return z(r,function(a,i){n.push(i)}),n}}function Dx(t){if(!!t){var e=Le();return he(t,function(r,n){r=_e(r)?r:{name:r};var a={name:r.name,displayName:r.displayName,type:r.type};if(a.name==null)return a;a.name+="",a.displayName==null&&(a.displayName=a.name);var i=e.get(a.name);return i?a.name+="-"+i.count++:e.set(a.name,{count:1}),a})}}function Ox(t,e,r,n){if(e===bo)for(var a=0;a<r.length&&a<n;a++)t(r[a]?r[a][0]:null,a);else for(var i=r[0]||[],a=0;a<i.length&&a<n;a++)t(i[a],a)}function Lx(t){var e=t.sourceFormat;return e===Fr||e===cn}var li,ci,ui,Px,Bx,Ix=function(){function t(e,r){var n=av(e)?e:ov(e);this._source=n;var a=this._data=n.data;n.sourceFormat===ua&&(this._offset=0,this._dimSize=r,this._data=a),Bx(this,a,n)}return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(e,r){},t.prototype.appendData=function(e){},t.prototype.clean=function(){},t.protoInitialize=function(){var e=t.prototype;e.pure=!1,e.persistent=!0}(),t.internalField=function(){var e;Bx=function(o,l,c){var u=c.sourceFormat,f=c.seriesLayoutBy,d=c.startIndex,h=c.dimensionsDefine,p=Px[lv(u,f)];if(re(o,p),u===ua)o.getItem=r,o.count=a,o.fillStorage=n;else{var m=Vx(u,f);o.getItem=Be(m,null,l,d,h);var v=zx(u,f);o.count=Be(v,null,l,d,h)}};var r=function(o,l){o=o-this._offset,l=l||[];for(var c=this._data,u=this._dimSize,f=u*o,d=0;d<u;d++)l[d]=c[f+d];return l},n=function(o,l,c,u){for(var f=this._data,d=this._dimSize,h=0;h<d;h++){for(var p=u[h],m=p[0]==null?1/0:p[0],v=p[1]==null?-1/0:p[1],g=l-o,y=c[h],_=0;_<g;_++){var w=f[_*d+h];y[o+_]=w,w<m&&(m=w),w>v&&(v=w)}p[0]=m,p[1]=v}},a=function(){return this._data?this._data.length/this._dimSize:0};Px=(e={},e[Zt+"_"+Ln]={pure:!0,appendData:i},e[Zt+"_"+bo]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Fr]={pure:!0,appendData:i},e[cn]={pure:!0,appendData:function(o){var l=this._data;z(o,function(c,u){for(var f=l[u]||(l[u]=[]),d=0;d<(c||[]).length;d++)f.push(c[d])})}},e[br]={appendData:i},e[ua]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(o){for(var l=0;l<o.length;l++)this._data.push(o[l])}}(),t}(),Rx=function(t,e,r,n){return t[n]},xj=(li={},li[Zt+"_"+Ln]=function(t,e,r,n){return t[n+e]},li[Zt+"_"+bo]=function(t,e,r,n,a){n+=e;for(var i=a||[],o=t,l=0;l<o.length;l++){var c=o[l];i[l]=c?c[n]:null}return i},li[Fr]=Rx,li[cn]=function(t,e,r,n,a){for(var i=a||[],o=0;o<r.length;o++){var l=r[o].name,c=t[l];i[o]=c?c[n]:null}return i},li[br]=Rx,li);function Vx(t,e){var r=xj[lv(t,e)];return r}var Fx=function(t,e,r){return t.length},Cj=(ci={},ci[Zt+"_"+Ln]=function(t,e,r){return Math.max(0,t.length-e)},ci[Zt+"_"+bo]=function(t,e,r){var n=t[0];return n?Math.max(0,n.length-e):0},ci[Fr]=Fx,ci[cn]=function(t,e,r){var n=r[0].name,a=t[n];return a?a.length:0},ci[br]=Fx,ci);function zx(t,e){var r=Cj[lv(t,e)];return r}var sv=function(t,e,r){return t[e]},kj=(ui={},ui[Zt]=sv,ui[Fr]=function(t,e,r){return t[r]},ui[cn]=sv,ui[br]=function(t,e,r){var n=Es(t);return n instanceof Array?n[e]:n},ui[ua]=sv,ui);function Hx(t){var e=kj[t];return e}function lv(t,e){return t===Zt?t+"_"+e:t}function So(t,e,r){if(!!t){var n=t.getRawDataItem(e);if(n!=null){var a=t.getStore(),i=a.getSource().sourceFormat;if(r!=null){var o=t.getDimensionIndex(r),l=a.getDimensionProperty(o);return Hx(i)(n,o,l)}else{var c=n;return i===br&&(c=Es(n)),c}}}}var Tj=/\{@(.+?)\}/g,Ux=function(){function t(){}return t.prototype.getDataParams=function(e,r){var n=this.getData(r),a=this.getRawValue(e,r),i=n.getRawIndex(e),o=n.getName(e),l=n.getRawDataItem(e),c=n.getItemVisual(e,"style"),u=c&&c[n.getItemVisual(e,"drawType")||"fill"],f=c&&c.stroke,d=this.mainType,h=d==="series",p=n.userOutput&&n.userOutput.get();return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:i,data:l,dataType:r,value:a,color:u,borderColor:f,dimensionNames:p?p.fullDimensions:null,encode:p?p.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(e,r,n,a,i,o){r=r||"normal";var l=this.getData(n),c=this.getDataParams(e,n);if(o&&(c.value=o.interpolatedValue),a!=null&&se(c.value)&&(c.value=c.value[a]),!i){var u=l.getItemModel(e);i=u.get(r==="normal"?["label","formatter"]:[r,"label","formatter"])}if(Ee(i))return c.status=r,c.dimensionIndex=a,i(c);if(ve(i)){var f=ix(i,c);return f.replace(Tj,function(d,h){var p=h.length,m=h;m.charAt(0)==="["&&m.charAt(p-1)==="]"&&(m=+m.slice(1,p-1));var v=So(l,e,m);if(o&&se(o.interpolatedValue)){var g=l.getDimensionIndex(m);g>=0&&(v=o.interpolatedValue[g])}return v!=null?v+"":""})}},t.prototype.getRawValue=function(e,r){return So(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function jx(t){var e,r;return _e(t)?t.type&&(r=t):e=t,{text:e,frag:r}}function il(t){return new Mj(t)}var Mj=function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,n=e&&e.skip;if(this._dirty&&r){var a=this.context;a.data=a.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var o=f(this._modBy),l=this._modDataCount||0,c=f(e&&e.modBy),u=e&&e.modDataCount||0;(o!==c||l!==u)&&(i="reset");function f(_){return!(_>=1)&&(_=1),_}var d;(this._dirty||i==="reset")&&(this._dirty=!1,d=this._doReset(n)),this._modBy=c,this._modDataCount=u;var h=e&&e.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,m=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(d||p<m)){var v=this._progress;if(se(v))for(var g=0;g<v.length;g++)this._doProgress(v[g],p,m,c,u);else this._doProgress(v,p,m,c,u)}this._dueIndex=m;var y=this._settedOutputEnd!=null?this._settedOutputEnd:m;this._outputDueEnd=y}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(e,r,n,a,i){Yx.reset(r,n,a,i),this._callingProgress=e,this._callingProgress({start:r,end:n,count:n-r,next:Yx.next},this.context)},t.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var r,n;!e&&this._reset&&(r=this._reset(this.context),r&&r.progress&&(n=r.forceFirstProgress,r=r.progress),se(r)&&!r.length&&(r=null)),this._progress=r,this._modBy=this._modDataCount=null;var a=this._downstream;return a&&a.dirty(),n},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},t}(),Yx=function(){var t,e,r,n,a,i={reset:function(c,u,f,d){e=c,t=u,r=f,n=d,a=Math.ceil(n/r),i.next=r>1&&n>0?l:o}};return i;function o(){return e<t?e++:null}function l(){var c=e%a*r+Math.ceil(e/a),u=e>=t?null:c<n?c:e;return e++,u}}();function xo(t,e){var r=e&&e.type;return r==="ordinal"?t:(r==="time"&&!We(t)&&t!=null&&t!=="-"&&(t=+Nn(t)),t==null||t===""?NaN:+t)}Le({number:function(t){return parseFloat(t)},time:function(t){return+Nn(t)},trim:function(t){return ve(t)?Kr(t):t}});var $j=function(){function t(e,r){var n=e==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return t.prototype.evaluate=function(e,r){var n=We(e)?e:Cu(e),a=We(r)?r:Cu(r),i=isNaN(n),o=isNaN(a);if(i&&(n=this._incomparable),o&&(a=this._incomparable),i&&o){var l=ve(e),c=ve(r);l&&(n=c?e:0),c&&(a=l?r:0)}return n<a?this._resultLT:n>a?-this._resultLT:0},t}(),Nj=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,r){},t.prototype.retrieveValueFromItem=function(e,r){},t.prototype.convertValue=function(e,r){return xo(e,r)},t}();function Ej(t,e){var r=new Nj,n=t.data,a=r.sourceFormat=t.sourceFormat,i=t.startIndex,o="";t.seriesLayoutBy!==Ln&&jt(o);var l=[],c={},u=t.dimensionsDefine;if(u)z(u,function(v,g){var y=v.name,_={index:g,name:y,displayName:v.displayName};if(l.push(_),y!=null){var w="";Yi(c,y)&&jt(w),c[y]=_}});else for(var f=0;f<t.dimensionsDetectedCount;f++)l.push({index:f});var d=Vx(a,Ln);e.__isBuiltIn&&(r.getRawDataItem=function(v){return d(n,i,l,v)},r.getRawData=Be(Aj,null,t)),r.cloneRawData=Be(Dj,null,t);var h=zx(a,Ln);r.count=Be(h,null,n,i,l);var p=Hx(a);r.retrieveValue=function(v,g){var y=d(n,i,l,v);return m(y,g)};var m=r.retrieveValueFromItem=function(v,g){if(v!=null){var y=l[g];if(y)return p(v,g,y.name)}};return r.getDimensionInfo=Be(Oj,null,l,c),r.cloneAllDimensionInfo=Be(Lj,null,l),r}function Aj(t){var e=t.sourceFormat;if(!cv(e)){var r="";jt(r)}return t.data}function Dj(t){var e=t.sourceFormat,r=t.data;if(!cv(e)){var n="";jt(n)}if(e===Zt){for(var a=[],i=0,o=r.length;i<o;i++)a.push(r[i].slice());return a}else if(e===Fr){for(var a=[],i=0,o=r.length;i<o;i++)a.push(re({},r[i]));return a}}function Oj(t,e,r){if(r!=null){if(We(r)||!isNaN(r)&&!Yi(e,r))return t[r];if(Yi(e,r))return e[r]}}function Lj(t){return Te(t)}var Gx=Le();function Pj(t){t=Te(t);var e=t.type,r="";e||jt(r);var n=e.split(":");n.length!==2&&jt(r);var a=!1;n[0]==="echarts"&&(e=n[1],a=!0),t.__isBuiltIn=a,Gx.set(e,t)}function Bj(t,e,r){var n=St(t),a=n.length,i="";a||jt(i);for(var o=0,l=a;o<l;o++){var c=n[o];e=Ij(c,e),o!==l-1&&(e.length=Math.max(e.length,1))}return e}function Ij(t,e,r,n){var a="";e.length||jt(a),_e(t)||jt(a);var i=t.type,o=Gx.get(i);o||jt(a);var l=he(e,function(u){return Ej(u,o)}),c=St(o.transform({upstream:l[0],upstreamList:l,config:Te(t.config)}));return he(c,function(u,f){var d="";_e(u)||jt(d),u.data||jt(d);var h=Ax(u.data);cv(h)||jt(d);var p,m=e[0];if(m&&f===0&&!u.dimensions){var v=m.startIndex;v&&(u.data=m.data.slice(0,v).concat(u.data)),p={seriesLayoutBy:Ln,sourceHeader:v,dimensions:m.metaRawOption.dimensions}}else p={seriesLayoutBy:Ln,sourceHeader:0,dimensions:u.dimensions};return iv(u.data,p,null)})}function cv(t){return t===Zt||t===Fr}var gf="undefined",Rj=typeof Uint32Array===gf?Array:Uint32Array,Vj=typeof Uint16Array===gf?Array:Uint16Array,Wx=typeof Int32Array===gf?Array:Int32Array,Zx=typeof Float64Array===gf?Array:Float64Array,qx={float:Zx,int:Wx,ordinal:Array,number:Array,time:Zx},uv;function ol(t){return t>65535?Rj:Vj}function Co(){return[1/0,-1/0]}function Fj(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function Xx(t,e,r,n,a){var i=qx[r||"float"];if(a){var o=t[e],l=o&&o.length;if(l!==n){for(var c=new i(n),u=0;u<l;u++)c[u]=o[u];t[e]=c}}else t[e]=new i(n)}var fv=function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Le()}return t.prototype.initData=function(e,r,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var a=e.getSource(),i=this.defaultDimValueGetter=uv[a.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],Lx(a),this._dimensions=he(r,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,e.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(e,r){var n=this._calcDimNameToIdx,a=this._dimensions,i=n.get(e);if(i!=null){if(a[i].type===r)return i}else i=a.length;return a[i]={type:r},n.set(e,i),this._chunks[i]=new qx[r||"float"](this._rawCount),this._rawExtent[i]=Co(),i},t.prototype.collectOrdinalMeta=function(e,r){var n=this._chunks[e],a=this._dimensions[e],i=this._rawExtent,o=a.ordinalOffset||0,l=n.length;o===0&&(i[e]=Co());for(var c=i[e],u=o;u<l;u++){var f=n[u]=r.parseAndCollect(n[u]);isNaN(f)||(c[0]=Math.min(f,c[0]),c[1]=Math.max(f,c[1]))}a.ordinalMeta=r,a.ordinalOffset=l,a.type="ordinal"},t.prototype.getOrdinalMeta=function(e){var r=this._dimensions[e],n=r.ordinalMeta;return n},t.prototype.getDimensionProperty=function(e){var r=this._dimensions[e];return r&&r.property},t.prototype.appendData=function(e){var r=this._provider,n=this.count();r.appendData(e);var a=r.count();return r.persistent||(a+=n),n<a&&this._initDataFromProvider(n,a,!0),[n,a]},t.prototype.appendValues=function(e,r){for(var n=this._chunks,a=this._dimensions,i=a.length,o=this._rawExtent,l=this.count(),c=l+Math.max(e.length,r||0),u=0;u<i;u++){var f=a[u];Xx(n,u,f.type,c,!0)}for(var d=[],h=l;h<c;h++)for(var p=h-l,m=0;m<i;m++){var f=a[m],v=uv.arrayRows.call(this,e[p]||d,f.property,p,m);n[m][h]=v;var g=o[m];v<g[0]&&(g[0]=v),v>g[1]&&(g[1]=v)}return this._rawCount=this._count=c,{start:l,end:c}},t.prototype._initDataFromProvider=function(e,r,n){for(var a=this._provider,i=this._chunks,o=this._dimensions,l=o.length,c=this._rawExtent,u=he(o,function(_){return _.property}),f=0;f<l;f++){var d=o[f];c[f]||(c[f]=Co()),Xx(i,f,d.type,r,n)}if(a.fillStorage)a.fillStorage(e,r,i,c);else for(var h=[],p=e;p<r;p++){h=a.getItem(p,h);for(var m=0;m<l;m++){var v=i[m],g=this._dimValueGetter(h,u[m],p,m);v[p]=g;var y=c[m];g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(r)]:NaN},t.prototype.getValues=function(e,r){var n=[],a=[];if(r==null){r=e,e=[];for(var i=0;i<this._dimensions.length;i++)a.push(i)}else a=e;for(var i=0,o=a.length;i<o;i++)n.push(this.get(a[i],r));return n},t.prototype.getByRawIndex=function(e,r){if(!(r>=0&&r<this._rawCount))return NaN;var n=this._chunks[e];return n?n[r]:NaN},t.prototype.getSum=function(e){var r=this._chunks[e],n=0;if(r)for(var a=0,i=this.count();a<i;a++){var o=this.get(e,a);isNaN(o)||(n+=o)}return n},t.prototype.getMedian=function(e){var r=[];this.each([e],function(i){isNaN(i)||r.push(i)});var n=r.sort(function(i,o){return i-o}),a=this.count();return a===0?0:a%2==1?n[(a-1)/2]:(n[a/2]+n[a/2-1])/2},t.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,n=r[e];if(n!=null&&n<this._count&&n===e)return e;for(var a=0,i=this._count-1;a<=i;){var o=(a+i)/2|0;if(r[o]<e)a=o+1;else if(r[o]>e)i=o-1;else return o}return-1},t.prototype.indicesOfNearest=function(e,r,n){var a=this._chunks,i=a[e],o=[];if(!i)return o;n==null&&(n=1/0);for(var l=1/0,c=-1,u=0,f=0,d=this.count();f<d;f++){var h=this.getRawIndex(f),p=r-i[h],m=Math.abs(p);m<=n&&((m<l||m===l&&p>=0&&c<0)&&(l=m,c=p,u=0),p===c&&(o[u++]=f))}return o.length=u,o},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var n=r.constructor,a=this._count;if(n===Array){e=new n(a);for(var i=0;i<a;i++)e[i]=r[i]}else e=new n(r.buffer,0,a)}else{var n=ol(this._rawCount);e=new n(this.count());for(var i=0;i<e.length;i++)e[i]=i}return e},t.prototype.filter=function(e,r){if(!this._count)return this;for(var n=this.clone(),a=n.count(),i=ol(n._rawCount),o=new i(a),l=[],c=e.length,u=0,f=e[0],d=n._chunks,h=0;h<a;h++){var p=void 0,m=n.getRawIndex(h);if(c===0)p=r(h);else if(c===1){var v=d[f][m];p=r(v,h)}else{for(var g=0;g<c;g++)l[g]=d[e[g]][m];l[g]=h,p=r.apply(null,l)}p&&(o[u++]=m)}return u<a&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},t.prototype.selectRange=function(e){var r=this.clone(),n=r._count;if(!n)return this;var a=Fe(e),i=a.length;if(!i)return this;var o=r.count(),l=ol(r._rawCount),c=new l(o),u=0,f=a[0],d=e[f][0],h=e[f][1],p=r._chunks,m=!1;if(!r._indices){var v=0;if(i===1){for(var g=p[a[0]],y=0;y<n;y++){var _=g[y];(_>=d&&_<=h||isNaN(_))&&(c[u++]=v),v++}m=!0}else if(i===2){for(var g=p[a[0]],w=p[a[1]],S=e[a[1]][0],x=e[a[1]][1],y=0;y<n;y++){var _=g[y],b=w[y];(_>=d&&_<=h||isNaN(_))&&(b>=S&&b<=x||isNaN(b))&&(c[u++]=v),v++}m=!0}}if(!m)if(i===1)for(var y=0;y<o;y++){var C=r.getRawIndex(y),_=p[a[0]][C];(_>=d&&_<=h||isNaN(_))&&(c[u++]=C)}else for(var y=0;y<o;y++){for(var k=!0,C=r.getRawIndex(y),$=0;$<i;$++){var N=a[$],_=p[N][C];(_<e[N][0]||_>e[N][1])&&(k=!1)}k&&(c[u++]=r.getRawIndex(y))}return u<o&&(r._indices=c),r._count=u,r._extent=[],r._updateGetRawIdx(),r},t.prototype.map=function(e,r){var n=this.clone(e);return this._updateDims(n,e,r),n},t.prototype.modify=function(e,r){this._updateDims(this,e,r)},t.prototype._updateDims=function(e,r,n){for(var a=e._chunks,i=[],o=r.length,l=e.count(),c=[],u=e._rawExtent,f=0;f<r.length;f++)u[r[f]]=Co();for(var d=0;d<l;d++){for(var h=e.getRawIndex(d),p=0;p<o;p++)c[p]=a[r[p]][h];c[o]=d;var m=n&&n.apply(null,c);if(m!=null){typeof m!="object"&&(i[0]=m,m=i);for(var f=0;f<m.length;f++){var v=r[f],g=m[f],y=u[v],_=a[v];_&&(_[h]=g),g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}}}},t.prototype.lttbDownSample=function(e,r){var n=this.clone([e],!0),a=n._chunks,i=a[e],o=this.count(),l=0,c=Math.floor(1/r),u=this.getRawIndex(0),f,d,h,p=new(ol(this._rawCount))(Math.min((Math.ceil(o/c)+2)*2,o));p[l++]=u;for(var m=1;m<o-1;m+=c){for(var v=Math.min(m+c,o-1),g=Math.min(m+c*2,o),y=(g+v)/2,_=0,w=v;w<g;w++){var S=this.getRawIndex(w),x=i[S];isNaN(x)||(_+=x)}_/=g-v;var b=m,C=Math.min(m+c,o),k=m-1,$=i[u];f=-1,h=b;for(var N=-1,A=0,w=b;w<C;w++){var S=this.getRawIndex(w),x=i[S];if(isNaN(x)){A++,N<0&&(N=S);continue}d=Math.abs((k-y)*(x-$)-(k-w)*(_-$)),d>f&&(f=d,h=S)}A>0&&A<C-b&&(p[l++]=Math.min(N,h),h=Math.max(N,h)),p[l++]=h,u=h}return p[l++]=this.getRawIndex(o-1),n._count=l,n._indices=p,n.getRawIndex=this._getRawIdx,n},t.prototype.downSample=function(e,r,n,a){for(var i=this.clone([e],!0),o=i._chunks,l=[],c=Math.floor(1/r),u=o[e],f=this.count(),d=i._rawExtent[e]=Co(),h=new(ol(this._rawCount))(Math.ceil(f/c)),p=0,m=0;m<f;m+=c){c>f-m&&(c=f-m,l.length=c);for(var v=0;v<c;v++){var g=this.getRawIndex(m+v);l[v]=u[g]}var y=n(l),_=this.getRawIndex(Math.min(m+a(l,y)||0,f-1));u[_]=y,y<d[0]&&(d[0]=y),y>d[1]&&(d[1]=y),h[p++]=_}return i._count=p,i._indices=h,i._updateGetRawIdx(),i},t.prototype.each=function(e,r){if(!!this._count)for(var n=e.length,a=this._chunks,i=0,o=this.count();i<o;i++){var l=this.getRawIndex(i);switch(n){case 0:r(i);break;case 1:r(a[e[0]][l],i);break;case 2:r(a[e[0]][l],a[e[1]][l],i);break;default:for(var c=0,u=[];c<n;c++)u[c]=a[e[c]][l];u[c]=i,r.apply(null,u)}}},t.prototype.getDataExtent=function(e){var r=this._chunks[e],n=Co();if(!r)return n;var a=this.count(),i=!this._indices,o;if(i)return this._rawExtent[e].slice();if(o=this._extent[e],o)return o.slice();o=n;for(var l=o[0],c=o[1],u=0;u<a;u++){var f=this.getRawIndex(u),d=r[f];d<l&&(l=d),d>c&&(c=d)}return o=[l,c],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],a=this._chunks,i=0;i<a.length;i++)n.push(a[i][r]);return n},t.prototype.clone=function(e,r){var n=new t,a=this._chunks,i=e&&Qn(e,function(l,c){return l[c]=!0,l},{});if(i)for(var o=0;o<a.length;o++)n._chunks[o]=i[o]?Fj(a[o]):a[o];else n._chunks=a;return this._copyCommonProps(n),r||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},t.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=Te(this._extent),e._rawExtent=Te(this._rawExtent)},t.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,r=void 0;if(e===Array){var n=this._indices.length;r=new e(n);for(var a=0;a<n;a++)r[a]=this._indices[a]}else r=new e(this._indices);return r}return null},t.prototype._getRawIdxIdentity=function(e){return e},t.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function e(r,n,a,i){return xo(r[i],this._dimensions[i])}uv={arrayRows:e,objectRows:function(r,n,a,i){return xo(r[n],this._dimensions[i])},keyedColumns:e,original:function(r,n,a,i){var o=r&&(r.value==null?r:r.value);return xo(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(r,n,a,i){return r[i]}}}(),t}(),zj=function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,a,i;if(yf(e)){var o=e,l=void 0,c=void 0,u=void 0;if(n){var f=r[0];f.prepareSource(),u=f.getSource(),l=u.data,c=u.sourceFormat,i=[f._getVersionSign()]}else l=o.get("data",!0),c=Qt(l)?ua:br,i=[];var d=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},p=Ae(d.seriesLayoutBy,h.seriesLayoutBy)||null,m=Ae(d.sourceHeader,h.sourceHeader),v=Ae(d.dimensions,h.dimensions),g=p!==h.seriesLayoutBy||!!m!=!!h.sourceHeader||v;a=g?[iv(l,{seriesLayoutBy:p,sourceHeader:m,dimensions:v},c)]:[]}else{var y=e;if(n){var _=this._applyTransform(r);a=_.sourceList,i=_.upstreamSignList}else{var w=y.get("source",!0);a=[iv(w,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(a,i)},t.prototype._applyTransform=function(e){var r=this._sourceHost,n=r.get("transform",!0),a=r.get("fromTransformResult",!0);if(a!=null){var i="";e.length!==1&&Kx(i)}var o,l=[],c=[];return z(e,function(u){u.prepareSource();var f=u.getSource(a||0),d="";a!=null&&!f&&Kx(d),l.push(f),c.push(u._getVersionSign())}),n?o=Bj(n,l,{datasetIndex:r.componentIndex}):a!=null&&(o=[wj(l[0])]),{sourceList:o,upstreamSignList:c}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r<e.length;r++){var n=e[r];if(n._isDirty()||this._upstreamSignList[r]!==n._getVersionSign())return!0}},t.prototype.getSource=function(e){e=e||0;var r=this._sourceList[e];if(!r){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return r},t.prototype.getSharedDataStore=function(e){var r=e.makeStoreSchema();return this._innerGetDataStore(r.dimensions,e.source,r.hash)},t.prototype._innerGetDataStore=function(e,r,n){var a=0,i=this._storeList,o=i[a];o||(o=i[a]={});var l=o[n];if(!l){var c=this._getUpstreamSourceManagers()[0];yf(this._sourceHost)&&c?l=c._innerGetDataStore(e,r,n):(l=new fv,l.initData(new Ix(r,e.length),e)),o[n]=l}return l},t.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(yf(e)){var r=Qm(e);return r?[r.getSourceManager()]:[]}else return he(GU(e),function(n){return n.getSourceManager()})},t.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,r,n,a;if(yf(e))r=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),a=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=e;r=i.get("seriesLayoutBy",!0),n=i.get("sourceHeader",!0),a=i.get("dimensions",!0)}return{seriesLayoutBy:r,sourceHeader:n,dimensions:a}},t}();function yf(t){return t.mainType==="series"}function Kx(t){throw new Error(t)}var Jx="line-height:1";function Qx(t,e){var r=t.color||"#6e7079",n=t.fontSize||12,a=t.fontWeight||"400",i=t.color||"#464646",o=t.fontSize||14,l=t.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+wr(n+"")+"px;color:"+wr(r)+";font-weight:"+wr(a+""),valueStyle:"font-size:"+wr(o+"")+"px;color:"+wr(i)+";font-weight:"+wr(l+"")}:{nameStyle:{fontSize:n,fill:r,fontWeight:a},valueStyle:{fontSize:o,fill:i,fontWeight:l}}}var Hj=[0,10,20,30],Uj=["",`
61
+ `,`
62
+
63
+ `,`
64
+
65
+
66
+ `];function fi(t,e){return e.type=t,e}function dv(t){return t.type==="section"}function e2(t){return dv(t)?jj:Yj}function t2(t){if(dv(t)){var e=0,r=t.blocks.length,n=r>1||r>0&&!t.noHeader;return z(t.blocks,function(a){var i=t2(a);i>=e&&(e=i+ +(n&&(!i||dv(a)&&!a.noHeader)))}),e}return 0}function jj(t,e,r,n){var a=e.noHeader,i=Gj(t2(e)),o=[],l=e.blocks||[];cr(!l||se(l)),l=l||[];var c=t.orderMode;if(e.sortBlocks&&c){l=l.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Yi(u,c)){var f=new $j(u[c],null);l.sort(function(m,v){return f.evaluate(m.sortParam,v.sortParam)})}else c==="seriesDesc"&&l.reverse()}z(l,function(m,v){var g=e.valueFormatter,y=e2(m)(g?re(re({},t),{valueFormatter:g}):t,m,v>0?i.html:0,n);y!=null&&o.push(y)});var d=t.renderMode==="richText"?o.join(i.richText):hv(o.join(""),a?r:i.html);if(a)return d;var h=Xm(e.header,"ordinal",t.useUTC),p=Qx(n,t.renderMode).nameStyle;return t.renderMode==="richText"?n2(t,h,p)+i.richText+d:hv('<div style="'+p+";"+Jx+';">'+wr(h)+"</div>"+d,r)}function Yj(t,e,r,n){var a=t.renderMode,i=e.noName,o=e.noValue,l=!e.markerType,c=e.name,u=t.useUTC,f=e.valueFormatter||t.valueFormatter||function(S){return S=se(S)?S:[S],he(S,function(x,b){return Xm(x,se(p)?p[b]:p,u)})};if(!(i&&o)){var d=l?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",a),h=i?"":Xm(c,"ordinal",u),p=e.valueType,m=o?[]:f(e.value),v=!l||!i,g=!l&&i,y=Qx(n,a),_=y.nameStyle,w=y.valueStyle;return a==="richText"?(l?"":d)+(i?"":n2(t,h,_))+(o?"":qj(t,m,v,g,w)):hv((l?"":d)+(i?"":Wj(h,!l,_))+(o?"":Zj(m,v,g,w)),r)}}function r2(t,e,r,n,a,i){if(!!t){var o=e2(t),l={useUTC:a,renderMode:r,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(l,t,0,i)}}function Gj(t){return{html:Hj[t],richText:Uj[t]}}function hv(t,e){var r='<div style="clear:both"></div>',n="margin: "+e+"px 0 0";return'<div style="'+n+";"+Jx+';">'+t+r+"</div>"}function Wj(t,e,r){var n=e?"margin-left:2px":"";return'<span style="'+r+";"+n+'">'+wr(t)+"</span>"}function Zj(t,e,r,n){var a=r?"10px":"20px",i=e?"float:right;margin-left:"+a:"";return t=se(t)?t:[t],'<span style="'+i+";"+n+'">'+he(t,function(o){return wr(o)}).join("&nbsp;&nbsp;")+"</span>"}function n2(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function qj(t,e,r,n,a){var i=[a],o=n?10:20;return r&&i.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(se(e)?e.join(" "):e,i)}function Xj(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return si(n)}function a2(t,e){var r=t.get("padding");return r!=null?r:e==="richText"?[8,10]:10}var pv=function(){function t(){this.richTextStyles={},this._nextStyleNameId=Kw()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,r,n){var a=n==="richText"?this._generateStyleName():null,i=IU({color:r,type:e,renderMode:n,markerId:a});return ve(i)?i:(this.richTextStyles[a]=i.style,i.content)},t.prototype.wrapRichTextStyle=function(e,r){var n={};se(r)?z(r,function(i){return re(n,i)}):re(n,r);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+e+"}"},t}();function Kj(t){var e=t.series,r=t.dataIndex,n=t.multipleSeries,a=e.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,l=e.getRawValue(r),c=se(l),u=Xj(e,r),f,d,h,p;if(o>1||c&&!o){var m=Jj(l,e,r,i,u);f=m.inlineValues,d=m.inlineValueTypes,h=m.blocks,p=m.inlineValues[0]}else if(o){var v=a.getDimensionInfo(i[0]);p=f=So(a,r,i[0]),d=v.type}else p=f=c?l[0]:l;var g=Kp(e),y=g&&e.name||"",_=a.getName(r),w=n?y:_;return fi("section",{header:y,noHeader:n||!g,sortParam:p,blocks:[fi("nameValue",{markerType:"item",markerColor:u,name:w,noName:!Kr(w),value:f,valueType:d})].concat(h||[])})}function Jj(t,e,r,n,a){var i=e.getData(),o=Qn(t,function(d,h,p){var m=i.getDimensionInfo(p);return d=d||m&&m.tooltip!==!1&&m.displayName!=null},!1),l=[],c=[],u=[];n.length?z(n,function(d){f(So(i,r,d),d)}):z(t,f);function f(d,h){var p=i.getDimensionInfo(h);!p||p.otherDims.tooltip===!1||(o?u.push(fi("nameValue",{markerType:"subItem",markerColor:a,name:p.displayName,value:d,valueType:p.type})):(l.push(d),c.push(p.type)))}return{inlineValues:l,inlineValueTypes:c,blocks:u}}var fa=ct();function _f(t,e){return t.getName(e)||t.getId(e)}var Qj="__universalTransitionEnabled",wf=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,a){this.seriesIndex=this.componentIndex,this.dataTask=il({count:tY,reset:rY}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,a);var i=fa(this).sourceManager=new zj(this);i.prepareSource();var o=this.getInitialData(r,a);o2(o,this),this.dataTask.context.data=o,fa(this).dataBeforeProcessed=o,i2(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var a=el(this),i=a?hf(r):{},o=this.subType;tt.hasClass(o)&&(o+="Series"),Re(r,n.getTheme().get(this.subType)),Re(r,this.getDefaultOption()),Ns(r,"label",["show"]),this.fillDataTextStyle(r.data),a&&yo(r,i,a)},e.prototype.mergeOption=function(r,n){r=Re(this.option,r,!0),this.fillDataTextStyle(r.data);var a=el(this);a&&yo(this.option,r,a);var i=fa(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(r,n);o2(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,fa(this).dataBeforeProcessed=o,i2(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!Qt(r))for(var n=["show"],a=0;a<r.length;a++)r[a]&&r[a].label&&Ns(r[a],"label",n)},e.prototype.getInitialData=function(r,n){},e.prototype.appendData=function(r){var n=this.getRawData();n.appendData(r.data)},e.prototype.getData=function(r){var n=mv(this);if(n){var a=n.context.data;return r==null?a:a.getLinkedData(r)}else return fa(this).data},e.prototype.getAllData=function(){var r=this.getData();return r&&r.getLinkedDataAll?r.getLinkedDataAll():[{data:r}]},e.prototype.setData=function(r){var n=mv(this);if(n){var a=n.context;a.outputData=r,n!==this.dataTask&&(a.data=r)}fa(this).data=r},e.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return Le(r)},e.prototype.getSourceManager=function(){return fa(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return fa(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var r=this.get("colorBy");return r||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var r=this.coordinateSystem;return r&&r.getBaseAxis&&r.getBaseAxis()},e.prototype.formatTooltip=function(r,n,a){return Kj({series:this,dataIndex:r,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(Pe.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,n,a){var i=this.ecModel,o=ev.prototype.getColorFromPalette.call(this,r,n,a);return o||(o=i.getColorFromPalette(r,n,a)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.prototype.unselect=function(r,n){var a=this.option.selectedMap;if(!!a){var i=this.option.selectedMode,o=this.getData(n);if(i==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var l=0;l<r.length;l++){var c=r[l],u=_f(o,c);a[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(r,n){for(var a=[],i=0;i<r.length;i++)a[0]=r[i],this.isSelected(r[i],n)?this.unselect(a,n):this.select(a,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var r=this._selectedDataIndicesMap,n=Fe(r),a=[],i=0;i<n.length;i++){var o=r[n[i]];o>=0&&a.push(o)}return a},e.prototype.isSelected=function(r,n){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(n);return(a==="all"||a[_f(i,r)])&&!i.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Qj])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,n){var a,i,o=this.option,l=o.selectedMode,c=n.length;if(!(!l||!c)){if(l==="series")o.selectedMap="all";else if(l==="multiple"){_e(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f<c;f++){var d=n[f],h=_f(r,d);u[h]=!0,this._selectedDataIndicesMap[h]=r.getRawIndex(d)}}else if(l==="single"||l===!0){var p=n[c-1],h=_f(r,p);o.selectedMap=(a={},a[h]=!0,a),this._selectedDataIndicesMap=(i={},i[h]=r.getRawIndex(p),i)}}},e.prototype._initSelectedMapFromData=function(r){if(!this.option.selectedMap){var n=[];r.hasItemOption&&r.each(function(a){var i=r.getRawDataItem(a);i&&i.selected&&n.push(a)}),n.length>0&&this._innerSelect(r,n)}},e.registerClass=function(r){return tt.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(tt);Dr(wf,Ux),Dr(wf,ev),sb(wf,tt);function i2(t){var e=t.name;Kp(t)||(t.name=eY(t)||e)}function eY(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return z(r,function(a){var i=e.getDimensionInfo(a);i.displayName&&n.push(i.displayName)}),n.join(" ")}function tY(t){return t.model.getRawData().count()}function rY(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),nY}function nY(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function o2(t,e){z(ZV(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,qe(aY,e))})}function aY(t,e){var r=mv(t);return r&&r.setOutputEnd((e||this).count()),e}function mv(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(t.uid))}return n}}var un=wf,vv=function(){function t(){this.group=new lt,this.uid=ef("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,a){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,a){},t.prototype.updateLayout=function(e,r,n,a){},t.prototype.updateVisual=function(e,r,n,a){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();em(vv),ku(vv);var Hr=vv;function gv(){var t=ct();return function(e){var r=t(e),n=e.pipelineContext,a=!!r.large,i=!!r.progressiveRender,o=r.large=!!(n&&n.large),l=r.progressiveRender=!!(n&&n.progressiveRender);return(a!==o||i!==l)&&"reset"}}var s2=ct(),iY=gv(),yv=function(){function t(){this.group=new lt,this.uid=ef("viewChart"),this.renderTask=il({plan:oY,reset:sY}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,a){},t.prototype.highlight=function(e,r,n,a){var i=e.getData(a&&a.dataType);!i||c2(i,a,"emphasis")},t.prototype.downplay=function(e,r,n,a){var i=e.getData(a&&a.dataType);!i||c2(i,a,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,a){this.render(e,r,n,a)},t.prototype.updateLayout=function(e,r,n,a){this.render(e,r,n,a)},t.prototype.updateVisual=function(e,r,n,a){this.render(e,r,n,a)},t.prototype.eachRendered=function(e){po(this.group,e)},t.markUpdateMethod=function(e,r){s2(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function l2(t,e,r){t&&Mm(t)&&(e==="emphasis"?Fs:zs)(t,r)}function c2(t,e,r){var n=Ua(t,e),a=e&&e.highlightKey!=null?pH(e.highlightKey):null;n!=null?z(St(n),function(i){l2(t.getItemGraphicEl(i),r,a)}):t.eachItemGraphicEl(function(i){l2(i,r,a)})}em(yv),ku(yv);function oY(t){return iY(t.model)}function sY(t){var e=t.model,r=t.ecModel,n=t.api,a=t.payload,i=e.pipelineContext.progressiveRender,o=t.view,l=a&&s2(a).updateMethod,c=i?"incrementalPrepareRender":l&&o[l]?l:"render";return c!=="render"&&o[c](e,r,n,a),lY[c]}var lY={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},xr=yv,bf="\0__throttleOriginMethod",u2="\0__throttleRate",f2="\0__throttleType";function _v(t,e,r){var n,a=0,i=0,o=null,l,c,u,f;e=e||0;function d(){i=new Date().getTime(),o=null,t.apply(c,u||[])}var h=function(){for(var p=[],m=0;m<arguments.length;m++)p[m]=arguments[m];n=new Date().getTime(),c=this,u=p;var v=f||e,g=f||r;f=null,l=n-(g?a:i)-v,clearTimeout(o),g?o=setTimeout(d,v):l>=0?d():o=setTimeout(d,-l),a=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(p){f=p},h}function d2(t,e,r,n){var a=t[e];if(!!a){var i=a[bf]||a,o=a[f2],l=a[u2];if(l!==r||o!==n){if(r==null||!n)return t[e]=i;a=t[e]=_v(i,r,n==="debounce"),a[bf]=i,a[f2]=n,a[u2]=r}return a}}function wv(t,e){var r=t[e];r&&r[bf]&&(r.clear&&r.clear(),t[e]=r[bf])}var h2=ct(),p2={itemStyle:Ls(HS,!0),lineStyle:Ls(zS,!0)},cY={lineStyle:"stroke",itemStyle:"fill"};function m2(t,e){var r=t.visualStyleMapper||p2[e];return r||(console.warn("Unkown style type '"+e+"'."),p2.itemStyle)}function v2(t,e){var r=t.visualDrawType||cY[e];return r||(console.warn("Unkown style type '"+e+"'."),"fill")}var uY={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",a=t.getModel(n),i=m2(t,n),o=i(a),l=a.getShallow("decal");l&&(r.setVisual("decal",l),l.dirty=!0);var c=v2(t,n),u=o[c],f=Ee(u)?u:null,d=o.fill==="auto"||o.stroke==="auto";if(!o[c]||f||d){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[c]||(o[c]=h,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Ee(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||Ee(o.stroke)?h:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",c),!e.isSeriesFiltered(t)&&f)return r.setVisual("colorFromPalette",!1),{dataEach:function(p,m){var v=t.getDataParams(m),g=re({},o);g[c]=f(v),p.setItemVisual(m,"style",g)}}}},sl=new Et,fY={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",a=m2(t,n),i=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,l){var c=o.getRawDataItem(l);if(c&&c[n]){sl.option=c[n];var u=a(sl),f=o.ensureUniqueItemVisual(l,"style");re(f,u),sl.option.decal&&(o.setItemVisual(l,"decal",sl.option.decal),sl.option.decal.dirty=!0),i in u&&o.setItemVisual(l,"colorFromPalette",!1)}}:null}}}},dY={performRawSeries:!0,overallReset:function(t){var e=Le();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var a=r.type+"-"+n,i=e.get(a);i||(i={},e.set(a,i)),h2(r).scope=i}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),a={},i=r.getData(),o=h2(r).scope,l=r.visualStyleAccessPath||"itemStyle",c=v2(r,l);i.each(function(u){var f=i.getRawIndex(u);a[f]=u}),n.each(function(u){var f=a[u],d=i.getItemVisual(f,"colorFromPalette");if(d){var h=i.ensureUniqueItemVisual(f,"style"),p=n.getName(u)||u+"",m=n.count();h[c]=r.getColorFromPalette(p,o,m)}})}})}},Sf=Math.PI;function hY(t,e){e=e||{},Ue(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new lt,n=new it({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var a=new ut({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new it({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(i);var o;return e.showSpinner&&(o=new Lm({shape:{startAngle:-Sf/2,endAngle:-Sf/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Sf*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Sf*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var l=a.getBoundingRect().width,c=e.showSpinner?e.spinnerRadius:0,u=(t.getWidth()-c*2-(e.showSpinner&&l?10:0)-l)/2-(e.showSpinner&&l?0:5+l/2)+(e.showSpinner?0:l/2)+(l?0:c),f=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:f}),i.setShape({x:u-c,y:f-c,width:c*2,height:c*2}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var pY=function(){function t(e,r,n,a){this._stageTaskMap=Le(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=n.concat(a)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var a=n.overallTask;a&&a.dirty()})},t.prototype.getPerformArgs=function(e,r){if(!!e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),a=n.context,i=!r&&n.progressiveEnabled&&(!a||a.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=i?n.step:null,l=a&&a.modDataCount,c=l!=null?Math.ceil(l/o):null;return{step:o,modBy:c,modDataCount:l}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),a=e.getData(),i=a.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&i>=n.threshold,l=e.get("large")&&i>=e.get("largeThreshold"),c=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:c,large:l}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=Le();e.eachSeries(function(a){var i=a.getProgressive(),o=a.uid;n.set(o,{id:o,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),r._pipe(a,a.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;z(this._allHandlers,function(a){var i=e.get(a.uid)||e.set(a.uid,{}),o="";cr(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,r,n),a.overallReset&&this._createOverallStageTask(a,i,r,n)},this)},t.prototype.prepareView=function(e,r,n,a){var i=e.renderTask,o=i.context;o.model=r,o.ecModel=n,o.api=a,i.__block=!e.incrementalPrepareRender,this._pipe(r,i)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,a){a=a||{};var i=!1,o=this;z(e,function(c,u){if(!(a.visualType&&a.visualType!==c.visualType)){var f=o._stageTaskMap.get(c.uid),d=f.seriesTaskMap,h=f.overallTask;if(h){var p,m=h.agentStubMap;m.each(function(g){l(a,g)&&(g.dirty(),p=!0)}),p&&h.dirty(),o.updatePayload(h,n);var v=o.getPerformArgs(h,a.block);m.each(function(g){g.perform(v)}),h.perform(v)&&(i=!0)}else d&&d.each(function(g,y){l(a,g)&&g.dirty();var _=o.getPerformArgs(g,a.block);_.skip=!c.performRawSeries&&r.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(_)&&(i=!0)})}});function l(c,u){return c.setDirty&&(!c.dirtyMap||c.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,a){var i=this,o=r.seriesTaskMap,l=r.seriesTaskMap=Le(),c=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(f):c?n.eachRawSeriesByType(c,f):u&&u(n,a).each(f);function f(d){var h=d.uid,p=l.set(h,o&&o.get(h)||il({plan:_Y,reset:wY,count:SY}));p.context={model:d,ecModel:n,api:a,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(d,p)}},t.prototype._createOverallStageTask=function(e,r,n,a){var i=this,o=r.overallTask=r.overallTask||il({reset:mY});o.context={ecModel:n,api:a,overallReset:e.overallReset,scheduler:i};var l=o.agentStubMap,c=o.agentStubMap=Le(),u=e.seriesType,f=e.getTargetSeries,d=!0,h=!1,p="";cr(!e.createOnAllSeries,p),u?n.eachRawSeriesByType(u,m):f?f(n,a).each(m):(d=!1,z(n.getSeries(),m));function m(v){var g=v.uid,y=c.set(g,l&&l.get(g)||(h=!0,il({reset:vY,onDirty:yY})));y.context={model:v,overallProgress:d},y.agent=o,y.__block=d,i._pipe(v,y)}h&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.uid,a=this._pipelineMap.get(n);!a.head&&(a.head=r),a.tail&&a.tail.pipe(r),a.tail=r,r.__idxInPipeline=a.count++,r.__pipeline=a},t.wrapStageHandler=function(e,r){return Ee(e)&&(e={overallReset:e,seriesType:xY(e)}),e.uid=ef("stageHandler"),r&&(e.visualType=r),e},t}();function mY(t){t.overallReset(t.ecModel,t.api,t.payload)}function vY(t){return t.overallProgress&&gY}function gY(){this.agent.dirty(),this.getDownstream().dirty()}function yY(){this.agent&&this.agent.dirty()}function _Y(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function wY(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=St(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?he(e,function(r,n){return g2(n)}):bY}var bY=g2(0);function g2(t){return function(e,r){var n=r.data,a=r.resetDefines[t];if(a&&a.dataEach)for(var i=e.start;i<e.end;i++)a.dataEach(n,i);else a&&a.progress&&a.progress(e,n)}}function SY(t){return t.data.count()}function xY(t){xf=null;try{t(ll,y2)}catch{}return xf}var ll={},y2={},xf;_2(ll,Sx),_2(y2,xx),ll.eachSeriesByType=ll.eachRawSeriesByType=function(t){xf=t},ll.eachComponent=function(t){t.mainType==="series"&&t.subType&&(xf=t.subType)};function _2(t,e){for(var r in e.prototype)t[r]=Pt}var w2=pY,b2=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],CY={color:b2,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],b2]},It="#B9B8CE",S2="#100C2A",Cf=function(){return{axisLine:{lineStyle:{color:It}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},x2=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],C2={darkMode:!0,color:x2,backgroundColor:S2,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:It}},textStyle:{color:It},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:It}},dataZoom:{borderColor:"#71708A",textStyle:{color:It},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:It}},timeline:{lineStyle:{color:It},label:{color:It},controlStyle:{color:It,borderColor:It}},calendar:{itemStyle:{color:S2},dayLabel:{color:It},monthLabel:{color:It},yearLabel:{color:It}},timeAxis:Cf(),logAxis:Cf(),valueAxis:Cf(),categoryAxis:Cf(),line:{symbol:"circle"},graph:{color:x2},gauge:{title:{color:It},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:It},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};C2.categoryAxis.splitLine.show=!1;var kY=C2,TY=function(){function t(){}return t.prototype.normalizeQuery=function(e){var r={},n={},a={};if(ve(e)){var i=rn(e);r.mainType=i.main||null,r.subType=i.sub||null}else{var o=["Index","Name","Id"],l={name:1,dataIndex:1,dataType:1};z(e,function(c,u){for(var f=!1,d=0;d<o.length;d++){var h=o[d],p=u.lastIndexOf(h);if(p>0&&p===u.length-h.length){var m=u.slice(0,p);m!=="data"&&(r.mainType=m,r[h.toLowerCase()]=c,f=!0)}}l.hasOwnProperty(u)&&(n[u]=c,f=!0),f||(a[u]=c)})}return{cptQuery:r,dataQuery:n,otherQuery:a}},t.prototype.filter=function(e,r){var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,i=n.packedEvent,o=n.model,l=n.view;if(!o||!l)return!0;var c=r.cptQuery,u=r.dataQuery;return f(c,o,"mainType")&&f(c,o,"subType")&&f(c,o,"index","componentIndex")&&f(c,o,"name")&&f(c,o,"id")&&f(u,i,"name")&&f(u,i,"dataIndex")&&f(u,i,"dataType")&&(!l.filterForExposedEvent||l.filterForExposedEvent(e,r.otherQuery,a,i));function f(d,h,p,m){return d[p]==null||h[m||p]===d[p]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),bv=["symbol","symbolSize","symbolRotate","symbolOffset"],k2=bv.concat(["symbolKeepAspect"]),MY={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},a={},i=!1,o=0;o<bv.length;o++){var l=bv[o],c=t.get(l);Ee(c)?(i=!0,a[l]=c):n[l]=c}if(n.symbol=n.symbol||t.defaultSymbol,r.setVisual(re({legendIcon:t.legendIcon||n.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},n)),e.isSeriesFiltered(t))return;var u=Fe(a);function f(d,h){for(var p=t.getRawValue(h),m=t.getDataParams(h),v=0;v<u.length;v++){var g=u[v];d.setItemVisual(h,g,a[g](p,m))}}return{dataEach:i?f:null}}},$Y={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.hasSymbolVisual||e.isSeriesFiltered(t))return;var r=t.getData();function n(a,i){for(var o=a.getItemModel(i),l=0;l<k2.length;l++){var c=k2[l],u=o.getShallow(c,!0);u!=null&&a.setItemVisual(i,c,u)}}return{dataEach:r.hasItemOption?n:null}}};function T2(t,e,r){switch(r){case"color":var n=t.getItemVisual(e,"style");return n[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,r)}}function Sv(t,e){switch(e){case"color":var r=t.getVisual("style");return r[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}function NY(t,e,r,n){switch(r){case"color":var a=t.ensureUniqueItemVisual(e,"style");a[t.getVisual("drawType")]=n,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,r,n);break}}function EY(t,e){function r(n,a){var i=[];return n.eachComponent({mainType:"series",subType:t,query:a},function(o){i.push(o.seriesIndex)}),i}z([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],function(n){e(n[0],function(a,i,o){a=re({},a),o.dispatchAction(re(a,{type:n[1],seriesIndex:r(i,a)}))})})}function ko(t,e,r,n,a){var i=t+e;r.isSilent(i)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var l=o.seriesIndex,c=o.option.selectedMap,u=a.selected,f=0;f<u.length;f++)if(u[f].seriesIndex===l){var d=o.getData(),h=Ua(d,a.fromActionPayload);r.trigger(i,{type:i,seriesId:o.id,name:se(h)?d.getName(h[0]):d.getName(h),selected:ve(c)?c:re({},c)})}})}function AY(t,e,r){t.on("selectchanged",function(n){var a=r.getModel();n.isFromClick?(ko("map","selectchanged",e,a,n),ko("pie","selectchanged",e,a,n)):n.fromAction==="select"?(ko("map","selected",e,a,n),ko("pie","selected",e,a,n)):n.fromAction==="unselect"&&(ko("map","unselected",e,a,n),ko("pie","unselected",e,a,n))})}function cl(t,e,r){for(var n;t&&!(e(t)&&(n=t,r));)t=t.__hostTarget||t.parent;return n}var DY=Math.round(Math.random()*9),OY=typeof Object.defineProperty=="function",LY=function(){function t(){this._id="__ec_inner_"+DY++}return t.prototype.get=function(e){return this._guard(e)[this._id]},t.prototype.set=function(e,r){var n=this._guard(e);return OY?Object.defineProperty(n,this._id,{value:r,enumerable:!1,configurable:!0}):n[this._id]=r,this},t.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},t.prototype.has=function(e){return!!this._guard(e)[this._id]},t.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},t}(),PY=LY,BY=je.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,a=e.width/2,i=e.height/2;t.moveTo(r,n-i),t.lineTo(r+a,n+i),t.lineTo(r-a,n+i),t.closePath()}}),IY=je.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,a=e.width/2,i=e.height/2;t.moveTo(r,n-i),t.lineTo(r+a,n),t.lineTo(r,n+i),t.lineTo(r-a,n),t.closePath()}}),RY=je.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.x,n=e.y,a=e.width/5*3,i=Math.max(a,e.height),o=a/2,l=o*o/(i-o),c=n-i+o+l,u=Math.asin(l/o),f=Math.cos(u)*o,d=Math.sin(u),h=Math.cos(u),p=o*.6,m=o*.7;t.moveTo(r-f,c+l),t.arc(r,c,o,Math.PI-u,Math.PI*2+u),t.bezierCurveTo(r+f-d*p,c+l+h*p,r,n-m,r,n),t.bezierCurveTo(r,n-m,r-f+d*p,c+l+h*p,r-f,c+l),t.closePath()}}),VY=je.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.height,n=e.width,a=e.x,i=e.y,o=n/3*2;t.moveTo(a,i),t.lineTo(a+o,i+r),t.lineTo(a,i+r/4*3),t.lineTo(a-o,i+r),t.lineTo(a,i),t.closePath()}}),FY={line:la,rect:it,roundRect:it,square:it,circle:Am,diamond:IY,pin:RY,arrow:VY,triangle:BY},zY={line:function(t,e,r,n,a){a.x1=t,a.y1=e+n/2,a.x2=t+r,a.y2=e+n/2},rect:function(t,e,r,n,a){a.x=t,a.y=e,a.width=r,a.height=n},roundRect:function(t,e,r,n,a){a.x=t,a.y=e,a.width=r,a.height=n,a.r=Math.min(r,n)/4},square:function(t,e,r,n,a){var i=Math.min(r,n);a.x=t,a.y=e,a.width=i,a.height=i},circle:function(t,e,r,n,a){a.cx=t+r/2,a.cy=e+n/2,a.r=Math.min(r,n)/2},diamond:function(t,e,r,n,a){a.cx=t+r/2,a.cy=e+n/2,a.width=r,a.height=n},pin:function(t,e,r,n,a){a.x=t+r/2,a.y=e+n/2,a.width=r,a.height=n},arrow:function(t,e,r,n,a){a.x=t+r/2,a.y=e+n/2,a.width=r,a.height=n},triangle:function(t,e,r,n,a){a.cx=t+r/2,a.cy=e+n/2,a.width=r,a.height=n}},xv={};z(FY,function(t,e){xv[e]=new t});var HY=je.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,r){var n=bu(t,e,r),a=this.shape;return a&&a.symbolType==="pin"&&e.position==="inside"&&(n.y=r.y+r.height*.4),n},buildPath:function(t,e,r){var n=e.symbolType;if(n!=="none"){var a=xv[n];a||(n="rect",a=xv[n]),zY[n](e.x,e.y,e.width,e.height,a.shape),a.buildPath(t,a.shape,r)}}});function UY(t,e){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=t,r.fill=e||"#fff",r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=t:r.fill=t,this.markRedraw()}}function fn(t,e,r,n,a,i,o){var l=t.indexOf("empty")===0;l&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var c;return t.indexOf("image://")===0?c=MS(t.slice(8),new Ke(e,r,n,a),o?"center":"cover"):t.indexOf("path://")===0?c=Rm(t.slice(7),{},new Ke(e,r,n,a),o?"center":"cover"):c=new HY({shape:{symbolType:t,x:e,y:r,width:n,height:a}}),c.__isEmptyBrush=l,c.setColor=UY,i&&c.setColor(i),c}function M2(t){return se(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function Cv(t,e){if(t!=null)return se(t)||(t=[t,t]),[ze(t[0],e[0])||0,ze(Ae(t[1],t[0]),e[1])||0]}function jY(t,e,r){var n=e.x==null?0:e.x,a=e.x2==null?1:e.x2,i=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*r.width+r.x,a=a*r.width+r.x,i=i*r.height+r.y,o=o*r.height+r.y),n=isNaN(n)?0:n,a=isNaN(a)?1:a,i=isNaN(i)?0:i,o=isNaN(o)?0:o;var l=t.createLinearGradient(n,i,a,o);return l}function YY(t,e,r){var n=r.width,a=r.height,i=Math.min(n,a),o=e.x==null?.5:e.x,l=e.y==null?.5:e.y,c=e.r==null?.5:e.r;e.global||(o=o*n+r.x,l=l*a+r.y,c=c*i);var u=t.createRadialGradient(o,l,0,o,l,c);return u}function kv(t,e,r){for(var n=e.type==="radial"?YY(t,e,r):jY(t,e,r),a=e.colorStops,i=0;i<a.length;i++)n.addColorStop(a[i].offset,a[i].color);return n}function GY(t,e){if(t===e||!t&&!e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!0;return!1}function kf(t){return parseInt(t,10)}function To(t,e,r){var n=["width","height"][e],a=["clientWidth","clientHeight"][e],i=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(r[n]!=null&&r[n]!=="auto")return parseFloat(r[n]);var l=document.defaultView.getComputedStyle(t);return(t[a]||kf(l[n])||kf(t.style[n]))-(kf(l[i])||0)-(kf(l[o])||0)|0}function WY(t,e){return!t||t==="solid"||!(e>0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:We(t)?[t]:se(t)?t:null}function Tv(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&WY(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var a=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;a&&a!==1&&(r=he(r,function(i){return i/a}),n/=a)}return[r,n]}var ZY=new An(!0);function Tf(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function $2(t){return typeof t=="string"&&t!=="none"}function Mf(t){var e=t.fill;return e!=null&&e!=="none"}function N2(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function E2(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function Mv(t,e,r){var n=rm(e.image,e.__image,r);if(Tu(n)){var a=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&a&&a.setTransform){var i=new DOMMatrix;i.translateSelf(e.x||0,e.y||0),i.rotateSelf(0,0,(e.rotation||0)*Xc),i.scaleSelf(e.scaleX||1,e.scaleY||1),a.setTransform(i)}return a}}function qY(t,e,r,n){var a,i=Tf(r),o=Mf(r),l=r.strokePercent,c=l<1,u=!e.path;(!e.silent||c)&&u&&e.createPathProxy();var f=e.path||ZY,d=e.__dirty;if(!n){var h=r.fill,p=r.stroke,m=o&&!!h.colorStops,v=i&&!!p.colorStops,g=o&&!!h.image,y=i&&!!p.image,_=void 0,w=void 0,S=void 0,x=void 0,b=void 0;(m||v)&&(b=e.getBoundingRect()),m&&(_=d?kv(t,h,b):e.__canvasFillGradient,e.__canvasFillGradient=_),v&&(w=d?kv(t,p,b):e.__canvasStrokeGradient,e.__canvasStrokeGradient=w),g&&(S=d||!e.__canvasFillPattern?Mv(t,h,e):e.__canvasFillPattern,e.__canvasFillPattern=S),y&&(x=d||!e.__canvasStrokePattern?Mv(t,p,e):e.__canvasStrokePattern,e.__canvasStrokePattern=S),m?t.fillStyle=_:g&&(S?t.fillStyle=S:o=!1),v?t.strokeStyle=w:y&&(x?t.strokeStyle=x:i=!1)}var C=e.getGlobalScale();f.setScale(C[0],C[1],e.segmentIgnoreThreshold);var k,$;t.setLineDash&&r.lineDash&&(a=Tv(e),k=a[0],$=a[1]);var N=!0;(u||d&Ki)&&(f.setDPR(t.dpr),c?f.setContext(null):(f.setContext(t),N=!1),f.reset(),e.buildPath(f,e.shape,n),f.toStatic(),e.pathUpdated()),N&&f.rebuildPath(t,c?l:1),k&&(t.setLineDash(k),t.lineDashOffset=$),n||(r.strokeFirst?(i&&E2(t,r),o&&N2(t,r)):(o&&N2(t,r),i&&E2(t,r))),k&&t.setLineDash([])}function XY(t,e,r){var n=e.__image=rm(r.image,e.__image,e,e.onload);if(!(!n||!Tu(n))){var a=r.x||0,i=r.y||0,o=e.getWidth(),l=e.getHeight(),c=n.width/n.height;if(o==null&&l!=null?o=l*c:l==null&&o!=null?l=o/c:o==null&&l==null&&(o=n.width,l=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,f=r.sy||0;t.drawImage(n,u,f,r.sWidth,r.sHeight,a,i,o,l)}else if(r.sx&&r.sy){var u=r.sx,f=r.sy,d=o-u,h=l-f;t.drawImage(n,u,f,d,h,a,i,o,l)}else t.drawImage(n,a,i,o,l)}}function KY(t,e,r){var n,a=r.text;if(a!=null&&(a+=""),a){t.font=r.font||Kn,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var i=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=Tv(e),i=n[0],o=n[1]),i&&(t.setLineDash(i),t.lineDashOffset=o),r.strokeFirst?(Tf(r)&&t.strokeText(a,r.x,r.y),Mf(r)&&t.fillText(a,r.x,r.y)):(Mf(r)&&t.fillText(a,r.x,r.y),Tf(r)&&t.strokeText(a,r.x,r.y)),i&&t.setLineDash([])}}var A2=["shadowBlur","shadowOffsetX","shadowOffsetY"],D2=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function O2(t,e,r,n,a){var i=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){qt(t,a),i=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?Ya.opacity:o}(n||e.blend!==r.blend)&&(i||(qt(t,a),i=!0),t.globalCompositeOperation=e.blend||Ya.blend);for(var l=0;l<A2.length;l++){var c=A2[l];(n||e[c]!==r[c])&&(i||(qt(t,a),i=!0),t[c]=t.dpr*(e[c]||0))}return(n||e.shadowColor!==r.shadowColor)&&(i||(qt(t,a),i=!0),t.shadowColor=e.shadowColor||Ya.shadowColor),i}function L2(t,e,r,n,a){var i=ul(e,a.inHover),o=n?null:r&&ul(r,a.inHover)||{};if(i===o)return!1;var l=O2(t,i,o,n,a);if((n||i.fill!==o.fill)&&(l||(qt(t,a),l=!0),$2(i.fill)&&(t.fillStyle=i.fill)),(n||i.stroke!==o.stroke)&&(l||(qt(t,a),l=!0),$2(i.stroke)&&(t.strokeStyle=i.stroke)),(n||i.opacity!==o.opacity)&&(l||(qt(t,a),l=!0),t.globalAlpha=i.opacity==null?1:i.opacity),e.hasStroke()){var c=i.lineWidth,u=c/(i.strokeNoScale&&e.getLineScale?e.getLineScale():1);t.lineWidth!==u&&(l||(qt(t,a),l=!0),t.lineWidth=u)}for(var f=0;f<D2.length;f++){var d=D2[f],h=d[0];(n||i[h]!==o[h])&&(l||(qt(t,a),l=!0),t[h]=i[h]||d[1])}return l}function JY(t,e,r,n,a){return O2(t,ul(e,a.inHover),r&&ul(r,a.inHover),n,a)}function P2(t,e){var r=e.transform,n=t.dpr||1;r?t.setTransform(n*r[0],n*r[1],n*r[2],n*r[3],n*r[4],n*r[5]):t.setTransform(n,0,0,n,0,0)}function QY(t,e,r){for(var n=!1,a=0;a<t.length;a++){var i=t[a];n=n||i.isZeroArea(),P2(e,i),e.beginPath(),i.buildPath(e,i.shape),e.clip()}r.allClipped=n}function eG(t,e){return t&&e?t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||t[4]!==e[4]||t[5]!==e[5]:!(!t&&!e)}var B2=1,I2=2,R2=3,V2=4;function tG(t){var e=Mf(t),r=Tf(t);return!(t.lineDash||!(+e^+r)||e&&typeof t.fill!="string"||r&&typeof t.stroke!="string"||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}function qt(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function ul(t,e){return e&&t.__hoverStyle||t.style}function F2(t,e){di(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function di(t,e,r,n){var a=e.transform;if(!e.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){e.__dirty&=~er,e.__isRendered=!1;return}var i=e.__clipPaths,o=r.prevElClipPaths,l=!1,c=!1;if((!o||GY(i,o))&&(o&&o.length&&(qt(t,r),t.restore(),c=l=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),i&&i.length&&(qt(t,r),t.save(),QY(i,t,r),l=!0),r.prevElClipPaths=i),r.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=r.prevEl;u||(c=l=!0);var f=e instanceof je&&e.autoBatch&&tG(e.style);l||eG(a,u.transform)?(qt(t,r),P2(t,e)):f||qt(t,r);var d=ul(e,r.inHover);e instanceof je?(r.lastDrawType!==B2&&(c=!0,r.lastDrawType=B2),L2(t,e,u,c,r),(!f||!r.batchFill&&!r.batchStroke)&&t.beginPath(),qY(t,e,d,f),f&&(r.batchFill=d.fill||"",r.batchStroke=d.stroke||"")):e instanceof Ou?(r.lastDrawType!==R2&&(c=!0,r.lastDrawType=R2),L2(t,e,u,c,r),KY(t,e,d)):e instanceof Ir?(r.lastDrawType!==I2&&(c=!0,r.lastDrawType=I2),JY(t,e,u,c,r),XY(t,e,d)):e.getTemporalDisplayables&&(r.lastDrawType!==V2&&(c=!0,r.lastDrawType=V2),rG(t,e,r)),f&&n&&qt(t,r),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),r.prevEl=e,e.__dirty=0,e.__isRendered=!0}function rG(t,e,r){var n=e.getDisplayables(),a=e.getTemporalDisplayables();t.save();var i={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover},o,l;for(o=e.getCursor(),l=n.length;o<l;o++){var c=n[o];c.beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),di(t,c,i,o===l-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),i.prevEl=c}for(var u=0,f=a.length;u<f;u++){var c=a[u];c.beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),di(t,c,i,u===f-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),i.prevEl=c}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}var $v=new PY,z2=new ws(100),H2=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function U2(t,e){if(t==="none")return null;var r=e.getDevicePixelRatio(),n=e.getZr(),a=n.painter.type==="svg";t.dirty&&$v.delete(t);var i=$v.get(t);if(i)return i;var o=Ue(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var l={repeat:"repeat"};return c(l),l.rotation=o.rotation,l.scaleX=l.scaleY=a?1:1/r,$v.set(t,l),t.dirty=!1,l;function c(u){for(var f=[r],d=!0,h=0;h<H2.length;++h){var p=o[H2[h]];if(p!=null&&!se(p)&&!ve(p)&&!We(p)&&typeof p!="boolean"){d=!1;break}f.push(p)}var m;if(d){m=f.join(",")+(a?"-svg":"");var v=z2.get(m);v&&(a?u.svgElement=v:u.image=v)}var g=Y2(o.dashArrayX),y=nG(o.dashArrayY),_=j2(o.symbol),w=aG(g),S=G2(y),x=!a&&Jn.createCanvas(),b=a&&{tag:"g",attrs:{},key:"dcl",children:[]},C=$(),k;x&&(x.width=C.width*r,x.height=C.height*r,k=x.getContext("2d")),N(),d&&z2.put(m,x||b),u.image=x,u.svgElement=b,u.svgWidth=C.width,u.svgHeight=C.height;function $(){for(var A=1,L=0,M=w.length;L<M;++L)A=Qw(A,w[L]);for(var O=1,L=0,M=_.length;L<M;++L)O=Qw(O,_[L].length);A*=O;var T=S*w.length*_.length;return{width:Math.max(1,Math.min(A,o.maxTileWidth)),height:Math.max(1,Math.min(T,o.maxTileHeight))}}function N(){k&&(k.clearRect(0,0,x.width,x.height),o.backgroundColor&&(k.fillStyle=o.backgroundColor,k.fillRect(0,0,x.width,x.height)));for(var A=0,L=0;L<y.length;++L)A+=y[L];if(A<=0)return;for(var M=-S,O=0,T=0,E=0;M<C.height;){if(O%2==0){for(var D=T/2%_.length,P=0,I=0,V=0;P<C.width*2;){for(var F=0,L=0;L<g[E].length;++L)F+=g[E][L];if(F<=0)break;if(I%2==0){var H=(1-o.symbolSize)*.5,Y=P+g[E][I]*H,Q=M+y[O]*H,ae=g[E][I]*o.symbolSize,le=y[O]*o.symbolSize,ye=V/2%_[D].length;de(Y,Q,ae,le,_[D][ye])}P+=g[E][I],++V,++I,I===g[E].length&&(I=0)}++E,E===g.length&&(E=0)}M+=y[O],++T,++O,O===y.length&&(O=0)}function de(Z,K,J,oe,Ce){var Se=a?1:r,$e=fn(Ce,Z*Se,K*Se,J*Se,oe*Se,o.color,o.symbolKeepAspect);if(a){var ge=n.painter.renderOneToVNode($e);ge&&b.children.push(ge)}else F2(k,$e)}}}}function j2(t){if(!t||t.length===0)return[["rect"]];if(ve(t))return[[t]];for(var e=!0,r=0;r<t.length;++r)if(!ve(t[r])){e=!1;break}if(e)return j2([t]);for(var n=[],r=0;r<t.length;++r)ve(t[r])?n.push([t[r]]):n.push(t[r]);return n}function Y2(t){if(!t||t.length===0)return[[0,0]];if(We(t)){var e=Math.ceil(t);return[[e,e]]}for(var r=!0,n=0;n<t.length;++n)if(!We(t[n])){r=!1;break}if(r)return Y2([t]);for(var a=[],n=0;n<t.length;++n)if(We(t[n])){var e=Math.ceil(t[n]);a.push([e,e])}else{var e=he(t[n],function(l){return Math.ceil(l)});e.length%2==1?a.push(e.concat(e)):a.push(e)}return a}function nG(t){if(!t||typeof t=="object"&&t.length===0)return[0,0];if(We(t)){var e=Math.ceil(t);return[e,e]}var r=he(t,function(n){return Math.ceil(n)});return t.length%2?r.concat(r):r}function aG(t){return he(t,function(e){return G2(e)})}function G2(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return t.length%2==1?e*2:e}function iG(t,e){t.eachRawSeries(function(r){if(!t.isSeriesFiltered(r)){var n=r.getData();n.hasItemVisual()&&n.each(function(o){var l=n.getItemVisual(o,"decal");if(l){var c=n.ensureUniqueItemVisual(o,"style");c.decal=U2(l,e)}});var a=n.getVisual("decal");if(a){var i=n.getVisual("style");i.decal=U2(a,e)}}})}var oG=new Jr,Ur=oG,W2={};function sG(t,e){W2[t]=e}function lG(t){return W2[t]}var cG=typeof window!="undefined",uG=1,fG=800,dG=900,hG=1e3,pG=2e3,mG=5e3,Z2=1e3,vG=1100,Nv=2e3,q2=3e3,gG=4e3,$f=4500,yG=4600,_G=5e3,wG=6e3,X2=7e3,bG={PROCESSOR:{FILTER:hG,SERIES_FILTER:fG,STATISTIC:mG},VISUAL:{LAYOUT:Z2,PROGRESSIVE_LAYOUT:vG,GLOBAL:Nv,CHART:q2,POST_CHART_LAYOUT:yG,COMPONENT:gG,BRUSH:_G,CHART_ITEM:$f,ARIA:wG,DECAL:X2}},Dt="__flagInMainProcess",Xt="__pendingUpdate",Ev="__needsUpdateStatus",K2=/^[a-zA-Z0-9_]+$/,Av="__connectUpdateStatus",J2=0,SG=1,xG=2;function Q2(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.isDisposed()){nr(this.id);return}return tC(this,t,e)}}function eC(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return tC(this,t,e)}}function tC(t,e,r){return r[0]=r[0]&&r[0].toLowerCase(),Jr.prototype[e].apply(t,r)}var rC=function(t){me(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Jr),nC=rC.prototype;nC.on=eC("on"),nC.off=eC("off");var Mo,Dv,Nf,da,Ov,Lv,Pv,fl,dl,aC,iC,Bv,oC,Ef,sC,lC,Cr,cC,uC=function(t){me(e,t);function e(r,n,a){var i=t.call(this,new TY)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],a=a||{},ve(n)&&(n=fC[n]),i._dom=r;var o="canvas",l=!1,c=i._zr=jw(r,{renderer:a.renderer||o,devicePixelRatio:a.devicePixelRatio,width:a.width,height:a.height,ssr:a.ssr,useDirtyRect:a.useDirtyRect==null?l:a.useDirtyRect});i._ssr=a.ssr,i._throttledZrFlush=_v(Be(c.flush,c),17),n=Te(n),n&&Ex(n,!0),i._theme=n,i._locale=$U(a.locale||US),i._coordSysMgr=new mf;var u=i._api=sC(i);function f(d,h){return d.__prio-h.__prio}return Kc(Df,f),Kc(Rv,f),i._scheduler=new w2(i,u,Rv,Df),i._messageCenter=new rC,i._initEvents(),i.resize=Be(i.resize,i),c.animation.on("frame",i._onframe,i),aC(c,i),iC(c,i),Kh(i),i}return e.prototype._onframe=function(){if(!this._disposed){cC(this);var r=this._scheduler;if(this[Xt]){var n=this[Xt].silent;this[Dt]=!0;try{Mo(this),da.update.call(this,null,this[Xt].updateParams)}catch(c){throw this[Dt]=!1,this[Xt]=null,c}this._zr.flush(),this[Dt]=!1,this[Xt]=null,fl.call(this,n),dl.call(this,n)}else if(r.unfinished){var a=uG,i=this._model,o=this._api;r.unfinished=!1;do{var l=+new Date;r.performSeriesTasks(i),r.performDataProcessorTasks(i),Lv(this,i),r.performVisualTasks(i),Ef(this,this._model,o,"remain",{}),a-=+new Date-l}while(a>0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,n,a){if(!this[Dt]){if(this._disposed){nr(this.id);return}var i,o,l;if(_e(n)&&(a=n.lazyUpdate,i=n.silent,o=n.replaceMerge,l=n.transition,n=n.notMerge),this[Dt]=!0,!this._model||n){var c=new uj(this._api),u=this._theme,f=this._model=new Sx;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,c)}this._model.setOption(r,{replaceMerge:o},Vv);var d={seriesTransition:l,optionChanged:!0};if(a)this[Xt]={silent:i,updateParams:d},this[Dt]=!1,this.getZr().wakeUp();else{try{Mo(this),da.update.call(this,null,d)}catch(h){throw this[Xt]=null,this[Dt]=!1,h}this._ssr||this._zr.flush(),this[Xt]=null,this[Dt]=!1,fl.call(this,i),dl.call(this,i)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||cG&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){if(!!Pe.svgSupported){var r=this._zr,n=r.storage.getDisplayList();return z(n,function(a){a.stopAnimation(null,!0)}),r.painter.toDataURL()}},e.prototype.getDataURL=function(r){if(this._disposed){nr(this.id);return}r=r||{};var n=r.excludeComponents,a=this._model,i=[],o=this;z(n,function(c){a.eachComponent({mainType:c},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(i.push(f),f.group.ignore=!0)})});var l=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return z(i,function(c){c.group.ignore=!1}),l},e.prototype.getConnectedDataURL=function(r){if(this._disposed){nr(this.id);return}var n=r.type==="svg",a=this.group,i=Math.min,o=Math.max,l=1/0;if(dC[a]){var c=l,u=l,f=-l,d=-l,h=[],p=r&&r.pixelRatio||this.getDevicePixelRatio();z(pl,function(w,S){if(w.group===a){var x=n?w.getZr().painter.getSvgDom().innerHTML:w.renderToCanvas(Te(r)),b=w.getDom().getBoundingClientRect();c=i(b.left,c),u=i(b.top,u),f=o(b.right,f),d=o(b.bottom,d),h.push({dom:x,left:b.left,top:b.top})}}),c*=p,u*=p,f*=p,d*=p;var m=f-c,v=d-u,g=Jn.createCanvas(),y=jw(g,{renderer:n?"svg":"canvas"});if(y.resize({width:m,height:v}),n){var _="";return z(h,function(w){var S=w.left-c,x=w.top-u;_+='<g transform="translate('+S+","+x+')">'+w.dom+"</g>"}),y.painter.getSvgRoot().innerHTML=_,r.connectedBackgroundColor&&y.painter.setBackgroundColor(r.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return r.connectedBackgroundColor&&y.add(new it({shape:{x:0,y:0,width:m,height:v},style:{fill:r.connectedBackgroundColor}})),z(h,function(w){var S=new Ir({style:{x:w.left*p-c,y:w.top*p-u,image:w.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n){return Ov(this,"convertToPixel",r,n)},e.prototype.convertFromPixel=function(r,n){return Ov(this,"convertFromPixel",r,n)},e.prototype.containPixel=function(r,n){if(this._disposed){nr(this.id);return}var a=this._model,i,o=Jp(a,r);return z(o,function(l,c){c.indexOf("Models")>=0&&z(l,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)i=i||!!f.containPoint(n);else if(c==="seriesModels"){var d=this._chartsMap[u.__viewId];d&&d.containPoint&&(i=i||d.containPoint(n,u))}},this)},this),!!i},e.prototype.getVisual=function(r,n){var a=this._model,i=Jp(a,r,{defaultMainType:"series"}),o=i.seriesModel,l=o.getData(),c=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?l.indexOfRawIndex(i.dataIndex):null;return c!=null?T2(l,c,n):Sv(l,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;z(CG,function(n){var a=function(i){var o=r.getModel(),l=i.target,c,u=n==="globalout";if(u?c={}:l&&cl(l,function(m){var v=He(m);if(v&&v.dataIndex!=null){var g=v.dataModel||o.getSeriesByIndex(v.seriesIndex);return c=g&&g.getDataParams(v.dataIndex,v.dataType)||{},!0}else if(v.eventData)return c=re({},v.eventData),!0},!0),c){var f=c.componentType,d=c.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",d=c.seriesIndex);var h=f&&d!=null&&o.getComponent(f,d),p=h&&r[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];c.event=i,c.type=n,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:c,model:h,view:p},r.trigger(n,c)}};a.zrEventfulCallAtLast=!0,r._zr.on(n,a,r)}),z(hl,function(n,a){r._messageCenter.on(a,function(i){this.trigger(a,i)},r)}),z(["selectchanged"],function(n){r._messageCenter.on(n,function(a){this.trigger(n,a)},r)}),AY(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){nr(this.id);return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){nr(this.id);return}this._disposed=!0;var r=this.getDom();r&&ib(this.getDom(),zv,"");var n=this,a=n._api,i=n._model;z(n._componentsViews,function(o){o.dispose(i,a)}),z(n._chartsViews,function(o){o.dispose(i,a)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete pl[n.id]},e.prototype.resize=function(r){if(!this[Dt]){if(this._disposed){nr(this.id);return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var a=n.resetOption("media"),i=r&&r.silent;this[Xt]&&(i==null&&(i=this[Xt].silent),a=!0,this[Xt]=null),this[Dt]=!0;try{a&&Mo(this),da.update.call(this,{type:"resize",animation:re({duration:0},r&&r.animation)})}catch(o){throw this[Dt]=!1,o}this[Dt]=!1,fl.call(this,i),dl.call(this,i)}}},e.prototype.showLoading=function(r,n){if(this._disposed){nr(this.id);return}if(_e(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!Fv[r]){var a=Fv[r](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)}},e.prototype.hideLoading=function(){if(this._disposed){nr(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=re({},r);return n.type=hl[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){nr(this.id);return}if(_e(n)||(n={silent:!!n}),!!Af[r.type]&&!!this._model){if(this[Dt]){this._pendingActions.push(r);return}var a=n.silent;Pv.call(this,r,a);var i=n.flush;i?this._zr.flush():i!==!1&&Pe.browser.weChat&&this._throttledZrFlush(),fl.call(this,a),dl.call(this,a)}},e.prototype.updateLabelLayout=function(){Ur.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){nr(this.id);return}var n=r.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);i.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){Mo=function(d){var h=d._scheduler;h.restorePipelines(d._model),h.prepareStageTasks(),Dv(d,!0),Dv(d,!1),h.plan()},Dv=function(d,h){for(var p=d._model,m=d._scheduler,v=h?d._componentsViews:d._chartsViews,g=h?d._componentsMap:d._chartsMap,y=d._zr,_=d._api,w=0;w<v.length;w++)v[w].__alive=!1;h?p.eachComponent(function(b,C){b!=="series"&&S(C)}):p.eachSeries(S);function S(b){var C=b.__requireNewView;b.__requireNewView=!1;var k="_ec_"+b.id+"_"+b.type,$=!C&&g[k];if(!$){var N=rn(b.type),A=h?Hr.getClass(N.main,N.sub):xr.getClass(N.sub);$=new A,$.init(p,_),g[k]=$,v.push($),y.add($.group)}b.__viewId=$.__id=k,$.__alive=!0,$.__model=b,$.group.__ecComponentInfo={mainType:b.mainType,index:b.componentIndex},!h&&m.prepareView($,b,p,_)}for(var w=0;w<v.length;){var x=v[w];x.__alive?w++:(!h&&x.renderTask.dispose(),y.remove(x.group),x.dispose(p,_),v.splice(w,1),g[x.__id]===x&&delete g[x.__id],x.__id=x.group.__ecComponentInfo=null)}},Nf=function(d,h,p,m,v){var g=d._model;if(g.setUpdatePayload(p),!m){z([].concat(d._componentsViews).concat(d._chartsViews),x);return}var y={};y[m+"Id"]=p[m+"Id"],y[m+"Index"]=p[m+"Index"],y[m+"Name"]=p[m+"Name"];var _={mainType:m,query:y};v&&(_.subType=v);var w=p.excludeSeriesId,S;w!=null&&(S=Le(),z(St(w),function(b){var C=Pr(b,null);C!=null&&S.set(C,!0)})),g&&g.eachComponent(_,function(b){var C=S&&S.get(b.id)!==null;if(!C)if(tS(p))if(b instanceof un)p.type===ei&&!p.notBlur&&!b.get(["emphasis","disabled"])&&oH(b,p,d._api);else{var k=Cm(b.mainType,b.componentIndex,p.name,d._api),$=k.focusSelf,N=k.dispatchers;p.type===ei&&$&&!p.notBlur&&xm(b.mainType,b.componentIndex,d._api),N&&z(N,function(A){p.type===ei?Fs(A):zs(A)})}else $m(p)&&b instanceof un&&(cH(b,p,d._api),Qb(b),Cr(d))},d),g&&g.eachComponent(_,function(b){var C=S&&S.get(b.id)!==null;C||x(d[m==="series"?"_chartsMap":"_componentsMap"][b.__viewId])},d);function x(b){b&&b.__alive&&b[h]&&b[h](b.__model,g,d._api,p)}},da={prepareAndUpdate:function(d){Mo(this),da.update.call(this,d,{optionChanged:d.newOption!=null})},update:function(d,h){var p=this._model,m=this._api,v=this._zr,g=this._coordSysMgr,y=this._scheduler;if(!!p){p.setUpdatePayload(d),y.restoreData(p,d),y.performSeriesTasks(p),g.create(p,m),y.performDataProcessorTasks(p,d),Lv(this,p),g.update(p,m),r(p),y.performVisualTasks(p,d),Bv(this,p,m,d,h);var _=p.get("backgroundColor")||"transparent",w=p.get("darkMode");v.setBackgroundColor(_),w!=null&&w!=="auto"&&v.setDarkMode(w),Ur.trigger("afterupdate",p,m)}},updateTransform:function(d){var h=this,p=this._model,m=this._api;if(!!p){p.setUpdatePayload(d);var v=[];p.eachComponent(function(y,_){if(y!=="series"){var w=h.getViewOfComponentModel(_);if(w&&w.__alive)if(w.updateTransform){var S=w.updateTransform(_,p,m,d);S&&S.update&&v.push(w)}else v.push(w)}});var g=Le();p.eachSeries(function(y){var _=h._chartsMap[y.__viewId];if(_.updateTransform){var w=_.updateTransform(y,p,m,d);w&&w.update&&g.set(y.uid,1)}else g.set(y.uid,1)}),r(p),this._scheduler.performVisualTasks(p,d,{setDirty:!0,dirtyMap:g}),Ef(this,p,m,d,{},g),Ur.trigger("afterupdate",p,m)}},updateView:function(d){var h=this._model;!h||(h.setUpdatePayload(d),xr.markUpdateMethod(d,"updateView"),r(h),this._scheduler.performVisualTasks(h,d,{setDirty:!0}),Bv(this,h,this._api,d,{}),Ur.trigger("afterupdate",h,this._api))},updateVisual:function(d){var h=this,p=this._model;!p||(p.setUpdatePayload(d),p.eachSeries(function(m){m.getData().clearAllVisual()}),xr.markUpdateMethod(d,"updateVisual"),r(p),this._scheduler.performVisualTasks(p,d,{visualType:"visual",setDirty:!0}),p.eachComponent(function(m,v){if(m!=="series"){var g=h.getViewOfComponentModel(v);g&&g.__alive&&g.updateVisual(v,p,h._api,d)}}),p.eachSeries(function(m){var v=h._chartsMap[m.__viewId];v.updateVisual(m,p,h._api,d)}),Ur.trigger("afterupdate",p,this._api))},updateLayout:function(d){da.update.call(this,d)}},Ov=function(d,h,p,m){if(d._disposed){nr(d.id);return}for(var v=d._model,g=d._coordSysMgr.getCoordinateSystems(),y,_=Jp(v,p),w=0;w<g.length;w++){var S=g[w];if(S[h]&&(y=S[h](v,_,m))!=null)return y}},Lv=function(d,h){var p=d._chartsMap,m=d._scheduler;h.eachSeries(function(v){m.updateStreamModes(v,p[v.__viewId])})},Pv=function(d,h){var p=this,m=this.getModel(),v=d.type,g=d.escapeConnect,y=Af[v],_=y.actionInfo,w=(_.update||"update").split(":"),S=w.pop(),x=w[0]!=null&&rn(w[0]);this[Dt]=!0;var b=[d],C=!1;d.batch&&(C=!0,b=he(d.batch,function(O){return O=Ue(re({},O),d),O.batch=null,O}));var k=[],$,N=$m(d),A=tS(d);if(A&&Jb(this._api),z(b,function(O){if($=y.action(O,p._model,p._api),$=$||re({},O),$.type=_.event||$.type,k.push($),A){var T=Qp(d),E=T.queryOptionMap,D=T.mainTypeSpecified,P=D?E.keys()[0]:"series";Nf(p,S,O,P),Cr(p)}else N?(Nf(p,S,O,"series"),Cr(p)):x&&Nf(p,S,O,x.main,x.sub)}),S!=="none"&&!A&&!N&&!x)try{this[Xt]?(Mo(this),da.update.call(this,d),this[Xt]=null):da[S].call(this,d)}catch(O){throw this[Dt]=!1,O}if(C?$={type:_.event||v,escapeConnect:g,batch:k}:$=k[0],this[Dt]=!1,!h){var L=this._messageCenter;if(L.trigger($.type,$),N){var M={type:"selectchanged",escapeConnect:g,selected:uH(m),isFromClick:d.isFromClick||!1,fromAction:d.type,fromActionPayload:d};L.trigger(M.type,M)}}},fl=function(d){for(var h=this._pendingActions;h.length;){var p=h.shift();Pv.call(this,p,d)}},dl=function(d){!d&&this.trigger("updated")},aC=function(d,h){d.on("rendered",function(p){h.trigger("rendered",p),d.animation.isFinished()&&!h[Xt]&&!h._scheduler.unfinished&&!h._pendingActions.length&&h.trigger("finished")})},iC=function(d,h){d.on("mouseover",function(p){var m=p.target,v=cl(m,Mm);v&&(sH(v,p,h._api),Cr(h))}).on("mouseout",function(p){var m=p.target,v=cl(m,Mm);v&&(lH(v,p,h._api),Cr(h))}).on("click",function(p){var m=p.target,v=cl(m,function(_){return He(_).dataIndex!=null},!0);if(v){var g=v.selected?"unselect":"select",y=He(v);h._api.dispatchAction({type:g,dataType:y.dataType,dataIndexInside:y.dataIndex,seriesIndex:y.seriesIndex,isFromClick:!0})}})};function r(d){d.clearColorPalette(),d.eachSeries(function(h){h.clearColorPalette()})}function n(d){var h=[],p=[],m=!1;if(d.eachComponent(function(_,w){var S=w.get("zlevel")||0,x=w.get("z")||0,b=w.getZLevelKey();m=m||!!b,(_==="series"?p:h).push({zlevel:S,z:x,idx:w.componentIndex,type:_,key:b})}),m){var v=h.concat(p),g,y;Kc(v,function(_,w){return _.zlevel===w.zlevel?_.z-w.z:_.zlevel-w.zlevel}),z(v,function(_){var w=d.getComponent(_.type,_.idx),S=_.zlevel,x=_.key;g!=null&&(S=Math.max(g,S)),x?(S===g&&x!==y&&S++,y=x):y&&(S===g&&S++,y=""),g=S,w.setZLevel(S)})}}Bv=function(d,h,p,m,v){n(h),oC(d,h,p,m,v),z(d._chartsViews,function(g){g.__alive=!1}),Ef(d,h,p,m,v),z(d._chartsViews,function(g){g.__alive||g.remove(h,p)})},oC=function(d,h,p,m,v,g){z(g||d._componentsViews,function(y){var _=y.__model;u(_,y),y.render(_,h,p,m),l(_,y),f(_,y)})},Ef=function(d,h,p,m,v,g){var y=d._scheduler;v=re(v||{},{updatedSeries:h.getSeries()}),Ur.trigger("series:beforeupdate",h,p,v);var _=!1;h.eachSeries(function(w){var S=d._chartsMap[w.__viewId];S.__alive=!0;var x=S.renderTask;y.updatePayload(x,m),u(w,S),g&&g.get(w.uid)&&x.dirty(),x.perform(y.getPerformArgs(x))&&(_=!0),S.group.silent=!!w.get("silent"),o(w,S),Qb(w)}),y.unfinished=_||y.unfinished,Ur.trigger("series:layoutlabels",h,p,v),Ur.trigger("series:transition",h,p,v),h.eachSeries(function(w){var S=d._chartsMap[w.__viewId];l(w,S),f(w,S)}),i(d,h),Ur.trigger("series:afterupdate",h,p,v)},Cr=function(d){d[Ev]=!0,d.getZr().wakeUp()},cC=function(d){!d[Ev]||(d.getZr().storage.traverse(function(h){Ws(h)||a(h)}),d[Ev]=!1)};function a(d){for(var h=[],p=d.currentStates,m=0;m<p.length;m++){var v=p[m];v==="emphasis"||v==="blur"||v==="select"||h.push(v)}d.selected&&d.states.select&&h.push("select"),d.hoverState===Pu&&d.states.emphasis?h.push("emphasis"):d.hoverState===Lu&&d.states.blur&&h.push("blur"),d.useStates(h)}function i(d,h){var p=d._zr,m=p.storage,v=0;m.traverse(function(g){g.isGroup||v++}),v>h.get("hoverLayerThreshold")&&!Pe.node&&!Pe.worker&&h.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=d._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function o(d,h){var p=d.get("blendMode")||null;h.eachRendered(function(m){m.isGroup||(m.style.blend=p)})}function l(d,h){if(!d.preventAutoZ){var p=d.get("z")||0,m=d.get("zlevel")||0;h.eachRendered(function(v){return c(v,p,m,-1/0),!0})}}function c(d,h,p,m){var v=d.getTextContent(),g=d.getTextGuideLine(),y=d.isGroup;if(y)for(var _=d.childrenRef(),w=0;w<_.length;w++)m=Math.max(c(_[w],h,p,m),m);else d.z=h,d.zlevel=p,m=Math.max(d.z2,m);if(v&&(v.z=h,v.zlevel=p,isFinite(m)&&(v.z2=m+2)),g){var S=d.textGuideLineConfig;g.z=h,g.zlevel=p,isFinite(m)&&(g.z2=m+(S&&S.showAbove?1:-1))}return m}function u(d,h){h.eachRendered(function(p){if(!Ws(p)){var m=p.getTextContent(),v=p.getTextGuideLine();p.stateTransition&&(p.stateTransition=null),m&&m.stateTransition&&(m.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),p.hasState()?(p.prevStates=p.currentStates,p.clearStates()):p.prevStates&&(p.prevStates=null)}})}function f(d,h){var p=d.getModel("stateAnimation"),m=d.isAnimationEnabled(),v=p.get("duration"),g=v>0?{duration:v,delay:p.get("delay"),easing:p.get("easing")}:null;h.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Ws(y))return;if(y instanceof je&&mH(y),y.__dirty){var _=y.prevStates;_&&y.useStates(_)}if(m){y.stateTransition=g;var w=y.getTextContent(),S=y.getTextGuideLine();w&&(w.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&a(y)}})}sC=function(d){return new(function(h){me(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.prototype.getCoordinateSystems=function(){return d._coordSysMgr.getCoordinateSystems()},p.prototype.getComponentByElement=function(m){for(;m;){var v=m.__ecComponentInfo;if(v!=null)return d._model.getComponent(v.mainType,v.index);m=m.parent}},p.prototype.enterEmphasis=function(m,v){Fs(m,v),Cr(d)},p.prototype.leaveEmphasis=function(m,v){zs(m,v),Cr(d)},p.prototype.enterBlur=function(m){Zb(m),Cr(d)},p.prototype.leaveBlur=function(m){bm(m),Cr(d)},p.prototype.enterSelect=function(m){qb(m),Cr(d)},p.prototype.leaveSelect=function(m){Xb(m),Cr(d)},p.prototype.getModel=function(){return d.getModel()},p.prototype.getViewOfComponentModel=function(m){return d.getViewOfComponentModel(m)},p.prototype.getViewOfSeriesModel=function(m){return d.getViewOfSeriesModel(m)},p}(xx))(d)},lC=function(d){function h(p,m){for(var v=0;v<p.length;v++){var g=p[v];g[Av]=m}}z(hl,function(p,m){d._messageCenter.on(m,function(v){if(dC[d.group]&&d[Av]!==J2){if(v&&v.escapeConnect)return;var g=d.makeActionFromEvent(v),y=[];z(pl,function(_){_!==d&&_.group===d.group&&y.push(_)}),h(y,J2),z(y,function(_){_[Av]!==SG&&_.dispatchAction(g)}),h(y,xG)}})})}}(),e}(Jr),Iv=uC.prototype;Iv.on=Q2("on"),Iv.off=Q2("off"),Iv.one=function(t,e,r){var n=this;function a(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];e&&e.apply&&e.apply(this,i),n.off(t,a)}this.on.call(this,t,a,r)};var CG=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function nr(t){}var Af={},hl={},Rv=[],Vv=[],Df=[],fC={},Fv={},pl={},dC={},kG=+new Date-0,zv="_echarts_instance_";function TG(t,e,r){var n=!(r&&r.ssr);if(n){var a=MG(t);if(a)return a}var i=new uC(t,e,r);return i.id="ec_"+kG++,pl[i.id]=i,n&&ib(t,zv,i.id),lC(i),Ur.trigger("afterinit",i),i}function MG(t){return pl[ZF(t,zv)]}function hC(t,e){fC[t]=e}function pC(t){Ge(Vv,t)<0&&Vv.push(t)}function mC(t,e){Uv(Rv,t,e,pG)}function $G(t){Hv("afterinit",t)}function NG(t){Hv("afterupdate",t)}function Hv(t,e){Ur.on(t,e)}function $o(t,e,r){Ee(e)&&(r=e,e="");var n=_e(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,!hl[e]&&(cr(K2.test(n)&&K2.test(e)),Af[n]||(Af[n]={action:r,actionInfo:t}),hl[e]=n)}function EG(t,e){mf.register(t,e)}function AG(t,e){Uv(Df,t,e,Z2,"layout")}function hi(t,e){Uv(Df,t,e,q2,"visual")}var vC=[];function Uv(t,e,r,n,a){if((Ee(e)||_e(e))&&(r=e,e=n),!(Ge(vC,r)>=0)){vC.push(r);var i=w2.wrapStageHandler(r,a);i.__prio=e,i.__raw=r,t.push(i)}}function gC(t,e){Fv[t]=e}function DG(t,e,r){var n=lG("registerMap");n&&n(t,e,r)}var OG=Pj;hi(Nv,uY),hi($f,fY),hi($f,dY),hi(Nv,MY),hi($f,$Y),hi(X2,iG),pC(Ex),mC(dG,yj),gC("default",hY),$o({type:ei,event:ei,update:ei},Pt),$o({type:Iu,event:Iu,update:Iu},Pt),$o({type:Rs,event:Rs,update:Rs},Pt),$o({type:Ru,event:Ru,update:Ru},Pt),$o({type:Vs,event:Vs,update:Vs},Pt),hC("light",CY),hC("dark",kY);function ml(t){return t==null?0:t.length||1}function yC(t){return t}var LG=function(){function t(e,r,n,a,i,o){this._old=e,this._new=r,this._oldKeyGetter=n||yC,this._newKeyGetter=a||yC,this.context=i,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},a=new Array(e.length),i=new Array(r.length);this._initIndexMap(e,null,a,"_oldKeyGetter"),this._initIndexMap(r,n,i,"_newKeyGetter");for(var o=0;o<e.length;o++){var l=a[o],c=n[l],u=ml(c);if(u>1){var f=c.shift();c.length===1&&(n[l]=c[0]),this._update&&this._update(f,o)}else u===1?(n[l]=null,this._update&&this._update(c,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},a={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(r,a,o,"_newKeyGetter");for(var l=0;l<i.length;l++){var c=i[l],u=n[c],f=a[c],d=ml(u),h=ml(f);if(d>1&&h===1)this._updateManyToOne&&this._updateManyToOne(f,u),a[c]=null;else if(d===1&&h>1)this._updateOneToMany&&this._updateOneToMany(f,u),a[c]=null;else if(d===1&&h===1)this._update&&this._update(f,u),a[c]=null;else if(d>1&&h>1)this._updateManyToMany&&this._updateManyToMany(f,u),a[c]=null;else if(d>1)for(var p=0;p<d;p++)this._remove&&this._remove(u[p]);else this._remove&&this._remove(u)}this._performRestAdd(o,a)},t.prototype._performRestAdd=function(e,r){for(var n=0;n<e.length;n++){var a=e[n],i=r[a],o=ml(i);if(o>1)for(var l=0;l<o;l++)this._add&&this._add(i[l]);else o===1&&this._add&&this._add(i);r[a]=null}},t.prototype._initIndexMap=function(e,r,n,a){for(var i=this._diffModeMultiple,o=0;o<e.length;o++){var l="_ec_"+this[a](e[o],o);if(i||(n[o]=l),!!r){var c=r[l],u=ml(c);u===0?(r[l]=o,i&&n.push(l)):u===1?r[l]=[c,o]:c.push(o)}}},t}(),PG=LG,BG=function(){function t(e,r){this._encode=e,this._schema=r}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function IG(t,e){var r={},n=r.encode={},a=Le(),i=[],o=[],l={};z(t.dimensions,function(h){var p=t.getDimensionInfo(h),m=p.coordDim;if(m){var v=p.coordDimIndex;jv(n,m)[v]=h,p.isExtraCoord||(a.set(m,1),VG(p.type)&&(i[0]=h),jv(l,m)[v]=t.getDimensionIndex(p.name)),p.defaultTooltip&&o.push(h)}lx.each(function(g,y){var _=jv(n,y),w=p.otherDims[y];w!=null&&w!==!1&&(_[w]=p.name)})});var c=[],u={};a.each(function(h,p){var m=n[p];u[p]=m[0],c=c.concat(m)}),r.dataDimsOnCoord=c,r.dataDimIndicesOnCoord=he(c,function(h){return t.getDimensionInfo(h).storeDimIndex}),r.encodeFirstDimNotExtra=u;var f=n.label;f&&f.length&&(i=f.slice());var d=n.tooltip;return d&&d.length?o=d.slice():o.length||(o=i.slice()),n.defaultedLabel=i,n.defaultedTooltip=o,r.userOutput=new BG(l,e),r}function jv(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function RG(t){return t==="category"?"ordinal":t==="time"?"time":"float"}function VG(t){return!(t==="ordinal"||t==="time")}var FG=function(){function t(e){this.otherDims={},e!=null&&re(this,e)}return t}(),Of=FG,zG=ct(),HG={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},_C=function(){function t(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(e){this._dimOmitted=e,!!e&&(this._dimNameMap||(this._dimNameMap=SC(this.source)))},t.prototype.getSourceDimensionIndex=function(e){return Ae(this._dimNameMap.get(e),-1)},t.prototype.getSourceDimension=function(e){var r=this.source.dimensionsDefine;if(r)return r[e]},t.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,r=Lx(this.source),n=!xC(e),a="",i=[],o=0,l=0;o<e;o++){var c=void 0,u=void 0,f=void 0,d=this.dimensions[l];if(d&&d.storeDimIndex===o)c=r?d.name:null,u=d.type,f=d.ordinalMeta,l++;else{var h=this.getSourceDimension(o);h&&(c=r?h.name:null,u=h.type)}i.push({property:c,type:u,ordinalMeta:f}),r&&c!=null&&(!d||!d.isCalculationCoord)&&(a+=n?c.replace(/\`/g,"`1").replace(/\$/g,"`2"):c),a+="$",a+=HG[u]||"f",f&&(a+=f.uid),a+="$"}var p=this.source,m=[p.seriesLayoutBy,p.startIndex,a].join("$$");return{dimensions:i,hash:m}},t.prototype.makeOutputDimensionNames=function(){for(var e=[],r=0,n=0;r<this._fullDimCount;r++){var a=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===r)i.isCalculationCoord||(a=i.name),n++;else{var o=this.getSourceDimension(r);o&&(a=o.name)}e.push(a)}return e},t.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t}();function wC(t){return t instanceof _C}function bC(t){for(var e=Le(),r=0;r<(t||[]).length;r++){var n=t[r],a=_e(n)?n.name:n;a!=null&&e.get(a)==null&&e.set(a,r)}return e}function SC(t){var e=zG(t);return e.dimNameMap||(e.dimNameMap=bC(t.dimensionsDefine))}function xC(t){return t>30}var vl=_e,ha=he,UG=typeof Int32Array=="undefined"?Array:Int32Array,jG="e\0\0",CC=-1,YG=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],GG=["_approximateExtent"],kC,Lf,gl,yl,Yv,Pf,Gv,WG=function(){function t(e,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,a=!1;wC(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(a=!0,n=e),n=n||["x","y"];for(var i={},o=[],l={},c=!1,u={},f=0;f<n.length;f++){var d=n[f],h=ve(d)?new Of({name:d}):d instanceof Of?d:new Of(d),p=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=p,h.coordDimIndex=0);var m=h.otherDims=h.otherDims||{};o.push(p),i[p]=h,u[p]!=null&&(c=!0),h.createInvertedIndices&&(l[p]=[]),m.itemName===0&&(this._nameDimIdx=f),m.itemId===0&&(this._idDimIdx=f),a&&(h.storeDimIndex=f)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(c),this.hostModel=r,this._invertedIndicesMap=l,this._dimOmitted){var v=this._dimIdxToName=Le();z(o,function(g){v.set(i[g].storeDimIndex,g)})}}return t.prototype.getDimension=function(e){var r=this._recognizeDimIndex(e);if(r==null)return e;if(r=e,!this._dimOmitted)return this.dimensions[r];var n=this._dimIdxToName.get(r);if(n!=null)return n;var a=this._schema.getSourceDimension(r);if(a)return a.name},t.prototype.getDimensionIndex=function(e){var r=this._recognizeDimIndex(e);if(r!=null)return r;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},t.prototype._recognizeDimIndex=function(e){if(We(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},t.prototype._getStoreDimIndex=function(e){var r=this.getDimensionIndex(e);return r},t.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},t.prototype._initGetDimensionInfo=function(e){var r=this._dimInfos;this._getDimInfo=e?function(n){return r.hasOwnProperty(n)?r[n]:void 0}:function(n){return r[n]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(e,r){var n=this._dimSummary;if(r==null)return n.encodeFirstDimNotExtra[e];var a=n.encode[e];return a?a[r]:null},t.prototype.mapDimensionsAll=function(e){var r=this._dimSummary,n=r.encode[e];return(n||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(e,r,n){var a=this,i;if(e instanceof fv&&(i=e),!i){var o=this.dimensions,l=av(e)||Ut(e)?new Ix(e,o.length):e;i=new fv;var c=ha(o,function(u){return{type:a._dimInfos[u].type,property:u}});i.initData(l,c,n)}this._store=i,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=IG(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(e){var r=this._store.appendData(e);this._doInit(r[0],r[1])},t.prototype.appendValues=function(e,r){var n=this._store.appendValues(e,r.length),a=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),r)for(var l=a;l<i;l++){var c=l-a;this._nameList[l]=r[c],o&&Gv(this,l)}},t.prototype._updateOrdinalMeta=function(){for(var e=this._store,r=this.dimensions,n=0;n<r.length;n++){var a=this._dimInfos[r[n]];a.ordinalMeta&&e.collectOrdinalMeta(a.storeDimIndex,a.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==ua&&!e.fillStorage},t.prototype._doInit=function(e,r){if(!(e>=r)){var n=this._store,a=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,l=a.getSource().sourceFormat,c=l===br;if(c&&!a.pure)for(var u=[],f=e;f<r;f++){var d=a.getItem(f,u);if(!this.hasItemOption&&BF(d)&&(this.hasItemOption=!0),d){var h=d.name;i[f]==null&&h!=null&&(i[f]=Pr(h,null));var p=d.id;o[f]==null&&p!=null&&(o[f]=Pr(p,null))}}if(this._shouldMakeIdFromName())for(var f=e;f<r;f++)Gv(this,f);kC(this)}},t.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.setApproximateExtent=function(e,r){r=this.getDimension(r),this._approximateExtent[r]=e.slice()},t.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},t.prototype.setCalculationInfo=function(e,r){vl(e)?re(this._calculationInfo,e):this._calculationInfo[e]=r},t.prototype.getName=function(e){var r=this.getRawIndex(e),n=this._nameList[r];return n==null&&this._nameDimIdx!=null&&(n=gl(this,this._nameDimIdx,r)),n==null&&(n=""),n},t.prototype._getCategory=function(e,r){var n=this._store.get(e,r),a=this._store.getOrdinalMeta(e);return a?a.categories[n]:n},t.prototype.getId=function(e){return Lf(this,this.getRawIndex(e))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(e,r){var n=this._store,a=this._dimInfos[e];if(a)return n.get(a.storeDimIndex,r)},t.prototype.getByRawIndex=function(e,r){var n=this._store,a=this._dimInfos[e];if(a)return n.getByRawIndex(a.storeDimIndex,r)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},t.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},t.prototype.getValues=function(e,r){var n=this,a=this._store;return se(e)?a.getValues(ha(e,function(i){return n._getStoreDimIndex(i)}),r):a.getValues(e)},t.prototype.hasValue=function(e){for(var r=this._dimSummary.dataDimIndicesOnCoord,n=0,a=r.length;n<a;n++)if(isNaN(this._store.get(r[n],e)))return!1;return!0},t.prototype.indexOfName=function(e){for(var r=0,n=this._store.count();r<n;r++)if(this.getName(r)===e)return r;return-1},t.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},t.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},t.prototype.rawIndexOf=function(e,r){var n=e&&this._invertedIndicesMap[e],a=n[r];return a==null||isNaN(a)?CC:a},t.prototype.indicesOfNearest=function(e,r,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),r,n)},t.prototype.each=function(e,r,n){Ee(e)&&(n=r,r=e,e=[]);var a=n||this,i=ha(yl(e),this._getStoreDimIndex,this);this._store.each(i,a?Be(r,a):r)},t.prototype.filterSelf=function(e,r,n){Ee(e)&&(n=r,r=e,e=[]);var a=n||this,i=ha(yl(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,a?Be(r,a):r),this},t.prototype.selectRange=function(e){var r=this,n={},a=Fe(e);return z(a,function(i){var o=r._getStoreDimIndex(i);n[o]=e[i]}),this._store=this._store.selectRange(n),this},t.prototype.mapArray=function(e,r,n){Ee(e)&&(n=r,r=e,e=[]),n=n||this;var a=[];return this.each(e,function(){a.push(r&&r.apply(this,arguments))},n),a},t.prototype.map=function(e,r,n,a){var i=n||a||this,o=ha(yl(e),this._getStoreDimIndex,this),l=Pf(this);return l._store=this._store.map(o,i?Be(r,i):r),l},t.prototype.modify=function(e,r,n,a){var i=n||a||this,o=ha(yl(e),this._getStoreDimIndex,this);this._store.modify(o,i?Be(r,i):r)},t.prototype.downSample=function(e,r,n,a){var i=Pf(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),r,n,a),i},t.prototype.lttbDownSample=function(e,r){var n=Pf(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),r),n},t.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},t.prototype.getItemModel=function(e){var r=this.hostModel,n=this.getRawDataItem(e);return new Et(n,r,r&&r.ecModel)},t.prototype.diff=function(e){var r=this;return new PG(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return Lf(e,n)},function(n){return Lf(r,n)})},t.prototype.getVisual=function(e){var r=this._visual;return r&&r[e]},t.prototype.setVisual=function(e,r){this._visual=this._visual||{},vl(e)?re(this._visual,e):this._visual[e]=r},t.prototype.getItemVisual=function(e,r){var n=this._itemVisuals[e],a=n&&n[r];return a==null?this.getVisual(r):a},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,a=n[e];a||(a=n[e]={});var i=a[r];return i==null&&(i=this.getVisual(r),se(i)?i=i.slice():vl(i)&&(i=re({},i)),a[r]=i),i},t.prototype.setItemVisual=function(e,r,n){var a=this._itemVisuals[e]||{};this._itemVisuals[e]=a,vl(r)?re(a,r):a[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){vl(e)?re(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?re(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;Xz(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){z(this._graphicEls,function(n,a){n&&e&&e.call(r,n,a)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:ha(this.dimensions,this._getDimInfo,this),this.hostModel)),Yv(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];!Ee(n)||(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var a=n.apply(this,arguments);return r.apply(this,[a].concat(Xh(arguments)))})},t.internalField=function(){kC=function(e){var r=e._invertedIndicesMap;z(r,function(n,a){var i=e._dimInfos[a],o=i.ordinalMeta,l=e._store;if(o){n=r[a]=new UG(o.categories.length);for(var c=0;c<n.length;c++)n[c]=CC;for(var c=0;c<l.count();c++)n[l.get(i.storeDimIndex,c)]=c}})},gl=function(e,r,n){return Pr(e._getCategory(r,n),null)},Lf=function(e,r){var n=e._idList[r];return n==null&&e._idDimIdx!=null&&(n=gl(e,e._idDimIdx,r)),n==null&&(n=jG+r),n},yl=function(e){return se(e)||(e=e!=null?[e]:[]),e},Pf=function(e){var r=new t(e._schema?e._schema:ha(e.dimensions,e._getDimInfo,e),e.hostModel);return Yv(r,e),r},Yv=function(e,r){z(YG.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(e[n]=r[n])}),e.__wrappedMethods=r.__wrappedMethods,z(GG,function(n){e[n]=Te(r[n])}),e._calculationInfo=re({},r._calculationInfo)},Gv=function(e,r){var n=e._nameList,a=e._idList,i=e._nameDimIdx,o=e._idDimIdx,l=n[r],c=a[r];if(l==null&&i!=null&&(n[r]=l=gl(e,i,r)),c==null&&o!=null&&(a[r]=c=gl(e,o,r)),c==null&&l!=null){var u=e._nameRepeatCount,f=u[l]=(u[l]||0)+1;c=l,f>1&&(c+="__ec__"+f),a[r]=c}}}(),t}(),_l=WG;function TC(t,e){av(t)||(t=ov(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],a=Le(),i=[],o=qG(t,r,n,e.dimensionsCount),l=e.canOmitUnusedDimensions&&xC(o),c=n===t.dimensionsDefine,u=c?SC(t):bC(n),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(t,o));for(var d=Le(f),h=new Wx(o),p=0;p<h.length;p++)h[p]=-1;function m($){var N=h[$];if(N<0){var A=n[$],L=_e(A)?A:{name:A},M=new Of,O=L.name;O!=null&&u.get(O)!=null&&(M.name=M.displayName=O),L.type!=null&&(M.type=L.type),L.displayName!=null&&(M.displayName=L.displayName);var T=i.length;return h[$]=T,M.storeDimIndex=$,i.push(M),M}return i[N]}if(!l)for(var p=0;p<o;p++)m(p);d.each(function($,N){var A=St($).slice();if(A.length===1&&!ve(A[0])&&A[0]<0){d.set(N,!1);return}var L=d.set(N,[]);z(A,function(M,O){var T=ve(M)?u.get(M):M;T!=null&&T<o&&(L[O]=T,g(m(T),N,O))})});var v=0;z(r,function($){var N,A,L,M;if(ve($))N=$,M={};else{M=$,N=M.name;var O=M.ordinalMeta;M.ordinalMeta=null,M=re({},M),M.ordinalMeta=O,A=M.dimsDef,L=M.otherDims,M.name=M.coordDim=M.coordDimIndex=M.dimsDef=M.otherDims=null}var T=d.get(N);if(T!==!1){if(T=St(T),!T.length)for(var E=0;E<(A&&A.length||1);E++){for(;v<o&&m(v).coordDim!=null;)v++;v<o&&T.push(v++)}z(T,function(D,P){var I=m(D);if(c&&M.type!=null&&(I.type=M.type),g(Ue(I,M),N,P),I.name==null&&A){var V=A[P];!_e(V)&&(V={name:V}),I.name=I.displayName=V.name,I.defaultTooltip=V.defaultTooltip}L&&Ue(I.otherDims,L)})}});function g($,N,A){lx.get(N)!=null?$.otherDims[N]=A:($.coordDim=N,$.coordDimIndex=A,a.set(N,!0))}var y=e.generateCoord,_=e.generateCoordCount,w=_!=null;_=y?_||1:0;var S=y||"value";function x($){$.name==null&&($.name=$.coordDim)}if(l)z(i,function($){x($)}),i.sort(function($,N){return $.storeDimIndex-N.storeDimIndex});else for(var b=0;b<o;b++){var C=m(b),k=C.coordDim;k==null&&(C.coordDim=XG(S,a,w),C.coordDimIndex=0,(!y||_<=0)&&(C.isExtraCoord=!0),_--),x(C),C.type==null&&(dx(t,b)===xt.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type="ordinal")}return ZG(i),new _C({source:t,dimensions:i,fullDimensionCount:o,dimensionOmitted:l})}function ZG(t){for(var e=Le(),r=0;r<t.length;r++){var n=t[r],a=n.name,i=e.get(a)||0;i>0&&(n.name=a+(i-1)),i++,e.set(a,i)}}function qG(t,e,r,n){var a=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return z(e,function(i){var o;_e(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function XG(t,e,r){var n=e.data;if(r||n.hasOwnProperty(t)){for(var a=0;n.hasOwnProperty(t+a);)a++;t+=a}return e.set(t,!0),t}var KG=function(){function t(e){this.coordSysDims=[],this.axisMap=Le(),this.categoryAxisMap=Le(),this.coordSysName=e}return t}();function JG(t){var e=t.get("coordinateSystem"),r=new KG(e),n=QG[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var QG={cartesian2d:function(t,e,r,n){var a=t.getReferringComponents("xAxis",Br).models[0],i=t.getReferringComponents("yAxis",Br).models[0];e.coordSysDims=["x","y"],r.set("x",a),r.set("y",i),No(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),No(i)&&(n.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var a=t.getReferringComponents("singleAxis",Br).models[0];e.coordSysDims=["single"],r.set("single",a),No(a)&&(n.set("single",a),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var a=t.getReferringComponents("polar",Br).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],r.set("radius",i),r.set("angle",o),No(i)&&(n.set("radius",i),e.firstCategoryDimIndex=0),No(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var a=t.ecModel,i=a.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=i.dimensions.slice();z(i.parallelAxisIndex,function(l,c){var u=a.getComponent("parallelAxis",l),f=o[c];r.set(f,u),No(u)&&(n.set(f,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=c))})}};function No(t){return t.get("type")==="category"}function eW(t,e,r){r=r||{};var n=r.byIndex,a=r.stackedCoordDimension,i,o,l;tW(e)?i=e:(o=e.schema,i=o.dimensions,l=e.store);var c=!!(t&&t.get("stack")),u,f,d,h;if(z(i,function(_,w){ve(_)&&(i[w]=_={name:_}),c&&!_.isExtraCoord&&(!n&&!u&&_.ordinalMeta&&(u=_),!f&&_.type!=="ordinal"&&_.type!=="time"&&(!a||a===_.coordDim)&&(f=_))}),f&&!n&&!u&&(n=!0),f){d="__\0ecstackresult_"+t.id,h="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var p=f.coordDim,m=f.type,v=0;z(i,function(_){_.coordDim===p&&v++});var g={name:d,coordDim:p,coordDimIndex:v,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:h,coordDim:h,coordDimIndex:v+1,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(l&&(g.storeDimIndex=l.ensureCalculationDimension(h,m),y.storeDimIndex=l.ensureCalculationDimension(d,m)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:d}}function tW(t){return!wC(t.schema)}function pi(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function MC(t,e){return pi(t,e)?t.getCalculationInfo("stackResultDimension"):e}function rW(t,e){var r=t.get("coordinateSystem"),n=mf.get(r),a;return e&&e.coordSysDims&&(a=he(e.coordSysDims,function(i){var o={name:i},l=e.axisMap.get(i);if(l){var c=l.get("type");o.type=RG(c)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function nW(t,e,r){var n,a;return r&&z(t,function(i,o){var l=i.coordDim,c=r.categoryAxisMap.get(l);c&&(n==null&&(n=o),i.ordinalMeta=c.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&n!=null&&(t[n].otherDims.itemName=0),n}function Bf(t,e,r){r=r||{};var n=e.getSourceManager(),a,i=!1;t?(i=!0,a=ov(t)):(a=n.getSource(),i=a.sourceFormat===br);var o=JG(e),l=rW(e,o),c=r.useEncodeDefaulter,u=Ee(c)?c:c?qe(YU,l,e):null,f={coordDimensions:l,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},d=TC(a,f),h=nW(d.dimensions,r.createInvertedIndices,o),p=i?null:n.getSharedDataStore(d),m=eW(e,{schema:d,store:p}),v=new _l(d,e);v.setCalculationInfo(m);var g=h!=null&&aW(a)?function(y,_,w,S){return S===h?w:this.defaultDimValueGetter(y,_,w,S)}:null;return v.hasItemOption=!1,v.initData(i?a:p,null,g),v}function aW(t){if(t.sourceFormat===br){var e=iW(t.data||[]);return!se(Es(e))}}function iW(t){for(var e=0;e<t.length&&t[e]==null;)e++;return t[e]}var $C=function(){function t(e){this._setting=e||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(e){return this._setting[e]},t.prototype.unionExtent=function(e){var r=this._extent;e[0]<r[0]&&(r[0]=e[0]),e[1]>r[1]&&(r[1]=e[1])},t.prototype.unionExtentFromData=function(e,r){this.unionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r)},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();ku($C);var Bn=$C,oW=0,sW=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++oW}return t.createByAxisModel=function(e){var r=e.option,n=r.data,a=n&&he(n,lW);return new t({categories:a,needCollect:!a,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!ve(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,r;var a=this._getOrCreateMap();return r=a.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,a.set(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=Le(this.categories))},t}();function lW(t){return _e(t)&&t.value!=null?t.value:t+""}var Wv=sW;function Zv(t){return t.type==="interval"||t.type==="log"}function cW(t,e,r,n){var a={},i=t[1]-t[0],o=a.interval=qw(i/e,!0);r!=null&&o<r&&(o=a.interval=r),n!=null&&o>n&&(o=a.interval=n);var l=a.intervalPrecision=NC(o),c=a.niceTickExtent=[ht(Math.ceil(t[0]/o)*o,l),ht(Math.floor(t[1]/o)*o,l)];return uW(c,t),a}function qv(t){var e=Math.pow(10,Xp(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,ht(r*e)}function NC(t){return tn(t)+2}function EC(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function uW(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),EC(t,0,e),EC(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function If(t,e){return t>=e[0]&&t<=e[1]}function Rf(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Vf(t,e){return t*(e[1]-e[0])+e[0]}var AC=function(t){me(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var a=n.getSetting("ordinalMeta");return a||(a=new Wv({})),se(a)&&(a=new Wv({categories:he(a,function(i){return _e(i)?i.value:i})})),n._ordinalMeta=a,n._extent=n.getSetting("extent")||[0,a.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:ve(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return r=this.parse(r),If(r,this._extent)&&this._ordinalMeta.categories[r]!=null},e.prototype.normalize=function(r){return r=this._getTickNumber(this.parse(r)),Rf(r,this._extent)},e.prototype.scale=function(r){return r=Math.round(Vf(r,this._extent)),this.getRawOrdinalNumber(r)},e.prototype.getTicks=function(){for(var r=[],n=this._extent,a=n[0];a<=n[1];)r.push({value:a}),a++;return r},e.prototype.getMinorTicks=function(r){},e.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,a=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,l=this._ordinalMeta.categories.length,c=Math.min(l,n.length);o<c;++o){var u=n[o];a[o]=u,i[u]=o}for(var f=0;o<l;++o){for(;i[f]!=null;)f++;a.push(f),i[f]=o}},e.prototype._getTickNumber=function(r){var n=this._ticksByOrdinalNumber;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getRawOrdinalNumber=function(r){var n=this._ordinalNumbersByTick;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getLabel=function(r){if(!this.isBlank()){var n=this.getRawOrdinalNumber(r.value),a=this._ordinalMeta.categories[n];return a==null?"":a+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(r,n){this.unionExtent(r.getApproximateExtent(n))},e.prototype.isInExtentRange=function(r){return r=this._getTickNumber(r),this._extent[0]<=r&&this._extent[1]>=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Bn);Bn.registerClass(AC);var DC=AC,mi=ht,OC=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return If(r,this._extent)},e.prototype.normalize=function(r){return Rf(r,this._extent)},e.prototype.scale=function(r){return Vf(r,this._extent)},e.prototype.setExtent=function(r,n){var a=this._extent;isNaN(r)||(a[0]=parseFloat(r)),isNaN(n)||(a[1]=parseFloat(n))},e.prototype.unionExtent=function(r){var n=this._extent;r[0]<n[0]&&(n[0]=r[0]),r[1]>n[1]&&(n[1]=r[1]),this.setExtent(n[0],n[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=NC(r)},e.prototype.getTicks=function(r){var n=this._interval,a=this._extent,i=this._niceExtent,o=this._intervalPrecision,l=[];if(!n)return l;var c=1e4;a[0]<i[0]&&(r?l.push({value:mi(i[0]-n,o)}):l.push({value:a[0]}));for(var u=i[0];u<=i[1]&&(l.push({value:u}),u=mi(u+n,o),u!==l[l.length-1].value);)if(l.length>c)return[];var f=l.length?l[l.length-1].value:i[1];return a[1]>f&&(r?l.push({value:mi(f+n,o)}):l.push({value:a[1]})),l},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks(!0),a=[],i=this.getExtent(),o=1;o<n.length;o++){for(var l=n[o],c=n[o-1],u=0,f=[],d=l.value-c.value,h=d/r;u<r-1;){var p=mi(c.value+(u+1)*h);p>i[0]&&p<i[1]&&f.push(p),u++}a.push(f)}return a},e.prototype.getLabel=function(r,n){if(r==null)return"";var a=n&&n.precision;a==null?a=tn(r.value)||0:a==="auto"&&(a=this._intervalPrecision);var i=mi(r.value,a,!0);return rx(i)},e.prototype.calcNiceTicks=function(r,n,a){r=r||5;var i=this._extent,o=i[1]-i[0];if(!!isFinite(o)){o<0&&(o=-o,i.reverse());var l=cW(i,r,n,a);this._intervalPrecision=l.intervalPrecision,this._interval=l.interval,this._niceExtent=l.niceTickExtent}},e.prototype.calcNiceExtent=function(r){var n=this._extent;if(n[0]===n[1])if(n[0]!==0){var a=n[0];r.fixMax||(n[1]+=a/2),n[0]-=a/2}else n[1]=1;var i=n[1]-n[0];isFinite(i)||(n[0]=0,n[1]=1),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval);var o=this._interval;r.fixMin||(n[0]=mi(Math.floor(n[0]/o)*o)),r.fixMax||(n[1]=mi(Math.ceil(n[1]/o)*o))},e.prototype.setNiceExtent=function(r,n){this._niceExtent=[r,n]},e.type="interval",e}(Bn);Bn.registerClass(OC);var wl=OC,LC=typeof Float32Array!="undefined",fW=LC?Float32Array:Array;function In(t){return se(t)?LC?new Float32Array(t):t:new fW(t)}var dW="__ec_stack_";function Xv(t){return t.get("stack")||dW+t.seriesIndex}function Kv(t){return t.dim+t.index}function PC(t,e){var r=[];return e.eachSeriesByType(t,function(n){IC(n)&&r.push(n)}),r}function hW(t){var e={};z(t,function(c){var u=c.coordinateSystem,f=u.getBaseAxis();if(!(f.type!=="time"&&f.type!=="value"))for(var d=c.getData(),h=f.dim+"_"+f.index,p=d.getDimensionIndex(d.mapDimension(f.dim)),m=d.getStore(),v=0,g=m.count();v<g;++v){var y=m.get(p,v);e[h]?e[h].push(y):e[h]=[y]}});var r={};for(var n in e)if(e.hasOwnProperty(n)){var a=e[n];if(a){a.sort(function(c,u){return c-u});for(var i=null,o=1;o<a.length;++o){var l=a[o]-a[o-1];l>0&&(i=i===null?l:Math.min(i,l))}r[n]=i}}return r}function BC(t){var e=hW(t),r=[];return z(t,function(n){var a=n.coordinateSystem,i=a.getBaseAxis(),o=i.getExtent(),l;if(i.type==="category")l=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var c=i.dim+"_"+i.index,u=e[c],f=Math.abs(o[1]-o[0]),d=i.scale.getExtent(),h=Math.abs(d[1]-d[0]);l=u?f/h*u:f}else{var p=n.getData();l=Math.abs(o[1]-o[0])/p.count()}var m=ze(n.get("barWidth"),l),v=ze(n.get("barMaxWidth"),l),g=ze(n.get("barMinWidth")||(RC(n)?.5:1),l),y=n.get("barGap"),_=n.get("barCategoryGap");r.push({bandWidth:l,barWidth:m,barMaxWidth:v,barMinWidth:g,barGap:y,barCategoryGap:_,axisKey:Kv(i),stackId:Xv(n)})}),pW(r)}function pW(t){var e={};z(t,function(n,a){var i=n.axisKey,o=n.bandWidth,l=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},c=l.stacks;e[i]=l;var u=n.stackId;c[u]||l.autoWidthCount++,c[u]=c[u]||{width:0,maxWidth:0};var f=n.barWidth;f&&!c[u].width&&(c[u].width=f,f=Math.min(l.remainedWidth,f),l.remainedWidth-=f);var d=n.barMaxWidth;d&&(c[u].maxWidth=d);var h=n.barMinWidth;h&&(c[u].minWidth=h);var p=n.barGap;p!=null&&(l.gap=p);var m=n.barCategoryGap;m!=null&&(l.categoryGap=m)});var r={};return z(e,function(n,a){r[a]={};var i=n.stacks,o=n.bandWidth,l=n.categoryGap;if(l==null){var c=Fe(i).length;l=Math.max(35-c*4,15)+"%"}var u=ze(l,o),f=ze(n.gap,1),d=n.remainedWidth,h=n.autoWidthCount,p=(d-u)/(h+(h-1)*f);p=Math.max(p,0),z(i,function(y){var _=y.maxWidth,w=y.minWidth;if(y.width){var S=y.width;_&&(S=Math.min(S,_)),w&&(S=Math.max(S,w)),y.width=S,d-=S+f*S,h--}else{var S=p;_&&_<S&&(S=Math.min(_,d)),w&&w>S&&(S=w),S!==p&&(y.width=S,d-=S+f*S,h--)}}),p=(d-u)/(h+(h-1)*f),p=Math.max(p,0);var m=0,v;z(i,function(y,_){y.width||(y.width=p),v=y,m+=y.width*(1+f)}),v&&(m-=v.width*f);var g=-m/2;z(i,function(y,_){r[a][_]=r[a][_]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),r}function mW(t,e,r){if(t&&e){var n=t[Kv(e)];return n!=null&&r!=null?n[Xv(r)]:n}}function vW(t,e){var r=PC(t,e),n=BC(r);z(r,function(a){var i=a.getData(),o=a.coordinateSystem,l=o.getBaseAxis(),c=Xv(a),u=n[Kv(l)][c],f=u.offset,d=u.width;i.setLayout({bandWidth:u.bandWidth,offset:f,size:d})})}function gW(t){return{seriesType:t,plan:gv(),reset:function(e){if(!!IC(e)){var r=e.getData(),n=e.coordinateSystem,a=n.getBaseAxis(),i=n.getOtherAxis(a),o=r.getDimensionIndex(r.mapDimension(i.dim)),l=r.getDimensionIndex(r.mapDimension(a.dim)),c=e.get("showBackground",!0),u=r.mapDimension(i.dim),f=r.getCalculationInfo("stackResultDimension"),d=pi(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),p=yW(a,i),m=RC(e),v=e.get("barMinHeight")||0,g=f&&r.getDimensionIndex(f),y=r.getLayout("size"),_=r.getLayout("offset");return{progress:function(w,S){for(var x=w.count,b=m&&In(x*3),C=m&&c&&In(x*3),k=m&&In(x),$=n.master.getRect(),N=h?$.width:$.height,A,L=S.getStore(),M=0;(A=w.next())!=null;){var O=L.get(d?g:o,A),T=L.get(l,A),E=p,D=void 0;d&&(D=+O-L.get(o,A));var P=void 0,I=void 0,V=void 0,F=void 0;if(h){var H=n.dataToPoint([O,T]);if(d){var Y=n.dataToPoint([D,T]);E=Y[0]}P=E,I=H[1]+_,V=H[0]-E,F=y,Math.abs(V)<v&&(V=(V<0?-1:1)*v)}else{var H=n.dataToPoint([T,O]);if(d){var Y=n.dataToPoint([T,D]);E=Y[1]}P=H[0]+_,I=E,V=y,F=H[1]-E,Math.abs(F)<v&&(F=(F<=0?-1:1)*v)}m?(b[M]=P,b[M+1]=I,b[M+2]=h?V:F,C&&(C[M]=h?$.x:P,C[M+1]=h?I:$.y,C[M+2]=N),k[A]=A):S.setItemLayout(A,{x:P,y:I,width:V,height:F}),M+=3}m&&S.setLayout({largePoints:b,largeDataIndices:k,largeBackgroundPoints:C,valueAxisHorizontal:h})}}}}}}function IC(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function RC(t){return t.pipelineContext&&t.pipelineContext.large}function yW(t,e){return e.toGlobalCoord(e.dataToCoord(e.type==="log"?1:0))}var _W=function(t,e,r,n){for(;r<n;){var a=r+n>>>1;t[a][1]<e?r=a+1:n=a}return r},VC=function(t){me(e,t);function e(r){var n=t.call(this,r)||this;return n.type="time",n}return e.prototype.getLabel=function(r){var n=this.getSetting("useUTC");return of(r.value,GS[DU(mo(this._minLevelUnit))]||GS.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(r,n,a){var i=this.getSetting("useUTC"),o=this.getSetting("locale");return OU(r,n,a,o,i)},e.prototype.getTicks=function(){var r=this._interval,n=this._extent,a=[];if(!r)return a;a.push({value:n[0],level:0});var i=this.getSetting("useUTC"),o=TW(this._minLevelUnit,this._approxInterval,i,n);return a=a.concat(o),a.push({value:n[1],level:0}),a},e.prototype.calcNiceExtent=function(r){var n=this._extent;if(n[0]===n[1]&&(n[0]-=_r,n[1]+=_r),n[1]===-1/0&&n[0]===1/0){var a=new Date;n[1]=+new Date(a.getFullYear(),a.getMonth(),a.getDate()),n[0]=n[1]-_r}this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval)},e.prototype.calcNiceTicks=function(r,n,a){r=r||10;var i=this._extent,o=i[1]-i[0];this._approxInterval=o/r,n!=null&&this._approxInterval<n&&(this._approxInterval=n),a!=null&&this._approxInterval>a&&(this._approxInterval=a);var l=Ff.length,c=Math.min(_W(Ff,this._approxInterval,0,l),l-1);this._interval=Ff[c][1],this._minLevelUnit=Ff[Math.max(c-1,0)][0]},e.prototype.parse=function(r){return We(r)?r:+Nn(r)},e.prototype.contain=function(r){return If(this.parse(r),this._extent)},e.prototype.normalize=function(r){return Rf(this.parse(r),this._extent)},e.prototype.scale=function(r){return Vf(r,this._extent)},e.type="time",e}(wl),Ff=[["second",Gm],["minute",Wm],["hour",Xs],["quarter-day",Xs*6],["half-day",Xs*12],["day",_r*1.2],["half-week",_r*3.5],["week",_r*7],["month",_r*31],["quarter",_r*95],["half-year",YS/2],["year",YS]];function wW(t,e,r,n){var a=Nn(e),i=Nn(r),o=function(m){return qS(a,m,n)===qS(i,m,n)},l=function(){return o("year")},c=function(){return l()&&o("month")},u=function(){return c()&&o("day")},f=function(){return u()&&o("hour")},d=function(){return f()&&o("minute")},h=function(){return d()&&o("second")},p=function(){return h()&&o("millisecond")};switch(t){case"year":return l();case"month":return c();case"day":return u();case"hour":return f();case"minute":return d();case"second":return h();case"millisecond":return p()}}function bW(t,e){return t/=_r,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function SW(t){var e=30*_r;return t/=e,t>6?6:t>3?3:t>2?2:1}function xW(t){return t/=Xs,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function FC(t,e){return t/=e?Wm:Gm,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function CW(t){return qw(t,!0)}function kW(t,e,r){var n=new Date(t);switch(mo(e)){case"year":case"month":n[XS(r)](0);case"day":n[KS(r)](1);case"hour":n[JS(r)](0);case"minute":n[QS(r)](0);case"second":n[ex(r)](0),n[tx(r)](0)}return n.getTime()}function TW(t,e,r,n){var a=1e4,i=WS,o=0;function l(N,A,L,M,O,T,E){for(var D=new Date(A),P=A,I=D[M]();P<L&&P<=n[1];)E.push({value:P}),I+=N,D[O](I),P=D.getTime();E.push({value:P,notAdd:!0})}function c(N,A,L){var M=[],O=!A.length;if(!wW(mo(N),n[0],n[1],r)){O&&(A=[{value:kW(new Date(n[0]),N,r)},{value:n[1]}]);for(var T=0;T<A.length-1;T++){var E=A[T].value,D=A[T+1].value;if(E!==D){var P=void 0,I=void 0,V=void 0,F=!1;switch(N){case"year":P=Math.max(1,Math.round(e/_r/365)),I=qm(r),V=LU(r);break;case"half-year":case"quarter":case"month":P=SW(e),I=vo(r),V=XS(r);break;case"week":case"half-week":case"day":P=bW(e),I=sf(r),V=KS(r),F=!0;break;case"half-day":case"quarter-day":case"hour":P=xW(e),I=Js(r),V=JS(r);break;case"minute":P=FC(e,!0),I=lf(r),V=QS(r);break;case"second":P=FC(e,!1),I=cf(r),V=ex(r);break;case"millisecond":P=CW(e),I=uf(r),V=tx(r);break}l(P,E,D,I,V,F,M),N==="year"&&L.length>1&&T===0&&L.unshift({value:L[0].value-P})}}for(var T=0;T<M.length;T++)L.push(M[T]);return M}}for(var u=[],f=[],d=0,h=0,p=0;p<i.length&&o++<a;++p){var m=mo(i[p]);if(!!AU(i[p])){c(i[p],u[u.length-1]||[],f);var v=i[p+1]?mo(i[p+1]):null;if(m!==v){if(f.length){h=d,f.sort(function(N,A){return N.value-A.value});for(var g=[],y=0;y<f.length;++y){var _=f[y].value;(y===0||f[y-1].value!==_)&&(g.push(f[y]),_>=n[0]&&_<=n[1]&&d++)}var w=(n[1]-n[0])/e;if(d>w*1.5&&h>w/1.5||(u.push(g),d>w||t===i[p]))break}f=[]}}}for(var S=Mt(he(u,function(N){return Mt(N,function(A){return A.value>=n[0]&&A.value<=n[1]&&!A.notAdd})}),function(N){return N.length>0}),x=[],b=S.length-1,p=0;p<S.length;++p)for(var C=S[p],k=0;k<C.length;++k)x.push({value:C[k].value,level:b-p});x.sort(function(N,A){return N.value-A.value});for(var $=[],p=0;p<x.length;++p)(p===0||x[p].value!==x[p-1].value)&&$.push(x[p]);return $}Bn.registerClass(VC);var MW=VC,zC=Bn.prototype,bl=wl.prototype,$W=ht,NW=Math.floor,EW=Math.ceil,zf=Math.pow,kr=Math.log,Jv=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="log",r.base=10,r._originalScale=new wl,r._interval=0,r}return e.prototype.getTicks=function(r){var n=this._originalScale,a=this._extent,i=n.getExtent(),o=bl.getTicks.call(this,r);return he(o,function(l){var c=l.value,u=ht(zf(this.base,c));return u=c===a[0]&&this._fixMin?Hf(u,i[0]):u,u=c===a[1]&&this._fixMax?Hf(u,i[1]):u,{value:u}},this)},e.prototype.setExtent=function(r,n){var a=this.base;r=kr(r)/kr(a),n=kr(n)/kr(a),bl.setExtent.call(this,r,n)},e.prototype.getExtent=function(){var r=this.base,n=zC.getExtent.call(this);n[0]=zf(r,n[0]),n[1]=zf(r,n[1]);var a=this._originalScale,i=a.getExtent();return this._fixMin&&(n[0]=Hf(n[0],i[0])),this._fixMax&&(n[1]=Hf(n[1],i[1])),n},e.prototype.unionExtent=function(r){this._originalScale.unionExtent(r);var n=this.base;r[0]=kr(r[0])/kr(n),r[1]=kr(r[1])/kr(n),zC.unionExtent.call(this,r)},e.prototype.unionExtentFromData=function(r,n){this.unionExtent(r.getApproximateExtent(n))},e.prototype.calcNiceTicks=function(r){r=r||10;var n=this._extent,a=n[1]-n[0];if(!(a===1/0||a<=0)){var i=EF(a),o=r/a*i;for(o<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var l=[ht(EW(n[0]/i)*i),ht(NW(n[1]/i)*i)];this._interval=i,this._niceExtent=l}},e.prototype.calcNiceExtent=function(r){bl.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return r=kr(r)/kr(this.base),If(r,this._extent)},e.prototype.normalize=function(r){return r=kr(r)/kr(this.base),Rf(r,this._extent)},e.prototype.scale=function(r){return r=Vf(r,this._extent),zf(this.base,r)},e.type="log",e}(Bn),HC=Jv.prototype;HC.getMinorTicks=bl.getMinorTicks,HC.getLabel=bl.getLabel;function Hf(t,e){return $W(t,tn(e))}Bn.registerClass(Jv);var AW=Jv,DW=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var a=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&r.getNeedCrossZero&&r.getNeedCrossZero();var i=this._modelMinRaw=r.get("min",!0);Ee(i)?this._modelMinNum=Uf(e,i({min:n[0],max:n[1]})):i!=="dataMin"&&(this._modelMinNum=Uf(e,i));var o=this._modelMaxRaw=r.get("max",!0);if(Ee(o)?this._modelMaxNum=Uf(e,o({min:n[0],max:n[1]})):o!=="dataMax"&&(this._modelMaxNum=Uf(e,o)),a)this._axisDataLen=r.getCategories().length;else{var l=r.get("boundaryGap"),c=se(l)?l:[l||0,l||0];typeof c[0]=="boolean"||typeof c[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[en(c[0],1),en(c[1],1)]}},t.prototype.calculate=function(){var e=this._isOrdinal,r=this._dataMin,n=this._dataMax,a=this._axisDataLen,i=this._boundaryGapInner,o=e?null:n-r||Math.abs(r),l=this._modelMinRaw==="dataMin"?r:this._modelMinNum,c=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=l!=null,f=c!=null;l==null&&(l=e?a?0:NaN:r-i[0]*o),c==null&&(c=e?a?a-1:NaN:n+i[1]*o),(l==null||!isFinite(l))&&(l=NaN),(c==null||!isFinite(c))&&(c=NaN);var d=Zc(l)||Zc(c)||e&&!a;this._needCrossZero&&(l>0&&c>0&&!u&&(l=0),l<0&&c<0&&!f&&(c=0));var h=this._determinedMin,p=this._determinedMax;return h!=null&&(l=h,u=!0),p!=null&&(c=p,f=!0),{min:l,max:c,minFixed:u,maxFixed:f,isBlank:d}},t.prototype.modifyDataMinMax=function(e,r){this[LW[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=OW[e];this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),OW={min:"_determinedMin",max:"_determinedMax"},LW={min:"_dataMin",max:"_dataMax"};function PW(t,e,r){var n=t.rawExtentInfo;return n||(n=new DW(t,e,r),t.rawExtentInfo=n,n)}function Uf(t,e){return e==null?null:Zc(e)?NaN:t.parse(e)}function UC(t,e){var r=t.type,n=PW(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var a=n.min,i=n.max,o=e.ecModel;if(o&&r==="time"){var l=PC("bar",o),c=!1;if(z(l,function(d){c=c||d.getBaseAxis()===e.axis}),c){var u=BC(l),f=BW(a,i,e,u);a=f.min,i=f.max}}return{extent:[a,i],fixMin:n.minFixed,fixMax:n.maxFixed}}function BW(t,e,r,n){var a=r.axis.getExtent(),i=a[1]-a[0],o=mW(n,r.axis);if(o===void 0)return{min:t,max:e};var l=1/0;z(o,function(p){l=Math.min(p.offset,l)});var c=-1/0;z(o,function(p){c=Math.max(p.offset+p.width,c)}),l=Math.abs(l),c=Math.abs(c);var u=l+c,f=e-t,d=1-(l+c)/i,h=f/d-f;return e+=h*(c/u),t-=h*(l/u),{min:t,max:e}}function jC(t,e){var r=e,n=UC(t,r),a=n.extent,i=r.get("splitNumber");t instanceof AW&&(t.base=r.get("logBase"));var o=t.type,l=r.get("interval"),c=o==="interval"||o==="time";t.setExtent(a[0],a[1]),t.calcNiceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:c?r.get("minInterval"):null,maxInterval:c?r.get("maxInterval"):null}),l!=null&&t.setInterval&&t.setInterval(l)}function IW(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new DC({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new MW({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Bn.getClass(e)||wl)}}function RW(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function Sl(t){var e=t.getLabelModel().get("formatter"),r=t.type==="category"?t.scale.getExtent()[0]:null;return t.scale.type==="time"?function(n){return function(a,i){return t.scale.getFormattedLabel(a,i,n)}}(e):ve(e)?function(n){return function(a){var i=t.scale.getLabel(a),o=n.replace("{value}",i!=null?i:"");return o}}(e):Ee(e)?function(n){return function(a,i){return r!=null&&(i=a.value-r),n(Qv(t,a),i,a.level!=null?{level:a.level}:null)}}(e):function(n){return t.scale.getLabel(n)}}function Qv(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function VW(t){var e=t.model,r=t.scale;if(!(!e.get(["axisLabel","show"])||r.isBlank())){var n,a,i=r.getExtent();r instanceof DC?a=r.count():(n=r.getTicks(),a=n.length);var o=t.getLabelModel(),l=Sl(t),c,u=1;a>40&&(u=Math.ceil(a/40));for(var f=0;f<a;f+=u){var d=n?n[f]:{value:i[0]+f},h=l(d,f),p=o.getTextRect(h),m=FW(p,o.get("rotate")||0);c?c.union(m):c=m}return c}}function FW(t,e){var r=e*Math.PI/180,n=t.width,a=t.height,i=n*Math.abs(Math.cos(r))+Math.abs(a*Math.sin(r)),o=n*Math.abs(Math.sin(r))+Math.abs(a*Math.cos(r)),l=new Ke(t.x,t.y,i,o);return l}function eg(t){var e=t.get("interval");return e==null?"auto":e}function YC(t){return t.type==="category"&&eg(t.getLabelModel())===0}function zW(t,e){var r={};return z(t.mapDimensionsAll(e),function(n){r[MC(t,n)]=!0}),Fe(r)}var HW=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}(),GC=[],UW={registerPreprocessor:pC,registerProcessor:mC,registerPostInit:$G,registerPostUpdate:NG,registerUpdateLifecycle:Hv,registerAction:$o,registerCoordinateSystem:EG,registerLayout:AG,registerVisual:hi,registerTransform:OG,registerLoading:gC,registerMap:DG,registerImpl:sG,PRIORITY:bG,ComponentModel:tt,ComponentView:Hr,SeriesModel:un,ChartView:xr,registerComponentModel:function(t){tt.registerClass(t)},registerComponentView:function(t){Hr.registerClass(t)},registerSeriesModel:function(t){un.registerClass(t)},registerChartView:function(t){xr.registerClass(t)},registerSubTypeDefaulter:function(t,e){tt.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){xF(t,e)}};function dn(t){if(se(t)){z(t,function(e){dn(e)});return}Ge(GC,t)>=0||(GC.push(t),Ee(t)&&(t={install:t}),t.install(UW))}var xl=ct();function jW(t){return t.type==="category"?GW(t):ZW(t)}function YW(t,e){return t.type==="category"?WW(t,e):{ticks:he(t.scale.getTicks(),function(r){return r.value})}}function GW(t){var e=t.getLabelModel(),r=WC(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function WC(t,e){var r=ZC(t,"labels"),n=eg(e),a=qC(r,n);if(a)return a;var i,o;return Ee(n)?i=JC(t,n):(o=n==="auto"?qW(t):n,i=KC(t,o)),XC(r,n,{labels:i,labelCategoryInterval:o})}function WW(t,e){var r=ZC(t,"ticks"),n=eg(e),a=qC(r,n);if(a)return a;var i,o;if((!e.get("show")||t.scale.isBlank())&&(i=[]),Ee(n))i=JC(t,n,!0);else if(n==="auto"){var l=WC(t,t.getLabelModel());o=l.labelCategoryInterval,i=he(l.labels,function(c){return c.tickValue})}else o=n,i=KC(t,o,!0);return XC(r,n,{ticks:i,tickCategoryInterval:o})}function ZW(t){var e=t.scale.getTicks(),r=Sl(t);return{labels:he(e,function(n,a){return{level:n.level,formattedLabel:r(n,a),rawLabel:t.scale.getLabel(n),tickValue:n.value}})}}function ZC(t,e){return xl(t)[e]||(xl(t)[e]=[])}function qC(t,e){for(var r=0;r<t.length;r++)if(t[r].key===e)return t[r].value}function XC(t,e,r){return t.push({key:e,value:r}),r}function qW(t){var e=xl(t).autoInterval;return e!=null?e:xl(t).autoInterval=t.calculateCategoryInterval()}function XW(t){var e=KW(t),r=Sl(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,a=t.scale,i=a.getExtent(),o=a.count();if(i[1]-i[0]<1)return 0;var l=1;o>40&&(l=Math.max(1,Math.floor(o/40)));for(var c=i[0],u=t.dataToCoord(c+1)-t.dataToCoord(c),f=Math.abs(u*Math.cos(n)),d=Math.abs(u*Math.sin(n)),h=0,p=0;c<=i[1];c+=l){var m=0,v=0,g=jp(r({value:c}),e.font,"center","top");m=g.width*1.3,v=g.height*1.3,h=Math.max(h,m,7),p=Math.max(p,v,7)}var y=h/f,_=p/d;isNaN(y)&&(y=1/0),isNaN(_)&&(_=1/0);var w=Math.max(0,Math.floor(Math.min(y,_))),S=xl(t.model),x=t.getExtent(),b=S.lastAutoInterval,C=S.lastTickCount;return b!=null&&C!=null&&Math.abs(b-w)<=1&&Math.abs(C-o)<=1&&b>w&&S.axisExtent0===x[0]&&S.axisExtent1===x[1]?w=b:(S.lastTickCount=o,S.lastAutoInterval=w,S.axisExtent0=x[0],S.axisExtent1=x[1]),w}function KW(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function KC(t,e,r){var n=Sl(t),a=t.scale,i=a.getExtent(),o=t.getLabelModel(),l=[],c=Math.max((e||0)+1,1),u=i[0],f=a.count();u!==0&&c>1&&f/c>2&&(u=Math.round(Math.ceil(u/c)*c));var d=YC(t),h=o.get("showMinLabel")||d,p=o.get("showMaxLabel")||d;h&&u!==i[0]&&v(i[0]);for(var m=u;m<=i[1];m+=c)v(m);p&&m-c!==i[1]&&v(i[1]);function v(g){var y={value:g};l.push(r?g:{formattedLabel:n(y),rawLabel:a.getLabel(y),tickValue:g})}return l}function JC(t,e,r){var n=t.scale,a=Sl(t),i=[];return z(n.getTicks(),function(o){var l=n.getLabel(o),c=o.value;e(o.value,l)&&i.push(r?c:{formattedLabel:a(o),rawLabel:l,tickValue:c})}),i}var QC=[0,1],JW=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return e>=n&&e<=a},t.prototype.containData=function(e){return this.scale.contain(e)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return TF(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,a=this.scale;return e=a.normalize(e),this.onBand&&a.type==="ordinal"&&(n=n.slice(),ek(n,a.count())),pr(e,QC,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),ek(n,a.count()));var i=pr(e,n,QC,r);return this.scale.scale(i)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=YW(this,r),a=n.ticks,i=he(a,function(l){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(l):l),tickValue:l}},this),o=r.get("alignWithLabel");return QW(this,i,o,e.clamp),i},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),a=he(n,function(i){return he(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},t.prototype.getViewLabels=function(){return jW(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var a=Math.abs(e[1]-e[0]);return Math.abs(a)/n},t.prototype.calculateCategoryInterval=function(){return XW(this)},t}();function ek(t,e){var r=t[1]-t[0],n=e,a=r/n/2;t[0]+=a,t[1]-=a}function QW(t,e,r,n){var a=e.length;if(!t.onBand||r||!a)return;var i=t.getExtent(),o,l;if(a===1)e[0].coord=i[0],o=e[1]={coord:i[0]};else{var c=e[a-1].tickValue-e[0].tickValue,u=(e[a-1].coord-e[0].coord)/c;z(e,function(p){p.coord-=u/2});var f=t.scale.getExtent();l=1+f[1]-e[a-1].tickValue,o={coord:e[a-1].coord+u*l},e.push(o)}var d=i[0]>i[1];h(e[0].coord,i[0])&&(n?e[0].coord=i[0]:e.shift()),n&&h(i[0],e[0].coord)&&e.unshift({coord:i[0]}),h(i[1],o.coord)&&(n?o.coord=i[1]:e.pop()),n&&h(o.coord,i[1])&&e.push({coord:i[1]});function h(p,m){return p=ht(p),m=ht(m),d?p>m:p<m}}var eZ=JW;An.CMD;function tk(t,e,r,n,a,i,o,l){var c=a-t,u=i-e,f=r-t,d=n-e,h=Math.sqrt(f*f+d*d);f/=h,d/=h;var p=c*f+u*d,m=p/h;l&&(m=Math.min(Math.max(m,0),1)),m*=h;var v=o[0]=t+m*f,g=o[1]=e+m*d;return Math.sqrt((v-a)*(v-a)+(g-i)*(g-i))}var pa=new Me,ft=new Me,Ct=new Me,ma=new Me,hn=new Me,jf=[],Rt=new Me;function tZ(t,e){if(e<=180&&e>0){e=e/180*Math.PI,pa.fromArray(t[0]),ft.fromArray(t[1]),Ct.fromArray(t[2]),Me.sub(ma,pa,ft),Me.sub(hn,Ct,ft);var r=ma.len(),n=hn.len();if(!(r<.001||n<.001)){ma.scale(1/r),hn.scale(1/n);var a=ma.dot(hn),i=Math.cos(e);if(i<a){var o=tk(ft.x,ft.y,Ct.x,Ct.y,pa.x,pa.y,jf,!1);Rt.fromArray(jf),Rt.scaleAndAdd(hn,o/Math.tan(Math.PI-e));var l=Ct.x!==ft.x?(Rt.x-ft.x)/(Ct.x-ft.x):(Rt.y-ft.y)/(Ct.y-ft.y);if(isNaN(l))return;l<0?Me.copy(Rt,ft):l>1&&Me.copy(Rt,Ct),Rt.toArray(t[1])}}}}function rZ(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,pa.fromArray(t[0]),ft.fromArray(t[1]),Ct.fromArray(t[2]),Me.sub(ma,ft,pa),Me.sub(hn,Ct,ft);var n=ma.len(),a=hn.len();if(!(n<.001||a<.001)){ma.scale(1/n),hn.scale(1/a);var i=ma.dot(e),o=Math.cos(r);if(i<o){var l=tk(ft.x,ft.y,Ct.x,Ct.y,pa.x,pa.y,jf,!1);Rt.fromArray(jf);var c=Math.PI/2,u=Math.acos(hn.dot(e)),f=c+u-r;if(f>=c)Me.copy(Rt,Ct);else{Rt.scaleAndAdd(hn,l/Math.tan(Math.PI/2-f));var d=Ct.x!==ft.x?(Rt.x-ft.x)/(Ct.x-ft.x):(Rt.y-ft.y)/(Ct.y-ft.y);if(isNaN(d))return;d<0?Me.copy(Rt,ft):d>1&&Me.copy(Rt,Ct)}Rt.toArray(t[1])}}}}function rk(t,e,r,n){var a=r==="normal",i=a?t:t.ensureState(r);i.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var l=n.getModel("lineStyle").getLineStyle();a?t.useStyle(l):i.style=l}function nZ(t,e){var r=e.smooth,n=e.points;if(!!n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var a=rp(n[0],n[1]),i=rp(n[1],n[2]);if(!a||!i){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(a,i)*r,l=np([],n[1],n[0],o/a),c=np([],n[1],n[2],o/i),u=np([],l,c,.5);t.bezierCurveTo(l[0],l[1],l[0],l[1],u[0],u[1]),t.bezierCurveTo(c[0],c[1],c[0],c[1],n[2][0],n[2][1])}else for(var f=1;f<n.length;f++)t.lineTo(n[f][0],n[f][1])}function nk(t,e,r){var n=t.getTextGuideLine(),a=t.getTextContent();if(!a){n&&t.removeTextGuideLine();return}for(var i=e.normal,o=i.get("show"),l=a.ignore,c=0;c<Bu.length;c++){var u=Bu[c],f=e[u],d=u==="normal";if(f){var h=f.get("show"),p=d?l:Ae(a.states[u]&&a.states[u].ignore,l);if(p||!Ae(h,o)){var m=d?n:n&&n.states[u];m&&(m.ignore=!0);continue}n||(n=new Gs,t.setTextGuideLine(n),!d&&(l||!o)&&rk(n,!0,"normal",e.normal),t.stateProxy&&(n.stateProxy=t.stateProxy)),rk(n,!1,u,f)}}if(n){Ue(n.style,r),n.style.fill=null;var v=i.get("showAbove"),g=t.textGuideLineConfig=t.textGuideLineConfig||{};g.showAbove=v||!1,n.buildPath=nZ}}function ak(t,e){e=e||"labelLine";for(var r={normal:t.getModel(e)},n=0;n<Yt.length;n++){var a=Yt[n];r[a]=t.getModel([a,e])}return r}function aZ(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];if(!n.defaultAttr.ignore){var a=n.label,i=a.getComputedTransform(),o=a.getBoundingRect(),l=!i||i[1]<1e-5&&i[2]<1e-5,c=a.style.margin||0,u=o.clone();u.applyTransform(i),u.x-=c/2,u.y-=c/2,u.width+=c,u.height+=c;var f=l?new Gu(o,i):null;e.push({label:a,labelLine:n.labelLine,rect:u,localRect:o,obb:f,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:l,transform:i})}}return e}function iZ(t,e,r,n,a,i){var o=t.length;if(o<2)return;t.sort(function(k,$){return k.rect[e]-$.rect[e]});for(var l=0,c,u=!1,f=0,d=0;d<o;d++){var h=t[d],p=h.rect;c=p[e]-l,c<0&&(p[e]-=c,h.label[e]-=c,u=!0);var m=Math.max(-c,0);f+=m,l=p[e]+p[r]}f>0&&i&&x(-f/o,0,o);var v=t[0],g=t[o-1],y,_;w(),y<0&&b(-y,.8),_<0&&b(_,.8),w(),S(y,_,1),S(_,y,-1),w(),y<0&&C(-y),_<0&&C(_);function w(){y=v.rect[e]-n,_=a-g.rect[e]-g.rect[r]}function S(k,$,N){if(k<0){var A=Math.min($,-k);if(A>0){x(A*N,0,o);var L=A+k;L<0&&b(-L*N,1)}else b(-k*N,1)}}function x(k,$,N){k!==0&&(u=!0);for(var A=$;A<N;A++){var L=t[A],M=L.rect;M[e]+=k,L.label[e]+=k}}function b(k,$){for(var N=[],A=0,L=1;L<o;L++){var M=t[L-1].rect,O=Math.max(t[L].rect[e]-M[e]-M[r],0);N.push(O),A+=O}if(!!A){var T=Math.min(Math.abs(k)/A,$);if(k>0)for(var L=0;L<o-1;L++){var E=N[L]*T;x(E,0,L+1)}else for(var L=o-1;L>0;L--){var E=N[L-1]*T;x(-E,L,o)}}}function C(k){var $=k<0?-1:1;k=Math.abs(k);for(var N=Math.ceil(k/(o-1)),A=0;A<o-1;A++)if($>0?x(N,0,A+1):x(-N,o-A-1,o),k-=N,k<=0)return}return u}function oZ(t,e,r,n){return iZ(t,"y","height",e,r,n)}function sZ(t){var e=[];t.sort(function(v,g){return g.priority-v.priority});var r=new Ke(0,0,0,0);function n(v){if(!v.ignore){var g=v.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}v.ignore=!0}for(var a=0;a<t.length;a++){var i=t[a],o=i.axisAligned,l=i.localRect,c=i.transform,u=i.label,f=i.labelLine;r.copy(i.rect),r.width-=.1,r.height-=.1,r.x+=.05,r.y+=.05;for(var d=i.obb,h=!1,p=0;p<e.length;p++){var m=e[p];if(!!r.intersect(m.rect)){if(o&&m.axisAligned){h=!0;break}if(m.obb||(m.obb=new Gu(m.localRect,m.transform)),d||(d=new Gu(l,c)),d.intersect(m.obb)){h=!0;break}}}h?(n(u),f&&n(f)):(u.attr("ignore",i.defaultAttr.ignore),f&&f.attr("ignore",i.defaultAttr.labelGuideIgnore),e.push(i))}}var lZ=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r){return Bf(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(r){var n=new lt,a=fn("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(a),a.setStyle(r.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),l=i==="none"?"circle":i,c=r.itemHeight*.8,u=fn(l,(r.itemWidth-c)/2,(r.itemHeight-c)/2,c,c,r.itemStyle.fill);n.add(u),u.setStyle(r.itemStyle);var f=r.iconRotate==="inherit"?o:r.iconRotate||0;return u.rotation=f*Math.PI/180,u.setOrigin([r.itemWidth/2,r.itemHeight/2]),l.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(un),cZ=lZ;function tg(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var a=So(t,e,r[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o<r.length;o++)i.push(So(t,e,r[o]));return i.join(" ")}}function ik(t,e){var r=t.mapDimensionsAll("defaultedLabel");if(!se(e))return e+"";for(var n=[],a=0;a<r.length;a++){var i=t.getDimensionIndex(r[a]);i>=0&&n.push(e[i])}return n.join(" ")}var uZ=function(t){me(e,t);function e(r,n,a,i){var o=t.call(this)||this;return o.updateData(r,n,a,i),o}return e.prototype._createSymbol=function(r,n,a,i,o){this.removeAll();var l=fn(r,-1,-1,2,2,null,o);l.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=fZ,this._symbolType=r,this.add(l)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Fs(this.childAt(0))},e.prototype.downplay=function(){zs(this.childAt(0))},e.prototype.setZ=function(r,n){var a=this.childAt(0);a.zlevel=r,a.z=n},e.prototype.setDraggable=function(r){var n=this.childAt(0);n.draggable=r,n.cursor=r?"move":n.cursor},e.prototype.updateData=function(r,n,a,i){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",l=r.hostModel,c=e.getSymbolSize(r,n),u=o!==this._symbolType,f=i&&i.disableAnimation;if(u){var d=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,c,d)}else{var h=this.childAt(0);h.silent=!1;var p={scaleX:c[0]/2,scaleY:c[1]/2};f?h.attr(p):_t(h,p,l,n),Zu(h)}if(this._updateCommon(r,n,c,a,i),u){var h=this.childAt(0);if(!f){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,Wt(h,p,l,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,a,i,o){var l=this.childAt(0),c=r.hostModel,u,f,d,h,p,m,v,g,y;if(i&&(u=i.emphasisItemStyle,f=i.blurItemStyle,d=i.selectItemStyle,h=i.focus,p=i.blurScope,v=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,m=i.emphasisDisabled),!i||r.hasItemOption){var _=i&&i.itemModel?i.itemModel:r.getItemModel(n),w=_.getModel("emphasis");u=w.getModel("itemStyle").getItemStyle(),d=_.getModel(["select","itemStyle"]).getItemStyle(),f=_.getModel(["blur","itemStyle"]).getItemStyle(),h=w.get("focus"),p=w.get("blurScope"),m=w.get("disabled"),v=ln(_),g=w.getShallow("scale"),y=_.getShallow("cursor")}var S=r.getItemVisual(n,"symbolRotate");l.attr("rotation",(S||0)*Math.PI/180||0);var x=Cv(r.getItemVisual(n,"symbolOffset"),a);x&&(l.x=x[0],l.y=x[1]),y&&l.attr("cursor",y);var b=r.getItemVisual(n,"style"),C=b.fill;if(l instanceof Ir){var k=l.style;l.useStyle(re({image:k.image,x:k.x,y:k.y,width:k.width,height:k.height},b))}else l.__isEmptyBrush?l.useStyle(re({},b)):l.useStyle(b),l.style.decal=null,l.setColor(C,o&&o.symbolInnerColor),l.style.strokeNoScale=!0;var $=r.getItemVisual(n,"liftZ"),N=this._z2;$!=null?N==null&&(this._z2=l.z2,l.z2+=$):N!=null&&(l.z2=N,this._z2=null);var A=o&&o.useNameLabel;ca(l,v,{labelFetcher:c,labelDataIndex:n,defaultText:L,inheritColor:C,defaultOpacity:b.opacity});function L(T){return A?r.getName(T):tg(r,T)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var M=l.ensureState("emphasis");if(M.style=u,l.ensureState("select").style=d,l.ensureState("blur").style=f,g){var O=Math.max(We(g)?g:1.1,3/this._sizeY);M.scaleX=this._sizeX*O,M.scaleY=this._sizeY*O}this.setSymbolScale(1),sa(this,h,p,m)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,a){var i=this.childAt(0),o=He(this).dataIndex,l=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var c=i.getTextContent();c&&Wu(c,{style:{opacity:0}},n,{dataIndex:o,removeOpt:l,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Wu(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:l})},e.getSymbolSize=function(r,n){return M2(r.getItemVisual(n,"symbolSize"))},e}(lt);function fZ(t,e){this.parent.drift(t,e)}var rg=uZ;function ng(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function ok(t){return t!=null&&!_e(t)&&(t={isIgnore:t}),t||{}}function sk(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:ln(e),cursorStyle:e.get("cursor")}}var dZ=function(){function t(e){this.group=new lt,this._SymbolCtor=e||rg}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=ok(r);var n=this.group,a=e.hostModel,i=this._data,o=this._SymbolCtor,l=r.disableAnimation,c=sk(e),u={disableAnimation:l},f=r.getSymbolPoint||function(d){return e.getItemLayout(d)};i||n.removeAll(),e.diff(i).add(function(d){var h=f(d);if(ng(e,h,d,r)){var p=new o(e,d,c,u);p.setPosition(h),e.setItemGraphicEl(d,p),n.add(p)}}).update(function(d,h){var p=i.getItemGraphicEl(h),m=f(d);if(!ng(e,m,d,r)){n.remove(p);return}var v=e.getItemVisual(d,"symbol")||"circle",g=p&&p.getSymbolType&&p.getSymbolType();if(!p||g&&g!==v)n.remove(p),p=new o(e,d,c,u),p.setPosition(m);else{p.updateData(e,d,c,u);var y={x:m[0],y:m[1]};l?p.attr(y):_t(p,y,a)}n.add(p),e.setItemGraphicEl(d,p)}).remove(function(d){var h=i.getItemGraphicEl(d);h&&h.fadeOut(function(){n.remove(h)},a)}).execute(),this._getSymbolPoint=f,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,a){var i=e._getSymbolPoint(a);n.setPosition(i),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=sk(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=ok(n);function a(c){c.isGroup||(c.incremental=!0,c.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var o=r.getItemLayout(i);if(ng(r,o,i,n)){var l=new this._SymbolCtor(r,i,this._seriesScope);l.traverse(a),l.setPosition(o),this.group.add(l),r.setItemGraphicEl(i,l),this._progressiveEls.push(l)}}},t.prototype.eachRendered=function(e){po(this._progressiveEls||this.group,e)},t.prototype.remove=function(e){var r=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(a){a.fadeOut(function(){r.remove(a)},n.hostModel)}):r.removeAll()},t}(),hZ=dZ;function lk(t,e,r){var n=t.getBaseAxis(),a=t.getOtherAxis(n),i=pZ(a,r),o=n.dim,l=a.dim,c=e.mapDimension(l),u=e.mapDimension(o),f=l==="x"||l==="radius"?1:0,d=he(t.dimensions,function(m){return e.mapDimension(m)}),h=!1,p=e.getCalculationInfo("stackResultDimension");return pi(e,d[0])&&(h=!0,d[0]=p),pi(e,d[1])&&(h=!0,d[1]=p),{dataDimsForPoint:d,valueStart:i,valueAxisDim:l,baseAxisDim:o,stacked:!!h,valueDim:c,baseDim:u,baseDataOffset:f,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function pZ(t,e){var r=0,n=t.scale.getExtent();return e==="start"?r=n[0]:e==="end"?r=n[1]:We(e)&&!isNaN(e)?r=e:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function ck(t,e,r,n){var a=NaN;t.stacked&&(a=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=t.valueStart);var i=t.baseDataOffset,o=[];return o[i]=r.get(t.baseDim,n),o[1-i]=a,e.dataToPoint(o)}function mZ(t,e){var r=[];return e.diff(t).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,a){r.push({cmd:"=",idx:a,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function vZ(t,e,r,n,a,i,o,l){for(var c=mZ(t,e),u=[],f=[],d=[],h=[],p=[],m=[],v=[],g=lk(a,e,o),y=t.getLayout("points")||[],_=e.getLayout("points")||[],w=0;w<c.length;w++){var S=c[w],x=!0,b=void 0,C=void 0;switch(S.cmd){case"=":b=S.idx*2,C=S.idx1*2;var k=y[b],$=y[b+1],N=_[C],A=_[C+1];(isNaN(k)||isNaN($))&&(k=N,$=A),u.push(k,$),f.push(N,A),d.push(r[b],r[b+1]),h.push(n[C],n[C+1]),v.push(e.getRawIndex(S.idx1));break;case"+":var L=S.idx,M=g.dataDimsForPoint,O=a.dataToPoint([e.get(M[0],L),e.get(M[1],L)]);C=L*2,u.push(O[0],O[1]),f.push(_[C],_[C+1]);var T=ck(g,a,e,L);d.push(T[0],T[1]),h.push(n[C],n[C+1]),v.push(e.getRawIndex(L));break;case"-":x=!1}x&&(p.push(S),m.push(m.length))}m.sort(function(ae,le){return v[ae]-v[le]});for(var E=u.length,D=In(E),P=In(E),I=In(E),V=In(E),F=[],w=0;w<m.length;w++){var H=m[w],Y=w*2,Q=H*2;D[Y]=u[Q],D[Y+1]=u[Q+1],P[Y]=f[Q],P[Y+1]=f[Q+1],I[Y]=d[Q],I[Y+1]=d[Q+1],V[Y]=h[Q],V[Y+1]=h[Q+1],F[w]=p[H]}return{current:D,next:P,stackedOnCurrent:I,stackedOnNext:V,status:F}}var va=Math.min,ga=Math.max;function vi(t,e){return isNaN(t)||isNaN(e)}function ag(t,e,r,n,a,i,o,l,c){for(var u,f,d,h,p,m,v=r,g=0;g<n;g++){var y=e[v*2],_=e[v*2+1];if(v>=a||v<0)break;if(vi(y,_)){if(c){v+=i;continue}break}if(v===r)t[i>0?"moveTo":"lineTo"](y,_),d=y,h=_;else{var w=y-u,S=_-f;if(w*w+S*S<.5){v+=i;continue}if(o>0){for(var x=v+i,b=e[x*2],C=e[x*2+1];b===y&&C===_&&g<n;)g++,x+=i,v+=i,b=e[x*2],C=e[x*2+1],y=e[v*2],_=e[v*2+1],w=y-u,S=_-f;var k=g+1;if(c)for(;vi(b,C)&&k<n;)k++,x+=i,b=e[x*2],C=e[x*2+1];var $=.5,N=0,A=0,L=void 0,M=void 0;if(k>=n||vi(b,C))p=y,m=_;else{N=b-u,A=C-f;var O=y-u,T=b-y,E=_-f,D=C-_,P=void 0,I=void 0;if(l==="x"){P=Math.abs(O),I=Math.abs(T);var V=N>0?1:-1;p=y-V*P*o,m=_,L=y+V*I*o,M=_}else if(l==="y"){P=Math.abs(E),I=Math.abs(D);var F=A>0?1:-1;p=y,m=_-F*P*o,L=y,M=_+F*I*o}else P=Math.sqrt(O*O+E*E),I=Math.sqrt(T*T+D*D),$=I/(I+P),p=y-N*o*(1-$),m=_-A*o*(1-$),L=y+N*o*$,M=_+A*o*$,L=va(L,ga(b,y)),M=va(M,ga(C,_)),L=ga(L,va(b,y)),M=ga(M,va(C,_)),N=L-y,A=M-_,p=y-N*P/I,m=_-A*P/I,p=va(p,ga(u,y)),m=va(m,ga(f,_)),p=ga(p,va(u,y)),m=ga(m,va(f,_)),N=y-p,A=_-m,L=y+N*I/P,M=_+A*I/P}t.bezierCurveTo(d,h,p,m,y,_),d=L,h=M}else t.lineTo(y,_)}u=y,f=_,v+=i}return g}var uk=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),gZ=function(t){me(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new uk},e.prototype.buildPath=function(r,n){var a=n.points,i=0,o=a.length/2;if(n.connectNulls){for(;o>0&&vi(a[o*2-2],a[o*2-1]);o--);for(;i<o&&vi(a[i*2],a[i*2+1]);i++);}for(;i<o;)i+=ag(r,a,i,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},e.prototype.getPointOn=function(r,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var a=this.path,i=a.data,o=An.CMD,l,c,u=n==="x",f=[],d=0;d<i.length;){var h=i[d++],p=void 0,m=void 0,v=void 0,g=void 0,y=void 0,_=void 0,w=void 0;switch(h){case o.M:l=i[d++],c=i[d++];break;case o.L:if(p=i[d++],m=i[d++],w=u?(r-l)/(p-l):(r-c)/(m-c),w<=1&&w>=0){var S=u?(m-c)*w+c:(p-l)*w+l;return u?[r,S]:[S,r]}l=p,c=m;break;case o.C:p=i[d++],m=i[d++],v=i[d++],g=i[d++],y=i[d++],_=i[d++];var x=u?ru(l,p,v,y,r,f):ru(c,m,g,_,r,f);if(x>0)for(var b=0;b<x;b++){var C=f[b];if(C<=1&&C>=0){var S=u?gt(c,m,g,_,C):gt(l,p,v,y,C);return u?[r,S]:[S,r]}}l=y,c=_;break}}},e}(je),yZ=function(t){me(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(uk),_Z=function(t){me(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new yZ},e.prototype.buildPath=function(r,n){var a=n.points,i=n.stackedOnPoints,o=0,l=a.length/2,c=n.smoothMonotone;if(n.connectNulls){for(;l>0&&vi(a[l*2-2],a[l*2-1]);l--);for(;o<l&&vi(a[o*2],a[o*2+1]);o++);}for(;o<l;){var u=ag(r,a,o,l,l,1,n.smooth,c,n.connectNulls);ag(r,i,o+u-1,u,l,-1,n.stackedOnSmooth,c,n.connectNulls),o+=u+1,r.closePath()}},e}(je);function fk(t,e,r,n,a){var i=t.getArea(),o=i.x,l=i.y,c=i.width,u=i.height,f=r.get(["lineStyle","width"])||2;o-=f/2,l-=f/2,c+=f,u+=f,o=Math.floor(o),c=Math.round(c);var d=new it({shape:{x:o,y:l,width:c,height:u}});if(e){var h=t.getBaseAxis(),p=h.isHorizontal(),m=h.inverse;p?(m&&(d.shape.x+=c),d.shape.width=0):(m||(d.shape.y+=u),d.shape.height=0);var v=Ee(a)?function(g){a(g,d)}:null;Wt(d,{shape:{width:c,height:u,x:o,y:l}},r,null,n,v)}return d}function dk(t,e,r){var n=t.getArea(),a=ht(n.r0,1),i=ht(n.r,1),o=new ri({shape:{cx:ht(t.cx,1),cy:ht(t.cy,1),r0:a,r:i,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(e){var l=t.getBaseAxis().dim==="angle";l?o.shape.endAngle=n.startAngle:o.shape.r=a,Wt(o,{shape:{endAngle:n.endAngle,r:i}},r)}return o}function wZ(t,e,r,n,a){if(t){if(t.type==="polar")return dk(t,e,r);if(t.type==="cartesian2d")return fk(t,e,r,n,a)}else return null;return null}function Cl(t,e){return t.type===e}function hk(t,e){if(t.length===e.length){for(var r=0;r<t.length;r++)if(t[r]!==e[r])return;return!0}}function pk(t){for(var e=1/0,r=1/0,n=-1/0,a=-1/0,i=0;i<t.length;){var o=t[i++],l=t[i++];isNaN(o)||(e=Math.min(o,e),n=Math.max(o,n)),isNaN(l)||(r=Math.min(l,r),a=Math.max(l,a))}return[[e,r],[n,a]]}function mk(t,e){var r=pk(t),n=r[0],a=r[1],i=pk(e),o=i[0],l=i[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(a[0]-l[0]),Math.abs(a[1]-l[1]))}function vk(t){return We(t)?t:t?.5:0}function bZ(t,e,r){if(!r.valueDim)return[];for(var n=e.count(),a=In(n*2),i=0;i<n;i++){var o=ck(r,t,e,i);a[i*2]=o[0],a[i*2+1]=o[1]}return a}function ya(t,e,r,n){var a=e.getBaseAxis(),i=a.dim==="x"||a.dim==="radius"?0:1,o=[],l=0,c=[],u=[],f=[],d=[];if(n){for(l=0;l<t.length;l+=2)!isNaN(t[l])&&!isNaN(t[l+1])&&d.push(t[l],t[l+1]);t=d}for(l=0;l<t.length-2;l+=2)switch(f[0]=t[l+2],f[1]=t[l+3],u[0]=t[l],u[1]=t[l+1],o.push(u[0],u[1]),r){case"end":c[i]=f[i],c[1-i]=u[1-i],o.push(c[0],c[1]);break;case"middle":var h=(u[i]+f[i])/2,p=[];c[i]=p[i]=h,c[1-i]=u[1-i],p[1-i]=f[1-i],o.push(c[0],c[1]),o.push(p[0],p[1]);break;default:c[i]=u[i],c[1-i]=f[1-i],o.push(c[0],c[1])}return o.push(t[l++],t[l++]),o}function SZ(t,e){var r=[],n=t.length,a,i;function o(f,d,h){var p=f.coord,m=(h-p)/(d.coord-p),v=B9(m,[f.color,d.color]);return{coord:h,color:v}}for(var l=0;l<n;l++){var c=t[l],u=c.coord;if(u<0)a=c;else if(u>e){i?r.push(o(i,c,e)):a&&r.push(o(a,c,0),o(a,c,e));break}else a&&(r.push(o(a,c,0)),a=null),r.push(c),i=c}return r}function xZ(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())&&e.type==="cartesian2d"){for(var a,i,o=n.length-1;o>=0;o--){var l=t.getDimensionInfo(n[o].dimension);if(a=l&&l.coordDim,a==="x"||a==="y"){i=n[o];break}}if(!!i){var c=e.getAxis(a),u=he(i.stops,function(w){return{coord:c.toGlobalCoord(c.dataToCoord(w.value)),color:w.color}}),f=u.length,d=i.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),d.reverse());var h=SZ(u,a==="x"?r.getWidth():r.getHeight()),p=h.length;if(!p&&f)return u[0].coord<0?d[1]?d[1]:u[f-1].color:d[0]?d[0]:u[0].color;var m=10,v=h[0].coord-m,g=h[p-1].coord+m,y=g-v;if(y<.001)return"transparent";z(h,function(w){w.offset=(w.coord-v)/y}),h.push({offset:p?h[p-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:p?h[0].offset:.5,color:d[0]||"transparent"});var _=new Pm(0,0,0,0,h,!0);return _[a]=v,_[a+"2"]=g,_}}}function CZ(t,e,r){var n=t.get("showAllSymbol"),a=n==="auto";if(!(n&&!a)){var i=r.getAxesByScale("ordinal")[0];if(!!i&&!(a&&kZ(i,e))){var o=e.mapDimension(i.dim),l={};return z(i.getViewLabels(),function(c){var u=i.scale.getRawOrdinalNumber(c.tickValue);l[u]=1}),function(c){return!l.hasOwnProperty(e.get(o,c))}}}}function kZ(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var a=e.count(),i=Math.max(1,Math.round(a/5)),o=0;o<a;o+=i)if(rg.getSymbolSize(e,o)[t.isHorizontal()?1:0]*1.5>n)return!1;return!0}function TZ(t,e){return isNaN(t)||isNaN(e)}function MZ(t){for(var e=t.length/2;e>0&&TZ(t[e*2-2],t[e*2-1]);e--);return e-1}function gk(t,e){return[t[e*2],t[e*2+1]]}function $Z(t,e,r){for(var n=t.length/2,a=r==="x"?0:1,i,o,l=0,c=-1,u=0;u<n;u++)if(o=t[u*2+a],!(isNaN(o)||isNaN(t[u*2+1-a]))){if(u===0){i=o;continue}if(i<=e&&o>=e||i>=e&&o<=e){c=u;break}l=u,i=o}return{range:[l,c],t:(e-i)/(o-i)}}function yk(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e<Yt.length;e++)if(t.get([Yt[e],"endLabel","show"]))return!0;return!1}function ig(t,e,r,n){if(Cl(e,"cartesian2d")){var a=n.getModel("endLabel"),i=a.get("valueAnimation"),o=n.getData(),l={lastFrameIndex:0},c=yk(n)?function(p,m){t._endLabelOnDuring(p,m,o,l,i,a,e)}:null,u=e.getBaseAxis().isHorizontal(),f=fk(e,r,n,function(){var p=t._endLabel;p&&r&&l.originalX!=null&&p.attr({x:l.originalX,y:l.originalY})},c);if(!n.get("clip",!0)){var d=f.shape,h=Math.max(d.width,d.height);u?(d.y-=h,d.height+=h*2):(d.x-=h,d.width+=h*2)}return c&&c(1,f),f}else return dk(e,r,n)}function NZ(t,e){var r=e.getBaseAxis(),n=r.isHorizontal(),a=r.inverse,i=n?a?"right":"left":"center",o=n?"middle":a?"top":"bottom";return{normal:{align:t.get("align")||i,verticalAlign:t.get("verticalAlign")||o}}}var EZ=function(t){me(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(){var r=new lt,n=new hZ;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r},e.prototype.render=function(r,n,a){var i=this,o=r.coordinateSystem,l=this.group,c=r.getData(),u=r.getModel("lineStyle"),f=r.getModel("areaStyle"),d=c.getLayout("points")||[],h=o.type==="polar",p=this._coordSys,m=this._symbolDraw,v=this._polyline,g=this._polygon,y=this._lineGroup,_=r.get("animation"),w=!f.isEmpty(),S=f.get("origin"),x=lk(o,c,S),b=w&&bZ(o,c,x),C=r.get("showSymbol"),k=r.get("connectNulls"),$=C&&!h&&CZ(r,c,o),N=this._data;N&&N.eachItemGraphicEl(function(le,ye){le.__temp&&(l.remove(le),N.setItemGraphicEl(ye,null))}),C||m.remove(),l.add(y);var A=h?!1:r.get("step"),L;o&&o.getArea&&r.get("clip",!0)&&(L=o.getArea(),L.width!=null?(L.x-=.1,L.y-=.1,L.width+=.2,L.height+=.2):L.r0&&(L.r0-=.5,L.r+=.5)),this._clipShapeForSymbol=L;var M=xZ(c,o,a)||c.getVisual("style")[c.getVisual("drawType")];if(!(v&&p.type===o.type&&A===this._step))C&&m.updateData(c,{isIgnore:$,clipShape:L,disableAnimation:!0,getSymbolPoint:function(le){return[d[le*2],d[le*2+1]]}}),_&&this._initSymbolLabelAnimation(c,o,L),A&&(d=ya(d,o,A,k),b&&(b=ya(b,o,A,k))),v=this._newPolyline(d),w&&(g=this._newPolygon(d,b)),h||this._initOrUpdateEndLabel(r,o,si(M)),y.setClipPath(ig(this,o,!0,r));else{w&&!g?g=this._newPolygon(d,b):g&&!w&&(y.remove(g),g=this._polygon=null),h||this._initOrUpdateEndLabel(r,o,si(M));var O=y.getClipPath();if(O){var T=ig(this,o,!1,r);Wt(O,{shape:T.shape},r)}else y.setClipPath(ig(this,o,!0,r));C&&m.updateData(c,{isIgnore:$,clipShape:L,disableAnimation:!0,getSymbolPoint:function(le){return[d[le*2],d[le*2+1]]}}),(!hk(this._stackedOnPoints,b)||!hk(this._points,d))&&(_?this._doUpdateAnimation(c,b,o,a,A,S,k):(A&&(d=ya(d,o,A,k),b&&(b=ya(b,o,A,k))),v.setShape({points:d}),g&&g.setShape({points:d,stackedOnPoints:b})))}var E=r.getModel("emphasis"),D=E.get("focus"),P=E.get("blurScope"),I=E.get("disabled");if(v.useStyle(Ue(u.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"})),Hs(v,r,"lineStyle"),v.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var V=v.getState("emphasis").style;V.lineWidth=+v.style.lineWidth+1}He(v).seriesIndex=r.seriesIndex,sa(v,D,P,I);var F=vk(r.get("smooth")),H=r.get("smoothMonotone");if(v.setShape({smooth:F,smoothMonotone:H,connectNulls:k}),g){var Y=c.getCalculationInfo("stackedOnSeries"),Q=0;g.useStyle(Ue(f.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel",decal:c.getVisual("style").decal})),Y&&(Q=vk(Y.get("smooth"))),g.setShape({smooth:F,stackedOnSmooth:Q,smoothMonotone:H,connectNulls:k}),Hs(g,r,"areaStyle"),He(g).seriesIndex=r.seriesIndex,sa(g,D,P,I)}var ae=function(le){i._changePolyState(le)};c.eachItemGraphicEl(function(le){le&&(le.onHoverStateChange=ae)}),this._polyline.onHoverStateChange=ae,this._data=c,this._coordSys=o,this._stackedOnPoints=b,this._points=d,this._step=A,this._valueOrigin=S,r.get("triggerLineEvent")&&(this.packEventData(r,v),g&&this.packEventData(r,g))},e.prototype.packEventData=function(r,n){He(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,a,i){var o=r.getData(),l=Ua(o,i);if(this._changePolyState("emphasis"),!(l instanceof Array)&&l!=null&&l>=0){var c=o.getLayout("points"),u=o.getItemGraphicEl(l);if(!u){var f=c[l*2],d=c[l*2+1];if(isNaN(f)||isNaN(d)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,d))return;var h=r.get("zlevel"),p=r.get("z");u=new rg(o,l),u.x=f,u.y=d,u.setZ(h,p);var m=u.getSymbolPath().getTextContent();m&&(m.zlevel=h,m.z=p,m.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(l,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else xr.prototype.highlight.call(this,r,n,a,i)},e.prototype.downplay=function(r,n,a,i){var o=r.getData(),l=Ua(o,i);if(this._changePolyState("normal"),l!=null&&l>=0){var c=o.getItemGraphicEl(l);c&&(c.__temp?(o.setItemGraphicEl(l,null),this.group.remove(c)):c.downplay())}else xr.prototype.downplay.call(this,r,n,a,i)},e.prototype._changePolyState=function(r){var n=this._polygon;Yb(this._polyline,r),n&&Yb(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new gZ({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new _Z({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},e.prototype._initSymbolLabelAnimation=function(r,n,a){var i,o,l=n.getBaseAxis(),c=l.inverse;n.type==="cartesian2d"?(i=l.isHorizontal(),o=!1):n.type==="polar"&&(i=l.dim==="angle",o=!0);var u=r.hostModel,f=u.get("animationDuration");Ee(f)&&(f=f(null));var d=u.get("animationDelay")||0,h=Ee(d)?d(null):d;r.eachItemGraphicEl(function(p,m){var v=p;if(v){var g=[p.x,p.y],y=void 0,_=void 0,w=void 0;if(a)if(o){var S=a,x=n.pointToCoord(g);i?(y=S.startAngle,_=S.endAngle,w=-x[1]/180*Math.PI):(y=S.r0,_=S.r,w=x[0])}else{var b=a;i?(y=b.x,_=b.x+b.width,w=p.x):(y=b.y+b.height,_=b.y,w=p.y)}var C=_===y?0:(w-y)/(_-y);c&&(C=1-C);var k=Ee(d)?d(m):f*C+h,$=v.getSymbolPath(),N=$.getTextContent();v.attr({scaleX:0,scaleY:0}),v.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:k}),N&&N.animateFrom({style:{opacity:0}},{duration:300,delay:k}),$.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,a){var i=r.getModel("endLabel");if(yk(r)){var o=r.getData(),l=this._polyline,c=o.getLayout("points");if(!c){l.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new ut({z2:200}),u.ignoreClip=!0,l.setTextContent(this._endLabel),l.disableLabelAnimation=!0);var f=MZ(c);f>=0&&(ca(l,ln(r,"endLabel"),{inheritColor:a,labelFetcher:r,labelDataIndex:f,defaultText:function(d,h,p){return p!=null?ik(o,p):tg(o,d)},enableTextSetter:!0},NZ(i,n)),l.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,a,i,o,l,c){var u=this._endLabel,f=this._polyline;if(u){r<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var d=a.getLayout("points"),h=a.hostModel,p=h.get("connectNulls"),m=l.get("precision"),v=l.get("distance")||0,g=c.getBaseAxis(),y=g.isHorizontal(),_=g.inverse,w=n.shape,S=_?y?w.x:w.y+w.height:y?w.x+w.width:w.y,x=(y?v:0)*(_?-1:1),b=(y?0:-v)*(_?-1:1),C=y?"x":"y",k=$Z(d,S,C),$=k.range,N=$[1]-$[0],A=void 0;if(N>=1){if(N>1&&!p){var L=gk(d,$[0]);u.attr({x:L[0]+x,y:L[1]+b}),o&&(A=h.getRawValue($[0]))}else{var L=f.getPointOn(S,C);L&&u.attr({x:L[0]+x,y:L[1]+b});var M=h.getRawValue($[0]),O=h.getRawValue($[1]);o&&(A=XF(a,m,M,O,k.t))}i.lastFrameIndex=$[0]}else{var T=r===1||i.lastFrameIndex>0?$[0]:0,L=gk(d,T);o&&(A=h.getRawValue(T)),u.attr({x:L[0]+x,y:L[1]+b})}o&&Qu(u).setLabelText(A)}},e.prototype._doUpdateAnimation=function(r,n,a,i,o,l,c){var u=this._polyline,f=this._polygon,d=r.hostModel,h=vZ(this._data,r,this._stackedOnPoints,n,this._coordSys,a,this._valueOrigin),p=h.current,m=h.stackedOnCurrent,v=h.next,g=h.stackedOnNext;if(o&&(p=ya(h.current,a,o,c),m=ya(h.stackedOnCurrent,a,o,c),v=ya(h.next,a,o,c),g=ya(h.stackedOnNext,a,o,c)),mk(p,v)>3e3||f&&mk(m,g)>3e3){u.stopAnimation(),u.setShape({points:v}),f&&(f.stopAnimation(),f.setShape({points:v,stackedOnPoints:g}));return}u.shape.__points=h.current,u.shape.points=p;var y={shape:{points:v}};h.current!==p&&(y.shape.__points=h.next),u.stopAnimation(),_t(u,y,d),f&&(f.setShape({points:p,stackedOnPoints:m}),f.stopAnimation(),_t(f,{shape:{stackedOnPoints:g}},d),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var _=[],w=h.status,S=0;S<w.length;S++){var x=w[S].cmd;if(x==="="){var b=r.getItemGraphicEl(w[S].idx1);b&&_.push({el:b,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var C=u.shape.__points,k=0;k<_.length;k++){var $=_[k].el,N=_[k].ptIdx*2;$.x=C[N],$.y=C[N+1],$.markRedraw()}})},e.prototype.remove=function(r){var n=this.group,a=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),a&&a.eachItemGraphicEl(function(i,o){i.__temp&&(n.remove(i),a.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(xr),AZ=EZ;function DZ(t,e){return{seriesType:t,plan:gv(),reset:function(r){var n=r.getData(),a=r.coordinateSystem,i=r.pipelineContext,o=e||i.large;if(!!a){var l=he(a.dimensions,function(p){return n.mapDimension(p)}).slice(0,2),c=l.length,u=n.getCalculationInfo("stackResultDimension");pi(n,l[0])&&(l[0]=u),pi(n,l[1])&&(l[1]=u);var f=n.getStore(),d=n.getDimensionIndex(l[0]),h=n.getDimensionIndex(l[1]);return c&&{progress:function(p,m){for(var v=p.end-p.start,g=o&&In(v*c),y=[],_=[],w=p.start,S=0;w<p.end;w++){var x=void 0;if(c===1){var b=f.get(d,w);x=a.dataToPoint(b,null,_)}else y[0]=f.get(d,w),y[1]=f.get(h,w),x=a.dataToPoint(y,null,_);o?(g[S++]=x[0],g[S++]=x[1]):m.setItemLayout(w,x.slice())}o&&m.setLayout("points",g)}}}}}}var OZ={average:function(t){for(var e=0,r=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],r++);return r===0?NaN:e/r},sum:function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r]||0;return e},max:function(t){for(var e=-1/0,r=0;r<t.length;r++)t[r]>e&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r<t.length;r++)t[r]<e&&(e=t[r]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},LZ=function(t){return Math.round(t.length/2)};function _k(t){return{seriesType:t,reset:function(e,r,n){var a=e.getData(),i=e.get("sampling"),o=e.coordinateSystem,l=a.count();if(l>10&&o.type==="cartesian2d"&&i){var c=o.getBaseAxis(),u=o.getOtherAxis(c),f=c.getExtent(),d=n.getDevicePixelRatio(),h=Math.abs(f[1]-f[0])*(d||1),p=Math.round(l/h);if(isFinite(p)&&p>1){i==="lttb"&&e.setData(a.lttbDownSample(a.mapDimension(u.dim),1/p));var m=void 0;ve(i)?m=OZ[i]:Ee(i)&&(m=i),m&&e.setData(a.downSample(a.mapDimension(u.dim),1/p,m,LZ))}}}}}function PZ(t){t.registerChartView(AZ),t.registerSeriesModel(cZ),t.registerLayout(DZ("line",!0)),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,_k("line"))}var wk=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return Bf(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r){var n=this.coordinateSystem;if(n&&n.clampData){var a=n.dataToPoint(n.clampData(r)),i=this.getData(),o=i.getLayout("offset"),l=i.getLayout("size"),c=n.getBaseAxis().isHorizontal()?0:1;return a[c]+=o+l/2,a}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(un);un.registerClass(wk);var bk=wk,BZ=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return Bf(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,a){return a.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=tf(bk.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(bk),IZ=BZ,RZ=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),VZ=function(t){me(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new RZ},e.prototype.buildPath=function(r,n){var a=n.cx,i=n.cy,o=Math.max(n.r0||0,0),l=Math.max(n.r,0),c=(l-o)*.5,u=o+c,f=n.startAngle,d=n.endAngle,h=n.clockwise,p=Math.PI*2,m=h?d-f<p:f-d<p;m||(f=d-(h?p:-p));var v=Math.cos(f),g=Math.sin(f),y=Math.cos(d),_=Math.sin(d);m?(r.moveTo(v*o+a,g*o+i),r.arc(v*u+a,g*u+i,c,-Math.PI+f,f,!h)):r.moveTo(v*l+a,g*l+i),r.arc(a,i,l,f,d,!h),r.arc(y*u+a,_*u+i,c,d-Math.PI*2,d-Math.PI,!h),o!==0&&r.arc(a,i,o,d,f,h)},e}(je),Sk=VZ;function FZ(t,e){e=e||{};var r=e.isRoundCap;return function(n,a,i){var o=a.position;if(!o||o instanceof Array)return bu(n,a,i);var l=t(o),c=a.distance!=null?a.distance:5,u=this.shape,f=u.cx,d=u.cy,h=u.r,p=u.r0,m=(h+p)/2,v=u.startAngle,g=u.endAngle,y=(v+g)/2,_=r?Math.abs(h-p)/2:0,w=Math.cos,S=Math.sin,x=f+h*w(v),b=d+h*S(v),C="left",k="top";switch(l){case"startArc":x=f+(p-c)*w(y),b=d+(p-c)*S(y),C="center",k="top";break;case"insideStartArc":x=f+(p+c)*w(y),b=d+(p+c)*S(y),C="center",k="bottom";break;case"startAngle":x=f+m*w(v)+Yf(v,c+_,!1),b=d+m*S(v)+Gf(v,c+_,!1),C="right",k="middle";break;case"insideStartAngle":x=f+m*w(v)+Yf(v,-c+_,!1),b=d+m*S(v)+Gf(v,-c+_,!1),C="left",k="middle";break;case"middle":x=f+m*w(y),b=d+m*S(y),C="center",k="middle";break;case"endArc":x=f+(h+c)*w(y),b=d+(h+c)*S(y),C="center",k="bottom";break;case"insideEndArc":x=f+(h-c)*w(y),b=d+(h-c)*S(y),C="center",k="top";break;case"endAngle":x=f+m*w(g)+Yf(g,c+_,!0),b=d+m*S(g)+Gf(g,c+_,!0),C="left",k="middle";break;case"insideEndAngle":x=f+m*w(g)+Yf(g,-c+_,!0),b=d+m*S(g)+Gf(g,-c+_,!0),C="right",k="middle";break;default:return bu(n,a,i)}return n=n||{},n.x=x,n.y=b,n.align=C,n.verticalAlign=k,n}}function zZ(t,e,r,n){if(We(n)){t.setTextConfig({rotation:n});return}else if(se(e)){t.setTextConfig({rotation:0});return}var a=t.shape,i=a.clockwise?a.startAngle:a.endAngle,o=a.clockwise?a.endAngle:a.startAngle,l=(i+o)/2,c,u=r(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":c=l;break;case"startAngle":case"insideStartAngle":c=i;break;case"endAngle":case"insideEndAngle":c=o;break;default:t.setTextConfig({rotation:0});return}var f=Math.PI*1.5-c;u==="middle"&&f>Math.PI/2&&f<Math.PI*1.5&&(f-=Math.PI),t.setTextConfig({rotation:f})}function Yf(t,e,r){return e*Math.sin(t)*(r?-1:1)}function Gf(t,e,r){return e*Math.cos(t)*(r?1:-1)}var og=Math.max,sg=Math.min;function HZ(t,e){var r=t.getArea&&t.getArea();if(Cl(t,"cartesian2d")){var n=t.getBaseAxis();if(n.type!=="category"||!n.onBand){var a=e.getLayout("bandWidth");n.isHorizontal()?(r.x-=a,r.width+=a*2):(r.y-=a,r.height+=a*2)}}return r}var UZ=function(t){me(e,t);function e(){var r=t.call(this)||this;return r.type=e.type,r._isFirstFrame=!0,r}return e.prototype.render=function(r,n,a,i){this._model=r,this._removeOnRenderedListener(a),this._updateDrawMode(r);var o=r.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,n,a):this._renderNormal(r,n,a,i))},e.prototype.incrementalPrepareRender=function(r){this._clear(),this._updateDrawMode(r),this._updateLargeClip(r)},e.prototype.incrementalRender=function(r,n){this._progressiveEls=[],this._incrementalRenderLarge(r,n)},e.prototype.eachRendered=function(r){po(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(r,n,a,i){var o=this.group,l=r.getData(),c=this._data,u=r.coordinateSystem,f=u.getBaseAxis(),d;u.type==="cartesian2d"?d=f.isHorizontal():u.type==="polar"&&(d=f.dim==="angle");var h=r.isAnimationEnabled()?r:null,p=jZ(r,u);p&&this._enableRealtimeSort(p,l,a);var m=r.get("clip",!0)||p,v=HZ(u,l);o.removeClipPath();var g=r.get("roundCap",!0),y=r.get("showBackground",!0),_=r.getModel("backgroundStyle"),w=_.get("borderRadius")||0,S=[],x=this._backgroundEls,b=i&&i.isInitSort,C=i&&i.type==="changeAxisOrder";function k(A){var L=Wf[u.type](l,A),M=KZ(u,d,L);return M.useStyle(_.getItemStyle()),u.type==="cartesian2d"&&M.setShape("r",w),S[A]=M,M}l.diff(c).add(function(A){var L=l.getItemModel(A),M=Wf[u.type](l,A,L);if(y&&k(A),!(!l.hasValue(A)||!Mk[u.type](M))){var O=!1;m&&(O=xk[u.type](v,M));var T=Ck[u.type](r,l,A,M,d,h,f.model,!1,g);p&&(T.forceLabelAnimation=!0),Nk(T,l,A,L,M,r,d,u.type==="polar"),b?T.attr({shape:M}):p?kk(p,h,T,M,A,d,!1,!1):Wt(T,{shape:M},r,A),l.setItemGraphicEl(A,T),o.add(T),T.ignore=O}}).update(function(A,L){var M=l.getItemModel(A),O=Wf[u.type](l,A,M);if(y){var T=void 0;x.length===0?T=k(L):(T=x[L],T.useStyle(_.getItemStyle()),u.type==="cartesian2d"&&T.setShape("r",w),S[A]=T);var E=Wf[u.type](l,A),D=Ok(d,E,u);_t(T,{shape:D},h,A)}var P=c.getItemGraphicEl(L);if(!l.hasValue(A)||!Mk[u.type](O)){o.remove(P);return}var I=!1;if(m&&(I=xk[u.type](v,O),I&&o.remove(P)),P?Zu(P):P=Ck[u.type](r,l,A,O,d,h,f.model,!!P,g),p&&(P.forceLabelAnimation=!0),C){var V=P.getTextContent();if(V){var F=Qu(V);F.prevValue!=null&&(F.prevValue=F.value)}}else Nk(P,l,A,M,O,r,d,u.type==="polar");b?P.attr({shape:O}):p?kk(p,h,P,O,A,d,!0,C):_t(P,{shape:O},r,A,null),l.setItemGraphicEl(A,P),P.ignore=I,o.add(P)}).remove(function(A){var L=c.getItemGraphicEl(A);L&&Zs(L,r,A)}).execute();var $=this._backgroundGroup||(this._backgroundGroup=new lt);$.removeAll();for(var N=0;N<S.length;++N)$.add(S[N]);o.add($),this._backgroundEls=S,this._data=l},e.prototype._renderLarge=function(r,n,a){this._clear(),Ak(r,this.group),this._updateLargeClip(r)},e.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),Ak(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&wZ(r.coordinateSystem,!1,r),a=this.group;n?a.setClipPath(n):a.removeClipPath()},e.prototype._enableRealtimeSort=function(r,n,a){var i=this;if(!!n.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,r,a),this._isFirstFrame=!1;else{var l=function(c){var u=n.getItemGraphicEl(c),f=u&&u.shape;return f&&Math.abs(o.isHorizontal()?f.height:f.width)||0};this._onRendered=function(){i._updateSortWithinSameData(n,l,o,a)},a.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(r,n,a){var i=[];return r.each(r.mapDimension(n.dim),function(o,l){var c=a(l);c=c==null?NaN:c,i.push({dataIndex:l,mappedValue:c,ordinalNumber:o})}),i.sort(function(o,l){return l.mappedValue-o.mappedValue}),{ordinalNumbers:he(i,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(r,n,a){for(var i=a.scale,o=r.mapDimension(a.dim),l=Number.MAX_VALUE,c=0,u=i.getOrdinalMeta().categories.length;c<u;++c){var f=r.rawIndexOf(o,i.getRawOrdinalNumber(c)),d=f<0?Number.MIN_VALUE:n(r.indexOfRawIndex(f));if(d>l)return!0;l=d}return!1},e.prototype._isOrderDifferentInView=function(r,n){for(var a=n.scale,i=a.getExtent(),o=Math.max(0,i[0]),l=Math.min(i[1],a.getOrdinalMeta().categories.length-1);o<=l;++o)if(r.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,n,a,i){if(!!this._isOrderChangedWithinSameData(r,n,a)){var o=this._dataSort(r,a,n);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,n,a){var i=n.baseAxis,o=this._dataSort(r,i,function(l){return r.get(r.mapDimension(n.otherAxis.dim),l)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var n=this.group,a=this._data;r&&r.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){Zs(i,r,He(i).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(xr),xk={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var a=t.x+t.width,i=t.y+t.height,o=og(e.x,t.x),l=sg(e.x+e.width,a),c=og(e.y,t.y),u=sg(e.y+e.height,i),f=l<o,d=u<c;return e.x=f&&o>a?l:o,e.y=d&&c>i?u:c,e.width=f?0:l-o,e.height=d?0:u-c,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),f||d},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var a=sg(e.r,t.r),i=og(e.r0,t.r0);e.r=a,e.r0=i;var o=a-i<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},Ck={cartesian2d:function(t,e,r,n,a,i,o,l,c){var u=new it({shape:re({},n),z2:1});if(u.__dataIndex=r,u.name="item",i){var f=u.shape,d=a?"height":"width";f[d]=0}return u},polar:function(t,e,r,n,a,i,o,l,c){var u=!a&&c?Sk:ri,f=new u({shape:n,z2:1});f.name="item";var d=$k(a);if(f.calculateTextPosition=FZ(d,{isRoundCap:u===Sk}),i){var h=f.shape,p=a?"r":"endAngle",m={};h[p]=a?0:n.startAngle,m[p]=n[p],(l?_t:Wt)(f,{shape:m},i)}return f}};function jZ(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function kk(t,e,r,n,a,i,o,l){var c,u;i?(u={x:n.x,width:n.width},c={y:n.y,height:n.height}):(u={y:n.y,height:n.height},c={x:n.x,width:n.width}),l||(o?_t:Wt)(r,{shape:c},e,a,null);var f=e?t.baseAxis.model:null;(o?_t:Wt)(r,{shape:u},f,a)}function Tk(t,e){for(var r=0;r<e.length;r++)if(!isFinite(t[e[r]]))return!0;return!1}var YZ=["x","y","width","height"],GZ=["cx","cy","r","startAngle","endAngle"],Mk={cartesian2d:function(t){return!Tk(t,YZ)},polar:function(t){return!Tk(t,GZ)}},Wf={cartesian2d:function(t,e,r){var n=t.getItemLayout(e),a=r?ZZ(r,n):0,i=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+i*a/2,y:n.y+o*a/2,width:n.width-i*a,height:n.height-o*a}},polar:function(t,e,r){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function WZ(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function $k(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function Nk(t,e,r,n,a,i,o,l){var c=e.getItemVisual(r,"style");l||t.setShape("r",n.get(["itemStyle","borderRadius"])||0),t.useStyle(c);var u=n.getShallow("cursor");u&&t.attr("cursor",u);var f=l?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",d=ln(n);ca(t,d,{labelFetcher:i,labelDataIndex:r,defaultText:tg(i.getData(),r),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var h=t.getTextContent();if(l&&h){var p=n.get(["label","position"]);t.textConfig.inside=p==="middle"?!0:null,zZ(t,p==="outside"?f:p,$k(o),n.get(["label","rotate"]))}mU(h,d,i.getRawValue(r),function(v){return ik(e,v)});var m=n.getModel(["emphasis"]);sa(t,m.get("focus"),m.get("blurScope"),m.get("disabled")),Hs(t,n),WZ(a)&&(t.style.fill="none",t.style.stroke="none",z(t.states,function(v){v.style&&(v.style.fill=v.style.stroke="none")}))}function ZZ(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,a=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,a,i)}var qZ=function(){function t(){}return t}(),Ek=function(t){me(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new qZ},e.prototype.buildPath=function(r,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,l=[],c=[],u=this.barWidth,f=0;f<a.length;f+=3)c[i]=u,c[o]=a[f+2],l[i]=a[f+i],l[o]=a[f+o],r.rect(l[0],l[1],c[0],c[1])},e}(je);function Ak(t,e,r,n){var a=t.getData(),i=a.getLayout("valueAxisHorizontal")?1:0,o=a.getLayout("largeDataIndices"),l=a.getLayout("size"),c=t.getModel("backgroundStyle"),u=a.getLayout("largeBackgroundPoints");if(u){var f=new Ek({shape:{points:u},incremental:!!n,silent:!0,z2:0});f.baseDimIdx=i,f.largeDataIndices=o,f.barWidth=l,f.useStyle(c.getItemStyle()),e.add(f),r&&r.push(f)}var d=new Ek({shape:{points:a.getLayout("largePoints")},incremental:!!n,z2:1});d.baseDimIdx=i,d.largeDataIndices=o,d.barWidth=l,e.add(d),d.useStyle(a.getVisual("style")),He(d).seriesIndex=t.seriesIndex,t.get("silent")||(d.on("mousedown",Dk),d.on("mousemove",Dk)),r&&r.push(d)}var Dk=_v(function(t){var e=this,r=XZ(e,t.offsetX,t.offsetY);He(e).dataIndex=r>=0?r:null},30,!1);function XZ(t,e,r){for(var n=t.baseDimIdx,a=1-n,i=t.shape.points,o=t.largeDataIndices,l=[],c=[],u=t.barWidth,f=0,d=i.length/3;f<d;f++){var h=f*3;if(c[n]=u,c[a]=i[h+2],l[n]=i[h+n],l[a]=i[h+a],c[a]<0&&(l[a]+=c[a],c[a]=-c[a]),e>=l[0]&&e<=l[0]+c[0]&&r>=l[1]&&r<=l[1]+c[1])return o[f]}return-1}function Ok(t,e,r){if(Cl(r,"cartesian2d")){var n=e,a=r.getArea();return{x:t?n.x:a.x,y:t?a.y:n.y,width:t?n.width:a.width,height:t?a.height:n.height}}else{var a=r.getArea(),i=e;return{cx:a.cx,cy:a.cy,r0:t?a.r0:i.r0,r:t?a.r:i.r,startAngle:t?i.startAngle:0,endAngle:t?i.endAngle:Math.PI*2}}}function KZ(t,e,r){var n=t.type==="polar"?ri:it;return new n({shape:Ok(e,r,t),silent:!0,z2:0})}var JZ=UZ;function QZ(t){t.registerChartView(JZ),t.registerSeriesModel(IZ),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,qe(vW,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,gW("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,_k("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(a){e.sortInfo&&a.axis.setCategorySortInfo(e.sortInfo)})})}var Zf=Math.PI*2,Lk=Math.PI/180;function Pk(t,e){return On(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Bk(t,e){var r=Pk(t,e),n=t.get("center"),a=t.get("radius");se(a)||(a=[0,a]),se(n)||(n=[n,n]);var i=ze(r.width,e.getWidth()),o=ze(r.height,e.getHeight()),l=Math.min(i,o),c=ze(n[0],i)+r.x,u=ze(n[1],o)+r.y,f=ze(a[0],l/2),d=ze(a[1],l/2);return{cx:c,cy:u,r0:f,r:d}}function eq(t,e,r){e.eachSeriesByType(t,function(n){var a=n.getData(),i=a.mapDimension("value"),o=Pk(n,r),l=Bk(n,r),c=l.cx,u=l.cy,f=l.r,d=l.r0,h=-n.get("startAngle")*Lk,p=n.get("minAngle")*Lk,m=0;a.each(i,function(N){!isNaN(N)&&m++});var v=a.getSum(i),g=Math.PI/(v||m)*2,y=n.get("clockwise"),_=n.get("roseType"),w=n.get("stillShowZeroSum"),S=a.getDataExtent(i);S[0]=0;var x=Zf,b=0,C=h,k=y?1:-1;if(a.setLayout({viewRect:o,r:f}),a.each(i,function(N,A){var L;if(isNaN(N)){a.setItemLayout(A,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:c,cy:u,r0:d,r:_?NaN:f});return}_!=="area"?L=v===0&&w?g:N*g:L=Zf/m,L<p?(L=p,x-=p):b+=N;var M=C+k*L;a.setItemLayout(A,{angle:L,startAngle:C,endAngle:M,clockwise:y,cx:c,cy:u,r0:d,r:_?pr(N,S,[d,f]):f}),C=M}),x<Zf&&m)if(x<=.001){var $=Zf/m;a.each(i,function(N,A){if(!isNaN(N)){var L=a.getItemLayout(A);L.angle=$,L.startAngle=h+k*A*$,L.endAngle=h+k*(A+1)*$}})}else g=x/b,C=h,a.each(i,function(N,A){if(!isNaN(N)){var L=a.getItemLayout(A),M=L.angle===p?p:N*g;L.startAngle=C,L.endAngle=C+k*M,C+=k*M}})})}function Ik(t){return{seriesType:t,reset:function(e,r){var n=r.findComponents({mainType:"legend"});if(!(!n||!n.length)){var a=e.getData();a.filterSelf(function(i){for(var o=a.getName(i),l=0;l<n.length;l++)if(!n[l].isSelected(o))return!1;return!0})}}}}var tq=Math.PI/180;function Rk(t,e,r,n,a,i,o,l,c,u){if(t.length<2)return;function f(v){for(var g=v.rB,y=g*g,_=0;_<v.list.length;_++){var w=v.list[_],S=Math.abs(w.label.y-r),x=n+w.len,b=x*x,C=Math.sqrt((1-Math.abs(S*S/y))*b),k=e+(C+w.len2)*a,$=k-w.label.x,N=w.targetTextWidth-$*a;Vk(w,N,!0),w.label.x=k}}function d(v){for(var g={list:[],maxY:0},y={list:[],maxY:0},_=0;_<v.length;_++)if(v[_].labelAlignTo==="none"){var w=v[_],S=w.label.y>r?y:g,x=Math.abs(w.label.y-r);if(x>=S.maxY){var b=w.label.x-e-w.len2*a,C=n+w.len,k=Math.abs(b)<C?Math.sqrt(x*x/(1-b*b/C/C)):C;S.rB=k,S.maxY=x}S.list.push(w)}f(g),f(y)}for(var h=t.length,p=0;p<h;p++)if(t[p].position==="outer"&&t[p].labelAlignTo==="labelLine"){var m=t[p].label.x-u;t[p].linePoints[1][0]+=m,t[p].label.x=u}oZ(t,c,c+o)&&d(t)}function rq(t,e,r,n,a,i,o,l){for(var c=[],u=[],f=Number.MAX_VALUE,d=-Number.MAX_VALUE,h=0;h<t.length;h++){var p=t[h].label;lg(t[h])||(p.x<e?(f=Math.min(f,p.x),c.push(t[h])):(d=Math.max(d,p.x),u.push(t[h])))}for(var h=0;h<t.length;h++){var m=t[h];if(!lg(m)&&m.linePoints){if(m.labelStyleWidth!=null)continue;var p=m.label,v=m.linePoints,g=void 0;m.labelAlignTo==="edge"?p.x<e?g=v[2][0]-m.labelDistance-o-m.edgeDistance:g=o+a-m.edgeDistance-v[2][0]-m.labelDistance:m.labelAlignTo==="labelLine"?p.x<e?g=f-o-m.bleedMargin:g=o+a-d-m.bleedMargin:p.x<e?g=p.x-o-m.bleedMargin:g=o+a-p.x-m.bleedMargin,m.targetTextWidth=g,Vk(m,g)}}Rk(u,e,r,n,1,a,i,o,l,d),Rk(c,e,r,n,-1,a,i,o,l,f);for(var h=0;h<t.length;h++){var m=t[h];if(!lg(m)&&m.linePoints){var p=m.label,v=m.linePoints,y=m.labelAlignTo==="edge",_=p.style.padding,w=_?_[1]+_[3]:0,S=p.style.backgroundColor?0:w,x=m.rect.width+S,b=v[1][0]-v[2][0];y?p.x<e?v[2][0]=o+m.edgeDistance+x+m.labelDistance:v[2][0]=o+a-m.edgeDistance-x-m.labelDistance:(p.x<e?v[2][0]=p.x+m.labelDistance:v[2][0]=p.x-m.labelDistance,v[1][0]=v[2][0]+b),v[1][1]=v[2][1]=p.y}}}function Vk(t,e,r){if(r===void 0&&(r=!1),t.labelStyleWidth==null){var n=t.label,a=n.style,i=t.rect,o=a.backgroundColor,l=a.padding,c=l?l[1]+l[3]:0,u=a.overflow,f=i.width+(o?0:c);if(e<f||r){var d=i.height;if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",e-c);var h=n.getBoundingRect();n.setStyle("width",Math.ceil(h.width)),n.setStyle("backgroundColor",o)}else{var p=e-c,m=e<f?p:r?p>t.unconstrainedWidth?null:p:null;n.setStyle("width",m)}var v=n.getBoundingRect();i.width=v.width;var g=(n.style.margin||0)+2.1;i.height=v.height+g,i.y-=(i.height-d)/2}}}function lg(t){return t.position==="center"}function nq(t){var e=t.getData(),r=[],n,a,i=!1,o=(t.get("minShowLabelAngle")||0)*tq,l=e.getLayout("viewRect"),c=e.getLayout("r"),u=l.width,f=l.x,d=l.y,h=l.height;function p(b){b.ignore=!0}function m(b){if(!b.ignore)return!0;for(var C in b.states)if(b.states[C].ignore===!1)return!0;return!1}e.each(function(b){var C=e.getItemGraphicEl(b),k=C.shape,$=C.getTextContent(),N=C.getTextGuideLine(),A=e.getItemModel(b),L=A.getModel("label"),M=L.get("position")||A.get(["emphasis","label","position"]),O=L.get("distanceToLabelLine"),T=L.get("alignTo"),E=ze(L.get("edgeDistance"),u),D=L.get("bleedMargin"),P=A.getModel("labelLine"),I=P.get("length");I=ze(I,u);var V=P.get("length2");if(V=ze(V,u),Math.abs(k.endAngle-k.startAngle)<o){z($.states,p),$.ignore=!0;return}if(!!m($)){var F=(k.startAngle+k.endAngle)/2,H=Math.cos(F),Y=Math.sin(F),Q,ae,le,ye;n=k.cx,a=k.cy;var de=M==="inside"||M==="inner";if(M==="center")Q=k.cx,ae=k.cy,ye="center";else{var Z=(de?(k.r+k.r0)/2*H:k.r*H)+n,K=(de?(k.r+k.r0)/2*Y:k.r*Y)+a;if(Q=Z+H*3,ae=K+Y*3,!de){var J=Z+H*(I+c-k.r),oe=K+Y*(I+c-k.r),Ce=J+(H<0?-1:1)*V,Se=oe;T==="edge"?Q=H<0?f+E:f+u-E:Q=Ce+(H<0?-O:O),ae=Se,le=[[Z,K],[J,oe],[Ce,Se]]}ye=de?"center":T==="edge"?H>0?"right":"left":H>0?"left":"right"}var $e=Math.PI,ge=0,Qe=L.get("rotate");if(We(Qe))ge=Qe*($e/180);else if(M==="center")ge=0;else if(Qe==="radial"||Qe===!0){var ot=H<0?-F+$e:-F;ge=ot}else if(Qe==="tangential"&&M!=="outside"&&M!=="outer"){var j=Math.atan2(H,Y);j<0&&(j=$e*2+j);var W=Y>0;W&&(j=$e+j),ge=j-$e}if(i=!!ge,$.x=Q,$.y=ae,$.rotation=ge,$.setStyle({verticalAlign:"middle"}),de){$.setStyle({align:ye});var ue=$.states.select;ue&&(ue.x+=$.x,ue.y+=$.y)}else{var q=$.getBoundingRect().clone();q.applyTransform($.getComputedTransform());var G=($.style.margin||0)+2.1;q.y-=G/2,q.height+=G,r.push({label:$,labelLine:N,position:M,len:I,len2:V,minTurnAngle:P.get("minTurnAngle"),maxSurfaceAngle:P.get("maxSurfaceAngle"),surfaceNormal:new Me(H,Y),linePoints:le,textAlign:ye,labelDistance:O,labelAlignTo:T,edgeDistance:E,bleedMargin:D,rect:q,unconstrainedWidth:q.width,labelStyleWidth:$.style.width})}C.setTextConfig({inside:de})}}),!i&&t.get("avoidLabelOverlap")&&rq(r,n,a,c,u,h,f,d);for(var v=0;v<r.length;v++){var g=r[v],y=g.label,_=g.labelLine,w=isNaN(y.x)||isNaN(y.y);if(y){y.setStyle({align:g.textAlign}),w&&(z(y.states,p),y.ignore=!0);var S=y.states.select;S&&(S.x+=y.x,S.y+=y.y)}if(_){var x=g.linePoints;w||!x?(z(_.states,p),_.ignore=!0):(tZ(x,g.minTurnAngle),rZ(x,g.surfaceNormal,g.maxSurfaceAngle),_.setShape({points:x}),y.__hostTarget.textGuideLineConfig={anchor:new Me(x[0][0],x[0][1])})}}}function qf(t,e,r){var n=t.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;se(n)||(n=[n,n,n,n]);var a=Math.abs(e.r||0-e.r0||0);return{cornerRadius:he(n,function(i){return en(i,a)})}}var aq=function(t){me(e,t);function e(r,n,a){var i=t.call(this)||this;i.z2=2;var o=new ut;return i.setTextContent(o),i.updateData(r,n,a,!0),i}return e.prototype.updateData=function(r,n,a,i){var o=this,l=r.hostModel,c=r.getItemModel(n),u=c.getModel("emphasis"),f=r.getItemLayout(n),d=re(qf(c.getModel("itemStyle"),f,!0),f);if(isNaN(d.startAngle)){o.setShape(d);return}if(i){o.setShape(d);var h=l.getShallow("animationType");l.ecModel.ssr?(Wt(o,{scaleX:0,scaleY:0},l,{dataIndex:n,isFrom:!0}),o.originX=d.cx,o.originY=d.cy):h==="scale"?(o.shape.r=f.r0,Wt(o,{shape:{r:f.r}},l,n)):a!=null?(o.setShape({startAngle:a,endAngle:a}),Wt(o,{shape:{startAngle:f.startAngle,endAngle:f.endAngle}},l,n)):(o.shape.endAngle=f.startAngle,_t(o,{shape:{endAngle:f.endAngle}},l,n))}else Zu(o),_t(o,{shape:d},l,n);o.useStyle(r.getItemVisual(n,"style")),Hs(o,c);var p=(f.startAngle+f.endAngle)/2,m=l.get("selectedOffset"),v=Math.cos(p)*m,g=Math.sin(p)*m,y=c.getShallow("cursor");y&&o.attr("cursor",y),this._updateLabel(l,r,n),o.ensureState("emphasis").shape=re({r:f.r+(u.get("scale")&&u.get("scaleSize")||0)},qf(u.getModel("itemStyle"),f)),re(o.ensureState("select"),{x:v,y:g,shape:qf(c.getModel(["select","itemStyle"]),f)}),re(o.ensureState("blur"),{shape:qf(c.getModel(["blur","itemStyle"]),f)});var _=o.getTextGuideLine(),w=o.getTextContent();_&&re(_.ensureState("select"),{x:v,y:g}),re(w.ensureState("select"),{x:v,y:g}),sa(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r,n,a){var i=this,o=n.getItemModel(a),l=o.getModel("labelLine"),c=n.getItemVisual(a,"style"),u=c&&c.fill,f=c&&c.opacity;ca(i,ln(o),{labelFetcher:n.hostModel,labelDataIndex:a,inheritColor:u,defaultOpacity:f,defaultText:r.getFormattedLabel(a,"normal")||n.getName(a)});var d=i.getTextContent();i.setTextConfig({position:null,rotation:null}),d.attr({z2:10});var h=r.get(["label","position"]);if(h!=="outside"&&h!=="outer")i.removeTextGuideLine();else{var p=this.getTextGuideLine();p||(p=new Gs,this.setTextGuideLine(p)),nk(this,ak(o),{stroke:u,opacity:ps(l.get(["lineStyle","opacity"]),f,1)})}},e}(ri),iq=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,a,i){var o=r.getData(),l=this._data,c=this.group,u;if(!l&&o.count()>0){for(var f=o.getItemLayout(0),d=1;isNaN(f&&f.startAngle)&&d<o.count();++d)f=o.getItemLayout(d);f&&(u=f.startAngle)}if(this._emptyCircleSector&&c.remove(this._emptyCircleSector),o.count()===0&&r.get("showEmptyCircle")){var h=new ri({shape:Bk(r,a)});h.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=h,c.add(h)}o.diff(l).add(function(p){var m=new aq(o,p,u);o.setItemGraphicEl(p,m),c.add(m)}).update(function(p,m){var v=l.getItemGraphicEl(m);v.updateData(o,p,u),v.off("click"),c.add(v),o.setItemGraphicEl(p,v)}).remove(function(p){var m=l.getItemGraphicEl(p);Zs(m,r,p)}).execute(),nq(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(r,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=r[0]-i.cx,l=r[1]-i.cy,c=Math.sqrt(o*o+l*l);return c<=i.r&&c>=i.r0}},e.type="pie",e}(xr),oq=iq;function Fk(t,e,r){e=se(e)&&{coordDimensions:e}||re({encodeDefine:t.getEncode()},e);var n=t.getSource(),a=TC(n,e).dimensions,i=new _l(a,t);return i.initData(n,r),i}var sq=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}(),zk=sq,lq=function(t){me(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new zk(Be(this.getData,this),Be(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Fk(this,{coordDimensions:["value"],encodeDefaulter:qe(fx,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),a=t.prototype.getDataParams.call(this,r),i=[];return n.each(n.mapDimension("value"),function(o){i.push(o)}),a.percent=MF(i,r,n.hostModel.get("percentPrecision")),a.$vars.push("percent"),a},e.prototype._defaultLabelLine=function(r){Ns(r,"labelLine",["show"]);var n=r.labelLine,a=r.emphasis.labelLine;n.show=n.show&&r.label.show,a.show=a.show&&r.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(un),cq=lq;function uq(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(a){var i=n.mapDimension("value"),o=n.get(i,a);return!(We(o)&&!isNaN(o)&&o<0)})}}}function fq(t){t.registerChartView(oq),t.registerSeriesModel(cq),EY("pie",t.registerAction),t.registerLayout(qe(eq,"pie")),t.registerProcessor(Ik("pie")),t.registerProcessor(uq("pie"))}var dq=function(t){me(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(tt),hq=dq,cg=function(t){me(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Br).models[0]},e.type="cartesian2dAxis",e}(tt);Dr(cg,HW);var Hk={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},pq=Re({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Hk),ug=Re({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},Hk),mq=Re({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},ug),vq=Ue({logBase:10},ug),gq={category:pq,value:ug,time:mq,log:vq},yq={value:1,category:1,time:1,log:1};function Uk(t,e,r,n){z(yq,function(a,i){var o=Re(Re({},gq[i],!0),n,!0),l=function(c){me(u,c);function u(){var f=c!==null&&c.apply(this,arguments)||this;return f.type=e+"Axis."+i,f}return u.prototype.mergeDefaultAndTheme=function(f,d){var h=el(this),p=h?hf(f):{},m=d.getTheme();Re(f,m.get(i+"Axis")),Re(f,this.getDefaultOption()),f.type=jk(f),h&&yo(f,p,h)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=Wv.createByAxisModel(this))},u.prototype.getCategories=function(f){var d=this.option;if(d.type==="category")return f?d.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+i,u.defaultOption=o,u}(r);t.registerComponentModel(l)}),t.registerSubTypeDefaulter(e+"Axis",jk)}function jk(t){return t.type||(t.data?"category":"value")}var _q=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return he(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Mt(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}(),wq=_q,fg=["x","y"];function Yk(t){return t.type==="interval"||t.type==="time"}var bq=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=fg,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!Yk(r)||!Yk(n))){var a=r.getExtent(),i=n.getExtent(),o=this.dataToPoint([a[0],i[0]]),l=this.dataToPoint([a[1],i[1]]),c=a[1]-a[0],u=i[1]-i[0];if(!(!c||!u)){var f=(l[0]-o[0])/c,d=(l[1]-o[1])/u,h=o[0]-a[0]*f,p=o[1]-i[0]*d,m=this._transform=[f,0,0,d,h,p];this._invTransform=Fp([],m)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var n=this.getAxis("x"),a=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&a.contain(a.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.dataToPoint=function(r,n,a){a=a||[];var i=r[0],o=r[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return ur(a,r,this._transform);var l=this.getAxis("x"),c=this.getAxis("y");return a[0]=l.toGlobalCoord(l.dataToCoord(i,n)),a[1]=c.toGlobalCoord(c.dataToCoord(o,n)),a},e.prototype.clampData=function(r,n){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,o=a.getExtent(),l=i.getExtent(),c=a.parse(r[0]),u=i.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),c),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(l[0],l[1]),u),Math.max(l[0],l[1])),n},e.prototype.pointToData=function(r,n){var a=[];if(this._invTransform)return ur(a,r,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(r[0]),n),a[1]=o.coordToData(o.toLocalCoord(r[1]),n),a},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(){var r=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),a=Math.min(r[0],r[1]),i=Math.min(n[0],n[1]),o=Math.max(r[0],r[1])-a,l=Math.max(n[0],n[1])-i;return new Ke(a,i,o,l)},e}(wq),Sq=bq,xq=function(t){me(e,t);function e(r,n,a,i,o){var l=t.call(this,r,n,a)||this;return l.index=0,l.type=i||"value",l.position=o||"bottom",l}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(eZ),Cq=xq;function dg(t,e,r){r=r||{};var n=t.coordinateSystem,a=e.axis,i={},o=a.getAxesOnZeroOf()[0],l=a.position,c=o?"onZero":l,u=a.dim,f=n.getRect(),d=[f.x,f.x+f.width,f.y,f.y+f.height],h={left:0,right:1,top:0,bottom:1,onZero:2},p=e.get("offset")||0,m=u==="x"?[d[2]-p,d[3]+p]:[d[0]-p,d[1]+p];if(o){var v=o.toGlobalCoord(o.dataToCoord(0));m[h.onZero]=Math.max(Math.min(v,m[1]),m[0])}i.position=[u==="y"?m[h[c]]:d[0],u==="x"?m[h[c]]:d[3]],i.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=g[l],i.labelOffset=o?m[h[l]]-m[h.onZero]:0,e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Ba(r.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var y=e.get(["axisLabel","rotate"]);return i.labelRotate=c==="top"?-y:y,i.z2=1,i}function Gk(t){return t.get("coordinateSystem")==="cartesian2d"}function Wk(t){var e={xAxisModel:null,yAxisModel:null};return z(e,function(r,n){var a=n.replace(/Model$/,""),i=t.getReferringComponents(a,Br).models[0];e[n]=i}),e}var hg=Math.log;function kq(t,e,r){var n=wl.prototype,a=n.getTicks.call(r),i=n.getTicks.call(r,!0),o=a.length-1,l=n.getInterval.call(r),c=UC(t,e),u=c.extent,f=c.fixMin,d=c.fixMax;if(t.type==="log"){var h=hg(t.base);u=[hg(u[0])/h,hg(u[1])/h]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:d});var p=n.getExtent.call(t);f&&(u[0]=p[0]),d&&(u[1]=p[1]);var m=n.getInterval.call(t),v=u[0],g=u[1];if(f&&d)m=(g-v)/o;else if(f)for(g=u[0]+m*o;g<u[1]&&isFinite(g)&&isFinite(u[1]);)m=qv(m),g=u[0]+m*o;else if(d)for(v=u[1]-m*o;v>u[0]&&isFinite(v)&&isFinite(u[0]);)m=qv(m),v=u[1]-m*o;else{var y=t.getTicks().length-1;y>o&&(m=qv(m));var _=m*o;g=Math.ceil(u[1]/m)*m,v=ht(g-_),v<0&&u[0]>=0?(v=0,g=ht(_)):g>0&&u[1]<=0&&(g=0,v=-ht(_))}var w=(a[0].value-i[0].value)/l,S=(a[o].value-i[o].value)/l;n.setExtent.call(t,v+m*w,g+m*S),n.setInterval.call(t,m),(w||S)&&n.setNiceExtent.call(t,v+m,g-m)}var Tq=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=fg,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function a(o){var l,c=Fe(o),u=c.length;if(!!u){for(var f=[],d=u-1;d>=0;d--){var h=+c[d],p=o[h],m=p.model,v=p.scale;Zv(v)&&m.get("alignTicks")&&m.get("interval")==null?f.push(p):(jC(v,m),Zv(v)&&(l=p))}f.length&&(l||(l=f.pop(),jC(l.scale,l.model)),z(f,function(g){kq(g.scale,g.model,l.scale)}))}}a(n.x),a(n.y);var i={};z(n.x,function(o){Zk(n,"y",o,i)}),z(n.y,function(o){Zk(n,"x",o,i)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var a=e.getBoxLayoutParams(),i=!n&&e.get("containLabel"),o=On(a,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var l=this._axesList;c(),i&&(z(l,function(u){if(!u.model.get(["axisLabel","inside"])){var f=VW(u);if(f){var d=u.isHorizontal()?"height":"width",h=u.model.get(["axisLabel","margin"]);o[d]-=f[d]+h,u.position==="top"?o.y+=f.height+h:u.position==="left"&&(o.x+=f.width+h)}}}),c()),z(this._coordsList,function(u){u.calcAffineTransform()});function c(){z(l,function(u){var f=u.isHorizontal(),d=f?[0,o.width]:[0,o.height],h=u.inverse?1:0;u.setExtent(d[h],d[1-h]),Mq(u,f?o.x:o.y)})}},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}_e(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var a=0,i=this._coordsList;a<i.length;a++)if(i[a].getAxis("x").index===e||i[a].getAxis("y").index===r)return i[a]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(e,r,n){var a=this._findConvertTarget(r);return a.cartesian?a.cartesian.dataToPoint(n):a.axis?a.axis.toGlobalCoord(a.axis.dataToCoord(n)):null},t.prototype.convertFromPixel=function(e,r,n){var a=this._findConvertTarget(r);return a.cartesian?a.cartesian.pointToData(n):a.axis?a.axis.coordToData(a.axis.toLocalCoord(n)):null},t.prototype._findConvertTarget=function(e){var r=e.seriesModel,n=e.xAxisModel||r&&r.getReferringComponents("xAxis",Br).models[0],a=e.yAxisModel||r&&r.getReferringComponents("yAxis",Br).models[0],i=e.gridModel,o=this._coordsList,l,c;if(r)l=r.coordinateSystem,Ge(o,l)<0&&(l=null);else if(n&&a)l=this.getCartesian(n.componentIndex,a.componentIndex);else if(n)c=this.getAxis("x",n.componentIndex);else if(a)c=this.getAxis("y",a.componentIndex);else if(i){var u=i.coordinateSystem;u===this&&(l=this._coordsList[0])}return{cartesian:l,axis:c}},t.prototype.containPoint=function(e){var r=this._coordsList[0];if(r)return r.containPoint(e)},t.prototype._initCartesian=function(e,r,n){var a=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},l={x:{},y:{}},c={x:0,y:0};if(r.eachComponent("xAxis",u("x"),this),r.eachComponent("yAxis",u("y"),this),!c.x||!c.y){this._axesMap={},this._axesList=[];return}this._axesMap=l,z(l.x,function(f,d){z(l.y,function(h,p){var m="x"+d+"y"+p,v=new Sq(m);v.master=a,v.model=e,a._coordsMap[m]=v,a._coordsList.push(v),v.addAxis(f),v.addAxis(h)})});function u(f){return function(d,h){if(!!pg(d,e)){var p=d.get("position");f==="x"?p!=="top"&&p!=="bottom"&&(p=o.bottom?"top":"bottom"):p!=="left"&&p!=="right"&&(p=o.left?"right":"left"),o[p]=!0;var m=new Cq(f,IW(d),[0,0],d.get("type"),p),v=m.type==="category";m.onBand=v&&d.get("boundaryGap"),m.inverse=d.get("inverse"),d.axis=m,m.model=d,m.grid=i,m.index=h,i._axesList.push(m),l[f][h]=m,c[f]++}}}},t.prototype._updateScale=function(e,r){z(this._axesList,function(a){if(a.scale.setExtent(1/0,-1/0),a.type==="category"){var i=a.model.get("categorySortInfo");a.scale.setSortInfo(i)}}),e.eachSeries(function(a){if(Gk(a)){var i=Wk(a),o=i.xAxisModel,l=i.yAxisModel;if(!pg(o,r)||!pg(l,r))return;var c=this.getCartesian(o.componentIndex,l.componentIndex),u=a.getData(),f=c.getAxis("x"),d=c.getAxis("y");n(u,f),n(u,d)}},this);function n(a,i){z(zW(a,i.dim),function(o){i.scale.unionExtentFromData(a,o)})}},t.prototype.getTooltipAxes=function(e){var r=[],n=[];return z(this.getCartesians(),function(a){var i=e!=null&&e!=="auto"?a.getAxis(e):a.getBaseAxis(),o=a.getOtherAxis(i);Ge(r,i)<0&&r.push(i),Ge(n,o)<0&&n.push(o)}),{baseAxes:r,otherAxes:n}},t.create=function(e,r){var n=[];return e.eachComponent("grid",function(a,i){var o=new t(a,e,r);o.name="grid_"+i,o.resize(a,r,!0),a.coordinateSystem=o,n.push(o)}),e.eachSeries(function(a){if(!!Gk(a)){var i=Wk(a),o=i.xAxisModel,l=i.yAxisModel,c=o.getCoordSysModel(),u=c.coordinateSystem;a.coordinateSystem=u.getCartesian(o.componentIndex,l.componentIndex)}}),n},t.dimensions=fg,t}();function pg(t,e){return t.getCoordSysModel()===e}function Zk(t,e,r,n){r.getAxesOnZeroOf=function(){return i?[i]:[]};var a=t[e],i,o=r.model,l=o.get(["axisLine","onZero"]),c=o.get(["axisLine","onZeroAxisIndex"]);if(!l)return;if(c!=null)qk(a[c])&&(i=a[c]);else for(var u in a)if(a.hasOwnProperty(u)&&qk(a[u])&&!n[f(a[u])]){i=a[u];break}i&&(n[f(i)]=!0);function f(d){return d.dim+"_"+d.index}}function qk(t){return t&&t.type!=="category"&&t.type!=="time"&&RW(t)}function Mq(t,e){var r=t.getExtent(),n=r[0]+r[1];t.toGlobalCoord=t.dim==="x"?function(a){return a+e}:function(a){return n-a+e},t.toLocalCoord=t.dim==="x"?function(a){return a-e}:function(a){return n-a+e}}var $q=Tq,_a=Math.PI,gi=function(){function t(e,r){this.group=new lt,this.opt=r,this.axisModel=e,Ue(r,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new lt({x:r.position[0],y:r.position[1],rotation:r.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(e){return!!Xk[e]},t.prototype.add=function(e){Xk[e](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(e,r,n){var a=Zw(r-e),i,o;return xu(a)?(o=n>0?"top":"bottom",i="center"):xu(a-_a)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a<_a?i=n>0?"right":"left":i=n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),Xk={axisLine:function(t,e,r,n){var a=e.get(["axisLine","show"]);if(a==="auto"&&t.handleAutoShown&&(a=t.handleAutoShown("axisLine")),!!a){var i=e.axis.getExtent(),o=n.transform,l=[i[0],0],c=[i[1],0];o&&(ur(l,l,o),ur(c,c,o));var u=re({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new la({subPixelOptimize:!0,shape:{x1:l[0],y1:l[1],x2:c[0],y2:c[1]},style:u,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});f.anid="line",r.add(f);var d=e.get(["axisLine","symbol"]);if(d!=null){var h=e.get(["axisLine","symbolSize"]);ve(d)&&(d=[d,d]),(ve(h)||We(h))&&(h=[h,h]);var p=Cv(e.get(["axisLine","symbolOffset"])||0,h),m=h[0],v=h[1];z([{rotate:t.rotation+Math.PI/2,offset:p[0],r:0},{rotate:t.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((l[0]-c[0])*(l[0]-c[0])+(l[1]-c[1])*(l[1]-c[1]))}],function(g,y){if(d[y]!=="none"&&d[y]!=null){var _=fn(d[y],-m/2,-v/2,m,v,u.stroke,!0),w=g.r+g.offset;_.attr({rotation:g.rotate,x:l[0]+w*Math.cos(t.rotation),y:l[1]-w*Math.sin(t.rotation),silent:!0,z2:11}),r.add(_)}})}}},axisTickLabel:function(t,e,r,n){var a=Aq(r,n,e,t),i=Oq(r,n,e,t);if(Eq(e,i,a),Dq(r,n,e,t.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=aZ(he(i,function(l){return{label:l,priority:l.z2,defaultAttr:{ignore:l.ignore}}}));sZ(o)}},axisName:function(t,e,r,n){var a=Ba(t.axisName,e.get("name"));if(!!a){var i=e.get("nameLocation"),o=t.nameDirection,l=e.getModel("nameTextStyle"),c=e.get("nameGap")||0,u=e.axis.getExtent(),f=u[0]>u[1]?-1:1,d=[i==="start"?u[0]-f*c:i==="end"?u[1]+f*c:(u[0]+u[1])/2,Jk(i)?t.labelOffset+o*c:0],h,p=e.get("nameRotate");p!=null&&(p=p*_a/180);var m;Jk(i)?h=gi.innerTextLayout(t.rotation,p!=null?p:t.rotation,o):(h=Nq(t.rotation,i,p||0,u),m=t.axisNameAvailableWidth,m!=null&&(m=Math.abs(m/Math.sin(h.rotation)),!isFinite(m)&&(m=null)));var v=l.getFont(),g=e.get("nameTruncate",!0)||{},y=g.ellipsis,_=Ba(t.nameTruncateMaxWidth,g.maxWidth,m),w=new ut({x:d[0],y:d[1],rotation:h.rotation,silent:gi.isLabelSilent(e),style:yr(l,{text:a,font:v,overflow:"truncate",width:_,ellipsis:y,fill:l.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:l.get("align")||h.textAlign,verticalAlign:l.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(zm({el:w,componentModel:e,itemName:a}),w.__fullText=a,w.anid="name",e.get("triggerEvent")){var S=gi.makeAxisEventDataBase(e);S.targetType="axisName",S.name=a,He(w).eventData=S}n.add(w),w.updateTransform(),r.add(w),w.decomposeTransform()}}};function Nq(t,e,r,n){var a=Zw(r-t),i,o,l=n[0]>n[1],c=e==="start"&&!l||e!=="start"&&l;return xu(a-_a/2)?(o=c?"bottom":"top",i="center"):xu(a-_a*1.5)?(o=c?"top":"bottom",i="center"):(o="middle",a<_a*1.5&&a>_a/2?i=c?"left":"right":i=c?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function Eq(t,e,r){if(!YC(t.axis)){var n=t.get(["axisLabel","showMinLabel"]),a=t.get(["axisLabel","showMaxLabel"]);e=e||[],r=r||[];var i=e[0],o=e[1],l=e[e.length-1],c=e[e.length-2],u=r[0],f=r[1],d=r[r.length-1],h=r[r.length-2];n===!1?(Tr(i),Tr(u)):Kk(i,o)&&(n?(Tr(o),Tr(f)):(Tr(i),Tr(u))),a===!1?(Tr(l),Tr(d)):Kk(c,l)&&(a?(Tr(c),Tr(h)):(Tr(l),Tr(d)))}}function Tr(t){t&&(t.ignore=!0)}function Kk(t,e){var r=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!r||!n)){var a=Ip([]);return Vp(a,a,-t.rotation),r.applyTransform(no([],a,t.getLocalTransform())),n.applyTransform(no([],a,e.getLocalTransform())),r.intersect(n)}}function Jk(t){return t==="middle"||t==="center"}function Qk(t,e,r,n,a){for(var i=[],o=[],l=[],c=0;c<t.length;c++){var u=t[c].coord;o[0]=u,o[1]=0,l[0]=u,l[1]=r,e&&(ur(o,o,e),ur(l,l,e));var f=new la({subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:l[0],y2:l[1]},style:n,z2:2,autoBatch:!0,silent:!0});f.anid=a+"_"+t[c].tickValue,i.push(f)}return i}function Aq(t,e,r,n){var a=r.axis,i=r.getModel("axisTick"),o=i.get("show");if(o==="auto"&&n.handleAutoShown&&(o=n.handleAutoShown("axisTick")),!(!o||a.scale.isBlank())){for(var l=i.getModel("lineStyle"),c=n.tickDirection*i.get("length"),u=a.getTicksCoords(),f=Qk(u,e.transform,c,Ue(l.getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])}),"ticks"),d=0;d<f.length;d++)t.add(f[d]);return f}}function Dq(t,e,r,n){var a=r.axis,i=r.getModel("minorTick");if(!(!i.get("show")||a.scale.isBlank())){var o=a.getMinorTicksCoords();if(!!o.length)for(var l=i.getModel("lineStyle"),c=n*i.get("length"),u=Ue(l.getLineStyle(),Ue(r.getModel("axisTick").getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])})),f=0;f<o.length;f++)for(var d=Qk(o[f],e.transform,c,u,"minorticks_"+f),h=0;h<d.length;h++)t.add(d[h])}}function Oq(t,e,r,n){var a=r.axis,i=Ba(n.axisLabelShow,r.get(["axisLabel","show"]));if(!(!i||a.scale.isBlank())){var o=r.getModel("axisLabel"),l=o.get("margin"),c=a.getViewLabels(),u=(Ba(n.labelRotate,o.get("rotate"))||0)*_a/180,f=gi.innerTextLayout(n.rotation,u,n.labelDirection),d=r.getCategories&&r.getCategories(!0),h=[],p=gi.isLabelSilent(r),m=r.get("triggerEvent");return z(c,function(v,g){var y=a.scale.type==="ordinal"?a.scale.getRawOrdinalNumber(v.tickValue):v.tickValue,_=v.formattedLabel,w=v.rawLabel,S=o;if(d&&d[y]){var x=d[y];_e(x)&&x.textStyle&&(S=new Et(x.textStyle,o,r.ecModel))}var b=S.getTextColor()||r.get(["axisLine","lineStyle","color"]),C=a.dataToCoord(y),k=new ut({x:C,y:n.labelOffset+n.labelDirection*l,rotation:f.rotation,silent:p,z2:10+(v.level||0),style:yr(S,{text:_,align:S.getShallow("align",!0)||f.textAlign,verticalAlign:S.getShallow("verticalAlign",!0)||S.getShallow("baseline",!0)||f.textVerticalAlign,fill:Ee(b)?b(a.type==="category"?w:a.type==="value"?y+"":y,g):b})});if(k.anid="label_"+y,m){var $=gi.makeAxisEventDataBase(r);$.targetType="axisLabel",$.value=w,$.tickIndex=g,a.type==="category"&&($.dataIndex=y),He(k).eventData=$}e.add(k),k.updateTransform(),h.push(k),t.add(k),k.decomposeTransform()}),h}}var e3=gi;function Lq(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return Pq(r,t,e),r.seriesInvolved&&Iq(r,t),r}function Pq(t,e,r){var n=e.getComponent("tooltip"),a=e.getComponent("axisPointer"),i=a.get("link",!0)||[],o=[];z(r.getCoordinateSystems(),function(l){if(!l.axisPointerEnabled)return;var c=kl(l.model),u=t.coordSysAxesInfo[c]={};t.coordSysMap[c]=l;var f=l.model,d=f.getModel("tooltip",n);if(z(l.getAxes(),qe(v,!1,null)),l.getTooltipAxes&&n&&d.get("show")){var h=d.get("trigger")==="axis",p=d.get(["axisPointer","type"])==="cross",m=l.getTooltipAxes(d.get(["axisPointer","axis"]));(h||p)&&z(m.baseAxes,qe(v,p?"cross":!0,h)),p&&z(m.otherAxes,qe(v,"cross",!1))}function v(g,y,_){var w=_.model.getModel("axisPointer",a),S=w.get("show");if(!(!S||S==="auto"&&!g&&!gg(w))){y==null&&(y=w.get("triggerTooltip")),w=g?Bq(_,d,a,e,g,y):w;var x=w.get("snap"),b=kl(_.model),C=y||x||_.type==="category",k=t.axesInfo[b]={key:b,axis:_,coordSys:l,axisPointerModel:w,triggerTooltip:y,involveSeries:C,snap:x,useHandle:gg(w),seriesModels:[],linkGroup:null};u[b]=k,t.seriesInvolved=t.seriesInvolved||C;var $=Rq(i,_);if($!=null){var N=o[$]||(o[$]={axesInfo:{}});N.axesInfo[b]=k,N.mapper=i[$].mapper,k.linkGroup=N}}}})}function Bq(t,e,r,n,a,i){var o=e.getModel("axisPointer"),l=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],c={};z(l,function(h){c[h]=Te(o.get(h))}),c.snap=t.type!=="category"&&!!i,o.get("type")==="cross"&&(c.type="line");var u=c.label||(c.label={});if(u.show==null&&(u.show=!1),a==="cross"){var f=o.get(["label","show"]);if(u.show=f!=null?f:!0,!i){var d=c.lineStyle=o.get("crossStyle");d&&Ue(u,d.textStyle)}}return t.model.getModel("axisPointer",new Et(c,r,n))}function Iq(t,e){e.eachSeries(function(r){var n=r.coordinateSystem,a=r.get(["tooltip","trigger"],!0),i=r.get(["tooltip","show"],!0);!n||a==="none"||a===!1||a==="item"||i===!1||r.get(["axisPointer","show"],!0)===!1||z(t.coordSysAxesInfo[kl(n.model)],function(o){var l=o.axis;n.getAxis(l.dim)===l&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function Rq(t,e){for(var r=e.model,n=e.dim,a=0;a<t.length;a++){var i=t[a]||{};if(mg(i[n+"AxisId"],r.id)||mg(i[n+"AxisIndex"],r.componentIndex)||mg(i[n+"AxisName"],r.name))return a}}function mg(t,e){return t==="all"||se(t)&&Ge(t,e)>=0||t===e}function Vq(t){var e=vg(t);if(!!e){var r=e.axisPointerModel,n=e.axis.scale,a=r.option,i=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var l=gg(r);i==null&&(a.status=l?"show":"hide");var c=n.getExtent().slice();c[0]>c[1]&&c.reverse(),(o==null||o>c[1])&&(o=c[1]),o<c[0]&&(o=c[0]),a.value=o,l&&(a.status=e.axis.scale.isBlank()?"hide":"show")}}function vg(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[kl(t)]}function Fq(t){var e=vg(t);return e&&e.axisPointerModel}function gg(t){return!!t.get(["handle","show"])}function kl(t){return t.type+"||"+t.id}var t3={},zq=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,a,i){this.axisPointerClass&&Vq(r),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,a,!0)},e.prototype.updateAxisPointer=function(r,n,a,i){this._doUpdateAxisPointerClass(r,a,!1)},e.prototype.remove=function(r,n){var a=this._axisPointer;a&&a.remove(n)},e.prototype.dispose=function(r,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(r,n,a){var i=e.getAxisPointerClass(this.axisPointerClass);if(!!i){var o=Fq(r);o?(this._axisPointer||(this._axisPointer=new i)).render(r,o,n,a):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},e.registerAxisPointerClass=function(r,n){t3[r]=n},e.getAxisPointerClass=function(r){return r&&t3[r]},e.type="axis",e}(Hr),r3=zq,yg=ct();function Hq(t,e,r,n){var a=r.axis;if(!a.scale.isBlank()){var i=r.getModel("splitArea"),o=i.getModel("areaStyle"),l=o.get("color"),c=n.coordinateSystem.getRect(),u=a.getTicksCoords({tickModel:i,clamp:!0});if(!!u.length){var f=l.length,d=yg(t).splitAreaColors,h=Le(),p=0;if(d)for(var m=0;m<u.length;m++){var v=d.get(u[m].tickValue);if(v!=null){p=(v+(f-1)*m)%f;break}}var g=a.toGlobalCoord(u[0].coord),y=o.getAreaStyle();l=se(l)?l:[l];for(var m=1;m<u.length;m++){var _=a.toGlobalCoord(u[m].coord),w=void 0,S=void 0,x=void 0,b=void 0;a.isHorizontal()?(w=g,S=c.y,x=_-w,b=c.height,g=w+x):(w=c.x,S=g,x=c.width,b=_-S,g=S+b);var C=u[m-1].tickValue;C!=null&&h.set(C,p),e.add(new it({anid:C!=null?"area_"+C:null,shape:{x:w,y:S,width:x,height:b},style:Ue({fill:l[p]},y),autoBatch:!0,silent:!0})),p=(p+1)%f}yg(t).splitAreaColors=h}}}function Uq(t){yg(t).splitAreaColors=null}var jq=["axisLine","axisTickLabel","axisName"],Yq=["splitArea","splitLine","minorSplitLine"],n3=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="CartesianAxisPointer",r}return e.prototype.render=function(r,n,a,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new lt,this.group.add(this._axisGroup),!!r.get("show")){var l=r.getCoordSysModel(),c=dg(l,r),u=new e3(r,re({handleAutoShown:function(d){for(var h=l.coordinateSystem.getCartesians(),p=0;p<h.length;p++)if(Zv(h[p].getOtherAxis(r.axis).scale))return!0;return!1}},c));z(jq,u.add,u),this._axisGroup.add(u.getGroup()),z(Yq,function(d){r.get([d,"show"])&&Gq[d](this,this._axisGroup,r,l)},this);var f=i&&i.type==="changeAxisOrder"&&i.isInitSort;f||DS(o,this._axisGroup,r),t.prototype.render.call(this,r,n,a,i)}},e.prototype.remove=function(){Uq(this)},e.type="cartesianAxis",e}(r3),Gq={splitLine:function(t,e,r,n){var a=r.axis;if(!a.scale.isBlank()){var i=r.getModel("splitLine"),o=i.getModel("lineStyle"),l=o.get("color");l=se(l)?l:[l];for(var c=n.coordinateSystem.getRect(),u=a.isHorizontal(),f=0,d=a.getTicksCoords({tickModel:i}),h=[],p=[],m=o.getLineStyle(),v=0;v<d.length;v++){var g=a.toGlobalCoord(d[v].coord);u?(h[0]=g,h[1]=c.y,p[0]=g,p[1]=c.y+c.height):(h[0]=c.x,h[1]=g,p[0]=c.x+c.width,p[1]=g);var y=f++%l.length,_=d[v].tickValue;e.add(new la({anid:_!=null?"line_"+d[v].tickValue:null,subPixelOptimize:!0,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:p[0],y2:p[1]},style:Ue({stroke:l[y]},m),silent:!0}))}}},minorSplitLine:function(t,e,r,n){var a=r.axis,i=r.getModel("minorSplitLine"),o=i.getModel("lineStyle"),l=n.coordinateSystem.getRect(),c=a.isHorizontal(),u=a.getMinorTicksCoords();if(!!u.length)for(var f=[],d=[],h=o.getLineStyle(),p=0;p<u.length;p++)for(var m=0;m<u[p].length;m++){var v=a.toGlobalCoord(u[p][m].coord);c?(f[0]=v,f[1]=l.y,d[0]=v,d[1]=l.y+l.height):(f[0]=l.x,f[1]=v,d[0]=l.x+l.width,d[1]=v),e.add(new la({anid:"minor_line_"+u[p][m].tickValue,subPixelOptimize:!0,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:d[0],y2:d[1]},style:h,silent:!0}))}},splitArea:function(t,e,r,n){Hq(t,e,r,n)}},a3=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="xAxis",e}(n3),Wq=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=a3.type,r}return e.type="yAxis",e}(n3),Zq=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="grid",r}return e.prototype.render=function(r,n){this.group.removeAll(),r.get("show")&&this.group.add(new it({shape:r.coordinateSystem.getRect(),style:Ue({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(Hr),i3={offset:0};function qq(t){t.registerComponentView(Zq),t.registerComponentModel(hq),t.registerCoordinateSystem("cartesian2d",$q),Uk(t,"x",cg,i3),Uk(t,"y",cg,i3),t.registerComponentView(a3),t.registerComponentView(Wq),t.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}var Tl=z,Xq=_e,Xf=-1,_g=function(){function t(e){var r=e.mappingMethod,n=e.type,a=this.option=Te(e);this.type=n,this.mappingMethod=r,this._normalizeData=Qq[r];var i=t.visualHandlers[n];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[r],r==="piecewise"?(wg(a),Kq(a)):r==="category"?a.categories?Jq(a):wg(a,!0):(cr(r!=="linear"||a.dataExtent),wg(a))}return t.prototype.mapValueToVisual=function(e){var r=this._normalizeData(e);return this._normalizedToVisual(r,e)},t.prototype.getNormalizer=function(){return Be(this._normalizeData,this)},t.listVisualTypes=function(){return Fe(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(e,r,n){_e(e)?z(e,r,n):r.call(n,e)},t.mapVisual=function(e,r,n){var a,i=se(e)?[]:_e(e)?{}:(a=!0,null);return t.eachVisual(e,function(o,l){var c=r.call(n,o,l);a?i=c:i[l]=c}),i},t.retrieveVisuals=function(e){var r={},n;return e&&Tl(t.visualHandlers,function(a,i){e.hasOwnProperty(i)&&(r[i]=e[i],n=!0)}),n?r:null},t.prepareVisualTypes=function(e){if(se(e))e=e.slice();else if(Xq(e)){var r=[];Tl(e,function(n,a){r.push(a)}),e=r}else return[];return e.sort(function(n,a){return a==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},t.dependsOn=function(e,r){return r==="color"?!!(e&&e.indexOf(r)===0):e===r},t.findPieceIndex=function(e,r,n){for(var a,i=1/0,o=0,l=r.length;o<l;o++){var c=r[o].value;if(c!=null){if(c===e||ve(c)&&c===e+"")return o;n&&h(c,o)}}for(var o=0,l=r.length;o<l;o++){var u=r[o],f=u.interval,d=u.close;if(f){if(f[0]===-1/0){if(Jf(d[1],e,f[1]))return o}else if(f[1]===1/0){if(Jf(d[0],f[0],e))return o}else if(Jf(d[0],f[0],e)&&Jf(d[1],e,f[1]))return o;n&&h(f[0],o),n&&h(f[1],o)}}if(n)return e===1/0?r.length-1:e===-1/0?0:a;function h(p,m){var v=Math.abs(p-e);v<i&&(i=v,a=m)}},t.visualHandlers={color:{applyVisual:Ml("color"),getColorMapper:function(){var e=this.option;return Be(e.mappingMethod==="category"?function(r,n){return!n&&(r=this._normalizeData(r)),$l.call(this,r)}:function(r,n,a){var i=!!a;return!n&&(r=this._normalizeData(r)),a=wp(r,e.parsedVisual,a),i?a:Mn(a,"rgba")},this)},_normalizedToVisual:{linear:function(e){return Mn(wp(e,this.option.parsedVisual),"rgba")},category:$l,piecewise:function(e,r){var n=Sg.call(this,r);return n==null&&(n=Mn(wp(e,this.option.parsedVisual),"rgba")),n},fixed:yi}},colorHue:Kf(function(e,r){return bp(e,r)}),colorSaturation:Kf(function(e,r){return bp(e,null,r)}),colorLightness:Kf(function(e,r){return bp(e,null,null,r)}),colorAlpha:Kf(function(e,r){return I9(e,r)}),decal:{applyVisual:Ml("decal"),_normalizedToVisual:{linear:null,category:$l,piecewise:null,fixed:null}},opacity:{applyVisual:Ml("opacity"),_normalizedToVisual:bg([0,1])},liftZ:{applyVisual:Ml("liftZ"),_normalizedToVisual:{linear:yi,category:yi,piecewise:yi,fixed:yi}},symbol:{applyVisual:function(e,r,n){var a=this.mapValueToVisual(e);n("symbol",a)},_normalizedToVisual:{linear:o3,category:$l,piecewise:function(e,r){var n=Sg.call(this,r);return n==null&&(n=o3.call(this,e)),n},fixed:yi}},symbolSize:{applyVisual:Ml("symbolSize"),_normalizedToVisual:bg([0,1])}},t}();function Kq(t){var e=t.pieceList;t.hasSpecialVisual=!1,z(e,function(r,n){r.originIndex=n,r.visual!=null&&(t.hasSpecialVisual=!0)})}function Jq(t){var e=t.categories,r=t.categoryMap={},n=t.visual;if(Tl(e,function(o,l){r[o]=l}),!se(n)){var a=[];_e(n)?Tl(n,function(o,l){var c=r[l];a[c!=null?c:Xf]=o}):a[Xf]=n,n=s3(t,a)}for(var i=e.length-1;i>=0;i--)n[i]==null&&(delete r[e[i]],e.pop())}function wg(t,e){var r=t.visual,n=[];_e(r)?Tl(r,function(i){n.push(i)}):r!=null&&n.push(r);var a={color:1,symbol:1};!e&&n.length===1&&!a.hasOwnProperty(t.type)&&(n[1]=n[0]),s3(t,n)}function Kf(t){return{applyVisual:function(e,r,n){var a=this.mapValueToVisual(e);n("color",t(r("color"),a))},_normalizedToVisual:bg([0,1])}}function o3(t){var e=this.option.visual;return e[Math.round(pr(t,[0,1],[0,e.length-1],!0))]||{}}function Ml(t){return function(e,r,n){n(t,this.mapValueToVisual(e))}}function $l(t){var e=this.option.visual;return e[this.option.loop&&t!==Xf?t%e.length:t]}function yi(){return this.option.visual[0]}function bg(t){return{linear:function(e){return pr(e,t,this.option.visual,!0)},category:$l,piecewise:function(e,r){var n=Sg.call(this,r);return n==null&&(n=pr(e,t,this.option.visual,!0)),n},fixed:yi}}function Sg(t){var e=this.option,r=e.pieceList;if(e.hasSpecialVisual){var n=_g.findPieceIndex(t,r),a=r[n];if(a&&a.visual)return a.visual[this.type]}}function s3(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=he(e,function(r){var n=tr(r);return n||[0,0,0,1]})),e}var Qq={linear:function(t){return pr(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,r=_g.findPieceIndex(t,e,!0);if(r!=null)return pr(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e==null?Xf:e},fixed:Pt};function Jf(t,e,r){return t?e<=r:e<r}var Kt=_g,l3=la.prototype,xg=Om.prototype,c3=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return t}();(function(t){me(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(c3);function Cg(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var eX=function(t){me(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-line",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new c3},e.prototype.buildPath=function(r,n){Cg(n)?l3.buildPath.call(this,r,n):xg.buildPath.call(this,r,n)},e.prototype.pointAt=function(r){return Cg(this.shape)?l3.pointAt.call(this,r):xg.pointAt.call(this,r)},e.prototype.tangentAt=function(r){var n=this.shape,a=Cg(n)?[n.x2-n.x1,n.y2-n.y1]:xg.tangentAt.call(this,r);return ep(a,a)},e}(je),tX=eX,kg=["fromSymbol","toSymbol"];function u3(t){return"_"+t+"Type"}function f3(t,e,r){var n=e.getItemVisual(r,t);if(!(!n||n==="none")){var a=e.getItemVisual(r,t+"Size"),i=e.getItemVisual(r,t+"Rotate"),o=e.getItemVisual(r,t+"Offset"),l=e.getItemVisual(r,t+"KeepAspect"),c=M2(a),u=Cv(o||0,c),f=fn(n,-c[0]/2+u[0],-c[1]/2+u[1],c[0],c[1],null,l);return f.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,f.name=t,f}}function rX(t){var e=new tX({name:"line",subPixelOptimize:!0});return Tg(e.shape,t),e}function Tg(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var r=e[2];r?(t.cpx1=r[0],t.cpy1=r[1]):(t.cpx1=NaN,t.cpy1=NaN)}var nX=function(t){me(e,t);function e(r,n,a){var i=t.call(this)||this;return i._createLine(r,n,a),i}return e.prototype._createLine=function(r,n,a){var i=r.hostModel,o=r.getItemLayout(n),l=rX(o);l.shape.percent=0,Wt(l,{shape:{percent:1}},i,n),this.add(l),z(kg,function(c){var u=f3(c,r,n);this.add(u),this[u3(c)]=r.getItemVisual(n,c)},this),this._updateCommonStl(r,n,a)},e.prototype.updateData=function(r,n,a){var i=r.hostModel,o=this.childOfName("line"),l=r.getItemLayout(n),c={shape:{}};Tg(c.shape,l),_t(o,c,i,n),z(kg,function(u){var f=r.getItemVisual(n,u),d=u3(u);if(this[d]!==f){this.remove(this.childOfName(u));var h=f3(u,r,n);this.add(h)}this[d]=f},this),this._updateCommonStl(r,n,a)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(r,n,a){var i=r.hostModel,o=this.childOfName("line"),l=a&&a.emphasisLineStyle,c=a&&a.blurLineStyle,u=a&&a.selectLineStyle,f=a&&a.labelStatesModels,d=a&&a.emphasisDisabled,h=a&&a.focus,p=a&&a.blurScope;if(!a||r.hasItemOption){var m=r.getItemModel(n),v=m.getModel("emphasis");l=v.getModel("lineStyle").getLineStyle(),c=m.getModel(["blur","lineStyle"]).getLineStyle(),u=m.getModel(["select","lineStyle"]).getLineStyle(),d=v.get("disabled"),h=v.get("focus"),p=v.get("blurScope"),f=ln(m)}var g=r.getItemVisual(n,"style"),y=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=l,o.ensureState("blur").style=c,o.ensureState("select").style=u,z(kg,function(b){var C=this.childOfName(b);if(C){C.setColor(y),C.style.opacity=g.opacity;for(var k=0;k<Yt.length;k++){var $=Yt[k],N=o.getState($);if(N){var A=N.style||{},L=C.ensureState($),M=L.style||(L.style={});A.stroke!=null&&(M[C.__isEmptyBrush?"stroke":"fill"]=A.stroke),A.opacity!=null&&(M.opacity=A.opacity)}}C.markRedraw()}},this);var _=i.getRawValue(n);ca(this,f,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(b,C){return i.getFormattedLabel(b,C,r.dataType)}},inheritColor:y||"#000",defaultOpacity:g.opacity,defaultText:(_==null?r.getName(n):isFinite(_)?ht(_):_)+""});var w=this.getTextContent();if(w){var S=f.normal;w.__align=w.style.align,w.__verticalAlign=w.style.verticalAlign,w.__position=S.get("position")||"middle";var x=S.get("distance");se(x)||(x=[x,x]),w.__labelDistance=x}this.setTextConfig({position:null,local:!0,inside:!1}),sa(this,h,p,d)},e.prototype.highlight=function(){Fs(this)},e.prototype.downplay=function(){zs(this)},e.prototype.updateLayout=function(r,n){this.setLinePoints(r.getItemLayout(n))},e.prototype.setLinePoints=function(r){var n=this.childOfName("line");Tg(n.shape,r),n.dirty()},e.prototype.beforeUpdate=function(){var r=this,n=r.childOfName("fromSymbol"),a=r.childOfName("toSymbol"),i=r.getTextContent();if(!n&&!a&&(!i||i.ignore))return;for(var o=1,l=this.parent;l;)l.scaleX&&(o/=l.scaleX),l=l.parent;var c=r.childOfName("line");if(!this.__dirty&&!c.__dirty)return;var u=c.shape.percent,f=c.pointAt(0),d=c.pointAt(u),h=W_([],d,f);ep(h,h);function p(N,A){var L=N.__specifiedRotation;if(L==null){var M=c.tangentAt(A);N.attr("rotation",(A===1?-1:1)*Math.PI/2-Math.atan2(M[1],M[0]))}else N.attr("rotation",L)}if(n&&(n.setPosition(f),p(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),a&&(a.setPosition(d),p(a,1),a.scaleX=a.scaleY=o*u,a.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var m=void 0,v=void 0,g=i.__labelDistance,y=g[0]*o,_=g[1]*o,w=u/2,S=c.tangentAt(w),x=[S[1],-S[0]],b=c.pointAt(w);x[1]>0&&(x[0]=-x[0],x[1]=-x[1]);var C=S[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var k=-Math.atan2(S[1],S[0]);d[0]<f[0]&&(k=Math.PI+k),i.rotation=k}var $=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":$=-_,v="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":$=_,v="top";break;default:$=0,v="middle"}switch(i.__position){case"end":i.x=h[0]*y+d[0],i.y=h[1]*_+d[1],m=h[0]>.8?"left":h[0]<-.8?"right":"center",v=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*y+f[0],i.y=-h[1]*_+f[1],m=h[0]>.8?"right":h[0]<-.8?"left":"center",v=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*C+f[0],i.y=f[1]+$,m=S[0]<0?"right":"left",i.originX=-y*C,i.originY=-$;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=b[0],i.y=b[1]+$,m="center",i.originY=-$;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*C+d[0],i.y=d[1]+$,m=S[0]>=0?"right":"left",i.originX=y*C,i.originY=-$;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||v,align:i.__align||m})}},e}(lt),aX=nX,iX=function(){function t(e){this.group=new lt,this._LineCtor=e||aX}return t.prototype.updateData=function(e){var r=this;this._progressiveEls=null;var n=this,a=n.group,i=n._lineData;n._lineData=e,i||a.removeAll();var o=d3(e);e.diff(i).add(function(l){r._doAdd(e,l,o)}).update(function(l,c){r._doUpdate(i,e,c,l,o)}).remove(function(l){a.remove(i.getItemGraphicEl(l))}).execute()},t.prototype.updateLayout=function(){var e=this._lineData;!e||e.eachItemGraphicEl(function(r,n){r.updateLayout(e,n)},this)},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=d3(e),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r){this._progressiveEls=[];function n(l){!l.isGroup&&!oX(l)&&(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var i=r.getItemLayout(a);if(Mg(i)){var o=new this._LineCtor(r,a,this._seriesScope);o.traverse(n),this.group.add(o),r.setItemGraphicEl(a,o),this._progressiveEls.push(o)}}},t.prototype.remove=function(){this.group.removeAll()},t.prototype.eachRendered=function(e){po(this._progressiveEls||this.group,e)},t.prototype._doAdd=function(e,r,n){var a=e.getItemLayout(r);if(!!Mg(a)){var i=new this._LineCtor(e,r,n);e.setItemGraphicEl(r,i),this.group.add(i)}},t.prototype._doUpdate=function(e,r,n,a,i){var o=e.getItemGraphicEl(n);if(!Mg(r.getItemLayout(a))){this.group.remove(o);return}o?o.updateData(r,a,i):o=new this._LineCtor(r,a,i),r.setItemGraphicEl(a,o),this.group.add(o)},t}();function oX(t){return t.animators&&t.animators.length>0}function d3(t){var e=t.hostModel,r=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:ln(e)}}function h3(t){return isNaN(t[0])||isNaN(t[1])}function Mg(t){return t&&!h3(t[0])&&!h3(t[1])}var sX=iX,lX=["itemStyle","opacity"],cX=function(t){me(e,t);function e(r,n){var a=t.call(this)||this,i=a,o=new Gs,l=new ut;return i.setTextContent(l),a.setTextGuideLine(o),a.updateData(r,n,!0),a}return e.prototype.updateData=function(r,n,a){var i=this,o=r.hostModel,l=r.getItemModel(n),c=r.getItemLayout(n),u=l.getModel("emphasis"),f=l.get(lX);f=f==null?1:f,a||Zu(i),i.useStyle(r.getItemVisual(n,"style")),i.style.lineJoin="round",a?(i.setShape({points:c.points}),i.style.opacity=0,Wt(i,{style:{opacity:f}},o,n)):_t(i,{style:{opacity:f},shape:{points:c.points}},o,n),Hs(i,l),this._updateLabel(r,n),sa(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r,n){var a=this,i=this.getTextGuideLine(),o=a.getTextContent(),l=r.hostModel,c=r.getItemModel(n),u=r.getItemLayout(n),f=u.label,d=r.getItemVisual(n,"style"),h=d.fill;ca(o,ln(c),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:d.opacity,defaultText:r.getName(n)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}}),a.setTextConfig({local:!0,inside:!!f.inside,insideStroke:h,outsideFill:h});var p=f.linePoints;i.setShape({points:p}),a.textGuideLineConfig={anchor:p?new Me(p[0][0],p[0][1]):null},_t(o,{style:{x:f.x,y:f.y}},l,n),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),nk(a,ak(c),{stroke:h})},e}(Uu),uX=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,a){var i=r.getData(),o=this._data,l=this.group;i.diff(o).add(function(c){var u=new cX(i,c);i.setItemGraphicEl(c,u),l.add(u)}).update(function(c,u){var f=o.getItemGraphicEl(u);f.updateData(i,c),l.add(f),i.setItemGraphicEl(c,f)}).remove(function(c){var u=o.getItemGraphicEl(c);Zs(u,r,c)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(xr),fX=uX,dX=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new zk(Be(this.getData,this),Be(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.getInitialData=function(r,n){return Fk(this,{coordDimensions:["value"],encodeDefaulter:qe(fx,this)})},e.prototype._defaultLabelLine=function(r){Ns(r,"labelLine",["show"]);var n=r.labelLine,a=r.emphasis.labelLine;n.show=n.show&&r.label.show,a.show=a.show&&r.emphasis.label.show},e.prototype.getDataParams=function(r){var n=this.getData(),a=t.prototype.getDataParams.call(this,r),i=n.mapDimension("value"),o=n.getSum(i);return a.percent=o?+(n.get(i,r)/o*100).toFixed(2):0,a.$vars.push("percent"),a},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,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:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(un),hX=dX;function pX(t,e){return On(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function mX(t,e){for(var r=t.mapDimension("value"),n=t.mapArray(r,function(c){return c}),a=[],i=e==="ascending",o=0,l=t.count();o<l;o++)a[o]=o;return Ee(e)?a.sort(e):e!=="none"&&a.sort(function(c,u){return i?n[c]-n[u]:n[u]-n[c]}),a}function vX(t){var e=t.hostModel,r=e.get("orient");t.each(function(n){var a=t.getItemModel(n),i=a.getModel("label"),o=i.get("position"),l=a.getModel("labelLine"),c=t.getItemLayout(n),u=c.points,f=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",d,h,p,m;if(f)o==="insideLeft"?(h=(u[0][0]+u[3][0])/2+5,p=(u[0][1]+u[3][1])/2,d="left"):o==="insideRight"?(h=(u[1][0]+u[2][0])/2-5,p=(u[1][1]+u[2][1])/2,d="right"):(h=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,p=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,d="center"),m=[[h,p],[h,p]];else{var v=void 0,g=void 0,y=void 0,_=void 0,w=l.get("length");o==="left"?(v=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=v-w,h=y-5,d="right"):o==="right"?(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=v+w,h=y+5,d="left"):o==="top"?(v=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,_=g-w,p=_-5,d="center"):o==="bottom"?(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,_=g+w,p=_+5,d="center"):o==="rightTop"?(v=r==="horizontal"?u[3][0]:u[1][0],g=r==="horizontal"?u[3][1]:u[1][1],r==="horizontal"?(_=g-w,p=_-5,d="center"):(y=v+w,h=y+5,d="top")):o==="rightBottom"?(v=u[2][0],g=u[2][1],r==="horizontal"?(_=g+w,p=_+5,d="center"):(y=v+w,h=y+5,d="bottom")):o==="leftTop"?(v=u[0][0],g=r==="horizontal"?u[0][1]:u[1][1],r==="horizontal"?(_=g-w,p=_-5,d="center"):(y=v-w,h=y-5,d="right")):o==="leftBottom"?(v=r==="horizontal"?u[1][0]:u[3][0],g=r==="horizontal"?u[1][1]:u[2][1],r==="horizontal"?(_=g+w,p=_+5,d="center"):(y=v-w,h=y-5,d="right")):(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,r==="horizontal"?(_=g+w,p=_+5,d="center"):(y=v+w,h=y+5,d="left")),r==="horizontal"?(y=v,h=y):(_=g,p=_),m=[[v,g],[y,_]]}c.label={linePoints:m,x:h,y:p,verticalAlign:"middle",textAlign:d,inside:f}})}function gX(t,e){t.eachSeriesByType("funnel",function(r){var n=r.getData(),a=n.mapDimension("value"),i=r.get("sort"),o=pX(r,e),l=r.get("orient"),c=o.width,u=o.height,f=mX(n,i),d=o.x,h=o.y,p=l==="horizontal"?[ze(r.get("minSize"),u),ze(r.get("maxSize"),u)]:[ze(r.get("minSize"),c),ze(r.get("maxSize"),c)],m=n.getDataExtent(a),v=r.get("min"),g=r.get("max");v==null&&(v=Math.min(m[0],0)),g==null&&(g=m[1]);var y=r.get("funnelAlign"),_=r.get("gap"),w=l==="horizontal"?c:u,S=(w-_*(n.count()-1))/n.count(),x=function(O,T){if(l==="horizontal"){var E=n.get(a,O)||0,D=pr(E,[v,g],p,!0),P=void 0;switch(y){case"top":P=h;break;case"center":P=h+(u-D)/2;break;case"bottom":P=h+(u-D);break}return[[T,P],[T,P+D]]}var I=n.get(a,O)||0,V=pr(I,[v,g],p,!0),F;switch(y){case"left":F=d;break;case"center":F=d+(c-V)/2;break;case"right":F=d+c-V;break}return[[F,T],[F+V,T]]};i==="ascending"&&(S=-S,_=-_,l==="horizontal"?d+=c:h+=u,f=f.reverse());for(var b=0;b<f.length;b++){var C=f[b],k=f[b+1],$=n.getItemModel(C);if(l==="horizontal"){var N=$.get(["itemStyle","width"]);N==null?N=S:(N=ze(N,c),i==="ascending"&&(N=-N));var A=x(C,d),L=x(k,d+N);d+=N+_,n.setItemLayout(C,{points:A.concat(L.slice().reverse())})}else{var M=$.get(["itemStyle","height"]);M==null?M=S:(M=ze(M,u),i==="ascending"&&(M=-M));var A=x(C,h),L=x(k,h+M);h+=M+_,n.setItemLayout(C,{points:A.concat(L.slice().reverse())})}}vX(n)})}function yX(t){t.registerChartView(fX),t.registerSeriesModel(hX),t.registerLayout(gX),t.registerProcessor(Ik("funnel"))}function _X(t,e,r,n,a,i){t=t||0;var o=r[1]-r[0];if(a!=null&&(a=Eo(a,[0,o])),i!=null&&(i=Math.max(i,a!=null?a:0)),n==="all"){var l=Math.abs(e[1]-e[0]);l=Eo(l,[0,o]),a=i=Eo(l,[a,i]),n=0}e[0]=Eo(e[0],r),e[1]=Eo(e[1],r);var c=$g(e,n);e[n]+=t;var u=a||0,f=r.slice();c.sign<0?f[0]+=u:f[1]-=u,e[n]=Eo(e[n],f);var d;return d=$g(e,n),a!=null&&(d.sign!==c.sign||d.span<a)&&(e[1-n]=e[n]+c.sign*a),d=$g(e,n),i!=null&&d.span>i&&(e[1-n]=e[n]+d.sign*i),e}function $g(t,e){var r=t[e]-t[1-e];return{span:Math.abs(r),sign:r>0?-1:r<0?1:e?-1:1}}function Eo(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var wX=256,bX=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Jn.createCanvas();this.canvas=e}return t.prototype.update=function(e,r,n,a,i,o){var l=this._getBrush(),c=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),f=this.pointSize+this.blurSize,d=this.canvas,h=d.getContext("2d"),p=e.length;d.width=r,d.height=n;for(var m=0;m<p;++m){var v=e[m],g=v[0],y=v[1],_=v[2],w=a(_);h.globalAlpha=w,h.drawImage(l,g-f,y-f)}if(!d.width||!d.height)return d;for(var S=h.getImageData(0,0,d.width,d.height),x=S.data,b=0,C=x.length,k=this.minOpacity,$=this.maxOpacity,N=$-k;b<C;){var w=x[b+3]/256,A=Math.floor(w*(wX-1))*4;if(w>0){var L=o(w)?c:u;w>0&&(w=w*N+k),x[b++]=L[A],x[b++]=L[A+1],x[b++]=L[A+2],x[b++]=L[A+3]*w*256}else b+=4}return h.putImageData(S,0,0),d},t.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Jn.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;e.width=n,e.height=n;var a=e.getContext("2d");return a.clearRect(0,0,n,n),a.shadowOffsetX=n,a.shadowBlur=this.blurSize,a.shadowColor="#000",a.beginPath(),a.arc(-r,r,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),e},t.prototype._getGradient=function(e,r){for(var n=this._gradientPixels,a=n[r]||(n[r]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,l=0;l<256;l++)e[r](l/255,!0,i),a[o++]=i[0],a[o++]=i[1],a[o++]=i[2],a[o++]=i[3];return a},t}(),SX=bX;function xX(t,e,r){var n=t[1]-t[0];e=he(e,function(o){return{interval:[(o.interval[0]-t[0])/n,(o.interval[1]-t[0])/n]}});var a=e.length,i=0;return function(o){var l;for(l=i;l<a;l++){var c=e[l].interval;if(c[0]<=o&&o<=c[1]){i=l;break}}if(l===a)for(l=i-1;l>=0;l--){var c=e[l].interval;if(c[0]<=o&&o<=c[1]){i=l;break}}return l>=0&&l<a&&r[l]}}function CX(t,e){var r=t[1]-t[0];return e=[(e[0]-t[0])/r,(e[1]-t[0])/r],function(n){return n>=e[0]&&n<=e[1]}}function p3(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}var kX=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,a){var i;n.eachComponent("visualMap",function(l){l.eachTargetSeries(function(c){c===r&&(i=l)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(r,a,0,r.getData().count()):p3(o)&&this._renderOnGeo(o,r,i,a)},e.prototype.incrementalPrepareRender=function(r,n,a){this.group.removeAll()},e.prototype.incrementalRender=function(r,n,a,i){var o=n.coordinateSystem;o&&(p3(o)?this.render(n,a,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,i,r.start,r.end,!0)))},e.prototype.eachRendered=function(r){po(this._progressiveEls||this.group,r)},e.prototype._renderOnCartesianAndCalendar=function(r,n,a,i,o){var l=r.coordinateSystem,c=Cl(l,"cartesian2d"),u,f,d,h;if(c){var p=l.getAxis("x"),m=l.getAxis("y");u=p.getBandWidth()+.5,f=m.getBandWidth()+.5,d=p.scale.getExtent(),h=m.scale.getExtent()}for(var v=this.group,g=r.getData(),y=r.getModel(["emphasis","itemStyle"]).getItemStyle(),_=r.getModel(["blur","itemStyle"]).getItemStyle(),w=r.getModel(["select","itemStyle"]).getItemStyle(),S=r.get(["itemStyle","borderRadius"]),x=ln(r),b=r.getModel("emphasis"),C=b.get("focus"),k=b.get("blurScope"),$=b.get("disabled"),N=c?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],A=a;A<i;A++){var L=void 0,M=g.getItemVisual(A,"style");if(c){var O=g.get(N[0],A),T=g.get(N[1],A);if(isNaN(g.get(N[2],A))||O<d[0]||O>d[1]||T<h[0]||T>h[1])continue;var E=l.dataToPoint([O,T]);L=new it({shape:{x:E[0]-u/2,y:E[1]-f/2,width:u,height:f},style:M})}else{if(isNaN(g.get(N[1],A)))continue;L=new it({z2:1,shape:l.dataToRect([g.get(N[0],A)]).contentShape,style:M})}if(g.hasItemOption){var D=g.getItemModel(A),P=D.getModel("emphasis");y=P.getModel("itemStyle").getItemStyle(),_=D.getModel(["blur","itemStyle"]).getItemStyle(),w=D.getModel(["select","itemStyle"]).getItemStyle(),S=D.get(["itemStyle","borderRadius"]),C=P.get("focus"),k=P.get("blurScope"),$=P.get("disabled"),x=ln(D)}L.shape.r=S;var I=r.getRawValue(A),V="-";I&&I[2]!=null&&(V=I[2]+""),ca(L,x,{labelFetcher:r,labelDataIndex:A,defaultOpacity:M.opacity,defaultText:V}),L.ensureState("emphasis").style=y,L.ensureState("blur").style=_,L.ensureState("select").style=w,sa(L,C,k,$),L.incremental=o,o&&(L.states.emphasis.hoverLayer=!0),v.add(L),g.setItemGraphicEl(A,L),this._progressiveEls&&this._progressiveEls.push(L)}},e.prototype._renderOnGeo=function(r,n,a,i){var o=a.targetVisuals.inRange,l=a.targetVisuals.outOfRange,c=n.getData(),u=this._hmLayer||this._hmLayer||new SX;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var f=r.getViewRect().clone(),d=r.getRoamTransform();f.applyTransform(d);var h=Math.max(f.x,0),p=Math.max(f.y,0),m=Math.min(f.width+f.x,i.getWidth()),v=Math.min(f.height+f.y,i.getHeight()),g=m-h,y=v-p,_=[c.mapDimension("lng"),c.mapDimension("lat"),c.mapDimension("value")],w=c.mapArray(_,function(C,k,$){var N=r.dataToPoint([C,k]);return N[0]-=h,N[1]-=p,N.push($),N}),S=a.getExtent(),x=a.type==="visualMap.continuous"?CX(S,a.option.range):xX(S,a.getPieceList(),a.option.selected);u.update(w,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:l.color.getColorMapper()},x);var b=new Ir({style:{width:g,height:y,x:h,y:p,image:u.canvas},silent:!0});this.group.add(b)},e.type="heatmap",e}(xr),TX=kX,MX=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return Bf(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var r=mf.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(un),$X=MX;function NX(t){t.registerChartView(TX),t.registerSeriesModel($X)}var _i=ct(),m3=Te,Ng=Be,EX=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,r,n,a){var i=r.get("value"),o=r.get("status");if(this._axisModel=e,this._axisPointerModel=r,this._api=n,!(!a&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var l=this._group,c=this._handle;if(!o||o==="hide"){l&&l.hide(),c&&c.hide();return}l&&l.show(),c&&c.show();var u={};this.makeElOption(u,i,e,r,n);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var d=this._moveAnimation=this.determineAnimation(e,r);if(!l)l=this._group=new lt,this.createPointerEl(l,u,e,r),this.createLabelEl(l,u,e,r),n.getZr().add(l);else{var h=qe(v3,r,d);this.updatePointerEl(l,u,h),this.updateLabelEl(l,u,h,r)}_3(l,r,!0),this._renderHandle(i)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,r){var n=r.get("animation"),a=e.axis,i=a.type==="category",o=r.get("snap");if(!o&&!i)return!1;if(n==="auto"||n==null){var l=this.animationThreshold;if(i&&a.getBandWidth()>l)return!0;if(o){var c=vg(e).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/c>l}return!1}return n===!0},t.prototype.makeElOption=function(e,r,n,a,i){},t.prototype.createPointerEl=function(e,r,n,a){var i=r.pointer;if(i){var o=_i(e).pointerEl=new uU[i.type](m3(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,n,a){if(r.label){var i=_i(e).labelEl=new ut(m3(r.label));e.add(i),y3(i,a)}},t.prototype.updatePointerEl=function(e,r,n){var a=_i(e).pointerEl;a&&r.pointer&&(a.setStyle(r.pointer.style),n(a,{shape:r.pointer.shape}))},t.prototype.updateLabelEl=function(e,r,n,a){var i=_i(e).labelEl;i&&(i.setStyle(r.label.style),n(i,{x:r.label.x,y:r.label.y}),y3(i,a))},t.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),a=this._handle,i=r.getModel("handle"),o=r.get("status");if(!i.get("show")||!o||o==="hide"){a&&n.remove(a),this._handle=null;return}var l;this._handle||(l=!0,a=this._handle=Vm(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){vs(u.event)},onmousedown:Ng(this._onHandleDragMove,this,0,0),drift:Ng(this._onHandleDragMove,this),ondragend:Ng(this._onHandleDragEnd,this)}),n.add(a)),_3(a,r,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var c=i.get("size");se(c)||(c=[c,c]),a.scaleX=c[0]/2,a.scaleY=c[1]/2,d2(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,l)}},t.prototype._moveHandleToValue=function(e,r){v3(this._axisPointerModel,!r&&this._moveAnimation,this._handle,Eg(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,r){var n=this._handle;if(!!n){this._dragging=!0;var a=this.updateHandleTransform(Eg(n),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr(Eg(a)),_i(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(!!e){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(!!e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var r=e.getZr(),n=this._group,a=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),a&&r.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),wv(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,r,n){return n=n||0,{x:e[n],y:e[1-n],width:r[n],height:r[1-n]}},t}();function v3(t,e,r,n){g3(_i(r).lastProp,n)||(_i(r).lastProp=n,e?_t(r,n,t):(r.stopAnimation(),r.attr(n)))}function g3(t,e){if(_e(t)&&_e(e)){var r=!0;return z(e,function(n,a){r=r&&g3(t[a],n)}),!!r}else return t===e}function y3(t,e){t[e.get(["label","show"])?"show":"hide"]()}function Eg(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function _3(t,e,r){var n=e.get("z"),a=e.get("zlevel");t&&t.traverse(function(i){i.type!=="group"&&(n!=null&&(i.z=n),a!=null&&(i.zlevel=a),i.silent=r)})}var AX=EX;function DX(t){var e=t.get("type"),r=t.getModel(e+"Style"),n;return e==="line"?(n=r.getLineStyle(),n.fill=null):e==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function OX(t,e,r,n,a){var i=r.get("value"),o=w3(i,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),l=r.getModel("label"),c=Qs(l.get("padding")||0),u=l.getFont(),f=jp(o,u),d=a.position,h=f.width+c[1]+c[3],p=f.height+c[0]+c[2],m=a.align;m==="right"&&(d[0]-=h),m==="center"&&(d[0]-=h/2);var v=a.verticalAlign;v==="bottom"&&(d[1]-=p),v==="middle"&&(d[1]-=p/2),LX(d,h,p,n);var g=l.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),t.label={x:d[0],y:d[1],style:yr(l,{text:o,font:u,fill:l.getTextColor(),padding:c,backgroundColor:g}),z2:10}}function LX(t,e,r,n){var a=n.getWidth(),i=n.getHeight();t[0]=Math.min(t[0]+e,a)-e,t[1]=Math.min(t[1]+r,i)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function w3(t,e,r,n,a){t=e.scale.parse(t);var i=e.scale.getLabel({value:t},{precision:a.precision}),o=a.formatter;if(o){var l={value:Qv(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};z(n,function(c){var u=r.getSeriesByIndex(c.seriesIndex),f=c.dataIndexInside,d=u&&u.getDataParams(f);d&&l.seriesData.push(d)}),ve(o)?i=o.replace("{value}",i):Ee(o)&&(i=o(l))}return i}function b3(t,e,r){var n=Cs();return Vp(n,n,r.rotation),Rp(n,n,r.position),ho([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function PX(t,e,r,n,a,i){var o=e3.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=a.get(["label","margin"]),OX(e,n,a,i,{position:b3(n.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function BX(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function IX(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}var RX=function(t){me(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,a,i,o){var l=a.axis,c=l.grid,u=i.get("type"),f=S3(c,l).getOtherAxis(l).getGlobalExtent(),d=l.toGlobalCoord(l.dataToCoord(n,!0));if(u&&u!=="none"){var h=DX(i),p=VX[u](l,d,f);p.style=h,r.graphicKey=p.type,r.pointer=p}var m=dg(c.model,a);PX(n,r,m,a,i,o)},e.prototype.getHandleTransform=function(r,n,a){var i=dg(n.axis.grid.model,n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=b3(n.axis,r,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,a,i){var o=a.axis,l=o.grid,c=o.getGlobalExtent(!0),u=S3(l,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,d=[r.x,r.y];d[f]+=n[f],d[f]=Math.min(c[1],d[f]),d[f]=Math.max(c[0],d[f]);var h=(u[1]+u[0])/2,p=[h,h];p[f]=d[f];var m=[{verticalAlign:"middle"},{align:"center"}];return{x:d[0],y:d[1],rotation:r.rotation,cursorPoint:p,tooltipOption:m[f]}},e}(AX);function S3(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var VX={line:function(t,e,r){var n=BX([e,r[0]],[e,r[1]],x3(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=Math.max(1,t.getBandWidth()),a=r[1]-r[0];return{type:"Rect",shape:IX([e-n/2,r[0]],[n,a],x3(t))}}};function x3(t){return t.dim==="x"?0:1}var FX=RX,zX=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(tt),HX=zX,Rn=ct(),UX=z;function C3(t,e,r){if(!Pe.node){var n=e.getZr();Rn(n).records||(Rn(n).records={}),jX(n,e);var a=Rn(n).records[t]||(Rn(n).records[t]={});a.handler=r}}function jX(t,e){if(Rn(t).initialized)return;Rn(t).initialized=!0,r("click",qe(k3,"click")),r("mousemove",qe(k3,"mousemove")),r("globalout",GX);function r(n,a){t.on(n,function(i){var o=WX(e);UX(Rn(t).records,function(l){l&&a(l,i,o.dispatchAction)}),YX(o.pendings,e)})}}function YX(t,e){var r=t.showTip.length,n=t.hideTip.length,a;r?a=t.showTip[r-1]:n&&(a=t.hideTip[n-1]),a&&(a.dispatchAction=null,e.dispatchAction(a))}function GX(t,e,r){t.handler("leave",null,r)}function k3(t,e,r,n){e.handler(t,r,n)}function WX(t){var e={showTip:[],hideTip:[]},r=function(n){var a=e[n.type];a?a.push(n):(n.dispatchAction=r,t.dispatchAction(n))};return{dispatchAction:r,pendings:e}}function Ag(t,e){if(!Pe.node){var r=e.getZr(),n=(Rn(r).records||{})[t];n&&(Rn(r).records[t]=null)}}var ZX=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,a){var i=n.getComponent("tooltip"),o=r.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";C3("axisPointer",a,function(l,c,u){o!=="none"&&(l==="leave"||o.indexOf(l)>=0)&&u({type:"updateAxisPointer",currTrigger:l,x:c&&c.offsetX,y:c&&c.offsetY})})},e.prototype.remove=function(r,n){Ag("axisPointer",n)},e.prototype.dispose=function(r,n){Ag("axisPointer",n)},e.type="axisPointer",e}(Hr),qX=ZX;function T3(t,e){var r=[],n=t.seriesIndex,a;if(n==null||!(a=e.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=Ua(i,t);if(o==null||o<0||se(o))return{point:[]};var l=i.getItemGraphicEl(o),c=a.coordinateSystem;if(a.getTooltipPosition)r=a.getTooltipPosition(o)||[];else if(c&&c.dataToPoint)if(t.isStacked){var u=c.getBaseAxis(),f=c.getOtherAxis(u),d=f.dim,h=u.dim,p=d==="x"||d==="radius"?1:0,m=i.mapDimension(h),v=[];v[p]=i.get(m,o),v[1-p]=i.get(i.getCalculationInfo("stackResultDimension"),o),r=c.dataToPoint(v)||[]}else r=c.dataToPoint(i.getValues(he(c.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(l){var g=l.getBoundingRect().clone();g.applyTransform(l.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:l}}var M3=ct();function XX(t,e,r){var n=t.currTrigger,a=[t.x,t.y],i=t,o=t.dispatchAction||Be(r.dispatchAction,r),l=e.getComponent("axisPointer").coordSysAxesInfo;if(!!l){Qf(a)&&(a=T3({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var c=Qf(a),u=i.axesInfo,f=l.axesInfo,d=n==="leave"||Qf(a),h={},p={},m={list:[],map:{}},v={showPointer:qe(JX,p),showTooltip:qe(QX,m)};z(l.coordSysMap,function(y,_){var w=c||y.containPoint(a);z(l.coordSysAxesInfo[_],function(S,x){var b=S.axis,C=nK(u,S);if(!d&&w&&(!u||C)){var k=C&&C.value;k==null&&!c&&(k=b.pointToData(a)),k!=null&&$3(S,k,v,!1,h)}})});var g={};return z(f,function(y,_){var w=y.linkGroup;w&&!p[_]&&z(w.axesInfo,function(S,x){var b=p[x];if(S!==y&&b){var C=b.value;w.mapper&&(C=y.axis.scale.parse(w.mapper(C,N3(S),N3(y)))),g[y.key]=C}})}),z(g,function(y,_){$3(f[_],y,v,!0,h)}),eK(p,f,h),tK(m,a,t,o),rK(f,o,r),h}}function $3(t,e,r,n,a){var i=t.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=KX(e,t),l=o.payloadBatch,c=o.snapToValue;l[0]&&a.seriesIndex==null&&re(a,l[0]),!n&&t.snap&&i.containData(c)&&c!=null&&(e=c),r.showPointer(t,e,l),r.showTooltip(t,o,c)}}function KX(t,e){var r=e.axis,n=r.dim,a=t,i=[],o=Number.MAX_VALUE,l=-1;return z(e.seriesModels,function(c,u){var f=c.getData().mapDimensionsAll(n),d,h;if(c.getAxisTooltipData){var p=c.getAxisTooltipData(f,t,r);h=p.dataIndices,d=p.nestestValue}else{if(h=c.getData().indicesOfNearest(f[0],t,r.type==="category"?.5:null),!h.length)return;d=c.getData().get(f[0],h[0])}if(!(d==null||!isFinite(d))){var m=t-d,v=Math.abs(m);v<=o&&((v<o||m>=0&&l<0)&&(o=v,l=m,a=d,i.length=0),z(h,function(g){i.push({seriesIndex:c.seriesIndex,dataIndexInside:g,dataIndex:c.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:a}}function JX(t,e,r,n){t[e.key]={value:r,payloadBatch:n}}function QX(t,e,r,n){var a=r.payloadBatch,i=e.axis,o=i.model,l=e.axisPointerModel;if(!(!e.triggerTooltip||!a.length)){var c=e.coordSys.model,u=kl(c),f=t.map[u];f||(f=t.map[u]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},t.list.push(f)),f.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:l.get(["label","precision"]),formatter:l.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function eK(t,e,r){var n=r.axesInfo=[];z(e,function(a,i){var o=a.axisPointerModel.option,l=t[i];l?(!a.useHandle&&(o.status="show"),o.value=l.value,o.seriesDataIndices=(l.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function tK(t,e,r,n){if(Qf(e)||!t.list.length){n({type:"hideTip"});return}var a=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:t.list})}function rK(t,e,r){var n=r.getZr(),a="axisPointerLastHighlights",i=M3(n)[a]||{},o=M3(n)[a]={};z(t,function(u,f){var d=u.axisPointerModel.option;d.status==="show"&&z(d.seriesDataIndices,function(h){var p=h.seriesIndex+" | "+h.dataIndex;o[p]=h})});var l=[],c=[];z(i,function(u,f){!o[f]&&c.push(u)}),z(o,function(u,f){!i[f]&&l.push(u)}),c.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:c}),l.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:l})}function nK(t,e){for(var r=0;r<(t||[]).length;r++){var n=t[r];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function N3(t){var e=t.axis.model,r={},n=r.axisDim=t.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=e.componentIndex,r.axisName=r[n+"AxisName"]=e.name,r.axisId=r[n+"AxisId"]=e.id,r}function Qf(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function E3(t){r3.registerAxisPointerClass("CartesianAxisPointer",FX),t.registerComponentModel(HX),t.registerComponentView(qX),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var r=e.axisPointer.link;r&&!se(r)&&(e.axisPointer.link=[r])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,r){e.getComponent("axisPointer").coordSysAxesInfo=Lq(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},XX)}function aK(t){dn(qq),dn(E3)}function iK(t,e){var r=Qs(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new it({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1}),t}var oK=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(tt),sK=oK;function A3(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function D3(t){if(!!Pe.domSupported){for(var e=document.documentElement.style,r=0,n=t.length;r<n;r++)if(t[r]in e)return t[r]}}var O3=D3(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),lK=D3(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function L3(t,e){if(!t)return e;e=nx(e,!0);var r=t.indexOf(e);return t=r===-1?e:"-"+t.slice(0,r)+"-"+e,t.toLowerCase()}function cK(t,e){var r=t.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t);return r?e?r[e]:r:null}var uK=L3(lK,"transition"),Dg=L3(O3,"transform"),fK="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Pe.transform3dSupported?"will-change:transform;":"");function dK(t){return t=t==="left"?"right":t==="right"?"left":t==="top"?"bottom":"top",t}function hK(t,e,r){if(!ve(r)||r==="inside")return"";var n=t.get("backgroundColor"),a=t.get("borderWidth");e=si(e);var i=dK(r),o=Math.max(Math.round(a)*1.5,6),l="",c=Dg+":",u;Ge(["left","right"],i)>-1?(l+="top:50%",c+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(l+="left:50%",c+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var f=u*Math.PI/180,d=o+a,h=d*Math.abs(Math.cos(f))+d*Math.abs(Math.sin(f)),p=Math.round(((h-Math.SQRT2*a)/2+Math.SQRT2*a-(h-d)/2)*100)/100;l+=";"+i+":-"+p+"px";var m=e+" solid "+a+"px;",v=["position:absolute;width:"+o+"px;height:"+o+"px;",l+";"+c+";","border-bottom:"+m,"border-right:"+m,"background-color:"+n+";"];return'<div style="'+v.join("")+'"></div>'}function pK(t,e){var r="cubic-bezier(0.23,1,0.32,1)",n=" "+t/2+"s "+r,a="opacity"+n+",visibility"+n;return e||(n=" "+t+"s "+r,a+=Pe.transformSupported?","+Dg+n:",left"+n+",top"+n),uK+":"+a}function P3(t,e,r){var n=t.toFixed(0)+"px",a=e.toFixed(0)+"px";if(!Pe.transformSupported)return r?"top:"+a+";left:"+n+";":[["top",a],["left",n]];var i=Pe.transform3dSupported,o="translate"+(i?"3d":"")+"("+n+","+a+(i?",0":"")+")";return r?"top:0;left:0;"+Dg+":"+o+";":[["top",0],["left",0],[O3,o]]}function mK(t){var e=[],r=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont()),r&&e.push("line-height:"+Math.round(r*3/2)+"px");var a=t.get("textShadowColor"),i=t.get("textShadowBlur")||0,o=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return a&&i&&e.push("text-shadow:"+o+"px "+l+"px "+i+"px "+a),z(["decoration","align"],function(c){var u=t.get(c);u&&e.push("text-"+c+":"+u)}),e.join(";")}function vK(t,e,r){var n=[],a=t.get("transitionDuration"),i=t.get("backgroundColor"),o=t.get("shadowBlur"),l=t.get("shadowColor"),c=t.get("shadowOffsetX"),u=t.get("shadowOffsetY"),f=t.getModel("textStyle"),d=a2(t,"html"),h=c+"px "+u+"px "+o+"px "+l;return n.push("box-shadow:"+h),e&&a&&n.push(pK(a,r)),i&&n.push("background-color:"+i),z(["width","color","radius"],function(p){var m="border-"+p,v=nx(m),g=t.get(v);g!=null&&n.push(m+":"+g+(p==="color"?"":"px"))}),n.push(mK(f)),d!=null&&n.push("padding:"+Qs(d).join("px ")+"px"),n.join(";")+";"}function B3(t,e,r,n,a){var i=e&&e.painter;if(r){var o=i&&i.getViewportRoot();o&&n9(t,o,document.body,n,a)}else{t[0]=n,t[1]=a;var l=i&&i.getViewportRootOffset();l&&(t[0]+=l.offsetLeft,t[1]+=l.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var gK=function(){function t(e,r,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,Pe.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var i=this._zr=r.getZr(),o=this._appendToBody=n&&n.appendToBody;B3(this._styleCoord,i,o,r.getWidth()/2,r.getHeight()/2),o?document.body.appendChild(a):e.appendChild(a),this._container=e;var l=this;a.onmouseenter=function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0},a.onmousemove=function(c){if(c=c||window.event,!l._enterable){var u=i.handler,f=i.painter.getViewportRoot();fr(f,c,!0),u.dispatch("mousemove",c)}},a.onmouseleave=function(){l._inContent=!1,l._enterable&&l._show&&l.hideLater(l._hideDelay)}}return t.prototype.update=function(e){var r=this._container,n=cK(r,"position"),a=r.style;a.position!=="absolute"&&n!=="absolute"&&(a.position="relative");var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this.el.className=e.get("className")||""},t.prototype.show=function(e,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,a=n.style,i=this._styleCoord;n.innerHTML?a.cssText=fK+vK(e,!this._firstShow,this._longHide)+P3(i[0],i[1],!0)+("border-color:"+si(r)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,r,n,a,i){var o=this.el;if(e==null){o.innerHTML="";return}var l="";if(ve(i)&&n.get("trigger")==="item"&&!A3(n)&&(l=hK(n,a,i)),ve(e))o.innerHTML=e+l;else if(e){o.innerHTML="",se(e)||(e=[e]);for(var c=0;c<e.length;c++)Gc(e[c])&&e[c].parentNode!==o&&o.appendChild(e[c]);if(l&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=l,o.appendChild(u)}}},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},t.prototype.moveTo=function(e,r){var n=this._styleCoord;if(B3(n,this._zr,this._appendToBody,e,r),n[0]!=null&&n[1]!=null){var a=this.el.style,i=P3(n[0],n[1]);z(i,function(o){a[o[0]]=o[1]})}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),r*this._zr.getHeight())},t.prototype.hide=function(){var e=this,r=this.el.style;r.visibility="hidden",r.opacity="0",Pe.transform3dSupported&&(r.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Be(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},t}(),yK=gK,_K=function(){function t(e){this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._zr=e.getZr(),R3(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return t.prototype.update=function(e){var r=e.get("alwaysShowContent");r&&this._moveIfResized()},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(e,r,n,a,i){var o=this;_e(e)&&jt(""),this.el&&this._zr.remove(this.el);var l=n.getModel("textStyle");this.el=new ut({style:{rich:r.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:a,textShadowColor:l.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:a2(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),z(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),z(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=l.get(u)||0}),this._zr.add(this.el);var c=this;this.el.on("mouseover",function(){c._enterable&&(clearTimeout(c._hideTimeout),c._show=!0),c._inContent=!0}),this.el.on("mouseout",function(){c._enterable&&c._show&&c.hideLater(c._hideDelay),c._inContent=!1})},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el,r=this.el.getBoundingRect(),n=I3(e.style);return[r.width+n.left+n.right,r.height+n.top+n.bottom]},t.prototype.moveTo=function(e,r){var n=this.el;if(n){var a=this._styleCoord;R3(a,this._zr,e,r),e=a[0],r=a[1];var i=n.style,o=wa(i.borderWidth||0),l=I3(i);n.x=e+o+l.left,n.y=r+o+l.top,n.markRedraw()}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),r*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Be(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this._zr.remove(this.el)},t}();function wa(t){return Math.max(0,t)}function I3(t){var e=wa(t.shadowBlur||0),r=wa(t.shadowOffsetX||0),n=wa(t.shadowOffsetY||0);return{left:wa(e-r),right:wa(e+r),top:wa(e-n),bottom:wa(e+n)}}function R3(t,e,r,n){t[0]=r,t[1]=n,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var wK=_K,bK=new it({shape:{x:-1,y:-1,width:2,height:2}}),SK=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){if(!(Pe.node||!n.getDom())){var a=r.getComponent("tooltip"),i=this._renderMode=qF(a.get("renderMode"));this._tooltipContent=i==="richText"?new wK(n):new yK(n.getDom(),n,{appendToBody:a.get("appendToBody",!0)})}},e.prototype.render=function(r,n,a){if(!(Pe.node||!a.getDom())){this.group.removeAll(),this._tooltipModel=r,this._ecModel=n,this._api=a,this._alwaysShowContent=r.get("alwaysShowContent");var i=this._tooltipContent;i.update(r),i.setEnterable(r.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&r.get("transitionDuration")?d2(this,"_updatePosition",50,"fixRate"):wv(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var r=this._tooltipModel,n=r.get("triggerOn");C3("itemTooltip",this._api,Be(function(a,i,o){n!=="none"&&(n.indexOf(a)>=0?this._tryShow(i,o):a==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,a=this._api;if(this._lastX!=null&&this._lastY!=null&&r.get("triggerOn")!=="none"){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!a.isDisposed()&&i.manuallyShowTip(r,n,a,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(r,n,a,i){if(!(i.from===this.uid||Pe.node||!a.getDom())){var o=V3(i,a);this._ticket="";var l=i.dataByCoordSys,c=TK(i,n,a);if(c){var u=c.el.getBoundingRect().clone();u.applyTransform(c.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:c.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var f=bK;f.x=i.x,f.y=i.y,f.update(),He(f).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:f},o)}else if(l)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:l,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,a,i))return;var d=T3(i,n),h=d.point[0],p=d.point[1];h!=null&&p!=null&&this._tryShow({offsetX:h,offsetY:p,target:d.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(a.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:a.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(r,n,a,i){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(V3(i,a))},e.prototype._manuallyAxisShowTip=function(r,n,a,i){var o=i.seriesIndex,l=i.dataIndex,c=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||l==null||c==null)){var u=n.getSeriesByIndex(o);if(!!u){var f=u.getData(),d=Nl([f.getItemModel(l),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(d.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:l,position:i.position}),!0}}},e.prototype._tryShow=function(r,n){var a=r.target,i=this._tooltipModel;if(!!i){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(a){this._lastDataByCoordSys=null;var l,c;cl(a,function(u){if(He(u).dataIndex!=null)return l=u,!0;if(He(u).tooltipConfig!=null)return c=u,!0},!0),l?this._showSeriesItemTooltip(r,l,n):c?this._showComponentItemTooltip(r,c,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(r,n){var a=r.get("showDelay");n=Be(n,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(n,a):n()},e.prototype._showAxisTooltip=function(r,n){var a=this._ecModel,i=this._tooltipModel,o=[n.offsetX,n.offsetY],l=Nl([n.tooltipOption],i),c=this._renderMode,u=[],f=fi("section",{blocks:[],noHeader:!0}),d=[],h=new pv;z(r,function(_){z(_.dataByAxis,function(w){var S=a.getComponent(w.axisDim+"Axis",w.axisIndex),x=w.value;if(!(!S||x==null)){var b=w3(x,S.axis,a,w.seriesDataIndices,w.valueLabelOpt),C=fi("section",{header:b,noHeader:!Kr(b),sortBlocks:!0,blocks:[]});f.blocks.push(C),z(w.seriesDataIndices,function(k){var $=a.getSeriesByIndex(k.seriesIndex),N=k.dataIndexInside,A=$.getDataParams(N);if(!(A.dataIndex<0)){A.axisDim=w.axisDim,A.axisIndex=w.axisIndex,A.axisType=w.axisType,A.axisId=w.axisId,A.axisValue=Qv(S.axis,{value:x}),A.axisValueLabel=b,A.marker=h.makeTooltipMarker("item",si(A.color),c);var L=jx($.formatTooltip(N,!0,null)),M=L.frag;if(M){var O=Nl([$],i).get("valueFormatter");C.blocks.push(O?re({valueFormatter:O},M):M)}L.text&&d.push(L.text),u.push(A)}})}})}),f.blocks.reverse(),d.reverse();var p=n.position,m=l.get("order"),v=r2(f,h,c,m,a.get("useUTC"),l.get("textStyle"));v&&d.unshift(v);var g=c==="richText"?`
67
+
68
+ `:"<br/>",y=d.join(g);this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(l,p,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(l,y,u,Math.random()+"",o[0],o[1],p,null,h)})},e.prototype._showSeriesItemTooltip=function(r,n,a){var i=this._ecModel,o=He(n),l=o.seriesIndex,c=i.getSeriesByIndex(l),u=o.dataModel||c,f=o.dataIndex,d=o.dataType,h=u.getData(d),p=this._renderMode,m=r.positionDefault,v=Nl([h.getItemModel(f),u,c&&(c.coordinateSystem||{}).model],this._tooltipModel,m?{position:m}:null),g=v.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(f,d),_=new pv;y.marker=_.makeTooltipMarker("item",si(y.color),p);var w=jx(u.formatTooltip(f,!1,d)),S=v.get("order"),x=v.get("valueFormatter"),b=w.frag,C=b?r2(x?re({valueFormatter:x},b):b,_,p,S,i.get("useUTC"),v.get("textStyle")):w.text,k="item_"+u.name+"_"+f;this._showOrMove(v,function(){this._showTooltipContent(v,C,y,k,r.offsetX,r.offsetY,r.position,r.target,_)}),a({type:"showTip",dataIndexInside:f,dataIndex:h.getRawIndex(f),seriesIndex:l,from:this.uid})}},e.prototype._showComponentItemTooltip=function(r,n,a){var i=He(n),o=i.tooltipConfig,l=o.option||{};if(ve(l)){var c=l;l={content:c,formatter:c}}var u=[l],f=this._ecModel.getComponent(i.componentMainType,i.componentIndex);f&&u.push(f),u.push({formatter:l.content});var d=r.positionDefault,h=Nl(u,this._tooltipModel,d?{position:d}:null),p=h.get("content"),m=Math.random()+"",v=new pv;this._showOrMove(h,function(){var g=Te(h.get("formatterParams")||{});this._showTooltipContent(h,p,g,m,r.offsetX,r.offsetY,r.position,n,v)}),a({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(r,n,a,i,o,l,c,u,f){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var d=this._tooltipContent;d.setEnterable(r.get("enterable"));var h=r.get("formatter");c=c||r.get("position");var p=n,m=this._getNearestPoint([o,l],a,r.get("trigger"),r.get("borderColor")),v=m.color;if(h)if(ve(h)){var g=r.ecModel.get("useUTC"),y=se(a)?a[0]:a,_=y&&y.axisType&&y.axisType.indexOf("time")>=0;p=h,_&&(p=of(y.axisValue,p,g)),p=ix(p,a,!0)}else if(Ee(h)){var w=Be(function(S,x){S===this._ticket&&(d.setContent(x,f,r,v,c),this._updatePosition(r,c,o,l,d,a,u))},this);this._ticket=i,p=h(a,i,w)}else p=h;d.setContent(p,f,r,v,c),d.show(r,v),this._updatePosition(r,c,o,l,d,a,u)}},e.prototype._getNearestPoint=function(r,n,a,i){if(a==="axis"||se(n))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!se(n))return{color:i||n.color||n.borderColor}},e.prototype._updatePosition=function(r,n,a,i,o,l,c){var u=this._api.getWidth(),f=this._api.getHeight();n=n||r.get("position");var d=o.getSize(),h=r.get("align"),p=r.get("verticalAlign"),m=c&&c.getBoundingRect().clone();if(c&&m.applyTransform(c.transform),Ee(n)&&(n=n([a,i],l,o.el,m,{viewSize:[u,f],contentSize:d.slice()})),se(n))a=ze(n[0],u),i=ze(n[1],f);else if(_e(n)){var v=n;v.width=d[0],v.height=d[1];var g=On(v,{width:u,height:f});a=g.x,i=g.y,h=null,p=null}else if(ve(n)&&c){var y=kK(n,m,d,r.get("borderWidth"));a=y[0],i=y[1]}else{var y=xK(a,i,o,u,f,h?null:20,p?null:20);a=y[0],i=y[1]}if(h&&(a-=F3(h)?d[0]/2:h==="right"?d[0]:0),p&&(i-=F3(p)?d[1]/2:p==="bottom"?d[1]:0),A3(r)){var y=CK(a,i,o,u,f);a=y[0],i=y[1]}o.moveTo(a,i)},e.prototype._updateContentNotChangedOnAxis=function(r,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===r.length;return o&&z(a,function(l,c){var u=l.dataByAxis||[],f=r[c]||{},d=f.dataByAxis||[];o=o&&u.length===d.length,o&&z(u,function(h,p){var m=d[p]||{},v=h.seriesDataIndices||[],g=m.seriesDataIndices||[];o=o&&h.value===m.value&&h.axisType===m.axisType&&h.axisId===m.axisId&&v.length===g.length,o&&z(v,function(y,_){var w=g[_];o=o&&y.seriesIndex===w.seriesIndex&&y.dataIndex===w.dataIndex}),i&&z(h.seriesDataIndices,function(y){var _=y.seriesIndex,w=n[_],S=i[_];w&&S&&S.data!==w.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},e.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},e.prototype.dispose=function(r,n){Pe.node||!n.getDom()||(wv(this,"_updatePosition"),this._tooltipContent.dispose(),Ag("itemTooltip",n))},e.type="tooltip",e}(Hr);function Nl(t,e,r){var n=e.ecModel,a;r?(a=new Et(r,n,n),a=new Et(e.option,a,n)):a=e;for(var i=t.length-1;i>=0;i--){var o=t[i];o&&(o instanceof Et&&(o=o.get("tooltip",!0)),ve(o)&&(o={formatter:o}),o&&(a=new Et(o,a,n)))}return a}function V3(t,e){return t.dispatchAction||Be(e.dispatchAction,e)}function xK(t,e,r,n,a,i,o){var l=r.getSize(),c=l[0],u=l[1];return i!=null&&(t+c+i+2>n?t-=c+i:t+=i),o!=null&&(e+u+o>a?e-=u+o:e+=o),[t,e]}function CK(t,e,r,n,a){var i=r.getSize(),o=i[0],l=i[1];return t=Math.min(t+o,n)-o,e=Math.min(e+l,a)-l,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function kK(t,e,r,n){var a=r[0],i=r[1],o=Math.ceil(Math.SQRT2*n)+8,l=0,c=0,u=e.width,f=e.height;switch(t){case"inside":l=e.x+u/2-a/2,c=e.y+f/2-i/2;break;case"top":l=e.x+u/2-a/2,c=e.y-i-o;break;case"bottom":l=e.x+u/2-a/2,c=e.y+f+o;break;case"left":l=e.x-a-o,c=e.y+f/2-i/2;break;case"right":l=e.x+u+o,c=e.y+f/2-i/2}return[l,c]}function F3(t){return t==="center"||t==="middle"}function TK(t,e,r){var n=Qp(t).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=Os(e,a,n.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(!!o){var l=r.getViewOfComponentModel(o),c;if(l.group.traverse(function(u){var f=He(u).tooltipConfig;if(f&&f.name===t.name)return c=u,!0}),c)return{componentMainType:a,componentIndex:o.componentIndex,el:c}}}}var MK=SK;function $K(t){dn(E3),t.registerComponentModel(sK),t.registerComponentView(MK),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Pt),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Pt)}var z3=z;function H3(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function U3(t,e,r){var n={};return z3(e,function(i){var o=n[i]=a();z3(t[i],function(l,c){if(!!Kt.isValidType(c)){var u={type:c,visual:l};r&&r(u,i),o[c]=new Kt(u),c==="opacity"&&(u=Te(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Kt(u))}})}),n;function a(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function NK(t,e,r){var n;z(r,function(a){e.hasOwnProperty(a)&&H3(e[a])&&(n=!0)}),n&&z(r,function(a){e.hasOwnProperty(a)&&H3(e[a])?t[a]=Te(e[a]):delete t[a]})}function EK(t,e,r,n){var a={};return z(t,function(i){var o=Kt.prepareVisualTypes(e[i]);a[i]=o}),{progress:function(o,l){var c;n!=null&&(c=l.getDimensionIndex(n));function u(x){return T2(l,d,x)}function f(x,b){NY(l,d,x,b)}for(var d,h=l.getStore();(d=o.next())!=null;){var p=l.getRawDataItem(d);if(!(p&&p.visualMap===!1))for(var m=n!=null?h.get(c,d):d,v=r(m),g=e[v],y=a[v],_=0,w=y.length;_<w;_++){var S=y[_];g[S]&&g[S].applyVisual(m,u,f)}}}}}var AK=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(tt),DK=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,a){if(this.group.removeAll(),!!r.get("show")){var i=this.group,o=r.getModel("textStyle"),l=r.getModel("subtextStyle"),c=r.get("textAlign"),u=Ae(r.get("textBaseline"),r.get("textVerticalAlign")),f=new ut({style:yr(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),d=f.getBoundingRect(),h=r.get("subtext"),p=new ut({style:yr(l,{text:h,fill:l.getTextColor(),y:d.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),m=r.get("link"),v=r.get("sublink"),g=r.get("triggerEvent",!0);f.silent=!m&&!g,p.silent=!v&&!g,m&&f.on("click",function(){ox(m,"_"+r.get("target"))}),v&&p.on("click",function(){ox(v,"_"+r.get("subtarget"))}),He(f).eventData=He(p).eventData=g?{componentType:"title",componentIndex:r.componentIndex}:null,i.add(f),h&&i.add(p);var y=i.getBoundingRect(),_=r.getBoxLayoutParams();_.width=y.width,_.height=y.height;var w=On(_,{width:a.getWidth(),height:a.getHeight()},r.get("padding"));c||(c=r.get("left")||r.get("right"),c==="middle"&&(c="center"),c==="right"?w.x+=w.width:c==="center"&&(w.x+=w.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?w.y+=w.height:u==="middle"&&(w.y+=w.height/2),u=u||"top"),i.x=w.x,i.y=w.y,i.markRedraw();var S={align:c,verticalAlign:u};f.setStyle(S),p.setStyle(S),y=i.getBoundingRect();var x=w.margin,b=r.getItemStyle(["color","opacity"]);b.fill=r.get("backgroundColor");var C=new it({shape:{x:y.x-x[3],y:y.y-x[0],width:y.width+x[1]+x[3],height:y.height+x[0]+x[2],r:r.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});i.add(C)}},e.type="title",e}(Hr);function OK(t){t.registerComponentModel(AK),t.registerComponentView(DK)}function LK(t,e){if(!t)return!1;for(var r=se(t)?t:[t],n=0;n<r.length;n++)if(r[n]&&r[n][e])return!0;return!1}function ed(t){Ns(t,"label",["show"])}var td=ct(),j3=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.createdBySelf=!1,r}return e.prototype.init=function(r,n,a){this.mergeDefaultAndTheme(r,a),this._mergeOption(r,a,!1,!0)},e.prototype.isAnimationEnabled=function(){if(Pe.node)return!1;var r=this.__hostSeries;return this.getShallow("animation")&&r&&r.isAnimationEnabled()},e.prototype.mergeOption=function(r,n){this._mergeOption(r,n,!1,!1)},e.prototype._mergeOption=function(r,n,a,i){var o=this.mainType;a||n.eachSeries(function(l){var c=l.get(this.mainType,!0),u=td(l)[o];if(!c||!c.data){td(l)[o]=null;return}u?u._mergeOption(c,n,!0):(i&&ed(c),z(c.data,function(f){f instanceof Array?(ed(f[0]),ed(f[1])):ed(f)}),u=this.createMarkerModelFromSeries(c,this,n),re(u,{mainType:this.mainType,seriesIndex:l.seriesIndex,name:l.name,createdBySelf:!0}),u.__hostSeries=l),td(l)[o]=u},this)},e.prototype.formatTooltip=function(r,n,a){var i=this.getData(),o=this.getRawValue(r),l=i.getName(r);return fi("section",{header:this.name,blocks:[fi("nameValue",{name:l,value:o,noName:!l,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(r){this._data=r},e.getMarkerModelFromSeries=function(r,n){return td(r)[n]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(tt);Dr(j3,Ux.prototype);var rd=j3;function PK(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function BK(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function nd(t,e,r,n,a,i){var o=[],l=pi(e,n),c=l?e.getCalculationInfo("stackResultDimension"):n,u=Lg(e,c,t),f=e.indicesOfNearest(c,u)[0];o[a]=e.get(r,f),o[i]=e.get(c,f);var d=e.get(n,f),h=tn(e.get(n,f));return h=Math.min(h,20),h>=0&&(o[i]=+o[i].toFixed(h)),[o,d]}var Og={min:qe(nd,"min"),max:qe(nd,"max"),average:qe(nd,"average"),median:qe(nd,"median")};function Y3(t,e){var r=t.getData(),n=t.coordinateSystem;if(e&&!BK(e)&&!se(e.coord)&&n){var a=n.dimensions,i=G3(e,r,n,t);if(e=Te(e),e.type&&Og[e.type]&&i.baseAxis&&i.valueAxis){var o=Ge(a,i.baseAxis.dim),l=Ge(a,i.valueAxis.dim),c=Og[e.type](r,i.baseDataDim,i.valueDataDim,o,l);e.coord=c[0],e.value=c[1]}else{for(var u=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis],f=0;f<2;f++)Og[u[f]]&&(u[f]=Lg(r,r.mapDimension(a[f]),u[f]));e.coord=u}}return e}function G3(t,e,r,n){var a={};return t.valueIndex!=null||t.valueDim!=null?(a.valueDataDim=t.valueIndex!=null?e.getDimension(t.valueIndex):t.valueDim,a.valueAxis=r.getAxis(IK(n,a.valueDataDim)),a.baseAxis=r.getOtherAxis(a.valueAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim)):(a.baseAxis=n.getBaseAxis(),a.valueAxis=r.getOtherAxis(a.baseAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim),a.valueDataDim=e.mapDimension(a.valueAxis.dim)),a}function IK(t,e){var r=t.getData().getDimensionInfo(e);return r&&r.coordDim}function W3(t,e){return t&&t.containData&&e.coord&&!PK(e)?t.containData(e.coord):!0}function RK(t,e){return t?function(r,n,a,i){var o=i<2?r.coord&&r.coord[i]:r.value;return xo(o,e[i])}:function(r,n,a,i){return xo(r.value,e[i])}}function Lg(t,e,r){if(r==="average"){var n=0,a=0;return t.each(e,function(i,o){isNaN(i)||(n+=i,a++)}),n/a}else return r==="median"?t.getMedian(e):t.getDataExtent(e)[r==="max"?1:0]}var Pg=ct(),VK=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this.markerGroupMap=Le()},e.prototype.render=function(r,n,a){var i=this,o=this.markerGroupMap;o.each(function(l){Pg(l).keep=!1}),n.eachSeries(function(l){var c=rd.getMarkerModelFromSeries(l,i.type);c&&i.renderSeries(l,c,n,a)}),o.each(function(l){!Pg(l).keep&&i.group.remove(l.group)})},e.prototype.markKeep=function(r){Pg(r).keep=!0},e.prototype.toggleBlurSeries=function(r,n){var a=this;z(r,function(i){var o=rd.getMarkerModelFromSeries(i,a.type);if(o){var l=o.getData();l.eachItemGraphicEl(function(c){c&&(n?Zb(c):bm(c))})}})},e.type="marker",e}(Hr),FK=VK,zK=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,a){return new e(r,n,a)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(rd),HK=zK,ad=ct(),UK=function(t,e,r,n){var a=t.getData(),i;if(se(n))i=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var l=void 0,c=void 0;if(n.yAxis!=null||n.xAxis!=null)l=e.getAxis(n.yAxis!=null?"y":"x"),c=Ba(n.yAxis,n.xAxis);else{var u=G3(n,a,e,t);l=u.valueAxis;var f=MC(a,u.valueDataDim);c=Lg(a,f,o)}var d=l.dim==="x"?0:1,h=1-d,p=Te(n),m={coord:[]};p.type=null,p.coord=[],p.coord[h]=-1/0,m.coord[h]=1/0;var v=r.get("precision");v>=0&&We(c)&&(c=+c.toFixed(Math.min(v,20))),p.coord[d]=m.coord[d]=c,i=[p,m,{type:o,valueIndex:n.valueIndex,value:c}]}else i=[]}var g=[Y3(t,i[0]),Y3(t,i[1]),re({},i[2])];return g[2].type=g[2].type||null,Re(g[2],g[0]),Re(g[2],g[1]),g};function id(t){return!isNaN(t)&&!isFinite(t)}function Z3(t,e,r,n){var a=1-t,i=n.dimensions[t];return id(e[a])&&id(r[a])&&e[t]===r[t]&&n.getAxis(i).containData(e[t])}function jK(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,n=e[1].coord;if(r&&n&&(Z3(1,r,n,t)||Z3(0,r,n,t)))return!0}return W3(t,e[0])&&W3(t,e[1])}function Bg(t,e,r,n,a){var i=n.coordinateSystem,o=t.getItemModel(e),l,c=ze(o.get("x"),a.getWidth()),u=ze(o.get("y"),a.getHeight());if(!isNaN(c)&&!isNaN(u))l=[c,u];else{if(n.getMarkerPosition)l=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var f=i.dimensions,d=t.get(f[0],e),h=t.get(f[1],e);l=i.dataToPoint([d,h])}if(Cl(i,"cartesian2d")){var p=i.getAxis("x"),m=i.getAxis("y"),f=i.dimensions;id(t.get(f[0],e))?l[0]=p.toGlobalCoord(p.getExtent()[r?0:1]):id(t.get(f[1],e))&&(l[1]=m.toGlobalCoord(m.getExtent()[r?0:1]))}isNaN(c)||(l[0]=c),isNaN(u)||(l[1]=u)}t.setItemLayout(e,l)}var YK=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,a){n.eachSeries(function(i){var o=rd.getMarkerModelFromSeries(i,"markLine");if(o){var l=o.getData(),c=ad(o).from,u=ad(o).to;c.each(function(f){Bg(c,f,!0,i,a),Bg(u,f,!1,i,a)}),l.each(function(f){l.setItemLayout(f,[c.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(r,n,a,i){var o=r.coordinateSystem,l=r.id,c=r.getData(),u=this.markerGroupMap,f=u.get(l)||u.set(l,new sX);this.group.add(f.group);var d=GK(o,r,n),h=d.from,p=d.to,m=d.line;ad(n).from=h,ad(n).to=p,n.setData(m);var v=n.get("symbol"),g=n.get("symbolSize"),y=n.get("symbolRotate"),_=n.get("symbolOffset");se(v)||(v=[v,v]),se(g)||(g=[g,g]),se(y)||(y=[y,y]),se(_)||(_=[_,_]),d.from.each(function(S){w(h,S,!0),w(p,S,!1)}),m.each(function(S){var x=m.getItemModel(S).getModel("lineStyle").getLineStyle();m.setItemLayout(S,[h.getItemLayout(S),p.getItemLayout(S)]),x.stroke==null&&(x.stroke=h.getItemVisual(S,"style").fill),m.setItemVisual(S,{fromSymbolKeepAspect:h.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(S,"symbolOffset"),fromSymbolRotate:h.getItemVisual(S,"symbolRotate"),fromSymbolSize:h.getItemVisual(S,"symbolSize"),fromSymbol:h.getItemVisual(S,"symbol"),toSymbolKeepAspect:p.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(S,"symbolOffset"),toSymbolRotate:p.getItemVisual(S,"symbolRotate"),toSymbolSize:p.getItemVisual(S,"symbolSize"),toSymbol:p.getItemVisual(S,"symbol"),style:x})}),f.updateData(m),d.line.eachItemGraphicEl(function(S,x){S.traverse(function(b){He(b).dataModel=n})});function w(S,x,b){var C=S.getItemModel(x);Bg(S,x,b,r,i);var k=C.getModel("itemStyle").getItemStyle();k.fill==null&&(k.fill=Sv(c,"color")),S.setItemVisual(x,{symbolKeepAspect:C.get("symbolKeepAspect"),symbolOffset:Ae(C.get("symbolOffset",!0),_[b?0:1]),symbolRotate:Ae(C.get("symbolRotate",!0),y[b?0:1]),symbolSize:Ae(C.get("symbolSize"),g[b?0:1]),symbol:Ae(C.get("symbol",!0),v[b?0:1]),style:k})}this.markKeep(f),f.group.silent=n.get("silent")||r.get("silent")},e.type="markLine",e}(FK);function GK(t,e,r){var n;t?n=he(t&&t.dimensions,function(u){var f=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return re(re({},f),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new _l(n,r),i=new _l(n,r),o=new _l([],r),l=he(r.get("data"),qe(UK,e,t,r));t&&(l=Mt(l,qe(jK,t)));var c=RK(!!t,n);return a.initData(he(l,function(u){return u[0]}),null,c),i.initData(he(l,function(u){return u[1]}),null,c),o.initData(he(l,function(u){return u[2]})),o.hasItemOption=!0,{from:a,to:i,line:o}}var WK=YK;function ZK(t){t.registerComponentModel(HK),t.registerComponentView(WK),t.registerPreprocessor(function(e){LK(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var qK=function(t,e){if(e==="all")return{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}},XK=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.prototype.init=function(r,n,a){this.mergeDefaultAndTheme(r,a),r.selected=r.selected||{},this._updateSelector(r)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},e.prototype._updateSelector=function(r){var n=r.selector,a=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),se(n)&&z(n,function(i,o){ve(i)&&(i={type:i}),n[o]=Re(i,qK(a,i.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,a=0;a<r.length;a++){var i=r[a].get("name");if(this.isSelected(i)){this.select(i),n=!0;break}}!n&&this.select(r[0].get("name"))}},e.prototype._updateData=function(r){var n=[],a=[];r.eachRawSeries(function(l){var c=l.name;a.push(c);var u;if(l.legendVisualProvider){var f=l.legendVisualProvider,d=f.getAllNames();r.isSeriesFiltered(l)||(a=a.concat(d)),d.length?n=n.concat(d):u=!0}else u=!0;u&&Kp(l)&&n.push(l.name)}),this._availableNames=a;var i=this.get("data")||n,o=he(i,function(l){return(ve(l)||We(l))&&(l={name:l}),new Et(l,this,this.ecModel)},this);this._data=o},e.prototype.getData=function(){return this._data},e.prototype.select=function(r){var n=this.option.selected,a=this.get("selectedMode");if(a==="single"){var i=this._data;z(i,function(o){n[o.get("name")]=!1})}n[r]=!0},e.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},e.prototype.toggleSelected=function(r){var n=this.option.selected;n.hasOwnProperty(r)||(n[r]=!0),this[n[r]?"unSelect":"select"](r)},e.prototype.allSelect=function(){var r=this._data,n=this.option.selected;z(r,function(a){n[a.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;z(r,function(a){var i=a.get("name",!0);n.hasOwnProperty(i)||(n[i]=!0),n[i]=!n[i]})},e.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&Ge(this._availableNames,r)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(tt),Ig=XK,Ao=qe,Rg=z,od=lt,KK=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new od),this.group.add(this._selectorGroup=new od),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,n,a){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),l=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&l==="vertical"?"right":"left");var c=r.get("selector",!0),u=r.get("selectorPosition",!0);c&&(!u||u==="auto")&&(u=l==="horizontal"?"end":"start"),this.renderInner(o,r,n,a,c,l,u);var f=r.getBoxLayoutParams(),d={width:a.getWidth(),height:a.getHeight()},h=r.get("padding"),p=On(f,d,h),m=this.layoutInner(r,o,p,i,c,u),v=On(Ue({width:m.width,height:m.height},f),d,h);this.group.x=v.x-m.x,this.group.y=v.y-m.y,this.group.markRedraw(),this.group.add(this._backgroundEl=iK(m,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,n,a,i,o,l,c){var u=this.getContentGroup(),f=Le(),d=n.get("selectedMode"),h=[];a.eachRawSeries(function(p){!p.get("legendHoverLink")&&h.push(p.id)}),Rg(n.getData(),function(p,m){var v=p.get("name");if(!this.newlineDisabled&&(v===""||v===`
69
+ `)){var g=new od;g.newline=!0,u.add(g);return}var y=a.getSeriesByName(v)[0];if(!f.get(v))if(y){var _=y.getData(),w=_.getVisual("legendLineStyle")||{},S=_.getVisual("legendIcon"),x=_.getVisual("style"),b=this._createItem(y,v,m,p,n,r,w,x,S,d);b.on("click",Ao(q3,v,null,i,h)).on("mouseover",Ao(Vg,y.name,null,i,h)).on("mouseout",Ao(Fg,y.name,null,i,h)),f.set(v,!0)}else a.eachRawSeries(function(C){if(!f.get(v)&&C.legendVisualProvider){var k=C.legendVisualProvider;if(!k.containName(v))return;var $=k.indexOfName(v),N=k.getItemVisual($,"style"),A=k.getItemVisual($,"legendIcon"),L=tr(N.fill);L&&L[3]===0&&(L[3]=.2,N=re(re({},N),{fill:Mn(L,"rgba")}));var M=this._createItem(C,v,m,p,n,r,{},N,A,d);M.on("click",Ao(q3,null,v,i,h)).on("mouseover",Ao(Vg,null,v,i,h)).on("mouseout",Ao(Fg,null,v,i,h)),f.set(v,!0)}},this)},this),o&&this._createSelector(o,n,i,l,c)},e.prototype._createSelector=function(r,n,a,i,o){var l=this.getSelectorGroup();Rg(r,function(u){var f=u.type,d=new ut({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});l.add(d);var h=n.getModel("selectorLabel"),p=n.getModel(["emphasis","selectorLabel"]);ca(d,{normal:h,emphasis:p},{defaultText:u.title}),km(d)})},e.prototype._createItem=function(r,n,a,i,o,l,c,u,f,d){var h=r.visualDrawType,p=o.get("itemWidth"),m=o.get("itemHeight"),v=o.isSelected(n),g=i.get("symbolRotate"),y=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var w=JK(f,i,c,u,h,v),S=new od,x=i.getModel("textStyle");if(Ee(r.getLegendIcon)&&(!_||_==="inherit"))S.add(r.getLegendIcon({itemWidth:p,itemHeight:m,icon:f,iconRotate:g,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:y}));else{var b=_==="inherit"&&r.getData().getVisual("symbol")?g==="inherit"?r.getData().getVisual("symbolRotate"):g:0;S.add(QK({itemWidth:p,itemHeight:m,icon:f,iconRotate:b,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:y}))}var C=l==="left"?p+5:-5,k=l,$=o.get("formatter"),N=n;ve($)&&$?N=$.replace("{name}",n!=null?n:""):Ee($)&&(N=$(n));var A=i.get("inactiveColor");S.add(new ut({style:yr(x,{text:N,x:C,y:m/2,fill:v?x.getTextColor():A,align:k,verticalAlign:"middle"})}));var L=new it({shape:S.getBoundingRect(),invisible:!0}),M=i.getModel("tooltip");return M.get("show")&&zm({el:L,componentModel:o,itemName:n,itemTooltipOption:M.option}),S.add(L),S.eachChild(function(O){O.silent=!0}),L.silent=!d,this.getContentGroup().add(S),km(S),S.__legendDataIndex=a,S},e.prototype.layoutInner=function(r,n,a,i,o,l){var c=this.getContentGroup(),u=this.getSelectorGroup();go(r.get("orient"),c,r.get("itemGap"),a.width,a.height);var f=c.getBoundingRect(),d=[-f.x,-f.y];if(u.markRedraw(),c.markRedraw(),o){go("horizontal",u,r.get("selectorItemGap",!0));var h=u.getBoundingRect(),p=[-h.x,-h.y],m=r.get("selectorButtonGap",!0),v=r.getOrient().index,g=v===0?"width":"height",y=v===0?"height":"width",_=v===0?"y":"x";l==="end"?p[v]+=f[g]+m:d[v]+=h[g]+m,p[1-v]+=f[y]/2-h[y]/2,u.x=p[0],u.y=p[1],c.x=d[0],c.y=d[1];var w={x:0,y:0};return w[g]=f[g]+m+h[g],w[y]=Math.max(f[y],h[y]),w[_]=Math.min(0,h[_]+p[1-v]),w}else return c.x=d[0],c.y=d[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Hr);function JK(t,e,r,n,a,i){function o(m,v){m.lineWidth==="auto"&&(m.lineWidth=v.lineWidth>0?2:0),Rg(m,function(g,y){m[y]==="inherit"&&(m[y]=v[y])})}var l=e.getModel("itemStyle"),c=l.getItemStyle(),u=t.lastIndexOf("empty",0)===0?"fill":"stroke";c.decal=n.decal,c.fill==="inherit"&&(c.fill=n[a]),c.stroke==="inherit"&&(c.stroke=n[u]),c.opacity==="inherit"&&(c.opacity=(a==="fill"?n:r).opacity),o(c,n);var f=e.getModel("lineStyle"),d=f.getLineStyle();if(o(d,r),c.fill==="auto"&&(c.fill=n.fill),c.stroke==="auto"&&(c.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!i){var h=e.get("inactiveBorderWidth"),p=c[u];c.lineWidth=h==="auto"?n.lineWidth>0&&p?2:0:c.lineWidth,c.fill=e.get("inactiveColor"),c.stroke=e.get("inactiveBorderColor"),d.stroke=f.get("inactiveColor"),d.lineWidth=f.get("inactiveWidth")}return{itemStyle:c,lineStyle:d}}function QK(t){var e=t.icon||"roundRect",r=fn(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function q3(t,e,r,n){Fg(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t!=null?t:e}),Vg(t,e,r,n)}function X3(t){for(var e=t.getZr().storage.getDisplayList(),r,n=0,a=e.length;n<a&&!(r=e[n].states.emphasis);)n++;return r&&r.hoverLayer}function Vg(t,e,r,n){X3(r)||r.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function Fg(t,e,r,n){X3(r)||r.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}var K3=KK;function eJ(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(r){for(var n=0;n<e.length;n++)if(!e[n].isSelected(r.name))return!1;return!0})}function El(t,e,r){var n={},a=t==="toggleSelected",i;return r.eachComponent("legend",function(o){a&&i!=null?o[i?"select":"unSelect"](e.name):t==="allSelect"||t==="inverseSelect"?o[t]():(o[t](e.name),i=o.isSelected(e.name));var l=o.getData();z(l,function(c){var u=c.get("name");if(!(u===`
70
+ `||u==="")){var f=o.isSelected(u);n.hasOwnProperty(u)?n[u]=n[u]&&f:n[u]=f}})}),t==="allSelect"||t==="inverseSelect"?{selected:n}:{name:e.name,selected:n}}function tJ(t){t.registerAction("legendToggleSelect","legendselectchanged",qe(El,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",qe(El,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",qe(El,"inverseSelect")),t.registerAction("legendSelect","legendselected",qe(El,"select")),t.registerAction("legendUnSelect","legendunselected",qe(El,"unSelect"))}function J3(t){t.registerComponentModel(Ig),t.registerComponentView(K3),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,eJ),t.registerSubTypeDefaulter("legend",function(){return"plain"}),tJ(t)}var rJ=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},e.prototype.init=function(r,n,a){var i=hf(r);t.prototype.init.call(this,r,n,a),Q3(this,r,i)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),Q3(this,this.option,r)},e.type="legend.scroll",e.defaultOption=tf(Ig.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e}(Ig);function Q3(t,e,r){var n=t.getOrient(),a=[1,1];a[n.index]=0,yo(e,r,{type:"box",ignoreSize:!!a})}var nJ=rJ,eT=lt,zg=["width","height"],Hg=["x","y"],aJ=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!0,r._currentIndex=0,r}return e.prototype.init=function(){t.prototype.init.call(this),this.group.add(this._containerGroup=new eT),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new eT)},e.prototype.resetInner=function(){t.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(r,n,a,i,o,l,c){var u=this;t.prototype.renderInner.call(this,r,n,a,i,o,l,c);var f=this._controllerGroup,d=n.get("pageIconSize",!0),h=se(d)?d:[d,d];m("pagePrev",0);var p=n.getModel("pageTextStyle");f.add(new ut({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),m("pageNext",1);function m(v,g){var y=v+"DataIndex",_=Vm(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:Be(u._pageGo,u,y,n,i)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});_.name=v,f.add(_)}},e.prototype.layoutInner=function(r,n,a,i,o,l){var c=this.getSelectorGroup(),u=r.getOrient().index,f=zg[u],d=Hg[u],h=zg[1-u],p=Hg[1-u];o&&go("horizontal",c,r.get("selectorItemGap",!0));var m=r.get("selectorButtonGap",!0),v=c.getBoundingRect(),g=[-v.x,-v.y],y=Te(a);o&&(y[f]=a[f]-v[f]-m);var _=this._layoutContentAndController(r,i,y,u,f,h,p,d);if(o){if(l==="end")g[u]+=_[f]+m;else{var w=v[f]+m;g[u]-=w,_[d]-=w}_[f]+=v[f]+m,g[1-u]+=_[p]+_[h]/2-v[h]/2,_[h]=Math.max(_[h],v[h]),_[p]=Math.min(_[p],v[p]+g[1-u]),c.x=g[0],c.y=g[1],c.markRedraw()}return _},e.prototype._layoutContentAndController=function(r,n,a,i,o,l,c,u){var f=this.getContentGroup(),d=this._containerGroup,h=this._controllerGroup;go(r.get("orient"),f,r.get("itemGap"),i?a.width:null,i?null:a.height),go("horizontal",h,r.get("pageButtonItemGap",!0));var p=f.getBoundingRect(),m=h.getBoundingRect(),v=this._showController=p[o]>a[o],g=[-p.x,-p.y];n||(g[i]=f[u]);var y=[0,0],_=[-m.x,-m.y],w=Ae(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(v){var S=r.get("pageButtonPosition",!0);S==="end"?_[i]+=a[o]-m[o]:y[i]+=m[o]+w}_[1-i]+=p[l]/2-m[l]/2,f.setPosition(g),d.setPosition(y),h.setPosition(_);var x={x:0,y:0};if(x[o]=v?a[o]:p[o],x[l]=Math.max(p[l],m[l]),x[c]=Math.min(0,m[c]+_[1-i]),d.__rectSize=a[o],v){var b={x:0,y:0};b[o]=Math.max(a[o]-m[o]-w,0),b[l]=x[l],d.setClipPath(new it({shape:b})),d.__rectSize=b[o]}else h.eachChild(function(k){k.attr({invisible:!0,silent:!0})});var C=this._getPageInfo(r);return C.pageIndex!=null&&_t(f,{x:C.contentPosition[0],y:C.contentPosition[1]},v?r:null),this._updatePageInfoView(r,C),x},e.prototype._pageGo=function(r,n,a){var i=this._getPageInfo(n)[r];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},e.prototype._updatePageInfoView=function(r,n){var a=this._controllerGroup;z(["pagePrev","pageNext"],function(f){var d=f+"DataIndex",h=n[d]!=null,p=a.childOfName(f);p&&(p.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),p.cursor=h?"pointer":"default")});var i=a.childOfName("pageText"),o=r.get("pageFormatter"),l=n.pageIndex,c=l!=null?l+1:0,u=n.pageCount;i&&o&&i.setStyle("text",ve(o)?o.replace("{current}",c==null?"":c+"").replace("{total}",u==null?"":u+""):o({current:c,total:u}))},e.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=r.getOrient().index,l=zg[o],c=Hg[o],u=this._findTargetItemIndex(n),f=a.children(),d=f[u],h=f.length,p=h?1:0,m={contentPosition:[a.x,a.y],pageCount:p,pageIndex:p-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!d)return m;var v=S(d);m.contentPosition[o]=-v.s;for(var g=u+1,y=v,_=v,w=null;g<=h;++g)w=S(f[g]),(!w&&_.e>y.s+i||w&&!x(w,y.s))&&(_.i>y.i?y=_:y=w,y&&(m.pageNextDataIndex==null&&(m.pageNextDataIndex=y.i),++m.pageCount)),_=w;for(var g=u-1,y=v,_=v,w=null;g>=-1;--g)w=S(f[g]),(!w||!x(_,w.s))&&y.i<_.i&&(_=y,m.pagePrevDataIndex==null&&(m.pagePrevDataIndex=y.i),++m.pageCount,++m.pageIndex),y=w;return m;function S(b){if(b){var C=b.getBoundingRect(),k=C[c]+b[c];return{s:k,e:k+C[l],i:b.__legendDataIndex}}}function x(b,C){return b.e>=C&&b.s<=C+i}},e.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,l){var c=o.__legendDataIndex;i==null&&c!=null&&(i=l),c===r&&(n=l)}),n!=null?n:i},e.type="legend.scroll",e}(K3),iJ=aJ;function oJ(t){t.registerAction("legendScroll","legendscroll",function(e,r){var n=e.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:e},function(a){a.setScrollDataIndex(n)})})}function sJ(t){dn(J3),t.registerComponentModel(nJ),t.registerComponentView(iJ),oJ(t)}function lJ(t){dn(J3),dn(sJ)}var cJ={get:function(t,e,r){var n=Te((uJ[t]||{})[e]);return r&&se(n)?n[n.length-1]:n}},uJ={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},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]}},tT=cJ,rT=Kt.mapVisual,fJ=Kt.eachVisual,dJ=se,nT=z,hJ=Ww,pJ=pr,mJ=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return e.prototype.init=function(r,n,a){this.mergeDefaultAndTheme(r,a)},e.prototype.optionUpdated=function(r,n){var a=this.option;!n&&NK(a,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(r){var n=this.stateList;r=Be(r,this),this.controllerVisuals=U3(this.option.controller,n,r),this.targetVisuals=U3(this.option.target,n,r)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesIndex,n=[];return r==null||r==="all"?this.ecModel.eachSeries(function(a,i){n.push(i)}):n=St(r),n},e.prototype.eachTargetSeries=function(r,n){z(this.getTargetSeriesIndices(),function(a){var i=this.ecModel.getSeriesByIndex(a);i&&r.call(n,i)},this)},e.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(a){a===r&&(n=!0)}),n},e.prototype.formatValueText=function(r,n,a){var i=this.option,o=i.precision,l=this.dataBound,c=i.formatter,u;a=a||["<",">"],se(r)&&(r=r.slice(),u=!0);var f=n?r:u?[d(r[0]),d(r[1])]:d(r);if(ve(c))return c.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(Ee(c))return u?c(r[0],r[1]):c(r);if(u)return r[0]===l[0]?a[0]+" "+f[1]:r[1]===l[1]?a[1]+" "+f[0]:f[0]+" - "+f[1];return f;function d(h){return h===l[0]?"min":h===l[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var r=this.option,n=hJ([r.min,r.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var a=r.dimensions,i=a.length-1;i>=0;i--){var o=a[i],l=r.getDimensionInfo(o);if(!l.isCalculationCoord)return l.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,a={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={});Re(i,a),Re(o,a);var l=this.isCategory();c.call(this,i),c.call(this,o),u.call(this,i,"inRange","outOfRange"),f.call(this,o);function c(d){dJ(n.color)&&!d.inRange&&(d.inRange={color:n.color.slice().reverse()}),d.inRange=d.inRange||{color:r.get("gradientColor")}}function u(d,h,p){var m=d[h],v=d[p];m&&!v&&(v=d[p]={},nT(m,function(g,y){if(!!Kt.isValidType(y)){var _=tT.get(y,"inactive",l);_!=null&&(v[y]=_,y==="color"&&!v.hasOwnProperty("opacity")&&!v.hasOwnProperty("colorAlpha")&&(v.opacity=[0,0]))}}))}function f(d){var h=(d.inRange||{}).symbol||(d.outOfRange||{}).symbol,p=(d.inRange||{}).symbolSize||(d.outOfRange||{}).symbolSize,m=this.get("inactiveColor"),v=this.getItemSymbol(),g=v||"roundRect";nT(this.stateList,function(y){var _=this.itemSize,w=d[y];w||(w=d[y]={color:l?m:[m]}),w.symbol==null&&(w.symbol=h&&Te(h)||(l?g:[g])),w.symbolSize==null&&(w.symbolSize=p&&Te(p)||(l?_[0]:[_[0],_[0]])),w.symbol=rT(w.symbol,function(b){return b==="none"?g:b});var S=w.symbolSize;if(S!=null){var x=-1/0;fJ(S,function(b){b>x&&(x=b)}),w.symbolSize=rT(S,function(b){return pJ(b,[0,x],[0,_[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(r){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(r){return null},e.prototype.getVisualMeta=function(r){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(tt),sd=mJ,aT=[20,140],vJ=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=aT[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=aT[1])},e.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):se(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),z(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},e.prototype.getSelected=function(){var r=this.getExtent(),n=Ww((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]<r[0]&&(n[0]=r[0]),n[1]<r[0]&&(n[1]=r[0]),n},e.prototype.getValueState=function(r){var n=this.option.range,a=this.getExtent();return(n[0]<=a[0]||n[0]<=r)&&(n[1]>=a[1]||r<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(a){var i=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(l,c){r[0]<=l&&l<=r[1]&&i.push(c)},this),n.push({seriesId:a.id,dataIndex:i})},this),n},e.prototype.getVisualMeta=function(r){var n=iT(this,"outOfRange",this.getExtent()),a=iT(this,"inRange",this.option.range.slice()),i=[];function o(p,m){i.push({value:p,color:r(p,m)})}for(var l=0,c=0,u=a.length,f=n.length;c<f&&(!a.length||n[c]<=a[0]);c++)n[c]<a[l]&&o(n[c],"outOfRange");for(var d=1;l<u;l++,d=0)d&&i.length&&o(a[l],"outOfRange"),o(a[l],"inRange");for(var d=1;c<f;c++)(!a.length||a[a.length-1]<n[c])&&(d&&(i.length&&o(i[i.length-1].value,"outOfRange"),d=0),o(n[c],"outOfRange"));var h=i.length;return{stops:i,outerColors:[h?i[0].color:"transparent",h?i[h-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=tf(sd.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:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(sd);function iT(t,e,r){if(r[0]===r[1])return r.slice();for(var n=200,a=(r[1]-r[0])/n,i=r[0],o=[],l=0;l<=n&&i<r[1];l++)o.push(i),i+=a;return o.push(r[1]),o}var gJ=vJ,yJ=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.autoPositionValues={left:1,right:1,top:1,bottom:1},r}return e.prototype.init=function(r,n){this.ecModel=r,this.api=n},e.prototype.render=function(r,n,a,i){if(this.visualMapModel=r,r.get("show")===!1){this.group.removeAll();return}this.doRender(r,n,a,i)},e.prototype.renderBackground=function(r){var n=this.visualMapModel,a=Qs(n.get("padding")||0),i=r.getBoundingRect();r.add(new it({z2:-1,silent:!0,shape:{x:i.x-a[3],y:i.y-a[0],width:i.width+a[3]+a[1],height:i.height+a[0]+a[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},e.prototype.getControllerVisual=function(r,n,a){a=a||{};var i=a.forceState,o=this.visualMapModel,l={};if(n==="color"){var c=o.get("contentColor");l.color=c}function u(p){return l[p]}function f(p,m){l[p]=m}var d=o.controllerVisuals[i||o.getValueState(r)],h=Kt.prepareVisualTypes(d);return z(h,function(p){var m=d[p];a.convertOpacityToAlpha&&p==="opacity"&&(p="colorAlpha",m=d.__alphaForOpacity),Kt.dependsOn(p,n)&&m&&m.applyVisual(r,u,f)}),l[n]},e.prototype.positionGroup=function(r){var n=this.visualMapModel,a=this.api;VU(r,n.getBoxLayoutParams(),{width:a.getWidth(),height:a.getHeight()})},e.prototype.doRender=function(r,n,a,i){},e.type="visualMap",e}(Hr),oT=yJ,sT=[["left","right","width"],["top","bottom","height"]];function lT(t,e,r){var n=t.option,a=n.align;if(a!=null&&a!=="auto")return a;for(var i={width:e.getWidth(),height:e.getHeight()},o=n.orient==="horizontal"?1:0,l=sT[o],c=[0,null,10],u={},f=0;f<3;f++)u[sT[1-o][f]]=c[f],u[l[f]]=f===2?r[0]:n[l[f]];var d=[["x","width",3],["y","height",0]][o],h=On(u,i,n.padding);return l[(h.margin[d[2]]||0)+h[d[0]]+h[d[1]]*.5<i[d[1]]*.5?0:1]}function ld(t,e){return z(t||[],function(r){r.dataIndex!=null&&(r.dataIndexInside=r.dataIndex,r.dataIndex=null),r.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}var pn=pr,_J=z,cT=Math.min,Ug=Math.max,wJ=12,bJ=6,SJ=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._shapes={},r._dataInterval=[],r._handleEnds=[],r._hoverLinkDataIndices=[],r}return e.prototype.doRender=function(r,n,a,i){this._api=a,(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var r=this.visualMapModel,n=this.group;this._orient=r.get("orient"),this._useHandle=r.get("calculable"),this._resetInterval(),this._renderBar(n);var a=r.get("text");this._renderEndsText(n,a,0),this._renderEndsText(n,a,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},e.prototype._renderEndsText=function(r,n,a){if(!!n){var i=n[1-a];i=i!=null?i+"":"";var o=this.visualMapModel,l=o.get("textGap"),c=o.itemSize,u=this._shapes.mainGroup,f=this._applyTransform([c[0]/2,a===0?-l:c[1]+l],u),d=this._applyTransform(a===0?"bottom":"top",u),h=this._orient,p=this.visualMapModel.textStyleModel;this.group.add(new ut({style:yr(p,{x:f[0],y:f[1],verticalAlign:h==="horizontal"?"middle":d,align:h==="horizontal"?d:"center",text:i})}))}},e.prototype._renderBar=function(r){var n=this.visualMapModel,a=this._shapes,i=n.itemSize,o=this._orient,l=this._useHandle,c=lT(n,this.api,i),u=a.mainGroup=this._createBarGroup(c),f=new lt;u.add(f),f.add(a.outOfRange=uT()),f.add(a.inRange=uT(null,l?dT(this._orient):null,Be(this._dragHandle,this,"all",!1),Be(this._dragHandle,this,"all",!0))),f.setClipPath(new it({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var d=n.textStyleModel.getTextRect("\u56FD"),h=Ug(d.width,d.height);l&&(a.handleThumbs=[],a.handleLabels=[],a.handleLabelPoints=[],this._createHandle(n,u,0,i,h,o),this._createHandle(n,u,1,i,h,o)),this._createIndicator(n,u,i,h,o),r.add(u)},e.prototype._createHandle=function(r,n,a,i,o,l){var c=Be(this._dragHandle,this,a,!1),u=Be(this._dragHandle,this,a,!0),f=en(r.get("handleSize"),i[0]),d=fn(r.get("handleIcon"),-f/2,-f/2,f,f,null,!0),h=dT(this._orient);d.attr({cursor:h,draggable:!0,drift:c,ondragend:u,onmousemove:function(y){vs(y.event)}}),d.x=i[0]/2,d.useStyle(r.getModel("handleStyle").getItemStyle()),d.setStyle({strokeNoScale:!0,strokeFirst:!0}),d.style.lineWidth*=2,d.ensureState("emphasis").style=r.getModel(["emphasis","handleStyle"]).getItemStyle(),Tm(d,!0),n.add(d);var p=this.visualMapModel.textStyleModel,m=new ut({cursor:h,draggable:!0,drift:c,onmousemove:function(y){vs(y.event)},ondragend:u,style:yr(p,{x:0,y:0,text:""})});m.ensureState("blur").style={opacity:.1},m.stateTransition={duration:200},this.group.add(m);var v=[f,0],g=this._shapes;g.handleThumbs[a]=d,g.handleLabelPoints[a]=v,g.handleLabels[a]=m},e.prototype._createIndicator=function(r,n,a,i,o){var l=en(r.get("indicatorSize"),a[0]),c=fn(r.get("indicatorIcon"),-l/2,-l/2,l,l,null,!0);c.attr({cursor:"move",invisible:!0,silent:!0,x:a[0]/2});var u=r.getModel("indicatorStyle").getItemStyle();if(c instanceof Ir){var f=c.style;c.useStyle(re({image:f.image,x:f.x,y:f.y,width:f.width,height:f.height},u))}else c.useStyle(u);n.add(c);var d=this.visualMapModel.textStyleModel,h=new ut({silent:!0,invisible:!0,style:yr(d,{x:0,y:0,text:""})});this.group.add(h);var p=[(o==="horizontal"?i/2:bJ)+a[0]/2,0],m=this._shapes;m.indicator=c,m.indicatorLabel=h,m.indicatorLabelPoint=p,this._firstShowIndicator=!0},e.prototype._dragHandle=function(r,n,a,i){if(!!this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([a,i],this._shapes.mainGroup,!0);this._updateInterval(r,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():fT(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[r],!1)}},e.prototype._resetInterval=function(){var r=this.visualMapModel,n=this._dataInterval=r.getSelected(),a=r.getExtent(),i=[0,r.itemSize[1]];this._handleEnds=[pn(n[0],a,i,!0),pn(n[1],a,i,!0)]},e.prototype._updateInterval=function(r,n){n=n||0;var a=this.visualMapModel,i=this._handleEnds,o=[0,a.itemSize[1]];_X(n,i,o,r,0);var l=a.getExtent();this._dataInterval=[pn(i[0],o,l,!0),pn(i[1],o,l,!0)]},e.prototype._updateView=function(r){var n=this.visualMapModel,a=n.getExtent(),i=this._shapes,o=[0,n.itemSize[1]],l=r?o:this._handleEnds,c=this._createBarVisual(this._dataInterval,a,l,"inRange"),u=this._createBarVisual(a,a,o,"outOfRange");i.inRange.setStyle({fill:c.barColor}).setShape("points",c.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(l,c)},e.prototype._createBarVisual=function(r,n,a,i){var o={forceState:i,convertOpacityToAlpha:!0},l=this._makeColorGradient(r,o),c=[this.getControllerVisual(r[0],"symbolSize",o),this.getControllerVisual(r[1],"symbolSize",o)],u=this._createBarPoints(a,c);return{barColor:new Pm(0,0,0,1,l),barPoints:u,handlesColor:[l[0].color,l[l.length-1].color]}},e.prototype._makeColorGradient=function(r,n){var a=100,i=[],o=(r[1]-r[0])/a;i.push({color:this.getControllerVisual(r[0],"color",n),offset:0});for(var l=1;l<a;l++){var c=r[0]+o*l;if(c>r[1])break;i.push({color:this.getControllerVisual(c,"color",n),offset:l/a})}return i.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),i},e.prototype._createBarPoints=function(r,n){var a=this.visualMapModel.itemSize;return[[a[0]-n[0],r[0]],[a[0],r[0]],[a[0],r[1]],[a[0]-n[1],r[1]]]},e.prototype._createBarGroup=function(r){var n=this._orient,a=this.visualMapModel.get("inverse");return new lt(n==="horizontal"&&!a?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&a?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!a?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},e.prototype._updateHandle=function(r,n){if(!!this._useHandle){var a=this._shapes,i=this.visualMapModel,o=a.handleThumbs,l=a.handleLabels,c=i.itemSize,u=i.getExtent();_J([0,1],function(f){var d=o[f];d.setStyle("fill",n.handlesColor[f]),d.y=r[f];var h=pn(r[f],[0,c[1]],u,!0),p=this.getControllerVisual(h,"symbolSize");d.scaleX=d.scaleY=p/c[0],d.x=c[0]-p/2;var m=ho(a.handleLabelPoints[f],Ku(d,this.group));l[f].setStyle({x:m[0],y:m[1],text:i.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(r,n,a,i){var o=this.visualMapModel,l=o.getExtent(),c=o.itemSize,u=[0,c[1]],f=this._shapes,d=f.indicator;if(!!d){d.attr("invisible",!1);var h={convertOpacityToAlpha:!0},p=this.getControllerVisual(r,"color",h),m=this.getControllerVisual(r,"symbolSize"),v=pn(r,l,u,!0),g=c[0]-m/2,y={x:d.x,y:d.y};d.y=v,d.x=g;var _=ho(f.indicatorLabelPoint,Ku(d,this.group)),w=f.indicatorLabel;w.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),x=this._orient,b=x==="horizontal";w.setStyle({text:(a||"")+o.formatValueText(n),verticalAlign:b?S:"middle",align:b?"center":S});var C={x:g,y:v,style:{fill:p}},k={style:{x:_[0],y:_[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var $={duration:100,easing:"cubicInOut",additive:!0};d.x=y.x,d.y=y.y,d.animateTo(C,$),w.animateTo(k,$)}else d.attr(C),w.attr(k);this._firstShowIndicator=!1;var N=this._shapes.handleLabels;if(N)for(var A=0;A<N.length;A++)this._api.enterBlur(N[A])}},e.prototype._enableHoverLinkToSeries=function(){var r=this;this._shapes.mainGroup.on("mousemove",function(n){if(r._hovering=!0,!r._dragging){var a=r.visualMapModel.itemSize,i=r._applyTransform([n.offsetX,n.offsetY],r._shapes.mainGroup,!0,!0);i[1]=cT(Ug(0,i[1]),a[1]),r._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=a[0])}}).on("mouseout",function(){r._hovering=!1,!r._dragging&&r._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var r=this.api.getZr();this.visualMapModel.option.hoverLink?(r.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),r.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(r,n){var a=this.visualMapModel,i=a.itemSize;if(!!a.option.hoverLink){var o=[0,i[1]],l=a.getExtent();r=cT(Ug(o[0],r),o[1]);var c=xJ(a,l,o),u=[r-c,r+c],f=pn(r,o,l,!0),d=[pn(u[0],o,l,!0),pn(u[1],o,l,!0)];u[0]<o[0]&&(d[0]=-1/0),u[1]>o[1]&&(d[1]=1/0),n&&(d[0]===-1/0?this._showIndicator(f,d[1],"< ",c):d[1]===1/0?this._showIndicator(f,d[0],"> ",c):this._showIndicator(f,f,"\u2248 ",c));var h=this._hoverLinkDataIndices,p=[];(n||fT(a))&&(p=this._hoverLinkDataIndices=a.findTargetDataIndices(d));var m=GF(h,p);this._dispatchHighDown("downplay",ld(m[0],a)),this._dispatchHighDown("highlight",ld(m[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(r){var n=r.target,a=this.visualMapModel;if(!(!n||He(n).dataIndex==null)){var i=He(n),o=this.ecModel.getSeriesByIndex(i.seriesIndex);if(!!a.isTargetSeries(o)){var l=o.getData(i.dataType),c=l.getStore().get(a.getDataDimensionIndex(l),i.dataIndex);isNaN(c)||this._showIndicator(c,c)}}},e.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var a=0;a<n.length;a++)this._api.leaveBlur(n[a])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var r=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",ld(r,this.visualMapModel)),r.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var r=this.api.getZr();r.off("mouseover",this._hoverLinkFromSeriesMouseOver),r.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(r,n,a,i){var o=Ku(n,i?null:this.group);return se(r)?ho(r,o,a):ES(r,o,a)},e.prototype._dispatchHighDown=function(r,n){n&&n.length&&this.api.dispatchAction({type:r,batch:n})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.prototype.remove=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(oT);function uT(t,e,r,n){return new Uu({shape:{points:t},draggable:!!r,cursor:e,drift:r,onmousemove:function(a){vs(a.event)},ondragend:n})}function xJ(t,e,r){var n=wJ/2,a=t.get("hoverLinkDataSize");return a&&(n=pn(a,e,r,!0)/2),n}function fT(t){var e=t.get("hoverLinkOnHandle");return!!(e==null?t.get("realtime"):e)}function dT(t){return t==="vertical"?"ns-resize":"ew-resize"}var CJ=SJ,kJ={type:"selectDataRange",event:"dataRangeSelected",update:"update"},TJ=function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(r){r.setSelected(t.selected)})},MJ=[{createOnAllSeries:!0,reset:function(t,e){var r=[];return e.eachComponent("visualMap",function(n){var a=t.pipelineContext;!n.isTargetSeries(t)||a&&a.large||r.push(EK(n.stateList,n.targetVisuals,Be(n.getValueState,n),n.getDataDimensionIndex(t.getData())))}),r}},{createOnAllSeries:!0,reset:function(t,e){var r=t.getData(),n=[];e.eachComponent("visualMap",function(a){if(a.isTargetSeries(t)){var i=a.getVisualMeta(Be($J,null,t,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(r);o>=0&&(i.dimension=o,n.push(i))}}),t.getData().setVisual("visualMeta",n)}}];function $J(t,e,r,n){for(var a=e.targetVisuals[n],i=Kt.prepareVisualTypes(a),o={color:Sv(t.getData(),"color")},l=0,c=i.length;l<c;l++){var u=i[l],f=a[u==="opacity"?"__alphaForOpacity":u];f&&f.applyVisual(r,d,h)}return o.color;function d(p){return o[p]}function h(p,m){o[p]=m}}var hT=z;function NJ(t){var e=t&&t.visualMap;se(e)||(e=e?[e]:[]),hT(e,function(r){if(!!r){Do(r,"splitList")&&!Do(r,"pieces")&&(r.pieces=r.splitList,delete r.splitList);var n=r.pieces;n&&se(n)&&hT(n,function(a){_e(a)&&(Do(a,"start")&&!Do(a,"min")&&(a.min=a.start),Do(a,"end")&&!Do(a,"max")&&(a.max=a.end))})}})}function Do(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}var pT=!1;function mT(t){pT||(pT=!0,t.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),t.registerAction(kJ,TJ),z(MJ,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(NJ))}function EJ(t){t.registerComponentModel(gJ),t.registerComponentView(CJ),mT(t)}var AJ=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._pieceList=[],r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],DJ[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var i=this.option.categories;this.resetVisual(function(o,l){a==="categories"?(o.mappingMethod="category",o.categories=Te(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=he(this._pieceList,function(c){return c=Te(c),l!=="inRange"&&(c.visual=null),c}))})},e.prototype.completeVisualOption=function(){var r=this.option,n={},a=Kt.listVisualTypes(),i=this.isCategory();z(r.pieces,function(l){z(a,function(c){l.hasOwnProperty(c)&&(n[c]=1)})}),z(n,function(l,c){var u=!1;z(this.stateList,function(f){u=u||o(r,f,c)||o(r.target,f,c)},this),!u&&z(this.stateList,function(f){(r[f]||(r[f]={}))[c]=tT.get(c,f==="inRange"?"active":"inactive",i)})},this);function o(l,c,u){return l&&l[c]&&l[c].hasOwnProperty(u)}t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(r,n){var a=this.option,i=this._pieceList,o=(n?a:r).selected||{};if(a.selected=o,z(i,function(c,u){var f=this.getSelectedMapKey(c);o.hasOwnProperty(f)||(o[f]=!0)},this),a.selectedMode==="single"){var l=!1;z(i,function(c,u){var f=this.getSelectedMapKey(c);o[f]&&(l?o[f]=!1:l=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(r){this.option.selected=Te(r)},e.prototype.getValueState=function(r){var n=Kt.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[],a=this._pieceList;return this.eachTargetSeries(function(i){var o=[],l=i.getData();l.each(this.getDataDimensionIndex(l),function(c,u){var f=Kt.findPieceIndex(c,a);f===r&&o.push(u)},this),n.push({seriesId:i.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var a=r.interval||[];n=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return n},e.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],a=["",""],i=this;function o(f,d){var h=i.getRepresentValue({interval:f});d||(d=i.getValueState(h));var p=r(h,d);f[0]===-1/0?a[0]=p:f[1]===1/0?a[1]=p:n.push({value:f[0],color:p},{value:f[1],color:p})}var l=this._pieceList.slice();if(!l.length)l.push({interval:[-1/0,1/0]});else{var c=l[0].interval[0];c!==-1/0&&l.unshift({interval:[-1/0,c]}),c=l[l.length-1].interval[1],c!==1/0&&l.push({interval:[c,1/0]})}var u=-1/0;return z(l,function(f){var d=f.interval;d&&(d[0]>u&&o([u,d[0]],"outOfRange"),o(d.slice()),u=d[1])},this),{stops:n,outerColors:a}},e.type="visualMap.piecewise",e.defaultOption=tf(sd.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}),e}(sd),DJ={splitNumber:function(t){var e=this.option,r=Math.min(e.precision,20),n=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var i=(n[1]-n[0])/a;+i.toFixed(r)!==i&&r<5;)r++;e.precision=r,i=+i.toFixed(r),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,l=n[0];o<a;l+=i,o++){var c=o===a-1?n[1]:l+i;t.push({interval:[l,c],close:[1,1]})}e.maxOpen&&t.push({interval:[n[1],1/0],close:[0,0]}),Xw(t),z(t,function(u,f){u.index=f,u.text=this.formatValueText(u.interval)},this)},categories:function(t){var e=this.option;z(e.categories,function(r){t.push({text:this.formatValueText(r,!0),value:r})},this),vT(e,t)},pieces:function(t){var e=this.option;z(e.pieces,function(r,n){_e(r)||(r={value:r});var a={text:"",index:n};if(r.label!=null&&(a.text=r.label),r.hasOwnProperty("value")){var i=a.value=r.value;a.interval=[i,i],a.close=[1,1]}else{for(var o=a.interval=[],l=a.close=[0,0],c=[1,0,1],u=[-1/0,1/0],f=[],d=0;d<2;d++){for(var h=[["gte","gt","min"],["lte","lt","max"]][d],p=0;p<3&&o[d]==null;p++)o[d]=r[h[p]],l[d]=c[p],f[d]=p===2;o[d]==null&&(o[d]=u[d])}f[0]&&o[1]===1/0&&(l[0]=0),f[1]&&o[0]===-1/0&&(l[1]=0),o[0]===o[1]&&l[0]&&l[1]&&(a.value=o[0])}a.visual=Kt.retrieveVisuals(r),t.push(a)},this),vT(e,t),Xw(t),z(t,function(r){var n=r.close,a=[["<","\u2264"][n[1]],[">","\u2265"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,a)},this)}};function vT(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var OJ=AJ,LJ=function(t){me(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,a=n.get("textGap"),i=n.textStyleModel,o=i.getFont(),l=i.getTextColor(),c=this._getItemAlign(),u=n.itemSize,f=this._getViewData(),d=f.endsText,h=Ba(n.get("showLabel",!0),!d);d&&this._renderEndsText(r,d[0],u,h,c),z(f.viewPieceList,function(p){var m=p.piece,v=new lt;v.onclick=Be(this._onItemClick,this,m),this._enableHoverLink(v,p.indexInModelPieceList);var g=n.getRepresentValue(m);if(this._createItemSymbol(v,g,[0,0,u[0],u[1]]),h){var y=this.visualMapModel.getValueState(g);v.add(new ut({style:{x:c==="right"?-a:u[0]+a,y:u[1]/2,text:m.text,verticalAlign:"middle",align:c,font:o,fill:l,opacity:y==="outOfRange"?.5:1}}))}r.add(v)},this),d&&this._renderEndsText(r,d[1],u,h,c),go(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},e.prototype._enableHoverLink=function(r,n){var a=this;r.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var l=a.visualMapModel;l.option.hoverLink&&a.api.dispatchAction({type:o,batch:ld(l.findTargetDataIndices(n),l)})}},e.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return lT(r,this.api,r.itemSize);var a=n.align;return(!a||a==="auto")&&(a="left"),a},e.prototype._renderEndsText=function(r,n,a,i,o){if(!!n){var l=new lt,c=this.visualMapModel.textStyleModel;l.add(new ut({style:yr(c,{x:i?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:i?o:"center",text:n})})),r.add(l)}},e.prototype._getViewData=function(){var r=this.visualMapModel,n=he(r.getPieceList(),function(l,c){return{piece:l,indexInModelPieceList:c}}),a=r.get("text"),i=r.get("orient"),o=r.get("inverse");return(i==="horizontal"?o:!o)?n.reverse():a&&(a=a.slice().reverse()),{viewPieceList:n,endsText:a}},e.prototype._createItemSymbol=function(r,n,a){r.add(fn(this.getControllerVisual(n,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(n,"color")))},e.prototype._onItemClick=function(r){var n=this.visualMapModel,a=n.option,i=Te(a.selected),o=n.getSelectedMapKey(r);a.selectedMode==="single"?(i[o]=!0,z(i,function(l,c){i[c]=c===o})):i[o]=!i[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})},e.type="visualMap.piecewise",e}(oT),PJ=LJ;function BJ(t){t.registerComponentModel(OJ),t.registerComponentView(PJ),mT(t)}function IJ(t){dn(EJ),dn(BJ)}var jg=Math.sin,Yg=Math.cos,gT=Math.PI,wi=Math.PI*2,RJ=180/gT,VJ=function(){function t(){}return t.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},t.prototype.moveTo=function(e,r){this._add("M",e,r)},t.prototype.lineTo=function(e,r){this._add("L",e,r)},t.prototype.bezierCurveTo=function(e,r,n,a,i,o){this._add("C",e,r,n,a,i,o)},t.prototype.quadraticCurveTo=function(e,r,n,a){this._add("Q",e,r,n,a)},t.prototype.arc=function(e,r,n,a,i,o){this.ellipse(e,r,n,n,0,a,i,o)},t.prototype.ellipse=function(e,r,n,a,i,o,l,c){var u=l-o,f=!c,d=Math.abs(u),h=na(d-wi)||(f?u>=wi:-u>=wi),p=u>0?u%wi:u%wi+wi,m=!1;h?m=!0:na(d)?m=!1:m=p>=gT==!!f;var v=e+n*Yg(o),g=r+a*jg(o);this._start&&this._add("M",v,g);var y=Math.round(i*RJ);if(h){var _=1/this._p,w=(f?1:-1)*(wi-_);this._add("A",n,a,y,1,+f,e+n*Yg(o+w),r+a*jg(o+w)),_>.01&&this._add("A",n,a,y,0,+f,v,g)}else{var S=e+n*Yg(l),x=r+a*jg(l);this._add("A",n,a,y,+m,+f,S,x)}},t.prototype.rect=function(e,r,n,a){this._add("M",e,r),this._add("l",n,0),this._add("l",0,a),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(e,r,n,a,i,o,l,c,u){for(var f=[],d=this._p,h=1;h<arguments.length;h++){var p=arguments[h];if(isNaN(p)){this._invalid=!0;return}f.push(Math.round(p*d)/d)}this._d.push(e+f.join(" ")),this._start=e==="Z"},t.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},t.prototype.getStr=function(){return this._str},t}(),yT=VJ,Al="none",FJ=Math.round;function zJ(t){var e=t.fill;return e!=null&&e!==Al}function HJ(t){var e=t.stroke;return e!=null&&e!==Al}var Gg=["lineCap","miterLimit","lineJoin"],UJ=he(Gg,function(t){return"stroke-"+t.toLowerCase()});function jJ(t,e,r,n){var a=e.opacity==null?1:e.opacity;if(r instanceof Ir){t("opacity",a);return}if(zJ(e)){var i=to(e.fill);t("fill",i.color);var o=e.fillOpacity!=null?e.fillOpacity*i.opacity*a:i.opacity*a;(n||o<1)&&t("fill-opacity",o)}else t("fill",Al);if(HJ(e)){var l=to(e.stroke);t("stroke",l.color);var c=e.strokeNoScale?r.getLineScale():1,u=c?(e.lineWidth||0)/c:0,f=e.strokeOpacity!=null?e.strokeOpacity*l.opacity*a:l.opacity*a,d=e.strokeFirst;if((n||u!==1)&&t("stroke-width",u),(n||d)&&t("paint-order",d?"stroke":"fill"),(n||f<1)&&t("stroke-opacity",f),e.lineDash){var h=Tv(r),p=h[0],m=h[1];p&&(m=FJ(m||0),t("stroke-dasharray",p.join(",")),(m||n)&&t("stroke-dashoffset",m))}else n&&t("stroke-dasharray",Al);for(var v=0;v<Gg.length;v++){var g=Gg[v];if(n||e[g]!==Du[g]){var y=e[g]||Du[g];y&&t(UJ[v],y)}}}else n&&t("stroke",Al)}var _T="http://www.w3.org/2000/svg",wT="http://www.w3.org/1999/xlink",YJ="http://www.w3.org/2000/xmlns/",GJ="http://www.w3.org/XML/1998/namespace";function bT(t){return document.createElementNS(_T,t)}function yt(t,e,r,n,a){return{tag:t,attrs:r||{},children:n,text:a,key:e}}function WJ(t,e){var r=[];if(e)for(var n in e){var a=e[n],i=n;a!==!1&&(a!==!0&&a!=null&&(i+='="'+a+'"'),r.push(i))}return"<"+t+" "+r.join(" ")+">"}function ZJ(t){return"</"+t+">"}function Wg(t,e){e=e||{};var r=e.newline?`
71
+ `:"";function n(a){var i=a.children,o=a.tag,l=a.attrs;return WJ(o,l)+(a.text||"")+(i?""+r+he(i,function(c){return n(c)}).join(r)+r:"")+ZJ(o)}return n(t)}function qJ(t,e,r){r=r||{};var n=r.newline?`
72
+ `:"",a=" {"+n,i=n+"}",o=he(Fe(t),function(c){return c+a+he(Fe(t[c]),function(u){return u+":"+t[c][u]+";"}).join(n)+i}).join(n),l=he(Fe(e),function(c){return"@keyframes "+c+a+he(Fe(e[c]),function(u){return u+a+he(Fe(e[c][u]),function(f){var d=e[c][u][f];return f==="d"&&(d='path("'+d+'")'),f+":"+d+";"}).join(n)+i}).join(n)+i}).join(n);return!o&&!l?"":["<![CDATA[",o,l,"]]>"].join(n)}function Zg(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function ST(t,e,r,n){return yt("svg","root",{width:t,height:e,xmlns:_T,"xmlns:xlink":wT,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+t+" "+e:!1},r)}var xT={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},bi="transform-origin";function XJ(t,e,r){var n=re({},t.shape);re(n,e),t.buildPath(r,n);var a=new yT;return a.reset(Cw(t)),r.rebuildPath(a,1),a.generateStr(),a.getStr()}function KJ(t,e){var r=e.originX,n=e.originY;(r||n)&&(t[bi]=r+"px "+n+"px")}var JJ={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function CT(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function QJ(t,e,r){var n=t.shape.paths,a={},i,o;if(z(n,function(c){var u=Zg(r.zrId);u.animation=!0,cd(c,{},u,!0);var f=u.cssAnims,d=u.cssNodes,h=Fe(f),p=h.length;if(!!p){o=h[p-1];var m=f[o];for(var v in m){var g=m[v];a[v]=a[v]||{d:""},a[v].d+=g.d||""}for(var y in d){var _=d[y].animation;_.indexOf(o)>=0&&(i=_)}}}),!!i){e.d=!1;var l=CT(a,r);return i.replace(o,l)}}function kT(t){return ve(t)?xT[t]?"cubic-bezier("+xT[t]+")":mp(t)?t:"":""}function cd(t,e,r,n){var a=t.animators,i=a.length,o=[];if(t instanceof CS){var l=QJ(t,e,r);if(l)o.push(l);else if(!i)return}else if(!i)return;for(var c={},u=0;u<i;u++){var f=a[u],d=[f.getMaxTime()/1e3+"s"],h=kT(f.getClip().easing),p=f.getDelay();h?d.push(h):d.push("linear"),p&&d.push(p/1e3+"s"),f.getLoop()&&d.push("infinite");var m=d.join(" ");c[m]=c[m]||[m,[]],c[m][1].push(f)}function v(_){var w=_[1],S=w.length,x={},b={},C={},k="animation-timing-function";function $(de,Z,K){for(var J=de.getTracks(),oe=de.getMaxTime(),Ce=0;Ce<J.length;Ce++){var Se=J[Ce];if(Se.needsAnimate()){var $e=Se.keyframes,ge=Se.propName;if(K&&(ge=K(ge)),ge)for(var Qe=0;Qe<$e.length;Qe++){var ot=$e[Qe],j=Math.round(ot.time/oe*100)+"%",W=kT(ot.easing),q=ot.rawValue;(ve(q)||We(q))&&(Z[j]=Z[j]||{},Z[j][ge]=ot.rawValue,W&&(Z[j][k]=W))}}}}for(var N=0;N<S;N++){var A=w[N],L=A.targetName;L?L==="shape"&&$(A,b):!n&&$(A,x)}for(var M in x){var O={};Iw(O,t),re(O,x[M]);var T=kw(O),E=x[M][k];C[M]=T?{transform:T}:{},KJ(C[M],O),E&&(C[M][k]=E)}var D,P=!0;for(var M in b){C[M]=C[M]||{};var I=!D,E=b[M][k];I&&(D=new An);var V=D.len();D.reset(),C[M].d=XJ(t,b[M],D);var F=D.len();if(!I&&V!==F){P=!1;break}E&&(C[M][k]=E)}if(!P)for(var M in C)delete C[M].d;if(!n)for(var N=0;N<S;N++){var A=w[N],L=A.targetName;L==="style"&&$(A,C,function(J){return JJ[J]})}for(var H=Fe(C),Y=!0,Q,N=1;N<H.length;N++){var ae=H[N-1],le=H[N];if(C[ae][bi]!==C[le][bi]){Y=!1;break}Q=C[ae][bi]}if(Y&&Q){for(var M in C)C[M][bi]&&delete C[M][bi];e[bi]=Q}if(Mt(H,function(de){return Fe(C[de]).length>0}).length){var ye=CT(C,r);return ye+" "+_[0]+" both"}}for(var g in c){var l=v(c[g]);l&&o.push(l)}if(o.length){var y=r.zrId+"-cls-"+r.cssClassIdx++;r.cssNodes["."+y]={animation:o.join(",")},e.class=y}}var Dl=Math.round;function TT(t){return t&&ve(t.src)}function MT(t){return t&&Ee(t.toDataURL)}function qg(t,e,r,n){jJ(function(a,i){var o=a==="fill"||a==="stroke";o&&Y9(i)?sQ(e,t,a,n):o&&j9(i)?lQ(r,t,a,n):t[a]=i},e,r,!1),oQ(r,t,n)}function $T(t){return na(t[0]-1)&&na(t[1])&&na(t[2])&&na(t[3]-1)}function eQ(t){return na(t[4])&&na(t[5])}function Xg(t,e,r){if(e&&!(eQ(e)&&$T(e))){var n=r?10:1e4;t.transform=$T(e)?"translate("+Dl(e[4]*n)/n+" "+Dl(e[5]*n)/n+")":R9(e)}}function NT(t,e,r){for(var n=t.points,a=[],i=0;i<n.length;i++)a.push(Dl(n[i][0]*r)/r),a.push(Dl(n[i][1]*r)/r);e.points=a.join(" ")}function ET(t){return!t.smooth}function tQ(t){var e=he(t,function(r){return typeof r=="string"?[r,r]:r});return function(r,n,a){for(var i=0;i<e.length;i++){var o=e[i],l=r[o[0]];l!=null&&(n[o[1]]=Dl(l*a)/a)}}}var rQ={circle:[tQ(["cx","cy","r"])],polyline:[NT,ET],polygon:[NT,ET]};function nQ(t){for(var e=t.animators,r=0;r<e.length;r++)if(e[r].targetName==="shape")return!0;return!1}function AT(t,e){var r=t.style,n=t.shape,a=rQ[t.type],i={},o=e.animation,l="path",c=t.style.strokePercent,u=e.compress&&Cw(t)||4;if(a&&!e.willUpdate&&!(a[1]&&!a[1](n))&&!(o&&nQ(t))&&!(c<1)){l=t.type;var f=Math.pow(10,u);a[0](n,i,f)}else{t.path||t.createPathProxy();var d=t.path;t.shapeChanged()&&(d.beginPath(),t.buildPath(d,t.shape),t.pathUpdated());var h=d.getVersion(),p=t,m=p.__svgPathBuilder;(p.__svgPathVersion!==h||!m||c!==p.__svgPathStrokePercent)&&(m||(m=p.__svgPathBuilder=new yT),m.reset(u),d.rebuildPath(m,c),m.generateStr(),p.__svgPathVersion=h,p.__svgPathStrokePercent=c),i.d=m.getStr()}return Xg(i,t.transform),qg(i,r,t,e),e.animation&&cd(t,i,e),yt(l,t.id+"",i)}function aQ(t,e){var r=t.style,n=r.image;if(n&&!ve(n)&&(TT(n)?n=n.src:MT(n)&&(n=n.toDataURL())),!!n){var a=r.x||0,i=r.y||0,o=r.width,l=r.height,c={href:n,width:o,height:l};return a&&(c.x=a),i&&(c.y=i),Xg(c,t.transform),qg(c,r,t,e),e.animation&&cd(t,c,e),yt("image",t.id+"",c)}}function iQ(t,e){var r=t.style,n=r.text;if(n!=null&&(n+=""),!(!n||isNaN(r.x)||isNaN(r.y))){var a=r.font||Kn,i=r.x||0,o=F9(r.y||0,wu(a),r.textBaseline),l=V9[r.textAlign]||r.textAlign,c={"dominant-baseline":"central","text-anchor":l};if(Eb(r)){var u="",f=r.fontStyle,d=$b(r.fontSize);if(!parseFloat(d))return;var h=r.fontFamily||I_,p=r.fontWeight;u+="font-size:"+d+";font-family:"+h+";",f&&f!=="normal"&&(u+="font-style:"+f+";"),p&&p!=="normal"&&(u+="font-weight:"+p+";"),c.style=u}else c.style="font: "+a;return n.match(/\s/)&&(c["xml:space"]="preserve"),i&&(c.x=i),o&&(c.y=o),Xg(c,t.transform),qg(c,r,t,e),e.animation&&cd(t,c,e),yt("text",t.id+"",c,void 0,n)}}function DT(t,e){if(t instanceof je)return AT(t,e);if(t instanceof Ir)return aQ(t,e);if(t instanceof Ou)return iQ(t,e)}function oQ(t,e,r){var n=t.style;if(z9(n)){var a=H9(t),i=r.shadowCache,o=i[a];if(!o){var l=t.getGlobalScale(),c=l[0],u=l[1];if(!c||!u)return;var f=n.shadowOffsetX||0,d=n.shadowOffsetY||0,h=n.shadowBlur,p=to(n.shadowColor),m=p.opacity,v=p.color,g=h/2/c,y=h/2/u,_=g+" "+y;o=r.zrId+"-s"+r.shadowIdx++,r.defs[o]=yt("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[yt("feDropShadow","",{dx:f/c,dy:d/u,stdDeviation:_,"flood-color":v,"flood-opacity":m})]),i[a]=o}e.filter=cu(o)}}function sQ(t,e,r,n){var a=t[r],i,o={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if(Sw(a))i="linearGradient",o.x1=a.x,o.y1=a.y,o.x2=a.x2,o.y2=a.y2;else if(xw(a))i="radialGradient",o.cx=Ae(a.x,.5),o.cy=Ae(a.y,.5),o.r=Ae(a.r,.5);else return;for(var l=a.colorStops,c=[],u=0,f=l.length;u<f;++u){var d=Sp(l[u].offset)*100+"%",h=l[u].color,p=to(h),m=p.color,v=p.opacity,g={offset:d};g["stop-color"]=m,v<1&&(g["stop-opacity"]=v),c.push(yt("stop",u+"",g))}var y=yt(i,"",o,c),_=Wg(y),w=n.gradientCache,S=w[_];S||(S=n.zrId+"-g"+n.gradientIdx++,w[_]=S,o.id=S,n.defs[S]=yt(i,S,o,c)),e[r]=cu(S)}function lQ(t,e,r,n){var a=t.style[r],i={patternUnits:"userSpaceOnUse"},o;if(bw(a)){var l=a.imageWidth,c=a.imageHeight,u=void 0,f=a.image;if(ve(f)?u=f:TT(f)?u=f.src:MT(f)&&(u=f.toDataURL()),typeof Image=="undefined"){var d="Image width/height must been given explictly in svg-ssr renderer.";cr(l,d),cr(c,d)}else if(l==null||c==null){var h=function(_,w){if(_){var S=_.elm,x=_.attrs.width=l||w.width,b=_.attrs.height=c||w.height;S&&(S.setAttribute("width",x),S.setAttribute("height",b))}},p=rm(u,null,t,function(_){h(m,_),h(o,_)});p&&p.width&&p.height&&(l=l||p.width,c=c||p.height)}o=yt("image","img",{href:u,width:l,height:c}),i.width=l,i.height=c}else a.svgElement&&(o=Te(a.svgElement),i.width=a.svgWidth,i.height=a.svgHeight);if(!!o){i.patternTransform=kw(a);var m=yt("pattern","",i,[o]),v=Wg(m),g=n.patternCache,y=g[v];y||(y=n.zrId+"-p"+n.patternIdx++,g[v]=y,i.id=y,m=n.defs[y]=yt("pattern",y,i,[o])),e[r]=cu(y)}}function cQ(t,e,r){var n=r.clipPathCache,a=r.defs,i=n[t.id];if(!i){i=r.zrId+"-c"+r.clipPathIdx++;var o={id:i};n[t.id]=i,a[i]=yt("clipPath",i,o,[AT(t,r)])}e["clip-path"]=cu(i)}function OT(t){return document.createTextNode(t)}function Si(t,e,r){t.insertBefore(e,r)}function LT(t,e){t.removeChild(e)}function PT(t,e){t.appendChild(e)}function BT(t){return t.parentNode}function IT(t){return t.nextSibling}function Kg(t,e){t.textContent=e}var RT=58,uQ=120,fQ=yt("","");function Jg(t){return t===void 0}function mn(t){return t!==void 0}function dQ(t,e,r){for(var n={},a=e;a<=r;++a){var i=t[a].key;i!==void 0&&(n[i]=a)}return n}function Ol(t,e){var r=t.key===e.key,n=t.tag===e.tag;return n&&r}function Ll(t){var e,r=t.children,n=t.tag;if(mn(n)){var a=t.elm=bT(n);if(Qg(fQ,t),se(r))for(e=0;e<r.length;++e){var i=r[e];i!=null&&PT(a,Ll(i))}else mn(t.text)&&!_e(t.text)&&PT(a,OT(t.text))}else t.elm=OT(t.text);return t.elm}function VT(t,e,r,n,a){for(;n<=a;++n){var i=r[n];i!=null&&Si(t,Ll(i),e)}}function ud(t,e,r,n){for(;r<=n;++r){var a=e[r];if(a!=null)if(mn(a.tag)){var i=BT(a.elm);LT(i,a.elm)}else LT(t,a.elm)}}function Qg(t,e){var r,n=e.elm,a=t&&t.attrs||{},i=e.attrs||{};if(a!==i){for(r in i){var o=i[r],l=a[r];l!==o&&(o===!0?n.setAttribute(r,""):o===!1?n.removeAttribute(r):r.charCodeAt(0)!==uQ?n.setAttribute(r,o):r==="xmlns:xlink"||r==="xmlns"?n.setAttributeNS(YJ,r,o):r.charCodeAt(3)===RT?n.setAttributeNS(GJ,r,o):r.charCodeAt(5)===RT?n.setAttributeNS(wT,r,o):n.setAttribute(r,o))}for(r in a)r in i||n.removeAttribute(r)}}function hQ(t,e,r){for(var n=0,a=0,i=e.length-1,o=e[0],l=e[i],c=r.length-1,u=r[0],f=r[c],d,h,p,m;n<=i&&a<=c;)o==null?o=e[++n]:l==null?l=e[--i]:u==null?u=r[++a]:f==null?f=r[--c]:Ol(o,u)?(Oo(o,u),o=e[++n],u=r[++a]):Ol(l,f)?(Oo(l,f),l=e[--i],f=r[--c]):Ol(o,f)?(Oo(o,f),Si(t,o.elm,IT(l.elm)),o=e[++n],f=r[--c]):Ol(l,u)?(Oo(l,u),Si(t,l.elm,o.elm),l=e[--i],u=r[++a]):(Jg(d)&&(d=dQ(e,n,i)),h=d[u.key],Jg(h)?Si(t,Ll(u),o.elm):(p=e[h],p.tag!==u.tag?Si(t,Ll(u),o.elm):(Oo(p,u),e[h]=void 0,Si(t,p.elm,o.elm))),u=r[++a]);(n<=i||a<=c)&&(n>i?(m=r[c+1]==null?null:r[c+1].elm,VT(t,m,r,a,c)):ud(t,e,n,i))}function Oo(t,e){var r=e.elm=t.elm,n=t.children,a=e.children;t!==e&&(Qg(t,e),Jg(e.text)?mn(n)&&mn(a)?n!==a&&hQ(r,n,a):mn(a)?(mn(t.text)&&Kg(r,""),VT(r,null,a,0,a.length-1)):mn(n)?ud(r,n,0,n.length-1):mn(t.text)&&Kg(r,""):t.text!==e.text&&(mn(n)&&ud(r,n,0,n.length-1),Kg(r,e.text)))}function pQ(t,e){if(Ol(t,e))Oo(t,e);else{var r=t.elm,n=BT(r);Ll(e),n!==null&&(Si(n,e.elm,IT(r)),ud(n,[t],0,0))}return e}var mQ=0,vQ=function(){function t(e,r,n){if(this.type="svg",this.refreshHover=FT(),this.configLayer=FT(),this.storage=r,this._opts=n=re({},n),this.root=e,this._id="zr"+mQ++,this._oldVNode=ST(n.width,n.height),e&&!n.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=bT("svg");Qg(null,this._oldVNode),a.appendChild(i),e.appendChild(a)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",pQ(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return DT(e,Zg(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),n=this._backgroundColor,a=this._width,i=this._height,o=Zg(this._id);o.animation=e.animation,o.willUpdate=e.willUpdate,o.compress=e.compress;var l=[];if(n&&n!=="none"){var c=to(n),u=c.color,f=c.opacity;this._bgVNode=yt("rect","bg",{width:a,height:i,x:"0",y:"0",id:"0",fill:u,"fill-opacity":f}),l.push(this._bgVNode)}else this._bgVNode=null;var d=e.compress?null:this._mainVNode=yt("g","main",{},[]);this._paintList(r,o,d?d.children:l),d&&l.push(d);var h=he(Fe(o.defs),function(v){return o.defs[v]});if(h.length&&l.push(yt("defs","defs",{},h)),e.animation){var p=qJ(o.cssNodes,o.cssAnims,{newline:!0});if(p){var m=yt("style","stl",{},[],p);l.push(m)}}return ST(a,i,l,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},Wg(this.renderToVNode({animation:Ae(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Ae(e.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e;var r=this._bgVNode;if(r&&r.elm){var n=to(e),a=n.color,i=n.opacity;r.elm.setAttribute("fill",a),i<1&&r.elm.setAttribute("fill-opacity",i)}},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(e,r,n){for(var a=e.length,i=[],o=0,l,c,u=0,f=0;f<a;f++){var d=e[f];if(!d.invisible){var h=d.__clipPaths,p=h&&h.length||0,m=c&&c.length||0,v=void 0;for(v=Math.max(p-1,m-1);v>=0&&!(h&&c&&h[v]===c[v]);v--);for(var g=m-1;g>v;g--)o--,l=i[o-1];for(var y=v+1;y<p;y++){var _={};cQ(h[y],_,r);var w=yt("g","clip-g-"+u++,_,[]);(l?l.children:n).push(w),i[o++]=w,l=w}c=h;var S=DT(d,r);S&&(l?l.children:n).push(S)}}},t.prototype.resize=function(e,r){var n=this._opts,a=this.root,i=this._viewport;if(e!=null&&(n.width=e),r!=null&&(n.height=r),a&&i&&(i.style.display="none",e=To(a,0,n),r=To(a,1,n),i.style.display=""),this._width!==e||this._height!==r){if(this._width=e,this._height=r,i){var o=i.style;o.width=e+"px",o.height=r+"px"}var l=this._svgDom;l&&(l.setAttribute("width",e),l.setAttribute("height",r))}},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},t.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},t.prototype.toDataURL=function(e){var r=encodeURIComponent(this.renderToString()),n="data:image/svg+xml;";return e?(r=G9(r),r&&n+"base64,"+r):n+"charset=UTF-8,"+r},t}();function FT(t){return function(){}}var gQ=vQ;function yQ(t){t.registerPainter("svg",gQ)}function zT(t,e,r){var n=Jn.createCanvas(),a=e.getWidth(),i=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=a+"px",o.height=i+"px",n.setAttribute("data-zr-dom-id",t)),n.width=a*r,n.height=i*r,n}var _Q=function(t){Xe(e,t);function e(r,n,a){var i=t.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null;var o;a=a||gu,typeof r=="string"?o=zT(r,n,a):_e(r)&&(o=r,r=o.id),i.id=r,i.dom=o;var l=o.style;return l&&(Y_(o),o.onselectstart=function(){return!1},l.padding="0",l.margin="0",l.borderWidth="0"),i.painter=n,i.dpr=a,i}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=zT("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},e.prototype.createRepaintRects=function(r,n,a,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],l=this.maxRepaintRectCount,c=!1,u=new Ke(0,0,0,0);function f(_){if(!(!_.isFinite()||_.isZero()))if(o.length===0){var w=new Ke(0,0,0,0);w.copy(_),o.push(w)}else{for(var S=!1,x=1/0,b=0,C=0;C<o.length;++C){var k=o[C];if(k.intersect(_)){var $=new Ke(0,0,0,0);$.copy(k),$.union(_),o[C]=$,S=!0;break}else if(c){u.copy(_),u.union(k);var N=_.width*_.height,A=k.width*k.height,L=u.width*u.height,M=L-N-A;M<x&&(x=M,b=C)}}if(c&&(o[b].union(_),S=!0),!S){var w=new Ke(0,0,0,0);w.copy(_),o.push(w)}c||(c=o.length>=l)}}for(var d=this.__startIndex;d<this.__endIndex;++d){var h=r[d];if(h){var p=h.shouldBePainted(a,i,!0,!0),m=h.__isRendered&&(h.__dirty&er||!p)?h.getPrevPaintRect():null;m&&f(m);var v=p&&(h.__dirty&er||!h.__isRendered)?h.getPaintRect():null;v&&f(v)}}for(var d=this.__prevStartIndex;d<this.__prevEndIndex;++d){var h=n[d],p=h.shouldBePainted(a,i,!0,!0);if(h&&(!p||!h.__zr)&&h.__isRendered){var m=h.getPrevPaintRect();m&&f(m)}}var g;do{g=!1;for(var d=0;d<o.length;){if(o[d].isZero()){o.splice(d,1);continue}for(var y=d+1;y<o.length;)o[d].intersect(o[y])?(g=!0,o[d].union(o[y]),o.splice(y,1)):y++;d++}}while(g);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(r,n){var a=this.dpr,i=this.dom,o=i.style,l=this.domBack;o&&(o.width=r+"px",o.height=n+"px"),i.width=r*a,i.height=n*a,l&&(l.width=r*a,l.height=n*a,a!==1&&this.ctxBack.scale(a,a))},e.prototype.clear=function(r,n,a){var i=this.dom,o=this.ctx,l=i.width,c=i.height;n=n||this.clearColor;var u=this.motionBlur&&!r,f=this.lastFrameAlpha,d=this.dpr,h=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,l/d,c/d));var p=this.domBack;function m(v,g,y,_){if(o.clearRect(v,g,y,_),n&&n!=="transparent"){var w=void 0;Wc(n)?(w=n.__canvasGradient||kv(o,n,{x:0,y:0,width:y,height:_}),n.__canvasGradient=w):GV(n)&&(w=Mv(o,n,{dirty:function(){h.setUnpainted(),h.__painter.refresh()}})),o.save(),o.fillStyle=w||n,o.fillRect(v,g,y,_),o.restore()}u&&(o.save(),o.globalAlpha=f,o.drawImage(p,v,g,y,_),o.restore())}!a||u?m(0,0,l,c):a.length&&z(a,function(v){m(v.x*d,v.y*d,v.width*d,v.height*d)})},e}(Jr),e0=_Q,HT=1e5,xi=314159,fd=.01,wQ=.001;function bQ(t){return t?t.__builtin__?!0:!(typeof t.resize!="function"||typeof t.refresh!="function"):!1}function SQ(t,e){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var xQ=function(){function t(e,r,n,a){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=n=re({},n||{}),this.dpr=n.devicePixelRatio||gu,this._singleCanvas=i,this.root=e;var o=e.style;o&&(Y_(e),e.innerHTML=""),this.storage=r;var l=this._zlevelList;this._prevDisplayList=[];var c=this._layers;if(i){var f=e,d=f.width,h=f.height;n.width!=null&&(d=n.width),n.height!=null&&(h=n.height),this.dpr=n.devicePixelRatio||1,f.width=d*this.dpr,f.height=h*this.dpr,this._width=d,this._height=h;var p=new e0(f,this,this.dpr);p.__builtin__=!0,p.initContext(),c[xi]=p,p.zlevel=xi,l.push(xi),this._domRoot=e}else{this._width=To(e,0,n),this._height=To(e,1,n);var u=this._domRoot=SQ(this._width,this._height);e.appendChild(u)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.refresh=function(e){var r=this.storage.getDisplayList(!0),n=this._prevDisplayList,a=this._zlevelList;this._redrawId=Math.random(),this._paintList(r,n,e,this._redrawId);for(var i=0;i<a.length;i++){var o=a[i],l=this._layers[o];if(!l.__builtin__&&l.refresh){var c=i===0?this._backgroundColor:null;l.refresh(c)}}return this._opts.useDirtyRect&&(this._prevDisplayList=r.slice()),this},t.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},t.prototype._paintHoverList=function(e){var r=e.length,n=this._hoverlayer;if(n&&n.clear(),!!r){for(var a={inHover:!0,viewWidth:this._width,viewHeight:this._height},i,o=0;o<r;o++){var l=e[o];l.__inHover&&(n||(n=this._hoverlayer=this.getLayer(HT)),i||(i=n.ctx,i.save()),di(i,l,a,o===r-1))}i&&i.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer(HT)},t.prototype.paintOne=function(e,r){F2(e,r)},t.prototype._paintList=function(e,r,n,a){if(this._redrawId===a){n=n||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,r,n),o=i.finished,l=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),l&&this._paintHoverList(e),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var c=this;pp(function(){c._paintList(e,r,n,a)})}}},t.prototype._compositeManually=function(){var e=this.getLayer(xi).ctx,r=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,r,n),this.eachBuiltinLayer(function(a){a.virtual&&e.drawImage(a.dom,0,0,r,n)})},t.prototype._doPaintList=function(e,r,n){for(var a=this,i=[],o=this._opts.useDirtyRect,l=0;l<this._zlevelList.length;l++){var c=this._zlevelList[l],u=this._layers[c];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&i.push(u)}for(var f=!0,d=!1,h=function(v){var g=i[v],y=g.ctx,_=o&&g.createRepaintRects(e,r,p._width,p._height),w=n?g.__startIndex:g.__drawIndex,S=!n&&g.incremental&&Date.now,x=S&&Date.now(),b=g.zlevel===p._zlevelList[0]?p._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,b,_);else if(w===g.__startIndex){var C=e[w];(!C.incremental||!C.notClear||n)&&g.clear(!1,b,_)}w===-1&&(console.error("For some unknown reason. drawIndex is -1"),w=g.__startIndex);var k,$=function(M){var O={inHover:!1,allClipped:!1,prevEl:null,viewWidth:a._width,viewHeight:a._height};for(k=w;k<g.__endIndex;k++){var T=e[k];if(T.__inHover&&(d=!0),a._doPaintEl(T,g,o,M,O,k===g.__endIndex-1),S){var E=Date.now()-x;if(E>15)break}}O.prevElClipPaths&&y.restore()};if(_)if(_.length===0)k=g.__endIndex;else for(var N=p.dpr,A=0;A<_.length;++A){var L=_[A];y.save(),y.beginPath(),y.rect(L.x*N,L.y*N,L.width*N,L.height*N),y.clip(),$(L),y.restore()}else y.save(),$(),y.restore();g.__drawIndex=k,g.__drawIndex<g.__endIndex&&(f=!1)},p=this,m=0;m<i.length;m++)h(m);return Pe.wxa&&z(this._layers,function(v){v&&v.ctx&&v.ctx.draw&&v.ctx.draw()}),{finished:f,needsRefreshHover:d}},t.prototype._doPaintEl=function(e,r,n,a,i,o){var l=r.ctx;if(n){var c=e.getPaintRect();(!a||c&&c.intersect(a))&&(di(l,e,i,o),e.setPrevPaintRect(c))}else di(l,e,i,o)},t.prototype.getLayer=function(e,r){this._singleCanvas&&!this._needsManuallyCompositing&&(e=xi);var n=this._layers[e];return n||(n=new e0("zr_"+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Re(n,this._layerConfig[e],!0):this._layerConfig[e-fd]&&Re(n,this._layerConfig[e-fd],!0),r&&(n.virtual=r),this.insertLayer(e,n),n.initContext()),n},t.prototype.insertLayer=function(e,r){var n=this._layers,a=this._zlevelList,i=a.length,o=this._domRoot,l=null,c=-1;if(!n[e]&&!!bQ(r)){if(i>0&&e>a[0]){for(c=0;c<i-1&&!(a[c]<e&&a[c+1]>e);c++);l=n[a[c]]}if(a.splice(c+1,0,e),n[e]=r,!r.virtual)if(l){var u=l.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.__painter=this}},t.prototype.eachLayer=function(e,r){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a];e.call(r,this._layers[i],i)}},t.prototype.eachBuiltinLayer=function(e,r){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a],o=this._layers[i];o.__builtin__&&e.call(r,o,i)}},t.prototype.eachOtherLayer=function(e,r){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a],o=this._layers[i];o.__builtin__||e.call(r,o,i)}},t.prototype.getLayers=function(){return this._layers},t.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(d,h){d.__dirty=d.__used=!1});function r(d){i&&(i.__endIndex!==d&&(i.__dirty=!0),i.__endIndex=d)}if(this._singleCanvas)for(var n=1;n<e.length;n++){var a=e[n];if(a.zlevel!==e[n-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}}var i=null,o=0,l,c;for(c=0;c<e.length;c++){var a=e[c],u=a.zlevel,f=void 0;l!==u&&(l=u,o=0),a.incremental?(f=this.getLayer(u+wQ,this._needsManuallyCompositing),f.incremental=!0,o=1):f=this.getLayer(u+(o>0?fd:0),this._needsManuallyCompositing),f.__builtin__||Zh("ZLevel "+u+" has been used by unkown layer "+f.id),f!==i&&(f.__used=!0,f.__startIndex!==c&&(f.__dirty=!0),f.__startIndex=c,f.incremental?f.__drawIndex=-1:f.__drawIndex=c,r(c),i=f),a.__dirty&er&&!a.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=c))}r(c),this.eachBuiltinLayer(function(d,h){!d.__used&&d.getElementCount()>0&&(d.__dirty=!0,d.__startIndex=d.__endIndex=d.__drawIndex=0),d.__dirty&&d.__drawIndex<0&&(d.__drawIndex=d.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,z(this._layers,function(r){r.setUnpainted()})},t.prototype.configLayer=function(e,r){if(r){var n=this._layerConfig;n[e]?Re(n[e],r,!0):n[e]=r;for(var a=0;a<this._zlevelList.length;a++){var i=this._zlevelList[a];if(i===e||i===e+fd){var o=this._layers[i];Re(o,n[e],!0)}}}},t.prototype.delLayer=function(e){var r=this._layers,n=this._zlevelList,a=r[e];!a||(a.dom.parentNode.removeChild(a.dom),delete r[e],n.splice(Ge(n,e),1))},t.prototype.resize=function(e,r){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var a=this._opts,i=this.root;if(e!=null&&(a.width=e),r!=null&&(a.height=r),e=To(i,0,a),r=To(i,1,a),n.style.display="",this._width!==e||r!==this._height){n.style.width=e+"px",n.style.height=r+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,r);this.refresh(!0)}this._width=e,this._height=r}else{if(e==null||r==null)return;this._width=e,this._height=r,this.getLayer(xi).resize(e,r)}return this},t.prototype.clearLayer=function(e){var r=this._layers[e];r&&r.clear()},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},t.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[xi].dom;var r=new e0("image",this,e.pixelRatio||this.dpr);r.initContext(),r.clear(!1,e.backgroundColor||this._backgroundColor);var n=r.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var a=r.dom.width,i=r.dom.height;this.eachLayer(function(d){d.__builtin__?n.drawImage(d.dom,0,0,a,i):d.renderToCanvas&&(n.save(),d.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},l=this.storage.getDisplayList(!0),c=0,u=l.length;c<u;c++){var f=l[c];di(n,f,o,c===u-1)}return r.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t}(),CQ=xQ;function kQ(t){t.registerPainter("canvas",CQ)}const TQ=["id"],Vn=s.defineComponent({props:{uuid:{type:[String,Number],default:null},style:{type:Object,default:()=>({width:"100%",height:"240px"})},options:{type:Object,default:()=>({})},grid:{type:Object,default:()=>({left:"3%",right:"4%",top:40,bottom:50,containLabel:!0})},loading:{type:Boolean,default:!1},renderer:{type:String,default:"svg"},measure:{type:Object,default:null},chartType:{type:String,default:""}},setup(t){const e=t;dn([IJ,OK,$K,lJ,ZK,aK,QZ,PZ,fq,yX,NX,kQ,yQ]);let r=s.ref(null);const n=a1(()=>{r.value.resize()},200);s.onMounted(()=>{i(),window.addEventListener("resize",n)}),s.onUnmounted(()=>{var c;window.removeEventListener("resize",n),(c=r.value)==null||c.dispose()});const a=s.ref(null),i=()=>{r.value=s.markRaw(TG(a.value,{renderer:e.renderer})),o()},o=()=>{var u;const c=Ye(te({grid:e.grid},e.options));c.series.forEach(f=>{var d;f.label?f.label.show=l.showLabel:f.label={show:l.showLabel},e.measure&&(f.label.formatter=function({value:h}){return`${Oe(h,e.measure.format)}`}),(e==null?void 0:e.chartType)==="StackBar"&&(f.label.formatter=function({value:h}){return`${h==null?void 0:h[1]}%`}),((d=f==null?void 0:f._extra)==null?void 0:d.format)&&(f.label.formatter=function({value:h}){var p;return`${Oe(h,(p=f==null?void 0:f._extra)==null?void 0:p.format)}`}),f.label.color="rgba(0,0,0,.57)",f.type==="bar"&&(f.label.position=(e==null?void 0:e.chartType)==="StackBar"?"inside":"top"),f.showSymbol=l.showLabel}),c.legend&&(c.legend.show=l.showLegend),(u=r==null?void 0:r.value)==null||u.setOption(c,{replaceMerge:["xAxis","yAxis","series"]})},l=s.inject("styleState");return s.watch(()=>[l.showLabel,l.showLegend],(c,u)=>{o()}),s.watch(()=>e.options,(c,u)=>{o()},{deep:!0}),(c,u)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"chartRef",ref:a,id:`echarts${t.uuid}`,style:s.normalizeStyle([{overflow:"hidden"},t.style])},null,12,TQ))}}),t0=["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Helvetica Neue","Arial","Noto Sans","sans-serif","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"],jr=["#C24B4B","#4885ED","#78C87D","#FAA75A","#26B8F7","#B449F5","#F4D364","#08979C","#ED7A9D","#C0E357"],UT={lineStyle:{width:2,type:"dotted",opacity:.48},showSymbol:!1,emphasis:{lineStyle:{width:2}}},r0={itemStyle:{normal:{opacity:.45,borderColor:"#ffffff",borderWidth:1,borderRadius:0,borderType:"dotted"}}},dd=()=>({textStyle:{fontFamily:t0},color:jr,tooltip:{show:!0,confine:!0,trigger:"axis",padding:[1,10]},legend:{type:"scroll",show:!1,data:[]},grid:{left:"3%",right:"4%",top:50,bottom:10,containLabel:!0},xAxis:{type:"category",boundaryGap:!0,axisTick:{show:!1},axisLine:{lineStyle:{color:"rgba(0,0,0,.12)"}},axisLabel:{show:!0,color:"rgba(0,0,0,.54)",formatter(t){return t.length>=10?fe(t).format("YYYY-MM-DD HH:mm"):t.length<10?t:fe(t).format("YYYY-MM-DD")}},data:[]},yAxis:{type:"value",splitLine:{show:!0,lineStyle:{color:["rgba(0, 0, 0, 0.12)"]}},axisTick:{show:!1},axisLine:{lineStyle:{color:"rgba(0,0,0,.12)"}},axisLabel:{show:!0,color:"rgba(0,0,0,.54)",width:70,formatter(t){return`${m1(t).format("0,0[.]0a")}`}}},series:[]}),MQ=(t,e)=>({name:t,type:"pie",radius:["40%","62%"],avoidLabelOverlap:!0,data:e,label:{}}),$Q=()=>({textStyle:{fontFamily:t0},color:jr,tooltip:{confine:!0,show:!0,trigger:"item"},legend:{type:"scroll",top:"bottom",data:[]},series:[]}),NQ=()=>({color:["#0C1D54","#122E7A","#2047A1","#3263C7","#4885ED","#73A9FA","#9EC8FF"],tooltip:{show:!0,confine:!0},xAxis:{type:"category",data:[],splitArea:{show:!0},boundaryGap:!0,axisTick:{show:!1},axisLine:{lineStyle:{color:"rgba(0,0,0,.12)"}},axisLabel:{show:!0,color:"rgba(0,0,0,.54)"}},yAxis:{type:"category",data:[],splitArea:{show:!0},splitLine:{lineStyle:{color:["rgba(0, 0, 0, 0.05)"]}},axisTick:{show:!1},axisLine:{lineStyle:{color:"rgba(0,0,0,.12)"}},axisLabel:{show:!0,color:"rgba(0,0,0,.54)"}},visualMap:{min:0,calculable:!0,orient:"horizontal",left:"center",bottom:"1%",inRange:{color:["#9EC8FF","#3263C7","#0C1D54"]}},series:[]}),EQ=()=>({textStyle:{fontFamily:t0},color:jr,legend:{type:"scroll",data:[],top:"bottom"},tooltip:{confine:!0,trigger:"item",show:!0},series:[]}),AQ=(t,e)=>({name:t,type:"funnel",left:"25%",top:60,bottom:20,width:"50%",minSize:"0%",maxSize:"100%",sort:"descending",gap:2,label:{show:!0,position:"inside",formatter:"{b} : {d}%"},labelLine:{length:10,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{fontSize:20}},data:e}),DQ=()=>({color:jr,tooltip:{trigger:"axis",axisPointer:{type:"cross"}},grid:{right:"10%"},legend:{data:[]},xAxis:[{type:"category",data:[]}],yAxis:[],series:[]}),OQ='<svg width="14" height="14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.174 1.363a.233.233 0 0 0-.348 0L2.679 6.028a.233.233 0 0 0 .174.389h2.129v.2a.235.235 0 0 1 .002.033v5.95c0 .129.105.233.233.233h3.605a.233.233 0 0 0 .234-.233V7h-.003v-.583H11.147a.233.233 0 0 0 .175-.389L7.174 1.363Z" fill="#000"></path></svg>',LQ='<svg width="14" height="14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.174 12.755a.233.233 0 0 1-.348 0L2.679 8.09a.233.233 0 0 1 .174-.389h2.129v-.2a.235.235 0 0 0 .002-.033v-5.95c0-.129.105-.233.233-.233h3.605c.13 0 .234.104.234.233v5.6h-.003V7.7H11.147c.201 0 .308.238.175.389l-4.148 4.665Z" fill="#000"></path></svg>',PQ=t=>{const e=[];for(let r=0;r<t;r++)e[r]=r.toString().padStart(2,"0");return e},jT=t=>Array.isArray(t)?[...new Set(t)]:[],YT=(t,e,r)=>{const n=t>0?"up":t<0?"down":"",a=t>0?OQ:t<0?LQ:"-",i=Oe(t,r),o=Oe(e,"0,00.00%");return`
73
+ <span class="m__data">
74
+ <span class="change ${n}">
75
+ ${i} (${o})
76
+ </span>
77
+ ${a}
78
+ </span>`},GT=(t,e,r,n)=>{var l,c;if(!t||t.length===0)return"";const a=(e==null?void 0:e.format)||"0,0[.]00";let i="";const o=r?t.filter(u=>u.data.isPrevious):t;return o.forEach(u=>{const{data:f,seriesName:d,marker:h}=u,p=`<span class="m-current">${Oe(f._current,a)}</span>
79
+ vs. <span class="m-previous">${Oe(f.value,a)}</span>
80
+ ${YT(f._delta,f._change,a)}`,m=`<span class="m-current">${Oe(f.value,a)}</span>`;i+=`<li>
81
+ ${h}
82
+ ${n?d:e.name}:
83
+ ${f.isPrevious?p:m}
84
+ </li>`}),`<div class="mega-chart-tooltips">
85
+ <div class="mega-chart-tooltips__header">
86
+ ${(c=(l=o[0])==null?void 0:l.axisValue)==null?void 0:c.substr(0,16)}
87
+ </div>
88
+ <ul class="mega-chart-tooltips__body">
89
+ ${i}
90
+ </ul>
91
+ </div>`},WT=(t,e,r)=>{const n={children:[]};t.forEach(o=>{for(const l in o)["children","id","id_name"].includes(l)||(n[l]=(n[l]||0)+o[l]);o.children&&o.children.forEach(l=>{const c=n.children.find(u=>u.id===l.id&&u.id_name===l.id_name);c?Object.assign(c,l):n.children.push(te({},l))})});const a=e.filter(o=>Yr(o.id));return a==null||a.forEach(o=>{var l;if(n[o.id]=Tt(o.formula,n),r){const c=Tt(o.formula,n),u=Tt(ji(o.formula,"_pre"),n);n[`${o.id}_pre`]=u,n[`${o.id}_delta`]=c-u,n[`${o.id}_change`]=u?(c-u)/u:0}(n==null?void 0:n.children)&&((l=n.children)==null?void 0:l.length)>0&&(n==null||n.children.forEach(c=>{if(c[o.id]=Tt(o.formula,c),r){const u=Tt(o.formula,c),f=Tt(ji(o.formula,"_pre"),c);c[`${o.id}_pre`]=f,c[`${o.id}_delta`]=u-f,c[`${o.id}_change`]=f?(u-f)/f:0}}))}),e.map(o=>{var c,u,f;const l={id:o.id,id_name:o.id,[o.id]:n[o.id],children:n.children.map(d=>{var p,m,v;const h={id:d.id,id_name:d.id_name,[o.id]:d[o.id]};return r&&Object.assign(h,{id_pre:d.id_pre,[`${o.id}_pre`]:(p=d[`${o.id}_pre`])!=null?p:0,[`${o.id}_delta`]:(m=d[`${o.id}_delta`])!=null?m:0,[`${o.id}_change`]:(v=d[`${o.id}_change`])!=null?v:0}),h})};return r&&Object.assign(l,{[`${o.id}_pre`]:(c=n[`${o.id}_pre`])!=null?c:0,[`${o.id}_delta`]:(u=n[`${o.id}_delta`])!=null?u:0,[`${o.id}_change`]:(f=n[`${o.id}_change`])!=null?f:0}),l})},ZT=(t,e,r,n,a="line",i=!1)=>{if(!r||r.length===0)return[];const{primaryTimeAttribute:o}=t,l="id_name",c=WT(r,e,n),u=[],f=a==="line"?jr:jr.slice(1);return e.forEach(d=>{var y;const h=dd();h.color=f,h.series=[],h.legend.data=[],h.xAxis.data=[],h.legend.data.push(d.name),h.tooltip.formatter=function(_){return GT(_,d,n,!1)},d.format.includes("%")&&(h.yAxis.axisLabel.formatter=_=>Oe(_,"0[.]0%"));const p=c.find(_=>_.id===d.id);h.xAxis.data=(y=p==null?void 0:p.children)==null?void 0:y.map(_=>_[l]),h.xAxis.axisLabel.formatter=function(_){return _.length===10?fe(_).format("YYYY-MM-DD"):fe(_).format("MM-DD HH:mm")};let m={};const v=Ye(p);v==null||delete v.children,m=te({},v);const g=p==null?void 0:p.children.map(_=>({_time:_[l],name:_[l],value:_[d.id]}));if(h.series.push({name:d.name,type:a,barMaxWidth:48,data:g,showSymbol:!((g==null?void 0:g.length)>1),emphasis:{lineStyle:{width:2}}}),n){const _=p==null?void 0:p.children.map(x=>({isPrevious:!0,_time:x[`${o}_pre`],name:x[`${o}_pre`],_change:x[`${d.id}_change`],_delta:x[`${d.id}_delta`],_previous:x[`${d.id}_pre`],_current:x[`${d.id}`],value:x[`${d.id}_pre`]})),w=a==="line"?UT:r0,S=Ti(te({name:d.name,type:a},w),{barMaxWidth:48,showSymbol:!((_==null?void 0:_.length)>1),data:_});h.series.push(S)}h.legend.show=i,u.push({options:h,x_measure:te({},d),x_total:m,loading:!0})}),u},n0=(t,e,r,n,a="line",i=!1)=>{if(!r||r.length===0)return[];const o="id_name",l=r,c=[],u=["line"].includes(a)?jr:jr.slice(1);return e.forEach(f=>{const d=dd();d.color=u,d.series=[],d.legend.data=[],d.xAxis.data=[],d.legend.selected={},d.tooltip.formatter=function(y){return GT(y,f,n,!0)};const h=l.find(y=>y.id===f.id),p=h.children;let m={};const v=Ye(h);delete v.children,m=te({},v),d.legend.data=p.map(y=>String(y[o]));const g=n?4:9;d.legend.data.forEach((y,_)=>{d.legend.selected[y]=!(_>g)}),p.forEach(y=>{const _=wn(y.children,"id"),w=_.map(b=>b.id);d.xAxis.data=d.xAxis.data.length>w.length?d.xAxis.data:w,d.xAxis.axisLabel.formatter=function(b){return b.length===10?fe(b).format("YYYY-MM-DD"):fe(b).format("MM-DD HH:mm")},f.format.includes("%")&&(d.yAxis.axisLabel.formatter=b=>Oe(b,"0[.]0%"));const S=_.map(b=>({_time:b.id,name:b.id,value:b[f.id]})),x={name:y[o],type:["stackLine","line"].includes(a)?"line":a,showSymbol:!(S.length>1),barMaxWidth:48,data:S};if(a==="stackLine"&&(x.stack="Total",x.areaStyle={},x.emphasis={focus:"series"}),d.series.push(x),n){const b=_.map($=>({isPrevious:!0,_time:$["id_pre"],name:$["id_pre"],_change:$[`${f.id}_change`],_delta:$[`${f.id}_delta`],_previous:$[`${f.id}_pre`],_current:$[`${f.id}`],value:$[`${f.id}_pre`]})),C=["stackLine","line"].includes(a)?UT:r0,k=Ti(te({name:y[o],type:["stackLine","line"].includes(a)?"line":a},C),{barMaxWidth:48,showSymbol:!(b.length>1),data:b});d.series.push(k)}}),d.legend.show=!0,c.push({options:d,x_measure:te({},f),x_total:m,loading:!0})}),c},qT=(t,e)=>{const r=JSON.parse(JSON.stringify(t));let n=0;for(;n<e;){let a=0;for(let i=0;i<r.length;i++)a+=r[i][1][n][1];for(let i=0;i<r.length;i++)r[i][1][n].splice(1,0,Math.floor(r[i][1][n][1]/a*1e4)/100);n++}return r},BQ=(t,e,r)=>{var i,o;if(!t||t.length===0)return"";const n=(e==null?void 0:e.format)||"0,0[.]00";let a="";for(let l=0;l<t.length;l++)if(l%2==0&&r||!r){const{data:c,seriesName:u,marker:f}=t[l],d=c[1]?`${c[1]}%`:"-",h=Oe(c[2],n);let p="";if(r&&t[l+1]){const m=t[l+1].data,v=m[1]?`${m[1]}%`:"-";p=`vs. <span class="m-current">${Oe(m[2],n)}</span> <span class="m-previous">${v}</span>`}a+=`<li>
92
+ ${f}
93
+ ${u}:
94
+ <span class="m-current">${h}</span>
95
+ <span class="m-previous">${d}</span>
96
+ ${p}
97
+ </li>`}return`
98
+ <div class="mega-chart-tooltips">
99
+ <div class="mega-chart-tooltips__header">
100
+ ${((o=(i=t[0])==null?void 0:i.axisValue)==null?void 0:o.substring(0,16))||""}
101
+ </div>
102
+ <ul class="mega-chart-tooltips__body">
103
+ ${a}
104
+ </ul>
105
+ </div>`},IQ=(t,e,r,n,a=!1)=>{if(!r||r.length===0)return[];const i="id_name",o=r,l=[],c=jr.slice(1);return e.forEach(u=>{const f=dd();f.color=c,f.series=[],f.legend.data=[],f.xAxis.data=[],f.legend.selected={},f.yAxis.axisLabel.formatter=function(_){return`${_} %`},f.tooltip.formatter=function(_){return BQ(_,u,n)};const d=o.find(_=>_.id===u.id),h=d.children;let p={};const m=Ye(d);delete m.children,p=te({},m),f.legend.data=h.map(_=>String(_[i]));const v=n?4:9;f.legend.data.forEach((_,w)=>{f.legend.selected[_]=!(w>v)});const g=h.map(_=>{const S=wn(_.children,"id").map(x=>[x[i],x[u.id]]);return[_.id_name,S]});let y=[];n&&(y=h.map(_=>{const S=wn(_.children,"id").map(x=>[x[i],x[u.id+"_pre"]]);return[_.id_name,S]})),h.forEach((_,w)=>{const x=wn(_.children,"id").map(C=>C.id);f.xAxis.data=x,f.xAxis.axisLabel.formatter=function(C){return C.length===10?fe(C).format("YYYY-MM-DD"):fe(C).format("MM-DD HH:mm")};const b=qT(g,x.length);if(f.series.push({name:_[i],type:"bar",stack:"total",barMaxWidth:48,data:b[w][1],isPre:!0}),n){const C=qT(y,x.length),k=Ti(te({name:_[i],type:"bar",stack:"total1"},r0),{barMaxWidth:48,data:C[w][1]});f.series.push(k)}}),f.legend.show=!0,l.push({options:f,x_measure:te({},u),x_total:p,loading:!0})}),l},XT=(t,e,r)=>t?t.reduce((a,i,o,l)=>e<o?a:a+i[r],0):0,a0=t=>{t=t.replace(/\s+/g,"");const e=t.match(/if\((\$[a-zA-Z_]\w*)=0,0,([^]*)\)/);if(e){const r=e[1],n=e[2],a=a0(n),i=`((${r} === 0) ? 0 : (${a}))`,o=t.replace(e[0],i);return a0(o)}else return t},RQ=(t,e,r)=>{var i;if(!t||t.length===0)return"";const n=(e==null?void 0:e.format)||"0,0[.]00";let a="";return t.forEach(o=>{const{data:l,seriesName:c,dataIndex:u,marker:f}=o,d=`<span class="m-current">${Oe(l,n)}</span>`,h=r[e.id][c],p=e.formula==="sum"?XT(h,u,e.id):"-";if(l!==null){let m="";if(e.formula==="sum")m=`<td>${Oe(p,n)}</td>`;else{const v=e.formula.replace(/\s+/g,""),g=/[$][a-zA-Z_]\w*/g,y=Jo(v.match(g));let _="";y.forEach(w=>{var b;const S=w.substring(1),x=XT((b=r==null?void 0:r[S])==null?void 0:b[c],u,S);_+=`var ${w} = ${x};`});try{const w=new Function(`${_} return ${a0(v)}`);m=`<td>${Oe(w(),n)}</td>`}catch{m="<td>-</td>"}}a+=`
106
+ <tr>
107
+ <td>${f} ${c}</td>
108
+ <td>${d}</td>
109
+ ${m}
110
+ </tr>`}}),`
111
+ <div class="mega-chart-tooltips">
112
+ <div class="mega-chart-tooltips__header">
113
+ ${((i=t[0])==null?void 0:i.axisValue)||""}
114
+ </div>
115
+ <ul class="mega-chart-tooltips__body">
116
+ <table>
117
+ <thead>
118
+ <tr><th>Date</th><th>Value</th><th>Sum</th></tr>
119
+ </thead>
120
+ <tbody>
121
+ ${a}
122
+ </tbody>
123
+ </table>
124
+ </ul>
125
+ </div>`},VQ=(t,e)=>{const r=t[0].id.split(" ")[0],n=[];for(let a=0;a<24;a++){const i=a.toString().padStart(2,"0"),o=`${r} ${i}:00:00`,l=t.find(c=>c.id===o);l?n.push(l):n.push({id:o,id_name:o,[e]:0})}return n},FQ=(t,e,r,n,a="line",i=!1)=>{if(!r||r.length===0)return[];const o=WT(r,e,n),l={};o.forEach(d=>{const h=o1(d.children,m=>m.id.substr(0,10)),p={};Object.keys(h).forEach(m=>{p[m]=VQ(h[m],d.id)}),l[d.id]=p});const c=[],u=a==="line"?jr:jr.slice(1),f=PQ(24);return e.forEach(d=>{const h=dd();h.color=u,h.series=[],h.legend.data=[],h.xAxis.data=f,d.format.includes("%")&&(h.yAxis.axisLabel.formatter=_=>Oe(_,"0[.]0%"));const p=o.find(_=>_.id===d.id),m=o1(p.children,_=>_.id.substr(0,10));h.tooltip.formatter=function(_){return RQ(_,d,l)},wn(Object.keys(m)).reverse().forEach(_=>{h.legend.data.push(String(_));const w={};let S=!1;m[_].forEach(b=>{b.id.length>=13?w[b.id.substr(11,2)]=b[d.id]:(w[b.id]=b[d.id],S=!0)});let x=[];S?x=m[_].map(b=>b[d.id]):x=f.map(b=>{var C;return(C=w[b])!=null?C:null}),h.series.push({name:_,type:a,data:x,showSymbol:!(x.length>1),emphasis:{lineStyle:{width:2}}})});let g={};const y=Ye(p);delete y.children,g=te({},y),h.legend.show=!0,c.push({options:h,x_measure:te({},d),x_total:g,loading:!0})}),c},zQ=(t,e)=>{const{data:r,name:n,percent:a,marker:i,seriesName:o}=t,l=r.x_measure.format,c=`<span class="m-current">${Oe(r.value,l)}</span>`,u=r.x_measure;let f=`<li>${i} ${a}% ${c}`;if(e){const{original:d}=r,h=d[`${u.id}_pre`],p=d[`${u.id}_delta`],m=d[`${u.id}_change`];f+=` vs. <span class="m-previous">${Oe(h,l)}</span>${YT(p,m,l)}
126
+ </li>`}else f+="</li>";return`<div class="mega-chart-tooltips">
127
+ <div class="mega-chart-tooltips__header">
128
+ ${o} : ${n}
129
+ </div>
130
+ <ul class="mega-chart-tooltips__body">
131
+ ${f}
132
+ </ul>
133
+ </div>
134
+ `},HQ=(t,e,r)=>{if(!e||e.length===0)return[];const n=e.children,a="id_name";let i={};const o=Ye(e);delete o.children,i=te({},o);const l=[];return t.forEach(c=>{const u=$Q();u.legend.data=[],u.series=[],u.legend.data=n.map(h=>String(h[a])),u.tooltip.formatter=function(h){return zQ(h,r)};const f=n.map(h=>({name:h[a],value:h[c.id],original:te({},h),x_measure:te({},c)})),d=MQ(c.name,f);d.label.formatter=h=>{const p=h.name,m=Oe(h.value,"0,0[.00]"),v=h.percent.toFixed(2);return`${p}: ${m} (${v}%)`},u.series.push(d),l.push({name:c.id,options:u,x_measure:te({},c),x_total:i,loading:!0})}),l},UQ=(t,e)=>{const{data:r,marker:n}=t,a=e.format||"0,0[.]00",[i,o,l]=r;return`<div class="mega-chart-tooltips">
135
+ <div class="mega-chart-tooltips__headerr">
136
+ ${e.name}
137
+ </div>
138
+ <ul class="mega-chart-tooltips__body">
139
+ <li>
140
+ ${n} ${i} \u3010${o}\u3011 : ${Oe(l,a)}
141
+ </li>
142
+ </ul>
143
+ </div>
144
+ `},jQ=(t,e)=>{var c;if(!e||e.length===0||((c=e==null?void 0:e.children)==null?void 0:c.length)===0)return[];let r={};const n=Ye(e);delete n.children,r=te({},n);const a="id_name",i="id_name",o=e.children,l=[];return t.forEach(u=>{const f=NQ();f.tooltip.formatter=function(v){return UQ(v,u)},f.xAxis.data=[],f.yAxis.data=[];const d=[],h=[],p=[];o.forEach(v=>{const g=v[a];d.push(g),v.children.forEach(_=>{const w=_[i];h.push(w),p.push([g,w,_[u.id]])})}),f.xAxis.data=jT(d),f.yAxis.data=jT(h),f.series=[{name:u.id,type:"heatmap",label:{show:!1},itemStyle:{borderWidth:1,borderColor:"#fff"},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}},data:p}];const m=p.map(([v,g,y])=>({z:y})).map(v=>v.z);f.visualMap.max=Math.max(...m),l.push({name:u.id,options:f,x_measure:te({},u),x_total:r,loading:!0})}),l},YQ=(t,e)=>{if(!e||e.length===0)return[];const r=e.children,n="id_name",a=[];return r.forEach(i=>{const o=EQ();o.legend.data=[],o.series=[];const l=[];t.forEach(u=>{const{id:f,name:d}=u;l.push({name:d,value:i[f],origin_value:i[f]}),o.legend.data.push(String(d))});const c=AQ(i[n],l);o.series.push(c),a.push({name:i[n],options:o})}),a},GQ=(t,e)=>{var n,a;if(!t||t.length===0)return"";let r="";return t.forEach((i,o)=>{var h;const{data:l,seriesName:c,marker:u}=i,f=((h=e[o])==null?void 0:h.format)||"0,0[.]00",d=`<span class="m-current">${Oe(l,f)}</span>`;r+=`
145
+ <li>
146
+ ${u}
147
+ ${c}:
148
+ ${d}
149
+ </li>`}),`
150
+ <div class="mega-chart-tooltips">
151
+ <div class="mega-chart-tooltips__header">
152
+ ${((a=(n=t[0])==null?void 0:n.axisValue)==null?void 0:a.substring(0,16))||""}
153
+ </div>
154
+ <ul class="mega-chart-tooltips__body">
155
+ ${r}
156
+ </ul>
157
+ </div>`},WQ=(t,e,r)=>{if(!r||r.length===0)return null;const n=wn(r,"id"),a=DQ();return a.series=[],a.legend.data=[],a.xAxis[0].data=n.map(i=>String(i.id)),a.yAxis.push({type:"value",position:"left",splitLine:{lineStyle:{color:["rgba(0, 0, 0, 0.12)"]}},axisTick:{show:!1},alignTicks:!0,axisLine:{lineStyle:{color:"rgba(0,0,0,.12)"}},axisLabel:{show:!0,color:"rgba(0,0,0,.54)"}}),e.forEach((i,o)=>{const l={name:i.name,type:o===1?"bar":"line",barMaxWidth:48,yAxisIndex:o===1?1:0,data:n.map(c=>{var u;return(u=c[i.id])!=null?u:null}),showSymbol:!1,_extra:te({},i)};a.series.push(l),a.legend.data.push(String(i.name)),o===1&&a.yAxis.push({type:"value",position:"right",splitLine:{lineStyle:{color:["rgba(0, 0, 0, 0.12)"]}},axisTick:{show:!1},alignTicks:!0,axisLine:{lineStyle:{color:"rgba(0,0,0,.12)"}},axisLabel:{show:!0,color:"rgba(0,0,0,.54)"}})}),a.tooltip.formatter=function(i){return GQ(i,e)},a},ZQ={class:"markline__footer"},qQ=s.createTextVNode("Cancel"),XQ=s.createTextVNode("OK"),KT=s.defineComponent({props:{items:{type:Object,default:null}},emits:["onAddMarkLine"],setup(t,{emit:e}){const r=[{label:"Average",value:"average"},{label:"Max",value:"max"},{label:"Min",value:"min"},{label:"Custom",value:"custom"}],n=s.ref(),a=s.ref(!1),i=s.reactive({type:"average",label:"",color:"",value:null}),o=()=>{a.value=!1,l()},l=()=>{n.value.resetFields()},c=()=>{n.value.validate().then(()=>{e("onAddMarkLine",i),a.value=!1,l()})};return(u,f)=>(s.openBlock(),s.createElementBlock("div",null,[s.createVNode(s.unref(R.Popover),{visible:a.value,"onUpdate:visible":f[4]||(f[4]=d=>a.value=d),title:"Add MarkLine",placement:"bottomLeft",trigger:"click",overlayClassName:"markline-container"},{content:s.withCtx(()=>[s.createVNode(s.unref(R.Form),{ref_key:"formRef",ref:n,model:s.unref(i),layout:"horizontal","label-col":{span:6},"wrapper-col":{span:18}},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Form).Item,{required:"",name:"type",label:"Type"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Select),{value:s.unref(i).type,"onUpdate:value":f[0]||(f[0]=d=>s.unref(i).type=d),options:r},null,8,["value"])]),_:1}),s.createVNode(s.unref(R.Form).Item,{name:"label",required:"",label:"Label"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Input),{value:s.unref(i).label,"onUpdate:value":f[1]||(f[1]=d=>s.unref(i).label=d)},null,8,["value"])]),_:1}),s.unref(i).type==="custom"?(s.openBlock(),s.createBlock(s.unref(R.Form).Item,{key:0,name:"value",required:"",label:"Value"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.InputNumber),{value:s.unref(i).value,"onUpdate:value":f[2]||(f[2]=d=>s.unref(i).value=d)},null,8,["value"])]),_:1})):s.createCommentVNode("",!0),s.createVNode(s.unref(R.Form).Item,{name:"color",label:"Color"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Input),{type:"color",value:s.unref(i).color,"onUpdate:value":f[3]||(f[3]=d=>s.unref(i).color=d)},null,8,["value"])]),_:1}),s.createElementVNode("div",ZQ,[s.createVNode(s.unref(R.Button),{type:"link",onClick:o},{default:s.withCtx(()=>[qQ]),_:1}),s.createVNode(s.unref(R.Button),{type:"primary",onClick:c},{default:s.withCtx(()=>[XQ]),_:1})])]),_:1},8,["model"])]),default:s.withCtx(()=>[s.createVNode(s.unref(xd),{class:"cursor-pointer"})]),_:1},8,["visible"])]))}}),KQ={class:"vis-chart-container vis-height"},JQ=s.defineComponent({props:{originData:{type:Object,default:null},originMeasures:{type:Array,default:null},selectedMeasures:{type:Array,default:null},customMeasures:{type:Array,default:null},cube:{type:Object,default:null},isCompare:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},currentVisState:{type:Object,default:null},isPush:{type:Boolean,default:!1}},setup(t){const e=t,r=s.ref([]),n=c=>{r.value.push(c)};s.onBeforeUpdate(()=>{r.value=[]});const a=s.ref([]),i=()=>{a.value.forEach((c,u)=>{const{stop:f}=Xn(r.value[u],([{isIntersecting:d}])=>{d&&(c.loading=!1,f())})})},o=(c,u)=>{var g,y;const{type:f,label:d,color:h,value:p}=c,m=(y=(g=u.options.series[0])==null?void 0:g.markLine)!=null?y:{data:[]},v={name:d,label:{formatter:d,position:"insideEndTop"}};f!="custom"?v.type=f:v.yAxis=p,h&&(v.label.color=h,v.lineStyle={color:h}),m.data.push(v),u.options.series[0].markLine=te({},m)},l=c=>{a.value.forEach(u=>{u.options.legend.selected[c]=!u.options.legend.selected[c]}),ce.emit("renderLegend",a.value)};return s.onBeforeUnmount(()=>{ce.off("updateLegend",l)}),s.onMounted(()=>{var c;if(ce.on("updateLegend",l),e.currentVisState.splits.length===1){let u=e.selectedMeasures.concat((c=e.customMeasures)!=null?c:[]);e.originMeasures&&(u=u.sort((d,h)=>e.originMeasures.indexOf(d==null?void 0:d.id)-e.originMeasures.indexOf(h==null?void 0:h.id)));const f=ZT(e.cube,u,e.originData,e.isCompare,"line",e.isPush);a.value=f}else{const u=n0(e.cube,e.selectedMeasures,e.originData,e.isCompare,"line",e.isPush);a.value=u,s.nextTick(()=>{ce.emit("renderLegend",u)})}s.nextTick(()=>{i()})}),(c,u)=>(s.openBlock(),s.createElementBlock("div",KQ,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,f=>(s.openBlock(),s.createBlock(Tn,{class:s.normalizeClass(["vis-chart-item vis-inner",{"is-custom":s.unref(Yr)(f.x_measure.id)}]),key:f.x_measure.id,id:f.x_measure.id,"is-compare":t.isCompare,title:f.x_measure.name,format:f.x_measure.format,delta:f.x_total[`${f.x_measure.id}_delta`],change:f.x_total[`${f.x_measure.id}_change`],pre:f.x_total[`${f.x_measure.id}_pre`],cur:f.x_total[`${f.x_measure.id}`],ref_for:!0,ref:n},{action:s.withCtx(()=>[s.createVNode(KT,{items:f,onOnAddMarkLine:d=>o(d,f)},null,8,["items","onOnAddMarkLine"])]),default:s.withCtx(()=>[!f.loading||t.isPush?(s.openBlock(),s.createBlock(Vn,{key:0,measure:f.x_measure,uuid:`chart_${f.x_measure.id}`,options:f.options},null,8,["measure","uuid","options"])):(s.openBlock(),s.createBlock(s.unref(R.Spin),{key:1,spinning:f.loading},null,8,["spinning"]))]),_:2},1032,["class","id","is-compare","title","format","delta","change","pre","cur"]))),128))]))}}),QQ={class:"vis-chart-container vis-height"},eee=s.defineComponent({props:{originData:{type:Object,default:null},originMeasures:{type:Array,default:null},selectedMeasures:{type:Array,default:null},customMeasures:{type:Array,default:null},cube:{type:Object,default:null},isCompare:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},currentVisState:{type:Object,default:null},isPush:{type:Boolean,default:!1}},setup(t){const e=t,r=s.ref([]),n=o=>{r.value.push(o)};s.onBeforeUpdate(()=>{r.value=[]});const a=s.ref([]),i=()=>{a.value.forEach((o,l)=>{const{stop:c}=Xn(r.value[l],([{isIntersecting:u}])=>{u&&(o.loading=!1,c())})})};return s.onMounted(()=>{var c;let o=e.selectedMeasures.concat((c=e.customMeasures)!=null?c:[]);e.originMeasures&&(o=o.sort((u,f)=>e.originMeasures.indexOf(u==null?void 0:u.id)-e.originMeasures.indexOf(f==null?void 0:f.id)));const l=FQ(e.cube,o,e.originData,e.isCompare,"line",e.isPush);a.value=l,s.nextTick(()=>{i()})}),(o,l)=>(s.openBlock(),s.createElementBlock("div",QQ,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,c=>(s.openBlock(),s.createBlock(Tn,{class:s.normalizeClass(["vis-chart-item vis-inner",{"is-custom":s.unref(Yr)(c.x_measure.id)}]),id:c.x_measure.id,key:c.x_measure.id,"is-compare":!1,title:c.x_measure.name,format:c.x_measure.format,delta:c.x_total[`${c.x_measure.id}_delta`],change:c.x_total[`${c.x_measure.id}_change`],pre:c.x_total[`${c.x_measure.id}_pre`],cur:c.x_total[`${c.x_measure.id}`],ref_for:!0,ref:n},{default:s.withCtx(()=>[!c.loading||t.isPush?(s.openBlock(),s.createBlock(Vn,{key:0,measure:c.x_measure,uuid:`chart_${c.x_measure.id}`,options:c.options},null,8,["measure","uuid","options"])):(s.openBlock(),s.createBlock(s.unref(R.Spin),{key:1,spinning:c.loading},null,8,["spinning"]))]),_:2},1032,["class","id","title","format","delta","change","pre","cur"]))),128))]))}}),tee={class:"vis-chart-container vis-height"},ree=s.defineComponent({props:{originData:{type:Object,default:null},selectedMeasures:{type:Array,default:null},isCompare:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isPush:{type:Boolean,default:!1}},setup(t){const e=t,r=s.ref([]),n=o=>{r.value.push(o)};s.onBeforeUpdate(()=>{r.value=[]});const a=s.ref([]),i=()=>{a.value.forEach((o,l)=>{const{stop:c}=Xn(r.value[l],([{isIntersecting:u}])=>{u&&(o.loading=!1,c())})})};return s.onMounted(()=>{const o=HQ(e.selectedMeasures,e.originData,e.isCompare);a.value=o,s.nextTick(()=>{i()})}),(o,l)=>(s.openBlock(),s.createElementBlock("div",tee,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,c=>(s.openBlock(),s.createBlock(Tn,{class:"vis-chart-item vis-inner",key:c.x_measure.id,isCompare:t.isCompare,title:c.x_measure.name,ref_for:!0,ref:n,format:c.x_measure.format,delta:c.x_total[`${c.x_measure.id}_delta`],change:c.x_total[`${c.x_measure.id}_change`],pre:c.x_total[`${c.x_measure.id}_pre`],cur:c.x_total[`${c.x_measure.id}`]},{default:s.withCtx(()=>[!c.loading||t.isPush?(s.openBlock(),s.createBlock(Vn,{key:0,uuid:`chart_${c.x_measure.id}`,options:c.options},null,8,["uuid","options"])):(s.openBlock(),s.createBlock(s.unref(R.Spin),{key:1,spinning:c.loading},null,8,["spinning"]))]),_:2},1032,["isCompare","title","format","delta","change","pre","cur"]))),128))]))}}),nee={class:"vis-chart-container vis-height"},aee=s.defineComponent({props:{originData:{type:Object,default:null},selectedMeasures:{type:Array,default:null},isCompare:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1}},setup(t){const e=t,r=s.ref([]),n=o=>{r.value.push(o)};s.onBeforeUpdate(()=>{r.value=[]});const a=s.ref([]),i=()=>{a.value.forEach((o,l)=>{const{stop:c}=Xn(r.value[l],([{isIntersecting:u}])=>{u&&(o.loading=!1,c())})})};return s.onMounted(()=>{const o=YQ(e.selectedMeasures,e.originData);a.value=o,s.nextTick(()=>{i()})}),(o,l)=>(s.openBlock(),s.createElementBlock("div",nee,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,c=>(s.openBlock(),s.createBlock(Tn,{class:"vis-chart-item vis-inner",key:c.name,isCompare:!1,showData:!1,title:c.name,ref_for:!0,ref:n},{default:s.withCtx(()=>[c.loading?(s.openBlock(),s.createBlock(s.unref(R.Spin),{key:0,spinning:c.loading},null,8,["spinning"])):(s.openBlock(),s.createBlock(Vn,{key:1,uuid:`chart_${c.name}`,options:c.options},null,8,["uuid","options"]))]),_:2},1032,["title"]))),128))]))}}),iee={class:"vis-chart-container vis-height"},oee=s.defineComponent({props:{originData:{type:Object,default:null},originMeasures:{type:Array,default:null},selectedMeasures:{type:Array,default:null},customMeasures:{type:Array,default:null},cube:{type:Object,default:null},isCompare:{type:Boolean,default:!1},currentVisState:{type:Object,default:null},isPush:{type:Boolean,default:!1}},setup(t){const e=t,r=s.ref([]),n=c=>{r.value.push(c)};s.onBeforeUpdate(()=>{r.value=[]});const a=s.ref([]),i=()=>{a.value.forEach((c,u)=>{const{stop:f}=Xn(r.value[u],([{isIntersecting:d}])=>{d&&(c.loading=!1,f())})})},o=c=>{a.value.forEach(u=>{u.options.legend.selected[c]=!u.options.legend.selected[c]}),ce.emit("renderLegend",a.value)},l=(c,u)=>{var g,y;const{type:f,label:d,color:h,value:p}=c,m=(y=(g=u.options.series[0])==null?void 0:g.markLine)!=null?y:{data:[]},v={name:d,label:{formatter:d,position:"insideEndTop"}};f!="custom"?v.type=f:v.yAxis=p,h&&(v.label.color=h,v.lineStyle={color:h}),m.data.push(v),u.options.series[0].markLine=te({},m)};return s.onBeforeUnmount(()=>{ce.off("updateLegend",o)}),s.onMounted(()=>{var c;if(ce.on("updateLegend",o),e.currentVisState.splits.length===1){let u=e.selectedMeasures.concat((c=e.customMeasures)!=null?c:[]);e.originMeasures&&(u=u.sort((d,h)=>e.originMeasures.indexOf(d==null?void 0:d.id)-e.originMeasures.indexOf(h==null?void 0:h.id)));const f=ZT(e.cube,u,e.originData,e.isCompare,"bar",e.isPush);a.value=f}else{const u=n0(e.cube,e.selectedMeasures,e.originData,e.isCompare,"bar",e.isPush);a.value=u,s.nextTick(()=>{ce.emit("renderLegend",u)})}s.nextTick(()=>{i()})}),(c,u)=>(s.openBlock(),s.createElementBlock("div",iee,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,f=>(s.openBlock(),s.createBlock(Tn,{class:s.normalizeClass(["vis-chart-item vis-inner",{"is-custom":s.unref(Yr)(f.x_measure.id)}]),id:f.x_measure.id,key:f.x_measure.id,"is-compare":t.isCompare,title:f.x_measure.name,format:f.x_measure.format,delta:f.x_total[`${f.x_measure.id}_delta`],change:f.x_total[`${f.x_measure.id}_change`],pre:f.x_total[`${f.x_measure.id}_pre`],cur:f.x_total[`${f.x_measure.id}`],ref_for:!0,ref:n},{action:s.withCtx(()=>[s.createVNode(KT,{items:f,onOnAddMarkLine:d=>l(d,f)},null,8,["items","onOnAddMarkLine"])]),default:s.withCtx(()=>[!f.loading||t.isPush?(s.openBlock(),s.createBlock(Vn,{key:0,measure:f.x_measure,uuid:`chart_${f.x_measure.id}`,options:f.options},null,8,["measure","uuid","options"])):(s.openBlock(),s.createBlock(s.unref(R.Spin),{key:1,spinning:f.loading},null,8,["spinning"]))]),_:2},1032,["class","id","is-compare","title","format","delta","change","pre","cur"]))),128))]))}}),see={class:"vis-chart-container vis-height"},lee=s.defineComponent({props:{originData:{type:Object,default:null},selectedMeasures:{type:Array,default:null},isReadonly:{type:Boolean,default:!1}},setup(t){const e=t,r=s.ref([]),n=o=>{r.value.push(o)};s.onBeforeUpdate(()=>{r.value=[]});const a=s.ref([]),i=()=>{a.value.forEach((o,l)=>{const{stop:c}=Xn(r.value[l],([{isIntersecting:u}])=>{u&&(o.loading=!1,c())})})};return s.onMounted(()=>{const o=jQ(e.selectedMeasures,e.originData);a.value=o,s.nextTick(()=>{i()})}),(o,l)=>(s.openBlock(),s.createElementBlock("div",see,[a.value.length===0?(s.openBlock(),s.createBlock(lr,{key:0,msg:"No data available!"})):(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:1},s.renderList(a.value,c=>(s.openBlock(),s.createBlock(Tn,{class:"vis-chart-item vis-inner",key:c.x_measure.id,isCompare:!1,title:c.x_measure.name,ref_for:!0,ref:n,format:c.x_measure.format,delta:c.x_total[`${c.x_measure.id}_delta`],change:c.x_total[`${c.x_measure.id}_change`],pre:c.x_total[`${c.x_measure.id}_pre`],cur:c.x_total[`${c.x_measure.id}`]},{default:s.withCtx(()=>[c.loading?(s.openBlock(),s.createBlock(s.unref(R.Spin),{key:0,spinning:c.loading},null,8,["spinning"])):(s.openBlock(),s.createBlock(Vn,{key:1,uuid:`chart_${c.x_measure.id}`,options:c.options},null,8,["uuid","options"]))]),_:2},1032,["title","format","delta","change","pre","cur"]))),128))]))}}),cee={class:"vis-chart-container vis-height"},uee=s.defineComponent({props:{originData:{type:Object,default:null},selectedMeasures:{type:Array,default:null},cube:{type:Object,default:null},isCompare:{type:Boolean,default:!1},currentVisState:{type:Object,default:null},isPush:{type:Boolean,default:!1}},setup(t){const e=t,r=s.ref([]),n=l=>{r.value.push(l)};s.onBeforeUpdate(()=>{r.value=[]});const a=s.ref([]),i=()=>{a.value.forEach((l,c)=>{const{stop:u}=Xn(r.value[c],([{isIntersecting:f}])=>{f&&(l.loading=!1,u())})})},o=l=>{a.value.forEach(c=>{c.options.legend.selected[l]=!c.options.legend.selected[l]}),ce.emit("renderLegend",a.value)};return s.onBeforeUnmount(()=>{ce.off("updateLegend",o)}),s.onMounted(()=>{ce.on("updateLegend",o);const l=IQ(e.cube,e.selectedMeasures,e.originData,e.isCompare,e.isPush);a.value=l,s.nextTick(()=>{ce.emit("renderLegend",l),i()})}),(l,c)=>(s.openBlock(),s.createElementBlock("div",cee,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,u=>(s.openBlock(),s.createBlock(Tn,{class:"vis-chart-item vis-inner",key:u.x_measure.id,"is-compare":t.isCompare,title:u.x_measure.name,format:u.x_measure.format,delta:u.x_total[`${u.x_measure.id}_delta`],change:u.x_total[`${u.x_measure.id}_change`],pre:u.x_total[`${u.x_measure.id}_pre`],cur:u.x_total[`${u.x_measure.id}`],ref_for:!0,ref:n},{default:s.withCtx(()=>[!u.loading||t.isPush?(s.openBlock(),s.createBlock(Vn,{key:0,"chart-type":"StackBar",uuid:`chart_${u.x_measure.id}`,measure:u.x_measure,options:u.options},null,8,["uuid","measure","options"])):(s.openBlock(),s.createBlock(s.unref(R.Spin),{key:1,spinning:u.loading},null,8,["spinning"]))]),_:2},1032,["is-compare","title","format","delta","change","pre","cur"]))),128))]))}}),fee={class:"vis-chart-container vis-height"},dee=s.defineComponent({props:{originData:{type:Object,default:null},selectedMeasures:{type:Array,default:null},cube:{type:Object,default:null},isCompare:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},currentVisState:{type:Object,default:null},isPush:{type:Boolean,default:!1}},setup(t){const e=t,r=s.ref([]),n=l=>{r.value.push(l)};s.onBeforeUpdate(()=>{r.value=[]});const a=s.ref([]),i=()=>{a.value.forEach((l,c)=>{const{stop:u}=Xn(r.value[c],([{isIntersecting:f}])=>{f&&(l.loading=!1,u())})})},o=l=>{a.value.forEach(c=>{c.options.legend.selected[l]=!c.options.legend.selected[l]}),ce.emit("renderLegend",a.value)};return s.onBeforeUnmount(()=>{ce.off("updateLegend",o)}),s.onMounted(()=>{ce.on("updateLegend",o);const l=n0(e.cube,e.selectedMeasures,e.originData,e.isCompare,"stackLine",e.isPush);a.value=l,s.nextTick(()=>{}),s.nextTick(()=>{ce.emit("renderLegend",l),i()})}),(l,c)=>(s.openBlock(),s.createElementBlock("div",fee,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,u=>(s.openBlock(),s.createBlock(Tn,{class:"vis-chart-item vis-inner",key:u.x_measure.id,"is-compare":t.isCompare,title:u.x_measure.name,format:u.x_measure.format,delta:u.x_total[`${u.x_measure.id}_delta`],change:u.x_total[`${u.x_measure.id}_change`],pre:u.x_total[`${u.x_measure.id}_pre`],cur:u.x_total[`${u.x_measure.id}`],ref_for:!0,ref:n},{default:s.withCtx(()=>[!u.loading||t.isPush?(s.openBlock(),s.createBlock(Vn,{key:0,uuid:`chart_${u.x_measure.id}`,measure:u.x_measure,options:u.options},null,8,["uuid","measure","options"])):(s.openBlock(),s.createBlock(s.unref(R.Spin),{key:1,spinning:u.loading},null,8,["spinning"]))]),_:2},1032,["is-compare","title","format","delta","change","pre","cur"]))),128))]))}}),hee=s.defineComponent({props:{measures:{type:Array,default:()=>[]}},emits:["onOk","onCancel"],setup(t,{emit:e}){const r=[{label:"Average",value:"average"},{label:"Max",value:"max"},{label:"Min",value:"min"},{label:"Custom",value:"custom"}],n=s.ref(),a=s.reactive({measure:null,type:"average",label:"",color:"",value:null}),i=()=>{n.value.resetFields()},o=()=>{e("onCancel")},l=()=>{n.value.validate().then(()=>{e("onOk",te({},a)),i()})};return(c,u)=>(s.openBlock(),s.createBlock(s.unref(R.Modal),{mask:!0,maskClosable:!1,onOk:l,onCancel:o,width:500,destroyOnClose:"",centered:"",closable:!1,title:"Markline"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Form),{ref_key:"formRef",ref:n,model:s.unref(a),layout:"horizontal","label-col":{span:6},"wrapper-col":{span:18}},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Form).Item,{required:"",name:"measure",label:"Measure"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Select),{value:s.unref(a).measure,"onUpdate:value":u[0]||(u[0]=f=>s.unref(a).measure=f),options:t.measures},null,8,["value","options"])]),_:1}),s.createVNode(s.unref(R.Form).Item,{required:"",name:"type",label:"Type"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Select),{value:s.unref(a).type,"onUpdate:value":u[1]||(u[1]=f=>s.unref(a).type=f),options:r},null,8,["value"])]),_:1}),s.createVNode(s.unref(R.Form).Item,{name:"label",required:"",label:"Label"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Input),{value:s.unref(a).label,"onUpdate:value":u[2]||(u[2]=f=>s.unref(a).label=f)},null,8,["value"])]),_:1}),s.unref(a).type==="custom"?(s.openBlock(),s.createBlock(s.unref(R.Form).Item,{key:0,name:"value",required:"",label:"Value"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.InputNumber),{value:s.unref(a).value,"onUpdate:value":u[3]||(u[3]=f=>s.unref(a).value=f)},null,8,["value"])]),_:1})):s.createCommentVNode("",!0),s.createVNode(s.unref(R.Form).Item,{name:"color",label:"Color"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Input),{type:"color",value:s.unref(a).color,"onUpdate:value":u[4]||(u[4]=f=>s.unref(a).color=f)},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1}))}}),pee={class:"vis-chart-container vis-height"},mee={class:"dual-chart-container"},vee={class:"dual-chart"},gee={class:"dual-control"},yee=s.createElementVNode("span",null,"\u7528\u4E8E\u63A7\u5236\u5DE6\u4FA7\u7EB5\u8F74\u7684\u6307\u6807\u5C55\u793A\u5F62\u5F0F",-1),_ee=s.createElementVNode("span",{class:"help"},"Left Axis",-1),wee=s.createElementVNode("span",null,"\u7528\u4E8E\u63A7\u5236\u5750\u6807\u8F74\u5BF9\u5E94\u7684\u5C55\u793A\u6307\u6807",-1),bee=s.createElementVNode("span",{class:"help"},"Measure",-1),See=s.createElementVNode("span",null,"\u7528\u4E8E\u63A7\u5236\u53F3\u4FA7\u7EB5\u8F74\u7684\u6307\u6807\u5C55\u793A\u5F62\u5F0F",-1),xee=s.createElementVNode("span",{class:"help"},"Right Axis",-1),Cee=s.createElementVNode("span",null,"\u7528\u4E8E\u63A7\u5236\u5750\u6807\u8F74\u5BF9\u5E94\u7684\u5C55\u793A\u6307\u6807",-1),kee=s.createElementVNode("span",{class:"help"},"Measure",-1),Tee={class:"markline-new"},Mee=s.createElementVNode("span",null,"Add MarkLine",-1),$ee={class:"mark-lines"},Nee={class:"mark-label"},Eee={class:"mark-action"},Pl=[{name:"totals",title:"Total",icon:CN,component:l7},{name:"table",title:"Table",icon:$N,component:xV},{name:"ringChart",title:"Pie",icon:ZN,component:ree},{name:"lineChart",title:"Line",icon:_d,component:JQ},{name:"stackLineChart",title:"StackLine",icon:wd,component:dee},{name:"lineChartHour",title:"LineHour",icon:DN,component:eee},{name:"barChart",title:"Bar",icon:bd,component:oee},{name:"stackBarChart",title:"StackBar",icon:Sd,component:uee},{name:"funnelChart",title:"Funnel",icon:JN,component:aee},{name:"heatmapChart",title:"Heatmap",icon:rE,component:lee},{name:"dualAxisChart",title:"Dual Axis",icon:oE,component:s.defineComponent({props:{originData:{type:Object,default:null},selectedMeasures:{type:Array,default:null},cube:{type:Object,default:null},isCompare:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},currentVisState:{type:Object,default:null},isPush:{type:Boolean,default:!1}},setup(t){const e=t,r=s.reactive({lfet_type:1,right_type:2,axis:"left",left_y:{measures:[]},right_y:{measures:[]},marks:[]}),n=p=>{r.marks.push(te({},p)),i.value=!1},a=p=>{r.marks.splice(p,1),h()},i=s.ref(!1),o=s.ref(["y1","y2","markline"]),l=s.ref(null),c=e.selectedMeasures.map(p=>({label:p.name,value:p.id})),u=()=>{document.querySelector(".mega-content__vis");const p=document.querySelector(".mega-content__vis");if(p){const m=(p==null?void 0:p.offsetHeight)-32,v=document.querySelector(".chart-card__content");v.style.height=Math.max(m-32,240)+"px",f.value=Math.max(m-32,240)}};s.onUnmounted(()=>{window.removeEventListener("resize",u)});const f=s.ref(240);s.onMounted(()=>{var m;u(),window.addEventListener("resize",u);const p=WQ(e.cube,e.selectedMeasures,((m=e.originData)==null?void 0:m.children)||[]);setTimeout(()=>{l.value=p},200)});const d=(p,m)=>{let v=null;switch(p){case 1:v={type:"line"};break;case 2:v={type:"bar"};break;case 3:v={type:"line",areaStyle:{}};break;case 4:v={type:"bar",stack:m};break}return v},h=()=>{const p=JSON.parse(JSON.stringify(l.value));p.series.forEach(m=>{if(delete m.areaStyle,delete m.stack,delete m.markLine,r.left_y.measures.includes(m._extra.id)){m.yAxisIndex=0;const y=d(r.lfet_type,"left");Object.assign(m,y)}if(r.right_y.measures.includes(m._extra.id)){m.yAxisIndex=1;const y=d(r.right_type,"right");Object.assign(m,y)}const v=r.marks.filter(y=>y.measure===m._extra.id),g={data:[]};v.forEach(y=>{const{type:_,label:w,color:S,value:x}=y,b={name:w,label:{formatter:w,position:"insideEndTop"}};_!="custom"?b.type=_:b.yAxis=x,S&&(b.label.color=S,b.lineStyle={color:S}),g.data.push(b)}),m.markLine=te({},g)}),l.value=te({},p)};return s.watch(()=>te({},r),()=>{h()},{deep:!0}),(p,m)=>(s.openBlock(),s.createElementBlock("div",pee,[s.createVNode(Tn,{class:"vis-chart-item vis-inner","show-data":!1},{default:s.withCtx(()=>[s.createElementVNode("div",mee,[s.createElementVNode("div",vee,[l.value?(s.openBlock(),s.createBlock(Vn,{key:0,uuid:"chart_dual",options:l.value,"chart-type":"Dual",style:s.normalizeStyle({width:"100%",height:f.value+"px"})},null,8,["options","style"])):s.createCommentVNode("",!0)]),s.createElementVNode("div",gee,[s.createVNode(s.unref(R.Form),{ref:"formRef",model:s.unref(r),layout:"horizontal","label-col":{span:9},"wrapper-col":{span:15}},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Collapse),{activeKey:o.value,"onUpdate:activeKey":m[6]||(m[6]=v=>o.value=v),accordion:!1,bordered:!1,ghost:""},{default:s.withCtx(()=>[s.createVNode(s.unref(R.CollapsePanel),{key:"y1",header:"Coordinate Y Axis(Left)"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Form).Item,{name:"lfet_type"},{label:s.withCtx(()=>[s.createVNode(s.unref(R.Tooltip),{placement:"top"},{title:s.withCtx(()=>[yee]),default:s.withCtx(()=>[_ee]),_:1})]),default:s.withCtx(()=>[s.createVNode(s.unref(R.RadioGroup),{value:s.unref(r).lfet_type,"onUpdate:value":m[0]||(m[0]=v=>s.unref(r).lfet_type=v)},{default:s.withCtx(()=>[s.createVNode(s.unref(R.RadioButton),{value:1},{default:s.withCtx(()=>[s.createVNode(s.unref(_d))]),_:1}),s.createVNode(s.unref(R.RadioButton),{value:2},{default:s.withCtx(()=>[s.createVNode(s.unref(bd))]),_:1}),s.createVNode(s.unref(R.RadioButton),{value:3},{default:s.withCtx(()=>[s.createVNode(s.unref(wd))]),_:1}),s.createVNode(s.unref(R.RadioButton),{value:4},{default:s.withCtx(()=>[s.createVNode(s.unref(Sd))]),_:1})]),_:1},8,["value"])]),_:1}),s.createVNode(s.unref(R.Form).Item,null,{label:s.withCtx(()=>[s.createVNode(s.unref(R.Tooltip),{placement:"top"},{title:s.withCtx(()=>[wee]),default:s.withCtx(()=>[bee]),_:1})]),default:s.withCtx(()=>[s.createVNode(s.unref(R.Select),{value:s.unref(r).left_y.measures,"onUpdate:value":m[1]||(m[1]=v=>s.unref(r).left_y.measures=v),mode:"multiple",options:s.unref(c)},null,8,["value","options"])]),_:1})]),_:1}),s.createVNode(s.unref(R.CollapsePanel),{key:"y2",header:"Coordinate Y Axis(Right)"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Form).Item,{name:"right_type"},{label:s.withCtx(()=>[s.createVNode(s.unref(R.Tooltip),{placement:"top"},{title:s.withCtx(()=>[See]),default:s.withCtx(()=>[xee]),_:1})]),default:s.withCtx(()=>[s.createVNode(s.unref(R.RadioGroup),{value:s.unref(r).right_type,"onUpdate:value":m[2]||(m[2]=v=>s.unref(r).right_type=v)},{default:s.withCtx(()=>[s.createVNode(s.unref(R.RadioButton),{value:1},{default:s.withCtx(()=>[s.createVNode(s.unref(_d))]),_:1}),s.createVNode(s.unref(R.RadioButton),{value:2},{default:s.withCtx(()=>[s.createVNode(s.unref(bd))]),_:1}),s.createVNode(s.unref(R.RadioButton),{value:3},{default:s.withCtx(()=>[s.createVNode(s.unref(wd))]),_:1}),s.createVNode(s.unref(R.RadioButton),{value:4},{default:s.withCtx(()=>[s.createVNode(s.unref(Sd))]),_:1})]),_:1},8,["value"])]),_:1}),s.createVNode(s.unref(R.Form).Item,null,{label:s.withCtx(()=>[s.createVNode(s.unref(R.Tooltip),{placement:"top"},{title:s.withCtx(()=>[Cee]),default:s.withCtx(()=>[kee]),_:1})]),default:s.withCtx(()=>[s.createVNode(s.unref(R.Select),{value:s.unref(r).right_y.measures,"onUpdate:value":m[3]||(m[3]=v=>s.unref(r).right_y.measures=v),mode:"multiple",options:s.unref(c)},null,8,["value","options"])]),_:1})]),_:1}),s.createVNode(s.unref(R.CollapsePanel),{key:"markline",header:"MarkLine"},{default:s.withCtx(()=>[s.createElementVNode("div",Tee,[s.createVNode(s.unref(R.Space),{size:8,class:"cursor-pointer",onClick:m[4]||(m[4]=v=>i.value=!0)},{default:s.withCtx(()=>[s.createVNode(s.unref(_0)),Mee]),_:1}),s.createVNode(hee,{visible:i.value,measures:s.unref(c),onOnCancel:m[5]||(m[5]=()=>i.value=!1),onOnOk:n},null,8,["visible","measures"])]),s.createElementVNode("ul",$ee,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(r).marks,(v,g)=>(s.openBlock(),s.createElementBlock("li",{key:g},[s.createElementVNode("div",Nee,[s.createElementVNode("span",null,s.toDisplayString(v.type),1),s.createTextVNode(" "+s.toDisplayString(v.label),1)]),s.createElementVNode("div",Eee,[s.createVNode(s.unref(R.Button),{type:"link",onClick:y=>a(g)},{default:s.withCtx(()=>[s.createVNode(s.unref(Mi))]),_:2},1032,["onClick"])])]))),128))])]),_:1})]),_:1},8,["activeKey"])]),_:1},8,["model"])])])]),_:1})]))}})}],Aee={class:"mega-header-widget"},Dee={class:"switch-visual"},Oee={class:"visual-type"},Lee=["onClick"],Pee={class:"visual-settings"},Bee=s.createElementVNode("span",null,"\u7528\u4E8E\u63A7\u5236Echart\u662F\u5426\u5C55\u793A\u56FE\u4F8B",-1),Iee=s.createElementVNode("span",{class:"help"},"Legend",-1),Ree=s.createElementVNode("span",null,"\u7528\u4E8E\u63A7\u5236\u6298\u7EBF\u56FE\u7B49\u56FE\u8868\u4E0A\u7684\u6570\u503CLabel\u662F\u5426\u663E\u793A",-1),Vee=s.createElementVNode("span",{class:"help"},"Label",-1),Fee=s.createElementVNode("span",null,"\u7528\u4E8E\u63A7\u5236Table(\u767E\u5206\u6BD4\u7C7B\u578B\u5B57\u6BB5\u5217\u9664\u5916)\u7684\u5360\u6BD4\u60C5\u51B5\u662F\u5426\u5C55\u793A",-1),zee=s.createElementVNode("span",{class:"help"},"Proportion",-1),Hee=s.createElementVNode("span",null,"\u7528\u4E8E\u63A7\u5236Table\u662F\u5426\u5B8C\u5168\u5C55\u5F00",-1),Uee=s.createElementVNode("span",{class:"help"},"Expand ALL",-1),jee=s.defineComponent({setup(t){const e=s.inject("cubeState"),r=s.computed(()=>{const l=e.visual;return Pl.find(u=>u.name===l)||Pl[0]}),n=s.ref(["basic","table"]),a=s.inject("styleState"),i=s.ref(!1),o=l=>{e.visual=l.name,["table","lineChart","barChart","lineChartHour"].includes(l.name)||(e.custom_measures=[],e.measures=e.measures.filter(c=>!Yr(c))),i.value=!1};return(l,c)=>(s.openBlock(),s.createElementBlock("div",Aee,[s.createVNode(s.unref(R.Popover),{visible:i.value,"onUpdate:visible":c[5]||(c[5]=u=>i.value=u),placement:"bottomLeft",trigger:"click",overlayClassName:"switch-visual-container"},{content:s.withCtx(()=>[s.createElementVNode("div",Dee,[s.createElementVNode("div",Oee,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Pl),(u,f)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["visual-item",{active:s.unref(r).name===u.name}]),key:f,onClick:d=>o(u)},[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(u.icon)))],10,Lee))),128))]),s.createElementVNode("div",Pee,[s.createVNode(s.unref(R.Form),{"label-col":{span:10},"wrapper-col":{span:14}},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Collapse),{activeKey:n.value,"onUpdate:activeKey":c[4]||(c[4]=u=>n.value=u),accordion:!1},{default:s.withCtx(()=>[s.createVNode(s.unref(R.CollapsePanel),{key:"basic",header:"Basic Style"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Form).Item,{name:"showLegend"},{label:s.withCtx(()=>[s.createVNode(s.unref(R.Tooltip),{placement:"top"},{title:s.withCtx(()=>[Bee]),default:s.withCtx(()=>[Iee]),_:1})]),default:s.withCtx(()=>[s.createVNode(s.unref(R.Switch),{checked:s.unref(a).showLegend,"onUpdate:checked":c[0]||(c[0]=u=>s.unref(a).showLegend=u)},null,8,["checked"])]),_:1}),s.createVNode(s.unref(R.Form).Item,{name:"showLabel"},{label:s.withCtx(()=>[s.createVNode(s.unref(R.Tooltip),{placement:"top"},{title:s.withCtx(()=>[Ree]),default:s.withCtx(()=>[Vee]),_:1})]),default:s.withCtx(()=>[s.createVNode(s.unref(R.Switch),{checked:s.unref(a).showLabel,"onUpdate:checked":c[1]||(c[1]=u=>s.unref(a).showLabel=u)},null,8,["checked"])]),_:1})]),_:1}),s.createVNode(s.unref(R.CollapsePanel),{key:"table",header:"Table Style"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Form).Item,{name:"proportion"},{label:s.withCtx(()=>[s.createVNode(s.unref(R.Tooltip),{placement:"top"},{title:s.withCtx(()=>[Fee]),default:s.withCtx(()=>[zee]),_:1})]),default:s.withCtx(()=>[s.createVNode(s.unref(R.Switch),{checked:s.unref(a).table.proportion,"onUpdate:checked":c[2]||(c[2]=u=>s.unref(a).table.proportion=u)},null,8,["checked"])]),_:1}),s.createVNode(s.unref(R.Form).Item,{name:"proportion"},{label:s.withCtx(()=>[s.createVNode(s.unref(R.Tooltip),{placement:"top"},{title:s.withCtx(()=>[Hee]),default:s.withCtx(()=>[Uee]),_:1})]),default:s.withCtx(()=>[s.createVNode(s.unref(R.Switch),{checked:s.unref(a).table.expand,"onUpdate:checked":c[3]||(c[3]=u=>s.unref(a).table.expand=u)},null,8,["checked"])]),_:1})]),_:1})]),_:1},8,["activeKey"])]),_:1})])])]),default:s.withCtx(()=>[s.createVNode(s.unref(R.Space),{size:8},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(r).icon))),s.createTextVNode(" "+s.toDisplayString(s.unref(r).title)+" ",1),s.createVNode(s.unref(xa))]),_:1})]),_:1},8,["visible"])]))}}),Yee=s.createTextVNode("Cube"),Gee=s.createTextVNode("Dashboard"),Wee=s.defineComponent({setup(t){const e=s.inject("dataConfig"),r=n=>{ce.emit("on-change-layout",n)};return(n,a)=>(s.openBlock(),s.createBlock(s.unref(R.RadioGroup),{value:s.unref(e).layout.type,"onUpdate:value":a[0]||(a[0]=i=>s.unref(e).layout.type=i),"button-style":"solid",onChange:r},{default:s.withCtx(()=>[s.createVNode(s.unref(R.RadioButton),{value:"cube"},{default:s.withCtx(()=>[Yee]),_:1}),s.createVNode(s.unref(R.RadioButton),{value:"dashboard"},{default:s.withCtx(()=>[Gee]),_:1})]),_:1},8,["value"]))}}),Zee={class:"font-bold capitalize header-name"},qee={class:"item-list cube-list"},Xee=["onClick"],Kee={class:"info"},Jee=s.defineComponent({setup(t){const e=s.inject("dataConfig"),r=s.inject("currentState"),n=s.ref(!1),a=s.inject("setupConfig"),i=o=>{r.cube=te({},o),r.custom=(o==null?void 0:o.custom_measures)||[],a(o),n.value=!1};return(o,l)=>(s.openBlock(),s.createBlock(s.unref(R.Popover),{visible:n.value,"onUpdate:visible":l[0]||(l[0]=c=>n.value=c),placement:"bottomLeft",trigger:"click",overlayClassName:"cube-list-container clear-padding"},{content:s.withCtx(()=>[s.createElementVNode("ul",qee,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(e).dataCubes,c=>(s.openBlock(),s.createElementBlock("li",{class:s.normalizeClass(["capitalize",{active:c.id===s.unref(r).cube.id}]),key:c.id,onClick:u=>i(c)},[s.createTextVNode(s.toDisplayString(c.title)+" ",1),(c==null?void 0:c.description)?(s.openBlock(),s.createBlock(s.unref(R.Tooltip),{key:0,placement:"right"},{title:s.withCtx(()=>[s.createElementVNode("span",null,s.toDisplayString(c==null?void 0:c.description),1)]),default:s.withCtx(()=>[s.createElementVNode("span",Kee,[s.createVNode(s.unref(zt))])]),_:2},1024)):s.createCommentVNode("",!0)],10,Xee))),128))])]),default:s.withCtx(()=>[s.createVNode(s.unref(R.Space),{size:8},{default:s.withCtx(()=>{var c,u;return[s.createElementVNode("span",Zee,s.toDisplayString((c=s.unref(r).cube)==null?void 0:c.title),1),((u=s.unref(r).cube)==null?void 0:u.description)?(s.openBlock(),s.createBlock(s.unref(R.Tooltip),{key:0,placement:"right"},{title:s.withCtx(()=>{var f;return[s.createElementVNode("span",null,s.toDisplayString((f=s.unref(r).cube)==null?void 0:f.description),1)]}),default:s.withCtx(()=>[s.createVNode(s.unref(zt))]),_:1})):s.createCommentVNode("",!0),s.createVNode(s.unref(xa))]}),_:1})]),_:1},8,["visible"]))}}),Qee={class:"font-bold capitalize header-name"},ete={class:"mega-cascader"},tte={class:"item-list cube-list item-category"},rte=["onClick"],nte={class:"title-info"},ate={class:"info"},ite={key:0,class:"item-list cube-list item-sub-category"},ote=["onClick"],ste={class:"title-info"},lte={class:"info"},cte=s.defineComponent({setup(t){const e=s.inject("currentState"),r=s.ref(!1),n=s.inject("groupCubes"),a=s.inject("changeCube"),i=s.reactive({selectedCategory:"",selectedSubCategory:""}),o=s.computed(()=>{var p;if(i.selectedCategory){const m=n.value.find(v=>v.id===i.selectedCategory);return(p=m==null?void 0:m.children)!=null?p:[]}return[]}),l=p=>{p.group?i.selectedCategory=p.id:(i.selectedCategory="",a(p.id),r.value=!1)},c=p=>{a(p.id),r.value=!1},u=(p,m,v=[])=>{for(let g=0;g<p.length;g++){const y=[...v];if(y.push(te({},p[g])),p[g].group&&p[g].tables.includes(m))return y}},f=s.computed(()=>u(n.value,e.cube.id)),d=s.computed(()=>{var p,m;return f.value?`${f.value[0].title} / ${(p=e.cube)==null?void 0:p.title}`:(m=e.cube)==null?void 0:m.title}),h=p=>{setTimeout(()=>{var m;f.value?i.selectedCategory=f.value[0].id:i.selectedCategory=(m=e.cube)==null?void 0:m.id},120)};return(p,m)=>(s.openBlock(),s.createBlock(s.unref(R.Popover),{visible:r.value,"onUpdate:visible":m[0]||(m[0]=v=>r.value=v),placement:"bottomLeft",trigger:"click",overlayClassName:"mega-cascader-container clear-padding",onVisibleChange:h},{content:s.withCtx(()=>[s.createElementVNode("div",ete,[s.createElementVNode("ul",tte,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(n),v=>(s.openBlock(),s.createElementBlock("li",{class:s.normalizeClass(["capitalize",{active:v.id===s.unref(e).cube.id||s.unref(i).selectedCategory===v.id}]),key:v.id,onClick:g=>l(v)},[s.createElementVNode("div",nte,[s.createTextVNode(s.toDisplayString(v.title)+" ",1),(v==null?void 0:v.description)?(s.openBlock(),s.createBlock(s.unref(R.Tooltip),{key:0,placement:"right"},{title:s.withCtx(()=>[s.createElementVNode("span",null,s.toDisplayString(v==null?void 0:v.description),1)]),default:s.withCtx(()=>[s.createElementVNode("span",ate,[s.createVNode(s.unref(zt))])]),_:2},1024)):s.createCommentVNode("",!0)]),(v==null?void 0:v.group)?(s.openBlock(),s.createBlock(s.unref(g0),{key:0})):s.createCommentVNode("",!0)],10,rte))),128))]),s.unref(o).length>0?(s.openBlock(),s.createElementBlock("ul",ite,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(o),v=>(s.openBlock(),s.createElementBlock("li",{class:s.normalizeClass(["capitalize",{active:v.id===s.unref(e).cube.id&&s.unref(f)[0].tables.includes(s.unref(e).cube.id)}]),key:v.id,onClick:g=>c(v)},[s.createElementVNode("div",ste,[s.createTextVNode(s.toDisplayString(v.title)+" ",1),(v==null?void 0:v.description)?(s.openBlock(),s.createBlock(s.unref(R.Tooltip),{key:0,placement:"right"},{title:s.withCtx(()=>[s.createElementVNode("span",null,s.toDisplayString(v==null?void 0:v.description),1)]),default:s.withCtx(()=>[s.createElementVNode("span",lte,[s.createVNode(s.unref(zt))])]),_:2},1024)):s.createCommentVNode("",!0)]),(v==null?void 0:v.group)?(s.openBlock(),s.createBlock(s.unref(g0),{key:0})):s.createCommentVNode("",!0)],10,ote))),128))])):s.createCommentVNode("",!0)])]),default:s.withCtx(()=>[s.createVNode(s.unref(R.Space),{size:8},{default:s.withCtx(()=>{var v;return[s.createElementVNode("span",Qee,s.toDisplayString(s.unref(d)),1),((v=s.unref(e).cube)==null?void 0:v.description)?(s.openBlock(),s.createBlock(s.unref(R.Tooltip),{key:0,placement:"right"},{title:s.withCtx(()=>{var g;return[s.createElementVNode("span",null,s.toDisplayString((g=s.unref(e).cube)==null?void 0:g.description),1)]}),default:s.withCtx(()=>[s.createVNode(s.unref(zt))]),_:1})):s.createCommentVNode("",!0),s.createVNode(s.unref(xa))]}),_:1})]),_:1},8,["visible"]))}}),ar=(t,e)=>{const{onSuccess:r,onError:n}=e||{},a=e==null?void 0:e.manual,i=s.ref(!1),o=s.ref(null),l=async c=>{i.value=!0,(c==null?void 0:c.url)&&(t.url=c.url),(c==null?void 0:c.data)&&(t.data=te({},c==null?void 0:c.data)),(c==null?void 0:c.params)&&(t.params=Object.assign({},t.params,te({},c==null?void 0:c.params)));const[u,f]=await h4(t);if(i.value=!1,f){n&&n(f);return}return o.value=u,r&&r(u),(c==null?void 0:c.callback)&&(c==null||c.callback(u)),u};return s.onMounted(()=>{a||l()}),{data:o,loading:i,run:l}},ute={class:"edit-content"},fte=s.createTextVNode("Relative Time"),dte=s.createTextVNode("Original Time"),hte=s.createElementVNode("span",null,"When comparing today's data with previous to calculate changes%, omit no-data hours",-1),pte=s.createTextVNode(" Data Omission "),mte=s.createElementVNode("div",{style:{"flex-grow":"1"}},null,-1),vte=s.createTextVNode("Cancel"),gte=s.createTextVNode("OK"),yte=s.defineComponent({props:{dialogVisible:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},currentReport:{type:Object,default:null}},emits:["onOk","onCancel","update:dialogVisible"],setup(t,{emit:e}){const r=t,n=s.inject("cubeState"),a=()=>{e("onCancel")},i=()=>{var c;e("onOk",te({id:(c=r.currentReport)==null?void 0:c.id},o))},o=s.reactive({name:"",now:!1,time:1}),l=c=>{var u,f,d;if(c){o.name=(f=(u=r.currentReport)==null?void 0:u.name)!=null?f:"";const h=Ye(n);o.now=(d=h.range.now)!=null?d:!1,o.time=h.range.relative?1:2}else o.name="",o.now=!1,o.time=1};return s.watch(()=>r.dialogVisible,(c,u)=>{l(c)}),(c,u)=>(s.openBlock(),s.createBlock(s.unref(R.Modal),s.mergeProps({mask:!0,maskClosable:!1,onOk:i,onCancel:a,width:520,destroyOnClose:""},c.$attrs,{centered:"",title:"Edit Report",wrapClassName:"edit-container"}),{footer:s.withCtx(()=>[s.renderSlot(c.$slots,"left"),mte,s.createElementVNode("div",null,[s.createVNode(s.unref(R.Button),{onClick:a,disabled:t.loading},{default:s.withCtx(()=>[vte]),_:1},8,["disabled"]),s.createVNode(s.unref(R.Button),{type:"primary",loading:t.loading,onClick:i,disabled:s.unref(o).name.trim()===""},{default:s.withCtx(()=>[gte]),_:1},8,["loading","disabled"])])]),default:s.withCtx(()=>[s.createElementVNode("div",ute,[s.createVNode(s.unref(R.Form),{"label-col":{span:8},"wrapper-col":{span:16}},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Form).Item,{label:"Name",required:""},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Input),{value:s.unref(o).name,"onUpdate:value":u[0]||(u[0]=f=>s.unref(o).name=f)},null,8,["value"])]),_:1}),s.createVNode(s.unref(R.Form).Item,{label:"Time",required:""},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Select),{value:s.unref(o).time,"onUpdate:value":u[1]||(u[1]=f=>s.unref(o).time=f),placeholder:"Time"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Select).Option,{value:1},{default:s.withCtx(()=>[fte]),_:1}),s.createVNode(s.unref(R.Select).Option,{value:2},{default:s.withCtx(()=>[dte]),_:1})]),_:1},8,["value"])]),_:1}),s.createVNode(s.unref(R.Form).Item,{required:""},{label:s.withCtx(()=>[s.createVNode(s.unref(R.Tooltip),{placement:"right"},{title:s.withCtx(()=>[hte]),default:s.withCtx(()=>[s.createVNode(s.unref(R.Space),null,{default:s.withCtx(()=>[pte,s.createVNode(s.unref(zt))]),_:1})]),_:1})]),default:s.withCtx(()=>[s.createVNode(s.unref(R.Checkbox),{checked:s.unref(o).now,"onUpdate:checked":u[2]||(u[2]=f=>s.unref(o).now=f)},null,8,["checked"])]),_:1})]),_:1})])]),_:3},16))}}),_te={class:"cube-header"},wte={class:"ellipsis font-bold"},bte={class:"report-list-card"},Ste={class:"report-list-card__header"},xte={key:0,class:"item-list"},Cte=["onClick"],kte={class:"report-name"},Tte={key:0,class:"stars"},Mte={class:"name"},$te={class:"item-action-container"},Nte=s.createElementVNode("span",null,"New Report",-1),Ete={class:"save-container"},Ate={class:"save-body"},Dte=s.createTextVNode("Relative Time"),Ote=s.createTextVNode("Original Time"),Lte=s.createElementVNode("span",null,"When comparing today's data with previous to calculate changes%, omit no-data hours",-1),Pte=s.createTextVNode(" Data Omission "),Bte={class:"save-footer"},Ite=s.createTextVNode("Cancel"),Rte=s.createTextVNode(" OK "),Vte=s.defineComponent({setup(t){const e=s.inject("dataConfig"),r=s.inject("currentState"),n=s.inject("cubeState"),a=s.inject("getAuth"),i=s.inject("getHeader"),o=s.inject("groupCubes"),l=s.ref(""),c=s.inject("resetFromHash"),u=s.ref(!1),f=s.ref(null),d=M=>{f.value=te({},M),c(M.content),u.value=!1},h=s.inject("getReports"),p=s.inject("isAdmin"),m=s.computed(()=>{const M=p?r.reports:r.reports.filter(O=>!O.is_default);return l.value!==""?M.filter(O=>O.name.toLowerCase().includes(l.value.toLowerCase())):M}),v=M=>{u.value=!1,g({url:zo.apiId(M.id)})},{run:g}=ar({url:"",method:"delete",headers:te({},i()),params:te({},a())},{manual:!0,onSuccess:M=>{h()},onError:()=>{}}),y=s.ref(!1),_=s.ref({name:"",time:1,now:!1}),w=()=>{_.value={name:"",time:1,now:!1},y.value=!1},S=()=>{var T;const M=Ye(n);if(M.range.now=_.value.now,M.range.relative=_.value.time===1,M.range.create_time=fe().format("YYYY-MM-DD"),((T=M==null?void 0:M.custom_measures)==null?void 0:T.length)>0){const E=r.cube.custom_measures.filter(D=>M==null?void 0:M.custom_measures.includes(D.id));M.config_measures=E}const O={name:_.value.name,data_set_id:r.cube.data_set_id,table_name:r.cube.id,content:qn(M)};b({data:O})},{loading:x,run:b}=ar({url:zo.api,method:"post",headers:te({},i()),params:te({},a())},{manual:!0,onSuccess:M=>{w(),h()},onError:()=>{}}),{loading:C,run:k}=ar({url:zo.api,method:"put",headers:te({},i()),params:te({},a())},{manual:!0,onSuccess:M=>{N.value=!1,h()},onError:()=>{}}),$=s.ref(null),N=s.ref(!1),A=()=>{u.value=!1,N.value=!0},L=M=>{var E;if(!(M==null?void 0:M.id))return;const O=Ye(n);if(O.range.now=M.now,O.range.relative=M.time===1,O.range.create_time=fe().format("YYYY-MM-DD"),((E=O==null?void 0:O.custom_measures)==null?void 0:E.length)>0){const D=r.cube.custom_measures.filter(P=>O==null?void 0:O.custom_measures.includes(P.id));O.config_measures=D}const T={id:M.id,name:M.name,data_set_id:r.cube.data_set_id,table_name:r.cube.id,content:qn(O)};k({url:zo.apiId(M.id),data:te({},T)}).then(D=>{(D==null?void 0:D.code)==="200"&&f.value&&(f.value.name=M.name)})};return s.watch(()=>r.cube.id,(M,O)=>{var T;M!==((T=f.value)==null?void 0:T.table_name)&&(f.value=null)}),(M,O)=>(s.openBlock(),s.createElementBlock("div",_te,[s.createVNode(s.unref(R.Space),{size:16},{default:s.withCtx(()=>{var T;return[s.renderSlot(M.$slots,"cube-list",{},()=>[Array.isArray(s.unref(o))&&s.unref(o).length>0?(s.openBlock(),s.createBlock(cte,{key:0})):(s.openBlock(),s.createBlock(Jee,{key:1}))]),s.unref(e).moudle.save_report&&s.unref(r).reports&&((T=s.unref(r).reports)==null?void 0:T.length)>0?(s.openBlock(),s.createBlock(s.unref(R.Popover),{key:0,placement:"bottomLeft",trigger:"click",visible:u.value,"onUpdate:visible":O[1]||(O[1]=E=>u.value=E),overlayClassName:"report-list-container clear-padding"},{content:s.withCtx(()=>[s.createElementVNode("div",bte,[s.createElementVNode("div",Ste,[s.createVNode(s.unref(R.Input),{value:l.value,"onUpdate:value":O[0]||(O[0]=E=>l.value=E),placeholder:"Search Key"},null,8,["value"])]),s.createElementVNode("div",{class:s.normalizeClass(["report-list-card__body",{"no-data":s.unref(m).length===0}])},[s.unref(m)&&s.unref(m).length>0?(s.openBlock(),s.createElementBlock("ul",xte,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(m),E=>{var D;return s.openBlock(),s.createElementBlock("li",{class:s.normalizeClass({active:((D=f.value)==null?void 0:D.id)===E.id}),key:E.id,onClick:P=>d(E)},[s.createElementVNode("div",kte,[E.is_default?(s.openBlock(),s.createElementBlock("div",Tte,[s.createVNode(s.unref(Cd))])):s.createCommentVNode("",!0),s.createElementVNode("div",Mte,s.toDisplayString(E.name),1)]),s.createElementVNode("div",$te,[E.is_default?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.unref(Po),{key:0,class:"item-action",onClick:s.withModifiers(P=>v(E),["stop"])},null,8,["onClick"]))])],10,Cte)}),128))])):(s.openBlock(),s.createBlock(lr,{key:1,msg:"No Data Available."}))],2)])]),default:s.withCtx(()=>[s.createVNode(s.unref(R.Space),{size:8},{default:s.withCtx(()=>[s.createElementVNode("span",wte,s.toDisplayString(`${f.value?f.value.name:"Your Report"}`),1),f.value?(s.openBlock(),s.createBlock(s.unref(Vl),{key:0,onClick:s.withModifiers(A,["stop"])},null,8,["onClick"])):s.createCommentVNode("",!0),s.createVNode(s.unref(xa))]),_:1})]),_:1},8,["visible"])):s.createCommentVNode("",!0),s.unref(e).moudle.save_report?(s.openBlock(),s.createBlock(s.unref(R.Popover),{key:1,placement:"bottomLeft",trigger:"click",visible:y.value,"onUpdate:visible":O[5]||(O[5]=E=>y.value=E),overlayClassName:"report-list-container"},{content:s.withCtx(()=>[s.createElementVNode("div",Ete,[s.createElementVNode("div",Ate,[s.createVNode(s.unref(R.Form),null,{default:s.withCtx(()=>[s.createVNode(s.unref(R.Form).Item,null,{default:s.withCtx(()=>[s.createVNode(s.unref(R.Input),{value:_.value.name,"onUpdate:value":O[2]||(O[2]=E=>_.value.name=E),placeholder:"Your Report Name"},null,8,["value"])]),_:1}),s.createVNode(s.unref(R.Form).Item,null,{default:s.withCtx(()=>[s.createVNode(s.unref(R.Select),{value:_.value.time,"onUpdate:value":O[3]||(O[3]=E=>_.value.time=E),placeholder:"Time"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Select).Option,{value:1},{default:s.withCtx(()=>[Dte]),_:1}),s.createVNode(s.unref(R.Select).Option,{value:2},{default:s.withCtx(()=>[Ote]),_:1})]),_:1},8,["value"])]),_:1}),s.createVNode(s.unref(R.Form).Item,null,{default:s.withCtx(()=>[s.createVNode(s.unref(R.Checkbox),{checked:_.value.now,"onUpdate:checked":O[4]||(O[4]=E=>_.value.now=E)},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Tooltip),{placement:"right"},{title:s.withCtx(()=>[Lte]),default:s.withCtx(()=>[s.createVNode(s.unref(R.Space),null,{default:s.withCtx(()=>[Pte,s.createVNode(s.unref(zt))]),_:1})]),_:1})]),_:1},8,["checked"])]),_:1})]),_:1})]),s.createElementVNode("div",Bte,[s.createVNode(s.unref(R.Space),null,{default:s.withCtx(()=>[s.createVNode(s.unref(R.Button),{type:"link",onClick:w},{default:s.withCtx(()=>[Ite]),_:1}),s.createVNode(s.unref(R.Button),{type:"primary",onClick:S,loading:s.unref(x),disabled:s.unref(x)||_.value.name.trim()===""},{default:s.withCtx(()=>[Rte]),_:1},8,["loading","disabled"])]),_:1})])])]),default:s.withCtx(()=>[s.createVNode(s.unref(R.Space),{size:8},{default:s.withCtx(()=>[s.createVNode(s.unref(_0)),Nte]),_:1})]),_:1},8,["visible"])):s.createCommentVNode("",!0)]}),_:3}),s.createVNode(yte,{visible:N.value,dialogVisible:N.value,ref_key:"editRef",ref:$,currentReport:f.value,onOnCancel:O[6]||(O[6]=()=>N.value=!1),onOnOk:L,loading:s.unref(C)},null,8,["visible","dialogVisible","currentReport","loading"])]))}}),Fte={class:"mega-vis-status"},zte={class:"mega-vis-status__content"},Hte={key:1,class:"mega-vis-status__msg"},JT=s.defineComponent({props:{type:{type:String,default:"empty"},loading:{type:Boolean,default:!1},msg:{type:String,default:""}},setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("div",Fte,[s.createElementVNode("div",zte,[t.type==="empty"?(s.openBlock(),s.createBlock(s.unref(C0),{key:0,class:"mega-vis-status__img"})):s.createCommentVNode("",!0),t.msg?(s.openBlock(),s.createElementBlock("div",Hte,[s.createTextVNode(s.toDisplayString(t.msg)+" ",1),s.renderSlot(e.$slots,"default")])):s.createCommentVNode("",!0)])]))}}),Ute=["id"],QT=s.defineComponent({props:{cube:{type:Object,default:null},type:{type:String,default:"hash"},hash:{type:String,default:null},auth:{type:Object,default:()=>{}},header:{type:Object,default:()=>{}},paramsExtra:{type:Object,default:null},isDefault:{type:Boolean,default:!1},autoRefresh:{type:Number,default:0},bindEvent:{type:Boolean,default:!0},gridId:{type:[Number,String],default:null},isPush:{type:Boolean,default:!1}},emits:["onLoadComplete"],setup(t,{emit:e}){const r=t,n=s.ref({success:!1,message:""}),a=s.ref(null),i=s.ref(null),o=s.computed(()=>{var w;const y=(w=i.value)==null?void 0:w.visual;return Pl.find(S=>S.name===y)}),l=s.computed(()=>i.value?Ro(i.value.range):!1),c=s.computed(()=>{if(!i.value)return[];const y=at(r.cube.measures),_=i.value.measures;return y.filter(S=>_.includes(S.id)).sort((S,x)=>_.indexOf(S.id)-_.indexOf(x.id))}),u=s.computed(()=>{if(!i.value)return[];const y=at(r.cube.dimensions),_=i.value.splits.map(x=>x.id);return y.filter(x=>_.includes(x.id)).sort((x,b)=>_.indexOf(x.id)-_.indexOf(b.id))}),f=s.ref(!1),d=()=>{var b,C,k,$;if(!(r==null?void 0:r.hash)||!(r==null?void 0:r.cube))return;a.value=null;const y=at(r.cube.dimensions),_=i.value.splits.map(N=>N.id),w=y.filter(N=>_.includes(N.id)),S=y.find(N=>N.kind==="time"),x=i.value.splits.find(N=>N.id===S.id);$d(i.value.visual,w,i.value.measures,{drillCount:r.cube.drillCount||r.cube.maxSplit,granularity:(x==null?void 0:x.granularity)||((b=r.cube)==null?void 0:b.defaultSelectedGranularity)||((C=r.cube)==null?void 0:C.primaryTimeGranularity),range:(($=(k=i.value)==null?void 0:k.range)==null?void 0:$.current_time)||[],cube:te({},r.cube)}).then(N=>{n.value=N,p()},N=>{n.value=N})},h=s.ref(null),p=()=>{var y;f.value&&(f.value=!1,(y=h.value)==null||y.cancel()),setTimeout(()=>{f.value=!0,h.value=Xl();const _=mh(r.cube,i.value),w=r.cube.data_cube_id,S=r.cube.data_set_id;h.value.request("pivot",_,te({data_cube_id:w,trans_data_set_id:S},r.auth),te({},r.header)).then(x=>{f.value=!1,a.value=x==null?void 0:x.data;const b=x.code==="200";s.nextTick(()=>{var L,M,O,T,E,D;const C=o.value.name,k=document.querySelector(`#cube-panel-${r.gridId} .vis-height`),$=k?(k==null?void 0:k.offsetHeight)+(40+36):0,N=b?((L=x==null?void 0:x.data)==null?void 0:L.length)||((O=(M=x==null?void 0:x.data)==null?void 0:M.children)==null?void 0:O.length):0,A={id:r.gridId,visual:C,count:N,measures_count:(T=c.value)==null?void 0:T.length,is_compare:l.value,height:C==="table"?48+N*36+48+1+(40+36):$};if(C==="table"&&b){if(r.isPush){const P=((E=x==null?void 0:x.data)==null?void 0:E.children)||[],V=m(P).length;l.value?A.height=48+V*60+60+1+(40+36):A.height=48+V*36+48+1+(40+36)}else if(i.value.splits.length>1){const P=((D=x==null?void 0:x.data)==null?void 0:D.children)||[],I=m(P);A.height=48+Math.min(I.length,10)*36+48+1+(40+36)}}b||(A.height=320),e("onLoadComplete",A)})},x=>{f.value=!1})},100)},m=y=>y&&y.length>0?y.reduce((_,w)=>{const b=w,{children:S}=b,x=v0(b,["children"]);return _.concat(x,S&&S.length?m(S):[])},[]):[],v=y=>{var C,k,$,N,A;if(!(r==null?void 0:r.hash)){n.value={success:!1,message:"Report not exit or hash parsing failed!"};return}if(!(r==null?void 0:r.cube)){n.value={success:!1,message:"Cube error or not exit!"};return}const _=Ye(Z1(r.hash,r.cube));if(!_){R.message.error("Hash conditional parsing failed!");return}if(delete _.cube,!_.range){R.message.error("Date Range error!");return}const{relative:w,current_time:S,previous_time:x,create_time:b}=_.range;if(w){const{splits:L}=_,[M,O]=S,T=fe(O).diff(fe(M),"days"),E=b?fe(b).diff(fe(O.substr(0,10)),"days"):0;let P=TI(_.timezone).hour();((C=r.cube)==null?void 0:C.delay_hours)&&r.isPush&&(P=P-((k=r.cube)==null?void 0:k.delay_hours));const I=fe().hour((($=_==null?void 0:_.range)==null?void 0:$.now)?P<0?0:P:fe(O).hour()).minute(fe(O).minute()).subtract(E,"days"),V=fe().hour(fe(M).hour()).minute(fe(M).minute()).subtract(T+E,"days"),F=L.find(Y=>Y.id===r.cube.primaryTimeAttribute),H=(N=F==null?void 0:F.granularity)!=null?N:r.cube.defaultSelectedGranularity;if(_.range.current_time=jn([V,I],H,r.cube.primaryTimeGranularity),x&&x.length>0){const Y=fe(V).subtract(T+1,"days"),Q=fe(I).subtract(T+1,"days");_.range.previous_time=jn([Y,Q],H,r.cube.primaryTimeGranularity)}}if(r==null?void 0:r.paramsExtra){const L=(A=r.cube)==null?void 0:A.primaryTimeAttribute,{filters:M,range:O,timezone:T,measures:E,trends:D,leaders:P,isDefault:I}=r.paramsExtra;if(_.timezone=T,I&&(_.range=te({},O),M&&M.length>0&&M.forEach(V=>{if(V.id!==L){const F=_.filters.find(H=>H.id===V.id);F?(F.filter_type=V.filter_type,F.select=V.select):_.filters.push(V)}}),["lineChart","barChart","stackLineChart","stackBarChart"].includes(_.visual)&&D&&_.splits.forEach((V,F)=>{if(V.id===r.cube.primaryTimeAttribute){const{id:H,sortField:Y,sortType:Q,interval:ae}=V,le={id:H,order_id:Y!=null?Y:r.cube.primaryTimeAttribute,order_by:Q||"DESC"};le.order_id=Y||H,le.limit="None",le.granularity=D,le.interval=ae!=null?ae:1,_.splits[F]=te({},le)}}),E&&E.length>0&&(_.measures=[...E]),_.visual==="table"&&y)){const{property:V,order:F}=y,H=r.cube.primaryTimeAttribute;_.splits.forEach(Y=>{var Q;Y.sortType=(F==null?void 0:F.toUpperCase())||"DESC",Y.sortField=V,Y.limit=Y.limit==="None"?0:Y.limit||r.cube.defaultLimit||25,Y.id===H&&(Y.granularity=(Y==null?void 0:Y.granularity)||r.cube.defaultSelectedGranularity||"d",Y.interval=(Q=Y==null?void 0:Y.interval)!=null?Q:1)})}}i.value=_,s.nextTick(()=>{d()})},g=({property:y,order:_})=>{v({property:y,order:_})};return s.onBeforeUnmount(()=>{r.bindEvent&&(ce.off("on-refresh",d),ce.off("on-params-change",v))}),s.onMounted(()=>{v(),r.bindEvent&&(ce.on("on-refresh",d),ce.on("on-params-change",v))}),(y,_)=>(s.openBlock(),s.createElementBlock("div",{class:"mega-cube-panel",id:`cube-panel-${t.gridId}`},[f.value?(s.openBlock(),s.createBlock(s.unref(R.Spin),{key:0,spinning:f.value,class:"mega-cube-panel__loading"},null,8,["spinning"])):s.createCommentVNode("",!0),n.value.success&&!f.value&&i.value?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(o).component),{key:1,"origin-data":a.value,"selected-measures":s.unref(c),"selected-splits":s.unref(u),cube:r.cube,"current-vis-state":i.value,"is-compare":s.unref(l),"is-readonly":t.isPush,"is-sortable":!t.isPush,"is-clickable":t.isPush?!1:t.isDefault,"is-push":t.isPush,"is-in-dashboard":"",onOnChangeTableSort:g},null,8,["origin-data","selected-measures","selected-splits","cube","current-vis-state","is-compare","is-readonly","is-sortable","is-clickable","is-push"])):s.createCommentVNode("",!0),!n.value.success&&!f.value?(s.openBlock(),s.createBlock(JT,{key:2,msg:n.value.message},null,8,["msg"])):s.createCommentVNode("",!0)],8,Ute))}}),jte={class:"select-report-content"},Yte={class:"select-report-content__top"},Gte=s.createTextVNode(" Auto Refresh "),Wte={class:"select-report-content__bottom"},Zte=s.createElementVNode("div",{style:{"flex-grow":"1"}},null,-1),qte=s.createTextVNode("Cancel"),Xte=s.createTextVNode("OK"),Kte=s.defineComponent({props:{dialogVisible:{type:Boolean,default:!1}},emits:["onOk","onCancel","update:dialogVisible"],setup(t,{emit:e}){const r=s.inject("currentState"),n=s.inject("getHeader"),a=s.inject("getAuth"),i=s.inject("dashGrid"),o=s.inject("isAdmin"),l=s.computed(()=>o?r.reports:r.reports.filter(g=>!g.is_default)),c=s.ref(!1),u=s.ref(null),f=s.ref(0),d=s.inject("dataConfig"),h=()=>{u.value=null,p.value=null,f.value=0,e("onCancel")},p=s.ref(null),m=g=>{if(c.value=!0,!g)return;const y=r.reports.find(_=>_.id===g);if(y){const _=d.dataCubes.find(S=>S.id===y.table_name),w={report:s.toRaw(y),hash:y.content,cube:s.toRaw(_)};p.value=w}s.nextTick(()=>{c.value=!1})},v=()=>{var y,_,w;const g=r.reports.find(S=>S.id===u.value);if(g){if(e("onOk",Ti(te({},s.toRaw(g)),{auto:f.value})),!Array.isArray(r.dashboard.layout))return;if(r.dashboard.layout.find(A=>A.id===g.id)){R.message.error("Report Exit!");return}const x=(y=r==null?void 0:r.dashboard)==null?void 0:y.layout;if(((_=r==null?void 0:r.dashboard)==null?void 0:_.is_default)&&(x==null?void 0:x.length)>0&&((w=x[0])==null?void 0:w.table)!==g.table_name){R.message.error("Report is not the same table");return}const{col:b,w:C,h:k}=i.value||{},[$,N]=T0(r.dashboard.layout,b,C,k);r.dashboard.layout.push({id:g.id,name:g.name,table:g.table_name,auto:f.value,i:g.id,x:$,y:N,w:C,h:k}),ce.emit("update-dashboard"),h()}};return(g,y)=>(s.openBlock(),s.createBlock(s.unref(R.Modal),s.mergeProps({mask:!0,maskClosable:!1,onOk:v,onCancel:h,width:720,destroyOnClose:""},g.$attrs,{centered:"",title:"Select Report",wrapClassName:"select-report-container"}),{footer:s.withCtx(()=>[s.renderSlot(g.$slots,"left"),Zte,s.createElementVNode("div",null,[s.createVNode(s.unref(R.Button),{onClick:h},{default:s.withCtx(()=>[qte]),_:1}),s.createVNode(s.unref(R.Button),{type:"primary",disabled:!u.value,onClick:v},{default:s.withCtx(()=>[Xte]),_:1},8,["disabled"])])]),default:s.withCtx(()=>{var _,w;return[s.createElementVNode("div",jte,[s.createElementVNode("div",Yte,[s.createVNode(s.unref(R.Select),{value:u.value,"onUpdate:value":y[0]||(y[0]=S=>u.value=S),ref:"select",style:{width:"180px"},placeholder:"Your Report",onChange:m},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(l),S=>(s.openBlock(),s.createBlock(s.unref(R.Select).Option,{key:S.id,value:S.id},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(S.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"]),s.createVNode(s.unref(R.Space),null,{default:s.withCtx(()=>[Gte,s.createVNode(s.unref(R.Select),{value:f.value,"onUpdate:value":y[1]||(y[1]=S=>f.value=S),style:{width:"180px"}},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Md),S=>(s.openBlock(),s.createBlock(s.unref(R.Select).Option,{value:S.id,key:S.id},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(S.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),s.createElementVNode("div",Wte,[c.value||!u.value?(s.openBlock(),s.createBlock(lr,{key:0,loading:c.value,msg:c.value?"Loading report":"Please select report."},null,8,["loading","msg"])):(s.openBlock(),s.createBlock(QT,{key:1,bindEvent:!1,auth:s.unref(a)(),header:s.unref(n)(),cube:(_=p.value)==null?void 0:_.cube,hash:(w=p.value)==null?void 0:w.hash},null,8,["auth","header","cube","hash"]))])])]}),_:3},16))}}),Jte={class:"cube-header"},Qte={class:"font-bold header-name"},ere={class:"item-list"},tre=["onClick"],rre={class:"item-action-container"},nre=s.createElementVNode("span",null,"Select Report",-1),are=s.createElementVNode("span",null,"New Dashboard",-1),ire={class:"save-container"},ore={class:"save-body"},sre={class:"save-footer"},lre=s.createTextVNode("Cancel"),cre=s.createTextVNode(" OK "),ure=s.defineComponent({setup(t){const e=s.inject("dashboardState"),r=s.inject("currentState"),n=s.inject("setupDashboard"),a=s.inject("dataConfig"),i=s.ref(!1),o=b=>{var k;if(i.value=!1,((k=r.dashboard)==null?void 0:k.id)===b.id)return;const C=Ye(b);if(C.layout=C.layout?JSON.parse(C.layout):[],(C==null?void 0:C.is_default)&&C.layout.length>0){const $=Xo(a.dataCubes,{id:C.layout[0].table});n($)}s.nextTick(()=>{r.dashboard=C})},l=s.ref(!1),c=s.inject("getHeader"),u=s.inject("getAuth"),{loading:f,run:d}=ar({url:Un.api,method:"post",headers:te({},c()),params:te({},u())},{manual:!0,onSuccess:b=>{S(),m()},onError:()=>{}}),h=s.ref(!1),p=s.ref({name:"",layout:""}),m=()=>{p.value={name:"",layout:""},h.value=!1},v=()=>{d({data:{name:p.value.name,layout:""}}),h.value=!1},{run:g}=ar({url:"",method:"delete",headers:te({},c()),params:te({},u())},{manual:!0,onSuccess:b=>{i.value=!1,S()},onError:()=>{}}),y=b=>{g({url:Un.apiId(b.id)})},_=()=>{i.value=!1,ce.emit("edit-dashboard")},{loading:w,run:S}=ar({url:Un.api,method:"get",headers:te({},c()),params:te({},u())},{manual:!0,onSuccess:b=>{e.dashboards=b},onError:()=>{}}),x=()=>{var b;!((b=r.dashboard)==null?void 0:b.id)||(l.value=!0)};return(b,C)=>(s.openBlock(),s.createElementBlock("div",Jte,[s.createVNode(s.unref(R.Space),{size:24},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Popover),{placement:"bottomLeft",visible:i.value,"onUpdate:visible":C[0]||(C[0]=k=>i.value=k),trigger:"click",overlayClassName:"item-list-container clear-padding"},{content:s.withCtx(()=>[s.createElementVNode("ul",ere,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(e).dashboards,k=>{var $,N;return s.openBlock(),s.createElementBlock("li",{class:s.normalizeClass(["capitalize",{active:k.id===(($=s.unref(r).dashboard)==null?void 0:$.id)}]),key:k.id,onClick:A=>o(k)},[s.createVNode(s.unref(R.Space),null,{default:s.withCtx(()=>[k.is_default?(s.openBlock(),s.createBlock(s.unref(Cd),{key:0})):s.createCommentVNode("",!0),s.createTextVNode(s.toDisplayString(k.name),1)]),_:2},1024),s.createElementVNode("div",rre,[k.is_default?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.unref(Po),{key:0,class:"item-action",disabled:k.id===((N=s.unref(r).dashboard)==null?void 0:N.id),onClick:s.withModifiers(A=>y(k),["stop"])},null,8,["disabled","onClick"]))])],10,tre)}),128))])]),default:s.withCtx(()=>[s.createVNode(s.unref(R.Space),{size:8},{default:s.withCtx(()=>{var k,$,N,A;return[(($=(k=s.unref(r))==null?void 0:k.dashboard)==null?void 0:$.is_default)?(s.openBlock(),s.createBlock(s.unref(Cd),{key:0})):s.createCommentVNode("",!0),s.createElementVNode("span",Qte,s.toDisplayString(((N=s.unref(r).dashboard)==null?void 0:N.name)||"None"),1),((A=s.unref(r).dashboard)==null?void 0:A.id)?(s.openBlock(),s.createBlock(s.unref(Vl),{key:1,onClick:s.withModifiers(_,["stop"])},null,8,["onClick"])):s.createCommentVNode("",!0),s.createVNode(s.unref(xa))]}),_:1})]),_:1},8,["visible"]),s.createVNode(s.unref(R.Space),{size:8,onClick:x},{default:s.withCtx(()=>[s.createVNode(s.unref(gE)),nre]),_:1}),s.createVNode(s.unref(R.Popover),{visible:h.value,"onUpdate:visible":C[2]||(C[2]=k=>h.value=k),placement:"bottomLeft",trigger:"click",overlayClassName:"item-list-container"},{content:s.withCtx(()=>[s.createElementVNode("div",ire,[s.createElementVNode("div",ore,[s.createVNode(s.unref(R.Input),{value:p.value.name,"onUpdate:value":C[1]||(C[1]=k=>p.value.name=k),placeholder:"Your Dashboard Name"},null,8,["value"])]),s.createElementVNode("div",sre,[s.createVNode(s.unref(R.Space),null,{default:s.withCtx(()=>[s.createVNode(s.unref(R.Button),{type:"link",onClick:m},{default:s.withCtx(()=>[lre]),_:1}),s.createVNode(s.unref(R.Button),{type:"primary",onClick:v,loading:s.unref(f),disabled:s.unref(f)||p.value.name.trim()===""},{default:s.withCtx(()=>[cre]),_:1},8,["loading","disabled"])]),_:1})])])]),default:s.withCtx(()=>[s.createVNode(s.unref(R.Space),{size:8},{default:s.withCtx(()=>[s.createVNode(s.unref(hE)),are]),_:1})]),_:1},8,["visible"])]),_:1}),s.createVNode(Kte,{visible:l.value,ref:"selectRef",onOnCancel:C[3]||(C[3]=()=>l.value=!1)},null,8,["visible"])]))}}),fre={class:"mega-header"},dre={class:"mega-header__left"},hre={class:"mega-header__center"},pre={class:"mega-header__right mobile-hidden"},mre=s.defineComponent({setup(t){const e=s.inject("dataConfig"),r=s.inject("cubeState");return(n,a)=>(s.openBlock(),s.createElementBlock("div",fre,[s.createElementVNode("div",dre,[s.unref(e).layout.type==="dashboard"?(s.openBlock(),s.createBlock(ure,{key:0})):(s.openBlock(),s.createBlock(Vte,{key:1},{"cube-list":s.withCtx(()=>[s.renderSlot(n.$slots,"cube-list")]),_:3}))]),s.createElementVNode("div",hre,[s.unref(e).moudle.dashboard?(s.openBlock(),s.createBlock(Wee,{key:0})):s.createCommentVNode("",!0)]),s.createElementVNode("div",pre,[s.createVNode(s.unref(R.Space),{size:16},{default:s.withCtx(()=>[s.unref(e).layout.type==="cube"?(s.openBlock(),s.createBlock(jee,{key:0})):s.createCommentVNode("",!0),s.unref(e).moudle.timezone?(s.openBlock(),s.createBlock(Y5,{key:1})):s.createCommentVNode("",!0),s.createVNode(K5),s.unref(e).moudle.share_report&&s.unref(e).layout.type==="cube"?(s.openBlock(),s.createBlock(e7,{key:2})):s.createCommentVNode("",!0),s.unref(e).layout.type==="cube"&&s.unref(e).moudle.download?(s.openBlock(),s.createBlock(AI,{key:3})):s.createCommentVNode("",!0),s.unref(e).layout.type==="cube"&&s.unref(e).moudle.download_front&&s.unref(r).visual==="table"?(s.openBlock(),s.createBlock(J8,{key:4})):s.createCommentVNode("",!0),s.unref(e).layout.type==="cube"?s.renderSlot(n.$slots,"config",{key:5}):s.createCommentVNode("",!0),s.unref(e).layout.type==="dashboard"?s.renderSlot(n.$slots,"push",{key:6}):s.createCommentVNode("",!0)]),_:3})])]))}}),vre=s.createTextVNode(" Filter "),gre=s.createTextVNode(" Split "),yre=s.createTextVNode(" Split "),eM=s.defineComponent({props:{dimension:{type:Object,default:null}},emits:["onAddFilter","onReplaceSplit","onAddSplit"],setup(t,{expose:e,emit:r}){const n=t,a=s.ref(!1),i=()=>{a.value=!1},o=s.inject("cubeState"),l=s.computed(()=>o.filters.map(h=>h.id)),c=s.computed(()=>o.splits.map(h=>h.id)),u=()=>{r("onAddFilter",n.dimension),o.filters.push({id:n.dimension.id,name:n.dimension.name}),s.nextTick(()=>{ce.emit("onQuickAddFilter",n.dimension)}),i()},f=()=>{r("onReplaceSplit",n.dimension),o.splits=[{id:n.dimension.id,name:n.dimension.name}],i()},d=()=>{r("onAddSplit",n.dimension),o.splits.push({id:n.dimension.id,name:n.dimension.name}),i()};return s.onMounted(()=>{window.addEventListener("onBeforeDragMove",i)}),s.onBeforeUnmount(()=>{window.removeEventListener("onBeforeDragMove",i)}),e({closePop:i}),(h,p)=>(s.openBlock(),s.createBlock(s.unref(R.Popover),{visible:a.value,"onUpdate:visible":p[0]||(p[0]=m=>a.value=m),trigger:"click",placement:"bottom",overlayClassName:"quick-add-dimension"},{content:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["quick-add-item",{disabled:s.unref(l).includes(t.dimension.id)}]),onClick:u},[s.createVNode(s.unref(y0)),vre],2),s.createElementVNode("div",{class:"quick-add-item",onClick:f},[s.createVNode(s.unref(K$)),gre]),s.createElementVNode("div",{class:s.normalizeClass(["quick-add-item",{disabled:s.unref(c).includes(t.dimension.id)}]),onClick:d},[s.createVNode(s.unref(W$)),yre],2)]),default:s.withCtx(()=>[s.renderSlot(h.$slots,"default")]),_:3},8,["visible"]))}}),_re={class:"mega-group-list mega-group-dim"},wre={class:"mega-group-list__header"},bre=s.createElementVNode("div",{class:"mega-list-title"},"Dimensions",-1),Sre={class:"mega-search"},xre={class:"mega-group-list__body"},Cre=["onClick"],kre={key:1,class:"item__action"},Tre={key:2,class:"item__title"},Mre={class:"item__title"},$re={key:4,class:"item__info"},Nre={class:"mega-group-list__item-content handle"},Ere=s.createElementVNode("div",{class:"item__action"},null,-1),Are={class:"item__title"},Dre={key:0,class:"item-info"},Ore=s.defineComponent({props:{dimensions:{type:Array,default:()=>[]}},setup(t){const e=t,r=s.inject("currentState"),n=s.ref([]),a=s.ref(""),i=s.ref(!1),o=s.ref(null),l=()=>{i.value=!i.value,i.value&&s.nextTick(()=>{o.value.input.focus()})},c=p=>{p.target.value===""&&(i.value=!1)},u=s.computed(()=>{const p=a.value;return p?at(e.dimensions).filter(m=>m.id.toLowerCase().includes(p.toLowerCase())||m.name.toLowerCase().includes(p.toLowerCase())):e.dimensions}),f=p=>{const m=n.value.findIndex(v=>v===p);m===-1?n.value.push(p):n.value.splice(m,1)},d=(p,m)=>{var w,S;const{draggedContext:v,relatedContext:g}=p,{element:y}=v,_=g.list;if(Ko(_,{id:y.id})||v.futureIndex<=((S=(w=r.cube)==null?void 0:w.fixSplit)==null?void 0:S.length)-1)return!1},h=(p,m)=>{window.dispatchEvent(new Event("onBeforeDragMove"))};return(p,m)=>(s.openBlock(),s.createElementBlock("div",_re,[s.createElementVNode("div",wre,[s.createVNode(s.unref(L$),{onClick:l}),bre,s.createElementVNode("div",Sre,[s.createVNode(s.unref(R.Input),{class:s.normalizeClass(["mega-search__input",{open:i.value}]),ref_key:"inputRef",ref:o,allowClear:"",value:a.value,"onUpdate:value":m[0]||(m[0]=v=>a.value=v),onBlur:m[1]||(m[1]=v=>c(v))},null,8,["class","value"]),s.createVNode(s.unref(Ca),{onClick:l})])]),s.createElementVNode("div",xre,[s.createVNode(s.unref(Sa.default),{handle:".handle",sort:!1,"item-key":"id",list:s.unref(u),ghostClass:"sortable-ghost",dragClass:"sortable-drag","force-fallback":!0,"fallback-tolerance":5,"fallback-class":"mega-sortable-fallback",group:{name:"dimension",pull:"clone",put:!1},move:d,onStart:h},{item:s.withCtx(({element:v})=>{var g,y,_,w;return[(s.openBlock(),s.createElementBlock("div",{class:"mega-group-list__item",key:v.id},[s.createElementVNode("div",{class:s.normalizeClass(["mega-group-list__item-content",{expanded:n.value.includes(v.id),handle:!((g=v==null?void 0:v.children)==null?void 0:g.length),node:(v==null?void 0:v.children)&&((y=v==null?void 0:v.children)==null?void 0:y.length)>0}])},[((_=v==null?void 0:v.children)==null?void 0:_.length)>0?(s.openBlock(),s.createElementBlock("div",{key:0,class:"item__action",onClick:S=>f(v.id)},[n.value.includes(v.id)?(s.openBlock(),s.createBlock(s.unref(kd),{key:0})):(s.openBlock(),s.createBlock(s.unref(x0),{key:1}))],8,Cre)):(s.openBlock(),s.createElementBlock("div",kre)),((w=v==null?void 0:v.children)==null?void 0:w.length)>0?(s.openBlock(),s.createElementBlock("div",Tre,s.toDisplayString(v.name),1)):(s.openBlock(),s.createBlock(eM,{key:3,dimension:v},{default:s.withCtx(()=>[s.createElementVNode("div",Mre,s.toDisplayString(v.name),1)]),_:2},1032,["dimension"])),v.help?(s.openBlock(),s.createElementBlock("div",$re,[s.createVNode(s.unref(R.Tooltip),{placement:"right"},{title:s.withCtx(()=>[s.createElementVNode("span",null,s.toDisplayString(v.help),1)]),default:s.withCtx(()=>[s.createVNode(s.unref(zt))]),_:2},1024)])):s.createCommentVNode("",!0)],2),(v==null?void 0:v.children)&&(v==null?void 0:v.children.length)>0?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["mega-group-list__sub",{expanded:n.value.includes(v.id)}])},[s.createVNode(s.unref(Sa.default),{handle:".handle",sort:!1,"item-key":"id",list:v.children,ghostClass:"sortable-ghost",dragClass:"sortable-drag","force-fallback":!0,"fallback-tolerance":5,"fallback-class":"mega-sortable-fallback",group:{name:"dimension",pull:"clone",put:!1},move:d,onStart:h},{item:s.withCtx(({element:S})=>[(s.openBlock(),s.createElementBlock("div",{class:"mega-group-list__item",key:S.id},[s.createElementVNode("div",Nre,[Ere,s.createVNode(eM,{dimension:S},{default:s.withCtx(()=>[s.createElementVNode("div",Are,s.toDisplayString(S.name),1)]),_:2},1032,["dimension"]),S.help?(s.openBlock(),s.createElementBlock("div",Dre,[s.createVNode(s.unref(R.Tooltip),{placement:"right"},{title:s.withCtx(()=>[s.createElementVNode("span",null,s.toDisplayString(S.help),1)]),default:s.withCtx(()=>[s.createVNode(s.unref(zt))]),_:2},1024)])):s.createCommentVNode("",!0)])]))]),_:2},1032,["list"])],2)):s.createCommentVNode("",!0)]))]}),_:1},8,["list"])])]))}}),Lre={class:"custom-measures_content"},Pre={class:"measure-info"},Bre={class:"measure-msg"},Ire=s.createTextVNode(" You can use the following fields to do addition, subtraction, multiplication and division."),Rre=s.createElementVNode("br",null,null,-1),Vre=s.createTextVNode(" When using the Wilson Score Interval, the formula itself remains unchanged. Only the input fields such as "),Fre=s.createTextVNode("success"),zre=s.createTextVNode(" and "),Hre=s.createTextVNode("total"),Ure=s.createTextVNode("can be replaced at the business level to adapt to different statistical definitions and application scenarios. "),jre=s.createTextVNode("Operators"),Yre=s.createTextVNode("+"),Gre=s.createTextVNode("-"),Wre=s.createTextVNode("*"),Zre=s.createTextVNode("/"),qre=s.createTextVNode("("),Xre=s.createTextVNode(")"),Kre=s.createTextVNode("Measures Fields"),Jre={class:"field"},Qre={class:"measure-basic"},ene=s.createTextVNode("Number"),tne=s.createTextVNode("Percent"),rne=s.createTextVNode("String"),nne={class:"measure-extra"},ane=s.createTextVNode(" Wilson Score Interval: "),ine={class:"measure-formula"},one=s.createElementVNode("div",{style:{"flex-grow":"1"}},null,-1),sne=s.createTextVNode("Cancel"),lne=s.createTextVNode("OK"),cne=s.defineComponent({props:{dialogVisible:{type:Boolean,default:!1},currentCustom:{type:Object,default:null}},emits:["onOk","onCancel","update:dialogVisible"],setup(t,{emit:e}){const r=t,n=s.inject("dataConfig"),a=s.inject("cubeState"),i=s.inject("currentState"),o=s.computed(()=>a.measures.filter(v=>!Yr(v))),l=s.ref({id:"",name:"",formula:"",format:"0,0[.]00",score:!1}),c=v=>{v?(l.value.format="-1",l.value.formula="getWilsonScore(success,total,2.326)"):(l.value.format="0,0[.]00",l.value.formula="")},u=s.computed(()=>l.value.name!==""&&l.value.formula!==""&&l.value.format!==""),f=()=>{e("onCancel"),l.value={id:"",name:"",formula:"",format:"0,0[.]00",score:!1}},d=()=>{var w;const v=(w=l.value)==null?void 0:w.id,g={id:v||`field_${fe().valueOf()}`,name:l.value.name,format:l.value.format,formula:l.value.formula.replaceAll(`
158
+ `,"")},y=i.custom.findIndex(S=>S.id===v);v&&y!==-1?i.custom[y]=g:(i.custom.push(g),a.custom_measures.push(g.id),a.measures.push(g.id));const _=n.dataCubes.find(S=>S.id===a.id);if(_&&_.custom_measures){const S=_.custom_measures.findIndex(x=>x.id===v);S!==-1?_.custom_measures[S]=g:_.custom_measures.push(g)}else _.custom_measures=[g];if(ce.emit("on-add-measure"),a.id){const S=Ye(i.custom),x={type:"cube-measure",data:{table:a.id,custom_measures:S}};ce.emit("on-change-config",x)}f()},h=v=>{r.currentCustom&&(l.value=JSON.parse(JSON.stringify(r.currentCustom)))},p=v=>{var w,S;let g=document.getElementById("txtInput");const y=g.selectionStart,_=g.selectionEnd;l.value.formula=((w=g.value)==null?void 0:w.substring(0,y))+v+((S=g.value)==null?void 0:S.substring(_)),g.selectionStart=g.selectionEnd=y+v.length,g.focus()},m=v=>{p(v)};return s.watch(()=>r.dialogVisible,(v,g)=>{h()}),(v,g)=>(s.openBlock(),s.createBlock(s.unref(R.Modal),s.mergeProps({mask:!0,maskClosable:!1,onOk:d,onCancel:f,width:600,destroyOnClose:""},v.$attrs,{centered:"",title:"Custom Measures",wrapClassName:"custom-measures"}),{footer:s.withCtx(()=>[s.renderSlot(v.$slots,"left"),one,s.createElementVNode("div",null,[s.createVNode(s.unref(R.Button),{onClick:f},{default:s.withCtx(()=>[sne]),_:1}),s.createVNode(s.unref(R.Button),{type:"primary",disabled:!s.unref(u),onClick:d},{default:s.withCtx(()=>[lne]),_:1},8,["disabled"])])]),default:s.withCtx(()=>[s.createElementVNode("div",Lre,[s.createElementVNode("div",Pre,[s.createElementVNode("div",Bre,[Ire,Rre,Vre,s.createVNode(s.unref(R.Tag),null,{default:s.withCtx(()=>[Fre]),_:1}),zre,s.createVNode(s.unref(R.Tag),null,{default:s.withCtx(()=>[Hre]),_:1}),Ure,s.createVNode(s.unref(R.Divider),{orientation:"left",plain:""},{default:s.withCtx(()=>[jre]),_:1}),s.createVNode(s.unref(R.Space),{class:"operate-content"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Button),{size:"small",shape:"round",onClick:g[0]||(g[0]=y=>m("+"))},{default:s.withCtx(()=>[Yre]),_:1}),s.createVNode(s.unref(R.Button),{size:"small",shape:"round",onClick:g[1]||(g[1]=y=>m("-"))},{default:s.withCtx(()=>[Gre]),_:1}),s.createVNode(s.unref(R.Button),{class:"middle",size:"small",shape:"round",onClick:g[2]||(g[2]=y=>m("*"))},{default:s.withCtx(()=>[Wre]),_:1}),s.createVNode(s.unref(R.Button),{size:"small",shape:"round",onClick:g[3]||(g[3]=y=>m("/"))},{default:s.withCtx(()=>[Zre]),_:1}),s.createVNode(s.unref(R.Button),{size:"small",shape:"round",onClick:g[4]||(g[4]=y=>m("("))},{default:s.withCtx(()=>[qre]),_:1}),s.createVNode(s.unref(R.Button),{size:"small",shape:"round",onClick:g[5]||(g[5]=y=>m(")"))},{default:s.withCtx(()=>[Xre]),_:1})]),_:1}),s.createVNode(s.unref(R.Divider),{orientation:"left",plain:""},{default:s.withCtx(()=>[Kre]),_:1}),s.createElementVNode("div",Jre,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(o),y=>(s.openBlock(),s.createBlock(s.unref(R.Button),{key:y,size:"small",shape:"round",onClick:_=>m(y)},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(y),1)]),_:2},1032,["onClick"]))),128))])]),s.createElementVNode("div",Qre,[s.createVNode(s.unref(R.Input),{placeholder:"Measure ID",disabled:"",value:l.value.id,"onUpdate:value":g[6]||(g[6]=y=>l.value.id=y)},null,8,["value"]),s.createVNode(s.unref(R.Input),{placeholder:"Measure Name",value:l.value.name,"onUpdate:value":g[7]||(g[7]=y=>l.value.name=y)},null,8,["value"]),s.createVNode(s.unref(R.Select),{placeholder:"Format",style:{width:"200px"},value:l.value.format,"onUpdate:value":g[8]||(g[8]=y=>l.value.format=y)},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Select).Option,{value:"0,0[.]00"},{default:s.withCtx(()=>[ene]),_:1}),s.createVNode(s.unref(R.Select).Option,{value:"0[.]00%"},{default:s.withCtx(()=>[tne]),_:1}),s.createVNode(s.unref(R.Select).Option,{value:"-1"},{default:s.withCtx(()=>[rne]),_:1})]),_:1},8,["value"])]),s.createElementVNode("div",nne,[ane,s.createVNode(s.unref(R.Switch),{size:"small",checked:l.value.score,"onUpdate:checked":g[9]||(g[9]=y=>l.value.score=y),onChange:c},null,8,["checked"])]),s.createElementVNode("div",ine,[s.createVNode(s.unref(R.Textarea),{allowClear:"",id:"txtInput",placeholder:"Formula",value:l.value.formula,"onUpdate:value":g[10]||(g[10]=y=>l.value.formula=y)},null,8,["value"])])])])]),_:3},16))}}),une={class:"mega-group-list mega-measure"},fne={class:"mega-group-list__header"},dne={class:"measure-count"},hne=s.createElementVNode("div",{class:"mega-list-title"},"Measures",-1),pne={class:"mega-search search-measure"},mne={class:"item-list"},vne=s.createTextVNode(" Set Measures "),gne=s.createElementVNode("span",null," Drag measures to sort, save the default measure order and the default selected measure. ",-1),yne=s.createTextVNode(" Restore Measures "),_ne=s.createElementVNode("span",null,"Restore the default measure order and the default selected measure.",-1),wne=s.createTextVNode(" Set Custom Measures "),bne=s.createElementVNode("span",null,"Save custom measures.",-1),Sne={class:"mega-group-list__body"},xne={class:"mega-group-list__item"},Cne=["onClick"],kne={key:1,class:"item__action"},Tne={class:"item__title"},Mne=["aria-label"],$ne={key:2,class:"item__info"},Nne={class:"mega-group-list__item-content"},Ene=s.createElementVNode("div",{class:"item__action"},null,-1),Ane={class:"item__title"},Dne={key:0,class:"item-info"},One=s.createTextVNode("Custom Measures"),Lne={class:"mega-group-list__item-content"},Pne=s.createElementVNode("div",{class:"item__action"},null,-1),Bne={class:"item__title"},Ine={class:"item__info"},Rne=s.defineComponent({props:{measures:{type:Array,default:()=>[]}},setup(t){const e=t,r=s.inject("currentState"),n=s.inject("dataConfig"),a=s.inject("cubeState"),i=s.computed(()=>["table","lineChart","barChart","lineChartHour"].includes(a.visual)),o=s.ref([]),l=s.ref(null),c=s.ref(""),u=s.ref(!1),f=()=>{u.value=!u.value,u.value&&s.nextTick(()=>{l.value.input.focus()})},d=A=>{A.target.value===""&&(u.value=!1)},h=s.computed(()=>{const A=c.value;return A?Ye(at(e.measures)).map(M=>(M.show=M.id.toLowerCase().includes(A.toLowerCase())||M.name.toLowerCase().includes(A.toLowerCase()),M)):e.measures}),p=A=>{const L=o.value.findIndex(M=>M===A);L===-1?o.value.push(A):o.value.splice(L,1)},m=s.ref(!1),v=()=>{if(m.value=!1,!a.id)return;const A=h.value.map(O=>O.id),L=[...a.measures],M={type:"cube",data:{table:a.id,detail:{measures:A,selected:L}}};ce.emit("on-change-config",M)},g=()=>{ce.emit("on-change-config",{type:"clear",data:{table:a.id}}),m.value=!1},y=()=>{if(a.id){const A=Ye(r.custom),L={type:"cube-measure",data:{table:a.id,custom_measures:A}};ce.emit("on-change-config",L)}m.value=!1},_=s.computed(()=>r.custom&&r.custom.length>0),w=s.ref(null),S=s.ref(null),x=s.ref(!1),b=()=>{w.value=null,x.value=!0},C=()=>{w.value=null,x.value=!1},k=A=>{w.value=te({},A),x.value=!0},$=A=>{var E,D,P;const L=n.dataCubes.find(I=>I.id===a.id);if(L&&L.custom_measures){const I=L.custom_measures.findIndex(V=>V.id===A.id);I>-1&&((E=L.custom_measures)==null||E.splice(I,1))}const M=r==null?void 0:r.custom.findIndex(I=>I.id===A.id);M>-1&&((D=r==null?void 0:r.custom)==null||D.splice(M,1));const O=a.measures.findIndex(I=>I===A.id);O>-1&&((P=a.measures)==null||P.splice(O,1));const T=Ye(r.custom);if(a.id){const I={type:"cube-measure",data:{table:a.id,custom_measures:T}};ce.emit("on-change-config",I)}if(a.custom_measures.includes(A.id)){const I=a.custom_measures.findIndex(V=>V===A.id);a.custom_measures.splice(I,1),ce.emit("on-remove-measure")}},N=A=>{var O;const L=A.target.checked,M=A.target.value;if(L)a.measures.push(M),ce.emit("on-add-measure");else{const T=a.measures.findIndex(E=>E===M);T>-1&&((O=a.measures)==null||O.splice(T,1)),ce.emit("on-remove-measure")}};return(A,L)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",une,[s.createElementVNode("div",fne,[s.createVNode(s.unref(E$)),s.createElementVNode("span",dne,s.toDisplayString(s.unref(a).measures.length),1),hne,s.createElementVNode("div",pne,[s.createVNode(s.unref(R.Input),{class:s.normalizeClass(["mega-search__input",{open:u.value}]),allowClear:"",ref_key:"inputRef",ref:l,value:c.value,"onUpdate:value":L[0]||(L[0]=M=>c.value=M),onBlur:L[1]||(L[1]=M=>d(M))},null,8,["class","value"]),s.createVNode(s.unref(R.Space),null,{default:s.withCtx(()=>[s.createVNode(s.unref(Ca),{onClick:f}),s.unref(i)?(s.openBlock(),s.createBlock(s.unref(M5),{key:0,onClick:b})):s.createCommentVNode("",!0),s.unref(i)?(s.openBlock(),s.createBlock(s.unref(R.Popover),{key:1,visible:m.value,"onUpdate:visible":L[2]||(L[2]=M=>m.value=M),placement:"bottomRight",trigger:"click",overlayClassName:"item-list-container clear-padding"},{content:s.withCtx(()=>[s.createElementVNode("ul",mne,[s.createElementVNode("li",{onClick:v},[s.createVNode(s.unref(R.Space),{class:"space-between"},{default:s.withCtx(()=>[vne,s.createVNode(s.unref(R.Tooltip),{placement:"right"},{title:s.withCtx(()=>[gne]),default:s.withCtx(()=>[s.createVNode(s.unref(zt))]),_:1})]),_:1})]),s.createElementVNode("li",{onClick:g},[s.createVNode(s.unref(R.Space),{class:"space-between"},{default:s.withCtx(()=>[yne,s.createVNode(s.unref(R.Tooltip),{placement:"right"},{title:s.withCtx(()=>[_ne]),default:s.withCtx(()=>[s.createVNode(s.unref(zt))]),_:1})]),_:1})]),s.createElementVNode("li",{onClick:y},[s.createVNode(s.unref(R.Space),{class:"space-between"},{default:s.withCtx(()=>[wne,s.createVNode(s.unref(R.Tooltip),{placement:"right"},{title:s.withCtx(()=>[bne]),default:s.withCtx(()=>[s.createVNode(s.unref(zt))]),_:1})]),_:1})])])]),default:s.withCtx(()=>[s.createVNode(s.unref(xd),{class:"cursor-pointer"})]),_:1},8,["visible"])):s.createCommentVNode("",!0)]),_:1})])]),s.createElementVNode("div",Sne,[s.createVNode(s.unref(R.CheckboxGroup),{value:s.unref(a).measures,style:{width:"100%"}},{default:s.withCtx(()=>[s.createVNode(s.unref(Sa.default),{sort:!0,"item-key":"id",list:s.unref(h),ghostClass:"sortable-ghost",dragClass:"sortable-drag","force-fallback":!0,"fallback-tolerance":5,"fallback-class":"mega-sortable-fallback",group:{name:"measureLeft",put:!1}},{item:s.withCtx(({element:M})=>{var O,T;return[s.withDirectives(s.createElementVNode("div",xne,[s.createElementVNode("div",{class:s.normalizeClass(["mega-group-list__item-content",{expanded:o.value.includes(M.id),node:(M==null?void 0:M.children)&&((O=M==null?void 0:M.children)==null?void 0:O.length)>0}])},[((T=M==null?void 0:M.children)==null?void 0:T.length)>0?(s.openBlock(),s.createElementBlock("div",{key:0,class:"item__action",onClick:E=>p(M.id)},[o.value.includes(M.id)?(s.openBlock(),s.createBlock(s.unref(kd),{key:0})):(s.openBlock(),s.createBlock(s.unref(x0),{key:1}))],8,Cne)):(s.openBlock(),s.createElementBlock("div",kne)),s.createElementVNode("div",Tne,[M.group?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.unref(R.Checkbox),{key:0,value:M.id,onChange:N},null,8,["value"])),s.createElementVNode("div",{class:"item__title__label","aria-label":M.name},s.toDisplayString(M.name),9,Mne)]),M.help?(s.openBlock(),s.createElementBlock("div",$ne,[s.createVNode(s.unref(R.Tooltip),{placement:"right"},{title:s.withCtx(()=>[s.createElementVNode("span",null,s.toDisplayString(M.help),1)]),default:s.withCtx(()=>[s.createVNode(s.unref(zt))]),_:2},1024)])):s.createCommentVNode("",!0)],2),(M==null?void 0:M.children)&&(M==null?void 0:M.children.length)>0?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["mega-group-list__sub",{expanded:o.value.includes(M.id)}])},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(M.children,E=>(s.openBlock(),s.createElementBlock("div",{class:"mega-group-list__item",key:E.id},[s.createElementVNode("div",Nne,[Ene,s.createElementVNode("div",Ane,[E.group?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.unref(R.Checkbox),{key:0,value:E.id,onChange:N},null,8,["value"])),s.createTextVNode(" "+s.toDisplayString(E.name),1)]),E.help?(s.openBlock(),s.createElementBlock("div",Dne,[s.createVNode(s.unref(R.Tooltip),{placement:"right"},{title:s.withCtx(()=>[s.createElementVNode("span",null,s.toDisplayString(M.help),1)]),default:s.withCtx(()=>[s.createVNode(s.unref(zt))]),_:2},1024)])):s.createCommentVNode("",!0)])]))),128))],2)):s.createCommentVNode("",!0)],512),[[s.vShow,(M==null?void 0:M.show)!==!1]])]}),_:1},8,["list"])]),_:1},8,["value"]),s.unref(_)?(s.openBlock(),s.createBlock(s.unref(R.Divider),{key:0,class:"we-divider"},{default:s.withCtx(()=>[One]),_:1})):s.createCommentVNode("",!0),s.unref(_)?(s.openBlock(),s.createBlock(s.unref(R.CheckboxGroup),{key:1,disabled:!s.unref(i),value:s.unref(a).custom_measures,"onUpdate:value":L[3]||(L[3]=M=>s.unref(a).custom_measures=M),style:{width:"100%"}},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(r).custom,M=>(s.openBlock(),s.createElementBlock("div",{key:M.id,class:"mega-group-list__item custom-measure"},[s.createElementVNode("div",Lne,[Pne,s.createElementVNode("div",Bne,[s.createVNode(s.unref(R.Checkbox),{value:M.id,onChange:N},null,8,["value"]),s.createVNode(s.unref(R.Tooltip),{placement:"top"},{title:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(M.formula),1)]),default:s.withCtx(()=>[s.createTextVNode(" "+s.toDisplayString(M.name),1)]),_:2},1024)]),s.createElementVNode("div",Ine,[s.unref(i)?(s.openBlock(),s.createBlock(s.unref(R.Space),{key:0},{default:s.withCtx(()=>[s.createVNode(s.unref(Vl),{onClick:s.withModifiers(O=>k(M),["stop"])},null,8,["onClick"]),s.createVNode(s.unref(Po),{onClick:s.withModifiers(O=>$(M),["stop"])},null,8,["onClick"])]),_:2},1024)):s.createCommentVNode("",!0)])])]))),128))]),_:1},8,["disabled","value"])):s.createCommentVNode("",!0)])]),s.createVNode(cne,{visible:x.value,dialogVisible:x.value,currentCustom:w.value,ref_key:"customMeasureRef",ref:S,onOnCancel:C},null,8,["visible","dialogVisible","currentCustom"])],64))}}),Vne={class:"mega-add-dimension"},Fne={class:"add-title"},zne={key:0,class:"mega-search-list"},Hne=["onClick"],Une={class:"add-search"},tM=s.defineComponent({props:{title:{type:String,default:""},type:{type:String,default:"filter"}},emits:["onAdd"],setup(t,{emit:e}){const r=t,n=s.inject("currentState"),a=s.inject("cubeState"),i=s.ref(""),o=s.computed(()=>{const u=i.value,f=at(n.cube.dimensions),d=a.filters.map(m=>m.id),h=a.splits.map(m=>m.id);let p=[];return r.type==="filter"?p=f.filter(m=>!d.includes(m.id)):p=f.filter(m=>!h.includes(m.id)),u?p.filter(m=>m.id.toLowerCase().includes(u.toLowerCase())||m.name.toLowerCase().includes(u.toLowerCase())):p}),l=s.ref(!1),c=u=>{e("onAdd",{dimension:u,type:r.type}),l.value=!1};return(u,f)=>(s.openBlock(),s.createElementBlock("div",Vne,[s.createElementVNode("span",Fne,s.toDisplayString(t.title),1),s.createVNode(s.unref(R.Popover),{visible:l.value,"onUpdate:visible":f[1]||(f[1]=d=>l.value=d),placement:"bottomLeft",trigger:"click",overlayClassName:"mega-add-dimension"},{content:s.withCtx(()=>[s.unref(o).length>0?(s.openBlock(),s.createElementBlock("ul",zne,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(o),d=>(s.openBlock(),s.createElementBlock("li",{key:d.id,onClick:h=>c(d)},s.toDisplayString(d.name),9,Hne))),128))])):(s.openBlock(),s.createBlock(lr,{key:1}))]),title:s.withCtx(()=>[s.createElementVNode("div",Une,[s.createVNode(s.unref(R.Input),{placeholder:"Search Key",ref:"inputRef",allowClear:"",value:i.value,"onUpdate:value":f[0]||(f[0]=d=>i.value=d)},{prefix:s.withCtx(()=>[s.createVNode(s.unref(Ca))]),_:1},8,["value"])])]),default:s.withCtx(()=>[s.createVNode(s.unref(yd),{class:"add-icon"})]),_:1},8,["visible"])]))}}),jne={class:"filter-string"},Yne={class:"filter-string__header"},Gne={class:"filter-string__body"},Wne={key:2},Zne=["attr-id"],qne=["innerHTML"],Xne=["innerHTML"],Kne={class:"filter-string__footer"},Jne=s.createTextVNode("Cancel"),Qne=s.createTextVNode("OK"),rM=s.defineComponent({props:{dimension:{type:Object,default:null},visible:{type:Boolean,default:!1},cube:{type:Object,default:null},filterState:{type:Object,default:null}},emits:["onCancel","onOk"],setup(t,{emit:e}){const r=t,n=s.computed(()=>{const C=at(r.cube.dimensions),k=Xo(C,{id:r.dimension.id});return k!=null?k:r.dimension}),a=s.reactive({list:[],select:[],search:"",filter_type:"include",input:"",showInput:!1}),i=(C,k)=>{const $=k[r.dimension.id];if(C.target.checked){if(a.select.includes($))return;a.select.push($)}else{const N=a.select.findIndex(A=>A===k[r.dimension.id]);N!==-1&&a.select.splice(N,1)}},o=s.computed(()=>a.list),{list:l,containerProps:c,wrapperProps:u,scrollTo:f}=L_(o,{itemHeight:26}),d=[{label:"Include",value:"include"},{label:"Exclude",value:"exclude"}],h=s.inject("getAuth"),p=s.inject("getHeader"),m=s.ref(!1),v=s.ref(null),g=()=>{m.value=!0,a.list=[],v.value=Xl();const C=$I(r.cube,r.dimension,r.filterState.timezone,r.filterState.range.current_time,r.filterState.range.previous_time,r.filterState.filters,a.search),k=r.cube.data_cube_id,$=r.cube.data_set_id,N=h();v.value.request("filter",C,te({data_cube_id:k,trans_data_set_id:$},N),te({},p())).then(A=>{m.value=!1;let L=(A==null?void 0:A.data)||[];const M=a.select.map(T=>{var D,P,I,V,F,H;const E={[r.dimension.id]:T};if((P=(D=n.value)==null?void 0:D.map)==null?void 0:P.name){const Y=Xo(L,{[r.dimension.id]:T});E[(V=(I=n.value)==null?void 0:I.map)==null?void 0:V.name]=Y?Y[(H=(F=n.value)==null?void 0:F.map)==null?void 0:H.name]:T}return E}),O=L.filter(T=>!a.select.includes(T[r.dimension.id]));L=[...M,...O],a.list=L,s.nextTick(()=>{f(0)})},A=>{(A==null?void 0:A.message)!=="cancel"&&(m.value=!1)})},y=a1(()=>{var C;(m.value||v.value)&&((C=v.value)==null||C.cancel(),m.value=!1),g()},300),_=C=>{if(C.target.checked){const k=a.list.map($=>$[r.dimension.id]);a.select=k}else a.select=[]},w=()=>{var C;a.showInput=!a.showInput,a.showInput&&m.value&&((C=v.value)==null||C.cancel(),m.value=!1),!a.showInput&&a.list.length===0&&y()},S=()=>{e("onCancel",r.dimension.id)},x=()=>{let C=[];if(a.showInput?C=a.input.split(`
159
+ `).filter(k=>k.trim()!=="").map(k=>n.value.kind==="number"?Number(k.trim()):n.value.kind==="string"?k.trim():k):C=[...a.select],C.length===0){R.message.error("Please select or enter filter items.");return}e("onOk",{id:r.dimension.id,filter_type:a.filter_type,select:C,search:a.search})};s.watch(()=>r.visible,(C,k)=>{var $;!C&&m.value&&(($=v.value)==null||$.cancel(),m.value=!1)},{immediate:!0});const b=()=>{var k,$;const C=Ye((k=r.filterState)==null?void 0:k.filters.find(N=>N.id===r.dimension.id));(C==null?void 0:C.filter_type)&&(a.filter_type=C.filter_type,a.select=C.select,a.search=($=C==null?void 0:C.search)!=null?$:""),y()};return s.onMounted(()=>{b()}),(C,k)=>(s.openBlock(),s.createElementBlock("div",jne,[s.createElementVNode("div",Yne,[s.createVNode(s.unref(R.Space),null,{default:s.withCtx(()=>[s.createVNode(s.unref(R.Input),{placeholder:"Search key",style:{width:"170px"},"allow-clear":"",value:s.unref(a).search,"onUpdate:value":k[0]||(k[0]=$=>s.unref(a).search=$),onPressEnter:g,onChange:s.unref(y),disabled:s.unref(a).showInput},{prefix:s.withCtx(()=>[s.createVNode(s.unref(Ca))]),_:1},8,["value","onChange","disabled"]),s.createVNode(s.unref(R.Select),{getPopupContainer:$=>$.parentNode,style:{width:"92px"},value:s.unref(a).filter_type,"onUpdate:value":k[1]||(k[1]=$=>s.unref(a).filter_type=$),options:d},null,8,["getPopupContainer","value"]),s.createVNode(s.unref(A5),{class:"cursor-pointer",onClick:w})]),_:1})]),s.createVNode(s.unref(R.Spin),{spinning:m.value},{default:s.withCtx(()=>{var $;return[s.createElementVNode("div",Gne,[s.unref(a).showInput?(s.openBlock(),s.createBlock(s.unref(R.Textarea),{key:0,placeholder:"Paste values separated by newlines",value:s.unref(a).input,"onUpdate:value":k[2]||(k[2]=N=>s.unref(a).input=N),style:{height:"254px"}},null,8,["value"])):s.createCommentVNode("",!0),!s.unref(a).showInput&&s.unref(a).list.length===0&&!m.value?(s.openBlock(),s.createBlock(lr,{key:1,msg:"No data available!"})):s.createCommentVNode("",!0),!s.unref(a).showInput&&(($=s.unref(a).list)==null?void 0:$.length)>0?(s.openBlock(),s.createElementBlock("div",Wne,[s.createElementVNode("div",s.mergeProps(s.unref(c),{class:"virtual-list"}),[s.createElementVNode("div",s.normalizeProps(s.guardReactiveProps(s.unref(u))),[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(l),N=>(s.openBlock(),s.createElementBlock("div",{class:"virtual-item","attr-id":N.data[t.dimension.id],key:N.index},[s.createVNode(s.unref(R.Checkbox),{checked:s.unref(a).select.includes(N.data[t.dimension.id]),value:N.data[t.dimension.id],onChange:A=>i(A,N.data)},{default:s.withCtx(()=>{var A,L,M,O;return[s.unref(tA)(N.data[((L=(A=s.unref(n))==null?void 0:A.map)==null?void 0:L.name)||t.dimension.id])>=40?(s.openBlock(),s.createBlock(s.unref(R.Tooltip),{key:0,placement:"top"},{title:s.withCtx(()=>{var T,E;return[s.createTextVNode(s.toDisplayString(N.data[((E=(T=s.unref(n))==null?void 0:T.map)==null?void 0:E.name)||t.dimension.id]),1)]}),default:s.withCtx(()=>{var T,E;return[s.createElementVNode("div",{class:"filter-title",innerHTML:s.unref(M0)(N.data[((E=(T=s.unref(n))==null?void 0:T.map)==null?void 0:E.name)||t.dimension.id],s.unref(a).search)},null,8,qne)]}),_:2},1024)):(s.openBlock(),s.createElementBlock("span",{key:1,innerHTML:s.unref(M0)(N.data[((O=(M=s.unref(n))==null?void 0:M.map)==null?void 0:O.name)||t.dimension.id],s.unref(a).search)},null,8,Xne))]}),_:2},1032,["checked","value","onChange"])],8,Zne))),128))],16)],16)])):s.createCommentVNode("",!0)])]}),_:1},8,["spinning"]),s.createElementVNode("div",Kne,[s.createVNode(s.unref(R.Checkbox),{disabled:s.unref(a).showInput,onChange:_},{default:s.withCtx(()=>[s.createTextVNode("Select All ("+s.toDisplayString(s.unref(a).select.length)+")",1)]),_:1},8,["disabled"]),s.createElementVNode("div",null,[s.createVNode(s.unref(R.Button),{type:"link",onClick:S},{default:s.withCtx(()=>[Jne]),_:1}),s.createVNode(s.unref(R.Button),{type:"primary",onClick:x},{default:s.withCtx(()=>[Qne]),_:1})])])]))}});var ba=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},nM={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ba,function(){var r=1e3,n=6e4,a=36e5,i="millisecond",o="second",l="minute",c="hour",u="day",f="week",d="month",h="quarter",p="year",m="date",v="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},w=function(M,O,T){var E=String(M);return!E||E.length>=O?M:""+Array(O+1-E.length).join(T)+M},S={s:w,z:function(M){var O=-M.utcOffset(),T=Math.abs(O),E=Math.floor(T/60),D=T%60;return(O<=0?"+":"-")+w(E,2,"0")+":"+w(D,2,"0")},m:function M(O,T){if(O.date()<T.date())return-M(T,O);var E=12*(T.year()-O.year())+(T.month()-O.month()),D=O.clone().add(E,d),P=T-D<0,I=O.clone().add(E+(P?-1:1),d);return+(-(E+(T-D)/(P?D-I:I-D))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:d,y:p,w:f,d:u,D:m,h:c,m:l,s:o,ms:i,Q:h}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},x="en",b={};b[x]=_;var C=function(M){return M instanceof A},k=function(M,O,T){var E;if(!M)return x;if(typeof M=="string")b[M]&&(E=M),O&&(b[M]=O,E=M);else{var D=M.name;b[D]=M,E=D}return!T&&E&&(x=E),E||!T&&x},$=function(M,O){if(C(M))return M.clone();var T=typeof O=="object"?O:{};return T.date=M,T.args=arguments,new A(T)},N=S;N.l=k,N.i=C,N.w=function(M,O){return $(M,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var A=function(){function M(T){this.$L=k(T.locale,null,!0),this.parse(T)}var O=M.prototype;return O.parse=function(T){this.$d=function(E){var D=E.date,P=E.utc;if(D===null)return new Date(NaN);if(N.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var I=D.match(g);if(I){var V=I[2]-1||0,F=(I[7]||"0").substring(0,3);return P?new Date(Date.UTC(I[1],V,I[3]||1,I[4]||0,I[5]||0,I[6]||0,F)):new Date(I[1],V,I[3]||1,I[4]||0,I[5]||0,I[6]||0,F)}}return new Date(D)}(T),this.$x=T.x||{},this.init()},O.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},O.$utils=function(){return N},O.isValid=function(){return this.$d.toString()!==v},O.isSame=function(T,E){var D=$(T);return this.startOf(E)<=D&&D<=this.endOf(E)},O.isAfter=function(T,E){return $(T)<this.startOf(E)},O.isBefore=function(T,E){return this.endOf(E)<$(T)},O.$g=function(T,E,D){return N.u(T)?this[E]:this.set(D,T)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(T,E){var D=this,P=!!N.u(E)||E,I=N.p(T),V=function(de,Z){var K=N.w(D.$u?Date.UTC(D.$y,Z,de):new Date(D.$y,Z,de),D);return P?K:K.endOf(u)},F=function(de,Z){return N.w(D.toDate()[de].apply(D.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(Z)),D)},H=this.$W,Y=this.$M,Q=this.$D,ae="set"+(this.$u?"UTC":"");switch(I){case p:return P?V(1,0):V(31,11);case d:return P?V(1,Y):V(0,Y+1);case f:var le=this.$locale().weekStart||0,ye=(H<le?H+7:H)-le;return V(P?Q-ye:Q+(6-ye),Y);case u:case m:return F(ae+"Hours",0);case c:return F(ae+"Minutes",1);case l:return F(ae+"Seconds",2);case o:return F(ae+"Milliseconds",3);default:return this.clone()}},O.endOf=function(T){return this.startOf(T,!1)},O.$set=function(T,E){var D,P=N.p(T),I="set"+(this.$u?"UTC":""),V=(D={},D[u]=I+"Date",D[m]=I+"Date",D[d]=I+"Month",D[p]=I+"FullYear",D[c]=I+"Hours",D[l]=I+"Minutes",D[o]=I+"Seconds",D[i]=I+"Milliseconds",D)[P],F=P===u?this.$D+(E-this.$W):E;if(P===d||P===p){var H=this.clone().set(m,1);H.$d[V](F),H.init(),this.$d=H.set(m,Math.min(this.$D,H.daysInMonth())).$d}else V&&this.$d[V](F);return this.init(),this},O.set=function(T,E){return this.clone().$set(T,E)},O.get=function(T){return this[N.p(T)]()},O.add=function(T,E){var D,P=this;T=Number(T);var I=N.p(E),V=function(Y){var Q=$(P);return N.w(Q.date(Q.date()+Math.round(Y*T)),P)};if(I===d)return this.set(d,this.$M+T);if(I===p)return this.set(p,this.$y+T);if(I===u)return V(1);if(I===f)return V(7);var F=(D={},D[l]=n,D[c]=a,D[o]=r,D)[I]||1,H=this.$d.getTime()+T*F;return N.w(H,this)},O.subtract=function(T,E){return this.add(-1*T,E)},O.format=function(T){var E=this,D=this.$locale();if(!this.isValid())return D.invalidDate||v;var P=T||"YYYY-MM-DDTHH:mm:ssZ",I=N.z(this),V=this.$H,F=this.$m,H=this.$M,Y=D.weekdays,Q=D.months,ae=function(Z,K,J,oe){return Z&&(Z[K]||Z(E,P))||J[K].substr(0,oe)},le=function(Z){return N.s(V%12||12,Z,"0")},ye=D.meridiem||function(Z,K,J){var oe=Z<12?"AM":"PM";return J?oe.toLowerCase():oe},de={YY:String(this.$y).slice(-2),YYYY:this.$y,M:H+1,MM:N.s(H+1,2,"0"),MMM:ae(D.monthsShort,H,Q,3),MMMM:ae(Q,H),D:this.$D,DD:N.s(this.$D,2,"0"),d:String(this.$W),dd:ae(D.weekdaysMin,this.$W,Y,2),ddd:ae(D.weekdaysShort,this.$W,Y,3),dddd:Y[this.$W],H:String(V),HH:N.s(V,2,"0"),h:le(1),hh:le(2),a:ye(V,F,!0),A:ye(V,F,!1),m:String(F),mm:N.s(F,2,"0"),s:String(this.$s),ss:N.s(this.$s,2,"0"),SSS:N.s(this.$ms,3,"0"),Z:I};return P.replace(y,function(Z,K){return K||de[Z]||I.replace(":","")})},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(T,E,D){var P,I=N.p(E),V=$(T),F=(V.utcOffset()-this.utcOffset())*n,H=this-V,Y=N.m(this,V);return Y=(P={},P[p]=Y/12,P[d]=Y,P[h]=Y/3,P[f]=(H-F)/6048e5,P[u]=(H-F)/864e5,P[c]=H/a,P[l]=H/n,P[o]=H/r,P)[I]||H,D?Y:N.a(Y)},O.daysInMonth=function(){return this.endOf(d).$D},O.$locale=function(){return b[this.$L]},O.locale=function(T,E){if(!T)return this.$L;var D=this.clone(),P=k(T,E,!0);return P&&(D.$L=P),D},O.clone=function(){return N.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},M}(),L=A.prototype;return $.prototype=L,[["$ms",i],["$s",o],["$m",l],["$H",c],["$W",u],["$M",d],["$y",p],["$D",m]].forEach(function(M){L[M[1]]=function(O){return this.$g(O,M[0],M[1])}}),$.extend=function(M,O){return M.$i||(M(O,A,$),M.$i=!0),$},$.locale=k,$.isDayjs=C,$.unix=function(M){return $(1e3*M)},$.en=b[x],$.Ls=b,$.p={},$})})(nM);var ee=nM.exports,aM={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ba,function(){return function(r,n,a){var i=n.prototype,o=function(d){return d&&(d.indexOf?d:d.s)},l=function(d,h,p,m,v){var g=d.name?d:d.$locale(),y=o(g[h]),_=o(g[p]),w=y||_.map(function(x){return x.substr(0,m)});if(!v)return w;var S=g.weekStart;return w.map(function(x,b){return w[(b+(S||0))%7]})},c=function(){return a.Ls[a.locale()]},u=function(d,h){return d.formats[h]||function(p){return p.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(m,v,g){return v||g.slice(1)})}(d.formats[h.toUpperCase()])},f=function(){var d=this;return{months:function(h){return h?h.format("MMMM"):l(d,"months")},monthsShort:function(h){return h?h.format("MMM"):l(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):l(d,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):l(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):l(d,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return u(d.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.localeData=function(){return f.bind(this)()},a.localeData=function(){var d=c();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return a.weekdays()},weekdaysShort:function(){return a.weekdaysShort()},weekdaysMin:function(){return a.weekdaysMin()},months:function(){return a.months()},monthsShort:function(){return a.monthsShort()},longDateFormat:function(h){return u(d,h)},meridiem:d.meridiem,ordinal:d.ordinal}},a.months=function(){return l(c(),"months")},a.monthsShort=function(){return l(c(),"monthsShort","months",3)},a.weekdays=function(d){return l(c(),"weekdays",null,null,d)},a.weekdaysShort=function(d){return l(c(),"weekdaysShort","weekdays",3,d)},a.weekdaysMin=function(d){return l(c(),"weekdaysMin","weekdays",2,d)}}})})(aM);var iM=aM.exports,oM={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ba,function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(n,a,i){var o=a.prototype,l=o.format;i.en.formats=r,o.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,f=function(d,h){return d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(p,m,v){var g=v&&v.toUpperCase();return m||h[v]||r[v]||h[g].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(y,_,w){return _||w.slice(1)})})}(c,u===void 0?{}:u);return l.call(this,f)}}})})(oM);var sM=oM.exports,lM={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ba,function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d\d/,i=/\d\d?/,o=/\d*[^\s\d-_:/()]+/,l={},c=function(v){return(v=+v)+(v>68?1900:2e3)},u=function(v){return function(g){this[v]=+g}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(g){if(!g||g==="Z")return 0;var y=g.match(/([+-]|\d\d)/g),_=60*y[1]+(+y[2]||0);return _===0?0:y[0]==="+"?-_:_}(v)}],d=function(v){var g=l[v];return g&&(g.indexOf?g:g.s.concat(g.f))},h=function(v,g){var y,_=l.meridiem;if(_){for(var w=1;w<=24;w+=1)if(v.indexOf(_(w,0,g))>-1){y=w>12;break}}else y=v===(g?"pm":"PM");return y},p={A:[o,function(v){this.afternoon=h(v,!1)}],a:[o,function(v){this.afternoon=h(v,!0)}],S:[/\d/,function(v){this.milliseconds=100*+v}],SS:[a,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[i,u("seconds")],ss:[i,u("seconds")],m:[i,u("minutes")],mm:[i,u("minutes")],H:[i,u("hours")],h:[i,u("hours")],HH:[i,u("hours")],hh:[i,u("hours")],D:[i,u("day")],DD:[a,u("day")],Do:[o,function(v){var g=l.ordinal,y=v.match(/\d+/);if(this.day=y[0],g)for(var _=1;_<=31;_+=1)g(_).replace(/\[|\]/g,"")===v&&(this.day=_)}],M:[i,u("month")],MM:[a,u("month")],MMM:[o,function(v){var g=d("months"),y=(d("monthsShort")||g.map(function(_){return _.substr(0,3)})).indexOf(v)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[o,function(v){var g=d("months").indexOf(v)+1;if(g<1)throw new Error;this.month=g%12||g}],Y:[/[+-]?\d+/,u("year")],YY:[a,function(v){this.year=c(v)}],YYYY:[/\d{4}/,u("year")],Z:f,ZZ:f};function m(v){var g,y;g=v,y=l&&l.formats;for(var _=(v=g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,N,A){var L=A&&A.toUpperCase();return N||y[A]||r[A]||y[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(M,O,T){return O||T.slice(1)})})).match(n),w=_.length,S=0;S<w;S+=1){var x=_[S],b=p[x],C=b&&b[0],k=b&&b[1];_[S]=k?{regex:C,parser:k}:x.replace(/^\[|\]$/g,"")}return function($){for(var N={},A=0,L=0;A<w;A+=1){var M=_[A];if(typeof M=="string")L+=M.length;else{var O=M.regex,T=M.parser,E=$.substr(L),D=O.exec(E)[0];T.call(N,D),$=$.replace(D,"")}}return function(P){var I=P.afternoon;if(I!==void 0){var V=P.hours;I?V<12&&(P.hours+=12):V===12&&(P.hours=0),delete P.afternoon}}(N),N}}return function(v,g,y){y.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(c=v.parseTwoDigitYear);var _=g.prototype,w=_.parse;_.parse=function(S){var x=S.date,b=S.utc,C=S.args;this.$u=b;var k=C[1];if(typeof k=="string"){var $=C[2]===!0,N=C[3]===!0,A=$||N,L=C[2];N&&(L=C[2]),l=this.$locale(),!$&&L&&(l=y.Ls[L]),this.$d=function(E,D,P){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*E);var I=m(D)(E),V=I.year,F=I.month,H=I.day,Y=I.hours,Q=I.minutes,ae=I.seconds,le=I.milliseconds,ye=I.zone,de=new Date,Z=H||(V||F?1:de.getDate()),K=V||de.getFullYear(),J=0;V&&!F||(J=F>0?F-1:de.getMonth());var oe=Y||0,Ce=Q||0,Se=ae||0,$e=le||0;return ye?new Date(Date.UTC(K,J,Z,oe,Ce,Se,$e+60*ye.offset*1e3)):P?new Date(Date.UTC(K,J,Z,oe,Ce,Se,$e)):new Date(K,J,Z,oe,Ce,Se,$e)}catch{return new Date("")}}(x,k,b),this.init(),L&&L!==!0&&(this.$L=this.locale(L).$L),A&&x!=this.format(k)&&(this.$d=new Date("")),l={}}else if(k instanceof Array)for(var M=k.length,O=1;O<=M;O+=1){C[1]=k[O-1];var T=y.apply(this,C);if(T.isValid()){this.$d=T.$d,this.$L=T.$L,this.init();break}O===M&&(this.$d=new Date(""))}else w.call(this,S)}}})})(lM);var cM=lM.exports,uM={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ba,function(){return function(r,n,a){n.prototype.isToday=function(){var i="YYYY-MM-DD",o=a();return this.format(i)===o.format(i)}}})})(uM);var fM=uM.exports,dM={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ba,function(){var r="minute",n=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(i,o,l){var c=o.prototype;l.utc=function(v){var g={date:v,utc:!0,args:arguments};return new o(g)},c.utc=function(v){var g=l(this.toDate(),{locale:this.$L,utc:!0});return v?g.add(this.utcOffset(),r):g},c.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var u=c.parse;c.parse=function(v){v.utc&&(this.$u=!0),this.$utils().u(v.$offset)||(this.$offset=v.$offset),u.call(this,v)};var f=c.init;c.init=function(){if(this.$u){var v=this.$d;this.$y=v.getUTCFullYear(),this.$M=v.getUTCMonth(),this.$D=v.getUTCDate(),this.$W=v.getUTCDay(),this.$H=v.getUTCHours(),this.$m=v.getUTCMinutes(),this.$s=v.getUTCSeconds(),this.$ms=v.getUTCMilliseconds()}else f.call(this)};var d=c.utcOffset;c.utcOffset=function(v,g){var y=this.$utils().u;if(y(v))return this.$u?0:y(this.$offset)?d.call(this):this.$offset;if(typeof v=="string"&&(v=function(x){x===void 0&&(x="");var b=x.match(n);if(!b)return null;var C=(""+b[0]).match(a)||["-",0,0],k=C[0],$=60*+C[1]+ +C[2];return $===0?0:k==="+"?$:-$}(v))===null)return this;var _=Math.abs(v)<=16?60*v:v,w=this;if(g)return w.$offset=_,w.$u=v===0,w;if(v!==0){var S=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(w=this.local().add(_+S,r)).$offset=_,w.$x.$localOffset=S}else w=this.utc();return w};var h=c.format;c.format=function(v){var g=v||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,g)},c.valueOf=function(){var v=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||new Date().getTimezoneOffset());return this.$d.valueOf()-6e4*v},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var p=c.toDate;c.toDate=function(v){return v==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var m=c.diff;c.diff=function(v,g,y){if(v&&this.$u===v.$u)return m.call(this,v,g,y);var _=this.local(),w=l(v).local();return m.call(_,w,g,y)}}})})(dM);var eae=dM.exports,hM={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ba,function(){return function(r,n,a){n.prototype.isBetween=function(i,o,l,c){var u=a(i),f=a(o),d=(c=c||"()")[0]==="(",h=c[1]===")";return(d?this.isAfter(u,l):!this.isBefore(u,l))&&(h?this.isBefore(f,l):!this.isAfter(f,l))||(d?this.isBefore(u,l):!this.isAfter(u,l))&&(h?this.isAfter(f,l):!this.isBefore(f,l))}}})})(hM);var pM=hM.exports,mM={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ba,function(){var r,n,a=1e3,i=6e4,o=36e5,l=864e5,c=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,f=2592e6,d=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:u,months:f,days:l,hours:o,minutes:i,seconds:a,milliseconds:1,weeks:6048e5},p=function(x){return x instanceof S},m=function(x,b,C){return new S(x,C,b.$l)},v=function(x){return n.p(x)+"s"},g=function(x){return x<0},y=function(x){return g(x)?Math.ceil(x):Math.floor(x)},_=function(x){return Math.abs(x)},w=function(x,b){return x?g(x)?{negative:!0,format:""+_(x)+b}:{negative:!1,format:""+x+b}:{negative:!1,format:""}},S=function(){function x(C,k,$){var N=this;if(this.$d={},this.$l=$,C===void 0&&(this.$ms=0,this.parseFromMilliseconds()),k)return m(C*h[v(k)],this);if(typeof C=="number")return this.$ms=C,this.parseFromMilliseconds(),this;if(typeof C=="object")return Object.keys(C).forEach(function(M){N.$d[v(M)]=C[M]}),this.calMilliseconds(),this;if(typeof C=="string"){var A=C.match(d);if(A){var L=A.slice(2).map(function(M){return M!=null?Number(M):0});return this.$d.years=L[0],this.$d.months=L[1],this.$d.weeks=L[2],this.$d.days=L[3],this.$d.hours=L[4],this.$d.minutes=L[5],this.$d.seconds=L[6],this.calMilliseconds(),this}}return this}var b=x.prototype;return b.calMilliseconds=function(){var C=this;this.$ms=Object.keys(this.$d).reduce(function(k,$){return k+(C.$d[$]||0)*h[$]},0)},b.parseFromMilliseconds=function(){var C=this.$ms;this.$d.years=y(C/u),C%=u,this.$d.months=y(C/f),C%=f,this.$d.days=y(C/l),C%=l,this.$d.hours=y(C/o),C%=o,this.$d.minutes=y(C/i),C%=i,this.$d.seconds=y(C/a),C%=a,this.$d.milliseconds=C},b.toISOString=function(){var C=w(this.$d.years,"Y"),k=w(this.$d.months,"M"),$=+this.$d.days||0;this.$d.weeks&&($+=7*this.$d.weeks);var N=w($,"D"),A=w(this.$d.hours,"H"),L=w(this.$d.minutes,"M"),M=this.$d.seconds||0;this.$d.milliseconds&&(M+=this.$d.milliseconds/1e3);var O=w(M,"S"),T=C.negative||k.negative||N.negative||A.negative||L.negative||O.negative,E=A.format||L.format||O.format?"T":"",D=(T?"-":"")+"P"+C.format+k.format+N.format+E+A.format+L.format+O.format;return D==="P"||D==="-P"?"P0D":D},b.toJSON=function(){return this.toISOString()},b.format=function(C){var k=C||"YYYY-MM-DDTHH:mm:ss",$={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return k.replace(c,function(N,A){return A||String($[N])})},b.as=function(C){return this.$ms/h[v(C)]},b.get=function(C){var k=this.$ms,$=v(C);return $==="milliseconds"?k%=1e3:k=$==="weeks"?y(k/h[$]):this.$d[$],k===0?0:k},b.add=function(C,k,$){var N;return N=k?C*h[v(k)]:p(C)?C.$ms:m(C,this).$ms,m(this.$ms+N*($?-1:1),this)},b.subtract=function(C,k){return this.add(C,k,!0)},b.locale=function(C){var k=this.clone();return k.$l=C,k},b.clone=function(){return m(this.$ms,this)},b.humanize=function(C){return r().add(this.$ms,"ms").locale(this.$l).fromNow(!C)},b.milliseconds=function(){return this.get("milliseconds")},b.asMilliseconds=function(){return this.as("milliseconds")},b.seconds=function(){return this.get("seconds")},b.asSeconds=function(){return this.as("seconds")},b.minutes=function(){return this.get("minutes")},b.asMinutes=function(){return this.as("minutes")},b.hours=function(){return this.get("hours")},b.asHours=function(){return this.as("hours")},b.days=function(){return this.get("days")},b.asDays=function(){return this.as("days")},b.weeks=function(){return this.get("weeks")},b.asWeeks=function(){return this.as("weeks")},b.months=function(){return this.get("months")},b.asMonths=function(){return this.as("months")},b.years=function(){return this.get("years")},b.asYears=function(){return this.as("years")},x}();return function(x,b,C){r=C,n=C().$utils(),C.duration=function(N,A){var L=C.locale();return m(N,{$l:L},A)},C.isDuration=p;var k=b.prototype.add,$=b.prototype.subtract;b.prototype.add=function(N,A){return p(N)&&(N=N.asMilliseconds()),k.bind(this)(N,A)},b.prototype.subtract=function(N,A){return p(N)&&(N=N.asMilliseconds()),$.bind(this)(N,A)}}})})(mM);var vM=mM.exports;const i0=t=>{const e=[];for(let r=0;r<=t.date(0).day();r++)e.push(t.date(0).subtract(r,"day"));return e.sort((r,n)=>r.date()-n.date())},gM=t=>Array.from({length:t.daysInMonth()},(e,r)=>t.date(r+1)),yM=t=>{const e=[];for(let r=1;r<=42-(i0(t).length+t.daysInMonth());r++)e.push(t.date(r).month(t.month()).add(1,"month"));return e},_M=(t,{disableDate:e})=>typeof e=="function"?e(t.toDate()):!1,tae=(t,{previous:e,next:r})=>{let n;return e.isAfter(r,"date")?n="(]":n="[)",!!(t.isBetween(e,r,"date",n)&&!t.off)},o0=({previous:t,next:e},{formatter:r,separator:n})=>`${t.format(r)}${n}${e.format(r)}`,wM=t=>{const{instance:e,arg:r,value:n}=t;document.body.addEventListener("click",a=>e.DatepickerRef?a.target.classList.contains(`${r}-apply`)||a.target.classList.contains(`${r}-cancel`)?!1:e.isShow=e.DatepickerRef.contains(a.target)||document.getElementById(n)===a.target||n===a.target:e.isShow=!0)},s0=t=>{const e=[];for(let r=0;r<t;r++)e[r]=r.toString().padStart(2,"0");return e},rae=()=>({getHoursList:()=>s0(24),getMinutesList:()=>s0(60),getSecondsList:()=>s0(60)});var Fn=(t,e)=>{const r=t.__vccOpts||t;for(const[n,a]of e)r[n]=a;return r};const nae=s.defineComponent({name:"RangeHeader",props:{asPrevOrNext:Boolean,panel:Object,calendar:Object},inheritAttrs:!1}),aae={class:"dcp-header"},iae={class:"dcp-header__action"},oae={fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},sae=["d"],lae={class:"dcp-header__content"},cae=["textContent"],uae=["textContent"],fae={class:"dcp-header__action"},dae={fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},hae=["d"];function pae(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",aae,[s.createElementVNode("div",iae,[s.withDirectives(s.createElementVNode("span",{onClick:e[0]||(e[0]=o=>t.panel.calendar?t.calendar.onPrevious():t.calendar.onPreviousYear())},[(s.openBlock(),s.createElementBlock("svg",oae,[s.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:t.panel.calendar?"M15 19l-7-7 7-7":"M11 19l-7-7 7-7m8 14l-7-7 7-7"},null,8,sae)]))],512),[[s.vShow,t.panel.calendar||t.panel.year]])]),s.createElementVNode("div",lae,[s.createElementVNode("div",{textContent:s.toDisplayString(t.calendar.month),onClick:e[1]||(e[1]=o=>t.calendar.openMonth())},null,8,cae),s.createElementVNode("div",{textContent:s.toDisplayString(t.calendar.year),onClick:e[2]||(e[2]=o=>t.calendar.openYear())},null,8,uae)]),s.createElementVNode("div",fae,[s.withDirectives(s.createElementVNode("span",{onClick:e[3]||(e[3]=o=>t.panel.calendar?t.calendar.onNext():t.calendar.onNextYear())},[(s.openBlock(),s.createElementBlock("svg",dae,[s.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:t.panel.calendar?"M9 5l7 7-7 7":"M13 5l7 7-7 7M5 5l7 7-7 7"},null,8,hae)]))],512),[[s.vShow,t.panel.calendar||t.panel.year]])])])}var mae=Fn(nae,[["render",pae]]);const vae=s.defineComponent({name:"RangeMonth",props:{months:Array},inheritAttrs:!1,emits:["update:month"]}),gae={class:"dcp-year-month"},yae=["textContent","onClick"];function _ae(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",gae,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.months,(o,l)=>(s.openBlock(),s.createElementBlock("div",{class:"dcp-year-month__item",key:l,textContent:s.toDisplayString(o),onClick:c=>t.$emit("update:month",l)},null,8,yae))),128))])}var wae=Fn(vae,[["render",_ae]]);const bae=s.defineComponent({name:"RangeWeek",props:{weeks:Array},inheritAttrs:!1}),Sae={class:"dcp-grid dcp-grid-cols-7"},xae=["textContent"];function Cae(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",Sae,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.weeks,(o,l)=>(s.openBlock(),s.createElementBlock("div",{class:"dcp-grid-cell week",key:l},[s.createElementVNode("span",{textContent:s.toDisplayString(o)},null,8,xae)]))),128))])}var kae=Fn(bae,[["render",Cae]]);const Tae=s.defineComponent({name:"RangeYear",props:{asPrevOrNext:Boolean,years:Array},inheritAttrs:!1,emits:["update:year"]}),Mae={class:"dcp-year-month"},$ae=["textContent","onClick"];function Nae(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",Mae,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.years,(o,l)=>(s.openBlock(),s.createElementBlock("div",{class:"dcp-year-month__item",key:l,textContent:s.toDisplayString(o),onClick:c=>t.$emit("update:year",o,t.asPrevOrNext)},null,8,$ae))),128))])}var Eae=Fn(Tae,[["render",Nae]]);const Aae=s.defineComponent({name:"RangeCalendar",props:{asPrevOrNext:Boolean,calendar:Object,weeks:Array},inheritAttrs:!1,emits:["update:date"],setup(t,{emit:e}){const r=s.inject("isBetweenRange"),n=s.inject("betweenRangeClasses"),a=s.inject("datepickerClasses"),i=s.inject("atMouseOver");return{isBetweenRange:r,betweenRangeClasses:n,datepickerClasses:a,atMouseOver:i,onClickDate:l=>{l.disabled||e("update:date",l,t.asPrevOrNext)}}}}),Dae={class:"dcp-grid dcp-grid-cols-7"},Oae=["disabled","onClick","onMouseenter","onFocusin","textContent","data-date"];function Lae(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",Dae,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.calendar.date(),(o,l)=>(s.openBlock(),s.createElementBlock("div",{key:l,class:"dcp-grid-cell"},[t.isBetweenRange(o)||o.hovered()?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["in-range-date",t.betweenRangeClasses(o)])},null,2)):s.createCommentVNode("",!0),s.createElementVNode("span",{class:s.normalizeClass(["dcp-grid-cell__day",[t.datepickerClasses(o)]]),disabled:o.disabled,onClick:c=>t.onClickDate(o),onMouseenter:c=>t.atMouseOver(o),onFocusin:c=>t.atMouseOver(o),textContent:s.toDisplayString(o.date()),"data-date":o.toDate()},null,42,Oae)]))),128))])}var Pae=Fn(Aae,[["render",Lae]]);const Bae=s.defineComponent({name:"RangeShortcut",props:{shortcuts:[Boolean,Function]},inheritAttrs:!1,setup(t){const e=s.inject("setToToday"),r=s.inject("setToYesterday"),n=s.inject("setToLastDay"),a=s.inject("setToThisMonth"),i=s.inject("setToLastMonth"),o=s.inject("setToLastMonths"),l=s.inject("setToCustomShortcut");return{setToToday:e,setToYesterday:r,setToLastDay:n,setToThisMonth:a,setToLastMonth:i,setToCustomShortcut:l,setToLastMonths:o,withShortcut:()=>typeof t.shortcuts=="function"?t.shortcuts():!1}}}),Iae={class:"dcp-shortcut"},Rae=s.createElementVNode("div",{class:"dcp-shortcut__header"},"Fast Selection",-1),Vae={key:0},Fae=["onClick"],zae={key:1};function Hae(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",Iae,[Rae,t.withShortcut()?(s.openBlock(),s.createElementBlock("ul",Vae,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.withShortcut(),(o,l)=>(s.openBlock(),s.createElementBlock("li",{key:l,onClick:s.withModifiers(c=>t.setToCustomShortcut(o),["prevent"])},s.toDisplayString(o.label),9,Fae))),128))])):(s.openBlock(),s.createElementBlock("ul",zae,[s.createElementVNode("li",{onClick:e[0]||(e[0]=s.withModifiers((...o)=>t.setToToday&&t.setToToday(...o),["prevent"]))},"Today"),s.createElementVNode("li",{onClick:e[1]||(e[1]=s.withModifiers((...o)=>t.setToYesterday&&t.setToYesterday(...o),["prevent"]))},"Yesterday"),s.createElementVNode("li",{onClick:e[2]||(e[2]=s.withModifiers(o=>t.setToLastDay(3),["prevent"]))},"Last 3 days"),s.createElementVNode("li",{onClick:e[3]||(e[3]=s.withModifiers(o=>t.setToLastDay(7),["prevent"]))},"Last 7 days"),s.createElementVNode("li",{onClick:e[4]||(e[4]=s.withModifiers(o=>t.setToLastDay(30),["prevent"]))},"Last 30 days"),s.createElementVNode("li",{onClick:e[5]||(e[5]=s.withModifiers((...o)=>t.setToThisMonth&&t.setToThisMonth(...o),["prevent"]))},"This Month"),s.createElementVNode("li",{onClick:e[6]||(e[6]=s.withModifiers(o=>t.setToLastMonths(1),["prevent"]))},"Last Month"),s.createElementVNode("li",{onClick:e[7]||(e[7]=s.withModifiers(o=>t.setToLastMonths(3),["prevent"]))},"Last 3 Month")]))])}var Uae=Fn(Bae,[["render",Hae]]);const bM=t=>{const{instance:e,arg:r,value:n}=t;document.body.addEventListener("click",a=>e.TimeSelectRef?a.target.classList.contains(`${r}-apply`)||a.target.classList.contains(`${r}-cancel`)?!1:e.show=e.TimeSelectRef.contains(a.target)||document.getElementById(n)===a.target||n===a.target:e.show=!1)},jae=s.defineComponent({name:"RangeTimeSelect",props:{asPrevOrNext:Boolean,rangeTime:Array,pickerState:Object},emits:["update:time"],directives:{showtime:{mounted:(t,e)=>{bM(e)},updated:(t,e)=>{bM(e)}}},inheritAttrs:!1,setup(t,{emit:e}){const r=s.ref(!1),n=s.ref(null),{getHoursList:a,getMinutesList:i,getSecondsList:o}=rae(),l=s.computed(()=>{var O,T,E,D,P,I;return{hours:(T=(O=t.pickerState)==null?void 0:O.hours)!=null?T:!0,minutes:(D=(E=t.pickerState)==null?void 0:E.minutes)!=null?D:!0,seconds:(I=(P=t.pickerState)==null?void 0:P.seconds)!=null?I:!0}}),c=s.computed(()=>a()),u=s.computed(()=>i()),f=s.computed(()=>o()),d=s.computed(()=>({hours:c.value,minutes:u.value,seconds:f.value})),h=s.ref(null),p=s.ref(null),m=s.ref(null),v={hours:h,minutes:p,seconds:m},g=O=>v[O].value.querySelector("li").offsetHeight,y=(O,T)=>{const E=v[O];E.value&&E.value.scrollTo({top:Math.max(0,T*g(O)),behavior:"smooth"})},_=(O,T,E=!0)=>{switch(E&&y(O,Number(T)),O){case"hours":k.value=ee(k.value).hour(Number(T));break;case"minutes":k.value=ee(k.value).minute(Number(T));break;case"seconds":k.value=ee(k.value).second(Number(T));break}},w=(O,T)=>{_(O,T,!1),s.nextTick(()=>{A()})},S=s.ref(0),x=s.ref(null),b=(O,T,E)=>{E==null||E.preventDefault(),S.value++,S.value===1?x.value=setTimeout(()=>{S.value=0,_(O,T)},300):S.value===2&&(clearTimeout(x.value),S.value=0,w(O,T))},C=s.ref(""),k=s.ref(null),$=O=>{if(O){const T=ee();l.value.hours&&(k.value=ee(k.value).hour(T.hour())),l.value.minutes&&(k.value=ee(k.value).minute(T.minute())),l.value.seconds&&(k.value=ee(k.value).second(T.second()))}s.nextTick(()=>{_("hours",N.value.h),_("minutes",N.value.m),_("seconds",N.value.s)})},N=s.computed(()=>{const O=ee(k.value);return{h:O.hour(),m:O.minute(),s:O.second()}}),A=()=>{e("update:time",C.value,t.asPrevOrNext),r.value=!1};s.onMounted(()=>{L()});const L=()=>{t.asPrevOrNext?k.value=ee(t.rangeTime[1]):k.value=ee(t.rangeTime[0])},M=s.computed(()=>l.value.seconds?"HH:mm:ss":l.value.minutes?"HH:mm":l.value.hours?"HH":"HH:mm:ss");return s.watchEffect(()=>{C.value=ee(k.value).format(M.value)}),s.watch(()=>t.rangeTime,O=>{t.asPrevOrNext?k.value=ee(t.rangeTime[1]):k.value=ee(t.rangeTime[0])}),s.watch(()=>r.value,O=>{O?$(!1):L()}),{time:k,listMap:d,show:r,TimeSelectRef:n,handleClickNew:b,handleClick:_,handleDbClick:w,listHoursRef:h,listMinutesRef:p,listSecondsRef:m,applyTime:A,setCurrentTime:$,timeFormat:N,showTime:C,pickerShow:l}}}),Yae={class:"dcp-time",ref:"TimeSelectRef"},Gae=s.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15 9C15 5.68629 12.3137 3 9 3C5.68629 3 3 5.68629 3 9C3 12.3137 5.68629 15 9 15C12.3137 15 15 12.3137 15 9ZM16.5 9C16.5 13.1421 13.1421 16.5 9 16.5C4.85786 16.5 1.5 13.1421 1.5 9C1.5 4.85786 4.85786 1.5 9 1.5C13.1421 1.5 16.5 4.85786 16.5 9ZM8.25 5.23823C8.25 5.07254 8.38432 4.93823 8.55 4.93823H9.45C9.61569 4.93823 9.75 5.07254 9.75 5.23823V9.13823C9.75 9.16499 9.7465 9.19093 9.73992 9.21562C9.72817 9.27006 9.70114 9.32187 9.65883 9.36418L7.27282 11.7502C7.15566 11.8673 6.96571 11.8673 6.84856 11.7502L6.21216 11.1138C6.095 10.9966 6.095 10.8067 6.21216 10.6895L8.25 8.65169V5.23823Z",fill:"currentColor","fill-opacity":"0.54"})],-1),Wae={class:"time-select",ref:"TimeRef"},Zae={class:"time-select__content"},qae={key:0,ref:"listHoursRef",class:"time-panel-column"},Xae=["onClick"],Kae={class:"time-panel-cell-inner"},Jae={key:1,ref:"listMinutesRef",class:"time-panel-column"},Qae=["onClick"],eie={class:"time-panel-cell-inner"},tie={key:2,ref:"listSecondsRef",class:"time-panel-column"},rie=["onClick"],nie={class:"time-panel-cell-inner"},aie={class:"time-select__footer"};function iie(t,e,r,n,a,i){const o=s.resolveDirective("showtime");return s.withDirectives((s.openBlock(),s.createElementBlock("div",Yae,[s.withDirectives(s.createElementVNode("input",{readonly:"","onUpdate:modelValue":e[0]||(e[0]=l=>t.showTime=l),class:"dcp-input",autocomplete:"off"},null,512),[[s.vModelText,t.showTime]]),Gae,s.createVNode(s.Transition,{"enter-from-class":"zoom-big-enter zoom-big-enter-prepare","enter-to-class":"zoom-big-enter zoom-big-enter-active","enter-active-class":"zoom-big-enter zoom-big-enter-prepare","leave-active-class":"zoom-big-leave","leave-from-class":"zoom-big-leave zoom-big-leave-active","leave-to-class":"zoom-big-leave zoom-big-leave-active"},{default:s.withCtx(()=>{var l,c,u;return[s.withDirectives(s.createElementVNode("div",Wae,[s.createElementVNode("div",Zae,[((l=t.pickerShow)==null?void 0:l.hours)?(s.openBlock(),s.createElementBlock("ul",qae,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.listMap.hours,f=>(s.openBlock(),s.createElementBlock("li",{class:s.normalizeClass(["time-panel-cell",{active:t.timeFormat.h===Number(f)}]),key:f,onClick:s.withModifiers(d=>t.handleClickNew("hours",f,d),["prevent","stop"])},[s.createElementVNode("div",Kae,s.toDisplayString(f),1)],10,Xae))),128))],512)):s.createCommentVNode("",!0),((c=t.pickerShow)==null?void 0:c.minutes)?(s.openBlock(),s.createElementBlock("ul",Jae,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.listMap.minutes,f=>(s.openBlock(),s.createElementBlock("li",{class:s.normalizeClass(["time-panel-cell",{active:t.timeFormat.m===Number(f)}]),key:f,onClick:s.withModifiers(d=>t.handleClickNew("minutes",f,d),["prevent","stop"])},[s.createElementVNode("div",eie,s.toDisplayString(f),1)],10,Qae))),128))],512)):s.createCommentVNode("",!0),((u=t.pickerShow)==null?void 0:u.seconds)?(s.openBlock(),s.createElementBlock("ul",tie,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.listMap.seconds,f=>(s.openBlock(),s.createElementBlock("li",{class:s.normalizeClass(["time-panel-cell",{active:t.timeFormat.s===Number(f)}]),key:f,onClick:s.withModifiers(d=>t.handleClickNew("seconds",f,d),["prevent","stop"])},[s.createElementVNode("div",nie,s.toDisplayString(f),1)],10,rie))),128))],512)):s.createCommentVNode("",!0)]),s.createElementVNode("div",aie,[s.createElementVNode("button",{class:"dcp-button link picker-cancel",onClick:e[1]||(e[1]=f=>t.setCurrentTime(!0))},"Now"),s.createElementVNode("button",{class:"dcp-button primary picker-apply",onClick:e[2]||(e[2]=(...f)=>t.applyTime&&t.applyTime(...f))},"OK")])],512),[[s.vShow,t.show]])]}),_:1})])),[[o,null,"picker"]])}var oie=Fn(jae,[["render",iie]]);ee.extend(iM),ee.extend(sM),ee.extend(cM),ee.extend(fM),ee.extend(pM),ee.extend(vM);const sie=s.defineComponent({name:"DateRange",components:{RangeHeader:mae,RangeMonth:wae,RangeWeek:kae,RangeYear:Eae,RangeCalendar:Pae,RangeShortcut:Uae,RangeTimeSelect:oie},props:{disableDate:{type:[Boolean,Array,Function],default:!1},disableInRange:{type:Boolean,default:!0},shortcuts:{type:[Boolean,Function],default:!0},separator:{type:String,default:" ~ "},formatter:{type:String,default:"YYYY-MM-DD HH:mm:ss"},modelValue:{type:[Array],default:()=>[]},startFrom:{type:[Object,String],default:()=>new Date},pickerState:{type:Object,default:()=>{}}},inheritAttrs:!1,emits:["update:modelValue"],setup(t,{emit:e}){const r=s.ref(null),n=s.ref(""),a=s.ref([]),i=s.ref([]),o=s.ref(null),l=s.ref(null),c=s.reactive({previous:{calendar:!0,month:!1,year:!1},next:{calendar:!0,month:!1,year:!1}});s.onMounted(()=>{O()});const u=s.ref({previous:ee(),next:ee().add(1,"month"),year:{previous:ee().year(),next:ee().year()},weeks:ee.weekdaysShort(),months:ee.monthsShort()}),f=s.computed(()=>u.value.weeks),d=s.computed(()=>u.value.months),h=s.computed(()=>{const{previous:T,next:E,year:D}=s.unref(u);return{previous:{date:()=>i0(T).concat(gM(T)).concat(yM(T)).map(P=>(P.today=P.isToday(),P.active=T.month()===P.month(),P.off=T.month()!==P.month(),P.sunday=P.day()===0,P.disabled=_M(P,t)&&!p(P),P.hovered=()=>a.value.length>1?(P.isBetween(a.value[0],a.value[1],"date","()")||P.isBetween(a.value[1],a.value[0],"date","()"))&&T.month()===P.month():!1,P.duration=()=>!1,P)),month:T&&T.format("MMM"),year:T&&T.year(),years:()=>Array.from({length:12},(P,I)=>D.previous+I),onPrevious:()=>{u.value.previous=T.subtract(1,"month")},onNext:()=>{u.value.previous=T.add(1,"month"),T.diff(E,"month")===-1&&(u.value.next=E.add(1,"month"))},onPreviousYear:()=>{u.value.year.previous=u.value.year.previous-12},onNextYear:()=>{u.value.year.previous=u.value.year.previous+12},openMonth:()=>{c.previous.month=!c.previous.month,c.previous.year=!1,c.previous.calendar=!c.previous.month},setMount:P=>{u.value.previous=T.month(P),c.previous.month=!c.previous.month,c.previous.year=!1,c.previous.calendar=!c.previous.month,s.nextTick(()=>{(u.value.next.isSame(u.value.previous,"month")||u.value.next.isBefore(u.value.previous))&&(u.value.next=u.value.previous.add(1,"month")),u.value.year.next=u.value.next.year()})},openYear:()=>{c.previous.year=!c.previous.year,c.previous.month=!1,c.previous.calendar=!c.previous.year},setYear:(P,I)=>{I||(u.value.previous=T.year(P),c.previous.year=!c.previous.year,c.previous.calendar=!c.previous.year,s.nextTick(()=>{(u.value.next.isSame(u.value.previous,"month")||u.value.next.isBefore(u.value.previous))&&(u.value.next=u.value.previous.add(1,"month")),u.value.year.previous=u.value.previous.year(),u.value.year.next=u.value.next.year()}))}},next:{date:()=>i0(E).concat(gM(E)).concat(yM(E)).map(P=>(P.today=P.isToday(),P.active=E.month()===P.month(),P.off=E.month()!==P.month(),P.sunday=P.day()===0,P.disabled=_M(P,t)&&!p(P),P.hovered=()=>a.value.length>1?(P.isBetween(a.value[0],a.value[1],"date","()")||P.isBetween(a.value[1],a.value[0],"date","()"))&&E.month()===P.month():!1,P.duration=()=>!1,P)),month:E&&E.format("MMM"),year:E&&E.year(),years:()=>Array.from({length:12},(P,I)=>D.next+I),onPrevious:()=>{u.value.next=E.subtract(1,"month"),E.diff(T,"month")===1&&(u.value.previous=T.subtract(1,"month"))},onNext:()=>{u.value.next=E.add(1,"month")},onPreviousYear:()=>{u.value.year.next=u.value.year.next-12},onNextYear:()=>{u.value.year.next=u.value.year.next+12},openMonth:()=>{c.next.month=!c.next.month,c.next.year=!1,c.next.calendar=!c.next.month},setMount:P=>{u.value.next=E.month(P),c.next.month=!c.next.month,c.next.year=!1,c.next.calendar=!c.next.month,s.nextTick(()=>{(u.value.previous.isSame(u.value.next,"month")||u.value.previous.isAfter(u.value.next))&&(u.value.previous=u.value.next.subtract(1,"month")),u.value.year.previous=u.value.previous.year()})},openYear:()=>{c.next.year=!c.next.year,c.next.month=!1,c.next.calendar=!c.next.year},setYear:(P,I)=>{I&&(u.value.next=E.year(P),c.next.year=!c.next.year,c.next.month=!1,c.next.calendar=!c.next.year,s.nextTick(()=>{(u.value.previous.isSame(u.value.next,"month")||u.value.previous.isAfter(u.value.next))&&(u.value.previous=u.value.next.subtract(1,"month")),u.value.year.previous=u.value.previous.year(),u.value.year.next=u.value.next.year()}))}}}}),p=T=>{if(t.disableInRange||n.value==="")return!1;let E,D;const[P,I]=t.modelValue;return E=P,D=I,T.isBetween(ee(E,t.formatter,!0),ee(D,t.formatter,!0),"date","[]")},m=()=>{o.value=null,l.value=null,a.value=[],r.value=null},v=(T,E)=>{if(o.value){if(l.value=T,T.isBefore(o.value)){const[I,V]=s.toRaw(n.value).split(t.separator),F=ee(I),H=ee(V);n.value=o0({previous:T.hour(F.hour()||0).minute(F.minute()||0).second(F.second()||0),next:o.value.hour(H.hour()||0).minute(H.minute()||0).second(H.second()||0)},t)}else{const[I,V]=s.toRaw(n.value).split(t.separator),F=ee(I),H=ee(V);n.value=o0({previous:o.value.hour(F.hour()||0).minute(F.minute()||0).second(F.second()||0),next:T.hour(H.hour()||0).minute(H.minute()||0).second(H.second()||0)},t)}const[D,P]=n.value.split(t.separator);e("update:modelValue",[ee(D,t.formatter,!0).format(t.formatter),ee(P,t.formatter,!0).format(t.formatter)]),i.value=[],ee(D,t.formatter,!0).isSame(ee(P,t.formatter,!0),"month")||(u.value.previous=ee(D,t.formatter,!0),u.value.next=ee(P,t.formatter,!0)),m()}else i.value=[],o.value=T,r.value=T,a.value.push(T),i.value.push(T),E?(u.value.next=T,u.value.previous.isSame(T,"month")&&(u.value.next=T.add(1,"month"))):(u.value.previous=T,u.value.next.isSame(T,"month")&&(u.value.previous=u.value.next,u.value.next=T.add(1,"month")))},g=(T,E)=>{const D=T.split(":").map(H=>Number(H))||[],[P,I]=t.modelValue;let V=P&&ee(P),F=I&&ee(I);E?F=F.hour(D[0]||0).minute(D[1]||0).second(D[2]||0):V=V.hour(D[0]||0).minute(D[1]||0).second(D[2]||0),e("update:modelValue",[ee(V,t.formatter,!0).format(t.formatter),ee(F,t.formatter,!0).format(t.formatter)])},y=T=>{if(o.value)a.value=[o.value,T];else return a.value=[],!1},_=T=>{if(o.value)return!1;let E,D;if(a.value.length>1){const[P,I]=a.value;E=ee(P,t.formatter,!0),D=ee(I,t.formatter,!0)}else{const[P,I]=t.modelValue;E=P&&ee(P,t.formatter,!0),D=I&&ee(I,t.formatter,!0)}return E&&D?tae(T,{previous:E,next:D}):!1},w=T=>{const{today:E,active:D,off:P,disabled:I}=T;let V,F,H;if(r.value){const[Y,Q]=a.value;F=Y&&ee(Y,t.formatter,!0),H=Q&&ee(Q,t.formatter,!0)}else{const[Y,Q]=t.modelValue;F=Y&&ee(Y,t.formatter,!0),H=Q&&ee(Q,t.formatter,!0)}return D&&(V=E?"today":I?"disabled":T.isBetween(F,H,"date","()")?"between":"other"),P&&(V="off disabled"),F&&H&&!P?(T.isSame(F,"date")&&(V=H.isAfter(F,"date")?"started":"ended",F.isSame(H,"date")&&(V="same disabled")),T.isSame(H,"date")&&(V=H.isAfter(F,"date")?"ended":"started",F.isSame(H,"date")&&(V="same disabled"))):F&&T.isSame(F,"date")&&!P&&(V="same disabled"),V},S=T=>{let E,D,P;if(E="",a.value.length>1){const[I,V]=a.value;D=I&&ee(I,t.formatter,!0),P=V&&ee(V,t.formatter,!0)}else{const[I,V]=t.modelValue;D=I&&ee(I,t.formatter,!0),P=V&&ee(V,t.formatter,!0)}return D&&P&&(T.isSame(D,"date")?(P.isBefore(D)&&(E+=" ended"),D.isBefore(P)&&(E+=" started")):T.isSame(P,"date")&&(P.isBefore(D)&&(E+=" started"),D.isBefore(P)&&(E+=" ended"))),E},x=(T,E)=>{u.value.previous=ee(T,t.formatter,!0),u.value.next=ee(E,t.formatter,!0),(ee.duration(u.value.next.diff(u.value.previous)).months()===2||ee.duration(u.value.next.diff(u.value.previous)).months()===1&&ee.duration(u.value.next.diff(u.value.previous)).days()===7)&&(u.value.next=u.value.next.subtract(1,"month")),(u.value.next.isSame(u.value.previous,"month")||u.value.next.isBefore(u.value.previous))&&(u.value.next=u.value.previous.add(1,"month"))},b=(T,E)=>{e("update:modelValue",[T,E]),n.value=`${T}${t.separator}${E}`,x(T,E),m()},C=()=>{const T=ee().hour(0).minute(0).second(0).format(t.formatter),E=ee().hour(23).minute(59).second(59).format(t.formatter);b(T,E)},k=()=>{const T=ee().subtract(1,"day").hour(0).minute(0).second(0).format(t.formatter),E=ee().subtract(1,"day").hour(23).minute(59).second(59).format(t.formatter);b(T,E)},$=T=>{const E=ee().subtract(T-1,"day").hour(0).minute(0).second(0).format(t.formatter),D=ee().hour(23).minute(59).second(59).format(t.formatter);b(E,D)},N=()=>{const T=ee().date(1).hour(0).minute(0).second(0).format(t.formatter),E=ee().date(ee().daysInMonth()).hour(23).minute(59).second(59).format(t.formatter);b(T,E)},A=()=>{const T=ee().date(1).subtract(1,"month").hour(0).minute(0).second(0).format(t.formatter),E=ee().date(0).hour(23).minute(59).second(59).format(t.formatter);b(T,E)},L=T=>{const E=ee().date(1).subtract(T,"month").hour(0).minute(0).second(0).format(t.formatter),D=ee().date(0).hour(23).minute(59).second(59).format(t.formatter);b(E,D)},M=T=>{let E,D;const[P,I]=T.atClick();E=ee(P).hour(0).minute(0).second(0).format(t.formatter),D=ee(I).hour(23).minute(59).second(59).format(t.formatter),b(E,D)};s.watch(()=>i.value,T=>{T.length>0&&(c.previous.calendar=!0,c.previous.month=!1,c.previous.year=!1,c.next.calendar=!0,c.next.month=!1,c.next.year=!1)});const O=()=>{let T,E;if(t.modelValue.length>0){const[D,P]=t.modelValue;T=ee(D,t.formatter,!0),E=ee(P,t.formatter,!0)}T&&E?(n.value=o0({previous:T,next:E},t),E.isBefore(T,"month")?(u.value.previous=E,u.value.next=T,u.value.year.previous=E.year(),u.value.year.next=T.year()):E.isSame(T,"month")?(u.value.previous=T,u.value.next=E.add(1,"month"),u.value.year.previous=T.year(),u.value.year.next=T.add(1,"year").year()):(u.value.previous=T,u.value.next=E,u.value.year.previous=T.year(),u.value.year.next=E.year())):(u.value.previous=ee(t.startFrom),u.value.next=ee(t.startFrom).add(1,"month"),u.value.year.previous=u.value.previous.year(),u.value.year.next=u.value.next.year()),u.value.weeks=ee.weekdaysShort(),u.value.months=ee.monthsShort()};return s.watch(()=>t.modelValue,(T,E)=>{O()}),s.watchEffect(()=>{s.nextTick(()=>{O()})}),s.provide("isBetweenRange",_),s.provide("betweenRangeClasses",S),s.provide("datepickerClasses",w),s.provide("atMouseOver",y),s.provide("setToToday",C),s.provide("setToYesterday",k),s.provide("setToLastDay",$),s.provide("setToThisMonth",N),s.provide("setToLastMonth",A),s.provide("setToCustomShortcut",M),s.provide("setToLastMonths",L),{previous:o,next:l,panel:c,pickerValue:n,hoverValue:a,applyValue:i,datepicker:u,calendar:h,weeks:f,months:d,setDate:v,setTime:g}}}),lie={class:"dcp-date-container"},cie={class:"dcp-calendar-container"},uie={class:"dcp-calendar"},fie={class:"dcp-calendar__body"},die={class:"dcp-calendar"},hie={class:"dcp-calendar__body"};function pie(t,e,r,n,a,i){var o,l,c,u;const f=s.resolveComponent("range-header"),d=s.resolveComponent("range-month"),h=s.resolveComponent("range-year"),p=s.resolveComponent("range-week"),m=s.resolveComponent("range-calendar"),v=s.resolveComponent("RangeTimeSelect"),g=s.resolveComponent("range-shortcut");return s.openBlock(),s.createElementBlock("div",lie,[s.createElementVNode("div",cie,[s.createElementVNode("div",uie,[s.createVNode(f,{panel:t.panel.previous,calendar:t.calendar.previous},null,8,["panel","calendar"]),s.createElementVNode("div",fie,[s.withDirectives(s.createVNode(d,{months:t.months,"onUpdate:month":t.calendar.previous.setMount},null,8,["months","onUpdate:month"]),[[s.vShow,t.panel.previous.month]]),s.withDirectives(s.createVNode(h,{years:t.calendar.previous.years(),"onUpdate:year":t.calendar.previous.setYear},null,8,["years","onUpdate:year"]),[[s.vShow,t.panel.previous.year]]),s.withDirectives(s.createElementVNode("div",null,[s.createVNode(p,{weeks:t.weeks},null,8,["weeks"]),s.createVNode(m,{calendar:t.calendar.previous,weeks:t.weeks,"onUpdate:date":t.setDate},null,8,["calendar","weeks","onUpdate:date"]),((l=(o=t.pickerState)==null?void 0:o.hours)!=null?l:!1)?(s.openBlock(),s.createBlock(v,{key:0,"picker-state":t.pickerState,"range-time":t.modelValue,"onUpdate:time":t.setTime},null,8,["picker-state","range-time","onUpdate:time"])):s.createCommentVNode("",!0)],512),[[s.vShow,t.panel.previous.calendar]])])]),s.createElementVNode("div",die,[s.createVNode(f,{"as-prev-or-next":"",panel:t.panel.next,calendar:t.calendar.next},null,8,["panel","calendar"]),s.createElementVNode("div",hie,[s.withDirectives(s.createVNode(d,{months:t.months,"onUpdate:month":t.calendar.next.setMount},null,8,["months","onUpdate:month"]),[[s.vShow,t.panel.next.month]]),s.withDirectives(s.createVNode(h,{"as-prev-or-next":"",years:t.calendar.next.years(),"onUpdate:year":t.calendar.next.setYear},null,8,["years","onUpdate:year"]),[[s.vShow,t.panel.next.year]]),s.withDirectives(s.createElementVNode("div",null,[s.createVNode(p,{weeks:t.weeks},null,8,["weeks"]),s.createVNode(m,{"as-prev-or-next":"",calendar:t.calendar.next,weeks:t.weeks,"onUpdate:date":t.setDate},null,8,["calendar","weeks","onUpdate:date"]),((u=(c=t.pickerState)==null?void 0:c.hours)!=null?u:!1)?(s.openBlock(),s.createBlock(v,{key:0,"picker-state":t.pickerState,"range-time":t.modelValue,"as-prev-or-next":"","onUpdate:time":t.setTime},null,8,["picker-state","range-time","onUpdate:time"])):s.createCommentVNode("",!0)],512),[[s.vShow,t.panel.next.calendar]])])])]),t.shortcuts?(s.openBlock(),s.createBlock(g,{key:0,shortcuts:t.shortcuts},null,8,["shortcuts"])):s.createCommentVNode("",!0)])}var mie=Fn(sie,[["render",pie]]);ee.extend(iM),ee.extend(sM),ee.extend(cM),ee.extend(fM),ee.extend(pM),ee.extend(vM),ee.extend(eae);const vie=s.defineComponent({name:"DateComparePicker",components:{DateRange:mie},directives:{litepie:{mounted:(t,e)=>{wM(e)},updated:(t,e)=>{wM(e)}}},props:{disableDate:{type:[Boolean,Array,Function],default:!1},formatter:{type:String,default:"YYYY-MM-DD HH:mm:ss"},modelValue:{type:Object,default:()=>{}},pickerState:{type:Object,default:()=>({days:!0,hours:!0,minutes:!0,seconds:!1})}},inheritAttrs:!1,emits:["update:modelValue"],setup(t,{emit:e}){const r=s.ref(null),n=s.ref(!1),a=s.ref([]),i=s.ref([]),o=s.ref(!1),l=s.ref(!1),c=s.ref(null),u=s.ref(null),f=s.computed(()=>{if(!o.value)return!0;if(i.value.length!==2)return!1;const[_,w]=a.value.map(b=>ee.utc(b)),[S,x]=i.value.map(b=>ee.utc(b));return ee(w).diff(ee(_),"second")===ee(x).diff(ee(S),"second")}),d=_=>{l.value=_.target.checked,s.nextTick(()=>{var w,S;if(_.target.checked){if(i.value.length===0&&a.value.length===2){const[x,b]=a.value,C=ee(b).diff(ee(x),"days")+1,k=ee(x).subtract(C,"days").format(t.formatter),$=ee(b).subtract(C,"days").format(t.formatter);i.value=[k,$]}(w=u.value)==null||w.focus()}else(S=c.value)==null||S.focus(),i.value=[]})},h=()=>{const _=[...i.value];i.value=[...a.value],a.value=[..._]},p=()=>{n.value=!0},m=()=>{n.value=!1},v=()=>{e("update:modelValue",{current:a.value,compare:i.value}),n.value=!1},g=()=>{n.value=!1};s.watchEffect(()=>{if(t.modelValue){const{current:_,compare:w}=t.modelValue;a.value=_,i.value=w}});const y=s.ref("");return s.watch(()=>n.value,(_,w)=>{if(_){const S=document.querySelector(".dcp-datecompare-picker"),x=S==null?void 0:S.offsetHeight;y.value=x?`${x+4+10}px`:"",s.nextTick(()=>{const{current:b,compare:C}=t.modelValue;a.value=b,i.value=C,l.value=!1,o.value=C&&C.length>0})}}),{DatepickerRef:r,isShow:n,currentValue:a,compareValue:i,compareCheck:o,changeCompare:d,compareTo:l,currentRef:c,compareRef:u,switchCompare:h,positionTop:y,show:p,hide:m,applyDate:v,cancelPicker:g,okStatus:f}}}),gie={id:"datepicker",ref:"DatepickerRef",class:"dcp-datecompare-picker"},yie=s.createElementVNode("div",null,s.toDisplayString("Select Compare Date"),-1),_ie={class:"dcp-datecompare"},wie={class:"dcp-compare-container"},bie={class:"dcp-compare__content"},Sie=s.createElementVNode("div",{class:"content_label"},"Select Time:",-1),xie=["value"],Cie={key:0},kie=s.createElementVNode("div",{class:"content_label"},"Compare Time:",-1),Tie=["value"],Mie={class:"dcp-compare__switch"},$ie=[s.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s.createElementVNode("path",{d:"M9.3996 3C9.17868 3 8.9996 3.17909 8.9996 3.4L8.9996 17.9999L4.65344 13.6538C4.49723 13.4976 4.24397 13.4976 4.08776 13.6538L3.23923 14.5023C3.08302 14.6585 3.08302 14.9118 3.23923 15.068L9.0375 20.8663C9.10484 20.9336 9.19021 20.9719 9.27807 20.9812C9.31639 20.9934 9.35723 21 9.3996 21H10.5996C10.8205 21 10.9996 20.8209 10.9996 20.6L10.9996 3.4C10.9996 3.17909 10.8205 3 10.5996 3H9.3996Z",fill:"black","fill-opacity":"0.87"}),s.createElementVNode("path",{d:"M14.9996 5.99994L14.9996 20.6C14.9996 20.8209 14.8205 21 14.5996 21H13.3996C13.1787 21 12.9996 20.8209 12.9996 20.6L12.9996 3.4C12.9996 3.17909 13.1787 3 13.3996 3H14.5996C14.6132 3 14.6267 3.00068 14.64 3.00202C14.7501 2.99552 14.8624 3.03434 14.9466 3.11848L20.7448 8.91675C20.901 9.07296 20.901 9.32623 20.7448 9.48244L19.8963 10.331C19.7401 10.4872 19.4868 10.4872 19.3306 10.331L14.9996 5.99994Z",fill:"black","fill-opacity":"0.87"})],-1)],Nie={class:"dcp-compare-footer"},Eie=s.createElementVNode("span",null," Compare To",-1),Aie=["disabled"];function Die(t,e,r,n,a,i){const o=s.resolveComponent("DateRange"),l=s.resolveDirective("litepie");return s.withDirectives((s.openBlock(),s.createElementBlock("div",gie,[s.renderSlot(t.$slots,"default",{},()=>[yie]),s.createVNode(s.Transition,{"enter-from-class":"zoom-big-enter zoom-big-enter-prepare","enter-to-class":"zoom-big-enter zoom-big-enter-active","enter-active-class":"zoom-big-enter zoom-big-enter-prepare","leave-active-class":"zoom-big-leave","leave-from-class":"zoom-big-leave zoom-big-leave-active","leave-to-class":"zoom-big-leave zoom-big-leave-active"},{default:s.withCtx(()=>[t.isShow?(s.openBlock(),s.createElementBlock("div",{key:0,class:"dcp-datecompare-picker__content",style:s.normalizeStyle({top:t.positionTop})},[s.createElementVNode("div",_ie,[t.compareTo?(s.openBlock(),s.createBlock(o,{key:0,disableDate:t.disableDate,formatter:t.formatter,pickerState:t.pickerState,modelValue:t.compareValue,"onUpdate:modelValue":e[0]||(e[0]=c=>t.compareValue=c)},null,8,["disableDate","formatter","pickerState","modelValue"])):(s.openBlock(),s.createBlock(o,{key:1,disableDate:t.disableDate,formatter:t.formatter,pickerState:t.pickerState,modelValue:t.currentValue,"onUpdate:modelValue":e[1]||(e[1]=c=>t.currentValue=c)},null,8,["disableDate","formatter","pickerState","modelValue"])),s.createElementVNode("div",wie,[s.createElementVNode("div",bie,[s.createElementVNode("div",null,[Sie,s.createElementVNode("input",{class:"dcp-input",ref:"currentRef",onFocus:e[2]||(e[2]=c=>t.compareTo=!1),value:t.currentValue,type:"text"},null,40,xie)]),t.compareCheck?(s.openBlock(),s.createElementBlock("div",Cie,[kie,s.createElementVNode("input",{class:"dcp-input",ref:"compareRef",onFocus:e[3]||(e[3]=c=>t.compareTo=!0),value:t.compareValue,type:"text"},null,40,Tie)])):s.createCommentVNode("",!0)]),s.withDirectives(s.createElementVNode("div",Mie,[s.createElementVNode("span",{onClick:e[4]||(e[4]=(...c)=>t.switchCompare&&t.switchCompare(...c))},$ie)],512),[[s.vShow,t.compareCheck]])]),s.createElementVNode("div",Nie,[s.createElementVNode("label",{class:s.normalizeClass(["dcp-compare-checkbox",{checked:t.compareCheck}]),for:"compareCheck"},[s.createElementVNode("span",{class:s.normalizeClass(["dcp-checkbox",{checked:t.compareCheck}])},[s.withDirectives(s.createElementVNode("input",{type:"checkbox",name:"compareCheck",id:"compareCheck","onUpdate:modelValue":e[5]||(e[5]=c=>t.compareCheck=c),onChange:e[6]||(e[6]=(...c)=>t.changeCompare&&t.changeCompare(...c)),class:"dcp-checkbox-input"},null,544),[[s.vModelCheckbox,t.compareCheck]]),s.createElementVNode("span",{class:s.normalizeClass(["dcp-checkbox-inner",{checked:t.compareCheck}])},null,2)],2),Eie],2),s.createElementVNode("div",null,[s.createElementVNode("button",{style:{"margin-right":"10px"},class:"dcp-button link picker-cancel",onClick:e[7]||(e[7]=(...c)=>t.cancelPicker&&t.cancelPicker(...c))}," Cancel "),s.createElementVNode("button",{disabled:!t.okStatus,class:s.normalizeClass(["dcp-button primary picker-apply",{disabled:!t.okStatus}]),onClick:e[8]||(e[8]=(...c)=>t.applyDate&&t.applyDate(...c))}," OK ",10,Aie)])])])],4)):s.createCommentVNode("",!0)]),_:1})])),[[l,null,"picker"]])}var SM=Fn(vie,[["render",Die]]),Oie=Object.assign(SM,{install:t=>{t.component("DateComparePicker",SM)}},{});const Lie={class:"handle"},Pie={class:"mega-tag disabled"},Bie={class:"mega-tag-label"},Iie={class:"mega-tag-label"},Rie=["onClick"],Vie=s.defineComponent({setup(t){const e=s.inject("cubeState"),r=s.inject("currentState"),n=s.computed(()=>zl()?"none":".handle"),a=s.computed({get(){return e.filters},set(w){const S=Ye(w);e.filters=S.map(x=>x.filter_type?x:{id:x.id})}}),i=w=>{e.filters.push({id:w.dimension.id}),o.value[w.dimension.id]=!0};s.watch(a,(w,S)=>{const x=xI(w,S,lI);x.length>0&&w.length>1&&s.nextTick(()=>{o.value=Ti(te({},o.value),{[x[0].id]:!0})})});const o=s.ref({}),l=w=>{const S=qo(a.value,{id:w.id});a.value.splice(S,1),delete o.value[w.id],s.nextTick(()=>{ce.emit("on-params-change")})},c=(w,S)=>{var $,N;const{draggedContext:x,relatedContext:b}=w,{element:C}=x,k=b.list;if(w.to.className===w.from.className)return!0;if(Ko(k,{id:C.id})||x.futureIndex<=((N=($=r.cube)==null?void 0:$.fixSplit)==null?void 0:N.length)-1)return!1},u=()=>{Object.keys(o.value).forEach(w=>{o.value[w]=!1})},f=(w,S)=>{if(!w){const x=a.value.findIndex(C=>C.id===S.id);a.value[x].filter_type||(a.value.splice(x,1),delete o.value[S.id])}},d=w=>{o.value[w]=!1;const S=a.value.findIndex(b=>b.id===w);a.value[S].filter_type||(a.value.splice(S,1),delete o.value[w])},h=w=>{o.value[w.id]=!1;const S=e.filters.findIndex(x=>x.id===w.id);e.filters[S]=te({},w),s.nextTick(()=>{ce.emit("on-params-change")})},p=w=>{o.value[w.id]=!0};s.onMounted(()=>{window.addEventListener("onBeforeDragMove",u),ce.on("onQuickAddFilter",p),s.nextTick(()=>{_()})}),s.onBeforeUnmount(()=>{ce.off("onQuickAddFilter",p),window.removeEventListener("onBeforeDragMove",u)});const m=(w,S)=>{window.dispatchEvent(new Event("onBeforeDragMove"))},v=s.computed(()=>c1(r.cube.primaryTimeGranularity)),g=s.ref({current:[],compare:[]}),y=s.computed(()=>"YYYY-MM-DD HH:mm:ss".substring(0,e.range.current_time[0].length)),_=()=>{const w=e.range;g.value.current=w.current_time,g.value.compare=w.previous_time};return s.watch(()=>g.value,(w,S)=>{const{compare:x,current:b}=w;e.range.current_time=[...b],e.range.previous_time=[...x],ce.emit("on-refresh")}),s.watch(()=>[e.range,r.cube.id],()=>{s.nextTick(()=>{_()})},{deep:!0}),(w,S)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(tM,{title:"Filter",type:"filter",onOnAdd:i}),s.createVNode(s.unref(Sa.default),{class:"drag-content draggable-filter",sort:!0,modelValue:s.unref(a),"onUpdate:modelValue":S[1]||(S[1]=x=>s.isRef(a)?a.value=x:null),handle:s.unref(n),group:{name:"dimension",pull:"clone",put:"dimension"},"item-key":"id",move:c,onStart:m},{item:s.withCtx(({element:x})=>[s.createElementVNode("div",Lie,[s.unref(Io)(s.unref(r).cube,x.id)?(s.openBlock(),s.createBlock(s.unref(Oie),{key:0,pickerState:{hours:s.unref(v).hours,minutes:s.unref(v).minutes,seconds:s.unref(v).seconds},formatter:s.unref(y),modelValue:g.value,"onUpdate:modelValue":S[0]||(S[0]=b=>g.value=b)},{default:s.withCtx(()=>[s.createElementVNode("div",Pie,[s.createElementVNode("span",Bie,s.toDisplayString(s.unref(f1)(s.unref(e).range)),1)])]),_:1},8,["pickerState","formatter","modelValue"])):(s.openBlock(),s.createBlock(s.unref(R.Popover),{key:1,visible:o.value[x.id],"onUpdate:visible":b=>o.value[x.id]=b,placement:"bottom",trigger:"click",destroyTooltipOnHide:"",onVisibleChange:b=>f(b,x),"overlay-class-name":"filter-pop-container"},{content:s.withCtx(()=>[s.createVNode(rM,{cube:s.unref(r).cube,visible:o.value[x.id],dimension:x,onOnCancel:d,onOnOk:h,"filter-state":{filters:s.unref(e).filters,range:s.unref(e).range,timezone:s.unref(e).timezone}},null,8,["cube","visible","dimension","filter-state"])]),default:s.withCtx(()=>{var b,C;return[s.createElementVNode("div",{class:s.normalizeClass(["mega-tag",{disabled:s.unref(Io)(s.unref(r).cube,x.id)}])},[s.createElementVNode("span",Iie,s.toDisplayString((b=s.unref(Fl)(s.unref(r).cube.dimensions,x.id))==null?void 0:b.name),1),x.select?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(["mega-tag-count",{exclude:(x==null?void 0:x.filter_type)==="exclude"}])},"("+s.toDisplayString((C=x.select)==null?void 0:C.length)+")",3)):s.createCommentVNode("",!0),x.id!==s.unref(r).cube.primaryTimeAttribute?(s.openBlock(),s.createElementBlock("div",{key:1,class:"mega-tag-action",onClick:s.withModifiers(k=>l(x),["stop"])},[s.createVNode(s.unref(Mi))],8,Rie)):s.createCommentVNode("",!0)],2)]}),_:2},1032,["visible","onUpdate:visible","onVisibleChange"]))])]),_:1},8,["modelValue","handle"])],64))}}),Fie=t=>{const e=[10,25,50,100];let r=[];return Array.isArray(t)&&(r=e.concat(t)),typeof t=="number"&&(e.push(t),r=e),wn(Jo(r))},zie={class:"split-form"},Hie={class:"split-form__body"},Uie={class:"split-form__footer"},jie=s.createTextVNode("Cancel"),Yie=s.createTextVNode("OK"),Gie=s.defineComponent({props:{dimension:{type:Object,default:null},visible:{type:Boolean,default:!1},isTime:{type:Boolean,default:!1}},emits:["onCancel","onOk"],setup(t,{emit:e}){const r=t,n=s.inject("cubeState"),a=s.inject("currentState"),i=s.ref({sortField:"",sortType:"DESC",limit:void 0,interval:1,granularity:"d"}),o=[{label:"ASC",value:"ASC"},{label:"DESC",value:"DESC"}],l=s.computed(()=>{const m=[{label:r.dimension.name,value:r.dimension.id}];return at(a.cube.measures).forEach(g=>{m.push({label:g.name,value:g.id}),Ro(n.range)&&(m.push({label:`${g.name} Previous`,value:`${g.id}_pre`}),m.push({label:`${g.name} Difference`,value:`${g.id}_delta`}))}),m}),c=s.computed(()=>{var g;const m=[{label:"None",value:"None"}],v=Fie((g=a==null?void 0:a.cube)==null?void 0:g.maxLimit).map(y=>({label:y,value:y}));return r.isTime?[...v,...m]:v}),u=s.computed(()=>{const m=i.value.granularity;return r.dimension.intervals&&m?r.dimension.intervals[i.value.granularity].map(v=>({label:`${v}${Hn[m]}`,value:v})):[{label:`1${Hn[i.value.granularity]}`,value:1}]}),f=s.computed(()=>r.isTime?k0(Hn,!0).filter(v=>r.dimension.granularities.includes(v.value)):[]),d=()=>{e("onCancel",r.dimension.id)},h=()=>{const m={id:r.dimension.id,sortField:i.value.sortField,sortType:i.value.sortType,limit:i.value.limit};r.isTime&&(m.interval=i.value.interval,m.granularity=i.value.granularity),e("onOk",m)},p=()=>{var v;const m=s.toRaw(n.splits.find(g=>g.id===r.dimension.id));if(m.sortField)i.value.granularity=m.granularity,i.value.interval=m.interval,i.value.sortField=m.sortField,i.value.sortType=m.sortType,i.value.limit=m.limit;else{const g=(v=n.measures.filter(y=>!Yr(y)))!=null?v:[];i.value.sortField=r.isTime?r.dimension.id:g[0],i.value.sortType="DESC",i.value.limit=r.isTime?"None":a.cube.defaultLimit||25,i.value.interval=1,i.value.granularity=a.cube.defaultSelectedGranularity||"d"}};return s.onMounted(()=>{p()}),(m,v)=>(s.openBlock(),s.createElementBlock("div",zie,[s.createElementVNode("div",Hie,[s.createVNode(s.unref(R.Form),{"label-col":{span:8},"wrapper-col":{span:16}},{default:s.withCtx(()=>[t.isTime?(s.openBlock(),s.createBlock(s.unref(R.Form).Item,{key:0,name:"granularity",label:"Granularity"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Select),{disabled:s.unref(f).length===1,options:s.unref(f),value:i.value.granularity,"onUpdate:value":v[0]||(v[0]=g=>i.value.granularity=g),getPopupContainer:g=>g.parentNode},null,8,["disabled","options","value","getPopupContainer"])]),_:1})):s.createCommentVNode("",!0),t.isTime?(s.openBlock(),s.createBlock(s.unref(R.Form).Item,{key:1,name:"time_interval",label:"Time Interval"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Select),{getPopupContainer:g=>g.parentNode,options:s.unref(u),value:i.value.interval,"onUpdate:value":v[1]||(v[1]=g=>i.value.interval=g)},null,8,["getPopupContainer","options","value"])]),_:1})):s.createCommentVNode("",!0),s.createVNode(s.unref(R.Form).Item,{label:"Sort Field"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Select),{getPopupContainer:g=>g.parentNode,options:s.unref(l),value:i.value.sortField,"onUpdate:value":v[2]||(v[2]=g=>i.value.sortField=g)},null,8,["getPopupContainer","options","value"])]),_:1}),s.createVNode(s.unref(R.Form).Item,{label:"Sort By"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Select),{getPopupContainer:g=>g.parentNode,options:o,value:i.value.sortType,"onUpdate:value":v[3]||(v[3]=g=>i.value.sortType=g)},null,8,["getPopupContainer","value"])]),_:1}),s.createVNode(s.unref(R.Form).Item,{name:"limit",label:"Limit"},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Select),{getPopupContainer:g=>g.parentNode,options:s.unref(c),value:i.value.limit,"onUpdate:value":v[4]||(v[4]=g=>i.value.limit=g)},null,8,["getPopupContainer","options","value"])]),_:1})]),_:1})]),s.createElementVNode("div",Uie,[s.createElementVNode("div",null,[s.createVNode(s.unref(R.Button),{type:"link",onClick:d},{default:s.withCtx(()=>[jie]),_:1}),s.createVNode(s.unref(R.Button),{type:"primary",onClick:h},{default:s.withCtx(()=>[Yie]),_:1})])])]))}}),Wie={class:"handle"},Zie={class:"mega-tag"},qie={key:0,class:"font-bold"},Xie=["onClick"],Kie=s.defineComponent({setup(t){const e=s.inject("cubeState"),r=s.inject("currentState"),n=s.computed(()=>zl()?"none":".handle"),a=s.computed({get(){return e.splits},set(p){const m=Ye(p);e.splits=m.map(v=>te({},v))}}),i=p=>{e.splits.push({id:p.dimension.id})},o=s.ref({}),l=p=>{const m=qo(a.value,{id:p.id});a.value.splice(m,1),delete o.value[p.id]},c=(p,m)=>{var S;const{draggedContext:v,relatedContext:g}=p,{element:y}=v,_=g.list,w=((S=r.cube)==null?void 0:S.fixSplit)||[];if(v.futureIndex<=w.length-1||w.includes(v.element.id))return!1;if(p.to.className===p.from.className)return!0;if(Ko(_,{id:y.id}))return!1},u=()=>{Object.keys(o.value).forEach(p=>{o.value[p]=!1})};s.onMounted(()=>{window.addEventListener("onBeforeDragMove",u)}),s.onBeforeUnmount(()=>{window.removeEventListener("onBeforeDragMove",u)});const f=(p,m)=>{window.dispatchEvent(new Event("onBeforeDragMove"))},d=p=>{o.value[p]=!1},h=p=>{o.value[p.id]=!1;const m=e.splits.findIndex(v=>v.id===p.id);e.splits[m]=te({},p)};return(p,m)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(tM,{title:"Split",type:"split",onOnAdd:i}),s.createVNode(s.unref(Sa.default),{class:"drag-content draggable-split",sort:!0,handle:s.unref(n),"item-key":"id",modelValue:s.unref(a),"onUpdate:modelValue":m[0]||(m[0]=v=>s.isRef(a)?a.value=v:null),group:{name:"dimension",pull:"clone",put:"dimension"},move:c,onStart:f},{item:s.withCtx(({element:v})=>[s.createElementVNode("div",Wie,[s.createVNode(s.unref(R.Popover),{visible:o.value[v.id],"onUpdate:visible":g=>o.value[v.id]=g,placement:"bottom",trigger:"click",destroyTooltipOnHide:"",overlayClassName:"split-pop-container"},{content:s.withCtx(()=>[s.createVNode(Gie,{"is-time":s.unref(Io)(s.unref(r).cube,v.id),visible:o.value[v.id],dimension:s.unref(Fl)(s.unref(r).cube.dimensions,v.id),onOnCancel:d,onOnOk:h},null,8,["is-time","visible","dimension"])]),default:s.withCtx(()=>{var g,y,_,w,S,x;return[s.createElementVNode("div",Zie,[s.createTextVNode(s.toDisplayString((g=s.unref(Fl)(s.unref(r).cube.dimensions,v.id))==null?void 0:g.name)+" ",1),v.id===((_=(y=s.unref(r))==null?void 0:y.cube)==null?void 0:_.primaryTimeAttribute)?(s.openBlock(),s.createElementBlock("span",qie," ("+s.toDisplayString(s.unref(G5)((x=v==null?void 0:v.granularity)!=null?x:(S=(w=s.unref(r))==null?void 0:w.cube)==null?void 0:S.defaultSelectedGranularity))+") ",1)):s.createCommentVNode("",!0),s.createElementVNode("div",{class:"mega-tag-action",onClick:s.withModifiers(b=>l(v),["stop"])},[s.createVNode(s.unref(Mi))],8,Xie)])]}),_:2},1032,["visible","onUpdate:visible"])])]),_:1},8,["handle","modelValue"])],64))}}),Jie={class:"mega-add-dimension"},Qie={class:"add-title"},eoe={key:0,class:"mega-search-list"},toe=["onClick"],roe={class:"add-search"},noe=s.defineComponent({props:{title:{type:String,default:""},type:{type:String,default:"measure"}},emits:["onAdd"],setup(t,{emit:e}){const r=t,n=s.inject("currentState"),a=s.inject("cubeState"),i=s.ref(""),o=s.computed(()=>{const u=i.value,f=at(n.cube.measures),d=a.measures,h=f.filter(p=>!d.includes(p.id));return u?h.filter(p=>p.id.toLowerCase().includes(u.toLowerCase())||p.name.toLowerCase().includes(u.toLowerCase())):h}),l=s.ref(!1),c=u=>{e("onAdd",{measure:u,type:r.type}),l.value=!1};return(u,f)=>(s.openBlock(),s.createElementBlock("div",Jie,[s.createElementVNode("span",Qie,s.toDisplayString(t.title),1),s.createVNode(s.unref(R.Popover),{visible:l.value,"onUpdate:visible":f[1]||(f[1]=d=>l.value=d),placement:"bottomLeft",trigger:"click",overlayClassName:"mega-add-dimension"},{content:s.withCtx(()=>[s.unref(o).length>0?(s.openBlock(),s.createElementBlock("ul",eoe,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(o),d=>(s.openBlock(),s.createElementBlock("li",{key:d.id,onClick:h=>c(d)},s.toDisplayString(d.name),9,toe))),128))])):(s.openBlock(),s.createBlock(lr,{key:1}))]),title:s.withCtx(()=>[s.createElementVNode("div",roe,[s.createVNode(s.unref(R.Input),{placeholder:"Search Key",ref:"inputRef",allowClear:"",value:i.value,"onUpdate:value":f[0]||(f[0]=d=>i.value=d)},{prefix:s.withCtx(()=>[s.createVNode(s.unref(Ca))]),_:1},8,["value"])])]),default:s.withCtx(()=>[s.createVNode(s.unref(yd),{class:"add-icon"})]),_:1},8,["visible"])]))}}),aoe={class:"handle"},ioe=["onClick"],ooe=s.defineComponent({setup(t){const e=s.inject("cubeState"),r=s.inject("currentState"),n=s.computed(()=>zl()?"none":".handle"),a=s.computed({get(){return e.measures},set(f){const d=Ye(f);e.measures=[...d]}}),i=f=>{var d;e.measures.push((d=f==null?void 0:f.measure)==null?void 0:d.id),ce.emit("on-add-measure")},o=f=>{var h;const d=qo(a.value,p=>p===f);if(a.value.splice(d,1),Yr(f)){const p=e.custom_measures.findIndex(m=>m===f);d>-1&&((h=e.custom_measures)==null||h.splice(p,1))}s.nextTick(()=>{ce.emit("on-remove-measure")})},l=(f,d)=>{const{draggedContext:h,relatedContext:p}=f,{element:m}=h,v=p.list;if(f.to.className===f.from.className)return!0;if(Ko(v,{id:m.id}))return!1},c=(f,d)=>{window.dispatchEvent(new Event("onBeforeDragMove"))},u=f=>{f&&f.moved&&ce.emit("on-sort-measure")};return(f,d)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(noe,{title:"Measure",type:"measure",onOnAdd:i}),s.createVNode(s.unref(Sa.default),{class:"drag-content draggable-measure",sort:!0,handle:s.unref(n),"item-key":"id",modelValue:s.unref(a),"onUpdate:modelValue":d[0]||(d[0]=h=>s.isRef(a)?a.value=h:null),group:{name:"measure",pull:"clone",put:"measure"},move:l,onStart:c,onChange:u},{item:s.withCtx(({element:h})=>{var p,m;return[s.createElementVNode("div",aoe,[s.createElementVNode("div",{class:s.normalizeClass(["mega-tag",{dashed:h.startsWith("field_")}])},[s.createTextVNode(s.toDisplayString(h.startsWith("field_")?(p=s.unref(Q5)(s.unref(r).custom,h))==null?void 0:p.name:(m=s.unref(J5)(s.unref(r).cube.measures,h))==null?void 0:m.name)+" ",1),s.createElementVNode("div",{class:"mega-tag-action",onClick:s.withModifiers(v=>o(h),["stop"])},[s.createVNode(s.unref(Mi))],8,ioe)],2)])]}),_:1},8,["handle","modelValue"])],64))}}),soe={class:"mega-dragarea"},loe={class:"mega-dragarea__body"},coe={class:"mega-dragarea__body"},uoe={class:"mega-dragarea__body"},foe=s.defineComponent({setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("div",soe,[s.createElementVNode("div",loe,[s.createVNode(Vie)]),s.createElementVNode("div",coe,[s.createVNode(Kie)]),s.createElementVNode("div",uoe,[s.createVNode(ooe)])]))}}),doe={class:"mega-menu-fold"},hoe={class:"measure-control"},poe=s.createTextVNode(" Check All "),moe=s.createTextVNode("Clear"),voe=s.defineComponent({props:{value:{type:Boolean,default:!0},measures:{type:Array,default:()=>[]},selected:{type:Array,default:()=>[]}},emits:["change","update:value","onCheckedAll"],setup(t,{emit:e}){const r=t,n=()=>{e("change",!r.value),e("update:value",!r.value),window.dispatchEvent(new Event("resize"))},a=s.computed(()=>at(r.measures)),i=s.reactive({checkAll:!1,indeterminate:!0}),o=s.inject("cubeState"),l=u=>{if(u.target.checked){const f=a.value.map(d=>d.id);o.custom_measures=[],o.measures=[...f],ce.emit("on-add-measure")}else o.measures=[],o.custom_measures=[],ce.emit("on-remove-measure")},c=()=>{o.measures=[],o.custom_measures=[],ce.emit("on-remove-measure")};return s.onMounted(()=>{i.checkAll=o.measures.length===a.value.length}),s.watch(()=>o.measures,u=>{i.indeterminate=!!u.length&&u.length<a.value.length,i.checkAll=u.length===a.value.length}),(u,f)=>(s.openBlock(),s.createElementBlock("div",doe,[s.createElementVNode("div",hoe,[s.createVNode(s.unref(R.Checkbox),{checked:s.unref(i).checkAll,"onUpdate:checked":f[0]||(f[0]=d=>s.unref(i).checkAll=d),indeterminate:s.unref(i).indeterminate,onChange:l},{default:s.withCtx(()=>[poe]),_:1},8,["checked","indeterminate"]),s.createVNode(s.unref(R.Button),{type:"link",onClick:c},{default:s.withCtx(()=>[moe]),_:1})]),s.createVNode(s.unref(bE),{onClick:n,class:s.normalizeClass(["mega-menu-fold-icon",{closed:t.value===!1}])},null,8,["class"])]))}}),goe={class:"item-list"},yoe=["onClick"],_oe={class:"legend-label"},woe={class:"we-legend"},boe=s.createTextVNode(" Legend "),Soe=s.defineComponent({props:{isCompare:{type:Boolean,default:!1}},setup(t){const e=t,r=s.ref([]),n=l=>{if(r.value=[],l.length>0){const{color:c,legend:u}=l[0].options,f=u.selected,d=[];u.data.forEach((h,p)=>{const m={key:h,value:f[h],color:c[p%c.length]};d.push(m)}),r.value=d}},a=s.computed(()=>e.isCompare?4:9),i=s.computed(()=>r.value.filter(l=>l.value).map(l=>l.key)),o=l=>{if(i.value.length===a.value+1&&!i.value.includes(l))return!1;ce.emit("updateLegend",l)};return s.onBeforeUnmount(()=>{ce.off("renderLegend",n)}),s.onMounted(()=>{ce.on("renderLegend",n)}),(l,c)=>(s.openBlock(),s.createBlock(s.unref(R.Popover),{placement:"topRight",trigger:"click",overlayClassName:"item-list-container legend-container clear-padding"},{content:s.withCtx(()=>[s.createElementVNode("ul",goe,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.value,u=>(s.openBlock(),s.createElementBlock("li",{key:u.key,onClick:f=>o(u.key)},[s.createVNode(s.unref(R.Space),null,{default:s.withCtx(()=>[s.createElementVNode("div",{style:s.normalizeStyle({display:"inline-flex",color:u.value?u.color:"#fff"})},[s.createVNode(s.unref(S0))],4),s.createElementVNode("div",_oe,s.toDisplayString(u.key),1)]),_:2},1024)],8,yoe))),128))])]),default:s.withCtx(()=>[s.createElementVNode("div",woe,[s.createVNode(s.unref(S0)),boe,s.createVNode(s.unref(kd),{class:"up"})])]),_:1}))}}),xoe={class:"mega-cube-panel"},Coe=s.defineComponent({setup(t){const e=s.inject("styleState"),r=s.inject("cubeState"),n=s.computed(()=>{const A=r.visual;return Pl.find(M=>M.name===A)}),a=s.computed(()=>Ro(r.range)),i=s.computed(()=>r.splits.length===2&&["lineChart","barChart","stackLineChart","stackBarChart"].includes(r.visual)),o=s.inject("currentState"),l=s.computed(()=>{var A;return(A=o.cube.manualRefresh)!=null?A:!1}),c=s.ref({success:!1,message:""}),u=()=>{var E,D,P,I;if(f.value=null,!((E=o==null?void 0:o.cube)==null?void 0:E.id))return;const A=at(o.cube.dimensions),L=r.splits.map(V=>V.id),M=A.filter(V=>L.includes(V.id)),O=A.find(V=>V.kind==="time"),T=r.splits.find(V=>V.id===O.id);$d(r.visual,M,r.measures,{drillCount:o.cube.drillCount||o.cube.maxSplit,granularity:(T==null?void 0:T.granularity)||((D=o.cube)==null?void 0:D.defaultSelectedGranularity)||((P=o.cube)==null?void 0:P.primaryTimeGranularity),range:((I=r==null?void 0:r.range)==null?void 0:I.current_time)||[],cube:te({},o.cube)}).then(V=>{c.value=V,_()},V=>{c.value=V})},f=s.ref(null),d=s.computed(()=>{const A=at(o.cube.measures),L=r.measures;return A.filter(O=>L.includes(O.id)).sort((O,T)=>L.indexOf(O.id)-L.indexOf(T.id))}),h=s.computed(()=>{const A=at(o.cube.dimensions),L=r.splits.map(T=>T.id);return A.filter(T=>L.includes(T.id)).sort((T,E)=>L.indexOf(T.id)-L.indexOf(E.id))}),p=s.computed(()=>o.custom.filter(O=>r.custom_measures.includes(O.id)).sort((O,T)=>r.custom_measures.indexOf(O.id)-r.custom_measures.indexOf(T.id))),m=s.inject("getHeader"),v=s.inject("getAuth"),g=s.ref(!1),y=s.ref(null),_=()=>{var A;g.value&&(g.value=!1,(A=y.value)==null||A.cancel()),setTimeout(()=>{var E;const L=mh(o.cube,r),M=o.cube.data_cube_id,O=o.cube.data_set_id,T=v();((E=L==null?void 0:L.measure)==null?void 0:E.length)!==0&&(g.value=!0,y.value=Xl(),window._mega.data=null,y.value.request("pivot",L,te({data_cube_id:M,trans_data_set_id:O},T),te({},m())).then(D=>{g.value=!1,f.value=D==null?void 0:D.data,window._mega.data=D==null?void 0:D.data},D=>{g.value=!1}))},100)},w=()=>{var A,L;!window._mega.data||(g.value?(g.value=!1,(A=y.value)==null||A.cancel()):(g.value=!0,f.value=(L=window._mega.data)!=null?L:null),setTimeout(()=>{g.value=!1},100))},S=()=>{w()},x=()=>{w()},b=()=>{s.nextTick(()=>{l.value?(window._mega.data=null,f.value=null):u()})},C=()=>{s.nextTick(()=>{l.value?(window._mega.data=null,f.value=null):u()})};s.onMounted(()=>{ce.on("on-refresh",u),ce.on("on-params-change",C),ce.on("on-add-measure",b),ce.on("on-remove-measure",S),ce.on("on-sort-measure",x)}),s.onBeforeUnmount(()=>{ce.off("on-refresh",u),ce.off("on-params-change",C),ce.off("on-add-measure",b),ce.off("on-remove-measure",S),ce.off("on-sort-measure",x)});const k=A=>{r.measures.splice(A,1)},$=A=>{const L=o.cube.primaryTimeAttribute;A.forEach(M=>{var P,I,V;const{index:O}=M,T=M.id,E=r.splits[O],D=r.filters.find(F=>F.id===E.id);if(L!==E.id)D?(D==null?void 0:D.filter_type)?!D.select.includes(T)&&D.select.push(T):(D.filter_type="include",D.select=[T]):r.filters.push({id:E.id,filter_type:"include",select:[T]});else{const F=M.id_pre;let H=[],Y=[];const Q=o.cube.primaryTimeGranularity,ae=(V=(I=E==null?void 0:E.granularity)!=null?I:(P=o.cube)==null?void 0:P.defaultSelectedGranularity)!=null?V:"d";let le=[T,T],ye=[F,F];if(Q==="h"&&ae==="d")le=[`${T} 00:00`,`${T} 23:00`],F&&(ye=[`${F} 00:00`,`${F} 23:00`]);else if(Q==="h"&&ae==="month"){const de=["YYYY-MM-DD 00:00","YYYY-MM-DD 23:00"];le=[fe(T).date(1).format(de[0]),fe(T).date(fe(T).daysInMonth()).format(de[1])],F&&(ye=[fe(F).date(1).format(de[0]),fe(F).date(fe(F).daysInMonth()).format(de[1])])}else if(Q==="m"){const de=["YYYY-MM-DD HH:00","YYYY-MM-DD HH:59"];le=[fe(T).format(de[0]),fe(T).format(de[1])],F&&(ye=[fe(F).format(de[0]),fe(F).format(de[1])])}H=jn(le,ae,Q),F&&(Y=jn(ye,ae,Q)),r.range.current_time=H,r.range.previous_time=Y}}),s.nextTick(()=>{l.value?f.value=null:u()})},N=({property:A,order:L})=>{const M=o.cube.primaryTimeAttribute;r.splits.forEach(O=>{var T;O.sortType=(L==null?void 0:L.toUpperCase())||"DESC",O.sortField=A,O.limit=O.limit==="None"?0:O.limit||o.cube.defaultLimit||25,O.id===M&&(O.granularity=(O==null?void 0:O.granularity)||o.cube.defaultSelectedGranularity||"d",O.interval=(T=O==null?void 0:O.interval)!=null?T:1)}),l.value&&s.nextTick(()=>{u()})};return s.watch(()=>[r.splits,r.timezone,r.visual],(A,L)=>{l.value?(f.value=null,window._mega.data=null):u()},{immediate:!0,deep:!0}),(A,L)=>(s.openBlock(),s.createBlock(s.unref(R.Spin),{spinning:g.value},{default:s.withCtx(()=>[s.createElementVNode("div",xoe,[c.value.success&&!g.value&&f.value&&s.unref(d).length>0?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(n).component),{key:0,"origin-data":f.value,"origin-measures":s.unref(r).measures,"custom-measures":s.unref(p),"selected-measures":s.unref(d),"selected-splits":s.unref(h),cube:s.unref(o).cube,"current-vis-state":s.unref(r),"is-compare":s.unref(a),"style-state":s.unref(e),onOnRemoveMeasure:k,onOnAddTableFilter:$,onOnChangeTableSort:N},null,8,["origin-data","origin-measures","custom-measures","selected-measures","selected-splits","cube","current-vis-state","is-compare","style-state"])):s.createCommentVNode("",!0),!c.value.success&&!g.value?(s.openBlock(),s.createBlock(JT,{key:1,msg:c.value.message},null,8,["msg"])):s.createCommentVNode("",!0),s.unref(i)&&c.value.success&&!g.value?(s.openBlock(),s.createBlock(Soe,{key:2,"is-compare":s.unref(a)},null,8,["is-compare"])):s.createCommentVNode("",!0)])]),_:1},8,["spinning"]))}}),koe={class:"mega-setup-content"},Toe={class:"mega-content"},Moe={class:"mega-content__vis"},$oe=s.defineComponent({setup(t){const e=s.inject("currentState"),r=s.inject("cubeState"),n=s.inject("uiState");return(a,i)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",{class:s.normalizeClass(["mega-setup",{closed:!s.unref(n).layout.menu_expand}])},[s.createElementVNode("div",koe,[s.createVNode(Ore,{dimensions:s.unref(e).cube.dimensions},null,8,["dimensions"]),s.createVNode(Rne,{measures:s.unref(e).cube.measures},null,8,["measures"])]),s.createVNode(voe,{measures:s.unref(e).cube.measures,selected:s.unref(r).measures,value:s.unref(n).layout.menu_expand,"onUpdate:value":i[0]||(i[0]=o=>s.unref(n).layout.menu_expand=o)},null,8,["measures","selected","value"])],2),s.createElementVNode("div",Toe,[s.createVNode(foe),s.createElementVNode("div",Moe,[s.createVNode(Coe)])])],64))}});s.defineComponent({name:"OnClickOutside",props:["as"],emits:["trigger"],setup(t,{slots:e,emit:r}){const n=s.ref();return T7(n,a=>{r("trigger",a)}),()=>{if(e.default)return s.h(t.as||"div",{ref:n},e.default())}}});function Noe(t){var e;const r=s.unref(t);return(e=r==null?void 0:r.$el)!=null?e:r}const Ci=Xr?window:void 0;function xM(...t){let e,r,n,a;if(q1(t[0])?([r,n,a]=t,e=Ci):[e,r,n,a]=t,!e)return Cn;let i=Cn;const o=s.watch(()=>s.unref(e),c=>{i(),!!c&&(c.addEventListener(r,n,a),i=()=>{c.removeEventListener(r,n,a),i=Cn})},{immediate:!0,flush:"post"}),l=()=>{o(),i()};return qr(l),l}s.defineComponent({name:"UseActiveElement",setup(t,{slots:e}){const r=s.reactive({element:M7()});return()=>{if(e.default)return e.default(r)}}}),s.defineComponent({name:"UseBattery",setup(t,{slots:e}){const r=s.reactive($7(t));return()=>{if(e.default)return e.default(r)}}}),s.defineComponent({name:"UseBrowserLocation",setup(t,{slots:e}){const r=s.reactive(N7());return()=>{if(e.default)return e.default(r)}}});const l0="__vueuse_ssr_handlers__";globalThis[l0]=globalThis[l0]||{};const Eoe=globalThis[l0];function CM(t,e){return Eoe[t]||e}function Aoe(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"||Array.isArray(t)?"object":Number.isNaN(t)?"any":"number"}const Doe={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))}};function Ooe(t,e,r,n={}){var a;const{flush:i="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,shallow:u,window:f=Ci,eventFilter:d,onError:h=_=>{console.error(_)}}=n,p=s.unref(e),m=Aoe(p),v=(u?s.shallowRef:s.ref)(e),g=(a=n.serializer)!=null?a:Doe[m];if(!r)try{r=CM("getDefaultStorage",()=>{var _;return(_=Ci)==null?void 0:_.localStorage})()}catch(_){h(_)}function y(_){if(!(!r||_&&_.key!==t))try{const w=_?_.newValue:r.getItem(t);w==null?(v.value=p,c&&p!==null&&r.setItem(t,g.write(p))):typeof w!="string"?v.value=w:v.value=g.read(w)}catch(w){h(w)}}return y(),f&&l&&xM(f,"storage",_=>setTimeout(()=>y(_),0)),r&&J1(v,()=>{try{v.value==null?r.removeItem(t):r.setItem(t,g.write(v.value))}catch(_){h(_)}},{flush:i,deep:o,eventFilter:d}),v}function Loe(t,e={}){const{window:r=Ci}=e;let n;const a=s.ref(!1),i=()=>{!r||(n||(n=r.matchMedia(t)),a.value=n.matches)};return La(()=>{i(),!!n&&("addEventListener"in n?n.addEventListener("change",i):n.addListener(i),qr(()=>{"removeEventListener"in i?n.removeEventListener("change",i):n.removeListener(i)}))}),a}function Poe(t){return Loe("(prefers-color-scheme: dark)",t)}var Boe=Object.defineProperty,kM=Object.getOwnPropertySymbols,Ioe=Object.prototype.hasOwnProperty,Roe=Object.prototype.propertyIsEnumerable,TM=(t,e,r)=>e in t?Boe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Voe=(t,e)=>{for(var r in e||(e={}))Ioe.call(e,r)&&TM(t,r,e[r]);if(kM)for(var r of kM(e))Roe.call(e,r)&&TM(t,r,e[r]);return t};function Foe(t={}){const{selector:e="html",attribute:r="class",window:n=Ci,storage:a,storageKey:i="vueuse-color-scheme",listenToStorageChanges:o=!0,storageRef:l}=t,c=Voe({auto:"",light:"light",dark:"dark"},t.modes||{}),u=Poe({window:n}),f=s.computed(()=>u.value?"dark":"light"),d=l||(i==null?s.ref("auto"):Ooe(i,"auto",a,{window:n,listenToStorageChanges:o})),h=s.computed({get(){return d.value==="auto"?f.value:d.value},set(g){d.value=g}}),p=CM("updateHTMLAttrs",(g,y,_)=>{const w=n==null?void 0:n.document.querySelector(g);if(!!w)if(y==="class"){const S=_.split(/\s/g);Object.values(c).flatMap(x=>(x||"").split(/\s/g)).filter(Boolean).forEach(x=>{S.includes(x)?w.classList.add(x):w.classList.remove(x)})}else w.setAttribute(y,_)});function m(g){var y;p(e,r,(y=c[g])!=null?y:g)}function v(g){t.onChanged?t.onChanged(g,m):m(g)}return s.watch(h,v,{flush:"post",immediate:!0}),La(()=>v(h.value)),h}s.defineComponent({name:"UseColorMode",props:["selector","attribute","modes","onChanged","storageKey","storage"],setup(t,{slots:e}){const r=Foe(t),n=s.reactive({mode:r});return()=>{if(e.default)return e.default(n)}}}),s.defineComponent({name:"UseDark",props:["selector","attribute","valueDark","valueLight","onChanged","storageKey","storage"],setup(t,{slots:e}){const r=G7(t),n=s.reactive({isDark:r,toggleDark:k7(r)});return()=>{if(e.default)return e.default(n)}}}),s.defineComponent({name:"UseDeviceMotion",setup(t,{slots:e}){const r=s.reactive(W7());return()=>{if(e.default)return e.default(r)}}}),s.defineComponent({name:"UseDeviceOrientation",setup(t,{slots:e}){const r=s.reactive(Z7());return()=>{if(e.default)return e.default(r)}}}),s.defineComponent({name:"UseDevicePixelRatio",setup(t,{slots:e}){const r=s.reactive({pixelRatio:X7()});return()=>{if(e.default)return e.default(r)}}}),s.defineComponent({name:"UseDevicesList",props:["onUpdated","requestPermissions","constraints"],setup(t,{slots:e}){const r=s.reactive(J7(t));return()=>{if(e.default)return e.default(r)}}}),s.defineComponent({name:"UseDocumentVisibility",setup(t,{slots:e}){const r=s.reactive({visibility:Q7()});return()=>{if(e.default)return e.default(r)}}});var zoe=Object.defineProperty,Hoe=Object.defineProperties,Uoe=Object.getOwnPropertyDescriptors,MM=Object.getOwnPropertySymbols,joe=Object.prototype.hasOwnProperty,Yoe=Object.prototype.propertyIsEnumerable,$M=(t,e,r)=>e in t?zoe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Goe=(t,e)=>{for(var r in e||(e={}))joe.call(e,r)&&$M(t,r,e[r]);if(MM)for(var r of MM(e))Yoe.call(e,r)&&$M(t,r,e[r]);return t},Woe=(t,e)=>Hoe(t,Uoe(e));s.defineComponent({name:"UseDraggable",props:["storageKey","initialValue","exact","preventDefault","pointerTypes","as"],setup(t,{slots:e}){const r=s.ref(),n=t.storageKey?i_(t.storageKey,s.unref(t.initialValue)||{x:0,y:0},Xr?t.storageType==="session"?sessionStorage:localStorage:void 0):t.initialValue||{x:0,y:0},a=s.reactive(sR(r,Woe(Goe({},t),{initialValue:n})));return()=>{if(e.default)return s.h(t.as||"div",{ref:r,style:`touch-action:none;${a.style}`},e.default(a))}}}),s.defineComponent({name:"UseElementBounding",props:["box","as"],setup(t,{slots:e}){const r=s.ref(),n=s.reactive(fR(r));return()=>{if(e.default)return s.h(t.as||"div",{ref:r},e.default(n))}}}),s.defineComponent({name:"UseElementSize",props:["width","height","box"],setup(t,{slots:e}){const r=s.ref(),n=s.reactive(p_(r,{width:t.width,height:t.height},{box:t.box}));return()=>{if(e.default)return s.h(t.as||"div",{ref:r},e.default(n))}}}),s.defineComponent({name:"UseElementVisibility",props:["as"],setup(t,{slots:e}){const r=s.ref(),n=s.reactive({isVisible:dR(r)});return()=>{if(e.default)return s.h(t.as||"div",{ref:r},e.default(n))}}}),s.defineComponent({name:"UseEyeDropper",props:{sRGBHex:String},setup(t,{slots:e}){const r=s.reactive(hR());return()=>{if(e.default)return e.default(r)}}});const Zoe=s.defineComponent({name:"UseFullscreen",props:["as"],setup(t,{slots:e}){const r=s.ref(),n=s.reactive(pR(r));return()=>{if(e.default)return s.h(t.as||"div",{ref:r},e.default(n))}}});s.defineComponent({name:"UseGeolocation",props:["enableHighAccuracy","maximumAge","timeout","navigator"],setup(t,{slots:e}){const r=s.reactive(mR(t));return()=>{if(e.default)return e.default(r)}}}),s.defineComponent({name:"UseIdle",props:["timeout","events","listenForVisibilityChange","initialState"],setup(t,{slots:e}){const r=s.reactive(yR(t.timeout,t));return()=>{if(e.default)return e.default(r)}}}),s.defineComponent({name:"UseMouse",props:["touch","resetOnTouchEnds","initialValue"],setup(t,{slots:e}){const r=s.reactive(v_(t));return()=>{if(e.default)return e.default(r)}}}),s.defineComponent({name:"UseMouseElement",props:["handleOutside","as"],setup(t,{slots:e}){const r=s.ref(),n=s.reactive(_R(r,t));return()=>{if(e.default)return s.h(t.as||"div",{ref:r},e.default(n))}}});var qoe=Object.defineProperty,Xoe=Object.defineProperties,Koe=Object.getOwnPropertyDescriptors,NM=Object.getOwnPropertySymbols,Joe=Object.prototype.hasOwnProperty,Qoe=Object.prototype.propertyIsEnumerable,EM=(t,e,r)=>e in t?qoe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ese=(t,e)=>{for(var r in e||(e={}))Joe.call(e,r)&&EM(t,r,e[r]);if(NM)for(var r of NM(e))Qoe.call(e,r)&&EM(t,r,e[r]);return t},tse=(t,e)=>Xoe(t,Koe(e));s.defineComponent({name:"UseMousePressed",props:["touch","initialValue","as"],setup(t,{slots:e}){const r=s.ref(),n=s.reactive(wR(tse(ese({},t),{target:r})));return()=>{if(e.default)return s.h(t.as||"div",{ref:r},e.default(n))}}}),s.defineComponent({name:"UseNetwork",setup(t,{slots:e}){const r=s.reactive(g_());return()=>{if(e.default)return e.default(r)}}});var rse=Object.defineProperty,nse=Object.defineProperties,ase=Object.getOwnPropertyDescriptors,AM=Object.getOwnPropertySymbols,ise=Object.prototype.hasOwnProperty,ose=Object.prototype.propertyIsEnumerable,DM=(t,e,r)=>e in t?rse(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,sse=(t,e)=>{for(var r in e||(e={}))ise.call(e,r)&&DM(t,r,e[r]);if(AM)for(var r of AM(e))ose.call(e,r)&&DM(t,r,e[r]);return t},lse=(t,e)=>nse(t,ase(e));s.defineComponent({name:"UseNow",props:["interval"],setup(t,{slots:e}){const r=s.reactive(w_(lse(sse({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}}),s.defineComponent({name:"UseOnline",setup(t,{slots:e}){const r=s.reactive({isOnline:kR()});return()=>{if(e.default)return e.default(r)}}}),s.defineComponent({name:"UsePageLeave",setup(t,{slots:e}){const r=s.reactive({isLeft:TR()});return()=>{if(e.default)return e.default(r)}}});var cse=Object.defineProperty,use=Object.defineProperties,fse=Object.getOwnPropertyDescriptors,OM=Object.getOwnPropertySymbols,dse=Object.prototype.hasOwnProperty,hse=Object.prototype.propertyIsEnumerable,LM=(t,e,r)=>e in t?cse(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,pse=(t,e)=>{for(var r in e||(e={}))dse.call(e,r)&&LM(t,r,e[r]);if(OM)for(var r of OM(e))hse.call(e,r)&&LM(t,r,e[r]);return t},mse=(t,e)=>use(t,fse(e));s.defineComponent({name:"UsePointer",props:["pointerTypes","initialValue","target"],setup(t,{slots:e}){const r=s.ref(null),n=s.reactive(PR(mse(pse({},t),{target:t.target==="self"?r:Ci})));return()=>{if(e.default)return e.default(n,{ref:r})}}}),s.defineComponent({name:"UsePreferredColorScheme",setup(t,{slots:e}){const r=s.reactive({colorScheme:BR()});return()=>{if(e.default)return e.default(r)}}}),s.defineComponent({name:"UsePreferredDark",setup(t,{slots:e}){const r=s.reactive({prefersDark:Uh()});return()=>{if(e.default)return e.default(r)}}}),s.defineComponent({name:"UsePreferredLanguages",setup(t,{slots:e}){const r=s.reactive({languages:IR()});return()=>{if(e.default)return e.default(r)}}});function hd(t,e,{window:r=Ci}={}){const n=s.ref(""),a=s.computed(()=>{var i;return Noe(e)||((i=r==null?void 0:r.document)==null?void 0:i.documentElement)});return s.watch(a,i=>{i&&r&&(n.value=r.getComputedStyle(i).getPropertyValue(t))},{immediate:!0}),s.watch(n,i=>{var o;((o=a.value)==null?void 0:o.style)&&a.value.style.setProperty(t,i)}),n}const PM="--vueuse-safe-area-top",BM="--vueuse-safe-area-right",IM="--vueuse-safe-area-bottom",RM="--vueuse-safe-area-left";function vse(){const t=s.ref(""),e=s.ref(""),r=s.ref(""),n=s.ref("");if(Xr){const i=hd(PM),o=hd(BM),l=hd(IM),c=hd(RM);i.value="env(safe-area-inset-top, 0px)",o.value="env(safe-area-inset-right, 0px)",l.value="env(safe-area-inset-bottom, 0px)",c.value="env(safe-area-inset-left, 0px)",a(),xM("resize",h7(a))}function a(){t.value=pd(PM),e.value=pd(BM),r.value=pd(IM),n.value=pd(RM)}return{top:t,right:e,bottom:r,left:n,update:a}}function pd(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}s.defineComponent({name:"UseScreenSafeArea",props:{top:Boolean,right:Boolean,bottom:Boolean,left:Boolean},setup(t,{slots:e}){const{top:r,right:n,bottom:a,left:i}=vse();return()=>{if(e.default)return s.h("div",{style:{paddingTop:t.top?r.value:"",paddingRight:t.right?n.value:"",paddingBottom:t.bottom?a.value:"",paddingLeft:t.left?i.value:"",boxSizing:"border-box",maxHeight:"100vh",maxWidth:"100vw",overflow:"auto"}},e.default())}}});var gse=Object.defineProperty,yse=Object.defineProperties,_se=Object.getOwnPropertyDescriptors,VM=Object.getOwnPropertySymbols,wse=Object.prototype.hasOwnProperty,bse=Object.prototype.propertyIsEnumerable,FM=(t,e,r)=>e in t?gse(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Sse=(t,e)=>{for(var r in e||(e={}))wse.call(e,r)&&FM(t,r,e[r]);if(VM)for(var r of VM(e))bse.call(e,r)&&FM(t,r,e[r]);return t},xse=(t,e)=>yse(t,_se(e));s.defineComponent({name:"UseTimeAgo",props:["time","updateInterval","max","fullDateFormatter","messages"],setup(t,{slots:e}){const r=s.toRef(t,"time"),n=s.reactive(WR(r,xse(Sse({},t),{controls:!0})));return()=>{if(e.default)return e.default(n)}}});var Cse=Object.defineProperty,kse=Object.defineProperties,Tse=Object.getOwnPropertyDescriptors,zM=Object.getOwnPropertySymbols,Mse=Object.prototype.hasOwnProperty,$se=Object.prototype.propertyIsEnumerable,HM=(t,e,r)=>e in t?Cse(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Nse=(t,e)=>{for(var r in e||(e={}))Mse.call(e,r)&&HM(t,r,e[r]);if(zM)for(var r of zM(e))$se.call(e,r)&&HM(t,r,e[r]);return t},Ese=(t,e)=>kse(t,Tse(e));s.defineComponent({name:"UseTimestamp",props:["immediate","interval","offset"],setup(t,{slots:e}){const r=s.reactive(JR(Ese(Nse({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}});var Ase=Object.defineProperty,UM=Object.getOwnPropertySymbols,Dse=Object.prototype.hasOwnProperty,Ose=Object.prototype.propertyIsEnumerable,jM=(t,e,r)=>e in t?Ase(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,YM=(t,e)=>{for(var r in e||(e={}))Dse.call(e,r)&&jM(t,r,e[r]);if(UM)for(var r of UM(e))Ose.call(e,r)&&jM(t,r,e[r]);return t};s.defineComponent({name:"UseVirtualList",props:["list","options","height"],setup(t,{slots:e}){const{list:r}=s.toRefs(t),{list:n,containerProps:a,wrapperProps:i}=L_(r,t.options);return a.style.height=t.height||"300px",()=>s.h("div",YM({},a),[s.h("div",YM({},i.value),n.value.map(o=>s.h("div",{style:{overFlow:"hidden",height:o.height}},e.default?e.default(o):"Please set content!")))])}}),s.defineComponent({name:"UseWindowFocus",setup(t,{slots:e}){const r=s.reactive({focused:QR()});return()=>{if(e.default)return e.default(r)}}}),s.defineComponent({name:"UseWindowSize",props:["initialWidth","initialHeight"],setup(t,{slots:e}){const r=s.reactive(eV(t));return()=>{if(e.default)return e.default(r)}}});const Lse={class:"dashboard-card__title"},Pse={class:"dashboard-card_actions"},Bse={class:"item-list"},Ise=s.createTextVNode("Edit"),Rse=s.createTextVNode("Delete"),Vse={class:"dashboard-card__content"},Fse=s.defineComponent({props:{title:{type:String,default:""},dashLayout:{type:Object,default:()=>{}},isDraggable:{type:Boolean}},emits:["onDeleteLayout","onUpdateLayout","onChangeCube"],setup(t,{emit:e}){const r=t,n=s.ref(!1),a=()=>{n.value=!1,e("onUpdateLayout",r.dashLayout)},i=()=>{e("onDeleteLayout",r.dashLayout)},o=()=>{e("onChangeCube",r.dashLayout)};return(l,c)=>(s.openBlock(),s.createBlock(s.unref(Zoe),null,{default:s.withCtx(({toggle:u,isFullscreen:f})=>[s.createElementVNode("div",{class:s.normalizeClass(["dashboard-card",{fullscreen:f}]),ref:"dashCardRef"},[s.createElementVNode("div",Lse,[s.createVNode(s.unref(R.Space),{size:4},{default:s.withCtx(()=>[t.isDraggable?(s.openBlock(),s.createBlock(s.unref(LE),{key:0,class:"dash-drag"})):s.createCommentVNode("",!0),s.createElementVNode("span",null,s.toDisplayString(t.title),1)]),_:1}),s.createElementVNode("div",Pse,[s.createVNode(s.unref(R.Space),{size:20},{default:s.withCtx(()=>[s.createVNode(s.unref(YE),{class:"cursor-pointer",onClick:o}),s.createVNode(s.unref(zE),{class:"cursor-pointer",onClick:u},null,8,["onClick"]),t.isDraggable?(s.openBlock(),s.createBlock(s.unref(R.Popover),{key:0,visible:n.value,"onUpdate:visible":c[0]||(c[0]=d=>n.value=d),placement:"bottomRight",trigger:"click",overlayClassName:"item-list-container clear-padding"},{content:s.withCtx(()=>[s.createElementVNode("ul",Bse,[s.createElementVNode("li",{onClick:a},[s.createVNode(s.unref(R.Space),null,{default:s.withCtx(()=>[s.createVNode(s.unref(Vl)),Ise]),_:1})]),s.createElementVNode("li",{onClick:i},[s.createVNode(s.unref(R.Space),null,{default:s.withCtx(()=>[s.createVNode(s.unref(Po)),Rse]),_:1})])])]),default:s.withCtx(()=>[s.createVNode(s.unref(xd),{class:"cursor-pointer"})]),_:1},8,["visible"])):s.createCommentVNode("",!0)]),_:2},1024)])]),s.createElementVNode("div",Vse,[s.renderSlot(l.$slots,"default")])],2)]),_:3}))}}),zse={class:"edit-content"},Hse=s.createElementVNode("div",{style:{"flex-grow":"1"}},null,-1),Use=s.createTextVNode("Cancel"),jse=s.createTextVNode("OK"),Yse=s.defineComponent({props:{dialogVisible:{type:Boolean,default:!1},dashLayout:{type:Object,default:()=>{}}},emits:["onOk","onCancel","update:dialogVisible"],setup(t,{emit:e}){const r=t,n=()=>{e("onCancel")},a=()=>{e("onOk",{id:r.dashLayout.id,name:i.name,auto:i.auto}),n()},i=s.reactive({name:"",auto:0}),o=l=>{var c,u;if(l){const f=te({},r.dashLayout);i.name=(c=f==null?void 0:f.name)!=null?c:"",i.auto=(u=f==null?void 0:f.auto)!=null?u:0}else i.name="",i.auto=0};return s.watch(()=>r.dialogVisible,(l,c)=>{o(l)}),(l,c)=>(s.openBlock(),s.createBlock(s.unref(R.Modal),s.mergeProps({mask:!0,maskClosable:!1,onOk:a,onCancel:n,width:520,destroyOnClose:""},l.$attrs,{centered:"",title:"Edit",wrapClassName:"edit-container"}),{footer:s.withCtx(()=>[s.renderSlot(l.$slots,"left"),Hse,s.createElementVNode("div",null,[s.createVNode(s.unref(R.Button),{onClick:n},{default:s.withCtx(()=>[Use]),_:1}),s.createVNode(s.unref(R.Button),{type:"primary",onClick:a,disabled:s.unref(i).name.trim()===""},{default:s.withCtx(()=>[jse]),_:1},8,["disabled"])])]),default:s.withCtx(()=>[s.createElementVNode("div",zse,[s.createVNode(s.unref(R.Form),{"label-col":{span:6},"wrapper-col":{span:17}},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Form).Item,{label:"Name",required:""},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Input),{value:s.unref(i).name,"onUpdate:value":c[0]||(c[0]=u=>s.unref(i).name=u)},null,8,["value"])]),_:1}),s.createVNode(s.unref(R.Form).Item,{label:"Auto Refresh",required:""},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Select),{value:s.unref(i).auto,"onUpdate:value":c[1]||(c[1]=u=>s.unref(i).auto=u)},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Md),u=>(s.openBlock(),s.createBlock(s.unref(R.Select).Option,{value:u.id,key:u.id},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(u.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),_:1})])]),_:3},16))}}),Gse={class:"mega-add-dimension"},Wse={key:0,class:"add-title"},Zse={key:0,class:"mega-search-list"},qse=["onClick"],Xse={class:"add-search"},GM=s.defineComponent({props:{cube:{type:Object,default:null},hasTitle:{type:Boolean,default:!0},selected:{type:Array,default:()=>[]}},emits:["onAdd"],setup(t,{emit:e}){const r=t,n=s.ref(""),a=s.computed(()=>{const l=n.value,c=at(r.cube.dimensions),u=r.selected.map(d=>typeof d=="string"?d:d==null?void 0:d.id),f=c.filter(d=>!u.includes(d.id));return l?f.filter(d=>d.id.toLowerCase().includes(l.toLowerCase())||d.name.toLowerCase().includes(l.toLowerCase())):f}),i=s.ref(!1),o=l=>{e("onAdd",s.toRaw(l)),i.value=!1};return(l,c)=>(s.openBlock(),s.createElementBlock("div",Gse,[t.hasTitle?(s.openBlock(),s.createElementBlock("span",Wse,"Filter")):s.createCommentVNode("",!0),s.createVNode(s.unref(R.Popover),{visible:i.value,"onUpdate:visible":c[1]||(c[1]=u=>i.value=u),placement:"bottomLeft",trigger:"click",overlayClassName:"mega-add-dimension"},{content:s.withCtx(()=>[s.unref(a).length>0?(s.openBlock(),s.createElementBlock("ul",Zse,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(a),u=>(s.openBlock(),s.createElementBlock("li",{key:u.id,onClick:f=>o(u)},s.toDisplayString(u.name),9,qse))),128))])):(s.openBlock(),s.createBlock(lr,{key:1}))]),title:s.withCtx(()=>[s.createElementVNode("div",Xse,[s.createVNode(s.unref(R.Input),{placeholder:"Search Key",ref:"inputRef",allowClear:"",value:n.value,"onUpdate:value":c[0]||(c[0]=u=>n.value=u)},{prefix:s.withCtx(()=>[s.createVNode(s.unref(Ca))]),_:1},8,["value"])])]),default:s.withCtx(()=>[s.renderSlot(l.$slots,"default",{},()=>[s.createVNode(s.unref(yd),{class:"add-icon"})])]),_:3},8,["visible"])]))}});var ki=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},WM={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ki,function(){var r=1e3,n=6e4,a=36e5,i="millisecond",o="second",l="minute",c="hour",u="day",f="week",d="month",h="quarter",p="year",m="date",v="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},w=function(M,O,T){var E=String(M);return!E||E.length>=O?M:""+Array(O+1-E.length).join(T)+M},S={s:w,z:function(M){var O=-M.utcOffset(),T=Math.abs(O),E=Math.floor(T/60),D=T%60;return(O<=0?"+":"-")+w(E,2,"0")+":"+w(D,2,"0")},m:function M(O,T){if(O.date()<T.date())return-M(T,O);var E=12*(T.year()-O.year())+(T.month()-O.month()),D=O.clone().add(E,d),P=T-D<0,I=O.clone().add(E+(P?-1:1),d);return+(-(E+(T-D)/(P?D-I:I-D))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:d,y:p,w:f,d:u,D:m,h:c,m:l,s:o,ms:i,Q:h}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},x="en",b={};b[x]=_;var C=function(M){return M instanceof A},k=function(M,O,T){var E;if(!M)return x;if(typeof M=="string")b[M]&&(E=M),O&&(b[M]=O,E=M);else{var D=M.name;b[D]=M,E=D}return!T&&E&&(x=E),E||!T&&x},$=function(M,O){if(C(M))return M.clone();var T=typeof O=="object"?O:{};return T.date=M,T.args=arguments,new A(T)},N=S;N.l=k,N.i=C,N.w=function(M,O){return $(M,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var A=function(){function M(T){this.$L=k(T.locale,null,!0),this.parse(T)}var O=M.prototype;return O.parse=function(T){this.$d=function(E){var D=E.date,P=E.utc;if(D===null)return new Date(NaN);if(N.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var I=D.match(g);if(I){var V=I[2]-1||0,F=(I[7]||"0").substring(0,3);return P?new Date(Date.UTC(I[1],V,I[3]||1,I[4]||0,I[5]||0,I[6]||0,F)):new Date(I[1],V,I[3]||1,I[4]||0,I[5]||0,I[6]||0,F)}}return new Date(D)}(T),this.$x=T.x||{},this.init()},O.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},O.$utils=function(){return N},O.isValid=function(){return this.$d.toString()!==v},O.isSame=function(T,E){var D=$(T);return this.startOf(E)<=D&&D<=this.endOf(E)},O.isAfter=function(T,E){return $(T)<this.startOf(E)},O.isBefore=function(T,E){return this.endOf(E)<$(T)},O.$g=function(T,E,D){return N.u(T)?this[E]:this.set(D,T)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(T,E){var D=this,P=!!N.u(E)||E,I=N.p(T),V=function(de,Z){var K=N.w(D.$u?Date.UTC(D.$y,Z,de):new Date(D.$y,Z,de),D);return P?K:K.endOf(u)},F=function(de,Z){return N.w(D.toDate()[de].apply(D.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(Z)),D)},H=this.$W,Y=this.$M,Q=this.$D,ae="set"+(this.$u?"UTC":"");switch(I){case p:return P?V(1,0):V(31,11);case d:return P?V(1,Y):V(0,Y+1);case f:var le=this.$locale().weekStart||0,ye=(H<le?H+7:H)-le;return V(P?Q-ye:Q+(6-ye),Y);case u:case m:return F(ae+"Hours",0);case c:return F(ae+"Minutes",1);case l:return F(ae+"Seconds",2);case o:return F(ae+"Milliseconds",3);default:return this.clone()}},O.endOf=function(T){return this.startOf(T,!1)},O.$set=function(T,E){var D,P=N.p(T),I="set"+(this.$u?"UTC":""),V=(D={},D[u]=I+"Date",D[m]=I+"Date",D[d]=I+"Month",D[p]=I+"FullYear",D[c]=I+"Hours",D[l]=I+"Minutes",D[o]=I+"Seconds",D[i]=I+"Milliseconds",D)[P],F=P===u?this.$D+(E-this.$W):E;if(P===d||P===p){var H=this.clone().set(m,1);H.$d[V](F),H.init(),this.$d=H.set(m,Math.min(this.$D,H.daysInMonth())).$d}else V&&this.$d[V](F);return this.init(),this},O.set=function(T,E){return this.clone().$set(T,E)},O.get=function(T){return this[N.p(T)]()},O.add=function(T,E){var D,P=this;T=Number(T);var I=N.p(E),V=function(Y){var Q=$(P);return N.w(Q.date(Q.date()+Math.round(Y*T)),P)};if(I===d)return this.set(d,this.$M+T);if(I===p)return this.set(p,this.$y+T);if(I===u)return V(1);if(I===f)return V(7);var F=(D={},D[l]=n,D[c]=a,D[o]=r,D)[I]||1,H=this.$d.getTime()+T*F;return N.w(H,this)},O.subtract=function(T,E){return this.add(-1*T,E)},O.format=function(T){var E=this,D=this.$locale();if(!this.isValid())return D.invalidDate||v;var P=T||"YYYY-MM-DDTHH:mm:ssZ",I=N.z(this),V=this.$H,F=this.$m,H=this.$M,Y=D.weekdays,Q=D.months,ae=function(Z,K,J,oe){return Z&&(Z[K]||Z(E,P))||J[K].substr(0,oe)},le=function(Z){return N.s(V%12||12,Z,"0")},ye=D.meridiem||function(Z,K,J){var oe=Z<12?"AM":"PM";return J?oe.toLowerCase():oe},de={YY:String(this.$y).slice(-2),YYYY:this.$y,M:H+1,MM:N.s(H+1,2,"0"),MMM:ae(D.monthsShort,H,Q,3),MMMM:ae(Q,H),D:this.$D,DD:N.s(this.$D,2,"0"),d:String(this.$W),dd:ae(D.weekdaysMin,this.$W,Y,2),ddd:ae(D.weekdaysShort,this.$W,Y,3),dddd:Y[this.$W],H:String(V),HH:N.s(V,2,"0"),h:le(1),hh:le(2),a:ye(V,F,!0),A:ye(V,F,!1),m:String(F),mm:N.s(F,2,"0"),s:String(this.$s),ss:N.s(this.$s,2,"0"),SSS:N.s(this.$ms,3,"0"),Z:I};return P.replace(y,function(Z,K){return K||de[Z]||I.replace(":","")})},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(T,E,D){var P,I=N.p(E),V=$(T),F=(V.utcOffset()-this.utcOffset())*n,H=this-V,Y=N.m(this,V);return Y=(P={},P[p]=Y/12,P[d]=Y,P[h]=Y/3,P[f]=(H-F)/6048e5,P[u]=(H-F)/864e5,P[c]=H/a,P[l]=H/n,P[o]=H/r,P)[I]||H,D?Y:N.a(Y)},O.daysInMonth=function(){return this.endOf(d).$D},O.$locale=function(){return b[this.$L]},O.locale=function(T,E){if(!T)return this.$L;var D=this.clone(),P=k(T,E,!0);return P&&(D.$L=P),D},O.clone=function(){return N.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},M}(),L=A.prototype;return $.prototype=L,[["$ms",i],["$s",o],["$m",l],["$H",c],["$W",u],["$M",d],["$y",p],["$D",m]].forEach(function(M){L[M[1]]=function(O){return this.$g(O,M[0],M[1])}}),$.extend=function(M,O){return M.$i||(M(O,A,$),M.$i=!0),$},$.locale=k,$.isDayjs=C,$.unix=function(M){return $(1e3*M)},$.en=b[x],$.Ls=b,$.p={},$})})(WM);var ne=WM.exports,ZM={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ki,function(){return function(r,n,a){var i=n.prototype,o=function(d){return d&&(d.indexOf?d:d.s)},l=function(d,h,p,m,v){var g=d.name?d:d.$locale(),y=o(g[h]),_=o(g[p]),w=y||_.map(function(x){return x.substr(0,m)});if(!v)return w;var S=g.weekStart;return w.map(function(x,b){return w[(b+(S||0))%7]})},c=function(){return a.Ls[a.locale()]},u=function(d,h){return d.formats[h]||function(p){return p.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(m,v,g){return v||g.slice(1)})}(d.formats[h.toUpperCase()])},f=function(){var d=this;return{months:function(h){return h?h.format("MMMM"):l(d,"months")},monthsShort:function(h){return h?h.format("MMM"):l(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):l(d,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):l(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):l(d,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return u(d.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.localeData=function(){return f.bind(this)()},a.localeData=function(){var d=c();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return a.weekdays()},weekdaysShort:function(){return a.weekdaysShort()},weekdaysMin:function(){return a.weekdaysMin()},months:function(){return a.months()},monthsShort:function(){return a.monthsShort()},longDateFormat:function(h){return u(d,h)},meridiem:d.meridiem,ordinal:d.ordinal}},a.months=function(){return l(c(),"months")},a.monthsShort=function(){return l(c(),"monthsShort","months",3)},a.weekdays=function(d){return l(c(),"weekdays",null,null,d)},a.weekdaysShort=function(d){return l(c(),"weekdaysShort","weekdays",3,d)},a.weekdaysMin=function(d){return l(c(),"weekdaysMin","weekdays",2,d)}}})})(ZM);var qM=ZM.exports,XM={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ki,function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(n,a,i){var o=a.prototype,l=o.format;i.en.formats=r,o.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,f=function(d,h){return d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(p,m,v){var g=v&&v.toUpperCase();return m||h[v]||r[v]||h[g].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(y,_,w){return _||w.slice(1)})})}(c,u===void 0?{}:u);return l.call(this,f)}}})})(XM);var KM=XM.exports,JM={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ki,function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d\d/,i=/\d\d?/,o=/\d*[^\s\d-_:/()]+/,l={},c=function(v){return(v=+v)+(v>68?1900:2e3)},u=function(v){return function(g){this[v]=+g}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(g){if(!g||g==="Z")return 0;var y=g.match(/([+-]|\d\d)/g),_=60*y[1]+(+y[2]||0);return _===0?0:y[0]==="+"?-_:_}(v)}],d=function(v){var g=l[v];return g&&(g.indexOf?g:g.s.concat(g.f))},h=function(v,g){var y,_=l.meridiem;if(_){for(var w=1;w<=24;w+=1)if(v.indexOf(_(w,0,g))>-1){y=w>12;break}}else y=v===(g?"pm":"PM");return y},p={A:[o,function(v){this.afternoon=h(v,!1)}],a:[o,function(v){this.afternoon=h(v,!0)}],S:[/\d/,function(v){this.milliseconds=100*+v}],SS:[a,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[i,u("seconds")],ss:[i,u("seconds")],m:[i,u("minutes")],mm:[i,u("minutes")],H:[i,u("hours")],h:[i,u("hours")],HH:[i,u("hours")],hh:[i,u("hours")],D:[i,u("day")],DD:[a,u("day")],Do:[o,function(v){var g=l.ordinal,y=v.match(/\d+/);if(this.day=y[0],g)for(var _=1;_<=31;_+=1)g(_).replace(/\[|\]/g,"")===v&&(this.day=_)}],M:[i,u("month")],MM:[a,u("month")],MMM:[o,function(v){var g=d("months"),y=(d("monthsShort")||g.map(function(_){return _.substr(0,3)})).indexOf(v)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[o,function(v){var g=d("months").indexOf(v)+1;if(g<1)throw new Error;this.month=g%12||g}],Y:[/[+-]?\d+/,u("year")],YY:[a,function(v){this.year=c(v)}],YYYY:[/\d{4}/,u("year")],Z:f,ZZ:f};function m(v){var g,y;g=v,y=l&&l.formats;for(var _=(v=g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,N,A){var L=A&&A.toUpperCase();return N||y[A]||r[A]||y[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(M,O,T){return O||T.slice(1)})})).match(n),w=_.length,S=0;S<w;S+=1){var x=_[S],b=p[x],C=b&&b[0],k=b&&b[1];_[S]=k?{regex:C,parser:k}:x.replace(/^\[|\]$/g,"")}return function($){for(var N={},A=0,L=0;A<w;A+=1){var M=_[A];if(typeof M=="string")L+=M.length;else{var O=M.regex,T=M.parser,E=$.substr(L),D=O.exec(E)[0];T.call(N,D),$=$.replace(D,"")}}return function(P){var I=P.afternoon;if(I!==void 0){var V=P.hours;I?V<12&&(P.hours+=12):V===12&&(P.hours=0),delete P.afternoon}}(N),N}}return function(v,g,y){y.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(c=v.parseTwoDigitYear);var _=g.prototype,w=_.parse;_.parse=function(S){var x=S.date,b=S.utc,C=S.args;this.$u=b;var k=C[1];if(typeof k=="string"){var $=C[2]===!0,N=C[3]===!0,A=$||N,L=C[2];N&&(L=C[2]),l=this.$locale(),!$&&L&&(l=y.Ls[L]),this.$d=function(E,D,P){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*E);var I=m(D)(E),V=I.year,F=I.month,H=I.day,Y=I.hours,Q=I.minutes,ae=I.seconds,le=I.milliseconds,ye=I.zone,de=new Date,Z=H||(V||F?1:de.getDate()),K=V||de.getFullYear(),J=0;V&&!F||(J=F>0?F-1:de.getMonth());var oe=Y||0,Ce=Q||0,Se=ae||0,$e=le||0;return ye?new Date(Date.UTC(K,J,Z,oe,Ce,Se,$e+60*ye.offset*1e3)):P?new Date(Date.UTC(K,J,Z,oe,Ce,Se,$e)):new Date(K,J,Z,oe,Ce,Se,$e)}catch{return new Date("")}}(x,k,b),this.init(),L&&L!==!0&&(this.$L=this.locale(L).$L),A&&x!=this.format(k)&&(this.$d=new Date("")),l={}}else if(k instanceof Array)for(var M=k.length,O=1;O<=M;O+=1){C[1]=k[O-1];var T=y.apply(this,C);if(T.isValid()){this.$d=T.$d,this.$L=T.$L,this.init();break}O===M&&(this.$d=new Date(""))}else w.call(this,S)}}})})(JM);var QM=JM.exports,e$={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ki,function(){return function(r,n,a){n.prototype.isToday=function(){var i="YYYY-MM-DD",o=a();return this.format(i)===o.format(i)}}})})(e$);var t$=e$.exports,r$={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ki,function(){return function(r,n,a){n.prototype.isBetween=function(i,o,l,c){var u=a(i),f=a(o),d=(c=c||"()")[0]==="(",h=c[1]===")";return(d?this.isAfter(u,l):!this.isBefore(u,l))&&(h?this.isBefore(f,l):!this.isAfter(f,l))||(d?this.isBefore(u,l):!this.isAfter(u,l))&&(h?this.isAfter(f,l):!this.isBefore(f,l))}}})})(r$);var n$=r$.exports,a$={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ki,function(){var r,n,a=1e3,i=6e4,o=36e5,l=864e5,c=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,f=2592e6,d=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:u,months:f,days:l,hours:o,minutes:i,seconds:a,milliseconds:1,weeks:6048e5},p=function(x){return x instanceof S},m=function(x,b,C){return new S(x,C,b.$l)},v=function(x){return n.p(x)+"s"},g=function(x){return x<0},y=function(x){return g(x)?Math.ceil(x):Math.floor(x)},_=function(x){return Math.abs(x)},w=function(x,b){return x?g(x)?{negative:!0,format:""+_(x)+b}:{negative:!1,format:""+x+b}:{negative:!1,format:""}},S=function(){function x(C,k,$){var N=this;if(this.$d={},this.$l=$,C===void 0&&(this.$ms=0,this.parseFromMilliseconds()),k)return m(C*h[v(k)],this);if(typeof C=="number")return this.$ms=C,this.parseFromMilliseconds(),this;if(typeof C=="object")return Object.keys(C).forEach(function(M){N.$d[v(M)]=C[M]}),this.calMilliseconds(),this;if(typeof C=="string"){var A=C.match(d);if(A){var L=A.slice(2).map(function(M){return M!=null?Number(M):0});return this.$d.years=L[0],this.$d.months=L[1],this.$d.weeks=L[2],this.$d.days=L[3],this.$d.hours=L[4],this.$d.minutes=L[5],this.$d.seconds=L[6],this.calMilliseconds(),this}}return this}var b=x.prototype;return b.calMilliseconds=function(){var C=this;this.$ms=Object.keys(this.$d).reduce(function(k,$){return k+(C.$d[$]||0)*h[$]},0)},b.parseFromMilliseconds=function(){var C=this.$ms;this.$d.years=y(C/u),C%=u,this.$d.months=y(C/f),C%=f,this.$d.days=y(C/l),C%=l,this.$d.hours=y(C/o),C%=o,this.$d.minutes=y(C/i),C%=i,this.$d.seconds=y(C/a),C%=a,this.$d.milliseconds=C},b.toISOString=function(){var C=w(this.$d.years,"Y"),k=w(this.$d.months,"M"),$=+this.$d.days||0;this.$d.weeks&&($+=7*this.$d.weeks);var N=w($,"D"),A=w(this.$d.hours,"H"),L=w(this.$d.minutes,"M"),M=this.$d.seconds||0;this.$d.milliseconds&&(M+=this.$d.milliseconds/1e3);var O=w(M,"S"),T=C.negative||k.negative||N.negative||A.negative||L.negative||O.negative,E=A.format||L.format||O.format?"T":"",D=(T?"-":"")+"P"+C.format+k.format+N.format+E+A.format+L.format+O.format;return D==="P"||D==="-P"?"P0D":D},b.toJSON=function(){return this.toISOString()},b.format=function(C){var k=C||"YYYY-MM-DDTHH:mm:ss",$={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return k.replace(c,function(N,A){return A||String($[N])})},b.as=function(C){return this.$ms/h[v(C)]},b.get=function(C){var k=this.$ms,$=v(C);return $==="milliseconds"?k%=1e3:k=$==="weeks"?y(k/h[$]):this.$d[$],k===0?0:k},b.add=function(C,k,$){var N;return N=k?C*h[v(k)]:p(C)?C.$ms:m(C,this).$ms,m(this.$ms+N*($?-1:1),this)},b.subtract=function(C,k){return this.add(C,k,!0)},b.locale=function(C){var k=this.clone();return k.$l=C,k},b.clone=function(){return m(this.$ms,this)},b.humanize=function(C){return r().add(this.$ms,"ms").locale(this.$l).fromNow(!C)},b.milliseconds=function(){return this.get("milliseconds")},b.asMilliseconds=function(){return this.as("milliseconds")},b.seconds=function(){return this.get("seconds")},b.asSeconds=function(){return this.as("seconds")},b.minutes=function(){return this.get("minutes")},b.asMinutes=function(){return this.as("minutes")},b.hours=function(){return this.get("hours")},b.asHours=function(){return this.as("hours")},b.days=function(){return this.get("days")},b.asDays=function(){return this.as("days")},b.weeks=function(){return this.get("weeks")},b.asWeeks=function(){return this.as("weeks")},b.months=function(){return this.get("months")},b.asMonths=function(){return this.as("months")},b.years=function(){return this.get("years")},b.asYears=function(){return this.as("years")},x}();return function(x,b,C){r=C,n=C().$utils(),C.duration=function(N,A){var L=C.locale();return m(N,{$l:L},A)},C.isDuration=p;var k=b.prototype.add,$=b.prototype.subtract;b.prototype.add=function(N,A){return p(N)&&(N=N.asMilliseconds()),k.bind(this)(N,A)},b.prototype.subtract=function(N,A){return p(N)&&(N=N.asMilliseconds()),$.bind(this)(N,A)}}})})(a$);var i$=a$.exports;const c0=t=>{const e=[];for(let r=0;r<=t.date(0).day();r++)e.push(t.date(0).subtract(r,"day"));return e.sort((r,n)=>r.date()-n.date())},o$=t=>Array.from({length:t.daysInMonth()},(e,r)=>t.date(r+1)),s$=t=>{const e=[];for(let r=1;r<=42-(c0(t).length+t.daysInMonth());r++)e.push(t.date(r).month(t.month()).add(1,"month"));return e},l$=(t,{disableDate:e})=>typeof e=="function"?e(t.toDate()):!1,Kse=(t,{previous:e,next:r})=>{let n;return e.isAfter(r,"date")?n="(]":n="[)",!!(t.isBetween(e,r,"date",n)&&!t.off)},u0=({previous:t,next:e},{formatter:r,separator:n})=>`${t.format(r)}${n}${e.format(r)}`,c$=t=>{const{instance:e,arg:r,value:n}=t;document.body.addEventListener("click",a=>e.DatepickerRef?a.target.classList.contains(`${r}-apply`)||a.target.classList.contains(`${r}-cancel`)?!1:e.isShow=e.DatepickerRef.contains(a.target)||document.getElementById(n)===a.target||n===a.target:e.isShow=!0)},f0=t=>{const e=[];for(let r=0;r<t;r++)e[r]=r.toString().padStart(2,"0");return e},Jse=()=>({getHoursList:()=>f0(24),getMinutesList:()=>f0(60),getSecondsList:()=>f0(60)});var zn=(t,e)=>{const r=t.__vccOpts||t;for(const[n,a]of e)r[n]=a;return r};const Qse=s.defineComponent({name:"RangeHeader",props:{asPrevOrNext:Boolean,panel:Object,calendar:Object},inheritAttrs:!1}),ele={class:"dcp-header"},tle={class:"dcp-header__action"},rle={fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},nle=["d"],ale={class:"dcp-header__content"},ile=["textContent"],ole=["textContent"],sle={class:"dcp-header__action"},lle={fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},cle=["d"];function ule(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",ele,[s.createElementVNode("div",tle,[s.withDirectives(s.createElementVNode("span",{onClick:e[0]||(e[0]=o=>t.panel.calendar?t.calendar.onPrevious():t.calendar.onPreviousYear())},[(s.openBlock(),s.createElementBlock("svg",rle,[s.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:t.panel.calendar?"M15 19l-7-7 7-7":"M11 19l-7-7 7-7m8 14l-7-7 7-7"},null,8,nle)]))],512),[[s.vShow,t.panel.calendar||t.panel.year]])]),s.createElementVNode("div",ale,[s.createElementVNode("div",{textContent:s.toDisplayString(t.calendar.month),onClick:e[1]||(e[1]=o=>t.calendar.openMonth())},null,8,ile),s.createElementVNode("div",{textContent:s.toDisplayString(t.calendar.year),onClick:e[2]||(e[2]=o=>t.calendar.openYear())},null,8,ole)]),s.createElementVNode("div",sle,[s.withDirectives(s.createElementVNode("span",{onClick:e[3]||(e[3]=o=>t.panel.calendar?t.calendar.onNext():t.calendar.onNextYear())},[(s.openBlock(),s.createElementBlock("svg",lle,[s.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:t.panel.calendar?"M9 5l7 7-7 7":"M13 5l7 7-7 7M5 5l7 7-7 7"},null,8,cle)]))],512),[[s.vShow,t.panel.calendar||t.panel.year]])])])}var fle=zn(Qse,[["render",ule]]);const dle=s.defineComponent({name:"RangeMonth",props:{months:Array},inheritAttrs:!1,emits:["update:month"]}),hle={class:"dcp-year-month"},ple=["textContent","onClick"];function mle(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",hle,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.months,(o,l)=>(s.openBlock(),s.createElementBlock("div",{class:"dcp-year-month__item",key:l,textContent:s.toDisplayString(o),onClick:c=>t.$emit("update:month",l)},null,8,ple))),128))])}var vle=zn(dle,[["render",mle]]);const gle=s.defineComponent({name:"RangeWeek",props:{weeks:Array},inheritAttrs:!1}),yle={class:"dcp-grid dcp-grid-cols-7"},_le=["textContent"];function wle(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",yle,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.weeks,(o,l)=>(s.openBlock(),s.createElementBlock("div",{class:"dcp-grid-cell week",key:l},[s.createElementVNode("span",{textContent:s.toDisplayString(o)},null,8,_le)]))),128))])}var ble=zn(gle,[["render",wle]]);const Sle=s.defineComponent({name:"RangeYear",props:{asPrevOrNext:Boolean,years:Array},inheritAttrs:!1,emits:["update:year"]}),xle={class:"dcp-year-month"},Cle=["textContent","onClick"];function kle(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",xle,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.years,(o,l)=>(s.openBlock(),s.createElementBlock("div",{class:"dcp-year-month__item",key:l,textContent:s.toDisplayString(o),onClick:c=>t.$emit("update:year",o,t.asPrevOrNext)},null,8,Cle))),128))])}var Tle=zn(Sle,[["render",kle]]);const Mle=s.defineComponent({name:"RangeCalendar",props:{asPrevOrNext:Boolean,calendar:Object,weeks:Array},inheritAttrs:!1,emits:["update:date"],setup(t,{emit:e}){const r=s.inject("isBetweenRange"),n=s.inject("betweenRangeClasses"),a=s.inject("datepickerClasses"),i=s.inject("atMouseOver");return{isBetweenRange:r,betweenRangeClasses:n,datepickerClasses:a,atMouseOver:i,onClickDate:l=>{l.disabled||e("update:date",l,t.asPrevOrNext)}}}}),$le={class:"dcp-grid dcp-grid-cols-7"},Nle=["disabled","onClick","onMouseenter","onFocusin","textContent","data-date"];function Ele(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",$le,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.calendar.date(),(o,l)=>(s.openBlock(),s.createElementBlock("div",{key:l,class:"dcp-grid-cell"},[t.isBetweenRange(o)||o.hovered()?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["in-range-date",t.betweenRangeClasses(o)])},null,2)):s.createCommentVNode("",!0),s.createElementVNode("span",{class:s.normalizeClass(["dcp-grid-cell__day",[t.datepickerClasses(o)]]),disabled:o.disabled,onClick:c=>t.onClickDate(o),onMouseenter:c=>t.atMouseOver(o),onFocusin:c=>t.atMouseOver(o),textContent:s.toDisplayString(o.date()),"data-date":o.toDate()},null,42,Nle)]))),128))])}var Ale=zn(Mle,[["render",Ele]]);const Dle=s.defineComponent({name:"RangeShortcut",props:{shortcuts:[Boolean,Function]},inheritAttrs:!1,setup(t){const e=s.inject("setToToday"),r=s.inject("setToYesterday"),n=s.inject("setToLastDay"),a=s.inject("setToThisMonth"),i=s.inject("setToLastMonth"),o=s.inject("setToLastMonths"),l=s.inject("setToCustomShortcut");return{setToToday:e,setToYesterday:r,setToLastDay:n,setToThisMonth:a,setToLastMonth:i,setToCustomShortcut:l,setToLastMonths:o,withShortcut:()=>typeof t.shortcuts=="function"?t.shortcuts():!1}}}),Ole={class:"dcp-shortcut"},Lle=s.createElementVNode("div",{class:"dcp-shortcut__header"},"Fast Selection",-1),Ple={key:0},Ble=["onClick"],Ile={key:1};function Rle(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",Ole,[Lle,t.withShortcut()?(s.openBlock(),s.createElementBlock("ul",Ple,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.withShortcut(),(o,l)=>(s.openBlock(),s.createElementBlock("li",{key:l,onClick:s.withModifiers(c=>t.setToCustomShortcut(o),["prevent"])},s.toDisplayString(o.label),9,Ble))),128))])):(s.openBlock(),s.createElementBlock("ul",Ile,[s.createElementVNode("li",{onClick:e[0]||(e[0]=s.withModifiers((...o)=>t.setToToday&&t.setToToday(...o),["prevent"]))},"Today"),s.createElementVNode("li",{onClick:e[1]||(e[1]=s.withModifiers((...o)=>t.setToYesterday&&t.setToYesterday(...o),["prevent"]))},"Yesterday"),s.createElementVNode("li",{onClick:e[2]||(e[2]=s.withModifiers(o=>t.setToLastDay(3),["prevent"]))},"Last 3 days"),s.createElementVNode("li",{onClick:e[3]||(e[3]=s.withModifiers(o=>t.setToLastDay(7),["prevent"]))},"Last 7 days"),s.createElementVNode("li",{onClick:e[4]||(e[4]=s.withModifiers(o=>t.setToLastDay(30),["prevent"]))},"Last 30 days"),s.createElementVNode("li",{onClick:e[5]||(e[5]=s.withModifiers((...o)=>t.setToThisMonth&&t.setToThisMonth(...o),["prevent"]))},"This Month"),s.createElementVNode("li",{onClick:e[6]||(e[6]=s.withModifiers(o=>t.setToLastMonths(1),["prevent"]))},"Last Month"),s.createElementVNode("li",{onClick:e[7]||(e[7]=s.withModifiers(o=>t.setToLastMonths(3),["prevent"]))},"Last 3 Month")]))])}var Vle=zn(Dle,[["render",Rle]]);const u$=t=>{const{instance:e,arg:r,value:n}=t;document.body.addEventListener("click",a=>e.TimeSelectRef?a.target.classList.contains(`${r}-apply`)||a.target.classList.contains(`${r}-cancel`)?!1:e.show=e.TimeSelectRef.contains(a.target)||document.getElementById(n)===a.target||n===a.target:e.show=!1)},Fle=s.defineComponent({name:"RangeTimeSelect",props:{asPrevOrNext:Boolean,rangeTime:Array,pickerState:Object},emits:["update:time"],directives:{showtime:{mounted:(t,e)=>{u$(e)},updated:(t,e)=>{u$(e)}}},inheritAttrs:!1,setup(t,{emit:e}){const r=s.ref(!1),n=s.ref(null),{getHoursList:a,getMinutesList:i,getSecondsList:o}=Jse(),l=s.computed(()=>{var O,T,E,D,P,I;return{hours:(T=(O=t.pickerState)==null?void 0:O.hours)!=null?T:!0,minutes:(D=(E=t.pickerState)==null?void 0:E.minutes)!=null?D:!0,seconds:(I=(P=t.pickerState)==null?void 0:P.seconds)!=null?I:!0}}),c=s.computed(()=>a()),u=s.computed(()=>i()),f=s.computed(()=>o()),d=s.computed(()=>({hours:c.value,minutes:u.value,seconds:f.value})),h=s.ref(null),p=s.ref(null),m=s.ref(null),v={hours:h,minutes:p,seconds:m},g=O=>v[O].value.querySelector("li").offsetHeight,y=(O,T)=>{const E=v[O];E.value&&E.value.scrollTo({top:Math.max(0,T*g(O)),behavior:"smooth"})},_=(O,T,E=!0)=>{switch(E&&y(O,Number(T)),O){case"hours":k.value=ne(k.value).hour(Number(T));break;case"minutes":k.value=ne(k.value).minute(Number(T));break;case"seconds":k.value=ne(k.value).second(Number(T));break}},w=(O,T)=>{_(O,T,!1),s.nextTick(()=>{A()})},S=s.ref(0),x=s.ref(null),b=(O,T,E)=>{E==null||E.preventDefault(),S.value++,S.value===1?x.value=setTimeout(()=>{S.value=0,_(O,T)},300):S.value===2&&(clearTimeout(x.value),S.value=0,w(O,T))},C=s.ref(""),k=s.ref(null),$=O=>{if(O){const T=ne();l.value.hours&&(k.value=ne(k.value).hour(T.hour())),l.value.minutes&&(k.value=ne(k.value).minute(T.minute())),l.value.seconds&&(k.value=ne(k.value).second(T.second()))}s.nextTick(()=>{_("hours",N.value.h),_("minutes",N.value.m),_("seconds",N.value.s)})},N=s.computed(()=>{const O=ne(k.value);return{h:O.hour(),m:O.minute(),s:O.second()}}),A=()=>{e("update:time",C.value,t.asPrevOrNext),r.value=!1};s.onMounted(()=>{L()});const L=()=>{t.asPrevOrNext?k.value=ne(t.rangeTime[1]):k.value=ne(t.rangeTime[0])},M=s.computed(()=>l.value.seconds?"HH:mm:ss":l.value.minutes?"HH:mm":l.value.hours?"HH":"HH:mm:ss");return s.watchEffect(()=>{C.value=ne(k.value).format(M.value)}),s.watch(()=>t.rangeTime,O=>{t.asPrevOrNext?k.value=ne(t.rangeTime[1]):k.value=ne(t.rangeTime[0])}),s.watch(()=>r.value,O=>{O?$(!1):L()}),{time:k,listMap:d,show:r,TimeSelectRef:n,handleClickNew:b,handleClick:_,handleDbClick:w,listHoursRef:h,listMinutesRef:p,listSecondsRef:m,applyTime:A,setCurrentTime:$,timeFormat:N,showTime:C,pickerShow:l}}}),zle={class:"dcp-time",ref:"TimeSelectRef"},Hle=s.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15 9C15 5.68629 12.3137 3 9 3C5.68629 3 3 5.68629 3 9C3 12.3137 5.68629 15 9 15C12.3137 15 15 12.3137 15 9ZM16.5 9C16.5 13.1421 13.1421 16.5 9 16.5C4.85786 16.5 1.5 13.1421 1.5 9C1.5 4.85786 4.85786 1.5 9 1.5C13.1421 1.5 16.5 4.85786 16.5 9ZM8.25 5.23823C8.25 5.07254 8.38432 4.93823 8.55 4.93823H9.45C9.61569 4.93823 9.75 5.07254 9.75 5.23823V9.13823C9.75 9.16499 9.7465 9.19093 9.73992 9.21562C9.72817 9.27006 9.70114 9.32187 9.65883 9.36418L7.27282 11.7502C7.15566 11.8673 6.96571 11.8673 6.84856 11.7502L6.21216 11.1138C6.095 10.9966 6.095 10.8067 6.21216 10.6895L8.25 8.65169V5.23823Z",fill:"currentColor","fill-opacity":"0.54"})],-1),Ule={class:"time-select",ref:"TimeRef"},jle={class:"time-select__content"},Yle={key:0,ref:"listHoursRef",class:"time-panel-column"},Gle=["onClick"],Wle={class:"time-panel-cell-inner"},Zle={key:1,ref:"listMinutesRef",class:"time-panel-column"},qle=["onClick"],Xle={class:"time-panel-cell-inner"},Kle={key:2,ref:"listSecondsRef",class:"time-panel-column"},Jle=["onClick"],Qle={class:"time-panel-cell-inner"},ece={class:"time-select__footer"};function tce(t,e,r,n,a,i){const o=s.resolveDirective("showtime");return s.withDirectives((s.openBlock(),s.createElementBlock("div",zle,[s.withDirectives(s.createElementVNode("input",{readonly:"","onUpdate:modelValue":e[0]||(e[0]=l=>t.showTime=l),class:"dcp-input",autocomplete:"off"},null,512),[[s.vModelText,t.showTime]]),Hle,s.createVNode(s.Transition,{"enter-from-class":"zoom-big-enter zoom-big-enter-prepare","enter-to-class":"zoom-big-enter zoom-big-enter-active","enter-active-class":"zoom-big-enter zoom-big-enter-prepare","leave-active-class":"zoom-big-leave","leave-from-class":"zoom-big-leave zoom-big-leave-active","leave-to-class":"zoom-big-leave zoom-big-leave-active"},{default:s.withCtx(()=>{var l,c,u;return[s.withDirectives(s.createElementVNode("div",Ule,[s.createElementVNode("div",jle,[((l=t.pickerShow)==null?void 0:l.hours)?(s.openBlock(),s.createElementBlock("ul",Yle,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.listMap.hours,f=>(s.openBlock(),s.createElementBlock("li",{class:s.normalizeClass(["time-panel-cell",{active:t.timeFormat.h===Number(f)}]),key:f,onClick:s.withModifiers(d=>t.handleClickNew("hours",f,d),["prevent","stop"])},[s.createElementVNode("div",Wle,s.toDisplayString(f),1)],10,Gle))),128))],512)):s.createCommentVNode("",!0),((c=t.pickerShow)==null?void 0:c.minutes)?(s.openBlock(),s.createElementBlock("ul",Zle,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.listMap.minutes,f=>(s.openBlock(),s.createElementBlock("li",{class:s.normalizeClass(["time-panel-cell",{active:t.timeFormat.m===Number(f)}]),key:f,onClick:s.withModifiers(d=>t.handleClickNew("minutes",f,d),["prevent","stop"])},[s.createElementVNode("div",Xle,s.toDisplayString(f),1)],10,qle))),128))],512)):s.createCommentVNode("",!0),((u=t.pickerShow)==null?void 0:u.seconds)?(s.openBlock(),s.createElementBlock("ul",Kle,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.listMap.seconds,f=>(s.openBlock(),s.createElementBlock("li",{class:s.normalizeClass(["time-panel-cell",{active:t.timeFormat.s===Number(f)}]),key:f,onClick:s.withModifiers(d=>t.handleClickNew("seconds",f,d),["prevent","stop"])},[s.createElementVNode("div",Qle,s.toDisplayString(f),1)],10,Jle))),128))],512)):s.createCommentVNode("",!0)]),s.createElementVNode("div",ece,[s.createElementVNode("button",{class:"dcp-button link picker-cancel",onClick:e[1]||(e[1]=f=>t.setCurrentTime(!0))},"Now"),s.createElementVNode("button",{class:"dcp-button primary picker-apply",onClick:e[2]||(e[2]=(...f)=>t.applyTime&&t.applyTime(...f))},"OK")])],512),[[s.vShow,t.show]])]}),_:1})])),[[o,null,"picker"]])}var rce=zn(Fle,[["render",tce]]);ne.extend(qM),ne.extend(KM),ne.extend(QM),ne.extend(t$),ne.extend(n$),ne.extend(i$);const nce=s.defineComponent({name:"DateRange",components:{RangeHeader:fle,RangeMonth:vle,RangeWeek:ble,RangeYear:Tle,RangeCalendar:Ale,RangeShortcut:Vle,RangeTimeSelect:rce},props:{disableDate:{type:[Boolean,Array,Function],default:!1},disableInRange:{type:Boolean,default:!0},shortcuts:{type:[Boolean,Function],default:!0},separator:{type:String,default:" ~ "},formatter:{type:String,default:"YYYY-MM-DD HH:mm:ss"},modelValue:{type:[Array],default:()=>[]},startFrom:{type:[Object,String],default:()=>new Date},pickerState:{type:Object,default:()=>{}}},inheritAttrs:!1,emits:["update:modelValue"],setup(t,{emit:e}){const r=s.ref(null),n=s.ref(""),a=s.ref([]),i=s.ref([]),o=s.ref(null),l=s.ref(null),c=s.reactive({previous:{calendar:!0,month:!1,year:!1},next:{calendar:!0,month:!1,year:!1}});s.onMounted(()=>{O()});const u=s.ref({previous:ne(),next:ne().add(1,"month"),year:{previous:ne().year(),next:ne().year()},weeks:ne.weekdaysShort(),months:ne.monthsShort()}),f=s.computed(()=>u.value.weeks),d=s.computed(()=>u.value.months),h=s.computed(()=>{const{previous:T,next:E,year:D}=s.unref(u);return{previous:{date:()=>c0(T).concat(o$(T)).concat(s$(T)).map(P=>(P.today=P.isToday(),P.active=T.month()===P.month(),P.off=T.month()!==P.month(),P.sunday=P.day()===0,P.disabled=l$(P,t)&&!p(P),P.hovered=()=>a.value.length>1?(P.isBetween(a.value[0],a.value[1],"date","()")||P.isBetween(a.value[1],a.value[0],"date","()"))&&T.month()===P.month():!1,P.duration=()=>!1,P)),month:T&&T.format("MMM"),year:T&&T.year(),years:()=>Array.from({length:12},(P,I)=>D.previous+I),onPrevious:()=>{u.value.previous=T.subtract(1,"month")},onNext:()=>{u.value.previous=T.add(1,"month"),T.diff(E,"month")===-1&&(u.value.next=E.add(1,"month"))},onPreviousYear:()=>{u.value.year.previous=u.value.year.previous-12},onNextYear:()=>{u.value.year.previous=u.value.year.previous+12},openMonth:()=>{c.previous.month=!c.previous.month,c.previous.year=!1,c.previous.calendar=!c.previous.month},setMount:P=>{u.value.previous=T.month(P),c.previous.month=!c.previous.month,c.previous.year=!1,c.previous.calendar=!c.previous.month,s.nextTick(()=>{(u.value.next.isSame(u.value.previous,"month")||u.value.next.isBefore(u.value.previous))&&(u.value.next=u.value.previous.add(1,"month")),u.value.year.next=u.value.next.year()})},openYear:()=>{c.previous.year=!c.previous.year,c.previous.month=!1,c.previous.calendar=!c.previous.year},setYear:(P,I)=>{I||(u.value.previous=T.year(P),c.previous.year=!c.previous.year,c.previous.calendar=!c.previous.year,s.nextTick(()=>{(u.value.next.isSame(u.value.previous,"month")||u.value.next.isBefore(u.value.previous))&&(u.value.next=u.value.previous.add(1,"month")),u.value.year.previous=u.value.previous.year(),u.value.year.next=u.value.next.year()}))}},next:{date:()=>c0(E).concat(o$(E)).concat(s$(E)).map(P=>(P.today=P.isToday(),P.active=E.month()===P.month(),P.off=E.month()!==P.month(),P.sunday=P.day()===0,P.disabled=l$(P,t)&&!p(P),P.hovered=()=>a.value.length>1?(P.isBetween(a.value[0],a.value[1],"date","()")||P.isBetween(a.value[1],a.value[0],"date","()"))&&E.month()===P.month():!1,P.duration=()=>!1,P)),month:E&&E.format("MMM"),year:E&&E.year(),years:()=>Array.from({length:12},(P,I)=>D.next+I),onPrevious:()=>{u.value.next=E.subtract(1,"month"),E.diff(T,"month")===1&&(u.value.previous=T.subtract(1,"month"))},onNext:()=>{u.value.next=E.add(1,"month")},onPreviousYear:()=>{u.value.year.next=u.value.year.next-12},onNextYear:()=>{u.value.year.next=u.value.year.next+12},openMonth:()=>{c.next.month=!c.next.month,c.next.year=!1,c.next.calendar=!c.next.month},setMount:P=>{u.value.next=E.month(P),c.next.month=!c.next.month,c.next.year=!1,c.next.calendar=!c.next.month,s.nextTick(()=>{(u.value.previous.isSame(u.value.next,"month")||u.value.previous.isAfter(u.value.next))&&(u.value.previous=u.value.next.subtract(1,"month")),u.value.year.previous=u.value.previous.year()})},openYear:()=>{c.next.year=!c.next.year,c.next.month=!1,c.next.calendar=!c.next.year},setYear:(P,I)=>{I&&(u.value.next=E.year(P),c.next.year=!c.next.year,c.next.month=!1,c.next.calendar=!c.next.year,s.nextTick(()=>{(u.value.previous.isSame(u.value.next,"month")||u.value.previous.isAfter(u.value.next))&&(u.value.previous=u.value.next.subtract(1,"month")),u.value.year.previous=u.value.previous.year(),u.value.year.next=u.value.next.year()}))}}}}),p=T=>{if(t.disableInRange||n.value==="")return!1;let E,D;const[P,I]=t.modelValue;return E=P,D=I,T.isBetween(ne(E,t.formatter,!0),ne(D,t.formatter,!0),"date","[]")},m=()=>{o.value=null,l.value=null,a.value=[],r.value=null},v=(T,E)=>{if(o.value){if(l.value=T,T.isBefore(o.value)){const[I,V]=s.toRaw(n.value).split(t.separator),F=ne(I),H=ne(V);n.value=u0({previous:T.hour(F.hour()||0).minute(F.minute()||0).second(F.second()||0),next:o.value.hour(H.hour()||0).minute(H.minute()||0).second(H.second()||0)},t)}else{const[I,V]=s.toRaw(n.value).split(t.separator),F=ne(I),H=ne(V);n.value=u0({previous:o.value.hour(F.hour()||0).minute(F.minute()||0).second(F.second()||0),next:T.hour(H.hour()||0).minute(H.minute()||0).second(H.second()||0)},t)}const[D,P]=n.value.split(t.separator);e("update:modelValue",[ne(D,t.formatter,!0).format(t.formatter),ne(P,t.formatter,!0).format(t.formatter)]),i.value=[],ne(D,t.formatter,!0).isSame(ne(P,t.formatter,!0),"month")||(u.value.previous=ne(D,t.formatter,!0),u.value.next=ne(P,t.formatter,!0)),m()}else i.value=[],o.value=T,r.value=T,a.value.push(T),i.value.push(T),E?(u.value.next=T,u.value.previous.isSame(T,"month")&&(u.value.next=T.add(1,"month"))):(u.value.previous=T,u.value.next.isSame(T,"month")&&(u.value.previous=u.value.next,u.value.next=T.add(1,"month")))},g=(T,E)=>{const D=T.split(":").map(H=>Number(H))||[],[P,I]=t.modelValue;let V=P&&ne(P),F=I&&ne(I);E?F=F.hour(D[0]||0).minute(D[1]||0).second(D[2]||0):V=V.hour(D[0]||0).minute(D[1]||0).second(D[2]||0),e("update:modelValue",[ne(V,t.formatter,!0).format(t.formatter),ne(F,t.formatter,!0).format(t.formatter)])},y=T=>{if(o.value)a.value=[o.value,T];else return a.value=[],!1},_=T=>{if(o.value)return!1;let E,D;if(a.value.length>1){const[P,I]=a.value;E=ne(P,t.formatter,!0),D=ne(I,t.formatter,!0)}else{const[P,I]=t.modelValue;E=P&&ne(P,t.formatter,!0),D=I&&ne(I,t.formatter,!0)}return E&&D?Kse(T,{previous:E,next:D}):!1},w=T=>{const{today:E,active:D,off:P,disabled:I}=T;let V,F,H;if(r.value){const[Y,Q]=a.value;F=Y&&ne(Y,t.formatter,!0),H=Q&&ne(Q,t.formatter,!0)}else{const[Y,Q]=t.modelValue;F=Y&&ne(Y,t.formatter,!0),H=Q&&ne(Q,t.formatter,!0)}return D&&(V=E?"today":I?"disabled":T.isBetween(F,H,"date","()")?"between":"other"),P&&(V="off disabled"),F&&H&&!P?(T.isSame(F,"date")&&(V=H.isAfter(F,"date")?"started":"ended",F.isSame(H,"date")&&(V="same disabled")),T.isSame(H,"date")&&(V=H.isAfter(F,"date")?"ended":"started",F.isSame(H,"date")&&(V="same disabled"))):F&&T.isSame(F,"date")&&!P&&(V="same disabled"),V},S=T=>{let E,D,P;if(E="",a.value.length>1){const[I,V]=a.value;D=I&&ne(I,t.formatter,!0),P=V&&ne(V,t.formatter,!0)}else{const[I,V]=t.modelValue;D=I&&ne(I,t.formatter,!0),P=V&&ne(V,t.formatter,!0)}return D&&P&&(T.isSame(D,"date")?(P.isBefore(D)&&(E+=" ended"),D.isBefore(P)&&(E+=" started")):T.isSame(P,"date")&&(P.isBefore(D)&&(E+=" started"),D.isBefore(P)&&(E+=" ended"))),E},x=(T,E)=>{u.value.previous=ne(T,t.formatter,!0),u.value.next=ne(E,t.formatter,!0),(ne.duration(u.value.next.diff(u.value.previous)).months()===2||ne.duration(u.value.next.diff(u.value.previous)).months()===1&&ne.duration(u.value.next.diff(u.value.previous)).days()===7)&&(u.value.next=u.value.next.subtract(1,"month")),(u.value.next.isSame(u.value.previous,"month")||u.value.next.isBefore(u.value.previous))&&(u.value.next=u.value.previous.add(1,"month"))},b=(T,E)=>{e("update:modelValue",[T,E]),n.value=`${T}${t.separator}${E}`,x(T,E),m()},C=()=>{const T=ne().hour(0).minute(0).second(0).format(t.formatter),E=ne().hour(23).minute(59).second(59).format(t.formatter);b(T,E)},k=()=>{const T=ne().subtract(1,"day").hour(0).minute(0).second(0).format(t.formatter),E=ne().subtract(1,"day").hour(23).minute(59).second(59).format(t.formatter);b(T,E)},$=T=>{const E=ne().subtract(T-1,"day").hour(0).minute(0).second(0).format(t.formatter),D=ne().hour(23).minute(59).second(59).format(t.formatter);b(E,D)},N=()=>{const T=ne().date(1).hour(0).minute(0).second(0).format(t.formatter),E=ne().date(ne().daysInMonth()).hour(23).minute(59).second(59).format(t.formatter);b(T,E)},A=()=>{const T=ne().date(1).subtract(1,"month").hour(0).minute(0).second(0).format(t.formatter),E=ne().date(0).hour(23).minute(59).second(59).format(t.formatter);b(T,E)},L=T=>{const E=ne().date(1).subtract(T,"month").hour(0).minute(0).second(0).format(t.formatter),D=ne().date(0).hour(23).minute(59).second(59).format(t.formatter);b(E,D)},M=T=>{let E,D;const[P,I]=T.atClick();E=ne(P).hour(0).minute(0).second(0).format(t.formatter),D=ne(I).hour(23).minute(59).second(59).format(t.formatter),b(E,D)};s.watch(()=>i.value,T=>{T.length>0&&(c.previous.calendar=!0,c.previous.month=!1,c.previous.year=!1,c.next.calendar=!0,c.next.month=!1,c.next.year=!1)});const O=()=>{let T,E;if(t.modelValue.length>0){const[D,P]=t.modelValue;T=ne(D,t.formatter,!0),E=ne(P,t.formatter,!0)}T&&E?(n.value=u0({previous:T,next:E},t),E.isBefore(T,"month")?(u.value.previous=E,u.value.next=T,u.value.year.previous=E.year(),u.value.year.next=T.year()):E.isSame(T,"month")?(u.value.previous=T,u.value.next=E.add(1,"month"),u.value.year.previous=T.year(),u.value.year.next=T.add(1,"year").year()):(u.value.previous=T,u.value.next=E,u.value.year.previous=T.year(),u.value.year.next=E.year())):(u.value.previous=ne(t.startFrom),u.value.next=ne(t.startFrom).add(1,"month"),u.value.year.previous=u.value.previous.year(),u.value.year.next=u.value.next.year()),u.value.weeks=ne.weekdaysShort(),u.value.months=ne.monthsShort()};return s.watch(()=>t.modelValue,(T,E)=>{O()}),s.watchEffect(()=>{s.nextTick(()=>{O()})}),s.provide("isBetweenRange",_),s.provide("betweenRangeClasses",S),s.provide("datepickerClasses",w),s.provide("atMouseOver",y),s.provide("setToToday",C),s.provide("setToYesterday",k),s.provide("setToLastDay",$),s.provide("setToThisMonth",N),s.provide("setToLastMonth",A),s.provide("setToCustomShortcut",M),s.provide("setToLastMonths",L),{previous:o,next:l,panel:c,pickerValue:n,hoverValue:a,applyValue:i,datepicker:u,calendar:h,weeks:f,months:d,setDate:v,setTime:g}}}),ace={class:"dcp-date-container"},ice={class:"dcp-calendar-container"},oce={class:"dcp-calendar"},sce={class:"dcp-calendar__body"},lce={class:"dcp-calendar"},cce={class:"dcp-calendar__body"};function uce(t,e,r,n,a,i){var o,l,c,u;const f=s.resolveComponent("range-header"),d=s.resolveComponent("range-month"),h=s.resolveComponent("range-year"),p=s.resolveComponent("range-week"),m=s.resolveComponent("range-calendar"),v=s.resolveComponent("RangeTimeSelect"),g=s.resolveComponent("range-shortcut");return s.openBlock(),s.createElementBlock("div",ace,[s.createElementVNode("div",ice,[s.createElementVNode("div",oce,[s.createVNode(f,{panel:t.panel.previous,calendar:t.calendar.previous},null,8,["panel","calendar"]),s.createElementVNode("div",sce,[s.withDirectives(s.createVNode(d,{months:t.months,"onUpdate:month":t.calendar.previous.setMount},null,8,["months","onUpdate:month"]),[[s.vShow,t.panel.previous.month]]),s.withDirectives(s.createVNode(h,{years:t.calendar.previous.years(),"onUpdate:year":t.calendar.previous.setYear},null,8,["years","onUpdate:year"]),[[s.vShow,t.panel.previous.year]]),s.withDirectives(s.createElementVNode("div",null,[s.createVNode(p,{weeks:t.weeks},null,8,["weeks"]),s.createVNode(m,{calendar:t.calendar.previous,weeks:t.weeks,"onUpdate:date":t.setDate},null,8,["calendar","weeks","onUpdate:date"]),((l=(o=t.pickerState)==null?void 0:o.hours)!=null?l:!1)?(s.openBlock(),s.createBlock(v,{key:0,"picker-state":t.pickerState,"range-time":t.modelValue,"onUpdate:time":t.setTime},null,8,["picker-state","range-time","onUpdate:time"])):s.createCommentVNode("",!0)],512),[[s.vShow,t.panel.previous.calendar]])])]),s.createElementVNode("div",lce,[s.createVNode(f,{"as-prev-or-next":"",panel:t.panel.next,calendar:t.calendar.next},null,8,["panel","calendar"]),s.createElementVNode("div",cce,[s.withDirectives(s.createVNode(d,{months:t.months,"onUpdate:month":t.calendar.next.setMount},null,8,["months","onUpdate:month"]),[[s.vShow,t.panel.next.month]]),s.withDirectives(s.createVNode(h,{"as-prev-or-next":"",years:t.calendar.next.years(),"onUpdate:year":t.calendar.next.setYear},null,8,["years","onUpdate:year"]),[[s.vShow,t.panel.next.year]]),s.withDirectives(s.createElementVNode("div",null,[s.createVNode(p,{weeks:t.weeks},null,8,["weeks"]),s.createVNode(m,{"as-prev-or-next":"",calendar:t.calendar.next,weeks:t.weeks,"onUpdate:date":t.setDate},null,8,["calendar","weeks","onUpdate:date"]),((u=(c=t.pickerState)==null?void 0:c.hours)!=null?u:!1)?(s.openBlock(),s.createBlock(v,{key:0,"picker-state":t.pickerState,"range-time":t.modelValue,"as-prev-or-next":"","onUpdate:time":t.setTime},null,8,["picker-state","range-time","onUpdate:time"])):s.createCommentVNode("",!0)],512),[[s.vShow,t.panel.next.calendar]])])])]),t.shortcuts?(s.openBlock(),s.createBlock(g,{key:0,shortcuts:t.shortcuts},null,8,["shortcuts"])):s.createCommentVNode("",!0)])}var fce=zn(nce,[["render",uce]]);ne.extend(qM),ne.extend(KM),ne.extend(QM),ne.extend(t$),ne.extend(n$),ne.extend(i$);const dce=s.defineComponent({name:"DateComparePicker",components:{DateRange:fce},directives:{litepie:{mounted:(t,e)=>{c$(e)},updated:(t,e)=>{c$(e)}}},props:{disableDate:{type:[Boolean,Array,Function],default:!1},formatter:{type:String,default:"YYYY-MM-DD HH:mm:ss"},modelValue:{type:Object,default:()=>{}},pickerState:{type:Object,default:()=>({days:!0,hours:!0,minutes:!0,seconds:!1})}},inheritAttrs:!1,emits:["update:modelValue"],setup(t,{emit:e}){const r=s.ref(null),n=s.ref(!1),a=s.ref([]),i=s.ref([]),o=s.ref(!1),l=s.ref(!1),c=s.ref(null),u=s.ref(null),f=s.computed(()=>{if(!o.value)return!0;if(i.value.length!==2)return!1;const[_,w]=a.value,[S,x]=i.value;return ne(w).diff(ne(_),"second")===ne(x).diff(ne(S),"second")}),d=_=>{l.value=_.target.checked,s.nextTick(()=>{var w,S;if(_.target.checked){if(i.value.length===0&&a.value.length===2){const[x,b]=a.value,C=ne(b).diff(ne(x),"days")+1,k=ne(x).subtract(C,"days").format(t.formatter),$=ne(b).subtract(C,"days").format(t.formatter);i.value=[k,$]}(w=u.value)==null||w.focus()}else(S=c.value)==null||S.focus(),i.value=[]})},h=()=>{const _=[...i.value];i.value=[...a.value],a.value=[..._]},p=()=>{n.value=!0},m=()=>{n.value=!1},v=()=>{e("update:modelValue",{current:a.value,compare:i.value}),n.value=!1},g=()=>{n.value=!1};s.watchEffect(()=>{if(t.modelValue){const{current:_,compare:w}=t.modelValue;a.value=_,i.value=w}});const y=s.ref("");return s.watch(()=>n.value,(_,w)=>{if(_){const S=document.querySelector(".dcp-datecompare-picker"),x=S==null?void 0:S.offsetHeight;y.value=x?`${x+4+10}px`:"",s.nextTick(()=>{const{current:b,compare:C}=t.modelValue;a.value=b,i.value=C,l.value=!1,o.value=C&&C.length>0})}}),{DatepickerRef:r,isShow:n,currentValue:a,compareValue:i,compareCheck:o,changeCompare:d,compareTo:l,currentRef:c,compareRef:u,switchCompare:h,positionTop:y,show:p,hide:m,applyDate:v,cancelPicker:g,okStatus:f}}}),hce={id:"datepicker",ref:"DatepickerRef",class:"dcp-datecompare-picker"},pce=s.createElementVNode("div",null,s.toDisplayString("Select Compare Date"),-1),mce={class:"dcp-datecompare"},vce={class:"dcp-compare-container"},gce={class:"dcp-compare__content"},yce=s.createElementVNode("div",{class:"content_label"},"Select Time:",-1),_ce=["value"],wce={key:0},bce=s.createElementVNode("div",{class:"content_label"},"Compare Time:",-1),Sce=["value"],xce={class:"dcp-compare__switch"},Cce=[s.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s.createElementVNode("path",{d:"M9.3996 3C9.17868 3 8.9996 3.17909 8.9996 3.4L8.9996 17.9999L4.65344 13.6538C4.49723 13.4976 4.24397 13.4976 4.08776 13.6538L3.23923 14.5023C3.08302 14.6585 3.08302 14.9118 3.23923 15.068L9.0375 20.8663C9.10484 20.9336 9.19021 20.9719 9.27807 20.9812C9.31639 20.9934 9.35723 21 9.3996 21H10.5996C10.8205 21 10.9996 20.8209 10.9996 20.6L10.9996 3.4C10.9996 3.17909 10.8205 3 10.5996 3H9.3996Z",fill:"black","fill-opacity":"0.87"}),s.createElementVNode("path",{d:"M14.9996 5.99994L14.9996 20.6C14.9996 20.8209 14.8205 21 14.5996 21H13.3996C13.1787 21 12.9996 20.8209 12.9996 20.6L12.9996 3.4C12.9996 3.17909 13.1787 3 13.3996 3H14.5996C14.6132 3 14.6267 3.00068 14.64 3.00202C14.7501 2.99552 14.8624 3.03434 14.9466 3.11848L20.7448 8.91675C20.901 9.07296 20.901 9.32623 20.7448 9.48244L19.8963 10.331C19.7401 10.4872 19.4868 10.4872 19.3306 10.331L14.9996 5.99994Z",fill:"black","fill-opacity":"0.87"})],-1)],kce={class:"dcp-compare-footer"},Tce=s.createElementVNode("span",null," Compare To",-1),Mce=["disabled"];function $ce(t,e,r,n,a,i){const o=s.resolveComponent("DateRange"),l=s.resolveDirective("litepie");return s.withDirectives((s.openBlock(),s.createElementBlock("div",hce,[s.renderSlot(t.$slots,"default",{},()=>[pce]),s.createVNode(s.Transition,{"enter-from-class":"zoom-big-enter zoom-big-enter-prepare","enter-to-class":"zoom-big-enter zoom-big-enter-active","enter-active-class":"zoom-big-enter zoom-big-enter-prepare","leave-active-class":"zoom-big-leave","leave-from-class":"zoom-big-leave zoom-big-leave-active","leave-to-class":"zoom-big-leave zoom-big-leave-active"},{default:s.withCtx(()=>[t.isShow?(s.openBlock(),s.createElementBlock("div",{key:0,class:"dcp-datecompare-picker__content",style:s.normalizeStyle({top:t.positionTop})},[s.createElementVNode("div",mce,[t.compareTo?(s.openBlock(),s.createBlock(o,{key:0,disableDate:t.disableDate,formatter:t.formatter,pickerState:t.pickerState,modelValue:t.compareValue,"onUpdate:modelValue":e[0]||(e[0]=c=>t.compareValue=c)},null,8,["disableDate","formatter","pickerState","modelValue"])):(s.openBlock(),s.createBlock(o,{key:1,disableDate:t.disableDate,formatter:t.formatter,pickerState:t.pickerState,modelValue:t.currentValue,"onUpdate:modelValue":e[1]||(e[1]=c=>t.currentValue=c)},null,8,["disableDate","formatter","pickerState","modelValue"])),s.createElementVNode("div",vce,[s.createElementVNode("div",gce,[s.createElementVNode("div",null,[yce,s.createElementVNode("input",{class:"dcp-input",ref:"currentRef",onFocus:e[2]||(e[2]=c=>t.compareTo=!1),value:t.currentValue,type:"text"},null,40,_ce)]),t.compareCheck?(s.openBlock(),s.createElementBlock("div",wce,[bce,s.createElementVNode("input",{class:"dcp-input",ref:"compareRef",onFocus:e[3]||(e[3]=c=>t.compareTo=!0),value:t.compareValue,type:"text"},null,40,Sce)])):s.createCommentVNode("",!0)]),s.withDirectives(s.createElementVNode("div",xce,[s.createElementVNode("span",{onClick:e[4]||(e[4]=(...c)=>t.switchCompare&&t.switchCompare(...c))},Cce)],512),[[s.vShow,t.compareCheck]])]),s.createElementVNode("div",kce,[s.createElementVNode("label",{class:s.normalizeClass(["dcp-compare-checkbox",{checked:t.compareCheck}]),for:"compareCheck"},[s.createElementVNode("span",{class:s.normalizeClass(["dcp-checkbox",{checked:t.compareCheck}])},[s.withDirectives(s.createElementVNode("input",{type:"checkbox",name:"compareCheck",id:"compareCheck","onUpdate:modelValue":e[5]||(e[5]=c=>t.compareCheck=c),onChange:e[6]||(e[6]=(...c)=>t.changeCompare&&t.changeCompare(...c)),class:"dcp-checkbox-input"},null,544),[[s.vModelCheckbox,t.compareCheck]]),s.createElementVNode("span",{class:s.normalizeClass(["dcp-checkbox-inner",{checked:t.compareCheck}])},null,2)],2),Tce],2),s.createElementVNode("div",null,[s.createElementVNode("button",{style:{"margin-right":"10px"},class:"dcp-button link picker-cancel",onClick:e[7]||(e[7]=(...c)=>t.cancelPicker&&t.cancelPicker(...c))}," Cancel "),s.createElementVNode("button",{disabled:!t.okStatus,class:s.normalizeClass(["dcp-button primary picker-apply",{disabled:!t.okStatus}]),onClick:e[8]||(e[8]=(...c)=>t.applyDate&&t.applyDate(...c))}," OK ",10,Mce)])])])],4)):s.createCommentVNode("",!0)]),_:1})])),[[l,null,"picker"]])}var f$=zn(dce,[["render",$ce]]),Nce=Object.assign(f$,{install:t=>{t.component("DateComparePicker",f$)}},{});const Ece={class:"dash-filter"},Ace={class:"dash-action"},Dce=s.createTextVNode(" Filter "),Oce={class:"handle"},Lce={class:"mega-tag disabled"},Pce={class:"mega-tag-label"},Bce=["onClick"],Ice=s.defineComponent({props:{cube:{type:Object,default:null}},emits:["onAddFilterParams"],setup(t,{emit:e}){const r=t,n=s.inject("dashboardState"),a=s.inject("currentState"),i=s.computed({get(){return n.filters},set(x){const b=Ye(x);n.filters=b.map(C=>C.filter_type?C:{id:C.id})}}),o=s.computed(()=>{var b,C;return"YYYY-MM-DD HH:mm:ss".substring(0,((C=(b=n==null?void 0:n.range)==null?void 0:b.current_time[0])==null?void 0:C.length)||10)}),l=s.computed(()=>c1(r.cube.primaryTimeGranularity)),c=s.ref({}),u=()=>{Object.keys(c.value).forEach(x=>{c.value[x]=!1})},f=x=>{n.filters.push({id:x.id}),c.value[x.id]=!0},d=x=>{const b=qo(i.value,{id:x.id});i.value.splice(b,1),delete c.value[x.id],s.nextTick(()=>{e("onAddFilterParams")})},h=(x,b)=>{if(!x){const C=i.value.findIndex($=>$.id===b.id);i.value[C].filter_type||(i.value.splice(C,1),delete c.value[b.id])}},p=x=>{c.value[x]=!1;const b=i.value.findIndex(k=>k.id===x);i.value[b].filter_type||(i.value.splice(b,1),delete c.value[x])},m=x=>{c.value[x.id]=!1;const b=n.filters.findIndex(C=>C.id===x.id);n.filters[b]=te({},x),e("onAddFilterParams")},v=s.ref({current:[],compare:[]}),g=()=>{const x=s.toRaw(n.range);v.value.current=x.current_time,v.value.compare=x.previous_time};s.watch(()=>{var x;return(x=a==null?void 0:a.dashboard)==null?void 0:x.id},(x,b)=>{s.nextTick(()=>{g()})}),s.watch(()=>v.value,(x,b)=>{const{compare:C,current:k}=x;n.range.current_time=[...k],n.range.previous_time=[...C],e("onAddFilterParams")});const y=x=>{const{lines:b,splits:C}=x,k=r.cube.primaryTimeAttribute;b.forEach($=>{const{index:N}=$,A=$.id,L=C[N],M=n.filters.find(O=>O.id===L.id);L&&k!==(L==null?void 0:L.id)&&(M?(M==null?void 0:M.filter_type)?!M.select.includes(A)&&M.select.push(A):(M.filter_type="include",M.select=[A]):n.filters.push({id:L.id,filter_type:"include",select:[A]}))}),e("onAddFilterParams")},_=x=>{c.value[x.id]=!0};s.onMounted(()=>{window.addEventListener("onBeforeDragMove",u),ce.on("onQuickAddFilter",_),ce.on("addDashTableFilter",y),s.nextTick(()=>{g()})}),s.onBeforeUnmount(()=>{ce.off("onQuickAddFilter",_),ce.off("addDashTableFilter",y),window.removeEventListener("onBeforeDragMove",u)});const w=(x,b)=>{window.dispatchEvent(new Event("onBeforeDragMove"))},S=(x,b)=>{var A,L;const{draggedContext:C,relatedContext:k}=x,{element:$}=C,N=k.list;if(x.to.className===x.from.className)return!0;if(Ko(N,{id:$.id})||C.futureIndex<=((L=(A=r.cube)==null?void 0:A.fixSplit)==null?void 0:L.length)-1)return!1};return(x,b)=>(s.openBlock(),s.createElementBlock("div",Ece,[s.createVNode(s.unref(Sa.default),{class:"filter-content drag-content draggable-filter",sort:!0,modelValue:s.unref(i),"onUpdate:modelValue":b[1]||(b[1]=C=>s.isRef(i)?i.value=C:null),handle:".handle",group:{name:"dimension",pull:"clone",put:"dimension"},"item-key":"id",move:S,onStart:w},{header:s.withCtx(()=>[s.createElementVNode("div",Ace,[s.renderSlot(x.$slots,"left"),s.createVNode(GM,{"has-title":!1,cube:t.cube,selected:s.unref(n).filters,onOnAdd:f},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Button),null,{default:s.withCtx(()=>[s.createVNode(s.unref(R.Space),{size:8},{default:s.withCtx(()=>[s.createVNode(s.unref(y0)),Dce]),_:1})]),_:1})]),_:1},8,["cube","selected"])])]),item:s.withCtx(({element:C})=>[s.createElementVNode("div",Oce,[s.unref(Io)(t.cube,C.id)?(s.openBlock(),s.createBlock(s.unref(Nce),{key:0,pickerState:{hours:s.unref(l).hours,minutes:s.unref(l).minutes,seconds:s.unref(l).seconds},formatter:s.unref(o),modelValue:v.value,"onUpdate:modelValue":b[0]||(b[0]=k=>v.value=k)},{default:s.withCtx(()=>[s.createElementVNode("div",Lce,[s.createElementVNode("span",Pce,s.toDisplayString(s.unref(f1)(s.unref(n).range)),1)])]),_:1},8,["pickerState","formatter","modelValue"])):(s.openBlock(),s.createBlock(s.unref(R.Popover),{key:1,visible:c.value[C.id],"onUpdate:visible":k=>c.value[C.id]=k,placement:"bottomLeft",trigger:"click",destroyTooltipOnHide:"",onVisibleChange:k=>h(k,C),"overlay-class-name":"filter-pop-container"},{content:s.withCtx(()=>[s.createVNode(rM,{cube:t.cube,visible:c.value[C.id],dimension:C,onOnCancel:p,onOnOk:m,"filter-state":{filters:s.unref(n).filters,range:s.unref(n).range,timezone:s.unref(n).timezone}},null,8,["cube","visible","dimension","filter-state"])]),default:s.withCtx(()=>{var k,$;return[s.createElementVNode("div",{class:s.normalizeClass(["mega-tag",{disabled:s.unref(Io)(t.cube,C.id)}])},[s.createTextVNode(s.toDisplayString((k=s.unref(Fl)(t.cube.dimensions,C.id))==null?void 0:k.name)+" ",1),C.select?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(["mega-tag-count",{exclude:(C==null?void 0:C.filter_type)==="exclude"}])},"("+s.toDisplayString(($=C.select)==null?void 0:$.length)+")",3)):s.createCommentVNode("",!0),C.id!==t.cube.primaryTimeAttribute?(s.openBlock(),s.createElementBlock("div",{key:1,class:"mega-tag-action",onClick:s.withModifiers(N=>d(C),["stop"])},[s.createVNode(s.unref(Mi))],8,Bce)):s.createCommentVNode("",!0)],2)]}),_:2},1032,["visible","onUpdate:visible","onVisibleChange"]))])]),_:3},8,["modelValue"]),s.renderSlot(x.$slots,"right")]))}}),Rce={class:"add-search"},Vce={class:"measure-list"},Fce={class:"action-container"},zce=s.createTextVNode("Cancel"),Hce=s.createTextVNode("OK"),Uce=s.defineComponent({props:{cube:{type:Object,default:null},selected:{type:Array,default:()=>[]}},emits:["onAdd"],setup(t,{emit:e}){const r=t,n=s.ref(""),a=s.computed(()=>{const f=n.value,d=at(r.cube.measures);return f?d.map(h=>Ti(te({},h),{show:h.id.toLowerCase().includes(f.toLowerCase())||h.name.toLowerCase().includes(f.toLowerCase())})):d}),i=s.ref(!1),o=s.ref([]),l=f=>{if(f.target.checked){const d=a.value.map(h=>h.id);o.value=d}else o.value=[]},c=()=>{i.value=!1,o.value=[]},u=()=>{e("onAdd",s.toRaw(o.value)),i.value=!1};return s.watch(()=>i.value,(f,d)=>{f?o.value=[...r.selected]:(o.value=[],n.value="")}),(f,d)=>(s.openBlock(),s.createBlock(s.unref(R.Popover),{visible:i.value,"onUpdate:visible":d[2]||(d[2]=h=>i.value=h),placement:"bottomLeft",trigger:"click",overlayClassName:"mega-add-dimension dash-add-measures"},{title:s.withCtx(()=>[s.createElementVNode("div",Rce,[s.createVNode(s.unref(R.Input),{placeholder:"Search Key",ref:"inputRef",allowClear:"",value:n.value,"onUpdate:value":d[0]||(d[0]=h=>n.value=h)},{prefix:s.withCtx(()=>[s.createVNode(s.unref(Ca))]),_:1},8,["value"])])]),content:s.withCtx(()=>[s.createElementVNode("div",Vce,[s.unref(a).length>0?(s.openBlock(),s.createBlock(s.unref(R.CheckboxGroup),{key:0,value:o.value,"onUpdate:value":d[1]||(d[1]=h=>o.value=h),class:"mega-search-list",style:{width:"100%"}},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Row),{gutter:[12,12]},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(a),h=>s.withDirectives((s.openBlock(),s.createBlock(s.unref(R.Col),{key:h.id,span:24},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Checkbox),{style:{width:"100%"},value:h.id},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(h.name),1)]),_:2},1032,["value"])]),_:2},1536)),[[s.vShow,(h==null?void 0:h.show)!==!1]])),128))]),_:1})]),_:1},8,["value"])):(s.openBlock(),s.createBlock(lr,{key:1}))]),s.createElementVNode("div",Fce,[s.createVNode(s.unref(R.Checkbox),{onChange:l},{default:s.withCtx(()=>[s.createTextVNode("Select All ("+s.toDisplayString(o.value.length)+")",1)]),_:1}),s.createElementVNode("div",null,[s.createVNode(s.unref(R.Button),{type:"link",onClick:c},{default:s.withCtx(()=>[zce]),_:1}),s.createVNode(s.unref(R.Button),{type:"primary",onClick:u},{default:s.withCtx(()=>[Hce]),_:1})])])]),default:s.withCtx(()=>[s.renderSlot(f.$slots,"default")]),_:3},8,["visible"]))}}),jce={class:"edit-content"},Yce=s.createElementVNode("div",{style:{"flex-grow":"1"}},null,-1),Gce=s.createTextVNode("Cancel"),Wce=s.createTextVNode("OK"),Zce=s.defineComponent({props:{dialogVisible:{type:Boolean,default:!1}},emits:["onOk","onCancel","update:dialogVisible"],setup(t,{emit:e}){const r=t,n=s.inject("currentState"),a=()=>{e("onCancel")},i=()=>{var c;e("onOk",{id:(c=n==null?void 0:n.dashboard)==null?void 0:c.id,name:o.name}),a()},o=s.reactive({name:""}),l=c=>{var u;c?o.name=(u=n==null?void 0:n.dashboard.name)!=null?u:"":o.name=""};return s.watch(()=>r.dialogVisible,(c,u)=>{l(c)}),(c,u)=>(s.openBlock(),s.createBlock(s.unref(R.Modal),s.mergeProps({mask:!0,maskClosable:!1,onOk:i,onCancel:a,width:520,destroyOnClose:""},c.$attrs,{centered:"",title:"Edit Dashboard",wrapClassName:"edit-container"}),{footer:s.withCtx(()=>[s.renderSlot(c.$slots,"left"),Yce,s.createElementVNode("div",null,[s.createVNode(s.unref(R.Button),{onClick:a},{default:s.withCtx(()=>[Gce]),_:1}),s.createVNode(s.unref(R.Button),{type:"primary",onClick:i,disabled:s.unref(o).name.trim()===""},{default:s.withCtx(()=>[Wce]),_:1},8,["disabled"])])]),default:s.withCtx(()=>[s.createElementVNode("div",jce,[s.createVNode(s.unref(R.Form),{"label-col":{span:6},"wrapper-col":{span:17}},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Form).Item,{label:"Name",required:""},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Input),{value:s.unref(o).name,"onUpdate:value":u[0]||(u[0]=f=>s.unref(o).name=f)},null,8,["value"])]),_:1})]),_:1})])]),_:3},16))}}),qce={key:0,class:"mega-dashboard__empty"},Xce=s.createTextVNode(" Dimension "),Kce=s.createTextVNode(" Measures"),Jce=s.createTextVNode(" Publish"),Qce=s.createTextVNode(" UnPublish"),eue=s.defineComponent({props:{tableCubes:{type:Object,default:()=>{}},isAdmin:{type:Boolean},isPush:{type:Boolean,default:!1},pushId:{type:Number,default:null}},setup(t){const e=t,r=s.inject("currentState"),n=s.inject("dashboardState"),a=s.inject("getAuth"),i=s.inject("getHeader"),o=s.inject("setupDashboard"),l=s.inject("dashGrid"),c=s.computed(()=>{var Z,K,J;return Array.isArray(n.dashboards)&&n.dashboards.length>0&&((Z=r==null?void 0:r.dashboard)==null?void 0:Z.id)&&((J=(K=r==null?void 0:r.dashboard)==null?void 0:K.layout)==null?void 0:J.length)>0}),u=s.computed(()=>{var Z,K;return(K=(Z=r==null?void 0:r.dashboard)==null?void 0:Z.is_default)!=null?K:!1}),f=s.computed(()=>{var J,oe;if(!((J=r==null?void 0:r.dashboard)==null?void 0:J.id))return null;const K=r.dashboard.layout;return K.length===0?null:e.tableCubes[(oe=K[0])==null?void 0:oe.table]}),d=s.computed(()=>{const Z=k0(Hn,!0),K=f.value,J=K.dimensions.find(oe=>oe.id===K.primaryTimeAttribute);return J?Z.filter(oe=>{var Ce;return(Ce=J==null?void 0:J.granularities)==null?void 0:Ce.includes(oe.value)}):[]}),h=s.computed(()=>({filters:n.filters,range:n.range,timezone:n.timezone,measures:n.measures,trends:n.trends,leaders:n.leaders,isDefault:u.value})),{loading:p,run:m}=ar({url:Un.api,method:"get",headers:te({},i()),params:te({},a())},{manual:!0,onSuccess:Z=>{var oe;let K=Z||[];K=K.map(Ce=>(Ce.is_default=Boolean(Ce.is_default),Ce));const J=wn(K,["is_default","name"]);if(n.dashboards=J,J&&J.length>0){if((oe=r.dashboard)==null?void 0:oe.id)return;const Ce=e.isPush?Xo(J,{id:e.pushId}):Xo(J,{is_default:!0}),Se=Ye(Ce!=null?Ce:J[0]);if(Se.layout=Se.layout?JSON.parse(Se.layout):[],Ce&&Se.layout.length>0){const $e=Se.layout[0].table;if(!$e)return;o(e.tableCubes[$e])}r.dashboard=Se}},onError:()=>{}}),v=s.computed(()=>e.isAdmin?!0:e.isPush?!1:!u.value),g=s.computed(()=>e.isAdmin?!0:e.isPush?!1:!u.value),y=s.inject("setupConfig"),_=s.inject("dataConfig"),w=(Z,K)=>{const J=zh(K);!J||(y(Z,J),_.layout.type="cube")},S=Z=>{const K=r.dashboard.layout.findIndex(J=>J.id===Z.id);K!==-1&&(r.dashboard.layout.splice(K,1),A(),window.dispatchEvent(new Event("resize")))},x=s.ref(!1),b=s.ref(null),C=Z=>{const K=s.toRaw(Z);b.value=K,s.nextTick(()=>{x.value=!0})},k=Z=>{const K=r.dashboard.layout.find(J=>J.id===Z.id);K&&(K.name=Z.name,K.auto=Z.auto,A())},$=Z=>{const{id:K,visual:J,count:oe,measures_count:Ce,height:Se}=Z||{};if(!K||!r.dashboard.layout)return;const $e=r.dashboard.layout.find(ge=>ge.i===K);!$e||(e.isPush&&($e.h=Math.max((Se+16)/(20+16),12)),window.dispatchEvent(new Event("resize")))},N=Z=>{A()},A=()=>{if(v.value===!1)return;const Z=Ye(r.dashboard);Z.layout=JSON.stringify(Z.layout||[]);const K=n.dashboards.findIndex(J=>J.id===Z.id);n.dashboards[K].layout=Z.layout,L({url:Un.apiId(r.dashboard.id),data:te({},Z)})},{run:L}=ar({url:Un.api,method:"put",headers:te({},i()),params:te({},a())},{manual:!0,onSuccess:Z=>{},onError:()=>{}}),M=s.computed(()=>{const Z={};return r.reports.forEach(K=>{Z[K.id]=K.content}),Z}),O=()=>{const Z={dashboard_id:r.dashboard.id,default:!1};D({data:Z})},T=()=>{const Z=r.dashboard.layout.map(J=>J.id),K={dashboard_id:r.dashboard.id,report_id:Z,default:!0};D({data:K})},{loading:E,run:D}=ar({url:Un.apiSet,method:"post",headers:te({},i()),params:te({},a())},{manual:!0,onSuccess:Z=>{R.message.success("Operate successfully!"),m()},onError:()=>{}}),P=Z=>{n.measures=[...Z],F()},I=Z=>{var K;if(!n.dimensions.includes(Z.id)){n.dimensions.push(Z.id);const J=f.value,oe={id:J.id,filters:[{id:J.primaryTimeAttribute}],splits:[{id:Z.id}],measures:[(K=n.leaders)!=null?K:J.defaultSelectedMeasures[0]],range:s.toRaw(n.range),timezone:n.timezone,visual:"table"},Ce=new Date().getTime(),{col:Se,w:$e,h:ge}=l.value||{},[Qe,ot]=T0(r.dashboard.layout,Se,$e,ge);r.dashboard.layout.push({id:Ce,name:`Custom:${Z.name}`,table:J.id,auto:0,i:Ce,x:Qe,y:ot,w:$e,h:ge,hash:qn(oe)}),s.nextTick(()=>{ce.emit("on-params-change"),window.dispatchEvent(new Event("resize"))})}},V=s.ref(!0),F=()=>{V.value=!1,s.nextTick(()=>{V.value=!0,ce.emit("on-params-change")})},H=s.inject("getReports"),Y=s.ref(!1),Q=s.ref(null),ae=s.ref(!1),le=()=>{ae.value=!0},ye=Z=>{if(v.value!==!1&&Z.name&&Z.id){const K=Ye(r.dashboard);K.name=Z.name,K.layout=JSON.stringify(K.layout||[]);const J=n.dashboards.findIndex(oe=>oe.id===K.id);n.dashboards[J].layout=K.layout,n.dashboards[J].name=Z.name,r.dashboard.name=Z.name,L({url:Un.apiId(r.dashboard.id),data:te({},K)})}};s.onMounted(()=>{(r==null?void 0:r.reports.length)===0?(Y.value=!0,H().then(()=>{Y.value=!1,m()})):n.dashboards.length===0&&m(),ce.on("update-dashboard",A),ce.on("edit-dashboard",le)}),s.onBeforeUnmount(()=>{ce.off("update-dashboard",A),ce.off("edit-dashboard",le)});const de=s.computed(()=>{const Z=r.dashboard.layout.map(K=>K.table);return Jo(Z).length===1});return(Z,K)=>{var Ce,Se,$e;const J=s.resolveComponent("grid-item"),oe=s.resolveComponent("grid-layout");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["mega-dashboard",{"is-empty":!s.unref(c)||s.unref(p)||Y.value}])},[!s.unref(c)||s.unref(p)||Y.value?(s.openBlock(),s.createElementBlock("div",qce,[s.createVNode(lr,{loading:s.unref(p)||Y.value,msg:s.unref(p)||Y.value?"Loading Dashboard...":(($e=(Se=(Ce=s.unref(r))==null?void 0:Ce.dashboard)==null?void 0:Se.layout)==null?void 0:$e.length)===0?"Dashboard is empty!":"No dashboard available yet!"},null,8,["loading","msg"])])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[t.isPush?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["dash-header",{"is-normal":!s.unref(u)}])},[s.unref(u)&&s.unref(r).dashboard.layout&&s.unref(r).dashboard.layout.length>0&&s.unref(de)?(s.openBlock(),s.createBlock(Ice,{key:0,cube:s.unref(f),onOnAddFilterParams:F},{left:s.withCtx(()=>[s.createVNode(GM,{selected:s.unref(n).dimensions,"has-title":!1,cube:s.unref(f),onOnAdd:I},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Button),null,{default:s.withCtx(()=>[s.createVNode(s.unref(R.Space),{size:8},{default:s.withCtx(()=>[s.createVNode(s.unref(b0)),Xce]),_:1})]),_:1})]),_:1},8,["selected","cube"]),s.createVNode(Uce,{selected:s.unref(n).measures,cube:s.unref(f),onOnAdd:P},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Button),null,{default:s.withCtx(()=>[s.createVNode(s.unref(R.Space),{size:8},{default:s.withCtx(()=>[s.createVNode(s.unref(b0)),Kce]),_:1})]),_:1})]),_:1},8,["selected","cube"])]),_:1},8,["cube"])):s.createCommentVNode("",!0),s.createVNode(s.unref(R.Space),{size:16},{default:s.withCtx(()=>[s.unref(u)&&s.unref(de)?(s.openBlock(),s.createBlock(s.unref(R.Select),{key:0,style:{width:"120px"},placeholder:"Trends By",allowClear:"",options:s.unref(d),value:s.unref(n).trends,"onUpdate:value":K[0]||(K[0]=ge=>s.unref(n).trends=ge),onChange:F},null,8,["options","value"])):s.createCommentVNode("",!0),t.isAdmin?(s.openBlock(),s.createBlock(s.unref(R.Popconfirm),{key:1,title:"Are you sure to publish this dashboard?","ok-text":"Publish","cancel-text":"Cancel",placement:"bottomRight",onConfirm:T},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Button),{type:"primary",loading:s.unref(E),disabled:s.unref(E)},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Space),null,{default:s.withCtx(()=>[s.createVNode(s.unref(w0)),Jce]),_:1})]),_:1},8,["loading","disabled"])]),_:1})):s.createCommentVNode("",!0),t.isAdmin&&s.unref(u)?(s.openBlock(),s.createBlock(s.unref(R.Popconfirm),{key:2,title:"Are you sure to unpublish this dashboard?","ok-text":"UnPublish","cancel-text":"Cancel",placement:"bottomRight",onConfirm:O},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Button),{danger:"",type:"primary",loading:s.unref(E),disabled:s.unref(E)},{default:s.withCtx(()=>[s.createVNode(s.unref(R.Space),null,{default:s.withCtx(()=>[s.createVNode(s.unref(w0)),Qce]),_:1})]),_:1},8,["loading","disabled"])]),_:1})):s.createCommentVNode("",!0)]),_:1})],2)),s.unref(r).dashboard.layout&&s.unref(r).dashboard.layout.length>0?(s.openBlock(),s.createBlock(oe,{key:1,layout:s.unref(r).dashboard.layout,"onUpdate:layout":K[1]||(K[1]=ge=>s.unref(r).dashboard.layout=ge),"col-num":24,"row-height":20,margin:[16,16],"is-draggable":s.unref(g),"is-resizable":s.unref(v),"vertical-compact":!0,"use-css-transforms":!0,onLayoutUpdated:N},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(r).dashboard.layout,ge=>(s.openBlock(),s.createBlock(J,{key:`g-${ge.i}`,x:ge.x,y:ge.y,w:ge.w,h:ge.h,i:ge.i,"drag-allow-from":".dash-drag",id:`grid-${ge.i}`},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(Fse,{"dash-layout":ge,"is-draggable":s.unref(g),title:ge.name,onOnDeleteLayout:S,onOnUpdateLayout:C,onOnChangeCube:Qe=>{var ot;return w(t.tableCubes[ge.table],(ot=s.unref(M)[ge.id])!=null?ot:ge.hash)},key:`card-${ge.id}`},{default:s.withCtx(()=>{var Qe;return[(s.openBlock(),s.createBlock(QT,{key:`visual-${ge.id}`,"params-extra":s.unref(de)&&!t.isPush?s.unref(h):null,"is-default":s.unref(u),auth:s.unref(a)(),header:s.unref(i)(),cube:t.tableCubes[ge.table],hash:(Qe=s.unref(M)[ge.id])!=null?Qe:ge.hash,"auto-refresh":ge.auto,"grid-id":ge.i,"is-push":t.isPush,onOnLoadComplete:$},null,8,["params-extra","is-default","auth","header","cube","hash","auto-refresh","grid-id","is-push"]))]}),_:2},1032,["dash-layout","is-draggable","title","onOnChangeCube"]))]),_:2},1032,["x","y","w","h","i","id"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):s.createCommentVNode("",!0)],64)),s.createVNode(Yse,{"dash-layout":b.value,visible:x.value,dialogVisible:x.value,ref:"editLayoutRef",onOnCancel:K[2]||(K[2]=()=>x.value=!1),onOnOk:k},null,8,["dash-layout","visible","dialogVisible"]),s.createVNode(Zce,{visible:ae.value,dialogVisible:ae.value,ref_key:"editDashboardRef",ref:Q,onOnCancel:K[3]||(K[3]=()=>ae.value=!1),onOnOk:ye},null,8,["visible","dialogVisible"])],2)}}}),tue={class:"mega-body"},d$=s.defineComponent({props:{authHeader:{type:Object,default:()=>{}},authParams:{type:Object,default:()=>{}},sysName:{type:String,default:"Mega",required:!0},layout:{type:String,default:"cube"},moudles:{type:Object,default:()=>{}},isAdmin:{type:Boolean,default:!1},dashGrid:{type:Object,default:()=>({col:3,w:8,h:8})},shareHash:{type:String,default:""},isPush:{type:Boolean,default:!1},pushId:{type:Number,default:null},jumpParams:{type:Object,default:null},baseURL:{type:String,default:"/mega/api/v1/"},userConfigs:{type:Object,default:null},expired:{type:Number,default:0},onBeforeDownload:{type:Function,default:null}},emits:["onRequestAuthFaild","onReportShare","onLayoutChange","onConfigChange"],setup(t,{expose:e,emit:r}){const n=t,a=()=>n.authParams;s.provide("getAuth",a);const i=()=>n.authHeader;s.provide("getHeader",i),s.provide("isAdmin",n.isAdmin);const o=()=>n;s.provide("getProps",o);const l=s.computed(()=>{const{col:D,w:P,h:I}=n.dashGrid||{};return{col:D!=null?D:3,w:P!=null?P:8,h:I!=null?I:8}});s.provide("dashGrid",l);const c=s.ref(1),u=s.computed(()=>S.value||C.value?S.value?"Checking your permissions!":C.value?"Getting Datacubes & DataSets!":"":f(c.value)),f=D=>{switch(D){case 1:return"Mega init!";case 2:return"Check permissions successfully!";case 3:return"You do not have access!";case 4:return"Get datacubes successfully!";case 5:return"Failed to get datacubes!";case 6:return"No datacubes available!";default:return"Unknow"}},d=s.reactive({dashboards:[],trends:null,leaders:null,range:{},timezone:"",dimensions:[],filters:[],measures:[]});s.provide("dashboardState",d);const h=s.reactive({custom:[],cube:{},reports:[],dashboard:{}});s.provide("currentState",h);const p=s.reactive({dataCubes:[],app_system:n.sysName,moudle:{save_report:!0,dashboard:!0,download:!0,share_report:!1,share_dashboard:!1,timezone:!0,config:!1},layout:{type:"cube"},expired:n.expired});s.provide("dataConfig",p);const m=()=>{const{save_report:D,dashboard:P,download:I,share_report:V,share_dashboard:F,timezone:H,config:Y,push:Q,download_front:ae}=n.moudles||{};p.moudle={save_report:D!=null?D:!1,dashboard:P!=null?P:!1,download:I!=null?I:!1,share_report:V!=null?V:!1,share_dashboard:F!=null?F:!1,timezone:H!=null?H:!1,config:Y!=null?Y:!1,push:Q!=null?Q:!1,download_front:ae!=null?ae:!0}},v=s.computed(()=>{const D={};return p.dataCubes.forEach(P=>{D[P.id]=P}),D}),g=s.reactive({showLabel:!1,showLegend:!0,table:{proportion:!1,expand:!0}});s.provide("styleState",g);const y=s.reactive({layout:{menu_expand:!0}});s.provide("uiState",y);const _=()=>({id:null,filters:[],splits:[],measures:[],range:{},timezone:"",visual:"",custom_measures:[],legend:{selected:[]}}),w=s.reactive(te({},_()));s.provide("cubeState",w);const{loading:S,run:x}=ar({url:"settings/",method:"get",headers:te({},i()),params:te({},a())},{manual:!0,onSuccess:()=>{c.value=2,k()},onError:()=>{c.value=3}}),b=s.ref([]);s.provide("groupCubes",b);const{loading:C,run:k}=ar({url:"settings/data_cubes/",method:"get",headers:te({},i()),params:te({},a())},{manual:!0,onSuccess:D=>{var P;if((D==null?void 0:D.dataCubes)&&((P=D==null?void 0:D.dataCubes)==null?void 0:P.length)>0){b.value=rA(D),c.value=4,p.layout.type=n.layout,p.moudle.save_report&&p.layout.type==="cube"&&$();let I=(D==null?void 0:D.dataCubes)||[];if(n.userConfigs&&n.userConfigs.cube){const V=n.userConfigs.cube;I.forEach(F=>{if(V[F.id]){const{measures:H,selected:Y,custom_measures:Q}=V[F.id];H&&Array.isArray(H)&&H.length>0&&(F.measures=F.measures.sort((ae,le)=>H.indexOf(ae.id)-H.indexOf(le.id))),Y&&Array.isArray(Y)&&Y.length>0&&(F.defaultSelectedMeasures=[...Y].filter(ae=>!Yr(ae))),Q&&(F.custom_measures=Q)}})}if(p.dataCubes=I,n.shareHash)O(n.shareHash);else if(n.jumpParams){const V=D==null?void 0:D.dataCubes.find(F=>{var H,Y;return F.id===(((H=n.jumpParams)==null?void 0:H.table)||((Y=n.jumpParams)==null?void 0:Y.id))});L(V||[])}else A((D==null?void 0:D.dataCubes)||[])}else c.value=6},onError:()=>{c.value=5}}),{run:$}=ar({url:zo.api,method:"get",headers:te({},i()),params:te({},a())},{manual:!0,onSuccess:D=>{h.reports=wn(D||[],["is_default","name"])},onError:()=>{}});s.provide("getReports",$);const N=()=>{Object.assign(w,_())},A=(D,P)=>{let I=null;if(Array.isArray(D)){p.dataCubes=D;const V=D.find(F=>F.is_default);I=V!=null?V:D[0]}else I=D;h.cube=I,h.custom=I.custom_measures&&I.custom_measures.length>0?Ye(I.custom_measures):[],N(),s.nextTick(()=>{var V,F,H;if(w.id=I.id,P){const{filters:Y,splits:Q,measures:ae,range:le,timezone:ye,visual:de,custom_measures:Z,config_measures:K}=P;if(K&&Z){const $e=Ye((V=I==null?void 0:I.custom_measures)!=null?V:[]);for(let ge=0;ge<K.length;ge++){const Qe=(F=K[ge])==null?void 0:F.id;$e.findIndex(j=>(j==null?void 0:j.id)===Qe)===-1&&$e.push(K[ge])}I.custom_measures=[...$e],h.custom=[...$e]}w.filters=[...Y],w.splits=[...Q],w.measures=[...ae],w.timezone=ye,w.visual=de;const{relative:J,current_time:oe,previous_time:Ce,create_time:Se}=le;if(w.range.relative=J!=null?J:!1,w.range.current_time=[],w.range.previous_time=[],w.custom_measures=Z!=null?Z:[],J){const[$e,ge]=oe,Qe=fe(ge).diff(fe($e),"days"),ot=Se?fe(Se).diff(fe(ge.substr(0,10)),"days"):0,j=fe().hour(fe(ge).hour()).minute(fe(ge).minute()).subtract(ot,"days"),W=fe().hour(fe($e).hour()).minute(fe($e).minute()).subtract(Qe+ot,"days"),q=Q.find(ue=>ue.id===I.primaryTimeAttribute),G=(H=q==null?void 0:q.granularity)!=null?H:I.defaultSelectedGranularity;if(w.range.current_time=jn([W,j],G,I.primaryTimeGranularity),Ce&&Ce.length>0){const ue=fe(W).subtract(Qe+1,"days"),be=fe(j).subtract(Qe+1,"days");w.range.previous_time=jn([ue,be],G,I.primaryTimeGranularity)}}else w.range.current_time=[...oe],w.range.previous_time=[...Ce]}else{w.splits=I.defaultSelectedSplit?I.defaultSelectedSplit.map(Q=>({id:Q})):[],w.measures=[...I.defaultSelectedMeasures],w.timezone=I.defaultTimezone||"UTC",w.visual=I.defaultSelectedVis||"total",w.filters.push({id:I.primaryTimeAttribute});const Y=ph(I.defaultIntervals,I.defaultSelectedGranularity||I.primaryTimeGranularity,I.primaryTimeGranularity,w.timezone);w.range.relative=!1,w.range.current_time=[...Y],w.range.previous_time=[]}})};s.provide("setupConfig",A);const L=D=>{h.cube=D,N(),w.id=D.id,s.nextTick(()=>{var P,I,V,F,H,Y,Q,ae;if(w.splits=(I=(P=n.jumpParams)==null?void 0:P.splits)!=null?I:D.defaultSelectedSplit?D.defaultSelectedSplit.map(le=>({id:le})):[],w.measures=(F=(V=n.jumpParams)==null?void 0:V.measures)!=null?F:[...D.defaultSelectedMeasures],w.timezone=((H=n.jumpParams)==null?void 0:H.timezone)||D.defaultTimezone||"UTC",w.visual=((Y=n.jumpParams)==null?void 0:Y.visual)||D.defaultSelectedVis||"total",w.filters.push({id:D.primaryTimeAttribute}),((Q=n.jumpParams)==null?void 0:Q.filters)&&w.filters.push(...n.jumpParams.filters),(ae=n.jumpParams)==null?void 0:ae.range){const{relative:le,current_time:ye,previous_time:de}=n.jumpParams.range;w.range.relative=le!=null?le:!1,w.range.current_time=[...ye],w.range.previous_time=[...de]}else{const le=ph(D.defaultIntervals,D.defaultSelectedGranularity||D.primaryTimeGranularity,D.primaryTimeGranularity,w.timezone);w.range.relative=!1,w.range.current_time=[...le],w.range.previous_time=[]}})},M=D=>{const P=ph(D.defaultIntervals,D.defaultSelectedGranularity||D.primaryTimeGranularity,D.primaryTimeGranularity,D.defaultTimezone||"UTC");d.range.relative=!1,d.range.current_time=[...P],d.range.previous_time=[],d.timezone=D.defaultTimezone||"UTC",d.filters=[],d.dimensions=[],d.measures=[],d.filters.push({id:D.primaryTimeAttribute}),d.trends=null,d.leaders=null};s.provide("setupDashboard",M);const O=D=>{const P=Z1(D,p.dataCubes);if(!P){R.message.error("Hash conditional parsing failed!");return}const{cube:I,filters:V,splits:F,measures:H,id:Y,range:Q,timezone:ae,visual:le,expired_time:ye,custom_measures:de,config_measures:Z}=P;if(ye&&fe(ye)<fe()){R.message.error("Hash has expired!");return}A(I,{filters:V,splits:F,measures:H,id:Y,range:Q,timezone:ae,visual:le,custom_measures:de,config_measures:Z})};s.provide("resetFromHash",O),s.onMounted(()=>{window._mega={base:n.baseURL},x(),m(),ce.on("request-auth-faild",D=>{r("onRequestAuthFaild",D)}),ce.on("report-share",D=>{r("onReportShare",D)}),ce.on("on-change-layout",D=>{r("onLayoutChange",D.target.value)}),ce.on("on-change-config",D=>{r("onConfigChange",D)})}),s.onBeforeUnmount(()=>{ce.off("request-auth-faild"),ce.off("report-share"),ce.off("on-change-layout"),ce.off("on-change-config")});const T=()=>{let D="";if(p.layout.type==="cube")D=qn(w);else{const{filters:P,range:I,timezone:V,measures:F}=d;D=qn({dashboard:h.dashboard,extraParams:{filters:P,range:I,timezone:V,measures:F}})}return D},E=D=>{const P=p.dataCubes.find(I=>I.id===D);!P||(h.cube=te({},P),h.custom=(P==null?void 0:P.custom_measures)||[],A(P))};return s.provide("changeCube",E),e({getShareHash:T,resetFromHash:O,changeCube:E}),(D,P)=>{var I,V,F;return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["mega-container",{"is-push-layout":t.isPush}])},[s.unref(S)||s.unref(C)||c.value!==4?(s.openBlock(),s.createBlock(lr,{key:0,type:"access",loading:s.unref(S)||s.unref(C),msg:s.unref(u)},null,8,["loading","msg"])):((I=s.unref(p).layout)==null?void 0:I.type)==="cube"&&!((V=s.unref(h).cube)==null?void 0:V.id)?(s.openBlock(),s.createBlock(lr,{key:1,type:"access",msg:"Data cube parsing error."})):(s.openBlock(),s.createElementBlock(s.Fragment,{key:2},[t.isPush?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(mre,{key:0},{config:s.withCtx(()=>[s.renderSlot(D.$slots,"config")]),push:s.withCtx(()=>[s.renderSlot(D.$slots,"push",{request:s.unref(ar),getAuth:a,getHeader:i,dashboards:s.unref(d).dashboards})]),"cube-list":s.withCtx(()=>{var H,Y;return[s.renderSlot(D.$slots,"cube-list",{currentCube:(Y=(H=s.unref(h))==null?void 0:H.cube)==null?void 0:Y.id,dataCubes:b.value})]}),_:3})),s.createElementVNode("div",tue,[((F=s.unref(p).layout)==null?void 0:F.type)==="dashboard"?(s.openBlock(),s.createBlock(eue,{key:0,"is-push":t.isPush,"push-id":t.pushId,"is-admin":t.isAdmin,"table-cubes":s.unref(v)},null,8,["is-push","push-id","is-admin","table-cubes"])):(s.openBlock(),s.createBlock($oe,{key:1}))])],64))],2)}}});var rue=Object.assign(d$,{install:t=>{t.component("MegaLib",d$)}});Ne.convertHashToObj=zh,Ne.convertObjToHash=qn,Ne.default=rue,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne[Symbol.toStringTag]="Module"});