HEX
Server: nginx/1.28.3
System: Linux ip-172-31-12-242 6.17.0-1007-aws #7~24.04.1-Ubuntu SMP Thu Jan 22 21:04:49 UTC 2026 x86_64
User: root (0)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/server/panel/BTPanel/static/js/utils-lib-legacy.js
(function(){function _readOnlyError(e){throw new TypeError('"'+e+'" is read-only')}function asyncGeneratorStep(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){asyncGeneratorStep(i,r,o,a,s,"next",e)}function s(e){asyncGeneratorStep(i,r,o,a,s,"throw",e)}a(void 0)})}}function _regeneratorValues(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(_typeof2(e)+" is not iterable")}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return _regeneratorDefine2(u,"_invoke",function(n,r,o){var i,s,l,u=0,c=o||[],d=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,l=e,p.n=n,a}};function h(n,r){for(s=n,l=r,t=0;!d&&u&&!o&&t<c.length;t++){var o,i=c[t],h=p.p,f=i[2];n>3?(o=f===r)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((o=n<2&&h<i[1])?(s=0,p.v=r,p.n=i[1]):h<f&&(o=n<3||i[0]>r||r>f)&&(i[4]=n,i[5]=r,p.n=f,s=0))}if(o||n>1)return a;throw d=!0,r}return function(o,c,f){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,f),s=c,l=f;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(p.n=-1),h(s,l)):p.n=l:p.v=l);try{if(u=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=p.n<0)?l:n.call(r,p))!==a)break}catch(t){i=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,o,i),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(_regeneratorDefine2(t={},r,function(){return this}),t),d=u.prototype=s.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,_regeneratorDefine2(d,"constructor",u),_regeneratorDefine2(u,"constructor",l),l.displayName="GeneratorFunction",_regeneratorDefine2(u,o,"GeneratorFunction"),_regeneratorDefine2(d),_regeneratorDefine2(d,o,"Generator"),_regeneratorDefine2(d,r,function(){return this}),_regeneratorDefine2(d,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:i,m:p}})()}function _regeneratorDefine2(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}_regeneratorDefine2=function(e,t,n,r){function i(t,n){_regeneratorDefine2(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},_regeneratorDefine2(e,t,n,r)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _createForOfIteratorHelper(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty2(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _defineProperty2(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_toPropertyKey(r.key),r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof2(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof2(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=_typeof2(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _typeof2(e){return _typeof2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof2(e)}function _wrapAsyncGenerator(e){return function(){return new AsyncGenerator(e.apply(this,arguments))}}function AsyncGenerator(e){var t,n;function r(t,n){try{var i=e[t](n),a=i.value,s=a instanceof _OverloadYield;Promise.resolve(s?a.v:a).then(function(n){if(s){var l="return"===t?"return":"next";if(!a.k||n.done)return r(l,n);n=e[l](n).value}o(i.done?"return":"normal",n)},function(e){r("throw",e)})}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,o){return new Promise(function(i,a){var s={key:e,arg:o,resolve:i,reject:a,next:null};n?n=n.next=s:(t=n=s,r(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}function _awaitAsyncGenerator(e){return new _OverloadYield(e,0)}function _asyncGeneratorDelegate(e){var t={},n=!1;function r(t,r){return n=!0,r=new Promise(function(n){n(e[t](r))}),{done:!1,value:new _OverloadYield(r,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return n?(n=!1,e):r("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(n)throw n=!1,e;return r("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return n?(n=!1,e):r("return",e)}),t}function _OverloadYield(e,t){this.v=e,this.k=t}function _asyncIterator(e){var t,n,r,o=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);o--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new AsyncFromSyncIterator(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function AsyncFromSyncIterator(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return AsyncFromSyncIterator=function(e){this.s=e,this.n=e.next},AsyncFromSyncIterator.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new AsyncFromSyncIterator(e)}AsyncGenerator.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},AsyncGenerator.prototype.next=function(e){return this._invoke("next",e)},AsyncGenerator.prototype.throw=function(e){return this._invoke("throw",e)},AsyncGenerator.prototype.return=function(e){return this._invoke("return",e)},System.register(["./base-lib-legacy.js?v=1777008528","./__commonjsHelpers__-legacy.js?v=1777008528"],function(exports,module){"use strict";var defineAsyncComponent,ElLoading,nextTick,ElMessage,useClipboard,useRoute,defineComponent,ref,watch,createVNode$1,mergeProps,ElImage,linkProps,toRefs,computed,ElLink,Fragment,isVNode$1,onMounted,openBlock,createElementBlock,unref,createBaseVNode,toDisplayString,withCtx,createTextVNode,createCommentVNode,ElButton,createStaticVNode,renderList,createBlock,ElTag,ElDivider,reactive,resolveDirective,withDirectives,vShow,normalizeClass,normalizeStyle$1,renderSlot,resolveDynamicComponent,withKeys,isRef,withModifiers,ElInputNumber,ElInput,ElCheckbox,shallowRef,isReactive,mergeModels,useModel,useSlots,useTemplateRef,useThrottleFn,provide,createSlots,zhCn,useResizeObserver,ElConfigProvider,ElDialog,createApp,useDark,onUnmounted,toRaw,formProps,ElForm,formItemProps,ElFormItem,checkboxProps,ElCheckboxButton,ElCheckboxGroup,inputProps,radioGroupProps,ElRadioGroup,ElRadio,ElRadioButton,ElOption,ElSelect,switchProps,ElSwitch,buttonProps,ElDropdown,ElDropdownMenu,ElDropdownItem,useWebSocket,toRef,useSessionStorage,ElPagination,ElTableColumn,ElEmpty,ElTable,ElPopover,inject,useDebounceFn,ElTabPane,h,ElTabs,onBeforeUnmount,storeToRefs,defineStore,useLocalStorage,useRouter,nprogress,watchEffect,tryOnScopeDispose,isClient,isNavigationFailure,createRouter,createWebHistory,getDefaultExportFromCjs;return{setters:[function(e){defineAsyncComponent=e.d,ElLoading=e.E,nextTick=e.n,ElMessage=e.a,useClipboard=e.u,useRoute=e.b,defineComponent=e.c,ref=e.r,watch=e.w,createVNode$1=e.e,mergeProps=e.m,ElImage=e.f,linkProps=e.l,toRefs=e.t,computed=e.g,ElLink=e.h,Fragment=e.F,isVNode$1=e.i,onMounted=e.o,openBlock=e.j,createElementBlock=e.k,unref=e.p,createBaseVNode=e.q,toDisplayString=e.s,withCtx=e.v,createTextVNode=e.x,createCommentVNode=e.y,ElButton=e.z,createStaticVNode=e.A,renderList=e.B,createBlock=e.C,ElTag=e.D,ElDivider=e.G,reactive=e.H,resolveDirective=e.I,withDirectives=e.J,vShow=e.K,normalizeClass=e.L,normalizeStyle$1=e.M,renderSlot=e.N,resolveDynamicComponent=e.O,withKeys=e.P,isRef=e.Q,withModifiers=e.R,ElInputNumber=e.S,ElInput=e.T,ElCheckbox=e.U,shallowRef=e.V,isReactive=e.W,mergeModels=e.X,useModel=e.Y,useSlots=e.Z,useTemplateRef=e._,useThrottleFn=e.$,provide=e.a0,createSlots=e.a1,zhCn=e.a2,useResizeObserver=e.a3,ElConfigProvider=e.a4,ElDialog=e.a5,createApp=e.a6,useDark=e.a7,onUnmounted=e.a8,toRaw=e.a9,formProps=e.aa,ElForm=e.ab,formItemProps=e.ac,ElFormItem=e.ad,checkboxProps=e.ae,ElCheckboxButton=e.af,ElCheckboxGroup=e.ag,inputProps=e.ah,radioGroupProps=e.ai,ElRadioGroup=e.aj,ElRadio=e.ak,ElRadioButton=e.al,ElOption=e.am,ElSelect=e.an,switchProps=e.ao,ElSwitch=e.ap,buttonProps=e.aq,ElDropdown=e.ar,ElDropdownMenu=e.as,ElDropdownItem=e.at,useWebSocket=e.au,toRef=e.av,useSessionStorage=e.aw,ElPagination=e.ax,ElTableColumn=e.ay,ElEmpty=e.az,ElTable=e.aA,ElPopover=e.aB,inject=e.aC,useDebounceFn=e.aD,ElTabPane=e.aE,h=e.aF,ElTabs=e.aG,onBeforeUnmount=e.aH,storeToRefs=e.aI,defineStore=e.aJ,useLocalStorage=e.aK,useRouter=e.aL,nprogress=e.aM,watchEffect=e.aN,tryOnScopeDispose=e.aO,isClient=e.aP,isNavigationFailure=e.aQ,createRouter=e.aR,createWebHistory=e.aS},function(e){getDefaultExportFromCjs=e.g}],execute:function execute(){exports({C:deepMerge,a4:use,a5:install,a6:install$1,a7:install$S,a8:install$R,a9:install$Q,aA:install$l,aB:install$k,aC:install$s,aD:install$j,aE:install$i,aF:install$h,aG:install$g,aH:install$f,aI:install$e,aJ:install$b,aK:install$8,aL:install$a,aM:install$9,aN:install$5,aO:install$7,aP:install$6,aQ:install$4,aR:install$3,aS:install$2,aT:installUniversalTransition,aU:installLabelLayout,aY:init$1,aZ:connect,a_:disconnect,aa:install$O,ab:install$M,ac:install$K,ad:install$J,ae:install$I,af:install$H,ag:install$G,ah:install$F,ai:install$D,aj:install$C,ak:install$B,al:install$A,am:install$z,an:install$y,ao:install$x,ap:install$w,aq:install$v,ar:install$u,as:install$t,at:install$r,au:install$q,av:install$L,aw:install$p,ax:install$E,ay:install$o,az:install$n,b0:dispose,b1:getInstanceByDom,b2:getInstanceById,b3:registerTheme,b4:registerPreprocessor,b5:registerProcessor,b6:registerPostInit,b7:registerPostUpdate,b8:registerUpdateLifecycle,b9:registerAction,bB:extendComponentModel,bC:extendComponentView,bD:extendSeriesModel,bE:extendChartView,bF:throttle$2,bG:setPlatformAPI,bH:parseGeoJSON,bL:brushSingle,ba:registerCoordinateSystem,bb:getCoordinateSystemDimensions,bc:registerLayout,bd:registerVisual,be:registerLoading,bf:setCanvasCreator,bg:registerMap$1,bh:getMap,bk:registerLocale,c5:Sortable$1,gp:useLogSelection,j0:Sortable,j1:AutoScrollPlugin,jG:useBottomConfetti,jT:useTerminalSelection,mf:useVisibility});var scriptRel=(relList="undefined"!=typeof document&&document.createElement("link").relList,relList&&relList.supports&&relList.supports("modulepreload")?"modulepreload":"preload"),relList,assetsURL=function(e,t){return new URL(e,t).href},seen={},__vitePreload=exports("_",function(e,t,n){var r=Promise.resolve();return r.then(function(){return e()}).catch(function(e){var t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e})});function bind$3(e,t){return function(){return e.apply(t,arguments)}}var toString$2=Object.prototype.toString,getPrototypeOf=Object.getPrototypeOf,iterator$1=Symbol.iterator,toStringTag=Symbol.toStringTag,kindOf=(cache=Object.create(null),function(e){var t=toString$2.call(e);return cache[t]||(cache[t]=t.slice(8,-1).toLowerCase())}),cache,kindOfTest=function(e){return e=e.toLowerCase(),function(t){return kindOf(t)===e}},typeOfTest=function(e){return function(t){return _typeof2(t)===e}},isArray$3=Array.isArray,isUndefined$1=typeOfTest("undefined");function isBuffer$1(e){return null!==e&&!isUndefined$1(e)&&null!==e.constructor&&!isUndefined$1(e.constructor)&&isFunction$3(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&isArrayBuffer(e.buffer)}var isString$2=typeOfTest("string"),isFunction$3=typeOfTest("function"),isNumber$2=typeOfTest("number"),isObject$5=function(e){return null!==e&&"object"===_typeof2(e)},isBoolean$1=function(e){return!0===e||!1===e},isPlainObject$1=function(e){if("object"!==kindOf(e))return!1;var t=getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||toStringTag in e||iterator$1 in e)},isEmptyObject=function(t){if(!isObject$5(t)||isBuffer$1(t))return!1;try{return 0===Object.keys(t).length&&Object.getPrototypeOf(t)===Object.prototype}catch(e){return!1}},isDate$1=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=function(e){return isObject$5(e)&&isFunction$3(e.pipe)},isFormData=function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||isFunction$3(e.append)&&("formdata"===(t=kindOf(e))||"object"===t&&isFunction$3(e.toString)&&"[object FormData]"===e.toString()))},isURLSearchParams=kindOfTest("URLSearchParams"),_map2=["ReadableStream","Request","Response","Headers"].map(kindOfTest),_map3=_slicedToArray(_map2,4),isReadableStream=_map3[0],isRequest=_map3[1],isResponse=_map3[2],isHeaders=_map3[3],trim$3=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function forEach(e,t){var n,r,o=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,i=void 0!==o&&o;if(null!=e)if("object"!==_typeof2(e)&&(e=[e]),isArray$3(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{if(isBuffer$1(e))return;var a,s=i?Object.getOwnPropertyNames(e):Object.keys(e),l=s.length;for(n=0;n<l;n++)a=s[n],t.call(null,e[a],a,e)}}function findKey(e,t){if(isBuffer$1(e))return null;t=t.toLowerCase();for(var n,r=Object.keys(e),o=r.length;o-- >0;)if(t===(n=r[o]).toLowerCase())return n;return null}var _global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=function(e){return!isUndefined$1(e)&&e!==_global};function merge$1(){for(var e=isContextDefined(this)&&this||{},t=e.caseless,n=e.skipUndefined,r={},o=function(e,o){var i=t&&findKey(r,o)||o;isPlainObject$1(r[i])&&isPlainObject$1(e)?r[i]=merge$1(r[i],e):isPlainObject$1(e)?r[i]=merge$1({},e):isArray$3(e)?r[i]=e.slice():n&&isUndefined$1(e)||(r[i]=e)},i=0,a=arguments.length;i<a;i++)arguments[i]&&forEach(arguments[i],o);return r}var extend$3=function(e,t,n){return forEach(t,function(t,r){n&&isFunction$3(t)?e[r]=bind$3(t,n):e[r]=t},{allOwnKeys:(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),e},stripBOM=function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits$1=function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject=function(e,t,n,r){var o,i,a,s={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},endsWith=function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray=function(e){if(!e)return null;if(isArray$3(e))return e;var t=e.length;if(!isNumber$2(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray$1=(TypedArray="undefined"!=typeof Uint8Array&&getPrototypeOf(Uint8Array),function(e){return TypedArray&&e instanceof TypedArray}),TypedArray,forEachEntry=function(e,t){for(var n,r=(e&&e[iterator$1]).call(e);(n=r.next())&&!n.done;){var o=n.value;t.call(e,o[0],o[1])}},matchAll=function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase$1=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n})},hasOwnProperty$1=function(e){var t=Object.prototype.hasOwnProperty;return function(e,n){return t.call(e,n)}}(),isRegExp$1=kindOfTest("RegExp"),reduceDescriptors=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};forEach(n,function(n,o){var i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)},freezeMethods=function(e){reduceDescriptors(e,function(t,n){if(isFunction$3(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];isFunction$3(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet=function(e,t){var n={},r=function(e){e.forEach(function(e){n[e]=!0})};return isArray$3(e)?r(e):r(String(e).split(t)),n},noop$1=function(){},toFiniteNumber=function(e,t){return null!=e&&Number.isFinite(e=+e)?e:t};function isSpecCompliantForm(e){return!!(e&&isFunction$3(e.append)&&"FormData"===e[toStringTag]&&e[iterator$1])}var toJSONObject=function(e){var t=new Array(10),n=function(e,r){if(isObject$5(e)){if(t.indexOf(e)>=0)return;if(isBuffer$1(e))return e;if(!("toJSON"in e)){t[r]=e;var o=isArray$3(e)?[]:{};return forEach(e,function(e,t){var i=n(e,r+1);!isUndefined$1(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=function(e){return e&&(isObject$5(e)||isFunction$3(e))&&isFunction$3(e.then)&&isFunction$3(e.catch)},_setImmediate=(setImmediateSupported="function"==typeof setImmediate,postMessageSupported=isFunction$3(_global.postMessage),setImmediateSupported?setImmediate:postMessageSupported?(token="axios@".concat(Math.random()),callbacks=[],_global.addEventListener("message",function(e){var t=e.source,n=e.data;t===_global&&n===token&&callbacks.length&&callbacks.shift()()},!1),function(e){callbacks.push(e),_global.postMessage(token,"*")}):function(e){return setTimeout(e)}),setImmediateSupported,postMessageSupported,token,callbacks,asap="undefined"!=typeof queueMicrotask?queueMicrotask.bind(_global):"undefined"!=typeof process&&process.nextTick||_setImmediate,isIterable=function(e){return null!=e&&isFunction$3(e[iterator$1])},utils$1={isArray:isArray$3,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer$1,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString$2,isNumber:isNumber$2,isBoolean:isBoolean$1,isObject:isObject$5,isPlainObject:isPlainObject$1,isEmptyObject:isEmptyObject,isReadableStream:isReadableStream,isRequest:isRequest,isResponse:isResponse,isHeaders:isHeaders,isUndefined:isUndefined$1,isDate:isDate$1,isFile:isFile,isBlob:isBlob,isRegExp:isRegExp$1,isFunction:isFunction$3,isStream:isStream,isURLSearchParams:isURLSearchParams,isTypedArray:isTypedArray$1,isFileList:isFileList,forEach:forEach,merge:merge$1,extend:extend$3,trim:trim$3,stripBOM:stripBOM,inherits:inherits$1,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,forEachEntry:forEachEntry,matchAll:matchAll,isHTMLForm:isHTMLForm,hasOwnProperty:hasOwnProperty$1,hasOwnProp:hasOwnProperty$1,reduceDescriptors:reduceDescriptors,freezeMethods:freezeMethods,toObjectSet:toObjectSet,toCamelCase:toCamelCase$1,noop:noop$1,toFiniteNumber:toFiniteNumber,findKey:findKey,global:_global,isContextDefined:isContextDefined,isSpecCompliantForm:isSpecCompliantForm,toJSONObject:toJSONObject,isAsyncFn:isAsyncFn,isThenable:isThenable,setImmediate:_setImmediate,asap:asap,isIterable:isIterable};function AxiosError(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}utils$1.inherits(AxiosError,Error,{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:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});var prototype$1=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(function(e){descriptors[e]={value:e}}),Object.defineProperties(AxiosError,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError.from=function(e,t,n,r,o,i){var a=Object.create(prototype$1);utils$1.toFlatObject(e,a,function(e){return e!==Error.prototype},function(e){return"isAxiosError"!==e});var s=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return AxiosError.call(a,s,l,n,r,o),e&&null==a.cause&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};var httpAdapter=null;function isVisitable(e){return utils$1.isPlainObject(e)||utils$1.isArray(e)}function removeBrackets(e){return utils$1.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,n){return e?e.concat(t).map(function(e,t){return e=removeBrackets(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}function isFlatArray(e){return utils$1.isArray(e)&&!e.some(isVisitable)}var predicates=utils$1.toFlatObject(utils$1,{},null,function(e){return/^is[A-Z]/.test(e)});function toFormData(e,t,n){if(!utils$1.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var r=(n=utils$1.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!utils$1.isUndefined(t[e])})).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&utils$1.isSpecCompliantForm(t);if(!utils$1.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(utils$1.isDate(e))return e.toISOString();if(utils$1.isBoolean(e))return e.toString();if(!s&&utils$1.isBlob(e))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(e)||utils$1.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){var s=e;if(e&&!o&&"object"===_typeof2(e))if(utils$1.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(utils$1.isArray(e)&&isFlatArray(e)||(utils$1.isFileList(e)||utils$1.endsWith(n,"[]"))&&(s=utils$1.toArray(e)))return n=removeBrackets(n),s.forEach(function(e,r){!utils$1.isUndefined(e)&&null!==e&&t.append(!0===a?renderKey([n],r,i):null===a?n:n+"[]",l(e))}),!1;return!!isVisitable(e)||(t.append(renderKey(o,n,i),l(e)),!1)}var c=[],d=Object.assign(predicates,{defaultVisitor:u,convertValue:l,isVisitable:isVisitable});if(!utils$1.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!utils$1.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),utils$1.forEach(n,function(n,i){!0===(!(utils$1.isUndefined(n)||null===n)&&o.call(t,n,utils$1.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])}),c.pop()}}(e),t}function encode$1(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData(e,this,t)}var prototype=AxiosURLSearchParams.prototype;function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function buildURL(e,t,n){if(!t)return e;var r=n&&n.encode||encode;utils$1.isFunction(n)&&(n={serialize:n});var o,i=n&&n.serialize;if(o=i?i(t,n):utils$1.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,n).toString(r)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}prototype.append=function(e,t){this._pairs.push([e,t])},prototype.toString=function(e){var t=e?function(t){return e.call(this,t,encode$1)}:encode$1;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var InterceptorManager=function(){return _createClass(function e(){_classCallCheck(this,e),this.handlers=[]},[{key:"use",value:function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){utils$1.forEach(this.handlers,function(t){null!==t&&e(t)})}}])}(),transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1="undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,FormData$1="undefined"!=typeof FormData?FormData:null,Blob$1="undefined"!=typeof Blob?Blob:null,platform$2={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv="undefined"!=typeof window&&"undefined"!=typeof document,_navigator="object"===("undefined"==typeof navigator?"undefined":_typeof2(navigator))&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hasBrowserEnv,hasStandardBrowserEnv:hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv:hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin:origin},Symbol.toStringTag,{value:"Module"})),platform$1=_objectSpread(_objectSpread({},utils),platform$2);function toURLEncodedForm(e,t){return toFormData(e,new platform$1.classes.URLSearchParams,_objectSpread({visitor:function(e,t,n,r){return platform$1.isNode&&utils$1.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils$1.matchAll(/\w+|\[(\w*)]/g,e).map(function(e){return"[]"===e[0]?"":e[1]||e[0]})}function arrayToObject(e){var t,n,r={},o=Object.keys(e),i=o.length;for(t=0;t<i;t++)r[n=o[t]]=e[n];return r}function formDataToJSON(e){function t(e,n,r,o){var i=e[o++];if("__proto__"===i)return!0;var a=Number.isFinite(+i),s=o>=e.length;return i=!i&&utils$1.isArray(r)?r.length:i,s?(utils$1.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&utils$1.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&utils$1.isArray(r[i])&&(r[i]=arrayToObject(r[i])),!a)}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){var n={};return utils$1.forEachEntry(e,function(e,r){t(parsePropPath(e),r,n,0)}),n}return null}function stringifySafely(t,n,r){if(utils$1.isString(t))try{return(n||JSON.parse)(t),utils$1.trim(t)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(t)}var defaults$3={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){var n,r=t.getContentType()||"",o=r.indexOf("application/json")>-1,i=utils$1.isObject(e);if(i&&utils$1.isHTMLForm(e)&&(e=new FormData(e)),utils$1.isFormData(e))return o?JSON.stringify(formDataToJSON(e)):e;if(utils$1.isArrayBuffer(e)||utils$1.isBuffer(e)||utils$1.isStream(e)||utils$1.isFile(e)||utils$1.isBlob(e)||utils$1.isReadableStream(e))return e;if(utils$1.isArrayBufferView(e))return e.buffer;if(utils$1.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(e,this.formSerializer).toString();if((n=utils$1.isFileList(e))||r.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return toFormData(n?{"files[]":e}:e,a&&new a,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),stringifySafely(e)):e}],transformResponse:[function(t){var n=this.transitional||defaults$3.transitional,r=n&&n.forcedJSONParsing,o="json"===this.responseType;if(utils$1.isResponse(t)||utils$1.isReadableStream(t))return t;if(t&&utils$1.isString(t)&&(r&&!this.responseType||o)){var i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(e){if(i){if("SyntaxError"===e.name)throw AxiosError.from(e,AxiosError.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform$1.classes.FormData,Blob:platform$1.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],function(e){defaults$3.headers[e]={}});var ignoreDuplicateOf=utils$1.toObjectSet(["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"]),parseHeaders=function(e){var t,n,r,o={};return e&&e.split("\n").forEach(function(e){r=e.indexOf(":"),t=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!t||o[t]&&ignoreDuplicateOf[t]||("set-cookie"===t?o[t]?o[t].push(n):o[t]=[n]:o[t]=o[t]?o[t]+", "+n:n)}),o},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:utils$1.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){for(var t,n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=r.exec(e);)n[t[1]]=t[2];return n}var isValidHeaderName=function(e){return/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())};function matchHeaderValue(e,t,n,r,o){return utils$1.isFunction(r)?r.call(this,t,n):(o&&(t=n),utils$1.isString(t)?utils$1.isString(r)?-1!==t.indexOf(r):utils$1.isRegExp(r)?r.test(t):void 0:void 0)}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n})}function buildAccessors(e,t){var n=utils$1.toCamelCase(" "+t);["get","set","has"].forEach(function(r){Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}var AxiosHeaders=function(){return _createClass(function e(t){_classCallCheck(this,e),t&&this.set(t)},[{key:"set",value:function(e,t,n){var r=this;function o(e,t,n){var o=normalizeHeader(t);if(!o)throw new Error("header name must be a non-empty string");var i=utils$1.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=normalizeValue(e))}var i=function(e,t){return utils$1.forEach(e,function(e,n){return o(e,n,t)})};if(utils$1.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(utils$1.isString(e)&&(e=e.trim())&&!isValidHeaderName(e))i(parseHeaders(e),t);else if(utils$1.isObject(e)&&utils$1.isIterable(e)){var a,s,l,u={},c=_createForOfIteratorHelper(e);try{for(c.s();!(l=c.n()).done;){var d=l.value;if(!utils$1.isArray(d))throw TypeError("Object iterator must return a key-value pair");u[s=d[0]]=(a=u[s])?utils$1.isArray(a)?[].concat(_toConsumableArray(a),[d[1]]):[a,d[1]]:d[1]}}catch(p){c.e(p)}finally{c.f()}i(u,t)}else null!=e&&o(t,e,n);return this}},{key:"get",value:function(e,t){if(e=normalizeHeader(e)){var n=utils$1.findKey(this,e);if(n){var r=this[n];if(!t)return r;if(!0===t)return parseTokens(r);if(utils$1.isFunction(t))return t.call(this,r,n);if(utils$1.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=normalizeHeader(e)){var n=utils$1.findKey(this,e);return!(!n||void 0===this[n]||t&&!matchHeaderValue(this,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function o(e){if(e=normalizeHeader(e)){var o=utils$1.findKey(n,e);!o||t&&!matchHeaderValue(n,n[o],o,t)||(delete n[o],r=!0)}}return utils$1.isArray(e)?e.forEach(o):o(e),r}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,r=!1;n--;){var o=t[n];e&&!matchHeaderValue(this,this[o],o,e,!0)||(delete this[o],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return utils$1.forEach(this,function(r,o){var i=utils$1.findKey(n,o);if(i)return t[i]=normalizeValue(r),void delete t[o];var a=e?formatHeader(o):String(o).trim();a!==o&&delete t[o],t[a]=normalizeValue(r),n[a]=!0}),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=this.constructor).concat.apply(e,[this].concat(n))}},{key:"toJSON",value:function(e){var t=Object.create(null);return utils$1.forEach(this,function(n,r){null!=n&&!1!==n&&(t[r]=e&&utils$1.isArray(n)?n.join(", "):n)}),t}},{key:Symbol.iterator,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map(function(e){var t=_slicedToArray(e,2);return t[0]+": "+t[1]}).join("\n")}},{key:"getSetCookie",value:function(){return this.get("set-cookie")||[]}},{key:Symbol.toStringTag,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.forEach(function(e){return t.set(e)}),t}},{key:"accessor",value:function(e){var t=(this[$internals]=this[$internals]={accessors:{}}).accessors,n=this.prototype;function r(e){var r=normalizeHeader(e);t[r]||(buildAccessors(n,e),t[r]=!0)}return utils$1.isArray(e)?e.forEach(r):r(e),this}}])}();function transformData(e,t){var n=this||defaults$3,r=t||n,o=AxiosHeaders.from(r.headers),i=r.data;return utils$1.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function isCancel(e){return!(!e||!e.__CANCEL__)}function CanceledError(e,t,n){AxiosError.call(this,null==e?"canceled":e,AxiosError.ERR_CANCELED,t,n),this.name="CanceledError"}function settle(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new AxiosError("Request failed with status code "+n.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}function parseProtocol(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;var n,r=new Array(e),o=new Array(e),i=0,a=0;return t=void 0!==t?t:1e3,function(s){var l=Date.now(),u=o[a];n||(n=l),r[i]=s,o[i]=l;for(var c=a,d=0;c!==i;)d+=r[c++],c%=e;if((i=(i+1)%e)===a&&(a=(a+1)%e),!(l-n<t)){var p=u&&l-u;return p?Math.round(1e3*d/p):void 0}}}function throttle$3(e,t){var n,r,o=0,i=1e3/t,a=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(void 0,_toConsumableArray(t))};return[function(){for(var e=Date.now(),t=e-o,s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];t>=i?a(l,e):(n=l,r||(r=setTimeout(function(){r=null,a(n)},i-t)))},function(){return n&&a(n)}]}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils$1.reduceDescriptors(AxiosHeaders.prototype,function(e,t){var n=e.value,r=t[0].toUpperCase()+t.slice(1);return{get:function(){return n},set:function(e){this[r]=e}}}),utils$1.freezeMethods(AxiosHeaders),utils$1.inherits(CanceledError,AxiosError,{__CANCEL__:!0});var progressEventReducer=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=0,o=speedometer(50,250);return throttle$3(function(n){var i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,l=o(s);r=i;var u=_defineProperty2({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&i<=a?(a-i)/l:void 0,event:n,lengthComputable:null!=a},t?"download":"upload",!0);e(u)},n)},progressEventDecorator=function(e,t){var n=null!=e;return[function(r){return t[0]({lengthComputable:n,total:e,loaded:r})},t[1]]},asyncDecorator=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return utils$1.asap(function(){return e.apply(void 0,n)})}},isURLSameOrigin=platform$1.hasStandardBrowserEnv?function(e,t){return function(n){return n=new URL(n,platform$1.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)}}(new URL(platform$1.origin),platform$1.navigator&&/(msie|trident)/i.test(platform$1.navigator.userAgent)):function(){return!0},cookies=platform$1.hasStandardBrowserEnv?{write:function(e,t,n,r,o,i,a){if("undefined"!=typeof document){var s=["".concat(e,"=").concat(encodeURIComponent(t))];utils$1.isNumber(n)&&s.push("expires=".concat(new Date(n).toUTCString())),utils$1.isString(r)&&s.push("path=".concat(r)),utils$1.isString(o)&&s.push("domain=".concat(o)),!0===i&&s.push("secure"),utils$1.isString(a)&&s.push("SameSite=".concat(a)),document.cookie=s.join("; ")}},read:function(e){if("undefined"==typeof document)return null;var t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove:function(e){this.write(e,"",Date.now()-864e5,"/")}}:{write:function(){},read:function(){return null},remove:function(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t,n){var r=!isAbsoluteURL(t);return e&&(r||0==n)?combineURLs(e,t):t}var headersToObject=function(e){return e instanceof AxiosHeaders?_objectSpread({},e):e};function mergeConfig(e,t){t=t||{};var n={};function r(e,t,n,r){return utils$1.isPlainObject(e)&&utils$1.isPlainObject(t)?utils$1.merge.call({caseless:r},e,t):utils$1.isPlainObject(t)?utils$1.merge({},t):utils$1.isArray(t)?t.slice():t}function o(e,t,n,o){return utils$1.isUndefined(t)?utils$1.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!utils$1.isUndefined(t))return r(void 0,t)}function a(e,t){return utils$1.isUndefined(t)?utils$1.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}var l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t,n){return o(headersToObject(e),headersToObject(t),0,!0)}};return utils$1.forEach(Object.keys(_objectSpread(_objectSpread({},e),t)),function(r){var i=l[r]||o,a=i(e[r],t[r],r);utils$1.isUndefined(a)&&i!==s||(n[r]=a)}),n}var resolveConfig=function(e){var t=mergeConfig({},e),n=t.data,r=t.withXSRFToken,o=t.xsrfHeaderName,i=t.xsrfCookieName,a=t.headers,s=t.auth;if(t.headers=a=AxiosHeaders.from(a),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),utils$1.isFormData(n))if(platform$1.hasStandardBrowserEnv||platform$1.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(utils$1.isFunction(n.getHeaders)){var l=n.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(function(e){var t=_slicedToArray(e,2),n=t[0],r=t[1];u.includes(n.toLowerCase())&&a.set(n,r)})}if(platform$1.hasStandardBrowserEnv&&(r&&utils$1.isFunction(r)&&(r=r(t)),r||!1!==r&&isURLSameOrigin(t.url))){var c=o&&i&&cookies.read(i);c&&a.set(o,c)}return t},isXHRAdapterSupported="undefined"!=typeof XMLHttpRequest,xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise(function(t,n){var r,o,i,a,s,l=resolveConfig(e),u=l.data,c=AxiosHeaders.from(l.headers).normalize(),d=l.responseType,p=l.onUploadProgress,h=l.onDownloadProgress;function f(){a&&a(),s&&s(),l.cancelToken&&l.cancelToken.unsubscribe(r),l.signal&&l.signal.removeEventListener("abort",r)}var g=new XMLHttpRequest;function m(){if(g){var r=AxiosHeaders.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());settle(function(e){t(e),f()},function(e){n(e),f()},{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}}if(g.open(l.method.toUpperCase(),l.url,!0),g.timeout=l.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(n(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,g)),g=null)},g.onerror=function(t){var r=new AxiosError(t&&t.message?t.message:"Network Error",AxiosError.ERR_NETWORK,e,g);r.event=t||null,n(r),g=null},g.ontimeout=function(){var t=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded",r=l.transitional||transitionalDefaults;l.timeoutErrorMessage&&(t=l.timeoutErrorMessage),n(new AxiosError(t,r.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,g)),g=null},void 0===u&&c.setContentType(null),"setRequestHeader"in g&&utils$1.forEach(c.toJSON(),function(e,t){g.setRequestHeader(t,e)}),utils$1.isUndefined(l.withCredentials)||(g.withCredentials=!!l.withCredentials),d&&"json"!==d&&(g.responseType=l.responseType),h){var y=_slicedToArray(progressEventReducer(h,!0),2);i=y[0],s=y[1],g.addEventListener("progress",i)}if(p&&g.upload){var v=_slicedToArray(progressEventReducer(p),2);o=v[0],a=v[1],g.upload.addEventListener("progress",o),g.upload.addEventListener("loadend",a)}(l.cancelToken||l.signal)&&(r=function(t){g&&(n(!t||t.type?new CanceledError(null,e,g):t),g.abort(),g=null)},l.cancelToken&&l.cancelToken.subscribe(r),l.signal&&(l.signal.aborted?r():l.signal.addEventListener("abort",r)));var _=parseProtocol(l.url);_&&-1===platform$1.protocols.indexOf(_)?n(new AxiosError("Unsupported protocol "+_+":",AxiosError.ERR_BAD_REQUEST,e)):g.send(u||null)})},composeSignals=function(e,t){var n=(e=e?e.filter(Boolean):[]).length;if(t||n){var r,o=new AbortController,i=function(e){if(!r){r=!0,s();var t=e instanceof Error?e:this.reason;o.abort(t instanceof AxiosError?t:new CanceledError(t instanceof Error?t.message:t))}},a=t&&setTimeout(function(){a=null,i(new AxiosError("timeout ".concat(t," of ms exceeded"),AxiosError.ETIMEDOUT))},t),s=function(){e&&(a&&clearTimeout(a),a=null,e.forEach(function(e){e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(function(e){return e.addEventListener("abort",i)});var l=o.signal;return l.unsubscribe=function(){return utils$1.asap(s)},l}},streamChunk=_regenerator().m(function e(t,n){var r,o,i;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(!((r=t.byteLength)<n)){e.n=2;break}return e.n=1,t;case 1:return e.a(2);case 2:o=0;case 3:if(!(o<r)){e.n=5;break}return i=o+n,e.n=4,t.slice(o,i);case 4:o=i,e.n=3;break;case 5:return e.a(2)}},e)}),readBytes=function(){var e=_wrapAsyncGenerator(_regenerator().m(function e(t,n){var r,o,i,a,s,l,u;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:r=!1,o=!1,e.p=1,a=_asyncIterator(readStream(t));case 2:return e.n=3,_awaitAsyncGenerator(a.next());case 3:if(!(r=!(s=e.v).done)){e.n=5;break}return l=s.value,e.d(_regeneratorValues(_asyncGeneratorDelegate(_asyncIterator(streamChunk(l,n)),_awaitAsyncGenerator)),4);case 4:r=!1,e.n=2;break;case 5:e.n=7;break;case 6:e.p=6,u=e.v,o=!0,i=u;case 7:if(e.p=7,e.p=8,!r||null==a.return){e.n=9;break}return e.n=9,_awaitAsyncGenerator(a.return());case 9:if(e.p=9,!o){e.n=10;break}throw i;case 10:return e.f(9);case 11:return e.f(7);case 12:return e.a(2)}},e,null,[[8,,9,11],[1,6,7,12]])}));return function(t,n){return e.apply(this,arguments)}}(),readStream=function(){var e=_wrapAsyncGenerator(_regenerator().m(function e(t){var n,r,o,i;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!t[Symbol.asyncIterator]){e.n=2;break}return e.d(_regeneratorValues(_asyncGeneratorDelegate(_asyncIterator(t),_awaitAsyncGenerator)),1);case 1:return e.a(2);case 2:n=t.getReader(),e.p=3;case 4:return e.n=5,_awaitAsyncGenerator(n.read());case 5:if(r=e.v,o=r.done,i=r.value,!o){e.n=6;break}return e.a(3,8);case 6:return e.n=7,i;case 7:e.n=4;break;case 8:return e.p=8,e.n=9,_awaitAsyncGenerator(n.cancel());case 9:return e.f(8);case 10:return e.a(2)}},e,null,[[3,,8,10]])}));return function(t){return e.apply(this,arguments)}}(),trackStream=function(e,t,n,r){var o,i=readBytes(e,t),a=0,s=function(e){o||(o=!0,r&&r(e))};return new ReadableStream({pull:function(e){return _asyncToGenerator(_regenerator().m(function t(){var r,o,l,u,c,d;return _regenerator().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,i.next();case 1:if(r=t.v,o=r.done,l=r.value,!o){t.n=2;break}return s(),e.close(),t.a(2);case 2:u=l.byteLength,n&&(c=a+=u,n(c)),e.enqueue(new Uint8Array(l)),t.n=4;break;case 3:throw t.p=3,d=t.v,s(d),d;case 4:return t.a(2)}},t,null,[[0,3]])}))()},cancel:function(e){return s(e),i.return()}},{highWaterMark:2})},DEFAULT_CHUNK_SIZE=65536,isFunction$2=utils$1.isFunction,globalFetchAPI=(_ref15=utils$1.global,{Request:_ref15.Request,Response:_ref15.Response}),_ref15,_utils$1$global=utils$1.global,ReadableStream$1=_utils$1$global.ReadableStream,TextEncoder=_utils$1$global.TextEncoder,test$1=function(t){try{for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return!!t.apply(void 0,r)}catch(e){return!1}},factory=function(e){var t=e=utils$1.merge.call({skipUndefined:!0},globalFetchAPI,e),n=t.fetch,r=t.Request,o=t.Response,i=n?isFunction$2(n):"function"==typeof fetch,a=isFunction$2(r),s=isFunction$2(o);if(!i)return!1;var l,u=i&&isFunction$2(ReadableStream$1),c=i&&("function"==typeof TextEncoder?(l=new TextEncoder,function(e){return l.encode(e)}):function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var n,o;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return n=Uint8Array,e.n=1,new r(t).arrayBuffer();case 1:return o=e.v,e.a(2,new n(o))}},e)}));return function(t){return e.apply(this,arguments)}}()),d=a&&u&&test$1(function(){var e=!1,t=new r(platform$1.origin,{body:new ReadableStream$1,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),p=s&&u&&test$1(function(){return utils$1.isReadableStream(new o("").body)}),h={stream:p&&function(e){return e.body}};i&&["text","arrayBuffer","blob","formData","stream"].forEach(function(e){!h[e]&&(h[e]=function(t,n){var r=t&&t[e];if(r)return r.call(t);throw new AxiosError("Response type '".concat(e,"' is not supported"),AxiosError.ERR_NOT_SUPPORT,n)})});var f=function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(null!=t){e.n=1;break}return e.a(2,0);case 1:if(!utils$1.isBlob(t)){e.n=2;break}return e.a(2,t.size);case 2:if(!utils$1.isSpecCompliantForm(t)){e.n=4;break}return n=new r(platform$1.origin,{method:"POST",body:t}),e.n=3,n.arrayBuffer();case 3:case 6:return e.a(2,e.v.byteLength);case 4:if(!utils$1.isArrayBufferView(t)&&!utils$1.isArrayBuffer(t)){e.n=5;break}return e.a(2,t.byteLength);case 5:if(utils$1.isURLSearchParams(t)&&(t+=""),!utils$1.isString(t)){e.n=7;break}return e.n=6,c(t);case 7:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),g=function(){var e=_asyncToGenerator(_regenerator().m(function e(t,n){var r;return _regenerator().w(function(e){for(;;)if(0===e.n)return r=utils$1.toFiniteNumber(t.getContentLength()),e.a(2,null==r?f(n):r)},e)}));return function(t,n){return e.apply(this,arguments)}}();return function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var i,s,l,u,c,f,m,y,v,_,x,S,b,T,A,w,C,E,M,I,P,D,k,$,R,L,O,N,B,V,F,G,H,z,U,j,Y,W,q;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(i=resolveConfig(t),s=i.url,l=i.method,u=i.data,c=i.signal,f=i.cancelToken,m=i.timeout,y=i.onDownloadProgress,v=i.onUploadProgress,_=i.responseType,x=i.headers,S=i.withCredentials,b=void 0===S?"same-origin":S,T=i.fetchOptions,A=n||fetch,_=_?(_+"").toLowerCase():"text",w=composeSignals([c,f&&f.toAbortSignal()],m),C=null,E=w&&w.unsubscribe&&function(){w.unsubscribe()},e.p=1,!(Y=v&&d&&"get"!==l&&"head"!==l)){e.n=3;break}return e.n=2,g(x,u);case 2:W=M=e.v,Y=0!==W;case 3:if(!Y){e.n=4;break}I=new r(s,{method:"POST",body:u,duplex:"half"}),utils$1.isFormData(u)&&(P=I.headers.get("content-type"))&&x.setContentType(P),I.body&&(D=progressEventDecorator(M,progressEventReducer(asyncDecorator(v))),k=_slicedToArray(D,2),$=k[0],R=k[1],u=trackStream(I.body,DEFAULT_CHUNK_SIZE,$,R));case 4:return utils$1.isString(b)||(b=b?"include":"omit"),L=a&&"credentials"in r.prototype,O=_objectSpread(_objectSpread({},T),{},{signal:w,method:l.toUpperCase(),headers:x.normalize().toJSON(),body:u,duplex:"half",credentials:L?b:void 0}),C=a&&new r(s,O),e.n=5,a?A(C,T):A(s,O);case 5:return N=e.v,B=p&&("stream"===_||"response"===_),p&&(y||B&&E)&&(V={},["status","statusText","headers"].forEach(function(e){V[e]=N[e]}),F=utils$1.toFiniteNumber(N.headers.get("content-length")),G=y&&progressEventDecorator(F,progressEventReducer(asyncDecorator(y),!0))||[],H=_slicedToArray(G,2),z=H[0],U=H[1],N=new o(trackStream(N.body,DEFAULT_CHUNK_SIZE,z,function(){U&&U(),E&&E()}),V)),_=_||"text",e.n=6,h[utils$1.findKey(h,_)||"text"](N,t);case 6:return j=e.v,!B&&E&&E(),e.n=7,new Promise(function(e,n){settle(e,n,{data:j,headers:AxiosHeaders.from(N.headers),status:N.status,statusText:N.statusText,config:t,request:C})});case 7:return e.a(2,e.v);case 8:if(e.p=8,q=e.v,E&&E(),!q||"TypeError"!==q.name||!/Load failed|fetch/i.test(q.message)){e.n=9;break}throw Object.assign(new AxiosError("Network Error",AxiosError.ERR_NETWORK,t,C),{cause:q.cause||q});case 9:throw AxiosError.from(q,q&&q.code,t,C);case 10:return e.a(2)}},e,null,[[1,8]])}));return function(t){return e.apply(this,arguments)}}()},seedCache=new Map,getFetch=function(e){for(var t,n,r=e&&e.env||{},o=r.fetch,i=[r.Request,r.Response,o],a=i.length,s=seedCache;a--;)t=i[a],void 0===(n=s.get(t))&&s.set(t,n=a?new Map:factory(r)),s=n;return n};getFetch();var knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:{get:getFetch}};utils$1.forEach(knownAdapters,function(t,n){if(t){try{Object.defineProperty(t,"name",{value:n})}catch(e){}Object.defineProperty(t,"adapterName",{value:n})}});var renderReason=function(e){return"- ".concat(e)},isResolvedHandle=function(e){return utils$1.isFunction(e)||null===e||!1===e};function getAdapter(e,t){for(var n,r,o=(e=utils$1.isArray(e)?e:[e]).length,i={},a=0;a<o;a++){var s=void 0;if(r=n=e[a],!isResolvedHandle(n)&&void 0===(r=knownAdapters[(s=String(n)).toLowerCase()]))throw new AxiosError("Unknown adapter '".concat(s,"'"));if(r&&(utils$1.isFunction(r)||(r=r.get(t))))break;i[s||"#"+a]=r}if(!r){var l=Object.entries(i).map(function(e){var t=_slicedToArray(e,2),n=t[0],r=t[1];return"adapter ".concat(n," ")+(!1===r?"is not supported by the environment":"is not available in the build")});throw new AxiosError("There is no suitable adapter to dispatch the request "+(o?l.length>1?"since :\n"+l.map(renderReason).join("\n"):" "+renderReason(l[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r}var adapters={getAdapter:getAdapter,adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError(null,e)}function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=AxiosHeaders.from(e.headers),e.data=transformData.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(e.adapter||defaults$3.adapter,e)(e).then(function(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=AxiosHeaders.from(t.headers),t},function(t){return isCancel(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,e.transformResponse,t.response),t.response.headers=AxiosHeaders.from(t.response.headers))),Promise.reject(t)})}var VERSION="1.13.2",validators$1={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){validators$1[e]=function(n){return _typeof2(n)===e||"a"+(t<1?"n ":" ")+e}});var deprecatedWarnings={};function assertOptions(e,t,n){if("object"!==_typeof2(e))throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var s=e[i],l=void 0===s||a(s,i,e);if(!0!==l)throw new AxiosError("option "+i+" must be "+l,AxiosError.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new AxiosError("Unknown option "+i,AxiosError.ERR_BAD_OPTION)}}validators$1.transitional=function(e,t,n){function r(e,t){return"[Axios v"+VERSION+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,i){if(!1===e)throw new AxiosError(r(o," has been removed"+(t?" in "+t:"")),AxiosError.ERR_DEPRECATED);return t&&!deprecatedWarnings[o]&&(deprecatedWarnings[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},validators$1.spelling=function(e){return function(t,n){return console.warn("".concat(n," is likely a misspelling of ").concat(e)),!0}};var validator={assertOptions:assertOptions,validators:validators$1},validators=validator.validators,Axios=function(){return _createClass(function e(t){_classCallCheck(this,e),this.defaults=t||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}},[{key:"request",value:(t=_asyncToGenerator(_regenerator().m(function t(n,r){var o,i,a;return _regenerator().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this._request(n,r);case 1:return t.a(2,t.v);case 2:if(t.p=2,(a=t.v)instanceof Error){o={},Error.captureStackTrace?Error.captureStackTrace(o):o=new Error,i=o.stack?o.stack.replace(/^.+\n/,""):"";try{a.stack?i&&!String(a.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(a.stack+="\n"+i):a.stack=i}catch(e){}}throw a;case 3:return t.a(2)}},t,this,[[0,2]])})),function(e,n){return t.apply(this,arguments)})},{key:"_request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var n=t=mergeConfig(this.defaults,t),r=n.transitional,o=n.paramsSerializer,i=n.headers;void 0!==r&&validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),null!=o&&(utils$1.isFunction(o)?t.paramsSerializer={serialize:o}:validator.assertOptions(o,{encode:validators.function,serialize:validators.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),validator.assertOptions(t,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();var a=i&&utils$1.merge(i.common,i[t.method]);i&&utils$1.forEach(["delete","get","head","post","put","patch","common"],function(e){delete i[e]}),t.headers=AxiosHeaders.concat(a,i);var s=[],l=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(l=l&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});var u,c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});var d,p=0;if(!l){var h=[dispatchRequest.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),d=h.length,u=Promise.resolve(t);p<d;)u=u.then(h[p++],h[p++]);return u}d=s.length;for(var f=t;p<d;){var g=s[p++],m=s[p++];try{f=g(f)}catch(y){m.call(this,y);break}}try{u=dispatchRequest.call(this,f)}catch(y){return Promise.reject(y)}for(p=0,d=c.length;p<d;)u=u.then(c[p++],c[p++]);return u}},{key:"getUri",value:function(e){return buildURL(buildFullPath((e=mergeConfig(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}]);var t}();utils$1.forEach(["delete","get","head","options"],function(e){Axios.prototype[e]=function(t,n){return this.request(mergeConfig(n||{},{method:e,url:t,data:(n||{}).data}))}}),utils$1.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(mergeConfig(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Axios.prototype[e]=t(),Axios.prototype[e+"Form"]=t(!0)});var CancelToken=function(){function e(t){if(_classCallCheck(this,e),"function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(e){n=e});var r=this;this.promise.then(function(e){if(r._listeners){for(var t=r._listeners.length;t-- >0;)r._listeners[t](e);r._listeners=null}}),this.promise.then=function(e){var t,n=new Promise(function(e){r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},t(function(e,t,o){r.reason||(r.reason=new CanceledError(e,t,o),n(r.reason))})}return _createClass(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}},{key:"toAbortSignal",value:function(){var e=this,t=new AbortController,n=function(e){t.abort(e)};return this.subscribe(n),t.signal.unsubscribe=function(){return e.unsubscribe(n)},t.signal}}],[{key:"source",value:function(){var t;return{token:new e(function(e){t=e}),cancel:t}}}])}();function spread(e){return function(t){return e.apply(null,t)}}function isAxiosError(e){return utils$1.isObject(e)&&!0===e.isAxiosError}var HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};function createInstance(e){var t=new Axios(e),n=bind$3(Axios.prototype.request,t);return utils$1.extend(n,Axios.prototype,t,{allOwnKeys:!0}),utils$1.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return createInstance(mergeConfig(e,t))},n}Object.entries(HttpStatusCode).forEach(function(e){var t=_slicedToArray(e,2),n=t[0],r=t[1];HttpStatusCode[r]=n});var axios=exports("fP",createInstance(defaults$3));axios.Axios=Axios,axios.CanceledError=CanceledError,axios.CancelToken=CancelToken,axios.isCancel=isCancel,axios.VERSION=VERSION,axios.toFormData=toFormData,axios.AxiosError=AxiosError,axios.Cancel=axios.CanceledError,axios.all=function(e){return Promise.all(e)},axios.spread=spread,axios.isAxiosError=isAxiosError,axios.mergeConfig=mergeConfig,axios.AxiosHeaders=AxiosHeaders,axios.formToJSON=function(e){return formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e)},axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode,axios.default=axios;var T=function(){return!0},__={"@@functional/placeholder":!0};function _isPlaceholder(e){return null!=e&&"object"===_typeof2(e)&&!0===e["@@functional/placeholder"]}function _curry1(e){return function t(n){return 0===arguments.length||_isPlaceholder(n)?t:e.apply(this,arguments)}}function _curry2(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return _isPlaceholder(n)?t:_curry1(function(t){return e(n,t)});default:return _isPlaceholder(n)&&_isPlaceholder(r)?t:_isPlaceholder(n)?_curry1(function(t){return e(t,r)}):_isPlaceholder(r)?_curry1(function(t){return e(n,t)}):e(n,r)}}}function _concat(e,t){var n;t=t||[];var r=(e=e||[]).length,o=t.length,i=[];for(n=0;n<r;)i[i.length]=e[n],n+=1;for(n=0;n<o;)i[i.length]=t[n],n+=1;return i}function _arity(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,s,l){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,s,l,u){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,s,l,u,c){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function _curryN(e,t,n){return function(){for(var r=[],o=0,i=e,a=0,s=!1;a<t.length||o<arguments.length;){var l;a<t.length&&(!_isPlaceholder(t[a])||o>=arguments.length)?l=t[a]:(l=arguments[o],o+=1),r[a]=l,_isPlaceholder(l)?s=!0:i-=1,a+=1}return!s&&i<=0?n.apply(this,r):_arity(Math.max(0,i),_curryN(e,r,n))}}var curryN=_curry2(function(e,t){return 1===e?_curry1(t):_arity(e,_curryN(e,[],t))});function _curry3(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return _isPlaceholder(n)?t:_curry2(function(t,r){return e(n,t,r)});case 2:return _isPlaceholder(n)&&_isPlaceholder(r)?t:_isPlaceholder(n)?_curry2(function(t,n){return e(t,r,n)}):_isPlaceholder(r)?_curry2(function(t,r){return e(n,t,r)}):_curry1(function(t){return e(n,r,t)});default:return _isPlaceholder(n)&&_isPlaceholder(r)&&_isPlaceholder(o)?t:_isPlaceholder(n)&&_isPlaceholder(r)?_curry2(function(t,n){return e(t,n,o)}):_isPlaceholder(n)&&_isPlaceholder(o)?_curry2(function(t,n){return e(t,r,n)}):_isPlaceholder(r)&&_isPlaceholder(o)?_curry2(function(t,r){return e(n,t,r)}):_isPlaceholder(n)?_curry1(function(t){return e(t,r,o)}):_isPlaceholder(r)?_curry1(function(t){return e(n,t,o)}):_isPlaceholder(o)?_curry1(function(t){return e(n,r,t)}):e(n,r,o)}}}var _isArray=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function _isTransformer(e){return null!=e&&"function"==typeof e["@@transducer/step"]}function _dispatchable(e,t,n){return function(){if(0===arguments.length)return n();var r=arguments[arguments.length-1];if(!_isArray(r)){for(var o=0;o<e.length;){if("function"==typeof r[e[o]])return r[e[o]].apply(r,Array.prototype.slice.call(arguments,0,-1));o+=1}if(_isTransformer(r))return t.apply(null,Array.prototype.slice.call(arguments,0,-1))(r)}return n.apply(this,arguments)}}function _reduced(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}var _xfBase={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}};function _arrayFromIterator(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function _includesWith(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function _functionName(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}function _has(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function _objectIs(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}var _objectIs$1="function"==typeof Object.is?Object.is:_objectIs,toString$1=Object.prototype.toString,_isArguments=function(){return"[object Arguments]"===toString$1.call(arguments)?function(e){return"[object Arguments]"===toString$1.call(e)}:function(e){return _has("callee",e)}}(),hasEnumBug=!{toString:null}.propertyIsEnumerable("toString"),nonEnumerableProps=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],hasArgsEnumBug=function(){return arguments.propertyIsEnumerable("length")}(),contains=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},keys$1="function"!=typeof Object.keys||hasArgsEnumBug?_curry1(function(e){if(Object(e)!==e)return[];var t,n,r=[],o=hasArgsEnumBug&&_isArguments(e);for(t in e)!_has(t,e)||o&&"length"===t||(r[r.length]=t);if(hasEnumBug)for(n=nonEnumerableProps.length-1;n>=0;)_has(t=nonEnumerableProps[n],e)&&!contains(r,t)&&(r[r.length]=t),n-=1;return r}):_curry1(function(e){return Object(e)!==e?[]:Object.keys(e)}),type=exports("md",_curry1(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function _uniqContentEquals(e,t,n,r){var o=_arrayFromIterator(e);function i(e,t){return _equals(e,t,n.slice(),r.slice())}return!_includesWith(function(e,t){return!_includesWith(i,t,e)},_arrayFromIterator(t),o)}function _equals(e,t,n,r){if(_objectIs$1(e,t))return!0;var o=type(e);if(o!==type(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===_functionName(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(_typeof2(e)!==_typeof2(t)||!_objectIs$1(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!_objectIs$1(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var i=n.length-1;i>=0;){if(n[i]===e)return r[i]===t;i-=1}switch(o){case"Map":return e.size===t.size&&_uniqContentEquals(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&_uniqContentEquals(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var a=keys$1(e);if(a.length!==keys$1(t).length)return!1;var s=n.concat([e]),l=r.concat([t]);for(i=a.length-1;i>=0;){var u=a[i];if(!_has(u,t)||!_equals(t[u],e[u],s,l))return!1;i-=1}return!0}var equals=exports("ja",_curry2(function(e,t){return _equals(e,t,[],[])}));function _indexOf(e,t,n){var r,o;if("function"==typeof e.indexOf)switch(_typeof2(t)){case"number":if(0===t){for(r=1/t;n<e.length;){if(0===(o=e[n])&&1/o===r)return n;n+=1}return-1}if(t!=t){for(;n<e.length;){if("number"==typeof(o=e[n])&&o!=o)return n;n+=1}return-1}return e.indexOf(t,n);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,n);case"object":if(null===t)return e.indexOf(t,n)}for(;n<e.length;){if(equals(e[n],t))return n;n+=1}return-1}function _includes(e,t){return _indexOf(t,e,0)>=0}function _map(e,t){for(var n=0,r=t.length,o=Array(r);n<r;)o[n]=e(t[n]),n+=1;return o}function _quote(e){return'"'+e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var pad$1=function(e){return(e<10?"0":"")+e},_toISOString="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+pad$1(e.getUTCMonth()+1)+"-"+pad$1(e.getUTCDate())+"T"+pad$1(e.getUTCHours())+":"+pad$1(e.getUTCMinutes())+":"+pad$1(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function _complement(e){return function(){return!e.apply(this,arguments)}}function _arrayReduce(e,t,n){for(var r=0,o=n.length;r<o;)t=e(t,n[r]),r+=1;return t}function _filter(e,t){for(var n=0,r=t.length,o=[];n<r;)e(t[n])&&(o[o.length]=t[n]),n+=1;return o}function _isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}var XFilter=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=_xfBase.result,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function _xfilter(e){return function(t){return new XFilter(e,t)}}var filter$1=_curry2(_dispatchable(["fantasy-land/filter","filter"],_xfilter,function(e,t){return _isObject(t)?_arrayReduce(function(n,r){return e(t[r])&&(n[r]=t[r]),n},{},keys$1(t)):_filter(e,t)})),reject=_curry2(function(e,t){return filter$1(_complement(e),t)});function _toString(e,t){var n=function(n){var r=t.concat([e]);return _includes(n,r)?"<Circular>":_toString(n,r)},r=function(e,t){return _map(function(t){return _quote(t)+": "+n(e[t])},t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+_map(n,e).join(", ")+"))";case"[object Array]":return"["+_map(n,e).concat(r(e,reject(function(e){return/^\d+$/.test(e)},keys$1(e)))).join(", ")+"]";case"[object Boolean]":return"object"===_typeof2(e)?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):_quote(_toISOString(e)))+")";case"[object Map]":return"new Map("+n(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return"object"===_typeof2(e)?"new Number("+n(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+n(Array.from(e).sort())+")";case"[object String]":return"object"===_typeof2(e)?"new String("+n(e.valueOf())+")":_quote(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var o=e.toString();if("[object Object]"!==o)return o}return"{"+r(e,keys$1(e)).join(", ")+"}"}}var toString=_curry1(function(e){return _toString(e,[])}),max$3=_curry2(function(e,t){if(e===t)return t;function n(e,t){if(e>t!=t>e)return t>e?t:e}var r=n(e,t);if(void 0!==r)return r;var o=n(_typeof2(e),_typeof2(t));if(void 0!==o)return o===_typeof2(e)?e:t;var i=toString(e),a=n(i,toString(t));return void 0!==a&&a===i?e:t}),XMap=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=_xfBase.result,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}(),_xmap=function(e){return function(t){return new XMap(e,t)}},map$2=_curry2(_dispatchable(["fantasy-land/map","map"],_xmap,function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return curryN(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return _arrayReduce(function(n,r){return n[r]=e(t[r]),n},{},keys$1(t));default:return _map(e,t)}})),_isInteger=Number.isInteger||function(e){return(e|0)===e};function _isString(e){return"[object String]"===Object.prototype.toString.call(e)}function _nth(e,t){var n=e<0?t.length+e:e;return _isString(t)?t.charAt(n):t[n]}var prop=exports("je",_curry2(function(e,t){if(null!=t)return _isInteger(e)?_nth(e,t):t[e]})),pluck=_curry2(function(e,t){return map$2(prop(e),t)}),_isArrayLike=_curry1(function(e){return!!_isArray(e)||!!e&&("object"===_typeof2(e)&&(!_isString(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))}),symIterator="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function _createReduce(e,t,n){return function(r,o,i){if(_isArrayLike(i))return e(r,o,i);if(null==i)return o;if("function"==typeof i["fantasy-land/reduce"])return t(r,o,i,"fantasy-land/reduce");if(null!=i[symIterator])return n(r,o,i[symIterator]());if("function"==typeof i.next)return n(r,o,i);if("function"==typeof i.reduce)return t(r,o,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function _xArrayReduce(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}var bind$2=_curry2(function(e,t){return _arity(e.length,function(){return e.apply(t,arguments)})});function _xIterableReduce(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function _xMethodReduce(e,t,n,r){return e["@@transducer/result"](n[r](bind$2(e["@@transducer/step"],e),t))}var _xReduce=_createReduce(_xArrayReduce,_xMethodReduce,_xIterableReduce),XWrap=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();function _xwrap(e){return new XWrap(e)}var reduce$1=_curry3(function(e,t,n){return _xReduce("function"==typeof e?_xwrap(e):e,t,n)}),always=_curry1(function(e){return function(){return e}}),and=_curry2(function(e,t){return e&&t}),anyPass=_curry1(function(e){return curryN(reduce$1(max$3,0,pluck("length",e)),function(){for(var t=0,n=e.length;t<n;){if(e[t].apply(this,arguments))return!0;t+=1}return!1})});function _iterableReduce(e,t,n){for(var r=n.next();!r.done;)t=e(t,r.value),r=n.next();return t}function _methodReduce(e,t,n,r){return n[r](e,t)}var _reduce=_createReduce(_arrayReduce,_methodReduce,_iterableReduce),ap=_curry2(function(e,t){return"function"==typeof t["fantasy-land/ap"]?t["fantasy-land/ap"](e):"function"==typeof e.ap?e.ap(t):"function"==typeof e?function(n){return e(n)(t(n))}:_reduce(function(e,n){return _concat(e,map$2(n,t))},[],e)}),ascend=exports("jd",_curry3(function(e,t,n){var r=e(t),o=e(n);return r<o?-1:r>o?1:0})),curry$2=_curry1(function(e){return curryN(e.length,e)}),isNil=exports("fj",_curry1(function(e){return null==e}));function _isFunction(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}var liftN=_curry2(function(e,t){var n=curryN(e,t);return curryN(e,function(){return _arrayReduce(ap,map$2(n,arguments[0]),Array.prototype.slice.call(arguments,1))})}),lift$1=_curry1(function(e){return liftN(e.length,e)}),both=_curry2(function(e,t){return _isFunction(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:lift$1(and)(e,t)});function _cloneRegExp(e){return new RegExp(e.source,e.flags?e.flags:(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":"")+(e.dotAll?"s":""))}var not=_curry1(function(e){return!e}),complement=lift$1(not);function _pipe(e,t){return function(){return t.call(this,e.apply(this,arguments))}}function _checkForMethod(e,t){return function(){var n=arguments.length;if(0===n)return t();var r=arguments[n-1];return _isArray(r)||"function"!=typeof r[e]?t.apply(this,arguments):r[e].apply(r,Array.prototype.slice.call(arguments,0,n-1))}}var slice$1=exports("P",_curry3(_checkForMethod("slice",function(e,t,n){return Array.prototype.slice.call(n,e,t)}))),tail=_curry1(_checkForMethod("tail",slice$1(1,1/0)));function pipe(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return _arity(arguments[0].length,reduce$1(_pipe,arguments[0],tail(arguments)))}var reverse$1=_curry1(function(e){return _isString(e)?e.split("").reverse().join(""):Array.prototype.slice.call(e,0).reverse()});function compose(){if(0===arguments.length)throw new Error("compose requires at least one argument");return pipe.apply(this,reverse$1(arguments))}var head=_curry1(function(e){return _nth(0,e)});function _identity(e){return e}var identity$1=_curry1(_identity),concat=_curry2(function(e,t){if(_isArray(e)){if(_isArray(t))return e.concat(t);throw new TypeError(toString(t)+" is not an array")}if(_isString(e)){if(_isString(t))return e+t;throw new TypeError(toString(t)+" is not a string")}if(null!=e&&_isFunction(e["fantasy-land/concat"]))return e["fantasy-land/concat"](t);if(null!=e&&_isFunction(e.concat))return e.concat(t);throw new TypeError(toString(e)+' does not have a method named "concat" or "fantasy-land/concat"')}),cond=exports("j9",_curry1(function(e){return _arity(reduce$1(max$3,0,map$2(function(e){return e[0].length},e)),function(){for(var t=0;t<e.length;){if(e[t][0].apply(this,arguments))return e[t][1].apply(this,arguments);t+=1}})})),descend=exports("jf",_curry3(function(e,t,n){var r=e(t),o=e(n);return r>o?-1:r<o?1:0}));function _isTypedArray(e){var t=Object.prototype.toString.call(e);return"[object Uint8ClampedArray]"===t||"[object Int8Array]"===t||"[object Uint8Array]"===t||"[object Int16Array]"===t||"[object Uint16Array]"===t||"[object Int32Array]"===t||"[object Uint32Array]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object BigInt64Array]"===t||"[object BigUint64Array]"===t}var empty=_curry1(function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():_isArray(e)?[]:_isString(e)?"":_isObject(e)?{}:_isArguments(e)?function(){return arguments}():_isTypedArray(e)?e.constructor.from(""):void 0}),XFindIndex=function(){function e(e,t){this.xf=t,this.f=e,this.idx=-1,this.found=!1}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=function(e){return this.found||(e=this.xf["@@transducer/step"](e,-1)),this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){return this.idx+=1,this.f(t)&&(this.found=!0,e=_reduced(this.xf["@@transducer/step"](e,this.idx))),e},e}();function _xfindIndex(e){return function(t){return new XFindIndex(e,t)}}var findIndex=_curry2(_dispatchable([],_xfindIndex,function(e,t){for(var n=0,r=t.length;n<r;){if(e(t[n]))return n;n+=1}return-1})),forEachObjIndexed=_curry2(function(e,t){for(var n=keys$1(t),r=0;r<n.length;){var o=n[r];e(t[o],o,t),r+=1}return t}),fromPairs=_curry1(function(e){for(var t={},n=0;n<e.length;)t[e[n][0]]=e[n][1],n+=1;return t}),hasPath=_curry2(function(e,t){if(0===e.length||isNil(t))return!1;for(var n=t,r=0;r<e.length;){if(isNil(n)||!_has(e[r],n))return!1;n=n[e[r]],r+=1}return!0}),has$2=exports("hO",_curry2(function(e,t){return hasPath([e],t)})),ifElse=_curry3(function(e,t,n){return curryN(Math.max(e.length,t.length,n.length),function(){return e.apply(this,arguments)?t.apply(this,arguments):n.apply(this,arguments)})}),invoker=_curry2(function(e,t){return curryN(e+1,function(){var n=arguments[e];if(null!=n&&_isFunction(n[t]))return n[t].apply(n,Array.prototype.slice.call(arguments,0,e));throw new TypeError(toString(n)+' does not have a method named "'+t+'"')})}),is=_curry2(function(e,t){return t instanceof e||null!=t&&(t.constructor===e||"Object"===e.name&&"object"===_typeof2(t))}),isEmpty$1=_curry1(function(e){return null!=e&&equals(e,empty(e))}),isNotNil=_curry1(function(e){return!isNil(e)}),join=invoker(1,"join");function _isNumber(e){return"[object Number]"===Object.prototype.toString.call(e)}var length$1=_curry1(function(e){return null!=e&&_isNumber(e.length)?e.length:NaN}),nth=_curry2(_nth),times=_curry2(function(e,t){var n=Number(t);if(n<0||isNaN(n))throw new RangeError("n must be a non-negative number");for(var r=0,o=Array(n);r<n;)o[r]=e(r),r+=1;return o}),repeat=_curry2(function(e,t){return times(always(e),t)}),replace=_curry3(function(e,t,n){return n.replace(e,t)}),sort$3=exports("jc",_curry2(function(e,t){return Array.prototype.slice.call(t,0).sort(e)})),split$1=invoker(1,"split"),splitEvery=exports("l_",_curry2(function(e,t){if(e<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var n=[],r=0;r<t.length;)n.push(slice$1(r,r+=e,t));return n}));function _isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var test=_curry2(function(e,t){if(!_isRegExp(e))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+toString(e));return _cloneRegExp(e).test(t)}),toLower=invoker(0,"toLowerCase"),toPairs=_curry1(function(e){var t=[];for(var n in e)_has(n,e)&&(t[t.length]=[n,e[n]]);return t}),ws="\t\n\v\f\r                 \u2028\u2029\ufeff",zeroWidth="​",hasProtoTrim="function"==typeof String.prototype.trim,trim$2=_curry1(hasProtoTrim&&!ws.trim()&&zeroWidth.trim()?function(e){return e.trim()}:function(e){var t=new RegExp("^["+ws+"]["+ws+"]*"),n=new RegExp("["+ws+"]["+ws+"]*$");return e.replace(t,"").replace(n,"")}),zip=_curry2(function(e,t){for(var n=Math.min(e.length,t.length),r=Array(n),o=0;o<n;)r[o]=[e[o],t[o]],o+=1;return r}),zipWith=_curry3(function(e,t,n){for(var r=Math.min(t.length,n.length),o=Array(r),i=0;i<r;)o[i]=e(t[i],n[i]),i+=1;return o}),md5$1={exports:{}},crypt={exports:{}},base64map,crypt$1;base64map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",crypt$1={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&crypt$1.rotl(e,8)|4278255360&crypt$1.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=crypt$1.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var r=e[n]<<16|e[n+1]<<8|e[n+2],o=0;o<4;o++)8*n+6*o<=8*e.length?t.push(base64map.charAt(r>>>6*(3-o)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,r=0;n<e.length;r=++n%4)0!=r&&t.push((base64map.indexOf(e.charAt(n-1))&Math.pow(2,-2*r+8)-1)<<2*r|base64map.indexOf(e.charAt(n))>>>6-2*r);return t}},crypt.exports=crypt$1;var cryptExports=crypt.exports,charenc={utf8:{stringToBytes:function(e){return charenc.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(charenc.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},charenc_1=charenc,isBuffer_1=function(e){return null!=e&&(isBuffer(e)||isSlowBuffer(e)||!!e._isBuffer)};function isBuffer(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function isSlowBuffer(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&isBuffer(e.slice(0,0))}!function(){var e=cryptExports,t=charenc_1.utf8,n=isBuffer_1,r=charenc_1.bin,o=function(i,a){i.constructor==String?i=a&&"binary"===a.encoding?r.stringToBytes(i):t.stringToBytes(i):n(i)?i=Array.prototype.slice.call(i,0):Array.isArray(i)||i.constructor===Uint8Array||(i=i.toString());for(var s=e.bytesToWords(i),l=8*i.length,u=1732584193,c=-271733879,d=-1732584194,p=271733878,h=0;h<s.length;h++)s[h]=16711935&(s[h]<<8|s[h]>>>24)|4278255360&(s[h]<<24|s[h]>>>8);s[l>>>5]|=128<<l%32,s[14+(l+64>>>9<<4)]=l;var f=o._ff,g=o._gg,m=o._hh,y=o._ii;for(h=0;h<s.length;h+=16){var v=u,_=c,x=d,S=p;u=f(u,c,d,p,s[h+0],7,-680876936),p=f(p,u,c,d,s[h+1],12,-389564586),d=f(d,p,u,c,s[h+2],17,606105819),c=f(c,d,p,u,s[h+3],22,-1044525330),u=f(u,c,d,p,s[h+4],7,-176418897),p=f(p,u,c,d,s[h+5],12,1200080426),d=f(d,p,u,c,s[h+6],17,-1473231341),c=f(c,d,p,u,s[h+7],22,-45705983),u=f(u,c,d,p,s[h+8],7,1770035416),p=f(p,u,c,d,s[h+9],12,-1958414417),d=f(d,p,u,c,s[h+10],17,-42063),c=f(c,d,p,u,s[h+11],22,-1990404162),u=f(u,c,d,p,s[h+12],7,1804603682),p=f(p,u,c,d,s[h+13],12,-40341101),d=f(d,p,u,c,s[h+14],17,-1502002290),u=g(u,c=f(c,d,p,u,s[h+15],22,1236535329),d,p,s[h+1],5,-165796510),p=g(p,u,c,d,s[h+6],9,-1069501632),d=g(d,p,u,c,s[h+11],14,643717713),c=g(c,d,p,u,s[h+0],20,-373897302),u=g(u,c,d,p,s[h+5],5,-701558691),p=g(p,u,c,d,s[h+10],9,38016083),d=g(d,p,u,c,s[h+15],14,-660478335),c=g(c,d,p,u,s[h+4],20,-405537848),u=g(u,c,d,p,s[h+9],5,568446438),p=g(p,u,c,d,s[h+14],9,-1019803690),d=g(d,p,u,c,s[h+3],14,-187363961),c=g(c,d,p,u,s[h+8],20,1163531501),u=g(u,c,d,p,s[h+13],5,-1444681467),p=g(p,u,c,d,s[h+2],9,-51403784),d=g(d,p,u,c,s[h+7],14,1735328473),u=m(u,c=g(c,d,p,u,s[h+12],20,-1926607734),d,p,s[h+5],4,-378558),p=m(p,u,c,d,s[h+8],11,-2022574463),d=m(d,p,u,c,s[h+11],16,1839030562),c=m(c,d,p,u,s[h+14],23,-35309556),u=m(u,c,d,p,s[h+1],4,-1530992060),p=m(p,u,c,d,s[h+4],11,1272893353),d=m(d,p,u,c,s[h+7],16,-155497632),c=m(c,d,p,u,s[h+10],23,-1094730640),u=m(u,c,d,p,s[h+13],4,681279174),p=m(p,u,c,d,s[h+0],11,-358537222),d=m(d,p,u,c,s[h+3],16,-722521979),c=m(c,d,p,u,s[h+6],23,76029189),u=m(u,c,d,p,s[h+9],4,-640364487),p=m(p,u,c,d,s[h+12],11,-421815835),d=m(d,p,u,c,s[h+15],16,530742520),u=y(u,c=m(c,d,p,u,s[h+2],23,-995338651),d,p,s[h+0],6,-198630844),p=y(p,u,c,d,s[h+7],10,1126891415),d=y(d,p,u,c,s[h+14],15,-1416354905),c=y(c,d,p,u,s[h+5],21,-57434055),u=y(u,c,d,p,s[h+12],6,1700485571),p=y(p,u,c,d,s[h+3],10,-1894986606),d=y(d,p,u,c,s[h+10],15,-1051523),c=y(c,d,p,u,s[h+1],21,-2054922799),u=y(u,c,d,p,s[h+8],6,1873313359),p=y(p,u,c,d,s[h+15],10,-30611744),d=y(d,p,u,c,s[h+6],15,-1560198380),c=y(c,d,p,u,s[h+13],21,1309151649),u=y(u,c,d,p,s[h+4],6,-145523070),p=y(p,u,c,d,s[h+11],10,-1120210379),d=y(d,p,u,c,s[h+2],15,718787259),c=y(c,d,p,u,s[h+9],21,-343485551),u=u+v>>>0,c=c+_>>>0,d=d+x>>>0,p=p+S>>>0}return e.endian([u,c,d,p])};o._ff=function(e,t,n,r,o,i,a){var s=e+(t&n|~t&r)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},o._gg=function(e,t,n,r,o,i,a){var s=e+(t&r|n&~r)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},o._hh=function(e,t,n,r,o,i,a){var s=e+(t^n^r)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},o._ii=function(e,t,n,r,o,i,a){var s=e+(n^(t|~r))+(o>>>0)+a;return(s<<i|s>>>32-i)+t},o._blocksize=16,o._digestsize=16,md5$1.exports=function(t,n){if(null==t)throw new Error("Illegal argument "+t);var i=e.wordsToBytes(o(t,n));return n&&n.asBytes?i:n&&n.asString?r.bytesToString(i):e.bytesToHex(i)}}();var md5Exports=md5$1.exports,md5=exports("jA",getDefaultExportFromCjs(md5Exports)),isUndefined=exports("i",isNil),isNull=isNil,isBoolean=exports("bW",is(Boolean)),isNumber$1=exports("a3",is(Number)),isObject$4=exports("J",function(e){return both(is(Object),both(complement(is(Function)),complement(is(Array))))(e)}),isFunction$1=exports("ez",is(Function)),isString$1=exports("n",is(String)),isArray$2=exports("m",function(e){return is(Array)(e)}),isEmpty=exports("H",isEmpty$1);test(/^\d+$/);var isDate=is(Date),isPromise=exports("lX",is(Promise));is(Symbol);var isVNode=function(e){return is(Object,e)&&has$2("type",e)},checkUrl=exports("jP",test(/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/)),checkPort=exports("e8",pipe(ifElse(is(Number),toString,identity$1),test(/^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/)));test(/[\u4e00-\u9fa5]/);var checkDomain=exports("Z",pipe(trim$2,test(/^([\w\u4e00-\u9fa5\-\*]{1,100}\.){1,10}([\w\u4e00-\u9fa5\-]{1,24}|[\w\u4e00-\u9fa5\-]{1,24}\.[\w\u4e00-\u9fa5\-]{1,24})$/)));pipe(trim$2,anyPass([test(/^([\w\u4e00-\u9fa5\-\*]{1,100}\.){1,10}([\w\u4e00-\u9fa5\-]{1,24}|[\w\u4e00-\u9fa5\-]{1,24}\.[\w\u4e00-\u9fa5\-]{1,24})$/),test(/^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/)]));var checkEmail=exports("lV",test(/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/)),checkPhone=exports("gj",pipe(ifElse(is(Number),toString,identity$1),test(/^1[3456789]\d{9}$/))),checkIp=exports("$",test(/^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/)),checkDomainIp=exports("d$",test(/^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$/)),checkDomainPort=exports("go",test(/^([\w\u4e00-\u9fa5\-\*]{1,100}\.){1,10}([\w\u4e00-\u9fa5\-]{1,24}|[\w\u4e00-\u9fa5\-]{1,24}\.[\w\u4e00-\u9fa5\-]{1,24})(:([1-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]))?$/)),checkDomainOrIpPort=exports("fm",function(e){if(!e)return!1;var t=e.trim();if(t.startsWith("[")){var n=t.match(/^\[([^\]]+)\](?::(\d+))?$/);if(!n)return!1;var r=n[1],o=n[2];return!(!o&&!/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/.test(r))&&!(o&&!checkPort(o))}var i=t.split(":");if(1===i.length)return checkDomain(i[0]);if(2===i.length){var a=_slicedToArray(i,2),s=a[0],l=a[1];return checkDomain(s)&&checkPort(l)}return!1});test(/^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$/);var checkIps=exports("gD",test(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(\/\d{1,2})?$/)),checkPanelUrl=exports("fh",test(/^(https?):\/\/(?:(?:[\w-]+\.)+[a-zA-Z]{2,}|(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|(?:\[(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|(?:[0-9a-fA-F]{1,4}:){1,7}:|(?:[0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|(?:[0-9a-fA-F]{1,4}:){1,5}(?::[0-9a-fA-F]{1,4}){1,2}|(?:[0-9a-fA-F]{1,4}:){1,4}(?::[0-9a-fA-F]{1,4}){1,3}|(?:[0-9a-fA-F]{1,4}:){1,3}(?::[0-9a-fA-F]{1,4}){1,4}|(?:[0-9a-fA-F]{1,4}:){1,2}(?::[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:(?::[0-9a-fA-F]{1,4}){1,6}|:(?::[0-9a-fA-F]{1,4}){1,7}|:(?::[0-9a-fA-F]{1,4}){1,6}:|(?:[0-9a-fA-F]{1,4}:){1,6}:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))\])(?::\d{1,5})?(?:\/.*)?$/)),toNumbersArray=pipe(split$1("."),map$2(parseInt)),getMaxLength=function(e,t){return Math.max(e.length,t.length)},getVersionsInfo=exports("cp",function(e,t){var n=toNumbersArray(e),r=toNumbersArray(t),o=getMaxLength(n,r),i=function(e){return concat(e,repeat(0,o-length$1(e)))};return{versionArr:n=i(n),cloudVersionArr:r=i(r),maxLength:o}}),checkVersion=exports("me",function(e,t){var n=getVersionsInfo(e,t),r=n.versionArr,o=n.cloudVersionArr,i=n.maxLength,a=zipWith(function(e,t){return e-t},r,o),s=findIndex(complement(equals(0)),a);return cond([[equals(-1),always(1)],[equals(i-1),always(2)],[T,always(-1)]])(s)}),compareVersion=exports("bV",function(e,t){var n=getVersionsInfo(e,t),r=n.versionArr,o=n.cloudVersionArr;return reduce$1(function(e,t){var n=_slicedToArray(t,2),r=n[0],o=n[1];return r>o||!(r<o)},0,zip(r,o))});replace(new RegExp("/(".concat(String(__),"+)/g")));var checkVariable=exports("a2",function(e,t,n,r,o){var i;return(i=e,Array.isArray(i)?"array":_typeof2(i))!==t||"object"===t&&0===Object.keys(e).length&&o||"array"===t&&0===e.length&&o?(r&&r(e),n):e}),validatePort=exports("fL",function(e,t,n){var r=String(t).split(","),o=/^\d+$/;return r.forEach(function(e){if(o.test(e)){var t=parseInt(e,10);if(t<1||t>65535)return n("端口输入范围不正确,请重新输入")}else if(e.includes("-")){var r=e.split("-"),i=parseInt(r[0],10),a=parseInt(r[1],10);if(i<1||a>65535||i>a)return n("端口输入范围不正确,请重新输入")}else{if(!isEmpty(e))return n("端口格式不正确,请重新输入");n("端口不可为空,请输入")}}),n()}),BI_RM="0123456789abcdefghijklmnopqrstuvwxyz";function int2char(e){return BI_RM.charAt(e)}function op_and(e,t){return e&t}function op_or(e,t){return e|t}function op_xor(e,t){return e^t}function op_andnot(e,t){return e&~t}function lbit(e){if(0==e)return-1;var t=0;return 65535&e||(e>>=16,t+=16),255&e||(e>>=8,t+=8),15&e||(e>>=4,t+=4),3&e||(e>>=2,t+=2),1&e||++t,t}function cbit(e){for(var t=0;0!=e;)e&=e-1,++t;return t}var b64map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64pad="=",decoder$1;function hex2b64(e){var t,n,r="";for(t=0;t+3<=e.length;t+=3)n=parseInt(e.substring(t,t+3),16),r+=b64map.charAt(n>>6)+b64map.charAt(63&n);for(t+1==e.length?(n=parseInt(e.substring(t,t+1),16),r+=b64map.charAt(n<<2)):t+2==e.length&&(n=parseInt(e.substring(t,t+2),16),r+=b64map.charAt(n>>2)+b64map.charAt((3&n)<<4));(3&r.length)>0;)r+=b64pad;return r}function b64tohex(e){var t,n="",r=0,o=0;for(t=0;t<e.length&&e.charAt(t)!=b64pad;++t){var i=b64map.indexOf(e.charAt(t));i<0||(0==r?(n+=int2char(i>>2),o=3&i,r=1):1==r?(n+=int2char(o<<2|i>>4),o=15&i,r=2):2==r?(n+=int2char(o),n+=int2char(i>>2),o=3&i,r=3):(n+=int2char(o<<2|i>>4),n+=int2char(15&i),r=0))}return 1==r&&(n+=int2char(o<<2)),n}var Hex={decode:function(e){var t;if(void 0===decoder$1){var n="0123456789ABCDEF",r=" \f\n\r\t \u2028\u2029";for(decoder$1={},t=0;t<16;++t)decoder$1[n.charAt(t)]=t;for(n=n.toLowerCase(),t=10;t<16;++t)decoder$1[n.charAt(t)]=t;for(t=0;t<8;++t)decoder$1[r.charAt(t)]=-1}var o=[],i=0,a=0;for(t=0;t<e.length;++t){var s=e.charAt(t);if("="==s)break;if(-1!=(s=decoder$1[s])){if(void 0===s)throw new Error("Illegal character at offset "+t);i|=s,++a>=2?(o[o.length]=i,i=0,a=0):i<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return o}},decoder,Base64={decode:function(e){var t;if(void 0===decoder){var n="= \f\n\r\t \u2028\u2029";for(decoder=Object.create(null),t=0;t<64;++t)decoder["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)]=t;for(decoder["-"]=62,decoder._=63,t=0;t<9;++t)decoder[n.charAt(t)]=-1}var r=[],o=0,i=0;for(t=0;t<e.length;++t){var a=e.charAt(t);if("="==a)break;if(-1!=(a=decoder[a])){if(void 0===a)throw new Error("Illegal character at offset "+t);o|=a,++i>=4?(r[r.length]=o>>16,r[r.length]=o>>8&255,r[r.length]=255&o,o=0,i=0):o<<=6}}switch(i){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:r[r.length]=o>>10;break;case 3:r[r.length]=o>>16,r[r.length]=o>>8&255}return r},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var t=Base64.re.exec(e);if(t)if(t[1])e=t[1];else{if(!t[2])throw new Error("RegExp out of sync");e=t[2]}return Base64.decode(e)}},max$2=1e13,Int10=function(){function e(e){this.buf=[+e||0]}return e.prototype.mulAdd=function(e,t){var n,r,o=this.buf,i=o.length;for(n=0;n<i;++n)(r=o[n]*e+t)<max$2?t=0:r-=(t=0|r/max$2)*max$2,o[n]=r;t>0&&(o[n]=t)},e.prototype.sub=function(e){var t,n,r=this.buf,o=r.length;for(t=0;t<o;++t)(n=r[t]-e)<0?(n+=max$2,e=1):e=0,r[t]=n;for(;0===r[r.length-1];)r.pop()},e.prototype.toString=function(e){if(10!=(e||10))throw new Error("only base 10 is supported");for(var t=this.buf,n=t[t.length-1].toString(),r=t.length-2;r>=0;--r)n+=(max$2+t[r]).toString().substring(1);return n},e.prototype.valueOf=function(){for(var e=this.buf,t=0,n=e.length-1;n>=0;--n)t=t*max$2+e[n];return t},e.prototype.simplify=function(){var e=this.buf;return 1==e.length?e[0]:this},e}(),ellipsis="…",reTimeS=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,reTimeL=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function stringCut(e,t){return e.length>t&&(e=e.substring(0,t)+ellipsis),e}var Stream=function(){function e(t,n){this.hexDigits="0123456789ABCDEF",t instanceof e?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=n)}return e.prototype.get=function(e){if(void 0===e&&(e=this.pos++),e>=this.enc.length)throw new Error("Requesting byte offset ".concat(e," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(e):this.enc[e]},e.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(15&e)},e.prototype.hexDump=function(e,t,n){for(var r="",o=e;o<t;++o)if(r+=this.hexByte(this.get(o)),!0!==n)switch(15&o){case 7:r+="  ";break;case 15:r+="\n";break;default:r+=" "}return r},e.prototype.isASCII=function(e,t){for(var n=e;n<t;++n){var r=this.get(n);if(r<32||r>176)return!1}return!0},e.prototype.parseStringISO=function(e,t){for(var n="",r=e;r<t;++r)n+=String.fromCharCode(this.get(r));return n},e.prototype.parseStringUTF=function(e,t){for(var n="",r=e;r<t;){var o=this.get(r++);n+=o<128?String.fromCharCode(o):o>191&&o<224?String.fromCharCode((31&o)<<6|63&this.get(r++)):String.fromCharCode((15&o)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},e.prototype.parseStringBMP=function(e,t){for(var n,r,o="",i=e;i<t;)n=this.get(i++),r=this.get(i++),o+=String.fromCharCode(n<<8|r);return o},e.prototype.parseTime=function(e,t,n){var r=this.parseStringISO(e,t),o=(n?reTimeS:reTimeL).exec(r);return o?(n&&(o[1]=+o[1],o[1]+=+o[1]<70?2e3:1900),r=o[1]+"-"+o[2]+"-"+o[3]+" "+o[4],o[5]&&(r+=":"+o[5],o[6]&&(r+=":"+o[6],o[7]&&(r+="."+o[7]))),o[8]&&(r+=" UTC","Z"!=o[8]&&(r+=o[8],o[9]&&(r+=":"+o[9]))),r):"Unrecognized time: "+r},e.prototype.parseInteger=function(e,t){for(var n,r=this.get(e),o=r>127,i=o?255:0,a="";r==i&&++e<t;)r=this.get(e);if(0===(n=t-e))return o?-1:0;if(n>4){for(a=r,n<<=3;!(128&(+a^i));)a=+a<<1,--n;a="("+n+" bit)\n"}o&&(r-=256);for(var s=new Int10(r),l=e+1;l<t;++l)s.mulAdd(256,this.get(l));return a+s.toString()},e.prototype.parseBitString=function(e,t,n){for(var r=this.get(e),o="("+((t-e-1<<3)-r)+" bit)\n",i="",a=e+1;a<t;++a){for(var s=this.get(a),l=a==t-1?r:0,u=7;u>=l;--u)i+=s>>u&1?"1":"0";if(i.length>n)return o+stringCut(i,n)}return o+i},e.prototype.parseOctetString=function(e,t,n){if(this.isASCII(e,t))return stringCut(this.parseStringISO(e,t),n);var r=t-e,o="("+r+" byte)\n";r>(n/=2)&&(t=e+n);for(var i=e;i<t;++i)o+=this.hexByte(this.get(i));return r>n&&(o+=ellipsis),o},e.prototype.parseOID=function(e,t,n){for(var r="",o=new Int10,i=0,a=e;a<t;++a){var s=this.get(a);if(o.mulAdd(128,127&s),i+=7,!(128&s)){if(""===r)if((o=o.simplify())instanceof Int10)o.sub(80),r="2."+o.toString();else{var l=o<80?o<40?0:1:2;r=l+"."+(o-40*l)}else r+="."+o.toString();if(r.length>n)return stringCut(r,n);o=new Int10,i=0}}return i>0&&(r+=".incomplete"),r},e}(),ASN1=function(){function t(e,t,n,r,o){if(!(r instanceof ASN1Tag))throw new Error("Invalid tag value.");this.stream=e,this.header=t,this.length=n,this.tag=r,this.sub=o}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},t.prototype.content=function(e){if(void 0===this.tag)return null;void 0===e&&(e=1/0);var t=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(t)?"false":"true";case 2:return this.stream.parseInteger(t,t+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+n,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);case 6:return this.stream.parseOID(t,t+n,e);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return stringCut(this.stream.parseStringUTF(t,t+n),e);case 18:case 19:case 20:case 21:case 22:case 26:return stringCut(this.stream.parseStringISO(t,t+n),e);case 30:return stringCut(this.stream.parseStringBMP(t,t+n),e);case 23:case 24:return this.stream.parseTime(t,t+n,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(e){void 0===e&&(e="");var t=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(t+=" (encapsulates)"),t+="\n",null!==this.sub){e+="  ";for(var n=0,r=this.sub.length;n<r;++n)t+=this.sub[n].toPrettyString(e)}return t},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(e){var t=e.get(),n=127&t;if(n==t)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(0===n)return null;t=0;for(var r=0;r<n;++r)t=256*t+e.get();return t},t.prototype.getHexStringValue=function(){var e=this.toHexString(),t=2*this.header,n=2*this.length;return e.substring(t,t+n)},t.decode=function(n){var r;r=n instanceof Stream?n:new Stream(n,0);var o=new Stream(r),i=new ASN1Tag(r),a=t.decodeLength(r),s=r.pos,l=s-o.pos,u=null,c=function(){var n=[];if(null!==a){for(var o=s+a;r.pos<o;)n[n.length]=t.decode(r);if(r.pos!=o)throw new Error("Content size is not correct for container starting at offset "+s)}else try{for(;;){var i=t.decode(r);if(i.tag.isEOC())break;n[n.length]=i}a=s-r.pos}catch(e){throw new Error("Exception while decoding undefined length content: "+e)}return n};if(i.tagConstructed)u=c();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=r.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");u=c();for(var d=0;d<u.length;++d)if(u[d].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(e){u=null}if(null===u){if(null===a)throw new Error("We can't skip over an invalid tag with undefined length at offset "+s);r.pos=s+Math.abs(a)}return new t(o,l,a,i,u)},t}(),ASN1Tag=function(){function e(e){var t=e.get();if(this.tagClass=t>>6,this.tagConstructed=!!(32&t),this.tagNumber=31&t,31==this.tagNumber){var n=new Int10;do{t=e.get(),n.mulAdd(128,127&t)}while(128&t);this.tagNumber=n.simplify()}}return e.prototype.isUniversal=function(){return 0===this.tagClass},e.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},e}(),dbits,canary=0xdeadbeefcafe,j_lm=15715070==(16777215&canary),lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],lplim=(1<<26)/lowprimes[lowprimes.length-1],BigInteger=function(){function e(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}return e.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,r=(1<<t)-1,o=!1,i="",a=this.t,s=this.DB-a*this.DB%t;if(a-- >0)for(s<this.DB&&(n=this[a]>>s)>0&&(o=!0,i=int2char(n));a>=0;)s<t?(n=(this[a]&(1<<s)-1)<<t-s,n|=this[--a]>>(s+=this.DB-t)):(n=this[a]>>(s-=t)&r,s<=0&&(s+=this.DB,--a)),n>0&&(o=!0),o&&(i+=int2char(n));return o?i:"0"},e.prototype.negate=function(){var t=nbi();return e.ZERO.subTo(this,t),t},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var n=nbi();return this.abs().divRemTo(t,null,n),this.s<0&&n.compareTo(e.ZERO)>0&&t.subTo(n,n),n},e.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new Classic(t):new Montgomery(t),this.exp(e,n)},e.prototype.clone=function(){var e=nbi();return this.copyTo(e),e},e.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var n,r=this.DB-e*this.DB%8,o=0;if(e-- >0)for(r<this.DB&&(n=this[e]>>r)!=(this.s&this.DM)>>r&&(t[o++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this[e]&(1<<r)-1)<<8-r,n|=this[--e]>>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),128&n&&(n|=-256),0==o&&(128&this.s)!=(128&n)&&++o,(o>0||n!=this.s)&&(t[o++]=n);return t},e.prototype.equals=function(e){return 0==this.compareTo(e)},e.prototype.min=function(e){return this.compareTo(e)<0?this:e},e.prototype.max=function(e){return this.compareTo(e)>0?this:e},e.prototype.and=function(e){var t=nbi();return this.bitwiseTo(e,op_and,t),t},e.prototype.or=function(e){var t=nbi();return this.bitwiseTo(e,op_or,t),t},e.prototype.xor=function(e){var t=nbi();return this.bitwiseTo(e,op_xor,t),t},e.prototype.andNot=function(e){var t=nbi();return this.bitwiseTo(e,op_andnot,t),t},e.prototype.not=function(){for(var e=nbi(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},e.prototype.shiftLeft=function(e){var t=nbi();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},e.prototype.shiftRight=function(e){var t=nbi();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},e.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+lbit(this[e]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=cbit(this[n]^t);return e},e.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:!!(this[t]&1<<e%this.DB)},e.prototype.setBit=function(e){return this.changeBit(e,op_or)},e.prototype.clearBit=function(e){return this.changeBit(e,op_andnot)},e.prototype.flipBit=function(e){return this.changeBit(e,op_xor)},e.prototype.add=function(e){var t=nbi();return this.addTo(e,t),t},e.prototype.subtract=function(e){var t=nbi();return this.subTo(e,t),t},e.prototype.multiply=function(e){var t=nbi();return this.multiplyTo(e,t),t},e.prototype.divide=function(e){var t=nbi();return this.divRemTo(e,t,null),t},e.prototype.remainder=function(e){var t=nbi();return this.divRemTo(e,null,t),t},e.prototype.divideAndRemainder=function(e){var t=nbi(),n=nbi();return this.divRemTo(e,t,n),[t,n]},e.prototype.modPow=function(e,t){var n,r,o=e.bitLength(),i=nbv(1);if(o<=0)return i;n=o<18?1:o<48?3:o<144?4:o<768?5:6,r=o<8?new Classic(t):t.isEven()?new Barrett(t):new Montgomery(t);var a=[],s=3,l=n-1,u=(1<<n)-1;if(a[1]=r.convert(this),n>1){var c=nbi();for(r.sqrTo(a[1],c);s<=u;)a[s]=nbi(),r.mulTo(c,a[s-2],a[s]),s+=2}var d,p,h=e.t-1,f=!0,g=nbi();for(o=nbits(e[h])-1;h>=0;){for(o>=l?d=e[h]>>o-l&u:(d=(e[h]&(1<<o+1)-1)<<l-o,h>0&&(d|=e[h-1]>>this.DB+o-l)),s=n;!(1&d);)d>>=1,--s;if((o-=s)<0&&(o+=this.DB,--h),f)a[d].copyTo(i),f=!1;else{for(;s>1;)r.sqrTo(i,g),r.sqrTo(g,i),s-=2;s>0?r.sqrTo(i,g):(p=i,i=g,g=p),r.mulTo(g,a[d],i)}for(;h>=0&&!(e[h]&1<<o);)r.sqrTo(i,g),p=i,i=g,g=p,--o<0&&(o=this.DB-1,--h)}return r.revert(i)},e.prototype.modInverse=function(t){var n=t.isEven();if(this.isEven()&&n||0==t.signum())return e.ZERO;for(var r=t.clone(),o=this.clone(),i=nbv(1),a=nbv(0),s=nbv(0),l=nbv(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),n?(i.isEven()&&a.isEven()||(i.addTo(this,i),a.subTo(t,a)),i.rShiftTo(1,i)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);for(;o.isEven();)o.rShiftTo(1,o),n?(s.isEven()&&l.isEven()||(s.addTo(this,s),l.subTo(t,l)),s.rShiftTo(1,s)):l.isEven()||l.subTo(t,l),l.rShiftTo(1,l);r.compareTo(o)>=0?(r.subTo(o,r),n&&i.subTo(s,i),a.subTo(l,a)):(o.subTo(r,o),n&&s.subTo(i,s),l.subTo(a,l))}return 0!=o.compareTo(e.ONE)?e.ZERO:l.compareTo(t)>=0?l.subtract(t):l.signum()<0?(l.addTo(t,l),l.signum()<0?l.add(t):l):l},e.prototype.pow=function(e){return this.exp(e,new NullExp)},e.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var o=t.getLowestSetBit(),i=n.getLowestSetBit();if(i<0)return t;for(o<i&&(i=o),i>0&&(t.rShiftTo(i,t),n.rShiftTo(i,n));t.signum()>0;)(o=t.getLowestSetBit())>0&&t.rShiftTo(o,t),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return i>0&&n.lShiftTo(i,n),n},e.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=lowprimes[lowprimes.length-1]){for(t=0;t<lowprimes.length;++t)if(n[0]==lowprimes[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<lowprimes.length;){for(var r=lowprimes[t],o=t+1;o<lowprimes.length&&r<lplim;)r*=lowprimes[o++];for(r=n.modInt(r);t<o;)if(r%lowprimes[t++]==0)return!1}return n.millerRabin(e)},e.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},e.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},e.prototype.fromString=function(t,n){var r;if(16==n)r=4;else if(8==n)r=3;else if(256==n)r=8;else if(2==n)r=1;else if(32==n)r=5;else{if(4!=n)return void this.fromRadix(t,n);r=2}this.t=0,this.s=0;for(var o=t.length,i=!1,a=0;--o>=0;){var s=8==r?255&+t[o]:intAt(t,o);s<0?"-"==t.charAt(o)&&(i=!0):(i=!1,0==a?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,(a+=r)>=this.DB&&(a-=this.DB))}8==r&&128&+t[0]&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),i&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},e.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},e.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},e.prototype.lShiftTo=function(e,t){for(var n=e%this.DB,r=this.DB-n,o=(1<<r)-1,i=Math.floor(e/this.DB),a=this.s<<n&this.DM,s=this.t-1;s>=0;--s)t[s+i+1]=this[s]>>r|a,a=(this[s]&o)<<n;for(s=i-1;s>=0;--s)t[s]=0;t[i]=a,t.t=this.t+i+1,t.s=this.s,t.clamp()},e.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,o=this.DB-r,i=(1<<r)-1;t[0]=this[n]>>r;for(var a=n+1;a<this.t;++a)t[a-n-1]|=(this[a]&i)<<o,t[a-n]=this[a]>>r;r>0&&(t[this.t-n-1]|=(this.s&i)<<o),t.t=this.t-n,t.clamp()}},e.prototype.subTo=function(e,t){for(var n=0,r=0,o=Math.min(e.t,this.t);n<o;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},e.prototype.multiplyTo=function(t,n){var r=this.abs(),o=t.abs(),i=r.t;for(n.t=i+o.t;--i>=0;)n[i]=0;for(i=0;i<o.t;++i)n[i+r.t]=r.am(0,o[i],n,i,0,r.t);n.s=0,n.clamp(),this.s!=t.s&&e.ZERO.subTo(n,n)},e.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},e.prototype.divRemTo=function(t,n,r){var o=t.abs();if(!(o.t<=0)){var i=this.abs();if(i.t<o.t)return null!=n&&n.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=nbi());var a=nbi(),s=this.s,l=t.s,u=this.DB-nbits(o[o.t-1]);u>0?(o.lShiftTo(u,a),i.lShiftTo(u,r)):(o.copyTo(a),i.copyTo(r));var c=a.t,d=a[c-1];if(0!=d){var p=d*(1<<this.F1)+(c>1?a[c-2]>>this.F2:0),h=this.FV/p,f=(1<<this.F1)/p,g=1<<this.F2,m=r.t,y=m-c,v=null==n?nbi():n;for(a.dlShiftTo(y,v),r.compareTo(v)>=0&&(r[r.t++]=1,r.subTo(v,r)),e.ONE.dlShiftTo(c,v),v.subTo(a,a);a.t<c;)a[a.t++]=0;for(;--y>=0;){var _=r[--m]==d?this.DM:Math.floor(r[m]*h+(r[m-1]+g)*f);if((r[m]+=a.am(0,_,r,y,0,c))<_)for(a.dlShiftTo(y,v),r.subTo(v,r);r[m]<--_;)r.subTo(v,r)}null!=n&&(r.drShiftTo(c,n),s!=l&&e.ZERO.subTo(n,n)),r.t=c,r.clamp(),u>0&&r.rShiftTo(u,r),s<0&&e.ZERO.subTo(r,r)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(!(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},e.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},e.prototype.exp=function(t,n){if(t>4294967295||t<1)return e.ONE;var r=nbi(),o=nbi(),i=n.convert(this),a=nbits(t)-1;for(i.copyTo(r);--a>=0;)if(n.sqrTo(r,o),(t&1<<a)>0)n.mulTo(o,i,r);else{var s=r;r=o,o=s}return n.revert(r)},e.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},e.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=nbv(n),o=nbi(),i=nbi(),a="";for(this.divRemTo(r,o,i);o.signum()>0;)a=(n+i.intValue()).toString(e).substring(1)+a,o.divRemTo(r,o,i);return i.intValue().toString(e)+a},e.prototype.fromRadix=function(t,n){this.fromInt(0),null==n&&(n=10);for(var r=this.chunkSize(n),o=Math.pow(n,r),i=!1,a=0,s=0,l=0;l<t.length;++l){var u=intAt(t,l);u<0?"-"==t.charAt(l)&&0==this.signum()&&(i=!0):(s=n*s+u,++a>=r&&(this.dMultiply(o),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(n,a)),this.dAddOffset(s,0)),i&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(t,n,r){if("number"==typeof n)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),op_or,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var o=[],i=7&t;o.length=1+(t>>3),n.nextBytes(o),i>0?o[0]&=(1<<i)-1:o[0]=0,this.fromString(o,256)}},e.prototype.bitwiseTo=function(e,t,n){var r,o,i=Math.min(e.t,this.t);for(r=0;r<i;++r)n[r]=t(this[r],e[r]);if(e.t<this.t){for(o=e.s&this.DM,r=i;r<this.t;++r)n[r]=t(this[r],o);n.t=this.t}else{for(o=this.s&this.DM,r=i;r<e.t;++r)n[r]=t(o,e[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},e.prototype.changeBit=function(t,n){var r=e.ONE.shiftLeft(t);return this.bitwiseTo(r,n,r),r},e.prototype.addTo=function(e,t){for(var n=0,r=0,o=Math.min(e.t,this.t);n<o;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},e.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},e.prototype.multiplyLowerTo=function(e,t,n){var r=Math.min(this.t+e.t,t);for(n.s=0,n.t=r;r>0;)n[--r]=0;for(var o=n.t-this.t;r<o;++r)n[r+this.t]=this.am(0,e[r],n,r,0,this.t);for(o=Math.min(e.t,t);r<o;++r)this.am(0,e[r],n,r,0,t-r);n.clamp()},e.prototype.multiplyUpperTo=function(e,t,n){--t;var r=n.t=this.t+e.t-t;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n[this.t+r-t]=this.am(t-r,e[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)},e.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this[r])%e;return n},e.prototype.millerRabin=function(t){var n=this.subtract(e.ONE),r=n.getLowestSetBit();if(r<=0)return!1;var o=n.shiftRight(r);(t=t+1>>1)>lowprimes.length&&(t=lowprimes.length);for(var i=nbi(),a=0;a<t;++a){i.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);var s=i.modPow(o,this);if(0!=s.compareTo(e.ONE)&&0!=s.compareTo(n)){for(var l=1;l++<r&&0!=s.compareTo(n);)if(0==(s=s.modPowInt(2,this)).compareTo(e.ONE))return!1;if(0!=s.compareTo(n))return!1}}return!0},e.prototype.square=function(){var e=nbi();return this.squareTo(e),e},e.prototype.gcda=function(e,t){var n=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(n.compareTo(r)<0){var o=n;n=r,r=o}var i=n.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)t(n);else{i<a&&(a=i),a>0&&(n.rShiftTo(a,n),r.rShiftTo(a,r));var s=function(){(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),n.compareTo(r)>=0?(n.subTo(r,n),n.rShiftTo(1,n)):(r.subTo(n,r),r.rShiftTo(1,r)),n.signum()>0?setTimeout(s,0):(a>0&&r.lShiftTo(a,r),setTimeout(function(){t(r)},0))};setTimeout(s,10)}},e.prototype.fromNumberAsync=function(t,n,r,o){if("number"==typeof n)if(t<2)this.fromInt(1);else{this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),op_or,this),this.isEven()&&this.dAddOffset(1,0);var i=this,a=function(){i.dAddOffset(2,0),i.bitLength()>t&&i.subTo(e.ONE.shiftLeft(t-1),i),i.isProbablePrime(n)?setTimeout(function(){o()},0):setTimeout(a,0)};setTimeout(a,0)}else{var s=[],l=7&t;s.length=1+(t>>3),n.nextBytes(s),l>0?s[0]&=(1<<l)-1:s[0]=0,this.fromString(s,256)}},e}(),NullExp=function(){function e(){}return e.prototype.convert=function(e){return e},e.prototype.revert=function(e){return e},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},e.prototype.sqrTo=function(e,t){e.squareTo(t)},e}(),Classic=function(){function e(e){this.m=e}return e.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),Montgomery=function(){function e(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}return e.prototype.convert=function(e){var t=nbi();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(BigInteger.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(e){var t=nbi();return e.copyTo(t),this.reduce(t),t},e.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),Barrett=function(){function e(e){this.m=e,this.r2=nbi(),this.q3=nbi(),BigInteger.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}return e.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=nbi();return e.copyTo(t),this.reduce(t),t},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}();function nbi(){return new BigInteger(null)}function parseBigInt(e,t){return new BigInteger(e,t)}var inBrowser="undefined"!=typeof navigator;inBrowser&&j_lm&&"Microsoft Internet Explorer"==navigator.appName?(BigInteger.prototype.am=function(e,t,n,r,o,i){for(var a=32767&t,s=t>>15;--i>=0;){var l=32767&this[e],u=this[e++]>>15,c=s*l+u*a;o=((l=a*l+((32767&c)<<15)+n[r]+(1073741823&o))>>>30)+(c>>>15)+s*u+(o>>>30),n[r++]=1073741823&l}return o},dbits=30):inBrowser&&j_lm&&"Netscape"!=navigator.appName?(BigInteger.prototype.am=function(e,t,n,r,o,i){for(;--i>=0;){var a=t*this[e++]+n[r]+o;o=Math.floor(a/67108864),n[r++]=67108863&a}return o},dbits=26):(BigInteger.prototype.am=function(e,t,n,r,o,i){for(var a=16383&t,s=t>>14;--i>=0;){var l=16383&this[e],u=this[e++]>>14,c=s*l+u*a;o=((l=a*l+((16383&c)<<14)+n[r]+o)>>28)+(c>>14)+s*u,n[r++]=268435455&l}return o},dbits=28),BigInteger.prototype.DB=dbits,BigInteger.prototype.DM=(1<<dbits)-1,BigInteger.prototype.DV=1<<dbits;var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP),BigInteger.prototype.F1=BI_FP-dbits,BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RC=[],rr,vv;for(rr="0".charCodeAt(0),vv=0;vv<=9;++vv)BI_RC[rr++]=vv;for(rr="a".charCodeAt(0),vv=10;vv<36;++vv)BI_RC[rr++]=vv;for(rr="A".charCodeAt(0),vv=10;vv<36;++vv)BI_RC[rr++]=vv;function intAt(e,t){var n=BI_RC[e.charCodeAt(t)];return null==n?-1:n}function nbv(e){var t=nbi();return t.fromInt(e),t}function nbits(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}BigInteger.ZERO=nbv(0),BigInteger.ONE=nbv(1);var Arcfour=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(e){var t,n,r;for(t=0;t<256;++t)this.S[t]=t;for(n=0,t=0;t<256;++t)n=n+this.S[t]+e[t%e.length]&255,r=this.S[t],this.S[t]=this.S[n],this.S[n]=r;this.i=0,this.j=0},e.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},e}();function prng_newstate(){return new Arcfour}var rng_psize=256,rng_state,rng_pool=null,rng_pptr;if(null==rng_pool){rng_pool=[],rng_pptr=0;var t=void 0;if("undefined"!=typeof window&&self.crypto&&self.crypto.getRandomValues){var z=new Uint32Array(256);for(self.crypto.getRandomValues(z),t=0;t<z.length;++t)rng_pool[rng_pptr++]=255&z[t]}var count$1=0,_onMouseMoveListener_=function(t){if((count$1=count$1||0)>=256||rng_pptr>=rng_psize)self.removeEventListener?self.removeEventListener("mousemove",_onMouseMoveListener_,!1):self.detachEvent&&self.detachEvent("onmousemove",_onMouseMoveListener_);else try{var n=t.x+t.y;rng_pool[rng_pptr++]=255&n,count$1+=1}catch(e){}};"undefined"!=typeof window&&(self.addEventListener?self.addEventListener("mousemove",_onMouseMoveListener_,!1):self.attachEvent&&self.attachEvent("onmousemove",_onMouseMoveListener_))}function rng_get_byte(){if(null==rng_state){for(rng_state=prng_newstate();rng_pptr<rng_psize;){var e=Math.floor(65536*Math.random());rng_pool[rng_pptr++]=255&e}for(rng_state.init(rng_pool),rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr)rng_pool[rng_pptr]=0;rng_pptr=0}return rng_state.next()}var SecureRandom=function(){function e(){}return e.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=rng_get_byte()},e}();function rstr_sha256(e){return binb2rstr(binb_sha256(rstr2binb(e),8*e.length))}function rstr2hex(e){for(var t="0123456789abcdef",n="",r=0;r<e.length;r++){var o=e.charCodeAt(r);n+=t.charAt(o>>>4&15)+t.charAt(15&o)}return n}function rstr2binb(e){for(var t=Array(e.length>>2),n=0;n<t.length;n++)t[n]=0;for(n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<24-n%32;return t}function binb2rstr(e){for(var t="",n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>24-n%32&255);return t}function sha256_S(e,t){return e>>>t|e<<32-t}function sha256_R(e,t){return e>>>t}function sha256_Ch(e,t,n){return e&t^~e&n}function sha256_Maj(e,t,n){return e&t^e&n^t&n}function sha256_Sigma0256(e){return sha256_S(e,2)^sha256_S(e,13)^sha256_S(e,22)}function sha256_Sigma1256(e){return sha256_S(e,6)^sha256_S(e,11)^sha256_S(e,25)}function sha256_Gamma0256(e){return sha256_S(e,7)^sha256_S(e,18)^sha256_R(e,3)}function sha256_Gamma1256(e){return sha256_S(e,17)^sha256_S(e,19)^sha256_R(e,10)}var sha256_K=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function binb_sha256(e,t){var n,r,o,i,a,s,l,u,c,d,p,h,f=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),g=new Array(64);for(e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t,c=0;c<e.length;c+=16){for(n=f[0],r=f[1],o=f[2],i=f[3],a=f[4],s=f[5],l=f[6],u=f[7],d=0;d<64;d++)g[d]=d<16?e[d+c]:safe_add(safe_add(safe_add(sha256_Gamma1256(g[d-2]),g[d-7]),sha256_Gamma0256(g[d-15])),g[d-16]),p=safe_add(safe_add(safe_add(safe_add(u,sha256_Sigma1256(a)),sha256_Ch(a,s,l)),sha256_K[d]),g[d]),h=safe_add(sha256_Sigma0256(n),sha256_Maj(n,r,o)),u=l,l=s,s=a,a=safe_add(i,p),i=o,o=r,r=n,n=safe_add(p,h);f[0]=safe_add(n,f[0]),f[1]=safe_add(r,f[1]),f[2]=safe_add(o,f[2]),f[3]=safe_add(i,f[3]),f[4]=safe_add(a,f[4]),f[5]=safe_add(s,f[5]),f[6]=safe_add(l,f[6]),f[7]=safe_add(u,f[7])}return f}function safe_add(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function pkcs1pad1(e,t){if(t<e.length+22)return console.error("Message too long for RSA"),null;for(var n=t-e.length-6,r="",o=0;o<n;o+=2)r+="ff";return parseBigInt("0001"+r+"00"+e,16)}function pkcs1pad2(e,t){if(t<e.length+11)return console.error("Message too long for RSA"),null;for(var n=[],r=e.length-1;r>=0&&t>0;){var o=e.charCodeAt(r--);o<128?n[--t]=o:o>127&&o<2048?(n[--t]=63&o|128,n[--t]=o>>6|192):(n[--t]=63&o|128,n[--t]=o>>6&63|128,n[--t]=o>>12|224)}n[--t]=0;for(var i=new SecureRandom,a=[];t>2;){for(a[0]=0;0==a[0];)i.nextBytes(a);n[--t]=a[0]}return n[--t]=2,n[--t]=0,new BigInteger(n)}function oaep_mgf1_arr(e,t,n){for(var r="",o=0;r.length<t;)r+=n(String.fromCharCode.apply(String,e.concat([(4278190080&o)>>24,(16711680&o)>>16,(65280&o)>>8,255&o]))),o+=1;return r}var SHA256_SIZE=32;function oaep_pad(e,t){var n=SHA256_SIZE,r=rstr_sha256;if(e.length+2*n+2>t)throw"Message too long for RSA";var o,i="";for(o=0;o<t-e.length-2*n-2;o+=1)i+="\0";var a=r("")+i+""+e,s=new Array(n);(new SecureRandom).nextBytes(s);var l=oaep_mgf1_arr(s,a.length,r),u=[];for(o=0;o<a.length;o+=1)u[o]=a.charCodeAt(o)^l.charCodeAt(o);var c=oaep_mgf1_arr(u,s.length,r),d=[0];for(o=0;o<s.length;o+=1)d[o+1]=s[o]^c.charCodeAt(o);return new BigInteger(d.concat(u))}var RSAKey=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),n=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(n)<0;)t=t.add(this.p);return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},e.prototype.setPublic=function(e,t){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=parseBigInt(e,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(e,t){void 0===t&&(t=pkcs1pad2);var n=this.n.bitLength()+7>>3,r=t(e,n);if(null==r)return null;var o=this.doPublic(r);if(null==o)return null;for(var i=o.toString(16),a=i.length,s=0;s<2*n-a;s++)i="0"+i;return i},e.prototype.setPrivate=function(e,t,n){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=parseBigInt(e,16),this.e=parseInt(t,16),this.d=parseBigInt(n,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(e,t,n,r,o,i,a,s){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=parseBigInt(e,16),this.e=parseInt(t,16),this.d=parseBigInt(n,16),this.p=parseBigInt(r,16),this.q=parseBigInt(o,16),this.dmp1=parseBigInt(i,16),this.dmq1=parseBigInt(a,16),this.coeff=parseBigInt(s,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(e,t){var n=new SecureRandom,r=e>>1;this.e=parseInt(t,16);for(var o=new BigInteger(t,16);;){for(;this.p=new BigInteger(e-r,1,n),0!=this.p.subtract(BigInteger.ONE).gcd(o).compareTo(BigInteger.ONE)||!this.p.isProbablePrime(10););for(;this.q=new BigInteger(r,1,n),0!=this.q.subtract(BigInteger.ONE).gcd(o).compareTo(BigInteger.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var i=this.p;this.p=this.q,this.q=i}var a=this.p.subtract(BigInteger.ONE),s=this.q.subtract(BigInteger.ONE),l=a.multiply(s);if(0==l.gcd(o).compareTo(BigInteger.ONE)){this.n=this.p.multiply(this.q),this.d=o.modInverse(l),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(e){var t=parseBigInt(e,16),n=this.doPrivate(t);return null==n?null:pkcs1unpad2(n,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(e,t,n){var r=new SecureRandom,o=e>>1;this.e=parseInt(t,16);var i=new BigInteger(t,16),a=this,s=function(){var t=function(){if(a.p.compareTo(a.q)<=0){var e=a.p;a.p=a.q,a.q=e}var t=a.p.subtract(BigInteger.ONE),r=a.q.subtract(BigInteger.ONE),o=t.multiply(r);0==o.gcd(i).compareTo(BigInteger.ONE)?(a.n=a.p.multiply(a.q),a.d=i.modInverse(o),a.dmp1=a.d.mod(t),a.dmq1=a.d.mod(r),a.coeff=a.q.modInverse(a.p),setTimeout(function(){n()},0)):setTimeout(s,0)},l=function(){a.q=nbi(),a.q.fromNumberAsync(o,1,r,function(){a.q.subtract(BigInteger.ONE).gcda(i,function(e){0==e.compareTo(BigInteger.ONE)&&a.q.isProbablePrime(10)?setTimeout(t,0):setTimeout(l,0)})})},u=function(){a.p=nbi(),a.p.fromNumberAsync(e-o,1,r,function(){a.p.subtract(BigInteger.ONE).gcda(i,function(e){0==e.compareTo(BigInteger.ONE)&&a.p.isProbablePrime(10)?setTimeout(l,0):setTimeout(u,0)})})};setTimeout(u,0)};setTimeout(s,0)},e.prototype.sign=function(e,t,n){var r=getDigestHeader(n)+t(e).toString(),o=this.n.bitLength()/4,i=pkcs1pad1(r,o);if(null==i)return null;var a=this.doPrivate(i);if(null==a)return null;for(var s=a.toString(16),l=s.length,u=0;u<o-l;u++)s="0"+s;return s},e.prototype.verify=function(e,t,n){var r=parseBigInt(t,16),o=this.doPublic(r);return null==o?null:removeDigestHeader(o.toString(16).replace(/^1f+00/,""))==n(e).toString()},e}();function pkcs1unpad2(e,t){for(var n=e.toByteArray(),r=0;r<n.length&&0==n[r];)++r;if(n.length-r!=t-1||2!=n[r])return null;for(++r;0!=n[r];)if(++r>=n.length)return null;for(var o="";++r<n.length;){var i=255&n[r];i<128?o+=String.fromCharCode(i):i>191&&i<224?(o+=String.fromCharCode((31&i)<<6|63&n[r+1]),++r):(o+=String.fromCharCode((15&i)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return o}var DIGEST_HEADERS={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function getDigestHeader(e){return DIGEST_HEADERS[e]||""}function removeDigestHeader(e){for(var t in DIGEST_HEADERS)if(DIGEST_HEADERS.hasOwnProperty(t)){var n=DIGEST_HEADERS[t],r=n.length;if(e.substring(0,r)==n)return e.substring(r)}return e}function extendClass(e,t,n){if(!t||!e)throw new Error("extend failed, please check that all dependencies are included.");var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t)}
/**
             * @fileOverview
             * @name asn1-1.0.js
             * @author Kenji Urushima kenji.urushima@gmail.com
             * @version asn1 1.0.13 (2017-Jun-02)
             * @since jsrsasign 2.1
             * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
             */var KJUR={};void 0!==KJUR.asn1&&KJUR.asn1||(KJUR.asn1={}),KJUR.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if("-"!=t.substring(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var n=t.substring(1).length;n%2==1?n+=1:t.match(/^[0-7]/)||(n+=2);for(var r="",o=0;o<n;o++)r+="f";t=new BigInteger(r,16).xor(e).add(BigInteger.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return hextopem(e,t)},this.newObject=function(e){var t=KJUR.asn1,n=t.DERBoolean,r=t.DERInteger,o=t.DERBitString,i=t.DEROctetString,a=t.DERNull,s=t.DERObjectIdentifier,l=t.DEREnumerated,u=t.DERUTF8String,c=t.DERNumericString,d=t.DERPrintableString,p=t.DERTeletexString,h=t.DERIA5String,f=t.DERUTCTime,g=t.DERGeneralizedTime,m=t.DERSequence,y=t.DERSet,v=t.DERTaggedObject,_=t.ASN1Util.newObject,x=Object.keys(e);if(1!=x.length)throw"key of param shall be only one.";var S=x[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+S+":"))throw"undefined key: "+S;if("bool"==S)return new n(e[S]);if("int"==S)return new r(e[S]);if("bitstr"==S)return new o(e[S]);if("octstr"==S)return new i(e[S]);if("null"==S)return new a(e[S]);if("oid"==S)return new s(e[S]);if("enum"==S)return new l(e[S]);if("utf8str"==S)return new u(e[S]);if("numstr"==S)return new c(e[S]);if("prnstr"==S)return new d(e[S]);if("telstr"==S)return new p(e[S]);if("ia5str"==S)return new h(e[S]);if("utctime"==S)return new f(e[S]);if("gentime"==S)return new g(e[S]);if("seq"==S){for(var b=e[S],T=[],A=0;A<b.length;A++){var w=_(b[A]);T.push(w)}return new m({array:T})}if("set"==S){for(b=e[S],T=[],A=0;A<b.length;A++){w=_(b[A]);T.push(w)}return new y({array:T})}if("tag"==S){var C=e[S];if("[object Array]"===Object.prototype.toString.call(C)&&3==C.length){var E=_(C[2]);return new v({tag:C[0],explicit:C[1],obj:E})}var M={};if(void 0!==C.explicit&&(M.explicit=C.explicit),void 0!==C.tag&&(M.tag=C.tag),void 0===C.obj)throw"obj shall be specified for 'tag'.";return M.obj=_(C.obj),new v(M)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},KJUR.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",n=parseInt(e.substring(0,2),16),r=(t=Math.floor(n/40)+"."+n%40,""),o=2;o<e.length;o+=2){var i=("00000000"+parseInt(e.substring(o,o+2),16).toString(2)).slice(-8);if(r+=i.substring(1,8),"0"==i.substring(0,1))t=t+"."+new BigInteger(r,2).toString(10),r=""}return t},KJUR.asn1.ASN1Util.oidIntToHex=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",r=new BigInteger(e,10).toString(2),o=7-r.length%7;7==o&&(o=0);for(var i="",a=0;a<o;a++)i+="0";r=i+r;for(a=0;a<r.length-1;a+=7){var s=r.substring(a,a+7);a!=r.length-7&&(s="1"+s),n+=t(parseInt(s,2))}return n};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var r="",o=e.split("."),i=40*parseInt(o[0])+parseInt(o[1]);r+=t(i),o.splice(0,2);for(var a=0;a<o.length;a++)r+=n(o[a]);return r},KJUR.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n=0,v="+this.hV;var e=this.hV.length/2,t=e.toString(16);if(t.length%2==1&&(t="0"+t),e<128)return t;var n=t.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);return(128+n).toString(16)+t},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},KJUR.asn1.DERAbstractString=function(e){KJUR.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(this.s)},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?this.setString(e):void 0!==e.str?this.setString(e.str):void 0!==e.hex&&this.setStringHex(e.hex))},extendClass(KJUR.asn1.DERAbstractString,KJUR.asn1.ASN1Object),KJUR.asn1.DERAbstractTime=function(e){KJUR.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){return utc=e.getTime()+6e4*e.getTimezoneOffset(),new Date(utc)},this.formatDate=function(e,t,n){var r=this.zeroPadding,o=this.localDateToUTC(e),i=String(o.getFullYear());"utc"==t&&(i=i.substring(2,4));var a=i+r(String(o.getMonth()+1),2)+r(String(o.getDate()),2)+r(String(o.getHours()),2)+r(String(o.getMinutes()),2)+r(String(o.getSeconds()),2);if(!0===n){var s=o.getMilliseconds();if(0!=s){var l=r(String(s),3);a=a+"."+(l=l.replace(/[0]+$/,""))}}return a+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(e)},this.setByDateValue=function(e,t,n,r,o,i){var a=new Date(Date.UTC(e,t-1,n,r,o,i,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},extendClass(KJUR.asn1.DERAbstractTime,KJUR.asn1.ASN1Object),KJUR.asn1.DERAbstractStructured=function(e){KJUR.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,void 0!==e&&void 0!==e.array&&(this.asn1Array=e.array)},extendClass(KJUR.asn1.DERAbstractStructured,KJUR.asn1.ASN1Object),KJUR.asn1.DERBoolean=function(){KJUR.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},extendClass(KJUR.asn1.DERBoolean,KJUR.asn1.ASN1Object),KJUR.asn1.DERInteger=function(e){KJUR.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new BigInteger(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.bigint?this.setByBigInteger(e.bigint):void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},extendClass(KJUR.asn1.DERInteger,KJUR.asn1.ASN1Object),KJUR.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=KJUR.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}KJUR.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7<e)throw"unused bits shall be from 0 to 7: u = "+e;var n="0"+e;this.hTLV=null,this.isModified=!0,this.hV=n+t},this.setByBinaryString=function(e){var t=8-(e=e.replace(/0+$/,"")).length%8;8==t&&(t=0);for(var n=0;n<=t;n++)e+="0";var r="";for(n=0;n<e.length-1;n+=8){var o=e.substring(n,n+8),i=parseInt(o,2).toString(16);1==i.length&&(i="0"+i),r+=i}this.hTLV=null,this.isModified=!0,this.hV="0"+t+r},this.setByBooleanArray=function(e){for(var t="",n=0;n<e.length;n++)1==e[n]?t+="1":t+="0";this.setByBinaryString(t)},this.newFalseArray=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=!1;return t},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):void 0!==e.hex?this.setHexValueIncludingUnusedBits(e.hex):void 0!==e.bin?this.setByBinaryString(e.bin):void 0!==e.array&&this.setByBooleanArray(e.array))},extendClass(KJUR.asn1.DERBitString,KJUR.asn1.ASN1Object),KJUR.asn1.DEROctetString=function(e){if(void 0!==e&&void 0!==e.obj){var t=KJUR.asn1.ASN1Util.newObject(e.obj);e.hex=t.getEncodedHex()}KJUR.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},extendClass(KJUR.asn1.DEROctetString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERNull=function(){KJUR.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},extendClass(KJUR.asn1.DERNull,KJUR.asn1.ASN1Object),KJUR.asn1.DERObjectIdentifier=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",r=new BigInteger(e,10).toString(2),o=7-r.length%7;7==o&&(o=0);for(var i="",a=0;a<o;a++)i+="0";r=i+r;for(a=0;a<r.length-1;a+=7){var s=r.substring(a,a+7);a!=r.length-7&&(s="1"+s),n+=t(parseInt(s,2))}return n};KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueOidString=function(e){if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var r="",o=e.split("."),i=40*parseInt(o[0])+parseInt(o[1]);r+=t(i),o.splice(0,2);for(var a=0;a<o.length;a++)r+=n(o[a]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueName=function(e){var t=KJUR.asn1.x509.OID.name2oid(e);if(""===t)throw"DERObjectIdentifier oidName undefined: "+e;this.setValueOidString(t)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e):void 0!==e.oid?this.setValueOidString(e.oid):void 0!==e.hex?this.setValueHex(e.hex):void 0!==e.name&&this.setValueName(e.name))},extendClass(KJUR.asn1.DERObjectIdentifier,KJUR.asn1.ASN1Object),KJUR.asn1.DEREnumerated=function(e){KJUR.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new BigInteger(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},extendClass(KJUR.asn1.DEREnumerated,KJUR.asn1.ASN1Object),KJUR.asn1.DERUTF8String=function(e){KJUR.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},extendClass(KJUR.asn1.DERUTF8String,KJUR.asn1.DERAbstractString),KJUR.asn1.DERNumericString=function(e){KJUR.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},extendClass(KJUR.asn1.DERNumericString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERPrintableString=function(e){KJUR.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},extendClass(KJUR.asn1.DERPrintableString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERTeletexString=function(e){KJUR.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},extendClass(KJUR.asn1.DERTeletexString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERIA5String=function(e){KJUR.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},extendClass(KJUR.asn1.DERIA5String,KJUR.asn1.DERAbstractString),KJUR.asn1.DERUTCTime=function(e){KJUR.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{12}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date))},extendClass(KJUR.asn1.DERUTCTime,KJUR.asn1.DERAbstractTime),KJUR.asn1.DERGeneralizedTime=function(e){KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{14}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date),!0===e.millis&&(this.withMillis=!0))},extendClass(KJUR.asn1.DERGeneralizedTime,KJUR.asn1.DERAbstractTime),KJUR.asn1.DERSequence=function(e){KJUR.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var e="",t=0;t<this.asn1Array.length;t++){e+=this.asn1Array[t].getEncodedHex()}return this.hV=e,this.hV}},extendClass(KJUR.asn1.DERSequence,KJUR.asn1.DERAbstractStructured),KJUR.asn1.DERSet=function(e){KJUR.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var e=new Array,t=0;t<this.asn1Array.length;t++){var n=this.asn1Array[t];e.push(n.getEncodedHex())}return 1==this.sortFlag&&e.sort(),this.hV=e.join(""),this.hV},void 0!==e&&void 0!==e.sortflag&&0==e.sortflag&&(this.sortFlag=!1)},extendClass(KJUR.asn1.DERSet,KJUR.asn1.DERAbstractStructured),KJUR.asn1.DERTaggedObject=function(e){KJUR.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,t,n){this.hT=t,this.isExplicit=e,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.tag&&(this.hT=e.tag),void 0!==e.explicit&&(this.isExplicit=e.explicit),void 0!==e.obj&&(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},extendClass(KJUR.asn1.DERTaggedObject,KJUR.asn1.ASN1Object);var __extends$1=(_extendStatics=function(e,t){return _extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},_extendStatics(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}_extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),_extendStatics,JSEncryptRSAKey=function(e){function t(n){var r=e.call(this)||this;return n&&("string"==typeof n?r.parseKey(n):(t.hasPrivateKeyProperty(n)||t.hasPublicKeyProperty(n))&&r.parsePropertiesFrom(n)),r}return __extends$1(t,e),t.prototype.parseKey=function(e){try{var t=0,n=0,r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e)?Hex.decode(e):Base64.unarmor(e),o=ASN1.decode(r);if(3===o.sub.length&&(o=o.sub[2].sub[0]),9===o.sub.length){t=o.sub[1].getHexStringValue(),this.n=parseBigInt(t,16),n=o.sub[2].getHexStringValue(),this.e=parseInt(n,16);var i=o.sub[3].getHexStringValue();this.d=parseBigInt(i,16);var a=o.sub[4].getHexStringValue();this.p=parseBigInt(a,16);var s=o.sub[5].getHexStringValue();this.q=parseBigInt(s,16);var l=o.sub[6].getHexStringValue();this.dmp1=parseBigInt(l,16);var u=o.sub[7].getHexStringValue();this.dmq1=parseBigInt(u,16);var c=o.sub[8].getHexStringValue();this.coeff=parseBigInt(c,16)}else{if(2!==o.sub.length)return!1;if(o.sub[0].sub){var d=o.sub[1].sub[0];t=d.sub[0].getHexStringValue(),this.n=parseBigInt(t,16),n=d.sub[1].getHexStringValue(),this.e=parseInt(n,16)}else t=o.sub[0].getHexStringValue(),this.n=parseBigInt(t,16),n=o.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(p){return!1}},t.prototype.getPrivateBaseKey=function(){var e={array:[new KJUR.asn1.DERInteger({int:0}),new KJUR.asn1.DERInteger({bigint:this.n}),new KJUR.asn1.DERInteger({int:this.e}),new KJUR.asn1.DERInteger({bigint:this.d}),new KJUR.asn1.DERInteger({bigint:this.p}),new KJUR.asn1.DERInteger({bigint:this.q}),new KJUR.asn1.DERInteger({bigint:this.dmp1}),new KJUR.asn1.DERInteger({bigint:this.dmq1}),new KJUR.asn1.DERInteger({bigint:this.coeff})]};return new KJUR.asn1.DERSequence(e).getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return hex2b64(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var e=new KJUR.asn1.DERSequence({array:[new KJUR.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new KJUR.asn1.DERNull]}),t=new KJUR.asn1.DERSequence({array:[new KJUR.asn1.DERInteger({bigint:this.n}),new KJUR.asn1.DERInteger({int:this.e})]}),n=new KJUR.asn1.DERBitString({hex:"00"+t.getEncodedHex()});return new KJUR.asn1.DERSequence({array:[e,n]}).getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return hex2b64(this.getPublicBaseKey())},t.wordwrap=function(e,t){if(!e)return e;var n="(.{1,"+(t=t||64)+"})( +|$\n?)|(.{1,"+t+"})";return e.match(RegExp(n,"g")).join("\n")},t.prototype.getPrivateKey=function(){var e="-----BEGIN RSA PRIVATE KEY-----\n";return e+=t.wordwrap(this.getPrivateBaseKeyB64())+"\n",e+="-----END RSA PRIVATE KEY-----"},t.prototype.getPublicKey=function(){var e="-----BEGIN PUBLIC KEY-----\n";return e+=t.wordwrap(this.getPublicBaseKeyB64())+"\n",e+="-----END PUBLIC KEY-----"},t.hasPublicKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")},t.hasPrivateKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")&&e.hasOwnProperty("d")&&e.hasOwnProperty("p")&&e.hasOwnProperty("q")&&e.hasOwnProperty("dmp1")&&e.hasOwnProperty("dmq1")&&e.hasOwnProperty("coeff")},t.prototype.parsePropertiesFrom=function(e){this.n=e.n,this.e=e.e,e.hasOwnProperty("d")&&(this.d=e.d,this.p=e.p,this.q=e.q,this.dmp1=e.dmp1,this.dmq1=e.dmq1,this.coeff=e.coeff)},t}(RSAKey),define_process_env_default={},_a$1,version$4="undefined"!=typeof process?null===(_a$1=define_process_env_default)||void 0===_a$1?void 0:_a$1.npm_package_version:void 0,JSEncrypt=function(){function e(e){void 0===e&&(e={}),this.default_key_size=e.default_key_size?parseInt(e.default_key_size,10):1024,this.default_public_exponent=e.default_public_exponent||"010001",this.log=e.log||!1,this.key=e.key||null}return e.prototype.setKey=function(e){e?(this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new JSEncryptRSAKey(e)):!this.key&&this.log&&console.error("A key was not set.")},e.prototype.setPrivateKey=function(e){this.setKey(e)},e.prototype.setPublicKey=function(e){this.setKey(e)},e.prototype.decrypt=function(e){try{return this.getKey().decrypt(b64tohex(e))}catch(t){return!1}},e.prototype.encrypt=function(e){try{return hex2b64(this.getKey().encrypt(e))}catch(t){return!1}},e.prototype.encryptOAEP=function(e){try{return hex2b64(this.getKey().encrypt(e,oaep_pad))}catch(t){return!1}},e.prototype.sign=function(e,t,n){void 0===t&&(t=function(e){return e}),void 0===n&&(n="");try{return hex2b64(this.getKey().sign(e,t,n))}catch(r){return!1}},e.prototype.signSha256=function(e){return this.sign(e,function(e){return rstr2hex(rstr_sha256(e))},"sha256")},e.prototype.verify=function(e,t,n){void 0===n&&(n=function(e){return e});try{return this.getKey().verify(e,b64tohex(t),n)}catch(r){return!1}},e.prototype.verifySha256=function(e,t){return this.verify(e,t,function(e){return rstr2hex(rstr_sha256(e))})},e.prototype.getKey=function(e){if(!this.key){if(this.key=new JSEncryptRSAKey,e&&"[object Function]"==={}.toString.call(e))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,e);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},e.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},e.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},e.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},e.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},e.version=version$4,e}(),os=exports("cL","Linux"),pid=exports("cu",{pro:100000011,ltd:100000032,dev:100000068,coupon:1e8}),isDev=exports("lh",!1),isRelease=exports("dr",!1);replace(/\s+/g,"");var getByteUnit=exports("G",curry$2(function(){for(var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=[" B"," KB"," MB"," GB"," TB"," PB"," EB"],i=0;i<o.length;i++){var a=o[i],s=0===t?Math.round(r):r.toFixed(t),l=0===i?r:s;if(n){if(a.trim()===n.trim())return e?l+a:"".concat(l)}else if(r<1024)return e?l+a:"".concat(l);r/=1024}return""}));curry$2(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rem";return isNull(e)?String(e):"".concat(e).concat(t)});var getPageTotal=exports("o",function(e){var t=e.match(/class='Pcount'>共([0-9]*)条</);return isArray$2(t)&&length$1(t)>=2?Number(t[1]):0}),refreshBrowser=exports("dh",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e3,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3;return isNumber$1(e)&&(t=e),new Promise(function(n){var r=window.setTimeout(function(){isString$1(e)?window.location.href=e:isNumber$1(e)&&window.location.reload(),n(r)},t)})}),rsaEncrypt=exports("r",function(e){var t=window.vite_public_encryption;if(length$1(t)<10)return e;var n=new JSEncrypt;return n.setPublicKey(t),n.encrypt(e)}),getToken=exports("dH",function(){var e=Date.now(),t=window.vite_public_proxy_key;return{request_time:e,request_token:md5(String(e).concat(md5(t)))}});curry$2(function(e,t){var n=pipe(toPairs,map$2(function(e){var t=_slicedToArray(e,2),n=t[0],r=t[1];return"".concat(String(n),"=").concat(encodeURIComponent(String(r)))}),join("&"))(t);return/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n});var hasOwnProperty=exports("ex",function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}),getRepeatChar=function(e,t){for(var n="";t--;)n+=e;return n},deepClone=exports("dL",function(e){if(isUndefined(e)||!isObject$4(e)&&!isArray$2(e))return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=deepClone(e[n]);return t}),contrastTableConfig=exports("fW",function(e,t){return 0===e.length||null==e||e.map(function(e,n){return isBoolean(e.isCustom)&&(t[n].isCustom=e.isCustom),e}),t}),removeEmptyValues=exports("ey",function(e){return Object.entries(e).reduce(function(e,t){var n=_slicedToArray(t,2),r=n[0],o=n[1];return isUndefined(o)||isEmpty(o)||isArray$2(o)?e:_objectSpread(_objectSpread({},e),{},_defineProperty2({},r,o))},{})}),decodeHtml=exports("dl",function(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}),toHalfWidth=exports("dF",function(e){return e.replace(/[\uff01-\uff5e]/g,function(e){var t=e.charCodeAt(0);return String.fromCharCode(t-65248)})}),getCookie=exports("gn",function(e){var t="https:"===window.location.protocol,n="http".concat(t?"s":"","_").concat(e),r=new RegExp("(^| )".concat(n,"=([^;]*)(;|$)")),o=document.cookie.match(r);return o?decodeURIComponent(o[2]):null}),setCookie=exports("df",function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,r=new Date,o="https:"===window.location.protocol,i=isNil(n)?2592e6:24*Number(n)*60*60*1e3;r.setTime(r.getTime()+i);var a=r.toUTCString();document.cookie="http".concat(o?"s":"","_").concat(e,"=").concat(encodeURIComponent(t),";expires=").concat(a).concat(o?"; Secure; Path=/; SameSite=None":"")}),emptyCookie=exports("hl",function(){for(var e=document.cookie.split(";"),t=0;t<e.length;t++){var n=e[t],r=n.indexOf("="),o=r>-1?n.substr(0,r):n;document.cookie="".concat(o,"=;expires=Thu, 01 Jan 1970 00:00:00 GMT")}}),clearCookie=exports("kE",function(e){setCookie(e,"",0)}),checkObjKey=exports("dC",curry$2(function(e,t){return pipe(ifElse(isNotNil,always,has$2(t)))(e)})),camelCase=function(e){return e.replace(/_([a-z])/g,function(e){return e[1].toUpperCase()})};pipe(toPairs,map$2(function(e){var t=_slicedToArray(e,2),n=t[0],r=t[1];return[camelCase(n),r]}),fromPairs);var checkDevImgPath=exports("eH",function(e){return"/static/images/".concat(e).replace(/\/\//g,"/")}),isMobile=exports("lW",function(){var e=navigator.userAgent.toLowerCase();return/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|windows phone/i.test(e)}),createProxyUrl=exports("jS",function(e){var t=e;return t.indexOf("?"),0!==e.indexOf("/")&&(t="/".concat(e)),t}),checkComponent=function(e){if(isObject$4(e)&&has$2("__name",e))return e;if(isFunction$1(e)){var t=e();return isPromise(t)?defineAsyncComponent(function(){return t}):t}return e},swapString=exports("cW",function(e){var t={lt:"<",gt:">",nbsp:" ",amp:"&",quot:'"',"#x27":"'",apos:"'"};return e.replace(/&(lt|gt|nbsp|amp|quot|#x27);/gi,function(e,n){return t[n]})}),getDefaultDate=function(e){var t=new Date;isDate(e)&&(t=e);var n=(e=Math.round(e)).toString();return 13===n.length&&(t=new Date(e)),10===n.length&&(t=new Date(1e3*e)),t},formatTime$1=exports("R",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd HH:mm:ss",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=getDefaultDate(e),o=new Map([["y","".concat(r.getFullYear())],["M","".concat(r.getMonth()+1)],["d","".concat(r.getDate())],["H","".concat(r.getHours())],["m","".concat(r.getMinutes())],["s","".concat(r.getSeconds())],["q","".concat(Math.floor((r.getMonth()+3)/3))],["f","".concat(r.getMilliseconds())]]);if(n)o.set("h",o.get("H"));else{var i=Number(o.get("H"));i>12?o.set("h","".concat(i-12)):o.set("h","".concat(i))}for(var a="",s="",l=t,u="yMdHhmsqf",c=0,d=0;c<9;c++)if(!((d=t.indexOf(u[c]))<0)){for(a="";d<t.length&&t[d]===u[c];d++)a+=u[c];if(a.length>0){var p=o.get(u[c])||"";if(a.length===p.length)s=p;else if(a.length>p.length)s="f"===u[c]?p+getRepeatChar("0",a.length-p.length):getRepeatChar("0",a.length-p.length)+p;else switch(u[c]){case"y":s=p.substring(p.length-a.length);break;case"f":s=p.substring(0,a.length);break;default:s=p}l=l.replace(a,s)}}return l}),getSimplifyTime=exports("dD",function(e){var t=e;10===e.toString().length&&(t*=1e3);var n=(new Date).getTime()-t;if(n<=0)return"刚刚";for(var r=[{label:"分钟",num:60},{label:"小时",num:60},{label:"天",num:24},{label:"周",num:7,cut:!0},{label:"月",num:30,cut:!0},{label:"年",num:365,cut:!0}],o=0,i=0,a=1e3,s=0;s<r.length;s++){var l=r[s];if(o=a,o*=l.num,l.cut||(a=o),i=Math.floor(n/o),s===r.length-1&&i>0)return"".concat(i).concat(l.label,"前");if(s===r.length-1)break;if(i<r[s+1].num&&i>0)return"".concat(i).concat(l.label,"前")}return"刚刚"}),addDay=exports("hv",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;isString$1(t)&&(t=new Date(t));var n=t.getTime()+864e5*e;return new Date(n)}),getDuration=exports("dE",function(e){var t="",n=Math.floor(e/86400),r=Math.floor(e%86400/3600),o=Math.floor(e%86400%3600/60),i=Math.floor(e%86400%3600%60);return n>0?t="".concat(n,"天").concat(r,"小时").concat(o,"分").concat(i,"秒"):r>0?t="".concat(r,"小时").concat(o,"分").concat(i,"秒"):o>0?t="".concat(o,"分").concat(i,"秒"):i>=0&&(t="".concat(i,"秒")),t}),messageList=[],BtMessage=function(e){var t=ElMessage(_objectSpread({duration:2e3},e));return messageList.forEach(function(e){e.close()}),messageList.length=0,messageList.push(t),t},Message$2=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"getOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(isString$1(e)||isVNode(e))&&(e={message:e}),isUndefined(e.msg)||(e.message=e.msg,delete e.msg),isUndefined(e.time)||(e.duration=e.time,delete e.time),_objectSpread(_objectSpread({},e),{},{customClass:"bt-message-html",showClose:!0})}},{key:"msg",value:function(e){return BtMessage(_objectSpread({},e))}},{key:"success",value:function(t){var n=e.getOptions(t);return BtMessage(_objectSpread({type:"success"},n))}},{key:"warn",value:function(t){var n=e.getOptions(t);return BtMessage(_objectSpread({type:"warning"},n))}},{key:"error",value:function(t){var n=e.getOptions(t);return BtMessage(_objectSpread({type:"error",dangerouslyUseHTMLString:!0,customClass:"bt-message-error-html"},n))}},{key:"request",value:function(e,t){return BtMessage(_objectSpread({customClass:"bt-message-error-html",type:e.status?"success":"error",dangerouslyUseHTMLString:!0,message:e.msg},t||{}))}},{key:"load",value:function(e){(isString$1(e)||isVNode(e))&&(e={msg:e,customClass:"",background:"rgba(0,0,0, 0.3)"});var t=e,n=t.msg,r=t.background,o=t.customClass,i=ElLoading.service({text:n||"加载中...",spinner:"",customClass:"bt-loading ".concat(o||""),background:r||"rgba(0,0,0, 0.3)"});return nextTick(function(){var e=i.$el.querySelector(".circular");if(e){var t,n,r=document.createElement("div");r.className="custom-loading__icon",r.innerHTML='\n\t\t\t\t\t<svg aria-hidden="true"><use href="#icon-tools-logo"></use></svg>\n\t\t\t\t',null===(t=e.parentNode)||void 0===t||t.insertBefore(r,e),null===(n=e.parentNode)||void 0===n||n.removeChild(e)}}),i}}])}();exports("M",Message$2);var useMessage=exports("f",function(){return Message$2}),useLoading=exports("cM",function(e){return Message$2.load(e)}),getBody=function(){return document.body||document.documentElement},inputFocus=exports("ds",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"input";try{nextTick(function(){var r,o=e;"INPUT"!==o.tagName&&(o=e.querySelector("".concat(n).concat(""!==t?"[name='".concat(t,"']"):""))),o.getAttribute("disabled")||null===(r=o)||void 0===r||r.focus()})}catch(r){}}),setFullScreen=exports("jQ",function(){var e=document.documentElement.requestFullscreen;if(e)e.call(document.documentElement);else if(void 0!==window.ActiveXObject){var t=new ActiveXObject("WScript.Shell");null!==t&&t.SendKeys("{F11}")}}),exitFullscreen=exports("jR",function(){var e=document.exitFullscreen;if(e)e.call(document);else if(void 0!==window.ActiveXObject){var t=new ActiveXObject("WScript.Shell");null!==t&&t.SendKeys("{F11}")}}),copyText=exports("Q",function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var n,r,o,i,a,s,l,u;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:n=t.value,r=t.success,o=void 0===r?"复制成功":r,i=t.error,a=void 0===i?"复制失败,请手动复制文本":i,s=useMessage(),l=useClipboard({legacy:!0}),u=l.copy,l.isSupported.value?(u(n),s.success(o)):s.error(a);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),scrollBottom=exports("it",function(e){var t=document.querySelector(e);if(t){var n=t.scrollHeight,r=t.clientHeight;t.scrollTop=n+r}}),imitatePhpAdminForm=exports("d7",function(e,t,n,r){return new Promise(function(o){var i="".concat(r,"/index.php?lang=zh_cn"),a=document.createElement("form"),s='<input type="text" name="pma_username" id="pma_username" value="'.concat(t,'" />\n\t\t<input type="password" name="pma_password" id="pma_password" value="').concat(n,'" />\n\t\t<input type="text" name="server" value="1" />\n\t\t<input type="text" name="target" value="index.php" />\n\t\t<input type="text" name="db" id="db" value="').concat(e,'" />');a.action=i,a.setAttribute("public-data",i),a.method="post",a.target="_blank",a.style.display="none",a.innerHTML=s,document.body.appendChild(a),a.submit(),document.body.removeChild(a),o(a)})}),imitatePhpAdminPanelForm=exports("d6",function(){var e=_asyncToGenerator(_regenerator().m(function e(t,n){var r,o,i,a,s,l;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return r=document.createElement("form"),e.n=1,axios.get("/phpmyadmin/index.php?lang=zh_cn");case 1:o=e.v,i=o.data,a={session:"",token:""},s=i.match(/\"set_session\"\s+value=\"(\w+)\"/),l=i.match(/\"token\"\s+value=\"(\w+)\"/),s&&s.length>1&&(a.session=s[1]||""),l&&l.length>1&&(a.token=l[1]||""),r.action="/phpmyadmin/index.php",r.method="post",r.target="_blank",r.style.display="none",r.innerHTML='\n\t\t\t<input  name="set_session" id="input_session" value="'.concat(a.session,'">\n\t\t\t<input type=x"text" name="pma_username" id="input_username" value="').concat(t,'" size="24">\n\t\t\t<input type="password" name="pma_password" id="input_password" value="').concat(n,'" size="24">\n\t\t\t<input  name="token" id="input_token" value="').concat(a.token,'">\n\t\t\t<input  name="target" id="input_target" value="index.php">\n\t\t\t<input  name="server" value="1" id="input_server">'),document.body.appendChild(r),r.submit(),document.body.removeChild(r),Promise.resolve(r);case 2:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}()),getPckageVm=exports("hL",function(e){return e.$children[0]}),clearCache=exports("bN",function(){var e=localStorage.getItem("color-scheme");localStorage.clear(),sessionStorage.clear(),e&&localStorage.setItem("color-scheme",e)}),jumpRouter=exports("eF",function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var n,r,o,i,a,s;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,__vitePreload(function(){return Promise.resolve().then(function(){return index$3})},void 0,module.meta.url);case 1:return n=e.v,r=n.router,e.n=2,__vitePreload(function(){return Promise.resolve().then(function(){return global$1})},void 0,module.meta.url);case 2:o=e.v,i=o.useGlobalStore,a=i(),s=a.routerActive,r.push({path:t}),s.value=t;case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),isCurrentRouter=exports("mb",function(e,t){if(t){if(t.indexOf(e)>-1)return!0}else if(useRoute().path.indexOf(e)>-1)return!0;return!1}),setColumnCustom=exports("c$",function(e,t){try{var n=JSON.parse(localStorage.getItem(t)||"[]");return n.length&&e.forEach(function(e,t){var r;has$2("isCustom",e)&&(e.isCustom=null===(r=n[t])||void 0===r?void 0:r.isCustom)}),e}catch(r){}}),getRandomChart=exports("du",function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t="",n={default:"ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz123456789",password:"AaBbCcDdEeFfGHhiJjKkLMmNnPpRSrTsWtXwYxZyz2345678",wp:"AaBbCcDdEeFfGHhiJjKkLMmNnPpRSrTsWtXwYxZyz12345678!@#$%^&*?",letter:"ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz",lowercaseNumber:"abcdefhijkmnprstwxyz123456789"}[arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default"],r=0;r<e;r++)t+=n.charAt(Math.floor(Math.random()*n.length));return t}),getRandomPrefix=exports("lT",function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=getRandomChart(t);return"".concat(e).concat(n).concat(r)}),getRandomPwd=exports("dm",function(){return getRandomChart(arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,"password")}),getRandom=exports("hj",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;return Math.random().toString(16).slice(2,2+e)}),getComplexRandomString=exports("dP",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e<3)throw new Error("长度必须大于或等于3");var t="ABCDEFGHJKMNPQRSTWXYZ",n="abcdefhijkmnprstwxyz",r="123456789",o="";o+=t.charAt(Math.floor(21*Math.random())),o+=n.charAt(Math.floor(20*Math.random())),o+=r.charAt(Math.floor(9*Math.random()));for(var i=t+n+r,a=3;a<e;a++)o+=i.charAt(Math.floor(Math.random()*i.length));return o.split("").sort(function(){return Math.random()-.5}).join("")}),generatePasswordByConfig=exports("hk",function(e){for(var t=Number(e.validatePasswordLength)||16,n=Number(e.validatePasswordMixedCaseCount)||1,r=Number(e.validatePasswordNumberCount)||1,o=Number(e.validatePasswordSpecialCharCount)||1,i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",a="abcdefghijklmnopqrstuvwxyz",s="0123456789",l="!@#$%^&*()_+-=[]{}|;:,.<>?",u="",c=0;c<n;c++)u+=i[Math.floor(26*Math.random())];for(var d=0;d<n;d++)u+=a[Math.floor(26*Math.random())];for(var p=0;p<r;p++)u+=s[Math.floor(10*Math.random())];for(var h=0;h<o;h++){u+=l[Math.floor(26*Math.random())]}for(var f=t-u.length,g=i+a+s+l,m=0;m<f;m++)u+=g[Math.floor(88*Math.random())];return u.split("").sort(function(){return Math.random()-.5}).join("")}),defaultVerify=exports("cN",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{required:!0,message:e.message||"参数不能为空",trigger:e.trigger||["blur","change"]}}),pawVerify=exports("fb",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.message,n=e.complex,r=e.prefix,o=e.trigger;return isObject$4(t)||(t={}),isString$1(r)||(r=""),{validator:function(e,o,i){""===(o=o.trim())?i(new Error(t.value||"密码不能为空")):n.length&&o.length<n.length?i(new Error(t.length||"密码长度必须大于等于".concat(n.length,"位"))):n?i():n.small&&!/[a-z]/.test(o)?i(new Error(t.small||"".concat(r,"密码至少包含一个小写字母"))):n.big&&!/[A-Z]/.test(o)?i(new Error(t.big||"".concat(r,"密码至少包含一个大写字母"))):n.number&&!/[0-9]/.test(o)?i(new Error(t.number||"".concat(r,"密码至少包含一个数字"))):n.special&&!/[~!@#$%^&*()_+<>?:"{},.\/;'[\]]/.test(o)&&i(new Error(t.special||"".concat(r,"密码至少包含一个特殊字符")))},trigger:o||["blur","change"]}}),ipVerify=exports("fa",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.message,n=e.trigger;return isObject$4(t)||(t={}),{validator:function(e,n,r){""===(n=n.trim())?r(new Error(t.value||"IP地址不能为空")):checkIp(n)?r():r(new Error(t.ip||"IP地址格式错误"))},trigger:n||["blur","change"]}}),pathVerify=exports("fc",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.message,n=e.trigger;return isObject$4(t)||(t={}),{validator:function(e,n,r){var o=Array.from(new Set(["/","/www","/bin","/boot","/dev","/etc","/lib","/media","/mnt","/opt","/proc","/root","/run","/sbin","/srv","/sys","/tmp","/usr","/var"]));""===(n=n.trim())?r(new Error(t.value||"目录不能为空")):o.includes(n)?r(new Error("目录为系统保留目录, 请重新选择")):r()},trigger:n||["blur","change"]}}),portVerify=exports("Y",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.message,n=e.trigger;return isObject$4(t)||(t={}),{validator:function(e,n,r){checkPort(n)?r():r(new Error(t.port||"请填写正确的端口"))},trigger:n||["blur","change"],required:!0}}),domainOrIpPortVerify=exports("dO",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.message,n=e.trigger;return isObject$4(t)||(t={}),{validator:function(e,t,n){t.split("\n").filter(function(e){return e.trim().length}).map(function(e,t){if(!e.startsWith("[")&&e.split(":")[0].length<3)return n(new Error("第 ".concat(t+1," 行地址长度不符合要求(必须大于3个字符)")));checkDomainOrIpPort(e)||n(new Error("当前域名格式错误,第".concat(t+1,"行,内容:").concat(e)))}),n()},trigger:n||["blur","change"]}}),panelUrlVerify=exports("fi",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.message,n=e.trigger;return isObject$4(t)||(t={}),{required:!0,validator:function(e,n,r){""===n?r(new Error(t.value||"面板地址不能为空")):checkPanelUrl(n)?r():r(new Error(t.node||"请输入正确的面板地址"))},trigger:n||["blur","change"]}}),PRESET_COLOR_CACHE_KEY="theme-preset-colors-cache",PRESET_COLOR_CACHE=new Map;try{var raw=localStorage.getItem(PRESET_COLOR_CACHE_KEY);if(raw){var data=JSON.parse(raw);Object.entries(data).forEach(function(e){var t=_slicedToArray(e,2),n=t[0],r=t[1];PRESET_COLOR_CACHE.set(n,r)})}}catch(e){}function getCachedColorScale(e){return PRESET_COLOR_CACHE.get(e)}function setCachedColorScale(t,n){PRESET_COLOR_CACHE.set(t,n);try{var r=Object.fromEntries(PRESET_COLOR_CACHE);localStorage.setItem(PRESET_COLOR_CACHE_KEY,JSON.stringify(r))}catch(e){}}function hasCachedColorScale(e){return PRESET_COLOR_CACHE.has(e)}var colorConversionCache=new Map,MAX_CACHE_SIZE=500,colorAnalysisCache=new Map;function clearCacheIfNeeded(e){if(e.size>MAX_CACHE_SIZE){var t=Array.from(e.entries());t.slice(0,Math.floor(t.length/2)).forEach(function(t){var n=_slicedToArray(t,1)[0];return e.delete(n)})}}function hexToRgb(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="hexToRgb:".concat(e,":").concat(t);if(colorConversionCache.has(n))return colorConversionCache.get(n);var r=e.replace("#","");if(!/^[a-fA-F0-9]{6}$/.test(r))return null;var o={r:parseInt(r.slice(0,2),16),g:parseInt(r.slice(2,4),16),b:parseInt(r.slice(4,6),16)};clearCacheIfNeeded(colorConversionCache);var i=t?"".concat(o.r,",").concat(o.g,",").concat(o.b):o;return colorConversionCache.set(n,i),i}function rgbToHex(e,t,n){var r=function(e){return Math.max(0,Math.min(255,Math.round(e)))},o=r(e).toString(16).padStart(2,"0"),i=r(t).toString(16).padStart(2,"0"),a=r(n).toString(16).padStart(2,"0");return"#".concat(o).concat(i).concat(a)}function rgbObjectToHex(e){return rgbToHex(e.r,e.g,e.b)}function rgbToHsl(e,t,n){var r=e/255,o=t/255,i=n/255,a=Math.max(r,o,i),s=Math.min(r,o,i),l=0,u=0,c=(a+s)/2;if(a!==s){var d=a-s;switch(u=c>.5?d/(2-a-s):d/(a+s),a){case r:l=(o-i)/d+(o<i?6:0);break;case o:l=(i-r)/d+2;break;case i:l=(r-o)/d+4}l/=6}return{h:l,s:u,l:c}}function hslToRgb(e,t,n){var r,o,i;if(0===t)r=o=i=n;else{var a=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=a(l,s,e+1/3),o=a(l,s,e),i=a(l,s,e-1/3)}return{r:Math.round(255*r),g:Math.round(255*o),b:Math.round(255*i)}}function normalizeColorInput(e){if(null==e)return null;if("string"==typeof e)return hexToRgb(e);if("object"===_typeof2(e)){if("r"in e&&"g"in e&&"b"in e)return e;if("h"in e&&"s"in e&&"l"in e)return hslToRgb(e.h,e.s,e.l)}return null}function calculateLuminance(e){var t=function(e){var t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)};return.2126*t(e.r)+.7152*t(e.g)+.0722*t(e.b)}function calculateContrast(e,t){var n=calculateLuminance(e),r=calculateLuminance(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function analyzeColor(e){var t=normalizeColorInput(e);if(!t)return null;var n=calculateLuminance(t),r=Math.max(calculateContrast(t,{r:255,g:255,b:255}),calculateContrast(t,{r:0,g:0,b:0}));return{isLight:n>.5,luminance:n,contrast:r,wcagAA:r>=4.5,wcagAAA:r>=7}}var DEFAULT_LIGHT_COLOR_SCALE={base:"#20a53a","base-rgb":"32,165,58",light3:"#63c075","light3-rgb":"99,192,117",light5:"#90d29d","light5-rgb":"144,210,157",light7:"#bce4c4","light7-rgb":"188,228,196",light8:"#d2edd8","light8-rgb":"210,237,216",light9:"#e9f6eb","light9-rgb":"233,246,235",dark2:"#1a842e","dark2-rgb":"26,132,46"},DEFAULT_DARK_COLOR_SCALE={base:"#1e7e34","base-rgb":"30,126,52",light3:"#1c7a2f","light3-rgb":"28,122,47",light5:"#1a5d27","light5-rgb":"26,93,39",light7:"#18401f","light7-rgb":"24,64,31",light8:"#16311c","light8-rgb":"22,49,28",light9:"#152318","light9-rgb":"21,35,24",dark2:"#4db761","dark2-rgb":"77,183,97"};function formatColorScale(e,t){var n=Array.isArray(t)?t:[t];if(1===n.length&&"hex"===n[0])return e;if(1===n.length){var r=n[0],o={};return Object.keys(e).forEach(function(t){var n=t,i=e[n];if("string"==typeof i){var a=hexToRgb(i);if("rgb"===r)o[n]="".concat(a.r,",").concat(a.g,",").concat(a.b);else if("hsl"===r){var s=rgbToHsl(a.r,a.g,a.b),l=Math.round(360*s.h),u=Math.round(100*s.s),c=Math.round(100*s.l);o[n]="".concat(l,",").concat(u,"%,").concat(c,"%")}}}),o}var i=_objectSpread({},e),a=Object.keys(e);return n.forEach(function(t){"hex"!==t&&a.forEach(function(n){var r=e[n];if("string"==typeof r){var o=hexToRgb(r),a="";if("rgb"===t)a="".concat(o.r,",").concat(o.g,",").concat(o.b);else if("hsl"===t){var s=rgbToHsl(o.r,o.g,o.b),l=Math.round(360*s.h),u=Math.round(100*s.s),c=Math.round(100*s.l);a="".concat(l,",").concat(u,"%,").concat(c,"%")}a&&(i["".concat(n,"-").concat(t)]=a)}})}),i}function initColorCache(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hex";Object.values(t).forEach(function(t){if(t.primary)try{var r="light:".concat(t.primary),o="dark:".concat(t.primary);hasCachedColorScale(r)||generateStandardColorScale(t.primary,"light",n),hasCachedColorScale(o)||generateStandardColorScale(t.primary,"dark",n)}catch(e){}})}function generateStandardColorScale(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"light",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hex",r=normalizeColorInput(e);if(!r)throw new Error("Invalid color");var o,i,a,s=rgbObjectToHex(r),l="".concat(t,":").concat(s),u=getCachedColorScale(l);if(u||"#20a53a"!==s||setCachedColorScale(l,u="dark"===t?DEFAULT_DARK_COLOR_SCALE:DEFAULT_LIGHT_COLOR_SCALE),!u){var c=colorAnalysisCache.get(s);c||(c={hsl:rgbToHsl(r.r,r.g,r.b),analysis:analyzeColor(r)},colorAnalysisCache.set(s,c),clearCacheIfNeeded(colorAnalysisCache));var d=c,p=d.hsl,h=d.analysis,f=s;if("dark"===t){if("#F4D1B4"!==f.toUpperCase()){var g=Math.max(.2,.95*p.l),m=Math.max(.1,.95*p.s);f=rgbObjectToHex(hslToRgb(p.h,m,g))}var y=function(e){var t={3:.12,5:.28,7:.45,8:.58,9:.72}[e]||.5,n=t*(.8+.4*h.luminance),r=Math.max(.08,p.l*(1-n)),o=Math.min(1,p.s*(1+Math.min(.15,.12*t)));return rgbObjectToHex(hslToRgb(p.h,o,r))};u={base:f,light3:y(3),light5:y(5),light7:y(7),light8:y(8),light9:y(9),dark2:(o=h.isLight?.35:.5,i=Math.min(.92,p.l+(1-p.l)*o),a=Math.max(.15,.85*p.s),rgbObjectToHex(hslToRgb(p.h,a,i)))}}else{var v=function(e){var t={3:.25,5:.45,7:.65,8:.78,9:.88}[e]||.5,n=t*(.9+.2*(1-h.luminance)),r=Math.min(.98,p.l+(1-p.l)*n),o=Math.max(.05,p.s*(1-Math.min(.5,.45*t)));return rgbObjectToHex(hslToRgb(p.h,o,r))};u={base:f,light3:v(3),light5:v(5),light7:v(7),light8:v(8),light9:v(9),dark2:function(){var e=h.isLight?.25:.18,t=Math.max(.05,p.l*(1-e)),n=Math.min(1,p.s*(1+Math.min(.15,.6*e)));return rgbObjectToHex(hslToRgb(p.h,n,t))}()}}setCachedColorScale(l,u)}var _=Array.isArray(n)?n:[n],x=!1,S=_objectSpread({},u);if(_.forEach(function(e){if("hex"!==e){var t="base-".concat(e);if(!S[t]){var n={};Object.keys(S).forEach(function(e){!e.includes("-")&&"string"==typeof S[e]&&S[e].startsWith("#")&&(n[e]=S[e])});var r=formatColorScale(n,e);Object.keys(r).forEach(function(t){S["".concat(t,"-").concat(e)]=r[t]}),x=!0}}}),1===_.length&&"hex"!==_[0]){var b=_[0],T={};return u&&Object.keys(u).forEach(function(e){var t;if(!e.includes("-")){var n="".concat(e,"-").concat(b);null!==(t=u)&&void 0!==t&&t[n]&&(T[e]=u[n])}}),T}return x&&(setCachedColorScale(l,S),u=S),_objectSpread({},u)}function generateColorScale(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,r=void 0===n?"light":n,o=t.format;return generateStandardColorScale(e,r,void 0===o?"hex":o)}function generateCssVariables(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).prefix,n=void 0===t?"el-color-primary":t,r={};return r["--".concat(n)]=e.base,r["--".concat(n,"-light-3")]=e.light3,r["--".concat(n,"-light-5")]=e.light5,r["--".concat(n,"-light-7")]=e.light7,r["--".concat(n,"-light-8")]=e.light8,r["--".concat(n,"-light-9")]=e.light9,r["--".concat(n,"-dark-2")]=e.dark2,r["--".concat(n,"-rgb")]=e["base-rgb"],r["--".concat(n,"-light-3-rgb")]=e["light3-rgb"],r["--".concat(n,"-light-5-rgb")]=e["light5-rgb"],r["--".concat(n,"-light-7-rgb")]=e["light7-rgb"],r["--".concat(n,"-light-8-rgb")]=e["light8-rgb"],r["--".concat(n,"-light-9-rgb")]=e["light9-rgb"],r["--".concat(n,"-dark-2-rgb")]=e["dark2-rgb"],r}var ThemeStateManager=function(){function e(){_classCallCheck(this,e),_defineProperty2(this,"state",void 0),_defineProperty2(this,"listeners",new Set),_defineProperty2(this,"lastPresets",{}),this.state={preset:void 0,view:void 0,color:void 0,sidebarColor:void 0,sidebarOpacity:void 0,interfaceRadius:void 0,interfaceBgImage:void 0,interfaceBgImageShow:void 0,interfaceShadowColor:void 0,interfaceBgImageOpacity:void 0,interfaceContentOpacity:void 0,interfaceShadowOpacity:void 0,interfaceContainerWidth:void 0,homeOverviewSize:void 0}}return _createClass(e,[{key:"getState",value:function(){return _objectSpread({},this.state)}},{key:"checkAndCommitState",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!0,o=this.state.preset;n&&"preset"!==e&&(o!==this.lastPresets[e]&&(r=!1));return!(void 0!==t||!r)||(!(this.state[e]!==t||!r)||(this.state[e]=t,"preset"!==e&&(this.lastPresets[e]=o),this.notifyListeners(),!1))}},{key:"setState",value:function(e){Object.assign(this.state,e),this.notifyListeners()}},{key:"subscribe",value:function(e){var t=this;return this.listeners.add(e),function(){t.listeners.delete(e)}}},{key:"notifyListeners",value:function(){var e=this.getState();this.listeners.forEach(function(t){return t(e)})}}],[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}])}();_defineProperty2(ThemeStateManager,"instance",void 0);var themeState=ThemeStateManager.getInstance(),DEFAULT_CONFIG=exports("D",{theme:{preset:"light",color:"#20a53a",view:"default"},logo:{image:"/static/icons/logo-white.svg",favicon:"/static/favicon.ico"},sidebar:{dark:!0,color:"#3c444d",opacity:100},interface:{rounded:"smaller",is_show_bg:!0,bg_image:"/static/images/bg-default.png",bg_image_opacity:20,content_opacity:70,shadow_color:"#000000",shadow_opacity:5,container_width:"100%"},home:{overview_view:"default",overview_size:24},login:{is_show_logo:!0,logo:"/static/icons/logo-green.svg",is_show_bg:!1,bg_image:"",bg_image_opacity:70,content_opacity:100},terminal:{show:!1,url:"",opacity:70,ai_opacity:100}}),DEFAULT_COLOR_PRESETS=exports("i9",{grey:{primary:"#3c444d",label:"深灰蓝",gradient:"linear-gradient(135deg, #3c444d 0%, #5a6c7d 100%)"},light:{primary:"#ffffff",label:"纯白色",gradient:"linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%)"},default:{primary:"#20a53a",label:"宝塔绿",gradient:"linear-gradient(135deg, #20a53a 0%, #47a559 100%)"},forest:{primary:"#14892b",label:"森林绿",gradient:"linear-gradient(135deg, #14892b 0%, #1ea639 100%)"},emerald:{primary:"#10B981",label:"翡翠绿",gradient:"linear-gradient(135deg, #10b981 0%, #34d399 100%)"},violet:{primary:"#8B5CF6",label:"紫罗兰",gradient:"linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%)"},sky:{primary:"#0EA5E9",label:"天空蓝",gradient:"linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%)"},pink:{primary:"#F472B6",label:"樱花粉",gradient:"linear-gradient(135deg, #f472b6 0%, #ec4899 100%)"},gold:{primary:"#F4D1B4",label:"暗金色",gradient:"linear-gradient(135deg, #F4D1B4 0%, #EAC2A5 100%)"}}),STYLE_MODULE_IDS={themeColor:"bt-theme-colors",homeOverviewSize:"bt-theme-home-overview-size",sidebar:"bt-theme-sidebar",sidebarOpacity:"bt-theme-sidebar-opacity",interfaceRadius:"bt-theme-interface-radius",interfaceBackgroundImage:"bt-theme-interface-background-image",interfaceContentOpacity:"bt-theme-interface-content-opacity",interfaceBackgroundImageOpacity:"bt-theme-interface-background-image-opacity",interfaceShadowColor:"bt-theme-interface-shadow-color",interfaceShadowOpacity:"bt-theme-interface-shadow-opacity",common:"bt-theme-common"},getSystemTheme=exports("p",function(){try{return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch(e){return"light"}}),setThemeClass=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=document.documentElement;n.classList.forEach(function(e){return e.startsWith("theme-".concat(t,"-"))&&n.classList.remove(e)}),n.classList.add("theme-".concat(t,"-").concat(e))},getPresetColor=exports("t",function(e){return e?checkPresetColor(e)?e:e in DEFAULT_COLOR_PRESETS?DEFAULT_COLOR_PRESETS[e].primary.toUpperCase():e:""}),contrastColors=exports("ia",function(e,t){return e.toUpperCase()===t.toUpperCase()}),checkPresetColor=exports("ib",function(e){return Object.values(DEFAULT_COLOR_PRESETS).some(function(t){return contrastColors(t.primary,e||"")})}),getColorName=exports("v",function(e){var t=Object.entries(DEFAULT_COLOR_PRESETS).find(function(t){var n=_slicedToArray(t,2)[1];return contrastColors(n.primary,e)});return t?t[0]:"custom"}),getDefaultConfigPart=exports("x",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:DEFAULT_CONFIG,n=e.split("."),r=n.reduce(function(e,t){if(e&&"object"===_typeof2(e)&&t in e)return e[t]},t);return n.reduceRight(function(e,t,o){return o===n.length-1?_defineProperty2({},t,r):_defineProperty2({},t,e)},void 0)}),createConfigPart=exports("y",function(e,t){for(var n=e.split("."),r={},o=r,i=0;i<n.length-1;i++)o[n[i]]||(o[n[i]]={}),o=o[n[i]];return o[n[n.length-1]]=t,r});initColorCache(DEFAULT_COLOR_PRESETS,["hex","rgb"]);var pendingMap=new Map,getPendingUrl=function(e){return[e.method,e.url].join("&")},AxiosCanceler=function(){return _createClass(function e(){_classCallCheck(this,e)},[{key:"addPending",value:function(e){var t=getPendingUrl(e);e.cancelToken=e.cancelToken||new axios.CancelToken(function(e){pendingMap.has(t)||pendingMap.set(t,e)})}},{key:"removePending",value:function(e){var t=getPendingUrl(e);if(pendingMap.has(t)){var n=pendingMap.get(t);isFunction$1(n)&&n(),pendingMap.delete(t)}}},{key:"removeAllPending",value:function(){pendingMap.forEach(function(e){isFunction$1(e)&&e()}),pendingMap.clear()}},{key:"reset",value:function(){pendingMap=new Map}}])}();exports("jb",AxiosCanceler);var useRequestCanceler=exports("ca",function(e){var t=(new AxiosCanceler).removePending;e.forEach(function(e){t("string"==typeof e?{url:e,method:"post"}:e)})});function createDefaultOption(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={baseURL:"",timeout:25e4,headers:{"Content-Type":"application/x-www-form-urlencoded"}},n=0===window.location.protocol.indexOf("https:")?"https_request_token":"request_token",r=getCookie(n);return t.headers=_objectSpread(_objectSpread(_objectSpread({},t.headers),{"x-http-token":window.vite_public_request_token}),r?{"x-cookie-token":r}:{}),_objectSpread(_objectSpread({},t),e)}function createUrl(e){var t=e.url,n=e.customType,r=void 0===n?"default":n;if(!t)throw new Error("请求路径为空");var o=t?t.split("/"):[];if(2!==o.length&&"model"!==r)throw new Error("传统请求/插件请求路径格式错误,正确格式为:模块名/方法名");switch(r){case"default":return"/".concat(o[0],"?action=").concat(o[1]);case"model":default:return"/".concat(t).replace(/\/+/g,"/");case"plugin":return"/plugin?action=a&name=".concat(o[0],"&s=").concat(o[1])}}var handleTransformRequest=pipe(toPairs,map$2(function(e){var t=_slicedToArray(e,2),n=t[0],r=t[1];return"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(r))}),join("&")),__unplugin_components_3=exports("d8",defineComponent({props:{src:{type:String,default:""},type:{type:String,default:"images"},all:{type:Boolean,default:!1}},setup:function(e,t){var n=t.attrs,r=t.slots,o=ref(e.all?e.src:"/static/".concat(e.type,"/").concat(e.src));return watch(function(){return e.src},function(){o.value=e.all?e.src:"/static/".concat(e.type,"/").concat(e.src)}),function(){return createVNode$1(ElImage,mergeProps({src:o.value.replace("//","/")},n),{error:function(){return r.error&&r.error()}})}}}));function _isSlot$7(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!isVNode$1(e)}var __unplugin_components_0$4=exports("c7",defineComponent({name:"BtLink",props:_objectSpread(_objectSpread({},linkProps),{},{type:{type:String,default:"primary"},title:{type:String,default:""},target:{type:String,default:"_blank"},underline:{type:Boolean,default:!1},href:{type:String,default:""},size:{type:String,default:"12px"},onClick:{type:Function,default:void 0}}),setup:function(e,t){var n=t.attrs,r=t.slots,o=toRefs(e),i=o.size,a=o.href,s=o.target,l=o.underline,u=o.type,c=o.title,d=o.onClick,p=computed(function(){return Number.isNaN(Number(i.value))?i.value:"".concat(i.value,"rem")});return function(){var e;return createVNode$1(Fragment,null,[a.value?createVNode$1(ElLink,mergeProps(n,{href:a.value,type:u.value,title:c.value||"",target:"javascript:;"!==a.value?s.value:"",underline:l.value,rel:"noreferrer noopener",style:{fontSize:p.value},onClick:d.value}),_isSlot$7(r)?r:{default:function(){return[r]}}):createVNode$1("span",mergeProps({class:"bt-link",style:{fontSize:p.value}},n,{onClick:d.value}),[(null==r?void 0:r.default)&&(null===(e=r.default)||void 0===e?void 0:e.call(r))])])}}})),_hoisted_1$5={key:0,class:"p-[20px]"},_hoisted_2$5={class:"h-108 w-full whitespace-pre-wrap mb-0"},_hoisted_3$5={class:""},_hoisted_4$5={class:"help-info-text err_project_ul inline-block"},_hoisted_5$4={class:"list-none leading-[3.2rem]"},_hoisted_6$4={class:"list-none leading-[3.2rem]"},_hoisted_7$4={key:0,class:"list-none leading-[3.2rem]"},_hoisted_8$2={key:0,class:"relative mt-20 mr-10 text-center text-xs pull-right"},_hoisted_9$2={id:"err_kefu_img",class:"p-5 border border-green-500 inline-block h-28"},_hoisted_10$1={key:1},_hoisted_11$1=["innerHTML"],_sfc_main$5=defineComponent({__name:"error-popup",props:{compData:{default:function(){return{errorBody:"",errorFind:!1}}}},setup:function(e){var t=e,n=useMessage(),r=useGlobalStore().isBuy,o=toRefs(t.compData),i=o.errorFind,a=o.errorBody,s=ref(isNumber$1(i.value)),l=function(){var e=s.value?a.value.trim():"".concat(a.value.trim(),"\n").concat(a.value.trim());try{navigator.clipboard.writeText(e)}catch(t){copyText({value:e})}finally{n.success("复制成功")}},u=function(){var e=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,useDataHandle({loading:"正在获取数据,请稍后...",request:repairPanelNew(),success:function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(1!==(r=t.data).upgrade){e.n=2;break}return e.n=1,useConfirm({title:"修复面板",content:'<div class="flex items-center">\n              <div class="mr-1rem w-[4rem]"><img width="40" src="/static/icons/icon-upgrade.svg"></img></div>\n              <div class="flex-1">\n                <div class="text-medium leading-2.4rem">发现新版本,继续修复面板能修复使用中遇到的各种异常问题</div>\n              </div>\n            </div>\n            <div class="pl-5rem mt-[4px]">\n              <div>最新版本:'.concat(r.cloud.version,"</div>\n              <div>更新时间:").concat(formatTime$1(1e3*r.cloud.update_time),"</div>\n            </div>"),icon:!1,width:"40rem",isHtml:!0,confirmText:"继续修复"});case 1:useDataHandle({loading:"正在修复面板,请稍后...",request:repairPanelNew({force:1}),message:!0,success:function(e){clearCache(),e.status&&setTimeout(function(){useDialog({title:"正在".concat("repair"===r.type?"修复":"更新","面板,请耐心等候..."),area:70,compData:{type:"repair"},component:function(){return __vitePreload(function(){return module.import("./index-legacy2.js?v=1777008528")},void 0,module.meta.url)}})},1500)}}),e.n=3;break;case 2:n.msg({message:"<div>\n              <div>当前已是最新版本</div>\n              <div>当前版本:".concat(r.local.version,"</div>\n              <div>更新时间:").concat(formatTime$1(1e3*r.local.update_time),"</div>\n            </div>"),type:"success",dangerouslyUseHTMLString:!0});case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return onMounted(function(){return function(){if(s.value){a.value=a.value.split("\x3c!--")[2].replace("--\x3e","");var e=a.value.split("During handling of the above exception, another exception occurred:");a.value=e[e.length-1]}}()}),function(e,t){var n=ElButton,o=__unplugin_components_0$4,i=__unplugin_components_3;return openBlock(),createElementBlock("div",null,[unref(s)?(openBlock(),createElementBlock("div",_hoisted_10$1,[createBaseVNode("div",{class:"p-[2rem]",innerHTML:unref(a)},null,8,_hoisted_11$1)])):(openBlock(),createElementBlock("div",_hoisted_1$5,[t[8]||(t[8]=createBaseVNode("h3",{class:"mb-10"},"出错了,面板运行时发生错误!",-1)),createBaseVNode("pre",_hoisted_2$5,toDisplayString(unref(a).trim()),1),createBaseVNode("div",_hoisted_3$5,[createVNode$1(n,{onClick:l},{default:withCtx(function(){return _toConsumableArray(t[0]||(t[0]=[createTextVNode("点击复制错误信息",-1)]))}),_:1})]),createBaseVNode("ul",_hoisted_4$5,[t[6]||(t[6]=createBaseVNode("li",{class:"list-none leading-[3.2rem]"},[createBaseVNode("b",null,"很抱歉,面板运行时意外发生错误,请尝试按以下顺序尝试解除此错误:")],-1)),createBaseVNode("li",_hoisted_5$4,[t[2]||(t[2]=createTextVNode("修复方案一:在[首页]右上角点击修复面板,并退出面板重新登录。",-1)),createVNode$1(o,{href:"javascript:;",class:"bt-link ml-4",onClick:u},{default:withCtx(function(){return _toConsumableArray(t[1]||(t[1]=[createTextVNode("尝试点击修复",-1)]))}),_:1})]),createBaseVNode("li",_hoisted_6$4,[t[4]||(t[4]=createTextVNode("修复方案二:如上述尝试未能解除此错误,请截图此窗口到宝塔论坛发贴寻求帮助, 论坛地址:",-1)),createVNode$1(o,{class:"btlink",href:"https://www.bt.cn/bbs",target:"_blank"},{default:withCtx(function(){return _toConsumableArray(t[3]||(t[3]=[createTextVNode("https://www.bt.cn/bbs",-1)]))}),_:1})]),unref(r)?(openBlock(),createElementBlock("li",_hoisted_7$4,_toConsumableArray(t[5]||(t[5]=[createTextVNode("修复方案三(",-1),createBaseVNode("span",{class:"text-warning-500"},"推荐",-1),createTextVNode("):使用微信扫描右侧二维码,联系技术客服。",-1)])))):createCommentVNode("",!0)]),unref(r)?(openBlock(),createElementBlock("div",_hoisted_8$2,[createBaseVNode("span",_hoisted_9$2,[createVNode$1(i,{src:"customer/customer-qrcode.png"})]),t[7]||(t[7]=createBaseVNode("div",null,"【微信客服】",-1))])):createCommentVNode("",!0)]))])}}}),_export_sfc=exports("cZ",function(e,t){var n,r=e.__vccOpts||e,o=_createForOfIteratorHelper(t);try{for(o.s();!(n=o.n()).done;){var i=_slicedToArray(n.value,2),a=i[0],s=i[1];r[a]=s}}catch(l){o.e(l)}finally{o.f()}return r}),ErrorPopup=_export_sfc(_sfc_main$5,[["__scopeId","data-v-a3eb6cd2"]]),_hoisted_1$4={class:"cloud-error-page"},_hoisted_2$4={class:"flex items-center gap-[4rem]"},_hoisted_3$4={class:"flex-1"},_hoisted_4$4={class:"text-small text-grey-666 mb-[16px] leading-[1.6]"},_hoisted_5$3={class:"flex flex-wrap gap-[8px]"},_hoisted_6$3={class:"solution-list text-small text-default"},_hoisted_7$3=["onClick"],_sfc_main$4=defineComponent({__name:"cloud-error",props:{compData:{default:function(){return{errorInfo:""}}}},setup:function(e){var t=e,n=computed(function(){return t.compData.errorInfo||""}),r=ref(["本地服务器网络异常","本地服务器DNS配置异常","云端服务器故障"]),o=ref([{text:"在【设置】>【面板设置】中修改【云端节点请求方式】",link:"/config/panel",linkText:"点击前往"},{text:"在【设置】>【面板设置】中重置【云端通讯节点】",link:"/config/panel",linkText:"点击前往"},{text:"在【首页】右上角点击【修复】按钮尝试修复面板"},{text:"打开宝塔官网查看云端服务器是否在维护:",link:"https://www.bt.cn",linkText:"打开宝塔官网"},{text:"排查本地服务器网络是否存在异常"},{text:"向服务器提供商请求协助"},{text:"到宝塔官方论坛发帖求助:",link:"https://www.bt.cn/bbs",linkText:"打开宝塔论坛"}]);return function(e,t){var i=ElTag,a=ElDivider;return openBlock(),createElementBlock("div",_hoisted_1$4,[createBaseVNode("div",_hoisted_2$4,[t[2]||(t[2]=createStaticVNode('<div class="relative flex-shrink-0" data-v-270a61e0><svg viewBox="0 0 187.472 132.276" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="187.472000" height="132.276001" fill="none" data-v-270a61e0><defs data-v-270a61e0><linearGradient id="paint_linear_27" x1="86.0563965" x2="154.535889" y1="-0.00100708008" y2="102.784721" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(223,223,223)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(255,255,255)" offset="1" stop-opacity="0" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_28" x1="-0.00833129883" x2="53.8443108" y1="28.5800018" y2="104.917236" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(227,226,226)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(255,255,255)" offset="1" stop-opacity="0" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_29" x1="19" x2="19.6784611" y1="119.157043" y2="135.526398" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(227,226,226)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(255,255,255)" offset="0.600000024" stop-opacity="0.501999974" data-v-270a61e0></stop><stop stop-color="rgb(255,255,255)" offset="1" stop-opacity="0" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_30" x1="67.2510681" x2="67.6075134" y1="90.6710205" y2="92.2056656" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(168,168,168)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(219,218,218)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_31" x1="60.8450317" x2="64.0989151" y1="97.2300415" y2="98.8166046" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(140,140,140)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(220,219,219)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_32" x1="60.7590332" x2="64.7004395" y1="76.0589905" y2="76.8980408" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(149,149,149)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(214,214,214)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_33" x1="48.9510498" x2="49.2617912" y1="91.0339966" y2="93.2987976" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(147,147,147)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(208,208,208)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_34" x1="49.0864983" x2="63.6288681" y1="88.0272903" y2="72.1247635" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(172,172,172)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(236,235,235)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_35" x1="50.8613892" x2="75.600029" y1="78.3011856" y2="95.5663605" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(231,231,231)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(201,201,201)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_36" x1="110.310097" x2="84.0782242" y1="73.0940475" y2="87.6867981" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(142,142,142)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(201,201,201)" offset="0.245000005" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(239,239,239)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_37" x1="90.1219864" x2="92.2109909" y1="79.0149841" y2="79.0149841" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(242,242,242)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(255,255,255)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_38" x1="92.6749954" x2="94.5319901" y1="92.0129776" y2="92.0129776" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(229,229,229)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(253,253,253)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_39" x1="98.940979" x2="101.957977" y1="78.7829895" y2="78.7829895" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(242,242,242)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(255,255,255)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_40" x1="81.9089737" x2="111.015495" y1="88.989418" y2="80.1209946" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(213,213,213)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(220,219,219)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_41" x1="118.043434" x2="82.1127319" y1="78.686203" y2="99.8522873" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(239,239,239)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(244,243,243)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_42" x1="112.882225" x2="97.8576736" y1="83.2102966" y2="115.951485" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(201,201,201)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(255,255,255)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_43" x1="140.13205" x2="140.488495" y1="90.6699829" y2="92.204628" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(168,168,168)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(219,218,218)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_44" x1="133.726013" x2="136.979904" y1="97.2290649" y2="98.8156281" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(140,140,140)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(220,219,219)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_45" x1="133.640015" x2="137.581421" y1="76.0579834" y2="76.8970337" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(149,149,149)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(214,214,214)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_46" x1="121.832031" x2="122.142769" y1="91.03302" y2="93.297821" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(147,147,147)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(208,208,208)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_47" x1="121.967484" x2="136.509857" y1="88.0262833" y2="72.1237564" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(172,172,172)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(236,235,235)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_48" x1="123.742371" x2="148.481018" y1="78.3001785" y2="95.5653534" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(231,231,231)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(201,201,201)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_49" x1="87.6359177" x2="87.6359177" y1="46.8150024" y2="42.4461555" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(201,201,201)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(172,172,172)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_50" x1="75.8600388" x2="75.8600388" y1="34.0639954" y2="31.9658813" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(201,201,201)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(172,172,172)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_51" x1="108.917877" x2="109.440331" y1="15.9551601" y2="9.80280495" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(232,232,232)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(220,219,219)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_52" x1="102.299835" x2="102.822289" y1="7.13716698" y2="0.984811783" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(232,232,232)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(220,219,219)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_53" x1="117.366234" x2="117.727646" y1="17.9389172" y2="13.6791496" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(234,234,234)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(220,219,219)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient></defs><rect id="svg 4" width="187.472000" height="132.276001" x="0.000000" y="0.000000" data-v-270a61e0></rect><g id="缺省页" data-v-270a61e0><g id="组_6667" data-v-270a61e0><path id="路径_15693" d="M182.402 124.456C185.202 124.456 187.472 112.225 187.472 97.136C187.472 82.047 185.202 69.816 182.402 69.816C181.258 69.8307 180.126 69.5804 179.096 69.0845C178.065 68.5887 177.162 67.8608 176.46 66.958C175.453 65.6413 174.689 64.1561 174.202 62.5717C173.715 60.9872 173.514 59.3288 173.608 57.674C173.608 44.674 168.955 35.439 164.656 33.651C163.416 33.39 161.487 33.961 159.585 31.999C158.728 31.2193 158.056 30.2581 157.617 29.1855C157.178 28.1129 156.985 26.9559 157.05 25.799C157.05 11.55 153.077 -0.00100708 148.177 -0.00100708C143.277 -0.00100708 139.304 11.551 139.304 25.799C139.304 28.44 139.515 29.717 137.614 31.68C135.713 33.643 132.936 33.386 131.698 33.648C127.398 35.437 124.093 46.19 124.093 59.189C124.059 61.7348 123.812 64.2734 123.355 66.778C123.355 66.778 121.934 71.271 119.869 68.865C117.804 66.459 116.975 63.217 116.62 60.187C115.611 51.571 113.442 45.529 111.42 45.529C109.354 45.529 107.577 51.815 106.779 60.921C106.684 63.2893 105.972 65.5917 104.713 67.6C104.373 68.222 103.883 68.7497 103.288 69.1359C102.693 69.5221 102.012 69.7548 101.305 69.813L101.279 69.813C99.2234 69.813 97.4534 76.039 96.6472 85.107C96.7139 86.1156 96.5056 87.1235 96.0449 88.0231C95.584 88.9228 94.8877 89.6806 94.03 90.2158C93.1726 90.7509 92.1858 91.0434 91.175 91.062L91.1382 91.062C90.4531 91.062 89.7891 91.744 89.1641 93.09C88.417 94.8661 87.876 96.7219 87.5508 98.621C86.4949 104.645 85.9963 110.753 86.062 116.868C86.062 119.455 86.137 122.008 86.2849 124.457L182.402 124.457L182.402 124.456Z" fill="url(#paint_linear_27)" fill-rule="nonzero" data-v-270a61e0></path><path id="路径_15694" d="M19.835 124.457L73.443 124.457C73.658 121.483 73.766 118.381 73.766 115.238C73.8614 107.793 73.137 100.36 71.606 93.074C71.1242 90.7415 70.336 88.4829 69.262 86.357C68.353 84.723 67.387 83.894 66.391 83.894L66.338 83.894C66.338 83.894 62.811 83.782 60.822 81.974C58.833 80.166 58.609 78.84 58.379 76.661C57.206 65.644 54.631 58.08 51.641 58.08C51.1191 57.9776 50.6094 57.8211 50.12 57.613C49.7584 57.4535 49.4341 57.2202 49.168 56.928C46.168 54.005 44.96 50.067 44.443 46.386C42.975 35.92 39.821 28.58 36.875 28.58C33.875 28.58 31.286 36.216 30.125 47.28C29.9618 50.2251 28.9142 53.0526 27.119 55.393C26.5429 56.1796 25.7994 56.8286 24.9423 57.2932C24.0851 57.7579 23.1355 58.0266 22.162 58.08L22.125 58.08C19.135 58.08 16.56 65.644 15.387 76.659C15.157 78.837 14.934 80.159 12.944 81.972C10.954 83.785 7.42799 83.892 7.42799 83.892L7.37499 83.892C6.37499 83.892 5.41399 84.722 4.50399 86.355C3.42977 88.4815 2.6416 90.7408 2.15999 93.074C0.629009 100.36 -0.0953491 107.793 -1.21593e-05 115.238C-1.21593e-05 118.38 0.108988 121.48 0.322988 124.457L19.835 124.457Z" fill="url(#paint_linear_28)" fill-rule="nonzero" data-v-270a61e0></path></g><path id="路径_8510" d="M177.25 132.275C177.25 128.654 141.824 119.157 98.125 119.157C54.426 119.157 19 128.657 19 132.275L177.25 132.275Z" fill="url(#paint_linear_29)" fill-rule="nonzero" data-v-270a61e0></path><g id="组_5953" data-v-270a61e0><g id="组_5944" data-v-270a61e0><g id="组_5940" data-v-270a61e0><path id="路径_8521" d="M68.8361 91.318L67.2511 90.81L71.2371 90.671L72.8221 91.179L68.8361 91.318Z" fill="url(#paint_linear_30)" fill-rule="nonzero" data-v-270a61e0></path></g><g id="组_5941" data-v-270a61e0><path id="路径_8522" d="M62.456 103.838L60.87 103.33L60.845 97.23L62.43 97.7371L62.456 103.838Z" fill="url(#paint_linear_31)" fill-rule="nonzero" data-v-270a61e0></path></g><g id="组_5942" data-v-270a61e0><path id="路径_8523" d="M62.407 91.542L60.821 91.034L60.759 76.059L62.344 76.567L62.407 91.542Z" fill="url(#paint_linear_32)" fill-rule="nonzero" data-v-270a61e0></path></g><g id="组_5943" data-v-270a61e0><path id="路径_8524" d="M50.5361 91.957L48.951 91.449L60.819 91.034L62.405 91.542L50.5361 91.957Z" fill="url(#paint_linear_33)" fill-rule="nonzero" data-v-270a61e0></path></g><path id="路径_8525" d="M68.741 68.565L67.156 68.057L58.684 68.357L41.743 90.491L41.773 97.899L43.358 98.407L43.328 90.998L60.273 68.857L68.741 68.565Z" fill="url(#paint_linear_34)" fill-rule="nonzero" data-v-270a61e0></path><path id="路径_8526" d="M68.741 68.565L68.841 91.317L72.827 91.178L72.853 97.378L68.8671 97.517L68.892 103.617L62.461 103.841L62.4361 97.741L43.364 98.407L43.334 90.999L60.276 68.861L68.741 68.565ZM62.405 91.542L62.343 76.567L50.537 91.957L62.405 91.542Z" fill="url(#paint_linear_35)" fill-rule="nonzero" data-v-270a61e0></path></g><g id="编组-20" data-v-270a61e0><circle id="椭圆形" cx="96.1559982" cy="84.3529892" r="14.6219997" fill="url(#paint_linear_36)" data-v-270a61e0></circle><g id="椭圆形-2" data-v-270a61e0><circle id="椭圆_26" cx="89.8209991" cy="79.0899811" r="1.94599998" fill="rgb(229,229,229)" data-v-270a61e0></circle><circle id="椭圆_27" cx="89.8209991" cy="79.0899811" r="1.94599998" fill="rgb(153,152,152)" data-v-270a61e0></circle></g><ellipse id="椭圆形-3" rx="2.089000" ry="1.857000" cx="90.1219864" cy="79.0149841" fill="url(#paint_linear_37)" data-v-270a61e0></ellipse><g id="椭圆形-4" data-v-270a61e0><circle id="椭圆_28" cx="92.496994" cy="92.2759857" r="1.94599998" fill="rgb(159,159,159)" data-v-270a61e0></circle><circle id="椭圆_29" cx="92.496994" cy="92.2759857" r="1.94599998" fill="rgb(159,159,159)" data-v-270a61e0></circle></g><circle id="椭圆形-5" cx="92.6749954" cy="92.0129776" r="1.85699999" fill="url(#paint_linear_38)" data-v-270a61e0></circle><circle id="椭圆形-6" cx="98.940979" cy="78.7829895" r="3.01699996" fill="rgb(226,226,226)" data-v-270a61e0></circle><circle id="椭圆形-7" cx="98.940979" cy="78.7829895" r="3.01699996" fill="url(#paint_linear_39)" data-v-270a61e0></circle><path id="路径-14" d="M85.489 93.366L110.232 80.258C110.487 81.2919 110.664 82.3435 110.761 83.404C110.804 84.2983 110.774 85.1946 110.671 86.084L86.171 94.738C86.171 94.738 85.19 93.95 85.489 93.366Z" opacity="0.699000001" fill="url(#paint_linear_40)" fill-rule="evenodd" data-v-270a61e0></path><path id="形状结合" d="M82.259 88.362L82.839 90.049C81.815 91.3463 81.5673 92.276 82.096 92.838C82.889 93.681 95.462 88.021 98.858 86.038C102.254 84.055 111.422 76.584 110.852 75.768C110.472 75.224 109.506 75.22 107.965 75.768L106.926 74.568C112.895 71.176 116.41 69.951 117.812 71.759C119.788 74.059 108.704 82.882 100.09 87.396C91.476 91.91 77.135 98.973 75.449 96.568C74.325 94.9653 76.595 92.23 82.259 88.362Z" fill="url(#paint_linear_41)" fill-rule="evenodd" data-v-270a61e0></path><path id="形状结合-2" d="M82.243 88.362L82.683 89.856C81.4163 91.284 81.045 92.279 81.569 92.841C82.357 93.684 93.869 88.41 98.243 86.041C102.617 83.672 108.806 78.688 110.493 76.566C112.18 74.444 109.231 74.931 107.693 75.474L106.649 74.236C112.587 70.844 115.823 70.249 117.133 71.782C119.099 74.082 108.033 82.882 99.461 87.397C90.889 91.912 76.634 98.973 74.957 96.568C73.839 94.9653 76.2676 92.23 82.243 88.362Z" fill="url(#paint_linear_42)" fill-rule="evenodd" data-v-270a61e0></path><path id="路径-4" d="M83.034 77.937C72.43 89.989 80.458 86.9043 107.118 68.683" stroke="rgb(220,219,219)" stroke-linecap="round" stroke-dasharray="2 4 " stroke-width="1.000000" data-v-270a61e0></path><g id="火箭" data-v-270a61e0><path id="形状" d="M111.826 64.317C111.82 64.2929 111.807 64.2709 111.79 64.2533C111.772 64.2357 111.75 64.2232 111.726 64.217C111.281 64.112 110.814 64.1403 110.385 64.2981C109.956 64.456 109.582 64.7366 109.311 65.105C109.301 65.1183 109.289 65.1298 109.276 65.139C109.262 65.1483 109.247 65.155 109.231 65.159C108.908 65.2399 108.613 65.4076 108.378 65.644C108.268 65.7542 108.172 65.8779 108.092 66.012C108.078 66.0372 108.072 66.0661 108.075 66.0947C108.078 66.1234 108.09 66.1504 108.109 66.1722C108.128 66.194 108.153 66.2095 108.181 66.2166C108.209 66.2237 108.238 66.2221 108.265 66.212C108.466 66.1392 108.678 66.1027 108.892 66.104C108.892 66.123 108.885 66.141 108.882 66.16C109.035 66.3387 109.195 66.5113 109.361 66.678C109.527 66.8447 109.7 67.0043 109.879 67.157L109.932 67.153C109.933 67.3667 109.897 67.579 109.824 67.78C109.814 67.807 109.812 67.8364 109.819 67.8643C109.827 67.8922 109.842 67.9172 109.864 67.9361C109.886 67.9549 109.913 67.9666 109.941 67.9697C109.97 67.9727 109.999 67.9669 110.024 67.953C110.158 67.8734 110.282 67.7773 110.392 67.667C110.628 67.4322 110.796 67.1372 110.877 66.814C110.881 66.798 110.888 66.7829 110.897 66.7692C110.906 66.7556 110.918 66.7437 110.931 66.734C111.026 66.6642 111.116 66.5873 111.199 66.504C111.481 66.223 111.687 65.8746 111.796 65.4919C111.906 65.1092 111.916 64.7048 111.826 64.317ZM110.871 65.834C110.805 65.9001 110.721 65.9452 110.629 65.9634C110.537 65.9816 110.442 65.9723 110.356 65.9365C110.269 65.9007 110.195 65.84 110.143 65.7623C110.091 65.6845 110.064 65.593 110.064 65.4995C110.064 65.4059 110.091 65.3145 110.143 65.2367C110.195 65.1589 110.269 65.0983 110.356 65.0625C110.442 65.0267 110.537 65.0173 110.629 65.0356C110.721 65.0538 110.805 65.0988 110.871 65.165C110.93 65.2237 110.972 65.2968 110.993 65.377C111.015 65.4573 111.015 65.5417 110.993 65.6219C110.972 65.7021 110.93 65.7753 110.871 65.834Z" fill="rgb(160,160,160)" fill-rule="nonzero" data-v-270a61e0></path><path id="路径" d="M108.488 66.876C108.334 67.03 107.679 67.986 107.866 68.176C108.053 68.366 109.008 67.708 109.166 67.554C109.214 67.4945 109.247 67.4234 109.259 67.3477C109.272 67.272 109.264 67.1943 109.238 67.1223C109.211 67.0503 109.167 66.9864 109.108 66.937C109.059 66.8774 108.995 66.8318 108.922 66.8047C108.85 66.7776 108.772 66.7699 108.696 66.7824C108.619 66.7949 108.548 66.8272 108.488 66.876Z" fill="rgb(160,160,160)" fill-rule="nonzero" data-v-270a61e0></path></g></g><g id="组_5954" data-v-270a61e0><g id="组_5940-2" data-v-270a61e0><path id="路径_8521-2" d="M141.717 91.317L140.132 90.809L144.118 90.67L145.703 91.178L141.717 91.317Z" fill="url(#paint_linear_43)" fill-rule="nonzero" data-v-270a61e0></path></g><g id="组_5941-2" data-v-270a61e0><path id="路径_8522-2" d="M135.337 103.837L133.751 103.329L133.726 97.2291L135.311 97.7361L135.337 103.837Z" fill="url(#paint_linear_44)" fill-rule="nonzero" data-v-270a61e0></path></g><g id="组_5942-2" data-v-270a61e0><path id="路径_8523-2" d="M135.288 91.541L133.702 91.033L133.64 76.058L135.225 76.566L135.288 91.541Z" fill="url(#paint_linear_45)" fill-rule="nonzero" data-v-270a61e0></path></g><g id="组_5943-2" data-v-270a61e0><path id="路径_8524-2" d="M123.417 91.956L121.832 91.448L133.7 91.033L135.286 91.541L123.417 91.956Z" fill="url(#paint_linear_46)" fill-rule="nonzero" data-v-270a61e0></path></g><path id="路径_8525-2" d="M141.622 68.564L140.037 68.056L131.565 68.356L114.624 90.49L114.654 97.898L116.239 98.406L116.209 90.997L133.154 68.856L141.622 68.564Z" fill="url(#paint_linear_47)" fill-rule="nonzero" data-v-270a61e0></path><path id="路径_8526-2" d="M141.622 68.564L141.722 91.316L145.708 91.177L145.734 97.377L141.748 97.516L141.773 103.616L135.342 103.84L135.317 97.74L116.245 98.406L116.215 90.998L133.157 68.86L141.622 68.564ZM135.286 91.541L135.224 76.566L123.418 91.956L135.286 91.541Z" fill="url(#paint_linear_48)" fill-rule="nonzero" data-v-270a61e0></path></g></g><path id="路径_16335" d="M87.6359 46.815L87.6359 46.793C86.4209 43.209 82.4689 41.527 79.1129 42.044C81.5999 40.425 85.7069 39.993 87.6359 42.476L87.6359 42.497C89.5639 40.036 93.6909 40.446 96.1589 42.065C92.8029 41.565 88.8509 43.254 87.6359 46.814L87.6359 46.815Z" fill="url(#paint_linear_49)" fill-rule="nonzero" data-v-270a61e0></path><path id="路径_16336" d="M75.86 34.064L75.86 34.053C75.6508 33.5273 75.3241 33.0564 74.9048 32.6765C74.4855 32.2966 73.9849 32.0176 73.4412 31.861C72.8975 31.7044 72.3252 31.6743 71.768 31.773C72.962 30.995 74.934 30.788 75.86 31.98L75.86 31.99C76.785 30.808 78.767 31.005 79.952 31.783C79.3951 31.6877 78.8239 31.72 78.2813 31.8775C77.7387 32.0349 77.2389 32.3134 76.8195 32.692C76.4001 33.0705 76.072 33.5393 75.86 34.063L75.86 34.064Z" fill="url(#paint_linear_50)" fill-rule="nonzero" data-v-270a61e0></path><path id="路径_16337" d="M100.511 38.15L100.511 38.143C100.366 37.7783 100.139 37.4515 99.8484 37.1879C99.5575 36.9242 99.2102 36.7306 98.8329 36.622C98.4557 36.5133 98.0586 36.4925 97.672 36.561C97.947 36.3539 98.2664 36.2138 98.6049 36.1518C98.9435 36.0897 99.2918 36.1074 99.6223 36.2034C99.9528 36.2995 100.256 36.4712 100.509 36.705L100.509 36.712C100.762 36.4793 101.066 36.3084 101.396 36.2128C101.727 36.1172 102.075 36.0996 102.413 36.1612C102.751 36.2228 103.071 36.3621 103.346 36.568C102.96 36.5019 102.564 36.5242 102.188 36.6334C101.811 36.7426 101.465 36.9357 101.174 37.1982C100.883 37.4608 100.656 37.7858 100.509 38.149L100.511 38.15Z" fill="url(#paint_linear_51)" fill-rule="nonzero" data-v-270a61e0></path><path id="路径_16338" d="M93.893 29.332L93.893 29.325C93.7479 28.9603 93.5212 28.6335 93.2304 28.3699C92.9395 28.1062 92.5921 27.9126 92.2149 27.804C91.8376 27.6953 91.4405 27.6745 91.054 27.743C91.3289 27.5359 91.6483 27.3958 91.9869 27.3338C92.3254 27.2717 92.6738 27.2894 93.0043 27.3854C93.3348 27.4815 93.6384 27.6532 93.891 27.887L93.891 27.894C94.1441 27.6613 94.4478 27.4904 94.7781 27.3948C95.1085 27.2993 95.4565 27.2816 95.7948 27.3432C96.1331 27.4048 96.4526 27.5441 96.728 27.75C96.3419 27.6839 95.9458 27.7062 95.5695 27.8154C95.1933 27.9246 94.8468 28.1177 94.556 28.3802C94.2653 28.6428 94.0379 28.9678 93.891 29.331L93.893 29.332Z" fill="url(#paint_linear_52)" fill-rule="nonzero" data-v-270a61e0></path><path id="路径_16339" d="M111.541 33.306C111.441 33.0527 111.284 32.8257 111.082 32.6425C110.881 32.4593 110.64 32.3247 110.378 32.249C110.117 32.1733 109.841 32.1586 109.573 32.206C109.764 32.0625 109.985 31.9655 110.22 31.9225C110.454 31.8795 110.696 31.8918 110.925 31.9583C111.154 32.0249 111.364 32.1439 111.539 32.306C111.714 32.1447 111.925 32.0264 112.154 31.9602C112.383 31.894 112.624 31.8817 112.858 31.9243C113.093 31.967 113.314 32.0634 113.505 32.206C113.237 32.1607 112.963 32.1767 112.702 32.2529C112.442 32.3291 112.202 32.4635 112 32.6459C111.799 32.8283 111.642 33.054 111.541 33.306Z" fill="url(#paint_linear_53)" fill-rule="nonzero" data-v-270a61e0></path></g></svg></div>',1)),createBaseVNode("div",_hoisted_3$4,[t[1]||(t[1]=createBaseVNode("h3",{class:"text-subtitleLarge font-semibold text-grey-333 mb-[8px]"},"请求云端异常",-1)),createBaseVNode("p",_hoisted_4$4,toDisplayString(unref(n)),1),createBaseVNode("div",_hoisted_5$3,[t[0]||(t[0]=createBaseVNode("div",{class:"text-small text-tertiary flex items-center"},"可能的原因:",-1)),(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(r),function(e){return openBlock(),createBlock(i,{key:e,size:"small",effect:"plain",type:"info"},{default:withCtx(function(){return[createTextVNode(toDisplayString(e),1)]}),_:2},1024)}),128))])])]),createVNode$1(a,{class:"my-[4rem]"}),createBaseVNode("div",null,[t[3]||(t[3]=createStaticVNode('<div class="flex items-center gap-[8px] mb-[16px]" data-v-270a61e0><svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20.000000" height="20.000000" fill="none" data-v-270a61e0><rect id="svg 5" width="20.000000" height="20.000000" x="0.000000" y="0.000000" data-v-270a61e0></rect><path id="矢量 1" d="M3.30267 8.05334C3.30267 8.17036 3.27187 8.28533 3.21336 8.38667C3.15484 8.48802 3.07069 8.57218 2.96934 8.63069C2.86799 8.6892 2.75303 8.72001 2.63601 8.72L1.46934 8.72C1.32855 8.72 1.19138 8.67543 1.07748 8.59268C0.963585 8.50993 0.878808 8.39324 0.835302 8.25935C0.791797 8.12545 0.791797 7.98122 0.835302 7.84733C0.878808 7.71343 0.963585 7.59674 1.07748 7.51399C1.19138 7.43124 1.32855 7.38667 1.46934 7.38667L2.63601 7.38667C2.75303 7.38667 2.86799 7.41747 2.96934 7.47599C3.07069 7.5345 3.15484 7.61866 3.21336 7.72C3.27187 7.82135 3.30267 7.93631 3.30267 8.05334ZM19.3333 8.05334C19.3333 8.17036 19.3025 8.28533 19.244 8.38667C19.1855 8.48802 19.1013 8.57218 19 8.63069C18.8987 8.6892 18.7837 8.72001 18.6667 8.72L17.5 8.72C17.3592 8.72 17.222 8.67543 17.1081 8.59268C16.9942 8.50993 16.9095 8.39324 16.866 8.25935C16.8225 8.12545 16.8225 7.98122 16.866 7.84733C16.9095 7.71343 16.9942 7.59674 17.1081 7.51399C17.222 7.43124 17.3592 7.38667 17.5 7.38667L18.6667 7.38667C18.7837 7.38667 18.8987 7.41747 19 7.47599C19.1013 7.5345 19.1855 7.61866 19.244 7.72C19.3025 7.82135 19.3333 7.93631 19.3333 8.05334ZM4.51734 1.80267L5.34267 2.62667C5.44235 2.72621 5.50796 2.85474 5.53009 2.99386C5.55223 3.13297 5.52975 3.27552 5.46589 3.40108C5.40203 3.52664 5.30005 3.62875 5.17459 3.69279C5.04912 3.75683 4.9066 3.77951 4.76746 3.75757C4.62831 3.73563 4.49968 3.67021 4.40001 3.57067L3.57334 2.744C3.47676 2.64374 3.414 2.51576 3.39385 2.37802C3.37369 2.24028 3.39716 2.09968 3.46097 1.97596C3.52477 1.85223 3.62571 1.75158 3.74961 1.68813C3.87352 1.62467 4.01418 1.6016 4.15187 1.62214C4.28955 1.64268 4.41735 1.70581 4.51734 1.80267L4.51734 1.80267ZM17.2173 1.80267C17.3001 1.88542 17.3595 1.98847 17.3898 2.10149C17.4201 2.21451 17.4201 2.3335 17.3898 2.44652C17.3595 2.55953 17.3001 2.66259 17.2173 2.74534L16.392 3.57067C16.2923 3.67021 16.1637 3.73563 16.0246 3.75757C15.8854 3.77951 15.7429 3.75683 15.6174 3.69279C15.492 3.62875 15.39 3.52664 15.3261 3.40108C15.2623 3.27552 15.2398 3.13297 15.2619 2.99386C15.2841 2.85474 15.3497 2.72621 15.4493 2.62667L16.2747 1.80267C16.3574 1.71995 16.4605 1.66046 16.5735 1.63019C16.6865 1.59991 16.8055 1.59991 16.9185 1.63019C17.0315 1.66046 17.1346 1.71995 17.2173 1.80267L17.2173 1.80267ZM11.9973 17.3547C12.1381 17.3547 12.2753 17.3992 12.3892 17.482C12.5031 17.5647 12.5879 17.6814 12.6314 17.8153C12.6749 17.9492 12.6749 18.0935 12.6314 18.2273C12.5879 18.3612 12.5031 18.4779 12.3892 18.5607C12.2753 18.6434 12.1381 18.688 11.9973 18.688L8.08401 18.688C7.94322 18.688 7.80605 18.6434 7.69215 18.5607C7.57825 18.4779 7.49347 18.3612 7.44997 18.2273C7.40646 18.0935 7.40646 17.9492 7.44997 17.8153C7.49347 17.6814 7.57825 17.5647 7.69215 17.482C7.80605 17.3992 7.94322 17.3547 8.08401 17.3547L11.9973 17.3547L11.9973 17.3547ZM10 3.43734C10.934 3.43699 11.8517 3.68192 12.6613 4.14761C13.4708 4.61331 14.1439 5.28344 14.6132 6.09096C15.0825 6.89848 15.3315 7.81507 15.3353 8.74904C15.3391 9.683 15.0975 10.6016 14.6348 11.4129C14.1721 12.2242 13.5045 12.8998 12.6987 13.372L12.6667 16.5227C12.6664 16.5518 12.6586 16.5803 12.6439 16.6054C12.6292 16.6306 12.6082 16.6514 12.583 16.6659C12.5577 16.6804 12.5291 16.688 12.5 16.688L7.51601 16.688C7.48675 16.688 7.45801 16.6803 7.43267 16.6657C7.40734 16.651 7.3863 16.63 7.37167 16.6047C7.35704 16.5793 7.34934 16.5506 7.34934 16.5213L7.34934 13.4C6.53534 12.9343 5.85852 12.2623 5.38712 11.4516C4.91573 10.6409 4.66643 9.72021 4.66436 8.78242C4.6623 7.84464 4.90754 6.92289 5.37535 6.11012C5.84317 5.29735 6.51702 4.62231 7.32896 4.15305C8.1409 3.6838 9.06222 3.43693 10 3.43734ZM10.0413 0.104004C10.1584 0.104004 10.2733 0.134808 10.3747 0.19332C10.476 0.251832 10.5602 0.335991 10.6187 0.437337C10.6772 0.538683 10.708 0.653646 10.708 0.770671L10.708 1.93734C10.708 2.07812 10.6634 2.2153 10.5807 2.32919C10.4979 2.44309 10.3812 2.52787 10.2474 2.57137C10.1135 2.61488 9.96923 2.61488 9.83533 2.57137C9.70144 2.52787 9.58475 2.44309 9.502 2.32919C9.41924 2.2153 9.37467 2.07812 9.37467 1.93734L9.37467 0.770671C9.37467 0.653646 9.40548 0.538683 9.46399 0.437337C9.5225 0.335991 9.60666 0.251832 9.70801 0.19332C9.80935 0.134808 9.92432 0.104004 10.0413 0.104004L10.0413 0.104004Z" fill="rgb(255,186,39)" fill-rule="nonzero" data-v-270a61e0></path></svg><span class="text-medium text-secondary" data-v-270a61e0>解决方案</span><span class="text-small text-tertiary" data-v-270a61e0>请按顺序逐一尝试</span></div>',1)),createBaseVNode("ol",_hoisted_6$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(o),function(e,t){return openBlock(),createElementBlock("li",{key:t,class:"mb-[8px] leading-[1.8]"},[createTextVNode(toDisplayString(t+1)+". "+toDisplayString(e.text),1),e.linkText&&e.link?(openBlock(),createElementBlock("span",{key:0,class:"bt-link ml-[4px]",onClick:function(t){var n;(n=e.link)&&(n.startsWith("http")?window.open(n,"_blank"):router.push(n))}},toDisplayString(e.linkText),9,_hoisted_7$3)):createCommentVNode("",!0)])}),128))])])])}}}),CloudError=_export_sfc(_sfc_main$4,[["__scopeId","data-v-270a61e0"]]),openBtError=function(e,t,n){useDialog({area:"120",title:!1,component:ErrorPopup,compData:{errorBody:e,errorFind:t,isBuy:n}})},openCloudError=function(e){useDialog({area:"80",title:!1,component:CloudError,compData:{errorInfo:e}})},Message$1=useMessage(),HttpRequest=function(){return _createClass(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,e),_defineProperty2(this,"instance",void 0),_defineProperty2(this,"requestTemplate",{data:{},code:0,msg:"success",status:!0,default:!0,timestamp:0});var n=createDefaultOption(t);this.instance=axios.create(n),this.handleRequestInterceptors(),this.handleResponseInterceptors()},[{key:"handleRequestInterceptors",value:function(){var e=new AxiosCanceler;this.instance.interceptors.request.use(function(t){return t.skipPending||e.addPending(t),t},function(e){return Promise.reject(e)})}},{key:"handleResponseInterceptors",value:function(){var e=new AxiosCanceler;this.instance.interceptors.response.use(function(t){return t&&e.removePending(t.config),t},function(e){return Promise.reject(e)})}},{key:"handleToken",value:function(e){var t=Date.now();return{request_time:t,request_token:md5(String(t).concat(md5(e)))}}},{key:"requestMiddleware",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",n=e.data,r=e.status,o=_objectSpread(_objectSpread(_objectSpread({},this.requestTemplate),{timestamp:(new Date).getTime(),default:!1}),{},{code:r}),i=has$2("status",n)&&has$2("msg",n);if(i&&has$2("data",n)&&(o.default=!0),"ignore"===t)return e;var a=n.msg,s=n.status,l=n.redirect;if(l)return window.location.href=l;if(isNumber$1(s)&&isUndefined(null==n?void 0:n.code)&&isObject$4(null==n?void 0:n.message)){var u="";return isUndefined(n.message.result)||(u=n.message.result),{code:200,status:s>-1,msg:u,data:n.message,default:!1,timestamp:n.timestamp}}if(isNumber$1(s)&&!isUndefined(n.msg)&&!isUndefined(n.error_msg))return{code:n.code,status:s>-1,msg:n.msg||n.error_msg,data:n.message||n,default:!1,timestamp:n.timestamp};if(["string","object","boolean","array","number","default"].includes(t)){var c=isBoolean(s);if(isObject$4(n)&&i&&"default"===t&&c){if(isString$1(a)&&!isEmpty(a)&&(o=_objectSpread(_objectSpread({},o),n)),isObject$4(a)){if(!has$2("status",a))return _objectSpread(_objectSpread({},o),{},{data:_objectSpread(_objectSpread({},a),{},{status:s})});o=_objectSpread(_objectSpread({},o),{},{data:_objectSpread(_objectSpread({},a),{},{newStatus:s})})}isString$1(a)||(o=_objectSpread(_objectSpread({},o),{},{status:!0,data:{value:a,status:s},msg:n.status?"success":"error"}))}else isString$1(a)&&(o.msg=a),isBoolean(s)&&(o.status=s),o=_objectSpread(_objectSpread({},o),{},{data:n});return o}if(i&&"msg"===t)return o=has$2("data",n)&&isObject$4(n.data)?_objectSpread(_objectSpread({},o),n):_objectSpread(_objectSpread(_objectSpread({},o),n),{data:n}),isString$1(n.msg)?o=_objectSpread(_objectSpread({},o),{},{msg:n.msg}):(has$2("status",n)&&(o.msg=n.status?"success":"error"),o=_objectSpread(_objectSpread({},o),{},{data:n.msg})),o;if(isFunction$1(t))return t(n);throw Error(n,e.request.responseURL)}},{key:"handleError",value:function(e){if(!has$2("response",e)){if(axios.isCancel(e))return Promise.reject(e);var t=e.message;return t.indexOf("Traceback")>-1?openBtError(t,!0,!1):(t.indexOf("TypeError Middle")>-1&&Message$1.msg({customClass:"panel-cloud-error",dangerouslyUseHTMLString:!0,message:"请求中间件类型验证失败,请检查请求数据类型是否正确<br />".concat(t),type:"error",duration:0,showClose:!0}),new Error(t))}var n=e.response,r=e.message,o=null==n?void 0:n.data.indexOf("We need to make sure this has a favicon so that the debugger does");if(r.indexOf("Network Error")>-1&&r.indexOf("timeout")>-1&&useMessage().error("请求超时,请稍后重试"),r.indexOf("code 500")>-1)if(n.data.indexOf("请先绑定宝塔帐号")>-1)setTimeout(function(){window.location.href="/bind"},1e3);else{if(!(n.data.indexOf("建议按顺序逐一尝试以下解决方案")>-1))return n.data.indexOf("抱歉,连接云端服务器失败")>-1?openCloudError(n.data):!!n.data&&openBtError(n.data,o,!1);var i=n.data.split("Error: ")[1].split("</pre>")[0].replace("面板运行时发生错误:","").replace("public.PanelError:","").trim();Message$1.msg({customClass:"panel-cloud-error",dangerouslyUseHTMLString:!0,message:i,type:"error",duration:0,showClose:!0})}return r.indexOf("code 404")>-1&&Message$1.error("请求错误,请稍后重试"),r.indexOf("code 401")>-1&&(window.location.href="/"),r.indexOf("Traceback")>-1?openBtError(r,!0,!1):e}},{key:"request",value:(e=_asyncToGenerator(_regenerator().m(function e(t){var n,r,o,i,a,s,l,u,c,d,p,h,f,g,m,y,v,_,x,S,b;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return n=t.url,r=t.method,o=void 0===r?"POST":r,i=t.data,a=void 0===i?{}:i,s=t.customType,l=void 0===s?"default":s,u=t.loading,c=void 0===u?"":u,d=t.check,p=void 0===d?"default":d,h=t.skipPending,f=void 0!==h&&h,g=createUrl({url:n,customType:l}),m=null,y=null,c&&(m=Message$1.load(c)),e.p=1,e.n=2,this.instance.request({url:g,method:o,data:a,transformRequest:[handleTransformRequest],skipPending:f});case 2:if(y=e.v,!(isString$1(null===(v=y)||void 0===v?void 0:v.data)&&(null===(_=y)||void 0===_||null===(_=_.data)||void 0===_?void 0:_.indexOf("密码已过期,请修改"))>-1)){e.n=3;break}return e.a(2,window.location.reload());case 3:return x=this.requestMiddleware(y,p),e.a(2,x);case 4:if(e.p=4,b=e.v,"ignore"!==p){e.n=5;break}return e.a(2,b);case 5:return e.a(2,this.handleError(b));case 6:return e.p=6,null===(S=m)||void 0===S||S.close(),e.f(6);case 7:return e.a(2)}},e,this,[[1,4,6,7]])})),function(t){return e.apply(this,arguments)})},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(isString$1(t)||isFunction$1(t))&&(t={check:t}),this.request(_objectSpread(_objectSpread({},{url:e,method:"GET"}),t))}},{key:"post",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(isString$1(t)||isFunction$1(t))&&(t={check:t}),this.request(_objectSpread(_objectSpread({},{url:e,method:"POST"}),t))}}]);var e}(),createAxios=function(){return new HttpRequest(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},useAxios=exports("u",createAxios()),_hoisted_1$3={class:"content flex items-center"},_hoisted_2$3={class:"message flex-1 ml-4 py-[.3rem] leading-[2.4rem] text-base"},_hoisted_3$3=["innerHTML"],_hoisted_4$3={key:1,class:"text text-medium leading-[2.5rem] flex !flex-wrap break-all"},_hoisted_5$2={key:0,class:"vcode flex items-center h-[4.8rem] mt-4 pl-[1.2rem] text-base"},_hoisted_6$2={class:"mx-[1rem]"},_hoisted_7$2={key:1,class:"bg-darker flex flex-col p-[12px] mt-[12px]"},_hoisted_8$1={class:"mb-[8px]"},_hoisted_9$1={class:"text-danger"},_hoisted_10={key:2,class:"flex p-[12px] mt-[8px] ml-[24px]"},_hoisted_11=["innerHTML"],_sfc_main$3=defineComponent({__name:"index",props:{compData:{default:function(){return{content:"",type:"default",isHtml:!1,icon:!0,iconColor:"warning",input:{content:""},check:{content:"",value:!1,onConfirm:function(){}}}}}},emits:["cancel","confirm","close"],setup:function(e,t){var n,r=t.expose,o=t.emit,i=useMessage(),a=e,s=o,l=ref((null===(n=a.compData.check)||void 0===n?void 0:n.value)||!1),u=reactive({num1:0,num2:0,gentle:void 0}),c=ref(""),d=computed(function(){return isBoolean(a.compData.icon)&&a.compData.icon?"warning":a.compData.icon}),p=computed(function(){return"calc"===a.compData.type}),h=computed(function(){return"input"===a.compData.type}),f=computed(function(){return"check"===a.compData.type}),g=function(){var e=setTimeout(function(){m(),clearTimeout(e)},0)},m=function(){try{if(p.value&&function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return u.gentle===u.num1+u.num2?(e&&s("cancel"),!1):(i.error("计算错误,请重新计算!"),!0)}(!1))return;if(h.value&&function(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return c.value===(null===(e=a.compData)||void 0===e||null===(e=e.input)||void 0===e?void 0:e.content)?(t&&s("cancel"),!1):(i.error("输入错误,请重新输入!"),!0)}(!1))return;var e,t;if(f.value)null===(e=a.compData.check)||void 0===e||null===(t=e.onConfirm)||void 0===t||t.call(e,l.value);return!0}catch(n){}};return onMounted(function(){c.value="",p.value&&(u.num1=Math.round(9*Math.random()+1),u.num2=Math.round(9*Math.random()+1),u.gentle=void 0)}),r({onConfirm:m}),function(t,n){var r,o=ElInputNumber,i=ElInput,a=ElCheckbox,s=resolveDirective("focus");return openBlock(),createElementBlock("div",{class:normalizeClass(["confirm-".concat(e.compData.type),"text-de relative p-2rem"])},[createBaseVNode("div",_hoisted_1$3,[withDirectives(createBaseVNode("i",{class:normalizeClass("svgtofont-el-".concat("warning"===unref(d)?unref(d)+"-filled":unref(d)," !text-titleLarge text-").concat(e.compData.iconColor)),style:normalizeStyle$1("warning"!==e.compData.iconColor?"color:".concat(e.compData.iconColor):"")},null,6),[[vShow,e.compData.icon]]),renderSlot(t.$slots,"default",{},function(){return[createBaseVNode("div",_hoisted_2$3,[e.compData.isHtml?(openBlock(),createElementBlock("div",{key:0,class:"text",innerHTML:e.compData.content},null,8,_hoisted_3$3)):(openBlock(),createElementBlock("div",_hoisted_4$3,[unref(isString$1)(e.compData.content)?(openBlock(),createElementBlock(Fragment,{key:0},[createTextVNode(toDisplayString(e.compData.content),1)],64)):(openBlock(),createBlock(resolveDynamicComponent(e.compData.content),{key:1}))]))])]},!0)]),unref(p)?(openBlock(),createElementBlock("div",_hoisted_5$2,[n[4]||(n[4]=createBaseVNode("span",null,"计算结果:",-1)),createBaseVNode("span",_hoisted_6$2,toDisplayString(unref(u).num1)+" + "+toDisplayString(unref(u).num2),1),n[5]||(n[5]=createBaseVNode("span",{class:"mr-[1rem]"},"=",-1)),withDirectives(createVNode$1(o,{modelValue:unref(u).gentle,"onUpdate:modelValue":n[0]||(n[0]=function(e){return unref(u).gentle=e}),autofocus:"true","controls-position":"right",size:"small",onKeydown:withKeys(g,["native","enter"])},null,8,["modelValue"]),[[s]])])):createCommentVNode("",!0),unref(h)?(openBlock(),createElementBlock("div",_hoisted_7$2,[createBaseVNode("p",_hoisted_8$1,[n[6]||(n[6]=createTextVNode(" 请手动输入 ",-1)),createBaseVNode("span",_hoisted_9$1,'"'+toDisplayString(null===(r=e.compData.input)||void 0===r?void 0:r.content)+'"',1),n[7]||(n[7]=createTextVNode(" ,完成验证 ",-1))]),withDirectives(createVNode$1(i,{modelValue:unref(c),"onUpdate:modelValue":n[1]||(n[1]=function(e){return isRef(c)?c.value=e:null}),size:"small",onKeydown:withKeys(g,["native","enter"]),onPasteCapture:n[2]||(n[2]=withModifiers(function(){},["prevent"]))},null,8,["modelValue"]),[[s]])])):createCommentVNode("",!0),unref(f)?(openBlock(),createElementBlock("div",_hoisted_10,[createVNode$1(a,{modelValue:unref(l),"onUpdate:modelValue":n[3]||(n[3]=function(e){return isRef(l)?l.value=e:null})},{default:withCtx(function(){var t;return[createBaseVNode("span",{innerHTML:null===(t=e.compData.check)||void 0===t?void 0:t.content},null,8,_hoisted_11)]}),_:1},8,["modelValue"])])):createCommentVNode("",!0)],2)}}}),confirmApp=_export_sfc(_sfc_main$3,[["__scopeId","data-v-a60fbeb1"]]),useConfirm=exports("w",function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var n,r,o,i,a,s,l,u,c,d,p,h,f;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(n=_objectSpread(_objectSpread({},{title:"提示",type:"default",width:"38rem",content:"",isHtml:!1,cancelText:"取消",confirmText:"确定",icon:!0,iconColor:"warning",input:{content:""},check:{content:"",value:!1,onConfirm:void 0}}),t),r=n.title,o=n.type,i=n.icon,a=n.iconColor,s=n.input,l=n.check,u=n.isHtml,c=n.content,d=n.width,p=n.confirmText,h=n.cancelText,f=n.showClose,""!==c){e.n=1;break}throw new Error("弹窗内容不能为空");case 1:if("input"!==o||""!==(null==s?void 0:s.content)&&null!=s&&s.content){e.n=2;break}throw new Error("输入文字验证值不能为空");case 2:if("check"!==o){e.n=4;break}if(""!==(null==l?void 0:l.content)&&null!=l&&l.content){e.n=3;break}throw new Error("复选框文字验证值不能为空");case 3:if(null!=l&&l.onConfirm){e.n=4;break}throw new Error("复选框事件验证值不能为空");case 4:return e.a(2,new Promise(function(e,n){var g=useDialog({title:r,area:d,component:confirmApp,showClose:f,cancelText:h,confirmText:p,showFooter:!0,compData:{content:c,isHtml:u,type:o,icon:i,iconColor:a,input:s,check:l},onConfirm:function(){t.onConfirm?e(t.onConfirm(g)):e(!0)},onCancel:function(){t.onCancel&&t.onCancel(g),n("cancel")}})}))}},e)}));return function(t){return e.apply(this,arguments)}}()),useHandleError=exports("cY",function(e,t){}),Message=useMessage(),DataHandle=function(){return _createClass(function e(t,n){var r=this;_classCallCheck(this,e),_defineProperty2(this,"data",{}),_defineProperty2(this,"newData",{}),_defineProperty2(this,"name","DataHandle"),_defineProperty2(this,"_asyncPromiseData",function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var n,o=arguments;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:n=o.length>1&&void 0!==o[1]?o[1]:{},has$2("data",t)&&has$2("code",t)?r.data=t.data:r.data=t,r.newData={},isEmpty$1(n)||r._dataVerify(n);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),_defineProperty2(this,"_findAndAddProperty",function(e,t,n,o){try{for(var i=e,a=0;a<t.length;a++){var s=t[a];if(!has$2(s,i))throw new Error("".concat(t.join("."),"字段中不存在").concat(s));if(a===t.length-1){if(!is(n,i[s]))throw new Error("".concat(t.join("."),"数据类型错误:").concat(s," 期望类型为:").concat(n));return r._dataModify(t.join("."),o,i[s])}i=i[s]}}catch(l){r._dataErrorHandle(l)}}),_defineProperty2(this,"_dataModify",function(e,t,n){var o=isFunction$1(t)?t(n):n;isRef(t)&&(t.value=n),isReactive(t)&&(t[e]=n),isString$1(t)?r.newData[t]=n:isObject$4(o)?r.newData=_objectSpread(_objectSpread({},r.newData),o):r.newData[e]=o}),_defineProperty2(this,"dataType",function(e){switch(e){case Array:return[];case Boolean:return!1;case Object:return{};case String:return"";case Number:return 0;default:return null}}),_defineProperty2(this,"_dataErrorHandle",function(e){useHandleError(e,r.name)}),_defineProperty2(this,"_dataVerify",function(e){try{if(isEmpty$1(r.data))throw new Error("传入数据为空或undefined");Object.entries(e).forEach(function(e){var t=_slicedToArray(e,2),n=t[0],o=t[1],i=_slicedToArray(isArray$2(o)?o:[o,null],2),a=i[0],s=i[1],l=n.split(".");if(l.length>1)return r._findAndAddProperty(r.data,l,a,s);if(has$2(n,r.data)){var u=r.data[n];if(isFunction$1(a)&&isNil(r.dataType(a))){var c=a;return void r._dataModify(n,s,c(u))}if(!is(a,u))throw r._dataModify(n,s,r.dataType(a)),new Error("数据类型错误:".concat(n," 期望类型为:").concat(a));r._dataModify(n,s,u)}else r._dataModify(n,s,r.dataType(a))})}catch(t){r._dataErrorHandle(t)}}),_defineProperty2(this,"exportData",function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=r.newData;return r.destroy(),e?t:t.data}),_defineProperty2(this,"destroy",function(){r.data={},r.newData={}}),this._asyncPromiseData(t,n)},[{key:"capitalizeFirstLetter",value:function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):e}}])}();exports("cI",DataHandle);var useDataHandle=exports("k",function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var n,r,o,i,a,s,l;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!isNil(t.request)){e.n=1;break}return Message.error("请求挂载参数不能为空:request 为空"),e.a(2,{});case 1:return n=shallowRef(!0),r={},o=t.loading,t.message&&isNil(t.data)&&(t.data={status:[Boolean,"status"],msg:[String,"msg"]}),isNil(t.data)&&(n.value=!1),isString$1(t.loading)&&(o=Message.load(o)),e.p=2,isRef(o)&&(o.value=!0),e.n=3,t.request;case 3:return i=e.v,a=i.data,has$2("code",i)&&has$2("status",i)||!isObject$4(i)||(a=i),(s=isObject$4(a))?isObject$4(t.data)||n.value||isNil(t.data)?a=i:Message.error("数据验证格式错误,必须为 Record<string, KeyArray> 对象"):(a={data:a},isObject$4(t.data)?Message.error("当前请求返回值为非对象类型,请直接使用 data:[KeyArray] 进行数据验证"):t.data={data:t.data}),r=n.value?new DataHandle(a,t.data).exportData(s):a,has$2("status",a)&&has$2("msg",a)&&!a.status&&!n.value&&Message.error(a.msg),t.message&&Message.request(a),t.success&&t.success(r),e.a(2,Promise.resolve(r));case 4:return e.p=4,l=e.v,useHandleError(l,JSON.stringify(t)),t.error&&t.error(l),e.a(2,Promise.reject(l));case 5:return e.p=5,isRef(o)?o.value=!1:isObject$4(o)&&o.close(),e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}));return function(t){return e.apply(this,arguments)}}()),useDataPage=exports("c4",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return[String,function(t){var n=getPageTotal(t);return isRef(e)?(e.value=n,{total:e.value}):isReactive(e)&&!isNil(e)?(e.total=n,{total:e.total}):isNil(e)?{total:n}:Message.error("分页数据处理错误,请检查数据类型")}]}),showLoading=function(e){null==e||e.classList.add("custom-loading--show")},hideLoading=function(e){null==e||e.classList.remove("custom-loading--show")},mountDirective=exports("jh",function(e){e.directive("focus",{mounted:function(e,t){(void 0===t.value||t.value)&&nextTick(function(){inputFocus(e)})}}),e.directive("scroll-bottom",{beforeUpdate:function(e,t){("boolean"!=typeof t.value||t.value)&&nextTick(function(){var t=e.scrollHeight,n=e.clientHeight;e.scrollTop=t+n})}}),e.directive("trim",{mounted:function(e){e.addEventListener("change",function(e){e.target.value=e.target.value.trim()})}});var t=function(e){return!(!isUndefined(e.oldValue)&&e.oldValue===e.value)},n=function(e,n){var r,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return!1;if(!t(n)&&!o)return!1;if(n.arg)switch(n.arg){case"title":var i=e.querySelector(".custom-loading__title");null==i||i.classList.remove("hidden"),i&&(i.innerHTML=n.value);break;case"type":null===(r=e.querySelector(".custom-loading__content"))||void 0===r||r.classList.add(n.value);break;case"size":e&&e.classList.add(n.value)}else isBoolean(n.value)&&n.value?showLoading(e):hideLoading(e)};e.directive("bt-loading",{created:function(e,t){if(!e)return!1;if(e.dataset.id){var r=e.querySelector('.custom-loading[data-id="'.concat(e.dataset.id,'"]'));return n(r,t,!0),!1}var o=getRandom(8);e.dataset.id=o,function(e,t,r){var o=document.createElement("div");o.className="custom-loading",o.dataset.id=r,o.innerHTML='<div class="custom-loading__mask"></div>\t\t\t<div class="custom-loading__content">\t\t\t\t<div class="custom-loading__icon">\n\t\t\t\t\t<svg aria-hidden="true"><use href="#icon-tools-logo"></use></svg>\n\t\t\t\t</div>\t\t\t\t<div class="custom-loading__title hidden"></div>\t\t\t</div>',e.setAttribute("style","position: relative!important;"),e.appendChild(o),n(o,t,!0)}(e,t,o)},updated:function(e,r){if(!e)return!1;if(!e.dataset.id)return!1;if(!t(r))return!1;var o=e.dataset.id,i=e.querySelector('.custom-loading[data-id="'.concat(o,'"]'));n(i,r)}}),e.directive("scroll-shadow",{updated:function(e){nextTick(function(){e.scrollHeight>e.clientHeight&&e.setAttribute("data-scroll-bottom","true")}),e.setAttribute("data-scroll-top","false"),e.setAttribute("data-scroll-bottom","false"),e.getAttribute("data-scroll")||(e.setAttribute("data-scroll","true"),e.addEventListener("scroll",function(){e.scrollTop>0?(e.dataset.scrollTop="true",e.dataset.scrollBottom="true"):0===e.scrollTop&&(e.dataset.scrollTop="false",e.dataset.scrollBottom="true"),e.scrollTop+e.clientHeight===e.scrollHeight&&(e.dataset.scrollBottom="false")}))}}),e.directive("table-scroll-load",{mounted:function(e,t){var n=e.querySelector(".el-table__body-wrapper");n.addEventListener("scroll",function(){n.scrollHeight-n.scrollTop-n.clientHeight<=0&&t.value()})}});var r=function(e){return e instanceof HTMLInputElement?e:e.querySelector("input")};e.directive("input-select",{mounted:function(e,t){("boolean"!=typeof t.value||t.value)&&setTimeout(function(){var t;null===(t=r(e))||void 0===t||t.select()},500)}}),e.directive("load-more",{mounted:function(e,t,n){var r=function(e,t){var n=null;return function(){var r=this;n&&clearTimeout(n),n=null;var o=arguments;n=setTimeout(function(){e.apply(r,o)},t)}};if(t.modifiers.expand){var o=t.value,i=o.target,a=o.distance,s=void 0===a?0:a,l=o.func,u=o.delay,c=void 0===u?200:u;if("string"!=typeof i)return;var d=e.querySelector(i);if(!d)return;t.handler=r(function(){var t=d.scrollTop,r=d.scrollHeight,o=d.clientHeight,i=e.getAttribute("load-more-disabled");if(i=n[i]||i,r<=t+o+s){if(i)return;l&&l(),d.scrollTop=t}},c),d.addEventListener("scroll",t.handler)}else t.handler=r(function(){var n=e.scrollTop;e.scrollHeight===n+e.clientHeight&&t.value&&t.value()},200),e.addEventListener("scroll",t.handler)},updated:function(e,t){if("expand"===t.arg){var n=t.value.target;if("string"!=typeof n)return;var r=e.querySelector(n);r&&r.removeEventListener("scroll",t.handler),r=null}else e.removeEventListener("scroll",t.handler),e=null}}),e.directive("popup-drag",{mounted:function(e){var t=e.querySelector(".el-dialog__header"),n=e.querySelector(".el-dialog"),r=n;t.style.cssText+=";cursor:move;",n.className.includes("el-custom-class")&&(r=e,e.style.cssText="position: fixed; ".concat(n.style.cssText," ; bottom: null;"),e.className="el-dialog__container",setTimeout(function(){nextTick(function(){var t=document.documentElement.clientWidth,n=document.documentElement.clientHeight,r=(t-e.offsetWidth)/2,o=(n-e.offsetHeight)/2;e.style.left="".concat(r,"px"),e.style.top="".concat(o,"px")})},0));var o,i=(o=getBody(),hasOwnProperty(o,"currentStyle")?function(e,t){return o.currentStyle[t]}:function(e,t){return getComputedStyle(e,null)[t]});t.onmousedown=function(e){if(!n.className.includes("is-fullscreen")){var o=e.clientX-t.offsetLeft,a=e.clientY-t.offsetTop,s=document.body.clientWidth,l=document.documentElement.clientHeight,u=r.offsetWidth,c=r.offsetHeight,d=r.offsetLeft,p=s-r.offsetLeft-u-20,h=r.offsetTop-15,f=l-r.offsetTop-c,g=i(r,"left");"auto"===g&&(g="0px");var m=i(r,"top");return g.includes("%")?(g=+document.body.clientWidth*(+g.replace(/%/g,"")/100),m=+document.body.clientHeight*(+m.replace(/%/g,"")/100)):(g=+g.replace(/px/g,""),m=+m.replace(/px/g,"")),document.onmousemove=function(e){var t=e.clientX-o,n=e.clientY-a;-t>d?t=-d:t>p&&(t=p),-n>h?n=-h:n>f&&(n=f),r.style.cssText+=";left:".concat(t+g,"px;top:").concat(n+m,"px;")},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null},!1}}}}),e.directive("blur-check",{mounted:function(e,t){var n=r(e);if(n){var o=!1;t.handleMouseDown=function(e){o=!0,n.setAttribute("data-clicked-outside","true")},t.handleBlur=function(e){o&&"true"===n.getAttribute("data-clicked-outside")&&(t.value(e),n.removeAttribute("data-clicked-outside")),o=!1},document.removeEventListener("mousedown",t.handleMouseDown),document.addEventListener("mousedown",t.handleMouseDown),n.removeEventListener("blur",t.handleBlur,!0),n.addEventListener("blur",t.handleBlur,!0)}},unmounted:function(e,t){var n=r(e);n&&(document.removeEventListener("mousedown",t.handleMouseDown),n.removeEventListener("blur",t.handleBlur,!0))}})}),cacheData=function(){var e=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e){var n=t.split("\n")[0].trim(),r=md5(n);setTimeout(function(){return localStorage.removeItem("ERROR-CACHE")},1e4);var o=JSON.parse(localStorage.getItem("ERROR-CACHE")||"[]");o.includes(r)?e({status:!0,uniqueVal:r}):(o.push(r),localStorage.setItem("ERROR-CACHE",JSON.stringify(o)),e(!1))}))},e)}));return function(t){return e.apply(this,arguments)}}(),errorHandler=function(e,t,n){nextTick(_asyncToGenerator(_regenerator().m(function r(){var o,i,a,s,l;return _regenerator().w(function(r){for(;;)switch(r.n){case 0:return i=window.location.pathname,a=e.stack||e.message||e,r.n=1,cacheData(String(a));case 1:if(s=r.v,l=(null==t||null===(o=t.$.vnode.type)||void 0===o?void 0:o.__file)||"未知组件",!s){r.n=2;break}return r.a(2);case 2:return r.n=3,useAxios.post("config/err_collection",{data:{errinfo:"组件:".concat(l," \n发生错误:").concat(a," \n所在生命周期:").concat(n),uri:i}});case 3:return r.a(2)}},r)})))},onerror=function(){var e=_asyncToGenerator(_regenerator().m(function e(t,n,r,o){var i;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return i=window.location.pathname,e.n=1,useAxios.post("config/err_collection",{data:{errinfo:"错误文件:".concat(n,"\n错误位置: ").concat(r,":").concat(o,"\n错误原因:").concat(t),uri:i}});case 1:return e.a(2)}},e)}));return function(t,n,r,o){return e.apply(this,arguments)}}(),mountErrorHandler=exports("ji",function(e){Number(window.vite_public_error)&&(e.config.errorHandler=errorHandler,window.onerror=onerror)}),_hoisted_1$2={id:"dialogBox",class:"relative"},_hoisted_2$2=["innerHTML"],_hoisted_3$2={key:0,class:"p-8 flex justify-center items-center"},_hoisted_4$2={class:"text-subtitleLarge flex !flex-wrap"},_hoisted_5$1={class:"flex items-center justify-between flex-row-reverse"},_hoisted_6$1={key:0,id:"dialogMinimize",ref:"dialogMinimize",class:"dialog-minimize fixed bg-white flex items-center p-[1rem] justify-between z-9999 w-[19.4rem]",style:"bottom:0px;left:".concat(200,"px")},_hoisted_7$1={class:"lefts"},_hoisted_8={class:"w-[10rem] truncate inline-block"},_hoisted_9={class:"centers flex items-center"},_sfc_main$2=defineComponent({__name:"index",props:mergeModels({title:{type:[String,Boolean],default:""},customClass:{default:""},area:{default:function(){return["auto","auto"]}},confirmText:{default:"确定"},cancelText:{default:"取消"},component:{type:Boolean,default:!1},compData:{default:function(){return{}}},showFooter:{type:Boolean,default:!1},contentText:{default:""},confirmBtnType:{},showClose:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},isFullScreen:{type:Boolean,default:!1},closeBtn:{default:1},disabledEsc:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!0},onCancel:{},onConfirm:{}},{modelValue:{default:!1,type:Boolean},modelModifiers:{}}),emits:mergeModels(["open","close","cancel","confirm","resize","refresh"],["update:modelValue"]),setup:function(e,t){var n=t.expose,r=t.emit,o=e,i=r,a=useGlobalStore().mainHeight,s=useModel(e,"modelValue"),l=!!useSlots().header,u=ref(!1),c=useTemplateRef("dialogContentRef"),d=computed(function(){var e;return null===(e=c.value)||void 0===e?void 0:e.closest(".el-dialog")}),p=ref(),h=ref(o.area),f=ref(o.closeBtn),g=ref(!1),m=ref(!0),y=ref(o.showFooter),v=ref(o.confirmText);watch(function(){return s.value},function(e){e&&!u.value?(u.value=!0,nextTick(function(){L(b.value.height,"rem")}),V()):u.value=!1});var _=reactive({loading:!1,loadingText:"提交中..."}),x=reactive({disabled:!1}),S=computed(function(){return o.title||""}),b=computed(function(){var e={width:"auto",height:"auto"};if(Array.isArray(h.value)){var t=_slicedToArray(h.value,2),n=t[0],r=t[1];e.width=w(n,"rem"),r&&(e.height=w(r,"rem"))}else e.width=w(h.value,"rem");return e}),T=computed(function(){return!(!isString$1(o.title)||""===o.title)}),A=computed(function(){return _.loading?_.loadingText:v.value}),w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rem",n=Number(e);return Number.isNaN(n)?"".concat(e):e+t},C=function(e){var t,n=null===(t=c.value)||void 0===t?void 0:t.closest(".el-dialog");return n?n.querySelectorAll(e)[0]:document.createElement("div")},E=function(){s.value=!1,i("cancel",E)},M=function(){i("close")},I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"加载中...";return e.value=!0,_.loading=e.value,_.loadingText=t,{close:function(){_.loading=!1}}},P=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n,r,o;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(!(n=null===(t=p.value)||void 0===t?void 0:t.onCancel)){e.n=2;break}return e.n=1,n(E);case 1:if(r=e.v,!isBoolean(r)||r){e.n=2;break}return e.a(2);case 2:if(o=i("cancel",E),!isBoolean(o)||o){e.n=3;break}return e.a(2);case 3:E();case 4:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),D=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n,r,a,s;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(n=null===(t=p.value)||void 0===t?void 0:t.onConfirm,r=o.onConfirm,!n&&!r){e.n=5;break}if(!n){e.n=2;break}return e.n=1,n(E);case 1:if(a=!!e.v){e.n=2;break}return e.a(2,a);case 2:if(!r){e.n=4;break}return e.n=3,r(E);case 3:if(s=e.v,isUndefined(s)||s){e.n=4;break}return e.a(2,s);case 4:e.n=6;break;case 5:i("confirm",E);case 6:E();case 7:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),k=function(){l||o.title||nextTick(function(){var e=C(".el-dialog__header");e&&(e.style.display="none")})},$=function(e){g.value=e,f.value=e?2:o.closeBtn},R=function(){s.value=!1,m.value=!0,document.querySelectorAll("#dialogMinimize,#dialogBox").forEach(function(e){return e.remove()}),P()},L=function(e,t){var n=C(".el-dialog__body");n&&(n.style.height=w(e,t))},O=function(e){Object.keys(e).forEach(function(t){x[t]=e[t]})},N=function(e){if(isBoolean(e))return!1;if(isObject$4(e)&&has$2("__name",e))return e;if(isFunction$1(e)){var t=e();return isPromise(t)?defineAsyncComponent(function(){return t}):t}return e},B=function(){s.value&&i("resize")},V=function(){var e=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:nextTick(function(){var e=d.value,t=C(".el-dialog__header"),n=C(".el-dialog__footer"),r=C(".el-dialog__body");if(e){var i=t?t.offsetHeight:0,a=n?n.offsetHeight:0;if(r&&t){var s=window.innerHeight-i-a-0;r.style.maxHeight="".concat(s,"px"),r.style.overflowX="hidden";var l=t.getBoundingClientRect();(l.top<15||window.innerHeight<l.bottom)&&l.width>0&&l.height>0?(f.value=2,r.style.overflowY="auto"):(f.value=o.closeBtn,r.style.overflowY="visible")}}});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),F=function(){var e=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:i("open"),k(),nextTick(function(){var e,t=null===(e=p.value)||void 0===e?void 0:e.onOpen;t&&t(),u.value||L(b.value.height,"rem");var n=d.value;useResizeObserver(n,function(){V()})});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),G=useThrottleFn(function(){V()},100);watch(function(){return a.value},function(e){if(o.modal){var t=b.value.height;G(),10*Number(t)>a.value?L(e/10,"rem"):L(b.value.height,"rem")}});var H=function(e){y.value=e};return provide("popupLoading",I),provide("popupClose",E),provide("fullData",g),provide("popupSetFooter",H),provide("buttonText",v),provide("confirmBtn",x),onMounted(function(){nextTick(function(){return F()})}),n({close:E,onCancel:P,onConfirm:D,loading:I,setConfirmBtn:O,showFooterFun:H}),function(t,n){var r=ElConfigProvider,i=ElButton,a=ElDialog;return openBlock(),createElementBlock("div",_hoisted_1$2,[withDirectives(createBaseVNode("div",null,[createVNode$1(a,{modelValue:s.value,"onUpdate:modelValue":n[3]||(n[3]=function(e){return s.value=e}),"destroy-on-close":"","align-center":"",center:"",draggable:"","modal-class":o.modal?"":"el-custom-class m-auto w-max h-max "+(unref(g)?"full-screen":""),class:normalizeClass("bt-dialog rounded-base "+o.customClass+(unref(T)?"is-title":"")),width:unref(b).width,"show-close":!1,"close-on-click-modal":!1,"close-on-press-escape":e.disabledEsc,modal:o.modal,fullscreen:unref(g),"append-to-body":o.appendToBody,onClosed:M},createSlots({default:withCtx(function(){return[e.isFullScreen?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(["absolute top-0 z-999 flex items-center",unref(g)||2==unref(f)?"right-[4.6rem]":"right-[2rem]"]),style:{gap:"8px"}},[createBaseVNode("i",{class:"svgtofont-el-semi-select icon-group",onClick:n[0]||(n[0]=function(e){return m.value=!1})}),unref(g)?createCommentVNode("",!0):(openBlock(),createElementBlock("i",{key:0,class:"svgtofont-el-fullscreen-expand icon-group",onClick:n[1]||(n[1]=function(e){return $(!0)})})),unref(g)?(openBlock(),createElementBlock("i",{key:1,class:"svgtofont-el-fullscreen-shrink icon-group",onClick:n[2]||(n[2]=function(e){return $(!1)})})):createCommentVNode("",!0)],2)):createCommentVNode("",!0),e.showClose&&1==unref(f)?(openBlock(),createElementBlock("div",{key:1,class:"absolute z-999 right-[1.4rem] top-[1rem] h-[2.4rem] w-[2.4rem] cursor-pointer p-[3px] rounded-base hover:bg-darker dark:bg-[#333]",onClick:P},_toConsumableArray(n[5]||(n[5]=[createBaseVNode("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[createBaseVNode("g",{stroke:"none","stroke-width":"2",fill:"none","fill-rule":"evenodd"},[createBaseVNode("g",{fill:"currentColor","fill-rule":"nonzero"},[createBaseVNode("path",{d:"M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"})])])],-1)])))):createCommentVNode("",!0),e.showClose&&2==unref(f)?(openBlock(),createElementBlock("div",{key:2,class:"absolute right-[1.4rem] top-[1rem] z-999 h-[2.4rem] w-[2.4rem] rounded-base cursor-pointer hover:bg-darker flex justify-center items-center",onClick:P},_toConsumableArray(n[6]||(n[6]=[createBaseVNode("i",{class:"!text-3xl svgtofont-el-close icon-group"},null,-1)])))):createCommentVNode("",!0),createBaseVNode("div",{class:"h-[inherit]",ref_key:"dialogContentRef",ref:c},[e.component?(openBlock(),createBlock(r,{key:0,locale:unref(zhCn)},{default:withCtx(function(){return[(openBlock(),createBlock(resolveDynamicComponent(N(e.component)),{ref_key:"compRef",ref:p,"comp-data":e.compData,class:"!h-[inherit]",onResize:B,onOpen:F,onClose:E,onConfirm:D,onSetConfirmBtn:O},null,40,["comp-data"]))]}),_:1},8,["locale"])):renderSlot(t.$slots,"default",{key:1},function(){return[e.contentText?(openBlock(),createElementBlock("div",_hoisted_3$2,[n[7]||(n[7]=createBaseVNode("i",{class:"svgtofont-el-warning-filled ml-[0.4rem] mr-[1.2rem] text-titleLarge text-warning"},null,-1)),createBaseVNode("span",_hoisted_4$2,toDisplayString(o.contentText),1)])):createCommentVNode("",!0)]},!0)],512)]}),_:2},[unref(T)?{name:"header",fn:withCtx(function(){return[l?renderSlot(t.$slots,"header",{key:0},void 0,!0):(openBlock(),createElementBlock("span",{key:1,class:"text-base leading-[1.8rem] text-grey-333 truncate",innerHTML:unref(S)},null,8,_hoisted_2$2))]}),key:"0"}:void 0,unref(y)?{name:"footer",fn:withCtx(function(){return[createBaseVNode("div",_hoisted_5$1,[createBaseVNode("div",null,[e.cancelText.trim()?(openBlock(),createBlock(i,{key:0,type:"info",disabled:unref(_).loading,onClick:P},{default:withCtx(function(){return[createTextVNode(toDisplayString(e.cancelText),1)]}),_:1},8,["disabled"])):createCommentVNode("",!0),e.confirmBtnType?createCommentVNode("",!0):(openBlock(),createBlock(i,{key:1,type:"primary",disabled:unref(x).disabled||unref(_).loading,loading:unref(_).loading,onClick:D},{default:withCtx(function(){return[createTextVNode(toDisplayString(unref(A)),1)]}),_:1},8,["disabled","loading"])),e.confirmBtnType?(openBlock(),createBlock(i,{key:2,type:"danger"===e.confirmBtnType?"danger":e.confirmBtnType,class:normalizeClass("danger"===e.confirmBtnType?"danger-button":""),onClick:D},{default:withCtx(function(){return[createTextVNode(toDisplayString(unref(v)||"下一步"),1)]}),_:1},8,["type","class"])):createCommentVNode("",!0)])])]}),key:"1"}:void 0]),1032,["modelValue","modal-class","class","width","close-on-press-escape","modal","fullscreen","append-to-body"])],512),[[vShow,unref(m)]]),unref(m)?createCommentVNode("",!0):(openBlock(),createElementBlock("div",_hoisted_6$1,[createBaseVNode("div",_hoisted_7$1,[createBaseVNode("span",_hoisted_8,toDisplayString(unref(S)),1)]),createBaseVNode("div",_hoisted_9,[createBaseVNode("i",{class:"svgtofont-el-fullscreen-expand cursor-pointer text-subtitleLarge mr-[5px]",onClick:n[4]||(n[4]=function(e){return m.value=!0})}),createBaseVNode("div",{class:"rights",onClick:R},_toConsumableArray(n[8]||(n[8]=[createBaseVNode("i",{class:"svgtofont-el-close cursor-pointer text-subtitleLarge"},null,-1)])))])],512))])}}}),__unplugin_components_5$2=exports("K",_export_sfc(_sfc_main$2,[["__scopeId","data-v-a2e15a5e"]])),dialogInstanceList={},useDialog=exports("e",function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var n,r,o,i,a,s,l,u,c,d;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(n=document.createElement("div"),!isFunction$1(t.component)){e.n=3;break}if(r=t.component(),!isPromise(r)){e.n=2;break}return e.n=1,t.component();case 1:t.component=e.v.default,e.n=3;break;case 2:r.default?t.component=r.default:t.component=r;case 3:return o=Object.prototype.toString.call(t.btn).slice(8,-1).toLowerCase(),isUndefined(o)||"undefined"===o||(a="确认",s="取消",isString$1(o)&&!isBoolean(t.btn)&&(a=t.btn),isArray$2(t.btn)&&(l=t.btn,u=l[0],c=l[1],a=u,s=c),t.showFooter=null===(i=t.showFooter)||void 0===i||i,t.confirmText=a,t.cancelText=s,delete t.btn),d=createApp(__unplugin_components_5$2,_objectSpread(_objectSpread({},t),{},{modelValue:!0,onCancel:function(){t.onCancel&&t.onCancel(d),t.close&&t.close(),d.unmount(),document.body.removeChild(n)},onConfirm:function(){var e=_asyncToGenerator(_regenerator().m(function e(){var r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(!t.onConfirm){e.n=2;break}return e.n=1,t.onConfirm(d);case 1:return(r=e.v)&&(d.unmount(),n&&document.body.removeChild(n)),e.a(2,r);case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}()})),!1===t.autoClose&&(d.config.globalProperties.autoClose=!1),d.config.globalProperties.close=function(){t.onCancel&&t.onCancel(d),t.close&&t.close(),d.unmount(),n&&document.body.contains(n)&&document.body.removeChild(n)},mountDirective(d),mountErrorHandler(d),d.directive("loading",ElLoading.directive),document.body.appendChild(n),d.mount(n),t.onOpen&&t.onOpen(d),dialogInstanceList[function(){return"dialog_".concat(Math.random().toString(36).substr(2,9))}()]=d,e.a(2,d)}},e)}));return function(t){return e.apply(this,arguments)}}()),closeAllDialog=exports("eP",function(){forEachObjIndexed(function(e){is(Function,null==e?void 0:e.config.globalProperties.close)&&!1!==(null==e?void 0:e.config.globalProperties.autoClose)&&(null==e||e.config.globalProperties.close())},dialogInstanceList)}),_extendStatics2=function(e,t){return _extendStatics2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},_extendStatics2(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}_extendStatics2(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Browser=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},Env=function(){this.browser=new Browser,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="undefined"!=typeof window},env=exports("bI",new Env);function detect(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),o=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),i=e.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]),o&&(n.ie=!0,n.version=o[1]),i&&(n.edge=!0,n.version=i[1],n.newEdge=+i[1].split(".")[0]>18),a&&(n.weChat=!0),t.svgSupported="undefined"!=typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!=typeof document;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}"object"===("undefined"==typeof wx?"undefined":_typeof2(wx))&&"function"==typeof wx.getSystemInfoSync?(env.wxa=!0,env.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?env.worker=!0:!env.hasGlobalWindow||"Deno"in window?(env.node=!0,env.svgSupported=!0):detect(navigator.userAgent,env);var DEFAULT_FONT_SIZE=12,DEFAULT_FONT_FAMILY="sans-serif",DEFAULT_FONT=DEFAULT_FONT_SIZE+"px "+DEFAULT_FONT_FAMILY,OFFSET=20,SCALE=100,defaultWidthMapStr="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function getTextWidthMap(e){var t={};if("undefined"==typeof JSON)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32),o=(e.charCodeAt(n)-OFFSET)/SCALE;t[r]=o}return t}var DEFAULT_TEXT_WIDTH_MAP=getTextWidthMap(defaultWidthMapStr),platformApi={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(e,t){if(!_ctx){var n=platformApi.createCanvas();_ctx=n&&n.getContext("2d")}if(_ctx)return _cachedFont!==t&&(_cachedFont=_ctx.font=t||DEFAULT_FONT),_ctx.measureText(e);e=e||"";var r=/((?:\d+)?\.?\d*)px/.exec(t=t||DEFAULT_FONT),o=r&&+r[1]||DEFAULT_FONT_SIZE,i=0;if(t.indexOf("mono")>=0)i=o*e.length;else for(var a=0;a<e.length;a++){var s=DEFAULT_TEXT_WIDTH_MAP[e[a]];i+=null==s?o:s*o}return{width:i}},loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}},_ctx,_cachedFont;function setPlatformAPI(e){for(var t in platformApi)e[t]&&(platformApi[t]=e[t])}var BUILTIN_OBJECT=reduce(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),TYPED_ARRAY=reduce(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),objToString=Object.prototype.toString,arrayProto=Array.prototype,nativeForEach=arrayProto.forEach,nativeFilter=arrayProto.filter,nativeSlice=arrayProto.slice,nativeMap=arrayProto.map,ctorFunction=function(){}.constructor,protoFunction=ctorFunction?ctorFunction.prototype:null,protoKey="__proto__",idStart=2311;function guid(){return idStart++}function logError(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"undefined"!=typeof console&&console.error.apply(console,e)}function clone$6(e){if(null==e||"object"!==_typeof2(e))return e;var t=e,n=objToString.call(e);if("[object Array]"===n){if(!isPrimitive(e)){t=[];for(var r=0,o=e.length;r<o;r++)t[r]=clone$6(e[r])}}else if(TYPED_ARRAY[n]){if(!isPrimitive(e)){var i=e.constructor;if(i.from)t=i.from(e);else{t=new i(e.length);for(r=0,o=e.length;r<o;r++)t[r]=e[r]}}}else if(!BUILTIN_OBJECT[n]&&!isPrimitive(e)&&!isDom(e))for(var a in t={},e)e.hasOwnProperty(a)&&a!==protoKey&&(t[a]=clone$6(e[a]));return t}function merge(e,t,n){if(!isObject$3(t)||!isObject$3(e))return n?clone$6(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==protoKey){var o=e[r],i=t[r];!isObject$3(i)||!isObject$3(o)||isArray$1(i)||isArray$1(o)||isDom(i)||isDom(o)||isBuiltInObject(i)||isBuiltInObject(o)||isPrimitive(i)||isPrimitive(o)?!n&&r in e||(e[r]=clone$6(t[r])):merge(o,i,n)}return e}function mergeAll(e,t){for(var n=e[0],r=1,o=e.length;r<o;r++)n=merge(n,e[r],t);return n}function extend$2(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==protoKey&&(e[n]=t[n]);return e}function defaults$2(e,t,n){for(var r=keys(t),o=0,i=r.length;o<i;o++){var a=r[o];(n?null!=t[a]:null==e[a])&&(e[a]=t[a])}return e}var createCanvas=platformApi.createCanvas;function indexOf(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function inherits(e,t){var n=e.prototype;function r(){}for(var o in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(o)&&(e.prototype[o]=n[o]);e.prototype.constructor=e,e.superClass=t}function mixin(e,t,n){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),o=0;o<r.length;o++){var i=r[o];"constructor"!==i&&(n?null!=t[i]:null==e[i])&&(e[i]=t[i])}else defaults$2(e,t,n)}function isArrayLike(e){return!!e&&("string"!=typeof e&&"number"==typeof e.length)}function each$f(e,t,n){if(e&&t)if(e.forEach&&e.forEach===nativeForEach)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,o=e.length;r<o;r++)t.call(n,e[r],r,e);else for(var i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function map$1(e,t,n){if(!e)return[];if(!t)return slice(e);if(e.map&&e.map===nativeMap)return e.map(t,n);for(var r=[],o=0,i=e.length;o<i;o++)r.push(t.call(n,e[o],o,e));return r}function reduce(e,t,n,r){if(e&&t){for(var o=0,i=e.length;o<i;o++)n=t.call(r,n,e[o],o,e);return n}}function filter(e,t,n){if(!e)return[];if(!t)return slice(e);if(e.filter&&e.filter===nativeFilter)return e.filter(t,n);for(var r=[],o=0,i=e.length;o<i;o++)t.call(n,e[o],o,e)&&r.push(e[o]);return r}function find$2(e,t,n){if(e&&t)for(var r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return e[r]}function keys(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function bindPolyfill(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(nativeSlice.call(arguments)))}}var bind$1=protoFunction&&isFunction(protoFunction.bind)?protoFunction.call.bind(protoFunction.bind):bindPolyfill;function curry$1(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(nativeSlice.call(arguments)))}}function isArray$1(e){return Array.isArray?Array.isArray(e):"[object Array]"===objToString.call(e)}function isFunction(e){return"function"==typeof e}function isString(e){return"string"==typeof e}function isStringSafe(e){return"[object String]"===objToString.call(e)}function isNumber(e){return"number"==typeof e}function isObject$3(e){var t=_typeof2(e);return"function"===t||!!e&&"object"===t}function isBuiltInObject(e){return!!BUILTIN_OBJECT[objToString.call(e)]}function isTypedArray(e){return!!TYPED_ARRAY[objToString.call(e)]}function isDom(e){return"object"===_typeof2(e)&&"number"==typeof e.nodeType&&"object"===_typeof2(e.ownerDocument)}function isGradientObject(e){return null!=e.colorStops}function isImagePatternObject(e){return null!=e.image}function isRegExp(e){return"[object RegExp]"===objToString.call(e)}function eqNaN(e){return e!=e}function retrieve(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(null!=e[n])return e[n]}function retrieve2(e,t){return null!=e?e:t}function retrieve3(e,t,n){return null!=e?e:null!=t?t:n}function slice(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return nativeSlice.apply(e,t)}function normalizeCssArray$1(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function assert(e,t){if(!e)throw new Error(t)}function trim$1(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var primitiveKey="__ec_primitive__";function setAsPrimitive(e){e[primitiveKey]=!0}function isPrimitive(e){return e[primitiveKey]}var MapPolyfill=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return keys(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),isNativeMapSupported="function"==typeof Map;function maybeNativeMap(){return isNativeMapSupported?new Map:new MapPolyfill}var HashMap=function(){function e(t){var n=isArray$1(t);this.data=maybeNativeMap();var r=this;function o(e,t){n?r.set(e,t):r.set(t,e)}t instanceof e?t.each(o):t&&each$f(t,o)}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return isNativeMapSupported?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function createHashMap(e){return new HashMap(e)}function concatArray(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];var o=e.length;for(r=0;r<t.length;r++)n[r+o]=t[r];return n}function createObject(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&extend$2(n,t),n}function disableUserSelect(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function hasOwn(e,t){return e.hasOwnProperty(t)}function noop(){}var RADIAN_TO_DEGREE=180/Math.PI,util$1=Object.freeze(Object.defineProperty({__proto__:null,HashMap:HashMap,RADIAN_TO_DEGREE:RADIAN_TO_DEGREE,assert:assert,bind:bind$1,clone:clone$6,concatArray:concatArray,createCanvas:createCanvas,createHashMap:createHashMap,createObject:createObject,curry:curry$1,defaults:defaults$2,disableUserSelect:disableUserSelect,each:each$f,eqNaN:eqNaN,extend:extend$2,filter:filter,find:find$2,guid:guid,hasOwn:hasOwn,indexOf:indexOf,inherits:inherits,isArray:isArray$1,isArrayLike:isArrayLike,isBuiltInObject:isBuiltInObject,isDom:isDom,isFunction:isFunction,isGradientObject:isGradientObject,isImagePatternObject:isImagePatternObject,isNumber:isNumber,isObject:isObject$3,isPrimitive:isPrimitive,isRegExp:isRegExp,isString:isString,isStringSafe:isStringSafe,isTypedArray:isTypedArray,keys:keys,logError:logError,map:map$1,merge:merge,mergeAll:mergeAll,mixin:mixin,noop:noop,normalizeCssArray:normalizeCssArray$1,reduce:reduce,retrieve:retrieve,retrieve2:retrieve2,retrieve3:retrieve3,setAsPrimitive:setAsPrimitive,slice:slice,trim:trim$1},Symbol.toStringTag,{value:"Module"}));function create$2(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function copy$1(e,t){return e[0]=t[0],e[1]=t[1],e}function clone$5(e){return[e[0],e[1]]}function set$1(e,t,n){return e[0]=t,e[1]=n,e}function add(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function scaleAndAdd$1(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function sub(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function len(e){return Math.sqrt(lenSquare(e))}exports("bo",util$1);var length=len;function lenSquare(e){return e[0]*e[0]+e[1]*e[1]}var lengthSquare=lenSquare;function mul$1(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function div(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function dot(e,t){return e[0]*t[0]+e[1]*t[1]}function scale$2(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function normalize$3(e,t){var n=len(t);return 0===n?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function distance(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var dist$1=distance;function distanceSquare(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var distSquare=distanceSquare;function negate(e,t){return e[0]=-t[0],e[1]=-t[1],e}function lerp$1(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function applyTransform$1(e,t,n){var r=t[0],o=t[1];return e[0]=n[0]*r+n[2]*o+n[4],e[1]=n[1]*r+n[3]*o+n[5],e}function min$1(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function max$1(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var vector=Object.freeze(Object.defineProperty({__proto__:null,add:add,applyTransform:applyTransform$1,clone:clone$5,copy:copy$1,create:create$2,dist:dist$1,distSquare:distSquare,distance:distance,distanceSquare:distanceSquare,div:div,dot:dot,len:len,lenSquare:lenSquare,length:length,lengthSquare:lengthSquare,lerp:lerp$1,max:max$1,min:min$1,mul:mul$1,negate:negate,normalize:normalize$3,scale:scale$2,scaleAndAdd:scaleAndAdd$1,set:set$1,sub:sub},Symbol.toStringTag,{value:"Module"}));exports("bn",vector);var Param=function(e,t){this.target=e,this.topTarget=t&&t.topTarget},Draggable=function(){function e(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Param(t,e),"dragstart",e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,o=n-this._x,i=r-this._y;this._x=n,this._y=r,t.drift(o,i,e),this.handler.dispatchToElement(new Param(t,e),"drag",e.event);var a=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=a,t!==a&&(s&&a!==s&&this.handler.dispatchToElement(new Param(s,e),"dragleave",e.event),a&&a!==s&&this.handler.dispatchToElement(new Param(a,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Param(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Param(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}(),Eventful=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||(this._$handlers={});var o=this._$handlers;if("function"==typeof t&&(r=n,n=t,t=null),!n||!e)return this;var i=this._$eventProcessor;null!=t&&i&&i.normalizeQuery&&(t=i.normalizeQuery(t)),o[e]||(o[e]=[]);for(var a=0;a<o[e].length;a++)if(o[e][a].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},l=o[e].length-1,u=o[e][l];return u&&u.callAtLast?o[e].splice(l,0,s):o[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],o=0,i=n[e].length;o<i;o++)n[e][o].h!==t&&r.push(n[e][o]);n[e]=r}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],o=this._$eventProcessor;if(r)for(var i=t.length,a=r.length,s=0;s<a;s++){var l=r[s];if(!o||!o.filter||null==l.query||o.filter(e,l.query))switch(i){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,t[0]);break;case 2:l.h.call(l.ctx,t[0],t[1]);break;default:l.h.apply(l.ctx,t)}}return o&&o.afterTrigger&&o.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],o=this._$eventProcessor;if(r)for(var i=t.length,a=t[i-1],s=r.length,l=0;l<s;l++){var u=r[l];if(!o||!o.filter||null==u.query||o.filter(e,u.query))switch(i){case 0:u.h.call(a);break;case 1:u.h.call(a,t[0]);break;case 2:u.h.call(a,t[0],t[1]);break;default:u.h.apply(a,t.slice(1,i-1))}}return o&&o.afterTrigger&&o.afterTrigger(e),this},e}(),LN2=Math.log(2);function determinant(e,t,n,r,o,i){var a=r+"-"+o,s=e.length;if(i.hasOwnProperty(a))return i[a];if(1===t){var l=Math.round(Math.log((1<<s)-1&~o)/LN2);return e[n][l]}for(var u=r|1<<n,c=n+1;r&1<<c;)c++;for(var d=0,p=0,h=0;p<s;p++){var f=1<<p;f&o||(d+=(h%2?-1:1)*e[n][p]*determinant(e,t-1,c,u,o|f,i),h++)}return i[a]=d,d}function buildTransformer(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},o=determinant(n,8,0,0,0,r);if(0!==o){for(var i=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==i[s]&&(i[s]=0),i[s]+=((a+s)%2?-1:1)*determinant(n,7,0===a?1:0,1<<a,1<<s,r)/o*t[a];return function(e,t,n){var r=t*i[6]+n*i[7]+1;e[0]=(t*i[0]+n*i[1]+i[2])/r,e[1]=(t*i[3]+n*i[4]+i[5])/r}}}var EVENT_SAVED_PROP="___zrEVENTSAVED",_calcOut$1=[];function transformLocalCoord(e,t,n,r,o){return transformCoordWithViewport(_calcOut$1,t,r,o,!0)&&transformCoordWithViewport(e,n,_calcOut$1[0],_calcOut$1[1])}function transformCoordWithViewport(e,t,n,r,o){if(t.getBoundingClientRect&&env.domSupported&&!isCanvasEl(t)){var i=t[EVENT_SAVED_PROP]||(t[EVENT_SAVED_PROP]={}),a=preparePointerTransformer(prepareCoordMarkers(t,i),i,o);if(a)return a(e,n,r),!0}return!1}function prepareCoordMarkers(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=["left","right"],o=["top","bottom"],i=0;i<4;i++){var a=document.createElement("div"),s=i%2,l=(i>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",o[l]+":0",r[1-s]+":auto",o[1-l]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return n}function preparePointerTransformer(e,t,n){for(var r=n?"invTrans":"trans",o=t[r],i=t.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),d=2*u,p=c.left,h=c.top;a.push(p,h),l=l&&i&&p===i[d]&&h===i[d+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&o?o:(t.srcCoords=a,t[r]=n?buildTransformer(s,a):buildTransformer(a,s))}function isCanvasEl(e){return"CANVAS"===e.nodeName.toUpperCase()}var replaceReg=/([&<>"'])/g,replaceMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function encodeHTML(e){return null==e?"":(e+"").replace(replaceReg,function(e,t){return replaceMap[t]})}var MOUSE_EVENT_REG=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,_calcOut=[],firefoxNotSupportOffsetXY=env.browser.firefox&&+env.browser.version.split(".")[0]<39;function clientToLocal(e,t,n,r){return n=n||{},r?calculateZrXY(e,t,n):firefoxNotSupportOffsetXY&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):calculateZrXY(e,t,n),n}function calculateZrXY(e,t,n){if(env.domSupported&&e.getBoundingClientRect){var r=t.clientX,o=t.clientY;if(isCanvasEl(e)){var i=e.getBoundingClientRect();return n.zrX=r-i.left,void(n.zrY=o-i.top)}if(transformCoordWithViewport(_calcOut,e,r,o))return n.zrX=_calcOut[0],void(n.zrY=_calcOut[1])}n.zrX=n.zrY=0}function getNativeEvent(e){return e||window.event}function normalizeEvent(e,t,n){if(null!=(t=getNativeEvent(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var o="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];o&&clientToLocal(e,o,t,n)}else{clientToLocal(e,t,t,n);var i=getWheelDeltaMayPolyfill(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var a=t.button;return null==t.which&&void 0!==a&&MOUSE_EVENT_REG.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function getWheelDeltaMayPolyfill(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;return null==n||null==r?t:3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<0?1:n>0?-1:1)}function addEventListener(e,t,n,r){e.addEventListener(t,n,r)}function removeEventListener(e,t,n,r){e.removeEventListener(t,n,r)}var stop=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function isMiddleOrRightButtonOnMouseUpDown(e){return 2===e.which||3===e.which}var GestureMgr=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var o={points:[],touches:[],target:t,event:e},i=0,a=r.length;i<a;i++){var s=r[i],l=clientToLocal(n,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},e.prototype._recognize=function(e){for(var t in recognizers)if(recognizers.hasOwnProperty(t)){var n=recognizers[t](this._track,e);if(n)return n}},e}();function dist(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function center$1(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var recognizers={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,o=(e[n-2]||{}).points||r;if(o&&o.length>1&&r&&r.length>1){var i=dist(r)/dist(o);!isFinite(i)&&(i=1),t.pinchScale=i;var a=center$1(r);return t.pinchX=a[0],t.pinchY=a[1],{type:"pinch",target:e[0].target,event:t}}}}};function create$1(){return[1,0,0,1,0,0]}function identity(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function copy(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function mul(e,t,n){var r=t[0]*n[0]+t[2]*n[1],o=t[1]*n[0]+t[3]*n[1],i=t[0]*n[2]+t[2]*n[3],a=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=o,e[2]=i,e[3]=a,e[4]=s,e[5]=l,e}function translate(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function rotate(e,t,n,r){void 0===r&&(r=[0,0]);var o=t[0],i=t[2],a=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(n),d=Math.cos(n);return e[0]=o*d+s*c,e[1]=-o*c+s*d,e[2]=i*d+l*c,e[3]=-i*c+d*l,e[4]=d*(a-r[0])+c*(u-r[1])+r[0],e[5]=d*(u-r[1])-c*(a-r[0])+r[1],e}function scale$1(e,t,n){var r=n[0],o=n[1];return e[0]=t[0]*r,e[1]=t[1]*o,e[2]=t[2]*r,e[3]=t[3]*o,e[4]=t[4]*r,e[5]=t[5]*o,e}function invert(e,t){var n=t[0],r=t[2],o=t[4],i=t[1],a=t[3],s=t[5],l=n*a-i*r;return l?(l=1/l,e[0]=a*l,e[1]=-i*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-a*o)*l,e[5]=(i*o-n*s)*l,e):null}function clone$4(e){var t=create$1();return copy(t,e),t}var matrix$2=Object.freeze(Object.defineProperty({__proto__:null,clone:clone$4,copy:copy,create:create$1,identity:identity,invert:invert,mul:mul,rotate:rotate,scale:scale$1,translate:translate},Symbol.toStringTag,{value:"Module"}));exports("bm",matrix$2);var Point=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var o=1-r;e.x=o*t.x+r*n.x,e.y=o*t.y+r*n.y},e}(),mathMin$a=Math.min,mathMax$a=Math.max,lt=new Point,rb=new Point,lb=new Point,rt=new Point,minTv$1=new Point,maxTv$1=new Point,BoundingRect=function(){function e(e,t,n,r){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=n,this.height=r}return e.prototype.union=function(e){var t=mathMin$a(e.x,this.x),n=mathMin$a(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=mathMax$a(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=mathMax$a(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,o=create$1();return translate(o,o,[-t.x,-t.y]),scale$1(o,o,[n,r]),translate(o,o,[e.x,e.y]),o},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,o=r.x,i=r.x+r.width,a=r.y,s=r.y+r.height,l=t.x,u=t.x+t.width,c=t.y,d=t.y+t.height,p=!(i<l||u<o||s<c||d<a);if(n){var h=1/0,f=0,g=Math.abs(i-l),m=Math.abs(u-o),y=Math.abs(s-c),v=Math.abs(d-a),_=Math.min(g,m),x=Math.min(y,v);i<l||u<o?_>f&&(f=_,g<m?Point.set(maxTv$1,-g,0):Point.set(maxTv$1,m,0)):_<h&&(h=_,g<m?Point.set(minTv$1,g,0):Point.set(minTv$1,-m,0)),s<c||d<a?x>f&&(f=x,y<v?Point.set(maxTv$1,0,-y):Point.set(maxTv$1,0,v)):_<h&&(h=_,y<v?Point.set(minTv$1,0,y):Point.set(minTv$1,0,-v))}return n&&Point.copy(n,p?minTv$1:maxTv$1),p},e.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return 0===this.width||0===this.height},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,r){if(r){if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var o=r[0],i=r[3],a=r[4],s=r[5];return t.x=n.x*o+a,t.y=n.y*i+s,t.width=n.width*o,t.height=n.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}lt.x=lb.x=n.x,lt.y=rt.y=n.y,rb.x=rt.x=n.x+n.width,rb.y=lb.y=n.y+n.height,lt.transform(r),rt.transform(r),rb.transform(r),lb.transform(r),t.x=mathMin$a(lt.x,rb.x,lb.x,rt.x),t.y=mathMin$a(lt.y,rb.y,lb.y,rt.y);var l=mathMax$a(lt.x,rb.x,lb.x,rt.x),u=mathMax$a(lt.y,rb.y,lb.y,rt.y);t.width=l-t.x,t.height=u-t.y}else t!==n&&e.copy(t,n)},e}(),SILENT="silent";function makeEventPacket(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:stopEvent}}function stopEvent(){stop(this.event)}var EmptyProxy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return __extends(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Eventful),HoveredResult=function(e,t){this.x=e,this.y=t},handlerNames=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],tmpRect$1=new BoundingRect(0,0,0,0),Handler=function(e){function t(t,n,r,o,i){var a=e.call(this)||this;return a._hovered=new HoveredResult(0,0),a.storage=t,a.painter=n,a.painterRoot=o,a._pointerSize=i,r=r||new EmptyProxy,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new Draggable(a),a}return __extends(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(each$f(handlerNames,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=isOutsideBoundary(this,t,n),o=this._hovered,i=o.target;i&&!i.__zr&&(i=(o=this.findHover(o.x,o.y)).target);var a=this._hovered=r?new HoveredResult(t,n):this.findHover(t,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),i&&s!==i&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(a,"mousemove",e),s&&s!==i&&this.dispatchToElement(a,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new HoveredResult(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){var r=(e=e||{}).target;if(!r||!r.silent){for(var o="on"+t,i=makeEventPacket(t,e,n);r&&(r[o]&&(i.cancelBubble=!!r[o].call(r,i)),r.trigger(t,i),r=r.__hostTarget?r.__hostTarget:r.parent,!i.cancelBubble););i.cancelBubble||(this.trigger(t,i),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){"function"==typeof e[o]&&e[o].call(e,i),e.trigger&&e.trigger(t,i)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),o=new HoveredResult(e,t);if(setHoverTarget(r,o,e,t,n),this._pointerSize&&!o.target){for(var i=[],a=this._pointerSize,s=a/2,l=new BoundingRect(e-s,t-s,a,a),u=r.length-1;u>=0;u--){var c=r[u];c===n||c.ignore||c.ignoreCoarsePointer||c.parent&&c.parent.ignoreCoarsePointer||(tmpRect$1.copy(c.getBoundingRect()),c.transform&&tmpRect$1.applyTransform(c.transform),tmpRect$1.intersect(l)&&i.push(c))}if(i.length)for(var d=Math.PI/12,p=2*Math.PI,h=0;h<s;h+=4)for(var f=0;f<p;f+=d){if(setHoverTarget(i,o,e+h*Math.cos(f),t+h*Math.sin(f),n),o.target)return o}}return o},t.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new GestureMgr);var n=this._gestureMgr;"start"===t&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),r){var o=r.type;e.gestureEvent=o;var i=new HoveredResult;i.target=r.target,this.dispatchToElement(i,o,r.event)}},t}(Eventful);function isHover(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r=e,o=void 0,i=!1;r;){if(r.ignoreClip&&(i=!0),!i){var a=r.getClipPath();if(a&&!a.contain(t,n))return!1}r.silent&&(o=!0);var s=r.__hostTarget;r=s||r.parent}return!o||SILENT}return!1}function setHoverTarget(e,t,n,r,o){for(var i=e.length-1;i>=0;i--){var a=e[i],s=void 0;if(a!==o&&!a.ignore&&(s=isHover(a,n,r))&&(!t.topTarget&&(t.topTarget=a),s!==SILENT)){t.target=a;break}}}function isOutsideBoundary(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}each$f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){Handler.prototype[e]=function(t){var n,r,o=t.zrX,i=t.zrY,a=isOutsideBoundary(this,o,i);if("mouseup"===e&&a||(r=(n=this.findHover(o,i)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||dist$1(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}});var DEFAULT_MIN_MERGE=32,DEFAULT_MIN_GALLOPING=7;function minRunLength(e){for(var t=0;e>=DEFAULT_MIN_MERGE;)t|=1&e,e>>=1;return e+t}function makeAscendingRun(e,t,n,r){var o=t+1;if(o===n)return 1;if(r(e[o++],e[t])<0){for(;o<n&&r(e[o],e[o-1])<0;)o++;reverseRun(e,t,o)}else for(;o<n&&r(e[o],e[o-1])>=0;)o++;return o-t}function reverseRun(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function binaryInsertionSort(e,t,n,r,o){for(r===t&&r++;r<n;r++){for(var i,a=e[r],s=t,l=r;s<l;)o(a,e[i=s+l>>>1])<0?l=i:s=i+1;var u=r-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;u>0;)e[s+u]=e[s+u-1],u--}e[s]=a}}function gallopLeft(e,t,n,r,o,i){var a=0,s=0,l=1;if(i(e,t[n+o])>0){for(s=r-o;l<s&&i(e,t[n+o+l])>0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}else{for(s=o+1;l<s&&i(e,t[n+o-l])<=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=o-l,l=o-u}for(a++;a<l;){var c=a+(l-a>>>1);i(e,t[n+c])>0?a=c+1:l=c}return l}function gallopRight(e,t,n,r,o,i){var a=0,s=0,l=1;if(i(e,t[n+o])<0){for(s=o+1;l<s&&i(e,t[n+o-l])<0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=o-l,l=o-u}else{for(s=r-o;l<s&&i(e,t[n+o+l])>=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}for(a++;a<l;){var c=a+(l-a>>>1);i(e,t[n+c])<0?l=c:a=c+1}return l}function TimSort(e,t){var n,r,o=DEFAULT_MIN_GALLOPING,i=0,a=[];function s(s){var l=n[s],u=r[s],c=n[s+1],d=r[s+1];r[s]=u+d,s===i-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),i--;var p=gallopRight(e[c],e,l,u,0,t);l+=p,0!==(u-=p)&&0!==(d=gallopLeft(e[l+u-1],e,c,d,d-1,t))&&(u<=d?function(n,r,i,s){var l=0;for(l=0;l<r;l++)a[l]=e[n+l];var u=0,c=i,d=n;if(e[d++]=e[c++],0===--s){for(l=0;l<r;l++)e[d+l]=a[u+l];return}if(1===r){for(l=0;l<s;l++)e[d+l]=e[c+l];return void(e[d+s]=a[u])}var p,h,f,g=o;for(;;){p=0,h=0,f=!1;do{if(t(e[c],a[u])<0){if(e[d++]=e[c++],h++,p=0,0===--s){f=!0;break}}else if(e[d++]=a[u++],p++,h=0,1===--r){f=!0;break}}while((p|h)<g);if(f)break;do{if(0!==(p=gallopRight(e[c],a,u,r,0,t))){for(l=0;l<p;l++)e[d+l]=a[u+l];if(d+=p,u+=p,(r-=p)<=1){f=!0;break}}if(e[d++]=e[c++],0===--s){f=!0;break}if(0!==(h=gallopLeft(a[u],e,c,s,0,t))){for(l=0;l<h;l++)e[d+l]=e[c+l];if(d+=h,c+=h,0===(s-=h)){f=!0;break}}if(e[d++]=a[u++],1===--r){f=!0;break}g--}while(p>=DEFAULT_MIN_GALLOPING||h>=DEFAULT_MIN_GALLOPING);if(f)break;g<0&&(g=0),g+=2}if((o=g)<1&&(o=1),1===r){for(l=0;l<s;l++)e[d+l]=e[c+l];e[d+s]=a[u]}else{if(0===r)throw new Error;for(l=0;l<r;l++)e[d+l]=a[u+l]}}(l,u,c,d):function(n,r,i,s){var l=0;for(l=0;l<s;l++)a[l]=e[i+l];var u=n+r-1,c=s-1,d=i+s-1,p=0,h=0;if(e[d--]=e[u--],0===--r){for(p=d-(s-1),l=0;l<s;l++)e[p+l]=a[l];return}if(1===s){for(h=(d-=r)+1,p=(u-=r)+1,l=r-1;l>=0;l--)e[h+l]=e[p+l];return void(e[d]=a[c])}var f=o;for(;;){var g=0,m=0,y=!1;do{if(t(a[c],e[u])<0){if(e[d--]=e[u--],g++,m=0,0===--r){y=!0;break}}else if(e[d--]=a[c--],m++,g=0,1===--s){y=!0;break}}while((g|m)<f);if(y)break;do{if(0!==(g=r-gallopRight(a[c],e,n,r,r-1,t))){for(r-=g,h=(d-=g)+1,p=(u-=g)+1,l=g-1;l>=0;l--)e[h+l]=e[p+l];if(0===r){y=!0;break}}if(e[d--]=a[c--],1===--s){y=!0;break}if(0!==(m=s-gallopLeft(e[u],a,0,s,s-1,t))){for(s-=m,h=(d-=m)+1,p=(c-=m)+1,l=0;l<m;l++)e[h+l]=a[p+l];if(s<=1){y=!0;break}}if(e[d--]=e[u--],0===--r){y=!0;break}f--}while(g>=DEFAULT_MIN_GALLOPING||m>=DEFAULT_MIN_GALLOPING);if(y)break;f<0&&(f=0),f+=2}(o=f)<1&&(o=1);if(1===s){for(h=(d-=r)+1,p=(u-=r)+1,l=r-1;l>=0;l--)e[h+l]=e[p+l];e[d]=a[c]}else{if(0===s)throw new Error;for(p=d-(s-1),l=0;l<s;l++)e[p+l]=a[l]}}(l,u,c,d))}return n=[],r=[],{mergeRuns:function(){for(;i>1;){var e=i-2;if(e>=1&&r[e-1]<=r[e]+r[e+1]||e>=2&&r[e-2]<=r[e]+r[e-1])r[e-1]<r[e+1]&&e--;else if(r[e]>r[e+1])break;s(e)}},forceMergeRuns:function(){for(;i>1;){var e=i-2;e>0&&r[e-1]<r[e+1]&&e--,s(e)}},pushRun:function(e,t){n[i]=e,r[i]=t,i+=1}}}function sort$2(e,t,n,r){n||(n=0),r||(r=e.length);var o=r-n;if(!(o<2)){var i=0;if(o<DEFAULT_MIN_MERGE)binaryInsertionSort(e,n,r,n+(i=makeAscendingRun(e,n,r,t)),t);else{var a=TimSort(e,t),s=minRunLength(o);do{if((i=makeAscendingRun(e,n,r,t))<s){var l=o;l>s&&(l=s),binaryInsertionSort(e,n,n+l,n+i,t),i=l}a.pushRun(n,i),a.mergeRuns(),o-=i,n+=i}while(0!==o);a.forceMergeRuns()}}}var REDRAW_BIT=1,STYLE_CHANGED_BIT=2,SHAPE_CHANGED_BIT=4,invalidZErrorLogged=!1;function logInvalidZError(){invalidZErrorLogged||(invalidZErrorLogged=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function shapeCompareFunc(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Storage=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=shapeCompareFunc}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return!e&&n.length||this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,o=t.length;r<o;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,sort$2(n,shapeCompareFunc)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath();if(e.ignoreClip)t=null;else if(r){t=t?t.slice():[];for(var o=r,i=e;o;)o.parent=i,o.updateTransform(),t.push(o),i=o,o=o.getClipPath()}if(e.childrenRef){for(var a=e.childrenRef(),s=0;s<a.length;s++){var l=a[s];e.__dirty&&(l.__dirty|=REDRAW_BIT),this._updateAndAddDisplayable(l,t,n)}e.__dirty=0}else{var u=e;t&&t.length?u.__clipPaths=t:u.__clipPaths&&u.__clipPaths.length>0&&(u.__clipPaths=[]),isNaN(u.z)&&(logInvalidZError(),u.z=0),isNaN(u.z2)&&(logInvalidZError(),u.z2=0),isNaN(u.zlevel)&&(logInvalidZError(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var c=e.getDecalElement&&e.getDecalElement();c&&this._updateAndAddDisplayable(c,t,n);var d=e.getTextGuideLine();d&&this._updateAndAddDisplayable(d,t,n);var p=e.getTextContent();p&&this._updateAndAddDisplayable(p,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);else{var r=indexOf(this._roots,e);r>=0&&this._roots.splice(r,1)}},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),requestAnimationFrame$1;requestAnimationFrame$1=env.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var easingFuncs={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-easingFuncs.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*easingFuncs.bounceIn(2*e):.5*easingFuncs.bounceOut(2*e-1)+.5}},mathPow$2=Math.pow,mathSqrt$3=Math.sqrt,EPSILON$4=1e-8,EPSILON_NUMERIC=1e-4,THREE_SQRT=mathSqrt$3(3),ONE_THIRD=1/3,_v0=create$2(),_v1=create$2(),_v2=create$2();function isAroundZero$1(e){return e>-EPSILON$4&&e<EPSILON$4}function isNotAroundZero$1(e){return e>EPSILON$4||e<-EPSILON$4}function cubicAt(e,t,n,r,o){var i=1-o;return i*i*(i*e+3*o*t)+o*o*(o*r+3*i*n)}function cubicDerivativeAt(e,t,n,r,o){var i=1-o;return 3*(((t-e)*i+2*(n-t)*o)*i+(r-n)*o*o)}function cubicRootAt(e,t,n,r,o,i){var a=r+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-o,c=s*s-3*a*l,d=s*l-9*a*u,p=l*l-3*s*u,h=0;if(isAroundZero$1(c)&&isAroundZero$1(d)){if(isAroundZero$1(s))i[0]=0;else(A=-l/s)>=0&&A<=1&&(i[h++]=A)}else{var f=d*d-4*c*p;if(isAroundZero$1(f)){var g=d/c,m=-g/2;(A=-s/a+g)>=0&&A<=1&&(i[h++]=A),m>=0&&m<=1&&(i[h++]=m)}else if(f>0){var y=mathSqrt$3(f),v=c*s+1.5*a*(-d+y),_=c*s+1.5*a*(-d-y);(A=(-s-((v=v<0?-mathPow$2(-v,ONE_THIRD):mathPow$2(v,ONE_THIRD))+(_=_<0?-mathPow$2(-_,ONE_THIRD):mathPow$2(_,ONE_THIRD))))/(3*a))>=0&&A<=1&&(i[h++]=A)}else{var x=(2*c*s-3*a*d)/(2*mathSqrt$3(c*c*c)),S=Math.acos(x)/3,b=mathSqrt$3(c),T=Math.cos(S),A=(-s-2*b*T)/(3*a),w=(m=(-s+b*(T+THREE_SQRT*Math.sin(S)))/(3*a),(-s+b*(T-THREE_SQRT*Math.sin(S)))/(3*a));A>=0&&A<=1&&(i[h++]=A),m>=0&&m<=1&&(i[h++]=m),w>=0&&w<=1&&(i[h++]=w)}}return h}function cubicExtrema(e,t,n,r,o){var i=6*n-12*t+6*e,a=9*t+3*r-3*e-9*n,s=3*t-3*e,l=0;if(isAroundZero$1(a)){if(isNotAroundZero$1(i))(c=-s/i)>=0&&c<=1&&(o[l++]=c)}else{var u=i*i-4*a*s;if(isAroundZero$1(u))o[0]=-i/(2*a);else if(u>0){var c,d=mathSqrt$3(u),p=(-i-d)/(2*a);(c=(-i+d)/(2*a))>=0&&c<=1&&(o[l++]=c),p>=0&&p<=1&&(o[l++]=p)}}return l}function cubicSubdivide(e,t,n,r,o,i){var a=(t-e)*o+e,s=(n-t)*o+t,l=(r-n)*o+n,u=(s-a)*o+a,c=(l-s)*o+s,d=(c-u)*o+u;i[0]=e,i[1]=a,i[2]=u,i[3]=d,i[4]=d,i[5]=c,i[6]=l,i[7]=r}function cubicProjectPoint(e,t,n,r,o,i,a,s,l,u,c){var d,p,h,f,g,m=.005,y=1/0;_v0[0]=l,_v0[1]=u;for(var v=0;v<1;v+=.05)_v1[0]=cubicAt(e,n,o,a,v),_v1[1]=cubicAt(t,r,i,s,v),(f=distSquare(_v0,_v1))<y&&(d=v,y=f);y=1/0;for(var _=0;_<32&&!(m<EPSILON_NUMERIC);_++)p=d-m,h=d+m,_v1[0]=cubicAt(e,n,o,a,p),_v1[1]=cubicAt(t,r,i,s,p),f=distSquare(_v1,_v0),p>=0&&f<y?(d=p,y=f):(_v2[0]=cubicAt(e,n,o,a,h),_v2[1]=cubicAt(t,r,i,s,h),g=distSquare(_v2,_v0),h<=1&&g<y?(d=h,y=g):m*=.5);return c&&(c[0]=cubicAt(e,n,o,a,d),c[1]=cubicAt(t,r,i,s,d)),mathSqrt$3(y)}function cubicLength(e,t,n,r,o,i,a,s,l){for(var u=e,c=t,d=0,p=1/l,h=1;h<=l;h++){var f=h*p,g=cubicAt(e,n,o,a,f),m=cubicAt(t,r,i,s,f),y=g-u,v=m-c;d+=Math.sqrt(y*y+v*v),u=g,c=m}return d}function quadraticAt$1(e,t,n,r){var o=1-r;return o*(o*e+2*r*t)+r*r*n}function quadraticDerivativeAt(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function quadraticRootAt(e,t,n,r,o){var i=e-2*t+n,a=2*(t-e),s=e-r,l=0;if(isAroundZero$1(i)){if(isNotAroundZero$1(a))(c=-s/a)>=0&&c<=1&&(o[l++]=c)}else{var u=a*a-4*i*s;if(isAroundZero$1(u))(c=-a/(2*i))>=0&&c<=1&&(o[l++]=c);else if(u>0){var c,d=mathSqrt$3(u),p=(-a-d)/(2*i);(c=(-a+d)/(2*i))>=0&&c<=1&&(o[l++]=c),p>=0&&p<=1&&(o[l++]=p)}}return l}function quadraticExtremum(e,t,n){var r=e+n-2*t;return 0===r?.5:(e-t)/r}function quadraticSubdivide(e,t,n,r,o){var i=(t-e)*r+e,a=(n-t)*r+t,s=(a-i)*r+i;o[0]=e,o[1]=i,o[2]=s,o[3]=s,o[4]=a,o[5]=n}function quadraticProjectPoint(e,t,n,r,o,i,a,s,l){var u,c=.005,d=1/0;_v0[0]=a,_v0[1]=s;for(var p=0;p<1;p+=.05){_v1[0]=quadraticAt$1(e,n,o,p),_v1[1]=quadraticAt$1(t,r,i,p),(m=distSquare(_v0,_v1))<d&&(u=p,d=m)}d=1/0;for(var h=0;h<32&&!(c<EPSILON_NUMERIC);h++){var f=u-c,g=u+c;_v1[0]=quadraticAt$1(e,n,o,f),_v1[1]=quadraticAt$1(t,r,i,f);var m=distSquare(_v1,_v0);if(f>=0&&m<d)u=f,d=m;else{_v2[0]=quadraticAt$1(e,n,o,g),_v2[1]=quadraticAt$1(t,r,i,g);var y=distSquare(_v2,_v0);g<=1&&y<d?(u=g,d=y):c*=.5}}return l&&(l[0]=quadraticAt$1(e,n,o,u),l[1]=quadraticAt$1(t,r,i,u)),mathSqrt$3(d)}function quadraticLength(e,t,n,r,o,i,a){for(var s=e,l=t,u=0,c=1/a,d=1;d<=a;d++){var p=d*c,h=quadraticAt$1(e,n,o,p),f=quadraticAt$1(t,r,i,p),g=h-s,m=f-l;u+=Math.sqrt(g*g+m*m),s=h,l=f}return u}var regexp=/cubic-bezier\(([0-9,\.e ]+)\)/;function createCubicEasingFunc(e){var t=e&&regexp.exec(e);if(t){var n=t[1].split(","),r=+trim$1(n[0]),o=+trim$1(n[1]),i=+trim$1(n[2]),a=+trim$1(n[3]);if(isNaN(r+o+i+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:cubicRootAt(0,r,i,1,e,s)&&cubicAt(0,o,a,1,s[0])}}}var Clip=function(){function e(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||noop,this.ondestroy=e.ondestroy||noop,this.onrestart=e.onrestart||noop,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),!this._paused){var n=this._life,r=e-this._startTime-this._pausedTime,o=r/n;o<0&&(o=0),o=Math.min(o,1);var i=this.easingFunc,a=i?i(o):o;if(this.onframe(a),1===o){if(!this.loop)return!0;var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=t},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=isFunction(e)?e:easingFuncs[e]||createCubicEasingFunc(e)},e}(),Entry=function(e){this.value=e},LinkedList=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Entry(e);return this.insertEntry(t),t},e.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++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),LRU=function(){function e(e){this._list=new LinkedList,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,o=null;if(null==r[e]){var i=n.len(),a=this._lastRemovedEntry;if(i>=this._maxSize&&i>0){var s=n.head;n.remove(s),delete r[s.key],o=s.value,this._lastRemovedEntry=s}a?a.value=t:a=new Entry(t),a.key=e,n.insertEntry(a),r[e]=a}return o},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),kCSSColorTable={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 clampCssByte(e){return(e=Math.round(e))<0?0:e>255?255:e}function clampCssAngle(e){return(e=Math.round(e))<0?0:e>360?360:e}function clampCssFloat(e){return e<0?0:e>1?1:e}function parseCssInt(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?clampCssByte(parseFloat(t)/100*255):clampCssByte(parseInt(t,10))}function parseCssFloat(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?clampCssFloat(parseFloat(t)/100):clampCssFloat(parseFloat(t))}function cssHueToRgb(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function lerpNumber(e,t,n){return e+(t-e)*n}function setRgba(e,t,n,r,o){return e[0]=t,e[1]=n,e[2]=r,e[3]=o,e}function copyRgba(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var colorCache=new LRU(20),lastRemovedArr=null;function putToCache(e,t){lastRemovedArr&&copyRgba(lastRemovedArr,t),lastRemovedArr=colorCache.put(e,lastRemovedArr||t.slice())}function parse(e,t){if(e){t=t||[];var n=colorCache.get(e);if(n)return copyRgba(t,n);var r=(e+="").replace(/ /g,"").toLowerCase();if(r in kCSSColorTable)return copyRgba(t,kCSSColorTable[r]),putToCache(e,t),t;var o,i=r.length;if("#"===r.charAt(0))return 4===i||5===i?(o=parseInt(r.slice(1,4),16))>=0&&o<=4095?(setRgba(t,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===i?parseInt(r.slice(4),16)/15:1),putToCache(e,t),t):void setRgba(t,0,0,0,1):7===i||9===i?(o=parseInt(r.slice(1,7),16))>=0&&o<=16777215?(setRgba(t,(16711680&o)>>16,(65280&o)>>8,255&o,9===i?parseInt(r.slice(7),16)/255:1),putToCache(e,t),t):void setRgba(t,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===i){var l=r.substr(0,a),u=r.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?setRgba(t,+u[0],+u[1],+u[2],1):setRgba(t,0,0,0,1);c=parseCssFloat(u.pop());case"rgb":return u.length>=3?(setRgba(t,parseCssInt(u[0]),parseCssInt(u[1]),parseCssInt(u[2]),3===u.length?c:parseCssFloat(u[3])),putToCache(e,t),t):void setRgba(t,0,0,0,1);case"hsla":return 4!==u.length?void setRgba(t,0,0,0,1):(u[3]=parseCssFloat(u[3]),hsla2rgba(u,t),putToCache(e,t),t);case"hsl":return 3!==u.length?void setRgba(t,0,0,0,1):(hsla2rgba(u,t),putToCache(e,t),t);default:return}}setRgba(t,0,0,0,1)}}function hsla2rgba(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=parseCssFloat(e[1]),o=parseCssFloat(e[2]),i=o<=.5?o*(r+1):o+r-o*r,a=2*o-i;return setRgba(t=t||[],clampCssByte(255*cssHueToRgb(a,i,n+1/3)),clampCssByte(255*cssHueToRgb(a,i,n)),clampCssByte(255*cssHueToRgb(a,i,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function rgba2hsla(e){if(e){var t,n,r=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(r,o,i),s=Math.max(r,o,i),l=s-a,u=(s+a)/2;if(0===l)t=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l,p=((s-i)/6+l/2)/l;r===s?t=p-d:o===s?t=1/3+c-p:i===s&&(t=2/3+d-c),t<0&&(t+=1),t>1&&(t-=1)}var h=[360*t,n,u];return null!=e[3]&&h.push(e[3]),h}}function lift(e,t){var n=parse(e);if(n){for(var r=0;r<3;r++)n[r]=t<0?n[r]*(1-t)|0:(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return stringify(n,4===n.length?"rgba":"rgb")}}function toHex(e){var t=parse(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function fastLerp(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var r=e*(t.length-1),o=Math.floor(r),i=Math.ceil(r),a=t[o],s=t[i],l=r-o;return n[0]=clampCssByte(lerpNumber(a[0],s[0],l)),n[1]=clampCssByte(lerpNumber(a[1],s[1],l)),n[2]=clampCssByte(lerpNumber(a[2],s[2],l)),n[3]=clampCssFloat(lerpNumber(a[3],s[3],l)),n}}var fastMapToColor=fastLerp;function lerp(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),o=Math.floor(r),i=Math.ceil(r),a=parse(t[o]),s=parse(t[i]),l=r-o,u=stringify([clampCssByte(lerpNumber(a[0],s[0],l)),clampCssByte(lerpNumber(a[1],s[1],l)),clampCssByte(lerpNumber(a[2],s[2],l)),clampCssFloat(lerpNumber(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:o,rightIndex:i,value:r}:u}}var mapToColor=lerp;function modifyHSL(e,t,n,r){var o=parse(e);if(e)return o=rgba2hsla(o),null!=t&&(o[0]=clampCssAngle(t)),null!=n&&(o[1]=parseCssFloat(n)),null!=r&&(o[2]=parseCssFloat(r)),stringify(hsla2rgba(o),"rgba")}function modifyAlpha(e,t){var n=parse(e);if(n&&null!=t)return n[3]=clampCssFloat(t),stringify(n,"rgba")}function stringify(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}function lum(e,t){var n=parse(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}function random(){return stringify([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")}var liftedColorCache=new LRU(100);function liftColor(e){if(isString(e)){var t=liftedColorCache.get(e);return t||(t=lift(e,-.1),liftedColorCache.put(e,t)),t}if(isGradientObject(e)){var n=extend$2({},e);return n.colorStops=map$1(e.colorStops,function(e){return{offset:e.offset,color:lift(e.color,-.1)}}),n}return e}var color=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:fastLerp,fastMapToColor:fastMapToColor,lerp:lerp,lift:lift,liftColor:liftColor,lum:lum,mapToColor:mapToColor,modifyAlpha:modifyAlpha,modifyHSL:modifyHSL,parse:parse,random:random,stringify:stringify,toHex:toHex},Symbol.toStringTag,{value:"Module"}));exports("bp",color);var mathRound$1=Math.round;function normalizeColor(e){var t;if(e&&"transparent"!==e){if("string"==typeof e&&e.indexOf("rgba")>-1){var n=parse(e);n&&(e="rgb("+n[0]+","+n[1]+","+n[2]+")",t=n[3])}}else e="none";return{color:e,opacity:null==t?1:t}}var EPSILON$3=1e-4;function isAroundZero(e){return e<EPSILON$3&&e>-EPSILON$3}function round3(e){return mathRound$1(1e3*e)/1e3}function round4(e){return mathRound$1(1e4*e)/1e4}function getMatrixStr(e){return"matrix("+round3(e[0])+","+round3(e[1])+","+round3(e[2])+","+round3(e[3])+","+round4(e[4])+","+round4(e[5])+")"}var TEXT_ALIGN_TO_ANCHOR={left:"start",right:"end",center:"middle",middle:"middle"};function adjustTextY$1(e,t,n){return"top"===n?e+=t/2:"bottom"===n&&(e-=t/2),e}function hasShadow(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function getShadowKey(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}function isImagePattern(e){return e&&!!e.image}function isSVGPattern(e){return e&&!!e.svgElement}function isPattern(e){return isImagePattern(e)||isSVGPattern(e)}function isLinearGradient(e){return"linear"===e.type}function isRadialGradient(e){return"radial"===e.type}function isGradient(e){return e&&("linear"===e.type||"radial"===e.type)}function getIdURL(e){return"url(#"+e+")"}function getPathPrecision(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function getSRTTransformString(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*RADIAN_TO_DEGREE,o=retrieve2(e.scaleX,1),i=retrieve2(e.scaleY,1),a=e.skewX||0,s=e.skewY||0,l=[];return(t||n)&&l.push("translate("+t+"px,"+n+"px)"),r&&l.push("rotate("+r+")"),1===o&&1===i||l.push("scale("+o+","+i+")"),(a||s)&&l.push("skew("+mathRound$1(a*RADIAN_TO_DEGREE)+"deg, "+mathRound$1(s*RADIAN_TO_DEGREE)+"deg)"),l.join(" ")}var encodeBase64=env.hasGlobalWindow&&isFunction(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:"undefined"!=typeof Buffer?function(e){return Buffer.from(e).toString("base64")}:function(e){return null},arraySlice=Array.prototype.slice;function interpolateNumber$1(e,t,n){return(t-e)*n+e}function interpolate1DArray(e,t,n,r){for(var o=t.length,i=0;i<o;i++)e[i]=interpolateNumber$1(t[i],n[i],r);return e}function interpolate2DArray(e,t,n,r){for(var o=t.length,i=o&&t[0].length,a=0;a<o;a++){e[a]||(e[a]=[]);for(var s=0;s<i;s++)e[a][s]=interpolateNumber$1(t[a][s],n[a][s],r)}return e}function add1DArray(e,t,n,r){for(var o=t.length,i=0;i<o;i++)e[i]=t[i]+n[i]*r;return e}function add2DArray(e,t,n,r){for(var o=t.length,i=o&&t[0].length,a=0;a<o;a++){e[a]||(e[a]=[]);for(var s=0;s<i;s++)e[a][s]=t[a][s]+n[a][s]*r}return e}function fillColorStops(e,t){for(var n=e.length,r=t.length,o=n>r?t:e,i=Math.min(n,r),a=o[i-1]||{color:[0,0,0,0],offset:0},s=i;s<Math.max(n,r);s++)o.push({offset:a.offset,color:a.color.slice()})}function fillArray(e,t,n){var r=e,o=t;if(r.push&&o.push){var i=r.length,a=o.length;if(i!==a)if(i>a)r.length=a;else for(var s=i;s<a;s++)r.push(1===n?o[s]:arraySlice.call(o[s]));var l=r[0]&&r[0].length;for(s=0;s<r.length;s++)if(1===n)isNaN(r[s])&&(r[s]=o[s]);else for(var u=0;u<l;u++)isNaN(r[s][u])&&(r[s][u]=o[s][u])}}function cloneValue(e){if(isArrayLike(e)){var t=e.length;if(isArrayLike(e[0])){for(var n=[],r=0;r<t;r++)n.push(arraySlice.call(e[r]));return n}return arraySlice.call(e)}return e}function rgba2String(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=null==e[3]?1:e[3],"rgba("+e.join(",")+")"}function guessArrayDim(e){return isArrayLike(e&&e[0])?2:1}var VALUE_TYPE_NUMBER=0,VALUE_TYPE_1D_ARRAY=1,VALUE_TYPE_2D_ARRAY=2,VALUE_TYPE_COLOR=3,VALUE_TYPE_LINEAR_GRADIENT=4,VALUE_TYPE_RADIAL_GRADIENT=5,VALUE_TYPE_UNKOWN=6;function isGradientValueType(e){return e===VALUE_TYPE_LINEAR_GRADIENT||e===VALUE_TYPE_RADIAL_GRADIENT}function isArrayValueType(e){return e===VALUE_TYPE_1D_ARRAY||e===VALUE_TYPE_2D_ARRAY}var tmpRgba=[0,0,0,0],Track=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,o=r.length,i=!1,a=VALUE_TYPE_UNKOWN,s=t;if(isArrayLike(t)){var l=guessArrayDim(t);a=l,(1===l&&!isNumber(t[0])||2===l&&!isNumber(t[0][0]))&&(i=!0)}else if(isNumber(t)&&!eqNaN(t))a=VALUE_TYPE_NUMBER;else if(isString(t))if(isNaN(+t)){var u=parse(t);u&&(s=u,a=VALUE_TYPE_COLOR)}else a=VALUE_TYPE_NUMBER;else if(isGradientObject(t)){var c=extend$2({},s);c.colorStops=map$1(t.colorStops,function(e){return{offset:e.offset,color:parse(e.color)}}),isLinearGradient(t)?a=VALUE_TYPE_LINEAR_GRADIENT:isRadialGradient(t)&&(a=VALUE_TYPE_RADIAL_GRADIENT),s=c}0===o?this.valType=a:a===this.valType&&a!==VALUE_TYPE_UNKOWN||(i=!0),this.discrete=this.discrete||i;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=isFunction(n)?n:easingFuncs[n]||createCubicEasingFunc(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,o=n.length,i=n[o-1],a=this.discrete,s=isArrayValueType(r),l=isGradientValueType(r),u=0;u<o;u++){var c=n[u],d=c.value,p=i.value;c.percent=c.time/e,a||(s&&u!==o-1?fillArray(d,p,r):l&&fillColorStops(d.colorStops,p.colorStops))}if(!a&&r!==VALUE_TYPE_RADIAL_GRADIENT&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;var h=n[0].value;for(u=0;u<o;u++)r===VALUE_TYPE_NUMBER?n[u].additiveValue=n[u].value-h:r===VALUE_TYPE_COLOR?n[u].additiveValue=add1DArray([],n[u].value,h,-1):isArrayValueType(r)&&(n[u].additiveValue=r===VALUE_TYPE_1D_ARRAY?add1DArray([],n[u].value,h,-1):add2DArray([],n[u].value,h,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,r,o,i=null!=this._additiveTrack,a=i?"additiveValue":"value",s=this.valType,l=this.keyframes,u=l.length,c=this.propName,d=s===VALUE_TYPE_COLOR,p=this._lastFr,h=Math.min;if(1===u)r=o=l[0];else{if(t<0)n=0;else if(t<this._lastFrP){for(n=h(p+1,u-1);n>=0&&!(l[n].percent<=t);n--);n=h(n,u-2)}else{for(n=p;n<u&&!(l[n].percent>t);n++);n=h(n-1,u-2)}o=l[n+1],r=l[n]}if(r&&o){this._lastFr=n,this._lastFrP=t;var f=o.percent-r.percent,g=0===f?1:h((t-r.percent)/f,1);o.easingFunc&&(g=o.easingFunc(g));var m=i?this._additiveValue:d?tmpRgba:e[c];if(!isArrayValueType(s)&&!d||m||(m=this._additiveValue=[]),this.discrete)e[c]=g<1?r.rawValue:o.rawValue;else if(isArrayValueType(s))s===VALUE_TYPE_1D_ARRAY?interpolate1DArray(m,r[a],o[a],g):interpolate2DArray(m,r[a],o[a],g);else if(isGradientValueType(s)){var y=r[a],v=o[a],_=s===VALUE_TYPE_LINEAR_GRADIENT;e[c]={type:_?"linear":"radial",x:interpolateNumber$1(y.x,v.x,g),y:interpolateNumber$1(y.y,v.y,g),colorStops:map$1(y.colorStops,function(e,t){var n=v.colorStops[t];return{offset:interpolateNumber$1(e.offset,n.offset,g),color:rgba2String(interpolate1DArray([],e.color,n.color,g))}}),global:v.global},_?(e[c].x2=interpolateNumber$1(y.x2,v.x2,g),e[c].y2=interpolateNumber$1(y.y2,v.y2,g)):e[c].r=interpolateNumber$1(y.r,v.r,g)}else if(d)interpolate1DArray(m,r[a],o[a],g),i||(e[c]=rgba2String(m));else{var x=interpolateNumber$1(r[a],o[a],g);i?this._additiveValue=x:e[c]=x}i&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===VALUE_TYPE_NUMBER?e[n]=e[n]+r:t===VALUE_TYPE_COLOR?(parse(e[n],tmpRgba),add1DArray(tmpRgba,tmpRgba,r,1),e[n]=rgba2String(tmpRgba)):t===VALUE_TYPE_1D_ARRAY?add1DArray(e[n],e[n],r,1):t===VALUE_TYPE_2D_ARRAY&&add2DArray(e[n],e[n],r,1)},e}(),Animator=function(){function e(e,t,n,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r?logError("Can' use additive animation on looped animation."):(this._additiveAnimators=r,this._allowDiscrete=n)}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,keys(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var o=this._tracks,i=0;i<n.length;i++){var a=n[i],s=o[a];if(!s){s=o[a]=new Track(a);var l=void 0,u=this._getAdditiveTrack(a);if(u){var c=u.keyframes,d=c[c.length-1];l=d&&d.value,u.valType===VALUE_TYPE_COLOR&&l&&(l=rgba2String(l))}else l=this._target[a];if(null==l)continue;e>0&&s.addKeyframe(0,cloneValue(l),r),this._trackKeys.push(a)}s.addKeyframe(e,cloneValue(t[a]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var o=n[r].getTrack(e);o&&(t=o)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,o=0;o<this._trackKeys.length;o++){var i=this._trackKeys[o],a=this._tracks[i],s=this._getAdditiveTrack(i),l=a.keyframes,u=l.length;if(a.prepare(r,s),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var c=l[u-1];c&&(t._target[a.propName]=c.rawValue),a.setFinished()}else n.push(a)}if(n.length||this._force){var d=new Clip({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var o=!1,i=0;i<r.length;i++)if(r[i]._clip){o=!0;break}o||(t._additiveAnimators=null)}for(i=0;i<n.length;i++)n[i].step(t._target,e);var a=t._onframeCbs;if(a)for(i=0;i<a.length;i++)a[i](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return map$1(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,o=0;o<e.length;o++){var i=n[e[o]];i&&!i.isFinished()&&(t?i.step(this._target,1):1===this._started&&i.step(this._target,0),i.setFinished())}var a=!0;for(o=0;o<r.length;o++)if(!n[r[o]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},e.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var r=0;r<t.length;r++){var o=t[r],i=this._tracks[o];if(i&&!i.isFinished()){var a=i.keyframes,s=a[n?0:a.length-1];s&&(e[o]=cloneValue(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||keys(e);for(var n=0;n<t.length;n++){var r=t[n],o=this._tracks[r];if(o){var i=o.keyframes;if(i.length>1){var a=i.pop();o.addKeyframe(a.time,e[r]),o.prepare(this._maxTime,o.getAdditiveTrack())}}}},e}();function getTime(){return(new Date).getTime()}var Animation=function(e){function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return __extends(t,e),t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=getTime()-this._pausedTime,n=t-this._time,r=this._head;r;){var o=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=o):r=o}this._time=t,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,requestAnimationFrame$1(function t(){e._running&&(requestAnimationFrame$1(t),!e._paused&&e.update())})},t.prototype.start=function(){this._running||(this._time=getTime(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=getTime(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=getTime()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return null==this._head},t.prototype.animate=function(e,t){t=t||{},this.start();var n=new Animator(e,t.loop);return this.addAnimator(n),n},t}(Eventful),TOUCH_CLICK_DELAY=300,globalEventSupported=env.domSupported,localNativeListenerNames=(mouseHandlerNames=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],pointerEventNameMap={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:mouseHandlerNames,touch:["touchstart","touchend","touchmove"],pointer:map$1(mouseHandlerNames,function(e){var t=e.replace("mouse","pointer");return pointerEventNameMap.hasOwnProperty(t)?t:e})}),mouseHandlerNames,pointerEventNameMap,globalNativeListenerNames={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},wheelEventSupported=!1;function isPointerFromTouch(e){var t=e.pointerType;return"pen"===t||"touch"===t}function setTouchTimer(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function markTouch(e){e&&(e.zrByTouch=!0)}function normalizeGlobalEvent(e,t){return normalizeEvent(e.dom,new FakeGlobalEvent(e,t),!0)}function isLocalEl(e,t){for(var n=t,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var FakeGlobalEvent=function(e,t){this.stopPropagation=noop,this.stopImmediatePropagation=noop,this.preventDefault=noop,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},localDOMHandlers={mousedown:function(e){e=normalizeEvent(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=normalizeEvent(this.dom,e);var t=this.__mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=normalizeEvent(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){isLocalEl(this,(e=normalizeEvent(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){wheelEventSupported=!0,e=normalizeEvent(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){wheelEventSupported||(e=normalizeEvent(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){markTouch(e=normalizeEvent(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),localDOMHandlers.mousemove.call(this,e),localDOMHandlers.mousedown.call(this,e)},touchmove:function(e){markTouch(e=normalizeEvent(this.dom,e)),this.handler.processGesture(e,"change"),localDOMHandlers.mousemove.call(this,e)},touchend:function(e){markTouch(e=normalizeEvent(this.dom,e)),this.handler.processGesture(e,"end"),localDOMHandlers.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<TOUCH_CLICK_DELAY&&localDOMHandlers.click.call(this,e)},pointerdown:function(e){localDOMHandlers.mousedown.call(this,e)},pointermove:function(e){isPointerFromTouch(e)||localDOMHandlers.mousemove.call(this,e)},pointerup:function(e){localDOMHandlers.mouseup.call(this,e)},pointerout:function(e){isPointerFromTouch(e)||localDOMHandlers.mouseout.call(this,e)}};each$f(["click","dblclick","contextmenu"],function(e){localDOMHandlers[e]=function(t){t=normalizeEvent(this.dom,t),this.trigger(e,t)}});var globalDOMHandlers={pointermove:function(e){isPointerFromTouch(e)||globalDOMHandlers.mousemove.call(this,e)},pointerup:function(e){globalDOMHandlers.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function mountLocalDOMEventListeners(e,t){var n=t.domHandlers;env.pointerEventsSupported?each$f(localNativeListenerNames.pointer,function(r){mountSingleDOMEventListener(t,r,function(t){n[r].call(e,t)})}):(env.touchEventsSupported&&each$f(localNativeListenerNames.touch,function(r){mountSingleDOMEventListener(t,r,function(o){n[r].call(e,o),setTouchTimer(t)})}),each$f(localNativeListenerNames.mouse,function(r){mountSingleDOMEventListener(t,r,function(o){o=getNativeEvent(o),t.touching||n[r].call(e,o)})}))}function mountGlobalDOMEventListeners(e,t){function n(n){mountSingleDOMEventListener(t,n,function(r){r=getNativeEvent(r),isLocalEl(e,r.target)||(r=normalizeGlobalEvent(e,r),t.domHandlers[n].call(e,r))},{capture:!0})}env.pointerEventsSupported?each$f(globalNativeListenerNames.pointer,n):env.touchEventsSupported||each$f(globalNativeListenerNames.mouse,n)}function mountSingleDOMEventListener(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,addEventListener(e.domTarget,t,n,r)}function unmountDOMEventListeners(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&removeEventListener(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var DOMHandlerScope=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t},HandlerDomProxy=function(e){function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new DOMHandlerScope(t,localDOMHandlers),globalEventSupported&&(r._globalHandlerScope=new DOMHandlerScope(document,globalDOMHandlers)),mountLocalDOMEventListeners(r,r._localHandlerScope),r}return __extends(t,e),t.prototype.dispose=function(){unmountDOMEventListeners(this._localHandlerScope),globalEventSupported&&unmountDOMEventListeners(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,globalEventSupported&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?mountGlobalDOMEventListeners(this,t):unmountDOMEventListeners(t)}},t}(Eventful),dpr=1;env.hasGlobalWindow&&(dpr=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var devicePixelRatio=dpr,DARK_MODE_THRESHOLD=.4,DARK_LABEL_COLOR="#333",LIGHT_LABEL_COLOR="#ccc",LIGHTER_LABEL_COLOR="#eee",mIdentity=identity,EPSILON$2=5e-5;function isNotAroundZero(e){return e>EPSILON$2||e<-EPSILON$2}var scaleTmp=[],tmpTransform=[],originTransform=create$1(),abs=Math.abs,Transformable=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return isNotAroundZero(this.rotation)||isNotAroundZero(this.x)||isNotAroundZero(this.y)||isNotAroundZero(this.scaleX-1)||isNotAroundZero(this.scaleY-1)||isNotAroundZero(this.skewX)||isNotAroundZero(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n=n||create$1(),t?this.getLocalTransform(n):mIdentity(n),e&&(t?mul(n,e,n):copy(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(mIdentity(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(scaleTmp);var n=scaleTmp[0]<0?-1:1,r=scaleTmp[1]<0?-1:1,o=((scaleTmp[0]-n)*t+n)/scaleTmp[0]||0,i=((scaleTmp[1]-r)*t+r)/scaleTmp[1]||0;e[0]*=o,e[1]*=o,e[2]*=i,e[3]*=i}this.invTransform=this.invTransform||create$1(),invert(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),o=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(o),t=Math.sqrt(t),this.skewX=o,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||create$1(),mul(tmpTransform,e.invTransform,t),t=tmpTransform);var n=this.originX,r=this.originY;(n||r)&&(originTransform[4]=n,originTransform[5]=r,mul(tmpTransform,t,originTransform),tmpTransform[4]-=n,tmpTransform[5]-=r,t=tmpTransform),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&applyTransform$1(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&applyTransform$1(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&abs(e[0]-1)>1e-10&&abs(e[3]-1)>1e-10?Math.sqrt(abs(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){copyTransform(this,e)},e.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,r=e.originY||0,o=e.scaleX,i=e.scaleY,a=e.anchorX,s=e.anchorY,l=e.rotation||0,u=e.x,c=e.y,d=e.skewX?Math.tan(e.skewX):0,p=e.skewY?Math.tan(-e.skewY):0;if(n||r||a||s){var h=n+a,f=r+s;t[4]=-h*o-d*f*i,t[5]=-f*i-p*h*o}else t[4]=t[5]=0;return t[0]=o,t[3]=i,t[1]=p*o,t[2]=d*i,l&&rotate(t,t,l),t[4]+=n+u,t[5]+=r+c,t},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),TRANSFORMABLE_PROPS=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function copyTransform(e,t){for(var n=0;n<TRANSFORMABLE_PROPS.length;n++){var r=TRANSFORMABLE_PROPS[n];e[r]=t[r]}}var textWidthCache={};function getWidth(e,t){var n=textWidthCache[t=t||DEFAULT_FONT];n||(n=textWidthCache[t]=new LRU(500));var r=n.get(e);return null==r&&(r=platformApi.measureText(e,t).width,n.put(e,r)),r}function innerGetBoundingRect(e,t,n,r){var o=getWidth(e,t),i=getLineHeight(t),a=adjustTextX(0,o,n),s=adjustTextY(0,i,r);return new BoundingRect(a,s,o,i)}function getBoundingRect(e,t,n,r){var o=((e||"")+"").split("\n");if(1===o.length)return innerGetBoundingRect(o[0],t,n,r);for(var i=new BoundingRect(0,0,0,0),a=0;a<o.length;a++){var s=innerGetBoundingRect(o[a],t,n,r);0===a?i.copy(s):i.union(s)}return i}function adjustTextX(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function adjustTextY(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function getLineHeight(e){return getWidth("国",e)}function parsePercent$1(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function _calculateTextPosition(e,t,n){var r=t.position||"inside",o=null!=t.distance?t.distance:5,i=n.height,a=n.width,s=i/2,l=n.x,u=n.y,c="left",d="top";if(r instanceof Array)l+=parsePercent$1(r[0],n.width),u+=parsePercent$1(r[1],n.height),c=null,d=null;else switch(r){case"left":l-=o,u+=s,c="right",d="middle";break;case"right":l+=o+a,u+=s,d="middle";break;case"top":l+=a/2,u-=o,c="center",d="bottom";break;case"bottom":l+=a/2,u+=i+o,c="center";break;case"inside":l+=a/2,u+=s,c="center",d="middle";break;case"insideLeft":l+=o,u+=s,d="middle";break;case"insideRight":l+=a-o,u+=s,c="right",d="middle";break;case"insideTop":l+=a/2,u+=o,c="center";break;case"insideBottom":l+=a/2,u+=i-o,c="center",d="bottom";break;case"insideTopLeft":l+=o,u+=o;break;case"insideTopRight":l+=a-o,u+=o,c="right";break;case"insideBottomLeft":l+=o,u+=i-o,d="bottom";break;case"insideBottomRight":l+=a-o,u+=i-o,c="right",d="bottom"}return(e=e||{}).x=l,e.y=u,e.align=c,e.verticalAlign=d,e}var PRESERVED_NORMAL_STATE="__zr_normal__",PRIMARY_STATES_KEYS$1=TRANSFORMABLE_PROPS.concat(["ignore"]),DEFAULT_ANIMATABLE_MAP=reduce(TRANSFORMABLE_PROPS,function(e,t){return e[t]=!0,e},{ignore:!1}),tmpTextPosCalcRes={},tmpBoundingRect=new BoundingRect(0,0,0,0),Element$1=function(){function e(e){this.id=guid(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,o=t.innerTransformable,i=void 0,a=void 0,s=!1;o.parent=r?this:null;var l=!1;if(o.copyTransform(t),null!=n.position){var u=tmpBoundingRect;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),r||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(tmpTextPosCalcRes,n,u):_calculateTextPosition(tmpTextPosCalcRes,n,u),o.x=tmpTextPosCalcRes.x,o.y=tmpTextPosCalcRes.y,i=tmpTextPosCalcRes.align,a=tmpTextPosCalcRes.verticalAlign;var c=n.origin;if(c&&null!=n.rotation){var d=void 0,p=void 0;"center"===c?(d=.5*u.width,p=.5*u.height):(d=parsePercent$1(c[0],u.width),p=parsePercent$1(c[1],u.height)),l=!0,o.originX=-o.x+d+(r?0:u.x),o.originY=-o.y+p+(r?0:u.y)}}null!=n.rotation&&(o.rotation=n.rotation);var h=n.offset;h&&(o.x+=h[0],o.y+=h[1],l||(o.originX=-h[0],o.originY=-h[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,v=void 0;f&&this.canBeInsideText()?(m=n.insideFill,y=n.insideStroke,null!=m&&"auto"!==m||(m=this.getInsideTextFill()),null!=y&&"auto"!==y||(y=this.getInsideTextStroke(m),v=!0)):(m=n.outsideFill,y=n.outsideStroke,null!=m&&"auto"!==m||(m=this.getOutsideFill()),null!=y&&"auto"!==y||(y=this.getOutsideStroke(m),v=!0)),(m=m||"#000")===g.fill&&y===g.stroke&&v===g.autoStroke&&i===g.align&&a===g.verticalAlign||(s=!0,g.fill=m,g.stroke=y,g.autoStroke=v,g.align=i,g.verticalAlign=a,t.setDefaultTextStyle(g)),t.__dirty|=REDRAW_BIT,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?LIGHT_LABEL_COLOR:DARK_LABEL_COLOR},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&parse(t);n||(n=[255,255,255,1]);for(var r=n[3],o=this.__zr.isDarkMode(),i=0;i<3;i++)n[i]=n[i]*r+(o?0:255)*(1-r);return n[3]=1,stringify(n,"rgba")},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){"textConfig"===e?this.setTextConfig(t):"textContent"===e?this.setTextContent(t):"clipPath"===e?this.setClipPath(t):"extra"===e?(this.extra=this.extra||{},extend$2(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(isObject$3(e))for(var n=keys(e),r=0;r<n.length;r++){var o=n[r];this.attrKV(o,e[o])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],o=r.__fromStateTransition;if(!(r.getLoop()||o&&o!==PRESERVED_NORMAL_STATE)){var i=r.targetName,a=i?t[i]:t;r.saveTo(a)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,PRIMARY_STATES_KEYS$1)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var o=n[r];null==e[o]||o in t||(t[o]=this[o])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(PRESERVED_NORMAL_STATE,!1,e)},e.prototype.useState=function(e,t,n,r){var o=e===PRESERVED_NORMAL_STATE;if(this.hasState()||!o){var i=this.currentStates,a=this.stateTransition;if(!(indexOf(i,e)>=0)||!t&&1!==i.length){var s;if(this.stateProxy&&!o&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||o){o||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||r);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,t,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,c=this._textGuide;return u&&u.useState(e,t,n,l),c&&c.useState(e,t,n,l),o?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~REDRAW_BIT),s}logError("State "+e+" not exists.")}}},e.prototype.useStates=function(e,t,n){if(e.length){var r=[],o=this.currentStates,i=e.length,a=i===o.length;if(a)for(var s=0;s<i;s++)if(e[s]!==o[s]){a=!1;break}if(a)return;for(s=0;s<i;s++){var l=e[s],u=void 0;this.stateProxy&&(u=this.stateProxy(l,e)),u||(u=this.states[l]),u&&r.push(u)}var c=r[i-1],d=!!(c&&c.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var p=this._mergeStates(r),h=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(e.join(","),p,this._normalState,!1,!t&&!this.__inHover&&h&&h.duration>0,h);var f=this._textContent,g=this._textGuide;f&&f.useStates(e,t,d),g&&g.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~REDRAW_BIT)}else this.clearStates()},e.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=indexOf(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),o=indexOf(r,e),i=indexOf(r,t)>=0;o>=0?i?r.splice(o,1):r[o]=t:n&&!i&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},r=0;r<e.length;r++){var o=e[r];extend$2(n,o),o.textConfig&&extend$2(t=t||{},o.textConfig)}return t&&(n.textConfig=t),n},e.prototype._applyStateObj=function(e,t,n,r,o,i){var a=!(t&&r);t&&t.textConfig?(this.textConfig=extend$2({},r?this.textConfig:n.textConfig),extend$2(this.textConfig,t.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<PRIMARY_STATES_KEYS$1.length;u++){var c=PRIMARY_STATES_KEYS$1[u],d=o&&DEFAULT_ANIMATABLE_MAP[c];t&&null!=t[c]?d?(l=!0,s[c]=t[c]):this[c]=t[c]:a&&null!=n[c]&&(d?(l=!0,s[c]=n[c]):this[c]=n[c])}if(!o)for(u=0;u<this.animators.length;u++){var p=this.animators[u],h=p.targetName;p.getLoop()||p.__changeFinalValue(h?(t||n)[h]:t||n)}l&&this._transitionState(e,s,i)},e.prototype._attachComponent=function(e){if((!e.__zr||e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new Transformable,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),extend$2(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=REDRAW_BIT;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=e?this[e]:this,o=new Animator(r,t,n);return e&&(o.targetName=e),this.addAnimator(o,e),o},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=indexOf(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,o=[],i=0;i<r;i++){var a=n[i];e&&e!==a.scope?o.push(a):a.stop(t)}return this.animators=o,this},e.prototype.animateTo=function(e,t,n){animateTo(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){animateTo(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var o=animateTo(this,t,n,r),i=0;i<o.length;i++)o[i].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=function(){var t=e.prototype;function n(e,n,r,o){function i(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[o]},set:function(t){e[o]=t}})}Object.defineProperty(t,e,{get:function(){this[n]||i(this,this[n]=[]);return this[n]},set:function(e){this[r]=e[0],this[o]=e[1],this[n]=e,i(this,e)}})}t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=REDRAW_BIT,Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))}(),e}();function animateTo(e,t,n,r,o){var i=[];animateToShallow(e,"",e,t,n=n||{},r,i,o);var a=i.length,s=!1,l=n.done,u=n.aborted,c=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},d=function(){--a<=0&&(s?l&&l():u&&u())};a||l&&l(),i.length>0&&n.during&&i[0].during(function(e,t){n.during(t)});for(var p=0;p<i.length;p++){var h=i[p];c&&h.done(c),d&&h.aborted(d),n.force&&h.duration(n.duration),h.start(n.easing)}return i}function copyArrShallow(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function is2DArray(e){return isArrayLike(e[0])}function copyValue(e,t,n){if(isArrayLike(t[n]))if(isArrayLike(e[n])||(e[n]=[]),isTypedArray(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),copyArrShallow(e[n],t[n],r))}else{var o=t[n],i=e[n],a=o.length;if(is2DArray(o))for(var s=o[0].length,l=0;l<a;l++)i[l]?copyArrShallow(i[l],o[l],s):i[l]=Array.prototype.slice.call(o[l]);else copyArrShallow(i,o,a);i.length=o.length}else e[n]=t[n]}function isValueSame(e,t){return e===t||isArrayLike(e)&&isArrayLike(t)&&is1DArraySame(e,t)}function is1DArraySame(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function animateToShallow(e,t,n,r,o,i,a,s){for(var l=keys(r),u=o.duration,c=o.delay,d=o.additive,p=o.setToFinal,h=!isObject$3(i),f=e.animators,g=[],m=0;m<l.length;m++){var y=l[m],v=r[y];if(null!=v&&null!=n[y]&&(h||i[y]))if(!isObject$3(v)||isArrayLike(v)||isGradientObject(v))g.push(y);else{if(t){s||(n[y]=v,e.updateDuringAnimation(t));continue}animateToShallow(e,y,n[y],v,o,i&&i[y],a,s)}else s||(n[y]=v,e.updateDuringAnimation(t),g.push(y))}var _=g.length;if(!d&&_)for(var x=0;x<f.length;x++){if((b=f[x]).targetName===t)if(b.stopTracks(g)){var S=indexOf(f,b);f.splice(S,1)}}if(o.force||(_=(g=filter(g,function(e){return!isValueSame(r[e],n[e])})).length),_>0||o.force&&!a.length){var b,T=void 0,A=void 0,w=void 0;if(s){A={},p&&(T={});for(x=0;x<_;x++){A[y=g[x]]=n[y],p?T[y]=r[y]:n[y]=r[y]}}else if(p){w={};for(x=0;x<_;x++){w[y=g[x]]=cloneValue(n[y]),copyValue(n,r,y)}}(b=new Animator(n,!1,!1,d?filter(f,function(e){return e.targetName===t}):null)).targetName=t,o.scope&&(b.scope=o.scope),p&&T&&b.whenWithKeys(0,T,g),w&&b.whenWithKeys(0,w,g),b.whenWithKeys(null==u?500:u,s?A:r,g).delay(c||0),e.addAnimator(b,t),a.push(b)}}mixin(Element$1,Eventful),mixin(Element$1,Transformable);var Group$3=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return __extends(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=indexOf(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var o=this.__zr;o&&r.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=indexOf(n,e);return r<0||(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var o=n[r];e.call(t,o,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],o=e.call(t,r);r.isGroup&&!o&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++){this._children[n].addSelfToZr(t)}},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++){this._children[n].removeSelfFromZr(t)}},t.prototype.getBoundingRect=function(e){for(var t=new BoundingRect(0,0,0,0),n=e||this._children,r=[],o=null,i=0;i<n.length;i++){var a=n[i];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(r);l?(BoundingRect.applyTransform(t,s,l),(o=o||t.clone()).union(t)):(o=o||s.clone()).union(s)}}return o||t},t}(Element$1);Group$3.prototype.type="group";
/*!
            * ZRender, a high performance 2d drawing library.
            *
            * Copyright (c) 2013, Baidu Inc.
            * All rights reserved.
            *
            * LICENSE
            * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
            */
var painterCtors={},instances$1={};function delInstance(e){delete instances$1[e]}function isDarkMode(e){if(!e)return!1;if("string"==typeof e)return lum(e,1)<DARK_MODE_THRESHOLD;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,o=0;o<r;o++)n+=lum(t[o].color,1);return(n/=r)<DARK_MODE_THRESHOLD}return!1}var ZRender=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var o=new Storage,i=n.renderer||"canvas";painterCtors[i]||(i=keys(painterCtors)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var a=new painterCtors[i](t,o,n,e),s=n.ssr||a.ssrOnly;this.storage=o,this.painter=a;var l,u=env.node||env.worker||s?null:new HandlerDomProxy(a.getViewportRoot(),a.root),c=n.useCoarsePointer;(null==c||"auto"===c?env.touchEventsSupported:!!c)&&(l=retrieve2(n.pointerSize,44)),this.handler=new Handler(o,a,u,a.root,l),this.animation=new Animation({stage:{update:s?null:function(){return r._flush(!0)}}}),s||this.animation.start()}return e.prototype.add=function(e){!this._disposed&&e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){!this._disposed&&e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=isDarkMode(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(e){var t,n=getTime();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=getTime();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:r-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Group$3&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,delInstance(this.id))},e}(),ssrDataGetter;function init$2(e,t){var n=new ZRender(guid(),e,t);return instances$1[n.id]=n,n}function dispose$1(e){e.dispose()}function disposeAll(){for(var e in instances$1)instances$1.hasOwnProperty(e)&&instances$1[e].dispose();instances$1={}}function getInstance(e){return instances$1[e]}function _registerPainter(e,t){painterCtors[e]=t}function getElementSSRData(e){if("function"==typeof ssrDataGetter)return ssrDataGetter(e)}function registerSSRDataGetter(e){ssrDataGetter=e}var version$3="5.6.1",zrender=Object.freeze(Object.defineProperty({__proto__:null,dispose:dispose$1,disposeAll:disposeAll,getElementSSRData:getElementSSRData,getInstance:getInstance,init:init$2,registerPainter:_registerPainter,registerSSRDataGetter:registerSSRDataGetter,version:version$3},Symbol.toStringTag,{value:"Module"}));exports("bl",zrender);var RADIAN_EPSILON=1e-4,ROUND_SUPPORTED_PRECISION_MAX=20;function _trim(e){return e.replace(/^\s+|\s+$/g,"")}function linearMap$2(e,t,n,r){var o=t[0],i=t[1],a=n[0],s=n[1],l=i-o,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(r)if(l>0){if(e<=o)return a;if(e>=i)return s}else{if(e>=o)return a;if(e<=i)return s}else{if(e===o)return a;if(e===i)return s}return(e-o)/l*u+a}function parsePercent(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return isString(e)?_trim(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e}function round$3(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),ROUND_SUPPORTED_PRECISION_MAX),e=(+e).toFixed(t),n?e:+e}function asc$2(e){return e.sort(function(e,t){return e-t}),e}function getPrecision(e){if(e=+e,isNaN(e))return 0;if(e>1e-14)for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n;return getPrecisionSafe(e)}function getPrecisionSafe(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),r=n>0?+t.slice(n+1):0,o=n>0?n:t.length,i=t.indexOf("."),a=i<0?0:o-1-i;return Math.max(0,a-r)}function getPixelPrecision(e,t){var n=Math.log,r=Math.LN10,o=Math.floor(n(e[1]-e[0])/r),i=Math.round(n(Math.abs(t[1]-t[0]))/r),a=Math.min(Math.max(-o+i,0),20);return isFinite(a)?a:20}function getPercentWithPrecision(e,t,n){return e[t]&&getPercentSeats(e,n)[t]||0}function getPercentSeats(e,t){var n=reduce(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(0===n)return[];for(var r=Math.pow(10,t),o=map$1(e,function(e){return(isNaN(e)?0:e)/n*r*100}),i=100*r,a=map$1(o,function(e){return Math.floor(e)}),s=reduce(a,function(e,t){return e+t},0),l=map$1(o,function(e,t){return e-a[t]});s<i;){for(var u=Number.NEGATIVE_INFINITY,c=null,d=0,p=l.length;d<p;++d)l[d]>u&&(u=l[d],c=d);++a[c],l[c]=0,++s}return map$1(a,function(e){return e/r})}function addSafe(e,t){var n=Math.max(getPrecision(e),getPrecision(t)),r=e+t;return n>ROUND_SUPPORTED_PRECISION_MAX?r:round$3(r,n)}var MAX_SAFE_INTEGER=9007199254740991;function remRadian(e){var t=2*Math.PI;return(e%t+t)%t}function isRadianAroundZero(e){return e>-RADIAN_EPSILON&&e<RADIAN_EPSILON}var TIME_REG=/^(?:(\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 parseDate(e){if(e instanceof Date)return e;if(isString(e)){var t=TIME_REG.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return null==e?new Date(NaN):new Date(Math.round(e))}function quantity(e){return Math.pow(10,quantityExponent(e))}function quantityExponent(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function nice(e,t){var n=quantityExponent(e),r=Math.pow(10,n),o=e/r;return e=(t?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function quantile(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),o=+e[r-1],i=n-r;return i?o+i*(e[r]-o):o}function reformIntervals(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r<e.length;){for(var o=e[r].interval,i=e[r].close,a=0;a<2;a++)o[a]<=t&&(o[a]=t,i[a]=a?1:1-n),t=o[a],n=i[a];o[0]===o[1]&&i[0]*i[1]!==1?e.splice(r,1):r++}return e;function s(e,t,n){return e.interval[n]<t.interval[n]||e.interval[n]===t.interval[n]&&(e.close[n]-t.close[n]===(n?-1:1)||!n&&s(e,t,1))}}function numericToNumber(e){var t=parseFloat(e);return t==e&&(0!==t||!isString(e)||e.indexOf("x")<=0)?t:NaN}function isNumeric(e){return!isNaN(numericToNumber(e))}function getRandomIdBase(){return Math.round(9*Math.random())}function getGreatestCommonDividor(e,t){return 0===t?e:getGreatestCommonDividor(t,e%t)}function getLeastCommonMultiple(e,t){return null==e?t:null==t?e:e*t/getGreatestCommonDividor(e,t)}var ECHARTS_PREFIX="[ECharts] ",storedLogs={},hasConsole="undefined"!=typeof console&&console.warn&&console.log;function outputLog(e,t,n){if(hasConsole){if(storedLogs[t])return;storedLogs[t]=!0,console[e](ECHARTS_PREFIX+t)}}function warn(e,t){outputLog("warn",e)}function throwError(e){throw new Error(e)}function interpolateNumber(e,t,n){return(t-e)*n+e}var DUMMY_COMPONENT_NAME_PREFIX="series\0",INTERNAL_COMPONENT_ID_PREFIX="\0_ec_\0";function normalizeToArray(e){return e instanceof Array?e:null==e?[]:[e]}function defaultEmphasis(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,o=n.length;r<o;r++){var i=n[r];!e.emphasis[t].hasOwnProperty(i)&&e[t].hasOwnProperty(i)&&(e.emphasis[t][i]=e[t][i])}}}var TEXT_STYLE_OPTIONS=["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 getDataItemValue(e){return!isObject$3(e)||isArray$1(e)||e instanceof Date?e:e.value}function isDataItemOption(e){return isObject$3(e)&&!(e instanceof Array)}function mappingToExists(e,t,n){var r="normalMerge"===n,o="replaceMerge"===n,i="replaceAll"===n;e=e||[],t=(t||[]).slice();var a=createHashMap();each$f(t,function(e,n){isObject$3(e)||(t[n]=null)});var s=prepareResult(e,a,n);return(r||o)&&mappingById(s,e,a,t),r&&mappingByName(s,t),r||o?mappingByIndex(s,t,o):i&&mappingInReplaceAllMode(s,t),makeIdAndName(s),s}function prepareResult(e,t,n){var r=[];if("replaceAll"===n)return r;for(var o=0;o<e.length;o++){var i=e[o];i&&null!=i.id&&t.set(i.id,o),r.push({existing:"replaceMerge"===n||isComponentIdInternal(i)?null:i,newOption:null,keyInfo:null,brandNew:null})}return r}function mappingById(e,t,n,r){each$f(r,function(o,i){if(o&&null!=o.id){var a=makeComparableKey(o.id),s=n.get(a);if(null!=s){var l=e[s];assert(!l.newOption,'Duplicated option on id "'+a+'".'),l.newOption=o,l.existing=t[s],r[i]=null}}})}function mappingByName(e,t){each$f(t,function(n,r){if(n&&null!=n.name)for(var o=0;o<e.length;o++){var i=e[o].existing;if(!e[o].newOption&&i&&(null==i.id||null==n.id)&&!isComponentIdInternal(n)&&!isComponentIdInternal(i)&&keyExistAndEqual("name",i,n))return e[o].newOption=n,void(t[r]=null)}})}function mappingByIndex(e,t,n){each$f(t,function(t){if(t){for(var r,o=0;(r=e[o])&&(r.newOption||isComponentIdInternal(r.existing)||r.existing&&null!=t.id&&!keyExistAndEqual("id",t,r.existing));)o++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),o++}})}function mappingInReplaceAllMode(e,t){each$f(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function makeIdAndName(e){var t=createHashMap();each$f(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),each$f(e,function(e){var n=e.newOption;assert(!n||null==n.id||!t.get(n.id)||t.get(n.id)===e,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),each$f(e,function(e,n){var r=e.existing,o=e.newOption,i=e.keyInfo;if(isObject$3(o)){if(i.name=null!=o.name?makeComparableKey(o.name):r?r.name:DUMMY_COMPONENT_NAME_PREFIX+n,r)i.id=makeComparableKey(r.id);else if(null!=o.id)i.id=makeComparableKey(o.id);else{var a=0;do{i.id="\0"+i.name+"\0"+a++}while(t.get(i.id))}t.set(i.id,e)}})}function keyExistAndEqual(e,t,n){var r=convertOptionIdName(t[e],null),o=convertOptionIdName(n[e],null);return null!=r&&null!=o&&r===o}function makeComparableKey(e){return convertOptionIdName(e,"")}function convertOptionIdName(e,t){return null==e?t:isString(e)?e:isNumber(e)||isStringSafe(e)?e+"":t}function isNameSpecified(e){var t=e.name;return!(!t||!t.indexOf(DUMMY_COMPONENT_NAME_PREFIX))}function isComponentIdInternal(e){return e&&null!=e.id&&0===makeComparableKey(e.id).indexOf(INTERNAL_COMPONENT_ID_PREFIX)}function makeInternalComponentId(e){return INTERNAL_COMPONENT_ID_PREFIX+e}function setComponentTypeToKeyInfo(e,t,n){each$f(e,function(e){var r=e.newOption;isObject$3(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=determineSubType(t,r,e.existing,n))})}function determineSubType(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function compressBatches(e,t){var n={},r={};return o(e||[],n),o(t||[],r,n),[i(n),i(r)];function o(e,t,n){for(var r=0,o=e.length;r<o;r++){var i=convertOptionIdName(e[r].seriesId,null);if(null==i)return;for(var a=normalizeToArray(e[r].dataIndex),s=n&&n[i],l=0,u=a.length;l<u;l++){var c=a[l];s&&s[c]?s[c]=null:(t[i]||(t[i]={}))[c]=1}}}function i(e,t){var n=[];for(var r in e)if(e.hasOwnProperty(r)&&null!=e[r])if(t)n.push(+r);else{var o=i(e[r],!0);o.length&&n.push({seriesId:r,dataIndex:o})}return n}}function queryDataIndex(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?isArray$1(t.dataIndex)?map$1(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?isArray$1(t.name)?map$1(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function makeInner(){var e="__ec_inner_"+innerUniqueIndex++;return function(t){return t[e]||(t[e]={})}}var innerUniqueIndex=getRandomIdBase();function parseFinder$1(e,t,n){var r=preParseFinder(t,n),o=r.mainTypeSpecified,i=r.queryOptionMap,a=r.others,s=n?n.defaultMainType:null;return!o&&s&&i.set(s,{}),i.each(function(t,r){var o=queryReferringComponents(e,r,t,{useDefault:s===r,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[r+"Models"]=o.models,a[r+"Model"]=o.models[0]}),a}function preParseFinder(e,t){var n;if(isString(e)){var r={};r[e+"Index"]=0,n=r}else n=e;var o=createHashMap(),i={},a=!1;return each$f(n,function(e,n){if("dataIndex"!==n&&"dataIndexInside"!==n){var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],l=(r[2]||"").toLowerCase();if(s&&l&&!(t&&t.includeMainTypes&&indexOf(t.includeMainTypes,s)<0))a=a||!!s,(o.get(s)||o.set(s,{}))[l]=e}else i[n]=e}),{mainTypeSpecified:a,queryOptionMap:o,others:i}}var SINGLE_REFERRING={useDefault:!0,enableAll:!1,enableNone:!1},MULTIPLE_REFERRING={useDefault:!1,enableAll:!0,enableNone:!0};function queryReferringComponents(e,t,n,r){r=r||SINGLE_REFERRING;var o=n.index,i=n.id,a=n.name,s={models:null,specified:null!=o||null!=i||null!=a};if(!s.specified){var l=void 0;return s.models=r.useDefault&&(l=e.getComponent(t))?[l]:[],s}return"none"===o||!1===o?(assert(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):("all"===o&&(assert(r.enableAll,'`"all"` is not a valid value on index option.'),o=i=a=null),s.models=e.queryComponents({mainType:t,index:o,id:i,name:a}),s)}function setAttribute(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function getAttribute(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function getTooltipRenderMode(e){return"auto"===e?env.domSupported?"html":"richText":e||"html"}function groupData(e,t){var n=createHashMap(),r=[];return each$f(e,function(e){var o=t(e);(n.get(o)||(r.push(o),n.set(o,[]))).push(e)}),{keys:r,buckets:n}}function interpolateRawValues(e,t,n,r,o){var i=null==t||"auto"===t;if(null==r)return r;if(isNumber(r))return round$3(f=interpolateNumber(n||0,r,o),i?Math.max(getPrecision(n||0),getPrecision(r)):t);if(isString(r))return o<1?n:r;for(var a=[],s=n,l=r,u=Math.max(s?s.length:0,l.length),c=0;c<u;++c){var d=e.getDimensionInfo(c);if(d&&"ordinal"===d.type)a[c]=(o<1&&s?s:l)[c];else{var p=s&&s[c]?s[c]:0,h=l[c],f=interpolateNumber(p,h,o);a[c]=round$3(f,i?Math.max(getPrecision(p),getPrecision(h)):t)}}return a}var TYPE_DELIMITER=".",IS_CONTAINER="___EC__COMPONENT__CONTAINER___",IS_EXTENDED_CLASS="___EC__EXTENDED_CLASS___";function parseClassType(e){var t={main:"",sub:""};if(e){var n=e.split(TYPE_DELIMITER);t.main=n[0]||"",t.sub=n[1]||""}return t}function checkClassType(e){assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}function isExtendedClass(e){return!(!e||!e[IS_EXTENDED_CLASS])}function enableClassExtend(e,t){e.$constructor=e,e.extend=function(e){var t,n=this;return isESClass(n)?t=function(e){function t(){return e.apply(this,arguments)||this}return __extends(t,e),t}(n):(t=function(){(e.$constructor||n).apply(this,arguments)},inherits(t,this)),extend$2(t.prototype,e),t[IS_EXTENDED_CLASS]=!0,t.extend=this.extend,t.superCall=superCall,t.superApply=superApply,t.superClass=n,t}}function isESClass(e){return isFunction(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function mountExtend(e,t){e.extend=t.extend}var classBase=Math.round(10*Math.random());function enableClassCheck(e){var t=["__\0is_clz",classBase++].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!(!e||!e[t])}}function superCall(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function superApply(e,t,n){return this.superClass.prototype[t].apply(e,n)}function enableClassManagement(e){var t={};e.registerClass=function(e){var n=e.type||e.prototype.type;if(n){checkClassType(n),e.prototype.type=n;var r=parseClassType(n);if(r.sub){if(r.sub!==IS_CONTAINER){var o=function(e){var n=t[e.main];n&&n[IS_CONTAINER]||((n=t[e.main]={})[IS_CONTAINER]=!0);return n}(r);o[r.sub]=e}}else t[r.main]=e}return e},e.getClass=function(e,n,r){var o=t[e];if(o&&o[IS_CONTAINER]&&(o=n?o[n]:null),r&&!o)throw new Error(n?"Component "+e+"."+(n||"")+" is used but not imported.":e+".type should be specified.");return o},e.getClassesByMainType=function(e){var n=parseClassType(e),r=[],o=t[n.main];return o&&o[IS_CONTAINER]?each$f(o,function(e,t){t!==IS_CONTAINER&&r.push(e)}):r.push(o),r},e.hasClass=function(e){var n=parseClassType(e);return!!t[n.main]},e.getAllClassMainTypes=function(){var e=[];return each$f(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=parseClassType(e),r=t[n.main];return r&&r[IS_CONTAINER]}}function makeStyleMapper(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(n,r,o){for(var i={},a=0;a<e.length;a++){var s=e[a][1];if(!(r&&indexOf(r,s)>=0||o&&indexOf(o,s)<0)){var l=n.getShallow(s,t);null!=l&&(i[e[a][0]]=l)}}return i}}var AREA_STYLE_KEY_MAP=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],getAreaStyle=makeStyleMapper(AREA_STYLE_KEY_MAP),AreaStyleMixin=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return getAreaStyle(this,e,t)},e}(),globalImageCache=new LRU(50);function findExistImage(e){if("string"==typeof e){var t=globalImageCache.get(e);return t&&t.image}return e}function createOrUpdateImage(e,t,n,r,o){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var i=globalImageCache.get(e),a={hostEl:n,cb:r,cbPayload:o};return i?!isImageReady(t=i.image)&&i.pending.push(a):((t=platformApi.loadImage(e,imageOnLoad,imageOnLoad)).__zrImageSrc=e,globalImageCache.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}return e}return t}function imageOnLoad(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function isImageReady(e){return e&&e.width&&e.height}var STYLE_REG=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function truncateText(e,t,n,r,o){var i={};return truncateText2(i,e,t,n,r,o),i.text}function truncateText2(e,t,n,r,o,i){if(!n)return e.text="",void(e.isTruncated=!1);var a=(t+"").split("\n");i=prepareTruncateOptions(n,r,o,i);for(var s=!1,l={},u=0,c=a.length;u<c;u++)truncateSingleLine(l,a[u],i),a[u]=l.textLine,s=s||l.isTruncated;e.text=a.join("\n"),e.isTruncated=s}function prepareTruncateOptions(e,t,n,r){var o=extend$2({},r=r||{});o.font=t,n=retrieve2(n,"..."),o.maxIterations=retrieve2(r.maxIterations,2);var i=o.minChar=retrieve2(r.minChar,0);o.cnCharWidth=getWidth("国",t);var a=o.ascCharWidth=getWidth("a",t);o.placeholder=retrieve2(r.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<i&&s>=a;l++)s-=a;var u=getWidth(n,t);return u>s&&(n="",u=0),s=e-u,o.ellipsis=n,o.ellipsisWidth=u,o.contentWidth=s,o.containerWidth=e,o}function truncateSingleLine(e,t,n){var r=n.containerWidth,o=n.font,i=n.contentWidth;if(!r)return e.textLine="",void(e.isTruncated=!1);var a=getWidth(t,o);if(a<=r)return e.textLine=t,void(e.isTruncated=!1);for(var s=0;;s++){if(a<=i||s>=n.maxIterations){t+=n.ellipsis;break}var l=0===s?estimateLength(t,i,n.ascCharWidth,n.cnCharWidth):a>0?Math.floor(t.length*i/a):0;a=getWidth(t=t.substr(0,l),o)}""===t&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function estimateLength(e,t,n,r){for(var o=0,i=0,a=e.length;i<a&&o<t;i++){var s=e.charCodeAt(i);o+=0<=s&&s<=127?n:r}return i}function parsePlainText(e,t){null!=e&&(e+="");var n,r=t.overflow,o=t.padding,i=t.font,a="truncate"===r,s=getLineHeight(i),l=retrieve2(t.lineHeight,s),u=!!t.backgroundColor,c="truncate"===t.lineOverflow,d=!1,p=t.width,h=(n=null==p||"break"!==r&&"breakAll"!==r?e?e.split("\n"):[]:e?wrapText(e,t.font,p,"breakAll"===r,0).lines:[]).length*l,f=retrieve2(t.height,h);if(h>f&&c){var g=Math.floor(f/l);d=d||n.length>g,n=n.slice(0,g)}if(e&&a&&null!=p)for(var m=prepareTruncateOptions(p,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),y={},v=0;v<n.length;v++)truncateSingleLine(y,n[v],m),n[v]=y.textLine,d=d||y.isTruncated;var _=f,x=0;for(v=0;v<n.length;v++)x=Math.max(getWidth(n[v],i),x);null==p&&(p=x);var S=x;return o&&(_+=o[0]+o[2],S+=o[1]+o[3],p+=o[1]+o[3]),u&&(S=p),{lines:n,height:f,outerWidth:S,outerHeight:_,lineHeight:l,calculatedLineHeight:s,contentWidth:x,contentHeight:h,width:p,isTruncated:d}}var RichTextToken=function(){},RichTextLine=function(e){this.tokens=[],e&&(this.tokens=e)},RichTextContentBlock=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1};function parseRichText(e,t){var n=new RichTextContentBlock;if(null!=e&&(e+=""),!e)return n;for(var r,o=t.width,i=t.height,a=t.overflow,s="break"!==a&&"breakAll"!==a||null==o?null:{width:o,accumWidth:0,breakAll:"breakAll"===a},l=STYLE_REG.lastIndex=0;null!=(r=STYLE_REG.exec(e));){var u=r.index;u>l&&pushTokens(n,e.substring(l,u),t,s),pushTokens(n,r[2],t,s,r[1]),l=STYLE_REG.lastIndex}l<e.length&&pushTokens(n,e.substring(l,e.length),t,s);var c=[],d=0,p=0,h=t.padding,f="truncate"===a,g="truncate"===t.lineOverflow,m={};function y(e,t,n){e.width=t,e.lineHeight=n,d+=n,p=Math.max(p,t)}e:for(var v=0;v<n.lines.length;v++){for(var _=n.lines[v],x=0,S=0,b=0;b<_.tokens.length;b++){var T=(R=_.tokens[b]).styleName&&t.rich[R.styleName]||{},A=R.textPadding=T.padding,w=A?A[1]+A[3]:0,C=R.font=T.font||t.font;R.contentHeight=getLineHeight(C);var E=retrieve2(T.height,R.contentHeight);if(R.innerHeight=E,A&&(E+=A[0]+A[2]),R.height=E,R.lineHeight=retrieve3(T.lineHeight,t.lineHeight,E),R.align=T&&T.align||t.align,R.verticalAlign=T&&T.verticalAlign||"middle",g&&null!=i&&d+R.lineHeight>i){var M=n.lines.length;b>0?(_.tokens=_.tokens.slice(0,b),y(_,S,x),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v),n.isTruncated=n.isTruncated||n.lines.length<M;break e}var I=T.width,P=null==I||"auto"===I;if("string"==typeof I&&"%"===I.charAt(I.length-1))R.percentWidth=I,c.push(R),R.contentWidth=getWidth(R.text,C);else{if(P){var D=T.backgroundColor,k=D&&D.image;k&&isImageReady(k=findExistImage(k))&&(R.width=Math.max(R.width,k.width*E/k.height))}var $=f&&null!=o?o-S:null;null!=$&&$<R.width?!P||$<w?(R.text="",R.width=R.contentWidth=0):(truncateText2(m,R.text,$-w,C,t.ellipsis,{minChar:t.truncateMinChar}),R.text=m.text,n.isTruncated=n.isTruncated||m.isTruncated,R.width=R.contentWidth=getWidth(R.text,C)):R.contentWidth=getWidth(R.text,C)}R.width+=w,S+=R.width,T&&(x=Math.max(x,R.lineHeight))}y(_,S,x)}n.outerWidth=n.width=retrieve2(o,p),n.outerHeight=n.height=retrieve2(i,d),n.contentHeight=d,n.contentWidth=p,h&&(n.outerWidth+=h[1]+h[3],n.outerHeight+=h[0]+h[2]);for(v=0;v<c.length;v++){var R,L=(R=c[v]).percentWidth;R.width=parseInt(L,10)/100*n.width}return n}function pushTokens(e,t,n,r,o){var i,a,s=""===t,l=o&&n.rich[o]||{},u=e.lines,c=l.font||n.font,d=!1;if(r){var p=l.padding,h=p?p[1]+p[3]:0;if(null!=l.width&&"auto"!==l.width){var f=parsePercent$1(l.width,r.width)+h;u.length>0&&f+r.accumWidth>r.width&&(i=t.split("\n"),d=!0),r.accumWidth=f}else{var g=wrapText(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=g.accumWidth+h,a=g.linesWidths,i=g.lines}}else i=t.split("\n");for(var m=0;m<i.length;m++){var y=i[m],v=new RichTextToken;if(v.styleName=o,v.text=y,v.isLineHolder=!y&&!s,"number"==typeof l.width?v.width=l.width:v.width=a?a[m]:getWidth(y,c),m||d)u.push(new RichTextLine([v]));else{var _=(u[u.length-1]||(u[0]=new RichTextLine)).tokens,x=_.length;1===x&&_[0].isLineHolder?_[0]=v:(y||!x||s)&&_.push(v)}}}function isAlphabeticLetter(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var breakCharMap=reduce(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function isWordBreakChar(e){return!isAlphabeticLetter(e)||!!breakCharMap[e]}function wrapText(e,t,n,r,o){for(var i=[],a=[],s="",l="",u=0,c=0,d=0;d<e.length;d++){var p=e.charAt(d);if("\n"!==p){var h=getWidth(p,t),f=!r&&!isWordBreakChar(p);(i.length?c+h>n:o+c+h>n)?c?(s||l)&&(f?(s||(s=l,l="",c=u=0),i.push(s),a.push(c-u),l+=p,s="",c=u+=h):(l&&(s+=l,l="",u=0),i.push(s),a.push(c),s=p,c=h)):f?(i.push(l),a.push(u),l=p,u=h):(i.push(p),a.push(h)):(c+=h,f?(l+=p,u+=h):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,c+=u),i.push(s),a.push(c),s="",l="",u=0,c=0}return i.length||s||(s=e,l="",u=0),l&&(s+=l),s&&(i.push(s),a.push(c)),1===i.length&&(c+=o),{accumWidth:c,lines:i,linesWidths:a}}var STYLE_MAGIC_KEY="__zr_style_"+Math.round(10*Math.random()),DEFAULT_COMMON_STYLE={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},DEFAULT_COMMON_ANIMATION_PROPS={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};DEFAULT_COMMON_STYLE[STYLE_MAGIC_KEY]=!0;var PRIMARY_STATES_KEYS=["z","z2","invisible"],PRIMARY_STATES_KEYS_IN_HOVER_LAYER=["invisible"],Displayable=function(e){function t(t){return e.call(this,t)||this}var n;return __extends(t,e),t.prototype._init=function(t){for(var n=keys(t),r=0;r<n.length;r++){var o=n[r];"style"===o?this.useStyle(t[o]):e.prototype.attrKV.call(this,o,t[o])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,n,r){var o=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&isDisplayableCulled(this,e,t)||o&&!o[0]&&!o[3])return!1;if(n&&this.__clipPaths)for(var i=0;i<this.__clipPaths.length;++i)if(this.__clipPaths[i].isZeroArea())return!1;if(r&&this.parent)for(var a=this.parent;a;){if(a.ignore)return!1;a=a.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,o=r.shadowBlur||0,i=r.shadowOffsetX||0,a=r.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new BoundingRect(0,0,0,0)),t?BoundingRect.applyTransform(e,n,t):e.copy(n),(o||i||a)&&(e.width+=2*o+Math.abs(i),e.height+=2*o+Math.abs(a),e.x=Math.min(e.x,e.x+i-o),e.y=Math.min(e.y,e.y+a-o));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+2*s),e.height=Math.ceil(e.height+1+2*s))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new BoundingRect(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){"style"!==t?e.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(e,t){return"string"==typeof e?this.style[e]=t:extend$2(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=STYLE_CHANGED_BIT,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&STYLE_CHANGED_BIT)},t.prototype.styleUpdated=function(){this.__dirty&=~STYLE_CHANGED_BIT},t.prototype.createStyle=function(e){return createObject(DEFAULT_COMMON_STYLE,e)},t.prototype.useStyle=function(e){e[STYLE_MAGIC_KEY]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[STYLE_MAGIC_KEY]},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,PRIMARY_STATES_KEYS)},t.prototype._applyStateObj=function(t,n,r,o,i,a){e.prototype._applyStateObj.call(this,t,n,r,o,i,a);var s,l=!(n&&o);if(n&&n.style?i?o?s=n.style:(s=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(s,n.style)):(s=this._mergeStyle(this.createStyle(),o?this.style:r.style),this._mergeStyle(s,n.style)):l&&(s=r.style),s)if(i){var u=this.style;if(this.style=this.createStyle(l?{}:u),l)for(var c=keys(u),d=0;d<c.length;d++){(h=c[d])in s&&(s[h]=s[h],this.style[h]=u[h])}var p=keys(s);for(d=0;d<p.length;d++){var h=p[d];this.style[h]=this.style[h]}this._transitionState(t,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);var f=this.__inHover?PRIMARY_STATES_KEYS_IN_HOVER_LAYER:PRIMARY_STATES_KEYS;for(d=0;d<f.length;d++){h=f[d];n&&null!=n[h]?this[h]=n[h]:l&&null!=r[h]&&(this[h]=r[h])}},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),o=0;o<t.length;o++){var i=t[o];i.style&&(n=n||{},this._mergeStyle(n,i.style))}return n&&(r.style=n),r},t.prototype._mergeStyle=function(e,t){return extend$2(e,t),e},t.prototype.getAnimationStyleProps=function(){return DEFAULT_COMMON_ANIMATION_PROPS},t.initDefaultProps=((n=t.prototype).type="displayable",n.invisible=!1,n.z=0,n.z2=0,n.zlevel=0,n.culling=!1,n.cursor="pointer",n.rectHover=!1,n.incremental=!1,n._rect=null,n.dirtyRectTolerance=0,void(n.__dirty=REDRAW_BIT|STYLE_CHANGED_BIT)),t}(Element$1),tmpRect=new BoundingRect(0,0,0,0),viewRect=new BoundingRect(0,0,0,0);function isDisplayableCulled(e,t,n){return tmpRect.copy(e.getBoundingRect()),e.transform&&tmpRect.applyTransform(e.transform),viewRect.width=t,viewRect.height=n,!tmpRect.intersect(viewRect)}var mathMin$9=Math.min,mathMax$9=Math.max,mathSin$4=Math.sin,mathCos$4=Math.cos,PI2$8=2*Math.PI,start=create$2(),end=create$2(),extremity=create$2();function fromPoints(e,t,n){if(0!==e.length){for(var r=e[0],o=r[0],i=r[0],a=r[1],s=r[1],l=1;l<e.length;l++)r=e[l],o=mathMin$9(o,r[0]),i=mathMax$9(i,r[0]),a=mathMin$9(a,r[1]),s=mathMax$9(s,r[1]);t[0]=o,t[1]=a,n[0]=i,n[1]=s}}function fromLine(e,t,n,r,o,i){o[0]=mathMin$9(e,n),o[1]=mathMin$9(t,r),i[0]=mathMax$9(e,n),i[1]=mathMax$9(t,r)}var xDim=[],yDim=[];function fromCubic(e,t,n,r,o,i,a,s,l,u){var c=cubicExtrema,d=cubicAt,p=c(e,n,o,a,xDim);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var h=0;h<p;h++){var f=d(e,n,o,a,xDim[h]);l[0]=mathMin$9(f,l[0]),u[0]=mathMax$9(f,u[0])}p=c(t,r,i,s,yDim);for(h=0;h<p;h++){var g=d(t,r,i,s,yDim[h]);l[1]=mathMin$9(g,l[1]),u[1]=mathMax$9(g,u[1])}l[0]=mathMin$9(e,l[0]),u[0]=mathMax$9(e,u[0]),l[0]=mathMin$9(a,l[0]),u[0]=mathMax$9(a,u[0]),l[1]=mathMin$9(t,l[1]),u[1]=mathMax$9(t,u[1]),l[1]=mathMin$9(s,l[1]),u[1]=mathMax$9(s,u[1])}function fromQuadratic(e,t,n,r,o,i,a,s){var l=quadraticExtremum,u=quadraticAt$1,c=mathMax$9(mathMin$9(l(e,n,o),1),0),d=mathMax$9(mathMin$9(l(t,r,i),1),0),p=u(e,n,o,c),h=u(t,r,i,d);a[0]=mathMin$9(e,o,p),a[1]=mathMin$9(t,i,h),s[0]=mathMax$9(e,o,p),s[1]=mathMax$9(t,i,h)}function fromArc(e,t,n,r,o,i,a,s,l){var u=min$1,c=max$1,d=Math.abs(o-i);if(d%PI2$8<1e-4&&d>1e-4)return s[0]=e-n,s[1]=t-r,l[0]=e+n,void(l[1]=t+r);if(start[0]=mathCos$4(o)*n+e,start[1]=mathSin$4(o)*r+t,end[0]=mathCos$4(i)*n+e,end[1]=mathSin$4(i)*r+t,u(s,start,end),c(l,start,end),(o%=PI2$8)<0&&(o+=PI2$8),(i%=PI2$8)<0&&(i+=PI2$8),o>i&&!a?i+=PI2$8:o<i&&a&&(o+=PI2$8),a){var p=i;i=o,o=p}for(var h=0;h<i;h+=Math.PI/2)h>o&&(extremity[0]=mathCos$4(h)*n+e,extremity[1]=mathSin$4(h)*r+t,u(s,extremity,s),c(l,extremity,l))}var CMD$4={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},tmpOutX=[],tmpOutY=[],min=[],max=[],min2=[],max2=[],mathMin$8=Math.min,mathMax$8=Math.max,mathCos$3=Math.cos,mathSin$3=Math.sin,mathAbs$2=Math.abs,PI$8=Math.PI,PI2$7=2*PI$8,hasTypedArray="undefined"!=typeof Float32Array,tmpAngles=[];function modPI2(e){return Math.round(e/PI$8*1e8)/1e8%2*PI$8}function normalizeArcAngles(e,t){var n=modPI2(e[0]);n<0&&(n+=PI2$7);var r=n-e[0],o=e[1];o+=r,!t&&o-n>=PI2$7?o=n+PI2$7:t&&n-o>=PI2$7?o=n-PI2$7:!t&&n>o?o=n+(PI2$7-modPI2(n-o)):t&&n<o&&(o=n-(PI2$7-modPI2(o-n))),e[0]=n,e[1]=o}var PathProxy=function(){function e(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 e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){(n=n||0)>0&&(this._ux=mathAbs$2(n/devicePixelRatio/e)||0,this._uy=mathAbs$2(n/devicePixelRatio/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(CMD$4.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=mathAbs$2(e-this._xi),r=mathAbs$2(t-this._yi),o=n>this._ux||r>this._uy;if(this.addData(CMD$4.L,e,t),this._ctx&&o&&this._ctx.lineTo(e,t),o)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var i=n*n+r*r;i>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=i)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,o,i){return this._drawPendingPt(),this.addData(CMD$4.C,e,t,n,r,o,i),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,o,i),this._xi=o,this._yi=i,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(CMD$4.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,o,i){this._drawPendingPt(),tmpAngles[0]=r,tmpAngles[1]=o,normalizeArcAngles(tmpAngles,i),r=tmpAngles[0];var a=(o=tmpAngles[1])-r;return this.addData(CMD$4.A,e,t,n,n,r,a,0,i?0:1),this._ctx&&this._ctx.arc(e,t,n,r,o,i),this._xi=mathCos$3(o)*n+e,this._yi=mathSin$3(o)*n+t,this},e.prototype.arcTo=function(e,t,n,r,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,o),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(CMD$4.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(CMD$4.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){var t=e.length;this.data&&this.data.length===t||!hasTypedArray||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},e.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,o=0;o<t;o++)n+=e[o].len();hasTypedArray&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+n));for(o=0;o<t;o++)for(var i=e[o].data,a=0;a<i.length;a++)this.data[r++]=i[a];this._len=r},e.prototype.addData=function(e,t,n,r,o,i,a,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var c=0;c<arguments.length;c++)u[this._len++]=arguments[c]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,hasTypedArray&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){min[0]=min[1]=min2[0]=min2[1]=Number.MAX_VALUE,max[0]=max[1]=max2[0]=max2[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,r=0,o=0,i=0;for(e=0;e<this._len;){var a=t[e++],s=1===e;switch(s&&(o=n=t[e],i=r=t[e+1]),a){case CMD$4.M:n=o=t[e++],r=i=t[e++],min2[0]=o,min2[1]=i,max2[0]=o,max2[1]=i;break;case CMD$4.L:fromLine(n,r,t[e],t[e+1],min2,max2),n=t[e++],r=t[e++];break;case CMD$4.C:fromCubic(n,r,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],min2,max2),n=t[e++],r=t[e++];break;case CMD$4.Q:fromQuadratic(n,r,t[e++],t[e++],t[e],t[e+1],min2,max2),n=t[e++],r=t[e++];break;case CMD$4.A:var l=t[e++],u=t[e++],c=t[e++],d=t[e++],p=t[e++],h=t[e++]+p;e+=1;var f=!t[e++];s&&(o=mathCos$3(p)*c+l,i=mathSin$3(p)*d+u),fromArc(l,u,c,d,p,h,f,min2,max2),n=mathCos$3(h)*c+l,r=mathSin$3(h)*d+u;break;case CMD$4.R:fromLine(o=n=t[e++],i=r=t[e++],o+t[e++],i+t[e++],min2,max2);break;case CMD$4.Z:n=o,r=i}min$1(min,min,min2),max$1(max,max,max2)}return 0===e&&(min[0]=min[1]=max[0]=max[1]=0),new BoundingRect(min[0],min[1],max[0]-min[0],max[1]-min[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,o=0,i=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,u=0,c=0,d=0;d<t;){var p=e[d++],h=1===d;h&&(a=o=e[d],s=i=e[d+1]);var f=-1;switch(p){case CMD$4.M:o=a=e[d++],i=s=e[d++];break;case CMD$4.L:var g=e[d++],m=(_=e[d++])-i;(mathAbs$2(I=g-o)>n||mathAbs$2(m)>r||d===t-1)&&(f=Math.sqrt(I*I+m*m),o=g,i=_);break;case CMD$4.C:var y=e[d++],v=e[d++],_=(g=e[d++],e[d++]),x=e[d++],S=e[d++];f=cubicLength(o,i,y,v,g,_,x,S,10),o=x,i=S;break;case CMD$4.Q:f=quadraticLength(o,i,y=e[d++],v=e[d++],g=e[d++],_=e[d++],10),o=g,i=_;break;case CMD$4.A:var b=e[d++],T=e[d++],A=e[d++],w=e[d++],C=e[d++],E=e[d++],M=E+C;d+=1,h&&(a=mathCos$3(C)*A+b,s=mathSin$3(C)*w+T),f=mathMax$8(A,w)*mathMin$8(PI2$7,Math.abs(E)),o=mathCos$3(M)*A+b,i=mathSin$3(M)*w+T;break;case CMD$4.R:a=o=e[d++],s=i=e[d++],f=2*e[d++]+2*e[d++];break;case CMD$4.Z:var I=a-o;m=s-i;f=Math.sqrt(I*I+m*m),o=a,i=s}f>=0&&(l[c++]=f,u+=f)}return this._pathLen=u,u},e.prototype.rebuildPath=function(e,t){var n,r,o,i,a,s,l,u,c,d,p=this.data,h=this._ux,f=this._uy,g=this._len,m=t<1,y=0,v=0,_=0;if(!m||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=t*this._pathLen))e:for(var x=0;x<g;){var S=p[x++],b=1===x;switch(b&&(n=o=p[x],r=i=p[x+1]),S!==CMD$4.L&&_>0&&(e.lineTo(c,d),_=0),S){case CMD$4.M:n=o=p[x++],r=i=p[x++],e.moveTo(o,i);break;case CMD$4.L:a=p[x++],s=p[x++];var T=mathAbs$2(a-o),A=mathAbs$2(s-i);if(T>h||A>f){if(m){if(y+(q=l[v++])>u){var w=(u-y)/q;e.lineTo(o*(1-w)+a*w,i*(1-w)+s*w);break e}y+=q}e.lineTo(a,s),o=a,i=s,_=0}else{var C=T*T+A*A;C>_&&(c=a,d=s,_=C)}break;case CMD$4.C:var E=p[x++],M=p[x++],I=p[x++],P=p[x++],D=p[x++],k=p[x++];if(m){if(y+(q=l[v++])>u){cubicSubdivide(o,E,I,D,w=(u-y)/q,tmpOutX),cubicSubdivide(i,M,P,k,w,tmpOutY),e.bezierCurveTo(tmpOutX[1],tmpOutY[1],tmpOutX[2],tmpOutY[2],tmpOutX[3],tmpOutY[3]);break e}y+=q}e.bezierCurveTo(E,M,I,P,D,k),o=D,i=k;break;case CMD$4.Q:E=p[x++],M=p[x++],I=p[x++],P=p[x++];if(m){if(y+(q=l[v++])>u){quadraticSubdivide(o,E,I,w=(u-y)/q,tmpOutX),quadraticSubdivide(i,M,P,w,tmpOutY),e.quadraticCurveTo(tmpOutX[1],tmpOutY[1],tmpOutX[2],tmpOutY[2]);break e}y+=q}e.quadraticCurveTo(E,M,I,P),o=I,i=P;break;case CMD$4.A:var $=p[x++],R=p[x++],L=p[x++],O=p[x++],N=p[x++],B=p[x++],V=p[x++],F=!p[x++],G=L>O?L:O,H=mathAbs$2(L-O)>.001,z=N+B,U=!1;if(m)y+(q=l[v++])>u&&(z=N+B*(u-y)/q,U=!0),y+=q;if(H&&e.ellipse?e.ellipse($,R,L,O,V,N,z,F):e.arc($,R,G,N,z,F),U)break e;b&&(n=mathCos$3(N)*L+$,r=mathSin$3(N)*O+R),o=mathCos$3(z)*L+$,i=mathSin$3(z)*O+R;break;case CMD$4.R:n=o=p[x],r=i=p[x+1],a=p[x++],s=p[x++];var j=p[x++],Y=p[x++];if(m){if(y+(q=l[v++])>u){var W=u-y;e.moveTo(a,s),e.lineTo(a+mathMin$8(W,j),s),(W-=j)>0&&e.lineTo(a+j,s+mathMin$8(W,Y)),(W-=Y)>0&&e.lineTo(a+mathMax$8(j-W,0),s+Y),(W-=j)>0&&e.lineTo(a,s+mathMax$8(Y-W,0));break e}y+=q}e.rect(a,s,j,Y);break;case CMD$4.Z:if(m){var q;if(y+(q=l[v++])>u){w=(u-y)/q;e.lineTo(o*(1-w)+n*w,i*(1-w)+r*w);break e}y+=q}e.closePath(),o=n,i=r}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.CMD=CMD$4,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}();function containStroke$4(e,t,n,r,o,i,a){if(0===o)return!1;var s=o,l=0;if(a>t+s&&a>r+s||a<t-s&&a<r-s||i>e+s&&i>n+s||i<e-s&&i<n-s)return!1;if(e===n)return Math.abs(i-e)<=s/2;var u=(l=(t-r)/(e-n))*i-a+(e*r-n*t)/(e-n);return u*u/(l*l+1)<=s/2*s/2}function containStroke$3(e,t,n,r,o,i,a,s,l,u,c){if(0===l)return!1;var d=l;return!(c>t+d&&c>r+d&&c>i+d&&c>s+d||c<t-d&&c<r-d&&c<i-d&&c<s-d||u>e+d&&u>n+d&&u>o+d&&u>a+d||u<e-d&&u<n-d&&u<o-d&&u<a-d)&&cubicProjectPoint(e,t,n,r,o,i,a,s,u,c,null)<=d/2}function containStroke$2(e,t,n,r,o,i,a,s,l){if(0===a)return!1;var u=a;return!(l>t+u&&l>r+u&&l>i+u||l<t-u&&l<r-u&&l<i-u||s>e+u&&s>n+u&&s>o+u||s<e-u&&s<n-u&&s<o-u)&&quadraticProjectPoint(e,t,n,r,o,i,s,l,null)<=u/2}var PI2$6=2*Math.PI;function normalizeRadian(e){return(e%=PI2$6)<0&&(e+=PI2$6),e}var PI2$5=2*Math.PI;function containStroke$1(e,t,n,r,o,i,a,s,l){if(0===a)return!1;var u=a;s-=e,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>n||c+u<n)return!1;if(Math.abs(r-o)%PI2$5<1e-4)return!0;if(i){var d=r;r=normalizeRadian(o),o=normalizeRadian(d)}else r=normalizeRadian(r),o=normalizeRadian(o);r>o&&(o+=PI2$5);var p=Math.atan2(l,s);return p<0&&(p+=PI2$5),p>=r&&p<=o||p+PI2$5>=r&&p+PI2$5<=o}function windingLine(e,t,n,r,o,i){if(i>t&&i>r||i<t&&i<r)return 0;if(r===t)return 0;var a=(i-t)/(r-t),s=r<t?1:-1;1!==a&&0!==a||(s=r<t?.5:-.5);var l=a*(n-e)+e;return l===o?1/0:l>o?s:0}var CMD$3=PathProxy.CMD,PI2$4=2*Math.PI,EPSILON$1=1e-4;function isAroundEqual$1(e,t){return Math.abs(e-t)<EPSILON$1}var roots=[-1,-1,-1],extrema=[-1,-1];function swapExtrema(){var e=extrema[0];extrema[0]=extrema[1],extrema[1]=e}function windingCubic(e,t,n,r,o,i,a,s,l,u){if(u>t&&u>r&&u>i&&u>s||u<t&&u<r&&u<i&&u<s)return 0;var c=cubicRootAt(t,r,i,s,u,roots);if(0===c)return 0;for(var d=0,p=-1,h=void 0,f=void 0,g=0;g<c;g++){var m=roots[g],y=0===m||1===m?.5:1;cubicAt(e,n,o,a,m)<l||(p<0&&(p=cubicExtrema(t,r,i,s,extrema),extrema[1]<extrema[0]&&p>1&&swapExtrema(),h=cubicAt(t,r,i,s,extrema[0]),p>1&&(f=cubicAt(t,r,i,s,extrema[1]))),2===p?m<extrema[0]?d+=h<t?y:-y:m<extrema[1]?d+=f<h?y:-y:d+=s<f?y:-y:m<extrema[0]?d+=h<t?y:-y:d+=s<h?y:-y)}return d}function windingQuadratic(e,t,n,r,o,i,a,s){if(s>t&&s>r&&s>i||s<t&&s<r&&s<i)return 0;var l=quadraticRootAt(t,r,i,s,roots);if(0===l)return 0;var u=quadraticExtremum(t,r,i);if(u>=0&&u<=1){for(var c=0,d=quadraticAt$1(t,r,i,u),p=0;p<l;p++){var h=0===roots[p]||1===roots[p]?.5:1;quadraticAt$1(e,n,o,roots[p])<a||(roots[p]<u?c+=d<t?h:-h:c+=i<d?h:-h)}return c}h=0===roots[0]||1===roots[0]?.5:1;return quadraticAt$1(e,n,o,roots[0])<a?0:i<t?h:-h}function windingArc(e,t,n,r,o,i,a,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);roots[0]=-l,roots[1]=l;var u=Math.abs(r-o);if(u<1e-4)return 0;if(u>=PI2$4-1e-4){r=0,o=PI2$4;var c=i?1:-1;return a>=roots[0]+e&&a<=roots[1]+e?c:0}if(r>o){var d=r;r=o,o=d}r<0&&(r+=PI2$4,o+=PI2$4);for(var p=0,h=0;h<2;h++){var f=roots[h];if(f+e>a){var g=Math.atan2(s,f);c=i?1:-1;g<0&&(g=PI2$4+g),(g>=r&&g<=o||g+PI2$4>=r&&g+PI2$4<=o)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),p+=c)}}return p}function containPath(e,t,n,r,o){for(var i,a,s=e.data,l=e.len(),u=0,c=0,d=0,p=0,h=0,f=0;f<l;){var g=s[f++],m=1===f;switch(g===CMD$3.M&&f>1&&(n||(u+=windingLine(c,d,p,h,r,o))),m&&(p=c=s[f],h=d=s[f+1]),g){case CMD$3.M:c=p=s[f++],d=h=s[f++];break;case CMD$3.L:if(n){if(containStroke$4(c,d,s[f],s[f+1],t,r,o))return!0}else u+=windingLine(c,d,s[f],s[f+1],r,o)||0;c=s[f++],d=s[f++];break;case CMD$3.C:if(n){if(containStroke$3(c,d,s[f++],s[f++],s[f++],s[f++],s[f],s[f+1],t,r,o))return!0}else u+=windingCubic(c,d,s[f++],s[f++],s[f++],s[f++],s[f],s[f+1],r,o)||0;c=s[f++],d=s[f++];break;case CMD$3.Q:if(n){if(containStroke$2(c,d,s[f++],s[f++],s[f],s[f+1],t,r,o))return!0}else u+=windingQuadratic(c,d,s[f++],s[f++],s[f],s[f+1],r,o)||0;c=s[f++],d=s[f++];break;case CMD$3.A:var y=s[f++],v=s[f++],_=s[f++],x=s[f++],S=s[f++],b=s[f++];f+=1;var T=!!(1-s[f++]);i=Math.cos(S)*_+y,a=Math.sin(S)*x+v,m?(p=i,h=a):u+=windingLine(c,d,i,a,r,o);var A=(r-y)*x/_+y;if(n){if(containStroke$1(y,v,x,S,S+b,T,t,A,o))return!0}else u+=windingArc(y,v,x,S,S+b,T,A,o);c=Math.cos(S+b)*_+y,d=Math.sin(S+b)*x+v;break;case CMD$3.R:if(p=c=s[f++],h=d=s[f++],i=p+s[f++],a=h+s[f++],n){if(containStroke$4(p,h,i,h,t,r,o)||containStroke$4(i,h,i,a,t,r,o)||containStroke$4(i,a,p,a,t,r,o)||containStroke$4(p,a,p,h,t,r,o))return!0}else u+=windingLine(i,h,i,a,r,o),u+=windingLine(p,a,p,h,r,o);break;case CMD$3.Z:if(n){if(containStroke$4(c,d,p,h,t,r,o))return!0}else u+=windingLine(c,d,p,h,r,o);c=p,d=h}}return n||isAroundEqual$1(d,h)||(u+=windingLine(c,d,p,h,r,o)||0),0!==u}function contain$2(e,t,n){return containPath(e,0,!1,t,n)}function containStroke(e,t,n,r){return containPath(e,t,!0,n,r)}var DEFAULT_PATH_STYLE=defaults$2({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},DEFAULT_COMMON_STYLE),DEFAULT_PATH_ANIMATION_PROPS={style:defaults$2({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},DEFAULT_COMMON_ANIMATION_PROPS.style)},pathCopyParams=TRANSFORMABLE_PROPS.concat(["invisible","culling","z","z2","zlevel","parent"]),Path=function(e){function t(t){return e.call(this,t)||this}var n;return __extends(t,e),t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var o=this._decalEl=this._decalEl||new t;o.buildPath===t.prototype.buildPath&&(o.buildPath=function(e){n.buildPath(e,n.shape)}),o.silent=!0;var i=o.style;for(var a in r)i[a]!==r[a]&&(i[a]=r[a]);i.fill=r.fill?r.decal:null,i.decal=null,i.shadowColor=null,r.strokeFirst&&(i.stroke=null);for(var s=0;s<pathCopyParams.length;++s)o[pathCopyParams[s]]=this[pathCopyParams[s]];o.__dirty|=REDRAW_BIT}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=keys(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var o=0;o<n.length;o++){var i=n[o],a=t[i];"style"===i?this.style?extend$2(this.style,a):this.useStyle(a):"shape"===i?extend$2(this.shape,a):e.prototype.attrKV.call(this,i,a)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if("none"!==e){if(isString(e)){var t=lum(e,0);return t>.5?DARK_LABEL_COLOR:t>.2?LIGHTER_LABEL_COLOR:LIGHT_LABEL_COLOR}if(e)return LIGHT_LABEL_COLOR}return DARK_LABEL_COLOR},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(isString(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())===lum(e,0)<DARK_MODE_THRESHOLD)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=~SHAPE_CHANGED_BIT},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new PathProxy(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var o=this.path;(r||this.__dirty&SHAPE_CHANGED_BIT)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var i=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){i.copy(e);var a=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(i.width+=s/a,i.height+=s/a,i.x-=s/a/2,i.y-=s/a/2)}return i}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),o=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var i=this.path;if(this.hasStroke()){var a=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),containStroke(i,a/s,e,t)))return!0}if(this.hasFill())return contain$2(i,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=SHAPE_CHANGED_BIT,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"==typeof e?n[e]=t:extend$2(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&SHAPE_CHANGED_BIT)},t.prototype.createStyle=function(e){return createObject(DEFAULT_PATH_STYLE,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=extend$2({},this.shape))},t.prototype._applyStateObj=function(t,n,r,o,i,a){e.prototype._applyStateObj.call(this,t,n,r,o,i,a);var s,l=!(n&&o);if(n&&n.shape?i?o?s=n.shape:(s=extend$2({},r.shape),extend$2(s,n.shape)):(s=extend$2({},o?this.shape:r.shape),extend$2(s,n.shape)):l&&(s=r.shape),s)if(i){this.shape=extend$2({},this.shape);for(var u={},c=keys(s),d=0;d<c.length;d++){var p=c[d];"object"===_typeof2(s[p])?this.shape[p]=s[p]:u[p]=s[p]}this._transitionState(t,{shape:u},a)}else this.shape=s,this.dirtyShape()},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),o=0;o<t.length;o++){var i=t[o];i.shape&&(n=n||{},this._mergeStyle(n,i.shape))}return n&&(r.shape=n),r},t.prototype.getAnimationStyleProps=function(){return DEFAULT_PATH_ANIMATION_PROPS},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return __extends(n,t),n.prototype.getDefaultStyle=function(){return clone$6(e.style)},n.prototype.getDefaultShape=function(){return clone$6(e.shape)},n}(t);for(var r in e)"function"==typeof e[r]&&(n.prototype[r]=e[r]);return n},t.initDefaultProps=((n=t.prototype).type="path",n.strokeContainThreshold=5,n.segmentIgnoreThreshold=0,n.subPixelOptimize=!1,n.autoBatch=!1,void(n.__dirty=REDRAW_BIT|STYLE_CHANGED_BIT|SHAPE_CHANGED_BIT)),t}(Displayable),DEFAULT_TSPAN_STYLE=defaults$2({strokeFirst:!0,font:DEFAULT_FONT,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},DEFAULT_PATH_STYLE),TSpan=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return createObject(DEFAULT_TSPAN_STYLE,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var t=e.text;null!=t?t+="":t="";var n=getBoundingRect(t,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var r=e.lineWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(Displayable);TSpan.prototype.type="tspan";var DEFAULT_IMAGE_STYLE=defaults$2({x:0,y:0},DEFAULT_COMMON_STYLE),DEFAULT_IMAGE_ANIMATION_PROPS={style:defaults$2({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},DEFAULT_COMMON_ANIMATION_PROPS.style)};function isImageLike$1(e){return!!(e&&"string"!=typeof e&&e.width&&e.height)}var ZRImage=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.createStyle=function(e){return createObject(DEFAULT_IMAGE_STYLE,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var r=isImageLike$1(t.image)?t.image:this.__image;if(!r)return 0;var o="width"===e?"height":"width",i=t[o];return null==i?r[e]:r[e]/r[o]*i},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return DEFAULT_IMAGE_ANIMATION_PROPS},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new BoundingRect(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Displayable);function buildPath$2(e,t){var n,r,o,i,a,s=t.x,l=t.y,u=t.width,c=t.height,d=t.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof d?n=r=o=i=d:d instanceof Array?1===d.length?n=r=o=i=d[0]:2===d.length?(n=o=d[0],r=i=d[1]):3===d.length?(n=d[0],r=i=d[1],o=d[2]):(n=d[0],r=d[1],o=d[2],i=d[3]):n=r=o=i=0,n+r>u&&(n*=u/(a=n+r),r*=u/a),o+i>u&&(o*=u/(a=o+i),i*=u/a),r+o>c&&(r*=c/(a=r+o),o*=c/a),n+i>c&&(n*=c/(a=n+i),i*=c/a),e.moveTo(s+n,l),e.lineTo(s+u-r,l),0!==r&&e.arc(s+u-r,l+r,r,-Math.PI/2,0),e.lineTo(s+u,l+c-o),0!==o&&e.arc(s+u-o,l+c-o,o,0,Math.PI/2),e.lineTo(s+i,l+c),0!==i&&e.arc(s+i,l+c-i,i,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}ZRImage.prototype.type="image";var round$2=Math.round;function subPixelOptimizeLine$1(e,t,n){if(t){var r=t.x1,o=t.x2,i=t.y1,a=t.y2;e.x1=r,e.x2=o,e.y1=i,e.y2=a;var s=n&&n.lineWidth;return s?(round$2(2*r)===round$2(2*o)&&(e.x1=e.x2=subPixelOptimize$1(r,s,!0)),round$2(2*i)===round$2(2*a)&&(e.y1=e.y2=subPixelOptimize$1(i,s,!0)),e):e}}function subPixelOptimizeRect$1(e,t,n){if(t){var r=t.x,o=t.y,i=t.width,a=t.height;e.x=r,e.y=o,e.width=i,e.height=a;var s=n&&n.lineWidth;return s?(e.x=subPixelOptimize$1(r,s,!0),e.y=subPixelOptimize$1(o,s,!0),e.width=Math.max(subPixelOptimize$1(r+i,s,!1)-e.x,0===i?0:1),e.height=Math.max(subPixelOptimize$1(o+a,s,!1)-e.y,0===a?0:1),e):e}}function subPixelOptimize$1(e,t,n){if(!t)return e;var r=round$2(2*e);return(r+round$2(t))%2==0?r/2:(r+(n?1:-1))/2}var RectShape=function(){this.x=0,this.y=0,this.width=0,this.height=0},subPixelOptimizeOutputShape$1={},Rect$2=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getDefaultShape=function(){return new RectShape},t.prototype.buildPath=function(e,t){var n,r,o,i;if(this.subPixelOptimize){var a=subPixelOptimizeRect$1(subPixelOptimizeOutputShape$1,t,this.style);n=a.x,r=a.y,o=a.width,i=a.height,a.r=t.r,t=a}else n=t.x,r=t.y,o=t.width,i=t.height;t.r?buildPath$2(e,t):e.rect(n,r,o,i)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Path);Rect$2.prototype.type="rect";var DEFAULT_RICH_TEXT_COLOR={fill:"#000"},DEFAULT_STROKE_LINE_WIDTH=2,DEFAULT_TEXT_ANIMATION_PROPS={style:defaults$2({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},DEFAULT_COMMON_ANIMATION_PROPS.style)},ZRText=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=DEFAULT_RICH_TEXT_COLOR,n.attr(t),n}return __extends(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,normalizeTextStyle(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new BoundingRect(0,0,0,0),t=this._children,n=[],r=null,o=0;o<t.length;o++){var i=t[o],a=i.getBoundingRect(),s=i.getLocalTransform(n);s?(e.copy(a),e.applyTransform(s),(r=r||e.clone()).union(e)):(r=r||a.clone()).union(a)}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||DEFAULT_RICH_TEXT_COLOR},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return extend$2(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=keys(t),r=0;r<n.length;r++){var o=n[r];e[o]=e[o]||{},extend$2(e[o],t[o])}},t.prototype.getAnimationStyleProps=function(){return DEFAULT_TEXT_ANIMATION_PROPS},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||DEFAULT_FONT,n=e.padding,r=parsePlainText(getStyleText(e),e),o=needDrawBackground(e),i=!!e.backgroundColor,a=r.outerHeight,s=r.outerWidth,l=r.contentWidth,u=r.lines,c=r.lineHeight,d=this._defaultStyle;this.isTruncated=!!r.isTruncated;var p=e.x||0,h=e.y||0,f=e.align||d.align||"left",g=e.verticalAlign||d.verticalAlign||"top",m=p,y=adjustTextY(h,r.contentHeight,g);if(o||n){var v=adjustTextX(p,s,f),_=adjustTextY(h,a,g);o&&this._renderBackground(e,e,v,_,s,a)}y+=c/2,n&&(m=getTextXForPadding(p,f,n),"top"===g?y+=n[0]:"bottom"===g&&(y-=n[2]));for(var x=0,S=!1,b=(getFill("fill"in e?e.fill:(S=!0,d.fill))),T=(getStroke("stroke"in e?e.stroke:i||d.autoStroke&&!S?null:(x=DEFAULT_STROKE_LINE_WIDTH,d.stroke))),A=e.textShadowBlur>0,w=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),C=r.calculatedLineHeight,E=0;E<u.length;E++){var M=this._getOrCreateChild(TSpan),I=M.createStyle();M.useStyle(I),I.text=u[E],I.x=m,I.y=y,f&&(I.textAlign=f),I.textBaseline="middle",I.opacity=e.opacity,I.strokeFirst=!0,A&&(I.shadowBlur=e.textShadowBlur||0,I.shadowColor=e.textShadowColor||"transparent",I.shadowOffsetX=e.textShadowOffsetX||0,I.shadowOffsetY=e.textShadowOffsetY||0),I.stroke=T,I.fill=b,T&&(I.lineWidth=e.lineWidth||x,I.lineDash=e.lineDash,I.lineDashOffset=e.lineDashOffset||0),I.font=t,setSeparateFont(I,e),y+=c,w&&M.setBoundingRect(new BoundingRect(adjustTextX(I.x,l,I.textAlign),adjustTextY(I.y,C,I.textBaseline),l,C))}},t.prototype._updateRichTexts=function(){var e=this.style,t=parseRichText(getStyleText(e),e),n=t.width,r=t.outerWidth,o=t.outerHeight,i=e.padding,a=e.x||0,s=e.y||0,l=this._defaultStyle,u=e.align||l.align,c=e.verticalAlign||l.verticalAlign;this.isTruncated=!!t.isTruncated;var d=adjustTextX(a,r,u),p=adjustTextY(s,o,c),h=d,f=p;i&&(h+=i[3],f+=i[0]);var g=h+n;needDrawBackground(e)&&this._renderBackground(e,e,d,p,r,o);for(var m=!!e.backgroundColor,y=0;y<t.lines.length;y++){for(var v=t.lines[y],_=v.tokens,x=_.length,S=v.lineHeight,b=v.width,T=0,A=h,w=g,C=x-1,E=void 0;T<x&&(!(E=_[T]).align||"left"===E.align);)this._placeToken(E,e,S,f,A,"left",m),b-=E.width,A+=E.width,T++;for(;C>=0&&"right"===(E=_[C]).align;)this._placeToken(E,e,S,f,w,"right",m),b-=E.width,w-=E.width,C--;for(A+=(n-(A-h)-(g-w)-b)/2;T<=C;)E=_[T],this._placeToken(E,e,S,f,A+E.width/2,"center",m),A+=E.width,T++;f+=S}},t.prototype._placeToken=function(e,t,n,r,o,i,a){var s=t.rich[e.styleName]||{};s.text=e.text;var l=e.verticalAlign,u=r+n/2;"top"===l?u=r+e.height/2:"bottom"===l&&(u=r+n-e.height/2),!e.isLineHolder&&needDrawBackground(s)&&this._renderBackground(s,t,"right"===i?o-e.width:"center"===i?o-e.width/2:o,u-e.height/2,e.width,e.height);var c=!!s.backgroundColor,d=e.textPadding;d&&(o=getTextXForPadding(o,i,d),u-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(TSpan),h=p.createStyle();p.useStyle(h);var f=this._defaultStyle,g=!1,m=0,y=getFill("fill"in s?s.fill:"fill"in t?t.fill:(g=!0,f.fill)),v=getStroke("stroke"in s?s.stroke:"stroke"in t?t.stroke:c||a||f.autoStroke&&!g?null:(m=DEFAULT_STROKE_LINE_WIDTH,f.stroke)),_=s.textShadowBlur>0||t.textShadowBlur>0;h.text=e.text,h.x=o,h.y=u,_&&(h.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,h.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",h.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,h.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),h.textAlign=i,h.textBaseline="middle",h.font=e.font||DEFAULT_FONT,h.opacity=retrieve3(s.opacity,t.opacity,1),setSeparateFont(h,s),v&&(h.lineWidth=retrieve3(s.lineWidth,t.lineWidth,m),h.lineDash=retrieve2(s.lineDash,t.lineDash),h.lineDashOffset=t.lineDashOffset||0,h.stroke=v),y&&(h.fill=y);var x=e.contentWidth,S=e.contentHeight;p.setBoundingRect(new BoundingRect(adjustTextX(h.x,x,h.textAlign),adjustTextY(h.y,S,h.textBaseline),x,S))},t.prototype._renderBackground=function(e,t,n,r,o,i){var a,s,l,u=e.backgroundColor,c=e.borderWidth,d=e.borderColor,p=u&&u.image,h=u&&!p,f=e.borderRadius,g=this;if(h||e.lineHeight||c&&d){(a=this._getOrCreateChild(Rect$2)).useStyle(a.createStyle()),a.style.fill=null;var m=a.shape;m.x=n,m.y=r,m.width=o,m.height=i,m.r=f,a.dirtyShape()}if(h)(l=a.style).fill=u||null,l.fillOpacity=retrieve2(e.fillOpacity,1);else if(p){(s=this._getOrCreateChild(ZRImage)).onload=function(){g.dirtyStyle()};var y=s.style;y.image=u.image,y.x=n,y.y=r,y.width=o,y.height=i}c&&d&&((l=a.style).lineWidth=c,l.stroke=d,l.strokeOpacity=retrieve2(e.strokeOpacity,1),l.lineDash=e.borderDash,l.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var v=(a||s).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||"transparent",v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=retrieve3(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return hasSeparateFont(e)&&(t=[e.fontStyle,e.fontWeight,parseFontSize(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&trim$1(t)||e.textFont||e.font},t}(Displayable),VALID_TEXT_ALIGN={left:!0,right:1,center:1},VALID_TEXT_VERTICAL_ALIGN={top:1,bottom:1,middle:1},FONT_PARTS=["fontStyle","fontWeight","fontSize","fontFamily"];function parseFontSize(e){return"string"!=typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?DEFAULT_FONT_SIZE+"px":e+"px":e}function setSeparateFont(e,t){for(var n=0;n<FONT_PARTS.length;n++){var r=FONT_PARTS[n],o=t[r];null!=o&&(e[r]=o)}}function hasSeparateFont(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}function normalizeTextStyle(e){return normalizeStyle(e),each$f(e.rich,normalizeStyle),e}function normalizeStyle(e){if(e){e.font=ZRText.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||VALID_TEXT_ALIGN[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||VALID_TEXT_VERTICAL_ALIGN[n]?n:"top",e.padding&&(e.padding=normalizeCssArray$1(e.padding))}}function getStroke(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function getFill(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function getTextXForPadding(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function getStyleText(e){var t=e.text;return null!=t&&(t+=""),t}function needDrawBackground(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var getECData=makeInner(),setCommonECData=function(e,t,n,r){if(r){var o=getECData(r);o.dataIndex=n,o.dataType=t,o.seriesIndex=e,o.ssrType="chart","group"===r.type&&r.traverse(function(r){var o=getECData(r);o.seriesIndex=e,o.dataIndex=n,o.dataType=t,o.ssrType="chart"})}},_highlightNextDigit=1,_highlightKeyMap={},getSavedStates=makeInner(),getComponentStates=makeInner(),HOVER_STATE_NORMAL=0,HOVER_STATE_BLUR=1,HOVER_STATE_EMPHASIS=2,SPECIAL_STATES=["emphasis","blur","select"],DISPLAY_STATES=["normal","emphasis","blur","select"],Z2_EMPHASIS_LIFT=10,Z2_SELECT_LIFT=9,HIGHLIGHT_ACTION_TYPE="highlight",DOWNPLAY_ACTION_TYPE="downplay",SELECT_ACTION_TYPE="select",UNSELECT_ACTION_TYPE="unselect",TOGGLE_SELECT_ACTION_TYPE="toggleSelect";function hasFillOrStroke(e){return null!=e&&"none"!==e}function doChangeHoverState(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function singleEnterEmphasis(e){doChangeHoverState(e,"emphasis",HOVER_STATE_EMPHASIS)}function singleLeaveEmphasis(e){e.hoverState===HOVER_STATE_EMPHASIS&&doChangeHoverState(e,"normal",HOVER_STATE_NORMAL)}function singleEnterBlur(e){doChangeHoverState(e,"blur",HOVER_STATE_BLUR)}function singleLeaveBlur(e){e.hoverState===HOVER_STATE_BLUR&&doChangeHoverState(e,"normal",HOVER_STATE_NORMAL)}function singleEnterSelect(e){e.selected=!0}function singleLeaveSelect(e){e.selected=!1}function updateElementState(e,t,n){t(e,n)}function traverseUpdateState(e,t,n){updateElementState(e,t,n),e.isGroup&&e.traverse(function(e){updateElementState(e,t,n)})}function setStatesFlag(e,t){switch(t){case"emphasis":e.hoverState=HOVER_STATE_EMPHASIS;break;case"normal":e.hoverState=HOVER_STATE_NORMAL;break;case"blur":e.hoverState=HOVER_STATE_BLUR;break;case"select":e.selected=!0}}function getFromStateStyle(e,t,n,r){for(var o=e.style,i={},a=0;a<t.length;a++){var s=t[a],l=o[s];i[s]=null==l?r&&r[s]:l}for(a=0;a<e.animators.length;a++){var u=e.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveTo(i,t)}return i}function createEmphasisDefaultState(e,t,n,r){var o=n&&indexOf(n,"select")>=0,i=!1;if(e instanceof Path){var a=getSavedStates(e),s=o&&a.selectFill||a.normalFill,l=o&&a.selectStroke||a.normalStroke;if(hasFillOrStroke(s)||hasFillOrStroke(l)){var u=(r=r||{}).style||{};"inherit"===u.fill?(i=!0,r=extend$2({},r),(u=extend$2({},u)).fill=s):!hasFillOrStroke(u.fill)&&hasFillOrStroke(s)?(i=!0,r=extend$2({},r),(u=extend$2({},u)).fill=liftColor(s)):!hasFillOrStroke(u.stroke)&&hasFillOrStroke(l)&&(i||(r=extend$2({},r),u=extend$2({},u)),u.stroke=liftColor(l)),r.style=u}}if(r&&null==r.z2){i||(r=extend$2({},r));var c=e.z2EmphasisLift;r.z2=e.z2+(null!=c?c:Z2_EMPHASIS_LIFT)}return r}function createSelectDefaultState(e,t,n){if(n&&null==n.z2){n=extend$2({},n);var r=e.z2SelectLift;n.z2=e.z2+(null!=r?r:Z2_SELECT_LIFT)}return n}function createBlurDefaultState(e,t,n){var r=indexOf(e.currentStates,t)>=0,o=e.style.opacity,i=r?null:getFromStateStyle(e,["opacity"],t,{opacity:1}),a=(n=n||{}).style||{};return null==a.opacity&&(n=extend$2({},n),a=extend$2({opacity:r?o:.1*i.opacity},a),n.style=a),n}function elementStateProxy(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return createEmphasisDefaultState(this,e,t,n);if("blur"===e)return createBlurDefaultState(this,e,n);if("select"===e)return createSelectDefaultState(this,e,n)}return n}function setDefaultStateProxy(e){e.stateProxy=elementStateProxy;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=elementStateProxy),n&&(n.stateProxy=elementStateProxy)}function enterEmphasisWhenMouseOver(e,t){!shouldSilent(e,t)&&!e.__highByOuter&&traverseUpdateState(e,singleEnterEmphasis)}function leaveEmphasisWhenMouseOut(e,t){!shouldSilent(e,t)&&!e.__highByOuter&&traverseUpdateState(e,singleLeaveEmphasis)}function enterEmphasis(e,t){e.__highByOuter|=1<<(t||0),traverseUpdateState(e,singleEnterEmphasis)}function leaveEmphasis(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&traverseUpdateState(e,singleLeaveEmphasis)}function enterBlur(e){traverseUpdateState(e,singleEnterBlur)}function leaveBlur(e){traverseUpdateState(e,singleLeaveBlur)}function enterSelect(e){traverseUpdateState(e,singleEnterSelect)}function leaveSelect(e){traverseUpdateState(e,singleLeaveSelect)}function shouldSilent(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function allLeaveBlur(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,o){var i=getComponentStates(o),a="series"===t,s=a?e.getViewOfSeriesModel(o):e.getViewOfComponentModel(o);!a&&r.push(s),i.isBlured&&(s.group.traverse(function(e){singleLeaveBlur(e)}),a&&n.push(o)),i.isBlured=!1}),each$f(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function blurSeries(e,t,n,r){var o=r.getModel();function i(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&leaveBlur(r)}}if(n=n||"coordinateSystem",null!=e&&t&&"none"!==t){var a=o.getSeriesByIndex(e),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];o.eachSeries(function(e){var o=a===e,u=e.coordinateSystem;if(u&&u.master&&(u=u.master),!("series"===n&&!o||"coordinateSystem"===n&&!(u&&s?u===s:o)||"series"===t&&o)){if(r.getViewOfSeriesModel(e).group.traverse(function(e){e.__highByOuter&&o&&"self"===t||singleEnterBlur(e)}),isArrayLike(t))i(e.getData(),t);else if(isObject$3(t))for(var c=keys(t),d=0;d<c.length;d++)i(e.getData(c[d]),t[c[d]]);l.push(e),getComponentStates(e).isBlured=!0}}),o.eachComponent(function(e,t){if("series"!==e){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(l,!0,o)}})}}function blurComponent(e,t,n){if(null!=e&&null!=t){var r=n.getModel().getComponent(e,t);if(r){getComponentStates(r).isBlured=!0;var o=n.getViewOfComponentModel(r);o&&o.focusBlurEnabled&&o.group.traverse(function(e){singleEnterBlur(e)})}}}function blurSeriesFromHighlightPayload(e,t,n){var r=e.seriesIndex,o=e.getData(t.dataType);if(o){var i=queryDataIndex(o,t);i=(isArray$1(i)?i[0]:i)||0;var a=o.getItemGraphicEl(i);if(!a)for(var s=o.count(),l=0;!a&&l<s;)a=o.getItemGraphicEl(l++);if(a){var u=getECData(a);blurSeries(r,u.focus,u.blurScope,n)}else{var c=e.get(["emphasis","focus"]),d=e.get(["emphasis","blurScope"]);null!=c&&blurSeries(r,c,d,n)}}}function findComponentHighDownDispatchers(e,t,n,r){var o={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==n)return o;var i=r.getModel().getComponent(e,t);if(!i)return o;var a=r.getViewOfComponentModel(i);if(!a||!a.findHighDownDispatchers)return o;for(var s,l=a.findHighDownDispatchers(n),u=0;u<l.length;u++)if("self"===getECData(l[u]).focus){s=!0;break}return{focusSelf:s,dispatchers:l}}function handleGlobalMouseOverForHighDown(e,t,n){var r=getECData(e),o=findComponentHighDownDispatchers(r.componentMainType,r.componentIndex,r.componentHighDownName,n),i=o.dispatchers,a=o.focusSelf;i?(a&&blurComponent(r.componentMainType,r.componentIndex,n),each$f(i,function(e){return enterEmphasisWhenMouseOver(e,t)})):(blurSeries(r.seriesIndex,r.focus,r.blurScope,n),"self"===r.focus&&blurComponent(r.componentMainType,r.componentIndex,n),enterEmphasisWhenMouseOver(e,t))}function handleGlobalMouseOutForHighDown(e,t,n){allLeaveBlur(n);var r=getECData(e),o=findComponentHighDownDispatchers(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;o?each$f(o,function(e){return leaveEmphasisWhenMouseOut(e,t)}):leaveEmphasisWhenMouseOut(e,t)}function toggleSelectionFromPayload(e,t,n){if(isSelectChangePayload(t)){var r=t.dataType,o=queryDataIndex(e.getData(r),t);isArray$1(o)||(o=[o]),e[t.type===TOGGLE_SELECT_ACTION_TYPE?"toggleSelect":t.type===SELECT_ACTION_TYPE?"select":"unselect"](o,r)}}function updateSeriesElementSelection(e){each$f(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?enterSelect(t):leaveSelect(t)})})}function getAllSelectedIndices(e){var t=[];return e.eachSeries(function(e){each$f(e.getAllData(),function(n){n.data;var r=n.type,o=e.getSelectedDataIndices();if(o.length>0){var i={dataIndex:o,seriesIndex:e.seriesIndex};null!=r&&(i.dataType=r),t.push(i)}})}),t}function enableHoverEmphasis(e,t,n){setAsHighDownDispatcher(e,!0),traverseUpdateState(e,setDefaultStateProxy),enableHoverFocus(e,t,n)}function disableHoverEmphasis(e){setAsHighDownDispatcher(e,!1)}function toggleHoverEmphasis(e,t,n,r){r?disableHoverEmphasis(e):enableHoverEmphasis(e,t,n)}function enableHoverFocus(e,t,n){var r=getECData(e);null!=t?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}var OTHER_STATES=["emphasis","blur","select"],defaultStyleGetterMap={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function setStatesStylesFromModel(e,t,n,r){n=n||"itemStyle";for(var o=0;o<OTHER_STATES.length;o++){var i=OTHER_STATES[o],a=t.getModel([i,n]);e.ensureState(i).style=r?r(a):a[defaultStyleGetterMap[n]]()}}function setAsHighDownDispatcher(e,t){var n=!1===t,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),n&&!r.__highDownDispatcher||(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function isHighDownDispatcher(e){return!(!e||!e.__highDownDispatcher)}function enableComponentHighDownFeatures(e,t,n){var r=getECData(e);r.componentMainType=t.mainType,r.componentIndex=t.componentIndex,r.componentHighDownName=n}function getHighlightDigit(e){var t=_highlightKeyMap[e];return null==t&&_highlightNextDigit<=32&&(t=_highlightKeyMap[e]=_highlightNextDigit++),t}function isSelectChangePayload(e){var t=e.type;return t===SELECT_ACTION_TYPE||t===UNSELECT_ACTION_TYPE||t===TOGGLE_SELECT_ACTION_TYPE}function isHighDownPayload(e){var t=e.type;return t===HIGHLIGHT_ACTION_TYPE||t===DOWNPLAY_ACTION_TYPE}function savePathStates(e){var t=getSavedStates(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}var CMD$2=PathProxy.CMD,points$2=[[],[],[]],mathSqrt$2=Math.sqrt,mathAtan2=Math.atan2;function transformPath(e,t){if(t){var n,r,o,i,a,s,l=e.data,u=e.len(),c=CMD$2.M,d=CMD$2.C,p=CMD$2.L,h=CMD$2.R,f=CMD$2.A,g=CMD$2.Q;for(o=0,i=0;o<u;){switch(n=l[o++],i=o,r=0,n){case c:case p:r=1;break;case d:r=3;break;case g:r=2;break;case f:var m=t[4],y=t[5],v=mathSqrt$2(t[0]*t[0]+t[1]*t[1]),_=mathSqrt$2(t[2]*t[2]+t[3]*t[3]),x=mathAtan2(-t[1]/_,t[0]/v);l[o]*=v,l[o++]+=m,l[o]*=_,l[o++]+=y,l[o++]*=v,l[o++]*=_,l[o++]+=x,l[o++]+=x,i=o+=2;break;case h:s[0]=l[o++],s[1]=l[o++],applyTransform$1(s,s,t),l[i++]=s[0],l[i++]=s[1],s[0]+=l[o++],s[1]+=l[o++],applyTransform$1(s,s,t),l[i++]=s[0],l[i++]=s[1]}for(a=0;a<r;a++){var S=points$2[a];S[0]=l[o++],S[1]=l[o++],applyTransform$1(S,S,t),l[i++]=S[0],l[i++]=S[1]}}e.increaseVersion()}}var mathSqrt$1=Math.sqrt,mathSin$2=Math.sin,mathCos$2=Math.cos,PI$7=Math.PI;function vMag(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function vRatio(e,t){return(e[0]*t[0]+e[1]*t[1])/(vMag(e)*vMag(t))}function vAngle(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(vRatio(e,t))}function processArc(e,t,n,r,o,i,a,s,l,u,c){var d=l*(PI$7/180),p=mathCos$2(d)*(e-n)/2+mathSin$2(d)*(t-r)/2,h=-1*mathSin$2(d)*(e-n)/2+mathCos$2(d)*(t-r)/2,f=p*p/(a*a)+h*h/(s*s);f>1&&(a*=mathSqrt$1(f),s*=mathSqrt$1(f));var g=(o===i?-1:1)*mathSqrt$1((a*a*(s*s)-a*a*(h*h)-s*s*(p*p))/(a*a*(h*h)+s*s*(p*p)))||0,m=g*a*h/s,y=g*-s*p/a,v=(e+n)/2+mathCos$2(d)*m-mathSin$2(d)*y,_=(t+r)/2+mathSin$2(d)*m+mathCos$2(d)*y,x=vAngle([1,0],[(p-m)/a,(h-y)/s]),S=[(p-m)/a,(h-y)/s],b=[(-1*p-m)/a,(-1*h-y)/s],T=vAngle(S,b);if(vRatio(S,b)<=-1&&(T=PI$7),vRatio(S,b)>=1&&(T=0),T<0){var A=Math.round(T/PI$7*1e6)/1e6;T=2*PI$7+A%2*PI$7}c.addData(u,v,_,a,s,x,T,d,i)}var commandReg=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,numberReg$1=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function createPathProxyFromString(e){var t=new PathProxy;if(!e)return t;var n,r=0,o=0,i=r,a=o,s=PathProxy.CMD,l=e.match(commandReg);if(!l)return t;for(var u=0;u<l.length;u++){for(var c=l[u],d=c.charAt(0),p=void 0,h=c.match(numberReg$1)||[],f=h.length,g=0;g<f;g++)h[g]=parseFloat(h[g]);for(var m=0;m<f;){var y=void 0,v=void 0,_=void 0,x=void 0,S=void 0,b=void 0,T=void 0,A=r,w=o,C=void 0,E=void 0;switch(d){case"l":r+=h[m++],o+=h[m++],p=s.L,t.addData(p,r,o);break;case"L":r=h[m++],o=h[m++],p=s.L,t.addData(p,r,o);break;case"m":r+=h[m++],o+=h[m++],p=s.M,t.addData(p,r,o),i=r,a=o,d="l";break;case"M":r=h[m++],o=h[m++],p=s.M,t.addData(p,r,o),i=r,a=o,d="L";break;case"h":r+=h[m++],p=s.L,t.addData(p,r,o);break;case"H":r=h[m++],p=s.L,t.addData(p,r,o);break;case"v":o+=h[m++],p=s.L,t.addData(p,r,o);break;case"V":o=h[m++],p=s.L,t.addData(p,r,o);break;case"C":p=s.C,t.addData(p,h[m++],h[m++],h[m++],h[m++],h[m++],h[m++]),r=h[m-2],o=h[m-1];break;case"c":p=s.C,t.addData(p,h[m++]+r,h[m++]+o,h[m++]+r,h[m++]+o,h[m++]+r,h[m++]+o),r+=h[m-2],o+=h[m-1];break;case"S":y=r,v=o,C=t.len(),E=t.data,n===s.C&&(y+=r-E[C-4],v+=o-E[C-3]),p=s.C,A=h[m++],w=h[m++],r=h[m++],o=h[m++],t.addData(p,y,v,A,w,r,o);break;case"s":y=r,v=o,C=t.len(),E=t.data,n===s.C&&(y+=r-E[C-4],v+=o-E[C-3]),p=s.C,A=r+h[m++],w=o+h[m++],r+=h[m++],o+=h[m++],t.addData(p,y,v,A,w,r,o);break;case"Q":A=h[m++],w=h[m++],r=h[m++],o=h[m++],p=s.Q,t.addData(p,A,w,r,o);break;case"q":A=h[m++]+r,w=h[m++]+o,r+=h[m++],o+=h[m++],p=s.Q,t.addData(p,A,w,r,o);break;case"T":y=r,v=o,C=t.len(),E=t.data,n===s.Q&&(y+=r-E[C-4],v+=o-E[C-3]),r=h[m++],o=h[m++],p=s.Q,t.addData(p,y,v,r,o);break;case"t":y=r,v=o,C=t.len(),E=t.data,n===s.Q&&(y+=r-E[C-4],v+=o-E[C-3]),r+=h[m++],o+=h[m++],p=s.Q,t.addData(p,y,v,r,o);break;case"A":_=h[m++],x=h[m++],S=h[m++],b=h[m++],T=h[m++],processArc(A=r,w=o,r=h[m++],o=h[m++],b,T,_,x,S,p=s.A,t);break;case"a":_=h[m++],x=h[m++],S=h[m++],b=h[m++],T=h[m++],processArc(A=r,w=o,r+=h[m++],o+=h[m++],b,T,_,x,S,p=s.A,t)}}"z"!==d&&"Z"!==d||(p=s.Z,t.addData(p),r=i,o=a),n=p}return t.toStatic(),t}var SVGPath=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.applyTransform=function(e){},t}(Path);function isPathProxy(e){return null!=e.setData}function createPathOptions(e,t){var n=createPathProxyFromString(e),r=extend$2({},t);return r.buildPath=function(e){if(isPathProxy(e)){e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t,1)}else{var t=e;n.rebuildPath(t,1)}},r.applyTransform=function(e){transformPath(n,e),this.dirtyShape()},r}function createFromString(e,t){return new SVGPath(createPathOptions(e,t))}function extendFromString(e,t){var n=createPathOptions(e,t);return function(e){function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return __extends(t,e),t}(SVGPath)}function mergePath$1(e,t){for(var n=[],r=e.length,o=0;o<r;o++){var i=e[o];n.push(i.getUpdatedPathProxy(!0))}var a=new Path(t);return a.createPathProxy(),a.buildPath=function(e){if(isPathProxy(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a}function clonePath(e,t){t=t||{};var n=new Path;return e.shape&&n.setShape(e.shape),n.setStyle(e.style),t.bakeTransform?transformPath(n.path,e.getComputedTransform()):t.toLocal?n.setLocalTransform(e.getComputedTransform()):n.copyTransform(e),n.buildPath=e.buildPath,n.applyTransform=n.applyTransform,n.z=e.z,n.z2=e.z2,n.zlevel=e.zlevel,n}var CircleShape=function(){this.cx=0,this.cy=0,this.r=0},Circle=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getDefaultShape=function(){return new CircleShape},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI)},t}(Path);Circle.prototype.type="circle";var EllipseShape=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},Ellipse=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getDefaultShape=function(){return new EllipseShape},t.prototype.buildPath=function(e,t){var n=.5522848,r=t.cx,o=t.cy,i=t.rx,a=t.ry,s=i*n,l=a*n;e.moveTo(r-i,o),e.bezierCurveTo(r-i,o-l,r-s,o-a,r,o-a),e.bezierCurveTo(r+s,o-a,r+i,o-l,r+i,o),e.bezierCurveTo(r+i,o+l,r+s,o+a,r,o+a),e.bezierCurveTo(r-s,o+a,r-i,o+l,r-i,o),e.closePath()},t}(Path);Ellipse.prototype.type="ellipse";var PI$6=Math.PI,PI2$3=2*PI$6,mathSin$1=Math.sin,mathCos$1=Math.cos,mathACos=Math.acos,mathATan2=Math.atan2,mathAbs$1=Math.abs,mathSqrt=Math.sqrt,mathMax$7=Math.max,mathMin$7=Math.min,e=1e-4;function intersect(t,n,r,o,i,a,s,l){var u=r-t,c=o-n,d=s-i,p=l-a,h=p*u-d*c;if(!(h*h<e))return[t+(h=(d*(n-a)-p*(t-i))/h)*u,n+h*c]}function computeCornerTangents(e,t,n,r,o,i,a){var s=e-n,l=t-r,u=(a?i:-i)/mathSqrt(s*s+l*l),c=u*l,d=-u*s,p=e+c,h=t+d,f=n+c,g=r+d,m=(p+f)/2,y=(h+g)/2,v=f-p,_=g-h,x=v*v+_*_,S=o-i,b=p*g-f*h,T=(_<0?-1:1)*mathSqrt(mathMax$7(0,S*S*x-b*b)),A=(b*_-v*T)/x,w=(-b*v-_*T)/x,C=(b*_+v*T)/x,E=(-b*v+_*T)/x,M=A-m,I=w-y,P=C-m,D=E-y;return M*M+I*I>P*P+D*D&&(A=C,w=E),{cx:A,cy:w,x0:-c,y0:-d,x1:A*(o/S-1),y1:w*(o/S-1)}}function normalizeCornerRadius(e){var t;if(isArray$1(e)){var n=e.length;if(!n)return e;t=1===n?[e[0],e[0],0,0]:2===n?[e[0],e[0],e[1],e[1]]:3===n?e.concat(e[2]):e}else t=[e,e,e,e];return t}function buildPath$1(t,n){var r,o=mathMax$7(n.r,0),i=mathMax$7(n.r0||0,0),a=o>0;if(a||i>0){if(a||(o=i,i=0),i>o){var s=o;o=i,i=s}var l=n.startAngle,u=n.endAngle;if(!isNaN(l)&&!isNaN(u)){var c=n.cx,d=n.cy,p=!!n.clockwise,h=mathAbs$1(u-l),f=h>PI2$3&&h%PI2$3;if(f>e&&(h=f),o>e)if(h>PI2$3-e)t.moveTo(c+o*mathCos$1(l),d+o*mathSin$1(l)),t.arc(c,d,o,l,u,!p),i>e&&(t.moveTo(c+i*mathCos$1(u),d+i*mathSin$1(u)),t.arc(c,d,i,u,l,p));else{var g=void 0,m=void 0,y=void 0,v=void 0,_=void 0,x=void 0,S=void 0,b=void 0,T=void 0,A=void 0,w=void 0,C=void 0,E=void 0,M=void 0,I=void 0,P=void 0,D=o*mathCos$1(l),k=o*mathSin$1(l),$=i*mathCos$1(u),R=i*mathSin$1(u),L=h>e;if(L){var O=n.cornerRadius;O&&(g=(r=normalizeCornerRadius(O))[0],m=r[1],y=r[2],v=r[3]);var N=mathAbs$1(o-i)/2;if(_=mathMin$7(N,y),x=mathMin$7(N,v),S=mathMin$7(N,g),b=mathMin$7(N,m),w=T=mathMax$7(_,x),C=A=mathMax$7(S,b),(T>e||A>e)&&(E=o*mathCos$1(u),M=o*mathSin$1(u),I=i*mathCos$1(l),P=i*mathSin$1(l),h<PI$6)){var B=intersect(D,k,I,P,E,M,$,R);if(B){var V=D-B[0],F=k-B[1],G=E-B[0],H=M-B[1],z=1/mathSin$1(mathACos((V*G+F*H)/(mathSqrt(V*V+F*F)*mathSqrt(G*G+H*H)))/2),U=mathSqrt(B[0]*B[0]+B[1]*B[1]);w=mathMin$7(T,(o-U)/(z+1)),C=mathMin$7(A,(i-U)/(z-1))}}}if(L)if(w>e){var j=mathMin$7(y,w),Y=mathMin$7(v,w),W=computeCornerTangents(I,P,D,k,o,j,p),q=computeCornerTangents(E,M,$,R,o,Y,p);t.moveTo(c+W.cx+W.x0,d+W.cy+W.y0),w<T&&j===Y?t.arc(c+W.cx,d+W.cy,w,mathATan2(W.y0,W.x0),mathATan2(q.y0,q.x0),!p):(j>0&&t.arc(c+W.cx,d+W.cy,j,mathATan2(W.y0,W.x0),mathATan2(W.y1,W.x1),!p),t.arc(c,d,o,mathATan2(W.cy+W.y1,W.cx+W.x1),mathATan2(q.cy+q.y1,q.cx+q.x1),!p),Y>0&&t.arc(c+q.cx,d+q.cy,Y,mathATan2(q.y1,q.x1),mathATan2(q.y0,q.x0),!p))}else t.moveTo(c+D,d+k),t.arc(c,d,o,l,u,!p);else t.moveTo(c+D,d+k);if(i>e&&L)if(C>e){j=mathMin$7(g,C),W=computeCornerTangents($,R,E,M,i,-(Y=mathMin$7(m,C)),p),q=computeCornerTangents(D,k,I,P,i,-j,p);t.lineTo(c+W.cx+W.x0,d+W.cy+W.y0),C<A&&j===Y?t.arc(c+W.cx,d+W.cy,C,mathATan2(W.y0,W.x0),mathATan2(q.y0,q.x0),!p):(Y>0&&t.arc(c+W.cx,d+W.cy,Y,mathATan2(W.y0,W.x0),mathATan2(W.y1,W.x1),!p),t.arc(c,d,i,mathATan2(W.cy+W.y1,W.cx+W.x1),mathATan2(q.cy+q.y1,q.cx+q.x1),p),j>0&&t.arc(c+q.cx,d+q.cy,j,mathATan2(q.y1,q.x1),mathATan2(q.y0,q.x0),!p))}else t.lineTo(c+$,d+R),t.arc(c,d,i,u,l,p);else t.lineTo(c+$,d+R)}else t.moveTo(c,d);t.closePath()}}}var SectorShape=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},Sector=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getDefaultShape=function(){return new SectorShape},t.prototype.buildPath=function(e,t){buildPath$1(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Path);Sector.prototype.type="sector";var RingShape=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Ring=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getDefaultShape=function(){return new RingShape},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,o=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,o,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,o,!0)},t}(Path);function smoothBezier(e,t,n,r){var o,i,a,s,l=[],u=[],c=[],d=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,h=e.length;p<h;p++)min$1(a,a,e[p]),max$1(s,s,e[p]);min$1(a,a,r[0]),max$1(s,s,r[1])}for(p=0,h=e.length;p<h;p++){var f=e[p];if(n)o=e[p?p-1:h-1],i=e[(p+1)%h];else{if(0===p||p===h-1){l.push(clone$5(e[p]));continue}o=e[p-1],i=e[p+1]}sub(u,i,o),scale$2(u,u,t);var g=distance(f,o),m=distance(f,i),y=g+m;0!==y&&(g/=y,m/=y),scale$2(c,u,-g),scale$2(d,u,m);var v=add([],f,c),_=add([],f,d);r&&(max$1(v,v,a),min$1(v,v,s),max$1(_,_,a),min$1(_,_,s)),l.push(v),l.push(_)}return n&&l.push(l.shift()),l}function buildPath(e,t,n){var r=t.smooth,o=t.points;if(o&&o.length>=2){if(r){var i=smoothBezier(o,r,n,t.smoothConstraint);e.moveTo(o[0][0],o[0][1]);for(var a=o.length,s=0;s<(n?a:a-1);s++){var l=i[2*s],u=i[2*s+1],c=o[(s+1)%a];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(o[0][0],o[0][1]);s=1;for(var d=o.length;s<d;s++)e.lineTo(o[s][0],o[s][1])}n&&e.closePath()}}Ring.prototype.type="ring";var PolygonShape=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},Polygon=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getDefaultShape=function(){return new PolygonShape},t.prototype.buildPath=function(e,t){buildPath(e,t,!0)},t}(Path);Polygon.prototype.type="polygon";var PolylineShape=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},Polyline$1=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new PolylineShape},t.prototype.buildPath=function(e,t){buildPath(e,t,!1)},t}(Path);Polyline$1.prototype.type="polyline";var subPixelOptimizeOutputShape={},LineShape=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},Line$1=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new LineShape},t.prototype.buildPath=function(e,t){var n,r,o,i;if(this.subPixelOptimize){var a=subPixelOptimizeLine$1(subPixelOptimizeOutputShape,t,this.style);n=a.x1,r=a.y1,o=a.x2,i=a.y2}else n=t.x1,r=t.y1,o=t.x2,i=t.y2;var s=t.percent;0!==s&&(e.moveTo(n,r),s<1&&(o=n*(1-s)+o*s,i=r*(1-s)+i*s),e.lineTo(o,i))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(Path);Line$1.prototype.type="line";var out=[],BezierCurveShape=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function someVectorAt(e,t,n){var r=e.cpx2,o=e.cpy2;return null!=r||null!=o?[(n?cubicDerivativeAt:cubicAt)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?cubicDerivativeAt:cubicAt)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?quadraticDerivativeAt:quadraticAt$1)(e.x1,e.cpx1,e.x2,t),(n?quadraticDerivativeAt:quadraticAt$1)(e.y1,e.cpy1,e.y2,t)]}var BezierCurve=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new BezierCurveShape},t.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,o=t.x2,i=t.y2,a=t.cpx1,s=t.cpy1,l=t.cpx2,u=t.cpy2,c=t.percent;0!==c&&(e.moveTo(n,r),null==l||null==u?(c<1&&(quadraticSubdivide(n,a,o,c,out),a=out[1],o=out[2],quadraticSubdivide(r,s,i,c,out),s=out[1],i=out[2]),e.quadraticCurveTo(a,s,o,i)):(c<1&&(cubicSubdivide(n,a,l,o,c,out),a=out[1],l=out[2],o=out[3],cubicSubdivide(r,s,u,i,c,out),s=out[1],u=out[2],i=out[3]),e.bezierCurveTo(a,s,l,u,o,i)))},t.prototype.pointAt=function(e){return someVectorAt(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=someVectorAt(this.shape,e,!0);return normalize$3(t,t)},t}(Path);BezierCurve.prototype.type="bezier-curve";var ArcShape=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Arc=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new ArcShape},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,o=Math.max(t.r,0),i=t.startAngle,a=t.endAngle,s=t.clockwise,l=Math.cos(i),u=Math.sin(i);e.moveTo(l*o+n,u*o+r),e.arc(n,r,o,i,a,!s)},t}(Path);Arc.prototype.type="arc";var CompoundPath=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return __extends(t,e),t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t=t||e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Path.prototype.getBoundingRect.call(this)},t}(Path),Gradient=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),LinearGradient=function(e){function t(t,n,r,o,i,a){var s=e.call(this,i)||this;return s.x=null==t?0:t,s.y=null==n?0:n,s.x2=null==r?1:r,s.y2=null==o?0:o,s.type="linear",s.global=a||!1,s}return __extends(t,e),t}(Gradient),RadialGradient=function(e){function t(t,n,r,o,i){var a=e.call(this,o)||this;return a.x=null==t?.5:t,a.y=null==n?.5:n,a.r=null==r?.5:r,a.type="radial",a.global=i||!1,a}return __extends(t,e),t}(Gradient),extent=[0,0],extent2=[0,0],minTv=new Point,maxTv=new Point,OrientedBoundingRect=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Point;for(n=0;n<2;n++)this._axes[n]=new Point;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,o=e.x,i=e.y,a=o+e.width,s=i+e.height;if(n[0].set(o,i),n[1].set(a,i),n[2].set(a,s),n[3].set(o,s),t)for(var l=0;l<4;l++)n[l].transform(t);Point.sub(r[0],n[1],n[0]),Point.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(l=0;l<2;l++)this._origin[l]=r[l].dot(n[0])},e.prototype.intersect=function(e,t){var n=!0,r=!t;return minTv.set(1/0,1/0),maxTv.set(0,0),!this._intersectCheckOneSide(this,e,minTv,maxTv,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(e,this,minTv,maxTv,r,-1)&&(n=!1,r)||r||Point.copy(t,n?minTv:maxTv),n},e.prototype._intersectCheckOneSide=function(e,t,n,r,o,i){for(var a=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,e._corners,extent),this._getProjMinMaxOnAxis(s,t._corners,extent2),extent[1]<extent2[0]||extent[0]>extent2[1]){if(a=!1,o)return a;var u=Math.abs(extent2[0]-extent[1]),c=Math.abs(extent[0]-extent2[1]);Math.min(u,c)>r.len()&&(u<c?Point.scale(r,l,-u*i):Point.scale(r,l,c*i))}else if(n){u=Math.abs(extent2[0]-extent[1]),c=Math.abs(extent[0]-extent2[1]);Math.min(u,c)<n.len()&&(u<c?Point.scale(n,l,u*i):Point.scale(n,l,-c*i))}}return a},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],o=this._origin,i=t[0].dot(r)+o[e],a=i,s=i,l=1;l<t.length;l++){var u=t[l].dot(r)+o[e];a=Math.min(u,a),s=Math.max(u,s)}n[0]=a,n[1]=s},e}(),m=[],IncrementalDisplayable=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return __extends(t,e),t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){(t=this._displayables[e]).parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new BoundingRect(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(m)),e.union(r)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1]))for(var r=0;r<this._displayables.length;r++){if(this._displayables[r].contain(e,t))return!0}return!1},t}(Displayable),transitionStore=makeInner();function getAnimationConfig(e,t,n,r,o){var i;if(t&&t.ecModel){var a=t.ecModel.getUpdatePayload();i=a&&a.animation}var s="update"===e;if(t&&t.isAnimationEnabled()){var l=void 0,u=void 0,c=void 0;return r?(l=retrieve2(r.duration,200),u=retrieve2(r.easing,"cubicOut"),c=0):(l=t.getShallow(s?"animationDurationUpdate":"animationDuration"),u=t.getShallow(s?"animationEasingUpdate":"animationEasing"),c=t.getShallow(s?"animationDelayUpdate":"animationDelay")),i&&(null!=i.duration&&(l=i.duration),null!=i.easing&&(u=i.easing),null!=i.delay&&(c=i.delay)),isFunction(c)&&(c=c(n,o)),isFunction(l)&&(l=l(n)),{duration:l||0,delay:c,easing:u}}return null}function animateOrSetProps(e,t,n,r,o,i,a){var s,l=!1;isFunction(o)?(a=i,i=o,o=null):isObject$3(o)&&(i=o.cb,a=o.during,l=o.isFrom,s=o.removeOpt,o=o.dataIndex);var u="leave"===e;u||t.stopAnimation("leave");var c=getAnimationConfig(e,r,o,u?s||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,o):null);if(c&&c.duration>0){var d={duration:c.duration,delay:c.delay||0,easing:c.easing,done:i,force:!!i||!!a,setToFinal:!u,scope:e,during:a};l?t.animateFrom(n,d):t.animateTo(n,d)}else t.stopAnimation(),!l&&t.attr(n),a&&a(1),i&&i()}function updateProps$1(e,t,n,r,o,i){animateOrSetProps("update",e,t,n,r,o,i)}function initProps(e,t,n,r,o,i){animateOrSetProps("enter",e,t,n,r,o,i)}function isElementRemoved(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++){if("leave"===e.animators[t].scope)return!0}return!1}function removeElement(e,t,n,r,o,i){isElementRemoved(e)||animateOrSetProps("leave",e,t,n,r,o,i)}function fadeOutDisplayable(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),removeElement(e,{style:{opacity:0}},t,n,r)}function removeElementWithFadeOut(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||fadeOutDisplayable(e,t,n,r)}):fadeOutDisplayable(e,t,n,r)}function saveOldStyle(e){transitionStore(e).oldStyle=e.style}function getOldStyle(e){return transitionStore(e).oldStyle}var mathMax$6=Math.max,mathMin$6=Math.min,_customShapeMap={};function extendShape(e){return Path.extend(e)}var extendPathFromString=extendFromString;function extendPath(e,t){return extendPathFromString(e,t)}function registerShape(e,t){_customShapeMap[e]=t}function getShapeClass(e){if(_customShapeMap.hasOwnProperty(e))return _customShapeMap[e]}function makePath(e,t,n,r){var o=createFromString(e,t);return n&&("center"===r&&(n=centerGraphic(n,o.getBoundingRect())),resizePath(o,n)),o}function makeImage(e,t,n){var r=new ZRImage({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var o={width:e.width,height:e.height};r.setStyle(centerGraphic(t,o))}}});return r}function centerGraphic(e,t){var n,r=t.width/t.height,o=e.height*r;return n=o<=e.width?e.height:(o=e.width)/r,{x:e.x+e.width/2-o/2,y:e.y+e.height/2-n/2,width:o,height:n}}var mergePath=mergePath$1;function resizePath(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function subPixelOptimizeLine(e,t){return subPixelOptimizeLine$1(e,e,{lineWidth:t}),e}function subPixelOptimizeRect(e){return subPixelOptimizeRect$1(e.shape,e.shape,e.style),e}var subPixelOptimize=subPixelOptimize$1;function getTransform$1(e,t){for(var n=identity([]);e&&e!==t;)mul(n,e.getLocalTransform(),n),e=e.parent;return n}function applyTransform(e,t,n){return t&&!isArrayLike(t)&&(t=Transformable.getLocalTransform(t)),n&&(t=invert([],t)),applyTransform$1([],e,t)}function transformDirection(e,t,n){var r=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),o=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),i=["left"===e?-r:"right"===e?r:0,"top"===e?-o:"bottom"===e?o:0];return i=applyTransform(i,t,n),Math.abs(i[0])>Math.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function isNotGroup(e){return!e.isGroup}function isPath$1(e){return null!=e.shape}function groupTransition(e,t,n){if(e&&t){var r,o=(r={},e.traverse(function(e){isNotGroup(e)&&e.anid&&(r[e.anid]=e)}),r);t.traverse(function(e){if(isNotGroup(e)&&e.anid){var t=o[e.anid];if(t){var r=i(e);e.attr(i(t)),updateProps$1(e,r,n,getECData(e).dataIndex)}}})}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return isPath$1(e)&&(t.shape=extend$2({},e.shape)),t}}function clipPointsByRect(e,t){return map$1(e,function(e){var n=e[0];n=mathMax$6(n,t.x),n=mathMin$6(n,t.x+t.width);var r=e[1];return r=mathMax$6(r,t.y),[n,r=mathMin$6(r,t.y+t.height)]})}function clipRectByRect(e,t){var n=mathMax$6(e.x,t.x),r=mathMin$6(e.x+e.width,t.x+t.width),o=mathMax$6(e.y,t.y),i=mathMin$6(e.y+e.height,t.y+t.height);if(r>=n&&i>=o)return{x:n,y:o,width:r-n,height:i-o}}function createIcon(e,t,n){var r=extend$2({rectHover:!0},t),o=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(o.image=e.slice(8),defaults$2(o,n),new ZRImage(r)):makePath(e.replace("path://",""),r,n,"center")}function linePolygonIntersect(e,t,n,r,o){for(var i=0,a=o[o.length-1];i<o.length;i++){var s=o[i];if(lineLineIntersect$1(e,t,n,r,s[0],s[1],a[0],a[1]))return!0;a=s}}function lineLineIntersect$1(e,t,n,r,o,i,a,s){var l=n-e,u=r-t,c=a-o,d=s-i,p=crossProduct2d$1(c,d,l,u);if(nearZero(p))return!1;var h=e-o,f=t-i,g=crossProduct2d$1(h,f,l,u)/p;if(g<0||g>1)return!1;var m=crossProduct2d$1(h,f,c,d)/p;return!(m<0||m>1)}function crossProduct2d$1(e,t,n,r){return e*r-n*t}function nearZero(e){return e<=1e-6&&e>=-1e-6}function setTooltipConfig(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,o=isString(t)?{formatter:t}:t,i=n.mainType,a=n.componentIndex,s={componentType:i,name:r,$vars:["name"]};s[i+"Index"]=a;var l=e.formatterParamsExtra;l&&each$f(keys(l),function(e){hasOwn(s,e)||(s[e]=l[e],s.$vars.push(e))});var u=getECData(e.el);u.componentMainType=i,u.componentIndex=a,u.tooltipConfig={name:r,option:defaults$2({content:r,encodeHTMLContent:!0,formatterParams:s},o)}}function traverseElement(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function traverseElements(e,t){if(e)if(isArray$1(e))for(var n=0;n<e.length;n++)traverseElement(e[n],t);else traverseElement(e,t)}registerShape("circle",Circle),registerShape("ellipse",Ellipse),registerShape("sector",Sector),registerShape("ring",Ring),registerShape("polygon",Polygon),registerShape("polyline",Polyline$1),registerShape("rect",Rect$2),registerShape("line",Line$1),registerShape("bezierCurve",BezierCurve),registerShape("arc",Arc);var graphic$1=Object.freeze(Object.defineProperty({__proto__:null,Arc:Arc,BezierCurve:BezierCurve,BoundingRect:BoundingRect,Circle:Circle,CompoundPath:CompoundPath,Ellipse:Ellipse,Group:Group$3,Image:ZRImage,IncrementalDisplayable:IncrementalDisplayable,Line:Line$1,LinearGradient:LinearGradient,OrientedBoundingRect:OrientedBoundingRect,Path:Path,Point:Point,Polygon:Polygon,Polyline:Polyline$1,RadialGradient:RadialGradient,Rect:Rect$2,Ring:Ring,Sector:Sector,Text:ZRText,applyTransform:applyTransform,clipPointsByRect:clipPointsByRect,clipRectByRect:clipRectByRect,createIcon:createIcon,extendPath:extendPath,extendShape:extendShape,getShapeClass:getShapeClass,getTransform:getTransform$1,groupTransition:groupTransition,initProps:initProps,isElementRemoved:isElementRemoved,lineLineIntersect:lineLineIntersect$1,linePolygonIntersect:linePolygonIntersect,makeImage:makeImage,makePath:makePath,mergePath:mergePath,registerShape:registerShape,removeElement:removeElement,removeElementWithFadeOut:removeElementWithFadeOut,resizePath:resizePath,setTooltipConfig:setTooltipConfig,subPixelOptimize:subPixelOptimize,subPixelOptimizeLine:subPixelOptimizeLine,subPixelOptimizeRect:subPixelOptimizeRect,transformDirection:transformDirection,traverseElements:traverseElements,updateProps:updateProps$1},Symbol.toStringTag,{value:"Module"})),EMPTY_OBJ={};function setLabelText(e,t){for(var n=0;n<SPECIAL_STATES.length;n++){var r=SPECIAL_STATES[n],o=t[r],i=e.ensureState(r);i.style=i.style||{},i.style.text=o}var a=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(a,!0)}function getLabelText(e,t,n){var r,o=e.labelFetcher,i=e.labelDataIndex,a=e.labelDimIndex,s=t.normal;o&&(r=o.getFormattedLabel(i,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==r&&(r=isFunction(e.defaultText)?e.defaultText(i,e,n):e.defaultText);for(var l={normal:r},u=0;u<SPECIAL_STATES.length;u++){var c=SPECIAL_STATES[u],d=t[c];l[c]=retrieve2(o?o.getFormattedLabel(i,c,null,a,d&&d.get("formatter")):null,r)}return l}function setLabelStyle(e,t,n,r){n=n||EMPTY_OBJ;for(var o=e instanceof ZRText,i=!1,a=0;a<DISPLAY_STATES.length;a++){if((p=t[DISPLAY_STATES[a]])&&p.getShallow("show")){i=!0;break}}var s=o?e:e.getTextContent();if(i){o||(s||(s=new ZRText,e.setTextContent(s)),e.stateProxy&&(s.stateProxy=e.stateProxy));var l=getLabelText(n,t),u=t.normal,c=!!u.getShallow("show"),d=createTextStyle$1(u,r&&r.normal,n,!1,!o);d.text=l.normal,o||e.setTextConfig(createTextConfig(u,n,!1));for(a=0;a<SPECIAL_STATES.length;a++){var p,h=SPECIAL_STATES[a];if(p=t[h]){var f=s.ensureState(h),g=!!retrieve2(p.getShallow("show"),c);if(g!==c&&(f.ignore=!g),f.style=createTextStyle$1(p,r&&r[h],n,!0,!o),f.style.text=l[h],!o)e.ensureState(h).textConfig=createTextConfig(p,n,!0)}}s.silent=!!u.getShallow("silent"),null!=s.style.x&&(d.x=s.style.x),null!=s.style.y&&(d.y=s.style.y),s.ignore=!c,s.useStyle(d),s.dirty(),n.enableTextSetter&&(labelInner(s).setLabelText=function(e){var r=getLabelText(n,t,e);setLabelText(s,r)})}else s&&(s.ignore=!0);e.dirty()}function getLabelStatesModels(e,t){t=t||"label";for(var n={normal:e.getModel(t)},r=0;r<SPECIAL_STATES.length;r++){var o=SPECIAL_STATES[r];n[o]=e.getModel([o,t])}return n}function createTextStyle$1(e,t,n,r,o){var i={};return setTextStyleCommon(i,e,n,r,o),t&&extend$2(i,t),i}function createTextConfig(e,t,n){t=t||{};var r,o={},i=e.getShallow("rotate"),a=retrieve2(e.getShallow("distance"),n?null:5),s=e.getShallow("offset");return"outside"===(r=e.getShallow("position")||(n?null:"inside"))&&(r=t.defaultOutsidePosition||"top"),null!=r&&(o.position=r),null!=s&&(o.offset=s),null!=i&&(i*=Math.PI/180,o.rotation=i),null!=a&&(o.distance=a),o.outsideFill="inherit"===e.get("color")?t.inheritColor||null:"auto",o}function setTextStyleCommon(e,t,n,r,o){n=n||EMPTY_OBJ;var i,a=t.ecModel,s=a&&a.option.textStyle,l=getRichItemNames(t);if(l)for(var u in i={},l)if(l.hasOwnProperty(u)){var c=t.getModel(["rich",u]);setTokenTextStyle(i[u]={},c,s,n,r,o,!1,!0)}i&&(e.rich=i);var d=t.get("overflow");d&&(e.overflow=d);var p=t.get("minMargin");null!=p&&(e.margin=p),setTokenTextStyle(e,t,s,n,r,o,!0,!1)}function getRichItemNames(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||EMPTY_OBJ).rich;if(n){t=t||{};for(var r=keys(n),o=0;o<r.length;o++){t[r[o]]=1}}e=e.parentModel}return t}var TEXT_PROPS_WITH_GLOBAL=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],TEXT_PROPS_SELF=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],TEXT_PROPS_BOX=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function setTokenTextStyle(e,t,n,r,o,i,a,s){n=!o&&n||EMPTY_OBJ;var l=r&&r.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),d=retrieve2(t.getShallow("opacity"),n.opacity);"inherit"!==u&&"auto"!==u||(u=l||null),"inherit"!==c&&"auto"!==c||(c=l||null),i||(u=u||n.color,c=c||n.textBorderColor),null!=u&&(e.fill=u),null!=c&&(e.stroke=c);var p=retrieve2(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=p&&(e.lineWidth=p);var h=retrieve2(t.getShallow("textBorderType"),n.textBorderType);null!=h&&(e.lineDash=h);var f=retrieve2(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=f&&(e.lineDashOffset=f),o||null!=d||s||(d=r&&r.defaultOpacity),null!=d&&(e.opacity=d),o||i||null==e.fill&&r.inheritColor&&(e.fill=r.inheritColor);for(var g=0;g<TEXT_PROPS_WITH_GLOBAL.length;g++){var m=TEXT_PROPS_WITH_GLOBAL[g];null!=(v=retrieve2(t.getShallow(m),n[m]))&&(e[m]=v)}for(g=0;g<TEXT_PROPS_SELF.length;g++){m=TEXT_PROPS_SELF[g];null!=(v=t.getShallow(m))&&(e[m]=v)}if(null==e.verticalAlign){var y=t.getShallow("baseline");null!=y&&(e.verticalAlign=y)}if(!a||!r.disableBox){for(g=0;g<TEXT_PROPS_BOX.length;g++){var v;m=TEXT_PROPS_BOX[g];null!=(v=t.getShallow(m))&&(e[m]=v)}var _=t.getShallow("borderType");null!=_&&(e.borderDash=_),"auto"!==e.backgroundColor&&"inherit"!==e.backgroundColor||!l||(e.backgroundColor=l),"auto"!==e.borderColor&&"inherit"!==e.borderColor||!l||(e.borderColor=l)}}function getFont(e,t){var n=t&&t.getModel("textStyle");return trim$1([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}var labelInner=makeInner();function setLabelValueAnimation(e,t,n,r){if(e){var o=labelInner(e);o.prevValue=o.value,o.value=n;var i=t.normal;o.valueAnimation=i.get("valueAnimation"),o.valueAnimation&&(o.precision=i.get("precision"),o.defaultInterpolatedText=r,o.statesModels=t)}}function animateLabelValue(e,t,n,r,o){var i=labelInner(e);if(i.valueAnimation&&i.prevValue!==i.value){var a=i.defaultInterpolatedText,s=retrieve2(i.interpolatedValue,i.prevValue),l=i.value;e.percent=0,(null==i.prevValue?initProps:updateProps$1)(e,{percent:1},r,t,null,function(r){var u=interpolateRawValues(n,i.precision,s,l,r);i.interpolatedValue=1===r?null:u;var c=getLabelText({labelDataIndex:t,labelFetcher:o,defaultText:a?a(u):u+""},i.statesModels,u);setLabelText(e,c)})}}var PATH_COLOR=["textStyle","color"],textStyleParams=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],tmpText=new ZRText,TextStyleMixin=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(PATH_COLOR):null)},e.prototype.getFont=function(){return getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<textStyleParams.length;n++)t[textStyleParams[n]]=this.getShallow(textStyleParams[n]);return tmpText.useStyle(t),tmpText.update(),tmpText.getBoundingRect()},e}(),LINE_STYLE_KEY_MAP=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],getLineStyle=makeStyleMapper(LINE_STYLE_KEY_MAP),LineStyleMixin=function(){function e(){}return e.prototype.getLineStyle=function(e){return getLineStyle(this,e)},e}(),ITEM_STYLE_KEY_MAP=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],getItemStyle=makeStyleMapper(ITEM_STYLE_KEY_MAP),ItemStyleMixin=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return getItemStyle(this,e,t)},e}(),Model=exports("bJ",function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){},e.prototype.mergeOption=function(e,t){merge(this.option,e,!0)},e.prototype.get=function(e,t){return null==e?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,r=null==n?n:n[e];if(null==r&&!t){var o=this.parentModel;o&&(r=o.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=null!=t,o=r?this.parsePath(t):null;return new e(r?this._doGet(o):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(o)),this.ecModel)},e.prototype.isEmpty=function(){return null==this.option},e.prototype.restoreData=function(){},e.prototype.clone=function(){return new(0,this.constructor)(clone$6(this.option))},e.prototype.parsePath=function(e){return"string"==typeof e?e.split("."):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!env.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var r=0;r<e.length&&(!e[r]||null!=(n=n&&"object"===_typeof2(n)?n[e[r]]:null));r++);return null==n&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}());enableClassExtend(Model),enableClassCheck(Model),mixin(Model,LineStyleMixin),mixin(Model,ItemStyleMixin),mixin(Model,AreaStyleMixin),mixin(Model,TextStyleMixin);var base=Math.round(10*Math.random());function getUID(e){return[e||"",base++].join("_")}function enableSubTypeDefaulter(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=parseClassType(e);t[r.main]=n},e.determineSubType=function(n,r){var o=r.type;if(!o){var i=parseClassType(n).main;e.hasSubTypes(n)&&t[i]&&(o=t[i](r))}return o}}function enableTopologicalTravel(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,r,o,i){if(e.length){var a=function(e){var r={},o=[];return each$f(e,function(i){var a=n(r,i),s=function(e,t){var n=[];return each$f(e,function(e){indexOf(t,e)>=0&&n.push(e)}),n}(a.originalDeps=t(i),e);a.entryCount=s.length,0===a.entryCount&&o.push(i),each$f(s,function(e){indexOf(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(r,e);indexOf(t.successor,e)<0&&t.successor.push(i)})}),{graph:r,noEntryList:o}}(r),s=a.graph,l=a.noEntryList,u={};for(each$f(e,function(e){u[e]=!0});l.length;){var c=l.pop(),d=s[c],p=!!u[c];p&&(o.call(i,c,d.originalDeps.slice()),delete u[c]),each$f(d.successor,p?f:h)}each$f(u,function(){throw new Error("")})}function h(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function f(e){u[e]=!0,h(e)}}}function inheritDefaultOption(e,t){return merge(merge({},e,!0),t,!0)}var langEN={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},langZH={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}},LOCALE_ZH="ZH",LOCALE_EN="EN",DEFAULT_LOCALE=LOCALE_EN,localeStorage={},localeModels={},SYSTEM_LANG=env.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage||DEFAULT_LOCALE).toUpperCase().indexOf(LOCALE_ZH)>-1?LOCALE_ZH:DEFAULT_LOCALE;function registerLocale(e,t){e=e.toUpperCase(),localeModels[e]=new Model(t),localeStorage[e]=t}function createLocaleObject(e){if(isString(e)){var t=localeStorage[e.toUpperCase()]||{};return e===LOCALE_ZH||e===LOCALE_EN?clone$6(t):merge(clone$6(t),clone$6(localeStorage[DEFAULT_LOCALE]),!1)}return merge(clone$6(e),clone$6(localeStorage[DEFAULT_LOCALE]),!1)}function getLocaleModel(e){return localeModels[e]}function getDefaultLocaleModel(){return localeModels[DEFAULT_LOCALE]}registerLocale(LOCALE_EN,langEN),registerLocale(LOCALE_ZH,langZH);var ONE_SECOND=1e3,ONE_MINUTE=60*ONE_SECOND,ONE_HOUR=60*ONE_MINUTE,ONE_DAY=24*ONE_HOUR,ONE_YEAR=365*ONE_DAY,defaultLeveledFormatter={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}"},fullDayFormatter="{yyyy}-{MM}-{dd}",fullLeveledFormatter={year:"{yyyy}",month:"{yyyy}-{MM}",day:fullDayFormatter,hour:fullDayFormatter+" "+defaultLeveledFormatter.hour,minute:fullDayFormatter+" "+defaultLeveledFormatter.minute,second:fullDayFormatter+" "+defaultLeveledFormatter.second,millisecond:defaultLeveledFormatter.none},primaryTimeUnits=["year","month","day","hour","minute","second","millisecond"],timeUnits=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function pad(e,t){return"0000".substr(0,t-(e+="").length)+e}function getPrimaryTimeUnit(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function isPrimaryTimeUnit(e){return e===getPrimaryTimeUnit(e)}function getDefaultFormatPrecisionOfInterval(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function format$1(e,t,n,r){var o=parseDate(e),i=o[fullYearGetterName(n)](),a=o[monthGetterName(n)]()+1,s=Math.floor((a-1)/3)+1,l=o[dateGetterName(n)](),u=o["get"+(n?"UTC":"")+"Day"](),c=o[hoursGetterName(n)](),d=(c-1)%12+1,p=o[minutesGetterName(n)](),h=o[secondsGetterName(n)](),f=o[millisecondsGetterName(n)](),g=c>=12?"pm":"am",m=g.toUpperCase(),y=(r instanceof Model?r:getLocaleModel(r||SYSTEM_LANG)||getDefaultLocaleModel()).getModel("time"),v=y.get("month"),_=y.get("monthAbbr"),x=y.get("dayOfWeek"),S=y.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,g+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,pad(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,v[a-1]).replace(/{MMM}/g,_[a-1]).replace(/{MM}/g,pad(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,pad(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,pad(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,pad(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,pad(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,pad(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,pad(f,3)).replace(/{S}/g,f+"")}function leveledFormat(e,t,n,r,o){var i=null;if(isString(n))i=n;else if(isFunction(n))i=n(e.value,t,{level:e.level});else{var a=extend$2({},defaultLeveledFormatter);if(e.level>0)for(var s=0;s<primaryTimeUnits.length;++s)a[primaryTimeUnits[s]]="{primary|"+a[primaryTimeUnits[s]]+"}";var l=n?!1===n.inherit?n:defaults$2(n,a):a,u=getUnitFromValue(e.value,o);if(l[u])i=l[u];else if(l.inherit){for(s=timeUnits.indexOf(u)-1;s>=0;--s)if(l[u]){i=l[u];break}i=i||a.none}if(isArray$1(i)){var c=null==e.level?0:e.level>=0?e.level:i.length+e.level;i=i[c=Math.min(c,i.length-1)]}}return format$1(new Date(e.value),i,o,r)}function getUnitFromValue(e,t){var n=parseDate(e),r=n[monthGetterName(t)]()+1,o=n[dateGetterName(t)](),i=n[hoursGetterName(t)](),a=n[minutesGetterName(t)](),s=n[secondsGetterName(t)](),l=0===n[millisecondsGetterName(t)](),u=l&&0===s,c=u&&0===a,d=c&&0===i,p=d&&1===o;return p&&1===r?"year":p?"month":d?"day":c?"hour":u?"minute":l?"second":"millisecond"}function getUnitValue(e,t,n){var r=isNumber(e)?parseDate(e):e;switch(t=t||getUnitFromValue(e,n)){case"year":return r[fullYearGetterName(n)]();case"half-year":return r[monthGetterName(n)]()>=6?1:0;case"quarter":return Math.floor((r[monthGetterName(n)]()+1)/4);case"month":return r[monthGetterName(n)]();case"day":return r[dateGetterName(n)]();case"half-day":return r[hoursGetterName(n)]()/24;case"hour":return r[hoursGetterName(n)]();case"minute":return r[minutesGetterName(n)]();case"second":return r[secondsGetterName(n)]();case"millisecond":return r[millisecondsGetterName(n)]()}}function fullYearGetterName(e){return e?"getUTCFullYear":"getFullYear"}function monthGetterName(e){return e?"getUTCMonth":"getMonth"}function dateGetterName(e){return e?"getUTCDate":"getDate"}function hoursGetterName(e){return e?"getUTCHours":"getHours"}function minutesGetterName(e){return e?"getUTCMinutes":"getMinutes"}function secondsGetterName(e){return e?"getUTCSeconds":"getSeconds"}function millisecondsGetterName(e){return e?"getUTCMilliseconds":"getMilliseconds"}function fullYearSetterName(e){return e?"setUTCFullYear":"setFullYear"}function monthSetterName(e){return e?"setUTCMonth":"setMonth"}function dateSetterName(e){return e?"setUTCDate":"setDate"}function hoursSetterName(e){return e?"setUTCHours":"setHours"}function minutesSetterName(e){return e?"setUTCMinutes":"setMinutes"}function secondsSetterName(e){return e?"setUTCSeconds":"setSeconds"}function millisecondsSetterName(e){return e?"setUTCMilliseconds":"setMilliseconds"}function getTextRect(e,t,n,r,o,i,a,s){return new ZRText({style:{text:e,font:t,align:n,verticalAlign:r,padding:o,rich:i,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()}function addCommas(e){if(!isNumeric(e))return isString(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function toCamelCase(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var normalizeCssArray=normalizeCssArray$1;function makeValueReadable(e,t,n){function r(e){return e&&trim$1(e)?e:"-"}function o(e){return!(null==e||isNaN(e)||!isFinite(e))}var i="time"===t,a=e instanceof Date;if(i||a){var s=i?parseDate(e):e;if(!isNaN(+s))return format$1(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return isStringSafe(e)?r(e):isNumber(e)&&o(e)?e+"":"-";var l=numericToNumber(e);return o(l)?addCommas(l):isStringSafe(e)?r(e):"boolean"==typeof e?e+"":"-"}var TPL_VAR_ALIAS=["a","b","c","d","e","f","g"],wrapVar=function(e,t){return"{"+e+(null==t?"":t)+"}"};function formatTpl(e,t,n){isArray$1(t)||(t=[t]);var r=t.length;if(!r)return"";for(var o=t[0].$vars||[],i=0;i<o.length;i++){var a=TPL_VAR_ALIAS[i];e=e.replace(wrapVar(a),wrapVar(a,0))}for(var s=0;s<r;s++)for(var l=0;l<o.length;l++){var u=t[s][o[l]];e=e.replace(wrapVar(TPL_VAR_ALIAS[l],s),n?encodeHTML(u):u)}return e}function formatTplSimple(e,t,n){return each$f(t,function(t,n){e=e.replace("{"+n+"}",t)}),e}function getTooltipMarker(e,t){var n=isString(e)?{color:e,extraCssText:t}:e||{},r=n.color,o=n.type;t=n.extraCssText;var i=n.renderMode||"html";return r?"html"===i?"subItem"===o?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+encodeHTML(r)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+encodeHTML(r)+";"+(t||"")+'"></span>':{renderMode:i,content:"{"+(n.markerId||"markerX")+"|}  ",style:"subItem"===o?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}function formatTime(e,t,n){"week"!==e&&"month"!==e&&"quarter"!==e&&"half-year"!==e&&"year"!==e||(e="MM-dd\nyyyy");var r=parseDate(t),o=n?"getUTC":"get",i=r[o+"FullYear"](),a=r[o+"Month"]()+1,s=r[o+"Date"](),l=r[o+"Hours"](),u=r[o+"Minutes"](),c=r[o+"Seconds"](),d=r[o+"Milliseconds"]();return e=e.replace("MM",pad(a,2)).replace("M",a).replace("yyyy",i).replace("yy",pad(i%100+"",2)).replace("dd",pad(s,2)).replace("d",s).replace("hh",pad(l,2)).replace("h",l).replace("mm",pad(u,2)).replace("m",u).replace("ss",pad(c,2)).replace("s",c).replace("SSS",pad(d,3))}function capitalFirst(e){return e?e.charAt(0).toUpperCase()+e.substr(1):e}function convertToColorString(e,t){return t=t||"transparent",isString(e)?e:isObject$3(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function windowOpen(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var each$e=each$f,LOCATION_PARAMS=["left","right","top","bottom","width","height"],HV_NAMES=[["width","left","right"],["height","top","bottom"]];function boxLayout(e,t,n,r,o){var i=0,a=0;null==r&&(r=1/0),null==o&&(o=1/0);var s=0;t.eachChild(function(l,u){var c,d,p=l.getBoundingRect(),h=t.childAt(u+1),f=h&&h.getBoundingRect();if("horizontal"===e){var g=p.width+(f?-f.x+p.x:0);(c=i+g)>r||l.newline?(i=0,c=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var m=p.height+(f?-f.y+p.y:0);(d=a+m)>o||l.newline?(i+=s+n,a=0,d=m,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=i,l.y=a,l.markRedraw(),"horizontal"===e?i=c+n:a=d+n)})}var box=boxLayout;function getAvailableSize(e,t,n){var r=t.width,o=t.height,i=parsePercent(e.left,r),a=parsePercent(e.top,o),s=parsePercent(e.right,r),l=parsePercent(e.bottom,o);return(isNaN(i)||isNaN(parseFloat(e.left)))&&(i=0),(isNaN(s)||isNaN(parseFloat(e.right)))&&(s=r),(isNaN(a)||isNaN(parseFloat(e.top)))&&(a=0),(isNaN(l)||isNaN(parseFloat(e.bottom)))&&(l=o),n=normalizeCssArray(n||0),{width:Math.max(s-i-n[1]-n[3],0),height:Math.max(l-a-n[0]-n[2],0)}}function getLayoutRect(e,t,n){n=normalizeCssArray(n||0);var r=t.width,o=t.height,i=parsePercent(e.left,r),a=parsePercent(e.top,o),s=parsePercent(e.right,r),l=parsePercent(e.bottom,o),u=parsePercent(e.width,r),c=parsePercent(e.height,o),d=n[2]+n[0],p=n[1]+n[3],h=e.aspect;switch(isNaN(u)&&(u=r-s-p-i),isNaN(c)&&(c=o-l-d-a),null!=h&&(isNaN(u)&&isNaN(c)&&(h>r/o?u=.8*r:c=.8*o),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(i)&&(i=r-s-u-p),isNaN(a)&&(a=o-l-c-d),e.left||e.right){case"center":i=r/2-u/2-n[3];break;case"right":i=r-u-p}switch(e.top||e.bottom){case"middle":case"center":a=o/2-c/2-n[0];break;case"bottom":a=o-c-d}i=i||0,a=a||0,isNaN(u)&&(u=r-p-i-(s||0)),isNaN(c)&&(c=o-d-a-(l||0));var f=new BoundingRect(i+n[3],a+n[0],u,c);return f.margin=n,f}function positionElement(e,t,n,r,o,i){var a,s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],u=o&&o.boundingMode||"all";if((i=i||e).x=e.x,i.y=e.y,!s&&!l)return!1;if("raw"===u)a="group"===e.type?new BoundingRect(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(a=e.getBoundingRect(),e.needLocalTransform()){var c=e.getLocalTransform();(a=a.clone()).applyTransform(c)}var d=getLayoutRect(defaults$2({width:a.width,height:a.height},t),n,r),p=s?d.x-a.x:0,h=l?d.y-a.y:0;return"raw"===u?(i.x=p,i.y=h):(i.x+=p,i.y+=h),i===e&&e.markRedraw(),!0}function sizeCalculable(e,t){return null!=e[HV_NAMES[t][0]]||null!=e[HV_NAMES[t][1]]&&null!=e[HV_NAMES[t][2]]}function fetchLayoutMode(e){var t=e.layoutMode||e.constructor.layoutMode;return isObject$3(t)?t:t?{type:t}:null}function mergeLayoutParam(e,t,n){var r=n&&n.ignoreSize;!isArray$1(r)&&(r=[r,r]);var o=a(HV_NAMES[0],0),i=a(HV_NAMES[1],1);function a(n,o){var i={},a=0,u={},c=0;if(each$e(n,function(t){u[t]=e[t]}),each$e(n,function(e){s(t,e)&&(i[e]=u[e]=t[e]),l(i,e)&&a++,l(u,e)&&c++}),r[o])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(2!==c&&a){if(a>=2)return i;for(var d=0;d<n.length;d++){var p=n[d];if(!s(i,p)&&s(e,p)){i[p]=e[p];break}}return i}return u}function s(e,t){return e.hasOwnProperty(t)}function l(e,t){return null!=e[t]&&"auto"!==e[t]}function u(e,t,n){each$e(e,function(e){t[e]=n[e]})}u(HV_NAMES[0],e,o),u(HV_NAMES[1],e,i)}function getLayoutParams(e){return copyLayoutParams({},e)}function copyLayoutParams(e,t){return t&&e&&each$e(LOCATION_PARAMS,function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e}curry$1(boxLayout,"vertical"),curry$1(boxLayout,"horizontal");var inner$l=makeInner(),ComponentModel=exports("bx",function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o.uid=getUID("ec_cpt_model"),o}return __extends(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=fetchLayoutMode(this),r=n?getLayoutParams(e):{};merge(e,t.getTheme().get(this.mainType)),merge(e,this.getDefaultOption()),n&&mergeLayoutParam(e,r,n)},t.prototype.mergeOption=function(e,t){merge(this.option,e,!0);var n=fetchLayoutMode(this);n&&mergeLayoutParam(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!isExtendedClass(e))return e.defaultOption;var t=inner$l(this);if(!t.defaultOption){for(var n=[],r=e;r;){var o=r.prototype.defaultOption;o&&n.push(o),r=r.superClass}for(var i={},a=n.length-1;a>=0;a--)i=merge(i,n[a],!0);t.defaultOption=i}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",r=e+"Id";return queryReferringComponents(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(Model));function getDependencies(e){var t=[];return each$f(ComponentModel.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=map$1(t,function(e){return parseClassType(e).main}),"dataset"!==e&&indexOf(t,"dataset")<=0&&t.unshift("dataset"),t}mountExtend(ComponentModel,Model),enableClassManagement(ComponentModel),enableSubTypeDefaulter(ComponentModel),enableTopologicalTravel(ComponentModel,getDependencies);var platform="";"undefined"!=typeof navigator&&(platform=navigator.platform||"");var decalColor="rgba(0, 0, 0, 0.2)",globalDefault={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:decalColor,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:decalColor,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:decalColor,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:decalColor,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:decalColor,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:decalColor,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:platform.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},VISUAL_DIMENSIONS=createHashMap(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),SOURCE_FORMAT_ORIGINAL="original",SOURCE_FORMAT_ARRAY_ROWS="arrayRows",SOURCE_FORMAT_OBJECT_ROWS="objectRows",SOURCE_FORMAT_KEYED_COLUMNS="keyedColumns",SOURCE_FORMAT_TYPED_ARRAY="typedArray",SOURCE_FORMAT_UNKNOWN="unknown",SERIES_LAYOUT_BY_COLUMN="column",SERIES_LAYOUT_BY_ROW="row",BE_ORDINAL={Must:1,Might:2,Not:3},innerGlobalModel=makeInner();function resetSourceDefaulter(e){innerGlobalModel(e).datasetMap=createHashMap()}function makeSeriesEncodeForAxisCoordSys(e,t,n){var r={},o=querySeriesUpstreamDatasetModel(t);if(!o||!e)return r;var i,a,s=[],l=[],u=t.ecModel,c=innerGlobalModel(u).datasetMap,d=o.uid+"_"+n.seriesLayoutBy;each$f(e=e.slice(),function(t,n){var o=isObject$3(t)?t:e[n]={name:t};"ordinal"===o.type&&null==i&&(i=n,a=f(o)),r[o.name]=[]});var p=c.get(d)||c.set(d,{categoryWayDim:a,valueWayDim:0});function h(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function f(e){var t=e.dimsDef;return t?t.length:1}return each$f(e,function(e,t){var n=e.name,o=f(e);if(null==i){var a=p.valueWayDim;h(r[n],a,o),h(l,a,o),p.valueWayDim+=o}else if(i===t)h(r[n],0,o),h(s,0,o);else{a=p.categoryWayDim;h(r[n],a,o),h(l,a,o),p.categoryWayDim+=o}}),s.length&&(r.itemName=s),l.length&&(r.seriesName=l),r}function makeSeriesEncodeForNameBased(e,t,n){var r={};if(!querySeriesUpstreamDatasetModel(e))return r;var o,i=t.sourceFormat,a=t.dimensionsDefine;i!==SOURCE_FORMAT_OBJECT_ROWS&&i!==SOURCE_FORMAT_KEYED_COLUMNS||each$f(a,function(e,t){"name"===(isObject$3(e)?e.name:e)&&(o=t)});var s=function(){for(var e={},r={},s=[],l=0,u=Math.min(5,n);l<u;l++){var c=doGuessOrdinal(t.data,i,t.seriesLayoutBy,a,t.startIndex,l);s.push(c);var d=c===BE_ORDINAL.Not;if(d&&null==e.v&&l!==o&&(e.v=l),(null==e.n||e.n===e.v||!d&&s[e.n]===BE_ORDINAL.Not)&&(e.n=l),p(e)&&s[e.n]!==BE_ORDINAL.Not)return e;d||(c===BE_ORDINAL.Might&&null==r.v&&l!==o&&(r.v=l),null!=r.n&&r.n!==r.v||(r.n=l))}function p(e){return null!=e.v&&null!=e.n}return p(e)?e:p(r)?r:null}();if(s){r.value=[s.v];var l=null!=o?o:s.n;r.itemName=[l],r.seriesName=[l]}return r}function querySeriesUpstreamDatasetModel(e){if(!e.get("data",!0))return queryReferringComponents(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},SINGLE_REFERRING).models[0]}function queryDatasetUpstreamDatasetModels(e){return e.get("transform",!0)||e.get("fromTransformResult",!0)?queryReferringComponents(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},SINGLE_REFERRING).models:[]}function guessOrdinal(e,t){return doGuessOrdinal(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function doGuessOrdinal(e,t,n,r,o,i){var a,s,l;if(isTypedArray(e))return BE_ORDINAL.Not;if(r){var u=r[i];isObject$3(u)?(s=u.name,l=u.type):isString(u)&&(s=u)}if(null!=l)return"ordinal"===l?BE_ORDINAL.Must:BE_ORDINAL.Not;if(t===SOURCE_FORMAT_ARRAY_ROWS){var c=e;if(n===SERIES_LAYOUT_BY_ROW){for(var d=c[i],p=0;p<(d||[]).length&&p<5;p++)if(null!=(a=_(d[o+p])))return a}else for(p=0;p<c.length&&p<5;p++){var h=c[o+p];if(h&&null!=(a=_(h[i])))return a}}else if(t===SOURCE_FORMAT_OBJECT_ROWS){var f=e;if(!s)return BE_ORDINAL.Not;for(p=0;p<f.length&&p<5;p++){if((y=f[p])&&null!=(a=_(y[s])))return a}}else if(t===SOURCE_FORMAT_KEYED_COLUMNS){var g=e;if(!s)return BE_ORDINAL.Not;if(!(d=g[s])||isTypedArray(d))return BE_ORDINAL.Not;for(p=0;p<d.length&&p<5;p++)if(null!=(a=_(d[p])))return a}else if(t===SOURCE_FORMAT_ORIGINAL){var m=e;for(p=0;p<m.length&&p<5;p++){var y,v=getDataItemValue(y=m[p]);if(!isArray$1(v))return BE_ORDINAL.Not;if(null!=(a=_(v[i])))return a}}function _(e){var t=isString(e);return null!=e&&Number.isFinite(Number(e))&&""!==e?t?BE_ORDINAL.Might:BE_ORDINAL.Not:t&&"-"!==e?BE_ORDINAL.Must:void 0}return BE_ORDINAL.Not}var internalOptionCreatorMap=createHashMap();function registerInternalOptionCreator(e,t){assert(null==internalOptionCreatorMap.get(e)&&t),internalOptionCreatorMap.set(e,t)}function concatInternalOptions(e,t,n){var r=internalOptionCreatorMap.get(t);if(!r)return n;var o=r(e);return o?n.concat(o):n}var innerColor=makeInner(),innerDecal=makeInner(),PaletteMixin=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=normalizeToArray(this.get("color",!0)),o=this.get("colorLayer",!0);return getFromPalette(this,innerColor,r,o,e,t,n)},e.prototype.clearColorPalette=function(){clearPalette(this,innerColor)},e}(),reCreateSeriesIndices,assertSeriesInitialized,initBase;function getDecalFromPalette(e,t,n,r){var o=normalizeToArray(e.get(["aria","decal","decals"]));return getFromPalette(e,innerDecal,o,null,t,n,r)}function getNearestPalette(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}function getFromPalette(e,t,n,r,o,i,a){var s=t(i=i||e),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(o))return u[o];var c=null!=a&&r?getNearestPalette(r,a):n;if((c=c||n)&&c.length){var d=c[l];return o&&(u[o]=d),s.paletteIdx=(l+1)%c.length,d}}function clearPalette(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var OPTION_INNER_KEY="\0_ec_inner",OPTION_INNER_VALUE=1,GlobalModel=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.init=function(e,t,n,r,o,i){r=r||{},this.option=null,this._theme=new Model(r),this._locale=new Model(o),this._optionManager=i},t.prototype.setOption=function(e,t,n){var r=normalizeSetOptionInput(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,normalizeSetOptionInput(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||"recreate"===e){var o=r.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(o,t)):initBase(this,o),n=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var i=r.getTimelineOption(this);i&&(n=!0,this._mergeOption(i,t))}if(!e||"recreate"===e||"media"===e){var a=r.getMediaOption(this);a.length&&each$f(a,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,o=this._componentsCount,i=[],a=createHashMap(),s=t&&t.replaceMergeMainTypeMap;resetSourceDefaulter(this),each$f(e,function(e,t){null!=e&&(ComponentModel.hasClass(t)?t&&(i.push(t),a.set(t,!0)):n[t]=null==n[t]?clone$6(e):merge(n[t],e,!0))}),s&&s.each(function(e,t){ComponentModel.hasClass(t)&&!a.get(t)&&(i.push(t),a.set(t,!0))}),ComponentModel.topologicalTravel(i,ComponentModel.getAllClassMainTypes(),function(t){var i=concatInternalOptions(this,t,normalizeToArray(e[t])),a=r.get(t),l=a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",u=mappingToExists(a,i,l);setComponentTypeToKeyInfo(u,t,ComponentModel),n[t]=null,r.set(t,null),o.set(t,0);var c,d=[],p=[],h=0;each$f(u,function(e,n){var r=e.existing,o=e.newOption;if(o){var i="series"===t,a=ComponentModel.getClass(t,e.keyInfo.subType,!i);if(!a)return;if("tooltip"===t){if(c)return;c=!0}if(r&&r.constructor===a)r.name=e.keyInfo.name,r.mergeOption(o,this),r.optionUpdated(o,!1);else{var s=extend$2({componentIndex:n},e.keyInfo);extend$2(r=new a(o,this,this,s),s),e.brandNew&&(r.__requireNewView=!0),r.init(o,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(d.push(r.option),p.push(r),h++):(d.push(void 0),p.push(void 0))},this),n[t]=d,r.set(t,p),o.set(t,h),"series"===t&&reCreateSeriesIndices(this)},this),this._seriesIndices||reCreateSeriesIndices(this)},t.prototype.getOption=function(){var e=clone$6(this.option);return each$f(e,function(t,n){if(ComponentModel.hasClass(n)){for(var r=normalizeToArray(t),o=r.length,i=!1,a=o-1;a>=0;a--)r[a]&&!isComponentIdInternal(r[a])?i=!0:(r[a]=null,!i&&o--);r.length=o,e[n]=r}}),delete e[OPTION_INNER_KEY],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(null==t)for(var o=0;o<n.length;o++)if(n[o])return n[o]}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n,r=e.index,o=e.id,i=e.name,a=this._componentsMap.get(t);return a&&a.length?(null!=r?(n=[],each$f(normalizeToArray(r),function(e){a[e]&&n.push(a[e])})):n=null!=o?queryByIdOrName("id",o,a):null!=i?queryByIdOrName("name",i,a):filter(a,function(e){return!!e}),filterBySubType(n,e)):[]},t.prototype.findComponents=function(e){var t,n,r,o,i,a=e.query,s=e.mainType,l=(n=s+"Index",r=s+"Id",o=s+"Name",!(t=a)||null==t[n]&&null==t[r]&&null==t[o]?null:{mainType:s,index:t[n],id:t[r],name:t[o]}),u=l?this.queryComponents(l):filter(this._componentsMap.get(s),function(e){return!!e});return i=filterBySubType(u,e),e.filter?filter(i,e.filter):i},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(isFunction(e)){var o=t,i=e;r.each(function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&i.call(o,t,r,r.componentIndex)}})}else for(var a=isString(e)?r.get(e):isObject$3(e)?this.findComponents(e):null,s=0;a&&s<a.length;s++){var l=a[s];l&&t.call(n,l,l.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=convertOptionIdName(e,null);return filter(this._componentsMap.get("series"),function(e){return!!e&&null!=t&&e.name===t})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return filter(this._componentsMap.get("series"),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return filter(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){assertSeriesInitialized(this),each$f(this._seriesIndices,function(n){var r=this._componentsMap.get("series")[n];e.call(t,r,n)},this)},t.prototype.eachRawSeries=function(e,t){each$f(this._componentsMap.get("series"),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){assertSeriesInitialized(this),each$f(this._seriesIndices,function(r){var o=this._componentsMap.get("series")[r];o.subType===e&&t.call(n,o,r)},this)},t.prototype.eachRawSeriesByType=function(e,t,n){return each$f(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return assertSeriesInitialized(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){assertSeriesInitialized(this);var n=[];each$f(this._seriesIndices,function(r){var o=this._componentsMap.get("series")[r];e.call(t,o,r)&&n.push(r)},this),this._seriesIndices=n,this._seriesIndicesMap=createHashMap(n)},t.prototype.restoreData=function(e){reCreateSeriesIndices(this);var t=this._componentsMap,n=[];t.each(function(e,t){ComponentModel.hasClass(t)&&n.push(t)}),ComponentModel.topologicalTravel(n,ComponentModel.getAllClassMainTypes(),function(n){each$f(t.get(n),function(t){!t||"series"===n&&isNotTargetSeries(t,e)||t.restoreData()})})},t.internalField=(reCreateSeriesIndices=function(e){var t=e._seriesIndices=[];each$f(e._componentsMap.get("series"),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=createHashMap(t)},assertSeriesInitialized=function(e){},void(initBase=function(e,t){e.option={},e.option[OPTION_INNER_KEY]=OPTION_INNER_VALUE,e._componentsMap=createHashMap({series:[]}),e._componentsCount=createHashMap();var n=t.aria;isObject$3(n)&&null==n.enabled&&(n.enabled=!0),mergeTheme(t,e._theme.option),merge(t,globalDefault,!1),e._mergeOption(t,null)})),t}(Model);function isNotTargetSeries(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,o=t.seriesName;return null!=n&&e.componentIndex!==n||null!=r&&e.id!==r||null!=o&&e.name!==o}}function mergeTheme(e,t){var n=e.color&&!e.colorLayer;each$f(t,function(t,r){"colorLayer"===r&&n||ComponentModel.hasClass(r)||("object"===_typeof2(t)?e[r]=e[r]?merge(e[r],t,!1):clone$6(t):null==e[r]&&(e[r]=t))})}function queryByIdOrName(e,t,n){if(isArray$1(t)){var r=createHashMap();return each$f(t,function(e){null!=e&&(null!=convertOptionIdName(e,null)&&r.set(e,!0))}),filter(n,function(t){return t&&r.get(t[e])})}var o=convertOptionIdName(t,null);return filter(n,function(t){return t&&null!=o&&t[e]===o})}function filterBySubType(e,t){return t.hasOwnProperty("subType")?filter(e,function(e){return e&&e.subType===t.subType}):e}function normalizeSetOptionInput(e){var t=createHashMap();return e&&each$f(normalizeToArray(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}mixin(GlobalModel,PaletteMixin);var availableMethods=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],ExtensionAPI=function(e){each$f(availableMethods,function(t){this[t]=bind$1(e[t],e)},this)},coordinateSystemCreators={},CoordinateSystemManager=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];each$f(coordinateSystemCreators,function(r,o){var i=r.create(e,t);n=n.concat(i||[])}),this._coordinateSystems=n},e.prototype.update=function(e,t){each$f(this._coordinateSystems,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){coordinateSystemCreators[e]=t},e.get=function(e){return coordinateSystemCreators[e]},e}(),QUERY_REG=/^(min|max)?(.+)$/,OptionManager=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(each$f(normalizeToArray(e.series),function(e){e&&e.data&&isTypedArray(e.data)&&setAsPrimitive(e.data)}),each$f(normalizeToArray(e.dataset),function(e){e&&e.source&&isTypedArray(e.source)&&setAsPrimitive(e.source)})),e=clone$6(e);var r=this._optionBackup,o=parseRawOption(e,t,!r);this._newBaseOption=o.baseOption,r?(o.timelineOptions.length&&(r.timelineOptions=o.timelineOptions),o.mediaList.length&&(r.mediaList=o.mediaList),o.mediaDefault&&(r.mediaDefault=o.mediaDefault)):this._optionBackup=o},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],clone$6(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent("timeline");r&&(t=clone$6(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),r=this._mediaList,o=this._mediaDefault,i=[],a=[];if(!r.length&&!o)return a;for(var s=0,l=r.length;s<l;s++)applyMediaQuery(r[s].query,t,n)&&i.push(s);return!i.length&&o&&(i=[-1]),i.length&&!indicesEquals(i,this._currentMediaIndices)&&(a=map$1(i,function(e){return clone$6(-1===e?o.option:r[e].option)})),this._currentMediaIndices=i,a},e}();function parseRawOption(e,t,n){var r,o,i=[],a=e.baseOption,s=e.timeline,l=e.options,u=e.media,c=!!e.media,d=!!(l||s||a&&a.timeline);function p(e){each$f(t,function(t){t(e,n)})}return a?(o=a).timeline||(o.timeline=s):((d||c)&&(e.options=e.media=null),o=e),c&&isArray$1(u)&&each$f(u,function(e){e&&e.option&&(e.query?i.push(e):r||(r=e))}),p(o),each$f(l,function(e){return p(e)}),each$f(i,function(e){return p(e.option)}),{baseOption:o,timelineOptions:l||[],mediaDefault:r,mediaList:i}}function applyMediaQuery(e,t,n){var r={width:t,height:n,aspectratio:t/n},o=!0;return each$f(e,function(e,t){var n=t.match(QUERY_REG);if(n&&n[1]&&n[2]){var i=n[1],a=n[2].toLowerCase();compare(r[a],e,i)||(o=!1)}}),o}function compare(e,t,n){return"min"===n?e>=t:"max"===n?e<=t:e===t}function indicesEquals(e,t){return e.join(",")===t.join(",")}var each$d=each$f,isObject$2=isObject$3,POSSIBLE_STYLES=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function compatEC2ItemStyle(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=POSSIBLE_STYLES.length;n<r;n++){var o=POSSIBLE_STYLES[n],i=t.normal,a=t.emphasis;i&&i[o]&&(e[o]=e[o]||{},e[o].normal?merge(e[o].normal,i[o]):e[o].normal=i[o],i[o]=null),a&&a[o]&&(e[o]=e[o]||{},e[o].emphasis?merge(e[o].emphasis,a[o]):e[o].emphasis=a[o],a[o]=null)}}function convertNormalEmphasis(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,o=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,defaults$2(e[t],r)):e[t]=r),o&&(e.emphasis=e.emphasis||{},e.emphasis[t]=o,o.focus&&(e.emphasis.focus=o.focus),o.blurScope&&(e.emphasis.blurScope=o.blurScope))}}function removeEC3NormalStatus(e){convertNormalEmphasis(e,"itemStyle"),convertNormalEmphasis(e,"lineStyle"),convertNormalEmphasis(e,"areaStyle"),convertNormalEmphasis(e,"label"),convertNormalEmphasis(e,"labelLine"),convertNormalEmphasis(e,"upperLabel"),convertNormalEmphasis(e,"edgeLabel")}function compatTextStyle(e,t){var n=isObject$2(e)&&e[t],r=isObject$2(n)&&n.textStyle;if(r)for(var o=0,i=TEXT_STYLE_OPTIONS.length;o<i;o++){var a=TEXT_STYLE_OPTIONS[o];r.hasOwnProperty(a)&&(n[a]=r[a])}}function compatEC3CommonStyles(e){e&&(removeEC3NormalStatus(e),compatTextStyle(e,"label"),e.emphasis&&compatTextStyle(e.emphasis,"label"))}function processSeries(e){if(isObject$2(e)){compatEC2ItemStyle(e),removeEC3NormalStatus(e),compatTextStyle(e,"label"),compatTextStyle(e,"upperLabel"),compatTextStyle(e,"edgeLabel"),e.emphasis&&(compatTextStyle(e.emphasis,"label"),compatTextStyle(e.emphasis,"upperLabel"),compatTextStyle(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(compatEC2ItemStyle(t),compatEC3CommonStyles(t));var n=e.markLine;n&&(compatEC2ItemStyle(n),compatEC3CommonStyles(n));var r=e.markArea;r&&compatEC3CommonStyles(r);var o=e.data;if("graph"===e.type){o=o||e.nodes;var i=e.links||e.edges;if(i&&!isTypedArray(i))for(var a=0;a<i.length;a++)compatEC3CommonStyles(i[a]);each$f(e.categories,function(e){removeEC3NormalStatus(e)})}if(o&&!isTypedArray(o))for(a=0;a<o.length;a++)compatEC3CommonStyles(o[a]);if((t=e.markPoint)&&t.data){var s=t.data;for(a=0;a<s.length;a++)compatEC3CommonStyles(s[a])}if((n=e.markLine)&&n.data){var l=n.data;for(a=0;a<l.length;a++)isArray$1(l[a])?(compatEC3CommonStyles(l[a][0]),compatEC3CommonStyles(l[a][1])):compatEC3CommonStyles(l[a])}"gauge"===e.type?(compatTextStyle(e,"axisLabel"),compatTextStyle(e,"title"),compatTextStyle(e,"detail")):"treemap"===e.type?(convertNormalEmphasis(e.breadcrumb,"itemStyle"),each$f(e.levels,function(e){removeEC3NormalStatus(e)})):"tree"===e.type&&removeEC3NormalStatus(e.leaves)}}function toArr(e){return isArray$1(e)?e:e?[e]:[]}function toObj(e){return(isArray$1(e)?e[0]:e)||{}}function globalCompatStyle(e,t){each$d(toArr(e.series),function(e){isObject$2(e)&&processSeries(e)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),each$d(n,function(t){each$d(toArr(e[t]),function(e){e&&(compatTextStyle(e,"axisLabel"),compatTextStyle(e.axisPointer,"label"))})}),each$d(toArr(e.parallel),function(e){var t=e&&e.parallelAxisDefault;compatTextStyle(t,"axisLabel"),compatTextStyle(t&&t.axisPointer,"label")}),each$d(toArr(e.calendar),function(e){convertNormalEmphasis(e,"itemStyle"),compatTextStyle(e,"dayLabel"),compatTextStyle(e,"monthLabel"),compatTextStyle(e,"yearLabel")}),each$d(toArr(e.radar),function(e){compatTextStyle(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name),null!=e.nameGap&&null==e.axisNameGap&&(e.axisNameGap=e.nameGap,delete e.nameGap)}),each$d(toArr(e.geo),function(e){isObject$2(e)&&(compatEC3CommonStyles(e),each$d(toArr(e.regions),function(e){compatEC3CommonStyles(e)}))}),each$d(toArr(e.timeline),function(e){compatEC3CommonStyles(e),convertNormalEmphasis(e,"label"),convertNormalEmphasis(e,"itemStyle"),convertNormalEmphasis(e,"controlStyle",!0);var t=e.data;isArray$1(t)&&each$f(t,function(e){isObject$3(e)&&(convertNormalEmphasis(e,"label"),convertNormalEmphasis(e,"itemStyle"))})}),each$d(toArr(e.toolbox),function(e){convertNormalEmphasis(e,"iconStyle"),each$d(e.feature,function(e){convertNormalEmphasis(e,"iconStyle")})}),compatTextStyle(toObj(e.axisPointer),"label"),compatTextStyle(toObj(e.tooltip).axisPointer,"label")}function get(e,t){for(var n=t.split(","),r=e,o=0;o<n.length&&null!=(r=r&&r[n[o]]);o++);return r}function set(e,t,n,r){for(var o,i=t.split(","),a=e,s=0;s<i.length-1;s++)null==a[o=i[s]]&&(a[o]={}),a=a[o];null==a[i[s]]&&(a[i[s]]=n)}function compatLayoutProperties(e){e&&each$f(LAYOUT_PROPERTIES,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var LAYOUT_PROPERTIES=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],COMPATITABLE_COMPONENTS=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],BAR_ITEM_STYLE_MAP=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function compatBarItemStyle(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<BAR_ITEM_STYLE_MAP.length;n++){var r=BAR_ITEM_STYLE_MAP[n][1],o=BAR_ITEM_STYLE_MAP[n][0];null!=t[r]&&(t[o]=t[r])}}function compatPieLabel(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function compatSunburstState(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function compatGraphFocus(e){e&&null!=e.focusNodeAdjacency&&(e.emphasis=e.emphasis||{},null==e.emphasis.focus&&(e.emphasis.focus="adjacency"))}function traverseTree(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&traverseTree(e[n].children,t)}function globalBackwardCompat(e,t){globalCompatStyle(e,t),e.series=normalizeToArray(e.series),each$f(e.series,function(e){if(isObject$3(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t){if(null!=e.clockWise&&(e.clockwise=e.clockWise),compatPieLabel(e.label),(o=e.data)&&!isTypedArray(o))for(var n=0;n<o.length;n++)compatPieLabel(o[n]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if("gauge"===t){var r=get(e,"pointer.color");null!=r&&set(e,"itemStyle.color",r)}else if("bar"===t){var o;if(compatBarItemStyle(e),compatBarItemStyle(e.backgroundStyle),compatBarItemStyle(e.emphasis),(o=e.data)&&!isTypedArray(o))for(n=0;n<o.length;n++)"object"===_typeof2(o[n])&&(compatBarItemStyle(o[n]),compatBarItemStyle(o[n]&&o[n].emphasis))}else if("sunburst"===t){var i=e.highlightPolicy;i&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=i)),compatSunburstState(e),traverseTree(e.data,compatSunburstState)}else"graph"===t||"sankey"===t?compatGraphFocus(e):"map"===t&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&defaults$2(e,e.mapLocation));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),compatLayoutProperties(e)}}),e.dataRange&&(e.visualMap=e.dataRange),each$f(COMPATITABLE_COMPONENTS,function(t){var n=e[t];n&&(isArray$1(n)||(n=[n]),each$f(n,function(e){compatLayoutProperties(e)}))})}function dataStack$1(e){var t=createHashMap();e.eachSeries(function(e){var n=e.get("stack");if(n){var r=t.get(n)||t.set(n,[]),o=e.getData(),i={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:e};if(!i.stackedDimension||!i.isStackedByIndex&&!i.stackedByDimension)return;r.length&&o.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(i)}}),t.each(calculateStack)}function calculateStack(e){each$f(e,function(t,n){var r=[],o=[NaN,NaN],i=[t.stackResultDimension,t.stackedOverDimension],a=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";a.modify(i,function(i,u,c){var d,p,h=a.get(t.stackedDimension,c);if(isNaN(h))return o;s?p=a.getRawIndex(c):d=a.get(t.stackedByDimension,c);for(var f=NaN,g=n-1;g>=0;g--){var m=e[g];if(s||(p=m.data.rawIndexOf(m.stackedByDimension,d)),p>=0){var y=m.data.getByRawIndex(m.stackResultDimension,p);if("all"===l||"positive"===l&&y>0||"negative"===l&&y<0||"samesign"===l&&h>=0&&y>0||"samesign"===l&&h<=0&&y<0){h=addSafe(h,y),f=y;break}}}return r[0]=h,r[1]=f,r})})}var SourceImpl=function(){return function(e){this.data=e.data||(e.sourceFormat===SOURCE_FORMAT_KEYED_COLUMNS?{}:[]),this.sourceFormat=e.sourceFormat||SOURCE_FORMAT_UNKNOWN,this.seriesLayoutBy=e.seriesLayoutBy||SERIES_LAYOUT_BY_COLUMN,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];null==r.type&&guessOrdinal(this,n)===BE_ORDINAL.Must&&(r.type="ordinal")}}}(),_a,_b,_c,providerMethods,mountMethods;function isSourceInstance(e){return e instanceof SourceImpl}function createSource(e,t,n){n=n||detectSourceFormat(e);var r=t.seriesLayoutBy,o=determineSourceDimensions(e,n,r,t.sourceHeader,t.dimensions);return new SourceImpl({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:o.dimensionsDefine,startIndex:o.startIndex,dimensionsDetectedCount:o.dimensionsDetectedCount,metaRawOption:clone$6(t)})}function createSourceFromSeriesDataOption(e){return new SourceImpl({data:e,sourceFormat:isTypedArray(e)?SOURCE_FORMAT_TYPED_ARRAY:SOURCE_FORMAT_ORIGINAL})}function cloneSourceShallow(e){return new SourceImpl({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:clone$6(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function detectSourceFormat(e){var t=SOURCE_FORMAT_UNKNOWN;if(isTypedArray(e))t=SOURCE_FORMAT_TYPED_ARRAY;else if(isArray$1(e)){0===e.length&&(t=SOURCE_FORMAT_ARRAY_ROWS);for(var n=0,r=e.length;n<r;n++){var o=e[n];if(null!=o){if(isArray$1(o)||isTypedArray(o)){t=SOURCE_FORMAT_ARRAY_ROWS;break}if(isObject$3(o)){t=SOURCE_FORMAT_OBJECT_ROWS;break}}}}else if(isObject$3(e))for(var i in e)if(hasOwn(e,i)&&isArrayLike(e[i])){t=SOURCE_FORMAT_KEYED_COLUMNS;break}return t}function determineSourceDimensions(e,t,n,r,o){var i,a;if(!e)return{dimensionsDefine:normalizeDimensionsOption(o),startIndex:a,dimensionsDetectedCount:i};if(t===SOURCE_FORMAT_ARRAY_ROWS){var s=e;"auto"===r||null==r?arrayRowsTravelFirst(function(e){null!=e&&"-"!==e&&(isString(e)?null==a&&(a=1):a=0)},n,s,10):a=isNumber(r)?r:r?1:0,o||1!==a||(o=[],arrayRowsTravelFirst(function(e,t){o[t]=null!=e?e+"":""},n,s,1/0)),i=o?o.length:n===SERIES_LAYOUT_BY_ROW?s.length:s[0]?s[0].length:null}else if(t===SOURCE_FORMAT_OBJECT_ROWS)o||(o=objectRowsCollectDimensions(e));else if(t===SOURCE_FORMAT_KEYED_COLUMNS)o||(o=[],each$f(e,function(e,t){o.push(t)}));else if(t===SOURCE_FORMAT_ORIGINAL){var l=getDataItemValue(e[0]);i=isArray$1(l)&&l.length||1}return{startIndex:a,dimensionsDefine:normalizeDimensionsOption(o),dimensionsDetectedCount:i}}function objectRowsCollectDimensions(e){for(var t,n=0;n<e.length&&!(t=e[n++]););if(t)return keys(t)}function normalizeDimensionsOption(e){if(e){var t=createHashMap();return map$1(e,function(e,n){var r={name:(e=isObject$3(e)?e:{name:e}).name,displayName:e.displayName,type:e.type};if(null==r.name)return r;r.name+="",null==r.displayName&&(r.displayName=r.name);var o=t.get(r.name);return o?r.name+="-"+o.count++:t.set(r.name,{count:1}),r})}}function arrayRowsTravelFirst(e,t,n,r){if(t===SERIES_LAYOUT_BY_ROW)for(var o=0;o<n.length&&o<r;o++)e(n[o]?n[o][0]:null,o);else{var i=n[0]||[];for(o=0;o<i.length&&o<r;o++)e(i[o],o)}}function shouldRetrieveDataByName(e){var t=e.sourceFormat;return t===SOURCE_FORMAT_OBJECT_ROWS||t===SOURCE_FORMAT_KEYED_COLUMNS}var DefaultDataProvider=function(){function e(e,t){var n=isSourceInstance(e)?e:createSourceFromSeriesDataOption(e);this._source=n;var r=this._data=n.data;n.sourceFormat===SOURCE_FORMAT_TYPED_ARRAY&&(this._offset=0,this._dimSize=t,this._data=r),mountMethods(this,r,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var e;mountMethods=function(e,o,i){var a=i.sourceFormat,s=i.seriesLayoutBy,l=i.startIndex,u=i.dimensionsDefine;if(extend$2(e,providerMethods[getMethodMapKey(a,s)]),a===SOURCE_FORMAT_TYPED_ARRAY)e.getItem=t,e.count=r,e.fillStorage=n;else{var c=getRawSourceItemGetter(a,s);e.getItem=bind$1(c,null,o,l,u);var d=getRawSourceDataCounter(a,s);e.count=bind$1(d,null,o,l,u)}};var t=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,r=this._dimSize,o=r*e,i=0;i<r;i++)t[i]=n[o+i];return t},n=function(e,t,n,r){for(var o=this._data,i=this._dimSize,a=0;a<i;a++){for(var s=r[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],c=t-e,d=n[a],p=0;p<c;p++){var h=o[p*i+a];d[e+p]=h,h<l&&(l=h),h>u&&(u=h)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};function o(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}(e={})[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_COLUMN]={pure:!0,appendData:o},e[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_ROW]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[SOURCE_FORMAT_OBJECT_ROWS]={pure:!0,appendData:o},e[SOURCE_FORMAT_KEYED_COLUMNS]={pure:!0,appendData:function(e){var t=this._data;each$f(e,function(e,n){for(var r=t[n]||(t[n]=[]),o=0;o<(e||[]).length;o++)r.push(e[o])})}},e[SOURCE_FORMAT_ORIGINAL]={appendData:o},e[SOURCE_FORMAT_TYPED_ARRAY]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},providerMethods=e}(),e}(),getItemSimply=function(e,t,n,r){return e[r]},rawSourceItemGetterMap=(_a={},_a[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_COLUMN]=function(e,t,n,r){return e[r+t]},_a[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_ROW]=function(e,t,n,r,o){r+=t;for(var i=o||[],a=e,s=0;s<a.length;s++){var l=a[s];i[s]=l?l[r]:null}return i},_a[SOURCE_FORMAT_OBJECT_ROWS]=getItemSimply,_a[SOURCE_FORMAT_KEYED_COLUMNS]=function(e,t,n,r,o){for(var i=o||[],a=0;a<n.length;a++){var s=e[n[a].name];i[a]=s?s[r]:null}return i},_a[SOURCE_FORMAT_ORIGINAL]=getItemSimply,_a);function getRawSourceItemGetter(e,t){return rawSourceItemGetterMap[getMethodMapKey(e,t)]}var countSimply=function(e,t,n){return e.length},rawSourceDataCounterMap=(_b={},_b[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_COLUMN]=function(e,t,n){return Math.max(0,e.length-t)},_b[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_ROW]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},_b[SOURCE_FORMAT_OBJECT_ROWS]=countSimply,_b[SOURCE_FORMAT_KEYED_COLUMNS]=function(e,t,n){var r=e[n[0].name];return r?r.length:0},_b[SOURCE_FORMAT_ORIGINAL]=countSimply,_b);function getRawSourceDataCounter(e,t){return rawSourceDataCounterMap[getMethodMapKey(e,t)]}var getRawValueSimply=function(e,t,n){return e[t]},rawSourceValueGetterMap=(_c={},_c[SOURCE_FORMAT_ARRAY_ROWS]=getRawValueSimply,_c[SOURCE_FORMAT_OBJECT_ROWS]=function(e,t,n){return e[n]},_c[SOURCE_FORMAT_KEYED_COLUMNS]=getRawValueSimply,_c[SOURCE_FORMAT_ORIGINAL]=function(e,t,n){var r=getDataItemValue(e);return r instanceof Array?r[t]:r},_c[SOURCE_FORMAT_TYPED_ARRAY]=getRawValueSimply,_c);function getRawSourceValueGetter(e){return rawSourceValueGetterMap[e]}function getMethodMapKey(e,t){return e===SOURCE_FORMAT_ARRAY_ROWS?e+"_"+t:e}function retrieveRawValue(e,t,n){if(e){var r=e.getRawDataItem(t);if(null!=r){var o=e.getStore(),i=o.getSource().sourceFormat;if(null!=n){var a=e.getDimensionIndex(n),s=o.getDimensionProperty(a);return getRawSourceValueGetter(i)(r,a,s)}var l=r;return i===SOURCE_FORMAT_ORIGINAL&&(l=getDataItemValue(r)),l}}}var DIMENSION_LABEL_REG=/\{@(.+?)\}/g,DataFormatMixin=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),o=n.getRawIndex(e),i=n.getName(e),a=n.getRawDataItem(e),s=n.getItemVisual(e,"style"),l=s&&s[n.getItemVisual(e,"drawType")||"fill"],u=s&&s.stroke,c=this.mainType,d="series"===c,p=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:i,dataIndex:o,data:a,dataType:t,value:r,color:l,borderColor:u,dimensionNames:p?p.fullDimensions:null,encode:p?p.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(e,t,n,r,o,i){t=t||"normal";var a=this.getData(n),s=this.getDataParams(e,n);(i&&(s.value=i.interpolatedValue),null!=r&&isArray$1(s.value)&&(s.value=s.value[r]),o)||(o=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"]));return isFunction(o)?(s.status=t,s.dimensionIndex=r,o(s)):isString(o)?formatTpl(o,s).replace(DIMENSION_LABEL_REG,function(t,n){var r=n.length,o=n;"["===o.charAt(0)&&"]"===o.charAt(r-1)&&(o=+o.slice(1,r-1));var s=retrieveRawValue(a,e,o);if(i&&isArray$1(i.interpolatedValue)){var l=a.getDimensionIndex(o);l>=0&&(s=i.interpolatedValue[l])}return null!=s?s+"":""}):void 0},e.prototype.getRawValue=function(e,t){return retrieveRawValue(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function normalizeTooltipFormatResult(e){var t,n;return isObject$3(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function createTask(e){return new Task(e)}var Task=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n=this._upstream,r=e&&e.skip;if(this._dirty&&n){var o=this.context;o.data=o.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(t=this._plan(this.context));var i,a=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}a===l&&s===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,i=this._doReset(r)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,h=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(i||p<h)){var f=this._progress;if(isArray$1(f))for(var g=0;g<f.length;g++)this._doProgress(f[g],p,h,l,u);else this._doProgress(f,p,h,l,u)}this._dueIndex=h;var m=null!=this._settedOutputEnd?this._settedOutputEnd:h;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,o){iterator.reset(t,n,r,o),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:iterator.next},this.context)},e.prototype._doReset=function(e){var t,n;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!e&&this._reset&&((t=this._reset(this.context))&&t.progress&&(n=t.forceFirstProgress,t=t.progress),isArray$1(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),iterator=function(){var e,t,n,r,o,i={reset:function(l,u,c,d){t=l,e=u,n=c,r=d,o=Math.ceil(r/n),i.next=n>1&&r>0?s:a}};return i;function a(){return t<e?t++:null}function s(){var i=t%o*n+Math.ceil(t/o),a=t>=e?null:i<r?i:t;return t++,a}}();function parseDataValue(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||isNumber(e)||null==e||"-"===e||(e=+parseDate(e)),null==e||""===e?NaN:Number(e))}var valueParserMap=createHashMap({number:function(e){return parseFloat(e)},time:function(e){return+parseDate(e)},trim:function(e){return isString(e)?trim$1(e):e}});function getRawValueParser(e){return valueParserMap.get(e)}var ORDER_COMPARISON_OP_MAP={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}},FilterOrderComparator=function(){function e(e,t){if(!isNumber(t)){throwError("")}this._opFn=ORDER_COMPARISON_OP_MAP[e],this._rvalFloat=numericToNumber(t)}return e.prototype.evaluate=function(e){return isNumber(e)?this._opFn(e,this._rvalFloat):this._opFn(numericToNumber(e),this._rvalFloat)},e}(),SortOrderComparator=function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=isNumber(e)?e:numericToNumber(e),r=isNumber(t)?t:numericToNumber(t),o=isNaN(n),i=isNaN(r);if(o&&(n=this._incomparable),i&&(r=this._incomparable),o&&i){var a=isString(e),s=isString(t);a&&(n=s?e:0),s&&(r=a?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}(),FilterEqualityComparator=function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=_typeof2(t),this._rvalFloat=numericToNumber(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=_typeof2(e);n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(t=numericToNumber(e)===this._rvalFloat)}return this._isEQ?t:!t},e}();function createFilterComparator(e,t){return"eq"===e||"ne"===e?new FilterEqualityComparator("eq"===e,t):hasOwn(ORDER_COMPARISON_OP_MAP,e)?new FilterOrderComparator(e,t):null}var ExternalSource=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return parseDataValue(e,t)},e}();function createExternalSource(e,t){var n=new ExternalSource,r=e.data,o=n.sourceFormat=e.sourceFormat,i=e.startIndex;e.seriesLayoutBy!==SERIES_LAYOUT_BY_COLUMN&&throwError("");var a=[],s={},l=e.dimensionsDefine;if(l)each$f(l,function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};if(a.push(r),null!=n){hasOwn(s,n)&&throwError(""),s[n]=r}});else for(var u=0;u<e.dimensionsDetectedCount;u++)a.push({index:u});var c=getRawSourceItemGetter(o,SERIES_LAYOUT_BY_COLUMN);t.__isBuiltIn&&(n.getRawDataItem=function(e){return c(r,i,a,e)},n.getRawData=bind$1(getRawData,null,e)),n.cloneRawData=bind$1(cloneRawData,null,e);var d=getRawSourceDataCounter(o,SERIES_LAYOUT_BY_COLUMN);n.count=bind$1(d,null,r,i,a);var p=getRawSourceValueGetter(o);n.retrieveValue=function(e,t){var n=c(r,i,a,e);return h(n,t)};var h=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=a[t];return n?p(e,t,n.name):void 0}};return n.getDimensionInfo=bind$1(getDimensionInfo,null,a,s),n.cloneAllDimensionInfo=bind$1(cloneAllDimensionInfo,null,a),n}function getRawData(e){if(!isSupportedSourceFormat(e.sourceFormat)){throwError("")}return e.data}function cloneRawData(e){var t=e.sourceFormat,n=e.data;if(!isSupportedSourceFormat(t)){throwError("")}if(t===SOURCE_FORMAT_ARRAY_ROWS){for(var r=[],o=0,i=n.length;o<i;o++)r.push(n[o].slice());return r}if(t===SOURCE_FORMAT_OBJECT_ROWS){for(r=[],o=0,i=n.length;o<i;o++)r.push(extend$2({},n[o]));return r}}function getDimensionInfo(e,t,n){if(null!=n)return isNumber(n)||!isNaN(n)&&!hasOwn(t,n)?e[n]:hasOwn(t,n)?t[n]:void 0}function cloneAllDimensionInfo(e){return clone$6(e)}var externalTransformMap=createHashMap();function registerExternalTransform(e){var t=(e=clone$6(e)).type;t||throwError("");var n=t.split(":");2!==n.length&&throwError("");var r=!1;"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,externalTransformMap.set(t,e)}function applyDataTransform(e,t,n){var r=normalizeToArray(e),o=r.length;o||throwError("");for(var i=0,a=o;i<a;i++){t=applySingleDataTransform(r[i],t),i!==a-1&&(t.length=Math.max(t.length,1))}return t}function applySingleDataTransform(e,t,n,r){t.length||throwError(""),isObject$3(e)||throwError("");var o=e.type,i=externalTransformMap.get(o);i||throwError("");var a=map$1(t,function(e){return createExternalSource(e,i)});return map$1(normalizeToArray(i.transform({upstream:a[0],upstreamList:a,config:clone$6(e.config)})),function(e,n){var r;isObject$3(e)||throwError(""),e.data||throwError(""),isSupportedSourceFormat(detectSourceFormat(e.data))||throwError("");var o=t[0];if(o&&0===n&&!e.dimensions){var i=o.startIndex;i&&(e.data=o.data.slice(0,i).concat(e.data)),r={seriesLayoutBy:SERIES_LAYOUT_BY_COLUMN,sourceHeader:i,dimensions:o.metaRawOption.dimensions}}else r={seriesLayoutBy:SERIES_LAYOUT_BY_COLUMN,sourceHeader:0,dimensions:e.dimensions};return createSource(e.data,r,null)})}function isSupportedSourceFormat(e){return e===SOURCE_FORMAT_ARRAY_ROWS||e===SOURCE_FORMAT_OBJECT_ROWS}var UNDEFINED="undefined",CtorUint32Array=("undefined"==typeof Uint32Array?"undefined":_typeof2(Uint32Array))===UNDEFINED?Array:Uint32Array,CtorUint16Array=("undefined"==typeof Uint16Array?"undefined":_typeof2(Uint16Array))===UNDEFINED?Array:Uint16Array,CtorInt32Array$1=("undefined"==typeof Int32Array?"undefined":_typeof2(Int32Array))===UNDEFINED?Array:Int32Array,CtorFloat64Array=("undefined"==typeof Float64Array?"undefined":_typeof2(Float64Array))===UNDEFINED?Array:Float64Array,dataCtors={float:CtorFloat64Array,int:CtorInt32Array$1,ordinal:Array,number:Array,time:CtorFloat64Array},defaultDimValueGetters;function getIndicesCtor(e){return e>65535?CtorUint32Array:CtorUint16Array}function getInitialExtent(){return[1/0,-1/0]}function cloneChunk(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function prepareStore(e,t,n,r,o){var i=dataCtors[n||"float"];if(o){var a=e[t],s=a&&a.length;if(s!==r){for(var l=new i(r),u=0;u<s;u++)l[u]=a[u];e[t]=l}}else e[t]=new i(r)}var DataStore=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=createHashMap()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),o=this.defaultDimValueGetter=defaultDimValueGetters[r.sourceFormat];this._dimValueGetter=n||o,this._rawExtent=[],shouldRetrieveDataByName(r),this._dimensions=map$1(t,function(e){return{type:e.type,property:e.property}}),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,o=n.get(e);if(null!=o){if(r[o].type===t)return o}else o=r.length;return r[o]={type:t},n.set(e,o),this._chunks[o]=new dataCtors[t||"float"](this._rawCount),this._rawExtent[o]=getInitialExtent(),o},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],o=this._rawExtent,i=r.ordinalOffset||0,a=n.length;0===i&&(o[e]=getInitialExtent());for(var s=o[e],l=i;l<a;l++){var u=n[l]=t.parseAndCollect(n[l]);isNaN(u)||(s[0]=Math.min(u,s[0]),s[1]=Math.max(u,s[1]))}r.ordinalMeta=t,r.ordinalOffset=a,r.type="ordinal"},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,o=r.length,i=this._rawExtent,a=this.count(),s=a+Math.max(e.length,t||0),l=0;l<o;l++){prepareStore(n,l,(h=r[l]).type,s,!0)}for(var u=[],c=a;c<s;c++)for(var d=c-a,p=0;p<o;p++){var h=r[p],f=defaultDimValueGetters.arrayRows.call(this,e[d]||u,h.property,d,p);n[p][c]=f;var g=i[p];f<g[0]&&(g[0]=f),f>g[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,o=this._chunks,i=this._dimensions,a=i.length,s=this._rawExtent,l=map$1(i,function(e){return e.property}),u=0;u<a;u++){var c=i[u];s[u]||(s[u]=getInitialExtent()),prepareStore(o,u,c.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,o,s);else for(var d=[],p=e;p<t;p++){d=r.getItem(p,d);for(var h=0;h<a;h++){var f=o[h],g=this._dimValueGetter(d,l[h],p,h);f[p]=g;var m=s[h];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],r=[];if(null==t){t=e,e=[];for(var o=0;o<this._dimensions.length;o++)r.push(o)}else r=e;o=0;for(var i=r.length;o<i;o++)n.push(this.get(r[o],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=0;if(this._chunks[e])for(var n=0,r=this.count();n<r;n++){var o=this.get(e,n);isNaN(o)||(t+=o)}return t},e.prototype.getMedian=function(e){var t=[];this.each([e],function(e){isNaN(e)||t.push(e)});var n=t.sort(function(e,t){return e-t}),r=this.count();return 0===r?0:r%2==1?n[(r-1)/2]:(n[r/2]+n[r/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var r=0,o=this._count-1;r<=o;){var i=(r+o)/2|0;if(t[i]<e)r=i+1;else{if(!(t[i]>e))return i;o=i-1}}return-1},e.prototype.indicesOfNearest=function(e,t,n){var r=this._chunks[e],o=[];if(!r)return o;null==n&&(n=1/0);for(var i=1/0,a=-1,s=0,l=0,u=this.count();l<u;l++){var c=t-r[this.getRawIndex(l)],d=Math.abs(c);d<=n&&((d<i||d===i&&c>=0&&a<0)&&(i=d,a=c,s=0),c===a&&(o[s++]=l))}return o.length=s,o},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var o=0;o<r;o++)e[o]=t[o]}else e=new n(t.buffer,0,r)}else{e=new(n=getIndicesCtor(this._rawCount))(this.count());for(o=0;o<e.length;o++)e[o]=o}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),o=new(getIndicesCtor(n._rawCount))(r),i=[],a=e.length,s=0,l=e[0],u=n._chunks,c=0;c<r;c++){var d=void 0,p=n.getRawIndex(c);if(0===a)d=t(c);else if(1===a){d=t(u[l][p],c)}else{for(var h=0;h<a;h++)i[h]=u[e[h]][p];i[h]=c,d=t.apply(null,i)}d&&(o[s++]=p)}return s<r&&(n._indices=o),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=keys(e),o=r.length;if(!o)return this;var i=t.count(),a=new(getIndicesCtor(t._rawCount))(i),s=0,l=r[0],u=e[l][0],c=e[l][1],d=t._chunks,p=!1;if(!t._indices){var h=0;if(1===o){for(var f=d[r[0]],g=0;g<n;g++){((_=f[g])>=u&&_<=c||isNaN(_))&&(a[s++]=h),h++}p=!0}else if(2===o){f=d[r[0]];var m=d[r[1]],y=e[r[1]][0],v=e[r[1]][1];for(g=0;g<n;g++){var _=f[g],x=m[g];(_>=u&&_<=c||isNaN(_))&&(x>=y&&x<=v||isNaN(x))&&(a[s++]=h),h++}p=!0}}if(!p)if(1===o)for(g=0;g<i;g++){var S=t.getRawIndex(g);((_=d[r[0]][S])>=u&&_<=c||isNaN(_))&&(a[s++]=S)}else for(g=0;g<i;g++){for(var b=!0,T=(S=t.getRawIndex(g),0);T<o;T++){var A=r[T];((_=d[A][S])<e[A][0]||_>e[A][1])&&(b=!1)}b&&(a[s++]=t.getRawIndex(g))}return s<i&&(t._indices=a),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var r=e._chunks,o=[],i=t.length,a=e.count(),s=[],l=e._rawExtent,u=0;u<t.length;u++)l[t[u]]=getInitialExtent();for(var c=0;c<a;c++){for(var d=e.getRawIndex(c),p=0;p<i;p++)s[p]=r[t[p]][d];s[i]=c;var h=n&&n.apply(null,s);if(null!=h){"object"!==_typeof2(h)&&(o[0]=h,h=o);for(u=0;u<h.length;u++){var f=t[u],g=h[u],m=l[f],y=r[f];y&&(y[d]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},e.prototype.lttbDownSample=function(e,t){var n,r,o,i=this.clone([e],!0),a=i._chunks[e],s=this.count(),l=0,u=Math.floor(1/t),c=this.getRawIndex(0),d=new(getIndicesCtor(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));d[l++]=c;for(var p=1;p<s-1;p+=u){for(var h=Math.min(p+u,s-1),f=Math.min(p+2*u,s),g=(f+h)/2,m=0,y=h;y<f;y++){var v=a[w=this.getRawIndex(y)];isNaN(v)||(m+=v)}m/=f-h;var _=p,x=Math.min(p+u,s),S=p-1,b=a[c];n=-1,o=_;var T=-1,A=0;for(y=_;y<x;y++){var w;v=a[w=this.getRawIndex(y)];isNaN(v)?(A++,T<0&&(T=w)):(r=Math.abs((S-g)*(v-b)-(S-y)*(m-b)))>n&&(n=r,o=w)}A>0&&A<x-_&&(d[l++]=Math.min(T,o),o=Math.max(T,o)),d[l++]=o,c=o}return d[l++]=this.getRawIndex(s-1),i._count=l,i._indices=d,i.getRawIndex=this._getRawIdx,i},e.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),r=n._chunks,o=Math.floor(1/t),i=r[e],a=this.count(),s=new(getIndicesCtor(this._rawCount))(2*Math.ceil(a/o)),l=0,u=0;u<a;u+=o){var c=u,d=i[this.getRawIndex(c)],p=u,h=i[this.getRawIndex(p)],f=o;u+o>a&&(f=a-u);for(var g=0;g<f;g++){var m=i[this.getRawIndex(u+g)];m<d&&(d=m,c=u+g),m>h&&(h=m,p=u+g)}var y=this.getRawIndex(c),v=this.getRawIndex(p);c<p?(s[l++]=y,s[l++]=v):(s[l++]=v,s[l++]=y)}return n._count=l,n._indices=s,n._updateGetRawIdx(),n},e.prototype.downSample=function(e,t,n,r){for(var o=this.clone([e],!0),i=o._chunks,a=[],s=Math.floor(1/t),l=i[e],u=this.count(),c=o._rawExtent[e]=getInitialExtent(),d=new(getIndicesCtor(this._rawCount))(Math.ceil(u/s)),p=0,h=0;h<u;h+=s){s>u-h&&(s=u-h,a.length=s);for(var f=0;f<s;f++){var g=this.getRawIndex(h+f);a[f]=l[g]}var m=n(a),y=this.getRawIndex(Math.min(h+r(a,m)||0,u-1));l[y]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),d[p++]=y}return o._count=p,o._indices=d,o._updateGetRawIdx(),o},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,o=0,i=this.count();o<i;o++){var a=this.getRawIndex(o);switch(n){case 0:t(o);break;case 1:t(r[e[0]][a],o);break;case 2:t(r[e[0]][a],r[e[1]][a],o);break;default:for(var s=0,l=[];s<n;s++)l[s]=r[e[s]][a];l[s]=o,t.apply(null,l)}}},e.prototype.getDataExtent=function(e){var t=this._chunks[e],n=getInitialExtent();if(!t)return n;var r,o=this.count();if(!this._indices)return this._rawExtent[e].slice();if(r=this._extent[e])return r.slice();for(var i=(r=n)[0],a=r[1],s=0;s<o;s++){var l=t[this.getRawIndex(s)];l<i&&(i=l),l>a&&(a=l)}return r=[i,a],this._extent[e]=r,r},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,o=0;o<r.length;o++)n.push(r[o][t]);return n},e.prototype.clone=function(t,n){var r=new e,o=this._chunks,i=t&&reduce(t,function(e,t){return e[t]=!0,e},{});if(i)for(var a=0;a<o.length;a++)r._chunks[a]=i[a]?cloneChunk(o[a]):o[a];else r._chunks=o;return this._copyCommonProps(r),n||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=clone$6(this._extent),e._rawExtent=clone$6(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var r=0;r<n;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return parseDataValue(e[r],this._dimensions[r])}defaultDimValueGetters={arrayRows:e,objectRows:function(e,t,n,r){return parseDataValue(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var o=e&&(null==e.value?e:e.value);return parseDataValue(o instanceof Array?o[r]:o,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),SourceManager=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,r=this._getUpstreamSourceManagers(),o=!!r.length;if(isSeries(n)){var i=n,a=void 0,s=void 0,l=void 0;if(o){var u=r[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,t=[u._getVersionSign()]}else s=isTypedArray(a=i.get("data",!0))?SOURCE_FORMAT_TYPED_ARRAY:SOURCE_FORMAT_ORIGINAL,t=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},p=retrieve2(c.seriesLayoutBy,d.seriesLayoutBy)||null,h=retrieve2(c.sourceHeader,d.sourceHeader),f=retrieve2(c.dimensions,d.dimensions);e=p!==d.seriesLayoutBy||!!h!=!!d.sourceHeader||f?[createSource(a,{seriesLayoutBy:p,sourceHeader:h,dimensions:f},s)]:[]}else{var g=n;if(o){var m=this._applyTransform(r);e=m.sourceList,t=m.upstreamSignList}else{e=[createSource(g.get("source",!0),this._getSourceMetaRawOption(),null)],t=[]}}this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,r=n.get("transform",!0),o=n.get("fromTransformResult",!0);if(null!=o){1!==e.length&&doThrow("")}var i=[],a=[];return each$f(e,function(e){e.prepareSource();var t=e.getSource(o||0);null==o||t||doThrow(""),i.push(t),a.push(e._getVersionSign())}),r?t=applyDataTransform(r,i,{datasetIndex:n.componentIndex}):null!=o&&(t=[cloneSourceShallow(i[0])]),{sourceList:t,upstreamSignList:a}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=this._storeList,o=r[0];o||(o=r[0]={});var i=o[n];if(!i){var a=this._getUpstreamSourceManagers()[0];isSeries(this._sourceHost)&&a?i=a._innerGetDataStore(e,t,n):(i=new DataStore).initData(new DefaultDataProvider(t,e.length),e),o[n]=i}return i},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(isSeries(e)){var t=querySeriesUpstreamDatasetModel(e);return t?[t.getSourceManager()]:[]}return map$1(queryDatasetUpstreamDatasetModels(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e,t,n,r=this._sourceHost;if(isSeries(r))e=r.get("seriesLayoutBy",!0),t=r.get("sourceHeader",!0),n=r.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var o=r;e=o.get("seriesLayoutBy",!0),t=o.get("sourceHeader",!0),n=o.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:t,dimensions:n}},e}();function disableTransformOptionMerge(e){e.option.transform&&setAsPrimitive(e.option.transform)}function isSeries(e){return"series"===e.mainType}function doThrow(e){throw new Error(e)}var TOOLTIP_LINE_HEIGHT_CSS="line-height:1";function getTooltipLineHeight(e){var t=e.lineHeight;return null==t?TOOLTIP_LINE_HEIGHT_CSS:"line-height:"+encodeHTML(t+"")+"px"}function getTooltipTextStyle(e,t){var n=e.color||"#6e7079",r=e.fontSize||12,o=e.fontWeight||"400",i=e.color||"#464646",a=e.fontSize||14,s=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+encodeHTML(r+"")+"px;color:"+encodeHTML(n)+";font-weight:"+encodeHTML(o+""),valueStyle:"font-size:"+encodeHTML(a+"")+"px;color:"+encodeHTML(i)+";font-weight:"+encodeHTML(s+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:o},valueStyle:{fontSize:a,fill:i,fontWeight:s}}}var HTML_GAPS=[0,10,20,30],RICH_TEXT_GAPS=["","\n","\n\n","\n\n\n"];function createTooltipMarkup(e,t){return t.type=e,t}function isSectionFragment(e){return"section"===e.type}function getBuilder(e){return isSectionFragment(e)?buildSection:buildNameValue}function getBlockGapLevel(e){if(isSectionFragment(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return each$f(e.blocks,function(e){var n=getBlockGapLevel(e);n>=t&&(t=n+ +(r&&(!n||isSectionFragment(e)&&!e.noHeader)))}),t}return 0}function buildSection(e,t,n,r){var o=t.noHeader,i=getGap(getBlockGapLevel(t)),a=[],s=t.blocks||[];assert(!s||isArray$1(s)),s=s||[];var l=e.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(hasOwn(u,l)){var c=new SortOrderComparator(u[l],null);s.sort(function(e,t){return c.evaluate(e.sortParam,t.sortParam)})}else"seriesDesc"===l&&s.reverse()}each$f(s,function(n,o){var s=t.valueFormatter,l=getBuilder(n)(s?extend$2(extend$2({},e),{valueFormatter:s}):e,n,o>0?i.html:0,r);null!=l&&a.push(l)});var d="richText"===e.renderMode?a.join(i.richText):wrapBlockHTML(r,a.join(""),o?n:i.html);if(o)return d;var p=makeValueReadable(t.header,"ordinal",e.useUTC),h=getTooltipTextStyle(r,e.renderMode).nameStyle,f=getTooltipLineHeight(r);return"richText"===e.renderMode?wrapInlineNameRichText(e,p,h)+i.richText+d:wrapBlockHTML(r,'<div style="'+h+";"+f+';">'+encodeHTML(p)+"</div>"+d,n)}function buildNameValue(e,t,n,r){var o=e.renderMode,i=t.noName,a=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(e){return map$1(e=isArray$1(e)?e:[e],function(e,t){return makeValueReadable(e,isArray$1(h)?h[t]:h,u)})};if(!i||!a){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",o),p=i?"":makeValueReadable(l,"ordinal",u),h=t.valueType,f=a?[]:c(t.value,t.dataIndex),g=!s||!i,m=!s&&i,y=getTooltipTextStyle(r,o),v=y.nameStyle,_=y.valueStyle;return"richText"===o?(s?"":d)+(i?"":wrapInlineNameRichText(e,p,v))+(a?"":wrapInlineValueRichText(e,f,g,m,_)):wrapBlockHTML(r,(s?"":d)+(i?"":wrapInlineNameHTML(p,!s,v))+(a?"":wrapInlineValueHTML(f,g,m,_)),n)}}function buildTooltipMarkup(e,t,n,r,o,i){if(e)return getBuilder(e)({useUTC:o,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,i)}function getGap(e){return{html:HTML_GAPS[e],richText:RICH_TEXT_GAPS[e]}}function wrapBlockHTML(e,t,n){return'<div style="'+("margin: "+n+"px 0 0")+";"+getTooltipLineHeight(e)+';">'+t+'<div style="clear:both"></div></div>'}function wrapInlineNameHTML(e,t,n){return'<span style="'+n+";"+(t?"margin-left:2px":"")+'">'+encodeHTML(e)+"</span>"}function wrapInlineValueHTML(e,t,n,r){return'<span style="'+(t?"float:right;margin-left:"+(n?"10px":"20px"):"")+";"+r+'">'+map$1(e=isArray$1(e)?e:[e],function(e){return encodeHTML(e)}).join("&nbsp;&nbsp;")+"</span>"}function wrapInlineNameRichText(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function wrapInlineValueRichText(e,t,n,r,o){var i=[o],a=r?10:20;return n&&i.push({padding:[0,0,0,a],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(isArray$1(t)?t.join("  "):t,i)}function retrieveVisualColorForTooltipMarker(e,t){return convertToColorString(e.getData().getItemVisual(t,"style")[e.visualDrawType])}function getPaddingFromTooltipModel(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var TooltipMarkupStyleCreator=function(){function e(){this.richTextStyles={},this._nextStyleNameId=getRandomIdBase()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r="richText"===n?this._generateStyleName():null,o=getTooltipMarker({color:t,type:e,renderMode:n,markerId:r});return isString(o)?o:(this.richTextStyles[r]=o.style,o.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};isArray$1(t)?each$f(t,function(e){return extend$2(n,e)}):extend$2(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}();function defaultSeriesFormatTooltip(e){var t,n,r,o,i=e.series,a=e.dataIndex,s=e.multipleSeries,l=i.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,d=i.getRawValue(a),p=isArray$1(d),h=retrieveVisualColorForTooltipMarker(i,a);if(c>1||p&&!c){var f=formatTooltipArrayValue(d,i,a,u,h);t=f.inlineValues,n=f.inlineValueTypes,r=f.blocks,o=f.inlineValues[0]}else if(c){var g=l.getDimensionInfo(u[0]);o=t=retrieveRawValue(l,a,u[0]),n=g.type}else o=t=p?d[0]:d;var m=isNameSpecified(i),y=m&&i.name||"",v=l.getName(a),_=s?y:v;return createTooltipMarkup("section",{header:y,noHeader:s||!m,sortParam:o,blocks:[createTooltipMarkup("nameValue",{markerType:"item",markerColor:h,name:_,noName:!trim$1(_),value:t,valueType:n,dataIndex:a})].concat(r||[])})}function formatTooltipArrayValue(e,t,n,r,o){var i=t.getData(),a=reduce(e,function(e,t,n){var r=i.getDimensionInfo(n);return e||r&&!1!==r.tooltip&&null!=r.displayName},!1),s=[],l=[],u=[];function c(e,t){var n=i.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?u.push(createTooltipMarkup("nameValue",{markerType:"subItem",markerColor:o,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return r.length?each$f(r,function(e){c(retrieveRawValue(i,n,e),e)}):each$f(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}var inner$k=makeInner();function getSelectionKey(e,t){return e.getName(t)||e.getId(t)}var SERIES_UNIVERSAL_TRANSITION_PROP="__universalTransitionEnabled",SeriesModel=exports("bz",function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return __extends(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=createTask({count:dataTaskCount,reset:dataTaskReset}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(inner$k(this).sourceManager=new SourceManager(this)).prepareSource();var r=this.getInitialData(e,n);wrapData(r,this),this.dataTask.context.data=r,inner$k(this).dataBeforeProcessed=r,autoSeriesName(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=fetchLayoutMode(this),r=n?getLayoutParams(e):{},o=this.subType;ComponentModel.hasClass(o)&&(o+="Series"),merge(e,t.getTheme().get(this.subType)),merge(e,this.getDefaultOption()),defaultEmphasis(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&mergeLayoutParam(e,r,n)},t.prototype.mergeOption=function(e,t){e=merge(this.option,e,!0),this.fillDataTextStyle(e.data);var n=fetchLayoutMode(this);n&&mergeLayoutParam(this.option,e,n);var r=inner$k(this).sourceManager;r.dirty(),r.prepareSource();var o=this.getInitialData(e,t);wrapData(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,inner$k(this).dataBeforeProcessed=o,autoSeriesName(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!isTypedArray(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&defaultEmphasis(e[n],"label",t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=getCurrentTask(this);if(t){var n=t.context.data;return null!=e&&n.getLinkedData?n.getLinkedData(e):n}return inner$k(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=getCurrentTask(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}inner$k(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return createHashMap(e)},t.prototype.getSourceManager=function(){return inner$k(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return inner$k(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get("colorBy")||"series"},t.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,t,n){return defaultSeriesFormatTooltip({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(env.node&&(!e||!e.ssr))return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,o=PaletteMixin.prototype.getColorFromPalette.call(this,e,t,n);return o||(o=r.getColorFromPalette(e,t,n)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,o=this.getData(t);if("series"===r||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var i=0;i<e.length;i++){var a=getSelectionKey(o,e[i]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=keys(e),n=[],r=0;r<t.length;r++){var o=e[t[r]];o>=0&&n.push(o)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return("all"===n||n[getSelectionKey(r,e)])&&!r.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[SERIES_UNIVERSAL_TRANSITION_PROP])return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},t.prototype._innerSelect=function(e,t){var n,r,o=this.option,i=o.selectedMode,a=t.length;if(i&&a)if("series"===i)o.selectedMap="all";else if("multiple"===i){isObject$3(o.selectedMap)||(o.selectedMap={});for(var s=o.selectedMap,l=0;l<a;l++){var u=t[l];s[d=getSelectionKey(e,u)]=!0,this._selectedDataIndicesMap[d]=e.getRawIndex(u)}}else if("single"===i||!0===i){var c=t[a-1],d=getSelectionKey(e,c);o.selectedMap=((n={})[d]=!0,n),this._selectedDataIndicesMap=((r={})[d]=e.getRawIndex(c),r)}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each(function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)}),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return ComponentModel.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(ComponentModel));function autoSeriesName(e){var t=e.name;isNameSpecified(e)||(e.name=getSeriesAutoName(e)||t)}function getSeriesAutoName(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return each$f(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(" ")}function dataTaskCount(e){return e.model.getRawData().count()}function dataTaskReset(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),dataTaskProgress}function dataTaskProgress(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function wrapData(e,t){each$f(concatArray(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,curry$1(onDataChange,t))})}function onDataChange(e,t){var n=getCurrentTask(e);return n&&n.setOutputEnd((t||this).count()),t}function getCurrentTask(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var o=r.agentStubMap;o&&(r=o.get(e.uid))}return r}}mixin(SeriesModel,DataFormatMixin),mixin(SeriesModel,PaletteMixin),mountExtend(SeriesModel,ComponentModel);var ComponentView=exports("by",function(){function e(){this.group=new Group$3,this.uid=getUID("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}());function createRenderPlanner(){var e=makeInner();return function(t){var n=e(t),r=t.pipelineContext,o=!!n.large,i=!!n.progressiveRender,a=n.large=!(!r||!r.large),s=n.progressiveRender=!(!r||!r.progressiveRender);return!(o===a&&i===s)&&"reset"}}enableClassExtend(ComponentView),enableClassManagement(ComponentView);var inner$j=makeInner(),renderPlanner=createRenderPlanner(),ChartView=exports("bA",function(){function e(){this.group=new Group$3,this.uid=getUID("viewChart"),this.renderTask=createTask({plan:renderTaskPlan,reset:renderTaskReset}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var o=e.getData(r&&r.dataType);o&&toggleHighlight(o,r,"emphasis")},e.prototype.downplay=function(e,t,n,r){var o=e.getData(r&&r.dataType);o&&toggleHighlight(o,r,"normal")},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateLayout=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){traverseElements(this.group,e)},e.markUpdateMethod=function(e,t){inner$j(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}());function elSetState(e,t,n){e&&isHighDownDispatcher(e)&&("emphasis"===t?enterEmphasis:leaveEmphasis)(e,n)}function toggleHighlight(e,t,n){var r=queryDataIndex(e,t),o=t&&null!=t.highlightKey?getHighlightDigit(t.highlightKey):null;null!=r?each$f(normalizeToArray(r),function(t){elSetState(e.getItemGraphicEl(t),n,o)}):e.eachItemGraphicEl(function(e){elSetState(e,n,o)})}function renderTaskPlan(e){return renderPlanner(e.model)}function renderTaskReset(e){var t=e.model,n=e.ecModel,r=e.api,o=e.payload,i=t.pipelineContext.progressiveRender,a=e.view,s=o&&inner$j(o).updateMethod,l=i?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,r,o),progressMethodMap[l]}enableClassExtend(ChartView),enableClassManagement(ChartView);var progressMethodMap={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},ORIGIN_METHOD="\0__throttleOriginMethod",RATE="\0__throttleRate",THROTTLE_TYPE="\0__throttleType";function throttle$2(e,t,n){var r,o,i,a,s,l=0,u=0,c=null;function d(){u=(new Date).getTime(),c=null,e.apply(i,a||[])}t=t||0;var p=function(){for(var e=[],p=0;p<arguments.length;p++)e[p]=arguments[p];r=(new Date).getTime(),i=this,a=e;var h=s||t,f=s||n;s=null,o=r-(f?l:u)-h,clearTimeout(c),f?c=setTimeout(d,h):o>=0?d():c=setTimeout(d,-o),l=r};return p.clear=function(){c&&(clearTimeout(c),c=null)},p.debounceNextCall=function(e){s=e},p}function createOrUpdate(e,t,n,r){var o=e[t];if(o){var i=o[ORIGIN_METHOD]||o,a=o[THROTTLE_TYPE];if(o[RATE]!==n||a!==r){if(null==n||!r)return e[t]=i;(o=e[t]=throttle$2(i,n,"debounce"===r))[ORIGIN_METHOD]=i,o[THROTTLE_TYPE]=r,o[RATE]=n}return o}}function clear$1(e,t){var n=e[t];n&&n[ORIGIN_METHOD]&&(n.clear&&n.clear(),e[t]=n[ORIGIN_METHOD])}var inner$i=makeInner(),defaultStyleMappers={itemStyle:makeStyleMapper(ITEM_STYLE_KEY_MAP,!0),lineStyle:makeStyleMapper(LINE_STYLE_KEY_MAP,!0)},defaultColorKey={lineStyle:"stroke",itemStyle:"fill"};function getStyleMapper(e,t){var n=e.visualStyleMapper||defaultStyleMappers[t];return n||(console.warn("Unknown style type '"+t+"'."),defaultStyleMappers.itemStyle)}function getDefaultColorKey(e,t){var n=e.visualDrawType||defaultColorKey[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var seriesStyleTask={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",o=e.getModel(r),i=getStyleMapper(e,r)(o),a=o.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=getDefaultColorKey(e,r),l=i[s],u=isFunction(l)?l:null,c="auto"===i.fill||"auto"===i.stroke;if(!i[s]||u||c){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());i[s]||(i[s]=d,n.setVisual("colorFromPalette",!0)),i.fill="auto"===i.fill||isFunction(i.fill)?d:i.fill,i.stroke="auto"===i.stroke||isFunction(i.stroke)?d:i.stroke}if(n.setVisual("style",i),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var r=e.getDataParams(n),o=extend$2({},i);o[s]=u(r),t.setItemVisual(n,"style",o)}}}},sharedModel=new Model,dataStyleTask={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",o=getStyleMapper(e,r),i=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){sharedModel.option=n[r];var a=o(sharedModel);extend$2(e.ensureUniqueItemVisual(t,"style"),a),sharedModel.option.decal&&(e.setItemVisual(t,"decal",sharedModel.option.decal),sharedModel.option.decal.dirty=!0),i in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},dataColorPaletteTask={performRawSeries:!0,overallReset:function(e){var t=createHashMap();e.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+"-"+n,o=t.get(r);o||(o={},t.set(r,o)),inner$i(e).scope=o}}),e.eachSeries(function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),r={},o=t.getData(),i=inner$i(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=getDefaultColorKey(t,a);o.each(function(e){var t=o.getRawIndex(e);r[t]=e}),n.each(function(e){var a=r[e];if(o.getItemVisual(a,"colorFromPalette")){var l=o.ensureUniqueItemVisual(a,"style"),u=n.getName(e)||e+"",c=n.count();l[s]=t.getColorFromPalette(u,i,c)}})}})}},PI$5=Math.PI;function defaultLoading(e,t){defaults$2(t=t||{},{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 n=new Group$3,r=new Rect$2({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var o,i=new ZRText({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Rect$2({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((o=new Arc({shape:{startAngle:-PI$5/2,endAngle:-PI$5/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*PI$5/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*PI$5/2}).delay(300).start("circularInOut"),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),u=e.getHeight()/2;t.showSpinner&&o.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var Scheduler=function(){function e(e,t,n,r){this._stageTaskMap=createHashMap(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,o=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,i=r&&r.modDataCount;return{step:o,modBy:null!=i?Math.ceil(i/o):null,modDataCount:i}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData().count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,i=e.get("large")&&r>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:a,large:i}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=createHashMap();e.eachSeries(function(e){var r=e.getProgressive(),o=e.uid;n.set(o,{id:o,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;each$f(this._allHandlers,function(r){var o=e.get(r.uid)||e.set(r.uid,{});assert(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,o,t,n),r.overallReset&&this._createOverallStageTask(r,o,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var o=e.renderTask,i=o.context;i.model=t,i.ecModel=n,i.api=r,o.__block=!e.incrementalPrepareRender,this._pipe(t,o)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r=r||{};var o=!1,i=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}each$f(e,function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=i._stageTaskMap.get(e.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,p=c.agentStubMap;p.each(function(e){a(r,e)&&(e.dirty(),d=!0)}),d&&c.dirty(),i.updatePayload(c,n);var h=i.getPerformArgs(c,r.block);p.each(function(e){e.perform(h)}),c.perform(h)&&(o=!0)}else u&&u.each(function(s,l){a(r,s)&&s.dirty();var u=i.getPerformArgs(s,r.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),i.updatePayload(s,n),s.perform(u)&&(o=!0)})}}),this.unfinished=o||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var o=this,i=t.seriesTaskMap,a=t.seriesTaskMap=createHashMap(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,i&&i.get(s)||createTask({plan:seriesTaskPlan,reset:seriesTaskReset,count:seriesTaskCount}));l.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:o},o._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,r).each(u)},e.prototype._createOverallStageTask=function(e,t,n,r){var o=this,i=t.overallTask=t.overallTask||createTask({reset:overallTaskReset});i.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:o};var a=i.agentStubMap,s=i.agentStubMap=createHashMap(),l=e.seriesType,u=e.getTargetSeries,c=!0,d=!1;function p(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(d=!0,createTask({reset:stubReset,onDirty:stubOnDirty})));n.context={model:e,overallProgress:c},n.agent=i,n.__block=c,o._pipe(e,n)}assert(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,p):u?u(n,r).each(p):(c=!1,each$f(n.getSeries(),p)),d&&i.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return isFunction(e)&&(e={overallReset:e,seriesType:detectSeriseType(e)}),e.uid=getUID("stageHandler"),t&&(e.visualType=t),e},e}();function overallTaskReset(e){e.overallReset(e.ecModel,e.api,e.payload)}function stubReset(e){return e.overallProgress&&stubProgress}function stubProgress(){this.agent.dirty(),this.getDownstream().dirty()}function stubOnDirty(){this.agent&&this.agent.dirty()}function seriesTaskPlan(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function seriesTaskReset(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=normalizeToArray(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?map$1(t,function(e,t){return makeSeriesTaskProgress(t)}):singleSeriesTaskProgress}var singleSeriesTaskProgress=makeSeriesTaskProgress(0);function makeSeriesTaskProgress(e){return function(t,n){var r=n.data,o=n.resetDefines[e];if(o&&o.dataEach)for(var i=t.start;i<t.end;i++)o.dataEach(r,i);else o&&o.progress&&o.progress(t,r)}}function seriesTaskCount(e){return e.data.count()}function detectSeriseType(t){seriesType=null;try{t(ecModelMock,apiMock)}catch(e){}return seriesType}var ecModelMock={},apiMock={},seriesType;function mockMethods(e,t){for(var n in t.prototype)e[n]=noop}mockMethods(ecModelMock,GlobalModel),mockMethods(apiMock,ExtensionAPI),ecModelMock.eachSeriesByType=ecModelMock.eachRawSeriesByType=function(e){seriesType=e},ecModelMock.eachComponent=function(e){"series"===e.mainType&&e.subType&&(seriesType=e.subType)};var colorAll=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],lightTheme={color:colorAll,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],colorAll]},contrastColor="#B9B8CE",backgroundColor="#100C2A",axisCommon=function(){return{axisLine:{lineStyle:{color:contrastColor}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},colorPalette=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],theme={darkMode:!0,color:colorPalette,backgroundColor:backgroundColor,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:contrastColor},pageTextStyle:{color:contrastColor}},textStyle:{color:contrastColor},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:contrastColor}},dataZoom:{borderColor:"#71708A",textStyle:{color:contrastColor},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:contrastColor}},timeline:{lineStyle:{color:contrastColor},label:{color:contrastColor},controlStyle:{color:contrastColor,borderColor:contrastColor}},calendar:{itemStyle:{color:backgroundColor},dayLabel:{color:contrastColor},monthLabel:{color:contrastColor},yearLabel:{color:contrastColor}},timeAxis:axisCommon(),logAxis:axisCommon(),valueAxis:axisCommon(),categoryAxis:axisCommon(),line:{symbol:"circle"},graph:{color:colorPalette},gauge:{title:{color:contrastColor},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:contrastColor},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};theme.categoryAxis.splitLine.show=!1;var ECEventProcessor=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(isString(e)){var o=parseClassType(e);t.mainType=o.main||null,t.subType=o.sub||null}else{var i=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};each$f(e,function(e,o){for(var s=!1,l=0;l<i.length;l++){var u=i[l],c=o.lastIndexOf(u);if(c>0&&c===o.length-u.length){var d=o.slice(0,c);"data"!==d&&(t.mainType=d,t[u.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(o)&&(n[o]=e,s=!0),s||(r[o]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,o=n.packedEvent,i=n.model,a=n.view;if(!i||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,i,"mainType")&&u(s,i,"subType")&&u(s,i,"index","componentIndex")&&u(s,i,"name")&&u(s,i,"id")&&u(l,o,"name")&&u(l,o,"dataIndex")&&u(l,o,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,r,o));function u(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),SYMBOL_PROPS_WITH_CB=["symbol","symbolSize","symbolRotate","symbolOffset"],SYMBOL_PROPS=SYMBOL_PROPS_WITH_CB.concat(["symbolKeepAspect"]),seriesSymbolTask={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var r={},o={},i=!1,a=0;a<SYMBOL_PROPS_WITH_CB.length;a++){var s=SYMBOL_PROPS_WITH_CB[a],l=e.get(s);isFunction(l)?(i=!0,o[s]=l):r[s]=l}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(extend$2({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},r)),!t.isSeriesFiltered(e)){var u=keys(o);return{dataEach:i?function(t,n){for(var r=e.getRawValue(n),i=e.getDataParams(n),a=0;a<u.length;a++){var s=u[a];t.setItemVisual(n,s,o[s](r,i))}}:null}}}}},dataSymbolTask={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(e.hasSymbolVisual&&!t.isSeriesFiltered(e))return{dataEach:e.getData().hasItemOption?function(e,t){for(var n=e.getItemModel(t),r=0;r<SYMBOL_PROPS.length;r++){var o=SYMBOL_PROPS[r],i=n.getShallow(o,!0);null!=i&&e.setItemVisual(t,o,i)}}:null}}};function getItemVisualFromData(e,t,n){switch(n){case"color":return e.getItemVisual(t,"style")[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n)}}function getVisualFromData(e,t){switch(t){case"color":return e.getVisual("style")[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t)}}function setItemVisualFromData(e,t,n,r){switch(n){case"color":e.ensureUniqueItemVisual(t,"style")[e.getVisual("drawType")]=r,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=r;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,n,r)}}function createLegacyDataSelectAction(e,t){function n(t,n){var r=[];return t.eachComponent({mainType:"series",subType:e,query:n},function(e){r.push(e.seriesIndex)}),r}each$f([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],function(e){t(e[0],function(t,r,o){t=extend$2({},t),o.dispatchAction(extend$2(t,{type:e[1],seriesIndex:n(r,t)}))})})}function handleSeriesLegacySelectEvents(e,t,n,r,o){var i=e+t;n.isSilent(i)||r.eachComponent({mainType:"series",subType:"pie"},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,a=o.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===t){var l=e.getData(),u=queryDataIndex(l,o.fromActionPayload);n.trigger(i,{type:i,seriesId:e.id,name:isArray$1(u)?l.getName(u[0]):l.getName(u),selected:isString(r)?r:extend$2({},r)})}})}function handleLegacySelectEvents(e,t,n){e.on("selectchanged",function(e){var r=n.getModel();e.isFromClick?(handleSeriesLegacySelectEvents("map","selectchanged",t,r,e),handleSeriesLegacySelectEvents("pie","selectchanged",t,r,e)):"select"===e.fromAction?(handleSeriesLegacySelectEvents("map","selected",t,r,e),handleSeriesLegacySelectEvents("pie","selected",t,r,e)):"unselect"===e.fromAction&&(handleSeriesLegacySelectEvents("map","unselected",t,r,e),handleSeriesLegacySelectEvents("pie","unselected",t,r,e))})}function findEventDispatcher(e,t,n){for(var r;e&&(!t(e)||(r=e,!n));)e=e.__hostTarget||e.parent;return r}var wmUniqueIndex=Math.round(9*Math.random()),supportDefineProperty="function"==typeof Object.defineProperty,WeakMap$1=function(){function e(){this._id="__ec_inner_"+wmUniqueIndex++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return supportDefineProperty?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return!!this.has(e)&&(delete this._guard(e)[this._id],!0)},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},e}(),Triangle=Path.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,o=t.width/2,i=t.height/2;e.moveTo(n,r-i),e.lineTo(n+o,r+i),e.lineTo(n-o,r+i),e.closePath()}}),Diamond=Path.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,o=t.width/2,i=t.height/2;e.moveTo(n,r-i),e.lineTo(n+o,r),e.lineTo(n,r+i),e.lineTo(n-o,r),e.closePath()}}),Pin=Path.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,o=t.width/5*3,i=Math.max(o,t.height),a=o/2,s=a*a/(i-a),l=r-i+a+s,u=Math.asin(s/a),c=Math.cos(u)*a,d=Math.sin(u),p=Math.cos(u),h=.6*a,f=.7*a;e.moveTo(n-c,l+s),e.arc(n,l,a,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(n+c-d*h,l+s+p*h,n,r-f,n,r),e.bezierCurveTo(n,r-f,n-c+d*h,l+s+p*h,n-c,l+s),e.closePath()}}),Arrow=Path.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,o=t.x,i=t.y,a=r/3*2;e.moveTo(o,i),e.lineTo(o+a,i+n),e.lineTo(o,i+n/4*3),e.lineTo(o-a,i+n),e.lineTo(o,i),e.closePath()}}),symbolCtors={line:Line$1,rect:Rect$2,roundRect:Rect$2,square:Rect$2,circle:Circle,diamond:Diamond,pin:Pin,arrow:Arrow,triangle:Triangle},symbolShapeMakers={line:function(e,t,n,r,o){o.x1=e,o.y1=t+r/2,o.x2=e+n,o.y2=t+r/2},rect:function(e,t,n,r,o){o.x=e,o.y=t,o.width=n,o.height=r},roundRect:function(e,t,n,r,o){o.x=e,o.y=t,o.width=n,o.height=r,o.r=Math.min(n,r)/4},square:function(e,t,n,r,o){var i=Math.min(n,r);o.x=e,o.y=t,o.width=i,o.height=i},circle:function(e,t,n,r,o){o.cx=e+n/2,o.cy=t+r/2,o.r=Math.min(n,r)/2},diamond:function(e,t,n,r,o){o.cx=e+n/2,o.cy=t+r/2,o.width=n,o.height=r},pin:function(e,t,n,r,o){o.x=e+n/2,o.y=t+r/2,o.width=n,o.height=r},arrow:function(e,t,n,r,o){o.x=e+n/2,o.y=t+r/2,o.width=n,o.height=r},triangle:function(e,t,n,r,o){o.cx=e+n/2,o.cy=t+r/2,o.width=n,o.height=r}},symbolBuildProxies={};each$f(symbolCtors,function(e,t){symbolBuildProxies[t]=new e});var SymbolClz=Path.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=_calculateTextPosition(e,t,n),o=this.shape;return o&&"pin"===o.symbolType&&"inside"===t.position&&(r.y=n.y+.4*n.height),r},buildPath:function(e,t,n){var r=t.symbolType;if("none"!==r){var o=symbolBuildProxies[r];o||(o=symbolBuildProxies[r="rect"]),symbolShapeMakers[r](t.x,t.y,t.width,t.height,o.shape),o.buildPath(e,o.shape,n)}}});function symbolPathSetColor(e,t){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=e:n.fill=e,this.markRedraw()}}function createSymbol$1(e,t,n,r,o,i,a){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?makeImage(e.slice(8),new BoundingRect(t,n,r,o),a?"center":"cover"):0===e.indexOf("path://")?makePath(e.slice(7),{},new BoundingRect(t,n,r,o),a?"center":"cover"):new SymbolClz({shape:{symbolType:e,x:t,y:n,width:r,height:o}})).__isEmptyBrush=l,s.setColor=symbolPathSetColor,i&&s.setColor(i),s}function normalizeSymbolSize(e){return isArray$1(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function normalizeSymbolOffset(e,t){if(null!=e)return isArray$1(e)||(e=[e,e]),[parsePercent(e[0],t[0])||0,parsePercent(retrieve2(e[1],e[0]),t[1])||0]}function isSafeNum(e){return isFinite(e)}function createLinearGradient(e,t,n){var r=null==t.x?0:t.x,o=null==t.x2?1:t.x2,i=null==t.y?0:t.y,a=null==t.y2?0:t.y2;return t.global||(r=r*n.width+n.x,o=o*n.width+n.x,i=i*n.height+n.y,a=a*n.height+n.y),r=isSafeNum(r)?r:0,o=isSafeNum(o)?o:1,i=isSafeNum(i)?i:0,a=isSafeNum(a)?a:0,e.createLinearGradient(r,i,o,a)}function createRadialGradient(e,t,n){var r=n.width,o=n.height,i=Math.min(r,o),a=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(a=a*r+n.x,s=s*o+n.y,l*=i),a=isSafeNum(a)?a:.5,s=isSafeNum(s)?s:.5,l=l>=0&&isSafeNum(l)?l:.5,e.createRadialGradient(a,s,0,a,s,l)}function getCanvasGradient(e,t,n){for(var r="radial"===t.type?createRadialGradient(e,t,n):createLinearGradient(e,t,n),o=t.colorStops,i=0;i<o.length;i++)r.addColorStop(o[i].offset,o[i].color);return r}function isClipPathChanged(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function parseInt10(e){return parseInt(e,10)}function getSize$1(e,t,n){var r=["width","height"][t],o=["clientWidth","clientHeight"][t],i=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=n[r]&&"auto"!==n[r])return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[o]||parseInt10(s[r])||parseInt10(e.style[r]))-(parseInt10(s[i])||0)-(parseInt10(s[a])||0)|0}function normalizeLineDash(e,t){return e&&"solid"!==e&&t>0?"dashed"===e?[4*t,2*t]:"dotted"===e?[t]:isNumber(e)?[e]:isArray$1(e)?e:null:null}function getLineDash(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&normalizeLineDash(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var o=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;o&&1!==o&&(n=map$1(n,function(e){return e/o}),r/=o)}return[n,r]}var pathProxyForDraw=new PathProxy(!0);function styleHasStroke(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function isValidStrokeFillStyle(e){return"string"==typeof e&&"none"!==e}function styleHasFill(e){var t=e.fill;return null!=t&&"none"!==t}function doFillPath(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function doStrokePath(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function createCanvasPattern(e,t,n){var r=createOrUpdateImage(t.image,t.__image,n);if(isImageReady(r)){var o=e.createPattern(r,t.repeat||"repeat");if("function"==typeof DOMMatrix&&o&&o.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*RADIAN_TO_DEGREE),i.scaleSelf(t.scaleX||1,t.scaleY||1),o.setTransform(i)}return o}}function brushPath(e,t,n,r){var o,i=styleHasStroke(n),a=styleHasFill(n),s=n.strokePercent,l=s<1,u=!t.path;t.silent&&!l||!u||t.createPathProxy();var c=t.path||pathProxyForDraw,d=t.__dirty;if(!r){var p=n.fill,h=n.stroke,f=a&&!!p.colorStops,g=i&&!!h.colorStops,m=a&&!!p.image,y=i&&!!h.image,v=void 0,_=void 0,x=void 0,S=void 0,b=void 0;(f||g)&&(b=t.getBoundingRect()),f&&(v=d?getCanvasGradient(e,p,b):t.__canvasFillGradient,t.__canvasFillGradient=v),g&&(_=d?getCanvasGradient(e,h,b):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),m&&(x=d||!t.__canvasFillPattern?createCanvasPattern(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),y&&(S=d||!t.__canvasStrokePattern?createCanvasPattern(e,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=x),f?e.fillStyle=v:m&&(x?e.fillStyle=x:a=!1),g?e.strokeStyle=_:y&&(S?e.strokeStyle=S:i=!1)}var T,A,w=t.getGlobalScale();c.setScale(w[0],w[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(T=(o=getLineDash(t))[0],A=o[1]);var C=!0;(u||d&SHAPE_CHANGED_BIT)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),C=!1),c.reset(),t.buildPath(c,t.shape,r),c.toStatic(),t.pathUpdated()),C&&c.rebuildPath(e,l?s:1),T&&(e.setLineDash(T),e.lineDashOffset=A),r||(n.strokeFirst?(i&&doStrokePath(e,n),a&&doFillPath(e,n)):(a&&doFillPath(e,n),i&&doStrokePath(e,n))),T&&e.setLineDash([])}function brushImage(e,t,n){var r=t.__image=createOrUpdateImage(n.image,t.__image,t,t.onload);if(r&&isImageReady(r)){var o=n.x||0,i=n.y||0,a=t.getWidth(),s=t.getHeight(),l=r.width/r.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=r.width,s=r.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;e.drawImage(r,u,c,n.sWidth,n.sHeight,o,i,a,s)}else if(n.sx&&n.sy){var d=a-(u=n.sx),p=s-(c=n.sy);e.drawImage(r,u,c,d,p,o,i,a,s)}else e.drawImage(r,o,i,a,s)}}function brushText(e,t,n){var r,o=n.text;if(null!=o&&(o+=""),o){e.font=n.font||DEFAULT_FONT,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var i=void 0,a=void 0;e.setLineDash&&n.lineDash&&(i=(r=getLineDash(t))[0],a=r[1]),i&&(e.setLineDash(i),e.lineDashOffset=a),n.strokeFirst?(styleHasStroke(n)&&e.strokeText(o,n.x,n.y),styleHasFill(n)&&e.fillText(o,n.x,n.y)):(styleHasFill(n)&&e.fillText(o,n.x,n.y),styleHasStroke(n)&&e.strokeText(o,n.x,n.y)),i&&e.setLineDash([])}}var SHADOW_NUMBER_PROPS=["shadowBlur","shadowOffsetX","shadowOffsetY"],STROKE_PROPS=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function bindCommonProps(e,t,n,r,o){var i=!1;if(!r&&t===(n=n||{}))return!1;if(r||t.opacity!==n.opacity){flushPathDrawn(e,o),i=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?DEFAULT_COMMON_STYLE.opacity:a}(r||t.blend!==n.blend)&&(i||(flushPathDrawn(e,o),i=!0),e.globalCompositeOperation=t.blend||DEFAULT_COMMON_STYLE.blend);for(var s=0;s<SHADOW_NUMBER_PROPS.length;s++){var l=SHADOW_NUMBER_PROPS[s];(r||t[l]!==n[l])&&(i||(flushPathDrawn(e,o),i=!0),e[l]=e.dpr*(t[l]||0))}return(r||t.shadowColor!==n.shadowColor)&&(i||(flushPathDrawn(e,o),i=!0),e.shadowColor=t.shadowColor||DEFAULT_COMMON_STYLE.shadowColor),i}function bindPathAndTextCommonStyle(e,t,n,r,o){var i=getStyle(t,o.inHover),a=r?null:n&&getStyle(n,o.inHover)||{};if(i===a)return!1;var s=bindCommonProps(e,i,a,r,o);if((r||i.fill!==a.fill)&&(s||(flushPathDrawn(e,o),s=!0),isValidStrokeFillStyle(i.fill)&&(e.fillStyle=i.fill)),(r||i.stroke!==a.stroke)&&(s||(flushPathDrawn(e,o),s=!0),isValidStrokeFillStyle(i.stroke)&&(e.strokeStyle=i.stroke)),(r||i.opacity!==a.opacity)&&(s||(flushPathDrawn(e,o),s=!0),e.globalAlpha=null==i.opacity?1:i.opacity),t.hasStroke()){var l=i.lineWidth/(i.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==l&&(s||(flushPathDrawn(e,o),s=!0),e.lineWidth=l)}for(var u=0;u<STROKE_PROPS.length;u++){var c=STROKE_PROPS[u],d=c[0];(r||i[d]!==a[d])&&(s||(flushPathDrawn(e,o),s=!0),e[d]=i[d]||c[1])}return s}function bindImageStyle(e,t,n,r,o){return bindCommonProps(e,getStyle(t,o.inHover),n&&getStyle(n,o.inHover),r,o)}function setContextTransform(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function updateClipStatus(e,t,n){for(var r=!1,o=0;o<e.length;o++){var i=e[o];r=r||i.isZeroArea(),setContextTransform(t,i),t.beginPath(),i.buildPath(t,i.shape),t.clip()}n.allClipped=r}function isTransformChanged(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var DRAW_TYPE_PATH=1,DRAW_TYPE_IMAGE=2,DRAW_TYPE_TEXT=3,DRAW_TYPE_INCREMENTAL=4;function canPathBatch(e){var t=styleHasFill(e),n=styleHasStroke(e);return!(e.lineDash||!(+t^+n)||t&&"string"!=typeof e.fill||n&&"string"!=typeof e.stroke||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function flushPathDrawn(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function getStyle(e,t){return t&&e.__hoverStyle||e.style}function brushSingle(e,t){brush$1(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function brush$1(e,t,n,r){var o=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return t.__dirty&=~REDRAW_BIT,void(t.__isRendered=!1);var i=t.__clipPaths,a=n.prevElClipPaths,s=!1,l=!1;if(a&&!isClipPathChanged(i,a)||(a&&a.length&&(flushPathDrawn(e,n),e.restore(),l=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(flushPathDrawn(e,n),e.save(),updateClipStatus(i,e,n),s=!0),n.prevElClipPaths=i),n.allClipped)t.__isRendered=!1;else{t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=n.prevEl;u||(l=s=!0);var c=t instanceof Path&&t.autoBatch&&canPathBatch(t.style);s||isTransformChanged(o,u.transform)?(flushPathDrawn(e,n),setContextTransform(e,t)):c||flushPathDrawn(e,n);var d=getStyle(t,n.inHover);t instanceof Path?(n.lastDrawType!==DRAW_TYPE_PATH&&(l=!0,n.lastDrawType=DRAW_TYPE_PATH),bindPathAndTextCommonStyle(e,t,u,l,n),c&&(n.batchFill||n.batchStroke)||e.beginPath(),brushPath(e,t,d,c),c&&(n.batchFill=d.fill||"",n.batchStroke=d.stroke||"")):t instanceof TSpan?(n.lastDrawType!==DRAW_TYPE_TEXT&&(l=!0,n.lastDrawType=DRAW_TYPE_TEXT),bindPathAndTextCommonStyle(e,t,u,l,n),brushText(e,t,d)):t instanceof ZRImage?(n.lastDrawType!==DRAW_TYPE_IMAGE&&(l=!0,n.lastDrawType=DRAW_TYPE_IMAGE),bindImageStyle(e,t,u,l,n),brushImage(e,t,d)):t.getTemporalDisplayables&&(n.lastDrawType!==DRAW_TYPE_INCREMENTAL&&(l=!0,n.lastDrawType=DRAW_TYPE_INCREMENTAL),brushIncremental(e,t,n)),c&&r&&flushPathDrawn(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}function brushIncremental(e,t,n){var r=t.getDisplayables(),o=t.getTemporalDisplayables();e.save();var i,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(i=t.getCursor(),a=r.length;i<a;i++){(c=r[i]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),brush$1(e,c,s,i===a-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}for(var l=0,u=o.length;l<u;l++){var c;(c=o[l]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),brush$1(e,c,s,l===u-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var decalMap=new WeakMap$1,decalCache=new LRU(100),decalKeys=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function createOrUpdatePatternFromDecal(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),o="svg"===r.painter.type;e.dirty&&decalMap.delete(e);var i=decalMap.get(e);if(i)return i;var a=defaults$2(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===a.backgroundColor&&(a.backgroundColor=null);var s={repeat:"repeat"};return function(e){for(var t,i=[n],s=!0,l=0;l<decalKeys.length;++l){var u=a[decalKeys[l]];if(null!=u&&!isArray$1(u)&&!isString(u)&&!isNumber(u)&&"boolean"!=typeof u){s=!1;break}i.push(u)}if(s){t=i.join(",")+(o?"-svg":"");var c=decalCache.get(t);c&&(o?e.svgElement=c:e.image=c)}var d,p=normalizeDashArrayX(a.dashArrayX),h=normalizeDashArrayY(a.dashArrayY),f=normalizeSymbolArray(a.symbol),g=getLineBlockLengthX(p),m=getLineBlockLengthY(h),y=!o&&platformApi.createCanvas(),v=o&&{tag:"g",attrs:{},key:"dcl",children:[]},_=function(){for(var e=1,t=0,n=g.length;t<n;++t)e=getLeastCommonMultiple(e,g[t]);var r=1;for(t=0,n=f.length;t<n;++t)r=getLeastCommonMultiple(r,f[t].length);e*=r;var o=m*g.length*f.length;return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(o,a.maxTileHeight))}}();y&&(y.width=_.width*n,y.height=_.height*n,d=y.getContext("2d"));(function(){d&&(d.clearRect(0,0,y.width,y.height),a.backgroundColor&&(d.fillStyle=a.backgroundColor,d.fillRect(0,0,y.width,y.height)));for(var e=0,t=0;t<h.length;++t)e+=h[t];if(e<=0)return;var i=-m,s=0,l=0,u=0;for(;i<_.height;){if(s%2==0){for(var c=l/2%f.length,g=0,x=0,S=0;g<2*_.width;){var b=0;for(t=0;t<p[u].length;++t)b+=p[u][t];if(b<=0)break;if(x%2==0){var T=.5*(1-a.symbolSize),A=g+p[u][x]*T,w=i+h[s]*T,C=p[u][x]*a.symbolSize,E=h[s]*a.symbolSize,M=S/2%f[c].length;I(A,w,C,E,f[c][M])}g+=p[u][x],++S,++x===p[u].length&&(x=0)}++u===p.length&&(u=0)}i+=h[s],++l,++s===h.length&&(s=0)}function I(e,t,i,s,l){var u=o?1:n,c=createSymbol$1(l,e*u,t*u,i*u,s*u,a.color,a.symbolKeepAspect);if(o){var p=r.painter.renderOneToVNode(c);p&&v.children.push(p)}else brushSingle(d,c)}})(),s&&decalCache.put(t,y||v);e.image=y,e.svgElement=v,e.svgWidth=_.width,e.svgHeight=_.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=o?1:1/n,decalMap.set(e,s),e.dirty=!1,s}function normalizeSymbolArray(e){if(!e||0===e.length)return[["rect"]];if(isString(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!isString(e[n])){t=!1;break}if(t)return normalizeSymbolArray([e]);var r=[];for(n=0;n<e.length;++n)isString(e[n])?r.push([e[n]]):r.push(e[n]);return r}function normalizeDashArrayX(e){if(!e||0===e.length)return[[0,0]];if(isNumber(e))return[[o=Math.ceil(e),o]];for(var t=!0,n=0;n<e.length;++n)if(!isNumber(e[n])){t=!1;break}if(t)return normalizeDashArrayX([e]);var r=[];for(n=0;n<e.length;++n)if(isNumber(e[n])){var o=Math.ceil(e[n]);r.push([o,o])}else{(o=map$1(e[n],function(e){return Math.ceil(e)})).length%2==1?r.push(o.concat(o)):r.push(o)}return r}function normalizeDashArrayY(e){if(!e||"object"===_typeof2(e)&&0===e.length)return[0,0];if(isNumber(e)){var t=Math.ceil(e);return[t,t]}var n=map$1(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}function getLineBlockLengthX(e){return map$1(e,function(e){return getLineBlockLengthY(e)})}function getLineBlockLengthY(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}function decalVisual(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each(function(e){var n=r.getItemVisual(e,"decal");n&&(r.ensureUniqueItemVisual(e,"style").decal=createOrUpdatePatternFromDecal(n,t))});var o=r.getVisual("decal");if(o)r.getVisual("style").decal=createOrUpdatePatternFromDecal(o,t)}})}var lifecycle=new Eventful,implsStore={};function registerImpl(e,t){implsStore[e]=t}function getImpl(e){return implsStore[e]}var version$2=exports("aV","5.6.0"),dependencies=exports("aW",{zrender:"5.6.1"}),TEST_FRAME_REMAIN_TIME=1,PRIORITY_PROCESSOR_SERIES_FILTER=800,PRIORITY_PROCESSOR_DATASTACK=900,PRIORITY_PROCESSOR_FILTER=1e3,PRIORITY_PROCESSOR_DEFAULT=2e3,PRIORITY_PROCESSOR_STATISTIC=5e3,PRIORITY_VISUAL_LAYOUT=1e3,PRIORITY_VISUAL_PROGRESSIVE_LAYOUT=1100,PRIORITY_VISUAL_GLOBAL=2e3,PRIORITY_VISUAL_CHART=3e3,PRIORITY_VISUAL_COMPONENT=4e3,PRIORITY_VISUAL_CHART_DATA_CUSTOM=4500,PRIORITY_VISUAL_POST_CHART_LAYOUT=4600,PRIORITY_VISUAL_BRUSH=5e3,PRIORITY_VISUAL_ARIA=6e3,PRIORITY_VISUAL_DECAL=7e3,PRIORITY=exports("aX",{PROCESSOR:{FILTER:PRIORITY_PROCESSOR_FILTER,SERIES_FILTER:PRIORITY_PROCESSOR_SERIES_FILTER,STATISTIC:PRIORITY_PROCESSOR_STATISTIC},VISUAL:{LAYOUT:PRIORITY_VISUAL_LAYOUT,PROGRESSIVE_LAYOUT:PRIORITY_VISUAL_PROGRESSIVE_LAYOUT,GLOBAL:PRIORITY_VISUAL_GLOBAL,CHART:PRIORITY_VISUAL_CHART,POST_CHART_LAYOUT:PRIORITY_VISUAL_POST_CHART_LAYOUT,COMPONENT:PRIORITY_VISUAL_COMPONENT,BRUSH:PRIORITY_VISUAL_BRUSH,CHART_ITEM:PRIORITY_VISUAL_CHART_DATA_CUSTOM,ARIA:PRIORITY_VISUAL_ARIA,DECAL:PRIORITY_VISUAL_DECAL}}),IN_MAIN_PROCESS_KEY="__flagInMainProcess",PENDING_UPDATE="__pendingUpdate",STATUS_NEEDS_UPDATE_KEY="__needsUpdateStatus",ACTION_REG=/^[a-zA-Z0-9_]+$/,CONNECT_STATUS_KEY="__connectUpdateStatus",CONNECT_STATUS_PENDING=0,CONNECT_STATUS_UPDATING=1,CONNECT_STATUS_UPDATED=2;function createRegisterEventWithLowercaseECharts(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!this.isDisposed())return toLowercaseNameAndCallEventful(this,e,t);disposedWarning(this.id)}}function createRegisterEventWithLowercaseMessageCenter(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return toLowercaseNameAndCallEventful(this,e,t)}}function toLowercaseNameAndCallEventful(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),Eventful.prototype[t].apply(e,n)}var MessageCenter=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t}(Eventful),messageCenterProto=MessageCenter.prototype,prepare,prepareView,updateDirectly,updateMethods,doConvertPixel,updateStreamModes,doDispatchAction,flushPendingActions,triggerUpdatedEvent,bindRenderedEvent,bindMouseEvent,render,renderComponents,renderSeries,createExtensionAPI,enableConnect,markStatusToUpdate,applyChangedStates;messageCenterProto.on=createRegisterEventWithLowercaseMessageCenter("on"),messageCenterProto.off=createRegisterEventWithLowercaseMessageCenter("off");var ECharts=function(t){function n(e,n,r){var o=t.call(this,new ECEventProcessor)||this;o._chartsViews=[],o._chartsMap={},o._componentsViews=[],o._componentsMap={},o._pendingActions=[],r=r||{},isString(n)&&(n=themeStorage[n]),o._dom=e;r.ssr&&registerSSRDataGetter(function(e){var t=getECData(e),n=t.dataIndex;if(null!=n){var r=createHashMap();return r.set("series_index",t.seriesIndex),r.set("data_index",n),t.ssrType&&r.set("ssr_type",t.ssrType),r}});var i=o._zr=init$2(e,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:retrieve2(r.useDirtyRect,!1),useCoarsePointer:retrieve2(r.useCoarsePointer,"auto"),pointerSize:r.pointerSize});o._ssr=r.ssr,o._throttledZrFlush=throttle$2(bind$1(i.flush,i),17),(n=clone$6(n))&&globalBackwardCompat(n,!0),o._theme=n,o._locale=createLocaleObject(r.locale||SYSTEM_LANG),o._coordSysMgr=new CoordinateSystemManager;var a=o._api=createExtensionAPI(o);function s(e,t){return e.__prio-t.__prio}return sort$2(visualFuncs,s),sort$2(dataProcessorFuncs,s),o._scheduler=new Scheduler(o,a,dataProcessorFuncs,visualFuncs),o._messageCenter=new MessageCenter,o._initEvents(),o.resize=bind$1(o.resize,o),i.animation.on("frame",o._onframe,o),bindRenderedEvent(i,o),bindMouseEvent(i,o),setAsPrimitive(o),o}return __extends(n,t),n.prototype._onframe=function(){if(!this._disposed){applyChangedStates(this);var t=this._scheduler;if(this[PENDING_UPDATE]){var n=this[PENDING_UPDATE].silent;this[IN_MAIN_PROCESS_KEY]=!0;try{prepare(this),updateMethods.update.call(this,null,this[PENDING_UPDATE].updateParams)}catch(e){throw this[IN_MAIN_PROCESS_KEY]=!1,this[PENDING_UPDATE]=null,e}this._zr.flush(),this[IN_MAIN_PROCESS_KEY]=!1,this[PENDING_UPDATE]=null,flushPendingActions.call(this,n),triggerUpdatedEvent.call(this,n)}else if(t.unfinished){var r=TEST_FRAME_REMAIN_TIME,o=this._model,i=this._api;t.unfinished=!1;do{var a=+new Date;t.performSeriesTasks(o),t.performDataProcessorTasks(o),updateStreamModes(this,o),t.performVisualTasks(o),renderSeries(this,this._model,i,"remain",{}),r-=+new Date-a}while(r>0&&t.unfinished);t.unfinished||this._zr.flush()}}},n.prototype.getDom=function(){return this._dom},n.prototype.getId=function(){return this.id},n.prototype.getZr=function(){return this._zr},n.prototype.isSSR=function(){return this._ssr},n.prototype.setOption=function(t,n,r){if(!this[IN_MAIN_PROCESS_KEY])if(this._disposed)disposedWarning(this.id);else{var o,i,a;if(isObject$3(n)&&(r=n.lazyUpdate,o=n.silent,i=n.replaceMerge,a=n.transition,n=n.notMerge),this[IN_MAIN_PROCESS_KEY]=!0,!this._model||n){var s=new OptionManager(this._api),l=this._theme,u=this._model=new GlobalModel;u.scheduler=this._scheduler,u.ssr=this._ssr,u.init(null,null,null,l,this._locale,s)}this._model.setOption(t,{replaceMerge:i},optionPreprocessorFuncs);var c={seriesTransition:a,optionChanged:!0};if(r)this[PENDING_UPDATE]={silent:o,updateParams:c},this[IN_MAIN_PROCESS_KEY]=!1,this.getZr().wakeUp();else{try{prepare(this),updateMethods.update.call(this,null,c)}catch(e){throw this[PENDING_UPDATE]=null,this[IN_MAIN_PROCESS_KEY]=!1,e}this._ssr||this._zr.flush(),this[PENDING_UPDATE]=null,this[IN_MAIN_PROCESS_KEY]=!1,flushPendingActions.call(this,o),triggerUpdatedEvent.call(this,o)}}},n.prototype.setTheme=function(){},n.prototype.getModel=function(){return this._model},n.prototype.getOption=function(){return this._model&&this._model.getOption()},n.prototype.getWidth=function(){return this._zr.getWidth()},n.prototype.getHeight=function(){return this._zr.getHeight()},n.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||env.hasGlobalWindow&&window.devicePixelRatio||1},n.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},n.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},n.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},n.prototype.getSvgDataURL=function(){if(env.svgSupported){var e=this._zr;return each$f(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()}},n.prototype.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,r=[],o=this;each$f(t,function(e){n.eachComponent({mainType:e},function(e){var t=o._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var i="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return each$f(r,function(e){e.group.ignore=!1}),i}disposedWarning(this.id)},n.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,r=Math.min,o=Math.max,i=1/0;if(connectedGroups[n]){var a=i,s=i,l=-1/0,u=-1/0,c=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();each$f(instances,function(i,d){if(i.group===n){var p=t?i.getZr().painter.getSvgDom().innerHTML:i.renderToCanvas(clone$6(e)),h=i.getDom().getBoundingClientRect();a=r(h.left,a),s=r(h.top,s),l=o(h.right,l),u=o(h.bottom,u),c.push({dom:p,left:h.left,top:h.top})}});var p=(l*=d)-(a*=d),h=(u*=d)-(s*=d),f=platformApi.createCanvas(),g=init$2(f,{renderer:t?"svg":"canvas"});if(g.resize({width:p,height:h}),t){var m="";return each$f(c,function(e){var t=e.left-a,n=e.top-s;m+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"}),g.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new Rect$2({shape:{x:0,y:0,width:p,height:h},style:{fill:e.connectedBackgroundColor}})),each$f(c,function(e){var t=new ZRImage({style:{x:e.left*d-a,y:e.top*d-s,image:e.dom}});g.add(t)}),g.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}disposedWarning(this.id)},n.prototype.convertToPixel=function(e,t){return doConvertPixel(this,"convertToPixel",e,t)},n.prototype.convertFromPixel=function(e,t){return doConvertPixel(this,"convertFromPixel",e,t)},n.prototype.containPixel=function(e,t){var n;if(!this._disposed)return each$f(parseFinder$1(this._model,e),function(e,r){r.indexOf("Models")>=0&&each$f(e,function(e){var o=e.coordinateSystem;if(o&&o.containPoint)n=n||!!o.containPoint(t);else if("seriesModels"===r){var i=this._chartsMap[e.__viewId];i&&i.containPoint&&(n=n||i.containPoint(t,e))}},this)},this),!!n;disposedWarning(this.id)},n.prototype.getVisual=function(e,t){var n=parseFinder$1(this._model,e,{defaultMainType:"series"}),r=n.seriesModel.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=o?getItemVisualFromData(r,o,t):getVisualFromData(r,t)},n.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},n.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},n.prototype._initEvents=function(){var e=this;each$f(MOUSE_EVENT_NAMES,function(t){var n=function(n){var r,o=e.getModel(),i=n.target;if("globalout"===t?r={}:i&&findEventDispatcher(i,function(e){var t=getECData(e);if(t&&null!=t.dataIndex){var n=t.dataModel||o.getSeriesByIndex(t.seriesIndex);return r=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return r=extend$2({},t.eventData),!0},!0),r){var a=r.componentType,s=r.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=r.seriesIndex);var l=a&&null!=s&&o.getComponent(a,s),u=l&&e["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];r.event=n,r.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:r,model:l,view:u},e.trigger(t,r)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)}),each$f(eventActionMap,function(t,n){e._messageCenter.on(n,function(e){this.trigger(n,e)},e)}),each$f(["selectchanged"],function(t){e._messageCenter.on(t,function(e){this.trigger(t,e)},e)}),handleLegacySelectEvents(this._messageCenter,this,this._api)},n.prototype.isDisposed=function(){return this._disposed},n.prototype.clear=function(){this._disposed?disposedWarning(this.id):this.setOption({series:[]},!0)},n.prototype.dispose=function(){if(this._disposed)disposedWarning(this.id);else{this._disposed=!0,this.getDom()&&setAttribute(this.getDom(),DOM_ATTRIBUTE_KEY,"");var e=this,t=e._api,n=e._model;each$f(e._componentsViews,function(e){e.dispose(n,t)}),each$f(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete instances[e.id]}},n.prototype.resize=function(t){if(!this[IN_MAIN_PROCESS_KEY])if(this._disposed)disposedWarning(this.id);else{this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),n){var r=n.resetOption("media"),o=t&&t.silent;this[PENDING_UPDATE]&&(null==o&&(o=this[PENDING_UPDATE].silent),r=!0,this[PENDING_UPDATE]=null),this[IN_MAIN_PROCESS_KEY]=!0;try{r&&prepare(this),updateMethods.update.call(this,{type:"resize",animation:extend$2({duration:0},t&&t.animation)})}catch(e){throw this[IN_MAIN_PROCESS_KEY]=!1,e}this[IN_MAIN_PROCESS_KEY]=!1,flushPendingActions.call(this,o),triggerUpdatedEvent.call(this,o)}}},n.prototype.showLoading=function(e,t){if(this._disposed)disposedWarning(this.id);else if(isObject$3(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),loadingEffects[e]){var n=loadingEffects[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},n.prototype.hideLoading=function(){this._disposed?disposedWarning(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},n.prototype.makeActionFromEvent=function(e){var t=extend$2({},e);return t.type=eventActionMap[e.type],t},n.prototype.dispatchAction=function(e,t){if(this._disposed)disposedWarning(this.id);else if(isObject$3(t)||(t={silent:!!t}),actions[e.type]&&this._model)if(this[IN_MAIN_PROCESS_KEY])this._pendingActions.push(e);else{var n=t.silent;doDispatchAction.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&env.browser.weChat&&this._throttledZrFlush(),flushPendingActions.call(this,n),triggerUpdatedEvent.call(this,n)}},n.prototype.updateLabelLayout=function(){lifecycle.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},n.prototype.appendData=function(e){if(this._disposed)disposedWarning(this.id);else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},n.internalField=function(){function t(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function n(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var o=n[r];"emphasis"!==o&&"blur"!==o&&"select"!==o&&t.push(o)}e.selected&&e.states.select&&t.push("select"),e.hoverState===HOVER_STATE_EMPHASIS&&e.states.emphasis?t.push("emphasis"):e.hoverState===HOVER_STATE_BLUR&&e.states.blur&&t.push("blur"),e.useStates(t)}function r(e,t){if(!e.preventAutoZ){var n=e.get("z")||0,r=e.get("zlevel")||0;t.eachRendered(function(e){return o(e,n,r,-1/0),!0})}}function o(e,t,n,r){var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var s=e.childrenRef(),l=0;l<s.length;l++)r=Math.max(o(s[l],t,n,r),r);else e.z=t,e.zlevel=n,r=Math.max(e.z2,r);if(i&&(i.z=t,i.zlevel=n,isFinite(r)&&(i.z2=r+2)),a){var u=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(r)&&(a.z2=r+(u&&u.showAbove?1:-1))}return r}function i(e,t){t.eachRendered(function(e){if(!isElementRemoved(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&(e.stateTransition=null),t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&(e.prevStates=null)}})}function a(e,t){var r=e.getModel("stateAnimation"),o=e.isAnimationEnabled(),i=r.get("duration"),a=i>0?{duration:i,delay:r.get("delay"),easing:r.get("easing")}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(isElementRemoved(e))return;if(e instanceof Path&&savePathStates(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(o){e.stateTransition=a;var r=e.getTextContent(),i=e.getTextGuideLine();r&&(r.stateTransition=a),i&&(i.stateTransition=a)}e.__dirty&&n(e)}})}prepare=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),prepareView(e,!0),prepareView(e,!1),t.plan()},prepareView=function(e,t){for(var n=e._model,r=e._scheduler,o=t?e._componentsViews:e._chartsViews,i=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;l<o.length;l++)o[l].__alive=!1;function u(e){var l=e.__requireNewView;e.__requireNewView=!1;var u="_ec_"+e.id+"_"+e.type,c=!l&&i[u];if(!c){var d=parseClassType(e.type);(c=new(t?ComponentView.getClass(d.main,d.sub):ChartView.getClass(d.sub))).init(n,s),i[u]=c,o.push(c),a.add(c.group)}e.__viewId=c.__id=u,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(c,e,n,s)}t?n.eachComponent(function(e,t){"series"!==e&&u(t)}):n.eachSeries(u);for(l=0;l<o.length;){var c=o[l];c.__alive?l++:(!t&&c.renderTask.dispose(),a.remove(c.group),c.dispose(n,s),o.splice(l,1),i[c.__id]===c&&delete i[c.__id],c.__id=c.group.__ecComponentInfo=null)}},updateDirectly=function(e,t,n,r,o){var i=e._model;if(i.setUpdatePayload(n),r){var a={};a[r+"Id"]=n[r+"Id"],a[r+"Index"]=n[r+"Index"],a[r+"Name"]=n[r+"Name"];var s={mainType:r,query:a};o&&(s.subType=o);var l,u=n.excludeSeriesId;null!=u&&(l=createHashMap(),each$f(normalizeToArray(u),function(e){var t=convertOptionIdName(e,null);null!=t&&l.set(t,!0)})),i&&i.eachComponent(s,function(t){if(!(l&&null!=l.get(t.id)))if(isHighDownPayload(n))if(t instanceof SeriesModel)n.type!==HIGHLIGHT_ACTION_TYPE||n.notBlur||t.get(["emphasis","disabled"])||blurSeriesFromHighlightPayload(t,n,e._api);else{var r=findComponentHighDownDispatchers(t.mainType,t.componentIndex,n.name,e._api),o=r.focusSelf,i=r.dispatchers;n.type===HIGHLIGHT_ACTION_TYPE&&o&&!n.notBlur&&blurComponent(t.mainType,t.componentIndex,e._api),i&&each$f(i,function(e){n.type===HIGHLIGHT_ACTION_TYPE?enterEmphasis(e):leaveEmphasis(e)})}else isSelectChangePayload(n)&&t instanceof SeriesModel&&(toggleSelectionFromPayload(t,n,e._api),updateSeriesElementSelection(t),markStatusToUpdate(e))},e),i&&i.eachComponent(s,function(t){l&&null!=l.get(t.id)||c(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])},e)}else each$f([].concat(e._componentsViews).concat(e._chartsViews),c);function c(r){r&&r.__alive&&r[t]&&r[t](r.__model,i,e._api,n)}},updateMethods={prepareAndUpdate:function(e){prepare(this),updateMethods.update.call(this,e,{optionChanged:null!=e.newOption})},update:function(e,n){var r=this._model,o=this._api,i=this._zr,a=this._coordSysMgr,s=this._scheduler;if(r){r.setUpdatePayload(e),s.restoreData(r,e),s.performSeriesTasks(r),a.create(r,o),s.performDataProcessorTasks(r,e),updateStreamModes(this,r),a.update(r,o),t(r),s.performVisualTasks(r,e),render(this,r,o,e,n);var l=r.get("backgroundColor")||"transparent",u=r.get("darkMode");i.setBackgroundColor(l),null!=u&&"auto"!==u&&i.setDarkMode(u),lifecycle.trigger("afterupdate",r,o)}},updateTransform:function(e){var n=this,r=this._model,o=this._api;if(r){r.setUpdatePayload(e);var i=[];r.eachComponent(function(t,a){if("series"!==t){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,r,o,e);l&&l.update&&i.push(s)}else i.push(s)}});var a=createHashMap();r.eachSeries(function(t){var i=n._chartsMap[t.__viewId];if(i.updateTransform){var s=i.updateTransform(t,r,o,e);s&&s.update&&a.set(t.uid,1)}else a.set(t.uid,1)}),t(r),this._scheduler.performVisualTasks(r,e,{setDirty:!0,dirtyMap:a}),renderSeries(this,r,o,e,{},a),lifecycle.trigger("afterupdate",r,o)}},updateView:function(e){var n=this._model;n&&(n.setUpdatePayload(e),ChartView.markUpdateMethod(e,"updateView"),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),render(this,n,this._api,e,{}),lifecycle.trigger("afterupdate",n,this._api))},updateVisual:function(e){var n=this,r=this._model;r&&(r.setUpdatePayload(e),r.eachSeries(function(e){e.getData().clearAllVisual()}),ChartView.markUpdateMethod(e,"updateVisual"),t(r),this._scheduler.performVisualTasks(r,e,{visualType:"visual",setDirty:!0}),r.eachComponent(function(t,o){if("series"!==t){var i=n.getViewOfComponentModel(o);i&&i.__alive&&i.updateVisual(o,r,n._api,e)}}),r.eachSeries(function(t){n._chartsMap[t.__viewId].updateVisual(t,r,n._api,e)}),lifecycle.trigger("afterupdate",r,this._api))},updateLayout:function(e){updateMethods.update.call(this,e)}},doConvertPixel=function(e,t,n,r){if(e._disposed)disposedWarning(e.id);else for(var o,i=e._model,a=e._coordSysMgr.getCoordinateSystems(),s=parseFinder$1(i,n),l=0;l<a.length;l++){var u=a[l];if(u[t]&&null!=(o=u[t](i,s,r)))return o}},updateStreamModes=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},doDispatchAction=function(t,n){var r=this,o=this.getModel(),i=t.type,a=t.escapeConnect,s=actions[i],l=s.actionInfo,u=(l.update||"update").split(":"),c=u.pop(),d=null!=u[0]&&parseClassType(u[0]);this[IN_MAIN_PROCESS_KEY]=!0;var p=[t],h=!1;t.batch&&(h=!0,p=map$1(t.batch,function(e){return(e=defaults$2(extend$2({},e),t)).batch=null,e}));var f,g=[],m=isSelectChangePayload(t),y=isHighDownPayload(t);if(y&&allLeaveBlur(this._api),each$f(p,function(e){if((f=(f=s.action(e,r._model,r._api))||extend$2({},e)).type=l.event||f.type,g.push(f),y){var n=preParseFinder(t),o=n.queryOptionMap,i=n.mainTypeSpecified?o.keys()[0]:"series";updateDirectly(r,c,e,i),markStatusToUpdate(r)}else m?(updateDirectly(r,c,e,"series"),markStatusToUpdate(r)):d&&updateDirectly(r,c,e,d.main,d.sub)}),"none"!==c&&!y&&!m&&!d)try{this[PENDING_UPDATE]?(prepare(this),updateMethods.update.call(this,t),this[PENDING_UPDATE]=null):updateMethods[c].call(this,t)}catch(e){throw this[IN_MAIN_PROCESS_KEY]=!1,e}if(f=h?{type:l.event||i,escapeConnect:a,batch:g}:g[0],this[IN_MAIN_PROCESS_KEY]=!1,!n){var v=this._messageCenter;if(v.trigger(f.type,f),m){var _={type:"selectchanged",escapeConnect:a,selected:getAllSelectedIndices(o),isFromClick:t.isFromClick||!1,fromAction:t.type,fromActionPayload:t};v.trigger(_.type,_)}}},flushPendingActions=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();doDispatchAction.call(this,n,e)}},triggerUpdatedEvent=function(e){!e&&this.trigger("updated")},bindRenderedEvent=function(e,t){e.on("rendered",function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[PENDING_UPDATE]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")})},bindMouseEvent=function(e,t){e.on("mouseover",function(e){var n=findEventDispatcher(e.target,isHighDownDispatcher);n&&(handleGlobalMouseOverForHighDown(n,e,t._api),markStatusToUpdate(t))}).on("mouseout",function(e){var n=findEventDispatcher(e.target,isHighDownDispatcher);n&&(handleGlobalMouseOutForHighDown(n,e,t._api),markStatusToUpdate(t))}).on("click",function(e){var n=findEventDispatcher(e.target,function(e){return null!=getECData(e).dataIndex},!0);if(n){var r=n.selected?"unselect":"select",o=getECData(n);t._api.dispatchAction({type:r,dataType:o.dataType,dataIndexInside:o.dataIndex,seriesIndex:o.seriesIndex,isFromClick:!0})}})},render=function(e,t,n,r,o){!function(e){var t=[],n=[],r=!1;if(e.eachComponent(function(e,o){var i=o.get("zlevel")||0,a=o.get("z")||0,s=o.getZLevelKey();r=r||!!s,("series"===e?n:t).push({zlevel:i,z:a,idx:o.componentIndex,type:e,key:s})}),r){var o,i,a=t.concat(n);sort$2(a,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),each$f(a,function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,a=t.key;null!=o&&(r=Math.max(o,r)),a?(r===o&&a!==i&&r++,i=a):i&&(r===o&&r++,i=""),o=r,n.setZLevel(r)})}}(t),renderComponents(e,t,n,r,o),each$f(e._chartsViews,function(e){e.__alive=!1}),renderSeries(e,t,n,r,o),each$f(e._chartsViews,function(e){e.__alive||e.remove(t,n)})},renderComponents=function(e,t,n,o,s,l){each$f(l||e._componentsViews,function(e){var s=e.__model;i(s,e),e.render(s,t,n,o),r(s,e),a(s,e)})},renderSeries=function(e,t,n,o,s,l){var u=e._scheduler;s=extend$2(s||{},{updatedSeries:t.getSeries()}),lifecycle.trigger("series:beforeupdate",t,n,s);var c=!1;t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var r=n.renderTask;u.updatePayload(r,o),i(t,n),l&&l.get(t.uid)&&r.dirty(),r.perform(u.getPerformArgs(r))&&(c=!0),n.group.silent=!!t.get("silent"),function(e,t){var n=e.get("blendMode")||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}(t,n),updateSeriesElementSelection(t)}),u.unfinished=c||u.unfinished,lifecycle.trigger("series:layoutlabels",t,n,s),lifecycle.trigger("series:transition",t,n,s),t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];r(t,n),a(t,n)}),function(e,t){var n=e._zr,r=n.storage,o=0;r.traverse(function(e){e.isGroup||o++}),o>t.get("hoverLayerThreshold")&&!env.node&&!env.worker&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)})}})}(e,t),lifecycle.trigger("series:afterupdate",t,n,s)},markStatusToUpdate=function(e){e[STATUS_NEEDS_UPDATE_KEY]=!0,e.getZr().wakeUp()},applyChangedStates=function(e){e[STATUS_NEEDS_UPDATE_KEY]&&(e.getZr().storage.traverse(function(e){isElementRemoved(e)||n(e)}),e[STATUS_NEEDS_UPDATE_KEY]=!1)},createExtensionAPI=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){enterEmphasis(t,n),markStatusToUpdate(e)},n.prototype.leaveEmphasis=function(t,n){leaveEmphasis(t,n),markStatusToUpdate(e)},n.prototype.enterBlur=function(t){enterBlur(t),markStatusToUpdate(e)},n.prototype.leaveBlur=function(t){leaveBlur(t),markStatusToUpdate(e)},n.prototype.enterSelect=function(t){enterSelect(t),markStatusToUpdate(e)},n.prototype.leaveSelect=function(t){leaveSelect(t),markStatusToUpdate(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n}(ExtensionAPI))(e)},enableConnect=function(e){function t(e,t){for(var n=0;n<e.length;n++){e[n][CONNECT_STATUS_KEY]=t}}each$f(eventActionMap,function(n,r){e._messageCenter.on(r,function(n){if(connectedGroups[e.group]&&e[CONNECT_STATUS_KEY]!==CONNECT_STATUS_PENDING){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),o=[];each$f(instances,function(t){t!==e&&t.group===e.group&&o.push(t)}),t(o,CONNECT_STATUS_PENDING),each$f(o,function(e){e[CONNECT_STATUS_KEY]!==CONNECT_STATUS_UPDATING&&e.dispatchAction(r)}),t(o,CONNECT_STATUS_UPDATED)}})})}}(),n}(Eventful),echartsProto=ECharts.prototype;echartsProto.on=createRegisterEventWithLowercaseECharts("on"),echartsProto.off=createRegisterEventWithLowercaseECharts("off"),echartsProto.one=function(e,t,n){var r=this;this.on.call(this,e,function n(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];t&&t.apply&&t.apply(this,o),r.off(e,n)},n)};var MOUSE_EVENT_NAMES=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function disposedWarning(e){}var actions={},eventActionMap={},dataProcessorFuncs=[],optionPreprocessorFuncs=[],visualFuncs=[],themeStorage={},loadingEffects={},instances={},connectedGroups={},idBase=+new Date-0,groupIdBase=+new Date-0,DOM_ATTRIBUTE_KEY="_echarts_instance_";function init$1(e,t,n){var r=!(n&&n.ssr);if(r){var o=getInstanceByDom(e);if(o)return o}var i=new ECharts(e,t,n);return i.id="ec_"+idBase++,instances[i.id]=i,r&&setAttribute(e,DOM_ATTRIBUTE_KEY,i.id),enableConnect(i),lifecycle.trigger("afterinit",i),i}function connect(e){if(isArray$1(e)){var t=e;e=null,each$f(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+groupIdBase++,each$f(t,function(t){t.group=e})}return connectedGroups[e]=!0,e}function disconnect(e){connectedGroups[e]=!1}var disConnect=exports("a$",disconnect);function dispose(e){isString(e)?e=instances[e]:e instanceof ECharts||(e=getInstanceByDom(e)),e instanceof ECharts&&!e.isDisposed()&&e.dispose()}function getInstanceByDom(e){return instances[getAttribute(e,DOM_ATTRIBUTE_KEY)]}function getInstanceById(e){return instances[e]}function registerTheme(e,t){themeStorage[e]=t}function registerPreprocessor(e){indexOf(optionPreprocessorFuncs,e)<0&&optionPreprocessorFuncs.push(e)}function registerProcessor(e,t){normalizeRegister(dataProcessorFuncs,e,t,PRIORITY_PROCESSOR_DEFAULT)}function registerPostInit(e){registerUpdateLifecycle("afterinit",e)}function registerPostUpdate(e){registerUpdateLifecycle("afterupdate",e)}function registerUpdateLifecycle(e,t){lifecycle.on(e,t)}function registerAction(e,t,n){isFunction(t)&&(n=t,t="");var r=isObject$3(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,eventActionMap[t]||(assert(ACTION_REG.test(r)&&ACTION_REG.test(t)),actions[r]||(actions[r]={action:n,actionInfo:e}),eventActionMap[t]=r)}function registerCoordinateSystem(e,t){CoordinateSystemManager.register(e,t)}function getCoordinateSystemDimensions(e){var t=CoordinateSystemManager.get(e);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()}function registerLayout(e,t){normalizeRegister(visualFuncs,e,t,PRIORITY_VISUAL_LAYOUT,"layout")}function registerVisual(e,t){normalizeRegister(visualFuncs,e,t,PRIORITY_VISUAL_CHART,"visual")}var registeredTasks=[];function normalizeRegister(e,t,n,r,o){if((isFunction(t)||isObject$3(t))&&(n=t,t=r),!(indexOf(registeredTasks,n)>=0)){registeredTasks.push(n);var i=Scheduler.wrapStageHandler(n,o);i.__prio=t,i.__raw=n,e.push(i)}}function registerLoading(e,t){loadingEffects[e]=t}function setCanvasCreator(e){setPlatformAPI({createCanvas:e})}function registerMap$1(e,t,n){var r=getImpl("registerMap");r&&r(e,t,n)}function getMap(e){var t=getImpl("getMap");return t&&t(e)}var registerTransform=exports("bi",registerExternalTransform);registerVisual(PRIORITY_VISUAL_GLOBAL,seriesStyleTask),registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM,dataStyleTask),registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM,dataColorPaletteTask),registerVisual(PRIORITY_VISUAL_GLOBAL,seriesSymbolTask),registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM,dataSymbolTask),registerVisual(PRIORITY_VISUAL_DECAL,decalVisual),registerPreprocessor(globalBackwardCompat),registerProcessor(PRIORITY_PROCESSOR_DATASTACK,dataStack$1),registerLoading("default",defaultLoading),registerAction({type:HIGHLIGHT_ACTION_TYPE,event:HIGHLIGHT_ACTION_TYPE,update:HIGHLIGHT_ACTION_TYPE},noop),registerAction({type:DOWNPLAY_ACTION_TYPE,event:DOWNPLAY_ACTION_TYPE,update:DOWNPLAY_ACTION_TYPE},noop),registerAction({type:SELECT_ACTION_TYPE,event:SELECT_ACTION_TYPE,update:SELECT_ACTION_TYPE},noop),registerAction({type:UNSELECT_ACTION_TYPE,event:UNSELECT_ACTION_TYPE,update:UNSELECT_ACTION_TYPE},noop),registerAction({type:TOGGLE_SELECT_ACTION_TYPE,event:TOGGLE_SELECT_ACTION_TYPE,update:TOGGLE_SELECT_ACTION_TYPE},noop),registerTheme("light",lightTheme),registerTheme("dark",theme);var dataTool=exports("bj",{});function dataIndexMapValueLength(e){return null==e?0:e.length||1}function defaultKeyGetter(e){return e}var DataDiffer=function(){function e(e,t,n,r,o,i){this._old=e,this._new=t,this._oldKeyGetter=n||defaultKeyGetter,this._newKeyGetter=r||defaultKeyGetter,this.context=o,this._diffModeMultiple="multiple"===i}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=new Array(e.length),o=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,o,"_newKeyGetter");for(var i=0;i<e.length;i++){var a=r[i],s=n[a],l=dataIndexMapValueLength(s);if(l>1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,i)}else 1===l?(n[a]=null,this._update&&this._update(s,i)):this._remove&&this._remove(i)}this._performRestAdd(o,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},o=[],i=[];this._initIndexMap(e,n,o,"_oldKeyGetter"),this._initIndexMap(t,r,i,"_newKeyGetter");for(var a=0;a<o.length;a++){var s=o[a],l=n[s],u=r[s],c=dataIndexMapValueLength(l),d=dataIndexMapValueLength(u);if(c>1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),r[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),r[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),r[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),r[s]=null;else if(c>1)for(var p=0;p<c;p++)this._remove&&this._remove(l[p]);else this._remove&&this._remove(l)}this._performRestAdd(i,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=t[r],i=dataIndexMapValueLength(o);if(i>1)for(var a=0;a<i;a++)this._add&&this._add(o[a]);else 1===i&&this._add&&this._add(o);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var o=this._diffModeMultiple,i=0;i<e.length;i++){var a="_ec_"+this[r](e[i],i);if(o||(n[i]=a),t){var s=t[a],l=dataIndexMapValueLength(s);0===l?(t[a]=i,o&&n.push(a)):1===l?t[a]=[s,i]:s.push(i)}}},e}(),DimensionUserOuput=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function summarizeDimensions(e,t){var n={},r=n.encode={},o=createHashMap(),i=[],a=[],s={};each$f(e.dimensions,function(t){var n=e.getDimensionInfo(t),l=n.coordDim;if(l){var u=n.coordDimIndex;getOrCreateEncodeArr(r,l)[u]=t,n.isExtraCoord||(o.set(l,1),mayLabelDimType(n.type)&&(i[0]=t),getOrCreateEncodeArr(s,l)[u]=e.getDimensionIndex(n.name)),n.defaultTooltip&&a.push(t)}VISUAL_DIMENSIONS.each(function(e,t){var o=getOrCreateEncodeArr(r,t),i=n.otherDims[t];null!=i&&!1!==i&&(o[i]=n.name)})});var l=[],u={};o.each(function(e,t){var n=r[t];u[t]=n[0],l=l.concat(n)}),n.dataDimsOnCoord=l,n.dataDimIndicesOnCoord=map$1(l,function(t){return e.getDimensionInfo(t).storeDimIndex}),n.encodeFirstDimNotExtra=u;var c=r.label;c&&c.length&&(i=c.slice());var d=r.tooltip;return d&&d.length?a=d.slice():a.length||(a=i.slice()),r.defaultedLabel=i,r.defaultedTooltip=a,n.userOutput=new DimensionUserOuput(s,t),n}function getOrCreateEncodeArr(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function getDimensionTypeByAxis(e){return"category"===e?"ordinal":"time"===e?"time":"float"}function mayLabelDimType(e){return!("ordinal"===e||"time"===e)}var SeriesDimensionDefine=function(e){this.otherDims={},null!=e&&extend$2(this,e)},inner$h=makeInner(),dimTypeShort={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},SeriesDataSchema=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=ensureSourceDimNameMap(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return retrieve2(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=shouldRetrieveDataByName(this.source),n=!shouldOmitUnusedDimensions(e),r="",o=[],i=0,a=0;i<e;i++){var s=void 0,l=void 0,u=void 0,c=this.dimensions[a];if(c&&c.storeDimIndex===i)s=t?c.name:null,l=c.type,u=c.ordinalMeta,a++;else{var d=this.getSourceDimension(i);d&&(s=t?d.name:null,l=d.type)}o.push({property:s,type:l,ordinalMeta:u}),!t||null==s||c&&c.isCalculationCoord||(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+="$",r+=dimTypeShort[l]||"f",u&&(r+=u.uid),r+="$"}var p=this.source;return{dimensions:o,hash:[p.seriesLayoutBy,p.startIndex,r].join("$$")}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,o=this.dimensions[n];if(o&&o.storeDimIndex===t)o.isCalculationCoord||(r=o.name),n++;else{var i=this.getSourceDimension(t);i&&(r=i.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function isSeriesDataSchema(e){return e instanceof SeriesDataSchema}function createDimNameMap(e){for(var t=createHashMap(),n=0;n<(e||[]).length;n++){var r=e[n],o=isObject$3(r)?r.name:r;null!=o&&null==t.get(o)&&t.set(o,n)}return t}function ensureSourceDimNameMap(e){var t=inner$h(e);return t.dimNameMap||(t.dimNameMap=createDimNameMap(e.dimensionsDefine))}function shouldOmitUnusedDimensions(e){return e>30}var isObject$1=isObject$3,map=map$1,CtorInt32Array="undefined"==typeof Int32Array?Array:Int32Array,ID_PREFIX="e\0\0",INDEX_NOT_FOUND=-1,TRANSFERABLE_PROPERTIES=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],CLONE_PROPERTIES=["_approximateExtent"],prepareInvertedIndex,getId,getIdNameFromStore,normalizeDimensions,transferProperties,cloneListForMapAndSample,makeIdFromName,SeriesData=exports("bw",function(){function e(e,t){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var r=!1;isSeriesDataSchema(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=n||["x","y"];for(var o={},i=[],a={},s=!1,l={},u=0;u<n.length;u++){var c=n[u],d=isString(c)?new SeriesDimensionDefine({name:c}):c instanceof SeriesDimensionDefine?c:new SeriesDimensionDefine(c),p=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=p,d.coordDimIndex=0);var h=d.otherDims=d.otherDims||{};i.push(p),o[p]=d,null!=l[p]&&(s=!0),d.createInvertedIndices&&(a[p]=[]),0===h.itemName&&(this._nameDimIdx=u),0===h.itemId&&(this._idDimIdx=u),r&&(d.storeDimIndex=u)}if(this.dimensions=i,this._dimInfos=o,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=a,this._dimOmitted){var f=this._dimIdxToName=createHashMap();each$f(i,function(e){f.set(o[e].storeDimIndex,e)})}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(null==t)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(null!=n)return n;var r=this._schema.getSourceDimension(t);return r?r.name:void 0},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(null!=t)return t;if(null==e)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(isNumber(e)||null!=e&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r,o=this;if(e instanceof DataStore&&(r=e),!r){var i=this.dimensions,a=isSourceInstance(e)||isArrayLike(e)?new DefaultDataProvider(e,i.length):e;r=new DataStore;var s=map(i,function(e){return{type:o._dimInfos[e].type,property:e}});r.initData(a,s,n)}this._store=r,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,r.count()),this._dimSummary=summarizeDimensions(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),r=n.start,o=n.end,i=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var a=r;a<o;a++){var s=a-r;this._nameList[a]=t[s],i&&makeIdFromName(this,a)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return null==this._idDimIdx&&e.getSource().sourceFormat!==SOURCE_FORMAT_TYPED_ARRAY&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,o=this._idList;if(n.getSource().sourceFormat===SOURCE_FORMAT_ORIGINAL&&!n.pure)for(var i=[],a=e;a<t;a++){var s=n.getItem(a,i);if(!this.hasItemOption&&isDataItemOption(s)&&(this.hasItemOption=!0),s){var l=s.name;null==r[a]&&null!=l&&(r[a]=convertOptionIdName(l,null));var u=s.id;null==o[a]&&null!=u&&(o[a]=convertOptionIdName(u,null))}}if(this._shouldMakeIdFromName())for(a=e;a<t;a++)makeIdFromName(this,a);prepareInvertedIndex(this)}},e.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){isObject$1(e)?extend$2(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return null==n&&null!=this._nameDimIdx&&(n=getIdNameFromStore(this,this._nameDimIdx,t)),null==n&&(n=""),n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return getId(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return isArray$1(e)?r.getValues(map(e,function(e){return n._getStoreDimIndex(e)}),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],r=n&&n[t];return null==r||isNaN(r)?INDEX_NOT_FOUND:r},e.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},e.prototype.each=function(e,t,n){isFunction(e)&&(n=t,t=e,e=[]);var r=n||this,o=map(normalizeDimensions(e),this._getStoreDimIndex,this);this._store.each(o,r?bind$1(t,r):t)},e.prototype.filterSelf=function(e,t,n){isFunction(e)&&(n=t,t=e,e=[]);var r=n||this,o=map(normalizeDimensions(e),this._getStoreDimIndex,this);return this._store=this._store.filter(o,r?bind$1(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={};return each$f(keys(e),function(r){var o=t._getStoreDimIndex(r);n[o]=e[r]}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){isFunction(e)&&(n=t,t=e,e=[]),n=n||this;var r=[];return this.each(e,function(){r.push(t&&t.apply(this,arguments))},n),r},e.prototype.map=function(e,t,n,r){var o=n||r||this,i=map(normalizeDimensions(e),this._getStoreDimIndex,this),a=cloneListForMapAndSample(this);return a._store=this._store.map(i,o?bind$1(t,o):t),a},e.prototype.modify=function(e,t,n,r){var o=n||r||this,i=map(normalizeDimensions(e),this._getStoreDimIndex,this);this._store.modify(i,o?bind$1(t,o):t)},e.prototype.downSample=function(e,t,n,r){var o=cloneListForMapAndSample(this);return o._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),o},e.prototype.minmaxDownSample=function(e,t){var n=cloneListForMapAndSample(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=cloneListForMapAndSample(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new Model(n,t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new DataDiffer(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return getId(e,t)},function(e){return getId(t,e)})},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},isObject$1(e)?extend$2(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],r=n&&n[t];return null==r?this.getVisual(t):r},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var o=r[t];return null==o&&(isArray$1(o=this.getVisual(t))?o=o.slice():isObject$1(o)&&(o=extend$2({},o)),r[t]=o),o},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,isObject$1(t)?extend$2(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){isObject$1(e)?extend$2(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?extend$2(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;setCommonECData(n,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){each$f(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:map(this.dimensions,this._getDimInfo,this),this.hostModel)),transferProperties(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];isFunction(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(slice(arguments)))})},e.internalField=(prepareInvertedIndex=function(e){var t=e._invertedIndicesMap;each$f(t,function(n,r){var o=e._dimInfos[r],i=o.ordinalMeta,a=e._store;if(i){n=t[r]=new CtorInt32Array(i.categories.length);for(var s=0;s<n.length;s++)n[s]=INDEX_NOT_FOUND;for(s=0;s<a.count();s++)n[a.get(o.storeDimIndex,s)]=s}})},getIdNameFromStore=function(e,t,n){return convertOptionIdName(e._getCategory(t,n),null)},getId=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=getIdNameFromStore(e,e._idDimIdx,t)),null==n&&(n=ID_PREFIX+t),n},normalizeDimensions=function(e){return isArray$1(e)||(e=null!=e?[e]:[]),e},cloneListForMapAndSample=function(t){var n=new e(t._schema?t._schema:map(t.dimensions,t._getDimInfo,t),t.hostModel);return transferProperties(n,t),n},transferProperties=function(e,t){each$f(TRANSFERABLE_PROPERTIES.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,each$f(CLONE_PROPERTIES,function(n){e[n]=clone$6(t[n])}),e._calculationInfo=extend$2({},t._calculationInfo)},void(makeIdFromName=function(e,t){var n=e._nameList,r=e._idList,o=e._nameDimIdx,i=e._idDimIdx,a=n[t],s=r[t];if(null==a&&null!=o&&(n[t]=a=getIdNameFromStore(e,o,t)),null==s&&null!=i&&(r[t]=s=getIdNameFromStore(e,i,t)),null==s&&null!=a){var l=e._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),r[t]=s}})),e}());function createDimensions(e,t){return prepareSeriesDataSchema(e,t).dimensions}function prepareSeriesDataSchema(e,t){isSourceInstance(e)||(e=createSourceFromSeriesDataOption(e));var n=(t=t||{}).coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],o=createHashMap(),i=[],a=getDimCount(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&shouldOmitUnusedDimensions(a),l=r===e.dimensionsDefine,u=l?ensureSourceDimNameMap(e):createDimNameMap(r),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,a));for(var d=createHashMap(c),p=new CtorInt32Array$1(a),h=0;h<p.length;h++)p[h]=-1;function f(e){var t=p[e];if(t<0){var n=r[e],o=isObject$3(n)?n:{name:n},a=new SeriesDimensionDefine,s=o.name;null!=s&&null!=u.get(s)&&(a.name=a.displayName=s),null!=o.type&&(a.type=o.type),null!=o.displayName&&(a.displayName=o.displayName);var l=i.length;return p[e]=l,a.storeDimIndex=e,i.push(a),a}return i[t]}if(!s)for(h=0;h<a;h++)f(h);d.each(function(e,t){var n=normalizeToArray(e).slice();if(1===n.length&&!isString(n[0])&&n[0]<0)d.set(t,!1);else{var r=d.set(t,[]);each$f(n,function(e,n){var o=isString(e)?u.get(e):e;null!=o&&o<a&&(r[n]=o,m(f(o),t,n))})}});var g=0;function m(e,t,n){null!=VISUAL_DIMENSIONS.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,o.set(t,!0))}each$f(n,function(e){var t,n,r,o;if(isString(e))t=e,o={};else{t=(o=e).name;var i=o.ordinalMeta;o.ordinalMeta=null,(o=extend$2({},o)).ordinalMeta=i,n=o.dimsDef,r=o.otherDims,o.name=o.coordDim=o.coordDimIndex=o.dimsDef=o.otherDims=null}var s=d.get(t);if(!1!==s){if(!(s=normalizeToArray(s)).length)for(var u=0;u<(n&&n.length||1);u++){for(;g<a&&null!=f(g).coordDim;)g++;g<a&&s.push(g++)}each$f(s,function(e,i){var a=f(e);if(l&&null!=o.type&&(a.type=o.type),m(defaults$2(a,o),t,i),null==a.name&&n){var s=n[i];!isObject$3(s)&&(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}r&&defaults$2(a.otherDims,r)})}});var y=t.generateCoord,v=t.generateCoordCount,_=null!=v;v=y?v||1:0;var x=y||"value";function S(e){null==e.name&&(e.name=e.coordDim)}if(s)each$f(i,function(e){S(e)}),i.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var b=0;b<a;b++){var T=f(b);null==T.coordDim&&(T.coordDim=genCoordDimName(x,o,_),T.coordDimIndex=0,(!y||v<=0)&&(T.isExtraCoord=!0),v--),S(T),null!=T.type||guessOrdinal(e,b)!==BE_ORDINAL.Must&&(!T.isExtraCoord||null==T.otherDims.itemName&&null==T.otherDims.seriesName)||(T.type="ordinal")}return removeDuplication(i),new SeriesDataSchema({source:e,dimensions:i,fullDimensionCount:a,dimensionOmitted:s})}function removeDuplication(e){for(var t=createHashMap(),n=0;n<e.length;n++){var r=e[n],o=r.name,i=t.get(o)||0;i>0&&(r.name=o+(i-1)),i++,t.set(o,i)}}function getDimCount(e,t,n,r){var o=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return each$f(t,function(e){var t;isObject$3(e)&&(t=e.dimsDef)&&(o=Math.max(o,t.length))}),o}function genCoordDimName(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var CoordSysInfo=function(){return function(e){this.coordSysDims=[],this.axisMap=createHashMap(),this.categoryAxisMap=createHashMap(),this.coordSysName=e}}();function getCoordSysInfoBySeries(e){var t=e.get("coordinateSystem"),n=new CoordSysInfo(t),r=fetchers[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var fetchers={cartesian2d:function(e,t,n,r){var o=e.getReferringComponents("xAxis",SINGLE_REFERRING).models[0],i=e.getReferringComponents("yAxis",SINGLE_REFERRING).models[0];t.coordSysDims=["x","y"],n.set("x",o),n.set("y",i),isCategory(o)&&(r.set("x",o),t.firstCategoryDimIndex=0),isCategory(i)&&(r.set("y",i),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var o=e.getReferringComponents("singleAxis",SINGLE_REFERRING).models[0];t.coordSysDims=["single"],n.set("single",o),isCategory(o)&&(r.set("single",o),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var o=e.getReferringComponents("polar",SINGLE_REFERRING).models[0],i=o.findAxisModel("radiusAxis"),a=o.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",i),n.set("angle",a),isCategory(i)&&(r.set("radius",i),t.firstCategoryDimIndex=0),isCategory(a)&&(r.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var o=e.ecModel,i=o.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=i.dimensions.slice();each$f(i.parallelAxisIndex,function(e,i){var s=o.getComponent("parallelAxis",e),l=a[i];n.set(l,s),isCategory(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=i))})}};function isCategory(e){return"category"===e.get("type")}function enableDataStack(e,t,n){var r,o,i,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;isLegacyDimensionsInput(t)?r=t:(o=t.schema,r=o.dimensions,i=t.store);var l,u,c,d,p=!(!e||!e.get("stack"));if(each$f(r,function(e,t){isString(e)&&(r[t]=e={name:e}),p&&!e.isExtraCoord&&(a||l||!e.ordinalMeta||(l=e),u||"ordinal"===e.type||"time"===e.type||s&&s!==e.coordDim||(u=e))}),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,f=u.type,g=0;each$f(r,function(e){e.coordDim===h&&g++});var m={name:c,coordDim:h,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},y={name:d,coordDim:d,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};o?(i&&(m.storeDimIndex=i.ensureCalculationDimension(d,f),y.storeDimIndex=i.ensureCalculationDimension(c,f)),o.appendCalculationDimension(m),o.appendCalculationDimension(y)):(r.push(m),r.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:d,stackResultDimension:c}}function isLegacyDimensionsInput(e){return!isSeriesDataSchema(e.schema)}function isDimensionStacked(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function getStackedDimension(e,t){return isDimensionStacked(e,t)?e.getCalculationInfo("stackResultDimension"):t}function getCoordSysDimDefs(e,t){var n,r=e.get("coordinateSystem"),o=CoordinateSystemManager.get(r);return t&&t.coordSysDims&&(n=map$1(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);if(r){var o=r.get("type");n.type=getDimensionTypeByAxis(o)}return n})),n||(n=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]),n}function injectOrdinalMeta(e,t,n){var r,o;return n&&each$f(e,function(e,i){var a=e.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=i),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(o=!0)}),o||null==r||(e[r].otherDims.itemName=0),r}function createSeriesData(e,t,n){n=n||{};var r,o=t.getSourceManager(),i=!1;e?(i=!0,r=createSourceFromSeriesDataOption(e)):i=(r=o.getSource()).sourceFormat===SOURCE_FORMAT_ORIGINAL;var a=getCoordSysInfoBySeries(t),s=getCoordSysDimDefs(t,a),l=n.useEncodeDefaulter,u=isFunction(l)?l:l?curry$1(makeSeriesEncodeForAxisCoordSys,s,t):null,c=prepareSeriesDataSchema(r,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i}),d=injectOrdinalMeta(c.dimensions,n.createInvertedIndices,a),p=i?null:o.getSharedDataStore(c),h=enableDataStack(t,{schema:c,store:p}),f=new SeriesData(c,t);f.setCalculationInfo(h);var g=null!=d&&isNeedCompleteOrdinalData(r)?function(e,t,n,r){return r===d?n:this.defaultDimValueGetter(e,t,n,r)}:null;return f.hasItemOption=!1,f.initData(i?r:p,null,g),f}function isNeedCompleteOrdinalData(e){if(e.sourceFormat===SOURCE_FORMAT_ORIGINAL)return!isArray$1(getDataItemValue(firstDataNotNull(e.data||[])))}function firstDataNotNull(e){for(var t=0;t<e.length&&null==e[t];)t++;return e[t]}var Scale=function(){function e(e){this._setting=e||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();enableClassManagement(Scale);var uidBase=0,OrdinalMeta=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++uidBase}return e.createByAxisModel=function(t){var n=t.option,r=n.data,o=r&&map$1(r,getName);return new e({categories:o,needCollect:!o,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!isString(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=this._getOrCreateMap();return null==(t=r.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=createHashMap(this.categories))},e}();function getName(e){return isObject$3(e)&&null!=e.value?e.value:e+""}function isIntervalOrLogScale(e){return"interval"===e.type||"log"===e.type}function intervalScaleNiceTicks(e,t,n,r){var o={},i=e[1]-e[0],a=o.interval=nice(i/t,!0);null!=n&&a<n&&(a=o.interval=n),null!=r&&a>r&&(a=o.interval=r);var s=o.intervalPrecision=getIntervalPrecision(a);return fixExtent(o.niceTickExtent=[round$3(Math.ceil(e[0]/a)*a,s),round$3(Math.floor(e[1]/a)*a,s)],e),o}function increaseInterval(e){var t=Math.pow(10,quantityExponent(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,round$3(n*t)}function getIntervalPrecision(e){return getPrecision(e)+2}function clamp(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function fixExtent(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),clamp(e,0,t),clamp(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function contain$1(e,t){return e>=t[0]&&e<=t[1]}function normalize$2(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function scale(e,t){return e*(t[1]-t[0])+t[0]}var OrdinalScale=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new OrdinalMeta({})),isArray$1(r)&&(r=new OrdinalMeta({categories:map$1(r,function(e){return isObject$3(e)?e.value:e})})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return __extends(t,e),t.prototype.parse=function(e){return null==e?NaN:isString(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return contain$1(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return normalize$2(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(scale(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],o=0,i=this._ordinalMeta.categories.length,a=Math.min(i,t.length);o<a;++o){var s=t[o];n[o]=s,r[s]=o}for(var l=0;o<i;++o){for(;null!=r[l];)l++;n.push(l),r[l]=o}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return null==n?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(Scale);Scale.registerClass(OrdinalScale);var roundNumber=round$3,IntervalScale=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return __extends(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return contain$1(e,this._extent)},t.prototype.normalize=function(e){return normalize$2(e,this._extent)},t.prototype.scale=function(e){return scale(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=getIntervalPrecision(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,o=this._intervalPrecision,i=[];if(!t)return i;n[0]<r[0]&&(e?i.push({value:roundNumber(r[0]-t,o)}):i.push({value:n[0]}));for(var a=r[0];a<=r[1]&&(i.push({value:a}),(a=roundNumber(a+t,o))!==i[i.length-1].value);)if(i.length>1e4)return[];var s=i.length?i[i.length-1].value:r[1];return n[1]>s&&(e?i.push({value:roundNumber(s+t,o)}):i.push({value:n[1]})),i},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),o=1;o<t.length;o++){for(var i=t[o],a=t[o-1],s=0,l=[],u=(i.value-a.value)/e;s<e-1;){var c=roundNumber(a.value+(s+1)*u);c>r[0]&&c<r[1]&&l.push(c),s++}n.push(l)}return n},t.prototype.getLabel=function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=getPrecision(e.value)||0:"auto"===n&&(n=this._intervalPrecision),addCommas(roundNumber(e.value,n,!0))},t.prototype.calcNiceTicks=function(e,t,n){e=e||5;var r=this._extent,o=r[1]-r[0];if(isFinite(o)){o<0&&(o=-o,r.reverse());var i=intervalScaleNiceTicks(r,e,t,n);this._intervalPrecision=i.intervalPrecision,this._interval=i.interval,this._niceExtent=i.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var n=Math.abs(t[0]);e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;var r=t[1]-t[0];isFinite(r)||(t[0]=0,t[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var o=this._interval;e.fixMin||(t[0]=roundNumber(Math.floor(t[0]/o)*o)),e.fixMax||(t[1]=roundNumber(Math.ceil(t[1]/o)*o))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}(Scale);Scale.registerClass(IntervalScale);var supportFloat32Array="undefined"!=typeof Float32Array,Float32ArrayCtor=supportFloat32Array?Float32Array:Array;function createFloat32Array(e){return isArray$1(e)?supportFloat32Array?new Float32Array(e):e:new Float32ArrayCtor(e)}var STACK_PREFIX="__ec_stack_";function getSeriesStackId$1(e){return e.get("stack")||STACK_PREFIX+e.seriesIndex}function getAxisKey$1(e){return e.dim+e.index}function getLayoutOnAxis(e){var t=[],n=e.axis,r="axis0";if("category"===n.type){for(var o=n.getBandWidth(),i=0;i<e.count;i++)t.push(defaults$2({bandWidth:o,axisKey:r,stackId:STACK_PREFIX+i},e));var a=doCalBarWidthAndOffset(t),s=[];for(i=0;i<e.count;i++){var l=a[r][STACK_PREFIX+i];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function prepareLayoutBarSeries(e,t){var n=[];return t.eachSeriesByType(e,function(e){isOnCartesian(e)&&n.push(e)}),n}function getValueAxesMinGaps(e){var t={};each$f(e,function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var r=e.getData(),o=n.dim+"_"+n.index,i=r.getDimensionIndex(r.mapDimension(n.dim)),a=r.getStore(),s=0,l=a.count();s<l;++s){var u=a.get(i,s);t[o]?t[o].push(u):t[o]=[u]}});var n={};for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(o){o.sort(function(e,t){return e-t});for(var i=null,a=1;a<o.length;++a){var s=o[a]-o[a-1];s>0&&(i=null===i?s:Math.min(i,s))}n[r]=i}}return n}function makeColumnLayout(e){var t=getValueAxesMinGaps(e),n=[];return each$f(e,function(e){var r,o=e.coordinateSystem.getBaseAxis(),i=o.getExtent();if("category"===o.type)r=o.getBandWidth();else if("value"===o.type||"time"===o.type){var a=o.dim+"_"+o.index,s=t[a],l=Math.abs(i[1]-i[0]),u=o.scale.getExtent(),c=Math.abs(u[1]-u[0]);r=s?l/c*s:l}else{var d=e.getData();r=Math.abs(i[1]-i[0])/d.count()}var p=parsePercent(e.get("barWidth"),r),h=parsePercent(e.get("barMaxWidth"),r),f=parsePercent(e.get("barMinWidth")||(isInLargeMode(e)?.5:1),r),g=e.get("barGap"),m=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:p,barMaxWidth:h,barMinWidth:f,barGap:g,barCategoryGap:m,axisKey:getAxisKey$1(o),stackId:getSeriesStackId$1(e)})}),doCalBarWidthAndOffset(n)}function doCalBarWidthAndOffset(e){var t={};each$f(e,function(e,n){var r=e.axisKey,o=e.bandWidth,i=t[r]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=i.stacks;t[r]=i;var s=e.stackId;a[s]||i.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(i.remainedWidth,l),i.remainedWidth-=l);var u=e.barMaxWidth;u&&(a[s].maxWidth=u);var c=e.barMinWidth;c&&(a[s].minWidth=c);var d=e.barGap;null!=d&&(i.gap=d);var p=e.barCategoryGap;null!=p&&(i.categoryGap=p)});var n={};return each$f(t,function(e,t){n[t]={};var r=e.stacks,o=e.bandWidth,i=e.categoryGap;if(null==i){var a=keys(r).length;i=Math.max(35-4*a,15)+"%"}var s=parsePercent(i,o),l=parsePercent(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),each$f(r,function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,u-=r+l*r,c--}else{var r=d;t&&t<r&&(r=Math.min(t,u)),n&&n>r&&(r=n),r!==d&&(e.width=r,u-=r+l*r,c--)}}),d=(u-s)/(c+(c-1)*l),d=Math.max(d,0);var p,h=0;each$f(r,function(e,t){e.width||(e.width=d),p=e,h+=e.width*(1+l)}),p&&(h-=p.width*l);var f=-h/2;each$f(r,function(e,r){n[t][r]=n[t][r]||{bandWidth:o,offset:f,width:e.width},f+=e.width*(1+l)})}),n}function retrieveColumnLayout(e,t,n){if(e&&t){var r=e[getAxisKey$1(t)];return null!=r&&null!=n?r[getSeriesStackId$1(n)]:r}}function layout$3(e,t){var n=prepareLayoutBarSeries(e,t),r=makeColumnLayout(n);each$f(n,function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),o=getSeriesStackId$1(e),i=r[getAxisKey$1(n)][o],a=i.offset,s=i.width;t.setLayout({bandWidth:i.bandWidth,offset:a,size:s})})}function createProgressiveLayout(e){return{seriesType:e,plan:createRenderPlanner(),reset:function(e){if(isOnCartesian(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),o=n.getOtherAxis(r),i=t.getDimensionIndex(t.mapDimension(o.dim)),a=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get("showBackground",!0),l=t.mapDimension(o.dim),u=t.getCalculationInfo("stackResultDimension"),c=isDimensionStacked(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),d=o.isHorizontal(),p=getValueAxisStart(r,o),h=isInLargeMode(e),f=e.get("barMinHeight")||0,g=u&&t.getDimensionIndex(u),m=t.getLayout("size"),y=t.getLayout("offset");return{progress:function(e,t){for(var r,o=e.count,l=h&&createFloat32Array(3*o),u=h&&s&&createFloat32Array(3*o),v=h&&createFloat32Array(o),_=n.master.getRect(),x=d?_.width:_.height,S=t.getStore(),b=0;null!=(r=e.next());){var T=S.get(c?g:i,r),A=S.get(a,r),w=p,C=void 0;c&&(C=+T-S.get(i,r));var E=void 0,M=void 0,I=void 0,P=void 0;if(d){var D=n.dataToPoint([T,A]);if(c)w=n.dataToPoint([C,A])[0];E=w,M=D[1]+y,I=D[0]-w,P=m,Math.abs(I)<f&&(I=(I<0?-1:1)*f)}else{D=n.dataToPoint([A,T]);if(c)w=n.dataToPoint([A,C])[1];E=D[0]+y,M=w,I=m,P=D[1]-w,Math.abs(P)<f&&(P=(P<=0?-1:1)*f)}h?(l[b]=E,l[b+1]=M,l[b+2]=d?I:P,u&&(u[b]=d?_.x:E,u[b+1]=d?M:_.y,u[b+2]=x),v[r]=r):t.setItemLayout(r,{x:E,y:M,width:I,height:P}),b+=3}h&&t.setLayout({largePoints:l,largeDataIndices:v,largeBackgroundPoints:u,valueAxisHorizontal:d})}}}}}}function isOnCartesian(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function isInLargeMode(e){return e.pipelineContext&&e.pipelineContext.large}function getValueAxisStart(e,t){var n=t.model.get("startValue");return n||(n=0),t.toGlobalCoord(t.dataToCoord("log"===t.type?n>0?n:1:n))}var bisect=function(e,t,n,r){for(;n<r;){var o=n+r>>>1;e[o][1]<t?n=o+1:r=o}return n},TimeScale=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return __extends(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return format$1(e.value,fullLeveledFormatter[getDefaultFormatPrecisionOfInterval(getPrimaryTimeUnit(this._minLevelUnit))]||fullLeveledFormatter.second,t,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,t,n){var r=this.getSetting("useUTC");return leveledFormat(e,t,n,this.getSetting("locale"),r)},t.prototype.getTicks=function(){var e=this._interval,t=this._extent,n=[];if(!e)return n;n.push({value:t[0],level:0});var r=this.getSetting("useUTC"),o=getIntervalTicks(this._minLevelUnit,this._approxInterval,r,t);return(n=n.concat(o)).push({value:t[1],level:0}),n},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=ONE_DAY,t[1]+=ONE_DAY),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-ONE_DAY}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,t,n){e=e||10;var r=this._extent,o=r[1]-r[0];this._approxInterval=o/e,null!=t&&this._approxInterval<t&&(this._approxInterval=t),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var i=scaleIntervals.length,a=Math.min(bisect(scaleIntervals,this._approxInterval,0,i),i-1);this._interval=scaleIntervals[a][1],this._minLevelUnit=scaleIntervals[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return isNumber(e)?e:+parseDate(e)},t.prototype.contain=function(e){return contain$1(this.parse(e),this._extent)},t.prototype.normalize=function(e){return normalize$2(this.parse(e),this._extent)},t.prototype.scale=function(e){return scale(e,this._extent)},t.type="time",t}(IntervalScale),scaleIntervals=[["second",ONE_SECOND],["minute",ONE_MINUTE],["hour",ONE_HOUR],["quarter-day",6*ONE_HOUR],["half-day",12*ONE_HOUR],["day",1.2*ONE_DAY],["half-week",3.5*ONE_DAY],["week",7*ONE_DAY],["month",31*ONE_DAY],["quarter",95*ONE_DAY],["half-year",ONE_YEAR/2],["year",ONE_YEAR]];function isUnitValueSame(e,t,n,r){var o=parseDate(t),i=parseDate(n),a=function(e){return getUnitValue(o,e,r)===getUnitValue(i,e,r)},s=function(){return a("year")},l=function(){return s()&&a("month")},u=function(){return l()&&a("day")},c=function(){return u()&&a("hour")},d=function(){return c()&&a("minute")},p=function(){return d()&&a("second")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return d();case"second":return p();case"millisecond":return p()&&a("millisecond")}}function getDateInterval(e,t){return(e/=ONE_DAY)>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function getMonthInterval(e){return(e/=30*ONE_DAY)>6?6:e>3?3:e>2?2:1}function getHourInterval(e){return(e/=ONE_HOUR)>12?12:e>6?6:e>3.5?4:e>2?2:1}function getMinutesAndSecondsInterval(e,t){return(e/=t?ONE_MINUTE:ONE_SECOND)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function getMillisecondsInterval(e){return nice(e,!0)}function getFirstTimestampOfUnit(e,t,n){var r=new Date(e);switch(getPrimaryTimeUnit(t)){case"year":case"month":r[monthSetterName(n)](0);case"day":r[dateSetterName(n)](1);case"hour":r[hoursSetterName(n)](0);case"minute":r[minutesSetterName(n)](0);case"second":r[secondsSetterName(n)](0),r[millisecondsSetterName(n)](0)}return r.getTime()}function getIntervalTicks(e,t,n,r){var o=timeUnits,i=0;function a(e,t,n,o,i,a,s){for(var l=new Date(t),u=t,c=l[o]();u<n&&u<=r[1];)s.push({value:u}),c+=e,l[i](c),u=l.getTime();s.push({value:u,notAdd:!0})}function s(e,o,i){var s=[],l=!o.length;if(!isUnitValueSame(getPrimaryTimeUnit(e),r[0],r[1],n)){l&&(o=[{value:getFirstTimestampOfUnit(new Date(r[0]),e,n)},{value:r[1]}]);for(var u=0;u<o.length-1;u++){var c=o[u].value,d=o[u+1].value;if(c!==d){var p=void 0,h=void 0,f=void 0;switch(e){case"year":p=Math.max(1,Math.round(t/ONE_DAY/365)),h=fullYearGetterName(n),f=fullYearSetterName(n);break;case"half-year":case"quarter":case"month":p=getMonthInterval(t),h=monthGetterName(n),f=monthSetterName(n);break;case"week":case"half-week":case"day":p=getDateInterval(t),h=dateGetterName(n),f=dateSetterName(n);break;case"half-day":case"quarter-day":case"hour":p=getHourInterval(t),h=hoursGetterName(n),f=hoursSetterName(n);break;case"minute":p=getMinutesAndSecondsInterval(t,!0),h=minutesGetterName(n),f=minutesSetterName(n);break;case"second":p=getMinutesAndSecondsInterval(t,!1),h=secondsGetterName(n),f=secondsSetterName(n);break;case"millisecond":p=getMillisecondsInterval(t),h=millisecondsGetterName(n),f=millisecondsSetterName(n)}a(p,c,d,h,f,0,s),"year"===e&&i.length>1&&0===u&&i.unshift({value:i[0].value-p})}}for(u=0;u<s.length;u++)i.push(s[u]);return s}}for(var l=[],u=[],c=0,d=0,p=0;p<o.length&&i++<1e4;++p){var h=getPrimaryTimeUnit(o[p]);if(isPrimaryTimeUnit(o[p]))if(s(o[p],l[l.length-1]||[],u),h!==(o[p+1]?getPrimaryTimeUnit(o[p+1]):null)){if(u.length){d=c,u.sort(function(e,t){return e.value-t.value});for(var f=[],g=0;g<u.length;++g){var m=u[g].value;0!==g&&u[g-1].value===m||(f.push(u[g]),m>=r[0]&&m<=r[1]&&c++)}var y=(r[1]-r[0])/t;if(c>1.5*y&&d>y/1.5)break;if(l.push(f),c>y||e===o[p])break}u=[]}}var v=filter(map$1(l,function(e){return filter(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),_=[],x=v.length-1;for(p=0;p<v.length;++p)for(var S=v[p],b=0;b<S.length;++b)_.push({value:S[b].value,level:x-p});_.sort(function(e,t){return e.value-t.value});var T=[];for(p=0;p<_.length;++p)0!==p&&_[p].value===_[p-1].value||T.push(_[p]);return T}Scale.registerClass(TimeScale);var scaleProto=Scale.prototype,intervalScaleProto=IntervalScale.prototype,roundingErrorFix=round$3,mathFloor$1=Math.floor,mathCeil$1=Math.ceil,mathPow$1=Math.pow,mathLog$1=Math.log,LogScale=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new IntervalScale,t._interval=0,t}return __extends(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();return map$1(intervalScaleProto.getTicks.call(this,e),function(e){var t=e.value,o=round$3(mathPow$1(this.base,t));return o=t===n[0]&&this._fixMin?fixRoundingError(o,r[0]):o,{value:o=t===n[1]&&this._fixMax?fixRoundingError(o,r[1]):o}},this)},t.prototype.setExtent=function(e,t){var n=mathLog$1(this.base);e=mathLog$1(Math.max(0,e))/n,t=mathLog$1(Math.max(0,t))/n,intervalScaleProto.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=scaleProto.getExtent.call(this);t[0]=mathPow$1(e,t[0]),t[1]=mathPow$1(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=fixRoundingError(t[0],n[0])),this._fixMax&&(t[1]=fixRoundingError(t[1],n[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=mathLog$1(e[0])/mathLog$1(t),e[1]=mathLog$1(e[1])/mathLog$1(t),scaleProto.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var r=quantity(n);for(e/n*r<=.5&&(r*=10);!isNaN(r)&&Math.abs(r)<1&&Math.abs(r)>0;)r*=10;var o=[round$3(mathCeil$1(t[0]/r)*r),round$3(mathFloor$1(t[1]/r)*r)];this._interval=r,this._niceExtent=o}},t.prototype.calcNiceExtent=function(e){intervalScaleProto.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return contain$1(e=mathLog$1(e)/mathLog$1(this.base),this._extent)},t.prototype.normalize=function(e){return normalize$2(e=mathLog$1(e)/mathLog$1(this.base),this._extent)},t.prototype.scale=function(e){return e=scale(e,this._extent),mathPow$1(this.base,e)},t.type="log",t}(Scale),proto=LogScale.prototype;function fixRoundingError(e,t){return roundingErrorFix(e,getPrecision(t))}proto.getMinorTicks=intervalScaleProto.getMinorTicks,proto.getLabel=intervalScaleProto.getLabel,Scale.registerClass(LogScale);var ScaleRawExtentInfo=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var r=this._isOrdinal="ordinal"===e.type;this._needCrossZero="interval"===e.type&&t.getNeedCrossZero&&t.getNeedCrossZero();var o=t.get("min",!0);null==o&&(o=t.get("startValue",!0));var i=this._modelMinRaw=o;isFunction(i)?this._modelMinNum=parseAxisModelMinMax(e,i({min:n[0],max:n[1]})):"dataMin"!==i&&(this._modelMinNum=parseAxisModelMinMax(e,i));var a=this._modelMaxRaw=t.get("max",!0);if(isFunction(a)?this._modelMaxNum=parseAxisModelMinMax(e,a({min:n[0],max:n[1]})):"dataMax"!==a&&(this._modelMaxNum=parseAxisModelMinMax(e,a)),r)this._axisDataLen=t.getCategories().length;else{var s=t.get("boundaryGap"),l=isArray$1(s)?s:[s||0,s||0];"boolean"==typeof l[0]||"boolean"==typeof l[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[parsePercent$1(l[0],1),parsePercent$1(l[1],1)]}},e.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,r=this._axisDataLen,o=this._boundaryGapInner,i=e?null:n-t||Math.abs(t),a="dataMin"===this._modelMinRaw?t:this._modelMinNum,s="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,l=null!=a,u=null!=s;null==a&&(a=e?r?0:NaN:t-o[0]*i),null==s&&(s=e?r?r-1:NaN:n+o[1]*i),(null==a||!isFinite(a))&&(a=NaN),(null==s||!isFinite(s))&&(s=NaN);var c=eqNaN(a)||eqNaN(s)||e&&!r;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=this._determinedMin,p=this._determinedMax;return null!=d&&(a=d,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){this[DATA_MIN_MAX_ATTR[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[DETERMINED_MIN_MAX_ATTR[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),DETERMINED_MIN_MAX_ATTR={min:"_determinedMin",max:"_determinedMax"},DATA_MIN_MAX_ATTR={min:"_dataMin",max:"_dataMax"};function ensureScaleRawExtentInfo(e,t,n){var r=e.rawExtentInfo;return r||(r=new ScaleRawExtentInfo(e,t,n),e.rawExtentInfo=r,r)}function parseAxisModelMinMax(e,t){return null==t?null:eqNaN(t)?NaN:e.parse(t)}function getScaleExtent(e,t){var n=e.type,r=ensureScaleRawExtentInfo(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var o=r.min,i=r.max,a=t.ecModel;if(a&&"time"===n){var s=prepareLayoutBarSeries("bar",a),l=!1;if(each$f(s,function(e){l=l||e.getBaseAxis()===t.axis}),l){var u=makeColumnLayout(s),c=adjustScaleForOverflow(o,i,t,u);o=c.min,i=c.max}}return{extent:[o,i],fixMin:r.minFixed,fixMax:r.maxFixed}}function adjustScaleForOverflow(e,t,n,r){var o=n.axis.getExtent(),i=Math.abs(o[1]-o[0]),a=retrieveColumnLayout(r,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;each$f(a,function(e){s=Math.min(e.offset,s)});var l=-1/0;each$f(a,function(e){l=Math.max(e.offset+e.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,d=c/(1-(s+l)/i)-c;return{min:e-=d*(s/u),max:t+=d*(l/u)}}function niceScaleExtent(e,t){var n=t,r=getScaleExtent(e,n),o=r.extent,i=n.get("splitNumber");e instanceof LogScale&&(e.base=n.get("logBase"));var a=e.type,s=n.get("interval"),l="interval"===a||"time"===a;e.setExtent(o[0],o[1]),e.calcNiceExtent({splitNumber:i,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&e.setInterval&&e.setInterval(s)}function createScaleByModel$1(e,t){if(t=t||e.get("type"))switch(t){case"category":return new OrdinalScale({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new TimeScale({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(Scale.getClass(t)||IntervalScale)}}function ifAxisCrossZero(e){var t=e.scale.getExtent(),n=t[0],r=t[1];return!(n>0&&r>0||n<0&&r<0)}function makeLabelFormatter(e){var t,n,r=e.getLabelModel().get("formatter"),o="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?(n=r,function(t,r){return e.scale.getFormattedLabel(t,r,n)}):isString(r)?function(t){return function(n){var r=e.scale.getLabel(n);return t.replace("{value}",null!=r?r:"")}}(r):isFunction(r)?(t=r,function(n,r){return null!=o&&(r=n.value-o),t(getAxisRawValue(e,n),r,null!=n.level?{level:n.level}:null)}):function(t){return e.scale.getLabel(t)}}function getAxisRawValue(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function estimateLabelUnionRect(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var r,o,i=n.getExtent();o=n instanceof OrdinalScale?n.count():(r=n.getTicks()).length;var a,s=e.getLabelModel(),l=makeLabelFormatter(e),u=1;o>40&&(u=Math.ceil(o/40));for(var c=0;c<o;c+=u){var d=l(r?r[c]:{value:i[0]+c},c),p=rotateTextRect(s.getTextRect(d),s.get("rotate")||0);a?a.union(p):a=p}return a}}function rotateTextRect(e,t){var n=t*Math.PI/180,r=e.width,o=e.height,i=r*Math.abs(Math.cos(n))+Math.abs(o*Math.sin(n)),a=r*Math.abs(Math.sin(n))+Math.abs(o*Math.cos(n));return new BoundingRect(e.x,e.y,i,a)}function getOptionCategoryInterval(e){var t=e.get("interval");return null==t?"auto":t}function shouldShowAllLabels(e){return"category"===e.type&&0===getOptionCategoryInterval(e.getLabelModel())}function getDataDimensionsOnAxis(e,t){var n={};return each$f(e.mapDimensionsAll(t),function(t){n[getStackedDimension(e,t)]=!0}),keys(n)}function unionAxisExtentFromData(e,t,n){t&&each$f(getDataDimensionsOnAxis(t,n),function(n){var r=t.getApproximateExtent(n);r[0]<e[0]&&(e[0]=r[0]),r[1]>e[1]&&(e[1]=r[1])})}var AxisModelCommonMixin=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}();function createList$2(e){return createSeriesData(null,e)}var dataStack={isDimensionStacked:isDimensionStacked,enableDataStack:enableDataStack,getStackedDimension:getStackedDimension};function createScale(e,t){var n=t;t instanceof Model||(n=new Model(t));var r=createScaleByModel$1(n);return r.setExtent(e[0],e[1]),niceScaleExtent(r,n),r}function mixinAxisModelCommonMethods(e){mixin(e,AxisModelCommonMixin)}function createTextStyle(e,t){return createTextStyle$1(e,null,null,"normal"!==(t=t||{}).state)}var helper=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:createDimensions,createList:createList$2,createScale:createScale,createSymbol:createSymbol$1,createTextStyle:createTextStyle,dataStack:dataStack,enableHoverEmphasis:enableHoverEmphasis,getECData:getECData,getLayoutRect:getLayoutRect,mixinAxisModelCommonMethods:mixinAxisModelCommonMethods},Symbol.toStringTag,{value:"Module"}));exports("bq",helper);var extensions=[],extensionRegisters={registerPreprocessor:registerPreprocessor,registerProcessor:registerProcessor,registerPostInit:registerPostInit,registerPostUpdate:registerPostUpdate,registerUpdateLifecycle:registerUpdateLifecycle,registerAction:registerAction,registerCoordinateSystem:registerCoordinateSystem,registerLayout:registerLayout,registerVisual:registerVisual,registerTransform:registerTransform,registerLoading:registerLoading,registerMap:registerMap$1,registerImpl:registerImpl,PRIORITY:PRIORITY,ComponentModel:ComponentModel,ComponentView:ComponentView,SeriesModel:SeriesModel,ChartView:ChartView,registerComponentModel:function(e){ComponentModel.registerClass(e)},registerComponentView:function(e){ComponentView.registerClass(e)},registerSeriesModel:function(e){SeriesModel.registerClass(e)},registerChartView:function(e){ChartView.registerClass(e)},registerSubTypeDefaulter:function(e,t){ComponentModel.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){_registerPainter(e,t)}};function use(e){isArray$1(e)?each$f(e,function(e){use(e)}):indexOf(extensions,e)>=0||(extensions.push(e),isFunction(e)&&(e={install:e}),e.install(extensionRegisters))}var EPSILON=1e-8;function isAroundEqual(e,t){return Math.abs(e-t)<EPSILON}function contain(e,t,n){var r=0,o=e[0];if(!o)return!1;for(var i=1;i<e.length;i++){var a=e[i];r+=windingLine(o[0],o[1],a[0],a[1],t,n),o=a}var s=e[0];return isAroundEqual(o[0],s[0])&&isAroundEqual(o[1],s[1])||(r+=windingLine(o[0],o[1],s[0],s[1],t,n)),0!==r}var TMP_TRANSFORM=[];function transformPoints(e,t){for(var n=0;n<e.length;n++)applyTransform$1(e[n],e[n],t)}function updateBBoxFromPoints(e,t,n,r){for(var o=0;o<e.length;o++){var i=e[o];r&&(i=r.project(i)),i&&isFinite(i[0])&&isFinite(i[1])&&(min$1(t,t,i),max$1(n,n,i))}}function centroid$1(e){for(var t=0,n=0,r=0,o=e.length,i=e[o-1][0],a=e[o-1][1],s=0;s<o;s++){var l=e[s][0],u=e[s][1],c=i*u-l*a;t+=c,n+=(i+l)*c,r+=(a+u)*c,i=l,a=u}return t?[n/t/3,r/t/3,t]:[e[0][0]||0,e[0][1]||0]}var Region=function(){function e(e){this.name=e}return e.prototype.setCenter=function(e){this._center=e},e.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},e}(),GeoJSONPolygonGeometry=function(e,t){this.type="polygon",this.exterior=e,this.interiors=t},GeoJSONLineStringGeometry=function(e){this.type="linestring",this.points=e},GeoJSONRegion=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.type="geoJSON",o.geometries=n,o._center=r&&[r[0],r[1]],o}return __extends(t,e),t.prototype.calcCenter=function(){for(var e,t=this.geometries,n=0,r=0;r<t.length;r++){var o=t[r],i=o.exterior,a=i&&i.length;a>n&&(e=o,n=a)}if(e)return centroid$1(e.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},t.prototype.getBoundingRect=function(e){var t=this._rect;if(t&&!e)return t;var n=[1/0,1/0],r=[-1/0,-1/0];return each$f(this.geometries,function(t){"polygon"===t.type?updateBBoxFromPoints(t.exterior,n,r,e):each$f(t.points,function(t){updateBBoxFromPoints(t,n,r,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(r[0])&&isFinite(r[1])||(n[0]=n[1]=r[0]=r[1]=0),t=new BoundingRect(n[0],n[1],r[0]-n[0],r[1]-n[1]),e||(this._rect=t),t},t.prototype.contain=function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;e:for(var r=0,o=n.length;r<o;r++){var i=n[r];if("polygon"===i.type){var a=i.exterior,s=i.interiors;if(contain(a,e[0],e[1])){for(var l=0;l<(s?s.length:0);l++)if(contain(s[l],e[0],e[1]))continue e;return!0}}}return!1},t.prototype.transformTo=function(e,t,n,r){var o=this.getBoundingRect(),i=o.width/o.height;n?r||(r=n/i):n=i*r;for(var a=new BoundingRect(e,t,n,r),s=o.calculateTransform(a),l=this.geometries,u=0;u<l.length;u++){var c=l[u];"polygon"===c.type?(transformPoints(c.exterior,s),each$f(c.interiors,function(e){transformPoints(e,s)})):each$f(c.points,function(e){transformPoints(e,s)})}(o=this._rect).copy(a),this._center=[o.x+o.width/2,o.y+o.height/2]},t.prototype.cloneShallow=function(e){null==e&&(e=this.name);var n=new t(e,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},t}(Region),GeoSVGRegion=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="geoSVG",r._elOnlyForCalculate=n,r}return __extends(t,e),t.prototype.calcCenter=function(){for(var e=this._elOnlyForCalculate,t=e.getBoundingRect(),n=[t.x+t.width/2,t.y+t.height/2],r=identity(TMP_TRANSFORM),o=e;o&&!o.isGeoSVGGraphicRoot;)mul(r,o.getLocalTransform(),r),o=o.parent;return invert(r,r),applyTransform$1(n,n,r),n},t}(Region);function decode(e){if(!e.UTF8Encoding)return e;var t=e,n=t.UTF8Scale;return null==n&&(n=1024),each$f(t.features,function(e){var t=e.geometry,r=t.encodeOffsets,o=t.coordinates;if(r)switch(t.type){case"LineString":t.coordinates=decodeRing(o,r,n);break;case"Polygon":case"MultiLineString":decodeRings(o,r,n);break;case"MultiPolygon":each$f(o,function(e,t){return decodeRings(e,r[t],n)})}}),t.UTF8Encoding=!1,t}function decodeRings(e,t,n){for(var r=0;r<e.length;r++)e[r]=decodeRing(e[r],t[r],n)}function decodeRing(e,t,n){for(var r=[],o=t[0],i=t[1],a=0;a<e.length;a+=2){var s=e.charCodeAt(a)-64,l=e.charCodeAt(a+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),o=s+=o,i=l+=i,r.push([s/n,l/n])}return r}function parseGeoJSON(e,t){return map$1(filter((e=decode(e)).features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var n=e.properties,r=e.geometry,o=[];switch(r.type){case"Polygon":var i=r.coordinates;o.push(new GeoJSONPolygonGeometry(i[0],i.slice(1)));break;case"MultiPolygon":each$f(r.coordinates,function(e){e[0]&&o.push(new GeoJSONPolygonGeometry(e[0],e.slice(1)))});break;case"LineString":o.push(new GeoJSONLineStringGeometry([r.coordinates]));break;case"MultiLineString":o.push(new GeoJSONLineStringGeometry(r.coordinates))}var a=new GeoJSONRegion(n[t||"name"],o,n.cp);return a.properties=n,a})}var number=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER,asc:asc$2,getPercentWithPrecision:getPercentWithPrecision,getPixelPrecision:getPixelPrecision,getPrecision:getPrecision,getPrecisionSafe:getPrecisionSafe,isNumeric:isNumeric,isRadianAroundZero:isRadianAroundZero,linearMap:linearMap$2,nice:nice,numericToNumber:numericToNumber,parseDate:parseDate,quantile:quantile,quantity:quantity,quantityExponent:quantityExponent,reformIntervals:reformIntervals,remRadian:remRadian,round:round$3},Symbol.toStringTag,{value:"Module"}));exports("br",number);var time=Object.freeze(Object.defineProperty({__proto__:null,format:format$1,parse:parseDate},Symbol.toStringTag,{value:"Module"}));exports("bs",time);var graphic=Object.freeze(Object.defineProperty({__proto__:null,Arc:Arc,BezierCurve:BezierCurve,BoundingRect:BoundingRect,Circle:Circle,CompoundPath:CompoundPath,Ellipse:Ellipse,Group:Group$3,Image:ZRImage,IncrementalDisplayable:IncrementalDisplayable,Line:Line$1,LinearGradient:LinearGradient,Polygon:Polygon,Polyline:Polyline$1,RadialGradient:RadialGradient,Rect:Rect$2,Ring:Ring,Sector:Sector,Text:ZRText,clipPointsByRect:clipPointsByRect,clipRectByRect:clipRectByRect,createIcon:createIcon,extendPath:extendPath,extendShape:extendShape,getShapeClass:getShapeClass,getTransform:getTransform$1,initProps:initProps,makeImage:makeImage,makePath:makePath,mergePath:mergePath,registerShape:registerShape,resizePath:resizePath,updateProps:updateProps$1},Symbol.toStringTag,{value:"Module"}));exports("bt",graphic);var format=Object.freeze(Object.defineProperty({__proto__:null,addCommas:addCommas,capitalFirst:capitalFirst,encodeHTML:encodeHTML,formatTime:formatTime,formatTpl:formatTpl,getTextRect:getTextRect,getTooltipMarker:getTooltipMarker,normalizeCssArray:normalizeCssArray,toCamelCase:toCamelCase,truncateText:truncateText},Symbol.toStringTag,{value:"Module"}));exports("bu",format);var util=Object.freeze(Object.defineProperty({__proto__:null,bind:bind$1,clone:clone$6,curry:curry$1,defaults:defaults$2,each:each$f,extend:extend$2,filter:filter,indexOf:indexOf,inherits:inherits,isArray:isArray$1,isFunction:isFunction,isObject:isObject$3,isString:isString,map:map$1,merge:merge,reduce:reduce},Symbol.toStringTag,{value:"Module"}));exports("bv",util);var inner$g=makeInner();function tickValuesToNumbers(e,t){var n=map$1(t,function(t){return e.scale.parse(t)});return"time"===e.type&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function createAxisLabels(e){var t=e.getLabelModel().get("customValues");if(t){var n=makeLabelFormatter(e),r=e.scale.getExtent();return{labels:map$1(filter(tickValuesToNumbers(e,t),function(e){return e>=r[0]&&e<=r[1]}),function(t){var r={value:t};return{formattedLabel:n(r),rawLabel:e.scale.getLabel(r),tickValue:t}})}}return"category"===e.type?makeCategoryLabels(e):makeRealNumberLabels(e)}function createAxisTicks(e,t){var n=e.getTickModel().get("customValues");if(n){var r=e.scale.getExtent();return{ticks:filter(tickValuesToNumbers(e,n),function(e){return e>=r[0]&&e<=r[1]})}}return"category"===e.type?makeCategoryTicks(e,t):{ticks:map$1(e.scale.getTicks(),function(e){return e.value})}}function makeCategoryLabels(e){var t=e.getLabelModel(),n=makeCategoryLabelsActually(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}function makeCategoryLabelsActually(e,t){var n,r=getListCache(e,"labels"),o=getOptionCategoryInterval(t),i=listCacheGet(r,o);return i||listCacheSet(r,o,{labels:isFunction(o)?makeLabelsByCustomizedCategoryInterval(e,o):makeLabelsByNumericCategoryInterval(e,n="auto"===o?makeAutoCategoryInterval(e):o),labelCategoryInterval:n})}function makeCategoryTicks(e,t){var n,r,o=getListCache(e,"ticks"),i=getOptionCategoryInterval(t),a=listCacheGet(o,i);if(a)return a;if(t.get("show")&&!e.scale.isBlank()||(n=[]),isFunction(i))n=makeLabelsByCustomizedCategoryInterval(e,i,!0);else if("auto"===i){var s=makeCategoryLabelsActually(e,e.getLabelModel());r=s.labelCategoryInterval,n=map$1(s.labels,function(e){return e.tickValue})}else n=makeLabelsByNumericCategoryInterval(e,r=i,!0);return listCacheSet(o,i,{ticks:n,tickCategoryInterval:r})}function makeRealNumberLabels(e){var t=e.scale.getTicks(),n=makeLabelFormatter(e);return{labels:map$1(t,function(t,r){return{level:t.level,formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value}})}}function getListCache(e,t){return inner$g(e)[t]||(inner$g(e)[t]=[])}function listCacheGet(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function listCacheSet(e,t,n){return e.push({key:t,value:n}),n}function makeAutoCategoryInterval(e){var t=inner$g(e).autoInterval;return null!=t?t:inner$g(e).autoInterval=e.calculateCategoryInterval()}function calculateCategoryInterval(e){var t=fetchAutoCategoryIntervalCalculationParams(e),n=makeLabelFormatter(e),r=(t.axisRotate-t.labelRotate)/180*Math.PI,o=e.scale,i=o.getExtent(),a=o.count();if(i[1]-i[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=i[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(r)),d=Math.abs(u*Math.sin(r)),p=0,h=0;l<=i[1];l+=s){var f,g,m=getBoundingRect(n({value:l}),t.font,"center","top");f=1.3*m.width,g=1.3*m.height,p=Math.max(p,f,7),h=Math.max(h,g,7)}var y=p/c,v=h/d;isNaN(y)&&(y=1/0),isNaN(v)&&(v=1/0);var _=Math.max(0,Math.floor(Math.min(y,v))),x=inner$g(e.model),S=e.getExtent(),b=x.lastAutoInterval,T=x.lastTickCount;return null!=b&&null!=T&&Math.abs(b-_)<=1&&Math.abs(T-a)<=1&&b>_&&x.axisExtent0===S[0]&&x.axisExtent1===S[1]?_=b:(x.lastTickCount=a,x.lastAutoInterval=_,x.axisExtent0=S[0],x.axisExtent1=S[1]),_}function fetchAutoCategoryIntervalCalculationParams(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function makeLabelsByNumericCategoryInterval(e,t,n){var r=makeLabelFormatter(e),o=e.scale,i=o.getExtent(),a=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=i[0],c=o.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=shouldShowAllLabels(e),p=a.get("showMinLabel")||d,h=a.get("showMaxLabel")||d;p&&u!==i[0]&&g(i[0]);for(var f=u;f<=i[1];f+=l)g(f);function g(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:o.getLabel(t),tickValue:e})}return h&&f-l!==i[1]&&g(i[1]),s}function makeLabelsByCustomizedCategoryInterval(e,t,n){var r=e.scale,o=makeLabelFormatter(e),i=[];return each$f(r.getTicks(),function(e){var a=r.getLabel(e),s=e.value;t(e.value,a)&&i.push(n?s:{formattedLabel:o(e),rawLabel:a,tickValue:s})}),i}var NORMALIZED_EXTENT=[0,1],Axis=exports("bK",function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return getPixelPrecision(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&"ordinal"===r.type&&fixExtentWithBands(n=n.slice(),r.count()),linearMap$2(e,NORMALIZED_EXTENT,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&fixExtentWithBands(n=n.slice(),r.count());var o=linearMap$2(e,n,NORMALIZED_EXTENT,t);return this.scale.scale(o)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=map$1(createAxisTicks(this,t).ticks,function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}},this);return fixOnBandTicksCoords(this,n,t.get("alignWithLabel"),e.clamp),n},e.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");return e>0&&e<100||(e=5),map$1(this.scale.getMinorTicks(e),function(e){return map$1(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(){return createAxisLabels(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/n},e.prototype.calculateCategoryInterval=function(){return calculateCategoryInterval(this)},e}());function fixExtentWithBands(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}function fixOnBandTicksCoords(e,t,n,r){var o=t.length;if(e.onBand&&!n&&o){var i,a,s=e.getExtent();if(1===o)t[0].coord=s[0],i=t[1]={coord:s[1],tickValue:t[0].tickValue};else{var l=t[o-1].tickValue-t[0].tickValue,u=(t[o-1].coord-t[0].coord)/l;each$f(t,function(e){e.coord-=u/2});var c=e.scale.getExtent();a=1+c[1]-t[o-1].tickValue,i={coord:t[o-1].coord+u*a,tickValue:c[1]+1},t.push(i)}var d=s[0]>s[1];p(t[0].coord,s[0])&&(r?t[0].coord=s[0]:t.shift()),r&&p(s[0],t[0].coord)&&t.unshift({coord:s[0]}),p(s[1],i.coord)&&(r?i.coord=s[1]:t.pop()),r&&p(i.coord,s[1])&&t.push({coord:s[1]})}function p(e,t){return e=round$3(e),t=round$3(t),d?e>t:e<t}}function extendComponentModel(e){var t=ComponentModel.extend(e);return ComponentModel.registerClass(t),t}function extendComponentView(e){var t=ComponentView.extend(e);return ComponentView.registerClass(t),t}function extendSeriesModel(e){var t=SeriesModel.extend(e);return SeriesModel.registerClass(t),t}function extendChartView(e){var t=ChartView.extend(e);return ChartView.registerClass(t),t}var PI2$2=2*Math.PI,CMD$1=PathProxy.CMD,DEFAULT_SEARCH_SPACE=["top","right","bottom","left"];function getCandidateAnchor(e,t,n,r,o){var i=n.width,a=n.height;switch(e){case"top":r.set(n.x+i/2,n.y-t),o.set(0,-1);break;case"bottom":r.set(n.x+i/2,n.y+a+t),o.set(0,1);break;case"left":r.set(n.x-t,n.y+a/2),o.set(-1,0);break;case"right":r.set(n.x+i+t,n.y+a/2),o.set(1,0)}}function projectPointToArc(e,t,n,r,o,i,a,s,l){a-=e,s-=t;var u=Math.sqrt(a*a+s*s),c=(a/=u)*n+e,d=(s/=u)*n+t;if(Math.abs(r-o)%PI2$2<1e-4)return l[0]=c,l[1]=d,u-n;if(i){var p=r;r=normalizeRadian(o),o=normalizeRadian(p)}else r=normalizeRadian(r),o=normalizeRadian(o);r>o&&(o+=PI2$2);var h=Math.atan2(s,a);if(h<0&&(h+=PI2$2),h>=r&&h<=o||h+PI2$2>=r&&h+PI2$2<=o)return l[0]=c,l[1]=d,u-n;var f=n*Math.cos(r)+e,g=n*Math.sin(r)+t,m=n*Math.cos(o)+e,y=n*Math.sin(o)+t,v=(f-a)*(f-a)+(g-s)*(g-s),_=(m-a)*(m-a)+(y-s)*(y-s);return v<_?(l[0]=f,l[1]=g,Math.sqrt(v)):(l[0]=m,l[1]=y,Math.sqrt(_))}function projectPointToLine(e,t,n,r,o,i,a,s){var l=o-e,u=i-t,c=n-e,d=r-t,p=Math.sqrt(c*c+d*d),h=(l*(c/=p)+u*(d/=p))/p;s&&(h=Math.min(Math.max(h,0),1)),h*=p;var f=a[0]=e+h*c,g=a[1]=t+h*d;return Math.sqrt((f-o)*(f-o)+(g-i)*(g-i))}function projectPointToRect(e,t,n,r,o,i,a){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r);var s=e+n,l=t+r,u=a[0]=Math.min(Math.max(o,e),s),c=a[1]=Math.min(Math.max(i,t),l);return Math.sqrt((u-o)*(u-o)+(c-i)*(c-i))}var tmpPt=[];function nearestPointOnRect(e,t,n){var r=projectPointToRect(t.x,t.y,t.width,t.height,e.x,e.y,tmpPt);return n.set(tmpPt[0],tmpPt[1]),r}function nearestPointOnPath(e,t,n){for(var r,o,i=0,a=0,s=0,l=0,u=1/0,c=t.data,d=e.x,p=e.y,h=0;h<c.length;){var f=c[h++];1===h&&(s=i=c[h],l=a=c[h+1]);var g=u;switch(f){case CMD$1.M:i=s=c[h++],a=l=c[h++];break;case CMD$1.L:g=projectPointToLine(i,a,c[h],c[h+1],d,p,tmpPt,!0),i=c[h++],a=c[h++];break;case CMD$1.C:g=cubicProjectPoint(i,a,c[h++],c[h++],c[h++],c[h++],c[h],c[h+1],d,p,tmpPt),i=c[h++],a=c[h++];break;case CMD$1.Q:g=quadraticProjectPoint(i,a,c[h++],c[h++],c[h],c[h+1],d,p,tmpPt),i=c[h++],a=c[h++];break;case CMD$1.A:var m=c[h++],y=c[h++],v=c[h++],_=c[h++],x=c[h++],S=c[h++];h+=1;var b=!!(1-c[h++]);r=Math.cos(x)*v+m,o=Math.sin(x)*_+y,h<=1&&(s=r,l=o),g=projectPointToArc(m,y,_,x,x+S,b,(d-m)*_/v+m,p,tmpPt),i=Math.cos(x+S)*v+m,a=Math.sin(x+S)*_+y;break;case CMD$1.R:g=projectPointToRect(s=i=c[h++],l=a=c[h++],c[h++],c[h++],d,p,tmpPt);break;case CMD$1.Z:g=projectPointToLine(i,a,s,l,d,p,tmpPt,!0),i=s,a=l}g<u&&(u=g,n.set(tmpPt[0],tmpPt[1]))}return u}var pt0=new Point,pt1=new Point,pt2=new Point,dir=new Point,dir2=new Point;function updateLabelLinePoints(e,t){if(e){var n=e.getTextGuideLine(),r=e.getTextContent();if(r&&n){var o=e.textGuideLineConfig||{},i=[[0,0],[0,0],[0,0]],a=o.candidates||DEFAULT_SEARCH_SPACE,s=r.getBoundingRect().clone();s.applyTransform(r.getComputedTransform());var l=1/0,u=o.anchor,c=e.getComputedTransform(),d=c&&invert([],c),p=t.get("length2")||0;u&&pt2.copy(u);for(var h=0;h<a.length;h++){getCandidateAnchor(a[h],0,s,pt0,dir),Point.scaleAndAdd(pt1,pt0,dir,p),pt1.transform(d);var f=e.getBoundingRect(),g=u?u.distance(pt1):e instanceof Path?nearestPointOnPath(pt1,e.path,pt2):nearestPointOnRect(pt1,f,pt2);g<l&&(l=g,pt1.transform(c),pt2.transform(c),pt2.toArray(i[0]),pt1.toArray(i[1]),pt0.toArray(i[2]))}limitTurnAngle(i,t.get("minTurnAngle")),n.setShape({points:i})}}}var tmpArr=[],tmpProjPoint=new Point;function limitTurnAngle(e,t){if(t<=180&&t>0){t=t/180*Math.PI,pt0.fromArray(e[0]),pt1.fromArray(e[1]),pt2.fromArray(e[2]),Point.sub(dir,pt0,pt1),Point.sub(dir2,pt2,pt1);var n=dir.len(),r=dir2.len();if(!(n<.001||r<.001)){dir.scale(1/n),dir2.scale(1/r);var o=dir.dot(dir2);if(Math.cos(t)<o){var i=projectPointToLine(pt1.x,pt1.y,pt2.x,pt2.y,pt0.x,pt0.y,tmpArr,!1);tmpProjPoint.fromArray(tmpArr),tmpProjPoint.scaleAndAdd(dir2,i/Math.tan(Math.PI-t));var a=pt2.x!==pt1.x?(tmpProjPoint.x-pt1.x)/(pt2.x-pt1.x):(tmpProjPoint.y-pt1.y)/(pt2.y-pt1.y);if(isNaN(a))return;a<0?Point.copy(tmpProjPoint,pt1):a>1&&Point.copy(tmpProjPoint,pt2),tmpProjPoint.toArray(e[1])}}}}function limitSurfaceAngle(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,pt0.fromArray(e[0]),pt1.fromArray(e[1]),pt2.fromArray(e[2]),Point.sub(dir,pt1,pt0),Point.sub(dir2,pt2,pt1);var r=dir.len(),o=dir2.len();if(!(r<.001||o<.001))if(dir.scale(1/r),dir2.scale(1/o),dir.dot(t)<Math.cos(n)){var i=projectPointToLine(pt1.x,pt1.y,pt2.x,pt2.y,pt0.x,pt0.y,tmpArr,!1);tmpProjPoint.fromArray(tmpArr);var a=Math.PI/2,s=a+Math.acos(dir2.dot(t))-n;if(s>=a)Point.copy(tmpProjPoint,pt2);else{tmpProjPoint.scaleAndAdd(dir2,i/Math.tan(Math.PI/2-s));var l=pt2.x!==pt1.x?(tmpProjPoint.x-pt1.x)/(pt2.x-pt1.x):(tmpProjPoint.y-pt1.y)/(pt2.y-pt1.y);if(isNaN(l))return;l<0?Point.copy(tmpProjPoint,pt1):l>1&&Point.copy(tmpProjPoint,pt2)}tmpProjPoint.toArray(e[1])}}}function setLabelLineState(e,t,n,r){var o="normal"===n,i=o?e:e.ensureState(n);i.ignore=t;var a=r.get("smooth");a&&!0===a&&(a=.3),i.shape=i.shape||{},a>0&&(i.shape.smooth=a);var s=r.getModel("lineStyle").getLineStyle();o?e.useStyle(s):i.style=s}function buildLabelLinePath(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var o=dist$1(r[0],r[1]),i=dist$1(r[1],r[2]);if(!o||!i)return e.lineTo(r[1][0],r[1][1]),void e.lineTo(r[2][0],r[2][1]);var a=Math.min(o,i)*n,s=lerp$1([],r[1],r[0],a/o),l=lerp$1([],r[1],r[2],a/i),u=lerp$1([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],r[2][0],r[2][1])}else for(var c=1;c<r.length;c++)e.lineTo(r[c][0],r[c][1])}function setLabelLineStyle(e,t,n){var r=e.getTextGuideLine(),o=e.getTextContent();if(o){for(var i=t.normal,a=i.get("show"),s=o.ignore,l=0;l<DISPLAY_STATES.length;l++){var u=DISPLAY_STATES[l],c=t[u],d="normal"===u;if(c){var p=c.get("show");if((d?s:retrieve2(o.states[u]&&o.states[u].ignore,s))||!retrieve2(p,a)){var h=d?r:r&&r.states[u];h&&(h.ignore=!0),r&&setLabelLineState(r,!0,u,c);continue}r||(r=new Polyline$1,e.setTextGuideLine(r),d||!s&&a||setLabelLineState(r,!0,"normal",t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),setLabelLineState(r,!1,u,c)}}if(r){defaults$2(r.style,n),r.style.fill=null;var f=i.get("showAbove");(e.textGuideLineConfig=e.textGuideLineConfig||{}).showAbove=f||!1,r.buildPath=buildLabelLinePath}}else r&&e.removeTextGuideLine()}function getLabelLineStatesModels(e,t){t=t||"labelLine";for(var n={normal:e.getModel(t)},r=0;r<SPECIAL_STATES.length;r++){var o=SPECIAL_STATES[r];n[o]=e.getModel([o,t])}return n}function prepareLayoutList(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(!r.defaultAttr.ignore){var o=r.label,i=o.getComputedTransform(),a=o.getBoundingRect(),s=!i||i[1]<1e-5&&i[2]<1e-5,l=o.style.margin||0,u=a.clone();u.applyTransform(i),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new OrientedBoundingRect(a,i):null;t.push({label:o,labelLine:r.labelLine,rect:u,localRect:a,obb:c,priority:r.priority,defaultAttr:r.defaultAttr,layoutOption:r.computedLayoutOption,axisAligned:s,transform:i})}}return t}function shiftLayout(e,t,n,r,o,i){var a=e.length;if(!(a<2)){e.sort(function(e,n){return e.rect[t]-n.rect[t]});for(var s,l=0,u=!1,c=0,d=0;d<a;d++){var p=e[d],h=p.rect;(s=h[t]-l)<0&&(h[t]-=s,p.label[t]-=s,u=!0),c+=Math.max(-s,0),l=h[t]+h[n]}c>0&&i&&x(-c/a,0,a);var f,g,m=e[0],y=e[a-1];return v(),f<0&&S(-f,.8),g<0&&S(g,.8),v(),_(f,g,1),_(g,f,-1),v(),f<0&&b(-f),g<0&&b(g),u}function v(){f=m.rect[t]-r,g=o-y.rect[t]-y.rect[n]}function _(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){x(r*n,0,a);var o=r+e;o<0&&S(-o*n,1)}else S(-e*n,1)}}function x(n,r,o){0!==n&&(u=!0);for(var i=r;i<o;i++){var a=e[i];a.rect[t]+=n,a.label[t]+=n}}function S(r,o){for(var i=[],s=0,l=1;l<a;l++){var u=e[l-1].rect,c=Math.max(e[l].rect[t]-u[t]-u[n],0);i.push(c),s+=c}if(s){var d=Math.min(Math.abs(r)/s,o);if(r>0)for(l=0;l<a-1;l++){x(i[l]*d,0,l+1)}else for(l=a-1;l>0;l--){x(-(i[l-1]*d),l,a)}}}function b(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r<a-1;r++)if(t>0?x(n,0,r+1):x(-n,a-r-1,a),(e-=n)<=0)return}}function shiftLayoutOnX(e,t,n,r){return shiftLayout(e,"x","width",t,n,r)}function shiftLayoutOnY(e,t,n,r){return shiftLayout(e,"y","height",t,n,r)}function hideOverlap(e){var t=[];e.sort(function(e,t){return t.priority-e.priority});var n=new BoundingRect(0,0,0,0);function r(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}for(var o=0;o<e.length;o++){var i=e[o],a=i.axisAligned,s=i.localRect,l=i.transform,u=i.label,c=i.labelLine;n.copy(i.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var d=i.obb,p=!1,h=0;h<t.length;h++){var f=t[h];if(n.intersect(f.rect)){if(a&&f.axisAligned){p=!0;break}if(f.obb||(f.obb=new OrientedBoundingRect(f.localRect,f.transform)),d||(d=new OrientedBoundingRect(s,l)),d.intersect(f.obb)){p=!0;break}}}p?(r(u),c&&r(c)):(u.attr("ignore",i.defaultAttr.ignore),c&&c.attr("ignore",i.defaultAttr.labelGuideIgnore),t.push(i))}}function cloneArr(e){if(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].slice());return t}}function prepareLayoutCallbackParams(e,t){var n=e.label,r=t&&t.getTextGuideLine();return{dataIndex:e.dataIndex,dataType:e.dataType,seriesIndex:e.seriesModel.seriesIndex,text:e.label.style.text,rect:e.hostRect,labelRect:e.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:cloneArr(r&&r.shape.points)}}var LABEL_OPTION_TO_STYLE_KEYS=["align","verticalAlign","width","height","fontSize"],dummyTransformable=new Transformable,labelLayoutInnerStore=makeInner(),labelLineAnimationStore=makeInner();function extendWithKeys(e,t,n){for(var r=0;r<n.length;r++){var o=n[r];null!=t[o]&&(e[o]=t[o])}}var LABEL_LAYOUT_PROPS=["x","y","rotation"],LabelManager=function(){function e(){this._labelList=[],this._chartViewList=[]}return e.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},e.prototype._addLabel=function(e,t,n,r,o){var i=r.style,a=r.__hostTarget.textConfig||{},s=r.getComputedTransform(),l=r.getBoundingRect().plain();BoundingRect.applyTransform(l,l,s),s?dummyTransformable.setLocalTransform(s):(dummyTransformable.x=dummyTransformable.y=dummyTransformable.rotation=dummyTransformable.originX=dummyTransformable.originY=0,dummyTransformable.scaleX=dummyTransformable.scaleY=1),dummyTransformable.rotation=normalizeRadian(dummyTransformable.rotation);var u,c=r.__hostTarget;if(c){u=c.getBoundingRect().plain();var d=c.getComputedTransform();BoundingRect.applyTransform(u,u,d)}var p=u&&c.getTextGuideLine();this._labelList.push({label:r,labelLine:p,seriesModel:n,dataIndex:e,dataType:t,layoutOption:o,computedLayoutOption:null,rect:l,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:r.ignore,labelGuideIgnore:p&&p.ignore,x:dummyTransformable.x,y:dummyTransformable.y,scaleX:dummyTransformable.scaleX,scaleY:dummyTransformable.scaleY,rotation:dummyTransformable.rotation,style:{x:i.x,y:i.y,align:i.align,verticalAlign:i.verticalAlign,width:i.width,height:i.height,fontSize:i.fontSize},cursor:r.cursor,attachedPos:a.position,attachedRot:a.rotation}})},e.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var n=e.__model,r=n.get("labelLayout");(isFunction(r)||keys(r).length)&&e.group.traverse(function(e){if(e.ignore)return!0;var o=e.getTextContent(),i=getECData(e);o&&!o.disableLabelLayout&&t._addLabel(i.dataIndex,i.dataType,n,o,r)})},e.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),n=e.getHeight();function r(e,t){return function(){updateLabelLinePoints(e,t)}}for(var o=0;o<this._labelList.length;o++){var i=this._labelList[o],a=i.label,s=a.__hostTarget,l=i.defaultAttr,u=void 0;u=(u=isFunction(i.layoutOption)?i.layoutOption(prepareLayoutCallbackParams(i,s)):i.layoutOption)||{},i.computedLayoutOption=u;var c=Math.PI/180;s&&s.setTextConfig({local:!1,position:null!=u.x||null!=u.y?null:l.attachedPos,rotation:null!=u.rotate?u.rotate*c:l.attachedRot,offset:[u.dx||0,u.dy||0]});var d=!1;if(null!=u.x?(a.x=parsePercent(u.x,t),a.setStyle("x",0),d=!0):(a.x=l.x,a.setStyle("x",l.style.x)),null!=u.y?(a.y=parsePercent(u.y,n),a.setStyle("y",0),d=!0):(a.y=l.y,a.setStyle("y",l.style.y)),u.labelLinePoints){var p=s.getTextGuideLine();p&&(p.setShape({points:u.labelLinePoints}),d=!1)}labelLayoutInnerStore(a).needsUpdateLabelLine=d,a.rotation=null!=u.rotate?u.rotate*c:l.rotation,a.scaleX=l.scaleX,a.scaleY=l.scaleY;for(var h=0;h<LABEL_OPTION_TO_STYLE_KEYS.length;h++){var f=LABEL_OPTION_TO_STYLE_KEYS[h];a.setStyle(f,null!=u[f]?u[f]:l.style[f])}if(u.draggable){if(a.draggable=!0,a.cursor="move",s){var g=i.seriesModel;if(null!=i.dataIndex)g=i.seriesModel.getData(i.dataType).getItemModel(i.dataIndex);a.on("drag",r(s,g.getModel("labelLine")))}}else a.off("drag"),a.cursor=l.cursor}},e.prototype.layout=function(e){var t=e.getWidth(),n=e.getHeight(),r=prepareLayoutList(this._labelList),o=filter(r,function(e){return"shiftX"===e.layoutOption.moveOverlap}),i=filter(r,function(e){return"shiftY"===e.layoutOption.moveOverlap});shiftLayoutOnX(o,0,t),shiftLayoutOnY(i,0,n),hideOverlap(filter(r,function(e){return e.layoutOption.hideOverlap}))},e.prototype.processLabelsOverall=function(){var e=this;each$f(this._chartViewList,function(t){var n=t.__model,r=t.ignoreLabelLineUpdate,o=n.isAnimationEnabled();t.group.traverse(function(t){if(t.ignore&&!t.forceLabelAnimation)return!0;var i=!r,a=t.getTextContent();!i&&a&&(i=labelLayoutInnerStore(a).needsUpdateLabelLine),i&&e._updateLabelLine(t,n),o&&e._animateLabels(t,n)})})},e.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),r=getECData(e),o=r.dataIndex;if(n&&null!=o){var i=t.getData(r.dataType),a=i.getItemModel(o),s={},l=i.getItemVisual(o,"style");if(l){var u=i.getVisual("drawType");s.stroke=l[u]}var c=a.getModel("labelLine");setLabelLineStyle(e,getLabelLineStatesModels(a),s),updateLabelLinePoints(e,c)}},e.prototype._animateLabels=function(e,t){var n=e.getTextContent(),r=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!isElementRemoved(e))){var o=(h=labelLayoutInnerStore(n)).oldLayout,i=getECData(e),a=i.dataIndex,s={x:n.x,y:n.y,rotation:n.rotation},l=t.getData(i.dataType);if(o){n.attr(o);var u=e.prevStates;u&&(indexOf(u,"select")>=0&&n.attr(h.oldLayoutSelect),indexOf(u,"emphasis")>=0&&n.attr(h.oldLayoutEmphasis)),updateProps$1(n,s,t,a)}else if(n.attr(s),!labelInner(n).valueAnimation){var c=retrieve2(n.style.opacity,1);n.style.opacity=0,initProps(n,{style:{opacity:c}},t,a)}if(h.oldLayout=s,n.states.select){var d=h.oldLayoutSelect={};extendWithKeys(d,s,LABEL_LAYOUT_PROPS),extendWithKeys(d,n.states.select,LABEL_LAYOUT_PROPS)}if(n.states.emphasis){var p=h.oldLayoutEmphasis={};extendWithKeys(p,s,LABEL_LAYOUT_PROPS),extendWithKeys(p,n.states.emphasis,LABEL_LAYOUT_PROPS)}animateLabelValue(n,a,l,t,t)}if(r&&!r.ignore&&!r.invisible){o=(h=labelLineAnimationStore(r)).oldLayout;var h,f={points:r.shape.points};o?(r.attr({shape:o}),updateProps$1(r,{shape:f},t)):(r.setShape(f),r.style.strokePercent=0,initProps(r,{style:{strokePercent:1}},t)),h.oldLayout=f}},e}(),getLabelManager=makeInner();function installLabelLayout(e){e.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var r=getLabelManager(t).labelManager;r||(r=getLabelManager(t).labelManager=new LabelManager),r.clearLabels()}),e.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var r=getLabelManager(t).labelManager;n.updatedSeries.forEach(function(e){r.addLabelsOfSeries(t.getViewOfSeriesModel(e))}),r.updateLayoutConfig(t),r.layout(t),r.processLabelsOverall()})}var LineSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return __extends(t,e),t.prototype.getInitialData=function(e){return createSeriesData(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Group$3,n=createSymbol$1("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),i="none"===r?"circle":r,a=.8*e.itemHeight,s=createSymbol$1(i,(e.itemWidth-a)/2,(e.itemHeight-a)/2,a,a,e.itemStyle.fill);t.add(s),s.setStyle(e.itemStyle);var l="inherit"===e.iconRotate?o:e.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),i.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),t},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(SeriesModel);function getDefaultLabel(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var o=retrieveRawValue(e,t,n[0]);return null!=o?o+"":null}if(r){for(var i=[],a=0;a<n.length;a++)i.push(retrieveRawValue(e,t,n[a]));return i.join(" ")}}function getDefaultInterpolatedLabel(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!isArray$1(t))return t+"";for(var r=[],o=0;o<n.length;o++){var i=e.getDimensionIndex(n[o]);i>=0&&r.push(t[i])}return r.join(" ")}var Symbol$1=function(e){function t(t,n,r,o){var i=e.call(this)||this;return i.updateData(t,n,r,o),i}return __extends(t,e),t.prototype._createSymbol=function(e,t,n,r,o){this.removeAll();var i=createSymbol$1(e,-1,-1,2,2,null,o);i.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),i.drift=driftSymbol,this._symbolType=e,this.add(i)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){enterEmphasis(this.childAt(0))},t.prototype.downplay=function(){leaveEmphasis(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?"move":n.cursor},t.prototype.updateData=function(e,n,r,o){this.silent=!1;var i=e.getItemVisual(n,"symbol")||"circle",a=e.hostModel,s=t.getSymbolSize(e,n),l=i!==this._symbolType,u=o&&o.disableAnimation;if(l){var c=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(i,e,n,s,c)}else{(p=this.childAt(0)).silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?p.attr(d):updateProps$1(p,d,a,n),saveOldStyle(p)}if(this._updateCommon(e,n,s,r,o),l){var p=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,initProps(p,d,a,n)}}u&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,n,r,o){var i,a,s,l,u,c,d,p,h,f=this.childAt(0),g=e.hostModel;if(r&&(i=r.emphasisItemStyle,a=r.blurItemStyle,s=r.selectItemStyle,l=r.focus,u=r.blurScope,d=r.labelStatesModels,p=r.hoverScale,h=r.cursorStyle,c=r.emphasisDisabled),!r||e.hasItemOption){var m=r&&r.itemModel?r.itemModel:e.getItemModel(t),y=m.getModel("emphasis");i=y.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),a=m.getModel(["blur","itemStyle"]).getItemStyle(),l=y.get("focus"),u=y.get("blurScope"),c=y.get("disabled"),d=getLabelStatesModels(m),p=y.getShallow("scale"),h=m.getShallow("cursor")}var v=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(v||0)*Math.PI/180||0);var _=normalizeSymbolOffset(e.getItemVisual(t,"symbolOffset"),n);_&&(f.x=_[0],f.y=_[1]),h&&f.attr("cursor",h);var x=e.getItemVisual(t,"style"),S=x.fill;if(f instanceof ZRImage){var b=f.style;f.useStyle(extend$2({image:b.image,x:b.x,y:b.y,width:b.width,height:b.height},x))}else f.__isEmptyBrush?f.useStyle(extend$2({},x)):f.useStyle(x),f.style.decal=null,f.setColor(S,o&&o.symbolInnerColor),f.style.strokeNoScale=!0;var T=e.getItemVisual(t,"liftZ"),A=this._z2;null!=T?null==A&&(this._z2=f.z2,f.z2+=T):null!=A&&(f.z2=A,this._z2=null);var w=o&&o.useNameLabel;setLabelStyle(f,d,{labelFetcher:g,labelDataIndex:t,defaultText:function(t){return w?e.getName(t):getDefaultLabel(e,t)},inheritColor:S,defaultOpacity:x.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var C=f.ensureState("emphasis");C.style=i,f.ensureState("select").style=s,f.ensureState("blur").style=a;var E=null==p||!0===p?Math.max(1.1,3/this._sizeY):isFinite(p)&&p>0?+p:1;C.scaleX=this._sizeX*E,C.scaleY=this._sizeY*E,this.setSymbolScale(1),toggleHoverEmphasis(this,l,u,c)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),o=getECData(this).dataIndex,i=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&removeElement(a,{style:{opacity:0}},t,{dataIndex:o,removeOpt:i,cb:function(){r.removeTextContent()}})}else r.removeTextContent();removeElement(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:o,cb:e,removeOpt:i})},t.getSymbolSize=function(e,t){return normalizeSymbolSize(e.getItemVisual(t,"symbolSize"))},t}(Group$3);function driftSymbol(e,t){this.parent.drift(e,t)}function symbolNeedsDraw$1(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function normalizeUpdateOpt(e){return null==e||isObject$3(e)||(e={isIgnore:e}),e||{}}function makeSeriesScope$2(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:getLabelStatesModels(t),cursorStyle:t.get("cursor")}}var SymbolDraw=function(){function e(e){this.group=new Group$3,this._SymbolCtor=e||Symbol$1}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=normalizeUpdateOpt(t);var n=this.group,r=e.hostModel,o=this._data,i=this._SymbolCtor,a=t.disableAnimation,s=makeSeriesScope$2(e),l={disableAnimation:a},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};o||n.removeAll(),e.diff(o).add(function(r){var o=u(r);if(symbolNeedsDraw$1(e,o,r,t)){var a=new i(e,r,s,l);a.setPosition(o),e.setItemGraphicEl(r,a),n.add(a)}}).update(function(c,d){var p=o.getItemGraphicEl(d),h=u(c);if(symbolNeedsDraw$1(e,h,c,t)){var f=e.getItemVisual(c,"symbol")||"circle",g=p&&p.getSymbolType&&p.getSymbolType();if(!p||g&&g!==f)n.remove(p),(p=new i(e,c,s,l)).setPosition(h);else{p.updateData(e,c,s,l);var m={x:h[0],y:h[1]};a?p.attr(m):updateProps$1(p,m,r)}n.add(p),e.setItemGraphicEl(c,p)}else n.remove(p)}).remove(function(e){var t=o.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=u,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(t,n){var r=e._getSymbolPoint(n);t.setPosition(r),t.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=makeSeriesScope$2(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function r(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=normalizeUpdateOpt(n);for(var o=e.start;o<e.end;o++){var i=t.getItemLayout(o);if(symbolNeedsDraw$1(t,i,o,n)){var a=new this._SymbolCtor(t,o,this._seriesScope);a.traverse(r),a.setPosition(i),this.group.add(a),t.setItemGraphicEl(o,a),this._progressiveEls.push(a)}}},e.prototype.eachRendered=function(e){traverseElements(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(e){e.fadeOut(function(){t.remove(e)},n.hostModel)}):t.removeAll()},e}();function prepareDataCoordInfo(e,t,n){var r=e.getBaseAxis(),o=e.getOtherAxis(r),i=getValueStart(o,n),a=r.dim,s=o.dim,l=t.mapDimension(s),u=t.mapDimension(a),c="x"===s||"radius"===s?1:0,d=map$1(e.dimensions,function(e){return t.mapDimension(e)}),p=!1,h=t.getCalculationInfo("stackResultDimension");return isDimensionStacked(t,d[0])&&(p=!0,d[0]=h),isDimensionStacked(t,d[1])&&(p=!0,d[1]=h),{dataDimsForPoint:d,valueStart:i,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function getValueStart(e,t){var n=0,r=e.scale.getExtent();return"start"===t?n=r[0]:"end"===t?n=r[1]:isNumber(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]),n}function getStackedOnPoint(e,t,n,r){var o=NaN;e.stacked&&(o=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(o)&&(o=e.valueStart);var i=e.baseDataOffset,a=[];return a[i]=n.get(e.baseDim,r),a[1-i]=o,t.dataToPoint(a)}function diffData(e,t){var n=[];return t.diff(e).add(function(e){n.push({cmd:"+",idx:e})}).update(function(e,t){n.push({cmd:"=",idx:t,idx1:e})}).remove(function(e){n.push({cmd:"-",idx:e})}).execute(),n}function lineAnimationDiff(e,t,n,r,o,i,a,s){for(var l=diffData(e,t),u=[],c=[],d=[],p=[],h=[],f=[],g=[],m=prepareDataCoordInfo(o,t,a),y=e.getLayout("points")||[],v=t.getLayout("points")||[],_=0;_<l.length;_++){var x=l[_],S=!0,b=void 0,T=void 0;switch(x.cmd){case"=":b=2*x.idx,T=2*x.idx1;var A=y[b],w=y[b+1],C=v[T],E=v[T+1];(isNaN(A)||isNaN(w))&&(A=C,w=E),u.push(A,w),c.push(C,E),d.push(n[b],n[b+1]),p.push(r[T],r[T+1]),g.push(t.getRawIndex(x.idx1));break;case"+":var M=x.idx,I=m.dataDimsForPoint,P=o.dataToPoint([t.get(I[0],M),t.get(I[1],M)]);T=2*M,u.push(P[0],P[1]),c.push(v[T],v[T+1]);var D=getStackedOnPoint(m,o,t,M);d.push(D[0],D[1]),p.push(r[T],r[T+1]),g.push(t.getRawIndex(M));break;case"-":S=!1}S&&(h.push(x),f.push(f.length))}f.sort(function(e,t){return g[e]-g[t]});var k=u.length,$=createFloat32Array(k),R=createFloat32Array(k),L=createFloat32Array(k),O=createFloat32Array(k),N=[];for(_=0;_<f.length;_++){var B=f[_],V=2*_,F=2*B;$[V]=u[F],$[V+1]=u[F+1],R[V]=c[F],R[V+1]=c[F+1],L[V]=d[F],L[V+1]=d[F+1],O[V]=p[F],O[V+1]=p[F+1],N[_]=h[B]}return{current:$,next:R,stackedOnCurrent:L,stackedOnNext:O,status:N}}var mathMin$5=Math.min,mathMax$5=Math.max;function isPointNull$1(e,t){return isNaN(e)||isNaN(t)}function drawSegment(e,t,n,r,o,i,a,s,l){for(var u,c,d,p,h,f,g=n,m=0;m<r;m++){var y=t[2*g],v=t[2*g+1];if(g>=o||g<0)break;if(isPointNull$1(y,v)){if(l){g+=i;continue}break}if(g===n)e[i>0?"moveTo":"lineTo"](y,v),d=y,p=v;else{var _=y-u,x=v-c;if(_*_+x*x<.5){g+=i;continue}if(a>0){for(var S=g+i,b=t[2*S],T=t[2*S+1];b===y&&T===v&&m<r;)m++,g+=i,b=t[2*(S+=i)],T=t[2*S+1],_=(y=t[2*g])-u,x=(v=t[2*g+1])-c;var A=m+1;if(l)for(;isPointNull$1(b,T)&&A<r;)A++,b=t[2*(S+=i)],T=t[2*S+1];var w=.5,C=0,E=0,M=void 0,I=void 0;if(A>=r||isPointNull$1(b,T))h=y,f=v;else{C=b-u,E=T-c;var P=y-u,D=b-y,k=v-c,$=T-v,R=void 0,L=void 0;if("x"===s){var O=C>0?1:-1;h=y-O*(R=Math.abs(P))*a,f=v,M=y+O*(L=Math.abs(D))*a,I=v}else if("y"===s){var N=E>0?1:-1;h=y,f=v-N*(R=Math.abs(k))*a,M=y,I=v+N*(L=Math.abs($))*a}else R=Math.sqrt(P*P+k*k),h=y-C*a*(1-(w=(L=Math.sqrt(D*D+$*$))/(L+R))),f=v-E*a*(1-w),I=v+E*a*w,M=mathMin$5(M=y+C*a*w,mathMax$5(b,y)),I=mathMin$5(I,mathMax$5(T,v)),M=mathMax$5(M,mathMin$5(b,y)),f=v-(E=(I=mathMax$5(I,mathMin$5(T,v)))-v)*R/L,h=mathMin$5(h=y-(C=M-y)*R/L,mathMax$5(u,y)),f=mathMin$5(f,mathMax$5(c,v)),M=y+(C=y-(h=mathMax$5(h,mathMin$5(u,y))))*L/R,I=v+(E=v-(f=mathMax$5(f,mathMin$5(c,v))))*L/R}e.bezierCurveTo(d,p,h,f,y,v),d=M,p=I}else e.lineTo(y,v)}u=y,c=v,g+=i}return m}var ECPolylineShape=function(){this.smooth=0,this.smoothConstraint=!0},ECPolyline=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return __extends(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new ECPolylineShape},t.prototype.buildPath=function(e,t){var n=t.points,r=0,o=n.length/2;if(t.connectNulls){for(;o>0&&isPointNull$1(n[2*o-2],n[2*o-1]);o--);for(;r<o&&isPointNull$1(n[2*r],n[2*r+1]);r++);}for(;r<o;)r+=drawSegment(e,n,r,o,o,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,r,o=this.path.data,i=PathProxy.CMD,a="x"===t,s=[],l=0;l<o.length;){var u=void 0,c=void 0,d=void 0,p=void 0,h=void 0,f=void 0,g=void 0;switch(o[l++]){case i.M:n=o[l++],r=o[l++];break;case i.L:if(u=o[l++],c=o[l++],(g=a?(e-n)/(u-n):(e-r)/(c-r))<=1&&g>=0){var m=a?(c-r)*g+r:(u-n)*g+n;return a?[e,m]:[m,e]}n=u,r=c;break;case i.C:u=o[l++],c=o[l++],d=o[l++],p=o[l++],h=o[l++],f=o[l++];var y=a?cubicRootAt(n,u,d,h,e,s):cubicRootAt(r,c,p,f,e,s);if(y>0)for(var v=0;v<y;v++){var _=s[v];if(_<=1&&_>=0){m=a?cubicAt(r,c,p,f,_):cubicAt(n,u,d,h,_);return a?[e,m]:[m,e]}}n=h,r=f}}},t}(Path),ECPolygonShape=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t}(ECPolylineShape),ECPolygon=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return __extends(t,e),t.prototype.getDefaultShape=function(){return new ECPolygonShape},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,o=0,i=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;i>0&&isPointNull$1(n[2*i-2],n[2*i-1]);i--);for(;o<i&&isPointNull$1(n[2*o],n[2*o+1]);o++);}for(;o<i;){var s=drawSegment(e,n,o,i,i,1,t.smooth,a,t.connectNulls);drawSegment(e,r,o+s-1,s,i,-1,t.stackedOnSmooth,a,t.connectNulls),o+=s+1,e.closePath()}},t}(Path);function createGridClipPath(e,t,n,r,o){var i=e.getArea(),a=i.x,s=i.y,l=i.width,u=i.height,c=n.get(["lineStyle","width"])||0;a-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),a!==Math.floor(a)&&(a=Math.floor(a),l++);var d=new Rect$2({shape:{x:a,y:s,width:l,height:u}});if(t){var p=e.getBaseAxis(),h=p.isHorizontal(),f=p.inverse;h?(f&&(d.shape.x+=l),d.shape.width=0):(f||(d.shape.y+=u),d.shape.height=0);var g=isFunction(o)?function(e){o(e,d)}:null;initProps(d,{shape:{width:l,height:u,x:a,y:s}},n,null,r,g)}return d}function createPolarClipPath(e,t,n){var r=e.getArea(),o=round$3(r.r0,1),i=round$3(r.r,1),a=new Sector({shape:{cx:round$3(e.cx,1),cy:round$3(e.cy,1),r0:o,r:i,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});t&&("angle"===e.getBaseAxis().dim?a.shape.endAngle=r.startAngle:a.shape.r=o,initProps(a,{shape:{endAngle:r.endAngle,r:i}},n));return a}function createClipPath(e,t,n,r,o){return e?"polar"===e.type?createPolarClipPath(e,t,n):"cartesian2d"===e.type?createGridClipPath(e,t,n,r,o):null:null}function isCoordinateSystemType(e,t){return e.type===t}function isPointsSame(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function bboxFromPoints(e){for(var t=1/0,n=1/0,r=-1/0,o=-1/0,i=0;i<e.length;){var a=e[i++],s=e[i++];isNaN(a)||(t=Math.min(a,t),r=Math.max(a,r)),isNaN(s)||(n=Math.min(s,n),o=Math.max(s,o))}return[[t,n],[r,o]]}function getBoundingDiff(e,t){var n=bboxFromPoints(e),r=n[0],o=n[1],i=bboxFromPoints(t),a=i[0],s=i[1];return Math.max(Math.abs(r[0]-a[0]),Math.abs(r[1]-a[1]),Math.abs(o[0]-s[0]),Math.abs(o[1]-s[1]))}function getSmooth(e){return isNumber(e)?e:e?.5:0}function getStackedOnPoints(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),o=createFloat32Array(2*r),i=0;i<r;i++){var a=getStackedOnPoint(n,e,t,i);o[2*i]=a[0],o[2*i+1]=a[1]}return o}function turnPointsIntoStep(e,t,n,r,o){var i=n.getBaseAxis(),a="x"===i.dim||"radius"===i.dim?0:1,s=[],l=0,u=[],c=[],d=[],p=[];if(o){for(l=0;l<e.length;l+=2){var h=t||e;isNaN(h[l])||isNaN(h[l+1])||p.push(e[l],e[l+1])}e=p}for(l=0;l<e.length-2;l+=2)switch(d[0]=e[l+2],d[1]=e[l+3],c[0]=e[l],c[1]=e[l+1],s.push(c[0],c[1]),r){case"end":u[a]=d[a],u[1-a]=c[1-a],s.push(u[0],u[1]);break;case"middle":var f=(c[a]+d[a])/2,g=[];u[a]=g[a]=f,u[1-a]=c[1-a],g[1-a]=d[1-a],s.push(u[0],u[1]),s.push(g[0],g[1]);break;default:u[a]=c[a],u[1-a]=d[1-a],s.push(u[0],u[1])}return s.push(e[l++],e[l++]),s}function clipColorStops(e,t){var n,r,o=[],i=e.length;function a(e,t,n){var r=e.coord;return{coord:n,color:lerp((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<i;s++){var l=e[s],u=l.coord;if(u<0)n=l;else{if(u>t){r?o.push(a(r,l,t)):n&&o.push(a(n,l,0),a(n,l,t));break}n&&(o.push(a(n,l,0)),n=null),o.push(l),r=l}}return o}function getVisualGradient(e,t,n){var r=e.getVisual("visualMeta");if(r&&r.length&&e.count()&&"cartesian2d"===t.type){for(var o,i,a=r.length-1;a>=0;a--){var s=e.getDimensionInfo(r[a].dimension);if("x"===(o=s&&s.coordDim)||"y"===o){i=r[a];break}}if(i){var l=t.getAxis(o),u=map$1(i.stops,function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}}),c=u.length,d=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var p=clipColorStops(u,"x"===o?n.getWidth():n.getHeight()),h=p.length;if(!h&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var f=p[0].coord-10,g=p[h-1].coord+10,m=g-f;if(m<.001)return"transparent";each$f(p,function(e){e.offset=(e.coord-f)/m}),p.push({offset:h?p[h-1].offset:.5,color:d[1]||"transparent"}),p.unshift({offset:h?p[0].offset:.5,color:d[0]||"transparent"});var y=new LinearGradient(0,0,0,0,p,!0);return y[o]=f,y[o+"2"]=g,y}}}function getIsIgnoreFunc(e,t,n){var r=e.get("showAllSymbol"),o="auto"===r;if(!r||o){var i=n.getAxesByScale("ordinal")[0];if(i&&(!o||!canShowAllSymbolForCategory(i,t))){var a=t.mapDimension(i.dim),s={};return each$f(i.getViewLabels(),function(e){var t=i.scale.getRawOrdinalNumber(e.tickValue);s[t]=1}),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function canShowAllSymbolForCategory(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var o=t.count(),i=Math.max(1,Math.round(o/5)),a=0;a<o;a+=i)if(1.5*Symbol$1.getSymbolSize(t,a)[e.isHorizontal()?1:0]>r)return!1;return!0}function isPointNull(e,t){return isNaN(e)||isNaN(t)}function getLastIndexNotNull(e){for(var t=e.length/2;t>0&&isPointNull(e[2*t-2],e[2*t-1]);t--);return t-1}function getPointAtIndex(e,t){return[e[2*t],e[2*t+1]]}function getIndexRange(e,t,n){for(var r,o,i=e.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u<i;u++)if(o=e[2*u+a],!isNaN(o)&&!isNaN(e[2*u+1-a]))if(0!==u){if(r<=t&&o>=t||r>=t&&o<=t){l=u;break}s=u,r=o}else r=o;return{range:[s,l],t:(t-r)/(o-r)}}function anyStateShowEndLabel(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<SPECIAL_STATES.length;t++)if(e.get([SPECIAL_STATES[t],"endLabel","show"]))return!0;return!1}function createLineClipPath(e,t,n,r){if(isCoordinateSystemType(t,"cartesian2d")){var o=r.getModel("endLabel"),i=o.get("valueAnimation"),a=r.getData(),s={lastFrameIndex:0},l=anyStateShowEndLabel(r)?function(n,r){e._endLabelOnDuring(n,r,a,s,i,o,t)}:null,u=t.getBaseAxis().isHorizontal(),c=createGridClipPath(t,n,r,function(){var t=e._endLabel;t&&n&&null!=s.originalX&&t.attr({x:s.originalX,y:s.originalY})},l);if(!r.get("clip",!0)){var d=c.shape,p=Math.max(d.width,d.height);u?(d.y-=p,d.height+=2*p):(d.x-=p,d.width+=2*p)}return l&&l(1,c),c}return createPolarClipPath(t,n,r)}function getEndLabelStateSpecified(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),o=n.inverse,i=r?o?"right":"left":"center",a=r?"middle":o?"top":"bottom";return{normal:{align:e.get("align")||i,verticalAlign:e.get("verticalAlign")||a}}}var LineView=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.init=function(){var e=new Group$3,t=new SymbolDraw;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=bind$1(this._changePolyState,this)},t.prototype.render=function(e,t,n){var r=e.coordinateSystem,o=this.group,i=e.getData(),a=e.getModel("lineStyle"),s=e.getModel("areaStyle"),l=i.getLayout("points")||[],u="polar"===r.type,c=this._coordSys,d=this._symbolDraw,p=this._polyline,h=this._polygon,f=this._lineGroup,g=!t.ssr&&e.get("animation"),m=!s.isEmpty(),y=s.get("origin"),v=prepareDataCoordInfo(r,i,y),_=m&&getStackedOnPoints(r,i,v),x=e.get("showSymbol"),S=e.get("connectNulls"),b=x&&!u&&getIsIgnoreFunc(e,i,r),T=this._data;T&&T.eachItemGraphicEl(function(e,t){e.__temp&&(o.remove(e),T.setItemGraphicEl(t,null))}),x||d.remove(),o.add(f);var A,w=!u&&e.get("step");r&&r.getArea&&e.get("clip",!0)&&(null!=(A=r.getArea()).width?(A.x-=.1,A.y-=.1,A.width+=.2,A.height+=.2):A.r0&&(A.r0-=.5,A.r+=.5)),this._clipShapeForSymbol=A;var C=getVisualGradient(i,r,n)||i.getVisual("style")[i.getVisual("drawType")];if(p&&c.type===r.type&&w===this._step){m&&!h?h=this._newPolygon(l,_):h&&!m&&(f.remove(h),h=this._polygon=null),u||this._initOrUpdateEndLabel(e,r,convertToColorString(C));var E=f.getClipPath();if(E)initProps(E,{shape:createLineClipPath(this,r,!1,e).shape},e);else f.setClipPath(createLineClipPath(this,r,!0,e));x&&d.updateData(i,{isIgnore:b,clipShape:A,disableAnimation:!0,getSymbolPoint:function(e){return[l[2*e],l[2*e+1]]}}),isPointsSame(this._stackedOnPoints,_)&&isPointsSame(this._points,l)||(g?this._doUpdateAnimation(i,_,r,n,w,y,S):(w&&(_&&(_=turnPointsIntoStep(_,l,r,w,S)),l=turnPointsIntoStep(l,null,r,w,S)),p.setShape({points:l}),h&&h.setShape({points:l,stackedOnPoints:_})))}else x&&d.updateData(i,{isIgnore:b,clipShape:A,disableAnimation:!0,getSymbolPoint:function(e){return[l[2*e],l[2*e+1]]}}),g&&this._initSymbolLabelAnimation(i,r,A),w&&(_&&(_=turnPointsIntoStep(_,l,r,w,S)),l=turnPointsIntoStep(l,null,r,w,S)),p=this._newPolyline(l),m?h=this._newPolygon(l,_):h&&(f.remove(h),h=this._polygon=null),u||this._initOrUpdateEndLabel(e,r,convertToColorString(C)),f.setClipPath(createLineClipPath(this,r,!0,e));var M=e.getModel("emphasis"),I=M.get("focus"),P=M.get("blurScope"),D=M.get("disabled");(p.useStyle(defaults$2(a.getLineStyle(),{fill:"none",stroke:C,lineJoin:"bevel"})),setStatesStylesFromModel(p,e,"lineStyle"),p.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(p.getState("emphasis").style.lineWidth=+p.style.lineWidth+1);getECData(p).seriesIndex=e.seriesIndex,toggleHoverEmphasis(p,I,P,D);var k=getSmooth(e.get("smooth")),$=e.get("smoothMonotone");if(p.setShape({smooth:k,smoothMonotone:$,connectNulls:S}),h){var R=i.getCalculationInfo("stackedOnSeries"),L=0;h.useStyle(defaults$2(s.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel",decal:i.getVisual("style").decal})),R&&(L=getSmooth(R.get("smooth"))),h.setShape({smooth:k,stackedOnSmooth:L,smoothMonotone:$,connectNulls:S}),setStatesStylesFromModel(h,e,"areaStyle"),getECData(h).seriesIndex=e.seriesIndex,toggleHoverEmphasis(h,I,P,D)}var O=this._changePolyState;i.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=O)}),this._polyline.onHoverStateChange=O,this._data=i,this._coordSys=r,this._stackedOnPoints=_,this._points=l,this._step=w,this._valueOrigin=y,e.get("triggerLineEvent")&&(this.packEventData(e,p),h&&this.packEventData(e,h))},t.prototype.packEventData=function(e,t){getECData(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,t,n,r){var o=e.getData(),i=queryDataIndex(o,r);if(this._changePolyState("emphasis"),!(i instanceof Array)&&null!=i&&i>=0){var a=o.getLayout("points"),s=o.getItemGraphicEl(i);if(!s){var l=a[2*i],u=a[2*i+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=e.get("zlevel")||0,d=e.get("z")||0;(s=new Symbol$1(o,i)).x=l,s.y=u,s.setZ(c,d);var p=s.getSymbolPath().getTextContent();p&&(p.zlevel=c,p.z=d,p.z2=this._polyline.z2+1),s.__temp=!0,o.setItemGraphicEl(i,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else ChartView.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var o=e.getData(),i=queryDataIndex(o,r);if(this._changePolyState("normal"),null!=i&&i>=0){var a=o.getItemGraphicEl(i);a&&(a.__temp?(o.setItemGraphicEl(i,null),this.group.remove(a)):a.downplay())}else ChartView.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;setStatesFlag(this._polyline,e),t&&setStatesFlag(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new ECPolyline({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new ECPolygon({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,o,i=t.getBaseAxis(),a=i.inverse;"cartesian2d"===t.type?(r=i.isHorizontal(),o=!1):"polar"===t.type&&(r="angle"===i.dim,o=!0);var s=e.hostModel,l=s.get("animationDuration");isFunction(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=isFunction(u)?u(null):u;e.eachItemGraphicEl(function(e,i){var s=e;if(s){var d=[e.x,e.y],p=void 0,h=void 0,f=void 0;if(n)if(o){var g=n,m=t.pointToCoord(d);r?(p=g.startAngle,h=g.endAngle,f=-m[1]/180*Math.PI):(p=g.r0,h=g.r,f=m[0])}else{var y=n;r?(p=y.x,h=y.x+y.width,f=e.x):(p=y.y+y.height,h=y.y,f=e.y)}var v=h===p?0:(f-p)/(h-p);a&&(v=1-v);var _=isFunction(u)?u(i):l*v+c,x=s.getSymbolPath(),S=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:_}),S&&S.animateFrom({style:{opacity:0}},{duration:300,delay:_}),x.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel("endLabel");if(anyStateShowEndLabel(e)){var o=e.getData(),i=this._polyline,a=o.getLayout("points");if(!a)return i.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new ZRText({z2:200})).ignoreClip=!0,i.setTextContent(this._endLabel),i.disableLabelAnimation=!0);var l=getLastIndexNotNull(a);l>=0&&(setLabelStyle(i,getLabelStatesModels(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?getDefaultInterpolatedLabel(o,n):getDefaultLabel(o,e)},enableTextSetter:!0},getEndLabelStateSpecified(r,t)),i.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,r,o,i,a){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),p=i.get("precision"),h=i.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),m=f.inverse,y=t.shape,v=m?g?y.x:y.y+y.height:g?y.x+y.width:y.y,_=(g?h:0)*(m?-1:1),x=(g?0:-h)*(m?-1:1),S=g?"x":"y",b=getIndexRange(u,v,S),T=b.range,A=T[1]-T[0],w=void 0;if(A>=1){if(A>1&&!d){var C=getPointAtIndex(u,T[0]);s.attr({x:C[0]+_,y:C[1]+x}),o&&(w=c.getRawValue(T[0]))}else{(C=l.getPointOn(v,S))&&s.attr({x:C[0]+_,y:C[1]+x});var E=c.getRawValue(T[0]),M=c.getRawValue(T[1]);o&&(w=interpolateRawValues(n,p,E,M,b.t))}r.lastFrameIndex=T[0]}else{var I=1===e||r.lastFrameIndex>0?T[0]:0;C=getPointAtIndex(u,I);o&&(w=c.getRawValue(I)),s.attr({x:C[0]+_,y:C[1]+x})}if(o){var P=labelInner(s);"function"==typeof P.setLabelText&&P.setLabelText(w)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,o,i,a){var s=this._polyline,l=this._polygon,u=e.hostModel,c=lineAnimationDiff(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin),d=c.current,p=c.stackedOnCurrent,h=c.next,f=c.stackedOnNext;if(o&&(p=turnPointsIntoStep(c.stackedOnCurrent,c.current,n,o,a),d=turnPointsIntoStep(c.current,null,n,o,a),f=turnPointsIntoStep(c.stackedOnNext,c.next,n,o,a),h=turnPointsIntoStep(c.next,null,n,o,a)),getBoundingDiff(d,h)>3e3||l&&getBoundingDiff(p,f)>3e3)return s.stopAnimation(),s.setShape({points:h}),void(l&&(l.stopAnimation(),l.setShape({points:h,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=d;var g={shape:{points:h}};c.current!==d&&(g.shape.__points=c.next),s.stopAnimation(),updateProps$1(s,g,u),l&&(l.setShape({points:d,stackedOnPoints:p}),l.stopAnimation(),updateProps$1(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var m=[],y=c.status,v=0;v<y.length;v++){if("="===y[v].cmd){var _=e.getItemGraphicEl(y[v].idx1);_&&m.push({el:_,ptIdx:v})}}s.animators&&s.animators.length&&s.animators[0].during(function(){l&&l.dirtyShape();for(var e=s.shape.__points,t=0;t<m.length;t++){var n=m[t].el,r=2*m[t].ptIdx;n.x=e[r],n.y=e[r+1],n.markRedraw()}})},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(ChartView);function pointsLayout(e,t){return{seriesType:e,plan:createRenderPlanner(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,o=e.pipelineContext,i=t||o.large;if(r){var a=map$1(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=a.length,l=n.getCalculationInfo("stackResultDimension");isDimensionStacked(n,a[0])&&(a[0]=l),isDimensionStacked(n,a[1])&&(a[1]=l);var u=n.getStore(),c=n.getDimensionIndex(a[0]),d=n.getDimensionIndex(a[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,o=i&&createFloat32Array(n*s),a=[],l=[],p=e.start,h=0;p<e.end;p++){var f=void 0;if(1===s){var g=u.get(c,p);f=r.dataToPoint(g,null,l)}else a[0]=u.get(c,p),a[1]=u.get(d,p),f=r.dataToPoint(a,null,l);i?(o[h++]=f[0],o[h++]=f[1]):t.setItemLayout(p,f.slice())}i&&t.setLayout("points",o)}}}}}}var samplers={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},indexSampler=function(e){return Math.round(e.length/2)};function dataSample(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),o=e.get("sampling"),i=e.coordinateSystem,a=r.count();if(a>10&&"cartesian2d"===i.type&&o){var s=i.getBaseAxis(),l=i.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),d=Math.abs(u[1]-u[0])*(c||1),p=Math.round(a/d);if(isFinite(p)&&p>1){"lttb"===o?e.setData(r.lttbDownSample(r.mapDimension(l.dim),1/p)):"minmax"===o&&e.setData(r.minmaxDownSample(r.mapDimension(l.dim),1/p));var h=void 0;isString(o)?h=samplers[o]:isFunction(o)&&(h=o),h&&e.setData(r.downSample(r.mapDimension(l.dim),1/p,h,indexSampler))}}}}}function install$S(e){e.registerChartView(LineView),e.registerSeriesModel(LineSeriesModel),e.registerLayout(pointsLayout("line",!0)),e.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,dataSample("line"))}var BaseBarSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.getInitialData=function(e,t){return createSeriesData(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var o=r.clampData(e),i=r.dataToPoint(o);if(n)each$f(r.getAxes(),function(e,n){if("category"===e.type&&null!=t){var r=e.getTicksCoords(),a=e.getTickModel().get("alignWithLabel"),s=o[n],l="x1"===t[n]||"y1"===t[n];if(l&&!a&&(s+=1),r.length<2)return;if(2===r.length)return void(i[n]=e.toGlobalCoord(e.getExtent()[l?1:0]));for(var u=void 0,c=void 0,d=1,p=0;p<r.length;p++){var h=r[p].coord,f=p===r.length-1?r[p-1].tickValue+d:r[p].tickValue;if(f===s){c=h;break}if(f<s)u=h;else if(null!=u&&f>s){c=(h+u)/2;break}1===p&&(d=f-r[0].tickValue)}null==c&&(u?u&&(c=r[r.length-1].coord):c=r[0].coord),i[n]=e.toGlobalCoord(c)}});else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=r.getBaseAxis().isHorizontal()?0:1;i[u]+=s+l/2}return i}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(SeriesModel);SeriesModel.registerClass(BaseBarSeriesModel);var BarSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.getInitialData=function(){return createSeriesData(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=inheritDefaultOption(BaseBarSeriesModel.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}),t}(BaseBarSeriesModel),SausageShape=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},SausagePath=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return __extends(t,e),t.prototype.getDefaultShape=function(){return new SausageShape},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,o=Math.max(t.r0||0,0),i=Math.max(t.r,0),a=.5*(i-o),s=o+a,l=t.startAngle,u=t.endAngle,c=t.clockwise,d=2*Math.PI,p=c?u-l<d:l-u<d;p||(l=u-(c?d:-d));var h=Math.cos(l),f=Math.sin(l),g=Math.cos(u),m=Math.sin(u);p?(e.moveTo(h*o+n,f*o+r),e.arc(h*s+n,f*s+r,a,-Math.PI+l,l,!c)):e.moveTo(h*i+n,f*i+r),e.arc(n,r,i,l,u,!c),e.arc(g*s+n,m*s+r,a,u-2*Math.PI,u-Math.PI,!c),0!==o&&e.arc(n,r,o,u,l,c)},t}(Path);function createSectorCalculateTextPosition(e,t){var n=(t=t||{}).isRoundCap;return function(t,r,o){var i=r.position;if(!i||i instanceof Array)return _calculateTextPosition(t,r,o);var a=e(i),s=null!=r.distance?r.distance:5,l=this.shape,u=l.cx,c=l.cy,d=l.r,p=l.r0,h=(d+p)/2,f=l.startAngle,g=l.endAngle,m=(f+g)/2,y=n?Math.abs(d-p)/2:0,v=Math.cos,_=Math.sin,x=u+d*v(f),S=c+d*_(f),b="left",T="top";switch(a){case"startArc":x=u+(p-s)*v(m),S=c+(p-s)*_(m),b="center",T="top";break;case"insideStartArc":x=u+(p+s)*v(m),S=c+(p+s)*_(m),b="center",T="bottom";break;case"startAngle":x=u+h*v(f)+adjustAngleDistanceX(f,s+y,!1),S=c+h*_(f)+adjustAngleDistanceY(f,s+y,!1),b="right",T="middle";break;case"insideStartAngle":x=u+h*v(f)+adjustAngleDistanceX(f,-s+y,!1),S=c+h*_(f)+adjustAngleDistanceY(f,-s+y,!1),b="left",T="middle";break;case"middle":x=u+h*v(m),S=c+h*_(m),b="center",T="middle";break;case"endArc":x=u+(d+s)*v(m),S=c+(d+s)*_(m),b="center",T="bottom";break;case"insideEndArc":x=u+(d-s)*v(m),S=c+(d-s)*_(m),b="center",T="top";break;case"endAngle":x=u+h*v(g)+adjustAngleDistanceX(g,s+y,!0),S=c+h*_(g)+adjustAngleDistanceY(g,s+y,!0),b="left",T="middle";break;case"insideEndAngle":x=u+h*v(g)+adjustAngleDistanceX(g,-s+y,!0),S=c+h*_(g)+adjustAngleDistanceY(g,-s+y,!0),b="right",T="middle";break;default:return _calculateTextPosition(t,r,o)}return(t=t||{}).x=x,t.y=S,t.align=b,t.verticalAlign=T,t}}function setSectorTextRotation(e,t,n,r){if(isNumber(r))e.setTextConfig({rotation:r});else if(isArray$1(t))e.setTextConfig({rotation:0});else{var o,i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,s=i.clockwise?i.endAngle:i.startAngle,l=(a+s)/2,u=n(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":o=l;break;case"startAngle":case"insideStartAngle":o=a;break;case"endAngle":case"insideEndAngle":o=s;break;default:return void e.setTextConfig({rotation:0})}var c=1.5*Math.PI-o;"middle"===u&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),e.setTextConfig({rotation:c})}}function adjustAngleDistanceX(e,t,n){return t*Math.sin(e)*(n?-1:1)}function adjustAngleDistanceY(e,t,n){return t*Math.cos(e)*(n?1:-1)}function getSectorCornerRadius(e,t,n){var r=e.get("borderRadius");if(null==r)return n?{cornerRadius:0}:null;isArray$1(r)||(r=[r,r,r,r]);var o=Math.abs(t.r||0-t.r0||0);return{cornerRadius:map$1(r,function(e){return parsePercent$1(e,o)})}}var mathMax$4=Math.max,mathMin$4=Math.min;function getClipArea(e,t){var n=e.getArea&&e.getArea();if(isCoordinateSystemType(e,"cartesian2d")){var r=e.getBaseAxis();if("category"!==r.type||!r.onBand){var o=t.getLayout("bandWidth");r.isHorizontal()?(n.x-=o,n.width+=2*o):(n.y-=o,n.height+=2*o)}}return n}var BarView=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return __extends(t,e),t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var o=e.get("coordinateSystem");"cartesian2d"!==o&&"polar"!==o||(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){traverseElements(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var o,i=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?o=u.isHorizontal():"polar"===l.type&&(o="angle"===u.dim);var c=e.isAnimationEnabled()?e:null,d=shouldRealtimeSort(e,l);d&&this._enableRealtimeSort(d,a,n);var p=e.get("clip",!0)||d,h=getClipArea(l,a);i.removeClipPath();var f=e.get("roundCap",!0),g=e.get("showBackground",!0),m=e.getModel("backgroundStyle"),y=m.get("borderRadius")||0,v=[],_=this._backgroundEls,x=r&&r.isInitSort,S=r&&"changeAxisOrder"===r.type;function b(e){var t=getLayout[l.type](a,e),n=createBackgroundEl(l,o,t);return n.useStyle(m.getItemStyle()),"cartesian2d"===l.type?n.setShape("r",y):n.setShape("cornerRadius",y),v[e]=n,n}a.diff(s).add(function(t){var n=a.getItemModel(t),r=getLayout[l.type](a,t,n);if(g&&b(t),a.hasValue(t)&&isValidLayout[l.type](r)){var s=!1;p&&(s=clip[l.type](h,r));var m=elementCreator[l.type](e,a,t,r,o,c,u.model,!1,f);d&&(m.forceLabelAnimation=!0),updateStyle(m,a,t,n,r,e,o,"polar"===l.type),x?m.attr({shape:r}):d?updateRealtimeAnimation(d,c,m,r,t,o,!1,!1):initProps(m,{shape:r},e,t),a.setItemGraphicEl(t,m),i.add(m),m.ignore=s}}).update(function(t,n){var r=a.getItemModel(t),T=getLayout[l.type](a,t,r);if(g){var A=void 0;0===_.length?A=b(n):((A=_[n]).useStyle(m.getItemStyle()),"cartesian2d"===l.type?A.setShape("r",y):A.setShape("cornerRadius",y),v[t]=A);var w=getLayout[l.type](a,t);updateProps$1(A,{shape:createBackgroundShape(o,w,l)},c,t)}var C=s.getItemGraphicEl(n);if(a.hasValue(t)&&isValidLayout[l.type](T)){var E=!1;if(p&&(E=clip[l.type](h,T))&&i.remove(C),C?saveOldStyle(C):C=elementCreator[l.type](e,a,t,T,o,c,u.model,!!C,f),d&&(C.forceLabelAnimation=!0),S){var M=C.getTextContent();if(M){var I=labelInner(M);null!=I.prevValue&&(I.prevValue=I.value)}}else updateStyle(C,a,t,r,T,e,o,"polar"===l.type);x?C.attr({shape:T}):d?updateRealtimeAnimation(d,c,C,T,t,o,!0,S):updateProps$1(C,{shape:T},e,t,null),a.setItemGraphicEl(t,C),C.ignore=E,i.add(C)}else i.remove(C)}).remove(function(t){var n=s.getItemGraphicEl(t);n&&removeElementWithFadeOut(n,e,t)}).execute();var T=this._backgroundGroup||(this._backgroundGroup=new Group$3);T.removeAll();for(var A=0;A<v.length;++A)T.add(v[A]);i.add(T),this._backgroundEls=v,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),createLarge$1(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),createLarge$1(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&createClipPath(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var i=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(o.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,i,o,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var o=n(t);o=null==o?NaN:o,r.push({dataIndex:t,mappedValue:o,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:map$1(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,o=e.mapDimension(n.dim),i=Number.MAX_VALUE,a=0,s=r.getOrdinalMeta().categories.length;a<s;++a){var l=e.rawIndexOf(o,r.getRawOrdinalNumber(a)),u=l<0?Number.MIN_VALUE:t(e.indexOfRawIndex(l));if(u>i)return!0;i=u}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),o=Math.max(0,r[0]),i=Math.min(r[1],n.getOrdinalMeta().categories.length-1);o<=i;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var o=this._dataSort(e,n,t);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,o=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:o})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){removeElementWithFadeOut(t,e,getECData(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(ChartView),clip={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var o=e.x+e.width,i=e.y+e.height,a=mathMax$4(t.x,e.x),s=mathMin$4(t.x+t.width,o),l=mathMax$4(t.y,e.y),u=mathMin$4(t.y+t.height,i),c=s<a,d=u<l;return t.x=c&&a>o?s:a,t.y=d&&l>i?u:l,t.width=c?0:s-a,t.height=d?0:u-l,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),c||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var o=mathMin$4(t.r,e.r),i=mathMax$4(t.r0,e.r0);t.r=o,t.r0=i;var a=o-i<0;if(n<0){r=t.r;t.r=t.r0,t.r0=r}return a}},elementCreator={cartesian2d:function(e,t,n,r,o,i,a,s,l){var u=new Rect$2({shape:extend$2({},r),z2:1});(u.__dataIndex=n,u.name="item",i)&&(u.shape[o?"height":"width"]=0);return u},polar:function(e,t,n,r,o,i,a,s,l){var u=!o&&l?SausagePath:Sector,c=new u({shape:r,z2:1});c.name="item";var d=createPolarPositionMapping(o);if(c.calculateTextPosition=createSectorCalculateTextPosition(d,{isRoundCap:u===SausagePath}),i){var p=o?"r":"endAngle",h={};c.shape[p]=o?r.r0:r.startAngle,h[p]=r[p],(s?updateProps$1:initProps)(c,{shape:h},i)}return c}};function shouldRealtimeSort(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();if(n&&"category"===r.type&&"cartesian2d"===t.type)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function updateRealtimeAnimation(e,t,n,r,o,i,a,s){var l,u;i?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(a?updateProps$1:initProps)(n,{shape:l},t,o,null),(a?updateProps$1:initProps)(n,{shape:u},t?e.baseAxis.model:null,o)}function checkPropertiesNotValid(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var rectPropties=["x","y","width","height"],polarPropties=["cx","cy","r","startAngle","endAngle"],isValidLayout={cartesian2d:function(e){return!checkPropertiesNotValid(e,rectPropties)},polar:function(e){return!checkPropertiesNotValid(e,polarPropties)}},getLayout={cartesian2d:function(e,t,n){var r=e.getItemLayout(t),o=n?getLineWidth(n,r):0,i=r.width>0?1:-1,a=r.height>0?1:-1;return{x:r.x+i*o/2,y:r.y+a*o/2,width:r.width-i*o,height:r.height-a*o}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function isZeroOnPolar(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}function createPolarPositionMapping(e){return function(e){var t=e?"Arc":"Angle";return function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}(e)}function updateStyle(e,t,n,r,o,i,a,s){var l=t.getItemVisual(n,"style");if(s){if(!i.get("roundCap")){var u=e.shape;extend$2(u,getSectorCornerRadius(r.getModel("itemStyle"),u,!0)),e.setShape(u)}}else{var c=r.get(["itemStyle","borderRadius"])||0;e.setShape("r",c)}e.useStyle(l);var d=r.getShallow("cursor");d&&e.attr("cursor",d);var p=s?a?o.r>=o.r0?"endArc":"startArc":o.endAngle>=o.startAngle?"endAngle":"startAngle":a?o.height>=0?"bottom":"top":o.width>=0?"right":"left",h=getLabelStatesModels(r);setLabelStyle(e,h,{labelFetcher:i,labelDataIndex:n,defaultText:getDefaultLabel(i.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var f=e.getTextContent();if(s&&f){var g=r.get(["label","position"]);e.textConfig.inside="middle"===g||null,setSectorTextRotation(e,"outside"===g?p:g,createPolarPositionMapping(a),r.get(["label","rotate"]))}setLabelValueAnimation(f,h,i.getRawValue(n),function(e){return getDefaultInterpolatedLabel(t,e)});var m=r.getModel(["emphasis"]);toggleHoverEmphasis(e,m.get("focus"),m.get("blurScope"),m.get("disabled")),setStatesStylesFromModel(e,r),isZeroOnPolar(o)&&(e.style.fill="none",e.style.stroke="none",each$f(e.states,function(e){e.style&&(e.style.fill=e.style.stroke="none")}))}function getLineWidth(e,t){var n=e.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var r=e.get(["itemStyle","borderWidth"])||0,o=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,o,i)}var LagePathShape=function(){return function(){}}(),LargePath=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return __extends(t,e),t.prototype.getDefaultShape=function(){return new LagePathShape},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,o=1-this.baseDimIdx,i=[],a=[],s=this.barWidth,l=0;l<n.length;l+=3)a[r]=s,a[o]=n[l+2],i[r]=n[l+r],i[o]=n[l+o],e.rect(i[0],i[1],a[0],a[1])},t}(Path);function createLarge$1(e,t,n,r){var o=e.getData(),i=o.getLayout("valueAxisHorizontal")?1:0,a=o.getLayout("largeDataIndices"),s=o.getLayout("size"),l=e.getModel("backgroundStyle"),u=o.getLayout("largeBackgroundPoints");if(u){var c=new LargePath({shape:{points:u},incremental:!!r,silent:!0,z2:0});c.baseDimIdx=i,c.largeDataIndices=a,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),n&&n.push(c)}var d=new LargePath({shape:{points:o.getLayout("largePoints")},incremental:!!r,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=i,d.largeDataIndices=a,d.barWidth=s,t.add(d),d.useStyle(o.getVisual("style")),d.style.stroke=null,getECData(d).seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",largePathUpdateDataIndex),d.on("mousemove",largePathUpdateDataIndex)),n&&n.push(d)}var largePathUpdateDataIndex=throttle$2(function(e){var t=largePathFindDataIndex(this,e.offsetX,e.offsetY);getECData(this).dataIndex=t>=0?t:null},30,!1);function largePathFindDataIndex(e,t,n){for(var r=e.baseDimIdx,o=1-r,i=e.shape.points,a=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,d=i.length/3;c<d;c++){var p=3*c;if(l[r]=u,l[o]=i[p+2],s[r]=i[p+r],s[o]=i[p+o],l[o]<0&&(s[o]+=l[o],l[o]=-l[o]),t>=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}function createBackgroundShape(e,t,n){if(isCoordinateSystemType(n,"cartesian2d")){var r=t,o=n.getArea();return{x:e?r.x:o.x,y:e?o.y:r.y,width:e?r.width:o.width,height:e?o.height:r.height}}var i=t;return{cx:(o=n.getArea()).cx,cy:o.cy,r0:e?o.r0:i.r0,r:e?o.r:i.r,startAngle:e?i.startAngle:0,endAngle:e?i.endAngle:2*Math.PI}}function createBackgroundEl(e,t,n){return new("polar"===e.type?Sector:Rect$2)({shape:createBackgroundShape(t,n,e),silent:!0,z2:0})}function install$R(e){e.registerChartView(BarView),e.registerSeriesModel(BarSeriesModel),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,curry$1(layout$3,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,createProgressiveLayout("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,dataSample("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})})}var PI2$1=2*Math.PI,RADIAN$2=Math.PI/180;function getViewRect$5(e,t){return getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function getBasicPieLayout(e,t){var n=getViewRect$5(e,t),r=e.get("center"),o=e.get("radius");isArray$1(o)||(o=[0,o]);var i,a,s=parsePercent(n.width,t.getWidth()),l=parsePercent(n.height,t.getHeight()),u=Math.min(s,l),c=parsePercent(o[0],u/2),d=parsePercent(o[1],u/2),p=e.coordinateSystem;if(p){var h=p.dataToPoint(r);i=h[0]||0,a=h[1]||0}else isArray$1(r)||(r=[r,r]),i=parsePercent(r[0],s)+n.x,a=parsePercent(r[1],l)+n.y;return{cx:i,cy:a,r0:c,r:d}}function pieLayout(e,t,n){t.eachSeriesByType(e,function(e){var t=e.getData(),r=t.mapDimension("value"),o=getViewRect$5(e,n),i=getBasicPieLayout(e,n),a=i.cx,s=i.cy,l=i.r,u=i.r0,c=-e.get("startAngle")*RADIAN$2,d=e.get("endAngle"),p=e.get("padAngle")*RADIAN$2;d="auto"===d?c-PI2$1:-d*RADIAN$2;var h=e.get("minAngle")*RADIAN$2+p,f=0;t.each(r,function(e){!isNaN(e)&&f++});var g=t.getSum(r),m=Math.PI/(g||f)*2,y=e.get("clockwise"),v=e.get("roseType"),_=e.get("stillShowZeroSum"),x=t.getDataExtent(r);x[0]=0;var S=y?1:-1,b=[c,d],T=S*p/2;normalizeArcAngles(b,!y),c=b[0],d=b[1];var A=getSeriesLayoutData(e);A.startAngle=c,A.endAngle=d,A.clockwise=y;var w=Math.abs(d-c),C=w,E=0,M=c;if(t.setLayout({viewRect:o,r:l}),t.each(r,function(e,n){var r;if(isNaN(e))t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:a,cy:s,r0:u,r:v?NaN:l});else{(r="area"!==v?0===g&&_?m:e*m:w/f)<h?(r=h,C-=h):E+=e;var o=M+S*r,i=0,c=0;p>r?c=i=M+S*r/2:(i=M+T,c=o-T),t.setItemLayout(n,{angle:r,startAngle:i,endAngle:c,clockwise:y,cx:a,cy:s,r0:u,r:v?linearMap$2(e,x,[u,l]):l}),M=o}}),C<PI2$1&&f)if(C<=.001){var I=w/f;t.each(r,function(e,n){if(!isNaN(e)){var r=t.getItemLayout(n);r.angle=I;var o=0,i=0;I<p?i=o=c+S*(n+.5)*I:(o=c+S*n*I+T,i=c+S*(n+1)*I-T),r.startAngle=o,r.endAngle=i}})}else m=C/E,M=c,t.each(r,function(e,n){if(!isNaN(e)){var r=t.getItemLayout(n),o=r.angle===h?h:e*m,i=0,a=0;o<p?a=i=M+S*o/2:(i=M+T,a=M+S*o-T),r.startAngle=i,r.endAngle=a,M+=S*o}})})}var getSeriesLayoutData=makeInner();function dataFilter$1(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(n&&n.length){var r=e.getData();r.filterSelf(function(e){for(var t=r.getName(e),o=0;o<n.length;o++)if(!n[o].isSelected(t))return!1;return!0})}}}}var RADIAN$1=Math.PI/180;function adjustSingleSide(e,t,n,r,o,i,a,s,l,u){if(!(e.length<2)){for(var c=e.length,d=0;d<c;d++)if("outer"===e[d].position&&"labelLine"===e[d].labelAlignTo){var p=e[d].label.x-u;e[d].linePoints[1][0]+=p,e[d].label.x=u}shiftLayoutOnY(e,l,l+a)&&function(e){for(var i={list:[],maxY:0},a={list:[],maxY:0},s=0;s<e.length;s++)if("none"===e[s].labelAlignTo){var l=e[s],u=l.label.y>n?a:i,c=Math.abs(l.label.y-n);if(c>=u.maxY){var d=l.label.x-t-l.len2*o,p=r+l.len,f=Math.abs(d)<p?Math.sqrt(c*c/(1-d*d/p/p)):p;u.rB=f,u.maxY=c}u.list.push(l)}h(i),h(a)}(e)}function h(e){for(var i=e.rB,a=i*i,s=0;s<e.list.length;s++){var l=e.list[s],u=Math.abs(l.label.y-n),c=r+l.len,d=c*c,p=Math.sqrt(Math.abs((1-u*u/a)*d)),h=t+(p+l.len2)*o,f=h-l.label.x;constrainTextWidth(l,l.targetTextWidth-f*o,!0),l.label.x=h}}}function avoidOverlap(e,t,n,r,o,i,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,d=-Number.MAX_VALUE,p=0;p<e.length;p++){var h=e[p].label;isPositionCenter(e[p])||(h.x<t?(c=Math.min(c,h.x),l.push(e[p])):(d=Math.max(d,h.x),u.push(e[p])))}for(p=0;p<e.length;p++){if(!isPositionCenter(m=e[p])&&m.linePoints){if(null!=m.labelStyleWidth)continue;h=m.label;var f=m.linePoints,g=void 0;g="edge"===m.labelAlignTo?h.x<t?f[2][0]-m.labelDistance-a-m.edgeDistance:a+o-m.edgeDistance-f[2][0]-m.labelDistance:"labelLine"===m.labelAlignTo?h.x<t?c-a-m.bleedMargin:a+o-d-m.bleedMargin:h.x<t?h.x-a-m.bleedMargin:a+o-h.x-m.bleedMargin,m.targetTextWidth=g,constrainTextWidth(m,g)}}adjustSingleSide(u,t,n,r,1,o,i,a,s,d),adjustSingleSide(l,t,n,r,-1,o,i,a,s,c);for(p=0;p<e.length;p++){var m;if(!isPositionCenter(m=e[p])&&m.linePoints){h=m.label,f=m.linePoints;var y="edge"===m.labelAlignTo,v=h.style.padding,_=v?v[1]+v[3]:0,x=h.style.backgroundColor?0:_,S=m.rect.width+x,b=f[1][0]-f[2][0];y?h.x<t?f[2][0]=a+m.edgeDistance+S+m.labelDistance:f[2][0]=a+o-m.edgeDistance-S-m.labelDistance:(h.x<t?f[2][0]=h.x+m.labelDistance:f[2][0]=h.x-m.labelDistance,f[1][0]=f[2][0]+b),f[1][1]=f[2][1]=h.y}}}function constrainTextWidth(e,t,n){if(void 0===n&&(n=!1),null==e.labelStyleWidth){var r=e.label,o=r.style,i=e.rect,a=o.backgroundColor,s=o.padding,l=s?s[1]+s[3]:0,u=o.overflow,c=i.width+(a?0:l);if(t<c||n){var d=i.height;if(u&&u.match("break")){r.setStyle("backgroundColor",null),r.setStyle("width",t-l);var p=r.getBoundingRect();r.setStyle("width",Math.ceil(p.width)),r.setStyle("backgroundColor",a)}else{var h=t-l,f=t<c?h:n?h>e.unconstrainedWidth?null:h:null;r.setStyle("width",f)}var g=r.getBoundingRect();i.width=g.width;var m=(r.style.margin||0)+2.1;i.height=g.height+m,i.y-=(i.height-d)/2}}}function isPositionCenter(e){return"center"===e.position}function pieLabelLayout(e){var t,n,r=e.getData(),o=[],i=!1,a=(e.get("minShowLabelAngle")||0)*RADIAN$1,s=r.getLayout("viewRect"),l=r.getLayout("r"),u=s.width,c=s.x,d=s.y,p=s.height;function h(e){e.ignore=!0}r.each(function(e){var s=r.getItemGraphicEl(e),d=s.shape,p=s.getTextContent(),f=s.getTextGuideLine(),g=r.getItemModel(e),m=g.getModel("label"),y=m.get("position")||g.get(["emphasis","label","position"]),v=m.get("distanceToLabelLine"),_=m.get("alignTo"),x=parsePercent(m.get("edgeDistance"),u),S=m.get("bleedMargin"),b=g.getModel("labelLine"),T=b.get("length");T=parsePercent(T,u);var A=b.get("length2");if(A=parsePercent(A,u),Math.abs(d.endAngle-d.startAngle)<a)return each$f(p.states,h),p.ignore=!0,void(f&&(each$f(f.states,h),f.ignore=!0));if(function(e){if(!e.ignore)return!0;for(var t in e.states)if(!1===e.states[t].ignore)return!0;return!1}(p)){var w,C,E,M,I=(d.startAngle+d.endAngle)/2,P=Math.cos(I),D=Math.sin(I);t=d.cx,n=d.cy;var k="inside"===y||"inner"===y;if("center"===y)w=d.cx,C=d.cy,M="center";else{var $=(k?(d.r+d.r0)/2*P:d.r*P)+t,R=(k?(d.r+d.r0)/2*D:d.r*D)+n;if(w=$+3*P,C=R+3*D,!k){var L=$+P*(T+l-d.r),O=R+D*(T+l-d.r),N=L+(P<0?-1:1)*A;w="edge"===_?P<0?c+x:c+u-x:N+(P<0?-v:v),C=O,E=[[$,R],[L,O],[N,O]]}M=k?"center":"edge"===_?P>0?"right":"left":P>0?"left":"right"}var B=Math.PI,V=0,F=m.get("rotate");if(isNumber(F))V=F*(B/180);else if("center"===y)V=0;else if("radial"===F||!0===F){V=P<0?-I+B:-I}else if("tangential"===F&&"outside"!==y&&"outer"!==y){var G=Math.atan2(P,D);G<0&&(G=2*B+G),D>0&&(G=B+G),V=G-B}if(i=!!V,p.x=w,p.y=C,p.rotation=V,p.setStyle({verticalAlign:"middle"}),k){p.setStyle({align:M});var H=p.states.select;H&&(H.x+=p.x,H.y+=p.y)}else{var z=p.getBoundingRect().clone();z.applyTransform(p.getComputedTransform());var U=(p.style.margin||0)+2.1;z.y-=U/2,z.height+=U,o.push({label:p,labelLine:f,position:y,len:T,len2:A,minTurnAngle:b.get("minTurnAngle"),maxSurfaceAngle:b.get("maxSurfaceAngle"),surfaceNormal:new Point(P,D),linePoints:E,textAlign:M,labelDistance:v,labelAlignTo:_,edgeDistance:x,bleedMargin:S,rect:z,unconstrainedWidth:z.width,labelStyleWidth:p.style.width})}s.setTextConfig({inside:k})}}),!i&&e.get("avoidLabelOverlap")&&avoidOverlap(o,t,n,l,u,p,c,d);for(var f=0;f<o.length;f++){var g=o[f],m=g.label,y=g.labelLine,v=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),v&&(each$f(m.states,h),m.ignore=!0);var _=m.states.select;_&&(_.x+=m.x,_.y+=m.y)}if(y){var x=g.linePoints;v||!x?(each$f(y.states,h),y.ignore=!0):(limitTurnAngle(x,g.minTurnAngle),limitSurfaceAngle(x,g.surfaceNormal,g.maxSurfaceAngle),y.setShape({points:x}),m.__hostTarget.textGuideLineConfig={anchor:new Point(x[0][0],x[0][1])})}}}var PiePiece=function(e){function t(t,n,r){var o=e.call(this)||this;o.z2=2;var i=new ZRText;return o.setTextContent(i),o.updateData(t,n,r,!0),o}return __extends(t,e),t.prototype.updateData=function(e,t,n,r){var o=this,i=e.hostModel,a=e.getItemModel(t),s=a.getModel("emphasis"),l=e.getItemLayout(t),u=extend$2(getSectorCornerRadius(a.getModel("itemStyle"),l,!0),l);if(isNaN(u.startAngle))o.setShape(u);else{if(r){o.setShape(u);var c=i.getShallow("animationType");i.ecModel.ssr?(initProps(o,{scaleX:0,scaleY:0},i,{dataIndex:t,isFrom:!0}),o.originX=u.cx,o.originY=u.cy):"scale"===c?(o.shape.r=l.r0,initProps(o,{shape:{r:l.r}},i,t)):null!=n?(o.setShape({startAngle:n,endAngle:n}),initProps(o,{shape:{startAngle:l.startAngle,endAngle:l.endAngle}},i,t)):(o.shape.endAngle=l.startAngle,updateProps$1(o,{shape:{endAngle:l.endAngle}},i,t))}else saveOldStyle(o),updateProps$1(o,{shape:u},i,t);o.useStyle(e.getItemVisual(t,"style")),setStatesStylesFromModel(o,a);var d=(l.startAngle+l.endAngle)/2,p=i.get("selectedOffset"),h=Math.cos(d)*p,f=Math.sin(d)*p,g=a.getShallow("cursor");g&&o.attr("cursor",g),this._updateLabel(i,e,t),o.ensureState("emphasis").shape=extend$2({r:l.r+(s.get("scale")&&s.get("scaleSize")||0)},getSectorCornerRadius(s.getModel("itemStyle"),l)),extend$2(o.ensureState("select"),{x:h,y:f,shape:getSectorCornerRadius(a.getModel(["select","itemStyle"]),l)}),extend$2(o.ensureState("blur"),{shape:getSectorCornerRadius(a.getModel(["blur","itemStyle"]),l)});var m=o.getTextGuideLine(),y=o.getTextContent();m&&extend$2(m.ensureState("select"),{x:h,y:f}),extend$2(y.ensureState("select"),{x:h,y:f}),toggleHoverEmphasis(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))}},t.prototype._updateLabel=function(e,t,n){var r=this,o=t.getItemModel(n),i=o.getModel("labelLine"),a=t.getItemVisual(n,"style"),s=a&&a.fill,l=a&&a.opacity;setLabelStyle(r,getLabelStatesModels(o),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:s,defaultOpacity:l,defaultText:e.getFormattedLabel(n,"normal")||t.getName(n)});var u=r.getTextContent();r.setTextConfig({position:null,rotation:null}),u.attr({z2:10});var c=e.get(["label","position"]);if("outside"!==c&&"outer"!==c)r.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new Polyline$1,this.setTextGuideLine(d)),setLabelLineStyle(this,getLabelLineStatesModels(o),{stroke:s,opacity:retrieve3(i.get(["lineStyle","opacity"]),l,1)})}},t}(Sector),PieView=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return __extends(t,e),t.prototype.render=function(e,t,n,r){var o,i=e.getData(),a=this._data,s=this.group;if(!a&&i.count()>0){for(var l=i.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u<i.count();++u)l=i.getItemLayout(u);l&&(o=l.startAngle)}if(this._emptyCircleSector&&s.remove(this._emptyCircleSector),0===i.count()&&e.get("showEmptyCircle")){var c=getSeriesLayoutData(e),d=new Sector({shape:extend$2(getBasicPieLayout(e,n),c)});d.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,s.add(d)}i.diff(a).add(function(e){var t=new PiePiece(i,e,o);i.setItemGraphicEl(e,t),s.add(t)}).update(function(e,t){var n=a.getItemGraphicEl(t);n.updateData(i,e,o),n.off("click"),s.add(n),i.setItemGraphicEl(e,n)}).remove(function(t){removeElementWithFadeOut(a.getItemGraphicEl(t),e,t)}).execute(),pieLabelLayout(e),"expansion"!==e.get("animationTypeUpdate")&&(this._data=i)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,o=e[1]-n.cy,i=Math.sqrt(r*r+o*o);return i<=n.r&&i>=n.r0}},t.type="pie",t}(ChartView);function createSeriesDataSimply(e,t,n){t=isArray$1(t)&&{coordDimensions:t}||extend$2({encodeDefine:e.getEncode()},t);var r=e.getSource(),o=prepareSeriesDataSchema(r,t).dimensions,i=new SeriesData(o,e);return i.initData(r,n),i}var LegendVisualProvider=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),innerData=makeInner(),PieSeriesModel=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new LegendVisualProvider(bind$1(this.getData,this),bind$1(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return createSeriesDataSimply(this,{coordDimensions:["value"],encodeDefaulter:curry$1(makeSeriesEncodeForNameBased,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=innerData(n),o=r.seats;if(!o){var i=[];n.each(n.mapDimension("value"),function(e){i.push(e)}),o=r.seats=getPercentSeats(i,n.hostModel.get("percentPrecision"))}var a=e.prototype.getDataParams.call(this,t);return a.percent=o[t]||0,a.$vars.push("percent"),a},t.prototype._defaultLabelLine=function(e){defaultEmphasis(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,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"},t}(SeriesModel);function negativeDataFilter(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension("value"),r=n.get(t,e);return!(isNumber(r)&&!isNaN(r)&&r<0)})}}}function install$Q(e){e.registerChartView(PieView),e.registerSeriesModel(PieSeriesModel),createLegacyDataSelectAction("pie",e.registerAction),e.registerLayout(curry$1(pieLayout,"pie")),e.registerProcessor(dataFilter$1("pie")),e.registerProcessor(negativeDataFilter("pie"))}var ScatterSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return __extends(t,e),t.prototype.getInitialData=function(e,t){return createSeriesData(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t}(SeriesModel),BOOST_SIZE_THRESHOLD=4,LargeSymbolPathShape=function(){},LargeSymbolPath=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return __extends(t,e),t.prototype.getDefaultShape=function(){return new LargeSymbolPathShape},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,t){var n,r=t.points,o=t.size,i=this.symbolProxy,a=i.shape,s=e.getContext?e.getContext():e,l=s&&o[0]<BOOST_SIZE_THRESHOLD,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n<r.length;){var c=r[n++],d=r[n++];isNaN(c)||isNaN(d)||(u&&!u.contain(c,d)||(a.x=c-o[0]/2,a.y=d-o[1]/2,a.width=o[0],a.height=o[1],i.buildPath(e,a,!0)))}this.incremental&&(this._off=n,this.notClear=!0)}},t.prototype.afterBrush=function(){var e,t=this.shape,n=t.points,r=t.size,o=this._ctx,i=this.softClipShape;if(o){for(e=this._off;e<n.length;){var a=n[e++],s=n[e++];isNaN(a)||isNaN(s)||(i&&!i.contain(a,s)||o.fillRect(a-r[0]/2,s-r[1]/2,r[0],r[1]))}this.incremental&&(this._off=e,this.notClear=!0)}},t.prototype.findDataIndex=function(e,t){for(var n=this.shape,r=n.points,o=n.size,i=Math.max(o[0],4),a=Math.max(o[1],4),s=r.length/2-1;s>=0;s--){var l=2*s,u=r[l]-i/2,c=r[l+1]-a/2;if(e>=u&&t>=c&&e<=u+i&&t<=c+a)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,o=r[0],i=r[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c<n.length;){var d=n[c++],p=n[c++];a=Math.min(d,a),l=Math.max(d,l),s=Math.min(p,s),u=Math.max(p,u)}e=this._rect=new BoundingRect(a-o/2,s-i/2,l-a+o,u-s+i)}return e},t}(Path),LargeSymbolDraw=function(){function e(){this.group=new Group$3}return e.prototype.updateData=function(e,t){this._clear();var n=this._create();n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,t)},e.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(e){if(null!=e.startIndex){var n=2*(e.endIndex-e.startIndex),r=4*e.startIndex*2;t=new Float32Array(t.buffer,r,n)}e.setShape("points",t),e.reset()})},e.prototype.incrementalPrepareUpdate=function(e){this._clear()},e.prototype.incrementalUpdate=function(e,t,n){var r=this._newAdded[0],o=t.getLayout("points"),i=r&&r.shape.points;if(i&&i.length<2e4){var a=i.length,s=new Float32Array(a+o.length);s.set(i),s.set(o,a),r.endIndex=e.end,r.setShape({points:s})}else{this._newAdded=[];var l=this._create();l.startIndex=e.start,l.endIndex=e.end,l.incremental=!0,l.setShape({points:o}),this._setCommon(l,t,n)}},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new LargeSymbolPath({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;n=n||{};var o=t.getVisual("symbolSize");e.setShape("size",o instanceof Array?o:[o,o]),e.softClipShape=n.clipShape||null,e.symbolProxy=createSymbol$1(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var i=e.shape.size[0]<BOOST_SIZE_THRESHOLD;e.useStyle(r.getModel("itemStyle").getItemStyle(i?["color","shadowBlur","shadowColor"]:["color"]));var a=t.getVisual("style"),s=a&&a.fill;s&&e.setColor(s);var l=getECData(e);l.seriesIndex=r.seriesIndex,e.on("mousemove",function(t){l.dataIndex=null;var n=e.hoverDataIdx;n>=0&&(l.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),ScatterView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),!this._finished||r.count()>1e4)return{update:!0};var o=pointsLayout("").reset(e,t,n);o.progress&&o.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(r)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var t=e.coordinateSystem;return t&&t.getArea&&t.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return n&&r===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=r?new LargeSymbolDraw:new SymbolDraw,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(ChartView),GridModel=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.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"},t}(ComponentModel),CartesianAxisModel=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",SINGLE_REFERRING).models[0]},t.type="cartesian2dAxis",t}(ComponentModel);mixin(CartesianAxisModel,AxisModelCommonMixin);var defaultOption$1={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,showMinLine:!0,showMaxLine:!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)"]}}},categoryAxis=merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},defaultOption$1),valueAxis=merge({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}}},defaultOption$1),timeAxis=merge({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},valueAxis),logAxis=defaults$2({logBase:10},valueAxis),axisDefault={category:categoryAxis,value:valueAxis,time:timeAxis,log:logAxis},AXIS_TYPES={value:1,category:1,time:1,log:1};function axisModelCreator(e,t,n,r){each$f(AXIS_TYPES,function(o,i){var a=merge(merge({},axisDefault[i],!0),r,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+i,n}return __extends(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=fetchLayoutMode(this),r=n?getLayoutParams(e):{};merge(e,t.getTheme().get(i+"Axis")),merge(e,this.getDefaultOption()),e.type=getAxisType(e),n&&mergeLayoutParam(e,r,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=OrdinalMeta.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+"Axis."+i,n.defaultOption=a,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",getAxisType)}function getAxisType(e){return e.type||(e.data?"category":"value")}var Cartesian=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return map$1(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),filter(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),cartesian2DDimensions=["x","y"];function canCalculateAffineTransform(e){return"interval"===e.type||"time"===e.type}var Cartesian2D=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=cartesian2DDimensions,t}return __extends(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(canCalculateAffineTransform(e)&&canCalculateAffineTransform(t)){var n=e.getExtent(),r=t.getExtent(),o=this.dataToPoint([n[0],r[0]]),i=this.dataToPoint([n[1],r[1]]),a=n[1]-n[0],s=r[1]-r[0];if(a&&s){var l=(i[0]-o[0])/a,u=(i[1]-o[1])/s,c=o[0]-n[0]*l,d=o[1]-r[0]*u,p=this._transform=[l,0,0,u,c,d];this._invTransform=invert([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),o=this.getArea(),i=new BoundingRect(n[0],n[1],r[0]-n[0],r[1]-n[1]);return o.intersect(i)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],o=e[1];if(this._transform&&null!=r&&isFinite(r)&&null!=o&&isFinite(o))return applyTransform$1(n,e,this._transform);var i=this.getAxis("x"),a=this.getAxis("y");return n[0]=i.toGlobalCoord(i.dataToCoord(r,t)),n[1]=a.toGlobalCoord(a.dataToCoord(o,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,o=n.getExtent(),i=r.getExtent(),a=n.parse(e[0]),s=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),a),Math.max(o[0],o[1])),t[1]=Math.min(Math.max(Math.min(i[0],i[1]),s),Math.max(i[0],i[1])),t},t.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return applyTransform$1(n,e,this._invTransform);var r=this.getAxis("x"),o=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=o.coordToData(o.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(e){e=e||0;var t=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),r=Math.min(t[0],t[1])-e,o=Math.min(n[0],n[1])-e,i=Math.max(t[0],t[1])-r+e,a=Math.max(n[0],n[1])-o+e;return new BoundingRect(r,o,i,a)},t}(Cartesian),Axis2D=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n,r)||this;return a.index=0,a.type=o||"value",a.position=i||"bottom",a}return __extends(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Axis);function layout$2(e,t,n){n=n||{};var r=e.coordinateSystem,o=t.axis,i={},a=o.getAxesOnZeroOf()[0],s=o.position,l=a?"onZero":s,u=o.dim,c=r.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],p={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,f="x"===u?[d[2]-h,d[3]+h]:[d[0]-h,d[1]+h];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[p.onZero]=Math.max(Math.min(g,f[1]),f[0])}i.position=["y"===u?f[p[l]]:d[0],"x"===u?f[p[l]]:d[3]],i.rotation=Math.PI/2*("x"===u?0:1);i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],i.labelOffset=a?f[p[s]]-f[p.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),retrieve(n.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var m=t.get(["axisLabel","rotate"]);return i.labelRotate="top"===l?-m:m,i.z2=1,i}function isCartesian2DSeries(e){return"cartesian2d"===e.get("coordinateSystem")}function findAxisModels(e){var t={xAxisModel:null,yAxisModel:null};return each$f(t,function(n,r){var o=r.replace(/Model$/,""),i=e.getReferringComponents(o,SINGLE_REFERRING).models[0];t[r]=i}),t}var mathLog=Math.log;function alignScaleTicks(e,t,n){var r=IntervalScale.prototype,o=r.getTicks.call(n),i=r.getTicks.call(n,!0),a=o.length-1,s=r.getInterval.call(n),l=getScaleExtent(e,t),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===e.type){var p=mathLog(e.base);u=[mathLog(u[0])/p,mathLog(u[1])/p]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var h=r.getExtent.call(e);c&&(u[0]=h[0]),d&&(u[1]=h[1]);var f=r.getInterval.call(e),g=u[0],m=u[1];if(c&&d)f=(m-g)/a;else if(c)for(m=u[0]+f*a;m<u[1]&&isFinite(m)&&isFinite(u[1]);)f=increaseInterval(f),m=u[0]+f*a;else if(d)for(g=u[1]-f*a;g>u[0]&&isFinite(g)&&isFinite(u[0]);)f=increaseInterval(f),g=u[1]-f*a;else{e.getTicks().length-1>a&&(f=increaseInterval(f));var y=f*a;(g=round$3((m=Math.ceil(u[1]/f)*f)-y))<0&&u[0]>=0?(g=0,m=round$3(y)):m>0&&u[1]<=0&&(m=0,g=-round$3(y))}var v=(o[0].value-i[0].value)/s,_=(o[a].value-i[a].value)/s;r.setExtent.call(e,g+f*v,m+f*_),r.setInterval.call(e,f),(v||_)&&r.setNiceExtent.call(e,g+f,m-f)}var Grid=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=cartesian2DDimensions,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function r(e){var t,n=keys(e),r=n.length;if(r){for(var o=[],i=r-1;i>=0;i--){var a=e[+n[i]],s=a.model,l=a.scale;isIntervalOrLogScale(l)&&s.get("alignTicks")&&null==s.get("interval")?o.push(a):(niceScaleExtent(l,s),isIntervalOrLogScale(l)&&(t=a))}o.length&&(t||niceScaleExtent((t=o.pop()).scale,t.model),each$f(o,function(e){alignScaleTicks(e.scale,e.model,t.scale)}))}}this._updateScale(e,this.model),r(n.x),r(n.y);var o={};each$f(n.x,function(e){fixAxisOnZero(n,"y",e,o)}),each$f(n.y,function(e){fixAxisOnZero(n,"x",e,o)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),o=!n&&e.get("containLabel"),i=getLayoutRect(r,{width:t.getWidth(),height:t.getHeight()});this._rect=i;var a=this._axesList;function s(){each$f(a,function(e){var t=e.isHorizontal(),n=t?[0,i.width]:[0,i.height],r=e.inverse?1:0;e.setExtent(n[r],n[1-r]),updateAxisTransform(e,t?i.x:i.y)})}s(),o&&(each$f(a,function(e){if(!e.model.get(["axisLabel","inside"])){var t=estimateLabelUnionRect(e);if(t){var n=e.isHorizontal()?"height":"width",r=e.model.get(["axisLabel","margin"]);i[n]-=t[n]+r,"top"===e.position?i.y+=t.height+r:"left"===e.position&&(i.x+=t.width+r)}}}),s()),each$f(this._coordsList,function(e){e.calcAffineTransform()})},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}isObject$3(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,o=this._coordsList;r<o.length;r++)if(o[r].getAxis("x").index===e||o[r].getAxis("y").index===t)return o[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t,n,r=e.seriesModel,o=e.xAxisModel||r&&r.getReferringComponents("xAxis",SINGLE_REFERRING).models[0],i=e.yAxisModel||r&&r.getReferringComponents("yAxis",SINGLE_REFERRING).models[0],a=e.gridModel,s=this._coordsList;if(r)indexOf(s,t=r.coordinateSystem)<0&&(t=null);else if(o&&i)t=this.getCartesian(o.componentIndex,i.componentIndex);else if(o)n=this.getAxis("x",o.componentIndex);else if(i)n=this.getAxis("y",i.componentIndex);else if(a){a.coordinateSystem===this&&(t=this._coordsList[0])}return{cartesian:t,axis:n}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,o=this,i={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};if(t.eachComponent("xAxis",l("x"),this),t.eachComponent("yAxis",l("y"),this),!s.x||!s.y)return this._axesMap={},void(this._axesList=[]);function l(t){return function(n,r){if(isAxisUsedInTheGrid(n,e)){var l=n.get("position");"x"===t?"top"!==l&&"bottom"!==l&&(l=i.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=i.left?"right":"left"),i[l]=!0;var u=new Axis2D(t,createScaleByModel$1(n),[0,0],n.get("type"),l),c="category"===u.type;u.onBand=c&&n.get("boundaryGap"),u.inverse=n.get("inverse"),n.axis=u,u.model=n,u.grid=o,u.index=r,o._axesList.push(u),a[t][r]=u,s[t]++}}}this._axesMap=a,each$f(a.x,function(t,n){each$f(a.y,function(o,i){var a="x"+n+"y"+i,s=new Cartesian2D(a);s.master=r,s.model=e,r._coordsMap[a]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(o)})})},e.prototype._updateScale=function(e,t){function n(e,t){each$f(getDataDimensionsOnAxis(e,t.dim),function(n){t.scale.unionExtentFromData(e,n)})}each$f(this._axesList,function(e){if(e.scale.setExtent(1/0,-1/0),"category"===e.type){var t=e.model.get("categorySortInfo");e.scale.setSortInfo(t)}}),e.eachSeries(function(e){if(isCartesian2DSeries(e)){var r=findAxisModels(e),o=r.xAxisModel,i=r.yAxisModel;if(!isAxisUsedInTheGrid(o,t)||!isAxisUsedInTheGrid(i,t))return;var a=this.getCartesian(o.componentIndex,i.componentIndex),s=e.getData(),l=a.getAxis("x"),u=a.getAxis("y");n(s,l),n(s,u)}},this)},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return each$f(this.getCartesians(),function(r){var o=null!=e&&"auto"!==e?r.getAxis(e):r.getBaseAxis(),i=r.getOtherAxis(o);indexOf(t,o)<0&&t.push(o),indexOf(n,i)<0&&n.push(i)}),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent("grid",function(o,i){var a=new e(o,t,n);a.name="grid_"+i,a.resize(o,n,!0),o.coordinateSystem=a,r.push(a)}),t.eachSeries(function(e){if(isCartesian2DSeries(e)){var t=findAxisModels(e),n=t.xAxisModel,r=t.yAxisModel,o=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=o.getCartesian(n.componentIndex,r.componentIndex)}}),r},e.dimensions=cartesian2DDimensions,e}();function isAxisUsedInTheGrid(e,t){return e.getCoordSysModel()===t}function fixAxisOnZero(e,t,n,r){n.getAxesOnZeroOf=function(){return o?[o]:[]};var o,i=e[t],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)canOnZeroToAxis(i[l])&&(o=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&canOnZeroToAxis(i[u])&&!r[c(i[u])]){o=i[u];break}o&&(r[c(o)]=!0)}function c(e){return e.dim+"_"+e.index}}function canOnZeroToAxis(e){return e&&"category"!==e.type&&"time"!==e.type&&ifAxisCrossZero(e)}function updateAxisTransform(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return r-e+t}}var PI$4=Math.PI,AxisBuilder=function(){function e(e,t){this.group=new Group$3,this.opt=t,this.axisModel=e,defaults$2(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Group$3({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!builders[e]},e.prototype.add=function(e){builders[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var r,o,i=remRadian(t-e);return isRadianAroundZero(i)?(o=n>0?"top":"bottom",r="center"):isRadianAroundZero(i-PI$4)?(o=n>0?"bottom":"top",r="center"):(o="middle",r=i>0&&i<PI$4?n>0?"right":"left":n>0?"left":"right"),{rotation:i,textAlign:r,textVerticalAlign:o}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),builders={axisLine:function(e,t,n,r){var o=t.get(["axisLine","show"]);if("auto"===o&&e.handleAutoShown&&(o=e.handleAutoShown("axisLine")),o){var i=t.axis.getExtent(),a=r.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];a&&(applyTransform$1(s,s,a),applyTransform$1(l,l,a));var c=extend$2({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new Line$1({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});subPixelOptimizeLine(d.shape,d.style.lineWidth),d.anid="line",n.add(d);var p=t.get(["axisLine","symbol"]);if(null!=p){var h=t.get(["axisLine","symbolSize"]);isString(p)&&(p=[p,p]),(isString(h)||isNumber(h))&&(h=[h,h]);var f=normalizeSymbolOffset(t.get(["axisLine","symbolOffset"])||0,h),g=h[0],m=h[1];each$f([{rotate:e.rotation+Math.PI/2,offset:f[0],r:0},{rotate:e.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(t,r){if("none"!==p[r]&&null!=p[r]){var o=createSymbol$1(p[r],-g/2,-m/2,g,m,c.stroke,!0),i=t.r+t.offset,a=u?l:s;o.attr({rotation:t.rotate,x:a[0]+i*Math.cos(e.rotation),y:a[1]-i*Math.sin(e.rotation),silent:!0,z2:11}),n.add(o)}})}}},axisTickLabel:function(e,t,n,r){var o=buildAxisMajorTicks(n,r,t,e),i=buildAxisLabel(n,r,t,e);(fixMinMaxLabelShow(t,i,o),buildAxisMinorTicks(n,r,t,e.tickDirection),t.get(["axisLabel","hideOverlap"]))&&hideOverlap(prepareLayoutList(map$1(i,function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}})))},axisName:function(e,t,n,r){var o=retrieve(e.axisName,t.get("name"));if(o){var i,a,s=t.get("nameLocation"),l=e.nameDirection,u=t.getModel("nameTextStyle"),c=t.get("nameGap")||0,d=t.axis.getExtent(),p=d[0]>d[1]?-1:1,h=["start"===s?d[0]-p*c:"end"===s?d[1]+p*c:(d[0]+d[1])/2,isNameLocationCenter(s)?e.labelOffset+l*c:0],f=t.get("nameRotate");null!=f&&(f=f*PI$4/180),isNameLocationCenter(s)?i=AxisBuilder.innerTextLayout(e.rotation,null!=f?f:e.rotation,l):(i=endTextLayout(e.rotation,s,f||0,d),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(i.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),m=t.get("nameTruncate",!0)||{},y=m.ellipsis,v=retrieve(e.nameTruncateMaxWidth,m.maxWidth,a),_=new ZRText({x:h[0],y:h[1],rotation:i.rotation,silent:AxisBuilder.isLabelSilent(t),style:createTextStyle$1(u,{text:o,font:g,overflow:"truncate",width:v,ellipsis:y,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||i.textAlign,verticalAlign:u.get("verticalAlign")||i.textVerticalAlign}),z2:1});if(setTooltipConfig({el:_,componentModel:t,itemName:o}),_.__fullText=o,_.anid="name",t.get("triggerEvent")){var x=AxisBuilder.makeAxisEventDataBase(t);x.targetType="axisName",x.name=o,getECData(_).eventData=x}r.add(_),_.updateTransform(),n.add(_),_.decomposeTransform()}}};function endTextLayout(e,t,n,r){var o,i,a=remRadian(n-e),s=r[0]>r[1],l="start"===t&&!s||"start"!==t&&s;return isRadianAroundZero(a-PI$4/2)?(i=l?"bottom":"top",o="center"):isRadianAroundZero(a-1.5*PI$4)?(i=l?"top":"bottom",o="center"):(i="middle",o=a<1.5*PI$4&&a>PI$4/2?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:o,textVerticalAlign:i}}function fixMinMaxLabelShow(e,t,n){if(!shouldShowAllLabels(e.axis)){var r=e.get(["axisLabel","showMinLabel"]),o=e.get(["axisLabel","showMaxLabel"]);n=n||[];var i=(t=t||[])[0],a=t[1],s=t[t.length-1],l=t[t.length-2],u=n[0],c=n[1],d=n[n.length-1],p=n[n.length-2];!1===r?(ignoreEl(i),ignoreEl(u)):isTwoLabelOverlapped(i,a)&&(r?(ignoreEl(a),ignoreEl(c)):(ignoreEl(i),ignoreEl(u))),!1===o?(ignoreEl(s),ignoreEl(d)):isTwoLabelOverlapped(l,s)&&(o?(ignoreEl(l),ignoreEl(p)):(ignoreEl(s),ignoreEl(d)))}}function ignoreEl(e){e&&(e.ignore=!0)}function isTwoLabelOverlapped(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var o=identity([]);return rotate(o,o,-e.rotation),n.applyTransform(mul([],o,e.getLocalTransform())),r.applyTransform(mul([],o,t.getLocalTransform())),n.intersect(r)}}function isNameLocationCenter(e){return"middle"===e||"center"===e}function createTicks(e,t,n,r,o){for(var i=[],a=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;a[0]=u,a[1]=0,s[0]=u,s[1]=n,t&&(applyTransform$1(a,a,t),applyTransform$1(s,s,t));var c=new Line$1({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});subPixelOptimizeLine(c.shape,c.style.lineWidth),c.anid=o+"_"+e[l].tickValue,i.push(c)}return i}function buildAxisMajorTicks(e,t,n,r){var o=n.axis,i=n.getModel("axisTick"),a=i.get("show");if("auto"===a&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick")),a&&!o.scale.isBlank()){for(var s=i.getModel("lineStyle"),l=r.tickDirection*i.get("length"),u=createTicks(o.getTicksCoords(),t.transform,l,defaults$2(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<u.length;c++)e.add(u[c]);return u}}function buildAxisMinorTicks(e,t,n,r){var o=n.axis,i=n.getModel("minorTick");if(i.get("show")&&!o.scale.isBlank()){var a=o.getMinorTicksCoords();if(a.length)for(var s=i.getModel("lineStyle"),l=r*i.get("length"),u=defaults$2(s.getLineStyle(),defaults$2(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),c=0;c<a.length;c++)for(var d=createTicks(a[c],t.transform,l,u,"minorticks_"+c),p=0;p<d.length;p++)e.add(d[p])}}function buildAxisLabel(e,t,n,r){var o=n.axis;if(retrieve(r.axisLabelShow,n.get(["axisLabel","show"]))&&!o.scale.isBlank()){var i=n.getModel("axisLabel"),a=i.get("margin"),s=o.getViewLabels(),l=(retrieve(r.labelRotate,i.get("rotate"))||0)*PI$4/180,u=AxisBuilder.innerTextLayout(r.rotation,l,r.labelDirection),c=n.getCategories&&n.getCategories(!0),d=[],p=AxisBuilder.isLabelSilent(n),h=n.get("triggerEvent");return each$f(s,function(l,f){var g="ordinal"===o.scale.type?o.scale.getRawOrdinalNumber(l.tickValue):l.tickValue,m=l.formattedLabel,y=l.rawLabel,v=i;if(c&&c[g]){var _=c[g];isObject$3(_)&&_.textStyle&&(v=new Model(_.textStyle,i,n.ecModel))}var x=v.getTextColor()||n.get(["axisLine","lineStyle","color"]),S=o.dataToCoord(g),b=v.getShallow("align",!0)||u.textAlign,T=retrieve2(v.getShallow("alignMinLabel",!0),b),A=retrieve2(v.getShallow("alignMaxLabel",!0),b),w=v.getShallow("verticalAlign",!0)||v.getShallow("baseline",!0)||u.textVerticalAlign,C=retrieve2(v.getShallow("verticalAlignMinLabel",!0),w),E=retrieve2(v.getShallow("verticalAlignMaxLabel",!0),w),M=new ZRText({x:S,y:r.labelOffset+r.labelDirection*a,rotation:u.rotation,silent:p,z2:10+(l.level||0),style:createTextStyle$1(v,{text:m,align:0===f?T:f===s.length-1?A:b,verticalAlign:0===f?C:f===s.length-1?E:w,fill:isFunction(x)?x("category"===o.type?y:"value"===o.type?g+"":g,f):x})});if(M.anid="label_"+g,setTooltipConfig({el:M,componentModel:n,itemName:m,formatterParamsExtra:{isTruncated:function(){return M.isTruncated},value:y,tickIndex:f}}),h){var I=AxisBuilder.makeAxisEventDataBase(n);I.targetType="axisLabel",I.value=y,I.tickIndex=f,"category"===o.type&&(I.dataIndex=g),getECData(M).eventData=I}t.add(M),M.updateTransform(),d.push(M),e.add(M),M.decomposeTransform()}),d}}function collect(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return collectAxesInfo(n,e,t),n.seriesInvolved&&collectSeriesInfo(n,e),n}function collectAxesInfo(e,t,n){var r=t.getComponent("tooltip"),o=t.getComponent("axisPointer"),i=o.get("link",!0)||[],a=[];each$f(n.getCoordinateSystems(),function(n){if(n.axisPointerEnabled){var s=makeKey(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var u=n.model.getModel("tooltip",r);if(each$f(n.getAxes(),curry$1(h,!1,null)),n.getTooltipAxes&&r&&u.get("show")){var c="axis"===u.get("trigger"),d="cross"===u.get(["axisPointer","type"]),p=n.getTooltipAxes(u.get(["axisPointer","axis"]));(c||d)&&each$f(p.baseAxes,curry$1(h,!d||"cross",c)),d&&each$f(p.otherAxes,curry$1(h,"cross",!1))}}function h(r,s,c){var d=c.model.getModel("axisPointer",o),p=d.get("show");if(p&&("auto"!==p||r||isHandleTrigger(d))){null==s&&(s=d.get("triggerTooltip"));var h=(d=r?makeAxisPointerModel(c,u,o,t,r,s):d).get("snap"),f=d.get("triggerEmphasis"),g=makeKey(c.model),m=s||h||"category"===c.type,y=e.axesInfo[g]={key:g,axis:c,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:f,involveSeries:m,snap:h,useHandle:isHandleTrigger(d),seriesModels:[],linkGroup:null};l[g]=y,e.seriesInvolved=e.seriesInvolved||m;var v=getLinkGroupIndex(i,c);if(null!=v){var _=a[v]||(a[v]={axesInfo:{}});_.axesInfo[g]=y,_.mapper=i[v].mapper,y.linkGroup=_}}}})}function makeAxisPointerModel(e,t,n,r,o,i){var a=t.getModel("axisPointer"),s={};each$f(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(e){s[e]=clone$6(a.get(e))}),s.snap="category"!==e.type&&!!i,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===o){var u=a.get(["label","show"]);if(l.show=null==u||u,!i){var c=s.lineStyle=a.get("crossStyle");c&&defaults$2(l,c.textStyle)}}return e.model.getModel("axisPointer",new Model(s,n,r))}function collectSeriesInfo(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get(["tooltip","trigger"],!0),o=t.get(["tooltip","show"],!0);n&&"none"!==r&&!1!==r&&"item"!==r&&!1!==o&&!1!==t.get(["axisPointer","show"],!0)&&each$f(e.coordSysAxesInfo[makeKey(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())})})}function getLinkGroupIndex(e,t){for(var n=t.model,r=t.dim,o=0;o<e.length;o++){var i=e[o]||{};if(checkPropInLink(i[r+"AxisId"],n.id)||checkPropInLink(i[r+"AxisIndex"],n.componentIndex)||checkPropInLink(i[r+"AxisName"],n.name))return o}}function checkPropInLink(e,t){return"all"===e||isArray$1(e)&&indexOf(e,t)>=0||e===t}function fixValue(e){var t=getAxisInfo$1(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,o=n.option,i=n.get("status"),a=n.get("value");null!=a&&(a=r.parse(a));var s=isHandleTrigger(n);null==i&&(o.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),o.value=a,s&&(o.status=t.axis.scale.isBlank()?"hide":"show")}}function getAxisInfo$1(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[makeKey(e)]}function getAxisPointerModel(e){var t=getAxisInfo$1(e);return t&&t.axisPointerModel}function isHandleTrigger(e){return!!e.get(["handle","show"])}function makeKey(e){return e.type+"||"+e.id}var axisPointerClazz={},AxisView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(t,n,r,o){this.axisPointerClass&&fixValue(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var o=t.getAxisPointerClass(this.axisPointerClass);if(o){var i=getAxisPointerModel(e);i?(this._axisPointer||(this._axisPointer=new o)).render(e,i,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){axisPointerClazz[e]=t},t.getAxisPointerClass=function(e){return e&&axisPointerClazz[e]},t.type="axis",t}(ComponentView),inner$f=makeInner();function rectCoordAxisBuildSplitArea(e,t,n,r){var o=n.axis;if(!o.scale.isBlank()){var i=n.getModel("splitArea"),a=i.getModel("areaStyle"),s=a.get("color"),l=r.coordinateSystem.getRect(),u=o.getTicksCoords({tickModel:i,clamp:!0});if(u.length){var c=s.length,d=inner$f(e).splitAreaColors,p=createHashMap(),h=0;if(d)for(var f=0;f<u.length;f++){var g=d.get(u[f].tickValue);if(null!=g){h=(g+(c-1)*f)%c;break}}var m=o.toGlobalCoord(u[0].coord),y=a.getAreaStyle();s=isArray$1(s)?s:[s];for(f=1;f<u.length;f++){var v=o.toGlobalCoord(u[f].coord),_=void 0,x=void 0,S=void 0,b=void 0;o.isHorizontal()?(_=m,x=l.y,S=v-_,b=l.height,m=_+S):(_=l.x,x=m,S=l.width,m=x+(b=v-x));var T=u[f-1].tickValue;null!=T&&p.set(T,h),t.add(new Rect$2({anid:null!=T?"area_"+T:null,shape:{x:_,y:x,width:S,height:b},style:defaults$2({fill:s[h]},y),autoBatch:!0,silent:!0})),h=(h+1)%c}inner$f(e).splitAreaColors=p}}}function rectCoordAxisHandleRemove(e){inner$f(e).splitAreaColors=null}var axisBuilderAttrs$3=["axisLine","axisTickLabel","axisName"],selfBuilderAttrs$2=["splitArea","splitLine","minorSplitLine"],CartesianAxisView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return __extends(t,e),t.prototype.render=function(t,n,r,o){this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new Group$3,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),s=layout$2(a,t),l=new AxisBuilder(t,extend$2({handleAutoShown:function(e){for(var n=a.coordinateSystem.getCartesians(),r=0;r<n.length;r++)if(isIntervalOrLogScale(n[r].getOtherAxis(t.axis).scale))return!0;return!1}},s));each$f(axisBuilderAttrs$3,l.add,l),this._axisGroup.add(l.getGroup()),each$f(selfBuilderAttrs$2,function(e){t.get([e,"show"])&&axisElementBuilders$2[e](this,this._axisGroup,t,a)},this),o&&"changeAxisOrder"===o.type&&o.isInitSort||groupTransition(i,this._axisGroup,t),e.prototype.render.call(this,t,n,r,o)}},t.prototype.remove=function(){rectCoordAxisHandleRemove(this)},t.type="cartesianAxis",t}(AxisView),axisElementBuilders$2={splitLine:function(e,t,n,r){var o=n.axis;if(!o.scale.isBlank()){var i=n.getModel("splitLine"),a=i.getModel("lineStyle"),s=a.get("color"),l=!1!==i.get("showMinLine"),u=!1!==i.get("showMaxLine");s=isArray$1(s)?s:[s];for(var c=r.coordinateSystem.getRect(),d=o.isHorizontal(),p=0,h=o.getTicksCoords({tickModel:i}),f=[],g=[],m=a.getLineStyle(),y=0;y<h.length;y++){var v=o.toGlobalCoord(h[y].coord);if((0!==y||l)&&(y!==h.length-1||u)){var _=h[y].tickValue;d?(f[0]=v,f[1]=c.y,g[0]=v,g[1]=c.y+c.height):(f[0]=c.x,f[1]=v,g[0]=c.x+c.width,g[1]=v);var x=p++%s.length,S=new Line$1({anid:null!=_?"line_"+_:null,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:g[0],y2:g[1]},style:defaults$2({stroke:s[x]},m),silent:!0});subPixelOptimizeLine(S.shape,m.lineWidth),t.add(S)}}}},minorSplitLine:function(e,t,n,r){var o=n.axis,i=n.getModel("minorSplitLine").getModel("lineStyle"),a=r.coordinateSystem.getRect(),s=o.isHorizontal(),l=o.getMinorTicksCoords();if(l.length)for(var u=[],c=[],d=i.getLineStyle(),p=0;p<l.length;p++)for(var h=0;h<l[p].length;h++){var f=o.toGlobalCoord(l[p][h].coord);s?(u[0]=f,u[1]=a.y,c[0]=f,c[1]=a.y+a.height):(u[0]=a.x,u[1]=f,c[0]=a.x+a.width,c[1]=f);var g=new Line$1({anid:"minor_line_"+l[p][h].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:d,silent:!0});subPixelOptimizeLine(g.shape,d.lineWidth),t.add(g)}},splitArea:function(e,t,n,r){rectCoordAxisBuildSplitArea(e,t,n,r)}},CartesianXAxisView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.type="xAxis",t}(CartesianAxisView),CartesianYAxisView=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=CartesianXAxisView.type,t}return __extends(t,e),t.type="yAxis",t}(CartesianAxisView),GridView=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return __extends(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new Rect$2({shape:e.coordinateSystem.getRect(),style:defaults$2({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(ComponentView),extraOption={offset:0};function install$P(e){e.registerComponentView(GridView),e.registerComponentModel(GridModel),e.registerCoordinateSystem("cartesian2d",Grid),axisModelCreator(e,"x",CartesianAxisModel,extraOption),axisModelCreator(e,"y",CartesianAxisModel,extraOption),e.registerComponentView(CartesianXAxisView),e.registerComponentView(CartesianYAxisView),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function install$O(e){use(install$P),e.registerSeriesModel(ScatterSeriesModel),e.registerChartView(ScatterView),e.registerLayout(pointsLayout("scatter"))}function radarLayout(e){e.eachSeriesByType("radar",function(e){var t=e.getData(),n=[],r=e.coordinateSystem;if(r){var o=r.getIndicatorAxes();each$f(o,function(e,i){t.each(t.mapDimension(o[i].dim),function(e,t){n[t]=n[t]||[];var o=r.dataToPoint(e,i);n[t][i]=isValidPoint(o)?o:getValueMissingPoint(r)})}),t.each(function(e){var o=find$2(n[e],function(e){return isValidPoint(e)})||getValueMissingPoint(r);n[e].push(o.slice()),t.setItemLayout(e,n[e])})}})}function isValidPoint(e){return!isNaN(e[0])&&!isNaN(e[1])}function getValueMissingPoint(e){return[e.cx,e.cy]}function radarBackwardCompat(e){var t=e.polar;if(t){isArray$1(t)||(t=[t]);var n=[];each$f(t,function(t,r){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],isArray$1(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):n.push(t)}),e.polar=n}each$f(e.series,function(e){e&&"radar"===e.type&&e.polarIndex&&(e.radarIndex=e.polarIndex)})}var RadarView$1=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(e,t,n){var r=e.coordinateSystem,o=this.group,i=e.getData(),a=this._data;function s(e,t){var n=e.getItemVisual(t,"symbol")||"circle";if("none"!==n){var r=normalizeSymbolSize(e.getItemVisual(t,"symbolSize")),o=createSymbol$1(n,-1,-1,2,2),i=e.getItemVisual(t,"symbolRotate")||0;return o.attr({style:{strokeNoScale:!0},z2:100,scaleX:r[0]/2,scaleY:r[1]/2,rotation:i*Math.PI/180||0}),o}}function l(t,n,r,o,i,a){r.removeAll();for(var l=0;l<n.length-1;l++){var u=s(o,i);u&&(u.__dimIdx=l,t[l]?(u.setPosition(t[l]),graphic$1[a?"initProps":"updateProps"](u,{x:n[l][0],y:n[l][1]},e,i)):u.setPosition(n[l]),r.add(u))}}function u(e){return map$1(e,function(e){return[r.cx,r.cy]})}i.diff(a).add(function(t){var n=i.getItemLayout(t);if(n){var r=new Polygon,o=new Polyline$1,a={shape:{points:n}};r.shape.points=u(n),o.shape.points=u(n),initProps(r,a,e,t),initProps(o,a,e,t);var s=new Group$3,c=new Group$3;s.add(o),s.add(r),s.add(c),l(o.shape.points,n,c,i,t,!0),i.setItemGraphicEl(t,s)}}).update(function(t,n){var r=a.getItemGraphicEl(n),o=r.childAt(0),s=r.childAt(1),u=r.childAt(2),c={shape:{points:i.getItemLayout(t)}};c.shape.points&&(l(o.shape.points,c.shape.points,u,i,t,!1),saveOldStyle(s),saveOldStyle(o),updateProps$1(o,c,e),updateProps$1(s,c,e),i.setItemGraphicEl(t,r))}).remove(function(e){o.remove(a.getItemGraphicEl(e))}).execute(),i.eachItemGraphicEl(function(e,t){var n=i.getItemModel(t),r=e.childAt(0),a=e.childAt(1),s=e.childAt(2),l=i.getItemVisual(t,"style"),u=l.fill;o.add(e),r.useStyle(defaults$2(n.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:u})),setStatesStylesFromModel(r,n,"lineStyle"),setStatesStylesFromModel(a,n,"areaStyle");var c=n.getModel("areaStyle"),d=c.isEmpty()&&c.parentModel.isEmpty();a.ignore=d,each$f(["emphasis","select","blur"],function(e){var t=n.getModel([e,"areaStyle"]),r=t.isEmpty()&&t.parentModel.isEmpty();a.ensureState(e).ignore=r&&d}),a.useStyle(defaults$2(c.getAreaStyle(),{fill:u,opacity:.7,decal:l.decal}));var p=n.getModel("emphasis"),h=p.getModel("itemStyle").getItemStyle();s.eachChild(function(e){if(e instanceof ZRImage){var r=e.style;e.useStyle(extend$2({image:r.image,x:r.x,y:r.y,width:r.width,height:r.height},l))}else e.useStyle(l),e.setColor(u),e.style.strokeNoScale=!0;e.ensureState("emphasis").style=clone$6(h);var o=i.getStore().get(i.getDimensionIndex(e.__dimIdx),t);(null==o||isNaN(o))&&(o=""),setLabelStyle(e,getLabelStatesModels(n),{labelFetcher:i.hostModel,labelDataIndex:t,labelDimIndex:e.__dimIdx,defaultText:o,inheritColor:u,defaultOpacity:l.opacity})}),toggleHoverEmphasis(e,p.get("focus"),p.get("blurScope"),p.get("disabled"))}),this._data=i},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t}(ChartView),RadarSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return __extends(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new LegendVisualProvider(bind$1(this.getData,this),bind$1(this.getRawData,this))},t.prototype.getInitialData=function(e,t){return createSeriesDataSimply(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),o=this.coordinateSystem.getIndicatorAxes(),i=this.getData().getName(e),a=""===i?this.name:i,s=retrieveVisualColorForTooltipMarker(this,e);return createTooltipMarkup("section",{header:a,sortBlocks:!0,blocks:map$1(o,function(t){var n=r.get(r.mapDimension(t.dim),e);return createTooltipMarkup("nameValue",{markerType:"subItem",markerColor:s,name:t.name,value:n,sortParam:n})})})},t.prototype.getTooltipPosition=function(e){if(null!=e)for(var t=this.getData(),n=this.coordinateSystem,r=t.getValues(map$1(n.dimensions,function(e){return t.mapDimension(e)}),e),o=0,i=r.length;o<i;o++)if(!isNaN(r[o])){var a=n.getIndicatorAxes();return n.coordToPoint(a[o].dataToCoord(r[o]),o)}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t}(SeriesModel),valueAxisDefault=axisDefault.value;function defaultsShow(e,t){return defaults$2({show:t},e)}var RadarModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.optionUpdated=function(){var e=this.get("boundaryGap"),t=this.get("splitNumber"),n=this.get("scale"),r=this.get("axisLine"),o=this.get("axisTick"),i=this.get("axisLabel"),a=this.get("axisName"),s=this.get(["axisName","show"]),l=this.get(["axisName","formatter"]),u=this.get("axisNameGap"),c=this.get("triggerEvent"),d=map$1(this.get("indicator")||[],function(d){null!=d.max&&d.max>0&&!d.min?d.min=0:null!=d.min&&d.min<0&&!d.max&&(d.max=0);var p=a;null!=d.color&&(p=defaults$2({color:d.color},a));var h=merge(clone$6(d),{boundaryGap:e,splitNumber:t,scale:n,axisLine:r,axisTick:o,axisLabel:i,name:d.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:p,triggerEvent:c},!1);if(isString(l)){var f=h.name;h.name=l.replace("{value}",null!=f?f:"")}else isFunction(l)&&(h.name=l(h.name,h));var g=new Model(h,null,this.ecModel);return mixin(g,AxisModelCommonMixin.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g},this);this._indicatorModels=d},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:merge({lineStyle:{color:"#bbb"}},valueAxisDefault.axisLine),axisLabel:defaultsShow(valueAxisDefault.axisLabel,!1),axisTick:defaultsShow(valueAxisDefault.axisTick,!1),splitLine:defaultsShow(valueAxisDefault.splitLine,!0),splitArea:defaultsShow(valueAxisDefault.splitArea,!0),indicator:[]},t}(ComponentModel),axisBuilderAttrs$2=["axisLine","axisTickLabel","axisName"],RadarView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(e,t,n){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var t=e.coordinateSystem;each$f(map$1(t.getIndicatorAxes(),function(e){var n=e.model.get("showName")?e.name:"";return new AxisBuilder(e.model,{axisName:n,position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(e){each$f(axisBuilderAttrs$2,e.add,e),this.group.add(e.getGroup())},this)},t.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(n.length){var r=e.get("shape"),o=e.getModel("splitLine"),i=e.getModel("splitArea"),a=o.getModel("lineStyle"),s=i.getModel("areaStyle"),l=o.get("show"),u=i.get("show"),c=a.get("color"),d=s.get("color"),p=isArray$1(c)?c:[c],h=isArray$1(d)?d:[d],f=[],g=[];if("circle"===r)for(var m=n[0].getTicksCoords(),y=t.cx,v=t.cy,_=0;_<m.length;_++){if(l)f[E(f,p,_)].push(new Circle({shape:{cx:y,cy:v,r:m[_].coord}}));if(u&&_<m.length-1)g[E(g,h,_)].push(new Ring({shape:{cx:y,cy:v,r0:m[_].coord,r:m[_+1].coord}}))}else{var x,S=map$1(n,function(e,n){var r=e.getTicksCoords();return x=null==x?r.length-1:Math.min(r.length-1,x),map$1(r,function(e){return t.coordToPoint(e.coord,n)})}),b=[];for(_=0;_<=x;_++){for(var T=[],A=0;A<n.length;A++)T.push(S[A][_]);if(T[0]&&T.push(T[0].slice()),l)f[E(f,p,_)].push(new Polyline$1({shape:{points:T}}));if(u&&b)g[E(g,h,_-1)].push(new Polygon({shape:{points:T.concat(b)}}));b=T.slice().reverse()}}var w=a.getLineStyle(),C=s.getAreaStyle();each$f(g,function(e,t){this.group.add(mergePath(e,{style:defaults$2({stroke:"none",fill:h[t%h.length]},C),silent:!0}))},this),each$f(f,function(e,t){this.group.add(mergePath(e,{style:defaults$2({fill:"none",stroke:p[t%p.length]},w),silent:!0}))},this)}function E(e,t,n){var r=n%t.length;return e[r]=e[r]||[],r}},t.type="radar",t}(ComponentView),IndicatorAxis=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o.type="value",o.angle=0,o.name="",o}return __extends(t,e),t}(Axis),Radar=function(){function e(e,t,n){this.dimensions=[],this._model=e,this._indicatorAxes=map$1(e.getIndicatorModels(),function(e,t){var n="indicator_"+t,r=new IndicatorAxis(n,new IntervalScale);return r.name=e.get("name"),r.model=e,e.axis=r,this.dimensions.push(n),r},this),this.resize(e,n)}return e.prototype.getIndicatorAxes=function(){return this._indicatorAxes},e.prototype.dataToPoint=function(e,t){var n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)},e.prototype.coordToPoint=function(e,t){var n=this._indicatorAxes[t].angle;return[this.cx+e*Math.cos(n),this.cy-e*Math.sin(n)]},e.prototype.pointToData=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,r=Math.sqrt(t*t+n*n);t/=r,n/=r;for(var o,i=Math.atan2(-n,t),a=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],c=Math.abs(i-u.angle);c<a&&(o=u,s=l,a=c)}return[s,+(o&&o.coordToData(r))]},e.prototype.resize=function(e,t){var n=e.get("center"),r=t.getWidth(),o=t.getHeight(),i=Math.min(r,o)/2;this.cx=parsePercent(n[0],r),this.cy=parsePercent(n[1],o),this.startAngle=e.get("startAngle")*Math.PI/180;var a=e.get("radius");(isString(a)||isNumber(a))&&(a=[0,a]),this.r0=parsePercent(a[0],i),this.r=parsePercent(a[1],i),each$f(this._indicatorAxes,function(e,t){e.setExtent(this.r0,this.r);var n=this.startAngle+t*Math.PI*2/this._indicatorAxes.length;n=Math.atan2(Math.sin(n),Math.cos(n)),e.angle=n},this)},e.prototype.update=function(e,t){var n=this._indicatorAxes,r=this._model;each$f(n,function(e){e.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(t,o){if("radar"===t.get("coordinateSystem")&&e.getComponent("radar",t.get("radarIndex"))===r){var i=t.getData();each$f(n,function(e){e.scale.unionExtentFromData(i,i.mapDimension(e.dim))})}},this);var o=r.get("splitNumber"),i=new IntervalScale;i.setExtent(0,o),i.setInterval(1),each$f(n,function(e,t){alignScaleTicks(e.scale,e.model,i)})},e.prototype.convertToPixel=function(e,t,n){return console.warn("Not implemented."),null},e.prototype.convertFromPixel=function(e,t,n){return console.warn("Not implemented."),null},e.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},e.create=function(t,n){var r=[];return t.eachComponent("radar",function(o){var i=new e(o,t,n);r.push(i),o.coordinateSystem=i}),t.eachSeriesByType("radar",function(e){"radar"===e.get("coordinateSystem")&&(e.coordinateSystem=r[e.get("radarIndex")||0])}),r},e.dimensions=[],e}();function install$N(e){e.registerCoordinateSystem("radar",Radar),e.registerComponentModel(RadarModel),e.registerComponentView(RadarView),e.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(e){t.setItemVisual(e,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}function install$M(e){use(install$N),e.registerChartView(RadarView$1),e.registerSeriesModel(RadarSeriesModel),e.registerLayout(radarLayout),e.registerProcessor(dataFilter$1("radar")),e.registerPreprocessor(radarBackwardCompat)}var ATTR="\0_ec_interaction_mutex";function take(e,t,n){getStore(e)[t]=n}function release(e,t,n){var r=getStore(e);r[t]===n&&(r[t]=null)}function isTaken(e,t){return!!getStore(e)[t]}function getStore(e){return e[ATTR]||(e[ATTR]={})}registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},noop);var RoamController=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=bind$1(n._mousedownHandler,n),o=bind$1(n._mousemoveHandler,n),i=bind$1(n._mouseupHandler,n),a=bind$1(n._mousewheelHandler,n),s=bind$1(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=defaults$2(clone$6(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",r),t.on("mousemove",o),t.on("mouseup",i)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",a),t.on("pinch",s))},n.disable=function(){t.off("mousedown",r),t.off("mousemove",o),t.off("mouseup",i),t.off("mousewheel",a),t.off("pinch",s)},n}return __extends(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!isMiddleOrRightButtonOnMouseUpDown(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this.pointerChecker&&this.pointerChecker(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(this._dragging&&isAvailableBehavior("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!isTaken(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,r=this._x,o=this._y,i=t-r,a=n-o;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&stop(e.event),trigger$1(this,"pan","moveOnMouseMove",e,{dx:i,dy:a,oldX:r,oldY:o,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){isMiddleOrRightButtonOnMouseUpDown(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=isAvailableBehavior("zoomOnMouseWheel",e,this._opt),n=isAvailableBehavior("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,o=Math.abs(r),i=e.offsetX,a=e.offsetY;if(0!==r&&(t||n)){if(t){var s=o>3?1.4:o>1?1.2:1.1;checkPointerAndTrigger(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:i,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(r);checkPointerAndTrigger(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:i,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){isTaken(this._zr,"globalPan")||checkPointerAndTrigger(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(Eventful);function checkPointerAndTrigger(e,t,n,r,o){e.pointerChecker&&e.pointerChecker(r,o.originX,o.originY)&&(stop(r.event),trigger$1(e,t,n,r,o))}function trigger$1(e,t,n,r,o){o.isAvailableBehavior=bind$1(isAvailableBehavior,null,n,r),e.trigger(t,o)}function isAvailableBehavior(e,t,n){var r=n[e];return!e||r&&(!isString(r)||t.event[r+"Key"])}function updateViewOnPan(e,t,n){var r=e.target;r.x+=t,r.y+=n,r.dirty()}function updateViewOnZoom(e,t,n,r){var o=e.target,i=e.zoomLimit,a=e.zoom=e.zoom||1;if(a*=t,i){var s=i.min||0,l=i.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/e.zoom;e.zoom=a,o.x-=(n-o.x)*(u-1),o.y-=(r-o.y)*(u-1),o.scaleX*=u,o.scaleY*=u,o.dirty()}var IRRELEVANT_EXCLUDES={axisPointer:1,tooltip:1,brush:1},nodeParsers;function onIrrelevantElement(e,t,n){var r=t.getComponentByElement(e.topTarget),o=r&&r.coordinateSystem;return r&&r!==n&&!IRRELEVANT_EXCLUDES.hasOwnProperty(r.mainType)&&o&&o.model!==n}function parseXML(e){isString(e)&&(e=(new DOMParser).parseFromString(e,"text/xml"));var t=e;for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}var INHERITABLE_STYLE_ATTRIBUTES_MAP={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS=keys(INHERITABLE_STYLE_ATTRIBUTES_MAP),SELF_STYLE_ATTRIBUTES_MAP={"alignment-baseline":"textBaseline","stop-color":"stopColor"},SELF_STYLE_ATTRIBUTES_MAP_KEYS=keys(SELF_STYLE_ATTRIBUTES_MAP),SVGParser=function(){function e(){this._defs={},this._root=null}return e.prototype.parse=function(e,t){t=t||{};var n=parseXML(e);this._defsUsePending=[];var r=new Group$3;this._root=r;var o=[],i=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||t.width),s=parseFloat(n.getAttribute("height")||t.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),parseAttributes(n,r,null,!0,!1);for(var l,u,c=n.firstChild;c;)this._parseNode(c,r,o,null,!1,!1),c=c.nextSibling;if(applyDefs(this._defs,this._defsUsePending),this._defsUsePending=[],i){var d=splitNumberSequence(i);d.length>=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&null!=a&&null!=s&&(u=makeViewBoxTransform(l,{x:0,y:0,width:a,height:s}),!t.ignoreViewBox)){var p=r;(r=new Group$3).add(p),p.scaleX=p.scaleY=u.scale,p.x=u.x,p.y=u.y}return t.ignoreRootClip||null==a||null==s||r.setClipPath(new Rect$2({shape:{x:0,y:0,width:a,height:s}})),{root:r,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:o}},e.prototype._parseNode=function(e,t,n,r,o,i){var a,s=e.nodeName.toLowerCase(),l=r;if("defs"===s&&(o=!0),"text"===s&&(i=!0),"defs"===s||"switch"===s)a=t;else{if(!o){var u=nodeParsers[s];if(u&&hasOwn(nodeParsers,s)){a=u.call(this,e,t);var c=e.getAttribute("name");if(c){var d={name:c,namedFrom:null,svgNodeTagLower:s,el:a};n.push(d),"g"===s&&(l=d)}else r&&n.push({name:r.name,namedFrom:r,svgNodeTagLower:s,el:a});t.add(a)}}var p=paintServerParsers[s];if(p&&hasOwn(paintServerParsers,s)){var h=p.call(this,e),f=e.getAttribute("id");f&&(this._defs[f]=h)}}if(a&&a.isGroup)for(var g=e.firstChild;g;)1===g.nodeType?this._parseNode(g,a,n,l,o,i):3===g.nodeType&&i&&this._parseText(g,a),g=g.nextSibling},e.prototype._parseText=function(e,t){var n=new TSpan({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});inheritStyle(t,n),parseAttributes(e,n,this._defsUsePending,!1,!1),applyTextAlignment(n,t);var r=n.style,o=r.fontSize;o&&o<9&&(r.fontSize=9,n.scaleX*=o/9,n.scaleY*=o/9);var i=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+"px",r.fontFamily||"sans-serif"].join(" ");r.font=i;var a=n.getBoundingRect();return this._textX+=a.width,t.add(n),n},e.internalField=void(nodeParsers={g:function(e,t){var n=new Group$3;return inheritStyle(t,n),parseAttributes(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new Rect$2;return inheritStyle(t,n),parseAttributes(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,t){var n=new Circle;return inheritStyle(t,n),parseAttributes(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,t){var n=new Line$1;return inheritStyle(t,n),parseAttributes(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,t){var n=new Ellipse;return inheritStyle(t,n),parseAttributes(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,t){var n,r=e.getAttribute("points");r&&(n=parsePoints(r));var o=new Polygon({shape:{points:n||[]},silent:!0});return inheritStyle(t,o),parseAttributes(e,o,this._defsUsePending,!1,!1),o},polyline:function(e,t){var n,r=e.getAttribute("points");r&&(n=parsePoints(r));var o=new Polyline$1({shape:{points:n||[]},silent:!0});return inheritStyle(t,o),parseAttributes(e,o,this._defsUsePending,!1,!1),o},image:function(e,t){var n=new ZRImage;return inheritStyle(t,n),parseAttributes(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute("x")||"0",r=e.getAttribute("y")||"0",o=e.getAttribute("dx")||"0",i=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(o),this._textY=parseFloat(r)+parseFloat(i);var a=new Group$3;return inheritStyle(t,a),parseAttributes(e,a,this._defsUsePending,!1,!0),a},tspan:function(e,t){var n=e.getAttribute("x"),r=e.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=r&&(this._textY=parseFloat(r));var o=e.getAttribute("dx")||"0",i=e.getAttribute("dy")||"0",a=new Group$3;return inheritStyle(t,a),parseAttributes(e,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(o),this._textY+=parseFloat(i),a},path:function(e,t){var n=createFromString(e.getAttribute("d")||"");return inheritStyle(t,n),parseAttributes(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),e}(),paintServerParsers={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||"0",10),n=parseInt(e.getAttribute("y1")||"0",10),r=parseInt(e.getAttribute("x2")||"10",10),o=parseInt(e.getAttribute("y2")||"0",10),i=new LinearGradient(t,n,r,o);return parsePaintServerUnit(e,i),parseGradientColorStops(e,i),i},radialgradient:function(e){var t=parseInt(e.getAttribute("cx")||"0",10),n=parseInt(e.getAttribute("cy")||"0",10),r=parseInt(e.getAttribute("r")||"0",10),o=new RadialGradient(t,n,r);return parsePaintServerUnit(e,o),parseGradientColorStops(e,o),o}};function parsePaintServerUnit(e,t){"userSpaceOnUse"===e.getAttribute("gradientUnits")&&(t.global=!0)}function parseGradientColorStops(e,t){for(var n=e.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var r=n.getAttribute("offset"),o=void 0;o=r&&r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var i={};parseInlineStyle(n,i,i);var a=i.stopColor||n.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:o,color:a})}n=n.nextSibling}}function inheritStyle(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),defaults$2(t.__inheritedStyle,e.__inheritedStyle))}function parsePoints(e){for(var t=splitNumberSequence(e),n=[],r=0;r<t.length;r+=2){var o=parseFloat(t[r]),i=parseFloat(t[r+1]);n.push([o,i])}return n}function parseAttributes(e,t,n,r,o){var i=t,a=i.__inheritedStyle=i.__inheritedStyle||{},s={};1===e.nodeType&&(parseTransformAttribute(e,t),parseInlineStyle(e,a,s),r||parseAttributeStyle(e,a,s)),i.style=i.style||{},null!=a.fill&&(i.style.fill=getFillStrokeStyle(i,"fill",a.fill,n)),null!=a.stroke&&(i.style.stroke=getFillStrokeStyle(i,"stroke",a.stroke,n)),each$f(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(e){null!=a[e]&&(i.style[e]=parseFloat(a[e]))}),each$f(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(e){null!=a[e]&&(i.style[e]=a[e])}),o&&(i.__selfStyle=s),a.lineDash&&(i.style.lineDash=map$1(splitNumberSequence(a.lineDash),function(e){return parseFloat(e)})),"hidden"!==a.visibility&&"collapse"!==a.visibility||(i.invisible=!0),"none"===a.display&&(i.ignore=!0)}function applyTextAlignment(e,t){var n=t.__selfStyle;if(n){var r=n.textBaseline,o=r;r&&"auto"!==r?"baseline"===r?o="alphabetic":"before-edge"===r||"text-before-edge"===r?o="top":"after-edge"===r||"text-after-edge"===r?o="bottom":"central"!==r&&"mathematical"!==r||(o="middle"):o="alphabetic",e.style.textBaseline=o}var i=t.__inheritedStyle;if(i){var a=i.textAlign,s=a;a&&("middle"===a&&(s="center"),e.style.textAlign=s)}}var urlRegex=/^url\(\s*#(.*?)\)/;function getFillStrokeStyle(e,t,n,r){var o=n&&n.match(urlRegex);if(!o)return"none"===n&&(n=null),n;var i=trim$1(o[1]);r.push([e,t,i])}function applyDefs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r[0].style[r[1]]=e[r[2]]}}var numberReg=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function splitNumberSequence(e){return e.match(numberReg)||[]}var transformRegex=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,DEGREE_TO_ANGLE=Math.PI/180;function parseTransformAttribute(e,t){var n=e.getAttribute("transform");if(n){n=n.replace(/,/g," ");var r=[],o=null;n.replace(transformRegex,function(e,t,n){return r.push(t,n),""});for(var i=r.length-1;i>0;i-=2){var a=r[i],s=r[i-1],l=splitNumberSequence(a);switch(o=o||create$1(),s){case"translate":translate(o,o,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":scale$1(o,o,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":rotate(o,o,-parseFloat(l[0])*DEGREE_TO_ANGLE,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":mul(o,[1,0,Math.tan(parseFloat(l[0])*DEGREE_TO_ANGLE),1,0,0],o);break;case"skewY":mul(o,[1,Math.tan(parseFloat(l[0])*DEGREE_TO_ANGLE),0,1,0,0],o);break;case"matrix":o[0]=parseFloat(l[0]),o[1]=parseFloat(l[1]),o[2]=parseFloat(l[2]),o[3]=parseFloat(l[3]),o[4]=parseFloat(l[4]),o[5]=parseFloat(l[5])}}t.setLocalTransform(o)}}var styleRegex=/([^\s:;]+)\s*:\s*([^:;]+)/g;function parseInlineStyle(e,t,n){var r,o=e.getAttribute("style");if(o)for(styleRegex.lastIndex=0;null!=(r=styleRegex.exec(o));){var i=r[1],a=hasOwn(INHERITABLE_STYLE_ATTRIBUTES_MAP,i)?INHERITABLE_STYLE_ATTRIBUTES_MAP[i]:null;a&&(t[a]=r[2]);var s=hasOwn(SELF_STYLE_ATTRIBUTES_MAP,i)?SELF_STYLE_ATTRIBUTES_MAP[i]:null;s&&(n[s]=r[2])}}function parseAttributeStyle(e,t,n){for(var r=0;r<INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS.length;r++){var o=INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS[r];null!=(i=e.getAttribute(o))&&(t[INHERITABLE_STYLE_ATTRIBUTES_MAP[o]]=i)}for(r=0;r<SELF_STYLE_ATTRIBUTES_MAP_KEYS.length;r++){var i;o=SELF_STYLE_ATTRIBUTES_MAP_KEYS[r];null!=(i=e.getAttribute(o))&&(n[SELF_STYLE_ATTRIBUTES_MAP[o]]=i)}}function makeViewBoxTransform(e,t){var n=t.width/e.width,r=t.height/e.height,o=Math.min(n,r);return{scale:o,x:-(e.x+e.width/2)*o+(t.x+t.width/2),y:-(e.y+e.height/2)*o+(t.y+t.height/2)}}function parseSVG(e,t){return(new SVGParser).parse(e,t)}var REGION_AVAILABLE_SVG_TAG_MAP=createHashMap(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),GeoSVGResource=function(){function t(e,t){this.type="geoSVG",this._usedGraphicMap=createHashMap(),this._freedGraphics=[],this._mapName=e,this._parsedXML=parseXML(t)}return t.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=createRegions(e.named),n=t.regions,r=t.regionsMap;this._regions=n,this._regionsMap=r}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},t.prototype._buildGraphic=function(t){var n,r;try{assert(null!=(r=(n=t&&parseSVG(t,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root))}catch(e){throw new Error("Invalid svg format\n"+e.message)}var o=new Group$3;o.add(r),o.isGeoSVGGraphicRoot=!0;var i=n.width,a=n.height,s=n.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,d=void 0,p=void 0;if(null!=i?(u=0,d=i):s&&(u=s.x,d=s.width),null!=a?(c=0,p=a):s&&(c=s.y,p=s.height),null==u||null==c){var h=r.getBoundingRect();null==u&&(u=h.x,d=h.width),null==c&&(c=h.y,p=h.height)}l=this._boundingRect=new BoundingRect(u,c,d,p)}if(s){var f=makeViewBoxTransform(s,l);r.scaleX=r.scaleY=f.scale,r.x=f.x,r.y=f.y}o.setClipPath(new Rect$2({shape:l.plain()}));var g=[];return each$f(n.named,function(e){null!=REGION_AVAILABLE_SVG_TAG_MAP.get(e.svgNodeTagLower)&&(g.push(e),setSilent(e.el))}),{root:o,boundingRect:l,named:g}},t.prototype.useGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,n),n)},t.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);n&&(t.removeKey(e),this._freedGraphics.push(n))},t}();function setSilent(e){e.silent=!1,e.isGroup&&e.traverse(function(e){e.silent=!1})}function createRegions(e){var t=[],n=createHashMap();return each$f(e,function(e){if(null==e.namedFrom){var r=new GeoSVGRegion(e.name,e.el);t.push(r),n.set(e.name,r)}}),{regions:t,regionsMap:n}}for(var geoCoord=[126,25],nanhaiName="南海诸岛",points$1=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],i=0;i<points$1.length;i++)for(var k=0;k<points$1[i].length;k++)points$1[i][k][0]/=10.5,points$1[i][k][1]/=-14,points$1[i][k][0]+=geoCoord[0],points$1[i][k][1]+=geoCoord[1];function fixNanhai(e,t){if("china"===e){for(var n=0;n<t.length;n++)if(t[n].name===nanhaiName)return;t.push(new GeoJSONRegion(nanhaiName,map$1(points$1,function(e){return{type:"polygon",exterior:e}}),geoCoord))}}var coordsOffsetMap={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};function fixTextCoords(e,t){if("china"===e){var n=coordsOffsetMap[t.name];if(n){var r=t.getCenter();r[0]+=n[0]/10.5,r[1]+=-n[1]/14,t.setCenter(r)}}}var points=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function fixDiaoyuIsland(e,t){"china"===e&&"台湾"===t.name&&t.geometries.push({type:"polygon",exterior:points[0]})}var DEFAULT_NAME_PROPERTY="name",GeoJSONResource=function(){function t(e,t,n){this.type="geoJSON",this._parsedMap=createHashMap(),this._mapName=e,this._specialAreas=n,this._geoJSON=parseInput(t)}return t.prototype.load=function(e,t){t=t||DEFAULT_NAME_PROPERTY;var n=this._parsedMap.get(t);if(!n){var r=this._parseToRegions(t);n=this._parsedMap.set(t,{regions:r,boundingRect:calculateBoundingRect(r)})}var o=createHashMap(),i=[];return each$f(n.regions,function(t){var n=t.name;e&&hasOwn(e,n)&&(t=t.cloneShallow(n=e[n])),i.push(t),o.set(n,t)}),{regions:i,boundingRect:n.boundingRect||new BoundingRect(0,0,0,0),regionsMap:o}},t.prototype._parseToRegions=function(t){var n,r=this._mapName,o=this._geoJSON;try{n=o?parseGeoJSON(o,t):[]}catch(e){throw new Error("Invalid geoJson format\n"+e.message)}return fixNanhai(r,n),each$f(n,function(e){var t=e.name;fixTextCoords(r,e),fixDiaoyuIsland(r,e);var n=this._specialAreas&&this._specialAreas[t];n&&e.transformTo(n.left,n.top,n.width,n.height)},this),n},t.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},t}();function calculateBoundingRect(e){for(var t,n=0;n<e.length;n++){var r=e[n].getBoundingRect();(t=t||r.clone()).union(r)}return t}function parseInput(e){return isString(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e}var storage=createHashMap(),geoSourceManager={registerMap:function(e,t,n){if(t.svg){var r=new GeoSVGResource(e,t.svg);storage.set(e,r)}else{var o=t.geoJson||t.geoJSON;o&&!t.features?n=t.specialAreas:o=t;r=new GeoJSONResource(e,o,n);storage.set(e,r)}},getGeoResource:function(e){return storage.get(e)},getMapForUser:function(e){var t=storage.get(e);return t&&"geoJSON"===t.type&&t.getMapForUser()},load:function(e,t,n){var r=storage.get(e);if(r)return r.load(t,n)}},OPTION_STYLE_ENABLED_TAGS=["rect","circle","line","ellipse","polygon","polyline","path"],OPTION_STYLE_ENABLED_TAG_MAP=createHashMap(OPTION_STYLE_ENABLED_TAGS),STATE_TRIGGER_TAG_MAP=createHashMap(OPTION_STYLE_ENABLED_TAGS.concat(["g"])),LABEL_HOST_MAP=createHashMap(OPTION_STYLE_ENABLED_TAGS.concat(["g"])),mapLabelRaw=makeInner();function getFixedItemStyle(e){var t=e.getItemStyle(),n=e.get("areaColor");return null!=n&&(t.fill=n),t}function fixLineStyle(e){var t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var MapDraw=function(){function e(e){var t=new Group$3;this.uid=getUID("ec_map_draw"),this._controller=new RoamController(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new Group$3),t.add(this._svgGroup=new Group$3)}return e.prototype.draw=function(e,t,n,r,o){var i="geo"===e.mainType,a=e.getData&&e.getData();i&&t.eachComponent({mainType:"series",subType:"map"},function(t){a||t.getHostGeoModel()!==e||(a=t.getData())});var s=e.coordinateSystem,l=this._regionsGroup,u=this.group,c=s.getTransformInfo(),d=c.raw,p=c.roam;!l.childAt(0)||o?(u.x=p.x,u.y=p.y,u.scaleX=p.scaleX,u.scaleY=p.scaleY,u.dirty()):updateProps$1(u,p,e);var h=a&&a.getVisual("visualMeta")&&a.getVisual("visualMeta").length>0,f={api:n,geo:s,mapOrGeoModel:e,data:a,isVisualEncodedByVisualMap:h,isGeo:i,transformInfoRaw:d};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(e,t,n),this._updateMapSelectHandler(e,l,n,r)},e.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=createHashMap(),n=createHashMap(),r=this._regionsGroup,o=e.transformInfoRaw,i=e.mapOrGeoModel,a=e.data,s=e.geo.projection,l=s&&s.stream;function u(e,t){return t&&(e=t(e)),e&&[e[0]*o.scaleX+o.x,e[1]*o.scaleY+o.y]}function c(e){for(var t=[],n=!l&&s&&s.project,r=0;r<e.length;++r){var o=u(e[r],n);o&&t.push(o)}return t}function d(e){return{shape:{points:c(e)}}}r.removeAll(),each$f(e.geo.regions,function(o){var c=o.name,p=t.get(c),h=n.get(c)||{},f=h.dataIdx,g=h.regionModel;if(!p){p=t.set(c,new Group$3),r.add(p),f=a?a.indexOfName(c):null;var m=(g=e.isGeo?i.getRegionModel(c):a?a.getItemModel(f):null).get("silent",!0);null!=m&&(p.silent=m),n.set(c,{dataIdx:f,regionModel:g})}var y=[],v=[];each$f(o.geometries,function(e){if("polygon"===e.type){var t=[e.exterior].concat(e.interiors||[]);l&&(t=projectPolys(t,l)),each$f(t,function(e){y.push(new Polygon(d(e)))})}else{var n=e.points;l&&(n=projectPolys(n,l,!0)),each$f(n,function(e){v.push(new Polyline$1(d(e)))})}});var _=u(o.getCenter(),s&&s.project);function x(t,n){if(t.length){var r=new CompoundPath({culling:!0,segmentIgnoreThreshold:1,shape:{paths:t}});p.add(r),applyOptionStyleForRegion(e,r,f,g),resetLabelForRegion(e,r,c,g,i,f,_),n&&(fixLineStyle(r),each$f(r.states,fixLineStyle))}}x(y),x(v,!0)}),t.each(function(t,r){var o=n.get(r),a=o.dataIdx,s=o.regionModel;resetEventTriggerForRegion(e,t,r,s,i,a),resetTooltipForRegion(e,t,r,s,i),resetStateTriggerForRegion(e,t,r,s,i)},this)},e.prototype._buildSVG=function(e){var t=e.geo.map,n=e.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var r=this._svgDispatcherMap=createHashMap(),o=!1;each$f(this._svgGraphicRecord.named,function(t){var n=t.name,i=e.mapOrGeoModel,a=e.data,s=t.svgNodeTagLower,l=t.el,u=a?a.indexOfName(n):null,c=i.getRegionModel(n);null!=OPTION_STYLE_ENABLED_TAG_MAP.get(s)&&l instanceof Displayable&&applyOptionStyleForRegion(e,l,u,c),l instanceof Displayable&&(l.culling=!0);var d=c.get("silent",!0);(null!=d&&(l.silent=d),l.z2EmphasisLift=0,t.namedFrom)||(null!=LABEL_HOST_MAP.get(s)&&resetLabelForRegion(e,l,n,c,i,u,null),resetEventTriggerForRegion(e,l,n,c,i,u),resetTooltipForRegion(e,l,n,c,i),null!=STATE_TRIGGER_TAG_MAP.get(s)&&("self"===resetStateTriggerForRegion(e,l,n,c,i)&&(o=!0),(r.get(n)||r.set(n,[])).push(l)))},this),this._enableBlurEntireSVG(o,e)},e.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var n=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle().opacity;this._svgGraphicRecord.root.traverse(function(e){if(!e.isGroup){setDefaultStateProxy(e);var t=e.ensureState("blur").style||{};null==t.opacity&&null!=n&&(t.opacity=n),e.ensureState("emphasis")}})}},e.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},e.prototype.findHighDownDispatchers=function(e,t){if(null==e)return[];var n=t.coordinateSystem;if("geoJSON"===n.resourceType){var r=this._regionsGroupByName;if(r){var o=r.get(e);return o?[o]:[]}}else if("geoSVG"===n.resourceType)return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},e.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},e.prototype._useSVG=function(e){var t=geoSourceManager.getGeoResource(e);if(t&&"geoSVG"===t.type){var n=t.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=e}},e.prototype._freeSVG=function(){var e=this._svgMapName;if(null!=e){var t=geoSourceManager.getGeoResource(e);t&&"geoSVG"===t.type&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},e.prototype._updateController=function(e,t,n){var r=e.coordinateSystem,o=this._controller,i=this._controllerHost;i.zoomLimit=e.get("scaleLimit"),i.zoom=r.getZoom(),o.enable(e.get("roam")||!1);var a=e.mainType;function s(){var t={type:"geoRoam",componentType:a};return t[a+"Id"]=e.id,t}o.off("pan").on("pan",function(e){this._mouseDownFlag=!1,updateViewOnPan(i,e.dx,e.dy),n.dispatchAction(extend$2(s(),{dx:e.dx,dy:e.dy,animation:{duration:0}}))},this),o.off("zoom").on("zoom",function(e){this._mouseDownFlag=!1,updateViewOnZoom(i,e.scale,e.originX,e.originY),n.dispatchAction(extend$2(s(),{totalZoom:i.zoom,zoom:e.scale,originX:e.originX,originY:e.originY,animation:{duration:0}}))},this),o.setPointerChecker(function(t,o,i){return r.containPoint([o,i])&&!onIrrelevantElement(t,n,e)})},e.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=mapLabelRaw(t).ignore)})},e.prototype._updateMapSelectHandler=function(e,t,n,r){var o=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){o._mouseDownFlag=!0}),t.on("click",function(e){o._mouseDownFlag&&(o._mouseDownFlag=!1)}))},e}();function applyOptionStyleForRegion(e,t,n,r){var o=r.getModel("itemStyle"),i=r.getModel(["emphasis","itemStyle"]),a=r.getModel(["blur","itemStyle"]),s=r.getModel(["select","itemStyle"]),l=getFixedItemStyle(o),u=getFixedItemStyle(i),c=getFixedItemStyle(s),d=getFixedItemStyle(a),p=e.data;if(p){var h=p.getItemVisual(n,"style"),f=p.getItemVisual(n,"decal");e.isVisualEncodedByVisualMap&&h.fill&&(l.fill=h.fill),f&&(l.decal=createOrUpdatePatternFromDecal(f,e.api))}t.setStyle(l),t.style.strokeNoScale=!0,t.ensureState("emphasis").style=u,t.ensureState("select").style=c,t.ensureState("blur").style=d,setDefaultStateProxy(t)}function resetLabelForRegion(e,t,n,r,o,i,a){var s=e.data,l=e.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),i)),c=s&&s.getItemLayout(i);if(l||u||c&&c.showLabel){var d=l?n:i,p=void 0;(!s||i>=0)&&(p=o);var h=a?{normal:{align:"center",verticalAlign:"middle"}}:null;setLabelStyle(t,getLabelStatesModels(r),{labelFetcher:p,labelDataIndex:d,defaultText:n},h);var f=t.getTextContent();if(f&&(mapLabelRaw(f).ignore=f.ignore,t.textConfig&&a)){var g=t.getBoundingRect().clone();t.textConfig.layoutRect=g,t.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function resetEventTriggerForRegion(e,t,n,r,o,i){e.data?e.data.setItemGraphicEl(i,t):getECData(t).eventData={componentType:"geo",componentIndex:o.componentIndex,geoIndex:o.componentIndex,name:n,region:r&&r.option||{}}}function resetTooltipForRegion(e,t,n,r,o){e.data||setTooltipConfig({el:t,componentModel:o,itemName:n,itemTooltipOption:r.get("tooltip")})}function resetStateTriggerForRegion(e,t,n,r,o){t.highDownSilentOnTouch=!!o.get("selectedMode");var i=r.getModel("emphasis"),a=i.get("focus");return toggleHoverEmphasis(t,a,i.get("blurScope"),i.get("disabled")),e.isGeo&&enableComponentHighDownFeatures(t,o,n),a}function projectPolys(e,t,n){var r,o=[];function i(){r=[]}function a(){r.length&&(o.push(r),r=[])}var s=t({polygonStart:i,polygonEnd:a,lineStart:i,lineEnd:a,point:function(e,t){isFinite(e)&&isFinite(t)&&r.push([e,t])},sphere:function(){}});return!n&&s.polygonStart(),each$f(e,function(e){s.lineStart();for(var t=0;t<e.length;t++)s.point(e[t][0],e[t][1]);s.lineEnd()}),!n&&s.polygonEnd(),o}var MapView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(e,t,n,r){if(!r||"mapToggleSelect"!==r.type||r.from!==this.uid){var o=this.group;if(o.removeAll(),!e.getHostGeoModel()){if(this._mapDraw&&r&&"geoRoam"===r.type&&this._mapDraw.resetForLabelLayout(),r&&"geoRoam"===r.type&&"series"===r.componentType&&r.seriesId===e.id)(i=this._mapDraw)&&o.add(i.group);else if(e.needsDrawMap){var i=this._mapDraw||new MapDraw(n);o.add(i.group),i.draw(e,t,n,this,r),this._mapDraw=i}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&t.getComponent("legend")&&this._renderSymbols(e,t,n)}}},t.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e,t,n){var r=e.originalData,o=this.group;r.each(r.mapDimension("value"),function(t,n){if(!isNaN(t)){var i=r.getItemLayout(n);if(i&&i.point){var a=i.point,s=i.offset,l=new Circle({style:{fill:e.getData().getVisual("style").fill},shape:{cx:a[0]+9*s,cy:a[1],r:3},silent:!0,z2:8+(s?0:Z2_EMPHASIS_LIFT+1)});if(!s){var u=e.mainSeries.getData(),c=r.getName(n),d=u.indexOfName(c),p=r.getItemModel(n),h=p.getModel("label"),f=u.getItemGraphicEl(d);setLabelStyle(l,getLabelStatesModels(p),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(d,n)}},defaultText:c}),l.disableLabelAnimation=!0,h.get("position")||l.setTextConfig({position:"bottom"}),f.onHoverStateChange=function(e){setStatesFlag(l,e)}}o.add(l)}}})},t.type="map",t}(ChartView),MapSeries=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.needsDrawMap=!1,n.seriesGroup=[],n.getTooltipPosition=function(e){if(null!=e){var t=this.getData().getName(e),n=this.coordinateSystem,r=n.getRegion(t);return r&&n.dataToPoint(r.getCenter())}},n}return __extends(t,e),t.prototype.getInitialData=function(e){for(var t=createSeriesDataSimply(this,{coordDimensions:["value"],encodeDefaulter:curry$1(makeSeriesEncodeForNameBased,this)}),n=createHashMap(),r=[],o=0,i=t.count();o<i;o++){var a=t.getName(o);n.set(a,o)}return each$f(geoSourceManager.load(this.getMapType(),this.option.nameMap,this.option.nameProperty).regions,function(e){var o,i=e.name,a=n.get(i),s=e.properties&&e.properties.echartsStyle;null==a?(o={name:i},r.push(o)):o=t.getRawDataItem(a),s&&merge(o,s)}),t.appendData(r),t},t.prototype.getHostGeoModel=function(){var e=this.option.geoIndex;return null!=e?this.ecModel.getComponent("geo",e):null},t.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},t.prototype.getRawValue=function(e){var t=this.getData();return t.get(t.mapDimension("value"),e)},t.prototype.getRegionModel=function(e){var t=this.getData();return t.getItemModel(t.indexOfName(e))},t.prototype.formatTooltip=function(e,t,n){for(var r=this.getData(),o=this.getRawValue(e),i=r.getName(e),a=this.seriesGroup,s=[],l=0;l<a.length;l++){var u=a[l].originalData.indexOfName(i),c=r.mapDimension("value");isNaN(a[l].originalData.get(c,u))||s.push(a[l].name)}return createTooltipMarkup("section",{header:s.join(", "),noHeader:!s.length,blocks:[createTooltipMarkup("nameValue",{name:i,value:o})]})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.getLegendIcon=function(e){var t=e.icon||"roundRect",n=createSymbol$1(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill);return n.setStyle(e.itemStyle),n.style.stroke="none",t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},t}(SeriesModel);function dataStatistics(e,t){var n={};return each$f(e,function(e){e.each(e.mapDimension("value"),function(t,r){var o="ec-"+e.getName(r);n[o]=n[o]||[],isNaN(t)||n[o].push(t)})}),e[0].map(e[0].mapDimension("value"),function(r,o){for(var i,a="ec-"+e[0].getName(o),s=0,l=1/0,u=-1/0,c=n[a].length,d=0;d<c;d++)l=Math.min(l,n[a][d]),u=Math.max(u,n[a][d]),s+=n[a][d];return i="min"===t?l:"max"===t?u:"average"===t?s/c:s,0===c?NaN:i})}function mapDataStatistic(e){var t={};e.eachSeriesByType("map",function(e){var n=e.getHostGeoModel(),r=n?"o"+n.id:"i"+e.getMapType();(t[r]=t[r]||[]).push(e)}),each$f(t,function(e,t){for(var n=dataStatistics(map$1(e,function(e){return e.getData()}),e[0].get("mapValueCalculation")),r=0;r<e.length;r++)e[r].originalData=e[r].getData();for(r=0;r<e.length;r++)e[r].seriesGroup=e,e[r].needsDrawMap=0===r&&!e[r].getHostGeoModel(),e[r].setData(n.cloneShallow()),e[r].mainSeries=e[0]})}function mapSymbolLayout(e){var t={};e.eachSeriesByType("map",function(n){var r=n.getMapType();if(!n.getHostGeoModel()&&!t[r]){var o={};each$f(n.seriesGroup,function(t){var n=t.coordinateSystem,r=t.originalData;t.get("showLegendSymbol")&&e.getComponent("legend")&&r.each(r.mapDimension("value"),function(e,t){var i=r.getName(t),a=n.getRegion(i);if(a&&!isNaN(e)){var s=o[i]||0,l=n.dataToPoint(a.getCenter());o[i]=s+1,r.setItemLayout(t,{point:l,offset:s})}})});var i=n.getData();i.each(function(e){var t=i.getName(e),n=i.getItemLayout(e)||{};n.showLabel=!o[t],i.setItemLayout(e,n)}),t[r]=!0}})}var v2ApplyTransform=applyTransform$1,View=function(e){function t(t){var n=e.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new Transformable,n._rawTransformable=new Transformable,n.name=t,n}return __extends(t,e),t.prototype.setBoundingRect=function(e,t,n,r){return this._rect=new BoundingRect(e,t,n,r),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(e,t,n,r){this._transformTo(e,t,n,r),this._viewRect=new BoundingRect(e,t,n,r)},t.prototype._transformTo=function(e,t,n,r){var o=this.getBoundingRect(),i=this._rawTransformable;i.transform=o.calculateTransform(new BoundingRect(e,t,n,r));var a=i.parent;i.parent=null,i.decomposeTransform(),i.parent=a,this._updateTransform()},t.prototype.setCenter=function(e,t){e&&(this._center=[parsePercent(e[0],t.getWidth()),parsePercent(e[1],t.getHeight())],this._updateCenterAndZoom())},t.prototype.setZoom=function(e){e=e||1;var t=this.zoomLimit;t&&(null!=t.max&&(e=Math.min(t.max,e)),null!=t.min&&(e=Math.max(t.min,e))),this._zoom=e,this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var e=this.getBoundingRect();return[e.x+e.width/2,e.y+e.height/2]},t.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},t.prototype.getZoom=function(){return this._zoom||1},t.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},t.prototype._updateCenterAndZoom=function(){var e=this._rawTransformable.getLocalTransform(),t=this._roamTransformable,n=this.getDefaultCenter(),r=this.getCenter(),o=this.getZoom();r=applyTransform$1([],r,e),n=applyTransform$1([],n,e),t.originX=r[0],t.originY=r[1],t.x=n[0]-r[0],t.y=n[1]-r[1],t.scaleX=t.scaleY=o,this._updateTransform()},t.prototype._updateTransform=function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),copy(this.transform||(this.transform=[]),t.transform||create$1()),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],invert(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var e=this._rawTransformable,t=this._roamTransformable,n=new Transformable;return n.transform=t.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},t.prototype.dataToPoint=function(e,t,n){var r=t?this._rawTransform:this.transform;return n=n||[],r?v2ApplyTransform(n,e,r):copy$1(n,e)},t.prototype.pointToData=function(e){var t=this.invTransform;return t?v2ApplyTransform([],e,t):[e[0],e[1]]},t.prototype.convertToPixel=function(e,t,n){var r=getCoordSys$4(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=getCoordSys$4(t);return r===this?r.pointToData(n):null},t.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},t.dimensions=["x","y"],t}(Transformable);function getCoordSys$4(e){var t=e.seriesModel;return t?t.coordinateSystem:null}var GEO_DEFAULT_PARAMS={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},geo2DDimensions=["lng","lat"],Geo=function(e){function t(t,n,r){var o=e.call(this,t)||this;o.dimensions=geo2DDimensions,o.type="geo",o._nameCoordMap=createHashMap(),o.map=n;var i=r.projection,a=geoSourceManager.load(n,r.nameMap,r.nameProperty),s=geoSourceManager.getGeoResource(n);o.resourceType=s?s.type:null;var l,u=o.regions=a.regions,c=GEO_DEFAULT_PARAMS[s.type];if(o._regionsMap=a.regionsMap,o.regions=a.regions,o.projection=i,i)for(var d=0;d<u.length;d++){var p=u[d].getBoundingRect(i);(l=l||p.clone()).union(p)}else l=a.boundingRect;return o.setBoundingRect(l.x,l.y,l.width,l.height),o.aspectScale=i?1:retrieve2(r.aspectScale,c.aspectScale),o._invertLongitute=!i&&c.invertLongitute,o}return __extends(t,e),t.prototype._transformTo=function(e,t,n,r){var o=this.getBoundingRect(),i=this._invertLongitute;o=o.clone(),i&&(o.y=-o.y-o.height);var a=this._rawTransformable;a.transform=o.calculateTransform(new BoundingRect(e,t,n,r));var s=a.parent;a.parent=null,a.decomposeTransform(),a.parent=s,i&&(a.scaleY=-a.scaleY),this._updateTransform()},t.prototype.getRegion=function(e){return this._regionsMap.get(e)},t.prototype.getRegionByCoord=function(e){for(var t=this.regions,n=0;n<t.length;n++){var r=t[n];if("geoJSON"===r.type&&r.contain(e))return t[n]}},t.prototype.addGeoCoord=function(e,t){this._nameCoordMap.set(e,t)},t.prototype.getGeoCoord=function(e){var t=this._regionsMap.get(e);return this._nameCoordMap.get(e)||t&&t.getCenter()},t.prototype.dataToPoint=function(e,t,n){if(isString(e)&&(e=this.getGeoCoord(e)),e){var r=this.projection;return r&&(e=r.project(e)),e&&this.projectedToPoint(e,t,n)}},t.prototype.pointToData=function(e){var t=this.projection;return t&&(e=t.unproject(e)),e&&this.pointToProjected(e)},t.prototype.pointToProjected=function(t){return e.prototype.pointToData.call(this,t)},t.prototype.projectedToPoint=function(t,n,r){return e.prototype.dataToPoint.call(this,t,n,r)},t.prototype.convertToPixel=function(e,t,n){var r=getCoordSys$3(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=getCoordSys$3(t);return r===this?r.pointToData(n):null},t}(View);function getCoordSys$3(e){var t=e.geoModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem||(n.getReferringComponents("geo",SINGLE_REFERRING).models[0]||{}).coordinateSystem:null}function resizeGeo(e,t){var n=e.get("boundingCoords");if(null!=n){var r=n[0],o=n[1];if(isFinite(r[0])&&isFinite(r[1])&&isFinite(o[0])&&isFinite(o[1])){var i=this.projection;if(i){var a=r[0],s=r[1],l=o[0],u=o[1];r=[1/0,1/0],o=[-1/0,-1/0];var c=function(e,t,n,a){for(var s=n-e,l=a-t,u=0;u<=100;u++){var c=u/100,d=i.project([e+s*c,t+l*c]);min$1(r,r,d),max$1(o,o,d)}};c(a,s,l,s),c(l,s,l,u),c(l,u,a,u),c(a,u,l,s)}this.setBoundingRect(r[0],r[1],o[0]-r[0],o[1]-r[1])}else;}var d,p,h,f=this.getBoundingRect(),g=e.get("layoutCenter"),m=e.get("layoutSize"),y=t.getWidth(),v=t.getHeight(),_=f.width/f.height*this.aspectScale,x=!1;if(g&&m&&(d=[parsePercent(g[0],y),parsePercent(g[1],v)],p=parsePercent(m,Math.min(y,v)),isNaN(d[0])||isNaN(d[1])||isNaN(p)||(x=!0)),x)h={},_>1?(h.width=p,h.height=p/_):(h.height=p,h.width=p*_),h.y=d[1]-h.height/2,h.x=d[0]-h.width/2;else{var S=e.getBoxLayoutParams();S.aspect=_,h=getLayoutRect(S,{width:y,height:v})}this.setViewRect(h.x,h.y,h.width,h.height),this.setCenter(e.get("center"),t),this.setZoom(e.get("zoom"))}function setGeoCoords(e,t){each$f(t.get("geoCoord"),function(t,n){e.addGeoCoord(n,t)})}mixin(Geo,View);var GeoCreator=function(){function e(){this.dimensions=geo2DDimensions}return e.prototype.create=function(e,t){var n=[];function r(e){return{nameProperty:e.get("nameProperty"),aspectScale:e.get("aspectScale"),projection:e.get("projection")}}e.eachComponent("geo",function(e,o){var i=e.get("map"),a=new Geo(i+o,i,extend$2({nameMap:e.get("nameMap")},r(e)));a.zoomLimit=e.get("scaleLimit"),n.push(a),e.coordinateSystem=a,a.model=e,a.resize=resizeGeo,a.resize(e,t)}),e.eachSeries(function(e){if("geo"===e.get("coordinateSystem")){var t=e.get("geoIndex")||0;e.coordinateSystem=n[t]}});var o={};return e.eachSeriesByType("map",function(e){if(!e.getHostGeoModel()){var t=e.getMapType();o[t]=o[t]||[],o[t].push(e)}}),each$f(o,function(e,o){var i=map$1(e,function(e){return e.get("nameMap")}),a=new Geo(o,o,extend$2({nameMap:mergeAll(i)},r(e[0])));a.zoomLimit=retrieve.apply(null,map$1(e,function(e){return e.get("scaleLimit")})),n.push(a),a.resize=resizeGeo,a.resize(e[0],t),each$f(e,function(e){e.coordinateSystem=a,setGeoCoords(a,e)})}),n},e.prototype.getFilledRegions=function(e,t,n,r){for(var o=(e||[]).slice(),i=createHashMap(),a=0;a<o.length;a++)i.set(o[a].name,o[a]);return each$f(geoSourceManager.load(t,n,r).regions,function(e){var t=e.name,n=i.get(t),r=e.properties&&e.properties.echartsStyle;n||(n={name:t},o.push(n)),r&&merge(n,r)}),o},e}(),geoCreator=new GeoCreator,GeoModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.init=function(e,t,n){var r=geoSourceManager.getGeoResource(e.map);if(r&&"geoJSON"===r.type){var o=e.itemStyle=e.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(e,n),defaultEmphasis(e,"label",["show"])},t.prototype.optionUpdated=function(){var e=this,t=this.option;t.regions=geoCreator.getFilledRegions(t.regions,t.map,t.nameMap,t.nameProperty);var n={};this._optionModelMap=reduce(t.regions||[],function(t,r){var o=r.name;return o&&(t.set(o,new Model(r,e,e.ecModel)),r.selected&&(n[o]=!0)),t},createHashMap()),t.selectedMap||(t.selectedMap=n)},t.prototype.getRegionModel=function(e){return this._optionModelMap.get(e)||new Model(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(e,t){var n=this.getRegionModel(e),r="normal"===t?n.get(["label","formatter"]):n.get(["emphasis","label","formatter"]),o={name:e};return isFunction(r)?(o.status=t,r(o)):isString(r)?r.replace("{a}",null!=e?e:""):void 0},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.select=function(e){var t=this.option,n=t.selectedMode;n&&("multiple"!==n&&(t.selectedMap=null),(t.selectedMap||(t.selectedMap={}))[e]=!0)},t.prototype.unSelect=function(e){var t=this.option.selectedMap;t&&(t[e]=!1)},t.prototype.toggleSelected=function(e){this[this.isSelected(e)?"unSelect":"select"](e)},t.prototype.isSelected=function(e){var t=this.option.selectedMap;return!(!t||!t[e])},t.type="geo",t.layoutMode="box",t.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},t}(ComponentModel);function getCenterCoord(e,t){return e.pointToProjected?e.pointToProjected(t):e.pointToData(t)}function updateCenterAndZoom(e,t,n,r){var o=e.getZoom(),i=e.getCenter(),a=t.zoom,s=e.projectedToPoint?e.projectedToPoint(i):e.dataToPoint(i);if(null!=t.dx&&null!=t.dy&&(s[0]-=t.dx,s[1]-=t.dy,e.setCenter(getCenterCoord(e,s),r)),null!=a){if(n){var l=n.min||0,u=n.max||1/0;a=Math.max(Math.min(o*a,u),l)/o}e.scaleX*=a,e.scaleY*=a;var c=(t.originX-e.x)*(a-1),d=(t.originY-e.y)*(a-1);e.x-=c,e.y-=d,e.updateTransform(),e.setCenter(getCenterCoord(e,s),r),e.setZoom(a*o)}return{center:e.getCenter(),zoom:e.getZoom()}}var GeoView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.focusBlurEnabled=!0,n}return __extends(t,e),t.prototype.init=function(e,t){this._api=t},t.prototype.render=function(e,t,n,r){if(this._model=e,!e.get("show"))return this._mapDraw&&this._mapDraw.remove(),void(this._mapDraw=null);this._mapDraw||(this._mapDraw=new MapDraw(n));var o=this._mapDraw;o.draw(e,t,n,this,r),o.group.on("click",this._handleRegionClick,this),o.group.silent=e.get("silent"),this.group.add(o.group),this.updateSelectStatus(e,t,n)},t.prototype._handleRegionClick=function(e){var t;findEventDispatcher(e.target,function(e){return null!=(t=getECData(e).eventData)},!0),t&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:t.name})},t.prototype.updateSelectStatus=function(e,t,n){var r=this;this._mapDraw.group.traverse(function(e){var t=getECData(e).eventData;if(t)return r._model.isSelected(t.name)?n.enterSelect(e):n.leaveSelect(e),!0})},t.prototype.findHighDownDispatchers=function(e){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(e,this._model)},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},t.type="geo",t}(ComponentView);function registerMap(e,t,n){geoSourceManager.registerMap(e,t,n)}function install$L(e){function t(t,n){n.update="geo:updateSelectStatus",e.registerAction(n,function(e,n){var r={},o=[];return n.eachComponent({mainType:"geo",query:e},function(n){n[t](e.name),each$f(n.coordinateSystem.regions,function(e){r[e.name]=n.isSelected(e.name)||!1});var i=[];each$f(r,function(e,t){r[t]&&i.push(t)}),o.push({geoIndex:n.componentIndex,name:i})}),{selected:r,allSelected:o,name:e.name}})}e.registerCoordinateSystem("geo",geoCreator),e.registerComponentModel(GeoModel),e.registerComponentView(GeoView),e.registerImpl("registerMap",registerMap),e.registerImpl("getMap",function(e){return geoSourceManager.getMapForUser(e)}),t("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),t("select",{type:"geoSelect",event:"geoselected"}),t("unSelect",{type:"geoUnSelect",event:"geounselected"}),e.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(e,t,n){var r=e.componentType||"series";t.eachComponent({mainType:r,query:e},function(t){var o=t.coordinateSystem;if("geo"===o.type){var i=updateCenterAndZoom(o,e,t.get("scaleLimit"),n);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom),"series"===r&&each$f(t.seriesGroup,function(e){e.setCenter(i.center),e.setZoom(i.zoom)})}})})}function install$K(e){use(install$L),e.registerChartView(MapView),e.registerSeriesModel(MapSeries),e.registerLayout(mapSymbolLayout),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,mapDataStatistic),createLegacyDataSelectAction("map",e.registerAction)}function init(e){var t=e;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,r,o=[t];n=o.pop();)if(r=n.children,n.isExpand&&r.length)for(var i=r.length-1;i>=0;i--){var a=r[i];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:i,thread:null},o.push(a)}}function firstWalk(e,t){var n=e.isExpand?e.children:[],r=e.parentNode.children,o=e.hierNode.i?r[e.hierNode.i-1]:null;if(n.length){executeShifts(e);var i=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;o?(e.hierNode.prelim=o.hierNode.prelim+t(e,o),e.hierNode.modifier=e.hierNode.prelim-i):e.hierNode.prelim=i}else o&&(e.hierNode.prelim=o.hierNode.prelim+t(e,o));e.parentNode.hierNode.defaultAncestor=apportion(e,o,e.parentNode.hierNode.defaultAncestor||r[0],t)}function secondWalk(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function separation(e){return arguments.length?e:defaultSeparation}function radialCoordinate(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function getViewRect$4(e,t){return getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function executeShifts(e){for(var t=e.children,n=t.length,r=0,o=0;--n>=0;){var i=t[n];i.hierNode.prelim+=r,i.hierNode.modifier+=r,o+=i.hierNode.change,r+=i.hierNode.shift+o}}function apportion(e,t,n,r){if(t){for(var o=e,i=e,a=i.parentNode.children[0],s=t,l=o.hierNode.modifier,u=i.hierNode.modifier,c=a.hierNode.modifier,d=s.hierNode.modifier;s=nextRight(s),i=nextLeft(i),s&&i;){o=nextRight(o),a=nextLeft(a),o.hierNode.ancestor=e;var p=s.hierNode.prelim+d-i.hierNode.prelim-u+r(s,i);p>0&&(moveSubtree(nextAncestor(s,e,n),e,p),u+=p,l+=p),d+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=o.hierNode.modifier,c+=a.hierNode.modifier}s&&!nextRight(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=d-l),i&&!nextLeft(a)&&(a.hierNode.thread=i,a.hierNode.modifier+=u-c,n=e)}return n}function nextRight(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function nextLeft(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function nextAncestor(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function moveSubtree(e,t,n){var r=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=r,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=r}function defaultSeparation(e,t){return e.parentNode===t.parentNode?1:2}var TreeEdgeShape=function(){return function(){this.parentPoint=[],this.childPoints=[]}}(),TreePath=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new TreeEdgeShape},t.prototype.buildPath=function(e,t){var n=t.childPoints,r=n.length,o=t.parentPoint,i=n[0],a=n[r-1];if(1===r)return e.moveTo(o[0],o[1]),void e.lineTo(i[0],i[1]);var s=t.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=parsePercent(t.forkPosition,1),d=[];d[l]=o[l],d[u]=o[u]+(a[u]-o[u])*c,e.moveTo(o[0],o[1]),e.lineTo(d[0],d[1]),e.moveTo(i[0],i[1]),d[l]=i[l],e.lineTo(d[0],d[1]),d[l]=a[l],e.lineTo(d[0],d[1]),e.lineTo(a[0],a[1]);for(var p=1;p<r-1;p++){var h=n[p];e.moveTo(h[0],h[1]),d[l]=h[l],e.lineTo(d[0],d[1])}},t}(Path),TreeView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._mainGroup=new Group$3,n}return __extends(t,e),t.prototype.init=function(e,t){this._controller=new RoamController(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,t,n){var r=e.getData(),o=e.layoutInfo,i=this._mainGroup;"radial"===e.get("layout")?(i.x=o.x+o.width/2,i.y=o.y+o.height/2):(i.x=o.x,i.y=o.y),this._updateViewCoordSys(e,n),this._updateController(e,t,n);var a=this._data;r.diff(a).add(function(t){symbolNeedsDraw(r,t)&&updateNode(r,t,null,i,e)}).update(function(t,n){var o=a.getItemGraphicEl(n);symbolNeedsDraw(r,t)?updateNode(r,t,o,i,e):o&&removeNode(a,n,o,i,e)}).remove(function(t){var n=a.getItemGraphicEl(t);n&&removeNode(a,t,n,i,e)}).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),!0===e.get("expandAndCollapse")&&r.eachItemGraphicEl(function(t,r){t.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:r})})}),this._data=r},t.prototype._updateViewCoordSys=function(e,t){var n=e.getData(),r=[];n.each(function(e){var t=n.getItemLayout(e);!t||isNaN(t.x)||isNaN(t.y)||r.push([+t.x,+t.y])});var o=[],i=[];fromPoints(r,o,i);var a=this._min,s=this._max;i[0]-o[0]===0&&(o[0]=a?a[0]:o[0]-1,i[0]=s?s[0]:i[0]+1),i[1]-o[1]===0&&(o[1]=a?a[1]:o[1]-1,i[1]=s?s[1]:i[1]+1);var l=e.coordinateSystem=new View;l.zoomLimit=e.get("scaleLimit"),l.setBoundingRect(o[0],o[1],i[0]-o[0],i[1]-o[1]),l.setCenter(e.get("center"),t),l.setZoom(e.get("zoom")),this.group.attr({x:l.x,y:l.y,scaleX:l.scaleX,scaleY:l.scaleY}),this._min=o,this._max=i},t.prototype._updateController=function(e,t,n){var r=this,o=this._controller,i=this._controllerHost,a=this.group;o.setPointerChecker(function(t,r,o){var i=a.getBoundingRect();return i.applyTransform(a.transform),i.contain(r,o)&&!onIrrelevantElement(t,n,e)}),o.enable(e.get("roam")),i.zoomLimit=e.get("scaleLimit"),i.zoom=e.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(t){updateViewOnPan(i,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"treeRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){updateViewOnZoom(i,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),r._updateNodeAndLinkScale(e),n.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(e){var t=e.getData(),n=this._getNodeGlobalScale(e);t.eachItemGraphicEl(function(e,t){e.setSymbolScale(n)})},t.prototype._getNodeGlobalScale=function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=this._nodeScaleRatio,r=t.scaleX||1;return((t.getZoom()-1)*n+1)/r},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type="tree",t}(ChartView);function symbolNeedsDraw(e,t){var n=e.getItemLayout(t);return n&&!isNaN(n.x)&&!isNaN(n.y)}function updateNode(e,t,n,r,o){var i=!n,a=e.tree.getNodeByDataIndex(t),s=a.getModel(),l=a.getVisual("style").fill,u=!1===a.isExpand&&0!==a.children.length?l:"#fff",c=e.tree.root,d=a.parentNode===c?a:a.parentNode||a,p=e.getItemGraphicEl(d.dataIndex),h=d.getLayout(),f=p?{x:p.__oldX,y:p.__oldY,rawX:p.__radialOldRawX,rawY:p.__radialOldRawY}:h,g=a.getLayout();i?((n=new Symbol$1(e,t,null,{symbolInnerColor:u,useNameLabel:!0})).x=f.x,n.y=f.y):n.updateData(e,t,null,{symbolInnerColor:u,useNameLabel:!0}),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=g.rawX,n.__radialRawY=g.rawY,r.add(n),e.setItemGraphicEl(t,n),n.__oldX=n.x,n.__oldY=n.y,updateProps$1(n,{x:g.x,y:g.y},o);var m=n.getSymbolPath();if("radial"===o.get("layout")){var y=c.children[0],v=y.getLayout(),_=y.children.length,x=void 0,S=void 0;if(g.x===v.x&&!0===a.isExpand&&y.children.length){var b={x:(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,y:(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2};(x=Math.atan2(b.y-v.y,b.x-v.x))<0&&(x=2*Math.PI+x),(S=b.x<v.x)&&(x-=Math.PI)}else(x=Math.atan2(g.y-v.y,g.x-v.x))<0&&(x=2*Math.PI+x),0===a.children.length||0!==a.children.length&&!1===a.isExpand?(S=g.x<v.x)&&(x-=Math.PI):(S=g.x>v.x)||(x-=Math.PI);var T=S?"left":"right",A=s.getModel("label"),w=A.get("rotate"),C=w*(Math.PI/180),E=m.getTextContent();E&&(m.setTextConfig({position:A.get("position")||T,rotation:null==w?-x:C,origin:"center"}),E.setStyle("verticalAlign","middle"))}var M=s.get(["emphasis","focus"]),I="relative"===M?concatArray(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===M?a.getAncestorsIndices():"descendant"===M?a.getDescendantIndices():null;I&&(getECData(n).focus=I),drawEdge(o,a,c,n,f,h,g,r),n.__edge&&(n.onHoverStateChange=function(t){if("blur"!==t){var r=a.parentNode&&e.getItemGraphicEl(a.parentNode.dataIndex);r&&r.hoverState===HOVER_STATE_BLUR||setStatesFlag(n.__edge,t)}})}function drawEdge(e,t,n,r,o,i,a,s){var l=t.getModel(),u=e.get("edgeShape"),c=e.get("layout"),d=e.getOrient(),p=e.get(["lineStyle","curveness"]),h=e.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=r.__edge;if("curve"===u)t.parentNode&&t.parentNode!==n&&(g||(g=r.__edge=new BezierCurve({shape:getEdgeShape(c,d,p,o,o)})),updateProps$1(g,{shape:getEdgeShape(c,d,p,i,a)},e));else if("polyline"===u&&"orthogonal"===c&&t!==n&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var m=t.children,y=[],v=0;v<m.length;v++){var _=m[v].getLayout();y.push([_.x,_.y])}g||(g=r.__edge=new TreePath({shape:{parentPoint:[a.x,a.y],childPoints:[[a.x,a.y]],orient:d,forkPosition:h}})),updateProps$1(g,{shape:{parentPoint:[a.x,a.y],childPoints:y}},e)}g&&("polyline"!==u||t.isExpand)&&(g.useStyle(defaults$2({strokeNoScale:!0,fill:null},f)),setStatesStylesFromModel(g,l,"lineStyle"),setDefaultStateProxy(g),s.add(g))}function removeNodeEdge(e,t,n,r,o){var i=getSourceNode(t.tree.root,e),a=i.source,s=i.sourceLayout,l=t.getItemGraphicEl(e.dataIndex);if(l){var u=t.getItemGraphicEl(a.dataIndex).__edge,c=l.__edge||(!1===a.isExpand||1===a.children.length?u:void 0),d=r.get("edgeShape"),p=r.get("layout"),h=r.get("orient"),f=r.get(["lineStyle","curveness"]);c&&("curve"===d?removeElement(c,{shape:getEdgeShape(p,h,f,s,s),style:{opacity:0}},r,{cb:function(){n.remove(c)},removeOpt:o}):"polyline"===d&&"orthogonal"===r.get("layout")&&removeElement(c,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},r,{cb:function(){n.remove(c)},removeOpt:o}))}}function getSourceNode(e,t){for(var n,r=t.parentNode===e?t:t.parentNode||t;null==(n=r.getLayout());)r=r.parentNode===e?r:r.parentNode||r;return{source:r,sourceLayout:n}}function removeNode(e,t,n,r,o){var i=e.tree.getNodeByDataIndex(t),a=getSourceNode(e.tree.root,i).sourceLayout,s={duration:o.get("animationDurationUpdate"),easing:o.get("animationEasingUpdate")};removeElement(n,{x:a.x+1,y:a.y+1},o,{cb:function(){r.remove(n),e.setItemGraphicEl(t,null)},removeOpt:s}),n.fadeOut(null,e.hostModel,{fadeLabel:!0,animation:s}),i.children.forEach(function(t){removeNodeEdge(t,e,r,o,s)}),removeNodeEdge(i,e,r,o,s)}function getEdgeShape(e,t,n,r,o){var i,a,s,l,u,c,d,p;if("radial"===e){u=r.rawX,d=r.rawY,c=o.rawX,p=o.rawY;var h=radialCoordinate(u,d),f=radialCoordinate(u,d+(p-d)*n),g=radialCoordinate(c,p+(d-p)*n),m=radialCoordinate(c,p);return{x1:h.x||0,y1:h.y||0,x2:m.x||0,y2:m.y||0,cpx1:f.x||0,cpy1:f.y||0,cpx2:g.x||0,cpy2:g.y||0}}return u=r.x,d=r.y,c=o.x,p=o.y,"LR"!==t&&"RL"!==t||(i=u+(c-u)*n,a=d,s=c+(u-c)*n,l=p),"TB"!==t&&"BT"!==t||(i=u,a=d+(p-d)*n,s=c,l=p+(d-p)*n),{x1:u,y1:d,x2:c,y2:p,cpx1:i,cpy1:a,cpx2:s,cpy2:l}}var inner$e=makeInner();function linkSeriesData(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,linkAll(t,n,e),each$f(n,function(n){each$f(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,curry$1(transferInjection,e))})}),t.wrapMethod("cloneShallow",curry$1(cloneShallowInjection,e)),each$f(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,curry$1(changeInjection,e))}),assert(n[t.dataType]===t)}function transferInjection(e,t){if(isMainData(this)){var n=extend$2({},inner$e(this).datas);n[this.dataType]=t,linkAll(t,n,e)}else linkSingle(t,this.dataType,inner$e(this).mainData,e);return t}function changeInjection(e,t){return e.struct&&e.struct.update(),t}function cloneShallowInjection(e,t){return each$f(inner$e(t).datas,function(n,r){n!==t&&linkSingle(n.cloneShallow(),r,t,e)}),t}function getLinkedData(e){var t=inner$e(this).mainData;return null==e||null==t?t:inner$e(t).datas[e]}function getLinkedDataAll(){var e=inner$e(this).mainData;return null==e?[{data:e}]:map$1(keys(inner$e(e).datas),function(t){return{type:t,data:inner$e(e).datas[t]}})}function isMainData(e){return inner$e(e).mainData===e}function linkAll(e,t,n){inner$e(e).datas={},each$f(t,function(t,r){linkSingle(t,r,e,n)})}function linkSingle(e,t,n,r){inner$e(n).datas[t]=e,inner$e(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=getLinkedData,e.getLinkedDataAll=getLinkedDataAll}var TreeNode=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){isFunction(e)&&(n=t,t=e,e=null),isString(e=e||{})&&(e={order:e});var r,o=e.order||"preorder",i=this[e.attr||"children"];"preorder"===o&&(r=t.call(n,this));for(var a=0;!r&&a<i.length;a++)i[a].eachNode(e,t,n);"postorder"===o&&t.call(n,this)},e.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var r=this.children[n];r.updateDepthAndHeight(e+1),r.height>t&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t<r;t++){var o=n[t].getNodeById(e);if(o)return o}},e.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,r=n.length;t<r;t++){var o=n[t].contains(e);if(o)return o}},e.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},e.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},e.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},e.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},e.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},e.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},e.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},e}(),Tree=function(){function e(e){this.type="tree",this._nodes=[],this.hostModel=e}return e.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},e.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},e.prototype.getNodeById=function(e){return this.root.getNodeById(e)},e.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,r=t.length;n<r;n++)t[n].dataIndex=-1;for(n=0,r=e.count();n<r;n++)t[e.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,n,r){var o=new e(n),i=[],a=1;!function e(t,n){var r=t.value;a=Math.max(a,isArray$1(r)?r.length:1),i.push(t);var s=new TreeNode(convertOptionIdName(t.name,""),o);n?addChild(s,n):o.root=s,o._nodes.push(s);var l=t.children;if(l)for(var u=0;u<l.length;u++)e(l[u],s)}(t),o.root.updateDepthAndHeight(0);var s=prepareSeriesDataSchema(i,{coordDimensions:["value"],dimensionsCount:a}).dimensions,l=new SeriesData(s,n);return l.initData(i),r&&r(l),linkSeriesData({mainData:l,struct:o,structAttr:"tree"}),o.update(),o},e}();function addChild(e,t){var n=t.children;e.parentNode!==t&&(n.push(e),e.parentNode=t)}function retrieveTargetInfo(e,t,n){if(e&&indexOf(t,e.type)>=0){var r=n.getData().tree.root,o=e.targetNode;if(isString(o)&&(o=r.getNodeById(o)),o&&r.contains(o))return{node:o};var i=e.targetNodeId;if(null!=i&&(o=r.getNodeById(i)))return{node:o}}}function getPathToRoot(e){for(var t=[];e;)(e=e.parentNode)&&t.push(e);return t.reverse()}function aboveViewRoot(e,t){return indexOf(getPathToRoot(e),t)>=0}function wrapTreePathInfo(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var TreeSeriesModel=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return __extends(t,e),t.prototype.getInitialData=function(e){var t={name:e.name,children:e.data},n=e.leaves||{},r=new Model(n,this,this.ecModel),o=Tree.createTree(t,this,function(e){e.wrapMethod("getItemModel",function(e,t){var n=o.getNodeByDataIndex(t);return n&&n.children.length&&n.isExpand||(e.parentModel=r),e})});var i=0;o.eachNode("preorder",function(e){e.depth>i&&(i=e.depth)});var a=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:i;return o.root.eachNode("preorder",function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=a}),o.data},t.prototype.getOrient=function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,t,n){for(var r=this.getData().tree,o=r.root.children[0],i=r.getNodeByDataIndex(e),a=i.getValue(),s=i.name;i&&i!==o;)s=i.parentNode.name+"."+s,i=i.parentNode;return createTooltipMarkup("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=wrapTreePathInfo(r,this),n.collapsed=!r.isExpand,n},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(SeriesModel);function eachAfter(e,t,n){for(var r,o=[e],i=[];r=o.pop();)if(i.push(r),r.isExpand){var a=r.children;if(a.length)for(var s=0;s<a.length;s++)o.push(a[s])}for(;r=i.pop();)t(r,n)}function eachBefore(e,t){for(var n,r=[e];n=r.pop();)if(t(n),n.isExpand){var o=n.children;if(o.length)for(var i=o.length-1;i>=0;i--)r.push(o[i])}}function treeLayout(e,t){e.eachSeriesByType("tree",function(e){commonLayout(e,t)})}function commonLayout(e,t){var n=getViewRect$4(e,t);e.layoutInfo=n;var r=e.get("layout"),o=0,i=0,a=null;"radial"===r?(o=2*Math.PI,i=Math.min(n.height,n.width)/2,a=separation(function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth})):(o=n.width,i=n.height,a=separation());var s=e.getData().tree.root,l=s.children[0];if(l){init(s),eachAfter(l,firstWalk,a),s.hierNode.modifier=-l.hierNode.prelim,eachBefore(l,secondWalk);var u=l,c=l,d=l;eachBefore(l,function(e){var t=e.getLayout().x;t<u.getLayout().x&&(u=e),t>c.getLayout().x&&(c=e),e.depth>d.depth&&(d=e)});var p=u===c?1:a(u,c)/2,h=p-u.getLayout().x,f=0,g=0,m=0,y=0;if("radial"===r)f=o/(c.getLayout().x+p+h),g=i/(d.depth-1||1),eachBefore(l,function(e){m=(e.getLayout().x+h)*f,y=(e.depth-1)*g;var t=radialCoordinate(m,y);e.setLayout({x:t.x,y:t.y,rawX:m,rawY:y},!0)});else{var v=e.getOrient();"RL"===v||"LR"===v?(g=i/(c.getLayout().x+p+h),f=o/(d.depth-1||1),eachBefore(l,function(e){y=(e.getLayout().x+h)*g,m="LR"===v?(e.depth-1)*f:o-(e.depth-1)*f,e.setLayout({x:m,y:y},!0)})):"TB"!==v&&"BT"!==v||(f=o/(c.getLayout().x+p+h),g=i/(d.depth-1||1),eachBefore(l,function(e){m=(e.getLayout().x+h)*f,y="TB"===v?(e.depth-1)*g:i-(e.depth-1)*g,e.setLayout({x:m,y:y},!0)}))}}}function treeVisual(e){e.eachSeriesByType("tree",function(e){var t=e.getData();t.tree.eachNode(function(e){var n=e.getModel().getModel("itemStyle").getItemStyle();extend$2(t.ensureUniqueItemVisual(e.dataIndex,"style"),n)})})}function installTreeAction(e){e.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(t){var n=e.dataIndex,r=t.getData().tree.getNodeByDataIndex(n);r.isExpand=!r.isExpand})}),e.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},function(t){var r=updateCenterAndZoom(t.coordinateSystem,e,void 0,n);t.setCenter&&t.setCenter(r.center),t.setZoom&&t.setZoom(r.zoom)})})}function install$J(e){e.registerChartView(TreeView),e.registerSeriesModel(TreeSeriesModel),e.registerLayout(treeLayout),e.registerVisual(treeVisual),installTreeAction(e)}var actionTypes=["treemapZoomToNode","treemapRender","treemapMove"];function installTreemapAction(e){for(var t=0;t<actionTypes.length;t++)e.registerAction({type:actionTypes[t],update:"updateView"},noop);e.registerAction({type:"treemapRootToNode",update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"treemap",query:e},function(t,n){var r=retrieveTargetInfo(e,["treemapZoomToNode","treemapRootToNode"],t);if(r){var o=t.getViewRoot();o&&(e.direction=aboveViewRoot(o,r.node)?"rollUp":"drillDown"),t.resetViewRoot(r.node)}})})}function enableAriaDecalForTree(e){var t=e.getData().tree,n={};t.eachNode(function(t){for(var r=t;r&&r.depth>1;)r=r.parentNode;var o=getDecalFromPalette(e.ecModel,r.name||r.dataIndex+"",n);t.setVisual("decal",o)})}var TreemapSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return __extends(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};completeTreeValue$1(n);var r=e.levels||[],o=this.designatedVisualItemStyle={},i=new Model({itemStyle:o},this,t),a=map$1((r=e.levels=setDefault(r,t))||[],function(e){return new Model(e,i,t)},this),s=Tree.createTree(n,this,function(e){e.wrapMethod("getItemModel",function(e,t){var n=s.getNodeByDataIndex(t),r=n?a[n.depth]:null;return e.parentModel=r||i,e})});return s.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),o=this.getRawValue(e);return createTooltipMarkup("nameValue",{name:r.getName(e),value:o})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=wrapTreePathInfo(r,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},extend$2(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=createHashMap(),this._idIndexMapCount=0);var n=t.get(e);return null==n&&t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){enableAriaDecalForTree(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(SeriesModel);function completeTreeValue$1(e){var t=0;each$f(e.children,function(e){completeTreeValue$1(e);var n=e.value;isArray$1(n)&&(n=n[0]),t+=n});var n=e.value;isArray$1(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),isArray$1(e.value)?e.value[0]=n:e.value=n}function setDefault(e,t){var n=normalizeToArray(t.get("color")),r=normalizeToArray(t.get(["aria","decal","decals"]));if(n){var o,i;each$f(e=e||[],function(e){var t=new Model(e),n=t.get("color"),r=t.get("decal");(t.get(["itemStyle","color"])||n&&"none"!==n)&&(o=!0),(t.get(["itemStyle","decal"])||r&&"none"!==r)&&(i=!0)});var a=e[0]||(e[0]={});return o||(a.color=n.slice()),!i&&r&&(a.decal=r.slice()),e}}var TEXT_PADDING=8,ITEM_GAP=8,ARRAY_LENGTH=5,Breadcrumb=function(){function e(e){this.group=new Group$3,e.add(this.group)}return e.prototype.render=function(e,t,n,r){var o=e.getModel("breadcrumb"),i=this.group;if(i.removeAll(),o.get("show")&&n){var a=o.getModel("itemStyle"),s=o.getModel("emphasis"),l=a.getModel("textStyle"),u=s.getModel(["itemStyle","textStyle"]),c={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,c,l),this._renderContent(e,c,a,s,l,u,r),positionElement(i,c.pos,c.box)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var o=convertOptionIdName(r.getModel().get("name"),""),i=n.getTextRect(o),a=Math.max(i.width+2*TEXT_PADDING,t.emptyItemWidth);t.totalWidth+=a+ITEM_GAP,t.renderList.push({node:r,text:o,width:a})}},e.prototype._renderContent=function(e,t,n,r,o,i,a){for(var s=0,l=t.emptyItemWidth,u=e.get(["breadcrumb","height"]),c=getAvailableSize(t.pos,t.box),d=t.totalWidth,p=t.renderList,h=r.getModel("itemStyle").getItemStyle(),f=p.length-1;f>=0;f--){var g=p[f],m=g.node,y=g.width,v=g.text;d>c.width&&(d-=y-l,y=l,v=null);var _=new Polygon({shape:{points:makeItemPoints(s,0,y,u,f===p.length-1,0===f)},style:defaults$2(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new ZRText({style:createTextStyle$1(o,{text:v})}),textConfig:{position:"inside"},z2:1e4*Z2_EMPHASIS_LIFT,onclick:curry$1(a,m)});_.disableLabelAnimation=!0,_.getTextContent().ensureState("emphasis").style=createTextStyle$1(i,{text:v}),_.ensureState("emphasis").style=h,toggleHoverEmphasis(_,r.get("focus"),r.get("blurScope"),r.get("disabled")),this.group.add(_),packEventData(_,e,m),s+=y+ITEM_GAP}},e.prototype.remove=function(){this.group.removeAll()},e}();function makeItemPoints(e,t,n,r,o,i){var a=[[o?e:e-ARRAY_LENGTH,t],[e+n,t],[e+n,t+r],[o?e:e-ARRAY_LENGTH,t+r]];return!i&&a.splice(2,0,[e+n+ARRAY_LENGTH,t+r/2]),!o&&a.push([e,t+r/2]),a}function packEventData(e,t,n){getECData(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&wrapTreePathInfo(n,t)}}var AnimationWrap=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,o){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:o}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){--t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,o=this._storage.length;r<o;r++){var i=this._storage[r];i.el.animateTo(i.target,{duration:i.duration,delay:i.delay,easing:i.easing,setToFinal:!0,done:n,aborted:n})}return this},e}();function createWrap(){return new AnimationWrap}var Group$2=Group$3,Rect$1=Rect$2,DRAG_THRESHOLD=3,PATH_LABEL_NOAMAL="label",PATH_UPPERLABEL_NORMAL="upperLabel",Z2_BASE=10*Z2_EMPHASIS_LIFT,Z2_BG=2*Z2_EMPHASIS_LIFT,Z2_CONTENT=3*Z2_EMPHASIS_LIFT,getStateItemStyle=makeStyleMapper([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),getItemStyleNormal=function(e){var t=getStateItemStyle(e);return t.stroke=t.fill=t.lineWidth=null,t},inner$d=makeInner(),TreemapView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._state="ready",n._storage=createStorage(),n}return __extends(t,e),t.prototype.render=function(e,t,n,r){if(!(indexOf(t.findComponents({mainType:"series",subType:"treemap",query:r}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var o=retrieveTargetInfo(r,["treemapZoomToNode","treemapRootToNode"],e),i=r&&r.type,a=e.layoutInfo,s=!this._oldTree,l=this._storage,u="treemapRootToNode"===i&&o&&l?{rootNodeGroup:l.nodeGroup[o.node.getRawIndex()],direction:r.direction}:null,c=this._giveContainerGroup(a),d=e.get("animation"),p=this._doRender(c,e,u);!d||s||i&&"treemapZoomToNode"!==i&&"treemapRootToNode"!==i?p.renderFinally():this._doAnimation(c,p,e,u),this._resetController(n),this._renderBreadcrumb(e,n,o)}},t.prototype._giveContainerGroup=function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new Group$2,this._initEvents(t),this.group.add(t)),t.x=e.x,t.y=e.y,t},t.prototype._doRender=function(e,t,n){var r=t.getData().tree,o=this._oldTree,i=createStorage(),a=createStorage(),s=this._storage,l=[];!function e(r,o,u,c,d){c?(o=r,each$f(r,function(e,t){!e.isRemoved()&&h(t,t)})):new DataDiffer(o,r,p,p).add(h).update(h).remove(curry$1(h,null)).execute();function p(e){return e.getId()}function h(p,h){var f=null!=p?r[p]:null,g=null!=h?o[h]:null,m=function(e,r,o,u){return renderNode(t,a,s,n,i,l,e,r,o,u)}(f,g,u,d);m&&e(f&&f.viewChildren||[],g&&g.viewChildren||[],m,c,d+1)}}(r.root?[r.root]:[],o&&o.root?[o.root]:[],e,r===o||!o,0);var u=function(e){var t=createStorage();return e&&each$f(e,function(e,n){var r=t[n];each$f(e,function(e){e&&(r.push(e),inner$d(e).willDelete=!0)})}),t}(s);if(this._oldTree=r,this._storage=a,this._controllerHost){var c=this.seriesModel.layoutInfo,d=r.root.getLayout();d.width===c.width&&d.height===c.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:i,willDeleteEls:u,renderFinally:function(){each$f(u,function(e){each$f(e,function(e){e.parent&&e.parent.remove(e)})}),each$f(l,function(e){e.invisible=!0,e.dirty()})}}},t.prototype._doAnimation=function(e,t,n,r){var o=n.get("animationDurationUpdate"),i=n.get("animationEasing"),a=(isFunction(o)?0:o)||0,s=(isFunction(i)?null:i)||"cubicOut",l=createWrap();each$f(t.willDeleteEls,function(e,t){each$f(e,function(e,n){if(!e.invisible){var o,i=e.parent,u=inner$d(i);if(r&&"drillDown"===r.direction)o=i===r.rootNodeGroup?{shape:{x:0,y:0,width:u.nodeWidth,height:u.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var c=0,d=0;u.willDelete||(c=u.nodeWidth/2,d=u.nodeHeight/2),o="nodeGroup"===t?{x:c,y:d,style:{opacity:0}}:{shape:{x:c,y:d,width:0,height:0},style:{opacity:0}}}o&&l.add(e,o,a,0,s)}})}),each$f(this._storage,function(e,n){each$f(e,function(e,r){var o=t.lastsForAnimation[n][r],i={};o&&(e instanceof Group$3?null!=o.oldX&&(i.x=e.x,i.y=e.y,e.x=o.oldX,e.y=o.oldY):(o.oldShape&&(i.shape=extend$2({},e.shape),e.setShape(o.oldShape)),o.fadein?(e.setStyle("opacity",0),i.style={opacity:1}):1!==e.style.opacity&&(i.style={opacity:1})),l.add(e,i,a,0,s))})},this),this._state="animating",l.finished(bind$1(function(){this._state="ready",t.renderFinally()},this)).start()},t.prototype._resetController=function(e){var t=this._controller,n=this._controllerHost;n||(this._controllerHost={target:this.group},n=this._controllerHost),t||((t=this._controller=new RoamController(e.getZr())).enable(this.seriesModel.get("roam")),n.zoomLimit=this.seriesModel.get("scaleLimit"),n.zoom=this.seriesModel.get("zoom"),t.on("pan",bind$1(this._onPan,this)),t.on("zoom",bind$1(this._onZoom,this)));var r=new BoundingRect(0,0,e.getWidth(),e.getHeight());t.setPointerChecker(function(e,t,n){return r.contain(t,n)})},t.prototype._clearController=function(){var e=this._controller;this._controllerHost=null,e&&(e.dispose(),e=null)},t.prototype._onPan=function(e){if("animating"!==this._state&&(Math.abs(e.dx)>DRAG_THRESHOLD||Math.abs(e.dy)>DRAG_THRESHOLD)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,r=e.scale;if("animating"!==this._state){var o=this.seriesModel.getData().tree.root;if(!o)return;var i=o.getLayout();if(!i)return;var a,s=new BoundingRect(i.x,i.y,i.width,i.height),l=this._controllerHost;a=l.zoomLimit;var u=l.zoom=l.zoom||1;if(u*=r,a){var c=a.min||0,d=a.max||1/0;u=Math.max(Math.min(d,u),c)}var p=u/l.zoom;l.zoom=u;var h=this.seriesModel.layoutInfo;t-=h.x,n-=h.y;var f=create$1();translate(f,f,[-t,-n]),scale$1(f,f,[p,p]),translate(f,f,[t,n]),s.applyTransform(f),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var t=this;e.on("click",function(e){if("ready"===t._state){var n=t.seriesModel.get("nodeClick",!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var o=r.node;if(o.getLayout().isLeafRoot)t._rootToNode(r);else if("zoomToNode"===n)t._zoomToNode(r);else if("link"===n){var i=o.hostTree.data.getItemModel(o.dataIndex),a=i.get("link",!0),s=i.get("target",!0)||"blank";a&&windowOpen(a,s)}}}}},this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||(n={node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new Breadcrumb(this.group))).render(e,t,n.node,function(t){"animating"!==r._state&&(aboveViewRoot(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=createStorage(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(r){var o=this._storage.background[r.getRawIndex()];if(o){var i=o.transformCoordToLocal(e,t),a=o.shape;if(!(a.x<=i[0]&&i[0]<=a.x+a.width&&a.y<=i[1]&&i[1]<=a.y+a.height))return!1;n={node:r,offsetX:i[0],offsetY:i[1]}}},this),n},t.type="treemap",t}(ChartView);function createStorage(){return{nodeGroup:[],background:[],content:[]}}function renderNode(e,t,n,r,o,i,a,s,l,u){if(a){var c=a.getLayout(),d=e.getData(),p=a.getModel();if(d.setItemGraphicEl(a.dataIndex,null),c&&c.isInView){var h=c.width,f=c.height,g=c.borderWidth,m=c.invisible,y=a.getRawIndex(),v=s&&s.getRawIndex(),_=a.viewChildren,x=c.upperHeight,S=_&&_.length,b=p.getModel("itemStyle"),T=p.getModel(["emphasis","itemStyle"]),A=p.getModel(["blur","itemStyle"]),w=p.getModel(["select","itemStyle"]),C=b.get("borderRadius")||0,E=V("nodeGroup",Group$2);if(E){if(l.add(E),E.x=c.x||0,E.y=c.y||0,E.markRedraw(),inner$d(E).nodeWidth=h,inner$d(E).nodeHeight=f,c.isAboveViewRoot)return E;var M=V("background",Rect$1,u,Z2_BG);M&&function(t,n,r){var o=getECData(n);if(o.dataIndex=a.dataIndex,o.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:h,height:f,r:C}),m)O(n);else{n.invisible=!1;var i=a.getVisual("style"),s=i.stroke,l=getItemStyleNormal(b);l.fill=s;var u=getStateItemStyle(T);u.fill=T.get("borderColor");var c=getStateItemStyle(A);c.fill=A.get("borderColor");var d=getStateItemStyle(w);if(d.fill=w.get("borderColor"),r){var p=h-2*g;N(n,s,i.opacity,{x:g,y:0,width:p,height:x})}else n.removeTextContent();n.setStyle(l),n.ensureState("emphasis").style=u,n.ensureState("blur").style=c,n.ensureState("select").style=d,setDefaultStateProxy(n)}t.add(n)}(E,M,S&&c.upperLabelHeight);var I=p.getModel("emphasis"),P=I.get("focus"),D=I.get("blurScope"),k=I.get("disabled"),$="ancestor"===P?a.getAncestorsIndices():"descendant"===P?a.getDescendantIndices():P;if(S)isHighDownDispatcher(E)&&setAsHighDownDispatcher(E,!1),M&&(setAsHighDownDispatcher(M,!k),d.setItemGraphicEl(a.dataIndex,M),enableHoverFocus(M,$,D));else{var R=V("content",Rect$1,u,Z2_CONTENT);R&&function(t,n){var r=getECData(n);r.dataIndex=a.dataIndex,r.seriesIndex=e.seriesIndex;var o=Math.max(h-2*g,0),i=Math.max(f-2*g,0);if(n.culling=!0,n.setShape({x:g,y:g,width:o,height:i,r:C}),m)O(n);else{n.invisible=!1;var s=a.getVisual("style"),l=s.fill,u=getItemStyleNormal(b);u.fill=l,u.decal=s.decal;var c=getStateItemStyle(T),d=getStateItemStyle(A),p=getStateItemStyle(w);N(n,l,s.opacity,null),n.setStyle(u),n.ensureState("emphasis").style=c,n.ensureState("blur").style=d,n.ensureState("select").style=p,setDefaultStateProxy(n)}t.add(n)}(E,R),M.disableMorphing=!0,M&&isHighDownDispatcher(M)&&setAsHighDownDispatcher(M,!1),setAsHighDownDispatcher(E,!k),d.setItemGraphicEl(a.dataIndex,E);var L=p.getShallow("cursor");L&&R.attr("cursor",L),enableHoverFocus(E,$,D)}return E}}}function O(e){!e.invisible&&i.push(e)}function N(t,n,r,o){var i=p.getModel(o?PATH_UPPERLABEL_NORMAL:PATH_LABEL_NOAMAL),s=convertOptionIdName(p.get("name"),null),l=i.getShallow("show");setLabelStyle(t,getLabelStatesModels(p,o?PATH_UPPERLABEL_NORMAL:PATH_LABEL_NOAMAL),{defaultText:l?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:a.dataIndex});var u=t.getTextContent();if(u){var d=u.style,h=normalizeCssArray$1(d.padding||0);o&&(t.setTextConfig({layoutRect:o}),u.disableLabelLayout=!0),u.beforeUpdate=function(){var e=Math.max((o?o.width:t.shape.width)-h[1]-h[3],0),n=Math.max((o?o.height:t.shape.height)-h[0]-h[2],0);d.width===e&&d.height===n||u.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow="truncate",B(d,o,c);var f=u.getState("emphasis");B(f?f.style:null,o,c)}}function B(t,n,r){var o=t?t.text:null;if(!n&&r.isLeafRoot&&null!=o){var i=e.get("drillDownIcon",!0);t.text=i?i+" "+o:o}}function V(e,i,s,l){var u=null!=v&&n[e][v],c=o[e];return u?(n[e][v]=null,function(e,t){var n=e[y]={};t instanceof Group$2?(n.oldX=t.x,n.oldY=t.y):n.oldShape=extend$2({},t.shape)}(c,u)):m||((u=new i)instanceof Displayable&&(u.z2=calculateZ2(s,l)),function(e,t){var n=e[y]={},i=a.parentNode,s=t instanceof Group$3;if(i&&(!r||"drillDown"===r.direction)){var l=0,u=0,c=o.background[i.getRawIndex()];!r&&c&&c.oldShape&&(l=c.oldShape.width,u=c.oldShape.height),s?(n.oldX=0,n.oldY=u):n.oldShape={x:l,y:u,width:0,height:0}}n.fadein=!s}(c,u)),t[e][y]=u}}function calculateZ2(e,t){return e*Z2_BASE+t}var each$c=each$f,isObject=isObject$3,CATEGORY_DEFAULT_VISUAL_INDEX=-1,VisualMapping=function(){function e(t){var n=t.mappingMethod,r=t.type,o=this.option=clone$6(t);this.type=r,this.mappingMethod=n,this._normalizeData=normalizers[n];var i=e.visualHandlers[r];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[n],"piecewise"===n?(normalizeVisualRange(o),preprocessForPiecewise(o)):"category"===n?o.categories?preprocessForSpecifiedCategory(o):normalizeVisualRange(o,!0):(assert("linear"!==n||o.dataExtent),normalizeVisualRange(o))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return bind$1(this._normalizeData,this)},e.listVisualTypes=function(){return keys(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){isObject$3(e)?each$f(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var o,i=isArray$1(t)?[]:isObject$3(t)?{}:(o=!0,null);return e.eachVisual(t,function(e,t){var a=n.call(r,e,t);o?i=a:i[t]=a}),i},e.retrieveVisuals=function(t){var n,r={};return t&&each$c(e.visualHandlers,function(e,o){t.hasOwnProperty(o)&&(r[o]=t[o],n=!0)}),n?r:null},e.prepareVisualTypes=function(e){if(isArray$1(e))e=e.slice();else{if(!isObject(e))return[];var t=[];each$c(e,function(e,n){t.push(n)}),e=t}return e.sort(function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1}),e},e.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var r,o=1/0,i=0,a=t.length;i<a;i++){var s=t[i].value;if(null!=s){if(s===e||isString(s)&&s===e+"")return i;n&&d(s,i)}}for(i=0,a=t.length;i<a;i++){var l=t[i],u=l.interval,c=l.close;if(u){if(u[0]===-1/0){if(littleThan(c[1],e,u[1]))return i}else if(u[1]===1/0){if(littleThan(c[0],u[0],e))return i}else if(littleThan(c[0],u[0],e)&&littleThan(c[1],e,u[1]))return i;n&&d(u[0],i),n&&d(u[1],i)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,n){var i=Math.abs(t-e);i<o&&(o=i,r=n)}},e.visualHandlers={color:{applyVisual:makeApplyVisual("color"),getColorMapper:function(){var e=this.option;return bind$1("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),doMapCategory.call(this,e)}:function(t,n,r){var o=!!r;return!n&&(t=this._normalizeData(t)),r=fastLerp(t,e.parsedVisual,r),o?r:stringify(r,"rgba")},this)},_normalizedToVisual:{linear:function(e){return stringify(fastLerp(e,this.option.parsedVisual),"rgba")},category:doMapCategory,piecewise:function(e,t){var n=getSpecifiedVisual.call(this,t);return null==n&&(n=stringify(fastLerp(e,this.option.parsedVisual),"rgba")),n},fixed:doMapFixed}},colorHue:makePartialColorVisualHandler(function(e,t){return modifyHSL(e,t)}),colorSaturation:makePartialColorVisualHandler(function(e,t){return modifyHSL(e,null,t)}),colorLightness:makePartialColorVisualHandler(function(e,t){return modifyHSL(e,null,null,t)}),colorAlpha:makePartialColorVisualHandler(function(e,t){return modifyAlpha(e,t)}),decal:{applyVisual:makeApplyVisual("decal"),_normalizedToVisual:{linear:null,category:doMapCategory,piecewise:null,fixed:null}},opacity:{applyVisual:makeApplyVisual("opacity"),_normalizedToVisual:createNormalizedToNumericVisual([0,1])},liftZ:{applyVisual:makeApplyVisual("liftZ"),_normalizedToVisual:{linear:doMapFixed,category:doMapFixed,piecewise:doMapFixed,fixed:doMapFixed}},symbol:{applyVisual:function(e,t,n){n("symbol",this.mapValueToVisual(e))},_normalizedToVisual:{linear:doMapToArray,category:doMapCategory,piecewise:function(e,t){var n=getSpecifiedVisual.call(this,t);return null==n&&(n=doMapToArray.call(this,e)),n},fixed:doMapFixed}},symbolSize:{applyVisual:makeApplyVisual("symbolSize"),_normalizedToVisual:createNormalizedToNumericVisual([0,1])}},e}();function preprocessForPiecewise(e){var t=e.pieceList;e.hasSpecialVisual=!1,each$f(t,function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)})}function preprocessForSpecifiedCategory(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(each$c(t,function(e,t){n[e]=t}),!isArray$1(r)){var o=[];isObject$3(r)?each$c(r,function(e,t){var r=n[t];o[null!=r?r:CATEGORY_DEFAULT_VISUAL_INDEX]=e}):o[CATEGORY_DEFAULT_VISUAL_INDEX]=r,r=setVisualToOption(e,o)}for(var i=t.length-1;i>=0;i--)null==r[i]&&(delete n[t[i]],t.pop())}function normalizeVisualRange(e,t){var n=e.visual,r=[];isObject$3(n)?each$c(n,function(e){r.push(e)}):null!=n&&r.push(n);t||1!==r.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(r[1]=r[0]),setVisualToOption(e,r)}function makePartialColorVisualHandler(e){return{applyVisual:function(t,n,r){var o=this.mapValueToVisual(t);r("color",e(n("color"),o))},_normalizedToVisual:createNormalizedToNumericVisual([0,1])}}function doMapToArray(e){var t=this.option.visual;return t[Math.round(linearMap$2(e,[0,1],[0,t.length-1],!0))]||{}}function makeApplyVisual(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function doMapCategory(e){var t=this.option.visual;return t[this.option.loop&&e!==CATEGORY_DEFAULT_VISUAL_INDEX?e%t.length:e]}function doMapFixed(){return this.option.visual[0]}function createNormalizedToNumericVisual(e){return{linear:function(t){return linearMap$2(t,e,this.option.visual,!0)},category:doMapCategory,piecewise:function(t,n){var r=getSpecifiedVisual.call(this,n);return null==r&&(r=linearMap$2(t,e,this.option.visual,!0)),r},fixed:doMapFixed}}function getSpecifiedVisual(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[VisualMapping.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function setVisualToOption(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=map$1(t,function(e){var t=parse(e);return t||[0,0,0,1]})),t}var normalizers={linear:function(e){return linearMap$2(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=VisualMapping.findPieceIndex(e,t,!0);if(null!=n)return linearMap$2(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?CATEGORY_DEFAULT_VISUAL_INDEX:t},fixed:noop};function littleThan(e,t,n){return e?t<=n:t<n}var ITEM_STYLE_NORMAL="itemStyle",inner$c=makeInner(),treemapVisual={seriesType:"treemap",reset:function(e){var t=e.getData().tree.root;t.isRemoved()||travelTree(t,{},e.getViewRoot().getAncestors(),e)}};function travelTree(e,t,n,r){var o=e.getModel(),i=e.getLayout(),a=e.hostTree.data;if(i&&!i.invisible&&i.isInView){var s,l=o.getModel(ITEM_STYLE_NORMAL),u=buildVisuals(l,t,r),c=a.ensureUniqueItemVisual(e.dataIndex,"style"),d=l.get("borderColor"),p=l.get("borderColorSaturation");null!=p&&(d=calculateBorderColor(p,s=calculateColor(u))),c.stroke=d;var h=e.viewChildren;if(h&&h.length){var f=buildVisualMapping(e,o,i,l,u,h);each$f(h,function(e,t){(e.depth>=n.length||e===n[e.depth])&&travelTree(e,mapVisual$1(o,u,e,t,f,r),n,r)})}else s=calculateColor(u),c.fill=s}}function buildVisuals(e,t,n){var r=extend$2({},t),o=n.designatedVisualItemStyle;return each$f(["color","colorAlpha","colorSaturation"],function(n){o[n]=t[n];var i=e.get(n);o[n]=null,null!=i&&(r[n]=i)}),r}function calculateColor(e){var t=getValueVisualDefine(e,"color");if(t){var n=getValueVisualDefine(e,"colorAlpha"),r=getValueVisualDefine(e,"colorSaturation");return r&&(t=modifyHSL(t,null,null,r)),n&&(t=modifyAlpha(t,n)),t}}function calculateBorderColor(e,t){return null!=t?modifyHSL(t,null,null,e):null}function getValueVisualDefine(e,t){var n=e[t];if(null!=n&&"none"!==n)return n}function buildVisualMapping(e,t,n,r,o,i){if(i&&i.length){var a=getRangeVisual(t,"color")||null!=o.color&&"none"!==o.color&&(getRangeVisual(t,"colorAlpha")||getRangeVisual(t,"colorSaturation"));if(a){var s=t.get("visualMin"),l=t.get("visualMax"),u=n.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var c=t.get("colorMappingBy"),d={type:a.name,dataExtent:u,visual:a.range};"color"!==d.type||"index"!==c&&"id"!==c?d.mappingMethod="linear":(d.mappingMethod="category",d.loop=!0);var p=new VisualMapping(d);return inner$c(p).drColorMappingBy=c,p}}}function getRangeVisual(e,t){var n=e.get(t);return isArray$1(n)&&n.length?{name:t,range:n}:null}function mapVisual$1(e,t,n,r,o,i){var a=extend$2({},t);if(o){var s=o.type,l="color"===s&&inner$c(o).drColorMappingBy,u="index"===l?r:"id"===l?i.mapIdToIndex(n.getId()):n.getValue(e.get("visualDimension"));a[s]=o.mapValueToVisual(u)}return a}var mathMax$3=Math.max,mathMin$3=Math.min,retrieveValue=retrieve,each$b=each$f,PATH_BORDER_WIDTH=["itemStyle","borderWidth"],PATH_GAP_WIDTH=["itemStyle","gapWidth"],PATH_UPPER_LABEL_SHOW=["upperLabel","show"],PATH_UPPER_LABEL_HEIGHT=["upperLabel","height"],treemapLayout={seriesType:"treemap",reset:function(e,t,n,r){var o=n.getWidth(),i=n.getHeight(),a=e.option,s=getLayoutRect(e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=parsePercent(retrieveValue(s.width,l[0]),o),c=parsePercent(retrieveValue(s.height,l[1]),i),d=r&&r.type,p=retrieveTargetInfo(r,["treemapZoomToNode","treemapRootToNode"],e),h="treemapRender"===d||"treemapMove"===d?r.rootRect:null,f=e.getViewRoot(),g=getPathToRoot(f);if("treemapMove"!==d){var m="treemapZoomToNode"===d?estimateRootSize(e,p,f,u,c):h?[h.width,h.height]:[u,c],y=a.sort;y&&"asc"!==y&&"desc"!==y&&(y="desc");var v={squareRatio:a.squareRatio,sort:y,leafDepth:a.leafDepth};f.hostTree.clearLayouts();var _={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};f.setLayout(_),squarify(f,v,!1,0),_=f.getLayout(),each$b(g,function(e,t){var n=(g[t+1]||f).getValue();e.setLayout(extend$2({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))})}var x=e.getData().tree.root;x.setLayout(calculateRootPosition(s,h,p),!0),e.setLayoutInfo(s),prunning(x,new BoundingRect(-s.x,-s.y,o,i),g,f,0)}};function squarify(e,t,n,r){var o,i;if(!e.isRemoved()){var a=e.getLayout();o=a.width,i=a.height;var s=e.getModel(),l=s.get(PATH_BORDER_WIDTH),u=s.get(PATH_GAP_WIDTH)/2,c=getUpperLabelHeight(s),d=Math.max(l,c),p=l-u,h=d-u;e.setLayout({borderWidth:l,upperHeight:d,upperLabelHeight:c},!0);var f=(o=mathMax$3(o-2*p,0))*(i=mathMax$3(i-p-h,0)),g=initChildren$1(e,s,f,t,n,r);if(g.length){var m={x:p,y:h,width:o,height:i},y=mathMin$3(o,i),v=1/0,_=[];_.area=0;for(var x=0,S=g.length;x<S;){var b=g[x];_.push(b),_.area+=b.getLayout().area;var T=worst(_,y,t.squareRatio);T<=v?(x++,v=T):(_.area-=_.pop().getLayout().area,position(_,y,m,u,!1),y=mathMin$3(m.width,m.height),_.length=_.area=0,v=1/0)}if(_.length&&position(_,y,m,u,!0),!n){var A=s.get("childrenVisibleMin");null!=A&&f<A&&(n=!0)}for(x=0,S=g.length;x<S;x++)squarify(g[x],t,n,r+1)}}}function initChildren$1(e,t,n,r,o,i){var a=e.children||[],s=r.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=r.leafDepth&&r.leafDepth<=i;if(o&&!l)return e.viewChildren=[];sort$1(a=filter(a,function(e){return!e.isRemoved()}),s);var u=statistic(t,a,s);if(0===u.sum)return e.viewChildren=[];if(u.sum=filterByThreshold(t,n,u.sum,s,a),0===u.sum)return e.viewChildren=[];for(var c=0,d=a.length;c<d;c++){var p=a[c].getValue()/u.sum*n;a[c].setLayout({area:p})}return l&&(a.length&&e.setLayout({isLeafRoot:!0},!0),a.length=0),e.viewChildren=a,e.setLayout({dataExtent:u.dataExtent},!0),a}function filterByThreshold(e,t,n,r,o){if(!r)return n;for(var i=e.get("visibleMin"),a=o.length,s=a,l=a-1;l>=0;l--){var u=o["asc"===r?a-l-1:l].getValue();u/n*t<i&&(s=l,n-=u)}return"asc"===r?o.splice(0,a-s):o.splice(s,a-s),n}function sort$1(e,t){return t&&e.sort(function(e,n){var r="asc"===t?e.getValue()-n.getValue():n.getValue()-e.getValue();return 0===r?"asc"===t?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:r}),e}function statistic(e,t,n){for(var r=0,o=0,i=t.length;o<i;o++)r+=t[o].getValue();var a,s=e.get("visualDimension");return t&&t.length?"value"===s&&n?(a=[t[t.length-1].getValue(),t[0].getValue()],"asc"===n&&a.reverse()):(a=[1/0,-1/0],each$b(t,function(e){var t=e.getValue(s);t<a[0]&&(a[0]=t),t>a[1]&&(a[1]=t)})):a=[NaN,NaN],{sum:r,dataExtent:a}}function worst(e,t,n){for(var r=0,o=1/0,i=0,a=void 0,s=e.length;i<s;i++)(a=e[i].getLayout().area)&&(a<o&&(o=a),a>r&&(r=a));var l=e.area*e.area,u=t*t*n;return l?mathMax$3(u*r/l,l/(u*o)):1/0}function position(e,t,n,r,o){var i=t===n.width?0:1,a=1-i,s=["x","y"],l=["width","height"],u=n[s[i]],c=t?e.area/t:0;(o||c>n[l[a]])&&(c=n[l[a]]);for(var d=0,p=e.length;d<p;d++){var h=e[d],f={},g=c?h.getLayout().area/c:0,m=f[l[a]]=mathMax$3(c-2*r,0),y=n[s[i]]+n[l[i]]-u,v=d===p-1||y<g?y:g,_=f[l[i]]=mathMax$3(v-2*r,0);f[s[a]]=n[s[a]]+mathMin$3(r,m/2),f[s[i]]=u+mathMin$3(r,_/2),u+=v,h.setLayout(f,!0)}n[s[a]]+=c,n[l[a]]-=c}function estimateRootSize(e,t,n,r,o){var i,a=(t||{}).node,s=[r,o];if(!a||a===n)return s;for(var l=r*o,u=l*e.option.zoomToNodeRatio;i=a.parentNode;){for(var c=0,d=i.children,p=0,h=d.length;p<h;p++)c+=d[p].getValue();var f=a.getValue();if(0===f)return s;u*=c/f;var g=i.getModel(),m=g.get(PATH_BORDER_WIDTH);(u+=4*m*m+(3*m+Math.max(m,getUpperLabelHeight(g)))*Math.pow(u,.5))>MAX_SAFE_INTEGER&&(u=MAX_SAFE_INTEGER),a=i}u<l&&(u=l);var y=Math.pow(u/l,.5);return[r*y,o*y]}function calculateRootPosition(e,t,n){if(t)return{x:t.x,y:t.y};var r={x:0,y:0};if(!n)return r;var o=n.node,i=o.getLayout();if(!i)return r;for(var a=[i.width/2,i.height/2],s=o;s;){var l=s.getLayout();a[0]+=l.x,a[1]+=l.y,s=s.parentNode}return{x:e.width/2-a[0],y:e.height/2-a[1]}}function prunning(e,t,n,r,o){var i=e.getLayout(),a=n[o],s=a&&a===e;if(!(a&&!s||o===n.length&&e!==r)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(i),isAboveViewRoot:s},!0);var l=new BoundingRect(t.x-i.x,t.y-i.y,t.width,t.height);each$b(e.viewChildren||[],function(e){prunning(e,l,n,r,o+1)})}}function getUpperLabelHeight(e){return e.get(PATH_UPPER_LABEL_SHOW)?e.get(PATH_UPPER_LABEL_HEIGHT):0}function install$I(e){e.registerSeriesModel(TreemapSeriesModel),e.registerChartView(TreemapView),e.registerVisual(treemapVisual),e.registerLayout(treemapLayout),installTreemapAction(e)}function categoryFilter(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.eachSeriesByType("graph",function(e){var n=e.getCategoriesData(),r=e.getGraph().data,o=n.mapArray(n.getName);r.filterSelf(function(e){var n=r.getItemModel(e).getShallow("category");if(null!=n){isNumber(n)&&(n=o[n]);for(var i=0;i<t.length;i++)if(!t[i].isSelected(n))return!1}return!0})})}function categoryVisual(e){var t={};e.eachSeriesByType("graph",function(e){var n=e.getCategoriesData(),r=e.getData(),o={};n.each(function(r){var i=n.getName(r);o["ec-"+i]=r;var a=n.getItemModel(r),s=a.getModel("itemStyle").getItemStyle();s.fill||(s.fill=e.getColorFromPalette(i,t)),n.setItemVisual(r,"style",s);for(var l=["symbol","symbolSize","symbolKeepAspect"],u=0;u<l.length;u++){var c=a.getShallow(l[u],!0);null!=c&&n.setItemVisual(r,l[u],c)}}),n.count()&&r.each(function(e){var t=r.getItemModel(e).getShallow("category");if(null!=t){isString(t)&&(t=o["ec-"+t]);var i=n.getItemVisual(t,"style");extend$2(r.ensureUniqueItemVisual(e,"style"),i);for(var a=["symbol","symbolSize","symbolKeepAspect"],s=0;s<a.length;s++)r.setItemVisual(e,a[s],n.getItemVisual(t,a[s]))}})})}function normalize$1(e){return e instanceof Array||(e=[e,e]),e}function graphEdgeVisual(e){e.eachSeriesByType("graph",function(e){var t=e.getGraph(),n=e.getEdgeData(),r=normalize$1(e.get("edgeSymbol")),o=normalize$1(e.get("edgeSymbolSize"));n.setVisual("fromSymbol",r&&r[0]),n.setVisual("toSymbol",r&&r[1]),n.setVisual("fromSymbolSize",o&&o[0]),n.setVisual("toSymbolSize",o&&o[1]),n.setVisual("style",e.getModel("lineStyle").getLineStyle()),n.each(function(e){var r=n.getItemModel(e),o=t.getEdgeByIndex(e),i=normalize$1(r.getShallow("symbol",!0)),a=normalize$1(r.getShallow("symbolSize",!0)),s=r.getModel("lineStyle").getLineStyle(),l=n.ensureUniqueItemVisual(e,"style");switch(extend$2(l,s),l.stroke){case"source":var u=o.node1.getVisual("style");l.stroke=u&&u.fill;break;case"target":u=o.node2.getVisual("style");l.stroke=u&&u.fill}i[0]&&o.setVisual("fromSymbol",i[0]),i[1]&&o.setVisual("toSymbol",i[1]),a[0]&&o.setVisual("fromSymbolSize",a[0]),a[1]&&o.setVisual("toSymbolSize",a[1])})})}var KEY_DELIMITER="--\x3e",getAutoCurvenessParams=function(e){return e.get("autoCurveness")||null},createCurveness=function(e,t){var n=getAutoCurvenessParams(e),r=20,o=[];if(isNumber(n))r=n;else if(isArray$1(n))return void(e.__curvenessList=n);t>r&&(r=t);var i=r%2?r+2:r+3;o=[];for(var a=0;a<i;a++)o.push((a%2?a+1:a)/10*(a%2?-1:1));e.__curvenessList=o},getKeyOfEdges=function(e,t,n){var r=[e.id,e.dataIndex].join("."),o=[t.id,t.dataIndex].join(".");return[n.uid,r,o].join(KEY_DELIMITER)},getOppositeKey=function(e){var t=e.split(KEY_DELIMITER);return[t[0],t[2],t[1]].join(KEY_DELIMITER)},getEdgeFromMap=function(e,t){var n=getKeyOfEdges(e.node1,e.node2,t);return t.__edgeMap[n]},getTotalLengthBetweenNodes=function(e,t){return getEdgeMapLengthWithKey(getKeyOfEdges(e.node1,e.node2,t),t)+getEdgeMapLengthWithKey(getKeyOfEdges(e.node2,e.node1,t),t)},getEdgeMapLengthWithKey=function(e,t){var n=t.__edgeMap;return n[e]?n[e].length:0};function initCurvenessList(e){getAutoCurvenessParams(e)&&(e.__curvenessList=[],e.__edgeMap={},createCurveness(e))}function createEdgeMapForCurveness(e,t,n,r){if(getAutoCurvenessParams(n)){var o=getKeyOfEdges(e,t,n),i=n.__edgeMap,a=i[getOppositeKey(o)];i[o]&&!a?i[o].isForward=!0:a&&i[o]&&(a.isForward=!0,i[o].isForward=!1),i[o]=i[o]||[],i[o].push(r)}}function getCurvenessForEdge(e,t,n,r){var o=getAutoCurvenessParams(t),i=isArray$1(o);if(!o)return null;var a=getEdgeFromMap(e,t);if(!a)return null;for(var s=-1,l=0;l<a.length;l++)if(a[l]===n){s=l;break}var u=getTotalLengthBetweenNodes(e,t);createCurveness(t,u),e.lineStyle=e.lineStyle||{};var c=getKeyOfEdges(e.node1,e.node2,t),d=t.__curvenessList,p=i||u%2?0:1;if(a.isForward)return d[p+s];var h=getOppositeKey(c),f=getEdgeMapLengthWithKey(h,t),g=d[s+f+p];return r?i?o&&0===o[0]?(f+p)%2?g:-g:((f%2?0:1)+p)%2?g:-g:(f+p)%2?g:-g:d[s+f+p]}function simpleLayout(e){var t=e.coordinateSystem;if(!t||"view"===t.type){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get("x"),+t.get("y")])}),simpleLayoutEdge(n,e)}}function simpleLayoutEdge(e,t){e.eachEdge(function(e,n){var r=retrieve3(e.getModel().get(["lineStyle","curveness"]),-getCurvenessForEdge(e,t,n,!0),0),o=clone$5(e.node1.getLayout()),i=clone$5(e.node2.getLayout()),a=[o,i];+r&&a.push([(o[0]+i[0])/2-(o[1]-i[1])*r,(o[1]+i[1])/2-(i[0]-o[0])*r]),e.setLayout(a)})}function graphSimpleLayout(e,t){e.eachSeriesByType("graph",function(e){var t=e.get("layout"),n=e.coordinateSystem;if(n&&"view"!==n.type){var r=e.getData(),o=[];each$f(n.dimensions,function(e){o=o.concat(r.mapDimensionsAll(e))});for(var i=0;i<r.count();i++){for(var a=[],s=!1,l=0;l<o.length;l++){var u=r.get(o[l],i);isNaN(u)||(s=!0),a.push(u)}s?r.setItemLayout(i,n.dataToPoint(a)):r.setItemLayout(i,[NaN,NaN])}simpleLayoutEdge(r.graph,e)}else t&&"none"!==t||simpleLayout(e)})}function getNodeGlobalScale(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=e.option.nodeScaleRatio,r=t.scaleX;return((t.getZoom()-1)*n+1)/r}function getSymbolSize(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var PI$3=Math.PI,_symbolRadiansHalf=[];function circularLayout(e,t,n,r){var o=e.coordinateSystem;if(!o||"view"===o.type){var i=o.getBoundingRect(),a=e.getData(),s=a.graph,l=i.width/2+i.x,u=i.height/2+i.y,c=Math.min(i.width,i.height)/2,d=a.count();if(a.setLayout({cx:l,cy:u}),d){if(n){var p=o.pointToData(r),h=p[0],f=p[1],g=[h-l,f-u];normalize$3(g,g),scale$2(g,g,c),n.setLayout([l+g[0],u+g[1]],!0),rotateNodeLabel(n,e.get(["circular","rotateLabel"]),l,u)}_layoutNodesBasedOn[t](e,s,a,c,l,u,d),s.eachEdge(function(t,n){var r,o=retrieve3(t.getModel().get(["lineStyle","curveness"]),getCurvenessForEdge(t,e,n),0),i=clone$5(t.node1.getLayout()),a=clone$5(t.node2.getLayout()),s=(i[0]+a[0])/2,c=(i[1]+a[1])/2;+o&&(r=[l*(o*=3)+s*(1-o),u*o+c*(1-o)]),t.setLayout([i,a,r])})}}}var _layoutNodesBasedOn={value:function(e,t,n,r,o,i,a){var s=0,l=n.getSum("value"),u=2*Math.PI/(l||a);t.eachNode(function(e){var t=e.getValue("value"),n=u*(l?t:1)/2;s+=n,e.setLayout([r*Math.cos(s)+o,r*Math.sin(s)+i]),s+=n})},symbolSize:function(e,t,n,r,o,i,a){var s=0;_symbolRadiansHalf.length=a;var l=getNodeGlobalScale(e);t.eachNode(function(e){var t=getSymbolSize(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=l;var n=Math.asin(t/2/r);isNaN(n)&&(n=PI$3/2),_symbolRadiansHalf[e.dataIndex]=n,s+=2*n});var u=(2*PI$3-s)/a/2,c=0;t.eachNode(function(e){var t=u+_symbolRadiansHalf[e.dataIndex];c+=t,(!e.getLayout()||!e.getLayout().fixed)&&e.setLayout([r*Math.cos(c)+o,r*Math.sin(c)+i]),c+=t})}};function rotateNodeLabel(e,t,n,r){var o=e.getGraphicEl();if(o){var i=e.getModel().get(["label","rotate"])||0,a=o.getSymbolPath();if(t){var s=e.getLayout(),l=Math.atan2(s[1]-r,s[0]-n);l<0&&(l=2*Math.PI+l);var u=s[0]<n;u&&(l-=Math.PI);var c=u?"left":"right";a.setTextConfig({rotation:-l,position:c,origin:"center"});var d=a.ensureState("emphasis");extend$2(d.textConfig||(d.textConfig={}),{position:c})}else a.setTextConfig({rotation:i*=Math.PI/180})}}function graphCircularLayout(e){e.eachSeriesByType("graph",function(e){"circular"===e.get("layout")&&circularLayout(e,"symbolSize")})}var scaleAndAdd=scaleAndAdd$1;function forceLayout(e,t,n){for(var r=e,o=t,i=n.rect,a=i.width,s=i.height,l=[i.x+a/2,i.y+s/2],u=null==n.gravity?.1:n.gravity,c=0;c<r.length;c++){var d=r[c];d.p||(d.p=create$2(a*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),d.pp=clone$5(d.p),d.edges=null}var p,h,f=null==n.friction?.6:n.friction,g=f;return{warmUp:function(){g=.8*f},setFixed:function(e){r[e].fixed=!0},setUnfixed:function(e){r[e].fixed=!1},beforeStep:function(e){p=e},afterStep:function(e){h=e},step:function(e){p&&p(r,o);for(var t=[],n=r.length,i=0;i<o.length;i++){var a=o[i];if(!a.ignoreForceLayout){var s=a.n1;sub(t,(m=a.n2).p,s.p);var c=len(t)-a.d,d=m.w/(s.w+m.w);isNaN(d)&&(d=0),normalize$3(t,t),!s.fixed&&scaleAndAdd(s.p,s.p,t,d*c*g),!m.fixed&&scaleAndAdd(m.p,m.p,t,-(1-d)*c*g)}}for(i=0;i<n;i++){(_=r[i]).fixed||(sub(t,l,_.p),scaleAndAdd(_.p,_.p,t,u*g))}for(i=0;i<n;i++){s=r[i];for(var f=i+1;f<n;f++){var m;sub(t,(m=r[f]).p,s.p),0===(c=len(t))&&(set$1(t,Math.random()-.5,Math.random()-.5),c=1);var y=(s.rep+m.rep)/c/c;!s.fixed&&scaleAndAdd(s.pp,s.pp,t,y),!m.fixed&&scaleAndAdd(m.pp,m.pp,t,-y)}}var v=[];for(i=0;i<n;i++){var _;(_=r[i]).fixed||(sub(v,_.p,_.pp),scaleAndAdd(_.p,_.p,v,g),copy$1(_.pp,_.p))}var x=(g*=.992)<.01;h&&h(r,o,x),e&&e(x)}}}function graphForceLayout(e){e.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!t||"view"===t.type)if("force"===e.get("layout")){var n=e.preservedPoints||{},r=e.getGraph(),o=r.data,i=r.edgeData,a=e.getModel("force"),s=a.get("initLayout");e.preservedPoints?o.each(function(e){var t=o.getId(e);o.setItemLayout(e,n[t]||[NaN,NaN])}):s&&"none"!==s?"circular"===s&&circularLayout(e,"value"):simpleLayout(e);var l=o.getDataExtent("value"),u=i.getDataExtent("value"),c=a.get("repulsion"),d=a.get("edgeLength"),p=isArray$1(c)?c:[c,c],h=isArray$1(d)?d:[d,d];h=[h[1],h[0]];var f=o.mapArray("value",function(e,t){var n=o.getItemLayout(t),r=linearMap$2(e,l,p);return isNaN(r)&&(r=(p[0]+p[1])/2),{w:r,rep:r,fixed:o.getItemModel(t).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}}),g=i.mapArray("value",function(t,n){var o=r.getEdgeByIndex(n),i=linearMap$2(t,u,h);isNaN(i)&&(i=(h[0]+h[1])/2);var a=o.getModel(),s=retrieve3(o.getModel().get(["lineStyle","curveness"]),-getCurvenessForEdge(o,e,n,!0),0);return{n1:f[o.node1.dataIndex],n2:f[o.node2.dataIndex],d:i,curveness:s,ignoreForceLayout:a.get("ignoreForceLayout")}}),m=t.getBoundingRect(),y=forceLayout(f,g,{rect:m,gravity:a.get("gravity"),friction:a.get("friction")});y.beforeStep(function(e,t){for(var n=0,o=e.length;n<o;n++)e[n].fixed&&copy$1(e[n].p,r.getNodeByIndex(n).getLayout())}),y.afterStep(function(e,t,i){for(var a=0,s=e.length;a<s;a++)e[a].fixed||r.getNodeByIndex(a).setLayout(e[a].p),n[o.getId(a)]=e[a].p;for(a=0,s=t.length;a<s;a++){var l=t[a],u=r.getEdgeByIndex(a),c=l.n1.p,d=l.n2.p,p=u.getLayout();(p=p?p.slice():[])[0]=p[0]||[],p[1]=p[1]||[],copy$1(p[0],c),copy$1(p[1],d),+l.curveness&&(p[2]=[(c[0]+d[0])/2-(c[1]-d[1])*l.curveness,(c[1]+d[1])/2-(d[0]-c[0])*l.curveness]),u.setLayout(p)}}),e.forceLayout=y,e.preservedPoints=n,y.step()}else e.forceLayout=null})}function getViewRect$3(e,t,n){return getLayoutRect(extend$2(e.getBoxLayoutParams(),{aspect:n}),{width:t.getWidth(),height:t.getHeight()})}function createViewCoordSys(e,t){var n=[];return e.eachSeriesByType("graph",function(e){var r=e.get("coordinateSystem");if(!r||"view"===r){var o=e.getData(),i=[],a=[];fromPoints(o.mapArray(function(e){var t=o.getItemModel(e);return[+t.get("x"),+t.get("y")]}),i,a),a[0]-i[0]===0&&(a[0]+=1,i[0]-=1),a[1]-i[1]===0&&(a[1]+=1,i[1]-=1);var s=(a[0]-i[0])/(a[1]-i[1]),l=getViewRect$3(e,t,s);isNaN(s)&&(i=[l.x,l.y],a=[l.x+l.width,l.y+l.height]);var u=a[0]-i[0],c=a[1]-i[1],d=l.width,p=l.height,h=e.coordinateSystem=new View;h.zoomLimit=e.get("scaleLimit"),h.setBoundingRect(i[0],i[1],u,c),h.setViewRect(l.x,l.y,d,p),h.setCenter(e.get("center"),t),h.setZoom(e.get("zoom")),n.push(h)}}),n}var straightLineProto=Line$1.prototype,bezierCurveProto=BezierCurve.prototype,StraightLineShape=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};function isStraightLine(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}__extends(t,e)}(StraightLineShape);var ECLinePath=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-line",n}return __extends(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new StraightLineShape},t.prototype.buildPath=function(e,t){isStraightLine(t)?straightLineProto.buildPath.call(this,e,t):bezierCurveProto.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return isStraightLine(this.shape)?straightLineProto.pointAt.call(this,e):bezierCurveProto.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=isStraightLine(t)?[t.x2-t.x1,t.y2-t.y1]:bezierCurveProto.tangentAt.call(this,e);return normalize$3(n,n)},t}(Path),SYMBOL_CATEGORIES=["fromSymbol","toSymbol"];function makeSymbolTypeKey(e){return"_"+e+"Type"}function makeSymbolTypeValue(e,t,n){var r=t.getItemVisual(n,e);if(!r||"none"===r)return r;var o=t.getItemVisual(n,e+"Size"),i=t.getItemVisual(n,e+"Rotate"),a=t.getItemVisual(n,e+"Offset"),s=t.getItemVisual(n,e+"KeepAspect"),l=normalizeSymbolSize(o);return r+l+normalizeSymbolOffset(a||0,l)+(i||"")+(s||"")}function createSymbol(e,t,n){var r=t.getItemVisual(n,e);if(r&&"none"!==r){var o=t.getItemVisual(n,e+"Size"),i=t.getItemVisual(n,e+"Rotate"),a=t.getItemVisual(n,e+"Offset"),s=t.getItemVisual(n,e+"KeepAspect"),l=normalizeSymbolSize(o),u=normalizeSymbolOffset(a||0,l),c=createSymbol$1(r,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=null==i||isNaN(i)?void 0:+i*Math.PI/180||0,c.name=e,c}}function createLine(e){var t=new ECLinePath({name:"line",subPixelOptimize:!0});return setLinePoints(t.shape,e),t}function setLinePoints(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}var Line=function(e){function t(t,n,r){var o=e.call(this)||this;return o._createLine(t,n,r),o}return __extends(t,e),t.prototype._createLine=function(e,t,n){var r=e.hostModel,o=createLine(e.getItemLayout(t));o.shape.percent=0,initProps(o,{shape:{percent:1}},r,t),this.add(o),each$f(SYMBOL_CATEGORIES,function(n){var r=createSymbol(n,e,t);this.add(r),this[makeSymbolTypeKey(n)]=makeSymbolTypeValue(n,e,t)},this),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel,o=this.childOfName("line"),i=e.getItemLayout(t),a={shape:{}};setLinePoints(a.shape,i),updateProps$1(o,a,r,t),each$f(SYMBOL_CATEGORIES,function(n){var r=makeSymbolTypeValue(n,e,t),o=makeSymbolTypeKey(n);if(this[o]!==r){this.remove(this.childOfName(n));var i=createSymbol(n,e,t);this.add(i)}this[o]=r},this),this._updateCommonStl(e,t,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,t,n){var r=e.hostModel,o=this.childOfName("line"),i=n&&n.emphasisLineStyle,a=n&&n.blurLineStyle,s=n&&n.selectLineStyle,l=n&&n.labelStatesModels,u=n&&n.emphasisDisabled,c=n&&n.focus,d=n&&n.blurScope;if(!n||e.hasItemOption){var p=e.getItemModel(t),h=p.getModel("emphasis");i=h.getModel("lineStyle").getLineStyle(),a=p.getModel(["blur","lineStyle"]).getLineStyle(),s=p.getModel(["select","lineStyle"]).getLineStyle(),u=h.get("disabled"),c=h.get("focus"),d=h.get("blurScope"),l=getLabelStatesModels(p)}var f=e.getItemVisual(t,"style"),g=f.stroke;o.useStyle(f),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=i,o.ensureState("blur").style=a,o.ensureState("select").style=s,each$f(SYMBOL_CATEGORIES,function(e){var t=this.childOfName(e);if(t){t.setColor(g),t.style.opacity=f.opacity;for(var n=0;n<SPECIAL_STATES.length;n++){var r=SPECIAL_STATES[n],i=o.getState(r);if(i){var a=i.style||{},s=t.ensureState(r),l=s.style||(s.style={});null!=a.stroke&&(l[t.__isEmptyBrush?"stroke":"fill"]=a.stroke),null!=a.opacity&&(l.opacity=a.opacity)}}t.markRedraw()}},this);var m=r.getRawValue(t);setLabelStyle(this,l,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:g||"#000",defaultOpacity:f.opacity,defaultText:(null==m?e.getName(t):isFinite(m)?round$3(m):m)+""});var y=this.getTextContent();if(y){var v=l.normal;y.__align=y.style.align,y.__verticalAlign=y.style.verticalAlign,y.__position=v.get("position")||"middle";var _=v.get("distance");isArray$1(_)||(_=[_,_]),y.__labelDistance=_}this.setTextConfig({position:null,local:!0,inside:!1}),toggleHoverEmphasis(this,c,d,u)},t.prototype.highlight=function(){enterEmphasis(this)},t.prototype.downplay=function(){leaveEmphasis(this)},t.prototype.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName("line");setLinePoints(t.shape,e),t.dirty()},t.prototype.beforeUpdate=function(){var e=this,t=e.childOfName("fromSymbol"),n=e.childOfName("toSymbol"),r=e.getTextContent();if(t||n||r&&!r.ignore){for(var o=1,i=this.parent;i;)i.scaleX&&(o/=i.scaleX),i=i.parent;var a=e.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointAt(0),u=a.pointAt(s),c=sub([],u,l);if(normalize$3(c,c),t&&(t.setPosition(l),T(t,0),t.scaleX=t.scaleY=o*s,t.markRedraw()),n&&(n.setPosition(u),T(n,1),n.scaleX=n.scaleY=o*s,n.markRedraw()),r&&!r.ignore){r.x=r.y=0,r.originX=r.originY=0;var d=void 0,p=void 0,h=r.__labelDistance,f=h[0]*o,g=h[1]*o,m=s/2,y=a.tangentAt(m),v=[y[1],-y[0]],_=a.pointAt(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]);var x=y[0]<0?-1:1;if("start"!==r.__position&&"end"!==r.__position){var S=-Math.atan2(y[1],y[0]);u[0]<l[0]&&(S=Math.PI+S),r.rotation=S}var b=void 0;switch(r.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":b=-g,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":b=g,p="top";break;default:b=0,p="middle"}switch(r.__position){case"end":r.x=c[0]*f+u[0],r.y=c[1]*g+u[1],d=c[0]>.8?"left":c[0]<-.8?"right":"center",p=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":r.x=-c[0]*f+l[0],r.y=-c[1]*g+l[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",p=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":r.x=f*x+l[0],r.y=l[1]+b,d=y[0]<0?"right":"left",r.originX=-f*x,r.originY=-b;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":r.x=_[0],r.y=_[1]+b,d="center",r.originY=-b;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":r.x=-f*x+u[0],r.y=u[1]+b,d=y[0]>=0?"right":"left",r.originX=f*x,r.originY=-b}r.scaleX=r.scaleY=o,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||d})}}}function T(e,t){var n=e.__specifiedRotation;if(null==n){var r=a.tangentAt(t);e.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr("rotation",n)}},t}(Group$3),LineDraw=function(){function e(e){this.group=new Group$3,this._LineCtor=e||Line}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,o=n._lineData;n._lineData=e,o||r.removeAll();var i=makeSeriesScope$1(e);e.diff(o).add(function(n){t._doAdd(e,n,i)}).update(function(n,r){t._doUpdate(o,e,r,n,i)}).remove(function(e){r.remove(o.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=makeSeriesScope$1(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t){function n(e){e.isGroup||isEffectObject(e)||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var r=e.start;r<e.end;r++){if(lineNeedsDraw(t.getItemLayout(r))){var o=new this._LineCtor(t,r,this._seriesScope);o.traverse(n),this.group.add(o),t.setItemGraphicEl(r,o),this._progressiveEls.push(o)}}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){traverseElements(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(lineNeedsDraw(e.getItemLayout(t))){var r=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,r),this.group.add(r)}},e.prototype._doUpdate=function(e,t,n,r,o){var i=e.getItemGraphicEl(n);lineNeedsDraw(t.getItemLayout(r))?(i?i.updateData(t,r,o):i=new this._LineCtor(t,r,o),t.setItemGraphicEl(r,i),this.group.add(i)):this.group.remove(i)},e}();function isEffectObject(e){return e.animators&&e.animators.length>0}function makeSeriesScope$1(e){var t=e.hostModel,n=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:getLabelStatesModels(t)}}function isPointNaN(e){return isNaN(e[0])||isNaN(e[1])}function lineNeedsDraw(e){return e&&!isPointNaN(e[0])&&!isPointNaN(e[1])}var v1=[],v2=[],v3=[],quadraticAt=quadraticAt$1,v2DistSquare=distSquare,mathAbs=Math.abs;function intersectCurveCircle(e,t,n){for(var r,o=e[0],i=e[1],a=e[2],s=1/0,l=n*n,u=.1,c=.1;c<=.9;c+=.1){v1[0]=quadraticAt(o[0],i[0],a[0],c),v1[1]=quadraticAt(o[1],i[1],a[1],c),(h=mathAbs(v2DistSquare(v1,t)-l))<s&&(s=h,r=c)}for(var d=0;d<32;d++){var p=r+u;v2[0]=quadraticAt(o[0],i[0],a[0],r),v2[1]=quadraticAt(o[1],i[1],a[1],r),v3[0]=quadraticAt(o[0],i[0],a[0],p),v3[1]=quadraticAt(o[1],i[1],a[1],p);var h=v2DistSquare(v2,t)-l;if(mathAbs(h)<.01)break;var f=v2DistSquare(v3,t)-l;u/=2,h<0?f>=0?r+=u:r-=u:f>=0?r-=u:r+=u}return r}function adjustEdge(e,t){var n=[],r=quadraticSubdivide,o=[[],[],[]],i=[[],[]],a=[];t/=2,e.eachEdge(function(e,s){var l=e.getLayout(),u=e.getVisual("fromSymbol"),c=e.getVisual("toSymbol");l.__original||(l.__original=[clone$5(l[0]),clone$5(l[1])],l[2]&&l.__original.push(clone$5(l[2])));var d=l.__original;if(null!=l[2]){if(copy$1(o[0],d[0]),copy$1(o[1],d[2]),copy$1(o[2],d[1]),u&&"none"!==u){var p=getSymbolSize(e.node1),h=intersectCurveCircle(o,d[0],p*t);r(o[0][0],o[1][0],o[2][0],h,n),o[0][0]=n[3],o[1][0]=n[4],r(o[0][1],o[1][1],o[2][1],h,n),o[0][1]=n[3],o[1][1]=n[4]}if(c&&"none"!==c){p=getSymbolSize(e.node2),h=intersectCurveCircle(o,d[1],p*t);r(o[0][0],o[1][0],o[2][0],h,n),o[1][0]=n[1],o[2][0]=n[2],r(o[0][1],o[1][1],o[2][1],h,n),o[1][1]=n[1],o[2][1]=n[2]}copy$1(l[0],o[0]),copy$1(l[1],o[2]),copy$1(l[2],o[1])}else{if(copy$1(i[0],d[0]),copy$1(i[1],d[1]),sub(a,i[1],i[0]),normalize$3(a,a),u&&"none"!==u){p=getSymbolSize(e.node1);scaleAndAdd$1(i[0],i[0],a,p*t)}if(c&&"none"!==c){p=getSymbolSize(e.node2);scaleAndAdd$1(i[1],i[1],a,-p*t)}copy$1(l[0],i[0]),copy$1(l[1],i[1])}})}function isViewCoordSys(e){return"view"===e.type}var GraphView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.init=function(e,t){var n=new SymbolDraw,r=new LineDraw,o=this.group;this._controller=new RoamController(t.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(r.group),this._symbolDraw=n,this._lineDraw=r,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,o=e.coordinateSystem;this._model=e;var i=this._symbolDraw,a=this._lineDraw,s=this.group;if(isViewCoordSys(o)){var l={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?s.attr(l):updateProps$1(s,l,e)}adjustEdge(e.getGraph(),getNodeGlobalScale(e));var u=e.getData();i.updateData(u);var c=e.getEdgeData();a.updateData(c),this._updateNodeAndLinkScale(),this._updateController(e,t,n),clearTimeout(this._layoutTimeout);var d=e.forceLayout,p=e.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,p);var h=e.get("layout");u.graph.eachNode(function(t){var n=t.dataIndex,o=t.getGraphicEl(),i=t.getModel();if(o){o.off("drag").off("dragend");var a=i.get("draggable");a&&o.on("drag",function(i){switch(h){case"force":d.warmUp(),!r._layouting&&r._startForceLayoutIteration(d,p),d.setFixed(n),u.setItemLayout(n,[o.x,o.y]);break;case"circular":u.setItemLayout(n,[o.x,o.y]),t.setLayout({fixed:!0},!0),circularLayout(e,"symbolSize",t,[i.offsetX,i.offsetY]),r.updateLayout(e);break;default:u.setItemLayout(n,[o.x,o.y]),simpleLayoutEdge(e.getGraph(),e),r.updateLayout(e)}}).on("dragend",function(){d&&d.setUnfixed(n)}),o.setDraggable(a,!!i.get("cursor")),"adjacency"===i.get(["emphasis","focus"])&&(getECData(o).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get(["emphasis","focus"]);t&&"adjacency"===n&&(getECData(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var f="circular"===e.get("layout")&&e.get(["circular","rotateLabel"]),g=u.getLayout("cx"),m=u.getLayout("cy");u.graph.eachNode(function(e){rotateNodeLabel(e,f,g,m)}),this._firstRender=!1},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,t){var n=this;!function r(){e.step(function(e){n.updateLayout(n._model),(n._layouting=!e)&&(t?n._layoutTimeout=setTimeout(r,16):r())})}()},t.prototype._updateController=function(e,t,n){var r=this,o=this._controller,i=this._controllerHost,a=this.group;o.setPointerChecker(function(t,r,o){var i=a.getBoundingRect();return i.applyTransform(a.transform),i.contain(r,o)&&!onIrrelevantElement(t,n,e)}),isViewCoordSys(e.coordinateSystem)?(o.enable(e.get("roam")),i.zoomLimit=e.get("scaleLimit"),i.zoom=e.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(t){updateViewOnPan(i,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){updateViewOnZoom(i,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),r._updateNodeAndLinkScale(),adjustEdge(e.getGraph(),getNodeGlobalScale(e)),r._lineDraw.updateLayout(),n.updateLabelLayout()})):o.disable()},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=getNodeGlobalScale(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){adjustEdge(e.getGraph(),getNodeGlobalScale(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},t.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},t.type="graph",t}(ChartView);function generateNodeKey(e){return"_EC_"+e}var Graph=function(){function e(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(e,t){e=null==e?""+t:""+e;var n=this._nodesMap;if(!n[generateNodeKey(e)]){var r=new GraphNode(e,t);return r.hostGraph=this,this.nodes.push(r),n[generateNodeKey(e)]=r,r}},e.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},e.prototype.getNodeById=function(e){return this._nodesMap[generateNodeKey(e)]},e.prototype.addEdge=function(e,t,n){var r=this._nodesMap,o=this._edgesMap;if(isNumber(e)&&(e=this.nodes[e]),isNumber(t)&&(t=this.nodes[t]),e instanceof GraphNode||(e=r[generateNodeKey(e)]),t instanceof GraphNode||(t=r[generateNodeKey(t)]),e&&t){var i=e.id+"-"+t.id,a=new GraphEdge(e,t,n);return a.hostGraph=this,this._directed&&(e.outEdges.push(a),t.inEdges.push(a)),e.edges.push(a),e!==t&&t.edges.push(a),this.edges.push(a),o[i]=a,a}},e.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},e.prototype.getEdge=function(e,t){e instanceof GraphNode&&(e=e.id),t instanceof GraphNode&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},e.prototype.eachNode=function(e,t){for(var n=this.nodes,r=n.length,o=0;o<r;o++)n[o].dataIndex>=0&&e.call(t,n[o],o)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,o=0;o<r;o++)n[o].dataIndex>=0&&n[o].node1.dataIndex>=0&&n[o].node2.dataIndex>=0&&e.call(t,n[o],o)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof GraphNode||(t=this._nodesMap[generateNodeKey(t)]),t){for(var o="out"===n?"outEdges":"in"===n?"inEdges":"edges",i=0;i<this.nodes.length;i++)this.nodes[i].__visited=!1;if(!e.call(r,t,null))for(var a=[t];a.length;){var s=a.shift(),l=s[o];for(i=0;i<l.length;i++){var u=l[i],c=u.node1===s?u.node2:u.node1;if(!c.__visited){if(e.call(r,c,s))return;a.push(c),c.__visited=!0}}}}},e.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,r=this.edges,o=0,i=n.length;o<i;o++)n[o].dataIndex=-1;for(o=0,i=e.count();o<i;o++)n[e.getRawIndex(o)].dataIndex=o;t.filterSelf(function(e){var n=r[t.getRawIndex(e)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0});for(o=0,i=r.length;o<i;o++)r[o].dataIndex=-1;for(o=0,i=t.count();o<i;o++)r[t.getRawIndex(o)].dataIndex=o},e.prototype.clone=function(){for(var t=new e(this._directed),n=this.nodes,r=this.edges,o=0;o<n.length;o++)t.addNode(n[o].id,n[o].dataIndex);for(o=0;o<r.length;o++){var i=r[o];t.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return t},e}(),GraphNode=function(){function e(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=null==e?"":e,this.dataIndex=null==t?-1:t}return e.prototype.degree=function(){return this.edges.length},e.prototype.inDegree=function(){return this.inEdges.length},e.prototype.outDegree=function(){return this.outEdges.length},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},e.prototype.getTrajectoryDataIndices=function(){for(var e=createHashMap(),t=createHashMap(),n=0;n<this.edges.length;n++){var r=this.edges[n];if(!(r.dataIndex<0)){e.set(r.dataIndex,!0);for(var o=[r.node1],i=[r.node2],a=0;a<o.length;){var s=o[a];a++,t.set(s.dataIndex,!0);for(var l=0;l<s.inEdges.length;l++)e.set(s.inEdges[l].dataIndex,!0),o.push(s.inEdges[l].node1)}for(a=0;a<i.length;){var u=i[a];a++,t.set(u.dataIndex,!0);for(l=0;l<u.outEdges.length;l++)e.set(u.outEdges[l].dataIndex,!0),i.push(u.outEdges[l].node2)}}}return{edge:e.keys(),node:t.keys()}},e}(),GraphEdge=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=null==n?-1:n}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=createHashMap(),t=createHashMap();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],o=0;o<n.length;){var i=n[o];o++,t.set(i.dataIndex,!0);for(var a=0;a<i.inEdges.length;a++)e.set(i.inEdges[a].dataIndex,!0),n.push(i.inEdges[a].node1)}for(o=0;o<r.length;){var s=r[o];o++,t.set(s.dataIndex,!0);for(a=0;a<s.outEdges.length;a++)e.set(s.outEdges[a].dataIndex,!0),r.push(s.outEdges[a].node2)}return{edge:e.keys(),node:t.keys()}},e}();function createGraphDataProxyMixin(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||"value"),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}function createGraphFromNodeEdge(e,t,n,r,o){for(var i=new Graph(r),a=0;a<e.length;a++)i.addNode(retrieve(e[a].id,e[a].name,a),a);var s=[],l=[],u=0;for(a=0;a<t.length;a++){var c=t[a],d=c.source,p=c.target;i.addEdge(d,p,u)&&(l.push(c),s.push(retrieve(convertOptionIdName(c.id,null),d+" > "+p)),u++)}var h,f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)h=createSeriesData(e,n);else{var g=CoordinateSystemManager.get(f),m=g&&g.dimensions||[];indexOf(m,"value")<0&&m.concat(["value"]);var y=prepareSeriesDataSchema(e,{coordDimensions:m,encodeDefine:n.getEncode()}).dimensions;(h=new SeriesData(y,n)).initData(e)}var v=new SeriesData(["value"],n);return v.initData(l,s),o&&o(h,v),linkSeriesData({mainData:h,struct:i,structAttr:"graph",datas:{node:h,edge:v},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}mixin(GraphNode,createGraphDataProxyMixin("hostGraph","data")),mixin(GraphEdge,createGraphDataProxyMixin("hostGraph","edgeData"));var GraphSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return __extends(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments);var n=this;function r(){return n._categoriesData}this.legendVisualProvider=new LegendVisualProvider(r,r),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(t){e.prototype.mergeDefaultAndTheme.apply(this,arguments),defaultEmphasis(t,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],r=e.data||e.nodes||[],o=this;if(r&&n){initCurvenessList(this);var i=createGraphFromNodeEdge(r,n,this,!0,function(e,t){e.wrapMethod("getItemModel",function(e){var t=o._categoriesModels[e.getShallow("category")];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e});var n=Model.prototype.getModel;function r(e,t){var r=n.call(this,e,t);return r.resolveParentPath=i,r}function i(e){if(e&&("label"===e[0]||"label"===e[1])){var t=e.slice();return"label"===e[0]?t[0]="edgeLabel":"label"===e[1]&&(t[1]="edgeLabel"),t}return e}t.wrapMethod("getItemModel",function(e){return e.resolveParentPath=i,e.getModel=r,e})});return each$f(i.edges,function(e){createEdgeMapForCurveness(e.node1,e.node2,this,e.dataIndex)},this),i.data}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,t,n){if("edge"===n){var r=this.getData(),o=this.getDataParams(e,n),i=r.graph.getEdgeByIndex(e),a=r.getName(i.node1.dataIndex),s=r.getName(i.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),createTooltipMarkup("nameValue",{name:l.join(" > "),value:o.value,noValue:null==o.value})}return defaultSeriesFormatTooltip({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=map$1(this.option.categories||[],function(e){return null!=e.value?e:extend$2({value:0},e)}),t=new SeriesData(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(SeriesModel),actionInfo$1={type:"graphRoam",event:"graphRoam",update:"none"};function install$H(e){e.registerChartView(GraphView),e.registerSeriesModel(GraphSeriesModel),e.registerProcessor(categoryFilter),e.registerVisual(categoryVisual),e.registerVisual(graphEdgeVisual),e.registerLayout(graphSimpleLayout),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,graphCircularLayout),e.registerLayout(graphForceLayout),e.registerCoordinateSystem("graphView",{dimensions:View.dimensions,create:createViewCoordSys}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},noop),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},noop),e.registerAction(actionInfo$1,function(e,t,n){t.eachComponent({mainType:"series",query:e},function(t){var r=updateCenterAndZoom(t.coordinateSystem,e,void 0,n);t.setCenter&&t.setCenter(r.center),t.setZoom&&t.setZoom(r.zoom)})})}var PointerShape=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},PointerPath=function(e){function t(t){var n=e.call(this,t)||this;return n.type="pointer",n}return __extends(t,e),t.prototype.getDefaultShape=function(){return new PointerShape},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,o=t.r,i=t.width,a=t.angle,s=t.x-n(a)*i*(i>=o/3?1:2),l=t.y-r(a)*i*(i>=o/3?1:2);a=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+n(a)*i,t.y+r(a)*i),e.lineTo(t.x+n(t.angle)*o,t.y+r(t.angle)*o),e.lineTo(t.x-n(a)*i,t.y-r(a)*i),e.lineTo(s,l)},t}(Path);function parsePosition(e,t){var n=e.get("center"),r=t.getWidth(),o=t.getHeight(),i=Math.min(r,o);return{cx:parsePercent(n[0],t.getWidth()),cy:parsePercent(n[1],t.getHeight()),r:parsePercent(e.get("radius"),i/2)}}function formatLabel(e,t){var n=null==e?"":e+"";return t&&(isString(t)?n=t.replace("{value}",n):isFunction(t)&&(n=t(e))),n}var GaugeView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(e,t,n){this.group.removeAll();var r=e.get(["axisLine","lineStyle","color"]),o=parsePosition(e,n);this._renderMain(e,t,n,r,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,o){var i=this.group,a=e.get("clockwise"),s=-e.get("startAngle")/180*Math.PI,l=-e.get("endAngle")/180*Math.PI,u=e.getModel("axisLine"),c=u.get("roundCap")?SausagePath:Sector,d=u.get("show"),p=u.getModel("lineStyle"),h=p.get("width"),f=[s,l];normalizeArcAngles(f,!a);for(var g=(l=f[1])-(s=f[0]),m=s,y=[],v=0;d&&v<r.length;v++){var _=new c({shape:{startAngle:m,endAngle:l=s+g*Math.min(Math.max(r[v][0],0),1),cx:o.cx,cy:o.cy,clockwise:a,r0:o.r-h,r:o.r},silent:!0});_.setStyle({fill:r[v][1]}),_.setStyle(p.getLineStyle(["color","width"])),y.push(_),m=l}y.reverse(),each$f(y,function(e){return i.add(e)});var x=function(e){if(e<=0)return r[0][1];var t;for(t=0;t<r.length;t++)if(r[t][0]>=e&&(0===t?0:r[t-1][0])<e)return r[t][1];return r[t-1][1]};this._renderTicks(e,t,n,x,o,s,l,a,h),this._renderTitleAndDetail(e,t,n,x,o),this._renderAnchor(e,o),this._renderPointer(e,t,n,x,o,s,l,a,h)},t.prototype._renderTicks=function(e,t,n,r,o,i,a,s,l){for(var u,c,d=this.group,p=o.cx,h=o.cy,f=o.r,g=+e.get("min"),m=+e.get("max"),y=e.getModel("splitLine"),v=e.getModel("axisTick"),_=e.getModel("axisLabel"),x=e.get("splitNumber"),S=v.get("splitNumber"),b=parsePercent(y.get("length"),f),T=parsePercent(v.get("length"),f),A=i,w=(a-i)/x,C=w/S,E=y.getModel("lineStyle").getLineStyle(),M=v.getModel("lineStyle").getLineStyle(),I=y.get("distance"),P=0;P<=x;P++){if(u=Math.cos(A),c=Math.sin(A),y.get("show")){var D=new Line$1({shape:{x1:u*(f-(k=I?I+l:l))+p,y1:c*(f-k)+h,x2:u*(f-b-k)+p,y2:c*(f-b-k)+h},style:E,silent:!0});"auto"===E.stroke&&D.setStyle({stroke:r(P/x)}),d.add(D)}if(_.get("show")){var k=_.get("distance")+I,$=formatLabel(round$3(P/x*(m-g)+g),_.get("formatter")),R=r(P/x),L=u*(f-b-k)+p,O=c*(f-b-k)+h,N=_.get("rotate"),B=0;"radial"===N?(B=-A+2*Math.PI)>Math.PI/2&&(B+=Math.PI):"tangential"===N?B=-A-Math.PI/2:isNumber(N)&&(B=N*Math.PI/180),0===B?d.add(new ZRText({style:createTextStyle$1(_,{text:$,x:L,y:O,verticalAlign:c<-.8?"top":c>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:R}),silent:!0})):d.add(new ZRText({style:createTextStyle$1(_,{text:$,x:L,y:O,verticalAlign:"middle",align:"center"},{inheritColor:R}),silent:!0,originX:L,originY:O,rotation:B}))}if(v.get("show")&&P!==x){k=(k=v.get("distance"))?k+l:l;for(var V=0;V<=S;V++){u=Math.cos(A),c=Math.sin(A);var F=new Line$1({shape:{x1:u*(f-k)+p,y1:c*(f-k)+h,x2:u*(f-T-k)+p,y2:c*(f-T-k)+h},silent:!0,style:M});"auto"===M.stroke&&F.setStyle({stroke:r((P+V/S)/x)}),d.add(F),A+=C}A-=C}else A+=w}},t.prototype._renderPointer=function(e,t,n,r,o,i,a,s,l){var u=this.group,c=this._data,d=this._progressEls,p=[],h=e.get(["pointer","show"]),f=e.getModel("progress"),g=f.get("show"),m=e.getData(),y=m.mapDimension("value"),v=+e.get("min"),_=+e.get("max"),x=[v,_],S=[i,a];function b(t,n){var r,i=m.getItemModel(t).getModel("pointer"),a=parsePercent(i.get("width"),o.r),s=parsePercent(i.get("length"),o.r),l=e.get(["pointer","icon"]),u=i.get("offsetCenter"),c=parsePercent(u[0],o.r),d=parsePercent(u[1],o.r),p=i.get("keepAspect");return(r=l?createSymbol$1(l,c-a/2,d-s,a,s,null,p):new PointerPath({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:d}})).rotation=-(n+Math.PI/2),r.x=o.cx,r.y=o.cy,r}function T(e,t){var n=f.get("roundCap")?SausagePath:Sector,r=f.get("overlap"),a=r?f.get("width"):l/m.count(),u=r?o.r-a:o.r-(e+1)*a,c=r?o.r:o.r-e*a,d=new n({shape:{startAngle:i,endAngle:t,cx:o.cx,cy:o.cy,clockwise:s,r0:u,r:c}});return r&&(d.z2=linearMap$2(m.get(y,e),[v,_],[100,0],!0)),d}(g||h)&&(m.diff(c).add(function(t){var n=m.get(y,t);if(h){var r=b(t,i);initProps(r,{rotation:-((isNaN(+n)?S[0]:linearMap$2(n,x,S,!0))+Math.PI/2)},e),u.add(r),m.setItemGraphicEl(t,r)}if(g){var o=T(t,i),a=f.get("clip");initProps(o,{shape:{endAngle:linearMap$2(n,x,S,a)}},e),u.add(o),setCommonECData(e.seriesIndex,m.dataType,t,o),p[t]=o}}).update(function(t,n){var r=m.get(y,t);if(h){var o=c.getItemGraphicEl(n),a=o?o.rotation:i,s=b(t,a);s.rotation=a,updateProps$1(s,{rotation:-((isNaN(+r)?S[0]:linearMap$2(r,x,S,!0))+Math.PI/2)},e),u.add(s),m.setItemGraphicEl(t,s)}if(g){var l=d[n],v=T(t,l?l.shape.endAngle:i),_=f.get("clip");updateProps$1(v,{shape:{endAngle:linearMap$2(r,x,S,_)}},e),u.add(v),setCommonECData(e.seriesIndex,m.dataType,t,v),p[t]=v}}).execute(),m.each(function(e){var t=m.getItemModel(e),n=t.getModel("emphasis"),o=n.get("focus"),i=n.get("blurScope"),a=n.get("disabled");if(h){var s=m.getItemGraphicEl(e),l=m.getItemVisual(e,"style"),u=l.fill;if(s instanceof ZRImage){var c=s.style;s.useStyle(extend$2({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(t.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",r(linearMap$2(m.get(y,e),x,[0,1],!0))),s.z2EmphasisLift=0,setStatesStylesFromModel(s,t),toggleHoverEmphasis(s,o,i,a)}if(g){var d=p[e];d.useStyle(m.getItemVisual(e,"style")),d.setStyle(t.getModel(["progress","itemStyle"]).getItemStyle()),d.z2EmphasisLift=0,setStatesStylesFromModel(d,t),toggleHoverEmphasis(d,o,i,a)}}),this._progressEls=p)},t.prototype._renderAnchor=function(e,t){var n=e.getModel("anchor");if(n.get("show")){var r=n.get("size"),o=n.get("icon"),i=n.get("offsetCenter"),a=n.get("keepAspect"),s=createSymbol$1(o,t.cx-r/2+parsePercent(i[0],t.r),t.cy-r/2+parsePercent(i[1],t.r),r,r,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,o){var i=this,a=e.getData(),s=a.mapDimension("value"),l=+e.get("min"),u=+e.get("max"),c=new Group$3,d=[],p=[],h=e.isAnimationEnabled(),f=e.get(["pointer","showAbove"]);a.diff(this._data).add(function(e){d[e]=new ZRText({silent:!0}),p[e]=new ZRText({silent:!0})}).update(function(e,t){d[e]=i._titleEls[t],p[e]=i._detailEls[t]}).execute(),a.each(function(t){var n=a.getItemModel(t),i=a.get(s,t),g=new Group$3,m=r(linearMap$2(i,[l,u],[0,1],!0)),y=n.getModel("title");if(y.get("show")){var v=y.get("offsetCenter"),_=o.cx+parsePercent(v[0],o.r),x=o.cy+parsePercent(v[1],o.r);(M=d[t]).attr({z2:f?0:2,style:createTextStyle$1(y,{x:_,y:x,text:a.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:m})}),g.add(M)}var S=n.getModel("detail");if(S.get("show")){var b=S.get("offsetCenter"),T=o.cx+parsePercent(b[0],o.r),A=o.cy+parsePercent(b[1],o.r),w=parsePercent(S.get("width"),o.r),C=parsePercent(S.get("height"),o.r),E=e.get(["progress","show"])?a.getItemVisual(t,"style").fill:m,M=p[t],I=S.get("formatter");M.attr({z2:f?0:2,style:createTextStyle$1(S,{x:T,y:A,text:formatLabel(i,I),width:isNaN(w)?null:w,height:isNaN(C)?null:C,align:"center",verticalAlign:"middle"},{inheritColor:E})}),setLabelValueAnimation(M,{normal:S},i,function(e){return formatLabel(e,I)}),h&&animateLabelValue(M,t,a,e,{getFormattedLabel:function(e,t,n,r,o,a){return formatLabel(a?a.interpolatedValue:i,I)}}),g.add(M)}c.add(g)}),this.group.add(c),this._titleEls=d,this._detailEls=p},t.type="gauge",t}(ChartView),GaugeSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n}return __extends(t,e),t.prototype.getInitialData=function(e,t){return createSeriesDataSimply(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(SeriesModel);function install$G(e){e.registerChartView(GaugeView),e.registerSeriesModel(GaugeSeriesModel)}var opacityAccessPath$1=["itemStyle","opacity"],FunnelPiece=function(e){function t(t,n){var r=e.call(this)||this,o=r,i=new Polyline$1,a=new ZRText;return o.setTextContent(a),r.setTextGuideLine(i),r.updateData(t,n,!0),r}return __extends(t,e),t.prototype.updateData=function(e,t,n){var r=this,o=e.hostModel,i=e.getItemModel(t),a=e.getItemLayout(t),s=i.getModel("emphasis"),l=i.get(opacityAccessPath$1);l=null==l?1:l,n||saveOldStyle(r),r.useStyle(e.getItemVisual(t,"style")),r.style.lineJoin="round",n?(r.setShape({points:a.points}),r.style.opacity=0,initProps(r,{style:{opacity:l}},o,t)):updateProps$1(r,{style:{opacity:l},shape:{points:a.points}},o,t),setStatesStylesFromModel(r,i),this._updateLabel(e,t),toggleHoverEmphasis(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},t.prototype._updateLabel=function(e,t){var n=this,r=this.getTextGuideLine(),o=n.getTextContent(),i=e.hostModel,a=e.getItemModel(t),s=e.getItemLayout(t).label,l=e.getItemVisual(t,"style"),u=l.fill;setLabelStyle(o,getLabelStatesModels(a),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:l.opacity,defaultText:e.getName(t)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var c=s.linePoints;r.setShape({points:c}),n.textGuideLineConfig={anchor:c?new Point(c[0][0],c[0][1]):null},updateProps$1(o,{style:{x:s.x,y:s.y}},i,t),o.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),setLabelLineStyle(n,getLabelLineStatesModels(a),{stroke:u})},t}(Polygon),FunnelView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreLabelLineUpdate=!0,n}return __extends(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),o=this._data,i=this.group;r.diff(o).add(function(e){var t=new FunnelPiece(r,e);r.setItemGraphicEl(e,t),i.add(t)}).update(function(e,t){var n=o.getItemGraphicEl(t);n.updateData(r,e),i.add(n),r.setItemGraphicEl(e,n)}).remove(function(t){removeElementWithFadeOut(o.getItemGraphicEl(t),e,t)}).execute(),this._data=r},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(ChartView),FunnelSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new LegendVisualProvider(bind$1(this.getData,this),bind$1(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return createSeriesDataSimply(this,{coordDimensions:["value"],encodeDefaulter:curry$1(makeSeriesEncodeForNameBased,this)})},t.prototype._defaultLabelLine=function(e){defaultEmphasis(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var n=this.getData(),r=e.prototype.getDataParams.call(this,t),o=n.mapDimension("value"),i=n.getSum(o);return r.percent=i?+(n.get(o,t)/i*100).toFixed(2):0,r.$vars.push("percent"),r},t.type="series.funnel",t.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"}}},t}(SeriesModel);function getViewRect$2(e,t){return getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function getSortedIndices(e,t){for(var n=e.mapDimension("value"),r=e.mapArray(n,function(e){return e}),o=[],i="ascending"===t,a=0,s=e.count();a<s;a++)o[a]=a;return isFunction(t)?o.sort(t):"none"!==t&&o.sort(function(e,t){return i?r[e]-r[t]:r[t]-r[e]}),o}function labelLayout(e){var t=e.hostModel.get("orient");e.each(function(n){var r,o,i,a,s=e.getItemModel(n),l=s.getModel("label").get("position"),u=s.getModel("labelLine"),c=e.getItemLayout(n),d=c.points,p="inner"===l||"inside"===l||"center"===l||"insideLeft"===l||"insideRight"===l;if(p)"insideLeft"===l?(o=(d[0][0]+d[3][0])/2+5,i=(d[0][1]+d[3][1])/2,r="left"):"insideRight"===l?(o=(d[1][0]+d[2][0])/2-5,i=(d[1][1]+d[2][1])/2,r="right"):(o=(d[0][0]+d[1][0]+d[2][0]+d[3][0])/4,i=(d[0][1]+d[1][1]+d[2][1]+d[3][1])/4,r="center"),a=[[o,i],[o,i]];else{var h=void 0,f=void 0,g=void 0,m=void 0,y=u.get("length");"left"===l?(h=(d[3][0]+d[0][0])/2,f=(d[3][1]+d[0][1])/2,o=(g=h-y)-5,r="right"):"right"===l?(h=(d[1][0]+d[2][0])/2,f=(d[1][1]+d[2][1])/2,o=(g=h+y)+5,r="left"):"top"===l?(h=(d[3][0]+d[0][0])/2,i=(m=(f=(d[3][1]+d[0][1])/2)-y)-5,r="center"):"bottom"===l?(h=(d[1][0]+d[2][0])/2,i=(m=(f=(d[1][1]+d[2][1])/2)+y)+5,r="center"):"rightTop"===l?(h="horizontal"===t?d[3][0]:d[1][0],f="horizontal"===t?d[3][1]:d[1][1],"horizontal"===t?(i=(m=f-y)-5,r="center"):(o=(g=h+y)+5,r="top")):"rightBottom"===l?(h=d[2][0],f=d[2][1],"horizontal"===t?(i=(m=f+y)+5,r="center"):(o=(g=h+y)+5,r="bottom")):"leftTop"===l?(h=d[0][0],f="horizontal"===t?d[0][1]:d[1][1],"horizontal"===t?(i=(m=f-y)-5,r="center"):(o=(g=h-y)-5,r="right")):"leftBottom"===l?(h="horizontal"===t?d[1][0]:d[3][0],f="horizontal"===t?d[1][1]:d[2][1],"horizontal"===t?(i=(m=f+y)+5,r="center"):(o=(g=h-y)-5,r="right")):(h=(d[1][0]+d[2][0])/2,f=(d[1][1]+d[2][1])/2,"horizontal"===t?(i=(m=f+y)+5,r="center"):(o=(g=h+y)+5,r="left")),"horizontal"===t?o=g=h:i=m=f,a=[[h,f],[g,m]]}c.label={linePoints:a,x:o,y:i,verticalAlign:"middle",textAlign:r,inside:p}})}function funnelLayout(e,t){e.eachSeriesByType("funnel",function(e){var n=e.getData(),r=n.mapDimension("value"),o=e.get("sort"),i=getViewRect$2(e,t),a=e.get("orient"),s=i.width,l=i.height,u=getSortedIndices(n,o),c=i.x,d=i.y,p="horizontal"===a?[parsePercent(e.get("minSize"),l),parsePercent(e.get("maxSize"),l)]:[parsePercent(e.get("minSize"),s),parsePercent(e.get("maxSize"),s)],h=n.getDataExtent(r),f=e.get("min"),g=e.get("max");null==f&&(f=Math.min(h[0],0)),null==g&&(g=h[1]);var m=e.get("funnelAlign"),y=e.get("gap"),v=(("horizontal"===a?s:l)-y*(n.count()-1))/n.count(),_=function(e,t){if("horizontal"===a){var o=linearMap$2(n.get(r,e)||0,[f,g],p,!0),i=void 0;switch(m){case"top":i=d;break;case"center":i=d+(l-o)/2;break;case"bottom":i=d+(l-o)}return[[t,i],[t,i+o]]}var u,h=linearMap$2(n.get(r,e)||0,[f,g],p,!0);switch(m){case"left":u=c;break;case"center":u=c+(s-h)/2;break;case"right":u=c+s-h}return[[u,t],[u+h,t]]};"ascending"===o&&(v=-v,y=-y,"horizontal"===a?c+=s:d+=l,u=u.reverse());for(var x=0;x<u.length;x++){var S=u[x],b=u[x+1],T=n.getItemModel(S);if("horizontal"===a){var A=T.get(["itemStyle","width"]);null==A?A=v:(A=parsePercent(A,s),"ascending"===o&&(A=-A));var w=_(S,c),C=_(b,c+A);c+=A+y,n.setItemLayout(S,{points:w.concat(C.slice().reverse())})}else{var E=T.get(["itemStyle","height"]);null==E?E=v:(E=parsePercent(E,l),"ascending"===o&&(E=-E));w=_(S,d),C=_(b,d+E);d+=E+y,n.setItemLayout(S,{points:w.concat(C.slice().reverse())})}}labelLayout(n)})}function install$F(e){e.registerChartView(FunnelView),e.registerSeriesModel(FunnelSeriesModel),e.registerLayout(funnelLayout),e.registerProcessor(dataFilter$1("funnel"))}var DEFAULT_SMOOTH=.3,ParallelView$1=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._dataGroup=new Group$3,n._initialized=!1,n}return __extends(t,e),t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var o=this._dataGroup,i=e.getData(),a=this._data,s=e.coordinateSystem,l=s.dimensions,u=makeSeriesScope(e);if(i.diff(a).add(function(e){updateElCommon(addEl(i,o,e,l,s),i,e,u)}).update(function(t,n){var r=a.getItemGraphicEl(n),o=createLinePoints(i,t,l,s);i.setItemGraphicEl(t,r),updateProps$1(r,{shape:{points:o}},e,t),saveOldStyle(r),updateElCommon(r,i,t,u)}).remove(function(e){var t=a.getItemGraphicEl(e);o.remove(t)}).execute(),!this._initialized){this._initialized=!0;var c=createGridClipShape$2(s,e,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(c)}this._data=i},t.prototype.incrementalPrepareRender=function(e,t,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(e,t,n){for(var r=t.getData(),o=t.coordinateSystem,i=o.dimensions,a=makeSeriesScope(t),s=this._progressiveEls=[],l=e.start;l<e.end;l++){var u=addEl(r,this._dataGroup,l,i,o);u.incremental=!0,updateElCommon(u,r,l,a),s.push(u)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t}(ChartView);function createGridClipShape$2(e,t,n){var r=e.model,o=e.getRect(),i=new Rect$2({shape:{x:o.x,y:o.y,width:o.width,height:o.height}}),a="horizontal"===r.get("layout")?"width":"height";return i.setShape(a,0),initProps(i,{shape:{width:o.width,height:o.height}},t,n),i}function createLinePoints(e,t,n,r){for(var o=[],i=0;i<n.length;i++){var a=n[i],s=e.get(e.mapDimension(a),t);isEmptyValue(s,r.getAxis(a).type)||o.push(r.dataToPoint(s,a))}return o}function addEl(e,t,n,r,o){var i=createLinePoints(e,n,r,o),a=new Polyline$1({shape:{points:i},z2:10});return t.add(a),e.setItemGraphicEl(n,a),a}function makeSeriesScope(e){var t=e.get("smooth",!0);return!0===t&&(t=DEFAULT_SMOOTH),eqNaN(t=numericToNumber(t))&&(t=0),{smooth:t}}function updateElCommon(e,t,n,r){e.useStyle(t.getItemVisual(n,"style")),e.style.fill=null,e.setShape("smooth",r.smooth);var o=t.getItemModel(n),i=o.getModel("emphasis");setStatesStylesFromModel(e,o,"lineStyle"),toggleHoverEmphasis(e,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function isEmptyValue(e,t){return"category"===t?null==e:null==e||isNaN(e)}var ParallelSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return __extends(t,e),t.prototype.getInitialData=function(e,t){return createSeriesData(null,this,{useEncodeDefaulter:bind$1(makeDefaultEncode,null,this)})},t.prototype.getRawIndicesByActiveState=function(e){var t=this.coordinateSystem,n=this.getData(),r=[];return t.eachActiveState(n,function(t,o){e===t&&r.push(n.getRawIndex(o))}),r},t.type="series.parallel",t.dependencies=["parallel"],t.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},t}(SeriesModel);function makeDefaultEncode(e){var t=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(t){var n={};return each$f(t.dimensions,function(e){var t=convertDimNameToNumber(e);n[e]=t}),n}}function convertDimNameToNumber(e){return+e.replace("dim","")}var opacityAccessPath=["lineStyle","opacity"],parallelVisual={seriesType:"parallel",reset:function(e,t){var n=e.coordinateSystem,r={normal:e.get(["lineStyle","opacity"]),active:e.get("activeOpacity"),inactive:e.get("inactiveOpacity")};return{progress:function(e,t){n.eachActiveState(t,function(e,n){var o=r[e];if("normal"===e&&t.hasItemOption){var i=t.getItemModel(n).get(opacityAccessPath,!0);null!=i&&(o=i)}t.ensureUniqueItemVisual(n,"style").opacity=o},e.start,e.end)}}}};function parallelPreprocessor(e){createParallelIfNeeded(e),mergeAxisOptionFromParallel(e)}function createParallelIfNeeded(e){if(!e.parallel){var t=!1;each$f(e.series,function(e){e&&"parallel"===e.type&&(t=!0)}),t&&(e.parallel=[{}])}}function mergeAxisOptionFromParallel(e){each$f(normalizeToArray(e.parallelAxis),function(t){if(isObject$3(t)){var n=t.parallelIndex||0,r=normalizeToArray(e.parallel)[n];r&&r.parallelAxisDefault&&merge(t,r.parallelAxisDefault,!1)}})}var CLICK_THRESHOLD=5,ParallelView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(e,t,n){this._model=e,this._api=n,this._handlers||(this._handlers={},each$f(handlers$1,function(e,t){n.getZr().on(t,this._handlers[t]=bind$1(e,this))},this)),createOrUpdate(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(e,t){clear$1(this,"_throttledDispatchExpand"),each$f(this._handlers,function(e,n){t.getZr().off(n,e)}),this._handlers=null},t.prototype._throttledDispatchExpand=function(e){this._dispatchExpand(e)},t.prototype._dispatchExpand=function(e){e&&this._api.dispatchAction(extend$2({type:"parallelAxisExpand"},e))},t.type="parallel",t}(ComponentView),handlers$1={mousedown:function(e){checkTrigger(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(checkTrigger(this,"click")&&t){var n=[e.offsetX,e.offsetY];if(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2)>CLICK_THRESHOLD)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==r.behavior&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&checkTrigger(this,"mousemove")){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),r=n.behavior;"jump"===r&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===r?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===r?null:{duration:0}})}}};function checkTrigger(e,t){var n=e._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===t}var ParallelModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var t=this.option;e&&merge(t,e,!0),this._initDimensions()},t.prototype.contains=function(e,t){var n=e.get("parallelIndex");return null!=n&&t.getComponent("parallel",n)===this},t.prototype.setAxisExpand=function(e){each$f(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[];each$f(filter(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(e){return(e.get("parallelIndex")||0)===this.componentIndex},this),function(n){e.push("dim"+n.get("dim")),t.push(n.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(ComponentModel),ParallelAxis=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n,r)||this;return a.type=o||"value",a.axisIndex=i,a}return __extends(t,e),t.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},t}(Axis);function sliderMove(e,t,n,r,o,i){e=e||0;var a=n[1]-n[0];if(null!=o&&(o=restrict$1(o,[0,a])),null!=i&&(i=Math.max(i,null!=o?o:0)),"all"===r){var s=Math.abs(t[1]-t[0]);s=restrict$1(s,[0,a]),o=i=restrict$1(s,[o,i]),r=0}t[0]=restrict$1(t[0],n),t[1]=restrict$1(t[1],n);var l=getSpanSign(t,r);t[r]+=e;var u,c=o||0,d=n.slice();return l.sign<0?d[0]+=c:d[1]-=c,t[r]=restrict$1(t[r],d),u=getSpanSign(t,r),null!=o&&(u.sign!==l.sign||u.span<o)&&(t[1-r]=t[r]+l.sign*o),u=getSpanSign(t,r),null!=i&&u.span>i&&(t[1-r]=t[r]+u.sign*i),t}function getSpanSign(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function restrict$1(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var each$a=each$f,mathMin$2=Math.min,mathMax$2=Math.max,mathFloor=Math.floor,mathCeil=Math.ceil,round$1=round$3,PI$2=Math.PI,Parallel=function(){function e(e,t,n){this.type="parallel",this._axesMap=createHashMap(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var r=e.dimensions,o=e.parallelAxisIndex;each$a(r,function(e,n){var r=o[n],i=t.getComponent("parallelAxis",r),a=this._axesMap.set(e,new ParallelAxis(e,createScaleByModel$1(i),[0,0],i.get("type"),r)),s="category"===a.type;a.onBand=s&&i.get("boundaryGap"),a.inverse=i.get("inverse"),i.axis=a,a.model=i,a.coordinateSystem=i.coordinateSystem=this},this)},e.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},e.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,r=t.layoutBase,o=t.pixelDimIndex,i=e[1-o],a=e[o];return i>=n&&i<=n+t.axisLength&&a>=r&&a<=r+t.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(n){if(e.contains(n,t)){var r=n.getData();each$a(this.dimensions,function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(r,r.mapDimension(e)),niceScaleExtent(t.scale,t.model)},this)}},this)},e.prototype.resize=function(e,t){this._rect=getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var e,t=this._model,n=this._rect,r=["x","y"],o=["width","height"],i=t.get("layout"),a="horizontal"===i?0:1,s=n[o[a]],l=[0,s],u=this.dimensions.length,c=restrict(t.get("axisExpandWidth"),l),d=restrict(t.get("axisExpandCount")||0,[0,u]),p=t.get("axisExpandable")&&u>3&&u>d&&d>1&&c>0&&s>0,h=t.get("axisExpandWindow");h?(e=restrict(h[1]-h[0],l),h[1]=h[0]+e):(e=restrict(c*(d-1),l),(h=[c*(t.get("axisExpandCenter")||mathFloor(u/2))-e/2])[1]=h[0]+e);var f=(s-e)/(u-d);f<3&&(f=0);var g=[mathFloor(round$1(h[0]/c,1))+1,mathCeil(round$1(h[1]/c,1))-1],m=f/c*h[0];return{layout:i,pixelDimIndex:a,layoutBase:n[r[a]],layoutLength:s,axisBase:n[r[1-a]],axisLength:n[o[1-a]],axisExpandable:p,axisExpandWidth:c,axisCollapseWidth:f,axisExpandWindow:h,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},e.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,r=this._makeLayoutInfo(),o=r.layout;t.each(function(e){var t=[0,r.axisLength],n=e.inverse?1:0;e.setExtent(t[n],t[1-n])}),each$a(n,function(t,n){var i=(r.axisExpandable?layoutAxisWithExpand:layoutAxisWithoutExpand)(n,r),a={horizontal:{x:i.position,y:r.axisLength},vertical:{x:0,y:i.position}},s={horizontal:PI$2/2,vertical:0},l=[a[o].x+e.x,a[o].y+e.y],u=s[o],c=create$1();rotate(c,c,u),translate(c,c,l),this._axesLayout[t]={position:l,rotation:u,transform:c,axisNameAvailableWidth:i.axisNameAvailableWidth,axisLabelShow:i.axisLabelShow,nameTruncateMaxWidth:i.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},e.prototype.getAxis=function(e){return this._axesMap.get(e)},e.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},e.prototype.eachActiveState=function(e,t,n,r){null==n&&(n=0),null==r&&(r=e.count());var o=this._axesMap,i=this.dimensions,a=[],s=[];each$f(i,function(t){a.push(e.mapDimension(t)),s.push(o.get(t).model)});for(var l=this.hasAxisBrushed(),u=n;u<r;u++){var c=void 0;if(l){c="active";for(var d=e.getValues(a,u),p=0,h=i.length;p<h;p++){if("inactive"===s[p].getActiveState(d[p])){c="inactive";break}}}else c="normal";t(c,u)}},e.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,n=!1,r=0,o=e.length;r<o;r++)"normal"!==t.get(e[r]).model.getActiveState()&&(n=!0);return n},e.prototype.axisCoordToPoint=function(e,t){return applyTransform([e,0],this._axesLayout[t].transform)},e.prototype.getAxisLayout=function(e){return clone$6(this._axesLayout[e])},e.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,r=t.axisExpandWindow.slice(),o=r[1]-r[0],i=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:r};var a,s=e[n]-t.layoutBase-t.axisExpandWindow0Pos,l="slide",u=t.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),d=null!=c[0];if(u)d&&u&&s<o*c[0]?(l="jump",a=s-o*c[2]):d&&u&&s>o*(1-c[0])?(l="jump",a=s-o*(1-c[2])):(a=s-o*c[1])>=0&&(a=s-o*(1-c[1]))<=0&&(a=0),(a*=t.axisExpandWidth/u)?sliderMove(a,r,i,"all"):l="none";else{var p=r[1]-r[0];(r=[mathMax$2(0,i[1]*s/p-p/2)])[1]=mathMin$2(i[1],r[0]+p),r[0]=r[1]-p}return{axisExpandWindow:r,behavior:l}},e}();function restrict(e,t){return mathMin$2(mathMax$2(e,t[0]),t[1])}function layoutAxisWithoutExpand(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function layoutAxisWithExpand(e,t){var n,r,o=t.layoutLength,i=t.axisExpandWidth,a=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,u=s,c=!1;return e<l[0]?(n=e*s,r=s):e<=l[1]?(n=t.axisExpandWindow0Pos+e*i-t.axisExpandWindow[0],u=i,c=!0):(n=o-(a-1-e)*s,r=s),{position:n,axisNameAvailableWidth:u,axisLabelShow:c,nameTruncateMaxWidth:r}}function createParallelCoordSys(e,t){var n=[];return e.eachComponent("parallel",function(r,o){var i=new Parallel(r,e,t);i.name="parallel_"+o,i.resize(r,t),r.coordinateSystem=i,i.model=r,n.push(i)}),e.eachSeries(function(e){if("parallel"===e.get("coordinateSystem")){var t=e.getReferringComponents("parallel",SINGLE_REFERRING).models[0];e.coordinateSystem=t.coordinateSystem}}),n}var parallelCoordSysCreator={create:createParallelCoordSys},ParallelAxisModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.activeIntervals=[],n}return __extends(t,e),t.prototype.getAreaSelectStyle=function(){return makeStyleMapper([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(e){var t=this.activeIntervals=clone$6(e);if(t)for(var n=t.length-1;n>=0;n--)asc$2(t[n])},t.prototype.getActiveState=function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(+e))return"inactive";if(1===t.length){var n=t[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var r=0,o=t.length;r<o;r++)if(t[r][0]<=e&&e<=t[r][1])return"active";return"inactive"},t}(ComponentModel);mixin(ParallelAxisModel,AxisModelCommonMixin);var BRUSH_PANEL_GLOBAL=!0,mathMin$1=Math.min,mathMax$1=Math.max,mathPow=Math.pow,COVER_Z=1e4,UNSELECT_THRESHOLD=6,MIN_RESIZE_LINE_WIDTH=6,MUTEX_RESOURCE_KEY="globalPan",DIRECTION_MAP={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},CURSOR_MAP={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},DEFAULT_BRUSH_OPT={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},baseUID=0,BrushController=function(e){function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new Group$3,n._uid="brushController_"+baseUID++,each$f(pointerHandlers,function(e,t){this._handlers[t]=bind$1(e,this)},n),n}return __extends(t,e),t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var t=this._zr;this._enableGlobalPan||take(t,MUTEX_RESOURCE_KEY,this._uid),each$f(this._handlers,function(e,n){t.on(n,e)}),this._brushType=e.brushType,this._brushOption=merge(clone$6(DEFAULT_BRUSH_OPT),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;release(e,MUTEX_RESOURCE_KEY,this._uid),each$f(this._handlers,function(t,n){e.off(n,t)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var t=this._panels={};each$f(e,function(e){t[e.panelId]=clone$6(e)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=t.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=map$1(e,function(e){return merge(clone$6(DEFAULT_BRUSH_OPT),e,!0)});var t=this._covers,n=this._covers=[],r=this,o=this._creatingCover;return new DataDiffer(t,e,function(e,t){return i(e.__brushOption,t)},i).add(a).update(a).remove(function(e){t[e]!==o&&r.group.remove(t[e])}).execute(),this;function i(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function a(i,a){var s=e[i];if(null!=a&&t[a]===o)n[i]=t[a];else{var l=n[i]=null!=a?(t[a].__brushOption=s,t[a]):endCreating(r,createCover(r,s));updateCoverAfterCreation(r,l)}}},t.prototype.unmount=function(){return this.enableBrush(!1),clearCovers(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(Eventful);function createCover(e,t){var n=coverRenderers[t.brushType].createCover(e,t);return n.__brushOption=t,updateZ$1(n,t),e.group.add(n),n}function endCreating(e,t){var n=getCoverRenderer(t);return n.endCreating&&(n.endCreating(e,t),updateZ$1(t,t.__brushOption)),t}function updateCoverShape(e,t){var n=t.__brushOption;getCoverRenderer(t).updateCoverShape(e,t,n.range,n)}function updateZ$1(e,t){var n=t.z;null==n&&(n=COVER_Z),e.traverse(function(e){e.z=n,e.z2=n})}function updateCoverAfterCreation(e,t){getCoverRenderer(t).updateCommon(e,t),updateCoverShape(e,t)}function getCoverRenderer(e){return coverRenderers[e.__brushOption.brushType]}function getPanelByPoint(e,t,n){var r,o=e._panels;if(!o)return BRUSH_PANEL_GLOBAL;var i=e._transform;return each$f(o,function(e){e.isTargetByCursor(t,n,i)&&(r=e)}),r}function getPanelByCover(e,t){var n=e._panels;if(!n)return BRUSH_PANEL_GLOBAL;var r=t.__brushOption.panelId;return null!=r?n[r]:BRUSH_PANEL_GLOBAL}function clearCovers(e){var t=e._covers,n=t.length;return each$f(t,function(t){e.group.remove(t)},e),t.length=0,!!n}function trigger(e,t){var n=map$1(e._covers,function(e){var t=e.__brushOption,n=clone$6(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}});e.trigger("brush",{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function shouldShowCover(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],r=t[0],o=n[0]-r[0],i=n[1]-r[1];return mathPow(o*o+i*i,.5)>UNSELECT_THRESHOLD}function getTrackEnds(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function createBaseRectCover(e,t,n,r){var o=new Group$3;return o.add(new Rect$2({name:"main",style:makeStyle(n),silent:!0,draggable:!0,cursor:"move",drift:curry$1(driftRect,e,t,o,["n","s","w","e"]),ondragend:curry$1(trigger,t,{isEnd:!0})})),each$f(r,function(n){o.add(new Rect$2({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:curry$1(driftRect,e,t,o,n),ondragend:curry$1(trigger,t,{isEnd:!0})}))}),o}function updateBaseRect(e,t,n,r){var o=r.brushStyle.lineWidth||0,i=mathMax$1(o,MIN_RESIZE_LINE_WIDTH),a=n[0][0],s=n[1][0],l=a-o/2,u=s-o/2,c=n[0][1],d=n[1][1],p=c-i+o/2,h=d-i+o/2,f=c-a,g=d-s,m=f+o,y=g+o;updateRectShape(e,t,"main",a,s,f,g),r.transformable&&(updateRectShape(e,t,"w",l,u,i,y),updateRectShape(e,t,"e",p,u,i,y),updateRectShape(e,t,"n",l,u,m,i),updateRectShape(e,t,"s",l,h,m,i),updateRectShape(e,t,"nw",l,u,i,i),updateRectShape(e,t,"ne",p,u,i,i),updateRectShape(e,t,"sw",l,h,i,i),updateRectShape(e,t,"se",p,h,i,i))}function updateCommon$1(e,t){var n=t.__brushOption,r=n.transformable,o=t.childAt(0);o.useStyle(makeStyle(n)),o.attr({silent:!r,cursor:r?"move":"default"}),each$f([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var o=t.childOfName(n.join("")),i=1===n.length?getGlobalDirection1(e,n[0]):getGlobalDirection2(e,n);o&&o.attr({silent:!r,invisible:!r,cursor:r?CURSOR_MAP[i]+"-resize":null})})}function updateRectShape(e,t,n,r,o,i,a){var s=t.childOfName(n);s&&s.setShape(pointsToRect(clipByPanel(e,t,[[r,o],[r+i,o+a]])))}function makeStyle(e){return defaults$2({strokeNoScale:!0},e.brushStyle)}function formatRectRange(e,t,n,r){var o=[mathMin$1(e,n),mathMin$1(t,r)],i=[mathMax$1(e,n),mathMax$1(t,r)];return[[o[0],i[0]],[o[1],i[1]]]}function getTransform(e){return getTransform$1(e.group)}function getGlobalDirection1(e,t){return{left:"w",right:"e",top:"n",bottom:"s"}[transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[t],getTransform(e))]}function getGlobalDirection2(e,t){var n=[getGlobalDirection1(e,t[0]),getGlobalDirection1(e,t[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}function driftRect(e,t,n,r,o,i){var a=n.__brushOption,s=e.toRectRange(a.range),l=toLocalDelta(t,o,i);each$f(r,function(e){var t=DIRECTION_MAP[e];s[t[0]][t[1]]+=l[t[0]]}),a.range=e.fromRectRange(formatRectRange(s[0][0],s[1][0],s[0][1],s[1][1])),updateCoverAfterCreation(t,n),trigger(t,{isEnd:!1})}function driftPolygon(e,t,n,r){var o=t.__brushOption.range,i=toLocalDelta(e,n,r);each$f(o,function(e){e[0]+=i[0],e[1]+=i[1]}),updateCoverAfterCreation(e,t),trigger(e,{isEnd:!1})}function toLocalDelta(e,t,n){var r=e.group,o=r.transformCoordToLocal(t,n),i=r.transformCoordToLocal(0,0);return[o[0]-i[0],o[1]-i[1]]}function clipByPanel(e,t,n){var r=getPanelByCover(e,t);return r&&r!==BRUSH_PANEL_GLOBAL?r.clipPath(n,e._transform):clone$6(n)}function pointsToRect(e){var t=mathMin$1(e[0][0],e[1][0]),n=mathMin$1(e[0][1],e[1][1]);return{x:t,y:n,width:mathMax$1(e[0][0],e[1][0])-t,height:mathMax$1(e[0][1],e[1][1])-n}}function resetCursor(e,t,n){if(e._brushType&&!isOutsideZrArea(e,t.offsetX,t.offsetY)){var r=e._zr,o=e._covers,i=getPanelByPoint(e,t,n);if(!e._dragging)for(var a=0;a<o.length;a++){var s=o[a].__brushOption;if(i&&(i===BRUSH_PANEL_GLOBAL||s.panelId===i.panelId)&&coverRenderers[s.brushType].contain(o[a],n[0],n[1]))return}i&&r.setCursorStyle("crosshair")}}function preventDefault(e){var t=e.event;t.preventDefault&&t.preventDefault()}function mainShapeContain(e,t,n){return e.childOfName("main").contain(t,n)}function updateCoverByMouse(e,t,n,r){var o,i=e._creatingCover,a=e._creatingPanel,s=e._brushOption;if(e._track.push(n.slice()),shouldShowCover(e)||i){if(a&&!i){"single"===s.brushMode&&clearCovers(e);var l=clone$6(s);l.brushType=determineBrushType(l.brushType,a),l.panelId=a===BRUSH_PANEL_GLOBAL?null:a.panelId,i=e._creatingCover=createCover(e,l),e._covers.push(i)}if(i){var u=coverRenderers[determineBrushType(e._brushType,a)];i.__brushOption.range=u.getCreatingRange(clipByPanel(e,i,e._track)),r&&(endCreating(e,i),u.updateCommon(e,i)),updateCoverShape(e,i),o={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&getPanelByPoint(e,t,n)&&clearCovers(e)&&(o={isEnd:r,removeOnClick:!0});return o}function determineBrushType(e,t){return"auto"===e?t.defaultBrushType:e}var pointerHandlers={mousedown:function(e){if(this._dragging)handleDragEnd(this,e);else if(!e.target||!e.target.draggable){preventDefault(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=getPanelByPoint(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,r=this.group.transformCoordToLocal(t,n);if(resetCursor(this,e,r),this._dragging){preventDefault(e);var o=updateCoverByMouse(this,e,r,!1);o&&trigger(this,o)}},mouseup:function(e){handleDragEnd(this,e)}};function handleDragEnd(e,t){if(e._dragging){preventDefault(t);var n=t.offsetX,r=t.offsetY,o=e.group.transformCoordToLocal(n,r),i=updateCoverByMouse(e,t,o,!0);e._dragging=!1,e._track=[],e._creatingCover=null,i&&trigger(e,i)}}function isOutsideZrArea(e,t,n){var r=e._zr;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var coverRenderers={lineX:getLineRenderer(0),lineY:getLineRenderer(1),rect:{createCover:function(e,t){function n(e){return e}return createBaseRectCover({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=getTrackEnds(e);return formatRectRange(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){updateBaseRect(e,t,n,r)},updateCommon:updateCommon$1,contain:mainShapeContain},polygon:{createCover:function(e,t){var n=new Group$3;return n.add(new Polyline$1({name:"main",style:makeStyle(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Polygon({name:"main",draggable:!0,drift:curry$1(driftPolygon,e,t),ondragend:curry$1(trigger,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:clipByPanel(e,t,n)})},updateCommon:updateCommon$1,contain:mainShapeContain}};function getLineRenderer(e){return{createCover:function(t,n){return createBaseRectCover({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var n=getTrackEnds(t);return[mathMin$1(n[0][e],n[1][e]),mathMax$1(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,o){var i,a=getPanelByCover(t,n);if(a!==BRUSH_PANEL_GLOBAL&&a.getLinearBrushOtherExtent)i=a.getLinearBrushOtherExtent(e);else{var s=t._zr;i=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[r,i];e&&l.reverse(),updateBaseRect(t,n,l,o)},updateCommon:updateCommon$1,contain:mainShapeContain}}function makeRectPanelClipPath(e){return e=normalizeRect(e),function(t){return clipPointsByRect(t,e)}}function makeLinearBrushOtherExtent(e,t){return e=normalizeRect(e),function(n){var r=null!=t?t:n,o=r?e.width:e.height,i=r?e.x:e.y;return[i,i+(o||0)]}}function makeRectIsTargetByCursor(e,t,n){var r=normalizeRect(e);return function(e,o){return r.contain(o[0],o[1])&&!onIrrelevantElement(e,t,n)}}function normalizeRect(e){return BoundingRect.create(e)}var elementList$1=["axisLine","axisTickLabel","axisName"],ParallelAxisView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.init=function(t,n){e.prototype.init.apply(this,arguments),(this._brushController=new BrushController(n.getZr())).on("brush",bind$1(this._onBrush,this))},t.prototype.render=function(e,t,n,r){if(!fromAxisAreaSelect(e,t,r)){this.axisModel=e,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Group$3,this.group.add(this._axisGroup),e.get("show")){var i=getCoordSysModel(e,t),a=i.coordinateSystem,s=e.getAreaSelectStyle(),l=s.width,u=e.axis.dim,c=extend$2({strokeContainThreshold:l},a.getAxisLayout(u)),d=new AxisBuilder(e,c);each$f(elementList$1,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(c,s,e,i,l,n),groupTransition(o,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,t,n,r,o,i){var a=n.axis.getExtent(),s=a[1]-a[0],l=Math.min(30,.1*Math.abs(s)),u=BoundingRect.create({x:a[0],y:-o/2,width:s,height:o});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:makeRectPanelClipPath(u),isTargetByCursor:makeRectIsTargetByCursor(u,i,r),getLinearBrushOtherExtent:makeLinearBrushOtherExtent(u,0)}]).enableBrush({brushType:"lineX",brushStyle:t,removeOnClick:!0}).updateCovers(getCoverInfoList(n))},t.prototype._onBrush=function(e){var t=e.areas,n=this.axisModel,r=n.axis,o=map$1(t,function(e){return[r.coordToData(e.range[0],!0),r.coordToData(e.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(ComponentView);function fromAxisAreaSelect(e,t,n){return n&&"axisAreaSelect"===n.type&&t.findComponents({mainType:"parallelAxis",query:n})[0]===e}function getCoverInfoList(e){var t=e.axis;return map$1(e.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function getCoordSysModel(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}var actionInfo={type:"axisAreaSelect",event:"axisAreaSelected"};function installParallelActions(e){e.registerAction(actionInfo,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),e.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(t){t.setAxisExpand(e)})})}var defaultAxisOption={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function install$E(e){e.registerComponentView(ParallelView),e.registerComponentModel(ParallelModel),e.registerCoordinateSystem("parallel",parallelCoordSysCreator),e.registerPreprocessor(parallelPreprocessor),e.registerComponentModel(ParallelAxisModel),e.registerComponentView(ParallelAxisView),axisModelCreator(e,"parallel",ParallelAxisModel,defaultAxisOption),installParallelActions(e)}function install$D(e){use(install$E),e.registerChartView(ParallelView$1),e.registerSeriesModel(ParallelSeriesModel),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,parallelVisual)}var SankeyPathShape=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0},SankeyPath=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getDefaultShape=function(){return new SankeyPathShape},t.prototype.buildPath=function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),"vertical"===t.orient?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},t.prototype.highlight=function(){enterEmphasis(this)},t.prototype.downplay=function(){leaveEmphasis(this)},t}(Path),SankeyView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._focusAdjacencyDisabled=!1,n}return __extends(t,e),t.prototype.render=function(e,t,n){var r=this,o=e.getGraph(),i=this.group,a=e.layoutInfo,s=a.width,l=a.height,u=e.getData(),c=e.getData("edge"),d=e.get("orient");this._model=e,i.removeAll(),i.x=a.x,i.y=a.y,o.eachEdge(function(t){var n=new SankeyPath,r=getECData(n);r.dataIndex=t.dataIndex,r.seriesIndex=e.seriesIndex,r.dataType="edge";var o,a,u,p,h,f,g,m,y=t.getModel(),v=y.getModel("lineStyle"),_=v.get("curveness"),x=t.node1.getLayout(),S=t.node1.getModel(),b=S.get("localX"),T=S.get("localY"),A=t.node2.getLayout(),w=t.node2.getModel(),C=w.get("localX"),E=w.get("localY"),M=t.getLayout();n.shape.extent=Math.max(1,M.dy),n.shape.orient=d,"vertical"===d?(o=(null!=b?b*s:x.x)+M.sy,a=(null!=T?T*l:x.y)+x.dy,u=(null!=C?C*s:A.x)+M.ty,h=o,f=a*(1-_)+(p=null!=E?E*l:A.y)*_,g=u,m=a*_+p*(1-_)):(o=(null!=b?b*s:x.x)+x.dx,a=(null!=T?T*l:x.y)+M.sy,h=o*(1-_)+(u=null!=C?C*s:A.x)*_,f=a,g=o*_+u*(1-_),m=p=(null!=E?E*l:A.y)+M.ty),n.setShape({x1:o,y1:a,x2:u,y2:p,cpx1:h,cpy1:f,cpx2:g,cpy2:m}),n.useStyle(v.getItemStyle()),applyCurveStyle(n.style,d,t);var I=""+y.get("value"),P=getLabelStatesModels(y,"edgeLabel");setLabelStyle(n,P,{labelFetcher:{getFormattedLabel:function(t,n,r,o,i,a){return e.getFormattedLabel(t,n,"edge",o,retrieve3(i,P.normal&&P.normal.get("formatter"),I),a)}},labelDataIndex:t.dataIndex,defaultText:I}),n.setTextConfig({position:"inside"});var D=y.getModel("emphasis");setStatesStylesFromModel(n,y,"lineStyle",function(e){var n=e.getItemStyle();return applyCurveStyle(n,d,t),n}),i.add(n),c.setItemGraphicEl(t.dataIndex,n);var k=D.get("focus");toggleHoverEmphasis(n,"adjacency"===k?t.getAdjacentDataIndices():"trajectory"===k?t.getTrajectoryDataIndices():k,D.get("blurScope"),D.get("disabled"))}),o.eachNode(function(t){var n=t.getLayout(),r=t.getModel(),o=r.get("localX"),a=r.get("localY"),c=r.getModel("emphasis"),d=r.get(["itemStyle","borderRadius"])||0,p=new Rect$2({shape:{x:null!=o?o*s:n.x,y:null!=a?a*l:n.y,width:n.dx,height:n.dy,r:d},style:r.getModel("itemStyle").getItemStyle(),z2:10});setLabelStyle(p,getLabelStatesModels(r),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(t,n,"node")}},labelDataIndex:t.dataIndex,defaultText:t.id}),p.disableLabelAnimation=!0,p.setStyle("fill",t.getVisual("color")),p.setStyle("decal",t.getVisual("style").decal),setStatesStylesFromModel(p,r),i.add(p),u.setItemGraphicEl(t.dataIndex,p),getECData(p).dataType="node";var h=c.get("focus");toggleHoverEmphasis(p,"adjacency"===h?t.getAdjacentDataIndices():"trajectory"===h?t.getTrajectoryDataIndices():h,c.get("blurScope"),c.get("disabled"))}),u.eachItemGraphicEl(function(t,o){u.getItemModel(o).get("draggable")&&(t.drift=function(t,i){r._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=i,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:u.getRawIndex(o),localX:this.shape.x/s,localY:this.shape.y/l})},t.ondragend=function(){r._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move")}),!this._data&&e.isAnimationEnabled()&&i.setClipPath(createGridClipShape$1(i.getBoundingRect(),e,function(){i.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){},t.type="sankey",t}(ChartView);function applyCurveStyle(e,t,n){switch(e.fill){case"source":e.fill=n.node1.getVisual("color"),e.decal=n.node1.getVisual("style").decal;break;case"target":e.fill=n.node2.getVisual("color"),e.decal=n.node2.getVisual("style").decal;break;case"gradient":var r=n.node1.getVisual("color"),o=n.node2.getVisual("color");isString(r)&&isString(o)&&(e.fill=new LinearGradient(0,0,+("horizontal"===t),+("vertical"===t),[{color:r,offset:0},{color:o,offset:1}]))}}function createGridClipShape$1(e,t,n){var r=new Rect$2({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return initProps(r,{shape:{width:e.width+20}},t,n),r}var SankeySeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],r=e.data||e.nodes||[],o=e.levels||[];this.levelModels=[];for(var i=this.levelModels,a=0;a<o.length;a++)null!=o[a].depth&&o[a].depth>=0&&(i[o[a].depth]=new Model(o[a],this,t));var s=createGraphFromNodeEdge(r,n,this,!0,function(e,t){e.wrapMethod("getItemModel",function(e,t){var n=e.parentModel,r=n.getData().getItemLayout(t);if(r){var o=r.depth,i=n.levelModels[o];i&&(e.parentModel=i)}return e}),t.wrapMethod("getItemModel",function(e,t){var n=e.parentModel,r=n.getGraph().getEdgeByIndex(t).node1.getLayout();if(r){var o=r.depth,i=n.levelModels[o];i&&(e.parentModel=i)}return e})});return s.data},t.prototype.setNodePosition=function(e,t){var n=(this.option.data||this.option.nodes)[e];n.localX=t[0],n.localY=t[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){function r(e){return isNaN(e)||null==e}if("edge"===n){var o=this.getDataParams(e,n),i=o.data,a=o.value;return createTooltipMarkup("nameValue",{name:i.source+" -- "+i.target,value:a,noValue:r(a)})}var s=this.getGraph().getNodeByIndex(e).getLayout().value,l=this.getDataParams(e,n).data.name;return createTooltipMarkup("nameValue",{name:null!=l?l+"":null,value:s,noValue:r(s)})},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);if(null==r.value&&"node"===n){var o=this.getGraph().getNodeByIndex(t).getLayout().value;r.value=o}return r},t.type="series.sankey",t.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t}(SeriesModel);function sankeyLayout(e,t){e.eachSeriesByType("sankey",function(e){var n=e.get("nodeWidth"),r=e.get("nodeGap"),o=getViewRect$1(e,t);e.layoutInfo=o;var i=o.width,a=o.height,s=e.getGraph(),l=s.nodes,u=s.edges;computeNodeValues(l),layoutSankey(l,u,n,r,i,a,0!==filter(l,function(e){return 0===e.getLayout().value}).length?0:e.get("layoutIterations"),e.get("orient"),e.get("nodeAlign"))})}function getViewRect$1(e,t){return getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function layoutSankey(e,t,n,r,o,i,a,s,l){computeNodeBreadths(e,t,n,o,i,s,l),computeNodeDepths(e,t,i,o,r,a,s),computeEdgeDepths(e,s)}function computeNodeValues(e){each$f(e,function(e){var t=sum(e.outEdges,getEdgeValue),n=sum(e.inEdges,getEdgeValue),r=e.getValue()||0,o=Math.max(t,n,r);e.setLayout({value:o},!0)})}function computeNodeBreadths(e,t,n,r,o,i,a){for(var s=[],l=[],u=[],c=[],d=0,p=0;p<t.length;p++)s[p]=1;for(p=0;p<e.length;p++)l[p]=e[p].inEdges.length,0===l[p]&&u.push(e[p]);for(var h=-1;u.length;){for(var f=0;f<u.length;f++){var g=u[f],m=g.hostGraph.data.getRawDataItem(g.dataIndex),y=null!=m.depth&&m.depth>=0;y&&m.depth>h&&(h=m.depth),g.setLayout({depth:y?m.depth:d},!0),"vertical"===i?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var v=0;v<g.outEdges.length;v++){var _=g.outEdges[v];s[t.indexOf(_)]=0;var x=_.node2;0===--l[e.indexOf(x)]&&c.indexOf(x)<0&&c.push(x)}}++d,u=c,c=[]}for(p=0;p<s.length;p++)if(1===s[p])throw new Error("Sankey is a DAG, the original data has cycle!");var S=h>d-1?h:d-1;a&&"left"!==a&&adjustNodeWithNodeAlign(e,a,i,S),scaleNodeBreadths(e,"vertical"===i?(o-n)/S:(r-n)/S,i)}function isNodeDepth(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function adjustNodeWithNodeAlign(e,t,n,r){if("right"===t){for(var o=[],i=e,a=0;i.length;){for(var s=0;s<i.length;s++){var l=i[s];l.setLayout({skNodeHeight:a},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];o.indexOf(c.node1)<0&&o.push(c.node1)}}i=o,o=[],++a}each$f(e,function(e){isNodeDepth(e)||e.setLayout({depth:Math.max(0,r-e.getLayout().skNodeHeight)},!0)})}else"justify"===t&&moveSinksRight(e,r)}function moveSinksRight(e,t){each$f(e,function(e){isNodeDepth(e)||e.outEdges.length||e.setLayout({depth:t},!0)})}function scaleNodeBreadths(e,t,n){each$f(e,function(e){var r=e.getLayout().depth*t;"vertical"===n?e.setLayout({y:r},!0):e.setLayout({x:r},!0)})}function computeNodeDepths(e,t,n,r,o,i,a){var s=prepareNodesByBreadth(e,a);initializeNodeDepth(s,t,n,r,o,a),resolveCollisions(s,o,n,r,a);for(var l=1;i>0;i--)relaxRightToLeft(s,l*=.99,a),resolveCollisions(s,o,n,r,a),relaxLeftToRight(s,l,a),resolveCollisions(s,o,n,r,a)}function prepareNodesByBreadth(e,t){var n=[],r="vertical"===t?"y":"x",o=groupData(e,function(e){return e.getLayout()[r]});return o.keys.sort(function(e,t){return e-t}),each$f(o.keys,function(e){n.push(o.buckets.get(e))}),n}function initializeNodeDepth(e,t,n,r,o,i){var a=1/0;each$f(e,function(e){var t=e.length,s=0;each$f(e,function(e){s+=e.getLayout().value});var l="vertical"===i?(r-(t-1)*o)/s:(n-(t-1)*o)/s;l<a&&(a=l)}),each$f(e,function(e){each$f(e,function(e,t){var n=e.getLayout().value*a;"vertical"===i?(e.setLayout({x:t},!0),e.setLayout({dx:n},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:n},!0))})}),each$f(t,function(e){var t=+e.getValue()*a;e.setLayout({dy:t},!0)})}function resolveCollisions(e,t,n,r,o){var i="vertical"===o?"x":"y";each$f(e,function(e){var a,s,l;e.sort(function(e,t){return e.getLayout()[i]-t.getLayout()[i]});for(var u=0,c=e.length,d="vertical"===o?"dx":"dy",p=0;p<c;p++)(l=u-(s=e[p]).getLayout()[i])>0&&(a=s.getLayout()[i]+l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[i]+s.getLayout()[d]+t;if((l=u-t-("vertical"===o?r:n))>0){a=s.getLayout()[i]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(p=c-2;p>=0;--p)(l=(s=e[p]).getLayout()[i]+s.getLayout()[d]+t-u)>0&&(a=s.getLayout()[i]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[i]}})}function relaxRightToLeft(e,t,n){each$f(e.slice().reverse(),function(e){each$f(e,function(e){if(e.outEdges.length){var r=sum(e.outEdges,weightedTarget,n)/sum(e.outEdges,getEdgeValue);if(isNaN(r)){var o=e.outEdges.length;r=o?sum(e.outEdges,centerTarget,n)/o:0}if("vertical"===n){var i=e.getLayout().x+(r-center(e,n))*t;e.setLayout({x:i},!0)}else{var a=e.getLayout().y+(r-center(e,n))*t;e.setLayout({y:a},!0)}}})})}function weightedTarget(e,t){return center(e.node2,t)*e.getValue()}function centerTarget(e,t){return center(e.node2,t)}function weightedSource(e,t){return center(e.node1,t)*e.getValue()}function centerSource(e,t){return center(e.node1,t)}function center(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function getEdgeValue(e){return e.getValue()}function sum(e,t,n){for(var r=0,o=e.length,i=-1;++i<o;){var a=+t(e[i],n);isNaN(a)||(r+=a)}return r}function relaxLeftToRight(e,t,n){each$f(e,function(e){each$f(e,function(e){if(e.inEdges.length){var r=sum(e.inEdges,weightedSource,n)/sum(e.inEdges,getEdgeValue);if(isNaN(r)){var o=e.inEdges.length;r=o?sum(e.inEdges,centerSource,n)/o:0}if("vertical"===n){var i=e.getLayout().x+(r-center(e,n))*t;e.setLayout({x:i},!0)}else{var a=e.getLayout().y+(r-center(e,n))*t;e.setLayout({y:a},!0)}}})})}function computeEdgeDepths(e,t){var n="vertical"===t?"x":"y";each$f(e,function(e){e.outEdges.sort(function(e,t){return e.node2.getLayout()[n]-t.node2.getLayout()[n]}),e.inEdges.sort(function(e,t){return e.node1.getLayout()[n]-t.node1.getLayout()[n]})}),each$f(e,function(e){var t=0,n=0;each$f(e.outEdges,function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy}),each$f(e.inEdges,function(e){e.setLayout({ty:n},!0),n+=e.getLayout().dy})})}function sankeyVisual(e){e.eachSeriesByType("sankey",function(e){var t=e.getGraph(),n=t.nodes,r=t.edges;if(n.length){var o=1/0,i=-1/0;each$f(n,function(e){var t=e.getLayout().value;t<o&&(o=t),t>i&&(i=t)}),each$f(n,function(t){var n=new VisualMapping({type:"color",mappingMethod:"linear",dataExtent:[o,i],visual:e.get("color")}).mapValueToVisual(t.getLayout().value),r=t.getModel().get(["itemStyle","color"]);null!=r?(t.setVisual("color",r),t.setVisual("style",{fill:r})):(t.setVisual("color",n),t.setVisual("style",{fill:n}))})}r.length&&each$f(r,function(e){var t=e.getModel().get("lineStyle");e.setVisual("style",t)})})}function install$C(e){e.registerChartView(SankeyView),e.registerSeriesModel(SankeySeriesModel),e.registerLayout(sankeyLayout),e.registerVisual(sankeyVisual),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var WhiskerBoxCommonMixin=function(){function e(){}return e.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&null!=t.get(e)},e.prototype.getInitialData=function(e,t){var n,r,o=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),a=o.get("type"),s=i.get("type");"category"===a?(e.layout="horizontal",n=o.getOrdinalMeta(),r=!this._hasEncodeRule("x")):"category"===s?(e.layout="vertical",n=i.getOrdinalMeta(),r=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var l=["x","y"],u="horizontal"===e.layout?0:1,c=this._baseAxisDim=l[u],d=l[1-u],p=[o,i],h=p[u].get("type"),f=p[1-u].get("type"),g=e.data;if(g&&r){var m=[];each$f(g,function(e,t){var n;isArray$1(e)?(n=e.slice(),e.unshift(t)):isArray$1(e.value)?((n=extend$2({},e)).value=n.value.slice(),e.value.unshift(t)):n=e,m.push(n)}),e.data=m}var y=this.defaultValueDimensions,v=[{name:c,type:getDimensionTypeByAxis(h),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:d,type:getDimensionTypeByAxis(f),dimsDef:y.slice()}];return createSeriesDataSimply(this,{coordDimensions:v,dimensionsCount:y.length+1,encodeDefaulter:curry$1(makeSeriesEncodeForAxisCoordSys,v,this)})},e.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},e}(),BoxplotSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return __extends(t,e),t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},t}(SeriesModel);mixin(BoxplotSeriesModel,WhiskerBoxCommonMixin,!0);var BoxplotView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),o=this.group,i=this._data;this._data||o.removeAll();var a="horizontal"===e.get("layout")?1:0;r.diff(i).add(function(e){if(r.hasValue(e)){var t=createNormalBox$1(r.getItemLayout(e),r,e,a,!0);r.setItemGraphicEl(e,t),o.add(t)}}).update(function(e,t){var n=i.getItemGraphicEl(t);if(r.hasValue(e)){var s=r.getItemLayout(e);n?(saveOldStyle(n),updateNormalBoxData(s,n,r,e)):n=createNormalBox$1(s,r,e,a),o.add(n),r.setItemGraphicEl(e,n)}else o.remove(n)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&o.remove(t)}).execute(),this._data=r},t.prototype.remove=function(e){var t=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(e){e&&t.remove(e)})},t.type="boxplot",t}(ChartView),BoxPathShape=function(){},BoxPath=function(e){function t(t){var n=e.call(this,t)||this;return n.type="boxplotBoxPath",n}return __extends(t,e),t.prototype.getDefaultShape=function(){return new BoxPathShape},t.prototype.buildPath=function(e,t){var n=t.points,r=0;for(e.moveTo(n[r][0],n[r][1]),r++;r<4;r++)e.lineTo(n[r][0],n[r][1]);for(e.closePath();r<n.length;r++)e.moveTo(n[r][0],n[r][1]),r++,e.lineTo(n[r][0],n[r][1])},t}(Path);function createNormalBox$1(e,t,n,r,o){var i=e.ends,a=new BoxPath({shape:{points:o?transInit$1(i,r,e):i}});return updateNormalBoxData(e,a,t,n,o),a}function updateNormalBoxData(e,t,n,r,o){var i=n.hostModel;(0,graphic$1[o?"initProps":"updateProps"])(t,{shape:{points:e.ends}},i,r),t.useStyle(n.getItemVisual(r,"style")),t.style.strokeNoScale=!0,t.z2=100;var a=n.getItemModel(r),s=a.getModel("emphasis");setStatesStylesFromModel(t,a),toggleHoverEmphasis(t,s.get("focus"),s.get("blurScope"),s.get("disabled"))}function transInit$1(e,t,n){return map$1(e,function(e){return(e=e.slice())[t]=n.initBaseline,e})}var each$9=each$f;function boxplotLayout(e){var t=groupSeriesByAxis(e);each$9(t,function(e){var t=e.seriesModels;t.length&&(calculateBase(e),each$9(t,function(t,n){layoutSingleSeries(t,e.boxOffsetList[n],e.boxWidthList[n])}))})}function groupSeriesByAxis(e){var t=[],n=[];return e.eachSeriesByType("boxplot",function(e){var r=e.getBaseAxis(),o=indexOf(n,r);o<0&&(o=n.length,n[o]=r,t[o]={axis:r,seriesModels:[]}),t[o].seriesModels.push(e)}),t}function calculateBase(e){var t,n=e.axis,r=e.seriesModels,o=r.length,i=e.boxWidthList=[],a=e.boxOffsetList=[],s=[];if("category"===n.type)t=n.getBandWidth();else{var l=0;each$9(r,function(e){l=Math.max(l,e.getData().count())});var u=n.getExtent();t=Math.abs(u[1]-u[0])/l}each$9(r,function(e){var n=e.get("boxWidth");isArray$1(n)||(n=[n,n]),s.push([parsePercent(n[0],t)||0,parsePercent(n[1],t)||0])});var c=.8*t-2,d=c/o*.3,p=(c-d*(o-1))/o,h=p/2-c/2;each$9(r,function(e,t){a.push(h),h+=d+p,i.push(Math.min(Math.max(p,s[t][0]),s[t][1]))})}function layoutSingleSeries(e,t,n){var r=e.coordinateSystem,o=e.getData(),i=n/2,a="horizontal"===e.get("layout")?0:1,s=1-a,l=["x","y"],u=o.mapDimension(l[a]),c=o.mapDimensionsAll(l[s]);if(!(null==u||c.length<5))for(var d=0;d<o.count();d++){var p=o.get(u,d),h=_(p,c[2],d),f=_(p,c[0],d),g=_(p,c[1],d),m=_(p,c[3],d),y=_(p,c[4],d),v=[];x(v,g,!1),x(v,m,!0),v.push(f,g,y,m),S(v,f),S(v,y),S(v,h),o.setItemLayout(d,{initBaseline:h[s],ends:v})}function _(e,n,i){var l,u=o.get(n,i),c=[];return c[a]=e,c[s]=u,isNaN(e)||isNaN(u)?l=[NaN,NaN]:(l=r.dataToPoint(c))[a]+=t,l}function x(e,t,n){var r=t.slice(),o=t.slice();r[a]+=i,o[a]-=i,n?e.push(r,o):e.push(o,r)}function S(e,t){var n=t.slice(),r=t.slice();n[a]-=i,r[a]+=i,e.push(n,r)}}function prepareBoxplotData(e,t){for(var n=[],r=[],o=(t=t||{}).boundIQR,i="none"===o||0===o,a=0;a<e.length;a++){var s=asc$2(e[a].slice()),l=quantile(s,.25),u=quantile(s,.5),c=quantile(s,.75),d=s[0],p=s[s.length-1],h=(null==o?1.5:o)*(c-l),f=i?d:Math.max(d,l-h),g=i?p:Math.min(p,c+h),m=t.itemNameFormatter,y=isFunction(m)?m({value:a}):isString(m)?m.replace("{value}",a+""):a+"";n.push([y,f,l,u,c,g]);for(var v=0;v<s.length;v++){var _=s[v];if(_<f||_>g){var x=[y,_];r.push(x)}}}return{boxData:n,outliers:r}}var boxplotTransform={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==SOURCE_FORMAT_ARRAY_ROWS){throwError("")}var n=prepareBoxplotData(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function install$B(e){e.registerSeriesModel(BoxplotSeriesModel),e.registerChartView(BoxplotView),e.registerLayout(boxplotLayout),e.registerTransform(boxplotTransform)}var positiveBorderColorQuery=["itemStyle","borderColor"],negativeBorderColorQuery=["itemStyle","borderColor0"],dojiBorderColorQuery=["itemStyle","borderColorDoji"],positiveColorQuery=["itemStyle","color"],negativeColorQuery=["itemStyle","color0"];function getColor(e,t){return t.get(e>0?positiveColorQuery:negativeColorQuery)}function getBorderColor(e,t){return t.get(0===e?dojiBorderColorQuery:e>0?positiveBorderColorQuery:negativeBorderColorQuery)}var candlestickVisual={seriesType:"candlestick",plan:createRenderPlanner(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){for(var n;null!=(n=e.next());){var r=t.getItemModel(n),o=t.getItemLayout(n).sign,i=r.getItemStyle();i.fill=getColor(o,r),i.stroke=getBorderColor(o,r)||i.fill,extend$2(t.ensureUniqueItemVisual(n,"style"),i)}}}}},SKIP_PROPS=["color","borderColor"],CandlestickView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(e,t,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,t,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,t,n,r){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},t.prototype.eachRendered=function(e){traverseElements(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e){var t=e.getData(),n=this._data,r=this.group,o=t.getLayout("isSimpleBox"),i=e.get("clip",!0),a=e.coordinateSystem,s=a.getArea&&a.getArea();this._data||r.removeAll(),t.diff(n).add(function(n){if(t.hasValue(n)){var a=t.getItemLayout(n);if(i&&isNormalBoxClipped(s,a))return;var l=createNormalBox(a,n,!0);initProps(l,{shape:{points:a.ends}},e,n),setBoxCommon(l,t,n,o),r.add(l),t.setItemGraphicEl(n,l)}}).update(function(a,l){var u=n.getItemGraphicEl(l);if(t.hasValue(a)){var c=t.getItemLayout(a);i&&isNormalBoxClipped(s,c)?r.remove(u):(u?(updateProps$1(u,{shape:{points:c.ends}},e,a),saveOldStyle(u)):u=createNormalBox(c),setBoxCommon(u,t,a,o),r.add(u),t.setItemGraphicEl(a,u))}else r.remove(u)}).remove(function(e){var t=n.getItemGraphicEl(e);t&&r.remove(t)}).execute(),this._data=t},t.prototype._renderLarge=function(e){this._clear(),createLarge(e,this.group);var t=e.get("clip",!0)?createClipPath(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,t){for(var n,r=t.getData(),o=r.getLayout("isSimpleBox");null!=(n=e.next());){var i=createNormalBox(r.getItemLayout(n));setBoxCommon(i,r,n,o),i.incremental=!0,this.group.add(i),this._progressiveEls.push(i)}},t.prototype._incrementalRenderLarge=function(e,t){createLarge(t,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(ChartView),NormalBoxPathShape=function(){},NormalBoxPath=function(e){function t(t){var n=e.call(this,t)||this;return n.type="normalCandlestickBox",n}return __extends(t,e),t.prototype.getDefaultShape=function(){return new NormalBoxPathShape},t.prototype.buildPath=function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t}(Path);function createNormalBox(e,t,n){var r=e.ends;return new NormalBoxPath({shape:{points:n?transInit(r,e):r},z2:100})}function isNormalBoxClipped(e,t){for(var n=!0,r=0;r<t.ends.length;r++)if(e.contain(t.ends[r][0],t.ends[r][1])){n=!1;break}return n}function setBoxCommon(e,t,n,r){var o=t.getItemModel(n);e.useStyle(t.getItemVisual(n,"style")),e.style.strokeNoScale=!0,e.__simpleBox=r,setStatesStylesFromModel(e,o);var i=t.getItemLayout(n).sign;each$f(e.states,function(e,t){var n=o.getModel(t),r=getColor(i,n),a=getBorderColor(i,n)||r,s=e.style||(e.style={});r&&(s.fill=r),a&&(s.stroke=a)});var a=o.getModel("emphasis");toggleHoverEmphasis(e,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function transInit(e,t){return map$1(e,function(e){return(e=e.slice())[1]=t.initBaseline,e})}var LargeBoxPathShape=function(){},LargeBoxPath=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeCandlestickBox",n}return __extends(t,e),t.prototype.getDefaultShape=function(){return new LargeBoxPathShape},t.prototype.buildPath=function(e,t){for(var n=t.points,r=0;r<n.length;)if(this.__sign===n[r++]){var o=n[r++];e.moveTo(o,n[r++]),e.lineTo(o,n[r++])}else r+=3},t}(Path);function createLarge(e,t,n,r){var o=e.getData().getLayout("largePoints"),i=new LargeBoxPath({shape:{points:o},__sign:1,ignoreCoarsePointer:!0});t.add(i);var a=new LargeBoxPath({shape:{points:o},__sign:-1,ignoreCoarsePointer:!0});t.add(a);var s=new LargeBoxPath({shape:{points:o},__sign:0,ignoreCoarsePointer:!0});t.add(s),setLargeStyle(1,i,e),setLargeStyle(-1,a,e),setLargeStyle(0,s,e),r&&(i.incremental=!0,a.incremental=!0),n&&n.push(i,a)}function setLargeStyle(e,t,n,r){var o=getBorderColor(e,n)||getColor(e,n),i=n.getModel("itemStyle").getItemStyle(SKIP_PROPS);t.useStyle(i),t.style.fill=null,t.style.stroke=o}var CandlestickSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return __extends(t,e),t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,t,n){var r=t.getItemLayout(e);return r&&n.rect(r.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(SeriesModel);function candlestickPreprocessor(e){e&&isArray$1(e.series)&&each$f(e.series,function(e){isObject$3(e)&&"k"===e.type&&(e.type="candlestick")})}mixin(CandlestickSeriesModel,WhiskerBoxCommonMixin,!0);var candlestickLayout={seriesType:"candlestick",plan:createRenderPlanner(),reset:function(e){var t=e.coordinateSystem,n=e.getData(),r=calculateCandleWidth(e,n),o=["x","y"],i=n.getDimensionIndex(n.mapDimension(o[0])),a=map$1(n.mapDimensionsAll(o[1]),n.getDimensionIndex,n),s=a[0],l=a[1],u=a[2],c=a[3];if(n.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),!(i<0||a.length<4))return{progress:e.pipelineContext.large?function(n,r){var o,a,d=createFloat32Array(4*n.count),p=0,h=[],f=[],g=r.getStore(),m=!!e.get(["itemStyle","borderColorDoji"]);for(;null!=(a=n.next());){var y=g.get(i,a),v=g.get(s,a),_=g.get(l,a),x=g.get(u,a),S=g.get(c,a);isNaN(y)||isNaN(x)||isNaN(S)?(d[p++]=NaN,p+=3):(d[p++]=getSign(g,a,v,_,l,m),h[0]=y,h[1]=x,o=t.dataToPoint(h,null,f),d[p++]=o?o[0]:NaN,d[p++]=o?o[1]:NaN,h[1]=S,o=t.dataToPoint(h,null,f),d[p++]=o?o[1]:NaN)}r.setLayout("largePoints",d)}:function(e,n){var o,a=n.getStore();for(;null!=(o=e.next());){var d=a.get(i,o),p=a.get(s,o),h=a.get(l,o),f=a.get(u,o),g=a.get(c,o),m=Math.min(p,h),y=Math.max(p,h),v=A(m,d),_=A(y,d),x=A(f,d),S=A(g,d),b=[];w(b,_,0),w(b,v,1),b.push(E(S),E(_),E(x),E(v));var T=!!n.getItemModel(o).get(["itemStyle","borderColorDoji"]);n.setItemLayout(o,{sign:getSign(a,o,p,h,l,T),initBaseline:p>h?_[1]:v[1],ends:b,brushRect:C(f,g,d)})}function A(e,n){var r=[];return r[0]=n,r[1]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(r)}function w(e,t,n){var o=t.slice(),i=t.slice();o[0]=subPixelOptimize(o[0]+r/2,1,!1),i[0]=subPixelOptimize(i[0]-r/2,1,!0),n?e.push(o,i):e.push(i,o)}function C(e,t,n){var o=A(e,n),i=A(t,n);return o[0]-=r/2,i[0]-=r/2,{x:o[0],y:o[1],width:r,height:i[1]-o[1]}}function E(e){return e[0]=subPixelOptimize(e[0],1),e}}}}};function getSign(e,t,n,r,o,i){return n>r?-1:n<r?1:i?0:t>0?e.get(o,t-1)<=r?1:-1:1}function calculateCandleWidth(e,t){var n,r=e.getBaseAxis(),o="category"===r.type?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/t.count()),i=parsePercent(retrieve2(e.get("barMaxWidth"),o),o),a=parsePercent(retrieve2(e.get("barMinWidth"),1),o),s=e.get("barWidth");return null!=s?parsePercent(s,o):Math.max(Math.min(o/2,i),a)}function install$A(e){e.registerChartView(CandlestickView),e.registerSeriesModel(CandlestickSeriesModel),e.registerPreprocessor(candlestickPreprocessor),e.registerVisual(candlestickVisual),e.registerLayout(candlestickLayout)}function updateRipplePath(e,t){var n=t.rippleEffectColor||t.color;e.eachChild(function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?n:null,fill:"fill"===t.brushType?n:null}})})}var EffectSymbol=function(e){function t(t,n){var r=e.call(this)||this,o=new Symbol$1(t,n),i=new Group$3;return r.add(o),r.add(i),r.updateData(t,n),r}return __extends(t,e),t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,r=e.rippleNumber,o=this.childAt(1),i=0;i<r;i++){var a=createSymbol$1(t,-1,-1,2,2,n);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var s=-i/r*e.period+e.effectOffset;a.animate("",!0).when(e.period,{scaleX:e.rippleScale/2,scaleY:e.rippleScale/2}).delay(s).start(),a.animateStyle(!0).when(e.period,{opacity:0}).delay(s).start(),o.add(a)}updateRipplePath(o,e)},t.prototype.updateEffectAnimation=function(e){for(var t=this._effectCfg,n=this.childAt(1),r=["symbolType","period","rippleScale","rippleNumber"],o=0;o<r.length;o++){var i=r[o];if(t[i]!==e[i])return this.stopEffectAnimation(),void this.startEffectAnimation(e)}updateRipplePath(n,e)},t.prototype.highlight=function(){enterEmphasis(this)},t.prototype.downplay=function(){leaveEmphasis(this)},t.prototype.getSymbolType=function(){var e=this.childAt(0);return e&&e.getSymbolType()},t.prototype.updateData=function(e,t){var n=this,r=e.hostModel;this.childAt(0).updateData(e,t);var o=this.childAt(1),i=e.getItemModel(t),a=e.getItemVisual(t,"symbol"),s=normalizeSymbolSize(e.getItemVisual(t,"symbolSize")),l=e.getItemVisual(t,"style"),u=l&&l.fill,c=i.getModel("emphasis");o.setScale(s),o.traverse(function(e){e.setStyle("fill",u)});var d=normalizeSymbolOffset(e.getItemVisual(t,"symbolOffset"),s);d&&(o.x=d[0],o.y=d[1]);var p=e.getItemVisual(t,"symbolRotate");o.rotation=(p||0)*Math.PI/180||0;var h={};h.showEffectOn=r.get("showEffectOn"),h.rippleScale=i.get(["rippleEffect","scale"]),h.brushType=i.get(["rippleEffect","brushType"]),h.period=1e3*i.get(["rippleEffect","period"]),h.effectOffset=t/e.count(),h.z=r.getShallow("z")||0,h.zlevel=r.getShallow("zlevel")||0,h.symbolType=a,h.color=u,h.rippleEffectColor=i.get(["rippleEffect","color"]),h.rippleNumber=i.get(["rippleEffect","number"]),"render"===h.showEffectOn?(this._effectCfg?this.updateEffectAnimation(h):this.startEffectAnimation(h),this._effectCfg=h):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(e){"emphasis"===e?"render"!==h.showEffectOn&&n.startEffectAnimation(h):"normal"===e&&"render"!==h.showEffectOn&&n.stopEffectAnimation()}),this._effectCfg=h,toggleHoverEmphasis(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},t.prototype.fadeOut=function(e){e&&e()},t}(Group$3),EffectScatterView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.init=function(){this._symbolDraw=new SymbolDraw(EffectSymbol)},t.prototype.render=function(e,t,n){var r=e.getData(),o=this._symbolDraw;o.updateData(r,{clipShape:this._getClipShape(e)}),this.group.add(o.group)},t.prototype._getClipShape=function(e){var t=e.coordinateSystem,n=t&&t.getArea&&t.getArea();return e.get("clip",!0)?n:null},t.prototype.updateTransform=function(e,t,n){var r=e.getData();this.group.dirty();var o=pointsLayout("").reset(e,t,n);o.progress&&o.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(e){var t=e.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=clone$4(t.getRoamTransform()),this.group.decomposeTransform())},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t}(ChartView),EffectScatterSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return __extends(t,e),t.prototype.getInitialData=function(e,t){return createSeriesData(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.type="series.effectScatter",t.dependencies=["grid","polar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},t}(SeriesModel);function install$z(e){e.registerChartView(EffectScatterView),e.registerSeriesModel(EffectScatterSeriesModel),e.registerLayout(pointsLayout("effectScatter"))}var EffectLine=function(e){function t(t,n,r){var o=e.call(this)||this;return o.add(o.createLine(t,n,r)),o._updateEffectSymbol(t,n),o}return __extends(t,e),t.prototype.createLine=function(e,t,n){return new Line(e,t,n)},t.prototype._updateEffectSymbol=function(e,t){var n=e.getItemModel(t).getModel("effect"),r=n.get("symbolSize"),o=n.get("symbol");isArray$1(r)||(r=[r,r]);var i=e.getItemVisual(t,"style"),a=n.get("color")||i&&i.stroke,s=this.childAt(1);this._symbolType!==o&&(this.remove(s),(s=createSymbol$1(o,-.5,-.5,1,1,a)).z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle("shadowColor",a),s.setStyle(n.getItemStyle(["color"])),s.scaleX=r[0],s.scaleY=r[1],s.setColor(a),this._symbolType=o,this._symbolScale=r,this._updateEffectAnimation(e,n,t))},t.prototype._updateEffectAnimation=function(e,t,n){var r=this.childAt(1);if(r){var o=e.getItemLayout(n),i=1e3*t.get("period"),a=t.get("loop"),s=t.get("roundTrip"),l=t.get("constantSpeed"),u=retrieve(t.get("delay"),function(t){return t/e.count()*i/3});if(r.ignore=!0,this._updateAnimationPoints(r,o),l>0&&(i=this._getLineLength(r)/l*1e3),i!==this._period||a!==this._loop||s!==this._roundTrip){r.stopAnimation();var c=void 0;c=isFunction(u)?u(n):u,r.__t>0&&(c=-i*r.__t),this._animateSymbol(r,i,c,a,s)}this._period=i,this._loop=a,this._roundTrip=s}},t.prototype._animateSymbol=function(e,t,n,r,o){if(t>0){e.__t=0;var i=this,a=e.animate("",r).when(o?2*t:t,{__t:o?2:1}).delay(n).during(function(){i._updateSymbolPosition(e)});r||a.done(function(){i.remove(e)}),a.start()}},t.prototype._getLineLength=function(e){return dist$1(e.__p1,e.__cp1)+dist$1(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},t.prototype.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},t.prototype._updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,r=e.__cp1,o=e.__t<1?e.__t:2-e.__t,i=[e.x,e.y],a=i.slice(),s=quadraticAt$1,l=quadraticDerivativeAt;i[0]=s(t[0],r[0],n[0],o),i[1]=s(t[1],r[1],n[1],o);var u=e.__t<1?l(t[0],r[0],n[0],o):l(n[0],r[0],t[0],1-o),c=e.__t<1?l(t[1],r[1],n[1],o):l(n[1],r[1],t[1],1-o);e.rotation=-Math.atan2(c,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==e.__lastT&&e.__lastT<e.__t?(e.scaleY=1.05*dist$1(a,i),1===o&&(i[0]=a[0]+(i[0]-a[0])/2,i[1]=a[1]+(i[1]-a[1])/2)):1===e.__lastT?e.scaleY=2*dist$1(t,i):e.scaleY=this._symbolScale[1]),e.__lastT=e.__t,e.ignore=!1,e.x=i[0],e.y=i[1]},t.prototype.updateLayout=function(e,t){this.childAt(0).updateLayout(e,t);var n=e.getItemModel(t).getModel("effect");this._updateEffectAnimation(e,n,t)},t}(Group$3),Polyline=function(e){function t(t,n,r){var o=e.call(this)||this;return o._createPolyline(t,n,r),o}return __extends(t,e),t.prototype._createPolyline=function(e,t,n){var r=e.getItemLayout(t),o=new Polyline$1({shape:{points:r}});this.add(o),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel;updateProps$1(this.childAt(0),{shape:{points:e.getItemLayout(t)}},r,t),this._updateCommonStl(e,t,n)},t.prototype._updateCommonStl=function(e,t,n){var r=this.childAt(0),o=e.getItemModel(t),i=n&&n.emphasisLineStyle,a=n&&n.focus,s=n&&n.blurScope,l=n&&n.emphasisDisabled;if(!n||e.hasItemOption){var u=o.getModel("emphasis");i=u.getModel("lineStyle").getLineStyle(),l=u.get("disabled"),a=u.get("focus"),s=u.get("blurScope")}r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.style.strokeNoScale=!0,r.ensureState("emphasis").style=i,toggleHoverEmphasis(this,a,s,l)},t.prototype.updateLayout=function(e,t){this.childAt(0).setShape("points",e.getItemLayout(t))},t}(Group$3),EffectPolyline=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return __extends(t,e),t.prototype.createLine=function(e,t,n){return new Polyline(e,t,n)},t.prototype._updateAnimationPoints=function(e,t){this._points=t;for(var n=[0],r=0,o=1;o<t.length;o++){var i=t[o-1],a=t[o];r+=dist$1(i,a),n.push(r)}if(0!==r){for(o=0;o<n.length;o++)n[o]/=r;this._offsets=n,this._length=r}else this._length=0},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(e){var t=e.__t<1?e.__t:2-e.__t,n=this._points,r=this._offsets,o=n.length;if(r){var i,a=this._lastFrame;if(t<this._lastFramePercent){for(i=Math.min(a+1,o-1);i>=0&&!(r[i]<=t);i--);i=Math.min(i,o-2)}else{for(i=a;i<o&&!(r[i]>t);i++);i=Math.min(i-1,o-2)}var s=(t-r[i])/(r[i+1]-r[i]),l=n[i],u=n[i+1];e.x=l[0]*(1-s)+s*u[0],e.y=l[1]*(1-s)+s*u[1];var c=e.__t<1?u[0]-l[0]:l[0]-u[0],d=e.__t<1?u[1]-l[1]:l[1]-u[1];e.rotation=-Math.atan2(d,c)-Math.PI/2,this._lastFrame=i,this._lastFramePercent=t,e.ignore=!1}},t}(EffectLine),LargeLinesPathShape=function(){this.polyline=!1,this.curveness=0,this.segs=[]},LargeLinesPath=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return __extends(t,e),t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new LargeLinesPathShape},t.prototype.buildPath=function(e,t){var n,r=t.segs,o=t.curveness;if(t.polyline)for(n=this._off;n<r.length;){var i=r[n++];if(i>0){e.moveTo(r[n++],r[n++]);for(var a=1;a<i;a++)e.lineTo(r[n++],r[n++])}}else for(n=this._off;n<r.length;){var s=r[n++],l=r[n++],u=r[n++],c=r[n++];if(e.moveTo(s,l),o>0){var d=(s+u)/2-(l-c)*o,p=(l+c)/2-(u-s)*o;e.quadraticCurveTo(d,p,u,c)}else e.lineTo(u,c)}this.incremental&&(this._off=n,this.notClear=!0)},t.prototype.findDataIndex=function(e,t){var n=this.shape,r=n.segs,o=n.curveness,i=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s<r.length;){var l=r[s++];if(l>0)for(var u=r[s++],c=r[s++],d=1;d<l;d++){if(containStroke$4(u,c,p=r[s++],h=r[s++],i,e,t))return a}a++}else for(a=0,s=0;s<r.length;){u=r[s++],c=r[s++];var p=r[s++],h=r[s++];if(o>0){if(containStroke$2(u,c,(u+p)/2-(c-h)*o,(c+h)/2-(p-u)*o,p,h,i,e,t))return a}else if(containStroke$4(u,c,p,h,i,e,t))return a;a++}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape.segs,n=1/0,r=1/0,o=-1/0,i=-1/0,a=0;a<t.length;){var s=t[a++],l=t[a++];n=Math.min(s,n),o=Math.max(s,o),r=Math.min(l,r),i=Math.max(l,i)}e=this._rect=new BoundingRect(n,r,o,i)}return e},t}(Path),LargeLineDraw=function(){function e(){this.group=new Group$3}return e.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},e.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},e.prototype.incrementalUpdate=function(e,t){var n=this._newAdded[0],r=t.getLayout("linesPoints"),o=n&&n.shape.segs;if(o&&o.length<2e4){var i=o.length,a=new Float32Array(i+r.length);a.set(o),a.set(r,i),n.setShape({segs:a})}else{this._newAdded=[];var s=this._create();s.incremental=!0,s.setShape({segs:r}),this._setCommon(s,t),s.__startIndex=e.start}},e.prototype.remove=function(){this._clear()},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new LargeLinesPath({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;e.setShape({polyline:r.get("polyline"),curveness:r.get(["lineStyle","curveness"])}),e.useStyle(r.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var o=t.getVisual("style");o&&o.stroke&&e.setStyle("stroke",o.stroke),e.setStyle("fill",null);var i=getECData(e);i.seriesIndex=r.seriesIndex,e.on("mousemove",function(t){i.dataIndex=null;var n=e.hoverDataIdx;n>0&&(i.dataIndex=n+e.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),linesLayout={seriesType:"lines",plan:createRenderPlanner(),reset:function(e){var t=e.coordinateSystem;if(t){var n=e.get("polyline"),r=e.pipelineContext.large;return{progress:function(o,i){var a=[];if(r){var s=void 0,l=o.end-o.start;if(n){for(var u=0,c=o.start;c<o.end;c++)u+=e.getLineCoordsCount(c);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);var d=0,p=[];for(c=o.start;c<o.end;c++){var h=e.getLineCoords(c,a);n&&(s[d++]=h);for(var f=0;f<h;f++)p=t.dataToPoint(a[f],!1,p),s[d++]=p[0],s[d++]=p[1]}i.setLayout("linesPoints",s)}else for(c=o.start;c<o.end;c++){var g=i.getItemModel(c),m=(h=e.getLineCoords(c,a),[]);if(n)for(var y=0;y<h;y++)m.push(t.dataToPoint(a[y]));else{m[0]=t.dataToPoint(a[0]),m[1]=t.dataToPoint(a[1]);var v=g.get(["lineStyle","curveness"]);+v&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*v,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*v])}i.setItemLayout(c,m)}}}}}},LinesView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),o=this._updateLineDraw(r,e),i=e.get("zlevel"),a=e.get(["effect","trailLength"]),s=n.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(i).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&a>0&&(l||s.configLayer(i,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),o.updateData(r);var u=e.get("clip",!0)&&createClipPath(e.coordinateSystem,!1,e);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=i,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateLineDraw(r,e).incrementalPrepareUpdate(r),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,t,n){var r=e.getData(),o=e.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var i=linesLayout.reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._lineDraw.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,t){var n=this._lineDraw,r=this._showEffect(t),o=!!t.get("polyline"),i=t.pipelineContext.large;return n&&r===this._hasEffet&&o===this._isPolyline&&i===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=i?new LargeLineDraw:new LineDraw(o?r?EffectPolyline:Polyline:r?EffectLine:Line),this._hasEffet=r,this._isPolyline=o,this._isLargeDraw=i),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var t=e.getZr();"svg"===t.painter.getType()||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.type="lines",t}(ChartView),Uint32Arr="undefined"==typeof Uint32Array?Array:Uint32Array,Float64Arr="undefined"==typeof Float64Array?Array:Float64Array;function compatEc2(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=map$1(t,function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),mergeAll([t,e[0],e[1]])}))}var LinesSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return __extends(t,e),t.prototype.init=function(t){t.data=t.data||[],compatEc2(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(t){if(compatEc2(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=concatArray(this._flatCoords,t.flatCoords),this._flatCoordsOffset=concatArray(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var t=this.getData().getItemModel(e);return t.option instanceof Array?t.option:t.getShallow("coords")},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,t){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*e],r=this._flatCoordsOffset[2*e+1],o=0;o<r;o++)t[o]=t[o]||[],t[o][0]=this._flatCoords[n+2*o],t[o][1]=this._flatCoords[n+2*o+1];return r}var i=this._getCoordsFromItemModel(e);for(o=0;o<i.length;o++)t[o]=t[o]||[],t[o][0]=i[o][0],t[o][1]=i[o][1];return i.length},t.prototype._processFlatCoordsArray=function(e){var t=0;if(this._flatCoords&&(t=this._flatCoords.length),isNumber(e[0])){for(var n=e.length,r=new Uint32Arr(n),o=new Float64Arr(n),i=0,a=0,s=0,l=0;l<n;){s++;var u=e[l++];r[a++]=i+t,r[a++]=u;for(var c=0;c<u;c++){var d=e[l++],p=e[l++];o[i++]=d,o[i++]=p}}return{flatCoordsOffset:new Uint32Array(r.buffer,0,a),flatCoords:o,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},t.prototype.getInitialData=function(e,t){var n=new SeriesData(["value"],this);return n.hasItemOption=!1,n.initData(e.data,[],function(e,t,r,o){if(e instanceof Array)return NaN;n.hasItemOption=!0;var i=e.value;return null!=i?i instanceof Array?i[o]:i:void 0}),n},t.prototype.formatTooltip=function(e,t,n){var r=this.getData().getItemModel(e),o=r.get("name");if(o)return o;var i=r.get("fromName"),a=r.get("toName"),s=[];return null!=i&&s.push(i),null!=a&&s.push(a),createTooltipMarkup("nameValue",{name:s.join(" > ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?1e4:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?2e4:this.get("progressiveThreshold"):e},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),t=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&t>0?t+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(SeriesModel);function normalize(e){return e instanceof Array||(e=[e,e]),e}var linesVisual={seriesType:"lines",reset:function(e){var t=normalize(e.get("symbol")),n=normalize(e.get("symbolSize")),r=e.getData();return r.setVisual("fromSymbol",t&&t[0]),r.setVisual("toSymbol",t&&t[1]),r.setVisual("fromSymbolSize",n&&n[0]),r.setVisual("toSymbolSize",n&&n[1]),{dataEach:r.hasItemOption?function(e,t){var n=e.getItemModel(t),r=normalize(n.getShallow("symbol",!0)),o=normalize(n.getShallow("symbolSize",!0));r[0]&&e.setItemVisual(t,"fromSymbol",r[0]),r[1]&&e.setItemVisual(t,"toSymbol",r[1]),o[0]&&e.setItemVisual(t,"fromSymbolSize",o[0]),o[1]&&e.setItemVisual(t,"toSymbolSize",o[1])}:null}}};function install$y(e){e.registerChartView(LinesView),e.registerSeriesModel(LinesSeriesModel),e.registerLayout(linesLayout),e.registerVisual(linesVisual)}var GRADIENT_LEVELS=256,HeatmapLayer=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=platformApi.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,o,i){var a=this._getBrush(),s=this._getGradient(o,"inRange"),l=this._getGradient(o,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,d=c.getContext("2d"),p=e.length;c.width=t,c.height=n;for(var h=0;h<p;++h){var f=e[h],g=f[0],m=f[1],y=r(f[2]);d.globalAlpha=y,d.drawImage(a,g-u,m-u)}if(!c.width||!c.height)return c;for(var v=d.getImageData(0,0,c.width,c.height),_=v.data,x=0,S=_.length,b=this.minOpacity,T=this.maxOpacity-b;x<S;){y=_[x+3]/256;var A=4*Math.floor(y*(GRADIENT_LEVELS-1));if(y>0){var w=i(y)?s:l;y>0&&(y=y*T+b),_[x++]=w[A],_[x++]=w[A+1],_[x++]=w[A+2],_[x++]=w[A+3]*y*256}else x+=4}return d.putImageData(v,0,0),c},e.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=platformApi.createCanvas()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var r=e.getContext("2d");return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-t,t,this.pointSize,0,2*Math.PI,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),o=[0,0,0,0],i=0,a=0;a<256;a++)e[t](a/255,!0,o),r[i++]=o[0],r[i++]=o[1],r[i++]=o[2],r[i++]=o[3];return r},e}();function getIsInPiecewiseRange(e,t,n){var r=e[1]-e[0],o=(t=map$1(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}})).length,i=0;return function(e){var r;for(r=i;r<o;r++){if((a=t[r].interval)[0]<=e&&e<=a[1]){i=r;break}}if(r===o)for(r=i-1;r>=0;r--){var a;if((a=t[r].interval)[0]<=e&&e<=a[1]){i=r;break}}return r>=0&&r<o&&n[r]}}function getIsInContinuousRange(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}function isGeoCoordSys(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var HeatmapView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(e,t,n){var r;t.eachComponent("visualMap",function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):isGeoCoordSys(o)&&this._renderOnGeo(o,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var o=t.coordinateSystem;o&&(isGeoCoordSys(o)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){traverseElements(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,t,n,r,o){var i,a,s,l,u=e.coordinateSystem,c=isCoordinateSystemType(u,"cartesian2d");if(c){var d=u.getAxis("x"),p=u.getAxis("y");i=d.getBandWidth()+.5,a=p.getBandWidth()+.5,s=d.scale.getExtent(),l=p.scale.getExtent()}for(var h=this.group,f=e.getData(),g=e.getModel(["emphasis","itemStyle"]).getItemStyle(),m=e.getModel(["blur","itemStyle"]).getItemStyle(),y=e.getModel(["select","itemStyle"]).getItemStyle(),v=e.get(["itemStyle","borderRadius"]),_=getLabelStatesModels(e),x=e.getModel("emphasis"),S=x.get("focus"),b=x.get("blurScope"),T=x.get("disabled"),A=c?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],w=n;w<r;w++){var C=void 0,E=f.getItemVisual(w,"style");if(c){var M=f.get(A[0],w),I=f.get(A[1],w);if(isNaN(f.get(A[2],w))||isNaN(M)||isNaN(I)||M<s[0]||M>s[1]||I<l[0]||I>l[1])continue;var P=u.dataToPoint([M,I]);C=new Rect$2({shape:{x:P[0]-i/2,y:P[1]-a/2,width:i,height:a},style:E})}else{if(isNaN(f.get(A[1],w)))continue;C=new Rect$2({z2:1,shape:u.dataToRect([f.get(A[0],w)]).contentShape,style:E})}if(f.hasItemOption){var D=f.getItemModel(w),k=D.getModel("emphasis");g=k.getModel("itemStyle").getItemStyle(),m=D.getModel(["blur","itemStyle"]).getItemStyle(),y=D.getModel(["select","itemStyle"]).getItemStyle(),v=D.get(["itemStyle","borderRadius"]),S=k.get("focus"),b=k.get("blurScope"),T=k.get("disabled"),_=getLabelStatesModels(D)}C.shape.r=v;var $=e.getRawValue(w),R="-";$&&null!=$[2]&&(R=$[2]+""),setLabelStyle(C,_,{labelFetcher:e,labelDataIndex:w,defaultOpacity:E.opacity,defaultText:R}),C.ensureState("emphasis").style=g,C.ensureState("blur").style=m,C.ensureState("select").style=y,toggleHoverEmphasis(C,S,b,T),C.incremental=o,o&&(C.states.emphasis.hoverLayer=!0),h.add(C),f.setItemGraphicEl(w,C),this._progressiveEls&&this._progressiveEls.push(C)}},t.prototype._renderOnGeo=function(e,t,n,r){var o=n.targetVisuals.inRange,i=n.targetVisuals.outOfRange,a=t.getData(),s=this._hmLayer||this._hmLayer||new HeatmapLayer;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=e.getViewRect().clone(),u=e.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),d=Math.max(l.y,0),p=Math.min(l.width+l.x,r.getWidth()),h=Math.min(l.height+l.y,r.getHeight()),f=p-c,g=h-d,m=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],y=a.mapArray(m,function(t,n,r){var o=e.dataToPoint([t,n]);return o[0]-=c,o[1]-=d,o.push(r),o}),v=n.getExtent(),_="visualMap.continuous"===n.type?getIsInContinuousRange(v,n.option.range):getIsInPiecewiseRange(v,n.getPieceList(),n.option.selected);s.update(y,f,g,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:i.color.getColorMapper()},_);var x=new ZRImage({style:{width:f,height:g,x:c,y:d,image:s.canvas},silent:!0});this.group.add(x)},t.type="heatmap",t}(ChartView),HeatmapSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.getInitialData=function(e,t){return createSeriesData(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=CoordinateSystemManager.get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},t.type="series.heatmap",t.dependencies=["grid","geo","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(SeriesModel);function install$x(e){e.registerChartView(HeatmapView),e.registerSeriesModel(HeatmapSeriesModel)}var BAR_BORDER_WIDTH_QUERY=["itemStyle","borderWidth"],LAYOUT_ATTRS=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],pathForLineWidth=new Circle,PictorialBarView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(e,t,n){var r=this.group,o=e.getData(),i=this._data,a=e.coordinateSystem,s=a.getBaseAxis().isHorizontal(),l=a.master.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:a,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:LAYOUT_ATTRS[+s],categoryDim:LAYOUT_ATTRS[1-+s]};o.diff(i).add(function(e){if(o.hasValue(e)){var t=getItemModel(o,e),n=getSymbolMeta(o,e,t,u),i=createBar(o,u,n);o.setItemGraphicEl(e,i),r.add(i),updateCommon(i,u,n)}}).update(function(e,t){var n=i.getItemGraphicEl(t);if(o.hasValue(e)){var a=getItemModel(o,e),s=getSymbolMeta(o,e,a,u),l=getShapeStr(o,s);n&&l!==n.__pictorialShapeStr&&(r.remove(n),o.setItemGraphicEl(e,null),n=null),n?updateBar(n,u,s):n=createBar(o,u,s,!0),o.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=s,r.add(n),updateCommon(n,u,s)}else r.remove(n)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&removeBar(i,e,t.__pictorialSymbolMeta.animationModel,t)}).execute();var c=e.get("clip",!0)?createClipPath(e.coordinateSystem,!1,e):null;return c?r.setClipPath(c):r.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(e,t){var n=this.group,r=this._data;e.get("animation")?r&&r.eachItemGraphicEl(function(t){removeBar(r,getECData(t).dataIndex,e,t)}):n.removeAll()},t.type="pictorialBar",t}(ChartView);function getSymbolMeta(e,t,n,r){var o=e.getItemLayout(t),i=n.get("symbolRepeat"),a=n.get("symbolClip"),s=n.get("symbolPosition")||"start",l=(n.get("symbolRotate")||0)*Math.PI/180||0,u=n.get("symbolPatternSize")||2,c=n.isAnimationEnabled(),d={dataIndex:t,layout:o,itemModel:n,symbolType:e.getItemVisual(t,"symbol")||"circle",style:e.getItemVisual(t,"style"),symbolClip:a,symbolRepeat:i,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:c?n:null,hoverScale:c&&n.get(["emphasis","scale"]),z2:n.getShallow("z",!0)||0};prepareBarLength(n,i,o,r,d),prepareSymbolSize(e,t,o,i,a,d.boundingLength,d.pxSign,u,r,d),prepareLineWidth(n,d.symbolScale,l,r,d);var p=d.symbolSize,h=normalizeSymbolOffset(n.get("symbolOffset"),p);return prepareLayoutInfo(n,p,o,i,a,h,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,r,d),d}function prepareBarLength(e,t,n,r,o){var i,a=r.valueDim,s=e.get("symbolBoundingData"),l=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),c=1-+(n[a.wh]<=0);if(isArray$1(s)){var d=[convertToCoordOnAxis(l,s[0])-u,convertToCoordOnAxis(l,s[1])-u];d[1]<d[0]&&d.reverse(),i=d[c]}else i=null!=s?convertToCoordOnAxis(l,s)-u:t?r.coordSysExtent[a.index][c]-u:n[a.wh];o.boundingLength=i,t&&(o.repeatCutLength=n[a.wh]);var p="x"===a.xy,h=l.inverse;o.pxSign=p&&!h||!p&&h?i>=0?1:-1:i>0?1:-1}function convertToCoordOnAxis(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function prepareSymbolSize(e,t,n,r,o,i,a,s,l,u){var c,d=l.valueDim,p=l.categoryDim,h=Math.abs(n[p.wh]),f=e.getItemVisual(t,"symbolSize");(c=isArray$1(f)?f.slice():null==f?["100%","100%"]:[f,f])[p.index]=parsePercent(c[p.index],h),c[d.index]=parsePercent(c[d.index],r?h:Math.abs(i)),u.symbolSize=c,(u.symbolScale=[c[0]/s,c[1]/s])[d.index]*=(l.isHorizontal?-1:1)*a}function prepareLineWidth(e,t,n,r,o){var i=e.get(BAR_BORDER_WIDTH_QUERY)||0;i&&(pathForLineWidth.attr({scaleX:t[0],scaleY:t[1],rotation:n}),pathForLineWidth.updateTransform(),i/=pathForLineWidth.getLineScale(),i*=t[r.valueDim.index]),o.valueLineWidth=i||0}function prepareLayoutInfo(e,t,n,r,o,i,a,s,l,u,c,d){var p=c.categoryDim,h=c.valueDim,f=d.pxSign,g=Math.max(t[h.index]+s,0),m=g;if(r){var y=Math.abs(l),v=retrieve(e.get("symbolMargin"),"15%")+"",_=!1;v.lastIndexOf("!")===v.length-1&&(_=!0,v=v.slice(0,v.length-1));var x=parsePercent(v,t[h.index]),S=Math.max(g+2*x,0),b=_?0:2*x,T=isNumeric(r),A=T?r:toIntTimes((y+b)/S);S=g+2*(x=(y-A*g)/2/(_?A:Math.max(A-1,1))),b=_?0:2*x,T||"fixed"===r||(A=u?toIntTimes((Math.abs(u)+b)/S):0),m=A*S-b,d.repeatTimes=A,d.symbolMargin=x}var w=f*(m/2),C=d.pathPosition=[];C[p.index]=n[p.wh]/2,C[h.index]="start"===a?w:"end"===a?l-w:l/2,i&&(C[0]+=i[0],C[1]+=i[1]);var E=d.bundlePosition=[];E[p.index]=n[p.xy],E[h.index]=n[h.xy];var M=d.barRectShape=extend$2({},n);M[h.wh]=f*Math.max(Math.abs(n[h.wh]),Math.abs(C[h.index]+w)),M[p.wh]=n[p.wh];var I=d.clipShape={};I[p.xy]=-n[p.xy],I[p.wh]=c.ecSize[p.wh],I[h.xy]=0,I[h.wh]=n[h.wh]}function createPath(e){var t=e.symbolPatternSize,n=createSymbol$1(e.symbolType,-t/2,-t/2,t,t);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function createOrUpdateRepeatSymbols(e,t,n,r){var o=e.__pictorialBundle,i=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=t.valueDim,u=n.repeatTimes||0,c=0,d=i[t.valueDim.index]+a+2*n.symbolMargin;for(eachPath(e,function(e){e.__pictorialAnimationIndex=c,e.__pictorialRepeatTimes=u,c<u?updateAttr(e,null,f(c),n,r):updateAttr(e,null,{scaleX:0,scaleY:0},n,r,function(){o.remove(e)}),c++});c<u;c++){var p=createPath(n);p.__pictorialAnimationIndex=c,p.__pictorialRepeatTimes=u,o.add(p);var h=f(c);updateAttr(p,{x:h.x,y:h.y,scaleX:0,scaleY:0},{scaleX:h.scaleX,scaleY:h.scaleY,rotation:h.rotation},n,r)}function f(e){var t=s.slice(),r=n.pxSign,o=e;return("start"===n.symbolRepeatDirection?r>0:r<0)&&(o=u-1-e),t[l.index]=d*(o-u/2+.5)+s[l.index],{x:t[0],y:t[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function createOrUpdateSingleSymbol(e,t,n,r){var o=e.__pictorialBundle,i=e.__pictorialMainPath;i?updateAttr(i,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,r):(i=e.__pictorialMainPath=createPath(n),o.add(i),updateAttr(i,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,r))}function createOrUpdateBarRect(e,t,n){var r=extend$2({},t.barRectShape),o=e.__pictorialBarRect;o?updateAttr(o,null,{shape:r},t,n):((o=e.__pictorialBarRect=new Rect$2({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,e.add(o))}function createOrUpdateClip(e,t,n,r){if(n.symbolClip){var o=e.__pictorialClipPath,i=extend$2({},n.clipShape),a=t.valueDim,s=n.animationModel,l=n.dataIndex;if(o)updateProps$1(o,{shape:i},s,l);else{i[a.wh]=0,o=new Rect$2({shape:i}),e.__pictorialBundle.setClipPath(o),e.__pictorialClipPath=o;var u={};u[a.wh]=n.clipShape[a.wh],graphic$1[r?"updateProps":"initProps"](o,{shape:u},s,l)}}}function getItemModel(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=getAnimationDelayParams,n.isAnimationEnabled=isAnimationEnabled,n}function getAnimationDelayParams(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function isAnimationEnabled(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function createBar(e,t,n,r){var o=new Group$3,i=new Group$3;return o.add(i),o.__pictorialBundle=i,i.x=n.bundlePosition[0],i.y=n.bundlePosition[1],n.symbolRepeat?createOrUpdateRepeatSymbols(o,t,n):createOrUpdateSingleSymbol(o,t,n),createOrUpdateBarRect(o,n,r),createOrUpdateClip(o,t,n,r),o.__pictorialShapeStr=getShapeStr(e,n),o.__pictorialSymbolMeta=n,o}function updateBar(e,t,n){var r=n.animationModel,o=n.dataIndex;updateProps$1(e.__pictorialBundle,{x:n.bundlePosition[0],y:n.bundlePosition[1]},r,o),n.symbolRepeat?createOrUpdateRepeatSymbols(e,t,n,!0):createOrUpdateSingleSymbol(e,t,n,!0),createOrUpdateBarRect(e,n,!0),createOrUpdateClip(e,t,n,!0)}function removeBar(e,t,n,r){var o=r.__pictorialBarRect;o&&o.removeTextContent();var i=[];eachPath(r,function(e){i.push(e)}),r.__pictorialMainPath&&i.push(r.__pictorialMainPath),r.__pictorialClipPath&&(n=null),each$f(i,function(e){removeElement(e,{scaleX:0,scaleY:0},n,t,function(){r.parent&&r.parent.remove(r)})}),e.setItemGraphicEl(t,null)}function getShapeStr(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function eachPath(e,t,n){each$f(e.__pictorialBundle.children(),function(r){r!==e.__pictorialBarRect&&t.call(n,r)})}function updateAttr(e,t,n,r,o,i){t&&e.attr(t),r.symbolClip&&!o?n&&e.attr(n):n&&graphic$1[o?"updateProps":"initProps"](e,n,r.animationModel,r.dataIndex,i)}function updateCommon(e,t,n){var r=n.dataIndex,o=n.itemModel,i=o.getModel("emphasis"),a=i.getModel("itemStyle").getItemStyle(),s=o.getModel(["blur","itemStyle"]).getItemStyle(),l=o.getModel(["select","itemStyle"]).getItemStyle(),u=o.getShallow("cursor"),c=i.get("focus"),d=i.get("blurScope"),p=i.get("scale");eachPath(e,function(e){if(e instanceof ZRImage){var t=e.style;e.useStyle(extend$2({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},n.style))}else e.useStyle(n.style);var r=e.ensureState("emphasis");r.style=a,p&&(r.scaleX=1.1*e.scaleX,r.scaleY=1.1*e.scaleY),e.ensureState("blur").style=s,e.ensureState("select").style=l,u&&(e.cursor=u),e.z2=n.z2});var h=t.valueDim.posDesc[+(n.boundingLength>0)],f=e.__pictorialBarRect;f.ignoreClip=!0,setLabelStyle(f,getLabelStatesModels(o),{labelFetcher:t.seriesModel,labelDataIndex:r,defaultText:getDefaultLabel(t.seriesModel.getData(),r),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:h}),toggleHoverEmphasis(e,c,d,i.get("disabled"))}function toIntTimes(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var PictorialBarSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return __extends(t,e),t.prototype.getInitialData=function(t){return t.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=inheritDefaultOption(BaseBarSeriesModel.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),t}(BaseBarSeriesModel);function install$w(e){e.registerChartView(PictorialBarView),e.registerSeriesModel(PictorialBarSeriesModel),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,curry$1(layout$3,"pictorialBar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,createProgressiveLayout("pictorialBar"))}var ThemeRiverView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._layers=[],n}return __extends(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),o=this,i=this.group,a=e.getLayerSeries(),s=r.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function c(e){return e.name}i.x=0,i.y=l.y+u[0];var d=new DataDiffer(this._layersSeries||[],a,c,c),p=[];function h(t,n,s){var l=o._layers;if("remove"!==t){for(var u,c,d=[],h=[],f=a[n].indices,g=0;g<f.length;g++){var m=r.getItemLayout(f[g]),y=m.x,v=m.y0,_=m.y;d.push(y,v),h.push(y,v+_),u=r.getItemVisual(f[g],"style")}var x=r.getItemLayout(f[0]),S=e.getModel("label").get("margin"),b=e.getModel("emphasis");if("add"===t){var T=p[n]=new Group$3;c=new ECPolygon({shape:{points:d,stackedOnPoints:h,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),T.add(c),i.add(T),e.isAnimationEnabled()&&c.setClipPath(createGridClipShape(c.getBoundingRect(),e,function(){c.removeClipPath()}))}else{T=l[s];c=T.childAt(0),i.add(T),p[n]=T,updateProps$1(c,{shape:{points:d,stackedOnPoints:h}},e),saveOldStyle(c)}setLabelStyle(c,getLabelStatesModels(e),{labelDataIndex:f[g-1],defaultText:r.getName(f[g-1]),inheritColor:u.fill},{normal:{verticalAlign:"middle"}}),c.setTextConfig({position:null,local:!0});var A=c.getTextContent();A&&(A.x=x.x-S,A.y=x.y0+x.y/2),c.useStyle(u),r.setItemGraphicEl(n,c),setStatesStylesFromModel(c,e),toggleHoverEmphasis(c,b.get("focus"),b.get("blurScope"),b.get("disabled"))}else i.remove(l[n])}d.add(bind$1(h,this,"add")).update(bind$1(h,this,"update")).remove(bind$1(h,this,"remove")).execute(),this._layersSeries=a,this._layers=p},t.type="themeRiver",t}(ChartView);function createGridClipShape(e,t,n){var r=new Rect$2({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return initProps(r,{shape:{x:e.x-50,width:e.width+100,height:e.height+20}},t,n),r}var DATA_NAME_INDEX=2,ThemeRiverSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new LegendVisualProvider(bind$1(this.getData,this),bind$1(this.getRawData,this))},t.prototype.fixData=function(e){var t=e.length,n={},r=groupData(e,function(e){return n.hasOwnProperty(e[0]+"")||(n[e[0]+""]=-1),e[2]}),o=[];r.buckets.each(function(e,t){o.push({name:t,dataList:e})});for(var i=o.length,a=0;a<i;++a){for(var s=o[a].name,l=0;l<o[a].dataList.length;++l){var u=o[a].dataList[l][0]+"";n[u]=a}for(var u in n)n.hasOwnProperty(u)&&n[u]!==a&&(n[u]=a,e[t]=[u,0,s],t++)}return e},t.prototype.getInitialData=function(e,t){for(var n=this.getReferringComponents("singleAxis",SINGLE_REFERRING).models[0].get("type"),r=filter(e.data,function(e){return void 0!==e[2]}),o=this.fixData(r||[]),i=[],a=this.nameMap=createHashMap(),s=0,l=0;l<o.length;++l)i.push(o[l][DATA_NAME_INDEX]),a.get(o[l][DATA_NAME_INDEX])||(a.set(o[l][DATA_NAME_INDEX],s),s++);var u=prepareSeriesDataSchema(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:getDimensionTypeByAxis(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,c=new SeriesData(u,this);return c.initData(o),c},t.prototype.getLayerSeries=function(){for(var e=this.getData(),t=e.count(),n=[],r=0;r<t;++r)n[r]=r;var o=e.mapDimension("single"),i=groupData(n,function(t){return e.get("name",t)}),a=[];return i.buckets.each(function(t,n){t.sort(function(t,n){return e.get(o,t)-e.get(o,n)}),a.push({name:n,indices:t})}),a},t.prototype.getAxisTooltipData=function(e,t,n){isArray$1(e)||(e=e?[e]:[]);for(var r,o=this.getData(),i=this.getLayerSeries(),a=[],s=i.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,c=-1,d=i[l].indices.length,p=0;p<d;++p){var h=o.get(e[0],i[l].indices[p]),f=Math.abs(h-t);f<=u&&(r=h,u=f,c=i[l].indices[p])}a.push(c)}return{dataIndices:a,nestestValue:r}},t.prototype.formatTooltip=function(e,t,n){var r=this.getData();return createTooltipMarkup("nameValue",{name:r.getName(e),value:r.get(r.mapDimension("value"),e)})},t.type="series.themeRiver",t.dependencies=["singleAxis"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},t}(SeriesModel);function themeRiverLayout(e,t){e.eachSeriesByType("themeRiver",function(e){var t=e.getData(),n=e.coordinateSystem,r={},o=n.getRect();r.rect=o;var i=e.get("boundaryGap"),a=n.getAxis();(r.boundaryGap=i,"horizontal"===a.orient)?(i[0]=parsePercent(i[0],o.height),i[1]=parsePercent(i[1],o.height),doThemeRiverLayout(t,e,o.height-i[0]-i[1])):(i[0]=parsePercent(i[0],o.width),i[1]=parsePercent(i[1],o.width),doThemeRiverLayout(t,e,o.width-i[0]-i[1]));t.setLayout("layoutInfo",r)})}function doThemeRiverLayout(e,t,n){if(e.count())for(var r,o=t.coordinateSystem,i=t.getLayerSeries(),a=e.mapDimension("single"),s=e.mapDimension("value"),l=map$1(i,function(t){return map$1(t.indices,function(t){var n=o.dataToPoint(e.get(a,t));return n[1]=e.get(s,t),n})}),u=computeBaseline(l),c=u.y0,d=n/u.max,p=i.length,h=i[0].indices.length,f=0;f<h;++f){r=c[f]*d,e.setItemLayout(i[0].indices[f],{layerIndex:0,x:l[0][f][0],y0:r,y:l[0][f][1]*d});for(var g=1;g<p;++g)r+=l[g-1][f][1]*d,e.setItemLayout(i[g].indices[f],{layerIndex:g,x:l[g][f][0],y0:r,y:l[g][f][1]*d})}}function computeBaseline(e){for(var t=e.length,n=e[0].length,r=[],o=[],i=0,a=0;a<n;++a){for(var s=0,l=0;l<t;++l)s+=e[l][a][1];s>i&&(i=s),r.push(s)}for(var u=0;u<n;++u)o[u]=(i-r[u])/2;i=0;for(var c=0;c<n;++c){var d=r[c]+o[c];d>i&&(i=d)}return{y0:o,max:i}}function install$v(e){e.registerChartView(ThemeRiverView),e.registerSeriesModel(ThemeRiverSeriesModel),e.registerLayout(themeRiverLayout),e.registerProcessor(dataFilter$1("themeRiver"))}var DEFAULT_SECTOR_Z=2,DEFAULT_TEXT_Z=4,SunburstPiece=function(e){function t(t,n,r,o){var i=e.call(this)||this;i.z2=DEFAULT_SECTOR_Z,i.textConfig={inside:!0},getECData(i).seriesIndex=n.seriesIndex;var a=new ZRText({z2:DEFAULT_TEXT_Z,silent:t.getModel().get(["label","silent"])});return i.setTextContent(a),i.updateData(!0,t,n,r,o),i}return __extends(t,e),t.prototype.updateData=function(e,t,n,r,o){this.node=t,t.piece=this,n=n||this._seriesModel,r=r||this._ecModel;var i=this;getECData(i).dataIndex=t.dataIndex;var a=t.getModel(),s=a.getModel("emphasis"),l=t.getLayout(),u=extend$2({},l);u.label=null;var c=t.getVisual("style");c.lineJoin="bevel";var d=t.getVisual("decal");d&&(c.decal=createOrUpdatePatternFromDecal(d,o));var p=getSectorCornerRadius(a.getModel("itemStyle"),u,!0);extend$2(u,p),each$f(SPECIAL_STATES,function(e){var t=i.ensureState(e),n=a.getModel([e,"itemStyle"]);t.style=n.getItemStyle();var r=getSectorCornerRadius(n,u);r&&(t.shape=r)}),e?(i.setShape(u),i.shape.r=l.r0,initProps(i,{shape:{r:l.r}},n,t.dataIndex)):(updateProps$1(i,{shape:u},n),saveOldStyle(i)),i.useStyle(c),this._updateLabel(n);var h=a.getShallow("cursor");h&&i.attr("cursor",h),this._seriesModel=n||this._seriesModel,this._ecModel=r||this._ecModel;var f=s.get("focus");toggleHoverEmphasis(this,"relative"===f?concatArray(t.getAncestorsIndices(),t.getDescendantIndices()):"ancestor"===f?t.getAncestorsIndices():"descendant"===f?t.getDescendantIndices():f,s.get("blurScope"),s.get("disabled"))},t.prototype._updateLabel=function(e){var t=this,n=this.node.getModel(),r=n.getModel("label"),o=this.node.getLayout(),i=o.endAngle-o.startAngle,a=(o.startAngle+o.endAngle)/2,s=Math.cos(a),l=Math.sin(a),u=this,c=u.getTextContent(),d=this.node.dataIndex,p=r.get("minAngle")/180*Math.PI,h=r.get("show")&&!(null!=p&&Math.abs(i)<p);function f(e,t){var n=e.get(t);return null==n?r.get(t):n}c.ignore=!h,each$f(DISPLAY_STATES,function(r){var p="normal"===r?n.getModel("label"):n.getModel([r,"label"]),h="normal"===r,g=h?c:c.ensureState(r),m=e.getFormattedLabel(d,r);h&&(m=m||t.node.name),g.style=createTextStyle$1(p,{},null,"normal"!==r,!0),m&&(g.style.text=m);var y=p.get("show");null==y||h||(g.ignore=!y);var v,_=f(p,"position"),x=h?u:u.states[r],S=x.style.fill;x.textConfig={outsideFill:"inherit"===p.get("color")?S:null,inside:"outside"!==_};var b=f(p,"distance")||0,T=f(p,"align"),A=f(p,"rotate"),w=.5*Math.PI,C=1.5*Math.PI,E=normalizeRadian("tangential"===A?Math.PI/2-a:a),M=E>w&&!isRadianAroundZero(E-w)&&E<C;"outside"===_?(v=o.r+b,T=M?"right":"left"):T&&"center"!==T?"left"===T?(v=o.r0+b,T=M?"right":"left"):"right"===T&&(v=o.r-b,T=M?"left":"right"):(v=i===2*Math.PI&&0===o.r0?0:(o.r+o.r0)/2,T="center"),g.style.align=T,g.style.verticalAlign=f(p,"verticalAlign")||"middle",g.x=v*s+o.cx,g.y=v*l+o.cy;var I=0;"radial"===A?I=normalizeRadian(-a)+(M?Math.PI:0):"tangential"===A?I=normalizeRadian(Math.PI/2-a)+(M?Math.PI:0):isNumber(A)&&(I=A*Math.PI/180),g.rotation=normalizeRadian(I)}),c.dirtyStyle()},t}(Sector),ROOT_TO_NODE_ACTION="sunburstRootToNode",HIGHLIGHT_ACTION="sunburstHighlight",UNHIGHLIGHT_ACTION="sunburstUnhighlight";function installSunburstAction(e){e.registerAction({type:ROOT_TO_NODE_ACTION,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},function(t,n){var r=retrieveTargetInfo(e,[ROOT_TO_NODE_ACTION],t);if(r){var o=t.getViewRoot();o&&(e.direction=aboveViewRoot(o,r.node)?"rollUp":"drillDown"),t.resetViewRoot(r.node)}})}),e.registerAction({type:HIGHLIGHT_ACTION,update:"none"},function(e,t,n){e=extend$2({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},function(t){var n=retrieveTargetInfo(e,[HIGHLIGHT_ACTION],t);n&&(e.dataIndex=n.node.dataIndex)}),n.dispatchAction(extend$2(e,{type:"highlight"}))}),e.registerAction({type:UNHIGHLIGHT_ACTION,update:"updateView"},function(e,t,n){e=extend$2({},e),n.dispatchAction(extend$2(e,{type:"downplay"}))})}var SunburstView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(e,t,n,r){var o=this;this.seriesModel=e,this.api=n,this.ecModel=t;var i=e.getData(),a=i.tree.root,s=e.getViewRoot(),l=this.group,u=e.get("renderLabelForZeroData"),c=[];s.eachNode(function(e){c.push(e)});var d=this._oldChildren||[];!function(r,o){if(0===r.length&&0===o.length)return;function s(e){return e.getId()}function c(s,c){!function(r,o){u||!r||r.getValue()||(r=null);if(r!==a&&o!==a)if(o&&o.piece)r?(o.piece.updateData(!1,r,e,t,n),i.setItemGraphicEl(r.dataIndex,o.piece)):function(e){if(!e)return;e.piece&&(l.remove(e.piece),e.piece=null)}(o);else if(r){var s=new SunburstPiece(r,e,t,n);l.add(s),i.setItemGraphicEl(r.dataIndex,s)}}(null==s?null:r[s],null==c?null:o[c])}new DataDiffer(o,r,s,s).add(c).update(c).remove(curry$1(c,null)).execute()}(c,d),function(r,i){i.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,r,e,t,n):(o.virtualPiece=new SunburstPiece(r,e,t,n),l.add(o.virtualPiece)),i.piece.off("click"),o.virtualPiece.on("click",function(e){o._rootToNode(i.parentNode)})):o.virtualPiece&&(l.remove(o.virtualPiece),o.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=c},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(t){var n=!1;e.seriesModel.getViewRoot().eachNode(function(r){if(!n&&r.piece&&r.piece===t.target){var o=r.getModel().get("nodeClick");if("rootToNode"===o)e._rootToNode(r);else if("link"===o){var i=r.getModel(),a=i.get("link");if(a)windowOpen(a,i.get("target",!0)||"_blank")}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:ROOT_TO_NODE_ACTION,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,o=e[1]-n.cy,i=Math.sqrt(r*r+o*o);return i<=n.r&&i>=n.r0}},t.type="sunburst",t}(ChartView),SunburstSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreStyleOnData=!0,n}return __extends(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};completeTreeValue(n);var r=this._levelModels=map$1(e.levels||[],function(e){return new Model(e,this,t)},this),o=Tree.createTree(n,this,function(e){e.wrapMethod("getItemModel",function(e,t){var n=o.getNodeByDataIndex(t),i=r[n.depth];return i&&(e.parentModel=i),e})});return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=wrapTreePathInfo(r,this),n},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){enableAriaDecalForTree(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(SeriesModel);function completeTreeValue(e){var t=0;each$f(e.children,function(e){completeTreeValue(e);var n=e.value;isArray$1(n)&&(n=n[0]),t+=n});var n=e.value;isArray$1(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),isArray$1(e.value)?e.value[0]=n:e.value=n}var RADIAN=Math.PI/180;function sunburstLayout(e,t,n){t.eachSeriesByType(e,function(e){var t=e.get("center"),r=e.get("radius");isArray$1(r)||(r=[0,r]),isArray$1(t)||(t=[t,t]);var o=n.getWidth(),i=n.getHeight(),a=Math.min(o,i),s=parsePercent(t[0],o),l=parsePercent(t[1],i),u=parsePercent(r[0],a/2),c=parsePercent(r[1],a/2),d=-e.get("startAngle")*RADIAN,p=e.get("minAngle")*RADIAN,h=e.getData().tree.root,f=e.getViewRoot(),g=f.depth,m=e.get("sort");null!=m&&initChildren(f,m);var y=0;each$f(f.children,function(e){!isNaN(e.getValue())&&y++});var v=f.getValue(),_=Math.PI/(v||y)*2,x=f.depth>0,S=f.height-(x?-1:1),b=(c-u)/(S||1),T=e.get("clockwise"),A=e.get("stillShowZeroSum"),w=T?1:-1,C=function(t,n){if(t){var r=n;if(t!==h){var o=t.getValue(),i=0===v&&A?_:o*_;i<p&&(i=p),r=n+w*i;var c=t.depth-g-(x?-1:1),d=u+b*c,f=u+b*(c+1),m=e.getLevelModel(t);if(m){var y=m.get("r0",!0),S=m.get("r",!0),E=m.get("radius",!0);null!=E&&(y=E[0],S=E[1]),null!=y&&(d=parsePercent(y,a/2)),null!=S&&(f=parsePercent(S,a/2))}t.setLayout({angle:i,startAngle:n,endAngle:r,clockwise:T,cx:s,cy:l,r0:d,r:f})}if(t.children&&t.children.length){var M=0;each$f(t.children,function(e){M+=C(e,n+M)})}return r-n}};if(x){var E=u,M=u+b,I=2*Math.PI;h.setLayout({angle:I,startAngle:d,endAngle:d+I,clockwise:T,cx:s,cy:l,r0:E,r:M})}C(f,d)})}function initChildren(e,t){var n=e.children||[];e.children=sort(n,t),n.length&&each$f(e.children,function(e){initChildren(e,t)})}function sort(e,t){if(isFunction(t)){var n=map$1(e,function(e,t){var n=e.getValue();return{params:{depth:e.depth,height:e.height,dataIndex:e.dataIndex,getValue:function(){return n}},index:t}});return n.sort(function(e,n){return t(e.params,n.params)}),map$1(n,function(t){return e[t.index]})}var r="asc"===t;return e.sort(function(e,t){var n=(e.getValue()-t.getValue())*(r?1:-1);return 0===n?(e.dataIndex-t.dataIndex)*(r?-1:1):n})}function sunburstVisual(e){var t={};e.eachSeriesByType("sunburst",function(e){var n=e.getData(),r=n.tree;r.eachNode(function(o){var i=o.getModel().getModel("itemStyle").getItemStyle();i.fill||(i.fill=function(e,n,r){for(var o=e;o&&o.depth>1;)o=o.parentNode;var i=n.getColorFromPalette(o.name||o.dataIndex+"",t);return e.depth>1&&isString(i)&&(i=lift(i,(e.depth-1)/(r-1)*.5)),i}(o,e,r.root.height)),extend$2(n.ensureUniqueItemVisual(o.dataIndex,"style"),i)})})}function install$u(e){e.registerChartView(SunburstView),e.registerSeriesModel(SunburstSeriesModel),e.registerLayout(curry$1(sunburstLayout,"sunburst")),e.registerProcessor(curry$1(dataFilter$1,"sunburst")),e.registerVisual(sunburstVisual),installSunburstAction(e)}var STYLE_VISUAL_TYPE={color:"fill",borderColor:"stroke"},NON_STYLE_VISUAL_PROPS={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},customInnerStore=makeInner(),CustomSeriesModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,t){return createSeriesData(null,this)},t.prototype.getDataParams=function(t,n,r){var o=e.prototype.getDataParams.call(this,t,n);return r&&(o.info=customInnerStore(r).info),o},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(SeriesModel);function dataToCoordSize$3(e,t){return t=t||[0,0],map$1(["x","y"],function(n,r){var o=this.getAxis(n),i=t[r],a=e[r]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(i-a)-o.dataToCoord(i+a))},this)}function cartesianPrepareCustom(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:bind$1(dataToCoordSize$3,e)}}}function dataToCoordSize$2(e,t){return t=t||[0,0],map$1([0,1],function(n){var r=t[n],o=e[n]/2,i=[],a=[];return i[n]=r-o,a[n]=r+o,i[1-n]=a[1-n]=t[1-n],Math.abs(this.dataToPoint(i)[n]-this.dataToPoint(a)[n])},this)}function geoPrepareCustom(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:bind$1(dataToCoordSize$2,e)}}}function dataToCoordSize$1(e,t){var n=this.getAxis(),r=t instanceof Array?t[0]:t,o=(e instanceof Array?e[0]:e)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(r-o)-n.dataToCoord(r+o))}function singlePrepareCustom(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:bind$1(dataToCoordSize$1,e)}}}function dataToCoordSize(e,t){return t=t||[0,0],map$1(["Radius","Angle"],function(n,r){var o=this["get"+n+"Axis"](),i=t[r],a=e[r]/2,s="category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(i-a)-o.dataToCoord(i+a));return"Angle"===n&&(s=s*Math.PI/180),s},this)}function polarPrepareCustom(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),r=t.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var o=t.dataToRadius(r[0]),i=n.dataToAngle(r[1]),a=e.coordToPoint([o,i]);return a.push(o,i*Math.PI/180),a},size:bind$1(dataToCoordSize,e)}}}function calendarPrepareCustom(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)}}}}function isEC4CompatibleStyle(e,t,n,r){return e&&(e.legacy||!1!==e.legacy&&!n&&!r&&"tspan"!==t&&("text"===t||hasOwn(e,"text")))}function convertFromEC4CompatibleStyle(e,t,n){var r,o,i,a=e;if("text"===t)i=a;else{i={},hasOwn(a,"text")&&(i.text=a.text),hasOwn(a,"rich")&&(i.rich=a.rich),hasOwn(a,"textFill")&&(i.fill=a.textFill),hasOwn(a,"textStroke")&&(i.stroke=a.textStroke),hasOwn(a,"fontFamily")&&(i.fontFamily=a.fontFamily),hasOwn(a,"fontSize")&&(i.fontSize=a.fontSize),hasOwn(a,"fontStyle")&&(i.fontStyle=a.fontStyle),hasOwn(a,"fontWeight")&&(i.fontWeight=a.fontWeight),o={type:"text",style:i,silent:!0},r={};var s=hasOwn(a,"textPosition");n?r.position=s?a.textPosition:"inside":s&&(r.position=a.textPosition),hasOwn(a,"textPosition")&&(r.position=a.textPosition),hasOwn(a,"textOffset")&&(r.offset=a.textOffset),hasOwn(a,"textRotation")&&(r.rotation=a.textRotation),hasOwn(a,"textDistance")&&(r.distance=a.textDistance)}return convertEC4CompatibleRichItem(i,e),each$f(i.rich,function(e){convertEC4CompatibleRichItem(e,e)}),{textConfig:r,textContent:o}}function convertEC4CompatibleRichItem(e,t){t&&(t.font=t.textFont||t.font,hasOwn(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),hasOwn(t,"textAlign")&&(e.align=t.textAlign),hasOwn(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),hasOwn(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),hasOwn(t,"textWidth")&&(e.width=t.textWidth),hasOwn(t,"textHeight")&&(e.height=t.textHeight),hasOwn(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),hasOwn(t,"textPadding")&&(e.padding=t.textPadding),hasOwn(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),hasOwn(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),hasOwn(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),hasOwn(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),hasOwn(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),hasOwn(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),hasOwn(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function convertToEC4StyleForCustomSerise(e,t,n){var r=e;r.textPosition=r.textPosition||n.position||"inside",null!=n.offset&&(r.textOffset=n.offset),null!=n.rotation&&(r.textRotation=n.rotation),null!=n.distance&&(r.textDistance=n.distance);var o=r.textPosition.indexOf("inside")>=0,i=e.fill||"#000";convertToEC4RichItem(r,t);var a=null==r.textFill;return o?a&&(r.textFill=n.insideFill||"#fff",!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=i),null==r.textStrokeWidth&&(r.textStrokeWidth=2)):(a&&(r.textFill=e.fill||n.outsideFill||"#000"),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,each$f(t.rich,function(e){convertToEC4RichItem(e,e)}),r}function convertToEC4RichItem(e,t){t&&(hasOwn(t,"fill")&&(e.textFill=t.fill),hasOwn(t,"stroke")&&(e.textStroke=t.fill),hasOwn(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),hasOwn(t,"font")&&(e.font=t.font),hasOwn(t,"fontStyle")&&(e.fontStyle=t.fontStyle),hasOwn(t,"fontWeight")&&(e.fontWeight=t.fontWeight),hasOwn(t,"fontSize")&&(e.fontSize=t.fontSize),hasOwn(t,"fontFamily")&&(e.fontFamily=t.fontFamily),hasOwn(t,"align")&&(e.textAlign=t.align),hasOwn(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),hasOwn(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),hasOwn(t,"width")&&(e.textWidth=t.width),hasOwn(t,"height")&&(e.textHeight=t.height),hasOwn(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),hasOwn(t,"padding")&&(e.textPadding=t.padding),hasOwn(t,"borderColor")&&(e.textBorderColor=t.borderColor),hasOwn(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),hasOwn(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),hasOwn(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),hasOwn(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),hasOwn(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),hasOwn(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),hasOwn(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),hasOwn(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),hasOwn(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),hasOwn(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var LEGACY_TRANSFORM_PROPS_MAP={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},LEGACY_TRANSFORM_PROPS=keys(LEGACY_TRANSFORM_PROPS_MAP);reduce(TRANSFORMABLE_PROPS,function(e,t){return e[t]=1,e},{}),TRANSFORMABLE_PROPS.join(", ");var ELEMENT_ANIMATABLE_PROPS=["","style","shape","extra"],transitionInnerStore=makeInner();function getElementAnimationConfig(e,t,n,r,o){var i=e+"Animation",a=getAnimationConfig(e,r,o)||{},s=transitionInnerStore(t).userDuring;return a.duration>0&&(a.during=s?bind$1(duringCall,{el:t,userDuring:s}):null,a.setToFinal=!0,a.scope=e),extend$2(a,n[i]),a}function applyUpdateTransition(e,t,n,r){var o=(r=r||{}).dataIndex,i=r.isInit,a=r.clearStyle,s=n.isAnimationEnabled(),l=transitionInnerStore(e),u=t.style;l.userDuring=t.during;var c={},d={};if(prepareTransformAllPropsFinal(e,t,d),prepareShapeOrExtraAllPropsFinal("shape",t,d),prepareShapeOrExtraAllPropsFinal("extra",t,d),!i&&s&&(prepareTransformTransitionFrom(e,t,c),prepareShapeOrExtraTransitionFrom("shape",e,t,c),prepareShapeOrExtraTransitionFrom("extra",e,t,c),prepareStyleTransitionFrom(e,t,u,c)),d.style=u,applyPropsDirectly(e,d,a),applyMiscProps(e,t),s)if(i){var p={};each$f(ELEMENT_ANIMATABLE_PROPS,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(p[e]=p[e]||{}),extend$2(e?p[e]:p,n.enterFrom))});var h=getElementAnimationConfig("enter",e,t,n,o);h.duration>0&&e.animateFrom(p,h)}else applyPropsTransition(e,t,o||0,n,c);updateLeaveTo(e,t),u?e.dirty():e.markRedraw()}function updateLeaveTo(e,t){for(var n=transitionInnerStore(e).leaveToProps,r=0;r<ELEMENT_ANIMATABLE_PROPS.length;r++){var o=ELEMENT_ANIMATABLE_PROPS[r],i=o?t[o]:t;i&&i.leaveTo&&(n||(n=transitionInnerStore(e).leaveToProps={}),o&&(n[o]=n[o]||{}),extend$2(o?n[o]:n,i.leaveTo))}}function applyLeaveTransition(e,t,n,r){if(e){var o=e.parent,i=transitionInnerStore(e).leaveToProps;if(i){var a=getElementAnimationConfig("update",e,t,n,0);a.done=function(){o.remove(e)},e.animateTo(i,a)}else o.remove(e)}}function isTransitionAll(e){return"all"===e}function applyPropsDirectly(e,t,n){var r=t.style;if(!e.isGroup&&r){if(n){e.useStyle({});for(var o=e.animators,i=0;i<o.length;i++){var a=o[i];"style"===a.targetName&&a.changeTarget(e.style)}}e.setStyle(r)}t&&(t.style=null,t&&e.attr(t),t.style=r)}function applyPropsTransition(e,t,n,r,o){if(o){var i=getElementAnimationConfig("update",e,t,r,n);i.duration>0&&e.animateFrom(o,i)}}function applyMiscProps(e,t){hasOwn(t,"silent")&&(e.silent=t.silent),hasOwn(t,"ignore")&&(e.ignore=t.ignore),e instanceof Displayable&&hasOwn(t,"invisible")&&(e.invisible=t.invisible),e instanceof Path&&hasOwn(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}var tmpDuringScope={},transitionDuringAPI={setTransform:function(e,t){return tmpDuringScope.el[e]=t,this},getTransform:function(e){return tmpDuringScope.el[e]},setShape:function(e,t){var n=tmpDuringScope.el;return(n.shape||(n.shape={}))[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=tmpDuringScope.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=tmpDuringScope.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=tmpDuringScope.el.style;if(t)return t[e]},setExtra:function(e,t){return(tmpDuringScope.el.extra||(tmpDuringScope.el.extra={}))[e]=t,this},getExtra:function(e){var t=tmpDuringScope.el.extra;if(t)return t[e]}};function duringCall(){var e=this,t=e.el;if(t){var n=transitionInnerStore(t).userDuring,r=e.userDuring;n===r?(tmpDuringScope.el=t,r(transitionDuringAPI)):e.el=e.userDuring=null}}function prepareShapeOrExtraTransitionFrom(e,t,n,r){var o=n[e];if(o){var i,a=t[e];if(a){var s=n.transition,l=o.transition;if(l)if(!i&&(i=r[e]={}),isTransitionAll(l))extend$2(i,a);else for(var u=normalizeToArray(l),c=0;c<u.length;c++){var d=a[h=u[c]];i[h]=d}else if(isTransitionAll(s)||indexOf(s,e)>=0){!i&&(i=r[e]={});var p=keys(a);for(c=0;c<p.length;c++){var h;d=a[h=p[c]];isNonStyleTransitionEnabled(o[h],d)&&(i[h]=d)}}}}}function prepareShapeOrExtraAllPropsFinal(e,t,n){var r=t[e];if(r)for(var o=n[e]={},i=keys(r),a=0;a<i.length;a++){var s=i[a];o[s]=cloneValue(r[s])}}function prepareTransformTransitionFrom(e,t,n){for(var r=t.transition,o=isTransitionAll(r)?TRANSFORMABLE_PROPS:normalizeToArray(r||[]),i=0;i<o.length;i++){var a=o[i];if("style"!==a&&"shape"!==a&&"extra"!==a){var s=e[a];n[a]=s}}}function prepareTransformAllPropsFinal(e,t,n){for(var r=0;r<LEGACY_TRANSFORM_PROPS.length;r++){var o=LEGACY_TRANSFORM_PROPS[r],i=LEGACY_TRANSFORM_PROPS_MAP[o],a=t[o];a&&(n[i[0]]=a[0],n[i[1]]=a[1])}for(r=0;r<TRANSFORMABLE_PROPS.length;r++){var s=TRANSFORMABLE_PROPS[r];null!=t[s]&&(n[s]=t[s])}}function prepareStyleTransitionFrom(e,t,n,r){if(n){var o,i=e.style;if(i){var a=n.transition,s=t.transition;if(a&&!isTransitionAll(a)){var l=normalizeToArray(a);!o&&(o=r.style={});for(var u=0;u<l.length;u++){var c=i[f=l[u]];o[f]=c}}else if(e.getAnimationStyleProps&&(isTransitionAll(s)||isTransitionAll(a)||indexOf(s,"style")>=0)){var d=e.getAnimationStyleProps(),p=d?d.style:null;if(p){!o&&(o=r.style={});var h=keys(n);for(u=0;u<h.length;u++){var f;if(p[f=h[u]]){c=i[f];o[f]=c}}}}}}}function isNonStyleTransitionEnabled(e,t){return isArrayLike(e)?e!==t:null!=e&&isFinite(e)}var getStateToRestore=makeInner(),KEYFRAME_EXCLUDE_KEYS=["percent","easing","shape","style","extra"];function stopPreviousKeyframeAnimationAndRestore(e){e.stopAnimation("keyframe"),e.attr(getStateToRestore(e))}function applyKeyframeAnimation(e,t,n){if(n.isAnimationEnabled()&&t)if(isArray$1(t))each$f(t,function(t){applyKeyframeAnimation(e,t,n)});else{var r=t.keyframes,o=t.duration;if(n&&null==o){var i=getAnimationConfig("enter",n,0);o=i&&i.duration}if(r&&o){var a=getStateToRestore(e);each$f(ELEMENT_ANIMATABLE_PROPS,function(n){var i;n&&!e[n]||(r.sort(function(e,t){return e.percent-t.percent}),each$f(r,function(r){var s=e.animators,l=n?r[n]:r;if(l){var u=keys(l);if(n||(u=filter(u,function(e){return indexOf(KEYFRAME_EXCLUDE_KEYS,e)<0})),u.length){i||((i=e.animate(n,t.loop,!0)).scope="keyframe");for(var c=0;c<s.length;c++)s[c]!==i&&s[c].targetName===i.targetName&&s[c].stopTracks(u);n&&(a[n]=a[n]||{});var d=n?a[n]:a;each$f(u,function(t){d[t]=((n?e[n]:e)||{})[t]}),i.whenWithKeys(o*r.percent,l,u,r.easing)}}}),i&&i.delay(t.delay||0).duration(o).start(t.easing))})}}}var EMPHASIS="emphasis",NORMAL="normal",BLUR="blur",SELECT="select",STATES=[NORMAL,EMPHASIS,BLUR,SELECT],PATH_ITEM_STYLE={normal:["itemStyle"],emphasis:[EMPHASIS,"itemStyle"],blur:[BLUR,"itemStyle"],select:[SELECT,"itemStyle"]},PATH_LABEL={normal:["label"],emphasis:[EMPHASIS,"label"],blur:[BLUR,"label"],select:[SELECT,"label"]},DEFAULT_TRANSITION=["x","y"],GROUP_DIFF_PREFIX="e\0\0",attachedTxInfoTmp={normal:{},emphasis:{},blur:{},select:{}},prepareCustoms={cartesian2d:cartesianPrepareCustom,geo:geoPrepareCustom,single:singlePrepareCustom,polar:polarPrepareCustom,calendar:calendarPrepareCustom};function isPath(e){return e instanceof Path}function isDisplayable(e){return e instanceof Displayable}function copyElement(e,t){t.copyTransform(e),isDisplayable(t)&&isDisplayable(e)&&(t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel,t.invisible=e.invisible,t.ignore=e.ignore,isPath(t)&&isPath(e)&&t.setShape(e.shape))}var CustomChartView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var o=this._data,i=e.getData(),a=this.group,s=makeRenderItem(e,i,t,n);o||a.removeAll(),i.diff(o).add(function(t){createOrUpdateItem(n,null,t,s(t,r),e,a,i)}).remove(function(t){var n=o.getItemGraphicEl(t);n&&applyLeaveTransition(n,customInnerStore(n).option,e)}).update(function(t,l){var u=o.getItemGraphicEl(l);createOrUpdateItem(n,u,t,s(t,r),e,a,i)}).execute();var l=e.get("clip",!0)?createClipPath(e.coordinateSystem,!1,e):null;l?a.setClipPath(l):a.removeClipPath(),this._data=i},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,t,n,r,o){var i=t.getData(),a=makeRenderItem(t,i,n,r),s=this._progressiveEls=[];function l(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}for(var u=e.start;u<e.end;u++){var c=createOrUpdateItem(null,null,u,a(u,o),t,this.group,i);c&&(c.traverse(l),s.push(c))}},t.prototype.eachRendered=function(e){traverseElements(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,t,n,r){var o=t.element;if(null==o||n.name===o)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===o)return!0;return!1},t.type="custom",t}(ChartView);function createEl$1(e){var t,n=e.type;if("path"===n){var r=e.shape,o=null!=r.width&&null!=r.height?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,i=getPathData(r);t=makePath(i,null,o,r.layout||"center"),customInnerStore(t).customPathData=i}else if("image"===n)t=new ZRImage({}),customInnerStore(t).customImagePath=e.style.image;else if("text"===n)t=new ZRText({});else if("group"===n)t=new Group$3;else{if("compoundPath"===n)throw new Error('"compoundPath" is not supported yet.');var a=getShapeClass(n);if(!a){throwError("")}t=new a}return customInnerStore(t).customGraphicType=n,t.name=e.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function updateElNormal(e,t,n,r,o,i,a){stopPreviousKeyframeAnimationAndRestore(t);var s=o&&o.normal.cfg;s&&t.setTextConfig(s),r&&null==r.transition&&(r.transition=DEFAULT_TRANSITION);var l=r&&r.style;if(l){if("text"===t.type){var u=l;hasOwn(u,"textFill")&&(u.fill=u.textFill),hasOwn(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,d=isPath(t)?l.decal:null;e&&d&&(d.dirty=!0,c=createOrUpdatePatternFromDecal(d,e)),l.__decalPattern=c}isDisplayable(t)&&(l&&(c=l.__decalPattern)&&(l.decal=c));applyUpdateTransition(t,r,i,{dataIndex:n,isInit:a,clearStyle:!0}),applyKeyframeAnimation(t,r.keyframeAnimation,i)}function updateElOnState(e,t,n,r,o){var i=t.isGroup?null:t,a=o&&o[e].cfg;if(i){var s=i.ensureState(e);if(!1===r){var l=i.getState(e);l&&(l.style=null)}else s.style=r||null;a&&(s.textConfig=a),setDefaultStateProxy(i)}}function updateZ(e,t,n){if(!e.isGroup){var r=e,o=n.currentZ,i=n.currentZLevel;r.z=o,r.zlevel=i;var a=t.z2;null!=a&&(r.z2=a||0);for(var s=0;s<STATES.length;s++)updateZForEachState(r,t,STATES[s])}}function updateZForEachState(e,t,n){var r=n===NORMAL,o=r?t:retrieveStateOption(t,n),i=o?o.z2:null;null!=i&&((r?e:e.ensureState(n)).z2=i||0)}function makeRenderItem(e,t,n,r){var o=e.get("renderItem"),i=e.coordinateSystem,a={};i&&(a=i.prepareCustoms?i.prepareCustoms(i):prepareCustoms[i.type](i));for(var s,l,u=defaults$2({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:function(e,n){return null==n&&(n=s),t.getStore().get(t.getDimensionIndex(e||0),n)},style:function(n,r){null==r&&(r=s);var o=t.getItemVisual(r,"style"),i=o&&o.fill,a=o&&o.opacity,l=v(r,NORMAL).getItemStyle();null!=i&&(l.fill=i),null!=a&&(l.opacity=a);var u={inheritColor:isString(i)?i:"#000"},c=_(r,NORMAL),d=createTextStyle$1(c,null,u,!1,!0);d.text=c.getShallow("show")?retrieve2(e.getFormattedLabel(r,NORMAL),getDefaultLabel(t,r)):null;var p=createTextConfig(c,u,!1);return S(n,l),l=convertToEC4StyleForCustomSerise(l,d,p),n&&x(l,n),l.legacy=!0,l},ordinalRawValue:function(e,n){null==n&&(n=s),e=e||0;var r=t.getDimensionInfo(e);if(!r){var o=t.getDimensionIndex(e);return o>=0?t.getStore().get(o,n):void 0}var i=t.get(r.name,n),a=r&&r.ordinalMeta;return a?a.categories[i]:i},styleEmphasis:function(n,r){null==r&&(r=s);var o=v(r,EMPHASIS).getItemStyle(),i=_(r,EMPHASIS),a=createTextStyle$1(i,null,null,!0,!0);a.text=i.getShallow("show")?retrieve3(e.getFormattedLabel(r,EMPHASIS),e.getFormattedLabel(r,NORMAL),getDefaultLabel(t,r)):null;var l=createTextConfig(i,null,!0);return S(n,o),o=convertToEC4StyleForCustomSerise(o,a,l),n&&x(o,n),o.legacy=!0,o},visual:function(e,n){if(null==n&&(n=s),hasOwn(STYLE_VISUAL_TYPE,e)){var r=t.getItemVisual(n,"style");return r?r[STYLE_VISUAL_TYPE[e]]:null}if(hasOwn(NON_STYLE_VISUAL_PROPS,e))return t.getItemVisual(n,e)},barLayout:function(e){if("cartesian2d"===i.type){return getLayoutOnAxis(defaults$2({axis:i.getBaseAxis()},e))}},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(e){return getFont(e,n)}},a.api||{}),c={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:a.coordSys,dataInsideLength:t.count(),encode:wrapEncodeDef(e.getData())},d={},p={},h={},f={},g=0;g<STATES.length;g++){var m=STATES[g];h[m]=e.getModel(PATH_ITEM_STYLE[m]),f[m]=e.getModel(PATH_LABEL[m])}function y(e){return e===s?l||(l=t.getItemModel(e)):t.getItemModel(e)}function v(e,n){return t.hasItemOption?e===s?d[n]||(d[n]=y(e).getModel(PATH_ITEM_STYLE[n])):y(e).getModel(PATH_ITEM_STYLE[n]):h[n]}function _(e,n){return t.hasItemOption?e===s?p[n]||(p[n]=y(e).getModel(PATH_LABEL[n])):y(e).getModel(PATH_LABEL[n]):f[n]}return function(e,n){return s=e,l=null,d={},p={},o&&o(defaults$2({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},c),u)};function x(e,t){for(var n in t)hasOwn(t,n)&&(e[n]=t[n])}function S(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}}function wrapEncodeDef(e){var t={};return each$f(e.dimensions,function(n){var r=e.getDimensionInfo(n);if(!r.isExtraCoord){var o=r.coordDim;(t[o]=t[o]||[])[r.coordDimIndex]=e.getDimensionIndex(n)}}),t}function createOrUpdateItem(e,t,n,r,o,i,a){if(r){var s=doCreateOrUpdateEl(e,t,n,r,o,i);return s&&a.setItemGraphicEl(n,s),s&&toggleHoverEmphasis(s,r.focus,r.blurScope,r.emphasisDisabled),s}i.remove(t)}function doCreateOrUpdateEl(e,t,n,r,o,i){var a=-1,s=t;t&&doesElNeedRecreate(t,r,o)&&(a=indexOf(i.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=createEl$1(r),s&&copyElement(s,u)),!1===r.morph?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),attachedTxInfoTmp.normal.cfg=attachedTxInfoTmp.normal.conOpt=attachedTxInfoTmp.emphasis.cfg=attachedTxInfoTmp.emphasis.conOpt=attachedTxInfoTmp.blur.cfg=attachedTxInfoTmp.blur.conOpt=attachedTxInfoTmp.select.cfg=attachedTxInfoTmp.select.conOpt=null,attachedTxInfoTmp.isLegacy=!1,doCreateOrUpdateAttachedTx(u,n,r,o,l,attachedTxInfoTmp),doCreateOrUpdateClipPath(u,n,r,o,l),updateElNormal(e,u,n,r,attachedTxInfoTmp,o,l),hasOwn(r,"info")&&(customInnerStore(u).info=r.info);for(var c=0;c<STATES.length;c++){var d=STATES[c];if(d!==NORMAL){var p=retrieveStateOption(r,d);updateElOnState(d,u,p,retrieveStyleOptionOnState(r,p,d),attachedTxInfoTmp)}}return updateZ(u,r,o),"group"===r.type&&mergeChildren(e,u,n,r,o),a>=0?i.replaceAt(u,a):i.add(u),u}function doesElNeedRecreate(e,t,n){var r=customInnerStore(e),o=t.type,i=t.shape,a=t.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==r.customGraphicType||"path"===o&&hasOwnPathData(i)&&getPathData(i)!==r.customPathData||"image"===o&&hasOwn(a,"image")&&a.image!==r.customImagePath}function doCreateOrUpdateClipPath(e,t,n,r,o){var i=n.clipPath;if(!1===i)e&&e.getClipPath()&&e.removeClipPath();else if(i){var a=e.getClipPath();a&&doesElNeedRecreate(a,i,r)&&(a=null),a||(a=createEl$1(i),e.setClipPath(a)),updateElNormal(null,a,t,i,null,r,o)}}function doCreateOrUpdateAttachedTx(e,t,n,r,o,i){if(!e.isGroup){processTxInfo(n,null,i),processTxInfo(n,EMPHASIS,i);var a=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(null!=a||null!=s||null!=u||null!=l){var c=e.getTextContent();if(!1===a)c&&e.removeTextContent();else{a=i.normal.conOpt=a||{type:"text"},c?c.clearStates():(c=createEl$1(a),e.setTextContent(c)),updateElNormal(null,c,t,a,null,r,o);for(var d=a&&a.style,p=0;p<STATES.length;p++){var h=STATES[p];if(h!==NORMAL){var f=i[h].conOpt;updateElOnState(h,c,f,retrieveStyleOptionOnState(a,f,h),null)}}d?c.dirty():c.markRedraw()}}}}function processTxInfo(e,t,n){var r=t?retrieveStateOption(e,t):e,o=t?retrieveStyleOptionOnState(e,r,EMPHASIS):e.style,i=e.type,a=r?r.textConfig:null,s=e.textContent,l=s?t?retrieveStateOption(s,t):s:null;if(o&&(n.isLegacy||isEC4CompatibleStyle(o,i,!!a,!!l))){n.isLegacy=!0;var u=convertFromEC4CompatibleStyle(o,i,!t);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var c=l;!c.type&&(c.type="text")}var d=t?n[t]:n.normal;d.cfg=a,d.conOpt=l}function retrieveStateOption(e,t){return t?e?e[t]:null:e}function retrieveStyleOptionOnState(e,t,n){var r=t&&t.style;return null==r&&n===EMPHASIS&&e&&(r=e.styleEmphasis),r}function mergeChildren(e,t,n,r,o){var i=r.children,a=i?i.length:0,s=r.$mergeChildren,l="byName"===s||r.diffChildrenByName,u=!1===s;if(a||l||u)if(l)diffGroupChildren({api:e,oldChildren:t.children()||[],newChildren:i||[],dataIndex:n,seriesModel:o,group:t});else{u&&t.removeAll();for(var c=0;c<a;c++){var d=i[c],p=t.childAt(c);d?(null==d.ignore&&(d.ignore=!1),doCreateOrUpdateEl(e,p,n,d,o,t)):p.ignore=!0}for(var h=t.childCount()-1;h>=c;h--){var f=t.childAt(h);removeChildFromGroup(t,f,o)}}}function removeChildFromGroup(e,t,n){t&&applyLeaveTransition(t,customInnerStore(e).option,n)}function diffGroupChildren(e){new DataDiffer(e.oldChildren,e.newChildren,getKey$1,getKey$1,e).add(processAddUpdate).update(processAddUpdate).remove(processRemove).execute()}function getKey$1(e,t){var n=e&&e.name;return null!=n?n:GROUP_DIFF_PREFIX+t}function processAddUpdate(e,t){var n=this.context,r=null!=e?n.newChildren[e]:null,o=null!=t?n.oldChildren[t]:null;doCreateOrUpdateEl(n.api,o,n.dataIndex,r,n.seriesModel,n.group)}function processRemove(e){var t=this.context,n=t.oldChildren[e];n&&applyLeaveTransition(n,customInnerStore(n).option,t.seriesModel)}function getPathData(e){return e&&(e.pathData||e.d)}function hasOwnPathData(e){return e&&(hasOwn(e,"pathData")||hasOwn(e,"d"))}function install$t(e){e.registerChartView(CustomChartView),e.registerSeriesModel(CustomSeriesModel)}var inner$b=makeInner(),clone$3=clone$6,bind=bind$1,BaseAxisPointer=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var o=t.get("value"),i=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==o||this._lastStatus!==i){this._lastValue=o,this._lastStatus=i;var a=this._group,s=this._handle;if(!i||"hide"===i)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,o,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(a){var d=curry$1(updateProps,t,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new Group$3,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);updateMandatoryProps(a,t,!0),this._renderHandle(o)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),r=e.axis,o="category"===r.type,i=t.get("snap");if(!i&&!o)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(o&&r.getBandWidth()>a)return!0;if(i){var s=getAxisInfo$1(e).seriesDataCount,l=r.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,r,o){},e.prototype.createPointerEl=function(e,t,n,r){var o=t.pointer;if(o){var i=inner$b(e).pointerEl=new graphic$1[o.type](clone$3(t.pointer));e.add(i)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var o=inner$b(e).labelEl=new ZRText(clone$3(t.label));e.add(o),updateLabelShowHide(o,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=inner$b(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var o=inner$b(e).labelEl;o&&(o.setStyle(t.label.style),n(o,{x:t.label.x,y:t.label.y}),updateLabelShowHide(o,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,r=this._api.getZr(),o=this._handle,i=n.getModel("handle"),a=n.get("status");if(!i.get("show")||!a||"hide"===a)return o&&r.remove(o),void(this._handle=null);this._handle||(t=!0,o=this._handle=createIcon(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){stop(e.event)},onmousedown:bind(this._onHandleDragMove,this,0,0),drift:bind(this._onHandleDragMove,this),ondragend:bind(this._onHandleDragEnd,this)}),r.add(o)),updateMandatoryProps(o,n,!1),o.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=i.get("size");isArray$1(s)||(s=[s,s]),o.scaleX=s[0]/2,o.scaleY=s[1]/2,createOrUpdate(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){updateProps(this._axisPointerModel,!t&&this._moveAnimation,this._handle,getHandleTransProps(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(getHandleTransProps(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(getHandleTransProps(r)),inner$b(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),clear$1(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},e}();function updateProps(e,t,n,r){propsEqual(inner$b(n).lastProp,r)||(inner$b(n).lastProp=r,t?updateProps$1(n,r,e):(n.stopAnimation(),n.attr(r)))}function propsEqual(e,t){if(isObject$3(e)&&isObject$3(t)){var n=!0;return each$f(t,function(t,r){n=n&&propsEqual(e[r],t)}),!!n}return e===t}function updateLabelShowHide(e,t){e[t.get(["label","show"])?"show":"hide"]()}function getHandleTransProps(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function updateMandatoryProps(e,t,n){var r=t.get("z"),o=t.get("zlevel");e&&e.traverse(function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=o&&(e.zlevel=o),e.silent=n)})}function buildElStyle(e){var t,n=e.get("type"),r=e.getModel(n+"Style");return"line"===n?(t=r.getLineStyle()).fill=null:"shadow"===n&&((t=r.getAreaStyle()).stroke=null),t}function buildLabelElOption(e,t,n,r,o){var i=getValueLabel(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=normalizeCssArray(a.get("padding")||0),l=a.getFont(),u=getBoundingRect(i,l),c=o.position,d=u.width+s[1]+s[3],p=u.height+s[0]+s[2],h=o.align;"right"===h&&(c[0]-=d),"center"===h&&(c[0]-=d/2);var f=o.verticalAlign;"bottom"===f&&(c[1]-=p),"middle"===f&&(c[1]-=p/2),confineInContainer(c,d,p,r);var g=a.get("backgroundColor");g&&"auto"!==g||(g=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:createTextStyle$1(a,{text:i,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function confineInContainer(e,t,n,r){var o=r.getWidth(),i=r.getHeight();e[0]=Math.min(e[0]+t,o)-t,e[1]=Math.min(e[1]+n,i)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function getValueLabel(e,t,n,r,o){e=t.scale.parse(e);var i=t.scale.getLabel({value:e},{precision:o.precision}),a=o.formatter;if(a){var s={value:getAxisRawValue(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};each$f(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,o=t&&t.getDataParams(r);o&&s.seriesData.push(o)}),isString(a)?i=a.replace("{value}",i):isFunction(a)&&(i=a(s))}return i}function getTransformedPosition(e,t,n){var r=create$1();return rotate(r,r,n.rotation),translate(r,r,n.position),applyTransform([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function buildCartesianSingleLabelElOption(e,t,n,r,o,i){var a=AxisBuilder.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get(["label","margin"]),buildLabelElOption(t,r,o,i,{position:getTransformedPosition(r.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function makeLineShape(e,t,n){return{x1:e[n=n||0],y1:e[1-n],x2:t[n],y2:t[1-n]}}function makeRectShape(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}}function makeSectorShape(e,t,n,r,o,i){return{cx:e,cy:t,r0:n,r:r,startAngle:o,endAngle:i,clockwise:!0}}var CartesianAxisPointer=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.makeElOption=function(e,t,n,r,o){var i=n.axis,a=i.grid,s=r.get("type"),l=getCartesian(a,i).getOtherAxis(i).getGlobalExtent(),u=i.toGlobalCoord(i.dataToCoord(t,!0));if(s&&"none"!==s){var c=buildElStyle(r),d=pointerShapeBuilder$2[s](i,u,l);d.style=c,e.graphicKey=d.type,e.pointer=d}buildCartesianSingleLabelElOption(t,e,layout$2(a.model,n),n,r,o)},t.prototype.getHandleTransform=function(e,t,n){var r=layout$2(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var o=getTransformedPosition(t.axis,e,r);return{x:o[0],y:o[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var o=n.axis,i=o.grid,a=o.getGlobalExtent(!0),s=getCartesian(i,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=[e.x,e.y];u[l]+=t[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=u[l];return{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},t}(BaseAxisPointer);function getCartesian(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var pointerShapeBuilder$2={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:makeLineShape([t,n[0]],[t,n[1]],getAxisDimIndex(e))}},shadow:function(e,t,n){var r=Math.max(1,e.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:makeRectShape([t-r/2,n[0]],[r,o],getAxisDimIndex(e))}}};function getAxisDimIndex(e){return"x"===e.dim?0:1}var AxisPointerModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#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}},t}(ComponentModel),inner$a=makeInner(),each$8=each$f;function register(e,t,n){if(!env.node){var r=t.getZr();inner$a(r).records||(inner$a(r).records={}),initGlobalListeners(r,t),(inner$a(r).records[e]||(inner$a(r).records[e]={})).handler=n}}function initGlobalListeners(e,t){function n(n,r){e.on(n,function(n){var o=makeDispatchAction$1(t);each$8(inner$a(e).records,function(e){e&&r(e,n,o.dispatchAction)}),dispatchTooltipFinally(o.pendings,t)})}inner$a(e).initialized||(inner$a(e).initialized=!0,n("click",curry$1(doEnter,"click")),n("mousemove",curry$1(doEnter,"mousemove")),n("globalout",onLeave))}function dispatchTooltipFinally(e,t){var n,r=e.showTip.length,o=e.hideTip.length;r?n=e.showTip[r-1]:o&&(n=e.hideTip[o-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function onLeave(e,t,n){e.handler("leave",null,n)}function doEnter(e,t,n,r){t.handler(e,n,r)}function makeDispatchAction$1(e){var t={showTip:[],hideTip:[]},n=function(r){var o=t[r.type];o?o.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function unregister(e,t){if(!env.node){var n=t.getZr();(inner$a(n).records||{})[e]&&(inner$a(n).records[e]=null)}}var AxisPointerView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),o=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";register("axisPointer",n,function(e,t,n){"none"!==o&&("leave"===e||o.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){unregister("axisPointer",t)},t.prototype.dispose=function(e,t){unregister("axisPointer",t)},t.type="axisPointer",t}(ComponentView);function findPointFromSeries(e,t){var n,r=[],o=e.seriesIndex;if(null==o||!(n=t.getSeriesByIndex(o)))return{point:[]};var i=n.getData(),a=queryDataIndex(i,e);if(null==a||a<0||isArray$1(a))return{point:[]};var s=i.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,d=u.dim,p="x"===c||"radius"===c?1:0,h=i.mapDimension(d),f=[];f[p]=i.get(h,a),f[1-p]=i.get(i.getCalculationInfo("stackResultDimension"),a),r=l.dataToPoint(f)||[]}else r=l.dataToPoint(i.getValues(map$1(l.dimensions,function(e){return i.mapDimension(e)}),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:s}}var inner$9=makeInner();function axisTrigger(e,t,n){var r=e.currTrigger,o=[e.x,e.y],i=e,a=e.dispatchAction||bind$1(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){illegalPoint(o)&&(o=findPointFromSeries({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=illegalPoint(o),u=i.axesInfo,c=s.axesInfo,d="leave"===r||illegalPoint(o),p={},h={},f={list:[],map:{}},g={showPointer:curry$1(showPointer,h),showTooltip:curry$1(showTooltip,f)};each$f(s.coordSysMap,function(e,t){var n=l||e.containPoint(o);each$f(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,i=findInputAxisInfo(u,e);if(!d&&n&&(!u||i)){var a=i&&i.value;null!=a||l||(a=r.pointToData(o)),null!=a&&processOnAxis(e,a,g,!1,p)}})});var m={};return each$f(c,function(e,t){var n=e.linkGroup;n&&!h[t]&&each$f(n.axesInfo,function(t,r){var o=h[r];if(t!==e&&o){var i=o.value;n.mapper&&(i=e.axis.scale.parse(n.mapper(i,makeMapperParam(t),makeMapperParam(e)))),m[e.key]=i}})}),each$f(m,function(e,t){processOnAxis(c[t],e,g,!0,p)}),updateModelActually(h,c,p),dispatchTooltipActually(f,o,e,a),dispatchHighDownActually(c,a,n),p}}function processOnAxis(e,t,n,r,o){var i=e.axis;if(!i.scale.isBlank()&&i.containData(t))if(e.involveSeries){var a=buildPayloadsBySeries(t,e),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==o.seriesIndex&&extend$2(o,s[0]),!r&&e.snap&&i.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s),n.showTooltip(e,a,l)}else n.showPointer(e,t)}function buildPayloadsBySeries(e,t){var n=t.axis,r=n.dim,o=e,i=[],a=Number.MAX_VALUE,s=-1;return each$f(t.seriesModels,function(t,l){var u,c,d=t.getData().mapDimensionsAll(r);if(t.getAxisTooltipData){var p=t.getAxisTooltipData(d,e,n);c=p.dataIndices,u=p.nestestValue}else{if(!(c=t.getData().indicesOfNearest(d[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(d[0],c[0])}if(null!=u&&isFinite(u)){var h=e-u,f=Math.abs(h);f<=a&&((f<a||h>=0&&s<0)&&(a=f,s=h,o=u,i.length=0),each$f(c,function(e){i.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:i,snapToValue:o}}function showPointer(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function showTooltip(e,t,n,r){var o=n.payloadBatch,i=t.axis,a=i.model,s=t.axisPointerModel;if(t.triggerTooltip&&o.length){var l=t.coordSys.model,u=makeKey(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:i.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:o.slice()})}}function updateModelActually(e,t,n){var r=n.axesInfo=[];each$f(t,function(t,n){var o=t.axisPointerModel.option,i=e[n];i?(!t.useHandle&&(o.status="show"),o.value=i.value,o.seriesDataIndices=(i.payloadBatch||[]).slice()):!t.useHandle&&(o.status="hide"),"show"===o.status&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:o.value})})}function dispatchTooltipActually(e,t,n,r){if(!illegalPoint(t)&&e.list.length){var o=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:e.list})}else r({type:"hideTip"})}function dispatchHighDownActually(e,t,n){var r=n.getZr(),o="axisPointerLastHighlights",i=inner$9(r)[o]||{},a=inner$9(r)[o]={};each$f(e,function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&each$f(n.seriesDataIndices,function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e})});var s=[],l=[];each$f(i,function(e,t){!a[t]&&l.push(e)}),each$f(a,function(e,t){!i[t]&&s.push(e)}),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function findInputAxisInfo(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function makeMapperParam(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=t.componentIndex,n.axisName=n[r+"AxisName"]=t.name,n.axisId=n[r+"AxisId"]=t.id,n}function illegalPoint(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function install$s(e){AxisView.registerAxisPointerClass("CartesianAxisPointer",CartesianAxisPointer),e.registerComponentModel(AxisPointerModel),e.registerComponentView(AxisPointerView),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!isArray$1(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=collect(e,t)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},axisTrigger)}function install$r(e){use(install$P),use(install$s)}var PolarAxisPointer=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.makeElOption=function(e,t,n,r,o){var i=n.axis;"angle"===i.dim&&(this.animationThreshold=Math.PI/18);var a=i.polar,s=a.getOtherAxis(i).getExtent(),l=i.dataToCoord(t),u=r.get("type");if(u&&"none"!==u){var c=buildElStyle(r),d=pointerShapeBuilder$1[u](i,a,l,s);d.style=c,e.graphicKey=d.type,e.pointer=d}var p=r.get(["label","margin"]);buildLabelElOption(e,n,r,o,getLabelPosition(t,n,r,a,p))},t}(BaseAxisPointer);function getLabelPosition(e,t,n,r,o){var i=t.axis,a=i.dataToCoord(e),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,d=r.getRadiusAxis().getExtent();if("radius"===i.dim){var p=create$1();rotate(p,p,s),translate(p,p,[r.cx,r.cy]),l=applyTransform([a,-o],p);var h=t.getModel("axisLabel").get("rotate")||0,f=AxisBuilder.innerTextLayout(s,h*Math.PI/180,-1);u=f.textAlign,c=f.textVerticalAlign}else{var g=d[1];l=r.coordToPoint([g+o,a]);var m=r.cx,y=r.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",c=Math.abs(l[1]-y)/g<.3?"middle":l[1]>y?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}var pointerShapeBuilder$1={line:function(e,t,n,r){return"angle"===e.dim?{type:"Line",shape:makeLineShape(t.coordToPoint([r[0],n]),t.coordToPoint([r[1],n]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,r){var o=Math.max(1,e.getBandWidth()),i=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:makeSectorShape(t.cx,t.cy,r[0],r[1],(-n-o/2)*i,(o/2-n)*i)}:{type:"Sector",shape:makeSectorShape(t.cx,t.cy,n-o/2,n+o/2,0,2*Math.PI)}}},PolarModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.findAxisModel=function(e){var t;return this.ecModel.eachComponent(e,function(e){e.getCoordSysModel()===this&&(t=e)},this),t},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(ComponentModel),PolarAxisModel=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",SINGLE_REFERRING).models[0]},t.type="polarAxis",t}(ComponentModel);mixin(PolarAxisModel,AxisModelCommonMixin);var AngleAxisModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.type="angleAxis",t}(PolarAxisModel),RadiusAxisModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.type="radiusAxis",t}(PolarAxisModel),RadiusAxis=function(e){function t(t,n){return e.call(this,"radius",t,n)||this}return __extends(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t}(Axis);RadiusAxis.prototype.dataToRadius=Axis.prototype.dataToCoord,RadiusAxis.prototype.radiusToData=Axis.prototype.coordToData;var inner$8=makeInner(),AngleAxis=function(e){function t(t,n){return e.call(this,"angle",t,n||[0,360])||this}return __extends(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,t=e.getLabelModel(),n=e.scale,r=n.getExtent(),o=n.count();if(r[1]-r[0]<1)return 0;var i=r[0],a=e.dataToCoord(i+1)-e.dataToCoord(i),s=Math.abs(a),l=getBoundingRect(null==i?"":i+"",t.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var c=Math.max(0,Math.floor(u)),d=inner$8(e.model),p=d.lastAutoInterval,h=d.lastTickCount;return null!=p&&null!=h&&Math.abs(p-c)<=1&&Math.abs(h-o)<=1&&p>c?c=p:(d.lastTickCount=o,d.lastAutoInterval=c),c},t}(Axis);AngleAxis.prototype.dataToAngle=Axis.prototype.dataToCoord,AngleAxis.prototype.angleToData=Axis.prototype.coordToData;var polarDimensions=["radius","angle"],Polar=function(){function e(e){this.dimensions=polarDimensions,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new RadiusAxis,this._angleAxis=new AngleAxis,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},e.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},e.prototype.getAxis=function(e){return this["_"+e+"Axis"]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,r=this._radiusAxis;return n.scale.type===e&&t.push(n),r.scale.type===e&&t.push(r),t},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(e){var t=null!=e&&"auto"!==e?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},e.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},e.prototype.pointToData=function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},e.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,r=this.getAngleAxis(),o=r.getExtent(),i=Math.min(o[0],o[1]),a=Math.max(o[0],o[1]);r.inverse?i=a-360:a=i+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;for(var l=Math.atan2(-n,t)/Math.PI*180,u=l<i?1:-1;l<i||l>a;)l+=360*u;return[s,l]},e.prototype.coordToPoint=function(e){var t=e[0],n=e[1]/180*Math.PI;return[Math.cos(n)*t+this.cx,-Math.sin(n)*t+this.cy]},e.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var n=e.getExtent(),r=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*r,endAngle:-n[1]*r,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,r=t-this.cy,i=n*n+r*r,a=this.r,s=this.r0;return a!==s&&i-o<=a*a&&i+o>=s*s}}},e.prototype.convertToPixel=function(e,t,n){return getCoordSys$2(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return getCoordSys$2(t)===this?this.pointToData(n):null},e}();function getCoordSys$2(e){var t=e.seriesModel,n=e.polarModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function resizePolar(e,t,n){var r=t.get("center"),o=n.getWidth(),i=n.getHeight();e.cx=parsePercent(r[0],o),e.cy=parsePercent(r[1],i);var a=e.getRadiusAxis(),s=Math.min(o,i)/2,l=t.get("radius");null==l?l=[0,"100%"]:isArray$1(l)||(l=[0,l]);var u=[parsePercent(l[0],s),parsePercent(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}function updatePolarScale(e,t){var n=this,r=n.getAngleAxis(),o=n.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),e.eachSeries(function(e){if(e.coordinateSystem===n){var t=e.getData();each$f(getDataDimensionsOnAxis(t,"radius"),function(e){o.scale.unionExtentFromData(t,e)}),each$f(getDataDimensionsOnAxis(t,"angle"),function(e){r.scale.unionExtentFromData(t,e)})}}),niceScaleExtent(r.scale,r.model),niceScaleExtent(o.scale,o.model),"category"===r.type&&!r.onBand){var i=r.getExtent(),a=360/r.scale.count();r.inverse?i[1]+=a:i[1]-=a,r.setExtent(i[0],i[1])}}function isAngleAxisModel(e){return"angleAxis"===e.mainType}function setAxis(e,t){var n;if(e.type=t.get("type"),e.scale=createScaleByModel$1(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),isAngleAxisModel(t)){e.inverse=e.inverse!==t.get("clockwise");var r=t.get("startAngle"),o=null!==(n=t.get("endAngle"))&&void 0!==n?n:r+(e.inverse?-360:360);e.setExtent(r,o)}t.axis=e,e.model=t}var polarCreator={dimensions:polarDimensions,create:function(e,t){var n=[];return e.eachComponent("polar",function(e,r){var o=new Polar(r+"");o.update=updatePolarScale;var i=o.getRadiusAxis(),a=o.getAngleAxis(),s=e.findAxisModel("radiusAxis"),l=e.findAxisModel("angleAxis");setAxis(i,s),setAxis(a,l),resizePolar(o,e,t),n.push(o),e.coordinateSystem=o,o.model=e}),e.eachSeries(function(e){if("polar"===e.get("coordinateSystem")){var t=e.getReferringComponents("polar",SINGLE_REFERRING).models[0];e.coordinateSystem=t.coordinateSystem}}),n}},elementList=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function getAxisLineShape(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var r=e.coordToPoint([t[0],n]),o=e.coordToPoint([t[1],n]);return{x1:r[0],y1:r[1],x2:o[0],y2:o[1]}}function getRadiusIdx(e){return e.getRadiusAxis().inverse?0:1}function fixAngleOverlap(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}var AngleAxisView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="PolarAxisPointer",n}return __extends(t,e),t.prototype.render=function(e,t){if(this.group.removeAll(),e.get("show")){var n=e.axis,r=n.polar,o=r.getRadiusAxis().getExtent(),i=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=map$1(n.getViewLabels(),function(e){e=clone$6(e);var t=n.scale,r="ordinal"===t.type?t.getRawOrdinalNumber(e.tickValue):e.tickValue;return e.coord=n.dataToCoord(r),e});fixAngleOverlap(s),fixAngleOverlap(i),each$f(elementList,function(t){!e.get([t,"show"])||n.scale.isBlank()&&"axisLine"!==t||angelAxisElementsBuilders[t](this.group,e,r,i,a,o,s)},this)}},t.type="angleAxis",t}(AxisView),angelAxisElementsBuilders={axisLine:function(e,t,n,r,o,i){var a,s=t.getModel(["axisLine","lineStyle"]),l=n.getAngleAxis(),u=Math.PI/180,c=l.getExtent(),d=getRadiusIdx(n),p=d?0:1,h=360===Math.abs(c[1]-c[0])?"Circle":"Arc";(a=0===i[p]?new graphic$1[h]({shape:{cx:n.cx,cy:n.cy,r:i[d],startAngle:-c[0]*u,endAngle:-c[1]*u,clockwise:l.inverse},style:s.getLineStyle(),z2:1,silent:!0}):new Ring({shape:{cx:n.cx,cy:n.cy,r:i[d],r0:i[p]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,e.add(a)},axisTick:function(e,t,n,r,o,i){var a=t.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=i[getRadiusIdx(n)],u=map$1(r,function(e){return new Line$1({shape:getAxisLineShape(n,[l,l+s],e.coord)})});e.add(mergePath(u,{style:defaults$2(a.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,n,r,o,i){if(o.length){for(var a=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=i[getRadiusIdx(n)],c=[],d=0;d<o.length;d++)for(var p=0;p<o[d].length;p++)c.push(new Line$1({shape:getAxisLineShape(n,[u,u+l],o[d][p].coord)}));e.add(mergePath(c,{style:defaults$2(s.getModel("lineStyle").getLineStyle(),defaults$2(a.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(e,t,n,r,o,i,a){var s=t.getCategories(!0),l=t.getModel("axisLabel"),u=l.get("margin"),c=t.get("triggerEvent");each$f(a,function(r,o){var a=l,d=r.tickValue,p=i[getRadiusIdx(n)],h=n.coordToPoint([p+u,r.coord]),f=n.cx,g=n.cy,m=Math.abs(h[0]-f)/p<.3?"center":h[0]>f?"left":"right",y=Math.abs(h[1]-g)/p<.3?"middle":h[1]>g?"top":"bottom";if(s&&s[d]){var v=s[d];isObject$3(v)&&v.textStyle&&(a=new Model(v.textStyle,l,l.ecModel))}var _=new ZRText({silent:AxisBuilder.isLabelSilent(t),style:createTextStyle$1(a,{x:h[0],y:h[1],fill:a.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:r.formattedLabel,align:m,verticalAlign:y})});if(e.add(_),c){var x=AxisBuilder.makeAxisEventDataBase(t);x.targetType="axisLabel",x.value=r.rawLabel,getECData(_).eventData=x}},this)},splitLine:function(e,t,n,r,o,i){var a=t.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=0;c<r.length;c++){var d=l++%s.length;u[d]=u[d]||[],u[d].push(new Line$1({shape:getAxisLineShape(n,i,r[c].coord)}))}for(c=0;c<u.length;c++)e.add(mergePath(u[c],{style:defaults$2({stroke:s[c%s.length]},a.getLineStyle()),silent:!0,z:t.get("z")}))},minorSplitLine:function(e,t,n,r,o,i){if(o.length){for(var a=t.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<o.length;l++)for(var u=0;u<o[l].length;u++)s.push(new Line$1({shape:getAxisLineShape(n,i,o[l][u].coord)}));e.add(mergePath(s,{style:a.getLineStyle(),silent:!0,z:t.get("z")}))}},splitArea:function(e,t,n,r,o,i){if(r.length){var a=t.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=Math.PI/180,d=-r[0].coord*c,p=Math.min(i[0],i[1]),h=Math.max(i[0],i[1]),f=t.get("clockwise"),g=1,m=r.length;g<=m;g++){var y=g===m?r[0].coord:r[g].coord,v=l++%s.length;u[v]=u[v]||[],u[v].push(new Sector({shape:{cx:n.cx,cy:n.cy,r0:p,r:h,startAngle:d,endAngle:-y*c,clockwise:f},silent:!0})),d=-y*c}for(g=0;g<u.length;g++)e.add(mergePath(u[g],{style:defaults$2({fill:s[g%s.length]},a.getAreaStyle()),silent:!0}))}}},axisBuilderAttrs$1=["axisLine","axisTickLabel","axisName"],selfBuilderAttrs$1=["splitLine","splitArea","minorSplitLine"],RadiusAxisView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="PolarAxisPointer",n}return __extends(t,e),t.prototype.render=function(e,t){if(this.group.removeAll(),e.get("show")){var n=this._axisGroup,r=this._axisGroup=new Group$3;this.group.add(r);var o=e.axis,i=o.polar,a=i.getAngleAxis(),s=o.getTicksCoords(),l=o.getMinorTicksCoords(),u=a.getExtent()[0],c=o.getExtent(),d=layoutAxis(i,e,u),p=new AxisBuilder(e,d);each$f(axisBuilderAttrs$1,p.add,p),r.add(p.getGroup()),groupTransition(n,r,e),each$f(selfBuilderAttrs$1,function(t){e.get([t,"show"])&&!o.scale.isBlank()&&axisElementBuilders$1[t](this.group,e,i,u,c,s,l)},this)}},t.type="radiusAxis",t}(AxisView),axisElementBuilders$1={splitLine:function(e,t,n,r,o,i){var a=t.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0,u=n.getAngleAxis(),c=Math.PI/180,d=u.getExtent(),p=360===Math.abs(d[1]-d[0])?"Circle":"Arc";s=s instanceof Array?s:[s];for(var h=[],f=0;f<i.length;f++){var g=l++%s.length;h[g]=h[g]||[],h[g].push(new graphic$1[p]({shape:{cx:n.cx,cy:n.cy,r:Math.max(i[f].coord,0),startAngle:-d[0]*c,endAngle:-d[1]*c,clockwise:u.inverse}}))}for(f=0;f<h.length;f++)e.add(mergePath(h[f],{style:defaults$2({stroke:s[f%s.length],fill:null},a.getLineStyle()),silent:!0}))},minorSplitLine:function(e,t,n,r,o,i,a){if(a.length){for(var s=t.getModel("minorSplitLine").getModel("lineStyle"),l=[],u=0;u<a.length;u++)for(var c=0;c<a[u].length;c++)l.push(new Circle({shape:{cx:n.cx,cy:n.cy,r:a[u][c].coord}}));e.add(mergePath(l,{style:defaults$2({fill:null},s.getLineStyle()),silent:!0}))}},splitArea:function(e,t,n,r,o,i){if(i.length){var a=t.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=i[0].coord,d=1;d<i.length;d++){var p=l++%s.length;u[p]=u[p]||[],u[p].push(new Sector({shape:{cx:n.cx,cy:n.cy,r0:c,r:i[d].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),c=i[d].coord}for(d=0;d<u.length;d++)e.add(mergePath(u[d],{style:defaults$2({fill:s[d%s.length]},a.getAreaStyle()),silent:!0}))}}};function layoutAxis(e,t,n){return{position:[e.cx,e.cy],rotation:n/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}function getSeriesStackId(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function getAxisKey(e,t){return t.dim+e.model.componentIndex}function barLayoutPolar(e,t,n){var r={},o=calRadialBar(filter(t.getSeriesByType(e),function(e){return!t.isSeriesFiltered(e)&&e.coordinateSystem&&"polar"===e.coordinateSystem.type}));t.eachSeriesByType(e,function(e){if("polar"===e.coordinateSystem.type){var t=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=getAxisKey(n,i),s=getSeriesStackId(e),l=o[a][s],u=l.offset,c=l.width,d=n.getOtherAxis(i),p=e.coordinateSystem.cx,h=e.coordinateSystem.cy,f=e.get("barMinHeight")||0,g=e.get("barMinAngle")||0;r[s]=r[s]||[];for(var m=t.mapDimension(d.dim),y=t.mapDimension(i.dim),v=isDimensionStacked(t,m),_="radius"!==i.dim||!e.get("roundCap",!0),x=d.model.get("startValue"),S=d.dataToCoord(x||0),b=0,T=t.count();b<T;b++){var A=t.get(m,b),w=t.get(y,b),C=A>=0?"p":"n",E=S;v&&(r[s][w]||(r[s][w]={p:S,n:S}),E=r[s][w][C]);var M=void 0,I=void 0,P=void 0,D=void 0;if("radius"===d.dim){var k=d.dataToCoord(A)-S,$=i.dataToCoord(w);Math.abs(k)<f&&(k=(k<0?-1:1)*f),M=E,I=E+k,D=(P=$-u)-c,v&&(r[s][w][C]=I)}else{var R=d.dataToCoord(A,_)-S,L=i.dataToCoord(w);Math.abs(R)<g&&(R=(R<0?-1:1)*g),I=(M=L+u)+c,P=E,D=E+R,v&&(r[s][w][C]=D)}t.setItemLayout(b,{cx:p,cy:h,r0:M,r:I,startAngle:-P*Math.PI/180,endAngle:-D*Math.PI/180,clockwise:P>=D})}}})}function calRadialBar(e){var t={};each$f(e,function(e,n){var r=e.getData(),o=e.coordinateSystem,i=o.getBaseAxis(),a=getAxisKey(o,i),s=i.getExtent(),l="category"===i.type?i.getBandWidth():Math.abs(s[1]-s[0])/r.count(),u=t[a]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=u.stacks;t[a]=u;var d=getSeriesStackId(e);c[d]||u.autoWidthCount++,c[d]=c[d]||{width:0,maxWidth:0};var p=parsePercent(e.get("barWidth"),l),h=parsePercent(e.get("barMaxWidth"),l),f=e.get("barGap"),g=e.get("barCategoryGap");p&&!c[d].width&&(p=Math.min(u.remainedWidth,p),c[d].width=p,u.remainedWidth-=p),h&&(c[d].maxWidth=h),null!=f&&(u.gap=f),null!=g&&(u.categoryGap=g)});var n={};return each$f(t,function(e,t){n[t]={};var r=e.stacks,o=e.bandWidth,i=parsePercent(e.categoryGap,o),a=parsePercent(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-i)/(l+(l-1)*a);u=Math.max(u,0),each$f(r,function(e,t){var n=e.maxWidth;n&&n<u&&(n=Math.min(n,s),e.width&&(n=Math.min(n,e.width)),s-=n,e.width=n,l--)}),u=(s-i)/(l+(l-1)*a),u=Math.max(u,0);var c,d=0;each$f(r,function(e,t){e.width||(e.width=u),c=e,d+=e.width*(1+a)}),c&&(d-=c.width*a);var p=-d/2;each$f(r,function(e,r){n[t][r]=n[t][r]||{offset:p,width:e.width},p+=e.width*(1+a)})}),n}var angleAxisExtraOption={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},radiusAxisExtraOption={splitNumber:5},PolarView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.type="polar",t}(ComponentView);function install$q(e){use(install$s),AxisView.registerAxisPointerClass("PolarAxisPointer",PolarAxisPointer),e.registerCoordinateSystem("polar",polarCreator),e.registerComponentModel(PolarModel),e.registerComponentView(PolarView),axisModelCreator(e,"angle",AngleAxisModel,angleAxisExtraOption),axisModelCreator(e,"radius",RadiusAxisModel,radiusAxisExtraOption),e.registerComponentView(AngleAxisView),e.registerComponentView(RadiusAxisView),e.registerLayout(curry$1(barLayoutPolar,"bar"))}function layout$1(e,t){t=t||{};var n=e.coordinateSystem,r=e.axis,o={},i=r.position,a=r.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===a?u.vertical[i]:l[0],"horizontal"===a?u.horizontal[i]:l[3]];o.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[i],e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),retrieve(t.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var c=t.rotate;return null==c&&(c=e.get(["axisLabel","rotate"])),o.labelRotation="top"===i?-c:c,o.z2=1,o}var axisBuilderAttrs=["axisLine","axisTickLabel","axisName"],selfBuilderAttrs=["splitArea","splitLine"],SingleAxisView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="SingleAxisPointer",n}return __extends(t,e),t.prototype.render=function(t,n,r,o){var i=this.group;i.removeAll();var a=this._axisGroup;this._axisGroup=new Group$3;var s=layout$1(t),l=new AxisBuilder(t,s);each$f(axisBuilderAttrs,l.add,l),i.add(this._axisGroup),i.add(l.getGroup()),each$f(selfBuilderAttrs,function(e){t.get([e,"show"])&&axisElementBuilders[e](this,this.group,this._axisGroup,t)},this),groupTransition(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,o)},t.prototype.remove=function(){rectCoordAxisHandleRemove(this)},t.type="singleAxis",t}(AxisView),axisElementBuilders={splitLine:function(e,t,n,r){var o=r.axis;if(!o.scale.isBlank()){var i=r.getModel("splitLine"),a=i.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=a.get("width"),u=r.coordinateSystem.getRect(),c=o.isHorizontal(),d=[],p=0,h=o.getTicksCoords({tickModel:i}),f=[],g=[],m=0;m<h.length;++m){var y=o.toGlobalCoord(h[m].coord);c?(f[0]=y,f[1]=u.y,g[0]=y,g[1]=u.y+u.height):(f[0]=u.x,f[1]=y,g[0]=u.x+u.width,g[1]=y);var v=new Line$1({shape:{x1:f[0],y1:f[1],x2:g[0],y2:g[1]},silent:!0});subPixelOptimizeLine(v.shape,l);var _=p++%s.length;d[_]=d[_]||[],d[_].push(v)}var x=a.getLineStyle(["color"]);for(m=0;m<d.length;++m)t.add(mergePath(d[m],{style:defaults$2({stroke:s[m%s.length]},x),silent:!0}))}},splitArea:function(e,t,n,r){rectCoordAxisBuildSplitArea(e,n,r,r)}},SingleAxisModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.getCoordSysModel=function(){return this},t.type="singleAxis",t.layoutMode="box",t.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},t}(ComponentModel);mixin(SingleAxisModel,AxisModelCommonMixin.prototype);var SingleAxis=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n,r)||this;return a.type=o||"value",a.position=i||"bottom",a}return __extends(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.pointToData=function(e,t){return this.coordinateSystem.pointToData(e)[0]},t}(Axis),singleDimensions=["single"],Single=function(){function e(e,t,n){this.type="single",this.dimension="single",this.dimensions=singleDimensions,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var r=this.dimension,o=new SingleAxis(r,createScaleByModel$1(e),[0,0],e.get("type"),e.get("position")),i="category"===o.type;o.onBand=i&&e.get("boundaryGap"),o.inverse=e.get("inverse"),o.orient=e.get("orient"),e.axis=o,o.model=e,o.coordinateSystem=this,this._axis=o},e.prototype.update=function(e,t){e.eachSeries(function(e){if(e.coordinateSystem===this){var t=e.getData();each$f(t.mapDimensionsAll(this.dimension),function(e){this._axis.scale.unionExtentFromData(t,e)},this),niceScaleExtent(this._axis.scale,this._axis.model)}},this)},e.prototype.resize=function(e,t){this._rect=getLayoutRect({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},e.prototype.getRect=function(){return this._rect},e.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),r=n?[0,e.width]:[0,e.height],o=t.inverse?1:0;t.setExtent(r[o],r[1-o]),this._updateAxisTransform(t,n?e.x:e.y)},e.prototype._updateAxisTransform=function(e,t){var n=e.getExtent(),r=n[0]+n[1],o=e.isHorizontal();e.toGlobalCoord=o?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=o?function(e){return e-t}:function(e){return r-e+t}},e.prototype.getAxis=function(){return this._axis},e.prototype.getBaseAxis=function(){return this._axis},e.prototype.getAxes=function(){return[this._axis]},e.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},e.prototype.containPoint=function(e){var t=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},e.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e["horizontal"===t.orient?0:1]))]},e.prototype.dataToPoint=function(e){var t=this.getAxis(),n=this.getRect(),r=[],o="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),r[o]=t.toGlobalCoord(t.dataToCoord(+e)),r[1-o]=0===o?n.y+n.height/2:n.x+n.width/2,r},e.prototype.convertToPixel=function(e,t,n){return getCoordSys$1(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return getCoordSys$1(t)===this?this.pointToData(n):null},e}();function getCoordSys$1(e){var t=e.seriesModel,n=e.singleAxisModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function create(e,t){var n=[];return e.eachComponent("singleAxis",function(r,o){var i=new Single(r,e,t);i.name="single_"+o,i.resize(r,t),r.coordinateSystem=i,n.push(i)}),e.eachSeries(function(e){if("singleAxis"===e.get("coordinateSystem")){var t=e.getReferringComponents("singleAxis",SINGLE_REFERRING).models[0];e.coordinateSystem=t&&t.coordinateSystem}}),n}var singleCreator={create:create,dimensions:singleDimensions},XY$1=["x","y"],WH$1=["width","height"],SingleAxisPointer=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.makeElOption=function(e,t,n,r,o){var i=n.axis,a=i.coordinateSystem,s=getGlobalExtent(a,1-getPointDimIndex(i)),l=a.dataToPoint(t)[0],u=r.get("type");if(u&&"none"!==u){var c=buildElStyle(r),d=pointerShapeBuilder[u](i,l,s);d.style=c,e.graphicKey=d.type,e.pointer=d}buildCartesianSingleLabelElOption(t,e,layout$1(n),n,r,o)},t.prototype.getHandleTransform=function(e,t,n){var r=layout$1(t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var o=getTransformedPosition(t.axis,e,r);return{x:o[0],y:o[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var o=n.axis,i=o.coordinateSystem,a=getPointDimIndex(o),s=getGlobalExtent(i,a),l=[e.x,e.y];l[a]+=t[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=getGlobalExtent(i,1-a),c=(u[1]+u[0])/2,d=[c,c];return d[a]=l[a],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},t}(BaseAxisPointer),pointerShapeBuilder={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:makeLineShape([t,n[0]],[t,n[1]],getPointDimIndex(e))}},shadow:function(e,t,n){var r=e.getBandWidth(),o=n[1]-n[0];return{type:"Rect",shape:makeRectShape([t-r/2,n[0]],[r,o],getPointDimIndex(e))}}};function getPointDimIndex(e){return e.isHorizontal()?0:1}function getGlobalExtent(e,t){var n=e.getRect();return[n[XY$1[t]],n[XY$1[t]]+n[WH$1[t]]]}var SingleView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.type="single",t}(ComponentView);function install$p(e){use(install$s),AxisView.registerAxisPointerClass("SingleAxisPointer",SingleAxisPointer),e.registerComponentView(SingleView),e.registerComponentView(SingleAxisView),e.registerComponentModel(SingleAxisModel),axisModelCreator(e,"single",SingleAxisModel,SingleAxisModel.defaultOption),e.registerCoordinateSystem("single",singleCreator)}var CalendarModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.init=function(t,n,r){var o=getLayoutParams(t);e.prototype.init.apply(this,arguments),mergeAndNormalizeLayoutParams$1(t,o)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),mergeAndNormalizeLayoutParams$1(this.option,t)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(ComponentModel);function mergeAndNormalizeLayoutParams$1(e,t){var n,r=e.cellSize;1===(n=isArray$1(r)?r:e.cellSize=[r,r]).length&&(n[1]=n[0]);var o=map$1([0,1],function(e){return sizeCalculable(t,e)&&(n[e]="auto"),null!=n[e]&&"auto"!==n[e]});mergeLayoutParam(e,t,{type:"box",ignoreSize:o})}var CalendarView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(e,t,n){var r=this.group;r.removeAll();var o=e.coordinateSystem,i=o.getRangeInfo(),a=o.getOrient(),s=t.getLocaleModel();this._renderDayRect(e,i,r),this._renderLines(e,i,a,r),this._renderYearText(e,i,a,r),this._renderMonthText(e,s,a,r),this._renderWeekText(e,s,i,a,r)},t.prototype._renderDayRect=function(e,t,n){for(var r=e.coordinateSystem,o=e.getModel("itemStyle").getItemStyle(),i=r.getCellWidth(),a=r.getCellHeight(),s=t.start.time;s<=t.end.time;s=r.getNextNDay(s,1).time){var l=r.dataToRect([s],!1).tl,u=new Rect$2({shape:{x:l[0],y:l[1],width:i,height:a},cursor:"default",style:o});n.add(u)}},t.prototype._renderLines=function(e,t,n,r){var o=this,i=e.coordinateSystem,a=e.getModel(["splitLine","lineStyle"]).getLineStyle(),s=e.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,c=0;u.time<=t.end.time;c++){p(u.formatedDate),0===c&&(u=i.getDateInfo(t.start.y+"-"+t.start.m));var d=u.date;d.setMonth(d.getMonth()+1),u=i.getDateInfo(d)}function p(t){o._firstDayOfMonth.push(i.getDateInfo(t)),o._firstDayPoints.push(i.dataToRect([t],!1).tl);var l=o._getLinePointsOfOneWeek(e,t,n);o._tlpoints.push(l[0]),o._blpoints.push(l[l.length-1]),s&&o._drawSplitline(l,a,r)}p(i.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,l,n),a,r),s&&this._drawSplitline(o._getEdgesPoints(o._blpoints,l,n),a,r)},t.prototype._getEdgesPoints=function(e,t,n){var r=[e[0].slice(),e[e.length-1].slice()],o="horizontal"===n?0:1;return r[0][o]=r[0][o]-t/2,r[1][o]=r[1][o]+t/2,r},t.prototype._drawSplitline=function(e,t,n){var r=new Polyline$1({z2:20,shape:{points:e},style:t});n.add(r)},t.prototype._getLinePointsOfOneWeek=function(e,t,n){for(var r=e.coordinateSystem,o=r.getDateInfo(t),i=[],a=0;a<7;a++){var s=r.getNextNDay(o.time,a),l=r.dataToRect([s.time],!1);i[2*s.day]=l.tl,i[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return i},t.prototype._formatterLabel=function(e,t){return isString(e)&&e?formatTplSimple(e,t):isFunction(e)?e(t):t.nameMap},t.prototype._yearTextPositionControl=function(e,t,n,r,o){var i=t[0],a=t[1],s=["center","bottom"];"bottom"===r?(a+=o,s=["center","top"]):"left"===r?i-=o:"right"===r?(i+=o,s=["center","top"]):a-=o;var l=0;return"left"!==r&&"right"!==r||(l=Math.PI/2),{rotation:l,x:i,y:a,style:{align:s[0],verticalAlign:s[1]}}},t.prototype._renderYearText=function(e,t,n,r){var o=e.getModel("yearLabel");if(o.get("show")){var i=o.get("margin"),a=o.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,d={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},p=t.start.y;+t.end.y>+t.start.y&&(p=p+"-"+t.end.y);var h=o.get("formatter"),f={start:t.start.y,end:t.end.y,nameMap:p},g=this._formatterLabel(h,f),m=new ZRText({z2:30,style:createTextStyle$1(o,{text:g}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,d[a],n,a,i)),r.add(m)}},t.prototype._monthTextPositionControl=function(e,t,n,r,o){var i="left",a="top",s=e[0],l=e[1];return"horizontal"===n?(l+=o,t&&(i="center"),"start"===r&&(a="bottom")):(s+=o,t&&(a="middle"),"start"===r&&(i="right")),{x:s,y:l,align:i,verticalAlign:a}},t.prototype._renderMonthText=function(e,t,n,r){var o=e.getModel("monthLabel");if(o.get("show")){var i=o.get("nameMap"),a=o.get("margin"),s=o.get("position"),l=o.get("align"),u=[this._tlpoints,this._blpoints];i&&!isString(i)||(i&&(t=getLocaleModel(i)||t),i=t.get(["time","monthAbbr"])||[]);var c="start"===s?0:1,d="horizontal"===n?0:1;a="start"===s?-a:a;for(var p="center"===l,h=o.get("silent"),f=0;f<u[c].length-1;f++){var g=u[c][f].slice(),m=this._firstDayOfMonth[f];if(p){var y=this._firstDayPoints[f];g[d]=(y[d]+u[0][f+1][d])/2}var v=o.get("formatter"),_=i[+m.m-1],x={yyyy:m.y,yy:(m.y+"").slice(2),MM:m.m,M:+m.m,nameMap:_},S=this._formatterLabel(v,x),b=new ZRText({z2:30,style:extend$2(createTextStyle$1(o,{text:S}),this._monthTextPositionControl(g,p,n,s,a)),silent:h});r.add(b)}}},t.prototype._weekTextPositionControl=function(e,t,n,r,o){var i="center",a="middle",s=e[0],l=e[1],u="start"===n;return"horizontal"===t?(s=s+r+(u?1:-1)*o[0]/2,i=u?"right":"left"):(l=l+r+(u?1:-1)*o[1]/2,a=u?"bottom":"top"),{x:s,y:l,align:i,verticalAlign:a}},t.prototype._renderWeekText=function(e,t,n,r,o){var i=e.getModel("dayLabel");if(i.get("show")){var a=e.coordinateSystem,s=i.get("position"),l=i.get("nameMap"),u=i.get("margin"),c=a.getFirstDayOfWeek();if(!l||isString(l))l&&(t=getLocaleModel(l)||t),l=t.get(["time","dayOfWeekShort"])||map$1(t.get(["time","dayOfWeekAbbr"]),function(e){return e[0]});var d=a.getNextNDay(n.end.time,7-n.lweek).time,p=[a.getCellWidth(),a.getCellHeight()];u=parsePercent(u,Math.min(p[1],p[0])),"start"===s&&(d=a.getNextNDay(n.start.time,-(7+n.fweek)).time,u=-u);for(var h=i.get("silent"),f=0;f<7;f++){var g,m=a.getNextNDay(d,f),y=a.dataToRect([m.time],!1).center;g=Math.abs((f+c)%7);var v=new ZRText({z2:30,style:extend$2(createTextStyle$1(i,{text:l[g]}),this._weekTextPositionControl(y,r,s,u,p)),silent:h});o.add(v)}}},t.type="calendar",t}(ComponentView),PROXIMATE_ONE_DAY=864e5,Calendar=function(){function e(t,n,r){this.type="calendar",this.dimensions=e.dimensions,this.getDimensionsInfo=e.getDimensionsInfo,this._model=t}return e.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},e.prototype.getRangeInfo=function(){return this._rangeInfo},e.prototype.getModel=function(){return this._model},e.prototype.getRect=function(){return this._rect},e.prototype.getCellWidth=function(){return this._sw},e.prototype.getCellHeight=function(){return this._sh},e.prototype.getOrient=function(){return this._orient},e.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},e.prototype.getDateInfo=function(e){var t=(e=parseDate(e)).getFullYear(),n=e.getMonth()+1,r=n<10?"0"+n:""+n,o=e.getDate(),i=o<10?"0"+o:""+o,a=e.getDay();return{y:t+"",m:r,d:i,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:e.getTime(),formatedDate:t+"-"+r+"-"+i,date:e}},e.prototype.getNextNDay=function(e,t){return 0===(t=t||0)||(e=new Date(this.getDateInfo(e).time)).setDate(e.getDate()+t),this.getDateInfo(e)},e.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,r=["width","height"],o=this._model.getCellSize().slice(),i=this._model.getBoxLayoutParams(),a="horizontal"===this._orient?[n,7]:[7,n];each$f([0,1],function(e){u(o,e)&&(i[r[e]]=o[e]*a[e])});var s={width:t.getWidth(),height:t.getHeight()},l=this._rect=getLayoutRect(i,s);function u(e,t){return null!=e[t]&&"auto"!==e[t]}each$f([0,1],function(e){u(o,e)||(o[e]=l[r[e]]/a[e])}),this._sw=o[0],this._sh=o[1]},e.prototype.dataToPoint=function(e,t){isArray$1(e)&&(e=e[0]),null==t&&(t=!0);var n=this.getDateInfo(e),r=this._rangeInfo,o=n.formatedDate;if(t&&!(n.time>=r.start.time&&n.time<r.end.time+PROXIMATE_ONE_DAY))return[NaN,NaN];var i=n.day,a=this._getRangeInfo([r.start.time,o]).nthWeek;return"vertical"===this._orient?[this._rect.x+i*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]:[this._rect.x+a*this._sw+this._sw/2,this._rect.y+i*this._sh+this._sh/2]},e.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},e.prototype.dataToRect=function(e,t){var n=this.dataToPoint(e,t);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},e.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,r=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,t-1,r):this._getDateByWeeksAndDay(t,n-1,r)},e.prototype.convertToPixel=function(e,t,n){var r=getCoordSys(t);return r===this?r.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){var r=getCoordSys(t);return r===this?r.pointToData(n):null},e.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},e.prototype._initRangeOption=function(){var e,t=this._model.get("range");if(isArray$1(t)&&1===t.length&&(t=t[0]),isArray$1(t))e=t;else{var n=t.toString();if(/^\d{4}$/.test(n)&&(e=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var r=this.getDateInfo(n),o=r.date;o.setMonth(o.getMonth()+1);var i=this.getNextNDay(o,-1);e=[r.formatedDate,i.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(e=[n,n])}if(!e)return t;var a=this._getRangeInfo(e);return a.start.time>a.end.time&&e.reverse(),e},e.prototype._getRangeInfo=function(e){var t,n=[this.getDateInfo(e[0]),this.getDateInfo(e[1])];n[0].time>n[1].time&&(t=!0,n.reverse());var r=Math.floor(n[1].time/PROXIMATE_ONE_DAY)-Math.floor(n[0].time/PROXIMATE_ONE_DAY)+1,o=new Date(n[0].time),i=o.getDate(),a=n[1].date.getDate();o.setDate(i+r-1);var s=o.getDate();if(s!==a)for(var l=o.getTime()-n[1].time>0?1:-1;(s=o.getDate())!==a&&(o.getTime()-n[1].time)*l>0;)r-=l,o.setDate(s-l);var u=Math.floor((r+n[0].day+6)/7),c=t?1-u:u-1;return t&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:r,weeks:u,nthWeek:c,fweek:n[0].day,lweek:n[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,n){var r=this._getRangeInfo(n);if(e>r.weeks||0===e&&t<r.fweek||e===r.weeks&&t>r.lweek)return null;var o=7*(e-1)-r.fweek+t,i=new Date(r.start.time);return i.setDate(+r.start.d+o),this.getDateInfo(i)},e.create=function(t,n){var r=[];return t.eachComponent("calendar",function(t){var n=new e(t);r.push(n),t.coordinateSystem=n}),t.eachSeries(function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=r[e.get("calendarIndex")||0])}),r},e.dimensions=["time","value"],e}();function getCoordSys(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}function install$o(e){e.registerComponentModel(CalendarModel),e.registerComponentView(CalendarView),e.registerCoordinateSystem("calendar",Calendar)}function setKeyInfoToNewElOption(e,t){var n=e.existing;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),null==t.parentId){var r=t.parentOption;r?t.parentId=r.id:n&&(t.parentId=n.parentId)}t.parentOption=null}function isSetLoc(e,t){var n;return each$f(t,function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)}),n}function mergeNewElOptionToExist(e,t,n){var r=extend$2({},n),o=e[t],i=n.$action||"merge";"merge"===i?o?(merge(o,r,!0),mergeLayoutParam(o,r,{ignoreSize:!0}),copyLayoutParams(n,o),copyTransitionInfo(n,o),copyTransitionInfo(n,o,"shape"),copyTransitionInfo(n,o,"style"),copyTransitionInfo(n,o,"extra"),n.clipPath=o.clipPath):e[t]=r:"replace"===i?e[t]=r:"remove"===i&&o&&(e[t]=null)}var TRANSITION_PROPS_TO_COPY=["transition","enterFrom","leaveTo"],ROOT_TRANSITION_PROPS_TO_COPY=TRANSITION_PROPS_TO_COPY.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function copyTransitionInfo(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),e&&t)for(var r=n?TRANSITION_PROPS_TO_COPY:ROOT_TRANSITION_PROPS_TO_COPY,o=0;o<r.length;o++){var i=r[o];null==e[i]&&null!=t[i]&&(e[i]=t[i])}}function setLayoutInfoToExist(e,t){if(e&&(e.hv=t.hv=[isSetLoc(t,["left","right"]),isSetLoc(t,["top","bottom"])],"group"===e.type)){var n=e,r=t;null==n.width&&(n.width=r.width=0),null==n.height&&(n.height=r.height=0)}}var GraphicComponentModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.preventAutoZ=!0,n}return __extends(t,e),t.prototype.mergeOption=function(t,n){var r=this.option.elements;this.option.elements=null,e.prototype.mergeOption.call(this,t,n),this.option.elements=r},t.prototype.optionUpdated=function(e,t){var n=this.option,r=(t?n:e).elements,o=n.elements=t?[]:n.elements,i=[];this._flatten(r,i,null);var a=mappingToExists(o,i,"normalMerge"),s=this._elOptionsToUpdate=[];each$f(a,function(e,t){var n=e.newOption;n&&(s.push(n),setKeyInfoToNewElOption(e,n),mergeNewElOptionToExist(o,t,n),setLayoutInfoToExist(o[t],n))},this),n.elements=filter(o,function(e){return e&&delete e.$action,null!=e})},t.prototype._flatten=function(e,t,n){each$f(e,function(e){if(e){n&&(e.parentOption=n),t.push(e);var r=e.children;r&&r.length&&this._flatten(r,t,e),delete e.children}},this)},t.prototype.useElOptionsToUpdate=function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e},t.type="graphic",t.defaultOption={elements:[]},t}(ComponentModel),nonShapeGraphicElements={path:null,compoundPath:null,group:Group$3,image:ZRImage,text:ZRText},inner$7=makeInner(),GraphicComponentView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.init=function(){this._elMap=createHashMap()},t.prototype.render=function(e,t,n){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,n)},t.prototype._updateElements=function(e){var t=e.useElOptionsToUpdate();if(t){var n=this._elMap,r=this.group,o=e.get("z"),i=e.get("zlevel");each$f(t,function(t){var a=convertOptionIdName(t.id,null),s=null!=a?n.get(a):null,l=convertOptionIdName(t.parentId,null),u=null!=l?n.get(l):r,c=t.type,d=t.style;"text"===c&&d&&t.hv&&t.hv[1]&&(d.textVerticalAlign=d.textBaseline=d.verticalAlign=d.align=null);var p=t.textContent,h=t.textConfig;if(d&&isEC4CompatibleStyle(d,c,!!h,!!p)){var f=convertFromEC4CompatibleStyle(d,c,!0);!h&&f.textConfig&&(h=t.textConfig=f.textConfig),!p&&f.textContent&&(p=f.textContent)}var g=getCleanedElOption(t),m=t.$action||"merge",y="merge"===m,v="replace"===m;if(y){var _=s;(C=!s)?_=createEl(a,u,t.type,n):(_&&(inner$7(_).isNew=!1),stopPreviousKeyframeAnimationAndRestore(_)),_&&(applyUpdateTransition(_,g,e,{isInit:C}),updateCommonAttrs(_,t,o,i))}else if(v){removeEl$1(s,t,n,e);var x=createEl(a,u,t.type,n);x&&(applyUpdateTransition(x,g,e,{isInit:!0}),updateCommonAttrs(x,t,o,i))}else"remove"===m&&(updateLeaveTo(s,t),removeEl$1(s,t,n,e));var S=n.get(a);if(S&&p)if(y){var b=S.getTextContent();b?b.attr(p):S.setTextContent(new ZRText(p))}else v&&S.setTextContent(new ZRText(p));if(S){var T=t.clipPath;if(T){var A=T.type,w=void 0,C=!1;if(y){var E=S.getClipPath();w=(C=!E||inner$7(E).type!==A)?newEl(A):E}else v&&(C=!0,w=newEl(A));S.setClipPath(w),applyUpdateTransition(w,T,e,{isInit:C}),applyKeyframeAnimation(w,T.keyframeAnimation,e)}var M=inner$7(S);S.setTextConfig(h),M.option=t,setEventData(S,e,t),setTooltipConfig({el:S,componentModel:e,itemName:S.name,itemTooltipOption:t.tooltip}),applyKeyframeAnimation(S,t.keyframeAnimation,e)}})}},t.prototype._relocate=function(e,t){for(var n=e.option.elements,r=this.group,o=this._elMap,i=t.getWidth(),a=t.getHeight(),s=["x","y"],l=0;l<n.length;l++){if((f=null!=(h=convertOptionIdName((p=n[l]).id,null))?o.get(h):null)&&f.isGroup){var u=(g=f.parent)===r,c=inner$7(f),d=inner$7(g);c.width=parsePercent(c.option.width,u?i:d.width)||0,c.height=parsePercent(c.option.height,u?a:d.height)||0}}for(l=n.length-1;l>=0;l--){var p,h,f;if(f=null!=(h=convertOptionIdName((p=n[l]).id,null))?o.get(h):null){var g=f.parent,m=(d=inner$7(g),{}),y=positionElement(f,p,g===r?{width:i,height:a}:{width:d.width,height:d.height},null,{hv:p.hv,boundingMode:p.bounding},m);if(!inner$7(f).isNew&&y){for(var v=p.transition,_={},x=0;x<s.length;x++){var S=s[x],b=m[S];v&&(isTransitionAll(v)||indexOf(v,S)>=0)?_[S]=b:f[S]=b}updateProps$1(f,_,e,0)}else f.attr(m)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each(function(n){removeEl$1(n,inner$7(n).option,t,e._lastGraphicModel)}),this._elMap=createHashMap()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(ComponentView);function newEl(e){var t=new(hasOwn(nonShapeGraphicElements,e)?nonShapeGraphicElements[e]:getShapeClass(e))({});return inner$7(t).type=e,t}function createEl(e,t,n,r){var o=newEl(n);return t.add(o),r.set(e,o),inner$7(o).id=e,inner$7(o).isNew=!0,o}function removeEl$1(e,t,n,r){e&&e.parent&&("group"===e.type&&e.traverse(function(e){removeEl$1(e,t,n,r)}),applyLeaveTransition(e,t,r),n.removeKey(inner$7(e).id))}function updateCommonAttrs(e,t,n,r){e.isGroup||each$f([["cursor",Displayable.prototype.cursor],["zlevel",r||0],["z",n||0],["z2",0]],function(n){var r=n[0];hasOwn(t,r)?e[r]=retrieve2(t[r],n[1]):null==e[r]&&(e[r]=n[1])}),each$f(keys(t),function(n){if(0===n.indexOf("on")){var r=t[n];e[n]=isFunction(r)?r:null}}),hasOwn(t,"draggable")&&(e.draggable=t.draggable),null!=t.name&&(e.name=t.name),null!=t.id&&(e.id=t.id)}function getCleanedElOption(e){return e=extend$2({},e),each$f(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(LOCATION_PARAMS),function(t){delete e[t]}),e}function setEventData(e,t,n){var r=getECData(e).eventData;e.silent||e.ignore||r||(r=getECData(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name}),r&&(r.info=n.info)}function install$n(e){e.registerComponentModel(GraphicComponentModel),e.registerComponentView(GraphicComponentView),e.registerPreprocessor(function(e){var t=e.graphic;isArray$1(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var DATA_ZOOM_AXIS_DIMENSIONS=["x","y","radius","angle","single"],SERIES_COORDS=["cartesian2d","polar","singleAxis"];function isCoordSupported(e){var t=e.get("coordinateSystem");return indexOf(SERIES_COORDS,t)>=0}function getAxisMainType(e){return e+"Axis"}function findEffectedDataZooms(e,t){var n,r=createHashMap(),o=[],i=createHashMap();e.eachComponent({mainType:"dataZoom",query:t},function(e){i.get(e.uid)||s(e)});do{n=!1,e.eachComponent("dataZoom",a)}while(n);function a(e){!i.get(e.uid)&&function(e){var t=!1;return e.eachTargetAxis(function(e,n){var o=r.get(e);o&&o[n]&&(t=!0)}),t}(e)&&(s(e),n=!0)}function s(e){i.set(e.uid,!0),o.push(e),e.eachTargetAxis(function(e,t){(r.get(e)||r.set(e,[]))[t]=!0})}return o}function collectReferCoordSysModelInfo(e){var t=e.ecModel,n={infoList:[],infoMap:createHashMap()};return e.eachTargetAxis(function(e,r){var o=t.getComponent(getAxisMainType(e),r);if(o){var i=o.getCoordSysModel();if(i){var a=i.uid,s=n.infoMap.get(a);s||(s={model:i,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(o)}}}),n}var DataZoomAxisInfo=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),DataZoomModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return __extends(t,e),t.prototype.init=function(e,t,n){var r=retrieveRawOption(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=retrieveRawOption(e);merge(this.option,e,!0),merge(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;each$f([["start","startValue"],["end","endValue"]],function(e,r){"value"===this._rangePropMode[r]&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=createHashMap();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return each$f(DATA_ZOOM_AXIS_DIMENSIONS,function(n){var r=this.getReferringComponents(getAxisMainType(n),MULTIPLE_REFERRING);if(r.specified){t=!0;var o=new DataZoomAxisInfo;each$f(r.models,function(e){o.add(e.componentIndex)}),e.set(n,o)}},this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var o="vertical"===t?"y":"x";i(n.findComponents({mainType:o+"Axis"}),o)}r&&i(n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}}),"single");function i(t,n){var o=t[0];if(o){var i=new DataZoomAxisInfo;if(i.add(o.componentIndex),e.set(n,i),r=!1,"x"===n||"y"===n){var a=o.getReferringComponents("grid",SINGLE_REFERRING).models[0];a&&each$f(t,function(e){o.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",SINGLE_REFERRING).models[0]&&i.add(e.componentIndex)})}}}r&&each$f(DATA_ZOOM_AXIS_DIMENSIONS,function(t){if(r){var o=n.findComponents({mainType:getAxisMainType(t),filter:function(e){return"category"===e.get("type",!0)}});if(o[0]){var i=new DataZoomAxisInfo;i.add(o[0].componentIndex),e.set(t,i),r=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){!e&&(e=t)},this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");each$f([["start","startValue"],["end","endValue"]],function(r,o){var i=null!=e[r[0]],a=null!=e[r[1]];i&&!a?t[o]="percent":!i&&a?t[o]="value":n?t[o]=n[o]:i&&(t[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){null==e&&(e=this.ecModel.getComponent(getAxisMainType(t),n))},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){each$f(n.indexList,function(n){e.call(t,r,n)})})},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(getAxisMainType(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;each$f([["start","startValue"],["end","endValue"]],function(r){null==e[r[0]]&&null==e[r[1]]||(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;each$f(["start","startValue","end","endValue"],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),r=0;r<n.length;r++)for(var o=n[r],i=this._targetAxisInfoMap.get(o),a=0;a<i.indexList.length;a++){var s=this.getAxisProxy(o,i.indexList[a]);if(s.hostedBy(this))return s;t||(t=s)}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(ComponentModel);function retrieveRawOption(e){var t={};return each$f(["start","end","startValue","endValue","throttle"],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var SelectDataZoomModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.type="dataZoom.select",t}(DataZoomModel),DataZoomView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(ComponentView),SelectDataZoomView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.type="dataZoom.select",t}(DataZoomView),each$7=each$f,asc$1=asc$2,AxisProxy=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(isCoordSupported(t)){var n=getAxisMainType(this._dimName),r=t.getReferringComponents(n,SINGLE_REFERRING).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}},this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return clone$6(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,r=this.getAxisModel().axis.scale,o=this._dataZoomModel.getRangePropMode(),i=[0,100],a=[],s=[];each$7(["start","end"],function(l,u){var c=e[l],d=e[l+"Value"];"percent"===o[u]?(null==c&&(c=i[u]),d=r.parse(linearMap$2(c,i,n))):(t=!0,c=linearMap$2(d=null==d?n[u]:r.parse(d),n,i)),s[u]=null==d||isNaN(d)?n[u]:d,a[u]=null==c||isNaN(c)?i[u]:c}),asc$1(s),asc$1(a);var l=this._minMaxSpan;function u(e,t,n,o,i){var a=i?"Span":"ValueSpan";sliderMove(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=linearMap$2(e[s],n,o,!0),i&&(t[s]=r.parse(t[s]))}return t?u(s,a,n,i,!1):u(a,s,i,n,!0),{valueWindow:s,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=calculateDataExtent(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),o=e.get("filterMode"),i=this._valueWindow;"none"!==o&&each$7(r,function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if("weakFilter"===o){var a=t.getStore(),s=map$1(r,function(e){return t.getDimensionIndex(e)},t);t.filterSelf(function(e){for(var t,n,o,l=0;l<r.length;l++){var u=a.get(s[l],e),c=!isNaN(u),d=u<i[0],p=u>i[1];if(c&&!d&&!p)return!0;c&&(o=!0),d&&(t=!0),p&&(n=!0)}return o&&t&&n})}else each$7(r,function(n){if("empty"===o)e.setData(t=t.map(n,function(e){return function(e){return e>=i[0]&&e<=i[1]}(e)?e:NaN}));else{var r={};r[n]=i,t.selectRange(r)}});each$7(r,function(e){t.setApproximateExtent(i,e)})}})}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;each$7(["min","max"],function(r){var o=t.get(r+"Span"),i=t.get(r+"ValueSpan");null!=i&&(i=this.getAxisModel().axis.scale.parse(i)),null!=i?o=linearMap$2(n[0]+i,n,[0,100],!0):null!=o&&(i=linearMap$2(o,[0,100],n,!0)-n[0]),e[r+"Span"]=o,e[r+"ValueSpan"]=i},this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var r=getPixelPrecision(n,[0,500]);r=Math.min(r,20);var o=e.axis.scale.rawExtentInfo;0!==t[0]&&o.setDeterminedMinMax("min",+n[0].toFixed(r)),100!==t[1]&&o.setDeterminedMinMax("max",+n[1].toFixed(r)),o.freeze()}},e}();function calculateDataExtent(e,t,n){var r=[1/0,-1/0];each$7(n,function(e){unionAxisExtentFromData(r,e.getData(),t)});var o=e.getAxisModel(),i=ensureScaleRawExtentInfo(o.axis.scale,o,r).calculate();return[i.min,i.max]}var dataZoomProcessor={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(r,o){var i=e.getComponent(getAxisMainType(r),o);t(r,o,i,n)})})}t(function(e,t,n,r){n.__dzAxisProxy=null});var n=[];t(function(t,r,o,i){o.__dzAxisProxy||(o.__dzAxisProxy=new AxisProxy(t,r,i,e),n.push(o.__dzAxisProxy))});var r=createHashMap();return each$f(n,function(e){each$f(e.getTargetSeriesModels(),function(e){r.set(e.uid,e)})}),r},overallReset:function(e,t){e.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(t,n){e.getAxisProxy(t,n).reset(e)}),e.eachTargetAxis(function(n,r){e.getAxisProxy(n,r).filterData(e,t)})}),e.eachComponent("dataZoom",function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}})}};function installDataZoomAction(e){e.registerAction("dataZoom",function(e,t){each$f(findEffectedDataZooms(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var installed$1=!1;function installCommon$1(e){installed$1||(installed$1=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,dataZoomProcessor),installDataZoomAction(e),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function install$m(e){e.registerComponentModel(SelectDataZoomModel),e.registerComponentView(SelectDataZoomView),installCommon$1(e)}var ToolboxFeature=function(){},features={};function registerFeature(e,t){features[e]=t}function getFeature(e){return features[e]}var ToolboxModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;each$f(this.option.feature,function(e,n){var r=getFeature(n);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(t)),merge(e,r.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(ComponentModel);function layout(e,t,n){var r=t.getBoxLayoutParams(),o=t.get("padding"),i={width:n.getWidth(),height:n.getHeight()},a=getLayoutRect(r,i,o);box(t.get("orient"),e,t.get("itemGap"),a.width,a.height),positionElement(e,r,i,o)}function makeBackground(e,t){var n=normalizeCssArray(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),e=new Rect$2({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1})}var ToolboxView=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(e,t,n,r){var o=this.group;if(o.removeAll(),e.get("show")){var i=+e.get("itemSize"),a="vertical"===e.get("orient"),s=e.get("feature")||{},l=this._features||(this._features={}),u=[];each$f(s,function(e,t){u.push(t)}),new DataDiffer(this._featureNames||[],u).add(c).update(c).remove(curry$1(c,null)).execute(),this._featureNames=u,layout(o,e,n),o.add(makeBackground(o.getBoundingRect(),e)),a||o.eachChild(function(e){var t=e.__title,r=e.ensureState("emphasis"),a=r.textConfig||(r.textConfig={}),s=e.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!isFunction(l)&&t){var u=l.style||(l.style={}),c=getBoundingRect(t,ZRText.makeFont(u)),d=e.x+o.x,p=!1;e.y+o.y+i+c.height>n.getHeight()&&(a.position="top",p=!0);var h=p?-5-c.height:i+10;d+c.width/2>n.getWidth()?(a.position=["100%",h],u.align="right"):d-c.width/2<0&&(a.position=[0,h],u.align="left")}})}function c(c,d){var p,h=u[c],f=u[d],g=s[h],m=new Model(g,e,e.ecModel);if(r&&null!=r.newTitle&&r.featureName===h&&(g.title=r.newTitle),h&&!f){if(isUserFeatureName(h))p={onclick:m.option.onclick,featureName:h};else{var y=getFeature(h);if(!y)return;p=new y}l[h]=p}else if(!(p=l[f]))return;p.uid=getUID("toolbox-feature"),p.model=m,p.ecModel=t,p.api=n;var v=p instanceof ToolboxFeature;h||!f?!m.get("show")||v&&p.unusable?v&&p.remove&&p.remove(t,n):(!function(r,s,l){var u,c,d=r.getModel("iconStyle"),p=r.getModel(["emphasis","iconStyle"]),h=s instanceof ToolboxFeature&&s.getIcons?s.getIcons():r.get("icon"),f=r.get("title")||{};isString(h)?(u={})[l]=h:u=h;isString(f)?(c={})[l]=f:c=f;var g=r.iconPaths={};each$f(u,function(l,u){var h=createIcon(l,{},{x:-i/2,y:-i/2,width:i,height:i});h.setStyle(d.getItemStyle()),h.ensureState("emphasis").style=p.getItemStyle();var f=new ZRText({style:{text:c[u],align:p.get("textAlign"),borderRadius:p.get("textBorderRadius"),padding:p.get("textPadding"),fill:null,font:getFont({fontStyle:p.get("textFontStyle"),fontFamily:p.get("textFontFamily"),fontSize:p.get("textFontSize"),fontWeight:p.get("textFontWeight")},t)},ignore:!0});h.setTextContent(f),setTooltipConfig({el:h,componentModel:e,itemName:u,formatterParamsExtra:{title:c[u]}}),h.__title=c[u],h.on("mouseover",function(){var t=p.getItemStyle(),r=a?null==e.get("right")&&"right"!==e.get("left")?"right":"left":null==e.get("bottom")&&"bottom"!==e.get("top")?"bottom":"top";f.setStyle({fill:p.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:p.get("textBackgroundColor")}),h.setTextConfig({position:p.get("textPosition")||r}),f.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){"emphasis"!==r.get(["iconStatus",u])&&n.leaveEmphasis(this),f.hide()}),("emphasis"===r.get(["iconStatus",u])?enterEmphasis:leaveEmphasis)(h),o.add(h),h.on("click",bind$1(s.onclick,s,t,n,u)),g[u]=h})}(m,p,h),m.setIconStatus=function(e,t){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&("emphasis"===t?enterEmphasis:leaveEmphasis)(r[e])},p instanceof ToolboxFeature&&p.render&&p.render(m,t,n,r)):v&&p.dispose&&p.dispose(t,n)}},t.prototype.updateView=function(e,t,n,r){each$f(this._features,function(e){e instanceof ToolboxFeature&&e.updateView&&e.updateView(e.model,t,n,r)})},t.prototype.remove=function(e,t){each$f(this._features,function(n){n instanceof ToolboxFeature&&n.remove&&n.remove(e,t)}),this.group.removeAll()},t.prototype.dispose=function(e,t){each$f(this._features,function(n){n instanceof ToolboxFeature&&n.dispose&&n.dispose(e,t)})},t.type="toolbox",t}(ComponentView);function isUserFeatureName(e){return 0===e.indexOf("my")}var SaveAsImage=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.onclick=function(e,t){var n=this.model,r=n.get("name")||e.get("title.0.text")||"echarts",o="svg"===t.getZr().painter.getType(),i=o?"svg":n.get("type",!0)||"png",a=t.getConnectedDataURL({type:i,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=env.browser;if("function"!=typeof MouseEvent||!s.newEdge&&(s.ie||s.edge))if(window.navigator.msSaveOrOpenBlob||o){var l=a.split(","),u=l[0].indexOf("base64")>-1,c=o?decodeURIComponent(l[1]):l[1];u&&(c=window.atob(c));var d=r+"."+i;if(window.navigator.msSaveOrOpenBlob){for(var p=c.length,h=new Uint8Array(p);p--;)h[p]=c.charCodeAt(p);var f=new Blob([h]);window.navigator.msSaveOrOpenBlob(f,d)}else{var g=document.createElement("iframe");document.body.appendChild(g);var m=g.contentWindow,y=m.document;y.open("image/svg+xml","replace"),y.write(c),y.close(),m.focus(),y.execCommand("SaveAs",!0,d),document.body.removeChild(g)}}else{var v=n.get("lang"),_='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(v&&v[0]||"")+'" /></body>',x=window.open();x.document.write(_),x.document.title=r}else{var S=document.createElement("a");S.download=r+"."+i,S.target="_blank",S.href=a;var b=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});S.dispatchEvent(b)}},t.getDefaultOption=function(e){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},t}(ToolboxFeature),INNER_STACK_KEYWORD="__ec_magicType_stack__",radioTypes=[["line","bar"],["stack"]],MagicType=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return each$f(e.get("type"),function(e){t[e]&&(n[e]=t[e])}),n},t.getDefaultOption=function(e){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},t.prototype.onclick=function(e,t,n){var r=this.model,o=r.get(["seriesIndex",n]);if(seriesOptGenreator[n]){var i,a={series:[]};each$f(radioTypes,function(e){indexOf(e,n)>=0&&each$f(e,function(e){r.setIconStatus(e,"normal")})}),r.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},function(e){var t=e.subType,o=e.id,i=seriesOptGenreator[n](t,o,e,r);i&&(defaults$2(i,e.option),a.series.push(i));var s=e.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",c=e.getReferringComponents(u,SINGLE_REFERRING).models[0].componentIndex;a[u]=a[u]||[];for(var d=0;d<=c;d++)a[u][c]=a[u][c]||{};a[u][c].boundaryGap="bar"===n}}});var s=n;"stack"===n&&(i=merge({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),"emphasis"!==r.get(["iconStatus",n])&&(s="tiled")),t.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:i,featureName:"magicType"})}},t}(ToolboxFeature),seriesOptGenreator={line:function(e,t,n,r){if("bar"===e)return merge({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(e,t,n,r){if("line"===e)return merge({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(e,t,n,r){var o=n.get("stack")===INNER_STACK_KEYWORD;if("line"===e||"bar"===e)return r.setIconStatus("stack",o?"normal":"emphasis"),merge({id:t,stack:o?"":INNER_STACK_KEYWORD},r.get(["option","stack"])||{},!0)}};registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var BLOCK_SPLITER=new Array(60).join("-"),ITEM_SPLITER="\t";function groupSeries(e){var t={},n=[],r=[];return e.eachRawSeries(function(e){var o=e.coordinateSystem;if(!o||"cartesian2d"!==o.type&&"polar"!==o.type)n.push(e);else{var i=o.getBaseAxis();if("category"===i.type){var a=i.dim+"_"+i.index;t[a]||(t[a]={categoryAxis:i,valueAxis:o.getOtherAxis(i),series:[]},r.push({axisDim:i.dim,axisIndex:i.index})),t[a].series.push(e)}else n.push(e)}}),{seriesGroupByCategoryAxis:t,other:n,meta:r}}function assembleSeriesWithCategoryAxis(e){var t=[];return each$f(e,function(e,n){var r=e.categoryAxis,o=e.valueAxis.dim,i=[" "].concat(map$1(e.series,function(e){return e.name})),a=[r.model.getCategories()];each$f(e.series,function(e){var t=e.getRawData();a.push(e.getRawData().mapArray(t.mapDimension(o),function(e){return e}))});for(var s=[i.join(ITEM_SPLITER)],l=0;l<a[0].length;l++){for(var u=[],c=0;c<a.length;c++)u.push(a[c][l]);s.push(u.join(ITEM_SPLITER))}t.push(s.join("\n"))}),t.join("\n\n"+BLOCK_SPLITER+"\n\n")}function assembleOtherSeries(e){return map$1(e,function(e){var t=e.getRawData(),n=[e.name],r=[];return t.each(t.dimensions,function(){for(var e=arguments.length,o=arguments[e-1],i=t.getName(o),a=0;a<e-1;a++)r[a]=arguments[a];n.push((i?i+ITEM_SPLITER:"")+r.join(ITEM_SPLITER))}),n.join("\n")}).join("\n\n"+BLOCK_SPLITER+"\n\n")}function getContentFromModel(e){var t=groupSeries(e);return{value:filter([assembleSeriesWithCategoryAxis(t.seriesGroupByCategoryAxis),assembleOtherSeries(t.other)],function(e){return!!e.replace(/[\n\t\s]/g,"")}).join("\n\n"+BLOCK_SPLITER+"\n\n"),meta:t.meta}}function trim(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function isTSVFormat(e){if(e.slice(0,e.indexOf("\n")).indexOf(ITEM_SPLITER)>=0)return!0}var itemSplitRegex=new RegExp("["+ITEM_SPLITER+"]+","g");function parseTSVContents(e){for(var t=e.split(/\n+/g),n=[],r=map$1(trim(t.shift()).split(itemSplitRegex),function(e){return{name:e,data:[]}}),o=0;o<t.length;o++){var i=trim(t[o]).split(itemSplitRegex);n.push(i.shift());for(var a=0;a<i.length;a++)r[a]&&(r[a].data[o]=i[a])}return{series:r,categories:n}}function parseListContents(e){for(var t=e.split(/\n+/g),n=trim(t.shift()),r=[],o=0;o<t.length;o++){var i=trim(t[o]);if(i){var a=i.split(itemSplitRegex),s="",l=void 0,u=!1;isNaN(a[0])?(u=!0,s=a[0],a=a.slice(1),r[o]={name:s,value:[]},l=r[o].value):l=r[o]=[];for(var c=0;c<a.length;c++)l.push(+a[c]);1===l.length&&(u?r[o].value=l[0]:r[o]=l[0])}}return{name:n,data:r}}function parseContents(e,t){var n=e.split(new RegExp("\n*"+BLOCK_SPLITER+"\n*","g")),r={series:[]};return each$f(n,function(e,n){if(isTSVFormat(e)){var o=parseTSVContents(e),i=t[n],a=i.axisDim+"Axis";i&&(r[a]=r[a]||[],r[a][i.axisIndex]={data:o.categories},r.series=r.series.concat(o.series))}else{o=parseListContents(e);r.series.push(o)}}),r}var DataView=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.onclick=function(t,n){setTimeout(function(){n.dispatchAction({type:"hideTip"})});var r=n.getDom(),o=this.model;this._dom&&r.removeChild(this._dom);var i=document.createElement("div");i.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",i.style.backgroundColor=o.get("backgroundColor")||"#fff";var a=document.createElement("h4"),s=o.get("lang")||[];a.innerHTML=s[0]||o.get("title"),a.style.cssText="margin:10px 20px",a.style.color=o.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="overflow:auto";var c=o.get("optionToContent"),d=o.get("contentToOption"),p=getContentFromModel(t);if(isFunction(c)){var h=c(n.getOption());isString(h)?l.innerHTML=h:isDom(h)&&l.appendChild(h)}else{u.readOnly=o.get("readOnly");var f=u.style;f.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",f.color=o.get("textColor"),f.borderColor=o.get("textareaBorderColor"),f.backgroundColor=o.get("textareaColor"),u.value=p.value,l.appendChild(u)}var g=p.meta,m=document.createElement("div");m.style.cssText="position:absolute;bottom:5px;left:0;right:0";var y="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),_=document.createElement("div");y+=";background-color:"+o.get("buttonColor"),y+=";color:"+o.get("buttonTextColor");var x=this;function S(){r.removeChild(i),x._dom=null}addEventListener(v,"click",S),addEventListener(_,"click",function(){if(null==d&&null!=c||null!=d&&null==c)S();else{var t;try{t=isFunction(d)?d(l,n.getOption()):parseContents(u.value,g)}catch(e){throw S(),new Error("Data view format error "+e)}t&&n.dispatchAction({type:"changeDataView",newOption:t}),S()}}),v.innerHTML=s[1],_.innerHTML=s[2],_.style.cssText=v.style.cssText=y,!o.get("readOnly")&&m.appendChild(_),m.appendChild(v),i.appendChild(a),i.appendChild(l),i.appendChild(m),l.style.height=r.clientHeight-80+"px",r.appendChild(i),this._dom=i},n.prototype.remove=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},n.prototype.dispose=function(e,t){this.remove(e,t)},n.getDefaultOption=function(e){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:e.getLocaleModel().get(["toolbox","dataView","title"]),lang:e.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"}},n}(ToolboxFeature);function tryMergeDataOption(e,t){return map$1(e,function(e,n){var r=t&&t[n];if(isObject$3(r)&&!isArray$1(r)){isObject$3(e)&&!isArray$1(e)||(e={value:e});var o=null!=r.name&&null==e.name;return e=defaults$2(e,r),o&&delete e.name,e}return e})}registerAction({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(e,t){var n=[];each$f(e.newOption.series,function(e){var r=t.getSeriesByName(e.name)[0];if(r){var o=r.get("data");n.push({name:e.name,data:tryMergeDataOption(e.data,o)})}else n.push(extend$2({type:"scatter"},e))}),t.mergeOption(defaults$2({series:n},e.newOption))});var each$6=each$f,inner$6=makeInner();function push(e,t){var n=getStoreSnapshots(e);each$6(t,function(t,r){for(var o=n.length-1;o>=0;o--){if(n[o][r])break}if(o<0){var i=e.queryComponents({mainType:"dataZoom",subType:"select",id:r})[0];if(i){var a=i.getPercentRange();n[0][r]={dataZoomId:r,start:a[0],end:a[1]}}}}),n.push(t)}function pop(e){var t=getStoreSnapshots(e),n=t[t.length-1];t.length>1&&t.pop();var r={};return each$6(n,function(e,n){for(var o=t.length-1;o>=0;o--)if(e=t[o][n]){r[n]=e;break}}),r}function clear(e){inner$6(e).snapshots=null}function count(e){return getStoreSnapshots(e).length}function getStoreSnapshots(e){var t=inner$6(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var RestoreOption=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.onclick=function(e,t){clear(e),t.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){return{show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])}},t}(ToolboxFeature);registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var INCLUDE_FINDER_MAIN_TYPES=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],BrushTargetManager=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var o=parseFinder(t,e);each$f(targetInfoBuilders,function(e,t){(!n||!n.include||indexOf(n.include,t)>=0)&&e(o,r._targetInfoList)})}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var r=coordConvert[e.brushType](0,n,t);e.__rangeOffset={offset:diffProcessor[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}}),e},e.prototype.matchOutputRanges=function(e,t,n){each$f(e,function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&each$f(r.coordSyses,function(r){var o=coordConvert[e.brushType](1,r,e.range,!0);n(e,o.values,r,t)})},this)},e.prototype.setInputRanges=function(e,t){each$f(e,function(e){var n=this.findTargetInfo(e,t);if(e.range=e.range||[],n&&!0!==n){e.panelId=n.panelId;var r=coordConvert[e.brushType](0,n.coordSys,e.coordRange),o=e.__rangeOffset;e.range=o?diffProcessor[e.brushType](r.values,o.offset,getScales(r.xyMinMax,o.xyMinMax)):r.values}},this)},e.prototype.makePanelOpts=function(e,t){return map$1(this._targetInfoList,function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:makeRectPanelClipPath(r),isTargetByCursor:makeRectIsTargetByCursor(r,e,n.coordSysModel),getLinearBrushOtherExtent:makeLinearBrushOtherExtent(r)}})},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return!0===r||r&&indexOf(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=parseFinder(t,e),o=0;o<n.length;o++){var i=n[o],a=e.panelId;if(a){if(i.panelId===a)return i}else for(var s=0;s<targetInfoMatchers.length;s++)if(targetInfoMatchers[s](r,i))return i}return!0},e}();function formatMinMax(e){return e[0]>e[1]&&e.reverse(),e}function parseFinder(e,t){return parseFinder$1(e,t,{includeMainTypes:INCLUDE_FINDER_MAIN_TYPES})}var targetInfoBuilders={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,o=e.gridModels,i=createHashMap(),a={},s={};(n||r||o)&&(each$f(n,function(e){var t=e.axis.grid.model;i.set(t.id,t),a[t.id]=!0}),each$f(r,function(e){var t=e.axis.grid.model;i.set(t.id,t),s[t.id]=!0}),each$f(o,function(e){i.set(e.id,e),a[e.id]=!0,s[e.id]=!0}),i.each(function(e){var o=e.coordinateSystem,i=[];each$f(o.getCartesians(),function(e,t){(indexOf(n,e.getAxis("x").model)>=0||indexOf(r,e.getAxis("y").model)>=0)&&i.push(e)}),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:i[0],coordSyses:i,getPanelRect:panelRectBuilders.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})}))},geo:function(e,t){each$f(e.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:panelRectBuilders.geo})})}},targetInfoMatchers=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,o=e.gridModel;return!o&&n&&(o=n.axis.grid.model),!o&&r&&(o=r.axis.grid.model),o&&o===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],panelRectBuilders={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(getTransform$1(e)),t}},coordConvert={lineX:curry$1(axisConvert,0),lineY:curry$1(axisConvert,1),rect:function(e,t,n,r){var o=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),i=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),a=[formatMinMax([o[0],i[0]]),formatMinMax([o[1],i[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,n,r){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:map$1(n,function(n){var i=e?t.pointToData(n,r):t.dataToPoint(n,r);return o[0][0]=Math.min(o[0][0],i[0]),o[1][0]=Math.min(o[1][0],i[1]),o[0][1]=Math.max(o[0][1],i[0]),o[1][1]=Math.max(o[1][1],i[1]),i}),xyMinMax:o}}};function axisConvert(e,t,n,r){var o=n.getAxis(["x","y"][e]),i=formatMinMax(map$1([0,1],function(e){return t?o.coordToData(o.toLocalCoord(r[e]),!0):o.toGlobalCoord(o.dataToCoord(r[e]))})),a=[];return a[e]=i,a[1-e]=[NaN,NaN],{values:i,xyMinMax:a}}var diffProcessor={lineX:curry$1(axisDiffProcessor,0),lineY:curry$1(axisDiffProcessor,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return map$1(e,function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]})}};function axisDiffProcessor(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function getScales(e,t){var n=getSize(e),r=getSize(t),o=[n[0]/r[0],n[1]/r[1]];return isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o}function getSize(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var each$5=each$f,DATA_ZOOM_ID_BASE=makeInternalComponentId("toolbox-dataZoom_"),DataZoomFeature=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(e,t,n,r){this._brushController||(this._brushController=new BrushController(n.getZr()),this._brushController.on("brush",bind$1(this._onBrush,this)).mount()),updateZoomBtnStatus(e,t,this,r,n),updateBackBtnStatus(e,t)},t.prototype.onclick=function(e,t,n){handlers[n].call(this)},t.prototype.remove=function(e,t){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(e.isEnd&&t.length){var n={},r=this.ecModel;this._brushController.updateCovers([]),new BrushTargetManager(makeAxisFinder(this.model),r,{include:["grid"]}).matchOutputRanges(t,r,function(e,t,n){if("cartesian2d"===n.type){var r=e.brushType;"rect"===r?(o("x",n,t[0]),o("y",n,t[1])):o({lineX:"x",lineY:"y"}[r],n,t)}}),push(r,n),this._dispatchZoomAction(n)}function o(e,t,o){var i=t.getAxis(e),a=i.model,s=function(e,t,n){var r;return n.eachComponent({mainType:"dataZoom",subType:"select"},function(n){n.getAxisModel(e,t.componentIndex)&&(r=n)}),r}(e,a,r),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(o=sliderMove(0,o.slice(),i.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:o[0],endValue:o[1]})}},t.prototype._dispatchZoomAction=function(e){var t=[];each$5(e,function(e,n){t.push(clone$6(e))}),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},t.getDefaultOption=function(e){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},t}(ToolboxFeature),handlers={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(pop(this.ecModel))}};function makeAxisFinder(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}function updateBackBtnStatus(e,t){e.setIconStatus("back",count(t)>1?"emphasis":"normal")}function updateZoomBtnStatus(e,t,n,r,o){var i=n._isZoomActive;r&&"takeGlobalCursor"===r.type&&(i="dataZoomSelect"===r.key&&r.dataZoomSelectActive),n._isZoomActive=i,e.setIconStatus("zoom",i?"emphasis":"normal");var a=new BrushTargetManager(makeAxisFinder(e),t,{include:["grid"]}).makePanelOpts(o,function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"});n._brushController.setPanels(a).enableBrush(!(!i||!a.length)&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}function install$l(e){e.registerComponentModel(ToolboxModel),e.registerComponentView(ToolboxView),registerFeature("saveAsImage",SaveAsImage),registerFeature("magicType",MagicType),registerFeature("dataView",DataView),registerFeature("dataZoom",DataZoomFeature),registerFeature("restore",RestoreOption),use(install$m)}registerInternalOptionCreator("dataZoom",function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(t&&null!=t.get(n)){var r=t.getModel(n),o=[],i=parseFinder$1(e,makeAxisFinder(r));return each$5(i.xAxisModels,function(e){return a(e,"xAxis","xAxisIndex")}),each$5(i.yAxisModels,function(e){return a(e,"yAxis","yAxisIndex")}),o}function a(e,t,n){var i=e.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:DATA_ZOOM_ID_BASE+t+i};a[n]=i,o.push(a)}});var TooltipModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.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}},t}(ComponentModel);function shouldTooltipConfine(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function testStyle(e){if(env.domSupported)for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}var TRANSFORM_VENDOR=testStyle(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),TRANSITION_VENDOR=testStyle(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function toCSSVendorPrefix(e,t){if(!e)return t;t=toCamelCase(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}function getComputedStyle$1(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?n[t]:null}var CSS_TRANSITION_VENDOR=toCSSVendorPrefix(TRANSITION_VENDOR,"transition"),CSS_TRANSFORM_VENDOR=toCSSVendorPrefix(TRANSFORM_VENDOR,"transform"),gCssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(env.transform3dSupported?"will-change:transform;":"");function mirrorPos(e){return e="left"===e?"right":"right"===e?"left":"top"===e?"bottom":"top"}function assembleArrow(e,t,n){if(!isString(n)||"inside"===n)return"";var r=e.get("backgroundColor"),o=e.get("borderWidth");t=convertToColorString(t);var i,a=mirrorPos(n),s=Math.max(1.5*Math.round(o),6),l="",u=CSS_TRANSFORM_VENDOR+":";indexOf(["left","right"],a)>-1?(l+="top:50%",u+="translateY(-50%) rotate("+(i="left"===a?-225:-45)+"deg)"):(l+="left:50%",u+="translateX(-50%) rotate("+(i="top"===a?225:45)+"deg)");var c=i*Math.PI/180,d=s+o,p=d*Math.abs(Math.cos(c))+d*Math.abs(Math.sin(c)),h=t+" solid "+o+"px;";return'<div style="'+["position:absolute;width:"+s+"px;height:"+s+"px;z-index:-1;",(l+=";"+a+":-"+Math.round(100*((p-Math.SQRT2*o)/2+Math.SQRT2*o-(p-d)/2))/100+"px")+";"+u+";","border-bottom:"+h,"border-right:"+h,"background-color:"+r+";"].join("")+'"></div>'}function assembleTransition(e,t){var n="cubic-bezier(0.23,1,0.32,1)",r=" "+e/2+"s "+n,o="opacity"+r+",visibility"+r;return t||(r=" "+e+"s "+n,o+=env.transformSupported?","+CSS_TRANSFORM_VENDOR+r:",left"+r+",top"+r),CSS_TRANSITION_VENDOR+":"+o}function assembleTransform(e,t,n){var r=e.toFixed(0)+"px",o=t.toFixed(0)+"px";if(!env.transformSupported)return n?"top:"+o+";left:"+r+";":[["top",o],["left",r]];var i=env.transform3dSupported,a="translate"+(i?"3d":"")+"("+r+","+o+(i?",0":"")+")";return n?"top:0;left:0;"+CSS_TRANSFORM_VENDOR+":"+a+";":[["top",0],["left",0],[TRANSFORM_VENDOR,a]]}function assembleFont(e){var t=[],n=e.get("fontSize"),r=e.getTextColor();r&&t.push("color:"+r),t.push("font:"+e.getFont());var o=retrieve2(e.get("lineHeight"),Math.round(3*n/2));n&&t.push("line-height:"+o+"px");var i=e.get("textShadowColor"),a=e.get("textShadowBlur")||0,s=e.get("textShadowOffsetX")||0,l=e.get("textShadowOffsetY")||0;return i&&a&&t.push("text-shadow:"+s+"px "+l+"px "+a+"px "+i),each$f(["decoration","align"],function(n){var r=e.get(n);r&&t.push("text-"+n+":"+r)}),t.join(";")}function assembleCssText(e,t,n){var r=[],o=e.get("transitionDuration"),i=e.get("backgroundColor"),a=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),c=e.getModel("textStyle"),d=getPaddingFromTooltipModel(e,"html"),p=l+"px "+u+"px "+a+"px "+s;return r.push("box-shadow:"+p),t&&o&&r.push(assembleTransition(o,n)),i&&r.push("background-color:"+i),each$f(["width","color","radius"],function(t){var n="border-"+t,o=toCamelCase(n),i=e.get(o);null!=i&&r.push(n+":"+i+("color"===t?"":"px"))}),r.push(assembleFont(c)),null!=d&&r.push("padding:"+normalizeCssArray(d).join("px ")+"px"),r.join(";")+";"}function makeStyleCoord$1(e,t,n,r,o){var i=t&&t.painter;if(n){var a=i&&i.getViewportRoot();a&&transformLocalCoord(e,a,n,r,o)}else{e[0]=r,e[1]=o;var s=i&&i.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var TooltipHTMLContent=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,env.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),o=t.appendTo,i=o&&(isString(o)?document.querySelector(o):isDom(o)?o:isFunction(o)&&o(e.getDom()));makeStyleCoord$1(this._styleCoord,r,i,e.getWidth()/2,e.getHeight()/2),(i||e.getDom()).appendChild(n),this._api=e,this._container=i;var a=this;n.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!a._enterable){var t=r.handler;normalizeEvent(r.painter.getViewportRoot(),e,!0),t.dispatch("mousemove",e)}},n.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=getComputedStyle$1(t,"position"),r=t.style;"absolute"!==r.position&&"absolute"!==n&&(r.position="relative")}var o=e.get("alwaysShowContent");o&&this._moveIfResized(),this._alwaysShowContent=o,this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,o=this._styleCoord;n.innerHTML?r.cssText=gCssText+assembleCssText(e,!this._firstShow,this._longHide)+assembleTransform(o[0],o[1],!0)+"border-color:"+convertToColorString(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,o){var i=this.el;if(null!=e){var a="";if(isString(o)&&"item"===n.get("trigger")&&!shouldTooltipConfine(n)&&(a=assembleArrow(n,r,o)),isString(e))i.innerHTML=e+a;else if(e){i.innerHTML="",isArray$1(e)||(e=[e]);for(var s=0;s<e.length;s++)isDom(e[s])&&e[s].parentNode!==i&&i.appendChild(e[s]);if(a&&i.childNodes.length){var l=document.createElement("div");l.innerHTML=a,i.appendChild(l)}}}else i.innerHTML=""},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},e.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(makeStyleCoord$1(n,this._zr,this._container,e,t),null!=n[0]&&null!=n[1]){var r=this.el.style;each$f(assembleTransform(n[0],n[1]),function(e){r[e[0]]=e[1]})}}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",env.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(bind$1(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},e}(),TooltipRichContent=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),makeStyleCoord(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,o){var i=this;isObject$3(e)&&throwError(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new ZRText({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:getPaddingFromTooltipModel(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),each$f(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(e){i.el.style[e]=n.get(e)}),each$f(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(e){i.el.style[e]=a.get(e)||0}),this._zr.add(this.el);var s=this;this.el.on("mouseover",function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0}),this.el.on("mouseout",function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1})},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=calcShadowOuterSize(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;makeStyleCoord(r,this._zr,e,t),e=r[0],t=r[1];var o=n.style,i=mathMaxWith0(o.borderWidth||0),a=calcShadowOuterSize(o);n.x=e+i+a.left,n.y=t+i+a.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(bind$1(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function mathMaxWith0(e){return Math.max(0,e)}function calcShadowOuterSize(e){var t=mathMaxWith0(e.shadowBlur||0),n=mathMaxWith0(e.shadowOffsetX||0),r=mathMaxWith0(e.shadowOffsetY||0);return{left:mathMaxWith0(t-n),right:mathMaxWith0(t+n),top:mathMaxWith0(t-r),bottom:mathMaxWith0(t+r)}}function makeStyleCoord(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var proxyRect=new Rect$2({shape:{x:-1,y:-1,width:2,height:2}}),TooltipView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.init=function(e,t){if(!env.node&&t.getDom()){var n=e.getComponent("tooltip"),r=this._renderMode=getTooltipRenderMode(n.get("renderMode"));this._tooltipContent="richText"===r?new TooltipRichContent(t):new TooltipHTMLContent(t,{appendTo:n.get("appendToBody",!0)?"body":n.get("appendTo",!0)})}},t.prototype.render=function(e,t,n){if(!env.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?createOrUpdate(this,"_updatePosition",50,"fixRate"):clear$1(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");register("itemTooltip",this._api,bind$1(function(t,n,r){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,r):"leave"===t&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(e,t,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!env.node&&n.getDom()){var o=makeDispatchAction(r,n);this._ticket="";var i=r.dataByCoordSys,a=findComponentReference(r,t,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:r.position,positionDefault:"bottom"},o)}else if(r.tooltip&&null!=r.x&&null!=r.y){var l=proxyRect;l.x=r.x,l.y=r.y,l.update(),getECData(l).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:l},o)}else if(i)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:i,tooltipOption:r.tooltipOption},o);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,r))return;var u=findPointFromSeries(r,t),c=u.point[0],d=u.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:u.el,position:r.position,positionDefault:"bottom"},o)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},o))}},t.prototype.manuallyHideTip=function(e,t,n,r){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(makeDispatchAction(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var o=r.seriesIndex,i=r.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=i&&null!=a){var s=t.getSeriesByIndex(o);if(s)if("axis"===buildTooltipModel([s.getData().getItemModel(i),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:i,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){var o,i;if("legend"===getECData(n).ssrType)return;this._lastDataByCoordSys=null,findEventDispatcher(n,function(e){return null!=getECData(e).dataIndex?(o=e,!0):null!=getECData(e).tooltipConfig?(i=e,!0):void 0},!0),o?this._showSeriesItemTooltip(e,o,t):i?this._showComponentItemTooltip(e,i,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=bind$1(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,o=[t.offsetX,t.offsetY],i=buildTooltipModel([t.tooltipOption],r),a=this._renderMode,s=[],l=createTooltipMarkup("section",{blocks:[],noHeader:!0}),u=[],c=new TooltipMarkupStyleCreator;each$f(e,function(e){each$f(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),o=e.value;if(t&&null!=o){var i=getValueLabel(o,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=createTooltipMarkup("section",{header:i,noHeader:!trim$1(i),sortBlocks:!0,blocks:[]});l.blocks.push(d),each$f(e.seriesDataIndices,function(l){var p=n.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,f=p.getDataParams(h);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=getAxisRawValue(t.axis,{value:o}),f.axisValueLabel=i,f.marker=c.makeTooltipMarker("item",convertToColorString(f.color),a);var g=normalizeTooltipFormatResult(p.formatTooltip(h,!0,null)),m=g.frag;if(m){var y=buildTooltipModel([p],r).get("valueFormatter");d.blocks.push(y?extend$2({valueFormatter:y},m):m)}g.text&&u.push(g.text),s.push(f)}})}})}),l.blocks.reverse(),u.reverse();var d=t.position,p=i.get("order"),h=buildTooltipMarkup(l,c,a,p,n.get("useUTC"),i.get("textStyle"));h&&u.unshift(h);var f="richText"===a?"\n\n":"<br/>",g=u.join(f);this._showOrMove(i,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(i,d,o[0],o[1],this._tooltipContent,s):this._showTooltipContent(i,g,s,Math.random()+"",o[0],o[1],d,null,c)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,o=getECData(t),i=o.seriesIndex,a=r.getSeriesByIndex(i),s=o.dataModel||a,l=o.dataIndex,u=o.dataType,c=s.getData(u),d=this._renderMode,p=e.positionDefault,h=buildTooltipModel([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),f=h.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),m=new TooltipMarkupStyleCreator;g.marker=m.makeTooltipMarker("item",convertToColorString(g.color),d);var y=normalizeTooltipFormatResult(s.formatTooltip(l,!1,u)),v=h.get("order"),_=h.get("valueFormatter"),x=y.frag,S=x?buildTooltipMarkup(_?extend$2({valueFormatter:_},x):x,m,d,v,r.get("useUTC"),h.get("textStyle")):y.text,b="item_"+s.name+"_"+l;this._showOrMove(h,function(){this._showTooltipContent(h,S,g,b,e.offsetX,e.offsetY,e.position,e.target,m)}),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:i,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r="html"===this._renderMode,o=getECData(t),i=o.tooltipConfig.option||{},a=i.encodeHTMLContent;if(isString(i)){i={content:i,formatter:i},a=!0}a&&r&&i.content&&((i=clone$6(i)).content=encodeHTML(i.content));var s=[i],l=this._ecModel.getComponent(o.componentMainType,o.componentIndex);l&&s.push(l),s.push({formatter:i.content});var u=e.positionDefault,c=buildTooltipModel(s,this._tooltipModel,u?{position:u}:null),d=c.get("content"),p=Math.random()+"",h=new TooltipMarkupStyleCreator;this._showOrMove(c,function(){var n=clone$6(c.get("formatterParams")||{});this._showTooltipContent(c,d,n,p,e.offsetX,e.offsetY,e.position,t,h)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,o,i,a,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent;u.setEnterable(e.get("enterable"));var c=e.get("formatter");a=a||e.get("position");var d=t,p=this._getNearestPoint([o,i],n,e.get("trigger"),e.get("borderColor")).color;if(c)if(isString(c)){var h=e.ecModel.get("useUTC"),f=isArray$1(n)?n[0]:n;d=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(d=format$1(f.axisValue,d,h)),d=formatTpl(d,n,!0)}else if(isFunction(c)){var g=bind$1(function(t,r){t===this._ticket&&(u.setContent(r,l,e,p,a),this._updatePosition(e,a,o,i,u,n,s))},this);this._ticket=r,d=c(n,r,g)}else d=c;u.setContent(d,l,e,p,a),u.show(e,p),this._updatePosition(e,a,o,i,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||isArray$1(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:isArray$1(t)?void 0:{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,o,i,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=o.getSize(),c=e.get("align"),d=e.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),isFunction(t)&&(t=t([n,r],i,o.el,p,{viewSize:[s,l],contentSize:u.slice()})),isArray$1(t))n=parsePercent(t[0],s),r=parsePercent(t[1],l);else if(isObject$3(t)){var h=t;h.width=u[0],h.height=u[1];var f=getLayoutRect(h,{width:s,height:l});n=f.x,r=f.y,c=null,d=null}else if(isString(t)&&a){n=(g=calcTooltipPosition(t,p,u,e.get("borderWidth")))[0],r=g[1]}else{var g;n=(g=refixTooltipPosition(n,r,o,s,l,c?null:20,d?null:20))[0],r=g[1]}(c&&(n-=isCenterAlign(c)?u[0]/2:"right"===c?u[0]:0),d&&(r-=isCenterAlign(d)?u[1]/2:"bottom"===d?u[1]:0),shouldTooltipConfine(e))&&(n=(g=confineTooltipPosition(n,r,o,s,l))[0],r=g[1]);o.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,o=!!n&&n.length===e.length;return o&&each$f(n,function(n,i){var a=n.dataByAxis||[],s=(e[i]||{}).dataByAxis||[];(o=o&&a.length===s.length)&&each$f(a,function(e,n){var i=s[n]||{},a=e.seriesDataIndices||[],l=i.seriesDataIndices||[];(o=o&&e.value===i.value&&e.axisType===i.axisType&&e.axisId===i.axisId&&a.length===l.length)&&each$f(a,function(e,t){var n=l[t];o=o&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&each$f(e.seriesDataIndices,function(e){var n=e.seriesIndex,i=t[n],a=r[n];i&&a&&a.data!==i.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!env.node&&t.getDom()&&(clear$1(this,"_updatePosition"),this._tooltipContent.dispose(),unregister("itemTooltip",t))},t.type="tooltip",t}(ComponentView);function buildTooltipModel(e,t,n){var r,o=t.ecModel;n?(r=new Model(n,o,o),r=new Model(t.option,r,o)):r=t;for(var i=e.length-1;i>=0;i--){var a=e[i];a&&(a instanceof Model&&(a=a.get("tooltip",!0)),isString(a)&&(a={formatter:a}),a&&(r=new Model(a,r,o)))}return r}function makeDispatchAction(e,t){return e.dispatchAction||bind$1(t.dispatchAction,t)}function refixTooltipPosition(e,t,n,r,o,i,a){var s=n.getSize(),l=s[0],u=s[1];return null!=i&&(e+l+i+2>r?e-=l+i:e+=i),null!=a&&(t+u+a>o?t-=u+a:t+=a),[e,t]}function confineTooltipPosition(e,t,n,r,o){var i=n.getSize(),a=i[0],s=i[1];return e=Math.min(e+a,r)-a,t=Math.min(t+s,o)-s,[e=Math.max(e,0),t=Math.max(t,0)]}function calcTooltipPosition(e,t,n,r){var o=n[0],i=n[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-o/2,l=t.y+c/2-i/2;break;case"top":s=t.x+u/2-o/2,l=t.y-i-a;break;case"bottom":s=t.x+u/2-o/2,l=t.y+c+a;break;case"left":s=t.x-o-a,l=t.y+c/2-i/2;break;case"right":s=t.x+u+a,l=t.y+c/2-i/2}return[s,l]}function isCenterAlign(e){return"center"===e||"middle"===e}function findComponentReference(e,t,n){var r=preParseFinder(e).queryOptionMap,o=r.keys()[0];if(o&&"series"!==o){var i,a=queryReferringComponents(t,o,r.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a)return n.getViewOfComponentModel(a).group.traverse(function(t){var n=getECData(t).tooltipConfig;if(n&&n.name===e.name)return i=t,!0}),i?{componentMainType:o,componentIndex:a.componentIndex,el:i}:void 0}}function install$k(e){use(install$s),e.registerComponentModel(TooltipModel),e.registerComponentView(TooltipView),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},noop),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},noop)}var DEFAULT_TOOLBOX_BTNS=["rect","polygon","keep","clear"];function brushPreprocessor(e,t){var n=normalizeToArray(e?e.brush:[]);if(n.length){var r=[];each$f(n,function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(r=r.concat(t))});var o=e&&e.toolbox;isArray$1(o)&&(o=o[0]),o||(o={feature:{}},e.toolbox=[o]);var i=o.feature||(o.feature={}),a=i.brush||(i.brush={}),s=a.type||(a.type=[]);s.push.apply(s,r),removeDuplicate(s),t&&!s.length&&s.push.apply(s,DEFAULT_TOOLBOX_BTNS)}}function removeDuplicate(e){var t={};each$f(e,function(e){t[e]=1}),e.length=0,each$f(t,function(t,n){e.push(n)})}var each$4=each$f;function hasKeys(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}function createVisualMappings(e,t,n){var r={};return each$4(t,function(t){var o,i=r[t]=((o=function(){}).prototype.__hidden=o.prototype,new o);each$4(e[t],function(e,r){if(VisualMapping.isValidType(r)){var o={type:r,visual:e};n&&n(o,t),i[r]=new VisualMapping(o),"opacity"===r&&((o=clone$6(o)).type="colorAlpha",i.__hidden.__alphaForOpacity=new VisualMapping(o))}})}),r}function replaceVisualOption(e,t,n){var r;each$f(n,function(e){t.hasOwnProperty(e)&&hasKeys(t[e])&&(r=!0)}),r&&each$f(n,function(n){t.hasOwnProperty(n)&&hasKeys(t[n])?e[n]=clone$6(t[n]):delete e[n]})}function applyVisual(e,t,n,r,o,i){var a,s={};function l(e){return getItemVisualFromData(n,a,e)}function u(e,t){setItemVisualFromData(n,a,e,t)}each$f(e,function(e){var n=VisualMapping.prepareVisualTypes(t[e]);s[e]=n}),n.each(function(e,i){a=e;var c=n.getRawDataItem(a);if(c&&!1===c.visualMap)return;for(var d=r.call(o,e),p=t[d],h=s[d],f=0,g=h.length;f<g;f++){var m=h[f];p[m]&&p[m].applyVisual(e,l,u)}})}function incrementalApplyVisual(e,t,n,r){var o={};return each$f(e,function(e){var n=VisualMapping.prepareVisualTypes(t[e]);o[e]=n}),{progress:function(e,i){var a,s;function l(e){return getItemVisualFromData(i,s,e)}function u(e,t){setItemVisualFromData(i,s,e,t)}null!=r&&(a=i.getDimensionIndex(r));for(var c=i.getStore();null!=(s=e.next());){var d=i.getRawDataItem(s);if(!d||!1!==d.visualMap)for(var p=null!=r?c.get(a,s):s,h=n(p),f=t[h],g=o[h],m=0,y=g.length;m<y;m++){var v=g[m];f[v]&&f[v].applyVisual(p,l,u)}}}}}function makeBrushCommonSelectorForSeries(e){var t=e.brushType,n={point:function(r){return selector[t].point(r,n,e)},rect:function(r){return selector[t].rect(r,n,e)}};return n}var selector={lineX:getLineSelectors(0),lineY:getLineSelectors(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&contain(n.range,e[0],e[1])},rect:function(e,t,n){var r=n.range;if(!e||r.length<=1)return!1;var o=e.x,i=e.y,a=e.width,s=e.height,l=r[0];return!!(contain(r,o,i)||contain(r,o+a,i)||contain(r,o,i+s)||contain(r,o+a,i+s)||BoundingRect.create(e).contain(l[0],l[1])||linePolygonIntersect(o,i,o+a,i,r)||linePolygonIntersect(o,i,o,i+s,r)||linePolygonIntersect(o+a,i,o+a,i+s,r)||linePolygonIntersect(o,i+s,o+a,i+s,r))||void 0}}};function getLineSelectors(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,r){if(t){var o=r.range;return inLineRange(t[e],o)}},rect:function(r,o,i){if(r){var a=i.range,s=[r[t[e]],r[t[e]]+r[n[e]]];return s[1]<s[0]&&s.reverse(),inLineRange(s[0],a)||inLineRange(s[1],a)||inLineRange(a[0],s)||inLineRange(a[1],s)}}}}function inLineRange(e,t){return t[0]<=e&&e<=t[1]}var STATE_LIST=["inBrush","outOfBrush"],DISPATCH_METHOD="__ecBrushSelect",DISPATCH_FLAG="__ecInBrushSelectEvent";function layoutCovers(e){e.eachComponent({mainType:"brush"},function(t){(t.brushTargetManager=new BrushTargetManager(t.option,e)).setInputRanges(t.areas,e)})}function brushVisual(e,t,n){var r,o,i=[];e.eachComponent({mainType:"brush"},function(e){n&&"takeGlobalCursor"===n.type&&e.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})}),layoutCovers(e),e.eachComponent({mainType:"brush"},function(t,n){var a={brushId:t.id,brushIndex:n,brushName:t.name,areas:clone$6(t.areas),selected:[]};i.push(a);var s=t.option,l=s.brushLink,u=[],c=[],d=[],p=!1;n||(r=s.throttleType,o=s.throttleDelay);var h=map$1(t.areas,function(e){var t=boundingRectBuilders[e.brushType],n=defaults$2({boundingRect:t?t(e):void 0},e);return n.selectors=makeBrushCommonSelectorForSeries(n),n}),f=createVisualMappings(t.option,STATE_LIST,function(e){e.mappingMethod="fixed"});function g(e){return"all"===l||!!u[e]}function m(e){return!!e.length}isArray$1(l)&&each$f(l,function(e){u[e]=1}),e.eachSeries(function(n,r){var o=d[r]=[];"parallel"===n.subType?function(e,t){var n=e.coordinateSystem;p=p||n.hasAxisBrushed(),g(t)&&n.eachActiveState(e.getData(),function(e,t){"active"===e&&(c[t]=1)})}(n,r):function(n,r,o){if(!n.brushSelector||brushModelNotControll(t,r))return;if(each$f(h,function(r){t.brushTargetManager.controlSeries(r,n,e)&&o.push(r),p=p||m(o)}),g(r)&&m(o)){var i=n.getData();i.each(function(e){checkInRange(n,o,i,e)&&(c[e]=1)})}}(n,r,o)}),e.eachSeries(function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};a.selected.push(n);var r=d[t],o=e.getData(),i=g(t)?function(e){return c[e]?(n.dataIndex.push(o.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(t){return checkInRange(e,r,o,t)?(n.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"};(g(t)?p:m(r))&&applyVisual(STATE_LIST,f,o,i)})}),dispatchAction$1(t,r,o,i,n)}function dispatchAction$1(e,t,n,r,o){if(o){var i=e.getZr();if(!i[DISPATCH_FLAG])i[DISPATCH_METHOD]||(i[DISPATCH_METHOD]=doDispatch),createOrUpdate(i,DISPATCH_METHOD,n,t)(e,r)}}function doDispatch(e,t){if(!e.isDisposed()){var n=e.getZr();n[DISPATCH_FLAG]=!0,e.dispatchAction({type:"brushSelect",batch:t}),n[DISPATCH_FLAG]=!1}}function checkInRange(e,t,n,r){for(var o=0,i=t.length;o<i;o++){var a=t[o];if(e.brushSelector(r,n,a.selectors,a))return!0}}function brushModelNotControll(e,t){var n=e.option.seriesIndex;return null!=n&&"all"!==n&&(isArray$1(n)?indexOf(n,t)<0:t!==n)}var boundingRectBuilders={rect:function(e){return getBoundingRectFromMinMax(e.range)},polygon:function(e){for(var t,n=e.range,r=0,o=n.length;r<o;r++){t=t||[[1/0,-1/0],[1/0,-1/0]];var i=n[r];i[0]<t[0][0]&&(t[0][0]=i[0]),i[0]>t[0][1]&&(t[0][1]=i[0]),i[1]<t[1][0]&&(t[1][0]=i[1]),i[1]>t[1][1]&&(t[1][1]=i[1])}return t&&getBoundingRectFromMinMax(t)}};function getBoundingRectFromMinMax(e){return new BoundingRect(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var BrushView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new BrushController(t.getZr())).on("brush",bind$1(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,r){this.model=e,this._updateController(e,t,n,r)},t.prototype.updateTransform=function(e,t,n,r){layoutCovers(t),this._updateController(e,t,n,r)},t.prototype.updateVisual=function(e,t,n,r){this.updateTransform(e,t,n,r)},t.prototype.updateView=function(e,t,n,r){this._updateController(e,t,n,r)},t.prototype._updateController=function(e,t,n,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:t,areas:clone$6(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:clone$6(n),$from:t})},t.type="brush",t}(ComponentView),DEFAULT_OUT_OF_BRUSH_COLOR="#ddd",BrushModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return __extends(t,e),t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&replaceVisualOption(n,e,["inBrush","outOfBrush"]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:DEFAULT_OUT_OF_BRUSH_COLOR},r.hasOwnProperty("liftZ")||(r.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=map$1(e,function(e){return generateBrushOption(this.option,e)},this))},t.prototype.setBrushOption=function(e){this.brushOption=generateBrushOption(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(ComponentModel);function generateBrushOption(e,t){return merge({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new Model(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var ICON_TYPES=["rect","polygon","lineX","lineY","keep","clear"],BrushFeature=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(e,t,n){var r,o,i;t.eachComponent({mainType:"brush"},function(e){r=e.brushType,o=e.brushOption.brushMode||"single",i=i||!!e.areas.length}),this._brushType=r,this._brushMode=o,each$f(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?i:t===r)?"emphasis":"normal")})},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return each$f(e.get("type",!0),function(e){t[e]&&(n[e]=t[e])}),n},t.prototype.onclick=function(e,t,n){var r=this._brushType,o=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?r:r!==n&&n,brushMode:"keep"===n?"multiple"===o?"single":"multiple":o}})},t.getDefaultOption=function(e){return{show:!0,type:ICON_TYPES.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])}},t}(ToolboxFeature);function install$j(e){e.registerComponentView(BrushView),e.registerComponentModel(BrushModel),e.registerPreprocessor(brushPreprocessor),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,brushVisual),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},noop),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},noop),registerFeature("brush",BrushFeature)}var TitleModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return __extends(t,e),t.type="title",t.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"}},t}(ComponentModel),TitleView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var r=this.group,o=e.getModel("textStyle"),i=e.getModel("subtextStyle"),a=e.get("textAlign"),s=retrieve2(e.get("textBaseline"),e.get("textVerticalAlign")),l=new ZRText({style:createTextStyle$1(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),d=new ZRText({style:createTextStyle$1(i,{text:c,fill:i.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=e.get("link"),h=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!p&&!f,d.silent=!h&&!f,p&&l.on("click",function(){windowOpen(p,"_"+e.get("target"))}),h&&d.on("click",function(){windowOpen(h,"_"+e.get("subtarget"))}),getECData(l).eventData=getECData(d).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(l),c&&r.add(d);var g=r.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var y=getLayoutRect(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||("middle"===(a=e.get("left")||e.get("right"))&&(a="center"),"right"===a?y.x+=y.width:"center"===a&&(y.x+=y.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?y.y+=y.height:"middle"===s&&(y.y+=y.height/2),s=s||"top"),r.x=y.x,r.y=y.y,r.markRedraw();var v={align:a,verticalAlign:s};l.setStyle(v),d.setStyle(v),g=r.getBoundingRect();var _=y.margin,x=e.getItemStyle(["color","opacity"]);x.fill=e.get("backgroundColor");var S=new Rect$2({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:e.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});r.add(S)}},t.type="title",t}(ComponentView);function install$i(e){e.registerComponentModel(TitleModel),e.registerComponentView(TitleView)}var TimelineModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode="box",n}return __extends(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){null==e&&(e=this.option.currentIndex);var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e,t=this.option,n=t.data||[],r=t.axisType,o=this._names=[];"category"===r?(e=[],each$f(n,function(t,n){var r,i=convertOptionIdName(getDataItemValue(t),"");isObject$3(t)?(r=clone$6(t)).value=n:r=n,e.push(r),o.push(i)})):e=n;var i={category:"ordinal",time:"time",value:"number"}[r]||"number";(this._data=new SeriesData([{name:"value",type:i}],this)).initData(e,o)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},t}(ComponentModel),SliderTimelineModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.type="timeline.slider",t.defaultOption=inheritDefaultOption(TimelineModel.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),t}(TimelineModel);mixin(SliderTimelineModel,DataFormatMixin.prototype);var TimelineView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.type="timeline",t}(ComponentView),TimelineAxis=function(e){function t(t,n,r,o){var i=e.call(this,t,n,r)||this;return i.type=o||"value",i}return __extends(t,e),t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},t}(Axis),PI$1=Math.PI,labelDataIndexStore=makeInner(),SliderTimelineView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.init=function(e,t){this.api=t},t.prototype.render=function(e,t,n){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var r=this._layout(e,n),o=this._createGroup("_mainGroup"),i=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(r,e);e.formatTooltip=function(e){return createTooltipMarkup("nameValue",{noName:!0,value:a.scale.getLabel({value:e})})},each$f(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](r,o,a,e)},this),this._renderAxisLabel(r,i,a,e),this._position(r,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,t){var n,r,o,i,a=e.get(["label","position"]),s=e.get("orient"),l=getViewRect(e,t),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2<t.getHeight()/2?"-":"+":l.x+l.width/2<t.getWidth()/2?"+":"-":isString(a)?{horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[s][a]:a)>=0||"+"===n?"left":"right"},c={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},d={horizontal:0,vertical:PI$1/2},p="vertical"===s?l.height:l.width,h=e.getModel("controlStyle"),f=h.get("show",!0),g=f?h.get("itemSize"):0,m=f?h.get("itemGap"):0,y=g+m,v=e.get(["label","rotate"])||0;v=v*PI$1/180;var _=h.get("position",!0),x=f&&h.get("showPlayBtn",!0),S=f&&h.get("showPrevBtn",!0),b=f&&h.get("showNextBtn",!0),T=0,A=p;"left"===_||"bottom"===_?(x&&(r=[0,0],T+=y),S&&(o=[T,0],T+=y),b&&(i=[A-g,0],A-=y)):(x&&(r=[A-g,0],A-=y),S&&(o=[0,0],T+=y),b&&(i=[A-g,0],A-=y));var w=[T,A];return e.get("inverse")&&w.reverse(),{viewRect:l,mainLength:p,orient:s,rotation:d[s],labelRotation:v,labelPosOpt:n,labelAlign:e.get(["label","align"])||u[s],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||c[s],playPosition:r,prevBtnPosition:o,nextBtnPosition:i,axisExtent:w,controlSize:g,controlGap:m}},t.prototype._position=function(e,t){var n=this._mainGroup,r=this._labelGroup,o=e.viewRect;if("vertical"===e.orient){var i=create$1(),a=o.x,s=o.y+o.height;translate(i,i,[-a,-s]),rotate(i,i,-PI$1/2),translate(i,i,[a,s]),(o=o.clone()).applyTransform(i)}var l=m(o),u=m(n.getBoundingRect()),c=m(r.getBoundingRect()),d=[n.x,n.y],p=[r.x,r.y];p[0]=d[0]=l[0][0];var h,f=e.labelPosOpt;null==f||isString(f)?(y(d,u,l,1,h="+"===f?0:1),y(p,c,l,1,1-h)):(y(d,u,l,1,h=f>=0?0:1),p[1]=d[1]+f);function g(e){e.originX=l[0][0]-e.x,e.originY=l[1][0]-e.y}function m(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function y(e,t,n,r,o){e[r]+=n[r][o]-t[r][o]}n.setPosition(d),r.setPosition(p),n.rotation=r.rotation=e.rotation,g(n),g(r)},t.prototype._createAxis=function(e,t){var n=t.getData(),r=t.get("axisType"),o=createScaleByModel(t,r);o.getTicks=function(){return n.mapArray(["value"],function(e){return{value:e}})};var i=n.getDataExtent("value");o.setExtent(i[0],i[1]),o.calcNiceTicks();var a=new TimelineAxis("value",o,e.axisExtent,r);return a.model=t,a},t.prototype._createGroup=function(e){var t=this[e]=new Group$3;return this.group.add(t),t},t.prototype._renderAxisLine=function(e,t,n,r){var o=n.getExtent();if(r.get(["lineStyle","show"])){var i=new Line$1({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:extend$2({lineCap:"round"},r.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});t.add(i);var a=this._progressLine=new Line$1({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:defaults$2({lineCap:"round",lineWidth:i.style.lineWidth},r.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});t.add(a)}},t.prototype._renderAxisTick=function(e,t,n,r){var o=this,i=r.getData(),a=n.scale.getTicks();this._tickSymbols=[],each$f(a,function(e){var a=n.dataToCoord(e.value),s=i.getItemModel(e.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),c=s.getModel(["progress","itemStyle"]),d={x:a,y:0,onclick:bind$1(o._changeTimeline,o,e.value)},p=giveSymbol(s,l,t,d);p.ensureState("emphasis").style=u.getItemStyle(),p.ensureState("progress").style=c.getItemStyle(),enableHoverEmphasis(p);var h=getECData(p);s.get("tooltip")?(h.dataIndex=e.value,h.dataModel=r):h.dataIndex=h.dataModel=null,o._tickSymbols.push(p)})},t.prototype._renderAxisLabel=function(e,t,n,r){var o=this;if(n.getLabelModel().get("show")){var i=r.getData(),a=n.getViewLabels();this._tickLabels=[],each$f(a,function(r){var a=r.tickValue,s=i.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),c=s.getModel(["progress","label"]),d=n.dataToCoord(r.tickValue),p=new ZRText({x:d,y:0,rotation:e.labelRotation-e.rotation,onclick:bind$1(o._changeTimeline,o,a),silent:!1,style:createTextStyle$1(l,{text:r.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});p.ensureState("emphasis").style=createTextStyle$1(u),p.ensureState("progress").style=createTextStyle$1(c),t.add(p),enableHoverEmphasis(p),labelDataIndexStore(p).dataIndex=a,o._tickLabels.push(p)})}},t.prototype._renderControl=function(e,t,n,r){var o=e.controlSize,i=e.rotation,a=r.getModel("controlStyle").getItemStyle(),s=r.getModel(["emphasis","controlStyle"]).getItemStyle(),l=r.getPlayState(),u=r.get("inverse",!0);function c(e,n,l,u){if(e){var c=parsePercent$1(retrieve2(r.get(["controlStyle",n+"BtnSize"]),o),o),d=makeControlIcon(r,n+"Icon",[0,-c/2,c,c],{x:e[0],y:e[1],originX:o/2,originY:0,rotation:u?-i:0,rectHover:!0,style:a,onclick:l});d.ensureState("emphasis").style=s,t.add(d),enableHoverEmphasis(d)}}c(e.nextBtnPosition,"next",bind$1(this._changeTimeline,this,u?"-":"+")),c(e.prevBtnPosition,"prev",bind$1(this._changeTimeline,this,u?"+":"-")),c(e.playPosition,l?"stop":"play",bind$1(this._handlePlayClick,this,!l),!0)},t.prototype._renderCurrentPointer=function(e,t,n,r){var o=r.getData(),i=r.getCurrentIndex(),a=o.getItemModel(i).getModel("checkpointStyle"),s=this,l={onCreate:function(e){e.draggable=!0,e.drift=bind$1(s._handlePointerDrag,s),e.ondragend=bind$1(s._handlePointerDragend,s),pointerMoveTo(e,s._progressLine,i,n,r,!0)},onUpdate:function(e){pointerMoveTo(e,s._progressLine,i,n,r)}};this._currentPointer=giveSymbol(a,a,this._mainGroup,{},this._currentPointer,l)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,t){var n=this._toAxisCoord(e)[0],r=asc$2(this._axis.getExtent().slice());n>r[1]&&(n=r[1]),n<r[0]&&(n=r[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var o=this._progressLine;o&&(o.shape.x2=n,o.dirty());var i=this._findNearestTick(n),a=this.model;(t||i!==a.getCurrentIndex()&&a.get("realtime"))&&this._changeTimeline(i)},t.prototype._doPlayStop=function(){var e=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var t=e.model;e._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},t.prototype._toAxisCoord=function(e){return applyTransform(e,this._mainGroup.getLocalTransform(),!0)},t.prototype._findNearestTick=function(e){var t,n=this.model.getData(),r=1/0,o=this._axis;return n.each(["value"],function(n,i){var a=o.dataToCoord(n),s=Math.abs(a-e);s<r&&(r=s,t=i)}),t},t.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},t.prototype._changeTimeline=function(e){var t=this.model.getCurrentIndex();"+"===e?e=t+1:"-"===e&&(e=t-1),this.api.dispatchAction({type:"timelineChange",currentIndex:e,from:this.uid})},t.prototype._updateTicksStatus=function(){var e=this.model.getCurrentIndex(),t=this._tickSymbols,n=this._tickLabels;if(t)for(var r=0;r<t.length;r++)t&&t[r]&&t[r].toggleState("progress",r<e);if(n)for(r=0;r<n.length;r++)n&&n[r]&&n[r].toggleState("progress",labelDataIndexStore(n[r]).dataIndex<=e)},t.type="timeline.slider",t}(TimelineView);function createScaleByModel(e,t){if(t=t||e.get("type"))switch(t){case"category":return new OrdinalScale({ordinalMeta:e.getCategories(),extent:[1/0,-1/0]});case"time":return new TimeScale({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new IntervalScale}}function getViewRect(e,t){return getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}function makeControlIcon(e,t,n,r){var o=r.style,i=createIcon(e.get(["controlStyle",t]),r||{},new BoundingRect(n[0],n[1],n[2],n[3]));return o&&i.setStyle(o),i}function giveSymbol(e,t,n,r,o,i){var a=t.get("color");o?(o.setColor(a),n.add(o),i&&i.onUpdate(o)):((o=createSymbol$1(e.get("symbol"),-1,-1,2,2,a)).setStyle("strokeNoScale",!0),n.add(o),i&&i.onCreate(o));var s=t.getItemStyle(["color"]);o.setStyle(s),r=merge({rectHover:!0,z2:100},r,!0);var l=normalizeSymbolSize(e.get("symbolSize"));r.scaleX=l[0]/2,r.scaleY=l[1]/2;var u=normalizeSymbolOffset(e.get("symbolOffset"),l);u&&(r.x=(r.x||0)+u[0],r.y=(r.y||0)+u[1]);var c=e.get("symbolRotate");return r.rotation=(c||0)*Math.PI/180||0,o.attr(r),o.updateTransform(),o}function pointerMoveTo(e,t,n,r,o,i){if(!e.dragging){var a=o.getModel("checkpointStyle"),s=r.dataToCoord(o.getData().get("value",n));if(i||!a.get("animation",!0))e.attr({x:s,y:0}),t&&t.attr({shape:{x2:s}});else{var l={duration:a.get("animationDuration",!0),easing:a.get("animationEasing",!0)};e.stopAnimation(null,!0),e.animateTo({x:s,y:0},l),t&&t.animateTo({shape:{x2:s}},l)}}}function installTimelineAction(e){e.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,n){var r=t.getComponent("timeline");return r&&null!=e.currentIndex&&(r.setCurrentIndex(e.currentIndex),!r.get("loop",!0)&&r.isIndexMax()&&r.getPlayState()&&(r.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:r.get("replaceMerge",!0)}),defaults$2({currentIndex:r.option.currentIndex},e)}),e.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var n=t.getComponent("timeline");n&&null!=e.playState&&n.setPlayState(e.playState)})}function timelinePreprocessor(e){var t=e&&e.timeline;isArray$1(t)||(t=t?[t]:[]),each$f(t,function(e){e&&compatibleEC2(e)})}function compatibleEC2(e){var t=e.type,n={number:"value",time:"time"};if(n[t]&&(e.axisType=n[t],delete e.type),transferItem(e),has$1(e,"controlPosition")){var r=e.controlStyle||(e.controlStyle={});has$1(r,"position")||(r.position=e.controlPosition),"none"!==r.position||has$1(r,"show")||(r.show=!1,delete r.position),delete e.controlPosition}each$f(e.data||[],function(e){isObject$3(e)&&!isArray$1(e)&&(!has$1(e,"value")&&has$1(e,"name")&&(e.value=e.name),transferItem(e))})}function transferItem(e){var t=e.itemStyle||(e.itemStyle={}),n=t.emphasis||(t.emphasis={}),r=e.label||e.label||{},o=r.normal||(r.normal={}),i={normal:1,emphasis:1};each$f(r,function(e,t){i[t]||has$1(o,t)||(o[t]=e)}),n.label&&!has$1(r,"emphasis")&&(r.emphasis=n.label,delete n.label)}function has$1(e,t){return e.hasOwnProperty(t)}function install$h(e){e.registerComponentModel(SliderTimelineModel),e.registerComponentView(SliderTimelineView),e.registerSubTypeDefaulter("timeline",function(){return"slider"}),installTimelineAction(e),e.registerPreprocessor(timelinePreprocessor)}function checkMarkerInSeries(e,t){if(!e)return!1;for(var n=isArray$1(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function fillLabel(e){defaultEmphasis(e,"label",["show"])}var inner$5=makeInner(),MarkerModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n}return __extends(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(env.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,r){var o=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),i=inner$5(e)[o];n&&n.data?(i?i._mergeOption(n,t,!0):(r&&fillLabel(n),each$f(n.data,function(e){e instanceof Array?(fillLabel(e[0]),fillLabel(e[1])):fillLabel(e)}),extend$2(i=this.createMarkerModelFromSeries(n,this,t),{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),i.__hostSeries=e),inner$5(e)[o]=i):inner$5(e)[o]=null},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),o=this.getRawValue(e),i=r.getName(e);return createTooltipMarkup("section",{header:this.name,blocks:[createTooltipMarkup("nameValue",{name:i,value:o,noName:!i,noValue:null==o})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var n=DataFormatMixin.prototype.getDataParams.call(this,e,t),r=this.__hostSeries;return r&&(n.seriesId=r.id,n.seriesName=r.name,n.seriesType=r.subType),n},t.getMarkerModelFromSeries=function(e,t){return inner$5(e)[t]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(ComponentModel);mixin(MarkerModel,DataFormatMixin.prototype);var MarkPointModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(MarkerModel);function hasXOrY(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function hasXAndY(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function markerTypeCalculatorWithExtent(e,t,n,r,o,i){var a=[],s=isDimensionStacked(t,r)?t.getCalculationInfo("stackResultDimension"):r,l=numCalculate(t,s,e),u=t.indicesOfNearest(s,l)[0];a[o]=t.get(n,u),a[i]=t.get(s,u);var c=t.get(r,u),d=getPrecision(t.get(r,u));return(d=Math.min(d,20))>=0&&(a[i]=+a[i].toFixed(d)),[a,c]}var markerTypeCalculator={min:curry$1(markerTypeCalculatorWithExtent,"min"),max:curry$1(markerTypeCalculatorWithExtent,"max"),average:curry$1(markerTypeCalculatorWithExtent,"average"),median:curry$1(markerTypeCalculatorWithExtent,"median")};function dataTransform(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,o=r&&r.dimensions;if(!hasXAndY(t)&&!isArray$1(t.coord)&&isArray$1(o)){var i=getAxisInfo(t,n,r,e);if((t=clone$6(t)).type&&markerTypeCalculator[t.type]&&i.baseAxis&&i.valueAxis){var a=indexOf(o,i.baseAxis.dim),s=indexOf(o,i.valueAxis.dim),l=markerTypeCalculator[t.type](n,i.baseDataDim,i.valueDataDim,a,s);t.coord=l[0],t.value=l[1]}else t.coord=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis]}if(null!=t.coord&&isArray$1(o))for(var u=t.coord,c=0;c<2;c++)markerTypeCalculator[u[c]]&&(u[c]=numCalculate(n,n.mapDimension(o[c]),u[c]));else t.coord=[];return t}}function getAxisInfo(e,t,n,r){var o={};return null!=e.valueIndex||null!=e.valueDim?(o.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,o.valueAxis=n.getAxis(dataDimToCoordDim(r,o.valueDataDim)),o.baseAxis=n.getOtherAxis(o.valueAxis),o.baseDataDim=t.mapDimension(o.baseAxis.dim)):(o.baseAxis=r.getBaseAxis(),o.valueAxis=n.getOtherAxis(o.baseAxis),o.baseDataDim=t.mapDimension(o.baseAxis.dim),o.valueDataDim=t.mapDimension(o.valueAxis.dim)),o}function dataDimToCoordDim(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function dataFilter(e,t){return!(e&&e.containData&&t.coord&&!hasXOrY(t))||e.containData(t.coord)}function zoneFilter(e,t,n){return!(e&&e.containZone&&t.coord&&n.coord&&!hasXOrY(t)&&!hasXOrY(n))||e.containZone(t.coord,n.coord)}function createMarkerDimValueGetter(e,t){return e?function(e,n,r,o){return parseDataValue(o<2?e.coord&&e.coord[o]:e.value,t[o])}:function(e,n,r,o){return parseDataValue(e.value,t[o])}}function numCalculate(e,t,n){if("average"===n){var r=0,o=0;return e.each(t,function(e,t){isNaN(e)||(r+=e,o++)}),r/o}return"median"===n?e.getMedian(t):e.getDataExtent(t)["max"===n?1:0]}var inner$4=makeInner(),MarkerView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.init=function(){this.markerGroupMap=createHashMap()},t.prototype.render=function(e,t,n){var r=this,o=this.markerGroupMap;o.each(function(e){inner$4(e).keep=!1}),t.eachSeries(function(e){var o=MarkerModel.getMarkerModelFromSeries(e,r.type);o&&r.renderSeries(e,o,t,n)}),o.each(function(e){!inner$4(e).keep&&r.group.remove(e.group)})},t.prototype.markKeep=function(e){inner$4(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;each$f(e,function(e){var r=MarkerModel.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?enterBlur(e):leaveBlur(e))})})},t.type="marker",t}(ComponentView);function updateMarkerLayout(e,t,n){var r=t.coordinateSystem;e.each(function(o){var i,a=e.getItemModel(o),s=parsePercent(a.get("x"),n.getWidth()),l=parsePercent(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)i=t.getMarkerPosition(e.getValues(e.dimensions,o));else if(r){var u=e.get(r.dimensions[0],o),c=e.get(r.dimensions[1],o);i=r.dataToPoint([u,c])}}else i=[s,l];isNaN(s)||(i[0]=s),isNaN(l)||(i[1]=l),e.setItemLayout(o,i)})}var MarkPointView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=MarkerModel.getMarkerModelFromSeries(e,"markPoint");t&&(updateMarkerLayout(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())},this)},t.prototype.renderSeries=function(e,t,n,r){var o=e.coordinateSystem,i=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,new SymbolDraw),u=createData(o,e,t);t.setData(u),updateMarkerLayout(t.getData(),e,r),u.each(function(e){var n=u.getItemModel(e),r=n.getShallow("symbol"),o=n.getShallow("symbolSize"),i=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(isFunction(r)||isFunction(o)||isFunction(i)||isFunction(s)){var c=t.getRawValue(e),d=t.getDataParams(e);isFunction(r)&&(r=r(c,d)),isFunction(o)&&(o=o(c,d)),isFunction(i)&&(i=i(c,d)),isFunction(s)&&(s=s(c,d))}var p=n.getModel("itemStyle").getItemStyle(),h=getVisualFromData(a,"color");p.fill||(p.fill=h),u.setItemVisual(e,{symbol:r,symbolSize:o,symbolRotate:i,symbolOffset:s,symbolKeepAspect:l,style:p})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(e){e.traverse(function(e){getECData(e).dataModel=t})}),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markPoint",t}(MarkerView);function createData(e,t,n){var r;r=e?map$1(e&&e.dimensions,function(e){return extend$2(extend$2({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}];var o=new SeriesData(r,n),i=map$1(n.get("data"),curry$1(dataTransform,t));e&&(i=filter(i,curry$1(dataFilter,e)));var a=createMarkerDimValueGetter(!!e,r);return o.initData(i,null,a),o}function install$g(e){e.registerComponentModel(MarkPointModel),e.registerComponentView(MarkPointView),e.registerPreprocessor(function(e){checkMarkerInSeries(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var MarkLineModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(MarkerModel),inner$3=makeInner(),markLineTransform=function(e,t,n,r){var o,i=e.getData();if(isArray$1(r))o=r;else{var a=r.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=r.xAxis||null!=r.yAxis){var s=void 0,l=void 0;if(null!=r.yAxis||null!=r.xAxis)s=t.getAxis(null!=r.yAxis?"y":"x"),l=retrieve(r.yAxis,r.xAxis);else{var u=getAxisInfo(r,i,t,e);s=u.valueAxis,l=numCalculate(i,getStackedDimension(i,u.valueDataDim),a)}var c="x"===s.dim?0:1,d=1-c,p=clone$6(r),h={coord:[]};p.type=null,p.coord=[],p.coord[d]=-1/0,h.coord[d]=1/0;var f=n.get("precision");f>=0&&isNumber(l)&&(l=+l.toFixed(Math.min(f,20))),p.coord[c]=h.coord[c]=l,o=[p,h,{type:a,valueIndex:r.valueIndex,value:l}]}else o=[]}var g=[dataTransform(e,o[0]),dataTransform(e,o[1]),extend$2({},o[2])];return g[2].type=g[2].type||null,merge(g[2],g[0]),merge(g[2],g[1]),g};function isInfinity$1(e){return!isNaN(e)&&!isFinite(e)}function ifMarkLineHasOnlyDim(e,t,n,r){var o=1-e,i=r.dimensions[e];return isInfinity$1(t[o])&&isInfinity$1(n[o])&&t[e]===n[e]&&r.getAxis(i).containData(t[e])}function markLineFilter(e,t){if("cartesian2d"===e.type){var n=t[0].coord,r=t[1].coord;if(n&&r&&(ifMarkLineHasOnlyDim(1,n,r,e)||ifMarkLineHasOnlyDim(0,n,r,e)))return!0}return dataFilter(e,t[0])&&dataFilter(e,t[1])}function updateSingleMarkerEndLayout(e,t,n,r,o){var i,a=r.coordinateSystem,s=e.getItemModel(t),l=parsePercent(s.get("x"),o.getWidth()),u=parsePercent(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(u)){if(r.getMarkerPosition)i=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,d=e.get(c[0],t),p=e.get(c[1],t);i=a.dataToPoint([d,p])}if(isCoordinateSystemType(a,"cartesian2d")){var h=a.getAxis("x"),f=a.getAxis("y");c=a.dimensions;isInfinity$1(e.get(c[0],t))?i[0]=h.toGlobalCoord(h.getExtent()[n?0:1]):isInfinity$1(e.get(c[1],t))&&(i[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(i[0]=l),isNaN(u)||(i[1]=u)}else i=[l,u];e.setItemLayout(t,i)}var MarkLineView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=MarkerModel.getMarkerModelFromSeries(e,"markLine");if(t){var r=t.getData(),o=inner$3(t).from,i=inner$3(t).to;o.each(function(t){updateSingleMarkerEndLayout(o,t,!0,e,n),updateSingleMarkerEndLayout(i,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[o.getItemLayout(e),i.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var o=e.coordinateSystem,i=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,new LineDraw);this.group.add(l.group);var u=createList$1(o,e,t),c=u.from,d=u.to,p=u.line;inner$3(t).from=c,inner$3(t).to=d,t.setData(p);var h=t.get("symbol"),f=t.get("symbolSize"),g=t.get("symbolRotate"),m=t.get("symbolOffset");function y(t,n,o){var i=t.getItemModel(n);updateSingleMarkerEndLayout(t,n,o,e,r);var s=i.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=getVisualFromData(a,"color")),t.setItemVisual(n,{symbolKeepAspect:i.get("symbolKeepAspect"),symbolOffset:retrieve2(i.get("symbolOffset",!0),m[o?0:1]),symbolRotate:retrieve2(i.get("symbolRotate",!0),g[o?0:1]),symbolSize:retrieve2(i.get("symbolSize"),f[o?0:1]),symbol:retrieve2(i.get("symbol",!0),h[o?0:1]),style:s})}isArray$1(h)||(h=[h,h]),isArray$1(f)||(f=[f,f]),isArray$1(g)||(g=[g,g]),isArray$1(m)||(m=[m,m]),u.from.each(function(e){y(c,e,!0),y(d,e,!1)}),p.each(function(e){var t=p.getItemModel(e).getModel("lineStyle").getLineStyle();p.setItemLayout(e,[c.getItemLayout(e),d.getItemLayout(e)]),null==t.stroke&&(t.stroke=c.getItemVisual(e,"style").fill),p.setItemVisual(e,{fromSymbolKeepAspect:c.getItemVisual(e,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(e,"symbolOffset"),fromSymbolRotate:c.getItemVisual(e,"symbolRotate"),fromSymbolSize:c.getItemVisual(e,"symbolSize"),fromSymbol:c.getItemVisual(e,"symbol"),toSymbolKeepAspect:d.getItemVisual(e,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(e,"symbolOffset"),toSymbolRotate:d.getItemVisual(e,"symbolRotate"),toSymbolSize:d.getItemVisual(e,"symbolSize"),toSymbol:d.getItemVisual(e,"symbol"),style:t})}),l.updateData(p),u.line.eachItemGraphicEl(function(e){getECData(e).dataModel=t,e.traverse(function(e){getECData(e).dataModel=t})}),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markLine",t}(MarkerView);function createList$1(e,t,n){var r;r=e?map$1(e&&e.dimensions,function(e){return extend$2(extend$2({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}];var o=new SeriesData(r,n),i=new SeriesData(r,n),a=new SeriesData([],n),s=map$1(n.get("data"),curry$1(markLineTransform,t,e,n));e&&(s=filter(s,curry$1(markLineFilter,e)));var l=createMarkerDimValueGetter(!!e,r);return o.initData(map$1(s,function(e){return e[0]}),null,l),i.initData(map$1(s,function(e){return e[1]}),null,l),a.initData(map$1(s,function(e){return e[2]})),a.hasItemOption=!0,{from:o,to:i,line:a}}function install$f(e){e.registerComponentModel(MarkLineModel),e.registerComponentView(MarkLineView),e.registerPreprocessor(function(e){checkMarkerInSeries(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var MarkAreaModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(MarkerModel),inner$2=makeInner(),markAreaTransform=function(e,t,n,r){var o=r[0],i=r[1];if(o&&i){var a=dataTransform(e,o),s=dataTransform(e,i),l=a.coord,u=s.coord;l[0]=retrieve(l[0],-1/0),l[1]=retrieve(l[1],-1/0),u[0]=retrieve(u[0],1/0),u[1]=retrieve(u[1],1/0);var c=mergeAll([{},a,s]);return c.coord=[a.coord,s.coord],c.x0=a.x,c.y0=a.y,c.x1=s.x,c.y1=s.y,c}};function isInfinity(e){return!isNaN(e)&&!isFinite(e)}function ifMarkAreaHasOnlyDim(e,t,n,r){var o=1-e;return isInfinity(t[o])&&isInfinity(n[o])}function markAreaFilter(e,t){var n=t.coord[0],r=t.coord[1],o={coord:n,x:t.x0,y:t.y0},i={coord:r,x:t.x1,y:t.y1};return isCoordinateSystemType(e,"cartesian2d")?!(!n||!r||!ifMarkAreaHasOnlyDim(1,n,r)&&!ifMarkAreaHasOnlyDim(0,n,r))||zoneFilter(e,o,i):dataFilter(e,o)||dataFilter(e,i)}function getSingleMarkerEndPoint(e,t,n,r,o){var i,a=r.coordinateSystem,s=e.getItemModel(t),l=parsePercent(s.get(n[0]),o.getWidth()),u=parsePercent(s.get(n[1]),o.getHeight());if(isNaN(l)||isNaN(u)){if(r.getMarkerPosition){var c=e.getValues(["x0","y0"],t),d=e.getValues(["x1","y1"],t),p=a.clampData(c),h=a.clampData(d),f=[];"x0"===n[0]?f[0]=p[0]>h[0]?d[0]:c[0]:f[0]=p[0]>h[0]?c[0]:d[0],"y0"===n[1]?f[1]=p[1]>h[1]?d[1]:c[1]:f[1]=p[1]>h[1]?c[1]:d[1],i=r.getMarkerPosition(f,n,!0)}else{var g=[v=e.get(n[0],t),_=e.get(n[1],t)];a.clampData&&a.clampData(g,g),i=a.dataToPoint(g,!0)}if(isCoordinateSystemType(a,"cartesian2d")){var m=a.getAxis("x"),y=a.getAxis("y"),v=e.get(n[0],t),_=e.get(n[1],t);isInfinity(v)?i[0]=m.toGlobalCoord(m.getExtent()["x0"===n[0]?0:1]):isInfinity(_)&&(i[1]=y.toGlobalCoord(y.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(i[0]=l),isNaN(u)||(i[1]=u)}else i=[l,u];return i}var dimPermutations=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],MarkAreaView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=MarkerModel.getMarkerModelFromSeries(e,"markArea");if(t){var r=t.getData();r.each(function(t){var o=map$1(dimPermutations,function(o){return getSingleMarkerEndPoint(r,t,o,e,n)});r.setItemLayout(t,o),r.getItemGraphicEl(t).setShape("points",o)})}},this)},t.prototype.renderSeries=function(e,t,n,r){var o=e.coordinateSystem,i=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,{group:new Group$3});this.group.add(l.group),this.markKeep(l);var u=createList(o,e,t);t.setData(u),u.each(function(t){var n=map$1(dimPermutations,function(n){return getSingleMarkerEndPoint(u,t,n,e,r)}),i=o.getAxis("x").scale,s=o.getAxis("y").scale,l=i.getExtent(),c=s.getExtent(),d=[i.parse(u.get("x0",t)),i.parse(u.get("x1",t))],p=[s.parse(u.get("y0",t)),s.parse(u.get("y1",t))];asc$2(d),asc$2(p);var h=!!(l[0]>d[1]||l[1]<d[0]||c[0]>p[1]||c[1]<p[0]);u.setItemLayout(t,{points:n,allClipped:h});var f=u.getItemModel(t).getModel("itemStyle").getItemStyle(),g=getVisualFromData(a,"color");f.fill||(f.fill=g,isString(f.fill)&&(f.fill=modifyAlpha(f.fill,.4))),f.stroke||(f.stroke=g),u.setItemVisual(t,"style",f)}),u.diff(inner$2(l).data).add(function(e){var t=u.getItemLayout(e);if(!t.allClipped){var n=new Polygon({shape:{points:t.points}});u.setItemGraphicEl(e,n),l.group.add(n)}}).update(function(e,n){var r=inner$2(l).data.getItemGraphicEl(n),o=u.getItemLayout(e);o.allClipped?r&&l.group.remove(r):(r?updateProps$1(r,{shape:{points:o.points}},t,e):r=new Polygon({shape:{points:o.points}}),u.setItemGraphicEl(e,r),l.group.add(r))}).remove(function(e){var t=inner$2(l).data.getItemGraphicEl(e);l.group.remove(t)}).execute(),u.eachItemGraphicEl(function(e,n){var r=u.getItemModel(n),o=u.getItemVisual(n,"style");e.useStyle(u.getItemVisual(n,"style")),setLabelStyle(e,getLabelStatesModels(r),{labelFetcher:t,labelDataIndex:n,defaultText:u.getName(n)||"",inheritColor:isString(o.fill)?modifyAlpha(o.fill,1):"#000"}),setStatesStylesFromModel(e,r),toggleHoverEmphasis(e,null,null,r.get(["emphasis","disabled"])),getECData(e).dataModel=t}),inner$2(l).data=u,l.group.silent=t.get("silent")||e.get("silent")},t.type="markArea",t}(MarkerView);function createList(e,t,n){var r,o;if(e){var i=map$1(e&&e.dimensions,function(e){var n=t.getData();return extend$2(extend$2({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})});o=map$1(["x0","y0","x1","y1"],function(e,t){return{name:e,type:i[t%2].type}}),r=new SeriesData(o,n)}else r=new SeriesData(o=[{name:"value",type:"float"}],n);var a=map$1(n.get("data"),curry$1(markAreaTransform,t,e,n));e&&(a=filter(a,curry$1(markAreaFilter,e)));var s=e?function(e,t,n,r){return parseDataValue(e.coord[Math.floor(r/2)][r%2],o[r])}:function(e,t,n,r){return parseDataValue(e.value,o[r])};return r.initData(a,null,s),r.hasItemOption=!0,r}function install$e(e){e.registerComponentModel(MarkAreaModel),e.registerComponentView(MarkAreaView),e.registerPreprocessor(function(e){checkMarkerInSeries(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var getDefaultSelectorOptions=function(e,t){return"all"===t?{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}:void 0},LegendModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return __extends(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;!0===t&&(t=e.selector=["all","inverse"]),isArray$1(t)&&each$f(t,function(e,r){isString(e)&&(e={type:e}),t[r]=merge(e,getDefaultSelectorOptions(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get("name");if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(r){var o,i=r.name;if(n.push(i),r.legendVisualProvider){var a=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(a)),a.length?t=t.concat(a):o=!0}else o=!0;o&&isNameSpecified(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get("data")||t,o=createHashMap(),i=map$1(r,function(e){return(isString(e)||isNumber(e))&&(e={name:e}),o.get(e.name)?null:(o.set(e.name,!0),new Model(e,this,this.ecModel))},this);this._data=filter(i,function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;"single"===this.get("selectedMode")&&each$f(this._data,function(e){t[e.get("name")]=!1});t[e]=!0},t.prototype.unSelect=function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;each$f(e,function(e){t[e.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;each$f(e,function(e){var n=e.get("name",!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&indexOf(this._availableNames,e)>=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",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}},t}(ComponentModel),curry=curry$1,each$3=each$f,Group$1=Group$3,LegendView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return __extends(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new Group$1),this.group.add(this._selectorGroup=new Group$1),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var o=e.get("align"),i=e.get("orient");o&&"auto"!==o||(o="right"===e.get("left")&&"vertical"===i?"right":"left");var a=e.get("selector",!0),s=e.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===i?"end":"start"),this.renderInner(o,e,t,n,a,i,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),d=getLayoutRect(l,u,c),p=this.layoutInner(e,o,d,r,a,s),h=getLayoutRect(defaults$2({width:p.width,height:p.height},l),u,c);this.group.x=h.x-p.x,this.group.y=h.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=makeBackground(p,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,o,i,a){var s=this.getContentGroup(),l=createHashMap(),u=t.get("selectedMode"),c=[];n.eachRawSeries(function(e){!e.get("legendHoverLink")&&c.push(e.id)}),each$3(t.getData(),function(o,i){var a=o.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new Group$1;return d.newline=!0,void s.add(d)}var p=n.getSeriesByName(a)[0];if(!l.get(a))if(p){var h=p.getData(),f=h.getVisual("legendLineStyle")||{},g=h.getVisual("legendIcon"),m=h.getVisual("style"),y=this._createItem(p,a,i,o,t,e,f,m,g,u,r);y.on("click",curry(dispatchSelectAction,a,null,r,c)).on("mouseover",curry(dispatchHighlightAction,p.name,null,r,c)).on("mouseout",curry(dispatchDownplayAction,p.name,null,r,c)),n.ssr&&y.eachChild(function(e){var t=getECData(e);t.seriesIndex=p.seriesIndex,t.dataIndex=i,t.ssrType="legend"}),l.set(a,!0)}else n.eachRawSeries(function(s){if(!l.get(a)&&s.legendVisualProvider){var d=s.legendVisualProvider;if(!d.containName(a))return;var p=d.indexOfName(a),h=d.getItemVisual(p,"style"),f=d.getItemVisual(p,"legendIcon"),g=parse(h.fill);g&&0===g[3]&&(g[3]=.2,h=extend$2(extend$2({},h),{fill:stringify(g,"rgba")}));var m=this._createItem(s,a,i,o,t,e,{},h,f,u,r);m.on("click",curry(dispatchSelectAction,null,a,r,c)).on("mouseover",curry(dispatchHighlightAction,null,a,r,c)).on("mouseout",curry(dispatchDownplayAction,null,a,r,c)),n.ssr&&m.eachChild(function(e){var t=getECData(e);t.seriesIndex=s.seriesIndex,t.dataIndex=i,t.ssrType="legend"}),l.set(a,!0)}},this)},this),o&&this._createSelector(o,t,r,i,a)},t.prototype._createSelector=function(e,t,n,r,o){var i=this.getSelectorGroup();each$3(e,function(e){var r=e.type,o=new ZRText({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect",legendId:t.id})}});i.add(o),setLabelStyle(o,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),enableHoverEmphasis(o)})},t.prototype._createItem=function(e,t,n,r,o,i,a,s,l,u,c){var d=e.visualDrawType,p=o.get("itemWidth"),h=o.get("itemHeight"),f=o.isSelected(t),g=r.get("symbolRotate"),m=r.get("symbolKeepAspect"),y=r.get("icon"),v=getLegendStyle(l=y||l||"roundRect",r,a,s,d,f,c),_=new Group$1,x=r.getModel("textStyle");if(!isFunction(e.getLegendIcon)||y&&"inherit"!==y){var S="inherit"===y&&e.getData().getVisual("symbol")?"inherit"===g?e.getData().getVisual("symbolRotate"):g:0;_.add(getDefaultLegendIcon({itemWidth:p,itemHeight:h,icon:l,iconRotate:S,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:m}))}else _.add(e.getLegendIcon({itemWidth:p,itemHeight:h,icon:l,iconRotate:g,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:m}));var b="left"===i?p+5:-5,T=i,A=o.get("formatter"),w=t;isString(A)&&A?w=A.replace("{name}",null!=t?t:""):isFunction(A)&&(w=A(t));var C=f?x.getTextColor():r.get("inactiveColor");_.add(new ZRText({style:createTextStyle$1(x,{text:w,x:b,y:h/2,fill:C,align:T,verticalAlign:"middle"},{inheritColor:C})}));var E=new Rect$2({shape:_.getBoundingRect(),style:{fill:"transparent"}}),M=r.getModel("tooltip");return M.get("show")&&setTooltipConfig({el:E,componentModel:o,itemName:t,itemTooltipOption:M.option}),_.add(E),_.eachChild(function(e){e.silent=!0}),E.silent=!u,this.getContentGroup().add(_),enableHoverEmphasis(_),_.__legendDataIndex=n,_},t.prototype.layoutInner=function(e,t,n,r,o,i){var a=this.getContentGroup(),s=this.getSelectorGroup();box(e.get("orient"),a,e.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),o){box("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],p=e.get("selectorButtonGap",!0),h=e.getOrient().index,f=0===h?"width":"height",g=0===h?"height":"width",m=0===h?"y":"x";"end"===i?d[h]+=l[f]+p:u[h]+=c[f]+p,d[1-h]+=l[g]/2-c[g]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var y={x:0,y:0};return y[f]=l[f]+p+c[f],y[g]=Math.max(l[g],c[g]),y[m]=Math.min(0,c[m]+d[1-h]),y}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(ComponentView);function getLegendStyle(e,t,n,r,o,i,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),each$3(e,function(n,r){"inherit"===e[r]&&(e[r]=t[r])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=0===e.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?createOrUpdatePatternFromDecal(d,a):r.decal,"inherit"===u.fill&&(u.fill=r[o]),"inherit"===u.stroke&&(u.stroke=r[c]),"inherit"===u.opacity&&(u.opacity=("fill"===o?r:n).opacity),s(u,r);var p=t.getModel("lineStyle"),h=p.getLineStyle();if(s(h,n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===h.stroke&&(h.stroke=r.fill),!i){var f=t.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===f?r.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=p.get("inactiveColor"),h.lineWidth=p.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function getDefaultLegendIcon(e){var t=e.icon||"roundRect",n=createSymbol$1(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n}function dispatchSelectAction(e,t,n,r){dispatchDownplayAction(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),dispatchHighlightAction(e,t,n,r)}function isUseHoverLayer(e){for(var t,n=e.getZr().storage.getDisplayList(),r=0,o=n.length;r<o&&!(t=n[r].states.emphasis);)r++;return t&&t.hoverLayer}function dispatchHighlightAction(e,t,n,r){isUseHoverLayer(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function dispatchDownplayAction(e,t,n,r){isUseHoverLayer(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}function legendFilter(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function legendSelectActionHandler(e,t,n){var r="allSelect"===e||"inverseSelect"===e,o={},i=[];n.eachComponent({mainType:"legend",query:t},function(n){r?n[e]():n[e](t.name),makeSelectedMap(n,o),i.push(n.componentIndex)});var a={};return n.eachComponent("legend",function(e){each$f(o,function(t,n){e[t?"select":"unSelect"](n)}),makeSelectedMap(e,a)}),r?{selected:a,legendIndex:i}:{name:t.name,selected:a}}function makeSelectedMap(e,t){var n=t||{};return each$f(e.getData(),function(t){var r=t.get("name");if("\n"!==r&&""!==r){var o=e.isSelected(r);hasOwn(n,r)?n[r]=n[r]&&o:n[r]=o}}),n}function installLegendAction(e){e.registerAction("legendToggleSelect","legendselectchanged",curry$1(legendSelectActionHandler,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",curry$1(legendSelectActionHandler,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",curry$1(legendSelectActionHandler,"inverseSelect")),e.registerAction("legendSelect","legendselected",curry$1(legendSelectActionHandler,"select")),e.registerAction("legendUnSelect","legendunselected",curry$1(legendSelectActionHandler,"unSelect"))}function install$d(e){e.registerComponentModel(LegendModel),e.registerComponentView(LegendView),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,legendFilter),e.registerSubTypeDefaulter("legend",function(){return"plain"}),installLegendAction(e)}var ScrollableLegendModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var o=getLayoutParams(t);e.prototype.init.call(this,t,n,r),mergeAndNormalizeLayoutParams(this,t,o)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),mergeAndNormalizeLayoutParams(this,this.option,t)},t.type="legend.scroll",t.defaultOption=inheritDefaultOption(LegendModel.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}),t}(LegendModel);function mergeAndNormalizeLayoutParams(e,t,n){var r=[1,1];r[e.getOrient().index]=0,mergeLayoutParam(t,n,{type:"box",ignoreSize:!!r})}var Group=Group$3,WH=["width","height"],XY=["x","y"],ScrollableLegendView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return __extends(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new Group),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Group)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,o,i,a,s){var l=this;e.prototype.renderInner.call(this,t,n,r,o,i,a,s);var u=this._controllerGroup,c=n.get("pageIconSize",!0),d=isArray$1(c)?c:[c,c];h("pagePrev",0);var p=n.getModel("pageTextStyle");function h(e,t){var r=e+"DataIndex",i=createIcon(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:bind$1(l._pageGo,l,r,n,o)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});i.name=e,u.add(i)}u.add(new ZRText({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),h("pageNext",1)},t.prototype.layoutInner=function(e,t,n,r,o,i){var a=this.getSelectorGroup(),s=e.getOrient().index,l=WH[s],u=XY[s],c=WH[1-s],d=XY[1-s];o&&box("horizontal",a,e.get("selectorItemGap",!0));var p=e.get("selectorButtonGap",!0),h=a.getBoundingRect(),f=[-h.x,-h.y],g=clone$6(n);o&&(g[l]=n[l]-h[l]-p);var m=this._layoutContentAndController(e,r,g,s,l,c,d,u);if(o){if("end"===i)f[s]+=m[l]+p;else{var y=h[l]+p;f[s]-=y,m[u]-=y}m[l]+=h[l]+p,f[1-s]+=m[d]+m[c]/2-h[c]/2,m[c]=Math.max(m[c],h[c]),m[d]=Math.min(m[d],h[d]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,t,n,r,o,i,a,s){var l=this.getContentGroup(),u=this._containerGroup,c=this._controllerGroup;box(e.get("orient"),l,e.get("itemGap"),r?n.width:null,r?null:n.height),box("horizontal",c,e.get("pageButtonItemGap",!0));var d=l.getBoundingRect(),p=c.getBoundingRect(),h=this._showController=d[o]>n[o],f=[-d.x,-d.y];t||(f[r]=l[s]);var g=[0,0],m=[-p.x,-p.y],y=retrieve2(e.get("pageButtonGap",!0),e.get("itemGap",!0));h&&("end"===e.get("pageButtonPosition",!0)?m[r]+=n[o]-p[o]:g[r]+=p[o]+y);m[1-r]+=d[i]/2-p[i]/2,l.setPosition(f),u.setPosition(g),c.setPosition(m);var v={x:0,y:0};if(v[o]=h?n[o]:d[o],v[i]=Math.max(d[i],p[i]),v[a]=Math.min(0,p[a]+m[1-r]),u.__rectSize=n[o],h){var _={x:0,y:0};_[o]=Math.max(n[o]-p[o]-y,0),_[i]=v[i],u.setClipPath(new Rect$2({shape:_})),u.__rectSize=_[o]}else c.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(e);return null!=x.pageIndex&&updateProps$1(l,{x:x.contentPosition[0],y:x.contentPosition[1]},h?e:null),this._updatePageInfoView(e,x),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;each$f(["pagePrev","pageNext"],function(r){var o=null!=t[r+"DataIndex"],i=n.childOfName(r);i&&(i.setStyle("fill",o?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),i.cursor=o?"pointer":"default")});var r=n.childOfName("pageText"),o=e.get("pageFormatter"),i=t.pageIndex,a=null!=i?i+1:0,s=t.pageCount;r&&o&&r.setStyle("text",isString(o)?o.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):o({current:a,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,o=e.getOrient().index,i=WH[o],a=XY[o],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,d=c?1:0,p={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return p;var h=v(u);p.contentPosition[o]=-h.s;for(var f=s+1,g=h,m=h,y=null;f<=c;++f)(!(y=v(l[f]))&&m.e>g.s+r||y&&!_(y,g.s))&&(g=m.i>g.i?m:y)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=g.i),++p.pageCount),m=y;for(f=s-1,g=h,m=h,y=null;f>=-1;--f)(y=v(l[f]))&&_(m,y.s)||!(g.i<m.i)||(m=g,null==p.pagePrevDataIndex&&(p.pagePrevDataIndex=g.i),++p.pageCount,++p.pageIndex),g=y;return p;function v(e){if(e){var t=e.getBoundingRect(),n=t[a]+e[a];return{s:n,e:n+t[i],i:e.__legendDataIndex}}}function _(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild(function(r,o){var i=r.__legendDataIndex;null==n&&null!=i&&(n=o),i===e&&(t=o)}),null!=t?t:n):0;var t,n},t.type="legend.scroll",t}(LegendView);function installScrollableLegendAction(e){e.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(e){e.setScrollDataIndex(n)})})}function install$c(e){use(install$d),e.registerComponentModel(ScrollableLegendModel),e.registerComponentView(ScrollableLegendView),installScrollableLegendAction(e)}function install$b(e){use(install$d),use(install$c)}var InsideZoomModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.type="dataZoom.inside",t.defaultOption=inheritDefaultOption(DataZoomModel.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(DataZoomModel),inner$1=makeInner();function setViewInfoToCoordSysRecord(e,t,n){inner$1(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function disposeCoordSysRecordIfNeeded(e,t){for(var n=inner$1(e).coordSysRecordMap,r=n.keys(),o=0;o<r.length;o++){var i=r[o],a=n.get(i),s=a.dataZoomInfoMap;if(s){var l=t.uid;s.get(l)&&(s.removeKey(l),s.keys().length||disposeCoordSysRecord(n,a))}}}function disposeCoordSysRecord(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function createCoordSysRecord(e,t){var n={model:t,containsPoint:curry$1(containsPoint,t),dispatchAction:curry$1(dispatchAction,e),dataZoomInfoMap:null,controller:null},r=n.controller=new RoamController(e.getZr());return each$f(["pan","zoom","scrollMove"],function(e){r.on(e,function(t){var r=[];n.dataZoomInfoMap.each(function(o){if(t.isAvailableBehavior(o.model.option)){var i=(o.getRange||{})[e],a=i&&i(o.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!o.model.get("disabled",!0)&&a&&r.push({dataZoomId:o.model.id,start:a[0],end:a[1]})}}),r.length&&n.dispatchAction(r)})}),n}function dispatchAction(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function containsPoint(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function mergeControllerParams(e){var t,n="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return e.each(function(e){var i=e.model,a=!i.get("disabled",!0)&&(!i.get("zoomLock",!0)||"move");r[n+a]>r[n+t]&&(t=a),o=o&&i.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o}}}function installDataZoomRoamProcessor(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=inner$1(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=createHashMap());r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(e){each$f(collectReferCoordSysModelInfo(e).infoList,function(n){var o=n.model.uid,i=r.get(o)||r.set(o,createCoordSysRecord(t,n.model));(i.dataZoomInfoMap||(i.dataZoomInfoMap=createHashMap())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var t,n=e.controller,o=e.dataZoomInfoMap;if(o){var i=o.keys()[0];null!=i&&(t=o.get(i))}if(t){var a=mergeControllerParams(o);n.enable(a.controlType,a.opt),n.setPointerChecker(e.containsPoint),createOrUpdate(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else disposeCoordSysRecord(r,e)})})}var InsideZoomView=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return __extends(t,e),t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),setViewInfoToCoordSysRecord(r,t,{pan:bind$1(getRangeHandlers.pan,this),zoom:bind$1(getRangeHandlers.zoom,this),scrollMove:bind$1(getRangeHandlers.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){disposeCoordSysRecordIfNeeded(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(DataZoomView),getRangeHandlers={zoom:function(e,t,n,r){var o=this.range,i=o.slice(),a=e.axisModels[0];if(a){var s=getDirectionInfo[t](null,[r.originX,r.originY],a,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/r.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return sliderMove(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,o[0]!==i[0]||o[1]!==i[1]?i:void 0}},pan:makeMover(function(e,t,n,r,o,i){var a=getDirectionInfo[r]([i.oldX,i.oldY],[i.newX,i.newY],t,o,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength}),scrollMove:makeMover(function(e,t,n,r,o,i){return getDirectionInfo[r]([0,0],[i.scrollDelta,i.scrollDelta],t,o,n).signal*(e[1]-e[0])*i.scrollDelta})};function makeMover(e){return function(t,n,r,o){var i=this.range,a=i.slice(),s=t.axisModels[0];if(s)return sliderMove(e(a,s,t,n,r,o),a,[0,100],"all"),this.range=a,i[0]!==a[0]||i[1]!==a[1]?a:void 0}}var getDirectionInfo={grid:function(e,t,n,r,o){var i=n.axis,a={},s=o.model.coordinateSystem.getRect();return e=e||[0,0],"x"===i.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=i.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=i.inverse?-1:1),a},polar:function(e,t,n,r,o){var i=n.axis,a={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=i.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=i.inverse?-1:1),a},singleAxis:function(e,t,n,r,o){var i=n.axis,a=o.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===i.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=i.inverse?-1:1),s}};function install$a(e){installCommon$1(e),e.registerComponentModel(InsideZoomModel),e.registerComponentView(InsideZoomView),installDataZoomRoamProcessor(e)}var SliderZoomModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=inheritDefaultOption(DataZoomModel.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(DataZoomModel),Rect=Rect$2,DEFAULT_LOCATION_EDGE_GAP=7,DEFAULT_FRAME_BORDER_WIDTH=1,DEFAULT_FILLER_SIZE=30,DEFAULT_MOVE_HANDLE_SIZE=7,HORIZONTAL="horizontal",VERTICAL="vertical",LABEL_GAP=5,SHOW_DATA_SHADOW_SERIES_TYPE=["line","bar","candlestick","scatter"],REALTIME_ANIMATION_CONFIG={easing:"cubicOut",duration:100,delay:0},SliderZoomView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return __extends(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=bind$1(this._onBrush,this),this._onBrushEnd=bind$1(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,o){if(e.prototype.render.apply(this,arguments),createOrUpdate(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();o&&"dataZoom"===o.type&&o.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){clear$1(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new Group$3;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect")?DEFAULT_MOVE_HANDLE_SIZE:0,r=this._findCoordRect(),o={width:t.getWidth(),height:t.getHeight()},i=this._orient===HORIZONTAL?{right:o.width-r.x-r.width,top:o.height-DEFAULT_FILLER_SIZE-DEFAULT_LOCATION_EDGE_GAP-n,width:r.width,height:DEFAULT_FILLER_SIZE}:{right:DEFAULT_LOCATION_EDGE_GAP,top:r.y,width:DEFAULT_FILLER_SIZE,height:r.height},a=getLayoutParams(e.option);each$f(["right","top","width","height"],function(e){"ph"===a[e]&&(a[e]=i[e])});var s=getLayoutRect(a,o);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===VERTICAL&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),o=r&&r.get("inverse"),i=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;i.attr(n!==HORIZONTAL||o?n===HORIZONTAL&&o?{scaleY:a?1:-1,scaleX:-1}:n!==VERTICAL||o?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=e.getBoundingRect([i]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get("brushSelect");n.add(new Rect({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new Rect({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:bind$1(this._onClickPanel,this)}),i=this.api.getZr();r?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",i.on("mousemove",this._onBrush),i.on("mouseup",this._onBrushEnd)):(i.off("mousemove",this._onBrush),i.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],r=e.series,o=r.getRawData(),i=r.getShadowDim&&r.getShadowDim(),a=i&&o.getDimensionInfo(i)?r.getShadowDim():e.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(o!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var u=o.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var d,p=[0,t[1]],h=[0,t[0]],f=[[t[0],0],[0,0]],g=[],m=h[1]/(o.count()-1),y=0,v=Math.round(o.count()/t[0]);o.each([a],function(e,t){if(v>0&&t%v)y+=m;else{var n=null==e||isNaN(e)||""===e,r=n?0:linearMap$2(e,u,p,!0);n&&!d&&t?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&d&&(f.push([y,0]),g.push([y,0])),f.push([y,r]),g.push([y,r]),y+=m,d=n}}),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var _=this.dataZoomModel,x=0;x<3;x++){var S=b(1===x);this._displayables.sliderGroup.add(S),this._displayables.dataShadowSegs.push(S)}}}function b(e){var t=_.getModel(e?"selectedDataBackground":"dataBackground"),n=new Group$3,r=new Polygon({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),o=new Polyline$1({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(o),n}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,r=this.ecModel;return e.eachTargetAxis(function(o,i){each$f(e.getAxisProxy(o,i).getTargetSeriesModels(),function(e){if(!(n||!0!==t&&indexOf(SHOW_DATA_SHADOW_SERIES_TYPE,e.get("type"))<0)){var a,s=r.getComponent(getAxisMainType(o),i).axis,l=getOtherDim(o),u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:o,otherDim:l,otherAxisInverse:a}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],o=this._displayables.sliderGroup,i=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=t.filler=new Rect({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new Rect({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:i[0],height:i[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:DEFAULT_FRAME_BORDER_WIDTH,fill:"rgba(0,0,0,0)"}})),each$f([0,1],function(t){var i=a.get("handleIcon");!symbolBuildProxies[i]&&i.indexOf("path://")<0&&i.indexOf("image://")<0&&(i="path://"+i);var s=createSymbol$1(i,-1,0,2,2,null,!0);s.attr({cursor:getCursor$1(this._orient),draggable:!0,drift:bind$1(this._onDragMove,this,t),ondragend:bind$1(this._onDragEnd,this),onmouseover:bind$1(this._showDataInfo,this,!0),onmouseout:bind$1(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=parsePercent(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),enableHoverEmphasis(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),o.add(n[t]=s);var d=a.getModel("textStyle"),p=(a.get("handleLabel")||{}).show||!1;e.add(r[t]=new ZRText({silent:!0,invisible:!p,style:createTextStyle$1(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);var d=c;if(u){var p=parsePercent(a.get("moveHandleSize"),i[1]),h=t.moveHandle=new Rect$2({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:i[1]-.5,height:p}}),f=.8*p,g=t.moveHandleIcon=createSymbol$1(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=i[1]+p/2-.5,h.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(i[1]/2,Math.max(p,10));(d=t.moveZone=new Rect$2({invisible:!0,shape:{y:i[1]-m,height:p+m}})).on("mouseover",function(){s.enterEmphasis(h)}).on("mouseout",function(){s.leaveEmphasis(h)}),o.add(h),o.add(g),o.add(d)}d.attr({draggable:!0,cursor:getCursor$1(this._orient),drift:bind$1(this._onDragMove,this,"all"),ondragstart:bind$1(this._showDataInfo,this,!0),ondragend:bind$1(this._onDragEnd,this),onmouseover:bind$1(this._showDataInfo,this,!0),onmouseout:bind$1(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[linearMap$2(e[0],[0,100],t,!0),linearMap$2(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,o=this._getViewExtent(),i=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];sliderMove(t,r,o,n.get("zoomLock")?"all":e,null!=i.minSpan?linearMap$2(i.minSpan,a,o,!0):null,null!=i.maxSpan?linearMap$2(i.maxSpan,a,o,!0):null);var s=this._range,l=this._range=asc$2([linearMap$2(r[0],o,a,!0),linearMap$2(r[1],o,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=asc$2(n.slice()),o=this._size;each$f([0,1],function(e){var r=t.handles[e],i=this._handleHeight;r.attr({scaleX:i/2,scaleY:i/2,x:n[e]+(e?-1:1),y:o[1]/2-i/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:o[1]});var i={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(i),t.moveZone.setShape(i),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",i.x+i.width/2));for(var a=t.dataShadowSegs,s=[0,r[0],r[1],o[0]],l=0;l<a.length;l++){var u=a[l],c=u.getClipPath();c||(c=new Rect$2,u.setClipPath(c)),c.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:o[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,o=this._orient,i=["",""];if(t.get("showDetail")){var a=t.findRepresentativeAxisProxy();if(a){var s=a.getAxisModel().axis,l=this._range,u=e?a.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:a.getDataValueWindow();i=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var c=asc$2(this._handleEnds.slice());function d(e){var t=getTransform$1(n.handles[e].parent,this.group),a=transformDirection(0===e?"right":"left",t),s=this._handleWidth/2+LABEL_GAP,l=applyTransform([c[e]+(0===e?-s:s),this._size[1]/2],t);r[e].setStyle({x:l[0],y:l[1],verticalAlign:o===HORIZONTAL?"middle":a,align:o===HORIZONTAL?a:"center",text:i[e]})}d.call(this,0),d.call(this,1)},t.prototype._formatLabel=function(e,t){var n=this.dataZoomModel,r=n.get("labelFormatter"),o=n.get("labelPrecision");null!=o&&"auto"!==o||(o=t.getPixelPrecision());var i=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(o,20));return isFunction(r)?r(e,i):isString(r)?r.replace("{value}",i):i},t.prototype._showDataInfo=function(e){var t=(this.dataZoomModel.get("handleLabel")||{}).show||!1,n=this.dataZoomModel.getModel(["emphasis","handleLabel"]).get("show")||!1,r=e||this._dragging?n:t,o=this._displayables,i=o.handleLabels;i[0].attr("invisible",!r),i[1].attr("invisible",!r),o.moveHandle&&this.api[r?"enterEmphasis":"leaveEmphasis"](o.moveHandle,1)},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,stop(r.event);var o=applyTransform([t,n],this._displayables.sliderGroup.getLocalTransform(),!0),i=this._updateInterval(e,o[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),i&&a&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,o=(r[0]+r[1])/2,i=this._updateInterval("all",n[0]-o);this._updateView(),i&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new Point(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),o=[0,100];this._range=asc$2([linearMap$2(n.x,r,o,!0),linearMap$2(n.x+n.width,r,o,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(stop(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new Rect({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var i=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(i.x,i.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),o.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?REALTIME_ANIMATION_CONFIG:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=collectReferCoordSysModelInfo(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),o=this.api.getHeight();e={x:.2*r,y:.2*o,width:.6*r,height:.6*o}}return e},t.type="dataZoom.slider",t}(DataZoomView);function getOtherDim(e){return{x:"y",y:"x",radius:"angle",angle:"radius"}[e]}function getCursor$1(e){return"vertical"===e?"ns-resize":"ew-resize"}function install$9(e){e.registerComponentModel(SliderZoomModel),e.registerComponentView(SliderZoomView),installCommon$1(e)}function install$8(e){use(install$a),use(install$9)}var visualDefault={get:function(e,t,n){var r=clone$6((defaultOption[e]||{})[t]);return n&&isArray$1(r)?r[r.length-1]:r}},defaultOption={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]}},mapVisual=VisualMapping.mapVisual,eachVisual=VisualMapping.eachVisual,isArray=isArray$1,each$2=each$f,asc=asc$2,linearMap$1=linearMap$2,VisualMapModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return __extends(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&replaceVisualOption(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=bind$1(e,this),this.controllerVisuals=createVisualMappings(this.option.controller,t,e),this.targetVisuals=createVisualMappings(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries(function(e,n){t.push(n)}):t=normalizeToArray(e),t},t.prototype.eachTargetSeries=function(e,t){each$f(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r,o=this.option,i=o.precision,a=this.dataBound,s=o.formatter;n=n||["<",">"],isArray$1(e)&&(e=e.slice(),r=!0);var l=t?e:r?[u(e[0]),u(e[1])]:u(e);return isString(s)?s.replace("{value}",r?l[0]:l).replace("{value2}",r?l[1]:l):isFunction(s)?r?s(e[0],e[1]):s(e):r?e[0]===a[0]?n[0]+" "+l[1]:e[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(e){return e===a[0]?"min":e===a[1]?"max":(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=asc([e.min,e.max]);this._dataExtent=t},t.prototype.getDataDimensionIndex=function(e){var t=this.option.dimension;if(null!=t)return e.getDimensionIndex(t);for(var n=e.dimensions,r=n.length-1;r>=0;r--){var o=n[r],i=e.getDimensionInfo(o);if(!i.isCalculationCoord)return i.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||(t.target={}),o=t.controller||(t.controller={});merge(r,n),merge(o,n);var i=this.isCategory();function a(n){isArray(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")}}a.call(this,r),a.call(this,o),function(e,t,n){var r=e[t],o=e[n];r&&!o&&(o=e[n]={},each$2(r,function(e,t){if(VisualMapping.isValidType(t)){var n=visualDefault.get(t,"inactive",i);null!=n&&(o[t]=n,"color"!==t||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,r,"inRange","outOfRange"),function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get("inactiveColor"),o=this.getItemSymbol()||"roundRect";each$2(this.stateList,function(a){var s=this.itemSize,l=e[a];l||(l=e[a]={color:i?r:[r]}),null==l.symbol&&(l.symbol=t&&clone$6(t)||(i?o:[o])),null==l.symbolSize&&(l.symbolSize=n&&clone$6(n)||(i?s[0]:[s[0],s[0]])),l.symbol=mapVisual(l.symbol,function(e){return"none"===e?o:e});var u=l.symbolSize;if(null!=u){var c=-1/0;eachVisual(u,function(e){e>c&&(c=e)}),l.symbolSize=mapVisual(u,function(e){return linearMap$1(e,[0,c],[0,s[0]],!0)})}},this)}.call(this,o)},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,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"}},t}(ComponentModel),DEFAULT_BAR_BOUND=[20,140],ContinuousModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(null==t[0]||isNaN(t[0]))&&(t[0]=DEFAULT_BAR_BOUND[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=DEFAULT_BAR_BOUND[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):isArray$1(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),each$f(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=asc$2((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},t.prototype.getValueState=function(e){var t=this.option.range,n=this.getExtent();return(t[0]<=n[0]||t[0]<=e)&&(t[1]>=n[1]||e<=t[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=getColorStopValues(this,"outOfRange",this.getExtent()),n=getColorStopValues(this,"inRange",this.option.range.slice()),r=[];function o(t,n){r.push({value:t,color:e(t,n)})}for(var i=0,a=0,s=n.length,l=t.length;a<l&&(!n.length||t[a]<=n[0]);a++)t[a]<n[i]&&o(t[a],"outOfRange");for(var u=1;i<s;i++,u=0)u&&r.length&&o(n[i],"outOfRange"),o(n[i],"inRange");for(u=1;a<l;a++)(!n.length||n[n.length-1]<t[a])&&(u&&(r.length&&o(r[r.length-1].value,"outOfRange"),u=0),o(t[a],"outOfRange"));var c=r.length;return{stops:r,outerColors:[c?r[0].color:"transparent",c?r[c-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=inheritDefaultOption(VisualMapModel.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)"}}),t}(VisualMapModel);function getColorStopValues(e,t,n){if(n[0]===n[1])return n.slice();for(var r=(n[1]-n[0])/200,o=n[0],i=[],a=0;a<=200&&o<n[1];a++)i.push(o),o+=r;return i.push(n[1]),i}var VisualMapView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return __extends(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,r){this.visualMapModel=e,!1!==e.get("show")?this.doRender(e,t,n,r):this.group.removeAll()},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=normalizeCssArray(t.get("padding")||0),r=e.getBoundingRect();e.add(new Rect$2({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.height+n[0]+n[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,t,n){var r=(n=n||{}).forceState,o=this.visualMapModel,i={};if("color"===t){var a=o.get("contentColor");i.color=a}function s(e){return i[e]}function l(e,t){i[e]=t}var u=o.controllerVisuals[r||o.getValueState(e)];return each$f(VisualMapping.prepareVisualTypes(u),function(r){var o=u[r];n.convertOpacityToAlpha&&"opacity"===r&&(r="colorAlpha",o=u.__alphaForOpacity),VisualMapping.dependsOn(r,t)&&o&&o.applyVisual(e,s,l)}),i[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api;positionElement(e,t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},t.prototype.doRender=function(e,t,n,r){},t.type="visualMap",t}(ComponentView),paramsSet=[["left","right","width"],["top","bottom","height"]];function getItemAlign(e,t,n){var r=e.option,o=r.align;if(null!=o&&"auto"!==o)return o;for(var i={width:t.getWidth(),height:t.getHeight()},a="horizontal"===r.orient?1:0,s=paramsSet[a],l=[0,null,10],u={},c=0;c<3;c++)u[paramsSet[1-a][c]]=l[c],u[s[c]]=2===c?n[0]:r[s[c]];var d=[["x","width",3],["y","height",0]][a],p=getLayoutRect(u,i,r.padding);return s[(p.margin[d[2]]||0)+p[d[0]]+.5*p[d[1]]<.5*i[d[1]]?0:1]}function makeHighDownBatch(e,t){return each$f(e||[],function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),e}var linearMap=linearMap$2,each$1=each$f,mathMin=Math.min,mathMax=Math.max,HOVER_LINK_SIZE=12,HOVER_LINK_OUT=6,ContinuousView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._shapes={},n._dataInterval=[],n._handleEnds=[],n._hoverLinkDataIndices=[],n}return __extends(t,e),t.prototype.init=function(t,n){e.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=bind$1(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=bind$1(this._hideIndicator,this)},t.prototype.doRender=function(e,t,n,r){r&&"selectDataRange"===r.type&&r.from===this.uid||this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var n=e.get("text");this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},t.prototype._renderEndsText=function(e,t,n){if(t){var r=t[1-n];r=null!=r?r+"":"";var o=this.visualMapModel,i=o.get("textGap"),a=o.itemSize,s=this._shapes.mainGroup,l=this._applyTransform([a[0]/2,0===n?-i:a[1]+i],s),u=this._applyTransform(0===n?"bottom":"top",s),c=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new ZRText({style:createTextStyle$1(d,{x:l[0],y:l[1],verticalAlign:"horizontal"===c?"middle":u,align:"horizontal"===c?u:"center",text:r})}))}},t.prototype._renderBar=function(e){var t=this.visualMapModel,n=this._shapes,r=t.itemSize,o=this._orient,i=this._useHandle,a=getItemAlign(t,this.api,r),s=n.mainGroup=this._createBarGroup(a),l=new Group$3;s.add(l),l.add(n.outOfRange=createPolygon()),l.add(n.inRange=createPolygon(null,i?getCursor(this._orient):null,bind$1(this._dragHandle,this,"all",!1),bind$1(this._dragHandle,this,"all",!0))),l.setClipPath(new Rect$2({shape:{x:0,y:0,width:r[0],height:r[1],r:3}}));var u=t.textStyleModel.getTextRect("国"),c=mathMax(u.width,u.height);i&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(t,s,0,r,c,o),this._createHandle(t,s,1,r,c,o)),this._createIndicator(t,s,r,c,o),e.add(s)},t.prototype._createHandle=function(e,t,n,r,o,i){var a=bind$1(this._dragHandle,this,n,!1),s=bind$1(this._dragHandle,this,n,!0),l=parsePercent$1(e.get("handleSize"),r[0]),u=createSymbol$1(e.get("handleIcon"),-l/2,-l/2,l,l,null,!0),c=getCursor(this._orient);u.attr({cursor:c,draggable:!0,drift:a,ondragend:s,onmousemove:function(e){stop(e.event)}}),u.x=r[0]/2,u.useStyle(e.getModel("handleStyle").getItemStyle()),u.setStyle({strokeNoScale:!0,strokeFirst:!0}),u.style.lineWidth*=2,u.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),setAsHighDownDispatcher(u,!0),t.add(u);var d=this.visualMapModel.textStyleModel,p=new ZRText({cursor:c,draggable:!0,drift:a,onmousemove:function(e){stop(e.event)},ondragend:s,style:createTextStyle$1(d,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var h=[l,0],f=this._shapes;f.handleThumbs[n]=u,f.handleLabelPoints[n]=h,f.handleLabels[n]=p},t.prototype._createIndicator=function(e,t,n,r,o){var i=parsePercent$1(e.get("indicatorSize"),n[0]),a=createSymbol$1(e.get("indicatorIcon"),-i/2,-i/2,i,i,null,!0);a.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var s=e.getModel("indicatorStyle").getItemStyle();if(a instanceof ZRImage){var l=a.style;a.useStyle(extend$2({image:l.image,x:l.x,y:l.y,width:l.width,height:l.height},s))}else a.useStyle(s);t.add(a);var u=this.visualMapModel.textStyleModel,c=new ZRText({silent:!0,invisible:!0,style:createTextStyle$1(u,{x:0,y:0,text:""})});this.group.add(c);var d=[("horizontal"===o?r/2:HOVER_LINK_OUT)+n[0]/2,0],p=this._shapes;p.indicator=a,p.indicatorLabel=c,p.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,t,n,r){if(this._useHandle){if(this._dragging=!t,!t){var o=this._applyTransform([n,r],this._shapes.mainGroup,!0);this._updateInterval(e,o[1]),this._hideIndicator(),this._updateView()}t===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():useHoverLinkOnHandle(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),r=[0,e.itemSize[1]];this._handleEnds=[linearMap(t[0],n,r,!0),linearMap(t[1],n,r,!0)]},t.prototype._updateInterval=function(e,t){t=t||0;var n=this.visualMapModel,r=this._handleEnds,o=[0,n.itemSize[1]];sliderMove(t,r,o,e,0);var i=n.getExtent();this._dataInterval=[linearMap(r[0],o,i,!0),linearMap(r[1],o,i,!0)]},t.prototype._updateView=function(e){var t=this.visualMapModel,n=t.getExtent(),r=this._shapes,o=[0,t.itemSize[1]],i=e?o:this._handleEnds,a=this._createBarVisual(this._dataInterval,n,i,"inRange"),s=this._createBarVisual(n,n,o,"outOfRange");r.inRange.setStyle({fill:a.barColor}).setShape("points",a.barPoints),r.outOfRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),this._updateHandle(i,a)},t.prototype._createBarVisual=function(e,t,n,r){var o={forceState:r,convertOpacityToAlpha:!0},i=this._makeColorGradient(e,o),a=[this.getControllerVisual(e[0],"symbolSize",o),this.getControllerVisual(e[1],"symbolSize",o)],s=this._createBarPoints(n,a);return{barColor:new LinearGradient(0,0,0,1,i),barPoints:s,handlesColor:[i[0].color,i[i.length-1].color]}},t.prototype._makeColorGradient=function(e,t){var n=[],r=(e[1]-e[0])/100;n.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var o=1;o<100;o++){var i=e[0]+r*o;if(i>e[1])break;n.push({color:this.getControllerVisual(i,"color",t),offset:o/100})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get("inverse");return new Group$3("horizontal"!==t||n?"horizontal"===t&&n?{scaleX:"bottom"===e?-1:1,rotation:-Math.PI/2}:"vertical"!==t||n?{scaleX:"left"===e?1:-1}:{scaleX:"left"===e?1:-1,scaleY:-1}:{scaleX:"bottom"===e?1:-1,rotation:Math.PI/2})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,o=n.handleThumbs,i=n.handleLabels,a=r.itemSize,s=r.getExtent(),l=this._applyTransform("left",n.mainGroup);each$1([0,1],function(u){var c=o[u];c.setStyle("fill",t.handlesColor[u]),c.y=e[u];var d=linearMap(e[u],[0,a[1]],s,!0),p=this.getControllerVisual(d,"symbolSize");c.scaleX=c.scaleY=p/a[0],c.x=a[0]-p/2;var h=applyTransform(n.handleLabelPoints[u],getTransform$1(c,this.group));if("horizontal"===this._orient){var f="left"===l||"top"===l?(a[0]-p)/2:(a[0]-p)/-2;h[1]+=f}i[u].setStyle({x:h[0],y:h[1],text:r.formatValueText(this._dataInterval[u]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,t,n,r){var o=this.visualMapModel,i=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,"symbolSize"),p=linearMap(e,i,s,!0),h=a[0]-d/2,f={x:u.x,y:u.y};u.y=p,u.x=h;var g=applyTransform(l.indicatorLabelPoint,getTransform$1(u,this.group)),m=l.indicatorLabel;m.attr("invisible",!1);var y=this._applyTransform("left",l.mainGroup),v="horizontal"===this._orient;m.setStyle({text:(n||"")+o.formatValueText(t),verticalAlign:v?y:"middle",align:v?"center":y});var _={x:h,y:p,style:{fill:c}},x={style:{x:g[0],y:g[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var S={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(_,S),m.animateTo(x,S)}else u.attr(_),m.attr(x);this._firstShowIndicator=!1;var b=this._shapes.handleLabels;if(b)for(var T=0;T<b.length;T++)this.api.enterBlur(b[T])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,r=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);r[1]=mathMin(mathMax(0,r[1]),n[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=n[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,t){var n=this.visualMapModel,r=n.itemSize;if(n.option.hoverLink){var o=[0,r[1]],i=n.getExtent();e=mathMin(mathMax(o[0],e),o[1]);var a=getHalfHoverLinkSize(n,i,o),s=[e-a,e+a],l=linearMap(e,o,i,!0),u=[linearMap(s[0],o,i,!0),linearMap(s[1],o,i,!0)];s[0]<o[0]&&(u[0]=-1/0),s[1]>o[1]&&(u[1]=1/0),t&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var c=this._hoverLinkDataIndices,d=[];(t||useHoverLinkOnHandle(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var p=compressBatches(c,d);this._dispatchHighDown("downplay",makeHighDownBatch(p[0],n)),this._dispatchHighDown("highlight",makeHighDownBatch(p[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(findEventDispatcher(e.target,function(e){var n=getECData(e);if(null!=n.dataIndex)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var o=n.getData(t.dataType),i=o.getStore().get(r.getDataDimensionIndex(o),t.dataIndex);isNaN(i)||this._showIndicator(i,i)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n<t.length;n++)this.api.leaveBlur(t[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",makeHighDownBatch(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,t,n,r){var o=getTransform$1(t,r?null:this.group);return isArray$1(e)?applyTransform(e,o,n):transformDirection(e,o,n)},t.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(VisualMapView);function createPolygon(e,t,n,r){return new Polygon({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){stop(e.event)},ondragend:r})}function getHalfHoverLinkSize(e,t,n){var r=HOVER_LINK_SIZE/2,o=e.get("hoverLinkDataSize");return o&&(r=linearMap(o,t,n,!0)/2),r}function useHoverLinkOnHandle(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function getCursor(e){return"vertical"===e?"ns-resize":"ew-resize"}var visualMapActionInfo={type:"selectDataRange",event:"dataRangeSelected",update:"update"},visualMapActionHander=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})},visualMapEncodingHandlers=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent("visualMap",function(t){var r=e.pipelineContext;!t.isTargetSeries(e)||r&&r.large||n.push(incrementalApplyVisual(t.stateList,t.targetVisuals,bind$1(t.getValueState,t),t.getDataDimensionIndex(e.getData())))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),r=[];t.eachComponent("visualMap",function(t){if(t.isTargetSeries(e)){var o=t.getVisualMeta(bind$1(getColorVisual,null,e,t))||{stops:[],outerColors:[]},i=t.getDataDimensionIndex(n);i>=0&&(o.dimension=i,r.push(o))}}),e.getData().setVisual("visualMeta",r)}}];function getColorVisual(e,t,n,r){for(var o=t.targetVisuals[r],i=VisualMapping.prepareVisualTypes(o),a={color:getVisualFromData(e.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],c=o["opacity"===u?"__alphaForOpacity":u];c&&c.applyVisual(n,d,p)}return a.color;function d(e){return a[e]}function p(e,t){a[e]=t}}var each=each$f;function visualMapPreprocessor(e){var t=e&&e.visualMap;isArray$1(t)||(t=t?[t]:[]),each(t,function(e){if(e){has(e,"splitList")&&!has(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&isArray$1(t)&&each(t,function(e){isObject$3(e)&&(has(e,"start")&&!has(e,"min")&&(e.min=e.start),has(e,"end")&&!has(e,"max")&&(e.max=e.end))})}})}function has(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var installed=!1;function installCommon(e){installed||(installed=!0,e.registerSubTypeDefaulter("visualMap",function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"}),e.registerAction(visualMapActionInfo,visualMapActionHander),each$f(visualMapEncodingHandlers,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(visualMapPreprocessor))}function install$7(e){e.registerComponentModel(ContinuousModel),e.registerComponentView(ContinuousView),installCommon(e)}var PiecewiseModel=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return __extends(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],resetMethods[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var o=this.option.categories;this.resetVisual(function(e,t){"categories"===r?(e.mappingMethod="category",e.categories=clone$6(o)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=map$1(this._pieceList,function(e){return e=clone$6(e),"inRange"!==t&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=VisualMapping.listVisualTypes(),o=this.isCategory();function i(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}each$f(t.pieces,function(e){each$f(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),each$f(n,function(e,n){var r=!1;each$f(this.stateList,function(e){r=r||i(t,e,n)||i(t.target,e,n)},this),!r&&each$f(this.stateList,function(e){(t[e]||(t[e]={}))[n]=visualDefault.get(n,"inRange"===e?"active":"inactive",o)})},this),e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,o=(t?n:e).selected||{};if(n.selected=o,each$f(r,function(e,t){var n=this.getSelectedMapKey(e);o.hasOwnProperty(n)||(o[n]=!0)},this),"single"===n.selectedMode){var i=!1;each$f(r,function(e,t){var n=this.getSelectedMapKey(e);o[n]&&(i?o[n]=!1:i=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return"categories"===this._mode?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=clone$6(e)},t.prototype.getValueState=function(e){var t=VisualMapping.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var o=[],i=r.getData();i.each(this.getDataDimensionIndex(i),function(t,r){VisualMapping.findPieceIndex(t,n)===e&&o.push(r)},this),t.push({seriesId:r.id,dataIndex:o})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(!this.isCategory()){var t=[],n=["",""],r=this,o=this._pieceList.slice();if(o.length){var i=o[0].interval[0];i!==-1/0&&o.unshift({interval:[-1/0,i]}),(i=o[o.length-1].interval[1])!==1/0&&o.push({interval:[i,1/0]})}else o.push({interval:[-1/0,1/0]});var a=-1/0;return each$f(o,function(e){var t=e.interval;t&&(t[0]>a&&s([a,t[0]],"outOfRange"),s(t.slice()),a=t[1])},this),{stops:t,outerColors:n}}function s(o,i){var a=r.getRepresentValue({interval:o});i||(i=r.getValueState(a));var s=e(a,i);o[0]===-1/0?n[0]=s:o[1]===1/0?n[1]=s:t.push({value:o[0],color:s},{value:o[1],color:s})}},t.type="visualMap.piecewise",t.defaultOption=inheritDefaultOption(VisualMapModel.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(VisualMapModel),resetMethods={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var i=(r[1]-r[0])/o;+i.toFixed(n)!==i&&n<5;)n++;t.precision=n,i=+i.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var a=0,s=r[0];a<o;s+=i,a++){var l=a===o-1?r[1]:s+i;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),reformIntervals(e),each$f(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;each$f(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),normalizeReverse(t,e)},pieces:function(e){var t=this.option;each$f(t.pieces,function(t,n){isObject$3(t)||(t={value:t});var r={text:"",index:n};if(null!=t.label&&(r.text=t.label),t.hasOwnProperty("value")){var o=r.value=t.value;r.interval=[o,o],r.close=[1,1]}else{for(var i=r.interval=[],a=r.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],c=0;c<2;c++){for(var d=[["gte","gt","min"],["lte","lt","max"]][c],p=0;p<3&&null==i[c];p++)i[c]=t[d[p]],a[c]=s[p],u[c]=2===p;null==i[c]&&(i[c]=l[c])}u[0]&&i[1]===1/0&&(a[0]=0),u[1]&&i[0]===-1/0&&(a[1]=0),i[0]===i[1]&&a[0]&&a[1]&&(r.value=i[0])}r.visual=VisualMapping.retrieveVisuals(t),e.push(r)},this),normalizeReverse(t,e),reformIntervals(e),each$f(e,function(e){var t=e.close,n=[["<","≤"][t[1]],[">","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)},this)}};function normalizeReverse(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}var PiecewiseVisualMapView=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return __extends(t,e),t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),r=t.textStyleModel,o=r.getFont(),i=r.getTextColor(),a=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),u=l.endsText,c=retrieve(t.get("showLabel",!0),!u),d=!t.get("selectedMode");u&&this._renderEndsText(e,u[0],s,c,a),each$f(l.viewPieceList,function(r){var l=r.piece,u=new Group$3;u.onclick=bind$1(this._onItemClick,this,l),this._enableHoverLink(u,r.indexInModelPieceList);var p=t.getRepresentValue(l);if(this._createItemSymbol(u,p,[0,0,s[0],s[1]],d),c){var h=this.visualMapModel.getValueState(p);u.add(new ZRText({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:o,fill:i,opacity:"outOfRange"===h?.5:1},silent:d}))}e.add(u)},this),u&&this._renderEndsText(e,u[1],s,c,a),box(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on("mouseover",function(){return r("highlight")}).on("mouseout",function(){return r("downplay")});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:makeHighDownBatch(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return getItemAlign(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},t.prototype._renderEndsText=function(e,t,n,r,o){if(t){var i=new Group$3,a=this.visualMapModel.textStyleModel;i.add(new ZRText({style:createTextStyle$1(a,{x:r?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:r?o:"center",text:t})})),e.add(i)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=map$1(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get("text"),r=e.get("orient"),o=e.get("inverse");return("horizontal"===r?o:!o)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var o=createSymbol$1(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color"));o.silent=r,e.add(o)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var o=clone$6(n.selected),i=t.getSelectedMapKey(e);"single"===r||!0===r?(o[i]=!0,each$f(o,function(e,t){o[t]=t===i})):o[i]=!o[i],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(VisualMapView);function install$6(e){e.registerComponentModel(PiecewiseModel),e.registerComponentView(PiecewiseVisualMapView),installCommon(e)}function install$5(e){use(install$7),use(install$6)}var DEFAULT_OPTION={label:{enabled:!0},decal:{show:!1}},inner=makeInner(),decalPaletteScope={};function ariaVisual(e,t){var n=e.getModel("aria");if(n.get("enabled")){var r=clone$6(DEFAULT_OPTION);merge(r.label,e.getLocaleModel().get("aria"),!1),merge(n.option,r,!1),function(){if(n.getModel("decal").get("show")){var t=createHashMap();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=t.get(e.type);n||(n={},t.set(e.type,n)),inner(e).scope=n}}),e.eachRawSeries(function(t){if(!e.isSeriesFiltered(t))if(isFunction(t.enableAriaDecal))t.enableAriaDecal();else{var n=t.getData();if(t.isColorBySeries()){var r=getDecalFromPalette(t.ecModel,t.name,decalPaletteScope,e.getSeriesCount()),o=n.getVisual("decal");n.setVisual("decal",u(o,r))}else{var i=t.getRawData(),a={},s=inner(t).scope;n.each(function(e){var t=n.getRawIndex(e);a[t]=e});var l=i.count();i.each(function(e){var r=a[e],o=i.getName(e)||e+"",c=getDecalFromPalette(t.ecModel,o,s,l),d=n.getItemVisual(r,"decal");n.setItemVisual(r,"decal",u(d,c))})}}function u(e,t){var n=e?extend$2(extend$2({},t),e):t;return n.dirty=!0,n}})}}(),function(){var r=t.getZr().dom;if(!r)return;var a=e.getLocaleModel().get("aria"),s=n.getModel("label");if(s.option=defaults$2(s.option,a),!s.get("enabled"))return;if(r.setAttribute("role","img"),s.get("description"))return void r.setAttribute("aria-label",s.get("description"));var l,u=e.getSeriesCount(),c=s.get(["data","maxCount"])||10,d=s.get(["series","maxCount"])||10,p=Math.min(u,d);if(u<1)return;var h=function(){var t=e.get("title");t&&t.length&&(t=t[0]);return t&&t.text}();l=h?o(s.get(["general","withTitle"]),{title:h}):s.get(["general","withoutTitle"]);var f=[];l+=o(u>1?s.get(["series","multiple","prefix"]):s.get(["series","single","prefix"]),{seriesCount:u}),e.eachSeries(function(e,t){if(t<p){var n=void 0,r=e.get("name")?"withName":"withoutName";n=o(n=u>1?s.get(["series","multiple",r]):s.get(["series","single",r]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:i(e.subType)});var a=e.getData();if(a.count()>c)n+=o(s.get(["data","partialData"]),{displayCnt:c});else n+=s.get(["data","allData"]);for(var l=s.get(["data","separator","middle"]),d=s.get(["data","separator","end"]),h=s.get(["data","excludeDimensionId"]),g=[],m=0;m<a.count();m++)if(m<c){var y=a.getName(m),v=h?filter(a.getValues(m),function(e,t){return-1===indexOf(h,t)}):a.getValues(m),_=s.get(["data",y?"withName":"withoutName"]);g.push(o(_,{name:y,value:v.join(l)}))}n+=g.join(l)+d,f.push(n)}});var g=s.getModel(["series","multiple","separator"]),m=g.get("middle"),y=g.get("end");l+=f.join(m)+y,r.setAttribute("aria-label",l)}()}function o(e,t){if(!isString(e))return e;var n=e;return each$f(t,function(e,t){n=n.replace(new RegExp("\\{\\s*"+t+"\\s*\\}","g"),e)}),n}function i(t){var n=e.getLocaleModel().get(["series","typeNames"]);return n[t]||n.chart}}function ariaPreprocessor(e){if(e&&e.aria){var t=e.aria;null!=t.show&&(t.enabled=t.show),t.label=t.label||{},each$f(["description","general","series","data"],function(e){null!=t[e]&&(t.label[e]=t[e])})}}function install$4(e){e.registerPreprocessor(ariaPreprocessor),e.registerVisual(e.PRIORITY.VISUAL.ARIA,ariaVisual)}var RELATIONAL_EXPRESSION_OP_ALIAS_MAP={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},RegExpEvaluator=function(){function e(e){if(null==(this._condVal=isString(e)?new RegExp(e):isRegExp(e)?e:null)){throwError("")}}return e.prototype.evaluate=function(e){var t=_typeof2(e);return isString(t)?this._condVal.test(e):!!isNumber(t)&&this._condVal.test(e+"")},e}(),ConstConditionInternal=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),AndConditionInternal=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},e}(),OrConditionInternal=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},e}(),NotConditionInternal=function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e}(),RelationalConditionInternal=function(){function e(){}return e.prototype.evaluate=function(){for(var e=!!this.valueParser,t=(0,this.getValue)(this.valueGetterParam),n=e?this.valueParser(t):null,r=0;r<this.subCondList.length;r++)if(!this.subCondList[r].evaluate(e?n:t))return!1;return!0},e}();function parseOption(e,t){if(!0===e||!1===e){var n=new ConstConditionInternal;return n.value=e,n}return isObjectNotArray(e)||throwError(""),e.and?parseAndOrOption("and",e,t):e.or?parseAndOrOption("or",e,t):e.not?parseNotOption(e,t):parseRelationalOption(e,t)}function parseAndOrOption(e,t,n){var r=t[e];isArray$1(r)||throwError(""),r.length||throwError("");var o="and"===e?new AndConditionInternal:new OrConditionInternal;return o.children=map$1(r,function(e){return parseOption(e,n)}),o.children.length||throwError(""),o}function parseNotOption(e,t){var n=e.not;isObjectNotArray(n)||throwError("");var r=new NotConditionInternal;return r.child=parseOption(n,t),r.child||throwError(""),r}function parseRelationalOption(e,t){for(var n=t.prepareGetValue(e),r=[],o=keys(e),i=e.parser,a=i?getRawValueParser(i):null,s=0;s<o.length;s++){var l=o[s];if("parser"!==l&&!t.valueGetterAttrMap.get(l)){var u=hasOwn(RELATIONAL_EXPRESSION_OP_ALIAS_MAP,l)?RELATIONAL_EXPRESSION_OP_ALIAS_MAP[l]:l,c=e[l],d=a?a(c):c,p=createFilterComparator(u,d)||"reg"===u&&new RegExpEvaluator(d);p||throwError(""),r.push(p)}}r.length||throwError("");var h=new RelationalConditionInternal;return h.valueGetterParam=n,h.valueParser=a,h.getValue=t.getValue,h.subCondList=r,h}function isObjectNotArray(e){return isObject$3(e)&&!isArrayLike(e)}var ConditionalExpressionParsed=function(){function e(e,t){this._cond=parseOption(e,t)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e}();function parseConditionalExpression(e,t){return new ConditionalExpressionParsed(e,t)}var filterTransform={type:"echarts:filter",transform:function(e){for(var t,n=e.upstream,r=parseConditionalExpression(e.config,{valueGetterAttrMap:createHashMap({dimension:!0}),prepareGetValue:function(e){var t=e.dimension;hasOwn(e,"dimension")||throwError("");var r=n.getDimensionInfo(t);return r||throwError(""),{dimIdx:r.index}},getValue:function(e){return n.retrieveValueFromItem(t,e.dimIdx)}}),o=[],i=0,a=n.count();i<a;i++)t=n.getRawDataItem(i),r.evaluate()&&o.push(t);return{data:o}}},sortTransform={type:"echarts:sort",transform:function(e){var t=e.upstream,n=e.config,r="",o=normalizeToArray(n);o.length||throwError(r);var i=[];each$f(o,function(e){var n=e.dimension,o=e.order,a=e.parser,s=e.incomparable;if(null==n&&throwError(r),"asc"!==o&&"desc"!==o&&throwError(r),s&&"min"!==s&&"max"!==s){throwError("")}if("asc"!==o&&"desc"!==o){throwError("")}var l=t.getDimensionInfo(n);l||throwError(r);var u=a?getRawValueParser(a):null;a&&!u&&throwError(r),i.push({dimIdx:l.index,parser:u,comparator:new SortOrderComparator(o,s)})});var a=t.sourceFormat;a!==SOURCE_FORMAT_ARRAY_ROWS&&a!==SOURCE_FORMAT_OBJECT_ROWS&&throwError(r);for(var s=[],l=0,u=t.count();l<u;l++)s.push(t.getRawDataItem(l));return s.sort(function(e,n){for(var r=0;r<i.length;r++){var o=i[r],a=t.retrieveValueFromItem(e,o.dimIdx),s=t.retrieveValueFromItem(n,o.dimIdx);o.parser&&(a=o.parser(a),s=o.parser(s));var l=o.comparator.evaluate(a,s);if(0!==l)return l}return 0}),{data:s}}};function install$3(e){e.registerTransform(filterTransform),e.registerTransform(sortTransform)}var DatasetModel=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return __extends(t,e),t.prototype.init=function(t,n,r){e.prototype.init.call(this,t,n,r),this._sourceManager=new SourceManager(this),disableTransformOptionMerge(this)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),disableTransformOptionMerge(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:SERIES_LAYOUT_BY_COLUMN},t}(ComponentModel),DatasetView=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return __extends(t,e),t.type="dataset",t}(ComponentView);function install$2(e){e.registerComponentModel(DatasetModel),e.registerComponentView(DatasetView)}var CMD=PathProxy.CMD;function aroundEqual(e,t){return Math.abs(e-t)<1e-5}function pathToBezierCurves(e){var t,n,r,o,i,a=e.data,s=e.len(),l=[],u=0,c=0,d=0,p=0;function h(e,n){t&&t.length>2&&l.push(t),t=[e,n]}function f(e,n,r,o){aroundEqual(e,r)&&aroundEqual(n,o)||t.push(e,n,r,o,r,o)}function g(e,n,r,o,i,a){var s=Math.abs(n-e),l=4*Math.tan(s/4)/3,u=n<e?-1:1,c=Math.cos(e),d=Math.sin(e),p=Math.cos(n),h=Math.sin(n),f=c*i+r,g=d*a+o,m=p*i+r,y=h*a+o,v=i*l*u,_=a*l*u;t.push(f-v*d,g+_*c,m+v*h,y-_*p,m,y)}for(var m=0;m<s;){var y=a[m++],v=1===m;switch(v&&(d=u=a[m],p=c=a[m+1],y!==CMD.L&&y!==CMD.C&&y!==CMD.Q||(t=[d,p])),y){case CMD.M:u=d=a[m++],c=p=a[m++],h(d,p);break;case CMD.L:f(u,c,n=a[m++],r=a[m++]),u=n,c=r;break;case CMD.C:t.push(a[m++],a[m++],a[m++],a[m++],u=a[m++],c=a[m++]);break;case CMD.Q:n=a[m++],r=a[m++],o=a[m++],i=a[m++],t.push(u+2/3*(n-u),c+2/3*(r-c),o+2/3*(n-o),i+2/3*(r-i),o,i),u=o,c=i;break;case CMD.A:var _=a[m++],x=a[m++],S=a[m++],b=a[m++],T=a[m++],A=a[m++]+T;m+=1;var w=!a[m++];n=Math.cos(T)*S+_,r=Math.sin(T)*b+x,v?h(d=n,p=r):f(u,c,n,r),u=Math.cos(A)*S+_,c=Math.sin(A)*b+x;for(var C=(w?-1:1)*Math.PI/2,E=T;w?E>A:E<A;E+=C){g(E,w?Math.max(E+C,A):Math.min(E+C,A),_,x,S,b)}break;case CMD.R:d=u=a[m++],p=c=a[m++],n=d+a[m++],r=p+a[m++],h(n,p),f(n,p,n,r),f(n,r,d,r),f(d,r,d,p),f(d,p,n,p);break;case CMD.Z:t&&f(u,c,d,p),u=d,c=p}}return t&&t.length>2&&l.push(t),l}function adpativeBezier(e,t,n,r,o,i,a,s,l,u){if(aroundEqual(e,n)&&aroundEqual(t,r)&&aroundEqual(o,a)&&aroundEqual(i,s))l.push(a,s);else{var c=2/u,d=c*c,p=a-e,h=s-t,f=Math.sqrt(p*p+h*h);p/=f,h/=f;var g=n-e,m=r-t,y=o-a,v=i-s,_=g*g+m*m,x=y*y+v*v;if(_<d&&x<d)l.push(a,s);else{var S=p*g+h*m,b=-p*y-h*v;if(_-S*S<d&&S>=0&&x-b*b<d&&b>=0)l.push(a,s);else{var T=[],A=[];cubicSubdivide(e,n,o,a,.5,T),cubicSubdivide(t,r,i,s,.5,A),adpativeBezier(T[0],A[0],T[1],A[1],T[2],A[2],T[3],A[3],l,u),adpativeBezier(T[4],A[4],T[5],A[5],T[6],A[6],T[7],A[7],l,u)}}}}function pathToPolygons(e,t){var n=pathToBezierCurves(e),r=[];t=t||1;for(var o=0;o<n.length;o++){var i=n[o],a=[],s=i[0],l=i[1];a.push(s,l);for(var u=2;u<i.length;){var c=i[u++],d=i[u++],p=i[u++],h=i[u++],f=i[u++],g=i[u++];adpativeBezier(s,l,c,d,p,h,f,g,a,t),s=f,l=g}r.push(a)}return r}function getDividingGrids(e,t,n){var r=e[t],o=e[1-t],i=Math.abs(r/o),a=Math.ceil(Math.sqrt(i*n)),s=Math.floor(n/a);0===s&&(s=1,a=n);for(var l=[],u=0;u<a;u++)l.push(s);var c=n-a*s;if(c>0)for(u=0;u<c;u++)l[u%a]+=1;return l}function divideSector(e,t,n){for(var r=e.r0,o=e.r,i=e.startAngle,a=e.endAngle,s=Math.abs(a-i),l=s*o,u=o-r,c=l>Math.abs(u),d=getDividingGrids([l,u],c?0:1,t),p=(c?s:u)/d.length,h=0;h<d.length;h++)for(var f=(c?u:s)/d[h],g=0;g<d[h];g++){var m={};c?(m.startAngle=i+p*h,m.endAngle=i+p*(h+1),m.r0=r+f*g,m.r=r+f*(g+1)):(m.startAngle=i+f*g,m.endAngle=i+f*(g+1),m.r0=r+p*h,m.r=r+p*(h+1)),m.clockwise=e.clockwise,m.cx=e.cx,m.cy=e.cy,n.push(m)}}function divideRect(e,t,n){for(var r=e.width,o=e.height,i=r>o,a=getDividingGrids([r,o],i?0:1,t),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",c=i?"y":"x",d=e[s]/a.length,p=0;p<a.length;p++)for(var h=e[l]/a[p],f=0;f<a[p];f++){var g={};g[u]=p*d,g[c]=f*h,g[s]=d,g[l]=h,g.x+=e.x,g.y+=e.y,n.push(g)}}function crossProduct2d(e,t,n,r){return e*r-n*t}function lineLineIntersect(e,t,n,r,o,i,a,s){var l=n-e,u=r-t,c=a-o,d=s-i,p=crossProduct2d(c,d,l,u);if(Math.abs(p)<1e-6)return null;var h=crossProduct2d(e-o,t-i,c,d)/p;return h<0||h>1?null:new Point(h*l+e,h*u+t)}function projPtOnLine(e,t,n){var r=new Point;Point.sub(r,n,t),r.normalize();var o=new Point;return Point.sub(o,e,t),o.dot(r)}function addToPoly(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function splitPolygonByLine(e,t,n){for(var r=e.length,o=[],i=0;i<r;i++){var a=e[i],s=e[(i+1)%r],l=lineLineIntersect(a[0],a[1],s[0],s[1],t.x,t.y,n.x,n.y);l&&o.push({projPt:projPtOnLine(l,t,n),pt:l,idx:i})}if(o.length<2)return[{points:e},{points:e}];o.sort(function(e,t){return e.projPt-t.projPt});var u=o[0],c=o[o.length-1];if(c.idx<u.idx){var d=u;u=c,c=d}var p=[u.pt.x,u.pt.y],h=[c.pt.x,c.pt.y],f=[p],g=[h];for(i=u.idx+1;i<=c.idx;i++)addToPoly(f,e[i].slice());addToPoly(f,h),addToPoly(f,p);for(i=c.idx+1;i<=u.idx+r;i++)addToPoly(g,e[i%r].slice());return addToPoly(g,p),addToPoly(g,h),[{points:f},{points:g}]}function binaryDividePolygon(e){var t=e.points,n=[],r=[];fromPoints(t,n,r);var o=new BoundingRect(n[0],n[1],r[0]-n[0],r[1]-n[1]),i=o.width,a=o.height,s=o.x,l=o.y,u=new Point,c=new Point;return i>a?(u.x=c.x=s+i/2,u.y=l,c.y=l+a):(u.y=c.y=l+a/2,u.x=s,c.x=s+i),splitPolygonByLine(t,u,c)}function binaryDivideRecursive(e,t,n,r){if(1===n)r.push(t);else{var o=Math.floor(n/2),i=e(t);binaryDivideRecursive(e,i[0],o,r),binaryDivideRecursive(e,i[1],n-o,r)}return r}function clone$2(e,t){for(var n=[],r=0;r<t;r++)n.push(clonePath(e));return n}function copyPathProps(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function polygonConvert(e){for(var t=[],n=0;n<e.length;)t.push([e[n++],e[n++]]);return t}function split(e,t){var n,r=[],o=e.shape;switch(e.type){case"rect":divideRect(o,t,r),n=Rect$2;break;case"sector":divideSector(o,t,r),n=Sector;break;case"circle":divideSector({r0:0,r:o.r,startAngle:0,endAngle:2*Math.PI,cx:o.cx,cy:o.cy},t,r),n=Sector;break;default:var i=e.getComputedTransform(),a=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=map$1(pathToPolygons(e.getUpdatedPathProxy(),a),function(e){return polygonConvert(e)}),l=s.length;if(0===l)binaryDivideRecursive(binaryDividePolygon,{points:s[0]},t,r);else if(l===t)for(var u=0;u<l;u++)r.push({points:s[u]});else{var c=0,d=map$1(s,function(e){var t=[],n=[];fromPoints(e,t,n);var r=(n[1]-t[1])*(n[0]-t[0]);return c+=r,{poly:e,area:r}});d.sort(function(e,t){return t.area-e.area});var p=t;for(u=0;u<l;u++){var h=d[u];if(p<=0)break;var f=u===l-1?p:Math.ceil(h.area/c*t);f<0||(binaryDivideRecursive(binaryDividePolygon,{points:h.poly},f,r),p-=f)}}n=Polygon}if(!n)return clone$2(e,t);var g=[];for(u=0;u<r.length;u++){var m=new n;m.setShape(r[u]),copyPathProps(e,m),g.push(m)}return g}function alignSubpath(e,t){var n=e.length,r=t.length;if(n===r)return[e,t];for(var o=[],i=[],a=n<r?e:t,s=Math.min(n,r),l=Math.abs(r-n)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,d=[a[0],a[1]],p=l,h=2;h<s;){var f=a[h-2],g=a[h-1],m=a[h++],y=a[h++],v=a[h++],_=a[h++],x=a[h++],S=a[h++];if(p<=0)d.push(m,y,v,_,x,S);else{for(var b=Math.min(p,c-1)+1,T=1;T<=b;T++){var A=T/b;cubicSubdivide(f,m,v,x,A,o),cubicSubdivide(g,y,_,S,A,i),f=o[3],g=i[3],d.push(o[1],i[1],o[2],i[2],f,g),m=o[5],y=i[5],v=o[6],_=i[6]}p-=b-1}}return a===e?[d,t]:[e,d]}function createSubpath(e,t){for(var n=e.length,r=e[n-2],o=e[n-1],i=[],a=0;a<t.length;)i[a++]=r,i[a++]=o;return i}function alignBezierCurves(e,t){for(var n,r,o,i=[],a=[],s=0;s<Math.max(e.length,t.length);s++){var l=e[s],u=t[s],c=void 0,d=void 0;l?u?(r=c=(n=alignSubpath(l,u))[0],o=d=n[1]):(d=createSubpath(o||l,l),c=l):(c=createSubpath(r||u,u),d=u),i.push(c),a.push(d)}return[i,a]}function centroid(e){for(var t=0,n=0,r=0,o=e.length,i=0,a=o-2;i<o;a=i,i+=2){var s=e[a],l=e[a+1],u=e[i],c=e[i+1],d=s*c-u*l;t+=d,n+=(s+u)*d,r+=(l+c)*d}return 0===t?[e[0]||0,e[1]||0]:[n/t/3,r/t/3,t]}function findBestRingOffset(e,t,n,r){for(var o=(e.length-2)/6,i=1/0,a=0,s=e.length,l=s-2,u=0;u<o;u++){for(var c=6*u,d=0,p=0;p<s;p+=2){var h=0===p?c:(c+p-2)%l+2,f=e[h]-n[0],g=e[h+1]-n[1],m=t[p]-r[0]-f,y=t[p+1]-r[1]-g;d+=m*m+y*y}d<i&&(i=d,a=u)}return a}function reverse(e){for(var t=[],n=e.length,r=0;r<n;r+=2)t[r]=e[n-r-2],t[r+1]=e[n-r-1];return t}function findBestMorphingRotation(e,t,n,r){for(var o,i=[],a=0;a<e.length;a++){var s=e[a],l=t[a],u=centroid(s),c=centroid(l);null==o&&(o=u[2]<0!=c[2]<0);var d=[],p=[],h=0,f=1/0,g=[],m=s.length;o&&(s=reverse(s));for(var y=6*findBestRingOffset(s,l,u,c),v=m-2,_=0;_<v;_+=2){var x=(y+_)%v+2;d[_+2]=s[x]-u[0],d[_+3]=s[x+1]-u[1]}d[0]=s[y]-u[0],d[1]=s[y+1]-u[1];for(var S=r/n,b=-r/2;b<=r/2;b+=S){var T=Math.sin(b),A=Math.cos(b),w=0;for(_=0;_<s.length;_+=2){var C=d[_],E=d[_+1],M=l[_]-c[0],I=l[_+1]-c[1],P=M*A-I*T,D=M*T+I*A;g[_]=P,g[_+1]=D;var k=P-C,$=D-E;w+=k*k+$*$}if(w<f){f=w,h=b;for(var R=0;R<g.length;R++)p[R]=g[R]}}i.push({from:d,to:p,fromCp:u,toCp:c,rotation:-h})}return i}function isCombineMorphing(e){return e.__isCombineMorphing}var SAVED_METHOD_PREFIX="__mOriginal_";function saveAndModifyMethod(e,t,n){var r=SAVED_METHOD_PREFIX+t,o=e[r]||e[t];e[r]||(e[r]=e[t]);var i=n.replace,a=n.after,s=n.before;e[t]=function(){var e,t=arguments;return s&&s.apply(this,t),e=i?i.apply(this,t):o.apply(this,t),a&&a.apply(this,t),e}}function restoreMethod(e,t){var n=SAVED_METHOD_PREFIX+t;e[n]&&(e[t]=e[n],e[n]=null)}function applyTransformOnBeziers(e,t){for(var n=0;n<e.length;n++)for(var r=e[n],o=0;o<r.length;){var i=r[o],a=r[o+1];r[o++]=t[0]*i+t[2]*a+t[4],r[o++]=t[1]*i+t[3]*a+t[5]}}function prepareMorphPath(e,t){var n=e.getUpdatedPathProxy(),r=t.getUpdatedPathProxy(),o=alignBezierCurves(pathToBezierCurves(n),pathToBezierCurves(r)),i=o[0],a=o[1],s=e.getComputedTransform(),l=t.getComputedTransform();s&&applyTransformOnBeziers(i,s),l&&applyTransformOnBeziers(a,l),saveAndModifyMethod(t,"updateTransform",{replace:function(){this.transform=null}}),t.transform=null;var u=findBestMorphingRotation(i,a,10,Math.PI),c=[];saveAndModifyMethod(t,"buildPath",{replace:function(e){for(var n=t.__morphT,r=1-n,o=[],i=0;i<u.length;i++){var a=u[i],s=a.from,l=a.to,d=a.rotation*n,p=a.fromCp,h=a.toCp,f=Math.sin(d),g=Math.cos(d);lerp$1(o,p,h,n);for(var m=0;m<s.length;m+=2){var y=s[m],v=s[m+1],_=y*r+(T=l[m])*n,x=v*r+(A=l[m+1])*n;c[m]=_*g-x*f+o[0],c[m+1]=_*f+x*g+o[1]}var S=c[0],b=c[1];e.moveTo(S,b);for(m=2;m<s.length;){var T=c[m++],A=c[m++],w=c[m++],C=c[m++],E=c[m++],M=c[m++];S===T&&b===A&&w===E&&C===M?e.lineTo(E,M):e.bezierCurveTo(T,A,w,C,E,M),S=E,b=M}}}})}function morphPath(e,t,n){if(!e||!t)return t;var r=n.done,o=n.during;return prepareMorphPath(e,t),t.__morphT=0,t.animateTo({__morphT:1},defaults$2({during:function(e){t.dirtyShape(),o&&o(e)},done:function(){restoreMethod(t,"buildPath"),restoreMethod(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape(),r&&r()}},n)),t}function hilbert(e,t,n,r,o,i){e=o===n?0:Math.round(32767*(e-n)/(o-n)),t=i===r?0:Math.round(32767*(t-r)/(i-r));for(var a,s=0,l=32768;l>0;l/=2){var u=0,c=0;(e&l)>0&&(u=1),(t&l)>0&&(c=1),s+=l*l*(3*u^c),0===c&&(1===u&&(e=l-1-e,t=l-1-t),a=e,e=t,t=a)}return s}function sortPaths(e){var t=1/0,n=1/0,r=-1/0,o=-1/0,i=map$1(e,function(e){var i=e.getBoundingRect(),a=e.getComputedTransform(),s=i.x+i.width/2+(a?a[4]:0),l=i.y+i.height/2+(a?a[5]:0);return t=Math.min(s,t),n=Math.min(l,n),r=Math.max(s,r),o=Math.max(l,o),[s,l]});return map$1(i,function(i,a){return{cp:i,z:hilbert(i[0],i[1],t,n,r,o),path:e[a]}}).sort(function(e,t){return e.z-t.z}).map(function(e){return e.path})}function defaultDividePath(e){return split(e.path,e.count)}function createEmptyReturn(){return{fromIndividuals:[],toIndividuals:[],count:0}}function combineMorph(e,t,n){var r=[];!function e(t){for(var n=0;n<t.length;n++){var o=t[n];isCombineMorphing(o)?e(o.childrenRef()):o instanceof Path&&r.push(o)}}(e);var o=r.length;if(!o)return createEmptyReturn();var i=(n.dividePath||defaultDividePath)({path:t,count:o});if(i.length!==o)return console.error("Invalid morphing: unmatched splitted path"),createEmptyReturn();r=sortPaths(r),i=sortPaths(i);for(var a=n.done,s=n.during,l=n.individualDelay,u=new Transformable,c=0;c<o;c++){var d=r[c],p=i[c];p.parent=t,p.copyTransform(u),l||prepareMorphPath(d,p)}function h(e){for(var t=0;t<i.length;t++)i[t].addSelfToZr(e)}function f(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,restoreMethod(t,"addSelfToZr"),restoreMethod(t,"removeSelfFromZr")}t.__isCombineMorphing=!0,t.childrenRef=function(){return i},saveAndModifyMethod(t,"addSelfToZr",{after:function(e){h(e)}}),saveAndModifyMethod(t,"removeSelfFromZr",{after:function(e){for(var t=0;t<i.length;t++)i[t].removeSelfFromZr(e)}});var g=i.length;if(l){var m=g,y=function(){0===--m&&(f(),a&&a())};for(c=0;c<g;c++){var v=l?defaults$2({delay:(n.delay||0)+l(c,g,r[c],i[c]),done:y},n):n;morphPath(r[c],i[c],v)}}else t.__morphT=0,t.animateTo({__morphT:1},defaults$2({during:function(e){for(var n=0;n<g;n++){var r=i[n];r.__morphT=t.__morphT,r.dirtyShape()}s&&s(e)},done:function(){f();for(var t=0;t<e.length;t++)restoreMethod(e[t],"updateTransform");a&&a()}},n));return t.__zr&&h(t.__zr),{fromIndividuals:r,toIndividuals:i,count:g}}function separateMorph(e,t,n){var r=t.length,o=[],i=n.dividePath||defaultDividePath;if(isCombineMorphing(e)){!function e(t){for(var n=0;n<t.length;n++){var r=t[n];isCombineMorphing(r)?e(r.childrenRef()):r instanceof Path&&o.push(r)}}(e.childrenRef());var a=o.length;if(a<r)for(var s=0,l=a;l<r;l++)o.push(clonePath(o[s++%a]));o.length=r}else{o=i({path:e,count:r});var u=e.getComputedTransform();for(l=0;l<o.length;l++)o[l].setLocalTransform(u);if(o.length!==r)return console.error("Invalid morphing: unmatched splitted path"),createEmptyReturn()}o=sortPaths(o),t=sortPaths(t);var c=n.individualDelay;for(l=0;l<r;l++){var d=c?defaults$2({delay:(n.delay||0)+c(l,r,o[l],t[l])},n):n;morphPath(o[l],t[l],d)}return{fromIndividuals:o,toIndividuals:t,count:t.length}}function isMultiple(e){return isArray$1(e[0])}function prepareMorphBatches(e,t){for(var n=[],r=e.length,o=0;o<r;o++)n.push({one:e[o],many:[]});for(o=0;o<t.length;o++){var i=t[o].length,a=void 0;for(a=0;a<i;a++)n[a%r].many.push(t[o][a])}var s=0;for(o=r-1;o>=0;o--)if(!n[o].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}i=l.length;var u=Math.ceil(i/2);n[o].many=l.slice(u,i),n[s].many=l.slice(0,u),s++}return n}var pathDividers={clone:function(e){for(var t=[],n=1-Math.pow(1-e.path.style.opacity,1/e.count),r=0;r<e.count;r++){var o=clonePath(e.path);o.setStyle("opacity",n),t.push(o)}return t},split:null};function applyMorphAnimation(e,t,n,r,o,i){if(e.length&&t.length){var a=getAnimationConfig("update",r,o);if(a&&a.duration>0){var s,l,u=r.getModel("universalTransition").get("delay"),c=Object.assign({setToFinal:!0},a);isMultiple(e)&&(s=e,l=t),isMultiple(t)&&(s=t,l=e);for(var d=s?s===e:e.length>t.length,p=s?prepareMorphBatches(l,s):prepareMorphBatches(d?t:e,[d?e:t]),h=0,f=0;f<p.length;f++)h+=p[f].many.length;var g=0;for(f=0;f<p.length;f++)m(p[f],d,g,h),g+=p[f].many.length}}function m(e,t,r,o,a){var s=e.many,l=e.one;if(1!==s.length||a)for(var d=defaults$2({dividePath:pathDividers[n],individualDelay:u&&function(e,t,n,i){return u(e+r,o)}},c),p=t?combineMorph(s,l,d):separateMorph(l,s,d),h=p.fromIndividuals,f=p.toIndividuals,g=h.length,y=0;y<g;y++){v=u?defaults$2({delay:u(y,g)},c):c;i(h[y],f[y],t?s[y]:e.one,t?e.one:s[y],v)}else{var v,_=t?s[0]:l,x=t?l:s[0];if(isCombineMorphing(_))m({many:[_],one:x},!0,r,o,!0);else morphPath(_,x,v=u?defaults$2({delay:u(r,o)},c):c),i(_,x,_,x,v)}}}function getPathList(e){if(!e)return[];if(isArray$1(e)){for(var t=[],n=0;n<e.length;n++)t.push(getPathList(e[n]));return t}var r=[];return e.traverse(function(e){e instanceof Path&&!e.disableMorphing&&!e.invisible&&!e.ignore&&r.push(e)}),r}var DATA_COUNT_THRESHOLD=1e4,TRANSITION_NONE=0,TRANSITION_P2C=1,TRANSITION_C2P=2,getUniversalTransitionGlobalStore=makeInner();function getDimension(e,t){for(var n=e.dimensions,r=0;r<n.length;r++){var o=e.getDimensionInfo(n[r]);if(o&&0===o.otherDims[t])return n[r]}}function getValueByDimension(e,t,n){var r=e.getDimensionInfo(n),o=r&&r.ordinalMeta;if(r){var i=e.get(r.name,t);return o&&o.categories[i]||i+""}}function getGroupId(e,t,n,r){var o=getDimension(e,r?"itemChildGroupId":"itemGroupId");if(o)return getValueByDimension(e,t,o);var i=e.getRawDataItem(t),a=r?"childGroupId":"groupId";return i&&i[a]?i[a]+"":r?void 0:n||e.getId(t)}function flattenDataDiffItems(e){var t=[];return each$f(e,function(e){var n=e.data,r=e.dataGroupId;if(!(n.count()>DATA_COUNT_THRESHOLD))for(var o=n.getIndices(),i=0;i<o.length;i++)t.push({data:n,groupId:getGroupId(n,i,r,!1),childGroupId:getGroupId(n,i,r,!0),divide:e.divide,dataIndex:i})}),t}function fadeInElement(e,t,n){e.traverse(function(e){e instanceof Path&&initProps(e,{style:{opacity:0}},t,{dataIndex:n,isFrom:!0})})}function removeEl(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function stopAnimation(e){e.stopAnimation(),e.isGroup&&e.traverse(function(e){e.stopAnimation()})}function animateElementStyles(e,t,n){var r=getAnimationConfig("update",n,t);r&&e.traverse(function(e){if(e instanceof Displayable){var t=getOldStyle(e);t&&e.animateFrom({style:t},r)}})}function isAllIdSame(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++){var o=e[r],i=t[r];if(o.data.getId(o.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function transitionBetween(e,t,n){var r=flattenDataDiffItems(e),o=flattenDataDiffItems(t);function i(e,t,n,r,o){(n||e)&&t.animateFrom({style:n&&n!==e?extend$2(extend$2({},n.style),e.style):e.style},o)}var a=!1,s=TRANSITION_NONE,l=createHashMap(),u=createHashMap();r.forEach(function(e){e.groupId&&l.set(e.groupId,!0),e.childGroupId&&u.set(e.childGroupId,!0)});for(var c=0;c<o.length;c++){var d=o[c].groupId;if(u.get(d)){s=TRANSITION_P2C;break}var p=o[c].childGroupId;if(p&&l.get(p)){s=TRANSITION_C2P;break}}function h(e,t){return function(n){var r=n.data,o=n.dataIndex;return t?r.getId(o):e?s===TRANSITION_P2C?n.childGroupId:n.groupId:s===TRANSITION_C2P?n.childGroupId:n.groupId}}var f=isAllIdSame(r,o),g={};if(!f)for(c=0;c<o.length;c++){var m=o[c],y=m.data.getItemGraphicEl(m.dataIndex);y&&(g[y.id]=!0)}function v(e,t){var n=r[t],s=o[e],l=s.data.hostModel,u=n.data.getItemGraphicEl(n.dataIndex),c=s.data.getItemGraphicEl(s.dataIndex);u!==c?u&&g[u.id]||c&&(stopAnimation(c),u?(stopAnimation(u),removeEl(u),a=!0,applyMorphAnimation(getPathList(u),getPathList(c),s.divide,l,e,i)):fadeInElement(c,l,e)):c&&animateElementStyles(c,s.dataIndex,l)}new DataDiffer(r,o,h(!0,f),h(!1,f),null,"multiple").update(v).updateManyToOne(function(e,t){var n=o[e],s=n.data,l=s.hostModel,u=s.getItemGraphicEl(n.dataIndex),c=filter(map$1(t,function(e){return r[e].data.getItemGraphicEl(r[e].dataIndex)}),function(e){return e&&e!==u&&!g[e.id]});u&&(stopAnimation(u),c.length?(each$f(c,function(e){stopAnimation(e),removeEl(e)}),a=!0,applyMorphAnimation(getPathList(c),getPathList(u),n.divide,l,e,i)):fadeInElement(u,l,n.dataIndex))}).updateOneToMany(function(e,t){var n=r[t],s=n.data.getItemGraphicEl(n.dataIndex);if(!s||!g[s.id]){var l=filter(map$1(e,function(e){return o[e].data.getItemGraphicEl(o[e].dataIndex)}),function(e){return e&&e!==s}),u=o[e[0]].data.hostModel;l.length&&(each$f(l,function(e){return stopAnimation(e)}),s?(stopAnimation(s),removeEl(s),a=!0,applyMorphAnimation(getPathList(s),getPathList(l),n.divide,u,e[0],i)):each$f(l,function(t){return fadeInElement(t,u,e[0])}))}}).updateManyToMany(function(e,t){new DataDiffer(t,e,function(e){return r[e].data.getId(r[e].dataIndex)},function(e){return o[e].data.getId(o[e].dataIndex)}).update(function(n,r){v(e[n],t[r])}).execute()}).execute(),a&&each$f(t,function(e){var t=e.data.hostModel,r=t&&n.getViewOfSeriesModel(t),o=getAnimationConfig("update",t,0);r&&t.isAnimationEnabled()&&o&&o.duration>0&&r.group.traverse(function(e){e instanceof Path&&!e.animators.length&&e.animateFrom({style:{opacity:0}},o)})})}function getSeriesTransitionKey(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function convertArraySeriesKeyToString(e){return isArray$1(e)?e.sort().join(","):e}function getDivideShapeFromData(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function findTransitionSeriesBatches(e,t){var n=createHashMap(),r=createHashMap(),o=createHashMap();return each$f(e.oldSeries,function(t,n){var i=e.oldDataGroupIds[n],a=e.oldData[n],s=getSeriesTransitionKey(t),l=convertArraySeriesKeyToString(s);r.set(l,{dataGroupId:i,data:a}),isArray$1(s)&&each$f(s,function(e){o.set(e,{key:l,dataGroupId:i,data:a})})}),each$f(t.updatedSeries,function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.get("dataGroupId"),i=e.getData(),a=getSeriesTransitionKey(e),s=convertArraySeriesKeyToString(a),l=r.get(s);if(l)n.set(s,{oldSeries:[{dataGroupId:l.dataGroupId,divide:getDivideShapeFromData(l.data),data:l.data}],newSeries:[{dataGroupId:t,divide:getDivideShapeFromData(i),data:i}]});else if(isArray$1(a)){var u=[];each$f(a,function(e){var t=r.get(e);t.data&&u.push({dataGroupId:t.dataGroupId,divide:getDivideShapeFromData(t.data),data:t.data})}),u.length&&n.set(s,{oldSeries:u,newSeries:[{dataGroupId:t,data:i,divide:getDivideShapeFromData(i)}]})}else{var c=o.get(a);if(c){var d=n.get(c.key);d||(d={oldSeries:[{dataGroupId:c.dataGroupId,data:c.data,divide:getDivideShapeFromData(c.data)}],newSeries:[]},n.set(c.key,d)),d.newSeries.push({dataGroupId:t,data:i,divide:getDivideShapeFromData(i)})}}}}),n}function querySeries(e,t){for(var n=0;n<e.length;n++){if(null!=t.seriesIndex&&t.seriesIndex===e[n].seriesIndex||null!=t.seriesId&&t.seriesId===e[n].id)return n}}function transitionSeriesFromOpt(e,t,n,r){var o=[],i=[];each$f(normalizeToArray(e.from),function(e){var n=querySeries(t.oldSeries,e);n>=0&&o.push({dataGroupId:t.oldDataGroupIds[n],data:t.oldData[n],divide:getDivideShapeFromData(t.oldData[n]),groupIdDim:e.dimension})}),each$f(normalizeToArray(e.to),function(e){var r=querySeries(n.updatedSeries,e);if(r>=0){var o=n.updatedSeries[r].getData();i.push({dataGroupId:t.oldDataGroupIds[r],data:o,divide:getDivideShapeFromData(o),groupIdDim:e.dimension})}}),o.length>0&&i.length>0&&transitionBetween(o,i,r)}function installUniversalTransition(e){e.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){each$f(normalizeToArray(n.seriesTransition),function(e){each$f(normalizeToArray(e.to),function(e){for(var t=n.updatedSeries,r=0;r<t.length;r++)(null!=e.seriesIndex&&e.seriesIndex===t[r].seriesIndex||null!=e.seriesId&&e.seriesId===t[r].id)&&(t[r][SERIES_UNIVERSAL_TRANSITION_PROP]=!0)})})}),e.registerUpdateLifecycle("series:transition",function(e,t,n){var r=getUniversalTransitionGlobalStore(t);if(r.oldSeries&&n.updatedSeries&&n.optionChanged){var o=n.seriesTransition;if(o)each$f(normalizeToArray(o),function(e){transitionSeriesFromOpt(e,r,n,t)});else{var i=findTransitionSeriesBatches(r,n);each$f(i.keys(),function(e){var n=i.get(e);transitionBetween(n.oldSeries,n.newSeries,t)})}each$f(n.updatedSeries,function(e){e[SERIES_UNIVERSAL_TRANSITION_PROP]&&(e[SERIES_UNIVERSAL_TRANSITION_PROP]=!1)})}for(var a=e.getSeries(),s=r.oldSeries=[],l=r.oldDataGroupIds=[],u=r.oldData=[],c=0;c<a.length;c++){var d=a[c].getData();d.count()<DATA_COUNT_THRESHOLD&&(s.push(a[c]),l.push(a[c].get("dataGroupId")),u.push(d))}})}var mathSin=Math.sin,mathCos=Math.cos,PI=Math.PI,PI2=2*Math.PI,degree=180/PI,SVGPathRebuilder=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},e.prototype.moveTo=function(e,t){this._add("M",e,t)},e.prototype.lineTo=function(e,t){this._add("L",e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,o,i){this._add("C",e,t,n,r,o,i)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add("Q",e,t,n,r)},e.prototype.arc=function(e,t,n,r,o,i){this.ellipse(e,t,n,n,0,r,o,i)},e.prototype.ellipse=function(e,t,n,r,o,i,a,s){var l=a-i,u=!s,c=Math.abs(l),d=isAroundZero(c-PI2)||(u?l>=PI2:-l>=PI2),p=l>0?l%PI2:l%PI2+PI2,h=!1;h=!!d||!isAroundZero(c)&&p>=PI==!!u;var f=e+n*mathCos(i),g=t+r*mathSin(i);this._start&&this._add("M",f,g);var m=Math.round(o*degree);if(d){var y=1/this._p,v=(u?1:-1)*(PI2-y);this._add("A",n,r,m,1,+u,e+n*mathCos(i+v),t+r*mathSin(i+v)),y>.01&&this._add("A",n,r,m,0,+u,f,g)}else{var _=e+n*mathCos(a),x=t+r*mathSin(a);this._add("A",n,r,m,+h,+u,_,x)}},e.prototype.rect=function(e,t,n,r){this._add("M",e,t),this._add("l",n,0),this._add("l",0,r),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(e,t,n,r,o,i,a,s,l){for(var u=[],c=this._p,d=1;d<arguments.length;d++){var p=arguments[d];if(isNaN(p))return void(this._invalid=!0);u.push(Math.round(p*c)/c)}this._d.push(e+u.join(" ")),this._start="Z"===e},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),NONE="none",mathRound=Math.round;function pathHasFill(e){var t=e.fill;return null!=t&&t!==NONE}function pathHasStroke(e){var t=e.stroke;return null!=t&&t!==NONE}var strokeProps=["lineCap","miterLimit","lineJoin"],svgStrokeProps=map$1(strokeProps,function(e){return"stroke-"+e.toLowerCase()});function mapStyleToAttrs(e,t,n,r){var o=null==t.opacity?1:t.opacity;if(n instanceof ZRImage)e("opacity",o);else{if(pathHasFill(t)){var i=normalizeColor(t.fill);e("fill",i.color);var a=null!=t.fillOpacity?t.fillOpacity*i.opacity*o:i.opacity*o;a<1&&e("fill-opacity",a)}else e("fill",NONE);if(pathHasStroke(t)){var s=normalizeColor(t.stroke);e("stroke",s.color);var l=t.strokeNoScale?n.getLineScale():1,u=l?(t.lineWidth||0)/l:0,c=null!=t.strokeOpacity?t.strokeOpacity*s.opacity*o:s.opacity*o,d=t.strokeFirst;if(1!==u&&e("stroke-width",u),d&&e("paint-order",d?"stroke":"fill"),c<1&&e("stroke-opacity",c),t.lineDash){var p=getLineDash(n),h=p[0],f=p[1];h&&(f=mathRound(f||0),e("stroke-dasharray",h.join(",")),(f||r)&&e("stroke-dashoffset",f))}for(var g=0;g<strokeProps.length;g++){var m=strokeProps[g];if(t[m]!==DEFAULT_PATH_STYLE[m]){var y=t[m]||DEFAULT_PATH_STYLE[m];y&&e(svgStrokeProps[g],y)}}}}}var SVGNS="http://www.w3.org/2000/svg",XLINKNS="http://www.w3.org/1999/xlink",XMLNS="http://www.w3.org/2000/xmlns/",XML_NAMESPACE="http://www.w3.org/XML/1998/namespace",META_DATA_PREFIX="ecmeta_";function createElement(e){return document.createElementNS(SVGNS,e)}function createVNode(e,t,n,r,o){return{tag:e,attrs:n||{},children:r,text:o,key:t}}function createElementOpen(e,t){var n=[];if(t)for(var r in t){var o=t[r],i=r;!1!==o&&(!0!==o&&null!=o&&(i+='="'+o+'"'),n.push(i))}return"<"+e+" "+n.join(" ")+">"}function createElementClose(e){return"</"+e+">"}function vNodeToString(e,t){var n=(t=t||{}).newline?"\n":"";return function e(t){var r=t.children,o=t.tag,i=t.attrs,a=t.text;return createElementOpen(o,i)+("style"!==o?encodeHTML(a):a||"")+(r?""+n+map$1(r,function(t){return e(t)}).join(n)+n:"")+createElementClose(o)}(e)}function getCssString(e,t,n){var r=(n=n||{}).newline?"\n":"",o=" {"+r,i=r+"}",a=map$1(keys(e),function(t){return t+o+map$1(keys(e[t]),function(n){return n+":"+e[t][n]+";"}).join(r)+i}).join(r),s=map$1(keys(t),function(e){return"@keyframes "+e+o+map$1(keys(t[e]),function(n){return n+o+map$1(keys(t[e][n]),function(r){var o=t[e][n][r];return"d"===r&&(o='path("'+o+'")'),r+":"+o+";"}).join(r)+i}).join(r)+i}).join(r);return a||s?["<![CDATA[",a,s,"]]>"].join(r):""}function createBrushScope(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function createSVGVNode(e,t,n,r){return createVNode("svg","root",{width:e,height:t,xmlns:SVGNS,"xmlns:xlink":XLINKNS,version:"1.1",baseProfile:"full",viewBox:!!r&&"0 0 "+e+" "+t},n)}var cssClassIdx=0;function getClassId(){return cssClassIdx++}var EASING_MAP={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"},transformOriginKey="transform-origin";function buildPathString(e,t,n){var r=extend$2({},e.shape);extend$2(r,t),e.buildPath(n,r);var o=new SVGPathRebuilder;return o.reset(getPathPrecision(e)),n.rebuildPath(o,1),o.generateStr(),o.getStr()}function setTransformOrigin(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[transformOriginKey]=n+"px "+r+"px")}var ANIMATE_STYLE_MAP={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function addAnimation(e,t){var n=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function createCompoundPathCSSAnimation(e,t,n){var r,o,i=e.shape.paths,a={};if(each$f(i,function(e){var t=createBrushScope(n.zrId);t.animation=!0,createCSSAnimation(e,{},t,!0);var i=t.cssAnims,s=t.cssNodes,l=keys(i),u=l.length;if(u){var c=i[o=l[u-1]];for(var d in c){var p=c[d];a[d]=a[d]||{d:""},a[d].d+=p.d||""}for(var h in s){var f=s[h].animation;f.indexOf(o)>=0&&(r=f)}}}),r){t.d=!1;var s=addAnimation(a,n);return r.replace(o,s)}}function getEasingFunc(e){return isString(e)?EASING_MAP[e]?"cubic-bezier("+EASING_MAP[e]+")":createCubicEasingFunc(e)?e:"":""}function createCSSAnimation(e,t,n,r){var o=e.animators,i=o.length,a=[];if(e instanceof CompoundPath){if(m=createCompoundPathCSSAnimation(e,t,n))a.push(m);else if(!i)return}else if(!i)return;for(var s={},l=0;l<i;l++){var u=o[l],c=[u.getMaxTime()/1e3+"s"],d=getEasingFunc(u.getClip().easing),p=u.getDelay();d?c.push(d):c.push("linear"),p&&c.push(p/1e3+"s"),u.getLoop()&&c.push("infinite");var h=c.join(" ");s[h]=s[h]||[h,[]],s[h][1].push(u)}function f(o){var i,a=o[1],s=a.length,l={},u={},c={},d="animation-timing-function";function p(e,t,n){for(var r=e.getTracks(),o=e.getMaxTime(),i=0;i<r.length;i++){var a=r[i];if(a.needsAnimate()){var s=a.keyframes,l=a.propName;if(n&&(l=n(l)),l)for(var u=0;u<s.length;u++){var c=s[u],p=Math.round(c.time/o*100)+"%",h=getEasingFunc(c.easing),f=c.rawValue;(isString(f)||isNumber(f))&&(t[p]=t[p]||{},t[p][l]=c.rawValue,h&&(t[p][d]=h))}}}}for(var h=0;h<s;h++){(T=(b=a[h]).targetName)?"shape"===T&&p(b,u):!r&&p(b,l)}for(var f in l){var g={};copyTransform(g,e),extend$2(g,l[f]);var m=getSRTTransformString(g),y=l[f][d];c[f]=m?{transform:m}:{},setTransformOrigin(c[f],g),y&&(c[f][d]=y)}var v=!0;for(var f in u){c[f]=c[f]||{};var _=!i;y=u[f][d];_&&(i=new PathProxy);var x=i.len();i.reset(),c[f].d=buildPathString(e,u[f],i);var S=i.len();if(!_&&x!==S){v=!1;break}y&&(c[f][d]=y)}if(!v)for(var f in c)delete c[f].d;if(!r)for(h=0;h<s;h++){var b,T;"style"===(T=(b=a[h]).targetName)&&p(b,c,function(e){return ANIMATE_STYLE_MAP[e]})}var A,w=keys(c),C=!0;for(h=1;h<w.length;h++){var E=w[h-1],M=w[h];if(c[E][transformOriginKey]!==c[M][transformOriginKey]){C=!1;break}A=c[E][transformOriginKey]}if(C&&A){for(var f in c)c[f][transformOriginKey]&&delete c[f][transformOriginKey];t[transformOriginKey]=A}if(filter(w,function(e){return keys(c[e]).length>0}).length)return addAnimation(c,n)+" "+o[0]+" both"}for(var g in s){var m;(m=f(s[g]))&&a.push(m)}if(a.length){var y=n.zrId+"-cls-"+getClassId();n.cssNodes["."+y]={animation:a.join(",")},t.class=y}}function createCSSEmphasis(e,t,n){if(!e.ignore)if(e.isSilent()){setClassAttribute(u={"pointer-events":"none"},t,n)}else{var r=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},o=r.fill;if(!o){var i=e.style&&e.style.fill,a=e.states.select&&e.states.select.style&&e.states.select.style.fill,s=e.currentStates.indexOf("select")>=0&&a||i;s&&(o=liftColor(s))}var l=r.lineWidth;if(l)l/=!r.strokeNoScale&&e.transform?e.transform[0]:1;var u={cursor:"pointer"};o&&(u.fill=o),r.stroke&&(u.stroke=r.stroke),l&&(u["stroke-width"]=l),setClassAttribute(u,t,n)}}function setClassAttribute(e,t,n,r){var o=JSON.stringify(e),i=n.cssStyleCache[o];i||(i=n.zrId+"-cls-"+getClassId(),n.cssStyleCache[o]=i,n.cssNodes["."+i+":hover"]=e),t.class=t.class?t.class+" "+i:i}var round=Math.round;function isImageLike(e){return e&&isString(e.src)}function isCanvasLike(e){return e&&isFunction(e.toDataURL)}function setStyleAttrs(e,t,n,r){mapStyleToAttrs(function(o,i){var a="fill"===o||"stroke"===o;a&&isGradient(i)?setGradient(t,e,o,r):a&&isPattern(i)?setPattern(n,e,o,r):e[o]=i,a&&r.ssr&&"none"===i&&(e["pointer-events"]="visible")},t,n,!1),setShadow(n,e,r)}function setMetaData(e,t){var n=getElementSSRData(t);n&&(n.each(function(t,n){null!=t&&(e[(META_DATA_PREFIX+n).toLowerCase()]=t+"")}),t.isSilent()&&(e[META_DATA_PREFIX+"silent"]="true"))}function noRotateScale(e){return isAroundZero(e[0]-1)&&isAroundZero(e[1])&&isAroundZero(e[2])&&isAroundZero(e[3]-1)}function noTranslate(e){return isAroundZero(e[4])&&isAroundZero(e[5])}function setTransform(e,t,n){if(t&&(!noTranslate(t)||!noRotateScale(t))){var r=1e4;e.transform=noRotateScale(t)?"translate("+round(t[4]*r)/r+" "+round(t[5]*r)/r+")":getMatrixStr(t)}}function convertPolyShape(e,t,n){for(var r=e.points,o=[],i=0;i<r.length;i++)o.push(round(r[i][0]*n)/n),o.push(round(r[i][1]*n)/n);t.points=o.join(" ")}function validatePolyShape(e){return!e.smooth}function createAttrsConvert(e){var t=map$1(e,function(e){return"string"==typeof e?[e,e]:e});return function(e,n,r){for(var o=0;o<t.length;o++){var i=t[o],a=e[i[0]];null!=a&&(n[i[1]]=round(a*r)/r)}}}var builtinShapesDef={circle:[createAttrsConvert(["cx","cy","r"])],polyline:[convertPolyShape,validatePolyShape],polygon:[convertPolyShape,validatePolyShape]};function hasShapeAnimation(e){for(var t=e.animators,n=0;n<t.length;n++)if("shape"===t[n].targetName)return!0;return!1}function brushSVGPath(e,t){var n=e.style,r=e.shape,o=builtinShapesDef[e.type],i={},a=t.animation,s="path",l=e.style.strokePercent,u=t.compress&&getPathPrecision(e)||4;if(!o||t.willUpdate||o[1]&&!o[1](r)||a&&hasShapeAnimation(e)||l<1){var c=!e.path||e.shapeChanged();e.path||e.createPathProxy();var d=e.path;c&&(d.beginPath(),e.buildPath(d,e.shape),e.pathUpdated());var p=d.getVersion(),h=e,f=h.__svgPathBuilder;h.__svgPathVersion===p&&f&&l===h.__svgPathStrokePercent||(f||(f=h.__svgPathBuilder=new SVGPathRebuilder),f.reset(u),d.rebuildPath(f,l),f.generateStr(),h.__svgPathVersion=p,h.__svgPathStrokePercent=l),i.d=f.getStr()}else{s=e.type;var g=Math.pow(10,u);o[0](r,i,g)}return setTransform(i,e.transform),setStyleAttrs(i,n,e,t),setMetaData(i,e),t.animation&&createCSSAnimation(e,i,t),t.emphasis&&createCSSEmphasis(e,i,t),createVNode(s,e.id+"",i)}function brushSVGImage(e,t){var n=e.style,r=n.image;if(r&&!isString(r)&&(isImageLike(r)?r=r.src:isCanvasLike(r)&&(r=r.toDataURL())),r){var o=n.x||0,i=n.y||0,a={href:r,width:n.width,height:n.height};return o&&(a.x=o),i&&(a.y=i),setTransform(a,e.transform),setStyleAttrs(a,n,e,t),setMetaData(a,e),t.animation&&createCSSAnimation(e,a,t),createVNode("image",e.id+"",a)}}function brushSVGTSpan(e,t){var n=e.style,r=n.text;if(null!=r&&(r+=""),r&&!isNaN(n.x)&&!isNaN(n.y)){var o=n.font||DEFAULT_FONT,i=n.x||0,a=adjustTextY$1(n.y||0,getLineHeight(o),n.textBaseline),s={"dominant-baseline":"central","text-anchor":TEXT_ALIGN_TO_ANCHOR[n.textAlign]||n.textAlign};if(hasSeparateFont(n)){var l="",u=n.fontStyle,c=parseFontSize(n.fontSize);if(!parseFloat(c))return;var d=n.fontFamily||DEFAULT_FONT_FAMILY,p=n.fontWeight;l+="font-size:"+c+";font-family:"+d+";",u&&"normal"!==u&&(l+="font-style:"+u+";"),p&&"normal"!==p&&(l+="font-weight:"+p+";"),s.style=l}else s.style="font: "+o;return r.match(/\s/)&&(s["xml:space"]="preserve"),i&&(s.x=i),a&&(s.y=a),setTransform(s,e.transform),setStyleAttrs(s,n,e,t),setMetaData(s,e),t.animation&&createCSSAnimation(e,s,t),createVNode("text",e.id+"",s,void 0,r)}}function brush(e,t){return e instanceof Path?brushSVGPath(e,t):e instanceof ZRImage?brushSVGImage(e,t):e instanceof TSpan?brushSVGTSpan(e,t):void 0}function setShadow(e,t,n){var r=e.style;if(hasShadow(r)){var o=getShadowKey(e),i=n.shadowCache,a=i[o];if(!a){var s=e.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=r.shadowOffsetX||0,d=r.shadowOffsetY||0,p=r.shadowBlur,h=normalizeColor(r.shadowColor),f=h.opacity,g=h.color,m=p/2/l+" "+p/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=createVNode("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[createVNode("feDropShadow","",{dx:c/l,dy:d/u,stdDeviation:m,"flood-color":g,"flood-opacity":f})]),i[o]=a}t.filter=getIdURL(a)}}function setGradient(e,t,n,r){var o,i=e[n],a={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(isLinearGradient(i))o="linearGradient",a.x1=i.x,a.y1=i.y,a.x2=i.x2,a.y2=i.y2;else{if(!isRadialGradient(i))return;o="radialGradient",a.cx=retrieve2(i.x,.5),a.cy=retrieve2(i.y,.5),a.r=retrieve2(i.r,.5)}for(var s=i.colorStops,l=[],u=0,c=s.length;u<c;++u){var d=100*round4(s[u].offset)+"%",p=normalizeColor(s[u].color),h=p.color,f=p.opacity,g={offset:d};g["stop-color"]=h,f<1&&(g["stop-opacity"]=f),l.push(createVNode("stop",u+"",g))}var m=vNodeToString(createVNode(o,"",a,l)),y=r.gradientCache,v=y[m];v||(v=r.zrId+"-g"+r.gradientIdx++,y[m]=v,a.id=v,r.defs[v]=createVNode(o,v,a,l)),t[n]=getIdURL(v)}function setPattern(e,t,n,r){var o,i=e.style[n],a=e.getBoundingRect(),s={},l=i.repeat,u="no-repeat"===l,c="repeat-x"===l,d="repeat-y"===l;if(isImagePattern(i)){var p=i.imageWidth,h=i.imageHeight,f=void 0,g=i.image;if(isString(g)?f=g:isImageLike(g)?f=g.src:isCanvasLike(g)&&(f=g.toDataURL()),"undefined"==typeof Image){var m="Image width/height must been given explictly in svg-ssr renderer.";assert(p,m),assert(h,m)}else if(null==p||null==h){var y=function(e,t){if(e){var n=e.elm,r=p||t.width,o=h||t.height;"pattern"===e.tag&&(c?(o=1,r/=a.width):d&&(r=1,o/=a.height)),e.attrs.width=r,e.attrs.height=o,n&&(n.setAttribute("width",r),n.setAttribute("height",o))}},v=createOrUpdateImage(f,null,e,function(e){u||y(b,e),y(o,e)});v&&v.width&&v.height&&(p=p||v.width,h=h||v.height)}o=createVNode("image","img",{href:f,width:p,height:h}),s.width=p,s.height=h}else i.svgElement&&(o=clone$6(i.svgElement),s.width=i.svgWidth,s.height=i.svgHeight);if(o){var _,x;u?_=x=1:c?(x=1,_=s.width/a.width):d?(_=1,x=s.height/a.height):s.patternUnits="userSpaceOnUse",null==_||isNaN(_)||(s.width=_),null==x||isNaN(x)||(s.height=x);var S=getSRTTransformString(i);S&&(s.patternTransform=S);var b=createVNode("pattern","",s,[o]),T=vNodeToString(b),A=r.patternCache,w=A[T];w||(w=r.zrId+"-p"+r.patternIdx++,A[T]=w,s.id=w,b=r.defs[w]=createVNode("pattern",w,s,[o])),t[n]=getIdURL(w)}}function setClipPath(e,t,n){var r=n.clipPathCache,o=n.defs,i=r[e.id];if(!i){var a={id:i=n.zrId+"-c"+n.clipPathIdx++};r[e.id]=i,o[i]=createVNode("clipPath",i,a,[brushSVGPath(e,n)])}t["clip-path"]=getIdURL(i)}function createTextNode(e){return document.createTextNode(e)}function insertBefore(e,t,n){e.insertBefore(t,n)}function removeChild(e,t){e.removeChild(t)}function appendChild(e,t){e.appendChild(t)}function parentNode(e){return e.parentNode}function nextSibling(e){return e.nextSibling}function setTextContent(e,t){e.textContent=t}var colonChar=58,xChar=120,emptyNode=createVNode("","");function isUndef(e){return void 0===e}function isDef(e){return void 0!==e}function createKeyToOldIdx(e,t,n){for(var r={},o=t;o<=n;++o){var i=e[o].key;void 0!==i&&(r[i]=o)}return r}function sameVnode(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function createElm(e){var t,n=e.children,r=e.tag;if(isDef(r)){var o=e.elm=createElement(r);if(updateAttrs(emptyNode,e),isArray$1(n))for(t=0;t<n.length;++t){var i=n[t];null!=i&&appendChild(o,createElm(i))}else isDef(e.text)&&!isObject$3(e.text)&&appendChild(o,createTextNode(e.text))}else e.elm=createTextNode(e.text);return e.elm}function addVnodes(e,t,n,r,o){for(;r<=o;++r){var i=n[r];null!=i&&insertBefore(e,createElm(i),t)}}function removeVnodes(e,t,n,r){for(;n<=r;++n){var o=t[n];if(null!=o)if(isDef(o.tag))removeChild(parentNode(o.elm),o.elm);else removeChild(e,o.elm)}}function updateAttrs(e,t){var n,r=t.elm,o=e&&e.attrs||{},i=t.attrs||{};if(o!==i){for(n in i){var a=i[n];o[n]!==a&&(!0===a?r.setAttribute(n,""):!1===a?r.removeAttribute(n):"style"===n?r.style.cssText=a:n.charCodeAt(0)!==xChar?r.setAttribute(n,a):"xmlns:xlink"===n||"xmlns"===n?r.setAttributeNS(XMLNS,n,a):n.charCodeAt(3)===colonChar?r.setAttributeNS(XML_NAMESPACE,n,a):n.charCodeAt(5)===colonChar?r.setAttributeNS(XLINKNS,n,a):r.setAttribute(n,a))}for(n in o)n in i||r.removeAttribute(n)}}function updateChildren(e,t,n){for(var r,o,i,a=0,s=0,l=t.length-1,u=t[0],c=t[l],d=n.length-1,p=n[0],h=n[d];a<=l&&s<=d;)null==u?u=t[++a]:null==c?c=t[--l]:null==p?p=n[++s]:null==h?h=n[--d]:sameVnode(u,p)?(patchVnode(u,p),u=t[++a],p=n[++s]):sameVnode(c,h)?(patchVnode(c,h),c=t[--l],h=n[--d]):sameVnode(u,h)?(patchVnode(u,h),insertBefore(e,u.elm,nextSibling(c.elm)),u=t[++a],h=n[--d]):sameVnode(c,p)?(patchVnode(c,p),insertBefore(e,c.elm,u.elm),c=t[--l],p=n[++s]):(isUndef(r)&&(r=createKeyToOldIdx(t,a,l)),isUndef(o=r[p.key])||(i=t[o]).tag!==p.tag?insertBefore(e,createElm(p),u.elm):(patchVnode(i,p),t[o]=void 0,insertBefore(e,i.elm,u.elm)),p=n[++s]);(a<=l||s<=d)&&(a>l?addVnodes(e,null==n[d+1]?null:n[d+1].elm,n,s,d):removeVnodes(e,t,a,l))}function patchVnode(e,t){var n=t.elm=e.elm,r=e.children,o=t.children;e!==t&&(updateAttrs(e,t),isUndef(t.text)?isDef(r)&&isDef(o)?r!==o&&updateChildren(n,r,o):isDef(o)?(isDef(e.text)&&setTextContent(n,""),addVnodes(n,null,o,0,o.length-1)):isDef(r)?removeVnodes(n,r,0,r.length-1):isDef(e.text)&&setTextContent(n,""):e.text!==t.text&&(isDef(r)&&removeVnodes(n,r,0,r.length-1),setTextContent(n,t.text)))}function patch(e,t){if(sameVnode(e,t))patchVnode(e,t);else{var n=e.elm,r=parentNode(n);createElm(t),null!==r&&(insertBefore(r,t.elm,nextSibling(n)),removeVnodes(r,[e],0,0))}return t}var svgId=0,SVGPainter=function(){function e(e,t,n){if(this.type="svg",this.refreshHover=createMethodNotSupport(),this.configLayer=createMethodNotSupport(),this.storage=t,this._opts=n=extend$2({},n),this.root=e,this._id="zr"+svgId++,this._oldVNode=createSVGVNode(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement("div");r.style.cssText="position:relative;overflow:hidden";var o=this._svgDom=this._oldVNode.elm=createElement("svg");updateAttrs(null,this._oldVNode),r.appendChild(o),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",patch(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return brush(e,createBrushScope(this._id))},e.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,o=createBrushScope(this._id);o.animation=e.animation,o.willUpdate=e.willUpdate,o.compress=e.compress,o.emphasis=e.emphasis,o.ssr=this._opts.ssr;var i=[],a=this._bgVNode=createBackgroundVNode(n,r,this._backgroundColor,o);a&&i.push(a);var s=e.compress?null:this._mainVNode=createVNode("g","main",{},[]);this._paintList(t,o,s?s.children:i),s&&i.push(s);var l=map$1(keys(o.defs),function(e){return o.defs[e]});if(l.length&&i.push(createVNode("defs","defs",{},l)),e.animation){var u=getCssString(o.cssNodes,o.cssAnims,{newline:!0});if(u){var c=createVNode("style","stl",{},[],u);i.push(c)}}return createSVGVNode(n,r,i,e.useViewBox)},e.prototype.renderToString=function(e){return e=e||{},vNodeToString(this.renderToVNode({animation:retrieve2(e.cssAnimation,!0),emphasis:retrieve2(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:retrieve2(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r,o,i=e.length,a=[],s=0,l=0,u=0;u<i;u++){var c=e[u];if(!c.invisible){var d=c.__clipPaths,p=d&&d.length||0,h=o&&o.length||0,f=void 0;for(f=Math.max(p-1,h-1);f>=0&&(!d||!o||d[f]!==o[f]);f--);for(var g=h-1;g>f;g--)r=a[--s-1];for(var m=f+1;m<p;m++){var y={};setClipPath(d[m],y,t);var v=createVNode("g","clip-g-"+l++,y,[]);(r?r.children:n).push(v),a[s++]=v,r=v}o=d;var _=brush(c,t);_&&(r?r.children:n).push(_)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,o=this._viewport;if(null!=e&&(n.width=e),null!=t&&(n.height=t),r&&o&&(o.style.display="none",e=getSize$1(r,0,n),t=getSize$1(r,1,n),o.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,o){var i=o.style;i.width=e+"px",i.height=t+"px"}if(isPattern(this._backgroundColor))this.refresh();else{var a=this._svgDom;a&&(a.setAttribute("width",e),a.setAttribute("height",t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute("width",e),s.setAttribute("height",t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n="data:image/svg+xml;";return e?(t=encodeBase64(t))&&n+"base64,"+t:n+"charset=UTF-8,"+encodeURIComponent(t)},e}();function createMethodNotSupport(e){return function(){}}function createBackgroundVNode(e,t,n,r){var o;if(n&&"none"!==n)if(o=createVNode("rect","bg",{width:e,height:t,x:"0",y:"0"}),isGradient(n))setGradient({fill:n},o.attrs,"fill",r);else if(isPattern(n))setPattern({style:{fill:n},dirty:noop,getBoundingRect:function(){return{width:e,height:t}}},o.attrs,"fill",r);else{var i=normalizeColor(n),a=i.color,s=i.opacity;o.attrs.fill=a,s<1&&(o.attrs["fill-opacity"]=s)}return o}function install$1(e){e.registerPainter("svg",SVGPainter)}function createDom(e,t,n){var r=platformApi.createCanvas(),o=t.getWidth(),i=t.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=o+"px",a.height=i+"px",r.setAttribute("data-zr-dom-id",e)),r.width=o*n,r.height=i*n,r}var Layer=function(e){function t(t,n,r){var o,i=e.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,r=r||devicePixelRatio,"string"==typeof t?o=createDom(t,n,r):isObject$3(t)&&(t=(o=t).id),i.id=t,i.dom=o;var a=o.style;return a&&(disableUserSelect(o),o.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),i.painter=n,i.dpr=r,i}return __extends(t,e),t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=createDom("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o,i=[],a=this.maxRepaintRectCount,s=!1,l=new BoundingRect(0,0,0,0);function u(e){if(e.isFinite()&&!e.isZero())if(0===i.length){(t=new BoundingRect(0,0,0,0)).copy(e),i.push(t)}else{for(var t,n=!1,r=1/0,o=0,u=0;u<i.length;++u){var c=i[u];if(c.intersect(e)){var d=new BoundingRect(0,0,0,0);d.copy(c),d.union(e),i[u]=d,n=!0;break}if(s){l.copy(e),l.union(c);var p=e.width*e.height,h=c.width*c.height,f=l.width*l.height-p-h;f<r&&(r=f,o=u)}}if(s&&(i[o].union(e),n=!0),!n)(t=new BoundingRect(0,0,0,0)).copy(e),i.push(t);s||(s=i.length>=a)}}for(var c=this.__startIndex;c<this.__endIndex;++c){if(h=e[c]){var d=h.shouldBePainted(n,r,!0,!0);(f=h.__isRendered&&(h.__dirty&REDRAW_BIT||!d)?h.getPrevPaintRect():null)&&u(f);var p=d&&(h.__dirty&REDRAW_BIT||!h.__isRendered)?h.getPaintRect():null;p&&u(p)}}for(c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var h,f;d=(h=t[c])&&h.shouldBePainted(n,r,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered)(f=h.getPrevPaintRect())&&u(f)}do{o=!1;for(c=0;c<i.length;)if(i[c].isZero())i.splice(c,1);else{for(var g=c+1;g<i.length;)i[c].intersect(i[g])?(o=!0,i[c].union(i[g]),i.splice(g,1)):g++;c++}}while(o);return this._paintRects=i,i},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,o=r.style,i=this.domBack;o&&(o.width=e+"px",o.height=t+"px"),r.width=e*n,r.height=t*n,i&&(i.width=e*n,i.height=t*n,1!==n&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,o=this.ctx,i=r.width,a=r.height;t=t||this.clearColor;var s=this.motionBlur&&!e,l=this.lastFrameAlpha,u=this.dpr,c=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,i/u,a/u));var d=this.domBack;function p(e,n,r,i){if(o.clearRect(e,n,r,i),t&&"transparent"!==t){var a=void 0;if(isGradientObject(t))a=(t.global||t.__width===r&&t.__height===i)&&t.__canvasGradient||getCanvasGradient(o,t,{x:0,y:0,width:r,height:i}),t.__canvasGradient=a,t.__width=r,t.__height=i;else isImagePatternObject(t)&&(t.scaleX=t.scaleX||u,t.scaleY=t.scaleY||u,a=createCanvasPattern(o,t,{dirty:function(){c.setUnpainted(),c.painter.refresh()}}));o.save(),o.fillStyle=a||t,o.fillRect(e,n,r,i),o.restore()}s&&(o.save(),o.globalAlpha=l,o.drawImage(d,e,n,r,i),o.restore())}!n||s?p(0,0,i,a):n.length&&each$f(n,function(e){p(e.x*u,e.y*u,e.width*u,e.height*u)})},t}(Eventful),HOVER_LAYER_ZLEVEL=1e5,CANVAS_ZLEVEL=314159,EL_AFTER_INCREMENTAL_INC=.01,INCREMENTAL_INC=.001;function isLayerValid(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}function createRoot(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}var CanvasPainter=function(){function e(e,t,n,r){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var o=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=extend$2({},n||{}),this.dpr=n.devicePixelRatio||devicePixelRatio,this._singleCanvas=o,this.root=e,e.style&&(disableUserSelect(e),e.innerHTML=""),this.storage=t;var i=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(o){var s=e,l=s.width,u=s.height;null!=n.width&&(l=n.width),null!=n.height&&(u=n.height),this.dpr=n.devicePixelRatio||1,s.width=l*this.dpr,s.height=u*this.dpr,this._width=l,this._height=u;var c=new Layer(s,this,this.dpr);c.__builtin__=!0,c.initContext(),a[CANVAS_ZLEVEL]=c,c.zlevel=CANVAS_ZLEVEL,i.push(CANVAS_ZLEVEL),this._domRoot=e}else{this._width=getSize$1(e,0,n),this._height=getSize$1(e,1,n);var d=this._domRoot=createRoot(this._width,this._height);e.appendChild(d)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var o=0;o<r.length;o++){var i=r[o],a=this._layers[i];if(!a.__builtin__&&a.refresh){var s=0===o?this._backgroundColor:null;a.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){for(var r,o={inHover:!0,viewWidth:this._width,viewHeight:this._height},i=0;i<t;i++){var a=e[i];a.__inHover&&(n||(n=this._hoverlayer=this.getLayer(HOVER_LAYER_ZLEVEL)),r||(r=n.ctx).save(),brush$1(r,a,o,i===t-1))}r&&r.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(HOVER_LAYER_ZLEVEL)},e.prototype.paintOne=function(e,t){brushSingle(e,t)},e.prototype._paintList=function(e,t,n,r){if(this._redrawId===r){n=n||!1,this._updateLayerStatus(e);var o=this._doPaintList(e,t,n),i=o.finished,a=o.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(e),i)this.eachLayer(function(e){e.afterBrush&&e.afterBrush()});else{var s=this;requestAnimationFrame$1(function(){s._paintList(e,t,n,r)})}}},e.prototype._compositeManually=function(){var e=this.getLayer(CANVAS_ZLEVEL).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer(function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)})},e.prototype._doPaintList=function(e,t,n){for(var r=this,o=[],i=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._zlevelList[a],l=this._layers[s];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&o.push(l)}for(var u=!0,c=!1,d=function(a){var s,l=o[a],d=l.ctx,h=i&&l.createRepaintRects(e,t,p._width,p._height),f=n?l.__startIndex:l.__drawIndex,g=!n&&l.incremental&&Date.now,m=g&&Date.now(),y=l.zlevel===p._zlevelList[0]?p._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,y,h);else if(f===l.__startIndex){var v=e[f];v.incremental&&v.notClear&&!n||l.clear(!1,y,h)}-1===f&&(console.error("For some unknown reason. drawIndex is -1"),f=l.__startIndex);var _=function(t){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(s=f;s<l.__endIndex;s++){var o=e[s];if(o.__inHover&&(c=!0),r._doPaintEl(o,l,i,t,n,s===l.__endIndex-1),g)if(Date.now()-m>15)break}n.prevElClipPaths&&d.restore()};if(h)if(0===h.length)s=l.__endIndex;else for(var x=p.dpr,S=0;S<h.length;++S){var b=h[S];d.save(),d.beginPath(),d.rect(b.x*x,b.y*x,b.width*x,b.height*x),d.clip(),_(b),d.restore()}else d.save(),_(),d.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(u=!1)},p=this,h=0;h<o.length;h++)d(h);return env.wxa&&each$f(this._layers,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),{finished:u,needsRefreshHover:c}},e.prototype._doPaintEl=function(e,t,n,r,o,i){var a=t.ctx;if(n){var s=e.getPaintRect();(!r||s&&s.intersect(r))&&(brush$1(a,e,o,i),e.setPrevPaintRect(s))}else brush$1(a,e,o,i)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=CANVAS_ZLEVEL);var n=this._layers[e];return n||((n=new Layer("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?merge(n,this._layerConfig[e],!0):this._layerConfig[e-EL_AFTER_INCREMENTAL_INC]&&merge(n,this._layerConfig[e-EL_AFTER_INCREMENTAL_INC],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},e.prototype.insertLayer=function(e,t){var n=this._layers,r=this._zlevelList,o=r.length,i=this._domRoot,a=null,s=-1;if(!n[e]&&isLayerValid(t)){if(o>0&&e>r[0]){for(s=0;s<o-1&&!(r[s]<e&&r[s+1]>e);s++);a=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(a){var l=a.dom;l.nextSibling?i.insertBefore(t.dom,l.nextSibling):i.appendChild(t.dom)}else i.firstChild?i.insertBefore(t.dom,i.firstChild):i.appendChild(t.dom);t.painter||(t.painter=this)}},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var o=n[r];e.call(t,this._layers[o],o)}},e.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var o=n[r],i=this._layers[o];i.__builtin__&&e.call(t,i,o)}},e.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var o=n[r],i=this._layers[o];i.__builtin__||e.call(t,i,o)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(e){function t(e){i&&(i.__endIndex!==e&&(i.__dirty=!0),i.__endIndex=e)}if(this.eachBuiltinLayer(function(e,t){e.__dirty=e.__used=!1}),this._singleCanvas)for(var n=1;n<e.length;n++){if((s=e[n]).zlevel!==e[n-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}}var r,o,i=null,a=0;for(o=0;o<e.length;o++){var s,l=(s=e[o]).zlevel,u=void 0;r!==l&&(r=l,a=0),s.incremental?((u=this.getLayer(l+INCREMENTAL_INC,this._needsManuallyCompositing)).incremental=!0,a=1):u=this.getLayer(l+(a>0?EL_AFTER_INCREMENTAL_INC:0),this._needsManuallyCompositing),u.__builtin__||logError("ZLevel "+l+" has been used by unkown layer "+u.id),u!==i&&(u.__used=!0,u.__startIndex!==o&&(u.__dirty=!0),u.__startIndex=o,u.incremental?u.__drawIndex=-1:u.__drawIndex=o,t(o),i=u),s.__dirty&REDRAW_BIT&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=o))}t(o),this.eachBuiltinLayer(function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,each$f(this._layers,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?merge(n[e],t,!0):n[e]=t;for(var r=0;r<this._zlevelList.length;r++){var o=this._zlevelList[r];if(o===e||o===e+EL_AFTER_INCREMENTAL_INC)merge(this._layers[o],n[e],!0)}}},e.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,r=t[e];r&&(r.dom.parentNode.removeChild(r.dom),delete t[e],n.splice(indexOf(n,e),1))},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var r=this._opts,o=this.root;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=getSize$1(o,0,r),t=getSize$1(o,1,r),n.style.display="",this._width!==e||t!==this._height){for(var i in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(i)&&this._layers[i].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(CANVAS_ZLEVEL).resize(e,t)}return this},e.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[CANVAS_ZLEVEL].dom;var t=new Layer("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,o=t.dom.height;this.eachLayer(function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,o):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else for(var i={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++){var u=a[s];brush$1(n,u,i,s===l-1)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function install(e){e.registerPainter("canvas",CanvasPainter)}var isDark=useDark();use([install$S,install$k,install$r,installLabelLayout,install$8,install,installUniversalTransition,install$a,install$1,install$n,install$b,install$R,install$Q,install$K,install$i,install$2,install$5,install$j,install$l]);var __unplugin_components_0$3=exports("eY",defineComponent({name:"BtEchart",props:{width:{type:String,default:"100%"},height:{type:String,default:"100%"},options:{type:Object}},setup:function(e,t){var n=t.expose,r=ref(),o=shallowRef();watch(function(){return e.options},function(e){var t;o.value&&(null===(t=o.value)||void 0===t||t.setOption(_objectSpread(_objectSpread({},e),{},{backgroundColor:(isDark.value,"transparent")})))});var i=function(){var e;return null===(e=o.value)||void 0===e?void 0:e.resize()};return onMounted(function(){var t;e.options&&(o.value=init$1(r.value,isDark.value?"dark":"light"),null===(t=o.value)||void 0===t||t.setOption(_objectSpread(_objectSpread({},e.options),{},{backgroundColor:(isDark.value,"transparent")})),window.addEventListener("resize",i),i())}),onUnmounted(function(){var e;null===(e=o.value)||void 0===e||e.dispose(),window.removeEventListener("resize",i)}),n({chart:o}),function(){return createVNode$1("div",{ref:r,style:{width:e.width,height:e.height}},null)}}})),useECharts=exports("dq",function(e){var t,n=ref(),r=toRaw(e),o=r.options,i=(r.defalut,shallowRef());return isFunction$1(o)?i.value=o([],[[]]):i.value=o,{BtECharts:function(e){return createVNode$1(__unplugin_components_0$3,mergeProps(e,{ref:n,options:i.value}),null)},getEChart:(t=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,nextTick();case 1:return e.a(2,n.value.chart)}},e)})),function(){return t.apply(this,arguments)}),setOption:function(e){return n.value.chart.setOption(e)},setQuickOption:function(e,t){null==n||n.value.chart.setOption({xAxis:{data:e},series:t.map(function(e){return{data:e}})})}}});function _isSlot$6(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!isVNode$1(e)}var __unplugin_components_2$5=exports("eg",defineComponent({name:"BtForm",props:_objectSpread({},formProps),setup:function(e,t){var n=t.attrs,r=t.slots,o=t.expose,i=ref(),a=reactive({});return o(a),onMounted(function(){Object.assign(a,_objectSpread({},i.value))}),console.log("fopropsrmRef",e),function(){return createVNode$1(ElForm,mergeProps({ref:i},n,{onSubmit:function(e){return e.preventDefault()}},e),_isSlot$6(r)?r:{default:function(){return[r]}})}}}));function _isSlot$5(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!isVNode$1(e)}var BtFormItem=exports("B",defineComponent({name:"BtFormItem",props:_objectSpread({},formItemProps),setup:function(e,t){var n=t.attrs,r=t.slots;return function(){return createVNode$1(ElFormItem,mergeProps(n,e),_isSlot$5(r)?r:{default:function(){return[r]}})}}})),__unplugin_components_0$2=exports("eO",defineComponent({name:"BtCheckbox",props:_objectSpread(_objectSpread({},checkboxProps),{},{options:{type:Array,required:!0},type:{type:String,default:"checkbox"}}),setup:function(e,t){var n=t.attrs;t.slots;return function(){return createVNode$1(ElCheckboxGroup,mergeProps(n,e),{default:function(){return["checkbox"===e.type?e.options.map(function(e,t){return e.isHide?null:createVNode$1(ElCheckbox,{key:t,value:e.value,disabled:e.disabled},{default:function(){return[e.label]}})}):e.options.map(function(e,t){return e.isHide?null:createVNode$1(ElCheckboxButton,{key:t,modelValue:e.value,"onUpdate:modelValue":function(t){return e.value=t},disabled:e.disabled},{default:function(){return[e.label]}})})]}})}}})),__unplugin_components_10=exports("cP",defineComponent({name:"BtHelp",props:{options:{type:Array,default:function(){return[]}},listStyle:{type:String,default:"disc"}},setup:function(e,t){var n=t.attrs,r=t.slots,o=function(e){if(isObject$4(e)&&has$2("__name",e))return e;if(isFunction$1(e)){var t=e();return isPromise(t)?defineAsyncComponent(function(){return t}):t}return e},i=e.options instanceof Function?e.options():e.options;return watch(function(){return e.options},function(e){e instanceof Function||(i=e)}),function(){var t;return createVNode$1("ul",mergeProps({class:"text-secondary mt-[2px] leading-[2rem] text-small ml-[20px] list-".concat(e.listStyle)},n),[i.map(function(e,t){return e.isHtml?createVNode$1("li",{key:t,innerHTML:e.content},null):createVNode$1("li",{key:t},[o(e.content)])}),null==r||null===(t=r.default)||void 0===t?void 0:t.call(r)])}}})),__unplugin_components_2$4=exports("cO",defineComponent({name:"BtInput",props:_objectSpread(_objectSpread({width:{type:[String,Number],default:"100%"},textType:{type:String,default:""},prependText:{type:String,default:""}},inputProps),{},{modelValue:{type:[String,Number],default:""}}),emits:["iconClick","focus","blur","input","keyup","change"],setup:function(e,t){var n=t.slots,r=t.emit,o=t.attrs;ref(e.modelValue);var i=ref(!1),a=function(e){r("focus",e),i.value=!0},s=function(e){r("blur",e),i.value=!1},l=function(e){r("input",e)},u=function(e){r("change",e)},c=function(e){return r("keyup",e)};return function(){return createVNode$1("div",{class:"".concat(n.unit?"flex items-center":"")},[createVNode$1(ElInput,mergeProps(e,{onInput:l,onChange:u,onFocus:a,onBlur:s,onKeyup:c},o,{style:{width:e.width}}),_objectSpread(_objectSpread(_objectSpread({},n),n.append||e.textType?{append:function(){return n.append?n.append():createVNode$1("span",null,[e.textType])}}:{}),n.prepend||e.prependText?{prepend:function(){return n.prepend?n.prepend():createVNode$1("span",null,[e.prependText])}}:{})),n.unit&&createVNode$1("div",{class:"text-small text-secondary ml-[0.4rem]"},[n.unit()])])}}})),__unplugin_components_5$1=exports("db",defineComponent({props:_objectSpread(_objectSpread({},radioGroupProps),{},{options:{type:Array,required:!0},type:{type:String,default:"radio"}}),setup:function(e,t){var n=t.attrs;return function(){return createVNode$1(ElRadioGroup,mergeProps({class:"flex items-center"},n,e),{default:function(){return["radio"===e.type?e.options.map(function(e,t){return e.isHide?null:createVNode$1(ElRadio,{key:t,value:e.value,disabled:e.disabled},{default:function(){return[e.label]}})}):e.options.map(function(e,t){return e.isHide?null:createVNode$1(ElRadioButton,{key:t,value:e.value,disabled:e.disabled},{default:function(){return[e.label]}})})]}})}}})),__unplugin_components_2$3=exports("W",defineComponent({props:{disabled:{type:Boolean,default:!1},options:{type:Array}},setup:function(e,t){var n=t.attrs,r=t.slots;return function(){return createVNode$1(ElSelect,mergeProps(n,{class:!0===n.multiple||has$2("multiple",n)?"bt-multiple-select":"",disabled:e.disabled}),{default:function(){var t,n,o,i,a,s,l,u;return[e.options?e.options.map(function(e,t){return createVNode$1(ElOption,{key:t,label:e.label,value:e.value,disabled:null==e?void 0:e.disabled},{default:function(){return[has$2("render",e)?null==e?void 0:e.render(e,t):has$2("isStatus",e)?createVNode$1("div",{class:"flex flex-row items-center content-between"},[createVNode$1("span",{class:"block mr-1 w-[5px] h-[5px]",style:"background-color:".concat("success"===e.isStatus?"var(--el-color-primary)":"warning"===e.isStatus?"#2034a5":"red")},null),createVNode$1("span",null,[e.label])]):createVNode$1("span",null,[e.label])]}})}):null==r||null===(t=r.default)||void 0===t?void 0:t.call(r),null==r||null===(n=r.header)||void 0===n?void 0:n.call(r),null==r||null===(o=r.footer)||void 0===o?void 0:o.call(r),null==r||null===(i=r.prefix)||void 0===i?void 0:i.call(r),null==r||null===(a=r.empty)||void 0===a?void 0:a.call(r),null==r||null===(s=r.tag)||void 0===s?void 0:s.call(r),null==r||null===(l=r.loading)||void 0===l?void 0:l.call(r),null==r||null===(u=r.label)||void 0===u?void 0:u.call(r)]}})}}}));function _isSlot$4(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!isVNode$1(e)}var __unplugin_components_0$1=exports("d_",defineComponent({name:"BtSwitch",props:_objectSpread({},switchProps),setup:function(e,t){var n=t.attrs,r=t.slots;return function(){return createVNode$1(ElSwitch,mergeProps(n,e),_isSlot$4(r)?r:{default:function(){return[r]}})}}}));function _isSlot$3(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!isVNode$1(e)}var __unplugin_components_5=exports("a",defineComponent({name:"BtButton",props:_objectSpread({},buttonProps),setup:function(e,t){var n=t.slots,r=t.attrs;return function(){return createVNode$1(ElButton,mergeProps(e,r),_isSlot$3(n)?n:{default:function(){return[n]}})}}}));function _isSlot$2(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!isVNode$1(e)}var renderFormType=function(e,t){var n=createVNode$1("div",null,[createTextVNode("未知类型,请检查类型,或使用"),/type:'custom'/,createTextVNode("自定义渲染")]);switch(e.type){case"input":case"textarea":n=renderInput(e,t);break;case"select":n=renderSelect(e,t);break;case"checkbox":case"checkbox:button":n=renderCheckbox(e,t);break;case"radio":case"radio:button":n=renderRadio(e,t);break;case"switch":n=renderSwitch(e,t);break;case"help":n=renderHelp(e);break;case"button":n=renderButton(e);break;default:return}return n},getFormKey=exports("h",function(e,t){var n="";if(isObject$4(e.key)){if(!(n=Object.keys(e.key)[0]))return"";var r=e.key;has$2(n,t.value)||(t.value[n]=isFunction$1(r[n])?r[n]():r[n])}else n=e.key,!has$2(n,t.value)&&n&&(t.value[n]=isFunction$1(e.key)?e.key():"");return n}),renderInput=function(e,t){var n,r=(null===(n=e.attrs)||void 0===n?void 0:n.type)||e.type,o=getFormKey(e,t),i=e.attrs,a=e.slots;return createVNode$1(__unplugin_components_2$4,mergeProps(i||{},{modelValue:t.value[o],"onUpdate:modelValue":function(e){return t.value[o]=e},type:r}),_isSlot$2(a)?a:{default:function(){return[a]}})},renderSelect=function(e,t){var n=e.attrs,r=e.slots,o=getFormKey(e,t);return createVNode$1(__unplugin_components_2$3,mergeProps({options:e.options},n||{},{modelValue:t.value[o],"onUpdate:modelValue":function(e){return t.value[o]=e}}),_isSlot$2(r)?r:{default:function(){return[r]}})},renderCheckbox=function(e,t){var n=e.attrs,r=e.slots,o=e.type.split(":")[1],i=getFormKey(e,t);return createVNode$1(__unplugin_components_0$2,mergeProps({options:e.options,type:o},n||{},{modelValue:t.value[i],"onUpdate:modelValue":function(e){return t.value[i]=e}}),_isSlot$2(r)?r:{default:function(){return[r]}})},renderButton=function(e){var t=e.attrs,n=e.slots;return createVNode$1(__unplugin_components_5,t||{},_isSlot$2(n)?n:{default:function(){return[n]}})},renderRadio=function(e,t){var n=e.attrs,r=e.slots,o=e.type.split(":")[1],i=getFormKey(e,t);return createVNode$1(__unplugin_components_5$1,mergeProps({options:e.options,type:o},n||{},{modelValue:t.value[i],"onUpdate:modelValue":function(e){return t.value[i]=e}}),_isSlot$2(r)?r:{default:function(){return[r]}})},renderSwitch=function(e,t){var n=e.attrs,r=e.slots,o=getFormKey(e,t);return createVNode$1(__unplugin_components_0$1,mergeProps(n||{},{modelValue:t.value[o],"onUpdate:modelValue":function(e){return t.value[o]=e}}),_isSlot$2(r)?r:{default:function(){return[r]}})},renderHelp=function(e){var t;return createVNode$1(__unplugin_components_10,{options:e.options,listStyle:"disc",class:(null===(t=e.attrs)||void 0===t?void 0:t.class)||""},null)},renderGroup=function(e,t){return e.group.map(function(e){var n;return"custom"===e.type?e.render(t):createVNode$1(BtFormItem,mergeProps({label:(null==e?void 0:e.label)||"",prop:getFormKey(e,t)},(null==e?void 0:e.labelAttrs)||{}),_isSlot$2(n=renderFormType(e,t))?n:{default:function(){return[n]}})})};function _isSlot$1(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!isVNode$1(e)}var renderFormItem=function(e,t){var n,r=getFormKey(e,t);if("slots"!==e.type)switch(e.type){case"custom":return e.render(t);case"group":return createVNode$1("div",{class:"flex flex-wrap w-full"},[renderGroup(e,t)]);default:return createVNode$1(BtFormItem,mergeProps({label:e.label||"",prop:r},(null==e?void 0:e.labelAttrs)||{}),_isSlot$1(n=renderFormType(e,t))?n:{default:function(){return[n]}})}},useForm=exports("X",function(e){var t,n=ref(),r=ref({});ref([]);var o=shallowRef({}),i=isFunction$1(e.options)&&e.options(r,null===(t=n.value)||void 0===t?void 0:t.validate())||(isRef(e.options)?e.options:ref(e.options||{}));if(i){var a=function(){var t=_asyncToGenerator(_regenerator().m(function t(){var n;return _regenerator().w(function(t){for(;;)switch(t.n){case 0:if(!isPromise(e.data)){t.n=1;break}e.data.then(function(e){e.has("data")?r.value=e.data||{}:r.value=e||{}}),t.n=5;break;case 1:if(!isFunction$1(e.data)){t.n=4;break}return t.n=2,e.data();case 2:if(n=t.v){t.n=3;break}n={};case 3:r.value=n,t.n=5;break;case 4:r.value=e.data||{};case 5:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return a(),{BtForm:function(e,t){var a,s=t.attrs,l=t.slots;return createVNode$1(__unplugin_components_2$5,mergeProps({model:r.value,ref:n,rules:o.value},s),_isSlot$1(a=i.value.map(function(e){return e?(function(e,t){if("help"!==e.type)if("slots"===e.type||"custom"===e.type)for(var n in null==e?void 0:e.rules)t.value[n]||(t.value[n]=e.rules[n]);else if("group"===e.type){var r,o=_createForOfIteratorHelper(null==e?void 0:e.group);try{for(o.s();!(r=o.n()).done;){var i=r.value;i&&"key"in i&&(t.value[i.key]||(t.value[i.key]=i.rules||[]))}}catch(a){o.e(a)}finally{o.f()}}else null!=e&&e.key&&(t.value[e.key]=e.rules||[])}(e,o),"slots"===e.type?l[e.key]?l[e.key](r):null:renderFormItem(e,r)):null}))?a:{default:function(){return[a]}})},clearValidate:function(){var e;return null===(e=n.value)||void 0===e?void 0:e.clearValidate()},validate:function(){var e;return null===(e=n.value)||void 0===e?void 0:e.validate()},param:r,ref:n,options:i,submit:function(){var t;return null!=e&&e.submit?null==e?void 0:e.submit(r,null===(t=n.value)||void 0===t?void 0:t.validate,n):Promise.resolve(!1)}}}}),isExistsFunction=function isExistsFunction(funcName){try{if(isFunction$1(eval(funcName)))return!0}catch(e){}return!1},iToint=function(e){var t=0,n=e.split(".");return t=256*Number(n[0])*256*256+256*Number(n[1])*256+256*Number(n[2])+Number(n[3]),t>>>=0},createPeerConnection=function(){return isExistsFunction("RTCPeerConnection")?new RTCPeerConnection({sdpSemantics:"unified-plan",iceServers:[{urls:"stun:stun.bt.cn"}]}):null},pZero=function(e){var t="";if(5===e.length)return e;for(var n=0;n<5-e.length;n++)t+="0";return t+e},negotiate=function(e,t){e.createOffer().then(function(t){return e.setLocalDescription(t)}).then(function(){return new Promise(function(t){if("complete"===e.iceGatheringState)t();else{var n=null;n=function(){"complete"===e.iceGatheringState&&(e.removeEventListener("icegatheringstatechange",n),t())},e.addEventListener("icegatheringstatechange",n)}})}).then(_asyncToGenerator(_regenerator().m(function n(){var r,o,i,a,s;return _regenerator().w(function(n){for(;;)switch(n.n){case 0:if(r=e.localDescription,o=r.sdp.split(" typ srflx raddr")[0].split(" "),i=o[o.length-2],a=o[o.length-1],!Number.isNaN(a)){n.n=1;break}return n.a(2,null);case 1:return s=pZero(a)+iToint(i),n.n=2,useAxios.post("plugin/get_soft_list_thread",{data:{cid:s}});case 2:return t(),n.a(2,null)}},n)})))},stopNegotiate=function(e,t){t&&t.close(),e&&e.close()},useNegotiate=exports("lR",function(){if("1"===window.vite_public_soft_flush)return null;var e=createPeerConnection();if(!e)return null;var t=null==e?void 0:e.createDataChannel("chat",{ordered:!0}),n=function(){return stopNegotiate(e,t)};return negotiate(e,n),n}),__unplugin_components_4=exports("b",defineComponent({name:"BtIcon",props:{icon:{type:String,default:"defalut"},color:{type:String,default:"#666"},size:{type:Number,default:16}},setup:function(e){return function(){return createVNode$1("i",{class:"svgtofont-".concat(e.icon," "),style:"color:".concat(e.color,";font-size:").concat(e.size,"px;height:").concat(e.size,"px;line-height:").concat(e.size,"px;")},null)}}})),useOperation=exports("dc",function(e){var t=isRef(e.options)?e.options:ref(e.options);return{BtOperation:function(e){return createVNode$1("div",{class:"flex items-center"},[t.value.map(function(e){return"button"!==e.type&&null!=e&&e.type?"link"===e.type?createVNode$1(__unplugin_components_0$4,mergeProps({href:null==e?void 0:e.href},e,{class:"bt-link mr-[10px] ".concat(e.class),onClick:e.onClick}),{default:function(){return[e.icon&&createVNode$1(__unplugin_components_4,{icon:e.icon},null),e.label&&createVNode$1("span",null,[e.label])]}}):"dropdown"===e.type?createVNode$1(ElDropdown,{class:e.class,style:"margin:0 10px",trigger:"hover","split-button":!0,onClick:e.onClick},{default:function(){return createVNode$1("span",null,[e.label])},dropdown:function(){return createVNode$1(ElDropdownMenu,null,{default:function(){var t;return[null===(t=e.options)||void 0===t?void 0:t.map(function(e){return createVNode$1(ElDropdownItem,{onClick:e.onClick},{default:function(){return[e.label]}})})]}})}}):"divider"===e.type?createVNode$1("span",{class:"bg-darkTertiary w-[1px] h-[16px] mx-[16px]"},null):e.render&&e.render():createVNode$1(ElButton,{title:e.title,icon:e.icon,type:null!=e&&e.active?"primary":"default",class:e.class,onClick:e.onClick},{default:function(){return[e.icon&&createVNode$1(__unplugin_components_4,{icon:e.icon},null),e.label&&createVNode$1("span",null,[e.label])]}})})])}}}),Socket=function(){function e(t){_classCallCheck(this,e),_defineProperty2(this,"route",""),_defineProperty2(this,"socket",{}),_defineProperty2(this,"autoReconnect",!0),this.route=t.route,this.autoReconnect=void 0===t.autoReconnect||t.autoReconnect,this.create(t)}return _createClass(e,[{key:"channelVerify",value:function(){window.vite_public_request_token&&this.send({"x-http-token":window.vite_public_request_token})}},{key:"create",value:function(t){var n=this,r="".concat(e.protocol,"//").concat(e.host).concat(t.route);this.socket=useWebSocket(r,{autoReconnect:{retries:3,delay:1e3},onConnected:function(e){n.onConnected(e,t),t.onConnected&&t.onConnected(e,t)},onDisconnected:function(e,r){t.onDisconnected&&t.onDisconnected(e,r),n.onDisconnected(e)},onError:function(e,r){t.onError&&t.onError(e,r),n.onError(e,r)},onMessage:function(e,r){t.onMessage&&t.onMessage(e,r),n.onMessage(e,r)}}),this.socket.callback={}}},{key:"onConnected",value:function(e,t){t.noInit||this.channelVerify(),this.handleSendData()}},{key:"onDisconnected",value:function(e){}},{key:"onError",value:function(e,t){}},{key:"onMessage",value:function(t,n){if(["/ws_home","/ws_model","/ws_panel"].includes(this.route))try{var r=JSON.parse(n.data),o=r.callback||r.ws_callback;o&&e.sendDataList[o]&&e.sendDataList[o].callback(t,n)}catch(i){}}},{key:"send",value:function(t){if(this.isStatus("OPEN"))this.socket.send(isObject$4(t)?JSON.stringify(t):t);else{var n=getRandomChart(10);e.sendDataList[n]=t}}},{key:"open",value:function(){this.socket.open()}},{key:"close",value:function(){this.socket.close()}},{key:"isStatus",value:function(e){return(this.socket.status.value||this.socket.status)===e}},{key:"processData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{customType:"default",data:{}};isUndefined(t.customType)&&(t.customType="default");var n=t.customType,r=_objectSpread({mod_name:"",def_name:"",menu:window.location.pathname.split("/")[0]||"home",model_index:"",args:"",ws_callback:"",ws_id:""},t.data),o=e?e.split("/"):[];if(2!==o.length&&"model"!==n)throw new Error("传统请求/插件请求路径格式错误,正确格式为:模块名/方法名");switch(n){case"default":return _objectSpread(_objectSpread({},r),{},{mod_name:o[0],def_name:o[1],ws_callback:o[1]});case"model":return _objectSpread(_objectSpread({},r),{},{model_index:o[0],mod_name:o[1],def_name:o[2],ws_callback:o[2],onMessage:t.onMessage||null})}return{}}},{key:"addSendData",value:function(t,n){var r=this.isStatus("OPEN");e.sendDataList[t.def_name]={data:t,status:r,callback:n,request:!0},r&&this.send(t)}},{key:"request",value:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=this.processData(t,r);return o.onMessage?this.addSendData(o,function(e,t){var n=JSON.parse(t.data);o.onMessage(n.result,n)}):new Promise(function(t){n.addSendData(o,function(n,r){var o=JSON.parse(r.data),i={data:o.result};delete e.sendDataList[o.ws_callback],o.ws_callback&&t(i)})})}},{key:"handleSendData",value:function(){var t=this;Object.entries(e.sendDataList).forEach(function(n){var r=_slicedToArray(n,2),o=r[0],i=r[1],a=i.request,s=i.status,l=i.data;"/ws_home"===t.route||a?s||(t.send(l),e.sendDataList[o].status=!0):(t.send(i),delete e.sendDataList[o])})}}])}();_defineProperty2(Socket,"protocol","https:"===window.location.protocol?"wss:":"ws:"),_defineProperty2(Socket,"host",window.location.host),_defineProperty2(Socket,"sendDataList",{});var useSocket=exports("a0",function(e){return new Socket(e)}),_hoisted_1$1={class:"software-install"},_hoisted_2$1={class:"software-view"},_hoisted_3$1={class:"flex flex-col"},_hoisted_4$1={class:"text-large flex items-center leading-10 mb-[4px]"},_hoisted_5={class:"my-[4px]"},_hoisted_6={class:"text-danger font-normal"},_hoisted_7={class:"font-normal mb-[4px] leading-10"},_sfc_main$1=defineComponent({__name:"index",props:{options:{default:function(){return{code:""}}}},setup:function(e){var t=toRef(e.options.code),n=ref("request"),r=computed(function(){return o.find(function(e){return e.code===t.value})}),o=[{code:"database is read only!",content:"系统根目录磁盘已满,面板数据库已更改为只读模式,面板部分功能无法正常使用,请立即前往文件管理清理磁盘空间",title:"系统根目录磁盘已满,请清理磁盘空间!"},{code:"unable to open database file",title:"系统根目录磁盘已满,请清理磁盘空间!",content:"系统根目录磁盘已满,面板数据无法显示,请立即前往文件管理清理磁盘空间"}];return function(e,o){var i,a,s,l=__unplugin_components_5;return openBlock(),createElementBlock(Fragment,null,[o[5]||(o[5]=createBaseVNode("div",{class:"software-mask"},null,-1)),createBaseVNode("div",_hoisted_1$1,[createBaseVNode("div",_hoisted_2$1,[o[4]||(o[4]=createBaseVNode("span",{class:"svgtofont-el-warning-filled text-warning !text-iconLarge mr-1rem"},null,-1)),createBaseVNode("div",_hoisted_3$1,[createBaseVNode("div",_hoisted_4$1,"警告:"+toDisplayString((null===(i=unref(r))||void 0===i?void 0:i.title)||"未知错误"),1),createBaseVNode("span",_hoisted_5,[o[1]||(o[1]=createTextVNode(" 错误代码: ",-1)),createBaseVNode("span",_hoisted_6,toDisplayString((null===(a=unref(r))||void 0===a?void 0:a.code)||unref(t)||"未知错误数据"),1)]),createBaseVNode("span",_hoisted_7,[o[2]||(o[2]=createBaseVNode("span",{class:"font-bold"},"错误:",-1)),createTextVNode(" "+toDisplayString((null===(s=unref(r))||void 0===s?void 0:s.content)||"出现未知错误,请联系客服排查问题"),1)]),unref(n).includes("disk")?(openBlock(),createBlock(l,{key:0,class:"!mt-[8px]",onClick:o[0]||(o[0]=function(e){return unref(jumpRouter)("/files")})},{default:withCtx(function(){return _toConsumableArray(o[3]||(o[3]=[createTextVNode(" 立即清理 ",-1)]))}),_:1})):createCommentVNode("",!0)])])])],64)}}}),__unplugin_components_1$2=exports("d0",_export_sfc(_sfc_main$1,[["__scopeId","data-v-3513b9bd"]])),BtPagination=defineComponent({name:"BtPagination",props:{type:{type:String,default:"default",required:!1},row:{type:Number,default:10},page:{type:Number,default:1},total:{type:Number,default:0},layout:{type:String,default:"prev, pager, next, sizes, total, jumper",required:!1},pageSizes:{type:Array,default:function(){return[10,20,50,100]},required:!1}},emits:["change","update:page","update:row"],setup:function(e,t){var n=t.emit,r=t.attrs,o=toRefs(e),i=o.row,a=o.page,s=o.total,l=ref(!0),u=useRoute(),c="".concat(null==u?void 0:u.fullPath.replace(/\//g,"_")),d=useSessionStorage(c,i.value||e.pageSizes[0]),p=computed(function(){return l.value?d.value:i.value});watch(function(){return i.value},function(e){n("update:row",e),n("change")}),watch(function(){return a.value},function(e){n("update:page",e),n("change")});var h=function(e){d.value=e,i.value=e,e!==i.value&&n("update:row",e),n("update:page",1),n("change")},f=function(e){n("update:page",e),n("change")};return function(){return createVNode$1(Fragment,null,["default"===e.type?createVNode$1(ElPagination,mergeProps({background:!0,pageSize:p.value,"onUpdate:pageSize":function(e){return p.value=e},currentPage:a.value,"onUpdate:currentPage":function(e){return a.value=e},pageSizes:e.pageSizes,layout:e.layout,total:s.value,onSizeChange:h,onCurrentChange:f},r),null):createVNode$1("div",{class:"flex items-center h-[28px]"},[a.value>1&&createVNode$1(Fragment,null,[createVNode$1("span",{class:"bt-link !border-solid !border-1 !border-light !px-[10px] !h-[28px] leading-[28px] text-center",onClick:function(){return f(1)}},[createTextVNode("首页")]),createVNode$1("span",{class:"bt-link !border-solid !border-1 !border-light !px-[10px] !h-[28px] leading-[28px] text-center",onClick:function(){return f(a.value-1)}},[createTextVNode("上一页")])]),s.value>i.value&&createVNode$1("span",{class:"bt-link !border-solid !border-1 !border-light !px-[10px] !h-[28px] leading-[28px] text-center",onClick:function(){return f(a.value+1)}},[createTextVNode("下一页")]),createVNode$1("span",{class:"!border-solid !border-1 !border-light !px-[10px] !h-[28px] leading-[28px] text-center"},[createTextVNode("第 "),a.value,createTextVNode(" 页")])])])}}}),_useMessage=useMessage(),$msg=_useMessage.msg,__unplugin_components_0=exports("d3",defineComponent({name:"BtTable",props:{column:{type:Array,default:[]},description:{type:String,default:"暂无数据"},refreshTime:{type:Number,default:0},total:{type:Number,default:0},data:{type:Array,default:function(){return[]}}},emits:["selectionChange","sortChange"],setup:function(e,t){var n=t.attrs,r=t.slots,o=t.expose,i=t.emit,a=ref(),s=useSlots().empty,l=ref("id"),u=ref(!1),c=ref(!1),d=ref(!1),p=ref([]),h=ref([]),f=computed(function(){return e.data.length}),g=computed(function(){return h.value.length}),m=toRef(e,"data"),y=function(e,t){return e.some(function(e){return e[l.value]===t})},v=computed(function(){return e.total||e.data.length}),_=computed(function(){return m.value.map(function(e){var t=!1;return u.value&&(t=!0),t=c.value?!y(p.value,e[l.value]):y(h.value,e[l.value]),isString$1(e)||(e.keys_scopes_status=t),e})});watch(function(){return e.refreshTime},function(e){c.value?(-1===_.value.findIndex(function(e){return y(p.value,e[l.value])})?(u.value=!0,d.value=!1):(u.value=!1,d.value=!0),h.value=_.value.filter(function(e){return e.keys_scopes_status})):(p.value=[],h.value=[],u.value=!1,d.value=!1)});var x=function(e){var t=e.column,n=e.prop,r=e.order;i("sortChange",{column:t,prop:n,order:r})},S=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";l.value=n,u.value=e,c.value=t,d.value=!1,h.value=e?_toConsumableArray(_.value.filter(function(e){return!e.disable_check})):[],c.value&&(p.value=[]),i("selectionChange",h.value)},b=function(e,t,n,r){l.value=r,h.value.length||(d.value=!1),e?h.value.push(t):h.value.forEach(function(e,n){if(e[l.value]===t[l.value])return h.value.splice(n,1),!1}),c.value&&(e?p.value.forEach(function(e,n){if(e[l.value]===t[l.value])return p.value.splice(n,1),!1}):p.value.push(t));var o=_.value.filter(function(e){return!e.disable_check}).length;h.value.length===o?(console.log("全选"),u.value=!0,d.value=!1):(console.log("不全选"),u.value=!1,d.value=!0),0===h.value.length&&(u.value=!1,d.value=!1),i("selectionChange",h.value)},T=function(e){switch(e){case"page-select":S(!0,!1),$msg({message:"已选中当前页面数据",type:"success"});break;case"all-select":S(!0,!0),$msg({message:"已选中列表所有数据,支持分页切换选择或排除数据。",type:"success",time:5e3});break;case"clear-select":S(!1,!1)}};return o({tableSelectNumber:g,tableSelectList:h,tableLimit:f,tableTotal:v,tablePageSelect:c,tablePageExclude:p,getTableSelect:function(){return{tableSelectNumber:g,tableSelectList:h,tableLimit:f,tableTotal:v,tablePageSelect:c,tablePageExclude:p}},getTable:function(){return a.value},handleAllChange:function(e){return S(e,!1)},clearAllSelect:function(){return S(!1,!1)}}),function(){return createVNode$1(ElTable,mergeProps({class:"w-full",ref:a},n,{border:!1,data:_.value,onSortChange:x}),{default:function(){return e.column.map(function(e,t){if(function(e){var t,n;return t=isFunction$1(e.isHide)?e.isHide():!isBoolean(e.isHide)||!e.isHide,n=isBoolean(e.isCustom)?e.isCustom:!e.isCustom,t&&n}(e)){var n=e.renderHeader;return n&&(e.headerRender=n),delete e.renderHeader,createVNode$1(ElTableColumn,mergeProps(e,{key:t}),{header:function(t){return e.headerRender?e.headerRender(t,{checkAllCheckbox:u,checkAllIndeterminate:d,handleCommandChange:T,handleAllChange:S,handleScopeChange:b}):e.isLtd?createVNode$1("div",{class:"flex items-center"},[createVNode$1("span",null,[e.label]),createVNode$1("i",{class:"svgtofont-icon-ltd text-medium mr-[4px] text-ltd"},null)]):createVNode$1("div",null,[e.label])},default:function(t){return e.render?e.render(t.row,t.$index,{checkAllCheckbox:u,checkAllIndeterminate:d,handleCommandChange:T,handleAllChange:S,handleScopeChange:b}):t.row[e.prop]}})}})},empty:function(){return s?(null==r?void 0:r.empty)&&(null==r?void 0:r.empty()):createVNode$1(ElEmpty,{"image-size":50},{description:function(){return e.description}})}})}}})),__unplugin_components_2$2=exports("c_",defineComponent({name:"BtInputSearch",props:_objectSpread(_objectSpread({},inputProps),{},{disabledPopover:{type:Boolean,default:!0,required:!1},clearable:{type:Boolean,default:!0,required:!1}}),emits:["search","focus","blur"],setup:function(e,t){var n=t.attrs,r=t.slots,o=t.emit,i=t.expose,a=ref(!1),s=function(e){o("focus",e),a.value=!0},l=function(e){o("blur",e),a.value=!1},u=function(e){console.log("onClear",e),o("search",""),a.value=!0},c=function(t){"Enter"===t.key&&o("search",e.modelValue)};return i({blur:l,focus:s}),function(){return createVNode$1(ElPopover,{visible:a.value&&!e.disabledPopover,width:"auto","auto-close":2e3},{reference:function(){return createVNode$1(ElInput,mergeProps(e,n,{onFocus:s,onBlur:l,onClear:u,onKeyup:c,clearable:e.clearable}),{append:function(){return createVNode$1(__unplugin_components_5,{onClick:function(){return o("search",e.modelValue)}},{default:function(){return[createVNode$1("i",{class:"svgtofont-el-search text-medium"},null)]}})}})},default:function(){return createVNode$1("div",null,[r.default&&r.default()])}})}}})),__unplugin_components_2$1=exports("d1",defineComponent({name:"BtSearchHistory",props:{name:{type:String,default:""},keys:{type:String,default:""},list:{type:Object,default:function(){return{historyList:[],recommendList:[]}}},showHistory:{type:Boolean,default:!0},showRecommend:{type:Boolean,default:!0}},emits:["search","trigger","update"],setup:function(e,t){var n=t.emit,r=e.name,o=e.keys,i=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,i,a,s;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.n=1,useConfirm({icon:"warning-filled",title:"清空搜索历史",content:"清空所有搜索历史记录,是否继续?"});case 1:return t={name:r,key:o||r},i=Message$2.load("正在清空搜索历史记录,请稍后..."),e.p=2,e.n=3,clearSearchHistory(t);case 3:a=e.v,Message$2.request(a),null!=a&&a.status&&n("update",[]),n("trigger",!0),e.n=5;break;case 4:e.p=4,s=e.v,console.error(s);case 5:return e.p=5,i.close(),e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}));return function(){return e.apply(this,arguments)}}(),a=function(){var t=_asyncToGenerator(_regenerator().m(function t(i,a){var s,l,u,c;return _regenerator().w(function(t){for(;;)switch(t.p=t.n){case 0:return s=Message$2.load("正在删除指定搜索历史记录,请稍后..."),t.p=1,t.n=2,removeSearchHistory({val:i,name:r,key:o||r});case 2:l=t.v,Message$2.request(l),null!=l&&l.status&&((u=e.list.historyList).splice(a,1),u=_toConsumableArray(u),n("update",u)),n("trigger",!0),t.n=4;break;case 3:t.p=3,c=t.v,console.error(c);case 4:return t.p=4,s.close(),t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}));return function(e,n){return t.apply(this,arguments)}}();return function(){var t;return createVNode$1("div",{class:"box w-[400px]",onMouseDown:function(e){return e.preventDefault()}},[createVNode$1("div",{class:"".concat(e.showHistory?"":"hidden")},[createVNode$1("span",{class:"history-title"},[createVNode$1("span",{class:"text-tertiary text-small"},[createTextVNode(" 搜索历史")]),createVNode$1(ElButton,{size:"small",onClick:function(e){e.stopPropagation(),i()}},{default:function(){return[createVNode$1("span",{class:"flex items-center"},[createVNode$1("i",{class:"svgtofont-el-delete mr-[4px]"},null),createVNode$1("span",null,[createTextVNode("清空")])])]}})]),createVNode$1("div",{class:"list-box"},[createVNode$1("div",{class:"list-box-body max-h-[24rem] !overflow-y-auto"},[null===(t=e.list.historyList)||void 0===t?void 0:t.map(function(e,t){return createVNode$1("div",{key:t,class:"body-item",onClick:function(t){var r;r=e.val,n("search",r),n("trigger",!1),t.stopPropagation()}},[createVNode$1("span",{title:e.val,class:"truncate max-w-[16rem]"},[e.val]),createVNode$1("i",{class:"svgtofont-el-close",onClick:function(n){a(e.val,t),n.stopPropagation()}},null)])})]),!e.list.historyList.length&&createVNode$1("div",{class:"w-full flex items-center justify-center h-[6rem]"},[createVNode$1("span",null,[createTextVNode("暂无搜索历史")])])])]),createVNode$1("div",{class:"".concat(e.showRecommend?"":"hidden")},[createVNode$1("span",{class:"history-title !justify-start"},[createVNode$1("span",{class:"text-tertiary text-small"},[createTextVNode("您可能感兴趣")]),createVNode$1(__unplugin_components_3,{class:"w-[1.4rem] h-[1.4rem] ml-[.5rem]",src:"/soft_ico/hots.png"},null)]),createVNode$1("div",{class:"recommend-list"},[e.list.recommendList.map(function(e,t){return createVNode$1("div",{key:t,class:"recommend-item",onClick:function(t){t.stopPropagation(),function(e){e.callback&&e.callback(),n("trigger",!1)}(e)}},[createVNode$1("span",null,[e.name])])})])])])}}})),_hoisted_1={class:"flex p-[2rem] flex-col"},_hoisted_2={class:"flex items-center mb-[16px]"},_hoisted_3=["innerHTML"],_hoisted_4={key:0,class:"text-danger mb-12px !text-base ml-4.8rem"},_sfc_main=defineComponent({__name:"index",props:{compData:{default:function(){return{type:"execute",title:"",content:"",tablePageSelect:!1,tablePageExclude:[],tableTotal:0,data:ref([]),column:[],batch:function(){return{}},complete:function(){return{}}}}}},setup:function(e,t){var n=t.expose,r=e,o=inject("popupSetFooter",function(){}),i=ref(0),a=unref(r.compData),s=a.batch,l=(a.content,a.type),u=s(),c=computed(function(){return i.value<2?"text-warning svgtofont-el-warning-filled":"text-primary svgtofont-el-success-filled"}),d=computed(function(){switch(i.value){case 0:return r.compData.content;case 1:return null!=u&&u.all?"正在".concat(r.compData.title,"中,处理进度:").concat(null==u?void 0:u.current,"/").concat(null==u?void 0:u.all):"正在".concat(r.compData.title,"中,请稍后...");default:return'<span class="flex mb-[.4rem]">已完成'.concat(r.compData.title,"操作,共").concat(null==u?void 0:u.all,"个任务。</span><span>成功").concat(null==u?void 0:u.success,"个,失败").concat(null==u?void 0:u.error,"个。</span>")}});watch(u,function(e){e.current===e.all&&(i.value=2,r.compData.complete())});var p=function(){return o(),i.value=1,!0};return onMounted(function(){l&&"complete"===l.value&&p()}),n({onConfirm:p}),function(t,n){var r=__unplugin_components_0;return openBlock(),createElementBlock("div",_hoisted_1,[createBaseVNode("div",_hoisted_2,[createBaseVNode("i",{class:normalizeClass("!text-titleLarge ".concat(unref(c)))},null,2),createBaseVNode("div",{class:"pl-[4px] text-medium leading-8 ml-[4px]",innerHTML:unref(d)},null,8,_hoisted_3)]),e.compData.tablePageSelect?(openBlock(),createElementBlock("span",_hoisted_4,"当前已选中多项数据(共"+toDisplayString(e.compData.tableTotal-e.compData.tablePageExclude.length)+"项),请仔细确认后进行操作!",1)):createCommentVNode("",!0),e.compData.tablePageSelect?createCommentVNode("",!0):(openBlock(),createBlock(r,{key:1,ref:"batchTable",column:e.compData.column,data:e.compData.data.value,"max-height":300},null,8,["column","data"]))])}}}),__unplugin_components_1$1=exports("d4",defineComponent({name:"BtTableBatch",props:{tableRef:{type:Object,default:null},options:{type:Array,default:function(){return[]}}},setup:function(e){var t=ref(!0),n=ref(),r=ref(),o=ref(e.tableRef),i=ref(),a=ref(0),s=ref([]),l=reactive({all:0,current:0,success:0,error:0}),u=reactive({visible:!1,value:!1,indeterminate:!1}),c=reactive({list:[],visible:!1,value:""});watch(function(){return e.tableRef},function(e){isNotNil(e)&&(o.value=e,i.value=o.value.getTable(),v())});var d=function(){g(u,t.value)},p=function(e){e||(c.value=""),null==o||o.value.handleAllChange(e)},h=function(){c.value||g(c,!0),e.options.forEach(function(e){if(e.value===c.value){var t=curry$2(y),n=curry$2(m),r=ref(JSON.parse(JSON.stringify(s.value)));r.value.map(function(e){return e.batchStatus=0,e});var i=o.value,a=i.tablePageSelect,l=i.tablePageExclude,u=i.tableTotal;return e.event(t(r),n(r),r,e,f,{enable:a,exclude:l,total:u}),!1}})},f=function(){null==o||o.value.clearAllSelect(),c.value=""},g=function(e,t){e.visible=t,setTimeout(function(){e.visible=!1},1500)},m=function(){var e=_asyncToGenerator(_regenerator().m(function e(t,n){var r,o;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return l.all=s.value.length,r=[],o=function(){var e=_asyncToGenerator(_regenerator().m(function e(t,n){var r,i,a=arguments;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(r=a.length>2&&void 0!==a[2]?a[2]:0,l.current=r,!isNumber$1(r)){e.n=5;break}if(!(r<t.value.length)){e.n=5;break}return e.p=1,e.n=2,n(t.value[r]);case 2:i=e.v,has$2("code",i)&&has$2("data",i)?t.value[r]=_objectSpread(_objectSpread({},t.value[r]),{},{batchStatus:i.status?1:2,msg:i.msg}):t.value[r]=i,1===t.value[r].batchStatus&&l.success++,2===t.value[r].batchStatus&&l.error++,e.n=4;break;case 3:e.p=3,e.v,t.value[r]=_objectSpread(_objectSpread({},t.value[r]),{},{batchStatus:2}),l.error++;case 4:return e.n=5,o(t,n,r+1);case 5:return e.a(2)}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}(),e.n=1,o(t,n);case 1:return e.a(2,r)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),y=function(){var e=_asyncToGenerator(_regenerator().m(function e(t,n){var r,i,a,s,u,d,p,h;return _regenerator().w(function(e){for(;;)if(0===e.n)return r=n.title,i=n.content,a=n.column,s=n.onConfirm,u=o.value,d=u.tablePageSelect,p=u.tablePageExclude,h=u.tableTotal,e.a(2,useDialog({title:r,area:45,component:_sfc_main,compData:{title:r,content:i,column:a,data:t,tablePageSelect:d,tablePageExclude:p,tableTotal:h,batch:function(){return l},complete:function(){null==o||o.value.clearAllSelect(),c.value=""}},showFooter:!0,onConfirm:function(){var e=_asyncToGenerator(_regenerator().m(function e(n){return _regenerator().w(function(e){for(;;)if(0===e.n)return n.clearSelection=function(){return f()},e.a(2,s&&s(n,t))},e)}));return function(t){return e.apply(this,arguments)}}(),onCancel:function(){l.all=0,l.current=0,l.success=0,l.error=0}}))},e)}));return function(t,n){return e.apply(this,arguments)}}(),v=function(){nextTick(function(){if(isNotNil(null==i?void 0:i.value)){var e=o.value.getTableSelect(),n=e.tableSelectNumber,r=e.tableSelectList,l=e.tableLimit;e.tablePageSelect,e.tablePageExclude;0===n.value&&(t.value=!0),watch(n,function(e){t.value=!(e>0),0!==e&&(s.value=_toConsumableArray(unref(r))),a.value=e,u.indeterminate=e>0&&e<unref(l),u.value=e>0&&e===unref(l)})}})};return function(){return createVNode$1("div",{class:"flex items-center pl-[1px]"},[createVNode$1(ElPopover,{visible:u.visible,"popper-class":"popper-danger",placement:"top-start",width:"185","auto-close":2e3,content:"请选择需要批量操作的数据!"},{reference:function(){return createVNode$1(ElCheckbox,{ref:n,modelValue:u.value,"onUpdate:modelValue":function(e){return u.value=e},indeterminate:u.indeterminate,class:"px-[8px]",onChange:p},null)}}),createVNode$1("div",{class:"flex relative items-center"},[createVNode$1("div",{class:"w-full h-[3rem] absolute z-99 cursor-not-allowed ".concat(t.value?"":"hidden"),onClick:d},null),createVNode$1(ElPopover,{visible:c.visible,"popper-class":"popper-danger",placement:"top-start",width:"185",content:"请选择需要批量操作的类型!"},{reference:function(){return createVNode$1("div",{class:"flex items-center"},[createVNode$1(__unplugin_components_2$3,{ref:r,modelValue:c.value,"onUpdate:modelValue":function(e){return c.value=e},disabled:t.value,options:e.options,class:"mr-2 !w-[150px]",placeholder:"请选择批量操作"},null)])}}),createVNode$1(ElButton,{disabled:t.value,class:"h-[30px]",type:"primary",onClick:h},{default:function(){var e;return[createTextVNode("批量操作 "),t.value?"":"(已选中".concat(o.value.tablePageSelect?Number(o.value.tableTotal)-Number(null===(e=o.value.tablePageExclude)||void 0===e?void 0:e.length):a.value,"项)")]}})])])}}}));function _isSlot(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!isVNode$1(e)}var __unplugin_components_2=exports("d2",defineComponent({name:"BtTableColumn",props:{name:{type:String,default:"bt-table-column"},column:{type:Array,default:function(){return[]}}},emits:["change"],setup:function(e,t){var n=t.emit,r=toRefs(e).column,o=ref(!0),i=["selection","toping","notControl","CheckBox"],a="bt-table-column"!==e.name?e.name:window.location.pathname;return onMounted(function(){var e=localStorage.getItem("".concat(a,"_column"));if(e)try{var t=JSON.parse(e);Array.isArray(t)&&r.value.forEach(function(e,n){isBoolean(e.isCustom)&&t[n]&&(e.isCustom=t[n].isCustom)})}catch(n){localStorage.removeItem("".concat(a,"_column"))}}),function(){return createVNode$1("div",{class:"flex"},[createVNode$1(ElDropdown,{"hide-on-click":!1},{default:function(){return createVNode$1(ElButton,{type:"default",title:"设置列表字段"},{default:function(){return[createVNode$1(__unplugin_components_4,{icon:"el-setting",size:15},null)]}})},dropdown:function(){var e;return createVNode$1(ElDropdownMenu,{class:"px-[12px] py-[6px] custom-col-list"},_isSlot(e=r.value.map(function(e,t){return function(e){return!e||!i.includes(e)}(e.type)?createVNode$1(ElDropdownItem,{key:t},{default:function(){return[isBoolean(e.isCustom)?createVNode$1(Fragment,null,[createVNode$1(ElCheckbox,{modelValue:e.isCustom,"onUpdate:modelValue":function(t){return e.isCustom=t},onChange:function(){return function(e,t){t.showClick&&t.showClick(e),n("change",r.value),localStorage.setItem("".concat(a,"_column"),JSON.stringify(r.value))}(e.isCustom,e)}},{default:function(){return[e.label||e.subtitle]}}),e.isLtd&&createVNode$1("span",{class:"ml-[4px] mt-[4px]"},[createVNode$1("i",{class:"svgtofont-icon-ltd text-medium mr-[4px] text-ltd"},null)])]):createVNode$1(ElCheckbox,{modelValue:o.value,"onUpdate:modelValue":function(e){return o.value=e},disabled:!0},{default:function(){return[e.label||e.subtitle]}})]}}):null}))?e:{default:function(){return[e]}})}})])}}})),useTable=exports("cQ",function(e){var t=reactive({loading:!0,loadingTitle:"获取数据中,请稍候...",data:[],total:0,other:{},pageKeys:{page:"",limit:""}}),n=e.request,r=e.sort,o=ref(),i=ref({}),a=ref(0),s=ref(e.columns instanceof Function?e.columns():e.columns),l=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var r,o,s,l,u;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,t.loading=!0,e.n=1,n(i.value);case 1:r=e.v,o=r.data,s=r.total,l=r.other,t.data=o,t.total=s||o.length,t.other=l,a.value=Date.now(),e.n=3;break;case 2:e.p=2,u=e.v,console.warn(u);case 3:return e.p=3,t.loading=!1,e.f(3);case 4:return e.a(2)}},e,null,[[0,2,3,4]])}));return function(){return e.apply(this,arguments)}}(),u=defineComponent(function(){return function(){return withDirectives(createVNode$1(__unplugin_components_0,{ref:o,data:t.data,total:t.total,refreshTime:a.value,column:s.value,onSortChange:function(e){r&&r(e,t)}},_defineProperty2({},e.empty?"empty":"other",function(){return e.empty&&e.empty()})),[[resolveDirective("bt-loading"),t.loading],[resolveDirective("bt-loading"),t.loadingTitle,"title"]])}}),c={BtTable:u,ref:o,param:i,config:t,refresh:l};return e.extension&&e.extension.forEach(function(e){Object.assign(c,e.init({ref:o,param:i,columns:s,config:t,refresh:l}))}),nextTick(function(){return l()}),c}),useDynamicTable=exports("ed",function(e){var t=(e.extension||[]).concat([useSearch(),usePage()]);return useTable(_objectSpread(_objectSpread({},e),{},{extension:t}))}),useAllTable=exports("da",function(e){var t=(e.extension||[]).concat([useSearch(),usePage(),useRefresh(),useColumn()]);return useTable(_objectSpread(_objectSpread({},e),{},{extension:t}))}),useSearch=exports("gW",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"search";return{init:function(t){t.ref;var n=t.param,r=(t.columns,t.config),o=t.refresh;return n.value[e]="",{BtSearch:defineComponent(function(){return function(){return createVNode$1(__unplugin_components_2$2,{modelValue:n.value[e],"onUpdate:modelValue":function(t){return n.value[e]=t},disabledPopover:!0,onSearch:function(){r.pageKeys.page&&1!==n.value[r.pageKeys.page]?n.value[r.pageKeys.page]=1:o()},clearable:!0},null)}})}}}}),usePage=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{page:"p",limit:"limit"};return{init:function(t){t.ref;var n=t.param,r=(t.columns,t.config),o=t.refresh,i=useRoute(),a="".concat(null==i?void 0:i.fullPath.replace(/\//g,"_")),s=useSessionStorage(a,10);return n.value[e.page]=1,n.value[e.limit]=s||10,watch(function(){return n.value[e.page]},o),watch(function(){return n.value[e.limit]},function(){nextTick(function(){1===n.value[e.page]&&o()})}),r.pageKeys.page=e.page,r.pageKeys.limit=e.limit,{BtPage:defineComponent({props:{type:{type:String,default:"default"}},setup:function(t){return function(){return createVNode$1(BtPagination,mergeProps({class:"mr-[6px]",page:n.value[e.page],"onUpdate:page":function(t){return n.value[e.page]=t},row:n.value[e.limit],"onUpdate:row":function(t){return n.value[e.limit]=t},total:r.total},t),null)}}})}}}},useRefresh=exports("cS",function(){return{init:function(e){e.param,e.columns,e.config;var t=e.refresh,n=ref(!1),r=useDebounceFn(_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return n.value=!0,e.n=1,t();case 1:n.value=!1;case 2:return e.a(2)}},e)})),100);return{BtRefresh:defineComponent(function(){return function(){return createVNode$1(__unplugin_components_5,{onClick:r,disabled:n.value},{default:function(){return[createVNode$1(__unplugin_components_4,{icon:"el-refresh",class:"".concat(n.value?"!hidden":"")},null),createVNode$1("i",{class:"svgtofont-el-loading ".concat(n.value?"animation":"!hidden")},null)]}})}})}}}}),useColumn=exports("hI",function(){return{init:function(e){e.ref,e.param;var t=e.columns;e.config,e.refresh;return{BtColumn:defineComponent(function(){return function(){return createVNode$1(__unplugin_components_2,{column:t.value},null)}})}}}}),useBatch=exports("cU",function(e){return{init:function(t){var n=t.ref;t.param,t.columns,t.config,t.refresh;return{BtBatch:defineComponent(function(){return function(){return createVNode$1(__unplugin_components_1$1,{tableRef:n.value,options:e},null)}})}}}}),useRefreshList=exports("cT",function(e){return{init:function(t){var n=t.refresh;watch(e,function(t){t&&(n(),e.value=!1)})}}}),useRecommendSearch=exports("dd",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"search",t=arguments.length>1?arguments[1]:void 0;return{init:function(n){var r=n.param,o=(n.columns,n.config),i=n.refresh,a=ref();r.value[e]="";var s=!!isUndefined(t.showHistory)||t.showHistory,l=!!isUndefined(t.showRecommend)||t.showRecommend,u=!s&&!l;watch(function(){return o.other},function(e){null!=e&&e.search_history&&(a.value=e.search_history)});var c=function(){o.pageKeys.page&&1!==r.value[o.pageKeys.page]?r.value[o.pageKeys.page]=1:i()};return{BtRecommendSearch:defineComponent(function(){return function(){return createVNode$1(__unplugin_components_2$2,{modelValue:r.value[e],"onUpdate:modelValue":function(t){return r.value[e]=t},onSearch:c,disabledPopover:u,clearable:!0},{default:function(){return[createVNode$1(__unplugin_components_2$1,{list:{historyList:a.value||[],recommendList:t.list||[]},onSearch:function(t){r.value[e]=t,c()},onUpdate:function(e){a.value=e},showHistory:s,showRecommend:l,name:t.name,keys:(null==t?void 0:t.key)||""},null)]}})}})}}}}),useErrorMask=exports("de",function(){return{init:function(e){e.param,e.columns;var t=e.config,n=(e.refresh,ref(!1)),r=ref();return watch(function(){return t.other},function(e){null!=e&&e.error&&(r.value=e.error,n.value=!0)}),{BtErrorMask:defineComponent(function(){return function(){return n.value?createVNode$1(__unplugin_components_1$2,{options:r.value},null):createVNode$1(Fragment,null,null)}})}}}}),useRadioButton=exports("hP",function(e){return{init:function(t){t.ref;var n,r=t.param,o=(t.columns,t.config),i=t.refresh,a=e.options,s=e.value,l=e.key,u=e.other;return r.value[l]=s||(null===(n=a[0])||void 0===n?void 0:n.value)||"",{BtRadioButton:defineComponent(function(){return function(){return createVNode$1(__unplugin_components_5$1,mergeProps({type:"button",modelValue:r.value[l],"onUpdate:modelValue":function(e){return r.value[l]=e},options:a},u||{},{onChange:function(){o.pageKeys.page&&1!==r.value[o.pageKeys.page]?r.value[o.pageKeys.page]=1:i()}}),null)}})}}}}),useTableSelect=exports("hQ",function(e){return{init:function(t){t.ref;var n=t.param,r=(t.columns,t.config),o=t.refresh,i=e.options,a=e.value,s=e.key,l=e.other;return n.value[s]=isUndefined(a)?i.length?i[0].value:"":a,{BtTableSelect:defineComponent(function(){return function(){return createVNode$1(__unplugin_components_2$3,mergeProps({modelValue:n.value[s],"onUpdate:modelValue":function(e){return n.value[s]=e},options:i},l||{},{onChange:function(){r.pageKeys.page&&1!==n.value[r.pageKeys.page]?n.value[r.pageKeys.page]=1:o()}}),null)}})}}}}),__unplugin_components_1=exports("cR",defineComponent({name:"BtTabs",props:{modelValue:{type:String,default:""},type:{type:String,default:"card"},options:{type:Array,default:function(){return[]}}},emits:["update:modelValue","change"],setup:function(e,t){var n=t.attrs,r=t.slots,o=t.emit,i=t.expose,a=ref(e.modelValue),s=reactive({}),l=ref(),u=shallowRef({}),c=computed(function(){switch(e.type){case"card":return{className:"tabs-card",type:"card",tabPosition:"top"};case"bg-card":return{className:"tabs-bg-card",type:"border-card",tabPosition:"top"};case"left-bg-card":return{className:"tabs-left-bg-card",type:"border-card",tabPosition:"left"};case"":return{className:"tabs-demo",type:"",tabPosition:"top"}}});watch(function(){return e.modelValue},function(e){a.value=e}),watch(a,function(e){o("update:modelValue",e)}),watch(u,function(e){var t;has$2("init",u[a.value])&&(null===(t=u[a.value])||void 0===t||t.init())},{once:!0});var d=function(e,t){var n;(o("change",e.props.name,u[e.props.name]),e.props.name&&has$2(e.props.name,u))&&(has$2("init",u[e.props.name])&&(null===(n=u[e.props.name])||void 0===n||n.init()))};return i(s),onMounted(function(){Object.assign(s,_objectSpread(_objectSpread({},{getRef:function(){return u}}),l.value))}),function(){return createVNode$1(ElTabs,mergeProps(n,{ref:l,modelValue:a.value,"onUpdate:modelValue":function(e){return a.value=e},class:c.value.className,onTabClick:d,type:c.value.type,"tab-position":c.value.tabPosition}),{default:function(){return[e.options.length?e.options.map(function(e,t){return createVNode$1(ElTabPane,{key:t,disabled:e.disabled,name:e.name,closable:e.closable,lazy:e.lazy},{default:function(){var t={ref:function(t){return t?u[e.name]=t:null}};if(!isFunction$1(e.render))return h(e.render,t);var n=e.render;return isObject$4(n)||(e.render=h(defineAsyncComponent(function(){return Promise.resolve(n())}),{ref:function(t){return t?u[e.name]=t:null}})),e.render},label:function(){var t;return checkComponent(isFunction$1(null==e?void 0:e.label)?null===(t=e.label)||void 0===t?void 0:t.call(e):e.label)}})}):r.default&&r.default()]}})}}})),useTabs=exports("dp",function(e){var t,n=isUndefined(e.value)?ref(null===(t=e.options[0])||void 0===t?void 0:t.name):e.value,r=shallowRef(e.options),o=ref(e.type),i=ref();return{BtTabs:defineComponent({setup:function(){return function(){return createVNode$1(__unplugin_components_1,{ref:i,modelValue:n.value,"onUpdate:modelValue":function(e){return n.value=e},type:o.value,options:r.value},null)}}}),tabs:n,tabsRefs:function(){return i.value.getRef()}}});function useLoop(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=null,r=!1,o=0,i=function(){r||o>=3?a():n=window.setTimeout(_asyncToGenerator(_regenerator().m(function t(){return _regenerator().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,e();case 1:o=0,t.n=3;break;case 2:t.p=2,t.v,o++;case 3:return t.p=3,i(),t.f(3);case 4:return t.a(2)}},t,null,[[0,2,3,4]])})),1e3*t)},a=function(){n&&(clearTimeout(n),n=null)};return onBeforeUnmount(function(){r=!0,a()}),{loop:i,clearTimer:a}}var useIdle=exports("li",function(e){var t,n=e.idle,r=e.request,o=e.timeout,i=e.retries,a=null,s=0,l=ref(!1),u=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!l.value){e.n=1;break}return a&&clearTimeout(a),e.a(2);case 1:return e.p=1,t=(new Date).getTime()/1e3,e.n=2,r();case 2:if(!e.v){e.n=3;break}return clearTimeout(a),e.a(2);case 3:s=0,n=(new Date).getTime()/1e3,a=setTimeout(u,"number"==typeof o?o:o(t,n)),e.n=5;break;case 4:e.p=4,e.v,s++,i&&s>i&&a&&clearTimeout(a);case 5:return e.a(2)}},e,null,[[1,4]])}));return function(){return e.apply(this,arguments)}}(),c=function(){clearTimeout(t),l.value&&(l.value=!1,console.log("resetIdleTimer"),u()),t=setTimeout(function(){console.log("idleTimeout"),l.value=!0},n)},d=function(){u(),n&&window.addEventListener("mouseleave",c,!0)};return d(),{isIdle:l,start:d,stop:function(){clearTimeout(t),l.value=!0,n&&window.removeEventListener("mouseleave",c,!0)}}});function variablesToCSS(e){return Object.entries(e).filter(function(e){var t=_slicedToArray(e,2)[1];return null!=t}).map(function(e){var t=_slicedToArray(e,2),n=t[0],r=t[1],o=n.startsWith("--")?n:"--".concat(n);return"".concat(o,": ").concat(r,";")}).join("\n")}function mountStyle(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:":root";if(e&&"undefined"!=typeof document){var r=document.getElementById(e),o=t.trim(),i=o.includes("{")&&o.includes("}")?t:"".concat(n," {\n").concat(t,"\n}");r||((r=document.createElement("style")).id=e,r.type="text/css",document.head.appendChild(r)),r.textContent!==i&&(r.textContent=i)}}function removeStyle(e){if("undefined"!=typeof document){var t=document.getElementById(e);t&&(t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t))}}function setModuleVariables(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:":root",r={};Object.entries(t).forEach(function(e){var t=_slicedToArray(e,2),n=t[0],o=t[1];null!=o&&(r[n]=o)});var o=variablesToCSS(r);o?mountStyle(e,o,n):removeStyle(e)}var DB_NAME="ThemeImageCacheDB",STORE_NAME="images",DB_VERSION=3,CACHE_DURATION=2592e6,createdObjectURLs=new Set,fetchImageAsBlob=function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var n,r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,fetch(t);case 1:if(n=e.v,(r=n.headers.get("content-type"))&&r.startsWith("image/")){e.n=2;break}return e.a(2,null);case 2:return e.n=3,n.blob();case 3:return e.a(2,e.v);case 4:return e.p=4,e.v,e.a(2,null)}},e,null,[[0,4]])}));return function(t){return e.apply(this,arguments)}}(),openThemeImageDB=function(){return new Promise(function(e,t){var n=indexedDB.open(DB_NAME,DB_VERSION);n.onupgradeneeded=function(e){var t,n=e.target.result,r=e.target.transaction;(t=n.objectStoreNames.contains(STORE_NAME)?r.objectStore(STORE_NAME):n.createObjectStore(STORE_NAME,{keyPath:"url"})).indexNames.contains("expires")||t.createIndex("expires","expires",{unique:!1})},n.onsuccess=function(){return e(n.result)},n.onerror=function(){return t(n.error)}})},cleanExpiredCache=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,openThemeImageDB();case 1:return t=e.v,e.a(2,new Promise(function(e,n){var r,o=t.transaction(STORE_NAME,"readwrite").objectStore(STORE_NAME),i=Date.now();if(o.indexNames.contains("expires")){var a=o.index("expires");r=a.openCursor(IDBKeyRange.upperBound(i))}else r=o.openCursor();r.onsuccess=function(t){var n=t.target.result;n?(n.value.expires<i&&n.delete(),n.continue()):e()},r.onerror=function(){return n(r.error)}}));case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}(),lastCleanupTime=0,CLEANUP_INTERVAL=3e5,getCachedBlobFromDB=function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var n,r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,(n=Date.now())-lastCleanupTime>CLEANUP_INTERVAL&&(lastCleanupTime=n,cleanExpiredCache().catch(function(e){})),e.n=1,openThemeImageDB();case 1:return r=e.v,e.a(2,new Promise(function(e,n){var o=r.transaction(STORE_NAME,"readonly").objectStore(STORE_NAME).get(t);o.onsuccess=function(){var t=o.result;t?t.expires<Date.now()?e(null):e(t.blob):e(null)},o.onerror=function(){return n(o.error)}}));case 2:return e.p=2,e.v,e.a(2,null)}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),storeBlobInDB=function(){var e=_asyncToGenerator(_regenerator().m(function e(t,n){var r,o,i;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,openThemeImageDB();case 1:return r=e.v,o=Date.now(),i={url:t,blob:n,timestamp:o,expires:o+CACHE_DURATION,type:n.type},e.a(2,new Promise(function(e,t){var n=r.transaction(STORE_NAME,"readwrite").objectStore(STORE_NAME).put(i);n.onsuccess=function(){e()},n.onerror=function(){return t(n.error)}}));case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t,n){return e.apply(this,arguments)}}(),getCachedThemeImage=function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var n,r,o,i;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t&&!t.startsWith("blob:")&&!t.startsWith("data:")){e.n=1;break}return e.a(2,t);case 1:return e.p=1,e.n=2,getCachedBlobFromDB(t);case 2:if(!(n=e.v)){e.n=3;break}return r=URL.createObjectURL(n),createdObjectURLs.add(r),e.a(2,r);case 3:return e.n=4,fetchImageAsBlob(t);case 4:if(!(o=e.v)){e.n=5;break}return storeBlobInDB(t,o).catch(function(e){}),i=URL.createObjectURL(o),createdObjectURLs.add(i),e.a(2,i);case 5:return e.a(2,t);case 6:return e.p=6,e.v,e.a(2,t)}},e,null,[[1,6]])}));return function(t){return e.apply(this,arguments)}}(),broadcastThemeChange=function(e){try{if(document.querySelectorAll("iframe").forEach(function(t){try{t.contentWindow&&t.contentWindow.postMessage(e,"*")}catch(n){}}),window.opener)try{window.opener.postMessage(e,"*")}catch(t){}}catch(t){}},ThemeUpdater=function(){return _createClass(function e(){_classCallCheck(this,e)},null,[{key:"updateThemePreset",value:function(e){var t,n,r=themeState.getState(),o="auto"===e?"dark"===getSystemTheme():"dark"===e,i=o?"dark":"light";o?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),r.color&&this.updateThemeColor(r.color,e,!0),r.sidebarColor&&this.updateSidebarColor(r.sidebarColor,e,!0),r.interfaceRadius&&this.updateInterfaceRadius(r.interfaceRadius,e,!0),r.interfaceBgImageShow&&this.updateInterfaceBackgroundImage(null!==(t=r.interfaceBgImage)&&void 0!==t?t:"",null!==(n=r.interfaceBgImageShow)&&void 0!==n&&n),broadcastThemeChange({type:"theme-change",theme:i,preset:e,color:r.color})}},{key:"init",value:function(e){this.updateTheme({preset:e.theme.preset,view:e.theme.view,color:e.theme.color,sidebarColor:e.sidebar.color,sidebarOpacity:e.sidebar.opacity,interfaceRadius:e.interface.rounded,interfaceBgImage:e.interface.bg_image,interfaceBgImageShow:e.interface.is_show_bg,interfaceShadowColor:e.interface.shadow_color,interfaceBgImageOpacity:e.interface.bg_image_opacity,interfaceContentOpacity:e.interface.content_opacity,interfaceShadowOpacity:e.interface.shadow_opacity,interfaceContainerWidth:e.interface.container_width,homeOverviewSize:e.home.overview_size})}},{key:"updateThemeView",value:function(e){themeState.checkAndCommitState("view",e)||(setThemeClass(e,"view"),"aapanel"===e?(this.updateSidebarOpacity(80),this.updateInterfaceContentOpacity(80),this.updateInterfaceBgImageOpacity(80)):(this.updateSidebarOpacity(100),this.updateInterfaceContentOpacity(90),this.updateInterfaceBgImageOpacity(20)))}},{key:"updateThemeColor",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!themeState.checkAndCommitState("color",e)||n){var r="auto"===t?"dark"===getSystemTheme()?"dark":"light":t,o="dark"===r,i=generateCssVariables(generateColorScale(e,{mode:r,format:["hex","rgb"]}));setModuleVariables(STYLE_MODULE_IDS.themeColor,i,o?"html.dark":":root"),setThemeClass(getColorName(e),"color"),broadcastThemeChange({type:"theme-change",theme:r,color:e})}}},{key:"updateSidebarColor",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!themeState.checkAndCommitState("sidebarColor",e)||n){var r="dark"===("auto"===t?"dark"===getSystemTheme()?"dark":"light":t),o="aapanel"===themeState.getState().view,i=o?{"bt-menu-text-color-active":"#ffffff"}:{};if(r)setModuleVariables(STYLE_MODULE_IDS.sidebar,i);else{var a=hexToRgb(e,!1);if(!a)return;var s=a.r,l=a.g,u=a.b,c=(.299*s+.587*l+.114*u)/255,d=c>.5?"#303133":"#ffffff",p=Math.max(0,s-4),h=Math.max(0,l-4),f=Math.max(0,u-4),g=c>.5&&!o?"#909399":"#cccccc",m=_objectSpread({"bt-menu-icon-color":c>.5&&!o?"#666666":"#bbbbbb","bt-menu-sidebar-color":o?"rgba(255, 255, 255, var(--bt-menu-sidebar-bg-opacity))":"rgba(".concat(s,", ").concat(l,", ").concat(u,", var(--bt-menu-sidebar-bg-opacity))"),"bt-menu-sidebar-color-active":o?"var(--el-color-primary)":"rgba(".concat(p,", ").concat(h,", ").concat(f,", var(--bt-menu-sidebar-bg-opacity))"),"bt-menu-shadow-color":"rgba(0,0,0, 0.1)","bt-menu-text-color":o?"#333":d,"bt-menu-operation-color":g,"bt-menu-operation-color-active":d,"bt-menu-operation-bg-color":"rgb(".concat(p,", ").concat(h,", ").concat(f,")")},i),y=this.filterUndefinedVariables(m);setModuleVariables(STYLE_MODULE_IDS.sidebar,y,":root")}}}},{key:"updateSidebarOpacity",value:function(e){themeState.checkAndCommitState("sidebarOpacity",e)||setModuleVariables(STYLE_MODULE_IDS.sidebarOpacity,{"bt-menu-sidebar-bg-opacity":e/100})}},{key:"updateInterfaceRadius",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!themeState.checkAndCommitState("interfaceRadius",e)||n){var r="dark"===("auto"===t?"dark"===getSystemTheme()?"dark":"light":t),o={none:["0px","0px !important","0px","0px","0px","0px","50px"],smaller:["2px","2px","2px","4px","6px","4px","25px"],small:["2px","4px","6px","8px","12px","20px","50px"],medium:["4px","6px","8px","12px","16px","24px","50px"],large:["6px","8px","12px","16px","20px","28px","50px"]},i={"el-border-radius-circle":"100%"},a=o[e]||o.medium;["el-border-radius-small","el-border-radius-base","el-border-radius-medium","el-border-radius-large","el-border-radius-extra-large","el-border-radius-round","el-border-radius-extra-round"].forEach(function(e,t){i[e]=a[t]}),setModuleVariables(STYLE_MODULE_IDS.interfaceRadius,i,r?"html.dark":":root")}}},{key:"updateInterfaceBackgroundImage",value:(t=_asyncToGenerator(_regenerator().m(function e(t,n){var r,o,i;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(r=themeState.checkAndCommitState("interfaceBgImage",t),o=themeState.checkAndCommitState("interfaceBgImageShow",n),!r||!o){e.n=1;break}return e.a(2);case 1:if(!n){e.n=3;break}return e.n=2,getCachedThemeImage(t||"");case 2:i=e.v,setModuleVariables(STYLE_MODULE_IDS.interfaceBackgroundImage,{"bt-main-bg-images":"url(".concat(i,")")}),e.n=4;break;case 3:setModuleVariables(STYLE_MODULE_IDS.interfaceBackgroundImage,{"bt-main-bg-images":"none"});case 4:return e.a(2)}},e)})),function(e,n){return t.apply(this,arguments)})},{key:"updateInterfaceShadowColor",value:function(e){if(e&&!themeState.checkAndCommitState("interfaceShadowColor",e)){var t=hexToRgb(e,!1);if(t){var n="".concat(t.r,",").concat(t.g,",").concat(t.b);setModuleVariables(STYLE_MODULE_IDS.interfaceShadowColor,{"bt-main-shadow-color":n})}}}},{key:"updateInterfaceBgImageOpacity",value:function(e){themeState.checkAndCommitState("interfaceBgImageOpacity",e)||setModuleVariables(STYLE_MODULE_IDS.interfaceBackgroundImageOpacity,{"bt-main-bg-images-opacity":e/100})}},{key:"updateInterfaceContentOpacity",value:function(e){themeState.checkAndCommitState("interfaceContentOpacity",e)||setModuleVariables(STYLE_MODULE_IDS.interfaceContentOpacity,{"bt-main-content-opacity":e/100})}},{key:"updateInterfaceShadowOpacity",value:function(e){themeState.checkAndCommitState("interfaceShadowOpacity",e)||setModuleVariables(STYLE_MODULE_IDS.interfaceShadowOpacity,{"bt-main-shadow-opacity":e/100})}},{key:"updateHomeFontSize",value:function(e){themeState.checkAndCommitState("homeOverviewSize",e)||setModuleVariables(STYLE_MODULE_IDS.homeOverviewSize,{"bt-home-overview-font-size":"".concat(e,"px")})}},{key:"updateTheme",value:(e=_asyncToGenerator(_regenerator().m(function e(t){var n,r,o,i;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(n=t.preset||themeState.getState().preset||"light",t.preset&&(this.updateThemePreset(t.preset),themeState.checkAndCommitState("preset",t.preset)),t.view&&this.updateThemeView(t.view),t.color&&this.updateThemeColor(t.color,n),t.sidebarColor&&this.updateSidebarColor(t.sidebarColor,n),void 0!==t.sidebarOpacity&&this.updateSidebarOpacity(t.sidebarOpacity),t.interfaceRadius&&this.updateInterfaceRadius(t.interfaceRadius,n),void 0===t.interfaceBgImage&&void 0===t.interfaceBgImageShow){e.n=1;break}return o=void 0!==t.interfaceBgImage?t.interfaceBgImage:null!==(r=themeState.getState().interfaceBgImage)&&void 0!==r?r:null,i=void 0!==t.interfaceBgImageShow?t.interfaceBgImageShow:themeState.getState().interfaceBgImageShow,e.n=1,this.updateInterfaceBackgroundImage(o,null!=i&&i);case 1:t.interfaceShadowColor&&this.updateInterfaceShadowColor(t.interfaceShadowColor),void 0!==t.interfaceBgImageOpacity&&this.updateInterfaceBgImageOpacity(t.interfaceBgImageOpacity),void 0!==t.interfaceContentOpacity&&this.updateInterfaceContentOpacity(t.interfaceContentOpacity),void 0!==t.interfaceShadowOpacity&&this.updateInterfaceShadowOpacity(t.interfaceShadowOpacity),void 0!==t.homeOverviewSize&&this.updateHomeFontSize(t.homeOverviewSize);case 2:return e.a(2)}},e,this)})),function(t){return e.apply(this,arguments)})},{key:"initSystemThemeListener",value:function(){if("undefined"!=typeof window&&window.matchMedia){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",function(){var e=themeState.getState(),t=e.preset,n=e.color;if("auto"===t){var r="dark"===getSystemTheme()?"dark":"light";broadcastThemeChange({type:"theme-change",theme:r,preset:"auto",color:n})}})}}},{key:"filterUndefinedVariables",value:function(e){var t={};return Object.entries(e).forEach(function(e){var n=_slicedToArray(e,2),r=n[0],o=n[1];void 0!==o&&(t[r]=o)}),t}}]);var e,t}();exports("T",ThemeUpdater);var useThemeSync=exports("jg",function(){var e=useGlobalStore(),t=storeToRefs(e).globalTheme,n=useDark(),r=function(e){var t,r,o,i,a,s,l,u,c,d,p,h,f,g,m;if(e){ThemeUpdater.updateTheme({preset:null===(t=e.theme)||void 0===t?void 0:t.preset,view:null===(r=e.theme)||void 0===r?void 0:r.view,color:null===(o=e.theme)||void 0===o?void 0:o.color,sidebarColor:null===(i=e.sidebar)||void 0===i?void 0:i.color,sidebarOpacity:null===(a=e.sidebar)||void 0===a?void 0:a.opacity,interfaceRadius:null===(s=e.interface)||void 0===s?void 0:s.rounded,interfaceBgImage:null===(l=e.interface)||void 0===l?void 0:l.bg_image,interfaceBgImageShow:null===(u=e.interface)||void 0===u?void 0:u.is_show_bg,interfaceBgImageOpacity:null===(c=e.interface)||void 0===c?void 0:c.bg_image_opacity,interfaceContentOpacity:null===(d=e.interface)||void 0===d?void 0:d.content_opacity,interfaceShadowColor:null===(p=e.interface)||void 0===p?void 0:p.shadow_color,interfaceShadowOpacity:null===(h=e.interface)||void 0===h?void 0:h.shadow_opacity,homeOverviewSize:null===(f=e.home)||void 0===f?void 0:f.overview_size,interfaceContainerWidth:null===(g=e.interface)||void 0===g?void 0:g.container_width});var y=null===(m=e.theme)||void 0===m?void 0:m.preset;y&&(n.value="auto"===y?"dark"===getSystemTheme():"dark"===y)}};return{initTheme:function(){try{r(t.value),ThemeUpdater.initSystemThemeListener()}catch(e){}},enableThemeWatch:function(){watch(function(){return t.value},r,{deep:!0})},syncThemeFromConfig:r}});function useLogSelection(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=useGlobalStore().panel,n=e.siteName,r=void 0===n?"":n,o=e.logType,i=void 0===o?"":o,a=e.customPrompt,s=void 0===a?"":a,l=e.getPrompt,u=ref(null),c=ref(""),d=ref({position:"absolute",top:"0px",left:"0px",transform:"translateX(-100%)"}),p=function(){if(t.value.showAiTip){var e=window.getSelection();if(e&&!e.isCollapsed&&u.value){var n=e.anchorNode;if(u.value.contains(n)){var r=e.toString().trim();if(r){c.value=r;var o=e.getRangeAt(0).getBoundingClientRect(),i=u.value.getBoundingClientRect();d.value={position:"absolute",top:"".concat(o.top-i.top+u.value.scrollTop-36,"px"),left:"".concat(o.right-i.left,"px"),transform:"translateX(-100%)"}}else c.value=""}else c.value=""}else c.value=""}},h=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n,o,a;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(c.value){e.n=1;break}return e.a(2);case 1:return e.n=2,__vitePreload(function(){return module.import("./index-legacy3.js?v=1777008528").then(function(e){return e.dQ})},void 0,module.meta.url);case 2:n=e.v,o=n.openAiChat,a=l?l(c.value):s||(r?"帮我分析".concat(r,"网站").concat(i,"日志内容:\n"):i?"帮我分析当前网站".concat(i,"日志内容:\n"):"帮我分析当前网站日志内容:\n"),o({message:"".concat(a).concat(c.value),autoSend:!1,windowMode:"popup"}),null===(t=window.getSelection())||void 0===t||t.removeAllRanges(),c.value="";case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),f=p,g=p;return onMounted(function(){document.addEventListener("selectionchange",f),u.value&&u.value.addEventListener("scroll",g)}),onUnmounted(function(){document.removeEventListener("selectionchange",f),u.value&&u.value.removeEventListener("scroll",g)}),{containerRef:u,tipStyle:d,selectedText:c,handleAiAnalyze:h}}function useTerminalSelection(e){var t=useGlobalStore().panel,n=e.terminalRefs,r=e.hostActive,o=e.terminalList,i=e.terminalName,a=void 0===i?"":i,s=e.enabled,l=void 0===s?ref(!1):s,u=ref(null),c=ref(""),d=ref({position:"fixed",top:"0px",left:"0px",transform:"translateX(-100%)",display:"none"}),p=null,h=null,f=0,g=function(e,n){if(!t.value.showAiTip||!l.value)return c.value="",void(d.value.display="none");if(!e||!u.value)return c.value="",void(d.value.display="none");if(!e.hasSelection())return c.value="",void(d.value.display="none");var r=e.getSelection().trim();if(!r)return c.value="",void(d.value.display="none");c.value=r,u.value.getBoundingClientRect();var o=e.element;if(o){var i=o.getBoundingClientRect(),a=null!=n?n:f,s=i.right;d.value={position:"fixed",top:"".concat(a-46,"px"),left:"".concat(s,"px"),transform:"translateX(-100%)",display:"flex"}}else d.value.display="none"},m=function(){var e;h&&(h.dispose(),h=null);var t=r.value,i=o.value[t];if(i){var a="terminal-".concat(i.id),s=n.value[a];if(s){var l=null===(e=s.useTerminal)||void 0===e?void 0:e.call(s);l&&(p=l,h=l.onSelectionChange(function(){g(l)}))}}},y=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n,r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(c.value){e.n=1;break}return e.a(2);case 1:return e.n=2,__vitePreload(function(){return module.import("./index-legacy3.js?v=1777008528").then(function(e){return e.dQ})},void 0,module.meta.url);case 2:t=e.v,n=t.openAiChat,r=a?"帮我分析".concat(a,"终端输出内容:\n"):"帮我分析终端输出内容:\n",n({message:"".concat(r).concat(c.value),autoSend:!1,windowMode:"popup"}),p&&p.clearSelection(),c.value="",d.value.display="none";case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),v=function(e){var t=e;f=t.clientY,p&&g(p,t.clientY)};return watch(r,function(){m(),c.value="",d.value.display="none"}),watch(n,function(){m()},{deep:!0}),onMounted(function(){setTimeout(function(){m()},100)}),onUnmounted(function(){h&&(h.dispose(),h=null),u.value&&u.value.removeEventListener("mouseup",v)}),{setContainerRef:function(e){var t=e instanceof Element?e:null;u.value=t,t&&t.addEventListener("mouseup",v)},tipStyle:d,selectedText:c,handleAiAnalyze:y}}function useVisibility(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.checkCss,r=void 0===n||n,o=t.checkViewport,i=void 0===o||o,a=t.threshold,s=void 0===a?0:a,l=t.root,u=void 0===l?null:l,c=t.rootMargin,d=void 0===c?"0px":c,p=t.initialVisible,h=void 0!==p&&p,f=ref(h),g=ref(h),m=ref(h),y=null,v=null,_=null,x=function(){r?(m.value=function(){if(!e.value)return!1;var t=e.value,n=window.getComputedStyle(t);if("hidden"===n.visibility||"collapse"===n.visibility)return!1;if("none"===n.display)return!1;if(0===parseFloat(n.opacity))return!1;for(var r=t.parentElement;r;){var o=window.getComputedStyle(r);if("hidden"===o.visibility||"collapse"===o.visibility||"none"===o.display)return!1;r=r.parentElement}return!0}(),S()):m.value=!0},S=function(){f.value=r&&i?m.value&&g.value:r?m.value:!i||g.value},b=function(){_&&(clearInterval(_),_=null),v&&(v.disconnect(),v=null)},T=function(){y&&(y.disconnect(),y=null)},A=function(){e.value&&(x(),function(){if(r){if(e.value&&!v){v=new MutationObserver(function(){x()});for(var t=e.value;t;)v.observe(t,{attributes:!0,attributeFilter:["style","class","hidden"]}),t=t.parentElement}_=setInterval(function(){x()},200)}}(),i&&e.value&&(y=new IntersectionObserver(function(e){var t,n=_createForOfIteratorHelper(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;g.value=r.isIntersecting,S()}}catch(o){n.e(o)}finally{n.f()}},{threshold:s,root:u,rootMargin:d})).observe(e.value))},w=function(){b(),T(),f.value=!1,g.value=!1,m.value=!1};return watch(e,function(e,t){t&&(T(),b()),e&&A()}),onMounted(function(){e.value&&A()}),onUnmounted(function(){w()}),{isVisible:f,inViewport:g,cssVisible:m,start:A,stop:w}}var index$4=Object.freeze(Object.defineProperty({__proto__:null,DataHandle:DataHandle,Message:Message$2,Socket:Socket,closeAllDialog:closeAllDialog,useAllTable:useAllTable,useAxios:useAxios,useBatch:useBatch,useColumn:useColumn,useConfirm:useConfirm,useDataHandle:useDataHandle,useDataPage:useDataPage,useDialog:useDialog,useDynamicTable:useDynamicTable,useECharts:useECharts,useErrorMask:useErrorMask,useForm:useForm,useHandleError:useHandleError,useIdle:useIdle,useLoading:useLoading,useLogSelection:useLogSelection,useLoop:useLoop,useMessage:useMessage,useNegotiate:useNegotiate,useOperation:useOperation,usePage:usePage,useRadioButton:useRadioButton,useRecommendSearch:useRecommendSearch,useRefresh:useRefresh,useRefreshList:useRefreshList,useSearch:useSearch,useSocket:useSocket,useTable:useTable,useTableSelect:useTableSelect,useTabs:useTabs,useTerminalSelection:useTerminalSelection,useThemeSync:useThemeSync,useVisibility:useVisibility},Symbol.toStringTag,{value:"Module"}));exports("mg",index$4);var getPublicConfig=function(){return useAxios.post("panel/public/get_public_config",{customType:"model",check:"object"})},getConfigInfo=function(){return useAxios.post("config/get_config",{data:{status:!0}})},getEnterpriseConfig=function(){return useAxios.post("panel/public/get_exp_ltd",{customType:"model",check:"object"})},getSystemInfo$1=exports("gZ",function(){return useAxios.post("system/GetNetWork")}),getDataInfo=exports("cX",function(e){return useAxios.post("data/getData",{data:e})}),getDataList=exports("g8",function(e){return useAxios.post("datalist/data/get_data_list",{data:e,customType:"model",check:"object"})}),installedMsgList=exports("iv",function(e){return useAxios.post("panel/msgbox/installed_msg_list",{data:e,customType:"model"})}),getExecLog=exports("iw",function(){return useAxios.post("files/GetExecLog",{check:"string"})}),getTaskLists=exports("lU",function(e){return useAxios.post("task/get_task_lists",{data:e,check:"array"})}),removeTask=exports("eM",function(e){return useAxios.post("task/remove_task",{data:e,check:"msg"})}),removeTaskFile=exports("iu",function(e){return useAxios.post("files/RemoveTask",{data:e,check:"msg"})}),setPs=exports("N",function(e){return useAxios.post("data/setPs",{data:e,check:"msg"})}),checkLogin=function(){return useAxios.post("ajax/checkLogin")},restartPanel=exports("bY",function(){return useAxios.post("system/ReWeb",{check:"msg"})}),repairPanel=function(){return useAxios.post("system/RepPanel")},repairPanelNew=exports("bM",function(e){return useAxios.post("system/repair_panel",{data:e,check:"object"})}),getUpgradeLog=exports("c0",function(){return useAxios.post("system/get_upgrade_log",{check:"ignore"})}),serviceManage=exports("bZ",function(e){return useAxios.post("system/ServiceAdmin",{data:e,check:"msg"})}),restartServer=exports("b_",function(){return useAxios.post("system/RestartServer")}),getTotal=exports("b$",function(){return useAxios.post("system/GetSystemTotal",{})}),getBetaLogs=function(){return useAxios.post("ajax/get_beta_logs")},bindBtUserName=exports("d",function(e){return useAxios.post("ssl/GetAuthToken",{data:e,check:"msg"})}),getBindCode=exports("ef",function(e){return useAxios.post("ssl/GetBindCode",{data:e})}),histVersionInfo=exports("c1",function(){return useAxios.post("/panel/public/get_update_logs",{check:"array",customType:"model"})}),getSoftList=exports("hq",function(){return useAxios.post("ajax/GetSoftList")}),installRecommendedSoft=exports("ho",function(e){return useAxios.post("plugin/install_plugin",{data:e})}),appleBeta=exports("c2",function(){return useAxios.post("ajax/apple_beta",{check:"msg"})}),toOfficial=exports("c3",function(){return useAxios.post("ajax/to_not_beta",{check:"msg"})}),getTaskCount=function(){return useAxios.post("ajax/GetTaskCount")},getLines=exports("a1",function(e){return useAxios.post("ajax/get_lines",{data:e,check:"msg"})}),updatePanel=exports("bQ",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return useAxios.post("ajax/UpdatePanel",{data:e,check:"msg"})}),getUpdateInfo=exports("bU",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return useAxios.post("ajax/UpdatePanel",{data:e,check:"ignore"})}),upgradePanelNew=exports("bP",function(e){return useAxios.post("system/upgrade_panel",{data:e,check:"object"})}),setDebug=exports("bR",function(){return useAxios.post("config/set_debug")}),getDebug=function(){return useAxios.post("config/Get_debug")},getAuthState=function(){return useAxios.post("ajax/get_pd")},getTaskList$1=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{status:-3};return useAxios.post("ajax/get_task_lists",{data:e})},getPluginRemarks=exports("cK",function(){return useAxios.post("auth/get_plugin_remarks")}),getVoucherPlugin=exports("cD",function(e){return useAxios.post("auth/get_voucher_plugin",{data:e})}),getAllVoucherPlugin=function(e){return useAxios.post("auth/get_all_voucher_plugin",{data:e})},createVoucherOrder=exports("cF",function(e){return useAxios.post("auth/create_order_voucher_plugin",{data:e,check:"object"})}),getCoupons=exports("cB",function(){return useAxios.post("auth/get_coupons",{check:"object"})}),getApplyCopon=exports("cz",function(e){return useAxios.post("auth/get_apply_copon",{data:e,check:"object"})}),getProductPrice=exports("cy",function(e){return useAxios.post("auth/get_plugin_price",{data:e})}),getProductBuyCode=exports("cv",function(e){return useAxios.post("auth/get_buy_code",{data:e,check:"object"})}),getCredits=exports("cx",function(e){return useAxios.post("auth/get_credits",{data:e,check:"object"})}),getLastPaidTime=exports("cw",function(e){return useAxios.post("auth/get_last_paid_time",{data:e,check:"object"})}),createWithCreditByPanel=exports("cE",function(e){return useAxios.post("auth/create_with_credit_by_panel",{data:e})}),unbindAuthorization=exports("cG",function(){return useAxios.post("auth/unbind_authorization",{check:"object"})}),getPaymentStatus=exports("cC",function(e){return useAxios.post("auth/get_wx_order_status",{data:e,check:"object"})}),getRecommendContent=exports("c6",function(){return useAxios.post("ajax/get_pay_type")}),getSelectDir=exports("hK",function(e){return useAxios.post("files/GetDir",{data:e})}),createSelectionfile=exports("hJ",function(e){var t=e.type,n=e.path;return useAxios.post("files/Create".concat(t),{data:{path:n},check:"msg"})}),getPluginHtml=function(e){return useAxios.post("plugin/getConfigHtml",{data:e,check:"string"})},getPluginAuth=exports("ma",function(e){return useAxios.post("/plugin?action=a&name=".concat(e),{check:"msg",customType:"model"})}),getMenuList=exports("cr",function(){return useAxios.post("config/get_menu_list",{check:"array"})}),getAdHideConfig=exports("d9",function(){return useAxios.post("config/get_ad_hide_config")}),setAdHideConfig=exports("eR",function(e){return useAxios.post("config/set_ad_hide_config",{data:e,check:"msg"})}),setHideMenuList=exports("cq",function(e){return useAxios.post("config/set_hide_menu_list",{data:e,check:"msg"})}),getPluginInfo=exports("I",function(e){return useAxios.post("plugin/get_soft_find",{data:e,check:"object"})}),inputPackageInfo=exports("m1",function(e){return useAxios.post("plugin/input_package",{data:e,check:"msg"})}),inputZips=exports("lY",function(e){return useAxios.post("plugin/input_zip",{data:e,check:"msg"})}),getPluginUpgrades=exports("lZ",function(e){return useAxios.post("plugin/get_plugin_upgrades",{data:e,check:"array"})}),getInstallPluginInfo=function(e){return useAxios.post("plugin/install_plugin",{data:e,check:"object"})},getDownloadSpeed=exports("m6",function(e){return useAxios.post("plugin/get_download_speed",{data:e,check:"object"})}),getPanelPush=function(e){var t=e.id,n=e.name;return useAxios.post("push/get_push_config",{data:{id:t,name:n},check:"object"})},setPanelPush=function(e){return useAxios.post("push/set_push_config",{data:e,check:"msg"})},setMsgConfig=exports("ic",function(e,t){return useAxios.post("config/set_msg_config&name=".concat(e),{data:t,check:"msg"})}),ignoreVersion=exports("bS",function(e){var t=e.version;return useAxios.post("ajax/ignore_version",{data:{version:t},check:"msg"})}),getMsgFun=exports("id",function(e,t,n){return useAxios.post("config/get_msg_fun",{data:{module_name:e,fun_name:t,msg:n||""},check:"msg"})}),clearRecycleBin=function(){return useAxios.post("files/Close_Recycle_bin",{check:"msg"})},getRecycleData=function(){return useAxios.post("files/Get_Recycle_bin",{check:"object"})},setRecycleStatus=function(e){return useAxios.post("files/Recycle_bin",{data:e,check:"msg"})},getPrivilegeSoftList=exports("cH",function(e){return useAxios.post("plugin/get_soft_list",{data:e})}),getNpsQuestion=exports("O",function(e){return useAxios.post("config/get_nps_new",{data:e,check:"object"})}),ignoreNps=exports("eJ",function(e){return useAxios.post("config/stop_nps",{data:e,check:"object"})}),getNps=exports("lP",function(e){return useAxios.post("config/get_nps",{data:{version:"-1",product_type:e.productType,software_name:e.softwareName}})}),writeNpsQuestion=exports("bT",function(e){return useAxios.post("config/write_nps_new",{data:e,check:"object"})}),getNewNpsTag=exports("eK",function(e){return useAxios.post("config/get_nps_info",{check:"msg",data:e})}),getCustomModule=exports("m5",function(e){return useAxios.post("plugin/get_make_args",{data:e})}),addCustomModule=exports("m4",function(e){return useAxios.post("plugin/add_make_args",{data:e,check:"msg"})}),delCustomModule=exports("m2",function(e){return useAxios.post("plugin/del_make_args",{data:e,check:"msg"})}),setCustomModule=exports("m3",function(e){return useAxios.post("plugin/set_make_args",{data:e,check:"msg"})}),getPaymentCouponList=exports("cJ",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return useAxios.post("auth/get_coupon_list",{check:"array",data:e})}),ignoreCouponTime=exports("cA",function(e){return useAxios.post("auth/ignore_coupon_time",{data:e,check:"msg"})}),removeSearchHistory=exports("l$",function(e){return useAxios.post("panel/history/remove_search_history",{data:e,customType:"model",check:"msg"})}),clearSearchHistory=exports("m0",function(e){return useAxios.post("panel/history/clear_search_history",{data:e,customType:"model",check:"msg"})}),setTableHeader=function(e){return useAxios.post("config/set_table_header",{data:e,check:"msg"})},getTableHeader=function(e){return useAxios.post("config/get_table_header",{data:e,check:"object"})},getLoginStatus=exports("lS",function(){return useAxios.get("favicon.ico",{customType:"model",check:"msg"})}),saveFileBody=exports("F",function(e){return useAxios.post("/files?action=SaveFileBody",{data:e,customType:"model",check:"msg"})}),getMemoBody=exports("lf",function(){return useAxios.post("/config?action=get_memo_body",{customType:"model",check:"string"})}),getFileContent=exports("E",function(e){return useAxios.post("/files?action=GetFileBody",{data:e,customType:"model"})}),getFileBody=exports("dR",function(e){return useAxios.post("files/GetFileBody",{data:e})}),getMsgInfo=exports("dQ",function(e){return useAxios.post("panel/msgbox/get_msg_info",{data:e,customType:"model"})}),reHistory=exports("cV",function(e){return useAxios.post("files/re_history",{data:e,check:"object"})}),getRewriteTel=function(e){return useAxios.post("files/read_history",{data:e})},deleteFile$1=exports("dt",function(e){return useAxios.post("files/".concat("dir"===e.type?"DeleteDir":"DeleteFile"),{data:{path:e.path},check:"object"})}),sendBaota=exports("e9",function(e){return useAxios.post("files/send_baota",{data:e,check:"msg"})}),installJDK=exports("hm",function(e){return useAxios.post("/project/java/install_jdk_new",{data:e,check:"msg",customType:"model"})}),installNewJdk=function(e){return useAxios.post("/mod/java/project/install_jdk_new",{data:e,check:"msg",customType:"model"})},createDir=exports("hp",function(e){return useAxios.post("files/CreateDir",{data:e,check:"msg"})}),repairRisk=exports("gL",function(e){return useAxios.post("safe/security/set_security",{data:e,customType:"model",check:"object"})}),setIgnore=exports("gM",function(e){return useAxios.post("warning/set_ignore",{data:e,check:"msg"})}),setIgnoreVul=function(e){return useAxios.post("warning/set_vuln_ignore",{data:e,check:"msg"})},checkVul=function(e){return useAxios.post("warning/check_cve",{data:e,check:"msg"})},checkFind=function(e){return useAxios.post("warning/check_find",{data:e,check:"msg"})},setPushConfig=function(e){return useAxios.post("push/set_push_config",{data:e,check:"msg"})},setTaskStatus$1=exports("bO",function(e){return useAxios.post("/mod/push/task/change_task_conf",{data:e,check:"msg",customType:"model"})}),getSystemConfigProjectList=exports("le",function(){return useAxios.post("panel/push/system_push_next",{customType:"model",check:"array"})}),getOverview=function(){return useAxios.post("panel/overview/GetOverview",{check:"msg",customType:"model"})},getTemplateOverview=exports("lg",function(){return useAxios.post("panel/overview/GetTemplateOverview",{check:"object",customType:"model"})}),getHomeResData=exports("g_",function(){return useAxios.post("monitor/process_management/specific_resource_load_type",{customType:"model",check:"object"})}),getAlarmModule=function(){return useAxios.post("config/get_msg_configs")},getPushList=function(){return useAxios.post("push/get_push_list",{check:"object"})},getMsgConfigs=function(){return useAxios.post("config/get_msg_configs",{})},delPushConfig=function(e){return useAxios.post("push/del_push_config",{data:e,check:"msg"})},delTaskStatus$1=exports("ld",function(e){return useAxios.post("/mod/push/task/remove_task_conf",{data:e,check:"msg",customType:"model"})}),setPushStatus=function(e){return useAxios.post("push/set_push_status",{data:e,check:"msg"})},getCloudServer=function(e){return useAxios.post("database/GetCloudServer",{data:e,check:"array"})},getScanList=function(){return useAxios.post("project/scanning/list",{customType:"model"})},getSiteTypes=function(e){return useAxios.post("site/get_site_types",{data:e,check:"array"})},getTaskTemplate=exports("l",function(){return useAxios.post("/mod/push/task/get_task_template_list",{check:"msg",customType:"model"})}),delToken=exports("mc",function(){return useAxios.post("ssl/DelToken",{check:"msg"})}),getTaskSpeed=exports("is",function(){return useAxios.post("files/GetTaskSpeed")}),installAlarmModule=exports("m9",function(e){var t=e.name;return useAxios.post("config/install_msg_module&name=".concat(t),{check:"msg"})}),setUsername=exports("dg",function(e){return useAxios.post("config/setUsername",{data:e,check:"msg"})}),getSoftStatus=exports("cm",function(e){return useAxios.post("/panel/public/get_soft_status",{data:e,check:"object",customType:"model"})}),setAtuoStartSyssafe=exports("dk",function(e){return useAxios.post("crontab/set_atuo_start_syssafe",{data:e,check:"msg"})}),setPassword=exports("fN",function(e){return useAxios.post("config/setPassword",{data:e,check:"msg"})}),setlastPassword=exports("fO",function(){return useAxios.post("config/setlastPassword",{check:"msg"})}),getCertList=exports("dn",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return useAxios.post("ssl/get_cert_list",{data:e,check:"array"})}),getSenderAlarmList=function(e){return useAxios.post("/mod/push/msgconf/get_sender_list",{data:e,check:"msg",customType:"model"})},getAlarmTaskList=exports("di",function(e){return useAxios.post("/mod/push/task/get_task_list",{data:e,check:"object",customType:"model"})}),setNewAlarmTask$1=exports("bX",function(e){return useAxios.post("/mod/push/task/set_task_conf",{data:e,check:"msg",customType:"model"})}),upDateNewAlarmTask=exports("dj",function(e){return useAxios.post("/mod/push/task/update_task_status",{data:e,check:"msg",customType:"model"})}),setSmsStatus=exports("iL",function(e){return useAxios.post("/mod/push/msgconf/change_sendr_used",{data:e,check:"msg",customType:"model"})}),setBindStatus=exports("iF",function(e){return useAxios.post("/mod/push/msgconf/change_sendr_used",{data:e,check:"msg",customType:"model"})}),testBindAlarm=exports("iG",function(e){return useAxios.post("/mod/push/msgconf/test_send_msg",{data:e,check:"msg",customType:"model"})}),unBindCommonAccount=exports("iI",function(e){return useAxios.post("/mod/push/msgconf/remove_sender",{data:e,check:"msg",customType:"model"})}),unBindWxAccount=exports("iH",function(e){return useAxios.post("/mod/push/msgconf/unbind_wx_account",{data:e,check:"object",customType:"model"})}),setDefaultSender=exports("iE",function(e){return useAxios.post("/mod/push/msgconf/set_default_sender",{data:e,check:"msg",customType:"model"})}),getBindWxCode=exports("iD",function(){return useAxios.post("/mod/push/msgconf/wx_account_auth",{check:"msg",customType:"model"})}),setCommonAccount=exports("iC",function(e){return useAxios.post("/mod/push/msgconf/set_sender_conf",{data:e,check:"msg",customType:"model"})}),editFtpPort=exports("eN",function(e){return useAxios.post("ftp/setPort",{data:e,check:"msg"})}),getStartErrType=exports("gl",function(){return useAxios.post("database/GetStartErrType",{check:"msg"})}),setInnodbRecovery=exports("gm",function(e){return useAxios.post("database/SetInnodbRecovery",{data:e,check:"msg"})}),getPhpVersion=exports("i6",function(){return useAxios.post("site/GetPHPVersion")}),getPhpmyadminSsl=exports("i7",function(){return useAxios.post("ajax/get_phpmyadmin_ssl",{check:"object"})}),setPhpmyadminSsl=exports("i4",function(e){return useAxios.post("ajax/set_phpmyadmin_ssl",{data:e,check:"msg"})}),changePhpmyadminSslPort=exports("i3",function(e){return useAxios.post("ajax/change_phpmyadmin_ssl_port",{data:e,check:"msg"})}),setPHPMyAdminPass=exports("i2",function(e){return useAxios.post("ajax/setPHPMyAdmin",{data:e,check:"msg"})}),getKey=exports("i5",function(e){return useAxios.post("data/getKey",{data:e,check:"string"})}),dokcerInstall$1=exports("hn",function(e){return useAxios.post("/btdocker/setup/install_docker_program",{data:e,customType:"model",check:"msg"})}),checkLoginAuth=exports("fM",function(){return useAxios.post("/ssl?action=GetCloudType",{loading:"正在获取面板消息",check:"object",customType:"model"})}),tencentLogin=exports("eL",function(e){return useAxios.post("/ssl?action=AuthLogin",{data:e,check:"object",customType:"model"})}),getOtheAccreditURL=exports("gk",function(e){return useAxios.post("/ssl?action=GetAuthUrl",{data:e,check:"object",customType:"model"})}),setBackupPopup=exports("dG",function(){return useAxios.post("/mod/backup_restore/com/del_migrate_tips",{check:"msg",customType:"model"})}),getWechatAuthUrl=exports("g",function(){return useAxios.post("ssl/GetWechatAuthUrl",{data:{},check:"msg"})}),setWechatBindUser=exports("s",function(e){return useAxios.post("ssl/SetWechatBindUser",{data:e,check:"msg"})}),getUserInfo=function(){return useAxios.post("ssl/GetUserInfo",{data:{},check:"msg"})},setNoticeIgnore=exports("lc",function(e){return useAxios.post("config/SetNoticeIgnore",{data:e,check:"msg"})}),getUnbindCount=function(e){return useAxios.post("auth/get_auth_bind_num",{data:e,check:"msg"})},updatePanelEnv=exports("gX",function(){return useAxios.post("system/upgrade_env",{check:"msg"})}),getUpdatePanelEnvLog=exports("gY",function(){return useAxios.post("system/upgrade_env_log",{check:"object"})}),claimActivityDiscount=exports("m8",function(e){return useAxios.post("auth/receive_products",{data:e,check:"default"})}),getActivityInfo=exports("m7",function(e){return useAxios.post("auth/get_free_activity_info",{data:e,check:"default"})}),phpmyadminClientCheck=exports("d5",function(){return useAxios.post("ajax/phpmyadmin_client_check")}),checkPluginVersion=function(e){return useAxios.post("/panel/public/check_plugin",{data:e,check:"ignore",customType:"model"})},setWorkorder=exports("iA",function(){return useAxios.post("config/show_workorder",{check:"msg"})}),setEvaluate=exports("lQ",function(){return useAxios.post("config/show_evaluate",{check:"msg"})}),setAiTip=exports("iB",function(){return useAxios.post("config/show_panelai",{check:"msg"})}),global$2=Object.freeze(Object.defineProperty({__proto__:null,addCustomModule:addCustomModule,appleBeta:appleBeta,bindBtUserName:bindBtUserName,changePhpmyadminSslPort:changePhpmyadminSslPort,checkFind:checkFind,checkLogin:checkLogin,checkLoginAuth:checkLoginAuth,checkPluginVersion:checkPluginVersion,checkVul:checkVul,claimActivityDiscount:claimActivityDiscount,clearRecycleBin:clearRecycleBin,clearSearchHistory:clearSearchHistory,createDir:createDir,createSelectionfile:createSelectionfile,createVoucherOrder:createVoucherOrder,createWithCreditByPanel:createWithCreditByPanel,delCustomModule:delCustomModule,delPushConfig:delPushConfig,delTaskStatus:delTaskStatus$1,delToken:delToken,deleteFile:deleteFile$1,dokcerInstall:dokcerInstall$1,editFtpPort:editFtpPort,getActivityInfo:getActivityInfo,getAdHideConfig:getAdHideConfig,getAlarmModule:getAlarmModule,getAlarmTaskList:getAlarmTaskList,getAllVoucherPlugin:getAllVoucherPlugin,getApplyCopon:getApplyCopon,getAuthState:getAuthState,getBetaLogs:getBetaLogs,getBindCode:getBindCode,getBindWxCode:getBindWxCode,getCertList:getCertList,getCloudServer:getCloudServer,getConfigInfo:getConfigInfo,getCoupons:getCoupons,getCredits:getCredits,getCustomModule:getCustomModule,getDataInfo:getDataInfo,getDataList:getDataList,getDebug:getDebug,getDownloadSpeed:getDownloadSpeed,getEnterpriseConfig:getEnterpriseConfig,getExecLog:getExecLog,getFileBody:getFileBody,getFileContent:getFileContent,getHomeResData:getHomeResData,getInstallPluginInfo:getInstallPluginInfo,getKey:getKey,getLastPaidTime:getLastPaidTime,getLines:getLines,getLoginStatus:getLoginStatus,getMemoBody:getMemoBody,getMenuList:getMenuList,getMsgConfigs:getMsgConfigs,getMsgFun:getMsgFun,getMsgInfo:getMsgInfo,getNewNpsTag:getNewNpsTag,getNps:getNps,getNpsQuestion:getNpsQuestion,getOtheAccreditURL:getOtheAccreditURL,getOverview:getOverview,getPanelPush:getPanelPush,getPaymentCouponList:getPaymentCouponList,getPaymentStatus:getPaymentStatus,getPhpVersion:getPhpVersion,getPhpmyadminSsl:getPhpmyadminSsl,getPluginAuth:getPluginAuth,getPluginHtml:getPluginHtml,getPluginInfo:getPluginInfo,getPluginRemarks:getPluginRemarks,getPluginUpgrades:getPluginUpgrades,getPrivilegeSoftList:getPrivilegeSoftList,getProductBuyCode:getProductBuyCode,getProductPrice:getProductPrice,getPublicConfig:getPublicConfig,getPushList:getPushList,getRecommendContent:getRecommendContent,getRecycleData:getRecycleData,getRewriteTel:getRewriteTel,getScanList:getScanList,getSelectDir:getSelectDir,getSenderAlarmList:getSenderAlarmList,getSiteTypes:getSiteTypes,getSoftList:getSoftList,getSoftStatus:getSoftStatus,getStartErrType:getStartErrType,getSystemConfigProjectList:getSystemConfigProjectList,getSystemInfo:getSystemInfo$1,getTableHeader:getTableHeader,getTaskCount:getTaskCount,getTaskList:getTaskList$1,getTaskLists:getTaskLists,getTaskSpeed:getTaskSpeed,getTaskTemplate:getTaskTemplate,getTemplateOverview:getTemplateOverview,getTotal:getTotal,getUnbindCount:getUnbindCount,getUpdateInfo:getUpdateInfo,getUpdatePanelEnvLog:getUpdatePanelEnvLog,getUpgradeLog:getUpgradeLog,getUserInfo:getUserInfo,getVoucherPlugin:getVoucherPlugin,getWechatAuthUrl:getWechatAuthUrl,histVersionInfo:histVersionInfo,ignoreCouponTime:ignoreCouponTime,ignoreNps:ignoreNps,ignoreVersion:ignoreVersion,inputPackageInfo:inputPackageInfo,inputZips:inputZips,installAlarmModule:installAlarmModule,installJDK:installJDK,installNewJdk:installNewJdk,installRecommendedSoft:installRecommendedSoft,installedMsgList:installedMsgList,phpmyadminClientCheck:phpmyadminClientCheck,reHistory:reHistory,removeSearchHistory:removeSearchHistory,removeTask:removeTask,removeTaskFile:removeTaskFile,repairPanel:repairPanel,repairPanelNew:repairPanelNew,repairRisk:repairRisk,restartPanel:restartPanel,restartServer:restartServer,saveFileBody:saveFileBody,sendBaota:sendBaota,serviceManage:serviceManage,setAdHideConfig:setAdHideConfig,setAiTip:setAiTip,setAtuoStartSyssafe:setAtuoStartSyssafe,setBackupPopup:setBackupPopup,setBindStatus:setBindStatus,setCommonAccount:setCommonAccount,setCustomModule:setCustomModule,setDebug:setDebug,setDefaultSender:setDefaultSender,setEvaluate:setEvaluate,setHideMenuList:setHideMenuList,setIgnore:setIgnore,setIgnoreVul:setIgnoreVul,setInnodbRecovery:setInnodbRecovery,setMsgConfig:setMsgConfig,setNewAlarmTask:setNewAlarmTask$1,setNoticeIgnore:setNoticeIgnore,setPHPMyAdminPass:setPHPMyAdminPass,setPanelPush:setPanelPush,setPassword:setPassword,setPhpmyadminSsl:setPhpmyadminSsl,setPs:setPs,setPushConfig:setPushConfig,setPushStatus:setPushStatus,setRecycleStatus:setRecycleStatus,setSmsStatus:setSmsStatus,setTableHeader:setTableHeader,setTaskStatus:setTaskStatus$1,setUsername:setUsername,setWechatBindUser:setWechatBindUser,setWorkorder:setWorkorder,setlastPassword:setlastPassword,tencentLogin:tencentLogin,testBindAlarm:testBindAlarm,toOfficial:toOfficial,unBindCommonAccount:unBindCommonAccount,unBindWxAccount:unBindWxAccount,unbindAuthorization:unbindAuthorization,upDateNewAlarmTask:upDateNewAlarmTask,updatePanel:updatePanel,updatePanelEnv:updatePanelEnv,upgradePanelNew:upgradePanelNew,writeNpsQuestion:writeNpsQuestion},Symbol.toStringTag,{value:"Module"}));exports("mh",global$2);var GLOBAL_STORE=exports("j8",defineStore("GLOBAL_STORE",function(){var e=ref("/"),t=ref(""),n=ref([]),r=ref(0),o=ref(0),i=ref(997),a=ref(""),s=ref(!1),l=ref(),u=ref(),c=ref(!1),d=ref(!1),p=ref(!1),h=ref(),f=ref(!0),g=ref(!1),m=ref(!1),y=ref(!1),v=ref(!0),_=ref(window.vite_public_panel_theme),x=ref(window.vite_public_ad_hide_config||{homeHeaderPay:!1,homeHeaderTooltip:!1,homeOverview:!1,homeSoft:!1,homeDisk:!1,homeProcess:!1,tab:!1,siteScan:!1,siteSafe:!1,siteTableWafIcon:!1,siteTableQuota:!1,siteTableTotal:!1,siteTableWaf:!1,siteTableDayStatistic:!1,siteConfigSync:!1,siteConfigAuth:!1,siteConfigPhp:!1,siteConfigTamper:!1,siteConfigSafe:!1,siteConfigLog:!1,siteConfigNode:!1,siteMonitor:!1,ftpLog:!1,ftpTableLog:!1,ftpTableQuota:!1,databaseTableBackup:!1,controlDaily:!1,firewallMalicious:!1,firewallSshLog:!1,firewallSshAccount:!1,firewallSshReinforce:!1,firewallServerSsh:!1,firewallSafeDetect:!1,firewallKeyword:!1,firewallPhp:!1,firewallIntrusion:!1,firewallFixed:!1,firewallScan:!1,fileTamper:!1,fileSync:!1,fileCloud:!1,fileDiskAnalysis:!1,logIp:!1,logSsh:!1,crontabBackup:!1}),S=useLocalStorage("color-scheme",window.vite_public_panel_theme.theme.preset||"light"),b=reactive({collapse:"true"===sessionStorage.getItem("MENU-COLLAPSE"),collapseAuto:!1,collapseLock:!1,mouserover:!1,menuName:"",menuMousemove:!1,menuMouseleave:!1}),T=reactive({bindUser:"",authType:"free",recommendAuth:"ltd",voucherOpenTime:0,newUserVoucherOpenTime:0,isGetCoupon:!1,authExpirationTime:-1,isShowCoupon:!0,noExceedLimit:!1,userGive:!1}),A=ref(0),w=reactive({noticeIgnore:{https:!0,port:!0},oem:"tencent",port:0,initInstall:!0,isDebug:!1,isFileRecycle:!1,isDbRecycle:!1,isShowCustomer:!1,showAiTip:!1,isShowEvaluate:!1,sidebarTitle:"",msgBoxTaskCount:0,panelNps:!1,sitePath:"",backupPath:"",logsPath:"",migration:!1,ipv6:!1,node_host:{}}),C=reactive({modulePush:[],updatePush:!1,updateTaskId:""}),E=reactive({type:"",info:{}}),M=reactive({list:[],total:0}),I=reactive({webserver:"",web:{setup:!1,status:!1,version:"",type:""},mysql:{setup:!1,status:!1,version:""},ftp:{setup:!1,status:!1,version:"",port:0},php:[],phpmyadmin:{setup:!1,status:!1,version:""},memcached:{setup:!1,status:!1,version:""},redis:{setup:!1,status:!1,version:""},tomcat:{setup:!1,status:!1,version:""},total:!1}),P=reactive({template:[],alarmPopupData:[],config:[],old:[],info:[],checkedLoad:!1}),D=reactive({visible:!1,id:"",name:"",built:!1,init:!1,callback:null}),k=useSessionStorage("remarksInfo",{auth_tips:{},ltd_key:[],pro_key:[]}),$=ref(window.vite_public_version.indexOf("10.")>-1?"".concat(window.vite_public_version):window.vite_public_version),R=ref(window.vite_public_title),L=ref(window.vite_public_ip),O=ref({status:!1,callback:null}),N=computed(function(){var e,t;if(["/static/icons/logo-white.svg","/static/icons/logo-green.svg"].includes(null===(e=_.value.logo)||void 0===e?void 0:e.image)){var n,r;if("white"===(null===(n=_.value.theme)||void 0===n?void 0:n.view))return"/static/icons/logo-green.svg";if("default"===(null===(r=_.value.theme)||void 0===r?void 0:r.view))return"/static/icons/logo-white.svg"}return(null===(t=_.value.logo)||void 0===t?void 0:t.image)||""}),B=computed(function(){return"aapanel"===_.value.theme.view}),V=computed(function(){var e;return(null===(e=k.value)||void 0===e||null===(e=e.ltd_key)||void 0===e?void 0:e.map(function(e){return[e,k.value.auth_tips[e]]}))||[]}),F=computed(function(){var e;return(null===(e=k.value)||void 0===e||null===(e=e.pro_key)||void 0===e?void 0:e.map(function(e){return[e,k.value.auth_tips[e]]}))||[]}),G=computed(function(){return["ssl251104","ssl251210"].includes(w.oem)}),H=computed(function(){return b.collapse}),z=computed(function(){return-1!==T.authExpirationTime}),U=computed(function(){return{pro:"专业版",ltd:"企业版",free:"正式版"}[T.authType]||"正式版"}),j=computed(function(){return 0===T.authExpirationTime?"永久授权":formatTime$1(T.authExpirationTime,"yyyy-MM-dd")}),Y=computed(function(){var e=(new Date).getTime()/1e3;return(parseInt("".concat(T.authExpirationTime-e),10)/86400).toFixed(0)}),W=computed(function(){return b.collapse||b.mouserover?"pl-[6rem]":"pl-[18rem]"}),q=computed(function(){return"".concat(b.mouserover?"box-shadow ":"").concat(b.collapse?"!w-[6rem]":"!w-[18rem]")}),X=computed(function(){return b.collapse?"message-shrink-number":"message-number"}),Z=computed(function(){return w.sidebarTitle?w.sidebarTitle.length:L.value.replace(/\./g,"").length}),K=computed(function(){return["/modify_password"].includes(router.currentRoute.value.path)}),J=function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var n,r,o;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(!K.value){e.n=1;break}return e.a(2);case 1:if(n=t.replace(/^\/*/,""),r=localStorage.getItem("".concat(n.toUpperCase(),"_ROUTER"))||"",!(o=routes.find(function(e){return e.path===t})).children){e.n=2;break}if(!o.children.find(function(e){return e.name===r})||!r){e.n=2;break}return router.push({name:r}),e.a(2);case 2:localStorage.removeItem("".concat(n.toUpperCase(),"_ROUTER")),router.push({path:o.children?"".concat(t,"/").concat(o.children[0].path):t});case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Q=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n,r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,getTaskCount();case 1:t=e.v,n=t.data,w.msgBoxTaskCount=n||0,e.n=3;break;case 2:e.p=2,r=e.v,console.error(r);case 3:return e.a(2)}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}(),ee=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,getAuthState();case 1:t=e.v,n=t.data,te(n);case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),te=function(e){if(isArray$2(e)){var t=_slicedToArray(e,3),n=t[1],r=t[2],o=n>-1?["pro",n]:r>-1?["ltd",r]:["free",r];T.authType=o[0],T.authExpirationTime=o[1]}},ne=function(e){isArray$2(e.task_list)&&(M.total=e.length,M.list=e||[])},re=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n,r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,getTaskList$1();case 1:t=e.v,n=t.data,ne(n),e.n=3;break;case 2:e.p=2,r=e.v,console.error(r);case 3:return e.a(2)}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}(),oe=function(e){var t=e.web,n=e.mysql,r=e.memcached,o=e.php,i=e.phpmyadmin,a=e.redis,s=e.tomcat,l=e.total;I.web=t,I.mysql=n,I.ftp=_objectSpread(_objectSpread({},I.ftp),e["pure-ftpd"]),I.memcached=r,I.php=o,I.phpmyadmin=i,I.redis=a,I.tomcat=s,I.total=l},ie=function(e){var t=e.o,n=e.debug,r=e.recycle_bin,o=e.recycle_db_bin,i=e.show_workorder,a=e.show_panelai,s=e.show_evaluate,l=e.left_title,u=e.user_info,c=u.data.username,d=u.status,p=e.isSetup,h=e.panel.port,f=e.sites_path,g=e.backup_path,m=e.webserver,y=e.notice_risk_ignore,v=e.ftpPort,_=e.migration,x=e.ipv6,S=e.node_host;T.bindUser=d?c:"",I.webserver=m,I.total=e.total,I.ftp.port=v,Object.assign(w,{ipv6:"checked"===x,oem:t,noticeIgnore:y,initInstall:p,isShowCustomer:i,showAiTip:a,isShowEvaluate:s,isFileRecycle:r,isDbRecycle:o,sidebarTitle:l,port:Number(h),isDebug:n,sitePath:f,backupPath:g,migration:_,node_host:S})},ae=function(e){var t=e.exp_ltd,n=e.install_ltd;g.value=n,T.noExceedLimit=t.no_exceed_limit,T.userGive=t.user_give},se=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n,r,o;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,getAlarmTaskList();case 1:t=e.v,n=t.data.data,t.status&&(r=n.find(function(e){return"panel_update"===e.keyword}),C.modulePush=r?r.sender:[],C.updatePush=!!r&&r.status,C.updateTaskId=r?r.id:""),e.n=3;break;case 2:e.p=2,o=e.v,console.log(o,"getUpdatePushInfo");case 3:return e.a(2)}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}(),le=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n,r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,getAlarmTaskList();case 1:return t=e.v,n=t.data.data,P.alarmPopupData=n,e.a(2,n);case 2:return e.p=2,r=e.v,console.log(r),e.a(2,[])}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}(),ue=function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var n,r,o,i;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,P.checkedLoad=!0,n={refresh:Number(t)},e.n=1,getSenderAlarmList(n);case 1:r=e.v,o=r.data,P.config=o.data||[],P.checkedLoad=!1,e.n=3;break;case 2:e.p=2,i=e.v,console.log(i);case 3:return e.p=3,P.checkedLoad=!1,e.f(3);case 4:return e.a(2)}},e,null,[[0,2,3,4]])}));return function(t){return e.apply(this,arguments)}}(),ce=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n,r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,getAlarmModule();case 1:t=e.v,n=t.data,P.old=n||{},e.n=3;break;case 2:e.p=2,r=e.v,console.log(r);case 3:return e.a(2)}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}(),de=useThrottleFn(_asyncToGenerator(_regenerator().m(function e(){var t,n,r,o,i,a,s,l,u,c;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,getPublicConfig();case 1:if(t=e.v,n=t.data,isObject$4(n)||!isNull(n)){e.n=2;break}return e.a(2,!1);case 2:return r=n.get_pd,o=n.task_count,i=n.aliyun_ecs_ltd,a=n.hide_ad,v.value=!!a,m.value=i,w.msgBoxTaskCount=o||0,sessionStorage.setItem("GlobalInfoTime","".concat((new Date).getTime())),ie(n),te(r),ne(n),oe(n),s=localStorage.getItem("EnterpriseInfoTime")||"",l=function(){return getEnterpriseConfig().then(function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var n,r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(n=t.data,ae(n),localStorage.setItem("EnterpriseInfoTime",JSON.stringify(_objectSpread({time:(new Date).getTime()},n))),!n.aliyun_ecs_ltd){e.n=2;break}return e.n=1,useDataHandle({loading:"正在获取阿里云授权,请稍后...",request:tencentLogin({client:2})});case 1:(r=e.v).status||(y.value=!0),r.status&&window.location.reload();case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}())},s?(u=JSON.parse(s),Number(u.time)+864e5<(new Date).getTime()?l():ae(u)):l(),e.a(2,Promise.resolve(n));case 3:return e.p=3,c=e.v,console.log(c),e.a(2,void 0)}},e,null,[[0,3]])})),1e3),pe=function(){var e=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Q();case 1:w.msgBoxTaskCount>0&&setTimeout(pe,3e3);case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),he=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n,r,o;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,getUserInfo();case 1:t=e.v,n=t.data.username,r=t.status,T.bindUser=r?n:"",e.n=3;break;case 2:e.p=2,o=e.v,console.log(o);case 3:return e.a(2)}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}(),fe=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n,r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!(t={pro:"100000011",ltd:"100000032",dev:"100000068"})[T.authType]){e.n=4;break}return e.p=1,e.n=2,getUnbindCount({pid:t[T.authType]});case 2:return n=e.v,r=n.data,e.a(2,(null==r?void 0:r.unbind_count)||0);case 3:return e.p=3,e.v,e.a(2,0);case 4:return e.a(2,0)}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}(),ge=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n,r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,getPrivilegeSoftList();case 1:t=e.v,n=t.data.remarks,k.value={auth_tips:n.auth_tips||{},ltd_key:n.ltd_key||[],pro_key:n.pro_key||[]},e.n=3;break;case 2:e.p=2,r=e.v,console.log(r);case 3:return e.a(2)}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}();return{scheme:S,globalTheme:_,ltdRemarks:V,proRemarks:F,remarksInfo:k,isRecomCert:G,menuLogo:N,enterpriseRec:f,aliyunEcsLtd:m,aliyunEcsFailed:y,isHideAd:v,routerActive:e,routerName:t,routesMenu:n,isAapanel:B,isRefreshMenu:c,isRefreshSoftList:d,isUpdatePayment:p,mainWidth:r,mainHeight:o,iframezIndex:i,iframeActive:a,isCompatible:s,menuControl:b,menuControlIcon:H,payment:T,paymentVoucherType:A,panel:w,specialVersion:E,plugin:I,push:P,task:M,updatePush:C,pluginInfo:D,panelVersion:$,title:R,serverIp:L,updatePluginCheck:O,authStatus:z,resetAuthState:function(){T.authType="free",T.authExpirationTime=-1},authTypeTitle:U,authExpirationTime:j,authRemainingDays:Y,robserver:l,layoutBody:u,layoutBodyStyle:W,layoutSidebarStyle:q,messageNumberStyle:X,messageIpNumberLength:Z,disableSidebar:K,installInfo:h,forceLtd:g,cutCollapseView:function(){b.mouserover?(b.collapse=!1,b.mouserover=!1):b.collapse=!b.collapse,sessionStorage.setItem("MENU-COLLAPSE",b.collapse.toString())},menuCollapseMouseenter:function(){!b.mouserover&&b.collapse&&(b.mouserover=!0,b.collapse=!1)},menuCollapseMouseleave:function(){b.collapseLock||b.mouserover&&(b.mouserover=!1,b.collapse=!0)},getMsgBoxTaskCount:Q,getAuthState:ee,setAuthState:te,setSoftSetup:oe,setBasicInfo:ie,getSoftRemarks:ge,getUpdatePushInfo:se,getAlarmData:le,getSenderAlarmListInfo:ue,getOldSenderAlarmListInfo:ce,getGlobalInfo:de,getRealTimeTaskList:re,getUserInfo:he,updateTaskCount:pe,cutMenuRouter:J,mountMessage:function(){window.addEventListener("message",function(e){"showMainView"===e.data&&(localStorage.setItem("showMainView",JSON.stringify(e.data)),i.value=996),isString$1(e.data)&&-1!==e.data.indexOf("refreshMain")&&(localStorage.setItem("refreshMain",JSON.stringify(e.data)),"refreshMain"===e.data?window.location.reload():window.location.href=e.data.split("::")[1].replace("_ifame",""))})},setLtdConfig:ae,getUnbindNumber:fe,adHideInfo:x}},{persist:{storage:sessionStorage,pick:["payment"]}})),useGlobalStore=exports("c",function(){var e=GLOBAL_STORE(),t=storeToRefs(e);return _objectSpread(_objectSpread({},e),t)}),global$1=Object.freeze(Object.defineProperty({__proto__:null,GLOBAL_STORE:GLOBAL_STORE,useGlobalStore:useGlobalStore},Symbol.toStringTag,{value:"Module"})),beforeEnter$4=function(){var e=_asyncToGenerator(_regenerator().m(function e(t,n,r){var o,i;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,o=useGlobalStore(),i=o.payment,t.path.includes("/ai/setting")){e.n=1;break}return e.a(2,i.value.bindUser?r():r("/ai/setting"));case 1:r(),e.n=3;break;case 2:e.p=2,e.v;case 3:r();case 4:return e.a(2)}},e,null,[[0,2]])}));return function(t,n,r){return e.apply(this,arguments)}}(),aiRoutes={name:"ai",path:"/ai",meta:{sort:6,title:"AI",icon:"ai"},component:function(){return __vitePreload(function(){return module.import("./index-legacy4.js?v=1777008528")},void 0,module.meta.url)},children:[{path:"chat",name:"ai-chat",meta:{title:"AI对话"},beforeEnter:beforeEnter$4,component:function(){return __vitePreload(function(){return module.import("./index-legacy5.js?v=1777008528")},void 0,module.meta.url)}},{path:"tools",name:"ai-tools",meta:{title:"助手列表"},beforeEnter:beforeEnter$4,component:function(){return __vitePreload(function(){return module.import("./index-legacy6.js?v=1777008528")},void 0,module.meta.url)}},{path:"skills",name:"ai-skills",meta:{title:"技能管理"},beforeEnter:beforeEnter$4,component:function(){return __vitePreload(function(){return module.import("./index-legacy7.js?v=1777008528")},void 0,module.meta.url)}},{path:"quota",name:"ai-quota",meta:{title:"额度管理"},beforeEnter:beforeEnter$4,component:function(){return __vitePreload(function(){return module.import("./index-legacy8.js?v=1777008528")},void 0,module.meta.url)}},{path:"setting",name:"ai-setting",meta:{title:"设置"},beforeEnter:beforeEnter$4,component:function(){return __vitePreload(function(){return module.import("./index-legacy9.js?v=1777008528")},void 0,module.meta.url)}}]},configRoutes={name:"config",path:"/config",meta:{sort:19,title:"设置",icon:"config"},component:function(){return __vitePreload(function(){return module.import("./index-legacy10.js?v=1777008528")},void 0,module.meta.url)},children:[{path:"common",name:"common",meta:{title:"常用设置"},component:function(){return __vitePreload(function(){return module.import("./index-legacy11.js?v=1777008528")},void 0,module.meta.url)}},{path:"panel",name:"panel",meta:{title:"面板设置"},component:function(){return __vitePreload(function(){return module.import("./index-legacy12.js?v=1777008528")},void 0,module.meta.url)}},{path:"safe",name:"safe",meta:{title:"安全设置"},component:function(){return __vitePreload(function(){return module.import("./index-legacy13.js?v=1777008528")},void 0,module.meta.url)}},{path:"ui",name:"ui",meta:{title:"界面设置"},component:function(){return __vitePreload(function(){return module.import("./index-legacy14.js?v=1777008528")},void 0,module.meta.url)}},{path:"alarm",name:"alarm",meta:{title:"告警通知"},component:function(){return __vitePreload(function(){return module.import("./index-legacy15.js?v=1777008528")},void 0,module.meta.url)}},{path:"back",name:"back",meta:{title:"备份还原"},component:function(){return __vitePreload(function(){return module.import("./index-legacy16.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}},{path:"migrate",name:"migrate",meta:{title:"整机迁移"},component:function(){return __vitePreload(function(){return module.import("./index-legacy17.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}}]},controlRoutes={name:"control",path:"/control",meta:{sort:6,title:"监控",icon:"control"},component:function(){return __vitePreload(function(){return module.import("./index-legacy18.js?v=1777008528")},void 0,module.meta.url)},children:[{path:"monitor",name:"monitor",meta:{title:"系统监控"},component:function(){return __vitePreload(function(){return module.import("./index-legacy19.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}},{path:"daily",name:"daily",ishide:"controlDaily",meta:{title:"面板日报"},component:function(){return __vitePreload(function(){return module.import("./index-legacy20.js?v=1777008528")},void 0,module.meta.url)}}]},crontabRoutes={name:"crontab",path:"/crontab",meta:{sort:17,title:"计划任务",icon:"crontab"},component:function(){return __vitePreload(function(){return module.import("./index-legacy21.js?v=1777008528")},void 0,module.meta.url)},children:[{path:"task",name:"task",meta:{title:"计划任务"},component:function(){return __vitePreload(function(){return module.import("./index-legacy22.js?v=1777008528").then(function(e){return e.a})},void 0,module.meta.url)}},{path:"library",name:"library",meta:{title:"脚本库"},component:function(){return __vitePreload(function(){return module.import("./index-legacy23.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}}]},databaseRoutes={name:"database",path:"/database",meta:{sort:4,title:"数据库",icon:"database"},component:function(){return __vitePreload(function(){return module.import("./index-legacy24.js?v=1777008528")},void 0,module.meta.url)},children:[{path:"mysql",name:"mysql",meta:{title:"MySQL"},component:function(){return __vitePreload(function(){return module.import("./index-legacy25.js?v=1777008528")},void 0,module.meta.url)}},{path:"sqlserver",name:"sqlserver",meta:{title:"SQLServer"},component:function(){return __vitePreload(function(){return module.import("./index-legacy26.js?v=1777008528")},void 0,module.meta.url)}},{path:"mongodb",name:"mongodb",meta:{title:"MongoDB"},component:function(){return __vitePreload(function(){return module.import("./index-legacy27.js?v=1777008528")},void 0,module.meta.url)}},{path:"redis",name:"redis",meta:{title:"Redis"},component:function(){return __vitePreload(function(){return module.import("./index-legacy28.js?v=1777008528")},void 0,module.meta.url)}},{path:"pgsql",name:"pgsql",meta:{title:"PgSQL"},component:function(){return __vitePreload(function(){return module.import("./index-legacy29.js?v=1777008528")},void 0,module.meta.url)}},{path:"sqlite",name:"sqlite",meta:{title:"SQLite"},component:function(){return __vitePreload(function(){return module.import("./index-legacy30.js?v=1777008528")},void 0,module.meta.url)}}]},delContainer=exports("V",function(e){return useAxios.post("/btdocker/container/del_container",{data:e,customType:"model",check:"msg"})}),getContainerLog=exports("gr",function(e){return useAxios.post("/btdocker/container/get_logs",{data:e,loading:"获取日志,请稍候...",customType:"model",check:"object"})}),getContainerControl=exports("eX",function(e){return useAxios.post("/btdocker/status/stats",{data:e,customType:"model",check:"object"})}),getDockerSystemInfo=exports("fQ",function(){return useAxios.post("/btdocker/status/get_docker_system_info",{customType:"model",check:"object"})}),getAllContainerLog=exports("gq",function(){return useAxios.post("/btdocker/container/get_logs_all",{loading:"获取日志,请稍候...",customType:"model",check:"object"})}),clearContainerLog=exports("gs",function(e){return useAxios.post("/btdocker/container/clear_log",{data:e,customType:"model",check:"msg"})}),setContainerStatus=exports("U",function(e){return useAxios.post("/btdocker/container/set_container_status",{data:e,customType:"model",check:"msg"})}),AddContainerStatus=exports("eS",function(e){return useAxios.post("/btdocker/container/run",{data:e,customType:"model",check:"msg"})}),CmdAddContainer=exports("gt",function(e,t){return useAxios.post("/btdocker/".concat(t||"container","/run_cmd"),{data:e,customType:"model",check:"msg"})}),getDockerDetail=function(e){return useAxios.post("/btdocker/container/get_container_info",{data:e,customType:"model",check:"object"})},getConCmd=exports("dw",function(e){return useAxios.post("/btdocker/container/docker_shell",{data:e,customType:"model",check:"msg"})}),clearCon=exports("fT",function(e){return useAxios.post("/btdocker/container/prune",{data:e,customType:"model",check:"msg"})}),setConReset=exports("e3",function(e){return useAxios.post("/btdocker/container/update_restart_policy",{data:e,customType:"model",check:"msg"})}),setConAddNet=exports("e0",function(e){return useAxios.post("/btdocker/network/connect",{data:e,loading:"加入网络,请稍候...",customType:"model",check:"object"})}),setConOutNet=exports("e1",function(e){return useAxios.post("/btdocker/network/disconnect",{data:e,loading:"退出网络,请稍候...",customType:"model",check:"object"})}),setConMirror=exports("fJ",function(e){return useAxios.post("/btdocker/container/commit",{data:e,loading:"创建镜像,请稍候...",customType:"model",check:"msg"})}),editCon=exports("e4",function(e){return useAxios.post("/btdocker/container/upgrade_container",{data:e,loading:"加载中,请稍候...",customType:"model",check:"msg"})}),addProduct=exports("eV",function(e){return useAxios.post("/btdocker/compose/create",{data:e,customType:"model",loading:"添加项目,请稍候...",check:"msg"})}),editProduct=exports("eU",function(e){return useAxios.post("/btdocker/compose/edit",{data:e,customType:"model",loading:"编辑项目,请稍候...",check:"msg"})}),getMirrorList=exports("eT",function(){return useAxios.post("btdocker/image/image_list",{customType:"model",check:"array"})}),getStashList=exports("fI",function(){return useAxios.post("/btdocker/registry/registry_list",{customType:"model",check:"array"})}),addStash=exports("gG",function(e){return useAxios.post("/btdocker/registry/add",{data:e,loading:"添加仓库",customType:"model",check:"msg"})}),editStash=exports("gH",function(e){return useAxios.post("/btdocker/registry/edit",{data:e,loading:"编辑仓库",customType:"model",check:"msg"})}),delStash=exports("fZ",function(e){return useAxios.post("/btdocker/registry/remove",{data:e,loading:"删除仓库",customType:"model",check:"msg"})}),getpullMirror=exports("f6",function(e){return useAxios.post("/btdocker/image/load",{data:e,customType:"model",loading:"导入镜像",check:"msg"})}),getBuildMirror=exports("gu",function(e){return useAxios.post("/btdocker/image/build",{data:e,customType:"model",loading:"构建镜像",check:"msg"})}),getPushMirror=exports("gv",function(e){return useAxios.post("/btdocker/image/push",{data:e,customType:"model",loading:"推送镜像",check:"msg"})}),getExportMirror=exports("gw",function(e){return useAxios.post("/btdocker/image/save",{data:e,customType:"model",loading:"导出镜像",check:"msg"})}),deleteMirror=exports("eB",function(e){return useAxios.post("/btdocker/image/remove",{data:e,customType:"model",check:"object"})}),clearMirror=exports("f7",function(e){return useAxios.post("/btdocker/image/prune",{data:e,loading:"正在清理无用镜像,请稍候...",customType:"model",check:"msg"})}),getNetList=exports("e2",function(){return useAxios.post("/btdocker/network/get_host_network",{customType:"model",check:"array"})}),addN=exports("gE",function(e){return useAxios.post("/btdocker/network/create_network",{data:e,customType:"model",loading:"正在添加网络,请稍候...",check:"msg"})}),delNet=exports("fX",function(e){return useAxios.post("/btdocker/network/del_network",{data:e,customType:"model",check:"msg"})}),clearNet=exports("fY",function(){return useAxios.post("/btdocker/network/prune",{customType:"model",check:"msg"})}),getStorageList=exports("eC",function(){return useAxios.post("/btdocker/volume/get_volume_list",{customType:"model",check:"array"})}),addStorage=exports("gF",function(e){return useAxios.post("/btdocker/volume/add",{data:e,customType:"model",check:"msg"})}),delStorage=exports("eD",function(e){return useAxios.post("/btdocker/volume/remove",{data:e,customType:"model",check:"msg"})}),clearStorage=exports("eE",function(){return useAxios.post("/btdocker/volume/prune",{customType:"model",check:"msg"})}),getSetting=function(){return useAxios.post("/btdocker/setup/get_config",{customType:"model",check:"object"})},getURL=function(e){return useAxios.post("/btdocker/setup/get_registry_mirrors",{data:e||{},customType:"model",check:"object"})},getSystemInfo=exports("g6",function(){return useAxios.post("/btdocker/setup/get_system_info",{customType:"model",check:"default"})}),setDocker=exports("g0",function(e){return useAxios.post("/btdocker/setup/docker_service",{data:e,loading:"设置docker状态,请稍候...",customType:"model",check:"msg"})}),repairDocker=exports("g1",function(){return useAxios.post("/btdocker/setup/repair_docker",{loading:"修复docker程序,请稍候...",customType:"model",check:"msg"})}),setMonitor=exports("g3",function(e){return useAxios.post("/btdocker/setup/set_docker_monitor",{data:e,loading:"设置监控状态,请稍候...",customType:"model",check:"msg"})}),setMonitorDate=exports("g4",function(e){return useAxios.post("/btdocker/setup/set_monitor_save_date",{data:e,loading:"设置监控保存天数,请稍候...",customType:"model",check:"msg"})}),setComposePath=exports("gK",function(e){return useAxios.post("/btdocker/setup/set_docker_compose_path",{data:e,loading:"设置docker compose路径,请稍候...",customType:"model",check:"msg"})}),setConfigFile=exports("f_",function(e){return useAxios.post("/btdocker/setup/save_daemon_json",{data:e,loading:"修改配置文件,请稍候...",customType:"model",check:"msg"})}),getTemplateList=exports("eW",function(){return useAxios.post("/btdocker/compose/template_list",{customType:"model",check:"array"})}),addTemplate=exports("e_",function(e){return useAxios.post("/btdocker/compose/add_template",{data:e,loading:"添加项目模板,请稍候...",customType:"model",check:"msg"})}),searchTemplate=exports("hM",function(e){return useAxios.post("/btdocker/compose/get_compose_project",{data:e,customType:"model",check:"array"})}),searchOfficialTemplate=exports("eA",function(e){return useAxios.post("/btdocker/image/search",{data:e,customType:"model",check:"array"})}),getImageDetail=exports("f4",function(e){return useAxios.post("/btdocker/image/get_image_detail",{data:e,customType:"model",check:"array"})}),getImageTag=exports("f5",function(e){return useAxios.post("/btdocker/image/get_image_tags",{data:e,customType:"model",check:"array"})}),addDirTemplate=exports("hN",function(e){return useAxios.post("/btdocker/compose/add_template_in_path",{data:e,loading:"添加项目模板,请稍候...",customType:"model",check:"msg"})}),getTemplateDetail=exports("e$",function(e){return useAxios.post("/btdocker/compose/get_template",{data:e,loading:"获取模板信息,请稍候...",customType:"model",check:"msg"})}),editTemplate=exports("eZ",function(e){return useAxios.post("/btdocker/compose/edit_template",{data:e,loading:"添加项目模板,请稍候...",customType:"model",check:"msg"})}),delTemplate=exports("f9",function(e){return useAxios.post("/btdocker/compose/remove_template",{data:e,loading:"删除项目模板,请稍候...",customType:"model",check:"msg"})}),pullMirror=exports("fK",function(e){return useAxios.post("/btdocker/compose/pull",{data:e,customType:"model",check:"msg"})}),getContainerList=exports("fR",function(){return useAxios.post("/btdocker/container/get_list",{customType:"model",check:"object"})}),getContainerBackupList=exports("f2",function(e){return useAxios.post("/btdocker/backup/get_backup_list",{data:e,customType:"model",check:"array"})}),addContainerBackup=exports("f1",function(e){return useAxios.post("/btdocker/backup/backup_volume",{data:e,customType:"model",check:"msg"})}),delContainerBackup=exports("f3",function(e){return useAxios.post("/btdocker/backup/remove_backup",{data:e,customType:"model",check:"msg"})}),ContainerReName=exports("dv",function(e){return useAxios.post("/btdocker/container/rename_container",{data:e,customType:"model",loading:"正在重命名,请稍候...",check:"msg"})}),dokcerInstall=exports("f0",function(e){return useAxios.post("/btdocker/setup/install_docker_program",{data:e,customType:"model",loading:"正在安装,请稍候...",check:"msg"})}),getCertInfo=exports("ec",function(e){return useAxios.post("/btdocker/proxy/get_cert_info",{data:e,customType:"model",check:"object"})}),createPortProxy=exports("e7",function(e){return useAxios.post("/btdocker/proxy/create_proxy",{data:e,customType:"model",loading:"正在设置,请稍候...",check:"msg"})}),getNoPortConfig=exports("e6",function(e){return useAxios.post("/btdocker/proxy/get_proxy_info",{data:e,customType:"model",check:"object"})}),closePortLogin=exports("e5",function(e){return useAxios.post("/btdocker/proxy/close_proxy",{data:e,customType:"model",loading:"正在关闭,请稍候...",check:"msg"})}),setContainerTop=exports("fV",function(e){return useAxios.post("/btdocker/container/set_container_to_top",{data:e,customType:"model",loading:"正在设置,请稍候...",check:"msg"})}),setContainerRemark=exports("S",function(e){return useAxios.post("/btdocker/container/set_container_remark",{data:e,customType:"model",loading:"正在设置,请稍候...",check:"msg"})}),getContainerPath=exports("fU",function(e){return useAxios.post("/btdocker/container/get_container_merged",{data:e,customType:"model",check:"object"})}),getContainerInfo=exports("fS",function(){return useAxios.post("/btdocker/container/get_other_container_data",{customType:"model",check:"array"})}),dokcerUnInstall=exports("gI",function(e){return useAxios.post("/btdocker/setup/uninstall_docker_program",{data:e,customType:"model",loading:"正在卸载,请稍候...",check:"msg"})}),checkUnstaillStatus=exports("g2",function(){return useAxios.post("/btdocker/setup/uninstall_status",{customType:"model",loading:"正在检查状态,请稍候...",check:"msg"})}),checkTemplateUsed=exports("f8",function(e){return useAxios.post("/btdocker/compose/check_use_template",{data:e,customType:"model",loading:"正在检查状态,请稍候...",check:"msg"})}),getComposeConLog=exports("jj",function(e){return useAxios.post("/mod/docker/com/get_project_container_logs",{data:e,loading:"获取日志,请稍候...",customType:"model",check:"ignore"})}),getDockerAppList=exports("jl",function(e){return useAxios.post("/mod/docker/com/get_apps",{data:e,customType:"model",check:"msg"})}),getDockerType=exports("jm",function(){return useAxios.post("/mod/docker/com/get_tags",{customType:"model",check:"object"})}),getBackupList$1=exports("dx",function(e){return useAxios.post("/mod/docker/com/get_backup_list",{data:e,customType:"model",check:"msg"})}),backupDockerApp=exports("dy",function(e){return useAxios.post("/mod/docker/com/backup_app",{data:e,customType:"model",check:"msg"})}),deleteBackup=exports("dz",function(e){return useAxios.post("/mod/docker/com/delete_backup",{data:e,customType:"model",check:"msg"})}),restoreBackup$1=exports("dA",function(e){return useAxios.post("/mod/docker/com/restore_backup",{data:e,customType:"model",check:"msg"})}),getInstalledApps=exports("jn",function(e){return useAxios.post("/mod/docker/com/get_installed_apps",{data:e,customType:"model",check:"object"})}),getAppRunLog=exports("jy",function(e){return useAxios.post("/mod/docker/com/get_app_log",{data:e,customType:"model",check:"msg"})}),getAppInstallLog=exports("jz",function(e){return useAxios.post("/mod/docker/com/get_app_installed_log",{data:e,customType:"model",check:"msg"})}),installApp=exports("jt",function(e){return useAxios.post("/mod/docker/com/create_app",{data:e,customType:"model",check:"msg"})}),getDependenceApps=exports("ju",function(e){return useAxios.post("/mod/docker/com/get_dependence_apps",{data:e,customType:"model",check:"msg"})}),setAppStatus=exports("jr",function(e){return useAxios.post("/mod/docker/com/set_app_status",{data:e,customType:"model",check:"msg"})}),removeApp=exports("js",function(e){return useAxios.post("/mod/docker/com/remove_app",{data:e,customType:"model",check:"msg"})}),updateApp=exports("jw",function(e){return useAxios.post("/mod/docker/com/update_app",{data:e,customType:"model",check:"msg"})}),getUpdateVersions=exports("jv",function(e){return useAxios.post("/mod/docker/com/update_versions",{data:e,customType:"model",check:"object"})}),setComposeRemark=exports("jk",function(e){return useAxios.post("/mod/docker/com/edit_remark",{data:e,customType:"model",check:"msg"})}),getSiteList=exports("eh",function(e){return useAxios.post("/mod/docker/com/get_site_list",{data:e,customType:"model",check:"msg"})}),setSiteStatus=exports("em",function(e){return useAxios.post("/mod/docker/com/set_site_status",{data:e,customType:"model",check:"msg"})}),setSiteRemark=exports("en",function(e){return useAxios.post("/mod/docker/com/set_remak",{data:e,customType:"model",check:"msg"})}),delDockerSite=exports("eo",function(e){return useAxios.post("/mod/docker/com/delete_site",{data:e,customType:"model",check:"msg"})}),delBatchDockerSite=exports("ew",function(e){return useAxios.post("/mod/docker/com/batch_delete_site",{data:e,customType:"model",check:"msg"})}),createDockerSite=exports("iJ",function(e){return useAxios.post("/mod/docker/com/create_site",{data:e,customType:"model",check:"msg"})}),getDockerSiteEnvList=exports("el",function(e){return useAxios.post("/mod/docker/com/get_runtime_list",{data:e,customType:"model",check:"msg"})}),getDockerSiteConAndAppList=exports("iK",function(e){return useAxios.post("/mod/docker/com/get_some_info",{data:e,customType:"model",check:"msg"})}),setDockerSiteEdate=exports("eQ",function(e){return useAxios.post("/mod/docker/com/set_site_edate",{data:e,customType:"model",check:"msg"})}),delEnv=exports("ep",function(e){return useAxios.post("/mod/docker/com/delete_runtime",{data:e,customType:"model",check:"msg"})}),delBatchEnv=exports("eq",function(e){return useAxios.post("/mod/docker/com/batch_delete_runtime",{data:e,customType:"model",check:"msg"})}),cleanBuildCache=exports("er",function(){return useAxios.post("/mod/docker/com/build_prune",{customType:"model",check:"msg"})}),refreshEnvTemplate=exports("et",function(){return useAxios.post("/mod/docker/com/check_templates",{data:{force_update:1},customType:"model",check:"msg"})}),getEnvLog=exports("j_",function(e){return useAxios.post("/mod/docker/com/get_runtime_logs",{data:e,customType:"model",check:"msg"})}),getEnvVersion=exports("eu",function(e){return useAxios.post("/mod/docker/com/get_runtime_versions",{data:e,customType:"model",check:"msg"})}),getEnvExtend=exports("jU",function(e){return useAxios.post("/mod/docker/com/get_all_exts",{data:e,customType:"model",check:"msg"})}),getEnvExtendTemplate=exports("jV",function(e){return useAxios.post("/mod/docker/com/get_php_ext_list",{data:e,customType:"model",check:"msg"})}),createEnv=exports("jY",function(e){return useAxios.post("/mod/docker/com/".concat(e.id?"modify_runtime":"create_runtime"),{data:e,customType:"model",check:"msg"})}),setEnvStatus=exports("es",function(e){return useAxios.post("/mod/docker/com/set_runtime_status",{data:e,customType:"model",check:"msg"})}),setPhpTemplate=exports("jZ",function(e){return useAxios.post("/mod/docker/com/".concat(e.id?"modify_php_ext_template":"create_php_ext_template"),{data:e,customType:"model",check:"msg"})}),delPhpTemplate=exports("jW",function(e){return useAxios.post("/mod/docker/com/delete_php_ext_template",{data:e,customType:"model",check:"msg"})}),delBatchPhpTemplate=exports("jX",function(e){return useAxios.post("/mod/docker/com/batch_delete_php_ext_template",{data:e,customType:"model",check:"msg"})}),getDefaultViewConfig=exports("dS",function(e){return useAxios.post("/mod/docker/com/get_default_body",{data:e,customType:"model",check:"object"})}),setDefaultViewConfig=exports("dU",function(e){return useAxios.post("/mod/docker/com/set_default_body",{data:e,customType:"model",check:"msg"})}),set404ViewStatus=exports("dT",function(e){return useAxios.post("/mod/docker/com/set_auto_create_404",{data:e,customType:"model",check:"msg"})}),getDefaultSite=exports("dV",function(){return useAxios.post("/mod/docker/com/get_default_site",{customType:"model",check:"object"})}),setDefaultSite=exports("dW",function(e){return useAxios.post("/mod/docker/com/set_default_site",{data:e,customType:"model",check:"msg"})}),getHttpsInfo=exports("dX",function(){return useAxios.post("site/get_https_settings",{check:"object"})}),setGlobalHttp2https=exports("dZ",function(e){return useAxios.post("site/set_global_http2https",{data:e,check:"msg"})}),setHttpsMode=exports("dY",function(){return useAxios.post("site/set_https_mode",{check:"msg"})}),getCateList=exports("ei",function(){return useAxios.post("/mod/docker/com/get_site_types",{customType:"model",check:"msg"})}),setCate=exports("ek",function(e){return useAxios.post("/mod/docker/com/".concat(e.id?"edit_site_type":"add_site_type"),{data:e,customType:"model",check:"msg"})}),delCate=exports("ej",function(e){return useAxios.post("/mod/docker/com/del_site_type",{data:e,customType:"model",check:"msg"})}),setDockerSiteCate=exports("ev",function(e){return useAxios.post("/mod/docker/com/set_site_type",{data:e,customType:"model",check:"msg"})}),getDockerSiteDomains=exports("j$",function(e){return useAxios.post("/mod/docker/com/get_domain_list",{data:e,customType:"model",check:"msg"})}),addDockerSiteDomain=exports("k1",function(e){return useAxios.post("/mod/docker/com/add_domain",{data:e,customType:"model",check:"msg"})}),delDockerSiteDomain=exports("k2",function(e){return useAxios.post("/mod/docker/com/".concat(e.del_domain_list?"batch_del_domain":"del_domain"),{data:e,customType:"model",check:"msg"})}),setDockerSiteHttpsPort=exports("k0",function(e){return useAxios.post("/mod/docker/com/set_https_port",{data:e,customType:"model",check:"msg"})}),addProxyUrlData=exports("fw",function(e){return useAxios.post("/mod/docker/com/add_proxy",{data:e,check:"msg",customType:"model"})}),addProxyUrlReplace=exports("fz",function(e){return useAxios.post("/mod/docker/com/add_sub_filter",{data:e,check:"msg",customType:"model"})}),delProxyUrlData=exports("fv",function(e){return useAxios.post("/mod/docker/com/del_url_proxy",{data:e,check:"msg",customType:"model"})}),delProxyUrlReplace=exports("fE",function(e){return useAxios.post("/mod/docker/com/del_sub_filter",{data:e,check:"msg",customType:"model"})}),editProxyUrlDataRemark=exports("fu",function(e){return useAxios.post("/mod/docker/com/set_url_remark",{data:e,check:"msg",customType:"model"})}),editProxyUrlInfo=exports("fx",function(e){return useAxios.post("/mod/docker/com/set_url_proxy",{data:e,check:"msg",customType:"model"})}),getProxyUrlData=exports("ft",function(e){return useAxios.post("/mod/docker/com/get_proxy_list",{data:e,check:"object",customType:"model"})}),proxyUrlAddLimit=exports("fD",function(e){return useAxios.post("/mod/docker/com/add_url_ip_limit",{data:e,check:"msg",customType:"model"})}),proxyUrlBatchDelLimit=exports("fF",function(e){return useAxios.post("/mod/docker/com/batch_del_url_ip_limit",{data:e,check:"msg",customType:"model"})}),proxyUrlCache=exports("fA",function(e){return useAxios.post("/mod/docker/com/set_url_cache",{data:e,check:"msg",customType:"model"})}),proxyUrlCompress=exports("fC",function(e){return useAxios.post("/mod/docker/com/set_url_gzip",{data:e,check:"msg",customType:"model"})}),proxyUrlDelLimit=exports("fG",function(e){return useAxios.post("/mod/docker/com/del_url_ip_limit",{data:e,check:"msg",customType:"model"})}),setProxyUrlCustom=exports("fy",function(e){return useAxios.post("/mod/docker/com/set_url_custom_conf",{data:e,check:"msg",customType:"model"})}),clearProxyCache=exports("kn",function(e){return useAxios.post("/mod/docker/com/clear_cache",{data:e,check:"msg",customType:"model"})}),proxyGetGlobal=exports("km",function(e){return useAxios.post("/mod/docker/com/get_global_conf",{data:e,check:"msg",customType:"model"})}),proxyGlobalAddBasic=exports("ks",function(e){return useAxios.post("/mod/docker/com/add_dir_auth",{data:e,check:"msg",customType:"model"})}),proxyGlobalAddLimit=exports("kq",function(e){return useAxios.post("/mod/docker/com/add_ip_limit",{data:e,check:"msg",customType:"model"})}),proxyGlobalBatchDelLimit=exports("kA",function(e){return useAxios.post("/mod/docker/com/batch_del_ip_limit",{data:e,check:"msg",customType:"model"})}),proxyGlobalCache=exports("ko",function(e){return useAxios.post("/mod/docker/com/set_global_cache",{data:e,check:"msg",customType:"model"})}),proxyGlobalCompress=exports("kp",function(e){return useAxios.post("/mod/docker/com/set_global_gzip",{data:e,check:"msg",customType:"model"})}),proxyGlobalDelBasic=exports("kx",function(e){return useAxios.post("/mod/docker/com/del_dir_auth",{data:e,check:"msg",customType:"model"})}),proxyGlobalDelLimit=exports("kB",function(e){return useAxios.post("/mod/docker/com/del_ip_limit",{data:e,check:"msg",customType:"model"})}),proxyGlobalEditBasic=exports("kr",function(e){return useAxios.post("/mod/docker/com/set_dir_auth",{data:e,check:"msg",customType:"model"})}),proxyGlobalSetLogs=exports("ky",function(e){return useAxios.post("/mod/docker/com/set_global_log",{data:e,check:"msg",customType:"model"})}),proxyGlobalSetWebsocket=exports("kt",function(e){return useAxios.post("/mod/docker/com/set_global_websocket",{data:e,check:"msg",customType:"model"})}),getProxyConfigFile=exports("kd",function(e){return useAxios.post("/mod/docker/com/get_nginx_config",{data:e,check:"object",customType:"model"})}),saveProxyConfigFile=exports("ke",function(e){return useAxios.post("/mod/docker/com/save_block_config",{data:e,check:"msg",customType:"model"})}),createRedirect=exports("ki",function(e){return useAxios.post("/mod/docker/com/CreateRedirect",{data:e,check:"msg",customType:"model"})}),modifyRedirect=exports("kf",function(e){return useAxios.post("/mod/docker/com/ModifyRedirect",{data:e,check:"msg",customType:"model"})}),removeRedirect=exports("kg",function(e){return useAxios.post("/mod/docker/com/DeleteRedirect",{data:e,check:"msg",customType:"model"})}),getRedirectFile=exports("kh",function(e){return useAxios.post("/mod/docker/com/GetRedirectFile",{data:e,check:"object",customType:"model"})}),getSecurity=exports("kj",function(e){return useAxios.post("/mod/docker/com/GetSecurity",{data:e,customType:"model",check:"object"})}),setSecurity=exports("kk",function(e){return useAxios.post("/mod/docker/com/SetSecurity",{data:e,customType:"model",check:"msg"})}),getSiteLog=exports("kl",function(e){return useAxios.post("/mod/docker/com/GetSiteLogs",{data:e,customType:"model",check:"msg"})}),delRewriteTel=exports("k8",function(e){return useAxios.post("site/DelRewriteTel",{data:e,check:"msg"})}),getRewriteLists=exports("k9",function(e){return useAxios.post("site/GetRewriteList",{data:e,check:"object"})}),getRewrite=exports("kb",function(e){return useAxios.post("/mod/docker/com/get_site_rewrite",{data:e,customType:"model",check:"msg"})}),setRewriteTel=exports("ka",function(e){return useAxios.post("site/SetRewriteTel",{data:e,check:"msg"})}),setRewrite=exports("kc",function(e){return useAxios.post("/mod/docker/com/set_site_rewrite",{data:e,customType:"model",check:"msg"})}),get404Content=exports("kv",function(e){return useAxios.post("/mod/docker/com/get_404_body",{data:e,customType:"model"})}),set404Status=exports("ku",function(e){return useAxios.post("/mod/docker/com/set_404_status",{data:e,customType:"model",check:"msg"})}),set404Content=exports("kz",function(e){return useAxios.post("/mod/docker/com/set_404_body",{data:e,customType:"model",check:"msg"})}),seIpv6Status=exports("kw",function(e){return useAxios.post("/mod/docker/com/set_site_ipv6",{data:e,customType:"model",check:"msg"})}),getDockerSiteDir=exports("k3",function(e){return useAxios.post("/mod/docker/com/get_site_path",{data:e,customType:"model",check:"msg"})}),setDockerSiteDir=exports("k5",function(e){return useAxios.post("/mod/docker/com/set_site_path",{data:e,customType:"model",check:"msg"})}),setDockerSiteRunDir=exports("k6",function(e){return useAxios.post("/mod/docker/com/set_site_run_path",{data:e,customType:"model",check:"msg"})}),getDockerSiteDirUserINI=exports("k4",function(e){return useAxios.post("/mod/docker/com/GetDirUserINI",{data:e,customType:"model",check:"msg"})}),setDockerSiteini=exports("k7",function(e){return useAxios.post("/mod/docker/com/SetDirUserINI",{data:e,customType:"model",check:"msg"})}),getDockerSitePhp=exports("kC",function(e){return useAxios.post("/mod/docker/com/get_php_project_info",{data:e,customType:"model",check:"msg"})}),setDockerSitePhp=exports("kD",function(e){return useAxios.post("/mod/docker/com/switch_php_version",{data:e,customType:"model",check:"msg"})}),setDockerSiteBuffer=exports("fB",function(e){return useAxios.post("/mod/docker/com/set_proxy_buffering",{data:e,customType:"model",check:"msg"})}),updateDockerMysqlPassword=exports("dB",function(e){return useAxios.post("/mod/docker/com/update_mysql_pwd",{data:e,customType:"model",check:"msg"})}),getOllamaModelList=exports("ih",function(e){return useAxios.post("/mod/docker/com/get_models_list",{data:e,customType:"model",check:"msg"})}),getOllamaModelDetail=exports("ii",function(e){return useAxios.post("/mod/docker/com/show_model_info",{data:e,customType:"model",check:"msg"})}),downloadOllamaModel=exports("ij",function(e){return useAxios.post("/mod/docker/com/down_models",{data:e,customType:"model",check:"msg"})}),delOllamaModel=exports("ik",function(e){return useAxios.post("/mod/docker/com/del_models",{data:e,customType:"model",check:"msg"})}),getAllGpuDeviceInformation=exports("ig",function(){return useAxios.post("/mod/docker/gpu/get_all_device_info",{customType:"model",check:"msg"})}),getGpuInfoByIndex=exports("ie",function(e){return useAxios.post("/mod/docker/gpu/get_info_by_index",{data:e,customType:"model",check:"msg"})}),getDatabaseTerminalCmd=exports("jq",function(e){return useAxios.post("/mod/docker/com/client_db_shell",{data:e,customType:"model",check:"msg"})}),setDockerGlobal=exports("g5",function(e){return useAxios.post("/btdocker/setup/set_docker_global",{data:e,customType:"model",check:"msg"})}),updateDockerComposeVersion=exports("f$",function(){return useAxios.post("/btdocker/setup/update_compose",{customType:"model",check:"msg"})}),getDockerApphubConfig=exports("jo",function(){return useAxios.post("/mod/docker/com/get_apphub_config",{customType:"model",check:"msg"})}),setDockerApphubGit=exports("jB",function(e){return useAxios.post("/mod/docker/com/set_apphub_git",{data:e,customType:"model",check:"msg"})}),importGitApphub=exports("jC",function(){return useAxios.post("/mod/docker/com/import_git_apphub",{customType:"model",check:"msg"})}),importZipApphub=exports("jF",function(e){return useAxios.post("/mod/docker/com/import_zip_apphub",{data:e,customType:"model",check:"msg"})}),installApphub=exports("jD",function(){return useAxios.post("/mod/docker/com/install_apphub",{customType:"model",check:"msg"})}),setDockerProjectPath=exports("g7",function(e){return useAxios.post("/btdocker/setup/set_dk_project_path",{data:e,customType:"model",check:"msg"})}),parserZipApphub=exports("jE",function(e){return useAxios.post("/mod/docker/com/parser_zip_apphub",{data:e,customType:"model",check:"msg"})}),getAppComposeFile=exports("jx",function(e){return useAxios.post("/mod/docker/com/get_app_compose",{data:e,customType:"model",check:"object"})}),clearApp=exports("jp",function(){return useAxios.post("/mod/docker/com/clean_apphub",{customType:"model",check:"msg"})}),getComposeBackupList=exports("gx",function(e){return useAxios.post("/mod/docker/com/compose_backup_list",{data:e,customType:"model",check:"object"})}),importBackup=exports("gy",function(e){return useAxios.post("/mod/docker/com/import_backup",{data:e,customType:"model",check:"msg"})}),deleteComposeBackup=exports("gz",function(e){return useAxios.post("/mod/docker/com/compose_backup_delete",{data:e,customType:"model",check:"msg"})}),getComposeRestoreConfig=exports("gA",function(e){return useAxios.post("/mod/docker/com/compose_restore_config",{data:e,customType:"model",check:"object"})}),createComposeBackup=exports("gC",function(e){return useAxios.post("/mod/docker/com/compose_backup",{data:e,customType:"model",check:"msg"})}),createComposeRestore=exports("gB",function(e){return useAxios.post("/mod/docker/com/compose_restore",{data:e,customType:"model",check:"msg"})}),checkComposeUrl=exports("gJ",function(e){return useAxios.post("/btdocker/setup/detector_mirrors",{data:e,customType:"model",check:"object"})}),useDockerStore=exports("fH",defineStore("DOCKER-STORE",{state:function(){return{currentConDetail:{},maxCPU:0,maxMem:0,maxGpus:0,loading:!1,refreshWs:!1,customLimit:{container:!1,images:!1,network:!1,storage:!1,warehouse:!1},deployMenuData:{app_type:"all",maximum_cpu:"--",maximum_memory:"--"},orchestrationData:{refreshList:!1,refreshItem:!1,loading:!1,noRefresh:!1,isEdit:!1,currentCompose:{name:"",path:""}},cpuAndMemData:{},isRefreshTableList:!1,isRefreshAppList:!1,isRefreshInstallList:!1,isRefreshSiteList:!1,isRefreshTemplateList:!1,isRefreshNetworkList:!1,isRefreshStorageList:!1,isRefreshWarehouseList:!1,settingData:{dk_project_path:"",allow_update_install_path:!1,service_status:!1,docker_installed:!1,docker_compose_installed:!1,docker_compose_path:"/usr/bin/docker-compose",monitor_status:!1,monitor_save_date:0,url:"11",options:[],daemon_path:"/etc/docker/daemon.json",installing:0,ipv6:!1,ipv6Address:"",bad_registry:!1,bad_registry_path:"",warehouse:"",log_cutting:{status:!1,file:0,size:0},iptables:!1,live_restore:!1,driver:"",docker_compose_version:"",socket:"",proxy:{status:!1,http_proxy:"",https_proxy:"",no_proxy:""}}}},actions:{refreshActiveTable:function(){this.isRefreshTableList=!0},refreshSiteTable:function(){this.isRefreshSiteList=!0},resetRefresh:function(){this.isRefreshTableList=!1},chunkArray:function(e){for(var t=[],n=0;n<e.list.length;n+=e.limit)t.push(e.list.slice(n,n+e.limit));return t},getCurrentCon:function(e){var t=this;return _asyncToGenerator(_regenerator().m(function n(){return _regenerator().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,useDataHandle({request:getDockerDetail({data:JSON.stringify({id:e})}),success:function(e){e.status&&(t.currentConDetail=e.data)}});case 1:return n.a(2)}},n)}))()},getSet:function(e){var t=this;return _asyncToGenerator(_regenerator().m(function n(){return _regenerator().w(function(n){for(;;)switch(n.p=n.n){case 0:if(n.p=0,t.loading=!0,!1===e){n.n=1;break}return n.n=1,useDataHandle({request:getSetting(),data:{dk_project_path:[String,function(e){return t.settingData.dk_project_path=e}],allow_update_install_path:[Boolean,function(e){return t.settingData.allow_update_install_path=e}],service_status:[Boolean,function(e){return t.settingData.service_status=e}],docker_installed:[Boolean,function(e){return t.settingData.docker_installed=e}],docker_compose_path:[String,function(e){return t.settingData.docker_compose_path=e}],docker_compose_installed:[Boolean,function(e){return t.settingData.docker_compose_installed=e}],monitor_status:[Boolean,function(e){return t.settingData.monitor_status=e}],monitor_save_date:[Number,function(e){return t.settingData.monitor_save_date=e}],daemon_path:[String,function(e){return t.settingData.daemon_path=e}],installing:[Number,function(e){return t.settingData.installing=e}],ipv6_status:[Boolean,function(e){return t.settingData.ipv6=e}],ipv6_addr:[String,function(e){return t.settingData.ipv6Address=e}],bad_registry:[Boolean,function(e){return t.settingData.bad_registry=e}],bad_registry_path:[String,function(e){return t.settingData.bad_registry_path=e}],warehouse:[Array,function(e){return t.settingData.warehouse=e.join(",")}],log_cutting:[Object,function(e){return t.settingData.log_cutting=isEmpty(e)?{status:!1,file:0,size:0}:{size:e["max-size"].replace("m",""),file:e["max-file"],status:!0}}],iptables:[Boolean,function(e){return t.settingData.iptables=e}],live_restore:[Boolean,function(e){return t.settingData.live_restore=e}],driver:[String,function(e){return t.settingData.driver=e.split("=")[1]}],docker_compose_version:[String,function(e){return t.settingData.docker_compose_version=e}],socket:[String,function(e){return t.settingData.socket=e}],proxy:[Object,function(e){return t.settingData.proxy=isEmpty(e)?{http_proxy:"",https_proxy:"",no_proxy:"",status:!1}:_objectSpread(_objectSpread({},e),{},{status:!0})}]}});case 1:return n.n=2,useDataHandle({request:getURL(),success:function(e){var n=e.data;0===n.registry_mirrors.length?t.settingData.url="未设置加速URL":t.settingData.url=n.registry_mirrors[0].url;var r=[];Object.entries(n.com_reg_mirrors).forEach(function(e){r.push({label:"".concat(e[0],"(").concat(e[1],")"),value:e[0]})}),t.settingData.options=r}});case 2:t.loading=!1,n.n=4;break;case 3:n.p=3,n.v,t.loading=!1;case 4:return n.a(2)}},n,null,[[0,3]])}))()},getUrlList:function(e){var t=this;return _asyncToGenerator(_regenerator().m(function n(){var r,o;return _regenerator().w(function(n){for(;;)switch(n.p=n.n){case 0:return n.p=0,n.n=1,useDataHandle({request:getURL(!(!e||!e.force)&&e),success:function(e){var n=e.data;0===n.registry_mirrors.length?t.settingData.url="未设置加速URL":t.settingData.url=n.registry_mirrors[0].url;var r=[];Object.entries(n.com_reg_mirrors).forEach(function(e){r.push({label:"".concat(e[0],"(").concat(e[1],")"),value:e[0]})}),t.settingData.options=r}});case 1:return r=n.v,o=r.data,n.a(2,o);case 2:n.p=2,n.v;case 3:return n.a(2)}},n,null,[[0,2]])}))()},getDockerState:function(){var e=this;return _asyncToGenerator(_regenerator().m(function t(){return _regenerator().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,useDataHandle({request:getSetting(),data:{dk_project_path:[String,function(t){return e.settingData.dk_project_path=t}],allow_update_install_path:[Boolean,function(t){return e.settingData.allow_update_install_path=t}],service_status:[Boolean,function(t){return e.settingData.service_status=t}],docker_installed:[Boolean,function(t){return e.settingData.docker_installed=t}],docker_compose_path:[String,function(t){return e.settingData.docker_compose_path=t}],docker_compose_installed:[Boolean,function(t){return e.settingData.docker_compose_installed=t}],monitor_status:[Boolean,function(t){return e.settingData.monitor_status=t}],monitor_save_date:[Number,function(t){return e.settingData.monitor_save_date=t}],daemon_path:[String,function(t){return e.settingData.daemon_path=t}],installing:[Number,function(t){return e.settingData.installing=t}],ipv6_status:[Boolean,function(t){return e.settingData.ipv6=t}],ipv6_addr:[String,function(t){return e.settingData.ipv6Address=t}],bad_registry:[Boolean,function(t){return e.settingData.bad_registry=t}],bad_registry_path:[String,function(t){return e.settingData.bad_registry_path=t}],warehouse:[Array,function(t){return e.settingData.warehouse=t.join("\n")}],log_cutting:[Object,function(t){return e.settingData.log_cutting=isEmpty(t)?{status:!1,file:0,size:0}:{size:t["max-size"].replace("m",""),file:t["max-file"],status:!0}}],iptables:[Boolean,function(t){return e.settingData.iptables=t}],live_restore:[Boolean,function(t){return e.settingData.live_restore=t}],driver:[String,function(t){return e.settingData.driver=t.split("=")[1]}],docker_compose_version:[String,function(t){return e.settingData.docker_compose_version=t}],socket:[String,function(t){return e.settingData.socket=t}],proxy:[Object,function(t){return e.settingData.proxy=isEmpty(t)?{http_proxy:"",https_proxy:"",no_proxy:"",status:!1}:_objectSpread(_objectSpread({},t),{},{status:!0})}]}});case 1:t.v,t.n=3;break;case 2:t.p=2,t.v;case 3:return t.a(2)}},t,null,[[0,2]])}))()}},persist:{storage:sessionStorage,paths:["settingData.service_status","settingData.docker_installed","settingData.docker_compose_installed"]}})),getDockerStore=exports("L",function(){var e=useDockerStore();return _objectSpread({refs:storeToRefs(e)},e)}),beforeEnter$3=function(){var e=_asyncToGenerator(_regenerator().m(function e(t,n,r){var o,i,a,s,l,u;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,o=getDockerStore(),i=o.refs.settingData,a=o.getDockerState,e.n=1,a();case 1:if(t.path.includes("/docker")){e.n=2;break}return e.a(2,r("/docker/install"));case 2:if(s=i.value.docker_installed&&i.value.docker_compose_installed,l=!!i.value.installing,u=i.value.service_status,s&&!l||t.path.includes("/docker/install")){e.n=3;break}return e.a(2,r("/docker/install"));case 3:if(u||!s||l||"/docker/setting"===t.path){e.n=4;break}return Message$2.warn("当前服务未运行,请先启动服务"),e.a(2,r("/docker/setting"));case 4:if(!t.path.includes("/docker/install")){e.n=5;break}return e.a(2,s&&!l?r("/docker/appstore"):r());case 5:r(),e.n=7;break;case 6:e.p=6,e.v;case 7:r();case 8:return e.a(2)}},e,null,[[0,6]])}));return function(t,n,r){return e.apply(this,arguments)}}(),dockerRoutes={name:"docker",path:"/docker",meta:{sort:5,title:"Docker",icon:"docker"},component:function(){return __vitePreload(function(){return module.import("./index-legacy31.js?v=1777008528")},void 0,module.meta.url)},children:[{path:"appstore",name:"docker-appstore",meta:{title:"应用商店"},beforeEnter:beforeEnter$3,component:function(){return __vitePreload(function(){return module.import("./index-legacy32.js?v=1777008528").then(function(e){return e.w})},void 0,module.meta.url)}},{path:"conmanger",name:"docker-conmanger",meta:{title:"总览"},beforeEnter:beforeEnter$3,component:function(){return __vitePreload(function(){return module.import("./index-legacy33.js?v=1777008528")},void 0,module.meta.url)}},{path:"dockersite",name:"docker-site",meta:{title:"网站"},beforeEnter:beforeEnter$3,component:function(){return __vitePreload(function(){return module.import("./index-legacy34.js?v=1777008528")},void 0,module.meta.url)}},{path:"containers",name:"docker-containers",meta:{title:"容器"},beforeEnter:beforeEnter$3,component:function(){return __vitePreload(function(){return module.import("./index-legacy35.js?v=1777008528")},void 0,module.meta.url)}},{path:"cloudimages",name:"docker-cloudimages",meta:{title:"线上镜像"},beforeEnter:beforeEnter$3,component:function(){return __vitePreload(function(){return module.import("./index-legacy36.js?v=1777008528").then(function(e){return e.a})},void 0,module.meta.url)}},{path:"images",name:"docker-images",meta:{title:"本地镜像"},beforeEnter:beforeEnter$3,component:function(){return __vitePreload(function(){return module.import("./index-legacy37.js?v=1777008528")},void 0,module.meta.url)}},{path:"orchestration",name:"docker-orchestration",meta:{title:"容器编排"},beforeEnter:beforeEnter$3,component:function(){return __vitePreload(function(){return module.import("./index-legacy38.js?v=1777008528")},void 0,module.meta.url)}},{path:"network",name:"docker-network",meta:{title:"网络"},beforeEnter:beforeEnter$3,component:function(){return __vitePreload(function(){return module.import("./index-legacy39.js?v=1777008528")},void 0,module.meta.url)}},{path:"storage",name:"docker-storage",meta:{title:"存储卷"},beforeEnter:beforeEnter$3,component:function(){return __vitePreload(function(){return module.import("./index-legacy40.js?v=1777008528")},void 0,module.meta.url)}},{path:"warehouse",name:"docker-warehouse",meta:{title:"仓库"},beforeEnter:beforeEnter$3,component:function(){return __vitePreload(function(){return module.import("./index-legacy41.js?v=1777008528")},void 0,module.meta.url)}},{path:"setting",name:"docker-setting",meta:{title:"设置"},beforeEnter:beforeEnter$3,component:function(){return __vitePreload(function(){return module.import("./index-legacy42.js?v=1777008528")},void 0,module.meta.url)}},{path:"install",name:"docker-install",meta:{title:"Docker安装",ignore:!0},beforeEnter:beforeEnter$3,component:function(){return __vitePreload(function(){return module.import("./index-legacy43.js?v=1777008528")},void 0,module.meta.url)}}]},domainRoutes={name:"domain",path:"/domain",meta:{sort:15,title:"域名",icon:"domain"},component:function(){return __vitePreload(function(){return module.import("./index-legacy44.js?v=1777008528")},void 0,module.meta.url)},children:[{path:"register",name:"register",meta:{title:"域名注册"},component:function(){return __vitePreload(function(){return module.import("./index-legacy45.js?v=1777008528")},void 0,module.meta.url)}},{path:"hosting",name:"hosting",meta:{title:"域名托管"},component:function(){return __vitePreload(function(){return module.import("./index-legacy46.js?v=1777008528")},void 0,module.meta.url)}}]},fileRoutes={name:"files",path:"/files",meta:{sort:9,title:"文件",icon:"files"},component:function(){return __vitePreload(function(){return module.import("./index-legacy47.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}},firewallRoutes={name:"firewall",path:"/firewall",meta:{sort:7,title:"安全",icon:"firewall"},component:function(){return __vitePreload(function(){return module.import("./index-legacy48.js?v=1777008528")},void 0,module.meta.url)},children:[{path:"system",name:"system",meta:{title:"系统防火墙"},component:function(){return __vitePreload(function(){return module.import("./index-legacy49.js?v=1777008528")},void 0,module.meta.url)}},{path:"ssh-manger",name:"ssh-manger",meta:{title:"SSH管理"},component:function(){return __vitePreload(function(){return module.import("./index-legacy50.js?v=1777008528")},void 0,module.meta.url)}},{path:"server-safe",name:"server-safe",meta:{title:"服务器安全"},component:function(){return __vitePreload(function(){return module.import("./index-legacy51.js?v=1777008528").then(function(e){return e.D})},void 0,module.meta.url)}},{path:"site-safe",name:"site-safe",meta:{title:"网站安全"},component:function(){return __vitePreload(function(){return module.import("./index-legacy52.js?v=1777008528")},void 0,module.meta.url)}},{path:"safe-detect",name:"safe-detect",ishide:"firewallSafeDetect",meta:{title:"安全检测"},component:function(){return __vitePreload(function(){return module.import("./index-legacy53.js?v=1777008528")},void 0,module.meta.url)}},{path:"keyword",name:"keyword",ishide:"firewallKeyword",meta:{title:"违规词检测"},component:function(){return __vitePreload(function(){return module.import("./index-legacy54.js?v=1777008528")},void 0,module.meta.url)}},{path:"php-safe",name:"php-safe",ishide:"firewallPhp",meta:{title:"PHP网站安全"},component:function(){return __vitePreload(function(){return module.import("./index-legacy55.js?v=1777008528")},void 0,module.meta.url)}},{path:"intrusion",name:"intrusion",ishide:"firewallIntrusion",meta:{title:"入侵防御"},component:function(){return __vitePreload(function(){return module.import("./index-legacy56.js?v=1777008528")},void 0,module.meta.url)}},{path:"fixed",name:"fixed",ishide:"firewallFixed",meta:{title:"系统加固"},component:function(){return __vitePreload(function(){return module.import("./index-legacy57.js?v=1777008528")},void 0,module.meta.url)}},{path:"network-scan",name:"network-scan",ishide:"firewallScan",meta:{title:"扫描感知"},component:function(){return __vitePreload(function(){return module.import("./index-legacy58.js?v=1777008528")},void 0,module.meta.url)}}]},ftpRoutes={name:"ftp",path:"/ftp",meta:{sort:3,title:"FTP管理",icon:"ftp"},component:function(){return __vitePreload(function(){return module.import("./index-legacy59.js?v=1777008528")},void 0,module.meta.url)}},homeRoutes={name:"home",path:"/home",meta:{sort:1,title:"首页",icon:"home"},component:function(){return __vitePreload(function(){return module.import("./index-legacy60.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}},logsRoutes={name:"logs",path:"/logs",meta:{sort:10,title:"日志",icon:"logs"},component:function(){return __vitePreload(function(){return module.import("./index-legacy61.js?v=1777008528")},void 0,module.meta.url)},children:[{path:"panel-log",name:"panel-log",meta:{title:"面板日志"},component:function(){return __vitePreload(function(){return module.import("./index-legacy62.js?v=1777008528")},void 0,module.meta.url)}},{path:"web",name:"web",meta:{title:"网站日志"},component:function(){return __vitePreload(function(){return module.import("./index-legacy63.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}},{path:"ssh",name:"ssh",ishide:"logSsh",meta:{title:"SSH登录日志"},component:function(){return __vitePreload(function(){return module.import("./index-legacy64.js?v=1777008528")},void 0,module.meta.url)}},{path:"software",name:"software",meta:{title:"软件日志"},component:function(){return __vitePreload(function(){return module.import("./index-legacy65.js?v=1777008528")},void 0,module.meta.url)}}]},getDomains=exports("hU",function(e){return useAxios.post("/mail/main/get_domains",{data:e,customType:"model"})}),flushDomainRecord=exports("hV",function(e){return useAxios.post("/mail/main/flush_domain_record",{data:e,customType:"model"})}),setDomainCatchall=exports("hT",function(e){return useAxios.post("/mail/main/enable_catchall",{data:e,customType:"model",loading:"正在设置 catchall,请稍候..."})}),setDomainCert=exports("ix",function(e){return useAxios.post("/mail/main/set_mail_certificate_multiple",{data:_objectSpread(_objectSpread({},e),{},{act:"add"}),customType:"model",loading:"正在设置证书状态,请稍候..."})}),delDomainCert=exports("iz",function(e){return useAxios.post("/mail/main/set_mail_certificate_multiple",{data:_objectSpread(_objectSpread({},e),{},{act:"delete"}),customType:"model",loading:"正在设置证书状态,请稍候..."})}),addDomain=exports("hS",function(e){return useAxios.post("/mail/main/add_domain_new",{data:e,customType:"model",loading:"正在添加域名,请稍候..."})}),editDomain=exports("hR",function(e){return useAxios.post("/mail/main/update_domain",{data:e,customType:"model",loading:"正在编辑域名,请稍候..."})}),delDomain=exports("hW",function(e){return useAxios.post("/mail/main/delete_domain",{data:e,loading:"正在删除域名,请稍候...",customType:"model",check:"msg"})}),delMxTxtCache=exports("gO",function(e){return useAxios.post("/mail/main/delete_mx_txt_cache",{data:e,loading:"正在清除 MX 记录和 TXT 记录缓存,请稍候...",customType:"model",check:"msg"})}),getDomainName=exports("h1",function(){return useAxios.post("/mail/main/get_domain_name",{customType:"model",check:"object"})}),getMailboxList=exports("h3",function(e){return useAxios.post("/mail/main/get_mailboxs",{data:e,customType:"model",check:"array"})}),addMailbox=exports("h0",function(e){return useAxios.post("/mail/main/add_mailbox",{data:e,loading:"正在添加邮箱,请稍候...",customType:"model"})}),editMailbox=exports("g$",function(e){return useAxios.post("/mail/main/update_mailbox",{data:e,loading:"正在编辑邮箱,请稍候...",customType:"model",check:"msg"})}),delMailbox=exports("h6",function(e){return useAxios.post("/mail/main/delete_mailbox",{data:e,loading:"正在删除邮箱,请稍候...",customType:"model"})}),getBccList=exports("kU",function(){return useAxios.post("/mail/main/get_bcc",{customType:"model",check:"object"})}),addMailBcc=exports("gQ",function(e){return useAxios.post("/mail/main/set_mail_bcc",{data:e,loading:"正在添加密送服务,请稍候...",customType:"model"})}),editMailBcc=exports("gP",function(e){return useAxios.post("/mail/main/update_bcc",{data:e,loading:"正在编辑密送服务,请稍候...",customType:"model"})}),delMailBcc=exports("kV",function(e){return useAxios.post("/mail/main/del_bcc",{data:e,loading:"正在删除密送设置,请稍候...",customType:"model",check:"msg"})}),getUserList=exports("jH",function(){return useAxios.post("/mail/main/get_all_user",{customType:"model",check:"array"})}),getInboxMails=exports("jI",function(e){return useAxios.post("/mail/main/get_mails",{data:e,customType:"model",check:"msg"})}),moveSpamMail=exports("jJ",function(e){return useAxios.post("/mail/main/move_to_junk",{data:e,loading:"正在标记为垃圾邮件,请稍候...",customType:"model",check:"msg"})}),deleteMail=exports("jK",function(e){return useAxios.post("/mail/main/delete_mail",{data:e,loading:"正在删除邮件,请稍候...",customType:"model"})}),getSpamMails=exports("jM",function(e){return useAxios.post("/mail/main/get_junk_mails",{data:e,customType:"model",check:"msg"})}),restoreSpam=exports("jN",function(e){return useAxios.post("/mail/main/move_out_junk",{data:e,loading:"正在恢复垃圾邮件,请稍候...",customType:"model"})}),getOutboxMails=exports("jL",function(e){return useAxios.post("/mail/main/get_sent_mails",{data:e,customType:"model",check:"msg"})}),sendMailContent=exports("jO",function(e){return useAxios.post("/mail/main/send_mail",{data:e,loading:"正在发送邮件,请稍候...",customType:"model"})}),getTaskList=exports("lt",function(e){return useAxios.post("/mail/main/get_task_list",{data:e,customType:"model",check:"msg"})}),getTaskError=exports("hs",function(e){return useAxios.post("/mail/main/get_log_rank",{data:e,customType:"model",check:"msg"})}),getTaskErrorDetails=exports("hr",function(e){return useAxios.post("/mail/main/get_log_list",{data:e,customType:"model"})}),deleteTask=exports("lu",function(e){return useAxios.post("/mail/main/delete_task",{data:e,loading:"正在删除任务,请稍候...",customType:"model",check:"msg"})}),addSendTask=exports("ls",function(e){return useAxios.post("/mail/bulk/add_task",{data:e,loading:"正在添加,请稍候...",customType:"model",check:"msg"})}),setPauseTask=exports("lv",function(e){return useAxios.post("/mail/main/pause_task",{data:e,loading:"正在处理,请稍候...",customType:"model",check:"msg"})}),getBackupParams=exports("l2",function(){return useAxios.post("/mail/main/get_backup_task_status",{customType:"model",check:"msg"})}),closeBackupTask=exports("l0",function(){return useAxios.post("/mail/main/close_backup_task",{loading:"正在关闭备份设置,请稍候...",customType:"model",check:"msg"})}),getCloudList=exports("l1",function(){return useAxios.post("/mail/main/get_cloud_storage_list",{customType:"model",check:"object"})}),saveBackupTask=exports("k$",function(e){return useAxios.post("/mail/main/open_backup_task",{data:e,loading:"正在保存备份设置,请稍候...",customType:"model"})}),getBackupPath=exports("l6",function(){return useAxios.post("/mail/main/get_backup_path",{customType:"model",check:"object"})}),getBackupList=exports("l4",function(e){return useAxios.post("/mail/main/get_backup_file_list",{data:e,customType:"model",check:"msg"})}),restoreBackup=exports("l3",function(e){return useAxios.post("/mail/main/restore",{data:e,loading:"正在恢复备份邮件,请稍候...",customType:"model",check:"msg"})}),getServiceStatus=exports("kO",function(){return useAxios.post("/mail/main/get_service_status",{customType:"model",check:"msg"})}),setServiceStatus$1=exports("kP",function(e){return useAxios.post("/mail/main/service_admin",{data:e,loading:"正在设置服务,请稍候...",customType:"model",check:"msg"})}),repairService=exports("kQ",function(e){return useAxios.post("/mail/main/repair_service_conf",{data:e,loading:"正在修复服务,请稍候...",customType:"model",check:"msg"})}),getServiceConfig=exports("dJ",function(e){return useAxios.post("/mail/main/get_config",{data:e,check:"object",customType:"model"})}),saveServiceConfig=exports("dK",function(e){return useAxios.post("/mail/main/save_config",{data:e,loading:"正在保存服务配置文件,请稍候...",customType:"model"})}),getServiceMonitor=exports("kN",function(){return useAxios.post("/mail/main/get_service_monitor_status",{customType:"model"})}),openServiceMonitor=exports("kL",function(){return useAxios.post("/mail/main/open_service_monitor_task",{loading:"正在保存监控任务状态,请稍候...",customType:"model",check:"msg"})}),closeServiceMonitor=exports("kM",function(){return useAxios.post("/mail/main/close_service_monitor_task",{loading:"正在关闭监控任务状态,请稍候...",customType:"model"})}),getSaveDays=exports("kG",function(){return useAxios.post("/mail/main/get_save_day",{customType:"model",check:"object"})}),setSaveDay=exports("kF",function(e){return useAxios.post("/mail/main/set_save_day",{data:e,loading:"正在设置邮件保留时间,请稍候...",customType:"model"})}),getRoundcubeStatus=exports("h4",function(){return useAxios.post("/mail/main/get_roundcube_status",{customType:"model",check:"msg"})}),getDomain=exports("kK",function(){return useAxios.post("/mail/main/get_domain",{check:"object",customType:"model"})}),uninstallRoundcube=exports("kH",function(e){return useAxios.post("/mail/main/uninstall_roundcube",{data:e,loading:"正在卸载,请稍候...",customType:"model",check:"object"})}),installRoundcube=exports("kI",function(e){return useAxios.post("/mail/main/add_roundcube",{data:e,loading:"正在安装,请稍候...",customType:"model"})}),addRoundcubeConfig=exports("kJ",function(e){return useAxios.post("/mail/main/add_roundcube_info",{data:e,loading:"正在安装,请稍候...",customType:"model",check:"msg"})}),loginRoundcube=exports("h5",function(e){return useAxios.post("/mail/main/login_roundcube",{data:e,loading:"正在登录,请稍候...",customType:"model",check:"msg"})}),deleteFile=exports("l5",function(e){return useAxios.post("/files?action=DeleteFile",{data:e,loading:"正在删除文件,请稍候...",customType:"model",check:"msg"})}),installService$1=exports("hy",function(){return useAxios.post("/mail/manage/install_service",{customType:"model",check:"msg"})}),getOverviewInfo=exports("lj",function(e){return useAxios.post("/mail/main/overview_api?action=overview",{data:e,customType:"model",check:"msg"})}),editSendTask=exports("lr",function(e){return useAxios.post("/mail/bulk/update_task",{data:e,loading:"正在编辑任务,请稍候...",customType:"model",check:"msg"})}),sendTestMail=exports("lq",function(e){return useAxios.post("/mail/main/send_mail_test",{data:e,loading:"正在发送测试邮件,请稍候...",customType:"model",check:"msg"})}),getContactsEcharts=exports("lC",function(e){return useAxios.post("/mail/main/get_contacts_list",{data:e,customType:"model",check:"msg"})}),getMailTypeList=exports("lm",function(e){return useAxios.post("/mail/main/get_mail_type_list",{data:e,customType:"model",check:"object"})}),delMassMailList=exports("lH",function(e){return useAxios.post("/mail/main/del_mail_type_list",{data:e,customType:"model",check:"msg"})}),getMassMailList=exports("lG",function(e){return useAxios.post("/mail/main/get_mail_type_info_list",{data:e,customType:"model",check:"msg"})}),addMailType=exports("lA",function(e){return useAxios.post("/mail/main/add_mail_type",{data:e,customType:"model",check:"msg"})}),editMailType=exports("ly",function(e){return useAxios.post("/mail/main/edit_mail_type",{data:e,customType:"model",check:"msg"})}),delAbnormalMailAll=exports("lK",function(e){return useAxios.post("/mail/main/clear_abnormal_recipient",{data:e,customType:"model",check:"msg"})}),delAbnormalMailList=exports("lJ",function(e){return useAxios.post("/mail/main/del_abnormal_recipient",{data:e,customType:"model",check:"msg"})}),getMassAbnormal=exports("lI",function(e){return useAxios.post("/mail/main/get_abnormal_recipient",{data:e,customType:"model",check:"msg"})}),getMassAbnormalType=exports("lL",function(){return useAxios.post("/mail/main/get_abnormal_status",{customType:"model",check:"msg"})}),getUnsubscribeList=exports("lD",function(e){return useAxios.post("/mail/main/get_unsubscribe_list",{data:e,customType:"model",check:"msg"})}),delUnsubscribe=exports("lF",function(e){return useAxios.post("/mail/main/del_unsubscribe_list",{data:e,customType:"model",check:"msg"})}),editSubscribeState=exports("lE",function(e){return useAxios.post("/mail/main/update_subscription_state",{data:e,customType:"model",check:"msg"})}),importContacts=exports("ll",function(e){return useAxios.post("/mail/bulk/import_contacts",{data:e,customType:"model",check:"msg"})}),importContactsEtypes=exports("lx",function(e){return useAxios.post("/mail/bulk/import_contacts_etypes",{data:e,customType:"model",check:"msg"})}),delMailType=exports("lz",function(e){return useAxios.post("/mail/main/del_mail_type_list",{data:e,customType:"model",check:"msg"})}),setContactChange=exports("lw",function(e){return useAxios.post("/mail/main/edit_type_unsubscribe_list",{data:e,customType:"model",check:"msg"})}),setUnsubscribeType=exports("lB",function(e){return useAxios.post("/mail/main/edit_type_unsubscribe_list",{data:e,customType:"model",check:"msg"})}),addMailTemplate=exports("lN",function(e){return useAxios.post("/mail/bulk/add_email_temp",{data:e,customType:"model",check:"msg"})}),delMailTemplate=exports("lO",function(e){return useAxios.post("/mail/bulk/del_email_temp",{data:e,customType:"model",check:"msg"})}),getMailTemplateList=exports("lM",function(e){return useAxios.post("/mail/bulk/get_email_temp_list",{data:e,customType:"model",check:"object"})}),editMailTemplate=exports("lp",function(e){return useAxios.post("/mail/bulk/edit_email_temp",{data:e,customType:"model",check:"msg"})}),getMailTemplateContent=exports("lo",function(e){return useAxios.post("/mail/main/get_task_email_content",{data:e,customType:"model",check:"msg"})}),getContactNumber=exports("ln",function(e){return useAxios.post("/mail/main/get_contact_number",{data:e,customType:"model",check:"msg"})}),getMailTemplateSelect=exports("lk",function(){return useAxios.post("/mail/bulk/get_email_temp",{customType:"model",check:"object"})}),delUnsubscribeInfo=exports("fd",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return useAxios.post("/mail/main/del_unsubscribe_info",{data:e,customType:"model",check:"msg"})}),getUnsubscribeInfo=exports("fe",function(){return useAxios.post("/mail/main/get_unsubscribe_info",{customType:"model",check:"msg"})}),setUnsubscribeInfo=exports("ff",function(e){return useAxios.post("/mail/main/set_unsubscribe_info",{data:e,customType:"model",check:"msg"})}),getTaskUnsubscribe=exports("gN",function(e){return useAxios.post("/mail/main/get_task_unsubscribe_list",{data:e,customType:"model",check:"object"})}),getBlacklistTips=exports("h$",function(){return useAxios.post("/mail/main/get_blacklist_tips",{customType:"model",check:"msg"})}),setBlacklistTips=exports("h_",function(e){return useAxios.post("/mail/main/Blacklist_tips",{data:e,customType:"model",check:"msg"})}),checkBlacklists=exports("hX",function(e){return useAxios.post("/mail/bulk/check_blacklists",{data:e,customType:"model",check:"msg"})}),getMailScanLog=exports("dI",function(e){return useAxios.post("/mail/main/read_blacklist_scan_log",{data:e,customType:"model",check:"msg"})}),autoCreateDNSRecord=exports("hY",function(e){return useAxios.post("/mail/main/auto_create_dns_record",{data:e,customType:"model"})}),isInstallMail=function(){return useAxios.post("/mail/manage/install_status",{customType:"model",check:"msg"})},folderDeployCert=exports("iy",function(e){return useAxios.post("/mail/main/set_cert_from_local",{data:e,customType:"model",check:"msg"})}),getAutoSSLTaskStatus=exports("kT",function(){return useAxios.post("/mail/main/get_auto_ssl_task_status",{customType:"model",check:"msg"})}),openAutoSSLTask=exports("kR",function(){return useAxios.post("/mail/main/open_auto_ssl_task",{customType:"model",check:"msg"})}),closeAutoSSLTask=exports("kS",function(){return useAxios.post("/mail/main/close_auto_ssl_task",{customType:"model",check:"msg"})}),initEnvironment=exports("c8",function(){return useAxios.post("/mail/main/setup_mail_sys",{customType:"model",check:"msg"})}),getIpList=exports("hZ",function(){return useAxios.post("/mail/multipleip/get_ip_tags_api",{customType:"model",check:"msg"})}),getIpAddressList=exports("l7",function(e){return useAxios.post("/mail/multipleip/get_net_interface",{customType:"model",check:"msg",data:e})}),addIpTagApi=exports("l8",function(e){return useAxios.post("/mail/multipleip/add_ip_tag_api",{customType:"model",check:"msg",data:e})}),delIpTagApi=exports("la",function(e){return useAxios.post("/mail/multipleip/del_ip_tag_api",{customType:"model",check:"msg",data:e})}),editIpTagApi=exports("l9",function(e){return useAxios.post("/mail/multipleip/edit_ip_tag_api",{customType:"model",check:"msg",data:e})}),setIpRotateApi=exports("fg",function(e){return useAxios.post("/mail/multipleip/set_ip_rotate",{customType:"model",check:"msg",data:e})}),getForwardList=exports("kW",function(e){return useAxios.post("/mail/foward/get_mail_forward",{customType:"model",check:"msg",data:e})}),getMailboxListByName=exports("k_",function(e){return useAxios.post("/mail/main/get_mailbox",{data:e,customType:"model",check:"msg"})}),addForward=exports("kX",function(e){return useAxios.post("/mail/foward/add_forward",{data:e,customType:"model",check:"msg"})}),editForward=exports("kY",function(e){return useAxios.post("/mail/foward/edit_forward",{data:e,customType:"model",check:"msg"})}),deleteForward=exports("kZ",function(e){return useAxios.post("/mail/foward/del_forward",{data:e,customType:"model",check:"msg"})}),useMailStore=exports("lb",defineStore("MAIL-STORE",{state:function(){return{install:!1,update:!1,checkEnv:!1,version:"",lastVersion:"6.4",pluginInfo:{},router:useRouter(),route:useRoute(),tabActive:useRoute().name}},getters:{},actions:{getMailInfo:function(){var e=this;return _asyncToGenerator(_regenerator().m(function t(){var n,r;return _regenerator().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,isInstallMail();case 1:n=t.v,r=n.data,e.install=r.status;case 2:return t.a(2)}},t)}))()},cutTabsEvent:function(e){var t=this;return _asyncToGenerator(_regenerator().m(function n(){return _regenerator().w(function(n){for(;;)switch(n.n){case 0:t.tabActive=e,t.router.push({name:e});case 1:return n.a(2)}},n)}))()}}})),getMailStore=exports("h2",function(){var e=useMailStore();return _objectSpread({refs:storeToRefs(e)},e)}),beforeEnter$2=function(){var e=_asyncToGenerator(_regenerator().m(function e(t,n,r){var o,i,a,s,l;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,o=getMailStore(),i=o.refs,a=i.install,s=i.tabActive,l=o.getMailInfo,e.n=1,l();case 1:if(a.value||"/mail/setting"===t.path){e.n=2;break}return r("/mail/setting"),s.value="mail-setting",e.a(2);case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:r();case 5:return e.a(2)}},e,null,[[0,3]])}));return function(t,n,r){return e.apply(this,arguments)}}(),mailRoutes={name:"mail",path:"/mail",meta:{sort:14,icon:"mail",title:"邮局管理"},component:function(){return __vitePreload(function(){return module.import("./index-legacy66.js?v=1777008528")},void 0,module.meta.url)},redirect:"/mail/market",children:[{path:"market",name:"market",meta:{title:"邮件营销"},beforeEnter:beforeEnter$2,component:function(){return __vitePreload(function(){return module.import("./index-legacy67.js?v=1777008528").then(function(e){return e.N})},void 0,module.meta.url)}},{path:"maildomain",name:"maildomain",meta:{title:"域名"},component:function(){return __vitePreload(function(){return module.import("./index-legacy68.js?v=1777008528").then(function(e){return e.d})},void 0,module.meta.url)},beforeEnter:beforeEnter$2},{path:"mailbox",name:"mailbox",meta:{title:"邮箱"},beforeEnter:beforeEnter$2,component:function(){return __vitePreload(function(){return module.import("./index-legacy69.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}},{path:"email",name:"email",meta:{title:"邮件"},beforeEnter:beforeEnter$2,component:function(){return __vitePreload(function(){return module.import("./index-legacy70.js?v=1777008528")},void 0,module.meta.url)}},{path:"setting",name:"mail-setting",meta:{title:"设置"},beforeEnter:beforeEnter$2,component:function(){return __vitePreload(function(){return module.import("./index-legacy71.js?v=1777008528").then(function(e){return e.y})},void 0,module.meta.url)}}]},getNodeUsedStatus=function(){return useAxios.post("/mod/node/node/node_used_status",{check:"object",customType:"model"})},setNodeUsedStatus=exports("eG",function(){return useAxios.post("/mod/node/node/set_used_status",{check:"object",customType:"model"})}),editNode=exports("cb",function(e){return useAxios.post("/mod/node/node/update_node",{data:e,check:"msg",customType:"model"})}),addNode=exports("cc",function(e){return useAxios.post("mod/node/node/add_node",{data:e,check:"msg",customType:"model"})}),nodeList=exports("c9",function(e){return useAxios.post("mod/node/node/get_node_list",{data:e,check:"object",customType:"model"})}),getNodeClassList=exports("cf",function(){return useAxios.post("/mod/node/node/get_category_list",{check:"object",customType:"model"})}),deleteNode=exports("ce",function(e){return useAxios.post("mod/node/node/del_node",{data:e,check:"msg",customType:"model"})}),addNodeClass=exports("i0",function(e){return useAxios.post("/mod/node/node/add_category",{check:"object",data:e,customType:"model"})}),deleteNodeClass=exports("i1",function(e){return useAxios.post("/mod/node/node/del_category",{check:"object",data:e,customType:"model"})}),setNodeBatchClass=exports("ci",function(e){return useAxios.post("/mod/node/node/bind_node_to_category",{check:"object",data:e,customType:"model"})}),batchDelNode=exports("ck",function(e){return useAxios.post("/mod/node/node/del_node",{check:"object",data:e,customType:"model"})}),getPanelUrl=exports("cd",function(e){return useAxios.post("/mod/node/node/get_panel_url",{check:"object",data:e,customType:"model"})}),nodeSSHDelApi=exports("gR",function(e){return useAxios.post("/mod/node/node/remove_ssh_conf",{check:"object",data:e,customType:"model"})}),nodeSSHSet=exports("dM",function(e){return useAxios.post("/mod/node/node/set_ssh_conf",{check:"object",data:e,customType:"model"})}),nodeSSHPort=exports("gS",function(e){return useAxios.post("/mod/node/node/get_sshd_port",{check:"object",data:e,customType:"model"})}),getClbList=exports("ga",function(e){return useAxios.post("/mod/node/load/http_load_list",{check:"object",data:e,customType:"model"})}),batchDelHttpClb=exports("ip",function(e){return useAxios.post("/mod/node/load/multi_remove_http_load",{check:"object",data:e,customType:"model"})}),batchDelTcpUdpClb=exports("ir",function(e){return useAxios.post("/mod/node/load/multi_remove_tcp_load",{check:"object",data:e,customType:"model"})}),deleteClbHttpApi=exports("im",function(e){return useAxios.post("/mod/node/load/remove_http_load",{check:"object",data:e,customType:"model"})}),getHttpClbLog=exports("hx",function(e){return useAxios.post("/mod/node/load/log",{check:"object",data:e,customType:"model"})}),exportHttpClbLog=exports("ht",function(e){return useAxios.post("/mod/node/load/export_log",{check:"object",data:e,customType:"model"})}),editHttpSeeting=exports("io",function(e){return useAxios.post("/mod/node/load/set_http_load",{check:"object",data:e,customType:"model"})}),getClbAllNode=exports("cl",function(e){return useAxios.post("/mod/node/node/get_all_node",{check:"object",data:{node_type:null!=e&&e.node_type?e.node_type:"api"},customType:"model"})}),getNodeSites=exports("fk",function(e){return useAxios.post("/mod/node/node/get_node_sites",{check:"object",data:e,customType:"model"})}),getTcpUdpClbList=exports("gb",function(e){return useAxios.post("/mod/node/load/tcp_load_list",{check:"object",data:e,customType:"model"})}),deleteTcpUdpClb=exports("iq",function(e){return useAxios.post("/mod/node/load/remove_tcp_load",{check:"object",data:e,customType:"model"})}),getTcpUdpClbLog=exports("hw",function(e){return useAxios.post("/mod/node/load/tcp_log",{check:"object",data:e,customType:"model"})}),exportTcpUdpClbLog=exports("hu",function(e){return useAxios.post("/mod/node/load/export_tcp_log",{check:"object",data:e,customType:"model"})}),getPhpSiteList=exports("il",function(){return useAxios.post("/mod/node/node/php_site_list",{check:"object",customType:"model"})}),getSlaveList=exports("iR",function(e){return useAxios.post("/mod/node/mysql_slave/slave_list",{check:"object",data:e,customType:"model"})}),getDatabaseList=exports("fq",function(e){return useAxios.post("/mod/node/mysql_slave/database_list",{check:"object",data:e,customType:"model"})}),getSyncStatus=exports("fr",function(e){return useAxios.post("/mod/node/mysql_slave/get_sync_status",{check:"object",data:e,customType:"model"})}),addMysqlSlave=exports("fp",function(e){return useAxios.post("/mod/node/mysql_slave/add_slave_server",{check:"object",data:e,customType:"model"})}),getMysqlSlaveInfo=exports("iQ",function(e){return useAxios.post("/mod/node/mysql_slave/get_slave_info",{check:"object",data:e,customType:"model"})}),setMysqlSlave=exports("iP",function(e){return useAxios.post("/mod/node/mysql_slave/set_slave_status",{check:"msg",data:e,customType:"model"})}),deleteMysqlSlave=exports("iM",function(e){return useAxios.post("/mod/node/mysql_slave/del_slave_server",{check:"msg",data:e,customType:"model"})}),getMysqlSlaveHistory=exports("iN",function(){return useAxios.post("/mod/node/mysql_slave/get_master_sql_list",{check:"array",customType:"model"})}),deleteMysqlSlaveHistory=exports("iO",function(e){return useAxios.post("/mod/node/mysql_slave/del_master_sql",{check:"msg",data:e,customType:"model"})}),syncMysqlSlaveConfig=exports("fs",function(e){return useAxios.post("/mod/node/mysql_slave/sync_slave_config",{check:"msg",data:e,customType:"model"})}),getRedisList=exports("iT",function(e){return useAxios.post("/mod/node/redis_slave/replication_group_list",{check:"msg",data:e,customType:"model"})}),createRedisGroup=exports("fn",function(e){return useAxios.post("/mod/node/redis_slave/create_replication_group",{check:"object",data:e,customType:"model"})}),getAvailableNodes=exports("gT",function(){return useAxios.post("/mod/node/redis_slave/get_available_nodes",{check:"msg",customType:"model"})}),delectRedisGroup=exports("iS",function(e){return useAxios.post("/mod/node/redis_slave/delete_replication_group",{check:"msg",data:e,customType:"model"})}),getCreationStatus=exports("fo",function(e){return useAxios.post("/mod/node/redis_slave/get_creation_status",{check:"object",data:e,customType:"model"})}),getGroupDetail=exports("eb",function(e){return useAxios.post("/mod/node/redis_slave/get_group_detail",{check:"object",data:e,customType:"model"})}),removeRedisGroupSlave=exports("gU",function(e){return useAxios.post("/mod/node/redis_slave/remove_slave",{check:"object",data:e,customType:"model"})}),addSlaveToRedisGroup=exports("ea",function(e){return useAxios.post("/mod/node/redis_slave/add_slave_to_group",{check:"object",data:e,customType:"model"})}),reconnectRedisSlave=exports("gV",function(e){return useAxios.post("/mod/node/redis_slave/reconnect_slave",{check:"object",data:e,customType:"model"})}),getAlarmList=exports("gd",function(e){return useAxios.post("/mod/push/task/get_task_list",{check:"object",data:e,customType:"model"})}),setNewAlarmTask=exports("dN",function(e){return useAxios.post("/mod/push/task/set_task_conf",{data:e,check:"msg",customType:"model"})}),delTaskStatus=exports("g9",function(e){return useAxios.post("/mod/push/task/remove_task_conf",{data:e,check:"msg",customType:"model"})}),setTaskStatus=exports("gc",function(e){return useAxios.post("/mod/push/task/change_task_conf",{data:e,check:"msg",customType:"model"})}),getNodeFileList=exports("ha",function(e){return useAxios.post("/mod/node/file_transfer/file_list",{data:e,check:"object",customType:"model",skipPending:!0})}),getNodeFileSize=exports("h7",function(e){return useAxios.post("/mod/node/file_transfer/dir_size",{data:e,check:"msg",customType:"model"})}),createFileTransferTask=exports("hb",function(e){return useAxios.post("/mod/node/file_transfer/create_filetransfer_task",{data:e,check:"object",customType:"model"})}),deleteNodeFile=exports("h8",function(e){return useAxios.post("/mod/node/file_transfer/delete_file",{data:e,check:"msg",customType:"model"})}),checkNodeFile=exports("i8",function(e){return useAxios.post("/mod/node/file_transfer/upload_check",{data:e,check:"object",customType:"model"})}),createNodeFile=exports("h9",function(e){return useAxios.post("/mod/node/file_transfer/create_dir",{data:e,check:"msg",customType:"model"})}),restartNode=exports("cg",function(e,t){return useAxios.post("/mod/node/node/".concat("panel"===t?"restart_bt_panel":"server_reboot"),{data:{node_id:e},check:"msg",customType:"model"})}),bindApp=exports("ch",function(e){return useAxios.post("/mod/node/node/bind_app",{data:e,check:"ignore",customType:"model"})}),verifyApp=exports("cj",function(e){return useAxios.post("/mod/node/node/bind_app_status",{data:e,check:"ignore",customType:"model"})}),createScript=exports("iX",function(e){return useAxios.post("/mod/node/executor/create_script",{data:e,check:"object",customType:"model"})}),modifyScript=exports("iW",function(e){return useAxios.post("/mod/node/executor/modify_script",{data:e,check:"object",customType:"model"})}),deleteScript=exports("iV",function(e){return useAxios.post("/mod/node/executor/delete_script",{data:e,check:"msg",customType:"model"})}),getScriptList=exports("iU",function(e){return useAxios.post("/mod/node/executor/get_script_list",{data:e,check:"object",customType:"model"})}),getFlowTaskList=exports("i_",function(e){return useAxios.post("/mod/node/executor/flow_task_list",{data:e,check:"object",customType:"model"})}),getTransferFileTaskInfo=exports("iZ",function(e){return useAxios.post("/mod/node/executor/get_transferfile_task_info",{data:e,check:"object",customType:"model",skipPending:!0})}),getCommandTaskInfo=exports("iY",function(e){return useAxios.post("/mod/node/executor/get_command_task_info",{data:e,check:"object",customType:"model",skipPending:!0})}),nodeGetDir=exports("j3",function(e){return useAxios.post("/mod/node/file_transfer/node_get_dir",{data:e,check:"object",customType:"model"})}),stopFlowTask=exports("j2",function(e){return useAxios.post("/mod/node/executor/stop_flow",{data:e,check:"msg",customType:"model"})}),setClbCache=exports("fl",function(e){return useAxios.post("/mod/node/load/set_http_cache",{data:e,check:"object",customType:"model"})}),createFlowTemplate=exports("j4",function(e){return useAxios.post("/mod/node/executor/create_flow_template",{data:e,check:"object",customType:"model"})}),deleteFlowTemplate=exports("j6",function(e){return useAxios.post("/mod/node/executor/delete_flow_template",{data:e,check:"msg",customType:"model"})}),getFlowTemplateList=exports("j5",function(e){return useAxios.post("/mod/node/executor/get_flow_template_list",{data:e,check:"object",customType:"model"})}),retryExecutorTask=exports("i$",function(e){return useAxios.post("/mod/node/executor/retry_flow_task",{data:e,check:"msg",customType:"model"})}),beforeEnter$1=function(){var e=_asyncToGenerator(_regenerator().m(function e(t,n,r){var o,i,a;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,getNodeUsedStatus();case 1:if(o=e.v,"未使用"!==(i=o.data).msg&&!1===i.status&&Message$2.error(i.msg),a=t.path.includes("/node/install"),i.status||a){e.n=2;break}return e.a(2,r("/node/install"));case 2:if(!a){e.n=3;break}return e.a(2,i.status?r("/node/node-mgt"):r());case 3:r(),e.n=5;break;case 4:e.p=4,e.v;case 5:r();case 6:return e.a(2)}},e,null,[[0,4]])}));return function(t,n,r){return e.apply(this,arguments)}}(),nodeRoutes={name:"node",path:"/node",meta:{sort:16,title:"节点管理",icon:"node"},component:function(){return __vitePreload(function(){return module.import("./index-legacy72.js?v=1777008528")},void 0,module.meta.url)},redirect:"/node/node-mgt",children:[{path:"node-mgt",name:"node-mgt",meta:{title:"节点"},beforeEnter:beforeEnter$1,component:function(){return __vitePreload(function(){return module.import("./index-legacy73.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}},{path:"node-clb",name:"node-clb",meta:{title:"负载均衡"},beforeEnter:beforeEnter$1,component:function(){return __vitePreload(function(){return module.import("./index-legacy74.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}},{path:"master",name:"master",meta:{title:"主从复制"},beforeEnter:beforeEnter$1,component:function(){return __vitePreload(function(){return module.import("./index-legacy75.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}},{path:"file-transfer",name:"file-transfer",meta:{title:"文件互传"},beforeEnter:beforeEnter$1,component:function(){return __vitePreload(function(){return module.import("./index-legacy76.js?v=1777008528")},void 0,module.meta.url)}},{path:"script-mass",name:"script-mass",meta:{title:"分发管理"},beforeEnter:beforeEnter$1,component:function(){return __vitePreload(function(){return module.import("./index-legacy77.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}},{path:"node-alarm",name:"node-alarm",meta:{title:"告警管理"},beforeEnter:beforeEnter$1,component:function(){return __vitePreload(function(){return module.import("./index-legacy78.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}},{path:"install",name:"node-install",meta:{title:"安装",ignore:!0},beforeEnter:beforeEnter$1,component:function(){return __vitePreload(function(){return module.import("./index-legacy79.js?v=1777008528")},void 0,module.meta.url)}}]},siteRoutes={name:"site",path:"/site",meta:{sort:2,title:"网站",icon:"site"},component:function(){return __vitePreload(function(){return module.import("./index-legacy80.js?v=1777008528")},void 0,module.meta.url)},children:[{path:"php",name:"php",meta:{title:"PHP项目"},component:function(){return __vitePreload(function(){return module.import("./index-legacy81.js?v=1777008528")},void 0,module.meta.url)}},{path:"java",name:"java",meta:{title:"Java项目"},component:function(){return __vitePreload(function(){return module.import("./index-legacy82.js?v=1777008528")},void 0,module.meta.url)}},{path:"node",name:"nodejs",meta:{title:"Node项目"},component:function(){return __vitePreload(function(){return module.import("./index-legacy83.js?v=1777008528").then(function(e){return e.a})},void 0,module.meta.url)}},{path:"go",name:"go",meta:{title:"Go项目"},component:function(){return __vitePreload(function(){return module.import("./index-legacy84.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}},{path:"python",name:"python",meta:{title:"Python项目"},component:function(){return __vitePreload(function(){return module.import("./index-legacy85.js?v=1777008528").then(function(e){return e.l})},void 0,module.meta.url)}},{path:"net",name:"net",meta:{title:"Net项目",icon:"site"},component:function(){return __vitePreload(function(){return module.import("./index-legacy86.js?v=1777008528").then(function(e){return e.e})},void 0,module.meta.url)}},{path:"nginx",name:"proxy",meta:{title:"反向代理"},component:function(){return __vitePreload(function(){return module.import("./index-legacy87.js?v=1777008528")},void 0,module.meta.url)}},{path:"html",name:"html",meta:{title:"HTML项目"},component:function(){return __vitePreload(function(){return module.import("./index-legacy88.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}},{path:"other",name:"otherModel",meta:{title:"其他项目"},component:function(){return __vitePreload(function(){return module.import("./index-legacy89.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}}]},softRoutes$1={name:"soft",path:"/soft",meta:{sort:18,icon:"soft",title:"软件商店"},component:function(){return __vitePreload(function(){return module.import("./index-legacy90.js?v=1777008528")},void 0,module.meta.url)},children:[{path:"plugin",name:"plugin",meta:{title:"官方应用"},component:function(){return __vitePreload(function(){return module.import("./index-legacy91.js?v=1777008528")},void 0,module.meta.url)}},{path:"other",name:"other",meta:{title:"第三方应用"},component:function(){return __vitePreload(function(){return module.import("./index-legacy92.js?v=1777008528")},void 0,module.meta.url)}},{path:"deployment",name:"deployment",meta:{title:"一键部署"},component:function(){return __vitePreload(function(){return module.import("./index-legacy93.js?v=1777008528")},void 0,module.meta.url)}}]},softRoutes={name:"ssl",path:"/ssl",meta:{sort:12,icon:"ssl",title:"SSL"},component:function(){return __vitePreload(function(){return module.import("./index-legacy94.js?v=1777008528")},void 0,module.meta.url)},children:[{path:"certificate",name:"certificate",meta:{title:"证书管理"},component:function(){return __vitePreload(function(){return module.import("./index-legacy95.js?v=1777008528")},void 0,module.meta.url)}},{path:"auto-deploy",name:"auto-deploy",meta:{title:"自动部署"},component:function(){return __vitePreload(function(){return module.import("./index-legacy96.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}},{path:"auth",name:"auth",meta:{title:"部署授权"},component:function(){return __vitePreload(function(){return module.import("./index-legacy97.js?v=1777008528")},void 0,module.meta.url)}}]},xtermRoutes={name:"xterm",path:"/xterm",meta:{sort:15,title:"终端",icon:"xterm"},component:function(){return __vitePreload(function(){return module.import("./index-legacy98.js?v=1777008528").then(function(e){return e.a})},void 0,module.meta.url)}},getAccountListApi=exports("hC",function(e){return useAxios.post("/mod/virtual/virtual/get_account_list",{data:e,customType:"model"})}),createAccountApi=exports("hB",function(e){return useAxios.post("/mod/virtual/virtual/create_account",{data:e,customType:"model"})}),modifyAccountApi=exports("hA",function(e){return useAxios.post("/mod/virtual/virtual/modify_account",{data:e,customType:"model"})}),removeAccountApi=exports("hH",function(e){return useAxios.post("/mod/virtual/virtual/remove_account",{data:e,customType:"model"})}),getTypeListApi=exports("hz",function(){return useAxios.post("/mod/virtual/virtual/get_type_list",{customType:"model"})}),createTypeApi=exports("hE",function(e){var t=e.ps;return useAxios.post("/mod/virtual/virtual/create_type",{data:{name:t},customType:"model"})}),modifyTypeApi=exports("hF",function(e){var t=e.ps,n=e.id;return useAxios.post("/mod/virtual/virtual/modify_type",{data:{name:t,type_id:n},customType:"model"})}),removeTypeApi=exports("hG",function(e){var t=e.id;return useAxios.post("/mod/virtual/virtual/remove_type",{data:{type_id:t},customType:"model"})}),getPackageListApi=exports("he",function(e){return useAxios.post("/mod/virtual/virtual/get_package_list",{data:e,customType:"model"})}),createPackageApi=exports("hd",function(e){return useAxios.post("/mod/virtual/virtual/create_package",{data:e,customType:"model"})}),modifyPackageApi=exports("hc",function(e){return useAxios.post("/mod/virtual/virtual/modify_package",{data:e,customType:"model"})}),removePackageApi=exports("hf",function(e){return useAxios.post("/mod/virtual/virtual/remove_package",{data:e,customType:"model"})}),getLogsApi=exports("ge",function(e){return useAxios.post("/mod/virtual/virtual/get_logs",{data:e,customType:"model"})}),cleanLogsApi=exports("gf",function(){return useAxios.post("/mod/virtual/virtual/clean_logs",{customType:"model"})}),getDiskListApi=exports("hi",function(){return useAxios.post("/mod/virtual/virtual/get_disk_list",{customType:"model"})}),setDefaultDiskApi=exports("hh",function(e){return useAxios.post("/mod/virtual/virtual/set_default_disk",{data:e,customType:"model"})}),enableDiskQuotaApi=exports("hg",function(e){return useAxios.post("/mod/virtual/virtual/enable_disk_quota",{data:{mountpoint:e},customType:"model"})}),getAccountTempLoginTokenApi=exports("hD",function(e){return useAxios.post("/mod/virtual/virtual/get_account_temp_login_token",{data:e,customType:"model"})}),getServiceInfo=function(){return useAxios.post("/mod/virtual/virtual/get_service_info",{customType:"model"})},setServiceStatus=exports("gi",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return useAxios.post("/mod/virtual/virtual/".concat(e,"_service"),{data:t,customType:"model"})}),installService=exports("eI",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return useAxios.post("/mod/virtual/virtual/install_service",{data:e,customType:"model"})}),getServerSslApi=function(){return useAxios.post("/mod/virtual/virtual/get_server_ssl",{customType:"model"})},saveServerSslApi=exports("gg",function(e,t){return useAxios.post("/mod/virtual/virtual/save_server_ssl",{data:{certificate:e,private_key:t},customType:"model"})}),getServerAddressApi=function(){return useAxios.post("/mod/virtual/virtual/get_server_address",{customType:"model"})},setServerAddressApi=exports("gh",function(e){return useAxios.post("/mod/virtual/virtual/set_server_address",{data:{address:e},customType:"model"})}),getCloudVersionApi=function(){return useAxios.post("/mod/virtual/virtual/get_cloud_version",{customType:"model"})},updateServiceApi=exports("co",function(){return useAxios.post("/mod/virtual/virtual/update_service",{customType:"model"})}),_useMessage2=useMessage(),$request=_useMessage2.request,SETTINGS_STORE=defineStore("VHOST-SETTINGS-STORE",function(){var e=ref(0),t=ref(!1),n=ref(0),r=ref(""),o=ref(null),i=computed(function(){return s.value?{type:"stop",text:"停止",icon:"start",color:"!text-primary",tips:"运行中"}:{type:"start",text:"启动",icon:"stop",color:"!text-danger",tips:"已停止"}}),a=computed(function(){return t.value&&2===e.value}),s=computed(function(){return 1===n.value}),l=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var n,r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,getPluginInfo({sName:"nginx"});case 1:n=e.v,r=n.data,isObject$4(r)&&(t.value=r.setup);case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),u=function(){var t=_asyncToGenerator(_regenerator().m(function t(){var o,i;return _regenerator().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,l();case 1:return t.n=2,getServiceInfo();case 2:return o=t.v,i=o.data,isObject$4(i)&&(e.value=i.install_status,n.value=i.run_status,r.value=i.version),t.a(2,i)}},t)}));return function(){return t.apply(this,arguments)}}(),c=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n,r,i;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t=useGlobalStore(),"free"!==t.payment.value.authType&&a.value){e.n=1;break}return console.log("跳过云端版本信息获取:用户为免费版或vhost服务未安装完成"),e.a(2);case 1:return e.p=1,e.n=2,getCloudVersionApi();case 2:n=e.v,r=n.data,isObject$4(r)&&(o.value=r),e.n=4;break;case 3:e.p=3,i=e.v,console.error("获取云端版本信息失败:",i),o.value=null;case 4:return e.a(2)}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}(),d=ref(!1),p=ref({certificate:"",private_key:""}),h=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,getServerSslApi();case 1:t=e.v,n=t.data,isObject$4(n)&&(d.value=""!==n.certificate,p.value.certificate=n.certificate,p.value.private_key=n.private_key);case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),f=ref(""),g=ref("https"),m=ref("80"),y=ref(""),v=ref(),_=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,getServerAddressApi();case 1:t=e.v,n=t.data,console.log("----------------",n),isObject$4(n)&&(f.value=n.domain?n.domain:n.ip,g.value=n.protocol,m.value=n.port,y.value=n.domain,v.value=n);case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),x=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var t,n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,setServerAddressApi(null===(t=v.value)||void 0===t?void 0:t.ip);case 1:return n=e.v,e.n=2,$request(n);case 2:return e.n=3,_();case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return{install:e,runStatus:n,version:r,cloudVersionInfo:o,isInstall:a,isRunning:s,isServerRunning:i,getInfo:u,getCloudVersionInfo:c,hasCert:d,certInfo:p,getCertInfo:h,getServerIP:_,serverIP:f,serverProtocol:g,serverPort:m,resetServerEvent:x}}),useSettingsStore=exports("cn",function(){var e=SETTINGS_STORE(),t=storeToRefs(e);return _objectSpread(_objectSpread({},e),t)}),beforeEnter=function(){var e=_asyncToGenerator(_regenerator().m(function e(t,n,r){var o,i,a,s;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,o=useSettingsStore(),i=o.getInfo,a=o.isInstall,s=o.isRunning,e.n=1,i();case 1:if(a.value||"/vhost/settings"===t.path){e.n=2;break}return r("/vhost/settings"),e.a(2);case 2:if(s.value||!a.value||"/vhost/settings"===t.path){e.n=3;break}return Message$2.warn("当前服务未运行,请先启动服务"),r("/vhost/settings"),e.a(2);case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:r();case 6:return e.a(2)}},e,null,[[0,4]])}));return function(t,n,r){return e.apply(this,arguments)}}(),vhostRoutes={name:"vhost",path:"/vhost",meta:{sort:13,icon:"vhost",title:"多机管理"},component:function(){return __vitePreload(function(){return module.import("./index-legacy99.js?v=1777008528")},void 0,module.meta.url)},children:[{path:"account",name:"vhost-account",meta:{title:"用户"},beforeEnter:beforeEnter,component:function(){return __vitePreload(function(){return module.import("./index-legacy100.js?v=1777008528")},void 0,module.meta.url)}},{path:"package",name:"vhost-package",meta:{title:"资源"},beforeEnter:beforeEnter,component:function(){return __vitePreload(function(){return module.import("./index-legacy101.js?v=1777008528")},void 0,module.meta.url)}},{path:"storage",name:"vhost-storage",meta:{title:"存储"},beforeEnter:beforeEnter,component:function(){return __vitePreload(function(){return module.import("./index-legacy102.js?v=1777008528")},void 0,module.meta.url)}},{path:"logs",name:"vhost-logs",meta:{title:"日志"},beforeEnter:beforeEnter,component:function(){return __vitePreload(function(){return module.import("./index-legacy103.js?v=1777008528")},void 0,module.meta.url)}},{path:"settings",name:"vhost-settings",meta:{title:"设置"},beforeEnter:beforeEnter,component:function(){return __vitePreload(function(){return module.import("./index-legacy104.js?v=1777008528")},void 0,module.meta.url)}},{path:"install",name:"vhost-install",meta:{title:"多用户安装",ignore:!0},beforeEnter:beforeEnter,component:function(){return __vitePreload(function(){return module.import("./index-legacy105.js?v=1777008528")},void 0,module.meta.url)}}]},wafRoutes={name:"waf",path:"/waf",meta:{sort:8,title:"WAF",icon:"waf"},component:function(){return __vitePreload(function(){return module.import("./index-legacy106.js?v=1777008528")},void 0,module.meta.url)}},wpRoutes={name:"wp",path:"/wp",meta:{sort:11,title:"WP Tools",icon:"wordpress"},component:function(){return __vitePreload(function(){return module.import("./index-legacy107.js?v=1777008528")},void 0,module.meta.url)},children:[{path:"local",name:"local",meta:{title:"本地管理"},component:function(){return __vitePreload(function(){return module.import("./index-legacy108.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}},{path:"remote",name:"remote",meta:{title:"远程管理"},component:function(){return __vitePreload(function(){return module.import("./index-legacy109.js?v=1777008528").then(function(e){return e.i})},void 0,module.meta.url)}}]},modules=Object.assign({"../modules/ai.ts":aiRoutes,"../modules/config.ts":configRoutes,"../modules/control.ts":controlRoutes,"../modules/crontab.ts":crontabRoutes,"../modules/database.ts":databaseRoutes,"../modules/docker.ts":dockerRoutes,"../modules/domain.ts":domainRoutes,"../modules/files.ts":fileRoutes,"../modules/firewall.ts":firewallRoutes,"../modules/ftp.ts":ftpRoutes,"../modules/home.ts":homeRoutes,"../modules/logs.ts":logsRoutes,"../modules/mail.ts":mailRoutes,"../modules/node.ts":nodeRoutes,"../modules/site.ts":siteRoutes,"../modules/soft.ts":softRoutes$1,"../modules/ssl.ts":softRoutes,"../modules/term.ts":xtermRoutes,"../modules/vhost.ts":vhostRoutes,"../modules/waf.ts":wafRoutes,"../modules/wp.ts":wpRoutes}),rolesRoutes=_toConsumableArray(Object.keys(modules).map(function(e){return modules[e]}).sort(function(e,t){var n,r,o,i;return(isNumber$1(null===(n=e.meta)||void 0===n?void 0:n.sort)?null===(r=e.meta)||void 0===r?void 0:r.sort:Number.MAX_VALUE)-(isNumber$1(null===(o=t.meta)||void 0===o?void 0:o.sort)?null===(i=t.meta)||void 0===i?void 0:i.sort:Number.MAX_VALUE)}).filter(function(e){return e})),routes=_toConsumableArray(rolesRoutes),cloudVersionChanges=function(){};function useNProgress(){var e=arguments.length>1?arguments[1]:void 0,t=ref(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null),n=computed({set:function(e){return e?nprogress.start():nprogress.done()},get:function(){return"number"==typeof t.value&&t.value<1}});e&&nprogress.configure(e);var r=nprogress.set;return nprogress.set=function(e){return t.value=e,r.call(nprogress,e)},watchEffect(function(){"number"==typeof t.value&&isClient&&r.call(nprogress,t.value)}),tryOnScopeDispose(nprogress.remove),{isLoading:n,progress:t,start:nprogress.start,done:nprogress.done,remove:function(){t.value=null,nprogress.remove()}}}var unFnTimes=null,setRouterActive=function(e){useGlobalStore().routerActive.value=e},fileCacheRefresh=function(){unFnTimes&&clearTimeout(unFnTimes),unFnTimes=setTimeout(function(){return cloudVersionChanges()},1e3)},useCreateRouterEach=function(e){var t=useNProgress(null,{color:"var(--el-color-primary)",minimum:.1,speed:200,showSpinner:!0,spinnerPosition:"left",easing:"ease",trickleSpeed:400}),n=t.isLoading,r=t.progress,o="";n.value=!0,e.beforeEach(function(e,t,i){n.value=!0,r.value=.2,o=e.path,i()}),e.afterEach(function(e,t,n){if(isNavigationFailure(n)){if(e.path===t.path)return window.location.reload();window.location.href=o}(r.value=1,setRouterActive(e.path),fileCacheRefresh(),e.meta.icon!==t.meta.icon)&&(0,useGlobalStore().getGlobalInfo)()})},router=exports("j",createRouter({routes:[{name:"layout",path:"/",redirect:"/home",component:function(){return __vitePreload(function(){return module.import("./index-legacy110.js?v=1777008528")},void 0,module.meta.url)},children:[{path:"test",name:"/test",meta:{title:"测试模块"},component:function(){return __vitePreload(function(){return module.import("./index-legacy111.js?v=1777008528")},void 0,module.meta.url)}},{path:"test/automator",name:"/test/automator",meta:{title:"UIAutomator 测试"},component:function(){return __vitePreload(function(){return module.import("./UIAutomatorDemo-legacy.js?v=1777008528")},void 0,module.meta.url)}},{name:"bind-user",path:"/bind",meta:{title:"绑定堡塔账号"},component:function(){return __vitePreload(function(){return module.import("./index-legacy112.js?v=1777008528")},void 0,module.meta.url)}},{name:"modify-password",path:"/modify_password",meta:{title:"修改密码"},component:function(){return __vitePreload(function(){return module.import("./index-legacy113.js?v=1777008528")},void 0,module.meta.url)}}].concat(_toConsumableArray(routes))}],history:createWebHistory(),scrollBehavior:function(){return{left:0,top:0}}}));useCreateRouterEach(router);var originalReplaceState=window.history.replaceState;window.history.replaceState=function(){if("hidden"!==document.visibilityState)return originalReplaceState.apply(this,arguments)};var index$3=Object.freeze(Object.defineProperty({__proto__:null,router:router},Symbol.toStringTag,{value:"Module"}));exports("mi",index$3);var uploadProgress=ref(!1),uploadNum=ref(0),buildFormData=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=new FormData,i=getToken(),a=e;if(r){var s=Math.min(n+10485760,e.size);a=e.slice(n,s)}return o.append("blob",a),o.append("f_size",String(e.size)),o.append("f_path",t.path||""),o.append("f_name",t.name||e.name),o.append("f_start",String(n)),o.append("request_time",String(i.request_time)),o.append("request_token",String(i.request_token)),o},_unifiedUpload=function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var n,r,o,i,a,s,l=arguments;return _regenerator().w(function(e){for(;;)if(0===e.n)return r=l.length>2&&void 0!==l[2]?l[2]:0,o=(n=l.length>1&&void 0!==l[1]?l[1]:{}).useChunked||t.size>10485760,i=o?3:2,a=0,s=function(){var e=_asyncToGenerator(_regenerator().m(function e(){var l,u,c,d,p,h,f,g,m,y,v,_,x;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,d=buildFormData(t,n,r,o),p=_objectSpread({headers:{"Content-Type":o?"multipart/form-data":void 0,"x-http-token":window.vite_public_request_token||""},timeout:6e4},(!o||0===r)&&{onUploadProgress:function(e){if(e.total){var t,r=Math.round(100*e.loaded/e.total);null===(t=n.onProgress)||void 0===t||t.call(n,r)}}}),e.n=1,axios.post("".concat(isDev?"/api":"","/files?action=upload"),d,p);case 1:if(h=e.v,!isNumber$1(h.data)||!o){e.n=3;break}return uploadProgress.value||(uploadProgress.value=!0),g=Math.floor(h.data/t.size*100),uploadNum.value=Math.min(g,100),null===(f=n.onProgress)||void 0===f||f.call(n,uploadNum.value),e.n=2,_unifiedUpload(t,n,h.data);case 2:return e.a(2,e.v);case 3:if(o&&(uploadProgress.value=!1,uploadNum.value=100),null===(l=h.data)||void 0===l||!l.status){e.n=4;break}return null===(m=n.onSuccess)||void 0===m||m.call(n,h.data),e.a(2,h.data);case 4:throw y=(null===(u=h.data)||void 0===u?void 0:u.msg)||"上传失败",v=new Error(y),null===(c=n.onError)||void 0===c||c.call(n,v),v;case 5:if(e.p=5,x=e.v,!(a<i)||"NETWORK_ERROR"!==x.code&&"ECONNABORTED"!==x.code){e.n=7;break}return a++,e.n=6,new Promise(function(e){setTimeout(e,1e3*a)});case 6:return e.a(2,s());case 7:throw o&&(uploadProgress.value=!1,uploadNum.value=0),null===(_=n.onError)||void 0===_||_.call(n,x),x;case 8:return e.a(2)}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),e.a(2,s())},e)}));return function(t){return e.apply(this,arguments)}}(),smartUpload=exports("A",function(){var e=_asyncToGenerator(_regenerator().m(function e(t){var n,r,o,i,a,s,l=arguments;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=l.length>1&&void 0!==l[1]?l[1]:{},t&&0!==t.size){e.n=1;break}throw o=new Error("无效的文件"),null===(r=n.onError)||void 0===r||r.call(n,o),o;case 1:return e.p=1,i=t.size>10485760,e.n=2,_unifiedUpload(t,_objectSpread(_objectSpread({},n),{},{useChunked:i}));case 2:return e.a(2,e.v);case 3:throw e.p=3,s=e.v,null===(a=n.onError)||void 0===a||a.call(n,s),s;case 4:return e.a(2)}},e,null,[[1,3]])}));return function(t){return e.apply(this,arguments)}}()),validateFileType=exports("z",function(e,t){return t.some(function(t){return t.startsWith(".")?e.name.toLowerCase().endsWith(t.toLowerCase()):e.type.includes(t)})}),unicodeToChar=pipe(replace(/'/g,'"'),replace(/&#34;/g,'"')),menuJson=pipe(unicodeToChar,JSON.parse),menuConvert=function(e){return map$2(ifElse(compose(equals(e),head),nth(1),always(e)),[["dologin","exit"],["btwaf","waf"]])[1]||""},menuName=exports("ct",function(e){return menuConvert(pipe(replace(/memu([A|_]?)/,""),toLower)(e)||"home")}),createMenuRoute=function(e){var t=isArray$2(e)?e:menuJson(e),n=shallowRef([]);return t.forEach(function(e){var t=e.show,r=e.id,o=e.title,i=e.children;"lowcode"!==menuName(r)&&n.value.push({name:menuName(r),title:o,show:t,path:"/".concat(menuName(r)||"home"),children:(null==i?void 0:i.map(function(e){var t=e.id,n=e.title,r=e.show;return{name:menuName(t),title:n,path:"/".concat(menuName(t)),show:r}}))||[]})}),n},menuRoute=exports("cs",createMenuRoute(window.vite_public_menu||[]));function isPlainObject(e){return null!==e&&"object"===_typeof2(e)&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}function deepMerge(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new WeakMap;if(null===t||"object"!==_typeof2(t))return t;if(r.has(t))return r.get(t);r.set(t,e);for(var o=n.mergeArrays,i=void 0!==o&&o,a=0,s=Object.keys(t);a<s.length;a++){var l=s[a],u=t[l],c=e[l];u!==c&&(void 0!==u&&(Array.isArray(u)?i&&Array.isArray(c)?e[l]=[].concat(_toConsumableArray(c),_toConsumableArray(u)):e[l]=cloneDeep(u):isPlainObject(u)?(isPlainObject(c)||(e[l]={}),deepMerge(e[l],u,n,r)):e[l]=u))}return e}function cloneDeep(e){if(null===e||"object"!==_typeof2(e))return e;if(Array.isArray(e))return e.map(function(e){return cloneDeep(e)});if(isPlainObject(e)){var t={};for(var n in e)t[n]=cloneDeep(e[n]);return t}return e}var setSchemeThemeWithViewTransition=exports("q",function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return new Promise(function(){var r=_asyncToGenerator(_regenerator().m(function r(o){var i,a,s,l,u,c,d;return _regenerator().w(function(r){for(;;)switch(r.n){case 0:if(n&&document.startViewTransition){r.n=2;break}if(!t){r.n=1;break}return r.n=1,t();case 1:return o(null),r.a(2);case 2:return s=null!==(i=null==e?void 0:e.clientX)&&void 0!==i?i:window.innerWidth/2,l=null!==(a=null==e?void 0:e.clientY)&&void 0!==a?a:window.innerHeight/2,u=Math.hypot(Math.max(s,window.innerWidth-s),Math.max(l,window.innerHeight-l)),c=["circle(0px at ".concat(s,"px ").concat(l,"px)"),"circle(".concat(u,"px at ").concat(s,"px ").concat(l,"px)")],(d=document.startViewTransition(_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(!t){e.n=1;break}return e.n=1,t();case 1:o(null);case 2:return e.a(2)}},e)})))).ready.then(function(){document.documentElement.animate({clipPath:c},{duration:400,easing:"ease-out",pseudoElement:"::view-transition-new(root)"})}),r.n=3,d.finished;case 3:return r.a(2)}},r)}));return function(e){return r.apply(this,arguments)}}())}),module$1={};!function t(n,r,o,i){var a=!!(n.Worker&&n.Blob&&n.Promise&&n.OffscreenCanvas&&n.OffscreenCanvasRenderingContext2D&&n.HTMLCanvasElement&&n.HTMLCanvasElement.prototype.transferControlToOffscreen&&n.URL&&n.URL.createObjectURL),s="function"==typeof Path2D&&"function"==typeof DOMMatrix;function l(){}function u(e){var t=r.exports.Promise,o=void 0!==t?t:n.Promise;return"function"==typeof o?new o(e):(e(l,l),null)}var c,d,p,h,f,g,m,y,v,_=function(e,t){return{transform:function(n){if(e)return n;if(t.has(n))return t.get(n);var r=new OffscreenCanvas(n.width,n.height);return r.getContext("2d").drawImage(n,0,0),t.set(n,r),r},clear:function(){t.clear()}}}(function(){if(!n.OffscreenCanvas)return!1;try{var t=new OffscreenCanvas(1,1),r=t.getContext("2d");r.fillRect(0,0,1,1);var o=t.transferToImageBitmap();r.createPattern(o,"no-repeat")}catch(e){return!1}return!0}(),new Map),x=(p=Math.floor(1e3/60),h={},f=0,"function"==typeof requestAnimationFrame&&"function"==typeof cancelAnimationFrame?(c=function(e){var t=Math.random();return h[t]=requestAnimationFrame(function n(r){f===r||f+p-1<r?(f=r,delete h[t],e()):h[t]=requestAnimationFrame(n)}),t},d=function(e){h[e]&&cancelAnimationFrame(h[e])}):(c=function(e){return setTimeout(e,p)},d=function(e){return clearTimeout(e)}),{frame:c,cancel:d}),S=(y={},function(){if(g)return g;if(!o&&a){var n=["var CONFETTI, SIZE = {}, module = {};","("+t.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {","  if (msg.data.options) {","    CONFETTI(msg.data.options).then(function () {","      if (msg.data.callback) {","        postMessage({ callback: msg.data.callback });","      }","    });","  } else if (msg.data.reset) {","    CONFETTI && CONFETTI.reset();","  } else if (msg.data.resize) {","    SIZE.width = msg.data.resize.width;","    SIZE.height = msg.data.resize.height;","  } else if (msg.data.canvas) {","    SIZE.width = msg.data.canvas.width;","    SIZE.height = msg.data.canvas.height;","    CONFETTI = module.exports.create(msg.data.canvas);","  }","}"].join("\n");try{g=new Worker(URL.createObjectURL(new Blob([n])))}catch(e){return"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn("🎊 Could not load worker",e),null}!function(e){function t(t,n){e.postMessage({options:t||{},callback:n})}e.init=function(t){var n=t.transferControlToOffscreen();e.postMessage({canvas:n},[n])},e.fire=function(n,r,o){if(m)return t(n,null),m;var i=Math.random().toString(36).slice(2);return m=u(function(r){function a(t){t.data.callback===i&&(delete y[i],e.removeEventListener("message",a),m=null,_.clear(),o(),r())}e.addEventListener("message",a),t(n,i),y[i]=a.bind(null,{data:{callback:i}})})},e.reset=function(){for(var t in e.postMessage({reset:!0}),y)y[t](),delete y[t]}}(g)}return g}),b={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function T(e,t,n){return function(e,t){return t?t(e):e}(e&&null!=e[t]?e[t]:b[t],n)}function A(e){return e<0?0:Math.floor(e)}function w(e,t){return Math.floor(Math.random()*(t-e))+e}function C(e){return parseInt(e,16)}function E(e){return e.map(M)}function M(e){var t=String(e).replace(/[^0-9a-f]/gi,"");return t.length<6&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),{r:C(t.substring(0,2)),g:C(t.substring(2,4)),b:C(t.substring(4,6))}}function I(e){e.width=document.documentElement.clientWidth,e.height=document.documentElement.clientHeight}function P(e){var t=e.getBoundingClientRect();e.width=t.width,e.height=t.height}function D(e){var t=e.angle*(Math.PI/180),n=e.spread*(Math.PI/180);return{x:e.x,y:e.y,wobble:10*Math.random(),wobbleSpeed:Math.min(.11,.1*Math.random()+.05),velocity:.5*e.startVelocity+Math.random()*e.startVelocity,angle2D:-t+(.5*n-Math.random()*n),tiltAngle:(.5*Math.random()+.25)*Math.PI,color:e.color,shape:e.shape,tick:0,totalTicks:e.ticks,decay:e.decay,drift:e.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:3*e.gravity,ovalScalar:.6,scalar:e.scalar,flat:e.flat}}function k(e,t){t.x+=Math.cos(t.angle2D)*t.velocity+t.drift,t.y+=Math.sin(t.angle2D)*t.velocity+t.gravity,t.velocity*=t.decay,t.flat?(t.wobble=0,t.wobbleX=t.x+10*t.scalar,t.wobbleY=t.y+10*t.scalar,t.tiltSin=0,t.tiltCos=0,t.random=1):(t.wobble+=t.wobbleSpeed,t.wobbleX=t.x+10*t.scalar*Math.cos(t.wobble),t.wobbleY=t.y+10*t.scalar*Math.sin(t.wobble),t.tiltAngle+=.1,t.tiltSin=Math.sin(t.tiltAngle),t.tiltCos=Math.cos(t.tiltAngle),t.random=Math.random()+2);var n=t.tick++/t.totalTicks,r=t.x+t.random*t.tiltCos,o=t.y+t.random*t.tiltSin,i=t.wobbleX+t.random*t.tiltCos,a=t.wobbleY+t.random*t.tiltSin;if(e.fillStyle="rgba("+t.color.r+", "+t.color.g+", "+t.color.b+", "+(1-n)+")",e.beginPath(),s&&"path"===t.shape.type&&"string"==typeof t.shape.path&&Array.isArray(t.shape.matrix))e.fill(function(e,t,n,r,o,i,a){var s=new Path2D(e),l=new Path2D;l.addPath(s,new DOMMatrix(t));var u=new Path2D;return u.addPath(l,new DOMMatrix([Math.cos(a)*o,Math.sin(a)*o,-Math.sin(a)*i,Math.cos(a)*i,n,r])),u}(t.shape.path,t.shape.matrix,t.x,t.y,.1*Math.abs(i-r),.1*Math.abs(a-o),Math.PI/10*t.wobble));else if("bitmap"===t.shape.type){var l=Math.PI/10*t.wobble,u=.1*Math.abs(i-r),c=.1*Math.abs(a-o),d=t.shape.bitmap.width*t.scalar,p=t.shape.bitmap.height*t.scalar,h=new DOMMatrix([Math.cos(l)*u,Math.sin(l)*u,-Math.sin(l)*c,Math.cos(l)*c,t.x,t.y]);h.multiplySelf(new DOMMatrix(t.shape.matrix));var f=e.createPattern(_.transform(t.shape.bitmap),"no-repeat");f.setTransform(h),e.globalAlpha=1-n,e.fillStyle=f,e.fillRect(t.x-d/2,t.y-p/2,d,p),e.globalAlpha=1}else if("circle"===t.shape)e.ellipse?e.ellipse(t.x,t.y,Math.abs(i-r)*t.ovalScalar,Math.abs(a-o)*t.ovalScalar,Math.PI/10*t.wobble,0,2*Math.PI):function(e,t,n,r,o,i,a,s,l){e.save(),e.translate(t,n),e.rotate(i),e.scale(r,o),e.arc(0,0,1,a,s,l),e.restore()}(e,t.x,t.y,Math.abs(i-r)*t.ovalScalar,Math.abs(a-o)*t.ovalScalar,Math.PI/10*t.wobble,0,2*Math.PI);else if("star"===t.shape)for(var g=Math.PI/2*3,m=4*t.scalar,y=8*t.scalar,v=t.x,x=t.y,S=5,b=Math.PI/S;S--;)v=t.x+Math.cos(g)*y,x=t.y+Math.sin(g)*y,e.lineTo(v,x),g+=b,v=t.x+Math.cos(g)*m,x=t.y+Math.sin(g)*m,e.lineTo(v,x),g+=b;else e.moveTo(Math.floor(t.x),Math.floor(t.y)),e.lineTo(Math.floor(t.wobbleX),Math.floor(o)),e.lineTo(Math.floor(i),Math.floor(a)),e.lineTo(Math.floor(r),Math.floor(t.wobbleY));return e.closePath(),e.fill(),t.tick<t.totalTicks}function $(e,t){var r,s=!e,l=!!T(t||{},"resize"),c=!1,d=T(t,"disableForReducedMotion",Boolean),p=a&&!!T(t||{},"useWorker")?S():null,h=s?I:P,f=!(!e||!p)&&!!e.__confetti_initialized,g="function"==typeof matchMedia&&matchMedia("(prefers-reduced-motion)").matches;function m(t,n,a){for(var s=T(t,"particleCount",A),l=T(t,"angle",Number),c=T(t,"spread",Number),d=T(t,"startVelocity",Number),p=T(t,"decay",Number),f=T(t,"gravity",Number),g=T(t,"drift",Number),m=T(t,"colors",E),y=T(t,"ticks",Number),v=T(t,"shapes"),S=T(t,"scalar"),b=!!T(t,"flat"),C=function(e){var t=T(e,"origin",Object);return t.x=T(t,"x",Number),t.y=T(t,"y",Number),t}(t),M=s,I=[],P=e.width*C.x,$=e.height*C.y;M--;)I.push(D({x:P,y:$,angle:l,spread:c,startVelocity:d,color:m[M%m.length],shape:v[w(0,v.length)],ticks:y,decay:p,gravity:f,drift:g,scalar:S,flat:b}));return r?r.addFettis(I):(r=function(e,t,n,r,a){var s,l,c=t.slice(),d=e.getContext("2d"),p=u(function(t){function u(){s=l=null,d.clearRect(0,0,r.width,r.height),_.clear(),a(),t()}s=x.frame(function t(){!o||r.width===i.width&&r.height===i.height||(r.width=e.width=i.width,r.height=e.height=i.height),r.width||r.height||(n(e),r.width=e.width,r.height=e.height),d.clearRect(0,0,r.width,r.height),(c=c.filter(function(e){return k(d,e)})).length?s=x.frame(t):u()}),l=u});return{addFettis:function(e){return c=c.concat(e),p},canvas:e,promise:p,reset:function(){s&&x.cancel(s),l&&l()}}}(e,I,h,n,a),r.promise)}function y(t){var o=d||T(t,"disableForReducedMotion",Boolean),i=T(t,"zIndex",Number);if(o&&g)return u(function(e){e()});s&&r?e=r.canvas:s&&!e&&(e=function(e){var t=document.createElement("canvas");return t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.pointerEvents="none",t.style.zIndex=e,t}(i),document.body.appendChild(e)),l&&!f&&h(e);var a={width:e.width,height:e.height};function y(){if(p){var t={getBoundingClientRect:function(){if(!s)return e.getBoundingClientRect()}};return h(t),void p.postMessage({resize:{width:t.width,height:t.height}})}a.width=a.height=null}function v(){r=null,l&&(c=!1,n.removeEventListener("resize",y)),s&&e&&(document.body.contains(e)&&document.body.removeChild(e),e=null,f=!1)}return p&&!f&&p.init(e),f=!0,p&&(e.__confetti_initialized=!0),l&&!c&&(c=!0,n.addEventListener("resize",y,!1)),p?p.fire(t,a,v):m(t,a,v)}return y.reset=function(){p&&p.reset(),r&&r.reset()},y}function R(){return v||(v=$(null,{useWorker:!0,resize:!0})),v}r.exports=function(){return R().apply(this,arguments)},r.exports.reset=function(){R().reset()},r.exports.create=$,r.exports.shapeFromPath=function(e){if(!s)throw new Error("path confetti are not supported in this browser");var t,n;"string"==typeof e?t=e:(t=e.path,n=e.matrix);var r=new Path2D(t),o=document.createElement("canvas").getContext("2d");if(!n){for(var i,a,l=1e3,u=l,c=l,d=0,p=0,h=0;h<l;h+=2)for(var f=0;f<l;f+=2)o.isPointInPath(r,h,f,"nonzero")&&(u=Math.min(u,h),c=Math.min(c,f),d=Math.max(d,h),p=Math.max(p,f));i=d-u,a=p-c;var g=Math.min(10/i,10/a);n=[g,0,0,g,-Math.round(i/2+u)*g,-Math.round(a/2+c)*g]}return{type:"path",path:t,matrix:n}},r.exports.shapeFromText=function(e){var t,n=1,r="#000000",o='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';"string"==typeof e?t=e:(t=e.text,n="scalar"in e?e.scalar:n,o="fontFamily"in e?e.fontFamily:o,r="color"in e?e.color:r);var i=10*n,a=i+"px "+o,s=new OffscreenCanvas(i,i),l=s.getContext("2d");l.font=a;var u=l.measureText(t),c=Math.ceil(u.actualBoundingBoxRight+u.actualBoundingBoxLeft),d=Math.ceil(u.actualBoundingBoxAscent+u.actualBoundingBoxDescent),p=u.actualBoundingBoxLeft+2,h=u.actualBoundingBoxAscent+2;c+=4,d+=4,(l=(s=new OffscreenCanvas(c,d)).getContext("2d")).font=a,l.fillStyle=r,l.fillText(t,p,h);var f=1/n;return{type:"bitmap",bitmap:s.transferToImageBitmap(),matrix:[f,0,0,f,-c*f/2,-d*f/2]}}}(function(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:this||{}}(),module$1,!1);var confetti=exports("j7",module$1.exports);function useBottomConfetti(e,t){var n=confetti;onMounted(function(){"undefined"!=typeof window&&(n=confetti)}),onBeforeUnmount(function(){});return{trigger:function(e){var t=_objectSpread(_objectSpread({particleCount:500,spread:80,startVelocity:120,gravity:1,ticks:300,angle:90,origin:{x:.5,y:1}},{}),e||{});return n(t)},stream:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e3,t=arguments.length>1?arguments[1]:void 0;return new Promise(function(r){var o=Date.now()+e,i=function(){n(_objectSpread(_objectSpread({particleCount:8,angle:90,spread:70,origin:{x:.5,y:1}},{}),t?t():{})),Date.now()<o?requestAnimationFrame(i):r()};i()})}}}module$1.exports.create;var ActionType=function(e){return e.CLICK="click",e.DBL_CLICK="dblClick",e.RIGHT_CLICK="rightClick",e.HOVER="hover",e.TOOLTIP="tooltip",e.FOCUS="focus",e.INPUT="input",e.SCROLL="scroll",e.DRAG="drag",e.WAIT="wait",e.WAIT_FOR="waitFor",e.RUN_FN="runFn",e}(ActionType||{}),DEFAULT_OPTIONS$1={points:60,curvature:.3,noise:.08};function generateControlPoints(e,t,n){var r=t.x-e.x,o=t.y-e.y,i=Math.sqrt(r*r+o*o),a=-o/i,s=r/i,l=2*(Math.random()-.5)*n*i;return[{x:e.x+.3*r+a*l,y:e.y+.3*o+s*l},{x:e.x+.7*r+a*l*.8,y:e.y+.7*o+s*l*.8}]}function cubicBezier(e,t,n,r,o){var i=1-e,a=i*i,s=a*i,l=e*e,u=l*e;return{x:s*t.x+3*a*e*n.x+3*i*l*r.x+u*o.x,y:s*t.y+3*a*e*n.y+3*i*l*r.y+u*o.y}}function addPointNoise(e,t,n){if(0===t)return e;var r=n*t*.05;return{x:e.x+(Math.random()-.5)*r,y:e.y+(Math.random()-.5)*r}}function generateMousePath(e,t,n){var r=_objectSpread(_objectSpread({},DEFAULT_OPTIONS$1),n),o=r.points,i=r.curvature,a=r.noise,s=t.x-e.x,l=t.y-e.y,u=Math.sqrt(s*s+l*l);if(u<2)return[e,t];for(var c=_slicedToArray(generateControlPoints(e,t,i),2),d=c[0],p=c[1],h=Math.max(20,Math.min(o,Math.floor(u/5))),f=[],g=0;g<=h;g++){var m=addPointNoise(cubicBezier(easeInOutCubic(g/h),e,d,p,t),a,u);f.push(m)}return f[f.length-1]=_objectSpread({},t),f}function easeInOutCubic(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2}function calculateStepDuration(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=t.x-e.x,o=t.y-e.y,i=.4*Math.sqrt(r*r+o*o);return Math.max(5,i/Math.max(.1,n))}function queryElementByString(e){if(e.startsWith("/")||e.startsWith("("))try{return document.evaluate(e,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}catch(t){return null}return document.querySelector(e)}function findElement(e){var t=null;if("string"==typeof e){if(!(t=queryElementByString(e)))throw new Error('UIAutomator: 找不到元素 "'.concat(e,'"'))}else{if(!(e instanceof Element))throw new Error("UIAutomator: 无效的 selector 类型");t=e}return t}function tryFindElement(e){try{return findElement(e)}catch(t){return null}}function isVisible(e){var t=window.getComputedStyle(e);if("none"===t.display||"hidden"===t.visibility||0===parseFloat(t.opacity))return!1;var n=e.getBoundingClientRect();return n.width>0||n.height>0}function isInViewport(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function getElementRect(e){var t=e.getBoundingClientRect();return{x:t.left+window.scrollX,y:t.top+window.scrollY,width:t.width,height:t.height,centerX:t.left+t.width/2,centerY:t.top+t.height/2}}function getElementCenter(e){var t=e.getBoundingClientRect();return{x:t.left+t.width/2,y:t.top+t.height/2}}function scrollIntoViewIfNeeded(e){isInViewport(e)||e.scrollIntoView({behavior:"smooth",block:"center"})}function dispatchMouseEvent(e,t){var n=new MouseEvent(t,_objectSpread({bubbles:!0,cancelable:!0,view:window,button:0,buttons:1},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}));e.dispatchEvent(n)}function dispatchKeyEvent(e,t,n){var r,o,i,a,s,l,u,c=new KeyboardEvent(t,{bubbles:!0,cancelable:!0,view:window,key:n.key,code:null!==(r=n.code)&&void 0!==r?r:"Key".concat(n.key.toUpperCase()),keyCode:null!==(o=n.keyCode)&&void 0!==o?o:n.key.charCodeAt(0),charCode:"keypress"===t?null!==(i=n.charCode)&&void 0!==i?i:n.key.charCodeAt(0):0,ctrlKey:null!==(a=n.ctrlKey)&&void 0!==a&&a,altKey:null!==(s=n.altKey)&&void 0!==s&&s,shiftKey:null!==(l=n.shiftKey)&&void 0!==l&&l,metaKey:null!==(u=n.metaKey)&&void 0!==u&&u});e.dispatchEvent(c)}function getNativeInputSetter(e){var t=e instanceof HTMLTextAreaElement?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value");return null!=n&&n.set?n.set.bind(e):null}function dispatchInputEvent(e){e.dispatchEvent(new Event("input",{bubbles:!0}))}function dispatchChangeEvent(e){e.dispatchEvent(new Event("change",{bubbles:!0}))}function focusElement(e){e.focus({preventScroll:!0})}function blurElement(e){e.blur()}function sleep(e){return new Promise(function(t){return setTimeout(t,e)})}function randomDelay(e){var t=_slicedToArray(e,2),n=t[0],r=t[1];return sleep(Math.floor(Math.random()*(r-n+1))+n)}function addNoise(e){var t=e*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:.2);return Math.max(0,e+(2*Math.random()-1)*t)}var DEFAULT_WAIT_OPTIONS={timeout:1e4,interval:100,visible:!0};function waitForElement(e,t){var n=_objectSpread(_objectSpread({},DEFAULT_WAIT_OPTIONS),t),r=n.timeout,o=n.interval,i=n.visible;return new Promise(function(t,n){var a=null,s=null,l=null,u=function(){a&&(a.disconnect(),a=null),null!==s&&(clearTimeout(s),s=null),null!==l&&(clearInterval(l),l=null)},c=function(){var n=queryElement(e);if(i){if(n&&isElementVisible(n))return u(),t(n),!0}else if(!n||!isElementVisible(n))return u(),t(null),!0;return!1};if(!c()){s=setTimeout(function(){u(),n(new Error('waitForElement: 等待 "'.concat(e,'" ').concat(i?"出现":"消失"," 超时(").concat(r,"ms)")))},r);try{(a=new MutationObserver(function(){c()})).observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class","hidden"]})}catch(d){a=null,l=setInterval(function(){c()},o)}}})}function waitForCondition(e,t){var n=_objectSpread(_objectSpread({},DEFAULT_WAIT_OPTIONS),t),r=n.timeout,o=n.interval;return new Promise(function(t,n){var i=null,a=null,s=function(){null!==i&&clearTimeout(i),null!==a&&clearInterval(a)},l=function(){var r=_asyncToGenerator(_regenerator().m(function r(){var o;return _regenerator().w(function(r){for(;;)switch(r.p=r.n){case 0:return r.p=0,r.n=1,e();case 1:r.v&&(s(),t()),r.n=3;break;case 2:r.p=2,o=r.v,s(),n(o);case 3:return r.a(2)}},r,null,[[0,2]])}));return function(){return r.apply(this,arguments)}}();i=setTimeout(function(){s(),n(new Error("waitForCondition: 条件等待超时(".concat(r,"ms)")))},r),a=setInterval(l,o),l()})}function queryElement(e){return e.startsWith("/")||e.startsWith("(")?document.evaluate(e,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue:document.querySelector(e)}function isElementVisible(e){var t=window.getComputedStyle(e);if("none"===t.display||"hidden"===t.visibility||"0"===t.opacity)return!1;var n=e.getBoundingClientRect();return n.width>0||n.height>0}var currentPosition={x:0,y:0};function getCurrentMousePosition(){return _objectSpread({},currentPosition)}function setCurrentMousePosition(e){currentPosition=_objectSpread({},e)}var MouseSimulator=function(){return _createClass(function e(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,e),_defineProperty2(this,"speed",void 0),_defineProperty2(this,"debug",void 0),_defineProperty2(this,"visualCursor",null),this.speed=null!==(t=r.speed)&&void 0!==t?t:1,this.debug=null!==(n=r.debug)&&void 0!==n&&n},[{key:"setVisualCursor",value:function(e){this.visualCursor=e}},{key:"log",value:function(){this.debug}},{key:"moveTo",value:(a=_asyncToGenerator(_regenerator().m(function e(t,n,r){var o,i,a,s,l,u,c,d,p;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:i=_objectSpread({},currentPosition),a={x:t,y:n},this.log("移动鼠标 (".concat(i.x.toFixed(0),", ").concat(i.y.toFixed(0),") → (").concat(a.x.toFixed(0),", ").concat(a.y.toFixed(0),")")),s=generateMousePath(i,a,r),l=1;case 1:if(!(l<s.length)){e.n=3;break}if(c=s[l],d=s[l-1],dispatchMouseEvent(document,"mousemove",{clientX:Math.round(c.x),clientY:Math.round(c.y),screenX:Math.round(c.x),screenY:Math.round(c.y)}),currentPosition={x:Math.round(c.x),y:Math.round(c.y)},null===(u=this.visualCursor)||void 0===u||u.setPosition(Math.round(c.x),Math.round(c.y)),!((p=calculateStepDuration(d,c,this.speed))>2)){e.n=2;break}return e.n=2,sleep(p);case 2:l++,e.n=1;break;case 3:currentPosition={x:Math.round(a.x),y:Math.round(a.y)},null===(o=this.visualCursor)||void 0===o||o.setPosition(Math.round(a.x),Math.round(a.y));case 4:return e.a(2)}},e,this)})),function(e,t,n){return a.apply(this,arguments)})},{key:"moveToElement",value:(i=_asyncToGenerator(_regenerator().m(function e(t,n){var r,o,i;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return scrollIntoViewIfNeeded(o=findElement(t)),e.n=1,sleep(50);case 1:return null===(r=this.visualCursor)||void 0===r||r.highlightElement(o),i=getElementCenter(o),e.n=2,this.moveTo(i.x,i.y,n);case 2:return e.a(2,o)}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"click",value:(o=_asyncToGenerator(_regenerator().m(function e(t){var n,r,o,i,a,s;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return this.log("单击 ".concat(String(t))),e.n=1,this.moveToElement(t);case 1:return i=e.v,a=getElementCenter(i),s={clientX:Math.round(a.x),clientY:Math.round(a.y),screenX:Math.round(a.x),screenY:Math.round(a.y)},dispatchMouseEvent(i,"mouseenter",_objectSpread(_objectSpread({},s),{},{bubbles:!1})),dispatchMouseEvent(i,"mouseover",s),dispatchMouseEvent(i,"mousedown",_objectSpread(_objectSpread({},s),{},{buttons:1})),null===(n=this.visualCursor)||void 0===n||n.animatePress(),e.n=2,sleep(50+70*Math.random());case 2:return dispatchMouseEvent(i,"mouseup",_objectSpread(_objectSpread({},s),{},{buttons:0})),dispatchMouseEvent(i,"click",_objectSpread(_objectSpread({},s),{},{buttons:0})),null===(r=this.visualCursor)||void 0===r||r.animateRelease(),e.n=3,sleep(200);case 3:null===(o=this.visualCursor)||void 0===o||o.hideHighlight(),this.log("单击完成");case 4:return e.a(2)}},e,this)})),function(e){return o.apply(this,arguments)})},{key:"dblClick",value:(r=_asyncToGenerator(_regenerator().m(function e(t){var n,r,o,i,a,s,l,u;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return this.log("双击 ".concat(String(t))),e.n=1,this.moveToElement(t);case 1:return s=e.v,l=getElementCenter(s),u={clientX:Math.round(l.x),clientY:Math.round(l.y),screenX:Math.round(l.x),screenY:Math.round(l.y)},dispatchMouseEvent(s,"mousedown",_objectSpread(_objectSpread({},u),{},{buttons:1})),null===(n=this.visualCursor)||void 0===n||n.animatePress(),e.n=2,sleep(50+50*Math.random());case 2:return dispatchMouseEvent(s,"mouseup",_objectSpread(_objectSpread({},u),{},{buttons:0})),dispatchMouseEvent(s,"click",u),null===(r=this.visualCursor)||void 0===r||r.animateRelease(),e.n=3,sleep(80+60*Math.random());case 3:return dispatchMouseEvent(s,"mousedown",_objectSpread(_objectSpread({},u),{},{buttons:1})),null===(o=this.visualCursor)||void 0===o||o.animatePress(),e.n=4,sleep(50+50*Math.random());case 4:return dispatchMouseEvent(s,"mouseup",_objectSpread(_objectSpread({},u),{},{buttons:0})),dispatchMouseEvent(s,"click",u),dispatchMouseEvent(s,"dblclick",u),null===(i=this.visualCursor)||void 0===i||i.animateRelease(),e.n=5,sleep(200);case 5:null===(a=this.visualCursor)||void 0===a||a.hideHighlight(),this.log("双击完成");case 6:return e.a(2)}},e,this)})),function(e){return r.apply(this,arguments)})},{key:"rightClick",value:(n=_asyncToGenerator(_regenerator().m(function e(t){var n,r,o,i,a,s;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return this.log("右键点击 ".concat(String(t))),e.n=1,this.moveToElement(t);case 1:return i=e.v,a=getElementCenter(i),s={clientX:Math.round(a.x),clientY:Math.round(a.y),screenX:Math.round(a.x),screenY:Math.round(a.y),button:2,buttons:2},dispatchMouseEvent(i,"mousedown",s),null===(n=this.visualCursor)||void 0===n||n.animatePress(),e.n=2,sleep(50+50*Math.random());case 2:return dispatchMouseEvent(i,"mouseup",s),dispatchMouseEvent(i,"contextmenu",s),null===(r=this.visualCursor)||void 0===r||r.animateRelease(),e.n=3,sleep(200);case 3:null===(o=this.visualCursor)||void 0===o||o.hideHighlight(),this.log("右键点击完成");case 4:return e.a(2)}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"hover",value:(t=_asyncToGenerator(_regenerator().m(function e(t){var n,r,o,i,a,s=arguments;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return r=s.length>1&&void 0!==s[1]?s[1]:1e3,this.log("悬停 ".concat(String(t)," ").concat(r,"ms")),e.n=1,this.moveToElement(t);case 1:return o=e.v,i=getElementCenter(o),a={clientX:Math.round(i.x),clientY:Math.round(i.y),screenX:Math.round(i.x),screenY:Math.round(i.y)},dispatchMouseEvent(o,"mouseenter",_objectSpread(_objectSpread({},a),{},{bubbles:!1})),dispatchMouseEvent(o,"mouseover",a),e.n=2,sleep(r);case 2:dispatchMouseEvent(o,"mouseout",a),dispatchMouseEvent(o,"mouseleave",_objectSpread(_objectSpread({},a),{},{bubbles:!1})),null===(n=this.visualCursor)||void 0===n||n.hideHighlight(),this.log("悬停结束");case 3:return e.a(2)}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"drag",value:(e=_asyncToGenerator(_regenerator().m(function e(t,n){var r,o,i,a,s,l,u,c,d,p,h,f,g,m,y,v,_,x,S,b=arguments;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return a=b.length>2&&void 0!==b[2]?b[2]:600,this.log("拖拽 ".concat(String(t)," → ").concat(String(n))),e.n=1,this.moveToElement(t);case 1:return s=e.v,l=getElementCenter(s),u={clientX:Math.round(l.x),clientY:Math.round(l.y),screenX:Math.round(l.x),screenY:Math.round(l.y),buttons:1},dispatchMouseEvent(s,"mousedown",_objectSpread(_objectSpread({},u),{},{button:0})),dispatchMouseEvent(s,"dragstart",_objectSpread(_objectSpread({},u),{},{button:0})),null===(r=this.visualCursor)||void 0===r||r.animatePress(),e.n=2,sleep(50);case 2:scrollIntoViewIfNeeded(c=findElement(n)),d=getElementCenter(c),p={x:l.x,y:l.y},h={x:d.x,y:d.y},f=generateMousePath(p,h,{points:40,curvature:.2}),g=a/f.length,m=_createForOfIteratorHelper(f),e.p=3,m.s();case 4:if((y=m.n()).done){e.n=6;break}return _=y.value,dispatchMouseEvent(document,"mousemove",{clientX:Math.round(_.x),clientY:Math.round(_.y),screenX:Math.round(_.x),screenY:Math.round(_.y),buttons:1}),dispatchMouseEvent(s,"drag",{clientX:Math.round(_.x),clientY:Math.round(_.y)}),currentPosition=_,null===(v=this.visualCursor)||void 0===v||v.setPosition(Math.round(_.x),Math.round(_.y)),e.n=5,sleep(g);case 5:e.n=4;break;case 6:e.n=8;break;case 7:e.p=7,S=e.v,m.e(S);case 8:return e.p=8,m.f(),e.f(8);case 9:x={clientX:Math.round(d.x),clientY:Math.round(d.y),screenX:Math.round(d.x),screenY:Math.round(d.y)},dispatchMouseEvent(c,"dragover",x),dispatchMouseEvent(c,"drop",x),dispatchMouseEvent(document,"mouseup",_objectSpread(_objectSpread({},x),{},{buttons:0})),dispatchMouseEvent(s,"dragend",x),null===(o=this.visualCursor)||void 0===o||o.animateRelease(),currentPosition={x:Math.round(d.x),y:Math.round(d.y)},null===(i=this.visualCursor)||void 0===i||i.hideHighlight(),this.log("拖拽完成");case 10:return e.a(2)}},e,this,[[3,7,8,9]])})),function(t,n){return e.apply(this,arguments)})}]);var e,t,n,r,o,i,a}(),SPECIAL_KEYS={Backspace:{key:"Backspace",code:"Backspace",keyCode:8},Tab:{key:"Tab",code:"Tab",keyCode:9},Enter:{key:"Enter",code:"Enter",keyCode:13},Escape:{key:"Escape",code:"Escape",keyCode:27},Delete:{key:"Delete",code:"Delete",keyCode:46},ArrowLeft:{key:"ArrowLeft",code:"ArrowLeft",keyCode:37},ArrowRight:{key:"ArrowRight",code:"ArrowRight",keyCode:39},ArrowUp:{key:"ArrowUp",code:"ArrowUp",keyCode:38},ArrowDown:{key:"ArrowDown",code:"ArrowDown",keyCode:40},Home:{key:"Home",code:"Home",keyCode:36},End:{key:"End",code:"End",keyCode:35}},InputSimulator=function(){return _createClass(function e(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,e),_defineProperty2(this,"defaultSpeed",void 0),_defineProperty2(this,"debug",void 0),this.defaultSpeed=null!==(t=r.speed)&&void 0!==t?t:80,this.debug=null!==(n=r.debug)&&void 0!==n&&n},[{key:"log",value:function(){this.debug}},{key:"getInputElement",value:function(e){var t=findElement(e);if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))throw new Error('UIAutomator: 元素 "'.concat(String(e),'" 不是可输入元素'));return t}},{key:"setNativeValue",value:function(e,t){var n=getNativeInputSetter(e);n?n(t):e.value=t}},{key:"clear",value:function(e){this.setNativeValue(e,""),dispatchInputEvent(e),this.log("清空输入框")}},{key:"type",value:(r=_asyncToGenerator(_regenerator().m(function e(t,n){var r,o,i,a,s,l,u,c,d,p,h,f,g,m,y,v,_=arguments;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return o=(r=_.length>2&&void 0!==_[2]?_[2]:{}).speed,i=r.clear,a=void 0!==i&&i,s=r.typeMode,l=void 0===s||s,u=null!=o?o:this.defaultSpeed,this.log('输入文本 "'.concat(n,'" 到 ').concat(String(t))),focusElement(c=this.getInputElement(t)),e.n=1,sleep(30);case 1:if(!a){e.n=2;break}return this.clear(c),e.n=2,sleep(50);case 2:if(l){e.n=4;break}return e.n=3,this.setValue(t,n,a?"":void 0);case 3:return e.a(2);case 4:d=c.value,p=_createForOfIteratorHelper(n),e.p=5,p.s();case 6:if((h=p.n()).done){e.n=8;break}return f=h.value,m=(g=f in SPECIAL_KEYS)?SPECIAL_KEYS[f]:{key:f,code:"Key".concat(f.toUpperCase()),keyCode:f.charCodeAt(0)},dispatchKeyEvent(c,"keydown",{key:m.key,code:m.code,keyCode:m.keyCode}),g||dispatchKeyEvent(c,"keypress",{key:m.key,code:m.code,keyCode:m.keyCode,charCode:f.charCodeAt(0)}),"Backspace"===f?d=d.slice(0,-1):g||(d+=f),this.setNativeValue(c,d),dispatchInputEvent(c),dispatchKeyEvent(c,"keyup",{key:m.key,code:m.code,keyCode:m.keyCode}),y=addNoise(u,.25),e.n=7,sleep(y);case 7:e.n=6;break;case 8:e.n=10;break;case 9:e.p=9,v=e.v,p.e(v);case 10:return e.p=10,p.f(),e.f(10);case 11:dispatchChangeEvent(c),this.log('输入完成,最终值: "'.concat(c.value,'"'));case 12:return e.a(2)}},e,this,[[5,9,10,11]])})),function(e,t){return r.apply(this,arguments)})},{key:"setValue",value:(n=_asyncToGenerator(_regenerator().m(function e(t,n,r){var o;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(this.log('直接设置值 "'.concat(n,'" 到 ').concat(String(t))),focusElement(o=this.getInputElement(t)),void 0===r){e.n=1;break}return this.setNativeValue(o,r),dispatchInputEvent(o),e.n=1,sleep(20);case 1:this.setNativeValue(o,n),dispatchInputEvent(o),dispatchChangeEvent(o),this.log("设置值完成");case 2:return e.a(2)}},e,this)})),function(e,t,r){return n.apply(this,arguments)})},{key:"paste",value:(t=_asyncToGenerator(_regenerator().m(function e(t,n){var r,o,i,a,s,l,u,c,d;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return this.log('粘贴文本 "'.concat(n,'" 到 ').concat(String(t))),focusElement(r=this.getInputElement(t)),e.n=1,sleep(30);case 1:(o=new DataTransfer).setData("text/plain",n),i=new ClipboardEvent("paste",{bubbles:!0,cancelable:!0,clipboardData:o}),!r.dispatchEvent(i)||(l=r.value,u=null!==(a=r.selectionStart)&&void 0!==a?a:l.length,c=null!==(s=r.selectionEnd)&&void 0!==s?s:l.length,d=l.slice(0,u)+n+l.slice(c),this.setNativeValue(r,d),dispatchInputEvent(r),dispatchChangeEvent(r)),this.log("粘贴完成");case 2:return e.a(2)}},e,this)})),function(e,n){return t.apply(this,arguments)})},{key:"pressKey",value:(e=_asyncToGenerator(_regenerator().m(function e(t,n){var r,o,i;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return this.log("按键 ".concat(n," 到 ").concat(String(t))),focusElement(o=findElement(t)),i=null!==(r=SPECIAL_KEYS[n])&&void 0!==r?r:{key:n,code:"Key".concat(n.toUpperCase()),keyCode:n.charCodeAt(0)},dispatchKeyEvent(o,"keydown",i),"Enter"===n&&o.dispatchEvent(new Event("submit",{bubbles:!0})),e.n=1,sleep(50);case 1:dispatchKeyEvent(o,"keyup",i);case 2:return e.a(2)}},e,this)})),function(t,n){return e.apply(this,arguments)})}]);var e,t,n,r}(),DEFAULT_OPTIONS={enabled:!0,color:"auto",size:20,showRipple:!0,showHighlight:!0,zIndex:999999};function resolveThemeColor(e){return"auto"!==e?e:getComputedStyle(document.documentElement).getPropertyValue("--el-color-primary").trim()||"#409eff"}var VisualCursor=function(){return _createClass(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,e),_defineProperty2(this,"options",void 0),_defineProperty2(this,"cursorEl",null),_defineProperty2(this,"rippleContainer",null),_defineProperty2(this,"highlightEl",null),_defineProperty2(this,"mounted",!1),_defineProperty2(this,"resolvedColor","#409eff"),this.options=_objectSpread(_objectSpread({},DEFAULT_OPTIONS),t)},[{key:"mount",value:function(){!this.mounted&&this.options.enabled&&(this.resolvedColor=resolveThemeColor(this.options.color),this.cursorEl=this.createCursorElement(),document.body.appendChild(this.cursorEl),this.rippleContainer=document.createElement("div"),this.rippleContainer.id="ui-automator-ripple-container",this.rippleContainer.style.cssText="position:fixed;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:".concat(this.options.zIndex+1,";"),document.body.appendChild(this.rippleContainer),this.options.showHighlight&&(this.highlightEl=this.createHighlightElement(),document.body.appendChild(this.highlightEl)),this.mounted=!0)}},{key:"unmount",value:function(){var e,t,n;this.mounted&&(null===(e=this.cursorEl)||void 0===e||e.remove(),null===(t=this.rippleContainer)||void 0===t||t.remove(),null===(n=this.highlightEl)||void 0===n||n.remove(),this.cursorEl=null,this.rippleContainer=null,this.highlightEl=null,this.mounted=!1)}},{key:"show",value:function(){this.cursorEl&&(this.cursorEl.style.opacity="1",this.cursorEl.style.transform="scale(1)")}},{key:"getColor",value:function(){return this.resolvedColor}},{key:"hide",value:function(){this.cursorEl&&(this.cursorEl.style.opacity="0",this.cursorEl.style.transform="scale(0.5)")}},{key:"setPosition",value:function(e,t){this.cursorEl&&(this.cursorEl.style.left="".concat(e,"px"),this.cursorEl.style.top="".concat(t,"px"))}},{key:"smoothMoveTo",value:(e=_asyncToGenerator(_regenerator().m(function e(t,n){var r,o=arguments;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(r=o.length>2&&void 0!==o[2]?o[2]:300,this.cursorEl){e.n=1;break}return e.a(2);case 1:return this.cursorEl.style.transition="left ".concat(r,"ms cubic-bezier(0.33, 1, 0.68, 1), top ").concat(r,"ms cubic-bezier(0.33, 1, 0.68, 1)"),this.cursorEl.style.left="".concat(t,"px"),this.cursorEl.style.top="".concat(n,"px"),e.n=2,new Promise(function(e){return setTimeout(e,r)});case 2:this.cursorEl.style.transition="none";case 3:return e.a(2)}},e,this)})),function(t,n){return e.apply(this,arguments)})},{key:"animatePress",value:function(){this.cursorEl&&(this.cursorEl.style.transition="transform 0.1s ease",this.cursorEl.style.transform="scale(0.75)")}},{key:"animateRelease",value:function(){if(this.cursorEl&&(this.cursorEl.style.transition="transform 0.15s ease",this.cursorEl.style.transform="scale(1)",this.options.showRipple)){var e=parseFloat(this.cursorEl.style.left)||0,t=parseFloat(this.cursorEl.style.top)||0;this.createRipple(e,t)}}},{key:"createRipple",value:function(e,t){if(this.rippleContainer){var n=document.createElement("div");n.style.cssText="\n      position: fixed;\n      left: ".concat(e-20,"px;\n      top: ").concat(t-20,"px;\n      width: ").concat(40,"px;\n      height: ").concat(40,"px;\n      border-radius: 50%;\n      background: ").concat(this.resolvedColor,";\n      opacity: 0.4;\n      pointer-events: none;\n      animation: ui-automator-ripple 0.6s ease-out forwards;\n    "),this.rippleContainer.appendChild(n),setTimeout(function(){return n.remove()},650)}}},{key:"highlightElement",value:function(e){if(this.highlightEl&&this.options.showHighlight){var t=e.getBoundingClientRect();this.highlightEl.style.left="".concat(t.left-4,"px"),this.highlightEl.style.top="".concat(t.top-4,"px"),this.highlightEl.style.width="".concat(t.width+8,"px"),this.highlightEl.style.height="".concat(t.height+8,"px"),this.highlightEl.style.opacity="1"}}},{key:"hideHighlight",value:function(){this.highlightEl&&(this.highlightEl.style.opacity="0")}},{key:"createCursorElement",value:function(){var e=document.createElement("div");e.id="ui-automator-cursor";var t=this.options.size;return e.style.cssText="\n      position: fixed;\n      left: -100px;\n      top: -100px;\n      width: ".concat(t,"px;\n      height: ").concat(t,"px;\n      z-index: ").concat(this.options.zIndex,";\n      pointer-events: none;\n      transform: scale(1);\n      transition: none;\n      filter: drop-shadow(1px 2px 3px rgba(0,0,0,0.3));\n    "),e.innerHTML='\n      <svg width="'.concat(t,'" height="').concat(t,'" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n        <path d="M5 3L19 12L12 13L9 20L5 3Z" fill="').concat(this.resolvedColor,'" stroke="#fff" stroke-width="1.5" stroke-linejoin="round"/>\n      </svg>\n    '),e}},{key:"createHighlightElement",value:function(){var e=document.createElement("div");return e.id="ui-automator-highlight",e.style.cssText="\n      position: fixed;\n      left: 0;\n      top: 0;\n      width: 0;\n      height: 0;\n      border: 2px solid ".concat(this.resolvedColor,";\n      border-radius: 4px;\n      background: ").concat(this.resolvedColor,"15;\n      pointer-events: none;\n      z-index: ").concat(this.options.zIndex-1,";\n      opacity: 0;\n      transition: all 0.25s ease, opacity 0.2s ease;\n      box-shadow: 0 0 0 1px ").concat(this.resolvedColor,"30;\n    "),e}}],[{key:"injectStyles",value:function(){var e="ui-automator-visual-styles";if(!document.getElementById(e)){var t=document.createElement("style");t.id=e,t.textContent="\n      @keyframes ui-automator-ripple {\n        0% {\n          transform: scale(0.5);\n          opacity: 0.4;\n        }\n        100% {\n          transform: scale(2.5);\n          opacity: 0;\n        }\n      }\n      @keyframes ui-automator-pulse {\n        0%, 100% { box-shadow: 0 0 0 0 currentColor; }\n        50% { box-shadow: 0 0 0 6px transparent; }\n      }\n    ",document.head.appendChild(t)}}}]);var e}(),UIAutomator=function(){return _createClass(function e(){var t,n,r,o,i,a,s,l,u,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,e),_defineProperty2(this,"options",void 0),_defineProperty2(this,"mouse",void 0),_defineProperty2(this,"keyboard",void 0),_defineProperty2(this,"visualCursor",void 0),_defineProperty2(this,"queue",[]),_defineProperty2(this,"state","idle"),_defineProperty2(this,"resumeResolver",null),_defineProperty2(this,"listeners",new Map),this.options={humanize:null===(t=c.humanize)||void 0===t||t,humanizeRange:null!==(n=c.humanizeRange)&&void 0!==n?n:[60,180],mouseSpeed:null!==(r=c.mouseSpeed)&&void 0!==r?r:1,inputSpeed:null!==(o=c.inputSpeed)&&void 0!==o?o:80,debug:null!==(i=c.debug)&&void 0!==i&&i,maxRetries:null!==(a=c.maxRetries)&&void 0!==a?a:10,retryInterval:null!==(s=c.retryInterval)&&void 0!==s?s:2e3,onError:null!==(l=c.onError)&&void 0!==l?l:null},this.visualCursor=new VisualCursor(null!==(u=c.cursor)&&void 0!==u?u:{enabled:!0}),VisualCursor.injectStyles(),this.mouse=new MouseSimulator({speed:this.options.mouseSpeed,debug:this.options.debug}),this.mouse.setVisualCursor(this.visualCursor),this.keyboard=new InputSimulator({speed:this.options.inputSpeed,debug:this.options.debug})},[{key:"log",value:function(){this.options.debug}},{key:"on",value:function(e,t){return this.listeners.has(e)||this.listeners.set(e,[]),this.listeners.get(e).push(t),this}},{key:"off",value:function(e,t){var n=this.listeners.get(e);if(n){var r=n.indexOf(t);-1!==r&&n.splice(r,1)}return this}},{key:"emit",value:function(e,t){var n;null===(n=this.listeners.get(e))||void 0===n||n.forEach(function(e){return e(t)})}},{key:"click",value:function(e,t){return this.queue.push({type:ActionType.CLICK,selector:e,delay:t}),this}},{key:"dblClick",value:function(e){return this.queue.push({type:ActionType.DBL_CLICK,selector:e}),this}},{key:"rightClick",value:function(e){return this.queue.push({type:ActionType.RIGHT_CLICK,selector:e}),this}},{key:"hover",value:function(e,t){return this.queue.push({type:ActionType.HOVER,selector:e,duration:t}),this}},{key:"tooltip",value:function(e,t,n,r){return this.queue.push({type:ActionType.TOOLTIP,selector:e,text:t,duration:n,placement:r}),this}},{key:"focus",value:function(e){return this.queue.push({type:ActionType.FOCUS,selector:e}),this}},{key:"input",value:function(e,t,n){return this.queue.push({type:ActionType.INPUT,selector:e,text:t,options:n}),this}},{key:"scroll",value:function(e,t,n){return this.queue.push({type:ActionType.SCROLL,selector:e,target:t,container:n}),this}},{key:"drag",value:function(e,t,n){return this.queue.push({type:ActionType.DRAG,fromSelector:e,toSelector:t,duration:n}),this}},{key:"wait",value:function(e){return this.queue.push({type:ActionType.WAIT,duration:e}),this}},{key:"waitFor",value:function(e,t){return this.queue.push({type:ActionType.WAIT_FOR,selector:e,options:t}),this}},{key:"exec",value:function(e,t){return this.queue.push({type:ActionType.RUN_FN,fn:e,label:t}),this}},{key:"run",value:function(e,t){return"function"==typeof e?(this.queue.push({type:ActionType.RUN_FN,fn:e,label:t}),this):this._execute()}},{key:"pause",value:function(){"running"===this.state&&(this.state="paused",this.emit("pause"),this.log("已暂停"))}},{key:"resume",value:function(){var e;"paused"===this.state&&(this.state="running",this.emit("resume"),null===(e=this.resumeResolver)||void 0===e||e.call(this),this.resumeResolver=null,this.log("已恢复"))}},{key:"stop",value:function(){var e;this.state="stopped",this.queue=[],null===(e=this.resumeResolver)||void 0===e||e.call(this),this.resumeResolver=null,this.emit("stop"),this.log("已停止")}},{key:"reset",value:function(){return this.state="idle",this.queue=[],this.resumeResolver=null,this.log("已重置"),this}},{key:"getState",value:function(){return this.state}},{key:"getQueueLength",value:function(){return this.queue.length}},{key:"waitForResume",value:function(){var e=this;return new Promise(function(t){e.resumeResolver=t})}},{key:"cleanupCursor",value:(o=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return this.visualCursor.hide(),e.n=1,sleep(300);case 1:this.visualCursor.unmount();case 2:return e.a(2)}},e,this)})),function(){return o.apply(this,arguments)})},{key:"executeAction",value:(r=_asyncToGenerator(_regenerator().m(function e(t){var n,r,o,i,a,s,l,u;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:u=t.type,e.n=u===ActionType.CLICK?1:u===ActionType.DBL_CLICK?4:u===ActionType.RIGHT_CLICK?6:u===ActionType.HOVER?8:u===ActionType.TOOLTIP?10:u===ActionType.FOCUS?12:u===ActionType.INPUT?14:u===ActionType.SCROLL?16:u===ActionType.DRAG?18:u===ActionType.WAIT?20:u===ActionType.WAIT_FOR?22:u===ActionType.RUN_FN?28:30;break;case 1:if(!t.delay){e.n=2;break}return e.n=2,sleep(t.delay);case 2:return e.n=3,this.mouse.click(t.selector);case 3:return e.a(3,31);case 4:return e.n=5,this.mouse.dblClick(t.selector);case 5:return e.a(3,31);case 6:return e.n=7,this.mouse.rightClick(t.selector);case 7:return e.a(3,31);case 8:return e.n=9,this.mouse.hover(t.selector,null!==(n=t.duration)&&void 0!==n?n:1e3);case 9:return e.a(3,31);case 10:return e.n=11,this.executeTooltip(t.selector,t.text,null!==(r=t.duration)&&void 0!==r?r:2e3,null!==(o=t.placement)&&void 0!==o?o:"top");case 11:return e.a(3,31);case 12:return focusElement(findElement(t.selector)),e.n=13,sleep(50);case 13:return e.a(3,31);case 14:return e.n=15,this.keyboard.type(t.selector,t.text,t.options);case 15:return e.a(3,31);case 16:return e.n=17,this.executeScroll(t.selector,t.target,t.container);case 17:return e.a(3,31);case 18:return e.n=19,this.mouse.drag(t.fromSelector,t.toSelector,null!==(i=t.duration)&&void 0!==i?i:600);case 19:return e.a(3,31);case 20:return e.n=21,sleep(t.duration);case 21:return e.a(3,31);case 22:if(a=t.selector,s=t.options,"function"!=typeof a){e.n=24;break}return e.n=23,waitForCondition(a,s);case 23:e.n=27;break;case 24:if("string"!=typeof a){e.n=26;break}return e.n=25,waitForElement(a,s);case 25:e.n=27;break;case 26:return l=a,e.n=27,waitForCondition(function(){var e,t=null===(e=null==s?void 0:s.visible)||void 0===e||e,n=l.getBoundingClientRect().width>0||l.getBoundingClientRect().height>0;return t?n:!n},s);case 27:return e.a(3,31);case 28:return this.log("执行自定义函数".concat(t.label?" [".concat(t.label,"]"):"")),e.n=29,t.fn();case 29:return e.a(3,31);case 30:this.log("未知动作类型,跳过");case 31:return e.a(2)}},e,this)})),function(e){return r.apply(this,arguments)})},{key:"executeTooltip",value:(n=_asyncToGenerator(_regenerator().m(function e(t,n,r,o){var i,a,s,l,u,c,d,p,h,f,g,m,y,v,_;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.mouse.moveToElement(t);case 1:return i=e.v,a=getElementCenter(i),s={clientX:Math.round(a.x),clientY:Math.round(a.y),screenX:Math.round(a.x),screenY:Math.round(a.y)},dispatchMouseEvent(i,"mouseenter",_objectSpread(_objectSpread({},s),{},{bubbles:!1})),dispatchMouseEvent(i,"mouseover",s),l=i.getBoundingClientRect(),u=this.visualCursor.getColor(),(c=document.createElement("div")).setAttribute("data-ui-automator-tooltip",""),Object.assign(c.style,{position:"fixed",zIndex:"2147483647",padding:"6px 12px",background:u,color:"#fff",fontSize:"var(--el-font-size-small, 12px)",lineHeight:"1.6",borderRadius:"var(--el-border-radius-base, 6px)",border:"1px solid ".concat(u),boxShadow:"0 4px 16px ".concat(u,"4d"),pointerEvents:"none",whiteSpace:"nowrap",opacity:"0",transition:"opacity 0.18s ease"}),c.textContent=n,d=document.createElement("div"),p=u,Object.assign(d.style,{position:"absolute",width:"0",height:"0",pointerEvents:"none"}),c.appendChild(d),document.body.appendChild(c),h=10,f=c.offsetWidth,g=c.offsetHeight,m=0,y=0,"top"===o?(m=l.top-g-h,y=l.left+l.width/2-f/2,Object.assign(d.style,{bottom:"-".concat(6,"px"),left:"50%",transform:"translateX(-50%)",borderLeft:"".concat(6,"px solid transparent"),borderRight:"".concat(6,"px solid transparent"),borderTop:"".concat(6,"px solid ").concat(p)})):"bottom"===o?(m=l.bottom+h,y=l.left+l.width/2-f/2,Object.assign(d.style,{top:"-".concat(6,"px"),left:"50%",transform:"translateX(-50%)",borderLeft:"".concat(6,"px solid transparent"),borderRight:"".concat(6,"px solid transparent"),borderBottom:"".concat(6,"px solid ").concat(p)})):"left"===o?(m=l.top+l.height/2-g/2,y=l.left-f-h,Object.assign(d.style,{right:"-".concat(6,"px"),top:"50%",transform:"translateY(-50%)",borderTop:"".concat(6,"px solid transparent"),borderBottom:"".concat(6,"px solid transparent"),borderLeft:"".concat(6,"px solid ").concat(p)})):(m=l.top+l.height/2-g/2,y=l.right+h,Object.assign(d.style,{left:"-".concat(6,"px"),top:"50%",transform:"translateY(-50%)",borderTop:"".concat(6,"px solid transparent"),borderBottom:"".concat(6,"px solid transparent"),borderRight:"".concat(6,"px solid ").concat(p)})),v=window.innerWidth,_=window.innerHeight,y=Math.max(h,Math.min(y,v-f-h)),m=Math.max(h,Math.min(m,_-g-h)),c.style.left="".concat(y,"px"),c.style.top="".concat(m,"px"),requestAnimationFrame(function(){c.style.opacity="1"}),e.n=2,sleep(r);case 2:return c.style.opacity="0",dispatchMouseEvent(i,"mouseout",s),dispatchMouseEvent(i,"mouseleave",_objectSpread(_objectSpread({},s),{},{bubbles:!1})),this.visualCursor.hideHighlight(),e.n=3,sleep(200);case 3:c.remove();case 4:return e.a(2)}},e,this)})),function(e,t,r,o){return n.apply(this,arguments)})},{key:"executeScroll",value:(t=_asyncToGenerator(_regenerator().m(function e(t,n,r){var o,i,a;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return scrollIntoViewIfNeeded(o=findElement(t)),e.n=1,sleep(50);case 1:if(i=r?findElement(r):o,"top"!==n){e.n=2;break}a=0,e.n=6;break;case 2:if("bottom"!==n){e.n=3;break}a=i.scrollHeight-i.clientHeight,e.n=6;break;case 3:if("center"!==n){e.n=4;break}a=(i.scrollHeight-i.clientHeight)/2,e.n=6;break;case 4:if("nearest"!==n){e.n=5;break}return o.scrollIntoView({behavior:"smooth",block:"nearest"}),e.a(2);case 5:a=i.scrollTop+n;case 6:return i.scrollTo({top:a,behavior:"smooth"}),e.n=7,sleep(400);case 7:return e.a(2)}},e)})),function(e,n,r){return t.apply(this,arguments)})},{key:"_execute",value:(e=_asyncToGenerator(_regenerator().m(function e(){var t,n,r,o,i,a,s,l,u;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if("running"!==this.state){e.n=1;break}return this.log("引擎已在运行中"),e.a(2);case 1:this.state="running",t=_toConsumableArray(this.queue),this.queue=[],n=t.length,this.visualCursor.mount(),this.visualCursor.show(),this.log("开始执行,共 ".concat(n," 个动作")),r=0;case 2:if(!(r<t.length)){e.n=20;break}if("stopped"!==this.getState()){e.n=4;break}return this.log("执行已停止"),e.n=3,this.cleanupCursor();case 3:return e.a(2);case 4:if("paused"!==this.getState()){e.n=6;break}return this.log("第 ".concat(r+1," 个动作执行前暂停,等待 resume...")),e.n=5,this.waitForResume();case 5:if("stopped"!==this.getState()){e.n=6;break}return e.a(2);case 6:o=t[r],i={action:o,index:r,total:n},this.log("执行动作 ".concat(r+1,"/").concat(n,": ").concat(o.type)),this.emit("action:start",i),a=!1,s=0,l=null;case 7:if(a||!(s<=this.options.maxRetries)){e.n=15;break}if("stopped"!==this.getState()){e.n=9;break}return this.log("执行已停止 (重试中断)"),e.n=8,this.cleanupCursor();case 8:return e.a(2);case 9:return e.p=9,e.n=10,this.executeAction(o);case 10:this.emit("action:end",i),a=!0,e.n=14;break;case 11:if(e.p=11,u=e.v,l=u instanceof Error?u:new Error(String(u)),!(s<this.options.maxRetries)){e.n=13;break}return this.log("动作 ".concat(o.type," 执行失败 (尝试 ").concat(s+1,"/").concat(this.options.maxRetries,"):"),l.message),this.log("等待 ".concat(this.options.retryInterval,"ms 后进行下一次重试...")),s++,e.n=12,sleep(this.options.retryInterval);case 12:e.n=14;break;case 13:return e.a(3,15);case 14:e.n=7;break;case 15:if(a||!l){e.n=18;break}return this.log("动作 ".concat(o.type," 最终执行失败 (已重试 ").concat(this.options.maxRetries," 次):"),l.message),this.emit("action:error",_objectSpread(_objectSpread({},i),{},{error:l})),e.n=16,this.cleanupCursor();case 16:if(!this.options.onError){e.n=17;break}this.options.onError(l,o),e.n=18;break;case 17:throw this.state="idle",this.emit("error",l),l;case 18:if(!(this.options.humanize&&r<t.length-1)){e.n=19;break}return e.n=19,randomDelay(this.options.humanizeRange);case 19:r++,e.n=2;break;case 20:return this.state="idle",e.n=21,this.cleanupCursor();case 21:this.log("所有动作执行完成"),this.emit("complete");case 22:return e.a(2)}},e,this,[[9,11]])})),function(){return e.apply(this,arguments)})}]);var e,t,n,r,o}();exports("ee",UIAutomator);var index$2=Object.freeze(Object.defineProperty({__proto__:null,ActionType:ActionType,InputSimulator:InputSimulator,MouseSimulator:MouseSimulator,UIAutomator:UIAutomator,VisualCursor:VisualCursor,addNoise:addNoise,blurElement:blurElement,calculateStepDuration:calculateStepDuration,dispatchChangeEvent:dispatchChangeEvent,dispatchInputEvent:dispatchInputEvent,dispatchKeyEvent:dispatchKeyEvent,dispatchMouseEvent:dispatchMouseEvent,findElement:findElement,focusElement:focusElement,generateMousePath:generateMousePath,getCurrentMousePosition:getCurrentMousePosition,getElementCenter:getElementCenter,getElementRect:getElementRect,getNativeInputSetter:getNativeInputSetter,isInViewport:isInViewport,isVisible:isVisible,randomDelay:randomDelay,scrollIntoViewIfNeeded:scrollIntoViewIfNeeded,setCurrentMousePosition:setCurrentMousePosition,sleep:sleep,tryFindElement:tryFindElement,waitForCondition:waitForCondition,waitForElement:waitForElement},Symbol.toStringTag,{value:"Module"}));
/**!
             * Sortable 1.15.6
             * @author	RubaXa   <trash@rubaxa.org>
             * @author	owenm    <owen23355@gmail.com>
             * @license MIT
             */
function ownKeys$1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread2$1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$1(Object(n),!0).forEach(function(t){_defineProperty$1(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _typeof$1(e){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$1(e)}function _defineProperty$1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _extends$1(){return _extends$1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$1.apply(this,arguments)}function _objectWithoutPropertiesLoose$1(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function _objectWithoutProperties$1(e,t){if(null==e)return{};var n,r,o=_objectWithoutPropertiesLoose$1(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}exports("mj",index$2);var version$1="1.15.6";function userAgent$1(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var IE11OrLess$1=userAgent$1(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Edge$1=userAgent$1(/Edge/i),FireFox$1=userAgent$1(/firefox/i),Safari$1=userAgent$1(/safari/i)&&!userAgent$1(/chrome/i)&&!userAgent$1(/android/i),IOS$1=userAgent$1(/iP(ad|od|hone)/i),ChromeForAndroid$1=userAgent$1(/chrome/i)&&userAgent$1(/android/i),captureMode$1={capture:!1,passive:!1};function on$1(e,t,n){e.addEventListener(t,n,!IE11OrLess$1&&captureMode$1)}function off$1(e,t,n){e.removeEventListener(t,n,!IE11OrLess$1&&captureMode$1)}function matches$1(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(n){return!1}return!1}}function getParentOrHost$1(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function closest$1(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&matches$1(e,t):matches$1(e,t))||r&&e===n)return e;if(e===n)break}while(e=getParentOrHost$1(e))}return null}var R_SPACE$1=/\s+/g,_throttleTimeout$1;function toggleClass$1(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(R_SPACE$1," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(R_SPACE$1," ")}}function css$1(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function matrix$1(e,t){var n="";if("string"==typeof e)n=e;else do{var r=css$1(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function find$1(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,i=r.length;if(n)for(;o<i;o++)n(r[o],o);return r}return[]}function getWindowScrollingElement$1(){var e=document.scrollingElement;return e||document.documentElement}function getRect$1(e,t,n,r,o){if(e.getBoundingClientRect||e===window){var i,a,s,l,u,c,d;if(e!==window&&e.parentNode&&e!==getWindowScrollingElement$1()?(a=(i=e.getBoundingClientRect()).top,s=i.left,l=i.bottom,u=i.right,c=i.height,d=i.width):(a=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!IE11OrLess$1))do{if(o&&o.getBoundingClientRect&&("none"!==css$1(o,"transform")||n&&"static"!==css$1(o,"position"))){var p=o.getBoundingClientRect();a-=p.top+parseInt(css$1(o,"border-top-width")),s-=p.left+parseInt(css$1(o,"border-left-width")),l=a+i.height,u=s+i.width;break}}while(o=o.parentNode);if(r&&e!==window){var h=matrix$1(o||e),f=h&&h.a,g=h&&h.d;h&&(l=(a/=g)+(c/=g),u=(s/=f)+(d/=f))}return{top:a,left:s,bottom:l,right:u,width:d,height:c}}}function isScrolledPast$1(e,t,n){for(var r=getParentAutoScrollElement$1(e,!0),o=getRect$1(e)[t];r;){if(!(o>=getRect$1(r)[n]))return r;if(r===getWindowScrollingElement$1())break;r=getParentAutoScrollElement$1(r,!1)}return!1}function getChild$1(e,t,n,r){for(var o=0,i=0,a=e.children;i<a.length;){if("none"!==a[i].style.display&&a[i]!==Sortable$1.ghost&&(r||a[i]!==Sortable$1.dragged)&&closest$1(a[i],n.draggable,e,!1)){if(o===t)return a[i];o++}i++}return null}function lastChild$1(e,t){for(var n=e.lastElementChild;n&&(n===Sortable$1.ghost||"none"===css$1(n,"display")||t&&!matches$1(n,t));)n=n.previousElementSibling;return n||null}function index$1(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Sortable$1.clone||t&&!matches$1(e,t)||n++;return n}function getRelativeScrollOffset$1(e){var t=0,n=0,r=getWindowScrollingElement$1();if(e)do{var o=matrix$1(e),i=o.a,a=o.d;t+=e.scrollLeft*i,n+=e.scrollTop*a}while(e!==r&&(e=e.parentNode));return[t,n]}function indexOfObject$1(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n);return-1}function getParentAutoScrollElement$1(e,t){if(!e||!e.getBoundingClientRect)return getWindowScrollingElement$1();var n=e,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=css$1(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return getWindowScrollingElement$1();if(r||t)return n;r=!0}}}while(n=n.parentNode);return getWindowScrollingElement$1()}function extend$1(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function isRectEqual$1(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function throttle$1(e,t){return function(){if(!_throttleTimeout$1){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),_throttleTimeout$1=setTimeout(function(){_throttleTimeout$1=void 0},t)}}}function cancelThrottle$1(){clearTimeout(_throttleTimeout$1),_throttleTimeout$1=void 0}function scrollBy$1(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function clone$1(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function getChildContainingRectFromElement$1(e,t,n){var r={};return Array.from(e.children).forEach(function(o){var i,a,s,l;if(closest$1(o,t.draggable,e,!1)&&!o.animated&&o!==n){var u=getRect$1(o);r.left=Math.min(null!==(i=r.left)&&void 0!==i?i:1/0,u.left),r.top=Math.min(null!==(a=r.top)&&void 0!==a?a:1/0,u.top),r.right=Math.max(null!==(s=r.right)&&void 0!==s?s:-1/0,u.right),r.bottom=Math.max(null!==(l=r.bottom)&&void 0!==l?l:-1/0,u.bottom)}}),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var expando$1="Sortable"+(new Date).getTime();function AnimationStateManager$1(){var e,t=[];return{captureAnimationState:function(){(t=[],this.options.animation)&&[].slice.call(this.el.children).forEach(function(e){if("none"!==css$1(e,"display")&&e!==Sortable$1.ghost){t.push({target:e,rect:getRect$1(e)});var n=_objectSpread2$1({},t[t.length-1].rect);if(e.thisAnimationDuration){var r=matrix$1(e,!0);r&&(n.top-=r.f,n.left-=r.e)}e.fromRect=n}})},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(indexOfObject$1(t,{target:e}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof n&&n());var o=!1,i=0;t.forEach(function(e){var t=0,n=e.target,a=n.fromRect,s=getRect$1(n),l=n.prevFromRect,u=n.prevToRect,c=e.rect,d=matrix$1(n,!0);d&&(s.top-=d.f,s.left-=d.e),n.toRect=s,n.thisAnimationDuration&&isRectEqual$1(l,s)&&!isRectEqual$1(a,s)&&(c.top-s.top)/(c.left-s.left)===(a.top-s.top)/(a.left-s.left)&&(t=calculateRealTime$1(c,l,u,r.options)),isRectEqual$1(s,a)||(n.prevFromRect=a,n.prevToRect=s,t||(t=r.options.animation),r.animate(n,c,s,t)),t&&(o=!0,i=Math.max(i,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},t),n.thisAnimationDuration=t)}),clearTimeout(e),o?e=setTimeout(function(){"function"==typeof n&&n()},i):"function"==typeof n&&n(),t=[]},animate:function(e,t,n,r){if(r){css$1(e,"transition",""),css$1(e,"transform","");var o=matrix$1(this.el),i=o&&o.a,a=o&&o.d,s=(t.left-n.left)/(i||1),l=(t.top-n.top)/(a||1);e.animatingX=!!s,e.animatingY=!!l,css$1(e,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=repaint$1(e),css$1(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),css$1(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){css$1(e,"transition",""),css$1(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1},r)}}}}function repaint$1(e){return e.offsetWidth}function calculateRealTime$1(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}var plugins$1=[],defaults$1={initializeByDefault:!0},PluginManager$1={mount:function(e){for(var t in defaults$1)defaults$1.hasOwnProperty(t)&&!(t in e)&&(e[t]=defaults$1[t]);plugins$1.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),plugins$1.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=e+"Global";plugins$1.forEach(function(r){t[r.pluginName]&&(t[r.pluginName][o]&&t[r.pluginName][o](_objectSpread2$1({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](_objectSpread2$1({sortable:t},n)))})},initializePlugins:function(e,t,n,r){for(var o in plugins$1.forEach(function(r){var o=r.pluginName;if(e.options[o]||r.initializeByDefault){var i=new r(e,t,e.options);i.sortable=e,i.options=e.options,e[o]=i,_extends$1(n,i.defaults)}}),e.options)if(e.options.hasOwnProperty(o)){var i=this.modifyOption(e,o,e.options[o]);void 0!==i&&(e.options[o]=i)}},getEventProperties:function(e,t){var n={};return plugins$1.forEach(function(r){"function"==typeof r.eventProperties&&_extends$1(n,r.eventProperties.call(t[r.pluginName],e))}),n},modifyOption:function(e,t,n){var r;return plugins$1.forEach(function(o){e[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[t]&&(r=o.optionListeners[t].call(e[o.pluginName],n))}),r}};function dispatchEvent$1(e){var t=e.sortable,n=e.rootEl,r=e.name,o=e.targetEl,i=e.cloneEl,a=e.toEl,s=e.fromEl,l=e.oldIndex,u=e.newIndex,c=e.oldDraggableIndex,d=e.newDraggableIndex,p=e.originalEvent,h=e.putSortable,f=e.extraEventProperties;if(t=t||n&&n[expando$1]){var g,m=t.options,y="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||IE11OrLess$1||Edge$1?(g=document.createEvent("Event")).initEvent(r,!0,!0):g=new CustomEvent(r,{bubbles:!0,cancelable:!0}),g.to=a||n,g.from=s||n,g.item=o||n,g.clone=i,g.oldIndex=l,g.newIndex=u,g.oldDraggableIndex=c,g.newDraggableIndex=d,g.originalEvent=p,g.pullMode=h?h.lastPutMode:void 0;var v=_objectSpread2$1(_objectSpread2$1({},f),PluginManager$1.getEventProperties(r,t));for(var _ in v)g[_]=v[_];n&&n.dispatchEvent(g),m[y]&&m[y].call(t,g)}}var _excluded$1=["evt"],pluginEvent$1=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=_objectWithoutProperties$1(n,_excluded$1);PluginManager$1.pluginEvent.bind(Sortable$1)(e,t,_objectSpread2$1({dragEl:dragEl$1,parentEl:parentEl$1,ghostEl:ghostEl$1,rootEl:rootEl$1,nextEl:nextEl$1,lastDownEl:lastDownEl$1,cloneEl:cloneEl$1,cloneHidden:cloneHidden$1,dragStarted:moved$1,putSortable:putSortable$1,activeSortable:Sortable$1.active,originalEvent:r,oldIndex:oldIndex$1,oldDraggableIndex:oldDraggableIndex$1,newIndex:newIndex$1,newDraggableIndex:newDraggableIndex$1,hideGhostForTarget:_hideGhostForTarget$1,unhideGhostForTarget:_unhideGhostForTarget$1,cloneNowHidden:function(){cloneHidden$1=!0},cloneNowShown:function(){cloneHidden$1=!1},dispatchSortableEvent:function(e){_dispatchEvent$1({sortable:t,name:e,originalEvent:r})}},o))};function _dispatchEvent$1(e){dispatchEvent$1(_objectSpread2$1({putSortable:putSortable$1,cloneEl:cloneEl$1,targetEl:dragEl$1,rootEl:rootEl$1,oldIndex:oldIndex$1,oldDraggableIndex:oldDraggableIndex$1,newIndex:newIndex$1,newDraggableIndex:newDraggableIndex$1},e))}var dragEl$1,parentEl$1,ghostEl$1,rootEl$1,nextEl$1,lastDownEl$1,cloneEl$1,cloneHidden$1,oldIndex$1,newIndex$1,oldDraggableIndex$1,newDraggableIndex$1,activeGroup$1,putSortable$1,awaitingDragStarted$1=!1,ignoreNextClick$1=!1,sortables$1=[],tapEvt$1,touchEvt$2,lastDx$1,lastDy$1,tapDistanceLeft$1,tapDistanceTop$1,moved$1,lastTarget$1,lastDirection$1,pastFirstInvertThresh$1=!1,isCircumstantialInvert$1=!1,targetMoveDistance$1,ghostRelativeParent$1,ghostRelativeParentInitialScroll$1=[],_silent$1=!1,savedInputChecked$1=[],documentExists$1="undefined"!=typeof document,PositionGhostAbsolutely$1=IOS$1,CSSFloatProperty$1=Edge$1||IE11OrLess$1?"cssFloat":"float",supportDraggable$1=documentExists$1&&!ChromeForAndroid$1&&!IOS$1&&"draggable"in document.createElement("div"),supportCssPointerEvents$1=function(){if(documentExists$1){if(IE11OrLess$1)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),_detectDirection$1=function(e,t){var n=css$1(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=getChild$1(e,0,t),i=getChild$1(e,1,t),a=o&&css$1(o),s=i&&css$1(i),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+getRect$1(o).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+getRect$1(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var c="left"===a.float?"left":"right";return!i||"both"!==s.clear&&s.clear!==c?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=r&&"none"===n[CSSFloatProperty$1]||i&&"none"===n[CSSFloatProperty$1]&&l+u>r)?"vertical":"horizontal"},_dragElInRowColumn$1=function(e,t,n){var r=n?e.left:e.top,o=n?e.right:e.bottom,i=n?e.width:e.height,a=n?t.left:t.top,s=n?t.right:t.bottom,l=n?t.width:t.height;return r===a||o===s||r+i/2===a+l/2},_detectNearestEmptySortable$1=function(e,t){var n;return sortables$1.some(function(r){var o=r[expando$1].options.emptyInsertThreshold;if(o&&!lastChild$1(r)){var i=getRect$1(r),a=e>=i.left-o&&e<=i.right+o,s=t>=i.top-o&&t<=i.bottom+o;return a&&s?n=r:void 0}}),n},_prepareGroup$1=function(e){function t(e,n){return function(r,o,i,a){var s=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==e&&(n||s))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(r,o,i,a),n)(r,o,i,a);var l=(n?r:o).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},r=e.group;r&&"object"==_typeof$1(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},_hideGhostForTarget$1=function(){!supportCssPointerEvents$1&&ghostEl$1&&css$1(ghostEl$1,"display","none")},_unhideGhostForTarget$1=function(){!supportCssPointerEvents$1&&ghostEl$1&&css$1(ghostEl$1,"display","")};documentExists$1&&!ChromeForAndroid$1&&document.addEventListener("click",function(e){if(ignoreNextClick$1)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ignoreNextClick$1=!1,!1},!0);var nearestEmptyInsertDetectEvent$1=function(e){if(dragEl$1){e=e.touches?e.touches[0]:e;var t=_detectNearestEmptySortable$1(e.clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[expando$1]._onDragOver(n)}}},_checkOutsideTargetEl$1=function(e){dragEl$1&&dragEl$1.parentNode[expando$1]._isOutsideThisEl(e.target)};function Sortable$1(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=_extends$1({},t),e[expando$1]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _detectDirection$1(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Sortable$1.supportPointer&&"PointerEvent"in window&&(!Safari$1||IOS$1),emptyInsertThreshold:5};for(var r in PluginManager$1.initializePlugins(this,e,n),n)!(r in t)&&(t[r]=n[r]);for(var o in _prepareGroup$1(t),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!t.forceFallback&&supportDraggable$1,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?on$1(e,"pointerdown",this._onTapStart):(on$1(e,"mousedown",this._onTapStart),on$1(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(on$1(e,"dragover",this),on$1(e,"dragenter",this)),sortables$1.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),_extends$1(this,AnimationStateManager$1())}function _globalDragOver$1(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function _onMove$1(e,t,n,r,o,i,a,s){var l,u,c=e[expando$1],d=c.options.onMove;return!window.CustomEvent||IE11OrLess$1||Edge$1?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=r,l.related=o||t,l.relatedRect=i||getRect$1(t),l.willInsertAfter=s,l.originalEvent=a,e.dispatchEvent(l),d&&(u=d.call(c,l,a)),u}function _disableDraggable$1(e){e.draggable=!1}function _unsilent$1(){_silent$1=!1}function _ghostIsFirst$1(e,t,n){var r=getRect$1(getChild$1(n.el,0,n.options,!0)),o=getChildContainingRectFromElement$1(n.el,n.options,ghostEl$1);return t?e.clientX<o.left-10||e.clientY<r.top&&e.clientX<r.right:e.clientY<o.top-10||e.clientY<r.bottom&&e.clientX<r.left}function _ghostIsLast$1(e,t,n){var r=getRect$1(lastChild$1(n.el,n.options.draggable)),o=getChildContainingRectFromElement$1(n.el,n.options,ghostEl$1);return t?e.clientX>o.right+10||e.clientY>r.bottom&&e.clientX>r.left:e.clientY>o.bottom+10||e.clientX>r.right&&e.clientY>r.top}function _getSwapDirection$1(e,t,n,r,o,i,a,s){var l=r?e.clientY:e.clientX,u=r?n.height:n.width,c=r?n.top:n.left,d=r?n.bottom:n.right,p=!1;if(!a)if(s&&targetMoveDistance$1<u*o){if(!pastFirstInvertThresh$1&&(1===lastDirection$1?l>c+u*i/2:l<d-u*i/2)&&(pastFirstInvertThresh$1=!0),pastFirstInvertThresh$1)p=!0;else if(1===lastDirection$1?l<c+targetMoveDistance$1:l>d-targetMoveDistance$1)return-lastDirection$1}else if(l>c+u*(1-o)/2&&l<d-u*(1-o)/2)return _getInsertDirection$1(t);return(p=p||a)&&(l<c+u*i/2||l>d-u*i/2)?l>c+u/2?1:-1:0}function _getInsertDirection$1(e){return index$1(dragEl$1)<index$1(e)?1:-1}function _generateId$1(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function _saveInputCheckedState$1(e){savedInputChecked$1.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&savedInputChecked$1.push(r)}}function _nextTick$1(e){return setTimeout(e,0)}function _cancelNextTick$1(e){return clearTimeout(e)}Sortable$1.prototype={constructor:Sortable$1,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(lastTarget$1=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,dragEl$1):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,o=r.preventOnFilter,i=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(a||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,u=r.filter;if(_saveInputCheckedState$1(n),!dragEl$1&&!(/mousedown|pointerdown/.test(i)&&0!==e.button||r.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!Safari$1||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=closest$1(s,r.draggable,n,!1))&&s.animated||lastDownEl$1===s)){if(oldIndex$1=index$1(s),oldDraggableIndex$1=index$1(s,r.draggable),"function"==typeof u){if(u.call(this,e,s,this))return _dispatchEvent$1({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),pluginEvent$1("filter",t,{evt:e}),void(o&&e.preventDefault())}else if(u&&(u=u.split(",").some(function(r){if(r=closest$1(l,r.trim(),n,!1))return _dispatchEvent$1({sortable:t,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),pluginEvent$1("filter",t,{evt:e}),!0})))return void(o&&e.preventDefault());r.handle&&!closest$1(l,r.handle,n,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,n){var r,o=this,i=o.el,a=o.options,s=i.ownerDocument;if(n&&!dragEl$1&&n.parentNode===i){var l=getRect$1(n);if(rootEl$1=i,parentEl$1=(dragEl$1=n).parentNode,nextEl$1=dragEl$1.nextSibling,lastDownEl$1=n,activeGroup$1=a.group,Sortable$1.dragged=dragEl$1,tapEvt$1={target:dragEl$1,clientX:(t||e).clientX,clientY:(t||e).clientY},tapDistanceLeft$1=tapEvt$1.clientX-l.left,tapDistanceTop$1=tapEvt$1.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,dragEl$1.style["will-change"]="all",r=function(){pluginEvent$1("delayEnded",o,{evt:e}),Sortable$1.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!FireFox$1&&o.nativeDraggable&&(dragEl$1.draggable=!0),o._triggerDragStart(e,t),_dispatchEvent$1({sortable:o,name:"choose",originalEvent:e}),toggleClass$1(dragEl$1,a.chosenClass,!0))},a.ignore.split(",").forEach(function(e){find$1(dragEl$1,e.trim(),_disableDraggable$1)}),on$1(s,"dragover",nearestEmptyInsertDetectEvent$1),on$1(s,"mousemove",nearestEmptyInsertDetectEvent$1),on$1(s,"touchmove",nearestEmptyInsertDetectEvent$1),a.supportPointer?(on$1(s,"pointerup",o._onDrop),!this.nativeDraggable&&on$1(s,"pointercancel",o._onDrop)):(on$1(s,"mouseup",o._onDrop),on$1(s,"touchend",o._onDrop),on$1(s,"touchcancel",o._onDrop)),FireFox$1&&this.nativeDraggable&&(this.options.touchStartThreshold=4,dragEl$1.draggable=!0),pluginEvent$1("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(Edge$1||IE11OrLess$1))r();else{if(Sortable$1.eventCanceled)return void this._onDrop();a.supportPointer?(on$1(s,"pointerup",o._disableDelayedDrag),on$1(s,"pointercancel",o._disableDelayedDrag)):(on$1(s,"mouseup",o._disableDelayedDrag),on$1(s,"touchend",o._disableDelayedDrag),on$1(s,"touchcancel",o._disableDelayedDrag)),on$1(s,"mousemove",o._delayedDragTouchMoveHandler),on$1(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&on$1(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){dragEl$1&&_disableDraggable$1(dragEl$1),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;off$1(e,"mouseup",this._disableDelayedDrag),off$1(e,"touchend",this._disableDelayedDrag),off$1(e,"touchcancel",this._disableDelayedDrag),off$1(e,"pointerup",this._disableDelayedDrag),off$1(e,"pointercancel",this._disableDelayedDrag),off$1(e,"mousemove",this._delayedDragTouchMoveHandler),off$1(e,"touchmove",this._delayedDragTouchMoveHandler),off$1(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?on$1(document,"pointermove",this._onTouchMove):on$1(document,t?"touchmove":"mousemove",this._onTouchMove):(on$1(dragEl$1,"dragend",this),on$1(rootEl$1,"dragstart",this._onDragStart));try{document.selection?_nextTick$1(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(e,t){if(awaitingDragStarted$1=!1,rootEl$1&&dragEl$1){pluginEvent$1("dragStarted",this,{evt:t}),this.nativeDraggable&&on$1(document,"dragover",_checkOutsideTargetEl$1);var n=this.options;!e&&toggleClass$1(dragEl$1,n.dragClass,!1),toggleClass$1(dragEl$1,n.ghostClass,!0),Sortable$1.active=this,e&&this._appendGhost(),_dispatchEvent$1({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(touchEvt$2){this._lastX=touchEvt$2.clientX,this._lastY=touchEvt$2.clientY,_hideGhostForTarget$1();for(var e=document.elementFromPoint(touchEvt$2.clientX,touchEvt$2.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(touchEvt$2.clientX,touchEvt$2.clientY))!==t;)t=e;if(dragEl$1.parentNode[expando$1]._isOutsideThisEl(e),t)do{if(t[expando$1]){if(t[expando$1]._onDragOver({clientX:touchEvt$2.clientX,clientY:touchEvt$2.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=getParentOrHost$1(t));_unhideGhostForTarget$1()}},_onTouchMove:function(e){if(tapEvt$1){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,o=e.touches?e.touches[0]:e,i=ghostEl$1&&matrix$1(ghostEl$1,!0),a=ghostEl$1&&i&&i.a,s=ghostEl$1&&i&&i.d,l=PositionGhostAbsolutely$1&&ghostRelativeParent$1&&getRelativeScrollOffset$1(ghostRelativeParent$1),u=(o.clientX-tapEvt$1.clientX+r.x)/(a||1)+(l?l[0]-ghostRelativeParentInitialScroll$1[0]:0)/(a||1),c=(o.clientY-tapEvt$1.clientY+r.y)/(s||1)+(l?l[1]-ghostRelativeParentInitialScroll$1[1]:0)/(s||1);if(!Sortable$1.active&&!awaitingDragStarted$1){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(ghostEl$1){i?(i.e+=u-(lastDx$1||0),i.f+=c-(lastDy$1||0)):i={a:1,b:0,c:0,d:1,e:u,f:c};var d="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");css$1(ghostEl$1,"webkitTransform",d),css$1(ghostEl$1,"mozTransform",d),css$1(ghostEl$1,"msTransform",d),css$1(ghostEl$1,"transform",d),lastDx$1=u,lastDy$1=c,touchEvt$2=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!ghostEl$1){var e=this.options.fallbackOnBody?document.body:rootEl$1,t=getRect$1(dragEl$1,!0,PositionGhostAbsolutely$1,!0,e),n=this.options;if(PositionGhostAbsolutely$1){for(ghostRelativeParent$1=e;"static"===css$1(ghostRelativeParent$1,"position")&&"none"===css$1(ghostRelativeParent$1,"transform")&&ghostRelativeParent$1!==document;)ghostRelativeParent$1=ghostRelativeParent$1.parentNode;ghostRelativeParent$1!==document.body&&ghostRelativeParent$1!==document.documentElement?(ghostRelativeParent$1===document&&(ghostRelativeParent$1=getWindowScrollingElement$1()),t.top+=ghostRelativeParent$1.scrollTop,t.left+=ghostRelativeParent$1.scrollLeft):ghostRelativeParent$1=getWindowScrollingElement$1(),ghostRelativeParentInitialScroll$1=getRelativeScrollOffset$1(ghostRelativeParent$1)}toggleClass$1(ghostEl$1=dragEl$1.cloneNode(!0),n.ghostClass,!1),toggleClass$1(ghostEl$1,n.fallbackClass,!0),toggleClass$1(ghostEl$1,n.dragClass,!0),css$1(ghostEl$1,"transition",""),css$1(ghostEl$1,"transform",""),css$1(ghostEl$1,"box-sizing","border-box"),css$1(ghostEl$1,"margin",0),css$1(ghostEl$1,"top",t.top),css$1(ghostEl$1,"left",t.left),css$1(ghostEl$1,"width",t.width),css$1(ghostEl$1,"height",t.height),css$1(ghostEl$1,"opacity","0.8"),css$1(ghostEl$1,"position",PositionGhostAbsolutely$1?"absolute":"fixed"),css$1(ghostEl$1,"zIndex","100000"),css$1(ghostEl$1,"pointerEvents","none"),Sortable$1.ghost=ghostEl$1,e.appendChild(ghostEl$1),css$1(ghostEl$1,"transform-origin",tapDistanceLeft$1/parseInt(ghostEl$1.style.width)*100+"% "+tapDistanceTop$1/parseInt(ghostEl$1.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,o=n.options;pluginEvent$1("dragStart",this,{evt:e}),Sortable$1.eventCanceled?this._onDrop():(pluginEvent$1("setupClone",this),Sortable$1.eventCanceled||((cloneEl$1=clone$1(dragEl$1)).removeAttribute("id"),cloneEl$1.draggable=!1,cloneEl$1.style["will-change"]="",this._hideClone(),toggleClass$1(cloneEl$1,this.options.chosenClass,!1),Sortable$1.clone=cloneEl$1),n.cloneId=_nextTick$1(function(){pluginEvent$1("clone",n),Sortable$1.eventCanceled||(n.options.removeCloneOnHide||rootEl$1.insertBefore(cloneEl$1,dragEl$1),n._hideClone(),_dispatchEvent$1({sortable:n,name:"clone"}))}),!t&&toggleClass$1(dragEl$1,o.dragClass,!0),t?(ignoreNextClick$1=!0,n._loopId=setInterval(n._emulateDragOver,50)):(off$1(document,"mouseup",n._onDrop),off$1(document,"touchend",n._onDrop),off$1(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,dragEl$1)),on$1(document,"drop",n),css$1(dragEl$1,"transform","translateZ(0)")),awaitingDragStarted$1=!0,n._dragStartId=_nextTick$1(n._dragStarted.bind(n,t,e)),on$1(document,"selectstart",n),moved$1=!0,window.getSelection().removeAllRanges(),Safari$1&&css$1(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,o,i=this.el,a=e.target,s=this.options,l=s.group,u=Sortable$1.active,c=activeGroup$1===l,d=s.sort,p=putSortable$1||u,h=this,f=!1;if(!_silent$1){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=closest$1(a,s.draggable,i,!0),I("dragOver"),Sortable$1.eventCanceled)return f;if(dragEl$1.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||h._ignoreWhileAnimating===a)return D(!1);if(ignoreNextClick$1=!1,u&&!s.disabled&&(c?d||(r=parentEl$1!==rootEl$1):putSortable$1===this||(this.lastPutMode=activeGroup$1.checkPull(this,u,dragEl$1,e))&&l.checkPut(this,u,dragEl$1,e))){if(o="vertical"===this._getDirection(e,a),t=getRect$1(dragEl$1),I("dragOverValid"),Sortable$1.eventCanceled)return f;if(r)return parentEl$1=rootEl$1,P(),this._hideClone(),I("revert"),Sortable$1.eventCanceled||(nextEl$1?rootEl$1.insertBefore(dragEl$1,nextEl$1):rootEl$1.appendChild(dragEl$1)),D(!0);var g=lastChild$1(i,s.draggable);if(!g||_ghostIsLast$1(e,o,this)&&!g.animated){if(g===dragEl$1)return D(!1);if(g&&i===e.target&&(a=g),a&&(n=getRect$1(a)),!1!==_onMove$1(rootEl$1,i,dragEl$1,t,a,n,e,!!a))return P(),g&&g.nextSibling?i.insertBefore(dragEl$1,g.nextSibling):i.appendChild(dragEl$1),parentEl$1=i,k(),D(!0)}else if(g&&_ghostIsFirst$1(e,o,this)){var m=getChild$1(i,0,s,!0);if(m===dragEl$1)return D(!1);if(n=getRect$1(a=m),!1!==_onMove$1(rootEl$1,i,dragEl$1,t,a,n,e,!1))return P(),i.insertBefore(dragEl$1,m),parentEl$1=i,k(),D(!0)}else if(a.parentNode===i){n=getRect$1(a);var y,v,_,x=dragEl$1.parentNode!==i,S=!_dragElInRowColumn$1(dragEl$1.animated&&dragEl$1.toRect||t,a.animated&&a.toRect||n,o),b=o?"top":"left",T=isScrolledPast$1(a,"top","top")||isScrolledPast$1(dragEl$1,"top","top"),A=T?T.scrollTop:void 0;if(lastTarget$1!==a&&(v=n[b],pastFirstInvertThresh$1=!1,isCircumstantialInvert$1=!S&&s.invertSwap||x),0!==(y=_getSwapDirection$1(e,a,n,o,S?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,isCircumstantialInvert$1,lastTarget$1===a))){var w=index$1(dragEl$1);do{w-=y,_=parentEl$1.children[w]}while(_&&("none"===css$1(_,"display")||_===ghostEl$1))}if(0===y||_===a)return D(!1);lastTarget$1=a,lastDirection$1=y;var C=a.nextElementSibling,E=!1,M=_onMove$1(rootEl$1,i,dragEl$1,t,a,n,e,E=1===y);if(!1!==M)return 1!==M&&-1!==M||(E=1===M),_silent$1=!0,setTimeout(_unsilent$1,30),P(),E&&!C?i.appendChild(dragEl$1):a.parentNode.insertBefore(dragEl$1,E?C:a),T&&scrollBy$1(T,0,A-T.scrollTop),parentEl$1=dragEl$1.parentNode,void 0===v||isCircumstantialInvert$1||(targetMoveDistance$1=Math.abs(v-getRect$1(a)[b])),k(),D(!0)}if(i.contains(dragEl$1))return D(!1)}return!1}function I(s,l){pluginEvent$1(s,h,_objectSpread2$1({evt:e,isOwner:c,axis:o?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:d,fromSortable:p,target:a,completed:D,onMove:function(n,r){return _onMove$1(rootEl$1,i,dragEl$1,t,n,getRect$1(n),e,r)},changed:k},l))}function P(){I("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function D(t){return I("dragOverCompleted",{insertion:t}),t&&(c?u._hideClone():u._showClone(h),h!==p&&(toggleClass$1(dragEl$1,putSortable$1?putSortable$1.options.ghostClass:u.options.ghostClass,!1),toggleClass$1(dragEl$1,s.ghostClass,!0)),putSortable$1!==h&&h!==Sortable$1.active?putSortable$1=h:h===Sortable$1.active&&putSortable$1&&(putSortable$1=null),p===h&&(h._ignoreWhileAnimating=a),h.animateAll(function(){I("dragOverAnimationComplete"),h._ignoreWhileAnimating=null}),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===dragEl$1&&!dragEl$1.animated||a===i&&!a.animated)&&(lastTarget$1=null),s.dragoverBubble||e.rootEl||a===document||(dragEl$1.parentNode[expando$1]._isOutsideThisEl(e.target),!t&&nearestEmptyInsertDetectEvent$1(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),f=!0}function k(){newIndex$1=index$1(dragEl$1),newDraggableIndex$1=index$1(dragEl$1,s.draggable),_dispatchEvent$1({sortable:h,name:"change",toEl:i,newIndex:newIndex$1,newDraggableIndex:newDraggableIndex$1,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){off$1(document,"mousemove",this._onTouchMove),off$1(document,"touchmove",this._onTouchMove),off$1(document,"pointermove",this._onTouchMove),off$1(document,"dragover",nearestEmptyInsertDetectEvent$1),off$1(document,"mousemove",nearestEmptyInsertDetectEvent$1),off$1(document,"touchmove",nearestEmptyInsertDetectEvent$1)},_offUpEvents:function(){var e=this.el.ownerDocument;off$1(e,"mouseup",this._onDrop),off$1(e,"touchend",this._onDrop),off$1(e,"pointerup",this._onDrop),off$1(e,"pointercancel",this._onDrop),off$1(e,"touchcancel",this._onDrop),off$1(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;newIndex$1=index$1(dragEl$1),newDraggableIndex$1=index$1(dragEl$1,n.draggable),pluginEvent$1("drop",this,{evt:e}),parentEl$1=dragEl$1&&dragEl$1.parentNode,newIndex$1=index$1(dragEl$1),newDraggableIndex$1=index$1(dragEl$1,n.draggable),Sortable$1.eventCanceled||(awaitingDragStarted$1=!1,isCircumstantialInvert$1=!1,pastFirstInvertThresh$1=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),_cancelNextTick$1(this.cloneId),_cancelNextTick$1(this._dragStartId),this.nativeDraggable&&(off$1(document,"drop",this),off$1(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Safari$1&&css$1(document.body,"user-select",""),css$1(dragEl$1,"transform",""),e&&(moved$1&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),ghostEl$1&&ghostEl$1.parentNode&&ghostEl$1.parentNode.removeChild(ghostEl$1),(rootEl$1===parentEl$1||putSortable$1&&"clone"!==putSortable$1.lastPutMode)&&cloneEl$1&&cloneEl$1.parentNode&&cloneEl$1.parentNode.removeChild(cloneEl$1),dragEl$1&&(this.nativeDraggable&&off$1(dragEl$1,"dragend",this),_disableDraggable$1(dragEl$1),dragEl$1.style["will-change"]="",moved$1&&!awaitingDragStarted$1&&toggleClass$1(dragEl$1,putSortable$1?putSortable$1.options.ghostClass:this.options.ghostClass,!1),toggleClass$1(dragEl$1,this.options.chosenClass,!1),_dispatchEvent$1({sortable:this,name:"unchoose",toEl:parentEl$1,newIndex:null,newDraggableIndex:null,originalEvent:e}),rootEl$1!==parentEl$1?(newIndex$1>=0&&(_dispatchEvent$1({rootEl:parentEl$1,name:"add",toEl:parentEl$1,fromEl:rootEl$1,originalEvent:e}),_dispatchEvent$1({sortable:this,name:"remove",toEl:parentEl$1,originalEvent:e}),_dispatchEvent$1({rootEl:parentEl$1,name:"sort",toEl:parentEl$1,fromEl:rootEl$1,originalEvent:e}),_dispatchEvent$1({sortable:this,name:"sort",toEl:parentEl$1,originalEvent:e})),putSortable$1&&putSortable$1.save()):newIndex$1!==oldIndex$1&&newIndex$1>=0&&(_dispatchEvent$1({sortable:this,name:"update",toEl:parentEl$1,originalEvent:e}),_dispatchEvent$1({sortable:this,name:"sort",toEl:parentEl$1,originalEvent:e})),Sortable$1.active&&(null!=newIndex$1&&-1!==newIndex$1||(newIndex$1=oldIndex$1,newDraggableIndex$1=oldDraggableIndex$1),_dispatchEvent$1({sortable:this,name:"end",toEl:parentEl$1,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){pluginEvent$1("nulling",this),rootEl$1=dragEl$1=parentEl$1=ghostEl$1=nextEl$1=cloneEl$1=lastDownEl$1=cloneHidden$1=tapEvt$1=touchEvt$2=moved$1=newIndex$1=newDraggableIndex$1=oldIndex$1=oldDraggableIndex$1=lastTarget$1=lastDirection$1=putSortable$1=activeGroup$1=Sortable$1.dragged=Sortable$1.ghost=Sortable$1.clone=Sortable$1.active=null,savedInputChecked$1.forEach(function(e){e.checked=!0}),savedInputChecked$1.length=lastDx$1=lastDy$1=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":dragEl$1&&(this._onDragOver(e),_globalDragOver$1(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,o=n.length,i=this.options;r<o;r++)closest$1(e=n[r],i.draggable,this.el,!1)&&t.push(e.getAttribute(i.dataIdAttr)||_generateId$1(e));return t},sort:function(e,t){var n={},r=this.el;this.toArray().forEach(function(e,t){var o=r.children[t];closest$1(o,this.options.draggable,r,!1)&&(n[e]=o)},this),t&&this.captureAnimationState(),e.forEach(function(e){n[e]&&(r.removeChild(n[e]),r.appendChild(n[e]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return closest$1(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var r=PluginManager$1.modifyOption(this,e,t);n[e]=void 0!==r?r:t,"group"===e&&_prepareGroup$1(n)},destroy:function(){pluginEvent$1("destroy",this);var e=this.el;e[expando$1]=null,off$1(e,"mousedown",this._onTapStart),off$1(e,"touchstart",this._onTapStart),off$1(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(off$1(e,"dragover",this),off$1(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),sortables$1.splice(sortables$1.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!cloneHidden$1){if(pluginEvent$1("hideClone",this),Sortable$1.eventCanceled)return;css$1(cloneEl$1,"display","none"),this.options.removeCloneOnHide&&cloneEl$1.parentNode&&cloneEl$1.parentNode.removeChild(cloneEl$1),cloneHidden$1=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(cloneHidden$1){if(pluginEvent$1("showClone",this),Sortable$1.eventCanceled)return;dragEl$1.parentNode!=rootEl$1||this.options.group.revertClone?nextEl$1?rootEl$1.insertBefore(cloneEl$1,nextEl$1):rootEl$1.appendChild(cloneEl$1):rootEl$1.insertBefore(cloneEl$1,dragEl$1),this.options.group.revertClone&&this.animate(dragEl$1,cloneEl$1),css$1(cloneEl$1,"display",""),cloneHidden$1=!1}}else this._hideClone()}},documentExists$1&&on$1(document,"touchmove",function(e){(Sortable$1.active||awaitingDragStarted$1)&&e.cancelable&&e.preventDefault()}),Sortable$1.utils={on:on$1,off:off$1,css:css$1,find:find$1,is:function(e,t){return!!closest$1(e,t,e,!1)},extend:extend$1,throttle:throttle$1,closest:closest$1,toggleClass:toggleClass$1,clone:clone$1,index:index$1,nextTick:_nextTick$1,cancelNextTick:_cancelNextTick$1,detectDirection:_detectDirection$1,getChild:getChild$1,expando:expando$1},Sortable$1.get=function(e){return e[expando$1]},Sortable$1.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Sortable$1.utils=_objectSpread2$1(_objectSpread2$1({},Sortable$1.utils),e.utils)),PluginManager$1.mount(e)})},Sortable$1.create=function(e,t){return new Sortable$1(e,t)},Sortable$1.version=version$1;var autoScrolls$1=[],scrollEl$1,scrollRootEl$1,scrolling$1=!1,lastAutoScrollX$1,lastAutoScrollY$1,touchEvt$1$1,pointerElemChangedInterval$1;function AutoScrollPlugin$1(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?on$1(document,"dragover",this._handleAutoScroll):this.options.supportPointer?on$1(document,"pointermove",this._handleFallbackAutoScroll):t.touches?on$1(document,"touchmove",this._handleFallbackAutoScroll):on$1(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?off$1(document,"dragover",this._handleAutoScroll):(off$1(document,"pointermove",this._handleFallbackAutoScroll),off$1(document,"touchmove",this._handleFallbackAutoScroll),off$1(document,"mousemove",this._handleFallbackAutoScroll)),clearPointerElemChangedInterval$1(),clearAutoScrolls$1(),cancelThrottle$1()},nulling:function(){touchEvt$1$1=scrollRootEl$1=scrollEl$1=scrolling$1=pointerElemChangedInterval$1=lastAutoScrollX$1=lastAutoScrollY$1=null,autoScrolls$1.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,i=document.elementFromPoint(r,o);if(touchEvt$1$1=e,t||this.options.forceAutoScrollFallback||Edge$1||IE11OrLess$1||Safari$1){autoScroll$1(e,this.options,i,t);var a=getParentAutoScrollElement$1(i,!0);!scrolling$1||pointerElemChangedInterval$1&&r===lastAutoScrollX$1&&o===lastAutoScrollY$1||(pointerElemChangedInterval$1&&clearPointerElemChangedInterval$1(),pointerElemChangedInterval$1=setInterval(function(){var i=getParentAutoScrollElement$1(document.elementFromPoint(r,o),!0);i!==a&&(a=i,clearAutoScrolls$1()),autoScroll$1(e,n.options,i,t)},10),lastAutoScrollX$1=r,lastAutoScrollY$1=o)}else{if(!this.options.bubbleScroll||getParentAutoScrollElement$1(i,!0)===getWindowScrollingElement$1())return void clearAutoScrolls$1();autoScroll$1(e,this.options,getParentAutoScrollElement$1(i,!1),!1)}}},_extends$1(e,{pluginName:"scroll",initializeByDefault:!0})}function clearAutoScrolls$1(){autoScrolls$1.forEach(function(e){clearInterval(e.pid)}),autoScrolls$1=[]}function clearPointerElemChangedInterval$1(){clearInterval(pointerElemChangedInterval$1)}var autoScroll$1=throttle$1(function(e,t,n,r){if(t.scroll){var o,i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,u=getWindowScrollingElement$1(),c=!1;scrollRootEl$1!==n&&(scrollRootEl$1=n,clearAutoScrolls$1(),scrollEl$1=t.scroll,o=t.scrollFn,!0===scrollEl$1&&(scrollEl$1=getParentAutoScrollElement$1(n,!0)));var d=0,p=scrollEl$1;do{var h=p,f=getRect$1(h),g=f.top,m=f.bottom,y=f.left,v=f.right,_=f.width,x=f.height,S=void 0,b=void 0,T=h.scrollWidth,A=h.scrollHeight,w=css$1(h),C=h.scrollLeft,E=h.scrollTop;h===u?(S=_<T&&("auto"===w.overflowX||"scroll"===w.overflowX||"visible"===w.overflowX),b=x<A&&("auto"===w.overflowY||"scroll"===w.overflowY||"visible"===w.overflowY)):(S=_<T&&("auto"===w.overflowX||"scroll"===w.overflowX),b=x<A&&("auto"===w.overflowY||"scroll"===w.overflowY));var M=S&&(Math.abs(v-i)<=s&&C+_<T)-(Math.abs(y-i)<=s&&!!C),I=b&&(Math.abs(m-a)<=s&&E+x<A)-(Math.abs(g-a)<=s&&!!E);if(!autoScrolls$1[d])for(var P=0;P<=d;P++)autoScrolls$1[P]||(autoScrolls$1[P]={});autoScrolls$1[d].vx==M&&autoScrolls$1[d].vy==I&&autoScrolls$1[d].el===h||(autoScrolls$1[d].el=h,autoScrolls$1[d].vx=M,autoScrolls$1[d].vy=I,clearInterval(autoScrolls$1[d].pid),0==M&&0==I||(c=!0,autoScrolls$1[d].pid=setInterval(function(){r&&0===this.layer&&Sortable$1.active._onTouchMove(touchEvt$1$1);var t=autoScrolls$1[this.layer].vy?autoScrolls$1[this.layer].vy*l:0,n=autoScrolls$1[this.layer].vx?autoScrolls$1[this.layer].vx*l:0;"function"==typeof o&&"continue"!==o.call(Sortable$1.dragged.parentNode[expando$1],n,t,e,touchEvt$1$1,autoScrolls$1[this.layer].el)||scrollBy$1(autoScrolls$1[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&p!==u&&(p=getParentAutoScrollElement$1(p,!1)));scrolling$1=c}},30),drop$1=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,o=e.activeSortable,i=e.dispatchSortableEvent,a=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var l=n||o;a();var u=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,c=document.elementFromPoint(u.clientX,u.clientY);s(),l&&!l.el.contains(c)&&(i("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function Revert$1(){}function Remove$1(){}
/**!
             * Sortable 1.15.6
             * @author	RubaXa   <trash@rubaxa.org>
             * @author	owenm    <owen23355@gmail.com>
             * @license MIT
             */
function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _extends(){return _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function _objectWithoutProperties(e,t){if(null==e)return{};var n,r,o=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}Revert$1.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=getChild$1(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:drop$1},_extends$1(Revert$1,{pluginName:"revertOnSpill"}),Remove$1.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:drop$1},_extends$1(Remove$1,{pluginName:"removeOnSpill"}),Sortable$1.mount(new AutoScrollPlugin$1),Sortable$1.mount(Remove$1,Revert$1);var version="1.15.6";function userAgent(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var IE11OrLess=userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Edge=userAgent(/Edge/i),FireFox=userAgent(/firefox/i),Safari=userAgent(/safari/i)&&!userAgent(/chrome/i)&&!userAgent(/android/i),IOS=userAgent(/iP(ad|od|hone)/i),ChromeForAndroid=userAgent(/chrome/i)&&userAgent(/android/i),captureMode={capture:!1,passive:!1};function on(e,t,n){e.addEventListener(t,n,!IE11OrLess&&captureMode)}function off(e,t,n){e.removeEventListener(t,n,!IE11OrLess&&captureMode)}function matches(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(n){return!1}return!1}}function getParentOrHost(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function closest(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&matches(e,t):matches(e,t))||r&&e===n)return e;if(e===n)break}while(e=getParentOrHost(e))}return null}var R_SPACE=/\s+/g,_throttleTimeout;function toggleClass(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(R_SPACE," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(R_SPACE," ")}}function css(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function matrix(e,t){var n="";if("string"==typeof e)n=e;else do{var r=css(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function find(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,i=r.length;if(n)for(;o<i;o++)n(r[o],o);return r}return[]}function getWindowScrollingElement(){var e=document.scrollingElement;return e||document.documentElement}function getRect(e,t,n,r,o){if(e.getBoundingClientRect||e===window){var i,a,s,l,u,c,d;if(e!==window&&e.parentNode&&e!==getWindowScrollingElement()?(a=(i=e.getBoundingClientRect()).top,s=i.left,l=i.bottom,u=i.right,c=i.height,d=i.width):(a=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!IE11OrLess))do{if(o&&o.getBoundingClientRect&&("none"!==css(o,"transform")||n&&"static"!==css(o,"position"))){var p=o.getBoundingClientRect();a-=p.top+parseInt(css(o,"border-top-width")),s-=p.left+parseInt(css(o,"border-left-width")),l=a+i.height,u=s+i.width;break}}while(o=o.parentNode);if(r&&e!==window){var h=matrix(o||e),f=h&&h.a,g=h&&h.d;h&&(l=(a/=g)+(c/=g),u=(s/=f)+(d/=f))}return{top:a,left:s,bottom:l,right:u,width:d,height:c}}}function isScrolledPast(e,t,n){for(var r=getParentAutoScrollElement(e,!0),o=getRect(e)[t];r;){if(!(o>=getRect(r)[n]))return r;if(r===getWindowScrollingElement())break;r=getParentAutoScrollElement(r,!1)}return!1}function getChild(e,t,n,r){for(var o=0,i=0,a=e.children;i<a.length;){if("none"!==a[i].style.display&&a[i]!==Sortable.ghost&&(r||a[i]!==Sortable.dragged)&&closest(a[i],n.draggable,e,!1)){if(o===t)return a[i];o++}i++}return null}function lastChild(e,t){for(var n=e.lastElementChild;n&&(n===Sortable.ghost||"none"===css(n,"display")||t&&!matches(n,t));)n=n.previousElementSibling;return n||null}function index(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Sortable.clone||t&&!matches(e,t)||n++;return n}function getRelativeScrollOffset(e){var t=0,n=0,r=getWindowScrollingElement();if(e)do{var o=matrix(e),i=o.a,a=o.d;t+=e.scrollLeft*i,n+=e.scrollTop*a}while(e!==r&&(e=e.parentNode));return[t,n]}function indexOfObject(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n);return-1}function getParentAutoScrollElement(e,t){if(!e||!e.getBoundingClientRect)return getWindowScrollingElement();var n=e,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=css(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return getWindowScrollingElement();if(r||t)return n;r=!0}}}while(n=n.parentNode);return getWindowScrollingElement()}function extend(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function isRectEqual(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function throttle(e,t){return function(){if(!_throttleTimeout){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),_throttleTimeout=setTimeout(function(){_throttleTimeout=void 0},t)}}}function cancelThrottle(){clearTimeout(_throttleTimeout),_throttleTimeout=void 0}function scrollBy(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function clone(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function getChildContainingRectFromElement(e,t,n){var r={};return Array.from(e.children).forEach(function(o){var i,a,s,l;if(closest(o,t.draggable,e,!1)&&!o.animated&&o!==n){var u=getRect(o);r.left=Math.min(null!==(i=r.left)&&void 0!==i?i:1/0,u.left),r.top=Math.min(null!==(a=r.top)&&void 0!==a?a:1/0,u.top),r.right=Math.max(null!==(s=r.right)&&void 0!==s?s:-1/0,u.right),r.bottom=Math.max(null!==(l=r.bottom)&&void 0!==l?l:-1/0,u.bottom)}}),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var expando="Sortable"+(new Date).getTime();function AnimationStateManager(){var e,t=[];return{captureAnimationState:function(){(t=[],this.options.animation)&&[].slice.call(this.el.children).forEach(function(e){if("none"!==css(e,"display")&&e!==Sortable.ghost){t.push({target:e,rect:getRect(e)});var n=_objectSpread2({},t[t.length-1].rect);if(e.thisAnimationDuration){var r=matrix(e,!0);r&&(n.top-=r.f,n.left-=r.e)}e.fromRect=n}})},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(indexOfObject(t,{target:e}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof n&&n());var o=!1,i=0;t.forEach(function(e){var t=0,n=e.target,a=n.fromRect,s=getRect(n),l=n.prevFromRect,u=n.prevToRect,c=e.rect,d=matrix(n,!0);d&&(s.top-=d.f,s.left-=d.e),n.toRect=s,n.thisAnimationDuration&&isRectEqual(l,s)&&!isRectEqual(a,s)&&(c.top-s.top)/(c.left-s.left)===(a.top-s.top)/(a.left-s.left)&&(t=calculateRealTime(c,l,u,r.options)),isRectEqual(s,a)||(n.prevFromRect=a,n.prevToRect=s,t||(t=r.options.animation),r.animate(n,c,s,t)),t&&(o=!0,i=Math.max(i,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},t),n.thisAnimationDuration=t)}),clearTimeout(e),o?e=setTimeout(function(){"function"==typeof n&&n()},i):"function"==typeof n&&n(),t=[]},animate:function(e,t,n,r){if(r){css(e,"transition",""),css(e,"transform","");var o=matrix(this.el),i=o&&o.a,a=o&&o.d,s=(t.left-n.left)/(i||1),l=(t.top-n.top)/(a||1);e.animatingX=!!s,e.animatingY=!!l,css(e,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=repaint(e),css(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),css(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){css(e,"transition",""),css(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1},r)}}}}function repaint(e){return e.offsetWidth}function calculateRealTime(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}var plugins=[],defaults={initializeByDefault:!0},PluginManager={mount:function(e){for(var t in defaults)defaults.hasOwnProperty(t)&&!(t in e)&&(e[t]=defaults[t]);plugins.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),plugins.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=e+"Global";plugins.forEach(function(r){t[r.pluginName]&&(t[r.pluginName][o]&&t[r.pluginName][o](_objectSpread2({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](_objectSpread2({sortable:t},n)))})},initializePlugins:function(e,t,n,r){for(var o in plugins.forEach(function(r){var o=r.pluginName;if(e.options[o]||r.initializeByDefault){var i=new r(e,t,e.options);i.sortable=e,i.options=e.options,e[o]=i,_extends(n,i.defaults)}}),e.options)if(e.options.hasOwnProperty(o)){var i=this.modifyOption(e,o,e.options[o]);void 0!==i&&(e.options[o]=i)}},getEventProperties:function(e,t){var n={};return plugins.forEach(function(r){"function"==typeof r.eventProperties&&_extends(n,r.eventProperties.call(t[r.pluginName],e))}),n},modifyOption:function(e,t,n){var r;return plugins.forEach(function(o){e[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[t]&&(r=o.optionListeners[t].call(e[o.pluginName],n))}),r}};function dispatchEvent(e){var t=e.sortable,n=e.rootEl,r=e.name,o=e.targetEl,i=e.cloneEl,a=e.toEl,s=e.fromEl,l=e.oldIndex,u=e.newIndex,c=e.oldDraggableIndex,d=e.newDraggableIndex,p=e.originalEvent,h=e.putSortable,f=e.extraEventProperties;if(t=t||n&&n[expando]){var g,m=t.options,y="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||IE11OrLess||Edge?(g=document.createEvent("Event")).initEvent(r,!0,!0):g=new CustomEvent(r,{bubbles:!0,cancelable:!0}),g.to=a||n,g.from=s||n,g.item=o||n,g.clone=i,g.oldIndex=l,g.newIndex=u,g.oldDraggableIndex=c,g.newDraggableIndex=d,g.originalEvent=p,g.pullMode=h?h.lastPutMode:void 0;var v=_objectSpread2(_objectSpread2({},f),PluginManager.getEventProperties(r,t));for(var _ in v)g[_]=v[_];n&&n.dispatchEvent(g),m[y]&&m[y].call(t,g)}}var _excluded=["evt"],pluginEvent=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=_objectWithoutProperties(n,_excluded);PluginManager.pluginEvent.bind(Sortable)(e,t,_objectSpread2({dragEl:dragEl,parentEl:parentEl,ghostEl:ghostEl,rootEl:rootEl,nextEl:nextEl,lastDownEl:lastDownEl,cloneEl:cloneEl,cloneHidden:cloneHidden,dragStarted:moved,putSortable:putSortable,activeSortable:Sortable.active,originalEvent:r,oldIndex:oldIndex,oldDraggableIndex:oldDraggableIndex,newIndex:newIndex,newDraggableIndex:newDraggableIndex,hideGhostForTarget:_hideGhostForTarget,unhideGhostForTarget:_unhideGhostForTarget,cloneNowHidden:function(){cloneHidden=!0},cloneNowShown:function(){cloneHidden=!1},dispatchSortableEvent:function(e){_dispatchEvent({sortable:t,name:e,originalEvent:r})}},o))};function _dispatchEvent(e){dispatchEvent(_objectSpread2({putSortable:putSortable,cloneEl:cloneEl,targetEl:dragEl,rootEl:rootEl,oldIndex:oldIndex,oldDraggableIndex:oldDraggableIndex,newIndex:newIndex,newDraggableIndex:newDraggableIndex},e))}var dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,oldIndex,newIndex,oldDraggableIndex,newDraggableIndex,activeGroup,putSortable,awaitingDragStarted=!1,ignoreNextClick=!1,sortables=[],tapEvt,touchEvt,lastDx,lastDy,tapDistanceLeft,tapDistanceTop,moved,lastTarget,lastDirection,pastFirstInvertThresh=!1,isCircumstantialInvert=!1,targetMoveDistance,ghostRelativeParent,ghostRelativeParentInitialScroll=[],_silent=!1,savedInputChecked=[],documentExists="undefined"!=typeof document,PositionGhostAbsolutely=IOS,CSSFloatProperty=Edge||IE11OrLess?"cssFloat":"float",supportDraggable=documentExists&&!ChromeForAndroid&&!IOS&&"draggable"in document.createElement("div"),supportCssPointerEvents=function(){if(documentExists){if(IE11OrLess)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),_detectDirection=function(e,t){var n=css(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=getChild(e,0,t),i=getChild(e,1,t),a=o&&css(o),s=i&&css(i),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+getRect(o).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+getRect(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var c="left"===a.float?"left":"right";return!i||"both"!==s.clear&&s.clear!==c?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=r&&"none"===n[CSSFloatProperty]||i&&"none"===n[CSSFloatProperty]&&l+u>r)?"vertical":"horizontal"},_dragElInRowColumn=function(e,t,n){var r=n?e.left:e.top,o=n?e.right:e.bottom,i=n?e.width:e.height,a=n?t.left:t.top,s=n?t.right:t.bottom,l=n?t.width:t.height;return r===a||o===s||r+i/2===a+l/2},_detectNearestEmptySortable=function(e,t){var n;return sortables.some(function(r){var o=r[expando].options.emptyInsertThreshold;if(o&&!lastChild(r)){var i=getRect(r),a=e>=i.left-o&&e<=i.right+o,s=t>=i.top-o&&t<=i.bottom+o;return a&&s?n=r:void 0}}),n},_prepareGroup=function(e){function t(e,n){return function(r,o,i,a){var s=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==e&&(n||s))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(r,o,i,a),n)(r,o,i,a);var l=(n?r:o).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},r=e.group;r&&"object"==_typeof(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},_hideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","none")},_unhideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","")};documentExists&&!ChromeForAndroid&&document.addEventListener("click",function(e){if(ignoreNextClick)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ignoreNextClick=!1,!1},!0);var nearestEmptyInsertDetectEvent=function(e){if(dragEl){e=e.touches?e.touches[0]:e;var t=_detectNearestEmptySortable(e.clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[expando]._onDragOver(n)}}},_checkOutsideTargetEl=function(e){dragEl&&dragEl.parentNode[expando]._isOutsideThisEl(e.target)};function Sortable(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=_extends({},t),e[expando]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _detectDirection(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Sortable.supportPointer&&"PointerEvent"in window&&(!Safari||IOS),emptyInsertThreshold:5};for(var r in PluginManager.initializePlugins(this,e,n),n)!(r in t)&&(t[r]=n[r]);for(var o in _prepareGroup(t),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!t.forceFallback&&supportDraggable,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?on(e,"pointerdown",this._onTapStart):(on(e,"mousedown",this._onTapStart),on(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(on(e,"dragover",this),on(e,"dragenter",this)),sortables.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),_extends(this,AnimationStateManager())}function _globalDragOver(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function _onMove(e,t,n,r,o,i,a,s){var l,u,c=e[expando],d=c.options.onMove;return!window.CustomEvent||IE11OrLess||Edge?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=r,l.related=o||t,l.relatedRect=i||getRect(t),l.willInsertAfter=s,l.originalEvent=a,e.dispatchEvent(l),d&&(u=d.call(c,l,a)),u}function _disableDraggable(e){e.draggable=!1}function _unsilent(){_silent=!1}function _ghostIsFirst(e,t,n){var r=getRect(getChild(n.el,0,n.options,!0)),o=getChildContainingRectFromElement(n.el,n.options,ghostEl);return t?e.clientX<o.left-10||e.clientY<r.top&&e.clientX<r.right:e.clientY<o.top-10||e.clientY<r.bottom&&e.clientX<r.left}function _ghostIsLast(e,t,n){var r=getRect(lastChild(n.el,n.options.draggable)),o=getChildContainingRectFromElement(n.el,n.options,ghostEl);return t?e.clientX>o.right+10||e.clientY>r.bottom&&e.clientX>r.left:e.clientY>o.bottom+10||e.clientX>r.right&&e.clientY>r.top}function _getSwapDirection(e,t,n,r,o,i,a,s){var l=r?e.clientY:e.clientX,u=r?n.height:n.width,c=r?n.top:n.left,d=r?n.bottom:n.right,p=!1;if(!a)if(s&&targetMoveDistance<u*o){if(!pastFirstInvertThresh&&(1===lastDirection?l>c+u*i/2:l<d-u*i/2)&&(pastFirstInvertThresh=!0),pastFirstInvertThresh)p=!0;else if(1===lastDirection?l<c+targetMoveDistance:l>d-targetMoveDistance)return-lastDirection}else if(l>c+u*(1-o)/2&&l<d-u*(1-o)/2)return _getInsertDirection(t);return(p=p||a)&&(l<c+u*i/2||l>d-u*i/2)?l>c+u/2?1:-1:0}function _getInsertDirection(e){return index(dragEl)<index(e)?1:-1}function _generateId(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function _saveInputCheckedState(e){savedInputChecked.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&savedInputChecked.push(r)}}function _nextTick(e){return setTimeout(e,0)}function _cancelNextTick(e){return clearTimeout(e)}Sortable.prototype={constructor:Sortable,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(lastTarget=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,dragEl):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,o=r.preventOnFilter,i=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(a||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,u=r.filter;if(_saveInputCheckedState(n),!dragEl&&!(/mousedown|pointerdown/.test(i)&&0!==e.button||r.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!Safari||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=closest(s,r.draggable,n,!1))&&s.animated||lastDownEl===s)){if(oldIndex=index(s),oldDraggableIndex=index(s,r.draggable),"function"==typeof u){if(u.call(this,e,s,this))return _dispatchEvent({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),pluginEvent("filter",t,{evt:e}),void(o&&e.preventDefault())}else if(u&&(u=u.split(",").some(function(r){if(r=closest(l,r.trim(),n,!1))return _dispatchEvent({sortable:t,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),pluginEvent("filter",t,{evt:e}),!0})))return void(o&&e.preventDefault());r.handle&&!closest(l,r.handle,n,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,n){var r,o=this,i=o.el,a=o.options,s=i.ownerDocument;if(n&&!dragEl&&n.parentNode===i){var l=getRect(n);if(rootEl=i,parentEl=(dragEl=n).parentNode,nextEl=dragEl.nextSibling,lastDownEl=n,activeGroup=a.group,Sortable.dragged=dragEl,tapEvt={target:dragEl,clientX:(t||e).clientX,clientY:(t||e).clientY},tapDistanceLeft=tapEvt.clientX-l.left,tapDistanceTop=tapEvt.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,dragEl.style["will-change"]="all",r=function(){pluginEvent("delayEnded",o,{evt:e}),Sortable.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!FireFox&&o.nativeDraggable&&(dragEl.draggable=!0),o._triggerDragStart(e,t),_dispatchEvent({sortable:o,name:"choose",originalEvent:e}),toggleClass(dragEl,a.chosenClass,!0))},a.ignore.split(",").forEach(function(e){find(dragEl,e.trim(),_disableDraggable)}),on(s,"dragover",nearestEmptyInsertDetectEvent),on(s,"mousemove",nearestEmptyInsertDetectEvent),on(s,"touchmove",nearestEmptyInsertDetectEvent),a.supportPointer?(on(s,"pointerup",o._onDrop),!this.nativeDraggable&&on(s,"pointercancel",o._onDrop)):(on(s,"mouseup",o._onDrop),on(s,"touchend",o._onDrop),on(s,"touchcancel",o._onDrop)),FireFox&&this.nativeDraggable&&(this.options.touchStartThreshold=4,dragEl.draggable=!0),pluginEvent("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(Edge||IE11OrLess))r();else{if(Sortable.eventCanceled)return void this._onDrop();a.supportPointer?(on(s,"pointerup",o._disableDelayedDrag),on(s,"pointercancel",o._disableDelayedDrag)):(on(s,"mouseup",o._disableDelayedDrag),on(s,"touchend",o._disableDelayedDrag),on(s,"touchcancel",o._disableDelayedDrag)),on(s,"mousemove",o._delayedDragTouchMoveHandler),on(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&on(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){dragEl&&_disableDraggable(dragEl),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;off(e,"mouseup",this._disableDelayedDrag),off(e,"touchend",this._disableDelayedDrag),off(e,"touchcancel",this._disableDelayedDrag),off(e,"pointerup",this._disableDelayedDrag),off(e,"pointercancel",this._disableDelayedDrag),off(e,"mousemove",this._delayedDragTouchMoveHandler),off(e,"touchmove",this._delayedDragTouchMoveHandler),off(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?on(document,"pointermove",this._onTouchMove):on(document,t?"touchmove":"mousemove",this._onTouchMove):(on(dragEl,"dragend",this),on(rootEl,"dragstart",this._onDragStart));try{document.selection?_nextTick(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(e,t){if(awaitingDragStarted=!1,rootEl&&dragEl){pluginEvent("dragStarted",this,{evt:t}),this.nativeDraggable&&on(document,"dragover",_checkOutsideTargetEl);var n=this.options;!e&&toggleClass(dragEl,n.dragClass,!1),toggleClass(dragEl,n.ghostClass,!0),Sortable.active=this,e&&this._appendGhost(),_dispatchEvent({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(touchEvt){this._lastX=touchEvt.clientX,this._lastY=touchEvt.clientY,_hideGhostForTarget();for(var e=document.elementFromPoint(touchEvt.clientX,touchEvt.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(touchEvt.clientX,touchEvt.clientY))!==t;)t=e;if(dragEl.parentNode[expando]._isOutsideThisEl(e),t)do{if(t[expando]){if(t[expando]._onDragOver({clientX:touchEvt.clientX,clientY:touchEvt.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=getParentOrHost(t));_unhideGhostForTarget()}},_onTouchMove:function(e){if(tapEvt){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,o=e.touches?e.touches[0]:e,i=ghostEl&&matrix(ghostEl,!0),a=ghostEl&&i&&i.a,s=ghostEl&&i&&i.d,l=PositionGhostAbsolutely&&ghostRelativeParent&&getRelativeScrollOffset(ghostRelativeParent),u=(o.clientX-tapEvt.clientX+r.x)/(a||1)+(l?l[0]-ghostRelativeParentInitialScroll[0]:0)/(a||1),c=(o.clientY-tapEvt.clientY+r.y)/(s||1)+(l?l[1]-ghostRelativeParentInitialScroll[1]:0)/(s||1);if(!Sortable.active&&!awaitingDragStarted){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(ghostEl){i?(i.e+=u-(lastDx||0),i.f+=c-(lastDy||0)):i={a:1,b:0,c:0,d:1,e:u,f:c};var d="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");css(ghostEl,"webkitTransform",d),css(ghostEl,"mozTransform",d),css(ghostEl,"msTransform",d),css(ghostEl,"transform",d),lastDx=u,lastDy=c,touchEvt=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!ghostEl){var e=this.options.fallbackOnBody?document.body:rootEl,t=getRect(dragEl,!0,PositionGhostAbsolutely,!0,e),n=this.options;if(PositionGhostAbsolutely){for(ghostRelativeParent=e;"static"===css(ghostRelativeParent,"position")&&"none"===css(ghostRelativeParent,"transform")&&ghostRelativeParent!==document;)ghostRelativeParent=ghostRelativeParent.parentNode;ghostRelativeParent!==document.body&&ghostRelativeParent!==document.documentElement?(ghostRelativeParent===document&&(ghostRelativeParent=getWindowScrollingElement()),t.top+=ghostRelativeParent.scrollTop,t.left+=ghostRelativeParent.scrollLeft):ghostRelativeParent=getWindowScrollingElement(),ghostRelativeParentInitialScroll=getRelativeScrollOffset(ghostRelativeParent)}toggleClass(ghostEl=dragEl.cloneNode(!0),n.ghostClass,!1),toggleClass(ghostEl,n.fallbackClass,!0),toggleClass(ghostEl,n.dragClass,!0),css(ghostEl,"transition",""),css(ghostEl,"transform",""),css(ghostEl,"box-sizing","border-box"),css(ghostEl,"margin",0),css(ghostEl,"top",t.top),css(ghostEl,"left",t.left),css(ghostEl,"width",t.width),css(ghostEl,"height",t.height),css(ghostEl,"opacity","0.8"),css(ghostEl,"position",PositionGhostAbsolutely?"absolute":"fixed"),css(ghostEl,"zIndex","100000"),css(ghostEl,"pointerEvents","none"),Sortable.ghost=ghostEl,e.appendChild(ghostEl),css(ghostEl,"transform-origin",tapDistanceLeft/parseInt(ghostEl.style.width)*100+"% "+tapDistanceTop/parseInt(ghostEl.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,o=n.options;pluginEvent("dragStart",this,{evt:e}),Sortable.eventCanceled?this._onDrop():(pluginEvent("setupClone",this),Sortable.eventCanceled||((cloneEl=clone(dragEl)).removeAttribute("id"),cloneEl.draggable=!1,cloneEl.style["will-change"]="",this._hideClone(),toggleClass(cloneEl,this.options.chosenClass,!1),Sortable.clone=cloneEl),n.cloneId=_nextTick(function(){pluginEvent("clone",n),Sortable.eventCanceled||(n.options.removeCloneOnHide||rootEl.insertBefore(cloneEl,dragEl),n._hideClone(),_dispatchEvent({sortable:n,name:"clone"}))}),!t&&toggleClass(dragEl,o.dragClass,!0),t?(ignoreNextClick=!0,n._loopId=setInterval(n._emulateDragOver,50)):(off(document,"mouseup",n._onDrop),off(document,"touchend",n._onDrop),off(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,dragEl)),on(document,"drop",n),css(dragEl,"transform","translateZ(0)")),awaitingDragStarted=!0,n._dragStartId=_nextTick(n._dragStarted.bind(n,t,e)),on(document,"selectstart",n),moved=!0,window.getSelection().removeAllRanges(),Safari&&css(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,o,i=this.el,a=e.target,s=this.options,l=s.group,u=Sortable.active,c=activeGroup===l,d=s.sort,p=putSortable||u,h=this,f=!1;if(!_silent){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=closest(a,s.draggable,i,!0),I("dragOver"),Sortable.eventCanceled)return f;if(dragEl.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||h._ignoreWhileAnimating===a)return D(!1);if(ignoreNextClick=!1,u&&!s.disabled&&(c?d||(r=parentEl!==rootEl):putSortable===this||(this.lastPutMode=activeGroup.checkPull(this,u,dragEl,e))&&l.checkPut(this,u,dragEl,e))){if(o="vertical"===this._getDirection(e,a),t=getRect(dragEl),I("dragOverValid"),Sortable.eventCanceled)return f;if(r)return parentEl=rootEl,P(),this._hideClone(),I("revert"),Sortable.eventCanceled||(nextEl?rootEl.insertBefore(dragEl,nextEl):rootEl.appendChild(dragEl)),D(!0);var g=lastChild(i,s.draggable);if(!g||_ghostIsLast(e,o,this)&&!g.animated){if(g===dragEl)return D(!1);if(g&&i===e.target&&(a=g),a&&(n=getRect(a)),!1!==_onMove(rootEl,i,dragEl,t,a,n,e,!!a))return P(),g&&g.nextSibling?i.insertBefore(dragEl,g.nextSibling):i.appendChild(dragEl),parentEl=i,k(),D(!0)}else if(g&&_ghostIsFirst(e,o,this)){var m=getChild(i,0,s,!0);if(m===dragEl)return D(!1);if(n=getRect(a=m),!1!==_onMove(rootEl,i,dragEl,t,a,n,e,!1))return P(),i.insertBefore(dragEl,m),parentEl=i,k(),D(!0)}else if(a.parentNode===i){n=getRect(a);var y,v,_,x=dragEl.parentNode!==i,S=!_dragElInRowColumn(dragEl.animated&&dragEl.toRect||t,a.animated&&a.toRect||n,o),b=o?"top":"left",T=isScrolledPast(a,"top","top")||isScrolledPast(dragEl,"top","top"),A=T?T.scrollTop:void 0;if(lastTarget!==a&&(v=n[b],pastFirstInvertThresh=!1,isCircumstantialInvert=!S&&s.invertSwap||x),0!==(y=_getSwapDirection(e,a,n,o,S?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,isCircumstantialInvert,lastTarget===a))){var w=index(dragEl);do{w-=y,_=parentEl.children[w]}while(_&&("none"===css(_,"display")||_===ghostEl))}if(0===y||_===a)return D(!1);lastTarget=a,lastDirection=y;var C=a.nextElementSibling,E=!1,M=_onMove(rootEl,i,dragEl,t,a,n,e,E=1===y);if(!1!==M)return 1!==M&&-1!==M||(E=1===M),_silent=!0,setTimeout(_unsilent,30),P(),E&&!C?i.appendChild(dragEl):a.parentNode.insertBefore(dragEl,E?C:a),T&&scrollBy(T,0,A-T.scrollTop),parentEl=dragEl.parentNode,void 0===v||isCircumstantialInvert||(targetMoveDistance=Math.abs(v-getRect(a)[b])),k(),D(!0)}if(i.contains(dragEl))return D(!1)}return!1}function I(s,l){pluginEvent(s,h,_objectSpread2({evt:e,isOwner:c,axis:o?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:d,fromSortable:p,target:a,completed:D,onMove:function(n,r){return _onMove(rootEl,i,dragEl,t,n,getRect(n),e,r)},changed:k},l))}function P(){I("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function D(t){return I("dragOverCompleted",{insertion:t}),t&&(c?u._hideClone():u._showClone(h),h!==p&&(toggleClass(dragEl,putSortable?putSortable.options.ghostClass:u.options.ghostClass,!1),toggleClass(dragEl,s.ghostClass,!0)),putSortable!==h&&h!==Sortable.active?putSortable=h:h===Sortable.active&&putSortable&&(putSortable=null),p===h&&(h._ignoreWhileAnimating=a),h.animateAll(function(){I("dragOverAnimationComplete"),h._ignoreWhileAnimating=null}),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===dragEl&&!dragEl.animated||a===i&&!a.animated)&&(lastTarget=null),s.dragoverBubble||e.rootEl||a===document||(dragEl.parentNode[expando]._isOutsideThisEl(e.target),!t&&nearestEmptyInsertDetectEvent(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),f=!0}function k(){newIndex=index(dragEl),newDraggableIndex=index(dragEl,s.draggable),_dispatchEvent({sortable:h,name:"change",toEl:i,newIndex:newIndex,newDraggableIndex:newDraggableIndex,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){off(document,"mousemove",this._onTouchMove),off(document,"touchmove",this._onTouchMove),off(document,"pointermove",this._onTouchMove),off(document,"dragover",nearestEmptyInsertDetectEvent),off(document,"mousemove",nearestEmptyInsertDetectEvent),off(document,"touchmove",nearestEmptyInsertDetectEvent)},_offUpEvents:function(){var e=this.el.ownerDocument;off(e,"mouseup",this._onDrop),off(e,"touchend",this._onDrop),off(e,"pointerup",this._onDrop),off(e,"pointercancel",this._onDrop),off(e,"touchcancel",this._onDrop),off(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;newIndex=index(dragEl),newDraggableIndex=index(dragEl,n.draggable),pluginEvent("drop",this,{evt:e}),parentEl=dragEl&&dragEl.parentNode,newIndex=index(dragEl),newDraggableIndex=index(dragEl,n.draggable),Sortable.eventCanceled||(awaitingDragStarted=!1,isCircumstantialInvert=!1,pastFirstInvertThresh=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),_cancelNextTick(this.cloneId),_cancelNextTick(this._dragStartId),this.nativeDraggable&&(off(document,"drop",this),off(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Safari&&css(document.body,"user-select",""),css(dragEl,"transform",""),e&&(moved&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),ghostEl&&ghostEl.parentNode&&ghostEl.parentNode.removeChild(ghostEl),(rootEl===parentEl||putSortable&&"clone"!==putSortable.lastPutMode)&&cloneEl&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),dragEl&&(this.nativeDraggable&&off(dragEl,"dragend",this),_disableDraggable(dragEl),dragEl.style["will-change"]="",moved&&!awaitingDragStarted&&toggleClass(dragEl,putSortable?putSortable.options.ghostClass:this.options.ghostClass,!1),toggleClass(dragEl,this.options.chosenClass,!1),_dispatchEvent({sortable:this,name:"unchoose",toEl:parentEl,newIndex:null,newDraggableIndex:null,originalEvent:e}),rootEl!==parentEl?(newIndex>=0&&(_dispatchEvent({rootEl:parentEl,name:"add",toEl:parentEl,fromEl:rootEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"remove",toEl:parentEl,originalEvent:e}),_dispatchEvent({rootEl:parentEl,name:"sort",toEl:parentEl,fromEl:rootEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})),putSortable&&putSortable.save()):newIndex!==oldIndex&&newIndex>=0&&(_dispatchEvent({sortable:this,name:"update",toEl:parentEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})),Sortable.active&&(null!=newIndex&&-1!==newIndex||(newIndex=oldIndex,newDraggableIndex=oldDraggableIndex),_dispatchEvent({sortable:this,name:"end",toEl:parentEl,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){pluginEvent("nulling",this),rootEl=dragEl=parentEl=ghostEl=nextEl=cloneEl=lastDownEl=cloneHidden=tapEvt=touchEvt=moved=newIndex=newDraggableIndex=oldIndex=oldDraggableIndex=lastTarget=lastDirection=putSortable=activeGroup=Sortable.dragged=Sortable.ghost=Sortable.clone=Sortable.active=null,savedInputChecked.forEach(function(e){e.checked=!0}),savedInputChecked.length=lastDx=lastDy=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":dragEl&&(this._onDragOver(e),_globalDragOver(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,o=n.length,i=this.options;r<o;r++)closest(e=n[r],i.draggable,this.el,!1)&&t.push(e.getAttribute(i.dataIdAttr)||_generateId(e));return t},sort:function(e,t){var n={},r=this.el;this.toArray().forEach(function(e,t){var o=r.children[t];closest(o,this.options.draggable,r,!1)&&(n[e]=o)},this),t&&this.captureAnimationState(),e.forEach(function(e){n[e]&&(r.removeChild(n[e]),r.appendChild(n[e]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return closest(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var r=PluginManager.modifyOption(this,e,t);n[e]=void 0!==r?r:t,"group"===e&&_prepareGroup(n)},destroy:function(){pluginEvent("destroy",this);var e=this.el;e[expando]=null,off(e,"mousedown",this._onTapStart),off(e,"touchstart",this._onTapStart),off(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(off(e,"dragover",this),off(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),sortables.splice(sortables.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!cloneHidden){if(pluginEvent("hideClone",this),Sortable.eventCanceled)return;css(cloneEl,"display","none"),this.options.removeCloneOnHide&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),cloneHidden=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(cloneHidden){if(pluginEvent("showClone",this),Sortable.eventCanceled)return;dragEl.parentNode!=rootEl||this.options.group.revertClone?nextEl?rootEl.insertBefore(cloneEl,nextEl):rootEl.appendChild(cloneEl):rootEl.insertBefore(cloneEl,dragEl),this.options.group.revertClone&&this.animate(dragEl,cloneEl),css(cloneEl,"display",""),cloneHidden=!1}}else this._hideClone()}},documentExists&&on(document,"touchmove",function(e){(Sortable.active||awaitingDragStarted)&&e.cancelable&&e.preventDefault()}),Sortable.utils={on:on,off:off,css:css,find:find,is:function(e,t){return!!closest(e,t,e,!1)},extend:extend,throttle:throttle,closest:closest,toggleClass:toggleClass,clone:clone,index:index,nextTick:_nextTick,cancelNextTick:_cancelNextTick,detectDirection:_detectDirection,getChild:getChild,expando:expando},Sortable.get=function(e){return e[expando]},Sortable.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Sortable.utils=_objectSpread2(_objectSpread2({},Sortable.utils),e.utils)),PluginManager.mount(e)})},Sortable.create=function(e,t){return new Sortable(e,t)},Sortable.version=version;var autoScrolls=[],scrollEl,scrollRootEl,scrolling=!1,lastAutoScrollX,lastAutoScrollY,touchEvt$1,pointerElemChangedInterval;function AutoScrollPlugin(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?on(document,"dragover",this._handleAutoScroll):this.options.supportPointer?on(document,"pointermove",this._handleFallbackAutoScroll):t.touches?on(document,"touchmove",this._handleFallbackAutoScroll):on(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?off(document,"dragover",this._handleAutoScroll):(off(document,"pointermove",this._handleFallbackAutoScroll),off(document,"touchmove",this._handleFallbackAutoScroll),off(document,"mousemove",this._handleFallbackAutoScroll)),clearPointerElemChangedInterval(),clearAutoScrolls(),cancelThrottle()},nulling:function(){touchEvt$1=scrollRootEl=scrollEl=scrolling=pointerElemChangedInterval=lastAutoScrollX=lastAutoScrollY=null,autoScrolls.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,i=document.elementFromPoint(r,o);if(touchEvt$1=e,t||this.options.forceAutoScrollFallback||Edge||IE11OrLess||Safari){autoScroll(e,this.options,i,t);var a=getParentAutoScrollElement(i,!0);!scrolling||pointerElemChangedInterval&&r===lastAutoScrollX&&o===lastAutoScrollY||(pointerElemChangedInterval&&clearPointerElemChangedInterval(),pointerElemChangedInterval=setInterval(function(){var i=getParentAutoScrollElement(document.elementFromPoint(r,o),!0);i!==a&&(a=i,clearAutoScrolls()),autoScroll(e,n.options,i,t)},10),lastAutoScrollX=r,lastAutoScrollY=o)}else{if(!this.options.bubbleScroll||getParentAutoScrollElement(i,!0)===getWindowScrollingElement())return void clearAutoScrolls();autoScroll(e,this.options,getParentAutoScrollElement(i,!1),!1)}}},_extends(e,{pluginName:"scroll",initializeByDefault:!0})}function clearAutoScrolls(){autoScrolls.forEach(function(e){clearInterval(e.pid)}),autoScrolls=[]}function clearPointerElemChangedInterval(){clearInterval(pointerElemChangedInterval)}var autoScroll=throttle(function(e,t,n,r){if(t.scroll){var o,i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,u=getWindowScrollingElement(),c=!1;scrollRootEl!==n&&(scrollRootEl=n,clearAutoScrolls(),scrollEl=t.scroll,o=t.scrollFn,!0===scrollEl&&(scrollEl=getParentAutoScrollElement(n,!0)));var d=0,p=scrollEl;do{var h=p,f=getRect(h),g=f.top,m=f.bottom,y=f.left,v=f.right,_=f.width,x=f.height,S=void 0,b=void 0,T=h.scrollWidth,A=h.scrollHeight,w=css(h),C=h.scrollLeft,E=h.scrollTop;h===u?(S=_<T&&("auto"===w.overflowX||"scroll"===w.overflowX||"visible"===w.overflowX),b=x<A&&("auto"===w.overflowY||"scroll"===w.overflowY||"visible"===w.overflowY)):(S=_<T&&("auto"===w.overflowX||"scroll"===w.overflowX),b=x<A&&("auto"===w.overflowY||"scroll"===w.overflowY));var M=S&&(Math.abs(v-i)<=s&&C+_<T)-(Math.abs(y-i)<=s&&!!C),I=b&&(Math.abs(m-a)<=s&&E+x<A)-(Math.abs(g-a)<=s&&!!E);if(!autoScrolls[d])for(var P=0;P<=d;P++)autoScrolls[P]||(autoScrolls[P]={});autoScrolls[d].vx==M&&autoScrolls[d].vy==I&&autoScrolls[d].el===h||(autoScrolls[d].el=h,autoScrolls[d].vx=M,autoScrolls[d].vy=I,clearInterval(autoScrolls[d].pid),0==M&&0==I||(c=!0,autoScrolls[d].pid=setInterval(function(){r&&0===this.layer&&Sortable.active._onTouchMove(touchEvt$1);var t=autoScrolls[this.layer].vy?autoScrolls[this.layer].vy*l:0,n=autoScrolls[this.layer].vx?autoScrolls[this.layer].vx*l:0;"function"==typeof o&&"continue"!==o.call(Sortable.dragged.parentNode[expando],n,t,e,touchEvt$1,autoScrolls[this.layer].el)||scrollBy(autoScrolls[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&p!==u&&(p=getParentAutoScrollElement(p,!1)));scrolling=c}},30),drop=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,o=e.activeSortable,i=e.dispatchSortableEvent,a=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var l=n||o;a();var u=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,c=document.elementFromPoint(u.clientX,u.clientY);s(),l&&!l.el.contains(c)&&(i("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function Revert(){}function Remove(){}Revert.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=getChild(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:drop},_extends(Revert,{pluginName:"revertOnSpill"}),Remove.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:drop},_extends(Remove,{pluginName:"removeOnSpill"})}}})})();