diff --git a/.homeycompose/app.json b/.homeycompose/app.json index 2cdbb5d..89332d4 100644 --- a/.homeycompose/app.json +++ b/.homeycompose/app.json @@ -1,7 +1,7 @@ { "id": "com.tibber", "version": "1.9.18", - "compatibility": ">=8.1.0", + "compatibility": ">=12.1.0", "platforms": ["local", "cloud"], "sdk": 3, "author": { diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..7ae0d58 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,35 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "attach", + "restart": true, + "name": "Attach Tibber to HomeyPro 19", + "address": "192.168.1.13", + "port": 9291, + "localRoot": "${workspaceFolder}", + "remoteRoot": "/" + }, + { + "type": "node", + "request": "attach", + "restart": true, + "name": "Attach Tibber to HomeyPro 23", + "address": "192.168.1.12", + "port": 9291, + "localRoot": "${workspaceFolder}", + "remoteRoot": "/" + }, + { + "type": "node", + "request": "attach", + "restart": true, + "name": "Attach Tibber to HomeyPro 23 Docker", + "address": "192.168.1.42", + "port": 9229, + "localRoot": "${workspaceFolder}", + "remoteRoot": "/app/" + } + ] +} \ No newline at end of file diff --git a/app.json b/app.json index 9d8b180..6fb2ef1 100644 --- a/app.json +++ b/app.json @@ -2,7 +2,7 @@ "_comment": "This file is generated. Please edit .homeycompose/app.json instead.", "id": "com.tibber", "version": "1.9.18", - "compatibility": ">=8.1.0", + "compatibility": ">=12.1.0", "platforms": [ "local", "cloud" @@ -1156,6 +1156,13 @@ }, "class": "other", "pair": [ + { + "id": "loading", + "template": "loading", + "navigation": { + "next": "login_oauth2" + } + }, { "id": "login_oauth2", "template": "login_oauth2" @@ -1254,6 +1261,13 @@ }, "class": "other", "pair": [ + { + "id": "loading", + "template": "loading", + "navigation": { + "next": "login_oauth2" + } + }, { "id": "login_oauth2", "template": "login_oauth2" @@ -1511,6 +1525,13 @@ }, "class": "other", "pair": [ + { + "id": "loading", + "template": "loading", + "navigation": { + "next": "login_oauth2" + } + }, { "id": "login_oauth2", "template": "login_oauth2" @@ -1706,6 +1727,96 @@ "id": "watty" } ], + "widgets": { + "price": { + "name": { + "en": "Price", + "de": "Preis" + }, + "settings": [ + { + "id": "device_home", + "type": "autocomplete", + "title": { + "en": "Home device" + } + }, + { + "id": "device_pulse", + "type": "autocomplete", + "title": { + "en": "Pulse device" + } + }, + { + "id": "chart_display", + "type": "checkbox", + "value": true, + "title": { + "en": "Display chart" + } + }, + { + "id": "chart_zoom", + "type": "checkbox", + "value": true, + "title": { + "en": "Zoom chart" + } + }, + { + "id": "chart_colored", + "type": "checkbox", + "value": true, + "title": { + "en": "Colored chart" + } + }, + { + "id": "chart_color_style", + "type": "dropdown", + "value": "colored_line_level", + "title": { + "en": "Color style" + }, + "values": [ + { + "id": "colored_line_level", + "title": { + "en": "Colored line based on price level" + } + }, + { + "id": "colored_line_range", + "title": { + "en": "Colored line based on range" + } + }, + { + "id": "vertical_segments", + "title": { + "en": "Vertical segments based on price level" + } + }, + { + "id": "horizontal_segments", + "title": { + "en": "Horizontal segments based on range" + } + } + ] + } + ], + "height": 70, + "api": { + "triggerRealtimeData": { + "method": "GET", + "path": "/trigger_realtime_data" + } + }, + "id": "price" + } + }, "capabilities": { "accumulatedCost": { "type": "number", diff --git a/app.ts b/app.ts index 1957eb0..4541c02 100644 --- a/app.ts +++ b/app.ts @@ -4,6 +4,7 @@ import { App } from 'homey'; import Homey from 'homey/lib/Homey'; import { setGlobalAttributes } from './lib/newrelic-transaction'; import * as appJson from './app.json'; +import { HomeDevice } from './drivers/home/device'; sourceMapSupport.install(); @@ -15,6 +16,19 @@ class TibberApp extends App { async onInit() { this.log('Tibber app is running...'); + // Init Debugger + if (process.env.DEBUG === '1') { + // @ts-expect-error + if (this.homey.platform == "local") { + try { + require('inspector').waitForDebugger(); + } + catch (error) { + require('inspector').open(9291, '0.0.0.0', true); + } + } + } + const { version: firmwareVersion, platformVersion } = this .homey as HomeyWithMissingTypings; const { version: appVersion } = appJson; @@ -31,6 +45,7 @@ class TibberApp extends App { this.homey.settings.set('v', 2); this.cleanupLogs('*').catch(console.error); } + this.#initWidgets(); } async cleanupLogs(prefix: string) { @@ -50,6 +65,43 @@ class TibberApp extends App { async onUninit() { this.log('Tibber app is stopping'); } + + // WIDGET Settings ============================================================================== + async #initWidgets(){ + // @ts-expect-error + this.homey.dashboards.getWidget('price').registerSettingAutocompleteListener('device_home', async (query: string, settings: any) => { + let homes: { name: string; id: any; }[] = []; + let devices = this.homey.drivers.getDriver('home').getDevices(); + devices.forEach(device => { + homes.push({ + name: device.getName(), + id: device.getData().id + }) + }); + return homes.filter((item) => item.name.toLowerCase().includes(query.toLowerCase())); + }); + // @ts-expect-error + this.homey.dashboards.getWidget('price').registerSettingAutocompleteListener('device_pulse', async (query: string, settings: any) => { + let homes: { name: string; id: any; }[] = []; + let devices = this.homey.drivers.getDriver('pulse').getDevices(); + devices.forEach(device => { + homes.push({ + name: device.getName(), + id: device.getData().id + }) + }); + return homes.filter((item) => item.name.toLowerCase().includes(query.toLowerCase())); + }); + } + + // WIDGET API ============================================================================ + async apiTriggerRealtimeData(){ + // let device = this.homey.drivers.getDriver('home').getDevices()[0] as HomeDevice; + this.homey.drivers.getDriver('home').getDevices().forEach( (device ) => { + (device as HomeDevice).triggerRealtimeData(); + }); + } + } // workaround for `The class exported in '' must extend Homey.` error diff --git a/drivers/home/device.ts b/drivers/home/device.ts index ce6ff14..99892a8 100644 --- a/drivers/home/device.ts +++ b/drivers/home/device.ts @@ -35,7 +35,7 @@ const deprecatedPriceLevelMap = { VERY_EXPENSIVE: 'HIGH', }; -class HomeDevice extends Device { +export class HomeDevice extends Device { #api!: TibberApi; #deviceLabel!: string; #insightId!: string; @@ -391,6 +391,21 @@ class HomeDevice extends Device { return; } + // Realtime event - Widget update + await this.homey.api.realtime("device_update", { + driver_id:'home', + device_id: this.getData().id, + now: now, + currentHour: currentHour, + currentPrice: currentPrice, + lowestToday: this.#prices.lowestToday, + highestToday: this.#prices.highestToday, + pricesToday: this.#prices.today, + hourlyPrices: this.#api.hourlyPrices, + tz: this.homey.clock.getTimezone(), + language: this.homey.i18n.getLanguage() + } ); + const shouldUpdate = currentPrice.startsAt !== this.#prices.latest?.startsAt; @@ -835,6 +850,15 @@ class HomeDevice extends Device { return await this.homey.insights.createLog(name, options); } } + + async triggerRealtimeData(){ + const now = moment(); + try { + await this.#handlePrice(now); + } catch (err) { + console.error(err); + } + } } module.exports = HomeDevice; diff --git a/drivers/home/driver.compose.json b/drivers/home/driver.compose.json index b869f6c..efb9a6d 100644 --- a/drivers/home/driver.compose.json +++ b/drivers/home/driver.compose.json @@ -18,6 +18,13 @@ }, "class": "other", "pair": [ + { + "id": "loading", + "template": "loading", + "navigation": { + "next": "login_oauth2" + } + }, { "id": "login_oauth2", "template": "login_oauth2" diff --git a/drivers/home/driver.ts b/drivers/home/driver.ts index 39a6aea..d8fcff1 100644 --- a/drivers/home/driver.ts +++ b/drivers/home/driver.ts @@ -1,4 +1,4 @@ -import { Driver } from 'homey'; +import { Driver, env } from 'homey'; import PairSession from 'homey/lib/PairSession'; import { createListDeviceHandler } from '../../lib/device-helpers'; import { initiateOauth } from '../../lib/oauth'; @@ -14,6 +14,18 @@ class HomeDriver extends Driver { onPair(session: PairSession) { this.#api = new TibberApi(this.log, this.homey.settings); + session.setHandler('showView', async (view) => { + if (view == 'loading'){ + if (env.ACCESS_TOKEN != undefined){ + // If access token is provided, don't show oAuth popup. + await session.showView('list_devices'); + } + else{ + await session.showView('login_oauth2'); + } + } + }); + session.setHandler( 'list_devices', createListDeviceHandler( diff --git a/drivers/pulse/device.ts b/drivers/pulse/device.ts index 2ef38f7..f759547 100644 --- a/drivers/pulse/device.ts +++ b/drivers/pulse/device.ts @@ -169,6 +169,13 @@ class PulseDevice extends Device { async subscribeCallback(result: LiveMeasurement) { this.#resubscribeDebounce(); + // Realtime event - Widget update + await this.homey.api.realtime("device_update", { + driver_id:'pulse', + device_id: this.getData().id, + liveMeasurement: result.data?.liveMeasurement + } ); + const power = result.data?.liveMeasurement?.power; const powerProduction = result.data?.liveMeasurement?.powerProduction; if (powerProduction) this.#prevPowerProduction = powerProduction; diff --git a/drivers/pulse/driver.compose.json b/drivers/pulse/driver.compose.json index 7d24e7f..76d6ee7 100644 --- a/drivers/pulse/driver.compose.json +++ b/drivers/pulse/driver.compose.json @@ -56,6 +56,13 @@ }, "class": "other", "pair": [ + { + "id": "loading", + "template": "loading", + "navigation": { + "next": "login_oauth2" + } + }, { "id": "login_oauth2", "template": "login_oauth2" diff --git a/drivers/pulse/driver.ts b/drivers/pulse/driver.ts index 9aedeff..7e4c6c4 100644 --- a/drivers/pulse/driver.ts +++ b/drivers/pulse/driver.ts @@ -1,4 +1,4 @@ -import { Driver } from 'homey'; +import { Driver, env } from 'homey'; import PairSession from 'homey/lib/PairSession'; import { createListDeviceHandler } from '../../lib/device-helpers'; import { initiateOauth } from '../../lib/oauth'; @@ -14,6 +14,18 @@ class PulseDriver extends Driver { onPair(session: PairSession) { this.#api = new TibberApi(this.log, this.homey.settings); + session.setHandler('showView', async (view) => { + if (view == 'loading'){ + if (env.ACCESS_TOKEN != undefined){ + // If access token is provided, don't show oAuth popup. + await session.showView('list_devices'); + } + else{ + await session.showView('login_oauth2'); + } + } + }); + session.setHandler( 'list_devices', createListDeviceHandler( diff --git a/drivers/watty/driver.compose.json b/drivers/watty/driver.compose.json index 18abc4c..9bae1b9 100644 --- a/drivers/watty/driver.compose.json +++ b/drivers/watty/driver.compose.json @@ -56,6 +56,13 @@ }, "class": "other", "pair": [ + { + "id": "loading", + "template": "loading", + "navigation": { + "next": "login_oauth2" + } + }, { "id": "login_oauth2", "template": "login_oauth2" diff --git a/drivers/watty/driver.ts b/drivers/watty/driver.ts index 42d40a4..232c178 100644 --- a/drivers/watty/driver.ts +++ b/drivers/watty/driver.ts @@ -1,4 +1,4 @@ -import { Driver } from 'homey'; +import { Driver, env } from 'homey'; import PairSession from 'homey/lib/PairSession'; import { createListDeviceHandler } from '../../lib/device-helpers'; import { initiateOauth } from '../../lib/oauth'; @@ -14,6 +14,18 @@ class WattyDriver extends Driver { onPair(session: PairSession) { this.#api = new TibberApi(this.log, this.homey.settings); + session.setHandler('showView', async (view) => { + if (view == 'loading'){ + if (env.ACCESS_TOKEN != undefined){ + // If access token is provided, don't show oAuth popup. + await session.showView('list_devices'); + } + else{ + await session.showView('login_oauth2'); + } + } + }); + session.setHandler( 'list_devices', createListDeviceHandler( diff --git a/lib/api.ts b/lib/api.ts index 6a6997a..bcb36f1 100644 --- a/lib/api.ts +++ b/lib/api.ts @@ -5,7 +5,7 @@ import { GraphQLWsLink } from '@apollo/client/link/subscriptions'; import { createClient } from 'graphql-ws'; import moment from 'moment-timezone'; import type ManagerSettings from 'homey/manager/settings'; -import { Device } from 'homey'; +import { Device, env } from 'homey'; import { UserAgentWebSocket } from './UserAgentWebSocket'; import { queries } from './queries'; import { @@ -408,6 +408,9 @@ export class TibberApi { } getDefaultToken(): string { + if (env.ACCESS_TOKEN != undefined){ + return env.ACCESS_TOKEN; + } return this.#homeySettings.get('token'); } } diff --git a/package-lock.json b/package-lock.json index a7bf1a4..25bdbec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6891,6 +6891,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/widgets/price/api.js b/widgets/price/api.js new file mode 100644 index 0000000..d7e4162 --- /dev/null +++ b/widgets/price/api.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = { + + async triggerRealtimeData({ homey, query }) { + return await homey.app.apiTriggerRealtimeData( ); + } + +}; \ No newline at end of file diff --git a/widgets/price/preview-dark.png b/widgets/price/preview-dark.png new file mode 100644 index 0000000..3f7b4e1 Binary files /dev/null and b/widgets/price/preview-dark.png differ diff --git a/widgets/price/preview-light.png b/widgets/price/preview-light.png new file mode 100644 index 0000000..a62810b Binary files /dev/null and b/widgets/price/preview-light.png differ diff --git a/widgets/price/public/avg.svg b/widgets/price/public/avg.svg new file mode 100644 index 0000000..f9a9056 --- /dev/null +++ b/widgets/price/public/avg.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/widgets/price/public/coin.svg b/widgets/price/public/coin.svg new file mode 100644 index 0000000..b2047e9 --- /dev/null +++ b/widgets/price/public/coin.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/widgets/price/public/echarts.min.js b/widgets/price/public/echarts.min.js new file mode 100644 index 0000000..780fed8 --- /dev/null +++ b/widgets/price/public/echarts.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).echarts={})}(this,function(t){"use strict";var v=function(t,e){return(v=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function x(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}var p=new function(){this.browser=new x,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};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(p.wxa=!0,p.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?p.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(p.node=!0,p.svgSupported=!0):(et=navigator.userAgent,se=(Wt=p).browser,st=et.match(/Firefox\/([\d.]+)/),z=et.match(/MSIE\s([\d.]+)/)||et.match(/Trident\/.+?rv:(([\d.]+))/),tt=et.match(/Edge?\/([\d.]+)/),et=/micromessenger/i.test(et),st&&(se.firefox=!0,se.version=st[1]),z&&(se.ie=!0,se.version=z[1]),tt&&(se.edge=!0,se.version=tt[1],se.newEdge=18<+tt[1].split(".")[0]),et&&(se.weChat=!0),Wt.svgSupported="undefined"!=typeof SVGRect,Wt.touchEventsSupported="ontouchstart"in window&&!se.ie&&!se.edge,Wt.pointerEventsSupported="onpointerdown"in window&&(se.edge||se.ie&&11<=+se.version),Wt.domSupported="undefined"!=typeof document,st=document.documentElement.style,Wt.transform3dSupported=(se.ie&&"transition"in st||se.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in st)&&!("OTransition"in st),Wt.transformSupported=Wt.transform3dSupported||se.ie&&9<=+se.version);var b=12,w="sans-serif",K=b+"px "+w;var S,I,T=function(t){var e={};if("undefined"!=typeof JSON)for(var n=0;n>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}}return n}(e,o),o,r);if(e)return e(t,n,i),1}}function me(t){return"CANVAS"===t.nodeName.toUpperCase()}var ve=/([&<>"'])/g,_e={"&":"&","<":"<",">":">",'"':""","'":"'"};function xe(t){return null==t?"":(t+"").replace(ve,function(t,e){return _e[e]})}var be=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,we=[],Se=p.browser.firefox&&+p.browser.version.split(".")[0]<39;function Me(t,e,n,i){return n=n||{},i?Ie(t,e,n):Se&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):Ie(t,e,n),n}function Ie(t,e,n){if(p.domSupported&&t.getBoundingClientRect){var i,r=e.clientX,e=e.clientY;if(me(t))return i=t.getBoundingClientRect(),n.zrX=r-i.left,n.zrY=e-i.top;if(ye(we,t,r,e))return n.zrX=we[0],n.zrY=we[1]}n.zrX=n.zrY=0}function Te(t){return t||window.event}function Ce(t,e,n){var i;return null==(e=Te(e)).zrX&&((i=e.type)&&0<=i.indexOf("touch")?(i=("touchend"!==i?e.targetTouches:e.changedTouches)[0])&&Me(t,i,e,n):(Me(t,e,e,n),t=(t=(i=e).wheelDelta)||(n=i.deltaX,i=i.deltaY,null==n||null==i?t:3*(0!==i?Math.abs(i):Math.abs(n))*(0=n.x&&t<=n.x+n.width&&e>=n.y&&e<=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(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},$e.applyTransform=function(t,e,n){var i,r,o,a;n?n[1]<1e-5&&-1e-5t.getWidth()||n<0||n>t.getHeight()}G(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){sn.prototype[a]=function(t){var e,n,i=t.zrX,r=t.zrY,o=cn(this,i,r);if("mouseup"===a&&o||(n=(e=this.findHover(i,r)).target),"mousedown"===a)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===a)this._upEl=n;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4>>1])<0?l=o:s=1+o;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function vn(t,e,n,i){var f,g,o,a,y,s,m,r=(i=i||t.length)-(n=n||0);if(!(r<2)){var l=0;if(ra[t+1])break;p(t)}},forceMergeRuns:function(){for(;1>=1;return t+e}(r);do{}while((l=fn(t,n,i,e))=this._maxSize&&0>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===i?parseInt(n.slice(4),16)/15:1),gi(t,e),e):void ci(e,0,0,0,1):7===i||9===i?0<=(r=parseInt(n.slice(1,7),16))&&r<=16777215?(ci(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===i?parseInt(n.slice(7),16)/255:1),gi(t,e),e):void ci(e,0,0,0,1):void 0;var r=n.indexOf("("),o=n.indexOf(")");if(-1!==r&&o+1===i){var i=n.substr(0,r),a=n.substr(r+1,o-(r+1)).split(","),s=1;switch(i){case"rgba":if(4!==a.length)return 3===a.length?ci(e,+a[0],+a[1],+a[2],1):ci(e,0,0,0,1);s=li(a.pop());case"rgb":return 3<=a.length?(ci(e,si(a[0]),si(a[1]),si(a[2]),3===a.length?s:li(a[3])),gi(t,e),e):void ci(e,0,0,0,1);case"hsla":return 4!==a.length?void ci(e,0,0,0,1):(a[3]=li(a[3]),mi(a,e),gi(t,e),e);case"hsl":return 3!==a.length?void ci(e,0,0,0,1):(mi(a,e),gi(t,e),e);default:return}}ci(e,0,0,0,1)}}function mi(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=li(t[1]),r=li(t[2]),i=r<=.5?r*(i+1):r+i-r*i,r=2*r-i;return ci(e=e||[],oi(255*ui(r,i,n+1/3)),oi(255*ui(r,i,n)),oi(255*ui(r,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function vi(t,e){var n=yi(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255e);n++);n=g(n-1,c-2)}r=h[n+1],i=h[n]}i&&r&&(this._lastFr=n,this._lastFrP=e,f=r.percent-i.percent,o=0==f?1:g((e-i.percent)/f,1),r.easingFunc&&(o=r.easingFunc(o)),g=s?this._additiveValue:d?Qi:t[p],($i(u)||d)&&(g=g||(this._additiveValue=[])),this.discrete?t[p]=(o<1?i:r).rawValue:$i(u)?(1===u?Xi:function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;athis._sleepAfterStill)&&this.animation.stop()},fo.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},fo.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},fo.prototype.refreshHover=function(){this._needsRefreshHover=!0},fo.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},fo.prototype.resize=function(t){this._disposed||(this.painter.resize((t=t||{}).width,t.height),this.handler.resize())},fo.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},fo.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},fo.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},fo.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},fo.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},fo.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},fo.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},fo.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},fo.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e=e.maxIterations){t+=e.ellipsis;break}var s=0===a?function(t,e,n,i){for(var r=0,o=0,a=t.length;oo){0i.width&&(o=e.split("\n"),c=!0),i.accumWidth=t):(t=Ea(e,h,i.width,i.breakAll,i.accumWidth),i.accumWidth=t.accumWidth+n,a=t.linesWidths,o=t.lines)):o=e.split("\n");for(var p=0;pthis._ux||i>this._uy;return this.addData(is.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r?(this._xi=t,this._yi=e,this._pendingPtDist=0):(r=n*n+i*i)>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=r),this},r.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(is.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(is.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},r.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),vs[0]=i,vs[1]=r,s=o,(l=_s((a=vs)[0]))<0&&(l+=ys),h=l-a[0],u=a[1],u+=h,!s&&ys<=u-l?u=l+ys:s&&ys<=l-u?u=l-ys:!s&&uu.length&&(this._expandData(),u=this.data);for(var h=0;hn||fs(y)>i||c===e-1)&&(f=Math.sqrt(C*C+y*y),r=g,o=_);break;case is.C:var m=t[c++],v=t[c++],_=(g=t[c++],t[c++]),x=t[c++],b=t[c++],f=function(t,e,n,i,r,o,a,s,l){for(var u=t,h=e,c=0,p=1/l,d=1;d<=l;d++){var f=d*p,g=Vn(t,n,r,a,f),f=Vn(e,i,o,s,f),y=g-u,m=f-h;c+=Math.sqrt(y*y+m*m),u=g,h=f}return c}(r,o,m,v,g,_,x,b,10),r=x,o=b;break;case is.Q:f=function(t,e,n,i,r,o,a){for(var s=t,l=e,u=0,h=1/a,c=1;c<=a;c++){var p=c*h,d=Un(t,n,r,p),p=Un(e,i,o,p),f=d-s,g=p-l;u+=Math.sqrt(f*f+g*g),s=d,l=p}return u}(r,o,m=t[c++],v=t[c++],g=t[c++],_=t[c++],10),r=g,o=_;break;case is.A:var x=t[c++],b=t[c++],w=t[c++],S=t[c++],M=t[c++],I=t[c++],T=I+M;c+=1,d&&(a=ps(M)*w+x,s=ds(M)*S+b),f=cs(w,S)*hs(ys,Math.abs(I)),r=ps(T)*w+x,o=ds(T)*S+b;break;case is.R:a=r=t[c++],s=o=t[c++],f=2*t[c++]+2*t[c++];break;case is.Z:var C=a-r,y=s-o;f=Math.sqrt(C*C+y*y),r=a,o=s}0<=f&&(u+=l[h++]=f)}return this._pathLen=u},r.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h=this.data,E=this._ux,z=this._uy,V=this._len,c=e<1,p=0,d=0,f=0;if(!c||(this._pathSegLen||this._calculateLength(),a=this._pathSegLen,s=e*this._pathLen))t:for(var g=0;gs){var w=(s-p)/y;t.lineTo(r*(1-w)+v*w,o*(1-w)+_*w);break t}p+=y}t.lineTo(v,_),r=v,o=_,f=0}else{x=x*x+b*b;fs){Gn(r,S,I,b,w=(s-p)/y,rs),Gn(o,M,T,x,w,os),t.bezierCurveTo(rs[1],os[1],rs[2],os[2],rs[3],os[3]);break t}p+=y}t.bezierCurveTo(S,M,I,T,b,x),r=b,o=x;break;case is.Q:if(S=h[g++],M=h[g++],I=h[g++],T=h[g++],c){if(p+(y=a[d++])>s){qn(r,S,I,w=(s-p)/y,rs),qn(o,M,T,w,os),t.quadraticCurveTo(rs[1],os[1],rs[2],os[2]);break t}p+=y}t.quadraticCurveTo(S,M,I,T),r=I,o=T;break;case is.A:var C=h[g++],k=h[g++],D=h[g++],A=h[g++],L=h[g++],O=h[g++],P=h[g++],F=!h[g++],H=As&&(N=L+O*(s-p)/y,G=!0),p+=y),R&&t.ellipse?t.ellipse(C,k,D,A,P,L,N,F):t.arc(C,k,H,L,N,F),G)break t;B&&(n=ps(L)*D+C,i=ds(L)*A+k),r=ps(N)*D+C,o=ds(N)*A+k;break;case is.R:n=r=h[g],i=o=h[g+1],v=h[g++],_=h[g++];O=h[g++],R=h[g++];if(c){if(p+(y=a[d++])>s){P=s-p;t.moveTo(v,_),t.lineTo(v+hs(P,O),_),0<(P-=O)&&t.lineTo(v+O,_+hs(P,R)),0<(P-=R)&&t.lineTo(v+cs(O-P,0),_+R),0<(P-=O)&&t.lineTo(v,_+cs(R-P,0));break t}p+=y}t.rect(v,_,O,R);break;case is.Z:if(c){if(p+(y=a[d++])>s){t.lineTo(r*(1-(w=(s-p)/y))+n*w,o*(1-w)+i*w);break t}p+=y}t.closePath(),r=n,o=i}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.CMD=is,r.initDefaultProps=((e=r.prototype)._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,void(e._version=0));var xs=r;function r(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}function bs(t,e,n,i,r,o,a){var s;if(0!==r)return s=0,!(e+(r=r)n||s<-n)return 0;var e=Math.sqrt(n*n-s*s);if(Ds[0]=-e,Ds[1]=e,(n=Math.abs(i-r))<1e-4)return 0;if(Cs-1e-4<=n)return r=Cs,h=o?1:-1,a>=Ds[i=0]+t&&a<=Ds[1]+t?h:0;rMath.PI/2&&c<1.5*Math.PI?-h:h)}return l}(y,m,_,x,x+b,w,I,r);u=Math.cos(x+b)*v+y,h=Math.sin(x+b)*_+m;break;case Ts.R:if(c=u=a[d++],p=h=a[d++],S=c+a[d++],M=p+a[d++],n){if(bs(c,p,S,p,e,i,r)||bs(S,p,S,M,e,i,r)||bs(S,M,c,M,e,i,r)||bs(c,M,c,p,e,i,r))return!0}else l=(l+=Is(S,p,S,M,i,r))+Is(c,M,c,p,i,r);break;case Ts.Z:if(n){if(bs(u,h,c,p,e,i,r))return!0}else l+=Is(u,h,c,p,i,r);u=c,h=p}}return n||(t=h,o=p,Math.abs(t-o)i.len()&&(uu||t.newline?(c=0,n=r,p+=d+l,o.height):Math.max(d,o.height)):(r=o.height+(e?-e.y+o.y:0),(i=p+r)>h||t.newline?(c+=d+l,p=0,i=r,o.width):Math.max(d,o.width)),t.newline||(t.x=c,t.y=p,t.markRedraw(),"horizontal"===a?c=n+l:p=i+l)})}var qp=Yp;function Zp(t,e,n){n=Bp(n||0);var i=e.width,r=e.height,o=wo(t.left,i),a=wo(t.top,r),e=wo(t.right,i),s=wo(t.bottom,r),l=wo(t.width,i),u=wo(t.height,r),h=n[2]+n[0],c=n[1]+n[3],p=t.aspect;switch(isNaN(l)&&(l=i-e-c-o),isNaN(u)&&(u=r-s-h-a),null!=p&&(isNaN(l)&&isNaN(u)&&(i/re)return t[i];return t[n-1]}(r,n):i)||i)&&r.length?(n=r[o],t&&(e[t]=n),a.paletteIdx=(o+1)%r.length,n):void 0},Id.prototype.clearColorPalette=function(){var t,e;(e=Sd)(t=this).paletteIdx=0,e(t).paletteNameMap={}},Id);function Id(){}var Td,Cd,kd,Dd,Ad="\0_ec_inner",Ld=(u(o,Dd=Qc),o.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new Qc(i),this._locale=new Qc(r),this._optionManager=o},o.prototype.setOption=function(t,e,n){e=Rd(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},o.prototype.resetOption=function(t,e){return this._resetOption(t,Rd(e))},o.prototype._resetOption=function(t,e){var n,i=!1,r=this._optionManager;return t&&"recreate"!==t||(n=r.mountOption("recreate"===t),this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(n,e)):kd(this,n),i=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(n=r.getTimelineOption(this))&&(i=!0,this._mergeOption(n,e)),t&&"recreate"!==t&&"media"!==t||(n=r.getMediaOption(this)).length&&G(n,function(t){i=!0,this._mergeOption(t,e)},this),i},o.prototype.mergeOption=function(t){this._mergeOption(t,null)},o.prototype._mergeOption=function(i,t){var r=this.option,h=this._componentsMap,c=this._componentsCount,n=[],o=R(),p=t&&t.replaceMergeMainTypeMap;vd(this).datasetMap=R(),G(i,function(t,e){null!=t&&(g.hasClass(e)?e&&(n.push(e),o.set(e,!0)):r[e]=null==r[e]?_(t):d(r[e],t,!0))}),p&&p.each(function(t,e){g.hasClass(e)&&!o.get(e)&&(n.push(e),o.set(e,!0))}),g.topologicalTravel(n,g.getAllClassMainTypes(),function(o){t=this,n=Go(i[e=o]);var t=(e=(e=wd.get(e))&&e(t))?n.concat(e):n,e=h.get(o),n=Yo(e,t,e?p&&p.get(o)?"replaceMerge":"normalMerge":"replaceAll");Qo(n,o,g),r[o]=null,h.set(o,null),c.set(o,0);var a,s=[],l=[],u=0;G(n,function(t,e){var n=t.existing,i=t.newOption;if(i){var r=g.getClass(o,t.keyInfo.subType,!("series"===o));if(!r)return;if("tooltip"===o){if(a)return;a=!0}n&&n.constructor===r?(n.name=t.keyInfo.name,n.mergeOption(i,this),n.optionUpdated(i,!1)):(e=F({componentIndex:e},t.keyInfo),F(n=new r(i,this,this,e),e),t.brandNew&&(n.__requireNewView=!0),n.init(i,this,this),n.optionUpdated(null,!0))}else n&&(n.mergeOption({},this),n.optionUpdated({},!1));n?(s.push(n.option),l.push(n),u++):(s.push(void 0),l.push(void 0))},this),r[o]=s,h.set(o,l),c.set(o,u),"series"===o&&Td(this)},this),this._seriesIndices||Td(this)},o.prototype.getOption=function(){var a=_(this.option);return G(a,function(t,e){if(g.hasClass(e)){for(var n=Go(t),i=n.length,r=!1,o=i-1;0<=o;o--)n[o]&&!$o(n[o])?r=!0:(n[o]=null,r||i--);n.length=i,a[e]=n}}),delete a[Ad],a},o.prototype.getTheme=function(){return this._theme},o.prototype.getLocaleModel=function(){return this._locale},o.prototype.setUpdatePayload=function(t){this._payload=t},o.prototype.getUpdatePayload=function(){return this._payload},o.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){t=n[e||0];if(t)return t;if(null==e)for(var i=0;ig[1]&&(g[1]=f)}return{start:a,end:this._rawCount=this._count=s}},l.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=B(o,function(t){return t.property}),u=0;uf[1]&&(f[1]=g)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},l.prototype.count=function(){return this._count},l.prototype.get=function(t,e){return 0<=e&&e=this._rawCount||t<0)){if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}}return-1},l.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],r=[];if(i){null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=u&&v<=h||isNaN(v))&&(a[s++]=p),p++;l=!0}else if(2===r){for(var d=c[i[0]],g=c[i[1]],y=t[i[1]][0],m=t[i[1]][1],f=0;f=u&&v<=h||isNaN(v))&&(a[s++]=x)}else for(f=0;ft[S][1])&&(b=!1)}b&&(a[s++]=e.getRawIndex(f))}return sy[1]&&(y[1]=g)}}},l.prototype.lttbDownSample=function(t,e){var n,i=this.clone([t],!0),r=i._chunks[t],o=this.count(),a=0,s=Math.floor(1/e),l=this.getRawIndex(0),u=new(wg(this._rawCount))(Math.min(2*(Math.ceil(o/s)+2),o));u[a++]=l;for(var h=1;hx&&(x=n,b=M)}0h[1]&&(h[1]=y),c[p++]=m}return r._count=p,r._indices=c,r._updateGetRawIdx(),r},l.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();rthis.getShallow("animationThreshold")?!1:t)},s.prototype.restoreData=function(){this.dataTask.dirty()},s.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return Md.prototype.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},s.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},s.prototype.getProgressive=function(){return this.get("progressive")},s.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},s.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},s.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n)this.option.selectedMap={},this._selectedDataIndicesMap={};else for(var o=0;oe.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Gg(e,n){G(Vt(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,ft(Wg,n))})}function Wg(t,e){t=Ug(t);return t&&t.setOutputEnd((e||this).count()),e}function Ug(t){var e,n=(t.ecModel||{}).scheduler,n=n&&n.getPipeline(t.uid);if(n)return(n=n.currentTask)&&(e=n.agentStubMap)?e.get(t.uid):n}ut(zg,Vf),ut(zg,Md),da(zg,g);Yg.prototype.init=function(t,e){},Yg.prototype.render=function(t,e,n,i){},Yg.prototype.dispose=function(t,e){},Yg.prototype.updateView=function(t,e,n,i){},Yg.prototype.updateLayout=function(t,e,n,i){},Yg.prototype.updateVisual=function(t,e,n,i){},Yg.prototype.toggleBlurSeries=function(t,e,n){},Yg.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)};var Xg=Yg;function Yg(){this.group=new so,this.uid=ep("viewComponent")}function qg(){var o=ta();return function(t){var e=o(t),t=t.pipelineContext,n=!!e.large,i=!!e.progressiveRender,r=e.large=!(!t||!t.large),e=e.progressiveRender=!(!t||!t.progressiveRender);return!(n==r&&i==e)&&"reset"}}pa(Xg),ma(Xg);var Zg=ta(),jg=qg(),Kg=($g.prototype.init=function(t,e){},$g.prototype.render=function(t,e,n,i){},$g.prototype.highlight=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&Jg(t,i,"emphasis")},$g.prototype.downplay=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&Jg(t,i,"normal")},$g.prototype.remove=function(t,e){this.group.removeAll()},$g.prototype.dispose=function(t,e){},$g.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},$g.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},$g.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},$g.prototype.eachRendered=function(t){Ic(this.group,t)},$g.markUpdateMethod=function(t,e){Zg(t).updateMethod=e},$g.protoInitialize=void($g.prototype.type="chart"),$g);function $g(){this.group=new so,this.uid=ep("viewChart"),this.renderTask=Ff({plan:ty,reset:ey}),this.renderTask.context={view:this}}function Qg(t,e,n){t&&pu(t)&&("emphasis"===e?Zl:jl)(t,n)}function Jg(e,t,n){var i,r=Jo(e,t),o=t&&null!=t.highlightKey?(t=t.highlightKey,i=null==(i=_l[t])&&vl<=32?_l[t]=vl++:i):null;null!=r?G(Go(r),function(t){Qg(e.getItemGraphicEl(t),n,o)}):e.eachItemGraphicEl(function(t){Qg(t,n,o)})}function ty(t){return jg(t.model)}function ey(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,t=t.view,a=r&&Zg(r).updateMethod,o=o?"incrementalPrepareRender":a&&t[a]?a:"render";return"render"!==o&&t[o](e,n,i,r),ny[o]}pa(Kg),ma(Kg);var ny={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};function iy(t,r,o){var a,s,l,u,h,c=0,p=0,d=null;function f(){p=(new Date).getTime(),d=null,t.apply(l,u||[])}r=r||0;function e(){for(var t=[],e=0;en.blockIndex?n.step:null,modBy:null!=(t=i&&i.modDataCount)?Math.ceil(t/e):null,modDataCount:t}},py.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},py.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),e=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,r=t.get("large")&&i>=t.get("largeThreshold"),i="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:e,modDataCount:i,large:r}},py.prototype.restorePipelines=function(t){var i=this,r=i._pipelineMap=R();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;r.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),i._pipe(t,t.dataTask)})},py.prototype.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.api.getModel(),r=this.api;G(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,{});kt(!(t.reset&&t.overallReset),""),t.reset&&this._createSeriesStageTask(t,e,i,r),t.overallReset&&this._createOverallStageTask(t,e,i,r)},this)},py.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},py.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},py.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},py.prototype._performStageTasks=function(t,s,l,u){u=u||{};var h=!1,c=this;function p(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}G(t,function(i,t){var e,n,r,o,a;u.visualType&&u.visualType!==i.visualType||(e=(n=c._stageTaskMap.get(i.uid)).seriesTaskMap,(n=n.overallTask)?((o=n.agentStubMap).each(function(t){p(u,t)&&(t.dirty(),r=!0)}),r&&n.dirty(),c.updatePayload(n,l),a=c.getPerformArgs(n,u.block),o.each(function(t){t.perform(a)}),n.perform(a)&&(h=!0)):e&&e.each(function(t,e){p(u,t)&&t.dirty();var n=c.getPerformArgs(t,u.block);n.skip=!i.performRawSeries&&s.isSeriesFiltered(t.context.model),c.updatePayload(t,l),t.perform(n)&&(h=!0)}))}),this.unfinished=h||this.unfinished},py.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},py.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}}while(e=e.getUpstream())})},py.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},py.prototype._createSeriesStageTask=function(n,t,i,r){var o=this,a=t.seriesTaskMap,s=t.seriesTaskMap=R(),t=n.seriesType,e=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||Ff({plan:my,reset:vy,count:by}));e.context={model:t,ecModel:i,api:r,useClearVisual:n.isVisual&&!n.isLayout,plan:n.plan,reset:n.reset,scheduler:o},o._pipe(t,e)}n.createOnAllSeries?i.eachRawSeries(l):t?i.eachRawSeriesByType(t,l):e&&e(i,r).each(l)},py.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||Ff({reset:dy}),a=(o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r},o.agentStubMap),s=o.agentStubMap=R(),e=t.seriesType,l=t.getTargetSeries,u=!0,h=!1;function c(t){var e=t.uid,e=s.set(e,a&&a.get(e)||(h=!0,Ff({reset:fy,onDirty:yy})));e.context={model:t,overallProgress:u},e.agent=o,e.__block=u,r._pipe(t,e)}kt(!t.createOnAllSeries,""),e?n.eachRawSeriesByType(e,c):l?l(n,i).each(c):(u=!1,G(n.getSeries(),c)),h&&o.dirty()},py.prototype._pipe=function(t,e){t=t.uid,t=this._pipelineMap.get(t);t.head||(t.head=e),t.tail&&t.tail.pipe(e),(t.tail=e).__idxInPipeline=t.count++,e.__pipeline=t},py.wrapStageHandler=function(t,e){return(t=C(t)?{overallReset:t,seriesType:function(t){wy=null;try{t(Sy,My)}catch(t){}return wy}(t)}:t).uid=ep("stageHandler"),e&&(t.visualType=e),t};var cy=py;function py(t,e,n,i){this._stageTaskMap=R(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function dy(t){t.overallReset(t.ecModel,t.api,t.payload)}function fy(t){return t.overallProgress&&gy}function gy(){this.agent.dirty(),this.getDownstream().dirty()}function yy(){this.agent&&this.agent.dirty()}function my(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function vy(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=Go(t.reset(t.model,t.ecModel,t.api,t.payload));return 1'+t.dom+""}),f.painter.getSvgRoot().innerHTML=g,i.connectedBackgroundColor&&f.painter.setBackgroundColor(i.connectedBackgroundColor),f.refreshImmediately(),f.painter.toDataURL()):(i.connectedBackgroundColor&&f.add(new Js({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),G(p,function(t){t=new Xs({style:{x:t.left*e-l,y:t.top*e-u,image:t.dom}});f.add(t)}),f.refreshImmediately(),d.toDataURL("image/"+(i&&i.type||"png")))):this.getDataURL(i);this.id},h.prototype.convertToPixel=function(t,e){return H0(this,"convertToPixel",t,e)},h.prototype.convertFromPixel=function(t,e){return H0(this,"convertFromPixel",t,e)},h.prototype.containPixel=function(t,i){var r;if(!this._disposed)return G(na(this._model,t),function(t,n){0<=n.indexOf("Models")&&G(t,function(t){var e=t.coordinateSystem;e&&e.containPoint?r=r||!!e.containPoint(i):"seriesModels"===n&&(e=this._chartsMap[t.__viewId])&&e.containPoint&&(r=r||e.containPoint(i,t))},this)},this),!!r;this.id},h.prototype.getVisual=function(t,e){var t=na(this._model,t,{defaultMainType:"series"}),n=t.seriesModel.getData(),t=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;return null!=t?Oy(n,t,e):Py(n,e)},h.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},h.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},h.prototype._initEvents=function(){var t,n,i,s=this;G(cm,function(a){function t(t){var n,e,i,r=s.getModel(),o=t.target;"globalout"===a?n={}:o&&Ny(o,function(t){var e,t=k(t);return t&&null!=t.dataIndex?(e=t.dataModel||r.getSeriesByIndex(t.seriesIndex),n=e&&e.getDataParams(t.dataIndex,t.dataType,o)||{},1):t.eventData&&(n=F({},t.eventData),1)},!0),n&&(e=n.componentType,i=n.componentIndex,"markLine"!==e&&"markPoint"!==e&&"markArea"!==e||(e="series",i=n.seriesIndex),i=(e=e&&null!=i&&r.getComponent(e,i))&&s["series"===e.mainType?"_chartsMap":"_componentsMap"][e.__viewId],n.event=t,n.type=a,s._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:e,view:i},s.trigger(a,n))}t.zrEventfulCallAtLast=!0,s._zr.on(a,t,s)}),G(dm,function(t,e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),G(["selectchanged"],function(e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),t=this._messageCenter,i=(n=this)._api,t.on("selectchanged",function(t){var e=i.getModel();t.isFromClick?(Ry("map","selectchanged",n,e,t),Ry("pie","selectchanged",n,e,t)):"select"===t.fromAction?(Ry("map","selected",n,e,t),Ry("pie","selected",n,e,t)):"unselect"===t.fromAction&&(Ry("map","unselected",n,e,t),Ry("pie","unselected",n,e,t))})},h.prototype.isDisposed=function(){return this._disposed},h.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},h.prototype.dispose=function(){var t,e,n;this._disposed?this.id:(this._disposed=!0,this.getDom()&&aa(this.getDom(),Sm,""),e=(t=this)._api,n=t._model,G(t._componentsViews,function(t){t.dispose(n,e)}),G(t._chartsViews,function(t){t.dispose(n,e)}),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete _m[t.id])},h.prototype.resize=function(t){if(!this[D0])if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var e=e.resetOption("media"),n=t&&t.silent;this[A0]&&(null==n&&(n=this[A0].silent),e=!0,this[A0]=null),this[D0]=!0;try{e&&z0(this),F0.update.call(this,{type:"resize",animation:F({duration:0},t&&t.animation)})}catch(t){throw this[D0]=!1,t}this[D0]=!1,U0.call(this,n),X0.call(this,n)}}},h.prototype.showLoading=function(t,e){this._disposed?this.id:(O(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),vm[t]&&(t=vm[t](this._api,e),e=this._zr,this._loadingFX=t,e.add(t)))},h.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},h.prototype.makeActionFromEvent=function(t){var e=F({},t);return e.type=dm[t.type],e},h.prototype.dispatchAction=function(t,e){var n;this._disposed?this.id:(O(e)||(e={silent:!!e}),pm[t.type]&&this._model&&(this[D0]?this._pendingActions.push(t):(n=e.silent,W0.call(this,t,n),(t=e.flush)?this._zr.flush():!1!==t&&p.browser.weChat&&this._throttledZrFlush(),U0.call(this,n),X0.call(this,n))))},h.prototype.updateLabelLayout=function(){C0.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},h.prototype.appendData=function(t){var e;this._disposed?this.id:(e=t.seriesIndex,this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp())},h.internalField=(z0=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),V0(t,!0),V0(t,!1),e.plan()},V0=function(t,r){for(var o=t._model,a=t._scheduler,s=r?t._componentsViews:t._chartsViews,l=r?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,e=0;es.get("hoverLayerThreshold")&&!p.node&&!p.worker&&s.eachSeries(function(t){t.preventUsingHoverLayer||(t=i._chartsMap[t.__viewId]).__alive&&t.eachRendered(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}),C0.trigger("series:afterupdate",t,e,n)},J0=function(t){t[L0]=!0,t.getZr().wakeUp()},tm=function(t){t[L0]&&(t.getZr().storage.traverse(function(t){ic(t)||sm(t)}),t[L0]=!1)},$0=function(n){return u(t,e=Nd),t.prototype.getCoordinateSystems=function(){return n._coordSysMgr.getCoordinateSystems()},t.prototype.getComponentByElement=function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return n._model.getComponent(e.mainType,e.index);t=t.parent}},t.prototype.enterEmphasis=function(t,e){Zl(t,e),J0(n)},t.prototype.leaveEmphasis=function(t,e){jl(t,e),J0(n)},t.prototype.enterBlur=function(t){Kl(t),J0(n)},t.prototype.leaveBlur=function(t){$l(t),J0(n)},t.prototype.enterSelect=function(t){Ql(t),J0(n)},t.prototype.leaveSelect=function(t){Jl(t),J0(n)},t.prototype.getModel=function(){return n.getModel()},t.prototype.getViewOfComponentModel=function(t){return n.getViewOfComponentModel(t)},t.prototype.getViewOfSeriesModel=function(t){return n.getViewOfSeriesModel(t)},new t(n);function t(){return null!==e&&e.apply(this,arguments)||this}var e},void(Q0=function(i){function r(t,e){for(var n=0;ne[1]&&(e[1]=t[1])},Iv.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Iv.prototype.getExtent=function(){return this._extent.slice()},Iv.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},Iv.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},Iv.prototype.isBlank=function(){return this._isBlank},Iv.prototype.setBlank=function(t){this._isBlank=t};var Mv=Iv;function Iv(t){this._setting=t||{},this._extent=[1/0,-1/0]}ma(Mv);var Tv=0,Cv=(kv.createByAxisModel=function(t){var t=t.option,e=t.data,e=e&&B(e,Dv);return new kv({categories:e,needCollect:!e,deduplication:!1!==t.dedplication})},kv.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},kv.prototype.parseAndCollect=function(t){var e,n,i=this._needCollect;return X(t)||i?(i&&!this._deduplication?(e=this.categories.length,this.categories[e]=t):null==(e=(n=this._getOrCreateMap()).get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e):t},kv.prototype._getOrCreateMap=function(){return this._map||(this._map=R(this.categories))},kv);function kv(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++Tv}function Dv(t){return O(t)&&null!=t.value?t.value:t+""}function Av(t){return"interval"===t.type||"log"===t.type}function Lv(t,e,n,i){var r={},o=t[1]-t[0],o=r.interval=Ro(o/e,!0),e=(null!=n&&on[1]&&(n[0]=n[1]),r}function Ov(t){var e=Math.pow(10,Po(t)),t=t/e;return t?2===t?t=3:3===t?t=5:t*=2:t=1,So(t*e)}function Pv(t){return Io(t)+2}function Rv(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Nv(t,e){return t>=e[0]&&t<=e[1]}function Ev(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function zv(t,e){return t*(e[1]-e[0])+e[0]}u(Fv,Vv=Mv),Fv.prototype.parse=function(t){return null==t?NaN:X(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},Fv.prototype.contain=function(t){return Nv(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},Fv.prototype.normalize=function(t){return Ev(t=this._getTickNumber(this.parse(t)),this._extent)},Fv.prototype.scale=function(t){return t=Math.round(zv(t,this._extent)),this.getRawOrdinalNumber(t)},Fv.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},Fv.prototype.getMinorTicks=function(t){},Fv.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=t},Fv.prototype.getOrdinalMeta=function(){return this._ordinalMeta},Fv.prototype.calcNiceTicks=function(){},Fv.prototype.calcNiceExtent=function(){},Fv.type="ordinal";var Vv,Bv=Fv;function Fv(t){var t=Vv.call(this,t)||this,e=(t.type="ordinal",t.getSetting("ordinalMeta"));return U(e=e||new Cv({}))&&(e=new Cv({categories:B(e,function(t){return O(t)?t.value:t})})),t._ordinalMeta=e,t._extent=t.getSetting("extent")||[0,e.categories.length-1],t}Mv.registerClass(Bv);var Hv,Gv=So,Wv=(u(Uv,Hv=Mv),Uv.prototype.parse=function(t){return t},Uv.prototype.contain=function(t){return Nv(t,this._extent)},Uv.prototype.normalize=function(t){return Ev(t,this._extent)},Uv.prototype.scale=function(t){return zv(t,this._extent)},Uv.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},Uv.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},Uv.prototype.getInterval=function(){return this._interval},Uv.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Pv(t)},Uv.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(e){n[0]s&&o.push(t?{value:Gv(s+e,r)}:{value:n[1]})}return o},Uv.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&h=M[0]&&p<=M[1]&&a++)}u=(M[1]-M[0])/w;if(1.5*u=M[0]&&t.value<=M[1]&&!t.notAdd})}),function(t){return 0n&&(this._approxInterval=n),r_.length),t=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]>1^-(1&s),l=(l=t.charCodeAt(a+1)-64)>>1^-(1&l),r=s+=r,o=l+=o;i.push([s/n,l/n])}return i}function $_(t,o){return B(pt((t=(e=t).UTF8Encoding?(null==(r=(n=e).UTF8Scale)&&(r=1024),G(n.features,function(t){var e=t.geometry,n=e.encodeOffsets,i=e.coordinates;if(n)switch(e.type){case"LineString":e.coordinates=K_(i,n,r);break;case"Polygon":case"MultiLineString":j_(i,n,r);break;case"MultiPolygon":G(i,function(t,e){return j_(t,n[e],r)})}}),n.UTF8Encoding=!1,n):e).features,function(t){return t.geometry&&t.properties&&0l&&(l=s[h],u=h);++o[u],s[u]=0,++a}return B(o,function(t){return t/i})}(t,n)[e]||0},getPixelPrecision:Co,getPrecision:Io,getPrecisionSafe:To,isNumeric:zo,isRadianAroundZero:Do,linearMap:bo,nice:Ro,numericToNumber:Eo,parseDate:Lo,quantile:function(t,e){var e=(t.length-1)*e+1,n=Math.floor(e),i=+t[n-1];return(e=e-n)?i+e*(t[n]-i):i},quantity:Oo,quantityExponent:Po,reformIntervals:No,remRadian:ko,round:So}),xa=Object.freeze({__proto__:null,format:bp,parse:Lo}),jc=Object.freeze({__proto__:null,Arc:Ah,BezierCurve:Th,BoundingRect:N,Circle:e,CompoundPath:Ph,Ellipse:Bu,Group:so,Image:Xs,IncrementalDisplayable:Kh,Line:xh,LinearGradient:Vh,Polygon:ch,Polyline:gh,RadialGradient:Nh,Rect:Js,Ring:ah,Sector:nh,Text:rl,clipPointsByRect:function(t,n){return B(t,function(t){var e=t[0],e=lc(e,n.x),t=(e=uc(e,n.x+n.width),t[1]),t=lc(t,n.y);return[e,uc(t,n.y+n.height)]})},clipRectByRect:function(t,e){var n=lc(t.x,e.x),i=uc(t.x+t.width,e.x+e.width),r=lc(t.y,e.y),t=uc(t.y+t.height,e.y+e.height);if(n<=i&&r<=t)return{x:n,y:r,width:i-n,height:t-r}},createIcon:function(t,e,n){var i=(e=F({rectHover:!0},e)).style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(i.image=t.slice(8),V(i,n),new Xs(e)):fc(t.replace("path://",""),e,n,"center")},extendPath:function(t,e){return cc(t,e)},extendShape:function(t){return j.extend(t)},getShapeClass:dc,getTransform:xc,initProps:nc,makeImage:gc,makePath:fc,mergePath:mc,registerShape:pc,resizePath:vc,updateProps:ec}),qc=Object.freeze({__proto__:null,addCommas:zp,capitalFirst:function(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)},encodeHTML:xe,formatTime:function(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=(e=Lo(e))[(n=n?"getUTC":"get")+"FullYear"](),r=e[n+"Month"]()+1,o=e[n+"Date"](),a=e[n+"Hours"](),s=e[n+"Minutes"](),l=e[n+"Seconds"](),e=e[n+"Milliseconds"]();return t.replace("MM",_p(r,2)).replace("M",r).replace("yyyy",i).replace("yy",_p(i%100+"",2)).replace("dd",_p(o,2)).replace("d",o).replace("hh",_p(a,2)).replace("h",a).replace("mm",_p(s,2)).replace("m",s).replace("ss",_p(l,2)).replace("s",l).replace("SSS",_p(e,3))},formatTpl:Hp,getTextRect:function(t,e,n,i,r,o,a,s){return new rl({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()},getTooltipMarker:function(t,e){var n=(t=X(t)?{color:t,extraCssText:e}:t||{}).color,i=t.type,r=(e=t.extraCssText,t.renderMode||"html");return n?"html"===r?"subItem"===i?'':'':{renderMode:r,content:"{"+(t.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}:""},normalizeCssArray:Bp,toCamelCase:function(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),t=e?t&&t.charAt(0).toUpperCase()+t.slice(1):t},truncateText:Ca}),Wc=Object.freeze({__proto__:null,bind:dt,clone:_,curry:ft,defaults:V,each:G,extend:F,filter:pt,indexOf:H,inherits:lt,isArray:U,isFunction:C,isObject:O,isString:X,map:B,merge:d,reduce:ct}),Q_=ta();function J_(e,t){t=B(t,function(t){return e.scale.parse(t)});return"time"===e.type&&0o[1],h(l[0].coord,o[0])&&(t?l[0].coord=o[0]:l.shift()),t&&h(o[0],l[0].coord)&&l.unshift({coord:o[0]}),h(o[1],e.coord)&&(t?e.coord=o[1]:l.pop()),t)&&h(e.coord,o[1])&&l.push({coord:o[1]}),a},u1.prototype.getMinorTicksCoords=function(){var t;return"ordinal"===this.scale.type?[]:(t=this.model.getModel("minorTick").get("splitNumber"),B(this.scale.getMinorTicks(t=0=u}}for(var a,s=this.__startIndex;sr[0]){for(l=0;lt);l++);s=i[r[l]]}r.splice(l+1,0,t),(i[t]=e).virtual||(s?(n=s.dom).nextSibling?a.insertBefore(e.dom,n.nextSibling):a.appendChild(e.dom):a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom)),e.painter||(e.painter=this)}},y.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;ie&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?0<=r.height?"bottom":"top":0<=r.width?"right":"left"),h=Ac(i),l=(Dc(t,h,{labelFetcher:o,labelDataIndex:n,defaultText:yx(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:u}),t.getTextContent()),h=(s&&l&&(s=i.get(["label","position"]),t.textConfig.inside="middle"===s||null,function(t,e,n,i){if(yt(i))t.setTextConfig({rotation:i});else if(U(e))t.setTextConfig({rotation:0});else{var r,i=t.shape,o=i.clockwise?i.startAngle:i.endAngle,a=i.clockwise?i.endAngle:i.startAngle,s=(o+a)/2,i=n(e);switch(i){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=s;break;case"startAngle":case"insideStartAngle":r=o;break;case"endAngle":case"insideEndAngle":r=a;break;default:return t.setTextConfig({rotation:0})}n=1.5*Math.PI-r;"middle"===i&&n>Math.PI/2&&n<1.5*Math.PI&&(n-=Math.PI),t.setTextConfig({rotation:n})}}(t,"outside"===s?u:s,Rx(a),i.get(["label","rotate"]))),u=l,s=h,a=o.getRawValue(n),l=function(t){return mx(e,t)},u&&((u=zc(u)).prevValue=u.value,u.value=a,a=s.normal,u.valueAnimation=a.get("valueAnimation"),u.valueAnimation)&&(u.precision=a.get("precision"),u.defaultInterpolatedText=l,u.statesModels=s),i.getModel(["emphasis"]));su(t,h.get("focus"),h.get("blurScope"),h.get("disabled")),hu(t,i),null!=(o=r).startAngle&&null!=o.endAngle&&o.startAngle===o.endAngle&&(t.style.fill="none",t.style.stroke="none",G(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}function Ex(){}u(Bx,zx=j),Bx.prototype.getDefaultShape=function(){return new Ex},Bx.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;le[u-1].coord&&(e.reverse(),h.reverse()),function(t,e){var n,i,r=[],o=t.length;function a(t,e,n){var i=t.coord;return{coord:n,color:bi((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;si)return;return 1}(a,e)))return r=e.mapDimension(a.dim),o={},G(a.getViewLabels(),function(t){t=a.scale.getRawOrdinalNumber(t.tickValue);o[t]=1}),function(t){return!o.hasOwnProperty(e.get(r,t))}}}function Mb(t){for(var e,n,i=t.length/2;0e[1]&&e.reverse(),e},jb.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},jb.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)};var qb,Zb=jb;function jb(t,e,n,i,r){t=qb.call(this,t,e,n)||this;return t.index=0,t.type=i||"value",t.position=r||"bottom",t}function Kb(t){return"cartesian2d"===t.get("coordinateSystem")}function $b(i){var r={xAxisModel:null,yAxisModel:null};return G(r,function(t,e){var n=e.replace(/Model$/,""),n=i.getReferringComponents(n,ra).models[0];r[e]=n}),r}var Qb=Math.log;tw.prototype.getRect=function(){return this._rect},tw.prototype.update=function(t,e){var n=this._axesMap;function i(t){var d,e=W(t),n=e.length;if(n){for(var i=[],r=n-1;0<=r;r--){var o=t[+e[r]],a=o.model,s=o.scale;Av(s)&&a.get("alignTicks")&&null==a.get("interval")?i.push(o):(M_(s,a),Av(s)&&(d=o))}i.length&&(d||M_((d=i.pop()).scale,d.model),G(i,function(t){var e=t.scale,t=t.model,n=d.scale,i=Wv.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,n=i.getInterval.call(n),s=(t=S_(e,t)).extent,l=t.fixMin,t=t.fixMax,u=("log"===e.type&&(u=Qb(e.base),s=[Qb(s[0])/u,Qb(s[1])/u]),e.setExtent(s[0],s[1]),e.calcNiceExtent({splitNumber:a,fixMin:l,fixMax:t}),i.getExtent.call(e)),h=(l&&(s[0]=u[0]),t&&(s[1]=u[1]),i.getInterval.call(e)),c=s[0],p=s[1];if(l&&t)h=(p-c)/a;else if(l)for(p=s[0]+h*a;ps[0]&&isFinite(c)&&isFinite(s[0]);)h=Ov(h),c=s[1]-h*a;else{u=(h=e.getTicks().length-1>a?Ov(h):h)*a;(c=So((p=Math.ceil(s[1]/h)*h)-u))<0&&0<=s[0]?(c=0,p=So(u)):0h[1]?-1:1,a=["start"===l?h[0]-a*u:"end"===l?h[1]+a*u:(h[0]+h[1])/2,hw(l)?t.labelOffset+s*u:0],null!=(u=e.get("nameRotate"))&&(u=u*rw/180),hw(l)?r=ow.innerTextLayout(t.rotation,null!=u?u:t.rotation,s):(s=t.rotation,l=l,h=h,u=ko((u=u||0)-s),s=h[0]>h[1],h="start"===l&&!s||"start"!==l&&s,l=Do(u-rw/2)?(c=h?"bottom":"top","center"):Do(u-1.5*rw)?(c=h?"top":"bottom","center"):(c="middle",u<1.5*rw&&rw/2u[1]&&u.reverse(),(s=null==s||s>u[1]?u[1]:s)h[0]?s:r)[0]:o[0]=(a[0]>h[0]?r:s)[0],"y0"===n[1]?o[1]=(a[1]>h[1]?s:r)[1]:o[1]=(a[1]>h[1]?r:s)[1],i.getMarkerPosition(o,n,!0)):(a=[l=t.get(n[0],e),u=t.get(n[1],e)],c.clampData&&c.clampData(a,a),c.dataToPoint(a,!0)),gx(c,"cartesian2d")&&(r=c.getAxis("x"),s=c.getAxis("y"),l=t.get(n[0],e),u=t.get(n[1],e),HS(l)?h[0]=r.toGlobalCoord(r.getExtent()["x0"===n[0]?0:1]):HS(u)&&(h[1]=s.toGlobalCoord(s.getExtent()["y0"===n[1]?0:1]))),isNaN(d)||(h[0]=d),isNaN(p)||(h[1]=p)):h=[d,p],h}var XS,YS=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],qS=(u(ZS,XS=Kh),ZS.prototype.updateTransform=function(t,e,r){e.eachSeries(function(n){var i,t=Ew.getMarkerModelFromSeries(n,"markArea");t&&(i=t.getData()).each(function(e){var t=B(YS,function(t){return US(i,e,t,n,r)});i.setItemLayout(e,t),i.getItemGraphicEl(e).setShape("points",t)})},this)},ZS.prototype.renderSeries=function(a,r,t,s){var l=a.coordinateSystem,e=a.id,u=a.getData(),n=this.markerGroupMap,i=n.get(e)||n.set(e,{group:new so}),h=(this.group.add(i.group),this.markKeep(i),function(t,n,e){var i,r;{var o;i=t?(o=B(t&&t.dimensions,function(t){var e=n.getData();return F(F({},e.getDimensionInfo(e.mapDimension(t))||{}),{name:t,ordinalMeta:null})}),r=B(["x0","y0","x1","y1"],function(t,e){return{name:t,type:o[e%2].type}}),new gv(r,e)):new gv(r=[{name:"value",type:"float"}],e)}e=B(e.get("data"),ft(BS,n,t,e)),t&&(e=pt(e,ft(WS,t))),t=t?function(t,e,n,i){return Qf(t.coord[Math.floor(i/2)][i%2],r[i])}:function(t,e,n,i){return Qf(t.value,r[i])};return i.initData(e,null,t),i.hasItemOption=!0,i}(l,a,r));r.setData(h),h.each(function(e){var t=B(YS,function(t){return US(h,e,t,a,s)}),n=l.getAxis("x").scale,i=l.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),n=[n.parse(h.get("x0",e)),n.parse(h.get("x1",e))],i=[i.parse(h.get("y0",e)),i.parse(h.get("y1",e))],r=(Mo(n),Mo(i),!!(r[0]>n[1]||r[1]i[1]||o[1]"],U(t)&&(t=t.slice(),i=!0),e?t:i?[s(t[0]),s(t[1])]:s(t));return X(r)?r.replace("{value}",i?e[0]:e).replace("{value2}",i?e[1]:e):C(r)?i?r(t[0],t[1]):r(t):i?t[0]===a[0]?n[0]+" "+e[1]:t[1]===a[1]?n[1]+" "+e[0]:e[0]+" - "+e[1]:e;function s(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},MM.prototype.resetExtent=function(){var t=this.option,t=wM([t.min,t.max]);this._dataExtent=t},MM.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;0<=i;i--){var r=n[i],r=t.getDimensionInfo(r);if(!r.isCalculationCoord)return r.storeDimIndex}},MM.prototype.getExtent=function(){return this._dataExtent.slice()},MM.prototype.completeVisualOption=function(){var e=this.ecModel,n=this.option,t={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),r=n.controller||(n.controller={}),u=(d(i,t),d(r,t),this.isCategory());function o(t){xM(n.color)&&!t.inRange&&(t.inRange={color:n.color.slice().reverse()}),t.inRange=t.inRange||{color:e.get("gradientColor")}}o.call(this,i),o.call(this,r),function(t,e,n){var e=t[e],i=t[n];e&&!i&&(i=t[n]={},bM(e,function(t,e){var n;tM.isValidType(e)&&null!=(n=jS(e,"inactive",u))&&(i[e]=n,"color"!==e||i.hasOwnProperty("opacity")||i.hasOwnProperty("colorAlpha")||(i.opacity=[0,0]))}))}.call(this,i,"inRange","outOfRange"),function(r){var o=(r.inRange||{}).symbol||(r.outOfRange||{}).symbol,a=(r.inRange||{}).symbolSize||(r.outOfRange||{}).symbolSize,s=this.get("inactiveColor"),l=this.getItemSymbol()||"roundRect";bM(this.stateList,function(t){var e,n=this.itemSize,i=r[t],t=(null==(i=i||(r[t]={color:u?s:[s]})).symbol&&(i.symbol=o&&_(o)||(u?l:[l])),null==i.symbolSize&&(i.symbolSize=a&&_(a)||(u?n[0]:[n[0],n[0]])),i.symbol=vM(i.symbol,function(t){return"none"===t?l:t}),i.symbolSize);null!=t&&(e=-1/0,_M(t,function(t){ee[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},kM.prototype.completeVisualOption=function(){IM.prototype.completeVisualOption.apply(this,arguments),G(this.stateList,function(t){t=this.option.controller[t].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},kM.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},kM.prototype.getSelected=function(){var t=this.getExtent(),e=Mo((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},kM.prototype.findTargetDataIndices=function(i){var r=[];return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimensionIndex(e),function(t,e){i[0]<=t&&t<=i[1]&&n.push(e)},this),r.push({seriesId:t.id,dataIndex:n})},this),r},kM.prototype.getVisualMeta=function(n){var t=DM(0,0,this.getExtent()),e=DM(0,0,this.option.range.slice()),i=[];function r(t,e){i.push({value:t,color:n(t,e)})}for(var o=0,a=0,s=e.length,l=t.length;ao&&(n[1-t]=n[t]+i.sign*o),s.getExtent());this._dataInterval=[VM(l[0],u,h,!0),VM(l[1],u,h,!0)]},m.prototype._updateView=function(t){var e=this.visualMapModel,n=e.getExtent(),i=this._shapes,e=[0,e.itemSize[1]],t=t?e:this._handleEnds,r=this._createBarVisual(this._dataInterval,n,t,"inRange"),n=this._createBarVisual(n,n,e,"outOfRange");i.inRange.setStyle({fill:r.barColor}).setShape("points",r.barPoints),i.outOfRange.setStyle({fill:n.barColor}).setShape("points",n.barPoints),this._updateHandle(t,r)},m.prototype._createBarVisual=function(t,e,n,i){var i={forceState:i,convertOpacityToAlpha:!0},r=this._makeColorGradient(t,i),t=[this.getControllerVisual(t[0],"symbolSize",i),this.getControllerVisual(t[1],"symbolSize",i)],i=this._createBarPoints(n,t);return{barColor:new Vh(0,0,0,1,r),barPoints:i,handlesColor:[r[0].color,r[r.length-1].color]}},m.prototype._makeColorGradient=function(t,e){var n=[],i=(t[1]-t[0])/100;n.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var r=1;r<100;r++){var o=t[0]+i*r;if(o>t[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},m.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},m.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new so("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},m.prototype._updateHandle=function(i,r){var o,a,s,l,u,h;this._useHandle&&(o=this._shapes,a=this.visualMapModel,s=o.handleThumbs,l=o.handleLabels,u=a.itemSize,h=a.getExtent(),BM([0,1],function(t){var e=s[t],n=(e.setStyle("fill",r.handlesColor[t]),e.y=i[t],VM(i[t],[0,u[1]],h,!0)),n=this.getControllerVisual(n,"symbolSize"),n=(e.scaleX=e.scaleY=n/u[0],e.x=u[0]-n/2,bc(o.handleLabelPoints[t],xc(e,this.group)));l[t].setStyle({x:n[0],y:n[1],text:a.formatValueText(this._dataInterval[t]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",o.mainGroup):"center"})},this))},m.prototype._showIndicator=function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),t=VM(t,o,s,!0),o=a[0]-c/2,s={x:u.x,y:u.y},a=(u.y=t,u.x=o,bc(l.indicatorLabelPoint,xc(u,this.group))),c=l.indicatorLabel,l=(c.attr("invisible",!1),this._applyTransform("left",l.mainGroup)),p="horizontal"===this._orient,n=(c.setStyle({text:(n||"")+r.formatValueText(e),verticalAlign:p?l:"middle",align:p?"center":l}),{x:o,y:t,style:{fill:h}}),e={style:{x:a[0],y:a[1]}},d=(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator?(p={duration:100,easing:"cubicInOut",additive:!0},u.x=s.x,u.y=s.y,u.animateTo(n,p),c.animateTo(e,p)):(u.attr(n),c.attr(e)),this._firstShowIndicator=!1,this._shapes.handleLabels);if(d)for(var f=0;f ",i):this._showIndicator(o,o,"≈ ",i)),t=this._hoverLinkDataIndices,n=[],(e||UM(s))&&(n=this._hoverLinkDataIndices=s.findTargetDataIndices(a)),l=n,r={},u(t||[],o={}),u(l||[],r,o),i=[h(o),h(r)],this._dispatchHighDown("downplay",EM(i[0],s)),this._dispatchHighDown("highlight",EM(i[1],s)))},m.prototype._hoverLinkFromSeriesMouseOver=function(t){var e,n;Ny(t.target,function(t){t=k(t);return null!=t.dataIndex&&(e=t,1)},!0),e&&(t=this.ecModel.getSeriesByIndex(e.seriesIndex),(n=this.visualMapModel).isTargetSeries(t))&&(n=(t=t.getData(e.dataType)).getStore().get(n.getDataDimensionIndex(t),e.dataIndex),isNaN(n)||this._showIndicator(n,n))},m.prototype._hideIndicator=function(){var t=this._shapes,e=(t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0),this._shapes.handleLabels);if(e)for(var n=0;nMath.abs(e[1])?0n&&s([n,t[0]],"outOfRange"),s(t.slice()),n=t[1])},this),{stops:r,outerColors:o};function s(t,e){var n=a.getRepresentValue({interval:t}),n=(e=e||a.getValueState(n),i(n,e));t[0]===-1/0?o[0]=n:t[1]===1/0?o[1]=n:r.push({value:t[0],color:n},{value:t[1],color:n})}},oI.type="visualMap.piecewise",oI.defaultOption=np(Nh.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});var nI,iI=oI,rI={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber,r=Math.max(parseInt(r,10),1);e.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,e)},this)}};function oI(){var t=null!==nI&&nI.apply(this,arguments)||this;return t.type=oI.type,t._pieceList=[],t}function aI(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}u(uI,sI=ah),uI.prototype.doRender=function(){var i=this.group,r=(i.removeAll(),this.visualMapModel),o=r.get("textGap"),t=r.textStyleModel,a=t.getFont(),s=t.getTextColor(),l=this._getItemAlign(),u=r.itemSize,t=this._getViewData(),e=t.endsText,h=Mt(r.get("showLabel",!0),!e);e&&this._renderEndsText(i,e[0],u,h,l),G(t.viewPieceList,function(t){var e=t.piece,n=new so,t=(n.onclick=dt(this._onItemClick,this,e),this._enableHoverLink(n,t.indexInModelPieceList),r.getRepresentValue(e));this._createItemSymbol(n,t,[0,0,u[0],u[1]]),h&&(t=this.visualMapModel.getValueState(t),n.add(new rl({style:{x:"right"===l?-o:u[0]+o,y:u[1]/2,text:e.text,verticalAlign:"middle",align:l,font:a,fill:s,opacity:"outOfRange"===t?.5:1}}))),i.add(n)},this),e&&this._renderEndsText(i,e[1],u,h,l),qp(r.get("orient"),i,r.get("itemGap")),this.renderBackground(i),this.positionGroup(i)},uI.prototype._enableHoverLink=function(t,n){var i=this,e=(t.on("mouseover",function(){return e("highlight")}).on("mouseout",function(){return e("downplay")}),function(t){var e=i.visualMapModel;e.option.hoverLink&&i.api.dispatchAction({type:t,batch:EM(e.findTargetDataIndices(n),e)})})},uI.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;return"vertical"===e.orient?NM(t,this.api,t.itemSize):(t=e.align)&&"auto"!==t?t:"left"},uI.prototype._renderEndsText=function(t,e,n,i,r){var o,a;e&&(o=new so,a=this.visualMapModel.textStyleModel,o.add(new rl({style:Lc(a,{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:e})})),t.add(o))},uI.prototype._getViewData=function(){var t=this.visualMapModel,e=B(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),n=t.get("text"),i=t.get("orient"),t=t.get("inverse");return("horizontal"===i?t:!t)?e.reverse():n=n&&n.slice().reverse(),{viewPieceList:e,endsText:n}},uI.prototype._createItemSymbol=function(t,e,n){t.add(Zy(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},uI.prototype._onItemClick=function(t){var n,i,e=this.visualMapModel,r=e.option,o=r.selectedMode;o&&(n=_(r.selected),i=e.getSelectedMapKey(t),"single"===o||!0===o?(n[i]=!0,G(n,function(t,e){n[e]=e===i})):n[i]=!n[i],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n}))},uI.type="visualMap.piecewise";var sI,lI=uI;function uI(){var t=null!==sI&&sI.apply(this,arguments)||this;return t.type=uI.type,t}function hI(t){t.registerComponentModel(iI),t.registerComponentView(lI),tI(t)}function cI(e,t){var n;return G(t,function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)}),n}R_(function(t){R_(eI),R_(hI)});var pI=["transition","enterFrom","leaveTo"],dI=pI.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function fI(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?pI:dI,r=0;r":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},XI=(nT.prototype.evaluate=function(t){var e=typeof t;return X(e)?this._condVal.test(t):!!yt(e)&&this._condVal.test(t+"")},nT),YI=(eT.prototype.evaluate=function(){return this.value},eT),qI=(tT.prototype.evaluate=function(){for(var t=this.children,e=0;e"}(i,r)+("style"!==i?xe(e):e||"")+(n?o+B(n,t).join(o)+o:"")+""}(t)}function AT(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function LT(t,e,n,i){return kT("svg","root",{width:t,height:e,xmlns:wT,"xmlns:xlink":ST,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var OT=0;var PT={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"},RT="transform-origin";var NT={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function ET(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function zT(t){return X(t)?PT[t]?"cubic-bezier("+PT[t]+")":Kn(t)?t:"":""}function VT(D,A,L,O){var t=D.animators,e=t.length,n=[];if(D instanceof Ph){if(r=function(t,e,u){var h,c,t=t.shape.paths,p={};if(G(t,function(t){var e=AT(u.zrId),t=(e.animation=!0,VT(t,{},e,!0),e.cssAnims),n=e.cssNodes,e=W(t),i=e.length;if(i){var r,o,a=t[c=e[i-1]];for(r in a){var s=a[r];p[r]=p[r]||{d:""},p[r].d+=s.d||""}for(o in n){var l=n[o].animation;0<=l.indexOf(c)&&(h=l)}}}),h)return e.d=!1,t=ET(p,u),h.replace(c,t)}(D,A,L))n.push(r);else if(!e)return}else if(!e)return;for(var i,r,o,a={},s=0;s"].join(o):"")&&(e=kT("style","stl",{},[],c),h.push(e)),LT(i,l,h,t.useViewBox)},b2.prototype.renderToString=function(t){return DT(this.renderToVNode({animation:P((t=t||{}).cssAnimation,!0),emphasis:P(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:P(t.useViewBox,!0)}),{newline:!0})},b2.prototype.setBackgroundColor=function(t){this._backgroundColor=t},b2.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},b2.prototype._paintList=function(t,e,n){for(var i,r,o,a,s,l,u,h=t.length,c=[],p=0,d=0,f=0;f>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}}return n}(e,o),o,r);if(e)return e(t,n,i),1}}function me(t){return"CANVAS"===t.nodeName.toUpperCase()}var ve=/([&<>"'])/g,_e={"&":"&","<":"<",">":">",'"':""","'":"'"};function xe(t){return null==t?"":(t+"").replace(ve,function(t,e){return _e[e]})}var we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,be=[],Se=p.browser.firefox&&+p.browser.version.split(".")[0]<39;function Me(t,e,n,i){return n=n||{},i?Te(t,e,n):Se&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):Te(t,e,n),n}function Te(t,e,n){if(p.domSupported&&t.getBoundingClientRect){var i,r=e.clientX,e=e.clientY;if(me(t))return i=t.getBoundingClientRect(),n.zrX=r-i.left,n.zrY=e-i.top;if(ye(be,t,r,e))return n.zrX=be[0],n.zrY=be[1]}n.zrX=n.zrY=0}function Ce(t){return t||window.event}function ke(t,e,n){var i;return null==(e=Ce(e)).zrX&&((i=e.type)&&0<=i.indexOf("touch")?(i=("touchend"!==i?e.targetTouches:e.changedTouches)[0])&&Me(t,i,e,n):(Me(t,e,e,n),t=(t=(i=e).wheelDelta)||(n=i.deltaX,i=i.deltaY,null==n||null==i?t:3*(0!==i?Math.abs(i):Math.abs(n))*(0=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},Ke.prototype.clone=function(){return new Ke(this.x,this.y,this.width,this.height)},Ke.prototype.copy=function(t){Ke.copy(this,t)},Ke.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},Ke.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Ke.prototype.isZero=function(){return 0===this.width||0===this.height},Ke.create=function(t){return new Ke(t.x,t.y,t.width,t.height)},Ke.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},Ke.applyTransform=function(t,e,n){var i,r,o,a;n?n[1]<1e-5&&-1e-5t.getWidth()||n<0||n>t.getHeight()}R(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){an.prototype[a]=function(t){var e,n,i=t.zrX,r=t.zrY,o=hn(this,i,r);if("mouseup"===a&&o||(n=(e=this.findHover(i,r)).target),"mousedown"===a)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===a)this._upEl=n;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4>>1])<0?l=o:s=1+o;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function mn(t,e,n,i){var f,g,o,a,y,s,m,r=(i=i||t.length)-(n=n||0);if(!(r<2)){var l=0;if(ra[t+1])break;p(t)}},forceMergeRuns:function(){for(;1>=1;return t+e}(r);do{}while((l=dn(t,n,i,e))=this._maxSize&&0>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===i?parseInt(n.slice(4),16)/15:1),fi(t,e),e):void hi(e,0,0,0,1):7===i||9===i?0<=(r=parseInt(n.slice(1,7),16))&&r<=16777215?(hi(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===i?parseInt(n.slice(7),16)/255:1),fi(t,e),e):void hi(e,0,0,0,1):void 0;var r=n.indexOf("("),o=n.indexOf(")");if(-1!==r&&o+1===i){var i=n.substr(0,r),a=n.substr(r+1,o-(r+1)).split(","),s=1;switch(i){case"rgba":if(4!==a.length)return 3===a.length?hi(e,+a[0],+a[1],+a[2],1):hi(e,0,0,0,1);s=si(a.pop());case"rgb":return 3<=a.length?(hi(e,ai(a[0]),ai(a[1]),ai(a[2]),3===a.length?s:si(a[3])),fi(t,e),e):void hi(e,0,0,0,1);case"hsla":return 4!==a.length?void hi(e,0,0,0,1):(a[3]=si(a[3]),yi(a,e),fi(t,e),e);case"hsl":return 3!==a.length?void hi(e,0,0,0,1):(yi(a,e),fi(t,e),e);default:return}}hi(e,0,0,0,1)}}function yi(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=si(t[1]),r=si(t[2]),i=r<=.5?r*(i+1):r+i-r*i,r=2*r-i;return hi(e=e||[],ri(255*li(r,i,n+1/3)),ri(255*li(r,i,n)),ri(255*li(r,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function mi(t,e){var n=gi(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255e);n++);n=g(n-1,c-2)}r=h[n+1],i=h[n]}i&&r&&(this._lastFr=n,this._lastFrP=e,f=r.percent-i.percent,o=0==f?1:g((e-i.percent)/f,1),r.easingFunc&&(o=r.easingFunc(o)),g=s?this._additiveValue:d?Zi:t[p],(ji(u)||d)&&(g=g||(this._additiveValue=[])),this.discrete?t[p]=(o<1?i:r).rawValue:ji(u)?(1===u?Wi:function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;athis._sleepAfterStill)&&this.animation.stop()},uo.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},uo.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},uo.prototype.refreshHover=function(){this._needsRefreshHover=!0},uo.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},uo.prototype.resize=function(t){this._disposed||(this.painter.resize((t=t||{}).width,t.height),this.handler.resize())},uo.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},uo.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},uo.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},uo.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},uo.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},uo.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},uo.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},uo.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},uo.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e=e.maxIterations){t+=e.ellipsis;break}var s=0===a?function(t,e,n,i){for(var r=0,o=0,a=t.length;oo){0i.width&&(o=e.split("\n"),c=!0),i.accumWidth=t):(t=Aa(e,h,i.width,i.breakAll,i.accumWidth),i.accumWidth=t.accumWidth+n,a=t.linesWidths,o=t.lines)):o=e.split("\n");for(var p=0;pthis._ux||i>this._uy;return this.addData(G.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r?(this._xi=t,this._yi=e,this._pendingPtDist=0):(r=n*n+i*i)>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=r),this},a.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(G.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},a.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(G.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},a.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),hs[0]=i,hs[1]=r,s=o,(l=cs((a=hs)[0]))<0&&(l+=ls),h=l-a[0],u=a[1],u+=h,!s&&ls<=u-l?u=l+ls:s&&ls<=l-u?u=l-ls:!s&&uu.length&&(this._expandData(),u=this.data);for(var h=0;hn||as(y)>i||c===e-1)&&(f=Math.sqrt(k*k+y*y),r=g,o=_);break;case G.C:var m=t[c++],v=t[c++],_=(g=t[c++],t[c++]),x=t[c++],w=t[c++],f=function(t,e,n,i,r,o,a,s,l){for(var u=t,h=e,c=0,p=1/l,d=1;d<=l;d++){var f=d*p,g=zn(t,n,r,a,f),f=zn(e,i,o,s,f),y=g-u,m=f-h;c+=Math.sqrt(y*y+m*m),u=g,h=f}return c}(r,o,m,v,g,_,x,w,10),r=x,o=w;break;case G.Q:f=function(t,e,n,i,r,o,a){for(var s=t,l=e,u=0,h=1/a,c=1;c<=a;c++){var p=c*h,d=Gn(t,n,r,p),p=Gn(e,i,o,p),f=d-s,g=p-l;u+=Math.sqrt(f*f+g*g),s=d,l=p}return u}(r,o,m=t[c++],v=t[c++],g=t[c++],_=t[c++],10),r=g,o=_;break;case G.A:var x=t[c++],w=t[c++],b=t[c++],S=t[c++],M=t[c++],T=t[c++],C=T+M;c+=1,d&&(a=rs(M)*b+x,s=os(M)*S+w),f=is(b,S)*ns(ls,Math.abs(T)),r=rs(C)*b+x,o=os(C)*S+w;break;case G.R:a=r=t[c++],s=o=t[c++],f=2*t[c++]+2*t[c++];break;case G.Z:var k=a-r,y=s-o;f=Math.sqrt(k*k+y*y),r=a,o=s}0<=f&&(u+=l[h++]=f)}return this._pathLen=u},a.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h=this.data,E=this._ux,z=this._uy,B=this._len,c=e<1,p=0,d=0,f=0;if(!c||(this._pathSegLen||this._calculateLength(),a=this._pathSegLen,s=e*this._pathLen))t:for(var g=0;gs){var b=(s-p)/y;t.lineTo(r*(1-b)+v*b,o*(1-b)+_*b);break t}p+=y}t.lineTo(v,_),r=v,o=_,f=0}else{x=x*x+w*w;fs){Hn(r,S,T,w,b=(s-p)/y,Ka),Hn(o,M,C,x,b,$a),t.bezierCurveTo(Ka[1],$a[1],Ka[2],$a[2],Ka[3],$a[3]);break t}p+=y}t.bezierCurveTo(S,M,T,C,w,x),r=w,o=x;break;case G.Q:if(S=h[g++],M=h[g++],T=h[g++],C=h[g++],c){if(p+(y=a[d++])>s){Yn(r,S,T,b=(s-p)/y,Ka),Yn(o,M,C,b,$a),t.quadraticCurveTo(Ka[1],$a[1],Ka[2],$a[2]);break t}p+=y}t.quadraticCurveTo(S,M,T,C),r=T,o=C;break;case G.A:var k=h[g++],I=h[g++],D=h[g++],A=h[g++],L=h[g++],P=h[g++],O=h[g++],V=!h[g++],H=As&&(N=L+P*(s-p)/y,W=!0),p+=y),R&&t.ellipse?t.ellipse(k,I,D,A,O,L,N,V):t.arc(k,I,H,L,N,V),W)break t;F&&(n=rs(L)*D+k,i=os(L)*A+I),r=rs(N)*D+k,o=os(N)*A+I;break;case G.R:n=r=h[g],i=o=h[g+1],v=h[g++],_=h[g++];P=h[g++],R=h[g++];if(c){if(p+(y=a[d++])>s){O=s-p;t.moveTo(v,_),t.lineTo(v+ns(O,P),_),0<(O-=P)&&t.lineTo(v+P,_+ns(O,R)),0<(O-=R)&&t.lineTo(v+is(P-O,0),_+R),0<(O-=P)&&t.lineTo(v,_+is(R-O,0));break t}p+=y}t.rect(v,_,P,R);break;case G.Z:if(c){if(p+(y=a[d++])>s){t.lineTo(r*(1-(b=(s-p)/y))+n*b,o*(1-b)+i*b);break t}p+=y}t.closePath(),r=n,o=i}}},a.prototype.clone=function(){var t=new a,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},a.CMD=G,a.initDefaultProps=((Iu=a.prototype)._saveData=!0,Iu._ux=0,Iu._uy=0,Iu._pendingPtDist=0,void(Iu._version=0));var ps=a;function a(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}function ds(t,e,n,i,r,o,a){var s;if(0!==r)return s=0,!(e+(r=r)n||s<-n)return 0;var e=Math.sqrt(n*n-s*s);if(ws[0]=-e,ws[1]=e,(n=Math.abs(i-r))<1e-4)return 0;if(_s-1e-4<=n)return r=_s,h=o?1:-1,a>=ws[i=0]+t&&a<=ws[1]+t?h:0;rMath.PI/2&&c<1.5*Math.PI?-h:h)}return l}(y,m,_,x,x+w,b,T,r);u=Math.cos(x+w)*v+y,h=Math.sin(x+w)*_+m;break;case vs.R:if(c=u=a[d++],p=h=a[d++],S=c+a[d++],M=p+a[d++],n){if(ds(c,p,S,p,e,i,r)||ds(S,p,S,M,e,i,r)||ds(S,M,c,M,e,i,r)||ds(c,M,c,p,e,i,r))return!0}else l=(l+=ms(S,p,S,M,i,r))+ms(c,M,c,p,i,r);break;case vs.Z:if(n){if(ds(u,h,c,p,e,i,r))return!0}else l+=ms(u,h,c,p,i,r);u=c,h=p}}return n||(t=h,o=p,Math.abs(t-o)i.len()&&(uu||t.newline?(c=0,n=r,p+=d+l,o.height):Math.max(d,o.height)):(r=o.height+(e?-e.y+o.y:0),(i=p+r)>h||t.newline?(c+=d+l,p=0,i=r,o.width):Math.max(d,o.width)),t.newline||(t.x=c,t.y=p,t.markRedraw(),"horizontal"===a?c=n+l:p=i+l)})}function Lp(t,e,n){n=bp(n||0);var i=e.width,r=e.height,o=vo(t.left,i),a=vo(t.top,r),e=vo(t.right,i),s=vo(t.bottom,r),l=vo(t.width,i),u=vo(t.height,r),h=n[2]+n[0],c=n[1]+n[3],p=t.aspect;switch(isNaN(l)&&(l=i-e-c-o),isNaN(u)&&(u=r-s-h-a),null!=p&&(isNaN(l)&&isNaN(u)&&(i/re)return t[i];return t[n-1]}(r,n):i)||i)&&r.length?(n=r[o],t&&(e[t]=n),a.paletteIdx=(o+1)%r.length,n):void 0},ad.prototype.clearColorPalette=function(){var t,e;(e=rd)(t=this).paletteIdx=0,e(t).paletteNameMap={}},ad);function ad(){}var sd,ld,ud,hd,cd="\0_ec_inner",pd=(u(l,hd=Ec),l.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new Ec(i),this._locale=new Ec(r),this._optionManager=o},l.prototype.setOption=function(t,e,n){e=gd(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},l.prototype.resetOption=function(t,e){return this._resetOption(t,gd(e))},l.prototype._resetOption=function(t,e){var n,i=!1,r=this._optionManager;return t&&"recreate"!==t||(n=r.mountOption("recreate"===t),this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(n,e)):ud(this,n),i=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(n=r.getTimelineOption(this))&&(i=!0,this._mergeOption(n,e)),t&&"recreate"!==t&&"media"!==t||(n=r.getMediaOption(this)).length&&R(n,function(t){i=!0,this._mergeOption(t,e)},this),i},l.prototype.mergeOption=function(t){this._mergeOption(t,null)},l.prototype._mergeOption=function(i,t){var r=this.option,h=this._componentsMap,c=this._componentsCount,n=[],o=z(),p=t&&t.replaceMergeMainTypeMap;Jp(this).datasetMap=z(),R(i,function(t,e){null!=t&&(g.hasClass(e)?e&&(n.push(e),o.set(e,!0)):r[e]=null==r[e]?_(t):d(r[e],t,!0))}),p&&p.each(function(t,e){g.hasClass(e)&&!o.get(e)&&(n.push(e),o.set(e,!0))}),g.topologicalTravel(n,g.getAllClassMainTypes(),function(o){t=this,n=Eo(i[e=o]);var t=(e=(e=id.get(e))&&e(t))?n.concat(e):n,e=h.get(o),n=Vo(e,t,e?p&&p.get(o)?"replaceMerge":"normalMerge":"replaceAll");Yo(n,o,g),r[o]=null,h.set(o,null),c.set(o,0);var a,s=[],l=[],u=0;R(n,function(t,e){var n=t.existing,i=t.newOption;if(i){var r=g.getClass(o,t.keyInfo.subType,!("series"===o));if(!r)return;if("tooltip"===o){if(a)return;a=!0}n&&n.constructor===r?(n.name=t.keyInfo.name,n.mergeOption(i,this),n.optionUpdated(i,!1)):(e=O({componentIndex:e},t.keyInfo),O(n=new r(i,this,this,e),e),t.brandNew&&(n.__requireNewView=!0),n.init(i,this,this),n.optionUpdated(null,!0))}else n&&(n.mergeOption({},this),n.optionUpdated({},!1));n?(s.push(n.option),l.push(n),u++):(s.push(void 0),l.push(void 0))},this),r[o]=s,h.set(o,l),c.set(o,u),"series"===o&&sd(this)},this),this._seriesIndices||sd(this)},l.prototype.getOption=function(){var a=_(this.option);return R(a,function(t,e){if(g.hasClass(e)){for(var n=Eo(t),i=n.length,r=!1,o=i-1;0<=o;o--)n[o]&&!Xo(n[o])?r=!0:(n[o]=null,r||i--);n.length=i,a[e]=n}}),delete a[cd],a},l.prototype.getTheme=function(){return this._theme},l.prototype.getLocaleModel=function(){return this._locale},l.prototype.setUpdatePayload=function(t){this._payload=t},l.prototype.getUpdatePayload=function(){return this._payload},l.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){t=n[e||0];if(t)return t;if(null==e)for(var i=0;ig[1]&&(g[1]=f)}return{start:a,end:this._rawCount=this._count=s}},h.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=F(o,function(t){return t.property}),u=0;uf[1]&&(f[1]=g)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},h.prototype.count=function(){return this._count},h.prototype.get=function(t,e){return 0<=e&&e=this._rawCount||t<0)){if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}}return-1},h.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],r=[];if(i){null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=u&&v<=h||isNaN(v))&&(a[s++]=p),p++;l=!0}else if(2===r){for(var d=c[i[0]],g=c[i[1]],y=t[i[1]][0],m=t[i[1]][1],f=0;f=u&&v<=h||isNaN(v))&&(a[s++]=x)}else for(f=0;ft[S][1])&&(w=!1)}w&&(a[s++]=e.getRawIndex(f))}return sy[1]&&(y[1]=g)}}},h.prototype.lttbDownSample=function(t,e){var n,i=this.clone([t],!0),r=i._chunks[t],o=this.count(),a=0,s=Math.floor(1/e),l=this.getRawIndex(0),u=new(ng(this._rawCount))(Math.min(2*(Math.ceil(o/s)+2),o));u[a++]=l;for(var h=1;hx&&(x=n,w=M)}0h[1]&&(h[1]=y),c[p++]=m}return r._count=p,r._indices=c,r._updateGetRawIdx(),r},h.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();rthis.getShallow("animationThreshold")?!1:t)},c.prototype.restoreData=function(){this.dataTask.dirty()},c.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return od.prototype.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},c.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},c.prototype.getProgressive=function(){return this.get("progressive")},c.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},c.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},c.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n)this.option.selectedMap={},this._selectedDataIndicesMap={};else for(var o=0;oe.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function bg(e,n){R(zt(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,dt(Sg,n))})}function Sg(t,e){t=Mg(t);return t&&t.setOutputEnd((e||this).count()),e}function Mg(t){var e,n=(t.ecModel||{}).scheduler,n=n&&n.getPipeline(t.uid);if(n)return(n=n.currentTask)&&(e=n.agentStubMap)?e.get(t.uid):n}lt(mg,Oc),lt(mg,od),sa(mg,g);Cg.prototype.init=function(t,e){},Cg.prototype.render=function(t,e,n,i){},Cg.prototype.dispose=function(t,e){},Cg.prototype.updateView=function(t,e,n,i){},Cg.prototype.updateLayout=function(t,e,n,i){},Cg.prototype.updateVisual=function(t,e,n,i){},Cg.prototype.toggleBlurSeries=function(t,e,n){},Cg.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)};var Tg=Cg;function Cg(){this.group=new io,this.uid=Fc("viewComponent")}function kg(){var o=jo();return function(t){var e=o(t),t=t.pipelineContext,n=!!e.large,i=!!e.progressiveRender,r=e.large=!(!t||!t.large),e=e.progressiveRender=!(!t||!t.progressiveRender);return!(n==r&&i==e)&&"reset"}}aa(Tg),ca(Tg);var Ig=jo(),Dg=kg(),Ag=(Lg.prototype.init=function(t,e){},Lg.prototype.render=function(t,e,n,i){},Lg.prototype.highlight=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&Og(t,i,"emphasis")},Lg.prototype.downplay=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&Og(t,i,"normal")},Lg.prototype.remove=function(t,e){this.group.removeAll()},Lg.prototype.dispose=function(t,e){},Lg.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},Lg.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},Lg.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Lg.prototype.eachRendered=function(t){uc(this.group,t)},Lg.markUpdateMethod=function(t,e){Ig(t).updateMethod=e},Lg.protoInitialize=void(Lg.prototype.type="chart"),Lg);function Lg(){this.group=new io,this.uid=Fc("viewChart"),this.renderTask=xf({plan:Rg,reset:Ng}),this.renderTask.context={view:this}}function Pg(t,e,n){t&&ru(t)&&("emphasis"===e?Hl:Wl)(t,n)}function Og(e,t,n){var i,r=qo(e,t),o=t&&null!=t.highlightKey?(t=t.highlightKey,i=null==(i=pl[t])&&cl<=32?pl[t]=cl++:i):null;null!=r?R(Eo(r),function(t){Pg(e.getItemGraphicEl(t),n,o)}):e.eachItemGraphicEl(function(t){Pg(t,n,o)})}function Rg(t){return Dg(t.model)}function Ng(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,t=t.view,a=r&&Ig(r).updateMethod,o=o?"incrementalPrepareRender":a&&t[a]?a:"render";return"render"!==o&&t[o](e,n,i,r),Eg[o]}aa(Ag),ca(Ag);var Eg={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};function zg(t,r,o){var a,s,l,u,h,c=0,p=0,d=null;function f(){p=(new Date).getTime(),d=null,t.apply(l,u||[])}r=r||0;function e(){for(var t=[],e=0;en.blockIndex?n.step:null,modBy:null!=(t=i&&i.modDataCount)?Math.ceil(t/e):null,modDataCount:t}},Yg.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},Yg.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),e=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,r=t.get("large")&&i>=t.get("largeThreshold"),i="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:e,modDataCount:i,large:r}},Yg.prototype.restorePipelines=function(t){var i=this,r=i._pipelineMap=z();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;r.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),i._pipe(t,t.dataTask)})},Yg.prototype.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.api.getModel(),r=this.api;R(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,{});kt(!(t.reset&&t.overallReset),""),t.reset&&this._createSeriesStageTask(t,e,i,r),t.overallReset&&this._createOverallStageTask(t,e,i,r)},this)},Yg.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},Yg.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},Yg.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},Yg.prototype._performStageTasks=function(t,s,l,u){u=u||{};var h=!1,c=this;function p(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}R(t,function(i,t){var e,n,r,o,a;u.visualType&&u.visualType!==i.visualType||(e=(n=c._stageTaskMap.get(i.uid)).seriesTaskMap,(n=n.overallTask)?((o=n.agentStubMap).each(function(t){p(u,t)&&(t.dirty(),r=!0)}),r&&n.dirty(),c.updatePayload(n,l),a=c.getPerformArgs(n,u.block),o.each(function(t){t.perform(a)}),n.perform(a)&&(h=!0)):e&&e.each(function(t,e){p(u,t)&&t.dirty();var n=c.getPerformArgs(t,u.block);n.skip=!i.performRawSeries&&s.isSeriesFiltered(t.context.model),c.updatePayload(t,l),t.perform(n)&&(h=!0)}))}),this.unfinished=h||this.unfinished},Yg.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},Yg.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}}while(e=e.getUpstream())})},Yg.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},Yg.prototype._createSeriesStageTask=function(n,t,i,r){var o=this,a=t.seriesTaskMap,s=t.seriesTaskMap=z(),t=n.seriesType,e=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||xf({plan:$g,reset:Qg,count:ey}));e.context={model:t,ecModel:i,api:r,useClearVisual:n.isVisual&&!n.isLayout,plan:n.plan,reset:n.reset,scheduler:o},o._pipe(t,e)}n.createOnAllSeries?i.eachRawSeries(l):t?i.eachRawSeriesByType(t,l):e&&e(i,r).each(l)},Yg.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||xf({reset:qg}),a=(o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r},o.agentStubMap),s=o.agentStubMap=z(),e=t.seriesType,l=t.getTargetSeries,u=!0,h=!1;function c(t){var e=t.uid,e=s.set(e,a&&a.get(e)||(h=!0,xf({reset:jg,onDirty:Kg})));e.context={model:t,overallProgress:u},e.agent=o,e.__block=u,r._pipe(t,e)}kt(!t.createOnAllSeries,""),e?n.eachRawSeriesByType(e,c):l?l(n,i).each(c):(u=!1,R(n.getSeries(),c)),h&&o.dirty()},Yg.prototype._pipe=function(t,e){t=t.uid,t=this._pipelineMap.get(t);t.head||(t.head=e),t.tail&&t.tail.pipe(e),(t.tail=e).__idxInPipeline=t.count++,e.__pipeline=t},Yg.wrapStageHandler=function(t,e){return(t=I(t)?{overallReset:t,seriesType:function(t){ny=null;try{t(iy,ry)}catch(t){}return ny}(t)}:t).uid=Fc("stageHandler"),e&&(t.visualType=e),t};var Xg=Yg;function Yg(t,e,n,i){this._stageTaskMap=z(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function qg(t){t.overallReset(t.ecModel,t.api,t.payload)}function jg(t){return t.overallProgress&&Zg}function Zg(){this.agent.dirty(),this.getDownstream().dirty()}function Kg(){this.agent&&this.agent.dirty()}function $g(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Qg(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=Eo(t.reset(t.model,t.ecModel,t.api,t.payload));return 1'+t.dom+""}),f.painter.getSvgRoot().innerHTML=g,i.connectedBackgroundColor&&f.painter.setBackgroundColor(i.connectedBackgroundColor),f.refreshImmediately(),f.painter.toDataURL()):(i.connectedBackgroundColor&&f.add(new Xs({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),R(p,function(t){t=new zs({style:{x:t.left*e-l,y:t.top*e-u,image:t.dom}});f.add(t)}),f.refreshImmediately(),d.toDataURL("image/"+(i&&i.type||"png")))):this.getDataURL(i);this.id},y.prototype.convertToPixel=function(t,e){return v0(this,"convertToPixel",t,e)},y.prototype.convertFromPixel=function(t,e){return v0(this,"convertFromPixel",t,e)},y.prototype.containPixel=function(t,i){var r;if(!this._disposed)return R(Ko(this._model,t),function(t,n){0<=n.indexOf("Models")&&R(t,function(t){var e=t.coordinateSystem;e&&e.containPoint?r=r||!!e.containPoint(i):"seriesModels"===n&&(e=this._chartsMap[t.__viewId])&&e.containPoint&&(r=r||e.containPoint(i,t))},this)},this),!!r;this.id},y.prototype.getVisual=function(t,e){var t=Ko(this._model,t,{defaultMainType:"series"}),n=t.seriesModel.getData(),t=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;if(null!=t){var i=n,r=t,o=e;switch(o){case"color":return i.getItemVisual(r,"style")[i.getVisual("drawType")];case"opacity":return i.getItemVisual(r,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return i.getItemVisual(r,o)}}else{var a=n,s=e;switch(s){case"color":return a.getVisual("style")[a.getVisual("drawType")];case"opacity":return a.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return a.getVisual(s)}}},y.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},y.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},y.prototype._initEvents=function(){var t,n,i,s=this;R(W0,function(a){function t(t){var n,e,i,r=s.getModel(),o=t.target;"globalout"===a?n={}:o&&dy(o,function(t){var e,t=hl(t);return t&&null!=t.dataIndex?(e=t.dataModel||r.getSeriesByIndex(t.seriesIndex),n=e&&e.getDataParams(t.dataIndex,t.dataType,o)||{},1):t.eventData&&(n=O({},t.eventData),1)},!0),n&&(e=n.componentType,i=n.componentIndex,"markLine"!==e&&"markPoint"!==e&&"markArea"!==e||(e="series",i=n.seriesIndex),i=(e=e&&null!=i&&r.getComponent(e,i))&&s["series"===e.mainType?"_chartsMap":"_componentsMap"][e.__viewId],n.event=t,n.type=a,s._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:e,view:i},s.trigger(a,n))}t.zrEventfulCallAtLast=!0,s._zr.on(a,t,s)}),R(U0,function(t,e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),R(["selectchanged"],function(e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),t=this._messageCenter,i=(n=this)._api,t.on("selectchanged",function(t){var e=i.getModel();t.isFromClick?(py("map","selectchanged",n,e,t),py("pie","selectchanged",n,e,t)):"select"===t.fromAction?(py("map","selected",n,e,t),py("pie","selected",n,e,t)):"unselect"===t.fromAction&&(py("map","unselected",n,e,t),py("pie","unselected",n,e,t))})},y.prototype.isDisposed=function(){return this._disposed},y.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},y.prototype.dispose=function(){var t,e,n;this._disposed?this.id:(this._disposed=!0,this.getDom()&&ta(this.getDom(),tm,""),e=(t=this)._api,n=t._model,R(t._componentsViews,function(t){t.dispose(n,e)}),R(t._chartsViews,function(t){t.dispose(n,e)}),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete K0[t.id])},y.prototype.resize=function(t){if(!this[a0])if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var e=e.resetOption("media"),n=t&&t.silent;this[s0]&&(null==n&&(n=this[s0].silent),e=!0,this[s0]=null),this[a0]=!0;try{e&&f0(this),m0.update.call(this,{type:"resize",animation:O({duration:0},t&&t.animation)})}catch(t){throw this[a0]=!1,t}this[a0]=!1,w0.call(this,n),b0.call(this,n)}}},y.prototype.showLoading=function(t,e){this._disposed?this.id:(P(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Z0[t]&&(t=Z0[t](this._api,e),e=this._zr,this._loadingFX=t,e.add(t)))},y.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},y.prototype.makeActionFromEvent=function(t){var e=O({},t);return e.type=U0[t.type],e},y.prototype.dispatchAction=function(t,e){var n;this._disposed?this.id:(P(e)||(e={silent:!!e}),G0[t.type]&&this._model&&(this[a0]?this._pendingActions.push(t):(n=e.silent,x0.call(this,t,n),(t=e.flush)?this._zr.flush():!1!==t&&p.browser.weChat&&this._throttledZrFlush(),w0.call(this,n),b0.call(this,n))))},y.prototype.updateLabelLayout=function(){r0.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},y.prototype.appendData=function(t){var e;this._disposed?this.id:(e=t.seriesIndex,this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp())},y.internalField=(f0=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),g0(t,!0),g0(t,!1),e.plan()},g0=function(t,r){for(var o=t._model,a=t._scheduler,s=r?t._componentsViews:t._chartsViews,l=r?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,e=0;es.get("hoverLayerThreshold")&&!p.node&&!p.worker&&s.eachSeries(function(t){t.preventUsingHoverLayer||(t=i._chartsMap[t.__viewId]).__alive&&t.eachRendered(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}),r0.trigger("series:afterupdate",t,e,n)},A0=function(t){t[l0]=!0,t.getZr().wakeUp()},L0=function(t){t[l0]&&(t.getZr().storage.traverse(function(t){jh(t)||B0(t)}),t[l0]=!1)},I0=function(n){return u(t,e=yd),t.prototype.getCoordinateSystems=function(){return n._coordSysMgr.getCoordinateSystems()},t.prototype.getComponentByElement=function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return n._model.getComponent(e.mainType,e.index);t=t.parent}},t.prototype.enterEmphasis=function(t,e){Hl(t,e),A0(n)},t.prototype.leaveEmphasis=function(t,e){Wl(t,e),A0(n)},t.prototype.enterBlur=function(t){Rl(t,Dl),A0(n)},t.prototype.leaveBlur=function(t){Gl(t),A0(n)},t.prototype.enterSelect=function(t){Ul(t),A0(n)},t.prototype.leaveSelect=function(t){Xl(t),A0(n)},t.prototype.getModel=function(){return n.getModel()},t.prototype.getViewOfComponentModel=function(t){return n.getViewOfComponentModel(t)},t.prototype.getViewOfSeriesModel=function(t){return n.getViewOfSeriesModel(t)},new t(n);function t(){return null!==e&&e.apply(this,arguments)||this}var e},void(D0=function(i){function r(t,e){for(var n=0;ne[1]&&(e[1]=t[1])},nv.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},nv.prototype.getExtent=function(){return this._extent.slice()},nv.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},nv.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},nv.prototype.isBlank=function(){return this._isBlank},nv.prototype.setBlank=function(t){this._isBlank=t};var ev=nv;function nv(t){this._setting=t||{},this._extent=[1/0,-1/0]}ca(ev);var iv=0,rv=(ov.createByAxisModel=function(t){var t=t.option,e=t.data,e=e&&F(e,av);return new ov({categories:e,needCollect:!e,deduplication:!1!==t.dedplication})},ov.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},ov.prototype.parseAndCollect=function(t){var e,n,i=this._needCollect;return H(t)||i?(i&&!this._deduplication?(e=this.categories.length,this.categories[e]=t):null==(e=(n=this._getOrCreateMap()).get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e):t},ov.prototype._getOrCreateMap=function(){return this._map||(this._map=z(this.categories))},ov);function ov(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++iv}function av(t){return P(t)&&null!=t.value?t.value:t+""}function sv(t){return"interval"===t.type||"log"===t.type}function lv(t,e,n,i){var r={},o=t[1]-t[0],o=r.interval=Do(o/e,!0),e=(null!=n&&on[1]&&(n[0]=n[1]),r}function uv(t){var e=Math.pow(10,Io(t)),t=t/e;return t?2===t?t=3:3===t?t=5:t*=2:t=1,_o(t*e)}function hv(t){return xo(t)+2}function cv(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function pv(t,e){return t>=e[0]&&t<=e[1]}function dv(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function fv(t,e){return t*(e[1]-e[0])+e[0]}u(mv,gv=ev),mv.prototype.parse=function(t){return null==t?NaN:H(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},mv.prototype.contain=function(t){return pv(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},mv.prototype.normalize=function(t){return dv(t=this._getTickNumber(this.parse(t)),this._extent)},mv.prototype.scale=function(t){return t=Math.round(fv(t,this._extent)),this.getRawOrdinalNumber(t)},mv.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},mv.prototype.getMinorTicks=function(t){},mv.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=t},mv.prototype.getOrdinalMeta=function(){return this._ordinalMeta},mv.prototype.calcNiceTicks=function(){},mv.prototype.calcNiceExtent=function(){},mv.type="ordinal";var gv,yv=mv;function mv(t){var t=gv.call(this,t)||this,e=(t.type="ordinal",t.getSetting("ordinalMeta"));return V(e=e||new rv({}))&&(e=new rv({categories:F(e,function(t){return P(t)?t.value:t})})),t._ordinalMeta=e,t._extent=t.getSetting("extent")||[0,e.categories.length-1],t}ev.registerClass(yv);var vv,_v=_o,xv=(u(wv,vv=ev),wv.prototype.parse=function(t){return t},wv.prototype.contain=function(t){return pv(t,this._extent)},wv.prototype.normalize=function(t){return dv(t,this._extent)},wv.prototype.scale=function(t){return fv(t,this._extent)},wv.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},wv.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},wv.prototype.getInterval=function(){return this._interval},wv.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=hv(t)},wv.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(e){n[0]s&&o.push(t?{value:_v(s+e,r)}:{value:n[1]})}return o},wv.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&h=M[0]&&p<=M[1]&&a++)}u=(M[1]-M[0])/b;if(1.5*u=M[0]&&t.value<=M[1]&&!t.notAdd})}),function(t){return 0n&&(this._approxInterval=n),Lv.length),t=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]>1^-(1&s),l=(l=t.charCodeAt(a+1)-64)>>1^-(1&l),r=s+=r,o=l+=o;i.push([s/n,l/n])}return i}function M_(t,o){return F(ct((t=(e=t).UTF8Encoding?(null==(r=(n=e).UTF8Scale)&&(r=1024),R(n.features,function(t){var e=t.geometry,n=e.encodeOffsets,i=e.coordinates;if(n)switch(e.type){case"LineString":e.coordinates=S_(i,n,r);break;case"Polygon":case"MultiLineString":b_(i,n,r);break;case"MultiPolygon":R(i,function(t,e){return b_(t,n[e],r)})}}),n.UTF8Encoding=!1,n):e).features,function(t){return t.geometry&&t.properties&&0l&&(l=s[h],u=h);++o[u],s[u]=0,++a}return F(o,function(t){return t/i})}(t,n)[e]||0},getPixelPrecision:bo,getPrecision:xo,getPrecisionSafe:wo,isNumeric:Lo,isRadianAroundZero:Mo,linearMap:mo,nice:Do,numericToNumber:Ao,parseDate:Co,quantile:function(t,e){var e=(t.length-1)*e+1,n=Math.floor(e),i=+t[n-1];return(e=e-n)?i+e*(t[n]-i):i},quantity:ko,quantityExponent:Io,reformIntervals:function(t){t.sort(function(t,e){return function t(e,n,i){return e.interval[i]':'':{renderMode:r,content:"{"+(t.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}:""},normalizeCssArray:bp,toCamelCase:function(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),t=e?t&&t.charAt(0).toUpperCase()+t.slice(1):t},truncateText:wa}),kc=Object.freeze({__proto__:null,bind:pt,clone:_,curry:dt,defaults:B,each:R,extend:O,filter:ct,indexOf:k,inherits:st,isArray:V,isFunction:I,isObject:P,isString:H,map:F,merge:d,reduce:ht}),T_=jo();function C_(e,t){t=F(t,function(t){return e.scale.parse(t)});return"time"===e.type&&0o[1],h(l[0].coord,o[0])&&(t?l[0].coord=o[0]:l.shift()),t&&h(o[0],l[0].coord)&&l.unshift({coord:o[0]}),h(o[1],e.coord)&&(t?e.coord=o[1]:l.pop()),t)&&h(e.coord,o[1])&&l.push({coord:o[1]}),a},E_.prototype.getMinorTicksCoords=function(){var t;return"ordinal"===this.scale.type?[]:(t=this.model.getModel("minorTick").get("splitNumber"),F(this.scale.getMinorTicks(t=0=u}}for(var a,s=this.__startIndex;sr[0]){for(l=0;lt);l++);s=i[r[l]]}r.splice(l+1,0,t),(i[t]=e).virtual||(s?(n=s.dom).nextSibling?a.insertBefore(e.dom,n.nextSibling):a.appendChild(e.dom):a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom)),e.painter||(e.painter=this)}},v.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;ie[u-1].coord&&(e.reverse(),h.reverse()),function(t,e){var n,i,r=[],o=t.length;function a(t,e,n){var i=t.coord;return{coord:n,color:xi((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;si)return;return 1}(a,e)))return r=e.mapDimension(a.dim),o={},R(a.getViewLabels(),function(t){t=a.scale.getRawOrdinalNumber(t.tickValue);o[t]=1}),function(t){return!o.hasOwnProperty(e.get(r,t))}}}function hx(t){for(var e,n,i=t.length/2;0e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;ne[1]&&e.reverse(),e},Bx.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},Bx.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)};var Ex,zx=Bx;function Bx(t,e,n,i,r){t=Ex.call(this,t,e,n)||this;return t.index=0,t.type=i||"value",t.position=r||"bottom",t}function Fx(t){return"cartesian2d"===t.get("coordinateSystem")}function Vx(i){var r={xAxisModel:null,yAxisModel:null};return R(r,function(t,e){var n=e.replace(/Model$/,""),n=i.getReferringComponents(n,Qo).models[0];r[e]=n}),r}var Hx=Math.log;Gx.prototype.getRect=function(){return this._rect},Gx.prototype.update=function(t,e){var n=this._axesMap;function i(t){var d,e=N(t),n=e.length;if(n){for(var i=[],r=n-1;0<=r;r--){var o=t[+e[r]],a=o.model,s=o.scale;sv(s)&&a.get("alignTicks")&&null==a.get("interval")?i.push(o):($v(s,a),sv(s)&&(d=o))}i.length&&(d||$v((d=i.pop()).scale,d.model),R(i,function(t){var e=t.scale,t=t.model,n=d.scale,i=xv.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,n=i.getInterval.call(n),s=(t=Kv(e,t)).extent,l=t.fixMin,t=t.fixMax,u=("log"===e.type&&(u=Hx(e.base),s=[Hx(s[0])/u,Hx(s[1])/u]),e.setExtent(s[0],s[1]),e.calcNiceExtent({splitNumber:a,fixMin:l,fixMax:t}),i.getExtent.call(e)),h=(l&&(s[0]=u[0]),t&&(s[1]=u[1]),i.getInterval.call(e)),c=s[0],p=s[1];if(l&&t)h=(p-c)/a;else if(l)for(p=s[0]+h*a;ps[0]&&isFinite(c)&&isFinite(s[0]);)h=uv(h),c=s[1]-h*a;else{u=(h=e.getTicks().length-1>a?uv(h):h)*a;(c=_o((p=Math.ceil(s[1]/h)*h)-u))<0&&0<=s[0]?(c=0,p=_o(u)):0p[1]?-1:1,a=["start"===h?p[0]-a*c:"end"===h?p[1]+a*c:(p[0]+p[1])/2,Jx(h)?t.labelOffset+u*c:0],null!=(c=e.get("nameRotate"))&&(c=c*qx/180),Jx(h)?r=jx.innerTextLayout(t.rotation,null!=c?c:t.rotation,u):(u=t.rotation,h=h,p=p,c=So((c=c||0)-u),u=p[0]>p[1],p="start"===h&&!u||"start"!==h&&u,h=Mo(c-qx/2)?(d=p?"bottom":"top","center"):Mo(c-1.5*qx)?(d=p?"top":"bottom","center"):(d="middle",c<1.5*qx&&qx/2u[1]&&u.reverse(),(s=null==s||s>u[1]?u[1]:s)":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Iw=(Fw.prototype.evaluate=function(t){var e=typeof t;return H(e)?this._condVal.test(t):!!gt(e)&&this._condVal.test(t+"")},Fw),Dw=(Bw.prototype.evaluate=function(){return this.value},Bw),Aw=(zw.prototype.evaluate=function(){for(var t=this.children,e=0;e"}(i,r)+("style"!==i?xe(e):e||"")+(n?o+F(n,t).join(o)+o:"")+""}(t)}function db(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function fb(t,e,n,i){return cb("svg","root",{width:t,height:e,xmlns:ob,"xmlns:xlink":ab,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var gb=0;var yb={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"},mb="transform-origin";var vb={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function _b(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function xb(t){return H(t)?yb[t]?"cubic-bezier("+yb[t]+")":Zn(t)?t:"":""}function wb(D,A,L,P){var t=D.animators,e=t.length,n=[];if(D instanceof Ch){if(r=function(t,e,u){var h,c,t=t.shape.paths,p={};if(R(t,function(t){var e=db(u.zrId),t=(e.animation=!0,wb(t,{},e,!0),e.cssAnims),n=e.cssNodes,e=N(t),i=e.length;if(i){var r,o,a=t[c=e[i-1]];for(r in a){var s=a[r];p[r]=p[r]||{d:""},p[r].d+=s.d||""}for(o in n){var l=n[o].animation;0<=l.indexOf(c)&&(h=l)}}}),h)return e.d=!1,t=_b(p,u),h.replace(c,t)}(D,A,L))n.push(r);else if(!e)return}else if(!e)return;for(var i,r,o,a={},s=0;s"].join(o):"")&&(e=cb("style","stl",{},[],c),h.push(e)),fb(i,l,h,t.useViewBox)},rS.prototype.renderToString=function(t){return pb(this.renderToVNode({animation:E((t=t||{}).cssAnimation,!0),emphasis:E(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:E(t.useViewBox,!0)}),{newline:!0})},rS.prototype.setBackgroundColor=function(t){this._backgroundColor=t},rS.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},rS.prototype._paintList=function(t,e,n){for(var i,r,o,a,s,l,u,h=t.length,c=[],p=0,d=0,f=0;f>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}}return n}(e,o),o,r);if(e)return e(t,n,i),!0}return!1}function ye(t){return"CANVAS"===t.nodeName.toUpperCase()}var me=/([&<>"'])/g,ve={"&":"&","<":"<",">":">",'"':""","'":"'"};function _e(t){return null==t?"":(t+"").replace(me,function(t,e){return ve[e]})}var xe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,be=[],we=w.browser.firefox&&+w.browser.version.split(".")[0]<39;function Se(t,e,n,i){return n=n||{},i?Me(t,e,n):we&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):Me(t,e,n),n}function Me(t,e,n){if(w.domSupported&&t.getBoundingClientRect){var i,r=e.clientX,e=e.clientY;if(ye(t))return i=t.getBoundingClientRect(),n.zrX=r-i.left,n.zrY=e-i.top;if(ge(be,t,r,e))return n.zrX=be[0],n.zrY=be[1]}n.zrX=n.zrY=0}function Ie(t){return t||window.event}function Te(t,e,n){var i;return null==(e=Ie(e)).zrX&&((i=e.type)&&0<=i.indexOf("touch")?(i=("touchend"!==i?e.targetTouches:e.changedTouches)[0])&&Se(t,i,e,n):(Se(t,e,e,n),t=(t=(i=e).wheelDelta)||(n=i.deltaX,i=i.deltaY,null==n||null==i?t:3*(0!==i?Math.abs(i):Math.abs(n))*(0=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},Ke.prototype.clone=function(){return new Ke(this.x,this.y,this.width,this.height)},Ke.prototype.copy=function(t){Ke.copy(this,t)},Ke.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},Ke.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Ke.prototype.isZero=function(){return 0===this.width||0===this.height},Ke.create=function(t){return new Ke(t.x,t.y,t.width,t.height)},Ke.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},Ke.applyTransform=function(t,e,n){var i,r,o,a;n?n[1]<1e-5&&-1e-5t.getWidth()||n<0||n>t.getHeight()}R(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){an.prototype[a]=function(t){var e,n,i=t.zrX,r=t.zrY,o=hn(this,i,r);if("mouseup"===a&&o||(n=(e=this.findHover(i,r)).target),"mousedown"===a)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===a)this._upEl=n;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4<$t(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,a,t)}});var cn=32,pn=7;function dn(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r>>1])<0?l=o:s=1+o;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function mn(t,e,n,i){var f,g,o,a,y,s,m,r=(i=i||t.length)-(n=n||0);if(!(r<2)){var l=0;if(ra[t+1])break;p(t)}},forceMergeRuns:function(){for(;1>=1;return t+e}(r);do{}while((l=dn(t,n,i,e))=this._maxSize&&0>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===i?parseInt(n.slice(4),16)/15:1),fi(t,e),e):void hi(e,0,0,0,1):7===i||9===i?0<=(r=parseInt(n.slice(1,7),16))&&r<=16777215?(hi(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===i?parseInt(n.slice(7),16)/255:1),fi(t,e),e):void hi(e,0,0,0,1):void 0;var r=n.indexOf("("),o=n.indexOf(")");if(-1!==r&&o+1===i){var i=n.substr(0,r),a=n.substr(r+1,o-(r+1)).split(","),s=1;switch(i){case"rgba":if(4!==a.length)return 3===a.length?hi(e,+a[0],+a[1],+a[2],1):hi(e,0,0,0,1);s=si(a.pop());case"rgb":return 3<=a.length?(hi(e,ai(a[0]),ai(a[1]),ai(a[2]),3===a.length?s:si(a[3])),fi(t,e),e):void hi(e,0,0,0,1);case"hsla":return 4!==a.length?void hi(e,0,0,0,1):(a[3]=si(a[3]),yi(a,e),fi(t,e),e);case"hsl":return 3!==a.length?void hi(e,0,0,0,1):(yi(a,e),fi(t,e),e);default:return}}hi(e,0,0,0,1)}}function yi(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=si(t[1]),r=si(t[2]),i=r<=.5?r*(i+1):r+i-r*i,r=2*r-i;return hi(e=e||[],ri(255*li(r,i,n+1/3)),ri(255*li(r,i,n)),ri(255*li(r,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function mi(t,e){var n=gi(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255e);n++);n=g(n-1,c-2)}r=h[n+1],i=h[n]}i&&r&&(this._lastFr=n,this._lastFrP=e,f=r.percent-i.percent,o=0==f?1:g((e-i.percent)/f,1),r.easingFunc&&(o=r.easingFunc(o)),g=s?this._additiveValue:d?$i:t[p],(Ki(u)||d)&&(g=g||(this._additiveValue=[])),this.discrete?t[p]=(o<1?i:r).rawValue:Ki(u)?(1===u?Ui:function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;athis._sleepAfterStill)&&this.animation.stop()},po.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},po.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},po.prototype.refreshHover=function(){this._needsRefreshHover=!0},po.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},po.prototype.resize=function(t){this._disposed||(this.painter.resize((t=t||{}).width,t.height),this.handler.resize())},po.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},po.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},po.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},po.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},po.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},po.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},po.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},po.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},po.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e=e.maxIterations){t+=e.ellipsis;break}var s=0===a?function(t,e,n,i){for(var r=0,o=0,a=t.length;oo){0i.width&&(o=e.split("\n"),c=!0),i.accumWidth=t):(t=za(e,h,i.width,i.breakAll,i.accumWidth),i.accumWidth=t.accumWidth+n,a=t.linesWidths,o=t.lines)):o=e.split("\n");for(var p=0;pthis._ux||i>this._uy;return this.addData(ns.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r?(this._xi=t,this._yi=e,this._pendingPtDist=0):(r=n*n+i*i)>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=r),this},r.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(ns.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(ns.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},r.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),ms[0]=i,ms[1]=r,s=o,(l=vs((a=ms)[0]))<0&&(l+=gs),h=l-a[0],u=a[1],u+=h,!s&&gs<=u-l?u=l+gs:s&&gs<=l-u?u=l-gs:!s&&uu.length&&(this._expandData(),u=this.data);for(var h=0;hn||ds(y)>i||c===e-1)&&(f=Math.sqrt(C*C+y*y),r=g,o=_);break;case ns.C:var m=t[c++],v=t[c++],_=(g=t[c++],t[c++]),x=t[c++],b=t[c++],f=function(t,e,n,i,r,o,a,s,l){for(var u=t,h=e,c=0,p=1/l,d=1;d<=l;d++){var f=d*p,g=En(t,n,r,a,f),f=En(e,i,o,s,f),y=g-u,m=f-h;c+=Math.sqrt(y*y+m*m),u=g,h=f}return c}(r,o,m,v,g,_,x,b,10),r=x,o=b;break;case ns.Q:f=function(t,e,n,i,r,o,a){for(var s=t,l=e,u=0,h=1/a,c=1;c<=a;c++){var p=c*h,d=Wn(t,n,r,p),p=Wn(e,i,o,p),f=d-s,g=p-l;u+=Math.sqrt(f*f+g*g),s=d,l=p}return u}(r,o,m=t[c++],v=t[c++],g=t[c++],_=t[c++],10),r=g,o=_;break;case ns.A:var x=t[c++],b=t[c++],w=t[c++],S=t[c++],M=t[c++],I=t[c++],T=I+M;c+=1,d&&(a=cs(M)*w+x,s=ps(M)*S+b),f=hs(w,S)*us(gs,Math.abs(I)),r=cs(T)*w+x,o=ps(T)*S+b;break;case ns.R:a=r=t[c++],s=o=t[c++],f=2*t[c++]+2*t[c++];break;case ns.Z:var C=a-r,y=s-o;f=Math.sqrt(C*C+y*y),r=a,o=s}0<=f&&(u+=l[h++]=f)}return this._pathLen=u},r.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h=this.data,z=this._ux,E=this._uy,B=this._len,c=e<1,p=0,d=0,f=0;if(!c||(this._pathSegLen||this._calculateLength(),a=this._pathSegLen,s=e*this._pathLen))t:for(var g=0;gs){var w=(s-p)/y;t.lineTo(r*(1-w)+v*w,o*(1-w)+_*w);break t}p+=y}t.lineTo(v,_),r=v,o=_,f=0}else{x=x*x+b*b;fs){Hn(r,S,I,b,w=(s-p)/y,is),Hn(o,M,T,x,w,rs),t.bezierCurveTo(is[1],rs[1],is[2],rs[2],is[3],rs[3]);break t}p+=y}t.bezierCurveTo(S,M,I,T,b,x),r=b,o=x;break;case ns.Q:if(S=h[g++],M=h[g++],I=h[g++],T=h[g++],c){if(p+(y=a[d++])>s){Yn(r,S,I,w=(s-p)/y,is),Yn(o,M,T,w,rs),t.quadraticCurveTo(is[1],rs[1],is[2],rs[2]);break t}p+=y}t.quadraticCurveTo(S,M,I,T),r=I,o=T;break;case ns.A:var C=h[g++],k=h[g++],D=h[g++],A=h[g++],L=h[g++],P=h[g++],O=h[g++],F=!h[g++],H=As&&(N=L+P*(s-p)/y,G=!0),p+=y),R&&t.ellipse?t.ellipse(C,k,D,A,O,L,N,F):t.arc(C,k,H,L,N,F),G)break t;V&&(n=cs(L)*D+C,i=ps(L)*A+k),r=cs(N)*D+C,o=ps(N)*A+k;break;case ns.R:n=r=h[g],i=o=h[g+1],v=h[g++],_=h[g++];P=h[g++],R=h[g++];if(c){if(p+(y=a[d++])>s){O=s-p;t.moveTo(v,_),t.lineTo(v+us(O,P),_),0<(O-=P)&&t.lineTo(v+P,_+us(O,R)),0<(O-=R)&&t.lineTo(v+hs(P-O,0),_+R),0<(O-=P)&&t.lineTo(v,_+hs(R-O,0));break t}p+=y}t.rect(v,_,P,R);break;case ns.Z:if(c){if(p+(y=a[d++])>s){t.lineTo(r*(1-(w=(s-p)/y))+n*w,o*(1-w)+i*w);break t}p+=y}t.closePath(),r=n,o=i}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.CMD=ns,r.initDefaultProps=((zu=r.prototype)._saveData=!0,zu._ux=0,zu._uy=0,zu._pendingPtDist=0,void(zu._version=0));var _s=r;function r(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}function xs(t,e,n,i,r,o,a){var s;if(0!==r)return s=0,!(e+(r=r)n||s<-n)return 0;var e=Math.sqrt(n*n-s*s);if(ks[0]=-e,ks[1]=e,(n=Math.abs(i-r))<1e-4)return 0;if(Ts-1e-4<=n)return r=Ts,h=o?1:-1,a>=ks[i=0]+t&&a<=ks[1]+t?h:0;rMath.PI/2&&c<1.5*Math.PI?-h:h)}return l}(y,m,_,x,x+b,w,I,r);u=Math.cos(x+b)*v+y,h=Math.sin(x+b)*_+m;break;case Is.R:if(c=u=a[d++],p=h=a[d++],S=c+a[d++],M=p+a[d++],n){if(xs(c,p,S,p,e,i,r)||xs(S,p,S,M,e,i,r)||xs(S,M,c,M,e,i,r)||xs(c,M,c,p,e,i,r))return!0}else l=(l+=Ms(S,p,S,M,i,r))+Ms(c,M,c,p,i,r);break;case Is.Z:if(n){if(xs(u,h,c,p,e,i,r))return!0}else l+=Ms(u,h,c,p,i,r);u=c,h=p}}return n||(t=h,o=p,Math.abs(t-o)i.len()&&(uMath.abs(i[1])?0':'':{renderMode:r,content:"{"+(t.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}:""}function Jp(t,e){return e=e||"transparent",H(t)?t:P(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function td(t,e){var n;"_blank"===e||"blank"===e?((n=window.open()).opener=null,n.location.href=t):window.open(t,e)}var ed=R,nd=["left","right","top","bottom","width","height"],id=[["width","left","right"],["height","top","bottom"]];function rd(a,s,l,u,h){var c=0,p=0,d=(null==u&&(u=1/0),null==h&&(h=1/0),0);s.eachChild(function(t,e){var n,i,r,o=t.getBoundingRect(),e=s.childAt(e+1),e=e&&e.getBoundingRect();d="horizontal"===a?(r=o.width+(e?-e.x+o.x:0),(n=c+r)>u||t.newline?(c=0,n=r,p+=d+l,o.height):Math.max(d,o.height)):(r=o.height+(e?-e.y+o.y:0),(i=p+r)>h||t.newline?(c+=d+l,p=0,i=r,o.width):Math.max(d,o.width)),t.newline||(t.x=c,t.y=p,t.markRedraw(),"horizontal"===a?c=n+l:p=i+l)})}var od=rd;function ad(t,e,n){n=qp(n||0);var i=e.width,r=e.height,o=bo(t.left,i),a=bo(t.top,r),e=bo(t.right,i),s=bo(t.bottom,r),l=bo(t.width,i),u=bo(t.height,r),h=n[2]+n[0],c=n[1]+n[3],p=t.aspect;switch(isNaN(l)&&(l=i-e-c-o),isNaN(u)&&(u=r-s-h-a),null!=p&&(isNaN(l)&&isNaN(u)&&(i/re)return t[i];return t[n-1]}(r,n):i)||i)&&r.length?(n=r[o],t&&(e[t]=n),a.paletteIdx=(o+1)%r.length,n):void 0},Nd.prototype.clearColorPalette=function(){var t,e;(e=Od)(t=this).paletteIdx=0,e(t).paletteNameMap={}},Nd);function Nd(){}var zd,Ed,Bd,Vd,Fd="\0_ec_inner",Hd=(u(Gd,Vd=ap),Gd.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new ap(i),this._locale=new ap(r),this._optionManager=o},Gd.prototype.setOption=function(t,e,n){e=Xd(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},Gd.prototype.resetOption=function(t,e){return this._resetOption(t,Xd(e))},Gd.prototype._resetOption=function(t,e){var n,i=!1,r=this._optionManager;return t&&"recreate"!==t||(n=r.mountOption("recreate"===t),this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(n,e)):Bd(this,n),i=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(n=r.getTimelineOption(this))&&(i=!0,this._mergeOption(n,e)),t&&"recreate"!==t&&"media"!==t||(n=r.getMediaOption(this)).length&&R(n,function(t){i=!0,this._mergeOption(t,e)},this),i},Gd.prototype.mergeOption=function(t){this._mergeOption(t,null)},Gd.prototype._mergeOption=function(i,t){var r=this.option,h=this._componentsMap,c=this._componentsCount,n=[],o=E(),p=t&&t.replaceMergeMainTypeMap;kd(this).datasetMap=E(),R(i,function(t,e){null!=t&&(g.hasClass(e)?e&&(n.push(e),o.set(e,!0)):r[e]=null==r[e]?_(t):d(r[e],t,!0))}),p&&p.each(function(t,e){g.hasClass(e)&&!o.get(e)&&(n.push(e),o.set(e,!0))}),g.topologicalTravel(n,g.getAllClassMainTypes(),function(o){t=this,n=Go(i[e=o]);var t=(e=(e=Pd.get(e))&&e(t))?n.concat(e):n,e=h.get(o),n=Yo(e,t,e?p&&p.get(o)?"replaceMerge":"normalMerge":"replaceAll");Qo(n,o,g),r[o]=null,h.set(o,null),c.set(o,0);var a,s=[],l=[],u=0;R(n,function(t,e){var n=t.existing,i=t.newOption;if(i){var r=g.getClass(o,t.keyInfo.subType,!("series"===o));if(!r)return;if("tooltip"===o){if(a)return;a=!0}n&&n.constructor===r?(n.name=t.keyInfo.name,n.mergeOption(i,this),n.optionUpdated(i,!1)):(e=O({componentIndex:e},t.keyInfo),O(n=new r(i,this,this,e),e),t.brandNew&&(n.__requireNewView=!0),n.init(i,this,this),n.optionUpdated(null,!0))}else n&&(n.mergeOption({},this),n.optionUpdated({},!1));n?(s.push(n.option),l.push(n),u++):(s.push(void 0),l.push(void 0))},this),r[o]=s,h.set(o,l),c.set(o,u),"series"===o&&zd(this)},this),this._seriesIndices||zd(this)},Gd.prototype.getOption=function(){var a=_(this.option);return R(a,function(t,e){if(g.hasClass(e)){for(var n=Go(t),i=n.length,r=!1,o=i-1;0<=o;o--)n[o]&&!$o(n[o])?r=!0:(n[o]=null,r||i--);n.length=i,a[e]=n}}),delete a[Fd],a},Gd.prototype.getTheme=function(){return this._theme},Gd.prototype.getLocaleModel=function(){return this._locale},Gd.prototype.setUpdatePayload=function(t){this._payload=t},Gd.prototype.getUpdatePayload=function(){return this._payload},Gd.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){t=n[e||0];if(t)return t;if(null==e)for(var i=0;ig[1]&&(g[1]=f)}return{start:a,end:this._rawCount=this._count=s}},l.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=V(o,function(t){return t.property}),u=0;uf[1]&&(f[1]=g)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},l.prototype.count=function(){return this._count},l.prototype.get=function(t,e){return 0<=e&&e=this._rawCount||t<0)){if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}}return-1},l.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],r=[];if(i){null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=u&&v<=h||isNaN(v))&&(a[s++]=p),p++;l=!0}else if(2===r){for(var d=c[i[0]],g=c[i[1]],y=t[i[1]][0],m=t[i[1]][1],f=0;f=u&&v<=h||isNaN(v))&&(a[s++]=x)}else for(f=0;ft[S][1])&&(b=!1)}b&&(a[s++]=e.getRawIndex(f))}return sy[1]&&(y[1]=g)}}},l.prototype.lttbDownSample=function(t,e){var n,i=this.clone([t],!0),r=i._chunks[t],o=this.count(),a=0,s=Math.floor(1/e),l=this.getRawIndex(0),u=new(Rg(this._rawCount))(Math.min(2*(Math.ceil(o/s)+2),o));u[a++]=l;for(var h=1;hx&&(x=n,b=M)}0h[1]&&(h[1]=y),c[p++]=m}return r._count=p,r._indices=c,r._updateGetRawIdx(),r},l.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();r'+_e(u)+""+h,t))}function Qg(t,e,n,i){var r,o,a,s,l=t.renderMode,u=e.noName,h=e.noValue,c=!e.markerType,p=e.name,d=t.useUTC,f=e.valueFormatter||t.valueFormatter||function(t){return V(t=F(t)?t:[t],function(t,e){return Zp(t,F(o)?o[e]:o,d)})};if(!u||!h)return r=c?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",l),p=u?"":Zp(p,"ordinal",d),o=e.valueType,f=h?[]:f(e.value,e.dataIndex),e=!c||!u,a=!c&&u,i=Xg(i,l),s=i.nameStyle,i=i.valueStyle,"richText"===l?(c?"":r)+(u?"":ey(t,p,s))+(h?"":function(t,e,n,i,r){r=[r],i=i?10:20;return n&&r.push({padding:[0,0,0,i],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(F(e)?e.join(" "):e,r)}(t,f,e,a,i)):ty((c?"":r)+(u?"":''+_e(p)+"")+(h?"":function(t,e,n,i){e=e?"float:right;margin-left:"+(n?"10px":"20px"):"";return t=F(t)?t:[t],''+V(t,_e).join("  ")+""}(f,e,a,i)),n)}function Jg(t,e,n,i,r,o){if(t)return Kg(t)({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,o)}function ty(t,e){return'
'+t+'
'}function ey(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function ny(t,e){t=t.get("padding");return null!=t?t:"richText"===e?[8,10]:10}ry.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},ry.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,e=Qp({color:e,type:t,renderMode:n,markerId:i});return H(e)?e:(this.richTextStyles[i]=e.style,e.content)},ry.prototype.wrapRichTextStyle=function(t,e){var n={},e=(F(e)?R(e,function(t){return O(n,t)}):O(n,e),this._generateStyleName());return this.richTextStyles[e]=n,"{"+e+"|"+t+"}"};var iy=ry;function ry(){this.richTextStyles={},this._nextStyleNameId=Eo()}function oy(t){var e,n,i,r,o,a,s,l,u,h,c,p=t.series,d=t.dataIndex,t=t.multipleSeries,f=p.getData(),g=f.mapDimensionsAll("defaultedTooltip"),y=g.length,m=p.getRawValue(d),v=F(m),_=(_=d,Jp((b=p).getData().getItemVisual(_,"style")[b.visualDrawType]));function x(t,e){e=s.getDimensionInfo(e);e&&!1!==e.otherDims.tooltip&&(l?c.push(Zg("nameValue",{markerType:"subItem",markerColor:a,name:e.displayName,value:t,valueType:e.type})):(u.push(t),h.push(e.type)))}1this.getShallow("animationThreshold")?!1:t)},o.prototype.restoreData=function(){this.dataTask.dirty()},o.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return Rd.prototype.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},o.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},o.prototype.getProgressive=function(){return this.get("progressive")},o.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},o.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},o.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n)this.option.selectedMap={},this._selectedDataIndicesMap={};else for(var o=0;oe.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function fy(e,n){R(Nt(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,M(gy,n))})}function gy(t,e){t=yy(t);return t&&t.setOutputEnd((e||this).count()),e}function yy(t){var e,n=(t.ecModel||{}).scheduler,n=n&&n.getPipeline(t.uid);if(n)return(n=n.currentTask)&&(e=n.agentStubMap)?e.get(t.uid):n}ut(uy,jf),ut(uy,Rd),da(uy,g);vy.prototype.init=function(t,e){},vy.prototype.render=function(t,e,n,i){},vy.prototype.dispose=function(t,e){},vy.prototype.updateView=function(t,e,n,i){},vy.prototype.updateLayout=function(t,e,n,i){},vy.prototype.updateVisual=function(t,e,n,i){},vy.prototype.toggleBlurSeries=function(t,e,n){},vy.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)};var my=vy;function vy(){this.group=new ao,this.uid=up("viewComponent")}function _y(){var o=ta();return function(t){var e=o(t),t=t.pipelineContext,n=!!e.large,i=!!e.progressiveRender,r=e.large=!(!t||!t.large),e=e.progressiveRender=!(!t||!t.progressiveRender);return!(n==r&&i==e)&&"reset"}}pa(my),ma(my);var xy=ta(),by=_y(),wy=(Sy.prototype.init=function(t,e){},Sy.prototype.render=function(t,e,n,i){},Sy.prototype.highlight=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&Iy(t,i,"emphasis")},Sy.prototype.downplay=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&Iy(t,i,"normal")},Sy.prototype.remove=function(t,e){this.group.removeAll()},Sy.prototype.dispose=function(t,e){},Sy.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},Sy.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},Sy.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Sy.prototype.eachRendered=function(t){Oc(this.group,t)},Sy.markUpdateMethod=function(t,e){xy(t).updateMethod=e},Sy.protoInitialize=void(Sy.prototype.type="chart"),Sy);function Sy(){this.group=new ao,this.uid=up("viewChart"),this.renderTask=Qf({plan:Ty,reset:Cy}),this.renderTask.context={view:this}}function My(t,e,n){t&&pu(t)&&("emphasis"===e?Zl:jl)(t,n)}function Iy(e,t,n){var i,r=Jo(e,t),o=t&&null!=t.highlightKey?(t=t.highlightKey,i=null==(i=_l[t])&&vl<=32?_l[t]=vl++:i):null;null!=r?R(Go(r),function(t){My(e.getItemGraphicEl(t),n,o)}):e.eachItemGraphicEl(function(t){My(t,n,o)})}function Ty(t){return by(t.model)}function Cy(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,t=t.view,a=r&&xy(r).updateMethod,o=o?"incrementalPrepareRender":a&&t[a]?a:"render";return"render"!==o&&t[o](e,n,i,r),ky[o]}pa(wy),ma(wy);var ky={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Dy="\0__throttleOriginMethod",Ay="\0__throttleRate",Ly="\0__throttleType";function Py(t,r,o){var a,s,l,u,h,c=0,p=0,d=null;function f(){p=(new Date).getTime(),d=null,t.apply(l,u||[])}r=r||0;function e(){for(var t=[],e=0;en.blockIndex?n.step:null,modBy:null!=(t=i&&i.modDataCount)?Math.ceil(t/e):null,modDataCount:t}},Wy.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},Wy.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),e=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,r=t.get("large")&&i>=t.get("largeThreshold"),i="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:e,modDataCount:i,large:r}},Wy.prototype.restorePipelines=function(t){var i=this,r=i._pipelineMap=E();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;r.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),i._pipe(t,t.dataTask)})},Wy.prototype.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.api.getModel(),r=this.api;R(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,{});It(!(t.reset&&t.overallReset),""),t.reset&&this._createSeriesStageTask(t,e,i,r),t.overallReset&&this._createOverallStageTask(t,e,i,r)},this)},Wy.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},Wy.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},Wy.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},Wy.prototype._performStageTasks=function(t,s,l,u){u=u||{};var h=!1,c=this;function p(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}R(t,function(i,t){var e,n,r,o,a;u.visualType&&u.visualType!==i.visualType||(e=(n=c._stageTaskMap.get(i.uid)).seriesTaskMap,(n=n.overallTask)?((o=n.agentStubMap).each(function(t){p(u,t)&&(t.dirty(),r=!0)}),r&&n.dirty(),c.updatePayload(n,l),a=c.getPerformArgs(n,u.block),o.each(function(t){t.perform(a)}),n.perform(a)&&(h=!0)):e&&e.each(function(t,e){p(u,t)&&t.dirty();var n=c.getPerformArgs(t,u.block);n.skip=!i.performRawSeries&&s.isSeriesFiltered(t.context.model),c.updatePayload(t,l),t.perform(n)&&(h=!0)}))}),this.unfinished=h||this.unfinished},Wy.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},Wy.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}}while(e=e.getUpstream())})},Wy.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},Wy.prototype._createSeriesStageTask=function(n,t,i,r){var o=this,a=t.seriesTaskMap,s=t.seriesTaskMap=E(),t=n.seriesType,e=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||Qf({plan:Zy,reset:jy,count:Qy}));e.context={model:t,ecModel:i,api:r,useClearVisual:n.isVisual&&!n.isLayout,plan:n.plan,reset:n.reset,scheduler:o},o._pipe(t,e)}n.createOnAllSeries?i.eachRawSeries(l):t?i.eachRawSeriesByType(t,l):e&&e(i,r).each(l)},Wy.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||Qf({reset:Uy}),a=(o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r},o.agentStubMap),s=o.agentStubMap=E(),e=t.seriesType,l=t.getTargetSeries,u=!0,h=!1;function c(t){var e=t.uid,e=s.set(e,a&&a.get(e)||(h=!0,Qf({reset:Xy,onDirty:qy})));e.context={model:t,overallProgress:u},e.agent=o,e.__block=u,r._pipe(t,e)}It(!t.createOnAllSeries,""),e?n.eachRawSeriesByType(e,c):l?l(n,i).each(c):(u=!1,R(n.getSeries(),c)),h&&o.dirty()},Wy.prototype._pipe=function(t,e){t=t.uid,t=this._pipelineMap.get(t);t.head||(t.head=e),t.tail&&t.tail.pipe(e),(t.tail=e).__idxInPipeline=t.count++,e.__pipeline=t},Wy.wrapStageHandler=function(t,e){return(t=k(t)?{overallReset:t,seriesType:function(t){Jy=null;try{t(tm,em)}catch(t){}return Jy}(t)}:t).uid=up("stageHandler"),e&&(t.visualType=e),t};var Gy=Wy;function Wy(t,e,n,i){this._stageTaskMap=E(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function Uy(t){t.overallReset(t.ecModel,t.api,t.payload)}function Xy(t){return t.overallProgress&&Yy}function Yy(){this.agent.dirty(),this.getDownstream().dirty()}function qy(){this.agent&&this.agent.dirty()}function Zy(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function jy(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=Go(t.reset(t.model,t.ecModel,t.api,t.payload));return 1'+t.dom+""}),f.painter.getSvgRoot().innerHTML=g,i.connectedBackgroundColor&&f.painter.setBackgroundColor(i.connectedBackgroundColor),f.refreshImmediately(),f.painter.toDataURL()):(i.connectedBackgroundColor&&f.add(new Js({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),R(p,function(t){t=new Us({style:{x:t.left*e-l,y:t.top*e-u,image:t.dom}});f.add(t)}),f.refreshImmediately(),d.toDataURL("image/"+(i&&i.type||"png")))):this.getDataURL(i);this.id},s.prototype.convertToPixel=function(t,e){return v0(this,"convertToPixel",t,e)},s.prototype.convertFromPixel=function(t,e){return v0(this,"convertFromPixel",t,e)},s.prototype.containPixel=function(t,i){var r;if(!this._disposed)return R(na(this._model,t),function(t,n){0<=n.indexOf("Models")&&R(t,function(t){var e=t.coordinateSystem;e&&e.containPoint?r=r||!!e.containPoint(i):"seriesModels"===n&&(e=this._chartsMap[t.__viewId])&&e.containPoint&&(r=r||e.containPoint(i,t))},this)},this),!!r;this.id},s.prototype.getVisual=function(t,e){var t=na(this._model,t,{defaultMainType:"series"}),n=t.seriesModel.getData(),t=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;return null!=t?um(n,t,e):hm(n,e)},s.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},s.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},s.prototype._initEvents=function(){var t,n,i,s=this;R(G0,function(a){function t(t){var n,e,i,r=s.getModel(),o=t.target;"globalout"===a?n={}:o&&pm(o,function(t){var e,t=D(t);return t&&null!=t.dataIndex?(e=t.dataModel||r.getSeriesByIndex(t.seriesIndex),n=e&&e.getDataParams(t.dataIndex,t.dataType,o)||{},1):t.eventData&&(n=O({},t.eventData),1)},!0),n&&(e=n.componentType,i=n.componentIndex,"markLine"!==e&&"markPoint"!==e&&"markArea"!==e||(e="series",i=n.seriesIndex),i=(e=e&&null!=i&&r.getComponent(e,i))&&s["series"===e.mainType?"_chartsMap":"_componentsMap"][e.__viewId],n.event=t,n.type=a,s._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:e,view:i},s.trigger(a,n))}t.zrEventfulCallAtLast=!0,s._zr.on(a,t,s)}),R(U0,function(t,e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),R(["selectchanged"],function(e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),t=this._messageCenter,i=(n=this)._api,t.on("selectchanged",function(t){var e=i.getModel();t.isFromClick?(cm("map","selectchanged",n,e,t),cm("pie","selectchanged",n,e,t)):"select"===t.fromAction?(cm("map","selected",n,e,t),cm("pie","selected",n,e,t)):"unselect"===t.fromAction&&(cm("map","unselected",n,e,t),cm("pie","unselected",n,e,t))})},s.prototype.isDisposed=function(){return this._disposed},s.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},s.prototype.dispose=function(){var t,e,n;this._disposed?this.id:(this._disposed=!0,this.getDom()&&aa(this.getDom(),tv,""),e=(t=this)._api,n=t._model,R(t._componentsViews,function(t){t.dispose(n,e)}),R(t._chartsViews,function(t){t.dispose(n,e)}),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete K0[t.id])},s.prototype.resize=function(t){if(!this[a0])if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var e=e.resetOption("media"),n=t&&t.silent;this[s0]&&(null==n&&(n=this[s0].silent),e=!0,this[s0]=null),this[a0]=!0;try{e&&f0(this),m0.update.call(this,{type:"resize",animation:O({duration:0},t&&t.animation)})}catch(t){throw this[a0]=!1,t}this[a0]=!1,b0.call(this,n),w0.call(this,n)}}},s.prototype.showLoading=function(t,e){this._disposed?this.id:(P(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),j0[t]&&(t=j0[t](this._api,e),e=this._zr,this._loadingFX=t,e.add(t)))},s.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},s.prototype.makeActionFromEvent=function(t){var e=O({},t);return e.type=U0[t.type],e},s.prototype.dispatchAction=function(t,e){var n;this._disposed?this.id:(P(e)||(e={silent:!!e}),W0[t.type]&&this._model&&(this[a0]?this._pendingActions.push(t):(n=e.silent,x0.call(this,t,n),(t=e.flush)?this._zr.flush():!1!==t&&w.browser.weChat&&this._throttledZrFlush(),b0.call(this,n),w0.call(this,n))))},s.prototype.updateLabelLayout=function(){r0.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},s.prototype.appendData=function(t){var e;this._disposed?this.id:(e=t.seriesIndex,this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp())},s.internalField=(f0=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),g0(t,!0),g0(t,!1),e.plan()},g0=function(t,r){for(var o=t._model,a=t._scheduler,s=r?t._componentsViews:t._chartsViews,l=r?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,e=0;es.get("hoverLayerThreshold")&&!w.node&&!w.worker&&s.eachSeries(function(t){t.preventUsingHoverLayer||(t=i._chartsMap[t.__viewId]).__alive&&t.eachRendered(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}),r0.trigger("series:afterupdate",t,e,n)},A0=function(t){t[l0]=!0,t.getZr().wakeUp()},L0=function(t){t[l0]&&(t.getZr().storage.traverse(function(t){nc(t)||B0(t)}),t[l0]=!1)},k0=function(n){return u(t,e=Yd),t.prototype.getCoordinateSystems=function(){return n._coordSysMgr.getCoordinateSystems()},t.prototype.getComponentByElement=function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return n._model.getComponent(e.mainType,e.index);t=t.parent}},t.prototype.enterEmphasis=function(t,e){Zl(t,e),A0(n)},t.prototype.leaveEmphasis=function(t,e){jl(t,e),A0(n)},t.prototype.enterBlur=function(t){Kl(t),A0(n)},t.prototype.leaveBlur=function(t){$l(t),A0(n)},t.prototype.enterSelect=function(t){Ql(t),A0(n)},t.prototype.leaveSelect=function(t){Jl(t),A0(n)},t.prototype.getModel=function(){return n.getModel()},t.prototype.getViewOfComponentModel=function(t){return n.getViewOfComponentModel(t)},t.prototype.getViewOfSeriesModel=function(t){return n.getViewOfSeriesModel(t)},new t(n);function t(){return null!==e&&e.apply(this,arguments)||this}var e},void(D0=function(i){function r(t,e){for(var n=0;ne[1]&&(e[1]=t[1])},n_.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},n_.prototype.getExtent=function(){return this._extent.slice()},n_.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},n_.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},n_.prototype.isBlank=function(){return this._isBlank},n_.prototype.setBlank=function(t){this._isBlank=t};var e_=n_;function n_(t){this._setting=t||{},this._extent=[1/0,-1/0]}ma(e_);var i_=0,r_=(o_.createByAxisModel=function(t){var t=t.option,e=t.data,e=e&&V(e,a_);return new o_({categories:e,needCollect:!e,deduplication:!1!==t.dedplication})},o_.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},o_.prototype.parseAndCollect=function(t){var e,n,i=this._needCollect;return H(t)||i?(i&&!this._deduplication?(e=this.categories.length,this.categories[e]=t):null==(e=(n=this._getOrCreateMap()).get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e):t},o_.prototype._getOrCreateMap=function(){return this._map||(this._map=E(this.categories))},o_);function o_(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++i_}function a_(t){return P(t)&&null!=t.value?t.value:t+""}function s_(t){return"interval"===t.type||"log"===t.type}function l_(t,e,n,i){var r={},o=t[1]-t[0],o=r.interval=Oo(o/e,!0),e=(null!=n&&on[1]&&(n[0]=n[1]),r}function u_(t){var e=Math.pow(10,Po(t)),t=t/e;return t?2===t?t=3:3===t?t=5:t*=2:t=1,wo(t*e)}function h_(t){return Mo(t)+2}function c_(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function p_(t,e){return t>=e[0]&&t<=e[1]}function d_(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function f_(t,e){return t*(e[1]-e[0])+e[0]}u(m_,g_=e_),m_.prototype.parse=function(t){return null==t?NaN:H(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},m_.prototype.contain=function(t){return p_(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},m_.prototype.normalize=function(t){return d_(t=this._getTickNumber(this.parse(t)),this._extent)},m_.prototype.scale=function(t){return t=Math.round(f_(t,this._extent)),this.getRawOrdinalNumber(t)},m_.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},m_.prototype.getMinorTicks=function(t){},m_.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=t},m_.prototype.getOrdinalMeta=function(){return this._ordinalMeta},m_.prototype.calcNiceTicks=function(){},m_.prototype.calcNiceExtent=function(){},m_.type="ordinal";var g_,y_=m_;function m_(t){var t=g_.call(this,t)||this,e=(t.type="ordinal",t.getSetting("ordinalMeta"));return F(e=e||new r_({}))&&(e=new r_({categories:V(e,function(t){return P(t)?t.value:t})})),t._ordinalMeta=e,t._extent=t.getSetting("extent")||[0,e.categories.length-1],t}e_.registerClass(y_);var v_,__=wo,x_=(u(b_,v_=e_),b_.prototype.parse=function(t){return t},b_.prototype.contain=function(t){return p_(t,this._extent)},b_.prototype.normalize=function(t){return d_(t,this._extent)},b_.prototype.scale=function(t){return f_(t,this._extent)},b_.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},b_.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},b_.prototype.getInterval=function(){return this._interval},b_.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=h_(t)},b_.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(e){n[0]s&&o.push(t?{value:__(s+e,r)}:{value:n[1]})}return o},b_.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&h=M[0]&&p<=M[1]&&a++)}u=(M[1]-M[0])/w;if(1.5*u=M[0]&&t.value<=M[1]&&!t.notAdd})}),function(t){return 0n&&(this._approxInterval=n),N_.length),t=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]>1^-(1&s),l=(l=t.charCodeAt(a+1)-64)>>1^-(1&l),r=s+=r,o=l+=o;i.push([s/n,l/n])}return i}function D1(t,o){return V(pt((t=(e=t).UTF8Encoding?(null==(r=(n=e).UTF8Scale)&&(r=1024),R(n.features,function(t){var e=t.geometry,n=e.encodeOffsets,i=e.coordinates;if(n)switch(e.type){case"LineString":e.coordinates=k1(i,n,r);break;case"Polygon":case"MultiLineString":C1(i,n,r);break;case"MultiPolygon":R(i,function(t,e){return C1(t,n[e],r)})}}),n.UTF8Encoding=!1,n):e).features,function(t){return t.geometry&&t.properties&&0l&&(l=s[h],u=h);++o[u],s[u]=0,++a}return V(o,function(t){return t/i})}(t,n)[e]||0},getPixelPrecision:To,getPrecision:Mo,getPrecisionSafe:Io,isNumeric:zo,isRadianAroundZero:ko,linearMap:xo,nice:Oo,numericToNumber:No,parseDate:Ao,quantile:function(t,e){var e=(t.length-1)*e+1,n=Math.floor(e),i=+t[n-1];return(e=e-n)?i+e*(t[n]-i):i},quantity:Lo,quantityExponent:Po,reformIntervals:Ro,remRadian:Co,round:wo}),xa=Object.freeze({__proto__:null,format:Dp,parse:Ao}),ip=Object.freeze({__proto__:null,Arc:Lh,BezierCurve:Ch,BoundingRect:W,Circle:zu,CompoundPath:Rh,Ellipse:Fu,Group:ao,Image:Us,IncrementalDisplayable:e,Line:bh,LinearGradient:Vh,Polygon:ph,Polyline:yh,RadialGradient:zh,Rect:Js,Ring:sh,Sector:ih,Text:rl,clipPointsByRect:Cc,clipRectByRect:kc,createIcon:Dc,extendPath:pc,extendShape:hc,getShapeClass:fc,getTransform:wc,initProps:ec,makeImage:yc,makePath:gc,mergePath:vc,registerShape:dc,resizePath:_c,updateProps:tc}),ep=Object.freeze({__proto__:null,addCommas:Xp,capitalFirst:function(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)},encodeHTML:_e,formatTime:function(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=(e=Ao(e))[(n=n?"getUTC":"get")+"FullYear"](),r=e[n+"Month"]()+1,o=e[n+"Date"](),a=e[n+"Hours"](),s=e[n+"Minutes"](),l=e[n+"Seconds"](),e=e[n+"Milliseconds"]();return t.replace("MM",Cp(r,2)).replace("M",r).replace("yyyy",i).replace("yy",Cp(i%100+"",2)).replace("dd",Cp(o,2)).replace("d",o).replace("hh",Cp(a,2)).replace("h",a).replace("mm",Cp(s,2)).replace("m",s).replace("ss",Cp(l,2)).replace("s",l).replace("SSS",Cp(e,3))},formatTpl:$p,getTextRect:function(t,e,n,i,r,o,a,s){return new rl({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()},getTooltipMarker:Qp,normalizeCssArray:qp,toCamelCase:Yp,truncateText:Ca}),$c=Object.freeze({__proto__:null,bind:S,clone:_,curry:M,defaults:B,each:R,extend:O,filter:pt,indexOf:C,inherits:lt,isArray:F,isFunction:k,isObject:P,isString:H,map:V,merge:d,reduce:ct}),A1=ta();function L1(e,t){t=V(t,function(t){return e.scale.parse(t)});return"time"===e.type&&0o[1],h(l[0].coord,o[0])&&(t?l[0].coord=o[0]:l.shift()),t&&h(o[0],l[0].coord)&&l.unshift({coord:o[0]}),h(o[1],e.coord)&&(t?e.coord=o[1]:l.pop()),t)&&h(e.coord,o[1])&&l.push({coord:o[1]}),a},H1.prototype.getMinorTicksCoords=function(){var t;return"ordinal"===this.scale.type?[]:(t=this.model.getModel("minorTick").get("splitNumber"),V(this.scale.getMinorTicks(t=0=u}}for(var a,s=this.__startIndex;sr[0]){for(l=0;lt);l++);s=i[r[l]]}r.splice(l+1,0,t),(i[t]=e).virtual||(s?(n=s.dom).nextSibling?a.insertBefore(e.dom,n.nextSibling):a.appendChild(e.dom):a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom)),e.painter||(e.painter=this)}},c.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;ie&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?0<=r.height?"bottom":"top":0<=r.width?"right":"left"),h=Vc(i),l=(Bc(t,h,{labelFetcher:o,labelDataIndex:n,defaultText:jx(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:u}),t.getTextContent()),h=(s&&l&&(s=i.get(["label","position"]),t.textConfig.inside="middle"===s||null,function(t,e,n,i){if(G(i))t.setTextConfig({rotation:i});else if(F(e))t.setTextConfig({rotation:0});else{var r,i=t.shape,o=i.clockwise?i.startAngle:i.endAngle,a=i.clockwise?i.endAngle:i.startAngle,s=(o+a)/2,i=n(e);switch(i){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=s;break;case"startAngle":case"insideStartAngle":r=o;break;case"endAngle":case"insideEndAngle":r=a;break;default:return t.setTextConfig({rotation:0})}n=1.5*Math.PI-r;"middle"===i&&n>Math.PI/2&&n<1.5*Math.PI&&(n-=Math.PI),t.setTextConfig({rotation:n})}}(t,"outside"===s?u:s,pb(a),i.get(["label","rotate"]))),u=l,s=h,a=o.getRawValue(n),l=function(t){return Kx(e,t)},u&&((u=Yc(u)).prevValue=u.value,u.value=a,a=s.normal,u.valueAnimation=a.get("valueAnimation"),u.valueAnimation)&&(u.precision=a.get("precision"),u.defaultInterpolatedText=l,u.statesModels=s),i.getModel(["emphasis"]));su(t,h.get("focus"),h.get("blurScope"),h.get("disabled")),hu(t,i),null!=(o=r).startAngle&&null!=o.endAngle&&o.startAngle===o.endAngle&&(t.style.fill="none",t.style.stroke="none",R(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}function fb(){}u(mb,gb=j),mb.prototype.getDefaultShape=function(){return new fb},mb.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;le[u-1].coord&&(e.reverse(),h.reverse()),function(t,e){var n,i,r=[],o=t.length;function a(t,e,n){var i=t.coord;return{coord:n,color:xi((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;si)return;return 1}(a,e)))return r=e.mapDimension(a.dim),o={},R(a.getViewLabels(),function(t){t=a.scale.getRawOrdinalNumber(t.tickValue);o[t]=1}),function(t){return!o.hasOwnProperty(e.get(r,t))}}}function nw(t){for(var e,n,i=t.length/2;0e[1]&&e.reverse(),e},Cw.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},Cw.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)};var Iw,Tw=Cw;function Cw(t,e,n,i,r){t=Iw.call(this,t,e,n)||this;return t.index=0,t.type=i||"value",t.position=r||"bottom",t}function kw(t,e,n){n=n||{};var t=t.coordinateSystem,i=e.axis,r={},o=i.getAxesOnZeroOf()[0],a=i.position,s=o?"onZero":a,i=i.dim,t=t.getRect(),t=[t.x,t.x+t.width,t.y,t.y+t.height],l={left:0,right:1,top:0,bottom:1,onZero:2},u=e.get("offset")||0,u="x"===i?[t[2]-u,t[3]+u]:[t[0]-u,t[1]+u],h=(o&&(h=o.toGlobalCoord(o.dataToCoord(0)),u[l.onZero]=Math.max(Math.min(h,u[1]),u[0])),r.position=["y"===i?u[l[s]]:t[0],"x"===i?u[l[s]]:t[3]],r.rotation=Math.PI/2*("x"===i?0:1),r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[a],r.labelOffset=o?u[l[a]]-u[l.onZero]:0,e.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),bt(n.labelInside,e.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection),e.get(["axisLabel","rotate"]));return r.labelRotate="top"===s?-h:h,r.z2=1,r}function Dw(t){return"cartesian2d"===t.get("coordinateSystem")}function Aw(i){var r={xAxisModel:null,yAxisModel:null};return R(r,function(t,e){var n=e.replace(/Model$/,""),n=i.getReferringComponents(n,ra).models[0];r[e]=n}),r}var Lw=Math.log;Ow.prototype.getRect=function(){return this._rect},Ow.prototype.update=function(t,e){var n=this._axesMap;function i(t){var d,e=N(t),n=e.length;if(n){for(var i=[],r=n-1;0<=r;r--){var o=t[+e[r]],a=o.model,s=o.scale;s_(s)&&a.get("alignTicks")&&null==a.get("interval")?i.push(o):(e1(s,a),s_(s)&&(d=o))}i.length&&(d||e1((d=i.pop()).scale,d.model),R(i,function(t){var e=t.scale,t=t.model,n=d.scale,i=x_.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,n=i.getInterval.call(n),s=(t=t1(e,t)).extent,l=t.fixMin,t=t.fixMax,u=("log"===e.type&&(u=Lw(e.base),s=[Lw(s[0])/u,Lw(s[1])/u]),e.setExtent(s[0],s[1]),e.calcNiceExtent({splitNumber:a,fixMin:l,fixMax:t}),i.getExtent.call(e)),h=(l&&(s[0]=u[0]),t&&(s[1]=u[1]),i.getInterval.call(e)),c=s[0],p=s[1];if(l&&t)h=(p-c)/a;else if(l)for(p=s[0]+h*a;ps[0]&&isFinite(c)&&isFinite(s[0]);)h=u_(h),c=s[1]-h*a;else{u=(h=e.getTicks().length-1>a?u_(h):h)*a;(c=wo((p=Math.ceil(s[1]/h)*h)-u))<0&&0<=s[0]?(c=0,p=wo(u)):0h[1]?-1:1,a=["start"===l?h[0]-a*u:"end"===l?h[1]+a*u:(h[0]+h[1])/2,Ww(l)?t.labelOffset+s*u:0],null!=(u=e.get("nameRotate"))&&(u=u*Ew/180),Ww(l)?r=Bw.innerTextLayout(t.rotation,null!=u?u:t.rotation,s):(s=t.rotation,l=l,h=h,u=Co((u=u||0)-s),s=h[0]>h[1],h="start"===l&&!s||"start"!==l&&s,l=ko(u-Ew/2)?(c=h?"bottom":"top","center"):ko(u-1.5*Ew)?(c=h?"top":"bottom","center"):(c="middle",u<1.5*Ew&&Ew/2u[1]&&u.reverse(),(s=null==s||s>u[1]?u[1]:s)n[r],f=[-c.x,-c.y],e=(e||(f[i]=l[s]),[0,0]),s=[-p.x,-p.y],g=z(t.get("pageButtonGap",!0),t.get("itemGap",!0)),f=(d&&("end"===t.get("pageButtonPosition",!0)?s[i]+=n[r]-p[r]:e[i]+=p[r]+g),s[1-i]+=c[o]/2-p[o]/2,l.setPosition(f),u.setPosition(e),h.setPosition(s),{x:0,y:0}),c=(f[r]=(d?n:c)[r],f[o]=Math.max(c[o],p[o]),f[a]=Math.min(0,p[a]+s[1-i]),u.__rectSize=n[r],d?((e={x:0,y:0})[r]=Math.max(n[r]-p[r]-g,0),e[o]=f[o],u.setClipPath(new Js({shape:e})),u.__rectSize=e[r]):h.eachChild(function(t){t.attr({invisible:!0,silent:!0})}),this._getPageInfo(t));return null!=c.pageIndex&&tc(l,{x:c.contentPosition[0],y:c.contentPosition[1]},d?t:null),this._updatePageInfoView(t,c),f},qS.prototype._pageGo=function(t,e,n){t=this._getPageInfo(e)[t];null!=t&&n.dispatchAction({type:"legendScroll",scrollDataIndex:t,legendId:e.id})},qS.prototype._updatePageInfoView=function(n,i){var r=this._controllerGroup,t=(R(["pagePrev","pageNext"],function(t){var e=null!=i[t+"DataIndex"],t=r.childOfName(t);t&&(t.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),t.cursor=e?"pointer":"default")}),r.childOfName("pageText")),e=n.get("pageFormatter"),o=i.pageIndex,o=null!=o?o+1:0,a=i.pageCount;t&&e&&t.setStyle("text",H(e)?e.replace("{current}",null==o?"":o+"").replace("{total}",null==a?"":a+""):e({current:o,total:a}))},qS.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,t=t.getOrient().index,r=US[t],o=XS[t],e=this._findTargetItemIndex(e),a=n.children(),s=a[e],l=a.length,u=l?1:0,h={contentPosition:[n.x,n.y],pageCount:u,pageIndex:u-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(s){n=g(s);h.contentPosition[t]=-n.s;for(var c=e+1,p=n,d=n,f=null;c<=l;++c)(!(f=g(a[c]))&&d.e>p.s+i||f&&!y(f,p.s))&&(p=d.i>p.i?d:f)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=p.i),++h.pageCount),d=f;for(c=e-1,d=p=n,f=null;-1<=c;--c)(f=g(a[c]))&&y(d,f.s)||!(p.i=e&&t.s<=e+i}},qS.prototype._findTargetItemIndex=function(n){return this._showController?(this.getContentGroup().eachChild(function(t,e){t=t.__legendDataIndex;null==r&&null!=t&&(r=e),t===n&&(i=e)}),null!=i?i:r):0;var i,r},qS.type="legend.scroll",qS);function qS(){var t=null!==GS&&GS.apply(this,arguments)||this;return t.type=qS.type,t.newlineDisabled=!0,t._currentIndex=0,t}p1(function(t){p1(ES),t.registerComponentModel(VS),t.registerComponentView(YS),t.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})})});var ZS=ta(),jS=_,KS=S;function $S(){this._dragging=!1,this.animationThreshold=15}function QS(t,e,n,i){!function n(i,t){{var r;if(P(i)&&P(t))return r=!0,R(t,function(t,e){r=r&&n(i[e],t)}),!!r}return i===t}(ZS(n).lastProp,i)&&(ZS(n).lastProp=i,e?tc(n,i,t):(n.stopAnimation(),n.attr(i)))}function JS(t,e){t[e.get(["label","show"])?"show":"hide"]()}function tM(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function eM(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)})}function nM(t,e,n,i,r){var o=iM(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),n=n.getModel("label"),a=qp(n.get("padding")||0),s=n.getFont(),l=Gr(o,s),u=r.position,h=l.width+a[1]+a[3],l=l.height+a[0]+a[2],c=r.align,c=("right"===c&&(u[0]-=h),"center"===c&&(u[0]-=h/2),r.verticalAlign),i=("bottom"===c&&(u[1]-=l),"middle"===c&&(u[1]-=l/2),r=u,c=h,h=l,i=(l=i).getWidth(),l=l.getHeight(),r[0]=Math.min(r[0]+c,i)-c,r[1]=Math.min(r[1]+h,l)-h,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0),n.get("backgroundColor"));i&&"auto"!==i||(i=e.get(["axisLine","lineStyle","color"])),t.label={x:u[0],y:u[1],style:Fc(n,{text:o,font:s,fill:n.getTextColor(),padding:a,backgroundColor:i}),z2:10}}function iM(t,e,n,i,r){t=e.scale.parse(t);var o,a=e.scale.getLabel({value:t},{precision:r.precision}),r=r.formatter;return r&&(o={value:r1(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]},R(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,e=e&&e.getDataParams(t);e&&o.seriesData.push(e)}),H(r)?a=r.replace("{value}",a):k(r)&&(a=r(o))),a}function rM(t,e,n){var i=Pe();return Ee(i,i,n.rotation),ze(i,i,n.position),Sc([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}$S.prototype.render=function(t,e,n,i){var r,o,a=e.get("value"),s=e.get("status");this._axisModel=t,this._axisPointerModel=e,this._api=n,!i&&this._lastValue===a&&this._lastStatus===s||(this._lastValue=a,this._lastStatus=s,i=this._group,r=this._handle,s&&"hide"!==s?(i&&i.show(),r&&r.show(),this.makeElOption(s={},a,t,e,n),(o=s.graphicKey)!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=o,o=this._moveAnimation=this.determineAnimation(t,e),i?(o=M(QS,e,o),this.updatePointerEl(i,s,o),this.updateLabelEl(i,s,o,e)):(i=this._group=new ao,this.createPointerEl(i,s,t,e),this.createLabelEl(i,s,t,e),n.getZr().add(i)),eM(i,e,!0),this._renderHandle(a)):(i&&i.hide(),r&&r.hide()))},$S.prototype.remove=function(t){this.clear(t)},$S.prototype.dispose=function(t){this.clear(t)},$S.prototype.determineAnimation=function(t,e){var n,i=e.get("animation"),r=t.axis,o="category"===r.type,e=e.get("snap");return!(!e&&!o)&&("auto"===i||null==i?(n=this.animationThreshold,o&&r.getBandWidth()>n||!!e&&(o=qw(t).seriesDataCount,e=r.getExtent(),Math.abs(e[0]-e[1])/o>n)):!0===i)},$S.prototype.makeElOption=function(t,e,n,i,r){},$S.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;r&&(r=ZS(t).pointerEl=new Rc[r.type](jS(e.pointer)),t.add(r))},$S.prototype.createLabelEl=function(t,e,n,i){e.label&&(e=ZS(t).labelEl=new rl(jS(e.label)),t.add(e),JS(e,i))},$S.prototype.updatePointerEl=function(t,e,n){t=ZS(t).pointerEl;t&&e.pointer&&(t.setStyle(e.pointer.style),n(t,{shape:e.pointer.shape}))},$S.prototype.updateLabelEl=function(t,e,n,i){t=ZS(t).labelEl;t&&(t.setStyle(e.label.style),n(t,{x:e.label.x,y:e.label.y}),JS(t,i))},$S.prototype._renderHandle=function(t){var e,n,i,r,o,a;!this._dragging&&this.updateHandleTransform&&(n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status"),o.get("show")&&a&&"hide"!==a?(this._handle||(e=!0,r=this._handle=Dc(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Ce(t.event)},onmousedown:KS(this._onHandleDragMove,this,0,0),drift:KS(this._onHandleDragMove,this),ondragend:KS(this._onHandleDragEnd,this)}),i.add(r)),eM(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"])),F(a=o.get("size"))||(a=[a,a]),r.scaleX=a[0]/2,r.scaleY=a[1]/2,Oy(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)):(r&&i.remove(r),this._handle=null))},$S.prototype._moveHandleToValue=function(t,e){QS(this._axisPointerModel,!e&&this._moveAnimation,this._handle,tM(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},$S.prototype._onHandleDragMove=function(t,e){var n=this._handle;n&&(this._dragging=!0,t=this.updateHandleTransform(tM(n),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=t,n.stopAnimation(),n.attr(tM(t)),ZS(n).lastProp=null,this._doDispatchAxisPointer())},$S.prototype._doDispatchAxisPointer=function(){var t,e;this._handle&&(t=this._payloadInfo,e=this._axisModel,this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]}))},$S.prototype._onHandleDragEnd=function(){var t;this._dragging=!1,this._handle&&(t=this._axisPointerModel.get("value"),this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"}))},$S.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var t=t.getZr(),e=this._group,n=this._handle;t&&e&&(this._lastGraphicKey=null,e&&t.remove(e),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),Ry(this,"_doDispatchAxisPointer")},$S.prototype.doClear=function(){},$S.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}};u(sM,oM=$S),sM.prototype.makeElOption=function(t,e,n,i,r){var o,a,s=n.axis,l=s.grid,u=i.get("type"),h=lM(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(e,!0)),p=(u&&"none"!==u&&(o=(a=i).get("type"),a=a.getModel(o+"Style"),"line"===o?(p=a.getLineStyle()).fill=null:"shadow"===o&&((p=a.getAreaStyle()).stroke=null),o=p,(a=uM[u](s,c,h)).style=o,t.graphicKey=a.type,t.pointer=a),kw(l.model,n));u=e,s=t,c=p,h=n,o=i,a=r,l=Bw.innerTextLayout(c.rotation,0,c.labelDirection),c.labelMargin=o.get(["label","margin"]),nM(s,h,o,a,{position:rM(h.axis,u,c),align:l.textAlign,verticalAlign:l.textVerticalAlign})},sM.prototype.getHandleTransform=function(t,e,n){var i=kw(e.axis.grid.model,e,{labelInside:!1}),n=(i.labelMargin=n.get(["handle","margin"]),rM(e.axis,t,i));return{x:n[0],y:n[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},sM.prototype.updateHandleTransform=function(t,e,n,i){var n=n.axis,r=n.grid,o=n.getGlobalExtent(!0),r=lM(r,n).getOtherAxis(n).getGlobalExtent(),n="x"===n.dim?0:1,a=[t.x,t.y],e=(a[n]+=e[n],a[n]=Math.min(o[1],a[n]),a[n]=Math.max(o[0],a[n]),(r[1]+r[0])/2),o=[e,e];return o[n]=a[n],{x:a[0],y:a[1],rotation:t.rotation,cursorPoint:o,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][n]}};var oM,aM=sM;function sM(){return null!==oM&&oM.apply(this,arguments)||this}function lM(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var uM={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:(i=[e,n[0]],e=[e,n[1]],n=hM(t),{x1:i[n=n||0],y1:i[1-n],x2:e[n],y2:e[1-n]})};var i},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:(e=[e-i/2,n[0]],n=[i,r],i=hM(t),{x:e[i=i||0],y:e[1-i],width:n[i],height:n[1-i]})}}};function hM(t){return"x"===t.dim?0:1}u(dM,cM=g),dM.type="axisPointer",dM.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}};var cM,pM=dM;function dM(){var t=null!==cM&&cM.apply(this,arguments)||this;return t.type=dM.type,t}var fM=ta(),gM=R;function yM(t,e,n){var i,c,p;function r(t,h){c.on(t,function(e){n=p;var n,i,t,r,o,a,s,l={dispatchAction:u,pendings:i={showTip:[],hideTip:[]}};function u(t){var e=i[t.type];e?e.push(t):(t.dispatchAction=u,n.dispatchAction(t))}gM(fM(c).records,function(t){t&&h(t,e,l.dispatchAction)}),r=p,a=(t=l.pendings).showTip.length,s=t.hideTip.length,a?o=t.showTip[a-1]:s&&(o=t.hideTip[s-1]),o&&(o.dispatchAction=null,r.dispatchAction(o))})}w.node||(i=e.getZr(),fM(i).records||(fM(i).records={}),p=e,fM(c=i).initialized||(fM(c).initialized=!0,r("click",M(vM,"click")),r("mousemove",M(vM,"mousemove")),r("globalout",mM)),(fM(i).records[t]||(fM(i).records[t]={})).handler=n)}function mM(t,e,n){t.handler("leave",null,n)}function vM(t,e,n,i){e.handler(t,n,i)}function _M(t,e){w.node||(e=e.getZr(),(fM(e).records||{})[t]&&(fM(e).records[t]=null))}u(wM,xM=my),wM.prototype.render=function(t,e,n){var e=e.getComponent("tooltip"),i=t.get("triggerOn")||e&&e.get("triggerOn")||"mousemove|click";yM("axisPointer",n,function(t,e,n){"none"!==i&&("leave"===t||0<=i.indexOf(t))&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},wM.prototype.remove=function(t,e){_M("axisPointer",e)},wM.prototype.dispose=function(t,e){_M("axisPointer",e)},wM.type="axisPointer";var xM,bM=wM;function wM(){var t=null!==xM&&xM.apply(this,arguments)||this;return t.type=wM.type,t}function SM(t,e){var n,i,r,o,a=[],s=t.seriesIndex;return null==s||!(e=e.getSeriesByIndex(s))||null==(s=Jo(n=e.getData(),t))||s<0||F(s)?{point:[]}:(i=n.getItemGraphicEl(s),r=e.coordinateSystem,e.getTooltipPosition?a=e.getTooltipPosition(s)||[]:r&&r.dataToPoint?a=t.isStacked?(e=r.getBaseAxis(),t=r.getOtherAxis(e).dim,e=e.dim,t="x"===t||"radius"===t?1:0,e=n.mapDimension(e),(o=[])[t]=n.get(e,s),o[1-t]=n.get(n.getCalculationInfo("stackResultDimension"),s),r.dataToPoint(o)||[]):r.dataToPoint(n.getValues(V(r.dimensions,function(t){return n.mapDimension(t)}),s))||[]:i&&((e=i.getBoundingRect().clone()).applyTransform(i.transform),a=[e.x+e.width/2,e.y+e.height/2]),{point:a,el:i})}var MM=ta();function IM(t,e,n){var o,a,i,s,l,r,u,h,c,p,d,f,g,y,m=t.currTrigger,v=[t.x,t.y],_=t,x=t.dispatchAction||S(n.dispatchAction,n),b=e.getComponent("axisPointer").coordSysAxesInfo;if(b)return AM(v)&&(v=SM({seriesIndex:_.seriesIndex,dataIndex:_.dataIndex},e).point),o=AM(v),a=_.axesInfo,i=b.axesInfo,s="leave"===m||AM(v),l={},e={list:[],map:{}},u={showPointer:M(CM,r={}),showTooltip:M(kM,e)},R(b.coordSysMap,function(t,e){var r=o||t.containPoint(v);R(b.coordSysAxesInfo[e],function(t,e){var n=t.axis,i=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(a,t);s||!r||a&&!i||null!=(i=null!=(i=i&&i.value)||o?i:n.pointToData(v))&&TM(t,i,u,!1,l)})}),h={},R(i,function(n,t){var i=n.linkGroup;i&&!r[t]&&R(i.axesInfo,function(t,e){var e=r[e];t!==n&&e&&(e=e.value,i.mapper&&(e=n.axis.scale.parse(i.mapper(e,DM(t),DM(n)))),h[n.key]=e)})}),R(h,function(t,e){TM(i[e],t,u,!0,l)}),g=r,_=i,y=l.axesInfo=[],R(_,function(t,e){var n=t.axisPointerModel.option,e=g[e];e?(t.useHandle||(n.status="show"),n.value=e.value,n.seriesDataIndices=(e.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&y.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),m=e,_=t,e=x,!AM(t=v)&&m.list.length?(x=((m.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{},e({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:_.tooltipOption,position:_.position,dataIndexInside:x.dataIndexInside,dataIndex:x.dataIndex,seriesIndex:x.seriesIndex,dataByCoordSys:m.list})):e({type:"hideTip"}),t=i,x=(_=n).getZr(),m="axisPointerLastHighlights",c=MM(x)[m]||{},p=MM(x)[m]={},R(t,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&R(n.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;p[e]=t})}),d=[],f=[],R(c,function(t,e){p[e]||f.push(t)}),R(p,function(t,e){c[e]||d.push(t)}),f.length&&_.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:f}),d.length&&_.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:d}),l}function TM(t,e,n,i,r){var o,a,s,l,u,h,c,p,d,f,g=t.axis;!g.scale.isBlank()&&g.containData(e)&&(t.involveSeries?(l=e,u=t.axis,h=u.dim,c=l,p=[],d=Number.MAX_VALUE,f=-1,R(t.seriesModels,function(e,t){var n,i=e.getData().mapDimensionsAll(h);if(e.getAxisTooltipData)var r=e.getAxisTooltipData(i,l,u),o=r.dataIndices,r=r.nestestValue;else{if(!(o=e.getData().indicesOfNearest(i[0],l,"category"===u.type?.5:null)).length)return;r=e.getData().get(i[0],o[0])}null!=r&&isFinite(r)&&(i=l-r,(n=Math.abs(i))<=d)&&((n'):""),H(t))h.innerHTML=t+c;else if(t){h.innerHTML="",F(t)||(t=[t]);for(var p,d=0;d"),o=f.join(e);this._showOrMove(i,function(){this._updateContentNotChangedOnAxis(t,p)?this._updatePosition(i,r,n[0],n[1],this._tooltipContent,p):this._showTooltipContent(i,o,p,Math.random()+"",n[0],n[1],r,null,g)})},eI.prototype._showSeriesItemTooltip=function(t,e,n){var i,r,o,a,s,l=this._ecModel,e=D(e),u=e.seriesIndex,h=l.getSeriesByIndex(u),c=e.dataModel||h,p=e.dataIndex,e=e.dataType,d=c.getData(e),f=this._renderMode,g=t.positionDefault,y=nI([d.getItemModel(p),c,h&&(h.coordinateSystem||{}).model],this._tooltipModel,g?{position:g}:null),h=y.get("trigger");null!=h&&"item"!==h||(i=c.getDataParams(p,e),r=new iy,i.marker=r.makeTooltipMarker("item",Jp(i.color),f),g=$f(c.formatTooltip(p,!1,e)),h=y.get("order"),e=y.get("valueFormatter"),o=g.frag,a=o?Jg(e?O({valueFormatter:e},o):o,r,f,h,l.get("useUTC"),y.get("textStyle")):g.text,s="item_"+c.name+"_"+p,this._showOrMove(y,function(){this._showTooltipContent(y,a,i,s,t.offsetX,t.offsetY,t.position,t.target,r)}),n({type:"showTip",dataIndexInside:p,dataIndex:d.getRawIndex(p),seriesIndex:u,from:this.uid}))},eI.prototype._showComponentItemTooltip=function(e,n,t){var i="html"===this._renderMode,r=D(n),o=r.tooltipConfig.option||{},a=o.encodeHTMLContent,a=(H(o)&&(o={content:o,formatter:o},a=!0),a&&i&&o.content&&((o=_(o)).content=_e(o.content)),[o]),i=this._ecModel.getComponent(r.componentMainType,r.componentIndex),r=(i&&a.push(i),a.push({formatter:o.content}),e.positionDefault),s=nI(a,this._tooltipModel,r?{position:r}:null),l=s.get("content"),u=Math.random()+"",h=new iy;this._showOrMove(s,function(){var t=_(s.get("formatterParams")||{});this._showTooltipContent(s,l,t,u,e.offsetX,e.offsetY,e.position,n,h)}),t({type:"showTip",from:this.uid})},eI.prototype._showTooltipContent=function(n,t,i,e,r,o,a,s,l){var u,h,c,p,d;this._ticket="",n.get("showContent")&&n.get("show")&&((u=this._tooltipContent).setEnterable(n.get("enterable")),h=n.get("formatter"),a=a||n.get("position"),t=t,c=this._getNearestPoint([r,o],i,n.get("trigger"),n.get("borderColor")).color,h&&(t=H(h)?(p=n.ecModel.get("useUTC"),t=h,$p(t=(d=F(i)?i[0]:i)&&d.axisType&&0<=d.axisType.indexOf("time")?Dp(d.axisValue,t,p):t,i,!0)):k(h)?(d=S(function(t,e){t===this._ticket&&(u.setContent(e,l,n,c,a),this._updatePosition(n,a,r,o,u,i,s))},this),this._ticket=e,h(i,e,d)):h),u.setContent(t,l,n,c,a),u.show(n,c),this._updatePosition(n,a,r,o,u,i,s))},eI.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||F(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:F(e)?void 0:{color:i||e.color||e.borderColor}},eI.prototype._updatePosition=function(t,e,n,i,r,o,a){var s,l,u,h,c=this._api.getWidth(),p=this._api.getHeight(),d=(e=e||t.get("position"),r.getSize()),f=t.get("align"),g=t.get("verticalAlign"),y=a&&a.getBoundingRect().clone();a&&y.applyTransform(a.transform),F(e=k(e)?e([n,i],o,r.el,y,{viewSize:[c,p],contentSize:d.slice()}):e)?(n=bo(e[0],c),i=bo(e[1],p)):P(e)?((o=e).width=d[0],o.height=d[1],n=(o=ad(o,{width:c,height:p})).x,i=o.y,g=f=null):i=(n=(s=H(e)&&a?function(t,e,n,i){var r=n[0],o=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-r/2,l=e.y+h/2-o/2;break;case"top":s=e.x+u/2-r/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-r/2,l=e.y+h+a;break;case"left":s=e.x-r-a,l=e.y+h/2-o/2;break;case"right":s=e.x+u+a,l=e.y+h/2-o/2}return[s,l]}(e,y,d,t.get("borderWidth")):(o=n,a=i,e=c,y=p,l=f?null:20,u=g?null:20,h=(h=r).getSize(),s=h[0],h=h[1],null!=l&&(eh[0]?s:r)[0]:o[0]=(a[0]>h[0]?r:s)[0],"y0"===n[1]?o[1]=(a[1]>h[1]?s:r)[1]:o[1]=(a[1]>h[1]?r:s)[1],i.getMarkerPosition(o,n,!0)):(a=[l=t.get(n[0],e),u=t.get(n[1],e)],c.clampData&&c.clampData(a,a),c.dataToPoint(a,!0)),Zx(c,"cartesian2d")&&(r=c.getAxis("x"),s=c.getAxis("y"),l=t.get(n[0],e),u=t.get(n[1],e),fT(l)?h[0]=r.toGlobalCoord(r.getExtent()["x0"===n[0]?0:1]):fT(u)&&(h[1]=s.toGlobalCoord(s.getExtent()["y0"===n[1]?0:1]))),isNaN(d)||(h[0]=d),isNaN(p)||(h[1]=p)):h=[d,p],h}var vT,_T=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],xT=(u(bT,vT=Fu),bT.prototype.updateTransform=function(t,e,r){e.eachSeries(function(n){var i,t=uI.getMarkerModelFromSeries(n,"markArea");t&&(i=t.getData()).each(function(e){var t=V(_T,function(t){return mT(i,e,t,n,r)});i.setItemLayout(e,t),i.getItemGraphicEl(e).setShape("points",t)})},this)},bT.prototype.renderSeries=function(a,r,t,s){var l=a.coordinateSystem,e=a.id,u=a.getData(),n=this.markerGroupMap,i=n.get(e)||n.set(e,{group:new ao}),h=(this.group.add(i.group),this.markKeep(i),function(t,n,e){var i,r;{var o;i=t?(o=V(t&&t.dimensions,function(t){var e=n.getData();return O(O({},e.getDimensionInfo(e.mapDimension(t))||{}),{name:t,ordinalMeta:null})}),r=V(["x0","y0","x1","y1"],function(t,e){return{name:t,type:o[e%2].type}}),new Yv(r,e)):new Yv(r=[{name:"value",type:"float"}],e)}e=V(e.get("data"),M(pT,n,t,e)),t&&(e=pt(e,M(yT,t))),t=t?function(t,e,n,i){return hg(t.coord[Math.floor(i/2)][i%2],r[i])}:function(t,e,n,i){return hg(t.value,r[i])};return i.initData(e,null,t),i.hasItemOption=!0,i}(l,a,r));r.setData(h),h.each(function(e){var t=V(_T,function(t){return mT(h,e,t,a,s)}),n=l.getAxis("x").scale,i=l.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),n=[n.parse(h.get("x0",e)),n.parse(h.get("x1",e))],i=[i.parse(h.get("y0",e)),i.parse(h.get("y1",e))],r=(So(n),So(i),!!(r[0]>n[1]||r[1]i[1]||o[1]"],F(t)&&(t=t.slice(),i=!0),e?t:i?[s(t[0]),s(t[1])]:s(t));return H(r)?r.replace("{value}",i?e[0]:e).replace("{value2}",i?e[1]:e):k(r)?i?r(t[0],t[1]):r(t):i?t[0]===a[0]?n[0]+" "+e[1]:t[1]===a[1]?n[1]+" "+e[0]:e[0]+" - "+e[1]:e;function s(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},$T.prototype.resetExtent=function(){var t=this.option,t=jT([t.min,t.max]);this._dataExtent=t},$T.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;0<=i;i--){var r=n[i],r=t.getDimensionInfo(r);if(!r.isCalculationCoord)return r.storeDimIndex}},$T.prototype.getExtent=function(){return this._dataExtent.slice()},$T.prototype.completeVisualOption=function(){var e=this.ecModel,n=this.option,t={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),r=n.controller||(n.controller={}),u=(d(i,t),d(r,t),this.isCategory());function o(t){qT(n.color)&&!t.inRange&&(t.inRange={color:n.color.slice().reverse()}),t.inRange=t.inRange||{color:e.get("gradientColor")}}o.call(this,i),o.call(this,r),function(t,e,n){var e=t[e],i=t[n];e&&!i&&(i=t[n]={},ZT(e,function(t,e){var n;CT.isValidType(e)&&null!=(n=wT(e,"inactive",u))&&(i[e]=n,"color"!==e||i.hasOwnProperty("opacity")||i.hasOwnProperty("colorAlpha")||(i.opacity=[0,0]))}))}.call(this,i,"inRange","outOfRange"),function(r){var o=(r.inRange||{}).symbol||(r.outOfRange||{}).symbol,a=(r.inRange||{}).symbolSize||(r.outOfRange||{}).symbolSize,s=this.get("inactiveColor"),l=this.getItemSymbol()||"roundRect";ZT(this.stateList,function(t){var e,n=this.itemSize,i=r[t],t=(null==(i=i||(r[t]={color:u?s:[s]})).symbol&&(i.symbol=o&&_(o)||(u?l:[l])),null==i.symbolSize&&(i.symbolSize=a&&_(a)||(u?n[0]:[n[0],n[0]])),i.symbol=XT(i.symbol,function(t){return"none"===t?l:t}),i.symbolSize);null!=t&&(e=-1/0,YT(t,function(t){ee[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},eC.prototype.completeVisualOption=function(){QT.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(t){t=this.option.controller[t].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},eC.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},eC.prototype.getSelected=function(){var t=this.getExtent(),e=So((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},eC.prototype.findTargetDataIndices=function(i){var r=[];return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimensionIndex(e),function(t,e){i[0]<=t&&t<=i[1]&&n.push(e)},this),r.push({seriesId:t.id,dataIndex:n})},this),r},eC.prototype.getVisualMeta=function(n){var t=nC(0,0,this.getExtent()),e=nC(0,0,this.option.range.slice()),i=[];function r(t,e){i.push({value:t,color:n(t,e)})}for(var o=0,a=0,s=e.length,l=t.length;ao&&(n[1-t]=n[t]+i.sign*o),s.getExtent());this._dataInterval=[cC(l[0],u,h,!0),cC(l[1],u,h,!0)]},yC.prototype._updateView=function(t){var e=this.visualMapModel,n=e.getExtent(),i=this._shapes,e=[0,e.itemSize[1]],t=t?e:this._handleEnds,r=this._createBarVisual(this._dataInterval,n,t,"inRange"),n=this._createBarVisual(n,n,e,"outOfRange");i.inRange.setStyle({fill:r.barColor}).setShape("points",r.barPoints),i.outOfRange.setStyle({fill:n.barColor}).setShape("points",n.barPoints),this._updateHandle(t,r)},yC.prototype._createBarVisual=function(t,e,n,i){var i={forceState:i,convertOpacityToAlpha:!0},r=this._makeColorGradient(t,i),t=[this.getControllerVisual(t[0],"symbolSize",i),this.getControllerVisual(t[1],"symbolSize",i)],i=this._createBarPoints(n,t);return{barColor:new Vh(0,0,0,1,r),barPoints:i,handlesColor:[r[0].color,r[r.length-1].color]}},yC.prototype._makeColorGradient=function(t,e){var n=[],i=(t[1]-t[0])/100;n.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var r=1;r<100;r++){var o=t[0]+i*r;if(o>t[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},yC.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},yC.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new ao("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},yC.prototype._updateHandle=function(i,r){var o,a,s,l,u,h;this._useHandle&&(o=this._shapes,a=this.visualMapModel,s=o.handleThumbs,l=o.handleLabels,u=a.itemSize,h=a.getExtent(),pC([0,1],function(t){var e=s[t],n=(e.setStyle("fill",r.handlesColor[t]),e.y=i[t],cC(i[t],[0,u[1]],h,!0)),n=this.getControllerVisual(n,"symbolSize"),n=(e.scaleX=e.scaleY=n/u[0],e.x=u[0]-n/2,Sc(o.handleLabelPoints[t],wc(e,this.group)));l[t].setStyle({x:n[0],y:n[1],text:a.formatValueText(this._dataInterval[t]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",o.mainGroup):"center"})},this))},yC.prototype._showIndicator=function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),t=cC(t,o,s,!0),o=a[0]-c/2,s={x:u.x,y:u.y},a=(u.y=t,u.x=o,Sc(l.indicatorLabelPoint,wc(u,this.group))),c=l.indicatorLabel,l=(c.attr("invisible",!1),this._applyTransform("left",l.mainGroup)),p="horizontal"===this._orient,n=(c.setStyle({text:(n||"")+r.formatValueText(e),verticalAlign:p?l:"middle",align:p?"center":l}),{x:o,y:t,style:{fill:h}}),e={style:{x:a[0],y:a[1]}},d=(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator?(p={duration:100,easing:"cubicInOut",additive:!0},u.x=s.x,u.y=s.y,u.animateTo(n,p),c.animateTo(e,p)):(u.attr(n),c.attr(e)),this._firstShowIndicator=!1,this._shapes.handleLabels);if(d)for(var f=0;f ",i):this._showIndicator(o,o,"≈ ",i)),t=this._hoverLinkDataIndices,n=[],(e||vC(s))&&(n=this._hoverLinkDataIndices=s.findTargetDataIndices(a)),l=n,r={},u(t||[],o={}),u(l||[],r,o),i=[h(o),h(r)],this._dispatchHighDown("downplay",uC(i[0],s)),this._dispatchHighDown("highlight",uC(i[1],s)))},yC.prototype._hoverLinkFromSeriesMouseOver=function(t){var e,n;pm(t.target,function(t){t=D(t);return null!=t.dataIndex&&(e=t,1)},!0),e&&(t=this.ecModel.getSeriesByIndex(e.seriesIndex),(n=this.visualMapModel).isTargetSeries(t))&&(n=(t=t.getData(e.dataType)).getStore().get(n.getDataDimensionIndex(t),e.dataIndex),isNaN(n)||this._showIndicator(n,n))},yC.prototype._hideIndicator=function(){var t=this._shapes,e=(t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0),this._shapes.handleLabels);if(e)for(var n=0;nn&&s([n,t[0]],"outOfRange"),s(t.slice()),n=t[1])},this),{stops:r,outerColors:o};function s(t,e){var n=a.getRepresentValue({interval:t}),n=(e=e||a.getValueState(n),i(n,e));t[0]===-1/0?o[0]=n:t[1]===1/0?o[1]=n:r.push({value:t[0],color:n},{value:t[1],color:n})}},OC.type="visualMap.piecewise",OC.defaultOption=hp(e.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});var AC,LC=OC,PC={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber,r=Math.max(parseInt(r,10),1);e.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,e)},this)}};function OC(){var t=null!==AC&&AC.apply(this,arguments)||this;return t.type=OC.type,t._pieceList=[],t}function RC(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}u(EC,NC=zh),EC.prototype.doRender=function(){var i=this.group,r=(i.removeAll(),this.visualMapModel),o=r.get("textGap"),t=r.textStyleModel,a=t.getFont(),s=t.getTextColor(),l=this._getItemAlign(),u=r.itemSize,t=this._getViewData(),e=t.endsText,h=bt(r.get("showLabel",!0),!e);e&&this._renderEndsText(i,e[0],u,h,l),R(t.viewPieceList,function(t){var e=t.piece,n=new ao,t=(n.onclick=S(this._onItemClick,this,e),this._enableHoverLink(n,t.indexInModelPieceList),r.getRepresentValue(e));this._createItemSymbol(n,t,[0,0,u[0],u[1]]),h&&(t=this.visualMapModel.getValueState(t),n.add(new rl({style:{x:"right"===l?-o:u[0]+o,y:u[1]/2,text:e.text,verticalAlign:"middle",align:l,font:a,fill:s,opacity:"outOfRange"===t?.5:1}}))),i.add(n)},this),e&&this._renderEndsText(i,e[1],u,h,l),od(r.get("orient"),i,r.get("itemGap")),this.renderBackground(i),this.positionGroup(i)},EC.prototype._enableHoverLink=function(t,n){var i=this,e=(t.on("mouseover",function(){return e("highlight")}).on("mouseout",function(){return e("downplay")}),function(t){var e=i.visualMapModel;e.option.hoverLink&&i.api.dispatchAction({type:t,batch:uC(e.findTargetDataIndices(n),e)})})},EC.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;return"vertical"===e.orient?lC(t,this.api,t.itemSize):(t=e.align)&&"auto"!==t?t:"left"},EC.prototype._renderEndsText=function(t,e,n,i,r){var o,a;e&&(o=new ao,a=this.visualMapModel.textStyleModel,o.add(new rl({style:Fc(a,{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:e})})),t.add(o))},EC.prototype._getViewData=function(){var t=this.visualMapModel,e=V(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),n=t.get("text"),i=t.get("orient"),t=t.get("inverse");return("horizontal"===i?t:!t)?e.reverse():n=n&&n.slice().reverse(),{viewPieceList:e,endsText:n}},EC.prototype._createItemSymbol=function(t,e,n){t.add(Im(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},EC.prototype._onItemClick=function(t){var n,i,e=this.visualMapModel,r=e.option,o=r.selectedMode;o&&(n=_(r.selected),i=e.getSelectedMapKey(t),"single"===o||!0===o?(n[i]=!0,R(n,function(t,e){n[e]=e===i})):n[i]=!n[i],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n}))},EC.type="visualMap.piecewise";var NC,zC=EC;function EC(){var t=null!==NC&&NC.apply(this,arguments)||this;return t.type=EC.type,t}function BC(t){t.registerComponentModel(LC),t.registerComponentView(zC),kC(t)}p1(function(t){p1(DC),p1(BC)}),p1(Ox);var VC={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},FC=($C.prototype.evaluate=function(t){var e=typeof t;return H(e)?this._condVal.test(t):!!G(e)&&this._condVal.test(t+"")},$C),HC=(KC.prototype.evaluate=function(){return this.value},KC),GC=(jC.prototype.evaluate=function(){for(var t=this.children,e=0;e"}(i,r)+("style"!==i?_e(e):e||"")+(n?o+V(n,t).join(o)+o:"")+""}(t)}function I2(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function T2(t,e,n,i){return S2("svg","root",{width:t,height:e,xmlns:m2,"xmlns:xlink":v2,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var C2=0;var k2={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"},D2="transform-origin";var A2={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function L2(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function P2(t){return H(t)?k2[t]?"cubic-bezier("+k2[t]+")":jn(t)?t:"":""}function O2(D,A,L,P){var t=D.animators,e=t.length,n=[];if(D instanceof Rh){if(r=function(t,e,u){var h,c,t=t.shape.paths,p={};if(R(t,function(t){var e=I2(u.zrId),t=(e.animation=!0,O2(t,{},e,!0),e.cssAnims),n=e.cssNodes,e=N(t),i=e.length;if(i){var r,o,a=t[c=e[i-1]];for(r in a){var s=a[r];p[r]=p[r]||{d:""},p[r].d+=s.d||""}for(o in n){var l=n[o].animation;0<=l.indexOf(c)&&(h=l)}}}),h)return e.d=!1,t=L2(p,u),h.replace(c,t)}(D,A,L))n.push(r);else if(!e)return}else if(!e)return;for(var i,r,o,a={},s=0;s"].join(o):"")&&(e=S2("style","stl",{},[],c),h.push(e)),T2(i,l,h,t.useViewBox)},yk.prototype.renderToString=function(t){return M2(this.renderToVNode({animation:z((t=t||{}).cssAnimation,!0),emphasis:z(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:z(t.useViewBox,!0)}),{newline:!0})},yk.prototype.setBackgroundColor=function(t){this._backgroundColor=t},yk.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},yk.prototype._paintList=function(t,e,n){for(var i,r,o,a,s,l,u,h=t.length,c=[],p=0,d=0,f=0;f + + + + + + + + +
+
+ +
+ + + +
+
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/widgets/price/public/max.svg b/widgets/price/public/max.svg new file mode 100644 index 0000000..fe14804 --- /dev/null +++ b/widgets/price/public/max.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/widgets/price/public/min.svg b/widgets/price/public/min.svg new file mode 100644 index 0000000..f028022 --- /dev/null +++ b/widgets/price/public/min.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/widgets/price/public/pwr.svg b/widgets/price/public/pwr.svg new file mode 100644 index 0000000..78cb2c5 --- /dev/null +++ b/widgets/price/public/pwr.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/widgets/price/public/sum.svg b/widgets/price/public/sum.svg new file mode 100644 index 0000000..33e613d --- /dev/null +++ b/widgets/price/public/sum.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/widgets/price/public/tibber-icon.svg b/widgets/price/public/tibber-icon.svg new file mode 100644 index 0000000..272529b --- /dev/null +++ b/widgets/price/public/tibber-icon.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/widgets/price/public/tibber-logo.svg b/widgets/price/public/tibber-logo.svg new file mode 100644 index 0000000..0e9335b --- /dev/null +++ b/widgets/price/public/tibber-logo.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + diff --git a/widgets/price/widget.compose.json b/widgets/price/widget.compose.json new file mode 100644 index 0000000..ec41cba --- /dev/null +++ b/widgets/price/widget.compose.json @@ -0,0 +1,87 @@ +{ + "name": { + "en": "Price", + "de": "Preis" + }, + "settings": [ + { + "id": "device_home", + "type": "autocomplete", + "title": { + "en": "Home device" + } + }, + { + "id": "device_pulse", + "type": "autocomplete", + "title": { + "en": "Pulse device" + } + }, + { + "id": "chart_display", + "type": "checkbox", + "value": true, + "title": { + "en": "Display chart" + } + }, + { + "id": "chart_zoom", + "type": "checkbox", + "value": true, + "title": { + "en": "Zoom chart" + } + }, + { + "id": "chart_colored", + "type": "checkbox", + "value": true, + "title": { + "en": "Colored chart" + } + }, + { + "id": "chart_color_style", + "type": "dropdown", + "value": "colored_line_level", + "title": { + "en": "Color style" + }, + "values":[ + { + "id": "colored_line_level", + "title": { + "en": "Colored line based on price level" + } + }, + { + "id": "colored_line_range", + "title": { + "en": "Colored line based on range" + } + }, + { + "id": "vertical_segments", + "title": { + "en": "Vertical segments based on price level" + } + }, + { + "id": "horizontal_segments", + "title": { + "en": "Horizontal segments based on range" + } + } + ] + } + ], + "height": 70, + "api": { + "triggerRealtimeData": { + "method": "GET", + "path": "/trigger_realtime_data" + } + } + } \ No newline at end of file