@idmwx/idmui-gl3 4.5.3 → 4.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(E,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("@turf/turf"),require("@mapbox/sphericalmercator"),require("moment"),require("mapbox-gl"),require("@idm-plugin/geo"),require("axios")):typeof define=="function"&&define.amd?define(["exports","vue","@turf/turf","@mapbox/sphericalmercator","moment","mapbox-gl","@idm-plugin/geo","axios"],r):(E=typeof globalThis<"u"?globalThis:E||self,r(E["idm-gl"]={},E.Vue,E["@turf/turf"],E["@mapbox/sphericalmercator"],E.moment,E["mapbox-gl"],E["@idm-plugin/geo"],E.axios))})(this,function(E,r,Y,Ne,B,j,C,U){"use strict";var Qr=Object.defineProperty;var Kr=(E,r,Y)=>r in E?Qr(E,r,{enumerable:!0,configurable:!0,writable:!0,value:Y}):E[r]=Y;var P=(E,r,Y)=>(Kr(E,typeof r!="symbol"?r+"":r,Y),Y);function Te(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const x=Te(Y),ei="";var Ve=Object.defineProperty,Ie=(a,e,t)=>e in a?Ve(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,le=(a,e,t)=>(Ie(a,typeof e!="symbol"?e+"":e,t),t);class ce{}le(ce,"LEVEL",{Basic:1,Prime:2,Supper:1024});class he{}le(he,"WEATHER_LAYERS",[{weight:1,name:"Wind",key:"wind",h5:!0,enabled:!0,type:"json",particle:!0},{weight:524288,name:"Wind Particle",key:"wind-particle",peer:{weight:1,key:"wind"},enabled:!0,hide:!0,type:"jpg"},{weight:16,name:"Sig Waves",key:"sig-wave-height",h5:!0,enabled:!0,type:"json"},{weight:4194304,name:"Sig Waves (JPG)",key:"sig-wave",peer:{weight:16,key:"sig-wave"},enabled:!0,hide:!0,type:"jpg"},{weight:8388608,name:"Sig Waves (Contour)",key:"sig-wave-height-contour",peer:{weight:16,key:"sig-wave-contour"},enabled:!0,hide:!0,type:"json"},{weight:96,name:"Current",key:"current",vendor:"cmems",merge:!0,h5:!0,enabled:!0,type:"json"},{weight:1048576,name:"Current Particle",key:"current-particle",vendor:"cmems",peer:{weight:96,key:"current"},enabled:!0,hide:!0,type:"jpg"},{weight:256,name:"Tropicals",key:"tropicals",h5:!0,enabled:!0,type:"json"},{weight:4096,name:"Pressure",h5:!0,key:"prmsl",enabled:!0,type:"json"},{weight:8192,name:"Visibility",vendor:"gfs",key:"visibility",h5:!0,enabled:!0,type:"jpg"},{weight:262144,name:"Precip Acc",key:"precip3h",h5:!0,enabled:!0,type:"jpg"},{weight:6,name:"Swell",key:"swell",merge:!0,h5:!0,enabled:!0,type:"json"},{weight:2,name:"Swell Height",key:"swell-height",partly:!0,enabled:!0,type:"json"},{weight:4,name:"Swell Direction",key:"swell-direction",partly:!0,enabled:!0,type:"json"},{weight:32,name:"Current Direction",key:"current-direction",vendor:"cmems",partly:!0,enabled:!0,type:"json"},{weight:64,name:"Current Speed",key:"current-speed",vendor:"cmems",partly:!0,enabled:!0,type:"json"},{weight:512,name:"Pressure Contour",key:"prmsl-contour",partly:!0,enabled:!0,hide:!0,type:"json"},{weight:1024,name:"Pressure Value",key:"prmsl-value",partly:!0,enabled:!0,hide:!0,type:"json"},{weight:2048,name:"Pressure Front",key:"prmsl-front",partly:!0,enabled:!0,hide:!0,type:"json"},{weight:16384,name:"Iceberg",key:"iceberg",vendor:"cmems",hide:!0,enabled:!1,type:"json"},{weight:32768,name:"Struct Ice",key:"struct-ice",vendor:"cmems",enabled:!1,hide:!0,type:"json"},{weight:65536,name:"Ice Edge",key:"arctic",vendor:"cmems",h5:!0,enabled:!0,type:"jpg"},{weight:131072,name:"Sea Surf. Temp.",key:"water-temp",vendor:"cmems",h5:!0,enabled:!0,type:"jpg"},{weight:2097152,name:"Temp.",key:"temp",h5:!0,enabled:!0,type:"jpg"}]),le(he,"OTHER_LAYERS",[{weight:1,name:"War Zones",key:"war-zones",h5:!0,enabled:!0,type:"json"},{weight:2,name:"GMDSS Areas",key:"gmdss-areas",h5:!0,enabled:!0,type:"json"},{weight:4,name:"ECA Zones",key:"eca-zones",h5:!0,enabled:!0,type:"json"},{weight:8,name:"Load Lines",key:"load-lines",h5:!0,enabled:!0,type:"json"},{weight:16,name:"HRA",key:"high-risk-area",enabled:!1,type:"json"},{weight:32,name:"Pirates",key:"pirates",enabled:!1,type:"json"},{weight:4096,name:"Alert Zones",key:"alert-zones",h5:!0,enabled:!0,type:"json"},{weight:64,name:"Ports",key:"ports",h5:!0,enabled:!0,type:"json"},{weight:128,name:"Time Zones",key:"time-zones",h5:!0,enabled:!0,type:"json"},{weight:256,name:"VRA",key:"voluntary-reporting-area",h5:!0,enabled:!0,type:"json"},{weight:512,name:"Special Areas",key:"special-area",h5:!0,enabled:!0,type:"json"},{weight:1024,name:"Day/Night",key:"day-night",h5:!0,enabled:!0,type:"json"},{weight:2048,name:"ENC",key:"enc",h5:!0,enabled:!0,type:"origin"},{weight:8192,name:"World-12nm",key:"world12nm",h5:!1,enabled:!0,type:"origin"}]);class Ce{}le(Ce,"WEATHER_TAG",[{weight:4,name:"Adverse Weather Dangerous",key:"DANGEROUS",positive:!0},{weight:2,name:"Adverse Weather Severe",key:"SEVERE",positive:!0},{weight:1,name:"Adverse Weather Heavy",key:"HEAVY",positive:!0}]),le(Ce,"SAILING_TAG",[{weight:2048,name:"Deviation",key:"deviation",positive:!0},{weight:4096,name:"Stoppage",key:"stoppage",positive:!0},{weight:8192,name:"Deceleration",key:"deceleration",positive:!0},{weight:16384,name:"No Lane",key:"noLane",positive:!0},{weight:32768,name:"No Noon",key:"noNoon",positive:!0}]),le(Ce,"OTHER_TAG",[{weight:2097152,name:"No CP",key:"noCp",positive:!0},{weight:4194304,name:"Send Rpt",key:"sendRpt",positive:!1},{weight:8388608,name:"Send Bps",key:"sendBps",positive:!1},{weight:16777216,name:"Send Pvar",key:"sendPvar",positive:!1},{weight:33554432,name:"Checked",key:"checked",positive:!1},{weight:67108864,name:"Send PWFR",key:"sendPwfr",positive:!1}]);const ti="",k=(a,e)=>{const t=a.__vccOpts||a;for(const[o,i]of e)t[o]=i;return t},De={name:"IdmGlLayer",props:{map:{type:Object},mapProjection:{type:String},top:{type:Number,default:60},layerToggle:{type:Boolean,default:!1},toggleVersion:{type:Number},isLogin:{type:Boolean,default:void 0},showWindFeather:{type:Boolean,default:void 0},showWindParticle:{type:Boolean,default:void 0},showCurrentIsoband:{type:Boolean,default:void 0},showCurrentParticle:{type:Boolean,default:void 0}},emits:["weather","other","toggleWindParticle","toggleWindFeather","toggleCurrentParticle","toggleCurrentIsoband","coordinate","measure","point","3d","layerToggle","handleToggleVersion"],data(){return{autoActive:!0,layers:{weather:[...he.WEATHER_LAYERS.filter(a=>!["swell-height","swell-direction","current-direction","current-speed"].includes(a.key))],other:[...he.OTHER_LAYERS.filter(a=>a.key!=="world12nm"&&a.enabled)]},activeWeatherLayers:[],activeOtherLayers:[],autoActiveCache:"autoActiveCache",activeWeatherLayersCache:"activeWeatherLayersCache",activeOtherLayersCache:"activeOtherLayersCache",collectedLayerCache:"collectedLayerCache",sourceCache:"defaultSourceCache",windFeatherCache:"windFeatherCache",currentIsobandCache:"currentIsobandCache",showCoord:!1,showMeasure:!1,showPoint:!1,show3d:!1,version:{v:"0.0.7",k:"glCacheVersion"},source:"",right:10,rampColorLayers:["visibility","precip3h","temp","water-temp","arctic"]}},computed:{computeLayerClass(){return function(a,e){var o;let t="layer flex-between";return e.some(i=>i.key===a.key)&&(t=t+" active"),(!a.enabled||(o=this.layers.weather)!=null&&o.some(i=>i.key===a.key)&&!this.autoActive||this.rampColorLayers.includes(a.key)&&this.mapProjection==="globe")&&(t=t+" disabled"),t}},hasCollectedLayers(){var a;return((a=this.layers.weather.filter(e=>e.collected))==null?void 0:a.length)>0}},watch:{toggleVersion:{handler(){this.$nextTick(()=>{var a;this.right=(((a=document.getElementsByClassName("right-bar")[0])==null?void 0:a.clientWidth)||0)+10})}},source:{handler(a,e){a&&e&&a!==e&&this.handleConfirm()}}},mounted(){this.fetchCache(),this.handleConfirm()},methods:{fetchCache(){const a=localStorage.getItem(this.version.k);this.version.v!==a&&(localStorage.removeItem(this.activeWeatherLayersCache),localStorage.removeItem(this.collectedLayerCache),localStorage.removeItem(this.activeOtherLayersCache),localStorage.removeItem(this.windFeatherCache),localStorage.removeItem(this.currentIsobandCache),localStorage.setItem(this.version.k,this.version.v));let e=localStorage.getItem(this.autoActiveCache);this.autoActive=e!=="false",e=localStorage.getItem(this.collectedLayerCache);let t=JSON.parse(e||'[{"weight": 16, "name": "Sig Waves", "key": "sig-wave-height", "collected": true},{"weight": 1, "name": "Wind", "key": "wind", "h5": true, "collected": true},{"weight": 96, "name": "Current", "key": "current", "collected": true},{"weight": 6, "name": "Swell", "key": "swell", "collected": true}]');this.layers.weather.forEach(o=>{o.collected=!!t.some(i=>i.key===o.key&&i.collected)}),e=localStorage.getItem(this.activeWeatherLayersCache),e||localStorage.setItem(this.activeWeatherLayersCache,JSON.stringify([{weight:1,name:"Wind",key:"wind",enabled:!0,type:"json",particle:!0},{weight:4096,name:"Pressure",key:"prmsl",enabled:!0,type:"json"},{weight:256,name:"Tropicals",key:"tropicals",enabled:!0,type:"json"}])),e=localStorage.getItem(this.activeWeatherLayersCache),t=JSON.parse(e),this.autoActive&&(this.activeWeatherLayers=[...t]),t.some(o=>o.key==="wind"&&o.particle)&&this.$emit("toggleWindParticle",!0),localStorage.getItem(this.windFeatherCache)==="true"&&this.$emit("toggleWindFeather",!0),t.some(o=>o.key==="current"&&o.particle)&&this.$emit("toggleCurrentParticle",!0),localStorage.getItem(this.currentIsobandCache)==="true"&&this.$emit("toggleCurrentIsoband",!0),e=localStorage.getItem(this.activeOtherLayersCache),t=JSON.parse(e||'[{"weight":4,"name":"ECA Zones","key":"eca-zones","enabled":true,"type":"json"}]'),this.activeOtherLayers=t,e=localStorage.getItem(this.sourceCache),this.source=e||"GFS"},handleConfirm(){this.$emit("weather",this.activeWeatherLayers,this.source),this.$emit("other",this.activeOtherLayers),localStorage.setItem(this.autoActiveCache,this.autoActive),localStorage.setItem(this.sourceCache,this.source)},handleWeatherLayerPick(a){if(this.activeWeatherLayers=JSON.parse(localStorage.getItem(this.activeWeatherLayersCache)),this.rampColorLayers.includes(a.key)&&this.mapProjection==="globe"||!this.autoActive)return!1;(a.key==="wind"&&!this.showWindFeather||a.key==="current"&&!this.showCurrentIsoband)&&(a.particle=!0),this.activeWeatherLayers.some(e=>e.key===a.key)?this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.key!==a.key):this.activeWeatherLayers.length<6&&a.enabled&&(["png","jpg"].includes(a.type)?(this.activeWeatherLayers.forEach(e=>{(e.key==="wind"&&this.showWindFeather||a.key==="current"&&this.showCurrentIsoband)&&(e.particle=!1)}),this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.type==="json"&&!(["wind","current"].includes(e.key)&&e.particle))):a.key==="wind"?(this.activeWeatherLayers.forEach(e=>{e.key==="current"&&this.showCurrentIsoband&&(e.particle=!1)}),this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.type==="json"&&!(["wind","current"].includes(e.key)&&e.particle))):a.key==="current"&&(this.activeWeatherLayers.forEach(e=>{e.key==="wind"&&this.showWindFeather&&(e.particle=!1)}),this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.type==="json"&&!(["wind","current"].includes(e.key)&&e.particle))),this.activeWeatherLayers.push(a)),this.$emit("weather",this.activeWeatherLayers,this.source),localStorage.setItem(this.activeWeatherLayersCache,JSON.stringify(this.activeWeatherLayers))},handleActiveWeatherLayerPick(a){if(this.rampColorLayers.includes(a.key)&&this.mapProjection==="globe")return!1;if(this.activeWeatherLayers.some(e=>e.key===a.key))this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.key!==a.key);else if(a.enabled){this.activeWeatherLayers.push(a);for(const e of this.activeWeatherLayers)a.weight>e.weight&&a.weight&e.weight&&this.activeWeatherLayers.push(e)}this.handleWeatherLayerPick(a)},handleWeatherLayerCollect(a){var e;!a.collected&&((e=this.layers.weather.filter(t=>t.collected))==null?void 0:e.length)>=6&&(this.layers.weather.filter(t=>t.collected)[0].collected=!1),a.collected=!a.collected,localStorage.setItem(this.collectedLayerCache,JSON.stringify(this.layers.weather)),this.$emit("handleToggleVersion")},handleToggleWindParticle(){!this.showWindFeather&&this.showWindParticle?this.handleWeatherLayerPick({weight:1,name:"Wind",key:"wind",enabled:!0,type:"json",particle:!0}):(this.showCurrentParticle&&(this.$emit("toggleCurrentParticle",!1),this.showCurrentIsoband||(this.activeWeatherLayers=this.activeWeatherLayers.filter(a=>a.key!=="current"),localStorage.setItem(this.activeWeatherLayersCache,JSON.stringify(this.activeWeatherLayers)))),this.$emit("toggleWindParticle",!this.showWindParticle))},handleToggleWindFeather(){this.showWindFeather&&!this.showWindParticle&&this.handleWeatherLayerPick({weight:1,name:"Wind",key:"wind",enabled:!0,type:"json",particle:!0}),this.$emit("toggleWindFeather",!this.showWindFeather),localStorage.setItem(this.windFeatherCache,!this.showWindFeather)},handleToggleCurrentParticle(){!this.showCurrentIsoband&&this.showCurrentParticle?this.handleWeatherLayerPick({weight:96,name:"Current",key:"current",vendor:"cmems",merge:!0,h5:!0,enabled:!0}):(this.showWindParticle&&(this.$emit("toggleWindParticle",!1),this.showWindFeather||(this.activeWeatherLayers=this.activeWeatherLayers.filter(a=>a.key!=="wind"),localStorage.setItem(this.activeWeatherLayersCache,JSON.stringify(this.activeWeatherLayers)))),this.$emit("toggleCurrentParticle",!this.showCurrentParticle))},handleToggleCurrentIsoband(){this.showCurrentIsoband&&!this.showCurrentParticle&&this.handleWeatherLayerPick({weight:96,name:"Current",key:"current",vendor:"cmems",merge:!0,h5:!0,enabled:!0}),this.$emit("toggleCurrentIsoband",!this.showCurrentIsoband),localStorage.setItem(this.currentIsobandCache,!this.showCurrentIsoband)},handleOtherLayerPick(a){this.activeOtherLayers.some(e=>e.key===a.key)?this.activeOtherLayers=this.activeOtherLayers.filter(e=>e.key!==a.key):a.enabled&&this.activeOtherLayers.push(a),localStorage.setItem(this.activeOtherLayersCache,JSON.stringify(this.activeOtherLayers)),this.$emit("other",this.activeOtherLayers)},handleMenuToggle(){this.$emit("layerToggle",!this.layerToggle)},toggleAutoActive(){this.autoActive=!this.autoActive,localStorage.setItem(this.autoActiveCache,this.autoActive),this.autoActive?this.$emit("weather",this.activeWeatherLayers,this.source):this.$emit("weather",[],this.source)},handleCoordToggle(){this.showCoord=!this.showCoord,this.$emit("coordinate",this.showCoord)},handlePointToggle(){this.isLogin?(this.showPoint=!this.showPoint,this.$emit("point",this.showPoint)):this.$emit("handleToggleVersion")},handleMeasureToggle(){this.showMeasure=!this.showMeasure,this.$emit("measure",this.showMeasure)},handle3DToggle(){this.show3d=!this.show3d,this.$emit("3d",this.show3d)}}},Re={class:"idm-gl3-layer"},We={class:"bar-item layer-bars"},Ae={class:"bar-item tool-bars"},Be={class:"flex-between"},Me={key:0,class:"iconfont active"},Oe={key:1,class:"iconfont"},je=["onClick"],Fe=["onClick"],$e={key:0,class:"flex-start"},He={key:1,class:"flex-start"},Ue={class:"header-box flex-between"},Ze={class:"weather-layers card-bg"},Ge={class:"layers-title flex-between"},Je={key:0,class:"iconfont active"},Xe={key:1,class:"iconfont"},qe={class:"layers-body"},Ye={class:"flex-start"},Qe=["onClick"],Ke=["onClick"],et={key:0,class:"flex-start"},tt={key:1,class:"flex-start"},at=["onClick"],rt={key:0,class:"iconfont bookmark-icon active"},it={key:1,class:"iconfont bookmark-icon inactive"},ot={class:"other-layers card-bg"},st={class:"layers-body"},nt=["onClick"],lt={class:"flex-start"},ct={class:"switch flex-center"},ht={key:0,class:"iconfont active"},dt={key:1,class:"iconfont"},mt={class:"source-layers card-bg"},pt={class:"layers-body"};function yt(a,e,t,o,i,s){const n=r.resolveComponent("ElTooltip"),l=r.resolveComponent("ElRadio"),h=r.resolveComponent("ElRadioGroup"),m=r.resolveComponent("ElScrollbar");return r.openBlock(),r.createElementBlock("div",Re,[r.createElementVNode("div",{class:"menu-bar-box",style:r.normalizeStyle({top:t.top+10+"px",right:i.right+"px"})},[r.createElementVNode("div",We,[r.createVNode(n,{placement:"left",effect:"light",content:"Menu","show-after":1e3},{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(t.layerToggle?"menu-icon active":"menu-icon"),onClick:e[0]||(e[0]=(...c)=>s.handleMenuToggle&&s.handleMenuToggle(...c))},e[17]||(e[17]=[r.createElementVNode("span",{class:"iconfont"},"",-1)]),2)]),_:1})])],4),r.createElementVNode("div",{class:"menu-bar-box",style:r.normalizeStyle({top:t.top+160+"px",right:i.right+"px"})},[r.createElementVNode("div",Ae,[r.createVNode(n,{placement:"left",effect:"light",content:"Measure","show-after":1e3},{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(i.showMeasure?"menu-icon active":"menu-icon"),onClick:e[1]||(e[1]=(...c)=>s.handleMeasureToggle&&s.handleMeasureToggle(...c))},e[18]||(e[18]=[r.createElementVNode("span",{class:"iconfont"},"",-1)]),2)]),_:1}),r.createVNode(n,{placement:"left",effect:"light",content:"Point Meteo","show-after":1e3},{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(i.showPoint?"menu-icon active":"menu-icon"),onClick:e[2]||(e[2]=(...c)=>s.handlePointToggle&&s.handlePointToggle(...c))},e[19]||(e[19]=[r.createElementVNode("span",{class:"iconfont"},"",-1)]),2)]),_:1}),r.createVNode(n,{placement:"left",effect:"light",content:"Grid","show-after":1e3},{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(i.showCoord?"menu-icon active":"menu-icon"),onClick:e[3]||(e[3]=(...c)=>s.handleCoordToggle&&s.handleCoordToggle(...c))},e[20]||(e[20]=[r.createElementVNode("span",{class:"iconfont"},"",-1)]),2)]),_:1}),r.createVNode(n,{placement:"left",effect:"light",content:"3D","show-after":1e3},{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(i.show3d?"menu-icon active":"menu-icon"),onClick:e[4]||(e[4]=(...c)=>s.handle3DToggle&&s.handle3DToggle(...c))},e[21]||(e[21]=[r.createElementVNode("span",{class:"iconfont"},"",-1)]),2)]),_:1})])],4),s.hasCollectedLayers?(r.openBlock(),r.createElementBlock("div",{key:0,class:"active-layers",style:r.normalizeStyle({right:i.right+"px",bottom:"100px"})},[r.createElementVNode("div",Be,[e[22]||(e[22]=r.createElementVNode("div",{style:{"margin-left":"5px"}},"My Favorites",-1)),r.createElementVNode("div",{class:"switch flex-center",style:{"font-size":"28px","margin-right":"0"},onClick:e[5]||(e[5]=(...c)=>s.toggleAutoActive&&s.toggleAutoActive(...c))},[i.autoActive?(r.openBlock(),r.createElementBlock("i",Me,"")):(r.openBlock(),r.createElementBlock("i",Oe,""))])]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.layers.weather.filter(c=>c.collected),c=>(r.openBlock(),r.createElementBlock("div",{key:c.key,class:r.normalizeClass(s.computeLayerClass(c,i.activeWeatherLayers))},[r.createElementVNode("div",{class:"checkbox",onClick:d=>s.handleWeatherLayerPick(c)},null,8,je),r.createElementVNode("span",{class:"name",onClick:d=>s.handleWeatherLayerPick(c)},r.toDisplayString(c.name),9,Fe),c.key==="wind"&&i.activeWeatherLayers.some(d=>d.key===c.key)?(r.openBlock(),r.createElementBlock("div",$e,[r.createElementVNode("i",{class:r.normalizeClass(["iconfont sub-layer-icon",t.showWindParticle?"active":""]),onClick:e[6]||(e[6]=d=>s.handleToggleWindParticle())},"",2),r.createElementVNode("i",{class:r.normalizeClass(["iconfont sub-layer-icon",t.showWindFeather?"active":""]),onClick:e[7]||(e[7]=d=>s.handleToggleWindFeather())},"",2)])):r.createCommentVNode("",!0),c.key==="current"&&i.activeWeatherLayers.some(d=>d.key===c.key)?(r.openBlock(),r.createElementBlock("div",He,[r.createElementVNode("i",{class:r.normalizeClass(["iconfont sub-layer-icon",t.showCurrentParticle?"active":""]),onClick:e[8]||(e[8]=d=>s.handleToggleCurrentParticle())},"",2),r.createElementVNode("i",{class:r.normalizeClass(["iconfont sub-layer-icon",t.showCurrentIsoband?"active":""]),onClick:e[9]||(e[9]=d=>s.handleToggleCurrentIsoband())},"",2)])):r.createCommentVNode("",!0)],2))),128))],4)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:"available-layers flex-center",style:r.normalizeStyle({top:t.top+"px",right:t.layerToggle?"0px":"-240px"})},[r.createElementVNode("div",{class:r.normalizeClass(["list-box",t.layerToggle?"right-bar":""])},[r.createElementVNode("div",Ue,[e[23]||(e[23]=r.createElementVNode("div",null,"Layers",-1)),r.createElementVNode("div",{class:"iconfont close-btn",onClick:e[10]||(e[10]=(...c)=>s.handleMenuToggle&&s.handleMenuToggle(...c))},"")]),r.createVNode(m,{style:{flex:"1"}},{default:r.withCtx(()=>[r.createElementVNode("div",Ze,[r.createElementVNode("div",Ge,[e[24]||(e[24]=r.createElementVNode("div",null,"Weather Layers",-1)),r.createElementVNode("div",{class:"switch flex-center",style:{"margin-right":"0"},onClick:e[11]||(e[11]=(...c)=>s.toggleAutoActive&&s.toggleAutoActive(...c))},[i.autoActive?(r.openBlock(),r.createElementBlock("i",Je,"")):(r.openBlock(),r.createElementBlock("i",Xe,""))])]),r.createElementVNode("div",qe,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.layers.weather,c=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:c.key},[c.hide?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(s.computeLayerClass(c,i.activeWeatherLayers))},[r.createElementVNode("div",Ye,[r.createElementVNode("div",{class:"checkbox",onClick:d=>s.handleWeatherLayerPick(c)},null,8,Qe),r.createElementVNode("span",{class:"name",onClick:d=>s.handleWeatherLayerPick(c)},r.toDisplayString(c.name),9,Ke),c.key==="wind"&&i.activeWeatherLayers.some(d=>d.key===c.key)?(r.openBlock(),r.createElementBlock("div",et,[r.createElementVNode("i",{class:r.normalizeClass(["iconfont sub-layer-icon",t.showWindParticle?"active":""]),onClick:e[12]||(e[12]=d=>s.handleToggleWindParticle())},"",2),r.createElementVNode("i",{class:r.normalizeClass(["iconfont sub-layer-icon",t.showWindFeather?"active":""]),onClick:e[13]||(e[13]=d=>s.handleToggleWindFeather())},"",2)])):r.createCommentVNode("",!0),c.key==="current"&&i.activeWeatherLayers.some(d=>d.key===c.key)?(r.openBlock(),r.createElementBlock("div",tt,[r.createElementVNode("i",{class:r.normalizeClass(["iconfont sub-layer-icon",t.showCurrentParticle?"active":""]),onClick:e[14]||(e[14]=d=>s.handleToggleCurrentParticle())},"",2),r.createElementVNode("i",{class:r.normalizeClass(["iconfont sub-layer-icon",t.showCurrentIsoband?"active":""]),onClick:e[15]||(e[15]=d=>s.handleToggleCurrentIsoband())},"",2)])):r.createCommentVNode("",!0)]),r.createElementVNode("div",{onClick:d=>s.handleWeatherLayerCollect(c)},[c.collected?(r.openBlock(),r.createElementBlock("i",rt,"")):(r.openBlock(),r.createElementBlock("i",it,""))],8,at)],2))],64))),128)),e[25]||(e[25]=r.createElementVNode("div",{class:"tip flex-start"},[r.createElementVNode("i",{class:"iconfont bookmark-icon",style:{"align-self":"flex-start",padding:"5px 5px 0 0"}},""),r.createElementVNode("div",null,"You can add the layers to your favorites. (Max 6)")],-1))])]),r.createElementVNode("div",ot,[e[26]||(e[26]=r.createElementVNode("div",{class:"layers-title"},"Other Layers",-1)),r.createElementVNode("div",st,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.layers.other,c=>{var d;return r.openBlock(),r.createElementBlock("div",{key:c.key,class:r.normalizeClass(["layer flex-between",s.computeLayerClass(c,i.activeOtherLayers)]),onClick:u=>s.handleOtherLayerPick(c)},[r.createElementVNode("div",lt,[r.createElementVNode("div",ct,[(d=s.computeLayerClass(c,i.activeOtherLayers))!=null&&d.includes("active")?(r.openBlock(),r.createElementBlock("i",ht,"")):(r.openBlock(),r.createElementBlock("i",dt,""))]),r.createElementVNode("span",null,r.toDisplayString(c.name),1)])],10,nt)}),128))])]),r.createElementVNode("div",mt,[e[29]||(e[29]=r.createElementVNode("span",{class:"layers-title"},"Forecast Model",-1)),r.createElementVNode("div",pt,[r.createVNode(h,{modelValue:i.source,"onUpdate:modelValue":e[16]||(e[16]=c=>i.source=c),class:"layer-radio flex-col-center-start"},{default:r.withCtx(()=>[r.createVNode(l,{value:"GFS"},{default:r.withCtx(()=>e[27]||(e[27]=[r.createTextVNode("GFS")])),_:1}),r.createVNode(l,{value:"CMEMS"},{default:r.withCtx(()=>e[28]||(e[28]=[r.createTextVNode("CMEMS")])),_:1})]),_:1},8,["modelValue"])])])]),_:1})],2)],4)])}const ft=k(De,[["render",yt]]),ai="",ut={name:"IdmWindBarb",props:{map:{type:Object},wind:{type:Object},current:{type:Object},beforeLayer:{type:String},mapProjection:{type:String},showWindFeather:{type:Boolean,default:!1},showWindParticle:{type:Boolean,default:!1},toggleVersion:{type:Number}},emits:["particle","showWindFeather"],data(){return{source:"wind-barb-source",barbs:[0,2,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105],empty:x.featureCollection([]),right:10,bottom:125,windBarbLoaded:!1}},watch:{"wind.version":{handler(){var a;(a=this.wind)!=null&&a.active&&this.showWindFeather?this.handleRender():this.handleClear()},deep:!0},showWindParticle:{handler(){this.handleParticle()}},showWindFeather:{handler(){this.handleToggle()}}},methods:{handleParticle(){this.$emit("particle",{particle:this.showWindParticle,key:"wind",weight:1})},handleRender(){var a,e,t,o;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.wind){const i=new Date().valueOf();let s=0,n=0,l=this.empty;if((a=this.wind)!=null&&a.active&&(l=(e=this.wind)==null?void 0:e.data),(t=this.map)!=null&&t.getSource(this.source))(o=this.map)==null||o.getSource(this.source).setData(l),n=new Date().valueOf()-(i+s),console.log("[wind] update elapsed: ",n,", total: ",s+=n);else{this.map.addSource(this.source,{type:"geojson",data:l});for(let h=0;h<(this.barbs??[]).length-1;h++){const m=(this.barbs??[])[h]||0,c=(this.barbs??[])[h+1]||0,d=m<10?`00${m}kts`:m<100?`0${m}kts`:`${m}kts`;this.map.addLayer({id:d,type:"symbol",filter:["all",[">=","spd",m],["<","spd",c]],source:this.source,layout:{"symbol-placement":"point","icon-image":d,"icon-size":.14,"icon-offset":[0,-20],"icon-allow-overlap":!0,"icon-rotation-alignment":"map","icon-rotate":{property:"val",stops:[[0,0],[360,360]]}},paint:{"icon-opacity":1,"text-color":"#222"}},this.beforeLayer)}this.windBarbLoaded=!0,n=new Date().valueOf()-(i+s),console.log("[wind] add elapsed: ",n,", total: ",s+=n)}}},handleToggle(){if(!this.windBarbLoaded)this.handleRender();else for(const a of this.barbs??[]){const e=a<10?`00${a}kts`:a<100?`0${a}kts`:`${a}kts`;this.map.getLayer(e)&&this.map.setLayoutProperty(e,"visibility",this.showWindFeather?"visible":"none")}},handleClear(){for(const a of this.barbs??[]){const e=a<10?`00${a}kts`:a<100?`0${a}kts`:`${a}kts`;this.map.getLayer(e)&&this.map.removeLayer(e)}this.map.getSource(this.source)&&this.map.removeSource(this.source),this.windBarbLoaded=!1}}},gt={key:0};function bt(a,e,t,o,i,s){var n;return(n=t.wind)!=null&&n.active?(r.openBlock(),r.createElementBlock("div",gt)):r.createCommentVNode("",!0)}const Lt=k(ut,[["render",bt]]);class _e{constructor(e){P(this,"map");P(this,"mercator");P(this,"rampColorLayer");P(this,"rampColorSource");P(this,"particleLayer");P(this,"particleSource");P(this,"rampColorCanvas");P(this,"particleCanvas");P(this,"ratio");this.map=e,this.mercator=new Ne,this.rampColorLayer="ramp-color-layer",this.rampColorSource="ramp-color-source",this.particleLayer="particle-layer",this.particleSource="particle-source",this.rampColorCanvas=document.createElement("canvas"),this.particleCanvas=document.createElement("canvas"),this.ratio=window.devicePixelRatio}convertNLng(e,t=0){return e>180?this.convertNLng(e-360,t+1):e<-180?this.convertNLng(e+360,t+1):[e,t]}getBoundLngLat(){const e=this.map.getBounds();return[[e._sw.lng,e._ne.lat],[e._ne.lng,e._ne.lat],[e._ne.lng,e._sw.lat],[e._sw.lng,e._sw.lat]]}getBoundPixel(){const e=this.map.getBounds(),t=this.map.getZoom()+1,o=[e._ne.lng,e._ne.lat],i=[e._sw.lng,e._sw.lat],[s,n]=this.convertNLng(o[0]),[l,h]=this.convertNLng(i[0]),[m,c]=this.mercator.px([s,o[1]],t),[d,u]=this.mercator.px([l,i[1]],t),p=Math.round(this.mercator.size*Math.pow(2,t)*(n+h));return[d,u,m+p,c]}getBoundRange(){const e=this.map.getZoom()+1,t=this.mercator.size*Math.pow(2,e),o=this.getBoundPixel();return[o[0]/t,o[2]/t,o[3]/t,o[1]/t]}getWorldCopy(e,t){const o=2**t,[i,s,n,l]=e.map(c=>~~(c/(o*256))),h=[];for(let c=l;c<=s;c++)for(let d=i;d<=n;d++)h.push([d,c]);return h.map(c=>{const d=2**t*256;return[c[0]*d,c[1]*d,d]})}resize(){let e=this.map.getSource(this.rampColorSource);e.setCoordinates(this.getBoundLngLat()),e=this.map.getSource(this.particleSource),e.setCoordinates(this.getBoundLngLat()),this.rampColorCanvas.width=this.map._canvas.clientWidth,this.rampColorCanvas.height=this.map._canvas.clientHeight,this.particleCanvas.width=this.map._canvas.clientWidth,this.particleCanvas.height=this.map._canvas.clientHeight}toggle(e){const t=this.map.getLayoutProperty(this.rampColorLayer,"visibility"),o=e?"visible":"none";t!==o&&this.map.setLayoutProperty(this.rampColorLayer,"visibility",o)}toggleParticle(e){const t=this.map.getLayoutProperty(this.particleLayer,"visibility"),o=e?"visible":"none";t!==o&&this.map.setLayoutProperty(this.particleLayer,"visibility",o)}}class Z{createShader(e,t,o){const i=e.createShader(t);if(i&&(e.shaderSource(i,o),e.compileShader(i),!e.getShaderParameter(i,e.COMPILE_STATUS)))throw new Error(e.getShaderInfoLog(i)||"error happened while create shader...");return i}createTexture(e,t,o,i,s,n,l){const h=e.createTexture();return e.bindTexture(e.TEXTURE_2D,h),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,o),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,i),s instanceof Uint8Array?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,n,l,0,e.RGBA,e.UNSIGNED_BYTE,s):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,s),e.bindTexture(e.TEXTURE_2D,null),h}createDataBuffer(e,t,o){if(e){const i=e.createBuffer();return t==="array"?(e.bindBuffer(e.ARRAY_BUFFER,i),o&&e.bufferData(e.ARRAY_BUFFER,o,e.STATIC_DRAW)):t==="element"&&(e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,i),o&&e.bufferData(e.ELEMENT_ARRAY_BUFFER,o,e.STATIC_DRAW)),i}return null}createProgram(e,t,o){const i=e.createProgram(),s=this.createShader(e,e.VERTEX_SHADER,t),n=this.createShader(e,e.FRAGMENT_SHADER,o);if(i&&s&&n&&(e.attachShader(i,s),e.attachShader(i,n),e.linkProgram(i),!e.getProgramParameter(i,e.LINK_STATUS)))throw new Error(e.getProgramInfoLog(i)||"error happened while creating ramp color program");return i}createProgramWrapper(e,t,o){const i=this.createProgram(e,t,o);if(i){const s={program:i},n=e.getProgramParameter(i,e.ACTIVE_ATTRIBUTES);for(let h=0;h<n;h++){const m=e.getActiveAttrib(i,h);s[m.name]=e.getAttribLocation(i,m.name)}const l=e.getProgramParameter(i,e.ACTIVE_UNIFORMS);for(let h=0;h<l;h++){const m=e.getActiveUniform(i,h);s[m.name]=e.getUniformLocation(i,m.name)}return s}}setup(e,t,o=!1,i,s){const n=document.createElement("canvas");n.width=256,n.height=1;const l=n.getContext("2d");if(l&&e){const h=l==null?void 0:l.createLinearGradient(0,0,256,0);return t.forEach(([m,c])=>{h.addColorStop(m,c)}),l.fillStyle=h,l.fillRect(0,0,256,1),{canvas:n,texture:this.createTexture(e,e.LINEAR,e.LINEAR,e.CLAMP_TO_EDGE,o?new Uint8Array(l.getImageData(0,0,256,1).data):n,i,s)}}}setupParticle(e,t=1e3){const o=Math.ceil(Math.sqrt(t)),i=o*o,s=new Uint8Array(i*4);for(let c=0;c<s.length;c++)s[c]=Math.floor(Math.random()*256);const n=this.createTexture(e,e.NEAREST,e.NEAREST,e.CLAMP_TO_EDGE,s,o,o),l=this.createTexture(e,e.NEAREST,e.NEAREST,e.CLAMP_TO_EDGE,s,o,o),h=new Float32Array(i);for(let c=0;c<i;c++)h[c]=c;const m=this.createDataBuffer(e,"array",h);return{resolution:o,total:i,texture0:n,texture1:l,indexBuffer:m}}bind(e,t,o){const i=this.createProgram(e,t,o);if(i){const s=this.createDataBuffer(e,"array",void 0),n=e.getAttribLocation(i,"a_position");e.enableVertexAttribArray(n),e.vertexAttribPointer(n,2,e.FLOAT,!1,0,0);const l=new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]);this.createDataBuffer(e,"array",l);const h=e.getAttribLocation(i,"a_texCoord");return e.enableVertexAttribArray(h),e.vertexAttribPointer(h,2,e.FLOAT,!1,0,0),{program:i,aPositionBuffer:s}}return{}}bindParticle(e,t,o,i,s,n){const l=this.createProgramWrapper(e,t,o),h=this.createProgramWrapper(e,i,s),m=this.createProgramWrapper(e,i,n),c=this.createDataBuffer(e,"array",new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1])),d=e.createFramebuffer();return{particle:l,screen:h,update:m,quadBuffer:c,frameBuffer:d}}draw(e,t,o,i,s,n,l){var h,m;if(t&&o){e.resize(),t==null||t.viewport(0,0,(h=t==null?void 0:t.canvas)==null?void 0:h.width,(m=t==null?void 0:t.canvas)==null?void 0:m.height),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT);try{const c=t.getUniformLocation(o,"u_resolution"),d=t.getUniformLocation(o,"u_image"),u=t.getUniformLocation(o,"u_color");if(t.useProgram(o),t.uniform2f(c,t.canvas.width*e.ratio,t.canvas.height*e.ratio),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,i),t.uniform1i(d,0),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,s),t.uniform1i(u,1),l!=null&&l.uvRange&&(l!=null&&l.sRange)){const y=t.getUniformLocation(o,"u_range_u_v"),L=t.getUniformLocation(o,"u_range_s");t.uniform2f(y,l.uvRange[0],l.uvRange[1]),t.uniform2f(L,l.sRange[0],l.sRange[1])}const p=e.getBoundPixel(),b=e.map.getZoom()+1,f=e.getWorldCopy(p,b);for(const y of f){const L=(y[0]-p[0])*e.ratio,g=(y[1]-p[3])*e.ratio,v=y[2]*e.ratio,[_,w,z,N]=[L,v+L,g,v+g],V=new Float32Array([_,z,w,z,_,N,_,N,w,z,w,N]);t.bindBuffer(t.ARRAY_BUFFER,n),t.bufferData(t.ARRAY_BUFFER,V,t.STATIC_DRAW),t.drawArrays(t.TRIANGLES,0,6)}}catch(c){console.log(`render failed...${c}`)}}}drawParticle(e,t,o,i,s){var n,l;t&&(t==null||t.viewport(0,0,(n=t==null?void 0:t.canvas)==null?void 0:n.width,(l=t==null?void 0:t.canvas)==null?void 0:l.height),t.disable(t.DEPTH_TEST),t.disable(t.STENCIL_TEST),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,o),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,i.texture0),this.renderScreen(e,t,i,s),this.updateParticles(e,t,i,s))}renderScreen(e,t,o,i){t.bindFramebuffer(t.FRAMEBUFFER,o.frameBuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,o.screenTexture,0),t.viewport(0,0,t.canvas.width,t.canvas.height),this.renderScreenTexture(t,o.backgroundTexture,o.screen,o.quadBuffer,.95),this.renderParticles(e,t,o,i),t.bindFramebuffer(t.FRAMEBUFFER,null),this.renderScreenTexture(t,o.screenTexture,o.screen,o.quadBuffer,1);const s=o.backgroundTexture;o.backgroundTexture=o.screenTexture,o.screenTexture=s}renderScreenTexture(e,t,o,i,s){e&&(e.useProgram(o.program),e.bindBuffer(e.ARRAY_BUFFER,i),e.enableVertexAttribArray(o.a_pos),e.vertexAttribPointer(o.a_pos,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,t),e.uniform1i(o.u_screen,2),e.uniform1f(o.u_opacity,s),e.drawArrays(e.TRIANGLES,0,6))}renderParticles(e,t,o,i){if(t){t.useProgram(o.particle.program),t.bindBuffer(t.ARRAY_BUFFER,o.indexBuffer),t.enableVertexAttribArray(o.particle.a_index),t.vertexAttribPointer(o.particle.a_index,1,t.FLOAT,!1,0,0),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,o.color.texture),t.uniform1i(o.particle.u_factor,0),t.uniform1i(o.particle.u_particles,1),t.uniform1i(o.particle.u_color_ramp,2),t.uniform1f(o.particle.u_particles_resolution,o.resolution*e.ratio),t.uniform1f(o.particle.u_point,e.ratio);const s=e.getBoundRange();t.uniform4f(o.particle.u_viewport,s[0],s[1],s[2],s[3]),t.uniform2f(o.particle.u_factor_min,i.uvRange[0],i.uvRange[0]),t.uniform2f(o.particle.u_factor_max,i.uvRange[1],i.uvRange[1]),t.drawArrays(t.POINTS,0,o.total)}}updateParticles(e,t,o,i){var n,l;if(t){t.bindFramebuffer(t.FRAMEBUFFER,o.frameBuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,o.texture1,0),t.viewport(0,0,o.resolution,o.resolution),t.useProgram(o.update.program),t.bindBuffer(t.ARRAY_BUFFER,o.quadBuffer),t.enableVertexAttribArray(o.update.a_pos),t.vertexAttribPointer(o.update.a_pos,2,t.FLOAT,!1,0,0),t.uniform1i(o.update.u_factor,0),t.uniform1i(o.update.u_particles,1);const h=e.getBoundRange();t.uniform4f(o.update.u_viewport,h[0],h[1],h[2],h[3]),t.uniform1f(o.update.u_rand_seed,Math.random()),t.uniform2f(o.update.u_factor_res,(n=o==null?void 0:o.image)==null?void 0:n.width,(l=o==null?void 0:o.image)==null?void 0:l.height),t.uniform2f(o.update.u_factor_min,i.uvRange[0],i.uvRange[0]),t.uniform2f(o.update.u_factor_max,i.uvRange[1],i.uvRange[1]),t.uniform1f(o.update.u_speed_factor,i.speedFactor*e.ratio),t.uniform1f(o.update.u_drop_rate,i.dropRate),t.uniform1f(o.update.u_drop_rate_bump,i.dropRateBump),t.drawArrays(t.TRIANGLES,0,6)}const s=o.texture0;o.texture0=o.texture1,o.texture1=s}resize(e,t){e.resize();const o=new Uint8Array(t.canvas.width*t.canvas.height*4).fill(0,0,t.canvas.width*t.canvas.height*4),i=this.createTexture(t,t.NEAREST,t.NEAREST,t.CLAMP_TO_EDGE,o,t.canvas.width,t.canvas.height),s=this.createTexture(t,t.NEAREST,t.NEAREST,t.CLAMP_TO_EDGE,o,t.canvas.width,t.canvas.height);return{screenTexture:i,backgroundTexture:s}}async loadImg(e){return new Promise(t=>{const o=new Blob([e],{type:e.type}),i=URL.createObjectURL(o),s=new Image;s.crossOrigin="anonymous",s.src=i,s.onload=()=>t(s)})}}class T{}P(T,"vertexSchema",`
1
+ (function(Ye,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("vue"),require("@turf/turf"),require("@mapbox/sphericalmercator"),require("moment"),require("mapbox-gl"),require("@idm-plugin/geo"),require("axios")):typeof define=="function"&&define.amd?define(["exports","vue","@turf/turf","@mapbox/sphericalmercator","moment","mapbox-gl","@idm-plugin/geo","axios"],b):(Ye=typeof globalThis<"u"?globalThis:Ye||self,b(Ye["idm-gl"]={},Ye.Vue,Ye["@turf/turf"],Ye["@mapbox/sphericalmercator"],Ye.moment,Ye["mapbox-gl"],Ye["@idm-plugin/geo"],Ye.axios))})(this,function(Ye,b,Si,dE,Ue,ha,Re,Ra){"use strict";var lQ=Object.defineProperty;var uQ=(Ye,b,Si)=>b in Ye?lQ(Ye,b,{enumerable:!0,configurable:!0,writable:!0,value:Si}):Ye[b]=Si;var Je=(Ye,b,Si)=>(uQ(Ye,typeof b!="symbol"?b+"":b,Si),Si);function pE(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,a.get?a:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const be=pE(Si),cQ="";var vE=Object.defineProperty,gE=(r,t,e)=>t in r?vE(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Wn=(r,t,e)=>(gE(r,typeof t!="symbol"?t+"":t,e),e);class is{}Wn(is,"LEVEL",{Basic:1,Prime:2,Supper:1024});class ns{}Wn(ns,"WEATHER_LAYERS",[{weight:1,name:"Wind",key:"wind",h5:!0,enabled:!0,type:"json",particle:!0},{weight:524288,name:"Wind Particle",key:"wind-particle",peer:{weight:1,key:"wind"},enabled:!0,hide:!0,type:"jpg"},{weight:16,name:"Sig Waves",key:"sig-wave-height",h5:!0,enabled:!0,type:"json"},{weight:4194304,name:"Sig Waves (JPG)",key:"sig-wave",peer:{weight:16,key:"sig-wave"},enabled:!0,hide:!0,type:"jpg"},{weight:8388608,name:"Sig Waves (Contour)",key:"sig-wave-height-contour",peer:{weight:16,key:"sig-wave-contour"},enabled:!0,hide:!0,type:"json"},{weight:96,name:"Current",key:"current",vendor:"cmems",merge:!0,h5:!0,enabled:!0,type:"json"},{weight:1048576,name:"Current Particle",key:"current-particle",vendor:"cmems",peer:{weight:96,key:"current"},enabled:!0,hide:!0,type:"jpg"},{weight:256,name:"Tropicals",key:"tropicals",h5:!0,enabled:!0,type:"json"},{weight:4096,name:"Pressure",h5:!0,key:"prmsl",enabled:!0,type:"json"},{weight:8192,name:"Visibility",vendor:"gfs",key:"visibility",h5:!0,enabled:!0,type:"jpg"},{weight:262144,name:"Precip Acc",key:"precip3h",h5:!0,enabled:!0,type:"jpg"},{weight:6,name:"Swell",key:"swell",merge:!0,h5:!0,enabled:!0,type:"json"},{weight:2,name:"Swell Height",key:"swell-height",partly:!0,enabled:!0,type:"json"},{weight:4,name:"Swell Direction",key:"swell-direction",partly:!0,enabled:!0,type:"json"},{weight:32,name:"Current Direction",key:"current-direction",vendor:"cmems",partly:!0,enabled:!0,type:"json"},{weight:64,name:"Current Speed",key:"current-speed",vendor:"cmems",partly:!0,enabled:!0,type:"json"},{weight:512,name:"Pressure Contour",key:"prmsl-contour",partly:!0,enabled:!0,hide:!0,type:"json"},{weight:1024,name:"Pressure Value",key:"prmsl-value",partly:!0,enabled:!0,hide:!0,type:"json"},{weight:2048,name:"Pressure Front",key:"prmsl-front",partly:!0,enabled:!0,hide:!0,type:"json"},{weight:16384,name:"Iceberg",key:"iceberg",vendor:"cmems",hide:!0,enabled:!1,type:"json"},{weight:32768,name:"Struct Ice",key:"struct-ice",vendor:"cmems",enabled:!1,hide:!0,type:"json"},{weight:65536,name:"Ice Edge",key:"arctic",vendor:"cmems",h5:!0,enabled:!0,type:"jpg"},{weight:131072,name:"Sea Surf. Temp.",key:"water-temp",vendor:"cmems",h5:!0,enabled:!0,type:"jpg"},{weight:2097152,name:"Temp.",key:"temp",h5:!0,enabled:!0,type:"jpg"}]),Wn(ns,"OTHER_LAYERS",[{weight:1,name:"War Zones",key:"war-zones",h5:!0,enabled:!0,type:"json"},{weight:2,name:"GMDSS Areas",key:"gmdss-areas",h5:!0,enabled:!0,type:"json"},{weight:4,name:"ECA Zones",key:"eca-zones",h5:!0,enabled:!0,type:"json"},{weight:8,name:"Load Lines",key:"load-lines",h5:!0,enabled:!0,type:"json"},{weight:16,name:"HRA",key:"high-risk-area",enabled:!1,type:"json"},{weight:32,name:"Pirates",key:"pirates",enabled:!1,type:"json"},{weight:4096,name:"Alert Zones",key:"alert-zones",h5:!0,enabled:!0,type:"json"},{weight:64,name:"Ports",key:"ports",h5:!0,enabled:!0,type:"json"},{weight:128,name:"Time Zones",key:"time-zones",h5:!0,enabled:!0,type:"json"},{weight:256,name:"VRA",key:"voluntary-reporting-area",h5:!0,enabled:!0,type:"json"},{weight:512,name:"Special Areas",key:"special-area",h5:!0,enabled:!0,type:"json"},{weight:1024,name:"Day/Night",key:"day-night",h5:!0,enabled:!0,type:"json"},{weight:2048,name:"ENC",key:"enc",h5:!0,enabled:!0,type:"origin"},{weight:8192,name:"World-12nm",key:"world12nm",h5:!1,enabled:!0,type:"origin"}]);let df=class{};Wn(df,"WEATHER_TAG",[{weight:4,name:"Adverse Weather Dangerous",key:"DANGEROUS",positive:!0},{weight:2,name:"Adverse Weather Severe",key:"SEVERE",positive:!0},{weight:1,name:"Adverse Weather Heavy",key:"HEAVY",positive:!0}]),Wn(df,"SAILING_TAG",[{weight:2048,name:"Deviation",key:"deviation",positive:!0},{weight:4096,name:"Stoppage",key:"stoppage",positive:!0},{weight:8192,name:"Deceleration",key:"deceleration",positive:!0},{weight:16384,name:"No Lane",key:"noLane",positive:!0},{weight:32768,name:"No Noon",key:"noNoon",positive:!0}]),Wn(df,"OTHER_TAG",[{weight:2097152,name:"No CP",key:"noCp",positive:!0},{weight:4194304,name:"Send Rpt",key:"sendRpt",positive:!1},{weight:8388608,name:"Send Bps",key:"sendBps",positive:!1},{weight:16777216,name:"Send Pvar",key:"sendPvar",positive:!1},{weight:33554432,name:"Checked",key:"checked",positive:!1},{weight:67108864,name:"Send PWFR",key:"sendPwfr",positive:!1}]);const hQ="",ze=(r,t)=>{const e=r.__vccOpts||r;for(const[a,i]of t)e[a]=i;return e},mE={name:"IdmGlLayer",props:{map:{type:Object},mapProjection:{type:String},top:{type:Number,default:60},layerToggle:{type:Boolean,default:!1},toggleVersion:{type:Number},isLogin:{type:Boolean,default:void 0},showWindFeather:{type:Boolean,default:void 0},showWindParticle:{type:Boolean,default:void 0},showCurrentIsoband:{type:Boolean,default:void 0},showCurrentParticle:{type:Boolean,default:void 0}},emits:["weather","other","toggleWindParticle","toggleWindFeather","toggleCurrentParticle","toggleCurrentIsoband","coordinate","measure","point","3d","layerToggle","handleToggleVersion"],data(){return{autoActive:!0,layers:{weather:[...ns.WEATHER_LAYERS.filter(r=>!["swell-height","swell-direction","current-direction","current-speed"].includes(r.key))],other:[...ns.OTHER_LAYERS.filter(r=>r.key!=="world12nm"&&r.enabled)]},activeWeatherLayers:[],activeOtherLayers:[],autoActiveCache:"autoActiveCache",activeWeatherLayersCache:"activeWeatherLayersCache",activeOtherLayersCache:"activeOtherLayersCache",collectedLayerCache:"collectedLayerCache",sourceCache:"defaultSourceCache",windFeatherCache:"windFeatherCache",currentIsobandCache:"currentIsobandCache",showCoord:!1,showMeasure:!1,showPoint:!1,show3d:!1,version:{v:"0.0.7",k:"glCacheVersion"},source:"",right:10,rampColorLayers:["visibility","precip3h","temp","water-temp","arctic"]}},computed:{computeLayerClass(){return function(r,t){var a;let e="layer flex-between";return t.some(i=>i.key===r.key)&&(e=e+" active"),(!r.enabled||(a=this.layers.weather)!=null&&a.some(i=>i.key===r.key)&&!this.autoActive||this.rampColorLayers.includes(r.key)&&this.mapProjection==="globe")&&(e=e+" disabled"),e}},hasCollectedLayers(){var r;return((r=this.layers.weather.filter(t=>t.collected))==null?void 0:r.length)>0}},watch:{toggleVersion:{handler(){this.$nextTick(()=>{var r;this.right=(((r=document.getElementsByClassName("right-bar")[0])==null?void 0:r.clientWidth)||0)+10})}},source:{handler(r,t){r&&t&&r!==t&&this.handleConfirm()}}},mounted(){this.fetchCache(),this.handleConfirm()},methods:{fetchCache(){const r=localStorage.getItem(this.version.k);this.version.v!==r&&(localStorage.removeItem(this.activeWeatherLayersCache),localStorage.removeItem(this.collectedLayerCache),localStorage.removeItem(this.activeOtherLayersCache),localStorage.removeItem(this.windFeatherCache),localStorage.removeItem(this.currentIsobandCache),localStorage.setItem(this.version.k,this.version.v));let t=localStorage.getItem(this.autoActiveCache);this.autoActive=t!=="false",t=localStorage.getItem(this.collectedLayerCache);let e=JSON.parse(t||'[{"weight": 16, "name": "Sig Waves", "key": "sig-wave-height", "collected": true},{"weight": 1, "name": "Wind", "key": "wind", "h5": true, "collected": true},{"weight": 96, "name": "Current", "key": "current", "collected": true},{"weight": 6, "name": "Swell", "key": "swell", "collected": true}]');this.layers.weather.forEach(a=>{a.collected=!!e.some(i=>i.key===a.key&&i.collected)}),t=localStorage.getItem(this.activeWeatherLayersCache),t||localStorage.setItem(this.activeWeatherLayersCache,JSON.stringify([{weight:1,name:"Wind",key:"wind",enabled:!0,type:"json",particle:!0},{weight:4096,name:"Pressure",key:"prmsl",enabled:!0,type:"json"},{weight:256,name:"Tropicals",key:"tropicals",enabled:!0,type:"json"}])),t=localStorage.getItem(this.activeWeatherLayersCache),e=JSON.parse(t),this.autoActive&&(this.activeWeatherLayers=[...e]),e.some(a=>a.key==="wind"&&a.particle)&&this.$emit("toggleWindParticle",!0),localStorage.getItem(this.windFeatherCache)==="true"&&this.$emit("toggleWindFeather",!0),e.some(a=>a.key==="current"&&a.particle)&&this.$emit("toggleCurrentParticle",!0),localStorage.getItem(this.currentIsobandCache)==="true"&&this.$emit("toggleCurrentIsoband",!0),t=localStorage.getItem(this.activeOtherLayersCache),e=JSON.parse(t||'[{"weight":4,"name":"ECA Zones","key":"eca-zones","enabled":true,"type":"json"}]'),this.activeOtherLayers=e,t=localStorage.getItem(this.sourceCache),this.source=t||"GFS"},handleConfirm(){this.$emit("weather",this.activeWeatherLayers,this.source),this.$emit("other",this.activeOtherLayers),localStorage.setItem(this.autoActiveCache,this.autoActive),localStorage.setItem(this.sourceCache,this.source)},handleWeatherLayerPick(r){if(this.activeWeatherLayers=JSON.parse(localStorage.getItem(this.activeWeatherLayersCache)),this.rampColorLayers.includes(r.key)&&this.mapProjection==="globe"||!this.autoActive)return!1;(r.key==="wind"&&!this.showWindFeather||r.key==="current"&&!this.showCurrentIsoband)&&(r.particle=!0),this.activeWeatherLayers.some(t=>t.key===r.key)?this.activeWeatherLayers=this.activeWeatherLayers.filter(t=>t.key!==r.key):this.activeWeatherLayers.length<6&&r.enabled&&(["png","jpg"].includes(r.type)?this.activeWeatherLayers.forEach(t=>{(t.key==="wind"&&this.showWindFeather||r.key==="current"&&this.showCurrentIsoband)&&(t.particle=!1)}):r.key==="wind"?this.activeWeatherLayers.forEach(t=>{t.key==="current"&&this.showCurrentIsoband&&(t.particle=!1)}):r.key==="current"&&this.activeWeatherLayers.forEach(t=>{t.key==="wind"&&this.showWindFeather&&(t.particle=!1)}),this.activeWeatherLayers=this.activeWeatherLayers.filter(t=>t.type==="json"&&!(["wind","current"].includes(t.key)&&t.particle)),this.activeWeatherLayers.push(r)),this.$emit("weather",this.activeWeatherLayers,this.source),localStorage.setItem(this.activeWeatherLayersCache,JSON.stringify(this.activeWeatherLayers))},handleWeatherLayerCollect(r){var t;!r.collected&&((t=this.layers.weather.filter(e=>e.collected))==null?void 0:t.length)>=6&&(this.layers.weather.filter(e=>e.collected)[0].collected=!1),r.collected=!r.collected,localStorage.setItem(this.collectedLayerCache,JSON.stringify(this.layers.weather)),this.$emit("handleToggleVersion")},handleToggleWindParticle(){!this.showWindFeather&&this.showWindParticle?this.handleWeatherLayerPick({weight:1,name:"Wind",key:"wind",enabled:!0,type:"json",particle:!0}):(this.showCurrentParticle&&(this.$emit("toggleCurrentParticle",!1),this.showCurrentIsoband||(this.activeWeatherLayers=this.activeWeatherLayers.filter(r=>r.key!=="current"),localStorage.setItem(this.activeWeatherLayersCache,JSON.stringify(this.activeWeatherLayers)))),this.$emit("toggleWindParticle",!this.showWindParticle))},handleToggleWindFeather(){this.showWindFeather&&!this.showWindParticle&&this.handleWeatherLayerPick({weight:1,name:"Wind",key:"wind",enabled:!0,type:"json",particle:!0}),this.$emit("toggleWindFeather",!this.showWindFeather),localStorage.setItem(this.windFeatherCache,!this.showWindFeather)},handleToggleCurrentParticle(){!this.showCurrentIsoband&&this.showCurrentParticle?this.handleWeatherLayerPick({weight:96,name:"Current",key:"current",vendor:"cmems",merge:!0,h5:!0,enabled:!0}):(this.showWindParticle&&(this.$emit("toggleWindParticle",!1),this.showWindFeather||(this.activeWeatherLayers=this.activeWeatherLayers.filter(r=>r.key!=="wind"),localStorage.setItem(this.activeWeatherLayersCache,JSON.stringify(this.activeWeatherLayers)))),this.$emit("toggleCurrentParticle",!this.showCurrentParticle))},handleToggleCurrentIsoband(){this.showCurrentIsoband&&!this.showCurrentParticle&&this.handleWeatherLayerPick({weight:96,name:"Current",key:"current",vendor:"cmems",merge:!0,h5:!0,enabled:!0}),this.$emit("toggleCurrentIsoband",!this.showCurrentIsoband),localStorage.setItem(this.currentIsobandCache,!this.showCurrentIsoband)},handleOtherLayerPick(r){this.activeOtherLayers.some(t=>t.key===r.key)?this.activeOtherLayers=this.activeOtherLayers.filter(t=>t.key!==r.key):r.enabled&&this.activeOtherLayers.push(r),localStorage.setItem(this.activeOtherLayersCache,JSON.stringify(this.activeOtherLayers)),this.$emit("other",this.activeOtherLayers)},handleMenuToggle(){this.$emit("layerToggle",!this.layerToggle)},toggleAutoActive(){this.autoActive=!this.autoActive,localStorage.setItem(this.autoActiveCache,this.autoActive),this.autoActive?this.$emit("weather",this.activeWeatherLayers,this.source):this.$emit("weather",[],this.source)},handleCoordToggle(){this.showCoord=!this.showCoord,this.$emit("coordinate",this.showCoord)},handlePointToggle(){this.isLogin?(this.showPoint=!this.showPoint,this.$emit("point",this.showPoint)):this.$emit("handleToggleVersion")},handleMeasureToggle(){this.showMeasure=!this.showMeasure,this.$emit("measure",this.showMeasure)},handle3DToggle(){this.show3d=!this.show3d,this.$emit("3d",this.show3d)}}},yE={class:"idm-gl3-layer"},_E={class:"bar-item layer-bars"},bE={class:"bar-item tool-bars"},wE={class:"flex-between"},xE={key:0,class:"iconfont active"},SE={key:1,class:"iconfont"},LE=["onClick"],TE=["onClick"],CE={key:0,class:"flex-start"},DE={key:1,class:"flex-start"},AE={class:"header-box flex-between"},ME={class:"weather-layers card-bg"},EE={class:"layers-title flex-between"},IE={key:0,class:"iconfont active"},PE={key:1,class:"iconfont"},kE={class:"layers-body"},NE={class:"flex-start"},RE=["onClick"],VE=["onClick"],OE={key:0,class:"flex-start"},zE={key:1,class:"flex-start"},BE=["onClick"],FE={key:0,class:"iconfont bookmark-icon active"},GE={key:1,class:"iconfont bookmark-icon inactive"},WE={class:"other-layers card-bg"},HE={class:"layers-body"},$E=["onClick"],UE={class:"flex-start"},YE={class:"switch flex-center"},ZE={key:0,class:"iconfont active"},XE={key:1,class:"iconfont"},jE={class:"source-layers card-bg"},qE={class:"layers-body"};function KE(r,t,e,a,i,n){const o=b.resolveComponent("ElTooltip"),s=b.resolveComponent("ElRadio"),l=b.resolveComponent("ElRadioGroup"),u=b.resolveComponent("ElScrollbar");return b.openBlock(),b.createElementBlock("div",yE,[b.createElementVNode("div",{class:"menu-bar-box",style:b.normalizeStyle({top:e.top+10+"px",right:i.right+"px"})},[b.createElementVNode("div",_E,[b.createVNode(o,{placement:"left",effect:"light",content:"Menu","show-after":1e3},{default:b.withCtx(()=>[b.createElementVNode("div",{class:b.normalizeClass(e.layerToggle?"menu-icon active":"menu-icon"),onClick:t[0]||(t[0]=(...c)=>n.handleMenuToggle&&n.handleMenuToggle(...c))},t[17]||(t[17]=[b.createElementVNode("span",{class:"iconfont"},"",-1)]),2)]),_:1})])],4),b.createElementVNode("div",{class:"menu-bar-box",style:b.normalizeStyle({top:e.top+160+"px",right:i.right+"px"})},[b.createElementVNode("div",bE,[b.createVNode(o,{placement:"left",effect:"light",content:"Measure","show-after":1e3},{default:b.withCtx(()=>[b.createElementVNode("div",{class:b.normalizeClass(i.showMeasure?"menu-icon active":"menu-icon"),onClick:t[1]||(t[1]=(...c)=>n.handleMeasureToggle&&n.handleMeasureToggle(...c))},t[18]||(t[18]=[b.createElementVNode("span",{class:"iconfont"},"",-1)]),2)]),_:1}),b.createVNode(o,{placement:"left",effect:"light",content:"Point Meteo","show-after":1e3},{default:b.withCtx(()=>[b.createElementVNode("div",{class:b.normalizeClass(i.showPoint?"menu-icon active":"menu-icon"),onClick:t[2]||(t[2]=(...c)=>n.handlePointToggle&&n.handlePointToggle(...c))},t[19]||(t[19]=[b.createElementVNode("span",{class:"iconfont"},"",-1)]),2)]),_:1}),b.createVNode(o,{placement:"left",effect:"light",content:"Grid","show-after":1e3},{default:b.withCtx(()=>[b.createElementVNode("div",{class:b.normalizeClass(i.showCoord?"menu-icon active":"menu-icon"),onClick:t[3]||(t[3]=(...c)=>n.handleCoordToggle&&n.handleCoordToggle(...c))},t[20]||(t[20]=[b.createElementVNode("span",{class:"iconfont"},"",-1)]),2)]),_:1}),b.createVNode(o,{placement:"left",effect:"light",content:"3D","show-after":1e3},{default:b.withCtx(()=>[b.createElementVNode("div",{class:b.normalizeClass(i.show3d?"menu-icon active":"menu-icon"),onClick:t[4]||(t[4]=(...c)=>n.handle3DToggle&&n.handle3DToggle(...c))},t[21]||(t[21]=[b.createElementVNode("span",{class:"iconfont"},"",-1)]),2)]),_:1})])],4),n.hasCollectedLayers?(b.openBlock(),b.createElementBlock("div",{key:0,class:"active-layers",style:b.normalizeStyle({right:i.right+"px",bottom:"100px"})},[b.createElementVNode("div",wE,[t[22]||(t[22]=b.createElementVNode("div",{style:{margin:"2px 5px"}},"My Favorites",-1)),b.createElementVNode("div",{class:"switch flex-center",style:{"font-size":"28px","margin-right":"0"},onClick:t[5]||(t[5]=(...c)=>n.toggleAutoActive&&n.toggleAutoActive(...c))},[i.autoActive?(b.openBlock(),b.createElementBlock("i",xE,"")):(b.openBlock(),b.createElementBlock("i",SE,""))])]),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.layers.weather.filter(c=>c.collected),c=>(b.openBlock(),b.createElementBlock("div",{key:c.key,class:b.normalizeClass(n.computeLayerClass(c,i.activeWeatherLayers))},[b.createElementVNode("div",{class:"checkbox",onClick:h=>n.handleWeatherLayerPick(c)},null,8,LE),b.createElementVNode("span",{class:"name",onClick:h=>n.handleWeatherLayerPick(c)},b.toDisplayString(c.name),9,TE),c.key==="wind"&&i.activeWeatherLayers.some(h=>h.key===c.key)?(b.openBlock(),b.createElementBlock("div",CE,[b.createElementVNode("i",{class:b.normalizeClass(["iconfont sub-layer-icon",e.showWindParticle?"active":""]),onClick:t[6]||(t[6]=h=>n.handleToggleWindParticle())},"",2),b.createElementVNode("i",{class:b.normalizeClass(["iconfont sub-layer-icon",e.showWindFeather?"active":""]),onClick:t[7]||(t[7]=h=>n.handleToggleWindFeather())},"",2)])):b.createCommentVNode("",!0),c.key==="current"&&i.activeWeatherLayers.some(h=>h.key===c.key)?(b.openBlock(),b.createElementBlock("div",DE,[b.createElementVNode("i",{class:b.normalizeClass(["iconfont sub-layer-icon",e.showCurrentParticle?"active":""]),onClick:t[8]||(t[8]=h=>n.handleToggleCurrentParticle())},"",2),b.createElementVNode("i",{class:b.normalizeClass(["iconfont sub-layer-icon",e.showCurrentIsoband?"active":""]),onClick:t[9]||(t[9]=h=>n.handleToggleCurrentIsoband())},"",2)])):b.createCommentVNode("",!0)],2))),128))],4)):b.createCommentVNode("",!0),b.createElementVNode("div",{class:"available-layers flex-center",style:b.normalizeStyle({top:e.top+"px",right:e.layerToggle?"0px":"-240px"})},[b.createElementVNode("div",{class:b.normalizeClass(["list-box",e.layerToggle?"right-bar":""])},[b.createElementVNode("div",AE,[t[23]||(t[23]=b.createElementVNode("div",null,"Layers",-1)),b.createElementVNode("div",{class:"iconfont close-btn",onClick:t[10]||(t[10]=(...c)=>n.handleMenuToggle&&n.handleMenuToggle(...c))},"")]),b.createVNode(u,{style:{flex:"1"}},{default:b.withCtx(()=>[b.createElementVNode("div",ME,[b.createElementVNode("div",EE,[t[24]||(t[24]=b.createElementVNode("div",null,"Weather Layers",-1)),b.createElementVNode("div",{class:"switch flex-center",style:{"margin-right":"0"},onClick:t[11]||(t[11]=(...c)=>n.toggleAutoActive&&n.toggleAutoActive(...c))},[i.autoActive?(b.openBlock(),b.createElementBlock("i",IE,"")):(b.openBlock(),b.createElementBlock("i",PE,""))])]),b.createElementVNode("div",kE,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.layers.weather,c=>(b.openBlock(),b.createElementBlock(b.Fragment,{key:c.key},[c.hide?b.createCommentVNode("",!0):(b.openBlock(),b.createElementBlock("div",{key:0,class:b.normalizeClass(n.computeLayerClass(c,i.activeWeatherLayers))},[b.createElementVNode("div",NE,[b.createElementVNode("div",{class:"checkbox",onClick:h=>n.handleWeatherLayerPick(c)},null,8,RE),b.createElementVNode("span",{class:"name",onClick:h=>n.handleWeatherLayerPick(c)},b.toDisplayString(c.name),9,VE),c.key==="wind"&&i.activeWeatherLayers.some(h=>h.key===c.key)?(b.openBlock(),b.createElementBlock("div",OE,[b.createElementVNode("i",{class:b.normalizeClass(["iconfont sub-layer-icon",e.showWindParticle?"active":""]),onClick:t[12]||(t[12]=h=>n.handleToggleWindParticle())},"",2),b.createElementVNode("i",{class:b.normalizeClass(["iconfont sub-layer-icon",e.showWindFeather?"active":""]),onClick:t[13]||(t[13]=h=>n.handleToggleWindFeather())},"",2)])):b.createCommentVNode("",!0),c.key==="current"&&i.activeWeatherLayers.some(h=>h.key===c.key)?(b.openBlock(),b.createElementBlock("div",zE,[b.createElementVNode("i",{class:b.normalizeClass(["iconfont sub-layer-icon",e.showCurrentParticle?"active":""]),onClick:t[14]||(t[14]=h=>n.handleToggleCurrentParticle())},"",2),b.createElementVNode("i",{class:b.normalizeClass(["iconfont sub-layer-icon",e.showCurrentIsoband?"active":""]),onClick:t[15]||(t[15]=h=>n.handleToggleCurrentIsoband())},"",2)])):b.createCommentVNode("",!0)]),b.createElementVNode("div",{onClick:h=>n.handleWeatherLayerCollect(c)},[c.collected?(b.openBlock(),b.createElementBlock("i",FE,"")):(b.openBlock(),b.createElementBlock("i",GE,""))],8,BE)],2))],64))),128)),t[25]||(t[25]=b.createElementVNode("div",{class:"tip flex-start"},[b.createElementVNode("i",{class:"iconfont bookmark-icon",style:{"align-self":"flex-start",padding:"5px 5px 0 0"}},""),b.createElementVNode("div",null,"You can add the layers to your favorites. (Max 6)")],-1))])]),b.createElementVNode("div",WE,[t[26]||(t[26]=b.createElementVNode("div",{class:"layers-title"},"Other Layers",-1)),b.createElementVNode("div",HE,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.layers.other,c=>{var h;return b.openBlock(),b.createElementBlock("div",{key:c.key,class:b.normalizeClass(["layer flex-between",n.computeLayerClass(c,i.activeOtherLayers)]),onClick:f=>n.handleOtherLayerPick(c)},[b.createElementVNode("div",UE,[b.createElementVNode("div",YE,[(h=n.computeLayerClass(c,i.activeOtherLayers))!=null&&h.includes("active")?(b.openBlock(),b.createElementBlock("i",ZE,"")):(b.openBlock(),b.createElementBlock("i",XE,""))]),b.createElementVNode("span",null,b.toDisplayString(c.name),1)])],10,$E)}),128))])]),b.createElementVNode("div",jE,[t[29]||(t[29]=b.createElementVNode("span",{class:"layers-title"},"Forecast Model",-1)),b.createElementVNode("div",qE,[b.createVNode(l,{modelValue:i.source,"onUpdate:modelValue":t[16]||(t[16]=c=>i.source=c),class:"layer-radio flex-col-center-start"},{default:b.withCtx(()=>[b.createVNode(s,{value:"GFS"},{default:b.withCtx(()=>t[27]||(t[27]=[b.createTextVNode("GFS")])),_:1}),b.createVNode(s,{value:"CMEMS"},{default:b.withCtx(()=>t[28]||(t[28]=[b.createTextVNode("CMEMS")])),_:1})]),_:1},8,["modelValue"])])])]),_:1})],2)],4)])}const JE=ze(mE,[["render",KE]]),fQ="",QE={name:"IdmWindBarb",props:{map:{type:Object},wind:{type:Object},current:{type:Object},beforeLayer:{type:String},mapProjection:{type:String},showWindFeather:{type:Boolean,default:!1},showWindParticle:{type:Boolean,default:!1},toggleVersion:{type:Number}},emits:["particle","showWindFeather"],data(){return{source:"wind-barb-source",barbs:[0,2,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105],empty:be.featureCollection([]),right:10,bottom:125,windBarbLoaded:!1}},watch:{"wind.version":{handler(){var r;(r=this.wind)!=null&&r.active&&this.showWindFeather?this.handleRender():this.handleClear()},deep:!0},showWindParticle:{handler(){this.handleParticle()}},showWindFeather:{handler(){this.handleToggle()}}},methods:{handleParticle(){this.$emit("particle",{particle:this.showWindParticle,key:"wind",weight:1})},handleRender(){var r,t,e,a;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.wind){const i=new Date().valueOf();let n=0,o=0,s=this.empty;if((r=this.wind)!=null&&r.active&&(s=(t=this.wind)==null?void 0:t.data),(e=this.map)!=null&&e.getSource(this.source))(a=this.map)==null||a.getSource(this.source).setData(s),o=new Date().valueOf()-(i+n),console.log("[wind] update elapsed: ",o,", total: ",n+=o);else{this.map.addSource(this.source,{type:"geojson",data:s});for(let l=0;l<(this.barbs??[]).length-1;l++){const u=(this.barbs??[])[l]||0,c=(this.barbs??[])[l+1]||0,h=u<10?`00${u}kts`:u<100?`0${u}kts`:`${u}kts`;this.map.addLayer({id:h,type:"symbol",filter:["all",[">=","spd",u],["<","spd",c]],source:this.source,layout:{"symbol-placement":"point","icon-image":h,"icon-size":.14,"icon-offset":[0,-20],"icon-allow-overlap":!0,"icon-rotation-alignment":"map","icon-rotate":{property:"val",stops:[[0,0],[360,360]]}},paint:{"icon-opacity":1,"text-color":"#222"}},this.beforeLayer)}this.windBarbLoaded=!0,o=new Date().valueOf()-(i+n),console.log("[wind] add elapsed: ",o,", total: ",n+=o)}}},handleToggle(){if(!this.windBarbLoaded)this.handleRender();else for(const r of this.barbs??[]){const t=r<10?`00${r}kts`:r<100?`0${r}kts`:`${r}kts`;this.map.getLayer(t)&&this.map.setLayoutProperty(t,"visibility",this.showWindFeather?"visible":"none")}},handleClear(){for(const r of this.barbs??[]){const t=r<10?`00${r}kts`:r<100?`0${r}kts`:`${r}kts`;this.map.getLayer(t)&&this.map.removeLayer(t)}this.map.getSource(this.source)&&this.map.removeSource(this.source),this.windBarbLoaded=!1}}},eI={key:0};function tI(r,t,e,a,i,n){var o;return(o=e.wind)!=null&&o.active?(b.openBlock(),b.createElementBlock("div",eI)):b.createCommentVNode("",!0)}const rI=ze(QE,[["render",tI]]);class ru{constructor(t){Je(this,"map");Je(this,"mercator");Je(this,"rampColorLayer");Je(this,"rampColorSource");Je(this,"particleLayer");Je(this,"particleSource");Je(this,"rampColorCanvas");Je(this,"particleCanvas");Je(this,"ratio");this.map=t,this.mercator=new dE,this.rampColorLayer="ramp-color-layer",this.rampColorSource="ramp-color-source",this.particleLayer="particle-layer",this.particleSource="particle-source",this.rampColorCanvas=document.createElement("canvas"),this.particleCanvas=document.createElement("canvas"),this.ratio=window.devicePixelRatio}convertNLng(t,e=0){return t>180?this.convertNLng(t-360,e+1):t<-180?this.convertNLng(t+360,e+1):[t,e]}getBoundLngLat(){const t=this.map.getBounds();return[[t._sw.lng,t._ne.lat],[t._ne.lng,t._ne.lat],[t._ne.lng,t._sw.lat],[t._sw.lng,t._sw.lat]]}getBoundPixel(){const t=this.map.getBounds(),e=this.map.getZoom()+1,a=[t._ne.lng,t._ne.lat],i=[t._sw.lng,t._sw.lat],[n,o]=this.convertNLng(a[0]),[s,l]=this.convertNLng(i[0]),[u,c]=this.mercator.px([n,a[1]],e),[h,f]=this.mercator.px([s,i[1]],e),d=Math.round(this.mercator.size*Math.pow(2,e)*(o+l));return[h,f,u+d,c]}getBoundRange(){const t=this.map.getZoom()+1,e=this.mercator.size*Math.pow(2,t),a=this.getBoundPixel();return[a[0]/e,a[2]/e,a[3]/e,a[1]/e]}getWorldCopy(t,e){const a=2**e,[i,n,o,s]=t.map(c=>~~(c/(a*256))),l=[];for(let c=s;c<=n;c++)for(let h=i;h<=o;h++)l.push([h,c]);return l.map(c=>{const h=2**e*256;return[c[0]*h,c[1]*h,h]})}resize(){let t=this.map.getSource(this.rampColorSource);t.setCoordinates(this.getBoundLngLat()),t=this.map.getSource(this.particleSource),t.setCoordinates(this.getBoundLngLat()),this.rampColorCanvas.width=this.map._canvas.clientWidth,this.rampColorCanvas.height=this.map._canvas.clientHeight,this.particleCanvas.width=this.map._canvas.clientWidth,this.particleCanvas.height=this.map._canvas.clientHeight}toggle(t){const e=this.map.getLayoutProperty(this.rampColorLayer,"visibility"),a=t?"visible":"none";e!==a&&this.map.setLayoutProperty(this.rampColorLayer,"visibility",a)}toggleParticle(t){const e=this.map.getLayoutProperty(this.particleLayer,"visibility"),a=t?"visible":"none";e!==a&&this.map.setLayoutProperty(this.particleLayer,"visibility",a)}}class Va{createShader(t,e,a){const i=t.createShader(e);if(i&&(t.shaderSource(i,a),t.compileShader(i),!t.getShaderParameter(i,t.COMPILE_STATUS)))throw new Error(t.getShaderInfoLog(i)||"error happened while create shader...");return i}createTexture(t,e,a,i,n,o,s){const l=t.createTexture();return t.bindTexture(t.TEXTURE_2D,l),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,a),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,i),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,i),n instanceof Uint8Array?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,o,s,0,t.RGBA,t.UNSIGNED_BYTE,n):t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n),t.bindTexture(t.TEXTURE_2D,null),l}createDataBuffer(t,e,a){if(t){const i=t.createBuffer();return e==="array"?(t.bindBuffer(t.ARRAY_BUFFER,i),a&&t.bufferData(t.ARRAY_BUFFER,a,t.STATIC_DRAW)):e==="element"&&(t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,i),a&&t.bufferData(t.ELEMENT_ARRAY_BUFFER,a,t.STATIC_DRAW)),i}return null}createProgram(t,e,a){const i=t.createProgram(),n=this.createShader(t,t.VERTEX_SHADER,e),o=this.createShader(t,t.FRAGMENT_SHADER,a);if(i&&n&&o&&(t.attachShader(i,n),t.attachShader(i,o),t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS)))throw new Error(t.getProgramInfoLog(i)||"error happened while creating ramp color program");return i}createProgramWrapper(t,e,a){const i=this.createProgram(t,e,a);if(i){const n={program:i},o=t.getProgramParameter(i,t.ACTIVE_ATTRIBUTES);for(let l=0;l<o;l++){const u=t.getActiveAttrib(i,l);n[u.name]=t.getAttribLocation(i,u.name)}const s=t.getProgramParameter(i,t.ACTIVE_UNIFORMS);for(let l=0;l<s;l++){const u=t.getActiveUniform(i,l);n[u.name]=t.getUniformLocation(i,u.name)}return n}}setup(t,e,a=!1,i,n){const o=document.createElement("canvas");o.width=256,o.height=1;const s=o.getContext("2d");if(s&&t){const l=s==null?void 0:s.createLinearGradient(0,0,256,0);return e.forEach(([u,c])=>{l.addColorStop(u,c)}),s.fillStyle=l,s.fillRect(0,0,256,1),{canvas:o,texture:this.createTexture(t,t.LINEAR,t.LINEAR,t.CLAMP_TO_EDGE,a?new Uint8Array(s.getImageData(0,0,256,1).data):o,i,n)}}}setupParticle(t,e=1e3){const a=Math.ceil(Math.sqrt(e)),i=a*a,n=new Uint8Array(i*4);for(let c=0;c<n.length;c++)n[c]=Math.floor(Math.random()*256);const o=this.createTexture(t,t.NEAREST,t.NEAREST,t.CLAMP_TO_EDGE,n,a,a),s=this.createTexture(t,t.NEAREST,t.NEAREST,t.CLAMP_TO_EDGE,n,a,a),l=new Float32Array(i);for(let c=0;c<i;c++)l[c]=c;const u=this.createDataBuffer(t,"array",l);return{resolution:a,total:i,texture0:o,texture1:s,indexBuffer:u}}bind(t,e,a){const i=this.createProgram(t,e,a);if(i){const n=this.createDataBuffer(t,"array",void 0),o=t.getAttribLocation(i,"a_position");t.enableVertexAttribArray(o),t.vertexAttribPointer(o,2,t.FLOAT,!1,0,0);const s=new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]);this.createDataBuffer(t,"array",s);const l=t.getAttribLocation(i,"a_texCoord");return t.enableVertexAttribArray(l),t.vertexAttribPointer(l,2,t.FLOAT,!1,0,0),{program:i,aPositionBuffer:n}}return{}}bindParticle(t,e,a,i,n,o){const s=this.createProgramWrapper(t,e,a),l=this.createProgramWrapper(t,i,n),u=this.createProgramWrapper(t,i,o),c=this.createDataBuffer(t,"array",new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1])),h=t.createFramebuffer();return{particle:s,screen:l,update:u,quadBuffer:c,frameBuffer:h}}draw(t,e,a,i,n,o,s){var l,u;if(e&&a){t.resize(),e==null||e.viewport(0,0,(l=e==null?void 0:e.canvas)==null?void 0:l.width,(u=e==null?void 0:e.canvas)==null?void 0:u.height),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT);try{const c=e.getUniformLocation(a,"u_resolution"),h=e.getUniformLocation(a,"u_image"),f=e.getUniformLocation(a,"u_color");if(e.useProgram(a),e.uniform2f(c,e.canvas.width*t.ratio,e.canvas.height*t.ratio),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,i),e.uniform1i(h,0),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,n),e.uniform1i(f,1),s!=null&&s.uvRange&&(s!=null&&s.sRange)){const g=e.getUniformLocation(a,"u_range_u_v"),m=e.getUniformLocation(a,"u_range_s");e.uniform2f(g,s.uvRange[0],s.uvRange[1]),e.uniform2f(m,s.sRange[0],s.sRange[1])}const d=t.getBoundPixel(),p=t.map.getZoom()+1,v=t.getWorldCopy(d,p);for(const g of v){const m=(g[0]-d[0])*t.ratio,y=(g[1]-d[3])*t.ratio,_=g[2]*t.ratio,[w,x,S,L]=[m,_+m,y,_+y],C=new Float32Array([w,S,x,S,w,L,w,L,x,S,x,L]);e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,C,e.STATIC_DRAW),e.drawArrays(e.TRIANGLES,0,6)}}catch(c){console.log(`render failed...${c}`)}}}drawParticle(t,e,a,i,n){var o,s;e&&(e==null||e.viewport(0,0,(o=e==null?void 0:e.canvas)==null?void 0:o.width,(s=e==null?void 0:e.canvas)==null?void 0:s.height),e.disable(e.DEPTH_TEST),e.disable(e.STENCIL_TEST),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,a),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,i.texture0),this.renderScreen(t,e,i,n),this.updateParticles(t,e,i,n))}renderScreen(t,e,a,i){e.bindFramebuffer(e.FRAMEBUFFER,a.frameBuffer),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,a.screenTexture,0),e.viewport(0,0,e.canvas.width,e.canvas.height),this.renderScreenTexture(e,a.backgroundTexture,a.screen,a.quadBuffer,.95),this.renderParticles(t,e,a,i),e.bindFramebuffer(e.FRAMEBUFFER,null),this.renderScreenTexture(e,a.screenTexture,a.screen,a.quadBuffer,1);const n=a.backgroundTexture;a.backgroundTexture=a.screenTexture,a.screenTexture=n}renderScreenTexture(t,e,a,i,n){t&&(t.useProgram(a.program),t.bindBuffer(t.ARRAY_BUFFER,i),t.enableVertexAttribArray(a.a_pos),t.vertexAttribPointer(a.a_pos,2,t.FLOAT,!1,0,0),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,e),t.uniform1i(a.u_screen,2),t.uniform1f(a.u_opacity,n),t.drawArrays(t.TRIANGLES,0,6))}renderParticles(t,e,a,i){if(e){e.useProgram(a.particle.program),e.bindBuffer(e.ARRAY_BUFFER,a.indexBuffer),e.enableVertexAttribArray(a.particle.a_index),e.vertexAttribPointer(a.particle.a_index,1,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,a.color.texture),e.uniform1i(a.particle.u_factor,0),e.uniform1i(a.particle.u_particles,1),e.uniform1i(a.particle.u_color_ramp,2),e.uniform1f(a.particle.u_particles_resolution,a.resolution*t.ratio),e.uniform1f(a.particle.u_point,t.ratio);const n=t.getBoundRange();e.uniform4f(a.particle.u_viewport,n[0],n[1],n[2],n[3]),e.uniform2f(a.particle.u_factor_min,i.uvRange[0],i.uvRange[0]),e.uniform2f(a.particle.u_factor_max,i.uvRange[1],i.uvRange[1]),e.drawArrays(e.POINTS,0,a.total)}}updateParticles(t,e,a,i){var o,s;if(e){e.bindFramebuffer(e.FRAMEBUFFER,a.frameBuffer),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,a.texture1,0),e.viewport(0,0,a.resolution,a.resolution),e.useProgram(a.update.program),e.bindBuffer(e.ARRAY_BUFFER,a.quadBuffer),e.enableVertexAttribArray(a.update.a_pos),e.vertexAttribPointer(a.update.a_pos,2,e.FLOAT,!1,0,0),e.uniform1i(a.update.u_factor,0),e.uniform1i(a.update.u_particles,1);const l=t.getBoundRange();e.uniform4f(a.update.u_viewport,l[0],l[1],l[2],l[3]),e.uniform1f(a.update.u_rand_seed,Math.random()),e.uniform2f(a.update.u_factor_res,(o=a==null?void 0:a.image)==null?void 0:o.width,(s=a==null?void 0:a.image)==null?void 0:s.height),e.uniform2f(a.update.u_factor_min,i.uvRange[0],i.uvRange[0]),e.uniform2f(a.update.u_factor_max,i.uvRange[1],i.uvRange[1]),e.uniform1f(a.update.u_speed_factor,i.speedFactor*t.ratio),e.uniform1f(a.update.u_drop_rate,i.dropRate),e.uniform1f(a.update.u_drop_rate_bump,i.dropRateBump),e.drawArrays(e.TRIANGLES,0,6)}const n=a.texture0;a.texture0=a.texture1,a.texture1=n}resize(t,e){t.resize();const a=new Uint8Array(e.canvas.width*e.canvas.height*4).fill(0,0,e.canvas.width*e.canvas.height*4),i=this.createTexture(e,e.NEAREST,e.NEAREST,e.CLAMP_TO_EDGE,a,e.canvas.width,e.canvas.height),n=this.createTexture(e,e.NEAREST,e.NEAREST,e.CLAMP_TO_EDGE,a,e.canvas.width,e.canvas.height);return{screenTexture:i,backgroundTexture:n}}async loadImg(t){return new Promise(e=>{const a=new Blob([t],{type:t.type}),i=URL.createObjectURL(a),n=new Image;n.crossOrigin="anonymous",n.src=i,n.onload=()=>e(n)})}}class vt{}Je(vt,"vertexSchema",`
2
2
  //canvas 坐标系上的坐标 (x, y)
3
3
  attribute vec2 a_position; //像素坐标
4
4
  attribute vec2 a_texCoord; //纹理坐标
@@ -12,7 +12,7 @@
12
12
  // canvas的 Y 轴坐标方向和 设备坐标系的相反
13
13
  gl_Position = vec4(position * vec2(1, -1), 0.0, 1.0);
14
14
  v_texCoord = a_texCoord;
15
- }`),P(T,"uvFragmentSchema",`
15
+ }`),Je(vt,"uvFragmentSchema",`
16
16
  precision mediump float;
17
17
  uniform sampler2D u_image;
18
18
  uniform vec2 u_range_u_v;
@@ -30,7 +30,7 @@
30
30
  vec4 color = texture2D(u_color, vec2(r, 0.5)) * f;
31
31
 
32
32
  gl_FragColor = color;
33
- }`),P(T,"fragmentSchema",`
33
+ }`),Je(vt,"fragmentSchema",`
34
34
  precision mediump float;
35
35
  uniform sampler2D u_image; // 灰度
36
36
  uniform sampler2D u_color; // 色值映射
@@ -40,7 +40,7 @@
40
40
  vec4 rgba = texture2D(u_image, v_texCoord);
41
41
  vec4 color = texture2D(u_color, vec2(rgba.r, 0));
42
42
  gl_FragColor = color;
43
- }`);class I{}P(I,"vertexSchema",`
43
+ }`);class Ct{}Je(Ct,"vertexSchema",`
44
44
  precision mediump float;
45
45
 
46
46
  attribute float a_index; // 索引
@@ -64,7 +64,7 @@
64
64
  gl_PointSize = 1.0;
65
65
  // gl_PointSize = u_point;
66
66
  gl_Position = vec4(2.0 * v_particle_pos.x - 1.0, 1.0 - 2.0 * v_particle_pos.y, 0, 1);
67
- }`),P(I,"fragmentSchema",`
67
+ }`),Je(Ct,"fragmentSchema",`
68
68
  precision mediump float;
69
69
 
70
70
  uniform sampler2D u_factor;
@@ -86,7 +86,7 @@
86
86
 
87
87
  float f = 1.0 - uv.b;
88
88
  gl_FragColor = texture2D(u_color_ramp, ramp_pos) * f;
89
- }`),P(I,"quadVertSchema",`
89
+ }`),Je(Ct,"quadVertSchema",`
90
90
  precision mediump float;
91
91
 
92
92
  attribute vec2 a_pos;
@@ -96,7 +96,7 @@
96
96
  void main() {
97
97
  v_tex_pos = a_pos;
98
98
  gl_Position = vec4(1.0 - 2.0 * a_pos, 0, 1);
99
- }`),P(I,"screenFragmentSchema",`
99
+ }`),Je(Ct,"screenFragmentSchema",`
100
100
  precision mediump float;
101
101
 
102
102
  uniform sampler2D u_screen;
@@ -108,7 +108,7 @@
108
108
  vec4 color = texture2D(u_screen, 1.0 - v_tex_pos);
109
109
  // a hack to guarantee opacity fade out even with a value close to 1.0
110
110
  gl_FragColor = vec4(floor(255.0 * color * u_opacity) / 255.0);
111
- }`),P(I,"updateFragmentSchema",`
111
+ }`),Je(Ct,"updateFragmentSchema",`
112
112
  precision mediump float;
113
113
 
114
114
  uniform sampler2D u_particles;
@@ -186,14 +186,14 @@
186
186
  gl_FragColor = vec4(
187
187
  fract(pos * 255.0),
188
188
  floor(pos * 255.0) / 255.0);
189
- }`);class Pe{constructor(e="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNseTVudHJzYzAwNWUwbHBsZHkyaDRqczMiLCJyb2xlIjoxLCJuYW1lIjoiZmFrZUBvcm13eC5jb20iLCJwbGF0SWQiOiJnZDBtdDFkIiwiY29tcGFueSI6eyJpZCI6bnVsbCwiY2hpbGRyZW4iOltdfSwiaWF0IjoxNzIzMDI0MDI0LCJleHAiOjM5MzA1NDQwMjR9.RrKcdcMnq-FxBLJQ-i6lx2FscDE46y8EvHIemPW4HTg"){P(this,"token");P(this,"mapboxCustomer");P(this,"i4");P(this,"hi");P(this,"td");P(this,"windy");this.token=e,this.mapboxCustomer={source:this.initialOnlineStyle().sources.composite,layers:{water:{id:"water",type:"fill",source:"composite","source-layer":"water",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},paint:{"fill-color":"hsl(205, 75%, 70%)"}},waterDeplth:{id:"water-depth",type:"fill",source:"composite","source-layer":"depth",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},maxzoom:8,paint:{"fill-antialias":!1,"fill-color":["interpolate",["linear"],["zoom"],6,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0.35)",200,"hsla(205, 75%, 63%, 0.35)",7e3,"hsla(205, 75%, 56%, 0.35)"],8,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0)",200,"hsla(205, 75%, 63%, 0)",7e3,"hsla(205, 75%, 53%, 0)"]]}},countryBoundary:{id:"country-boundaries",type:"fill",source:"composite","source-layer":"country_boundaries",layout:{visibility:"visible"},paint:{"fill-color":"#d9d8d8"}},countryAdmin0BoundaryBg:{id:"admin-0-boundary-bg",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-width":["interpolate",["linear"],["zoom"],3,4,12,8],"line-color":"rgb(193, 190, 190)","line-opacity":["interpolate",["linear"],["zoom"],3,0,4,.5],"line-blur":["interpolate",["linear"],["zoom"],3,0,12,2]}},countryAdmin0Boundary:{id:"admin-0-boundary",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","admin_level"],0],["==",["get","disputed"],"false"],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-color":"rgb(114, 110, 111)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[2,0]],7,["literal",[2,2,6,2]]]}},countryAdmin0BoundaryDisputed:{id:"admin-0-boundary-disputed",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","disputed"],"true"],["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-color":"rgb(95, 93, 94)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[3,2,5]],7,["literal",[2,1.5]]]}},countryLabel:{id:"country-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},layout:{visibility:"visible","text-field":["coalesce",["get","name_en"],["get","name"]],"text-line-height":1.1,"text-max-width":6,"text-font":["HelveticaNeueThin"],"text-radial-offset":["step",["zoom"],.6,8,0],"text-justify":["step",["zoom"],["match",["get","text_anchor"],["left","bottom-left","top-left"],"left",["right","bottom-right","top-right"],"right","center"],7,"auto"],"text-size":["interpolate",["cubic-bezier",.2,0,.7,1],["zoom"],1,["step",["get","symbolrank"],11,4,9,5,8],9,["step",["get","symbolrank"],22,4,19,5,17]]},paint:{"text-color":"rgba(255,255,255,0)"}}}},this.td={source:{type:"raster",tiles:["https://t0.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t1.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t2.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t3.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t4.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t5.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t6.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t7.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8"],tileSize:256},layer:{id:"td",type:"raster",source:"td",layout:{visibility:"visible"}}},this.i4={source:{type:"raster",tiles:["https://osshz.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz1.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz2.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz3.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz4.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz5.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz6.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz7.idmwx.com/nautical/{z}/{x}/{y}.png"],tileSize:256},layer:{id:"i4",type:"raster",source:"i4",layout:{visibility:"none"}}},this.hi={source:{type:"raster",tiles:[`https://assist0.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist1.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist2.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist3.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist4.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist5.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist6.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist7.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`],tileSize:256},layer:{id:"hi",type:"raster",source:"hi",layout:{visibility:"none"}}},this.windy={darkmap:{source:{type:"raster",tiles:["https://tiles.windy.com/tiles/v10.0/darkmap/{z}/{x}/{y}.png"],tileSize:256},layer:{id:"darkmap",type:"raster",source:"darkmap",layout:{visibility:"none"}}},grayland:{source:{type:"raster",tiles:["https://tiles.windy.com/tiles/v9.0/grayland/{z}/{x}/{y}.png"],tileSize:256},layer:{id:"grayland",type:"raster",source:"grayland",layout:{visibility:"none"},paint:{"raster-opacity":1}}}}}initialOnlineStyle(){return{version:8,name:"map-weather-v2.0.0",metadata:{"mapbox:print":{width:8.5,height:11,units:"in",format:"png",resolution:300},"mapbox:type":"default","mapbox:trackposition":!0,"mapbox:autocomposite":!0,"mapbox:sdk-support":{android:"11.0.0",ios:"11.0.0",js:"3.0.0"},"mapbox:origin":"outdoors-v12","mapbox:groups":{"Terrain, terrain-labels":{name:"Terrain, terrain-labels",collapsed:!0},"Administrative boundaries, admin":{name:"Administrative boundaries, admin",collapsed:!1},"Land & water, built":{name:"Land & water, built",collapsed:!1},"Terrain, surface":{name:"Terrain, surface",collapsed:!0},"Land & water, land":{name:"Land & water, land",collapsed:!1},"Natural features, natural-labels":{name:"Natural features, natural-labels",collapsed:!0},"Walking, cycling, etc., barriers-bridges":{name:"Walking, cycling, etc., barriers-bridges",collapsed:!0},"Place labels, place-labels":{name:"Place labels, place-labels",collapsed:!1},"Transit, ferries":{name:"Transit, ferries",collapsed:!0},"Transit, elevated":{name:"Transit, elevated",collapsed:!0},"Walking, cycling, etc., tunnels":{name:"Walking, cycling, etc., tunnels",collapsed:!0},"Terrain, land":{name:"Terrain, land",collapsed:!0},"Road network, tunnels-case":{name:"Road network, tunnels-case",collapsed:!0},"Walking, cycling, etc., walking-cycling-labels":{name:"Walking, cycling, etc., walking-cycling-labels",collapsed:!0},"Walking, cycling, etc., surface":{name:"Walking, cycling, etc., surface",collapsed:!0},"Road network, surface-icons":{name:"Road network, surface-icons",collapsed:!0},"Land & water, water":{name:"Land & water, water",collapsed:!1}}},lights:[],fog:{color:"#ffffff",range:[.5,10],"high-color":"#245cdf","space-color":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"horizon-blend":["interpolate",["linear"],["zoom"],4,.2,7,.1],"star-intensity":["interpolate",["linear"],["zoom"],5,.35,6,0],"vertical-range":[0,0]},center:[80.02170408691855,17.83215724225399],zoom:2.4589703839156347,bearing:0,pitch:1,sprite:"mapbox://sprites/neatchenheng/clxwst0tq00wd01rn0usb2eer/3hcvufdre7i2yn9nbkvi9f9xi",glyphs:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf",projection:{name:"equirectangular"},sources:{composite:{type:"vector",url:"mapbox://mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2,mapbox.mapbox-bathymetry-v2,mapbox.country-boundaries-v1",data:{attribution:'<a href="https://www.mapbox.com/about/maps/" target="_blank" title="Mapbox" aria-label="Mapbox">&copy; Mapbox</a> <a href="https://www.openstreetmap.org/about/" target="_blank" title="OpenStreetMap" aria-label="OpenStreetMap">&copy; OpenStreetMap</a> <a href="https://www.mapbox.com/about/maps/" target="_blank" title="Mapbox" aria-label="Mapbox">&copy; Mapbox</a> <a href="https://www.openstreetmap.org/about/" target="_blank" title="OpenStreetMap" aria-label="OpenStreetMap">&copy; OpenStreetMap</a> <a class="mapbox-improve-map" href="https://www.mapbox.com/contribute/" target="_blank" title="Improve this map" aria-label="Improve this map">Improve this map</a>',bounds:[-180,-85.051129,180,85],center:[0,-.025564500000001544,0],description:"Global polygon tileset of country boundaries and disputed areas",format:"pbf",language_options:{ar:"Arabic",ca:"Catalan",cs:"Czech",da:"Danish",de:"German",el:"Greek",en:"English",es:"Spanish",fa:"Farsi",fi:"Finnish",fr:"French",he:"Hebrew",hu:"Hungarian",id:"Indonesian",it:"Italian",ja:"Japanese",ka:"Georgian",ko:"Korean",local:"Renderable local language",lv:"Latvian",ms:"Malay",nb:"Norwegian Bokmål",nl:"Dutch",no:"Norwegian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sk:"Slovak",sl:"Slovenian",sr:"Serbian",sv:"Swedish",th:"Thai",tl:"Tagalog",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese","zh-Hans":"Simplified Chinese","zh-Hant":"Traditional Chinese"},mapbox_logo:!0,maskLevel:9,maxzoom:16,minzoom:0,mts:!0,name:"Mapbox Countries v1 + Mapbox Bathymetry v2 + Mapbox Terrain v2 + Mapbox Streets v8",scheme:"xyz",tilejson:"2.2.0",tiles:["https://a.tiles.mapbox.com/v4/mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2,mapbox.mapbox-bathymetry-v2,mapbox.country-boundaries-v1/{z}/{x}/{y}.vector.pbf?access_token=pk.eyJ1IjoibmVhdGNoZW5oZW5nIiwiYSI6ImNsdXM3cnBmODBsemgycW1vaXc1bjV6bXMifQ.w6fqHGRbhNhLvm0LnX4ZVw","https://b.tiles.mapbox.com/v4/mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2,mapbox.mapbox-bathymetry-v2,mapbox.country-boundaries-v1/{z}/{x}/{y}.vector.pbf?access_token=pk.eyJ1IjoibmVhdGNoZW5oZW5nIiwiYSI6ImNsdXM3cnBmODBsemgycW1vaXc1bjV6bXMifQ.w6fqHGRbhNhLvm0LnX4ZVw"],vector_layers:[{id:"landuse",minzoom:5,source:"mapbox.mapbox-streets-v8"},{id:"waterway",minzoom:7,source:"mapbox.mapbox-streets-v8"},{id:"water",minzoom:0,source:"mapbox.mapbox-streets-v8"},{id:"aeroway",minzoom:9,source:"mapbox.mapbox-streets-v8"},{id:"structure",minzoom:13,source:"mapbox.mapbox-streets-v8"},{id:"building",minzoom:12,source:"mapbox.mapbox-streets-v8"},{id:"landuse_overlay",minzoom:5,source:"mapbox.mapbox-streets-v8"},{id:"road",minzoom:3,source:"mapbox.mapbox-streets-v8"},{id:"admin",minzoom:0,source:"mapbox.mapbox-streets-v8"},{id:"place_label",minzoom:0,source:"mapbox.mapbox-streets-v8"},{id:"airport_label",minzoom:8,source:"mapbox.mapbox-streets-v8"},{id:"transit_stop_label",minzoom:5,source:"mapbox.mapbox-streets-v8"},{id:"natural_label",minzoom:0,source:"mapbox.mapbox-streets-v8"},{id:"poi_label",minzoom:6,source:"mapbox.mapbox-streets-v8"},{id:"motorway_junction",minzoom:9,source:"mapbox.mapbox-streets-v8"},{id:"housenum_label",minzoom:16,source:"mapbox.mapbox-streets-v8"},{id:"landcover",maxzoom:22,minzoom:0,source:"mapbox.mapbox-terrain-v2"},{id:"hillshade",maxzoom:22,minzoom:0,source:"mapbox.mapbox-terrain-v2"},{id:"contour",maxzoom:22,minzoom:0,source:"mapbox.mapbox-terrain-v2"},{id:"depth",maxzoom:7,minzoom:0,source:"mapbox.mapbox-bathymetry-v2"},{id:"country_boundaries",maxzoom:22,minzoom:0,source:"mapbox.country-boundaries-v1"}],worldview_default:"US",worldview_options:{AR:"Argentina",CN:"China",IN:"India",JP:"Japan",MA:"Morocco",RS:"Serbia",RU:"Russia",TR:"Turkey",US:"United States"}}}},layers:[{id:"land",type:"background",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},paint:{"background-color":"rgb(171, 174, 172)"}},{id:"landcover",type:"fill",source:"composite","source-layer":"landcover",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},maxzoom:12,paint:{"fill-color":["match",["get","class"],"wood","hsl(0, 0%, 69%)","scrub","hsl(0, 0%, 69%)","crop","hsl(0, 0%, 69%)","grass","hsl(0, 0%, 69%)","snow","hsl(0, 0%, 69%)","hsl(0, 0%, 69%)"],"fill-opacity":["interpolate",["exponential",1.5],["zoom"],8,.8,12,0],"fill-antialias":!1}},{id:"national-park",type:"fill",source:"composite","source-layer":"landuse_overlay",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},minzoom:5,filter:["==",["get","class"],"national_park"],paint:{"fill-color":"hsl(98, 38%, 68%)","fill-opacity":["interpolate",["linear"],["zoom"],5,0,6,.6,12,.2]}},{id:"national-park_tint-band",type:"line",source:"composite","source-layer":"landuse_overlay",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},minzoom:9,filter:["==",["get","class"],"national_park"],paint:{"line-color":"hsl(98, 38%, 68%)","line-width":["interpolate",["exponential",1.5],["zoom"],9,1,14,8],"line-blur":["interpolate",["exponential",1.5],["zoom"],9,1,14,8]}},{id:"landuse",type:"fill",source:"composite","source-layer":"landuse",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},minzoom:5,filter:["all",[">=",["to-number",["get","sizerank"]],0],["match",["get","class"],["agriculture","wood","grass","scrub","glacier","pitch","sand"],["step",["zoom"],!1,11,!0],"residential",["step",["zoom"],!0,10,!1],["park","airport"],["step",["zoom"],!1,8,["case",["==",["get","sizerank"],1],!0,!1],10,!0],["facility","industrial"],["step",["zoom"],!1,12,!0],"rock",["step",["zoom"],!1,11,!0],"cemetery",["step",["zoom"],!1,11,!0],"school",["step",["zoom"],!1,11,!0],"hospital",["step",["zoom"],!1,11,!0],"commercial_area",["step",["zoom"],!1,11,!0],!1],["<=",["-",["to-number",["get","sizerank"]],["interpolate",["exponential",1.5],["zoom"],12,0,18,14]],14]],paint:{"fill-color":["interpolate",["linear"],["zoom"],15,["match",["get","class"],"wood","hsla(103, 50%, 60%, 0.8)","scrub","hsla(98, 47%, 68%, 0.6)","agriculture","hsla(98, 50%, 74%, 0.6)","park",["match",["get","type"],["garden","playground","zoo"],"hsl(98, 38%, 68%)","hsl(98, 55%, 70%)"],"grass","hsla(98, 50%, 74%, 0.6)","airport","hsl(230, 40%, 82%)","cemetery","hsl(98, 45%, 75%)","glacier","hsl(205, 45%, 95%)","hospital","hsl(20, 45%, 82%)","pitch","hsl(88, 65%, 75%)","sand","hsl(69, 60%, 72%)","rock","hsl(60, 0%, 85%)","school","hsl(40, 45%, 78%)","commercial_area","hsl(55, 45%, 85%)","residential","hsl(60, 7%, 87%)",["facility","industrial"],"hsl(230, 20%, 85%)","hsl(60, 12%, 72%)"],16,["match",["get","class"],"wood","hsla(103, 50%, 60%, 0.8)","scrub","hsla(98, 47%, 68%, 0.6)","agriculture","hsla(98, 50%, 74%, 0.6)","park",["match",["get","type"],["garden","playground","zoo"],"hsl(98, 38%, 68%)","hsl(98, 55%, 70%)"],"grass","hsla(98, 50%, 74%, 0.6)","airport","hsl(230, 40%, 82%)","cemetery","hsl(98, 45%, 75%)","glacier","hsl(205, 45%, 95%)","hospital","hsl(20, 45%, 82%)","pitch","hsl(88, 65%, 75%)","sand","hsl(69, 60%, 72%)","rock","hsla(60, 0%, 85%, 0.5)","school","hsl(40, 45%, 78%)","commercial_area","hsla(55, 45%, 85%, 0.5)",["facility","industrial"],"hsl(230, 20%, 85%)","hsl(60, 12%, 72%)"]],"fill-opacity":["interpolate",["linear"],["zoom"],8,["match",["get","class"],"residential",.8,.2],10,["match",["get","class"],"residential",0,1]],"fill-antialias":!1}},{id:"pitch-outline",type:"line",source:"composite","source-layer":"landuse",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},minzoom:15,filter:["==",["get","class"],"pitch"],paint:{"line-color":"hsl(0, 0%, 69%)"}},{id:"waterway-shadow",type:"line",source:"composite","source-layer":"waterway",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:10,layout:{"line-cap":["step",["zoom"],"butt",11,"round"],"line-join":["step",["zoom"],"miter",11,"round"]},paint:{"line-color":"hsl(224, 79%, 69%)","line-width":["interpolate",["exponential",1.3],["zoom"],9,["match",["get","class"],["canal","river"],.1,0],20,["match",["get","class"],["canal","river"],8,3]],"line-translate":["interpolate",["exponential",1.2],["zoom"],7,["literal",[0,0]],16,["literal",[-1,-1]]],"line-translate-anchor":"viewport","line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"water-shadow",type:"fill",source:"composite","source-layer":"water",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:10,paint:{"fill-color":"hsl(224, 79%, 69%)","fill-translate":["interpolate",["exponential",1.2],["zoom"],7,["literal",[0,0]],16,["literal",[-1,-1]]],"fill-translate-anchor":"viewport"}},{id:"waterway",type:"line",source:"composite","source-layer":"waterway",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:8,layout:{"line-cap":["step",["zoom"],"butt",11,"round"],"line-join":["step",["zoom"],"miter",11,"round"]},paint:{"line-color":"hsl(205, 75%, 70%)","line-width":["interpolate",["exponential",1.3],["zoom"],9,["match",["get","class"],["canal","river"],.1,0],20,["match",["get","class"],["canal","river"],8,3]],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"water",type:"fill",source:"composite","source-layer":"water",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},paint:{"fill-color":"hsl(205, 75%, 70%)"}},{id:"water-depth",type:"fill",source:"composite","source-layer":"depth",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},maxzoom:8,paint:{"fill-antialias":!1,"fill-color":["interpolate",["linear"],["zoom"],6,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0.35)",200,"hsla(205, 75%, 63%, 0.35)",7e3,"hsla(205, 75%, 56%, 0.35)"],8,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0)",200,"hsla(205, 75%, 63%, 0)",7e3,"hsla(205, 75%, 53%, 0)"]]}},{id:"wetland",type:"fill",source:"composite","source-layer":"landuse_overlay",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:5,filter:["match",["get","class"],["wetland","wetland_noveg"],!0,!1],paint:{"fill-color":"hsl(194, 38%, 74%)","fill-opacity":["interpolate",["linear"],["zoom"],10,.25,10.5,.15]}},{id:"wetland-pattern",type:"fill",source:"composite","source-layer":"landuse_overlay",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:5,filter:["match",["get","class"],["wetland","wetland_noveg"],!0,!1],paint:{"fill-color":"hsl(194, 38%, 74%)","fill-opacity":["interpolate",["linear"],["zoom"],10,0,10.5,1],"fill-pattern":"wetland","fill-translate-anchor":"viewport"}},{id:"land-structure-polygon",type:"fill",source:"composite","source-layer":"structure",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, built"},minzoom:13,filter:["all",["==",["get","class"],"land"],["==",["geometry-type"],"Polygon"]],paint:{"fill-color":"hsl(0, 0%, 69%)"}},{id:"land-structure-line",type:"line",source:"composite","source-layer":"structure",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, built"},minzoom:13,filter:["all",["==",["get","class"],"land"],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"square"},paint:{"line-width":["interpolate",["exponential",1.99],["zoom"],14,.75,20,40],"line-color":"hsl(60, 20%, 85%)"}},{id:"country-boundaries",type:"fill",source:"composite","source-layer":"country_boundaries",paint:{"fill-color":["interpolate",["linear"],["zoom"],0,"rgb(171, 174, 172)",22,"rgb(171, 174, 172)"]}},{id:"admin-0-boundary-bg",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-width":["interpolate",["linear"],["zoom"],3,4,12,8],"line-color":"rgb(193, 190, 190)","line-opacity":["interpolate",["linear"],["zoom"],3,0,4,.5],"line-blur":["interpolate",["linear"],["zoom"],3,0,12,2]}},{id:"admin-0-boundary",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","admin_level"],0],["==",["get","disputed"],"false"],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-color":"rgb(114, 110, 111)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[2,0]],7,["literal",[2,2,6,2]]]}},{id:"admin-0-boundary-disputed",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","disputed"],"true"],["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-color":"rgb(95, 93, 94)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[3,2,5]],7,["literal",[2,1.5]]]}},{id:"waterway-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:13,filter:["all",["match",["get","class"],["canal","river","stream","disputed_canal","disputed_river","disputed_stream"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],layout:{"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"text-max-angle":30,"symbol-spacing":["interpolate",["linear",1],["zoom"],15,250,17,400],"text-size":["interpolate",["linear"],["zoom"],13,12,18,18],"symbol-placement":"line","text-pitch-alignment":"viewport","text-field":["coalesce",["get","name_en"],["get","name"]],visibility:"none"},paint:{"text-color":"hsl(205, 43%, 90%)","text-halo-color":"hsla(60, 17%, 84%, 0.5)"}},{id:"natural-line-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:4,filter:["all",["match",["get","class"],["glacier","landform","disputed_glacier","disputed_landform"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],4],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],layout:{"text-size":["step",["zoom"],["step",["get","sizerank"],18,5,12],17,["step",["get","sizerank"],18,13,12]],"text-max-angle":30,"text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"symbol-placement":"line-center","text-pitch-alignment":"viewport",visibility:"none"},paint:{"text-halo-width":.5,"text-halo-color":"hsl(60, 17%, 84%)","text-halo-blur":.5,"text-color":"hsl(340, 10%, 38%)"}},{id:"natural-point-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:4,filter:["all",["match",["get","class"],["dock","glacier","landform","water_feature","wetland","disputed_dock","disputed_glacier","disputed_landform","disputed_water_feature","disputed_wetland"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],4],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"Point"]],layout:{"text-size":["step",["zoom"],["step",["get","sizerank"],18,5,12],17,["step",["get","sizerank"],18,13,12]],"icon-image":["case",["has","maki_beta"],["coalesce",["image",["get","maki_beta"]],["image",["get","maki"]]],["image",["get","maki"]]],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-offset":["step",["zoom"],["step",["get","sizerank"],["literal",[0,0]],5,["literal",[0,.8]]],17,["step",["get","sizerank"],["literal",[0,0]],13,["literal",[0,.8]]]],"text-anchor":["step",["zoom"],["step",["get","sizerank"],"center",5,"top"],17,["step",["get","sizerank"],"center",13,"top"]],"text-field":["coalesce",["get","name_en"],["get","name"]],visibility:"none"},paint:{"icon-opacity":["step",["zoom"],["step",["get","sizerank"],0,5,1],17,["step",["get","sizerank"],0,13,1]],"text-halo-color":"hsl(60, 20%, 98%)","text-halo-width":.5,"text-halo-blur":.5,"text-color":"hsl(340, 10%, 38%)"}},{id:"water-line-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:1,filter:["all",["match",["get","class"],["bay","ocean","reservoir","sea","water","disputed_bay","disputed_ocean","disputed_reservoir","disputed_sea","disputed_water"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],layout:{"text-size":["interpolate",["linear"],["zoom"],0,["*",["-",16,["sqrt",["get","sizerank"]]],1],22,["*",["-",22,["sqrt",["get","sizerank"]]],1]],"text-max-angle":30,"text-letter-spacing":["match",["get","class"],"ocean",.25,["sea","bay"],.15,0],"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"symbol-placement":"line-center","text-pitch-alignment":"viewport","text-field":["coalesce",["get","name_en"],["get","name"]],visibility:"none"},paint:{"text-color":["match",["get","class"],["bay","ocean","sea"],"hsl(205, 71%, 90%)","hsl(205, 43%, 90%)"],"text-halo-color":"hsla(60, 17%, 84%, 0.5)"}},{id:"water-point-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:1,filter:["all",["match",["get","class"],["bay","ocean","reservoir","sea","water","disputed_bay","disputed_ocean","disputed_reservoir","disputed_sea","disputed_water"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"Point"]],layout:{"text-line-height":1.3,"text-size":["interpolate",["linear"],["zoom"],0,["*",["-",16,["sqrt",["get","sizerank"]]],1],22,["*",["-",22,["sqrt",["get","sizerank"]]],1]],"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-letter-spacing":["match",["get","class"],"ocean",.25,["bay","sea"],.15,.01],"text-max-width":["match",["get","class"],"ocean",4,"sea",5,["bay","water"],7,10],visibility:"none"},paint:{"text-color":["match",["get","class"],["bay","ocean","sea"],"hsl(205, 71%, 90%)","hsl(205, 43%, 90%)"],"text-halo-color":"hsla(60, 17%, 84%, 0.5)"}},{id:"settlement-subdivision-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:10,maxzoom:15,filter:["all",["match",["get","class"],["settlement_subdivision","disputed_settlement_subdivision"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],3],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-transform":"uppercase","text-font":["DIN Pro Regular","Arial Unicode MS Regular"],"text-letter-spacing":["match",["get","type"],"suburb",.15,.05],"text-max-width":7,"text-padding":3,"text-size":["interpolate",["cubic-bezier",.5,0,1,1],["zoom"],11,["match",["get","type"],"suburb",11,10.5],15,["match",["get","type"],"suburb",15,14]],visibility:"none"},paint:{"text-halo-color":"hsla(60, 25%, 100%, 0.75)","text-halo-width":1,"text-color":"hsl(230, 29%, 36%)","text-halo-blur":.5}},{id:"settlement-minor-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:2,maxzoom:13,filter:["all",["<=",["get","filterrank"],3],["match",["get","class"],["settlement","disputed_settlement"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["zoom"],[">",["get","symbolrank"],6],4,[">=",["get","symbolrank"],7],6,[">=",["get","symbolrank"],8],7,[">=",["get","symbolrank"],10],10,[">=",["get","symbolrank"],11],11,[">=",["get","symbolrank"],13],12,[">=",["get","symbolrank"],15]],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-line-height":1.1,"text-size":["interpolate",["cubic-bezier",.2,0,.9,1],["zoom"],3,["step",["get","symbolrank"],11,9,10],6,["step",["get","symbolrank"],14,9,12,12,10],8,["step",["get","symbolrank"],16,9,14,12,12,15,10],13,["step",["get","symbolrank"],22,9,20,12,16,15,14]],"text-radial-offset":["step",["zoom"],["match",["get","capital"],2,.6,.55],8,0],"symbol-sort-key":["get","symbolrank"],"icon-image":["step",["zoom"],["case",["==",["get","capital"],2],"border-dot-13",["step",["get","symbolrank"],"dot-11",9,"dot-10",11,"dot-9"]],8,""],"text-font":["DIN Pro Regular","Arial Unicode MS Regular"],"text-justify":"auto",visibility:"none","text-anchor":["step",["zoom"],["get","text_anchor"],8,"center"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-max-width":7},paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-halo-blur":1}},{id:"settlement-major-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:2,maxzoom:15,filter:["all",["<=",["get","filterrank"],3],["match",["get","class"],["settlement","disputed_settlement"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["zoom"],!1,2,["<=",["get","symbolrank"],6],4,["<",["get","symbolrank"],7],6,["<",["get","symbolrank"],8],7,["<",["get","symbolrank"],10],10,["<",["get","symbolrank"],11],11,["<",["get","symbolrank"],13],12,["<",["get","symbolrank"],15],13,[">=",["get","symbolrank"],11],14,[">=",["get","symbolrank"],15]],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-line-height":1.1,"text-size":["interpolate",["cubic-bezier",.2,0,.9,1],["zoom"],3,["step",["get","symbolrank"],13,6,11],6,["step",["get","symbolrank"],18,6,16,7,14],8,["step",["get","symbolrank"],20,9,16,10,14],15,["step",["get","symbolrank"],24,9,20,12,16,15,14]],"text-radial-offset":["step",["zoom"],["match",["get","capital"],2,.6,.55],8,0],"symbol-sort-key":["get","symbolrank"],"icon-image":["step",["zoom"],["case",["==",["get","capital"],2],"border-dot-13",["step",["get","symbolrank"],"dot-11",9,"dot-10",11,"dot-9"]],8,""],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-justify":["step",["zoom"],["match",["get","text_anchor"],["left","bottom-left","top-left"],"left",["right","bottom-right","top-right"],"right","center"],8,"center"],visibility:"none","text-anchor":["step",["zoom"],["get","text_anchor"],8,"center"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-max-width":7},paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-halo-blur":1}},{id:"state-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:3,maxzoom:9,filter:["all",["match",["get","class"],["state","disputed_state"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-size":["interpolate",["cubic-bezier",.85,.7,.65,1],["zoom"],4,["step",["get","symbolrank"],9,6,8,7,7],9,["step",["get","symbolrank"],21,6,16,7,14]],"text-transform":"uppercase","text-font":["DIN Pro Bold","Arial Unicode MS Bold"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-letter-spacing":.15,"text-max-width":6,visibility:"none"},paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-opacity":.5}},{id:"country-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:1,maxzoom:10,filter:["all",["match",["get","class"],["country","disputed_country"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-line-height":1.1,"text-max-width":6,"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-radial-offset":["step",["zoom"],.6,8,0],"text-justify":["step",["zoom"],["match",["get","text_anchor"],["left","bottom-left","top-left"],"left",["right","bottom-right","top-right"],"right","center"],7,"auto"],"text-size":["interpolate",["cubic-bezier",.2,0,.7,1],["zoom"],1,["step",["get","symbolrank"],11,4,9,5,8],9,["step",["get","symbolrank"],22,4,19,5,17]]},paint:{"icon-opacity":["step",["zoom"],["case",["has","text_anchor"],1,0],7,0],"text-color":"hsl(230, 29%, 0%)","text-halo-color":["interpolate",["linear"],["zoom"],2,"hsla(60, 25%, 100%, 0.75)",3,"hsl(60, 25%, 100%)"],"text-halo-width":1.25}},{id:"continent-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:.75,maxzoom:3,filter:["==",["get","class"],"continent"],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-line-height":1.1,"text-max-width":6,"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",.5],["zoom"],0,10,2.5,15],"text-transform":"uppercase","text-letter-spacing":.05,visibility:"none"},paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":["interpolate",["linear"],["zoom"],0,"hsla(60, 25%, 100%, 0.75)",3,"hsl(60, 25%, 100%)"],"text-halo-width":1.5,"text-opacity":["interpolate",["linear"],["zoom"],0,.8,1.5,.5,2.5,0]}}]}}}const ri="",wt={name:"IdmWindParticle",props:{factor:{type:Object},viewport:{type:_e},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Z,etime:void 0,wrapper:void 0,animation:void 0,particleContext:void 0,particleTexture:void 0,particleOptions:{fadeOpacity:.9,speedFactor:.25,dropRate:.003,dropRateBump:.01,uvRange:[-25,26],sRange:[0,31.985]},paused:!1,initial:!0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a;this.right=(((a=document.getElementsByClassName("right-bar")[0])==null?void 0:a.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[wind-particle] add elapsed: ",t,", total: ",e+=t)}},handleClear(){var a,e,t,o,i,s,n,l;(a=this.viewport)==null||a.toggle(!1),(e=this.viewport)==null||e.toggleParticle(!1),this.context=void 0,this.particleContext=void 0,this.etime=void 0,this.initial=!0,(o=(t=this.viewport)==null?void 0:t.map)==null||o.off("resize",this.handleResize),(s=(i=this.viewport)==null?void 0:i.map)==null||s.off("movestart",this.handlePause),(l=(n=this.viewport)==null?void 0:n.map)==null||l.off("moveend",this.handlePlay),this.handlePause()},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0,"rgb(98, 113, 184, 0.8)"],[12/255,"rgb(98, 113, 184)"],[24/255,"rgb(61, 110, 163)"],[32/255,"rgb(74, 146, 148)"],[40/255,"rgb(77, 142, 124)"],[60/255,"rgb(76, 164, 76)"],[80/255,"rgb(103, 164, 54)"],[100/255,"rgb(162, 135, 64)"],[120/255,"rgb(162, 109, 92)"],[140/255,"rgb(141, 63, 92)"],[160/255,"rgb(151, 75, 145)"],[200/255,"rgb(95, 100, 160)"],[240/255,"rgb(91, 136, 161)"],[1,"rgb(91, 136, 161)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,T.vertexSchema,T.uvFragmentSchema);this.program=e,this.aPositionBuffer=t}this.handleParticleSetup()},handleParticleSetup(){if(!this.particleContext){this.particleContext=this.viewport.particleCanvas.getContext("webgl");const a=[[0,"rgb(183,224,224)"],[1,"rgb(217,220,220)"]];this.wrapper=this.webgl.bindParticle(this.particleContext,I.vertexSchema,I.fragmentSchema,I.quadVertSchema,I.screenFragmentSchema,I.updateFragmentSchema),this.wrapper.color=this.webgl.setup(this.particleContext,a,!0,16,16),this.wrapper={...this.wrapper,...this.webgl.setupParticle(this.particleContext,9e3),...this.webgl.resize(this.viewport,this.particleContext)},this.viewport.map.on("resize",this.handleResize),this.viewport.map.on("movestart",this.handlePause),this.viewport.map.on("moveend",this.handlePlay)}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,a),this.particleTexture=this.webgl.createTexture(this.particleContext,this.particleContext.NEAREST,this.particleContext.LINEAR,this.particleContext.CLAMP_TO_EDGE,a),this.wrapper.image=a}this.initial&&(this.initial=!1,this.handlePlay()),this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer,this.particleOptions),this.viewport.toggle(!0)},handleResize(){this.wrapper={...this.wrapper,...this.webgl.resize(this.viewport,this.particleContext)}},handlePause(){this.paused=!0,this.animation&&(cancelAnimationFrame(this.animation),this.viewport.toggleParticle(!1))},handlePlay(){this.paused=!1,this.animation=requestAnimationFrame(()=>{this.webgl.drawParticle(this.viewport,this.particleContext,this.particleTexture,this.wrapper,this.particleOptions),this.viewport.toggleParticle(!0),this.handlePlay()})}}},vt={key:0};function xt(a,e,t,o,i,s){var n;return(n=t.factor)!=null&&n.active?(r.openBlock(),r.createElementBlock("div",vt,[r.createElementVNode("div",{class:"legend-bars flex-center",style:r.normalizeStyle([{position:"absolute"},{right:i.right+"px",bottom:t.bottom}])},e[0]||(e[0]=[r.createElementVNode("span",null,"kts",-1),r.createElementVNode("span",null,"0",-1),r.createElementVNode("span",null,"5",-1),r.createElementVNode("span",null,"10",-1),r.createElementVNode("span",null,"20",-1),r.createElementVNode("span",null,"30",-1),r.createElementVNode("span",null,"40",-1),r.createElementVNode("span",null,"60",-1)]),4)])):r.createCommentVNode("",!0)}const _t=k(wt,[["render",xt],["__scopeId","data-v-24e5434b"]]),ii="",Ct={name:"IdmCurrent",props:{map:{type:Object},current:{type:Object},beforeLayer:{type:String},mapProjection:{type:String},showCurrentParticle:{type:Boolean,default:!1},showCurrentIsoband:{type:Boolean,default:!1},marginBottom:{type:String,default:"30px"},toggleVersion:{type:Number}},emits:["particle","handleToggleVersion"],data(){return{source:"current-source",directionLayer:"current-direction-layer",speedLayer:"current-speed-layer",speedLabelLayer:"current-speed-label-layer",empty:x.featureCollection([]),right:10,bottom:95}},watch:{"current.version":{handler(){var a;(a=this.current)!=null&&a.active?this.handleRender():this.handleClear(),this.$emit("handleToggleVersion")},deep:!0},showCurrentParticle:{handler(){this.handleParticle()}},showCurrentIsoband:{handler(){this.handleToggle()}}},methods:{handleParticle(){this.$emit("particle",{particle:this.showCurrentParticle,key:"current",weight:96})},handleRender(){var a,e;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.current){const t=new Date().valueOf();let o=0,i=0,s=this.empty;this.current.active&&(s=this.current.data),(a=this.map)!=null&&a.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(s),i=new Date().valueOf()-(t+o),console.log("[current] update elapsed: ",i,", total: ",o+=i)):(this.map.addSource(this.source,{type:"geojson",data:s}),this.map.addLayer({id:this.speedLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["step",["get","val"],"#e1ffb3",1,"#ffff00",3,"#ff9500",4,"#f44336",5,"#f44336"]}},this.beforeLayer),this.map.addLayer({id:this.speedLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Polygon"],layout:{"symbol-placement":"line","text-field":"{val} kts","text-allow-overlap":!0,"text-rotation-alignment":"viewport","text-size":12},paint:{"text-color":"rgba(0, 0, 0, 0.8)"}},this.beforeLayer),this.map.addLayer({id:this.directionLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-image":"arrow-red","icon-size":["interpolate",["linear"],["get","spd"],.5,.14,3,.28],"icon-offset":[0,-20],"icon-allow-overlap":!0,"icon-rotation-alignment":"map","icon-rotate":{property:"val",stops:[[0,0],[360,360]]}},paint:{"icon-opacity":.6}},this.beforeLayer),i=new Date().valueOf()-(t+o),console.log("[current] add elapsed: ",i,", total: ",o+=i)),this.handleToggle()}},handleToggle(){this.map.getLayer(this.speedLayer)&&this.map.setLayoutProperty(this.speedLayer,"visibility",this.showCurrentIsoband?"visible":"none"),this.map.getLayer(this.speedLabelLayer)&&this.map.setLayoutProperty(this.speedLabelLayer,"visibility",this.showCurrentIsoband?"visible":"none"),this.map.getLayer(this.directionLayer)&&this.map.setLayoutProperty(this.directionLayer,"visibility",this.showCurrentIsoband?"visible":"none")},handleClear(){this.map.getLayer(this.speedLayer)&&this.map.removeLayer(this.speedLayer),this.map.getLayer(this.speedLabelLayer)&&this.map.removeLayer(this.speedLabelLayer),this.map.getLayer(this.directionLayer)&&this.map.removeLayer(this.directionLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},kt={key:0};function St(a,e,t,o,i,s){var n;return(n=t.current)!=null&&n.active?(r.openBlock(),r.createElementBlock("div",kt)):r.createCommentVNode("",!0)}const Et=k(Ct,[["render",St]]),oi="",Pt={name:"IdmCurrentParticle",props:{factor:{type:Object},viewport:{type:_e},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Z,etime:void 0,wrapper:void 0,animation:void 0,particleContext:void 0,particleTexture:void 0,particleOptions:{fadeOpacity:.96,speedFactor:4,dropRate:.005,dropRateBump:.01,uvRange:[-2.5,2.6],sRange:[0,3]},paused:!1,initial:!0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a;this.right=(((a=document.getElementsByClassName("right-bar")[0])==null?void 0:a.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[current-particle] add elapsed: ",t,", total: ",e+=t)}},handleClear(){var a,e,t,o,i,s,n,l;(a=this.viewport)==null||a.toggle(!1),(e=this.viewport)==null||e.toggleParticle(!1),this.context=void 0,this.particleContext=void 0,this.etime=void 0,this.initial=!0,(o=(t=this.viewport)==null?void 0:t.map)==null||o.off("resize",this.handleResize),(s=(i=this.viewport)==null?void 0:i.map)==null||s.off("movestart",this.handlePause),(l=(n=this.viewport)==null?void 0:n.map)==null||l.off("moveend",this.handlePlay),this.handlePause()},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0/255,"rgba(95, 143, 197,1)"],[5/255,"rgba(64,127,115,1)"],[10/255,"rgb(58,164,58)"],[15/255,"rgb(191,182,67)"],[20/255,"rgb(197,154,68)"],[30/255,"rgb(160,70,94)"],[40/255,"rgb(138,84,166)"],[45/255,"rgb(82,113,165)"],[50/255,"rgb(84,142,152)"],[65/255,"rgb(150,181,184)"],[80/255,"rgb(195,194,194)"],[254/255,"rgb(195,194,194)"],[1,"rgb(195,194,194)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,T.vertexSchema,T.uvFragmentSchema);this.program=e,this.aPositionBuffer=t}this.handleParticleSetup()},handleParticleSetup(){if(!this.particleContext){this.particleContext=this.viewport.particleCanvas.getContext("webgl");const a=[[0,"rgb(183,224,224)"],[1,"rgb(199,202,202)"]];this.wrapper=this.webgl.bindParticle(this.particleContext,I.vertexSchema,I.fragmentSchema,I.quadVertSchema,I.screenFragmentSchema,I.updateFragmentSchema),this.wrapper.color=this.webgl.setup(this.particleContext,a,!0,16,16),this.wrapper={...this.wrapper,...this.webgl.setupParticle(this.particleContext,12e3),...this.webgl.resize(this.viewport,this.particleContext)},this.viewport.map.on("resize",this.handleResize),this.viewport.map.on("movestart",this.handlePause),this.viewport.map.on("moveend",this.handlePlay)}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,a),this.particleTexture=this.webgl.createTexture(this.particleContext,this.particleContext.NEAREST,this.particleContext.LINEAR,this.particleContext.CLAMP_TO_EDGE,a),this.wrapper.image=a}this.initial&&(this.initial=!1,this.handlePlay()),this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer,this.particleOptions),this.viewport.toggle(!0)},handleResize(){this.wrapper={...this.wrapper,...this.webgl.resize(this.viewport,this.particleContext)}},handlePause(){this.paused=!0,this.animation&&(cancelAnimationFrame(this.animation),this.viewport.toggleParticle(!1))},handlePlay(){this.paused=!1,this.animation=requestAnimationFrame(()=>{this.webgl.drawParticle(this.viewport,this.particleContext,this.particleTexture,this.wrapper,this.particleOptions),this.viewport.toggleParticle(!0),this.handlePlay()})}}},zt={key:0};function Nt(a,e,t,o,i,s){var n;return(n=t.factor)!=null&&n.active?(r.openBlock(),r.createElementBlock("div",zt,[r.createElementVNode("div",{class:"legend-bars flex-center",style:r.normalizeStyle([{position:"absolute"},{right:i.right+"px",bottom:t.bottom}])},e[0]||(e[0]=[r.createElementVNode("span",null,"kts",-1),r.createElementVNode("span",null,"0",-1),r.createElementVNode("span",null,"0.4",-1),r.createElementVNode("span",null,"0.8",-1),r.createElementVNode("span",null,"1.6",-1),r.createElementVNode("span",null,"2",-1),r.createElementVNode("span",null,"3.2",-1)]),4)])):r.createCommentVNode("",!0)}const Tt=k(Pt,[["render",Nt],["__scopeId","data-v-6d4fd206"]]),Vt={name:"IdmSigWave",props:{map:{type:Object},sigWave:{type:Object},beforeLayer:{type:String},activeWeatherLayers:{type:Array}},data(){return{source:"sig-wave-source",heightLayer:"sig-wave-height-layer",heightLabelLayer:"sig-wave-height-label-layer",empty:x.featureCollection([])}},watch:{"sigWave.version":{handler(){var a;(a=this.sigWave)!=null&&a.active?(this.handleRender(),this.handleMove()):this.handleClear()},deep:!0}},methods:{handleRender(){var a,e;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.sigWave){const t=new Date().valueOf();let o=0,i=0,s=this.empty;this.sigWave.active&&(s=this.sigWave.data),(a=this.map)!=null&&a.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(s),i=new Date().valueOf()-(t+o),console.log("[sig.wave] update elapsed: ",i,", total: ",o+=i)):(this.map.addSource(this.source,{type:"geojson",data:s}),this.map.addLayer({id:this.heightLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],layout:{"fill-sort-key":["get","val"]},paint:{"fill-outline-color":"#888","fill-opacity":.8,"fill-color":["step",["get","val"],"rgba(186,247,199,0.4)",3,"rgba(186,247,199,0.7)",4,"rgba(101,252,149,0.9)",5,"#b3ff6b",6,"#fee600",7,"#ffa200",8,"#ff6600",9,"#e23304",10,"#f80078",11,"#dc03d2",12,"#a603f8",13,"#7102ab"]}},this.beforeLayer),this.map.addLayer({id:this.heightLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Polygon"],layout:{"symbol-placement":"line","symbol-avoid-edges":!0,"symbol-sort-key":["get","val"],"text-field":"{val} m","text-rotation-alignment":"viewport","text-size":10},paint:{"text-opacity":.7}},this.beforeLayer),i=new Date().valueOf()-(t+o),console.log("[sig.wave] add elapsed: ",i,", total: ",o+=i))}},handleMove(){var a,e;(e=(a=this.map)==null?void 0:a.getLayer("country-boundaries"))==null||e.setLayoutProperty("visibility","visible"),this.map.getLayer(this.heightLayer)&&this.map.moveLayer(this.heightLayer,"country-boundaries"),this.map.getLayer(this.heightLabelLayer)&&this.map.moveLayer(this.heightLabelLayer,"country-boundaries")},handleClear(){var a,e,t;((a=this.activeWeatherLayers)==null?void 0:a.length)===0&&((t=(e=this.map)==null?void 0:e.getLayer("country-boundaries"))==null||t.setLayoutProperty("visibility","none")),this.map.getLayer(this.heightLayer)&&this.map.removeLayer(this.heightLayer),this.map.getLayer(this.heightLabelLayer)&&this.map.removeLayer(this.heightLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function It(a,e,t,o,i,s){return r.openBlock(),r.createElementBlock("div")}const Dt=k(Vt,[["render",It]]),Rt={name:"IdmSwell",props:{map:{type:Object},swell:{type:Object},beforeLayer:{type:String},activeWeatherLayers:{type:Array}},data(){return{source:"swell-source",directionLayer:"swell-direction-layer",heightLayer:"swell-height-layer",heightLabelLayer:"swell-height-label-layer",empty:x.featureCollection([])}},watch:{"swell.version":{handler(){var a;(a=this.swell)!=null&&a.active?(this.handleRender(),this.handleMove()):this.handleClear()},deep:!0},activeWeatherLayers:{handler(){setTimeout(()=>{this.activeWeatherLayers.length>0?this.handleMove():this.handleClear()},500)},deep:!0,immediate:!0}},methods:{handleRender(){var a,e;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.swell){const t=new Date().valueOf();let o=0,i=0,s=this.empty;this.swell.active&&(s=this.swell.data),(a=this.map)!=null&&a.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(s),i=new Date().valueOf()-(t+o),console.log("[swell] update elapsed: ",i,", total: ",o+=i)):(this.map.addSource(this.source,{type:"geojson",data:s}),this.map.addLayer({id:this.heightLayer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-opacity":1,"line-width":2,"line-color":["match",["get","val"],2,"rgba(255,255,0,0.9)",3,"rgba(255,149,0,0.9)",4,"rgba(244,67,54,0.9)",5,"rgba(162,2,31,0.9)",6,"rgba(162,2,31,0.9)","rgba(162,2,31,0.9)"]}},this.beforeLayer),this.map.addLayer({id:this.heightLabelLayer,type:"symbol",source:this.source,filter:["==","$type","LineString"],layout:{"symbol-placement":"line","text-rotation-alignment":"viewport","text-field":"{val}M","text-size":12},paint:{"text-color":["step",["get","val"],"black",4,"white",5,"white",6,"white"],"text-halo-color":["match",["get","val"],2,"rgba(255,255,0,0.7)",3,"rgba(255,149,0,0.7)",4,"rgba(244,67,54,0.7)",5,"rgba(162,13,2,0.7)",6,"rgba(162,13,2,0.7)","rgba(162,13,2,0.7)"],"text-halo-width":4}},this.beforeLayer),this.map.addLayer({id:this.directionLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-image":"arrow-yellow","icon-size":{base:1,stops:[[2,.14],[6,.28]]},"icon-offset":[0,-20],"icon-allow-overlap":!0,"icon-rotation-alignment":"map","icon-rotate":{property:"val",stops:[[0,180],[360,540]]}},paint:{"icon-opacity":.8}},this.beforeLayer),i=new Date().valueOf()-(t+o),console.log("[swell] add elapsed: ",i,", total: ",o+=i))}},handleMove(){var a,e;(e=(a=this.map)==null?void 0:a.getLayer("country-boundaries"))==null||e.setLayoutProperty("visibility","visible"),this.map.getLayer(this.heightLayer)&&this.map.moveLayer(this.heightLayer,"country-boundaries"),this.map.getLayer(this.directionLayer)&&this.map.moveLayer(this.directionLayer,"country-boundaries"),this.map.getLayer(this.heightLabelLayer)&&this.map.moveLayer(this.heightLabelLayer,"country-boundaries")},handleClear(){var a,e;this.activeWeatherLayers.length===0&&((e=(a=this.map)==null?void 0:a.getLayer("country-boundaries"))==null||e.setLayoutProperty("visibility","none")),this.map.getLayer(this.heightLayer)&&this.map.removeLayer(this.heightLayer),this.map.getLayer(this.heightLabelLayer)&&this.map.removeLayer(this.heightLabelLayer),this.map.getLayer(this.directionLayer)&&this.map.removeLayer(this.directionLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Wt(a,e,t,o,i,s){return r.openBlock(),r.createElementBlock("div")}const At=k(Rt,[["render",Wt]]),Bt={name:"IdmPrmsl",props:{map:{type:Object},prmsl:{type:Object},beforeLayer:{type:String},showRampColor:{type:Boolean},activeWeatherLayers:{type:Array}},data(){return{source:"prmsl-source",layer:"prmsl-layer",labelLayer:"prmsl-label-layer",pointLabelLayer:"prmsl-point-label-layer",empty:x.featureCollection([])}},watch:{"prmsl.version":{handler(){var a;(a=this.prmsl)!=null&&a.active?(this.handleRender(),this.handleMove()):this.handleClear()},deep:!0},activeWeatherLayers:{handler(){setTimeout(()=>{this.activeWeatherLayers.length>0?this.handleMove():this.handleClear()},500)},deep:!0,immediate:!0}},methods:{handleRender(){var a,e,t;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.prmsl){const o=new Date().valueOf();let i=0,s=0,n=this.empty;this.prmsl.active&&(n=this.prmsl.data),(a=this.map)!=null&&a.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(n),s=new Date().valueOf()-(o+i),console.log("[prmsl] update elapsed: ",s,", total: ",i+=s)):(this.map.addSource(this.source,{type:"geojson",data:n}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-color":["step",["get","val"],"rgba(162,13,2,1)",920,"rgba(244,67,54,1)",980,"rgba(255,255,0,1)",1100,"rgba(199,171,250,1)"],"line-width":1,"line-opacity":1}},this.beforeLayer),(t=this.map)==null||t.addLayer({id:this.labelLayer,type:"symbol",source:this.source,minzoom:4,filter:["==","$type","LineString"],layout:{"symbol-placement":"line","text-rotation-alignment":"viewport","text-field":"{val}","text-size":12},paint:{"text-color":"black","text-opacity":.9,"text-halo-color":"rgba(255,255,255,1)","text-halo-width":1}},this.beforeLayer),setTimeout(()=>{this.map.addLayer({id:this.pointLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":["format",["get","type"],{"font-scale":1.03},`
190
- `,["get","val"],{"font-scale":1}],"text-rotation-alignment":"map","text-line-height":1.3,"text-size":12},paint:{"text-opacity":1,"text-color":["step",["get","val"],"white",980,"black",1100,"black"],"text-halo-color":["step",["get","val"],"rgba(162,13,2,0.9)",920,"rgba(244,67,54,0.9)",980,"rgba(255,255,0,0.9)",1100,"rgba(199,171,250,0.9)"],"text-halo-width":4}},this.beforeLayer)},0),s=new Date().valueOf()-(o+i),console.log("[prmsl] add elapsed: ",s,", total: ",i+=s))}},handleMove(){var a,e;(e=(a=this.map)==null?void 0:a.getLayer("country-boundaries"))==null||e.setLayoutProperty("visibility","visible"),this.map.getLayer(this.pointLabelLayer)&&this.map.moveLayer(this.pointLabelLayer,"country-boundaries"),this.map.getLayer(this.labelLayer)&&this.map.moveLayer(this.labelLayer,"country-boundaries"),this.map.getLayer(this.layer)&&this.map.moveLayer(this.layer,"country-boundaries")},handleClear(){var a,e;this.activeWeatherLayers.length===0&&((e=(a=this.map)==null?void 0:a.getLayer("country-boundaries"))==null||e.setLayoutProperty("visibility","none")),this.map.getLayer(this.pointLabelLayer)&&this.map.removeLayer(this.pointLabelLayer),this.map.getLayer(this.labelLayer)&&this.map.removeLayer(this.labelLayer),this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Mt(a,e,t,o,i,s){return r.openBlock(),r.createElementBlock("div")}const Ot=k(Bt,[["render",Mt]]),jt={name:"IdmIceberg",props:{map:{type:Object},iceberg:{type:Object},beforeLayer:{type:String}},data(){return{source:"iceberg-source",layer:"iceberg-layer",empty:x.featureCollection([])}},watch:{"iceberg.version":{handler(){var a;(a=this.iceberg)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0}},methods:{handleRender(){var a,e;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.iceberg){const t=new Date().valueOf();let o=0,i=0,s=this.empty;this.iceberg.active&&(s=this.iceberg.data),(a=this.map)!=null&&a.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(s),i=new Date().valueOf()-(t+o),console.log("[iceberg] update elapsed: ",i,", total: ",o+=i)):(this.map.addSource(this.source,{type:"geojson",data:s}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-color":"rgba(255,255,255, 0.8)","line-width":2,"line-opacity":1}}),i=new Date().valueOf()-(t+o),console.log("[iceberg] add elapsed: ",i,", total: ",o+=i))}},handleClear(){this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Ft(a,e,t,o,i,s){return r.openBlock(),r.createElementBlock("div")}const $t=k(jt,[["render",Ft]]),si="",Ht={name:"IdmTropicals",props:{map:{type:Object},tropicals:{type:Object},date:{type:String},timeZone:{type:Number,default:0}},emits:["tropical","tropicalProbability"],data(){return{helper:ce,source:"tropicals-source",clusterSource:"tropicals-cluster-source",historyLayer:"tropicals-history-layer",forecastLayer:"tropicals-forecast-layer",forecastModelLayer:"tropicals-forecast-model-layer",forecastNameLayer:"tropicals-forecast-name-layer",pointCircleLayer:"tropicals-point-circle-layer",pointLabelLayer:"tropicals-point-label-layer",historyPointCircleLayer:"history-tropicals-point-circle-layer",historyPointLabelLayer:"history-tropicals-point-label-layer",interpolateData:[],interpolateMarkers:[],interpolateSource:"tropicals-interpolate-source",interpolateLineLayer:"tropicals-interpolate-line-layer",showTropicals:!1,activeTropicals:void 0,activeTropicalsMarker:void 0,empty:x.featureCollection([]),circleSource:"circle-source",circleSourceData:x.featureCollection([]),circleLayer:"tropical-circle-layer"}},computed:{computeTime(){return function(a){if(a){const e=B(a).utc().utcOffset(this.timeZone),t=this.timeZone<0?this.timeZone:"+"+this.timeZone;return`${e.format("MMM-DD,HHmm")}[ UTC ${t} ] ( ${e==null?void 0:e.fromNow()} )`}return"-"}},computeTimezone(){return this.timeZone<0?this.timeZone:"+"+this.timeZone}},watch:{"tropicals.active":{handler(){this.handleInit()},immediate:!0},showTropicals:{handler(){this.$emit("tropical",this.showTropicals)},immediate:!0},"tropicals.version":{handler(){this.handleRefresh()}},timeZone:{handler(){this.handleRefresh()}}},methods:{handleRefresh(){var o,i;const a=((i=(o=this.tropicals)==null?void 0:o.data)==null?void 0:i.features)||[],e=B().utc().hour(),t=[];a.forEach(s=>{var n,l,h;(n=s.properties)!=null&&n.name&&!t.includes((l=s.properties)==null?void 0:l.name)&&t.push((h=s.properties)==null?void 0:h.name)}),t.forEach(s=>{var m;let n=0,l;const h=a.filter(c=>{var d,u;return((u=(d=c.properties)==null?void 0:d.category)==null?void 0:u.split("-")[0])===s});(m=h.filter(c=>{var d,u;return((d=c.geometry)==null?void 0:d.type)==="LineString"&&((u=c.properties)==null?void 0:u.type)==="forecast"})[0])==null||m.properties.model,h.forEach((c,d)=>{var u,p,b,f,y,L;((u=c.geometry)==null?void 0:u.type)==="Point"&&((p=c.properties)==null?void 0:p.type)==="history"&&(n=d,l=l===void 0?d:l),((b=c.geometry)==null?void 0:b.type)==="Point"&&((f=c.properties)==null?void 0:f.type)==="forecast"&&l===void 0&&(l=d),((y=c.geometry)==null?void 0:y.type)==="LineString"&&((L=c.properties)==null||L.type)}),h.map((c,d)=>{var u,p,b,f,y,L,g;if(((u=c.geometry)==null?void 0:u.type)==="LineString"&&((p=c.properties)==null||p.type),((b=c.geometry)==null?void 0:b.type)==="Point"&&((f=c.properties)==null?void 0:f.type)==="forecast"&&(c.properties.name=s,c.properties.format=B(c.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`)),((y=c.geometry)==null?void 0:y.type)==="Point"&&((L=c.properties)==null?void 0:L.type)==="history"){c.properties.format=B(c.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`);const v=B((g=c.properties)==null?void 0:g.date).utc().format("HHmm")===B().utc().hour(Math.floor(e/6)*6).minute("00").format("HHmm");c.properties.showHistoryLabel=v||d===n,c.properties.showNameLabel=d===n,c.properties.name=s}return c})}),this.handleInit()},handleInit(){var a,e;this.tropicals&&this.tropicals.active?(this.handleRender(),(a=this.map)==null||a.on("click",[this.forecastNameLayer,this.forecastLayer,this.historyLayer,this.forecastModelLayer,this.pointCircleLayer,this.pointLabelLayer,this.historyPointCircleLayer,this.historyPointLabelLayer],this.handleClick)):(this.handleClear(),(e=this.map)==null||e.off("click",[this.forecastNameLayer,this.forecastLayer,this.historyLayer,this.forecastModelLayer,this.pointCircleLayer,this.pointLabelLayer,this.historyPointCircleLayer,this.historyPointLabelLayer],this.handleClick))},handleRender(){var a,e,t,o,i,s,n,l,h,m;if(!this.map)setTimeout(()=>{this.handleRender()},500);else{if(this.tropicals){const d=new Date().valueOf();let u=0,p=0;(a=this.map)!=null&&a.getSource(this.source)?((t=this.map)==null||t.getSource(this.source).setData((e=this.tropicals)!=null&&e.active?this.tropicals.data:this.empty),p=new Date().valueOf()-(d+u),console.log("[tropicals] update elapsed: ",p,", total: ",u+=p)):(this.map.addSource(this.source,{type:"geojson",data:(o=this.tropicals)!=null&&o.active?(i=this.tropicals)==null?void 0:i.data:this.empty}),this.map.addLayer({id:this.historyLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["==","type","history"],["!=","disabled",!0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#000","line-width":4,"line-opacity":.5}}),this.map.addLayer({id:this.forecastLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["==","type","forecast"],["!=","disabled",!0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["match",["get","model"],"cma","#e2ea03","jma","#01d2b7","ecmwf","#f582f2","ukm","#f5bb47","noaa-at","#9758fb","noaa-ep","#9758fb","#fff"],"line-width":3,"line-opacity":.9,"line-dasharray":[1,2]}}),this.map.addLayer({id:this.forecastModelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","LineString"],["==","type","forecast"],["!=","disabled",!0]],layout:{"symbol-placement":"line","text-field":"{model}","text-rotation-alignment":"viewport","text-size":13},paint:{"text-color":["match",["get","model"],"cma","#000","jma","#000","ecmwf","#fff","ukm","#fff","noaa-at","#fff","noaa-ep","#fff","#000"],"text-opacity":1,"text-halo-color":["match",["get","model"],"cma","#e2ea03","jma","#01d2b7","ecmwf","#f582f2","ukm","#f5bb47","noaa-at","#9758fb","noaa-ep","#9758fb","#fff"],"text-halo-width":4}}),p=new Date().valueOf()-(d+u),console.log("[tropical] add elapsed: ",p,", total: ",u+=p)),(s=this.map)!=null&&s.getSource(this.clusterSource)?((l=this.map)==null||l.getSource(this.clusterSource).setData((n=this.tropicals)!=null&&n.active?this.tropicals.data:this.empty),p=new Date().valueOf()-(d+u),console.log("[tropical] update elapsed: ",p,", total: ",u+=p)):(this.map.addSource(this.clusterSource,{type:"geojson",data:(h=this.tropicals)!=null&&h.active?(m=this.tropicals)==null?void 0:m.data:this.empty}),this.map.addLayer({id:this.pointCircleLayer+"-border",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],paint:{"circle-radius":6,"circle-color":"#fff"}}),this.map.addLayer({id:this.pointCircleLayer,type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],paint:{"circle-radius":4,"circle-color":["case",["boolean",["==",["get","spd",["get","wind"]],null]],"#03f869",["boolean",["<",["get","spd",["get","wind"]],17.2]],"#03f869",["boolean",["<=",["get","spd",["get","wind"]],24.5]],"#f2f202",["boolean",["<=",["get","spd",["get","wind"]],32.7]],"#ff9100",["boolean",["<=",["get","spd",["get","wind"]],41.5]],"#f44336",["boolean",["<",["get","spd",["get","wind"]],51]],"#f903d0",["boolean",[">=",["get","spd",["get","wind"]],51]],"#8702f9","#fff"]}}),this.map.addLayer({id:this.pointLabelLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],layout:{"text-field":["get","format"],"text-offset":[0,-.5],"text-anchor":"bottom-left","text-size":12},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"#fff","text-halo-width":1}}),this.map.addLayer({id:this.historyPointCircleLayer+"-border",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":7,"circle-color":"#fff"}}),this.map.addLayer({id:this.historyPointCircleLayer,type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":5,"circle-color":"rgba(0,0,0,0.7)"}}),this.map.addLayer({id:this.historyPointCircleLayer+"-inner",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":3,"circle-color":"#fff"}}),this.map.addLayer({id:this.historyPointLabelLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],layout:{"text-field":["get","format"],"text-offset":[0,-.5],"text-anchor":"bottom-left","text-size":14},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"#fff","text-halo-width":1}}),this.map.addLayer({id:this.forecastNameLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showNameLabel",!0]],layout:{"text-field":["get","name"],"text-offset":[0,1.5],"text-anchor":"bottom","text-size":16,"text-allow-overlap":!0,"text-ignore-placement":!0},paint:{"text-color":"#fff","text-halo-color":"#0033ff","text-halo-width":4}}),p=new Date().valueOf()-(d+u),console.log("[tropical] add elapsed: ",p,", total: ",u+=p))}this.handleDrawCircle();const c=C.TropicalHelper.interpolate(this.tropicals,1);this.interpolateData=JSON.parse(JSON.stringify(c)),this.interpolateData.filter(d=>d.properties.name==="kristy"&&d.properties.model==="ecmwf"),this.handleDateChange()}},handleClear(){var a;this.map&&(this.map.getLayer(this.historyLayer)&&this.map.removeLayer(this.historyLayer),this.map.getLayer(this.forecastLayer)&&this.map.removeLayer(this.forecastLayer),this.map.getLayer(this.forecastModelLayer)&&this.map.removeLayer(this.forecastModelLayer),this.map.getLayer(this.forecastNameLayer)&&this.map.removeLayer(this.forecastNameLayer),this.map.getLayer(this.pointCircleLayer)&&this.map.removeLayer(this.pointCircleLayer),this.map.getLayer(this.pointCircleLayer+"-border")&&this.map.removeLayer(this.pointCircleLayer+"-border"),this.map.getLayer(this.pointLabelLayer)&&this.map.removeLayer(this.pointLabelLayer),this.map.getLayer(this.historyPointCircleLayer)&&this.map.removeLayer(this.historyPointCircleLayer),this.map.getLayer(this.historyPointCircleLayer+"-border")&&this.map.removeLayer(this.historyPointCircleLayer+"-border"),this.map.getLayer(this.historyPointCircleLayer+"-inner")&&this.map.removeLayer(this.historyPointCircleLayer+"-inner"),this.map.getLayer(this.historyPointLabelLayer)&&this.map.removeLayer(this.historyPointLabelLayer),this.map.getLayer(this.interpolateLineLayer)&&this.map.removeLayer(this.interpolateLineLayer),(a=this.interpolateMarkers)==null||a.forEach(e=>e==null?void 0:e.remove()),this.map.getSource(this.source)&&this.map.removeSource(this.source),this.map.getSource(this.clusterSource)&&this.map.removeSource(this.clusterSource),this.map.getSource(this.interpolateSource)&&this.map.removeSource(this.interpolateSource),this.map.getLayer(this.circleLayer)&&this.map.removeLayer(this.circleLayer),this.map.getSource(this.circleSource)&&this.map.removeSource(this.circleSource))},handleDateChange(){var a,e,t,o,i,s,n,l,h,m,c,d,u,p,b,f,y,L,g,v,_,w,z,N,V,D,R,M,Q,K,ee,te,ae,re,ie,G;if((a=this.interpolateMarkers)==null||a.forEach(O=>O==null?void 0:O.remove()),this.circleSourceData.features=[],(e=this.interpolateData)!=null&&e.length&&this.tropicals.active){const O=B(this.date).utc().set({minute:0,second:0,millisecond:0}),F=this.interpolateData.filter(S=>S.properties.date===O.format()&&!S.properties.disabled),oe=this.handleComputePolygons(F),$=x.featureCollection([...F]);oe.forEach(S=>{$.features.push(S)}),(t=this.map)!=null&&t.getSource(this.interpolateSource)?(o=this.map)==null||o.getSource(this.interpolateSource).setData($):((i=this.map)==null||i.addSource(this.interpolateSource,{type:"geojson",data:$}),(s=this.map)==null||s.addLayer({id:this.interpolateLineLayer,type:"line",source:this.interpolateSource,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-opacity":1,"line-color":["match",["get","level"],7,"#ff9100",10,"#f44336","#ffffff"],"line-width":1}})),this.interpolateMarkers=[];for(const S of F)if(!S.properties.disabled){let W="#f44336";((l=(n=S.properties)==null?void 0:n.wind)==null?void 0:l.spd)<17.2||!((m=(h=S.properties)==null?void 0:h.wind)!=null&&m.spd)?W="#03f869":((d=(c=S.properties)==null?void 0:c.wind)==null?void 0:d.spd)>=17.2&&((p=(u=S.properties)==null?void 0:u.wind)==null?void 0:p.spd)<24.5?W="#f2f202":((f=(b=S.properties)==null?void 0:b.wind)==null?void 0:f.spd)>=24.5&&((L=(y=S.properties)==null?void 0:y.wind)==null?void 0:L.spd)<32.7?W="#ff9100":((v=(g=S.properties)==null?void 0:g.wind)==null?void 0:v.spd)>=32.7&&((w=(_=S.properties)==null?void 0:_.wind)==null?void 0:w.spd)<41.5?W="#f44336":((N=(z=S.properties)==null?void 0:z.wind)==null?void 0:N.spd)>=41.5&&((D=(V=S.properties)==null?void 0:V.wind)==null?void 0:D.spd)<51?W="#f903d0":((M=(R=S.properties)==null?void 0:R.wind)==null?void 0:M.spd)>=51?W="#8702f9":W="#f44336";const se=`<svg t="1719918955501"
189
+ }`);class Hy{constructor(t="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNseTVudHJzYzAwNWUwbHBsZHkyaDRqczMiLCJyb2xlIjoxLCJuYW1lIjoiZmFrZUBvcm13eC5jb20iLCJwbGF0SWQiOiJnZDBtdDFkIiwiY29tcGFueSI6eyJpZCI6bnVsbCwiY2hpbGRyZW4iOltdfSwiaWF0IjoxNzIzMDI0MDI0LCJleHAiOjM5MzA1NDQwMjR9.RrKcdcMnq-FxBLJQ-i6lx2FscDE46y8EvHIemPW4HTg"){Je(this,"token");Je(this,"mapboxCustomer");Je(this,"i4");Je(this,"hi");Je(this,"td");Je(this,"windy");this.token=t,this.mapboxCustomer={source:this.initialOnlineStyle().sources.composite,layers:{water:{id:"water",type:"fill",source:"composite","source-layer":"water",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},paint:{"fill-color":"hsl(205, 75%, 70%)"}},waterDeplth:{id:"water-depth",type:"fill",source:"composite","source-layer":"depth",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},maxzoom:8,paint:{"fill-antialias":!1,"fill-color":["interpolate",["linear"],["zoom"],6,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0.35)",200,"hsla(205, 75%, 63%, 0.35)",7e3,"hsla(205, 75%, 56%, 0.35)"],8,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0)",200,"hsla(205, 75%, 63%, 0)",7e3,"hsla(205, 75%, 53%, 0)"]]}},countryBoundary:{id:"country-boundaries",type:"fill",source:"composite","source-layer":"country_boundaries",layout:{visibility:"visible"},paint:{"fill-color":"#d9d8d8"}},countryAdmin0BoundaryBg:{id:"admin-0-boundary-bg",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-width":["interpolate",["linear"],["zoom"],3,4,12,8],"line-color":"rgb(193, 190, 190)","line-opacity":["interpolate",["linear"],["zoom"],3,0,4,.5],"line-blur":["interpolate",["linear"],["zoom"],3,0,12,2]}},countryAdmin0Boundary:{id:"admin-0-boundary",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","admin_level"],0],["==",["get","disputed"],"false"],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-color":"rgb(114, 110, 111)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[2,0]],7,["literal",[2,2,6,2]]]}},countryAdmin0BoundaryDisputed:{id:"admin-0-boundary-disputed",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","disputed"],"true"],["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-color":"rgb(95, 93, 94)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[3,2,5]],7,["literal",[2,1.5]]]}},countryLabel:{id:"country-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},layout:{visibility:"visible","text-field":["coalesce",["get","name_en"],["get","name"]],"text-line-height":1.1,"text-max-width":6,"text-font":["HelveticaNeueThin"],"text-radial-offset":["step",["zoom"],.6,8,0],"text-justify":["step",["zoom"],["match",["get","text_anchor"],["left","bottom-left","top-left"],"left",["right","bottom-right","top-right"],"right","center"],7,"auto"],"text-size":["interpolate",["cubic-bezier",.2,0,.7,1],["zoom"],1,["step",["get","symbolrank"],11,4,9,5,8],9,["step",["get","symbolrank"],22,4,19,5,17]]},paint:{"text-color":"rgba(255,255,255,0)"}}}},this.td={source:{type:"raster",tiles:["https://t0.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t1.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t2.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t3.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t4.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t5.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t6.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t7.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8"],tileSize:256},layer:{id:"td",type:"raster",source:"td",layout:{visibility:"visible"}}},this.i4={source:{type:"raster",tiles:["https://osshz.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz1.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz2.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz3.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz4.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz5.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz6.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz7.idmwx.com/nautical/{z}/{x}/{y}.png"],tileSize:256},layer:{id:"i4",type:"raster",source:"i4",layout:{visibility:"none"}}},this.hi={source:{type:"raster",tiles:[`https://assist0.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist1.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist2.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist3.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist4.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist5.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist6.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist7.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`],tileSize:256},layer:{id:"hi",type:"raster",source:"hi",layout:{visibility:"none"}}},this.windy={darkmap:{source:{type:"raster",tiles:["https://tiles.windy.com/tiles/v10.0/darkmap/{z}/{x}/{y}.png"],tileSize:256},layer:{id:"darkmap",type:"raster",source:"darkmap",layout:{visibility:"none"}}},grayland:{source:{type:"raster",tiles:["https://tiles.windy.com/tiles/v9.0/grayland/{z}/{x}/{y}.png"],tileSize:256},layer:{id:"grayland",type:"raster",source:"grayland",layout:{visibility:"none"},paint:{"raster-opacity":1}}}}}initialOnlineStyle(){return{version:8,name:"map-weather-v2.0.0",metadata:{"mapbox:print":{width:8.5,height:11,units:"in",format:"png",resolution:300},"mapbox:type":"default","mapbox:trackposition":!0,"mapbox:autocomposite":!0,"mapbox:sdk-support":{android:"11.0.0",ios:"11.0.0",js:"3.0.0"},"mapbox:origin":"outdoors-v12","mapbox:groups":{"Terrain, terrain-labels":{name:"Terrain, terrain-labels",collapsed:!0},"Administrative boundaries, admin":{name:"Administrative boundaries, admin",collapsed:!1},"Land & water, built":{name:"Land & water, built",collapsed:!1},"Terrain, surface":{name:"Terrain, surface",collapsed:!0},"Land & water, land":{name:"Land & water, land",collapsed:!1},"Natural features, natural-labels":{name:"Natural features, natural-labels",collapsed:!0},"Walking, cycling, etc., barriers-bridges":{name:"Walking, cycling, etc., barriers-bridges",collapsed:!0},"Place labels, place-labels":{name:"Place labels, place-labels",collapsed:!1},"Transit, ferries":{name:"Transit, ferries",collapsed:!0},"Transit, elevated":{name:"Transit, elevated",collapsed:!0},"Walking, cycling, etc., tunnels":{name:"Walking, cycling, etc., tunnels",collapsed:!0},"Terrain, land":{name:"Terrain, land",collapsed:!0},"Road network, tunnels-case":{name:"Road network, tunnels-case",collapsed:!0},"Walking, cycling, etc., walking-cycling-labels":{name:"Walking, cycling, etc., walking-cycling-labels",collapsed:!0},"Walking, cycling, etc., surface":{name:"Walking, cycling, etc., surface",collapsed:!0},"Road network, surface-icons":{name:"Road network, surface-icons",collapsed:!0},"Land & water, water":{name:"Land & water, water",collapsed:!1}}},lights:[],fog:{color:"#ffffff",range:[.5,10],"high-color":"#245cdf","space-color":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"horizon-blend":["interpolate",["linear"],["zoom"],4,.2,7,.1],"star-intensity":["interpolate",["linear"],["zoom"],5,.35,6,0],"vertical-range":[0,0]},center:[80.02170408691855,17.83215724225399],zoom:2.4589703839156347,bearing:0,pitch:1,sprite:"mapbox://sprites/neatchenheng/clxwst0tq00wd01rn0usb2eer/3hcvufdre7i2yn9nbkvi9f9xi",glyphs:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf",projection:{name:"equirectangular"},sources:{composite:{type:"vector",url:"mapbox://mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2,mapbox.mapbox-bathymetry-v2,mapbox.country-boundaries-v1",data:{attribution:'<a href="https://www.mapbox.com/about/maps/" target="_blank" title="Mapbox" aria-label="Mapbox">&copy; Mapbox</a> <a href="https://www.openstreetmap.org/about/" target="_blank" title="OpenStreetMap" aria-label="OpenStreetMap">&copy; OpenStreetMap</a> <a href="https://www.mapbox.com/about/maps/" target="_blank" title="Mapbox" aria-label="Mapbox">&copy; Mapbox</a> <a href="https://www.openstreetmap.org/about/" target="_blank" title="OpenStreetMap" aria-label="OpenStreetMap">&copy; OpenStreetMap</a> <a class="mapbox-improve-map" href="https://www.mapbox.com/contribute/" target="_blank" title="Improve this map" aria-label="Improve this map">Improve this map</a>',bounds:[-180,-85.051129,180,85],center:[0,-.025564500000001544,0],description:"Global polygon tileset of country boundaries and disputed areas",format:"pbf",language_options:{ar:"Arabic",ca:"Catalan",cs:"Czech",da:"Danish",de:"German",el:"Greek",en:"English",es:"Spanish",fa:"Farsi",fi:"Finnish",fr:"French",he:"Hebrew",hu:"Hungarian",id:"Indonesian",it:"Italian",ja:"Japanese",ka:"Georgian",ko:"Korean",local:"Renderable local language",lv:"Latvian",ms:"Malay",nb:"Norwegian Bokmål",nl:"Dutch",no:"Norwegian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sk:"Slovak",sl:"Slovenian",sr:"Serbian",sv:"Swedish",th:"Thai",tl:"Tagalog",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese","zh-Hans":"Simplified Chinese","zh-Hant":"Traditional Chinese"},mapbox_logo:!0,maskLevel:9,maxzoom:16,minzoom:0,mts:!0,name:"Mapbox Countries v1 + Mapbox Bathymetry v2 + Mapbox Terrain v2 + Mapbox Streets v8",scheme:"xyz",tilejson:"2.2.0",tiles:["https://a.tiles.mapbox.com/v4/mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2,mapbox.mapbox-bathymetry-v2,mapbox.country-boundaries-v1/{z}/{x}/{y}.vector.pbf?access_token=pk.eyJ1IjoibmVhdGNoZW5oZW5nIiwiYSI6ImNsdXM3cnBmODBsemgycW1vaXc1bjV6bXMifQ.w6fqHGRbhNhLvm0LnX4ZVw","https://b.tiles.mapbox.com/v4/mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2,mapbox.mapbox-bathymetry-v2,mapbox.country-boundaries-v1/{z}/{x}/{y}.vector.pbf?access_token=pk.eyJ1IjoibmVhdGNoZW5oZW5nIiwiYSI6ImNsdXM3cnBmODBsemgycW1vaXc1bjV6bXMifQ.w6fqHGRbhNhLvm0LnX4ZVw"],vector_layers:[{id:"landuse",minzoom:5,source:"mapbox.mapbox-streets-v8"},{id:"waterway",minzoom:7,source:"mapbox.mapbox-streets-v8"},{id:"water",minzoom:0,source:"mapbox.mapbox-streets-v8"},{id:"aeroway",minzoom:9,source:"mapbox.mapbox-streets-v8"},{id:"structure",minzoom:13,source:"mapbox.mapbox-streets-v8"},{id:"building",minzoom:12,source:"mapbox.mapbox-streets-v8"},{id:"landuse_overlay",minzoom:5,source:"mapbox.mapbox-streets-v8"},{id:"road",minzoom:3,source:"mapbox.mapbox-streets-v8"},{id:"admin",minzoom:0,source:"mapbox.mapbox-streets-v8"},{id:"place_label",minzoom:0,source:"mapbox.mapbox-streets-v8"},{id:"airport_label",minzoom:8,source:"mapbox.mapbox-streets-v8"},{id:"transit_stop_label",minzoom:5,source:"mapbox.mapbox-streets-v8"},{id:"natural_label",minzoom:0,source:"mapbox.mapbox-streets-v8"},{id:"poi_label",minzoom:6,source:"mapbox.mapbox-streets-v8"},{id:"motorway_junction",minzoom:9,source:"mapbox.mapbox-streets-v8"},{id:"housenum_label",minzoom:16,source:"mapbox.mapbox-streets-v8"},{id:"landcover",maxzoom:22,minzoom:0,source:"mapbox.mapbox-terrain-v2"},{id:"hillshade",maxzoom:22,minzoom:0,source:"mapbox.mapbox-terrain-v2"},{id:"contour",maxzoom:22,minzoom:0,source:"mapbox.mapbox-terrain-v2"},{id:"depth",maxzoom:7,minzoom:0,source:"mapbox.mapbox-bathymetry-v2"},{id:"country_boundaries",maxzoom:22,minzoom:0,source:"mapbox.country-boundaries-v1"}],worldview_default:"US",worldview_options:{AR:"Argentina",CN:"China",IN:"India",JP:"Japan",MA:"Morocco",RS:"Serbia",RU:"Russia",TR:"Turkey",US:"United States"}}}},layers:[{id:"land",type:"background",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},paint:{"background-color":"rgb(171, 174, 172)"}},{id:"landcover",type:"fill",source:"composite","source-layer":"landcover",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},maxzoom:12,paint:{"fill-color":["match",["get","class"],"wood","hsl(0, 0%, 69%)","scrub","hsl(0, 0%, 69%)","crop","hsl(0, 0%, 69%)","grass","hsl(0, 0%, 69%)","snow","hsl(0, 0%, 69%)","hsl(0, 0%, 69%)"],"fill-opacity":["interpolate",["exponential",1.5],["zoom"],8,.8,12,0],"fill-antialias":!1}},{id:"national-park",type:"fill",source:"composite","source-layer":"landuse_overlay",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},minzoom:5,filter:["==",["get","class"],"national_park"],paint:{"fill-color":"hsl(98, 38%, 68%)","fill-opacity":["interpolate",["linear"],["zoom"],5,0,6,.6,12,.2]}},{id:"national-park_tint-band",type:"line",source:"composite","source-layer":"landuse_overlay",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},minzoom:9,filter:["==",["get","class"],"national_park"],paint:{"line-color":"hsl(98, 38%, 68%)","line-width":["interpolate",["exponential",1.5],["zoom"],9,1,14,8],"line-blur":["interpolate",["exponential",1.5],["zoom"],9,1,14,8]}},{id:"landuse",type:"fill",source:"composite","source-layer":"landuse",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},minzoom:5,filter:["all",[">=",["to-number",["get","sizerank"]],0],["match",["get","class"],["agriculture","wood","grass","scrub","glacier","pitch","sand"],["step",["zoom"],!1,11,!0],"residential",["step",["zoom"],!0,10,!1],["park","airport"],["step",["zoom"],!1,8,["case",["==",["get","sizerank"],1],!0,!1],10,!0],["facility","industrial"],["step",["zoom"],!1,12,!0],"rock",["step",["zoom"],!1,11,!0],"cemetery",["step",["zoom"],!1,11,!0],"school",["step",["zoom"],!1,11,!0],"hospital",["step",["zoom"],!1,11,!0],"commercial_area",["step",["zoom"],!1,11,!0],!1],["<=",["-",["to-number",["get","sizerank"]],["interpolate",["exponential",1.5],["zoom"],12,0,18,14]],14]],paint:{"fill-color":["interpolate",["linear"],["zoom"],15,["match",["get","class"],"wood","hsla(103, 50%, 60%, 0.8)","scrub","hsla(98, 47%, 68%, 0.6)","agriculture","hsla(98, 50%, 74%, 0.6)","park",["match",["get","type"],["garden","playground","zoo"],"hsl(98, 38%, 68%)","hsl(98, 55%, 70%)"],"grass","hsla(98, 50%, 74%, 0.6)","airport","hsl(230, 40%, 82%)","cemetery","hsl(98, 45%, 75%)","glacier","hsl(205, 45%, 95%)","hospital","hsl(20, 45%, 82%)","pitch","hsl(88, 65%, 75%)","sand","hsl(69, 60%, 72%)","rock","hsl(60, 0%, 85%)","school","hsl(40, 45%, 78%)","commercial_area","hsl(55, 45%, 85%)","residential","hsl(60, 7%, 87%)",["facility","industrial"],"hsl(230, 20%, 85%)","hsl(60, 12%, 72%)"],16,["match",["get","class"],"wood","hsla(103, 50%, 60%, 0.8)","scrub","hsla(98, 47%, 68%, 0.6)","agriculture","hsla(98, 50%, 74%, 0.6)","park",["match",["get","type"],["garden","playground","zoo"],"hsl(98, 38%, 68%)","hsl(98, 55%, 70%)"],"grass","hsla(98, 50%, 74%, 0.6)","airport","hsl(230, 40%, 82%)","cemetery","hsl(98, 45%, 75%)","glacier","hsl(205, 45%, 95%)","hospital","hsl(20, 45%, 82%)","pitch","hsl(88, 65%, 75%)","sand","hsl(69, 60%, 72%)","rock","hsla(60, 0%, 85%, 0.5)","school","hsl(40, 45%, 78%)","commercial_area","hsla(55, 45%, 85%, 0.5)",["facility","industrial"],"hsl(230, 20%, 85%)","hsl(60, 12%, 72%)"]],"fill-opacity":["interpolate",["linear"],["zoom"],8,["match",["get","class"],"residential",.8,.2],10,["match",["get","class"],"residential",0,1]],"fill-antialias":!1}},{id:"pitch-outline",type:"line",source:"composite","source-layer":"landuse",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},minzoom:15,filter:["==",["get","class"],"pitch"],paint:{"line-color":"hsl(0, 0%, 69%)"}},{id:"waterway-shadow",type:"line",source:"composite","source-layer":"waterway",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:10,layout:{"line-cap":["step",["zoom"],"butt",11,"round"],"line-join":["step",["zoom"],"miter",11,"round"]},paint:{"line-color":"hsl(224, 79%, 69%)","line-width":["interpolate",["exponential",1.3],["zoom"],9,["match",["get","class"],["canal","river"],.1,0],20,["match",["get","class"],["canal","river"],8,3]],"line-translate":["interpolate",["exponential",1.2],["zoom"],7,["literal",[0,0]],16,["literal",[-1,-1]]],"line-translate-anchor":"viewport","line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"water-shadow",type:"fill",source:"composite","source-layer":"water",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:10,paint:{"fill-color":"hsl(224, 79%, 69%)","fill-translate":["interpolate",["exponential",1.2],["zoom"],7,["literal",[0,0]],16,["literal",[-1,-1]]],"fill-translate-anchor":"viewport"}},{id:"waterway",type:"line",source:"composite","source-layer":"waterway",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:8,layout:{"line-cap":["step",["zoom"],"butt",11,"round"],"line-join":["step",["zoom"],"miter",11,"round"]},paint:{"line-color":"hsl(205, 75%, 70%)","line-width":["interpolate",["exponential",1.3],["zoom"],9,["match",["get","class"],["canal","river"],.1,0],20,["match",["get","class"],["canal","river"],8,3]],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"water",type:"fill",source:"composite","source-layer":"water",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},paint:{"fill-color":"hsl(205, 75%, 70%)"}},{id:"water-depth",type:"fill",source:"composite","source-layer":"depth",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},maxzoom:8,paint:{"fill-antialias":!1,"fill-color":["interpolate",["linear"],["zoom"],6,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0.35)",200,"hsla(205, 75%, 63%, 0.35)",7e3,"hsla(205, 75%, 56%, 0.35)"],8,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0)",200,"hsla(205, 75%, 63%, 0)",7e3,"hsla(205, 75%, 53%, 0)"]]}},{id:"wetland",type:"fill",source:"composite","source-layer":"landuse_overlay",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:5,filter:["match",["get","class"],["wetland","wetland_noveg"],!0,!1],paint:{"fill-color":"hsl(194, 38%, 74%)","fill-opacity":["interpolate",["linear"],["zoom"],10,.25,10.5,.15]}},{id:"wetland-pattern",type:"fill",source:"composite","source-layer":"landuse_overlay",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:5,filter:["match",["get","class"],["wetland","wetland_noveg"],!0,!1],paint:{"fill-color":"hsl(194, 38%, 74%)","fill-opacity":["interpolate",["linear"],["zoom"],10,0,10.5,1],"fill-pattern":"wetland","fill-translate-anchor":"viewport"}},{id:"land-structure-polygon",type:"fill",source:"composite","source-layer":"structure",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, built"},minzoom:13,filter:["all",["==",["get","class"],"land"],["==",["geometry-type"],"Polygon"]],paint:{"fill-color":"hsl(0, 0%, 69%)"}},{id:"land-structure-line",type:"line",source:"composite","source-layer":"structure",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, built"},minzoom:13,filter:["all",["==",["get","class"],"land"],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"square"},paint:{"line-width":["interpolate",["exponential",1.99],["zoom"],14,.75,20,40],"line-color":"hsl(60, 20%, 85%)"}},{id:"country-boundaries",type:"fill",source:"composite","source-layer":"country_boundaries",paint:{"fill-color":["interpolate",["linear"],["zoom"],0,"rgb(171, 174, 172)",22,"rgb(171, 174, 172)"]}},{id:"admin-0-boundary-bg",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-width":["interpolate",["linear"],["zoom"],3,4,12,8],"line-color":"rgb(193, 190, 190)","line-opacity":["interpolate",["linear"],["zoom"],3,0,4,.5],"line-blur":["interpolate",["linear"],["zoom"],3,0,12,2]}},{id:"admin-0-boundary",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","admin_level"],0],["==",["get","disputed"],"false"],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-color":"rgb(114, 110, 111)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[2,0]],7,["literal",[2,2,6,2]]]}},{id:"admin-0-boundary-disputed",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","disputed"],"true"],["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-color":"rgb(95, 93, 94)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[3,2,5]],7,["literal",[2,1.5]]]}},{id:"waterway-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:13,filter:["all",["match",["get","class"],["canal","river","stream","disputed_canal","disputed_river","disputed_stream"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],layout:{"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"text-max-angle":30,"symbol-spacing":["interpolate",["linear",1],["zoom"],15,250,17,400],"text-size":["interpolate",["linear"],["zoom"],13,12,18,18],"symbol-placement":"line","text-pitch-alignment":"viewport","text-field":["coalesce",["get","name_en"],["get","name"]],visibility:"none"},paint:{"text-color":"hsl(205, 43%, 90%)","text-halo-color":"hsla(60, 17%, 84%, 0.5)"}},{id:"natural-line-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:4,filter:["all",["match",["get","class"],["glacier","landform","disputed_glacier","disputed_landform"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],4],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],layout:{"text-size":["step",["zoom"],["step",["get","sizerank"],18,5,12],17,["step",["get","sizerank"],18,13,12]],"text-max-angle":30,"text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"symbol-placement":"line-center","text-pitch-alignment":"viewport",visibility:"none"},paint:{"text-halo-width":.5,"text-halo-color":"hsl(60, 17%, 84%)","text-halo-blur":.5,"text-color":"hsl(340, 10%, 38%)"}},{id:"natural-point-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:4,filter:["all",["match",["get","class"],["dock","glacier","landform","water_feature","wetland","disputed_dock","disputed_glacier","disputed_landform","disputed_water_feature","disputed_wetland"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],4],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"Point"]],layout:{"text-size":["step",["zoom"],["step",["get","sizerank"],18,5,12],17,["step",["get","sizerank"],18,13,12]],"icon-image":["case",["has","maki_beta"],["coalesce",["image",["get","maki_beta"]],["image",["get","maki"]]],["image",["get","maki"]]],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-offset":["step",["zoom"],["step",["get","sizerank"],["literal",[0,0]],5,["literal",[0,.8]]],17,["step",["get","sizerank"],["literal",[0,0]],13,["literal",[0,.8]]]],"text-anchor":["step",["zoom"],["step",["get","sizerank"],"center",5,"top"],17,["step",["get","sizerank"],"center",13,"top"]],"text-field":["coalesce",["get","name_en"],["get","name"]],visibility:"none"},paint:{"icon-opacity":["step",["zoom"],["step",["get","sizerank"],0,5,1],17,["step",["get","sizerank"],0,13,1]],"text-halo-color":"hsl(60, 20%, 98%)","text-halo-width":.5,"text-halo-blur":.5,"text-color":"hsl(340, 10%, 38%)"}},{id:"water-line-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:1,filter:["all",["match",["get","class"],["bay","ocean","reservoir","sea","water","disputed_bay","disputed_ocean","disputed_reservoir","disputed_sea","disputed_water"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],layout:{"text-size":["interpolate",["linear"],["zoom"],0,["*",["-",16,["sqrt",["get","sizerank"]]],1],22,["*",["-",22,["sqrt",["get","sizerank"]]],1]],"text-max-angle":30,"text-letter-spacing":["match",["get","class"],"ocean",.25,["sea","bay"],.15,0],"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"symbol-placement":"line-center","text-pitch-alignment":"viewport","text-field":["coalesce",["get","name_en"],["get","name"]],visibility:"none"},paint:{"text-color":["match",["get","class"],["bay","ocean","sea"],"hsl(205, 71%, 90%)","hsl(205, 43%, 90%)"],"text-halo-color":"hsla(60, 17%, 84%, 0.5)"}},{id:"water-point-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:1,filter:["all",["match",["get","class"],["bay","ocean","reservoir","sea","water","disputed_bay","disputed_ocean","disputed_reservoir","disputed_sea","disputed_water"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"Point"]],layout:{"text-line-height":1.3,"text-size":["interpolate",["linear"],["zoom"],0,["*",["-",16,["sqrt",["get","sizerank"]]],1],22,["*",["-",22,["sqrt",["get","sizerank"]]],1]],"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-letter-spacing":["match",["get","class"],"ocean",.25,["bay","sea"],.15,.01],"text-max-width":["match",["get","class"],"ocean",4,"sea",5,["bay","water"],7,10],visibility:"none"},paint:{"text-color":["match",["get","class"],["bay","ocean","sea"],"hsl(205, 71%, 90%)","hsl(205, 43%, 90%)"],"text-halo-color":"hsla(60, 17%, 84%, 0.5)"}},{id:"settlement-subdivision-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:10,maxzoom:15,filter:["all",["match",["get","class"],["settlement_subdivision","disputed_settlement_subdivision"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],3],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-transform":"uppercase","text-font":["DIN Pro Regular","Arial Unicode MS Regular"],"text-letter-spacing":["match",["get","type"],"suburb",.15,.05],"text-max-width":7,"text-padding":3,"text-size":["interpolate",["cubic-bezier",.5,0,1,1],["zoom"],11,["match",["get","type"],"suburb",11,10.5],15,["match",["get","type"],"suburb",15,14]],visibility:"none"},paint:{"text-halo-color":"hsla(60, 25%, 100%, 0.75)","text-halo-width":1,"text-color":"hsl(230, 29%, 36%)","text-halo-blur":.5}},{id:"settlement-minor-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:2,maxzoom:13,filter:["all",["<=",["get","filterrank"],3],["match",["get","class"],["settlement","disputed_settlement"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["zoom"],[">",["get","symbolrank"],6],4,[">=",["get","symbolrank"],7],6,[">=",["get","symbolrank"],8],7,[">=",["get","symbolrank"],10],10,[">=",["get","symbolrank"],11],11,[">=",["get","symbolrank"],13],12,[">=",["get","symbolrank"],15]],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-line-height":1.1,"text-size":["interpolate",["cubic-bezier",.2,0,.9,1],["zoom"],3,["step",["get","symbolrank"],11,9,10],6,["step",["get","symbolrank"],14,9,12,12,10],8,["step",["get","symbolrank"],16,9,14,12,12,15,10],13,["step",["get","symbolrank"],22,9,20,12,16,15,14]],"text-radial-offset":["step",["zoom"],["match",["get","capital"],2,.6,.55],8,0],"symbol-sort-key":["get","symbolrank"],"icon-image":["step",["zoom"],["case",["==",["get","capital"],2],"border-dot-13",["step",["get","symbolrank"],"dot-11",9,"dot-10",11,"dot-9"]],8,""],"text-font":["DIN Pro Regular","Arial Unicode MS Regular"],"text-justify":"auto",visibility:"none","text-anchor":["step",["zoom"],["get","text_anchor"],8,"center"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-max-width":7},paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-halo-blur":1}},{id:"settlement-major-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:2,maxzoom:15,filter:["all",["<=",["get","filterrank"],3],["match",["get","class"],["settlement","disputed_settlement"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["zoom"],!1,2,["<=",["get","symbolrank"],6],4,["<",["get","symbolrank"],7],6,["<",["get","symbolrank"],8],7,["<",["get","symbolrank"],10],10,["<",["get","symbolrank"],11],11,["<",["get","symbolrank"],13],12,["<",["get","symbolrank"],15],13,[">=",["get","symbolrank"],11],14,[">=",["get","symbolrank"],15]],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-line-height":1.1,"text-size":["interpolate",["cubic-bezier",.2,0,.9,1],["zoom"],3,["step",["get","symbolrank"],13,6,11],6,["step",["get","symbolrank"],18,6,16,7,14],8,["step",["get","symbolrank"],20,9,16,10,14],15,["step",["get","symbolrank"],24,9,20,12,16,15,14]],"text-radial-offset":["step",["zoom"],["match",["get","capital"],2,.6,.55],8,0],"symbol-sort-key":["get","symbolrank"],"icon-image":["step",["zoom"],["case",["==",["get","capital"],2],"border-dot-13",["step",["get","symbolrank"],"dot-11",9,"dot-10",11,"dot-9"]],8,""],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-justify":["step",["zoom"],["match",["get","text_anchor"],["left","bottom-left","top-left"],"left",["right","bottom-right","top-right"],"right","center"],8,"center"],visibility:"none","text-anchor":["step",["zoom"],["get","text_anchor"],8,"center"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-max-width":7},paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-halo-blur":1}},{id:"state-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:3,maxzoom:9,filter:["all",["match",["get","class"],["state","disputed_state"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-size":["interpolate",["cubic-bezier",.85,.7,.65,1],["zoom"],4,["step",["get","symbolrank"],9,6,8,7,7],9,["step",["get","symbolrank"],21,6,16,7,14]],"text-transform":"uppercase","text-font":["DIN Pro Bold","Arial Unicode MS Bold"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-letter-spacing":.15,"text-max-width":6,visibility:"none"},paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-opacity":.5}},{id:"country-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:1,maxzoom:10,filter:["all",["match",["get","class"],["country","disputed_country"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-line-height":1.1,"text-max-width":6,"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-radial-offset":["step",["zoom"],.6,8,0],"text-justify":["step",["zoom"],["match",["get","text_anchor"],["left","bottom-left","top-left"],"left",["right","bottom-right","top-right"],"right","center"],7,"auto"],"text-size":["interpolate",["cubic-bezier",.2,0,.7,1],["zoom"],1,["step",["get","symbolrank"],11,4,9,5,8],9,["step",["get","symbolrank"],22,4,19,5,17]]},paint:{"icon-opacity":["step",["zoom"],["case",["has","text_anchor"],1,0],7,0],"text-color":"hsl(230, 29%, 0%)","text-halo-color":["interpolate",["linear"],["zoom"],2,"hsla(60, 25%, 100%, 0.75)",3,"hsl(60, 25%, 100%)"],"text-halo-width":1.25}},{id:"continent-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:.75,maxzoom:3,filter:["==",["get","class"],"continent"],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-line-height":1.1,"text-max-width":6,"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",.5],["zoom"],0,10,2.5,15],"text-transform":"uppercase","text-letter-spacing":.05,visibility:"none"},paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":["interpolate",["linear"],["zoom"],0,"hsla(60, 25%, 100%, 0.75)",3,"hsl(60, 25%, 100%)"],"text-halo-width":1.5,"text-opacity":["interpolate",["linear"],["zoom"],0,.8,1.5,.5,2.5,0]}}]}}}const dQ="",aI={name:"IdmWindParticle",props:{factor:{type:Object},viewport:{type:ru},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Va,etime:void 0,wrapper:void 0,animation:void 0,particleContext:void 0,particleTexture:void 0,particleOptions:{fadeOpacity:.9,speedFactor:.25,dropRate:.003,dropRateBump:.01,uvRange:[-25,26],sRange:[0,31.985]},paused:!1,initial:!0,right:10}},watch:{"factor.version":{handler(){var r;(r=this.factor)!=null&&r.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var r;this.right=(((r=document.getElementsByClassName("right-bar")[0])==null?void 0:r.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const r=new Date().valueOf();let t=0,e=0;this.handleDraw(),e=new Date().valueOf()-(r+t),console.log("[wind-particle] add elapsed: ",e,", total: ",t+=e)}},handleClear(){var r,t,e,a,i,n,o,s;(r=this.viewport)==null||r.toggle(!1),(t=this.viewport)==null||t.toggleParticle(!1),this.context=void 0,this.particleContext=void 0,this.etime=void 0,this.initial=!0,(a=(e=this.viewport)==null?void 0:e.map)==null||a.off("resize",this.handleResize),(n=(i=this.viewport)==null?void 0:i.map)==null||n.off("movestart",this.handlePause),(s=(o=this.viewport)==null?void 0:o.map)==null||s.off("moveend",this.handlePlay),this.handlePause()},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const r=[[0,"rgb(98, 113, 184, 0.8)"],[12/255,"rgb(98, 113, 184)"],[24/255,"rgb(61, 110, 163)"],[32/255,"rgb(74, 146, 148)"],[40/255,"rgb(77, 142, 124)"],[60/255,"rgb(76, 164, 76)"],[80/255,"rgb(103, 164, 54)"],[100/255,"rgb(162, 135, 64)"],[120/255,"rgb(162, 109, 92)"],[140/255,"rgb(141, 63, 92)"],[160/255,"rgb(151, 75, 145)"],[200/255,"rgb(95, 100, 160)"],[240/255,"rgb(91, 136, 161)"],[1,"rgb(91, 136, 161)"]];this.rampColor=this.webgl.setup(this.context,r);const{program:t,aPositionBuffer:e}=this.webgl.bind(this.context,vt.vertexSchema,vt.uvFragmentSchema);this.program=t,this.aPositionBuffer=e}this.handleParticleSetup()},handleParticleSetup(){if(!this.particleContext){this.particleContext=this.viewport.particleCanvas.getContext("webgl");const r=[[0,"rgb(183,224,224)"],[1,"rgb(217,220,220)"]];this.wrapper=this.webgl.bindParticle(this.particleContext,Ct.vertexSchema,Ct.fragmentSchema,Ct.quadVertSchema,Ct.screenFragmentSchema,Ct.updateFragmentSchema),this.wrapper.color=this.webgl.setup(this.particleContext,r,!0,16,16),this.wrapper={...this.wrapper,...this.webgl.setupParticle(this.particleContext,9e3),...this.webgl.resize(this.viewport,this.particleContext)},this.viewport.map.on("resize",this.handleResize),this.viewport.map.on("movestart",this.handlePause),this.viewport.map.on("moveend",this.handlePlay)}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const r=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,r),this.particleTexture=this.webgl.createTexture(this.particleContext,this.particleContext.NEAREST,this.particleContext.LINEAR,this.particleContext.CLAMP_TO_EDGE,r),this.wrapper.image=r}this.initial&&(this.initial=!1,this.handlePlay()),this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer,this.particleOptions),this.viewport.toggle(!0)},handleResize(){this.wrapper={...this.wrapper,...this.webgl.resize(this.viewport,this.particleContext)}},handlePause(){this.paused=!0,this.animation&&(cancelAnimationFrame(this.animation),this.viewport.toggleParticle(!1))},handlePlay(){this.paused=!1,this.animation=requestAnimationFrame(()=>{this.webgl.drawParticle(this.viewport,this.particleContext,this.particleTexture,this.wrapper,this.particleOptions),this.viewport.toggleParticle(!0),this.handlePlay()})}}},iI={key:0};function nI(r,t,e,a,i,n){var o;return(o=e.factor)!=null&&o.active?(b.openBlock(),b.createElementBlock("div",iI,[b.createElementVNode("div",{class:"legend-bars flex-center",style:b.normalizeStyle([{position:"absolute"},{right:i.right+"px",bottom:e.bottom}])},t[0]||(t[0]=[b.createElementVNode("span",null,"kts",-1),b.createElementVNode("span",null,"0",-1),b.createElementVNode("span",null,"5",-1),b.createElementVNode("span",null,"10",-1),b.createElementVNode("span",null,"20",-1),b.createElementVNode("span",null,"30",-1),b.createElementVNode("span",null,"40",-1),b.createElementVNode("span",null,"60",-1)]),4)])):b.createCommentVNode("",!0)}const oI=ze(aI,[["render",nI],["__scopeId","data-v-24e5434b"]]),pQ="",sI={name:"IdmCurrent",props:{map:{type:Object},current:{type:Object},beforeLayer:{type:String},mapProjection:{type:String},showCurrentParticle:{type:Boolean,default:!1},showCurrentIsoband:{type:Boolean,default:!1},marginBottom:{type:String,default:"30px"},toggleVersion:{type:Number}},emits:["particle","handleToggleVersion"],data(){return{source:"current-source",directionLayer:"current-direction-layer",speedLayer:"current-speed-layer",speedLabelLayer:"current-speed-label-layer",empty:be.featureCollection([]),right:10,bottom:95}},watch:{"current.version":{handler(){var r;(r=this.current)!=null&&r.active?this.handleRender():this.handleClear(),this.$emit("handleToggleVersion")},deep:!0},showCurrentParticle:{handler(){this.handleParticle()}},showCurrentIsoband:{handler(){this.handleToggle()}}},methods:{handleParticle(){this.$emit("particle",{particle:this.showCurrentParticle,key:"current",weight:96})},handleRender(){var r,t;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.current){const e=new Date().valueOf();let a=0,i=0,n=this.empty;this.current.active&&(n=this.current.data),(r=this.map)!=null&&r.getSource(this.source)?((t=this.map)==null||t.getSource(this.source).setData(n),i=new Date().valueOf()-(e+a),console.log("[current] update elapsed: ",i,", total: ",a+=i)):(this.map.addSource(this.source,{type:"geojson",data:n}),this.map.addLayer({id:this.speedLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["step",["get","val"],"#e1ffb3",1,"#ffff00",3,"#ff9500",4,"#f44336",5,"#f44336"]}},this.beforeLayer),this.map.addLayer({id:this.speedLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Polygon"],layout:{"symbol-placement":"line","text-field":"{val} kts","text-allow-overlap":!0,"text-rotation-alignment":"viewport","text-size":12},paint:{"text-color":"rgba(0, 0, 0, 0.8)"}},this.beforeLayer),this.map.addLayer({id:this.directionLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-image":"arrow-red","icon-size":["interpolate",["linear"],["get","spd"],.5,.14,3,.28],"icon-offset":[0,-20],"icon-allow-overlap":!0,"icon-rotation-alignment":"map","icon-rotate":{property:"val",stops:[[0,0],[360,360]]}},paint:{"icon-opacity":.6}},this.beforeLayer),i=new Date().valueOf()-(e+a),console.log("[current] add elapsed: ",i,", total: ",a+=i)),this.handleToggle()}},handleToggle(){this.map.getLayer(this.speedLayer)&&this.map.setLayoutProperty(this.speedLayer,"visibility",this.showCurrentIsoband?"visible":"none"),this.map.getLayer(this.speedLabelLayer)&&this.map.setLayoutProperty(this.speedLabelLayer,"visibility",this.showCurrentIsoband?"visible":"none"),this.map.getLayer(this.directionLayer)&&this.map.setLayoutProperty(this.directionLayer,"visibility",this.showCurrentIsoband?"visible":"none")},handleClear(){this.map.getLayer(this.speedLayer)&&this.map.removeLayer(this.speedLayer),this.map.getLayer(this.speedLabelLayer)&&this.map.removeLayer(this.speedLabelLayer),this.map.getLayer(this.directionLayer)&&this.map.removeLayer(this.directionLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},lI={key:0};function uI(r,t,e,a,i,n){var o;return(o=e.current)!=null&&o.active?(b.openBlock(),b.createElementBlock("div",lI)):b.createCommentVNode("",!0)}const cI=ze(sI,[["render",uI]]),vQ="",hI={name:"IdmCurrentParticle",props:{factor:{type:Object},viewport:{type:ru},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Va,etime:void 0,wrapper:void 0,animation:void 0,particleContext:void 0,particleTexture:void 0,particleOptions:{fadeOpacity:.96,speedFactor:4,dropRate:.005,dropRateBump:.01,uvRange:[-2.5,2.6],sRange:[0,3]},paused:!1,initial:!0,right:10}},watch:{"factor.version":{handler(){var r;(r=this.factor)!=null&&r.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var r;this.right=(((r=document.getElementsByClassName("right-bar")[0])==null?void 0:r.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const r=new Date().valueOf();let t=0,e=0;this.handleDraw(),e=new Date().valueOf()-(r+t),console.log("[current-particle] add elapsed: ",e,", total: ",t+=e)}},handleClear(){var r,t,e,a,i,n,o,s;(r=this.viewport)==null||r.toggle(!1),(t=this.viewport)==null||t.toggleParticle(!1),this.context=void 0,this.particleContext=void 0,this.etime=void 0,this.initial=!0,(a=(e=this.viewport)==null?void 0:e.map)==null||a.off("resize",this.handleResize),(n=(i=this.viewport)==null?void 0:i.map)==null||n.off("movestart",this.handlePause),(s=(o=this.viewport)==null?void 0:o.map)==null||s.off("moveend",this.handlePlay),this.handlePause()},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const r=[[0/255,"rgba(95, 143, 197,1)"],[5/255,"rgba(64,127,115,1)"],[10/255,"rgb(58,164,58)"],[15/255,"rgb(191,182,67)"],[20/255,"rgb(197,154,68)"],[30/255,"rgb(160,70,94)"],[40/255,"rgb(138,84,166)"],[45/255,"rgb(82,113,165)"],[50/255,"rgb(84,142,152)"],[65/255,"rgb(150,181,184)"],[80/255,"rgb(195,194,194)"],[254/255,"rgb(195,194,194)"],[1,"rgb(195,194,194)"]];this.rampColor=this.webgl.setup(this.context,r);const{program:t,aPositionBuffer:e}=this.webgl.bind(this.context,vt.vertexSchema,vt.uvFragmentSchema);this.program=t,this.aPositionBuffer=e}this.handleParticleSetup()},handleParticleSetup(){if(!this.particleContext){this.particleContext=this.viewport.particleCanvas.getContext("webgl");const r=[[0,"rgb(183,224,224)"],[1,"rgb(199,202,202)"]];this.wrapper=this.webgl.bindParticle(this.particleContext,Ct.vertexSchema,Ct.fragmentSchema,Ct.quadVertSchema,Ct.screenFragmentSchema,Ct.updateFragmentSchema),this.wrapper.color=this.webgl.setup(this.particleContext,r,!0,16,16),this.wrapper={...this.wrapper,...this.webgl.setupParticle(this.particleContext,12e3),...this.webgl.resize(this.viewport,this.particleContext)},this.viewport.map.on("resize",this.handleResize),this.viewport.map.on("movestart",this.handlePause),this.viewport.map.on("moveend",this.handlePlay)}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const r=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,r),this.particleTexture=this.webgl.createTexture(this.particleContext,this.particleContext.NEAREST,this.particleContext.LINEAR,this.particleContext.CLAMP_TO_EDGE,r),this.wrapper.image=r}this.initial&&(this.initial=!1,this.handlePlay()),this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer,this.particleOptions),this.viewport.toggle(!0)},handleResize(){this.wrapper={...this.wrapper,...this.webgl.resize(this.viewport,this.particleContext)}},handlePause(){this.paused=!0,this.animation&&(cancelAnimationFrame(this.animation),this.viewport.toggleParticle(!1))},handlePlay(){this.paused=!1,this.animation=requestAnimationFrame(()=>{this.webgl.drawParticle(this.viewport,this.particleContext,this.particleTexture,this.wrapper,this.particleOptions),this.viewport.toggleParticle(!0),this.handlePlay()})}}},fI={key:0};function dI(r,t,e,a,i,n){var o;return(o=e.factor)!=null&&o.active?(b.openBlock(),b.createElementBlock("div",fI,[b.createElementVNode("div",{class:"legend-bars flex-center",style:b.normalizeStyle([{position:"absolute"},{right:i.right+"px",bottom:e.bottom}])},t[0]||(t[0]=[b.createElementVNode("span",null,"kts",-1),b.createElementVNode("span",null,"0",-1),b.createElementVNode("span",null,"0.4",-1),b.createElementVNode("span",null,"0.8",-1),b.createElementVNode("span",null,"1.6",-1),b.createElementVNode("span",null,"2",-1),b.createElementVNode("span",null,"3.2",-1)]),4)])):b.createCommentVNode("",!0)}const pI=ze(hI,[["render",dI],["__scopeId","data-v-6d4fd206"]]),vI={name:"IdmSigWave",props:{map:{type:Object},sigWave:{type:Object},beforeLayer:{type:String},activeWeatherLayers:{type:Array}},data(){return{source:"sig-wave-source",heightLayer:"sig-wave-height-layer",heightLabelLayer:"sig-wave-height-label-layer",empty:be.featureCollection([])}},watch:{"sigWave.version":{handler(){var r;(r=this.sigWave)!=null&&r.active?(this.handleRender(),this.handleMove()):this.handleClear()},deep:!0}},methods:{handleRender(){var r,t;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.sigWave){const e=new Date().valueOf();let a=0,i=0,n=this.empty;this.sigWave.active&&(n=this.sigWave.data),(r=this.map)!=null&&r.getSource(this.source)?((t=this.map)==null||t.getSource(this.source).setData(n),i=new Date().valueOf()-(e+a),console.log("[sig.wave] update elapsed: ",i,", total: ",a+=i)):(this.map.addSource(this.source,{type:"geojson",data:n}),this.map.addLayer({id:this.heightLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],layout:{"fill-sort-key":["get","val"]},paint:{"fill-outline-color":"#888","fill-opacity":.8,"fill-color":["step",["get","val"],"rgba(186,247,199,0.4)",3,"rgba(186,247,199,0.7)",4,"rgba(101,252,149,0.9)",5,"#b3ff6b",6,"#fee600",7,"#ffa200",8,"#ff6600",9,"#e23304",10,"#f80078",11,"#dc03d2",12,"#a603f8",13,"#7102ab"]}},this.beforeLayer),this.map.addLayer({id:this.heightLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Polygon"],layout:{"symbol-placement":"line","symbol-avoid-edges":!0,"symbol-sort-key":["get","val"],"text-field":"{val} m","text-rotation-alignment":"viewport","text-size":10},paint:{"text-opacity":.7}},this.beforeLayer),i=new Date().valueOf()-(e+a),console.log("[sig.wave] add elapsed: ",i,", total: ",a+=i))}},handleMove(){var r,t;(t=(r=this.map)==null?void 0:r.getLayer("country-boundaries"))==null||t.setLayoutProperty("visibility","visible"),this.map.getLayer(this.heightLayer)&&this.map.moveLayer(this.heightLayer,"country-boundaries"),this.map.getLayer(this.heightLabelLayer)&&this.map.moveLayer(this.heightLabelLayer,"country-boundaries")},handleClear(){var r,t,e;((r=this.activeWeatherLayers)==null?void 0:r.length)===0&&((e=(t=this.map)==null?void 0:t.getLayer("country-boundaries"))==null||e.setLayoutProperty("visibility","none")),this.map.getLayer(this.heightLayer)&&this.map.removeLayer(this.heightLayer),this.map.getLayer(this.heightLabelLayer)&&this.map.removeLayer(this.heightLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function gI(r,t,e,a,i,n){return b.openBlock(),b.createElementBlock("div")}const mI=ze(vI,[["render",gI]]),yI={name:"IdmSwell",props:{map:{type:Object},swell:{type:Object},beforeLayer:{type:String},activeWeatherLayers:{type:Array}},data(){return{source:"swell-source",directionLayer:"swell-direction-layer",heightLayer:"swell-height-layer",heightLabelLayer:"swell-height-label-layer",empty:be.featureCollection([])}},watch:{"swell.version":{handler(){var r;(r=this.swell)!=null&&r.active?(this.handleRender(),this.handleMove()):this.handleClear()},deep:!0},activeWeatherLayers:{handler(){setTimeout(()=>{this.activeWeatherLayers.length>0?this.handleMove():this.handleClear()},500)},deep:!0,immediate:!0}},methods:{handleRender(){var r,t;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.swell){const e=new Date().valueOf();let a=0,i=0,n=this.empty;this.swell.active&&(n=this.swell.data),(r=this.map)!=null&&r.getSource(this.source)?((t=this.map)==null||t.getSource(this.source).setData(n),i=new Date().valueOf()-(e+a),console.log("[swell] update elapsed: ",i,", total: ",a+=i)):(this.map.addSource(this.source,{type:"geojson",data:n}),this.map.addLayer({id:this.heightLayer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-opacity":1,"line-width":2,"line-color":["match",["get","val"],2,"rgba(255,255,0,0.9)",3,"rgba(255,149,0,0.9)",4,"rgba(244,67,54,0.9)",5,"rgba(162,2,31,0.9)",6,"rgba(162,2,31,0.9)","rgba(162,2,31,0.9)"]}},this.beforeLayer),this.map.addLayer({id:this.heightLabelLayer,type:"symbol",source:this.source,filter:["==","$type","LineString"],layout:{"symbol-placement":"line","text-rotation-alignment":"viewport","text-field":"{val}M","text-size":12},paint:{"text-color":["step",["get","val"],"black",4,"white",5,"white",6,"white"],"text-halo-color":["match",["get","val"],2,"rgba(255,255,0,0.7)",3,"rgba(255,149,0,0.7)",4,"rgba(244,67,54,0.7)",5,"rgba(162,13,2,0.7)",6,"rgba(162,13,2,0.7)","rgba(162,13,2,0.7)"],"text-halo-width":4}},this.beforeLayer),this.map.addLayer({id:this.directionLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-image":"arrow-yellow","icon-size":{base:1,stops:[[2,.14],[6,.28]]},"icon-offset":[0,-20],"icon-allow-overlap":!0,"icon-rotation-alignment":"map","icon-rotate":{property:"val",stops:[[0,180],[360,540]]}},paint:{"icon-opacity":.8}},this.beforeLayer),i=new Date().valueOf()-(e+a),console.log("[swell] add elapsed: ",i,", total: ",a+=i))}},handleMove(){var r,t;(t=(r=this.map)==null?void 0:r.getLayer("country-boundaries"))==null||t.setLayoutProperty("visibility","visible"),this.map.getLayer(this.heightLayer)&&this.map.moveLayer(this.heightLayer,"country-boundaries"),this.map.getLayer(this.directionLayer)&&this.map.moveLayer(this.directionLayer,"country-boundaries"),this.map.getLayer(this.heightLabelLayer)&&this.map.moveLayer(this.heightLabelLayer,"country-boundaries")},handleClear(){var r,t;this.activeWeatherLayers.length===0&&((t=(r=this.map)==null?void 0:r.getLayer("country-boundaries"))==null||t.setLayoutProperty("visibility","none")),this.map.getLayer(this.heightLayer)&&this.map.removeLayer(this.heightLayer),this.map.getLayer(this.heightLabelLayer)&&this.map.removeLayer(this.heightLabelLayer),this.map.getLayer(this.directionLayer)&&this.map.removeLayer(this.directionLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function _I(r,t,e,a,i,n){return b.openBlock(),b.createElementBlock("div")}const bI=ze(yI,[["render",_I]]),wI={name:"IdmPrmsl",props:{map:{type:Object},prmsl:{type:Object},beforeLayer:{type:String},showRampColor:{type:Boolean},activeWeatherLayers:{type:Array}},data(){return{source:"prmsl-source",layer:"prmsl-layer",labelLayer:"prmsl-label-layer",pointLabelLayer:"prmsl-point-label-layer",empty:be.featureCollection([])}},watch:{"prmsl.version":{handler(){var r;(r=this.prmsl)!=null&&r.active?(this.handleRender(),this.handleMove()):this.handleClear()},deep:!0},activeWeatherLayers:{handler(){setTimeout(()=>{this.activeWeatherLayers.length>0?this.handleMove():this.handleClear()},500)},deep:!0,immediate:!0}},methods:{handleRender(){var r,t,e;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.prmsl){const a=new Date().valueOf();let i=0,n=0,o=this.empty;this.prmsl.active&&(o=this.prmsl.data),(r=this.map)!=null&&r.getSource(this.source)?((t=this.map)==null||t.getSource(this.source).setData(o),n=new Date().valueOf()-(a+i),console.log("[prmsl] update elapsed: ",n,", total: ",i+=n)):(this.map.addSource(this.source,{type:"geojson",data:o}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-color":["step",["get","val"],"rgba(162,13,2,1)",920,"rgba(244,67,54,1)",980,"rgba(255,255,0,1)",1100,"rgba(199,171,250,1)"],"line-width":1,"line-opacity":1}},this.beforeLayer),(e=this.map)==null||e.addLayer({id:this.labelLayer,type:"symbol",source:this.source,minzoom:4,filter:["==","$type","LineString"],layout:{"symbol-placement":"line","text-rotation-alignment":"viewport","text-field":"{val}","text-size":12},paint:{"text-color":"black","text-opacity":.9,"text-halo-color":"rgba(255,255,255,1)","text-halo-width":1}},this.beforeLayer),setTimeout(()=>{this.map.addLayer({id:this.pointLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":["format",["get","type"],{"font-scale":1.03},`
190
+ `,["get","val"],{"font-scale":1}],"text-rotation-alignment":"map","text-line-height":1.3,"text-size":12},paint:{"text-opacity":1,"text-color":["step",["get","val"],"white",980,"black",1100,"black"],"text-halo-color":["step",["get","val"],"rgba(162,13,2,0.9)",920,"rgba(244,67,54,0.9)",980,"rgba(255,255,0,0.9)",1100,"rgba(199,171,250,0.9)"],"text-halo-width":4}},this.beforeLayer)},0),n=new Date().valueOf()-(a+i),console.log("[prmsl] add elapsed: ",n,", total: ",i+=n))}},handleMove(){var r,t;(t=(r=this.map)==null?void 0:r.getLayer("country-boundaries"))==null||t.setLayoutProperty("visibility","visible"),this.map.getLayer(this.pointLabelLayer)&&this.map.moveLayer(this.pointLabelLayer,"country-boundaries"),this.map.getLayer(this.labelLayer)&&this.map.moveLayer(this.labelLayer,"country-boundaries"),this.map.getLayer(this.layer)&&this.map.moveLayer(this.layer,"country-boundaries")},handleClear(){var r,t;this.activeWeatherLayers.length===0&&((t=(r=this.map)==null?void 0:r.getLayer("country-boundaries"))==null||t.setLayoutProperty("visibility","none")),this.map.getLayer(this.pointLabelLayer)&&this.map.removeLayer(this.pointLabelLayer),this.map.getLayer(this.labelLayer)&&this.map.removeLayer(this.labelLayer),this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function xI(r,t,e,a,i,n){return b.openBlock(),b.createElementBlock("div")}const SI=ze(wI,[["render",xI]]),LI={name:"IdmIceberg",props:{map:{type:Object},iceberg:{type:Object},beforeLayer:{type:String}},data(){return{source:"iceberg-source",layer:"iceberg-layer",empty:be.featureCollection([])}},watch:{"iceberg.version":{handler(){var r;(r=this.iceberg)!=null&&r.active?this.handleRender():this.handleClear()},deep:!0}},methods:{handleRender(){var r,t;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.iceberg){const e=new Date().valueOf();let a=0,i=0,n=this.empty;this.iceberg.active&&(n=this.iceberg.data),(r=this.map)!=null&&r.getSource(this.source)?((t=this.map)==null||t.getSource(this.source).setData(n),i=new Date().valueOf()-(e+a),console.log("[iceberg] update elapsed: ",i,", total: ",a+=i)):(this.map.addSource(this.source,{type:"geojson",data:n}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-color":"rgba(255,255,255, 0.8)","line-width":2,"line-opacity":1}}),i=new Date().valueOf()-(e+a),console.log("[iceberg] add elapsed: ",i,", total: ",a+=i))}},handleClear(){this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function TI(r,t,e,a,i,n){return b.openBlock(),b.createElementBlock("div")}const CI=ze(LI,[["render",TI]]),gQ="",DI={name:"IdmTropicals",props:{map:{type:Object},tropicals:{type:Object},date:{type:String},timeZone:{type:Number,default:0}},emits:["tropical","tropicalProbability"],data(){return{helper:is,source:"tropicals-source",clusterSource:"tropicals-cluster-source",historyLayer:"tropicals-history-layer",forecastLayer:"tropicals-forecast-layer",forecastModelLayer:"tropicals-forecast-model-layer",forecastNameLayer:"tropicals-forecast-name-layer",pointCircleLayer:"tropicals-point-circle-layer",pointLabelLayer:"tropicals-point-label-layer",historyPointCircleLayer:"history-tropicals-point-circle-layer",historyPointLabelLayer:"history-tropicals-point-label-layer",interpolateData:[],interpolateMarkers:[],interpolateSource:"tropicals-interpolate-source",interpolateLineLayer:"tropicals-interpolate-line-layer",showTropicals:!1,activeTropicals:void 0,activeTropicalsMarker:void 0,empty:be.featureCollection([]),circleSource:"circle-source",circleSourceData:be.featureCollection([]),circleLayer:"tropical-circle-layer"}},computed:{computeTime(){return function(r){if(r){const t=Ue(r).utc().utcOffset(this.timeZone),e=this.timeZone<0?this.timeZone:"+"+this.timeZone;return`${t.format("MMM-DD,HHmm")}[ UTC ${e} ] ( ${t==null?void 0:t.fromNow()} )`}return"-"}},computeTimezone(){return this.timeZone<0?this.timeZone:"+"+this.timeZone}},watch:{"tropicals.active":{handler(){this.handleInit()},immediate:!0},showTropicals:{handler(){this.$emit("tropical",this.showTropicals)},immediate:!0},"tropicals.version":{handler(){this.handleRefresh()}},timeZone:{handler(){this.handleRefresh()}}},methods:{handleRefresh(){var a,i;const r=((i=(a=this.tropicals)==null?void 0:a.data)==null?void 0:i.features)||[],t=Ue().utc().hour(),e=[];r.forEach(n=>{var o,s,l;(o=n.properties)!=null&&o.name&&!e.includes((s=n.properties)==null?void 0:s.name)&&e.push((l=n.properties)==null?void 0:l.name)}),e.forEach(n=>{var u;let o=0,s;const l=r.filter(c=>{var h,f;return((f=(h=c.properties)==null?void 0:h.category)==null?void 0:f.split("-")[0])===n});(u=l.filter(c=>{var h,f;return((h=c.geometry)==null?void 0:h.type)==="LineString"&&((f=c.properties)==null?void 0:f.type)==="forecast"})[0])==null||u.properties.model,l.forEach((c,h)=>{var f,d,p,v,g,m;((f=c.geometry)==null?void 0:f.type)==="Point"&&((d=c.properties)==null?void 0:d.type)==="history"&&(o=h,s=s===void 0?h:s),((p=c.geometry)==null?void 0:p.type)==="Point"&&((v=c.properties)==null?void 0:v.type)==="forecast"&&s===void 0&&(s=h),((g=c.geometry)==null?void 0:g.type)==="LineString"&&((m=c.properties)==null||m.type)}),l.map((c,h)=>{var f,d,p,v,g,m,y;if(((f=c.geometry)==null?void 0:f.type)==="LineString"&&((d=c.properties)==null||d.type),((p=c.geometry)==null?void 0:p.type)==="Point"&&((v=c.properties)==null?void 0:v.type)==="forecast"&&(c.properties.name=n,c.properties.format=Ue(c.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`)),((g=c.geometry)==null?void 0:g.type)==="Point"&&((m=c.properties)==null?void 0:m.type)==="history"){c.properties.format=Ue(c.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`);const _=Ue((y=c.properties)==null?void 0:y.date).utc().format("HHmm")===Ue().utc().hour(Math.floor(t/6)*6).minute("00").format("HHmm");c.properties.showHistoryLabel=_||h===o,c.properties.showNameLabel=h===o,c.properties.name=n}return c})}),this.handleInit()},handleInit(){var r,t;this.tropicals&&this.tropicals.active?(this.handleRender(),(r=this.map)==null||r.on("click",[this.forecastNameLayer,this.forecastLayer,this.historyLayer,this.forecastModelLayer,this.pointCircleLayer,this.pointLabelLayer,this.historyPointCircleLayer,this.historyPointLabelLayer],this.handleClick)):(this.handleClear(),(t=this.map)==null||t.off("click",[this.forecastNameLayer,this.forecastLayer,this.historyLayer,this.forecastModelLayer,this.pointCircleLayer,this.pointLabelLayer,this.historyPointCircleLayer,this.historyPointLabelLayer],this.handleClick))},handleRender(){var r,t,e,a,i,n,o,s,l,u;if(!this.map)setTimeout(()=>{this.handleRender()},500);else{if(this.tropicals){const h=new Date().valueOf();let f=0,d=0;(r=this.map)!=null&&r.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData((t=this.tropicals)!=null&&t.active?this.tropicals.data:this.empty),d=new Date().valueOf()-(h+f),console.log("[tropicals] update elapsed: ",d,", total: ",f+=d)):(this.map.addSource(this.source,{type:"geojson",data:(a=this.tropicals)!=null&&a.active?(i=this.tropicals)==null?void 0:i.data:this.empty}),this.map.addLayer({id:this.historyLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["==","type","history"],["!=","disabled",!0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#000","line-width":4,"line-opacity":.5}}),this.map.addLayer({id:this.forecastLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["==","type","forecast"],["!=","disabled",!0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["match",["get","model"],"cma","#e2ea03","jma","#01d2b7","ecmwf","#f582f2","ukm","#f5bb47","noaa-at","#9758fb","noaa-ep","#9758fb","#fff"],"line-width":3,"line-opacity":.9,"line-dasharray":[1,2]}}),this.map.addLayer({id:this.forecastModelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","LineString"],["==","type","forecast"],["!=","disabled",!0]],layout:{"symbol-placement":"line","text-field":"{model}","text-rotation-alignment":"viewport","text-size":13},paint:{"text-color":["match",["get","model"],"cma","#000","jma","#000","ecmwf","#fff","ukm","#fff","noaa-at","#fff","noaa-ep","#fff","#000"],"text-opacity":1,"text-halo-color":["match",["get","model"],"cma","#e2ea03","jma","#01d2b7","ecmwf","#f582f2","ukm","#f5bb47","noaa-at","#9758fb","noaa-ep","#9758fb","#fff"],"text-halo-width":4}}),d=new Date().valueOf()-(h+f),console.log("[tropical] add elapsed: ",d,", total: ",f+=d)),(n=this.map)!=null&&n.getSource(this.clusterSource)?((s=this.map)==null||s.getSource(this.clusterSource).setData((o=this.tropicals)!=null&&o.active?this.tropicals.data:this.empty),d=new Date().valueOf()-(h+f),console.log("[tropical] update elapsed: ",d,", total: ",f+=d)):(this.map.addSource(this.clusterSource,{type:"geojson",data:(l=this.tropicals)!=null&&l.active?(u=this.tropicals)==null?void 0:u.data:this.empty}),this.map.addLayer({id:this.pointCircleLayer+"-border",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],paint:{"circle-radius":6,"circle-color":"#fff"}}),this.map.addLayer({id:this.pointCircleLayer,type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],paint:{"circle-radius":4,"circle-color":["case",["boolean",["==",["get","spd",["get","wind"]],null]],"#03f869",["boolean",["<",["get","spd",["get","wind"]],17.2]],"#03f869",["boolean",["<=",["get","spd",["get","wind"]],24.5]],"#f2f202",["boolean",["<=",["get","spd",["get","wind"]],32.7]],"#ff9100",["boolean",["<=",["get","spd",["get","wind"]],41.5]],"#f44336",["boolean",["<",["get","spd",["get","wind"]],51]],"#f903d0",["boolean",[">=",["get","spd",["get","wind"]],51]],"#8702f9","#fff"]}}),this.map.addLayer({id:this.pointLabelLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],layout:{"text-field":["get","format"],"text-offset":[0,-.5],"text-anchor":"bottom-left","text-size":12},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"#fff","text-halo-width":1}}),this.map.addLayer({id:this.historyPointCircleLayer+"-border",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":7,"circle-color":"#fff"}}),this.map.addLayer({id:this.historyPointCircleLayer,type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":5,"circle-color":"rgba(0,0,0,0.7)"}}),this.map.addLayer({id:this.historyPointCircleLayer+"-inner",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":3,"circle-color":"#fff"}}),this.map.addLayer({id:this.historyPointLabelLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],layout:{"text-field":["get","format"],"text-offset":[0,-.5],"text-anchor":"bottom-left","text-size":14},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"#fff","text-halo-width":1}}),this.map.addLayer({id:this.forecastNameLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showNameLabel",!0]],layout:{"text-field":["get","name"],"text-offset":[0,1.5],"text-anchor":"bottom","text-size":16,"text-allow-overlap":!0,"text-ignore-placement":!0},paint:{"text-color":"#fff","text-halo-color":"#0033ff","text-halo-width":4}}),d=new Date().valueOf()-(h+f),console.log("[tropical] add elapsed: ",d,", total: ",f+=d))}this.handleDrawCircle();const c=Re.TropicalHelper.interpolate(this.tropicals,1);this.interpolateData=JSON.parse(JSON.stringify(c)),this.interpolateData.filter(h=>h.properties.name==="kristy"&&h.properties.model==="ecmwf"),this.handleDateChange()}},handleClear(){var r;this.map&&(this.map.getLayer(this.historyLayer)&&this.map.removeLayer(this.historyLayer),this.map.getLayer(this.forecastLayer)&&this.map.removeLayer(this.forecastLayer),this.map.getLayer(this.forecastModelLayer)&&this.map.removeLayer(this.forecastModelLayer),this.map.getLayer(this.forecastNameLayer)&&this.map.removeLayer(this.forecastNameLayer),this.map.getLayer(this.pointCircleLayer)&&this.map.removeLayer(this.pointCircleLayer),this.map.getLayer(this.pointCircleLayer+"-border")&&this.map.removeLayer(this.pointCircleLayer+"-border"),this.map.getLayer(this.pointLabelLayer)&&this.map.removeLayer(this.pointLabelLayer),this.map.getLayer(this.historyPointCircleLayer)&&this.map.removeLayer(this.historyPointCircleLayer),this.map.getLayer(this.historyPointCircleLayer+"-border")&&this.map.removeLayer(this.historyPointCircleLayer+"-border"),this.map.getLayer(this.historyPointCircleLayer+"-inner")&&this.map.removeLayer(this.historyPointCircleLayer+"-inner"),this.map.getLayer(this.historyPointLabelLayer)&&this.map.removeLayer(this.historyPointLabelLayer),this.map.getLayer(this.interpolateLineLayer)&&this.map.removeLayer(this.interpolateLineLayer),(r=this.interpolateMarkers)==null||r.forEach(t=>t==null?void 0:t.remove()),this.map.getSource(this.source)&&this.map.removeSource(this.source),this.map.getSource(this.clusterSource)&&this.map.removeSource(this.clusterSource),this.map.getSource(this.interpolateSource)&&this.map.removeSource(this.interpolateSource),this.map.getLayer(this.circleLayer)&&this.map.removeLayer(this.circleLayer),this.map.getSource(this.circleSource)&&this.map.removeSource(this.circleSource))},handleDateChange(){var r,t,e,a,i,n,o,s,l,u,c,h,f,d,p,v,g,m,y,_,w,x,S,L,C,T,A,D,E,I,P,k,N,O,R,V;if((r=this.interpolateMarkers)==null||r.forEach(B=>B==null?void 0:B.remove()),this.circleSourceData.features=[],(t=this.interpolateData)!=null&&t.length&&this.tropicals.active){const B=Ue(this.date).utc().set({minute:0,second:0,millisecond:0}),H=this.interpolateData.filter(U=>U.properties.date===B.format()&&!U.properties.disabled),Y=this.handleComputePolygons(H),$=be.featureCollection([...H]);Y.forEach(U=>{$.features.push(U)}),(e=this.map)!=null&&e.getSource(this.interpolateSource)?(a=this.map)==null||a.getSource(this.interpolateSource).setData($):((i=this.map)==null||i.addSource(this.interpolateSource,{type:"geojson",data:$}),(n=this.map)==null||n.addLayer({id:this.interpolateLineLayer,type:"line",source:this.interpolateSource,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-opacity":1,"line-color":["match",["get","level"],7,"#ff9100",10,"#f44336","#ffffff"],"line-width":1}})),this.interpolateMarkers=[];for(const U of H)if(!U.properties.disabled){let q="#f44336";((s=(o=U.properties)==null?void 0:o.wind)==null?void 0:s.spd)<17.2||!((u=(l=U.properties)==null?void 0:l.wind)!=null&&u.spd)?q="#03f869":((h=(c=U.properties)==null?void 0:c.wind)==null?void 0:h.spd)>=17.2&&((d=(f=U.properties)==null?void 0:f.wind)==null?void 0:d.spd)<24.5?q="#f2f202":((v=(p=U.properties)==null?void 0:p.wind)==null?void 0:v.spd)>=24.5&&((m=(g=U.properties)==null?void 0:g.wind)==null?void 0:m.spd)<32.7?q="#ff9100":((_=(y=U.properties)==null?void 0:y.wind)==null?void 0:_.spd)>=32.7&&((x=(w=U.properties)==null?void 0:w.wind)==null?void 0:x.spd)<41.5?q="#f44336":((L=(S=U.properties)==null?void 0:S.wind)==null?void 0:L.spd)>=41.5&&((T=(C=U.properties)==null?void 0:C.wind)==null?void 0:T.spd)<51?q="#f903d0":((D=(A=U.properties)==null?void 0:A.wind)==null?void 0:D.spd)>=51?q="#8702f9":q="#f44336";const Ce=`<svg t="1719918955501"
191
191
  class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
192
192
  xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
193
193
  <path
194
194
  d="M515.17000001 169.34666667c41-77.73 95.33-96 95.33-96-240 0-434.5 194.53-434.5 434.5 0 186.47 150.78 337.7 337.06 338.48C472.11000001 923.66666667 418.00000001 941.83666667 418.00000001 941.83666667c240 0 434.5-194.54 434.5-434.5l0.5 0.5C853.00000001 321.10666667 701.81000001 169.66666667 515.17000001 169.34666667z m-0.67 468A129.5 129.5 0 1 1 644.00000001 507.83666667a129.5 129.5 0 0 1-129.5 129.5z"
195
- fill="${W}" p-id="18383"></path>
196
- <path d="M514.50000001 507.83666667m-129.5 0a129.5 129.5 0 1 0 259 0 129.5 129.5 0 1 0-259 0Z" fill="${W}"
195
+ fill="${q}" p-id="18383"></path>
196
+ <path d="M514.50000001 507.83666667m-129.5 0a129.5 129.5 0 1 0 259 0 129.5 129.5 0 1 0-259 0Z" fill="${q}"
197
197
  p-id="18384"></path>
198
198
  <path
199
199
  d="M517.16666667 654.67c-80.23 0-145.5-65.27-145.5-145.5s65.27-145.5 145.5-145.5S662.66666667 428.94 662.66666667 509.17s-65.27 145.5-145.5 145.5z m0-259A113.5 113.5 0 1 0 630.66666667 509.17a113.63 113.63 0 0 0-113.5-113.5z"
@@ -201,4 +201,77 @@
201
201
  <path
202
202
  d="M420.66666667 959.17a16.08 16.08 0 0 1-15.91-13.49A15.89 15.89 0 0 1 415.50666667 928c1.49-0.55 38.88-14.76 72.79-65.52A354.55 354.55 0 0 1 162.66666667 509.17a450.14 450.14 0 0 1 450.5-450.5 16.07 16.07 0 0 1 15.91 13.48 15.88 15.88 0 0 1-10.75 17.66c-1.58 0.58-39.13 14.9-73.07 65.95A354.22 354.22 0 0 1 871.66666667 509.17a16 16 0 0 1-0.52 4.05A450.14 450.14 0 0 1 420.66666667 959.17zM554.80666667 94.72C351.57666667 123.2 194.66666667 298.21 194.66666667 509.17c0 177.08 144.06 321.74 321.13 322.48a16 16 0 0 1 14.07 23.49c-16.11 30.42-34.27 52.37-50.85 68C682.25666667 894.63 839.16666667 719.63 839.16666667 508.67a15.94 15.94 0 0 1 0.47-3.86C837.30666667 329.33 693.82666667 187 517.80666667 186.67A16 16 0 0 1 503.66666667 163.21c16.21-30.69 34.47-52.79 51.14-68.49z"
203
203
  fill="#ffffff" p-id="18386"></path>
204
- </svg>`,H=document.createElement("div");H.className="hurricane-hourly-marker",H.innerHTML=`<div class="${S.geometry.coordinates[1]>=0?"center north":"center south"}">${se}</div>`;const ne=new j.Marker(H).setLngLat(S.geometry.coordinates).addTo(this.map);if(this.interpolateMarkers.push(ne),(Q=S.properties)!=null&&Q.showCircle){const J={radius:100,coordinates:S.geometry.coordinates},X={radius:200,coordinates:S.geometry.coordinates},q={radius:500,coordinates:S.geometry.coordinates};(K=this.circleSourceData)==null||K.features.push(x.circle(J.coordinates,J.radius,{steps:100,units:"kilometers",properties:{type:"tropicalCircle"}})),(ee=this.circleSourceData)==null||ee.features.push(x.circle(X.coordinates,X.radius,{steps:100,units:"kilometers",properties:{type:"tropicalCircle"}})),(te=this.circleSourceData)==null||te.features.push(x.circle(q.coordinates,q.radius,{steps:100,units:"kilometers",properties:{type:"tropicalCircle"}}))}(re=(ae=this.map)==null?void 0:ae.getSource(this.circleSource))==null||re.setData(this.circleSourceData)}}else(ie=this.map)!=null&&ie.getSource(this.interpolateSource)&&((G=this.map)==null||G.getSource(this.interpolateSource).setData(this.empty))},handleClick(a){var s,n,l,h,m,c,d,u;const e=a.features[0],t=(n=(s=this.tropicals)==null?void 0:s.data)==null?void 0:n.features.filter(p=>{var b;return p.geometry.type==="LineString"&&p.properties.type==="forecast"&&p.properties.name===((b=e==null?void 0:e.properties)==null?void 0:b.name)});t.sort((p,b)=>{var f,y,L,g;return((f=p.properties)==null?void 0:f.model)==="cma"?-1:((y=p.properties)==null?void 0:y.model)==="jma"?((L=b.properties)==null?void 0:L.model)==="cma"?1:-1:p.properties.model==="ecmwf"?["jma","cma"].includes((g=b.properties)==null?void 0:g.model)?1:-1:0});const o=(h=(l=this.tropicals)==null?void 0:l.data)==null?void 0:h.features.filter(p=>{var b;return p.geometry.type==="LineString"&&p.properties.type==="history"&&p.properties.name===((b=e==null?void 0:e.properties)==null?void 0:b.name)});this.activeTropicals={name:(m=e==null?void 0:e.properties)==null?void 0:m.name,forecasts:t.map(p=>p.properties),history:(c=o[0])==null?void 0:c.properties,showCircle:(u=(d=t[0])==null?void 0:d.properties)==null?void 0:u.showCircle},this.showTropicals=!0;const i=document.getElementById("active-tropical");this.activeTropicalsMarker?this.activeTropicalsMarker.setLngLat([a.lngLat.lng,a.lngLat.lat]):this.activeTropicalsMarker=new j.Marker(i).setLngLat([a.lngLat.lng,a.lngLat.lat]).setOffset([220,0]).addTo(this.map)},handleForecastToggle(a){var o,i,s,n,l,h;a.disabled=!a.disabled;const e=`${a.name}-${a.model}`,t=(i=(o=this.map)==null?void 0:o.getSource(this.source)._data)==null?void 0:i.features;t.forEach(m=>{m.properties.category===e&&(m.properties.disabled=a.disabled)}),this.interpolateData.forEach(m=>{m.properties.category===e&&(m.properties.disabled=a.disabled)}),(n=(s=this.map)==null?void 0:s.getSource(this.source))==null||n.setData(x.featureCollection(t)),(h=(l=this.map)==null?void 0:l.getSource(this.clusterSource))==null||h.setData(x.featureCollection(t)),this.handleDateChange()},handleStrikeProbability(a){this.$emit("tropicalProbability",a)},handleToggleCircles(a){var e,t;a.showCircle=!a.showCircle,(t=(e=this.tropicals.data)==null?void 0:e.features)==null||t.forEach(o=>{o.properties.name===a.name&&(o.properties.showCircle=a.showCircle)}),this.handleRender()},handleDrawCircle(){var a,e;(a=this.map)!=null&&a.getSource(this.circleSource)?(e=this.map)==null||e.getSource(this.circleSource).setData(this.circleSourceData):(this.map.addSource(this.circleSource,{type:"geojson",data:this.circleSourceData}),this.map.addLayer({id:this.circleLayer,type:"line",source:this.circleSource,filter:["all",["==","$type","Polygon"],["==","type","tropicalCircle"]],paint:{"line-color":"#fff","line-width":2,"line-opacity":1,"line-dasharray":[1,1]}}))},handleComputePolygons(a){const e=[];for(const t of a){const o=t.properties.wind,i={ne:o.r7ne>=0?o.r7ne:void 0,se:o.r7se>=0?o.r7se:void 0,sw:o.r7sw>=0?o.r7sw:void 0,nw:o.r7nw>=0?o.r7nw:void 0},s=this.handleComputeArc(t.geometry.coordinates,i,{...t.properties,level:7});e.push(s);const n={ne:o.r10ne>=0?o.r10ne:void 0,se:o.r10se>=0?o.r10se:void 0,sw:o.r10sw>=0?o.r10sw:void 0,nw:o.r10nw>=0?o.r10nw:void 0},l=this.handleComputeArc(t.geometry.coordinates,n,{...t.properties,level:10});e.push(l)}return e},handleComputeArc(a,e,t){var s;const o=[];for(const n in e){const l=e[n]??0;let h;switch(n){case"ne":h=x.lineArc(a,l*1.852,0,90,{steps:l>0?64:1});break;case"se":h=x.lineArc(a,l*1.852,90,180,{steps:l>0?64:1});break;case"sw":h=x.lineArc(a,l*1.852,180,270,{steps:l>0?64:1});break;case"nw":h=x.lineArc(a,l*1.852,270,360,{steps:l>0?64:1});break}o.push(...(s=h==null?void 0:h.geometry)==null?void 0:s.coordinates)}const i=x.lineString(o);return x.lineToPolygon(i,{properties:t})}}},Ut={id:"active-tropical",class:"active-tropical"},Zt={class:"header-box"},Gt={class:"main"},Jt={key:0},Xt={class:"sub"},qt={id:"meteoBox",class:"main-box"},Yt={class:"content"},Qt={class:"row"},Kt={class:"col col-left",style:{"justify-content":"flex-start"}},ea={class:"col col-right",style:{"justify-content":"flex-start"}},ta={class:"row"},aa={class:"col col-24",style:{"justify-content":"flex-start"}},ra={class:"forecast-models"},ia=["onClick"],oa={class:"more"};function sa(a,e,t,o,i,s){var n,l,h,m,c,d,u,p,b,f,y,L,g,v,_;return r.withDirectives((r.openBlock(),r.createElementBlock("div",Ut,[r.createElementVNode("div",Zt,[r.createElementVNode("div",{class:"iconfont close-btn",onClick:e[0]||(e[0]=w=>i.showTropicals=!1)},""),r.createElementVNode("div",Gt,[(l=(n=i.activeTropicals)==null?void 0:n.history)!=null&&l.level?(r.openBlock(),r.createElementBlock("span",Jt,r.toDisplayString((m=(h=i.activeTropicals)==null?void 0:h.history)==null?void 0:m.level)+" , ",1)):r.createCommentVNode("",!0),r.createTextVNode(r.toDisplayString((c=i.activeTropicals)==null?void 0:c.name),1)]),r.createElementVNode("div",Xt," Last update: "+r.toDisplayString(s.computeTime(((u=(d=i.activeTropicals)==null?void 0:d.history)==null?void 0:u.updated)||((f=(b=(p=i.activeTropicals)==null?void 0:p.forecasts)==null?void 0:b.filter(w=>!w.disabled)[0])==null?void 0:f.date))),1)]),r.createElementVNode("div",qt,[r.createElementVNode("div",Yt,[r.createElementVNode("div",Qt,[r.createElementVNode("div",Kt,[e[2]||(e[2]=r.createElementVNode("label",null,"Wind speed : ",-1)),r.createElementVNode("span",null,r.toDisplayString(((L=(y=i.activeTropicals)==null?void 0:y.history)==null?void 0:L.kts)||"-")+"[kts]",1)]),r.createElementVNode("div",ea,[e[3]||(e[3]=r.createElementVNode("label",null,"Pressure : ",-1)),r.createElementVNode("span",null,r.toDisplayString(((v=(g=i.activeTropicals)==null?void 0:g.history)==null?void 0:v.pressure)||"-")+"[hPa]",1)])]),r.createElementVNode("div",ta,[r.createElementVNode("div",aa,[e[4]||(e[4]=r.createElementVNode("label",{style:{width:"max-content"}},"Forecast Models : ",-1)),r.createElementVNode("div",ra,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList((_=i.activeTropicals)==null?void 0:_.forecasts,(w,z)=>{var N,V,D,R;return r.openBlock(),r.createElementBlock("div",{key:z,class:r.normalizeClass(["model",w.disabled?"":"active",z>0&&z<((V=(N=i.activeTropicals)==null?void 0:N.forecasts)==null?void 0:V.length)-1&&((R=(D=i.activeTropicals)==null?void 0:D.forecasts)==null?void 0:R.length)>2?"center-child":""]),onClick:M=>s.handleForecastToggle(w)},[r.createElementVNode("span",{class:r.normalizeClass(w.model)},r.toDisplayString(w.model),3)],10,ia)}),128))])])]),e[5]||(e[5]=r.createStaticVNode('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-726fd7f6></div><div class="row" style="padding:2px 10px;" data-v-726fd7f6><div class="legend" data-v-726fd7f6><div class="icon td" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>TD</div></div><div class="legend" data-v-726fd7f6><div class="icon ts" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>TS</div></div><div class="legend" data-v-726fd7f6><div class="icon sts" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>STS</div></div><div class="legend" data-v-726fd7f6><div class="icon ty" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>TY</div></div><div class="legend" data-v-726fd7f6><div class="icon sty" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>STY</div></div><div class="legend" data-v-726fd7f6><div class="icon supper-ty" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>Super TY</div></div></div><div class="row" style="padding:2px 10px;" data-v-726fd7f6><div class="legend" data-v-726fd7f6><div class="icon history" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>History</div></div><div class="legend" data-v-726fd7f6><div class="icon r7" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>35kts Radii</div></div><div class="legend" data-v-726fd7f6><div class="icon r10" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>50kts Radii</div></div></div>',3))]),r.createElementVNode("div",oa,[r.createElementVNode("div",{class:"button",onClick:e[1]||(e[1]=w=>s.handleStrikeProbability(i.activeTropicals))},"Strike Probability >>")])])],512)),[[r.vShow,i.showTropicals&&!a.$attrs.hideTropicalsLegend]])}const ke=k(Ht,[["render",sa],["__scopeId","data-v-726fd7f6"]]),ni="",na={name:"IdmPrecip3h",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Z,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a;this.right=(((a=document.getElementsByClassName("right-bar")[0])==null?void 0:a.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[precip3h] add elapsed: ",t,", total: ",e+=t)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0,"rgba(59, 126, 162, 0)"],[14/255,"rgba(84,170,230, 0)"],[15/255,"rgba(172, 210, 255, 0.8)"],[20/255,"rgba(51,202,248,0.8)"],[30/255,"rgba(3,248,103,0.8)"],[49/255,"rgba(14,201,3,0.8)"],[57/255,"rgba(190,226,2,0.8)"],[73/255,"rgba(248,1,1,0.8)"],[82/255,"rgba(197,5,58,0.8)"],[1,"rgba(197,5,58,0.8)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,T.vertexSchema,T.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},la={key:0};function ca(a,e,t,o,i,s){var n;return(n=t.factor)!=null&&n.active?(r.openBlock(),r.createElementBlock("div",la,[r.createElementVNode("div",{class:"legend-bars flex-center",style:r.normalizeStyle([{position:"absolute"},{right:i.right+"px",bottom:t.bottom}])},e[0]||(e[0]=[r.createElementVNode("span",null,"mm",-1),r.createElementVNode("span",null,"1.5",-1),r.createElementVNode("span",null,"2",-1),r.createElementVNode("span",null,"3",-1),r.createElementVNode("span",null,"7",-1),r.createElementVNode("span",null,"10",-1),r.createElementVNode("span",null,"20",-1),r.createElementVNode("span",null,"30",-1)]),4)])):r.createCommentVNode("",!0)}const ha=k(na,[["render",ca],["__scopeId","data-v-9708a7a3"]]),li="",da={name:"IdmVisibility",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Z,etime:void 0}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a;this.right=(((a=document.getElementsByClassName("right-bar")[0])==null?void 0:a.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[visibility] add elapsed: ",t,", total: ",e+=t)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0,"rgba(189,50,160,0.8)"],[8/255,"rgba(208,56,56,0.8)"],[27/255,"rgba(190,226,2,0.8)"],[60/255,"rgba(3,236,118,0.8)"],[160/255,"rgba(172, 210,255,0.8)"],[161/255,"rgba(172, 210,255,0)"],[1,"rgba(144,144,144,0)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,T.vertexSchema,T.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},ma={key:0};function pa(a,e,t,o,i,s){var n;return(n=t.factor)!=null&&n.active?(r.openBlock(),r.createElementBlock("div",ma,[r.createElementVNode("div",{class:"legend-bars flex-center",style:r.normalizeStyle([{position:"absolute"},{right:a.right+"px",bottom:t.bottom}])},e[0]||(e[0]=[r.createElementVNode("span",null,"nm",-1),r.createElementVNode("span",null,"0",-1),r.createElementVNode("span",null,"0.5",-1),r.createElementVNode("span",null,"1.5",-1),r.createElementVNode("span",null,"3",-1),r.createElementVNode("span",null,"9",-1)]),4)])):r.createCommentVNode("",!0)}const ya=k(da,[["render",pa],["__scopeId","data-v-f7b2fb08"]]),ci="",fa={name:"IdmWaterTemp",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Z,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a;this.right=(((a=document.getElementsByClassName("right-bar")[0])==null?void 0:a.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[water-temp] add elapsed: ",t,", total: ",e+=t)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0,"rgba(95, 143, 197)"],[46/255,"rgba(95, 143, 197)"],[69/255,"rgb(80, 140, 62)"],[92/255,"rgb(121, 146, 28)"],[115/255,"rgb(171, 161, 14)"],[138/255,"rgb(223, 177, 69)"],[161/255,"rgb(243, 150, 6)"],[184/255,"rgb(236, 95, 21)"],[207/255,"rgb(190, 65, 18)"],[230/255,"rgb(138, 43, 10)"],[1,"rgb(138, 43, 10)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,T.vertexSchema,T.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},ua={key:0};function ga(a,e,t,o,i,s){var n;return(n=t.factor)!=null&&n.active?(r.openBlock(),r.createElementBlock("div",ua,[r.createElementVNode("div",{class:"legend-bars flex-center",style:r.normalizeStyle([{position:"absolute"},{right:i.right+"px",bottom:t.bottom}])},e[0]||(e[0]=[r.createElementVNode("span",null,"°C",-1),r.createElementVNode("span",null,"0",-1),r.createElementVNode("span",null,"10",-1),r.createElementVNode("span",null,"20",-1),r.createElementVNode("span",null,"30",-1),r.createElementVNode("span",null,"40",-1)]),4)])):r.createCommentVNode("",!0)}const ba=k(fa,[["render",ga],["__scopeId","data-v-7521f582"]]),hi="",La={name:"IdmTemp",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Z,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a;this.right=(((a=document.getElementsByClassName("right-bar")[0])==null?void 0:a.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[water-temp] add elapsed: ",t,", total: ",e+=t)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0,"rgb(149, 137, 211)"],[100/255,"rgb(149, 137, 211)"],[110/255,"rgb(150, 209, 216)"],[120/255,"rgb(129, 204, 197)"],[130/255,"rgb(103, 180, 186)"],[140/255,"rgb(95, 143, 197)"],[150/255,"rgb(80, 140, 62)"],[160/255,"rgb(121, 146, 28)"],[170/255,"rgb(171, 161, 14)"],[180/255,"rgb(223, 177, 6)"],[190/255,"rgb(243, 150, 6)"],[200/255,"rgb(236, 95, 21)"],[210/255,"rgb(190, 65, 18)"],[220/255,"rgb(138, 43, 10)"],[1,"rgb(138, 43, 10)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,T.vertexSchema,T.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},wa={key:0};function va(a,e,t,o,i,s){var n;return(n=t.factor)!=null&&n.active?(r.openBlock(),r.createElementBlock("div",wa,[r.createElementVNode("div",{class:"legend-bars flex-center",style:r.normalizeStyle([{position:"absolute"},{right:i.right+"px",bottom:t.bottom}])},e[0]||(e[0]=[r.createElementVNode("span",null,"°C",-1),r.createElementVNode("span",null,"-20",-1),r.createElementVNode("span",null,"-10",-1),r.createElementVNode("span",null,"0",-1),r.createElementVNode("span",null,"10",-1),r.createElementVNode("span",null,"20",-1),r.createElementVNode("span",null,"30",-1),r.createElementVNode("span",null,"40",-1)]),4)])):r.createCommentVNode("",!0)}const xa=k(La,[["render",va],["__scopeId","data-v-25daaa82"]]),di="",_a={name:"IdmArctic",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Z,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a;this.right=(((a=document.getElementsByClassName("right-bar")[0])==null?void 0:a.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[water-temp] add elapsed: ",t,", total: ",e+=t)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0,"rgba(76, 165, 228, 0)"],[50/255,"rgba(76, 165, 228, 0)"],[51/255,"rgb(76, 165, 228)"],[102/255,"rgb(129, 204, 197)"],[153/255,"rgb(150, 209, 216)"],[204/255,"rgb(180, 209, 216)"],[1,"rgb(180, 209, 216)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,T.vertexSchema,T.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},Ca={key:0};function ka(a,e,t,o,i,s){var n;return(n=t.factor)!=null&&n.active?(r.openBlock(),r.createElementBlock("div",Ca,[r.createElementVNode("div",{class:"legend-bars flex-center",style:r.normalizeStyle([{position:"absolute"},{right:i.right+"px",bottom:t.bottom}])},e[0]||(e[0]=[r.createElementVNode("span",null,"m",-1),r.createElementVNode("span",null,"0",-1),r.createElementVNode("span",null,"0.5",-1),r.createElementVNode("span",null,"1",-1),r.createElementVNode("span",null,"1.5",-1),r.createElementVNode("span",null,"2",-1)]),4)])):r.createCommentVNode("",!0)}const Sa=k(_a,[["render",ka],["__scopeId","data-v-5bb73794"]]);/*! Element Plus Icons Vue v2.3.1 */var Ea=r.defineComponent({name:"LocationFilled",__name:"location-filled",setup(a){return(e,t)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"M512 928c23.936 0 117.504-68.352 192.064-153.152C803.456 661.888 864 535.808 864 416c0-189.632-155.84-320-352-320S160 226.368 160 416c0 120.32 60.544 246.4 159.936 359.232C394.432 859.84 488 928 512 928m0-435.2a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 140.8a204.8 204.8 0 1 1 0-409.6 204.8 204.8 0 0 1 0 409.6"})]))}}),Pa=Ea;const mi="",za={name:"IdmPoint",components:{LocationFilled:Pa},emits:["point","more"],props:{map:{type:Object},show:{type:Boolean},timeZone:{type:Number,default:0},meteo:{type:Object}},data(){return{showMeteo:!0,meteoMarker:void 0,helper:ce}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){this.map&&this.show&&this.handleBind()}},meteo:{handler(){this.meteo?(this.showMeteo=!0,this.handleRender()):this.showMeteo=!1}}},computed:{computeTime(){return function(a){return a?`${B(a).utc().utcOffset(this.timeZone).format("MMM-DD,HHmm")}`:"-"}},computeTimeZone(){return`(UTC ${this.timeZone<0?this.timeZone:"+"+this.timeZone})`},computeLat(){return function(a,e=4){return C.LngLatHelper.lat2pretty(a,e).pretty}},computeLng(){return function(a,e=4){return C.LngLatHelper.lng2pretty(a,e).pretty}},roundPrecision(){return function(a,e=4){return isNaN(a)?"-":C.LngLatHelper.roundPrecision(a,e)}}},methods:{handleBind(){var a,e;this.show?((a=this.map)==null||a.on("click",this.handleClick),this.map.getCanvas().style.cursor="pointer"):((e=this.map)==null||e.off("click",this.handleClick),this.map.getCanvas().style.cursor="grab",this.showMeteo=!1)},handleClick(a){a.originalEvent.stopPropagation();const e=a.originalEvent.target.className;e.indexOf("close")>-1?this.showMeteo=!1:e==="more"?this.$emit("more",this.meteo):this.$emit("point",a.lngLat)},handleRender(){var a;if(this.meteo){const e=document.getElementById("point-meteo");this.meteoMarker?(a=this.meteoMarker)==null||a.setLngLat([this.meteo.lng,this.meteo.lat]):this.meteoMarker=new j.Marker(e).setLngLat([this.meteo.lng,this.meteo.lat]).addTo(this.map)}}}},Na={id:"point-meteo",class:"point-meteo"},Ta={class:"meteo-box"},Va={class:"header-box flex-between"},Ia={class:"flex-center"},Da={class:"lnglat"},Ra={class:"main-box"},Wa={class:"summary-row flex-between"},Aa={class:"summary flex-center"},Ba={class:"temp"},Ma={class:"des info"},Oa={class:"flex-start"},ja={class:"flex-start"},Fa={class:"date flex-col-center-end"},$a={class:""},Ha={class:""},Ua={class:"row flex-space"},Za={class:"row flex-space"},Ga={class:"row flex-space"},Ja={class:"row flex-space"},Xa={class:"row flex-space"},qa={class:"row flex-space"},Ya={class:"row flex-space"};function Qa(a,e,t,o,i,s){var h,m,c,d,u,p,b,f,y,L,g,v,_,w,z,N,V,D,R,M,Q,K,ee,te,ae,re,ie,G,O,F,oe,$,S,W,se,H,ne,J,X,q,de,me,pe,ye,fe,ue,ge,be,Le,we,ve,xe;const n=r.resolveComponent("LocationFilled"),l=r.resolveComponent("ElIcon");return r.withDirectives((r.openBlock(),r.createElementBlock("div",Na,[r.createElementVNode("div",Ta,[r.createElementVNode("div",Va,[r.createElementVNode("div",Ia,[r.createVNode(l,{size:"22"},{default:r.withCtx(()=>[r.createVNode(n)]),_:1}),r.createElementVNode("div",Da,r.toDisplayString(s.computeLat((h=t.meteo)==null?void 0:h.lat))+","+r.toDisplayString(s.computeLng((m=t.meteo)==null?void 0:m.lng)),1)]),r.createElementVNode("div",{class:"iconfont close",onClick:e[0]||(e[0]=Ee=>i.showMeteo=!1)},"")]),r.createElementVNode("div",Ra,[r.createElementVNode("div",Wa,[r.createElementVNode("div",Aa,[e[4]||(e[4]=r.createElementVNode("div",{class:"iconfont icon",style:{"margin-right":"5px"}},"",-1)),r.createElementVNode("div",Ba,[r.createElementVNode("span",null,[r.createTextVNode(r.toDisplayString((b=(p=(u=(d=(c=t.meteo)==null?void 0:c.weather)==null?void 0:d[0])==null?void 0:u.daily)==null?void 0:p.temperature_2m_min)==null?void 0:b[0]),1),e[1]||(e[1]=r.createElementVNode("span",{style:{"font-size":"14px"}},"°C",-1))])]),r.createElementVNode("div",Ma,[r.createElementVNode("div",Oa,[e[2]||(e[2]=r.createElementVNode("span",null,"Precip: ",-1)),r.createElementVNode("span",null,r.toDisplayString(s.roundPrecision((y=(f=t.meteo)==null?void 0:f.precip)==null?void 0:y.inter6h,2))+" mm",1)]),r.createElementVNode("div",ja,[e[3]||(e[3]=r.createElementVNode("span",null,"Visibility: ",-1)),r.createElementVNode("span",null,r.toDisplayString(s.roundPrecision(((L=t.meteo)==null?void 0:L.visibility)/1852,0))+" nm",1)])])]),r.createElementVNode("div",Fa,[r.createElementVNode("div",$a,r.toDisplayString(s.computeTime((g=t.meteo)==null?void 0:g.utc)),1),r.createElementVNode("div",Ha,r.toDisplayString(s.computeTimeZone),1)])]),r.createElementVNode("div",Ua,[e[5]||(e[5]=r.createElementVNode("label",null,"Wind",-1)),r.createElementVNode("span",null,r.toDisplayString(((_=(v=t.meteo)==null?void 0:v.wind)==null?void 0:_.direction)||"-")+"/"+r.toDisplayString(s.roundPrecision((z=(w=t.meteo)==null?void 0:w.wind)==null?void 0:z.kts,1))+"[kts]/"+r.toDisplayString((V=(N=t.meteo)==null?void 0:N.wind)==null?void 0:V.scale)+"[BF]/"+r.toDisplayString(s.roundPrecision((R=(D=t.meteo)==null?void 0:D.gusts)==null?void 0:R.kts,1))+"[kts]",1)]),r.createElementVNode("div",Za,[e[6]||(e[6]=r.createElementVNode("label",null,"Wind.Wave",-1)),r.createElementVNode("span",null,r.toDisplayString(((K=(Q=(M=t.meteo)==null?void 0:M.wave)==null?void 0:Q.wd)==null?void 0:K.direction)||"-")+"/"+r.toDisplayString(s.roundPrecision((ae=(te=(ee=t.meteo)==null?void 0:ee.wave)==null?void 0:te.wd)==null?void 0:ae.height,1))+"[m]/"+r.toDisplayString(s.roundPrecision((G=(ie=(re=t.meteo)==null?void 0:re.wave)==null?void 0:ie.wd)==null?void 0:G.period,1))+"[s]",1)]),r.createElementVNode("div",Ga,[e[7]||(e[7]=r.createElementVNode("label",null,"Swell",-1)),r.createElementVNode("span",null,r.toDisplayString(((oe=(F=(O=t.meteo)==null?void 0:O.wave)==null?void 0:F.swell)==null?void 0:oe.direction)||"-")+"/"+r.toDisplayString(s.roundPrecision((W=(S=($=t.meteo)==null?void 0:$.wave)==null?void 0:S.swell)==null?void 0:W.height,1))+"[m]/"+r.toDisplayString(s.roundPrecision((ne=(H=(se=t.meteo)==null?void 0:se.wave)==null?void 0:H.swell)==null?void 0:ne.period,1))+"[s]",1)]),r.createElementVNode("div",Ja,[e[8]||(e[8]=r.createElementVNode("label",null,"Sig.Wave",-1)),r.createElementVNode("span",null,r.toDisplayString(((q=(X=(J=t.meteo)==null?void 0:J.wave)==null?void 0:X.sig)==null?void 0:q.direction)||"-")+"/"+r.toDisplayString(s.roundPrecision((pe=(me=(de=t.meteo)==null?void 0:de.wave)==null?void 0:me.sig)==null?void 0:pe.height,1))+"[m]/"+r.toDisplayString(s.roundPrecision((ue=(fe=(ye=t.meteo)==null?void 0:ye.wave)==null?void 0:fe.sig)==null?void 0:ue.period,1))+"[s]",1)]),r.createElementVNode("div",Xa,[e[9]||(e[9]=r.createElementVNode("label",null,"Current",-1)),r.createElementVNode("span",null,r.toDisplayString(((be=(ge=t.meteo)==null?void 0:ge.current)==null?void 0:be.direction)||"-")+"/"+r.toDisplayString(s.roundPrecision((we=(Le=t.meteo)==null?void 0:Le.current)==null?void 0:we.kts,2))+"[kts]",1)]),r.createElementVNode("div",qa,[e[10]||(e[10]=r.createElementVNode("label",null,"Temp",-1)),r.createElementVNode("span",null,r.toDisplayString(s.roundPrecision((ve=t.meteo)==null?void 0:ve.temp,0))+"[°C]",1)]),r.createElementVNode("div",Ya,[e[11]||(e[11]=r.createElementVNode("label",null,"Water Temp",-1)),r.createElementVNode("span",null,r.toDisplayString(s.roundPrecision((xe=t.meteo)==null?void 0:xe.waterTemp,2))+"[°C]",1)])]),r.createCommentVNode("",!0)])],512)),[[r.vShow,i.showMeteo]])}const Ka=k(za,[["render",Qa],["__scopeId","data-v-77ef2fb7"]]),er={name:"IdmWarZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"war-zone-source",zoneLayer:"war-zone-layer",zoneLabelLayer:"war-zone-label-layer"}},watch:{zone:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.zone&&(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-color":"#f44336","fill-opacity":.4}},this.beforeLayer),this.map.addLayer({id:this.zoneLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":1,"line-color":"#f44336"}},this.beforeLayer),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-1]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLayer+"-border")&&this.map.removeLayer(this.zoneLayer+"-border"),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function tr(a,e,t,o,i,s){return r.openBlock(),r.createElementBlock("div")}const ar=k(er,[["render",tr]]),rr={name:"IdmGmdssArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"gmdss-area-source",areaLayer:"gmdss-area-layer",areaLabelLayer:"gmdss-area-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["match",["get","val"],"AreaI","#EB8996","AreaII","#6F448B","AreaIII","#3E8BD3","AreaIV","#5EBCC4","AreaV","#00AAE7","AreaVI","#9CCE6D","AreaVII","#F4AE00","AreaVIII","#EF9A85","AreaIX","#00AAA7","AreaX","#7AC49F","AreaXI","#DFDFDF","AreaXII","#FFF974","AreaXIII","#EF9A85","AreaXIV","#86A2D1","AreaXV","#EC8972","AreaXVI","#EAC2DA","AreaXVII","#B9C8E7","AreaXVIII","#BBA1C8","AreaXIX","#FAE0BD","AreaXX","#DBECC8","AreaXXI","#D496AF","#ffffff"]}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":12,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-opacity":.8,"text-color":"#000"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function ir(a,e,t,o,i,s){return r.openBlock(),r.createElementBlock("div")}const or=k(rr,[["render",ir]]),sr={name:"IdmEcaZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"eca-zone-source",zoneLayer:"eca-zone-layer",zoneLabelLayer:"eca-zone-label-layer"}},watch:{zone:{handler(){this.zone?this.handleRender():this.handleClear()}}},methods:{handleRender(){var a;this.map?(this.handleClear(),this.zone&&(this.map.getSource(this.source)?(a=this.map)==null||a.getSource(this.source).setData(this.zone):(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":"#05f324"}}),this.map.addLayer({id:this.zoneLayer+"-border",type:"line",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-color":"#04c021","line-width":1,"line-opacity":1}},this.beforeLayer),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-max-width":16,"text-justify":"left","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}})))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLayer+"-border")&&this.map.removeLayer(this.zoneLayer+"-border"),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function nr(a,e,t,o,i,s){return r.openBlock(),r.createElementBlock("div")}const lr=k(sr,[["render",nr]]),pi="",cr={name:"IdmAlertZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"alert-zone-source",polygonLayer:"alert-zone-polygon-layer",polygonLabelLayer:"alert-zone-polygon-label-layer",lineLayer:"alert-zone-line-layer",lineLabelLayer:"alert-zone-line-label-layer",pointLayer:"alert-zone-point-layer",showZone:!1,form:{}}},watch:{zone:{handler(){var a,e;this.zone?(this.handleRender(),(a=this.map)==null||a.on("click",[this.polygonLabelLayer,this.lineLabelLayer,this.pointLayer],this.handleClick)):(this.handleClear(),(e=this.map)==null||e.off("click",[this.polygonLabelLayer,this.lineLabelLayer,this.pointLayer],this.handleClick))}}},methods:{handleClick(a){var o;const e=a.features[0],t=(o=this.zone)==null?void 0:o.features.filter(i=>{var s;return i.properties.id===((s=e==null?void 0:e.properties)==null?void 0:s.id)})[0];if(t){this.showZone=!0,this.form={...t.properties};const i=document.getElementById("idm-gl3-zone-info");this.marker?this.marker.setLngLat([a.lngLat.lng,a.lngLat.lat]):this.marker=new j.Marker(i).setLngLat([a.lngLat.lng,a.lngLat.lat]).setOffset([0,0]).addTo(this.map)}},handleRender(){var a;this.map?(this.handleClear(),this.zone&&(this.map.getSource(this.source)?(a=this.map)==null||a.getSource(this.source).setData(this.zone):(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.polygonLayer,type:"fill",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"fill-outline-color":"#d57d02","fill-opacity":.4,"fill-color":"#d57d02"}}),this.map.addLayer({id:this.polygonLayer+"-border",type:"line",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-width":1,"line-color":"#d57d02"}}),this.map.addLayer({id:this.lineLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["!=","disabled",!0]],paint:{"line-color":"#d57d02","line-width":2}}),this.map.addLayer({id:this.polygonLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-image":"alert","icon-size":.08,"icon-allow-overlap":!0,"icon-rotation-alignment":"viewport"},paint:{"icon-opacity":.8}}),this.map.addLayer({id:this.lineLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","LineString"],["!=","disabled",!0]],layout:{"symbol-placement":"line-center","icon-image":"alert","icon-size":.08,"icon-allow-overlap":!0,"icon-rotation-alignment":"viewport"},paint:{"icon-opacity":.8}}),this.map.addLayer({id:this.pointLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-image":"alert","icon-size":.08},paint:{"icon-opacity":.8}})))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.polygonLayer)&&this.map.removeLayer(this.polygonLayer),this.map.getLayer(this.polygonLayer+"-border")&&this.map.removeLayer(this.polygonLayer+"-border"),this.map.getLayer(this.polygonLabelLayer)&&this.map.removeLayer(this.polygonLabelLayer),this.map.getLayer(this.lineLayer)&&this.map.removeLayer(this.lineLayer),this.map.getLayer(this.lineLabelLayer)&&this.map.removeLayer(this.lineLabelLayer),this.map.getLayer(this.pointLayer)&&this.map.removeLayer(this.pointLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},hr={id:"idm-gl3-zone-info"},dr=["innerHTML"];function mr(a,e,t,o,i,s){var n;return r.withDirectives((r.openBlock(),r.createElementBlock("div",hr,[r.createElementVNode("div",{class:"iconfont close",onClick:e[0]||(e[0]=l=>i.showZone=!1)},""),r.createElementVNode("div",{class:"rich-context",innerHTML:(n=i.form)==null?void 0:n.name},null,8,dr)],512)),[[r.vShow,i.showZone]])}const pr=k(cr,[["render",mr]]),yi="",yr={name:"IdmPort",props:{map:{type:Object},port:{type:Object},beforeLayer:{type:String}},emits:["port"],data(){return{source:"port-source",layer:"port-layer",showPort:!1,form:{},marker:void 0}},computed:{computeLat(){return function(a){return C.LngLatHelper.lat2pretty(a,4).pretty}},computeLng(){return function(a){return C.LngLatHelper.lng2pretty(a,4).pretty}}},watch:{port:{handler(){var a,e;this.port?(this.handleRender(),(a=this.map)==null||a.on("click",[this.layer],this.handleClick)):(this.handleClear(),(e=this.map)==null||e.off("click",[this.layer],this.handleClick))}}},methods:{handleClick(a){var o;const e=a.features[0],t=(o=this.port)==null?void 0:o.features.filter(i=>{var s;return i.properties.id===((s=e==null?void 0:e.properties)==null?void 0:s.id)})[0];if(t){this.showPort=!0,this.form={...t.properties},this.form.lng=t.geometry.coordinates[0],this.form.lat=t.geometry.coordinates[1];const i=document.getElementById("port-info");this.marker?this.marker.setLngLat([a.lngLat.lng,a.lngLat.lat]):this.marker=new j.Marker(i).setLngLat([a.lngLat.lng,a.lngLat.lat]).setOffset([0,-85]).addTo(this.map)}},handleEmit(){this.$emit("port",this.form)},handleRender(){var a;this.map?this.port&&(this.map.getSource(this.source)?(a=this.map)==null||a.getSource(this.source).setData(this.port):(this.map.addSource(this.source,{type:"geojson",data:this.port}),this.map.addLayer({id:this.layer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"port","text-anchor":"left","text-field":"{name}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[1,0]},paint:{"text-color":"rgba(0, 0, 0, 0.8)","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.showPort=!1,this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},fr={id:"port-info"},ur={class:"port-box"},gr={class:"flex-start"},br={class:"flex-start"},Lr={class:"flex-start"},wr={class:"flex-start",style:{"align-items":"flex-start"}};function vr(a,e,t,o,i,s){return r.withDirectives((r.openBlock(),r.createElementBlock("div",fr,[r.createElementVNode("div",{class:"close iconfont",onClick:e[0]||(e[0]=n=>i.showPort=!1)},""),r.createElementVNode("div",ur,[r.createElementVNode("div",gr,[e[2]||(e[2]=r.createElementVNode("label",null,"Name : ",-1)),r.createElementVNode("span",{onClick:e[1]||(e[1]=(...n)=>s.handleEmit&&s.handleEmit(...n))},r.toDisplayString(i.form.name),1)]),r.createElementVNode("div",br,[e[3]||(e[3]=r.createElementVNode("label",null,"Position : ",-1)),r.createElementVNode("span",null,r.toDisplayString(s.computeLat(i.form.lat))+", "+r.toDisplayString(s.computeLng(i.form.lng)),1)]),r.createElementVNode("div",Lr,[e[4]||(e[4]=r.createElementVNode("label",null,"LoCode : ",-1)),r.createElementVNode("span",null,r.toDisplayString(i.form.loCode||"-"),1)]),r.createElementVNode("div",wr,[e[5]||(e[5]=r.createElementVNode("label",null,"Region : ",-1)),r.createElementVNode("span",null,r.toDisplayString(i.form.zoneName||"-"),1)])])],512)),[[r.vShow,i.showPort]])}const xr=k(yr,[["render",vr],["__scopeId","data-v-c07e4c45"]]),_r={name:"IdmLoadLine",props:{map:{type:Object},line:{type:Object},beforeLayer:{type:String}},data(){return{source:"load-line-source",lineLayer:"load-line-layer",lineLabelLayer:"load-line-label-layer"}},watch:{line:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.line&&(this.map.addSource(this.source,{type:"geojson",data:this.line}),this.map.addLayer({id:this.lineLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.75,"fill-color":["match",["get","val"],"LLGreen","#A0C0C0","LLRed","#F5A39D","LLBlue","#6B94E4","#ffffff"]}},this.beforeLayer),this.map.addLayer({id:this.lineLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{lbl} (Length < {shipLength}, {start} - {end})","text-rotation-alignment":"viewport","text-offset":[0,1],"text-size":10,"text-allow-overlap":!0},paint:{"text-opacity":.8}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.lineLayer)&&this.map.removeLayer(this.lineLayer),this.map.getLayer(this.lineLabelLayer)&&this.map.removeLayer(this.lineLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Cr(a,e,t,o,i,s){return r.openBlock(),r.createElementBlock("div")}const kr=k(_r,[["render",Cr]]),Sr={name:"IdmTimezone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"time-zone-source",zoneLayer:"time-zone-layer",zoneLabelLayer:"time-zone-label-layer"}},watch:{zone:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.zone&&(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["match",["get","offSet"],"-11.5","rgba(255,0,0,0.4)","-11","rgba(0,255,0,0.3)","-10.5","rgba(0,255,0,0.3)","-10","rgba(0,0,255,0.3)","-9.5","rgba(0,0,255,0.3)","-9","rgba(255,0,0,0.4)","-8.5","rgba(255,0,0,0.4)","-8","rgba(0,255,0,0.3)","-7.5","rgba(0,255,0,0.3)","-7","rgba(0,0,255,0.3)","-6.5","rgba(0,0,255,0.3)","-6","rgba(255,0,0,0.4)","-5.5","rgba(255,0,0,0.4)","-5","rgba(0,255,0,0.3)","-4.5","rgba(0,255,0,0.3)","-4","rgba(0,0,255,0.3)","-3.5","rgba(0,0,255,0.3)","-3","rgba(255,0,0,0.4)","-2.5","rgba(255,0,0,0.4)","-2","rgba(0,255,0,0.3)","-1.5","rgba(0,255,0,0.3)","-1","rgba(0,0,255,0.3)","-0.5","rgba(0,0,255,0.3)","+0","rgba(255,0,0,0.4)","+0.5","rgba(255,0,0,0.4)","+1","rgba(0,255,0,0.3)","+1.5","rgba(0,255,0,0.3)","+2","rgba(0,0,255,0.3)","+2.5","rgba(0,0,255,0.3)","+3","rgba(255,0,0,0.4)","+3.5","rgba(255,0,0,0.4)","+4","rgba(0,255,0,0.3)","+4.5","rgba(0,255,0,0.3)","+5","rgba(0,0,255,0.3)","+5.5","rgba(0,0,255,0.3)","+6","rgba(255,0,0,0.4)","+6.5","rgba(255,0,0,0.4)","+7","rgba(0,255,0,0.3)","+7.5","rgba(0,255,0,0.3)","+8","rgba(0,0,255,0.3)","+8.5","rgba(0,0,255,0.3)","+9","rgba(255,0,0,0.4)","+9.5","rgba(255,0,0,0.4)","+10","rgba(0,255,0,0.3)","+10.5","rgba(0,255,0,0.3)","+11","rgba(0,0,255,0.3)","+11.5","rgba(0,0,255,0.3)","rgba(255,0,0,0.4)"]}}),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{offSet}","text-rotation-alignment":"viewport","text-size":12,"text-offset":[0,1]},paint:{"text-opacity":.8,"text-color":"#fff"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Er(a,e,t,o,i,s){return r.openBlock(),r.createElementBlock("div")}const Pr=k(Sr,[["render",Er]]),zr={name:"IdmVoluntaryReportingArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"vra-source",areaLayer:"vra-layer",areaLabelLayer:"vra-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":"#9f30f9"}},this.beforeLayer),this.map.addLayer({id:this.areaLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":1,"line-color":"#9f30f9"}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLayer+"-border")&&this.map.removeLayer(this.areaLayer+"-border"),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Nr(a,e,t,o,i,s){return r.openBlock(),r.createElementBlock("div")}const Tr=k(zr,[["render",Nr]]),Vr={name:"IdmSpecialArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"special-area-source",areaLayer:"special-area-layer",areaLabelLayer:"special-area-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.area.features.forEach(a=>{a.geometry.type==="Polygon"&&a.geometry.coordinates.forEach(e=>C.LngLatHelper.convertToMonotonicLng2(e))}),this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":["match",["get","val"],"DefaultStyle","rgb(0,0,0)","JWCriskArea","rgb(0,0,0)","rgb(0,0,0)"]}},this.beforeLayer),this.map.addLayer({id:this.areaLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":.4,"line-color":"rgb(0,0,0)"}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLayer+"-border")&&this.map.removeLayer(this.areaLayer+"-border"),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Ir(a,e,t,o,i,s){return r.openBlock(),r.createElementBlock("div")}const Dr=k(Vr,[["render",Ir]]),Rr={name:"IdmTerminator",props:{map:{type:Object},area:{type:Object}},data(){return{source:"terminator-source",layer:"terminator-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.layer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":"rgba(0, 0, 0, 0.4)"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Wr(a,e,t,o,i,s){return r.openBlock(),r.createElementBlock("div")}const Ar=k(Rr,[["render",Wr]]),fi="",Br={name:"IdmLatLng",props:{map:{type:Object},show:{type:Boolean},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{lngLat:void 0,source:"idm-lat-lng-source",layer:"idm-lat-lng-layer",labelLayer:"idm-lat-lng-label-layer",right:10}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){var a;this.map&&((a=this.map)==null||a.on("mousemove",this.handleMouseMove))},immediate:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("legend-bars")[0])==null?void 0:a.clientWidth)||-10)+(((e=document.getElementsByClassName("right-bar")[0])==null?void 0:e.clientWidth)||0)+20},immediate:!0}},methods:{handleBind(){var a,e;this.show?((a=this.map)==null||a.on("zoomend",this.handleZoomEnd),this.handleRender()):(this.handleClear(),(e=this.map)==null||e.off("zoomend",this.handleZoomEnd))},handleMouseMove(a){const e=a.lngLat,t=C.LngLatHelper.lng2pretty(e.lng,2),o=C.LngLatHelper.lat2pretty(e.lat,2);this.lngLat={lng:t,lat:o}},handleComputeLatLngs(){var o;const a=(o=this.map)==null?void 0:o.getZoom();console.log(a);let e=30;a>4?e=10:a>3&&(e=15);const t=[];for(let i=-60;i<90;i+=e)t.push({type:"Feature",geometry:{type:"LineString",coordinates:[[-180,i],[180,i]]}});for(let i=-180;i<180;i+=e)t.push({type:"Feature",geometry:{type:"LineString",coordinates:[[i,-90],[i,90]]}});for(let i=180;i>-180;i-=e)for(let s=-60;s<90;s+=e)t.push({type:"Feature",geometry:{type:"Point",coordinates:[i,s]},properties:{val:`${s>0?s+" N":s===0?s:s*-1+" S"}, ${i>0?i+" E":i*-1+" W"}`}});return t},handleZoomEnd(){var e;const a=this.handleComputeLatLngs();(e=this.map)==null||e.getSource(this.source).setData(x.featureCollection(a))},handleRender(){if(this.map){const a=this.handleComputeLatLngs();this.map.addSource(this.source,{type:"geojson",data:{type:"FeatureCollection",features:a}}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"rgba(0, 0, 0, 0.3)","line-width":1}}),this.map.addLayer({id:this.labelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{val}","text-rotation-alignment":"viewport","text-offset":[0,1],"text-size":10,"text-allow-overlap":!0},paint:{"text-opacity":.8}})}},handleClear(){var a,e,t,o,i,s;(a=this.map)!=null&&a.getLayer(this.layer)&&((e=this.map)==null||e.removeLayer(this.layer)),(t=this.map)!=null&&t.getLayer(this.labelLayer)&&((o=this.map)==null||o.removeLayer(this.labelLayer)),(i=this.map)!=null&&i.getSource(this.source)&&((s=this.map)==null||s.removeSource(this.source))}}};function Mr(a,e,t,o,i,s){return i.lngLat?(r.openBlock(),r.createElementBlock("div",{key:0,class:"lat-lng-tip",style:r.normalizeStyle({right:i.right+"px",bottom:t.bottom})},[r.createElementVNode("span",null,r.toDisplayString(i.lngLat.lat.pretty),1),e[0]||(e[0]=r.createElementVNode("span",null,", ",-1)),r.createElementVNode("span",null,r.toDisplayString(i.lngLat.lng.pretty),1)],4)):r.createCommentVNode("",!0)}const Se=k(Br,[["render",Mr],["__scopeId","data-v-73241fe7"]]),Or={name:"IdmMeasure",props:{map:{type:Object},show:{type:Boolean}},data(){return{geojson:[],source:"measure-source",layer:"measure-layer",labelLayer:"measure-label-layer",tmpSource:"measure-tmp-source",tmpLayer:"measure-tmp-layer",tmpLabelLayer:"measure-tmp-label-layer",closeMarkers:{},pointMarkers:{},tipMarker:void 0,contextmenu:void 0,navigation:"RL"}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){this.map&&this.handleBind()}}},methods:{handleBind(){var a,e,t,o,i,s,n,l,h,m;if(this.show)(a=this.map)==null||a.getCanvas().addEventListener("keydown",this.handleKeydown),(e=this.map)==null||e.on("mousemove",this.handleMove),(t=this.map)==null||t.on("dblclick",this.handleDblClick),(o=this.map)==null||o.on("click",this.handleClick),(i=this.map)==null||i.on("contextmenu",this.handleContextmenu),this.map&&(this.map.getCanvas().style.cursor="crosshair");else{(s=this.map)==null||s.getCanvas().removeEventListener("keydown",this.handleKeydown),(n=this.map)==null||n.off("mousemove",this.handleMove),(l=this.map)==null||l.off("dblclick",this.handleDblClick),(h=this.map)==null||h.off("click",this.handleClick),(m=this.map)==null||m.off("contextmenu",this.handleContextmenu);for(const c of this.geojson)this.handleClear(c,!0);this.geojson=[],this.map&&(this.map.getCanvas().style.cursor="grab")}},handleKeydown(a){if(a.key==="Shift"){this.navigation=this.navigation==="RL"?"GC":"RL";const t=this.geojson.at(-1).features.filter(o=>o.geometry.type==="Point");t.length&&(t.at(-1).properties.mode=this.navigation)}},handleDrag(a){var t,o,i,s,n,l,h,m,c,d;const e=(o=(t=a.target)==null?void 0:t._element)==null?void 0:o.id;if((e==null?void 0:e.split("-").length)===2){const u=this.geojson.filter(y=>y.id===e.split("-")[0])[0];this.pointMarkers[u.id].filter(y=>{var L;return((L=y._element)==null?void 0:L.id)===e})[0].setLngLat([(s=(i=a.target)==null?void 0:i._lngLat)==null?void 0:s.lng,(l=(n=a.target)==null?void 0:n._lngLat)==null?void 0:l.lat]);let b;u.features.forEach((y,L)=>{if(y.geometry.type==="Point"&&y.properties.id==e.split("-")[1]){b=L;return}});const f=u.features.filter(y=>y.geometry.type==="Point");this.handleTmpPointUpdate(u,f[b-1],{lng:(m=(h=a.target)==null?void 0:h._lngLat)==null?void 0:m.lng,lat:(d=(c=a.target)==null?void 0:c._lngLat)==null?void 0:d.lat,properties:f[b].properties},b===f.length-1?void 0:f[b+1])}},handleDragEnd(a){var t,o,i,s,n,l,h,m,c,d;const e=(o=(t=a.target)==null?void 0:t._element)==null?void 0:o.id;if((e==null?void 0:e.split("-").length)===2){const u=this.geojson.filter(f=>f.id===e.split("-")[0])[0];this.pointMarkers[u.id].filter(f=>{var y;return((y=f._element)==null?void 0:y.id)===e})[0].setLngLat([(s=(i=a.target)==null?void 0:i._lngLat)==null?void 0:s.lng,(l=(n=a.target)==null?void 0:n._lngLat)==null?void 0:l.lat]);const b=u.features.filter(f=>f.geometry.type==="Point"&&f.properties.id==e.split("-")[1])[0];b.geometry.coordinates=[(m=(h=a.target)==null?void 0:h._lngLat)==null?void 0:m.lng,(d=(c=a.target)==null?void 0:c._lngLat)==null?void 0:d.lat],u.features=u.features.filter(f=>f.geometry.type==="Point"),this.handlePointUpdate(u)}},handleContextmenu(a){var t,o,i,s;a.preventDefault(),(t=this.contextmenu)==null||t.remove();const e=(s=(i=(o=a.originalEvent)==null?void 0:o.target)==null?void 0:i.parentElement)==null?void 0:s.id;if((e==null?void 0:e.split("-").length)===2){const l=this.geojson.filter(h=>h.id===e.split("-")[0])[0].features.filter(h=>h.geometry.type==="Point");if(l.length>2&&l.filter(m=>m.properties.id===(e==null?void 0:e.split("-")[1]))[0]){const m=document.createElement("div");m.className="point-contextmenu-marker",m.innerHTML=`<span id="del-${e}" class="del-point">Del</span>`,this.contextmenu=new j.Marker(m).setOffset([24,0]).setLngLat([a.lngLat.lng,a.lngLat.lat]).addTo(this.map)}}},handleClick(a){var t,o,i,s,n;(t=this.contextmenu)==null||t.remove();const e=a.originalEvent.target.className;if(e==="marker-close"){const l=(i=(o=a.originalEvent)==null?void 0:o.srcElement)==null?void 0:i.id,h=this.geojson.filter(m=>m.id===l)[0];h&&this.handleClear(h,!0),this.geojson=this.geojson.filter(m=>m.id!==l)}else if(e==="del-point"){const l=(n=(s=a.originalEvent.target.id)==null?void 0:s.replace("del-",""))==null?void 0:n.split("-"),h=this.geojson.filter(m=>m.id===l[0])[0];h.features=h.features.filter(m=>m.geometry.type==="Point"&&m.properties.id!==l[1]),this.handlePointUpdate(h)}else if(e!=="marker-label"){let l=this.geojson.at(-1);l||(l=x.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(l)),l.features=l.features.filter(m=>m.geometry.type==="Point");const h=x.feature({type:"Point",coordinates:[a.lngLat.lng,a.lngLat.lat]},{id:new Date().getTime().toString(),mode:this.navigation});l.features.push(h),this.handlePointUpdate(l)}},handlePointUpdate(a){const e=a.features;if(e.length>1){let t=0;const o=[];for(let i=1;i<e.length;i++){const s=e[i-1],n=e[i],l=s.properties,h={lng:s.geometry.coordinates[0],lat:s.geometry.coordinates[1]},m={lng:n.geometry.coordinates[0],lat:n.geometry.coordinates[1]},c=C.LaneHelper.calculateDistance(h,m,l.mode==="RL",2),d=C.LaneHelper.calculateBearing(h,m,l.mode==="RL",2);t=C.LngLatHelper.roundPrecision(t+c,2);let u;l.mode==="RL"?u=C.LngLatHelper.convertToMonotonicLng([h,m]):u=C.LngLatHelper.convertToMonotonicLng(C.LaneHelper.interpolateCoordinates(h,m,200));const p=x.lineString(u.map(b=>[b.lng,b.lat]));p.properties.dist=c,p.properties.bearing=d,p.properties.total=t,o.push(p)}e.push(...o),a.total=t}return this.handleRender(a),a},handleTmpPointUpdate(a,e,t,o){const i=x.featureCollection([]);let s,n;if(e){const h=e.properties,m={lng:e.geometry.coordinates[0],lat:e.geometry.coordinates[1]},c={lng:t.lng,lat:t.lat};s=C.LaneHelper.calculateDistance(m,c,h.mode==="RL",2),n=C.LaneHelper.calculateBearing(m,c,h.mode==="RL",2);let d;h.mode==="RL"?d=C.LngLatHelper.convertToMonotonicLng([m,c]):d=C.LngLatHelper.convertToMonotonicLng(C.LaneHelper.interpolateCoordinates(m,c,200));const u=x.lineString(d.map(p=>[p.lng,p.lat]));u.properties.dist=s,u.properties.bearing=n,i.features.push(u)}if(o){const h=t.properties,m=t,c={lng:o.geometry.coordinates[0],lat:o.geometry.coordinates[1]};s=C.LaneHelper.calculateDistance(m,c,h.mode==="RL",2),n=C.LaneHelper.calculateBearing(m,c,h.mode==="RL",2);let d;h.mode==="RL"?d=C.LngLatHelper.convertToMonotonicLng([m,c]):d=C.LngLatHelper.convertToMonotonicLng(C.LaneHelper.interpolateCoordinates(m,c,200));const u=x.lineString(d.map(p=>[p.lng,p.lat]));u.properties.dist=s,u.properties.bearing=n,i.features.push(u)}this.map.getSource(this.tmpSource)?this.map.getSource(this.tmpSource).setData(i):this.map.addSource(this.tmpSource,{type:"geojson",data:i}),this.map.getLayer(this.tmpLayer)||this.map.addLayer({id:this.tmpLayer,type:"line",source:this.tmpSource,filter:["==","$type","LineString"],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#F44336","line-width":2,"line-opacity":1,"line-dasharray":[3,2]}}),this.map.getLayer(this.tmpLabelLayer)||this.map.addLayer({id:this.tmpLabelLayer,type:"symbol",source:this.tmpSource,filter:["==","$type","LineString"],layout:{"symbol-placement":"line-center","text-field":"{dist} nm","text-rotation-alignment":"map","text-size":12},paint:{"text-opacity":1,"text-color":"#fff","text-halo-color":"#F44336","text-halo-width":4,"text-halo-blur":0}});let l;if(o?l='<div class="marker-label">Drag and drop</div>':l=`<div class="marker-label">Tol distance: <b>${C.LngLatHelper.roundPrecision((a.total??0)+s,2)}</b>nm, bearing: <b>${n}</b>°</div><div class="marker-label">${this.navigation==="RL"?"RL":"GC"} mode, using 'Shift' to switch</div><div class="marker-label">Double click to end</div>`,this.tipMarker)this.tipMarker._element.innerHTML=l,this.tipMarker.setLngLat([t.lng,t.lat]);else{const h=document.createElement("div");h.className="tip-marker",h.innerHTML=l,this.tipMarker=new j.Marker(h).setOffset([140,0]).setLngLat([t.lng,t.lat]).addTo(this.map)}},handleMove(a){this.map.getCanvas().style.cursor="crosshair";let e=this.geojson.at(-1);e||(e=x.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(e));const t=e.features.filter(o=>o.geometry.type==="Point");t!=null&&t.length&&this.handleTmpPointUpdate(e,t.at(-1),{lng:a.lngLat.lng,lat:a.lngLat.lat})},handleDblClick(a){a.preventDefault();let e=this.geojson.at(-1);e.closed=!0,this.handleRender(e),e=x.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(e)},handleRender(a){var e;if((e=a==null?void 0:a.features)!=null&&e.length){const t=`${a.id}-${this.source}`,o=`${a.id}-${this.layer}`,i=`${a.id}-${this.labelLayer}`;this.map.getSource(t)?this.map.getSource(t).setData(a):this.map.addSource(t,{type:"geojson",data:a}),this.handleClear(a,!1),this.map.addLayer({id:o,type:"line",source:t,filter:["==","$type","LineString"],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#F44336","line-width":2}}),this.map.addLayer({id:i,type:"symbol",source:t,filter:["==","$type","LineString"],layout:{"symbol-placement":"line-center","text-field":"{dist}nm,{bearing}°","text-rotation-alignment":"map","text-size":12},paint:{"text-opacity":1,"text-color":"#fff","text-halo-color":"#F44336","text-halo-width":4,"text-halo-blur":0}});const s=a.features.filter(n=>n.geometry.type==="Point");for(const n of s){const l=document.createElement("div");l.id=`${a.id}-${n.properties.id}`,l.className=`${a.closed?"point-marker closed":"point-marker"}`,l.innerHTML='<div class="marker-circle"></div>';const h=new j.Marker({element:l,draggable:!0,contextmenu:!0}).setLngLat(n.geometry.coordinates).addTo(this.map);h.on("drag",this.handleDrag),h.on("dragend",this.handleDragEnd),this.pointMarkers[a.id]?this.pointMarkers[a.id].push(h):this.pointMarkers[a.id]=[h]}if(a.closed){const n=s.at(-1),h=a.features.filter(c=>c.geometry.type==="LineString").at(-1),m=document.createElement("div");m.className="point-summary-marker",m.innerHTML=`<div id="${a.id}" class="marker-close">×</div><div class="marker-label">Tol: ${h.properties.total}nm</div>`,this.closeMarkers[a.id]=new j.Marker(m).setOffset([60,0]).setLngLat(n.geometry.coordinates).addTo(this.map)}}},handleClear(a,e=!0){var s,n,l,h,m,c,d,u,p;const t=`${a.id}-${this.source}`,o=`${a.id}-${this.layer}`,i=`${a.id}-${this.labelLayer}`;(s=this.map)!=null&&s.getLayer(o)&&this.map.removeLayer(o),(n=this.map)!=null&&n.getLayer(i)&&this.map.removeLayer(i),(l=this.map)!=null&&l.getLayer(this.tmpLayer)&&this.map.removeLayer(this.tmpLayer),(h=this.map)!=null&&h.getLayer(this.tmpLabelLayer)&&this.map.removeLayer(this.tmpLabelLayer),(m=this.closeMarkers[a.id])==null||m.remove(),this.closeMarkers[a.id]=void 0,(c=this.pointMarkers[a.id])==null||c.forEach(b=>{b==null||b.remove()}),this.pointMarkers[a.id]=[],(d=this.tipMarker)==null||d.remove(),this.tipMarker=void 0,e&&((u=this.map)!=null&&u.getSource(t))&&this.map.removeSource(t),e&&((p=this.map)!=null&&p.getSource(this.tmpSource))&&this.map.removeSource(this.tmpSource)}}};function jr(a,e,t,o,i,s){return r.openBlock(),r.createElementBlock("div")}const Fr=k(Or,[["render",jr]]),ui="",$r={name:"IdmENC",props:{map:{type:Object},enabled:{type:Boolean},beforeLayer:{type:String,default:"grayland"},bottom:{type:String,default:"280px"},token:{type:String,default:""},toggleVersion:{type:Number},permission:{type:Number}},emits:["enc"],data(){return{helper:ce,vendor:this.$attrs.permission&ce.LEVEL.Supper?"hi":"i4",right:10}},watch:{vendor:{handler(){this.$emit("enc",this.vendor)},immediate:!0},toggleVersion:{handler(){var a;this.right=(((a=document.getElementsByClassName("right-bar")[0])==null?void 0:a.clientWidth)||0)+10},immediate:!0}},methods:{}},Hr={key:0},Ur={class:"bar-item"};function Zr(a,e,t,o,i,s){const n=r.resolveComponent("ElTooltip");return t.enabled&&t.permission&i.helper.LEVEL.Supper?(r.openBlock(),r.createElementBlock("div",Hr,[r.createElementVNode("div",{class:"menu-bar-box",style:r.normalizeStyle({position:"absolute",right:i.right+"px",bottom:t.bottom})},[r.createElementVNode("div",Ur,[r.createVNode(n,{placement:"left",effect:"light",content:"Hifleet","show-after":1e3},{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(i.vendor==="hi"?"menu-icon active":"menu-icon"),onClick:e[0]||(e[0]=l=>i.vendor="hi")},e[2]||(e[2]=[r.createElementVNode("span",{class:"iconfont"},"HI",-1)]),2)]),_:1}),r.createVNode(n,{placement:"left",effect:"light",content:"I4insight","show-after":1e3},{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(i.vendor==="i4"?"menu-icon active":"menu-icon"),onClick:e[1]||(e[1]=l=>i.vendor="i4")},e[3]||(e[3]=[r.createElementVNode("span",{class:"iconfont"},"I4",-1)]),2)]),_:1})])],4)])):r.createCommentVNode("",!0)}const Gr=k($r,[["render",Zr],["__scopeId","data-v-150235f7"]]),gi="",Jr={name:"IdmGLV2",components:{IdmGlLayer:ft,IdmWindBarb:Lt,IdmWindParticle:_t,IdmCurrents:Et,IdmCurrentParticle:Tt,IdmSigWave:Dt,IdmSwell:At,IdmPrmsl:Ot,IdmIceberg:$t,IdmTropicals:ke,IdmPrecip3h:ha,IdmVisibility:ya,IdmWaterTemp:ba,IdmTemp:xa,IdmArctic:Sa,IdmWarZone:ar,IdmGmdssArea:or,IdmEcaZone:lr,IdmAlertZone:pr,IdmPort:xr,IdmLoadLine:kr,IdmTimezone:Pr,IdmVRA:Tr,IdmSpecialArea:Dr,IdmTerminator:Ar,IdmLatLng:Se,IdmMeasure:Fr,IdmPoint:Ka,IdmENC:Gr},props:{map:{type:Object,default:void 0},token:{type:String},ts:{type:String},beforeLayer:{type:String,default:""},toggleVersion:{type:Number}},emits:["toggleVersion","activeWeatherLayers"],data(){return{weatherLayers:{},activeWeatherLayers:[],weatherWeight:0,otherLayers:{},otherWeight:0,showCoord:!1,showMeasure:!1,showPoint:!1,show3d:!1,meteo:void 0,source:"",gateway:"https://cbe4test.idmwx.com",mapProjection:"mercator",zoom:6,viewport:void 0,particleFactor:void 0,showRampColor:!1,activeWindLayer:!1,showWindFeather:!1,showWindParticle:!1,showCurrentIsoband:!1,showCurrentParticle:!1,enc:"",defaultMeteoToken:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNseTVudHJzYzAwNWUwbHBsZHkyaDRqczMiLCJyb2xlIjoxLCJuYW1lIjoiZmFrZUBvcm13eC5jb20iLCJwbGF0SWQiOiJnZDBtdDFkIiwiY29tcGFueSI6eyJpZCI6bnVsbCwiY2hpbGRyZW4iOltdfSwiaWF0IjoxNzIzMDI0MDI0LCJleHAiOjM5MzA1NDQwMjR9.RrKcdcMnq-FxBLJQ-i6lx2FscDE46y8EvHIemPW4HTg",helper:new Pe}},watch:{ts:{handler(a,e){a&&e&&B(a).utc().format("yyyy-MM-DD HH")!==B(e).utc().format("yyyy-MM-DD HH")&&this.$nextTick(()=>{this.handleDateChange({tropicals:!1})})},immediate:!0},map:{handler(){this.map&&(this.map.on("zoomend",this.handleDragEndWithZoom4Json),this.map.on("dragend",this.handleDragEndWithZoom4Json),this.map.on("move",this.handleDragEndWithZoom4Image),this.viewport=new _e(this.map),this.handleRampColorInitial())},immediate:!0},enc:{handler(a,e){var t,o,i,s,n,l,h,m;a?((o=(t=this.map)==null?void 0:t.getLayer(a))==null||o.setLayoutProperty("visibility","visible"),(s=(i=this.map)==null?void 0:i.getLayer(e))==null||s.setLayoutProperty("visibility","none")):((l=(n=this.map)==null?void 0:n.getLayer("i4"))==null||l.setLayoutProperty("visibility","none"),(m=(h=this.map)==null?void 0:h.getLayer("hi"))==null||m.setLayoutProperty("visibility","none"))}},activeWeatherLayers:{handler(){var a,e,t,o,i,s,n,l,h,m,c,d,u,p,b,f,y,L;if(!this.map)return!1;this.activeWeatherLayers.length>0?((e=(a=this.map)==null?void 0:a.getLayer(this.enc))==null||e.setLayoutProperty("visibility","none"),(o=(t=this.map)==null?void 0:t.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))==null||o.setLayoutProperty("visibility","visible"),(s=this.map)!=null&&s.getLayer((i=this.viewport)==null?void 0:i.rampColorLayer)&&((n=this.map)!=null&&n.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))&&this.mapProjection==="mercator"&&((h=this.map)==null||h.moveLayer((l=this.viewport)==null?void 0:l.rampColorLayer,this.helper.mapboxCustomer.layers.countryBoundary.id)),(c=this.map)!=null&&c.getLayer((m=this.viewport)==null?void 0:m.particleLayer)&&((d=this.map)!=null&&d.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))&&this.mapProjection==="mercator"&&((p=this.map)==null||p.moveLayer((u=this.viewport)==null?void 0:u.particleLayer,this.helper.mapboxCustomer.layers.countryBoundary.id))):((f=(b=this.map)==null?void 0:b.getLayer(this.enc))==null||f.setLayoutProperty("visibility","visible"),(L=(y=this.map)==null?void 0:y.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))==null||L.setLayoutProperty("visibility","none")),this.$emit("activeWeatherLayers",this.activeWeatherLayers)},immediate:!0}},methods:{async fetchWeatherLayers(a={tropicals:!1}){var i,s,n,l,h,m,c,d;const e=new Date().valueOf();let t=0,o=0;if(this.map){const u=((i=this.map)==null?void 0:i.getZoom())+1,p=(s=this.map)==null?void 0:s.getBounds(),b=`${p._sw.lng},${p._sw.lat},${p._ne.lng},${p._ne.lat}`;if(this.particleFactor){const f=he.WEATHER_LAYERS.find(y=>{var L;return((L=y.peer)==null?void 0:L.weight)===this.particleFactor.weight});this.particleFactor.particle?this.weatherWeight=this.weatherWeight&f.weight?this.weatherWeight:this.weatherWeight+f.weight:this.weatherWeight=this.weatherWeight&f.weight?this.weatherWeight-f.weight:this.weatherWeight}if(this.weatherWeight>0){let f=this.weatherWeight,y;if(a.tropicals||this.weatherWeight&256&&(y=this.weatherLayers.tropicals,y&&(f-=256,y.version=Math.random()+1)),f>0){const L=await U.get(`${this.gateway}/api/arc/weather/layers/links?l=${f}&v=${this.source}&z=${u}&bbox=${b}&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(o=new Date().valueOf()-(e+t),console.log("weather links elapsed: ",o,", total: ",t+=o),((n=L==null?void 0:L.data)==null?void 0:n.code)===0){const g=(l=L==null?void 0:L.data)==null?void 0:l.data,v=[];for(const w in g)w==="ice-edge"&&(g[w]="https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"),w!=="tropicals"&&v.push(U.get(g[w],{headers:{Authorization:this.token||this.defaultMeteoToken,key:w},responseType:/\.(jpg|png)$/.test(g[w])?"blob":"json"}).catch(z=>{console.log(`[${w}] fetch layer error: ${z}`)}));const _=await Promise.all(v);this.weatherLayers={},_.map(w=>{var V,D,R,M;const z=((V=w==null?void 0:w.data)==null?void 0:V.data)||(w==null?void 0:w.data),N=(R=(D=w==null?void 0:w.config)==null?void 0:D.headers)==null?void 0:R.key;N&&z&&(this.weatherLayers[N]={raw:z,type:((M=w==null?void 0:w.config)==null?void 0:M.responseType)==="blob"?"image":"json",etime:this.ts})}),g.tropicals&&U.get(g.tropicals,{headers:{Authorization:this.token||this.defaultMeteoToken,key:"tropicals"}}).then(w=>{var V,D,R;const z=C.TropicalHelper.convert2Geojson(((V=w==null?void 0:w.data)==null?void 0:V.data)||(w==null?void 0:w.data)),N=(R=(D=w==null?void 0:w.config)==null?void 0:D.headers)==null?void 0:R.key;this.weatherLayers[N]={data:z,active:!0,cached:!1,type:"json",etime:this.ts,version:Math.random()+1}})}if(o=new Date().valueOf()-(e+t),console.log("weather layers elapsed: ",o,", total: ",t+=o),this.weatherLayers["swell-direction"]||this.weatherLayers["swell-height"]){const g=(h=this.weatherLayers["swell-direction"])==null?void 0:h.raw,v=(m=this.weatherLayers["swell-height"])==null?void 0:m.raw;delete this.weatherLayers["swell-direction"],delete this.weatherLayers["swell-height"],this.weatherLayers.swell={type:"json",direction:g,height:{raw:v},etime:this.ts}}if(this.weatherLayers["current-direction"]||this.weatherLayers["current-speed"]){const g=(c=this.weatherLayers["current-direction"])==null?void 0:c.raw,v=(d=this.weatherLayers["current-speed"])==null?void 0:d.raw;delete this.weatherLayers["current-direction"],delete this.weatherLayers["current-speed"],this.weatherLayers.current={type:"json",direction:g,speed:{raw:v},etime:this.ts}}}y&&(y.etime=this.ts,y.cached=!0,this.weatherLayers.tropicals=y)}this.handleWeatherLayerToggle(),this.handleDragEndWithZoom4Json()}this.$emit("toggleVersion",Math.random())},async fetchOtherLayers(a={all:!1,dayNight:!1,enc:!1}){var e,t,o,i;if(this.map){let s=this.otherWeight;if(s){let n=!1;if(this.otherWeight&2048&&(s=this.otherWeight-2048,n=!0),s){if(a.all){const l=await U.get(`${this.gateway}/api/arc/other/layers/links?l=${s}&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(((e=l==null?void 0:l.data)==null?void 0:e.code)===0){const h=(t=l==null?void 0:l.data)==null?void 0:t.data,m=[];for(const d in h)m.push(U.get(h[d],{headers:{Authorization:this.token||this.defaultMeteoToken,key:d}}));const c=await Promise.all(m);this.otherLayers={enc:n},c.map(d=>{var b,f,y;const u=((b=d==null?void 0:d.data)==null?void 0:b.data)||(d==null?void 0:d.data),p=(y=(f=d==null?void 0:d.config)==null?void 0:f.headers)==null?void 0:y.key;this.otherLayers[p]=u})}}else if(a.dayNight&&s&1024){const l=await U.get(`${this.gateway}/api/arc/other/layers/links?l=1024&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(((o=l==null?void 0:l.data)==null?void 0:o.code)===0){const h=(i=l==null?void 0:l.data)==null?void 0:i.data,m=[];for(const d in h)m.push(U.get(h[d],{headers:{Authorization:this.token||this.defaultMeteoToken,key:d}}));(await Promise.all(m)).map(d=>{var b,f,y;const u=((b=d==null?void 0:d.data)==null?void 0:b.data)||(d==null?void 0:d.data),p=(y=(f=d==null?void 0:d.config)==null?void 0:f.headers)==null?void 0:y.key;this.otherLayers[p]=u})}}}else this.otherLayers={enc:n}}else this.otherLayers={};this.handleBeforeLayerToggle()}},handleRampColorState(){var a;if(this.showRampColor=!1,this.showWindParticle=!1,this.showCurrentParticle=!1,(a=this.particleFactor)!=null&&a.particle)this.showRampColor=!0,this.particleFactor.key==="wind"&&(this.showWindParticle=!0),this.particleFactor.key==="current"&&(this.showCurrentParticle=!0);else for(const e of this.activeWeatherLayers)["png","jpg"].includes(e.type)&&(this.showRampColor=!0);this.activeWindLayer=!!this.activeWeatherLayers.find(e=>e.key==="wind"),this.$refs.layer&&(this.$refs.layer.activeWeatherLayers=this.activeWeatherLayers)},handleRampColorInitial(){var a,e,t,o,i,s,n,l,h,m,c,d;this.viewport.map.getSource((a=this.viewport)==null?void 0:a.rampColorSource)||this.viewport.map.addSource((e=this.viewport)==null?void 0:e.rampColorSource,{type:"canvas",canvas:(t=this.viewport)==null?void 0:t.rampColorCanvas,animate:!0,coordinates:this.viewport.getBoundLngLat()}),this.viewport.map.getLayer((o=this.viewport)==null?void 0:o.rampColorLayer)||this.viewport.map.addLayer({type:"raster",id:(i=this.viewport)==null?void 0:i.rampColorLayer,source:(s=this.viewport)==null?void 0:s.rampColorSource,layout:{visibility:"none"}},this.beforeLayer),this.viewport.map.getSource((n=this.viewport)==null?void 0:n.particleSource)||this.viewport.map.addSource((l=this.viewport)==null?void 0:l.particleSource,{type:"canvas",canvas:(h=this.viewport)==null?void 0:h.particleCanvas,animate:!0,coordinates:this.viewport.getBoundLngLat()}),this.viewport.map.getLayer((m=this.viewport)==null?void 0:m.particleLayer)||this.viewport.map.addLayer({type:"raster",id:(c=this.viewport)==null?void 0:c.particleLayer,source:(d=this.viewport)==null?void 0:d.particleSource,layout:{visibility:"none"}},this.beforeLayer)},handleDragEndWithZoom4Json(){var m,c,d,u;const a=new Date().valueOf();let e=0,t=0;const o=(m=this.map)==null?void 0:m.getBounds(),i=this.map.getZoom(),s=C.LngLatHelper.convertToStdLng(o._sw.lng),n=C.LngLatHelper.convertToStdLng(o._ne.lng),l=Math.floor(o._sw.lat),h=Math.ceil(o._ne.lat);for(const p in this.weatherLayers)if(this.weatherLayers[p].active&&this.weatherLayers[p].type==="json"){this.weatherLayers[p].active=!1,this.weatherLayers[p].version=Math.random()+1;let b=[];if(["swell","current"].includes(p)){const f=((c=this.weatherLayers[p])==null?void 0:c.direction)||{};for(const y in f)if(y>l&&y<h&&(!(i<=this.zoom)||y%(i<this.zoom/2?5:3)===0)){const L=f[y].lng;s>n?L.forEach((g,v)=>{var _;if((g>=s&&g<=180||g>=-180&&g<=n)&&(!(i<=this.zoom)||g%(i<this.zoom/2?5:3)===0)){const w=x.point([g,y],{val:f[y].val[v],spd:(_=f[y].spd)==null?void 0:_[v]});b.push(w)}}):L.forEach((g,v)=>{var _;if(g>=s&&g<=n&&(!(i<=this.zoom)||g%(i<this.zoom/2?5:3)===0)){const w=x.point([g,y],{val:f[y].val[v],spd:(_=f[y].spd)==null?void 0:_[v]});b.push(w)}})}if(t=new Date().valueOf()-(a+e),console.log("direction elapsed: ",t,", total: ",e+=t),p==="swell"){const y=this.weatherLayers[p].height;if(y){if(!y.data){const L=[];for(const g in(d=y.raw)==null?void 0:d.LineString){const v=y.raw.LineString[g];for(const _ of v)L.push(x.lineString(_,{val:Number(g)}));y.data=x.featureCollection(L)}}if(y.data){const L=this.handleBboxClip(y.data,o);b=b.concat(L)}t=new Date().valueOf()-(a+e),console.log("height elapsed: ",t,", total: ",e+=t)}}if(p==="current"){const y=this.weatherLayers[p].speed;if(y){if(!y.data){const g=[];for(const v in(u=y.raw)==null?void 0:u.Polygon){const _=y.raw.Polygon[v];for(const w of _)g.push(x.polygon(w,{val:Number(v)}))}y.data=x.featureCollection(g)}const L=i<this.zoom?y.data.features.filter(g=>g.properties.val>.5):y.data.features;b=b.concat(L),t=new Date().valueOf()-(a+e),console.log("speed elapsed: ",t,", total: ",e+=t)}}}else if(p==="wind"){const f=this.weatherLayers.wind.raw;for(const y in f)if(y>l&&y<h&&(!(i<=this.zoom)||y%(i<this.zoom/2?5:3)===0)){const L=f[y].lng;s>n?L.forEach((g,v)=>{if((g>=s&&g<=180||g>=-180&&g<=n)&&(!(i<=this.zoom)||g%(i<this.zoom/2?5:3)===0)){const _=x.point([g,y],{val:f[y].val[v],spd:f[y].spd[v]});b.push(_)}}):L.forEach((g,v)=>{if(g>=s&&g<=n&&(!(i<=this.zoom)||g%(i<this.zoom/2?5:3)===0)){const _=x.point([g,y],{val:f[y].val[v],spd:f[y].spd[v]});b.push(_)}})}t=new Date().valueOf()-(a+e),console.log("wind barb elapsed: ",t,", total: ",e+=t)}else if(p==="sig-wave-height"){if(this.weatherLayers[p].data)b=this.weatherLayers[p].data;else{const f=this.weatherLayers[p].raw;if(f){const y=[];for(const L in f.Polygon){const g=f.Polygon[L];for(const v of g)y.push(x.polygon(v,{val:Number(L)}))}for(const L in f.Point){const g=f.Point[L];for(const v of g)y.push(...x.points(v,{val:Number(L)}).features)}b=b.concat(y)}}t=new Date().valueOf()-(a+e),console.log("sigWave elapsed: ",t,", total: ",e+=t)}else if(p==="prmsl"){if(this.weatherLayers[p].data)b=this.weatherLayers[p].data;else{const f=this.weatherLayers[p].raw;if(f){const y=[];for(const L in f.LineString){const g=f.LineString[L];for(const v of g)y.push(x.lineString(v,{val:Number(L)}))}for(const L in f.Point)f.Point[L].lng.forEach((g,v)=>{g=C.LngLatHelper.convertToStdLng(g),y.push(x.point([g,L],{val:f.Point[L].val[v],type:f.Point[L].type[v]}))});b=b.concat(y)}}t=new Date().valueOf()-(a+e),console.log("prmsl elapsed: ",t,", total: ",e+=t)}else if(p==="arctic"||p==="iceberg"){if(this.weatherLayers[p].data)b=this.weatherLayers[p].data;else{const f=this.weatherLayers[p].raw;if(f){const y=[];for(const L in f.LineString){const g=f.LineString[L];for(const v of g)y.push(x.lineString(v,{val:Number(L)}))}b=b.concat(y)}}t=new Date().valueOf()-(a+e)}console.log(p," elapsed: ",t,", total: ",e+=t),b.length&&(this.weatherLayers[p].data=x.featureCollection(b)),this.weatherLayers[p].active=!0,this.weatherLayers[p].version=Math.random()+1}},handleDragEndWithZoom4Image(){for(const a in this.weatherLayers)this.weatherLayers[a].active&&this.weatherLayers[a].type==="image"&&(this.weatherLayers[a].active=!0,this.weatherLayers[a].version=Math.random()+1)},handleBboxClip(a,e){const t=[],o=C.LngLatHelper.convertToStdLng(e._sw.lng),i=C.LngLatHelper.convertToStdLng(e._ne.lng);return a.features.forEach(s=>{if(s.geometry.type!=="Point")if(o>i){let n=[o,e._sw.lat,180,e._ne.lat],l=x.bboxClip(s,n);l.geometry.coordinates.length&&t.push(l),n=[-180,e._sw.lat,i,e._ne.lat],l=x.bboxClip(s,n),l.geometry.coordinates.length&&t.push(l)}else{const n=[o,e._sw.lat,i,e._ne.lat],l=x.bboxClip(s,n);l.geometry.coordinates.length&&t.push(l)}else t.push(s)}),t},handleWeatherLayerToggle(){var a;for(const e in this.weatherLayers)this.weatherLayers[e].active=!1,this.weatherLayers[e].version=Math.random()+1;for(const e of this.activeWeatherLayers){let t=e.key;t.indexOf("swell")>-1?t="swell":t.indexOf("current")>-1&&(t="current"),this.weatherLayers[t]&&(this.weatherLayers[t].active=!0,this.weatherLayers[t].version=Math.random()+1,((a=this.particleFactor)==null?void 0:a.key)===t&&this.weatherLayers[`${t}-particle`]&&(this.weatherLayers[`${t}-particle`].active=this.particleFactor.particle))}this.handleBeforeLayerToggle()},handleBeforeLayerToggle(){var a,e,t,o,i,s,n,l,h,m,c,d,u;(a=this.map)!=null&&a.getLayer(this.beforeLayer)&&((e=this.activeWeatherLayers)!=null&&e.length||(t=this.otherLayers)!=null&&t["war-zones"]||(o=this.otherLayers)!=null&&o["gmdss-areas"]||(i=this.otherLayers)!=null&&i["load-lines"]||(s=this.otherLayers)!=null&&s["high-risk-area"]||(n=this.otherLayers)!=null&&n["time-zones"]||(l=this.otherLayers)!=null&&l.pirates||(h=this.otherLayers)!=null&&h.ports||(m=this.otherLayers)!=null&&m.enc||(c=this.otherLayers)!=null&&c["voluntary-reporting-area"]||(d=this.otherLayers)!=null&&d["eca-zones"]||(u=this.otherLayers)!=null&&u["special-area"])&&this.map.setLayoutProperty(this.beforeLayer,"visibility","visible")},handleDateChange(a={tropicals:!1}){this.fetchWeatherLayers(a),this.fetchOtherLayers({dayNight:!0})},handleWeatherLayerChange(a,e){this.showWindParticle=!1,this.showCurrentParticle=!1,this.map?setTimeout(()=>{this.activeWeatherLayers=JSON.parse(JSON.stringify(a));const t=this.activeWeatherLayers.some(s=>{var n;return["wind","current"].includes(s.key)&&(!((n=Object.keys(s))!=null&&n.some(l=>l==="particle"))||!!s.particle)}),o=this.activeWeatherLayers.some(s=>["png","jpg"].includes(s.type));t&&!o?(this.activeWeatherLayers.forEach(s=>{s.key==="wind"&&s.particle&&(this.particleFactor=s,this.showWindParticle=!0),s.key==="current"&&s.particle&&(this.particleFactor=s,this.showCurrentParticle=!0)}),this.particleFactor.particle=!0):o&&this.particleFactor&&(this.particleFactor.particle=!1);const i=a==null?void 0:a.reduce((s,n)=>s+(s&(n==null?void 0:n.weight)?0:n==null?void 0:n.weight),0);this.weatherWeight!==i||this.source!==e?(this.source=e,this.weatherWeight=i,this.fetchWeatherLayers({tropicals:!1})):this.handleWeatherLayerToggle()}):setTimeout(()=>{this.handleWeatherLayerChange(a,e)},500)},handleOtherLayerChange(a){if(!this.map)setTimeout(()=>{this.handleOtherLayerChange(a)},500);else{const e=a==null?void 0:a.reduce((t,o)=>t+(o==null?void 0:o.weight),0);a.find(t=>t.key==="enc")?this.enc="i4":this.enc="",this.otherWeight!=e&&(this.otherWeight=e,this.fetchOtherLayers({all:!0}))}},async handlePointChange(a){var i,s;const e=this.ts?B(this.ts):B(),t={lat:a.lat,lng:a.lng,datetime:e.utc().format(),forecastDays:7},o=await U.post(`${this.gateway}/api/arc/meteo2/spot/forecast`,t,{headers:{Authorization:this.token||this.defaultMeteoToken}});((i=o==null?void 0:o.data)==null?void 0:i.code)===0&&(this.meteo={...(s=o==null?void 0:o.data)==null?void 0:s.data,...a})},handle3dToggle(a){var e,t,o,i,s,n,l,h,m,c,d,u,p,b,f,y,L,g,v,_;a?(this.map.setProjection("globe"),this.mapProjection="globe",(t=this.map)!=null&&t.getLayer((e=this.viewport)==null?void 0:e.rampColorLayer)&&((o=this.map)!=null&&o.getLayer(this.helper.mapboxCustomer.layers.water.id))&&((s=this.map)==null||s.moveLayer((i=this.viewport)==null?void 0:i.rampColorLayer,this.helper.mapboxCustomer.layers.water.id)),(l=this.map)!=null&&l.getLayer((n=this.viewport)==null?void 0:n.particleLayer)&&((h=this.map)!=null&&h.getLayer(this.helper.mapboxCustomer.layers.water.id))&&((c=this.map)==null||c.moveLayer((m=this.viewport)==null?void 0:m.particleLayer,this.helper.mapboxCustomer.layers.water.id)),this.map.off("zoomend",this.handleDragEndWithZoom4Json),this.map.off("dragend",this.handleDragEndWithZoom4Json),this.map.off("move",this.handleDragEndWithZoom4Image)):(this.map.setProjection("mercator"),this.mapProjection="mercator",this.map.on("zoomend",this.handleDragEndWithZoom4Json),this.map.on("dragend",this.handleDragEndWithZoom4Json),this.map.on("move",this.handleDragEndWithZoom4Image),this.handleDragEndWithZoom4Image(),this.handleDragEndWithZoom4Json(),(u=this.map)!=null&&u.getLayer((d=this.viewport)==null?void 0:d.rampColorLayer)&&((p=this.map)!=null&&p.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))&&((f=this.map)==null||f.moveLayer((b=this.viewport)==null?void 0:b.rampColorLayer,this.helper.mapboxCustomer.layers.countryBoundary.id)),(L=this.map)!=null&&L.getLayer((y=this.viewport)==null?void 0:y.particleLayer)&&((g=this.map)!=null&&g.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))&&((_=this.map)==null||_.moveLayer((v=this.viewport)==null?void 0:v.particleLayer,this.helper.mapboxCustomer.layers.countryBoundary.id)))},handleParticle(a){this.particleFactor=a,this.weatherLayers[a.key]&&(this.weatherLayers[a.key].particle=a.particle),this.activeWeatherLayers.map(o=>{var i;return o.key===a.key?o.particle=a.particle:(i=Object.keys(o))!=null&&i.some(s=>s==="particle")&&(o.particle=!1),o});let e=localStorage.getItem("activeWeatherLayersCache");const t=JSON.parse(e)||[];t==null||t.forEach(o=>{var i;o.key===a.key?o.particle=a.particle:(i=Object.keys(o))!=null&&i.some(s=>s==="particle")&&(o.particle=!1)}),localStorage.setItem("activeWeatherLayersCache",JSON.stringify(t)),this.fetchWeatherLayers({tropicals:!1})},handleToggleVersion(){this.$emit("toggleVersion",Math.random())}}},Xr={key:0,className:"map-gl-home"};function qr(a,e,t,o,i,s){var G,O,F,oe,$,S,W,se,H,ne,J,X,q,de,me,pe,ye,fe,ue,ge,be,Le,we,ve,xe,Ee;const n=r.resolveComponent("IdmGlLayer"),l=r.resolveComponent("IdmENC"),h=r.resolveComponent("IdmSigWave"),m=r.resolveComponent("IdmSwell"),c=r.resolveComponent("IdmPrmsl"),d=r.resolveComponent("IdmIceberg"),u=r.resolveComponent("IdmTropicals"),p=r.resolveComponent("IdmCurrents"),b=r.resolveComponent("IdmCurrentParticle"),f=r.resolveComponent("IdmWindBarb"),y=r.resolveComponent("IdmWindParticle"),L=r.resolveComponent("IdmPrecip3h"),g=r.resolveComponent("IdmVisibility"),v=r.resolveComponent("IdmWaterTemp"),_=r.resolveComponent("IdmTemp"),w=r.resolveComponent("IdmArctic"),z=r.resolveComponent("IdmWarZone"),N=r.resolveComponent("IdmGmdssArea"),V=r.resolveComponent("IdmEcaZone"),D=r.resolveComponent("IdmAlertZone"),R=r.resolveComponent("IdmPort"),M=r.resolveComponent("IdmLoadLine"),Q=r.resolveComponent("IdmTimezone"),K=r.resolveComponent("IdmVRA"),ee=r.resolveComponent("IdmSpecialArea"),te=r.resolveComponent("IdmTerminator"),ae=r.resolveComponent("IdmLatLng"),re=r.resolveComponent("IdmMeasure"),ie=r.resolveComponent("IdmPoint");return t.map?(r.openBlock(),r.createElementBlock("div",Xr,[r.createVNode(n,r.mergeProps({ref:"layer",map:t.map,"toggle-version":t.toggleVersion,"map-projection":i.mapProjection,showWindFeather:i.showWindFeather,showWindParticle:i.showWindParticle,showCurrentIsoband:i.showCurrentIsoband,showCurrentParticle:i.showCurrentParticle},a.$attrs,{onWeather:s.handleWeatherLayerChange,onOther:s.handleOtherLayerChange,onToggleWindParticle:e[0]||(e[0]=A=>i.showWindParticle=A),onToggleWindFeather:e[1]||(e[1]=A=>i.showWindFeather=A),onToggleCurrentParticle:e[2]||(e[2]=A=>i.showCurrentParticle=A),onToggleCurrentIsoband:e[3]||(e[3]=A=>i.showCurrentIsoband=A),onCoordinate:e[4]||(e[4]=A=>i.showCoord=A),onMeasure:e[5]||(e[5]=A=>i.showMeasure=A),onPoint:e[6]||(e[6]=A=>i.showPoint=A),on3d:s.handle3dToggle,onHandleToggleVersion:s.handleToggleVersion}),null,16,["map","toggle-version","map-projection","showWindFeather","showWindParticle","showCurrentIsoband","showCurrentParticle","onWeather","onOther","on3d","onHandleToggleVersion"]),r.createVNode(l,r.mergeProps({map:t.map,token:t.token,enabled:(G=i.otherLayers)==null?void 0:G.enc,"toggle-version":t.toggleVersion},a.$attrs,{onEnc:e[7]||(e[7]=A=>i.enc=A)}),null,16,["map","token","enabled","toggle-version"]),r.createVNode(h,r.mergeProps({map:t.map,"sig-wave":(O=i.weatherLayers)==null?void 0:O["sig-wave-height"],"before-layer":t.beforeLayer,activeWeatherLayers:i.activeWeatherLayers},a.$attrs),null,16,["map","sig-wave","before-layer","activeWeatherLayers"]),r.createVNode(m,r.mergeProps({map:t.map,swell:(F=i.weatherLayers)==null?void 0:F.swell,"before-layer":t.beforeLayer,activeWeatherLayers:i.activeWeatherLayers},a.$attrs),null,16,["map","swell","before-layer","activeWeatherLayers"]),r.createVNode(c,r.mergeProps({map:t.map,prmsl:(oe=i.weatherLayers)==null?void 0:oe.prmsl,"before-layer":t.beforeLayer,"active-weather-layers":i.activeWeatherLayers},a.$attrs),null,16,["map","prmsl","before-layer","active-weather-layers"]),r.createVNode(d,r.mergeProps({map:t.map,iceberg:($=i.weatherLayers)==null?void 0:$.iceberg,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","iceberg","before-layer"]),r.createVNode(u,r.mergeProps({map:t.map,date:t.ts,tropicals:(S=i.weatherLayers)==null?void 0:S.tropicals,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","date","tropicals","before-layer"]),r.createVNode(p,r.mergeProps({map:t.map,"map-projection":i.mapProjection,current:(W=i.weatherLayers)==null?void 0:W.current,"before-layer":t.beforeLayer,showCurrentIsoband:i.showCurrentIsoband,showCurrentParticle:i.showCurrentParticle,"margin-bottom":i.activeWindLayer?i.showRampColor?"84px":"56px":i.showRampColor?"56px":"30px","toggle-version":t.toggleVersion,"weather-layers":i.weatherLayers},a.$attrs,{onParticle:s.handleParticle,onHandleToggleVersion:s.handleToggleVersion}),null,16,["map","map-projection","current","before-layer","showCurrentIsoband","showCurrentParticle","margin-bottom","toggle-version","weather-layers","onParticle","onHandleToggleVersion"]),r.createVNode(b,r.mergeProps({viewport:i.viewport,factor:(se=i.weatherLayers)==null?void 0:se["current-particle"],"before-layer":t.beforeLayer,"toggle-version":t.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),r.createVNode(f,r.mergeProps({ref:"windBarb",map:t.map,"map-projection":i.mapProjection,wind:(H=i.weatherLayers)==null?void 0:H.wind,current:(ne=i.weatherLayers)==null?void 0:ne.current,"before-layer":t.beforeLayer,"margin-bottom":i.showRampColor?"56px":"30px",showWindFeather:i.showWindFeather,showWindParticle:i.showWindParticle},a.$attrs,{"toggle-version":t.toggleVersion,"weather-layers":i.weatherLayers,onParticle:s.handleParticle}),null,16,["map","map-projection","wind","current","before-layer","margin-bottom","showWindFeather","showWindParticle","toggle-version","weather-layers","onParticle"]),r.createVNode(y,r.mergeProps({viewport:i.viewport,factor:(J=i.weatherLayers)==null?void 0:J["wind-particle"],"before-layer":t.beforeLayer,"toggle-version":t.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),r.createVNode(L,r.mergeProps({viewport:i.viewport,factor:(X=i.weatherLayers)==null?void 0:X.precip3h,"before-layer":t.beforeLayer,"toggle-version":t.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),r.createVNode(g,r.mergeProps({viewport:i.viewport,factor:(q=i.weatherLayers)==null?void 0:q.visibility,"before-layer":t.beforeLayer,"toggle-version":t.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),r.createVNode(v,r.mergeProps({viewport:i.viewport,factor:(de=i.weatherLayers)==null?void 0:de["water-temp"],"before-layer":t.beforeLayer,"toggle-version":t.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),r.createVNode(_,r.mergeProps({viewport:i.viewport,factor:(me=i.weatherLayers)==null?void 0:me.temp,"before-layer":t.beforeLayer,"toggle-version":t.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),r.createVNode(w,r.mergeProps({viewport:i.viewport,factor:(pe=i.weatherLayers)==null?void 0:pe.arctic,"before-layer":t.beforeLayer,"toggle-version":t.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),r.createVNode(z,r.mergeProps({map:t.map,zone:(ye=i.otherLayers)==null?void 0:ye["war-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),r.createVNode(N,r.mergeProps({map:t.map,area:(fe=i.otherLayers)==null?void 0:fe["gmdss-areas"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","area","before-layer"]),r.createVNode(V,r.mergeProps({map:t.map,zone:(ue=i.otherLayers)==null?void 0:ue["eca-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),r.createVNode(D,r.mergeProps({map:t.map,zone:(ge=i.otherLayers)==null?void 0:ge["alert-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),r.createVNode(R,r.mergeProps({map:t.map,port:(be=i.otherLayers)==null?void 0:be.ports,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","port","before-layer"]),r.createVNode(M,r.mergeProps({map:t.map,line:(Le=i.otherLayers)==null?void 0:Le["load-lines"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","line","before-layer"]),r.createVNode(Q,r.mergeProps({map:t.map,zone:(we=i.otherLayers)==null?void 0:we["time-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),r.createVNode(K,r.mergeProps({map:t.map,area:(ve=i.otherLayers)==null?void 0:ve["voluntary-reporting-area"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","area","before-layer"]),r.createVNode(ee,r.mergeProps({map:t.map,area:(xe=i.otherLayers)==null?void 0:xe["special-area"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","area","before-layer"]),r.createVNode(te,r.mergeProps({map:t.map,area:(Ee=i.otherLayers)==null?void 0:Ee["day-night"]},a.$attrs),null,16,["map","area"]),r.createVNode(ae,r.mergeProps({map:t.map,show:i.showCoord,"toggle-version":t.toggleVersion},a.$attrs),null,16,["map","show","toggle-version"]),r.createVNode(re,r.mergeProps({map:t.map,show:i.showMeasure},a.$attrs),null,16,["map","show"]),r.createVNode(ie,r.mergeProps({map:t.map,show:i.showPoint,meteo:i.meteo},a.$attrs,{onPoint:s.handlePointChange}),null,16,["map","show","meteo","onPoint"])])):r.createCommentVNode("",!0)}const ze=k(Jr,[["render",qr]]),Yr={install(a){a.component("MapboxGL",ze),a.component("TropicalGL",ke),a.component("LatLngGL",Se)}};E.LatLngGL=Se,E.MapboxGL=ze,E.MapboxGLPlugin=Yr,E.MapboxHelper=Pe,E.ParticleSchema=I,E.TropicalGL=ke,E.Viewport=_e,E.WebGL=Z,E.WebGLSchema=T,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
204
+ </svg>`,ce=document.createElement("div");ce.className="hurricane-hourly-marker",ce.innerHTML=`<div class="${U.geometry.coordinates[1]>=0?"center north":"center south"}">${Ce}</div>`;const he=new ha.Marker(ce).setLngLat(U.geometry.coordinates).addTo(this.map);if(this.interpolateMarkers.push(he),(E=U.properties)!=null&&E.showCircle){const ee={radius:100,coordinates:U.geometry.coordinates},pe={radius:200,coordinates:U.geometry.coordinates},J={radius:500,coordinates:U.geometry.coordinates};(I=this.circleSourceData)==null||I.features.push(be.circle(ee.coordinates,ee.radius,{steps:100,units:"kilometers",properties:{type:"tropicalCircle"}})),(P=this.circleSourceData)==null||P.features.push(be.circle(pe.coordinates,pe.radius,{steps:100,units:"kilometers",properties:{type:"tropicalCircle"}})),(k=this.circleSourceData)==null||k.features.push(be.circle(J.coordinates,J.radius,{steps:100,units:"kilometers",properties:{type:"tropicalCircle"}}))}(O=(N=this.map)==null?void 0:N.getSource(this.circleSource))==null||O.setData(this.circleSourceData)}}else(R=this.map)!=null&&R.getSource(this.interpolateSource)&&((V=this.map)==null||V.getSource(this.interpolateSource).setData(this.empty))},handleClick(r){var n,o,s,l,u,c,h,f;const t=r.features[0],e=(o=(n=this.tropicals)==null?void 0:n.data)==null?void 0:o.features.filter(d=>{var p;return d.geometry.type==="LineString"&&d.properties.type==="forecast"&&d.properties.name===((p=t==null?void 0:t.properties)==null?void 0:p.name)});e.sort((d,p)=>{var v,g,m,y;return((v=d.properties)==null?void 0:v.model)==="cma"?-1:((g=d.properties)==null?void 0:g.model)==="jma"?((m=p.properties)==null?void 0:m.model)==="cma"?1:-1:d.properties.model==="ecmwf"?["jma","cma"].includes((y=p.properties)==null?void 0:y.model)?1:-1:0});const a=(l=(s=this.tropicals)==null?void 0:s.data)==null?void 0:l.features.filter(d=>{var p;return d.geometry.type==="LineString"&&d.properties.type==="history"&&d.properties.name===((p=t==null?void 0:t.properties)==null?void 0:p.name)});this.activeTropicals={name:(u=t==null?void 0:t.properties)==null?void 0:u.name,forecasts:e.map(d=>d.properties),history:(c=a[0])==null?void 0:c.properties,showCircle:(f=(h=e[0])==null?void 0:h.properties)==null?void 0:f.showCircle},this.showTropicals=!0;const i=document.getElementById("active-tropical");this.activeTropicalsMarker?this.activeTropicalsMarker.setLngLat([r.lngLat.lng,r.lngLat.lat]):this.activeTropicalsMarker=new ha.Marker(i).setLngLat([r.lngLat.lng,r.lngLat.lat]).setOffset([220,0]).addTo(this.map)},handleForecastToggle(r){var a,i,n,o,s,l;r.disabled=!r.disabled;const t=`${r.name}-${r.model}`,e=(i=(a=this.map)==null?void 0:a.getSource(this.source)._data)==null?void 0:i.features;e.forEach(u=>{u.properties.category===t&&(u.properties.disabled=r.disabled)}),this.interpolateData.forEach(u=>{u.properties.category===t&&(u.properties.disabled=r.disabled)}),(o=(n=this.map)==null?void 0:n.getSource(this.source))==null||o.setData(be.featureCollection(e)),(l=(s=this.map)==null?void 0:s.getSource(this.clusterSource))==null||l.setData(be.featureCollection(e)),this.handleDateChange()},handleStrikeProbability(r){this.$emit("tropicalProbability",r)},handleToggleCircles(r){var t,e;r.showCircle=!r.showCircle,(e=(t=this.tropicals.data)==null?void 0:t.features)==null||e.forEach(a=>{a.properties.name===r.name&&(a.properties.showCircle=r.showCircle)}),this.handleRender()},handleDrawCircle(){var r,t;(r=this.map)!=null&&r.getSource(this.circleSource)?(t=this.map)==null||t.getSource(this.circleSource).setData(this.circleSourceData):(this.map.addSource(this.circleSource,{type:"geojson",data:this.circleSourceData}),this.map.addLayer({id:this.circleLayer,type:"line",source:this.circleSource,filter:["all",["==","$type","Polygon"],["==","type","tropicalCircle"]],paint:{"line-color":"#fff","line-width":2,"line-opacity":1,"line-dasharray":[1,1]}}))},handleComputePolygons(r){const t=[];for(const e of r){const a=e.properties.wind,i={ne:a.r7ne>=0?a.r7ne:void 0,se:a.r7se>=0?a.r7se:void 0,sw:a.r7sw>=0?a.r7sw:void 0,nw:a.r7nw>=0?a.r7nw:void 0},n=this.handleComputeArc(e.geometry.coordinates,i,{...e.properties,level:7});t.push(n);const o={ne:a.r10ne>=0?a.r10ne:void 0,se:a.r10se>=0?a.r10se:void 0,sw:a.r10sw>=0?a.r10sw:void 0,nw:a.r10nw>=0?a.r10nw:void 0},s=this.handleComputeArc(e.geometry.coordinates,o,{...e.properties,level:10});t.push(s)}return t},handleComputeArc(r,t,e){var n;const a=[];for(const o in t){const s=t[o]??0;let l;switch(o){case"ne":l=be.lineArc(r,s*1.852,0,90,{steps:s>0?64:1});break;case"se":l=be.lineArc(r,s*1.852,90,180,{steps:s>0?64:1});break;case"sw":l=be.lineArc(r,s*1.852,180,270,{steps:s>0?64:1});break;case"nw":l=be.lineArc(r,s*1.852,270,360,{steps:s>0?64:1});break}a.push(...(n=l==null?void 0:l.geometry)==null?void 0:n.coordinates)}const i=be.lineString(a);return be.lineToPolygon(i,{properties:e})}}},AI={id:"active-tropical",class:"active-tropical"},MI={class:"header-box"},EI={class:"main"},II={key:0},PI={class:"sub"},kI={id:"meteoBox",class:"main-box"},NI={class:"content"},RI={class:"row"},VI={class:"col col-left",style:{"justify-content":"flex-start"}},OI={class:"col col-right",style:{"justify-content":"flex-start"}},zI={class:"row"},BI={class:"col col-24",style:{"justify-content":"flex-start"}},FI={class:"forecast-models"},GI=["onClick"],WI={class:"more"};function HI(r,t,e,a,i,n){var o,s,l,u,c,h,f,d,p,v,g,m,y,_,w;return b.withDirectives((b.openBlock(),b.createElementBlock("div",AI,[b.createElementVNode("div",MI,[b.createElementVNode("div",{class:"iconfont close-btn",onClick:t[0]||(t[0]=x=>i.showTropicals=!1)},""),b.createElementVNode("div",EI,[(s=(o=i.activeTropicals)==null?void 0:o.history)!=null&&s.level?(b.openBlock(),b.createElementBlock("span",II,b.toDisplayString((u=(l=i.activeTropicals)==null?void 0:l.history)==null?void 0:u.level)+" , ",1)):b.createCommentVNode("",!0),b.createTextVNode(b.toDisplayString((c=i.activeTropicals)==null?void 0:c.name),1)]),b.createElementVNode("div",PI," Last update: "+b.toDisplayString(n.computeTime(((f=(h=i.activeTropicals)==null?void 0:h.history)==null?void 0:f.updated)||((v=(p=(d=i.activeTropicals)==null?void 0:d.forecasts)==null?void 0:p.filter(x=>!x.disabled)[0])==null?void 0:v.date))),1)]),b.createElementVNode("div",kI,[b.createElementVNode("div",NI,[b.createElementVNode("div",RI,[b.createElementVNode("div",VI,[t[2]||(t[2]=b.createElementVNode("label",null,"Wind speed : ",-1)),b.createElementVNode("span",null,b.toDisplayString(((m=(g=i.activeTropicals)==null?void 0:g.history)==null?void 0:m.kts)||"-")+"[kts]",1)]),b.createElementVNode("div",OI,[t[3]||(t[3]=b.createElementVNode("label",null,"Pressure : ",-1)),b.createElementVNode("span",null,b.toDisplayString(((_=(y=i.activeTropicals)==null?void 0:y.history)==null?void 0:_.pressure)||"-")+"[hPa]",1)])]),b.createElementVNode("div",zI,[b.createElementVNode("div",BI,[t[4]||(t[4]=b.createElementVNode("label",{style:{width:"max-content"}},"Forecast Models : ",-1)),b.createElementVNode("div",FI,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList((w=i.activeTropicals)==null?void 0:w.forecasts,(x,S)=>{var L,C,T,A;return b.openBlock(),b.createElementBlock("div",{key:S,class:b.normalizeClass(["model",x.disabled?"":"active",S>0&&S<((C=(L=i.activeTropicals)==null?void 0:L.forecasts)==null?void 0:C.length)-1&&((A=(T=i.activeTropicals)==null?void 0:T.forecasts)==null?void 0:A.length)>2?"center-child":""]),onClick:D=>n.handleForecastToggle(x)},[b.createElementVNode("span",{class:b.normalizeClass(x.model)},b.toDisplayString(x.model),3)],10,GI)}),128))])])]),t[5]||(t[5]=b.createStaticVNode('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-726fd7f6></div><div class="row" style="padding:2px 10px;" data-v-726fd7f6><div class="legend" data-v-726fd7f6><div class="icon td" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>TD</div></div><div class="legend" data-v-726fd7f6><div class="icon ts" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>TS</div></div><div class="legend" data-v-726fd7f6><div class="icon sts" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>STS</div></div><div class="legend" data-v-726fd7f6><div class="icon ty" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>TY</div></div><div class="legend" data-v-726fd7f6><div class="icon sty" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>STY</div></div><div class="legend" data-v-726fd7f6><div class="icon supper-ty" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>Super TY</div></div></div><div class="row" style="padding:2px 10px;" data-v-726fd7f6><div class="legend" data-v-726fd7f6><div class="icon history" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>History</div></div><div class="legend" data-v-726fd7f6><div class="icon r7" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>35kts Radii</div></div><div class="legend" data-v-726fd7f6><div class="icon r10" data-v-726fd7f6></div><div class="label" data-v-726fd7f6>50kts Radii</div></div></div>',3))]),b.createElementVNode("div",WI,[b.createElementVNode("div",{class:"button",onClick:t[1]||(t[1]=x=>n.handleStrikeProbability(i.activeTropicals))},"Strike Probability >>")])])],512)),[[b.vShow,i.showTropicals&&!r.$attrs.hideTropicalsLegend]])}const pf=ze(DI,[["render",HI],["__scopeId","data-v-726fd7f6"]]),mQ="",$I={name:"IdmPrecip3h",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Va,etime:void 0,right:10}},watch:{"factor.version":{handler(){var r;(r=this.factor)!=null&&r.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var r;this.right=(((r=document.getElementsByClassName("right-bar")[0])==null?void 0:r.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const r=new Date().valueOf();let t=0,e=0;this.handleDraw(),e=new Date().valueOf()-(r+t),console.log("[precip3h] add elapsed: ",e,", total: ",t+=e)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const r=[[0,"rgba(59, 126, 162, 0)"],[14/255,"rgba(84,170,230, 0)"],[15/255,"rgba(172, 210, 255, 0.8)"],[20/255,"rgba(51,202,248,0.8)"],[30/255,"rgba(3,248,103,0.8)"],[49/255,"rgba(14,201,3,0.8)"],[57/255,"rgba(190,226,2,0.8)"],[73/255,"rgba(248,1,1,0.8)"],[82/255,"rgba(197,5,58,0.8)"],[1,"rgba(197,5,58,0.8)"]];this.rampColor=this.webgl.setup(this.context,r);const{program:t,aPositionBuffer:e}=this.webgl.bind(this.context,vt.vertexSchema,vt.fragmentSchema);this.program=t,this.aPositionBuffer=e}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const r=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,r)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},UI={key:0};function YI(r,t,e,a,i,n){var o;return(o=e.factor)!=null&&o.active?(b.openBlock(),b.createElementBlock("div",UI,[b.createElementVNode("div",{class:"legend-bars flex-center",style:b.normalizeStyle([{position:"absolute"},{right:i.right+"px",bottom:e.bottom}])},t[0]||(t[0]=[b.createElementVNode("span",null,"mm",-1),b.createElementVNode("span",null,"1.5",-1),b.createElementVNode("span",null,"2",-1),b.createElementVNode("span",null,"3",-1),b.createElementVNode("span",null,"7",-1),b.createElementVNode("span",null,"10",-1),b.createElementVNode("span",null,"20",-1),b.createElementVNode("span",null,"30",-1)]),4)])):b.createCommentVNode("",!0)}const ZI=ze($I,[["render",YI],["__scopeId","data-v-9708a7a3"]]),yQ="",XI={name:"IdmVisibility",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Va,etime:void 0}},watch:{"factor.version":{handler(){var r;(r=this.factor)!=null&&r.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var r;this.right=(((r=document.getElementsByClassName("right-bar")[0])==null?void 0:r.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const r=new Date().valueOf();let t=0,e=0;this.handleDraw(),e=new Date().valueOf()-(r+t),console.log("[visibility] add elapsed: ",e,", total: ",t+=e)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const r=[[0,"rgba(189,50,160,0.8)"],[8/255,"rgba(208,56,56,0.8)"],[27/255,"rgba(190,226,2,0.8)"],[60/255,"rgba(3,236,118,0.8)"],[160/255,"rgba(172, 210,255,0.8)"],[161/255,"rgba(172, 210,255,0)"],[1,"rgba(144,144,144,0)"]];this.rampColor=this.webgl.setup(this.context,r);const{program:t,aPositionBuffer:e}=this.webgl.bind(this.context,vt.vertexSchema,vt.fragmentSchema);this.program=t,this.aPositionBuffer=e}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const r=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,r)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},jI={key:0};function qI(r,t,e,a,i,n){var o;return(o=e.factor)!=null&&o.active?(b.openBlock(),b.createElementBlock("div",jI,[b.createElementVNode("div",{class:"legend-bars flex-center",style:b.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:e.bottom}])},t[0]||(t[0]=[b.createElementVNode("span",null,"nm",-1),b.createElementVNode("span",null,"0",-1),b.createElementVNode("span",null,"0.5",-1),b.createElementVNode("span",null,"1.5",-1),b.createElementVNode("span",null,"3",-1),b.createElementVNode("span",null,"9",-1)]),4)])):b.createCommentVNode("",!0)}const KI=ze(XI,[["render",qI],["__scopeId","data-v-f7b2fb08"]]),_Q="",JI={name:"IdmWaterTemp",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Va,etime:void 0,right:10}},watch:{"factor.version":{handler(){var r;(r=this.factor)!=null&&r.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var r;this.right=(((r=document.getElementsByClassName("right-bar")[0])==null?void 0:r.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const r=new Date().valueOf();let t=0,e=0;this.handleDraw(),e=new Date().valueOf()-(r+t),console.log("[water-temp] add elapsed: ",e,", total: ",t+=e)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const r=[[0,"rgba(95, 143, 197)"],[46/255,"rgba(95, 143, 197)"],[69/255,"rgb(80, 140, 62)"],[92/255,"rgb(121, 146, 28)"],[115/255,"rgb(171, 161, 14)"],[138/255,"rgb(223, 177, 69)"],[161/255,"rgb(243, 150, 6)"],[184/255,"rgb(236, 95, 21)"],[207/255,"rgb(190, 65, 18)"],[230/255,"rgb(138, 43, 10)"],[1,"rgb(138, 43, 10)"]];this.rampColor=this.webgl.setup(this.context,r);const{program:t,aPositionBuffer:e}=this.webgl.bind(this.context,vt.vertexSchema,vt.fragmentSchema);this.program=t,this.aPositionBuffer=e}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const r=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,r)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},QI={key:0};function eP(r,t,e,a,i,n){var o;return(o=e.factor)!=null&&o.active?(b.openBlock(),b.createElementBlock("div",QI,[b.createElementVNode("div",{class:"legend-bars flex-center",style:b.normalizeStyle([{position:"absolute"},{right:i.right+"px",bottom:e.bottom}])},t[0]||(t[0]=[b.createElementVNode("span",null,"°C",-1),b.createElementVNode("span",null,"0",-1),b.createElementVNode("span",null,"10",-1),b.createElementVNode("span",null,"20",-1),b.createElementVNode("span",null,"30",-1),b.createElementVNode("span",null,"40",-1)]),4)])):b.createCommentVNode("",!0)}const tP=ze(JI,[["render",eP],["__scopeId","data-v-7521f582"]]),bQ="",rP={name:"IdmTemp",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Va,etime:void 0,right:10}},watch:{"factor.version":{handler(){var r;(r=this.factor)!=null&&r.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var r;this.right=(((r=document.getElementsByClassName("right-bar")[0])==null?void 0:r.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const r=new Date().valueOf();let t=0,e=0;this.handleDraw(),e=new Date().valueOf()-(r+t),console.log("[water-temp] add elapsed: ",e,", total: ",t+=e)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const r=[[0,"rgb(149, 137, 211)"],[100/255,"rgb(149, 137, 211)"],[110/255,"rgb(150, 209, 216)"],[120/255,"rgb(129, 204, 197)"],[130/255,"rgb(103, 180, 186)"],[140/255,"rgb(95, 143, 197)"],[150/255,"rgb(80, 140, 62)"],[160/255,"rgb(121, 146, 28)"],[170/255,"rgb(171, 161, 14)"],[180/255,"rgb(223, 177, 6)"],[190/255,"rgb(243, 150, 6)"],[200/255,"rgb(236, 95, 21)"],[210/255,"rgb(190, 65, 18)"],[220/255,"rgb(138, 43, 10)"],[1,"rgb(138, 43, 10)"]];this.rampColor=this.webgl.setup(this.context,r);const{program:t,aPositionBuffer:e}=this.webgl.bind(this.context,vt.vertexSchema,vt.fragmentSchema);this.program=t,this.aPositionBuffer=e}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const r=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,r)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},aP={key:0};function iP(r,t,e,a,i,n){var o;return(o=e.factor)!=null&&o.active?(b.openBlock(),b.createElementBlock("div",aP,[b.createElementVNode("div",{class:"legend-bars flex-center",style:b.normalizeStyle([{position:"absolute"},{right:i.right+"px",bottom:e.bottom}])},t[0]||(t[0]=[b.createElementVNode("span",null,"°C",-1),b.createElementVNode("span",null,"-20",-1),b.createElementVNode("span",null,"-10",-1),b.createElementVNode("span",null,"0",-1),b.createElementVNode("span",null,"10",-1),b.createElementVNode("span",null,"20",-1),b.createElementVNode("span",null,"30",-1),b.createElementVNode("span",null,"40",-1)]),4)])):b.createCommentVNode("",!0)}const nP=ze(rP,[["render",iP],["__scopeId","data-v-25daaa82"]]),wQ="",oP={name:"IdmArctic",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Va,etime:void 0,right:10}},watch:{"factor.version":{handler(){var r;(r=this.factor)!=null&&r.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var r;this.right=(((r=document.getElementsByClassName("right-bar")[0])==null?void 0:r.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const r=new Date().valueOf();let t=0,e=0;this.handleDraw(),e=new Date().valueOf()-(r+t),console.log("[water-temp] add elapsed: ",e,", total: ",t+=e)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const r=[[0,"rgba(76, 165, 228, 0)"],[50/255,"rgba(76, 165, 228, 0)"],[51/255,"rgb(76, 165, 228)"],[102/255,"rgb(129, 204, 197)"],[153/255,"rgb(150, 209, 216)"],[204/255,"rgb(180, 209, 216)"],[1,"rgb(180, 209, 216)"]];this.rampColor=this.webgl.setup(this.context,r);const{program:t,aPositionBuffer:e}=this.webgl.bind(this.context,vt.vertexSchema,vt.fragmentSchema);this.program=t,this.aPositionBuffer=e}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const r=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,r)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},sP={key:0};function lP(r,t,e,a,i,n){var o;return(o=e.factor)!=null&&o.active?(b.openBlock(),b.createElementBlock("div",sP,[b.createElementVNode("div",{class:"legend-bars flex-center",style:b.normalizeStyle([{position:"absolute"},{right:i.right+"px",bottom:e.bottom}])},t[0]||(t[0]=[b.createElementVNode("span",null,"m",-1),b.createElementVNode("span",null,"0",-1),b.createElementVNode("span",null,"0.5",-1),b.createElementVNode("span",null,"1",-1),b.createElementVNode("span",null,"1.5",-1),b.createElementVNode("span",null,"2",-1)]),4)])):b.createCommentVNode("",!0)}const uP=ze(oP,[["render",lP],["__scopeId","data-v-5bb73794"]]);/*! Element Plus Icons Vue v2.3.1 */var cP=b.defineComponent({name:"Download",__name:"download",setup(r){return(t,e)=>(b.openBlock(),b.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),hP=cP,fP=b.defineComponent({name:"LocationFilled",__name:"location-filled",setup(r){return(t,e)=>(b.openBlock(),b.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b.createElementVNode("path",{fill:"currentColor",d:"M512 928c23.936 0 117.504-68.352 192.064-153.152C803.456 661.888 864 535.808 864 416c0-189.632-155.84-320-352-320S160 226.368 160 416c0 120.32 60.544 246.4 159.936 359.232C394.432 859.84 488 928 512 928m0-435.2a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 140.8a204.8 204.8 0 1 1 0-409.6 204.8 204.8 0 0 1 0 409.6"})]))}}),dP=fP,pP=b.defineComponent({name:"Search",__name:"search",setup(r){return(t,e)=>(b.openBlock(),b.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),$y=pP;class au{static pickHourly(t,e){var a,i,n,o,s,l,u,c,h,f,d,p,v,g,m,y,_,w,x,S,L,C,T,A,D,E,I,P,k;const N=typeof e=="string"?Ue(e):e,O=t.weather,R=t.marine,V=Ue(O[0].hourly.date).utc(),B=V.clone().add(O[0].hourly.time.at(0),"h"),H=V.clone().add(O[0].hourly.time.at(-1),"h"),Y=[];if(N.isBetween(B,H,"millisecond","[]")){const $=N.utc().diff(B,"h",!1);let U,q;for(const Ce of O){const ce=Ce.hourly;U={temp:(a=ce.temperature_2m)==null?void 0:a.at($),apparentTemp:(i=ce.apparent_temperature)==null?void 0:i.at($),rh:(n=ce.relative_humidity_2m)==null?void 0:n.at($),dp:(o=ce.dew_point_2m)==null?void 0:o.at($),precip:{probability:(s=ce.precipitation_probability)==null?void 0:s.at($),sum:(l=ce.precipitation)==null?void 0:l.at($)},code:(u=ce.weather_code)==null?void 0:u.at($),visibility:this.m2nm((c=ce.visibility)==null?void 0:c.at($)),wind:{speed:(h=ce.wind_speed_10m)==null?void 0:h.at($),kts:(f=ce.wind_speed_10m)==null?void 0:f.at($),angle:(d=ce.wind_direction_10m)==null?void 0:d.at($),gusts:(p=ce.wind_gusts_10m)==null?void 0:p.at($)},isDay:(v=ce.is_day)==null?void 0:v.at($)};const{name:he,url:ee}=this.parseWeatherCode(U.code,U.isDay);U.name=he,U.url=ee,U.wind.scale=this.beaufort(this.kts2ms(U.wind.kts)),U.wind.direction=this.angle2Direction(U.wind.angle)}for(const Ce of R){const ce=Ce.hourly;q={wave:{sig:{height:(g=ce.wave_height)==null?void 0:g.at($),degree:(m=ce.wave_direction)==null?void 0:m.at($),period:(y=ce.wave_period)==null?void 0:y.at($)},swell:{height:(_=ce.swell_wave_height)==null?void 0:_.at($),degree:(w=ce.swell_wave_direction)==null?void 0:w.at($),period:(x=ce.swell_wave_period)==null?void 0:x.at($),peakPeriod:(S=ce.swell_wave_peak_period)==null?void 0:S.at($)},wd:{height:(L=ce.wind_wave_height)==null?void 0:L.at($),degree:(C=ce.wind_wave_direction)==null?void 0:C.at($),period:(T=ce.wind_wave_period)==null?void 0:T.at($),peakPeriod:(A=ce.wind_wave_peak_period)==null?void 0:A.at($)}},current:{speed:(D=ce.ocean_current_velocity)==null?void 0:D.at($),kts:(E=ce.ocean_current_velocity)==null?void 0:E.at($),degree:(I=ce.ocean_current_direction)==null?void 0:I.at($)},sst:(P=ce.sea_surface_temperature)==null?void 0:P.at($),height:(k=ce.sea_level_height_msl)==null?void 0:k.at($)},q.wave.sig.direction=this.angle2Direction(q.wave.sig.degree),q.wave.swell.direction=this.angle2Direction(q.wave.swell.degree),q.wave.wd.direction=this.angle2Direction(q.wave.wd.degree),q.wave.sig.scale=this.douglas(q.wave.sig.height),q.wave.swell.scale=this.douglas(q.wave.swell.height),q.wave.wd.scale=this.douglas(q.wave.wd.height),q.current.direction=this.angle2Direction(q.current.degree)}Y.push({utc:B.add($,"h").format(),weather:{...U},...q})}return Y}static pickDaily(t,e){var a,i,n,o,s,l,u,c,h,f,d,p,v,g,m,y,_,w,x,S,L,C,T;const A=typeof e=="string"?Ue(e):e,D=t.weather,E=t.marine,I=Ue(D[0].daily.time.at(0)),P=Ue(D[0].daily.time.at(-1)),k=[];if(A.isBetween(I,P,"millisecond","[]")){let N,O;const R=A.diff(I,"d",!1);for(const V of D){const B=V.daily;N={code:(a=B.weather_code)==null?void 0:a.at(R),temp:{max:(i=B.temperature_2m_max)==null?void 0:i.at(R),min:(n=B.temperature_2m_min)==null?void 0:n.at(R)},apparentTemp:{max:(o=B.apparent_temperature_max)==null?void 0:o.at(R),min:(s=B.apparent_temperature_min)==null?void 0:s.at(R)},precip:{sum:(l=B.precipitation_sum)==null?void 0:l.at(R),hours:(u=B.precipitation_hours)==null?void 0:u.at(R),probability:(c=B.precipitation_probability_max)==null?void 0:c.at(R)},wind:{speed:(h=B.wind_speed_10m_max)==null?void 0:h.at(R),kts:(f=B.wind_speed_10m_max)==null?void 0:f.at(R),angle:(d=B.wind_direction_10m_dominant)==null?void 0:d.at(R),gusts:(p=B.wind_gusts_10m_max)==null?void 0:p.at(R)}};const{name:H,url:Y}=this.parseWeatherCode(N.code,!0);N.name=H,N.url=Y,N.wind.scale=this.beaufort(this.kts2ms(N.wind.kts)),N.wind.direction=this.angle2Direction(N.wind.angle)}for(const V of E){const B=V.daily;O={wave:{sig:{height:(v=B.wave_height_max)==null?void 0:v.at(R),degree:(g=B.wave_direction_dominant)==null?void 0:g.at(R),period:(m=B.wave_period_max)==null?void 0:m.at(R)},swell:{height:(y=B.swell_wave_height_max)==null?void 0:y.at(R),degree:(_=B.wave_direction_dominant)==null?void 0:_.at(R),period:(w=B.swell_wave_period_max)==null?void 0:w.at(R),peakPeriod:(x=B.swell_wave_peak_period_max)==null?void 0:x.at(R)},wd:{height:(S=B.wind_wave_height_max)==null?void 0:S.at(R),degree:(L=B.wind_wave_direction_dominant)==null?void 0:L.at(R),period:(C=B.wind_wave_period_max)==null?void 0:C.at(R),peakPeriod:(T=B.wind_wave_peak_period_max)==null?void 0:T.at(R)}}},O.wave.sig.direction=this.angle2Direction(O.wave.sig.degree),O.wave.swell.direction=this.angle2Direction(O.wave.swell.degree),O.wave.wd.direction=this.angle2Direction(O.wave.wd.degree),O.wave.sig.scale=this.douglas(O.wave.sig.height),O.wave.swell.scale=this.douglas(O.wave.swell.height),O.wave.wd.scale=this.douglas(O.wave.wd.height)}k.push({utc:I.add(R,"d").utc().format(),weather:{...N},...O})}return k}static parseWeatherCode(t,e){const a=this.weatherCode(t);return e?a.day:a.night}static weatherCode(t){const e={code:t};switch(t){case 0:e.day={name:"Sunny",url:"https://osshz.idmwx.com/asset/weather/01d.svg"},e.night={name:"Clear",url:"https://osshz.idmwx.com/asset/weather/01n.svg"};break;case 1:e.day={name:"Mainly Sunny",url:"https://osshz.idmwx.com/asset/weather/01d.svg"},e.night={name:"Mainly Clear",url:"https://osshz.idmwx.com/asset/weather/01n.svg"};break;case 2:e.day={name:"Partly Cloudy",url:"https://osshz.idmwx.com/asset/weather/02d.svg"},e.night={name:"Partly Cloudy",url:"https://osshz.idmwx.com/asset/weather/02n.svg"};break;case 3:e.day={name:"Cloudy",url:"https://osshz.idmwx.com/asset/weather/03d.svg"},e.night={name:"Cloudy",url:"https://osshz.idmwx.com/asset/weather/03n.svg"};break;case 45:e.day={name:"Foggy",url:"https://osshz.idmwx.com/asset/weather/50d.svg"},e.night={name:"Foggy",url:"https://osshz.idmwx.com/asset/weather/50n.svg"};break;case 48:e.day={name:"Rime Fog",url:"https://osshz.idmwx.com/asset/weather/50d.svg"},e.night={name:"Rime Fog",url:"https://osshz.idmwx.com/asset/weather/50n.svg"};break;case 51:e.day={name:"Light Drizzle",url:"https://osshz.idmwx.com/asset/weather/09d.svg"},e.night={name:"Light Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg"};break;case 53:e.day={name:"Drizzle",url:"https://osshz.idmwx.com/asset/weather/09d.svg"},e.night={name:"Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg"};break;case 55:e.day={name:"Heavy Drizzle",url:"https://osshz.idmwx.com/asset/weather/09d.svg"},e.night={name:"Heavy Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg"};break;case 56:e.day={name:"Light Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/09d.svg"},e.night={name:"Light Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg"};break;case 57:e.day={name:"Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/09d.svg"},e.night={name:"Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg"};break;case 61:e.day={name:"Light Rain",url:"https://osshz.idmwx.com/asset/weather/10d.svg"},e.night={name:"Light Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg"};break;case 63:e.day={name:"Rain",url:"https://osshz.idmwx.com/asset/weather/10d.svg"},e.night={name:"Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg"};break;case 65:e.day={name:"Heavy Rain",url:"https://osshz.idmwx.com/asset/weather/10d.svg"},e.night={name:"Heavy Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg"};break;case 66:e.day={name:"Light Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/10d.svg"},e.night={name:"Light Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg"};break;case 67:e.day={name:"Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/10d.svg"},e.night={name:"Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg"};break;case 71:e.day={name:"Light Snow",url:"https://osshz.idmwx.com/asset/weather/13d.svg"},e.night={name:"Light Snow",url:"https://osshz.idmwx.com/asset/weather/13n.svg"};break;case 73:e.day={name:"Snow",url:"https://osshz.idmwx.com/asset/weather/13d.svg"},e.night={name:"Snow",url:"https://osshz.idmwx.com/asset/weather/13n.svg"};break;case 75:e.day={name:"Heavy Snow",url:"https://osshz.idmwx.com/asset/weather/13d.svg"},e.night={name:"Heavy Snow",url:"https://osshz.idmwx.com/asset/weather/13n.svg"};break;case 77:e.day={name:"Snow Grains",url:"https://osshz.idmwx.com/asset/weather/13d.svg"},e.night={name:"Snow Grains",url:"https://osshz.idmwx.com/asset/weather/13n.svg"};break;case 80:e.day={name:"Light Showers",url:"https://osshz.idmwx.com/asset/weather/09d.svg"},e.night={name:"Light Showers",url:"https://osshz.idmwx.com/asset/weather/09n.svg"};break;case 81:e.day={name:"Showers",url:"https://osshz.idmwx.com/asset/weather/09d.svg"},e.night={name:"Showers",url:"https://osshz.idmwx.com/asset/weather/09n.svg"};break;case 82:e.day={name:"Heavy Showers",url:"https://osshz.idmwx.com/asset/weather/09d.svg"},e.night={name:"Heavy Showers",url:"https://osshz.idmwx.com/asset/weather/09n.svg"};break;case 85:e.day={name:"Light Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13d.svg"},e.night={name:"Light Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13n.svg"};break;case 86:e.day={name:"Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13d.svg"},e.night={name:"Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13n.svg"};break;case 95:e.day={name:"Thunderstorm",url:"https://osshz.idmwx.com/asset/weather/11d.svg"},e.night={name:"Thunderstorm",url:"https://osshz.idmwx.com/asset/weather/11n.svg"};break;case 96:e.day={name:"Light Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11d.svg"},e.night={name:"Light Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11n.svg"};break;case 99:e.day={name:"Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11d.svg"},e.night={name:"Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11n.svg"};break}return e}static kts2ms(t){return Number.isNaN(t)?t:Math.round(t*1852/3600*1e4)/1e4}static kts2kmh(t){return Number.isNaN(t)?t:t*1.852}static m2nm(t){return Number.isNaN(t)?t:Math.round(t/1e3/1.852*1e4)/1e4}static kmh2kts(t){return Number.isNaN(t)?t:this.ms2kts(t*1e3/3600)}static ms2kts(t){return Number.isNaN(t)?t:Math.round(t*3600/1852*1e4)/1e4}static angle2Radian(t){if(Number.isNaN(t))return t;let e=t%360/360*2*Math.PI;return e=e<0?e+2*Math.PI:e,e}static angle2Direction(t){const e=this.angle2Radian(t);let a="N/A";const i=Math.PI/16;return e<i?a="N":e>=i&&e<3*i?a="NNE":e>=3*i&&e<5*i?a="NE":e>=5*i&&e<7*i?a="ENE":e>=7*i&&e<9*i?a="E":e>=9*i&&e<11*i?a="ESE":e>=11*i&&e<13*i?a="SE":e>=13*i&&e<15*i?a="SSE":e>=15*i&&e<17*i?a="S":e>=17*i&&e<19*i?a="SSW":e>=19*i&&e<21*i?a="SW":e>=21*i&&e<23*i?a="WSW":e>=23*i&&e<25*i?a="W":e>=25*i&&e<27*i?a="WNW":e>=27*i&&e<29*i?a="NW":e>=29*i&&e<31*i?a="NNW":e>=31*i&&e<32*i&&(a="N"),a}static beaufort(t){let e=0;return isNaN(t)||(t=Math.round(t*10)/10,t<=.2?e=0:t<=1.5?e=1:t<=3.3?e=2:t<=5.4?e=3:t<=7.9?e=4:t<=10.7?e=5:t<=13.8?e=6:t<=17.1?e=7:t<=20.7?e=8:t<=22.4?e=9:t<=28.4?e=10:t<=32.6?e=11:t>32.6&&(e=12)),e}static douglas(t){let e="Calm";return isNaN(t)||t<=.1?e="Calm":t<=.5?e="Smooth":t<=1.25?e="Slight":t<=2.5?e="Moderate":t<=4?e="Rough":t<=6?e="VeryRough":t<=9?e="High":t<=14?e="VeryHigh":e="Precipitous",e}}/*! *****************************************************************************
205
+ Copyright (c) Microsoft Corporation.
206
+
207
+ Permission to use, copy, modify, and/or distribute this software for any
208
+ purpose with or without fee is hereby granted.
209
+
210
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
211
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
212
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
213
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
214
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
215
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
216
+ PERFORMANCE OF THIS SOFTWARE.
217
+ ***************************************************************************** */var vf=function(r,t){return vf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])},vf(r,t)};function z(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");vf(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var vP=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),gP=function(){function r(){this.browser=new vP,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r}(),Oa=new gP;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Oa.wxa=!0,Oa.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Oa.worker=!0:!Oa.hasGlobalWindow||"Deno"in window?(Oa.node=!0,Oa.svgSupported=!0):mP(navigator.userAgent,Oa);function mP(r,t){var e=t.browser,a=r.match(/Firefox\/([\d.]+)/),i=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),n=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);a&&(e.firefox=!0,e.version=a[1]),i&&(e.ie=!0,e.version=i[1]),n&&(e.edge=!0,e.version=n[1],e.newEdge=+n[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in s||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}const Le=Oa;var gf=12,Uy="sans-serif",za=gf+"px "+Uy,yP=20,_P=100,bP="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function wP(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e<r.length;e++){var a=String.fromCharCode(e+32),i=(r.charCodeAt(e)-yP)/_P;t[a]=i}return t}var xP=wP(bP),Ba={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var r,t;return function(e,a){if(!r){var i=Ba.createCanvas();r=i&&i.getContext("2d")}if(r)return t!==a&&(t=r.font=a||za),r.measureText(e);e=e||"",a=a||za;var n=/((?:\d+)?\.?\d*)px/.exec(a),o=n&&+n[1]||gf,s=0;if(a.indexOf("mono")>=0)s=o*e.length;else for(var l=0;l<e.length;l++){var u=xP[e[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(r,t,e){var a=new Image;return a.onload=t,a.onerror=e,a.src=r,a}},Yy=Wr(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,t){return r["[object "+t+"]"]=!0,r},{}),Zy=Wr(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,t){return r["[object "+t+"Array]"]=!0,r},{}),Hn=Object.prototype.toString,iu=Array.prototype,SP=iu.forEach,LP=iu.filter,mf=iu.slice,TP=iu.map,Xy=(function(){}).constructor,nu=Xy?Xy.prototype:null,yf="__proto__",CP=2311;function jy(){return CP++}function Cr(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];typeof console<"u"&&console.error.apply(console,r)}function ne(r){if(r==null||typeof r!="object")return r;var t=r,e=Hn.call(r);if(e==="[object Array]"){if(!os(r)){t=[];for(var a=0,i=r.length;a<i;a++)t[a]=ne(r[a])}}else if(Zy[e]){if(!os(r)){var n=r.constructor;if(n.from)t=n.from(r);else{t=new n(r.length);for(var a=0,i=r.length;a<i;a++)t[a]=r[a]}}}else if(!Yy[e]&&!os(r)&&!Li(r)){t={};for(var o in r)r.hasOwnProperty(o)&&o!==yf&&(t[o]=ne(r[o]))}return t}function de(r,t,e){if(!re(t)||!re(r))return e?ne(t):r;for(var a in t)if(t.hasOwnProperty(a)&&a!==yf){var i=r[a],n=t[a];re(n)&&re(i)&&!G(n)&&!G(i)&&!Li(n)&&!Li(i)&&!qy(n)&&!qy(i)&&!os(n)&&!os(i)?de(i,n,e):(e||!(a in r))&&(r[a]=ne(t[a]))}return r}function _f(r,t){for(var e=r[0],a=1,i=r.length;a<i;a++)e=de(e,r[a],t);return e}function F(r,t){if(Object.assign)Object.assign(r,t);else for(var e in t)t.hasOwnProperty(e)&&e!==yf&&(r[e]=t[e]);return r}function ie(r,t,e){for(var a=we(t),i=0,n=a.length;i<n;i++){var o=a[i];(e?t[o]!=null:r[o]==null)&&(r[o]=t[o])}return r}function me(r,t){if(r){if(r.indexOf)return r.indexOf(t);for(var e=0,a=r.length;e<a;e++)if(r[e]===t)return e}return-1}function DP(r,t){var e=r.prototype;function a(){}a.prototype=t.prototype,r.prototype=new a;for(var i in e)e.hasOwnProperty(i)&&(r.prototype[i]=e[i]);r.prototype.constructor=r,r.superClass=t}function at(r,t,e){if(r="prototype"in r?r.prototype:r,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var a=Object.getOwnPropertyNames(t),i=0;i<a.length;i++){var n=a[i];n!=="constructor"&&(e?t[n]!=null:r[n]==null)&&(r[n]=t[n])}else ie(r,t,e)}function Dt(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function M(r,t,e){if(r&&t)if(r.forEach&&r.forEach===SP)r.forEach(t,e);else if(r.length===+r.length)for(var a=0,i=r.length;a<i;a++)t.call(e,r[a],a,r);else for(var n in r)r.hasOwnProperty(n)&&t.call(e,r[n],n,r)}function W(r,t,e){if(!r)return[];if(!t)return bf(r);if(r.map&&r.map===TP)return r.map(t,e);for(var a=[],i=0,n=r.length;i<n;i++)a.push(t.call(e,r[i],i,r));return a}function Wr(r,t,e,a){if(r&&t){for(var i=0,n=r.length;i<n;i++)e=t.call(a,e,r[i],i,r);return e}}function Ie(r,t,e){if(!r)return[];if(!t)return bf(r);if(r.filter&&r.filter===LP)return r.filter(t,e);for(var a=[],i=0,n=r.length;i<n;i++)t.call(e,r[i],i,r)&&a.push(r[i]);return a}function AP(r,t,e){if(r&&t){for(var a=0,i=r.length;a<i;a++)if(t.call(e,r[a],a,r))return r[a]}}function we(r){if(!r)return[];if(Object.keys)return Object.keys(r);var t=[];for(var e in r)r.hasOwnProperty(e)&&t.push(e);return t}function MP(r,t){for(var e=[],a=2;a<arguments.length;a++)e[a-2]=arguments[a];return function(){return r.apply(t,e.concat(mf.call(arguments)))}}var j=nu&&te(nu.bind)?nu.call.bind(nu.bind):MP;function fe(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return function(){return r.apply(this,t.concat(mf.call(arguments)))}}function G(r){return Array.isArray?Array.isArray(r):Hn.call(r)==="[object Array]"}function te(r){return typeof r=="function"}function X(r){return typeof r=="string"}function ou(r){return Hn.call(r)==="[object String]"}function De(r){return typeof r=="number"}function re(r){var t=typeof r;return t==="function"||!!r&&t==="object"}function qy(r){return!!Yy[Hn.call(r)]}function Rt(r){return!!Zy[Hn.call(r)]}function Li(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function su(r){return r.colorStops!=null}function EP(r){return r.image!=null}function Ky(r){return Hn.call(r)==="[object RegExp]"}function Ti(r){return r!==r}function it(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var e=0,a=r.length;e<a;e++)if(r[e]!=null)return r[e]}function le(r,t){return r??t}function nr(r,t,e){return r??t??e}function bf(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return mf.apply(r,t)}function wf(r){if(typeof r=="number")return[r,r,r,r];var t=r.length;return t===2?[r[0],r[1],r[0],r[1]]:t===3?[r[0],r[1],r[2],r[1]]:r}function ae(r,t){if(!r)throw new Error(t)}function Dr(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Jy="__ec_primitive__";function lu(r){r[Jy]=!0}function os(r){return r[Jy]}var IP=function(){function r(){this.data={}}return r.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},r.prototype.has=function(t){return this.data.hasOwnProperty(t)},r.prototype.get=function(t){return this.data[t]},r.prototype.set=function(t,e){return this.data[t]=e,this},r.prototype.keys=function(){return we(this.data)},r.prototype.forEach=function(t){var e=this.data;for(var a in e)e.hasOwnProperty(a)&&t(e[a],a)},r}(),Qy=typeof Map=="function";function PP(){return Qy?new Map:new IP}var kP=function(){function r(t){var e=G(t);this.data=PP();var a=this;t instanceof r?t.each(i):t&&M(t,i);function i(n,o){e?a.set(n,o):a.set(o,n)}}return r.prototype.hasKey=function(t){return this.data.has(t)},r.prototype.get=function(t){return this.data.get(t)},r.prototype.set=function(t,e){return this.data.set(t,e),e},r.prototype.each=function(t,e){this.data.forEach(function(a,i){t.call(e,a,i)})},r.prototype.keys=function(){var t=this.data.keys();return Qy?Array.from(t):t},r.prototype.removeKey=function(t){this.data.delete(t)},r}();function Q(r){return new kP(r)}function ss(r,t){for(var e=new r.constructor(r.length+t.length),a=0;a<r.length;a++)e[a]=r[a];for(var i=r.length,a=0;a<t.length;a++)e[a+i]=t[a];return e}function uu(r,t){var e;if(Object.create)e=Object.create(r);else{var a=function(){};a.prototype=r,e=new a}return t&&F(e,t),e}function e0(r){var t=r.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function K(r,t){return r.hasOwnProperty(t)}function et(){}var cu=180/Math.PI;function Ci(r,t){return r==null&&(r=0),t==null&&(t=0),[r,t]}function Vt(r,t){return r[0]=t[0],r[1]=t[1],r}function fa(r){return[r[0],r[1]]}function NP(r,t,e){return r[0]=t,r[1]=e,r}function t0(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r}function xf(r,t,e,a){return r[0]=t[0]+e[0]*a,r[1]=t[1]+e[1]*a,r}function Di(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r}function Sf(r){return Math.sqrt(RP(r))}function RP(r){return r[0]*r[0]+r[1]*r[1]}function hu(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r}function $n(r,t){var e=Sf(t);return e===0?(r[0]=0,r[1]=0):(r[0]=t[0]/e,r[1]=t[1]/e),r}function Lf(r,t){return Math.sqrt((r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1]))}var Fa=Lf;function VP(r,t){return(r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1])}var Ai=VP;function fu(r,t,e,a){return r[0]=t[0]+a*(e[0]-t[0]),r[1]=t[1]+a*(e[1]-t[1]),r}function yt(r,t,e){var a=t[0],i=t[1];return r[0]=e[0]*a+e[2]*i+e[4],r[1]=e[1]*a+e[3]*i+e[5],r}function Ga(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r}function Wa(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r}var Un=function(){function r(t,e){this.target=t,this.topTarget=e&&e.topTarget}return r}(),OP=function(){function r(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Un(e,t),"dragstart",t.event))},r.prototype._drag=function(t){var e=this._draggingTarget;if(e){var a=t.offsetX,i=t.offsetY,n=a-this._x,o=i-this._y;this._x=a,this._y=i,e.drift(n,o,t),this.handler.dispatchToElement(new Un(e,t),"drag",t.event);var s=this.handler.findHover(a,i,e).target,l=this._dropTarget;this._dropTarget=s,e!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Un(l,t),"dragleave",t.event),s&&s!==l&&this.handler.dispatchToElement(new Un(s,t),"dragenter",t.event))}},r.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new Un(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Un(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},r}();const zP=OP;var BP=function(){function r(t){t&&(this._$eventProcessor=t)}return r.prototype.on=function(t,e,a,i){this._$handlers||(this._$handlers={});var n=this._$handlers;if(typeof e=="function"&&(i=a,a=e,e=null),!a||!t)return this;var o=this._$eventProcessor;e!=null&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),n[t]||(n[t]=[]);for(var s=0;s<n[t].length;s++)if(n[t][s].h===a)return this;var l={h:a,query:e,ctx:i||this,callAtLast:a.zrEventfulCallAtLast},u=n[t].length-1,c=n[t][u];return c&&c.callAtLast?n[t].splice(u,0,l):n[t].push(l),this},r.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},r.prototype.off=function(t,e){var a=this._$handlers;if(!a)return this;if(!t)return this._$handlers={},this;if(e){if(a[t]){for(var i=[],n=0,o=a[t].length;n<o;n++)a[t][n].h!==e&&i.push(a[t][n]);a[t]=i}a[t]&&a[t].length===0&&delete a[t]}else delete a[t];return this},r.prototype.trigger=function(t){for(var e=[],a=1;a<arguments.length;a++)e[a-1]=arguments[a];if(!this._$handlers)return this;var i=this._$handlers[t],n=this._$eventProcessor;if(i)for(var o=e.length,s=i.length,l=0;l<s;l++){var u=i[l];if(!(n&&n.filter&&u.query!=null&&!n.filter(t,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,e[0]);break;case 2:u.h.call(u.ctx,e[0],e[1]);break;default:u.h.apply(u.ctx,e);break}}return n&&n.afterTrigger&&n.afterTrigger(t),this},r.prototype.triggerWithContext=function(t){for(var e=[],a=1;a<arguments.length;a++)e[a-1]=arguments[a];if(!this._$handlers)return this;var i=this._$handlers[t],n=this._$eventProcessor;if(i)for(var o=e.length,s=e[o-1],l=i.length,u=0;u<l;u++){var c=i[u];if(!(n&&n.filter&&c.query!=null&&!n.filter(t,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,e[0]);break;case 2:c.h.call(s,e[0],e[1]);break;default:c.h.apply(s,e.slice(1,o-1));break}}return n&&n.afterTrigger&&n.afterTrigger(t),this},r}();const or=BP;var FP=Math.log(2);function Tf(r,t,e,a,i,n){var o=a+"-"+i,s=r.length;if(n.hasOwnProperty(o))return n[o];if(t===1){var l=Math.round(Math.log((1<<s)-1&~i)/FP);return r[e][l]}for(var u=a|1<<e,c=e+1;a&1<<c;)c++;for(var h=0,f=0,d=0;f<s;f++){var p=1<<f;p&i||(h+=(d%2?-1:1)*r[e][f]*Tf(r,t-1,c,u,i|p,n),d++)}return n[o]=h,h}function r0(r,t){var e=[[r[0],r[1],1,0,0,0,-t[0]*r[0],-t[0]*r[1]],[0,0,0,r[0],r[1],1,-t[1]*r[0],-t[1]*r[1]],[r[2],r[3],1,0,0,0,-t[2]*r[2],-t[2]*r[3]],[0,0,0,r[2],r[3],1,-t[3]*r[2],-t[3]*r[3]],[r[4],r[5],1,0,0,0,-t[4]*r[4],-t[4]*r[5]],[0,0,0,r[4],r[5],1,-t[5]*r[4],-t[5]*r[5]],[r[6],r[7],1,0,0,0,-t[6]*r[6],-t[6]*r[7]],[0,0,0,r[6],r[7],1,-t[7]*r[6],-t[7]*r[7]]],a={},i=Tf(e,8,0,0,0,a);if(i!==0){for(var n=[],o=0;o<8;o++)for(var s=0;s<8;s++)n[s]==null&&(n[s]=0),n[s]+=((o+s)%2?-1:1)*Tf(e,7,o===0?1:0,1<<o,1<<s,a)/i*t[o];return function(l,u,c){var h=u*n[6]+c*n[7]+1;l[0]=(u*n[0]+c*n[1]+n[2])/h,l[1]=(u*n[3]+c*n[4]+n[5])/h}}}var a0="___zrEVENTSAVED",Cf=[];function GP(r,t,e,a,i){return Df(Cf,t,a,i,!0)&&Df(r,e,Cf[0],Cf[1])}function Df(r,t,e,a,i){if(t.getBoundingClientRect&&Le.domSupported&&!i0(t)){var n=t[a0]||(t[a0]={}),o=WP(t,n),s=HP(o,n,i);if(s)return s(r,e,a),!0}return!1}function WP(r,t){var e=t.markers;if(e)return e;e=t.markers=[];for(var a=["left","right"],i=["top","bottom"],n=0;n<4;n++){var o=document.createElement("div"),s=o.style,l=n%2,u=(n>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",i[u]+":0",a[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return e}function HP(r,t,e){for(var a=e?"invTrans":"trans",i=t[a],n=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),h=2*u,f=c.left,d=c.top;o.push(f,d),l=l&&n&&f===n[h]&&d===n[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&i?i:(t.srcCoords=o,t[a]=e?r0(s,o):r0(o,s))}function i0(r){return r.nodeName.toUpperCase()==="CANVAS"}var $P=/([&<>"'])/g,UP={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function At(r){return r==null?"":(r+"").replace($P,function(t,e){return UP[e]})}var YP=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Af=[],ZP=Le.browser.firefox&&+Le.browser.version.split(".")[0]<39;function Mf(r,t,e,a){return e=e||{},a?n0(r,t,e):ZP&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):n0(r,t,e),e}function n0(r,t,e){if(Le.domSupported&&r.getBoundingClientRect){var a=t.clientX,i=t.clientY;if(i0(r)){var n=r.getBoundingClientRect();e.zrX=a-n.left,e.zrY=i-n.top;return}else if(Df(Af,r,a,i)){e.zrX=Af[0],e.zrY=Af[1];return}}e.zrX=e.zrY=0}function Ef(r){return r||window.event}function sr(r,t,e){if(t=Ef(t),t.zrX!=null)return t;var a=t.type,i=a&&a.indexOf("touch")>=0;if(i){var o=a!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Mf(r,o,t,e)}else{Mf(r,t,t,e);var n=XP(t);t.zrDelta=n?n/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&YP.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function XP(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,a=r.deltaY;if(e==null||a==null)return t;var i=Math.abs(a!==0?a:e),n=a>0?-1:a<0?1:e>0?-1:1;return 3*i*n}function If(r,t,e,a){r.addEventListener(t,e,a)}function jP(r,t,e,a){r.removeEventListener(t,e,a)}var da=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function o0(r){return r.which===2||r.which===3}var qP=function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,a){return this._doTrack(t,e,a),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,a){var i=t.touches;if(i){for(var n={points:[],touches:[],target:e,event:t},o=0,s=i.length;o<s;o++){var l=i[o],u=Mf(a,l,{});n.points.push([u.zrX,u.zrY]),n.touches.push(l)}this._track.push(n)}},r.prototype._recognize=function(t){for(var e in Pf)if(Pf.hasOwnProperty(e)){var a=Pf[e](this._track,t);if(a)return a}},r}();function s0(r){var t=r[1][0]-r[0][0],e=r[1][1]-r[0][1];return Math.sqrt(t*t+e*e)}function KP(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var Pf={pinch:function(r,t){var e=r.length;if(e){var a=(r[e-1]||{}).points,i=(r[e-2]||{}).points||a;if(i&&i.length>1&&a&&a.length>1){var n=s0(a)/s0(i);!isFinite(n)&&(n=1),t.pinchScale=n;var o=KP(a);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function Jt(){return[1,0,0,1,0,0]}function du(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function kf(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function pa(r,t,e){var a=t[0]*e[0]+t[2]*e[1],i=t[1]*e[0]+t[3]*e[1],n=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=a,r[1]=i,r[2]=n,r[3]=o,r[4]=s,r[5]=l,r}function Hr(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function Mi(r,t,e,a){a===void 0&&(a=[0,0]);var i=t[0],n=t[2],o=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(e),h=Math.cos(e);return r[0]=i*h+s*c,r[1]=-i*c+s*h,r[2]=n*h+l*c,r[3]=-n*c+h*l,r[4]=h*(o-a[0])+c*(u-a[1])+a[0],r[5]=h*(u-a[1])-c*(o-a[0])+a[1],r}function Nf(r,t,e){var a=e[0],i=e[1];return r[0]=t[0]*a,r[1]=t[1]*i,r[2]=t[2]*a,r[3]=t[3]*i,r[4]=t[4]*a,r[5]=t[5]*i,r}function Yn(r,t){var e=t[0],a=t[2],i=t[4],n=t[1],o=t[3],s=t[5],l=e*o-n*a;return l?(l=1/l,r[0]=o*l,r[1]=-n*l,r[2]=-a*l,r[3]=e*l,r[4]=(a*s-o*i)*l,r[5]=(n*i-e*s)*l,r):null}function JP(r){var t=Jt();return kf(t,r),t}var QP=function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,a=this.y-t.y;return Math.sqrt(e*e+a*a)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,a=this.y-t.y;return e*e+a*a},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,a=this.y;return this.x=t[0]*e+t[2]*a+t[4],this.y=t[1]*e+t[3]*a+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,a){t.x=e,t.y=a},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,a){t.x=e.x+a.x,t.y=e.y+a.y},r.sub=function(t,e,a){t.x=e.x-a.x,t.y=e.y-a.y},r.scale=function(t,e,a){t.x=e.x*a,t.y=e.y*a},r.scaleAndAdd=function(t,e,a,i){t.x=e.x+a.x*i,t.y=e.y+a.y*i},r.lerp=function(t,e,a,i){var n=1-i;t.x=n*e.x+i*a.x,t.y=n*e.y+i*a.y},r}();const ve=QP;var pu=Math.min,vu=Math.max,Ei=new ve,Ii=new ve,Pi=new ve,ki=new ve,ls=new ve,us=new ve,ek=function(){function r(t,e,a,i){a<0&&(t=t+a,a=-a),i<0&&(e=e+i,i=-i),this.x=t,this.y=e,this.width=a,this.height=i}return r.prototype.union=function(t){var e=pu(t.x,this.x),a=pu(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=vu(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=vu(t.y+t.height,this.y+this.height)-a:this.height=t.height,this.x=e,this.y=a},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,a=t.width/e.width,i=t.height/e.height,n=Jt();return Hr(n,n,[-e.x,-e.y]),Nf(n,n,[a,i]),Hr(n,n,[t.x,t.y]),n},r.prototype.intersect=function(t,e){if(!t)return!1;t instanceof r||(t=r.create(t));var a=this,i=a.x,n=a.x+a.width,o=a.y,s=a.y+a.height,l=t.x,u=t.x+t.width,c=t.y,h=t.y+t.height,f=!(n<l||u<i||s<c||h<o);if(e){var d=1/0,p=0,v=Math.abs(n-l),g=Math.abs(u-i),m=Math.abs(s-c),y=Math.abs(h-o),_=Math.min(v,g),w=Math.min(m,y);n<l||u<i?_>p&&(p=_,v<g?ve.set(us,-v,0):ve.set(us,g,0)):_<d&&(d=_,v<g?ve.set(ls,v,0):ve.set(ls,-g,0)),s<c||h<o?w>p&&(p=w,m<y?ve.set(us,0,-m):ve.set(us,0,y)):_<d&&(d=_,m<y?ve.set(ls,0,m):ve.set(ls,0,-y))}return e&&ve.copy(e,f?ls:us),f},r.prototype.contain=function(t,e){var a=this;return t>=a.x&&t<=a.x+a.width&&e>=a.y&&e<=a.y+a.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},r.applyTransform=function(t,e,a){if(!a){t!==e&&r.copy(t,e);return}if(a[1]<1e-5&&a[1]>-1e-5&&a[2]<1e-5&&a[2]>-1e-5){var i=a[0],n=a[3],o=a[4],s=a[5];t.x=e.x*i+o,t.y=e.y*n+s,t.width=e.width*i,t.height=e.height*n,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Ei.x=Pi.x=e.x,Ei.y=ki.y=e.y,Ii.x=ki.x=e.x+e.width,Ii.y=Pi.y=e.y+e.height,Ei.transform(a),ki.transform(a),Ii.transform(a),Pi.transform(a),t.x=pu(Ei.x,Ii.x,Pi.x,ki.x),t.y=pu(Ei.y,Ii.y,Pi.y,ki.y);var l=vu(Ei.x,Ii.x,Pi.x,ki.x),u=vu(Ei.y,Ii.y,Pi.y,ki.y);t.width=l-t.x,t.height=u-t.y},r}();const ge=ek;var l0="silent";function tk(r,t,e){return{type:r,event:e,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:e.zrX,offsetY:e.zrY,gestureEvent:e.gestureEvent,pinchX:e.pinchX,pinchY:e.pinchY,pinchScale:e.pinchScale,wheelDelta:e.zrDelta,zrByTouch:e.zrByTouch,which:e.which,stop:rk}}function rk(){da(this.event)}var ak=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.handler=null,e}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(or),cs=function(){function r(t,e){this.x=t,this.y=e}return r}(),ik=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Rf=new ge(0,0,0,0),u0=function(r){z(t,r);function t(e,a,i,n,o){var s=r.call(this)||this;return s._hovered=new cs(0,0),s.storage=e,s.painter=a,s.painterRoot=n,s._pointerSize=o,i=i||new ak,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new zP(s),s}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(M(ik,function(a){e.on&&e.on(a,this[a],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var a=e.zrX,i=e.zrY,n=h0(this,a,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=n?new cs(a,i):this.findHover(a,i),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(l,"mousemove",e),u&&u!==s&&this.dispatchToElement(l,"mouseover",e)},t.prototype.mouseout=function(e){var a=e.zrEventControl;a!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),a!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new cs(0,0)},t.prototype.dispatch=function(e,a){var i=this[e];i&&i.call(this,a)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var a=this.proxy;a.setCursor&&a.setCursor(e)},t.prototype.dispatchToElement=function(e,a,i){e=e||{};var n=e.target;if(!(n&&n.silent)){for(var o="on"+a,s=tk(a,e,i);n&&(n[o]&&(s.cancelBubble=!!n[o].call(n,s)),n.trigger(a,s),n=n.__hostTarget?n.__hostTarget:n.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(a,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(a,s)}))}},t.prototype.findHover=function(e,a,i){var n=this.storage.getDisplayList(),o=new cs(e,a);if(c0(n,o,e,a,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new ge(e-u,a-u,l,l),h=n.length-1;h>=0;h--){var f=n[h];f!==i&&!f.ignore&&!f.ignoreCoarsePointer&&(!f.parent||!f.parent.ignoreCoarsePointer)&&(Rf.copy(f.getBoundingRect()),f.transform&&Rf.applyTransform(f.transform),Rf.intersect(c)&&s.push(f))}if(s.length)for(var d=4,p=Math.PI/12,v=Math.PI*2,g=0;g<u;g+=d)for(var m=0;m<v;m+=p){var y=e+g*Math.cos(m),_=a+g*Math.sin(m);if(c0(s,o,y,_,i),o.target)return o}}return o},t.prototype.processGesture=function(e,a){this._gestureMgr||(this._gestureMgr=new qP);var i=this._gestureMgr;a==="start"&&i.clear();var n=i.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(a==="end"&&i.clear(),n){var o=n.type;e.gestureEvent=o;var s=new cs;s.target=n.target,this.dispatchToElement(s,o,n.event)}},t}(or);M(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){u0.prototype[r]=function(t){var e=t.zrX,a=t.zrY,i=h0(this,e,a),n,o;if((r!=="mouseup"||!i)&&(n=this.findHover(e,a),o=n.target),r==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||Fa(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,r,t)}});function nk(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var a=r,i=void 0,n=!1;a;){if(a.ignoreClip&&(n=!0),!n){var o=a.getClipPath();if(o&&!o.contain(t,e))return!1}a.silent&&(i=!0);var s=a.__hostTarget;a=s||a.parent}return i?l0:!0}return!1}function c0(r,t,e,a,i){for(var n=r.length-1;n>=0;n--){var o=r[n],s=void 0;if(o!==i&&!o.ignore&&(s=nk(o,e,a))&&(!t.topTarget&&(t.topTarget=o),s!==l0)){t.target=o;break}}}function h0(r,t,e){var a=r.painter;return t<0||t>a.getWidth()||e<0||e>a.getHeight()}const ok=u0;var f0=32,hs=7;function sk(r){for(var t=0;r>=f0;)t|=r&1,r>>=1;return r+t}function d0(r,t,e,a){var i=t+1;if(i===e)return 1;if(a(r[i++],r[t])<0){for(;i<e&&a(r[i],r[i-1])<0;)i++;lk(r,t,i)}else for(;i<e&&a(r[i],r[i-1])>=0;)i++;return i-t}function lk(r,t,e){for(e--;t<e;){var a=r[t];r[t++]=r[e],r[e--]=a}}function p0(r,t,e,a,i){for(a===t&&a++;a<e;a++){for(var n=r[a],o=t,s=a,l;o<s;)l=o+s>>>1,i(n,r[l])<0?s=l:o=l+1;var u=a-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=n}}function Vf(r,t,e,a,i,n){var o=0,s=0,l=1;if(n(r,t[e+i])>0){for(s=a-i;l<s&&n(r,t[e+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&n(r,t[e+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var c=o+(l-o>>>1);n(r,t[e+c])>0?o=c+1:l=c}return l}function Of(r,t,e,a,i,n){var o=0,s=0,l=1;if(n(r,t[e+i])<0){for(s=i+1;l<s&&n(r,t[e+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=a-i;l<s&&n(r,t[e+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var c=o+(l-o>>>1);n(r,t[e+c])<0?l=c:o=c+1}return l}function uk(r,t){var e=hs,a,i,n=0,o=[];a=[],i=[];function s(d,p){a[n]=d,i[n]=p,n+=1}function l(){for(;n>1;){var d=n-2;if(d>=1&&i[d-1]<=i[d]+i[d+1]||d>=2&&i[d-2]<=i[d]+i[d-1])i[d-1]<i[d+1]&&d--;else if(i[d]>i[d+1])break;c(d)}}function u(){for(;n>1;){var d=n-2;d>0&&i[d-1]<i[d+1]&&d--,c(d)}}function c(d){var p=a[d],v=i[d],g=a[d+1],m=i[d+1];i[d]=v+m,d===n-3&&(a[d+1]=a[d+2],i[d+1]=i[d+2]),n--;var y=Of(r[g],r,p,v,0,t);p+=y,v-=y,v!==0&&(m=Vf(r[p+v-1],r,g,m,m-1,t),m!==0&&(v<=m?h(p,v,g,m):f(p,v,g,m)))}function h(d,p,v,g){var m=0;for(m=0;m<p;m++)o[m]=r[d+m];var y=0,_=v,w=d;if(r[w++]=r[_++],--g===0){for(m=0;m<p;m++)r[w+m]=o[y+m];return}if(p===1){for(m=0;m<g;m++)r[w+m]=r[_+m];r[w+g]=o[y];return}for(var x=e,S,L,C;;){S=0,L=0,C=!1;do if(t(r[_],o[y])<0){if(r[w++]=r[_++],L++,S=0,--g===0){C=!0;break}}else if(r[w++]=o[y++],S++,L=0,--p===1){C=!0;break}while((S|L)<x);if(C)break;do{if(S=Of(r[_],o,y,p,0,t),S!==0){for(m=0;m<S;m++)r[w+m]=o[y+m];if(w+=S,y+=S,p-=S,p<=1){C=!0;break}}if(r[w++]=r[_++],--g===0){C=!0;break}if(L=Vf(o[y],r,_,g,0,t),L!==0){for(m=0;m<L;m++)r[w+m]=r[_+m];if(w+=L,_+=L,g-=L,g===0){C=!0;break}}if(r[w++]=o[y++],--p===1){C=!0;break}x--}while(S>=hs||L>=hs);if(C)break;x<0&&(x=0),x+=2}if(e=x,e<1&&(e=1),p===1){for(m=0;m<g;m++)r[w+m]=r[_+m];r[w+g]=o[y]}else{if(p===0)throw new Error;for(m=0;m<p;m++)r[w+m]=o[y+m]}}function f(d,p,v,g){var m=0;for(m=0;m<g;m++)o[m]=r[v+m];var y=d+p-1,_=g-1,w=v+g-1,x=0,S=0;if(r[w--]=r[y--],--p===0){for(x=w-(g-1),m=0;m<g;m++)r[x+m]=o[m];return}if(g===1){for(w-=p,y-=p,S=w+1,x=y+1,m=p-1;m>=0;m--)r[S+m]=r[x+m];r[w]=o[_];return}for(var L=e;;){var C=0,T=0,A=!1;do if(t(o[_],r[y])<0){if(r[w--]=r[y--],C++,T=0,--p===0){A=!0;break}}else if(r[w--]=o[_--],T++,C=0,--g===1){A=!0;break}while((C|T)<L);if(A)break;do{if(C=p-Of(o[_],r,d,p,p-1,t),C!==0){for(w-=C,y-=C,p-=C,S=w+1,x=y+1,m=C-1;m>=0;m--)r[S+m]=r[x+m];if(p===0){A=!0;break}}if(r[w--]=o[_--],--g===1){A=!0;break}if(T=g-Vf(r[y],o,0,g,g-1,t),T!==0){for(w-=T,_-=T,g-=T,S=w+1,x=_+1,m=0;m<T;m++)r[S+m]=o[x+m];if(g<=1){A=!0;break}}if(r[w--]=r[y--],--p===0){A=!0;break}L--}while(C>=hs||T>=hs);if(A)break;L<0&&(L=0),L+=2}if(e=L,e<1&&(e=1),g===1){for(w-=p,y-=p,S=w+1,x=y+1,m=p-1;m>=0;m--)r[S+m]=r[x+m];r[w]=o[_]}else{if(g===0)throw new Error;for(x=w-(g-1),m=0;m<g;m++)r[x+m]=o[m]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function gu(r,t,e,a){e||(e=0),a||(a=r.length);var i=a-e;if(!(i<2)){var n=0;if(i<f0){n=d0(r,e,a,t),p0(r,e,a,e+n,t);return}var o=uk(r,t),s=sk(i);do{if(n=d0(r,e,a,t),n<s){var l=i;l>s&&(l=s),p0(r,e,e+l,e+n,t),n=l}o.pushRun(e,n),o.mergeRuns(),i-=n,e+=n}while(i!==0);o.forceMergeRuns()}}var Qt=1,fs=2,Zn=4,v0=!1;function zf(){v0||(v0=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function g0(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var ck=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=g0}return r.prototype.traverse=function(t,e){for(var a=0;a<this._roots.length;a++)this._roots[a].traverse(t,e)},r.prototype.getDisplayList=function(t,e){e=e||!1;var a=this._displayList;return(t||!a.length)&&this.updateDisplayList(e),a},r.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,a=this._displayList,i=0,n=e.length;i<n;i++)this._updateAndAddDisplayable(e[i],null,t);a.length=this._displayListLen,gu(a,g0)},r.prototype._updateAndAddDisplayable=function(t,e,a){if(!(t.ignore&&!a)){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath();if(t.ignoreClip)e=null;else if(i){e?e=e.slice():e=[];for(var n=i,o=t;n;)n.parent=o,n.updateTransform(),e.push(n),o=n,n=n.getClipPath()}if(t.childrenRef){for(var s=t.childrenRef(),l=0;l<s.length;l++){var u=s[l];t.__dirty&&(u.__dirty|=Qt),this._updateAndAddDisplayable(u,e,a)}t.__dirty=0}else{var c=t;e&&e.length?c.__clipPaths=e:c.__clipPaths&&c.__clipPaths.length>0&&(c.__clipPaths=[]),isNaN(c.z)&&(zf(),c.z=0),isNaN(c.z2)&&(zf(),c.z2=0),isNaN(c.zlevel)&&(zf(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,a);var f=t.getTextGuideLine();f&&this._updateAndAddDisplayable(f,e,a);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,a)}},r.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},r.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,a=t.length;e<a;e++)this.delRoot(t[e]);return}var i=me(this._roots,t);i>=0&&this._roots.splice(i,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}();const hk=ck;var m0;m0=Le.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};const Bf=m0;var mu={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)))},elasticOut:function(r){var t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/a)+1)},elasticInOut:function(r){var t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-mu.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?mu.bounceIn(r*2)*.5:mu.bounceOut(r*2-1)*.5+.5}};const y0=mu;var yu=Math.pow,Ha=Math.sqrt,_u=1e-8,_0=1e-4,b0=Ha(3),bu=1/3,$r=Ci(),lr=Ci(),Xn=Ci();function $a(r){return r>-_u&&r<_u}function w0(r){return r>_u||r<-_u}function ht(r,t,e,a,i){var n=1-i;return n*n*(n*r+3*i*t)+i*i*(i*a+3*n*e)}function x0(r,t,e,a,i){var n=1-i;return 3*(((t-r)*n+2*(e-t)*i)*n+(a-e)*i*i)}function wu(r,t,e,a,i,n){var o=a+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-i,c=s*s-3*o*l,h=s*l-9*o*u,f=l*l-3*s*u,d=0;if($a(c)&&$a(h))if($a(s))n[0]=0;else{var p=-l/s;p>=0&&p<=1&&(n[d++]=p)}else{var v=h*h-4*c*f;if($a(v)){var g=h/c,p=-s/o+g,m=-g/2;p>=0&&p<=1&&(n[d++]=p),m>=0&&m<=1&&(n[d++]=m)}else if(v>0){var y=Ha(v),_=c*s+1.5*o*(-h+y),w=c*s+1.5*o*(-h-y);_<0?_=-yu(-_,bu):_=yu(_,bu),w<0?w=-yu(-w,bu):w=yu(w,bu);var p=(-s-(_+w))/(3*o);p>=0&&p<=1&&(n[d++]=p)}else{var x=(2*c*s-3*o*h)/(2*Ha(c*c*c)),S=Math.acos(x)/3,L=Ha(c),C=Math.cos(S),p=(-s-2*L*C)/(3*o),m=(-s+L*(C+b0*Math.sin(S)))/(3*o),T=(-s+L*(C-b0*Math.sin(S)))/(3*o);p>=0&&p<=1&&(n[d++]=p),m>=0&&m<=1&&(n[d++]=m),T>=0&&T<=1&&(n[d++]=T)}}return d}function S0(r,t,e,a,i){var n=6*e-12*t+6*r,o=9*t+3*a-3*r-9*e,s=3*t-3*r,l=0;if($a(o)){if(w0(n)){var u=-s/n;u>=0&&u<=1&&(i[l++]=u)}}else{var c=n*n-4*o*s;if($a(c))i[0]=-n/(2*o);else if(c>0){var h=Ha(c),u=(-n+h)/(2*o),f=(-n-h)/(2*o);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function Ua(r,t,e,a,i,n){var o=(t-r)*i+r,s=(e-t)*i+t,l=(a-e)*i+e,u=(s-o)*i+o,c=(l-s)*i+s,h=(c-u)*i+u;n[0]=r,n[1]=o,n[2]=u,n[3]=h,n[4]=h,n[5]=c,n[6]=l,n[7]=a}function L0(r,t,e,a,i,n,o,s,l,u,c){var h,f=.005,d=1/0,p,v,g,m;$r[0]=l,$r[1]=u;for(var y=0;y<1;y+=.05)lr[0]=ht(r,e,i,o,y),lr[1]=ht(t,a,n,s,y),g=Ai($r,lr),g<d&&(h=y,d=g);d=1/0;for(var _=0;_<32&&!(f<_0);_++)p=h-f,v=h+f,lr[0]=ht(r,e,i,o,p),lr[1]=ht(t,a,n,s,p),g=Ai(lr,$r),p>=0&&g<d?(h=p,d=g):(Xn[0]=ht(r,e,i,o,v),Xn[1]=ht(t,a,n,s,v),m=Ai(Xn,$r),v<=1&&m<d?(h=v,d=m):f*=.5);return c&&(c[0]=ht(r,e,i,o,h),c[1]=ht(t,a,n,s,h)),Ha(d)}function fk(r,t,e,a,i,n,o,s,l){for(var u=r,c=t,h=0,f=1/l,d=1;d<=l;d++){var p=d*f,v=ht(r,e,i,o,p),g=ht(t,a,n,s,p),m=v-u,y=g-c;h+=Math.sqrt(m*m+y*y),u=v,c=g}return h}function gt(r,t,e,a){var i=1-a;return i*(i*r+2*a*t)+a*a*e}function Ff(r,t,e,a){return 2*((1-a)*(t-r)+a*(e-t))}function dk(r,t,e,a,i){var n=r-2*t+e,o=2*(t-r),s=r-a,l=0;if($a(n)){if(w0(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*n*s;if($a(c)){var u=-o/(2*n);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var h=Ha(c),u=(-o+h)/(2*n),f=(-o-h)/(2*n);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function T0(r,t,e){var a=r+e-2*t;return a===0?.5:(r-t)/a}function ds(r,t,e,a,i){var n=(t-r)*a+r,o=(e-t)*a+t,s=(o-n)*a+n;i[0]=r,i[1]=n,i[2]=s,i[3]=s,i[4]=o,i[5]=e}function C0(r,t,e,a,i,n,o,s,l){var u,c=.005,h=1/0;$r[0]=o,$r[1]=s;for(var f=0;f<1;f+=.05){lr[0]=gt(r,e,i,f),lr[1]=gt(t,a,n,f);var d=Ai($r,lr);d<h&&(u=f,h=d)}h=1/0;for(var p=0;p<32&&!(c<_0);p++){var v=u-c,g=u+c;lr[0]=gt(r,e,i,v),lr[1]=gt(t,a,n,v);var d=Ai(lr,$r);if(v>=0&&d<h)u=v,h=d;else{Xn[0]=gt(r,e,i,g),Xn[1]=gt(t,a,n,g);var m=Ai(Xn,$r);g<=1&&m<h?(u=g,h=m):c*=.5}}return l&&(l[0]=gt(r,e,i,u),l[1]=gt(t,a,n,u)),Ha(h)}function pk(r,t,e,a,i,n,o){for(var s=r,l=t,u=0,c=1/o,h=1;h<=o;h++){var f=h*c,d=gt(r,e,i,f),p=gt(t,a,n,f),v=d-s,g=p-l;u+=Math.sqrt(v*v+g*g),s=d,l=p}return u}var vk=/cubic-bezier\(([0-9,\.e ]+)\)/;function Gf(r){var t=r&&vk.exec(r);if(t){var e=t[1].split(","),a=+Dr(e[0]),i=+Dr(e[1]),n=+Dr(e[2]),o=+Dr(e[3]);if(isNaN(a+i+n+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:wu(0,a,n,1,l,s)&&ht(0,i,o,1,s[0])}}}var gk=function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||et,this.ondestroy=t.ondestroy||et,this.onrestart=t.onrestart||et,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var a=this._life,i=t-this._startTime-this._pausedTime,n=i/a;n<0&&(n=0),n=Math.min(n,1);var o=this.easingFunc,s=o?o(n):n;if(this.onframe(s),n===1)if(this.loop){var l=i%a;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=te(t)?t:y0[t]||Gf(t)},r}();const mk=gk;var D0=function(){function r(t){this.value=t}return r}(),yk=function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new D0(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,a=t.next;e?e.next=a:this.head=a,a?a.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),_k=function(){function r(t){this._list=new yk,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var a=this._list,i=this._map,n=null;if(i[t]==null){var o=a.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=a.head;a.remove(l),delete i[l.key],n=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new D0(e),s.key=t,a.insertEntry(s),i[t]=s}return n},r.prototype.get=function(t){var e=this._map[t],a=this._list;if(e!=null)return e!==a.tail&&(a.remove(e),a.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}();const ps=_k;var A0={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ar(r){return r=Math.round(r),r<0?0:r>255?255:r}function bk(r){return r=Math.round(r),r<0?0:r>360?360:r}function vs(r){return r<0?0:r>1?1:r}function Wf(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Ar(parseFloat(t)/100*255):Ar(parseInt(t,10))}function Ni(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?vs(parseFloat(t)/100):vs(parseFloat(t))}function Hf(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function Ya(r,t,e){return r+(t-r)*e}function ur(r,t,e,a,i){return r[0]=t,r[1]=e,r[2]=a,r[3]=i,r}function $f(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var M0=new ps(20),xu=null;function jn(r,t){xu&&$f(xu,t),xu=M0.put(r,xu||t.slice())}function er(r,t){if(r){t=t||[];var e=M0.get(r);if(e)return $f(t,e);r=r+"";var a=r.replace(/ /g,"").toLowerCase();if(a in A0)return $f(t,A0[a]),jn(r,t),t;var i=a.length;if(a.charAt(0)==="#"){if(i===4||i===5){var n=parseInt(a.slice(1,4),16);if(!(n>=0&&n<=4095)){ur(t,0,0,0,1);return}return ur(t,(n&3840)>>4|(n&3840)>>8,n&240|(n&240)>>4,n&15|(n&15)<<4,i===5?parseInt(a.slice(4),16)/15:1),jn(r,t),t}else if(i===7||i===9){var n=parseInt(a.slice(1,7),16);if(!(n>=0&&n<=16777215)){ur(t,0,0,0,1);return}return ur(t,(n&16711680)>>16,(n&65280)>>8,n&255,i===9?parseInt(a.slice(7),16)/255:1),jn(r,t),t}return}var o=a.indexOf("("),s=a.indexOf(")");if(o!==-1&&s+1===i){var l=a.substr(0,o),u=a.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?ur(t,+u[0],+u[1],+u[2],1):ur(t,0,0,0,1);c=Ni(u.pop());case"rgb":if(u.length>=3)return ur(t,Wf(u[0]),Wf(u[1]),Wf(u[2]),u.length===3?c:Ni(u[3])),jn(r,t),t;ur(t,0,0,0,1);return;case"hsla":if(u.length!==4){ur(t,0,0,0,1);return}return u[3]=Ni(u[3]),Uf(u,t),jn(r,t),t;case"hsl":if(u.length!==3){ur(t,0,0,0,1);return}return Uf(u,t),jn(r,t),t;default:return}}ur(t,0,0,0,1)}}function Uf(r,t){var e=(parseFloat(r[0])%360+360)%360/360,a=Ni(r[1]),i=Ni(r[2]),n=i<=.5?i*(a+1):i+a-i*a,o=i*2-n;return t=t||[],ur(t,Ar(Hf(o,n,e+1/3)*255),Ar(Hf(o,n,e)*255),Ar(Hf(o,n,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function wk(r){if(r){var t=r[0]/255,e=r[1]/255,a=r[2]/255,i=Math.min(t,e,a),n=Math.max(t,e,a),o=n-i,s=(n+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(n+i):u=o/(2-n-i);var c=((n-t)/6+o/2)/o,h=((n-e)/6+o/2)/o,f=((n-a)/6+o/2)/o;t===n?l=f-h:e===n?l=1/3+c-f:a===n&&(l=2/3+h-c),l<0&&(l+=1),l>1&&(l-=1)}var d=[l*360,u,s];return r[3]!=null&&d.push(r[3]),d}}function Yf(r,t){var e=er(r);if(e){for(var a=0;a<3;a++)t<0?e[a]=e[a]*(1-t)|0:e[a]=(255-e[a])*t+e[a]|0,e[a]>255?e[a]=255:e[a]<0&&(e[a]=0);return va(e,e.length===4?"rgba":"rgb")}}function Zf(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var a=r*(t.length-1),i=Math.floor(a),n=Math.ceil(a),o=t[i],s=t[n],l=a-i;return e[0]=Ar(Ya(o[0],s[0],l)),e[1]=Ar(Ya(o[1],s[1],l)),e[2]=Ar(Ya(o[2],s[2],l)),e[3]=vs(Ya(o[3],s[3],l)),e}}function xk(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var a=r*(t.length-1),i=Math.floor(a),n=Math.ceil(a),o=er(t[i]),s=er(t[n]),l=a-i,u=va([Ar(Ya(o[0],s[0],l)),Ar(Ya(o[1],s[1],l)),Ar(Ya(o[2],s[2],l)),vs(Ya(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:i,rightIndex:n,value:a}:u}}function gs(r,t,e,a){var i=er(r);if(r)return i=wk(i),t!=null&&(i[0]=bk(t)),e!=null&&(i[1]=Ni(e)),a!=null&&(i[2]=Ni(a)),va(Uf(i),"rgba")}function Su(r,t){var e=er(r);if(e&&t!=null)return e[3]=vs(t),va(e,"rgba")}function va(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function Lu(r,t){var e=er(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}var E0=new ps(100);function Xf(r){if(X(r)){var t=E0.get(r);return t||(t=Yf(r,-.1),E0.put(r,t)),t}else if(su(r)){var e=F({},r);return e.colorStops=W(r.colorStops,function(a){return{offset:a.offset,color:Yf(a.color,-.1)}}),e}return r}var Tu=Math.round;function ms(r){var t;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var e=er(r);e&&(r="rgb("+e[0]+","+e[1]+","+e[2]+")",t=e[3])}return{color:r,opacity:t??1}}var I0=1e-4;function Za(r){return r<I0&&r>-I0}function Cu(r){return Tu(r*1e3)/1e3}function jf(r){return Tu(r*1e4)/1e4}function Sk(r){return"matrix("+Cu(r[0])+","+Cu(r[1])+","+Cu(r[2])+","+Cu(r[3])+","+jf(r[4])+","+jf(r[5])+")"}var Lk={left:"start",right:"end",center:"middle",middle:"middle"};function Tk(r,t,e){return e==="top"?r+=t/2:e==="bottom"&&(r-=t/2),r}function Ck(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function Dk(r){var t=r.style,e=r.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),e[0],e[1]].join(",")}function P0(r){return r&&!!r.image}function Ak(r){return r&&!!r.svgElement}function qf(r){return P0(r)||Ak(r)}function k0(r){return r.type==="linear"}function N0(r){return r.type==="radial"}function R0(r){return r&&(r.type==="linear"||r.type==="radial")}function Du(r){return"url(#"+r+")"}function V0(r){var t=r.getGlobalScale(),e=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(e)/Math.log(10)),1)}function O0(r){var t=r.x||0,e=r.y||0,a=(r.rotation||0)*cu,i=le(r.scaleX,1),n=le(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(t||e)&&l.push("translate("+t+"px,"+e+"px)"),a&&l.push("rotate("+a+")"),(i!==1||n!==1)&&l.push("scale("+i+","+n+")"),(o||s)&&l.push("skew("+Tu(o*cu)+"deg, "+Tu(s*cu)+"deg)"),l.join(" ")}var Mk=function(){return Le.hasGlobalWindow&&te(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return process.env.NODE_ENV!=="production"&&Cr("Base64 isn't natively supported in the current environment."),null}}(),Kf=Array.prototype.slice;function ga(r,t,e){return(t-r)*e+r}function Jf(r,t,e,a){for(var i=t.length,n=0;n<i;n++)r[n]=ga(t[n],e[n],a);return r}function Ek(r,t,e,a){for(var i=t.length,n=i&&t[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<n;s++)r[o][s]=ga(t[o][s],e[o][s],a)}return r}function Au(r,t,e,a){for(var i=t.length,n=0;n<i;n++)r[n]=t[n]+e[n]*a;return r}function z0(r,t,e,a){for(var i=t.length,n=i&&t[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<n;s++)r[o][s]=t[o][s]+e[o][s]*a}return r}function Ik(r,t){for(var e=r.length,a=t.length,i=e>a?t:r,n=Math.min(e,a),o=i[n-1]||{color:[0,0,0,0],offset:0},s=n;s<Math.max(e,a);s++)i.push({offset:o.offset,color:o.color.slice()})}function Pk(r,t,e){var a=r,i=t;if(!(!a.push||!i.push)){var n=a.length,o=i.length;if(n!==o){var s=n>o;if(s)a.length=o;else for(var l=n;l<o;l++)a.push(e===1?i[l]:Kf.call(i[l]))}for(var u=a[0]&&a[0].length,l=0;l<a.length;l++)if(e===1)isNaN(a[l])&&(a[l]=i[l]);else for(var c=0;c<u;c++)isNaN(a[l][c])&&(a[l][c]=i[l][c])}}function ys(r){if(Dt(r)){var t=r.length;if(Dt(r[0])){for(var e=[],a=0;a<t;a++)e.push(Kf.call(r[a]));return e}return Kf.call(r)}return r}function Mu(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function kk(r){return Dt(r&&r[0])?2:1}var Eu=0,Iu=1,B0=2,_s=3,Qf=4,ed=5,F0=6;function G0(r){return r===Qf||r===ed}function Pu(r){return r===Iu||r===B0}var bs=[0,0,0,0],Nk=function(){function r(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,a){this._needsSort=!0;var i=this.keyframes,n=i.length,o=!1,s=F0,l=e;if(Dt(e)){var u=kk(e);s=u,(u===1&&!De(e[0])||u===2&&!De(e[0][0]))&&(o=!0)}else if(De(e)&&!Ti(e))s=Eu;else if(X(e))if(!isNaN(+e))s=Eu;else{var c=er(e);c&&(l=c,s=_s)}else if(su(e)){var h=F({},l);h.colorStops=W(e.colorStops,function(d){return{offset:d.offset,color:er(d.color)}}),k0(e)?s=Qf:N0(e)&&(s=ed),l=h}n===0?this.valType=s:(s!==this.valType||s===F0)&&(o=!0),this.discrete=this.discrete||o;var f={time:t,value:l,rawValue:e,percent:0};return a&&(f.easing=a,f.easingFunc=te(a)?a:y0[a]||Gf(a)),i.push(f),f},r.prototype.prepare=function(t,e){var a=this.keyframes;this._needsSort&&a.sort(function(v,g){return v.time-g.time});for(var i=this.valType,n=a.length,o=a[n-1],s=this.discrete,l=Pu(i),u=G0(i),c=0;c<n;c++){var h=a[c],f=h.value,d=o.value;h.percent=h.time/t,s||(l&&c!==n-1?Pk(f,d,i):u&&Ik(f.colorStops,d.colorStops))}if(!s&&i!==ed&&e&&this.needsAnimate()&&e.needsAnimate()&&i===e.valType&&!e._finished){this._additiveTrack=e;for(var p=a[0].value,c=0;c<n;c++)i===Eu?a[c].additiveValue=a[c].value-p:i===_s?a[c].additiveValue=Au([],a[c].value,p,-1):Pu(i)&&(a[c].additiveValue=i===Iu?Au([],a[c].value,p,-1):z0([],a[c].value,p,-1))}},r.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var a=this._additiveTrack!=null,i=a?"additiveValue":"value",n=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=n===_s,c,h=this._lastFr,f=Math.min,d,p;if(s===1)d=p=o[0];else{if(e<0)c=0;else if(e<this._lastFrP){var v=f(h+1,s-1);for(c=v;c>=0&&!(o[c].percent<=e);c--);c=f(c,s-2)}else{for(c=h;c<s&&!(o[c].percent>e);c++);c=f(c-1,s-2)}p=o[c+1],d=o[c]}if(d&&p){this._lastFr=c,this._lastFrP=e;var g=p.percent-d.percent,m=g===0?1:f((e-d.percent)/g,1);p.easingFunc&&(m=p.easingFunc(m));var y=a?this._additiveValue:u?bs:t[l];if((Pu(n)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)t[l]=m<1?d.rawValue:p.rawValue;else if(Pu(n))n===Iu?Jf(y,d[i],p[i],m):Ek(y,d[i],p[i],m);else if(G0(n)){var _=d[i],w=p[i],x=n===Qf;t[l]={type:x?"linear":"radial",x:ga(_.x,w.x,m),y:ga(_.y,w.y,m),colorStops:W(_.colorStops,function(L,C){var T=w.colorStops[C];return{offset:ga(L.offset,T.offset,m),color:Mu(Jf([],L.color,T.color,m))}}),global:w.global},x?(t[l].x2=ga(_.x2,w.x2,m),t[l].y2=ga(_.y2,w.y2,m)):t[l].r=ga(_.r,w.r,m)}else if(u)Jf(y,d[i],p[i],m),a||(t[l]=Mu(y));else{var S=ga(d[i],p[i],m);a?this._additiveValue=S:t[l]=S}a&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,a=this.propName,i=this._additiveValue;e===Eu?t[a]=t[a]+i:e===_s?(er(t[a],bs),Au(bs,bs,i,1),t[a]=Mu(bs)):e===Iu?Au(t[a],t[a],i,1):e===B0&&z0(t[a],t[a],i,1)},r}(),td=function(){function r(t,e,a,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&i){Cr("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=a}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,a){return this.whenWithKeys(t,e,we(e),a)},r.prototype.whenWithKeys=function(t,e,a,i){for(var n=this._tracks,o=0;o<a.length;o++){var s=a[o],l=n[s];if(!l){l=n[s]=new Nk(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var h=c.keyframes,f=h[h.length-1];u=f&&f.value,c.valType===_s&&u&&(u=Mu(u))}else u=this._target[s];if(u==null)continue;t>0&&l.addKeyframe(0,ys(u),i),this._trackKeys.push(s)}l.addKeyframe(t,ys(e[s]),i)}return this._maxTime=Math.max(this._maxTime,t),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,a=0;a<e;a++)t[a].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var a=0;a<e.length;a++)e[a].call(this)},r.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,a=0;a<e.length;a++)t[e[a]].setFinished()},r.prototype._getAdditiveTrack=function(t){var e,a=this._additiveAnimators;if(a)for(var i=0;i<a.length;i++){var n=a[i].getTrack(t);n&&(e=n)}return e},r.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var e=this,a=[],i=this._maxTime||0,n=0;n<this._trackKeys.length;n++){var o=this._trackKeys[n],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var h=u[c-1];h&&(e._target[s.propName]=h.rawValue),s.setFinished()}else a.push(s)}if(a.length||this._force){var f=new mk({life:i,loop:this._loop,delay:this._delay||0,onframe:function(d){e._started=2;var p=e._additiveAnimators;if(p){for(var v=!1,g=0;g<p.length;g++)if(p[g]._clip){v=!0;break}v||(e._additiveAnimators=null)}for(var g=0;g<a.length;g++)a[g].step(e._target,d);var m=e._onframeCbs;if(m)for(var g=0;g<m.length;g++)m[g](e._target,d)},ondestroy:function(){e._doneCallback()}});this._clip=f,this.animation&&this.animation.addClip(f),t&&f.setEasing(t)}else this._doneCallback();return this}},r.prototype.stop=function(t){if(this._clip){var e=this._clip;t&&e.onframe(1),this._abortedCallback()}},r.prototype.delay=function(t){return this._delay=t,this},r.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},r.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},r.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(t){return this._tracks[t]},r.prototype.getTracks=function(){var t=this;return W(this._trackKeys,function(e){return t._tracks[e]})},r.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var a=this._tracks,i=this._trackKeys,n=0;n<t.length;n++){var o=a[t[n]];o&&!o.isFinished()&&(e?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,n=0;n<i.length;n++)if(!a[i[n]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(t,e,a){if(t){e=e||this._trackKeys;for(var i=0;i<e.length;i++){var n=e[i],o=this._tracks[n];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[a?0:s.length-1];l&&(t[n]=ys(l.rawValue))}}}},r.prototype.__changeFinalValue=function(t,e){e=e||we(t);for(var a=0;a<e.length;a++){var i=e[a],n=this._tracks[i];if(n){var o=n.keyframes;if(o.length>1){var s=o.pop();n.addKeyframe(s.time,t[i]),n.prepare(this._maxTime,n.getAdditiveTrack())}}}},r}();function qn(){return new Date().getTime()}var Rk=function(r){z(t,r);function t(e){var a=r.call(this)||this;return a._running=!1,a._time=0,a._pausedTime=0,a._pauseStart=0,a._paused=!1,e=e||{},a.stage=e.stage||{},a}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var a=e.getClip();a&&this.addClip(a)},t.prototype.removeClip=function(e){if(e.animation){var a=e.prev,i=e.next;a?a.next=i:this._head=i,i?i.prev=a:this._tail=a,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var a=e.getClip();a&&this.removeClip(a),e.animation=null},t.prototype.update=function(e){for(var a=qn()-this._pausedTime,i=a-this._time,n=this._head;n;){var o=n.next,s=n.step(a,i);s&&(n.ondestroy(),this.removeClip(n)),n=o}this._time=a,e||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function a(){e._running&&(Bf(a),!e._paused&&e.update())}Bf(a)},t.prototype.start=function(){this._running||(this._time=qn(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=qn(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=qn()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var a=e.next;e.prev=e.next=e.animation=null,e=a}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,a){a=a||{},this.start();var i=new td(e,a.loop);return this.addAnimator(i),i},t}(or);const Vk=Rk;var Ok=300,rd=Le.domSupported,ad=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=W(r,function(i){var n=i.replace("mouse","pointer");return e.hasOwnProperty(n)?n:i});return{mouse:r,touch:t,pointer:a}}(),W0={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},H0=!1;function id(r){var t=r.pointerType;return t==="pen"||t==="touch"}function zk(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function nd(r){r&&(r.zrByTouch=!0)}function Bk(r,t){return sr(r.dom,new Fk(r,t),!0)}function $0(r,t){for(var e=t,a=!1;e&&e.nodeType!==9&&!(a=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return a}var Fk=function(){function r(t,e){this.stopPropagation=et,this.stopImmediatePropagation=et,this.preventDefault=et,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r}(),Mr={mousedown:function(r){r=sr(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=sr(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=sr(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=sr(this.dom,r);var t=r.toElement||r.relatedTarget;$0(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){H0=!0,r=sr(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){H0||(r=sr(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=sr(this.dom,r),nd(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Mr.mousemove.call(this,r),Mr.mousedown.call(this,r)},touchmove:function(r){r=sr(this.dom,r),nd(r),this.handler.processGesture(r,"change"),Mr.mousemove.call(this,r)},touchend:function(r){r=sr(this.dom,r),nd(r),this.handler.processGesture(r,"end"),Mr.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<Ok&&Mr.click.call(this,r)},pointerdown:function(r){Mr.mousedown.call(this,r)},pointermove:function(r){id(r)||Mr.mousemove.call(this,r)},pointerup:function(r){Mr.mouseup.call(this,r)},pointerout:function(r){id(r)||Mr.mouseout.call(this,r)}};M(["click","dblclick","contextmenu"],function(r){Mr[r]=function(t){t=sr(this.dom,t),this.trigger(r,t)}});var od={pointermove:function(r){id(r)||od.mousemove.call(this,r)},pointerup:function(r){od.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),t&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function Gk(r,t){var e=t.domHandlers;Le.pointerEventsSupported?M(ad.pointer,function(a){ku(t,a,function(i){e[a].call(r,i)})}):(Le.touchEventsSupported&&M(ad.touch,function(a){ku(t,a,function(i){e[a].call(r,i),zk(t)})}),M(ad.mouse,function(a){ku(t,a,function(i){i=Ef(i),t.touching||e[a].call(r,i)})}))}function Wk(r,t){Le.pointerEventsSupported?M(W0.pointer,e):Le.touchEventsSupported||M(W0.mouse,e);function e(a){function i(n){n=Ef(n),$0(r,n.target)||(n=Bk(r,n),t.domHandlers[a].call(r,n))}ku(t,a,i,{capture:!0})}}function ku(r,t,e,a){r.mounted[t]=e,r.listenerOpts[t]=a,If(r.domTarget,t,e,a)}function sd(r){var t=r.mounted;for(var e in t)t.hasOwnProperty(e)&&jP(r.domTarget,e,t[e],r.listenerOpts[e]);r.mounted={}}var U0=function(){function r(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e}return r}(),Hk=function(r){z(t,r);function t(e,a){var i=r.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=a,i._localHandlerScope=new U0(e,Mr),rd&&(i._globalHandlerScope=new U0(document,od)),Gk(i,i._localHandlerScope),i}return t.prototype.dispose=function(){sd(this._localHandlerScope),rd&&sd(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,rd&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var a=this._globalHandlerScope;e?Wk(this,a):sd(a)}},t}(or);const $k=Hk;var Y0=1;Le.hasGlobalWindow&&(Y0=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Nu=Y0,ld=.4,ud="#333",cd="#ccc",Uk="#eee",Z0=du,X0=5e-5;function Ri(r){return r>X0||r<-X0}var Vi=[],Kn=[],hd=Jt(),fd=Math.abs,Yk=function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return Ri(this.rotation)||Ri(this.x)||Ri(this.y)||Ri(this.scaleX-1)||Ri(this.scaleY-1)||Ri(this.skewX)||Ri(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),a=this.transform;if(!(e||t)){a&&(Z0(a),this.invTransform=null);return}a=a||Jt(),e?this.getLocalTransform(a):Z0(a),t&&(e?pa(a,t,a):kf(a,t)),this.transform=a,this._resolveGlobalScaleRatio(a)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(Vi);var a=Vi[0]<0?-1:1,i=Vi[1]<0?-1:1,n=((Vi[0]-a)*e+a)/Vi[0]||0,o=((Vi[1]-i)*e+i)/Vi[1]||0;t[0]*=n,t[1]*=n,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||Jt(),Yn(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],a=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),n=Math.PI/2+i-Math.atan2(t[3],t[2]);a=Math.sqrt(a)*Math.cos(n),e=Math.sqrt(e),this.skewX=n,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=a,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||Jt(),pa(Kn,t.invTransform,e),e=Kn);var a=this.originX,i=this.originY;(a||i)&&(hd[4]=a,hd[5]=i,pa(Kn,e,hd),Kn[4]-=a,Kn[5]-=i,e=Kn),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var a=[t,e],i=this.invTransform;return i&&yt(a,a,i),a},r.prototype.transformCoordToGlobal=function(t,e){var a=[t,e],i=this.transform;return i&&yt(a,a,i),a},r.prototype.getLineScale=function(){var t=this.transform;return t&&fd(t[0]-1)>1e-10&&fd(t[3]-1)>1e-10?Math.sqrt(fd(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){j0(this,t)},r.getLocalTransform=function(t,e){e=e||[];var a=t.originX||0,i=t.originY||0,n=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,c=t.x,h=t.y,f=t.skewX?Math.tan(t.skewX):0,d=t.skewY?Math.tan(-t.skewY):0;if(a||i||s||l){var p=a+s,v=i+l;e[4]=-p*n-f*v*o,e[5]=-v*o-d*p*n}else e[4]=e[5]=0;return e[0]=n,e[3]=o,e[1]=d*n,e[2]=f*o,u&&Mi(e,e,u),e[4]+=a+c,e[5]+=i+h,e},r.initDefaultProps=function(){var t=r.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),r}(),Ur=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function j0(r,t){for(var e=0;e<Ur.length;e++){var a=Ur[e];r[a]=t[a]}}const ma=Yk;var q0={};function tr(r,t){t=t||za;var e=q0[t];e||(e=q0[t]=new ps(500));var a=e.get(r);return a==null&&(a=Ba.measureText(r,t).width,e.put(r,a)),a}function K0(r,t,e,a){var i=tr(r,t),n=Ru(t),o=xs(0,i,e),s=Jn(0,n,a),l=new ge(o,s,i,n);return l}function ws(r,t,e,a){var i=((r||"")+"").split(`
218
+ `),n=i.length;if(n===1)return K0(i[0],t,e,a);for(var o=new ge(0,0,0,0),s=0;s<i.length;s++){var l=K0(i[s],t,e,a);s===0?o.copy(l):o.union(l)}return o}function xs(r,t,e){return e==="right"?r-=t:e==="center"&&(r-=t/2),r}function Jn(r,t,e){return e==="middle"?r-=t/2:e==="bottom"&&(r-=t),r}function Ru(r){return tr("国",r)}function Er(r,t){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*t:parseFloat(r):r}function Vu(r,t,e){var a=t.position||"inside",i=t.distance!=null?t.distance:5,n=e.height,o=e.width,s=n/2,l=e.x,u=e.y,c="left",h="top";if(a instanceof Array)l+=Er(a[0],e.width),u+=Er(a[1],e.height),c=null,h=null;else switch(a){case"left":l-=i,u+=s,c="right",h="middle";break;case"right":l+=i+o,u+=s,h="middle";break;case"top":l+=o/2,u-=i,c="center",h="bottom";break;case"bottom":l+=o/2,u+=n+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=i,u+=s,h="middle";break;case"insideRight":l+=o-i,u+=s,c="right",h="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=n-i,c="center",h="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=n-i,h="bottom";break;case"insideBottomRight":l+=o-i,u+=n-i,c="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=h,r}var dd="__zr_normal__",pd=Ur.concat(["ignore"]),Zk=Wr(Ur,function(r,t){return r[t]=!0,r},{ignore:!1}),Qn={},Xk=new ge(0,0,0,0),vd=function(){function r(t){this.id=jy(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,a){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var a=this.textConfig,i=a.local,n=e.innerTransformable,o=void 0,s=void 0,l=!1;n.parent=i?this:null;var u=!1;if(n.copyTransform(e),a.position!=null){var c=Xk;a.layoutRect?c.copy(a.layoutRect):c.copy(this.getBoundingRect()),i||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Qn,a,c):Vu(Qn,a,c),n.x=Qn.x,n.y=Qn.y,o=Qn.align,s=Qn.verticalAlign;var h=a.origin;if(h&&a.rotation!=null){var f=void 0,d=void 0;h==="center"?(f=c.width*.5,d=c.height*.5):(f=Er(h[0],c.width),d=Er(h[1],c.height)),u=!0,n.originX=-n.x+f+(i?0:c.x),n.originY=-n.y+d+(i?0:c.y)}}a.rotation!=null&&(n.rotation=a.rotation);var p=a.offset;p&&(n.x+=p[0],n.y+=p[1],u||(n.originX=-p[0],n.originY=-p[1]));var v=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,_=void 0;v&&this.canBeInsideText()?(m=a.insideFill,y=a.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(m),_=!0)):(m=a.outsideFill,y=a.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(m),_=!0)),m=m||"#000",(m!==g.fill||y!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=m,g.stroke=y,g.autoStroke=_,g.align=o,g.verticalAlign=s,e.setDefaultTextStyle(g)),e.__dirty|=Qt,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?cd:ud},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),a=typeof e=="string"&&er(e);a||(a=[255,255,255,1]);for(var i=a[3],n=this.__zr.isDarkMode(),o=0;o<3;o++)a[o]=a[o]*i+(n?0:255)*(1-i);return a[3]=1,va(a,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},F(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(re(t))for(var a=t,i=we(a),n=0;n<i.length;n++){var o=i[n];this.attrKV(o,t[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,a=0;a<this.animators.length;a++){var i=this.animators[a],n=i.__fromStateTransition;if(!(i.getLoop()||n&&n!==dd)){var o=i.targetName,s=o?e[o]:e;i.saveTo(s)}}},r.prototype._innerSaveToNormal=function(t){var e=this._normalState;e||(e=this._normalState={}),t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,pd)},r.prototype._savePrimaryToNormal=function(t,e,a){for(var i=0;i<a.length;i++){var n=a[i];t[n]!=null&&!(n in e)&&(e[n]=this[n])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(dd,!1,t)},r.prototype.useState=function(t,e,a,i){var n=t===dd,o=this.hasState();if(!(!o&&n)){var s=this.currentStates,l=this.stateTransition;if(!(me(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!n&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!n){Cr("State "+t+" not exists.");return}n||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!a&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,f=this._textGuide;return h&&h.useState(t,e,a,c),f&&f.useState(t,e,a,c),n?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Qt),u}}},r.prototype.useStates=function(t,e,a){if(!t.length)this.clearStates();else{var i=[],n=this.currentStates,o=t.length,s=o===n.length;if(s){for(var l=0;l<o;l++)if(t[l]!==n[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=t[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,t)),c||(c=this.states[u]),c&&i.push(c)}var h=i[o-1],f=!!(h&&h.hoverLayer||a);f&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(i),p=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(t.join(","),d,this._normalState,!1,!e&&!this.__inHover&&p&&p.duration>0,p);var v=this._textContent,g=this._textGuide;v&&v.useStates(t,e,f),g&&g.useStates(t,e,f),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Qt)}},r.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},r.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},r.prototype.removeState=function(t){var e=me(this.currentStates,t);if(e>=0){var a=this.currentStates.slice();a.splice(e,1),this.useStates(a)}},r.prototype.replaceState=function(t,e,a){var i=this.currentStates.slice(),n=me(i,t),o=me(i,e)>=0;n>=0?o?i.splice(n,1):i[n]=e:a&&!o&&i.push(e),this.useStates(i)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},a,i=0;i<t.length;i++){var n=t[i];F(e,n),n.textConfig&&(a=a||{},F(a,n.textConfig))}return a&&(e.textConfig=a),e},r.prototype._applyStateObj=function(t,e,a,i,n,o){var s=!(e&&i);e&&e.textConfig?(this.textConfig=F({},i?this.textConfig:a.textConfig),F(this.textConfig,e.textConfig)):s&&a.textConfig&&(this.textConfig=a.textConfig);for(var l={},u=!1,c=0;c<pd.length;c++){var h=pd[c],f=n&&Zk[h];e&&e[h]!=null?f?(u=!0,l[h]=e[h]):this[h]=e[h]:s&&a[h]!=null&&(f?(u=!0,l[h]=a[h]):this[h]=a[h])}if(!n)for(var c=0;c<this.animators.length;c++){var d=this.animators[c],p=d.targetName;d.getLoop()||d.__changeFinalValue(p?(e||a)[p]:e||a)}u&&this._transitionState(t,l,o)},r.prototype._attachComponent=function(t){if(t.__zr&&!t.__hostTarget){if(process.env.NODE_ENV!=="production")throw new Error("Text element has been added to zrender.");return}if(t===this){if(process.env.NODE_ENV!=="production")throw new Error("Recursive component attachment.");return}var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this},r.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},r.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(t){var e=this._textContent;if(e!==t){if(e&&e!==t&&this.removeTextContent(),process.env.NODE_ENV!=="production"&&t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");t.innerTransformable=new ma,this._attachComponent(t),this._textContent=t,this.markRedraw()}},r.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),F(this.textConfig,t),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=Qt;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,a=this._textGuide;e&&(e.__inHover=t),a&&(a.__inHover=t)},r.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var a=0;a<e.length;a++)t.animation.addAnimator(e[a]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},r.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var e=this.animators;if(e)for(var a=0;a<e.length;a++)t.animation.removeAnimator(e[a]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},r.prototype.animate=function(t,e,a){var i=t?this[t]:this;if(process.env.NODE_ENV!=="production"&&!i){Cr('Property "'+t+'" is not existed in element '+this.id);return}var n=new td(i,e,a);return t&&(n.targetName=t),this.addAnimator(n,t),n},r.prototype.addAnimator=function(t,e){var a=this.__zr,i=this;t.during(function(){i.updateDuringAnimation(e)}).done(function(){var n=i.animators,o=me(n,t);o>=0&&n.splice(o,1)}),this.animators.push(t),a&&a.animation.addAnimator(t),a&&a.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var a=this.animators,i=a.length,n=[],o=0;o<i;o++){var s=a[o];!t||t===s.scope?s.stop(e):n.push(s)}return this.animators=n,this},r.prototype.animateTo=function(t,e,a){gd(this,t,e,a)},r.prototype.animateFrom=function(t,e,a){gd(this,t,e,a,!0)},r.prototype._transitionState=function(t,e,a,i){for(var n=gd(this,e,a,i),o=0;o<n.length;o++)n[o].__fromStateTransition=t},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=function(){var t=r.prototype;t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=Qt;var e={};function a(n,o,s){e[n+o+s]||(console.warn("DEPRECATED: '"+n+"' has been deprecated. use '"+o+"', '"+s+"' instead"),e[n+o+s]=!0)}function i(n,o,s,l){Object.defineProperty(t,n,{get:function(){if(process.env.NODE_ENV!=="production"&&a(n,s,l),!this[o]){var c=this[o]=[];u(this,c)}return this[o]},set:function(c){process.env.NODE_ENV!=="production"&&a(n,s,l),this[s]=c[0],this[l]=c[1],this[o]=c,u(this,c)}});function u(c,h){Object.defineProperty(h,0,{get:function(){return c[s]},set:function(f){c[s]=f}}),Object.defineProperty(h,1,{get:function(){return c[l]},set:function(f){c[l]=f}})}}Object.defineProperty&&(i("position","_legacyPos","x","y"),i("scale","_legacyScale","scaleX","scaleY"),i("origin","_legacyOrigin","originX","originY"))}(),r}();at(vd,or),at(vd,ma);function gd(r,t,e,a,i){e=e||{};var n=[];J0(r,"",r,t,e,a,n,i);var o=n.length,s=!1,l=e.done,u=e.aborted,c=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},h=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),n.length>0&&e.during&&n[0].during(function(p,v){e.during(v)});for(var f=0;f<n.length;f++){var d=n[f];c&&d.done(c),h&&d.aborted(h),e.force&&d.duration(e.duration),d.start(e.easing)}return n}function md(r,t,e){for(var a=0;a<e;a++)r[a]=t[a]}function jk(r){return Dt(r[0])}function qk(r,t,e){if(Dt(t[e]))if(Dt(r[e])||(r[e]=[]),Rt(t[e])){var a=t[e].length;r[e].length!==a&&(r[e]=new t[e].constructor(a),md(r[e],t[e],a))}else{var i=t[e],n=r[e],o=i.length;if(jk(i))for(var s=i[0].length,l=0;l<o;l++)n[l]?md(n[l],i[l],s):n[l]=Array.prototype.slice.call(i[l]);else md(n,i,o);n.length=i.length}else r[e]=t[e]}function Kk(r,t){return r===t||Dt(r)&&Dt(t)&&Jk(r,t)}function Jk(r,t){var e=r.length;if(e!==t.length)return!1;for(var a=0;a<e;a++)if(r[a]!==t[a])return!1;return!0}function J0(r,t,e,a,i,n,o,s){for(var l=we(a),u=i.duration,c=i.delay,h=i.additive,f=i.setToFinal,d=!re(n),p=r.animators,v=[],g=0;g<l.length;g++){var m=l[g],y=a[m];if(y!=null&&e[m]!=null&&(d||n[m]))if(re(y)&&!Dt(y)&&!su(y)){if(t){s||(e[m]=y,r.updateDuringAnimation(t));continue}J0(r,m,e[m],y,i,n&&n[m],o,s)}else v.push(m);else s||(e[m]=y,r.updateDuringAnimation(t),v.push(m))}var _=v.length;if(!h&&_)for(var w=0;w<p.length;w++){var x=p[w];if(x.targetName===t){var S=x.stopTracks(v);if(S){var L=me(p,x);p.splice(L,1)}}}if(i.force||(v=Ie(v,function(D){return!Kk(a[D],e[D])}),_=v.length),_>0||i.force&&!o.length){var C=void 0,T=void 0,A=void 0;if(s){T={},f&&(C={});for(var w=0;w<_;w++){var m=v[w];T[m]=e[m],f?C[m]=a[m]:e[m]=a[m]}}else if(f){A={};for(var w=0;w<_;w++){var m=v[w];A[m]=ys(e[m]),qk(e,a,m)}}var x=new td(e,!1,!1,h?Ie(p,function(E){return E.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),f&&C&&x.whenWithKeys(0,C,v),A&&x.whenWithKeys(0,A,v),x.whenWithKeys(u??500,s?T:a,v).delay(c||0),r.addAnimator(x,t),o.push(x)}}const Q0=vd;var e1=function(r){z(t,r);function t(e){var a=r.call(this)||this;return a.isGroup=!0,a._children=[],a.attr(e),a}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var a=this._children,i=0;i<a.length;i++)if(a[i].name===e)return a[i]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){if(e&&(e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),process.env.NODE_ENV!=="production"&&e.__hostTarget))throw"This elemenet has been used as an attachment";return this},t.prototype.addBefore=function(e,a){if(e&&e!==this&&e.parent!==this&&a&&a.parent===this){var i=this._children,n=i.indexOf(a);n>=0&&(i.splice(n,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,a){var i=me(this._children,e);return i>=0&&this.replaceAt(a,i),this},t.prototype.replaceAt=function(e,a){var i=this._children,n=i[a];if(e&&e!==this&&e.parent!==this&&e!==n){i[a]=e,n.parent=null;var o=this.__zr;o&&n.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var a=this.__zr;a&&a!==e.__zr&&e.addSelfToZr(a),a&&a.refresh()},t.prototype.remove=function(e){var a=this.__zr,i=this._children,n=me(i,e);return n<0?this:(i.splice(n,1),e.parent=null,a&&e.removeSelfFromZr(a),a&&a.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,a=this.__zr,i=0;i<e.length;i++){var n=e[i];a&&n.removeSelfFromZr(a),n.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,a){for(var i=this._children,n=0;n<i.length;n++){var o=i[n];e.call(a,o,n)}return this},t.prototype.traverse=function(e,a){for(var i=0;i<this._children.length;i++){var n=this._children[i],o=e.call(a,n);n.isGroup&&!o&&n.traverse(e,a)}return this},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var a=0;a<this._children.length;a++){var i=this._children[a];i.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var a=0;a<this._children.length;a++){var i=this._children[a];i.removeSelfFromZr(e)}},t.prototype.getBoundingRect=function(e){for(var a=new ge(0,0,0,0),i=e||this._children,n=[],o=null,s=0;s<i.length;s++){var l=i[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(n);c?(ge.applyTransform(a,u,c),o=o||a.clone(),o.union(a)):(o=o||u.clone(),o.union(u))}}return o||a},t}(Q0);e1.prototype.type="group";const oe=e1;/*!
219
+ * ZRender, a high performance 2d drawing library.
220
+ *
221
+ * Copyright (c) 2013, Baidu Inc.
222
+ * All rights reserved.
223
+ *
224
+ * LICENSE
225
+ * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
226
+ */var Ss={},t1={};function Qk(r){delete t1[r]}function eN(r){if(!r)return!1;if(typeof r=="string")return Lu(r,1)<ld;if(r.colorStops){for(var t=r.colorStops,e=0,a=t.length,i=0;i<a;i++)e+=Lu(t[i].color,1);return e/=a,e<ld}return!1}var tN=function(){function r(t,e,a){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,a=a||{},this.dom=e,this.id=t;var n=new hk,o=a.renderer||"canvas";if(Ss[o]||(o=we(Ss)[0]),process.env.NODE_ENV!=="production"&&!Ss[o])throw new Error("Renderer '"+o+"' is not imported. Please import it first.");a.useDirtyRect=a.useDirtyRect==null?!1:a.useDirtyRect;var s=new Ss[o](e,n,a,t),l=a.ssr||s.ssrOnly;this.storage=n,this.painter=s;var u=!Le.node&&!Le.worker&&!l?new $k(s.getViewportRoot(),s.root):null,c=a.useCoarsePointer,h=c==null||c==="auto"?Le.touchEventsSupported:!!c,f=44,d;h&&(d=le(a.pointerSize,f)),this.handler=new ok(n,s,u,s.root,d),this.animation=new Vk({stage:{update:l?null:function(){return i._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},r.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},r.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=eN(t))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(t){this._darkMode=t},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(t){var e,a=qn();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var i=qn();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-a})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,a){return this._disposed||this.handler.on(t,e,a),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof oe&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,Qk(this.id))},r}();function r1(r,t){var e=new tN(jy(),r,t);return t1[e.id]=e,e}function rN(r,t){Ss[r]=t}var yd;function aN(r){if(typeof yd=="function")return yd(r)}function iN(r){yd=r}var a1=1e-4,i1=20;function nN(r){return r.replace(/^\s+|\s+$/g,"")}function ke(r,t,e,a){var i=t[0],n=t[1],o=e[0],s=e[1],l=n-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(a)if(l>0){if(r<=i)return o;if(r>=n)return s}else{if(r>=i)return o;if(r<=n)return s}else{if(r===i)return o;if(r===n)return s}return(r-i)/l*u+o}function Z(r,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return X(r)?nN(r).match(/%$/)?parseFloat(r)/100*t:parseFloat(r):r==null?NaN:+r}function Qe(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),i1),r=(+r).toFixed(t),e?r:+r}function cr(r){return r.sort(function(t,e){return t-e}),r}function Yr(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return _d(r)}function _d(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),a=e>0?+t.slice(e+1):0,i=e>0?e:t.length,n=t.indexOf("."),o=n<0?0:i-1-n;return Math.max(0,o-a)}function n1(r,t){var e=Math.log,a=Math.LN10,i=Math.floor(e(r[1]-r[0])/a),n=Math.round(e(Math.abs(t[1]-t[0]))/a),o=Math.min(Math.max(-i+n,0),20);return isFinite(o)?o:20}function oN(r,t){var e=Wr(r,function(d,p){return d+(isNaN(p)?0:p)},0);if(e===0)return[];for(var a=Math.pow(10,t),i=W(r,function(d){return(isNaN(d)?0:d)/e*a*100}),n=a*100,o=W(i,function(d){return Math.floor(d)}),s=Wr(o,function(d,p){return d+p},0),l=W(i,function(d,p){return d-o[p]});s<n;){for(var u=Number.NEGATIVE_INFINITY,c=null,h=0,f=l.length;h<f;++h)l[h]>u&&(u=l[h],c=h);++o[c],l[c]=0,++s}return W(o,function(d){return d/a})}function sN(r,t){var e=Math.max(Yr(r),Yr(t)),a=r+t;return e>i1?a:Qe(a,e)}var o1=9007199254740991;function s1(r){var t=Math.PI*2;return(r%t+t)%t}function Ls(r){return r>-a1&&r<a1}var lN=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Zr(r){if(r instanceof Date)return r;if(X(r)){var t=lN.exec(r);if(!t)return new Date(NaN);if(t[8]){var e=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(e-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,e,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function uN(r){return Math.pow(10,Ou(r))}function Ou(r){if(r===0)return 0;var t=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,t)>=10&&t++,t}function l1(r,t){var e=Ou(r),a=Math.pow(10,e),i=r/a,n;return t?i<1.5?n=1:i<2.5?n=2:i<4?n=3:i<7?n=5:n=10:i<1?n=1:i<2?n=2:i<3?n=3:i<5?n=5:n=10,r=n*a,e>=-20?+r.toFixed(e<0?-e:0):r}function bd(r,t){var e=(r.length-1)*t+1,a=Math.floor(e),i=+r[a-1],n=e-a;return n?i+n*(r[a]-i):i}function u1(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,a=0;a<r.length;){for(var i=r[a].interval,n=r[a].close,o=0;o<2;o++)i[o]<=t&&(i[o]=t,n[o]=o?1:1-e),t=i[o],e=n[o];i[0]===i[1]&&n[0]*n[1]!==1?r.splice(a,1):a++}return r;function s(l,u,c){return l.interval[c]<u.interval[c]||l.interval[c]===u.interval[c]&&(l.close[c]-u.close[c]===(c?-1:1)||!c&&s(l,u,1))}}function ya(r){var t=parseFloat(r);return t==r&&(t!==0||!X(r)||r.indexOf("x")<=0)?t:NaN}function wd(r){return!isNaN(ya(r))}function c1(){return Math.round(Math.random()*9)}function h1(r,t){return t===0?r:h1(t,r%t)}function f1(r,t){return r==null?t:t==null?r:r*t/h1(r,t)}var cN="[ECharts] ",d1={},hN=typeof console<"u"&&console.warn&&console.log;function zu(r,t,e){if(hN){if(e){if(d1[t])return;d1[t]=!0}console[r](cN+t)}}function fN(r,t){zu("log",r,t)}function je(r,t){zu("warn",r,t)}function _t(r,t){zu("error",r,t)}function Ir(r){process.env.NODE_ENV!=="production"&&zu("warn","DEPRECATED: "+r,!0)}function nt(r,t,e){process.env.NODE_ENV!=="production"&&Ir((e?"["+e+"]":"")+(r+" is deprecated, use "+t+" instead."))}function Ot(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var e="";if(process.env.NODE_ENV!=="production"){var a=function(i){return i===void 0?"undefined":i===1/0?"Infinity":i===-1/0?"-Infinity":Ti(i)?"NaN":i instanceof Date?"Date("+i.toISOString()+")":te(i)?"function () { ... }":Ky(i)?i+"":null};e=W(r,function(i){if(X(i))return i;var n=a(i);if(n!=null)return n;if(typeof JSON<"u"&&JSON.stringify)try{return JSON.stringify(i,function(o,s){var l=a(s);return l??s})}catch{return"?"}else return"?"}).join(" ")}return e}function Pe(r){throw new Error(r)}function p1(r,t,e){return(t-r)*e+r}var v1="series\0",g1="\0_ec_\0";function Ve(r){return r instanceof Array?r:r==null?[]:[r]}function Oi(r,t,e){if(r){r[t]=r[t]||{},r.emphasis=r.emphasis||{},r.emphasis[t]=r.emphasis[t]||{};for(var a=0,i=e.length;a<i;a++){var n=e[a];!r.emphasis[t].hasOwnProperty(n)&&r[t].hasOwnProperty(n)&&(r.emphasis[t][n]=r[t][n])}}}var m1=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function eo(r){return re(r)&&!G(r)&&!(r instanceof Date)?r.value:r}function dN(r){return re(r)&&!(r instanceof Array)}function y1(r,t,e){var a=e==="normalMerge",i=e==="replaceMerge",n=e==="replaceAll";r=r||[],t=(t||[]).slice();var o=Q();M(t,function(l,u){if(!re(l)){t[u]=null;return}process.env.NODE_ENV!=="production"&&(l.id!=null&&!w1(l.id)&&b1(l.id),l.name!=null&&!w1(l.name)&&b1(l.name))});var s=pN(r,o,e);return(a||i)&&vN(s,r,o,t),a&&gN(s,t),a||i?mN(s,t,i):n&&yN(s,t),_N(s),s}function pN(r,t,e){var a=[];if(e==="replaceAll")return a;for(var i=0;i<r.length;i++){var n=r[i];n&&n.id!=null&&t.set(n.id,i),a.push({existing:e==="replaceMerge"||to(n)?null:n,newOption:null,keyInfo:null,brandNew:null})}return a}function vN(r,t,e,a){M(a,function(i,n){if(!(!i||i.id==null)){var o=Ts(i.id),s=e.get(o);if(s!=null){var l=r[s];ae(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=t[s],a[n]=null}}})}function gN(r,t){M(t,function(e,a){if(!(!e||e.name==null))for(var i=0;i<r.length;i++){var n=r[i].existing;if(!r[i].newOption&&n&&(n.id==null||e.id==null)&&!to(e)&&!to(n)&&_1("name",n,e)){r[i].newOption=e,t[a]=null;return}}})}function mN(r,t,e){M(t,function(a){if(a){for(var i,n=0;(i=r[n])&&(i.newOption||to(i.existing)||i.existing&&a.id!=null&&!_1("id",a,i.existing));)n++;i?(i.newOption=a,i.brandNew=e):r.push({newOption:a,brandNew:e,existing:null,keyInfo:null}),n++}})}function yN(r,t){M(t,function(e){r.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})}function _N(r){var t=Q();M(r,function(e){var a=e.existing;a&&t.set(a.id,e)}),M(r,function(e){var a=e.newOption;ae(!a||a.id==null||!t.get(a.id)||t.get(a.id)===e,"id duplicates: "+(a&&a.id)),a&&a.id!=null&&t.set(a.id,e),!e.keyInfo&&(e.keyInfo={})}),M(r,function(e,a){var i=e.existing,n=e.newOption,o=e.keyInfo;if(re(n)){if(o.name=n.name!=null?Ts(n.name):i?i.name:v1+a,i)o.id=Ts(i.id);else if(n.id!=null)o.id=Ts(n.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(t.get(o.id))}t.set(o.id,e)}})}function _1(r,t,e){var a=ut(t[r],null),i=ut(e[r],null);return a!=null&&i!=null&&a===i}function Ts(r){if(process.env.NODE_ENV!=="production"&&r==null)throw new Error;return ut(r,"")}function ut(r,t){return r==null?t:X(r)?r:De(r)||ou(r)?r+"":t}function b1(r){process.env.NODE_ENV!=="production"&&je("`"+r+"` is invalid id or name. Must be a string or number.")}function w1(r){return ou(r)||wd(r)}function xd(r){var t=r.name;return!!(t&&t.indexOf(v1))}function to(r){return r&&r.id!=null&&Ts(r.id).indexOf(g1)===0}function bN(r){return g1+r}function wN(r,t,e){M(r,function(a){var i=a.newOption;re(i)&&(a.keyInfo.mainType=t,a.keyInfo.subType=xN(t,i,a.existing,e))})}function xN(r,t,e,a){var i=t.type?t.type:e?e.subType:a.determineSubType(r,t);return i}function SN(r,t){var e={},a={};return i(r||[],e),i(t||[],a,e),[n(e),n(a)];function i(o,s,l){for(var u=0,c=o.length;u<c;u++){var h=ut(o[u].seriesId,null);if(h==null)return;for(var f=Ve(o[u].dataIndex),d=l&&l[h],p=0,v=f.length;p<v;p++){var g=f[p];d&&d[g]?d[g]=null:(s[h]||(s[h]={}))[g]=1}}}function n(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var c=n(o[u],!0);c.length&&l.push({seriesId:u,dataIndex:c})}return l}}function zi(r,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return G(t.dataIndex)?W(t.dataIndex,function(e){return r.indexOfRawIndex(e)}):r.indexOfRawIndex(t.dataIndex);if(t.name!=null)return G(t.name)?W(t.name,function(e){return r.indexOfName(e)}):r.indexOfName(t.name)}function xe(){var r="__ec_inner_"+LN++;return function(t){return t[r]||(t[r]={})}}var LN=c1();function Cs(r,t,e){var a=Sd(t,e),i=a.mainTypeSpecified,n=a.queryOptionMap,o=a.others,s=o,l=e?e.defaultMainType:null;return!i&&l&&n.set(l,{}),n.each(function(u,c){var h=Ds(r,c,u,{useDefault:l===c,enableAll:e&&e.enableAll!=null?e.enableAll:!0,enableNone:e&&e.enableNone!=null?e.enableNone:!0});s[c+"Models"]=h.models,s[c+"Model"]=h.models[0]}),s}function Sd(r,t){var e;if(X(r)){var a={};a[r+"Index"]=0,e=a}else e=r;var i=Q(),n={},o=!1;return M(e,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){n[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],h=(u[2]||"").toLowerCase();if(!(!c||!h||t&&t.includeMainTypes&&me(t.includeMainTypes,c)<0)){o=o||!!c;var f=i.get(c)||i.set(c,{});f[h]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:n}}var ot={useDefault:!0,enableAll:!1,enableNone:!1},TN={useDefault:!1,enableAll:!0,enableNone:!0};function Ds(r,t,e,a){a=a||ot;var i=e.index,n=e.id,o=e.name,s={models:null,specified:i!=null||n!=null||o!=null};if(!s.specified){var l=void 0;return s.models=a.useDefault&&(l=r.getComponent(t))?[l]:[],s}return i==="none"||i===!1?(ae(a.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(i==="all"&&(ae(a.enableAll,'`"all"` is not a valid value on index option.'),i=n=o=null),s.models=r.queryComponents({mainType:t,index:i,id:n,name:o}),s)}function x1(r,t,e){r.setAttribute?r.setAttribute(t,e):r[t]=e}function CN(r,t){return r.getAttribute?r.getAttribute(t):r[t]}function DN(r){return r==="auto"?Le.domSupported?"html":"richText":r||"html"}function Ld(r,t){var e=Q(),a=[];return M(r,function(i){var n=t(i);(e.get(n)||(a.push(n),e.set(n,[]))).push(i)}),{keys:a,buckets:e}}function S1(r,t,e,a,i){var n=t==null||t==="auto";if(a==null)return a;if(De(a)){var o=p1(e||0,a,i);return Qe(o,n?Math.max(Yr(e||0),Yr(a)):t)}else{if(X(a))return i<1?e:a;for(var s=[],l=e,u=a,c=Math.max(l?l.length:0,u.length),h=0;h<c;++h){var f=r.getDimensionInfo(h);if(f&&f.type==="ordinal")s[h]=(i<1&&l?l:u)[h];else{var d=l&&l[h]?l[h]:0,p=u[h],o=p1(d,p,i);s[h]=Qe(o,n?Math.max(Yr(d),Yr(p)):t)}}return s}}var AN=".",Bi="___EC__COMPONENT__CONTAINER___",L1="___EC__EXTENDED_CLASS___";function Xr(r){var t={main:"",sub:""};if(r){var e=r.split(AN);t.main=e[0]||"",t.sub=e[1]||""}return t}function MN(r){ae(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function EN(r){return!!(r&&r[L1])}function Td(r,t){r.$constructor=r,r.extend=function(e){process.env.NODE_ENV!=="production"&&M(t,function(n){e[n]||console.warn("Method `"+n+"` should be implemented"+(e.type?" in "+e.type:"")+".")});var a=this,i;return IN(a)?i=function(n){z(o,n);function o(){return n.apply(this,arguments)||this}return o}(a):(i=function(){(e.$constructor||a).apply(this,arguments)},DP(i,this)),F(i.prototype,e),i[L1]=!0,i.extend=this.extend,i.superCall=NN,i.superApply=RN,i.superClass=a,i}}function IN(r){return te(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function T1(r,t){r.extend=t.extend}var PN=Math.round(Math.random()*10);function kN(r){var t=["__\0is_clz",PN++].join("_");r.prototype[t]=!0,process.env.NODE_ENV!=="production"&&ae(!r.isInstance,'The method "is" can not be defined.'),r.isInstance=function(e){return!!(e&&e[t])}}function NN(r,t){for(var e=[],a=2;a<arguments.length;a++)e[a-2]=arguments[a];return this.superClass.prototype[t].apply(r,e)}function RN(r,t,e){return this.superClass.prototype[t].apply(r,e)}function Bu(r){var t={};r.registerClass=function(a){var i=a.type||a.prototype.type;if(i){MN(i),a.prototype.type=i;var n=Xr(i);if(!n.sub)process.env.NODE_ENV!=="production"&&t[n.main]&&console.warn(n.main+" exists."),t[n.main]=a;else if(n.sub!==Bi){var o=e(n);o[n.sub]=a}}return a},r.getClass=function(a,i,n){var o=t[a];if(o&&o[Bi]&&(o=i?o[i]:null),n&&!o)throw new Error(i?"Component "+a+"."+(i||"")+" is used but not imported.":a+".type should be specified.");return o},r.getClassesByMainType=function(a){var i=Xr(a),n=[],o=t[i.main];return o&&o[Bi]?M(o,function(s,l){l!==Bi&&n.push(s)}):n.push(o),n},r.hasClass=function(a){var i=Xr(a);return!!t[i.main]},r.getAllClassMainTypes=function(){var a=[];return M(t,function(i,n){a.push(n)}),a},r.hasSubTypes=function(a){var i=Xr(a),n=t[i.main];return n&&n[Bi]};function e(a){var i=t[a.main];return(!i||!i[Bi])&&(i=t[a.main]={},i[Bi]=!0),i}}function Fi(r,t){for(var e=0;e<r.length;e++)r[e][1]||(r[e][1]=r[e][0]);return t=t||!1,function(a,i,n){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(i&&me(i,l)>=0||n&&me(n,l)<0)){var u=a.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var VN=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],ON=Fi(VN),zN=function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return ON(this,t,e)},r}(),Cd=new ps(50);function BN(r){if(typeof r=="string"){var t=Cd.get(r);return t&&t.image}else return r}function Dd(r,t,e,a,i){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var n=Cd.get(r),o={hostEl:e,cb:a,cbPayload:i};return n?(t=n.image,!Fu(t)&&n.pending.push(o)):(t=Ba.loadImage(r,C1,C1),t.__zrImageSrc=r,Cd.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function C1(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<r.pending.length;t++){var e=r.pending[t],a=e.cb;a&&a(this,e.cbPayload),e.hostEl.dirty()}r.pending.length=0}function Fu(r){return r&&r.width&&r.height}var Ad=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function FN(r,t,e,a,i,n){if(!e){r.text="",r.isTruncated=!1;return}var o=(t+"").split(`
227
+ `);n=D1(e,a,i,n);for(var s=!1,l={},u=0,c=o.length;u<c;u++)A1(l,o[u],n),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
228
+ `),r.isTruncated=s}function D1(r,t,e,a){a=a||{};var i=F({},a);i.font=t,e=le(e,"..."),i.maxIterations=le(a.maxIterations,2);var n=i.minChar=le(a.minChar,0);i.cnCharWidth=tr("国",t);var o=i.ascCharWidth=tr("a",t);i.placeholder=le(a.placeholder,"");for(var s=r=Math.max(0,r-1),l=0;l<n&&s>=o;l++)s-=o;var u=tr(e,t);return u>s&&(e="",u=0),s=r-u,i.ellipsis=e,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=r,i}function A1(r,t,e){var a=e.containerWidth,i=e.font,n=e.contentWidth;if(!a){r.textLine="",r.isTruncated=!1;return}var o=tr(t,i);if(o<=a){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=n||s>=e.maxIterations){t+=e.ellipsis;break}var l=s===0?GN(t,n,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*n/o):0;t=t.substr(0,l),o=tr(t,i)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function GN(r,t,e,a){for(var i=0,n=0,o=r.length;n<o&&i<t;n++){var s=r.charCodeAt(n);i+=0<=s&&s<=127?e:a}return n}function WN(r,t){r!=null&&(r+="");var e=t.overflow,a=t.padding,i=t.font,n=e==="truncate",o=Ru(i),s=le(t.lineHeight,o),l=!!t.backgroundColor,u=t.lineOverflow==="truncate",c=!1,h=t.width,f;h!=null&&(e==="break"||e==="breakAll")?f=r?E1(r,t.font,h,e==="breakAll",0).lines:[]:f=r?r.split(`
229
+ `):[];var d=f.length*s,p=le(t.height,d);if(d>p&&u){var v=Math.floor(p/s);c=c||f.length>v,f=f.slice(0,v)}if(r&&n&&h!=null)for(var g=D1(h,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),m={},y=0;y<f.length;y++)A1(m,f[y],g),f[y]=m.textLine,c=c||m.isTruncated;for(var _=p,w=0,y=0;y<f.length;y++)w=Math.max(tr(f[y],i),w);h==null&&(h=w);var x=w;return a&&(_+=a[0]+a[2],x+=a[1]+a[3],h+=a[1]+a[3]),l&&(x=h),{lines:f,height:p,outerWidth:x,outerHeight:_,lineHeight:s,calculatedLineHeight:o,contentWidth:w,contentHeight:d,width:h,isTruncated:c}}var HN=function(){function r(){}return r}(),M1=function(){function r(t){this.tokens=[],t&&(this.tokens=t)}return r}(),$N=function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r}();function UN(r,t){var e=new $N;if(r!=null&&(r+=""),!r)return e;for(var a=t.width,i=t.height,n=t.overflow,o=(n==="break"||n==="breakAll")&&a!=null?{width:a,accumWidth:0,breakAll:n==="breakAll"}:null,s=Ad.lastIndex=0,l;(l=Ad.exec(r))!=null;){var u=l.index;u>s&&Md(e,r.substring(s,u),t,o),Md(e,l[2],t,o,l[1]),s=Ad.lastIndex}s<r.length&&Md(e,r.substring(s,r.length),t,o);var c=[],h=0,f=0,d=t.padding,p=n==="truncate",v=t.lineOverflow==="truncate",g={};function m(B,H,Y){B.width=H,B.lineHeight=Y,h+=Y,f=Math.max(f,H)}e:for(var y=0;y<e.lines.length;y++){for(var _=e.lines[y],w=0,x=0,S=0;S<_.tokens.length;S++){var L=_.tokens[S],C=L.styleName&&t.rich[L.styleName]||{},T=L.textPadding=C.padding,A=T?T[1]+T[3]:0,D=L.font=C.font||t.font;L.contentHeight=Ru(D);var E=le(C.height,L.contentHeight);if(L.innerHeight=E,T&&(E+=T[0]+T[2]),L.height=E,L.lineHeight=nr(C.lineHeight,t.lineHeight,E),L.align=C&&C.align||t.align,L.verticalAlign=C&&C.verticalAlign||"middle",v&&i!=null&&h+L.lineHeight>i){var I=e.lines.length;S>0?(_.tokens=_.tokens.slice(0,S),m(_,x,w),e.lines=e.lines.slice(0,y+1)):e.lines=e.lines.slice(0,y),e.isTruncated=e.isTruncated||e.lines.length<I;break e}var P=C.width,k=P==null||P==="auto";if(typeof P=="string"&&P.charAt(P.length-1)==="%")L.percentWidth=P,c.push(L),L.contentWidth=tr(L.text,D);else{if(k){var N=C.backgroundColor,O=N&&N.image;O&&(O=BN(O),Fu(O)&&(L.width=Math.max(L.width,O.width*E/O.height)))}var R=p&&a!=null?a-x:null;R!=null&&R<L.width?!k||R<A?(L.text="",L.width=L.contentWidth=0):(FN(g,L.text,R-A,D,t.ellipsis,{minChar:t.truncateMinChar}),L.text=g.text,e.isTruncated=e.isTruncated||g.isTruncated,L.width=L.contentWidth=tr(L.text,D)):L.contentWidth=tr(L.text,D)}L.width+=A,x+=L.width,C&&(w=Math.max(w,L.lineHeight))}m(_,x,w)}e.outerWidth=e.width=le(a,f),e.outerHeight=e.height=le(i,h),e.contentHeight=h,e.contentWidth=f,d&&(e.outerWidth+=d[1]+d[3],e.outerHeight+=d[0]+d[2]);for(var y=0;y<c.length;y++){var L=c[y],V=L.percentWidth;L.width=parseInt(V,10)/100*e.width}return e}function Md(r,t,e,a,i){var n=t==="",o=i&&e.rich[i]||{},s=r.lines,l=o.font||e.font,u=!1,c,h;if(a){var f=o.padding,d=f?f[1]+f[3]:0;if(o.width!=null&&o.width!=="auto"){var p=Er(o.width,a.width)+d;s.length>0&&p+a.accumWidth>a.width&&(c=t.split(`
230
+ `),u=!0),a.accumWidth=p}else{var v=E1(t,l,a.width,a.breakAll,a.accumWidth);a.accumWidth=v.accumWidth+d,h=v.linesWidths,c=v.lines}}else c=t.split(`
231
+ `);for(var g=0;g<c.length;g++){var m=c[g],y=new HN;if(y.styleName=i,y.text=m,y.isLineHolder=!m&&!n,typeof o.width=="number"?y.width=o.width:y.width=h?h[g]:tr(m,l),!g&&!u){var _=(s[s.length-1]||(s[0]=new M1)).tokens,w=_.length;w===1&&_[0].isLineHolder?_[0]=y:(m||!w||n)&&_.push(y)}else s.push(new M1([y]))}}function YN(r){var t=r.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var ZN=Wr(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function XN(r){return YN(r)?!!ZN[r]:!0}function E1(r,t,e,a,i){for(var n=[],o=[],s="",l="",u=0,c=0,h=0;h<r.length;h++){var f=r.charAt(h);if(f===`
232
+ `){l&&(s+=l,c+=u),n.push(s),o.push(c),s="",l="",u=0,c=0;continue}var d=tr(f,t),p=a?!1:!XN(f);if(n.length?c+d>e:i+c+d>e){c?(s||l)&&(p?(s||(s=l,l="",u=0,c=u),n.push(s),o.push(c-u),l+=f,u+=d,s="",c=u):(l&&(s+=l,l="",u=0),n.push(s),o.push(c),s=f,c=d)):p?(n.push(l),o.push(u),l=f,u=d):(n.push(f),o.push(d));continue}c+=d,p?(l+=f,u+=d):(l&&(s+=l,l="",u=0),s+=f)}return!n.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(n.push(s),o.push(c)),n.length===1&&(c+=i),{accumWidth:c,lines:n,linesWidths:o}}var Ed="__zr_style_"+Math.round(Math.random()*10),Gi={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Gu={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Gi[Ed]=!0;var I1=["z","z2","invisible"],jN=["invisible"],qN=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var a=we(e),i=0;i<a.length;i++){var n=a[i];n==="style"?this.useStyle(e[n]):r.prototype.attrKV.call(this,n,e[n])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,a,i,n){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&KN(this,e,a)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(n&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},t.prototype.contain=function(e,a){return this.rectContain(e,a)},t.prototype.traverse=function(e,a){e.call(a,this)},t.prototype.rectContain=function(e,a){var i=this.transformCoordToLocal(e,a),n=this.getBoundingRect();return n.contain(i[0],i[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var a=this.transform,i=this.getBoundingRect(),n=this.style,o=n.shadowBlur||0,s=n.shadowOffsetX||0,l=n.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new ge(0,0,0,0)),a?ge.applyTransform(e,i,a):e.copy(i),(o||s||l)&&(e.width+=o*2+Math.abs(s),e.height+=o*2+Math.abs(l),e.x=Math.min(e.x,e.x+s-o),e.y=Math.min(e.y,e.y+l-o));var u=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-u),e.y=Math.floor(e.y-u),e.width=Math.ceil(e.width+1+u*2),e.height=Math.ceil(e.height+1+u*2))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new ge(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(e,a){e!=="style"?r.prototype.attrKV.call(this,e,a):this.style?this.setStyle(a):this.useStyle(a)},t.prototype.setStyle=function(e,a){return typeof e=="string"?this.style[e]=a:F(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=fs,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&fs)},t.prototype.styleUpdated=function(){this.__dirty&=~fs},t.prototype.createStyle=function(e){return uu(Gi,e)},t.prototype.useStyle=function(e){e[Ed]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[Ed]},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var a=this._normalState;e.style&&!a.style&&(a.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,a,I1)},t.prototype._applyStateObj=function(e,a,i,n,o,s){r.prototype._applyStateObj.call(this,e,a,i,n,o,s);var l=!(a&&n),u;if(a&&a.style?o?n?u=a.style:(u=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(u,a.style)):(u=this._mergeStyle(this.createStyle(),n?this.style:i.style),this._mergeStyle(u,a.style)):l&&(u=i.style),u)if(o){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var h=we(c),f=0;f<h.length;f++){var d=h[f];d in u&&(u[d]=u[d],this.style[d]=c[d])}for(var p=we(u),f=0;f<p.length;f++){var d=p[f];this.style[d]=this.style[d]}this._transitionState(e,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var v=this.__inHover?jN:I1,f=0;f<v.length;f++){var d=v[f];a&&a[d]!=null?this[d]=a[d]:l&&i[d]!=null&&(this[d]=i[d])}},t.prototype._mergeStates=function(e){for(var a=r.prototype._mergeStates.call(this,e),i,n=0;n<e.length;n++){var o=e[n];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(a.style=i),a},t.prototype._mergeStyle=function(e,a){return F(e,a),e},t.prototype.getAnimationStyleProps=function(){return Gu},t.initDefaultProps=function(){var e=t.prototype;e.type="displayable",e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor="pointer",e.rectHover=!1,e.incremental=!1,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=Qt|fs}(),t}(Q0),Id=new ge(0,0,0,0),Pd=new ge(0,0,0,0);function KN(r,t,e){return Id.copy(r.getBoundingRect()),r.transform&&Id.applyTransform(r.transform),Pd.width=t,Pd.height=e,!Id.intersect(Pd)}const hr=qN;var $t=Math.min,Ut=Math.max,kd=Math.sin,Nd=Math.cos,Wi=Math.PI*2,Wu=Ci(),Hu=Ci(),$u=Ci();function Uu(r,t,e){if(r.length!==0){for(var a=r[0],i=a[0],n=a[0],o=a[1],s=a[1],l=1;l<r.length;l++)a=r[l],i=$t(i,a[0]),n=Ut(n,a[0]),o=$t(o,a[1]),s=Ut(s,a[1]);t[0]=i,t[1]=o,e[0]=n,e[1]=s}}function P1(r,t,e,a,i,n){i[0]=$t(r,e),i[1]=$t(t,a),n[0]=Ut(r,e),n[1]=Ut(t,a)}var k1=[],N1=[];function JN(r,t,e,a,i,n,o,s,l,u){var c=S0,h=ht,f=c(r,e,i,o,k1);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var d=0;d<f;d++){var p=h(r,e,i,o,k1[d]);l[0]=$t(p,l[0]),u[0]=Ut(p,u[0])}f=c(t,a,n,s,N1);for(var d=0;d<f;d++){var v=h(t,a,n,s,N1[d]);l[1]=$t(v,l[1]),u[1]=Ut(v,u[1])}l[0]=$t(r,l[0]),u[0]=Ut(r,u[0]),l[0]=$t(o,l[0]),u[0]=Ut(o,u[0]),l[1]=$t(t,l[1]),u[1]=Ut(t,u[1]),l[1]=$t(s,l[1]),u[1]=Ut(s,u[1])}function QN(r,t,e,a,i,n,o,s){var l=T0,u=gt,c=Ut($t(l(r,e,i),1),0),h=Ut($t(l(t,a,n),1),0),f=u(r,e,i,c),d=u(t,a,n,h);o[0]=$t(r,i,f),o[1]=$t(t,n,d),s[0]=Ut(r,i,f),s[1]=Ut(t,n,d)}function eR(r,t,e,a,i,n,o,s,l){var u=Ga,c=Wa,h=Math.abs(i-n);if(h%Wi<1e-4&&h>1e-4){s[0]=r-e,s[1]=t-a,l[0]=r+e,l[1]=t+a;return}if(Wu[0]=Nd(i)*e+r,Wu[1]=kd(i)*a+t,Hu[0]=Nd(n)*e+r,Hu[1]=kd(n)*a+t,u(s,Wu,Hu),c(l,Wu,Hu),i=i%Wi,i<0&&(i=i+Wi),n=n%Wi,n<0&&(n=n+Wi),i>n&&!o?n+=Wi:i<n&&o&&(i+=Wi),o){var f=n;n=i,i=f}for(var d=0;d<n;d+=Math.PI/2)d>i&&($u[0]=Nd(d)*e+r,$u[1]=kd(d)*a+t,u(s,$u,s),c(l,$u,l))}var Be={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Hi=[],$i=[],jr=[],Xa=[],qr=[],Kr=[],Rd=Math.min,Vd=Math.max,Ui=Math.cos,Yi=Math.sin,_a=Math.abs,Od=Math.PI,ja=Od*2,zd=typeof Float32Array<"u",As=[];function Bd(r){var t=Math.round(r/Od*1e8)/1e8;return t%2*Od}function Fd(r,t){var e=Bd(r[0]);e<0&&(e+=ja);var a=e-r[0],i=r[1];i+=a,!t&&i-e>=ja?i=e+ja:t&&e-i>=ja?i=e-ja:!t&&e>i?i=e+(ja-Bd(e-i)):t&&e<i&&(i=e-(ja-Bd(i-e))),r[0]=e,r[1]=i}var Jr=function(){function r(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(t,e,a){a=a||0,a>0&&(this._ux=_a(a/Nu/t)||0,this._uy=_a(a/Nu/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(Be.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var a=_a(t-this._xi),i=_a(e-this._yi),n=a>this._ux||i>this._uy;if(this.addData(Be.L,t,e),this._ctx&&n&&this._ctx.lineTo(t,e),n)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=a*a+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,a,i,n,o){return this._drawPendingPt(),this.addData(Be.C,t,e,a,i,n,o),this._ctx&&this._ctx.bezierCurveTo(t,e,a,i,n,o),this._xi=n,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,a,i){return this._drawPendingPt(),this.addData(Be.Q,t,e,a,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,a,i),this._xi=a,this._yi=i,this},r.prototype.arc=function(t,e,a,i,n,o){this._drawPendingPt(),As[0]=i,As[1]=n,Fd(As,o),i=As[0],n=As[1];var s=n-i;return this.addData(Be.A,t,e,a,a,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,a,i,n,o),this._xi=Ui(n)*a+t,this._yi=Yi(n)*a+e,this},r.prototype.arcTo=function(t,e,a,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,a,i,n),this},r.prototype.rect=function(t,e,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,a,i),this.addData(Be.R,t,e,a,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Be.Z);var t=this._ctx,e=this._x0,a=this._y0;return t&&t.closePath(),this._xi=e,this._yi=a,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){var e=t.length;!(this.data&&this.data.length===e)&&zd&&(this.data=new Float32Array(e));for(var a=0;a<e;a++)this.data[a]=t[a];this._len=e},r.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var e=t.length,a=0,i=this._len,n=0;n<e;n++)a+=t[n].len();zd&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+a));for(var n=0;n<e;n++)for(var o=t[n].data,s=0;s<o.length;s++)this.data[i++]=o[s];this._len=i},r.prototype.addData=function(t,e,a,i,n,o,s,l,u){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var h=0;h<arguments.length;h++)c[this._len++]=arguments[h]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,zd&&this._len>11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){jr[0]=jr[1]=qr[0]=qr[1]=Number.MAX_VALUE,Xa[0]=Xa[1]=Kr[0]=Kr[1]=-Number.MAX_VALUE;var t=this.data,e=0,a=0,i=0,n=0,o;for(o=0;o<this._len;){var s=t[o++],l=o===1;switch(l&&(e=t[o],a=t[o+1],i=e,n=a),s){case Be.M:e=i=t[o++],a=n=t[o++],qr[0]=i,qr[1]=n,Kr[0]=i,Kr[1]=n;break;case Be.L:P1(e,a,t[o],t[o+1],qr,Kr),e=t[o++],a=t[o++];break;case Be.C:JN(e,a,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],qr,Kr),e=t[o++],a=t[o++];break;case Be.Q:QN(e,a,t[o++],t[o++],t[o],t[o+1],qr,Kr),e=t[o++],a=t[o++];break;case Be.A:var u=t[o++],c=t[o++],h=t[o++],f=t[o++],d=t[o++],p=t[o++]+d;o+=1;var v=!t[o++];l&&(i=Ui(d)*h+u,n=Yi(d)*f+c),eR(u,c,h,f,d,p,v,qr,Kr),e=Ui(p)*h+u,a=Yi(p)*f+c;break;case Be.R:i=e=t[o++],n=a=t[o++];var g=t[o++],m=t[o++];P1(i,n,i+g,n+m,qr,Kr);break;case Be.Z:e=i,a=n;break}Ga(jr,jr,qr),Wa(Xa,Xa,Kr)}return o===0&&(jr[0]=jr[1]=Xa[0]=Xa[1]=0),new ge(jr[0],jr[1],Xa[0]-jr[0],Xa[1]-jr[1])},r.prototype._calculateLength=function(){var t=this.data,e=this._len,a=this._ux,i=this._uy,n=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,h=0,f=0;f<e;){var d=t[f++],p=f===1;p&&(n=t[f],o=t[f+1],s=n,l=o);var v=-1;switch(d){case Be.M:n=s=t[f++],o=l=t[f++];break;case Be.L:{var g=t[f++],m=t[f++],y=g-n,_=m-o;(_a(y)>a||_a(_)>i||f===e-1)&&(v=Math.sqrt(y*y+_*_),n=g,o=m);break}case Be.C:{var w=t[f++],x=t[f++],g=t[f++],m=t[f++],S=t[f++],L=t[f++];v=fk(n,o,w,x,g,m,S,L,10),n=S,o=L;break}case Be.Q:{var w=t[f++],x=t[f++],g=t[f++],m=t[f++];v=pk(n,o,w,x,g,m,10),n=g,o=m;break}case Be.A:var C=t[f++],T=t[f++],A=t[f++],D=t[f++],E=t[f++],I=t[f++],P=I+E;f+=1,p&&(s=Ui(E)*A+C,l=Yi(E)*D+T),v=Vd(A,D)*Rd(ja,Math.abs(I)),n=Ui(P)*A+C,o=Yi(P)*D+T;break;case Be.R:{s=n=t[f++],l=o=t[f++];var k=t[f++],N=t[f++];v=k*2+N*2;break}case Be.Z:{var y=s-n,_=l-o;v=Math.sqrt(y*y+_*_),n=s,o=l;break}}v>=0&&(u[h++]=v,c+=v)}return this._pathLen=c,c},r.prototype.rebuildPath=function(t,e){var a=this.data,i=this._ux,n=this._uy,o=this._len,s,l,u,c,h,f,d=e<1,p,v,g=0,m=0,y,_=0,w,x;if(!(d&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,v=this._pathLen,y=e*v,!y)))e:for(var S=0;S<o;){var L=a[S++],C=S===1;switch(C&&(u=a[S],c=a[S+1],s=u,l=c),L!==Be.L&&_>0&&(t.lineTo(w,x),_=0),L){case Be.M:s=u=a[S++],l=c=a[S++],t.moveTo(u,c);break;case Be.L:{h=a[S++],f=a[S++];var T=_a(h-u),A=_a(f-c);if(T>i||A>n){if(d){var D=p[m++];if(g+D>y){var E=(y-g)/D;t.lineTo(u*(1-E)+h*E,c*(1-E)+f*E);break e}g+=D}t.lineTo(h,f),u=h,c=f,_=0}else{var I=T*T+A*A;I>_&&(w=h,x=f,_=I)}break}case Be.C:{var P=a[S++],k=a[S++],N=a[S++],O=a[S++],R=a[S++],V=a[S++];if(d){var D=p[m++];if(g+D>y){var E=(y-g)/D;Ua(u,P,N,R,E,Hi),Ua(c,k,O,V,E,$i),t.bezierCurveTo(Hi[1],$i[1],Hi[2],$i[2],Hi[3],$i[3]);break e}g+=D}t.bezierCurveTo(P,k,N,O,R,V),u=R,c=V;break}case Be.Q:{var P=a[S++],k=a[S++],N=a[S++],O=a[S++];if(d){var D=p[m++];if(g+D>y){var E=(y-g)/D;ds(u,P,N,E,Hi),ds(c,k,O,E,$i),t.quadraticCurveTo(Hi[1],$i[1],Hi[2],$i[2]);break e}g+=D}t.quadraticCurveTo(P,k,N,O),u=N,c=O;break}case Be.A:var B=a[S++],H=a[S++],Y=a[S++],$=a[S++],U=a[S++],q=a[S++],Ce=a[S++],ce=!a[S++],he=Y>$?Y:$,ee=_a(Y-$)>.001,pe=U+q,J=!1;if(d){var D=p[m++];g+D>y&&(pe=U+q*(y-g)/D,J=!0),g+=D}if(ee&&t.ellipse?t.ellipse(B,H,Y,$,Ce,U,pe,ce):t.arc(B,H,he,U,pe,ce),J)break e;C&&(s=Ui(U)*Y+B,l=Yi(U)*$+H),u=Ui(pe)*Y+B,c=Yi(pe)*$+H;break;case Be.R:s=u=a[S],l=c=a[S+1],h=a[S++],f=a[S++];var se=a[S++],Oe=a[S++];if(d){var D=p[m++];if(g+D>y){var Ee=y-g;t.moveTo(h,f),t.lineTo(h+Rd(Ee,se),f),Ee-=se,Ee>0&&t.lineTo(h+se,f+Rd(Ee,Oe)),Ee-=Oe,Ee>0&&t.lineTo(h+Vd(se-Ee,0),f+Oe),Ee-=se,Ee>0&&t.lineTo(h,f+Vd(Oe-Ee,0));break e}g+=D}t.rect(h,f,se,Oe);break;case Be.Z:if(d){var D=p[m++];if(g+D>y){var E=(y-g)/D;t.lineTo(u*(1-E)+s*E,c*(1-E)+l*E);break e}g+=D}t.closePath(),u=s,c=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.CMD=Be,r.initDefaultProps=function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),r}();function qa(r,t,e,a,i,n,o){if(i===0)return!1;var s=i,l=0,u=r;if(o>t+s&&o>a+s||o<t-s&&o<a-s||n>r+s&&n>e+s||n<r-s&&n<e-s)return!1;if(r!==e)l=(t-a)/(r-e),u=(r*a-e*t)/(r-e);else return Math.abs(n-r)<=s/2;var c=l*n-o+u,h=c*c/(l*l+1);return h<=s/2*s/2}function tR(r,t,e,a,i,n,o,s,l,u,c){if(l===0)return!1;var h=l;if(c>t+h&&c>a+h&&c>n+h&&c>s+h||c<t-h&&c<a-h&&c<n-h&&c<s-h||u>r+h&&u>e+h&&u>i+h&&u>o+h||u<r-h&&u<e-h&&u<i-h&&u<o-h)return!1;var f=L0(r,t,e,a,i,n,o,s,u,c,null);return f<=h/2}function R1(r,t,e,a,i,n,o,s,l){if(o===0)return!1;var u=o;if(l>t+u&&l>a+u&&l>n+u||l<t-u&&l<a-u&&l<n-u||s>r+u&&s>e+u&&s>i+u||s<r-u&&s<e-u&&s<i-u)return!1;var c=C0(r,t,e,a,i,n,s,l,null);return c<=u/2}var V1=Math.PI*2;function rr(r){return r%=V1,r<0&&(r+=V1),r}var Ms=Math.PI*2;function rR(r,t,e,a,i,n,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>e||c+u<e)return!1;if(Math.abs(a-i)%Ms<1e-4)return!0;if(n){var h=a;a=rr(i),i=rr(h)}else a=rr(a),i=rr(i);a>i&&(i+=Ms);var f=Math.atan2(l,s);return f<0&&(f+=Ms),f>=a&&f<=i||f+Ms>=a&&f+Ms<=i}function ba(r,t,e,a,i,n){if(n>t&&n>a||n<t&&n<a||a===t)return 0;var o=(n-t)/(a-t),s=a<t?1:-1;(o===1||o===0)&&(s=a<t?.5:-.5);var l=o*(e-r)+r;return l===i?1/0:l>i?s:0}var Ka=Jr.CMD,Zi=Math.PI*2,aR=1e-4;function iR(r,t){return Math.abs(r-t)<aR}var zt=[-1,-1,-1],fr=[-1,-1];function nR(){var r=fr[0];fr[0]=fr[1],fr[1]=r}function oR(r,t,e,a,i,n,o,s,l,u){if(u>t&&u>a&&u>n&&u>s||u<t&&u<a&&u<n&&u<s)return 0;var c=wu(t,a,n,s,u,zt);if(c===0)return 0;for(var h=0,f=-1,d=void 0,p=void 0,v=0;v<c;v++){var g=zt[v],m=g===0||g===1?.5:1,y=ht(r,e,i,o,g);y<l||(f<0&&(f=S0(t,a,n,s,fr),fr[1]<fr[0]&&f>1&&nR(),d=ht(t,a,n,s,fr[0]),f>1&&(p=ht(t,a,n,s,fr[1]))),f===2?g<fr[0]?h+=d<t?m:-m:g<fr[1]?h+=p<d?m:-m:h+=s<p?m:-m:g<fr[0]?h+=d<t?m:-m:h+=s<d?m:-m)}return h}function sR(r,t,e,a,i,n,o,s){if(s>t&&s>a&&s>n||s<t&&s<a&&s<n)return 0;var l=dk(t,a,n,s,zt);if(l===0)return 0;var u=T0(t,a,n);if(u>=0&&u<=1){for(var c=0,h=gt(t,a,n,u),f=0;f<l;f++){var d=zt[f]===0||zt[f]===1?.5:1,p=gt(r,e,i,zt[f]);p<o||(zt[f]<u?c+=h<t?d:-d:c+=n<h?d:-d)}return c}else{var d=zt[0]===0||zt[0]===1?.5:1,p=gt(r,e,i,zt[0]);return p<o?0:n<t?d:-d}}function lR(r,t,e,a,i,n,o,s){if(s-=t,s>e||s<-e)return 0;var l=Math.sqrt(e*e-s*s);zt[0]=-l,zt[1]=l;var u=Math.abs(a-i);if(u<1e-4)return 0;if(u>=Zi-1e-4){a=0,i=Zi;var c=n?1:-1;return o>=zt[0]+r&&o<=zt[1]+r?c:0}if(a>i){var h=a;a=i,i=h}a<0&&(a+=Zi,i+=Zi);for(var f=0,d=0;d<2;d++){var p=zt[d];if(p+r>o){var v=Math.atan2(s,p),c=n?1:-1;v<0&&(v=Zi+v),(v>=a&&v<=i||v+Zi>=a&&v+Zi<=i)&&(v>Math.PI/2&&v<Math.PI*1.5&&(c=-c),f+=c)}}return f}function O1(r,t,e,a,i){for(var n=r.data,o=r.len(),s=0,l=0,u=0,c=0,h=0,f,d,p=0;p<o;){var v=n[p++],g=p===1;switch(v===Ka.M&&p>1&&(e||(s+=ba(l,u,c,h,a,i))),g&&(l=n[p],u=n[p+1],c=l,h=u),v){case Ka.M:c=n[p++],h=n[p++],l=c,u=h;break;case Ka.L:if(e){if(qa(l,u,n[p],n[p+1],t,a,i))return!0}else s+=ba(l,u,n[p],n[p+1],a,i)||0;l=n[p++],u=n[p++];break;case Ka.C:if(e){if(tR(l,u,n[p++],n[p++],n[p++],n[p++],n[p],n[p+1],t,a,i))return!0}else s+=oR(l,u,n[p++],n[p++],n[p++],n[p++],n[p],n[p+1],a,i)||0;l=n[p++],u=n[p++];break;case Ka.Q:if(e){if(R1(l,u,n[p++],n[p++],n[p],n[p+1],t,a,i))return!0}else s+=sR(l,u,n[p++],n[p++],n[p],n[p+1],a,i)||0;l=n[p++],u=n[p++];break;case Ka.A:var m=n[p++],y=n[p++],_=n[p++],w=n[p++],x=n[p++],S=n[p++];p+=1;var L=!!(1-n[p++]);f=Math.cos(x)*_+m,d=Math.sin(x)*w+y,g?(c=f,h=d):s+=ba(l,u,f,d,a,i);var C=(a-m)*w/_+m;if(e){if(rR(m,y,w,x,x+S,L,t,C,i))return!0}else s+=lR(m,y,w,x,x+S,L,C,i);l=Math.cos(x+S)*_+m,u=Math.sin(x+S)*w+y;break;case Ka.R:c=l=n[p++],h=u=n[p++];var T=n[p++],A=n[p++];if(f=c+T,d=h+A,e){if(qa(c,h,f,h,t,a,i)||qa(f,h,f,d,t,a,i)||qa(f,d,c,d,t,a,i)||qa(c,d,c,h,t,a,i))return!0}else s+=ba(f,h,f,d,a,i),s+=ba(c,d,c,h,a,i);break;case Ka.Z:if(e){if(qa(l,u,c,h,t,a,i))return!0}else s+=ba(l,u,c,h,a,i);l=c,u=h;break}}return!e&&!iR(u,h)&&(s+=ba(l,u,c,h,a,i)||0),s!==0}function uR(r,t,e){return O1(r,0,!1,t,e)}function cR(r,t,e,a){return O1(r,t,!0,e,a)}var Yu=ie({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Gi),hR={style:ie({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Gu.style)},Gd=Ur.concat(["invisible","culling","z","z2","zlevel","parent"]),fR=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var a=this.style;if(a.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(l){e.buildPath(l,e.shape)}),i.silent=!0;var n=i.style;for(var o in a)n[o]!==a[o]&&(n[o]=a[o]);n.fill=a.fill?a.decal:null,n.decal=null,n.shadowColor=null,a.strokeFirst&&(n.stroke=null);for(var s=0;s<Gd.length;++s)i[Gd[s]]=this[Gd[s]];i.__dirty|=Qt}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(e){var a=we(e);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var n=0;n<a.length;n++){var o=a[n],s=e[o];o==="style"?this.style?F(this.style,s):this.useStyle(s):o==="shape"?F(this.shape,s):r.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if(e!=="none"){if(X(e)){var a=Lu(e,0);return a>.5?ud:a>.2?Uk:cd}else if(e)return cd}return ud},t.prototype.getInsideTextStroke=function(e){var a=this.style.fill;if(X(a)){var i=this.__zr,n=!!(i&&i.isDarkMode()),o=Lu(e,0)<ld;if(n===o)return a}},t.prototype.buildPath=function(e,a,i){},t.prototype.pathUpdated=function(){this.__dirty&=~Zn},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Jr(!1)},t.prototype.hasStroke=function(){var e=this.style,a=e.stroke;return!(a==null||a==="none"||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style,a=e.fill;return a!=null&&a!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,a=this.style,i=!e;if(i){var n=!1;this.path||(n=!0,this.createPathProxy());var o=this.path;(n||this.__dirty&Zn)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||i){s.copy(e);var l=a.strokeNoScale?this.getLineScale():1,u=a.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return e},t.prototype.contain=function(e,a){var i=this.transformCoordToLocal(e,a),n=this.getBoundingRect(),o=this.style;if(e=i[0],a=i[1],n.contain(e,a)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),cR(s,l/u,e,a)))return!0}if(this.hasFill())return uR(s,e,a)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Zn,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,a){e==="shape"?this.setShape(a):r.prototype.attrKV.call(this,e,a)},t.prototype.setShape=function(e,a){var i=this.shape;return i||(i=this.shape={}),typeof e=="string"?i[e]=a:F(i,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Zn)},t.prototype.createStyle=function(e){return uu(Yu,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var a=this._normalState;e.shape&&!a.shape&&(a.shape=F({},this.shape))},t.prototype._applyStateObj=function(e,a,i,n,o,s){r.prototype._applyStateObj.call(this,e,a,i,n,o,s);var l=!(a&&n),u;if(a&&a.shape?o?n?u=a.shape:(u=F({},i.shape),F(u,a.shape)):(u=F({},n?this.shape:i.shape),F(u,a.shape)):l&&(u=i.shape),u)if(o){this.shape=F({},this.shape);for(var c={},h=we(u),f=0;f<h.length;f++){var d=h[f];typeof u[d]=="object"?this.shape[d]=u[d]:c[d]=u[d]}this._transitionState(e,{shape:c},s)}else this.shape=u,this.dirtyShape()},t.prototype._mergeStates=function(e){for(var a=r.prototype._mergeStates.call(this,e),i,n=0;n<e.length;n++){var o=e[n];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(a.shape=i),a},t.prototype.getAnimationStyleProps=function(){return hR},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var a=function(n){z(o,n);function o(s){var l=n.call(this,s)||this;return e.init&&e.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return ne(e.style)},o.prototype.getDefaultShape=function(){return ne(e.shape)},o}(t);for(var i in e)typeof e[i]=="function"&&(a.prototype[i]=e[i]);return a},t.initDefaultProps=function(){var e=t.prototype;e.type="path",e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=Qt|fs|Zn}(),t}(hr);const _e=fR;var dR=ie({strokeFirst:!0,font:za,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Yu),z1=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.hasStroke=function(){var e=this.style,a=e.stroke;return a!=null&&a!=="none"&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style,a=e.fill;return a!=null&&a!=="none"},t.prototype.createStyle=function(e){return uu(dR,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var a=e.text;a!=null?a+="":a="";var i=ws(a,e.font,e.textAlign,e.textBaseline);if(i.x+=e.x||0,i.y+=e.y||0,this.hasStroke()){var n=e.lineWidth;i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n}this._rect=i}return this._rect},t.initDefaultProps=function(){var e=t.prototype;e.dirtyRectTolerance=10}(),t}(hr);z1.prototype.type="tspan";const Es=z1;var pR=ie({x:0,y:0},Gi),vR={style:ie({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Gu.style)};function gR(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var B1=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return uu(pR,e)},t.prototype._getSize=function(e){var a=this.style,i=a[e];if(i!=null)return i;var n=gR(a.image)?a.image:this.__image;if(!n)return 0;var o=e==="width"?"height":"width",s=a[o];return s==null?n[e]:n[e]/n[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return vR},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new ge(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(hr);B1.prototype.type="image";const bt=B1;function mR(r,t){var e=t.x,a=t.y,i=t.width,n=t.height,o=t.r,s,l,u,c;i<0&&(e=e+i,i=-i),n<0&&(a=a+n,n=-n),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var h;s+l>i&&(h=s+l,s*=i/h,l*=i/h),u+c>i&&(h=u+c,u*=i/h,c*=i/h),l+u>n&&(h=l+u,l*=n/h,u*=n/h),s+c>n&&(h=s+c,s*=n/h,c*=n/h),r.moveTo(e+s,a),r.lineTo(e+i-l,a),l!==0&&r.arc(e+i-l,a+l,l,-Math.PI/2,0),r.lineTo(e+i,a+n-u),u!==0&&r.arc(e+i-u,a+n-u,u,0,Math.PI/2),r.lineTo(e+c,a+n),c!==0&&r.arc(e+c,a+n-c,c,Math.PI/2,Math.PI),r.lineTo(e,a+s),s!==0&&r.arc(e+s,a+s,s,Math.PI,Math.PI*1.5)}var ro=Math.round;function F1(r,t,e){if(t){var a=t.x1,i=t.x2,n=t.y1,o=t.y2;r.x1=a,r.x2=i,r.y1=n,r.y2=o;var s=e&&e.lineWidth;return s&&(ro(a*2)===ro(i*2)&&(r.x1=r.x2=Xi(a,s,!0)),ro(n*2)===ro(o*2)&&(r.y1=r.y2=Xi(n,s,!0))),r}}function G1(r,t,e){if(t){var a=t.x,i=t.y,n=t.width,o=t.height;r.x=a,r.y=i,r.width=n,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=Xi(a,s,!0),r.y=Xi(i,s,!0),r.width=Math.max(Xi(a+n,s,!1)-r.x,n===0?0:1),r.height=Math.max(Xi(i+o,s,!1)-r.y,o===0?0:1)),r}}function Xi(r,t,e){if(!t)return r;var a=ro(r*2);return(a+ro(t))%2===0?a/2:(a+(e?1:-1))/2}var yR=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),_R={},W1=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new yR},t.prototype.buildPath=function(e,a){var i,n,o,s;if(this.subPixelOptimize){var l=G1(_R,a,this.style);i=l.x,n=l.y,o=l.width,s=l.height,l.r=a.r,a=l}else i=a.x,n=a.y,o=a.width,s=a.height;a.r?mR(e,a):e.rect(i,n,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(_e);W1.prototype.type="rect";const Te=W1;var H1={fill:"#000"},$1=2,bR={style:ie({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Gu.style)},U1=function(r){z(t,r);function t(e){var a=r.call(this)||this;return a.type="text",a._children=[],a._defaultStyle=H1,a.attr(e),a}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e<this._children.length;e++){var a=this._children[e];a.zlevel=this.zlevel,a.z=this.z,a.z2=this.z2,a.culling=this.culling,a.cursor=this.cursor,a.invisible=this.invisible}},t.prototype.updateTransform=function(){var e=this.innerTransformable;e?(e.updateTransform(),e.transform&&(this.transform=e.transform)):r.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(e){var a=this.innerTransformable;return a?a.getLocalTransform(e):r.prototype.getLocalTransform.call(this,e)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,SR(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var a=0;a<this._children.length;a++)this._children[a].__zr=e},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var a=0;a<this._children.length;a++)this._children[a].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new ge(0,0,0,0),a=this._children,i=[],n=null,o=0;o<a.length;o++){var s=a[o],l=s.getBoundingRect(),u=s.getLocalTransform(i);u?(e.copy(l),e.applyTransform(u),n=n||e.clone(),n.union(e)):(n=n||l.clone(),n.union(l))}this._rect=n||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||H1},t.prototype.setTextContent=function(e){if(process.env.NODE_ENV!=="production")throw new Error("Can't attach text on another text")},t.prototype._mergeStyle=function(e,a){if(!a)return e;var i=a.rich,n=e.rich||i&&{};return F(e,a),i&&n?(this._mergeRich(n,i),e.rich=n):n&&(e.rich=n),e},t.prototype._mergeRich=function(e,a){for(var i=we(a),n=0;n<i.length;n++){var o=i[n];e[o]=e[o]||{},F(e[o],a[o])}},t.prototype.getAnimationStyleProps=function(){return bR},t.prototype._getOrCreateChild=function(e){var a=this._children[this._childCursor];return(!a||!(a instanceof e))&&(a=new e),this._children[this._childCursor++]=a,a.__zr=this.__zr,a.parent=this,a},t.prototype._updatePlainTexts=function(){var e=this.style,a=e.font||za,i=e.padding,n=e_(e),o=WN(n,e),s=Wd(e),l=!!e.backgroundColor,u=o.outerHeight,c=o.outerWidth,h=o.contentWidth,f=o.lines,d=o.lineHeight,p=this._defaultStyle;this.isTruncated=!!o.isTruncated;var v=e.x||0,g=e.y||0,m=e.align||p.align||"left",y=e.verticalAlign||p.verticalAlign||"top",_=v,w=Jn(g,o.contentHeight,y);if(s||i){var x=xs(v,c,m),S=Jn(g,u,y);s&&this._renderBackground(e,e,x,S,c,u)}w+=d/2,i&&(_=Q1(v,m,i),y==="top"?w+=i[0]:y==="bottom"&&(w-=i[2]));for(var L=0,C=!1,T=J1("fill"in e?e.fill:(C=!0,p.fill)),A=K1("stroke"in e?e.stroke:!l&&(!p.autoStroke||C)?(L=$1,p.stroke):null),D=e.textShadowBlur>0,E=e.width!=null&&(e.overflow==="truncate"||e.overflow==="break"||e.overflow==="breakAll"),I=o.calculatedLineHeight,P=0;P<f.length;P++){var k=this._getOrCreateChild(Es),N=k.createStyle();k.useStyle(N),N.text=f[P],N.x=_,N.y=w,m&&(N.textAlign=m),N.textBaseline="middle",N.opacity=e.opacity,N.strokeFirst=!0,D&&(N.shadowBlur=e.textShadowBlur||0,N.shadowColor=e.textShadowColor||"transparent",N.shadowOffsetX=e.textShadowOffsetX||0,N.shadowOffsetY=e.textShadowOffsetY||0),N.stroke=A,N.fill=T,A&&(N.lineWidth=e.lineWidth||L,N.lineDash=e.lineDash,N.lineDashOffset=e.lineDashOffset||0),N.font=a,X1(N,e),w+=d,E&&k.setBoundingRect(new ge(xs(N.x,h,N.textAlign),Jn(N.y,I,N.textBaseline),h,I))}},t.prototype._updateRichTexts=function(){var e=this.style,a=e_(e),i=UN(a,e),n=i.width,o=i.outerWidth,s=i.outerHeight,l=e.padding,u=e.x||0,c=e.y||0,h=this._defaultStyle,f=e.align||h.align,d=e.verticalAlign||h.verticalAlign;this.isTruncated=!!i.isTruncated;var p=xs(u,o,f),v=Jn(c,s,d),g=p,m=v;l&&(g+=l[3],m+=l[0]);var y=g+n;Wd(e)&&this._renderBackground(e,e,p,v,o,s);for(var _=!!e.backgroundColor,w=0;w<i.lines.length;w++){for(var x=i.lines[w],S=x.tokens,L=S.length,C=x.lineHeight,T=x.width,A=0,D=g,E=y,I=L-1,P=void 0;A<L&&(P=S[A],!P.align||P.align==="left");)this._placeToken(P,e,C,m,D,"left",_),T-=P.width,D+=P.width,A++;for(;I>=0&&(P=S[I],P.align==="right");)this._placeToken(P,e,C,m,E,"right",_),T-=P.width,E-=P.width,I--;for(D+=(n-(D-g)-(y-E)-T)/2;A<=I;)P=S[A],this._placeToken(P,e,C,m,D+P.width/2,"center",_),D+=P.width,A++;m+=C}},t.prototype._placeToken=function(e,a,i,n,o,s,l){var u=a.rich[e.styleName]||{};u.text=e.text;var c=e.verticalAlign,h=n+i/2;c==="top"?h=n+e.height/2:c==="bottom"&&(h=n+i-e.height/2);var f=!e.isLineHolder&&Wd(u);f&&this._renderBackground(u,a,s==="right"?o-e.width:s==="center"?o-e.width/2:o,h-e.height/2,e.width,e.height);var d=!!u.backgroundColor,p=e.textPadding;p&&(o=Q1(o,s,p),h-=e.height/2-p[0]-e.innerHeight/2);var v=this._getOrCreateChild(Es),g=v.createStyle();v.useStyle(g);var m=this._defaultStyle,y=!1,_=0,w=J1("fill"in u?u.fill:"fill"in a?a.fill:(y=!0,m.fill)),x=K1("stroke"in u?u.stroke:"stroke"in a?a.stroke:!d&&!l&&(!m.autoStroke||y)?(_=$1,m.stroke):null),S=u.textShadowBlur>0||a.textShadowBlur>0;g.text=e.text,g.x=o,g.y=h,S&&(g.shadowBlur=u.textShadowBlur||a.textShadowBlur||0,g.shadowColor=u.textShadowColor||a.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||a.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||a.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=e.font||za,g.opacity=nr(u.opacity,a.opacity,1),X1(g,u),x&&(g.lineWidth=nr(u.lineWidth,a.lineWidth,_),g.lineDash=le(u.lineDash,a.lineDash),g.lineDashOffset=a.lineDashOffset||0,g.stroke=x),w&&(g.fill=w);var L=e.contentWidth,C=e.contentHeight;v.setBoundingRect(new ge(xs(g.x,L,g.textAlign),Jn(g.y,C,g.textBaseline),L,C))},t.prototype._renderBackground=function(e,a,i,n,o,s){var l=e.backgroundColor,u=e.borderWidth,c=e.borderColor,h=l&&l.image,f=l&&!h,d=e.borderRadius,p=this,v,g;if(f||e.lineHeight||u&&c){v=this._getOrCreateChild(Te),v.useStyle(v.createStyle()),v.style.fill=null;var m=v.shape;m.x=i,m.y=n,m.width=o,m.height=s,m.r=d,v.dirtyShape()}if(f){var y=v.style;y.fill=l||null,y.fillOpacity=le(e.fillOpacity,1)}else if(h){g=this._getOrCreateChild(bt),g.onload=function(){p.dirtyStyle()};var _=g.style;_.image=l.image,_.x=i,_.y=n,_.width=o,_.height=s}if(u&&c){var y=v.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=le(e.strokeOpacity,1),y.lineDash=e.borderDash,y.lineDashOffset=e.borderDashOffset||0,v.strokeContainThreshold=0,v.hasFill()&&v.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var w=(v||g).style;w.shadowBlur=e.shadowBlur||0,w.shadowColor=e.shadowColor||"transparent",w.shadowOffsetX=e.shadowOffsetX||0,w.shadowOffsetY=e.shadowOffsetY||0,w.opacity=nr(e.opacity,a.opacity,1)},t.makeFont=function(e){var a="";return j1(e)&&(a=[e.fontStyle,e.fontWeight,Z1(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),a&&Dr(a)||e.textFont||e.font},t}(hr),wR={left:!0,right:1,center:1},xR={top:1,bottom:1,middle:1},Y1=["fontStyle","fontWeight","fontSize","fontFamily"];function Z1(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?gf+"px":r+"px"}function X1(r,t){for(var e=0;e<Y1.length;e++){var a=Y1[e],i=t[a];i!=null&&(r[a]=i)}}function j1(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function SR(r){return q1(r),M(r.rich,q1),r}function q1(r){if(r){r.font=U1.makeFont(r);var t=r.align;t==="middle"&&(t="center"),r.align=t==null||wR[t]?t:"left";var e=r.verticalAlign;e==="center"&&(e="middle"),r.verticalAlign=e==null||xR[e]?e:"top";var a=r.padding;a&&(r.padding=wf(r.padding))}}function K1(r,t){return r==null||t<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function J1(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function Q1(r,t,e){return t==="right"?r-e[1]:t==="center"?r+e[3]/2-e[1]/2:r+e[3]}function e_(r){var t=r.text;return t!=null&&(t+=""),t}function Wd(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}const Ae=U1;var ue=xe(),Hd=function(r,t,e,a){if(a){var i=ue(a);i.dataIndex=e,i.dataType=t,i.seriesIndex=r,i.ssrType="chart",a.type==="group"&&a.traverse(function(n){var o=ue(n);o.seriesIndex=r,o.dataIndex=e,o.dataType=t,o.ssrType="chart"})}},t_=1,r_={},a_=xe(),$d=xe(),Ud=0,Is=1,Zu=2,Bt=["emphasis","blur","select"],Ps=["normal","emphasis","blur","select"],ao=10,LR=9,ji="highlight",Xu="downplay",ks="select",ju="unselect",Ns="toggleSelect";function io(r){return r!=null&&r!=="none"}function qu(r,t,e){r.onHoverStateChange&&(r.hoverState||0)!==e&&r.onHoverStateChange(t),r.hoverState=e}function i_(r){qu(r,"emphasis",Zu)}function n_(r){r.hoverState===Zu&&qu(r,"normal",Ud)}function Yd(r){qu(r,"blur",Is)}function o_(r){r.hoverState===Is&&qu(r,"normal",Ud)}function TR(r){r.selected=!0}function CR(r){r.selected=!1}function s_(r,t,e){t(r,e)}function wa(r,t,e){s_(r,t,e),r.isGroup&&r.traverse(function(a){s_(a,t,e)})}function Ku(r,t){switch(t){case"emphasis":r.hoverState=Zu;break;case"normal":r.hoverState=Ud;break;case"blur":r.hoverState=Is;break;case"select":r.selected=!0}}function DR(r,t,e,a){for(var i=r.style,n={},o=0;o<t.length;o++){var s=t[o],l=i[s];n[s]=l??(a&&a[s])}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(e)<0&&u.targetName==="style"&&u.saveTo(n,t)}return n}function AR(r,t,e,a){var i=e&&me(e,"select")>=0,n=!1;if(r instanceof _e){var o=a_(r),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(io(s)||io(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(n=!0,a=F({},a),u=F({},u),u.fill=s):!io(u.fill)&&io(s)?(n=!0,a=F({},a),u=F({},u),u.fill=Xf(s)):!io(u.stroke)&&io(l)&&(n||(a=F({},a),u=F({},u)),u.stroke=Xf(l)),a.style=u}}if(a&&a.z2==null){n||(a=F({},a));var c=r.z2EmphasisLift;a.z2=r.z2+(c??ao)}return a}function MR(r,t,e){if(e&&e.z2==null){e=F({},e);var a=r.z2SelectLift;e.z2=r.z2+(a??LR)}return e}function ER(r,t,e){var a=me(r.currentStates,t)>=0,i=r.style.opacity,n=a?null:DR(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=F({},e),o=F({opacity:a?i:n.opacity*.1},o),e.style=o),e}function Zd(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return AR(this,r,t,e);if(r==="blur")return ER(this,r,e);if(r==="select")return MR(this,r,e)}return e}function qi(r){r.stateProxy=Zd;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=Zd),e&&(e.stateProxy=Zd)}function l_(r,t){!d_(r,t)&&!r.__highByOuter&&wa(r,i_)}function u_(r,t){!d_(r,t)&&!r.__highByOuter&&wa(r,n_)}function xa(r,t){r.__highByOuter|=1<<(t||0),wa(r,i_)}function Sa(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&wa(r,n_)}function c_(r){wa(r,Yd)}function Xd(r){wa(r,o_)}function h_(r){wa(r,TR)}function f_(r){wa(r,CR)}function d_(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function p_(r){var t=r.getModel(),e=[],a=[];t.eachComponent(function(i,n){var o=$d(n),s=i==="series",l=s?r.getViewOfSeriesModel(n):r.getViewOfComponentModel(n);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){o_(u)}),s&&e.push(n)),o.isBlured=!1}),M(a,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(e,!1,t)})}function jd(r,t,e,a){var i=a.getModel();e=e||"coordinateSystem";function n(u,c){for(var h=0;h<c.length;h++){var f=u.getItemGraphicEl(c[h]);f&&Xd(f)}}if(r!=null&&!(!t||t==="none")){var o=i.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(u){var c=o===u,h=u.coordinateSystem;h&&h.master&&(h=h.master);var f=h&&s?h===s:c;if(!(e==="series"&&!c||e==="coordinateSystem"&&!f||t==="series"&&c)){var d=a.getViewOfSeriesModel(u);if(d.group.traverse(function(g){g.__highByOuter&&c&&t==="self"||Yd(g)}),Dt(t))n(u.getData(),t);else if(re(t))for(var p=we(t),v=0;v<p.length;v++)n(u.getData(p[v]),t[p[v]]);l.push(u),$d(u).isBlured=!0}}),i.eachComponent(function(u,c){if(u!=="series"){var h=a.getViewOfComponentModel(c);h&&h.toggleBlurSeries&&h.toggleBlurSeries(l,!0,i)}})}}function qd(r,t,e){if(!(r==null||t==null)){var a=e.getModel().getComponent(r,t);if(a){$d(a).isBlured=!0;var i=e.getViewOfComponentModel(a);!i||!i.focusBlurEnabled||i.group.traverse(function(n){Yd(n)})}}}function IR(r,t,e){var a=r.seriesIndex,i=r.getData(t.dataType);if(!i){process.env.NODE_ENV!=="production"&&_t("Unknown dataType "+t.dataType);return}var n=zi(i,t);n=(G(n)?n[0]:n)||0;var o=i.getItemGraphicEl(n);if(!o)for(var s=i.count(),l=0;!o&&l<s;)o=i.getItemGraphicEl(l++);if(o){var u=ue(o);jd(a,u.focus,u.blurScope,e)}else{var c=r.get(["emphasis","focus"]),h=r.get(["emphasis","blurScope"]);c!=null&&jd(a,c,h,e)}}function Kd(r,t,e,a){var i={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||t==null||e==null)return i;var n=a.getModel().getComponent(r,t);if(!n)return i;var o=a.getViewOfComponentModel(n);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(e),l,u=0;u<s.length;u++)if(process.env.NODE_ENV!=="production"&&!Ja(s[u])&&_t("param should be highDownDispatcher"),ue(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function PR(r,t,e){process.env.NODE_ENV!=="production"&&!Ja(r)&&_t("param should be highDownDispatcher");var a=ue(r),i=Kd(a.componentMainType,a.componentIndex,a.componentHighDownName,e),n=i.dispatchers,o=i.focusSelf;n?(o&&qd(a.componentMainType,a.componentIndex,e),M(n,function(s){return l_(s,t)})):(jd(a.seriesIndex,a.focus,a.blurScope,e),a.focus==="self"&&qd(a.componentMainType,a.componentIndex,e),l_(r,t))}function kR(r,t,e){process.env.NODE_ENV!=="production"&&!Ja(r)&&_t("param should be highDownDispatcher"),p_(e);var a=ue(r),i=Kd(a.componentMainType,a.componentIndex,a.componentHighDownName,e).dispatchers;i?M(i,function(n){return u_(n,t)}):u_(r,t)}function NR(r,t,e){if(Qd(t)){var a=t.dataType,i=r.getData(a),n=zi(i,t);G(n)||(n=[n]),r[t.type===Ns?"toggleSelect":t.type===ks?"select":"unselect"](n,a)}}function v_(r){var t=r.getAllData();M(t,function(e){var a=e.data,i=e.type;a.eachItemGraphicEl(function(n,o){r.isSelected(o,i)?h_(n):f_(n)})})}function RR(r){var t=[];return r.eachSeries(function(e){var a=e.getAllData();M(a,function(i){i.data;var n=i.type,o=e.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:e.seriesIndex};n!=null&&(s.dataType=n),t.push(s)}})}),t}function Ki(r,t,e){Ji(r,!0),wa(r,qi),Jd(r,t,e)}function VR(r){Ji(r,!1)}function qe(r,t,e,a){a?VR(r):Ki(r,t,e)}function Jd(r,t,e){var a=ue(r);t!=null?(a.focus=t,a.blurScope=e):a.focus&&(a.focus=null)}var g_=["emphasis","blur","select"],OR={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function wt(r,t,e,a){e=e||"itemStyle";for(var i=0;i<g_.length;i++){var n=g_[i],o=t.getModel([n,e]),s=r.ensureState(n);s.style=a?a(o):o[OR[e]]()}}function Ji(r,t){var e=t===!1,a=r;r.highDownSilentOnTouch&&(a.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!e||a.__highDownDispatcher)&&(a.__highByOuter=a.__highByOuter||0,a.__highDownDispatcher=!e)}function Ja(r){return!!(r&&r.__highDownDispatcher)}function zR(r,t,e){var a=ue(r);a.componentMainType=t.mainType,a.componentIndex=t.componentIndex,a.componentHighDownName=e}function BR(r){var t=r_[r];return t==null&&t_<=32&&(t=r_[r]=t_++),t}function Qd(r){var t=r.type;return t===ks||t===ju||t===Ns}function m_(r){var t=r.type;return t===ji||t===Xu}function FR(r){var t=a_(r);t.normalFill=r.style.fill,t.normalStroke=r.style.stroke;var e=r.states.select||{};t.selectFill=e.style&&e.style.fill||null,t.selectStroke=e.style&&e.style.stroke||null}var no=Jr.CMD,GR=[[],[],[]],y_=Math.sqrt,WR=Math.atan2;function __(r,t){if(t){var e=r.data,a=r.len(),i,n,o,s,l,u,c=no.M,h=no.C,f=no.L,d=no.R,p=no.A,v=no.Q;for(o=0,s=0;o<a;){switch(i=e[o++],s=o,n=0,i){case c:n=1;break;case f:n=1;break;case h:n=3;break;case v:n=2;break;case p:var g=t[4],m=t[5],y=y_(t[0]*t[0]+t[1]*t[1]),_=y_(t[2]*t[2]+t[3]*t[3]),w=WR(-t[1]/_,t[0]/y);e[o]*=y,e[o++]+=g,e[o]*=_,e[o++]+=m,e[o++]*=y,e[o++]*=_,e[o++]+=w,e[o++]+=w,o+=2,s=o;break;case d:u[0]=e[o++],u[1]=e[o++],yt(u,u,t),e[s++]=u[0],e[s++]=u[1],u[0]+=e[o++],u[1]+=e[o++],yt(u,u,t),e[s++]=u[0],e[s++]=u[1]}for(l=0;l<n;l++){var x=GR[l];x[0]=e[o++],x[1]=e[o++],yt(x,x,t),e[s++]=x[0],e[s++]=x[1]}}r.increaseVersion()}}var ep=Math.sqrt,Ju=Math.sin,Qu=Math.cos,Rs=Math.PI;function b_(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function tp(r,t){return(r[0]*t[0]+r[1]*t[1])/(b_(r)*b_(t))}function w_(r,t){return(r[0]*t[1]<r[1]*t[0]?-1:1)*Math.acos(tp(r,t))}function x_(r,t,e,a,i,n,o,s,l,u,c){var h=l*(Rs/180),f=Qu(h)*(r-e)/2+Ju(h)*(t-a)/2,d=-1*Ju(h)*(r-e)/2+Qu(h)*(t-a)/2,p=f*f/(o*o)+d*d/(s*s);p>1&&(o*=ep(p),s*=ep(p));var v=(i===n?-1:1)*ep((o*o*(s*s)-o*o*(d*d)-s*s*(f*f))/(o*o*(d*d)+s*s*(f*f)))||0,g=v*o*d/s,m=v*-s*f/o,y=(r+e)/2+Qu(h)*g-Ju(h)*m,_=(t+a)/2+Ju(h)*g+Qu(h)*m,w=w_([1,0],[(f-g)/o,(d-m)/s]),x=[(f-g)/o,(d-m)/s],S=[(-1*f-g)/o,(-1*d-m)/s],L=w_(x,S);if(tp(x,S)<=-1&&(L=Rs),tp(x,S)>=1&&(L=0),L<0){var C=Math.round(L/Rs*1e6)/1e6;L=Rs*2+C%2*Rs}c.addData(u,y,_,o,s,w,L,h,n)}var HR=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,$R=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function UR(r){var t=new Jr;if(!r)return t;var e=0,a=0,i=e,n=a,o,s=Jr.CMD,l=r.match(HR);if(!l)return t;for(var u=0;u<l.length;u++){for(var c=l[u],h=c.charAt(0),f=void 0,d=c.match($R)||[],p=d.length,v=0;v<p;v++)d[v]=parseFloat(d[v]);for(var g=0;g<p;){var m=void 0,y=void 0,_=void 0,w=void 0,x=void 0,S=void 0,L=void 0,C=e,T=a,A=void 0,D=void 0;switch(h){case"l":e+=d[g++],a+=d[g++],f=s.L,t.addData(f,e,a);break;case"L":e=d[g++],a=d[g++],f=s.L,t.addData(f,e,a);break;case"m":e+=d[g++],a+=d[g++],f=s.M,t.addData(f,e,a),i=e,n=a,h="l";break;case"M":e=d[g++],a=d[g++],f=s.M,t.addData(f,e,a),i=e,n=a,h="L";break;case"h":e+=d[g++],f=s.L,t.addData(f,e,a);break;case"H":e=d[g++],f=s.L,t.addData(f,e,a);break;case"v":a+=d[g++],f=s.L,t.addData(f,e,a);break;case"V":a=d[g++],f=s.L,t.addData(f,e,a);break;case"C":f=s.C,t.addData(f,d[g++],d[g++],d[g++],d[g++],d[g++],d[g++]),e=d[g-2],a=d[g-1];break;case"c":f=s.C,t.addData(f,d[g++]+e,d[g++]+a,d[g++]+e,d[g++]+a,d[g++]+e,d[g++]+a),e+=d[g-2],a+=d[g-1];break;case"S":m=e,y=a,A=t.len(),D=t.data,o===s.C&&(m+=e-D[A-4],y+=a-D[A-3]),f=s.C,C=d[g++],T=d[g++],e=d[g++],a=d[g++],t.addData(f,m,y,C,T,e,a);break;case"s":m=e,y=a,A=t.len(),D=t.data,o===s.C&&(m+=e-D[A-4],y+=a-D[A-3]),f=s.C,C=e+d[g++],T=a+d[g++],e+=d[g++],a+=d[g++],t.addData(f,m,y,C,T,e,a);break;case"Q":C=d[g++],T=d[g++],e=d[g++],a=d[g++],f=s.Q,t.addData(f,C,T,e,a);break;case"q":C=d[g++]+e,T=d[g++]+a,e+=d[g++],a+=d[g++],f=s.Q,t.addData(f,C,T,e,a);break;case"T":m=e,y=a,A=t.len(),D=t.data,o===s.Q&&(m+=e-D[A-4],y+=a-D[A-3]),e=d[g++],a=d[g++],f=s.Q,t.addData(f,m,y,e,a);break;case"t":m=e,y=a,A=t.len(),D=t.data,o===s.Q&&(m+=e-D[A-4],y+=a-D[A-3]),e+=d[g++],a+=d[g++],f=s.Q,t.addData(f,m,y,e,a);break;case"A":_=d[g++],w=d[g++],x=d[g++],S=d[g++],L=d[g++],C=e,T=a,e=d[g++],a=d[g++],f=s.A,x_(C,T,e,a,S,L,_,w,x,f,t);break;case"a":_=d[g++],w=d[g++],x=d[g++],S=d[g++],L=d[g++],C=e,T=a,e+=d[g++],a+=d[g++],f=s.A,x_(C,T,e,a,S,L,_,w,x,f,t);break}}(h==="z"||h==="Z")&&(f=s.Z,t.addData(f),e=i,a=n),o=f}return t.toStatic(),t}var S_=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t}(_e);function L_(r){return r.setData!=null}function T_(r,t){var e=UR(r),a=F({},t);return a.buildPath=function(i){if(L_(i)){i.setData(e.data);var n=i.getContext();n&&i.rebuildPath(n,1)}else{var n=i;e.rebuildPath(n,1)}},a.applyTransform=function(i){__(e,i),this.dirtyShape()},a}function C_(r,t){return new S_(T_(r,t))}function YR(r,t){var e=T_(r,t),a=function(i){z(n,i);function n(o){var s=i.call(this,o)||this;return s.applyTransform=e.applyTransform,s.buildPath=e.buildPath,s}return n}(S_);return a}function ZR(r,t){for(var e=[],a=r.length,i=0;i<a;i++){var n=r[i];e.push(n.getUpdatedPathProxy(!0))}var o=new _e(t);return o.createPathProxy(),o.buildPath=function(s){if(L_(s)){s.appendPath(e);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function rp(r,t){t=t||{};var e=new _e;return r.shape&&e.setShape(r.shape),e.setStyle(r.style),t.bakeTransform?__(e.path,r.getComputedTransform()):t.toLocal?e.setLocalTransform(r.getComputedTransform()):e.copyTransform(r),e.buildPath=r.buildPath,e.applyTransform=e.applyTransform,e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e}var XR=function(){function r(){this.cx=0,this.cy=0,this.r=0}return r}(),D_=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new XR},t.prototype.buildPath=function(e,a){e.moveTo(a.cx+a.r,a.cy),e.arc(a.cx,a.cy,a.r,0,Math.PI*2)},t}(_e);D_.prototype.type="circle";const Qa=D_;var jR=function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r}(),A_=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new jR},t.prototype.buildPath=function(e,a){var i=.5522848,n=a.cx,o=a.cy,s=a.rx,l=a.ry,u=s*i,c=l*i;e.moveTo(n-s,o),e.bezierCurveTo(n-s,o-c,n-u,o-l,n,o-l),e.bezierCurveTo(n+u,o-l,n+s,o-c,n+s,o),e.bezierCurveTo(n+s,o+c,n+u,o+l,n,o+l),e.bezierCurveTo(n-u,o+l,n-s,o+c,n-s,o),e.closePath()},t}(_e);A_.prototype.type="ellipse";const ap=A_;var M_=Math.PI,ip=M_*2,Qi=Math.sin,oo=Math.cos,qR=Math.acos,Mt=Math.atan2,E_=Math.abs,Vs=Math.sqrt,Os=Math.max,Qr=Math.min,Pr=1e-4;function KR(r,t,e,a,i,n,o,s){var l=e-r,u=a-t,c=o-i,h=s-n,f=h*l-c*u;if(!(f*f<Pr))return f=(c*(t-n)-h*(r-i))/f,[r+f*l,t+f*u]}function ec(r,t,e,a,i,n,o){var s=r-e,l=t-a,u=(o?n:-n)/Vs(s*s+l*l),c=u*l,h=-u*s,f=r+c,d=t+h,p=e+c,v=a+h,g=(f+p)/2,m=(d+v)/2,y=p-f,_=v-d,w=y*y+_*_,x=i-n,S=f*v-p*d,L=(_<0?-1:1)*Vs(Os(0,x*x*w-S*S)),C=(S*_-y*L)/w,T=(-S*y-_*L)/w,A=(S*_+y*L)/w,D=(-S*y+_*L)/w,E=C-g,I=T-m,P=A-g,k=D-m;return E*E+I*I>P*P+k*k&&(C=A,T=D),{cx:C,cy:T,x0:-c,y0:-h,x1:C*(i/x-1),y1:T*(i/x-1)}}function JR(r){var t;if(G(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function QR(r,t){var e,a=Os(t.r,0),i=Os(t.r0||0,0),n=a>0,o=i>0;if(!(!n&&!o)){if(n||(a=i,i=0),i>a){var s=a;a=i,i=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var c=t.cx,h=t.cy,f=!!t.clockwise,d=E_(u-l),p=d>ip&&d%ip;if(p>Pr&&(d=p),!(a>Pr))r.moveTo(c,h);else if(d>ip-Pr)r.moveTo(c+a*oo(l),h+a*Qi(l)),r.arc(c,h,a,l,u,!f),i>Pr&&(r.moveTo(c+i*oo(u),h+i*Qi(u)),r.arc(c,h,i,u,l,f));else{var v=void 0,g=void 0,m=void 0,y=void 0,_=void 0,w=void 0,x=void 0,S=void 0,L=void 0,C=void 0,T=void 0,A=void 0,D=void 0,E=void 0,I=void 0,P=void 0,k=a*oo(l),N=a*Qi(l),O=i*oo(u),R=i*Qi(u),V=d>Pr;if(V){var B=t.cornerRadius;B&&(e=JR(B),v=e[0],g=e[1],m=e[2],y=e[3]);var H=E_(a-i)/2;if(_=Qr(H,m),w=Qr(H,y),x=Qr(H,v),S=Qr(H,g),T=L=Os(_,w),A=C=Os(x,S),(L>Pr||C>Pr)&&(D=a*oo(u),E=a*Qi(u),I=i*oo(l),P=i*Qi(l),d<M_)){var Y=KR(k,N,I,P,D,E,O,R);if(Y){var $=k-Y[0],U=N-Y[1],q=D-Y[0],Ce=E-Y[1],ce=1/Qi(qR(($*q+U*Ce)/(Vs($*$+U*U)*Vs(q*q+Ce*Ce)))/2),he=Vs(Y[0]*Y[0]+Y[1]*Y[1]);T=Qr(L,(a-he)/(ce+1)),A=Qr(C,(i-he)/(ce-1))}}}if(!V)r.moveTo(c+k,h+N);else if(T>Pr){var ee=Qr(m,T),pe=Qr(y,T),J=ec(I,P,k,N,a,ee,f),se=ec(D,E,O,R,a,pe,f);r.moveTo(c+J.cx+J.x0,h+J.cy+J.y0),T<L&&ee===pe?r.arc(c+J.cx,h+J.cy,T,Mt(J.y0,J.x0),Mt(se.y0,se.x0),!f):(ee>0&&r.arc(c+J.cx,h+J.cy,ee,Mt(J.y0,J.x0),Mt(J.y1,J.x1),!f),r.arc(c,h,a,Mt(J.cy+J.y1,J.cx+J.x1),Mt(se.cy+se.y1,se.cx+se.x1),!f),pe>0&&r.arc(c+se.cx,h+se.cy,pe,Mt(se.y1,se.x1),Mt(se.y0,se.x0),!f))}else r.moveTo(c+k,h+N),r.arc(c,h,a,l,u,!f);if(!(i>Pr)||!V)r.lineTo(c+O,h+R);else if(A>Pr){var ee=Qr(v,A),pe=Qr(g,A),J=ec(O,R,D,E,i,-pe,f),se=ec(k,N,I,P,i,-ee,f);r.lineTo(c+J.cx+J.x0,h+J.cy+J.y0),A<C&&ee===pe?r.arc(c+J.cx,h+J.cy,A,Mt(J.y0,J.x0),Mt(se.y0,se.x0),!f):(pe>0&&r.arc(c+J.cx,h+J.cy,pe,Mt(J.y0,J.x0),Mt(J.y1,J.x1),!f),r.arc(c,h,i,Mt(J.cy+J.y1,J.cx+J.x1),Mt(se.cy+se.y1,se.cx+se.x1),f),ee>0&&r.arc(c+se.cx,h+se.cy,ee,Mt(se.y1,se.x1),Mt(se.y0,se.x0),!f))}else r.lineTo(c+O,h+R),r.arc(c,h,i,u,l,f)}r.closePath()}}}var e5=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r}(),I_=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new e5},t.prototype.buildPath=function(e,a){QR(e,a)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(_e);I_.prototype.type="sector";const Yt=I_;var t5=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),P_=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new t5},t.prototype.buildPath=function(e,a){var i=a.cx,n=a.cy,o=Math.PI*2;e.moveTo(i+a.r,n),e.arc(i,n,a.r,0,o,!1),e.moveTo(i+a.r0,n),e.arc(i,n,a.r0,0,o,!0)},t}(_e);P_.prototype.type="ring";const tc=P_;function r5(r,t,e,a){var i=[],n=[],o=[],s=[],l,u,c,h;if(a){c=[1/0,1/0],h=[-1/0,-1/0];for(var f=0,d=r.length;f<d;f++)Ga(c,c,r[f]),Wa(h,h,r[f]);Ga(c,c,a[0]),Wa(h,h,a[1])}for(var f=0,d=r.length;f<d;f++){var p=r[f];if(e)l=r[f?f-1:d-1],u=r[(f+1)%d];else if(f===0||f===d-1){i.push(fa(r[f]));continue}else l=r[f-1],u=r[f+1];Di(n,u,l),hu(n,n,t);var v=Lf(p,l),g=Lf(p,u),m=v+g;m!==0&&(v/=m,g/=m),hu(o,n,-v),hu(s,n,g);var y=t0([],p,o),_=t0([],p,s);a&&(Wa(y,y,c),Ga(y,y,h),Wa(_,_,c),Ga(_,_,h)),i.push(y),i.push(_)}return e&&i.push(i.shift()),i}function k_(r,t,e){var a=t.smooth,i=t.points;if(i&&i.length>=2){if(a){var n=r5(i,a,e,t.smoothConstraint);r.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(e?o:o-1);s++){var l=n[s*2],u=n[s*2+1],c=i[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(i[0][0],i[0][1]);for(var s=1,h=i.length;s<h;s++)r.lineTo(i[s][0],i[s][1])}e&&r.closePath()}}var a5=function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r}(),N_=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new a5},t.prototype.buildPath=function(e,a){k_(e,a,!0)},t}(_e);N_.prototype.type="polygon";const Zt=N_;var i5=function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r}(),R_=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new i5},t.prototype.buildPath=function(e,a){k_(e,a,!1)},t}(_e);R_.prototype.type="polyline";const Xt=R_;var n5={},o5=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}(),V_=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new o5},t.prototype.buildPath=function(e,a){var i,n,o,s;if(this.subPixelOptimize){var l=F1(n5,a,this.style);i=l.x1,n=l.y1,o=l.x2,s=l.y2}else i=a.x1,n=a.y1,o=a.x2,s=a.y2;var u=a.percent;u!==0&&(e.moveTo(i,n),u<1&&(o=i*(1-u)+o*u,s=n*(1-u)+s*u),e.lineTo(o,s))},t.prototype.pointAt=function(e){var a=this.shape;return[a.x1*(1-e)+a.x2*e,a.y1*(1-e)+a.y2*e]},t}(_e);V_.prototype.type="line";const mt=V_;var jt=[],s5=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r}();function O_(r,t,e){var a=r.cpx2,i=r.cpy2;return a!=null||i!=null?[(e?x0:ht)(r.x1,r.cpx1,r.cpx2,r.x2,t),(e?x0:ht)(r.y1,r.cpy1,r.cpy2,r.y2,t)]:[(e?Ff:gt)(r.x1,r.cpx1,r.x2,t),(e?Ff:gt)(r.y1,r.cpy1,r.y2,t)]}var z_=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new s5},t.prototype.buildPath=function(e,a){var i=a.x1,n=a.y1,o=a.x2,s=a.y2,l=a.cpx1,u=a.cpy1,c=a.cpx2,h=a.cpy2,f=a.percent;f!==0&&(e.moveTo(i,n),c==null||h==null?(f<1&&(ds(i,l,o,f,jt),l=jt[1],o=jt[2],ds(n,u,s,f,jt),u=jt[1],s=jt[2]),e.quadraticCurveTo(l,u,o,s)):(f<1&&(Ua(i,l,c,o,f,jt),l=jt[1],c=jt[2],o=jt[3],Ua(n,u,h,s,f,jt),u=jt[1],h=jt[2],s=jt[3]),e.bezierCurveTo(l,u,c,h,o,s)))},t.prototype.pointAt=function(e){return O_(this.shape,e,!1)},t.prototype.tangentAt=function(e){var a=O_(this.shape,e,!0);return $n(a,a)},t}(_e);z_.prototype.type="bezier-curve";const rc=z_;var l5=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),B_=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new l5},t.prototype.buildPath=function(e,a){var i=a.cx,n=a.cy,o=Math.max(a.r,0),s=a.startAngle,l=a.endAngle,u=a.clockwise,c=Math.cos(s),h=Math.sin(s);e.moveTo(c*o+i,h*o+n),e.arc(i,n,o,s,l,!u)},t}(_e);B_.prototype.type="arc";const np=B_;var u5=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="compound",e}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,a=this.shapeChanged(),i=0;i<e.length;i++)a=a||e[i].shapeChanged();a&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],a=this.getGlobalScale(),i=0;i<e.length;i++)e[i].path||e[i].createPathProxy(),e[i].path.setScale(a[0],a[1],e[i].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,a){for(var i=a.paths||[],n=0;n<i.length;n++)i[n].buildPath(e,i[n].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],a=0;a<e.length;a++)e[a].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),_e.prototype.getBoundingRect.call(this)},t}(_e);const op=u5;var c5=function(){function r(t){this.colorStops=t||[]}return r.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},r}();const F_=c5;var h5=function(r){z(t,r);function t(e,a,i,n,o,s){var l=r.call(this,o)||this;return l.x=e??0,l.y=a??0,l.x2=i??1,l.y2=n??0,l.type="linear",l.global=s||!1,l}return t}(F_);const zs=h5;var f5=function(r){z(t,r);function t(e,a,i,n,o){var s=r.call(this,n)||this;return s.x=e??.5,s.y=a??.5,s.r=i??.5,s.type="radial",s.global=o||!1,s}return t}(F_);const G_=f5;var en=[0,0],tn=[0,0],ac=new ve,ic=new ve,d5=function(){function r(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var a=0;a<4;a++)this._corners[a]=new ve;for(var a=0;a<2;a++)this._axes[a]=new ve;t&&this.fromBoundingRect(t,e)}return r.prototype.fromBoundingRect=function(t,e){var a=this._corners,i=this._axes,n=t.x,o=t.y,s=n+t.width,l=o+t.height;if(a[0].set(n,o),a[1].set(s,o),a[2].set(s,l),a[3].set(n,l),e)for(var u=0;u<4;u++)a[u].transform(e);ve.sub(i[0],a[1],a[0]),ve.sub(i[1],a[3],a[0]),i[0].normalize(),i[1].normalize();for(var u=0;u<2;u++)this._origin[u]=i[u].dot(a[0])},r.prototype.intersect=function(t,e){var a=!0,i=!e;return ac.set(1/0,1/0),ic.set(0,0),!this._intersectCheckOneSide(this,t,ac,ic,i,1)&&(a=!1,i)||!this._intersectCheckOneSide(t,this,ac,ic,i,-1)&&(a=!1,i)||i||ve.copy(e,a?ac:ic),a},r.prototype._intersectCheckOneSide=function(t,e,a,i,n,o){for(var s=!0,l=0;l<2;l++){var u=this._axes[l];if(this._getProjMinMaxOnAxis(l,t._corners,en),this._getProjMinMaxOnAxis(l,e._corners,tn),en[1]<tn[0]||en[0]>tn[1]){if(s=!1,n)return s;var c=Math.abs(tn[0]-en[1]),h=Math.abs(en[0]-tn[1]);Math.min(c,h)>i.len()&&(c<h?ve.scale(i,u,-c*o):ve.scale(i,u,h*o))}else if(a){var c=Math.abs(tn[0]-en[1]),h=Math.abs(en[0]-tn[1]);Math.min(c,h)<a.len()&&(c<h?ve.scale(a,u,c*o):ve.scale(a,u,-h*o))}}return s},r.prototype._getProjMinMaxOnAxis=function(t,e,a){for(var i=this._axes[t],n=this._origin,o=e[0].dot(i)+n[t],s=o,l=o,u=1;u<e.length;u++){var c=e[u].dot(i)+n[t];s=Math.min(c,s),l=Math.max(c,l)}a[0]=s,a[1]=l},r}();const nc=d5;var p5=[],v5=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return t.prototype.traverse=function(e,a){e.call(a,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,a){a?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,a){a=a||!1;for(var i=0;i<e.length;i++)this.addDisplayable(e[i],a)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var a=this._cursor;a<this._displayables.length;a++)e&&e(this._displayables[a]);for(var a=0;a<this._temporaryDisplayables.length;a++)e&&e(this._temporaryDisplayables[a])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var a=this._displayables[e];a.parent=this,a.update(),a.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var a=this._temporaryDisplayables[e];a.parent=this,a.update(),a.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new ge(1/0,1/0,-1/0,-1/0),a=0;a<this._displayables.length;a++){var i=this._displayables[a],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(p5)),e.union(n)}this._rect=e}return this._rect},t.prototype.contain=function(e,a){var i=this.transformCoordToLocal(e,a),n=this.getBoundingRect();if(n.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(e,a))return!0}return!1},t}(hr);const g5=v5;var W_=xe();function so(r,t,e,a,i){var n;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();n=o&&o.animation}var s=t&&t.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,c=void 0,h=void 0;a?(u=le(a.duration,200),c=le(a.easing,"cubicOut"),h=0):(u=t.getShallow(l?"animationDurationUpdate":"animationDuration"),c=t.getShallow(l?"animationEasingUpdate":"animationEasing"),h=t.getShallow(l?"animationDelayUpdate":"animationDelay")),n&&(n.duration!=null&&(u=n.duration),n.easing!=null&&(c=n.easing),n.delay!=null&&(h=n.delay)),te(h)&&(h=h(e,i)),te(u)&&(u=u(e));var f={duration:u||0,delay:h,easing:c};return f}else return null}function sp(r,t,e,a,i,n,o){var s=!1,l;te(i)?(o=n,n=i,i=null):re(i)&&(n=i.cb,o=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var u=r==="leave";u||t.stopAnimation("leave");var c=so(r,a,i,u?l||{}:null,a&&a.getAnimationDelayParams?a.getAnimationDelayParams(t,i):null);if(c&&c.duration>0){var h=c.duration,f=c.delay,d=c.easing,p={duration:h,delay:f||0,easing:d,done:n,force:!!n||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,p):t.animateTo(e,p)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),n&&n()}function Me(r,t,e,a,i,n){sp("update",r,t,e,a,i,n)}function Ze(r,t,e,a,i,n){sp("enter",r,t,e,a,i,n)}function lo(r){if(!r.__zr)return!0;for(var t=0;t<r.animators.length;t++){var e=r.animators[t];if(e.scope==="leave")return!0}return!1}function ei(r,t,e,a,i,n){lo(r)||sp("leave",r,t,e,a,i,n)}function H_(r,t,e,a){r.removeTextContent(),r.removeTextGuideLine(),ei(r,{style:{opacity:0}},t,e,a)}function Bs(r,t,e){function a(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(i){i.isGroup||H_(i,t,e,a)}):H_(r,t,e,a)}function kr(r){W_(r).oldStyle=r.style}function m5(r){return W_(r).oldStyle}var oc=Math.max,sc=Math.min,lp={};function y5(r){return _e.extend(r)}var _5=YR;function b5(r,t){return _5(r,t)}function Nr(r,t){lp[r]=t}function up(r){if(lp.hasOwnProperty(r))return lp[r]}function lc(r,t,e,a){var i=C_(r,t);return e&&(a==="center"&&(e=U_(e,i.getBoundingRect())),Y_(i,e)),i}function $_(r,t,e){var a=new bt({style:{image:r,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(i){if(e==="center"){var n={width:i.width,height:i.height};a.setStyle(U_(t,n))}}});return a}function U_(r,t){var e=t.width/t.height,a=r.height*e,i;a<=r.width?i=r.height:(a=r.width,i=a/e);var n=r.x+r.width/2,o=r.y+r.height/2;return{x:n-a/2,y:o-i/2,width:a,height:i}}var dr=ZR;function Y_(r,t){if(r.applyTransform){var e=r.getBoundingRect(),a=e.calculateTransform(t);r.applyTransform(a)}}function uo(r,t){return F1(r,r,{lineWidth:t}),r}function w5(r){return G1(r.shape,r.shape,r.style),r}var uc=Xi;function rn(r,t){for(var e=du([]);r&&r!==t;)pa(e,r.getLocalTransform(),e),r=r.parent;return e}function Rr(r,t,e){return t&&!Dt(t)&&(t=ma.getLocalTransform(t)),e&&(t=Yn([],t)),yt([],r,t)}function cc(r,t,e){var a=t[4]===0||t[5]===0||t[0]===0?1:Math.abs(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:Math.abs(2*t[4]/t[2]),n=[r==="left"?-a:r==="right"?a:0,r==="top"?-i:r==="bottom"?i:0];return n=Rr(n,t,e),Math.abs(n[0])>Math.abs(n[1])?n[0]>0?"right":"left":n[1]>0?"bottom":"top"}function Z_(r){return!r.isGroup}function x5(r){return r.shape!=null}function Fs(r,t,e){if(!r||!t)return;function a(o){var s={};return o.traverse(function(l){Z_(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return x5(o)&&(s.shape=F({},o.shape)),s}var n=a(r);t.traverse(function(o){if(Z_(o)&&o.anid){var s=n[o.anid];if(s){var l=i(o);o.attr(i(s)),Me(o,l,e,ue(o).dataIndex)}}})}function X_(r,t){return W(r,function(e){var a=e[0];a=oc(a,t.x),a=sc(a,t.x+t.width);var i=e[1];return i=oc(i,t.y),i=sc(i,t.y+t.height),[a,i]})}function S5(r,t){var e=oc(r.x,t.x),a=sc(r.x+r.width,t.x+t.width),i=oc(r.y,t.y),n=sc(r.y+r.height,t.y+t.height);if(a>=e&&n>=i)return{x:e,y:i,width:a-e,height:n-i}}function Gs(r,t,e){var a=F({rectHover:!0},t),i=a.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(i.image=r.slice(8),ie(i,e),new bt(a)):lc(r.replace("path://",""),a,e,"center")}function Ws(r,t,e,a,i){for(var n=0,o=i[i.length-1];n<i.length;n++){var s=i[n];if(j_(r,t,e,a,s[0],s[1],o[0],o[1]))return!0;o=s}}function j_(r,t,e,a,i,n,o,s){var l=e-r,u=a-t,c=o-i,h=s-n,f=cp(c,h,l,u);if(L5(f))return!1;var d=r-i,p=t-n,v=cp(d,p,l,u)/f;if(v<0||v>1)return!1;var g=cp(d,p,c,h)/f;return!(g<0||g>1)}function cp(r,t,e,a){return r*a-e*t}function L5(r){return r<=1e-6&&r>=-1e-6}function an(r){var t=r.itemTooltipOption,e=r.componentModel,a=r.itemName,i=X(t)?{formatter:t}:t,n=e.mainType,o=e.componentIndex,s={componentType:n,name:a,$vars:["name"]};s[n+"Index"]=o;var l=r.formatterParamsExtra;l&&M(we(l),function(c){K(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=ue(r.el);u.componentMainType=n,u.componentIndex=o,u.tooltipConfig={name:a,option:ie({content:a,encodeHTMLContent:!0,formatterParams:s},i)}}function q_(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function ti(r,t){if(r)if(G(r))for(var e=0;e<r.length;e++)q_(r[e],t);else q_(r,t)}Nr("circle",Qa),Nr("ellipse",ap),Nr("sector",Yt),Nr("ring",tc),Nr("polygon",Zt),Nr("polyline",Xt),Nr("rect",Te),Nr("line",mt),Nr("bezierCurve",rc),Nr("arc",np);const nn=Object.freeze(Object.defineProperty({__proto__:null,Arc:np,BezierCurve:rc,BoundingRect:ge,Circle:Qa,CompoundPath:op,Ellipse:ap,Group:oe,Image:bt,IncrementalDisplayable:g5,Line:mt,LinearGradient:zs,OrientedBoundingRect:nc,Path:_e,Point:ve,Polygon:Zt,Polyline:Xt,RadialGradient:G_,Rect:Te,Ring:tc,Sector:Yt,Text:Ae,applyTransform:Rr,clipPointsByRect:X_,clipRectByRect:S5,createIcon:Gs,extendPath:b5,extendShape:y5,getShapeClass:up,getTransform:rn,groupTransition:Fs,initProps:Ze,isElementRemoved:lo,lineLineIntersect:j_,linePolygonIntersect:Ws,makeImage:$_,makePath:lc,mergePath:dr,registerShape:Nr,removeElement:ei,removeElementWithFadeOut:Bs,resizePath:Y_,setTooltipConfig:an,subPixelOptimize:uc,subPixelOptimizeLine:uo,subPixelOptimizeRect:w5,transformDirection:cc,traverseElements:ti,updateProps:Me},Symbol.toStringTag,{value:"Module"}));var hc={};function K_(r,t){for(var e=0;e<Bt.length;e++){var a=Bt[e],i=t[a],n=r.ensureState(a);n.style=n.style||{},n.style.text=i}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:t.normal}),r.useStates(o,!0)}function hp(r,t,e){var a=r.labelFetcher,i=r.labelDataIndex,n=r.labelDimIndex,o=t.normal,s;a&&(s=a.getFormattedLabel(i,"normal",null,n,o&&o.get("formatter"),e!=null?{interpolatedValue:e}:null)),s==null&&(s=te(r.defaultText)?r.defaultText(i,r,e):r.defaultText);for(var l={normal:s},u=0;u<Bt.length;u++){var c=Bt[u],h=t[c];l[c]=le(a?a.getFormattedLabel(i,c,null,n,h&&h.get("formatter")):null,s)}return l}function xt(r,t,e,a){e=e||hc;for(var i=r instanceof Ae,n=!1,o=0;o<Ps.length;o++){var s=t[Ps[o]];if(s&&s.getShallow("show")){n=!0;break}}var l=i?r:r.getTextContent();if(n){i||(l||(l=new Ae,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=hp(e,t),c=t.normal,h=!!c.getShallow("show"),f=Fe(c,a&&a.normal,e,!1,!i);f.text=u.normal,i||r.setTextConfig(fc(c,e,!1));for(var o=0;o<Bt.length;o++){var d=Bt[o],s=t[d];if(s){var p=l.ensureState(d),v=!!le(s.getShallow("show"),h);if(v!==h&&(p.ignore=!v),p.style=Fe(s,a&&a[d],e,!0,!i),p.style.text=u[d],!i){var g=r.ensureState(d);g.textConfig=fc(s,e,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(f.x=l.style.x),l.style.y!=null&&(f.y=l.style.y),l.ignore=!h,l.useStyle(f),l.dirty(),e.enableTextSetter&&(co(l).setLabelText=function(m){var y=hp(e,t,m);K_(l,y)})}else l&&(l.ignore=!0);r.dirty()}function ft(r,t){t=t||"label";for(var e={normal:r.getModel(t)},a=0;a<Bt.length;a++){var i=Bt[a];e[i]=r.getModel([i,t])}return e}function Fe(r,t,e,a,i){var n={};return T5(n,r,e,a,i),t&&F(n,t),n}function fc(r,t,e){t=t||{};var a={},i,n=r.getShallow("rotate"),o=le(r.getShallow("distance"),e?null:5),s=r.getShallow("offset");return i=r.getShallow("position")||(e?null:"inside"),i==="outside"&&(i=t.defaultOutsidePosition||"top"),i!=null&&(a.position=i),s!=null&&(a.offset=s),n!=null&&(n*=Math.PI/180,a.rotation=n),o!=null&&(a.distance=o),a.outsideFill=r.get("color")==="inherit"?t.inheritColor||null:"auto",a}function T5(r,t,e,a,i){e=e||hc;var n=t.ecModel,o=n&&n.option.textStyle,s=C5(t),l;if(s){l={};for(var u in s)if(s.hasOwnProperty(u)){var c=t.getModel(["rich",u]);tb(l[u]={},c,o,e,a,i,!1,!0)}}l&&(r.rich=l);var h=t.get("overflow");h&&(r.overflow=h);var f=t.get("minMargin");f!=null&&(r.margin=f),tb(r,t,o,e,a,i,!0,!1)}function C5(r){for(var t;r&&r!==r.ecModel;){var e=(r.option||hc).rich;if(e){t=t||{};for(var a=we(e),i=0;i<a.length;i++){var n=a[i];t[n]=1}}r=r.parentModel}return t}var J_=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Q_=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],eb=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function tb(r,t,e,a,i,n,o,s){e=!i&&e||hc;var l=a&&a.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),h=le(t.getShallow("opacity"),e.opacity);(u==="inherit"||u==="auto")&&(process.env.NODE_ENV!=="production"&&u==="auto"&&nt("color: 'auto'","color: 'inherit'"),l?u=l:u=null),(c==="inherit"||c==="auto")&&(process.env.NODE_ENV!=="production"&&c==="auto"&&nt("color: 'auto'","color: 'inherit'"),l?c=l:c=null),n||(u=u||e.color,c=c||e.textBorderColor),u!=null&&(r.fill=u),c!=null&&(r.stroke=c);var f=le(t.getShallow("textBorderWidth"),e.textBorderWidth);f!=null&&(r.lineWidth=f);var d=le(t.getShallow("textBorderType"),e.textBorderType);d!=null&&(r.lineDash=d);var p=le(t.getShallow("textBorderDashOffset"),e.textBorderDashOffset);p!=null&&(r.lineDashOffset=p),!i&&h==null&&!s&&(h=a&&a.defaultOpacity),h!=null&&(r.opacity=h),!i&&!n&&r.fill==null&&a.inheritColor&&(r.fill=a.inheritColor);for(var v=0;v<J_.length;v++){var g=J_[v],m=le(t.getShallow(g),e[g]);m!=null&&(r[g]=m)}for(var v=0;v<Q_.length;v++){var g=Q_[v],m=t.getShallow(g);m!=null&&(r[g]=m)}if(r.verticalAlign==null){var y=t.getShallow("baseline");y!=null&&(r.verticalAlign=y)}if(!o||!a.disableBox){for(var v=0;v<eb.length;v++){var g=eb[v],m=t.getShallow(g);m!=null&&(r[g]=m)}var _=t.getShallow("borderType");_!=null&&(r.borderDash=_),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&l&&(process.env.NODE_ENV!=="production"&&r.backgroundColor==="auto"&&nt("backgroundColor: 'auto'","backgroundColor: 'inherit'"),r.backgroundColor=l),(r.borderColor==="auto"||r.borderColor==="inherit")&&l&&(process.env.NODE_ENV!=="production"&&r.borderColor==="auto"&&nt("borderColor: 'auto'","borderColor: 'inherit'"),r.borderColor=l)}}function fp(r,t){var e=t&&t.getModel("textStyle");return Dr([r.fontStyle||e&&e.getShallow("fontStyle")||"",r.fontWeight||e&&e.getShallow("fontWeight")||"",(r.fontSize||e&&e.getShallow("fontSize")||12)+"px",r.fontFamily||e&&e.getShallow("fontFamily")||"sans-serif"].join(" "))}var co=xe();function rb(r,t,e,a){if(r){var i=co(r);i.prevValue=i.value,i.value=e;var n=t.normal;i.valueAnimation=n.get("valueAnimation"),i.valueAnimation&&(i.precision=n.get("precision"),i.defaultInterpolatedText=a,i.statesModels=t)}}function ab(r,t,e,a,i){var n=co(r);if(!n.valueAnimation||n.prevValue===n.value)return;var o=n.defaultInterpolatedText,s=le(n.interpolatedValue,n.prevValue),l=n.value;function u(c){var h=S1(e,n.precision,s,l,c);n.interpolatedValue=c===1?null:h;var f=hp({labelDataIndex:t,labelFetcher:i,defaultText:o?o(h):h+""},n.statesModels,h);K_(r,f)}r.percent=0,(n.prevValue==null?Ze:Me)(r,{percent:1},a,t,null,u)}var D5=["textStyle","color"],dp=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],pp=new Ae,A5=function(){function r(){}return r.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(D5):null)},r.prototype.getFont=function(){return fp({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},a=0;a<dp.length;a++)e[dp[a]]=this.getShallow(dp[a]);return pp.useStyle(e),pp.update(),pp.getBoundingRect()},r}();const M5=A5;var ib=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],E5=Fi(ib),I5=function(){function r(){}return r.prototype.getLineStyle=function(t){return E5(this,t)},r}(),nb=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],P5=Fi(nb),k5=function(){function r(){}return r.prototype.getItemStyle=function(t,e){return P5(this,t,e)},r}(),on=function(){function r(t,e,a){this.parentModel=e,this.ecModel=a,this.option=t}return r.prototype.init=function(t,e,a){},r.prototype.mergeOption=function(t,e){de(this.option,t,!0)},r.prototype.get=function(t,e){return t==null?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},r.prototype.getShallow=function(t,e){var a=this.option,i=a==null?a:a[t];if(i==null&&!e){var n=this.parentModel;n&&(i=n.getShallow(t))}return i},r.prototype.getModel=function(t,e){var a=t!=null,i=a?this.parsePath(t):null,n=a?this._doGet(i):this.option;return e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new r(n,e,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var t=this.constructor;return new t(ne(this.option))},r.prototype.parsePath=function(t){return typeof t=="string"?t.split("."):t},r.prototype.resolveParentPath=function(t){return t},r.prototype.isAnimationEnabled=function(){if(!Le.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(t,e){var a=this.option;if(!t)return a;for(var i=0;i<t.length&&!(t[i]&&(a=a&&typeof a=="object"?a[t[i]]:null,a==null));i++);return a==null&&e&&(a=e._doGet(this.resolveParentPath(t),e.parentModel)),a},r}();Td(on),kN(on),at(on,I5),at(on,k5),at(on,zN),at(on,M5);const Ge=on;var N5=Math.round(Math.random()*10);function ho(r){return[r||"",N5++].join("_")}function R5(r){var t={};r.registerSubTypeDefaulter=function(e,a){var i=Xr(e);t[i.main]=a},r.determineSubType=function(e,a){var i=a.type;if(!i){var n=Xr(e).main;r.hasSubTypes(e)&&t[n]&&(i=t[n](a))}return i}}function V5(r,t){r.topologicalTravel=function(n,o,s,l){if(!n.length)return;var u=e(o),c=u.graph,h=u.noEntryList,f={};for(M(n,function(y){f[y]=!0});h.length;){var d=h.pop(),p=c[d],v=!!f[d];v&&(s.call(l,d,p.originalDeps.slice()),delete f[d]),M(p.successor,v?m:g)}M(f,function(){var y="";throw process.env.NODE_ENV!=="production"&&(y=Ot("Circular dependency may exists: ",f,n,o)),new Error(y)});function g(y){c[y].entryCount--,c[y].entryCount===0&&h.push(y)}function m(y){f[y]=!0,g(y)}};function e(n){var o={},s=[];return M(n,function(l){var u=a(o,l),c=u.originalDeps=t(l),h=i(c,n);u.entryCount=h.length,u.entryCount===0&&s.push(l),M(h,function(f){me(u.predecessor,f)<0&&u.predecessor.push(f);var d=a(o,f);me(d.successor,f)<0&&d.successor.push(l)})}),{graph:o,noEntryList:s}}function a(n,o){return n[o]||(n[o]={predecessor:[],successor:[]}),n[o]}function i(n,o){var s=[];return M(n,function(l){me(o,l)>=0&&s.push(l)}),s}}function ri(r,t){return de(de({},r,!0),t,!0)}const O5={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},z5={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var dc="ZH",vp="EN",fo=vp,pc={},gp={},ob=Le.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||fo).toUpperCase();return r.indexOf(dc)>-1?dc:fo}():fo;function sb(r,t){r=r.toUpperCase(),gp[r]=new Ge(t),pc[r]=t}function B5(r){if(X(r)){var t=pc[r.toUpperCase()]||{};return r===dc||r===vp?ne(t):de(ne(t),ne(pc[fo]),!1)}else return de(ne(r),ne(pc[fo]),!1)}function mp(r){return gp[r]}function F5(){return gp[fo]}sb(vp,O5),sb(dc,z5);var yp=1e3,_p=yp*60,Hs=_p*60,pr=Hs*24,lb=pr*365,$s={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},vc="{yyyy}-{MM}-{dd}",ub={year:"{yyyy}",month:"{yyyy}-{MM}",day:vc,hour:vc+" "+$s.hour,minute:vc+" "+$s.minute,second:vc+" "+$s.second,millisecond:$s.none},bp=["year","month","day","hour","minute","second","millisecond"],cb=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function ai(r,t){return r+="","0000".substr(0,t-r.length)+r}function po(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function G5(r){return r===po(r)}function W5(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function gc(r,t,e,a){var i=Zr(r),n=i[wp(e)](),o=i[vo(e)]()+1,s=Math.floor((o-1)/3)+1,l=i[mc(e)](),u=i["get"+(e?"UTC":"")+"Day"](),c=i[Us(e)](),h=(c-1)%12+1,f=i[yc(e)](),d=i[_c(e)](),p=i[bc(e)](),v=c>=12?"pm":"am",g=v.toUpperCase(),m=a instanceof Ge?a:mp(a||ob)||F5(),y=m.getModel("time"),_=y.get("month"),w=y.get("monthAbbr"),x=y.get("dayOfWeek"),S=y.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,v+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,n+"").replace(/{yy}/g,ai(n%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,w[o-1]).replace(/{MM}/g,ai(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,ai(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,ai(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,ai(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,ai(f,2)).replace(/{m}/g,f+"").replace(/{ss}/g,ai(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,ai(p,3)).replace(/{S}/g,p+"")}function H5(r,t,e,a,i){var n=null;if(X(e))n=e;else if(te(e))n=e(r.value,t,{level:r.level});else{var o=F({},$s);if(r.level>0)for(var s=0;s<bp.length;++s)o[bp[s]]="{primary|"+o[bp[s]]+"}";var l=e?e.inherit===!1?e:ie(e,o):o,u=hb(r.value,i);if(l[u])n=l[u];else if(l.inherit){for(var c=cb.indexOf(u),s=c-1;s>=0;--s)if(l[u]){n=l[u];break}n=n||o.none}if(G(n)){var h=r.level==null?0:r.level>=0?r.level:n.length+r.level;h=Math.min(h,n.length-1),n=n[h]}}return gc(new Date(r.value),n,i,a)}function hb(r,t){var e=Zr(r),a=e[vo(t)]()+1,i=e[mc(t)](),n=e[Us(t)](),o=e[yc(t)](),s=e[_c(t)](),l=e[bc(t)](),u=l===0,c=u&&s===0,h=c&&o===0,f=h&&n===0,d=f&&i===1,p=d&&a===1;return p?"year":d?"month":f?"day":h?"hour":c?"minute":u?"second":"millisecond"}function fb(r,t,e){var a=De(r)?Zr(r):r;switch(t=t||hb(r,e),t){case"year":return a[wp(e)]();case"half-year":return a[vo(e)]()>=6?1:0;case"quarter":return Math.floor((a[vo(e)]()+1)/4);case"month":return a[vo(e)]();case"day":return a[mc(e)]();case"half-day":return a[Us(e)]()/24;case"hour":return a[Us(e)]();case"minute":return a[yc(e)]();case"second":return a[_c(e)]();case"millisecond":return a[bc(e)]()}}function wp(r){return r?"getUTCFullYear":"getFullYear"}function vo(r){return r?"getUTCMonth":"getMonth"}function mc(r){return r?"getUTCDate":"getDate"}function Us(r){return r?"getUTCHours":"getHours"}function yc(r){return r?"getUTCMinutes":"getMinutes"}function _c(r){return r?"getUTCSeconds":"getSeconds"}function bc(r){return r?"getUTCMilliseconds":"getMilliseconds"}function $5(r){return r?"setUTCFullYear":"setFullYear"}function db(r){return r?"setUTCMonth":"setMonth"}function pb(r){return r?"setUTCDate":"setDate"}function vb(r){return r?"setUTCHours":"setHours"}function gb(r){return r?"setUTCMinutes":"setMinutes"}function mb(r){return r?"setUTCSeconds":"setSeconds"}function yb(r){return r?"setUTCMilliseconds":"setMilliseconds"}function _b(r){if(!wd(r))return X(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function bb(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,a){return a.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var go=wf;function xp(r,t,e){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&Dr(c)?c:"-"}function n(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?Zr(r):r;if(isNaN(+l)){if(s)return"-"}else return gc(l,a,e)}if(t==="ordinal")return ou(r)?i(r):De(r)&&n(r)?r+"":"-";var u=ya(r);return n(u)?_b(u):ou(r)?i(r):typeof r=="boolean"?r+"":"-"}var wb=["a","b","c","d","e","f","g"],Sp=function(r,t){return"{"+r+(t??"")+"}"};function xb(r,t,e){G(t)||(t=[t]);var a=t.length;if(!a)return"";for(var i=t[0].$vars||[],n=0;n<i.length;n++){var o=wb[n];r=r.replace(Sp(o),Sp(o,0))}for(var s=0;s<a;s++)for(var l=0;l<i.length;l++){var u=t[s][i[l]];r=r.replace(Sp(wb[l],s),e?At(u):u)}return r}function U5(r,t,e){return M(t,function(a,i){r=r.replace("{"+i+"}",e?At(a):a)}),r}function Y5(r,t){var e=X(r)?{color:r,extraCssText:t}:r||{},a=e.color,i=e.type;t=e.extraCssText;var n=e.renderMode||"html";if(!a)return"";if(n==="html")return i==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+At(a)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+At(a)+";"+(t||"")+'"></span>';var o=e.markerId||"markerX";return{renderMode:n,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}}function sn(r,t){return t=t||"transparent",X(r)?r:re(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function wc(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var xc=M,Sb=["left","right","top","bottom","width","height"],ln=[["width","left","right"],["height","top","bottom"]];function Lp(r,t,e,a,i){var n=0,o=0;a==null&&(a=1/0),i==null&&(i=1/0);var s=0;t.eachChild(function(l,u){var c=l.getBoundingRect(),h=t.childAt(u+1),f=h&&h.getBoundingRect(),d,p;if(r==="horizontal"){var v=c.width+(f?-f.x+c.x:0);d=n+v,d>a||l.newline?(n=0,d=v,o+=s+e,s=c.height):s=Math.max(s,c.height)}else{var g=c.height+(f?-f.y+c.y:0);p=o+g,p>i||l.newline?(n+=s+e,o=0,p=g,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=n,l.y=o,l.markRedraw(),r==="horizontal"?n=d+e:o=p+e)})}var un=Lp;fe(Lp,"vertical"),fe(Lp,"horizontal");function Z5(r,t,e){var a=t.width,i=t.height,n=Z(r.left,a),o=Z(r.top,i),s=Z(r.right,a),l=Z(r.bottom,i);return(isNaN(n)||isNaN(parseFloat(r.left)))&&(n=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=a),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=i),e=go(e||0),{width:Math.max(s-n-e[1]-e[3],0),height:Math.max(l-o-e[0]-e[2],0)}}function ct(r,t,e){e=go(e||0);var a=t.width,i=t.height,n=Z(r.left,a),o=Z(r.top,i),s=Z(r.right,a),l=Z(r.bottom,i),u=Z(r.width,a),c=Z(r.height,i),h=e[2]+e[0],f=e[1]+e[3],d=r.aspect;switch(isNaN(u)&&(u=a-s-f-n),isNaN(c)&&(c=i-l-h-o),d!=null&&(isNaN(u)&&isNaN(c)&&(d>a/i?u=a*.8:c=i*.8),isNaN(u)&&(u=d*c),isNaN(c)&&(c=u/d)),isNaN(n)&&(n=a-s-u-f),isNaN(o)&&(o=i-l-c-h),r.left||r.right){case"center":n=a/2-u/2-e[3];break;case"right":n=a-u-f;break}switch(r.top||r.bottom){case"middle":case"center":o=i/2-c/2-e[0];break;case"bottom":o=i-c-h;break}n=n||0,o=o||0,isNaN(u)&&(u=a-f-n-(s||0)),isNaN(c)&&(c=i-h-o-(l||0));var p=new ge(n+e[3],o+e[0],u,c);return p.margin=e,p}function Sc(r,t,e,a,i,n){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],l=i&&i.boundingMode||"all";if(n=n||r,n.x=r.x,n.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new ge(0,0,+t.width||0,+t.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var c=r.getLocalTransform();u=u.clone(),u.applyTransform(c)}var h=ct(ie({width:u.width,height:u.height},t),e,a),f=o?h.x-u.x:0,d=s?h.y-u.y:0;return l==="raw"?(n.x=f,n.y=d):(n.x+=f,n.y+=d),n===r&&r.markRedraw(),!0}function X5(r,t){return r[ln[t][0]]!=null||r[ln[t][1]]!=null&&r[ln[t][2]]!=null}function Ys(r){var t=r.layoutMode||r.constructor.layoutMode;return re(t)?t:t?{type:t}:null}function ii(r,t,e){var a=e&&e.ignoreSize;!G(a)&&(a=[a,a]);var i=o(ln[0],0),n=o(ln[1],1);u(ln[0],r,i),u(ln[1],r,n);function o(c,h){var f={},d=0,p={},v=0,g=2;if(xc(c,function(_){p[_]=r[_]}),xc(c,function(_){s(t,_)&&(f[_]=p[_]=t[_]),l(f,_)&&d++,l(p,_)&&v++}),a[h])return l(t,c[1])?p[c[2]]=null:l(t,c[2])&&(p[c[1]]=null),p;if(v===g||!d)return p;if(d>=g)return f;for(var m=0;m<c.length;m++){var y=c[m];if(!s(f,y)&&s(r,y)){f[y]=r[y];break}}return f}function s(c,h){return c.hasOwnProperty(h)}function l(c,h){return c[h]!=null&&c[h]!=="auto"}function u(c,h,f){xc(c,function(d){h[d]=f[d]})}}function mo(r){return Lb({},r)}function Lb(r,t){return t&&r&&xc(Sb,function(e){t.hasOwnProperty(e)&&(r[e]=t[e])}),r}var j5=xe(),yo=function(r){z(t,r);function t(e,a,i){var n=r.call(this,e,a,i)||this;return n.uid=ho("ec_cpt_model"),n}return t.prototype.init=function(e,a,i){this.mergeDefaultAndTheme(e,i)},t.prototype.mergeDefaultAndTheme=function(e,a){var i=Ys(this),n=i?mo(e):{},o=a.getTheme();de(e,o.get(this.mainType)),de(e,this.getDefaultOption()),i&&ii(e,n,i)},t.prototype.mergeOption=function(e,a){de(this.option,e,!0);var i=Ys(this);i&&ii(this.option,e,i)},t.prototype.optionUpdated=function(e,a){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!EN(e))return e.defaultOption;var a=j5(this);if(!a.defaultOption){for(var i=[],n=e;n;){var o=n.prototype.defaultOption;o&&i.push(o),n=n.superClass}for(var s={},l=i.length-1;l>=0;l--)s=de(s,i[l],!0);a.defaultOption=s}return a.defaultOption},t.prototype.getReferringComponents=function(e,a){var i=e+"Index",n=e+"Id";return Ds(this.ecModel,e,{index:this.get(i,!0),id:this.get(n,!0)},a)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(Ge);T1(yo,Ge),Bu(yo),R5(yo),V5(yo,q5);function q5(r){var t=[];return M(yo.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=W(t,function(e){return Xr(e).main}),r!=="dataset"&&me(t,"dataset")<=0&&t.unshift("dataset"),t}const Se=yo;var Tb="";typeof navigator<"u"&&(Tb=navigator.platform||"");var _o="rgba(0, 0, 0, 0.2)";const K5={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:_o,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:_o,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:_o,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:_o,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:_o,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:_o,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Tb.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var Tp=Q(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),vr="original",Et="arrayRows",gr="objectRows",ea="keyedColumns",La="typedArray",Cb="unknown",ta="column",bo="row",St={Must:1,Might:2,Not:3},Db=xe();function J5(r){Db(r).datasetMap=Q()}function Ab(r,t,e){var a={},i=Dp(t);if(!i||!r)return a;var n=[],o=[],s=t.ecModel,l=Db(s).datasetMap,u=i.uid+"_"+e.seriesLayoutBy,c,h;r=r.slice(),M(r,function(v,g){var m=re(v)?v:r[g]={name:v};m.type==="ordinal"&&c==null&&(c=g,h=p(m)),a[m.name]=[]});var f=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});M(r,function(v,g){var m=v.name,y=p(v);if(c==null){var _=f.valueWayDim;d(a[m],_,y),d(o,_,y),f.valueWayDim+=y}else if(c===g)d(a[m],0,y),d(n,0,y);else{var _=f.categoryWayDim;d(a[m],_,y),d(o,_,y),f.categoryWayDim+=y}});function d(v,g,m){for(var y=0;y<m;y++)v.push(g+y)}function p(v){var g=v.dimsDef;return g?g.length:1}return n.length&&(a.itemName=n),o.length&&(a.seriesName=o),a}function Cp(r,t,e){var a={},i=Dp(r);if(!i)return a;var n=t.sourceFormat,o=t.dimensionsDefine,s;(n===gr||n===ea)&&M(o,function(c,h){(re(c)?c.name:c)==="name"&&(s=h)});var l=function(){for(var c={},h={},f=[],d=0,p=Math.min(5,e);d<p;d++){var v=Eb(t.data,n,t.seriesLayoutBy,o,t.startIndex,d);f.push(v);var g=v===St.Not;if(g&&c.v==null&&d!==s&&(c.v=d),(c.n==null||c.n===c.v||!g&&f[c.n]===St.Not)&&(c.n=d),m(c)&&f[c.n]!==St.Not)return c;g||(v===St.Might&&h.v==null&&d!==s&&(h.v=d),(h.n==null||h.n===h.v)&&(h.n=d))}function m(y){return y.v!=null&&y.n!=null}return m(c)?c:m(h)?h:null}();if(l){a.value=[l.v];var u=s??l.n;a.itemName=[u],a.seriesName=[u]}return a}function Dp(r){var t=r.get("data",!0);if(!t)return Ds(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},ot).models[0]}function Q5(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:Ds(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},ot).models}function Mb(r,t){return Eb(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,t)}function Eb(r,t,e,a,i,n){var o,s=5;if(Rt(r))return St.Not;var l,u;if(a){var c=a[n];re(c)?(l=c.name,u=c.type):X(c)&&(l=c)}if(u!=null)return u==="ordinal"?St.Must:St.Not;if(t===Et){var h=r;if(e===bo){for(var f=h[n],d=0;d<(f||[]).length&&d<s;d++)if((o=w(f[i+d]))!=null)return o}else for(var d=0;d<h.length&&d<s;d++){var p=h[i+d];if(p&&(o=w(p[n]))!=null)return o}}else if(t===gr){var v=r;if(!l)return St.Not;for(var d=0;d<v.length&&d<s;d++){var g=v[d];if(g&&(o=w(g[l]))!=null)return o}}else if(t===ea){var m=r;if(!l)return St.Not;var f=m[l];if(!f||Rt(f))return St.Not;for(var d=0;d<f.length&&d<s;d++)if((o=w(f[d]))!=null)return o}else if(t===vr)for(var y=r,d=0;d<y.length&&d<s;d++){var g=y[d],_=eo(g);if(!G(_))return St.Not;if((o=w(_[n]))!=null)return o}function w(x){var S=X(x);if(x!=null&&Number.isFinite(Number(x))&&x!=="")return S?St.Might:St.Not;if(S&&x!=="-")return St.Must}return St.Not}var Ap=Q();function eV(r,t){ae(Ap.get(r)==null&&t),Ap.set(r,t)}function tV(r,t,e){var a=Ap.get(t);if(!a)return e;var i=a(r);if(!i)return e;if(process.env.NODE_ENV!=="production")for(var n=0;n<i.length;n++)ae(to(i[n]));return e.concat(i)}var Ib=xe(),rV=xe(),Mp=function(){function r(){}return r.prototype.getColorFromPalette=function(t,e,a){var i=Ve(this.get("color",!0)),n=this.get("colorLayer",!0);return Pb(this,Ib,i,n,t,e,a)},r.prototype.clearColorPalette=function(){iV(this,Ib)},r}();function Ep(r,t,e,a){var i=Ve(r.get(["aria","decal","decals"]));return Pb(r,rV,i,null,t,e,a)}function aV(r,t){for(var e=r.length,a=0;a<e;a++)if(r[a].length>t)return r[a];return r[e-1]}function Pb(r,t,e,a,i,n,o){n=n||r;var s=t(n),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!a?e:aV(a,o);if(c=c||e,!(!c||!c.length)){var h=c[l];return i&&(u[i]=h),s.paletteIdx=(l+1)%c.length,h}}function iV(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var Lc,Zs,kb,Ip="\0_ec_inner",Nb=1,nV={grid:"GridComponent",polar:"PolarComponent",geo:"GeoComponent",singleAxis:"SingleAxisComponent",parallel:"ParallelComponent",calendar:"CalendarComponent",graphic:"GraphicComponent",toolbox:"ToolboxComponent",tooltip:"TooltipComponent",axisPointer:"AxisPointerComponent",brush:"BrushComponent",title:"TitleComponent",timeline:"TimelineComponent",markPoint:"MarkPointComponent",markLine:"MarkLineComponent",markArea:"MarkAreaComponent",legend:"LegendComponent",dataZoom:"DataZoomComponent",visualMap:"VisualMapComponent",xAxis:"GridComponent",yAxis:"GridComponent",angleAxis:"PolarComponent",radiusAxis:"PolarComponent"},oV={line:"LineChart",bar:"BarChart",pie:"PieChart",scatter:"ScatterChart",radar:"RadarChart",map:"MapChart",tree:"TreeChart",treemap:"TreemapChart",graph:"GraphChart",gauge:"GaugeChart",funnel:"FunnelChart",parallel:"ParallelChart",sankey:"SankeyChart",boxplot:"BoxplotChart",candlestick:"CandlestickChart",effectScatter:"EffectScatterChart",lines:"LinesChart",heatmap:"HeatmapChart",pictorialBar:"PictorialBarChart",themeRiver:"ThemeRiverChart",sunburst:"SunburstChart",custom:"CustomChart"},Tc={};function sV(r){M(r,function(t,e){if(!Se.hasClass(e)){var a=nV[e];a&&!Tc[a]&&(_t("Component "+e+` is used but not imported.
233
+ import { `+a+` } from 'echarts/components';
234
+ echarts.use([`+a+"]);"),Tc[a]=!0)}})}var Rb=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,a,i,n,o,s){n=n||{},this.option=null,this._theme=new Ge(n),this._locale=new Ge(o),this._optionManager=s},t.prototype.setOption=function(e,a,i){process.env.NODE_ENV!=="production"&&(ae(e!=null,"option is null/undefined"),ae(e[Ip]!==Nb,"please use chart.getOption()"));var n=zb(a);this._optionManager.setOption(e,i,n),this._resetOption(null,n)},t.prototype.resetOption=function(e,a){return this._resetOption(e,zb(a))},t.prototype._resetOption=function(e,a){var i=!1,n=this._optionManager;if(!e||e==="recreate"){var o=n.mountOption(e==="recreate");process.env.NODE_ENV!=="production"&&sV(o),!this.option||e==="recreate"?kb(this,o):(this.restoreData(),this._mergeOption(o,a)),i=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=n.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,a))}if(!e||e==="recreate"||e==="media"){var l=n.getMediaOption(this);l.length&&M(l,function(u){i=!0,this._mergeOption(u,a)},this)}return i},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,a){var i=this.option,n=this._componentsMap,o=this._componentsCount,s=[],l=Q(),u=a&&a.replaceMergeMainTypeMap;J5(this),M(e,function(h,f){h!=null&&(Se.hasClass(f)?f&&(s.push(f),l.set(f,!0)):i[f]=i[f]==null?ne(h):de(i[f],h,!0))}),u&&u.each(function(h,f){Se.hasClass(f)&&!l.get(f)&&(s.push(f),l.set(f,!0))}),Se.topologicalTravel(s,Se.getAllClassMainTypes(),c,this);function c(h){var f=tV(this,h,Ve(e[h])),d=n.get(h),p=d?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",v=y1(d,f,p);wN(v,h,Se),i[h]=null,n.set(h,null),o.set(h,0);var g=[],m=[],y=0,_,w;M(v,function(x,S){var L=x.existing,C=x.newOption;if(!C)L&&(L.mergeOption({},this),L.optionUpdated({},!1));else{var T=h==="series",A=Se.getClass(h,x.keyInfo.subType,!T);if(!A){if(process.env.NODE_ENV!=="production"){var D=x.keyInfo.subType,E=oV[D];Tc[D]||(Tc[D]=!0,_t(E?"Series "+D+` is used but not imported.
235
+ import { `+E+` } from 'echarts/charts';
236
+ echarts.use([`+E+"]);":"Unknown series "+D))}return}if(h==="tooltip"){if(_){process.env.NODE_ENV!=="production"&&(w||(je("Currently only one tooltip component is allowed."),w=!0));return}_=!0}if(L&&L.constructor===A)L.name=x.keyInfo.name,L.mergeOption(C,this),L.optionUpdated(C,!1);else{var I=F({componentIndex:S},x.keyInfo);L=new A(C,this,this,I),F(L,I),x.brandNew&&(L.__requireNewView=!0),L.init(C,this,this),L.optionUpdated(null,!0)}}L?(g.push(L.option),m.push(L),y++):(g.push(void 0),m.push(void 0))},this),i[h]=g,n.set(h,m),o.set(h,y),h==="series"&&Lc(this)}this._seriesIndices||Lc(this)},t.prototype.getOption=function(){var e=ne(this.option);return M(e,function(a,i){if(Se.hasClass(i)){for(var n=Ve(a),o=n.length,s=!1,l=o-1;l>=0;l--)n[l]&&!to(n[l])?s=!0:(n[l]=null,!s&&o--);n.length=o,e[i]=n}}),delete e[Ip],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,a){var i=this._componentsMap.get(e);if(i){var n=i[a||0];if(n)return n;if(a==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},t.prototype.queryComponents=function(e){var a=e.mainType;if(!a)return[];var i=e.index,n=e.id,o=e.name,s=this._componentsMap.get(a);if(!s||!s.length)return[];var l;return i!=null?(l=[],M(Ve(i),function(u){s[u]&&l.push(s[u])})):n!=null?l=Vb("id",n,s):o!=null?l=Vb("name",o,s):l=Ie(s,function(u){return!!u}),Ob(l,e)},t.prototype.findComponents=function(e){var a=e.query,i=e.mainType,n=s(a),o=n?this.queryComponents(n):Ie(this._componentsMap.get(i),function(u){return!!u});return l(Ob(o,e));function s(u){var c=i+"Index",h=i+"Id",f=i+"Name";return u&&(u[c]!=null||u[h]!=null||u[f]!=null)?{mainType:i,index:u[c],id:u[h],name:u[f]}:null}function l(u){return e.filter?Ie(u,e.filter):u}},t.prototype.eachComponent=function(e,a,i){var n=this._componentsMap;if(te(e)){var o=a,s=e;n.each(function(h,f){for(var d=0;h&&d<h.length;d++){var p=h[d];p&&s.call(o,f,p,p.componentIndex)}})}else for(var l=X(e)?n.get(e):re(e)?this.findComponents(e):null,u=0;l&&u<l.length;u++){var c=l[u];c&&a.call(i,c,c.componentIndex)}},t.prototype.getSeriesByName=function(e){var a=ut(e,null);return Ie(this._componentsMap.get("series"),function(i){return!!i&&a!=null&&i.name===a})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return Ie(this._componentsMap.get("series"),function(a){return!!a&&a.subType===e})},t.prototype.getSeries=function(){return Ie(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,a){Zs(this),M(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];e.call(a,n,i)},this)},t.prototype.eachRawSeries=function(e,a){M(this._componentsMap.get("series"),function(i){i&&e.call(a,i,i.componentIndex)})},t.prototype.eachSeriesByType=function(e,a,i){Zs(this),M(this._seriesIndices,function(n){var o=this._componentsMap.get("series")[n];o.subType===e&&a.call(i,o,n)},this)},t.prototype.eachRawSeriesByType=function(e,a,i){return M(this.getSeriesByType(e),a,i)},t.prototype.isSeriesFiltered=function(e){return Zs(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,a){Zs(this);var i=[];M(this._seriesIndices,function(n){var o=this._componentsMap.get("series")[n];e.call(a,o,n)&&i.push(n)},this),this._seriesIndices=i,this._seriesIndicesMap=Q(i)},t.prototype.restoreData=function(e){Lc(this);var a=this._componentsMap,i=[];a.each(function(n,o){Se.hasClass(o)&&i.push(o)}),Se.topologicalTravel(i,Se.getAllClassMainTypes(),function(n){M(a.get(n),function(o){o&&(n!=="series"||!lV(o,e))&&o.restoreData()})})},t.internalField=function(){Lc=function(e){var a=e._seriesIndices=[];M(e._componentsMap.get("series"),function(i){i&&a.push(i.componentIndex)}),e._seriesIndicesMap=Q(a)},Zs=function(e){if(process.env.NODE_ENV!=="production"&&!e._seriesIndices)throw new Error("Option should contains series.")},kb=function(e,a){e.option={},e.option[Ip]=Nb,e._componentsMap=Q({series:[]}),e._componentsCount=Q();var i=a.aria;re(i)&&i.enabled==null&&(i.enabled=!0),uV(a,e._theme.option),de(a,K5,!1),e._mergeOption(a,null)}}(),t}(Ge);function lV(r,t){if(t){var e=t.seriesIndex,a=t.seriesId,i=t.seriesName;return e!=null&&r.componentIndex!==e||a!=null&&r.id!==a||i!=null&&r.name!==i}}function uV(r,t){var e=r.color&&!r.colorLayer;M(t,function(a,i){i==="colorLayer"&&e||Se.hasClass(i)||(typeof a=="object"?r[i]=r[i]?de(r[i],a,!1):ne(a):r[i]==null&&(r[i]=a))})}function Vb(r,t,e){if(G(t)){var a=Q();return M(t,function(n){if(n!=null){var o=ut(n,null);o!=null&&a.set(n,!0)}}),Ie(e,function(n){return n&&a.get(n[r])})}else{var i=ut(t,null);return Ie(e,function(n){return n&&i!=null&&n[r]===i})}}function Ob(r,t){return t.hasOwnProperty("subType")?Ie(r,function(e){return e&&e.subType===t.subType}):r}function zb(r){var t=Q();return r&&M(Ve(r.replaceMerge),function(e){process.env.NODE_ENV!=="production"&&ae(Se.hasClass(e),'"'+e+'" is not valid component main type in "replaceMerge"'),t.set(e,!0)}),{replaceMergeMainTypeMap:t}}at(Rb,Mp);const Bb=Rb;var cV=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],hV=function(){function r(t){M(cV,function(e){this[e]=j(t[e],t)},this)}return r}();const Fb=hV;var Pp={},fV=function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(t,e){var a=[];M(Pp,function(i,n){var o=i.create(t,e);a=a.concat(o||[])}),this._coordinateSystems=a},r.prototype.update=function(t,e){M(this._coordinateSystems,function(a){a.update&&a.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},r.register=function(t,e){Pp[t]=e},r.get=function(t){return Pp[t]},r}();const wo=fV;var dV=/^(min|max)?(.+)$/,pV=function(){function r(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return r.prototype.setOption=function(t,e,a){t&&(M(Ve(t.series),function(o){o&&o.data&&Rt(o.data)&&lu(o.data)}),M(Ve(t.dataset),function(o){o&&o.source&&Rt(o.source)&&lu(o.source)})),t=ne(t);var i=this._optionBackup,n=vV(t,e,!i);this._newBaseOption=n.baseOption,i?(n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},r.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],ne(t?e.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(t){var e,a=this._timelineOptions;if(a.length){var i=t.getComponent("timeline");i&&(e=ne(a[i.getCurrentIndex()]))}return e},r.prototype.getMediaOption=function(t){var e=this._api.getWidth(),a=this._api.getHeight(),i=this._mediaList,n=this._mediaDefault,o=[],s=[];if(!i.length&&!n)return s;for(var l=0,u=i.length;l<u;l++)gV(i[l].query,e,a)&&o.push(l);return!o.length&&n&&(o=[-1]),o.length&&!yV(o,this._currentMediaIndices)&&(s=W(o,function(c){return ne(c===-1?n.option:i[c].option)})),this._currentMediaIndices=o,s},r}();function vV(r,t,e){var a=[],i,n,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,c=!!r.media,h=!!(l||s||o&&o.timeline);o?(n=o,n.timeline||(n.timeline=s)):((h||c)&&(r.options=r.media=null),n=r),c&&(G(u)?M(u,function(d){process.env.NODE_ENV!=="production"&&d&&!d.option&&re(d.query)&&re(d.query.option)&&_t("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"),d&&d.option&&(d.query?a.push(d):i||(i=d))}):process.env.NODE_ENV!=="production"&&_t("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")),f(n),M(l,function(d){return f(d)}),M(a,function(d){return f(d.option)});function f(d){M(t,function(p){p(d,e)})}return{baseOption:n,timelineOptions:l||[],mediaDefault:i,mediaList:a}}function gV(r,t,e){var a={width:t,height:e,aspectratio:t/e},i=!0;return M(r,function(n,o){var s=o.match(dV);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();mV(a[u],n,l)||(i=!1)}}),i}function mV(r,t,e){return e==="min"?r>=t:e==="max"?r<=t:r===t}function yV(r,t){return r.join(",")===t.join(",")}const _V=pV;var mr=M,Xs=re,Gb=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function kp(r){var t=r&&r.itemStyle;if(t)for(var e=0,a=Gb.length;e<a;e++){var i=Gb[e],n=t.normal,o=t.emphasis;n&&n[i]&&(process.env.NODE_ENV!=="production"&&nt("itemStyle.normal."+i,i),r[i]=r[i]||{},r[i].normal?de(r[i].normal,n[i]):r[i].normal=n[i],n[i]=null),o&&o[i]&&(process.env.NODE_ENV!=="production"&&nt("itemStyle.emphasis."+i,"emphasis."+i),r[i]=r[i]||{},r[i].emphasis?de(r[i].emphasis,o[i]):r[i].emphasis=o[i],o[i]=null)}}function It(r,t,e){if(r&&r[t]&&(r[t].normal||r[t].emphasis)){var a=r[t].normal,i=r[t].emphasis;a&&(process.env.NODE_ENV!=="production"&&Ir("'normal' hierarchy in "+t+" has been removed since 4.0. All style properties are configured in "+t+" directly now."),e?(r[t].normal=r[t].emphasis=null,ie(r[t],a)):r[t]=a),i&&(process.env.NODE_ENV!=="production"&&Ir(t+".emphasis has been changed to emphasis."+t+" since 4.0"),r.emphasis=r.emphasis||{},r.emphasis[t]=i,i.focus&&(r.emphasis.focus=i.focus),i.blurScope&&(r.emphasis.blurScope=i.blurScope))}}function js(r){It(r,"itemStyle"),It(r,"lineStyle"),It(r,"areaStyle"),It(r,"label"),It(r,"labelLine"),It(r,"upperLabel"),It(r,"edgeLabel")}function st(r,t){var e=Xs(r)&&r[t],a=Xs(e)&&e.textStyle;if(a){process.env.NODE_ENV!=="production"&&Ir("textStyle hierarchy in "+t+" has been removed since 4.0. All textStyle properties are configured in "+t+" directly now.");for(var i=0,n=m1.length;i<n;i++){var o=m1[i];a.hasOwnProperty(o)&&(e[o]=a[o])}}}function yr(r){r&&(js(r),st(r,"label"),r.emphasis&&st(r.emphasis,"label"))}function bV(r){if(Xs(r)){kp(r),js(r),st(r,"label"),st(r,"upperLabel"),st(r,"edgeLabel"),r.emphasis&&(st(r.emphasis,"label"),st(r.emphasis,"upperLabel"),st(r.emphasis,"edgeLabel"));var t=r.markPoint;t&&(kp(t),yr(t));var e=r.markLine;e&&(kp(e),yr(e));var a=r.markArea;a&&yr(a);var i=r.data;if(r.type==="graph"){i=i||r.nodes;var n=r.links||r.edges;if(n&&!Rt(n))for(var o=0;o<n.length;o++)yr(n[o]);M(r.categories,function(u){js(u)})}if(i&&!Rt(i))for(var o=0;o<i.length;o++)yr(i[o]);if(t=r.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)yr(s[o]);if(e=r.markLine,e&&e.data)for(var l=e.data,o=0;o<l.length;o++)G(l[o])?(yr(l[o][0]),yr(l[o][1])):yr(l[o]);r.type==="gauge"?(st(r,"axisLabel"),st(r,"title"),st(r,"detail")):r.type==="treemap"?(It(r.breadcrumb,"itemStyle"),M(r.levels,function(u){js(u)})):r.type==="tree"&&js(r.leaves)}}function Ta(r){return G(r)?r:r?[r]:[]}function Wb(r){return(G(r)?r[0]:r)||{}}function wV(r,t){mr(Ta(r.series),function(a){Xs(a)&&bV(a)});var e=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&e.push("valueAxis","categoryAxis","logAxis","timeAxis"),mr(e,function(a){mr(Ta(r[a]),function(i){i&&(st(i,"axisLabel"),st(i.axisPointer,"label"))})}),mr(Ta(r.parallel),function(a){var i=a&&a.parallelAxisDefault;st(i,"axisLabel"),st(i&&i.axisPointer,"label")}),mr(Ta(r.calendar),function(a){It(a,"itemStyle"),st(a,"dayLabel"),st(a,"monthLabel"),st(a,"yearLabel")}),mr(Ta(r.radar),function(a){st(a,"name"),a.name&&a.axisName==null&&(a.axisName=a.name,delete a.name,process.env.NODE_ENV!=="production"&&Ir("name property in radar component has been changed to axisName")),a.nameGap!=null&&a.axisNameGap==null&&(a.axisNameGap=a.nameGap,delete a.nameGap,process.env.NODE_ENV!=="production"&&Ir("nameGap property in radar component has been changed to axisNameGap")),process.env.NODE_ENV!=="production"&&mr(a.indicator,function(i){i.text&&nt("text","name","radar.indicator")})}),mr(Ta(r.geo),function(a){Xs(a)&&(yr(a),mr(Ta(a.regions),function(i){yr(i)}))}),mr(Ta(r.timeline),function(a){yr(a),It(a,"label"),It(a,"itemStyle"),It(a,"controlStyle",!0);var i=a.data;G(i)&&M(i,function(n){re(n)&&(It(n,"label"),It(n,"itemStyle"))})}),mr(Ta(r.toolbox),function(a){It(a,"iconStyle"),mr(a.feature,function(i){It(i,"iconStyle")})}),st(Wb(r.axisPointer),"label"),st(Wb(r.tooltip).axisPointer,"label")}function xV(r,t){for(var e=t.split(","),a=r,i=0;i<e.length&&(a=a&&a[e[i]],a!=null);i++);return a}function SV(r,t,e,a){for(var i=t.split(","),n=r,o,s=0;s<i.length-1;s++)o=i[s],n[o]==null&&(n[o]={}),n=n[o];(a||n[i[s]]==null)&&(n[i[s]]=e)}function Hb(r){r&&M(LV,function(t){t[0]in r&&!(t[1]in r)&&(r[t[1]]=r[t[0]])})}var LV=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],TV=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Np=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function qs(r){var t=r&&r.itemStyle;if(t)for(var e=0;e<Np.length;e++){var a=Np[e][1],i=Np[e][0];t[a]!=null&&(t[i]=t[a],process.env.NODE_ENV!=="production"&&nt(a,i))}}function $b(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(process.env.NODE_ENV!=="production"&&nt("label.margin","label.edgeDistance","pie"),r.edgeDistance=r.margin)}function Ub(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay,process.env.NODE_ENV!=="production"&&nt("downplay","blur","sunburst"))}function CV(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(process.env.NODE_ENV!=="production"&&nt("focusNodeAdjacency","emphasis: { focus: 'adjacency'}","graph/sankey"),r.emphasis.focus="adjacency"))}function Yb(r,t){if(r)for(var e=0;e<r.length;e++)t(r[e]),r[e]&&Yb(r[e].children,t)}function Zb(r,t){wV(r,t),r.series=Ve(r.series),M(r.series,function(e){if(re(e)){var a=e.type;if(a==="line")e.clipOverflow!=null&&(e.clip=e.clipOverflow,process.env.NODE_ENV!=="production"&&nt("clipOverflow","clip","line"));else if(a==="pie"||a==="gauge"){e.clockWise!=null&&(e.clockwise=e.clockWise,process.env.NODE_ENV!=="production"&&nt("clockWise","clockwise")),$b(e.label);var i=e.data;if(i&&!Rt(i))for(var n=0;n<i.length;n++)$b(i[n]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(process.env.NODE_ENV!=="production"&&nt("hoverOffset","emphasis.scaleSize"),e.emphasis.scaleSize=e.hoverOffset))}else if(a==="gauge"){var o=xV(e,"pointer.color");o!=null&&SV(e,"itemStyle.color",o)}else if(a==="bar"){qs(e),qs(e.backgroundStyle),qs(e.emphasis);var i=e.data;if(i&&!Rt(i))for(var n=0;n<i.length;n++)typeof i[n]=="object"&&(qs(i[n]),qs(i[n]&&i[n].emphasis))}else if(a==="sunburst"){var s=e.highlightPolicy;s&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=s,process.env.NODE_ENV!=="production"&&nt("highlightPolicy","emphasis.focus","sunburst"))),Ub(e),Yb(e.data,Ub)}else a==="graph"||a==="sankey"?CV(e):a==="map"&&(e.mapType&&!e.map&&(process.env.NODE_ENV!=="production"&&nt("mapType","map","map"),e.map=e.mapType),e.mapLocation&&(process.env.NODE_ENV!=="production"&&Ir("`mapLocation` is not used anymore."),ie(e,e.mapLocation)));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(process.env.NODE_ENV!=="production"&&nt("hoverAnimation","emphasis.scale"),e.emphasis.scale=e.hoverAnimation)),Hb(e)}}),r.dataRange&&(r.visualMap=r.dataRange),M(TV,function(e){var a=r[e];a&&(G(a)||(a=[a]),M(a,function(i){Hb(i)}))})}function DV(r){var t=Q();r.eachSeries(function(e){var a=e.get("stack");if(a){var i=t.get(a)||t.set(a,[]),n=e.getData(),o={stackResultDimension:n.getCalculationInfo("stackResultDimension"),stackedOverDimension:n.getCalculationInfo("stackedOverDimension"),stackedDimension:n.getCalculationInfo("stackedDimension"),stackedByDimension:n.getCalculationInfo("stackedByDimension"),isStackedByIndex:n.getCalculationInfo("isStackedByIndex"),data:n,seriesModel:e};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.length&&n.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),t.each(AV)}function AV(r){M(r,function(t,e){var a=[],i=[NaN,NaN],n=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(n,function(u,c,h){var f=o.get(t.stackedDimension,h);if(isNaN(f))return i;var d,p;s?p=o.getRawIndex(h):d=o.get(t.stackedByDimension,h);for(var v=NaN,g=e-1;g>=0;g--){var m=r[g];if(s||(p=m.data.rawIndexOf(m.stackedByDimension,d)),p>=0){var y=m.data.getByRawIndex(m.stackResultDimension,p);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&f>=0&&y>0||l==="samesign"&&f<=0&&y<0){f=sN(f,y),v=y;break}}}return a[0]=f,a[1]=v,a})})}var Cc=function(){function r(t){this.data=t.data||(t.sourceFormat===ea?{}:[]),this.sourceFormat=t.sourceFormat||Cb,this.seriesLayoutBy=t.seriesLayoutBy||ta,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var a=0;a<e.length;a++){var i=e[a];i.type==null&&Mb(this,a)===St.Must&&(i.type="ordinal")}}return r}();function Rp(r){return r instanceof Cc}function Vp(r,t,e){e=e||Xb(r);var a=t.seriesLayoutBy,i=EV(r,e,a,t.sourceHeader,t.dimensions),n=new Cc({data:r,sourceFormat:e,seriesLayoutBy:a,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:ne(t)});return n}function Op(r){return new Cc({data:r,sourceFormat:Rt(r)?La:vr})}function MV(r){return new Cc({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:ne(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function Xb(r){var t=Cb;if(Rt(r))t=La;else if(G(r)){r.length===0&&(t=Et);for(var e=0,a=r.length;e<a;e++){var i=r[e];if(i!=null){if(G(i)||Rt(i)){t=Et;break}else if(re(i)){t=gr;break}}}}else if(re(r)){for(var n in r)if(K(r,n)&&Dt(r[n])){t=ea;break}}return t}function EV(r,t,e,a,i){var n,o;if(!r)return{dimensionsDefine:jb(i),startIndex:o,dimensionsDetectedCount:n};if(t===Et){var s=r;a==="auto"||a==null?qb(function(u){u!=null&&u!=="-"&&(X(u)?o==null&&(o=1):o=0)},e,s,10):o=De(a)?a:a?1:0,!i&&o===1&&(i=[],qb(function(u,c){i[c]=u!=null?u+"":""},e,s,1/0)),n=i?i.length:e===bo?s.length:s[0]?s[0].length:null}else if(t===gr)i||(i=IV(r));else if(t===ea)i||(i=[],M(r,function(u,c){i.push(c)}));else if(t===vr){var l=eo(r[0]);n=G(l)&&l.length||1}else t===La&&process.env.NODE_ENV!=="production"&&ae(!!i,"dimensions must be given if data is TypedArray.");return{startIndex:o,dimensionsDefine:jb(i),dimensionsDetectedCount:n}}function IV(r){for(var t=0,e;t<r.length&&!(e=r[t++]););if(e)return we(e)}function jb(r){if(r){var t=Q();return W(r,function(e,a){e=re(e)?e:{name:e};var i={name:e.name,displayName:e.displayName,type:e.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var n=t.get(i.name);return n?i.name+="-"+n.count++:t.set(i.name,{count:1}),i})}}function qb(r,t,e,a){if(t===bo)for(var i=0;i<e.length&&i<a;i++)r(e[i]?e[i][0]:null,i);else for(var n=e[0]||[],i=0;i<n.length&&i<a;i++)r(n[i],i)}function Kb(r){var t=r.sourceFormat;return t===gr||t===ea}var cn,hn,fn,Jb,Qb,ew=function(){function r(t,e){var a=Rp(t)?t:Op(t);this._source=a;var i=this._data=a.data;if(a.sourceFormat===La){if(process.env.NODE_ENV!=="production"&&e==null)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=e,this._data=i}Qb(this,i,a)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(t,e){},r.prototype.appendData=function(t){},r.prototype.clean=function(){},r.protoInitialize=function(){var t=r.prototype;t.pure=!1,t.persistent=!0}(),r.internalField=function(){var t;Qb=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,h=l.startIndex,f=l.dimensionsDefine,d=Jb[Bp(u,c)];if(process.env.NODE_ENV!=="production"&&ae(d,"Invalide sourceFormat: "+u),F(o,d),u===La)o.getItem=e,o.count=i,o.fillStorage=a;else{var p=rw(u,c);o.getItem=j(p,null,s,h,f);var v=iw(u,c);o.count=j(v,null,s,h,f)}};var e=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,c=u*o,h=0;h<u;h++)s[h]=l[c+h];return s},a=function(o,s,l,u){for(var c=this._data,h=this._dimSize,f=0;f<h;f++){for(var d=u[f],p=d[0]==null?1/0:d[0],v=d[1]==null?-1/0:d[1],g=s-o,m=l[f],y=0;y<g;y++){var _=c[y*h+f];m[o+y]=_,_<p&&(p=_),_>v&&(v=_)}d[0]=p,d[1]=v}},i=function(){return this._data?this._data.length/this._dimSize:0};Jb=(t={},t[Et+"_"+ta]={pure:!0,appendData:n},t[Et+"_"+bo]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[gr]={pure:!0,appendData:n},t[ea]={pure:!0,appendData:function(o){var s=this._data;M(o,function(l,u){for(var c=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)c.push(l[h])})}},t[vr]={appendData:n},t[La]={persistent:!1,pure:!0,appendData:function(o){process.env.NODE_ENV!=="production"&&ae(Rt(o),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function n(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),r}(),tw=function(r,t,e,a){return r[a]},PV=(cn={},cn[Et+"_"+ta]=function(r,t,e,a){return r[a+t]},cn[Et+"_"+bo]=function(r,t,e,a,i){a+=t;for(var n=i||[],o=r,s=0;s<o.length;s++){var l=o[s];n[s]=l?l[a]:null}return n},cn[gr]=tw,cn[ea]=function(r,t,e,a,i){for(var n=i||[],o=0;o<e.length;o++){var s=e[o].name;if(process.env.NODE_ENV!=="production"&&s==null)throw new Error;var l=r[s];n[o]=l?l[a]:null}return n},cn[vr]=tw,cn);function rw(r,t){var e=PV[Bp(r,t)];return process.env.NODE_ENV!=="production"&&ae(e,'Do not support get item on "'+r+'", "'+t+'".'),e}var aw=function(r,t,e){return r.length},kV=(hn={},hn[Et+"_"+ta]=function(r,t,e){return Math.max(0,r.length-t)},hn[Et+"_"+bo]=function(r,t,e){var a=r[0];return a?Math.max(0,a.length-t):0},hn[gr]=aw,hn[ea]=function(r,t,e){var a=e[0].name;if(process.env.NODE_ENV!=="production"&&a==null)throw new Error;var i=r[a];return i?i.length:0},hn[vr]=aw,hn);function iw(r,t){var e=kV[Bp(r,t)];return process.env.NODE_ENV!=="production"&&ae(e,'Do not support count on "'+r+'", "'+t+'".'),e}var zp=function(r,t,e){return r[t]},NV=(fn={},fn[Et]=zp,fn[gr]=function(r,t,e){return r[e]},fn[ea]=zp,fn[vr]=function(r,t,e){var a=eo(r);return a instanceof Array?a[t]:a},fn[La]=zp,fn);function nw(r){var t=NV[r];return process.env.NODE_ENV!=="production"&&ae(t,'Do not support get value on "'+r+'".'),t}function Bp(r,t){return r===Et?r+"_"+t:r}function xo(r,t,e){if(r){var a=r.getRawDataItem(t);if(a!=null){var i=r.getStore(),n=i.getSource().sourceFormat;if(e!=null){var o=r.getDimensionIndex(e),s=i.getDimensionProperty(o);return nw(n)(a,o,s)}else{var l=a;return n===vr&&(l=eo(a)),l}}}}var RV=/\{@(.+?)\}/g,Dc=function(){function r(){}return r.prototype.getDataParams=function(t,e){var a=this.getData(e),i=this.getRawValue(t,e),n=a.getRawIndex(t),o=a.getName(t),s=a.getRawDataItem(t),l=a.getItemVisual(t,"style"),u=l&&l[a.getItemVisual(t,"drawType")||"fill"],c=l&&l.stroke,h=this.mainType,f=h==="series",d=a.userOutput&&a.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,seriesName:f?this.name:null,name:o,dataIndex:n,data:s,dataType:e,value:i,color:u,borderColor:c,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(t,e,a,i,n,o){e=e||"normal";var s=this.getData(a),l=this.getDataParams(t,a);if(o&&(l.value=o.interpolatedValue),i!=null&&G(l.value)&&(l.value=l.value[i]),!n){var u=s.getItemModel(t);n=u.get(e==="normal"?["label","formatter"]:[e,"label","formatter"])}if(te(n))return l.status=e,l.dimensionIndex=i,n(l);if(X(n)){var c=xb(n,l);return c.replace(RV,function(h,f){var d=f.length,p=f;p.charAt(0)==="["&&p.charAt(d-1)==="]"&&(p=+p.slice(1,d-1),process.env.NODE_ENV!=="production"&&isNaN(p)&&_t("Invalide label formatter: @"+f+", only support @[0], @[1], @[2], ..."));var v=xo(s,t,p);if(o&&G(o.interpolatedValue)){var g=s.getDimensionIndex(p);g>=0&&(v=o.interpolatedValue[g])}return v!=null?v+"":""})}},r.prototype.getRawValue=function(t,e){return xo(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,a){},r}();function ow(r){var t,e;return re(r)?r.type?e=r:process.env.NODE_ENV!=="production"&&console.warn("The return type of `formatTooltip` is not supported: "+Ot(r)):t=r,{text:t,frag:e}}function Ks(r){return new VV(r)}var VV=function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,a=t&&t.skip;if(this._dirty&&e){var i=this.context;i.data=i.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var n;this._plan&&!a&&(n=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(n="reset");function c(y){return!(y>=1)&&(y=1),y}var h;(this._dirty||n==="reset")&&(this._dirty=!1,h=this._doReset(a)),this._modBy=l,this._modDataCount=u;var f=t&&t.step;if(e?(process.env.NODE_ENV!=="production"&&ae(e._outputDueEnd!=null),this._dueEnd=e._outputDueEnd):(process.env.NODE_ENV!=="production"&&ae(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var d=this._dueIndex,p=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!a&&(h||d<p)){var v=this._progress;if(G(v))for(var g=0;g<v.length;g++)this._doProgress(v[g],d,p,l,u);else this._doProgress(v,d,p,l,u)}this._dueIndex=p;var m=this._settedOutputEnd!=null?this._settedOutputEnd:p;process.env.NODE_ENV!=="production"&&ae(m>=this._outputDueEnd),this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(t,e,a,i,n){sw.reset(e,a,i,n),this._callingProgress=t,this._callingProgress({start:e,end:a,count:a-e,next:sw.next},this.context)},r.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var e,a;!t&&this._reset&&(e=this._reset(this.context),e&&e.progress&&(a=e.forceFirstProgress,e=e.progress),G(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),a},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(t){process.env.NODE_ENV!=="production"&&ae(t&&!t._disposed&&t!==this),(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},r}(),sw=function(){var r,t,e,a,i,n={reset:function(l,u,c,h){t=l,r=u,e=c,a=h,i=Math.ceil(a/e),n.next=e>1&&a>0?s:o}};return n;function o(){return t<r?t++:null}function s(){var l=t%i*e+Math.ceil(t/i),u=t>=r?null:l<a?l:t;return t++,u}}();function ni(r,t){var e=t&&t.type;return e==="ordinal"?r:(e==="time"&&!De(r)&&r!=null&&r!=="-"&&(r=+Zr(r)),r==null||r===""?NaN:Number(r))}var OV=Q({number:function(r){return parseFloat(r)},time:function(r){return+Zr(r)},trim:function(r){return X(r)?Dr(r):r}});function lw(r){return OV.get(r)}var uw={lt:function(r,t){return r<t},lte:function(r,t){return r<=t},gt:function(r,t){return r>t},gte:function(r,t){return r>=t}},zV=function(){function r(t,e){if(!De(e)){var a="";process.env.NODE_ENV!=="production"&&(a='rvalue of "<", ">", "<=", ">=" can only be number in filter.'),Pe(a)}this._opFn=uw[t],this._rvalFloat=ya(e)}return r.prototype.evaluate=function(t){return De(t)?this._opFn(t,this._rvalFloat):this._opFn(ya(t),this._rvalFloat)},r}(),cw=function(){function r(t,e){var a=t==="desc";this._resultLT=a?1:-1,e==null&&(e=a?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var a=De(t)?t:ya(t),i=De(e)?e:ya(e),n=isNaN(a),o=isNaN(i);if(n&&(a=this._incomparable),o&&(i=this._incomparable),n&&o){var s=X(t),l=X(e);s&&(a=l?t:0),l&&(i=s?e:0)}return a<i?this._resultLT:a>i?-this._resultLT:0},r}(),BV=function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=ya(e)}return r.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var a=typeof t;a!==this._rvalTypeof&&(a==="number"||this._rvalTypeof==="number")&&(e=ya(t)===this._rvalFloat)}return this._isEQ?e:!e},r}();function FV(r,t){return r==="eq"||r==="ne"?new BV(r==="eq",t):K(uw,r)?new zV(r,t):null}var GV=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return ni(t,e)},r}();function WV(r,t){var e=new GV,a=r.data,i=e.sourceFormat=r.sourceFormat,n=r.startIndex,o="";r.seriesLayoutBy!==ta&&(process.env.NODE_ENV!=="production"&&(o='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),Pe(o));var s=[],l={},u=r.dimensionsDefine;if(u)M(u,function(v,g){var m=v.name,y={index:g,name:m,displayName:v.displayName};if(s.push(y),m!=null){var _="";K(l,m)&&(process.env.NODE_ENV!=="production"&&(_='dimension name "'+m+'" duplicated.'),Pe(_)),l[m]=y}});else for(var c=0;c<r.dimensionsDetectedCount;c++)s.push({index:c});var h=rw(i,ta);t.__isBuiltIn&&(e.getRawDataItem=function(v){return h(a,n,s,v)},e.getRawData=j(HV,null,r)),e.cloneRawData=j($V,null,r);var f=iw(i,ta);e.count=j(f,null,a,n,s);var d=nw(i);e.retrieveValue=function(v,g){var m=h(a,n,s,v);return p(m,g)};var p=e.retrieveValueFromItem=function(v,g){if(v!=null){var m=s[g];if(m)return d(v,g,m.name)}};return e.getDimensionInfo=j(UV,null,s,l),e.cloneAllDimensionInfo=j(YV,null,s),e}function HV(r){var t=r.sourceFormat;if(!Fp(t)){var e="";process.env.NODE_ENV!=="production"&&(e="`getRawData` is not supported in source format "+t),Pe(e)}return r.data}function $V(r){var t=r.sourceFormat,e=r.data;if(!Fp(t)){var a="";process.env.NODE_ENV!=="production"&&(a="`cloneRawData` is not supported in source format "+t),Pe(a)}if(t===Et){for(var i=[],n=0,o=e.length;n<o;n++)i.push(e[n].slice());return i}else if(t===gr){for(var i=[],n=0,o=e.length;n<o;n++)i.push(F({},e[n]));return i}}function UV(r,t,e){if(e!=null){if(De(e)||!isNaN(e)&&!K(t,e))return r[e];if(K(t,e))return t[e]}}function YV(r){return ne(r)}var hw=Q();function ZV(r){r=ne(r);var t=r.type,e="";t||(process.env.NODE_ENV!=="production"&&(e="Must have a `type` when `registerTransform`."),Pe(e));var a=t.split(":");a.length!==2&&(process.env.NODE_ENV!=="production"&&(e='Name must include namespace like "ns:regression".'),Pe(e));var i=!1;a[0]==="echarts"&&(t=a[1],i=!0),r.__isBuiltIn=i,hw.set(t,r)}function XV(r,t,e){var a=Ve(r),i=a.length,n="";i||(process.env.NODE_ENV!=="production"&&(n="If `transform` declared, it should at least contain one transform."),Pe(n));for(var o=0,s=i;o<s;o++){var l=a[o];t=jV(l,t,e,i===1?null:o),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function jV(r,t,e,a){var i="";t.length||(process.env.NODE_ENV!=="production"&&(i="Must have at least one upstream dataset."),Pe(i)),re(r)||(process.env.NODE_ENV!=="production"&&(i="transform declaration must be an object rather than "+typeof r+"."),Pe(i));var n=r.type,o=hw.get(n);o||(process.env.NODE_ENV!=="production"&&(i='Can not find transform on type "'+n+'".'),Pe(i));var s=W(t,function(c){return WV(c,o)}),l=Ve(o.transform({upstream:s[0],upstreamList:s,config:ne(r.config)}));if(process.env.NODE_ENV!=="production"&&r.print){var u=W(l,function(c){var h=a!=null?" === pipe index: "+a:"";return["=== dataset index: "+e.datasetIndex+h+" ===","- transform result data:",Ot(c.data),"- transform result dimensions:",Ot(c.dimensions)].join(`
237
+ `)}).join(`
238
+ `);fN(u)}return W(l,function(c,h){var f="";re(c)||(process.env.NODE_ENV!=="production"&&(f="A transform should not return some empty results."),Pe(f)),c.data||(process.env.NODE_ENV!=="production"&&(f="Transform result data should be not be null or undefined"),Pe(f));var d=Xb(c.data);Fp(d)||(process.env.NODE_ENV!=="production"&&(f="Transform result data should be array rows or object rows."),Pe(f));var p,v=t[0];if(v&&h===0&&!c.dimensions){var g=v.startIndex;g&&(c.data=v.data.slice(0,g).concat(c.data)),p={seriesLayoutBy:ta,sourceHeader:g,dimensions:v.metaRawOption.dimensions}}else p={seriesLayoutBy:ta,sourceHeader:0,dimensions:c.dimensions};return Vp(c.data,p,null)})}function Fp(r){return r===Et||r===gr}var Ac="undefined",qV=typeof Uint32Array===Ac?Array:Uint32Array,KV=typeof Uint16Array===Ac?Array:Uint16Array,fw=typeof Int32Array===Ac?Array:Int32Array,dw=typeof Float64Array===Ac?Array:Float64Array,pw={float:dw,int:fw,ordinal:Array,number:Array,time:dw},Gp;function So(r){return r>65535?qV:KV}function Lo(){return[1/0,-1/0]}function JV(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function vw(r,t,e,a,i){var n=pw[e||"float"];if(i){var o=r[t],s=o&&o.length;if(s!==a){for(var l=new n(a),u=0;u<s;u++)l[u]=o[u];r[t]=l}}else r[t]=new n(a)}var Wp=function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Q()}return r.prototype.initData=function(t,e,a){process.env.NODE_ENV!=="production"&&ae(te(t.getItem)&&te(t.count),"Invalid data provider."),this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=t.getSource(),n=this.defaultDimValueGetter=Gp[i.sourceFormat];this._dimValueGetter=a||n,this._rawExtent=[];var o=Kb(i);this._dimensions=W(e,function(s){return process.env.NODE_ENV!=="production"&&o&&ae(s.property!=null),{type:s.type,property:s.property}}),this._initDataFromProvider(0,t.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(t,e){var a=this._calcDimNameToIdx,i=this._dimensions,n=a.get(t);if(n!=null){if(i[n].type===e)return n}else n=i.length;return i[n]={type:e},a.set(t,n),this._chunks[n]=new pw[e||"float"](this._rawCount),this._rawExtent[n]=Lo(),n},r.prototype.collectOrdinalMeta=function(t,e){var a=this._chunks[t],i=this._dimensions[t],n=this._rawExtent,o=i.ordinalOffset||0,s=a.length;o===0&&(n[t]=Lo());for(var l=n[t],u=o;u<s;u++){var c=a[u]=e.parseAndCollect(a[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}i.ordinalMeta=e,i.ordinalOffset=s,i.type="ordinal"},r.prototype.getOrdinalMeta=function(t){var e=this._dimensions[t],a=e.ordinalMeta;return a},r.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},r.prototype.appendData=function(t){process.env.NODE_ENV!=="production"&&ae(!this._indices,"appendData can only be called on raw data.");var e=this._provider,a=this.count();e.appendData(t);var i=e.count();return e.persistent||(i+=a),a<i&&this._initDataFromProvider(a,i,!0),[a,i]},r.prototype.appendValues=function(t,e){for(var a=this._chunks,i=this._dimensions,n=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e||0),u=0;u<n;u++){var c=i[u];vw(a,u,c.type,l,!0)}for(var h=[],f=s;f<l;f++)for(var d=f-s,p=0;p<n;p++){var c=i[p],v=Gp.arrayRows.call(this,t[d]||h,c.property,d,p);a[p][f]=v;var g=o[p];v<g[0]&&(g[0]=v),v>g[1]&&(g[1]=v)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,a){for(var i=this._provider,n=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=W(o,function(y){return y.property}),c=0;c<s;c++){var h=o[c];l[c]||(l[c]=Lo()),vw(n,c,h.type,e,a)}if(i.fillStorage)i.fillStorage(t,e,n,l);else for(var f=[],d=t;d<e;d++){f=i.getItem(d,f);for(var p=0;p<s;p++){var v=n[p],g=this._dimValueGetter(f,u[p],d,p);v[d]=g;var m=l[p];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var a=this._chunks[t];return a?a[this.getRawIndex(e)]:NaN},r.prototype.getValues=function(t,e){var a=[],i=[];if(e==null){e=t,t=[];for(var n=0;n<this._dimensions.length;n++)i.push(n)}else i=t;for(var n=0,o=i.length;n<o;n++)a.push(this.get(i[n],e));return a},r.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var a=this._chunks[t];return a?a[e]:NaN},r.prototype.getSum=function(t){var e=this._chunks[t],a=0;if(e)for(var i=0,n=this.count();i<n;i++){var o=this.get(t,i);isNaN(o)||(a+=o)}return a},r.prototype.getMedian=function(t){var e=[];this.each([t],function(n){isNaN(n)||e.push(n)});var a=e.sort(function(n,o){return n-o}),i=this.count();return i===0?0:i%2===1?a[(i-1)/2]:(a[i/2]+a[i/2-1])/2},r.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,a=e[t];if(a!=null&&a<this._count&&a===t)return t;for(var i=0,n=this._count-1;i<=n;){var o=(i+n)/2|0;if(e[o]<t)i=o+1;else if(e[o]>t)n=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(t,e,a){var i=this._chunks,n=i[t],o=[];if(!n)return o;a==null&&(a=1/0);for(var s=1/0,l=-1,u=0,c=0,h=this.count();c<h;c++){var f=this.getRawIndex(c),d=e-n[f],p=Math.abs(d);p<=a&&((p<s||p===s&&d>=0&&l<0)&&(s=p,l=d,u=0),d===l&&(o[u++]=c))}return o.length=u,o},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var a=e.constructor,i=this._count;if(a===Array){t=new a(i);for(var n=0;n<i;n++)t[n]=e[n]}else t=new a(e.buffer,0,i)}else{var a=So(this._rawCount);t=new a(this.count());for(var n=0;n<t.length;n++)t[n]=n}return t},r.prototype.filter=function(t,e){if(!this._count)return this;for(var a=this.clone(),i=a.count(),n=So(a._rawCount),o=new n(i),s=[],l=t.length,u=0,c=t[0],h=a._chunks,f=0;f<i;f++){var d=void 0,p=a.getRawIndex(f);if(l===0)d=e(f);else if(l===1){var v=h[c][p];d=e(v,f)}else{for(var g=0;g<l;g++)s[g]=h[t[g]][p];s[g]=f,d=e.apply(null,s)}d&&(o[u++]=p)}return u<i&&(a._indices=o),a._count=u,a._extent=[],a._updateGetRawIdx(),a},r.prototype.selectRange=function(t){var e=this.clone(),a=e._count;if(!a)return this;var i=we(t),n=i.length;if(!n)return this;var o=e.count(),s=So(e._rawCount),l=new s(o),u=0,c=i[0],h=t[c][0],f=t[c][1],d=e._chunks,p=!1;if(!e._indices){var v=0;if(n===1){for(var g=d[i[0]],m=0;m<a;m++){var y=g[m];(y>=h&&y<=f||isNaN(y))&&(l[u++]=v),v++}p=!0}else if(n===2){for(var g=d[i[0]],_=d[i[1]],w=t[i[1]][0],x=t[i[1]][1],m=0;m<a;m++){var y=g[m],S=_[m];(y>=h&&y<=f||isNaN(y))&&(S>=w&&S<=x||isNaN(S))&&(l[u++]=v),v++}p=!0}}if(!p)if(n===1)for(var m=0;m<o;m++){var L=e.getRawIndex(m),y=d[i[0]][L];(y>=h&&y<=f||isNaN(y))&&(l[u++]=L)}else for(var m=0;m<o;m++){for(var C=!0,L=e.getRawIndex(m),T=0;T<n;T++){var A=i[T],y=d[A][L];(y<t[A][0]||y>t[A][1])&&(C=!1)}C&&(l[u++]=e.getRawIndex(m))}return u<o&&(e._indices=l),e._count=u,e._extent=[],e._updateGetRawIdx(),e},r.prototype.map=function(t,e){var a=this.clone(t);return this._updateDims(a,t,e),a},r.prototype.modify=function(t,e){this._updateDims(this,t,e)},r.prototype._updateDims=function(t,e,a){for(var i=t._chunks,n=[],o=e.length,s=t.count(),l=[],u=t._rawExtent,c=0;c<e.length;c++)u[e[c]]=Lo();for(var h=0;h<s;h++){for(var f=t.getRawIndex(h),d=0;d<o;d++)l[d]=i[e[d]][f];l[o]=h;var p=a&&a.apply(null,l);if(p!=null){typeof p!="object"&&(n[0]=p,p=n);for(var c=0;c<p.length;c++){var v=e[c],g=p[c],m=u[v],y=i[v];y&&(y[f]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var a=this.clone([t],!0),i=a._chunks,n=i[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),c,h,f,d=new(So(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var p=1;p<o-1;p+=l){for(var v=Math.min(p+l,o-1),g=Math.min(p+l*2,o),m=(g+v)/2,y=0,_=v;_<g;_++){var w=this.getRawIndex(_),x=n[w];isNaN(x)||(y+=x)}y/=g-v;var S=p,L=Math.min(p+l,o),C=p-1,T=n[u];c=-1,f=S;for(var A=-1,D=0,_=S;_<L;_++){var w=this.getRawIndex(_),x=n[w];if(isNaN(x)){D++,A<0&&(A=w);continue}h=Math.abs((C-m)*(x-T)-(C-_)*(y-T)),h>c&&(c=h,f=w)}D>0&&D<L-S&&(d[s++]=Math.min(A,f),f=Math.max(A,f)),d[s++]=f,u=f}return d[s++]=this.getRawIndex(o-1),a._count=s,a._indices=d,a.getRawIndex=this._getRawIdx,a},r.prototype.minmaxDownSample=function(t,e){for(var a=this.clone([t],!0),i=a._chunks,n=Math.floor(1/e),o=i[t],s=this.count(),l=new(So(this._rawCount))(Math.ceil(s/n)*2),u=0,c=0;c<s;c+=n){var h=c,f=o[this.getRawIndex(h)],d=c,p=o[this.getRawIndex(d)],v=n;c+n>s&&(v=s-c);for(var g=0;g<v;g++){var m=this.getRawIndex(c+g),y=o[m];y<f&&(f=y,h=c+g),y>p&&(p=y,d=c+g)}var _=this.getRawIndex(h),w=this.getRawIndex(d);h<d?(l[u++]=_,l[u++]=w):(l[u++]=w,l[u++]=_)}return a._count=u,a._indices=l,a._updateGetRawIdx(),a},r.prototype.downSample=function(t,e,a,i){for(var n=this.clone([t],!0),o=n._chunks,s=[],l=Math.floor(1/e),u=o[t],c=this.count(),h=n._rawExtent[t]=Lo(),f=new(So(this._rawCount))(Math.ceil(c/l)),d=0,p=0;p<c;p+=l){l>c-p&&(l=c-p,s.length=l);for(var v=0;v<l;v++){var g=this.getRawIndex(p+v);s[v]=u[g]}var m=a(s),y=this.getRawIndex(Math.min(p+i(s,m)||0,c-1));u[y]=m,m<h[0]&&(h[0]=m),m>h[1]&&(h[1]=m),f[d++]=y}return n._count=d,n._indices=f,n._updateGetRawIdx(),n},r.prototype.each=function(t,e){if(this._count)for(var a=t.length,i=this._chunks,n=0,o=this.count();n<o;n++){var s=this.getRawIndex(n);switch(a){case 0:e(n);break;case 1:e(i[t[0]][s],n);break;case 2:e(i[t[0]][s],i[t[1]][s],n);break;default:for(var l=0,u=[];l<a;l++)u[l]=i[t[l]][s];u[l]=n,e.apply(null,u)}}},r.prototype.getDataExtent=function(t){var e=this._chunks[t],a=Lo();if(!e)return a;var i=this.count(),n=!this._indices,o;if(n)return this._rawExtent[t].slice();if(o=this._extent[t],o)return o.slice();o=a;for(var s=o[0],l=o[1],u=0;u<i;u++){var c=this.getRawIndex(u),h=e[c];h<s&&(s=h),h>l&&(l=h)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var a=[],i=this._chunks,n=0;n<i.length;n++)a.push(i[n][e]);return a},r.prototype.clone=function(t,e){var a=new r,i=this._chunks,n=t&&Wr(t,function(s,l){return s[l]=!0,s},{});if(n)for(var o=0;o<i.length;o++)a._chunks[o]=n[o]?JV(i[o]):i[o];else a._chunks=i;return this._copyCommonProps(a),e||(a._indices=this._cloneIndices()),a._updateGetRawIdx(),a},r.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=ne(this._extent),t._rawExtent=ne(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array){var a=this._indices.length;e=new t(a);for(var i=0;i<a;i++)e[i]=this._indices[i]}else e=new t(this._indices);return e}return null},r.prototype._getRawIdxIdentity=function(t){return t},r.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function t(e,a,i,n){return ni(e[n],this._dimensions[n])}Gp={arrayRows:t,objectRows:function(e,a,i,n){return ni(e[a],this._dimensions[n])},keyedColumns:t,original:function(e,a,i,n){var o=e&&(e.value==null?e:e.value);return ni(o instanceof Array?o[n]:o,this._dimensions[n])},typedArray:function(e,a,i,n){return e[n]}}}(),r}(),gw=function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),a=!!e.length,i,n;if(Js(t)){var o=t,s=void 0,l=void 0,u=void 0;if(a){var c=e[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,n=[c._getVersionSign()]}else s=o.get("data",!0),l=Rt(s)?La:vr,n=[];var h=this._getSourceMetaRawOption()||{},f=u&&u.metaRawOption||{},d=le(h.seriesLayoutBy,f.seriesLayoutBy)||null,p=le(h.sourceHeader,f.sourceHeader),v=le(h.dimensions,f.dimensions),g=d!==f.seriesLayoutBy||!!p!=!!f.sourceHeader||v;i=g?[Vp(s,{seriesLayoutBy:d,sourceHeader:p,dimensions:v},l)]:[]}else{var m=t;if(a){var y=this._applyTransform(e);i=y.sourceList,n=y.upstreamSignList}else{var _=m.get("source",!0);i=[Vp(_,this._getSourceMetaRawOption(),null)],n=[]}}process.env.NODE_ENV!=="production"&&ae(i&&n),this._setLocalSource(i,n)},r.prototype._applyTransform=function(t){var e=this._sourceHost,a=e.get("transform",!0),i=e.get("fromTransformResult",!0);if(process.env.NODE_ENV!=="production"&&ae(i!=null||a!=null),i!=null){var n="";t.length!==1&&(process.env.NODE_ENV!=="production"&&(n="When using `fromTransformResult`, there should be only one upstream dataset"),yw(n))}var o,s=[],l=[];return M(t,function(u){u.prepareSource();var c=u.getSource(i||0),h="";i!=null&&!c&&(process.env.NODE_ENV!=="production"&&(h="Can not retrieve result by `fromTransformResult`: "+i),yw(h)),s.push(c),l.push(u._getVersionSign())}),a?o=XV(a,s,{datasetIndex:e.componentIndex}):i!=null&&(o=[MV(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var a=t[e];if(a._isDirty()||this._upstreamSignList[e]!==a._getVersionSign())return!0}},r.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(!e){var a=this._getUpstreamSourceManagers();return a[0]&&a[0].getSource(t)}return e},r.prototype.getSharedDataStore=function(t){process.env.NODE_ENV!=="production"&&ae(Js(this._sourceHost),"Can only call getDataStore on series source manager.");var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},r.prototype._innerGetDataStore=function(t,e,a){var i=0,n=this._storeList,o=n[i];o||(o=n[i]={});var s=o[a];if(!s){var l=this._getUpstreamSourceManagers()[0];Js(this._sourceHost)&&l?s=l._innerGetDataStore(t,e,a):(s=new Wp,s.initData(new ew(e,t.length),t)),o[a]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(Js(t)){var e=Dp(t);return e?[e.getSourceManager()]:[]}else return W(Q5(t),function(a){return a.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,e,a,i;if(Js(t))e=t.get("seriesLayoutBy",!0),a=t.get("sourceHeader",!0),i=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var n=t;e=n.get("seriesLayoutBy",!0),a=n.get("sourceHeader",!0),i=n.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:a,dimensions:i}},r}();function mw(r){var t=r.option.transform;t&&lu(r.option.transform)}function Js(r){return r.mainType==="series"}function yw(r){throw new Error(r)}var QV="line-height:1";function _w(r){var t=r.lineHeight;return t==null?QV:"line-height:"+At(t+"")+"px"}function bw(r,t){var e=r.color||"#6e7079",a=r.fontSize||12,i=r.fontWeight||"400",n=r.color||"#464646",o=r.fontSize||14,s=r.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+At(a+"")+"px;color:"+At(e)+";font-weight:"+At(i+""),valueStyle:"font-size:"+At(o+"")+"px;color:"+At(n)+";font-weight:"+At(s+"")}:{nameStyle:{fontSize:a,fill:e,fontWeight:i},valueStyle:{fontSize:o,fill:n,fontWeight:s}}}var eO=[0,10,20,30],tO=["",`
239
+ `,`
240
+
241
+ `,`
242
+
243
+
244
+ `];function dt(r,t){return t.type=r,t}function Hp(r){return r.type==="section"}function ww(r){return Hp(r)?rO:aO}function xw(r){if(Hp(r)){var t=0,e=r.blocks.length,a=e>1||e>0&&!r.noHeader;return M(r.blocks,function(i){var n=xw(i);n>=t&&(t=n+ +(a&&(!n||Hp(i)&&!i.noHeader)))}),t}return 0}function rO(r,t,e,a){var i=t.noHeader,n=iO(xw(t)),o=[],s=t.blocks||[];ae(!s||G(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(K(u,l)){var c=new cw(u[l],null);s.sort(function(v,g){return c.evaluate(v.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}M(s,function(v,g){var m=t.valueFormatter,y=ww(v)(m?F(F({},r),{valueFormatter:m}):r,v,g>0?n.html:0,a);y!=null&&o.push(y)});var h=r.renderMode==="richText"?o.join(n.richText):$p(a,o.join(""),i?e:n.html);if(i)return h;var f=xp(t.header,"ordinal",r.useUTC),d=bw(a,r.renderMode).nameStyle,p=_w(a);return r.renderMode==="richText"?Lw(r,f,d)+n.richText+h:$p(a,'<div style="'+d+";"+p+';">'+At(f)+"</div>"+h,e)}function aO(r,t,e,a){var i=r.renderMode,n=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,c=t.valueFormatter||r.valueFormatter||function(w){return w=G(w)?w:[w],W(w,function(x,S){return xp(x,G(d)?d[S]:d,u)})};if(!(n&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),f=n?"":xp(l,"ordinal",u),d=t.valueType,p=o?[]:c(t.value,t.dataIndex),v=!s||!n,g=!s&&n,m=bw(a,i),y=m.nameStyle,_=m.valueStyle;return i==="richText"?(s?"":h)+(n?"":Lw(r,f,y))+(o?"":sO(r,p,v,g,_)):$p(a,(s?"":h)+(n?"":nO(f,!s,y))+(o?"":oO(p,v,g,_)),e)}}function Sw(r,t,e,a,i,n){if(r){var o=ww(r),s={useUTC:i,renderMode:e,orderMode:a,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,n)}}function iO(r){return{html:eO[r],richText:tO[r]}}function $p(r,t,e){var a='<div style="clear:both"></div>',i="margin: "+e+"px 0 0",n=_w(r);return'<div style="'+i+";"+n+';">'+t+a+"</div>"}function nO(r,t,e){var a=t?"margin-left:2px":"";return'<span style="'+e+";"+a+'">'+At(r)+"</span>"}function oO(r,t,e,a){var i=e?"10px":"20px",n=t?"float:right;margin-left:"+i:"";return r=G(r)?r:[r],'<span style="'+n+";"+a+'">'+W(r,function(o){return At(o)}).join("&nbsp;&nbsp;")+"</span>"}function Lw(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function sO(r,t,e,a,i){var n=[i],o=a?10:20;return e&&n.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(G(t)?t.join(" "):t,n)}function Tw(r,t){var e=r.getData().getItemVisual(t,"style"),a=e[r.visualDrawType];return sn(a)}function Cw(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var Up=function(){function r(){this.richTextStyles={},this._nextStyleNameId=c1()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,a){var i=a==="richText"?this._generateStyleName():null,n=Y5({color:e,type:t,renderMode:a,markerId:i});return X(n)?n:(process.env.NODE_ENV!=="production"&&ae(i),this.richTextStyles[i]=n.style,n.content)},r.prototype.wrapRichTextStyle=function(t,e){var a={};G(e)?M(e,function(n){return F(a,n)}):F(a,e);var i=this._generateStyleName();return this.richTextStyles[i]=a,"{"+i+"|"+t+"}"},r}();function Dw(r){var t=r.series,e=r.dataIndex,a=r.multipleSeries,i=t.getData(),n=i.mapDimensionsAll("defaultedTooltip"),o=n.length,s=t.getRawValue(e),l=G(s),u=Tw(t,e),c,h,f,d;if(o>1||l&&!o){var p=lO(s,t,e,n,u);c=p.inlineValues,h=p.inlineValueTypes,f=p.blocks,d=p.inlineValues[0]}else if(o){var v=i.getDimensionInfo(n[0]);d=c=xo(i,e,n[0]),h=v.type}else d=c=l?s[0]:s;var g=xd(t),m=g&&t.name||"",y=i.getName(e),_=a?m:y;return dt("section",{header:m,noHeader:a||!g,sortParam:d,blocks:[dt("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Dr(_),value:c,valueType:h,dataIndex:e})].concat(f||[])})}function lO(r,t,e,a,i){var n=t.getData(),o=Wr(r,function(h,f,d){var p=n.getDimensionInfo(d);return h=h||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];a.length?M(a,function(h){c(xo(n,e,h),h)}):M(r,c);function c(h,f){var d=n.getDimensionInfo(f);!d||d.otherDims.tooltip===!1||(o?u.push(dt("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:h,valueType:d.type})):(s.push(h),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var oi=xe();function Mc(r,t){return r.getName(t)||r.getId(t)}var Ec="__universalTransitionEnabled",Ic=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,a,i){this.seriesIndex=this.componentIndex,this.dataTask=Ks({count:cO,reset:hO}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,i);var n=oi(this).sourceManager=new gw(this);n.prepareSource();var o=this.getInitialData(e,i);Mw(o,this),this.dataTask.context.data=o,process.env.NODE_ENV!=="production"&&ae(o,"getInitialData returned invalid data."),oi(this).dataBeforeProcessed=o,Aw(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,a){var i=Ys(this),n=i?mo(e):{},o=this.subType;Se.hasClass(o)&&(o+="Series"),de(e,a.getTheme().get(this.subType)),de(e,this.getDefaultOption()),Oi(e,"label",["show"]),this.fillDataTextStyle(e.data),i&&ii(e,n,i)},t.prototype.mergeOption=function(e,a){e=de(this.option,e,!0),this.fillDataTextStyle(e.data);var i=Ys(this);i&&ii(this.option,e,i);var n=oi(this).sourceManager;n.dirty(),n.prepareSource();var o=this.getInitialData(e,a);Mw(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,oi(this).dataBeforeProcessed=o,Aw(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!Rt(e))for(var a=["show"],i=0;i<e.length;i++)e[i]&&e[i].label&&Oi(e[i],"label",a)},t.prototype.getInitialData=function(e,a){},t.prototype.appendData=function(e){var a=this.getRawData();a.appendData(e.data)},t.prototype.getData=function(e){var a=Yp(this);if(a){var i=a.context.data;return e==null||!i.getLinkedData?i:i.getLinkedData(e)}else return oi(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var a=Yp(this);if(a){var i=a.context;i.outputData=e,a!==this.dataTask&&(i.data=e)}oi(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return Q(e)},t.prototype.getSourceManager=function(){return oi(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return oi(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var e=this.get("colorBy");return e||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,a,i){return Dw({series:this,dataIndex:e,multipleSeries:a})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Le.node&&!(e&&e.ssr))return!1;var a=this.getShallow("animation");return a&&this.getData().count()>this.getShallow("animationThreshold")&&(a=!1),!!a},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,a,i){var n=this.ecModel,o=Mp.prototype.getColorFromPalette.call(this,e,a,i);return o||(o=n.getColorFromPalette(e,a,i)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,a){this._innerSelect(this.getData(a),e)},t.prototype.unselect=function(e,a){var i=this.option.selectedMap;if(i){var n=this.option.selectedMode,o=this.getData(a);if(n==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<e.length;s++){var l=e[s],u=Mc(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(e,a){for(var i=[],n=0;n<e.length;n++)i[0]=e[n],this.isSelected(e[n],a)?this.unselect(i,a):this.select(i,a)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,a=we(e),i=[],n=0;n<a.length;n++){var o=e[a[n]];o>=0&&i.push(o)}return i},t.prototype.isSelected=function(e,a){var i=this.option.selectedMap;if(!i)return!1;var n=this.getData(a);return(i==="all"||i[Mc(n,e)])&&!n.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[Ec])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,a){var i,n,o=this.option,s=o.selectedMode,l=a.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){re(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var h=a[c],f=Mc(e,h);u[f]=!0,this._selectedDataIndicesMap[f]=e.getRawIndex(h)}}else if(s==="single"||s===!0){var d=a[l-1],f=Mc(e,d);o.selectedMap=(i={},i[f]=!0,i),this._selectedDataIndicesMap=(n={},n[f]=e.getRawIndex(d),n)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var a=[];e.hasItemOption&&e.each(function(i){var n=e.getRawDataItem(i);n&&n.selected&&a.push(i)}),a.length>0&&this._innerSelect(e,a)}},t.registerClass=function(e){return Se.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(Se);at(Ic,Dc),at(Ic,Mp),T1(Ic,Se);function Aw(r){var t=r.name;xd(r)||(r.name=uO(r)||t)}function uO(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),a=[];return M(e,function(i){var n=t.getDimensionInfo(i);n.displayName&&a.push(n.displayName)}),a.join(" ")}function cO(r){return r.model.getRawData().count()}function hO(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),fO}function fO(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Mw(r,t){M(ss(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,fe(dO,t))})}function dO(r,t){var e=Yp(r);return e&&e.setOutputEnd((t||this).count()),t}function Yp(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var a=e.currentTask;if(a){var i=a.agentStubMap;i&&(a=i.get(r.uid))}return a}}const Xe=Ic;var Zp=function(){function r(){this.group=new oe,this.uid=ho("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,a,i){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,a,i){},r.prototype.updateLayout=function(t,e,a,i){},r.prototype.updateVisual=function(t,e,a,i){},r.prototype.toggleBlurSeries=function(t,e,a){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r}();Td(Zp),Bu(Zp);const Ke=Zp;function To(){var r=xe();return function(t){var e=r(t),a=t.pipelineContext,i=!!e.large,n=!!e.progressiveRender,o=e.large=!!(a&&a.large),s=e.progressiveRender=!!(a&&a.progressiveRender);return(i!==o||n!==s)&&"reset"}}var Ew=xe(),pO=To(),Xp=function(){function r(){this.group=new oe,this.uid=ho("viewChart"),this.renderTask=Ks({plan:vO,reset:gO}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,a,i){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},r.prototype.highlight=function(t,e,a,i){var n=t.getData(i&&i.dataType);if(!n){process.env.NODE_ENV!=="production"&&_t("Unknown dataType "+i.dataType);return}Pw(n,i,"emphasis")},r.prototype.downplay=function(t,e,a,i){var n=t.getData(i&&i.dataType);if(!n){process.env.NODE_ENV!=="production"&&_t("Unknown dataType "+i.dataType);return}Pw(n,i,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,a,i){this.render(t,e,a,i)},r.prototype.updateLayout=function(t,e,a,i){this.render(t,e,a,i)},r.prototype.updateVisual=function(t,e,a,i){this.render(t,e,a,i)},r.prototype.eachRendered=function(t){ti(this.group,t)},r.markUpdateMethod=function(t,e){Ew(t).updateMethod=e},r.protoInitialize=function(){var t=r.prototype;t.type="chart"}(),r}();function Iw(r,t,e){r&&Ja(r)&&(t==="emphasis"?xa:Sa)(r,e)}function Pw(r,t,e){var a=zi(r,t),i=t&&t.highlightKey!=null?BR(t.highlightKey):null;a!=null?M(Ve(a),function(n){Iw(r.getItemGraphicEl(n),e,i)}):r.eachItemGraphicEl(function(n){Iw(n,e,i)})}Td(Xp,["dispose"]),Bu(Xp);function vO(r){return pO(r.model)}function gO(r){var t=r.model,e=r.ecModel,a=r.api,i=r.payload,n=t.pipelineContext.progressiveRender,o=r.view,s=i&&Ew(i).updateMethod,l=n?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,a,i),mO[l]}var mO={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};const We=Xp;var Pc="\0__throttleOriginMethod",kw="\0__throttleRate",Nw="\0__throttleType";function jp(r,t,e){var a,i=0,n=0,o=null,s,l,u,c;t=t||0;function h(){n=new Date().getTime(),o=null,r.apply(l,u||[])}var f=function(){for(var d=[],p=0;p<arguments.length;p++)d[p]=arguments[p];a=new Date().getTime(),l=this,u=d;var v=c||t,g=c||e;c=null,s=a-(g?i:n)-v,clearTimeout(o),g?o=setTimeout(h,v):s>=0?h():o=setTimeout(h,-s),i=a};return f.clear=function(){o&&(clearTimeout(o),o=null)},f.debounceNextCall=function(d){c=d},f}function Co(r,t,e,a){var i=r[t];if(i){var n=i[Pc]||i,o=i[Nw],s=i[kw];if(s!==e||o!==a){if(e==null||!a)return r[t]=n;i=r[t]=jp(n,e,a==="debounce"),i[Pc]=n,i[Nw]=a,i[kw]=e}return i}}function Qs(r,t){var e=r[t];e&&e[Pc]&&(e.clear&&e.clear(),r[t]=e[Pc])}var Rw=xe(),Vw={itemStyle:Fi(nb,!0),lineStyle:Fi(ib,!0)},yO={lineStyle:"stroke",itemStyle:"fill"};function Ow(r,t){var e=r.visualStyleMapper||Vw[t];return e||(console.warn("Unknown style type '"+t+"'."),Vw.itemStyle)}function zw(r,t){var e=r.visualDrawType||yO[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var _O={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),a=r.visualStyleAccessPath||"itemStyle",i=r.getModel(a),n=Ow(r,a),o=n(i),s=i.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=zw(r,a),u=o[l],c=te(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||h){var f=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=f,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||te(o.fill)?f:o.fill,o.stroke=o.stroke==="auto"||te(o.stroke)?f:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&c)return e.setVisual("colorFromPalette",!1),{dataEach:function(d,p){var v=r.getDataParams(p),g=F({},o);g[l]=c(v),d.setItemVisual(p,"style",g)}}}},el=new Ge,bO={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),a=r.visualStyleAccessPath||"itemStyle",i=Ow(r,a),n=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){el.option=l[a];var u=i(el),c=o.ensureUniqueItemVisual(s,"style");F(c,u),el.option.decal&&(o.setItemVisual(s,"decal",el.option.decal),el.option.decal.dirty=!0),n in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},wO={performRawSeries:!0,overallReset:function(r){var t=Q();r.eachSeries(function(e){var a=e.getColorBy();if(!e.isColorBySeries()){var i=e.type+"-"+a,n=t.get(i);n||(n={},t.set(i,n)),Rw(e).scope=n}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var a=e.getRawData(),i={},n=e.getData(),o=Rw(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=zw(e,s);n.each(function(u){var c=n.getRawIndex(u);i[c]=u}),a.each(function(u){var c=i[u],h=n.getItemVisual(c,"colorFromPalette");if(h){var f=n.ensureUniqueItemVisual(c,"style"),d=a.getName(u)||u+"",p=a.count();f[l]=e.getColorFromPalette(d,o,p)}})}})}},kc=Math.PI;function xO(r,t){t=t||{},ie(t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var e=new oe,a=new Te({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(a);var i=new Ae({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),n=new Te({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(n);var o;return t.showSpinner&&(o=new np({shape:{startAngle:-kc/2,endAngle:-kc/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:kc*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:kc*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:c}),n.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var SO=function(){function r(t,e,a,i){this._stageTaskMap=Q(),this.ecInstance=t,this.api=e,a=this._dataProcessorHandlers=a.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=a.concat(i)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(a){var i=a.overallTask;i&&i.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var a=this._pipelineMap.get(t.__pipeline.id),i=a.context,n=!e&&a.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>a.blockIndex,o=n?a.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var a=this._pipelineMap.get(t.uid),i=t.getData(),n=i.count(),o=a.progressiveEnabled&&e.incrementalPrepareRender&&n>=a.threshold,s=t.get("large")&&n>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?n:null;t.pipelineContext=a.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,a=e._pipelineMap=Q();t.eachSeries(function(i){var n=i.getProgressive(),o=i.uid;a.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:n&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),e._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),a=this.api;M(this._allHandlers,function(i){var n=t.get(i.uid)||t.set(i.uid,{}),o="";process.env.NODE_ENV!=="production"&&(o='"reset" and "overallReset" must not be both specified.'),ae(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,n,e,a),i.overallReset&&this._createOverallStageTask(i,n,e,a)},this)},r.prototype.prepareView=function(t,e,a,i){var n=t.renderTask,o=n.context;o.model=e,o.ecModel=a,o.api=i,n.__block=!t.incrementalPrepareRender,this._pipe(e,n)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,a){this._performStageTasks(this._visualHandlers,t,e,a)},r.prototype._performStageTasks=function(t,e,a,i){i=i||{};var n=!1,o=this;M(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),h=c.seriesTaskMap,f=c.overallTask;if(f){var d,p=f.agentStubMap;p.each(function(g){s(i,g)&&(g.dirty(),d=!0)}),d&&f.dirty(),o.updatePayload(f,a);var v=o.getPerformArgs(f,i.block);p.each(function(g){g.perform(v)}),f.perform(v)&&(n=!0)}else h&&h.each(function(g,m){s(i,g)&&g.dirty();var y=o.getPerformArgs(g,i.block);y.skip=!l.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,a),g.perform(y)&&(n=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=n||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(a){e=a.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,a,i){var n=this,o=e.seriesTaskMap,s=e.seriesTaskMap=Q(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?a.eachRawSeries(c):l?a.eachRawSeriesByType(l,c):u&&u(a,i).each(c);function c(h){var f=h.uid,d=s.set(f,o&&o.get(f)||Ks({plan:AO,reset:MO,count:IO}));d.context={model:h,ecModel:a,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:n},n._pipe(h,d)}},r.prototype._createOverallStageTask=function(t,e,a,i){var n=this,o=e.overallTask=e.overallTask||Ks({reset:LO});o.context={ecModel:a,api:i,overallReset:t.overallReset,scheduler:n};var s=o.agentStubMap,l=o.agentStubMap=Q(),u=t.seriesType,c=t.getTargetSeries,h=!0,f=!1,d="";process.env.NODE_ENV!=="production"&&(d='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),ae(!t.createOnAllSeries,d),u?a.eachRawSeriesByType(u,p):c?c(a,i).each(p):(h=!1,M(a.getSeries(),p));function p(v){var g=v.uid,m=l.set(g,s&&s.get(g)||(f=!0,Ks({reset:TO,onDirty:DO})));m.context={model:v,overallProgress:h},m.agent=o,m.__block=h,n._pipe(v,m)}f&&o.dirty()},r.prototype._pipe=function(t,e){var a=t.uid,i=this._pipelineMap.get(a);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},r.wrapStageHandler=function(t,e){return te(t)&&(t={overallReset:t,seriesType:PO(t)}),t.uid=ho("stageHandler"),e&&(t.visualType=e),t},r}();function LO(r){r.overallReset(r.ecModel,r.api,r.payload)}function TO(r){return r.overallProgress&&CO}function CO(){this.agent.dirty(),this.getDownstream().dirty()}function DO(){this.agent&&this.agent.dirty()}function AO(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function MO(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=Ve(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?W(t,function(e,a){return Bw(a)}):EO}var EO=Bw(0);function Bw(r){return function(t,e){var a=e.data,i=e.resetDefines[r];if(i&&i.dataEach)for(var n=t.start;n<t.end;n++)i.dataEach(a,n);else i&&i.progress&&i.progress(t,a)}}function IO(r){return r.data.count()}function PO(r){Nc=null;try{r(tl,Fw)}catch{}return Nc}var tl={},Fw={},Nc;Gw(tl,Bb),Gw(Fw,Fb),tl.eachSeriesByType=tl.eachRawSeriesByType=function(r){Nc=r},tl.eachComponent=function(r){r.mainType==="series"&&r.subType&&(Nc=r.subType)};function Gw(r,t){for(var e in t.prototype)r[e]=et}const Ww=SO;var Hw=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const kO={color:Hw,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Hw]};var Pt="#B9B8CE",$w="#100C2A",Rc=function(){return{axisLine:{lineStyle:{color:Pt}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},Uw=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],Yw={darkMode:!0,color:Uw,backgroundColor:$w,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Pt},pageTextStyle:{color:Pt}},textStyle:{color:Pt},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Pt}},dataZoom:{borderColor:"#71708A",textStyle:{color:Pt},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Pt}},timeline:{lineStyle:{color:Pt},label:{color:Pt},controlStyle:{color:Pt,borderColor:Pt}},calendar:{itemStyle:{color:$w},dayLabel:{color:Pt},monthLabel:{color:Pt},yearLabel:{color:Pt}},timeAxis:Rc(),logAxis:Rc(),valueAxis:Rc(),categoryAxis:Rc(),line:{symbol:"circle"},graph:{color:Uw},gauge:{title:{color:Pt},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Pt},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};Yw.categoryAxis.splitLine.show=!1;const NO=Yw;var RO=function(){function r(){}return r.prototype.normalizeQuery=function(t){var e={},a={},i={};if(X(t)){var n=Xr(t);e.mainType=n.main||null,e.subType=n.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};M(t,function(l,u){for(var c=!1,h=0;h<o.length;h++){var f=o[h],d=u.lastIndexOf(f);if(d>0&&d===u.length-f.length){var p=u.slice(0,d);p!=="data"&&(e.mainType=p,e[f.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(a[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:e,dataQuery:a,otherQuery:i}},r.prototype.filter=function(t,e){var a=this.eventInfo;if(!a)return!0;var i=a.targetEl,n=a.packedEvent,o=a.model,s=a.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,n,"name")&&c(u,n,"dataIndex")&&c(u,n,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,i,n));function c(h,f,d,p){return h[d]==null||f[p||d]===h[d]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),qp=["symbol","symbolSize","symbolRotate","symbolOffset"],Zw=qp.concat(["symbolKeepAspect"]),VO={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var a={},i={},n=!1,o=0;o<qp.length;o++){var s=qp[o],l=r.get(s);te(l)?(n=!0,i[s]=l):a[s]=l}if(a.symbol=a.symbol||r.defaultSymbol,e.setVisual(F({legendIcon:r.legendIcon||a.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},a)),t.isSeriesFiltered(r))return;var u=we(i);function c(h,f){for(var d=r.getRawValue(f),p=r.getDataParams(f),v=0;v<u.length;v++){var g=u[v];h.setItemVisual(f,g,i[g](d,p))}}return{dataEach:n?c:null}}},OO={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!r.hasSymbolVisual||t.isSeriesFiltered(r))return;var e=r.getData();function a(i,n){for(var o=i.getItemModel(n),s=0;s<Zw.length;s++){var l=Zw[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(n,l,u)}}return{dataEach:e.hasItemOption?a:null}}};function Kp(r,t,e){switch(e){case"color":var a=r.getItemVisual(t,"style");return a[r.getVisual("drawType")];case"opacity":return r.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(t,e);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+e)}}function rl(r,t){switch(t){case"color":var e=r.getVisual("style");return e[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(t);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+t)}}function Xw(r,t,e,a){switch(e){case"color":var i=r.ensureUniqueItemVisual(t,"style");i[r.getVisual("drawType")]=a,r.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(t,"style").opacity=a;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(t,e,a);break;default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+e)}}function jw(r,t){function e(a,i){var n=[];return a.eachComponent({mainType:"series",subType:r,query:i},function(o){n.push(o.seriesIndex)}),n}M([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(a){t(a[0],function(i,n,o){i=F({},i),process.env.NODE_ENV!=="production"&&nt(i.type,a[1]),o.dispatchAction(F(i,{type:a[1],seriesIndex:e(n,i)}))})})}function Do(r,t,e,a,i){var n=r+t;e.isSilent(n)||(process.env.NODE_ENV!=="production"&&Ir("event "+n+" is deprecated."),a.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var h=o.getData(),f=zi(h,i.fromActionPayload);e.trigger(n,{type:n,seriesId:o.id,name:G(f)?h.getName(f[0]):h.getName(f),selected:X(l)?l:F({},l)})}}))}function zO(r,t,e){r.on("selectchanged",function(a){var i=e.getModel();a.isFromClick?(Do("map","selectchanged",t,i,a),Do("pie","selectchanged",t,i,a)):a.fromAction==="select"?(Do("map","selected",t,i,a),Do("pie","selected",t,i,a)):a.fromAction==="unselect"&&(Do("map","unselected",t,i,a),Do("pie","unselected",t,i,a))})}function dn(r,t,e){for(var a;r&&!(t(r)&&(a=r,e));)r=r.__hostTarget||r.parent;return a}var BO=Math.round(Math.random()*9),FO=typeof Object.defineProperty=="function",GO=function(){function r(){this._id="__ec_inner_"+BO++}return r.prototype.get=function(t){return this._guard(t)[this._id]},r.prototype.set=function(t,e){var a=this._guard(t);return FO?Object.defineProperty(a,this._id,{value:e,enumerable:!1,configurable:!0}):a[this._id]=e,this},r.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},r.prototype.has=function(t){return!!this._guard(t)[this._id]},r.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},r}();const WO=GO;var HO=_e.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,a=t.cy,i=t.width/2,n=t.height/2;r.moveTo(e,a-n),r.lineTo(e+i,a+n),r.lineTo(e-i,a+n),r.closePath()}}),$O=_e.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,a=t.cy,i=t.width/2,n=t.height/2;r.moveTo(e,a-n),r.lineTo(e+i,a),r.lineTo(e,a+n),r.lineTo(e-i,a),r.closePath()}}),UO=_e.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.x,a=t.y,i=t.width/5*3,n=Math.max(i,t.height),o=i/2,s=o*o/(n-o),l=a-n+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,h=Math.sin(u),f=Math.cos(u),d=o*.6,p=o*.7;r.moveTo(e-c,l+s),r.arc(e,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(e+c-h*d,l+s+f*d,e,a-p,e,a),r.bezierCurveTo(e,a-p,e-c+h*d,l+s+f*d,e-c,l+s),r.closePath()}}),YO=_e.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.height,a=t.width,i=t.x,n=t.y,o=a/3*2;r.moveTo(i,n),r.lineTo(i+o,n+e),r.lineTo(i,n+e/4*3),r.lineTo(i-o,n+e),r.lineTo(i,n),r.closePath()}}),ZO={line:mt,rect:Te,roundRect:Te,square:Te,circle:Qa,diamond:$O,pin:UO,arrow:YO,triangle:HO},XO={line:function(r,t,e,a,i){i.x1=r,i.y1=t+a/2,i.x2=r+e,i.y2=t+a/2},rect:function(r,t,e,a,i){i.x=r,i.y=t,i.width=e,i.height=a},roundRect:function(r,t,e,a,i){i.x=r,i.y=t,i.width=e,i.height=a,i.r=Math.min(e,a)/4},square:function(r,t,e,a,i){var n=Math.min(e,a);i.x=r,i.y=t,i.width=n,i.height=n},circle:function(r,t,e,a,i){i.cx=r+e/2,i.cy=t+a/2,i.r=Math.min(e,a)/2},diamond:function(r,t,e,a,i){i.cx=r+e/2,i.cy=t+a/2,i.width=e,i.height=a},pin:function(r,t,e,a,i){i.x=r+e/2,i.y=t+a/2,i.width=e,i.height=a},arrow:function(r,t,e,a,i){i.x=r+e/2,i.y=t+a/2,i.width=e,i.height=a},triangle:function(r,t,e,a,i){i.cx=r+e/2,i.cy=t+a/2,i.width=e,i.height=a}},Vc={};M(ZO,function(r,t){Vc[t]=new r});var jO=_e.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,t,e){var a=Vu(r,t,e),i=this.shape;return i&&i.symbolType==="pin"&&t.position==="inside"&&(a.y=e.y+e.height*.4),a},buildPath:function(r,t,e){var a=t.symbolType;if(a!=="none"){var i=Vc[a];i||(a="rect",i=Vc[a]),XO[a](t.x,t.y,t.width,t.height,i.shape),i.buildPath(r,i.shape,e)}}});function qO(r,t){if(this.type!=="image"){var e=this.style;this.__isEmptyBrush?(e.stroke=r,e.fill=t||"#fff",e.lineWidth=2):this.shape.symbolType==="line"?e.stroke=r:e.fill=r,this.markRedraw()}}function lt(r,t,e,a,i,n,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=$_(r.slice(8),new ge(t,e,a,i),o?"center":"cover"):r.indexOf("path://")===0?l=lc(r.slice(7),{},new ge(t,e,a,i),o?"center":"cover"):l=new jO({shape:{symbolType:r,x:t,y:e,width:a,height:i}}),l.__isEmptyBrush=s,l.setColor=qO,n&&l.setColor(n),l}function Ao(r){return G(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function pn(r,t){if(r!=null)return G(r)||(r=[r,r]),[Z(r[0],t[0])||0,Z(le(r[1],r[0]),t[1])||0]}function vn(r){return isFinite(r)}function KO(r,t,e){var a=t.x==null?0:t.x,i=t.x2==null?1:t.x2,n=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(a=a*e.width+e.x,i=i*e.width+e.x,n=n*e.height+e.y,o=o*e.height+e.y),a=vn(a)?a:0,i=vn(i)?i:1,n=vn(n)?n:0,o=vn(o)?o:0;var s=r.createLinearGradient(a,n,i,o);return s}function JO(r,t,e){var a=e.width,i=e.height,n=Math.min(a,i),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,l=t.r==null?.5:t.r;t.global||(o=o*a+e.x,s=s*i+e.y,l=l*n),o=vn(o)?o:.5,s=vn(s)?s:.5,l=l>=0&&vn(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function Jp(r,t,e){for(var a=t.type==="radial"?JO(r,t,e):KO(r,t,e),i=t.colorStops,n=0;n<i.length;n++)a.addColorStop(i[n].offset,i[n].color);return a}function QO(r,t){if(r===t||!r&&!t)return!1;if(!r||!t||r.length!==t.length)return!0;for(var e=0;e<r.length;e++)if(r[e]!==t[e])return!0;return!1}function Oc(r){return parseInt(r,10)}function Mo(r,t,e){var a=["width","height"][t],i=["clientWidth","clientHeight"][t],n=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(e[a]!=null&&e[a]!=="auto")return parseFloat(e[a]);var s=document.defaultView.getComputedStyle(r);return(r[i]||Oc(s[a])||Oc(r.style[a]))-(Oc(s[n])||0)-(Oc(s[o])||0)|0}function ez(r,t){return!r||r==="solid"||!(t>0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:De(r)?[r]:G(r)?r:null}function Qp(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&ez(t.lineDash,t.lineWidth),a=t.lineDashOffset;if(e){var i=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;i&&i!==1&&(e=W(e,function(n){return n/i}),a/=i)}return[e,a]}var tz=new Jr(!0);function zc(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function qw(r){return typeof r=="string"&&r!=="none"}function Bc(r){var t=r.fill;return t!=null&&t!=="none"}function Kw(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function Jw(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function ev(r,t,e){var a=Dd(t.image,t.__image,e);if(Fu(a)){var i=r.createPattern(a,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var n=new DOMMatrix;n.translateSelf(t.x||0,t.y||0),n.rotateSelf(0,0,(t.rotation||0)*cu),n.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(n)}return i}}function rz(r,t,e,a){var i,n=zc(e),o=Bc(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var c=t.path||tz,h=t.__dirty;if(!a){var f=e.fill,d=e.stroke,p=o&&!!f.colorStops,v=n&&!!d.colorStops,g=o&&!!f.image,m=n&&!!d.image,y=void 0,_=void 0,w=void 0,x=void 0,S=void 0;(p||v)&&(S=t.getBoundingRect()),p&&(y=h?Jp(r,f,S):t.__canvasFillGradient,t.__canvasFillGradient=y),v&&(_=h?Jp(r,d,S):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(w=h||!t.__canvasFillPattern?ev(r,f,t):t.__canvasFillPattern,t.__canvasFillPattern=w),m&&(x=h||!t.__canvasStrokePattern?ev(r,d,t):t.__canvasStrokePattern,t.__canvasStrokePattern=w),p?r.fillStyle=y:g&&(w?r.fillStyle=w:o=!1),v?r.strokeStyle=_:m&&(x?r.strokeStyle=x:n=!1)}var L=t.getGlobalScale();c.setScale(L[0],L[1],t.segmentIgnoreThreshold);var C,T;r.setLineDash&&e.lineDash&&(i=Qp(t),C=i[0],T=i[1]);var A=!0;(u||h&Zn)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),A=!1),c.reset(),t.buildPath(c,t.shape,a),c.toStatic(),t.pathUpdated()),A&&c.rebuildPath(r,l?s:1),C&&(r.setLineDash(C),r.lineDashOffset=T),a||(e.strokeFirst?(n&&Jw(r,e),o&&Kw(r,e)):(o&&Kw(r,e),n&&Jw(r,e))),C&&r.setLineDash([])}function az(r,t,e){var a=t.__image=Dd(e.image,t.__image,t,t.onload);if(!(!a||!Fu(a))){var i=e.x||0,n=e.y||0,o=t.getWidth(),s=t.getHeight(),l=a.width/a.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=a.width,s=a.height),e.sWidth&&e.sHeight){var u=e.sx||0,c=e.sy||0;r.drawImage(a,u,c,e.sWidth,e.sHeight,i,n,o,s)}else if(e.sx&&e.sy){var u=e.sx,c=e.sy,h=o-u,f=s-c;r.drawImage(a,u,c,h,f,i,n,o,s)}else r.drawImage(a,i,n,o,s)}}function iz(r,t,e){var a,i=e.text;if(i!=null&&(i+=""),i){r.font=e.font||za,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var n=void 0,o=void 0;r.setLineDash&&e.lineDash&&(a=Qp(t),n=a[0],o=a[1]),n&&(r.setLineDash(n),r.lineDashOffset=o),e.strokeFirst?(zc(e)&&r.strokeText(i,e.x,e.y),Bc(e)&&r.fillText(i,e.x,e.y)):(Bc(e)&&r.fillText(i,e.x,e.y),zc(e)&&r.strokeText(i,e.x,e.y)),n&&r.setLineDash([])}}var Qw=["shadowBlur","shadowOffsetX","shadowOffsetY"],ex=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function tx(r,t,e,a,i){var n=!1;if(!a&&(e=e||{},t===e))return!1;if(a||t.opacity!==e.opacity){qt(r,i),n=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?Gi.opacity:o}(a||t.blend!==e.blend)&&(n||(qt(r,i),n=!0),r.globalCompositeOperation=t.blend||Gi.blend);for(var s=0;s<Qw.length;s++){var l=Qw[s];(a||t[l]!==e[l])&&(n||(qt(r,i),n=!0),r[l]=r.dpr*(t[l]||0))}return(a||t.shadowColor!==e.shadowColor)&&(n||(qt(r,i),n=!0),r.shadowColor=t.shadowColor||Gi.shadowColor),n}function rx(r,t,e,a,i){var n=al(t,i.inHover),o=a?null:e&&al(e,i.inHover)||{};if(n===o)return!1;var s=tx(r,n,o,a,i);if((a||n.fill!==o.fill)&&(s||(qt(r,i),s=!0),qw(n.fill)&&(r.fillStyle=n.fill)),(a||n.stroke!==o.stroke)&&(s||(qt(r,i),s=!0),qw(n.stroke)&&(r.strokeStyle=n.stroke)),(a||n.opacity!==o.opacity)&&(s||(qt(r,i),s=!0),r.globalAlpha=n.opacity==null?1:n.opacity),t.hasStroke()){var l=n.lineWidth,u=l/(n.strokeNoScale&&t.getLineScale?t.getLineScale():1);r.lineWidth!==u&&(s||(qt(r,i),s=!0),r.lineWidth=u)}for(var c=0;c<ex.length;c++){var h=ex[c],f=h[0];(a||n[f]!==o[f])&&(s||(qt(r,i),s=!0),r[f]=n[f]||h[1])}return s}function nz(r,t,e,a,i){return tx(r,al(t,i.inHover),e&&al(e,i.inHover),a,i)}function ax(r,t){var e=t.transform,a=r.dpr||1;e?r.setTransform(a*e[0],a*e[1],a*e[2],a*e[3],a*e[4],a*e[5]):r.setTransform(a,0,0,a,0,0)}function oz(r,t,e){for(var a=!1,i=0;i<r.length;i++){var n=r[i];a=a||n.isZeroArea(),ax(t,n),t.beginPath(),n.buildPath(t,n.shape),t.clip()}e.allClipped=a}function sz(r,t){return r&&t?r[0]!==t[0]||r[1]!==t[1]||r[2]!==t[2]||r[3]!==t[3]||r[4]!==t[4]||r[5]!==t[5]:!(!r&&!t)}var ix=1,nx=2,ox=3,sx=4;function lz(r){var t=Bc(r),e=zc(r);return!(r.lineDash||!(+t^+e)||t&&typeof r.fill!="string"||e&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function qt(r,t){t.batchFill&&r.fill(),t.batchStroke&&r.stroke(),t.batchFill="",t.batchStroke=""}function al(r,t){return t&&r.__hoverStyle||r.style}function lx(r,t){gn(r,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function gn(r,t,e,a){var i=t.transform;if(!t.shouldBePainted(e.viewWidth,e.viewHeight,!1,!1)){t.__dirty&=~Qt,t.__isRendered=!1;return}var n=t.__clipPaths,o=e.prevElClipPaths,s=!1,l=!1;if((!o||QO(n,o))&&(o&&o.length&&(qt(r,e),r.restore(),l=s=!0,e.prevElClipPaths=null,e.allClipped=!1,e.prevEl=null),n&&n.length&&(qt(r,e),r.save(),oz(n,r,e),s=!0),e.prevElClipPaths=n),e.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=e.prevEl;u||(l=s=!0);var c=t instanceof _e&&t.autoBatch&&lz(t.style);s||sz(i,u.transform)?(qt(r,e),ax(r,t)):c||qt(r,e);var h=al(t,e.inHover);t instanceof _e?(e.lastDrawType!==ix&&(l=!0,e.lastDrawType=ix),rx(r,t,u,l,e),(!c||!e.batchFill&&!e.batchStroke)&&r.beginPath(),rz(r,t,h,c),c&&(e.batchFill=h.fill||"",e.batchStroke=h.stroke||"")):t instanceof Es?(e.lastDrawType!==ox&&(l=!0,e.lastDrawType=ox),rx(r,t,u,l,e),iz(r,t,h)):t instanceof bt?(e.lastDrawType!==nx&&(l=!0,e.lastDrawType=nx),nz(r,t,u,l,e),az(r,t,h)):t.getTemporalDisplayables&&(e.lastDrawType!==sx&&(l=!0,e.lastDrawType=sx),uz(r,t,e)),c&&a&&qt(r,e),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),e.prevEl=t,t.__dirty=0,t.__isRendered=!0}function uz(r,t,e){var a=t.getDisplayables(),i=t.getTemporalDisplayables();r.save();var n={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:e.viewWidth,viewHeight:e.viewHeight,inHover:e.inHover},o,s;for(o=t.getCursor(),s=a.length;o<s;o++){var l=a[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),gn(r,l,n,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),n.prevEl=l}for(var u=0,c=i.length;u<c;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),gn(r,l,n,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),n.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,r.restore()}var tv=new WO,ux=new ps(100),cx=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function Eo(r,t){if(r==="none")return null;var e=t.getDevicePixelRatio(),a=t.getZr(),i=a.painter.type==="svg";r.dirty&&tv.delete(r);var n=tv.get(r);if(n)return n;var o=ie(r,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/e,tv.set(r,s),r.dirty=!1,s;function l(u){for(var c=[e],h=!0,f=0;f<cx.length;++f){var d=o[cx[f]];if(d!=null&&!G(d)&&!X(d)&&!De(d)&&typeof d!="boolean"){h=!1;break}c.push(d)}var p;if(h){p=c.join(",")+(i?"-svg":"");var v=ux.get(p);v&&(i?u.svgElement=v:u.image=v)}var g=fx(o.dashArrayX),m=cz(o.dashArrayY),y=hx(o.symbol),_=hz(g),w=dx(m),x=!i&&Ba.createCanvas(),S=i&&{tag:"g",attrs:{},key:"dcl",children:[]},L=T(),C;x&&(x.width=L.width*e,x.height=L.height*e,C=x.getContext("2d")),A(),h&&ux.put(p,x||S),u.image=x,u.svgElement=S,u.svgWidth=L.width,u.svgHeight=L.height;function T(){for(var D=1,E=0,I=_.length;E<I;++E)D=f1(D,_[E]);for(var P=1,E=0,I=y.length;E<I;++E)P=f1(P,y[E].length);D*=P;var k=w*_.length*y.length;if(process.env.NODE_ENV!=="production"){var N=function(O){console.warn("Calculated decal size is greater than "+O+" due to decal option settings so "+O+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+O+" to be larger to avoid incontinuity.")};D>o.maxTileWidth&&N("maxTileWidth"),k>o.maxTileHeight&&N("maxTileHeight")}return{width:Math.max(1,Math.min(D,o.maxTileWidth)),height:Math.max(1,Math.min(k,o.maxTileHeight))}}function A(){C&&(C.clearRect(0,0,x.width,x.height),o.backgroundColor&&(C.fillStyle=o.backgroundColor,C.fillRect(0,0,x.width,x.height)));for(var D=0,E=0;E<m.length;++E)D+=m[E];if(D<=0)return;for(var I=-w,P=0,k=0,N=0;I<L.height;){if(P%2===0){for(var O=k/2%y.length,R=0,V=0,B=0;R<L.width*2;){for(var H=0,E=0;E<g[N].length;++E)H+=g[N][E];if(H<=0)break;if(V%2===0){var Y=(1-o.symbolSize)*.5,$=R+g[N][V]*Y,U=I+m[P]*Y,q=g[N][V]*o.symbolSize,Ce=m[P]*o.symbolSize,ce=B/2%y[O].length;he($,U,q,Ce,y[O][ce])}R+=g[N][V],++B,++V,V===g[N].length&&(V=0)}++N,N===g.length&&(N=0)}I+=m[P],++k,++P,P===m.length&&(P=0)}function he(ee,pe,J,se,Oe){var Ee=i?1:e,Ne=lt(Oe,ee*Ee,pe*Ee,J*Ee,se*Ee,o.color,o.symbolKeepAspect);if(i){var $e=a.painter.renderOneToVNode(Ne);$e&&S.children.push($e)}else lx(C,Ne)}}}}function hx(r){if(!r||r.length===0)return[["rect"]];if(X(r))return[[r]];for(var t=!0,e=0;e<r.length;++e)if(!X(r[e])){t=!1;break}if(t)return hx([r]);for(var a=[],e=0;e<r.length;++e)X(r[e])?a.push([r[e]]):a.push(r[e]);return a}function fx(r){if(!r||r.length===0)return[[0,0]];if(De(r)){var t=Math.ceil(r);return[[t,t]]}for(var e=!0,a=0;a<r.length;++a)if(!De(r[a])){e=!1;break}if(e)return fx([r]);for(var i=[],a=0;a<r.length;++a)if(De(r[a])){var t=Math.ceil(r[a]);i.push([t,t])}else{var t=W(r[a],function(s){return Math.ceil(s)});t.length%2===1?i.push(t.concat(t)):i.push(t)}return i}function cz(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(De(r)){var t=Math.ceil(r);return[t,t]}var e=W(r,function(a){return Math.ceil(a)});return r.length%2?e.concat(e):e}function hz(r){return W(r,function(t){return dx(t)})}function dx(r){for(var t=0,e=0;e<r.length;++e)t+=r[e];return r.length%2===1?t*2:t}function fz(r,t){r.eachRawSeries(function(e){if(!r.isSeriesFiltered(e)){var a=e.getData();a.hasItemVisual()&&a.each(function(o){var s=a.getItemVisual(o,"decal");if(s){var l=a.ensureUniqueItemVisual(o,"style");l.decal=Eo(s,t)}});var i=a.getVisual("decal");if(i){var n=a.getVisual("style");n.decal=Eo(i,t)}}})}var dz=new or;const Vr=dz;var Fc={};function pz(r,t){process.env.NODE_ENV!=="production"&&Fc[r]&&_t("Already has an implementation of "+r+"."),Fc[r]=t}function vz(r){return process.env.NODE_ENV!=="production"&&(Fc[r]||_t("Implementation of "+r+" doesn't exists.")),Fc[r]}var gz=1,mz=800,yz=900,_z=1e3,bz=2e3,wz=5e3,px=1e3,xz=1100,rv=2e3,vx=3e3,Sz=4e3,Gc=4500,Lz=4600,Tz=5e3,Cz=6e3,gx=7e3,Dz={PROCESSOR:{FILTER:_z,SERIES_FILTER:mz,STATISTIC:wz},VISUAL:{LAYOUT:px,PROGRESSIVE_LAYOUT:xz,GLOBAL:rv,CHART:vx,POST_CHART_LAYOUT:Lz,COMPONENT:Sz,BRUSH:Tz,CHART_ITEM:Gc,ARIA:Cz,DECAL:gx}},kt="__flagInMainProcess",Kt="__pendingUpdate",av="__needsUpdateStatus",mx=/^[a-zA-Z0-9_]+$/,iv="__connectUpdateStatus",yx=0,Az=1,Mz=2;function _x(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.isDisposed()){ar(this.id);return}return xx(this,r,t)}}function bx(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return xx(this,r,t)}}function xx(r,t,e){return e[0]=e[0]&&e[0].toLowerCase(),or.prototype[t].apply(r,e)}var Sx=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(or),Lx=Sx.prototype;Lx.on=bx("on"),Lx.off=bx("off");var Io,nv,Wc,si,ov,sv,lv,il,nl,Tx,Cx,uv,Dx,Hc,Ax,Mx,_r,Ex,Ix=function(r){z(t,r);function t(e,a,i){var n=r.call(this,new RO)||this;n._chartsViews=[],n._chartsMap={},n._componentsViews=[],n._componentsMap={},n._pendingActions=[],i=i||{},X(a)&&(a=Px[a]),n._dom=e;var o="canvas",s="auto",l=!1;if(process.env.NODE_ENV!=="production"){var u=Le.hasGlobalWindow?window:global;u&&(o=le(u.__ECHARTS__DEFAULT__RENDERER__,o),s=le(u.__ECHARTS__DEFAULT__COARSE_POINTER,s),l=le(u.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,l))}i.ssr&&iN(function(d){var p=ue(d),v=p.dataIndex;if(v!=null){var g=Q();return g.set("series_index",p.seriesIndex),g.set("data_index",v),p.ssrType&&g.set("ssr_type",p.ssrType),g}});var c=n._zr=r1(e,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:le(i.useDirtyRect,l),useCoarsePointer:le(i.useCoarsePointer,s),pointerSize:i.pointerSize});n._ssr=i.ssr,n._throttledZrFlush=jp(j(c.flush,c),17),a=ne(a),a&&Zb(a,!0),n._theme=a,n._locale=B5(i.locale||ob),n._coordSysMgr=new wo;var h=n._api=Ax(n);function f(d,p){return d.__prio-p.__prio}return gu(Uc,f),gu(hv,f),n._scheduler=new Ww(n,h,hv,Uc),n._messageCenter=new Sx,n._initEvents(),n.resize=j(n.resize,n),c.animation.on("frame",n._onframe,n),Tx(c,n),Cx(c,n),lu(n),n}return t.prototype._onframe=function(){if(!this._disposed){Ex(this);var e=this._scheduler;if(this[Kt]){var a=this[Kt].silent;this[kt]=!0;try{Io(this),si.update.call(this,null,this[Kt].updateParams)}catch(l){throw this[kt]=!1,this[Kt]=null,l}this._zr.flush(),this[kt]=!1,this[Kt]=null,il.call(this,a),nl.call(this,a)}else if(e.unfinished){var i=gz,n=this._model,o=this._api;e.unfinished=!1;do{var s=+new Date;e.performSeriesTasks(n),e.performDataProcessorTasks(n),sv(this,n),e.performVisualTasks(n),Hc(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,a,i){if(this[kt]){process.env.NODE_ENV!=="production"&&_t("`setOption` should not be called during main process.");return}if(this._disposed){ar(this.id);return}var n,o,s;if(re(a)&&(i=a.lazyUpdate,n=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[kt]=!0,!this._model||a){var l=new _V(this._api),u=this._theme,c=this._model=new Bb;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},fv);var h={seriesTransition:s,optionChanged:!0};if(i)this[Kt]={silent:n,updateParams:h},this[kt]=!1,this.getZr().wakeUp();else{try{Io(this),si.update.call(this,null,h)}catch(f){throw this[Kt]=null,this[kt]=!1,f}this._ssr||this._zr.flush(),this[Kt]=null,this[kt]=!1,il.call(this,n),nl.call(this,n)}},t.prototype.setTheme=function(){Ir("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Le.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return process.env.NODE_ENV!=="production"&&nt("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var a=this._zr.painter;if(process.env.NODE_ENV!=="production"&&a.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return a.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var a=this._zr.painter;if(process.env.NODE_ENV!=="production"&&a.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return a.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(Le.svgSupported){var e=this._zr,a=e.storage.getDisplayList();return M(a,function(i){i.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){ar(this.id);return}e=e||{};var a=e.excludeComponents,i=this._model,n=[],o=this;M(a,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(n.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return M(n,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){ar(this.id);return}var a=e.type==="svg",i=this.group,n=Math.min,o=Math.max,s=1/0;if(kx[i]){var l=s,u=s,c=-s,h=-s,f=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();M(sl,function(_,w){if(_.group===i){var x=a?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(ne(e)),S=_.getDom().getBoundingClientRect();l=n(S.left,l),u=n(S.top,u),c=o(S.right,c),h=o(S.bottom,h),f.push({dom:x,left:S.left,top:S.top})}}),l*=d,u*=d,c*=d,h*=d;var p=c-l,v=h-u,g=Ba.createCanvas(),m=r1(g,{renderer:a?"svg":"canvas"});if(m.resize({width:p,height:v}),a){var y="";return M(f,function(_){var w=_.left-l,x=_.top-u;y+='<g transform="translate('+w+","+x+')">'+_.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,e.connectedBackgroundColor&&m.painter.setBackgroundColor(e.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return e.connectedBackgroundColor&&m.add(new Te({shape:{x:0,y:0,width:p,height:v},style:{fill:e.connectedBackgroundColor}})),M(f,function(_){var w=new bt({style:{x:_.left*d-l,y:_.top*d-u,image:_.dom}});m.add(w)}),m.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,a){return ov(this,"convertToPixel",e,a)},t.prototype.convertFromPixel=function(e,a){return ov(this,"convertFromPixel",e,a)},t.prototype.containPixel=function(e,a){if(this._disposed){ar(this.id);return}var i=this._model,n,o=Cs(i,e);return M(o,function(s,l){l.indexOf("Models")>=0&&M(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)n=n||!!c.containPoint(a);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint?n=n||h.containPoint(a,u):process.env.NODE_ENV!=="production"&&je(l+": "+(h?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&je(l+": containPoint is not supported")},this)},this),!!n},t.prototype.getVisual=function(e,a){var i=this._model,n=Cs(i,e,{defaultMainType:"series"}),o=n.seriesModel;process.env.NODE_ENV!=="production"&&(o||je("There is no specified series model"));var s=o.getData(),l=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?s.indexOfRawIndex(n.dataIndex):null;return l!=null?Kp(s,l,a):rl(s,a)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;M(Ez,function(a){var i=function(n){var o=e.getModel(),s=n.target,l,u=a==="globalout";if(u?l={}:s&&dn(s,function(p){var v=ue(p);if(v&&v.dataIndex!=null){var g=v.dataModel||o.getSeriesByIndex(v.seriesIndex);return l=g&&g.getDataParams(v.dataIndex,v.dataType,s)||{},!0}else if(v.eventData)return l=F({},v.eventData),!0},!0),l){var c=l.componentType,h=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",h=l.seriesIndex);var f=c&&h!=null&&o.getComponent(c,h),d=f&&e[f.mainType==="series"?"_chartsMap":"_componentsMap"][f.__viewId];process.env.NODE_ENV!=="production"&&!u&&!(f&&d)&&je("model or view can not be found by params"),l.event=n,l.type=a,e._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:f,view:d},e.trigger(a,l)}};i.zrEventfulCallAtLast=!0,e._zr.on(a,i,e)}),M(ol,function(a,i){e._messageCenter.on(i,function(n){this.trigger(i,n)},e)}),M(["selectchanged"],function(a){e._messageCenter.on(a,function(i){this.trigger(a,i)},e)}),zO(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){ar(this.id);return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){ar(this.id);return}this._disposed=!0;var e=this.getDom();e&&x1(this.getDom(),pv,"");var a=this,i=a._api,n=a._model;M(a._componentsViews,function(o){o.dispose(n,i)}),M(a._chartsViews,function(o){o.dispose(n,i)}),a._zr.dispose(),a._dom=a._model=a._chartsMap=a._componentsMap=a._chartsViews=a._componentsViews=a._scheduler=a._api=a._zr=a._throttledZrFlush=a._theme=a._coordSysMgr=a._messageCenter=null,delete sl[a.id]},t.prototype.resize=function(e){if(this[kt]){process.env.NODE_ENV!=="production"&&_t("`resize` should not be called during main process.");return}if(this._disposed){ar(this.id);return}this._zr.resize(e);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var i=a.resetOption("media"),n=e&&e.silent;this[Kt]&&(n==null&&(n=this[Kt].silent),i=!0,this[Kt]=null),this[kt]=!0;try{i&&Io(this),si.update.call(this,{type:"resize",animation:F({duration:0},e&&e.animation)})}catch(o){throw this[kt]=!1,o}this[kt]=!1,il.call(this,n),nl.call(this,n)}},t.prototype.showLoading=function(e,a){if(this._disposed){ar(this.id);return}if(re(e)&&(a=e,e=""),e=e||"default",this.hideLoading(),!dv[e]){process.env.NODE_ENV!=="production"&&je("Loading effects "+e+" not exists.");return}var i=dv[e](this._api,a),n=this._zr;this._loadingFX=i,n.add(i)},t.prototype.hideLoading=function(){if(this._disposed){ar(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var a=F({},e);return a.type=ol[e.type],a},t.prototype.dispatchAction=function(e,a){if(this._disposed){ar(this.id);return}if(re(a)||(a={silent:!!a}),!!$c[e.type]&&this._model){if(this[kt]){this._pendingActions.push(e);return}var i=a.silent;lv.call(this,e,i);var n=a.flush;n?this._zr.flush():n!==!1&&Le.browser.weChat&&this._throttledZrFlush(),il.call(this,i),nl.call(this,i)}},t.prototype.updateLabelLayout=function(){Vr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){ar(this.id);return}var a=e.seriesIndex,i=this.getModel(),n=i.getSeriesByIndex(a);process.env.NODE_ENV!=="production"&&ae(e.data&&n),n.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){Io=function(h){var f=h._scheduler;f.restorePipelines(h._model),f.prepareStageTasks(),nv(h,!0),nv(h,!1),f.plan()},nv=function(h,f){for(var d=h._model,p=h._scheduler,v=f?h._componentsViews:h._chartsViews,g=f?h._componentsMap:h._chartsMap,m=h._zr,y=h._api,_=0;_<v.length;_++)v[_].__alive=!1;f?d.eachComponent(function(S,L){S!=="series"&&w(L)}):d.eachSeries(w);function w(S){var L=S.__requireNewView;S.__requireNewView=!1;var C="_ec_"+S.id+"_"+S.type,T=!L&&g[C];if(!T){var A=Xr(S.type),D=f?Ke.getClass(A.main,A.sub):We.getClass(A.sub);process.env.NODE_ENV!=="production"&&ae(D,A.sub+" does not exist."),T=new D,T.init(d,y),g[C]=T,v.push(T),m.add(T.group)}S.__viewId=T.__id=C,T.__alive=!0,T.__model=S,T.group.__ecComponentInfo={mainType:S.mainType,index:S.componentIndex},!f&&p.prepareView(T,S,d,y)}for(var _=0;_<v.length;){var x=v[_];x.__alive?_++:(!f&&x.renderTask.dispose(),m.remove(x.group),x.dispose(d,y),v.splice(_,1),g[x.__id]===x&&delete g[x.__id],x.__id=x.group.__ecComponentInfo=null)}},Wc=function(h,f,d,p,v){var g=h._model;if(g.setUpdatePayload(d),!p){M([].concat(h._componentsViews).concat(h._chartsViews),x);return}var m={};m[p+"Id"]=d[p+"Id"],m[p+"Index"]=d[p+"Index"],m[p+"Name"]=d[p+"Name"];var y={mainType:p,query:m};v&&(y.subType=v);var _=d.excludeSeriesId,w;_!=null&&(w=Q(),M(Ve(_),function(S){var L=ut(S,null);L!=null&&w.set(L,!0)})),g&&g.eachComponent(y,function(S){var L=w&&w.get(S.id)!=null;if(!L)if(m_(d))if(S instanceof Xe)d.type===ji&&!d.notBlur&&!S.get(["emphasis","disabled"])&&IR(S,d,h._api);else{var C=Kd(S.mainType,S.componentIndex,d.name,h._api),T=C.focusSelf,A=C.dispatchers;d.type===ji&&T&&!d.notBlur&&qd(S.mainType,S.componentIndex,h._api),A&&M(A,function(D){d.type===ji?xa(D):Sa(D)})}else Qd(d)&&S instanceof Xe&&(NR(S,d,h._api),v_(S),_r(h))},h),g&&g.eachComponent(y,function(S){var L=w&&w.get(S.id)!=null;L||x(h[p==="series"?"_chartsMap":"_componentsMap"][S.__viewId])},h);function x(S){S&&S.__alive&&S[f]&&S[f](S.__model,g,h._api,d)}},si={prepareAndUpdate:function(h){Io(this),si.update.call(this,h,{optionChanged:h.newOption!=null})},update:function(h,f){var d=this._model,p=this._api,v=this._zr,g=this._coordSysMgr,m=this._scheduler;if(d){d.setUpdatePayload(h),m.restoreData(d,h),m.performSeriesTasks(d),g.create(d,p),m.performDataProcessorTasks(d,h),sv(this,d),g.update(d,p),e(d),m.performVisualTasks(d,h),uv(this,d,p,h,f);var y=d.get("backgroundColor")||"transparent",_=d.get("darkMode");v.setBackgroundColor(y),_!=null&&_!=="auto"&&v.setDarkMode(_),Vr.trigger("afterupdate",d,p)}},updateTransform:function(h){var f=this,d=this._model,p=this._api;if(d){d.setUpdatePayload(h);var v=[];d.eachComponent(function(m,y){if(m!=="series"){var _=f.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var w=_.updateTransform(y,d,p,h);w&&w.update&&v.push(_)}else v.push(_)}});var g=Q();d.eachSeries(function(m){var y=f._chartsMap[m.__viewId];if(y.updateTransform){var _=y.updateTransform(m,d,p,h);_&&_.update&&g.set(m.uid,1)}else g.set(m.uid,1)}),e(d),this._scheduler.performVisualTasks(d,h,{setDirty:!0,dirtyMap:g}),Hc(this,d,p,h,{},g),Vr.trigger("afterupdate",d,p)}},updateView:function(h){var f=this._model;f&&(f.setUpdatePayload(h),We.markUpdateMethod(h,"updateView"),e(f),this._scheduler.performVisualTasks(f,h,{setDirty:!0}),uv(this,f,this._api,h,{}),Vr.trigger("afterupdate",f,this._api))},updateVisual:function(h){var f=this,d=this._model;d&&(d.setUpdatePayload(h),d.eachSeries(function(p){p.getData().clearAllVisual()}),We.markUpdateMethod(h,"updateVisual"),e(d),this._scheduler.performVisualTasks(d,h,{visualType:"visual",setDirty:!0}),d.eachComponent(function(p,v){if(p!=="series"){var g=f.getViewOfComponentModel(v);g&&g.__alive&&g.updateVisual(v,d,f._api,h)}}),d.eachSeries(function(p){var v=f._chartsMap[p.__viewId];v.updateVisual(p,d,f._api,h)}),Vr.trigger("afterupdate",d,this._api))},updateLayout:function(h){si.update.call(this,h)}},ov=function(h,f,d,p){if(h._disposed){ar(h.id);return}for(var v=h._model,g=h._coordSysMgr.getCoordinateSystems(),m,y=Cs(v,d),_=0;_<g.length;_++){var w=g[_];if(w[f]&&(m=w[f](v,y,p))!=null)return m}process.env.NODE_ENV!=="production"&&je("No coordinate system that supports "+f+" found by the given finder.")},sv=function(h,f){var d=h._chartsMap,p=h._scheduler;f.eachSeries(function(v){p.updateStreamModes(v,d[v.__viewId])})},lv=function(h,f){var d=this,p=this.getModel(),v=h.type,g=h.escapeConnect,m=$c[v],y=m.actionInfo,_=(y.update||"update").split(":"),w=_.pop(),x=_[0]!=null&&Xr(_[0]);this[kt]=!0;var S=[h],L=!1;h.batch&&(L=!0,S=W(h.batch,function(P){return P=ie(F({},P),h),P.batch=null,P}));var C=[],T,A=Qd(h),D=m_(h);if(D&&p_(this._api),M(S,function(P){if(T=m.action(P,d._model,d._api),T=T||F({},P),T.type=y.event||T.type,C.push(T),D){var k=Sd(h),N=k.queryOptionMap,O=k.mainTypeSpecified,R=O?N.keys()[0]:"series";Wc(d,w,P,R),_r(d)}else A?(Wc(d,w,P,"series"),_r(d)):x&&Wc(d,w,P,x.main,x.sub)}),w!=="none"&&!D&&!A&&!x)try{this[Kt]?(Io(this),si.update.call(this,h),this[Kt]=null):si[w].call(this,h)}catch(P){throw this[kt]=!1,P}if(L?T={type:y.event||v,escapeConnect:g,batch:C}:T=C[0],this[kt]=!1,!f){var E=this._messageCenter;if(E.trigger(T.type,T),A){var I={type:"selectchanged",escapeConnect:g,selected:RR(p),isFromClick:h.isFromClick||!1,fromAction:h.type,fromActionPayload:h};E.trigger(I.type,I)}}},il=function(h){for(var f=this._pendingActions;f.length;){var d=f.shift();lv.call(this,d,h)}},nl=function(h){!h&&this.trigger("updated")},Tx=function(h,f){h.on("rendered",function(d){f.trigger("rendered",d),h.animation.isFinished()&&!f[Kt]&&!f._scheduler.unfinished&&!f._pendingActions.length&&f.trigger("finished")})},Cx=function(h,f){h.on("mouseover",function(d){var p=d.target,v=dn(p,Ja);v&&(PR(v,d,f._api),_r(f))}).on("mouseout",function(d){var p=d.target,v=dn(p,Ja);v&&(kR(v,d,f._api),_r(f))}).on("click",function(d){var p=d.target,v=dn(p,function(y){return ue(y).dataIndex!=null},!0);if(v){var g=v.selected?"unselect":"select",m=ue(v);f._api.dispatchAction({type:g,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function e(h){h.clearColorPalette(),h.eachSeries(function(f){f.clearColorPalette()})}function a(h){var f=[],d=[],p=!1;if(h.eachComponent(function(y,_){var w=_.get("zlevel")||0,x=_.get("z")||0,S=_.getZLevelKey();p=p||!!S,(y==="series"?d:f).push({zlevel:w,z:x,idx:_.componentIndex,type:y,key:S})}),p){var v=f.concat(d),g,m;gu(v,function(y,_){return y.zlevel===_.zlevel?y.z-_.z:y.zlevel-_.zlevel}),M(v,function(y){var _=h.getComponent(y.type,y.idx),w=y.zlevel,x=y.key;g!=null&&(w=Math.max(g,w)),x?(w===g&&x!==m&&w++,m=x):m&&(w===g&&w++,m=""),g=w,_.setZLevel(w)})}}uv=function(h,f,d,p,v){a(f),Dx(h,f,d,p,v),M(h._chartsViews,function(g){g.__alive=!1}),Hc(h,f,d,p,v),M(h._chartsViews,function(g){g.__alive||g.remove(f,d)})},Dx=function(h,f,d,p,v,g){M(g||h._componentsViews,function(m){var y=m.__model;u(y,m),m.render(y,f,d,p),s(y,m),c(y,m)})},Hc=function(h,f,d,p,v,g){var m=h._scheduler;v=F(v||{},{updatedSeries:f.getSeries()}),Vr.trigger("series:beforeupdate",f,d,v);var y=!1;f.eachSeries(function(_){var w=h._chartsMap[_.__viewId];w.__alive=!0;var x=w.renderTask;m.updatePayload(x,p),u(_,w),g&&g.get(_.uid)&&x.dirty(),x.perform(m.getPerformArgs(x))&&(y=!0),w.group.silent=!!_.get("silent"),o(_,w),v_(_)}),m.unfinished=y||m.unfinished,Vr.trigger("series:layoutlabels",f,d,v),Vr.trigger("series:transition",f,d,v),f.eachSeries(function(_){var w=h._chartsMap[_.__viewId];s(_,w),c(_,w)}),n(h,f),Vr.trigger("series:afterupdate",f,d,v)},_r=function(h){h[av]=!0,h.getZr().wakeUp()},Ex=function(h){h[av]&&(h.getZr().storage.traverse(function(f){lo(f)||i(f)}),h[av]=!1)};function i(h){for(var f=[],d=h.currentStates,p=0;p<d.length;p++){var v=d[p];v==="emphasis"||v==="blur"||v==="select"||f.push(v)}h.selected&&h.states.select&&f.push("select"),h.hoverState===Zu&&h.states.emphasis?f.push("emphasis"):h.hoverState===Is&&h.states.blur&&f.push("blur"),h.useStates(f)}function n(h,f){var d=h._zr,p=d.storage,v=0;p.traverse(function(g){g.isGroup||v++}),v>f.get("hoverLayerThreshold")&&!Le.node&&!Le.worker&&f.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=h._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(h,f){var d=h.get("blendMode")||null;f.eachRendered(function(p){p.isGroup||(p.style.blend=d)})}function s(h,f){if(!h.preventAutoZ){var d=h.get("z")||0,p=h.get("zlevel")||0;f.eachRendered(function(v){return l(v,d,p,-1/0),!0})}}function l(h,f,d,p){var v=h.getTextContent(),g=h.getTextGuideLine(),m=h.isGroup;if(m)for(var y=h.childrenRef(),_=0;_<y.length;_++)p=Math.max(l(y[_],f,d,p),p);else h.z=f,h.zlevel=d,p=Math.max(h.z2,p);if(v&&(v.z=f,v.zlevel=d,isFinite(p)&&(v.z2=p+2)),g){var w=h.textGuideLineConfig;g.z=f,g.zlevel=d,isFinite(p)&&(g.z2=p+(w&&w.showAbove?1:-1))}return p}function u(h,f){f.eachRendered(function(d){if(!lo(d)){var p=d.getTextContent(),v=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function c(h,f){var d=h.getModel("stateAnimation"),p=h.isAnimationEnabled(),v=d.get("duration"),g=v>0?{duration:v,delay:d.get("delay"),easing:d.get("easing")}:null;f.eachRendered(function(m){if(m.states&&m.states.emphasis){if(lo(m))return;if(m instanceof _e&&FR(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(p){m.stateTransition=g;var _=m.getTextContent(),w=m.getTextGuideLine();_&&(_.stateTransition=g),w&&(w.stateTransition=g)}m.__dirty&&i(m)}})}Ax=function(h){return new(function(f){z(d,f);function d(){return f!==null&&f.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(p){for(;p;){var v=p.__ecComponentInfo;if(v!=null)return h._model.getComponent(v.mainType,v.index);p=p.parent}},d.prototype.enterEmphasis=function(p,v){xa(p,v),_r(h)},d.prototype.leaveEmphasis=function(p,v){Sa(p,v),_r(h)},d.prototype.enterBlur=function(p){c_(p),_r(h)},d.prototype.leaveBlur=function(p){Xd(p),_r(h)},d.prototype.enterSelect=function(p){h_(p),_r(h)},d.prototype.leaveSelect=function(p){f_(p),_r(h)},d.prototype.getModel=function(){return h.getModel()},d.prototype.getViewOfComponentModel=function(p){return h.getViewOfComponentModel(p)},d.prototype.getViewOfSeriesModel=function(p){return h.getViewOfSeriesModel(p)},d}(Fb))(h)},Mx=function(h){function f(d,p){for(var v=0;v<d.length;v++){var g=d[v];g[iv]=p}}M(ol,function(d,p){h._messageCenter.on(p,function(v){if(kx[h.group]&&h[iv]!==yx){if(v&&v.escapeConnect)return;var g=h.makeActionFromEvent(v),m=[];M(sl,function(y){y!==h&&y.group===h.group&&m.push(y)}),f(m,yx),M(m,function(y){y[iv]!==Az&&y.dispatchAction(g)}),f(m,Mz)}})})}}(),t}(or),cv=Ix.prototype;cv.on=_x("on"),cv.off=_x("off"),cv.one=function(r,t,e){var a=this;Ir("ECharts#one is deprecated.");function i(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];t&&t.apply&&t.apply(this,n),a.off(r,i)}this.on.call(this,r,i,e)};var Ez=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function ar(r){process.env.NODE_ENV!=="production"&&je("Instance "+r+" has been disposed")}var $c={},ol={},hv=[],fv=[],Uc=[],Px={},dv={},sl={},kx={},Iz=+new Date-0,pv="_echarts_instance_";function Pz(r,t,e){var a=!(e&&e.ssr);if(a){if(process.env.NODE_ENV!=="production"&&!r)throw new Error("Initialize failed: invalid dom.");var i=kz(r);if(i)return process.env.NODE_ENV!=="production"&&je("There is a chart instance already initialized on the dom."),i;process.env.NODE_ENV!=="production"&&Li(r)&&r.nodeName.toUpperCase()!=="CANVAS"&&(!r.clientWidth&&(!e||e.width==null)||!r.clientHeight&&(!e||e.height==null))&&je("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var n=new Ix(r,t,e);return n.id="ec_"+Iz++,sl[n.id]=n,a&&x1(r,pv,n.id),Mx(n),Vr.trigger("afterinit",n),n}function kz(r){return sl[CN(r,pv)]}function Nx(r,t){Px[r]=t}function Rx(r){me(fv,r)<0&&fv.push(r)}function Vx(r,t){gv(hv,r,t,bz)}function Nz(r){vv("afterinit",r)}function Rz(r){vv("afterupdate",r)}function vv(r,t){Vr.on(r,t)}function ra(r,t,e){te(t)&&(e=t,t="");var a=re(r)?r.type:[r,r={event:t}][0];r.event=(r.event||a).toLowerCase(),t=r.event,!ol[t]&&(ae(mx.test(a)&&mx.test(t)),$c[a]||($c[a]={action:e,actionInfo:r}),ol[t]=a)}function Vz(r,t){wo.register(r,t)}function Oz(r,t){gv(Uc,r,t,px,"layout")}function mn(r,t){gv(Uc,r,t,vx,"visual")}var Ox=[];function gv(r,t,e,a,i){if((te(t)||re(t))&&(e=t,t=a),process.env.NODE_ENV!=="production"){if(isNaN(t)||t==null)throw new Error("Illegal priority");M(r,function(o){ae(o.__raw!==e)})}if(!(me(Ox,e)>=0)){Ox.push(e);var n=Ww.wrapStageHandler(e,i);n.__prio=t,n.__raw=e,r.push(n)}}function zx(r,t){dv[r]=t}function zz(r,t,e){var a=vz("registerMap");a&&a(r,t,e)}var Bz=ZV;mn(rv,_O),mn(Gc,bO),mn(Gc,wO),mn(rv,VO),mn(Gc,OO),mn(gx,fz),Rx(Zb),Vx(yz,DV),zx("default",xO),ra({type:ji,event:ji,update:ji},et),ra({type:Xu,event:Xu,update:Xu},et),ra({type:ks,event:ks,update:ks},et),ra({type:ju,event:ju,update:ju},et),ra({type:Ns,event:Ns,update:Ns},et),Nx("light",kO),Nx("dark",NO);var Bx=[],Fz={registerPreprocessor:Rx,registerProcessor:Vx,registerPostInit:Nz,registerPostUpdate:Rz,registerUpdateLifecycle:vv,registerAction:ra,registerCoordinateSystem:Vz,registerLayout:Oz,registerVisual:mn,registerTransform:Bz,registerLoading:zx,registerMap:zz,registerImpl:pz,PRIORITY:Dz,ComponentModel:Se,ComponentView:Ke,SeriesModel:Xe,ChartView:We,registerComponentModel:function(r){Se.registerClass(r)},registerComponentView:function(r){Ke.registerClass(r)},registerSeriesModel:function(r){Xe.registerClass(r)},registerChartView:function(r){We.registerClass(r)},registerSubTypeDefaulter:function(r,t){Se.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){rN(r,t)}};function ye(r){if(G(r)){M(r,function(t){ye(t)});return}me(Bx,r)>=0||(Bx.push(r),te(r)&&(r={install:r}),r.install(Fz))}function ll(r){return r==null?0:r.length||1}function Fx(r){return r}var Gz=function(){function r(t,e,a,i,n,o){this._old=t,this._new=e,this._oldKeyGetter=a||Fx,this._newKeyGetter=i||Fx,this.context=n,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,a={},i=new Array(t.length),n=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,a,n,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=i[o],l=a[s],u=ll(l);if(u>1){var c=l.shift();l.length===1&&(a[s]=l[0]),this._update&&this._update(c,o)}else u===1?(a[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(n,a)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,a={},i={},n=[],o=[];this._initIndexMap(t,a,n,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var s=0;s<n.length;s++){var l=n[s],u=a[l],c=i[l],h=ll(u),f=ll(c);if(h>1&&f===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(h===1&&f>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(h===1&&f===1)this._update&&this._update(c,u),i[l]=null;else if(h>1&&f>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(h>1)for(var d=0;d<h;d++)this._remove&&this._remove(u[d]);else this._remove&&this._remove(u)}this._performRestAdd(o,i)},r.prototype._performRestAdd=function(t,e){for(var a=0;a<t.length;a++){var i=t[a],n=e[i],o=ll(n);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(n[s]);else o===1&&this._add&&this._add(n);e[i]=null}},r.prototype._initIndexMap=function(t,e,a,i){for(var n=this._diffModeMultiple,o=0;o<t.length;o++){var s="_ec_"+this[i](t[o],o);if(n||(a[o]=s),!!e){var l=e[s],u=ll(l);u===0?(e[s]=o,n&&a.push(s)):u===1?e[s]=[l,o]:l.push(o)}}},r}();const Ca=Gz;var Wz=function(){function r(t,e){this._encode=t,this._schema=e}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r}();function Hz(r,t){var e={},a=e.encode={},i=Q(),n=[],o=[],s={};M(r.dimensions,function(f){var d=r.getDimensionInfo(f),p=d.coordDim;if(p){process.env.NODE_ENV!=="production"&&ae(Tp.get(p)==null);var v=d.coordDimIndex;mv(a,p)[v]=f,d.isExtraCoord||(i.set(p,1),$z(d.type)&&(n[0]=f),mv(s,p)[v]=r.getDimensionIndex(d.name)),d.defaultTooltip&&o.push(f)}Tp.each(function(g,m){var y=mv(a,m),_=d.otherDims[m];_!=null&&_!==!1&&(y[_]=d.name)})});var l=[],u={};i.each(function(f,d){var p=a[d];u[d]=p[0],l=l.concat(p)}),e.dataDimsOnCoord=l,e.dataDimIndicesOnCoord=W(l,function(f){return r.getDimensionInfo(f).storeDimIndex}),e.encodeFirstDimNotExtra=u;var c=a.label;c&&c.length&&(n=c.slice());var h=a.tooltip;return h&&h.length?o=h.slice():o.length||(o=n.slice()),a.defaultedLabel=n,a.defaultedTooltip=o,e.userOutput=new Wz(s,t),e}function mv(r,t){return r.hasOwnProperty(t)||(r[t]=[]),r[t]}function Yc(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function $z(r){return!(r==="ordinal"||r==="time")}var Uz=function(){function r(t){this.otherDims={},t!=null&&F(this,t)}return r}();const Zc=Uz;var Yz=xe(),Zz={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Gx=function(){function r(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=$x(this.source)))},r.prototype.getSourceDimensionIndex=function(t){return le(this._dimNameMap.get(t),-1)},r.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},r.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=Kb(this.source),a=!Ux(t),i="",n=[],o=0,s=0;o<t;o++){var l=void 0,u=void 0,c=void 0,h=this.dimensions[s];if(h&&h.storeDimIndex===o)l=e?h.name:null,u=h.type,c=h.ordinalMeta,s++;else{var f=this.getSourceDimension(o);f&&(l=e?f.name:null,u=f.type)}n.push({property:l,type:u,ordinalMeta:c}),e&&l!=null&&(!h||!h.isCalculationCoord)&&(i+=a?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=Zz[u]||"f",c&&(i+=c.uid),i+="$"}var d=this.source,p=[d.seriesLayoutBy,d.startIndex,i].join("$$");return{dimensions:n,hash:p}},r.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,a=0;e<this._fullDimCount;e++){var i=void 0,n=this.dimensions[a];if(n&&n.storeDimIndex===e)n.isCalculationCoord||(i=n.name),a++;else{var o=this.getSourceDimension(e);o&&(i=o.name)}t.push(i)}return t},r.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r}();function Wx(r){return r instanceof Gx}function Hx(r){for(var t=Q(),e=0;e<(r||[]).length;e++){var a=r[e],i=re(a)?a.name:a;i!=null&&t.get(i)==null&&t.set(i,e)}return t}function $x(r){var t=Yz(r);return t.dimNameMap||(t.dimNameMap=Hx(r.dimensionsDefine))}function Ux(r){return r>30}var ul=re,li=W,Xz=typeof Int32Array>"u"?Array:Int32Array,jz="e\0\0",Yx=-1,qz=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Kz=["_approximateExtent"],Zx,Xc,cl,Po,yv,hl,_v,Jz=function(){function r(t,e){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var a,i=!1;Wx(t)?(a=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,a=t),a=a||["x","y"];for(var n={},o=[],s={},l=!1,u={},c=0;c<a.length;c++){var h=a[c],f=X(h)?new Zc({name:h}):h instanceof Zc?h:new Zc(h),d=f.name;f.type=f.type||"float",f.coordDim||(f.coordDim=d,f.coordDimIndex=0);var p=f.otherDims=f.otherDims||{};o.push(d),n[d]=f,u[d]!=null&&(l=!0),f.createInvertedIndices&&(s[d]=[]),p.itemName===0&&(this._nameDimIdx=c),p.itemId===0&&(this._idDimIdx=c),process.env.NODE_ENV!=="production"&&ae(i||f.storeDimIndex>=0),i&&(f.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=n,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=s,this._dimOmitted){var v=this._dimIdxToName=Q();M(o,function(g){v.set(n[g].storeDimIndex,g)})}}return r.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(e==null)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var a=this._dimIdxToName.get(e);if(a!=null)return a;var i=this._schema.getSourceDimension(e);if(i)return i.name},r.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(e!=null)return e;if(t==null)return-1;var a=this._getDimInfo(t);return a?a.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},r.prototype._recognizeDimIndex=function(t){if(De(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},r.prototype._getStoreDimIndex=function(t){var e=this.getDimensionIndex(t);if(process.env.NODE_ENV!=="production"&&e==null)throw new Error("Unknown dimension "+t);return e},r.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},r.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(a){return e.hasOwnProperty(a)?e[a]:void 0}:function(a){return e[a]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(t,e){var a=this._dimSummary;if(e==null)return a.encodeFirstDimNotExtra[t];var i=a.encode[t];return i?i[e]:null},r.prototype.mapDimensionsAll=function(t){var e=this._dimSummary,a=e.encode[t];return(a||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(t,e,a){var i=this,n;if(t instanceof Wp&&(n=t),!n){var o=this.dimensions,s=Rp(t)||Dt(t)?new ew(t,o.length):t;n=new Wp;var l=li(o,function(u){return{type:i._dimInfos[u].type,property:u}});n.initData(s,l,a)}this._store=n,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,n.count()),this._dimSummary=Hz(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},r.prototype.appendValues=function(t,e){var a=this._store.appendValues(t,e&&e.length),i=a.start,n=a.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var s=i;s<n;s++){var l=s-i;this._nameList[s]=e[l],o&&_v(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,a=0;a<e.length;a++){var i=this._dimInfos[e[a]];i.ordinalMeta&&t.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==La&&!t.fillStorage},r.prototype._doInit=function(t,e){if(!(t>=e)){var a=this._store,i=a.getProvider();this._updateOrdinalMeta();var n=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===vr;if(l&&!i.pure)for(var u=[],c=t;c<e;c++){var h=i.getItem(c,u);if(!this.hasItemOption&&dN(h)&&(this.hasItemOption=!0),h){var f=h.name;n[c]==null&&f!=null&&(n[c]=ut(f,null));var d=h.id;o[c]==null&&d!=null&&(o[c]=ut(d,null))}}if(this._shouldMakeIdFromName())for(var c=t;c<e;c++)_v(this,c);Zx(this)}},r.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},r.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},r.prototype.setCalculationInfo=function(t,e){ul(t)?F(this._calculationInfo,t):this._calculationInfo[t]=e},r.prototype.getName=function(t){var e=this.getRawIndex(t),a=this._nameList[e];return a==null&&this._nameDimIdx!=null&&(a=cl(this,this._nameDimIdx,e)),a==null&&(a=""),a},r.prototype._getCategory=function(t,e){var a=this._store.get(t,e),i=this._store.getOrdinalMeta(t);return i?i.categories[a]:a},r.prototype.getId=function(t){return Xc(this,this.getRawIndex(t))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(t,e){var a=this._store,i=this._dimInfos[t];if(i)return a.get(i.storeDimIndex,e)},r.prototype.getByRawIndex=function(t,e){var a=this._store,i=this._dimInfos[t];if(i)return a.getByRawIndex(i.storeDimIndex,e)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},r.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},r.prototype.getValues=function(t,e){var a=this,i=this._store;return G(t)?i.getValues(li(t,function(n){return a._getStoreDimIndex(n)}),e):i.getValues(t)},r.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,a=0,i=e.length;a<i;a++)if(isNaN(this._store.get(e[a],t)))return!1;return!0},r.prototype.indexOfName=function(t){for(var e=0,a=this._store.count();e<a;e++)if(this.getName(e)===t)return e;return-1},r.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},r.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},r.prototype.rawIndexOf=function(t,e){var a=t&&this._invertedIndicesMap[t];if(process.env.NODE_ENV!=="production"&&!a)throw new Error("Do not supported yet");var i=a&&a[e];return i==null||isNaN(i)?Yx:i},r.prototype.indicesOfNearest=function(t,e,a){return this._store.indicesOfNearest(this._getStoreDimIndex(t),e,a)},r.prototype.each=function(t,e,a){te(t)&&(a=e,e=t,t=[]);var i=a||this,n=li(Po(t),this._getStoreDimIndex,this);this._store.each(n,i?j(e,i):e)},r.prototype.filterSelf=function(t,e,a){te(t)&&(a=e,e=t,t=[]);var i=a||this,n=li(Po(t),this._getStoreDimIndex,this);return this._store=this._store.filter(n,i?j(e,i):e),this},r.prototype.selectRange=function(t){var e=this,a={},i=we(t);return M(i,function(n){var o=e._getStoreDimIndex(n);a[o]=t[n]}),this._store=this._store.selectRange(a),this},r.prototype.mapArray=function(t,e,a){te(t)&&(a=e,e=t,t=[]),a=a||this;var i=[];return this.each(t,function(){i.push(e&&e.apply(this,arguments))},a),i},r.prototype.map=function(t,e,a,i){var n=a||i||this,o=li(Po(t),this._getStoreDimIndex,this),s=hl(this);return s._store=this._store.map(o,n?j(e,n):e),s},r.prototype.modify=function(t,e,a,i){var n=this,o=a||i||this;process.env.NODE_ENV!=="production"&&M(Po(t),function(l){var u=n.getDimensionInfo(l);u.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var s=li(Po(t),this._getStoreDimIndex,this);this._store.modify(s,o?j(e,o):e)},r.prototype.downSample=function(t,e,a,i){var n=hl(this);return n._store=this._store.downSample(this._getStoreDimIndex(t),e,a,i),n},r.prototype.minmaxDownSample=function(t,e){var a=hl(this);return a._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),e),a},r.prototype.lttbDownSample=function(t,e){var a=hl(this);return a._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),a},r.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},r.prototype.getItemModel=function(t){var e=this.hostModel,a=this.getRawDataItem(t);return new Ge(a,e,e&&e.ecModel)},r.prototype.diff=function(t){var e=this;return new Ca(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(a){return Xc(t,a)},function(a){return Xc(e,a)})},r.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},r.prototype.setVisual=function(t,e){this._visual=this._visual||{},ul(t)?F(this._visual,t):this._visual[t]=e},r.prototype.getItemVisual=function(t,e){var a=this._itemVisuals[t],i=a&&a[e];return i??this.getVisual(e)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(t,e){var a=this._itemVisuals,i=a[t];i||(i=a[t]={});var n=i[e];return n==null&&(n=this.getVisual(e),G(n)?n=n.slice():ul(n)&&(n=F({},n)),i[e]=n),n},r.prototype.setItemVisual=function(t,e,a){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,ul(e)?F(i,e):i[e]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){ul(t)?F(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,a){this._itemLayouts[t]=a?F(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var a=this.hostModel&&this.hostModel.seriesIndex;Hd(a,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){M(this._graphicEls,function(a,i){a&&t&&t.call(e,a,i)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:li(this.dimensions,this._getDimInfo,this),this.hostModel)),yv(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var a=this[t];te(a)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=a.apply(this,arguments);return e.apply(this,[i].concat(bf(arguments)))})},r.internalField=function(){Zx=function(t){var e=t._invertedIndicesMap;M(e,function(a,i){var n=t._dimInfos[i],o=n.ordinalMeta,s=t._store;if(o){a=e[i]=new Xz(o.categories.length);for(var l=0;l<a.length;l++)a[l]=Yx;for(var l=0;l<s.count();l++)a[s.get(n.storeDimIndex,l)]=l}})},cl=function(t,e,a){return ut(t._getCategory(e,a),null)},Xc=function(t,e){var a=t._idList[e];return a==null&&t._idDimIdx!=null&&(a=cl(t,t._idDimIdx,e)),a==null&&(a=jz+e),a},Po=function(t){return G(t)||(t=t!=null?[t]:[]),t},hl=function(t){var e=new r(t._schema?t._schema:li(t.dimensions,t._getDimInfo,t),t.hostModel);return yv(e,t),e},yv=function(t,e){M(qz.concat(e.__wrappedMethods||[]),function(a){e.hasOwnProperty(a)&&(t[a]=e[a])}),t.__wrappedMethods=e.__wrappedMethods,M(Kz,function(a){t[a]=ne(e[a])}),t._calculationInfo=F({},e._calculationInfo)},_v=function(t,e){var a=t._nameList,i=t._idList,n=t._nameDimIdx,o=t._idDimIdx,s=a[e],l=i[e];if(s==null&&n!=null&&(a[e]=s=cl(t,n,e)),l==null&&o!=null&&(i[e]=l=cl(t,o,e)),l==null&&s!=null){var u=t._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),i[e]=l}}}(),r}();const Ft=Jz;function fl(r,t){Rp(r)||(r=Op(r)),t=t||{};var e=t.coordDimensions||[],a=t.dimensionsDefine||r.dimensionsDefine||[],i=Q(),n=[],o=eB(r,e,a,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Ux(o),l=a===r.dimensionsDefine,u=l?$x(r):Hx(a),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(r,o));for(var h=Q(c),f=new fw(o),d=0;d<f.length;d++)f[d]=-1;function p(T){var A=f[T];if(A<0){var D=a[T],E=re(D)?D:{name:D},I=new Zc,P=E.name;P!=null&&u.get(P)!=null&&(I.name=I.displayName=P),E.type!=null&&(I.type=E.type),E.displayName!=null&&(I.displayName=E.displayName);var k=n.length;return f[T]=k,I.storeDimIndex=T,n.push(I),I}return n[A]}if(!s)for(var d=0;d<o;d++)p(d);h.each(function(T,A){var D=Ve(T).slice();if(D.length===1&&!X(D[0])&&D[0]<0){h.set(A,!1);return}var E=h.set(A,[]);M(D,function(I,P){var k=X(I)?u.get(I):I;k!=null&&k<o&&(E[P]=k,g(p(k),A,P))})});var v=0;M(e,function(T){var A,D,E,I;if(X(T))A=T,I={};else{I=T,A=I.name;var P=I.ordinalMeta;I.ordinalMeta=null,I=F({},I),I.ordinalMeta=P,D=I.dimsDef,E=I.otherDims,I.name=I.coordDim=I.coordDimIndex=I.dimsDef=I.otherDims=null}var k=h.get(A);if(k!==!1){if(k=Ve(k),!k.length)for(var N=0;N<(D&&D.length||1);N++){for(;v<o&&p(v).coordDim!=null;)v++;v<o&&k.push(v++)}M(k,function(O,R){var V=p(O);if(l&&I.type!=null&&(V.type=I.type),g(ie(V,I),A,R),V.name==null&&D){var B=D[R];!re(B)&&(B={name:B}),V.name=V.displayName=B.name,V.defaultTooltip=B.defaultTooltip}E&&ie(V.otherDims,E)})}});function g(T,A,D){Tp.get(A)!=null?T.otherDims[A]=D:(T.coordDim=A,T.coordDimIndex=D,i.set(A,!0))}var m=t.generateCoord,y=t.generateCoordCount,_=y!=null;y=m?y||1:0;var w=m||"value";function x(T){T.name==null&&(T.name=T.coordDim)}if(s)M(n,function(T){x(T)}),n.sort(function(T,A){return T.storeDimIndex-A.storeDimIndex});else for(var S=0;S<o;S++){var L=p(S),C=L.coordDim;C==null&&(L.coordDim=tB(w,i,_),L.coordDimIndex=0,(!m||y<=0)&&(L.isExtraCoord=!0),y--),x(L),L.type==null&&(Mb(r,S)===St.Must||L.isExtraCoord&&(L.otherDims.itemName!=null||L.otherDims.seriesName!=null))&&(L.type="ordinal")}return Qz(n),new Gx({source:r,dimensions:n,fullDimensionCount:o,dimensionOmitted:s})}function Qz(r){for(var t=Q(),e=0;e<r.length;e++){var a=r[e],i=a.name,n=t.get(i)||0;n>0&&(a.name=i+(n-1)),n++,t.set(i,n)}}function eB(r,t,e,a){var i=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,a||0);return M(t,function(n){var o;re(n)&&(o=n.dimsDef)&&(i=Math.max(i,o.length))}),i}function tB(r,t,e){if(e||t.hasKey(r)){for(var a=0;t.hasKey(r+a);)a++;r+=a}return t.set(r,!0),r}var rB=function(){function r(t){this.coordSysDims=[],this.axisMap=Q(),this.categoryAxisMap=Q(),this.coordSysName=t}return r}();function aB(r){var t=r.get("coordinateSystem"),e=new rB(t),a=iB[t];if(a)return a(r,e,e.axisMap,e.categoryAxisMap),e}var iB={cartesian2d:function(r,t,e,a){var i=r.getReferringComponents("xAxis",ot).models[0],n=r.getReferringComponents("yAxis",ot).models[0];if(process.env.NODE_ENV!=="production"){if(!i)throw new Error('xAxis "'+it(r.get("xAxisIndex"),r.get("xAxisId"),0)+'" not found');if(!n)throw new Error('yAxis "'+it(r.get("xAxisIndex"),r.get("yAxisId"),0)+'" not found')}t.coordSysDims=["x","y"],e.set("x",i),e.set("y",n),ko(i)&&(a.set("x",i),t.firstCategoryDimIndex=0),ko(n)&&(a.set("y",n),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,a){var i=r.getReferringComponents("singleAxis",ot).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("singleAxis should be specified.");t.coordSysDims=["single"],e.set("single",i),ko(i)&&(a.set("single",i),t.firstCategoryDimIndex=0)},polar:function(r,t,e,a){var i=r.getReferringComponents("polar",ot).models[0],n=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!o)throw new Error("angleAxis option not found");if(!n)throw new Error("radiusAxis option not found")}t.coordSysDims=["radius","angle"],e.set("radius",n),e.set("angle",o),ko(n)&&(a.set("radius",n),t.firstCategoryDimIndex=0),ko(o)&&(a.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,a){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,a){var i=r.ecModel,n=i.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=n.dimensions.slice();M(n.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];e.set(c,u),ko(u)&&(a.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function ko(r){return r.get("type")==="category"}function nB(r,t,e){e=e||{};var a=e.byIndex,i=e.stackedCoordDimension,n,o,s;oB(t)?n=t:(o=t.schema,n=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,c,h,f;if(M(n,function(y,_){X(y)&&(n[_]=y={name:y}),l&&!y.isExtraCoord&&(!a&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(c=y))}),c&&!a&&!u&&(a=!0),c){h="__\0ecstackresult_"+r.id,f="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var d=c.coordDim,p=c.type,v=0;M(n,function(y){y.coordDim===d&&v++});var g={name:h,coordDim:d,coordDimIndex:v,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length},m={name:f,coordDim:f,coordDimIndex:v+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(f,p),m.storeDimIndex=s.ensureCalculationDimension(h,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(n.push(g),n.push(m))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:f,stackResultDimension:h}}function oB(r){return!Wx(r.schema)}function ui(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function Xx(r,t){return ui(r,t)?r.getCalculationInfo("stackResultDimension"):t}function sB(r,t){var e=r.get("coordinateSystem"),a=wo.get(e),i;return t&&t.coordSysDims&&(i=W(t.coordSysDims,function(n){var o={name:n},s=t.axisMap.get(n);if(s){var l=s.get("type");o.type=Yc(l)}return o})),i||(i=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),i}function lB(r,t,e){var a,i;return e&&M(r,function(n,o){var s=n.coordDim,l=e.categoryAxisMap.get(s);l&&(a==null&&(a=o),n.ordinalMeta=l.getOrdinalMeta(),t&&(n.createInvertedIndices=!0)),n.otherDims.itemName!=null&&(i=!0)}),!i&&a!=null&&(r[a].otherDims.itemName=0),a}function Da(r,t,e){e=e||{};var a=t.getSourceManager(),i,n=!1;r?(n=!0,i=Op(r)):(i=a.getSource(),n=i.sourceFormat===vr);var o=aB(t),s=sB(t,o),l=e.useEncodeDefaulter,u=te(l)?l:l?fe(Ab,s,t):null,c={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!n},h=fl(i,c),f=lB(h.dimensions,e.createInvertedIndices,o),d=n?null:a.getSharedDataStore(h),p=nB(t,{schema:h,store:d}),v=new Ft(h,t);v.setCalculationInfo(p);var g=f!=null&&uB(i)?function(m,y,_,w){return w===f?_:this.defaultDimValueGetter(m,y,_,w)}:null;return v.hasItemOption=!1,v.initData(n?i:d,null,g),v}function uB(r){if(r.sourceFormat===vr){var t=cB(r.data||[]);return!G(eo(t))}}function cB(r){for(var t=0;t<r.length&&r[t]==null;)t++;return r[t]}var jx=function(){function r(t){this._setting=t||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},r.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var a=this._extent;isNaN(t)||(a[0]=t),isNaN(e)||(a[1]=e)},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r}();Bu(jx);const Aa=jx;var hB=0,fB=function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++hB}return r.createByAxisModel=function(t){var e=t.option,a=e.data,i=a&&W(a,dB);return new r({categories:i,needCollect:!i,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,a=this._needCollect;if(!X(t)&&!a)return t;if(a&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return e=i.get(t),e==null&&(a?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=Q(this.categories))},r}();function dB(r){return re(r)&&r.value!=null?r.value:r+""}const bv=fB;function pB(r){var t=Math.pow(10,Ou(Math.abs(r))),e=Math.abs(r/t);return e===0||e===1||e===2||e===3||e===5}function wv(r){return r.type==="interval"||r.type==="log"}function vB(r,t,e,a){var i={},n=r[1]-r[0],o=i.interval=l1(n/t,!0);e!=null&&o<e&&(o=i.interval=e),a!=null&&o>a&&(o=i.interval=a);var s=i.intervalPrecision=qx(o),l=i.niceTickExtent=[Qe(Math.ceil(r[0]/o)*o,s),Qe(Math.floor(r[1]/o)*o,s)];return gB(l,r),i}function xv(r){var t=Math.pow(10,Ou(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,Qe(e*t)}function qx(r){return Yr(r)+2}function Kx(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function gB(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),Kx(r,0,t),Kx(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function jc(r,t){return r>=t[0]&&r<=t[1]}function qc(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function Kc(r,t){return r*(t[1]-t[0])+t[0]}var Jx=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;a.type="ordinal";var i=a.getSetting("ordinalMeta");return i||(i=new bv({})),G(i)&&(i=new bv({categories:W(i,function(n){return re(n)?n.value:n})})),a._ordinalMeta=i,a._extent=a.getSetting("extent")||[0,i.categories.length-1],a}return t.prototype.parse=function(e){return e==null?NaN:X(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),jc(e,this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),qc(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(Kc(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],a=this._extent,i=a[0];i<=a[1];)e.push({value:i}),i++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var a=e.ordinalNumbers,i=this._ordinalNumbersByTick=[],n=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,a.length);o<l;++o){var u=a[o];i[o]=u,n[u]=o}for(var c=0;o<s;++o){for(;n[c]!=null;)c++;i.push(c),n[c]=o}},t.prototype._getTickNumber=function(e){var a=this._ticksByOrdinalNumber;return a&&e>=0&&e<a.length?a[e]:e},t.prototype.getRawOrdinalNumber=function(e){var a=this._ordinalNumbersByTick;return a&&e>=0&&e<a.length?a[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var a=this.getRawOrdinalNumber(e.value),i=this._ordinalMeta.categories[a];return i==null?"":i+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,a){this.unionExtent(e.getApproximateExtent(a))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(Aa);Aa.registerClass(Jx);const Sv=Jx;var yn=Qe,Qx=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return jc(e,this._extent)},t.prototype.normalize=function(e){return qc(e,this._extent)},t.prototype.scale=function(e){return Kc(e,this._extent)},t.prototype.setExtent=function(e,a){var i=this._extent;isNaN(e)||(i[0]=parseFloat(e)),isNaN(a)||(i[1]=parseFloat(a))},t.prototype.unionExtent=function(e){var a=this._extent;e[0]<a[0]&&(a[0]=e[0]),e[1]>a[1]&&(a[1]=e[1]),this.setExtent(a[0],a[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=qx(e)},t.prototype.getTicks=function(e){var a=this._interval,i=this._extent,n=this._niceExtent,o=this._intervalPrecision,s=[];if(!a)return s;var l=1e4;i[0]<n[0]&&(e?s.push({value:yn(n[0]-a,o)}):s.push({value:i[0]}));for(var u=n[0];u<=n[1]&&(s.push({value:u}),u=yn(u+a,o),u!==s[s.length-1].value);)if(s.length>l)return[];var c=s.length?s[s.length-1].value:n[1];return i[1]>c&&(e?s.push({value:yn(c+a,o)}):s.push({value:i[1]})),s},t.prototype.getMinorTicks=function(e){for(var a=this.getTicks(!0),i=[],n=this.getExtent(),o=1;o<a.length;o++){for(var s=a[o],l=a[o-1],u=0,c=[],h=s.value-l.value,f=h/e;u<e-1;){var d=yn(l.value+(u+1)*f);d>n[0]&&d<n[1]&&c.push(d),u++}i.push(c)}return i},t.prototype.getLabel=function(e,a){if(e==null)return"";var i=a&&a.precision;i==null?i=Yr(e.value)||0:i==="auto"&&(i=this._intervalPrecision);var n=yn(e.value,i,!0);return _b(n)},t.prototype.calcNiceTicks=function(e,a,i){e=e||5;var n=this._extent,o=n[1]-n[0];if(isFinite(o)){o<0&&(o=-o,n.reverse());var s=vB(n,e,a,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var a=this._extent;if(a[0]===a[1])if(a[0]!==0){var i=Math.abs(a[0]);e.fixMax||(a[1]+=i/2),a[0]-=i/2}else a[1]=1;var n=a[1]-a[0];isFinite(n)||(a[0]=0,a[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var o=this._interval;e.fixMin||(a[0]=yn(Math.floor(a[0]/o)*o)),e.fixMax||(a[1]=yn(Math.ceil(a[1]/o)*o))},t.prototype.setNiceExtent=function(e,a){this._niceExtent=[e,a]},t.type="interval",t}(Aa);Aa.registerClass(Qx);const ci=Qx;var eS=typeof Float32Array<"u",mB=eS?Float32Array:Array;function aa(r){return G(r)?eS?new Float32Array(r):r:new mB(r)}var Lv="__ec_stack_";function Tv(r){return r.get("stack")||Lv+r.seriesIndex}function Cv(r){return r.dim+r.index}function yB(r){var t=[],e=r.axis,a="axis0";if(e.type==="category"){for(var i=e.getBandWidth(),n=0;n<r.count;n++)t.push(ie({bandWidth:i,axisKey:a,stackId:Lv+n},r));for(var o=aS(t),s=[],n=0;n<r.count;n++){var l=o[a][Lv+n];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function tS(r,t){var e=[];return t.eachSeriesByType(r,function(a){oS(a)&&e.push(a)}),e}function _B(r){var t={};M(r,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var h=l.getData(),f=c.dim+"_"+c.index,d=h.getDimensionIndex(h.mapDimension(c.dim)),p=h.getStore(),v=0,g=p.count();v<g;++v){var m=p.get(d,v);t[f]?t[f].push(m):t[f]=[m]}});var e={};for(var a in t)if(t.hasOwnProperty(a)){var i=t[a];if(i){i.sort(function(l,u){return l-u});for(var n=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(n=n===null?s:Math.min(n,s))}e[a]=n}}return e}function rS(r){var t=_B(r),e=[];return M(r,function(a){var i=a.coordinateSystem,n=i.getBaseAxis(),o=n.getExtent(),s;if(n.type==="category")s=n.getBandWidth();else if(n.type==="value"||n.type==="time"){var l=n.dim+"_"+n.index,u=t[l],c=Math.abs(o[1]-o[0]),h=n.scale.getExtent(),f=Math.abs(h[1]-h[0]);s=u?c/f*u:c}else{var d=a.getData();s=Math.abs(o[1]-o[0])/d.count()}var p=Z(a.get("barWidth"),s),v=Z(a.get("barMaxWidth"),s),g=Z(a.get("barMinWidth")||(sS(a)?.5:1),s),m=a.get("barGap"),y=a.get("barCategoryGap");e.push({bandWidth:s,barWidth:p,barMaxWidth:v,barMinWidth:g,barGap:m,barCategoryGap:y,axisKey:Cv(n),stackId:Tv(a)})}),aS(e)}function aS(r){var t={};M(r,function(a,i){var n=a.axisKey,o=a.bandWidth,s=t[n]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[n]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=a.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var h=a.barMaxWidth;h&&(l[u].maxWidth=h);var f=a.barMinWidth;f&&(l[u].minWidth=f);var d=a.barGap;d!=null&&(s.gap=d);var p=a.barCategoryGap;p!=null&&(s.categoryGap=p)});var e={};return M(t,function(a,i){e[i]={};var n=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=we(n).length;s=Math.max(35-l*4,15)+"%"}var u=Z(s,o),c=Z(a.gap,1),h=a.remainedWidth,f=a.autoWidthCount,d=(h-u)/(f+(f-1)*c);d=Math.max(d,0),M(n,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var w=m.width;y&&(w=Math.min(w,y)),_&&(w=Math.max(w,_)),m.width=w,h-=w+c*w,f--}else{var w=d;y&&y<w&&(w=Math.min(y,h)),_&&_>w&&(w=_),w!==d&&(m.width=w,h-=w+c*w,f--)}}),d=(h-u)/(f+(f-1)*c),d=Math.max(d,0);var p=0,v;M(n,function(m,y){m.width||(m.width=d),v=m,p+=m.width*(1+c)}),v&&(p-=v.width*c);var g=-p/2;M(n,function(m,y){e[i][y]=e[i][y]||{bandWidth:o,offset:g,width:m.width},g+=m.width*(1+c)})}),e}function bB(r,t,e){if(r&&t){var a=r[Cv(t)];return a!=null&&e!=null?a[Tv(e)]:a}}function iS(r,t){var e=tS(r,t),a=rS(e);M(e,function(i){var n=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=Tv(i),u=a[Cv(s)][l],c=u.offset,h=u.width;n.setLayout({bandWidth:u.bandWidth,offset:c,size:h})})}function nS(r){return{seriesType:r,plan:To(),reset:function(t){if(oS(t)){var e=t.getData(),a=t.coordinateSystem,i=a.getBaseAxis(),n=a.getOtherAxis(i),o=e.getDimensionIndex(e.mapDimension(n.dim)),s=e.getDimensionIndex(e.mapDimension(i.dim)),l=t.get("showBackground",!0),u=e.mapDimension(n.dim),c=e.getCalculationInfo("stackResultDimension"),h=ui(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),f=n.isHorizontal(),d=wB(i,n),p=sS(t),v=t.get("barMinHeight")||0,g=c&&e.getDimensionIndex(c),m=e.getLayout("size"),y=e.getLayout("offset");return{progress:function(_,w){for(var x=_.count,S=p&&aa(x*3),L=p&&l&&aa(x*3),C=p&&aa(x),T=a.master.getRect(),A=f?T.width:T.height,D,E=w.getStore(),I=0;(D=_.next())!=null;){var P=E.get(h?g:o,D),k=E.get(s,D),N=d,O=void 0;h&&(O=+P-E.get(o,D));var R=void 0,V=void 0,B=void 0,H=void 0;if(f){var Y=a.dataToPoint([P,k]);if(h){var $=a.dataToPoint([O,k]);N=$[0]}R=N,V=Y[1]+y,B=Y[0]-N,H=m,Math.abs(B)<v&&(B=(B<0?-1:1)*v)}else{var Y=a.dataToPoint([k,P]);if(h){var $=a.dataToPoint([k,O]);N=$[1]}R=Y[0]+y,V=N,B=m,H=Y[1]-N,Math.abs(H)<v&&(H=(H<=0?-1:1)*v)}p?(S[I]=R,S[I+1]=V,S[I+2]=f?B:H,L&&(L[I]=f?T.x:R,L[I+1]=f?V:T.y,L[I+2]=A),C[D]=D):w.setItemLayout(D,{x:R,y:V,width:B,height:H}),I+=3}p&&w.setLayout({largePoints:S,largeDataIndices:C,largeBackgroundPoints:L,valueAxisHorizontal:f})}}}}}}function oS(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function sS(r){return r.pipelineContext&&r.pipelineContext.large}function wB(r,t){var e=t.model.get("startValue");return e||(e=0),t.toGlobalCoord(t.dataToCoord(t.type==="log"?e>0?e:1:e))}var xB=function(r,t,e,a){for(;e<a;){var i=e+a>>>1;r[i][1]<t?e=i+1:a=i}return e},lS=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="time",a}return t.prototype.getLabel=function(e){var a=this.getSetting("useUTC");return gc(e.value,ub[W5(po(this._minLevelUnit))]||ub.second,a,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,a,i){var n=this.getSetting("useUTC"),o=this.getSetting("locale");return H5(e,a,i,o,n)},t.prototype.getTicks=function(){var e=this._interval,a=this._extent,i=[];if(!e)return i;i.push({value:a[0],level:0});var n=this.getSetting("useUTC"),o=MB(this._minLevelUnit,this._approxInterval,n,a);return i=i.concat(o),i.push({value:a[1],level:0}),i},t.prototype.calcNiceExtent=function(e){var a=this._extent;if(a[0]===a[1]&&(a[0]-=pr,a[1]+=pr),a[1]===-1/0&&a[0]===1/0){var i=new Date;a[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),a[0]=a[1]-pr}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,a,i){e=e||10;var n=this._extent,o=n[1]-n[0];this._approxInterval=o/e,a!=null&&this._approxInterval<a&&(this._approxInterval=a),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var s=Jc.length,l=Math.min(xB(Jc,this._approxInterval,0,s),s-1);this._interval=Jc[l][1],this._minLevelUnit=Jc[Math.max(l-1,0)][0]},t.prototype.parse=function(e){return De(e)?e:+Zr(e)},t.prototype.contain=function(e){return jc(this.parse(e),this._extent)},t.prototype.normalize=function(e){return qc(this.parse(e),this._extent)},t.prototype.scale=function(e){return Kc(e,this._extent)},t.type="time",t}(ci),Jc=[["second",yp],["minute",_p],["hour",Hs],["quarter-day",Hs*6],["half-day",Hs*12],["day",pr*1.2],["half-week",pr*3.5],["week",pr*7],["month",pr*31],["quarter",pr*95],["half-year",lb/2],["year",lb]];function SB(r,t,e,a){var i=Zr(t),n=Zr(e),o=function(p){return fb(i,p,a)===fb(n,p,a)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},h=function(){return c()&&o("minute")},f=function(){return h()&&o("second")},d=function(){return f()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return h();case"second":return f();case"millisecond":return d()}}function LB(r,t){return r/=pr,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function TB(r){var t=30*pr;return r/=t,r>6?6:r>3?3:r>2?2:1}function CB(r){return r/=Hs,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function uS(r,t){return r/=t?_p:yp,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function DB(r){return l1(r,!0)}function AB(r,t,e){var a=new Date(r);switch(po(t)){case"year":case"month":a[db(e)](0);case"day":a[pb(e)](1);case"hour":a[vb(e)](0);case"minute":a[gb(e)](0);case"second":a[mb(e)](0),a[yb(e)](0)}return a.getTime()}function MB(r,t,e,a){var i=1e4,n=cb,o=0;function s(A,D,E,I,P,k,N){for(var O=new Date(D),R=D,V=O[I]();R<E&&R<=a[1];)N.push({value:R}),V+=A,O[P](V),R=O.getTime();N.push({value:R,notAdd:!0})}function l(A,D,E){var I=[],P=!D.length;if(!SB(po(A),a[0],a[1],e)){P&&(D=[{value:AB(new Date(a[0]),A,e)},{value:a[1]}]);for(var k=0;k<D.length-1;k++){var N=D[k].value,O=D[k+1].value;if(N!==O){var R=void 0,V=void 0,B=void 0,H=!1;switch(A){case"year":R=Math.max(1,Math.round(t/pr/365)),V=wp(e),B=$5(e);break;case"half-year":case"quarter":case"month":R=TB(t),V=vo(e),B=db(e);break;case"week":case"half-week":case"day":R=LB(t),V=mc(e),B=pb(e),H=!0;break;case"half-day":case"quarter-day":case"hour":R=CB(t),V=Us(e),B=vb(e);break;case"minute":R=uS(t,!0),V=yc(e),B=gb(e);break;case"second":R=uS(t,!1),V=_c(e),B=mb(e);break;case"millisecond":R=DB(t),V=bc(e),B=yb(e);break}s(R,N,O,V,B,H,I),A==="year"&&E.length>1&&k===0&&E.unshift({value:E[0].value-R})}}for(var k=0;k<I.length;k++)E.push(I[k]);return I}}for(var u=[],c=[],h=0,f=0,d=0;d<n.length&&o++<i;++d){var p=po(n[d]);if(G5(n[d])){l(n[d],u[u.length-1]||[],c);var v=n[d+1]?po(n[d+1]):null;if(p!==v){if(c.length){f=h,c.sort(function(A,D){return A.value-D.value});for(var g=[],m=0;m<c.length;++m){var y=c[m].value;(m===0||c[m-1].value!==y)&&(g.push(c[m]),y>=a[0]&&y<=a[1]&&h++)}var _=(a[1]-a[0])/t;if(h>_*1.5&&f>_/1.5||(u.push(g),h>_||r===n[d]))break}c=[]}}}process.env.NODE_ENV!=="production"&&o>=i&&je("Exceed safe limit.");for(var w=Ie(W(u,function(A){return Ie(A,function(D){return D.value>=a[0]&&D.value<=a[1]&&!D.notAdd})}),function(A){return A.length>0}),x=[],S=w.length-1,d=0;d<w.length;++d)for(var L=w[d],C=0;C<L.length;++C)x.push({value:L[C].value,level:S-d});x.sort(function(A,D){return A.value-D.value});for(var T=[],d=0;d<x.length;++d)(d===0||x[d].value!==x[d-1].value)&&T.push(x[d]);return T}Aa.registerClass(lS);const cS=lS;var hS=Aa.prototype,dl=ci.prototype,EB=Qe,IB=Math.floor,PB=Math.ceil,Qc=Math.pow,Or=Math.log,Dv=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new ci,e._interval=0,e}return t.prototype.getTicks=function(e){var a=this._originalScale,i=this._extent,n=a.getExtent(),o=dl.getTicks.call(this,e);return W(o,function(s){var l=s.value,u=Qe(Qc(this.base,l));return u=l===i[0]&&this._fixMin?eh(u,n[0]):u,u=l===i[1]&&this._fixMax?eh(u,n[1]):u,{value:u}},this)},t.prototype.setExtent=function(e,a){var i=Or(this.base);e=Or(Math.max(0,e))/i,a=Or(Math.max(0,a))/i,dl.setExtent.call(this,e,a)},t.prototype.getExtent=function(){var e=this.base,a=hS.getExtent.call(this);a[0]=Qc(e,a[0]),a[1]=Qc(e,a[1]);var i=this._originalScale,n=i.getExtent();return this._fixMin&&(a[0]=eh(a[0],n[0])),this._fixMax&&(a[1]=eh(a[1],n[1])),a},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var a=this.base;e[0]=Or(e[0])/Or(a),e[1]=Or(e[1])/Or(a),hS.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,a){this.unionExtent(e.getApproximateExtent(a))},t.prototype.calcNiceTicks=function(e){e=e||10;var a=this._extent,i=a[1]-a[0];if(!(i===1/0||i<=0)){var n=uN(i),o=e/i*n;for(o<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var s=[Qe(PB(a[0]/n)*n),Qe(IB(a[1]/n)*n)];this._interval=n,this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){dl.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return e=Or(e)/Or(this.base),jc(e,this._extent)},t.prototype.normalize=function(e){return e=Or(e)/Or(this.base),qc(e,this._extent)},t.prototype.scale=function(e){return e=Kc(e,this._extent),Qc(this.base,e)},t.type="log",t}(Aa),fS=Dv.prototype;fS.getMinorTicks=dl.getMinorTicks,fS.getLabel=dl.getLabel;function eh(r,t){return EB(r,Yr(t))}Aa.registerClass(Dv);const kB=Dv;var NB=function(){function r(t,e,a){this._prepareParams(t,e,a)}return r.prototype._prepareParams=function(t,e,a){a[1]<a[0]&&(a=[NaN,NaN]),this._dataMin=a[0],this._dataMax=a[1];var i=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&e.getNeedCrossZero&&e.getNeedCrossZero();var n=e.get("min",!0);n==null&&(n=e.get("startValue",!0));var o=this._modelMinRaw=n;te(o)?this._modelMinNum=th(t,o({min:a[0],max:a[1]})):o!=="dataMin"&&(this._modelMinNum=th(t,o));var s=this._modelMaxRaw=e.get("max",!0);if(te(s)?this._modelMaxNum=th(t,s({min:a[0],max:a[1]})):s!=="dataMax"&&(this._modelMaxNum=th(t,s)),i)this._axisDataLen=e.getCategories().length;else{var l=e.get("boundaryGap"),u=G(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[Er(u[0],1),Er(u[1],1)]}},r.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,a=this._dataMax,i=this._axisDataLen,n=this._boundaryGapInner,o=t?null:a-e||Math.abs(e),s=this._modelMinRaw==="dataMin"?e:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?a:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=t?i?0:NaN:e-n[0]*o),l==null&&(l=t?i?i-1:NaN:a+n[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var h=Ti(s)||Ti(l)||t&&!i;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var f=this._determinedMin,d=this._determinedMax;return f!=null&&(s=f,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:h}},r.prototype.modifyDataMinMax=function(t,e){process.env.NODE_ENV!=="production"&&ae(!this.frozen),this[VB[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var a=RB[t];process.env.NODE_ENV!=="production"&&ae(!this.frozen&&this[a]==null),this[a]=e},r.prototype.freeze=function(){this.frozen=!0},r}(),RB={min:"_determinedMin",max:"_determinedMax"},VB={min:"_dataMin",max:"_dataMax"};function dS(r,t,e){var a=r.rawExtentInfo;return a||(a=new NB(r,t,e),r.rawExtentInfo=a,a)}function th(r,t){return t==null?null:Ti(t)?NaN:r.parse(t)}function pS(r,t){var e=r.type,a=dS(r,t,r.getExtent()).calculate();r.setBlank(a.isBlank);var i=a.min,n=a.max,o=t.ecModel;if(o&&e==="time"){var s=tS("bar",o),l=!1;if(M(s,function(h){l=l||h.getBaseAxis()===t.axis}),l){var u=rS(s),c=OB(i,n,t,u);i=c.min,n=c.max}}return{extent:[i,n],fixMin:a.minFixed,fixMax:a.maxFixed}}function OB(r,t,e,a){var i=e.axis.getExtent(),n=Math.abs(i[1]-i[0]),o=bB(a,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;M(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;M(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-r,h=1-(s+l)/n,f=c/h-c;return t+=f*(l/u),r-=f*(s/u),{min:r,max:t}}function No(r,t){var e=t,a=pS(r,e),i=a.extent,n=e.get("splitNumber");r instanceof kB&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setExtent(i[0],i[1]),r.calcNiceExtent({splitNumber:n,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function rh(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new Sv({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new cS({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(Aa.getClass(t)||ci)}}function zB(r){var t=r.scale.getExtent(),e=t[0],a=t[1];return!(e>0&&a>0||e<0&&a<0)}function Ro(r){var t=r.getLabelModel().get("formatter"),e=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(a){return function(i,n){return r.scale.getFormattedLabel(i,n,a)}}(t):X(t)?function(a){return function(i){var n=r.scale.getLabel(i),o=a.replace("{value}",n??"");return o}}(t):te(t)?function(a){return function(i,n){return e!=null&&(n=i.value-e),a(Av(r,i),n,i.level!=null?{level:i.level}:null)}}(t):function(a){return r.scale.getLabel(a)}}function Av(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function BB(r){var t=r.model,e=r.scale;if(!(!t.get(["axisLabel","show"])||e.isBlank())){var a,i,n=e.getExtent();e instanceof Sv?i=e.count():(a=e.getTicks(),i=a.length);var o=r.getLabelModel(),s=Ro(r),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c<i;c+=u){var h=a?a[c]:{value:n[0]+c},f=s(h,c),d=o.getTextRect(f),p=FB(d,o.get("rotate")||0);l?l.union(p):l=p}return l}}function FB(r,t){var e=t*Math.PI/180,a=r.width,i=r.height,n=a*Math.abs(Math.cos(e))+Math.abs(i*Math.sin(e)),o=a*Math.abs(Math.sin(e))+Math.abs(i*Math.cos(e)),s=new ge(r.x,r.y,n,o);return s}function Mv(r){var t=r.get("interval");return t??"auto"}function vS(r){return r.type==="category"&&Mv(r.getLabelModel())===0}function ah(r,t){var e={};return M(r.mapDimensionsAll(t),function(a){e[Xx(r,a)]=!0}),we(e)}function GB(r,t,e){t&&M(ah(t,e),function(a){var i=t.getApproximateExtent(a);i[0]<r[0]&&(r[0]=i[0]),i[1]>r[1]&&(r[1]=i[1])})}var pl=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r}(),WB=1e-8;function gS(r,t){return Math.abs(r-t)<WB}function _n(r,t,e){var a=0,i=r[0];if(!i)return!1;for(var n=1;n<r.length;n++){var o=r[n];a+=ba(i[0],i[1],o[0],o[1],t,e),i=o}var s=r[0];return(!gS(i[0],s[0])||!gS(i[1],s[1]))&&(a+=ba(i[0],i[1],s[0],s[1],t,e)),a!==0}var HB=[];function Ev(r,t){for(var e=0;e<r.length;e++)yt(r[e],r[e],t)}function mS(r,t,e,a){for(var i=0;i<r.length;i++){var n=r[i];a&&(n=a.project(n)),n&&isFinite(n[0])&&isFinite(n[1])&&(Ga(t,t,n),Wa(e,e,n))}}function $B(r){for(var t=0,e=0,a=0,i=r.length,n=r[i-1][0],o=r[i-1][1],s=0;s<i;s++){var l=r[s][0],u=r[s][1],c=n*u-l*o;t+=c,e+=(n+l)*c,a+=(o+u)*c,n=l,o=u}return t?[e/t/3,a/t/3,t]:[r[0][0]||0,r[0][1]||0]}var yS=function(){function r(t){this.name=t}return r.prototype.setCenter=function(t){this._center=t},r.prototype.getCenter=function(){var t=this._center;return t||(t=this._center=this.calcCenter()),t},r}(),_S=function(){function r(t,e){this.type="polygon",this.exterior=t,this.interiors=e}return r}(),bS=function(){function r(t){this.type="linestring",this.points=t}return r}(),wS=function(r){z(t,r);function t(e,a,i){var n=r.call(this,e)||this;return n.type="geoJSON",n.geometries=a,n._center=i&&[i[0],i[1]],n}return t.prototype.calcCenter=function(){for(var e=this.geometries,a,i=0,n=0;n<e.length;n++){var o=e[n],s=o.exterior,l=s&&s.length;l>i&&(a=o,i=l)}if(a)return $B(a.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(e){var a=this._rect;if(a&&!e)return a;var i=[1/0,1/0],n=[-1/0,-1/0],o=this.geometries;return M(o,function(s){s.type==="polygon"?mS(s.exterior,i,n,e):M(s.points,function(l){mS(l,i,n,e)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(n[0])&&isFinite(n[1])||(i[0]=i[1]=n[0]=n[1]=0),a=new ge(i[0],i[1],n[0]-i[0],n[1]-i[1]),e||(this._rect=a),a},t.prototype.contain=function(e){var a=this.getBoundingRect(),i=this.geometries;if(!a.contain(e[0],e[1]))return!1;e:for(var n=0,o=i.length;n<o;n++){var s=i[n];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(_n(l,e[0],e[1])){for(var c=0;c<(u?u.length:0);c++)if(_n(u[c],e[0],e[1]))continue e;return!0}}}return!1},t.prototype.transformTo=function(e,a,i,n){var o=this.getBoundingRect(),s=o.width/o.height;i?n||(n=i/s):i=s*n;for(var l=new ge(e,a,i,n),u=o.calculateTransform(l),c=this.geometries,h=0;h<c.length;h++){var f=c[h];f.type==="polygon"?(Ev(f.exterior,u),M(f.interiors,function(d){Ev(d,u)})):M(f.points,function(d){Ev(d,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},t.prototype.cloneShallow=function(e){e==null&&(e=this.name);var a=new t(e,this.geometries,this._center);return a._rect=this._rect,a.transformTo=null,a},t}(yS),UB=function(r){z(t,r);function t(e,a){var i=r.call(this,e)||this;return i.type="geoSVG",i._elOnlyForCalculate=a,i}return t.prototype.calcCenter=function(){for(var e=this._elOnlyForCalculate,a=e.getBoundingRect(),i=[a.x+a.width/2,a.y+a.height/2],n=du(HB),o=e;o&&!o.isGeoSVGGraphicRoot;)pa(n,o.getLocalTransform(),n),o=o.parent;return Yn(n,n),yt(i,i,n),i},t}(yS);function YB(r){if(!r.UTF8Encoding)return r;var t=r,e=t.UTF8Scale;e==null&&(e=1024);var a=t.features;return M(a,function(i){var n=i.geometry,o=n.encodeOffsets,s=n.coordinates;if(o)switch(n.type){case"LineString":n.coordinates=xS(s,o,e);break;case"Polygon":Iv(s,o,e);break;case"MultiLineString":Iv(s,o,e);break;case"MultiPolygon":M(s,function(l,u){return Iv(l,o[u],e)})}}),t.UTF8Encoding=!1,t}function Iv(r,t,e){for(var a=0;a<r.length;a++)r[a]=xS(r[a],t[a],e)}function xS(r,t,e){for(var a=[],i=t[0],n=t[1],o=0;o<r.length;o+=2){var s=r.charCodeAt(o)-64,l=r.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=n,i=s,n=l,a.push([s/e,l/e])}return a}function ZB(r,t){return r=YB(r),W(Ie(r.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var a=e.properties,i=e.geometry,n=[];switch(i.type){case"Polygon":var o=i.coordinates;n.push(new _S(o[0],o.slice(1)));break;case"MultiPolygon":M(i.coordinates,function(l){l[0]&&n.push(new _S(l[0],l.slice(1)))});break;case"LineString":n.push(new bS([i.coordinates]));break;case"MultiLineString":n.push(new bS(i.coordinates))}var s=new wS(a[t||"name"],n,a.cp);return s.properties=a,s})}var vl=xe();function SS(r,t){var e=W(t,function(a){return r.scale.parse(a)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function XB(r){var t=r.getLabelModel().get("customValues");if(t){var e=Ro(r),a=r.scale.getExtent(),i=SS(r,t),n=Ie(i,function(o){return o>=a[0]&&o<=a[1]});return{labels:W(n,function(o){var s={value:o};return{formattedLabel:e(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?qB(r):JB(r)}function jB(r,t){var e=r.getTickModel().get("customValues");if(e){var a=r.scale.getExtent(),i=SS(r,e);return{ticks:Ie(i,function(n){return n>=a[0]&&n<=a[1]})}}return r.type==="category"?KB(r,t):{ticks:W(r.scale.getTicks(),function(n){return n.value})}}function qB(r){var t=r.getLabelModel(),e=LS(r,t);return!t.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:e.labelCategoryInterval}:e}function LS(r,t){var e=TS(r,"labels"),a=Mv(t),i=CS(e,a);if(i)return i;var n,o;return te(a)?n=MS(r,a):(o=a==="auto"?QB(r):a,n=AS(r,o)),DS(e,a,{labels:n,labelCategoryInterval:o})}function KB(r,t){var e=TS(r,"ticks"),a=Mv(t),i=CS(e,a);if(i)return i;var n,o;if((!t.get("show")||r.scale.isBlank())&&(n=[]),te(a))n=MS(r,a,!0);else if(a==="auto"){var s=LS(r,r.getLabelModel());o=s.labelCategoryInterval,n=W(s.labels,function(l){return l.tickValue})}else o=a,n=AS(r,o,!0);return DS(e,a,{ticks:n,tickCategoryInterval:o})}function JB(r){var t=r.scale.getTicks(),e=Ro(r);return{labels:W(t,function(a,i){return{level:a.level,formattedLabel:e(a,i),rawLabel:r.scale.getLabel(a),tickValue:a.value}})}}function TS(r,t){return vl(r)[t]||(vl(r)[t]=[])}function CS(r,t){for(var e=0;e<r.length;e++)if(r[e].key===t)return r[e].value}function DS(r,t,e){return r.push({key:t,value:e}),e}function QB(r){var t=vl(r).autoInterval;return t??(vl(r).autoInterval=r.calculateCategoryInterval())}function e3(r){var t=t3(r),e=Ro(r),a=(t.axisRotate-t.labelRotate)/180*Math.PI,i=r.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=n[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),c=Math.abs(u*Math.cos(a)),h=Math.abs(u*Math.sin(a)),f=0,d=0;l<=n[1];l+=s){var p=0,v=0,g=ws(e({value:l}),t.font,"center","top");p=g.width*1.3,v=g.height*1.3,f=Math.max(f,p,7),d=Math.max(d,v,7)}var m=f/c,y=d/h;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),w=vl(r.model),x=r.getExtent(),S=w.lastAutoInterval,L=w.lastTickCount;return S!=null&&L!=null&&Math.abs(S-_)<=1&&Math.abs(L-o)<=1&&S>_&&w.axisExtent0===x[0]&&w.axisExtent1===x[1]?_=S:(w.lastTickCount=o,w.lastAutoInterval=_,w.axisExtent0=x[0],w.axisExtent1=x[1]),_}function t3(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function AS(r,t,e){var a=Ro(r),i=r.scale,n=i.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=n[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=vS(r),f=o.get("showMinLabel")||h,d=o.get("showMaxLabel")||h;f&&u!==n[0]&&v(n[0]);for(var p=u;p<=n[1];p+=l)v(p);d&&p-l!==n[1]&&v(n[1]);function v(g){var m={value:g};s.push(e?g:{formattedLabel:a(m),rawLabel:i.getLabel(m),tickValue:g})}return s}function MS(r,t,e){var a=r.scale,i=Ro(r),n=[];return M(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;t(o.value,s)&&n.push(e?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),n}var ES=[0,1],r3=function(){function r(t,e,a){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=a||[0,0]}return r.prototype.contain=function(t){var e=this._extent,a=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=a&&t<=i},r.prototype.containData=function(t){return this.scale.contain(t)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return n1(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var a=this._extent;a[0]=t,a[1]=e},r.prototype.dataToCoord=function(t,e){var a=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&i.type==="ordinal"&&(a=a.slice(),IS(a,i.count())),ke(t,ES,a,e)},r.prototype.coordToData=function(t,e){var a=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(a=a.slice(),IS(a,i.count()));var n=ke(t,a,ES,e);return this.scale.scale(n)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),a=jB(this,e),i=a.ticks,n=W(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return a3(this,n,o,t.clamp),n},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var a=this.scale.getMinorTicks(e),i=W(a,function(n){return W(n,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(){return XB(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),a=e[1]-e[0]+(this.onBand?1:0);a===0&&(a=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/a},r.prototype.calculateCategoryInterval=function(){return e3(this)},r}();function IS(r,t){var e=r[1]-r[0],a=t,i=e/a/2;r[0]+=i,r[1]-=i}function a3(r,t,e,a){var i=t.length;if(!r.onBand||e||!i)return;var n=r.getExtent(),o,s;if(i===1)t[0].coord=n[0],o=t[1]={coord:n[1],tickValue:t[0].tickValue};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;M(t,function(d){d.coord-=u/2});var c=r.scale.getExtent();s=1+c[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s,tickValue:c[1]+1},t.push(o)}var h=n[0]>n[1];f(t[0].coord,n[0])&&(a?t[0].coord=n[0]:t.shift()),a&&f(n[0],t[0].coord)&&t.unshift({coord:n[0]}),f(n[1],o.coord)&&(a?o.coord=n[1]:t.pop()),a&&f(o.coord,n[1])&&t.push({coord:n[1]});function f(d,p){return d=Qe(d),p=Qe(p),h?d>p:d<p}}const zr=r3;var gl=Math.PI*2,bn=Jr.CMD,i3=["top","right","bottom","left"];function n3(r,t,e,a,i){var n=e.width,o=e.height;switch(r){case"top":a.set(e.x+n/2,e.y-t),i.set(0,-1);break;case"bottom":a.set(e.x+n/2,e.y+o+t),i.set(0,1);break;case"left":a.set(e.x-t,e.y+o/2),i.set(-1,0);break;case"right":a.set(e.x+n+t,e.y+o/2),i.set(1,0);break}}function o3(r,t,e,a,i,n,o,s,l){o-=r,s-=t;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var c=o*e+r,h=s*e+t;if(Math.abs(a-i)%gl<1e-4)return l[0]=c,l[1]=h,u-e;if(n){var f=a;a=rr(i),i=rr(f)}else a=rr(a),i=rr(i);a>i&&(i+=gl);var d=Math.atan2(s,o);if(d<0&&(d+=gl),d>=a&&d<=i||d+gl>=a&&d+gl<=i)return l[0]=c,l[1]=h,u-e;var p=e*Math.cos(a)+r,v=e*Math.sin(a)+t,g=e*Math.cos(i)+r,m=e*Math.sin(i)+t,y=(p-o)*(p-o)+(v-s)*(v-s),_=(g-o)*(g-o)+(m-s)*(m-s);return y<_?(l[0]=p,l[1]=v,Math.sqrt(y)):(l[0]=g,l[1]=m,Math.sqrt(_))}function ih(r,t,e,a,i,n,o,s){var l=i-r,u=n-t,c=e-r,h=a-t,f=Math.sqrt(c*c+h*h);c/=f,h/=f;var d=l*c+u*h,p=d/f;s&&(p=Math.min(Math.max(p,0),1)),p*=f;var v=o[0]=r+p*c,g=o[1]=t+p*h;return Math.sqrt((v-i)*(v-i)+(g-n)*(g-n))}function PS(r,t,e,a,i,n,o){e<0&&(r=r+e,e=-e),a<0&&(t=t+a,a=-a);var s=r+e,l=t+a,u=o[0]=Math.min(Math.max(i,r),s),c=o[1]=Math.min(Math.max(n,t),l);return Math.sqrt((u-i)*(u-i)+(c-n)*(c-n))}var Br=[];function s3(r,t,e){var a=PS(t.x,t.y,t.width,t.height,r.x,r.y,Br);return e.set(Br[0],Br[1]),a}function l3(r,t,e){for(var a=0,i=0,n=0,o=0,s,l,u=1/0,c=t.data,h=r.x,f=r.y,d=0;d<c.length;){var p=c[d++];d===1&&(a=c[d],i=c[d+1],n=a,o=i);var v=u;switch(p){case bn.M:n=c[d++],o=c[d++],a=n,i=o;break;case bn.L:v=ih(a,i,c[d],c[d+1],h,f,Br,!0),a=c[d++],i=c[d++];break;case bn.C:v=L0(a,i,c[d++],c[d++],c[d++],c[d++],c[d],c[d+1],h,f,Br),a=c[d++],i=c[d++];break;case bn.Q:v=C0(a,i,c[d++],c[d++],c[d],c[d+1],h,f,Br),a=c[d++],i=c[d++];break;case bn.A:var g=c[d++],m=c[d++],y=c[d++],_=c[d++],w=c[d++],x=c[d++];d+=1;var S=!!(1-c[d++]);s=Math.cos(w)*y+g,l=Math.sin(w)*_+m,d<=1&&(n=s,o=l);var L=(h-g)*_/y+g;v=o3(g,m,_,w,w+x,S,L,f,Br),a=Math.cos(w+x)*y+g,i=Math.sin(w+x)*_+m;break;case bn.R:n=a=c[d++],o=i=c[d++];var C=c[d++],T=c[d++];v=PS(n,o,C,T,h,f,Br);break;case bn.Z:v=ih(a,i,n,o,h,f,Br,!0),a=n,i=o;break}v<u&&(u=v,e.set(Br[0],Br[1]))}return u}var Fr=new ve,He=new ve,tt=new ve,ia=new ve,na=new ve;function kS(r,t){if(r){var e=r.getTextGuideLine(),a=r.getTextContent();if(a&&e){var i=r.textGuideLineConfig||{},n=[[0,0],[0,0],[0,0]],o=i.candidates||i3,s=a.getBoundingRect().clone();s.applyTransform(a.getComputedTransform());var l=1/0,u=i.anchor,c=r.getComputedTransform(),h=c&&Yn([],c),f=t.get("length2")||0;u&&tt.copy(u);for(var d=0;d<o.length;d++){var p=o[d];n3(p,0,s,Fr,ia),ve.scaleAndAdd(He,Fr,ia,f),He.transform(h);var v=r.getBoundingRect(),g=u?u.distance(He):r instanceof _e?l3(He,r.path,tt):s3(He,v,tt);g<l&&(l=g,He.transform(c),tt.transform(c),tt.toArray(n[0]),He.toArray(n[1]),Fr.toArray(n[2]))}NS(n,t.get("minTurnAngle")),e.setShape({points:n})}}}var nh=[],Gt=new ve;function NS(r,t){if(t<=180&&t>0){t=t/180*Math.PI,Fr.fromArray(r[0]),He.fromArray(r[1]),tt.fromArray(r[2]),ve.sub(ia,Fr,He),ve.sub(na,tt,He);var e=ia.len(),a=na.len();if(!(e<.001||a<.001)){ia.scale(1/e),na.scale(1/a);var i=ia.dot(na),n=Math.cos(t);if(n<i){var o=ih(He.x,He.y,tt.x,tt.y,Fr.x,Fr.y,nh,!1);Gt.fromArray(nh),Gt.scaleAndAdd(na,o/Math.tan(Math.PI-t));var s=tt.x!==He.x?(Gt.x-He.x)/(tt.x-He.x):(Gt.y-He.y)/(tt.y-He.y);if(isNaN(s))return;s<0?ve.copy(Gt,He):s>1&&ve.copy(Gt,tt),Gt.toArray(r[1])}}}}function u3(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,Fr.fromArray(r[0]),He.fromArray(r[1]),tt.fromArray(r[2]),ve.sub(ia,He,Fr),ve.sub(na,tt,He);var a=ia.len(),i=na.len();if(!(a<.001||i<.001)){ia.scale(1/a),na.scale(1/i);var n=ia.dot(t),o=Math.cos(e);if(n<o){var s=ih(He.x,He.y,tt.x,tt.y,Fr.x,Fr.y,nh,!1);Gt.fromArray(nh);var l=Math.PI/2,u=Math.acos(na.dot(t)),c=l+u-e;if(c>=l)ve.copy(Gt,tt);else{Gt.scaleAndAdd(na,s/Math.tan(Math.PI/2-c));var h=tt.x!==He.x?(Gt.x-He.x)/(tt.x-He.x):(Gt.y-He.y)/(tt.y-He.y);if(isNaN(h))return;h<0?ve.copy(Gt,He):h>1&&ve.copy(Gt,tt)}Gt.toArray(r[1])}}}}function Pv(r,t,e,a){var i=e==="normal",n=i?r:r.ensureState(e);n.ignore=t;var o=a.get("smooth");o&&o===!0&&(o=.3),n.shape=n.shape||{},o>0&&(n.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();i?r.useStyle(s):n.style=s}function c3(r,t){var e=t.smooth,a=t.points;if(a)if(r.moveTo(a[0][0],a[0][1]),e>0&&a.length>=3){var i=Fa(a[0],a[1]),n=Fa(a[1],a[2]);if(!i||!n){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(i,n)*e,s=fu([],a[1],a[0],o/i),l=fu([],a[1],a[2],o/n),u=fu([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],a[2][0],a[2][1])}else for(var c=1;c<a.length;c++)r.lineTo(a[c][0],a[c][1])}function kv(r,t,e){var a=r.getTextGuideLine(),i=r.getTextContent();if(!i){a&&r.removeTextGuideLine();return}for(var n=t.normal,o=n.get("show"),s=i.ignore,l=0;l<Ps.length;l++){var u=Ps[l],c=t[u],h=u==="normal";if(c){var f=c.get("show"),d=h?s:le(i.states[u]&&i.states[u].ignore,s);if(d||!le(f,o)){var p=h?a:a&&a.states[u];p&&(p.ignore=!0),a&&Pv(a,!0,u,c);continue}a||(a=new Xt,r.setTextGuideLine(a),!h&&(s||!o)&&Pv(a,!0,"normal",t.normal),r.stateProxy&&(a.stateProxy=r.stateProxy)),Pv(a,!1,u,c)}}if(a){ie(a.style,e),a.style.fill=null;var v=n.get("showAbove"),g=r.textGuideLineConfig=r.textGuideLineConfig||{};g.showAbove=v||!1,a.buildPath=c3}}function Nv(r,t){t=t||"labelLine";for(var e={normal:r.getModel(t)},a=0;a<Bt.length;a++){var i=Bt[a];e[i]=r.getModel([i,t])}return e}function RS(r){for(var t=[],e=0;e<r.length;e++){var a=r[e];if(!a.defaultAttr.ignore){var i=a.label,n=i.getComputedTransform(),o=i.getBoundingRect(),s=!n||n[1]<1e-5&&n[2]<1e-5,l=i.style.margin||0,u=o.clone();u.applyTransform(n),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new nc(o,n):null;t.push({label:i,labelLine:a.labelLine,rect:u,localRect:o,obb:c,priority:a.priority,defaultAttr:a.defaultAttr,layoutOption:a.computedLayoutOption,axisAligned:s,transform:n})}}return t}function VS(r,t,e,a,i,n){var o=r.length;if(o<2)return;r.sort(function(C,T){return C.rect[t]-T.rect[t]});for(var s=0,l,u=!1,c=0,h=0;h<o;h++){var f=r[h],d=f.rect;l=d[t]-s,l<0&&(d[t]-=l,f.label[t]-=l,u=!0);var p=Math.max(-l,0);c+=p,s=d[t]+d[e]}c>0&&n&&x(-c/o,0,o);var v=r[0],g=r[o-1],m,y;_(),m<0&&S(-m,.8),y<0&&S(y,.8),_(),w(m,y,1),w(y,m,-1),_(),m<0&&L(-m),y<0&&L(y);function _(){m=v.rect[t]-a,y=i-g.rect[t]-g.rect[e]}function w(C,T,A){if(C<0){var D=Math.min(T,-C);if(D>0){x(D*A,0,o);var E=D+C;E<0&&S(-E*A,1)}else S(-C*A,1)}}function x(C,T,A){C!==0&&(u=!0);for(var D=T;D<A;D++){var E=r[D],I=E.rect;I[t]+=C,E.label[t]+=C}}function S(C,T){for(var A=[],D=0,E=1;E<o;E++){var I=r[E-1].rect,P=Math.max(r[E].rect[t]-I[t]-I[e],0);A.push(P),D+=P}if(D){var k=Math.min(Math.abs(C)/D,T);if(C>0)for(var E=0;E<o-1;E++){var N=A[E]*k;x(N,0,E+1)}else for(var E=o-1;E>0;E--){var N=A[E-1]*k;x(-N,E,o)}}}function L(C){var T=C<0?-1:1;C=Math.abs(C);for(var A=Math.ceil(C/(o-1)),D=0;D<o-1;D++)if(T>0?x(A,0,D+1):x(-A,o-D-1,o),C-=A,C<=0)return}return u}function h3(r,t,e,a){return VS(r,"x","width",t,e,a)}function OS(r,t,e,a){return VS(r,"y","height",t,e,a)}function zS(r){var t=[];r.sort(function(v,g){return g.priority-v.priority});var e=new ge(0,0,0,0);function a(v){if(!v.ignore){var g=v.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}v.ignore=!0}for(var i=0;i<r.length;i++){var n=r[i],o=n.axisAligned,s=n.localRect,l=n.transform,u=n.label,c=n.labelLine;e.copy(n.rect),e.width-=.1,e.height-=.1,e.x+=.05,e.y+=.05;for(var h=n.obb,f=!1,d=0;d<t.length;d++){var p=t[d];if(e.intersect(p.rect)){if(o&&p.axisAligned){f=!0;break}if(p.obb||(p.obb=new nc(p.localRect,p.transform)),h||(h=new nc(s,l)),h.intersect(p.obb)){f=!0;break}}}f?(a(u),c&&a(c)):(u.attr("ignore",n.defaultAttr.ignore),c&&c.attr("ignore",n.defaultAttr.labelGuideIgnore),t.push(n))}}function f3(r){if(r){for(var t=[],e=0;e<r.length;e++)t.push(r[e].slice());return t}}function d3(r,t){var e=r.label,a=t&&t.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:e.style.align,verticalAlign:e.style.verticalAlign,labelLinePoints:f3(a&&a.shape.points)}}var BS=["align","verticalAlign","width","height","fontSize"],Wt=new ma,Rv=xe(),p3=xe();function oh(r,t,e){for(var a=0;a<e.length;a++){var i=e[a];t[i]!=null&&(r[i]=t[i])}}var sh=["x","y","rotation"],v3=function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(t,e,a,i,n){var o=i.style,s=i.__hostTarget,l=s.textConfig||{},u=i.getComputedTransform(),c=i.getBoundingRect().plain();ge.applyTransform(c,c,u),u?Wt.setLocalTransform(u):(Wt.x=Wt.y=Wt.rotation=Wt.originX=Wt.originY=0,Wt.scaleX=Wt.scaleY=1),Wt.rotation=rr(Wt.rotation);var h=i.__hostTarget,f;if(h){f=h.getBoundingRect().plain();var d=h.getComputedTransform();ge.applyTransform(f,f,d)}var p=f&&h.getTextGuideLine();this._labelList.push({label:i,labelLine:p,seriesModel:a,dataIndex:t,dataType:e,layoutOption:n,computedLayoutOption:null,rect:c,hostRect:f,priority:f?f.width*f.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:p&&p.ignore,x:Wt.x,y:Wt.y,scaleX:Wt.scaleX,scaleY:Wt.scaleY,rotation:Wt.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(t){var e=this;this._chartViewList.push(t);var a=t.__model,i=a.get("labelLayout");(te(i)||we(i).length)&&t.group.traverse(function(n){if(n.ignore)return!0;var o=n.getTextContent(),s=ue(n);o&&!o.disableLabelLayout&&e._addLabel(s.dataIndex,s.dataType,a,o,i)})},r.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),a=t.getHeight();function i(_,w){return function(){kS(_,w)}}for(var n=0;n<this._labelList.length;n++){var o=this._labelList[n],s=o.label,l=s.__hostTarget,u=o.defaultAttr,c=void 0;te(o.layoutOption)?c=o.layoutOption(d3(o,l)):c=o.layoutOption,c=c||{},o.computedLayoutOption=c;var h=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*h:u.attachedRot,offset:[c.dx||0,c.dy||0]});var f=!1;if(c.x!=null?(s.x=Z(c.x,e),s.setStyle("x",0),f=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=Z(c.y,a),s.setStyle("y",0),f=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var d=l.getTextGuideLine();d&&(d.setShape({points:c.labelLinePoints}),f=!1)}var p=Rv(s);p.needsUpdateLabelLine=f,s.rotation=c.rotate!=null?c.rotate*h:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var v=0;v<BS.length;v++){var g=BS[v];s.setStyle(g,c[g]!=null?c[g]:u.style[g])}if(c.draggable){if(s.draggable=!0,s.cursor="move",l){var m=o.seriesModel;if(o.dataIndex!=null){var y=o.seriesModel.getData(o.dataType);m=y.getItemModel(o.dataIndex)}s.on("drag",i(l,m.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(t){var e=t.getWidth(),a=t.getHeight(),i=RS(this._labelList),n=Ie(i,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=Ie(i,function(l){return l.layoutOption.moveOverlap==="shiftY"});h3(n,0,e),OS(o,0,a);var s=Ie(i,function(l){return l.layoutOption.hideOverlap});zS(s)},r.prototype.processLabelsOverall=function(){var t=this;M(this._chartViewList,function(e){var a=e.__model,i=e.ignoreLabelLineUpdate,n=a.isAnimationEnabled();e.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!i,l=o.getTextContent();!s&&l&&(s=Rv(l).needsUpdateLabelLine),s&&t._updateLabelLine(o,a),n&&t._animateLabels(o,a)})})},r.prototype._updateLabelLine=function(t,e){var a=t.getTextContent(),i=ue(t),n=i.dataIndex;if(a&&n!=null){var o=e.getData(i.dataType),s=o.getItemModel(n),l={},u=o.getItemVisual(n,"style");if(u){var c=o.getVisual("drawType");l.stroke=u[c]}var h=s.getModel("labelLine");kv(t,Nv(s),l),kS(t,h)}},r.prototype._animateLabels=function(t,e){var a=t.getTextContent(),i=t.getTextGuideLine();if(a&&(t.forceLabelAnimation||!a.ignore&&!a.invisible&&!t.disableLabelAnimation&&!lo(t))){var n=Rv(a),o=n.oldLayout,s=ue(t),l=s.dataIndex,u={x:a.x,y:a.y,rotation:a.rotation},c=e.getData(s.dataType);if(o){a.attr(o);var f=t.prevStates;f&&(me(f,"select")>=0&&a.attr(n.oldLayoutSelect),me(f,"emphasis")>=0&&a.attr(n.oldLayoutEmphasis)),Me(a,u,e,l)}else if(a.attr(u),!co(a).valueAnimation){var h=le(a.style.opacity,1);a.style.opacity=0,Ze(a,{style:{opacity:h}},e,l)}if(n.oldLayout=u,a.states.select){var d=n.oldLayoutSelect={};oh(d,u,sh),oh(d,a.states.select,sh)}if(a.states.emphasis){var p=n.oldLayoutEmphasis={};oh(p,u,sh),oh(p,a.states.emphasis,sh)}ab(a,l,c,e,e)}if(i&&!i.ignore&&!i.invisible){var n=p3(i),o=n.oldLayout,v={points:i.shape.points};o?(i.attr({shape:o}),Me(i,{shape:v},e)):(i.setShape(v),i.style.strokePercent=0,Ze(i,{style:{strokePercent:1}},e)),n.oldLayout=v}},r}();const g3=v3;var Vv=xe();function m3(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){var i=Vv(e).labelManager;i||(i=Vv(e).labelManager=new g3),i.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(t,e,a){var i=Vv(e).labelManager;a.updatedSeries.forEach(function(n){i.addLabelsOfSeries(e.getViewOfSeriesModel(n))}),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()})}var Ov=Math.sin,zv=Math.cos,FS=Math.PI,wn=Math.PI*2,y3=180/FS,_3=function(){function r(){}return r.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},r.prototype.moveTo=function(t,e){this._add("M",t,e)},r.prototype.lineTo=function(t,e){this._add("L",t,e)},r.prototype.bezierCurveTo=function(t,e,a,i,n,o){this._add("C",t,e,a,i,n,o)},r.prototype.quadraticCurveTo=function(t,e,a,i){this._add("Q",t,e,a,i)},r.prototype.arc=function(t,e,a,i,n,o){this.ellipse(t,e,a,a,0,i,n,o)},r.prototype.ellipse=function(t,e,a,i,n,o,s,l){var u=s-o,c=!l,h=Math.abs(u),f=Za(h-wn)||(c?u>=wn:-u>=wn),d=u>0?u%wn:u%wn+wn,p=!1;f?p=!0:Za(h)?p=!1:p=d>=FS==!!c;var v=t+a*zv(o),g=e+i*Ov(o);this._start&&this._add("M",v,g);var m=Math.round(n*y3);if(f){var y=1/this._p,_=(c?1:-1)*(wn-y);this._add("A",a,i,m,1,+c,t+a*zv(o+_),e+i*Ov(o+_)),y>.01&&this._add("A",a,i,m,0,+c,v,g)}else{var w=t+a*zv(s),x=e+i*Ov(s);this._add("A",a,i,m,+p,+c,w,x)}},r.prototype.rect=function(t,e,a,i){this._add("M",t,e),this._add("l",a,0),this._add("l",0,i),this._add("l",-a,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(t,e,a,i,n,o,s,l,u){for(var c=[],h=this._p,f=1;f<arguments.length;f++){var d=arguments[f];if(isNaN(d)){this._invalid=!0;return}c.push(Math.round(d*h)/h)}this._d.push(t+c.join(" ")),this._start=t==="Z"},r.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},r.prototype.getStr=function(){return this._str},r}();const GS=_3;var ml="none",b3=Math.round;function w3(r){var t=r.fill;return t!=null&&t!==ml}function x3(r){var t=r.stroke;return t!=null&&t!==ml}var Bv=["lineCap","miterLimit","lineJoin"],S3=W(Bv,function(r){return"stroke-"+r.toLowerCase()});function L3(r,t,e,a){var i=t.opacity==null?1:t.opacity;if(e instanceof bt){r("opacity",i);return}if(w3(t)){var n=ms(t.fill);r("fill",n.color);var o=t.fillOpacity!=null?t.fillOpacity*n.opacity*i:n.opacity*i;(a||o<1)&&r("fill-opacity",o)}else r("fill",ml);if(x3(t)){var s=ms(t.stroke);r("stroke",s.color);var l=t.strokeNoScale?e.getLineScale():1,u=l?(t.lineWidth||0)/l:0,c=t.strokeOpacity!=null?t.strokeOpacity*s.opacity*i:s.opacity*i,h=t.strokeFirst;if((a||u!==1)&&r("stroke-width",u),(a||h)&&r("paint-order",h?"stroke":"fill"),(a||c<1)&&r("stroke-opacity",c),t.lineDash){var f=Qp(e),d=f[0],p=f[1];d&&(p=b3(p||0),r("stroke-dasharray",d.join(",")),(p||a)&&r("stroke-dashoffset",p))}else a&&r("stroke-dasharray",ml);for(var v=0;v<Bv.length;v++){var g=Bv[v];if(a||t[g]!==Yu[g]){var m=t[g]||Yu[g];m&&r(S3[v],m)}}}else a&&r("stroke",ml)}var WS="http://www.w3.org/2000/svg",HS="http://www.w3.org/1999/xlink",T3="http://www.w3.org/2000/xmlns/",C3="http://www.w3.org/XML/1998/namespace",$S="ecmeta_";function US(r){return document.createElementNS(WS,r)}function pt(r,t,e,a,i){return{tag:r,attrs:e||{},children:a,text:i,key:t}}function D3(r,t){var e=[];if(t)for(var a in t){var i=t[a],n=a;i!==!1&&(i!==!0&&i!=null&&(n+='="'+i+'"'),e.push(n))}return"<"+r+" "+e.join(" ")+">"}function A3(r){return"</"+r+">"}function Fv(r,t){t=t||{};var e=t.newline?`
245
+ `:"";function a(i){var n=i.children,o=i.tag,s=i.attrs,l=i.text;return D3(o,s)+(o!=="style"?At(l):l||"")+(n?""+e+W(n,function(u){return a(u)}).join(e)+e:"")+A3(o)}return a(r)}function M3(r,t,e){e=e||{};var a=e.newline?`
246
+ `:"",i=" {"+a,n=a+"}",o=W(we(r),function(l){return l+i+W(we(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+n}).join(a),s=W(we(t),function(l){return"@keyframes "+l+i+W(we(t[l]),function(u){return u+i+W(we(t[l][u]),function(c){var h=t[l][u][c];return c==="d"&&(h='path("'+h+'")'),c+":"+h+";"}).join(a)+n}).join(a)+n}).join(a);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(a)}function Gv(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function YS(r,t,e,a){return pt("svg","root",{width:r,height:t,xmlns:WS,"xmlns:xlink":HS,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+t:!1},e)}var E3=0;function ZS(){return E3++}var XS={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"},xn="transform-origin";function I3(r,t,e){var a=F({},r.shape);F(a,t),r.buildPath(e,a);var i=new GS;return i.reset(V0(r)),e.rebuildPath(i,1),i.generateStr(),i.getStr()}function P3(r,t){var e=t.originX,a=t.originY;(e||a)&&(r[xn]=e+"px "+a+"px")}var k3={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function jS(r,t){var e=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[e]=r,e}function N3(r,t,e){var a=r.shape.paths,i={},n,o;if(M(a,function(l){var u=Gv(e.zrId);u.animation=!0,lh(l,{},u,!0);var c=u.cssAnims,h=u.cssNodes,f=we(c),d=f.length;if(d){o=f[d-1];var p=c[o];for(var v in p){var g=p[v];i[v]=i[v]||{d:""},i[v].d+=g.d||""}for(var m in h){var y=h[m].animation;y.indexOf(o)>=0&&(n=y)}}}),!!n){t.d=!1;var s=jS(i,e);return n.replace(o,s)}}function qS(r){return X(r)?XS[r]?"cubic-bezier("+XS[r]+")":Gf(r)?r:"":""}function lh(r,t,e,a){var i=r.animators,n=i.length,o=[];if(r instanceof op){var s=N3(r,t,e);if(s)o.push(s);else if(!n)return}else if(!n)return;for(var l={},u=0;u<n;u++){var c=i[u],h=[c.getMaxTime()/1e3+"s"],f=qS(c.getClip().easing),d=c.getDelay();f?h.push(f):h.push("linear"),d&&h.push(d/1e3+"s"),c.getLoop()&&h.push("infinite");var p=h.join(" ");l[p]=l[p]||[p,[]],l[p][1].push(c)}function v(y){var _=y[1],w=_.length,x={},S={},L={},C="animation-timing-function";function T(he,ee,pe){for(var J=he.getTracks(),se=he.getMaxTime(),Oe=0;Oe<J.length;Oe++){var Ee=J[Oe];if(Ee.needsAnimate()){var Ne=Ee.keyframes,$e=Ee.propName;if(pe&&($e=pe($e)),$e)for(var rt=0;rt<Ne.length;rt++){var Nt=Ne[rt],Tt=Math.round(Nt.time/se*100)+"%",ca=qS(Nt.easing),Gr=Nt.rawValue;(X(Gr)||De(Gr))&&(ee[Tt]=ee[Tt]||{},ee[Tt][$e]=Nt.rawValue,ca&&(ee[Tt][C]=ca))}}}}for(var A=0;A<w;A++){var D=_[A],E=D.targetName;E?E==="shape"&&T(D,S):!a&&T(D,x)}for(var I in x){var P={};j0(P,r),F(P,x[I]);var k=O0(P),N=x[I][C];L[I]=k?{transform:k}:{},P3(L[I],P),N&&(L[I][C]=N)}var O,R=!0;for(var I in S){L[I]=L[I]||{};var V=!O,N=S[I][C];V&&(O=new Jr);var B=O.len();O.reset(),L[I].d=I3(r,S[I],O);var H=O.len();if(!V&&B!==H){R=!1;break}N&&(L[I][C]=N)}if(!R)for(var I in L)delete L[I].d;if(!a)for(var A=0;A<w;A++){var D=_[A],E=D.targetName;E==="style"&&T(D,L,function(J){return k3[J]})}for(var Y=we(L),$=!0,U,A=1;A<Y.length;A++){var q=Y[A-1],Ce=Y[A];if(L[q][xn]!==L[Ce][xn]){$=!1;break}U=L[q][xn]}if($&&U){for(var I in L)L[I][xn]&&delete L[I][xn];t[xn]=U}if(Ie(Y,function(he){return we(L[he]).length>0}).length){var ce=jS(L,e);return ce+" "+y[0]+" both"}}for(var g in l){var s=v(l[g]);s&&o.push(s)}if(o.length){var m=e.zrId+"-cls-"+ZS();e.cssNodes["."+m]={animation:o.join(",")},t.class=m}}function R3(r,t,e){if(!r.ignore)if(r.isSilent()){var a={"pointer-events":"none"};KS(a,t,e,!0)}else{var i=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},n=i.fill;if(!n){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(n=Xf(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&r.transform?r.transform[0]:1;u=u/c}var a={cursor:"pointer"};n&&(a.fill=n),i.stroke&&(a.stroke=i.stroke),u&&(a["stroke-width"]=u),KS(a,t,e,!0)}}function KS(r,t,e,a){var i=JSON.stringify(r),n=e.cssStyleCache[i];n||(n=e.zrId+"-cls-"+ZS(),e.cssStyleCache[i]=n,e.cssNodes["."+n+(a?":hover":"")]=r),t.class=t.class?t.class+" "+n:n}var yl=Math.round;function JS(r){return r&&X(r.src)}function QS(r){return r&&te(r.toDataURL)}function Wv(r,t,e,a){L3(function(i,n){var o=i==="fill"||i==="stroke";o&&R0(n)?nL(t,r,i,a):o&&qf(n)?oL(e,r,i,a):r[i]=n,o&&a.ssr&&n==="none"&&(r["pointer-events"]="visible")},t,e,!1),W3(e,r,a)}function Hv(r,t){var e=aN(t);e&&(e.each(function(a,i){a!=null&&(r[($S+i).toLowerCase()]=a+"")}),t.isSilent()&&(r[$S+"silent"]="true"))}function eL(r){return Za(r[0]-1)&&Za(r[1])&&Za(r[2])&&Za(r[3]-1)}function V3(r){return Za(r[4])&&Za(r[5])}function $v(r,t,e){if(t&&!(V3(t)&&eL(t))){var a=e?10:1e4;r.transform=eL(t)?"translate("+yl(t[4]*a)/a+" "+yl(t[5]*a)/a+")":Sk(t)}}function tL(r,t,e){for(var a=r.points,i=[],n=0;n<a.length;n++)i.push(yl(a[n][0]*e)/e),i.push(yl(a[n][1]*e)/e);t.points=i.join(" ")}function rL(r){return!r.smooth}function O3(r){var t=W(r,function(e){return typeof e=="string"?[e,e]:e});return function(e,a,i){for(var n=0;n<t.length;n++){var o=t[n],s=e[o[0]];s!=null&&(a[o[1]]=yl(s*i)/i)}}}var z3={circle:[O3(["cx","cy","r"])],polyline:[tL,rL],polygon:[tL,rL]};function B3(r){for(var t=r.animators,e=0;e<t.length;e++)if(t[e].targetName==="shape")return!0;return!1}function aL(r,t){var e=r.style,a=r.shape,i=z3[r.type],n={},o=t.animation,s="path",l=r.style.strokePercent,u=t.compress&&V0(r)||4;if(i&&!t.willUpdate&&!(i[1]&&!i[1](a))&&!(o&&B3(r))&&!(l<1)){s=r.type;var c=Math.pow(10,u);i[0](a,n,c)}else{var h=!r.path||r.shapeChanged();r.path||r.createPathProxy();var f=r.path;h&&(f.beginPath(),r.buildPath(f,r.shape),r.pathUpdated());var d=f.getVersion(),p=r,v=p.__svgPathBuilder;(p.__svgPathVersion!==d||!v||l!==p.__svgPathStrokePercent)&&(v||(v=p.__svgPathBuilder=new GS),v.reset(u),f.rebuildPath(v,l),v.generateStr(),p.__svgPathVersion=d,p.__svgPathStrokePercent=l),n.d=v.getStr()}return $v(n,r.transform),Wv(n,e,r,t),Hv(n,r),t.animation&&lh(r,n,t),t.emphasis&&R3(r,n,t),pt(s,r.id+"",n)}function F3(r,t){var e=r.style,a=e.image;if(a&&!X(a)&&(JS(a)?a=a.src:QS(a)&&(a=a.toDataURL())),!!a){var i=e.x||0,n=e.y||0,o=e.width,s=e.height,l={href:a,width:o,height:s};return i&&(l.x=i),n&&(l.y=n),$v(l,r.transform),Wv(l,e,r,t),Hv(l,r),t.animation&&lh(r,l,t),pt("image",r.id+"",l)}}function G3(r,t){var e=r.style,a=e.text;if(a!=null&&(a+=""),!(!a||isNaN(e.x)||isNaN(e.y))){var i=e.font||za,n=e.x||0,o=Tk(e.y||0,Ru(i),e.textBaseline),s=Lk[e.textAlign]||e.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(j1(e)){var u="",c=e.fontStyle,h=Z1(e.fontSize);if(!parseFloat(h))return;var f=e.fontFamily||Uy,d=e.fontWeight;u+="font-size:"+h+";font-family:"+f+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),d&&d!=="normal"&&(u+="font-weight:"+d+";"),l.style=u}else l.style="font: "+i;return a.match(/\s/)&&(l["xml:space"]="preserve"),n&&(l.x=n),o&&(l.y=o),$v(l,r.transform),Wv(l,e,r,t),Hv(l,r),t.animation&&lh(r,l,t),pt("text",r.id+"",l,void 0,a)}}function iL(r,t){if(r instanceof _e)return aL(r,t);if(r instanceof bt)return F3(r,t);if(r instanceof Es)return G3(r,t)}function W3(r,t,e){var a=r.style;if(Ck(a)){var i=Dk(r),n=e.shadowCache,o=n[i];if(!o){var s=r.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=a.shadowOffsetX||0,h=a.shadowOffsetY||0,f=a.shadowBlur,d=ms(a.shadowColor),p=d.opacity,v=d.color,g=f/2/l,m=f/2/u,y=g+" "+m;o=e.zrId+"-s"+e.shadowIdx++,e.defs[o]=pt("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[pt("feDropShadow","",{dx:c/l,dy:h/u,stdDeviation:y,"flood-color":v,"flood-opacity":p})]),n[i]=o}t.filter=Du(o)}}function nL(r,t,e,a){var i=r[e],n,o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(k0(i))n="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(N0(i))n="radialGradient",o.cx=le(i.x,.5),o.cy=le(i.y,.5),o.r=le(i.r,.5);else{process.env.NODE_ENV!=="production"&&Cr("Illegal gradient type.");return}for(var s=i.colorStops,l=[],u=0,c=s.length;u<c;++u){var h=jf(s[u].offset)*100+"%",f=s[u].color,d=ms(f),p=d.color,v=d.opacity,g={offset:h};g["stop-color"]=p,v<1&&(g["stop-opacity"]=v),l.push(pt("stop",u+"",g))}var m=pt(n,"",o,l),y=Fv(m),_=a.gradientCache,w=_[y];w||(w=a.zrId+"-g"+a.gradientIdx++,_[y]=w,o.id=w,a.defs[w]=pt(n,w,o,l)),t[e]=Du(w)}function oL(r,t,e,a){var i=r.style[e],n=r.getBoundingRect(),o={},s=i.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",h;if(P0(i)){var f=i.imageWidth,d=i.imageHeight,p=void 0,v=i.image;if(X(v)?p=v:JS(v)?p=v.src:QS(v)&&(p=v.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";ae(f,g),ae(d,g)}else if(f==null||d==null){var m=function(A,D){if(A){var E=A.elm,I=f||D.width,P=d||D.height;A.tag==="pattern"&&(u?(P=1,I/=n.width):c&&(I=1,P/=n.height)),A.attrs.width=I,A.attrs.height=P,E&&(E.setAttribute("width",I),E.setAttribute("height",P))}},y=Dd(p,null,r,function(A){l||m(S,A),m(h,A)});y&&y.width&&y.height&&(f=f||y.width,d=d||y.height)}h=pt("image","img",{href:p,width:f,height:d}),o.width=f,o.height=d}else i.svgElement&&(h=ne(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(h){var _,w;l?_=w=1:u?(w=1,_=o.width/n.width):c?(_=1,w=o.height/n.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),w!=null&&!isNaN(w)&&(o.height=w);var x=O0(i);x&&(o.patternTransform=x);var S=pt("pattern","",o,[h]),L=Fv(S),C=a.patternCache,T=C[L];T||(T=a.zrId+"-p"+a.patternIdx++,C[L]=T,o.id=T,S=a.defs[T]=pt("pattern",T,o,[h])),t[e]=Du(T)}}function H3(r,t,e){var a=e.clipPathCache,i=e.defs,n=a[r.id];if(!n){n=e.zrId+"-c"+e.clipPathIdx++;var o={id:n};a[r.id]=n,i[n]=pt("clipPath",n,o,[aL(r,e)])}t["clip-path"]=Du(n)}function sL(r){return document.createTextNode(r)}function Sn(r,t,e){r.insertBefore(t,e)}function lL(r,t){r.removeChild(t)}function uL(r,t){r.appendChild(t)}function cL(r){return r.parentNode}function hL(r){return r.nextSibling}function Uv(r,t){r.textContent=t}var fL=58,$3=120,U3=pt("","");function Yv(r){return r===void 0}function oa(r){return r!==void 0}function Y3(r,t,e){for(var a={},i=t;i<=e;++i){var n=r[i].key;n!==void 0&&(process.env.NODE_ENV!=="production"&&a[n]!=null&&console.error("Duplicate key "+n),a[n]=i)}return a}function _l(r,t){var e=r.key===t.key,a=r.tag===t.tag;return a&&e}function bl(r){var t,e=r.children,a=r.tag;if(oa(a)){var i=r.elm=US(a);if(Zv(U3,r),G(e))for(t=0;t<e.length;++t){var n=e[t];n!=null&&uL(i,bl(n))}else oa(r.text)&&!re(r.text)&&uL(i,sL(r.text))}else r.elm=sL(r.text);return r.elm}function dL(r,t,e,a,i){for(;a<=i;++a){var n=e[a];n!=null&&Sn(r,bl(n),t)}}function uh(r,t,e,a){for(;e<=a;++e){var i=t[e];if(i!=null)if(oa(i.tag)){var n=cL(i.elm);lL(n,i.elm)}else lL(r,i.elm)}}function Zv(r,t){var e,a=t.elm,i=r&&r.attrs||{},n=t.attrs||{};if(i!==n){for(e in n){var o=n[e],s=i[e];s!==o&&(o===!0?a.setAttribute(e,""):o===!1?a.removeAttribute(e):e==="style"?a.style.cssText=o:e.charCodeAt(0)!==$3?a.setAttribute(e,o):e==="xmlns:xlink"||e==="xmlns"?a.setAttributeNS(T3,e,o):e.charCodeAt(3)===fL?a.setAttributeNS(C3,e,o):e.charCodeAt(5)===fL?a.setAttributeNS(HS,e,o):a.setAttribute(e,o))}for(e in i)e in n||a.removeAttribute(e)}}function Z3(r,t,e){for(var a=0,i=0,n=t.length-1,o=t[0],s=t[n],l=e.length-1,u=e[0],c=e[l],h,f,d,p;a<=n&&i<=l;)o==null?o=t[++a]:s==null?s=t[--n]:u==null?u=e[++i]:c==null?c=e[--l]:_l(o,u)?(Vo(o,u),o=t[++a],u=e[++i]):_l(s,c)?(Vo(s,c),s=t[--n],c=e[--l]):_l(o,c)?(Vo(o,c),Sn(r,o.elm,hL(s.elm)),o=t[++a],c=e[--l]):_l(s,u)?(Vo(s,u),Sn(r,s.elm,o.elm),s=t[--n],u=e[++i]):(Yv(h)&&(h=Y3(t,a,n)),f=h[u.key],Yv(f)?Sn(r,bl(u),o.elm):(d=t[f],d.tag!==u.tag?Sn(r,bl(u),o.elm):(Vo(d,u),t[f]=void 0,Sn(r,d.elm,o.elm))),u=e[++i]);(a<=n||i<=l)&&(a>n?(p=e[l+1]==null?null:e[l+1].elm,dL(r,p,e,i,l)):uh(r,t,a,n))}function Vo(r,t){var e=t.elm=r.elm,a=r.children,i=t.children;r!==t&&(Zv(r,t),Yv(t.text)?oa(a)&&oa(i)?a!==i&&Z3(e,a,i):oa(i)?(oa(r.text)&&Uv(e,""),dL(e,null,i,0,i.length-1)):oa(a)?uh(e,a,0,a.length-1):oa(r.text)&&Uv(e,""):r.text!==t.text&&(oa(a)&&uh(e,a,0,a.length-1),Uv(e,t.text)))}function X3(r,t){if(_l(r,t))Vo(r,t);else{var e=r.elm,a=cL(e);bl(t),a!==null&&(Sn(a,t.elm,hL(e)),uh(a,[r],0,0))}return t}var j3=0,q3=function(){function r(t,e,a){if(this.type="svg",this.refreshHover=pL("refreshHover"),this.configLayer=pL("configLayer"),this.storage=e,this._opts=a=F({},a),this.root=t,this._id="zr"+j3++,this._oldVNode=YS(a.width,a.height),t&&!a.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var n=this._svgDom=this._oldVNode.elm=US("svg");Zv(null,this._oldVNode),i.appendChild(n),t.appendChild(i)}this.resize(a.width,a.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",X3(this._oldVNode,t),this._oldVNode=t}},r.prototype.renderOneToVNode=function(t){return iL(t,Gv(this._id))},r.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),a=this._width,i=this._height,n=Gv(this._id);n.animation=t.animation,n.willUpdate=t.willUpdate,n.compress=t.compress,n.emphasis=t.emphasis,n.ssr=this._opts.ssr;var o=[],s=this._bgVNode=K3(a,i,this._backgroundColor,n);s&&o.push(s);var l=t.compress?null:this._mainVNode=pt("g","main",{},[]);this._paintList(e,n,l?l.children:o),l&&o.push(l);var u=W(we(n.defs),function(f){return n.defs[f]});if(u.length&&o.push(pt("defs","defs",{},u)),t.animation){var c=M3(n.cssNodes,n.cssAnims,{newline:!0});if(c){var h=pt("style","stl",{},[],c);o.push(h)}}return YS(a,i,o,t.useViewBox)},r.prototype.renderToString=function(t){return t=t||{},Fv(this.renderToVNode({animation:le(t.cssAnimation,!0),emphasis:le(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:le(t.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(t,e,a){for(var i=t.length,n=[],o=0,s,l,u=0,c=0;c<i;c++){var h=t[c];if(!h.invisible){var f=h.__clipPaths,d=f&&f.length||0,p=l&&l.length||0,v=void 0;for(v=Math.max(d-1,p-1);v>=0&&!(f&&l&&f[v]===l[v]);v--);for(var g=p-1;g>v;g--)o--,s=n[o-1];for(var m=v+1;m<d;m++){var y={};H3(f[m],y,e);var _=pt("g","clip-g-"+u++,y,[]);(s?s.children:a).push(_),n[o++]=_,s=_}l=f;var w=iL(h,e);w&&(s?s.children:a).push(w)}}},r.prototype.resize=function(t,e){var a=this._opts,i=this.root,n=this._viewport;if(t!=null&&(a.width=t),e!=null&&(a.height=e),i&&n&&(n.style.display="none",t=Mo(i,0,a),e=Mo(i,1,a),n.style.display=""),this._width!==t||this._height!==e){if(this._width=t,this._height=e,n){var o=n.style;o.width=t+"px",o.height=e+"px"}if(qf(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",t),s.setAttribute("height",e));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",t),l.setAttribute("height",e))}}},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},r.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},r.prototype.toDataURL=function(t){var e=this.renderToString(),a="data:image/svg+xml;";return t?(e=Mk(e),e&&a+"base64,"+e):a+"charset=UTF-8,"+encodeURIComponent(e)},r}();function pL(r){return function(){process.env.NODE_ENV!=="production"&&Cr('In SVG mode painter not support method "'+r+'"')}}function K3(r,t,e,a){var i;if(e&&e!=="none")if(i=pt("rect","bg",{width:r,height:t,x:"0",y:"0"}),R0(e))nL({fill:e},i.attrs,"fill",a);else if(qf(e))oL({style:{fill:e},dirty:et,getBoundingRect:function(){return{width:r,height:t}}},i.attrs,"fill",a);else{var n=ms(e),o=n.color,s=n.opacity;i.attrs.fill=o,s<1&&(i.attrs["fill-opacity"]=s)}return i}const J3=q3;function Q3(r){r.registerPainter("svg",J3)}function vL(r,t,e){var a=Ba.createCanvas(),i=t.getWidth(),n=t.getHeight(),o=a.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=n+"px",a.setAttribute("data-zr-dom-id",r)),a.width=i*e,a.height=n*e,a}var e4=function(r){z(t,r);function t(e,a,i){var n=r.call(this)||this;n.motionBlur=!1,n.lastFrameAlpha=.7,n.dpr=1,n.virtual=!1,n.config={},n.incremental=!1,n.zlevel=0,n.maxRepaintRectCount=5,n.__dirty=!0,n.__firstTimePaint=!0,n.__used=!1,n.__drawIndex=0,n.__startIndex=0,n.__endIndex=0,n.__prevStartIndex=null,n.__prevEndIndex=null;var o;i=i||Nu,typeof e=="string"?o=vL(e,a,i):re(e)&&(o=e,e=o.id),n.id=e,n.dom=o;var s=o.style;return s&&(e0(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),n.painter=a,n.dpr=i,n}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=vL("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,a,i,n){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new ge(0,0,0,0);function c(y){if(!(!y.isFinite()||y.isZero()))if(o.length===0){var _=new ge(0,0,0,0);_.copy(y),o.push(_)}else{for(var w=!1,x=1/0,S=0,L=0;L<o.length;++L){var C=o[L];if(C.intersect(y)){var T=new ge(0,0,0,0);T.copy(C),T.union(y),o[L]=T,w=!0;break}else if(l){u.copy(y),u.union(C);var A=y.width*y.height,D=C.width*C.height,E=u.width*u.height,I=E-A-D;I<x&&(x=I,S=L)}}if(l&&(o[S].union(y),w=!0),!w){var _=new ge(0,0,0,0);_.copy(y),o.push(_)}l||(l=o.length>=s)}}for(var h=this.__startIndex;h<this.__endIndex;++h){var f=e[h];if(f){var d=f.shouldBePainted(i,n,!0,!0),p=f.__isRendered&&(f.__dirty&Qt||!d)?f.getPrevPaintRect():null;p&&c(p);var v=d&&(f.__dirty&Qt||!f.__isRendered)?f.getPaintRect():null;v&&c(v)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var f=a[h],d=f&&f.shouldBePainted(i,n,!0,!0);if(f&&(!d||!f.__zr)&&f.__isRendered){var p=f.getPrevPaintRect();p&&c(p)}}var g;do{g=!1;for(var h=0;h<o.length;){if(o[h].isZero()){o.splice(h,1);continue}for(var m=h+1;m<o.length;)o[h].intersect(o[m])?(g=!0,o[h].union(o[m]),o.splice(m,1)):m++;h++}}while(g);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,a){var i=this.dpr,n=this.dom,o=n.style,s=this.domBack;o&&(o.width=e+"px",o.height=a+"px"),n.width=e*i,n.height=a*i,s&&(s.width=e*i,s.height=a*i,i!==1&&this.ctxBack.scale(i,i))},t.prototype.clear=function(e,a,i){var n=this.dom,o=this.ctx,s=n.width,l=n.height;a=a||this.clearColor;var u=this.motionBlur&&!e,c=this.lastFrameAlpha,h=this.dpr,f=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,s/h,l/h));var d=this.domBack;function p(v,g,m,y){if(o.clearRect(v,g,m,y),a&&a!=="transparent"){var _=void 0;if(su(a)){var w=a.global||a.__width===m&&a.__height===y;_=w&&a.__canvasGradient||Jp(o,a,{x:0,y:0,width:m,height:y}),a.__canvasGradient=_,a.__width=m,a.__height=y}else EP(a)&&(a.scaleX=a.scaleX||h,a.scaleY=a.scaleY||h,_=ev(o,a,{dirty:function(){f.setUnpainted(),f.painter.refresh()}}));o.save(),o.fillStyle=_||a,o.fillRect(v,g,m,y),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(d,v,g,m,y),o.restore())}!i||u?p(0,0,s,l):i.length&&M(i,function(v){p(v.x*h,v.y*h,v.width*h,v.height*h)})},t}(or);const Xv=e4;var gL=1e5,Ln=314159,ch=.01,t4=.001;function r4(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function a4(r,t){var e=document.createElement("div");return e.style.cssText=["position:relative","width:"+r+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",e}var i4=function(){function r(t,e,a,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var n=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=a=F({},a||{}),this.dpr=a.devicePixelRatio||Nu,this._singleCanvas=n,this.root=t;var o=t.style;o&&(e0(t),t.innerHTML=""),this.storage=e;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(n){var c=t,h=c.width,f=c.height;a.width!=null&&(h=a.width),a.height!=null&&(f=a.height),this.dpr=a.devicePixelRatio||1,c.width=h*this.dpr,c.height=f*this.dpr,this._width=h,this._height=f;var d=new Xv(c,this,this.dpr);d.__builtin__=!0,d.initContext(),l[Ln]=d,d.zlevel=Ln,s.push(Ln),this._domRoot=t}else{this._width=Mo(t,0,a),this._height=Mo(t,1,a);var u=this._domRoot=a4(this._width,this._height);t.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),a=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,a,t,this._redrawId);for(var n=0;n<i.length;n++){var o=i[n],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=n===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(t){var e=t.length,a=this._hoverlayer;if(a&&a.clear(),!!e){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},n,o=0;o<e;o++){var s=t[o];s.__inHover&&(a||(a=this._hoverlayer=this.getLayer(gL)),n||(n=a.ctx,n.save()),gn(n,s,i,o===e-1))}n&&n.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(gL)},r.prototype.paintOne=function(t,e){lx(t,e)},r.prototype._paintList=function(t,e,a,i){if(this._redrawId===i){a=a||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e,a),o=n.finished,s=n.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(t),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;Bf(function(){l._paintList(t,e,a,i)})}}},r.prototype._compositeManually=function(){var t=this.getLayer(Ln).ctx,e=this._domRoot.width,a=this._domRoot.height;t.clearRect(0,0,e,a),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,e,a)})},r.prototype._doPaintList=function(t,e,a){for(var i=this,n=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||a)&&n.push(u)}for(var c=!0,h=!1,f=function(v){var g=n[v],m=g.ctx,y=o&&g.createRepaintRects(t,e,d._width,d._height),_=a?g.__startIndex:g.__drawIndex,w=!a&&g.incremental&&Date.now,x=w&&Date.now(),S=g.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,S,y);else if(_===g.__startIndex){var L=t[_];(!L.incremental||!L.notClear||a)&&g.clear(!1,S,y)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=g.__startIndex);var C,T=function(I){var P={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(C=_;C<g.__endIndex;C++){var k=t[C];if(k.__inHover&&(h=!0),i._doPaintEl(k,g,o,I,P,C===g.__endIndex-1),w){var N=Date.now()-x;if(N>15)break}}P.prevElClipPaths&&m.restore()};if(y)if(y.length===0)C=g.__endIndex;else for(var A=d.dpr,D=0;D<y.length;++D){var E=y[D];m.save(),m.beginPath(),m.rect(E.x*A,E.y*A,E.width*A,E.height*A),m.clip(),T(E),m.restore()}else m.save(),T(),m.restore();g.__drawIndex=C,g.__drawIndex<g.__endIndex&&(c=!1)},d=this,p=0;p<n.length;p++)f(p);return Le.wxa&&M(this._layers,function(v){v&&v.ctx&&v.ctx.draw&&v.ctx.draw()}),{finished:c,needsRefreshHover:h}},r.prototype._doPaintEl=function(t,e,a,i,n,o){var s=e.ctx;if(a){var l=t.getPaintRect();(!i||l&&l.intersect(i))&&(gn(s,t,n,o),t.setPrevPaintRect(l))}else gn(s,t,n,o)},r.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Ln);var a=this._layers[t];return a||(a=new Xv("zr_"+t,this,this.dpr),a.zlevel=t,a.__builtin__=!0,this._layerConfig[t]?de(a,this._layerConfig[t],!0):this._layerConfig[t-ch]&&de(a,this._layerConfig[t-ch],!0),e&&(a.virtual=e),this.insertLayer(t,a),a.initContext()),a},r.prototype.insertLayer=function(t,e){var a=this._layers,i=this._zlevelList,n=i.length,o=this._domRoot,s=null,l=-1;if(a[t]){process.env.NODE_ENV!=="production"&&Cr("ZLevel "+t+" has been used already");return}if(!r4(e)){process.env.NODE_ENV!=="production"&&Cr("Layer of zlevel "+t+" is not valid");return}if(n>0&&t>i[0]){for(l=0;l<n-1&&!(i[l]<t&&i[l+1]>t);l++);s=a[i[l]]}if(i.splice(l+1,0,t),a[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(e.dom,u.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)},r.prototype.eachLayer=function(t,e){for(var a=this._zlevelList,i=0;i<a.length;i++){var n=a[i];t.call(e,this._layers[n],n)}},r.prototype.eachBuiltinLayer=function(t,e){for(var a=this._zlevelList,i=0;i<a.length;i++){var n=a[i],o=this._layers[n];o.__builtin__&&t.call(e,o,n)}},r.prototype.eachOtherLayer=function(t,e){for(var a=this._zlevelList,i=0;i<a.length;i++){var n=a[i],o=this._layers[n];o.__builtin__||t.call(e,o,n)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(h,f){h.__dirty=h.__used=!1});function e(h){n&&(n.__endIndex!==h&&(n.__dirty=!0),n.__endIndex=h)}if(this._singleCanvas)for(var a=1;a<t.length;a++){var i=t[a];if(i.zlevel!==t[a-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var n=null,o=0,s,l;for(l=0;l<t.length;l++){var i=t[l],u=i.zlevel,c=void 0;s!==u&&(s=u,o=0),i.incremental?(c=this.getLayer(u+t4,this._needsManuallyCompositing),c.incremental=!0,o=1):c=this.getLayer(u+(o>0?ch:0),this._needsManuallyCompositing),c.__builtin__||Cr("ZLevel "+u+" has been used by unkown layer "+c.id),c!==n&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,e(l),n=c),i.__dirty&Qt&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(h,f){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(t){t.clear()},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,M(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var a=this._layerConfig;a[t]?de(a[t],e,!0):a[t]=e;for(var i=0;i<this._zlevelList.length;i++){var n=this._zlevelList[i];if(n===t||n===t+ch){var o=this._layers[n];de(o,a[t],!0)}}}},r.prototype.delLayer=function(t){var e=this._layers,a=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],a.splice(me(a,t),1))},r.prototype.resize=function(t,e){if(this._domRoot.style){var a=this._domRoot;a.style.display="none";var i=this._opts,n=this.root;if(t!=null&&(i.width=t),e!=null&&(i.height=e),t=Mo(n,0,i),e=Mo(n,1,i),a.style.display="",this._width!==t||e!==this._height){a.style.width=t+"px",a.style.height=e+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(t==null||e==null)return;this._width=t,this._height=e,this.getLayer(Ln).resize(t,e)}return this},r.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[Ln].dom;var e=new Xv("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var a=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,n=e.dom.height;this.eachLayer(function(h){h.__builtin__?a.drawImage(h.dom,0,0,i,n):h.renderToCanvas&&(a.save(),h.renderToCanvas(a),a.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var c=s[l];gn(a,c,o,l===u-1)}return e.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r}();const n4=i4;function o4(r){r.registerPainter("canvas",n4)}var s4=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e){if(process.env.NODE_ENV!=="production"){var a=e.coordinateSystem;if(a!=="polar"&&a!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return Da(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var a=new oe,i=lt("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);a.add(i),i.setStyle(e.lineStyle);var n=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=n==="none"?"circle":n,l=e.itemHeight*.8,u=lt(s,(e.itemWidth-l)/2,(e.itemHeight-l)/2,l,l,e.itemStyle.fill);a.add(u),u.setStyle(e.itemStyle);var c=e.iconRotate==="inherit"?o:e.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([e.itemWidth/2,e.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),a},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(Xe);const l4=s4;function Oo(r,t){var e=r.mapDimensionsAll("defaultedLabel"),a=e.length;if(a===1){var i=xo(r,t,e[0]);return i!=null?i+"":null}else if(a){for(var n=[],o=0;o<e.length;o++)n.push(xo(r,t,e[o]));return n.join(" ")}}function mL(r,t){var e=r.mapDimensionsAll("defaultedLabel");if(!G(t))return t+"";for(var a=[],i=0;i<e.length;i++){var n=r.getDimensionIndex(e[i]);n>=0&&a.push(t[n])}return a.join(" ")}var u4=function(r){z(t,r);function t(e,a,i,n){var o=r.call(this)||this;return o.updateData(e,a,i,n),o}return t.prototype._createSymbol=function(e,a,i,n,o){this.removeAll();var s=lt(e,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:n[0]/2,scaleY:n[1]/2}),s.drift=c4,this._symbolType=e,this.add(s)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){xa(this.childAt(0))},t.prototype.downplay=function(){Sa(this.childAt(0))},t.prototype.setZ=function(e,a){var i=this.childAt(0);i.zlevel=e,i.z=a},t.prototype.setDraggable=function(e,a){var i=this.childAt(0);i.draggable=e,i.cursor=!a&&e?"move":i.cursor},t.prototype.updateData=function(e,a,i,n){this.silent=!1;var o=e.getItemVisual(a,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,a),u=o!==this._symbolType,c=n&&n.disableAnimation;if(u){var h=e.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,e,a,l,h)}else{var f=this.childAt(0);f.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};c?f.attr(d):Me(f,d,s,a),kr(f)}if(this._updateCommon(e,a,l,i,n),u){var f=this.childAt(0);if(!c){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Ze(f,d,s,a)}}c&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,a,i,n,o){var s=this.childAt(0),l=e.hostModel,u,c,h,f,d,p,v,g,m;if(n&&(u=n.emphasisItemStyle,c=n.blurItemStyle,h=n.selectItemStyle,f=n.focus,d=n.blurScope,v=n.labelStatesModels,g=n.hoverScale,m=n.cursorStyle,p=n.emphasisDisabled),!n||e.hasItemOption){var y=n&&n.itemModel?n.itemModel:e.getItemModel(a),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),f=_.get("focus"),d=_.get("blurScope"),p=_.get("disabled"),v=ft(y),g=_.getShallow("scale"),m=y.getShallow("cursor")}var w=e.getItemVisual(a,"symbolRotate");s.attr("rotation",(w||0)*Math.PI/180||0);var x=pn(e.getItemVisual(a,"symbolOffset"),i);x&&(s.x=x[0],s.y=x[1]),m&&s.attr("cursor",m);var S=e.getItemVisual(a,"style"),L=S.fill;if(s instanceof bt){var C=s.style;s.useStyle(F({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},S))}else s.__isEmptyBrush?s.useStyle(F({},S)):s.useStyle(S),s.style.decal=null,s.setColor(L,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var T=e.getItemVisual(a,"liftZ"),A=this._z2;T!=null?A==null&&(this._z2=s.z2,s.z2+=T):A!=null&&(s.z2=A,this._z2=null);var D=o&&o.useNameLabel;xt(s,v,{labelFetcher:l,labelDataIndex:a,defaultText:E,inheritColor:L,defaultOpacity:S.opacity});function E(k){return D?e.getName(k):Oo(e,k)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=c;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;I.scaleX=this._sizeX*P,I.scaleY=this._sizeY*P,this.setSymbolScale(1),qe(this,f,d,p)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,a,i){var n=this.childAt(0),o=ue(this).dataIndex,s=i&&i.animation;if(this.silent=n.silent=!0,i&&i.fadeLabel){var l=n.getTextContent();l&&ei(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){n.removeTextContent()}})}else n.removeTextContent();ei(n,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,a){return Ao(e.getItemVisual(a,"symbolSize"))},t}(oe);function c4(r,t){this.parent.drift(r,t)}const wl=u4;function jv(r,t,e,a){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(a.isIgnore&&a.isIgnore(e))&&!(a.clipShape&&!a.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function yL(r){return r!=null&&!re(r)&&(r={isIgnore:r}),r||{}}function _L(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:ft(t),cursorStyle:t.get("cursor")}}var h4=function(){function r(t){this.group=new oe,this._SymbolCtor=t||wl}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=yL(e);var a=this.group,i=t.hostModel,n=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=_L(t),u={disableAnimation:s},c=e.getSymbolPoint||function(h){return t.getItemLayout(h)};n||a.removeAll(),t.diff(n).add(function(h){var f=c(h);if(jv(t,f,h,e)){var d=new o(t,h,l,u);d.setPosition(f),t.setItemGraphicEl(h,d),a.add(d)}}).update(function(h,f){var d=n.getItemGraphicEl(f),p=c(h);if(!jv(t,p,h,e)){a.remove(d);return}var v=t.getItemVisual(h,"symbol")||"circle",g=d&&d.getSymbolType&&d.getSymbolType();if(!d||g&&g!==v)a.remove(d),d=new o(t,h,l,u),d.setPosition(p);else{d.updateData(t,h,l,u);var m={x:p[0],y:p[1]};s?d.attr(m):Me(d,m,i)}a.add(d),t.setItemGraphicEl(h,d)}).remove(function(h){var f=n.getItemGraphicEl(h);f&&f.fadeOut(function(){a.remove(f)},i)}).execute(),this._getSymbolPoint=c,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(a,i){var n=t._getSymbolPoint(i);a.setPosition(n),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=_L(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,a){this._progressiveEls=[],a=yL(a);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var n=t.start;n<t.end;n++){var o=e.getItemLayout(n);if(jv(e,o,n,a)){var s=new this._SymbolCtor(e,n,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),e.setItemGraphicEl(n,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(t){ti(this._progressiveEls||this.group,t)},r.prototype.remove=function(t){var e=this.group,a=this._data;a&&t?a.eachItemGraphicEl(function(i){i.fadeOut(function(){e.remove(i)},a.hostModel)}):e.removeAll()},r}();const xl=h4;function bL(r,t,e){var a=r.getBaseAxis(),i=r.getOtherAxis(a),n=f4(i,e),o=a.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(o),c=s==="x"||s==="radius"?1:0,h=W(r.dimensions,function(p){return t.mapDimension(p)}),f=!1,d=t.getCalculationInfo("stackResultDimension");return ui(t,h[0])&&(f=!0,h[0]=d),ui(t,h[1])&&(f=!0,h[1]=d),{dataDimsForPoint:h,valueStart:n,valueAxisDim:s,baseAxisDim:o,stacked:!!f,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function f4(r,t){var e=0,a=r.scale.getExtent();return t==="start"?e=a[0]:t==="end"?e=a[1]:De(t)&&!isNaN(t)?e=t:a[0]>0?e=a[0]:a[1]<0&&(e=a[1]),e}function wL(r,t,e,a){var i=NaN;r.stacked&&(i=e.get(e.getCalculationInfo("stackedOverDimension"),a)),isNaN(i)&&(i=r.valueStart);var n=r.baseDataOffset,o=[];return o[n]=e.get(r.baseDim,a),o[1-n]=i,t.dataToPoint(o)}function d4(r,t){var e=[];return t.diff(r).add(function(a){e.push({cmd:"+",idx:a})}).update(function(a,i){e.push({cmd:"=",idx:i,idx1:a})}).remove(function(a){e.push({cmd:"-",idx:a})}).execute(),e}function p4(r,t,e,a,i,n,o,s){for(var l=d4(r,t),u=[],c=[],h=[],f=[],d=[],p=[],v=[],g=bL(i,t,o),m=r.getLayout("points")||[],y=t.getLayout("points")||[],_=0;_<l.length;_++){var w=l[_],x=!0,S=void 0,L=void 0;switch(w.cmd){case"=":S=w.idx*2,L=w.idx1*2;var C=m[S],T=m[S+1],A=y[L],D=y[L+1];(isNaN(C)||isNaN(T))&&(C=A,T=D),u.push(C,T),c.push(A,D),h.push(e[S],e[S+1]),f.push(a[L],a[L+1]),v.push(t.getRawIndex(w.idx1));break;case"+":var E=w.idx,I=g.dataDimsForPoint,P=i.dataToPoint([t.get(I[0],E),t.get(I[1],E)]);L=E*2,u.push(P[0],P[1]),c.push(y[L],y[L+1]);var k=wL(g,i,t,E);h.push(k[0],k[1]),f.push(a[L],a[L+1]),v.push(t.getRawIndex(E));break;case"-":x=!1}x&&(d.push(w),p.push(p.length))}p.sort(function(q,Ce){return v[q]-v[Ce]});for(var N=u.length,O=aa(N),R=aa(N),V=aa(N),B=aa(N),H=[],_=0;_<p.length;_++){var Y=p[_],$=_*2,U=Y*2;O[$]=u[U],O[$+1]=u[U+1],R[$]=c[U],R[$+1]=c[U+1],V[$]=h[U],V[$+1]=h[U+1],B[$]=f[U],B[$+1]=f[U+1],H[_]=d[Y]}return{current:O,next:R,stackedOnCurrent:V,stackedOnNext:B,status:H}}var hi=Math.min,fi=Math.max;function Tn(r,t){return isNaN(r)||isNaN(t)}function qv(r,t,e,a,i,n,o,s,l){for(var u,c,h,f,d,p,v=e,g=0;g<a;g++){var m=t[v*2],y=t[v*2+1];if(v>=i||v<0)break;if(Tn(m,y)){if(l){v+=n;continue}break}if(v===e)r[n>0?"moveTo":"lineTo"](m,y),h=m,f=y;else{var _=m-u,w=y-c;if(_*_+w*w<.5){v+=n;continue}if(o>0){for(var x=v+n,S=t[x*2],L=t[x*2+1];S===m&&L===y&&g<a;)g++,x+=n,v+=n,S=t[x*2],L=t[x*2+1],m=t[v*2],y=t[v*2+1],_=m-u,w=y-c;var C=g+1;if(l)for(;Tn(S,L)&&C<a;)C++,x+=n,S=t[x*2],L=t[x*2+1];var T=.5,A=0,D=0,E=void 0,I=void 0;if(C>=a||Tn(S,L))d=m,p=y;else{A=S-u,D=L-c;var P=m-u,k=S-m,N=y-c,O=L-y,R=void 0,V=void 0;if(s==="x"){R=Math.abs(P),V=Math.abs(k);var B=A>0?1:-1;d=m-B*R*o,p=y,E=m+B*V*o,I=y}else if(s==="y"){R=Math.abs(N),V=Math.abs(O);var H=D>0?1:-1;d=m,p=y-H*R*o,E=m,I=y+H*V*o}else R=Math.sqrt(P*P+N*N),V=Math.sqrt(k*k+O*O),T=V/(V+R),d=m-A*o*(1-T),p=y-D*o*(1-T),E=m+A*o*T,I=y+D*o*T,E=hi(E,fi(S,m)),I=hi(I,fi(L,y)),E=fi(E,hi(S,m)),I=fi(I,hi(L,y)),A=E-m,D=I-y,d=m-A*R/V,p=y-D*R/V,d=hi(d,fi(u,m)),p=hi(p,fi(c,y)),d=fi(d,hi(u,m)),p=fi(p,hi(c,y)),A=m-d,D=y-p,E=m+A*V/R,I=y+D*V/R}r.bezierCurveTo(h,f,d,p,m,y),h=E,f=I}else r.lineTo(m,y)}u=m,c=y,v+=n}return g}var xL=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),v4=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polyline",a}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new xL},t.prototype.buildPath=function(e,a){var i=a.points,n=0,o=i.length/2;if(a.connectNulls){for(;o>0&&Tn(i[o*2-2],i[o*2-1]);o--);for(;n<o&&Tn(i[n*2],i[n*2+1]);n++);}for(;n<o;)n+=qv(e,i,n,o,o,1,a.smooth,a.smoothMonotone,a.connectNulls)+1},t.prototype.getPointOn=function(e,a){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,n=i.data,o=Jr.CMD,s,l,u=a==="x",c=[],h=0;h<n.length;){var f=n[h++],d=void 0,p=void 0,v=void 0,g=void 0,m=void 0,y=void 0,_=void 0;switch(f){case o.M:s=n[h++],l=n[h++];break;case o.L:if(d=n[h++],p=n[h++],_=u?(e-s)/(d-s):(e-l)/(p-l),_<=1&&_>=0){var w=u?(p-l)*_+l:(d-s)*_+s;return u?[e,w]:[w,e]}s=d,l=p;break;case o.C:d=n[h++],p=n[h++],v=n[h++],g=n[h++],m=n[h++],y=n[h++];var x=u?wu(s,d,v,m,e,c):wu(l,p,g,y,e,c);if(x>0)for(var S=0;S<x;S++){var L=c[S];if(L<=1&&L>=0){var w=u?ht(l,p,g,y,L):ht(s,d,v,m,L);return u?[e,w]:[w,e]}}s=m,l=y;break}}},t}(_e),g4=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(xL),SL=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polygon",a}return t.prototype.getDefaultShape=function(){return new g4},t.prototype.buildPath=function(e,a){var i=a.points,n=a.stackedOnPoints,o=0,s=i.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&Tn(i[s*2-2],i[s*2-1]);s--);for(;o<s&&Tn(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=qv(e,i,o,s,s,1,a.smooth,l,a.connectNulls);qv(e,n,o+u-1,u,s,-1,a.stackedOnSmooth,l,a.connectNulls),o+=u+1,e.closePath()}},t}(_e);function LL(r,t,e,a,i){var n=r.getArea(),o=n.x,s=n.y,l=n.width,u=n.height,c=e.get(["lineStyle","width"])||0;o-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var h=new Te({shape:{x:o,y:s,width:l,height:u}});if(t){var f=r.getBaseAxis(),d=f.isHorizontal(),p=f.inverse;d?(p&&(h.shape.x+=l),h.shape.width=0):(p||(h.shape.y+=u),h.shape.height=0);var v=te(i)?function(g){i(g,h)}:null;Ze(h,{shape:{width:l,height:u,x:o,y:s}},e,null,a,v)}return h}function TL(r,t,e){var a=r.getArea(),i=Qe(a.r0,1),n=Qe(a.r,1),o=new Yt({shape:{cx:Qe(r.cx,1),cy:Qe(r.cy,1),r0:i,r:n,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}});if(t){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=a.startAngle:o.shape.r=i,Ze(o,{shape:{endAngle:a.endAngle,r:n}},e)}return o}function Sl(r,t,e,a,i){if(r){if(r.type==="polar")return TL(r,t,e);if(r.type==="cartesian2d")return LL(r,t,e,a,i)}else return null;return null}function Cn(r,t){return r.type===t}function CL(r,t){if(r.length===t.length){for(var e=0;e<r.length;e++)if(r[e]!==t[e])return;return!0}}function DL(r){for(var t=1/0,e=1/0,a=-1/0,i=-1/0,n=0;n<r.length;){var o=r[n++],s=r[n++];isNaN(o)||(t=Math.min(o,t),a=Math.max(o,a)),isNaN(s)||(e=Math.min(s,e),i=Math.max(s,i))}return[[t,e],[a,i]]}function AL(r,t){var e=DL(r),a=e[0],i=e[1],n=DL(t),o=n[0],s=n[1];return Math.max(Math.abs(a[0]-o[0]),Math.abs(a[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function ML(r){return De(r)?r:r?.5:0}function m4(r,t,e){if(!e.valueDim)return[];for(var a=t.count(),i=aa(a*2),n=0;n<a;n++){var o=wL(e,r,t,n);i[n*2]=o[0],i[n*2+1]=o[1]}return i}function di(r,t,e,a,i){var n=e.getBaseAxis(),o=n.dim==="x"||n.dim==="radius"?0:1,s=[],l=0,u=[],c=[],h=[],f=[];if(i){for(l=0;l<r.length;l+=2){var d=t||r;!isNaN(d[l])&&!isNaN(d[l+1])&&f.push(r[l],r[l+1])}r=f}for(l=0;l<r.length-2;l+=2)switch(h[0]=r[l+2],h[1]=r[l+3],c[0]=r[l],c[1]=r[l+1],s.push(c[0],c[1]),a){case"end":u[o]=h[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var p=(c[o]+h[o])/2,v=[];u[o]=v[o]=p,u[1-o]=c[1-o],v[1-o]=h[1-o],s.push(u[0],u[1]),s.push(v[0],v[1]);break;default:u[o]=c[o],u[1-o]=h[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function y4(r,t){var e=[],a=r.length,i,n;function o(c,h,f){var d=c.coord,p=(f-d)/(h.coord-d),v=xk(p,[c.color,h.color]);return{coord:f,color:v}}for(var s=0;s<a;s++){var l=r[s],u=l.coord;if(u<0)i=l;else if(u>t){n?e.push(o(n,l,t)):i&&e.push(o(i,l,0),o(i,l,t));break}else i&&(e.push(o(i,l,0)),i=null),e.push(l),n=l}return e}function _4(r,t,e){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())){if(t.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var i,n,o=a.length-1;o>=0;o--){var s=r.getDimensionInfo(a[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){n=a[o];break}}if(!n){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var l=t.getAxis(i),u=W(n.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,h=n.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var f=y4(u,i==="x"?e.getWidth():e.getHeight()),d=f.length;if(!d&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var p=10,v=f[0].coord-p,g=f[d-1].coord+p,m=g-v;if(m<.001)return"transparent";M(f,function(_){_.offset=(_.coord-v)/m}),f.push({offset:d?f[d-1].offset:.5,color:h[1]||"transparent"}),f.unshift({offset:d?f[0].offset:.5,color:h[0]||"transparent"});var y=new zs(0,0,0,0,f,!0);return y[i]=v,y[i+"2"]=g,y}}function b4(r,t,e){var a=r.get("showAllSymbol"),i=a==="auto";if(!(a&&!i)){var n=e.getAxesByScale("ordinal")[0];if(n&&!(i&&w4(n,t))){var o=t.mapDimension(n.dim),s={};return M(n.getViewLabels(),function(l){var u=n.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function w4(r,t){var e=r.getExtent(),a=Math.abs(e[1]-e[0])/r.scale.count();isNaN(a)&&(a=0);for(var i=t.count(),n=Math.max(1,Math.round(i/5)),o=0;o<i;o+=n)if(wl.getSymbolSize(t,o)[r.isHorizontal()?1:0]*1.5>a)return!1;return!0}function x4(r,t){return isNaN(r)||isNaN(t)}function S4(r){for(var t=r.length/2;t>0&&x4(r[t*2-2],r[t*2-1]);t--);return t-1}function EL(r,t){return[r[t*2],r[t*2+1]]}function L4(r,t,e){for(var a=r.length/2,i=e==="x"?0:1,n,o,s=0,l=-1,u=0;u<a;u++)if(o=r[u*2+i],!(isNaN(o)||isNaN(r[u*2+1-i]))){if(u===0){n=o;continue}if(n<=t&&o>=t||n>=t&&o<=t){l=u;break}s=u,n=o}return{range:[s,l],t:(t-n)/(o-n)}}function IL(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t<Bt.length;t++)if(r.get([Bt[t],"endLabel","show"]))return!0;return!1}function Kv(r,t,e,a){if(Cn(t,"cartesian2d")){var i=a.getModel("endLabel"),n=i.get("valueAnimation"),o=a.getData(),s={lastFrameIndex:0},l=IL(a)?function(d,p){r._endLabelOnDuring(d,p,o,s,n,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=LL(t,e,a,function(){var d=r._endLabel;d&&e&&s.originalX!=null&&d.attr({x:s.originalX,y:s.originalY})},l);if(!a.get("clip",!0)){var h=c.shape,f=Math.max(h.width,h.height);u?(h.y-=f,h.height+=f*2):(h.x-=f,h.width+=f*2)}return l&&l(1,c),c}else return process.env.NODE_ENV!=="production"&&a.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),TL(t,e,a)}function T4(r,t){var e=t.getBaseAxis(),a=e.isHorizontal(),i=e.inverse,n=a?i?"right":"left":"center",o=a?"middle":i?"top":"bottom";return{normal:{align:r.get("align")||n,verticalAlign:r.get("verticalAlign")||o}}}var C4=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(){var e=new oe,a=new xl;this.group.add(a.group),this._symbolDraw=a,this._lineGroup=e,this._changePolyState=j(this._changePolyState,this)},t.prototype.render=function(e,a,i){var n=e.coordinateSystem,o=this.group,s=e.getData(),l=e.getModel("lineStyle"),u=e.getModel("areaStyle"),c=s.getLayout("points")||[],h=n.type==="polar",f=this._coordSys,d=this._symbolDraw,p=this._polyline,v=this._polygon,g=this._lineGroup,m=!a.ssr&&e.get("animation"),y=!u.isEmpty(),_=u.get("origin"),w=bL(n,s,_),x=y&&m4(n,s,w),S=e.get("showSymbol"),L=e.get("connectNulls"),C=S&&!h&&b4(e,s,n),T=this._data;T&&T.eachItemGraphicEl(function(q,Ce){q.__temp&&(o.remove(q),T.setItemGraphicEl(Ce,null))}),S||d.remove(),o.add(g);var A=h?!1:e.get("step"),D;n&&n.getArea&&e.get("clip",!0)&&(D=n.getArea(),D.width!=null?(D.x-=.1,D.y-=.1,D.width+=.2,D.height+=.2):D.r0&&(D.r0-=.5,D.r+=.5)),this._clipShapeForSymbol=D;var E=_4(s,n,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(p&&f.type===n.type&&A===this._step))S&&d.updateData(s,{isIgnore:C,clipShape:D,disableAnimation:!0,getSymbolPoint:function(q){return[c[q*2],c[q*2+1]]}}),m&&this._initSymbolLabelAnimation(s,n,D),A&&(x&&(x=di(x,c,n,A,L)),c=di(c,null,n,A,L)),p=this._newPolyline(c),y?v=this._newPolygon(c,x):v&&(g.remove(v),v=this._polygon=null),h||this._initOrUpdateEndLabel(e,n,sn(E)),g.setClipPath(Kv(this,n,!0,e));else{y&&!v?v=this._newPolygon(c,x):v&&!y&&(g.remove(v),v=this._polygon=null),h||this._initOrUpdateEndLabel(e,n,sn(E));var I=g.getClipPath();if(I){var P=Kv(this,n,!1,e);Ze(I,{shape:P.shape},e)}else g.setClipPath(Kv(this,n,!0,e));S&&d.updateData(s,{isIgnore:C,clipShape:D,disableAnimation:!0,getSymbolPoint:function(q){return[c[q*2],c[q*2+1]]}}),(!CL(this._stackedOnPoints,x)||!CL(this._points,c))&&(m?this._doUpdateAnimation(s,x,n,i,A,_,L):(A&&(x&&(x=di(x,c,n,A,L)),c=di(c,null,n,A,L)),p.setShape({points:c}),v&&v.setShape({points:c,stackedOnPoints:x})))}var k=e.getModel("emphasis"),N=k.get("focus"),O=k.get("blurScope"),R=k.get("disabled");if(p.useStyle(ie(l.getLineStyle(),{fill:"none",stroke:E,lineJoin:"bevel"})),wt(p,e,"lineStyle"),p.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var V=p.getState("emphasis").style;V.lineWidth=+p.style.lineWidth+1}ue(p).seriesIndex=e.seriesIndex,qe(p,N,O,R);var B=ML(e.get("smooth")),H=e.get("smoothMonotone");if(p.setShape({smooth:B,smoothMonotone:H,connectNulls:L}),v){var Y=s.getCalculationInfo("stackedOnSeries"),$=0;v.useStyle(ie(u.getAreaStyle(),{fill:E,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),Y&&($=ML(Y.get("smooth"))),v.setShape({smooth:B,stackedOnSmooth:$,smoothMonotone:H,connectNulls:L}),wt(v,e,"areaStyle"),ue(v).seriesIndex=e.seriesIndex,qe(v,N,O,R)}var U=this._changePolyState;s.eachItemGraphicEl(function(q){q&&(q.onHoverStateChange=U)}),this._polyline.onHoverStateChange=U,this._data=s,this._coordSys=n,this._stackedOnPoints=x,this._points=c,this._step=A,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,p),v&&this.packEventData(e,v))},t.prototype.packEventData=function(e,a){ue(a).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,a,i,n){var o=e.getData(),s=zi(o,n);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],h=l[s*2+1];if(isNaN(c)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,h))return;var f=e.get("zlevel")||0,d=e.get("z")||0;u=new wl(o,s),u.x=c,u.y=h,u.setZ(f,d);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=f,p.z=d,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else We.prototype.highlight.call(this,e,a,i,n)},t.prototype.downplay=function(e,a,i,n){var o=e.getData(),s=zi(o,n);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else We.prototype.downplay.call(this,e,a,i,n)},t.prototype._changePolyState=function(e){var a=this._polygon;Ku(this._polyline,e),a&&Ku(a,e)},t.prototype._newPolyline=function(e){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new v4({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},t.prototype._newPolygon=function(e,a){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new SL({shape:{points:e,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(e,a,i){var n,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(n=s.isHorizontal(),o=!1):a.type==="polar"&&(n=s.dim==="angle",o=!0);var u=e.hostModel,c=u.get("animationDuration");te(c)&&(c=c(null));var h=u.get("animationDelay")||0,f=te(h)?h(null):h;e.eachItemGraphicEl(function(d,p){var v=d;if(v){var g=[d.x,d.y],m=void 0,y=void 0,_=void 0;if(i)if(o){var w=i,x=a.pointToCoord(g);n?(m=w.startAngle,y=w.endAngle,_=-x[1]/180*Math.PI):(m=w.r0,y=w.r,_=x[0])}else{var S=i;n?(m=S.x,y=S.x+S.width,_=d.x):(m=S.y+S.height,y=S.y,_=d.y)}var L=y===m?0:(_-m)/(y-m);l&&(L=1-L);var C=te(h)?h(p):c*L+f,T=v.getSymbolPath(),A=T.getTextContent();v.attr({scaleX:0,scaleY:0}),v.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:C}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:C}),T.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,a,i){var n=e.getModel("endLabel");if(IL(e)){var o=e.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Ae({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=S4(l);c>=0&&(xt(s,ft(e,"endLabel"),{inheritColor:i,labelFetcher:e,labelDataIndex:c,defaultText:function(h,f,d){return d!=null?mL(o,d):Oo(o,h)},enableTextSetter:!0},T4(n,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,a,i,n,o,s,l){var u=this._endLabel,c=this._polyline;if(u){e<1&&n.originalX==null&&(n.originalX=u.x,n.originalY=u.y);var h=i.getLayout("points"),f=i.hostModel,d=f.get("connectNulls"),p=s.get("precision"),v=s.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),y=g.inverse,_=a.shape,w=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,x=(m?v:0)*(y?-1:1),S=(m?0:-v)*(y?-1:1),L=m?"x":"y",C=L4(h,w,L),T=C.range,A=T[1]-T[0],D=void 0;if(A>=1){if(A>1&&!d){var E=EL(h,T[0]);u.attr({x:E[0]+x,y:E[1]+S}),o&&(D=f.getRawValue(T[0]))}else{var E=c.getPointOn(w,L);E&&u.attr({x:E[0]+x,y:E[1]+S});var I=f.getRawValue(T[0]),P=f.getRawValue(T[1]);o&&(D=S1(i,p,I,P,C.t))}n.lastFrameIndex=T[0]}else{var k=e===1||n.lastFrameIndex>0?T[0]:0,E=EL(h,k);o&&(D=f.getRawValue(k)),u.attr({x:E[0]+x,y:E[1]+S})}if(o){var N=co(u);typeof N.setLabelText=="function"&&N.setLabelText(D)}}},t.prototype._doUpdateAnimation=function(e,a,i,n,o,s,l){var u=this._polyline,c=this._polygon,h=e.hostModel,f=p4(this._data,e,this._stackedOnPoints,a,this._coordSys,i,this._valueOrigin),d=f.current,p=f.stackedOnCurrent,v=f.next,g=f.stackedOnNext;if(o&&(p=di(f.stackedOnCurrent,f.current,i,o,l),d=di(f.current,null,i,o,l),g=di(f.stackedOnNext,f.next,i,o,l),v=di(f.next,null,i,o,l)),AL(d,v)>3e3||c&&AL(p,g)>3e3){u.stopAnimation(),u.setShape({points:v}),c&&(c.stopAnimation(),c.setShape({points:v,stackedOnPoints:g}));return}u.shape.__points=f.current,u.shape.points=d;var m={shape:{points:v}};f.current!==d&&(m.shape.__points=f.next),u.stopAnimation(),Me(u,m,h),c&&(c.setShape({points:d,stackedOnPoints:p}),c.stopAnimation(),Me(c,{shape:{stackedOnPoints:g}},h),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],_=f.status,w=0;w<_.length;w++){var x=_[w].cmd;if(x==="="){var S=e.getItemGraphicEl(_[w].idx1);S&&y.push({el:S,ptIdx:w})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var L=u.shape.__points,C=0;C<y.length;C++){var T=y[C].el,A=y[C].ptIdx*2;T.x=L[A],T.y=L[A+1],T.markRedraw()}})},t.prototype.remove=function(e){var a=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(n,o){n.__temp&&(a.remove(n),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(We);const D4=C4;function Ll(r,t){return{seriesType:r,plan:To(),reset:function(e){var a=e.getData(),i=e.coordinateSystem,n=e.pipelineContext,o=t||n.large;if(i){var s=W(i.dimensions,function(d){return a.mapDimension(d)}).slice(0,2),l=s.length,u=a.getCalculationInfo("stackResultDimension");ui(a,s[0])&&(s[0]=u),ui(a,s[1])&&(s[1]=u);var c=a.getStore(),h=a.getDimensionIndex(s[0]),f=a.getDimensionIndex(s[1]);return l&&{progress:function(d,p){for(var v=d.end-d.start,g=o&&aa(v*l),m=[],y=[],_=d.start,w=0;_<d.end;_++){var x=void 0;if(l===1){var S=c.get(h,_);x=i.dataToPoint(S,null,y)}else m[0]=c.get(h,_),m[1]=c.get(f,_),x=i.dataToPoint(m,null,y);o?(g[w++]=x[0],g[w++]=x[1]):p.setItemLayout(_,x.slice())}o&&p.setLayout("points",g)}}}}}}var A4={average:function(r){for(var t=0,e=0,a=0;a<r.length;a++)isNaN(r[a])||(t+=r[a],e++);return e===0?NaN:t/e},sum:function(r){for(var t=0,e=0;e<r.length;e++)t+=r[e]||0;return t},max:function(r){for(var t=-1/0,e=0;e<r.length;e++)r[e]>t&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e<r.length;e++)r[e]<t&&(t=r[e]);return isFinite(t)?t:NaN},nearest:function(r){return r[0]}},M4=function(r){return Math.round(r.length/2)};function PL(r){return{seriesType:r,reset:function(t,e,a){var i=t.getData(),n=t.get("sampling"),o=t.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&n){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),h=a.getDevicePixelRatio(),f=Math.abs(c[1]-c[0])*(h||1),d=Math.round(s/f);if(isFinite(d)&&d>1){n==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d)):n==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/d));var p=void 0;X(n)?p=A4[n]:te(n)&&(p=n),p&&t.setData(i.downSample(i.mapDimension(u.dim),1/d,p,M4))}}}}}function E4(r){r.registerChartView(D4),r.registerSeriesModel(l4),r.registerLayout(Ll("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),a=t.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,PL("line"))}var kL=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return Da(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,a,i){var n=this.coordinateSystem;if(n&&n.clampData){var o=n.clampData(e),s=n.dataToPoint(o);if(i)M(n.getAxes(),function(f,d){if(f.type==="category"&&a!=null){var p=f.getTicksCoords(),v=f.getTickModel().get("alignWithLabel"),g=o[d],m=a[d]==="x1"||a[d]==="y1";if(m&&!v&&(g+=1),p.length<2)return;if(p.length===2){s[d]=f.toGlobalCoord(f.getExtent()[m?1:0]);return}for(var y=void 0,_=void 0,w=1,x=0;x<p.length;x++){var S=p[x].coord,L=x===p.length-1?p[x-1].tickValue+w:p[x].tickValue;if(L===g){_=S;break}else if(L<g)y=S;else if(y!=null&&L>g){_=(S+y)/2;break}x===1&&(w=L-p[0].tickValue)}_==null&&(y?y&&(_=p[p.length-1].coord):_=p[0].coord),s[d]=f.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),h=n.getBaseAxis().isHorizontal()?0:1;s[h]+=u+c/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(Xe);Xe.registerClass(kL);const hh=kL;var I4=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return Da(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>e&&(e=a),e},t.prototype.brushSelector=function(e,a,i){return i.rect(a.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=ri(hh.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(hh);const P4=I4;var k4=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),N4=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="sausage",a}return t.prototype.getDefaultShape=function(){return new k4},t.prototype.buildPath=function(e,a){var i=a.cx,n=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,c=a.startAngle,h=a.endAngle,f=a.clockwise,d=Math.PI*2,p=f?h-c<d:c-h<d;p||(c=h-(f?d:-d));var v=Math.cos(c),g=Math.sin(c),m=Math.cos(h),y=Math.sin(h);p?(e.moveTo(v*o+i,g*o+n),e.arc(v*u+i,g*u+n,l,-Math.PI+c,c,!f)):e.moveTo(v*s+i,g*s+n),e.arc(i,n,s,c,h,!f),e.arc(m*u+i,y*u+n,l,h-Math.PI*2,h-Math.PI,!f),o!==0&&e.arc(i,n,o,h,c,f)},t}(_e);const fh=N4;function R4(r,t){t=t||{};var e=t.isRoundCap;return function(a,i,n){var o=i.position;if(!o||o instanceof Array)return Vu(a,i,n);var s=r(o),l=i.distance!=null?i.distance:5,u=this.shape,c=u.cx,h=u.cy,f=u.r,d=u.r0,p=(f+d)/2,v=u.startAngle,g=u.endAngle,m=(v+g)/2,y=e?Math.abs(f-d)/2:0,_=Math.cos,w=Math.sin,x=c+f*_(v),S=h+f*w(v),L="left",C="top";switch(s){case"startArc":x=c+(d-l)*_(m),S=h+(d-l)*w(m),L="center",C="top";break;case"insideStartArc":x=c+(d+l)*_(m),S=h+(d+l)*w(m),L="center",C="bottom";break;case"startAngle":x=c+p*_(v)+dh(v,l+y,!1),S=h+p*w(v)+ph(v,l+y,!1),L="right",C="middle";break;case"insideStartAngle":x=c+p*_(v)+dh(v,-l+y,!1),S=h+p*w(v)+ph(v,-l+y,!1),L="left",C="middle";break;case"middle":x=c+p*_(m),S=h+p*w(m),L="center",C="middle";break;case"endArc":x=c+(f+l)*_(m),S=h+(f+l)*w(m),L="center",C="bottom";break;case"insideEndArc":x=c+(f-l)*_(m),S=h+(f-l)*w(m),L="center",C="top";break;case"endAngle":x=c+p*_(g)+dh(g,l+y,!0),S=h+p*w(g)+ph(g,l+y,!0),L="left",C="middle";break;case"insideEndAngle":x=c+p*_(g)+dh(g,-l+y,!0),S=h+p*w(g)+ph(g,-l+y,!0),L="right",C="middle";break;default:return Vu(a,i,n)}return a=a||{},a.x=x,a.y=S,a.align=L,a.verticalAlign=C,a}}function V4(r,t,e,a){if(De(a)){r.setTextConfig({rotation:a});return}else if(G(t)){r.setTextConfig({rotation:0});return}var i=r.shape,n=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(n+o)/2,l,u=e(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=n;break;case"endAngle":case"insideEndAngle":l=o;break;default:r.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),r.setTextConfig({rotation:c})}function dh(r,t,e){return t*Math.sin(r)*(e?-1:1)}function ph(r,t,e){return t*Math.cos(r)*(e?1:-1)}function Dn(r,t,e){var a=r.get("borderRadius");if(a==null)return e?{cornerRadius:0}:null;G(a)||(a=[a,a,a,a]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:W(a,function(n){return Er(n,i)})}}var Jv=Math.max,Qv=Math.min;function O4(r,t){var e=r.getArea&&r.getArea();if(Cn(r,"cartesian2d")){var a=r.getBaseAxis();if(a.type!=="category"||!a.onBand){var i=t.getLayout("bandWidth");a.isHorizontal()?(e.x-=i,e.width+=i*2):(e.y-=i,e.height+=i*2)}}return e}var z4=function(r){z(t,r);function t(){var e=r.call(this)||this;return e.type=t.type,e._isFirstFrame=!0,e}return t.prototype.render=function(e,a,i,n){this._model=e,this._removeOnRenderedListener(i),this._updateDrawMode(e);var o=e.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,a,i):this._renderNormal(e,a,i,n)):process.env.NODE_ENV!=="production"&&je("Only cartesian2d and polar supported for bar.")},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,a){this._progressiveEls=[],this._incrementalRenderLarge(e,a)},t.prototype.eachRendered=function(e){ti(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var a=e.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},t.prototype._renderNormal=function(e,a,i,n){var o=this.group,s=e.getData(),l=this._data,u=e.coordinateSystem,c=u.getBaseAxis(),h;u.type==="cartesian2d"?h=c.isHorizontal():u.type==="polar"&&(h=c.dim==="angle");var f=e.isAnimationEnabled()?e:null,d=B4(e,u);d&&this._enableRealtimeSort(d,s,i);var p=e.get("clip",!0)||d,v=O4(u,s);o.removeClipPath();var g=e.get("roundCap",!0),m=e.get("showBackground",!0),y=e.getModel("backgroundStyle"),_=y.get("borderRadius")||0,w=[],x=this._backgroundEls,S=n&&n.isInitSort,L=n&&n.type==="changeAxisOrder";function C(D){var E=vh[u.type](s,D),I=Y4(u,h,E);return I.useStyle(y.getItemStyle()),u.type==="cartesian2d"?I.setShape("r",_):I.setShape("cornerRadius",_),w[D]=I,I}s.diff(l).add(function(D){var E=s.getItemModel(D),I=vh[u.type](s,D,E);if(m&&C(D),!(!s.hasValue(D)||!zL[u.type](I))){var P=!1;p&&(P=NL[u.type](v,I));var k=RL[u.type](e,s,D,I,h,f,c.model,!1,g);d&&(k.forceLabelAnimation=!0),FL(k,s,D,E,I,e,h,u.type==="polar"),S?k.attr({shape:I}):d?VL(d,f,k,I,D,h,!1,!1):Ze(k,{shape:I},e,D),s.setItemGraphicEl(D,k),o.add(k),k.ignore=P}}).update(function(D,E){var I=s.getItemModel(D),P=vh[u.type](s,D,I);if(m){var k=void 0;x.length===0?k=C(E):(k=x[E],k.useStyle(y.getItemStyle()),u.type==="cartesian2d"?k.setShape("r",_):k.setShape("cornerRadius",_),w[D]=k);var N=vh[u.type](s,D),O=$L(h,N,u);Me(k,{shape:O},f,D)}var R=l.getItemGraphicEl(E);if(!s.hasValue(D)||!zL[u.type](P)){o.remove(R);return}var V=!1;if(p&&(V=NL[u.type](v,P),V&&o.remove(R)),R?kr(R):R=RL[u.type](e,s,D,P,h,f,c.model,!!R,g),d&&(R.forceLabelAnimation=!0),L){var B=R.getTextContent();if(B){var H=co(B);H.prevValue!=null&&(H.prevValue=H.value)}}else FL(R,s,D,I,P,e,h,u.type==="polar");S?R.attr({shape:P}):d?VL(d,f,R,P,D,h,!0,L):Me(R,{shape:P},e,D,null),s.setItemGraphicEl(D,R),R.ignore=V,o.add(R)}).remove(function(D){var E=l.getItemGraphicEl(D);E&&Bs(E,e,D)}).execute();var T=this._backgroundGroup||(this._backgroundGroup=new oe);T.removeAll();for(var A=0;A<w.length;++A)T.add(w[A]);o.add(T),this._backgroundEls=w,this._data=s},t.prototype._renderLarge=function(e,a,i){this._clear(),WL(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,a){this._removeBackground(),WL(a,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var a=e.get("clip",!0)&&Sl(e.coordinateSystem,!1,e),i=this.group;a?i.setClipPath(a):i.removeClipPath()},t.prototype._enableRealtimeSort=function(e,a,i){var n=this;if(a.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(a,e,i),this._isFirstFrame=!1;else{var s=function(l){var u=a.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){n._updateSortWithinSameData(a,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,a,i){var n=[];return e.each(e.mapDimension(a.dim),function(o,s){var l=i(s);l=l??NaN,n.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),n.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:W(n,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,a,i){for(var n=i.scale,o=e.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=n.getOrdinalMeta().categories.length;l<u;++l){var c=e.rawIndexOf(o,n.getRawOrdinalNumber(l)),h=c<0?Number.MIN_VALUE:a(e.indexOfRawIndex(c));if(h>s)return!0;s=h}return!1},t.prototype._isOrderDifferentInView=function(e,a){for(var i=a.scale,n=i.getExtent(),o=Math.max(0,n[0]),s=Math.min(n[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,a,i,n){if(this._isOrderChangedWithinSameData(e,a,i)){var o=this._dataSort(e,i,a);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(n),n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,a,i){var n=a.baseAxis,o=this._dataSort(e,n,function(s){return e.get(e.mapDimension(a.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:o})},t.prototype.remove=function(e,a){this._clear(this._model),this._removeOnRenderedListener(a)},t.prototype.dispose=function(e,a){this._removeOnRenderedListener(a)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var a=this.group,i=this._data;e&&e.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(n){Bs(n,e,ue(n).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(We),NL={cartesian2d:function(r,t){var e=t.width<0?-1:1,a=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height);var i=r.x+r.width,n=r.y+r.height,o=Jv(t.x,r.x),s=Qv(t.x+t.width,i),l=Jv(t.y,r.y),u=Qv(t.y+t.height,n),c=s<o,h=u<l;return t.x=c&&o>i?s:o,t.y=h&&l>n?u:l,t.width=c?0:s-o,t.height=h?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height),c||h},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}var i=Qv(t.r,r.r),n=Jv(t.r0,r.r0);t.r=i,t.r0=n;var o=i-n<0;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}return o}},RL={cartesian2d:function(r,t,e,a,i,n,o,s,l){var u=new Te({shape:F({},a),z2:1});if(u.__dataIndex=e,u.name="item",n){var c=u.shape,h=i?"height":"width";c[h]=0}return u},polar:function(r,t,e,a,i,n,o,s,l){var u=!i&&l?fh:Yt,c=new u({shape:a,z2:1});c.name="item";var h=BL(i);if(c.calculateTextPosition=R4(h,{isRoundCap:u===fh}),n){var f=c.shape,d=i?"r":"endAngle",p={};f[d]=i?a.r0:a.startAngle,p[d]=a[d],(s?Me:Ze)(c,{shape:p},n)}return c}};function B4(r,t){var e=r.get("realtimeSort",!0),a=t.getBaseAxis();if(process.env.NODE_ENV!=="production"&&e&&(a.type!=="category"&&je("`realtimeSort` will not work because this bar series is not based on a category axis."),t.type!=="cartesian2d"&&je("`realtimeSort` will not work because this bar series is not on cartesian2d.")),e&&a.type==="category"&&t.type==="cartesian2d")return{baseAxis:a,otherAxis:t.getOtherAxis(a)}}function VL(r,t,e,a,i,n,o,s){var l,u;n?(u={x:a.x,width:a.width},l={y:a.y,height:a.height}):(u={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?Me:Ze)(e,{shape:l},t,i,null);var c=t?r.baseAxis.model:null;(o?Me:Ze)(e,{shape:u},c,i)}function OL(r,t){for(var e=0;e<t.length;e++)if(!isFinite(r[t[e]]))return!0;return!1}var F4=["x","y","width","height"],G4=["cx","cy","r","startAngle","endAngle"],zL={cartesian2d:function(r){return!OL(r,F4)},polar:function(r){return!OL(r,G4)}},vh={cartesian2d:function(r,t,e){var a=r.getItemLayout(t),i=e?H4(e,a):0,n=a.width>0?1:-1,o=a.height>0?1:-1;return{x:a.x+n*i/2,y:a.y+o*i/2,width:a.width-n*i,height:a.height-o*i}},polar:function(r,t,e){var a=r.getItemLayout(t);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function W4(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function BL(r){return function(t){var e=t?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+e;default:return a}}}(r)}function FL(r,t,e,a,i,n,o,s){var l=t.getItemVisual(e,"style");if(s){if(!n.get("roundCap")){var c=r.shape,h=Dn(a.getModel("itemStyle"),c,!0);F(c,h),r.setShape(c)}}else{var u=a.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var f=a.getShallow("cursor");f&&r.attr("cursor",f);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=ft(a);xt(r,p,{labelFetcher:n,labelDataIndex:e,defaultText:Oo(n.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var v=r.getTextContent();if(s&&v){var g=a.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,V4(r,g==="outside"?d:g,BL(o),a.get(["label","rotate"]))}rb(v,p,n.getRawValue(e),function(y){return mL(t,y)});var m=a.getModel(["emphasis"]);qe(r,m.get("focus"),m.get("blurScope"),m.get("disabled")),wt(r,a),W4(i)&&(r.style.fill="none",r.style.stroke="none",M(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function H4(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),n=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(a,i,n)}var $4=function(){function r(){}return r}(),GL=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="largeBar",a}return t.prototype.getDefaultShape=function(){return new $4},t.prototype.buildPath=function(e,a){for(var i=a.points,n=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<i.length;c+=3)l[n]=u,l[o]=i[c+2],s[n]=i[c+n],s[o]=i[c+o],e.rect(s[0],s[1],l[0],l[1])},t}(_e);function WL(r,t,e,a){var i=r.getData(),n=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=r.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new GL({shape:{points:u},incremental:!!a,silent:!0,z2:0});c.baseDimIdx=n,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),e&&e.push(c)}var h=new GL({shape:{points:i.getLayout("largePoints")},incremental:!!a,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=n,h.largeDataIndices=o,h.barWidth=s,t.add(h),h.useStyle(i.getVisual("style")),h.style.stroke=null,ue(h).seriesIndex=r.seriesIndex,r.get("silent")||(h.on("mousedown",HL),h.on("mousemove",HL)),e&&e.push(h)}var HL=jp(function(r){var t=this,e=U4(t,r.offsetX,r.offsetY);ue(t).dataIndex=e>=0?e:null},30,!1);function U4(r,t,e){for(var a=r.baseDimIdx,i=1-a,n=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,h=n.length/3;c<h;c++){var f=c*3;if(l[a]=u,l[i]=n[f+2],s[a]=n[f+a],s[i]=n[f+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[c]}return-1}function $L(r,t,e){if(Cn(e,"cartesian2d")){var a=t,i=e.getArea();return{x:r?a.x:i.x,y:r?i.y:a.y,width:r?a.width:i.width,height:r?i.height:a.height}}else{var i=e.getArea(),n=t;return{cx:i.cx,cy:i.cy,r0:r?i.r0:n.r0,r:r?i.r:n.r,startAngle:r?n.startAngle:0,endAngle:r?n.endAngle:Math.PI*2}}}function Y4(r,t,e){var a=r.type==="polar"?Yt:Te;return new a({shape:$L(t,e,r),silent:!0,z2:0})}const Z4=z4;function X4(r){r.registerChartView(Z4),r.registerSeriesModel(P4),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,fe(iS,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,nS("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,PL("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var a=t.componentType||"series";e.eachComponent({mainType:a,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}var UL=Math.PI*2,gh=Math.PI/180;function YL(r,t){return ct(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function ZL(r,t){var e=YL(r,t),a=r.get("center"),i=r.get("radius");G(i)||(i=[0,i]);var n=Z(e.width,t.getWidth()),o=Z(e.height,t.getHeight()),s=Math.min(n,o),l=Z(i[0],s/2),u=Z(i[1],s/2),c,h,f=r.coordinateSystem;if(f){var d=f.dataToPoint(a);c=d[0]||0,h=d[1]||0}else G(a)||(a=[a,a]),c=Z(a[0],n)+e.x,h=Z(a[1],o)+e.y;return{cx:c,cy:h,r0:l,r:u}}function j4(r,t,e){t.eachSeriesByType(r,function(a){var i=a.getData(),n=i.mapDimension("value"),o=YL(a,e),s=ZL(a,e),l=s.cx,u=s.cy,c=s.r,h=s.r0,f=-a.get("startAngle")*gh,d=a.get("endAngle"),p=a.get("padAngle")*gh;d=d==="auto"?f-UL:-d*gh;var v=a.get("minAngle")*gh,g=v+p,m=0;i.each(n,function(O){!isNaN(O)&&m++});var y=i.getSum(n),_=Math.PI/(y||m)*2,w=a.get("clockwise"),x=a.get("roseType"),S=a.get("stillShowZeroSum"),L=i.getDataExtent(n);L[0]=0;var C=w?1:-1,T=[f,d],A=C*p/2;Fd(T,!w),f=T[0],d=T[1];var D=XL(a);D.startAngle=f,D.endAngle=d,D.clockwise=w;var E=Math.abs(d-f),I=E,P=0,k=f;if(i.setLayout({viewRect:o,r:c}),i.each(n,function(O,R){var V;if(isNaN(O)){i.setItemLayout(R,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:w,cx:l,cy:u,r0:h,r:x?NaN:c});return}x!=="area"?V=y===0&&S?_:O*_:V=E/m,V<g?(V=g,I-=g):P+=O;var B=k+C*V,H=0,Y=0;p>V?(H=k+C*V/2,Y=H):(H=k+A,Y=B-A),i.setItemLayout(R,{angle:V,startAngle:H,endAngle:Y,clockwise:w,cx:l,cy:u,r0:h,r:x?ke(O,L,[h,c]):c}),k=B}),I<UL&&m)if(I<=.001){var N=E/m;i.each(n,function(O,R){if(!isNaN(O)){var V=i.getItemLayout(R);V.angle=N;var B=0,H=0;N<p?(B=f+C*(R+1/2)*N,H=B):(B=f+C*R*N+A,H=f+C*(R+1)*N-A),V.startAngle=B,V.endAngle=H}})}else _=I/P,k=f,i.each(n,function(O,R){if(!isNaN(O)){var V=i.getItemLayout(R),B=V.angle===g?g:O*_,H=0,Y=0;B<p?(H=k+C*B/2,Y=H):(H=k+A,Y=k+C*B-A),V.startAngle=H,V.endAngle=Y,k+=C*B}})})}var XL=xe();function Tl(r){return{seriesType:r,reset:function(t,e){var a=e.findComponents({mainType:"legend"});if(!(!a||!a.length)){var i=t.getData();i.filterSelf(function(n){for(var o=i.getName(n),s=0;s<a.length;s++)if(!a[s].isSelected(o))return!1;return!0})}}}}var q4=Math.PI/180;function jL(r,t,e,a,i,n,o,s,l,u){if(r.length<2)return;function c(v){for(var g=v.rB,m=g*g,y=0;y<v.list.length;y++){var _=v.list[y],w=Math.abs(_.label.y-e),x=a+_.len,S=x*x,L=Math.sqrt(Math.abs((1-w*w/m)*S)),C=t+(L+_.len2)*i,T=C-_.label.x,A=_.targetTextWidth-T*i;qL(_,A,!0),_.label.x=C}}function h(v){for(var g={list:[],maxY:0},m={list:[],maxY:0},y=0;y<v.length;y++)if(v[y].labelAlignTo==="none"){var _=v[y],w=_.label.y>e?m:g,x=Math.abs(_.label.y-e);if(x>=w.maxY){var S=_.label.x-t-_.len2*i,L=a+_.len,C=Math.abs(S)<L?Math.sqrt(x*x/(1-S*S/L/L)):L;w.rB=C,w.maxY=x}w.list.push(_)}c(g),c(m)}for(var f=r.length,d=0;d<f;d++)if(r[d].position==="outer"&&r[d].labelAlignTo==="labelLine"){var p=r[d].label.x-u;r[d].linePoints[1][0]+=p,r[d].label.x=u}OS(r,l,l+o)&&h(r)}function K4(r,t,e,a,i,n,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,f=0;f<r.length;f++){var d=r[f].label;eg(r[f])||(d.x<t?(c=Math.min(c,d.x),l.push(r[f])):(h=Math.max(h,d.x),u.push(r[f])))}for(var f=0;f<r.length;f++){var p=r[f];if(!eg(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var d=p.label,v=p.linePoints,g=void 0;p.labelAlignTo==="edge"?d.x<t?g=v[2][0]-p.labelDistance-o-p.edgeDistance:g=o+i-p.edgeDistance-v[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?d.x<t?g=c-o-p.bleedMargin:g=o+i-h-p.bleedMargin:d.x<t?g=d.x-o-p.bleedMargin:g=o+i-d.x-p.bleedMargin,p.targetTextWidth=g,qL(p,g)}}jL(u,t,e,a,1,i,n,o,s,h),jL(l,t,e,a,-1,i,n,o,s,c);for(var f=0;f<r.length;f++){var p=r[f];if(!eg(p)&&p.linePoints){var d=p.label,v=p.linePoints,m=p.labelAlignTo==="edge",y=d.style.padding,_=y?y[1]+y[3]:0,w=d.style.backgroundColor?0:_,x=p.rect.width+w,S=v[1][0]-v[2][0];m?d.x<t?v[2][0]=o+p.edgeDistance+x+p.labelDistance:v[2][0]=o+i-p.edgeDistance-x-p.labelDistance:(d.x<t?v[2][0]=d.x+p.labelDistance:v[2][0]=d.x-p.labelDistance,v[1][0]=v[2][0]+S),v[1][1]=v[2][1]=d.y}}}function qL(r,t,e){if(e===void 0&&(e=!1),r.labelStyleWidth==null){var a=r.label,i=a.style,n=r.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,c=n.width+(o?0:l);if(t<c||e){var h=n.height;if(u&&u.match("break")){a.setStyle("backgroundColor",null),a.setStyle("width",t-l);var f=a.getBoundingRect();a.setStyle("width",Math.ceil(f.width)),a.setStyle("backgroundColor",o)}else{var d=t-l,p=t<c?d:e?d>r.unconstrainedWidth?null:d:null;a.setStyle("width",p)}var v=a.getBoundingRect();n.width=v.width;var g=(a.style.margin||0)+2.1;n.height=v.height+g,n.y-=(n.height-h)/2}}}function eg(r){return r.position==="center"}function J4(r){var t=r.getData(),e=[],a,i,n=!1,o=(r.get("minShowLabelAngle")||0)*q4,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,c=s.x,h=s.y,f=s.height;function d(S){S.ignore=!0}function p(S){if(!S.ignore)return!0;for(var L in S.states)if(S.states[L].ignore===!1)return!0;return!1}t.each(function(S){var L=t.getItemGraphicEl(S),C=L.shape,T=L.getTextContent(),A=L.getTextGuideLine(),D=t.getItemModel(S),E=D.getModel("label"),I=E.get("position")||D.get(["emphasis","label","position"]),P=E.get("distanceToLabelLine"),k=E.get("alignTo"),N=Z(E.get("edgeDistance"),u),O=E.get("bleedMargin"),R=D.getModel("labelLine"),V=R.get("length");V=Z(V,u);var B=R.get("length2");if(B=Z(B,u),Math.abs(C.endAngle-C.startAngle)<o){M(T.states,d),T.ignore=!0,A&&(M(A.states,d),A.ignore=!0);return}if(p(T)){var H=(C.startAngle+C.endAngle)/2,Y=Math.cos(H),$=Math.sin(H),U,q,Ce,ce;a=C.cx,i=C.cy;var he=I==="inside"||I==="inner";if(I==="center")U=C.cx,q=C.cy,ce="center";else{var ee=(he?(C.r+C.r0)/2*Y:C.r*Y)+a,pe=(he?(C.r+C.r0)/2*$:C.r*$)+i;if(U=ee+Y*3,q=pe+$*3,!he){var J=ee+Y*(V+l-C.r),se=pe+$*(V+l-C.r),Oe=J+(Y<0?-1:1)*B,Ee=se;k==="edge"?U=Y<0?c+N:c+u-N:U=Oe+(Y<0?-P:P),q=Ee,Ce=[[ee,pe],[J,se],[Oe,Ee]]}ce=he?"center":k==="edge"?Y>0?"right":"left":Y>0?"left":"right"}var Ne=Math.PI,$e=0,rt=E.get("rotate");if(De(rt))$e=rt*(Ne/180);else if(I==="center")$e=0;else if(rt==="radial"||rt===!0){var Nt=Y<0?-H+Ne:-H;$e=Nt}else if(rt==="tangential"&&I!=="outside"&&I!=="outer"){var Tt=Math.atan2(Y,$);Tt<0&&(Tt=Ne*2+Tt);var ca=$>0;ca&&(Tt=Ne+Tt),$e=Tt-Ne}if(n=!!$e,T.x=U,T.y=q,T.rotation=$e,T.setStyle({verticalAlign:"middle"}),he){T.setStyle({align:ce});var as=T.states.select;as&&(as.x+=T.x,as.y+=T.y)}else{var Gr=T.getBoundingRect().clone();Gr.applyTransform(T.getComputedTransform());var tu=(T.style.margin||0)+2.1;Gr.y-=tu/2,Gr.height+=tu,e.push({label:T,labelLine:A,position:I,len:V,len2:B,minTurnAngle:R.get("minTurnAngle"),maxSurfaceAngle:R.get("maxSurfaceAngle"),surfaceNormal:new ve(Y,$),linePoints:Ce,textAlign:ce,labelDistance:P,labelAlignTo:k,edgeDistance:N,bleedMargin:O,rect:Gr,unconstrainedWidth:Gr.width,labelStyleWidth:T.style.width})}L.setTextConfig({inside:he})}}),!n&&r.get("avoidLabelOverlap")&&K4(e,a,i,l,u,f,c,h);for(var v=0;v<e.length;v++){var g=e[v],m=g.label,y=g.labelLine,_=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),_&&(M(m.states,d),m.ignore=!0);var w=m.states.select;w&&(w.x+=m.x,w.y+=m.y)}if(y){var x=g.linePoints;_||!x?(M(y.states,d),y.ignore=!0):(NS(x,g.minTurnAngle),u3(x,g.surfaceNormal,g.maxSurfaceAngle),y.setShape({points:x}),m.__hostTarget.textGuideLineConfig={anchor:new ve(x[0][0],x[0][1])})}}}var Q4=function(r){z(t,r);function t(e,a,i){var n=r.call(this)||this;n.z2=2;var o=new Ae;return n.setTextContent(o),n.updateData(e,a,i,!0),n}return t.prototype.updateData=function(e,a,i,n){var o=this,s=e.hostModel,l=e.getItemModel(a),u=l.getModel("emphasis"),c=e.getItemLayout(a),h=F(Dn(l.getModel("itemStyle"),c,!0),c);if(isNaN(h.startAngle)){o.setShape(h);return}if(n){o.setShape(h);var f=s.getShallow("animationType");s.ecModel.ssr?(Ze(o,{scaleX:0,scaleY:0},s,{dataIndex:a,isFrom:!0}),o.originX=h.cx,o.originY=h.cy):f==="scale"?(o.shape.r=c.r0,Ze(o,{shape:{r:c.r}},s,a)):i!=null?(o.setShape({startAngle:i,endAngle:i}),Ze(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,a)):(o.shape.endAngle=c.startAngle,Me(o,{shape:{endAngle:c.endAngle}},s,a))}else kr(o),Me(o,{shape:h},s,a);o.useStyle(e.getItemVisual(a,"style")),wt(o,l);var d=(c.startAngle+c.endAngle)/2,p=s.get("selectedOffset"),v=Math.cos(d)*p,g=Math.sin(d)*p,m=l.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(s,e,a),o.ensureState("emphasis").shape=F({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},Dn(u.getModel("itemStyle"),c)),F(o.ensureState("select"),{x:v,y:g,shape:Dn(l.getModel(["select","itemStyle"]),c)}),F(o.ensureState("blur"),{shape:Dn(l.getModel(["blur","itemStyle"]),c)});var y=o.getTextGuideLine(),_=o.getTextContent();y&&F(y.ensureState("select"),{x:v,y:g}),F(_.ensureState("select"),{x:v,y:g}),qe(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,a,i){var n=this,o=a.getItemModel(i),s=o.getModel("labelLine"),l=a.getItemVisual(i,"style"),u=l&&l.fill,c=l&&l.opacity;xt(n,ft(o),{labelFetcher:a.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:c,defaultText:e.getFormattedLabel(i,"normal")||a.getName(i)});var h=n.getTextContent();n.setTextConfig({position:null,rotation:null}),h.attr({z2:10});var f=e.get(["label","position"]);if(f!=="outside"&&f!=="outer")n.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new Xt,this.setTextGuideLine(d)),kv(this,Nv(o),{stroke:u,opacity:nr(s.get(["lineStyle","opacity"]),c,1)})}},t}(Yt),e6=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,a,i,n){var o=e.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var c=o.getItemLayout(0),h=1;isNaN(c&&c.startAngle)&&h<o.count();++h)c=o.getItemLayout(h);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&e.get("showEmptyCircle")){var f=XL(e),d=new Yt({shape:F(ZL(e,i),f)});d.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,l.add(d)}o.diff(s).add(function(p){var v=new Q4(o,p,u);o.setItemGraphicEl(p,v),l.add(v)}).update(function(p,v){var g=s.getItemGraphicEl(v);g.updateData(o,p,u),g.off("click"),l.add(g),o.setItemGraphicEl(p,g)}).remove(function(p){var v=s.getItemGraphicEl(p);Bs(v,e,p)}).execute(),J4(e),e.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,a){var i=a.getData(),n=i.getItemLayout(0);if(n){var o=e[0]-n.cx,s=e[1]-n.cy,l=Math.sqrt(o*o+s*s);return l<=n.r&&l>=n.r0}},t.type="pie",t}(We);const t6=e6;function zo(r,t,e){t=G(t)&&{coordDimensions:t}||F({encodeDefine:r.getEncode()},t);var a=r.getSource(),i=fl(a,t).dimensions,n=new Ft(i,r);return n.initData(a,e),n}var r6=function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var a=this._getDataWithEncodedVisual();return a.getItemVisual(t,e)},r}();const Cl=r6;var a6=xe(),i6=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Cl(j(this.getData,this),j(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return zo(this,{coordDimensions:["value"],encodeDefaulter:fe(Cp,this)})},t.prototype.getDataParams=function(e){var a=this.getData(),i=a6(a),n=i.seats;if(!n){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),n=i.seats=oN(o,a.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=n[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){Oi(e,"labelLine",["show"]);var a=e.labelLine,i=e.emphasis.labelLine;a.show=a.show&&e.label.show,i.show=i.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(Xe);const n6=i6;function o6(r){return{seriesType:r,reset:function(t,e){var a=t.getData();a.filterSelf(function(i){var n=a.mapDimension("value"),o=a.get(n,i);return!(De(o)&&!isNaN(o)&&o<0)})}}}function s6(r){r.registerChartView(t6),r.registerSeriesModel(n6),jw("pie",r.registerAction),r.registerLayout(fe(j4,"pie")),r.registerProcessor(Tl("pie")),r.registerProcessor(o6("pie"))}var l6=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,a){return Da(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,a,i){return i.point(a.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t}(Xe);const u6=l6;var KL=4,c6=function(){function r(){}return r}(),h6=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.getDefaultShape=function(){return new c6},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,a){var i=a.points,n=a.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&n[0]<KL,c=this.softClipShape,h;if(u){this._ctx=l;return}for(this._ctx=null,h=this._off;h<i.length;){var f=i[h++],d=i[h++];isNaN(f)||isNaN(d)||c&&!c.contain(f,d)||(s.x=f-n[0]/2,s.y=d-n[1]/2,s.width=n[0],s.height=n[1],o.buildPath(e,s,!0))}this.incremental&&(this._off=h,this.notClear=!0)},t.prototype.afterBrush=function(){var e=this.shape,a=e.points,i=e.size,n=this._ctx,o=this.softClipShape,s;if(n){for(s=this._off;s<a.length;){var l=a[s++],u=a[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||n.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},t.prototype.findDataIndex=function(e,a){for(var i=this.shape,n=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=n.length/2-1;u>=0;u--){var c=u*2,h=n[c]-s/2,f=n[c+1]-l/2;if(e>=h&&a>=f&&e<=h+s&&a<=f+l)return u}return-1},t.prototype.contain=function(e,a){var i=this.transformCoordToLocal(e,a),n=this.getBoundingRect();if(e=i[0],a=i[1],n.contain(e,a)){var o=this.hoverDataIdx=this.findDataIndex(e,a);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,i=a.points,n=a.size,o=n[0],s=n[1],l=1/0,u=1/0,c=-1/0,h=-1/0,f=0;f<i.length;){var d=i[f++],p=i[f++];l=Math.min(d,l),c=Math.max(d,c),u=Math.min(p,u),h=Math.max(p,h)}e=this._rect=new ge(l-o/2,u-s/2,c-l+o,h-u+s)}return e},t}(_e),f6=function(){function r(){this.group=new oe}return r.prototype.updateData=function(t,e){this._clear();var a=this._create();a.setShape({points:t.getLayout("points")}),this._setCommon(a,t,e)},r.prototype.updateLayout=function(t){var e=t.getLayout("points");this.group.eachChild(function(a){if(a.startIndex!=null){var i=(a.endIndex-a.startIndex)*2,n=a.startIndex*4*2;e=new Float32Array(e.buffer,n,i)}a.setShape("points",e),a.reset()})},r.prototype.incrementalPrepareUpdate=function(t){this._clear()},r.prototype.incrementalUpdate=function(t,e,a){var i=this._newAdded[0],n=e.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+n.length);l.set(o),l.set(n,s),i.endIndex=t.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=t.start,u.endIndex=t.end,u.incremental=!0,u.setShape({points:n}),this._setCommon(u,e,a)}},r.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},r.prototype._create=function(){var t=new h6({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},r.prototype._setCommon=function(t,e,a){var i=e.hostModel;a=a||{};var n=e.getVisual("symbolSize");t.setShape("size",n instanceof Array?n:[n,n]),t.softClipShape=a.clipShape||null,t.symbolProxy=lt(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<KL;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("style"),l=s&&s.fill;l&&t.setColor(l);var u=ue(t);u.seriesIndex=i.seriesIndex,t.on("mousemove",function(c){u.dataIndex=null;var h=t.hoverDataIdx;h>=0&&(u.dataIndex=h+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const d6=f6;var p6=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){var n=e.getData(),o=this._updateSymbolDraw(n,e);o.updateData(n,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,i){var n=e.getData(),o=this._updateSymbolDraw(n,e);o.incrementalPrepareUpdate(n),this._finished=!1},t.prototype.incrementalRender=function(e,a,i){this._symbolDraw.incrementalUpdate(e,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=e.end===a.getData().count()},t.prototype.updateTransform=function(e,a,i){var n=e.getData();if(this.group.dirty(),!this._finished||n.count()>1e4)return{update:!0};var o=Ll("").reset(e,a,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout(n)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var a=e.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,a){var i=this._symbolDraw,n=a.pipelineContext,o=n.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new d6:new xl,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},t.prototype.remove=function(e,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(We);const v6=p6;var g6=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(Se);const m6=g6;var tg=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",ot).models[0]},t.type="cartesian2dAxis",t}(Se);at(tg,pl);var JL={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},y6=de({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},JL),rg=de({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},JL),_6=de({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},rg),b6=ie({logBase:10},rg);const QL={category:y6,value:rg,time:_6,log:b6};var w6={value:1,category:1,time:1,log:1};function Bo(r,t,e,a){M(w6,function(i,n){var o=de(de({},QL[n],!0),a,!0),s=function(l){z(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+n,c}return u.prototype.mergeDefaultAndTheme=function(c,h){var f=Ys(this),d=f?mo(c):{},p=h.getTheme();de(c,p.get(n+"Axis")),de(c,this.getDefaultOption()),c.type=eT(c),f&&ii(c,d,f)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=bv.createByAxisModel(this))},u.prototype.getCategories=function(c){var h=this.option;if(h.type==="category")return c?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=t+"Axis."+n,u.defaultOption=o,u}(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",eT)}function eT(r){return r.type||(r.data?"category":"value")}var x6=function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return W(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Ie(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r}();const S6=x6;var ag=["x","y"];function tT(r){return r.type==="interval"||r.type==="time"}var L6=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=ag,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!tT(e)||!tT(a))){var i=e.getExtent(),n=a.getExtent(),o=this.dataToPoint([i[0],n[0]]),s=this.dataToPoint([i[1],n[1]]),l=i[1]-i[0],u=n[1]-n[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,h=(s[1]-o[1])/u,f=o[0]-i[0]*c,d=o[1]-n[0]*h,p=this._transform=[c,0,0,h,f,d];this._invTransform=Yn([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var a=this.getAxis("x"),i=this.getAxis("y");return a.contain(a.toLocalCoord(e[0]))&&i.contain(i.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,a){var i=this.dataToPoint(e),n=this.dataToPoint(a),o=this.getArea(),s=new ge(i[0],i[1],n[0]-i[0],n[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,a,i){i=i||[];var n=e[0],o=e[1];if(this._transform&&n!=null&&isFinite(n)&&o!=null&&isFinite(o))return yt(i,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(n,a)),i[1]=l.toGlobalCoord(l.dataToCoord(o,a)),i},t.prototype.clampData=function(e,a){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,o=i.getExtent(),s=n.getExtent(),l=i.parse(e[0]),u=n.parse(e[1]);return a=a||[],a[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),a[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),a},t.prototype.pointToData=function(e,a){var i=[];if(this._invTransform)return yt(i,e,this._invTransform);var n=this.getAxis("x"),o=this.getAxis("y");return i[0]=n.coordToData(n.toLocalCoord(e[0]),a),i[1]=o.coordToData(o.toLocalCoord(e[1]),a),i},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var a=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),n=Math.min(a[0],a[1])-e,o=Math.min(i[0],i[1])-e,s=Math.max(a[0],a[1])-n+e,l=Math.max(i[0],i[1])-o+e;return new ge(n,o,s,l)},t}(S6),T6=function(r){z(t,r);function t(e,a,i,n,o){var s=r.call(this,e,a,i)||this;return s.index=0,s.type=n||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),e&&a[0]>a[1]&&a.reverse(),a},t.prototype.pointToData=function(e,a){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),a)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(zr);const C6=T6;function ig(r,t,e){e=e||{};var a=r.coordinateSystem,i=t.axis,n={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,c=a.getRect(),h=[c.x,c.x+c.width,c.y,c.y+c.height],f={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get("offset")||0,p=u==="x"?[h[2]-d,h[3]+d]:[h[0]-d,h[1]+d];if(o){var v=o.toGlobalCoord(o.dataToCoord(0));p[f.onZero]=Math.max(Math.min(v,p[1]),p[0])}n.position=[u==="y"?p[f[l]]:h[0],u==="x"?p[f[l]]:h[3]],n.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=g[s],n.labelOffset=o?p[f[s]]-p[f.onZero]:0,t.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),it(e.labelInside,t.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var m=t.get(["axisLabel","rotate"]);return n.labelRotate=l==="top"?-m:m,n.z2=1,n}function rT(r){return r.get("coordinateSystem")==="cartesian2d"}function aT(r){var t={xAxisModel:null,yAxisModel:null};return M(t,function(e,a){var i=a.replace(/Model$/,""),n=r.getReferringComponents(i,ot).models[0];if(process.env.NODE_ENV!=="production"&&!n)throw new Error(i+' "'+nr(r.get(i+"Index"),r.get(i+"Id"),0)+'" not found');t[a]=n}),t}var ng=Math.log;function iT(r,t,e){var a=ci.prototype,i=a.getTicks.call(e),n=a.getTicks.call(e,!0),o=i.length-1,s=a.getInterval.call(e),l=pS(r,t),u=l.extent,c=l.fixMin,h=l.fixMax;if(r.type==="log"){var f=ng(r.base);u=[ng(u[0])/f,ng(u[1])/f]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:h});var d=a.getExtent.call(r);c&&(u[0]=d[0]),h&&(u[1]=d[1]);var p=a.getInterval.call(r),v=u[0],g=u[1];if(c&&h)p=(g-v)/o;else if(c)for(g=u[0]+p*o;g<u[1]&&isFinite(g)&&isFinite(u[1]);)p=xv(p),g=u[0]+p*o;else if(h)for(v=u[1]-p*o;v>u[0]&&isFinite(v)&&isFinite(u[0]);)p=xv(p),v=u[1]-p*o;else{var m=r.getTicks().length-1;m>o&&(p=xv(p));var y=p*o;g=Math.ceil(u[1]/p)*p,v=Qe(g-y),v<0&&u[0]>=0?(v=0,g=Qe(y)):g>0&&u[1]<=0&&(g=0,v=-Qe(y))}var _=(i[0].value-n[0].value)/s,w=(i[o].value-n[o].value)/s;if(a.setExtent.call(r,v+p*_,g+p*w),a.setInterval.call(r,p),(_||w)&&a.setNiceExtent.call(r,v+p,g-p),process.env.NODE_ENV!=="production"){var x=a.getTicks.call(r);x[1]&&(!pB(p)||_d(x[1].value)>_d(p))&&je("The ticks may be not readable when set min: "+t.get("min")+", max: "+t.get("max")+" and alignTicks: true")}}var D6=function(){function r(t,e,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ag,this._initCartesian(t,e,a),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var a=this._axesMap;this._updateScale(t,this.model);function i(o){var s,l=we(o),u=l.length;if(u){for(var c=[],h=u-1;h>=0;h--){var f=+l[h],d=o[f],p=d.model,v=d.scale;wv(v)&&p.get("alignTicks")&&p.get("interval")==null?c.push(d):(No(v,p),wv(v)&&(s=d))}c.length&&(s||(s=c.pop(),No(s.scale,s.model)),M(c,function(g){iT(g.scale,g.model,s.scale)}))}}i(a.x),i(a.y);var n={};M(a.x,function(o){nT(a,"y",o,n)}),M(a.y,function(o){nT(a,"x",o,n)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,a){var i=t.getBoxLayoutParams(),n=!a&&t.get("containLabel"),o=ct(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var s=this._axesList;l(),n&&(M(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=BB(u);if(c){var h=u.isHorizontal()?"height":"width",f=u.model.get(["axisLabel","margin"]);o[h]-=c[h]+f,u.position==="top"?o.y+=c.height+f:u.position==="left"&&(o.x+=c.width+f)}}}),l()),M(this._coordsList,function(u){u.calcAffineTransform()});function l(){M(s,function(u){var c=u.isHorizontal(),h=c?[0,o.width]:[0,o.height],f=u.inverse?1:0;u.setExtent(h[f],h[1-f]),A6(u,c?o.x:o.y)})}},r.prototype.getAxis=function(t,e){var a=this._axesMap[t];if(a!=null)return a[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var a="x"+t+"y"+e;return this._coordsMap[a]}re(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,n=this._coordsList;i<n.length;i++)if(n[i].getAxis("x").index===t||n[i].getAxis("y").index===e)return n[i]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(t,e,a){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.dataToPoint(a):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(a)):null},r.prototype.convertFromPixel=function(t,e,a){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.pointToData(a):i.axis?i.axis.coordToData(i.axis.toLocalCoord(a)):null},r.prototype._findConvertTarget=function(t){var e=t.seriesModel,a=t.xAxisModel||e&&e.getReferringComponents("xAxis",ot).models[0],i=t.yAxisModel||e&&e.getReferringComponents("yAxis",ot).models[0],n=t.gridModel,o=this._coordsList,s,l;if(e)s=e.coordinateSystem,me(o,s)<0&&(s=null);else if(a&&i)s=this.getCartesian(a.componentIndex,i.componentIndex);else if(a)l=this.getAxis("x",a.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(n){var u=n.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},r.prototype._initCartesian=function(t,e,a){var i=this,n=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(e.eachComponent("xAxis",u("x"),this),e.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,M(s.x,function(c,h){M(s.y,function(f,d){var p="x"+h+"y"+d,v=new L6(p);v.master=i,v.model=t,i._coordsMap[p]=v,i._coordsList.push(v),v.addAxis(c),v.addAxis(f)})});function u(c){return function(h,f){if(og(h,t)){var d=h.get("position");c==="x"?d!=="top"&&d!=="bottom"&&(d=o.bottom?"top":"bottom"):d!=="left"&&d!=="right"&&(d=o.left?"right":"left"),o[d]=!0;var p=new C6(c,rh(h),[0,0],h.get("type"),d),v=p.type==="category";p.onBand=v&&h.get("boundaryGap"),p.inverse=h.get("inverse"),h.axis=p,p.model=h,p.grid=n,p.index=f,n._axesList.push(p),s[c][f]=p,l[c]++}}}},r.prototype._updateScale=function(t,e){M(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var n=i.model.get("categorySortInfo");i.scale.setSortInfo(n)}}),t.eachSeries(function(i){if(rT(i)){var n=aT(i),o=n.xAxisModel,s=n.yAxisModel;if(!og(o,e)||!og(s,e))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),c=l.getAxis("x"),h=l.getAxis("y");a(u,c),a(u,h)}},this);function a(i,n){M(ah(i,n.dim),function(o){n.scale.unionExtentFromData(i,o)})}},r.prototype.getTooltipAxes=function(t){var e=[],a=[];return M(this.getCartesians(),function(i){var n=t!=null&&t!=="auto"?i.getAxis(t):i.getBaseAxis(),o=i.getOtherAxis(n);me(e,n)<0&&e.push(n),me(a,o)<0&&a.push(o)}),{baseAxes:e,otherAxes:a}},r.create=function(t,e){var a=[];return t.eachComponent("grid",function(i,n){var o=new r(i,t,e);o.name="grid_"+n,o.resize(i,e,!0),i.coordinateSystem=o,a.push(o)}),t.eachSeries(function(i){if(rT(i)){var n=aT(i),o=n.xAxisModel,s=n.yAxisModel,l=o.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!l)throw new Error('Grid "'+nr(o.get("gridIndex"),o.get("gridId"),0)+'" not found');if(o.getCoordSysModel()!==s.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var u=l.coordinateSystem;i.coordinateSystem=u.getCartesian(o.componentIndex,s.componentIndex)}}),a},r.dimensions=ag,r}();function og(r,t){return r.getCoordSysModel()===t}function nT(r,t,e,a){e.getAxesOnZeroOf=function(){return n?[n]:[]};var i=r[t],n,o=e.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)oT(i[l])&&(n=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&oT(i[u])&&!a[c(i[u])]){n=i[u];break}n&&(a[c(n)]=!0);function c(h){return h.dim+"_"+h.index}}function oT(r){return r&&r.type!=="category"&&r.type!=="time"&&zB(r)}function A6(r,t){var e=r.getExtent(),a=e[0]+e[1];r.toGlobalCoord=r.dim==="x"?function(i){return i+t}:function(i){return a-i+t},r.toLocalCoord=r.dim==="x"?function(i){return i-t}:function(i){return a-i+t}}const M6=D6;var pi=Math.PI,An=function(){function r(t,e){this.group=new oe,this.opt=e,this.axisModel=t,ie(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var a=new oe({x:e.position[0],y:e.position[1],rotation:e.rotation});a.updateTransform(),this._transformGroup=a}return r.prototype.hasBuilder=function(t){return!!sT[t]},r.prototype.add=function(t){sT[t](this.opt,this.axisModel,this.group,this._transformGroup)},r.prototype.getGroup=function(){return this.group},r.innerTextLayout=function(t,e,a){var i=s1(e-t),n,o;return Ls(i)?(o=a>0?"top":"bottom",n="center"):Ls(i-pi)?(o=a>0?"bottom":"top",n="center"):(o="middle",i>0&&i<pi?n=a>0?"right":"left":n=a>0?"left":"right"),{rotation:i,textAlign:n,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r}(),sT={axisLine:function(r,t,e,a){var i=t.get(["axisLine","show"]);if(i==="auto"&&r.handleAutoShown&&(i=r.handleAutoShown("axisLine")),!!i){var n=t.axis.getExtent(),o=a.transform,s=[n[0],0],l=[n[1],0],u=s[0]>l[0];o&&(yt(s,s,o),yt(l,l,o));var c=F({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new mt({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});uo(h.shape,h.style.lineWidth),h.anid="line",e.add(h);var f=t.get(["axisLine","symbol"]);if(f!=null){var d=t.get(["axisLine","symbolSize"]);X(f)&&(f=[f,f]),(X(d)||De(d))&&(d=[d,d]);var p=pn(t.get(["axisLine","symbolOffset"])||0,d),v=d[0],g=d[1];M([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,y){if(f[y]!=="none"&&f[y]!=null){var _=lt(f[y],-v/2,-g/2,v,g,c.stroke,!0),w=m.r+m.offset,x=u?l:s;_.attr({rotation:m.rotate,x:x[0]+w*Math.cos(r.rotation),y:x[1]-w*Math.sin(r.rotation),silent:!0,z2:11}),e.add(_)}})}}},axisTickLabel:function(r,t,e,a){var i=P6(e,a,t,r),n=N6(e,a,t,r);if(I6(t,n,i),k6(e,a,t,r.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=RS(W(n,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));zS(o)}},axisName:function(r,t,e,a){var i=it(r.axisName,t.get("name"));if(i){var n=t.get("nameLocation"),o=r.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),c=u[0]>u[1]?-1:1,h=[n==="start"?u[0]-c*l:n==="end"?u[1]+c*l:(u[0]+u[1])/2,uT(n)?r.labelOffset+o*l:0],f,d=t.get("nameRotate");d!=null&&(d=d*pi/180);var p;uT(n)?f=An.innerTextLayout(r.rotation,d??r.rotation,o):(f=E6(r.rotation,n,d||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(f.rotation)),!isFinite(p)&&(p=null)));var v=s.getFont(),g=t.get("nameTruncate",!0)||{},m=g.ellipsis,y=it(r.nameTruncateMaxWidth,g.maxWidth,p),_=new Ae({x:h[0],y:h[1],rotation:f.rotation,silent:An.isLabelSilent(t),style:Fe(s,{text:i,font:v,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||f.textAlign,verticalAlign:s.get("verticalAlign")||f.textVerticalAlign}),z2:1});if(an({el:_,componentModel:t,itemName:i}),_.__fullText=i,_.anid="name",t.get("triggerEvent")){var w=An.makeAxisEventDataBase(t);w.targetType="axisName",w.name=i,ue(_).eventData=w}a.add(_),_.updateTransform(),e.add(_),_.decomposeTransform()}}};function E6(r,t,e,a){var i=s1(e-r),n,o,s=a[0]>a[1],l=t==="start"&&!s||t!=="start"&&s;return Ls(i-pi/2)?(o=l?"bottom":"top",n="center"):Ls(i-pi*1.5)?(o=l?"top":"bottom",n="center"):(o="middle",i<pi*1.5&&i>pi/2?n=l?"left":"right":n=l?"right":"left"),{rotation:i,textAlign:n,textVerticalAlign:o}}function I6(r,t,e){if(!vS(r.axis)){var a=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]);t=t||[],e=e||[];var n=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=e[0],c=e[1],h=e[e.length-1],f=e[e.length-2];a===!1?(br(n),br(u)):lT(n,o)&&(a?(br(o),br(c)):(br(n),br(u))),i===!1?(br(s),br(h)):lT(l,s)&&(i?(br(l),br(f)):(br(s),br(h)))}}function br(r){r&&(r.ignore=!0)}function lT(r,t){var e=r&&r.getBoundingRect().clone(),a=t&&t.getBoundingRect().clone();if(!(!e||!a)){var i=du([]);return Mi(i,i,-r.rotation),e.applyTransform(pa([],i,r.getLocalTransform())),a.applyTransform(pa([],i,t.getLocalTransform())),e.intersect(a)}}function uT(r){return r==="middle"||r==="center"}function cT(r,t,e,a,i){for(var n=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=e,t&&(yt(o,o,t),yt(s,s,t));var c=new mt({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:a,z2:2,autoBatch:!0,silent:!0});uo(c.shape,c.style.lineWidth),c.anid=i+"_"+r[l].tickValue,n.push(c)}return n}function P6(r,t,e,a){var i=e.axis,n=e.getModel("axisTick"),o=n.get("show");if(o==="auto"&&a.handleAutoShown&&(o=a.handleAutoShown("axisTick")),!(!o||i.scale.isBlank())){for(var s=n.getModel("lineStyle"),l=a.tickDirection*n.get("length"),u=i.getTicksCoords(),c=cT(u,t.transform,l,ie(s.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<c.length;h++)r.add(c[h]);return c}}function k6(r,t,e,a){var i=e.axis,n=e.getModel("minorTick");if(!(!n.get("show")||i.scale.isBlank())){var o=i.getMinorTicksCoords();if(o.length)for(var s=n.getModel("lineStyle"),l=a*n.get("length"),u=ie(s.getLineStyle(),ie(e.getModel("axisTick").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})),c=0;c<o.length;c++)for(var h=cT(o[c],t.transform,l,u,"minorticks_"+c),f=0;f<h.length;f++)r.add(h[f])}}function N6(r,t,e,a){var i=e.axis,n=it(a.axisLabelShow,e.get(["axisLabel","show"]));if(!(!n||i.scale.isBlank())){var o=e.getModel("axisLabel"),s=o.get("margin"),l=i.getViewLabels(),u=(it(a.labelRotate,o.get("rotate"))||0)*pi/180,c=An.innerTextLayout(a.rotation,u,a.labelDirection),h=e.getCategories&&e.getCategories(!0),f=[],d=An.isLabelSilent(e),p=e.get("triggerEvent");return M(l,function(v,g){var m=i.scale.type==="ordinal"?i.scale.getRawOrdinalNumber(v.tickValue):v.tickValue,y=v.formattedLabel,_=v.rawLabel,w=o;if(h&&h[m]){var x=h[m];re(x)&&x.textStyle&&(w=new Ge(x.textStyle,o,e.ecModel))}var S=w.getTextColor()||e.get(["axisLine","lineStyle","color"]),L=i.dataToCoord(m),C=w.getShallow("align",!0)||c.textAlign,T=le(w.getShallow("alignMinLabel",!0),C),A=le(w.getShallow("alignMaxLabel",!0),C),D=w.getShallow("verticalAlign",!0)||w.getShallow("baseline",!0)||c.textVerticalAlign,E=le(w.getShallow("verticalAlignMinLabel",!0),D),I=le(w.getShallow("verticalAlignMaxLabel",!0),D),P=new Ae({x:L,y:a.labelOffset+a.labelDirection*s,rotation:c.rotation,silent:d,z2:10+(v.level||0),style:Fe(w,{text:y,align:g===0?T:g===l.length-1?A:C,verticalAlign:g===0?E:g===l.length-1?I:D,fill:te(S)?S(i.type==="category"?_:i.type==="value"?m+"":m,g):S})});if(P.anid="label_"+m,an({el:P,componentModel:e,itemName:y,formatterParamsExtra:{isTruncated:function(){return P.isTruncated},value:_,tickIndex:g}}),p){var k=An.makeAxisEventDataBase(e);k.targetType="axisLabel",k.value=_,k.tickIndex=g,i.type==="category"&&(k.dataIndex=m),ue(P).eventData=k}t.add(P),P.updateTransform(),f.push(P),r.add(P),P.decomposeTransform()}),f}}const Ma=An;function R6(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return V6(e,r,t),e.seriesInvolved&&z6(e,r),e}function V6(r,t,e){var a=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),n=i.get("link",!0)||[],o=[];M(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Dl(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var c=s.model,h=c.getModel("tooltip",a);if(M(s.getAxes(),fe(v,!1,null)),s.getTooltipAxes&&a&&h.get("show")){var f=h.get("trigger")==="axis",d=h.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(h.get(["axisPointer","axis"]));(f||d)&&M(p.baseAxes,fe(v,d?"cross":!0,f)),d&&M(p.otherAxes,fe(v,"cross",!1))}function v(g,m,y){var _=y.model.getModel("axisPointer",i),w=_.get("show");if(!(!w||w==="auto"&&!g&&!ug(_))){m==null&&(m=_.get("triggerTooltip")),_=g?O6(y,h,i,t,g,m):_;var x=_.get("snap"),S=_.get("triggerEmphasis"),L=Dl(y.model),C=m||x||y.type==="category",T=r.axesInfo[L]={key:L,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:m,triggerEmphasis:S,involveSeries:C,snap:x,useHandle:ug(_),seriesModels:[],linkGroup:null};u[L]=T,r.seriesInvolved=r.seriesInvolved||C;var A=B6(n,y);if(A!=null){var D=o[A]||(o[A]={axesInfo:{}});D.axesInfo[L]=T,D.mapper=n[A].mapper,T.linkGroup=D}}}})}function O6(r,t,e,a,i,n){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};M(s,function(f){l[f]=ne(o.get(f))}),l.snap=r.type!=="category"&&!!n,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!n){var h=l.lineStyle=o.get("crossStyle");h&&ie(u,h.textStyle)}}return r.model.getModel("axisPointer",new Ge(l,e,a))}function z6(r,t){t.eachSeries(function(e){var a=e.coordinateSystem,i=e.get(["tooltip","trigger"],!0),n=e.get(["tooltip","show"],!0);!a||i==="none"||i===!1||i==="item"||n===!1||e.get(["axisPointer","show"],!0)===!1||M(r.coordSysAxesInfo[Dl(a.model)],function(o){var s=o.axis;a.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function B6(r,t){for(var e=t.model,a=t.dim,i=0;i<r.length;i++){var n=r[i]||{};if(sg(n[a+"AxisId"],e.id)||sg(n[a+"AxisIndex"],e.componentIndex)||sg(n[a+"AxisName"],e.name))return i}}function sg(r,t){return r==="all"||G(r)&&me(r,t)>=0||r===t}function F6(r){var t=lg(r);if(t){var e=t.axisPointerModel,a=t.axis.scale,i=e.option,n=e.get("status"),o=e.get("value");o!=null&&(o=a.parse(o));var s=ug(e);n==null&&(i.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}function lg(r){var t=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Dl(r)]}function G6(r){var t=lg(r);return t&&t.axisPointerModel}function ug(r){return!!r.get(["handle","show"])}function Dl(r){return r.type+"||"+r.id}var cg={},W6=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i,n){this.axisPointerClass&&F6(e),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,i,!0)},t.prototype.updateAxisPointer=function(e,a,i,n){this._doUpdateAxisPointerClass(e,i,!1)},t.prototype.remove=function(e,a){var i=this._axisPointer;i&&i.remove(a)},t.prototype.dispose=function(e,a){this._disposeAxisPointer(a),r.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,a,i){var n=t.getAxisPointerClass(this.axisPointerClass);if(n){var o=G6(e);o?(this._axisPointer||(this._axisPointer=new n)).render(e,o,a,i):this._disposeAxisPointer(a)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,a){if(process.env.NODE_ENV!=="production"&&cg[e])throw new Error("axisPointer "+e+" exists");cg[e]=a},t.getAxisPointerClass=function(e){return e&&cg[e]},t.type="axis",t}(Ke);const Mn=W6;var hg=xe();function hT(r,t,e,a){var i=e.axis;if(!i.scale.isBlank()){var n=e.getModel("splitArea"),o=n.getModel("areaStyle"),s=o.get("color"),l=a.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:n,clamp:!0});if(u.length){var c=s.length,h=hg(r).splitAreaColors,f=Q(),d=0;if(h)for(var p=0;p<u.length;p++){var v=h.get(u[p].tickValue);if(v!=null){d=(v+(c-1)*p)%c;break}}var g=i.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=G(s)?s:[s];for(var p=1;p<u.length;p++){var y=i.toGlobalCoord(u[p].coord),_=void 0,w=void 0,x=void 0,S=void 0;i.isHorizontal()?(_=g,w=l.y,x=y-_,S=l.height,g=_+x):(_=l.x,w=g,x=l.width,S=y-w,g=w+S);var L=u[p-1].tickValue;L!=null&&f.set(L,d),t.add(new Te({anid:L!=null?"area_"+L:null,shape:{x:_,y:w,width:x,height:S},style:ie({fill:s[d]},m),autoBatch:!0,silent:!0})),d=(d+1)%c}hg(r).splitAreaColors=f}}}function fT(r){hg(r).splitAreaColors=null}var H6=["axisLine","axisTickLabel","axisName"],$6=["splitArea","splitLine","minorSplitLine"],dT=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="CartesianAxisPointer",e}return t.prototype.render=function(e,a,i,n){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new oe,this.group.add(this._axisGroup),!!e.get("show")){var s=e.getCoordSysModel(),l=ig(s,e),u=new Ma(e,F({handleAutoShown:function(h){for(var f=s.coordinateSystem.getCartesians(),d=0;d<f.length;d++)if(wv(f[d].getOtherAxis(e.axis).scale))return!0;return!1}},l));M(H6,u.add,u),this._axisGroup.add(u.getGroup()),M($6,function(h){e.get([h,"show"])&&U6[h](this,this._axisGroup,e,s)},this);var c=n&&n.type==="changeAxisOrder"&&n.isInitSort;c||Fs(o,this._axisGroup,e),r.prototype.render.call(this,e,a,i,n)}},t.prototype.remove=function(){fT(this)},t.type="cartesianAxis",t}(Mn),U6={splitLine:function(r,t,e,a){var i=e.axis;if(!i.scale.isBlank()){var n=e.getModel("splitLine"),o=n.getModel("lineStyle"),s=o.get("color"),l=n.get("showMinLine")!==!1,u=n.get("showMaxLine")!==!1;s=G(s)?s:[s];for(var c=a.coordinateSystem.getRect(),h=i.isHorizontal(),f=0,d=i.getTicksCoords({tickModel:n}),p=[],v=[],g=o.getLineStyle(),m=0;m<d.length;m++){var y=i.toGlobalCoord(d[m].coord);if(!(m===0&&!l||m===d.length-1&&!u)){var _=d[m].tickValue;h?(p[0]=y,p[1]=c.y,v[0]=y,v[1]=c.y+c.height):(p[0]=c.x,p[1]=y,v[0]=c.x+c.width,v[1]=y);var w=f++%s.length,x=new mt({anid:_!=null?"line_"+_:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:v[0],y2:v[1]},style:ie({stroke:s[w]},g),silent:!0});uo(x.shape,g.lineWidth),t.add(x)}}}},minorSplitLine:function(r,t,e,a){var i=e.axis,n=e.getModel("minorSplitLine"),o=n.getModel("lineStyle"),s=a.coordinateSystem.getRect(),l=i.isHorizontal(),u=i.getMinorTicksCoords();if(u.length)for(var c=[],h=[],f=o.getLineStyle(),d=0;d<u.length;d++)for(var p=0;p<u[d].length;p++){var v=i.toGlobalCoord(u[d][p].coord);l?(c[0]=v,c[1]=s.y,h[0]=v,h[1]=s.y+s.height):(c[0]=s.x,c[1]=v,h[0]=s.x+s.width,h[1]=v);var g=new mt({anid:"minor_line_"+u[d][p].tickValue,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]},style:f,silent:!0});uo(g.shape,f.lineWidth),t.add(g)}},splitArea:function(r,t,e,a){hT(r,t,e,a)}},pT=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="xAxis",t}(dT),Y6=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=pT.type,e}return t.type="yAxis",t}(dT),Z6=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="grid",e}return t.prototype.render=function(e,a){this.group.removeAll(),e.get("show")&&this.group.add(new Te({shape:e.coordinateSystem.getRect(),style:ie({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(Ke),vT={offset:0};function gT(r){r.registerComponentView(Z6),r.registerComponentModel(m6),r.registerCoordinateSystem("cartesian2d",M6),Bo(r,"x",tg,vT),Bo(r,"y",tg,vT),r.registerComponentView(pT),r.registerComponentView(Y6),r.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function X6(r){ye(gT),r.registerSeriesModel(u6),r.registerChartView(v6),r.registerLayout(Ll("scatter"))}function j6(r){r.eachSeriesByType("radar",function(t){var e=t.getData(),a=[],i=t.coordinateSystem;if(i){var n=i.getIndicatorAxes();M(n,function(o,s){e.each(e.mapDimension(n[s].dim),function(l,u){a[u]=a[u]||[];var c=i.dataToPoint(l,s);a[u][s]=mT(c)?c:yT(i)})}),e.each(function(o){var s=AP(a[o],function(l){return mT(l)})||yT(i);a[o].push(s.slice()),e.setItemLayout(o,a[o])})}})}function mT(r){return!isNaN(r[0])&&!isNaN(r[1])}function yT(r){return[r.cx,r.cy]}function q6(r){var t=r.polar;if(t){G(t)||(t=[t]);var e=[];M(t,function(a,i){a.indicator?(a.type&&!a.shape&&(a.shape=a.type),r.radar=r.radar||[],G(r.radar)||(r.radar=[r.radar]),r.radar.push(a)):e.push(a)}),r.polar=e}M(r.series,function(a){a&&a.type==="radar"&&a.polarIndex&&(a.radarIndex=a.polarIndex)})}var K6=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){var n=e.coordinateSystem,o=this.group,s=e.getData(),l=this._data;function u(f,d){var p=f.getItemVisual(d,"symbol")||"circle";if(p!=="none"){var v=Ao(f.getItemVisual(d,"symbolSize")),g=lt(p,-1,-1,2,2),m=f.getItemVisual(d,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:v[0]/2,scaleY:v[1]/2,rotation:m*Math.PI/180||0}),g}}function c(f,d,p,v,g,m){p.removeAll();for(var y=0;y<d.length-1;y++){var _=u(v,g);_&&(_.__dimIdx=y,f[y]?(_.setPosition(f[y]),nn[m?"initProps":"updateProps"](_,{x:d[y][0],y:d[y][1]},e,g)):_.setPosition(d[y]),p.add(_))}}function h(f){return W(f,function(d){return[n.cx,n.cy]})}s.diff(l).add(function(f){var d=s.getItemLayout(f);if(d){var p=new Zt,v=new Xt,g={shape:{points:d}};p.shape.points=h(d),v.shape.points=h(d),Ze(p,g,e,f),Ze(v,g,e,f);var m=new oe,y=new oe;m.add(v),m.add(p),m.add(y),c(v.shape.points,d,y,s,f,!0),s.setItemGraphicEl(f,m)}}).update(function(f,d){var p=l.getItemGraphicEl(d),v=p.childAt(0),g=p.childAt(1),m=p.childAt(2),y={shape:{points:s.getItemLayout(f)}};y.shape.points&&(c(v.shape.points,y.shape.points,m,s,f,!1),kr(g),kr(v),Me(v,y,e),Me(g,y,e),s.setItemGraphicEl(f,p))}).remove(function(f){o.remove(l.getItemGraphicEl(f))}).execute(),s.eachItemGraphicEl(function(f,d){var p=s.getItemModel(d),v=f.childAt(0),g=f.childAt(1),m=f.childAt(2),y=s.getItemVisual(d,"style"),_=y.fill;o.add(f),v.useStyle(ie(p.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),wt(v,p,"lineStyle"),wt(g,p,"areaStyle");var w=p.getModel("areaStyle"),x=w.isEmpty()&&w.parentModel.isEmpty();g.ignore=x,M(["emphasis","select","blur"],function(C){var T=p.getModel([C,"areaStyle"]),A=T.isEmpty()&&T.parentModel.isEmpty();g.ensureState(C).ignore=A&&x}),g.useStyle(ie(w.getAreaStyle(),{fill:_,opacity:.7,decal:y.decal}));var S=p.getModel("emphasis"),L=S.getModel("itemStyle").getItemStyle();m.eachChild(function(C){if(C instanceof bt){var T=C.style;C.useStyle(F({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},y))}else C.useStyle(y),C.setColor(_),C.style.strokeNoScale=!0;var A=C.ensureState("emphasis");A.style=ne(L);var D=s.getStore().get(s.getDimensionIndex(C.__dimIdx),d);(D==null||isNaN(D))&&(D=""),xt(C,ft(p),{labelFetcher:s.hostModel,labelDataIndex:d,labelDimIndex:C.__dimIdx,defaultText:D,inheritColor:_,defaultOpacity:y.opacity})}),qe(f,S.get("focus"),S.get("blurScope"),S.get("disabled"))}),this._data=s},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t}(We);const J6=K6;var Q6=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Cl(j(this.getData,this),j(this.getRawData,this))},t.prototype.getInitialData=function(e,a){return zo(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(e,a,i){var n=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(e),u=l===""?this.name:l,c=Tw(this,e);return dt("section",{header:u,sortBlocks:!0,blocks:W(s,function(h){var f=n.get(n.mapDimension(h.dim),e);return dt("nameValue",{markerType:"subItem",markerColor:c,name:h.name,value:f,sortParam:f})})})},t.prototype.getTooltipPosition=function(e){if(e!=null){for(var a=this.getData(),i=this.coordinateSystem,n=a.getValues(W(i.dimensions,function(u){return a.mapDimension(u)}),e),o=0,s=n.length;o<s;o++)if(!isNaN(n[o])){var l=i.getIndicatorAxes();return i.coordToPoint(l[o].dataToCoord(n[o]),o)}}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t}(Xe);const eF=Q6;var Al=QL.value;function mh(r,t){return ie({show:t},r)}var tF=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){var e=this.get("boundaryGap"),a=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),h=this.get("axisNameGap"),f=this.get("triggerEvent"),d=W(this.get("indicator")||[],function(p){p.max!=null&&p.max>0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var v=l;p.color!=null&&(v=ie({color:p.color},l));var g=de(ne(p),{boundaryGap:e,splitNumber:a,scale:i,axisLine:n,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:v,triggerEvent:f},!1);if(X(c)){var m=g.name;g.name=c.replace("{value}",m??"")}else te(c)&&(g.name=c(g.name,g));var y=new Ge(g,null,this.ecModel);return at(y,pl.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=d},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:de({lineStyle:{color:"#bbb"}},Al.axisLine),axisLabel:mh(Al.axisLabel,!1),axisTick:mh(Al.axisTick,!1),splitLine:mh(Al.splitLine,!0),splitArea:mh(Al.splitArea,!0),indicator:[]},t}(Se);const rF=tF;var aF=["axisLine","axisTickLabel","axisName"],iF=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){var n=this.group;n.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var a=e.coordinateSystem,i=a.getIndicatorAxes(),n=W(i,function(o){var s=o.model.get("showName")?o.name:"",l=new Ma(o.model,{axisName:s,position:[a.cx,a.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});M(n,function(o){M(aF,o.add,o),this.group.add(o.getGroup())},this)},t.prototype._buildSplitLineAndArea=function(e){var a=e.coordinateSystem,i=a.getIndicatorAxes();if(!i.length)return;var n=e.get("shape"),o=e.getModel("splitLine"),s=e.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),h=s.get("show"),f=l.get("color"),d=u.get("color"),p=G(f)?f:[f],v=G(d)?d:[d],g=[],m=[];function y(k,N,O){var R=O%N.length;return k[R]=k[R]||[],R}if(n==="circle")for(var _=i[0].getTicksCoords(),w=a.cx,x=a.cy,S=0;S<_.length;S++){if(c){var L=y(g,p,S);g[L].push(new Qa({shape:{cx:w,cy:x,r:_[S].coord}}))}if(h&&S<_.length-1){var L=y(m,v,S);m[L].push(new tc({shape:{cx:w,cy:x,r0:_[S].coord,r:_[S+1].coord}}))}}else for(var C,T=W(i,function(k,N){var O=k.getTicksCoords();return C=C==null?O.length-1:Math.min(O.length-1,C),W(O,function(R){return a.coordToPoint(R.coord,N)})}),A=[],S=0;S<=C;S++){for(var D=[],E=0;E<i.length;E++)D.push(T[E][S]);if(D[0]?D.push(D[0].slice()):process.env.NODE_ENV!=="production"&&console.error("Can't draw value axis "+S),c){var L=y(g,p,S);g[L].push(new Xt({shape:{points:D}}))}if(h&&A){var L=y(m,v,S-1);m[L].push(new Zt({shape:{points:D.concat(A)}}))}A=D.slice().reverse()}var I=l.getLineStyle(),P=u.getAreaStyle();M(m,function(k,N){this.group.add(dr(k,{style:ie({stroke:"none",fill:v[N%v.length]},P),silent:!0}))},this),M(g,function(k,N){this.group.add(dr(k,{style:ie({fill:"none",stroke:p[N%p.length]},I),silent:!0}))},this)},t.type="radar",t}(Ke);const nF=iF;var oF=function(r){z(t,r);function t(e,a,i){var n=r.call(this,e,a,i)||this;return n.type="value",n.angle=0,n.name="",n}return t}(zr);const sF=oF;var lF=function(){function r(t,e,a){this.dimensions=[],this._model=t,this._indicatorAxes=W(t.getIndicatorModels(),function(i,n){var o="indicator_"+n,s=new sF(o,new ci);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(t,a)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(t,e){var a=this._indicatorAxes[e];return this.coordToPoint(a.dataToCoord(t),e)},r.prototype.coordToPoint=function(t,e){var a=this._indicatorAxes[e],i=a.angle,n=this.cx+t*Math.cos(i),o=this.cy-t*Math.sin(i);return[n,o]},r.prototype.pointToData=function(t){var e=t[0]-this.cx,a=t[1]-this.cy,i=Math.sqrt(e*e+a*a);e/=i,a/=i;for(var n=Math.atan2(-a,e),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],h=Math.abs(n-c.angle);h<o&&(s=c,l=u,o=h)}return[l,+(s&&s.coordToData(i))]},r.prototype.resize=function(t,e){var a=t.get("center"),i=e.getWidth(),n=e.getHeight(),o=Math.min(i,n)/2;this.cx=Z(a[0],i),this.cy=Z(a[1],n),this.startAngle=t.get("startAngle")*Math.PI/180;var s=t.get("radius");(X(s)||De(s))&&(s=[0,s]),this.r0=Z(s[0],o),this.r=Z(s[1],o),M(this._indicatorAxes,function(l,u){l.setExtent(this.r0,this.r);var c=this.startAngle+u*Math.PI*2/this._indicatorAxes.length;c=Math.atan2(Math.sin(c),Math.cos(c)),l.angle=c},this)},r.prototype.update=function(t,e){var a=this._indicatorAxes,i=this._model;M(a,function(s){s.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||t.getComponent("radar",s.get("radarIndex"))!==i)){var u=s.getData();M(a,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var n=i.get("splitNumber"),o=new ci;o.setExtent(0,n),o.setInterval(1),M(a,function(s,l){iT(s.scale,s.model,o)})},r.prototype.convertToPixel=function(t,e,a){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(t,e,a){return console.warn("Not implemented."),null},r.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},r.create=function(t,e){var a=[];return t.eachComponent("radar",function(i){var n=new r(i,t,e);a.push(n),i.coordinateSystem=n}),t.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=a[i.get("radarIndex")||0])}),a},r.dimensions=[],r}();const uF=lF;function cF(r){r.registerCoordinateSystem("radar",uF),r.registerComponentModel(rF),r.registerComponentView(nF),r.registerVisual({seriesType:"radar",reset:function(t){var e=t.getData();e.each(function(a){e.setItemVisual(a,"legendIcon","roundRect")}),e.setVisual("legendIcon","roundRect")}})}function hF(r){ye(cF),r.registerChartView(J6),r.registerSeriesModel(eF),r.registerLayout(j6),r.registerProcessor(Tl("radar")),r.registerPreprocessor(q6)}var _T="\0_ec_interaction_mutex";function fF(r,t,e){var a=fg(r);a[t]=e}function dF(r,t,e){var a=fg(r),i=a[t];i===e&&(a[t]=null)}function bT(r,t){return!!fg(r)[t]}function fg(r){return r[_T]||(r[_T]={})}ra({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},et);var pF=function(r){z(t,r);function t(e){var a=r.call(this)||this;a._zr=e;var i=j(a._mousedownHandler,a),n=j(a._mousemoveHandler,a),o=j(a._mouseupHandler,a),s=j(a._mousewheelHandler,a),l=j(a._pinchHandler,a);return a.enable=function(u,c){this.disable(),this._opt=ie(ne(c)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(e.on("mousedown",i),e.on("mousemove",n),e.on("mouseup",o)),(u===!0||u==="scale"||u==="zoom")&&(e.on("mousewheel",s),e.on("pinch",l))},a.disable=function(){e.off("mousedown",i),e.off("mousemove",n),e.off("mouseup",o),e.off("mousewheel",s),e.off("pinch",l)},a}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!o0(e)){for(var a=e.target;a;){if(a.draggable)return;a=a.__hostTarget||a.parent}var i=e.offsetX,n=e.offsetY;this.pointerChecker&&this.pointerChecker(e,i,n)&&(this._x=i,this._y=n,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(!(!this._dragging||!yh("moveOnMouseMove",e,this._opt)||e.gestureEvent==="pinch"||bT(this._zr,"globalPan"))){var a=e.offsetX,i=e.offsetY,n=this._x,o=this._y,s=a-n,l=i-o;this._x=a,this._y=i,this._opt.preventDefaultMouseMove&&da(e.event),wT(this,"pan","moveOnMouseMove",e,{dx:s,dy:l,oldX:n,oldY:o,newX:a,newY:i,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){o0(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var a=yh("zoomOnMouseWheel",e,this._opt),i=yh("moveOnMouseWheel",e,this._opt),n=e.wheelDelta,o=Math.abs(n),s=e.offsetX,l=e.offsetY;if(!(n===0||!a&&!i)){if(a){var u=o>3?1.4:o>1?1.2:1.1,c=n>0?u:1/u;dg(this,"zoom","zoomOnMouseWheel",e,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var h=Math.abs(n),f=(n>0?1:-1)*(h>3?.4:h>1?.15:.05);dg(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:f,originX:s,originY:l,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!bT(this._zr,"globalPan")){var a=e.pinchScale>1?1.1:1/1.1;dg(this,"zoom",null,e,{scale:a,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t}(or);function dg(r,t,e,a,i){r.pointerChecker&&r.pointerChecker(a,i.originX,i.originY)&&(da(a.event),wT(r,t,e,a,i))}function wT(r,t,e,a,i){i.isAvailableBehavior=j(yh,null,e,a),r.trigger(t,i)}function yh(r,t,e){var a=e[r];return!r||a&&(!X(a)||t.event[a+"Key"])}const Ml=pF;function pg(r,t,e){var a=r.target;a.x+=t,a.y+=e,a.dirty()}function vg(r,t,e,a){var i=r.target,n=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=t,n){var s=n.min||0,l=n.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,i.x-=(e-i.x)*(u-1),i.y-=(a-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var vF={axisPointer:1,tooltip:1,brush:1};function _h(r,t,e){var a=t.getComponentByElement(r.topTarget),i=a&&a.coordinateSystem;return a&&a!==e&&!vF.hasOwnProperty(a.mainType)&&i&&i.model!==e}function xT(r){if(X(r)){var t=new DOMParser;r=t.parseFromString(r,"text/xml")}var e=r;for(e.nodeType===9&&(e=e.firstChild);e.nodeName.toLowerCase()!=="svg"||e.nodeType!==1;)e=e.nextSibling;return e}var gg,bh={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},ST=we(bh),wh={"alignment-baseline":"textBaseline","stop-color":"stopColor"},LT=we(wh),gF=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(t,e){e=e||{};var a=xT(t);if(process.env.NODE_ENV!=="production"&&!a)throw new Error("Illegal svg");this._defsUsePending=[];var i=new oe;this._root=i;var n=[],o=a.getAttribute("viewBox")||"",s=parseFloat(a.getAttribute("width")||e.width),l=parseFloat(a.getAttribute("height")||e.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),ir(a,i,null,!0,!1);for(var u=a.firstChild;u;)this._parseNode(u,i,n,null,!1,!1),u=u.nextSibling;_F(this._defs,this._defsUsePending),this._defsUsePending=[];var c,h;if(o){var f=xh(o);f.length>=4&&(c={x:parseFloat(f[0]||0),y:parseFloat(f[1]||0),width:parseFloat(f[2]),height:parseFloat(f[3])})}if(c&&s!=null&&l!=null&&(h=PT(c,{x:0,y:0,width:s,height:l}),!e.ignoreViewBox)){var d=i;i=new oe,i.add(d),d.scaleX=d.scaleY=h.scale,d.x=h.x,d.y=h.y}return!e.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new Te({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:h,named:n}},r.prototype._parseNode=function(t,e,a,i,n,o){var s=t.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(n=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=e;else{if(!n){var c=gg[s];if(c&&K(gg,s)){l=c.call(this,t,e);var h=t.getAttribute("name");if(h){var f={name:h,namedFrom:null,svgNodeTagLower:s,el:l};a.push(f),s==="g"&&(u=f)}else i&&a.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});e.add(l)}}var d=TT[s];if(d&&K(TT,s)){var p=d.call(this,t),v=t.getAttribute("id");v&&(this._defs[v]=p)}}if(l&&l.isGroup)for(var g=t.firstChild;g;)g.nodeType===1?this._parseNode(g,l,a,u,n,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(t,e){var a=new Es({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});wr(e,a),ir(t,a,this._defsUsePending,!1,!1),mF(a,e);var i=a.style,n=i.fontSize;n&&n<9&&(i.fontSize=9,a.scaleX*=n/9,a.scaleY*=n/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=a.getBoundingRect();return this._textX+=s.width,e.add(a),a},r.internalField=function(){gg={g:function(t,e){var a=new oe;return wr(e,a),ir(t,a,this._defsUsePending,!1,!1),a},rect:function(t,e){var a=new Te;return wr(e,a),ir(t,a,this._defsUsePending,!1,!1),a.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),a.silent=!0,a},circle:function(t,e){var a=new Qa;return wr(e,a),ir(t,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),a.silent=!0,a},line:function(t,e){var a=new mt;return wr(e,a),ir(t,a,this._defsUsePending,!1,!1),a.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),a.silent=!0,a},ellipse:function(t,e){var a=new ap;return wr(e,a),ir(t,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),a.silent=!0,a},polygon:function(t,e){var a=t.getAttribute("points"),i;a&&(i=AT(a));var n=new Zt({shape:{points:i||[]},silent:!0});return wr(e,n),ir(t,n,this._defsUsePending,!1,!1),n},polyline:function(t,e){var a=t.getAttribute("points"),i;a&&(i=AT(a));var n=new Xt({shape:{points:i||[]},silent:!0});return wr(e,n),ir(t,n,this._defsUsePending,!1,!1),n},image:function(t,e){var a=new bt;return wr(e,a),ir(t,a,this._defsUsePending,!1,!1),a.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),a.silent=!0,a},text:function(t,e){var a=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",n=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(n),this._textY=parseFloat(i)+parseFloat(o);var s=new oe;return wr(e,s),ir(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,e){var a=t.getAttribute("x"),i=t.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),i!=null&&(this._textY=parseFloat(i));var n=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new oe;return wr(e,s),ir(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(n),this._textY+=parseFloat(o),s},path:function(t,e){var a=t.getAttribute("d")||"",i=C_(a);return wr(e,i),ir(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),r}(),TT={lineargradient:function(r){var t=parseInt(r.getAttribute("x1")||"0",10),e=parseInt(r.getAttribute("y1")||"0",10),a=parseInt(r.getAttribute("x2")||"10",10),i=parseInt(r.getAttribute("y2")||"0",10),n=new zs(t,e,a,i);return CT(r,n),DT(r,n),n},radialgradient:function(r){var t=parseInt(r.getAttribute("cx")||"0",10),e=parseInt(r.getAttribute("cy")||"0",10),a=parseInt(r.getAttribute("r")||"0",10),i=new G_(t,e,a);return CT(r,i),DT(r,i),i}};function CT(r,t){var e=r.getAttribute("gradientUnits");e==="userSpaceOnUse"&&(t.global=!0)}function DT(r,t){for(var e=r.firstChild;e;){if(e.nodeType===1&&e.nodeName.toLocaleLowerCase()==="stop"){var a=e.getAttribute("offset"),i=void 0;a&&a.indexOf("%")>0?i=parseInt(a,10)/100:a?i=parseFloat(a):i=0;var n={};IT(e,n,n);var o=n.stopColor||e.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:i,color:o})}e=e.nextSibling}}function wr(r,t){r&&r.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),ie(t.__inheritedStyle,r.__inheritedStyle))}function AT(r){for(var t=xh(r),e=[],a=0;a<t.length;a+=2){var i=parseFloat(t[a]),n=parseFloat(t[a+1]);e.push([i,n])}return e}function ir(r,t,e,a,i){var n=t,o=n.__inheritedStyle=n.__inheritedStyle||{},s={};r.nodeType===1&&(xF(r,t),IT(r,o,s),a||SF(r,o,s)),n.style=n.style||{},o.fill!=null&&(n.style.fill=MT(n,"fill",o.fill,e)),o.stroke!=null&&(n.style.stroke=MT(n,"stroke",o.stroke,e)),M(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(n.style[l]=parseFloat(o[l]))}),M(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(n.style[l]=o[l])}),i&&(n.__selfStyle=s),o.lineDash&&(n.style.lineDash=W(xh(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(n.invisible=!0),o.display==="none"&&(n.ignore=!0)}function mF(r,t){var e=t.__selfStyle;if(e){var a=e.textBaseline,i=a;!a||a==="auto"||a==="baseline"?i="alphabetic":a==="before-edge"||a==="text-before-edge"?i="top":a==="after-edge"||a==="text-after-edge"?i="bottom":(a==="central"||a==="mathematical")&&(i="middle"),r.style.textBaseline=i}var n=t.__inheritedStyle;if(n){var o=n.textAlign,s=o;o&&(o==="middle"&&(s="center"),r.style.textAlign=s)}}var yF=/^url\(\s*#(.*?)\)/;function MT(r,t,e,a){var i=e&&e.match(yF);if(i){var n=Dr(i[1]);a.push([r,t,n]);return}return e==="none"&&(e=null),e}function _F(r,t){for(var e=0;e<t.length;e++){var a=t[e];a[0].style[a[1]]=r[a[2]]}}var bF=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function xh(r){return r.match(bF)||[]}var wF=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,mg=Math.PI/180;function xF(r,t){var e=r.getAttribute("transform");if(e){e=e.replace(/,/g," ");var a=[],i=null;e.replace(wF,function(h,f,d){return a.push(f,d),""});for(var n=a.length-1;n>0;n-=2){var o=a[n],s=a[n-1],l=xh(o);switch(i=i||Jt(),s){case"translate":Hr(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Nf(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Mi(i,i,-parseFloat(l[0])*mg,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*mg);pa(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*mg);pa(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}t.setLocalTransform(i)}}var ET=/([^\s:;]+)\s*:\s*([^:;]+)/g;function IT(r,t,e){var a=r.getAttribute("style");if(a){ET.lastIndex=0;for(var i;(i=ET.exec(a))!=null;){var n=i[1],o=K(bh,n)?bh[n]:null;o&&(t[o]=i[2]);var s=K(wh,n)?wh[n]:null;s&&(e[s]=i[2])}}}function SF(r,t,e){for(var a=0;a<ST.length;a++){var i=ST[a],n=r.getAttribute(i);n!=null&&(t[bh[i]]=n)}for(var a=0;a<LT.length;a++){var i=LT[a],n=r.getAttribute(i);n!=null&&(e[wh[i]]=n)}}function PT(r,t){var e=t.width/r.width,a=t.height/r.height,i=Math.min(e,a);return{scale:i,x:-(r.x+r.width/2)*i+(t.x+t.width/2),y:-(r.y+r.height/2)*i+(t.y+t.height/2)}}function LF(r,t){var e=new gF;return e.parse(r,t)}var TF=Q(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),CF=function(){function r(t,e){this.type="geoSVG",this._usedGraphicMap=Q(),this._freedGraphics=[],this._mapName=t,this._parsedXML=xT(e)}return r.prototype.load=function(){var t=this._firstGraphic;if(!t){t=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(t),this._boundingRect=this._firstGraphic.boundingRect.clone();var e=AF(t.named),a=e.regions,i=e.regionsMap;this._regions=a,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(t){var e,a;try{e=t&&LF(t,{ignoreViewBox:!0,ignoreRootClip:!0})||{},a=e.root,ae(a!=null)}catch(g){throw new Error(`Invalid svg format
247
+ `+g.message)}var i=new oe;i.add(a),i.isGeoSVGGraphicRoot=!0;var n=e.width,o=e.height,s=e.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,h=void 0,f=void 0;if(n!=null?(u=0,h=n):s&&(u=s.x,h=s.width),o!=null?(c=0,f=o):s&&(c=s.y,f=s.height),u==null||c==null){var d=a.getBoundingRect();u==null&&(u=d.x,h=d.width),c==null&&(c=d.y,f=d.height)}l=this._boundingRect=new ge(u,c,h,f)}if(s){var p=PT(s,l);a.scaleX=a.scaleY=p.scale,a.x=p.x,a.y=p.y}i.setClipPath(new Te({shape:l.plain()}));var v=[];return M(e.named,function(g){TF.get(g.svgNodeTagLower)!=null&&(v.push(g),DF(g.el))}),{root:i,boundingRect:l,named:v}},r.prototype.useGraphic=function(t){var e=this._usedGraphicMap,a=e.get(t);return a||(a=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),e.set(t,a),a)},r.prototype.freeGraphic=function(t){var e=this._usedGraphicMap,a=e.get(t);a&&(e.removeKey(t),this._freedGraphics.push(a))},r}();function DF(r){r.silent=!1,r.isGroup&&r.traverse(function(t){t.silent=!1})}function AF(r){var t=[],e=Q();return M(r,function(a){if(a.namedFrom==null){var i=new UB(a.name,a.el);t.push(i),e.set(a.name,i)}}),{regions:t,regionsMap:e}}for(var yg=[126,25],kT="南海诸岛",En=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],In=0;In<En.length;In++)for(var Fo=0;Fo<En[In].length;Fo++)En[In][Fo][0]/=10.5,En[In][Fo][1]/=-10.5/.75,En[In][Fo][0]+=yg[0],En[In][Fo][1]+=yg[1];function MF(r,t){if(r==="china"){for(var e=0;e<t.length;e++)if(t[e].name===kT)return;t.push(new wS(kT,W(En,function(a){return{type:"polygon",exterior:a}}),yg))}}var EF={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function IF(r,t){if(r==="china"){var e=EF[t.name];if(e){var a=t.getCenter();a[0]+=e[0]/10.5,a[1]+=-e[1]/(10.5/.75),t.setCenter(a)}}}var PF=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function kF(r,t){r==="china"&&t.name==="台湾"&&t.geometries.push({type:"polygon",exterior:PF[0]})}var NF="name",RF=function(){function r(t,e,a){this.type="geoJSON",this._parsedMap=Q(),this._mapName=t,this._specialAreas=a,this._geoJSON=OF(e)}return r.prototype.load=function(t,e){e=e||NF;var a=this._parsedMap.get(e);if(!a){var i=this._parseToRegions(e);a=this._parsedMap.set(e,{regions:i,boundingRect:VF(i)})}var n=Q(),o=[];return M(a.regions,function(s){var l=s.name;t&&K(t,l)&&(s=s.cloneShallow(l=t[l])),o.push(s),n.set(l,s)}),{regions:o,boundingRect:a.boundingRect||new ge(0,0,0,0),regionsMap:n}},r.prototype._parseToRegions=function(t){var e=this._mapName,a=this._geoJSON,i;try{i=a?ZB(a,t):[]}catch(n){throw new Error(`Invalid geoJson format
248
+ `+n.message)}return MF(e,i),M(i,function(n){var o=n.name;IF(e,n),kF(e,n);var s=this._specialAreas&&this._specialAreas[o];s&&n.transformTo(s.left,s.top,s.width,s.height)},this),i},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r}();function VF(r){for(var t,e=0;e<r.length;e++){var a=r[e].getBoundingRect();t=t||a.clone(),t.union(a)}return t}function OF(r){return X(r)?typeof JSON<"u"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var El=Q();const Ea={registerMap:function(r,t,e){if(t.svg){var a=new CF(r,t.svg);El.set(r,a)}else{var i=t.geoJson||t.geoJSON;i&&!t.features?e=t.specialAreas:i=t;var a=new RF(r,i,e);El.set(r,a)}},getGeoResource:function(r){return El.get(r)},getMapForUser:function(r){var t=El.get(r);return t&&t.type==="geoJSON"&&t.getMapForUser()},load:function(r,t,e){var a=El.get(r);if(!a){process.env.NODE_ENV!=="production"&&console.error("Map "+r+" not exists. The GeoJSON of the map must be provided.");return}return a.load(t,e)}};var _g=["rect","circle","line","ellipse","polygon","polyline","path"],zF=Q(_g),BF=Q(_g.concat(["g"])),FF=Q(_g.concat(["g"])),NT=xe();function Sh(r){var t=r.getItemStyle(),e=r.get("areaColor");return e!=null&&(t.fill=e),t}function RT(r){var t=r.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var GF=function(){function r(t){var e=new oe;this.uid=ho("ec_map_draw"),this._controller=new Ml(t.getZr()),this._controllerHost={target:e},this.group=e,e.add(this._regionsGroup=new oe),e.add(this._svgGroup=new oe)}return r.prototype.draw=function(t,e,a,i,n){var o=t.mainType==="geo",s=t.getData&&t.getData();o&&e.eachComponent({mainType:"series",subType:"map"},function(m){!s&&m.getHostGeoModel()===t&&(s=m.getData())});var l=t.coordinateSystem,u=this._regionsGroup,c=this.group,h=l.getTransformInfo(),f=h.raw,d=h.roam,p=!u.childAt(0)||n;p?(c.x=d.x,c.y=d.y,c.scaleX=d.scaleX,c.scaleY=d.scaleY,c.dirty()):Me(c,d,t);var v=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,g={api:a,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:v,isGeo:o,transformInfoRaw:f};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(t,e,a),this._updateMapSelectHandler(t,u,a,i)},r.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=Q(),a=Q(),i=this._regionsGroup,n=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function c(d,p){return p&&(d=p(d)),d&&[d[0]*n.scaleX+n.x,d[1]*n.scaleY+n.y]}function h(d){for(var p=[],v=!u&&l&&l.project,g=0;g<d.length;++g){var m=c(d[g],v);m&&p.push(m)}return p}function f(d){return{shape:{points:h(d)}}}i.removeAll(),M(t.geo.regions,function(d){var p=d.name,v=e.get(p),g=a.get(p)||{},m=g.dataIdx,y=g.regionModel;if(!v){v=e.set(p,new oe),i.add(v),m=s?s.indexOfName(p):null,y=t.isGeo?o.getRegionModel(p):s?s.getItemModel(m):null;var _=y.get("silent",!0);_!=null&&(v.silent=_),a.set(p,{dataIdx:m,regionModel:y})}var w=[],x=[];M(d.geometries,function(C){if(C.type==="polygon"){var T=[C.exterior].concat(C.interiors||[]);u&&(T=GT(T,u)),M(T,function(D){w.push(new Zt(f(D)))})}else{var A=C.points;u&&(A=GT(A,u,!0)),M(A,function(D){x.push(new Xt(f(D)))})}});var S=c(d.getCenter(),l&&l.project);function L(C,T){if(C.length){var A=new op({culling:!0,segmentIgnoreThreshold:1,shape:{paths:C}});v.add(A),VT(t,A,m,y),OT(t,A,p,y,o,m,S),T&&(RT(A),M(A.states,RT))}}L(w),L(x,!0)}),e.each(function(d,p){var v=a.get(p),g=v.dataIdx,m=v.regionModel;zT(t,d,p,m,o,g),BT(t,d,p,m,o),FT(t,d,p,m,o)},this)},r.prototype._buildSVG=function(t){var e=t.geo.map,a=t.transformInfoRaw;this._svgGroup.x=a.x,this._svgGroup.y=a.y,this._svgGroup.scaleX=a.scaleX,this._svgGroup.scaleY=a.scaleY,this._svgResourceChanged(e)&&(this._freeSVG(),this._useSVG(e));var i=this._svgDispatcherMap=Q(),n=!1;M(this._svgGraphicRecord.named,function(o){var s=o.name,l=t.mapOrGeoModel,u=t.data,c=o.svgNodeTagLower,h=o.el,f=u?u.indexOfName(s):null,d=l.getRegionModel(s);zF.get(c)!=null&&h instanceof hr&&VT(t,h,f,d),h instanceof hr&&(h.culling=!0);var p=d.get("silent",!0);if(p!=null&&(h.silent=p),h.z2EmphasisLift=0,!o.namedFrom&&(FF.get(c)!=null&&OT(t,h,s,d,l,f,null),zT(t,h,s,d,l,f),BT(t,h,s,d,l),BF.get(c)!=null)){var v=FT(t,h,s,d,l);v==="self"&&(n=!0);var g=i.get(s)||i.set(s,[]);g.push(h)}},this),this._enableBlurEntireSVG(n,t)},r.prototype._enableBlurEntireSVG=function(t,e){if(t&&e.isGeo){var a=e.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),i=a.opacity;this._svgGraphicRecord.root.traverse(function(n){if(!n.isGroup){qi(n);var o=n.ensureState("blur").style||{};o.opacity==null&&i!=null&&(o.opacity=i),n.ensureState("emphasis")}})}},r.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},r.prototype.findHighDownDispatchers=function(t,e){if(t==null)return[];var a=e.coordinateSystem;if(a.resourceType==="geoJSON"){var i=this._regionsGroupByName;if(i){var n=i.get(t);return n?[n]:[]}}else if(a.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(t)||[]},r.prototype._svgResourceChanged=function(t){return this._svgMapName!==t},r.prototype._useSVG=function(t){var e=Ea.getGeoResource(t);if(e&&e.type==="geoSVG"){var a=e.useGraphic(this.uid);this._svgGroup.add(a.root),this._svgGraphicRecord=a,this._svgMapName=t}},r.prototype._freeSVG=function(){var t=this._svgMapName;if(t!=null){var e=Ea.getGeoResource(t);e&&e.type==="geoSVG"&&e.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},r.prototype._updateController=function(t,e,a){var i=t.coordinateSystem,n=this._controller,o=this._controllerHost;o.zoomLimit=t.get("scaleLimit"),o.zoom=i.getZoom(),n.enable(t.get("roam")||!1);var s=t.mainType;function l(){var u={type:"geoRoam",componentType:s};return u[s+"Id"]=t.id,u}n.off("pan").on("pan",function(u){this._mouseDownFlag=!1,pg(o,u.dx,u.dy),a.dispatchAction(F(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),n.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,vg(o,u.scale,u.originX,u.originY),a.dispatchAction(F(l(),{totalZoom:o.zoom,zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),n.setPointerChecker(function(u,c,h){return i.containPoint([c,h])&&!_h(u,a,t)})},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(t){var e=t.getTextContent();e&&(e.ignore=NT(e).ignore)})},r.prototype._updateMapSelectHandler=function(t,e,a,i){var n=this;e.off("mousedown"),e.off("click"),t.get("selectedMode")&&(e.on("mousedown",function(){n._mouseDownFlag=!0}),e.on("click",function(o){n._mouseDownFlag&&(n._mouseDownFlag=!1)}))},r}();function VT(r,t,e,a){var i=a.getModel("itemStyle"),n=a.getModel(["emphasis","itemStyle"]),o=a.getModel(["blur","itemStyle"]),s=a.getModel(["select","itemStyle"]),l=Sh(i),u=Sh(n),c=Sh(s),h=Sh(o),f=r.data;if(f){var d=f.getItemVisual(e,"style"),p=f.getItemVisual(e,"decal");r.isVisualEncodedByVisualMap&&d.fill&&(l.fill=d.fill),p&&(l.decal=Eo(p,r.api))}t.setStyle(l),t.style.strokeNoScale=!0,t.ensureState("emphasis").style=u,t.ensureState("select").style=c,t.ensureState("blur").style=h,qi(t)}function OT(r,t,e,a,i,n,o){var s=r.data,l=r.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),n)),c=s&&s.getItemLayout(n);if(l||u||c&&c.showLabel){var h=l?e:n,f=void 0;(!s||n>=0)&&(f=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;xt(t,ft(a),{labelFetcher:f,labelDataIndex:h,defaultText:e},d);var p=t.getTextContent();if(p&&(NT(p).ignore=p.ignore,t.textConfig&&o)){var v=t.getBoundingRect().clone();t.textConfig.layoutRect=v,t.textConfig.position=[(o[0]-v.x)/v.width*100+"%",(o[1]-v.y)/v.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function zT(r,t,e,a,i,n){r.data?r.data.setItemGraphicEl(n,t):ue(t).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:e,region:a&&a.option||{}}}function BT(r,t,e,a,i){r.data||an({el:t,componentModel:i,itemName:e,itemTooltipOption:a.get("tooltip")})}function FT(r,t,e,a,i){t.highDownSilentOnTouch=!!i.get("selectedMode");var n=a.getModel("emphasis"),o=n.get("focus");return qe(t,o,n.get("blurScope"),n.get("disabled")),r.isGeo&&zR(t,i,e),o}function GT(r,t,e){var a=[],i;function n(){i=[]}function o(){i.length&&(a.push(i),i=[])}var s=t({polygonStart:n,polygonEnd:o,lineStart:n,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!e&&s.polygonStart(),M(r,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!e&&s.polygonEnd(),a}const WT=GF;var WF=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i,n){if(!(n&&n.type==="mapToggleSelect"&&n.from===this.uid)){var o=this.group;if(o.removeAll(),!e.getHostGeoModel()){if(this._mapDraw&&n&&n.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),n&&n.type==="geoRoam"&&n.componentType==="series"&&n.seriesId===e.id){var s=this._mapDraw;s&&o.add(s.group)}else if(e.needsDrawMap){var s=this._mapDraw||new WT(i);o.add(s.group),s.draw(e,a,i,this,n),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&a.getComponent("legend")&&this._renderSymbols(e,a,i)}}},t.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e,a,i){var n=e.originalData,o=this.group;n.each(n.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=n.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,h=u.offset,f=new Qa({style:{fill:e.getData().getVisual("style").fill},shape:{cx:c[0]+h*9,cy:c[1],r:3},silent:!0,z2:8+(h?0:ao+1)});if(!h){var d=e.mainSeries.getData(),p=n.getName(l),v=d.indexOfName(p),g=n.getItemModel(l),m=g.getModel("label"),y=d.getItemGraphicEl(v);xt(f,ft(g),{labelFetcher:{getFormattedLabel:function(_,w){return e.getFormattedLabel(v,w)}},defaultText:p}),f.disableLabelAnimation=!0,m.get("position")||f.setTextConfig({position:"bottom"}),y.onHoverStateChange=function(_){Ku(f,_)}}o.add(f)}}})},t.type="map",t}(We);const HF=WF;var $F=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.needsDrawMap=!1,e.seriesGroup=[],e.getTooltipPosition=function(a){if(a!=null){var i=this.getData().getName(a),n=this.coordinateSystem,o=n.getRegion(i);return o&&n.dataToPoint(o.getCenter())}},e}return t.prototype.getInitialData=function(e){for(var a=zo(this,{coordDimensions:["value"],encodeDefaulter:fe(Cp,this)}),i=Q(),n=[],o=0,s=a.count();o<s;o++){var l=a.getName(o);i.set(l,o)}var u=Ea.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return M(u.regions,function(c){var h=c.name,f=i.get(h),d=c.properties&&c.properties.echartsStyle,p;f==null?(p={name:h},n.push(p)):p=a.getRawDataItem(f),d&&de(p,d)}),a.appendData(n),a},t.prototype.getHostGeoModel=function(){var e=this.option.geoIndex;return e!=null?this.ecModel.getComponent("geo",e):null},t.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},t.prototype.getRawValue=function(e){var a=this.getData();return a.get(a.mapDimension("value"),e)},t.prototype.getRegionModel=function(e){var a=this.getData();return a.getItemModel(a.indexOfName(e))},t.prototype.formatTooltip=function(e,a,i){for(var n=this.getData(),o=this.getRawValue(e),s=n.getName(e),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var h=l[c].originalData.indexOfName(s),f=n.mapDimension("value");isNaN(l[c].originalData.get(f,h))||u.push(l[c].name)}return dt("section",{header:u.join(", "),noHeader:!u.length,blocks:[dt("nameValue",{name:s,value:o})]})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.getLegendIcon=function(e){var a=e.icon||"roundRect",i=lt(a,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill);return i.setStyle(e.itemStyle),i.style.stroke="none",a.indexOf("empty")>-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},t}(Xe);const UF=$F;function YF(r,t){var e={};return M(r,function(a){a.each(a.mapDimension("value"),function(i,n){var o="ec-"+a.getName(n);e[o]=e[o]||[],isNaN(i)||e[o].push(i)})}),r[0].map(r[0].mapDimension("value"),function(a,i){for(var n="ec-"+r[0].getName(i),o=0,s=1/0,l=-1/0,u=e[n].length,c=0;c<u;c++)s=Math.min(s,e[n][c]),l=Math.max(l,e[n][c]),o+=e[n][c];var h;return t==="min"?h=s:t==="max"?h=l:t==="average"?h=o/u:h=o,u===0?NaN:h})}function ZF(r){var t={};r.eachSeriesByType("map",function(e){var a=e.getHostGeoModel(),i=a?"o"+a.id:"i"+e.getMapType();(t[i]=t[i]||[]).push(e)}),M(t,function(e,a){for(var i=YF(W(e,function(o){return o.getData()}),e[0].get("mapValueCalculation")),n=0;n<e.length;n++)e[n].originalData=e[n].getData();for(var n=0;n<e.length;n++)e[n].seriesGroup=e,e[n].needsDrawMap=n===0&&!e[n].getHostGeoModel(),e[n].setData(i.cloneShallow()),e[n].mainSeries=e[0]})}function XF(r){var t={};r.eachSeriesByType("map",function(e){var a=e.getMapType();if(!(e.getHostGeoModel()||t[a])){var i={};M(e.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&r.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var h=l.getName(c),f=s.getRegion(h);if(!(!f||isNaN(u))){var d=i[h]||0,p=s.dataToPoint(f.getCenter());i[h]=d+1,l.setItemLayout(c,{point:p,offset:d})}})});var n=e.getData();n.each(function(o){var s=n.getName(o),l=n.getItemLayout(o)||{};l.showLabel=!i[s],n.setItemLayout(o,l)}),t[a]=!0}})}var HT=yt,jF=function(r){z(t,r);function t(e){var a=r.call(this)||this;return a.type="view",a.dimensions=["x","y"],a._roamTransformable=new ma,a._rawTransformable=new ma,a.name=e,a}return t.prototype.setBoundingRect=function(e,a,i,n){return this._rect=new ge(e,a,i,n),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(e,a,i,n){this._transformTo(e,a,i,n),this._viewRect=new ge(e,a,i,n)},t.prototype._transformTo=function(e,a,i,n){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new ge(e,a,i,n));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},t.prototype.setCenter=function(e,a){e&&(this._center=[Z(e[0],a.getWidth()),Z(e[1],a.getHeight())],this._updateCenterAndZoom())},t.prototype.setZoom=function(e){e=e||1;var a=this.zoomLimit;a&&(a.max!=null&&(e=Math.min(a.max,e)),a.min!=null&&(e=Math.max(a.min,e))),this._zoom=e,this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var e=this.getBoundingRect(),a=e.x+e.width/2,i=e.y+e.height/2;return[a,i]},t.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},t.prototype.getZoom=function(){return this._zoom||1},t.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},t.prototype._updateCenterAndZoom=function(){var e=this._rawTransformable.getLocalTransform(),a=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),o=this.getZoom();n=yt([],n,e),i=yt([],i,e),a.originX=n[0],a.originY=n[1],a.x=i[0]-n[0],a.y=i[1]-n[1],a.scaleX=a.scaleY=o,this._updateTransform()},t.prototype._updateTransform=function(){var e=this._roamTransformable,a=this._rawTransformable;a.parent=e,e.updateTransform(),a.updateTransform(),kf(this.transform||(this.transform=[]),a.transform||Jt()),this._rawTransform=a.getLocalTransform(),this.invTransform=this.invTransform||[],Yn(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var e=this._rawTransformable,a=this._roamTransformable,i=new ma;return i.transform=a.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},t.prototype.dataToPoint=function(e,a,i){var n=a?this._rawTransform:this.transform;return i=i||[],n?HT(i,e,n):Vt(i,e)},t.prototype.pointToData=function(e){var a=this.invTransform;return a?HT([],e,a):[e[0],e[1]]},t.prototype.convertToPixel=function(e,a,i){var n=$T(a);return n===this?n.dataToPoint(i):null},t.prototype.convertFromPixel=function(e,a,i){var n=$T(a);return n===this?n.pointToData(i):null},t.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},t.dimensions=["x","y"],t}(ma);function $T(r){var t=r.seriesModel;return t?t.coordinateSystem:null}const Il=jF;var qF={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},UT=["lng","lat"],YT=function(r){z(t,r);function t(e,a,i){var n=r.call(this,e)||this;n.dimensions=UT,n.type="geo",n._nameCoordMap=Q(),n.map=a;var o=i.projection,s=Ea.load(a,i.nameMap,i.nameProperty),l=Ea.getGeoResource(a),u=n.resourceType=l?l.type:null,c=n.regions=s.regions,h=qF[l.type];n._regionsMap=s.regionsMap,n.regions=s.regions,process.env.NODE_ENV!=="production"&&o&&(u==="geoSVG"&&(process.env.NODE_ENV!=="production"&&je("Map "+a+" with SVG source can't use projection. Only GeoJSON source supports projection."),o=null),o.project&&o.unproject||(process.env.NODE_ENV!=="production"&&je("project and unproject must be both provided in the projeciton."),o=null)),n.projection=o;var f;if(o)for(var d=0;d<c.length;d++){var p=c[d].getBoundingRect(o);f=f||p.clone(),f.union(p)}else f=s.boundingRect;return n.setBoundingRect(f.x,f.y,f.width,f.height),n.aspectScale=o?1:le(i.aspectScale,h.aspectScale),n._invertLongitute=o?!1:h.invertLongitute,n}return t.prototype._transformTo=function(e,a,i,n){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new ge(e,a,i,n));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},t.prototype.getRegion=function(e){return this._regionsMap.get(e)},t.prototype.getRegionByCoord=function(e){for(var a=this.regions,i=0;i<a.length;i++){var n=a[i];if(n.type==="geoJSON"&&n.contain(e))return a[i]}},t.prototype.addGeoCoord=function(e,a){this._nameCoordMap.set(e,a)},t.prototype.getGeoCoord=function(e){var a=this._regionsMap.get(e);return this._nameCoordMap.get(e)||a&&a.getCenter()},t.prototype.dataToPoint=function(e,a,i){if(X(e)&&(e=this.getGeoCoord(e)),e){var n=this.projection;return n&&(e=n.project(e)),e&&this.projectedToPoint(e,a,i)}},t.prototype.pointToData=function(e){var a=this.projection;return a&&(e=a.unproject(e)),e&&this.pointToProjected(e)},t.prototype.pointToProjected=function(e){return r.prototype.pointToData.call(this,e)},t.prototype.projectedToPoint=function(e,a,i){return r.prototype.dataToPoint.call(this,e,a,i)},t.prototype.convertToPixel=function(e,a,i){var n=ZT(a);return n===this?n.dataToPoint(i):null},t.prototype.convertFromPixel=function(e,a,i){var n=ZT(a);return n===this?n.pointToData(i):null},t}(Il);at(YT,Il);function ZT(r){var t=r.geoModel,e=r.seriesModel;return t?t.coordinateSystem:e?e.coordinateSystem||(e.getReferringComponents("geo",ot).models[0]||{}).coordinateSystem:null}const XT=YT;function jT(r,t){var e=r.get("boundingCoords");if(e!=null){var a=e[0],i=e[1];if(!(isFinite(a[0])&&isFinite(a[1])&&isFinite(i[0])&&isFinite(i[1])))process.env.NODE_ENV!=="production"&&console.error("Invalid boundingCoords");else{var n=this.projection;if(n){var o=a[0],s=a[1],l=i[0],u=i[1];a=[1/0,1/0],i=[-1/0,-1/0];var c=function(S,L,C,T){for(var A=C-S,D=T-L,E=0;E<=100;E++){var I=E/100,P=n.project([S+A*I,L+D*I]);Ga(a,a,P),Wa(i,i,P)}};c(o,s,l,s),c(l,s,l,u),c(l,u,o,u),c(o,u,l,s)}this.setBoundingRect(a[0],a[1],i[0]-a[0],i[1]-a[1])}}var h=this.getBoundingRect(),f=r.get("layoutCenter"),d=r.get("layoutSize"),p=t.getWidth(),v=t.getHeight(),g=h.width/h.height*this.aspectScale,m=!1,y,_;f&&d&&(y=[Z(f[0],p),Z(f[1],v)],_=Z(d,Math.min(p,v)),!isNaN(y[0])&&!isNaN(y[1])&&!isNaN(_)?m=!0:process.env.NODE_ENV!=="production"&&console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."));var w;if(m)w={},g>1?(w.width=_,w.height=_/g):(w.height=_,w.width=_*g),w.y=y[1]-w.height/2,w.x=y[0]-w.width/2;else{var x=r.getBoxLayoutParams();x.aspect=g,w=ct(x,{width:p,height:v})}this.setViewRect(w.x,w.y,w.width,w.height),this.setCenter(r.get("center"),t),this.setZoom(r.get("zoom"))}function KF(r,t){M(t.get("geoCoord"),function(e,a){r.addGeoCoord(a,e)})}var JF=function(){function r(){this.dimensions=UT}return r.prototype.create=function(t,e){var a=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new XT(l+s,l,F({nameMap:o.get("nameMap")},i(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=jT,u.resize(o,e)}),t.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=a[l]}});var n={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();n[s]=n[s]||[],n[s].push(o)}}),M(n,function(o,s){var l=W(o,function(c){return c.get("nameMap")}),u=new XT(s,s,F({nameMap:_f(l)},i(o[0])));u.zoomLimit=it.apply(null,W(o,function(c){return c.get("scaleLimit")})),a.push(u),u.resize=jT,u.resize(o[0],e),M(o,function(c){c.coordinateSystem=u,KF(u,c)})}),a},r.prototype.getFilledRegions=function(t,e,a,i){for(var n=(t||[]).slice(),o=Q(),s=0;s<n.length;s++)o.set(n[s].name,n[s]);var l=Ea.load(e,a,i);return M(l.regions,function(u){var c=u.name,h=o.get(c),f=u.properties&&u.properties.echartsStyle;h||(h={name:c},n.push(h)),f&&de(h,f)}),n},r}(),QF=new JF;const qT=QF;var eG=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a,i){var n=Ea.getGeoResource(e.map);if(n&&n.type==="geoJSON"){var o=e.itemStyle=e.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(e,i),Oi(e,"label",["show"])},t.prototype.optionUpdated=function(){var e=this,a=this.option;a.regions=qT.getFilledRegions(a.regions,a.map,a.nameMap,a.nameProperty);var i={};this._optionModelMap=Wr(a.regions||[],function(n,o){var s=o.name;return s&&(n.set(s,new Ge(o,e,e.ecModel)),o.selected&&(i[s]=!0)),n},Q()),a.selectedMap||(a.selectedMap=i)},t.prototype.getRegionModel=function(e){return this._optionModelMap.get(e)||new Ge(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(e,a){var i=this.getRegionModel(e),n=a==="normal"?i.get(["label","formatter"]):i.get(["emphasis","label","formatter"]),o={name:e};if(te(n))return o.status=a,n(o);if(X(n))return n.replace("{a}",e??"")},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.select=function(e){var a=this.option,i=a.selectedMode;if(i){i!=="multiple"&&(a.selectedMap=null);var n=a.selectedMap||(a.selectedMap={});n[e]=!0}},t.prototype.unSelect=function(e){var a=this.option.selectedMap;a&&(a[e]=!1)},t.prototype.toggleSelected=function(e){this[this.isSelected(e)?"unSelect":"select"](e)},t.prototype.isSelected=function(e){var a=this.option.selectedMap;return!!(a&&a[e])},t.type="geo",t.layoutMode="box",t.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},t}(Se);const tG=eG;function KT(r,t){return r.pointToProjected?r.pointToProjected(t):r.pointToData(t)}function bg(r,t,e,a){var i=r.getZoom(),n=r.getCenter(),o=t.zoom,s=r.projectedToPoint?r.projectedToPoint(n):r.dataToPoint(n);if(t.dx!=null&&t.dy!=null&&(s[0]-=t.dx,s[1]-=t.dy,r.setCenter(KT(r,s),a)),o!=null){if(e){var l=e.min||0,u=e.max||1/0;o=Math.max(Math.min(i*o,u),l)/i}r.scaleX*=o,r.scaleY*=o;var c=(t.originX-r.x)*(o-1),h=(t.originY-r.y)*(o-1);r.x-=c,r.y-=h,r.updateTransform(),r.setCenter(KT(r,s),a),r.setZoom(o*i)}return{center:r.getCenter(),zoom:r.getZoom()}}var rG=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.focusBlurEnabled=!0,e}return t.prototype.init=function(e,a){this._api=a},t.prototype.render=function(e,a,i,n){if(this._model=e,!e.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new WT(i));var o=this._mapDraw;o.draw(e,a,i,this,n),o.group.on("click",this._handleRegionClick,this),o.group.silent=e.get("silent"),this.group.add(o.group),this.updateSelectStatus(e,a,i)},t.prototype._handleRegionClick=function(e){var a;dn(e.target,function(i){return(a=ue(i).eventData)!=null},!0),a&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:a.name})},t.prototype.updateSelectStatus=function(e,a,i){var n=this;this._mapDraw.group.traverse(function(o){var s=ue(o).eventData;if(s)return n._model.isSelected(s.name)?i.enterSelect(o):i.leaveSelect(o),!0})},t.prototype.findHighDownDispatchers=function(e){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(e,this._model)},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},t.type="geo",t}(Ke);const aG=rG;function iG(r,t,e){Ea.registerMap(r,t,e)}function JT(r){r.registerCoordinateSystem("geo",qT),r.registerComponentModel(tG),r.registerComponentView(aG),r.registerImpl("registerMap",iG),r.registerImpl("getMap",function(e){return Ea.getMapForUser(e)});function t(e,a){a.update="geo:updateSelectStatus",r.registerAction(a,function(i,n){var o={},s=[];return n.eachComponent({mainType:"geo",query:i},function(l){l[e](i.name);var u=l.coordinateSystem;M(u.regions,function(h){o[h.name]=l.isSelected(h.name)||!1});var c=[];M(o,function(h,f){o[f]&&c.push(f)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:i.name}})}t("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),t("select",{type:"geoSelect",event:"geoselected"}),t("unSelect",{type:"geoUnSelect",event:"geounselected"}),r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(e,a,i){var n=e.componentType||"series";a.eachComponent({mainType:n,query:e},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=bg(s,e,o.get("scaleLimit"),i);o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),n==="series"&&M(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function nG(r){ye(JT),r.registerChartView(HF),r.registerSeriesModel(UF),r.registerLayout(XF),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,ZF),jw("map",r.registerAction)}function oG(r){var t=r;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e=[t],a,i;a=e.pop();)if(i=a.children,a.isExpand&&i.length)for(var n=i.length,o=n-1;o>=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},e.push(s)}}function sG(r,t){var e=r.isExpand?r.children:[],a=r.parentNode.children,i=r.hierNode.i?a[r.hierNode.i-1]:null;if(e.length){cG(r);var n=(e[0].hierNode.prelim+e[e.length-1].hierNode.prelim)/2;i?(r.hierNode.prelim=i.hierNode.prelim+t(r,i),r.hierNode.modifier=r.hierNode.prelim-n):r.hierNode.prelim=n}else i&&(r.hierNode.prelim=i.hierNode.prelim+t(r,i));r.parentNode.hierNode.defaultAncestor=hG(r,i,r.parentNode.hierNode.defaultAncestor||a[0],t)}function lG(r){var t=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:t},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function QT(r){return arguments.length?r:pG}function Pl(r,t){return r-=Math.PI/2,{x:t*Math.cos(r),y:t*Math.sin(r)}}function uG(r,t){return ct(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function cG(r){for(var t=r.children,e=t.length,a=0,i=0;--e>=0;){var n=t[e];n.hierNode.prelim+=a,n.hierNode.modifier+=a,i+=n.hierNode.change,a+=n.hierNode.shift+i}}function hG(r,t,e,a){if(t){for(var i=r,n=r,o=n.parentNode.children[0],s=t,l=i.hierNode.modifier,u=n.hierNode.modifier,c=o.hierNode.modifier,h=s.hierNode.modifier;s=wg(s),n=xg(n),s&&n;){i=wg(i),o=xg(o),i.hierNode.ancestor=r;var f=s.hierNode.prelim+h-n.hierNode.prelim-u+a(s,n);f>0&&(dG(fG(s,r,e),r,f),u+=f,l+=f),h+=s.hierNode.modifier,u+=n.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!wg(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=h-l),n&&!xg(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-c,e=r)}return e}function wg(r){var t=r.children;return t.length&&r.isExpand?t[t.length-1]:r.hierNode.thread}function xg(r){var t=r.children;return t.length&&r.isExpand?t[0]:r.hierNode.thread}function fG(r,t,e){return r.hierNode.ancestor.parentNode===t.parentNode?r.hierNode.ancestor:e}function dG(r,t,e){var a=e/(t.hierNode.i-r.hierNode.i);t.hierNode.change-=a,t.hierNode.shift+=e,t.hierNode.modifier+=e,t.hierNode.prelim+=e,r.hierNode.change+=a}function pG(r,t){return r.parentNode===t.parentNode?1:2}var vG=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),gG=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new vG},t.prototype.buildPath=function(e,a){var i=a.childPoints,n=i.length,o=a.parentPoint,s=i[0],l=i[n-1];if(n===1){e.moveTo(o[0],o[1]),e.lineTo(s[0],s[1]);return}var u=a.orient,c=u==="TB"||u==="BT"?0:1,h=1-c,f=Z(a.forkPosition,1),d=[];d[c]=o[c],d[h]=o[h]+(l[h]-o[h])*f,e.moveTo(o[0],o[1]),e.lineTo(d[0],d[1]),e.moveTo(s[0],s[1]),d[c]=s[c],e.lineTo(d[0],d[1]),d[c]=l[c],e.lineTo(d[0],d[1]),e.lineTo(l[0],l[1]);for(var p=1;p<n-1;p++){var v=i[p];e.moveTo(v[0],v[1]),d[c]=v[c],e.lineTo(d[0],d[1])}},t}(_e),mG=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._mainGroup=new oe,e}return t.prototype.init=function(e,a){this._controller=new Ml(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,a,i){var n=e.getData(),o=e.layoutInfo,s=this._mainGroup,l=e.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(e,i),this._updateController(e,a,i);var u=this._data;n.diff(u).add(function(c){eC(n,c)&&tC(n,c,null,s,e)}).update(function(c,h){var f=u.getItemGraphicEl(h);if(!eC(n,c)){f&&iC(u,h,f,s,e);return}tC(n,c,f,s,e)}).remove(function(c){var h=u.getItemGraphicEl(c);h&&iC(u,c,h,s,e)}).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),e.get("expandAndCollapse")===!0&&n.eachItemGraphicEl(function(c,h){c.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:h})})}),this._data=n},t.prototype._updateViewCoordSys=function(e,a){var i=e.getData(),n=[];i.each(function(h){var f=i.getItemLayout(h);f&&!isNaN(f.x)&&!isNaN(f.y)&&n.push([+f.x,+f.y])});var o=[],s=[];Uu(n,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var c=e.coordinateSystem=new Il;c.zoomLimit=e.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(e.get("center"),a),c.setZoom(e.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=o,this._max=s},t.prototype._updateController=function(e,a,i){var n=this,o=this._controller,s=this._controllerHost,l=this.group;o.setPointerChecker(function(u,c,h){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(c,h)&&!_h(u,i,e)}),o.enable(e.get("roam")),s.zoomLimit=e.get("scaleLimit"),s.zoom=e.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){pg(s,u.dx,u.dy),i.dispatchAction({seriesId:e.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){vg(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),n._updateNodeAndLinkScale(e),i.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(e){var a=e.getData(),i=this._getNodeGlobalScale(e);a.eachItemGraphicEl(function(n,o){n.setSymbolScale(i)})},t.prototype._getNodeGlobalScale=function(e){var a=e.coordinateSystem;if(a.type!=="view")return 1;var i=this._nodeScaleRatio,n=a.scaleX||1,o=a.getZoom(),s=(o-1)*i+1;return s/n},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type="tree",t}(We);function eC(r,t){var e=r.getItemLayout(t);return e&&!isNaN(e.x)&&!isNaN(e.y)}function tC(r,t,e,a,i){var n=!e,o=r.tree.getNodeByDataIndex(t),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:"#fff",c=r.tree.root,h=o.parentNode===c?o:o.parentNode||o,f=r.getItemGraphicEl(h.dataIndex),d=h.getLayout(),p=f?{x:f.__oldX,y:f.__oldY,rawX:f.__radialOldRawX,rawY:f.__radialOldRawY}:d,v=o.getLayout();n?(e=new wl(r,t,null,{symbolInnerColor:u,useNameLabel:!0}),e.x=p.x,e.y=p.y):e.updateData(r,t,null,{symbolInnerColor:u,useNameLabel:!0}),e.__radialOldRawX=e.__radialRawX,e.__radialOldRawY=e.__radialRawY,e.__radialRawX=v.rawX,e.__radialRawY=v.rawY,a.add(e),r.setItemGraphicEl(t,e),e.__oldX=e.x,e.__oldY=e.y,Me(e,{x:v.x,y:v.y},i);var g=e.getSymbolPath();if(i.get("layout")==="radial"){var m=c.children[0],y=m.getLayout(),_=m.children.length,w=void 0,x=void 0;if(v.x===y.x&&o.isExpand===!0&&m.children.length){var S={x:(m.children[0].getLayout().x+m.children[_-1].getLayout().x)/2,y:(m.children[0].getLayout().y+m.children[_-1].getLayout().y)/2};w=Math.atan2(S.y-y.y,S.x-y.x),w<0&&(w=Math.PI*2+w),x=S.x<y.x,x&&(w=w-Math.PI)}else w=Math.atan2(v.y-y.y,v.x-y.x),w<0&&(w=Math.PI*2+w),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(x=v.x<y.x,x&&(w=w-Math.PI)):(x=v.x>y.x,x||(w=w-Math.PI));var L=x?"left":"right",C=s.getModel("label"),T=C.get("rotate"),A=T*(Math.PI/180),D=g.getTextContent();D&&(g.setTextConfig({position:C.get("position")||L,rotation:T==null?-w:A,origin:"center"}),D.setStyle("verticalAlign","middle"))}var E=s.get(["emphasis","focus"]),I=E==="relative"?ss(o.getAncestorsIndices(),o.getDescendantIndices()):E==="ancestor"?o.getAncestorsIndices():E==="descendant"?o.getDescendantIndices():null;I&&(ue(e).focus=I),yG(i,o,c,e,p,d,v,a),e.__edge&&(e.onHoverStateChange=function(P){if(P!=="blur"){var k=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);k&&k.hoverState===Is||Ku(e.__edge,P)}})}function yG(r,t,e,a,i,n,o,s){var l=t.getModel(),u=r.get("edgeShape"),c=r.get("layout"),h=r.getOrient(),f=r.get(["lineStyle","curveness"]),d=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),v=a.__edge;if(u==="curve")t.parentNode&&t.parentNode!==e&&(v||(v=a.__edge=new rc({shape:Sg(c,h,f,i,i)})),Me(v,{shape:Sg(c,h,f,n,o)},r));else if(u==="polyline"){if(c==="orthogonal"){if(t!==e&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,m=[],y=0;y<g.length;y++){var _=g[y].getLayout();m.push([_.x,_.y])}v||(v=a.__edge=new gG({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:h,forkPosition:d}})),Me(v,{shape:{parentPoint:[o.x,o.y],childPoints:m}},r)}}else if(process.env.NODE_ENV!=="production")throw new Error("The polyline edgeShape can only be used in orthogonal layout")}v&&!(u==="polyline"&&!t.isExpand)&&(v.useStyle(ie({strokeNoScale:!0,fill:null},p)),wt(v,l,"lineStyle"),qi(v),s.add(v))}function rC(r,t,e,a,i){var n=t.tree.root,o=aC(n,r),s=o.source,l=o.sourceLayout,u=t.getItemGraphicEl(r.dataIndex);if(u){var c=t.getItemGraphicEl(s.dataIndex),h=c.__edge,f=u.__edge||(s.isExpand===!1||s.children.length===1?h:void 0),d=a.get("edgeShape"),p=a.get("layout"),v=a.get("orient"),g=a.get(["lineStyle","curveness"]);f&&(d==="curve"?ei(f,{shape:Sg(p,v,g,l,l),style:{opacity:0}},a,{cb:function(){e.remove(f)},removeOpt:i}):d==="polyline"&&a.get("layout")==="orthogonal"&&ei(f,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},a,{cb:function(){e.remove(f)},removeOpt:i}))}}function aC(r,t){for(var e=t.parentNode===r?t:t.parentNode||t,a;a=e.getLayout(),a==null;)e=e.parentNode===r?e:e.parentNode||e;return{source:e,sourceLayout:a}}function iC(r,t,e,a,i){var n=r.tree.getNodeByDataIndex(t),o=r.tree.root,s=aC(o,n).sourceLayout,l={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};ei(e,{x:s.x+1,y:s.y+1},i,{cb:function(){a.remove(e),r.setItemGraphicEl(t,null)},removeOpt:l}),e.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:l}),n.children.forEach(function(u){rC(u,r,a,i,l)}),rC(n,r,a,i,l)}function Sg(r,t,e,a,i){var n,o,s,l,u,c,h,f;if(r==="radial"){u=a.rawX,h=a.rawY,c=i.rawX,f=i.rawY;var d=Pl(u,h),p=Pl(u,h+(f-h)*e),v=Pl(c,f+(h-f)*e),g=Pl(c,f);return{x1:d.x||0,y1:d.y||0,x2:g.x||0,y2:g.y||0,cpx1:p.x||0,cpy1:p.y||0,cpx2:v.x||0,cpy2:v.y||0}}else u=a.x,h=a.y,c=i.x,f=i.y,(t==="LR"||t==="RL")&&(n=u+(c-u)*e,o=h,s=c+(u-c)*e,l=f),(t==="TB"||t==="BT")&&(n=u,o=h+(f-h)*e,s=c,l=f+(h-f)*e);return{x1:u,y1:h,x2:c,y2:f,cpx1:n,cpy1:o,cpx2:s,cpy2:l}}const _G=mG;var xr=xe();function nC(r){var t=r.mainData,e=r.datas;e||(e={main:t},r.datasAttr={main:"data"}),r.datas=r.mainData=null,oC(t,e,r),M(e,function(a){M(t.TRANSFERABLE_METHODS,function(i){a.wrapMethod(i,fe(bG,r))})}),t.wrapMethod("cloneShallow",fe(xG,r)),M(t.CHANGABLE_METHODS,function(a){t.wrapMethod(a,fe(wG,r))}),ae(e[t.dataType]===t)}function bG(r,t){if(TG(this)){var e=F({},xr(this).datas);e[this.dataType]=t,oC(t,e,r)}else Lg(t,this.dataType,xr(this).mainData,r);return t}function wG(r,t){return r.struct&&r.struct.update(),t}function xG(r,t){return M(xr(t).datas,function(e,a){e!==t&&Lg(e.cloneShallow(),a,t,r)}),t}function SG(r){var t=xr(this).mainData;return r==null||t==null?t:xr(t).datas[r]}function LG(){var r=xr(this).mainData;return r==null?[{data:r}]:W(we(xr(r).datas),function(t){return{type:t,data:xr(r).datas[t]}})}function TG(r){return xr(r).mainData===r}function oC(r,t,e){xr(r).datas={},M(t,function(a,i){Lg(a,i,r,e)})}function Lg(r,t,e,a){xr(e).datas[t]=r,xr(r).mainData=e,r.dataType=t,a.struct&&(r[a.structAttr]=a.struct,a.struct[a.datasAttr[t]]=r),r.getLinkedData=SG,r.getLinkedDataAll=LG}var CG=function(){function r(t,e){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=e}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(t,e,a){te(t)&&(a=e,e=t,t=null),t=t||{},X(t)&&(t={order:t});var i=t.order||"preorder",n=this[t.attr||"children"],o;i==="preorder"&&(o=e.call(a,this));for(var s=0;!o&&s<n.length;s++)n[s].eachNode(t,e,a);i==="postorder"&&e.call(a,this)},r.prototype.updateDepthAndHeight=function(t){var e=0;this.depth=t;for(var a=0;a<this.children.length;a++){var i=this.children[a];i.updateDepthAndHeight(t+1),i.height>e&&(e=i.height)}this.height=e+1},r.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,a=this.children,i=a.length;e<i;e++){var n=a[e].getNodeById(t);if(n)return n}},r.prototype.contains=function(t){if(t===this)return!0;for(var e=0,a=this.children,i=a.length;e<i;e++){var n=a[e].contains(t);if(n)return n}},r.prototype.getAncestors=function(t){for(var e=[],a=t?this:this.parentNode;a;)e.push(a),a=a.parentNode;return e.reverse(),e},r.prototype.getAncestorsIndices=function(){for(var t=[],e=this;e;)t.push(e.dataIndex),e=e.parentNode;return t.reverse(),t},r.prototype.getDescendantIndices=function(){var t=[];return this.eachNode(function(e){t.push(e.dataIndex)}),t},r.prototype.getValue=function(t){var e=this.hostTree.data;return e.getStore().get(e.getDimensionIndex(t||"value"),this.dataIndex)},r.prototype.setLayout=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostTree,a=e.data.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},r.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e<t.length;++e)if(t[e]===this)return e;return-1}return-1},r.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},r.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},r}(),DG=function(){function r(t){this.type="tree",this._nodes=[],this.hostModel=t}return r.prototype.eachNode=function(t,e,a){this.root.eachNode(t,e,a)},r.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},r.prototype.getNodeById=function(t){return this.root.getNodeById(t)},r.prototype.update=function(){for(var t=this.data,e=this._nodes,a=0,i=e.length;a<i;a++)e[a].dataIndex=-1;for(var a=0,i=t.count();a<i;a++)e[t.getRawIndex(a)].dataIndex=a},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(t,e,a){var i=new r(e),n=[],o=1;s(t);function s(c,h){var f=c.value;o=Math.max(o,G(f)?f.length:1),n.push(c);var d=new CG(ut(c.name,""),i);h?AG(d,h):i.root=d,i._nodes.push(d);var p=c.children;if(p)for(var v=0;v<p.length;v++)s(p[v],d)}i.root.updateDepthAndHeight(0);var l=fl(n,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Ft(l,e);return u.initData(n),a&&a(u),nC({mainData:u,struct:i,structAttr:"tree"}),i.update(),i},r}();function AG(r,t){var e=t.children;r.parentNode!==t&&(e.push(r),r.parentNode=t)}const Tg=DG;function kl(r,t,e){if(r&&me(t,r.type)>=0){var a=e.getData().tree.root,i=r.targetNode;if(X(i)&&(i=a.getNodeById(i)),i&&a.contains(i))return{node:i};var n=r.targetNodeId;if(n!=null&&(i=a.getNodeById(n)))return{node:i}}}function sC(r){for(var t=[];r;)r=r.parentNode,r&&t.push(r);return t.reverse()}function Cg(r,t){var e=sC(r);return me(e,t)>=0}function Lh(r,t){for(var e=[];r;){var a=r.dataIndex;e.push({name:r.name,dataIndex:a,value:t.getRawValue(a)}),r=r.parentNode}return e.reverse(),e}var MG=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e){var a={name:e.name,children:e.data},i=e.leaves||{},n=new Ge(i,this,this.ecModel),o=Tg.createTree(a,this,s);function s(h){h.wrapMethod("getItemModel",function(f,d){var p=o.getNodeByDataIndex(d);return p&&p.children.length&&p.isExpand||(f.parentModel=n),f})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=e.expandAndCollapse,c=u&&e.initialTreeDepth>=0?e.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var f=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=f&&f.collapsed!=null?!f.collapsed:h.depth<=c}),o.data},t.prototype.getOrient=function(){var e=this.get("orient");return e==="horizontal"?e="LR":e==="vertical"&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,a,i){for(var n=this.getData().tree,o=n.root.children[0],s=n.getNodeByDataIndex(e),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return dt("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=Lh(i,this),a.collapsed=!i.isExpand,a},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(Xe);const EG=MG;function IG(r,t,e){for(var a=[r],i=[],n;n=a.pop();)if(i.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s<o.length;s++)a.push(o[s])}for(;n=i.pop();)t(n,e)}function Nl(r,t){for(var e=[r],a;a=e.pop();)if(t(a),a.isExpand){var i=a.children;if(i.length)for(var n=i.length-1;n>=0;n--)e.push(i[n])}}function PG(r,t){r.eachSeriesByType("tree",function(e){kG(e,t)})}function kG(r,t){var e=uG(r,t);r.layoutInfo=e;var a=r.get("layout"),i=0,n=0,o=null;a==="radial"?(i=2*Math.PI,n=Math.min(e.height,e.width)/2,o=QT(function(_,w){return(_.parentNode===w.parentNode?1:2)/_.depth})):(i=e.width,n=e.height,o=QT());var s=r.getData().tree.root,l=s.children[0];if(l){oG(s),IG(l,sG,o),s.hierNode.modifier=-l.hierNode.prelim,Nl(l,lG);var u=l,c=l,h=l;Nl(l,function(_){var w=_.getLayout().x;w<u.getLayout().x&&(u=_),w>c.getLayout().x&&(c=_),_.depth>h.depth&&(h=_)});var f=u===c?1:o(u,c)/2,d=f-u.getLayout().x,p=0,v=0,g=0,m=0;if(a==="radial")p=i/(c.getLayout().x+f+d),v=n/(h.depth-1||1),Nl(l,function(_){g=(_.getLayout().x+d)*p,m=(_.depth-1)*v;var w=Pl(g,m);_.setLayout({x:w.x,y:w.y,rawX:g,rawY:m},!0)});else{var y=r.getOrient();y==="RL"||y==="LR"?(v=n/(c.getLayout().x+f+d),p=i/(h.depth-1||1),Nl(l,function(_){m=(_.getLayout().x+d)*v,g=y==="LR"?(_.depth-1)*p:i-(_.depth-1)*p,_.setLayout({x:g,y:m},!0)})):(y==="TB"||y==="BT")&&(p=i/(c.getLayout().x+f+d),v=n/(h.depth-1||1),Nl(l,function(_){g=(_.getLayout().x+d)*p,m=y==="TB"?(_.depth-1)*v:n-(_.depth-1)*v,_.setLayout({x:g,y:m},!0)}))}}}function NG(r){r.eachSeriesByType("tree",function(t){var e=t.getData(),a=e.tree;a.eachNode(function(i){var n=i.getModel(),o=n.getModel("itemStyle").getItemStyle(),s=e.ensureUniqueItemVisual(i.dataIndex,"style");F(s,o)})})}function RG(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(a){var i=t.dataIndex,n=a.getData().tree,o=n.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e,a){e.eachComponent({mainType:"series",subType:"tree",query:t},function(i){var n=i.coordinateSystem,o=bg(n,t,void 0,a);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}function VG(r){r.registerChartView(_G),r.registerSeriesModel(EG),r.registerLayout(PG),r.registerVisual(NG),RG(r)}var lC=["treemapZoomToNode","treemapRender","treemapMove"];function OG(r){for(var t=0;t<lC.length;t++)r.registerAction({type:lC[t],update:"updateView"},et);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(e,a){a.eachComponent({mainType:"series",subType:"treemap",query:e},i);function i(n,o){var s=["treemapZoomToNode","treemapRootToNode"],l=kl(e,s,n);if(l){var u=n.getViewRoot();u&&(e.direction=Cg(u,l.node)?"rollUp":"drillDown"),n.resetViewRoot(l.node)}}})}function uC(r){var t=r.getData(),e=t.tree,a={};e.eachNode(function(i){for(var n=i;n&&n.depth>1;)n=n.parentNode;var o=Ep(r.ecModel,n.name||n.dataIndex+"",a);i.setVisual("decal",o)})}var zG=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventUsingHoverLayer=!0,e}return t.prototype.getInitialData=function(e,a){var i={name:e.name,children:e.data};cC(i);var n=e.levels||[],o=this.designatedVisualItemStyle={},s=new Ge({itemStyle:o},this,a);n=e.levels=BG(n,a);var l=W(n||[],function(h){return new Ge(h,s,a)},this),u=Tg.createTree(i,this,c);function c(h){h.wrapMethod("getItemModel",function(f,d){var p=u.getNodeByDataIndex(d),v=p?l[p.depth]:null;return f.parentModel=v||s,f})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,a,i){var n=this.getData(),o=this.getRawValue(e),s=n.getName(e);return dt("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=Lh(i,this),a.treePathInfo=a.treeAncestors,a},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},F(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var a=this._idIndexMap;a||(a=this._idIndexMap=Q(),this._idIndexMapCount=0);var i=a.get(e);return i==null&&a.set(e,i=this._idIndexMapCount++),i},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){uC(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(Xe);function cC(r){var t=0;M(r.children,function(a){cC(a);var i=a.value;G(i)&&(i=i[0]),t+=i});var e=r.value;G(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),G(r.value)?r.value[0]=e:r.value=e}function BG(r,t){var e=Ve(t.get("color")),a=Ve(t.get(["aria","decal","decals"]));if(e){r=r||[];var i,n;M(r,function(s){var l=new Ge(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(n=!0)});var o=r[0]||(r[0]={});return i||(o.color=e.slice()),!n&&a&&(o.decal=a.slice()),r}}const FG=zG;var GG=8,hC=8,Dg=5,WG=function(){function r(t){this.group=new oe,t.add(this.group)}return r.prototype.render=function(t,e,a,i){var n=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!n.get("show")||!a)){var s=n.getModel("itemStyle"),l=n.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),h={pos:{left:n.get("left"),right:n.get("right"),top:n.get("top"),bottom:n.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:n.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(a,h,u),this._renderContent(t,h,s,l,u,c,i),Sc(o,h.pos,h.box)}},r.prototype._prepare=function(t,e,a){for(var i=t;i;i=i.parentNode){var n=ut(i.getModel().get("name"),""),o=a.getTextRect(n),s=Math.max(o.width+GG*2,e.emptyItemWidth);e.totalWidth+=s+hC,e.renderList.push({node:i,text:n,width:s})}},r.prototype._renderContent=function(t,e,a,i,n,o,s){for(var l=0,u=e.emptyItemWidth,c=t.get(["breadcrumb","height"]),h=Z5(e.pos,e.box),f=e.totalWidth,d=e.renderList,p=i.getModel("itemStyle").getItemStyle(),v=d.length-1;v>=0;v--){var g=d[v],m=g.node,y=g.width,_=g.text;f>h.width&&(f-=y-u,y=u,_=null);var w=new Zt({shape:{points:HG(l,0,y,c,v===d.length-1,v===0)},style:ie(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ae({style:Fe(n,{text:_})}),textConfig:{position:"inside"},z2:ao*1e4,onclick:fe(s,m)});w.disableLabelAnimation=!0,w.getTextContent().ensureState("emphasis").style=Fe(o,{text:_}),w.ensureState("emphasis").style=p,qe(w,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(w),$G(w,t,m),l+=y+hC}},r.prototype.remove=function(){this.group.removeAll()},r}();function HG(r,t,e,a,i,n){var o=[[i?r:r-Dg,t],[r+e,t],[r+e,t+a],[i?r:r-Dg,t+a]];return!n&&o.splice(2,0,[r+e+Dg,t+a/2]),!i&&o.push([r,t+a/2]),o}function $G(r,t,e){ue(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:e&&e.dataIndex,name:e&&e.name},treePathInfo:e&&Lh(e,t)}}const UG=WG;var YG=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(t,e,a,i,n){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:a,delay:i,easing:n}),!0)},r.prototype.finished=function(t){return this._finishedCallback=t,this},r.prototype.start=function(){for(var t=this,e=this._storage.length,a=function(){e--,e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,n=this._storage.length;i<n;i++){var o=this._storage[i];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:a,aborted:a})}return this},r}();function ZG(){return new YG}var Ag=oe,fC=Te,dC=3,pC="label",vC="upperLabel",XG=ao*10,jG=ao*2,qG=ao*3,Pn=Fi([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),gC=function(r){var t=Pn(r);return t.stroke=t.fill=t.lineWidth=null,t},Th=xe(),KG=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._state="ready",e._storage=Rl(),e}return t.prototype.render=function(e,a,i,n){var o=a.findComponents({mainType:"series",subType:"treemap",query:n});if(!(me(o,e)<0)){this.seriesModel=e,this.api=i,this.ecModel=a;var s=["treemapZoomToNode","treemapRootToNode"],l=kl(n,s,e),u=n&&n.type,c=e.layoutInfo,h=!this._oldTree,f=this._storage,d=u==="treemapRootToNode"&&l&&f?{rootNodeGroup:f.nodeGroup[l.node.getRawIndex()],direction:n.direction}:null,p=this._giveContainerGroup(c),v=e.get("animation"),g=this._doRender(p,e,d);v&&!h&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(p,g,e,d):g.renderFinally(),this._resetController(i),this._renderBreadcrumb(e,i,l)}},t.prototype._giveContainerGroup=function(e){var a=this._containerGroup;return a||(a=this._containerGroup=new Ag,this._initEvents(a),this.group.add(a)),a.x=e.x,a.y=e.y,a},t.prototype._doRender=function(e,a,i){var n=a.getData().tree,o=this._oldTree,s=Rl(),l=Rl(),u=this._storage,c=[];function h(y,_,w,x){return JG(a,l,u,i,s,c,y,_,w,x)}v(n.root?[n.root]:[],o&&o.root?[o.root]:[],e,n===o||!o,0);var f=g(u);if(this._oldTree=n,this._storage=l,this._controllerHost){var d=this.seriesModel.layoutInfo,p=n.root.getLayout();p.width===d.width&&p.height===d.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:f,renderFinally:m};function v(y,_,w,x,S){x?(_=y,M(y,function(T,A){!T.isRemoved()&&C(A,A)})):new Ca(_,y,L,L).add(C).update(C).remove(fe(C,null)).execute();function L(T){return T.getId()}function C(T,A){var D=T!=null?y[T]:null,E=A!=null?_[A]:null,I=h(D,E,w,S);I&&v(D&&D.viewChildren||[],E&&E.viewChildren||[],I,x,S+1)}}function g(y){var _=Rl();return y&&M(y,function(w,x){var S=_[x];M(w,function(L){L&&(S.push(L),Th(L).willDelete=!0)})}),_}function m(){M(f,function(y){M(y,function(_){_.parent&&_.parent.remove(_)})}),M(c,function(y){y.invisible=!0,y.dirty()})}},t.prototype._doAnimation=function(e,a,i,n){var o=i.get("animationDurationUpdate"),s=i.get("animationEasing"),l=(te(o)?0:o)||0,u=(te(s)?null:s)||"cubicOut",c=ZG();M(a.willDeleteEls,function(h,f){M(h,function(d,p){if(!d.invisible){var v=d.parent,g,m=Th(v);if(n&&n.direction==="drillDown")g=v===n.rootNodeGroup?{shape:{x:0,y:0,width:m.nodeWidth,height:m.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var y=0,_=0;m.willDelete||(y=m.nodeWidth/2,_=m.nodeHeight/2),g=f==="nodeGroup"?{x:y,y:_,style:{opacity:0}}:{shape:{x:y,y:_,width:0,height:0},style:{opacity:0}}}g&&c.add(d,g,l,0,u)}})}),M(this._storage,function(h,f){M(h,function(d,p){var v=a.lastsForAnimation[f][p],g={};v&&(d instanceof oe?v.oldX!=null&&(g.x=d.x,g.y=d.y,d.x=v.oldX,d.y=v.oldY):(v.oldShape&&(g.shape=F({},d.shape),d.setShape(v.oldShape)),v.fadein?(d.setStyle("opacity",0),g.style={opacity:1}):d.style.opacity!==1&&(g.style={opacity:1})),c.add(d,g,l,0,u))})},this),this._state="animating",c.finished(j(function(){this._state="ready",a.renderFinally()},this)).start()},t.prototype._resetController=function(e){var a=this._controller,i=this._controllerHost;i||(this._controllerHost={target:this.group},i=this._controllerHost),a||(a=this._controller=new Ml(e.getZr()),a.enable(this.seriesModel.get("roam")),i.zoomLimit=this.seriesModel.get("scaleLimit"),i.zoom=this.seriesModel.get("zoom"),a.on("pan",j(this._onPan,this)),a.on("zoom",j(this._onZoom,this)));var n=new ge(0,0,e.getWidth(),e.getHeight());a.setPointerChecker(function(o,s,l){return n.contain(s,l)})},t.prototype._clearController=function(){var e=this._controller;this._controllerHost=null,e&&(e.dispose(),e=null)},t.prototype._onPan=function(e){if(this._state!=="animating"&&(Math.abs(e.dx)>dC||Math.abs(e.dy)>dC)){var a=this.seriesModel.getData().tree.root;if(!a)return;var i=a.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+e.dx,y:i.y+e.dy,width:i.width,height:i.height}})}},t.prototype._onZoom=function(e){var a=e.originX,i=e.originY,n=e.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new ge(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var h=c.zoom=c.zoom||1;if(h*=n,u){var f=u.min||0,d=u.max||1/0;h=Math.max(Math.min(d,h),f)}var p=h/c.zoom;c.zoom=h;var v=this.seriesModel.layoutInfo;a-=v.x,i-=v.y;var g=Jt();Hr(g,g,[-a,-i]),Nf(g,g,[p,p]),Hr(g,g,[a,i]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},t.prototype._initEvents=function(e){var a=this;e.on("click",function(i){if(a._state==="ready"){var n=a.seriesModel.get("nodeClick",!0);if(n){var o=a.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(n==="zoomToNode")a._zoomToNode(o);else if(n==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&wc(u,c)}}}}},this)},t.prototype._renderBreadcrumb=function(e,a,i){var n=this;i||(i=e.get("leafDepth",!0)!=null?{node:e.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),i||(i={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new UG(this.group))).render(e,a,i.node,function(o){n._state!=="animating"&&(Cg(e.getViewRoot(),o)?n._rootToNode({node:o}):n._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Rl(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,a){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(e,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},t.type="treemap",t}(We);function Rl(){return{nodeGroup:[],background:[],content:[]}}function JG(r,t,e,a,i,n,o,s,l,u){if(!o)return;var c=o.getLayout(),h=r.getData(),f=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var d=c.width,p=c.height,v=c.borderWidth,g=c.invisible,m=o.getRawIndex(),y=s&&s.getRawIndex(),_=o.viewChildren,w=c.upperHeight,x=_&&_.length,S=f.getModel("itemStyle"),L=f.getModel(["emphasis","itemStyle"]),C=f.getModel(["blur","itemStyle"]),T=f.getModel(["select","itemStyle"]),A=S.get("borderRadius")||0,D=q("nodeGroup",Ag);if(!D)return;if(l.add(D),D.x=c.x||0,D.y=c.y||0,D.markRedraw(),Th(D).nodeWidth=d,Th(D).nodeHeight=p,c.isAboveViewRoot)return D;var E=q("background",fC,u,jG);E&&B(D,E,x&&c.upperLabelHeight);var I=f.getModel("emphasis"),P=I.get("focus"),k=I.get("blurScope"),N=I.get("disabled"),O=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(x)Ja(D)&&Ji(D,!1),E&&(Ji(E,!N),h.setItemGraphicEl(o.dataIndex,E),Jd(E,O,k));else{var R=q("content",fC,u,qG);R&&H(D,R),E.disableMorphing=!0,E&&Ja(E)&&Ji(E,!1),Ji(D,!N),h.setItemGraphicEl(o.dataIndex,D);var V=f.getShallow("cursor");V&&R.attr("cursor",V),Jd(D,O,k)}return D;function B(he,ee,pe){var J=ue(ee);if(J.dataIndex=o.dataIndex,J.seriesIndex=r.seriesIndex,ee.setShape({x:0,y:0,width:d,height:p,r:A}),g)Y(ee);else{ee.invisible=!1;var se=o.getVisual("style"),Oe=se.stroke,Ee=gC(S);Ee.fill=Oe;var Ne=Pn(L);Ne.fill=L.get("borderColor");var $e=Pn(C);$e.fill=C.get("borderColor");var rt=Pn(T);if(rt.fill=T.get("borderColor"),pe){var Nt=d-2*v;$(ee,Oe,se.opacity,{x:v,y:0,width:Nt,height:w})}else ee.removeTextContent();ee.setStyle(Ee),ee.ensureState("emphasis").style=Ne,ee.ensureState("blur").style=$e,ee.ensureState("select").style=rt,qi(ee)}he.add(ee)}function H(he,ee){var pe=ue(ee);pe.dataIndex=o.dataIndex,pe.seriesIndex=r.seriesIndex;var J=Math.max(d-2*v,0),se=Math.max(p-2*v,0);if(ee.culling=!0,ee.setShape({x:v,y:v,width:J,height:se,r:A}),g)Y(ee);else{ee.invisible=!1;var Oe=o.getVisual("style"),Ee=Oe.fill,Ne=gC(S);Ne.fill=Ee,Ne.decal=Oe.decal;var $e=Pn(L),rt=Pn(C),Nt=Pn(T);$(ee,Ee,Oe.opacity,null),ee.setStyle(Ne),ee.ensureState("emphasis").style=$e,ee.ensureState("blur").style=rt,ee.ensureState("select").style=Nt,qi(ee)}he.add(ee)}function Y(he){!he.invisible&&n.push(he)}function $(he,ee,pe,J){var se=f.getModel(J?vC:pC),Oe=ut(f.get("name"),null),Ee=se.getShallow("show");xt(he,ft(f,J?vC:pC),{defaultText:Ee?Oe:null,inheritColor:ee,defaultOpacity:pe,labelFetcher:r,labelDataIndex:o.dataIndex});var Ne=he.getTextContent();if(Ne){var $e=Ne.style,rt=wf($e.padding||0);J&&(he.setTextConfig({layoutRect:J}),Ne.disableLabelLayout=!0),Ne.beforeUpdate=function(){var Tt=Math.max((J?J.width:he.shape.width)-rt[1]-rt[3],0),ca=Math.max((J?J.height:he.shape.height)-rt[0]-rt[2],0);($e.width!==Tt||$e.height!==ca)&&Ne.setStyle({width:Tt,height:ca})},$e.truncateMinChar=2,$e.lineOverflow="truncate",U($e,J,c);var Nt=Ne.getState("emphasis");U(Nt?Nt.style:null,J,c)}}function U(he,ee,pe){var J=he?he.text:null;if(!ee&&pe.isLeafRoot&&J!=null){var se=r.get("drillDownIcon",!0);he.text=se?se+" "+J:J}}function q(he,ee,pe,J){var se=y!=null&&e[he][y],Oe=i[he];return se?(e[he][y]=null,Ce(Oe,se)):g||(se=new ee,se instanceof hr&&(se.z2=QG(pe,J)),ce(Oe,se)),t[he][m]=se}function Ce(he,ee){var pe=he[m]={};ee instanceof Ag?(pe.oldX=ee.x,pe.oldY=ee.y):pe.oldShape=F({},ee.shape)}function ce(he,ee){var pe=he[m]={},J=o.parentNode,se=ee instanceof oe;if(J&&(!a||a.direction==="drillDown")){var Oe=0,Ee=0,Ne=i.background[J.getRawIndex()];!a&&Ne&&Ne.oldShape&&(Oe=Ne.oldShape.width,Ee=Ne.oldShape.height),se?(pe.oldX=0,pe.oldY=Ee):pe.oldShape={x:Oe,y:Ee,width:0,height:0}}pe.fadein=!se}}function QG(r,t){return r*XG+t}const eW=KG;var Vl=M,tW=re,Ch=-1,Mg=function(){function r(t){var e=t.mappingMethod,a=t.type,i=this.option=ne(t);this.type=a,this.mappingMethod=e,this._normalizeData=iW[e];var n=r.visualHandlers[a];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[e],e==="piecewise"?(Eg(i),rW(i)):e==="category"?i.categories?aW(i):Eg(i,!0):(ae(e!=="linear"||i.dataExtent),Eg(i))}return r.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},r.prototype.getNormalizer=function(){return j(this._normalizeData,this)},r.listVisualTypes=function(){return we(r.visualHandlers)},r.isValidType=function(t){return r.visualHandlers.hasOwnProperty(t)},r.eachVisual=function(t,e,a){re(t)?M(t,e,a):e.call(a,t)},r.mapVisual=function(t,e,a){var i,n=G(t)?[]:re(t)?{}:(i=!0,null);return r.eachVisual(t,function(o,s){var l=e.call(a,o,s);i?n=l:n[s]=l}),n},r.retrieveVisuals=function(t){var e={},a;return t&&Vl(r.visualHandlers,function(i,n){t.hasOwnProperty(n)&&(e[n]=t[n],a=!0)}),a?e:null},r.prepareVisualTypes=function(t){if(G(t))t=t.slice();else if(tW(t)){var e=[];Vl(t,function(a,i){e.push(i)}),t=e}else return[];return t.sort(function(a,i){return i==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),t},r.dependsOn=function(t,e){return e==="color"?!!(t&&t.indexOf(e)===0):t===e},r.findPieceIndex=function(t,e,a){for(var i,n=1/0,o=0,s=e.length;o<s;o++){var l=e[o].value;if(l!=null){if(l===t||X(l)&&l===t+"")return o;a&&f(l,o)}}for(var o=0,s=e.length;o<s;o++){var u=e[o],c=u.interval,h=u.close;if(c){if(c[0]===-1/0){if(Ah(h[1],t,c[1]))return o}else if(c[1]===1/0){if(Ah(h[0],c[0],t))return o}else if(Ah(h[0],c[0],t)&&Ah(h[1],t,c[1]))return o;a&&f(c[0],o),a&&f(c[1],o)}}if(a)return t===1/0?e.length-1:t===-1/0?0:i;function f(d,p){var v=Math.abs(d-t);v<n&&(n=v,i=p)}},r.visualHandlers={color:{applyVisual:Ol("color"),getColorMapper:function(){var t=this.option;return j(t.mappingMethod==="category"?function(e,a){return!a&&(e=this._normalizeData(e)),zl.call(this,e)}:function(e,a,i){var n=!!i;return!a&&(e=this._normalizeData(e)),i=Zf(e,t.parsedVisual,i),n?i:va(i,"rgba")},this)},_normalizedToVisual:{linear:function(t){return va(Zf(t,this.option.parsedVisual),"rgba")},category:zl,piecewise:function(t,e){var a=Pg.call(this,e);return a==null&&(a=va(Zf(t,this.option.parsedVisual),"rgba")),a},fixed:kn}},colorHue:Dh(function(t,e){return gs(t,e)}),colorSaturation:Dh(function(t,e){return gs(t,null,e)}),colorLightness:Dh(function(t,e){return gs(t,null,null,e)}),colorAlpha:Dh(function(t,e){return Su(t,e)}),decal:{applyVisual:Ol("decal"),_normalizedToVisual:{linear:null,category:zl,piecewise:null,fixed:null}},opacity:{applyVisual:Ol("opacity"),_normalizedToVisual:Ig([0,1])},liftZ:{applyVisual:Ol("liftZ"),_normalizedToVisual:{linear:kn,category:kn,piecewise:kn,fixed:kn}},symbol:{applyVisual:function(t,e,a){var i=this.mapValueToVisual(t);a("symbol",i)},_normalizedToVisual:{linear:mC,category:zl,piecewise:function(t,e){var a=Pg.call(this,e);return a==null&&(a=mC.call(this,t)),a},fixed:kn}},symbolSize:{applyVisual:Ol("symbolSize"),_normalizedToVisual:Ig([0,1])}},r}();function rW(r){var t=r.pieceList;r.hasSpecialVisual=!1,M(t,function(e,a){e.originIndex=a,e.visual!=null&&(r.hasSpecialVisual=!0)})}function aW(r){var t=r.categories,e=r.categoryMap={},a=r.visual;if(Vl(t,function(o,s){e[o]=s}),!G(a)){var i=[];re(a)?Vl(a,function(o,s){var l=e[s];i[l??Ch]=o}):i[Ch]=a,a=yC(r,i)}for(var n=t.length-1;n>=0;n--)a[n]==null&&(delete e[t[n]],t.pop())}function Eg(r,t){var e=r.visual,a=[];re(e)?Vl(e,function(n){a.push(n)}):e!=null&&a.push(e);var i={color:1,symbol:1};!t&&a.length===1&&!i.hasOwnProperty(r.type)&&(a[1]=a[0]),yC(r,a)}function Dh(r){return{applyVisual:function(t,e,a){var i=this.mapValueToVisual(t);a("color",r(e("color"),i))},_normalizedToVisual:Ig([0,1])}}function mC(r){var t=this.option.visual;return t[Math.round(ke(r,[0,1],[0,t.length-1],!0))]||{}}function Ol(r){return function(t,e,a){a(r,this.mapValueToVisual(t))}}function zl(r){var t=this.option.visual;return t[this.option.loop&&r!==Ch?r%t.length:r]}function kn(){return this.option.visual[0]}function Ig(r){return{linear:function(t){return ke(t,r,this.option.visual,!0)},category:zl,piecewise:function(t,e){var a=Pg.call(this,e);return a==null&&(a=ke(t,r,this.option.visual,!0)),a},fixed:kn}}function Pg(r){var t=this.option,e=t.pieceList;if(t.hasSpecialVisual){var a=Mg.findPieceIndex(r,e),i=e[a];if(i&&i.visual)return i.visual[this.type]}}function yC(r,t){return r.visual=t,r.type==="color"&&(r.parsedVisual=W(t,function(e){var a=er(e);return!a&&process.env.NODE_ENV!=="production"&&je("'"+e+"' is an illegal color, fallback to '#000000'",!0),a||[0,0,0,1]})),t}var iW={linear:function(r){return ke(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var t=this.option.pieceList,e=Mg.findPieceIndex(r,t,!0);if(e!=null)return ke(e,[0,t.length-1],[0,1],!0)},category:function(r){var t=this.option.categories?this.option.categoryMap[r]:r;return t??Ch},fixed:et};function Ah(r,t,e){return r?t<=e:t<e}const Lt=Mg;var nW="itemStyle",_C=xe();const oW={seriesType:"treemap",reset:function(r){var t=r.getData().tree,e=t.root;e.isRemoved()||bC(e,{},r.getViewRoot().getAncestors(),r)}};function bC(r,t,e,a){var i=r.getModel(),n=r.getLayout(),o=r.hostTree.data;if(!(!n||n.invisible||!n.isInView)){var s=i.getModel(nW),l=sW(s,t,a),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),c=s.get("borderColor"),h=s.get("borderColorSaturation"),f;h!=null&&(f=wC(l),c=lW(h,f)),u.stroke=c;var d=r.viewChildren;if(!d||!d.length)f=wC(l),u.fill=f;else{var p=uW(r,i,n,s,l,d);M(d,function(v,g){if(v.depth>=e.length||v===e[v.depth]){var m=cW(i,l,v,g,p,a);bC(v,m,e,a)}})}}}function sW(r,t,e){var a=F({},t),i=e.designatedVisualItemStyle;return M(["color","colorAlpha","colorSaturation"],function(n){i[n]=t[n];var o=r.get(n);i[n]=null,o!=null&&(a[n]=o)}),a}function wC(r){var t=kg(r,"color");if(t){var e=kg(r,"colorAlpha"),a=kg(r,"colorSaturation");return a&&(t=gs(t,null,null,a)),e&&(t=Su(t,e)),t}}function lW(r,t){return t!=null?gs(t,null,null,r):null}function kg(r,t){var e=r[t];if(e!=null&&e!=="none")return e}function uW(r,t,e,a,i,n){if(!(!n||!n.length)){var o=Ng(t,"color")||i.color!=null&&i.color!=="none"&&(Ng(t,"colorAlpha")||Ng(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=e.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var c=t.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(c==="index"||c==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var f=new Lt(h);return _C(f).drColorMappingBy=c,f}}}function Ng(r,t){var e=r.get(t);return G(e)&&e.length?{name:t,range:e}:null}function cW(r,t,e,a,i,n){var o=F({},t);if(i){var s=i.type,l=s==="color"&&_C(i).drColorMappingBy,u=l==="index"?a:l==="id"?n.mapIdToIndex(e.getId()):e.getValue(r.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Bl=Math.max,Mh=Math.min,xC=it,Rg=M,SC=["itemStyle","borderWidth"],hW=["itemStyle","gapWidth"],fW=["upperLabel","show"],dW=["upperLabel","height"];const pW={seriesType:"treemap",reset:function(r,t,e,a){var i=e.getWidth(),n=e.getHeight(),o=r.option,s=ct(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),l=o.size||[],u=Z(xC(s.width,l[0]),i),c=Z(xC(s.height,l[1]),n),h=a&&a.type,f=["treemapZoomToNode","treemapRootToNode"],d=kl(a,f,r),p=h==="treemapRender"||h==="treemapMove"?a.rootRect:null,v=r.getViewRoot(),g=sC(v);if(h!=="treemapMove"){var m=h==="treemapZoomToNode"?bW(r,d,v,u,c):p?[p.width,p.height]:[u,c],y=o.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:o.squareRatio,sort:y,leafDepth:o.leafDepth};v.hostTree.clearLayouts();var w={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};v.setLayout(w),LC(v,_,!1,0),w=v.getLayout(),Rg(g,function(S,L){var C=(g[L+1]||v).getValue();S.setLayout(F({dataExtent:[C,C],borderWidth:0,upperHeight:0},w))})}var x=r.getData().tree.root;x.setLayout(wW(s,p,d),!0),r.setLayoutInfo(s),CC(x,new ge(-s.x,-s.y,i,n),g,v,0)}};function LC(r,t,e,a){var i,n;if(!r.isRemoved()){var o=r.getLayout();i=o.width,n=o.height;var s=r.getModel(),l=s.get(SC),u=s.get(hW)/2,c=DC(s),h=Math.max(l,c),f=l-u,d=h-u;r.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:c},!0),i=Bl(i-2*f,0),n=Bl(n-f-d,0);var p=i*n,v=vW(r,s,p,t,e,a);if(v.length){var g={x:f,y:d,width:i,height:n},m=Mh(i,n),y=1/0,_=[];_.area=0;for(var w=0,x=v.length;w<x;){var S=v[w];_.push(S),_.area+=S.getLayout().area;var L=_W(_,m,t.squareRatio);L<=y?(w++,y=L):(_.area-=_.pop().getLayout().area,TC(_,m,g,u,!1),m=Mh(g.width,g.height),_.length=_.area=0,y=1/0)}if(_.length&&TC(_,m,g,u,!0),!e){var C=s.get("childrenVisibleMin");C!=null&&p<C&&(e=!0)}for(var w=0,x=v.length;w<x;w++)LC(v[w],t,e,a+1)}}}function vW(r,t,e,a,i,n){var o=r.children||[],s=a.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=a.leafDepth!=null&&a.leafDepth<=n;if(i&&!l)return r.viewChildren=[];o=Ie(o,function(d){return!d.isRemoved()}),mW(o,s);var u=yW(t,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=gW(t,e,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var c=0,h=o.length;c<h;c++){var f=o[c].getValue()/u.sum*e;o[c].setLayout({area:f})}return l&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function gW(r,t,e,a,i){if(!a)return e;for(var n=r.get("visibleMin"),o=i.length,s=o,l=o-1;l>=0;l--){var u=i[a==="asc"?o-l-1:l].getValue();u/e*t<n&&(s=l,e-=u)}return a==="asc"?i.splice(0,o-s):i.splice(s,o-s),e}function mW(r,t){return t&&r.sort(function(e,a){var i=t==="asc"?e.getValue()-a.getValue():a.getValue()-e.getValue();return i===0?t==="asc"?e.dataIndex-a.dataIndex:a.dataIndex-e.dataIndex:i}),r}function yW(r,t,e){for(var a=0,i=0,n=t.length;i<n;i++)a+=t[i].getValue();var o=r.get("visualDimension"),s;return!t||!t.length?s=[NaN,NaN]:o==="value"&&e?(s=[t[t.length-1].getValue(),t[0].getValue()],e==="asc"&&s.reverse()):(s=[1/0,-1/0],Rg(t,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function _W(r,t,e){for(var a=0,i=1/0,n=0,o=void 0,s=r.length;n<s;n++)o=r[n].getLayout().area,o&&(o<i&&(i=o),o>a&&(a=o));var l=r.area*r.area,u=t*t*e;return l?Bl(u*a/l,l/(u*i)):1/0}function TC(r,t,e,a,i){var n=t===e.width?0:1,o=1-n,s=["x","y"],l=["width","height"],u=e[s[n]],c=t?r.area/t:0;(i||c>e[l[o]])&&(c=e[l[o]]);for(var h=0,f=r.length;h<f;h++){var d=r[h],p={},v=c?d.getLayout().area/c:0,g=p[l[o]]=Bl(c-2*a,0),m=e[s[n]]+e[l[n]]-u,y=h===f-1||m<v?m:v,_=p[l[n]]=Bl(y-2*a,0);p[s[o]]=e[s[o]]+Mh(a,g/2),p[s[n]]=u+Mh(a,_/2),u+=y,d.setLayout(p,!0)}e[s[o]]+=c,e[l[o]]-=c}function bW(r,t,e,a,i){var n=(t||{}).node,o=[a,i];if(!n||n===e)return o;for(var s,l=a*i,u=l*r.option.zoomToNodeRatio;s=n.parentNode;){for(var c=0,h=s.children,f=0,d=h.length;f<d;f++)c+=h[f].getValue();var p=n.getValue();if(p===0)return o;u*=c/p;var v=s.getModel(),g=v.get(SC),m=Math.max(g,DC(v));u+=4*g*g+(3*g+m)*Math.pow(u,.5),u>o1&&(u=o1),n=s}u<l&&(u=l);var y=Math.pow(u/l,.5);return[a*y,i*y]}function wW(r,t,e){if(t)return{x:t.x,y:t.y};var a={x:0,y:0};if(!e)return a;var i=e.node,n=i.getLayout();if(!n)return a;for(var o=[n.width/2,n.height/2],s=i;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:r.width/2-o[0],y:r.height/2-o[1]}}function CC(r,t,e,a,i){var n=r.getLayout(),o=e[i],s=o&&o===r;if(!(o&&!s||i===e.length&&r!==a)){r.setLayout({isInView:!0,invisible:!s&&!t.intersect(n),isAboveViewRoot:s},!0);var l=new ge(t.x-n.x,t.y-n.y,t.width,t.height);Rg(r.viewChildren||[],function(u){CC(u,l,e,a,i+1)})}}function DC(r){return r.get(fW)?r.get(dW):0}function xW(r){r.registerSeriesModel(FG),r.registerChartView(eW),r.registerVisual(oW),r.registerLayout(pW),OG(r)}function SW(r){var t=r.findComponents({mainType:"legend"});!t||!t.length||r.eachSeriesByType("graph",function(e){var a=e.getCategoriesData(),i=e.getGraph(),n=i.data,o=a.mapArray(a.getName);n.filterSelf(function(s){var l=n.getItemModel(s),u=l.getShallow("category");if(u!=null){De(u)&&(u=o[u]);for(var c=0;c<t.length;c++)if(!t[c].isSelected(u))return!1}return!0})})}function LW(r){var t={};r.eachSeriesByType("graph",function(e){var a=e.getCategoriesData(),i=e.getData(),n={};a.each(function(o){var s=a.getName(o);n["ec-"+s]=o;var l=a.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=e.getColorFromPalette(s,t)),a.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],h=0;h<c.length;h++){var f=l.getShallow(c[h],!0);f!=null&&a.setItemVisual(o,c[h],f)}}),a.count()&&i.each(function(o){var s=i.getItemModel(o),l=s.getShallow("category");if(l!=null){X(l)&&(l=n["ec-"+l]);var u=a.getItemVisual(l,"style"),c=i.ensureUniqueItemVisual(o,"style");F(c,u);for(var h=["symbol","symbolSize","symbolKeepAspect"],f=0;f<h.length;f++)i.setItemVisual(o,h[f],a.getItemVisual(l,h[f]))}})})}function Eh(r){return r instanceof Array||(r=[r,r]),r}function TW(r){r.eachSeriesByType("graph",function(t){var e=t.getGraph(),a=t.getEdgeData(),i=Eh(t.get("edgeSymbol")),n=Eh(t.get("edgeSymbolSize"));a.setVisual("fromSymbol",i&&i[0]),a.setVisual("toSymbol",i&&i[1]),a.setVisual("fromSymbolSize",n&&n[0]),a.setVisual("toSymbolSize",n&&n[1]),a.setVisual("style",t.getModel("lineStyle").getLineStyle()),a.each(function(o){var s=a.getItemModel(o),l=e.getEdgeByIndex(o),u=Eh(s.getShallow("symbol",!0)),c=Eh(s.getShallow("symbolSize",!0)),h=s.getModel("lineStyle").getLineStyle(),f=a.ensureUniqueItemVisual(o,"style");switch(F(f,h),f.stroke){case"source":{var d=l.node1.getVisual("style");f.stroke=d&&d.fill;break}case"target":{var d=l.node2.getVisual("style");f.stroke=d&&d.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),c[0]&&l.setVisual("fromSymbolSize",c[0]),c[1]&&l.setVisual("toSymbolSize",c[1])})})}var Vg="-->",Ih=function(r){return r.get("autoCurveness")||null},AC=function(r,t){var e=Ih(r),a=20,i=[];if(De(e))a=e;else if(G(e)){r.__curvenessList=e;return}t>a&&(a=t);var n=a%2?a+2:a+3;i=[];for(var o=0;o<n;o++)i.push((o%2?o+1:o)/10*(o%2?-1:1));r.__curvenessList=i},Fl=function(r,t,e){var a=[r.id,r.dataIndex].join("."),i=[t.id,t.dataIndex].join(".");return[e.uid,a,i].join(Vg)},MC=function(r){var t=r.split(Vg);return[t[0],t[2],t[1]].join(Vg)},CW=function(r,t){var e=Fl(r.node1,r.node2,t);return t.__edgeMap[e]},DW=function(r,t){var e=Og(Fl(r.node1,r.node2,t),t),a=Og(Fl(r.node2,r.node1,t),t);return e+a},Og=function(r,t){var e=t.__edgeMap;return e[r]?e[r].length:0};function AW(r){Ih(r)&&(r.__curvenessList=[],r.__edgeMap={},AC(r))}function MW(r,t,e,a){if(Ih(e)){var i=Fl(r,t,e),n=e.__edgeMap,o=n[MC(i)];n[i]&&!o?n[i].isForward=!0:o&&n[i]&&(o.isForward=!0,n[i].isForward=!1),n[i]=n[i]||[],n[i].push(a)}}function zg(r,t,e,a){var i=Ih(t),n=G(i);if(!i)return null;var o=CW(r,t);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===e){s=l;break}var u=DW(r,t);AC(t,u),r.lineStyle=r.lineStyle||{};var c=Fl(r.node1,r.node2,t),h=t.__curvenessList,f=n||u%2?0:1;if(o.isForward)return h[f+s];var d=MC(c),p=Og(d,t),v=h[s+p+f];return a?n?i&&i[0]===0?(p+f)%2?v:-v:((p%2?0:1)+f)%2?v:-v:(p+f)%2?v:-v:h[s+p+f]}function EC(r){var t=r.coordinateSystem;if(!(t&&t.type!=="view")){var e=r.getGraph();e.eachNode(function(a){var i=a.getModel();a.setLayout([+i.get("x"),+i.get("y")])}),Bg(e,r)}}function Bg(r,t){r.eachEdge(function(e,a){var i=nr(e.getModel().get(["lineStyle","curveness"]),-zg(e,t,a,!0),0),n=fa(e.node1.getLayout()),o=fa(e.node2.getLayout()),s=[n,o];+i&&s.push([(n[0]+o[0])/2-(n[1]-o[1])*i,(n[1]+o[1])/2-(o[0]-n[0])*i]),e.setLayout(s)})}function EW(r,t){r.eachSeriesByType("graph",function(e){var a=e.get("layout"),i=e.coordinateSystem;if(i&&i.type!=="view"){var n=e.getData(),o=[];M(i.dimensions,function(f){o=o.concat(n.mapDimensionsAll(f))});for(var s=0;s<n.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var h=n.get(o[c],s);isNaN(h)||(u=!0),l.push(h)}u?n.setItemLayout(s,i.dataToPoint(l)):n.setItemLayout(s,[NaN,NaN])}Bg(n.graph,e)}else(!a||a==="none")&&EC(e)})}function Gl(r){var t=r.coordinateSystem;if(t.type!=="view")return 1;var e=r.option.nodeScaleRatio,a=t.scaleX,i=t.getZoom(),n=(i-1)*e+1;return n/a}function Wl(r){var t=r.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var IC=Math.PI,Fg=[];function Gg(r,t,e,a){var i=r.coordinateSystem;if(!(i&&i.type!=="view")){var n=i.getBoundingRect(),o=r.getData(),s=o.graph,l=n.width/2+n.x,u=n.height/2+n.y,c=Math.min(n.width,n.height)/2,h=o.count();if(o.setLayout({cx:l,cy:u}),!!h){if(e){var f=i.pointToData(a),d=f[0],p=f[1],v=[d-l,p-u];$n(v,v),hu(v,v,c),e.setLayout([l+v[0],u+v[1]],!0);var g=r.get(["circular","rotateLabel"]);PC(e,g,l,u)}IW[t](r,s,o,c,l,u,h),s.eachEdge(function(m,y){var _=nr(m.getModel().get(["lineStyle","curveness"]),zg(m,r,y),0),w=fa(m.node1.getLayout()),x=fa(m.node2.getLayout()),S,L=(w[0]+x[0])/2,C=(w[1]+x[1])/2;+_&&(_*=3,S=[l*_+L*(1-_),u*_+C*(1-_)]),m.setLayout([w,x,S])})}}}var IW={value:function(r,t,e,a,i,n,o){var s=0,l=e.getSum("value"),u=Math.PI*2/(l||o);t.eachNode(function(c){var h=c.getValue("value"),f=u*(l?h:1)/2;s+=f,c.setLayout([a*Math.cos(s)+i,a*Math.sin(s)+n]),s+=f})},symbolSize:function(r,t,e,a,i,n,o){var s=0;Fg.length=o;var l=Gl(r);t.eachNode(function(h){var f=Wl(h);isNaN(f)&&(f=2),f<0&&(f=0),f*=l;var d=Math.asin(f/2/a);isNaN(d)&&(d=IC/2),Fg[h.dataIndex]=d,s+=d*2});var u=(2*IC-s)/o/2,c=0;t.eachNode(function(h){var f=u+Fg[h.dataIndex];c+=f,(!h.getLayout()||!h.getLayout().fixed)&&h.setLayout([a*Math.cos(c)+i,a*Math.sin(c)+n]),c+=f})}};function PC(r,t,e,a){var i=r.getGraphicEl();if(i){var n=r.getModel(),o=n.get(["label","rotate"])||0,s=i.getSymbolPath();if(t){var l=r.getLayout(),u=Math.atan2(l[1]-a,l[0]-e);u<0&&(u=Math.PI*2+u);var c=l[0]<e;c&&(u=u-Math.PI);var h=c?"left":"right";s.setTextConfig({rotation:-u,position:h,origin:"center"});var f=s.ensureState("emphasis");F(f.textConfig||(f.textConfig={}),{position:h})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function PW(r){r.eachSeriesByType("graph",function(t){t.get("layout")==="circular"&&Gg(t,"symbolSize")})}var Go=xf;function kW(r,t,e){for(var a=r,i=t,n=e.rect,o=n.width,s=n.height,l=[n.x+o/2,n.y+s/2],u=e.gravity==null?.1:e.gravity,c=0;c<a.length;c++){var h=a[c];h.p||(h.p=Ci(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),h.pp=fa(h.p),h.edges=null}var f=e.friction==null?.6:e.friction,d=f,p,v;return{warmUp:function(){d=f*.8},setFixed:function(g){a[g].fixed=!0},setUnfixed:function(g){a[g].fixed=!1},beforeStep:function(g){p=g},afterStep:function(g){v=g},step:function(g){p&&p(a,i);for(var m=[],y=a.length,_=0;_<i.length;_++){var w=i[_];if(!w.ignoreForceLayout){var x=w.n1,S=w.n2;Di(m,S.p,x.p);var L=Sf(m)-w.d,C=S.w/(x.w+S.w);isNaN(C)&&(C=0),$n(m,m),!x.fixed&&Go(x.p,x.p,m,C*L*d),!S.fixed&&Go(S.p,S.p,m,-(1-C)*L*d)}}for(var _=0;_<y;_++){var T=a[_];T.fixed||(Di(m,l,T.p),Go(T.p,T.p,m,u*d))}for(var _=0;_<y;_++)for(var x=a[_],A=_+1;A<y;A++){var S=a[A];Di(m,S.p,x.p);var L=Sf(m);L===0&&(NP(m,Math.random()-.5,Math.random()-.5),L=1);var D=(x.rep+S.rep)/L/L;!x.fixed&&Go(x.pp,x.pp,m,D),!S.fixed&&Go(S.pp,S.pp,m,-D)}for(var E=[],_=0;_<y;_++){var T=a[_];T.fixed||(Di(E,T.p,T.pp),Go(T.p,T.p,E,d),Vt(T.pp,T.p))}d=d*.992;var I=d<.01;v&&v(a,i,I),g&&g(I)}}}function NW(r){r.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!(e&&e.type!=="view"))if(t.get("layout")==="force"){var a=t.preservedPoints||{},i=t.getGraph(),n=i.data,o=i.edgeData,s=t.getModel("force"),l=s.get("initLayout");t.preservedPoints?n.each(function(_){var w=n.getId(_);n.setItemLayout(_,a[w]||[NaN,NaN])}):!l||l==="none"?EC(t):l==="circular"&&Gg(t,"value");var u=n.getDataExtent("value"),c=o.getDataExtent("value"),h=s.get("repulsion"),f=s.get("edgeLength"),d=G(h)?h:[h,h],p=G(f)?f:[f,f];p=[p[1],p[0]];var v=n.mapArray("value",function(_,w){var x=n.getItemLayout(w),S=ke(_,u,d);return isNaN(S)&&(S=(d[0]+d[1])/2),{w:S,rep:S,fixed:n.getItemModel(w).get("fixed"),p:!x||isNaN(x[0])||isNaN(x[1])?null:x}}),g=o.mapArray("value",function(_,w){var x=i.getEdgeByIndex(w),S=ke(_,c,p);isNaN(S)&&(S=(p[0]+p[1])/2);var L=x.getModel(),C=nr(x.getModel().get(["lineStyle","curveness"]),-zg(x,t,w,!0),0);return{n1:v[x.node1.dataIndex],n2:v[x.node2.dataIndex],d:S,curveness:C,ignoreForceLayout:L.get("ignoreForceLayout")}}),m=e.getBoundingRect(),y=kW(v,g,{rect:m,gravity:s.get("gravity"),friction:s.get("friction")});y.beforeStep(function(_,w){for(var x=0,S=_.length;x<S;x++)_[x].fixed&&Vt(_[x].p,i.getNodeByIndex(x).getLayout())}),y.afterStep(function(_,w,x){for(var S=0,L=_.length;S<L;S++)_[S].fixed||i.getNodeByIndex(S).setLayout(_[S].p),a[n.getId(S)]=_[S].p;for(var S=0,L=w.length;S<L;S++){var C=w[S],T=i.getEdgeByIndex(S),A=C.n1.p,D=C.n2.p,E=T.getLayout();E=E?E.slice():[],E[0]=E[0]||[],E[1]=E[1]||[],Vt(E[0],A),Vt(E[1],D),+C.curveness&&(E[2]=[(A[0]+D[0])/2-(A[1]-D[1])*C.curveness,(A[1]+D[1])/2-(D[0]-A[0])*C.curveness]),T.setLayout(E)}}),t.forceLayout=y,t.preservedPoints=a,y.step()}else t.forceLayout=null})}function RW(r,t,e){var a=F(r.getBoxLayoutParams(),{aspect:e});return ct(a,{width:t.getWidth(),height:t.getHeight()})}function VW(r,t){var e=[];return r.eachSeriesByType("graph",function(a){var i=a.get("coordinateSystem");if(!i||i==="view"){var n=a.getData(),o=n.mapArray(function(g){var m=n.getItemModel(g);return[+m.get("x"),+m.get("y")]}),s=[],l=[];Uu(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),c=RW(a,t,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var h=l[0]-s[0],f=l[1]-s[1],d=c.width,p=c.height,v=a.coordinateSystem=new Il;v.zoomLimit=a.get("scaleLimit"),v.setBoundingRect(s[0],s[1],h,f),v.setViewRect(c.x,c.y,d,p),v.setCenter(a.get("center"),t),v.setZoom(a.get("zoom")),e.push(v)}}),e}var kC=mt.prototype,Wg=rc.prototype,NC=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}();(function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(NC);function Hg(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var OW=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-line",a}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new NC},t.prototype.buildPath=function(e,a){Hg(a)?kC.buildPath.call(this,e,a):Wg.buildPath.call(this,e,a)},t.prototype.pointAt=function(e){return Hg(this.shape)?kC.pointAt.call(this,e):Wg.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var a=this.shape,i=Hg(a)?[a.x2-a.x1,a.y2-a.y1]:Wg.tangentAt.call(this,e);return $n(i,i)},t}(_e);const zW=OW;var $g=["fromSymbol","toSymbol"];function RC(r){return"_"+r+"Type"}function VC(r,t,e){var a=t.getItemVisual(e,r);if(!a||a==="none")return a;var i=t.getItemVisual(e,r+"Size"),n=t.getItemVisual(e,r+"Rotate"),o=t.getItemVisual(e,r+"Offset"),s=t.getItemVisual(e,r+"KeepAspect"),l=Ao(i),u=pn(o||0,l);return a+l+u+(n||"")+(s||"")}function OC(r,t,e){var a=t.getItemVisual(e,r);if(!(!a||a==="none")){var i=t.getItemVisual(e,r+"Size"),n=t.getItemVisual(e,r+"Rotate"),o=t.getItemVisual(e,r+"Offset"),s=t.getItemVisual(e,r+"KeepAspect"),l=Ao(i),u=pn(o||0,l),c=lt(a,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=n==null||isNaN(n)?void 0:+n*Math.PI/180||0,c.name=r,c}}function BW(r){var t=new zW({name:"line",subPixelOptimize:!0});return Ug(t.shape,r),t}function Ug(r,t){r.x1=t[0][0],r.y1=t[0][1],r.x2=t[1][0],r.y2=t[1][1],r.percent=1;var e=t[2];e?(r.cpx1=e[0],r.cpy1=e[1]):(r.cpx1=NaN,r.cpy1=NaN)}var FW=function(r){z(t,r);function t(e,a,i){var n=r.call(this)||this;return n._createLine(e,a,i),n}return t.prototype._createLine=function(e,a,i){var n=e.hostModel,o=e.getItemLayout(a),s=BW(o);s.shape.percent=0,Ze(s,{shape:{percent:1}},n,a),this.add(s),M($g,function(l){var u=OC(l,e,a);this.add(u),this[RC(l)]=VC(l,e,a)},this),this._updateCommonStl(e,a,i)},t.prototype.updateData=function(e,a,i){var n=e.hostModel,o=this.childOfName("line"),s=e.getItemLayout(a),l={shape:{}};Ug(l.shape,s),Me(o,l,n,a),M($g,function(u){var c=VC(u,e,a),h=RC(u);if(this[h]!==c){this.remove(this.childOfName(u));var f=OC(u,e,a);this.add(f)}this[h]=c},this),this._updateCommonStl(e,a,i)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,a,i){var n=e.hostModel,o=this.childOfName("line"),s=i&&i.emphasisLineStyle,l=i&&i.blurLineStyle,u=i&&i.selectLineStyle,c=i&&i.labelStatesModels,h=i&&i.emphasisDisabled,f=i&&i.focus,d=i&&i.blurScope;if(!i||e.hasItemOption){var p=e.getItemModel(a),v=p.getModel("emphasis");s=v.getModel("lineStyle").getLineStyle(),l=p.getModel(["blur","lineStyle"]).getLineStyle(),u=p.getModel(["select","lineStyle"]).getLineStyle(),h=v.get("disabled"),f=v.get("focus"),d=v.get("blurScope"),c=ft(p)}var g=e.getItemVisual(a,"style"),m=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,M($g,function(S){var L=this.childOfName(S);if(L){L.setColor(m),L.style.opacity=g.opacity;for(var C=0;C<Bt.length;C++){var T=Bt[C],A=o.getState(T);if(A){var D=A.style||{},E=L.ensureState(T),I=E.style||(E.style={});D.stroke!=null&&(I[L.__isEmptyBrush?"stroke":"fill"]=D.stroke),D.opacity!=null&&(I.opacity=D.opacity)}}L.markRedraw()}},this);var y=n.getRawValue(a);xt(this,c,{labelDataIndex:a,labelFetcher:{getFormattedLabel:function(S,L){return n.getFormattedLabel(S,L,e.dataType)}},inheritColor:m||"#000",defaultOpacity:g.opacity,defaultText:(y==null?e.getName(a):isFinite(y)?Qe(y):y)+""});var _=this.getTextContent();if(_){var w=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=w.get("position")||"middle";var x=w.get("distance");G(x)||(x=[x,x]),_.__labelDistance=x}this.setTextConfig({position:null,local:!0,inside:!1}),qe(this,f,d,h)},t.prototype.highlight=function(){xa(this)},t.prototype.downplay=function(){Sa(this)},t.prototype.updateLayout=function(e,a){this.setLinePoints(e.getItemLayout(a))},t.prototype.setLinePoints=function(e){var a=this.childOfName("line");Ug(a.shape,e),a.dirty()},t.prototype.beforeUpdate=function(){var e=this,a=e.childOfName("fromSymbol"),i=e.childOfName("toSymbol"),n=e.getTextContent();if(!a&&!i&&(!n||n.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=e.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),h=l.pointAt(u),f=Di([],h,c);$n(f,f);function d(A,D){var E=A.__specifiedRotation;if(E==null){var I=l.tangentAt(D);A.attr("rotation",(D===1?-1:1)*Math.PI/2-Math.atan2(I[1],I[0]))}else A.attr("rotation",E)}if(a&&(a.setPosition(c),d(a,0),a.scaleX=a.scaleY=o*u,a.markRedraw()),i&&(i.setPosition(h),d(i,1),i.scaleX=i.scaleY=o*u,i.markRedraw()),n&&!n.ignore){n.x=n.y=0,n.originX=n.originY=0;var p=void 0,v=void 0,g=n.__labelDistance,m=g[0]*o,y=g[1]*o,_=u/2,w=l.tangentAt(_),x=[w[1],-w[0]],S=l.pointAt(_);x[1]>0&&(x[0]=-x[0],x[1]=-x[1]);var L=w[0]<0?-1:1;if(n.__position!=="start"&&n.__position!=="end"){var C=-Math.atan2(w[1],w[0]);h[0]<c[0]&&(C=Math.PI+C),n.rotation=C}var T=void 0;switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":T=-y,v="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":T=y,v="top";break;default:T=0,v="middle"}switch(n.__position){case"end":n.x=f[0]*m+h[0],n.y=f[1]*y+h[1],p=f[0]>.8?"left":f[0]<-.8?"right":"center",v=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":n.x=-f[0]*m+c[0],n.y=-f[1]*y+c[1],p=f[0]>.8?"right":f[0]<-.8?"left":"center",v=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=m*L+c[0],n.y=c[1]+T,p=w[0]<0?"right":"left",n.originX=-m*L,n.originY=-T;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=S[0],n.y=S[1]+T,p="center",n.originY=-T;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-m*L+h[0],n.y=h[1]+T,p=w[0]>=0?"right":"left",n.originX=m*L,n.originY=-T;break}n.scaleX=n.scaleY=o,n.setStyle({verticalAlign:n.__verticalAlign||v,align:n.__align||p})}},t}(oe);const Yg=FW;var GW=function(){function r(t){this.group=new oe,this._LineCtor=t||Yg}return r.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var a=this,i=a.group,n=a._lineData;a._lineData=t,n||i.removeAll();var o=zC(t);t.diff(n).add(function(s){e._doAdd(t,s,o)}).update(function(s,l){e._doUpdate(n,t,l,s,o)}).remove(function(s){i.remove(n.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,a){e.updateLayout(t,a)},this)},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=zC(t),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e){this._progressiveEls=[];function a(s){!s.isGroup&&!WW(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i<t.end;i++){var n=e.getItemLayout(i);if(Zg(n)){var o=new this._LineCtor(e,i,this._seriesScope);o.traverse(a),this.group.add(o),e.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(t){ti(this._progressiveEls||this.group,t)},r.prototype._doAdd=function(t,e,a){var i=t.getItemLayout(e);if(Zg(i)){var n=new this._LineCtor(t,e,a);t.setItemGraphicEl(e,n),this.group.add(n)}},r.prototype._doUpdate=function(t,e,a,i,n){var o=t.getItemGraphicEl(a);if(!Zg(e.getItemLayout(i))){this.group.remove(o);return}o?o.updateData(e,i,n):o=new this._LineCtor(e,i,n),e.setItemGraphicEl(i,o),this.group.add(o)},r}();function WW(r){return r.animators&&r.animators.length>0}function zC(r){var t=r.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:ft(t)}}function BC(r){return isNaN(r[0])||isNaN(r[1])}function Zg(r){return r&&!BC(r[0])&&!BC(r[1])}const Xg=GW;var jg=[],qg=[],Kg=[],Wo=gt,Jg=Ai,FC=Math.abs;function GC(r,t,e){for(var a=r[0],i=r[1],n=r[2],o=1/0,s,l=e*e,u=.1,c=.1;c<=.9;c+=.1){jg[0]=Wo(a[0],i[0],n[0],c),jg[1]=Wo(a[1],i[1],n[1],c);var h=FC(Jg(jg,t)-l);h<o&&(o=h,s=c)}for(var f=0;f<32;f++){var d=s+u;qg[0]=Wo(a[0],i[0],n[0],s),qg[1]=Wo(a[1],i[1],n[1],s),Kg[0]=Wo(a[0],i[0],n[0],d),Kg[1]=Wo(a[1],i[1],n[1],d);var h=Jg(qg,t)-l;if(FC(h)<.01)break;var p=Jg(Kg,t)-l;u/=2,h<0?p>=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function Qg(r,t){var e=[],a=ds,i=[[],[],[]],n=[[],[]],o=[];t/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[fa(u[0]),fa(u[1])],u[2]&&u.__original.push(fa(u[2])));var f=u.__original;if(u[2]!=null){if(Vt(i[0],f[0]),Vt(i[1],f[2]),Vt(i[2],f[1]),c&&c!=="none"){var d=Wl(s.node1),p=GC(i,f[0],d*t);a(i[0][0],i[1][0],i[2][0],p,e),i[0][0]=e[3],i[1][0]=e[4],a(i[0][1],i[1][1],i[2][1],p,e),i[0][1]=e[3],i[1][1]=e[4]}if(h&&h!=="none"){var d=Wl(s.node2),p=GC(i,f[1],d*t);a(i[0][0],i[1][0],i[2][0],p,e),i[1][0]=e[1],i[2][0]=e[2],a(i[0][1],i[1][1],i[2][1],p,e),i[1][1]=e[1],i[2][1]=e[2]}Vt(u[0],i[0]),Vt(u[1],i[2]),Vt(u[2],i[1])}else{if(Vt(n[0],f[0]),Vt(n[1],f[1]),Di(o,n[1],n[0]),$n(o,o),c&&c!=="none"){var d=Wl(s.node1);xf(n[0],n[0],o,d*t)}if(h&&h!=="none"){var d=Wl(s.node2);xf(n[1],n[1],o,-d*t)}Vt(u[0],n[0]),Vt(u[1],n[1])}})}function WC(r){return r.type==="view"}var HW=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){var i=new xl,n=new Xg,o=this.group;this._controller=new Ml(a.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},t.prototype.render=function(e,a,i){var n=this,o=e.coordinateSystem;this._model=e;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(WC(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(c):Me(u,c,e)}Qg(e.getGraph(),Gl(e));var h=e.getData();s.updateData(h);var f=e.getEdgeData();l.updateData(f),this._updateNodeAndLinkScale(),this._updateController(e,a,i),clearTimeout(this._layoutTimeout);var d=e.forceLayout,p=e.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,p);var v=e.get("layout");h.graph.eachNode(function(_){var w=_.dataIndex,x=_.getGraphicEl(),S=_.getModel();if(x){x.off("drag").off("dragend");var L=S.get("draggable");L&&x.on("drag",function(T){switch(v){case"force":d.warmUp(),!n._layouting&&n._startForceLayoutIteration(d,p),d.setFixed(w),h.setItemLayout(w,[x.x,x.y]);break;case"circular":h.setItemLayout(w,[x.x,x.y]),_.setLayout({fixed:!0},!0),Gg(e,"symbolSize",_,[T.offsetX,T.offsetY]),n.updateLayout(e);break;case"none":default:h.setItemLayout(w,[x.x,x.y]),Bg(e.getGraph(),e),n.updateLayout(e);break}}).on("dragend",function(){d&&d.setUnfixed(w)}),x.setDraggable(L,!!S.get("cursor"));var C=S.get(["emphasis","focus"]);C==="adjacency"&&(ue(x).focus=_.getAdjacentDataIndices())}}),h.graph.eachEdge(function(_){var w=_.getGraphicEl(),x=_.getModel().get(["emphasis","focus"]);w&&x==="adjacency"&&(ue(w).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=e.get("layout")==="circular"&&e.get(["circular","rotateLabel"]),m=h.getLayout("cx"),y=h.getLayout("cy");h.graph.eachNode(function(_){PC(_,g,m,y)}),this._firstRender=!1},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,a){var i=this;(function n(){e.step(function(o){i.updateLayout(i._model),(i._layouting=!o)&&(a?i._layoutTimeout=setTimeout(n,16):n())})})()},t.prototype._updateController=function(e,a,i){var n=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,c,h){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(c,h)&&!_h(u,i,e)}),!WC(e.coordinateSystem)){o.disable();return}o.enable(e.get("roam")),s.zoomLimit=e.get("scaleLimit"),s.zoom=e.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){pg(s,u.dx,u.dy),i.dispatchAction({seriesId:e.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){vg(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),n._updateNodeAndLinkScale(),Qg(e.getGraph(),Gl(e)),n._lineDraw.updateLayout(),i.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,a=e.getData(),i=Gl(e);a.eachItemGraphicEl(function(n,o){n&&n.setSymbolScale(i)})},t.prototype.updateLayout=function(e){Qg(e.getGraph(),Gl(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},t.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},t.type="graph",t}(We);const $W=HW;function Ho(r){return"_EC_"+r}var UW=function(){function r(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(t,e){t=t==null?""+e:""+t;var a=this._nodesMap;if(a[Ho(t)]){process.env.NODE_ENV!=="production"&&console.error("Graph nodes have duplicate name or id");return}var i=new Nn(t,e);return i.hostGraph=this,this.nodes.push(i),a[Ho(t)]=i,i},r.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},r.prototype.getNodeById=function(t){return this._nodesMap[Ho(t)]},r.prototype.addEdge=function(t,e,a){var i=this._nodesMap,n=this._edgesMap;if(De(t)&&(t=this.nodes[t]),De(e)&&(e=this.nodes[e]),t instanceof Nn||(t=i[Ho(t)]),e instanceof Nn||(e=i[Ho(e)]),!(!t||!e)){var o=t.id+"-"+e.id,s=new HC(t,e,a);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),e.inEdges.push(s)),t.edges.push(s),t!==e&&e.edges.push(s),this.edges.push(s),n[o]=s,s}},r.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},r.prototype.getEdge=function(t,e){t instanceof Nn&&(t=t.id),e instanceof Nn&&(e=e.id);var a=this._edgesMap;return this._directed?a[t+"-"+e]:a[t+"-"+e]||a[e+"-"+t]},r.prototype.eachNode=function(t,e){for(var a=this.nodes,i=a.length,n=0;n<i;n++)a[n].dataIndex>=0&&t.call(e,a[n],n)},r.prototype.eachEdge=function(t,e){for(var a=this.edges,i=a.length,n=0;n<i;n++)a[n].dataIndex>=0&&a[n].node1.dataIndex>=0&&a[n].node2.dataIndex>=0&&t.call(e,a[n],n)},r.prototype.breadthFirstTraverse=function(t,e,a,i){if(e instanceof Nn||(e=this._nodesMap[Ho(e)]),!!e){for(var n=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(i,e,null))for(var s=[e];s.length;)for(var l=s.shift(),u=l[n],o=0;o<u.length;o++){var c=u[o],h=c.node1===l?c.node2:c.node1;if(!h.__visited){if(t.call(i,h,l))return;s.push(h),h.__visited=!0}}}},r.prototype.update=function(){for(var t=this.data,e=this.edgeData,a=this.nodes,i=this.edges,n=0,o=a.length;n<o;n++)a[n].dataIndex=-1;for(var n=0,o=t.count();n<o;n++)a[t.getRawIndex(n)].dataIndex=n;e.filterSelf(function(s){var l=i[e.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var n=0,o=i.length;n<o;n++)i[n].dataIndex=-1;for(var n=0,o=e.count();n<o;n++)i[e.getRawIndex(n)].dataIndex=n},r.prototype.clone=function(){for(var t=new r(this._directed),e=this.nodes,a=this.edges,i=0;i<e.length;i++)t.addNode(e[i].id,e[i].dataIndex);for(var i=0;i<a.length;i++){var n=a[i];t.addEdge(n.node1.id,n.node2.id,n.dataIndex)}return t},r}(),Nn=function(){function r(t,e){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=t??"",this.dataIndex=e??-1}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,a=e.data.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},e=0;e<this.edges.length;e++){var a=this.edges[e];a.dataIndex<0||(t.edge.push(a.dataIndex),t.node.push(a.node1.dataIndex,a.node2.dataIndex))}return t},r.prototype.getTrajectoryDataIndices=function(){for(var t=Q(),e=Q(),a=0;a<this.edges.length;a++){var i=this.edges[a];if(!(i.dataIndex<0)){t.set(i.dataIndex,!0);for(var n=[i.node1],o=[i.node2],s=0;s<n.length;){var l=n[s];s++,e.set(l.dataIndex,!0);for(var u=0;u<l.inEdges.length;u++)t.set(l.inEdges[u].dataIndex,!0),n.push(l.inEdges[u].node1)}for(s=0;s<o.length;){var c=o[s];s++,e.set(c.dataIndex,!0);for(var u=0;u<c.outEdges.length;u++)t.set(c.outEdges[u].dataIndex,!0),o.push(c.outEdges[u].node2)}}}return{edge:t.keys(),node:e.keys()}},r}(),HC=function(){function r(t,e,a){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=a??-1}return r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,a=e.edgeData.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var t=Q(),e=Q();t.set(this.dataIndex,!0);for(var a=[this.node1],i=[this.node2],n=0;n<a.length;){var o=a[n];n++,e.set(o.dataIndex,!0);for(var s=0;s<o.inEdges.length;s++)t.set(o.inEdges[s].dataIndex,!0),a.push(o.inEdges[s].node1)}for(n=0;n<i.length;){var l=i[n];n++,e.set(l.dataIndex,!0);for(var s=0;s<l.outEdges.length;s++)t.set(l.outEdges[s].dataIndex,!0),i.push(l.outEdges[s].node2)}return{edge:t.keys(),node:e.keys()}},r}();function $C(r,t){return{getValue:function(e){var a=this[r][t];return a.getStore().get(a.getDimensionIndex(e||"value"),this.dataIndex)},setVisual:function(e,a){this.dataIndex>=0&&this[r][t].setItemVisual(this.dataIndex,e,a)},getVisual:function(e){return this[r][t].getItemVisual(this.dataIndex,e)},setLayout:function(e,a){this.dataIndex>=0&&this[r][t].setItemLayout(this.dataIndex,e,a)},getLayout:function(){return this[r][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][t].getRawIndex(this.dataIndex)}}}at(Nn,$C("hostGraph","data")),at(HC,$C("hostGraph","edgeData"));const YW=UW;function UC(r,t,e,a,i){for(var n=new YW(a),o=0;o<r.length;o++)n.addNode(it(r[o].id,r[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<t.length;o++){var c=t[o],h=c.source,f=c.target;n.addEdge(h,f,u)&&(l.push(c),s.push(it(ut(c.id,null),h+" > "+f)),u++)}var d=e.get("coordinateSystem"),p;if(d==="cartesian2d"||d==="polar")p=Da(r,e);else{var v=wo.get(d),g=v?v.dimensions||[]:[];me(g,"value")<0&&g.concat(["value"]);var m=fl(r,{coordDimensions:g,encodeDefine:e.getEncode()}).dimensions;p=new Ft(m,e),p.initData(r)}var y=new Ft(["value"],e);return y.initData(l,s),i&&i(p,y),nC({mainData:p,struct:n,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n}var ZW=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments);var a=this;function i(){return a._categoriesData}this.legendVisualProvider=new Cl(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(e){r.prototype.mergeDefaultAndTheme.apply(this,arguments),Oi(e,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,a){var i=e.edges||e.links||[],n=e.data||e.nodes||[],o=this;if(n&&i){AW(this);var s=UC(n,i,this,!0,l);return M(s.edges,function(u){MW(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var v=o._categoriesModels,g=p.getShallow("category"),m=v[g];return m&&(m.parentModel=p.parentModel,p.parentModel=m),p});var h=Ge.prototype.getModel;function f(p,v){var g=h.call(this,p,v);return g.resolveParentPath=d,g}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=d,p.getModel=f,p});function d(p){if(p&&(p[0]==="label"||p[1]==="label")){var v=p.slice();return p[0]==="label"?v[0]="edgeLabel":p[1]==="label"&&(v[1]="edgeLabel"),v}return p}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,a,i){if(i==="edge"){var n=this.getData(),o=this.getDataParams(e,i),s=n.graph.getEdgeByIndex(e),l=n.getName(s.node1.dataIndex),u=n.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),dt("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var h=Dw({series:this,dataIndex:e,multipleSeries:a});return h},t.prototype._updateCategoriesData=function(){var e=W(this.option.categories||[],function(i){return i.value!=null?i:F({value:0},i)}),a=new Ft(["value"],this);a.initData(e),this._categoriesData=a,this._categoriesModels=a.mapArray(function(i){return a.getItemModel(i)})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(Xe);const XW=ZW;var jW={type:"graphRoam",event:"graphRoam",update:"none"};function qW(r){r.registerChartView($W),r.registerSeriesModel(XW),r.registerProcessor(SW),r.registerVisual(LW),r.registerVisual(TW),r.registerLayout(EW),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,PW),r.registerLayout(NW),r.registerCoordinateSystem("graphView",{dimensions:Il.dimensions,create:VW}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},et),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},et),r.registerAction(jW,function(t,e,a){e.eachComponent({mainType:"series",query:t},function(i){var n=i.coordinateSystem,o=bg(n,t,void 0,a);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}var KW=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),JW=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="pointer",a}return t.prototype.getDefaultShape=function(){return new KW},t.prototype.buildPath=function(e,a){var i=Math.cos,n=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-i(l)*s*(s>=o/3?1:2),c=a.y-n(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,e.moveTo(u,c),e.lineTo(a.x+i(l)*s,a.y+n(l)*s),e.lineTo(a.x+i(a.angle)*o,a.y+n(a.angle)*o),e.lineTo(a.x-i(l)*s,a.y-n(l)*s),e.lineTo(u,c)},t}(_e);const QW=JW;function e8(r,t){var e=r.get("center"),a=t.getWidth(),i=t.getHeight(),n=Math.min(a,i),o=Z(e[0],t.getWidth()),s=Z(e[1],t.getHeight()),l=Z(r.get("radius"),n/2);return{cx:o,cy:s,r:l}}function Ph(r,t){var e=r==null?"":r+"";return t&&(X(t)?e=t.replace("{value}",e):te(t)&&(e=t(r))),e}var t8=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){this.group.removeAll();var n=e.get(["axisLine","lineStyle","color"]),o=e8(e,i);this._renderMain(e,a,i,n,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,a,i,n,o){var s=this.group,l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,c=-e.get("endAngle")/180*Math.PI,h=e.getModel("axisLine"),f=h.get("roundCap"),d=f?fh:Yt,p=h.get("show"),v=h.getModel("lineStyle"),g=v.get("width"),m=[u,c];Fd(m,!l),u=m[0],c=m[1];for(var y=c-u,_=u,w=[],x=0;p&&x<n.length;x++){var S=Math.min(Math.max(n[x][0],0),1);c=u+y*S;var L=new d({shape:{startAngle:_,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});L.setStyle({fill:n[x][1]}),L.setStyle(v.getLineStyle(["color","width"])),w.push(L),_=c}w.reverse(),M(w,function(T){return s.add(T)});var C=function(T){if(T<=0)return n[0][1];var A;for(A=0;A<n.length;A++)if(n[A][0]>=T&&(A===0?0:n[A-1][0])<T)return n[A][1];return n[A-1][1]};this._renderTicks(e,a,i,C,o,u,c,l,g),this._renderTitleAndDetail(e,a,i,C,o),this._renderAnchor(e,o),this._renderPointer(e,a,i,C,o,u,c,l,g)},t.prototype._renderTicks=function(e,a,i,n,o,s,l,u,c){for(var h=this.group,f=o.cx,d=o.cy,p=o.r,v=+e.get("min"),g=+e.get("max"),m=e.getModel("splitLine"),y=e.getModel("axisTick"),_=e.getModel("axisLabel"),w=e.get("splitNumber"),x=y.get("splitNumber"),S=Z(m.get("length"),p),L=Z(y.get("length"),p),C=s,T=(l-s)/w,A=T/x,D=m.getModel("lineStyle").getLineStyle(),E=y.getModel("lineStyle").getLineStyle(),I=m.get("distance"),P,k,N=0;N<=w;N++){if(P=Math.cos(C),k=Math.sin(C),m.get("show")){var O=I?I+c:c,R=new mt({shape:{x1:P*(p-O)+f,y1:k*(p-O)+d,x2:P*(p-S-O)+f,y2:k*(p-S-O)+d},style:D,silent:!0});D.stroke==="auto"&&R.setStyle({stroke:n(N/w)}),h.add(R)}if(_.get("show")){var O=_.get("distance")+I,V=Ph(Qe(N/w*(g-v)+v),_.get("formatter")),B=n(N/w),H=P*(p-S-O)+f,Y=k*(p-S-O)+d,$=_.get("rotate"),U=0;$==="radial"?(U=-C+2*Math.PI,U>Math.PI/2&&(U+=Math.PI)):$==="tangential"?U=-C-Math.PI/2:De($)&&(U=$*Math.PI/180),U===0?h.add(new Ae({style:Fe(_,{text:V,x:H,y:Y,verticalAlign:k<-.8?"top":k>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:B}),silent:!0})):h.add(new Ae({style:Fe(_,{text:V,x:H,y:Y,verticalAlign:"middle",align:"center"},{inheritColor:B}),silent:!0,originX:H,originY:Y,rotation:U}))}if(y.get("show")&&N!==w){var O=y.get("distance");O=O?O+c:c;for(var q=0;q<=x;q++){P=Math.cos(C),k=Math.sin(C);var Ce=new mt({shape:{x1:P*(p-O)+f,y1:k*(p-O)+d,x2:P*(p-L-O)+f,y2:k*(p-L-O)+d},silent:!0,style:E});E.stroke==="auto"&&Ce.setStyle({stroke:n((N+q/x)/w)}),h.add(Ce),C+=A}C-=A}else C+=T}},t.prototype._renderPointer=function(e,a,i,n,o,s,l,u,c){var h=this.group,f=this._data,d=this._progressEls,p=[],v=e.get(["pointer","show"]),g=e.getModel("progress"),m=g.get("show"),y=e.getData(),_=y.mapDimension("value"),w=+e.get("min"),x=+e.get("max"),S=[w,x],L=[s,l];function C(A,D){var E=y.getItemModel(A),I=E.getModel("pointer"),P=Z(I.get("width"),o.r),k=Z(I.get("length"),o.r),N=e.get(["pointer","icon"]),O=I.get("offsetCenter"),R=Z(O[0],o.r),V=Z(O[1],o.r),B=I.get("keepAspect"),H;return N?H=lt(N,R-P/2,V-k,P,k,null,B):H=new QW({shape:{angle:-Math.PI/2,width:P,r:k,x:R,y:V}}),H.rotation=-(D+Math.PI/2),H.x=o.cx,H.y=o.cy,H}function T(A,D){var E=g.get("roundCap"),I=E?fh:Yt,P=g.get("overlap"),k=P?g.get("width"):c/y.count(),N=P?o.r-k:o.r-(A+1)*k,O=P?o.r:o.r-A*k,R=new I({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:N,r:O}});return P&&(R.z2=ke(y.get(_,A),[w,x],[100,0],!0)),R}(m||v)&&(y.diff(f).add(function(A){var D=y.get(_,A);if(v){var E=C(A,s);Ze(E,{rotation:-((isNaN(+D)?L[0]:ke(D,S,L,!0))+Math.PI/2)},e),h.add(E),y.setItemGraphicEl(A,E)}if(m){var I=T(A,s),P=g.get("clip");Ze(I,{shape:{endAngle:ke(D,S,L,P)}},e),h.add(I),Hd(e.seriesIndex,y.dataType,A,I),p[A]=I}}).update(function(A,D){var E=y.get(_,A);if(v){var I=f.getItemGraphicEl(D),P=I?I.rotation:s,k=C(A,P);k.rotation=P,Me(k,{rotation:-((isNaN(+E)?L[0]:ke(E,S,L,!0))+Math.PI/2)},e),h.add(k),y.setItemGraphicEl(A,k)}if(m){var N=d[D],O=N?N.shape.endAngle:s,R=T(A,O),V=g.get("clip");Me(R,{shape:{endAngle:ke(E,S,L,V)}},e),h.add(R),Hd(e.seriesIndex,y.dataType,A,R),p[A]=R}}).execute(),y.each(function(A){var D=y.getItemModel(A),E=D.getModel("emphasis"),I=E.get("focus"),P=E.get("blurScope"),k=E.get("disabled");if(v){var N=y.getItemGraphicEl(A),O=y.getItemVisual(A,"style"),R=O.fill;if(N instanceof bt){var V=N.style;N.useStyle(F({image:V.image,x:V.x,y:V.y,width:V.width,height:V.height},O))}else N.useStyle(O),N.type!=="pointer"&&N.setColor(R);N.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),N.style.fill==="auto"&&N.setStyle("fill",n(ke(y.get(_,A),S,[0,1],!0))),N.z2EmphasisLift=0,wt(N,D),qe(N,I,P,k)}if(m){var B=p[A];B.useStyle(y.getItemVisual(A,"style")),B.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),B.z2EmphasisLift=0,wt(B,D),qe(B,I,P,k)}}),this._progressEls=p)},t.prototype._renderAnchor=function(e,a){var i=e.getModel("anchor"),n=i.get("show");if(n){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=lt(s,a.cx-o/2+Z(l[0],a.r),a.cy-o/2+Z(l[1],a.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},t.prototype._renderTitleAndDetail=function(e,a,i,n,o){var s=this,l=e.getData(),u=l.mapDimension("value"),c=+e.get("min"),h=+e.get("max"),f=new oe,d=[],p=[],v=e.isAnimationEnabled(),g=e.get(["pointer","showAbove"]);l.diff(this._data).add(function(m){d[m]=new Ae({silent:!0}),p[m]=new Ae({silent:!0})}).update(function(m,y){d[m]=s._titleEls[y],p[m]=s._detailEls[y]}).execute(),l.each(function(m){var y=l.getItemModel(m),_=l.get(u,m),w=new oe,x=n(ke(_,[c,h],[0,1],!0)),S=y.getModel("title");if(S.get("show")){var L=S.get("offsetCenter"),C=o.cx+Z(L[0],o.r),T=o.cy+Z(L[1],o.r),A=d[m];A.attr({z2:g?0:2,style:Fe(S,{x:C,y:T,text:l.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:x})}),w.add(A)}var D=y.getModel("detail");if(D.get("show")){var E=D.get("offsetCenter"),I=o.cx+Z(E[0],o.r),P=o.cy+Z(E[1],o.r),k=Z(D.get("width"),o.r),N=Z(D.get("height"),o.r),O=e.get(["progress","show"])?l.getItemVisual(m,"style").fill:x,A=p[m],R=D.get("formatter");A.attr({z2:g?0:2,style:Fe(D,{x:I,y:P,text:Ph(_,R),width:isNaN(k)?null:k,height:isNaN(N)?null:N,align:"center",verticalAlign:"middle"},{inheritColor:O})}),rb(A,{normal:D},_,function(B){return Ph(B,R)}),v&&ab(A,m,l,e,{getFormattedLabel:function(B,H,Y,$,U,q){return Ph(q?q.interpolatedValue:_,R)}}),w.add(A)}f.add(w)}),this.group.add(f),this._titleEls=d,this._detailEls=p},t.type="gauge",t}(We);const r8=t8;var a8=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="itemStyle",e}return t.prototype.getInitialData=function(e,a){return zo(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(Xe);const i8=a8;function n8(r){r.registerChartView(r8),r.registerSeriesModel(i8)}var o8=["itemStyle","opacity"],s8=function(r){z(t,r);function t(e,a){var i=r.call(this)||this,n=i,o=new Xt,s=new Ae;return n.setTextContent(s),i.setTextGuideLine(o),i.updateData(e,a,!0),i}return t.prototype.updateData=function(e,a,i){var n=this,o=e.hostModel,s=e.getItemModel(a),l=e.getItemLayout(a),u=s.getModel("emphasis"),c=s.get(o8);c=c??1,i||kr(n),n.useStyle(e.getItemVisual(a,"style")),n.style.lineJoin="round",i?(n.setShape({points:l.points}),n.style.opacity=0,Ze(n,{style:{opacity:c}},o,a)):Me(n,{style:{opacity:c},shape:{points:l.points}},o,a),wt(n,s),this._updateLabel(e,a),qe(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,a){var i=this,n=this.getTextGuideLine(),o=i.getTextContent(),s=e.hostModel,l=e.getItemModel(a),u=e.getItemLayout(a),c=u.label,h=e.getItemVisual(a,"style"),f=h.fill;xt(o,ft(l),{labelFetcher:e.hostModel,labelDataIndex:a,defaultOpacity:h.opacity,defaultText:e.getName(a)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}}),i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:f,outsideFill:f});var d=c.linePoints;n.setShape({points:d}),i.textGuideLineConfig={anchor:d?new ve(d[0][0],d[0][1]):null},Me(o,{style:{x:c.x,y:c.y}},s,a),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),kv(i,Nv(l),{stroke:f})},t}(Zt),l8=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,a,i){var n=e.getData(),o=this._data,s=this.group;n.diff(o).add(function(l){var u=new s8(n,l);n.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(n,l),s.add(c),n.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);Bs(u,e,l)}).execute(),this._data=n},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(We);const u8=l8;var c8=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Cl(j(this.getData,this),j(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,a){return zo(this,{coordDimensions:["value"],encodeDefaulter:fe(Cp,this)})},t.prototype._defaultLabelLine=function(e){Oi(e,"labelLine",["show"]);var a=e.labelLine,i=e.emphasis.labelLine;a.show=a.show&&e.label.show,i.show=i.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var a=this.getData(),i=r.prototype.getDataParams.call(this,e),n=a.mapDimension("value"),o=a.getSum(n);return i.percent=o?+(a.get(n,e)/o*100).toFixed(2):0,i.$vars.push("percent"),i},t.type="series.funnel",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(Xe);const h8=c8;function f8(r,t){return ct(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function d8(r,t){for(var e=r.mapDimension("value"),a=r.mapArray(e,function(l){return l}),i=[],n=t==="ascending",o=0,s=r.count();o<s;o++)i[o]=o;return te(t)?i.sort(t):t!=="none"&&i.sort(function(l,u){return n?a[l]-a[u]:a[u]-a[l]}),i}function p8(r){var t=r.hostModel,e=t.get("orient");r.each(function(a){var i=r.getItemModel(a),n=i.getModel("label"),o=n.get("position"),s=i.getModel("labelLine"),l=r.getItemLayout(a),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",h,f,d,p;if(c)o==="insideLeft"?(f=(u[0][0]+u[3][0])/2+5,d=(u[0][1]+u[3][1])/2,h="left"):o==="insideRight"?(f=(u[1][0]+u[2][0])/2-5,d=(u[1][1]+u[2][1])/2,h="right"):(f=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,d=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,h="center"),p=[[f,d],[f,d]];else{var v=void 0,g=void 0,m=void 0,y=void 0,_=s.get("length");process.env.NODE_ENV!=="production"&&(e==="vertical"&&["top","bottom"].indexOf(o)>-1&&(o="left",console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")),e==="horizontal"&&["left","right"].indexOf(o)>-1&&(o="bottom",console.warn("Position error: Funnel chart on horizontal orient dose not support left and right."))),o==="left"?(v=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=v-_,f=m-5,h="right"):o==="right"?(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=v+_,f=m+5,h="left"):o==="top"?(v=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=g-_,d=y-5,h="center"):o==="bottom"?(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=g+_,d=y+5,h="center"):o==="rightTop"?(v=e==="horizontal"?u[3][0]:u[1][0],g=e==="horizontal"?u[3][1]:u[1][1],e==="horizontal"?(y=g-_,d=y-5,h="center"):(m=v+_,f=m+5,h="top")):o==="rightBottom"?(v=u[2][0],g=u[2][1],e==="horizontal"?(y=g+_,d=y+5,h="center"):(m=v+_,f=m+5,h="bottom")):o==="leftTop"?(v=u[0][0],g=e==="horizontal"?u[0][1]:u[1][1],e==="horizontal"?(y=g-_,d=y-5,h="center"):(m=v-_,f=m-5,h="right")):o==="leftBottom"?(v=e==="horizontal"?u[1][0]:u[3][0],g=e==="horizontal"?u[1][1]:u[2][1],e==="horizontal"?(y=g+_,d=y+5,h="center"):(m=v-_,f=m-5,h="right")):(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,e==="horizontal"?(y=g+_,d=y+5,h="center"):(m=v+_,f=m+5,h="left")),e==="horizontal"?(m=v,f=m):(y=g,d=y),p=[[v,g],[m,y]]}l.label={linePoints:p,x:f,y:d,verticalAlign:"middle",textAlign:h,inside:c}})}function v8(r,t){r.eachSeriesByType("funnel",function(e){var a=e.getData(),i=a.mapDimension("value"),n=e.get("sort"),o=f8(e,t),s=e.get("orient"),l=o.width,u=o.height,c=d8(a,n),h=o.x,f=o.y,d=s==="horizontal"?[Z(e.get("minSize"),u),Z(e.get("maxSize"),u)]:[Z(e.get("minSize"),l),Z(e.get("maxSize"),l)],p=a.getDataExtent(i),v=e.get("min"),g=e.get("max");v==null&&(v=Math.min(p[0],0)),g==null&&(g=p[1]);var m=e.get("funnelAlign"),y=e.get("gap"),_=s==="horizontal"?l:u,w=(_-y*(a.count()-1))/a.count(),x=function(P,k){if(s==="horizontal"){var N=a.get(i,P)||0,O=ke(N,[v,g],d,!0),R=void 0;switch(m){case"top":R=f;break;case"center":R=f+(u-O)/2;break;case"bottom":R=f+(u-O);break}return[[k,R],[k,R+O]]}var V=a.get(i,P)||0,B=ke(V,[v,g],d,!0),H;switch(m){case"left":H=h;break;case"center":H=h+(l-B)/2;break;case"right":H=h+l-B;break}return[[H,k],[H+B,k]]};n==="ascending"&&(w=-w,y=-y,s==="horizontal"?h+=l:f+=u,c=c.reverse());for(var S=0;S<c.length;S++){var L=c[S],C=c[S+1],T=a.getItemModel(L);if(s==="horizontal"){var A=T.get(["itemStyle","width"]);A==null?A=w:(A=Z(A,l),n==="ascending"&&(A=-A));var D=x(L,h),E=x(C,h+A);h+=A+y,a.setItemLayout(L,{points:D.concat(E.slice().reverse())})}else{var I=T.get(["itemStyle","height"]);I==null?I=w:(I=Z(I,u),n==="ascending"&&(I=-I));var D=x(L,f),E=x(C,f+I);f+=I+y,a.setItemLayout(L,{points:D.concat(E.slice().reverse())})}}p8(a)})}function g8(r){r.registerChartView(u8),r.registerSeriesModel(h8),r.registerLayout(v8),r.registerProcessor(Tl("funnel"))}var m8=.3,y8=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._dataGroup=new oe,e._initialized=!1,e}return t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(e,a,i,n){this._progressiveEls=null;var o=this._dataGroup,s=e.getData(),l=this._data,u=e.coordinateSystem,c=u.dimensions,h=XC(e);s.diff(l).add(f).update(d).remove(p).execute();function f(g){var m=ZC(s,o,g,c,u);em(m,s,g,h)}function d(g,m){var y=l.getItemGraphicEl(m),_=YC(s,g,c,u);s.setItemGraphicEl(g,y),Me(y,{shape:{points:_}},e,g),kr(y),em(y,s,g,h)}function p(g){var m=l.getItemGraphicEl(g);o.remove(m)}if(!this._initialized){this._initialized=!0;var v=_8(u,e,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(v)}this._data=s},t.prototype.incrementalPrepareRender=function(e,a,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(e,a,i){for(var n=a.getData(),o=a.coordinateSystem,s=o.dimensions,l=XC(a),u=this._progressiveEls=[],c=e.start;c<e.end;c++){var h=ZC(n,this._dataGroup,c,s,o);h.incremental=!0,em(h,n,c,l),u.push(h)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t}(We);function _8(r,t,e){var a=r.model,i=r.getRect(),n=new Te({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),o=a.get("layout")==="horizontal"?"width":"height";return n.setShape(o,0),Ze(n,{shape:{width:i.width,height:i.height}},t,e),n}function YC(r,t,e,a){for(var i=[],n=0;n<e.length;n++){var o=e[n],s=r.get(r.mapDimension(o),t);b8(s,a.getAxis(o).type)||i.push(a.dataToPoint(s,o))}return i}function ZC(r,t,e,a,i){var n=YC(r,e,a,i),o=new Xt({shape:{points:n},z2:10});return t.add(o),r.setItemGraphicEl(e,o),o}function XC(r){var t=r.get("smooth",!0);return t===!0&&(t=m8),t=ya(t),Ti(t)&&(t=0),{smooth:t}}function em(r,t,e,a){r.useStyle(t.getItemVisual(e,"style")),r.style.fill=null,r.setShape("smooth",a.smooth);var i=t.getItemModel(e),n=i.getModel("emphasis");wt(r,i,"lineStyle"),qe(r,n.get("focus"),n.get("blurScope"),n.get("disabled"))}function b8(r,t){return t==="category"?r==null:r==null||isNaN(r)}const w8=y8;var x8=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.getInitialData=function(e,a){return Da(null,this,{useEncodeDefaulter:j(S8,null,this)})},t.prototype.getRawIndicesByActiveState=function(e){var a=this.coordinateSystem,i=this.getData(),n=[];return a.eachActiveState(i,function(o,s){e===o&&n.push(i.getRawIndex(s))}),n},t.type="series.parallel",t.dependencies=["parallel"],t.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},t}(Xe);function S8(r){var t=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(t){var e={};return M(t.dimensions,function(a){var i=L8(a);e[a]=i}),e}}function L8(r){return+r.replace("dim","")}const T8=x8;var C8=["lineStyle","opacity"],D8={seriesType:"parallel",reset:function(r,t){var e=r.coordinateSystem,a={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(i,n){e.eachActiveState(n,function(o,s){var l=a[o];if(o==="normal"&&n.hasItemOption){var u=n.getItemModel(s).get(C8,!0);u!=null&&(l=u)}var c=n.ensureUniqueItemVisual(s,"style");c.opacity=l},i.start,i.end)}}}};const A8=D8;function M8(r){E8(r),I8(r)}function E8(r){if(!r.parallel){var t=!1;M(r.series,function(e){e&&e.type==="parallel"&&(t=!0)}),t&&(r.parallel=[{}])}}function I8(r){var t=Ve(r.parallelAxis);M(t,function(e){if(re(e)){var a=e.parallelIndex||0,i=Ve(r.parallel)[a];i&&i.parallelAxisDefault&&de(e,i.parallelAxisDefault,!1)}})}var P8=5,k8=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){this._model=e,this._api=i,this._handlers||(this._handlers={},M(N8,function(n,o){i.getZr().on(o,this._handlers[o]=j(n,this))},this)),Co(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(e,a){Qs(this,"_throttledDispatchExpand"),M(this._handlers,function(i,n){a.getZr().off(n,i)}),this._handlers=null},t.prototype._throttledDispatchExpand=function(e){this._dispatchExpand(e)},t.prototype._dispatchExpand=function(e){e&&this._api.dispatchAction(F({type:"parallelAxisExpand"},e))},t.type="parallel",t}(Ke),N8={mousedown:function(r){tm(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var t=this._mouseDownPoint;if(tm(this,"click")&&t){var e=[r.offsetX,r.offsetY],a=Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2);if(a>P8)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!tm(this,"mousemove"))){var t=this._model,e=t.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=e.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:e.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function tm(r,t){var e=r._model;return e.get("axisExpandable")&&e.get("axisExpandTriggerOn")===t}const R8=k8;var V8=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var a=this.option;e&&de(a,e,!0),this._initDimensions()},t.prototype.contains=function(e,a){var i=e.get("parallelIndex");return i!=null&&a.getComponent("parallel",i)===this},t.prototype.setAxisExpand=function(e){M(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){e.hasOwnProperty(a)&&(this.option[a]=e[a])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],a=this.parallelAxisIndex=[],i=Ie(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(n){return(n.get("parallelIndex")||0)===this.componentIndex},this);M(i,function(n){e.push("dim"+n.get("dim")),a.push(n.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(Se);const O8=V8;var z8=function(r){z(t,r);function t(e,a,i,n,o){var s=r.call(this,e,a,i)||this;return s.type=n||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t}(zr);const B8=z8;function Rn(r,t,e,a,i,n){r=r||0;var o=e[1]-e[0];if(i!=null&&(i=$o(i,[0,o])),n!=null&&(n=Math.max(n,i??0)),a==="all"){var s=Math.abs(t[1]-t[0]);s=$o(s,[0,o]),i=n=$o(s,[i,n]),a=0}t[0]=$o(t[0],e),t[1]=$o(t[1],e);var l=rm(t,a);t[a]+=r;var u=i||0,c=e.slice();l.sign<0?c[0]+=u:c[1]-=u,t[a]=$o(t[a],c);var h;return h=rm(t,a),i!=null&&(h.sign!==l.sign||h.span<i)&&(t[1-a]=t[a]+l.sign*i),h=rm(t,a),n!=null&&h.span>n&&(t[1-a]=t[a]+h.sign*n),t}function rm(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function $o(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var am=M,jC=Math.min,qC=Math.max,KC=Math.floor,F8=Math.ceil,JC=Qe,G8=Math.PI,W8=function(){function r(t,e,a){this.type="parallel",this._axesMap=Q(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,a)}return r.prototype._init=function(t,e,a){var i=t.dimensions,n=t.parallelAxisIndex;am(i,function(o,s){var l=n[s],u=e.getComponent("parallelAxis",l),c=this._axesMap.set(o,new B8(o,rh(u),[0,0],u.get("type"),l)),h=c.type==="category";c.onBand=h&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},r.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),a=e.axisBase,i=e.layoutBase,n=e.pixelDimIndex,o=t[1-n],s=t[n];return o>=a&&o<=a+e.axisLength&&s>=i&&s<=i+e.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(a){if(t.contains(a,e)){var i=a.getData();am(this.dimensions,function(n){var o=this._axesMap.get(n);o.scale.unionExtentFromData(i,i.mapDimension(n)),No(o.scale,o.model)},this)}},this)},r.prototype.resize=function(t,e){this._rect=ct(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var t=this._model,e=this._rect,a=["x","y"],i=["width","height"],n=t.get("layout"),o=n==="horizontal"?0:1,s=e[i[o]],l=[0,s],u=this.dimensions.length,c=kh(t.get("axisExpandWidth"),l),h=kh(t.get("axisExpandCount")||0,[0,u]),f=t.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,d=t.get("axisExpandWindow"),p;if(d)p=kh(d[1]-d[0],l),d[1]=d[0]+p;else{p=kh(c*(h-1),l);var v=t.get("axisExpandCenter")||KC(u/2);d=[c*v-p/2],d[1]=d[0]+p}var g=(s-p)/(u-h);g<3&&(g=0);var m=[KC(JC(d[0]/c,1))+1,F8(JC(d[1]/c,1))-1],y=g/c*d[0];return{layout:n,pixelDimIndex:o,layoutBase:e[a[o]],layoutLength:s,axisBase:e[a[1-o]],axisLength:e[i[1-o]],axisExpandable:f,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:d,axisCount:u,winInnerIndices:m,axisExpandWindow0Pos:y}},r.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,a=this.dimensions,i=this._makeLayoutInfo(),n=i.layout;e.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),am(a,function(o,s){var l=(i.axisExpandable?$8:H8)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:G8/2,vertical:0},h=[u[n].x+t.x,u[n].y+t.y],f=c[n],d=Jt();Mi(d,d,f),Hr(d,d,h),this._axesLayout[o]={position:h,rotation:f,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(t){return this._axesMap.get(t)},r.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},r.prototype.eachActiveState=function(t,e,a,i){a==null&&(a=0),i==null&&(i=t.count());var n=this._axesMap,o=this.dimensions,s=[],l=[];M(o,function(g){s.push(t.mapDimension(g)),l.push(n.get(g).model)});for(var u=this.hasAxisBrushed(),c=a;c<i;c++){var h=void 0;if(!u)h="normal";else{h="active";for(var f=t.getValues(s,c),d=0,p=o.length;d<p;d++){var v=l[d].getActiveState(f[d]);if(v==="inactive"){h="inactive";break}}}e(h,c)}},r.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,e=this._axesMap,a=!1,i=0,n=t.length;i<n;i++)e.get(t[i]).model.getActiveState()!=="normal"&&(a=!0);return a},r.prototype.axisCoordToPoint=function(t,e){var a=this._axesLayout[e];return Rr([t,0],a.transform)},r.prototype.getAxisLayout=function(t){return ne(this._axesLayout[t])},r.prototype.getSlidedAxisExpandWindow=function(t){var e=this._makeLayoutInfo(),a=e.pixelDimIndex,i=e.axisExpandWindow.slice(),n=i[1]-i[0],o=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:i};var s=t[a]-e.layoutBase-e.axisExpandWindow0Pos,l,u="slide",c=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),f=h[0]!=null;if(c)f&&c&&s<n*h[0]?(u="jump",l=s-n*h[2]):f&&c&&s>n*(1-h[0])?(u="jump",l=s-n*(1-h[2])):(l=s-n*h[1])>=0&&(l=s-n*(1-h[1]))<=0&&(l=0),l*=e.axisExpandWidth/c,l?Rn(l,i,o,"all"):u="none";else{var d=i[1]-i[0],p=o[1]*s/d;i=[qC(0,p-d/2)],i[1]=jC(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},r}();function kh(r,t){return jC(qC(r,t[0]),t[1])}function H8(r,t){var e=t.layoutLength/(t.axisCount-1);return{position:e*r,axisNameAvailableWidth:e,axisLabelShow:!0}}function $8(r,t){var e=t.layoutLength,a=t.axisExpandWidth,i=t.axisCount,n=t.axisCollapseWidth,o=t.winInnerIndices,s,l=n,u=!1,c;return r<o[0]?(s=r*n,c=n):r<=o[1]?(s=t.axisExpandWindow0Pos+r*a-t.axisExpandWindow[0],l=a,u=!0):(s=e-(i-1-r)*n,c=n),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}const U8=W8;function Y8(r,t){var e=[];return r.eachComponent("parallel",function(a,i){var n=new U8(a,r,t);n.name="parallel_"+i,n.resize(a,t),a.coordinateSystem=n,n.model=a,e.push(n)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="parallel"){var i=a.getReferringComponents("parallel",ot).models[0];a.coordinateSystem=i.coordinateSystem}}),e}var Z8={create:Y8};const X8=Z8;var QC=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.activeIntervals=[],e}return t.prototype.getAreaSelectStyle=function(){return Fi([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(e){var a=this.activeIntervals=ne(e);if(a)for(var i=a.length-1;i>=0;i--)cr(a[i])},t.prototype.getActiveState=function(e){var a=this.activeIntervals;if(!a.length)return"normal";if(e==null||isNaN(+e))return"inactive";if(a.length===1){var i=a[0];if(i[0]<=e&&e<=i[1])return"active"}else for(var n=0,o=a.length;n<o;n++)if(a[n][0]<=e&&e<=a[n][1])return"active";return"inactive"},t}(Se);at(QC,pl);const e2=QC;var Vn=!0,Hl=Math.min,Uo=Math.max,j8=Math.pow,q8=1e4,K8=6,J8=6,t2="globalPan",Q8={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},eH={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},r2={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},tH=0,rH=function(r){z(t,r);function t(e){var a=r.call(this)||this;return a._track=[],a._covers=[],a._handlers={},process.env.NODE_ENV!=="production"&&ae(e),a._zr=e,a.group=new oe,a._uid="brushController_"+tH++,M(uH,function(i,n){this._handlers[n]=j(i,this)},a),a}return t.prototype.enableBrush=function(e){return process.env.NODE_ENV!=="production"&&ae(this._mounted),this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var a=this._zr;this._enableGlobalPan||fF(a,t2,this._uid),M(this._handlers,function(i,n){a.on(n,i)}),this._brushType=e.brushType,this._brushOption=de(ne(r2),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;dF(e,t2,this._uid),M(this._handlers,function(a,i){e.off(i,a)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var a=this._panels={};M(e,function(i){a[i.panelId]=ne(i)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},process.env.NODE_ENV!=="production"&&(this._mounted=!0),this._enableGlobalPan=e.enableGlobalPan;var a=this.group;return this._zr.add(a),a.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=a.getLocalTransform(),this},t.prototype.updateCovers=function(e){process.env.NODE_ENV!=="production"&&ae(this._mounted),e=W(e,function(f){return de(ne(r2),f,!0)});var a="\0-brush-index-",i=this._covers,n=this._covers=[],o=this,s=this._creatingCover;return new Ca(i,e,u,l).add(c).update(c).remove(h).execute(),this;function l(f,d){return(f.id!=null?f.id:a+d)+"-"+f.brushType}function u(f,d){return l(f.__brushOption,d)}function c(f,d){var p=e[f];if(d!=null&&i[d]===s)n[f]=i[d];else{var v=n[f]=d!=null?(i[d].__brushOption=p,i[d]):i2(o,a2(o,p));im(o,v)}}function h(f){i[f]!==s&&o.group.remove(i[f])}},t.prototype.unmount=function(){if(!(process.env.NODE_ENV!=="production"&&!this._mounted))return this.enableBrush(!1),sm(this),this._zr.remove(this.group),process.env.NODE_ENV!=="production"&&(this._mounted=!1),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(or);function a2(r,t){var e=Nh[t.brushType].createCover(r,t);return e.__brushOption=t,o2(e,t),r.group.add(e),e}function i2(r,t){var e=nm(t);return e.endCreating&&(e.endCreating(r,t),o2(t,t.__brushOption)),t}function n2(r,t){var e=t.__brushOption;nm(t).updateCoverShape(r,t,e.range,e)}function o2(r,t){var e=t.z;e==null&&(e=q8),r.traverse(function(a){a.z=e,a.z2=e})}function im(r,t){nm(t).updateCommon(r,t),n2(r,t)}function nm(r){return Nh[r.__brushOption.brushType]}function om(r,t,e){var a=r._panels;if(!a)return Vn;var i,n=r._transform;return M(a,function(o){o.isTargetByCursor(t,e,n)&&(i=o)}),i}function s2(r,t){var e=r._panels;if(!e)return Vn;var a=t.__brushOption.panelId;return a!=null?e[a]:Vn}function sm(r){var t=r._covers,e=t.length;return M(t,function(a){r.group.remove(a)},r),t.length=0,!!e}function On(r,t){var e=W(r._covers,function(a){var i=a.__brushOption,n=ne(i.range);return{brushType:i.brushType,panelId:i.panelId,range:n}});r.trigger("brush",{areas:e,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function aH(r){var t=r._track;if(!t.length)return!1;var e=t[t.length-1],a=t[0],i=e[0]-a[0],n=e[1]-a[1],o=j8(i*i+n*n,.5);return o>K8}function l2(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function u2(r,t,e,a){var i=new oe;return i.add(new Te({name:"main",style:um(e),silent:!0,draggable:!0,cursor:"move",drift:fe(f2,r,t,i,["n","s","w","e"]),ondragend:fe(On,t,{isEnd:!0})})),M(a,function(n){i.add(new Te({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:fe(f2,r,t,i,n),ondragend:fe(On,t,{isEnd:!0})}))}),i}function c2(r,t,e,a){var i=a.brushStyle.lineWidth||0,n=Uo(i,J8),o=e[0][0],s=e[1][0],l=o-i/2,u=s-i/2,c=e[0][1],h=e[1][1],f=c-n+i/2,d=h-n+i/2,p=c-o,v=h-s,g=p+i,m=v+i;Ia(r,t,"main",o,s,p,v),a.transformable&&(Ia(r,t,"w",l,u,n,m),Ia(r,t,"e",f,u,n,m),Ia(r,t,"n",l,u,g,n),Ia(r,t,"s",l,d,g,n),Ia(r,t,"nw",l,u,n,n),Ia(r,t,"ne",f,u,n,n),Ia(r,t,"sw",l,d,n,n),Ia(r,t,"se",f,d,n,n))}function lm(r,t){var e=t.__brushOption,a=e.transformable,i=t.childAt(0);i.useStyle(um(e)),i.attr({silent:!a,cursor:a?"move":"default"}),M([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var o=t.childOfName(n.join("")),s=n.length===1?cm(r,n[0]):nH(r,n);o&&o.attr({silent:!a,invisible:!a,cursor:a?eH[s]+"-resize":null})})}function Ia(r,t,e,a,i,n,o){var s=t.childOfName(e);s&&s.setShape(sH(hm(r,t,[[a,i],[a+n,i+o]])))}function um(r){return ie({strokeNoScale:!0},r.brushStyle)}function h2(r,t,e,a){var i=[Hl(r,e),Hl(t,a)],n=[Uo(r,e),Uo(t,a)];return[[i[0],n[0]],[i[1],n[1]]]}function iH(r){return rn(r.group)}function cm(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},i=cc(e[t],iH(r));return a[i]}function nH(r,t){var e=[cm(r,t[0]),cm(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function f2(r,t,e,a,i,n){var o=e.__brushOption,s=r.toRectRange(o.range),l=d2(t,i,n);M(a,function(u){var c=Q8[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(h2(s[0][0],s[1][0],s[0][1],s[1][1])),im(t,e),On(t,{isEnd:!1})}function oH(r,t,e,a){var i=t.__brushOption.range,n=d2(r,e,a);M(i,function(o){o[0]+=n[0],o[1]+=n[1]}),im(r,t),On(r,{isEnd:!1})}function d2(r,t,e){var a=r.group,i=a.transformCoordToLocal(t,e),n=a.transformCoordToLocal(0,0);return[i[0]-n[0],i[1]-n[1]]}function hm(r,t,e){var a=s2(r,t);return a&&a!==Vn?a.clipPath(e,r._transform):ne(e)}function sH(r){var t=Hl(r[0][0],r[1][0]),e=Hl(r[0][1],r[1][1]),a=Uo(r[0][0],r[1][0]),i=Uo(r[0][1],r[1][1]);return{x:t,y:e,width:a-t,height:i-e}}function lH(r,t,e){if(!(!r._brushType||cH(r,t.offsetX,t.offsetY))){var a=r._zr,i=r._covers,n=om(r,t,e);if(!r._dragging)for(var o=0;o<i.length;o++){var s=i[o].__brushOption;if(n&&(n===Vn||s.panelId===n.panelId)&&Nh[s.brushType].contain(i[o],e[0],e[1]))return}n&&a.setCursorStyle("crosshair")}}function fm(r){var t=r.event;t.preventDefault&&t.preventDefault()}function dm(r,t,e){return r.childOfName("main").contain(t,e)}function p2(r,t,e,a){var i=r._creatingCover,n=r._creatingPanel,o=r._brushOption,s;if(r._track.push(e.slice()),aH(r)||i){if(n&&!i){o.brushMode==="single"&&sm(r);var l=ne(o);l.brushType=v2(l.brushType,n),l.panelId=n===Vn?null:n.panelId,i=r._creatingCover=a2(r,l),r._covers.push(i)}if(i){var u=Nh[v2(r._brushType,n)],c=i.__brushOption;c.range=u.getCreatingRange(hm(r,i,r._track)),a&&(i2(r,i),u.updateCommon(r,i)),n2(r,i),s={isEnd:a}}}else a&&o.brushMode==="single"&&o.removeOnClick&&om(r,t,e)&&sm(r)&&(s={isEnd:a,removeOnClick:!0});return s}function v2(r,t){return r==="auto"?(process.env.NODE_ENV!=="production"&&ae(t&&t.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),t.defaultBrushType):r}var uH={mousedown:function(r){if(this._dragging)g2(this,r);else if(!r.target||!r.target.draggable){fm(r);var t=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var e=this._creatingPanel=om(this,r,t);e&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(r){var t=r.offsetX,e=r.offsetY,a=this.group.transformCoordToLocal(t,e);if(lH(this,r,a),this._dragging){fm(r);var i=p2(this,r,a,!1);i&&On(this,i)}},mouseup:function(r){g2(this,r)}};function g2(r,t){if(r._dragging){fm(t);var e=t.offsetX,a=t.offsetY,i=r.group.transformCoordToLocal(e,a),n=p2(r,t,i,!0);r._dragging=!1,r._track=[],r._creatingCover=null,n&&On(r,n)}}function cH(r,t,e){var a=r._zr;return t<0||t>a.getWidth()||e<0||e>a.getHeight()}var Nh={lineX:m2(0),lineY:m2(1),rect:{createCover:function(r,t){function e(a){return a}return u2({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=l2(r);return h2(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,a){c2(r,t,e,a)},updateCommon:lm,contain:dm},polygon:{createCover:function(r,t){var e=new oe;return e.add(new Xt({name:"main",style:um(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new Zt({name:"main",draggable:!0,drift:fe(oH,r,t),ondragend:fe(On,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,a){t.childAt(0).setShape({points:hm(r,t,e)})},updateCommon:lm,contain:dm}};function m2(r){return{createCover:function(t,e){return u2({toRectRange:function(a){var i=[a,[0,100]];return r&&i.reverse(),i},fromRectRange:function(a){return a[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=l2(t),a=Hl(e[0][r],e[1][r]),i=Uo(e[0][r],e[1][r]);return[a,i]},updateCoverShape:function(t,e,a,i){var n,o=s2(t,e);if(o!==Vn&&o.getLinearBrushOtherExtent)n=o.getLinearBrushOtherExtent(r);else{var s=t._zr;n=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[a,n];r&&l.reverse(),c2(t,e,l,i)},updateCommon:lm,contain:dm}}const pm=rH;function y2(r){return r=vm(r),function(t){return X_(t,r)}}function _2(r,t){return r=vm(r),function(e){var a=t??e,i=a?r.width:r.height,n=a?r.x:r.y;return[n,n+(i||0)]}}function b2(r,t,e){var a=vm(r);return function(i,n){return a.contain(n[0],n[1])&&!_h(i,t,e)}}function vm(r){return ge.create(r)}var hH=["axisLine","axisTickLabel","axisName"],fH=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){r.prototype.init.apply(this,arguments),(this._brushController=new pm(a.getZr())).on("brush",j(this._onBrush,this))},t.prototype.render=function(e,a,i,n){if(!dH(e,a,n)){this.axisModel=e,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new oe,this.group.add(this._axisGroup),!!e.get("show")){var s=vH(e,a),l=s.coordinateSystem,u=e.getAreaSelectStyle(),c=u.width,h=e.axis.dim,f=l.getAxisLayout(h),d=F({strokeContainThreshold:c},f),p=new Ma(e,d);M(hH,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(d,u,e,s,c,i),Fs(o,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,a,i,n,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),h=ge.create({x:l[0],y:-o/2,width:u,height:o});h.x-=c,h.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:y2(h),isTargetByCursor:b2(h,s,n),getLinearBrushOtherExtent:_2(h,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(pH(i))},t.prototype._onBrush=function(e){var a=e.areas,i=this.axisModel,n=i.axis,o=W(a,function(s){return[n.coordToData(s.range[0],!0),n.coordToData(s.range[1],!0)]});(!i.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(Ke);function dH(r,t,e){return e&&e.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:e})[0]===r}function pH(r){var t=r.axis;return W(r.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function vH(r,t){return t.getComponent("parallel",r.get("parallelIndex"))}const gH=fH;var mH={type:"axisAreaSelect",event:"axisAreaSelected"};function yH(r){r.registerAction(mH,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(a){a.axis.model.setActiveIntervals(t.intervals)})}),r.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(a){a.setAxisExpand(t)})})}var _H={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function w2(r){r.registerComponentView(R8),r.registerComponentModel(O8),r.registerCoordinateSystem("parallel",X8),r.registerPreprocessor(M8),r.registerComponentModel(e2),r.registerComponentView(gH),Bo(r,"parallel",e2,_H),yH(r)}function bH(r){ye(w2),r.registerChartView(w8),r.registerSeriesModel(T8),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,A8)}var wH=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),xH=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new wH},t.prototype.buildPath=function(e,a){var i=a.extent;e.moveTo(a.x1,a.y1),e.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(e.lineTo(a.x2+i,a.y2),e.bezierCurveTo(a.cpx2+i,a.cpy2,a.cpx1+i,a.cpy1,a.x1+i,a.y1)):(e.lineTo(a.x2,a.y2+i),e.bezierCurveTo(a.cpx2,a.cpy2+i,a.cpx1,a.cpy1+i,a.x1,a.y1+i)),e.closePath()},t.prototype.highlight=function(){xa(this)},t.prototype.downplay=function(){Sa(this)},t}(_e),SH=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._focusAdjacencyDisabled=!1,e}return t.prototype.render=function(e,a,i){var n=this,o=e.getGraph(),s=this.group,l=e.layoutInfo,u=l.width,c=l.height,h=e.getData(),f=e.getData("edge"),d=e.get("orient");this._model=e,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var v=new xH,g=ue(v);g.dataIndex=p.dataIndex,g.seriesIndex=e.seriesIndex,g.dataType="edge";var m=p.getModel(),y=m.getModel("lineStyle"),_=y.get("curveness"),w=p.node1.getLayout(),x=p.node1.getModel(),S=x.get("localX"),L=x.get("localY"),C=p.node2.getLayout(),T=p.node2.getModel(),A=T.get("localX"),D=T.get("localY"),E=p.getLayout(),I,P,k,N,O,R,V,B;v.shape.extent=Math.max(1,E.dy),v.shape.orient=d,d==="vertical"?(I=(S!=null?S*u:w.x)+E.sy,P=(L!=null?L*c:w.y)+w.dy,k=(A!=null?A*u:C.x)+E.ty,N=D!=null?D*c:C.y,O=I,R=P*(1-_)+N*_,V=k,B=P*_+N*(1-_)):(I=(S!=null?S*u:w.x)+w.dx,P=(L!=null?L*c:w.y)+E.sy,k=A!=null?A*u:C.x,N=(D!=null?D*c:C.y)+E.ty,O=I*(1-_)+k*_,R=P,V=I*_+k*(1-_),B=N),v.setShape({x1:I,y1:P,x2:k,y2:N,cpx1:O,cpy1:R,cpx2:V,cpy2:B}),v.useStyle(y.getItemStyle()),x2(v.style,d,p);var H=""+m.get("value"),Y=ft(m,"edgeLabel");xt(v,Y,{labelFetcher:{getFormattedLabel:function(q,Ce,ce,he,ee,pe){return e.getFormattedLabel(q,Ce,"edge",he,nr(ee,Y.normal&&Y.normal.get("formatter"),H),pe)}},labelDataIndex:p.dataIndex,defaultText:H}),v.setTextConfig({position:"inside"});var $=m.getModel("emphasis");wt(v,m,"lineStyle",function(q){var Ce=q.getItemStyle();return x2(Ce,d,p),Ce}),s.add(v),f.setItemGraphicEl(p.dataIndex,v);var U=$.get("focus");qe(v,U==="adjacency"?p.getAdjacentDataIndices():U==="trajectory"?p.getTrajectoryDataIndices():U,$.get("blurScope"),$.get("disabled"))}),o.eachNode(function(p){var v=p.getLayout(),g=p.getModel(),m=g.get("localX"),y=g.get("localY"),_=g.getModel("emphasis"),w=g.get(["itemStyle","borderRadius"])||0,x=new Te({shape:{x:m!=null?m*u:v.x,y:y!=null?y*c:v.y,width:v.dx,height:v.dy,r:w},style:g.getModel("itemStyle").getItemStyle(),z2:10});xt(x,ft(g),{labelFetcher:{getFormattedLabel:function(L,C){return e.getFormattedLabel(L,C,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),x.disableLabelAnimation=!0,x.setStyle("fill",p.getVisual("color")),x.setStyle("decal",p.getVisual("style").decal),wt(x,g),s.add(x),h.setItemGraphicEl(p.dataIndex,x),ue(x).dataType="node";var S=_.get("focus");qe(x,S==="adjacency"?p.getAdjacentDataIndices():S==="trajectory"?p.getTrajectoryDataIndices():S,_.get("blurScope"),_.get("disabled"))}),h.eachItemGraphicEl(function(p,v){var g=h.getItemModel(v);g.get("draggable")&&(p.drift=function(m,y){n._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=y,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:h.getRawIndex(v),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){n._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&e.isAnimationEnabled()&&s.setClipPath(LH(s.getBoundingRect(),e,function(){s.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){},t.type="sankey",t}(We);function x2(r,t,e){switch(r.fill){case"source":r.fill=e.node1.getVisual("color"),r.decal=e.node1.getVisual("style").decal;break;case"target":r.fill=e.node2.getVisual("color"),r.decal=e.node2.getVisual("style").decal;break;case"gradient":var a=e.node1.getVisual("color"),i=e.node2.getVisual("color");X(a)&&X(i)&&(r.fill=new zs(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:a,offset:0},{color:i,offset:1}]))}}function LH(r,t,e){var a=new Te({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Ze(a,{shape:{width:r.width+20}},t,e),a}const TH=SH;var CH=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){var i=e.edges||e.links||[],n=e.data||e.nodes||[],o=e.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)if(o[l].depth!=null&&o[l].depth>=0)s[o[l].depth]=new Ge(o[l],this,a);else if(process.env.NODE_ENV!=="production")throw new Error("levels[i].depth is mandatory and should be natural number");var u=UC(n,i,this,!0,c);return u.data;function c(h,f){h.wrapMethod("getItemModel",function(d,p){var v=d.parentModel,g=v.getData().getItemLayout(p);if(g){var m=g.depth,y=v.levelModels[m];y&&(d.parentModel=y)}return d}),f.wrapMethod("getItemModel",function(d,p){var v=d.parentModel,g=v.getGraph().getEdgeByIndex(p),m=g.node1.getLayout();if(m){var y=m.depth,_=v.levelModels[y];_&&(d.parentModel=_)}return d})}},t.prototype.setNodePosition=function(e,a){var i=this.option.data||this.option.nodes,n=i[e];n.localX=a[0],n.localY=a[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,a,i){function n(d){return isNaN(d)||d==null}if(i==="edge"){var o=this.getDataParams(e,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return dt("nameValue",{name:u,value:l,noValue:n(l)})}else{var c=this.getGraph().getNodeByIndex(e),h=c.getLayout().value,f=this.getDataParams(e,i).data.name;return dt("nameValue",{name:f!=null?f+"":null,value:h,noValue:n(h)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(e,a){var i=r.prototype.getDataParams.call(this,e,a);if(i.value==null&&a==="node"){var n=this.getGraph().getNodeByIndex(e),o=n.getLayout().value;i.value=o}return i},t.type="series.sankey",t.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t}(Xe);const DH=CH;function AH(r,t){r.eachSeriesByType("sankey",function(e){var a=e.get("nodeWidth"),i=e.get("nodeGap"),n=MH(e,t);e.layoutInfo=n;var o=n.width,s=n.height,l=e.getGraph(),u=l.nodes,c=l.edges;IH(u);var h=Ie(u,function(v){return v.getLayout().value===0}),f=h.length!==0?0:e.get("layoutIterations"),d=e.get("orient"),p=e.get("nodeAlign");EH(u,c,a,i,o,s,f,d,p)})}function MH(r,t){return ct(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function EH(r,t,e,a,i,n,o,s,l){PH(r,t,e,i,n,s,l),VH(r,t,n,i,a,o,s),UH(r,s)}function IH(r){M(r,function(t){var e=gi(t.outEdges,Rh),a=gi(t.inEdges,Rh),i=t.getValue()||0,n=Math.max(e,a,i);t.setLayout({value:n},!0)})}function PH(r,t,e,a,i,n,o){for(var s=[],l=[],u=[],c=[],h=0,f=0;f<t.length;f++)s[f]=1;for(var f=0;f<r.length;f++)l[f]=r[f].inEdges.length,l[f]===0&&u.push(r[f]);for(var d=-1;u.length;){for(var p=0;p<u.length;p++){var v=u[p],g=v.hostGraph.data.getRawDataItem(v.dataIndex),m=g.depth!=null&&g.depth>=0;m&&g.depth>d&&(d=g.depth),v.setLayout({depth:m?g.depth:h},!0),n==="vertical"?v.setLayout({dy:e},!0):v.setLayout({dx:e},!0);for(var y=0;y<v.outEdges.length;y++){var _=v.outEdges[y],w=t.indexOf(_);s[w]=0;var x=_.node2,S=r.indexOf(x);--l[S]===0&&c.indexOf(x)<0&&c.push(x)}}++h,u=c,c=[]}for(var f=0;f<s.length;f++)if(s[f]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var L=d>h-1?d:h-1;o&&o!=="left"&&kH(r,o,n,L);var C=n==="vertical"?(i-e)/L:(a-e)/L;RH(r,C,n)}function S2(r){var t=r.hostGraph.data.getRawDataItem(r.dataIndex);return t.depth!=null&&t.depth>=0}function kH(r,t,e,a){if(t==="right"){for(var i=[],n=r,o=0;n.length;){for(var s=0;s<n.length;s++){var l=n[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];i.indexOf(c.node1)<0&&i.push(c.node1)}}n=i,i=[],++o}M(r,function(h){S2(h)||h.setLayout({depth:Math.max(0,a-h.getLayout().skNodeHeight)},!0)})}else t==="justify"&&NH(r,a)}function NH(r,t){M(r,function(e){!S2(e)&&!e.outEdges.length&&e.setLayout({depth:t},!0)})}function RH(r,t,e){M(r,function(a){var i=a.getLayout().depth*t;e==="vertical"?a.setLayout({y:i},!0):a.setLayout({x:i},!0)})}function VH(r,t,e,a,i,n,o){var s=OH(r,o);zH(s,t,e,a,i,o),gm(s,i,e,a,o);for(var l=1;n>0;n--)l*=.99,BH(s,l,o),gm(s,i,e,a,o),$H(s,l,o),gm(s,i,e,a,o)}function OH(r,t){var e=[],a=t==="vertical"?"y":"x",i=Ld(r,function(n){return n.getLayout()[a]});return i.keys.sort(function(n,o){return n-o}),M(i.keys,function(n){e.push(i.buckets.get(n))}),e}function zH(r,t,e,a,i,n){var o=1/0;M(r,function(s){var l=s.length,u=0;M(s,function(h){u+=h.getLayout().value});var c=n==="vertical"?(a-(l-1)*i)/u:(e-(l-1)*i)/u;c<o&&(o=c)}),M(r,function(s){M(s,function(l,u){var c=l.getLayout().value*o;n==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),M(t,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function gm(r,t,e,a,i){var n=i==="vertical"?"x":"y";M(r,function(o){o.sort(function(v,g){return v.getLayout()[n]-g.getLayout()[n]});for(var s,l,u,c=0,h=o.length,f=i==="vertical"?"dx":"dy",d=0;d<h;d++)l=o[d],u=c-l.getLayout()[n],u>0&&(s=l.getLayout()[n]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[n]+l.getLayout()[f]+t;var p=i==="vertical"?a:e;if(u=c-t-p,u>0){s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var d=h-2;d>=0;--d)l=o[d],u=l.getLayout()[n]+l.getLayout()[f]+t-c,u>0&&(s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[n]}})}function BH(r,t,e){M(r.slice().reverse(),function(a){M(a,function(i){if(i.outEdges.length){var n=gi(i.outEdges,FH,e)/gi(i.outEdges,Rh);if(isNaN(n)){var o=i.outEdges.length;n=o?gi(i.outEdges,GH,e)/o:0}if(e==="vertical"){var s=i.getLayout().x+(n-vi(i,e))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-vi(i,e))*t;i.setLayout({y:l},!0)}}})})}function FH(r,t){return vi(r.node2,t)*r.getValue()}function GH(r,t){return vi(r.node2,t)}function WH(r,t){return vi(r.node1,t)*r.getValue()}function HH(r,t){return vi(r.node1,t)}function vi(r,t){return t==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Rh(r){return r.getValue()}function gi(r,t,e){for(var a=0,i=r.length,n=-1;++n<i;){var o=+t(r[n],e);isNaN(o)||(a+=o)}return a}function $H(r,t,e){M(r,function(a){M(a,function(i){if(i.inEdges.length){var n=gi(i.inEdges,WH,e)/gi(i.inEdges,Rh);if(isNaN(n)){var o=i.inEdges.length;n=o?gi(i.inEdges,HH,e)/o:0}if(e==="vertical"){var s=i.getLayout().x+(n-vi(i,e))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-vi(i,e))*t;i.setLayout({y:l},!0)}}})})}function UH(r,t){var e=t==="vertical"?"x":"y";M(r,function(a){a.outEdges.sort(function(i,n){return i.node2.getLayout()[e]-n.node2.getLayout()[e]}),a.inEdges.sort(function(i,n){return i.node1.getLayout()[e]-n.node1.getLayout()[e]})}),M(r,function(a){var i=0,n=0;M(a.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),M(a.inEdges,function(o){o.setLayout({ty:n},!0),n+=o.getLayout().dy})})}function YH(r){r.eachSeriesByType("sankey",function(t){var e=t.getGraph(),a=e.nodes,i=e.edges;if(a.length){var n=1/0,o=-1/0;M(a,function(s){var l=s.getLayout().value;l<n&&(n=l),l>o&&(o=l)}),M(a,function(s){var l=new Lt({type:"color",mappingMethod:"linear",dataExtent:[n,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&M(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function ZH(r){r.registerChartView(TH),r.registerSeriesModel(DH),r.registerLayout(AH),r.registerVisual(YH),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(a){a.setNodePosition(t.dataIndex,[t.localX,t.localY])})})}var L2=function(){function r(){}return r.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&e.get(t)!=null},r.prototype.getInitialData=function(t,e){var a,i=e.getComponent("xAxis",this.get("xAxisIndex")),n=e.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=n.get("type"),l;o==="category"?(t.layout="horizontal",a=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",a=n.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],c=t.layout==="horizontal"?0:1,h=this._baseAxisDim=u[c],f=u[1-c],d=[i,n],p=d[c].get("type"),v=d[1-c].get("type"),g=t.data;if(g&&l){var m=[];M(g,function(w,x){var S;G(w)?(S=w.slice(),w.unshift(x)):G(w.value)?(S=F({},w),S.value=S.value.slice(),w.value.unshift(x)):S=w,m.push(S)}),t.data=m}var y=this.defaultValueDimensions,_=[{name:h,type:Yc(p),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:Yc(v),dimsDef:y.slice()}];return zo(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:fe(Ab,_,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r}(),T2=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],e.visualDrawType="stroke",e}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},t}(Xe);at(T2,L2,!0);const XH=T2;var jH=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){var n=e.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=e.get("layout")==="horizontal"?1:0;n.diff(s).add(function(u){if(n.hasValue(u)){var c=n.getItemLayout(u),h=C2(c,n,u,l,!0);n.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,c){var h=s.getItemGraphicEl(c);if(!n.hasValue(u)){o.remove(h);return}var f=n.getItemLayout(u);h?(kr(h),D2(f,h,n,u)):h=C2(f,n,u,l),o.add(h),n.setItemGraphicEl(u,h)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=n},t.prototype.remove=function(e){var a=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(n){n&&a.remove(n)})},t.type="boxplot",t}(We),qH=function(){function r(){}return r}(),KH=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="boxplotBoxPath",a}return t.prototype.getDefaultShape=function(){return new qH},t.prototype.buildPath=function(e,a){var i=a.points,n=0;for(e.moveTo(i[n][0],i[n][1]),n++;n<4;n++)e.lineTo(i[n][0],i[n][1]);for(e.closePath();n<i.length;n++)e.moveTo(i[n][0],i[n][1]),n++,e.lineTo(i[n][0],i[n][1])},t}(_e);function C2(r,t,e,a,i){var n=r.ends,o=new KH({shape:{points:i?JH(n,a,r):n}});return D2(r,o,t,e,i),o}function D2(r,t,e,a,i){var n=e.hostModel,o=nn[i?"initProps":"updateProps"];o(t,{shape:{points:r.ends}},n,a),t.useStyle(e.getItemVisual(a,"style")),t.style.strokeNoScale=!0,t.z2=100;var s=e.getItemModel(a),l=s.getModel("emphasis");wt(t,s),qe(t,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function JH(r,t,e){return W(r,function(a){return a=a.slice(),a[t]=e.initBaseline,a})}const QH=jH;var $l=M;function e7(r){var t=t7(r);$l(t,function(e){var a=e.seriesModels;a.length&&(r7(e),$l(a,function(i,n){a7(i,e.boxOffsetList[n],e.boxWidthList[n])}))})}function t7(r){var t=[],e=[];return r.eachSeriesByType("boxplot",function(a){var i=a.getBaseAxis(),n=me(e,i);n<0&&(n=e.length,e[n]=i,t[n]={axis:i,seriesModels:[]}),t[n].seriesModels.push(a)}),t}function r7(r){var t=r.axis,e=r.seriesModels,a=e.length,i=r.boxWidthList=[],n=r.boxOffsetList=[],o=[],s;if(t.type==="category")s=t.getBandWidth();else{var l=0;$l(e,function(p){l=Math.max(l,p.getData().count())});var u=t.getExtent();s=Math.abs(u[1]-u[0])/l}$l(e,function(p){var v=p.get("boxWidth");G(v)||(v=[v,v]),o.push([Z(v[0],s)||0,Z(v[1],s)||0])});var c=s*.8-2,h=c/a*.3,f=(c-h*(a-1))/a,d=f/2-c/2;$l(e,function(p,v){n.push(d),d+=h+f,i.push(Math.min(Math.max(f,o[v][0]),o[v][1]))})}function a7(r,t,e){var a=r.coordinateSystem,i=r.getData(),n=e/2,o=r.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=i.mapDimension(l[o]),c=i.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var h=0;h<i.count();h++){var f=i.get(u,h),d=_(f,c[2],h),p=_(f,c[0],h),v=_(f,c[1],h),g=_(f,c[3],h),m=_(f,c[4],h),y=[];w(y,v,!1),w(y,g,!0),y.push(p,v,m,g),x(y,p),x(y,m),x(y,d),i.setItemLayout(h,{initBaseline:d[s],ends:y})}function _(S,L,C){var T=i.get(L,C),A=[];A[o]=S,A[s]=T;var D;return isNaN(S)||isNaN(T)?D=[NaN,NaN]:(D=a.dataToPoint(A),D[o]+=t),D}function w(S,L,C){var T=L.slice(),A=L.slice();T[o]+=n,A[o]-=n,C?S.push(T,A):S.push(A,T)}function x(S,L){var C=L.slice(),T=L.slice();C[o]-=n,T[o]+=n,S.push(C,T)}}function i7(r,t){t=t||{};for(var e=[],a=[],i=t.boundIQR,n=i==="none"||i===0,o=0;o<r.length;o++){var s=cr(r[o].slice()),l=bd(s,.25),u=bd(s,.5),c=bd(s,.75),h=s[0],f=s[s.length-1],d=(i??1.5)*(c-l),p=n?h:Math.max(h,l-d),v=n?f:Math.min(f,c+d),g=t.itemNameFormatter,m=te(g)?g({value:o}):X(g)?g.replace("{value}",o+""):o+"";e.push([m,p,l,u,c,v]);for(var y=0;y<s.length;y++){var _=s[y];if(_<p||_>v){var w=[m,_];a.push(w)}}}return{boxData:e,outliers:a}}var n7={type:"echarts:boxplot",transform:function(t){var e=t.upstream;if(e.sourceFormat!==Et){var a="";process.env.NODE_ENV!=="production"&&(a=Ot("source data is not applicable for this boxplot transform. Expect number[][].")),Pe(a)}var i=i7(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function o7(r){r.registerSeriesModel(XH),r.registerChartView(QH),r.registerLayout(e7),r.registerTransform(n7)}var s7=["itemStyle","borderColor"],l7=["itemStyle","borderColor0"],u7=["itemStyle","borderColorDoji"],c7=["itemStyle","color"],h7=["itemStyle","color0"];function mm(r,t){return t.get(r>0?c7:h7)}function ym(r,t){return t.get(r===0?u7:r>0?s7:l7)}var f7={seriesType:"candlestick",plan:To(),performRawSeries:!0,reset:function(r,t){if(!t.isSeriesFiltered(r)){var e=r.pipelineContext.large;return!e&&{progress:function(a,i){for(var n;(n=a.next())!=null;){var o=i.getItemModel(n),s=i.getItemLayout(n).sign,l=o.getItemStyle();l.fill=mm(s,o),l.stroke=ym(s,o)||l.fill;var u=i.ensureUniqueItemVisual(n,"style");F(u,l)}}}}}};const d7=f7;var p7=["color","borderColor"],v7=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,a,i){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,a,i,n){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,a):this._incrementalRenderNormal(e,a)},t.prototype.eachRendered=function(e){ti(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var a=e.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},t.prototype._renderNormal=function(e){var a=e.getData(),i=this._data,n=this.group,o=a.getLayout("isSimpleBox"),s=e.get("clip",!0),l=e.coordinateSystem,u=l.getArea&&l.getArea();this._data||n.removeAll(),a.diff(i).add(function(c){if(a.hasValue(c)){var h=a.getItemLayout(c);if(s&&A2(u,h))return;var f=_m(h,c,!0);Ze(f,{shape:{points:h.ends}},e,c),bm(f,a,c,o),n.add(f),a.setItemGraphicEl(c,f)}}).update(function(c,h){var f=i.getItemGraphicEl(h);if(!a.hasValue(c)){n.remove(f);return}var d=a.getItemLayout(c);if(s&&A2(u,d)){n.remove(f);return}f?(Me(f,{shape:{points:d.ends}},e,c),kr(f)):f=_m(d),bm(f,a,c,o),n.add(f),a.setItemGraphicEl(c,f)}).remove(function(c){var h=i.getItemGraphicEl(c);h&&n.remove(h)}).execute(),this._data=a},t.prototype._renderLarge=function(e){this._clear(),M2(e,this.group);var a=e.get("clip",!0)?Sl(e.coordinateSystem,!1,e):null;a?this.group.setClipPath(a):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,a){for(var i=a.getData(),n=i.getLayout("isSimpleBox"),o;(o=e.next())!=null;){var s=i.getItemLayout(o),l=_m(s);bm(l,i,o,n),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(e,a){M2(a,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(We),g7=function(){function r(){}return r}(),m7=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="normalCandlestickBox",a}return t.prototype.getDefaultShape=function(){return new g7},t.prototype.buildPath=function(e,a){var i=a.points;this.__simpleBox?(e.moveTo(i[4][0],i[4][1]),e.lineTo(i[6][0],i[6][1])):(e.moveTo(i[0][0],i[0][1]),e.lineTo(i[1][0],i[1][1]),e.lineTo(i[2][0],i[2][1]),e.lineTo(i[3][0],i[3][1]),e.closePath(),e.moveTo(i[4][0],i[4][1]),e.lineTo(i[5][0],i[5][1]),e.moveTo(i[6][0],i[6][1]),e.lineTo(i[7][0],i[7][1]))},t}(_e);function _m(r,t,e){var a=r.ends;return new m7({shape:{points:e?y7(a,r):a},z2:100})}function A2(r,t){for(var e=!0,a=0;a<t.ends.length;a++)if(r.contain(t.ends[a][0],t.ends[a][1])){e=!1;break}return e}function bm(r,t,e,a){var i=t.getItemModel(e);r.useStyle(t.getItemVisual(e,"style")),r.style.strokeNoScale=!0,r.__simpleBox=a,wt(r,i);var n=t.getItemLayout(e).sign;M(r.states,function(s,l){var u=i.getModel(l),c=mm(n,u),h=ym(n,u)||c,f=s.style||(s.style={});c&&(f.fill=c),h&&(f.stroke=h)});var o=i.getModel("emphasis");qe(r,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function y7(r,t){return W(r,function(e){return e=e.slice(),e[1]=t.initBaseline,e})}var _7=function(){function r(){}return r}(),wm=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="largeCandlestickBox",a}return t.prototype.getDefaultShape=function(){return new _7},t.prototype.buildPath=function(e,a){for(var i=a.points,n=0;n<i.length;)if(this.__sign===i[n++]){var o=i[n++];e.moveTo(o,i[n++]),e.lineTo(o,i[n++])}else n+=3},t}(_e);function M2(r,t,e,a){var i=r.getData(),n=i.getLayout("largePoints"),o=new wm({shape:{points:n},__sign:1,ignoreCoarsePointer:!0});t.add(o);var s=new wm({shape:{points:n},__sign:-1,ignoreCoarsePointer:!0});t.add(s);var l=new wm({shape:{points:n},__sign:0,ignoreCoarsePointer:!0});t.add(l),xm(1,o,r),xm(-1,s,r),xm(0,l,r),a&&(o.incremental=!0,s.incremental=!0),e&&e.push(o,s)}function xm(r,t,e,a){var i=ym(r,e)||mm(r,e),n=e.getModel("itemStyle").getItemStyle(p7);t.useStyle(n),t.style.fill=null,t.style.stroke=i}const b7=v7;var E2=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],e}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,a,i){var n=a.getItemLayout(e);return n&&i.rect(n.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(Xe);at(E2,L2,!0);const w7=E2;function x7(r){!r||!G(r.series)||M(r.series,function(t){re(t)&&t.type==="k"&&(t.type="candlestick")})}var S7={seriesType:"candlestick",plan:To(),reset:function(r){var t=r.coordinateSystem,e=r.getData(),a=L7(r,e),i=0,n=1,o=["x","y"],s=e.getDimensionIndex(e.mapDimension(o[i])),l=W(e.mapDimensionsAll(o[n]),e.getDimensionIndex,e),u=l[0],c=l[1],h=l[2],f=l[3];if(e.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?p:d};function d(v,g){for(var m,y=g.getStore();(m=v.next())!=null;){var _=y.get(s,m),w=y.get(u,m),x=y.get(c,m),S=y.get(h,m),L=y.get(f,m),C=Math.min(w,x),T=Math.max(w,x),A=O(C,_),D=O(T,_),E=O(S,_),I=O(L,_),P=[];R(P,D,0),R(P,A,1),P.push(B(I),B(D),B(E),B(A));var k=g.getItemModel(m),N=!!k.get(["itemStyle","borderColorDoji"]);g.setItemLayout(m,{sign:I2(y,m,w,x,c,N),initBaseline:w>x?D[n]:A[n],ends:P,brushRect:V(S,L,_)})}function O(H,Y){var $=[];return $[i]=Y,$[n]=H,isNaN(Y)||isNaN(H)?[NaN,NaN]:t.dataToPoint($)}function R(H,Y,$){var U=Y.slice(),q=Y.slice();U[i]=uc(U[i]+a/2,1,!1),q[i]=uc(q[i]-a/2,1,!0),$?H.push(U,q):H.push(q,U)}function V(H,Y,$){var U=O(H,$),q=O(Y,$);return U[i]-=a/2,q[i]-=a/2,{x:U[0],y:U[1],width:a,height:q[1]-U[1]}}function B(H){return H[i]=uc(H[i],1),H}}function p(v,g){for(var m=aa(v.count*4),y=0,_,w=[],x=[],S,L=g.getStore(),C=!!r.get(["itemStyle","borderColorDoji"]);(S=v.next())!=null;){var T=L.get(s,S),A=L.get(u,S),D=L.get(c,S),E=L.get(h,S),I=L.get(f,S);if(isNaN(T)||isNaN(E)||isNaN(I)){m[y++]=NaN,y+=3;continue}m[y++]=I2(L,S,A,D,c,C),w[i]=T,w[n]=E,_=t.dataToPoint(w,null,x),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,w[n]=I,_=t.dataToPoint(w,null,x),m[y++]=_?_[1]:NaN}g.setLayout("largePoints",m)}}};function I2(r,t,e,a,i,n){var o;return e>a?o=-1:e<a?o=1:o=n?0:t>0?r.get(i,t-1)<=a?1:-1:1,o}function L7(r,t){var e=r.getBaseAxis(),a,i=e.type==="category"?e.getBandWidth():(a=e.getExtent(),Math.abs(a[1]-a[0])/t.count()),n=Z(le(r.get("barMaxWidth"),i),i),o=Z(le(r.get("barMinWidth"),1),i),s=r.get("barWidth");return s!=null?Z(s,i):Math.max(Math.min(i/2,n),o)}const T7=S7;function C7(r){r.registerChartView(b7),r.registerSeriesModel(w7),r.registerPreprocessor(x7),r.registerVisual(d7),r.registerLayout(T7)}function P2(r,t){var e=t.rippleEffectColor||t.color;r.eachChild(function(a){a.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?e:null,fill:t.brushType==="fill"?e:null}})})}var D7=function(r){z(t,r);function t(e,a){var i=r.call(this)||this,n=new wl(e,a),o=new oe;return i.add(n),i.add(o),i.updateData(e,a),i}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var a=e.symbolType,i=e.color,n=e.rippleNumber,o=this.childAt(1),s=0;s<n;s++){var l=lt(a,-1,-1,2,2,i);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/n*e.period+e.effectOffset;l.animate("",!0).when(e.period,{scaleX:e.rippleScale/2,scaleY:e.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(e.period,{opacity:0}).delay(u).start(),o.add(l)}P2(o,e)},t.prototype.updateEffectAnimation=function(e){for(var a=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale","rippleNumber"],o=0;o<n.length;o++){var s=n[o];if(a[s]!==e[s]){this.stopEffectAnimation(),this.startEffectAnimation(e);return}}P2(i,e)},t.prototype.highlight=function(){xa(this)},t.prototype.downplay=function(){Sa(this)},t.prototype.getSymbolType=function(){var e=this.childAt(0);return e&&e.getSymbolType()},t.prototype.updateData=function(e,a){var i=this,n=e.hostModel;this.childAt(0).updateData(e,a);var o=this.childAt(1),s=e.getItemModel(a),l=e.getItemVisual(a,"symbol"),u=Ao(e.getItemVisual(a,"symbolSize")),c=e.getItemVisual(a,"style"),h=c&&c.fill,f=s.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",h)});var d=pn(e.getItemVisual(a,"symbolOffset"),u);d&&(o.x=d[0],o.y=d[1]);var p=e.getItemVisual(a,"symbolRotate");o.rotation=(p||0)*Math.PI/180||0;var v={};v.showEffectOn=n.get("showEffectOn"),v.rippleScale=s.get(["rippleEffect","scale"]),v.brushType=s.get(["rippleEffect","brushType"]),v.period=s.get(["rippleEffect","period"])*1e3,v.effectOffset=a/e.count(),v.z=n.getShallow("z")||0,v.zlevel=n.getShallow("zlevel")||0,v.symbolType=l,v.color=h,v.rippleEffectColor=s.get(["rippleEffect","color"]),v.rippleNumber=s.get(["rippleEffect","number"]),v.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(v):this.startEffectAnimation(v),this._effectCfg=v):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?v.showEffectOn!=="render"&&i.startEffectAnimation(v):g==="normal"&&v.showEffectOn!=="render"&&i.stopEffectAnimation()}),this._effectCfg=v,qe(this,f.get("focus"),f.get("blurScope"),f.get("disabled"))},t.prototype.fadeOut=function(e){e&&e()},t}(oe);const A7=D7;var M7=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this._symbolDraw=new xl(A7)},t.prototype.render=function(e,a,i){var n=e.getData(),o=this._symbolDraw;o.updateData(n,{clipShape:this._getClipShape(e)}),this.group.add(o.group)},t.prototype._getClipShape=function(e){var a=e.coordinateSystem,i=a&&a.getArea&&a.getArea();return e.get("clip",!0)?i:null},t.prototype.updateTransform=function(e,a,i){var n=e.getData();this.group.dirty();var o=Ll("").reset(e,a,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(e){var a=e.coordinateSystem;a&&a.getRoamTransform&&(this.group.transform=JP(a.getRoamTransform()),this.group.decomposeTransform())},t.prototype.remove=function(e,a){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t}(We);const E7=M7;var I7=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,a){return Da(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(e,a,i){return i.point(a.getItemLayout(e))},t.type="series.effectScatter",t.dependencies=["grid","polar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},t}(Xe);const P7=I7;function k7(r){r.registerChartView(E7),r.registerSeriesModel(P7),r.registerLayout(Ll("effectScatter"))}var N7=function(r){z(t,r);function t(e,a,i){var n=r.call(this)||this;return n.add(n.createLine(e,a,i)),n._updateEffectSymbol(e,a),n}return t.prototype.createLine=function(e,a,i){return new Yg(e,a,i)},t.prototype._updateEffectSymbol=function(e,a){var i=e.getItemModel(a),n=i.getModel("effect"),o=n.get("symbolSize"),s=n.get("symbol");G(o)||(o=[o,o]);var l=e.getItemVisual(a,"style"),u=n.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=lt(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(n.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(e,n,a))},t.prototype._updateEffectAnimation=function(e,a,i){var n=this.childAt(1);if(n){var o=e.getItemLayout(i),s=a.get("period")*1e3,l=a.get("loop"),u=a.get("roundTrip"),c=a.get("constantSpeed"),h=it(a.get("delay"),function(d){return d/e.count()*s/3});if(n.ignore=!0,this._updateAnimationPoints(n,o),c>0&&(s=this._getLineLength(n)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){n.stopAnimation();var f=void 0;te(h)?f=h(i):f=h,n.__t>0&&(f=-s*n.__t),this._animateSymbol(n,s,f,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(e,a,i,n,o){if(a>0){e.__t=0;var s=this,l=e.animate("",n).when(o?a*2:a,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(e)});n||l.done(function(){s.remove(e)}),l.start()}},t.prototype._getLineLength=function(e){return Fa(e.__p1,e.__cp1)+Fa(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,a){e.__p1=a[0],e.__p2=a[1],e.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},t.prototype.updateData=function(e,a,i){this.childAt(0).updateData(e,a,i),this._updateEffectSymbol(e,a)},t.prototype._updateSymbolPosition=function(e){var a=e.__p1,i=e.__p2,n=e.__cp1,o=e.__t<1?e.__t:2-e.__t,s=[e.x,e.y],l=s.slice(),u=gt,c=Ff;s[0]=u(a[0],n[0],i[0],o),s[1]=u(a[1],n[1],i[1],o);var h=e.__t<1?c(a[0],n[0],i[0],o):c(i[0],n[0],a[0],1-o),f=e.__t<1?c(a[1],n[1],i[1],o):c(i[1],n[1],a[1],1-o);e.rotation=-Math.atan2(f,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(e.__lastT!==void 0&&e.__lastT<e.__t?(e.scaleY=Fa(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):e.__lastT===1?e.scaleY=2*Fa(a,s):e.scaleY=this._symbolScale[1]),e.__lastT=e.__t,e.ignore=!1,e.x=s[0],e.y=s[1]},t.prototype.updateLayout=function(e,a){this.childAt(0).updateLayout(e,a);var i=e.getItemModel(a).getModel("effect");this._updateEffectAnimation(e,i,a)},t}(oe);const k2=N7;var R7=function(r){z(t,r);function t(e,a,i){var n=r.call(this)||this;return n._createPolyline(e,a,i),n}return t.prototype._createPolyline=function(e,a,i){var n=e.getItemLayout(a),o=new Xt({shape:{points:n}});this.add(o),this._updateCommonStl(e,a,i)},t.prototype.updateData=function(e,a,i){var n=e.hostModel,o=this.childAt(0),s={shape:{points:e.getItemLayout(a)}};Me(o,s,n,a),this._updateCommonStl(e,a,i)},t.prototype._updateCommonStl=function(e,a,i){var n=this.childAt(0),o=e.getItemModel(a),s=i&&i.emphasisLineStyle,l=i&&i.focus,u=i&&i.blurScope,c=i&&i.emphasisDisabled;if(!i||e.hasItemOption){var h=o.getModel("emphasis");s=h.getModel("lineStyle").getLineStyle(),c=h.get("disabled"),l=h.get("focus"),u=h.get("blurScope")}n.useStyle(e.getItemVisual(a,"style")),n.style.fill=null,n.style.strokeNoScale=!0;var f=n.ensureState("emphasis");f.style=s,qe(this,l,u,c)},t.prototype.updateLayout=function(e,a){var i=this.childAt(0);i.setShape("points",e.getItemLayout(a))},t}(oe);const N2=R7;var V7=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._lastFrame=0,e._lastFramePercent=0,e}return t.prototype.createLine=function(e,a,i){return new N2(e,a,i)},t.prototype._updateAnimationPoints=function(e,a){this._points=a;for(var i=[0],n=0,o=1;o<a.length;o++){var s=a[o-1],l=a[o];n+=Fa(s,l),i.push(n)}if(n===0){this._length=0;return}for(var o=0;o<i.length;o++)i[o]/=n;this._offsets=i,this._length=n},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(e){var a=e.__t<1?e.__t:2-e.__t,i=this._points,n=this._offsets,o=i.length;if(n){var s=this._lastFrame,l;if(a<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(n[l]<=a);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(n[l]>a);l++);l=Math.min(l-1,o-2)}var c=(a-n[l])/(n[l+1]-n[l]),h=i[l],f=i[l+1];e.x=h[0]*(1-c)+c*f[0],e.y=h[1]*(1-c)+c*f[1];var d=e.__t<1?f[0]-h[0]:h[0]-f[0],p=e.__t<1?f[1]-h[1]:h[1]-f[1];e.rotation=-Math.atan2(p,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,e.ignore=!1}},t}(k2);const O7=V7;var z7=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),B7=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new z7},t.prototype.buildPath=function(e,a){var i=a.segs,n=a.curveness,o;if(a.polyline)for(o=this._off;o<i.length;){var s=i[o++];if(s>0){e.moveTo(i[o++],i[o++]);for(var l=1;l<s;l++)e.lineTo(i[o++],i[o++])}}else for(o=this._off;o<i.length;){var u=i[o++],c=i[o++],h=i[o++],f=i[o++];if(e.moveTo(u,c),n>0){var d=(u+h)/2-(c-f)*n,p=(c+f)/2-(h-u)*n;e.quadraticCurveTo(d,p,h,f)}else e.lineTo(h,f)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(e,a){var i=this.shape,n=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u<n.length;){var c=n[u++];if(c>0)for(var h=n[u++],f=n[u++],d=1;d<c;d++){var p=n[u++],v=n[u++];if(qa(h,f,p,v,s,e,a))return l}l++}else for(var l=0,u=0;u<n.length;){var h=n[u++],f=n[u++],p=n[u++],v=n[u++];if(o>0){var g=(h+p)/2-(f-v)*o,m=(f+v)/2-(p-h)*o;if(R1(h,f,g,m,p,v,s,e,a))return l}else if(qa(h,f,p,v,s,e,a))return l;l++}return-1},t.prototype.contain=function(e,a){var i=this.transformCoordToLocal(e,a),n=this.getBoundingRect();if(e=i[0],a=i[1],n.contain(e,a)){var o=this.hoverDataIdx=this.findDataIndex(e,a);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,i=a.segs,n=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<i.length;){var c=i[u++],h=i[u++];n=Math.min(c,n),s=Math.max(c,s),o=Math.min(h,o),l=Math.max(h,l)}e=this._rect=new ge(n,o,s,l)}return e},t}(_e),F7=function(){function r(){this.group=new oe}return r.prototype.updateData=function(t){this._clear();var e=this._create();e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t)},r.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(t,e){var a=this._newAdded[0],i=e.getLayout("linesPoints"),n=a&&a.shape.segs;if(n&&n.length<2e4){var o=n.length,s=new Float32Array(o+i.length);s.set(n),s.set(i,o),a.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:i}),this._setCommon(l,e),l.__startIndex=t.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},r.prototype._create=function(){var t=new B7({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(t),this.group.add(t),t},r.prototype._setCommon=function(t,e,a){var i=e.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var n=e.getVisual("style");n&&n.stroke&&t.setStyle("stroke",n.stroke),t.setStyle("fill",null);var o=ue(t);o.seriesIndex=i.seriesIndex,t.on("mousemove",function(s){o.dataIndex=null;var l=t.hoverDataIdx;l>0&&(o.dataIndex=l+t.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const G7=F7;var W7={seriesType:"lines",plan:To(),reset:function(r){var t=r.coordinateSystem;if(!t){process.env.NODE_ENV!=="production"&&_t("The lines series must have a coordinate system.");return}var e=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(i,n){var o=[];if(a){var s=void 0,l=i.end-i.start;if(e){for(var u=0,c=i.start;c<i.end;c++)u+=r.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var h=0,f=[],c=i.start;c<i.end;c++){var d=r.getLineCoords(c,o);e&&(s[h++]=d);for(var p=0;p<d;p++)f=t.dataToPoint(o[p],!1,f),s[h++]=f[0],s[h++]=f[1]}n.setLayout("linesPoints",s)}else for(var c=i.start;c<i.end;c++){var v=n.getItemModel(c),d=r.getLineCoords(c,o),g=[];if(e)for(var m=0;m<d;m++)g.push(t.dataToPoint(o[m]));else{g[0]=t.dataToPoint(o[0]),g[1]=t.dataToPoint(o[1]);var y=v.get(["lineStyle","curveness"]);+y&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*y,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*y])}n.setItemLayout(c,g)}}}}};const R2=W7;var H7=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){var n=e.getData(),o=this._updateLineDraw(n,e),s=e.get("zlevel"),l=e.get(["effect","trailLength"]),u=i.getZr(),c=u.painter.getType()==="svg";c||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!c&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&l>0&&(c?process.env.NODE_ENV!=="production"&&console.warn("SVG render mode doesn't support lines with trail effect"):u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(n);var h=e.get("clip",!0)&&Sl(e.coordinateSystem,!1,e);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,i){var n=e.getData(),o=this._updateLineDraw(n,e);o.incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},t.prototype.incrementalRender=function(e,a,i){this._lineDraw.incrementalUpdate(e,a.getData()),this._finished=e.end===a.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,a,i){var n=e.getData(),o=e.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=R2.reset(e,a,i);s.progress&&s.progress({start:0,end:n.count(),count:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},t.prototype._updateLineDraw=function(e,a){var i=this._lineDraw,n=this._showEffect(a),o=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return process.env.NODE_ENV!=="production"&&n&&l&&console.warn("Large lines not support effect"),(!i||n!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new G7:new Xg(o?n?O7:N2:n?k2:Yg),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var a=e.getZr(),i=a.painter.getType()==="svg";!i&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},t.prototype.dispose=function(e,a){this.remove(e,a)},t.type="lines",t}(We);const $7=H7;var U7=typeof Uint32Array>"u"?Array:Uint32Array,Y7=typeof Float64Array>"u"?Array:Float64Array;function V2(r){var t=r.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(process.env.NODE_ENV!=="production"&&console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),r.data=W(t,function(e){var a=[e[0].coord,e[1].coord],i={coords:a};return e[0].name&&(i.fromName=e[0].name),e[1].name&&(i.toName=e[1].name),_f([i,e[0],e[1]])}))}var Z7=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.init=function(e){e.data=e.data||[],V2(e);var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(e){if(V2(e),e.data){var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var a=this._processFlatCoordsArray(e.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=ss(this._flatCoords,a.flatCoords),this._flatCoordsOffset=ss(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),e.data=new Float32Array(a.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var a=this.getData().getItemModel(e),i=a.option instanceof Array?a.option:a.getShallow("coords");if(process.env.NODE_ENV!=="production"&&!(i instanceof Array&&i.length>0&&i[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(i)+". Lines must have 2d coords array in data item.");return i},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,a){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[e*2],n=this._flatCoordsOffset[e*2+1],o=0;o<n;o++)a[o]=a[o]||[],a[o][0]=this._flatCoords[i+o*2],a[o][1]=this._flatCoords[i+o*2+1];return n}else{for(var s=this._getCoordsFromItemModel(e),o=0;o<s.length;o++)a[o]=a[o]||[],a[o][0]=s[o][0],a[o][1]=s[o][1];return s.length}},t.prototype._processFlatCoordsArray=function(e){var a=0;if(this._flatCoords&&(a=this._flatCoords.length),De(e[0])){for(var i=e.length,n=new U7(i),o=new Y7(i),s=0,l=0,u=0,c=0;c<i;){u++;var h=e[c++];n[l++]=s+a,n[l++]=h;for(var f=0;f<h;f++){var d=e[c++],p=e[c++];if(o[s++]=d,o[s++]=p,c>i&&process.env.NODE_ENV!=="production")throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},t.prototype.getInitialData=function(e,a){if(process.env.NODE_ENV!=="production"){var i=wo.get(e.coordinateSystem);if(!i)throw new Error("Unknown coordinate system "+e.coordinateSystem)}var n=new Ft(["value"],this);return n.hasItemOption=!1,n.initData(e.data,[],function(o,s,l,u){if(o instanceof Array)return NaN;n.hasItemOption=!0;var c=o.value;if(c!=null)return c instanceof Array?c[u]:c}),n},t.prototype.formatTooltip=function(e,a,i){var n=this.getData(),o=n.getItemModel(e),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),dt("nameValue",{name:c.join(" > ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?1e4:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?2e4:this.get("progressiveThreshold"))},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),a=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&a>0?a+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(Xe);const X7=Z7;function Vh(r){return r instanceof Array||(r=[r,r]),r}var j7={seriesType:"lines",reset:function(r){var t=Vh(r.get("symbol")),e=Vh(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",t&&t[0]),a.setVisual("toSymbol",t&&t[1]),a.setVisual("fromSymbolSize",e&&e[0]),a.setVisual("toSymbolSize",e&&e[1]);function i(n,o){var s=n.getItemModel(o),l=Vh(s.getShallow("symbol",!0)),u=Vh(s.getShallow("symbolSize",!0));l[0]&&n.setItemVisual(o,"fromSymbol",l[0]),l[1]&&n.setItemVisual(o,"toSymbol",l[1]),u[0]&&n.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&n.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?i:null}}};const q7=j7;function K7(r){r.registerChartView($7),r.registerSeriesModel(X7),r.registerLayout(R2),r.registerVisual(q7)}var J7=256,Q7=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=Ba.createCanvas();this.canvas=t}return r.prototype.update=function(t,e,a,i,n,o){var s=this._getBrush(),l=this._getGradient(n,"inRange"),u=this._getGradient(n,"outOfRange"),c=this.pointSize+this.blurSize,h=this.canvas,f=h.getContext("2d"),d=t.length;h.width=e,h.height=a;for(var p=0;p<d;++p){var v=t[p],g=v[0],m=v[1],y=v[2],_=i(y);f.globalAlpha=_,f.drawImage(s,g-c,m-c)}if(!h.width||!h.height)return h;for(var w=f.getImageData(0,0,h.width,h.height),x=w.data,S=0,L=x.length,C=this.minOpacity,T=this.maxOpacity,A=T-C;S<L;){var _=x[S+3]/256,D=Math.floor(_*(J7-1))*4;if(_>0){var E=o(_)?l:u;_>0&&(_=_*A+C),x[S++]=E[D],x[S++]=E[D+1],x[S++]=E[D+2],x[S++]=E[D+3]*_*256}else S+=4}return f.putImageData(w,0,0),h},r.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=Ba.createCanvas()),e=this.pointSize+this.blurSize,a=e*2;t.width=a,t.height=a;var i=t.getContext("2d");return i.clearRect(0,0,a,a),i.shadowOffsetX=a,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),t},r.prototype._getGradient=function(t,e){for(var a=this._gradientPixels,i=a[e]||(a[e]=new Uint8ClampedArray(256*4)),n=[0,0,0,0],o=0,s=0;s<256;s++)t[e](s/255,!0,n),i[o++]=n[0],i[o++]=n[1],i[o++]=n[2],i[o++]=n[3];return i},r}();const e9=Q7;function t9(r,t,e){var a=r[1]-r[0];t=W(t,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var i=t.length,n=0;return function(o){var s;for(s=n;s<i;s++){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}if(s===i)for(s=n-1;s>=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}return s>=0&&s<i&&e[s]}}function r9(r,t){var e=r[1]-r[0];return t=[(t[0]-r[0])/e,(t[1]-r[0])/e],function(a){return a>=t[0]&&a<=t[1]}}function O2(r){var t=r.dimensions;return t[0]==="lng"&&t[1]==="lat"}var a9=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){var n;if(a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===e&&(n=s)})}),process.env.NODE_ENV!=="production"&&!n)throw new Error("Heatmap must use with visualMap");this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(e,i,0,e.getData().count()):O2(o)&&this._renderOnGeo(o,e,n,i)},t.prototype.incrementalPrepareRender=function(e,a,i){this.group.removeAll()},t.prototype.incrementalRender=function(e,a,i,n){var o=a.coordinateSystem;o&&(O2(o)?this.render(a,i,n):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(a,n,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){ti(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,a,i,n,o){var s=e.coordinateSystem,l=Cn(s,"cartesian2d"),u,c,h,f;if(l){var d=s.getAxis("x"),p=s.getAxis("y");if(process.env.NODE_ENV!=="production"){if(!(d.type==="category"&&p.type==="category"))throw new Error("Heatmap on cartesian must have two category axes");if(!(d.onBand&&p.onBand))throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}u=d.getBandWidth()+.5,c=p.getBandWidth()+.5,h=d.scale.getExtent(),f=p.scale.getExtent()}for(var v=this.group,g=e.getData(),m=e.getModel(["emphasis","itemStyle"]).getItemStyle(),y=e.getModel(["blur","itemStyle"]).getItemStyle(),_=e.getModel(["select","itemStyle"]).getItemStyle(),w=e.get(["itemStyle","borderRadius"]),x=ft(e),S=e.getModel("emphasis"),L=S.get("focus"),C=S.get("blurScope"),T=S.get("disabled"),A=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],D=i;D<n;D++){var E=void 0,I=g.getItemVisual(D,"style");if(l){var P=g.get(A[0],D),k=g.get(A[1],D);if(isNaN(g.get(A[2],D))||isNaN(P)||isNaN(k)||P<h[0]||P>h[1]||k<f[0]||k>f[1])continue;var N=s.dataToPoint([P,k]);E=new Te({shape:{x:N[0]-u/2,y:N[1]-c/2,width:u,height:c},style:I})}else{if(isNaN(g.get(A[1],D)))continue;E=new Te({z2:1,shape:s.dataToRect([g.get(A[0],D)]).contentShape,style:I})}if(g.hasItemOption){var O=g.getItemModel(D),R=O.getModel("emphasis");m=R.getModel("itemStyle").getItemStyle(),y=O.getModel(["blur","itemStyle"]).getItemStyle(),_=O.getModel(["select","itemStyle"]).getItemStyle(),w=O.get(["itemStyle","borderRadius"]),L=R.get("focus"),C=R.get("blurScope"),T=R.get("disabled"),x=ft(O)}E.shape.r=w;var V=e.getRawValue(D),B="-";V&&V[2]!=null&&(B=V[2]+""),xt(E,x,{labelFetcher:e,labelDataIndex:D,defaultOpacity:I.opacity,defaultText:B}),E.ensureState("emphasis").style=m,E.ensureState("blur").style=y,E.ensureState("select").style=_,qe(E,L,C,T),E.incremental=o,o&&(E.states.emphasis.hoverLayer=!0),v.add(E),g.setItemGraphicEl(D,E),this._progressiveEls&&this._progressiveEls.push(E)}},t.prototype._renderOnGeo=function(e,a,i,n){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new e9;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var c=e.getViewRect().clone(),h=e.getRoamTransform();c.applyTransform(h);var f=Math.max(c.x,0),d=Math.max(c.y,0),p=Math.min(c.width+c.x,n.getWidth()),v=Math.min(c.height+c.y,n.getHeight()),g=p-f,m=v-d,y=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(y,function(L,C,T){var A=e.dataToPoint([L,C]);return A[0]-=f,A[1]-=d,A.push(T),A}),w=i.getExtent(),x=i.type==="visualMap.continuous"?r9(w,i.option.range):t9(w,i.getPieceList(),i.option.selected);u.update(_,g,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},x);var S=new bt({style:{width:g,height:m,x:f,y:d,image:u.canvas},silent:!0});this.group.add(S)},t.type="heatmap",t}(We);const i9=a9;var n9=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return Da(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=wo.get(this.get("coordinateSystem"));if(e&&e.dimensions)return e.dimensions[0]==="lng"&&e.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(Xe);const o9=n9;function s9(r){r.registerChartView(i9),r.registerSeriesModel(o9)}var l9=["itemStyle","borderWidth"],z2=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Sm=new Qa,u9=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){var n=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),h=l.master.getRect(),f={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:e,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:c,valueDim:z2[+c],categoryDim:z2[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var v=U2(o,p),g=B2(o,p,v,f),m=Y2(o,f,g);o.setItemGraphicEl(p,m),n.add(m),j2(m,f,g)}}).update(function(p,v){var g=s.getItemGraphicEl(v);if(!o.hasValue(p)){n.remove(g);return}var m=U2(o,p),y=B2(o,p,m,f),_=X2(o,y);g&&_!==g.__pictorialShapeStr&&(n.remove(g),o.setItemGraphicEl(p,null),g=null),g?g9(g,f,y):g=Y2(o,f,y,!0),o.setItemGraphicEl(p,g),g.__pictorialSymbolMeta=y,n.add(g),j2(g,f,y)}).remove(function(p){var v=s.getItemGraphicEl(p);v&&Z2(s,p,v.__pictorialSymbolMeta.animationModel,v)}).execute();var d=e.get("clip",!0)?Sl(e.coordinateSystem,!1,e):null;return d?n.setClipPath(d):n.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(e,a){var i=this.group,n=this._data;e.get("animation")?n&&n.eachItemGraphicEl(function(o){Z2(n,ue(o).dataIndex,e,o)}):i.removeAll()},t.type="pictorialBar",t}(We);function B2(r,t,e,a){var i=r.getItemLayout(t),n=e.get("symbolRepeat"),o=e.get("symbolClip"),s=e.get("symbolPosition")||"start",l=e.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=e.get("symbolPatternSize")||2,h=e.isAnimationEnabled(),f={dataIndex:t,layout:i,itemModel:e,symbolType:r.getItemVisual(t,"symbol")||"circle",style:r.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:n,symbolRepeatDirection:e.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:h?e:null,hoverScale:h&&e.get(["emphasis","scale"]),z2:e.getShallow("z",!0)||0};c9(e,n,i,a,f),h9(r,t,i,n,o,f.boundingLength,f.pxSign,c,a,f),f9(e,f.symbolScale,u,a,f);var d=f.symbolSize,p=pn(e.get("symbolOffset"),d);return d9(e,d,i,n,o,p,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,a,f),f}function c9(r,t,e,a,i){var n=a.valueDim,o=r.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(e[n.wh]<=0),c;if(G(o)){var h=[Lm(s,o[0])-l,Lm(s,o[1])-l];h[1]<h[0]&&h.reverse(),c=h[u]}else o!=null?c=Lm(s,o)-l:t?c=a.coordSysExtent[n.index][u]-l:c=e[n.wh];i.boundingLength=c,t&&(i.repeatCutLength=e[n.wh]);var f=n.xy==="x",d=s.inverse;i.pxSign=f&&!d||!f&&d?c>=0?1:-1:c>0?1:-1}function Lm(r,t){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(t)))}function h9(r,t,e,a,i,n,o,s,l,u){var c=l.valueDim,h=l.categoryDim,f=Math.abs(e[h.wh]),d=r.getItemVisual(t,"symbolSize"),p;G(d)?p=d.slice():d==null?p=["100%","100%"]:p=[d,d],p[h.index]=Z(p[h.index],f),p[c.index]=Z(p[c.index],a?f:Math.abs(n)),u.symbolSize=p;var v=u.symbolScale=[p[0]/s,p[1]/s];v[c.index]*=(l.isHorizontal?-1:1)*o}function f9(r,t,e,a,i){var n=r.get(l9)||0;n&&(Sm.attr({scaleX:t[0],scaleY:t[1],rotation:e}),Sm.updateTransform(),n/=Sm.getLineScale(),n*=t[a.valueDim.index]),i.valueLineWidth=n||0}function d9(r,t,e,a,i,n,o,s,l,u,c,h){var f=c.categoryDim,d=c.valueDim,p=h.pxSign,v=Math.max(t[d.index]+s,0),g=v;if(a){var m=Math.abs(l),y=it(r.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1));var w=Z(y,t[d.index]),x=Math.max(v+w*2,0),S=_?0:w*2,L=wd(a),C=L?a:q2((m+S)/x),T=m-C*v;w=T/2/(_?C:Math.max(C-1,1)),x=v+w*2,S=_?0:w*2,!L&&a!=="fixed"&&(C=u?q2((Math.abs(u)+S)/x):0),g=C*x-S,h.repeatTimes=C,h.symbolMargin=w}var A=p*(g/2),D=h.pathPosition=[];D[f.index]=e[f.wh]/2,D[d.index]=o==="start"?A:o==="end"?l-A:l/2,n&&(D[0]+=n[0],D[1]+=n[1]);var E=h.bundlePosition=[];E[f.index]=e[f.xy],E[d.index]=e[d.xy];var I=h.barRectShape=F({},e);I[d.wh]=p*Math.max(Math.abs(e[d.wh]),Math.abs(D[d.index]+A)),I[f.wh]=e[f.wh];var P=h.clipShape={};P[f.xy]=-e[f.xy],P[f.wh]=c.ecSize[f.wh],P[d.xy]=0,P[d.wh]=e[d.wh]}function F2(r){var t=r.symbolPatternSize,e=lt(r.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function G2(r,t,e,a){var i=r.__pictorialBundle,n=e.symbolSize,o=e.valueLineWidth,s=e.pathPosition,l=t.valueDim,u=e.repeatTimes||0,c=0,h=n[t.valueDim.index]+o+e.symbolMargin*2;for(Tm(r,function(v){v.__pictorialAnimationIndex=c,v.__pictorialRepeatTimes=u,c<u?Yo(v,null,p(c),e,a):Yo(v,null,{scaleX:0,scaleY:0},e,a,function(){i.remove(v)}),c++});c<u;c++){var f=F2(e);f.__pictorialAnimationIndex=c,f.__pictorialRepeatTimes=u,i.add(f);var d=p(c);Yo(f,{x:d.x,y:d.y,scaleX:0,scaleY:0},{scaleX:d.scaleX,scaleY:d.scaleY,rotation:d.rotation},e,a)}function p(v){var g=s.slice(),m=e.pxSign,y=v;return(e.symbolRepeatDirection==="start"?m>0:m<0)&&(y=u-1-v),g[l.index]=h*(y-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation}}}function W2(r,t,e,a){var i=r.__pictorialBundle,n=r.__pictorialMainPath;n?Yo(n,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,a):(n=r.__pictorialMainPath=F2(e),i.add(n),Yo(n,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:0,scaleY:0,rotation:e.rotation},{scaleX:e.symbolScale[0],scaleY:e.symbolScale[1]},e,a))}function H2(r,t,e){var a=F({},t.barRectShape),i=r.__pictorialBarRect;i?Yo(i,null,{shape:a},t,e):(i=r.__pictorialBarRect=new Te({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,r.add(i))}function $2(r,t,e,a){if(e.symbolClip){var i=r.__pictorialClipPath,n=F({},e.clipShape),o=t.valueDim,s=e.animationModel,l=e.dataIndex;if(i)Me(i,{shape:n},s,l);else{n[o.wh]=0,i=new Te({shape:n}),r.__pictorialBundle.setClipPath(i),r.__pictorialClipPath=i;var u={};u[o.wh]=e.clipShape[o.wh],nn[a?"updateProps":"initProps"](i,{shape:u},s,l)}}}function U2(r,t){var e=r.getItemModel(t);return e.getAnimationDelayParams=p9,e.isAnimationEnabled=v9,e}function p9(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function v9(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Y2(r,t,e,a){var i=new oe,n=new oe;return i.add(n),i.__pictorialBundle=n,n.x=e.bundlePosition[0],n.y=e.bundlePosition[1],e.symbolRepeat?G2(i,t,e):W2(i,t,e),H2(i,e,a),$2(i,t,e,a),i.__pictorialShapeStr=X2(r,e),i.__pictorialSymbolMeta=e,i}function g9(r,t,e){var a=e.animationModel,i=e.dataIndex,n=r.__pictorialBundle;Me(n,{x:e.bundlePosition[0],y:e.bundlePosition[1]},a,i),e.symbolRepeat?G2(r,t,e,!0):W2(r,t,e,!0),H2(r,e,!0),$2(r,t,e,!0)}function Z2(r,t,e,a){var i=a.__pictorialBarRect;i&&i.removeTextContent();var n=[];Tm(a,function(o){n.push(o)}),a.__pictorialMainPath&&n.push(a.__pictorialMainPath),a.__pictorialClipPath&&(e=null),M(n,function(o){ei(o,{scaleX:0,scaleY:0},e,t,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(t,null)}function X2(r,t){return[r.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function Tm(r,t,e){M(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&t.call(e,a)})}function Yo(r,t,e,a,i,n){t&&r.attr(t),a.symbolClip&&!i?e&&r.attr(e):e&&nn[i?"updateProps":"initProps"](r,e,a.animationModel,a.dataIndex,n)}function j2(r,t,e){var a=e.dataIndex,i=e.itemModel,n=i.getModel("emphasis"),o=n.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=n.get("focus"),h=n.get("blurScope"),f=n.get("scale");Tm(r,function(v){if(v instanceof bt){var g=v.style;v.useStyle(F({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},e.style))}else v.useStyle(e.style);var m=v.ensureState("emphasis");m.style=o,f&&(m.scaleX=v.scaleX*1.1,m.scaleY=v.scaleY*1.1),v.ensureState("blur").style=s,v.ensureState("select").style=l,u&&(v.cursor=u),v.z2=e.z2});var d=t.valueDim.posDesc[+(e.boundingLength>0)],p=r.__pictorialBarRect;p.ignoreClip=!0,xt(p,ft(i),{labelFetcher:t.seriesModel,labelDataIndex:a,defaultText:Oo(t.seriesModel.getData(),a),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:d}),qe(r,c,h,n.get("disabled"))}function q2(r){var t=Math.round(r);return Math.abs(r-t)<1e-4?t:Math.ceil(r)}const m9=u9;var y9=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.defaultSymbol="roundRect",e}return t.prototype.getInitialData=function(e){return e.stack=null,r.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=ri(hh.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),t}(hh);const _9=y9;function b9(r){r.registerChartView(m9),r.registerSeriesModel(_9),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,fe(iS,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,nS("pictorialBar"))}var w9=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._layers=[],e}return t.prototype.render=function(e,a,i){var n=e.getData(),o=this,s=this.group,l=e.getLayerSeries(),u=n.getLayout("layoutInfo"),c=u.rect,h=u.boundaryGap;s.x=0,s.y=c.y+h[0];function f(g){return g.name}var d=new Ca(this._layersSeries||[],l,f,f),p=[];d.add(j(v,this,"add")).update(j(v,this,"update")).remove(j(v,this,"remove")).execute();function v(g,m,y){var _=o._layers;if(g==="remove"){s.remove(_[m]);return}for(var w=[],x=[],S,L=l[m].indices,C=0;C<L.length;C++){var T=n.getItemLayout(L[C]),A=T.x,D=T.y0,E=T.y;w.push(A,D),x.push(A,D+E),S=n.getItemVisual(L[C],"style")}var I,P=n.getItemLayout(L[0]),k=e.getModel("label"),N=k.get("margin"),O=e.getModel("emphasis");if(g==="add"){var R=p[m]=new oe;I=new SL({shape:{points:w,stackedOnPoints:x,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),R.add(I),s.add(R),e.isAnimationEnabled()&&I.setClipPath(x9(I.getBoundingRect(),e,function(){I.removeClipPath()}))}else{var R=_[y];I=R.childAt(0),s.add(R),p[m]=R,Me(I,{shape:{points:w,stackedOnPoints:x}},e),kr(I)}xt(I,ft(e),{labelDataIndex:L[C-1],defaultText:n.getName(L[C-1]),inheritColor:S.fill},{normal:{verticalAlign:"middle"}}),I.setTextConfig({position:null,local:!0});var V=I.getTextContent();V&&(V.x=P.x-N,V.y=P.y0+P.y/2),I.useStyle(S),n.setItemGraphicEl(m,I),wt(I,e),qe(I,O.get("focus"),O.get("blurScope"),O.get("disabled"))}this._layersSeries=l,this._layers=p},t.type="themeRiver",t}(We);function x9(r,t,e){var a=new Te({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Ze(a,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},t,e),a}const S9=w9;var Cm=2,L9=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Cl(j(this.getData,this),j(this.getRawData,this))},t.prototype.fixData=function(e){var a=e.length,i={},n=Ld(e,function(f){return i.hasOwnProperty(f[0]+"")||(i[f[0]+""]=-1),f[2]}),o=[];n.buckets.each(function(f,d){o.push({name:d,dataList:f})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,c=0;c<o[l].dataList.length;++c){var h=o[l].dataList[c][0]+"";i[h]=l}for(var h in i)i.hasOwnProperty(h)&&i[h]!==l&&(i[h]=l,e[a]=[h,0,u],a++)}return e},t.prototype.getInitialData=function(e,a){for(var i=this.getReferringComponents("singleAxis",ot).models[0],n=i.get("type"),o=Ie(e.data,function(p){return p[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=Q(),c=0,h=0;h<s.length;++h)l.push(s[h][Cm]),u.get(s[h][Cm])||(u.set(s[h][Cm],c),c++);var f=fl(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Yc(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,d=new Ft(f,this);return d.initData(s),d},t.prototype.getLayerSeries=function(){for(var e=this.getData(),a=e.count(),i=[],n=0;n<a;++n)i[n]=n;var o=e.mapDimension("single"),s=Ld(i,function(u){return e.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(h,f){return e.get(o,h)-e.get(o,f)}),l.push({name:c,indices:u})}),l},t.prototype.getAxisTooltipData=function(e,a,i){G(e)||(e=e?[e]:[]);for(var n=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var h=Number.MAX_VALUE,f=-1,d=o[c].indices.length,p=0;p<d;++p){var v=n.get(e[0],o[c].indices[p]),g=Math.abs(v-a);g<=h&&(u=v,h=g,f=o[c].indices[p])}s.push(f)}return{dataIndices:s,nestestValue:u}},t.prototype.formatTooltip=function(e,a,i){var n=this.getData(),o=n.getName(e),s=n.get(n.mapDimension("value"),e);return dt("nameValue",{name:o,value:s})},t.type="series.themeRiver",t.dependencies=["singleAxis"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},t}(Xe);const T9=L9;function C9(r,t){r.eachSeriesByType("themeRiver",function(e){var a=e.getData(),i=e.coordinateSystem,n={},o=i.getRect();n.rect=o;var s=e.get("boundaryGap"),l=i.getAxis();if(n.boundaryGap=s,l.orient==="horizontal"){s[0]=Z(s[0],o.height),s[1]=Z(s[1],o.height);var u=o.height-s[0]-s[1];K2(a,e,u)}else{s[0]=Z(s[0],o.width),s[1]=Z(s[1],o.width);var c=o.width-s[0]-s[1];K2(a,e,c)}a.setLayout("layoutInfo",n)})}function K2(r,t,e){if(r.count())for(var a=t.coordinateSystem,i=t.getLayerSeries(),n=r.mapDimension("single"),o=r.mapDimension("value"),s=W(i,function(g){return W(g.indices,function(m){var y=a.dataToPoint(r.get(n,m));return y[1]=r.get(o,m),y})}),l=D9(s),u=l.y0,c=e/l.max,h=i.length,f=i[0].indices.length,d,p=0;p<f;++p){d=u[p]*c,r.setItemLayout(i[0].indices[p],{layerIndex:0,x:s[0][p][0],y0:d,y:s[0][p][1]*c});for(var v=1;v<h;++v)d+=s[v-1][p][1]*c,r.setItemLayout(i[v].indices[p],{layerIndex:v,x:s[v][p][0],y0:d,y:s[v][p][1]*c})}}function D9(r){for(var t=r.length,e=r[0].length,a=[],i=[],n=0,o=0;o<e;++o){for(var s=0,l=0;l<t;++l)s+=r[l][o][1];s>n&&(n=s),a.push(s)}for(var u=0;u<e;++u)i[u]=(n-a[u])/2;n=0;for(var c=0;c<e;++c){var h=a[c]+i[c];h>n&&(n=h)}return{y0:i,max:n}}function A9(r){r.registerChartView(S9),r.registerSeriesModel(T9),r.registerLayout(C9),r.registerProcessor(Tl("themeRiver"))}var M9=2,E9=4,I9=function(r){z(t,r);function t(e,a,i,n){var o=r.call(this)||this;o.z2=M9,o.textConfig={inside:!0},ue(o).seriesIndex=a.seriesIndex;var s=new Ae({z2:E9,silent:e.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,e,a,i,n),o}return t.prototype.updateData=function(e,a,i,n,o){this.node=a,a.piece=this,i=i||this._seriesModel,n=n||this._ecModel;var s=this;ue(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),c=a.getLayout(),h=F({},c);h.label=null;var f=a.getVisual("style");f.lineJoin="bevel";var d=a.getVisual("decal");d&&(f.decal=Eo(d,o));var p=Dn(l.getModel("itemStyle"),h,!0);F(h,p),M(Bt,function(y){var _=s.ensureState(y),w=l.getModel([y,"itemStyle"]);_.style=w.getItemStyle();var x=Dn(w,h);x&&(_.shape=x)}),e?(s.setShape(h),s.shape.r=c.r0,Ze(s,{shape:{r:c.r}},i,a.dataIndex)):(Me(s,{shape:h},i),kr(s)),s.useStyle(f),this._updateLabel(i);var v=l.getShallow("cursor");v&&s.attr("cursor",v),this._seriesModel=i||this._seriesModel,this._ecModel=n||this._ecModel;var g=u.get("focus"),m=g==="relative"?ss(a.getAncestorsIndices(),a.getDescendantIndices()):g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;qe(this,m,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e){var a=this,i=this.node.getModel(),n=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),h=this,f=h.getTextContent(),d=this.node.dataIndex,p=n.get("minAngle")/180*Math.PI,v=n.get("show")&&!(p!=null&&Math.abs(s)<p);f.ignore=!v,M(Ps,function(m){var y=m==="normal"?i.getModel("label"):i.getModel([m,"label"]),_=m==="normal",w=_?f:f.ensureState(m),x=e.getFormattedLabel(d,m);_&&(x=x||a.node.name),w.style=Fe(y,{},null,m!=="normal",!0),x&&(w.style.text=x);var S=y.get("show");S!=null&&!_&&(w.ignore=!S);var L=g(y,"position"),C=_?h:h.states[m],T=C.style.fill;C.textConfig={outsideFill:y.get("color")==="inherit"?T:null,inside:L!=="outside"};var A,D=g(y,"distance")||0,E=g(y,"align"),I=g(y,"rotate"),P=Math.PI*.5,k=Math.PI*1.5,N=rr(I==="tangential"?Math.PI/2-l:l),O=N>P&&!Ls(N-P)&&N<k;L==="outside"?(A=o.r+D,E=O?"right":"left"):!E||E==="center"?(s===2*Math.PI&&o.r0===0?A=0:A=(o.r+o.r0)/2,E="center"):E==="left"?(A=o.r0+D,E=O?"right":"left"):E==="right"&&(A=o.r-D,E=O?"left":"right"),w.style.align=E,w.style.verticalAlign=g(y,"verticalAlign")||"middle",w.x=A*u+o.cx,w.y=A*c+o.cy;var R=0;I==="radial"?R=rr(-l)+(O?Math.PI:0):I==="tangential"?R=rr(Math.PI/2-l)+(O?Math.PI:0):De(I)&&(R=I*Math.PI/180),w.rotation=rr(R)});function g(m,y){var _=m.get(y);return _??n.get(y)}f.dirtyStyle()},t}(Yt);const J2=I9;var Dm="sunburstRootToNode",Q2="sunburstHighlight",P9="sunburstUnhighlight";function k9(r){r.registerAction({type:Dm,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},a);function a(i,n){var o=kl(t,[Dm],i);if(o){var s=i.getViewRoot();s&&(t.direction=Cg(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),r.registerAction({type:Q2,update:"none"},function(t,e,a){t=F({},t),e.eachComponent({mainType:"series",subType:"sunburst",query:t},i);function i(n){var o=kl(t,[Q2],n);o&&(t.dataIndex=o.node.dataIndex)}process.env.NODE_ENV!=="production"&&nt("sunburstHighlight","highlight"),a.dispatchAction(F(t,{type:"highlight"}))}),r.registerAction({type:P9,update:"updateView"},function(t,e,a){t=F({},t),process.env.NODE_ENV!=="production"&&nt("sunburstUnhighlight","downplay"),a.dispatchAction(F(t,{type:"downplay"}))})}var N9=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i,n){var o=this;this.seriesModel=e,this.api=i,this.ecModel=a;var s=e.getData(),l=s.tree.root,u=e.getViewRoot(),c=this.group,h=e.get("renderLabelForZeroData"),f=[];u.eachNode(function(y){f.push(y)});var d=this._oldChildren||[];p(f,d),m(l,u),this._initEvents(),this._oldChildren=f;function p(y,_){if(y.length===0&&_.length===0)return;new Ca(_,y,w,w).add(x).update(x).remove(fe(x,null)).execute();function w(S){return S.getId()}function x(S,L){var C=S==null?null:y[S],T=L==null?null:_[L];v(C,T)}}function v(y,_){if(!h&&y&&!y.getValue()&&(y=null),y!==l&&_!==l){if(_&&_.piece)y?(_.piece.updateData(!1,y,e,a,i),s.setItemGraphicEl(y.dataIndex,_.piece)):g(_);else if(y){var w=new J2(y,e,a,i);c.add(w),s.setItemGraphicEl(y.dataIndex,w)}}}function g(y){y&&y.piece&&(c.remove(y.piece),y.piece=null)}function m(y,_){_.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,y,e,a,i):(o.virtualPiece=new J2(y,e,a,i),c.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(w){o._rootToNode(_.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(a){var i=!1,n=e.seriesModel.getViewRoot();n.eachNode(function(o){if(!i&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")e._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";wc(u,c)}}i=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Dm,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,a){var i=a.getData(),n=i.getItemLayout(0);if(n){var o=e[0]-n.cx,s=e[1]-n.cy,l=Math.sqrt(o*o+s*s);return l<=n.r&&l>=n.r0}},t.type="sunburst",t}(We);const R9=N9;var V9=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e,a){var i={name:e.name,children:e.data};eD(i);var n=this._levelModels=W(e.levels||[],function(l){return new Ge(l,this,a)},this),o=Tg.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var h=o.getNodeByDataIndex(c),f=n[h.depth];return f&&(u.parentModel=f),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return a.treePathInfo=Lh(i,this),a},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){uC(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(Xe);function eD(r){var t=0;M(r.children,function(a){eD(a);var i=a.value;G(i)&&(i=i[0]),t+=i});var e=r.value;G(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),G(r.value)?r.value[0]=e:r.value=e}const O9=V9;var tD=Math.PI/180;function z9(r,t,e){t.eachSeriesByType(r,function(a){var i=a.get("center"),n=a.get("radius");G(n)||(n=[0,n]),G(i)||(i=[i,i]);var o=e.getWidth(),s=e.getHeight(),l=Math.min(o,s),u=Z(i[0],o),c=Z(i[1],s),h=Z(n[0],l/2),f=Z(n[1],l/2),d=-a.get("startAngle")*tD,p=a.get("minAngle")*tD,v=a.getData().tree.root,g=a.getViewRoot(),m=g.depth,y=a.get("sort");y!=null&&rD(g,y);var _=0;M(g.children,function(N){!isNaN(N.getValue())&&_++});var w=g.getValue(),x=Math.PI/(w||_)*2,S=g.depth>0,L=g.height-(S?-1:1),C=(f-h)/(L||1),T=a.get("clockwise"),A=a.get("stillShowZeroSum"),D=T?1:-1,E=function(N,O){if(N){var R=O;if(N!==v){var V=N.getValue(),B=w===0&&A?x:V*x;B<p&&(B=p),R=O+D*B;var H=N.depth-m-(S?-1:1),Y=h+C*H,$=h+C*(H+1),U=a.getLevelModel(N);if(U){var q=U.get("r0",!0),Ce=U.get("r",!0),ce=U.get("radius",!0);ce!=null&&(q=ce[0],Ce=ce[1]),q!=null&&(Y=Z(q,l/2)),Ce!=null&&($=Z(Ce,l/2))}N.setLayout({angle:B,startAngle:O,endAngle:R,clockwise:T,cx:u,cy:c,r0:Y,r:$})}if(N.children&&N.children.length){var he=0;M(N.children,function(ee){he+=E(ee,O+he)})}return R-O}};if(S){var I=h,P=h+C,k=Math.PI*2;v.setLayout({angle:k,startAngle:d,endAngle:d+k,clockwise:T,cx:u,cy:c,r0:I,r:P})}E(g,d)})}function rD(r,t){var e=r.children||[];r.children=B9(e,t),e.length&&M(r.children,function(a){rD(a,t)})}function B9(r,t){if(te(t)){var e=W(r,function(i,n){var o=i.getValue();return{params:{depth:i.depth,height:i.height,dataIndex:i.dataIndex,getValue:function(){return o}},index:n}});return e.sort(function(i,n){return t(i.params,n.params)}),W(e,function(i){return r[i.index]})}else{var a=t==="asc";return r.sort(function(i,n){var o=(i.getValue()-n.getValue())*(a?1:-1);return o===0?(i.dataIndex-n.dataIndex)*(a?-1:1):o})}}function F9(r){var t={};function e(a,i,n){for(var o=a;o&&o.depth>1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",t);return a.depth>1&&X(s)&&(s=Yf(s,(a.depth-1)/(n-1)*.5)),s}r.eachSeriesByType("sunburst",function(a){var i=a.getData(),n=i.tree;n.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=e(o,a,n.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");F(u,l)})})}function G9(r){r.registerChartView(R9),r.registerSeriesModel(O9),r.registerLayout(fe(z9,"sunburst")),r.registerProcessor(fe(Tl,"sunburst")),r.registerVisual(F9),k9(r)}var aD={color:"fill",borderColor:"stroke"},W9={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Pa=xe(),H9=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,a){return Da(null,this)},t.prototype.getDataParams=function(e,a,i){var n=r.prototype.getDataParams.call(this,e,a);return i&&(n.info=Pa(i).info),n},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(Xe);const $9=H9;function U9(r,t){return t=t||[0,0],W(["x","y"],function(e,a){var i=this.getAxis(e),n=t[a],o=r[a]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}function Y9(r){var t=r.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:j(U9,r)}}}function Z9(r,t){return t=t||[0,0],W([0,1],function(e){var a=t[e],i=r[e]/2,n=[],o=[];return n[e]=a-i,o[e]=a+i,n[1-e]=o[1-e]=t[1-e],Math.abs(this.dataToPoint(n)[e]-this.dataToPoint(o)[e])},this)}function X9(r){var t=r.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:r.getZoom()},api:{coord:function(e){return r.dataToPoint(e)},size:j(Z9,r)}}}function j9(r,t){var e=this.getAxis(),a=t instanceof Array?t[0]:t,i=(r instanceof Array?r[0]:r)/2;return e.type==="category"?e.getBandWidth():Math.abs(e.dataToCoord(a-i)-e.dataToCoord(a+i))}function q9(r){var t=r.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:j(j9,r)}}}function K9(r,t){return t=t||[0,0],W(["Radius","Angle"],function(e,a){var i="get"+e+"Axis",n=this[i](),o=t[a],s=r[a]/2,l=n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(o-s)-n.dataToCoord(o+s));return e==="Angle"&&(l=l*Math.PI/180),l},this)}function J9(r){var t=r.getRadiusAxis(),e=r.getAngleAxis(),a=t.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(i){var n=t.dataToRadius(i[0]),o=e.dataToAngle(i[1]),s=r.coordToPoint([n,o]);return s.push(n,o*Math.PI/180),s},size:j(K9,r)}}}function Q9(r){var t=r.getRect(),e=r.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(a,i){return r.dataToPoint(a,i)}}}}var iD={};function nD(r,t,e,a){return r&&(r.legacy||r.legacy!==!1&&!e&&!a&&t!=="tspan"&&(t==="text"||K(r,"text")))}function oD(r,t,e){var a=r,i,n,o;if(t==="text")o=a;else{o={},K(a,"text")&&(o.text=a.text),K(a,"rich")&&(o.rich=a.rich),K(a,"textFill")&&(o.fill=a.textFill),K(a,"textStroke")&&(o.stroke=a.textStroke),K(a,"fontFamily")&&(o.fontFamily=a.fontFamily),K(a,"fontSize")&&(o.fontSize=a.fontSize),K(a,"fontStyle")&&(o.fontStyle=a.fontStyle),K(a,"fontWeight")&&(o.fontWeight=a.fontWeight),n={type:"text",style:o,silent:!0},i={};var s=K(a,"textPosition");e?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),K(a,"textPosition")&&(i.position=a.textPosition),K(a,"textOffset")&&(i.offset=a.textOffset),K(a,"textRotation")&&(i.rotation=a.textRotation),K(a,"textDistance")&&(i.distance=a.textDistance)}return sD(o,r),M(o.rich,function(l){sD(l,l)}),{textConfig:i,textContent:n}}function sD(r,t){t&&(t.font=t.textFont||t.font,K(t,"textStrokeWidth")&&(r.lineWidth=t.textStrokeWidth),K(t,"textAlign")&&(r.align=t.textAlign),K(t,"textVerticalAlign")&&(r.verticalAlign=t.textVerticalAlign),K(t,"textLineHeight")&&(r.lineHeight=t.textLineHeight),K(t,"textWidth")&&(r.width=t.textWidth),K(t,"textHeight")&&(r.height=t.textHeight),K(t,"textBackgroundColor")&&(r.backgroundColor=t.textBackgroundColor),K(t,"textPadding")&&(r.padding=t.textPadding),K(t,"textBorderColor")&&(r.borderColor=t.textBorderColor),K(t,"textBorderWidth")&&(r.borderWidth=t.textBorderWidth),K(t,"textBorderRadius")&&(r.borderRadius=t.textBorderRadius),K(t,"textBoxShadowColor")&&(r.shadowColor=t.textBoxShadowColor),K(t,"textBoxShadowBlur")&&(r.shadowBlur=t.textBoxShadowBlur),K(t,"textBoxShadowOffsetX")&&(r.shadowOffsetX=t.textBoxShadowOffsetX),K(t,"textBoxShadowOffsetY")&&(r.shadowOffsetY=t.textBoxShadowOffsetY))}function lD(r,t,e){var a=r;a.textPosition=a.textPosition||e.position||"inside",e.offset!=null&&(a.textOffset=e.offset),e.rotation!=null&&(a.textRotation=e.rotation),e.distance!=null&&(a.textDistance=e.distance);var i=a.textPosition.indexOf("inside")>=0,n=r.fill||"#000";uD(a,t);var o=a.textFill==null;return i?o&&(a.textFill=e.insideFill||"#fff",!a.textStroke&&e.insideStroke&&(a.textStroke=e.insideStroke),!a.textStroke&&(a.textStroke=n),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=r.fill||e.outsideFill||"#000"),!a.textStroke&&e.outsideStroke&&(a.textStroke=e.outsideStroke)),a.text=t.text,a.rich=t.rich,M(t.rich,function(s){uD(s,s)}),a}function uD(r,t){t&&(K(t,"fill")&&(r.textFill=t.fill),K(t,"stroke")&&(r.textStroke=t.fill),K(t,"lineWidth")&&(r.textStrokeWidth=t.lineWidth),K(t,"font")&&(r.font=t.font),K(t,"fontStyle")&&(r.fontStyle=t.fontStyle),K(t,"fontWeight")&&(r.fontWeight=t.fontWeight),K(t,"fontSize")&&(r.fontSize=t.fontSize),K(t,"fontFamily")&&(r.fontFamily=t.fontFamily),K(t,"align")&&(r.textAlign=t.align),K(t,"verticalAlign")&&(r.textVerticalAlign=t.verticalAlign),K(t,"lineHeight")&&(r.textLineHeight=t.lineHeight),K(t,"width")&&(r.textWidth=t.width),K(t,"height")&&(r.textHeight=t.height),K(t,"backgroundColor")&&(r.textBackgroundColor=t.backgroundColor),K(t,"padding")&&(r.textPadding=t.padding),K(t,"borderColor")&&(r.textBorderColor=t.borderColor),K(t,"borderWidth")&&(r.textBorderWidth=t.borderWidth),K(t,"borderRadius")&&(r.textBorderRadius=t.borderRadius),K(t,"shadowColor")&&(r.textBoxShadowColor=t.shadowColor),K(t,"shadowBlur")&&(r.textBoxShadowBlur=t.shadowBlur),K(t,"shadowOffsetX")&&(r.textBoxShadowOffsetX=t.shadowOffsetX),K(t,"shadowOffsetY")&&(r.textBoxShadowOffsetY=t.shadowOffsetY),K(t,"textShadowColor")&&(r.textShadowColor=t.textShadowColor),K(t,"textShadowBlur")&&(r.textShadowBlur=t.textShadowBlur),K(t,"textShadowOffsetX")&&(r.textShadowOffsetX=t.textShadowOffsetX),K(t,"textShadowOffsetY")&&(r.textShadowOffsetY=t.textShadowOffsetY))}function cD(r,t){if(process.env.NODE_ENV!=="production"){var e=r+"^_^"+t;iD[e]||(console.warn('[ECharts] DEPRECATED: "'+r+'" has been deprecated. '+t),iD[e]=!0)}}var hD={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},fD=we(hD),Oh=Wr(Ur,function(r,t){return r[t]=1,r},{}),dD=Ur.join(", "),zh=["","style","shape","extra"],Zo=xe();function Am(r,t,e,a,i){var n=r+"Animation",o=so(r,a,i)||{},s=Zo(t).userDuring;return o.duration>0&&(o.during=s?j(i$,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=r),F(o,e[n]),o}function Bh(r,t,e,a){a=a||{};var i=a.dataIndex,n=a.isInit,o=a.clearStyle,s=e.isAnimationEnabled(),l=Zo(r),u=t.style;l.userDuring=t.during;var c={},h={};if(o$(r,t,h),gD("shape",t,h),gD("extra",t,h),!n&&s&&(n$(r,t,c),vD("shape",r,t,c),vD("extra",r,t,c),s$(r,t,u,c)),h.style=u,e$(r,h,o),r$(r,t),s)if(n){var f={};M(zh,function(p){var v=p?t[p]:t;v&&v.enterFrom&&(p&&(f[p]=f[p]||{}),F(p?f[p]:f,v.enterFrom))});var d=Am("enter",r,t,e,i);d.duration>0&&r.animateFrom(f,d)}else t$(r,t,i||0,e,c);pD(r,t),u?r.dirty():r.markRedraw()}function pD(r,t){for(var e=Zo(r).leaveToProps,a=0;a<zh.length;a++){var i=zh[a],n=i?t[i]:t;n&&n.leaveTo&&(e||(e=Zo(r).leaveToProps={}),i&&(e[i]=e[i]||{}),F(i?e[i]:e,n.leaveTo))}}function Fh(r,t,e,a){if(r){var i=r.parent,n=Zo(r).leaveToProps;if(n){var o=Am("update",r,t,e,0);o.done=function(){i.remove(r),a&&a()},r.animateTo(n,o)}else i.remove(r),a&&a()}}function zn(r){return r==="all"}function e$(r,t,e){var a=t.style;if(!r.isGroup&&a){if(e){r.useStyle({});for(var i=r.animators,n=0;n<i.length;n++){var o=i[n];o.targetName==="style"&&o.changeTarget(r.style)}}r.setStyle(a)}t&&(t.style=null,t&&r.attr(t),t.style=a)}function t$(r,t,e,a,i){if(i){var n=Am("update",r,t,a,e);n.duration>0&&r.animateFrom(i,n)}}function r$(r,t){K(t,"silent")&&(r.silent=t.silent),K(t,"ignore")&&(r.ignore=t.ignore),r instanceof hr&&K(t,"invisible")&&(r.invisible=t.invisible),r instanceof _e&&K(t,"autoBatch")&&(r.autoBatch=t.autoBatch)}var sa={},a$={setTransform:function(r,t){return process.env.NODE_ENV!=="production"&&ae(K(Oh,r),"Only "+dD+" available in `setTransform`."),sa.el[r]=t,this},getTransform:function(r){return process.env.NODE_ENV!=="production"&&ae(K(Oh,r),"Only "+dD+" available in `getTransform`."),sa.el[r]},setShape:function(r,t){process.env.NODE_ENV!=="production"&&Xo(r);var e=sa.el,a=e.shape||(e.shape={});return a[r]=t,e.dirtyShape&&e.dirtyShape(),this},getShape:function(r){process.env.NODE_ENV!=="production"&&Xo(r);var t=sa.el.shape;if(t)return t[r]},setStyle:function(r,t){process.env.NODE_ENV!=="production"&&Xo(r);var e=sa.el,a=e.style;return a&&(process.env.NODE_ENV!=="production"&&Ti(t)&&je("style."+r+" must not be assigned with NaN."),a[r]=t,e.dirtyStyle&&e.dirtyStyle()),this},getStyle:function(r){process.env.NODE_ENV!=="production"&&Xo(r);var t=sa.el.style;if(t)return t[r]},setExtra:function(r,t){process.env.NODE_ENV!=="production"&&Xo(r);var e=sa.el.extra||(sa.el.extra={});return e[r]=t,this},getExtra:function(r){process.env.NODE_ENV!=="production"&&Xo(r);var t=sa.el.extra;if(t)return t[r]}};function Xo(r){if(process.env.NODE_ENV!=="production"&&(r==="transition"||r==="enterFrom"||r==="leaveTo"))throw new Error('key must not be "'+r+'"')}function i$(){var r=this,t=r.el;if(t){var e=Zo(t).userDuring,a=r.userDuring;if(e!==a){r.el=r.userDuring=null;return}sa.el=t,a(a$)}}function vD(r,t,e,a){var i=e[r];if(i){var n=t[r],o;if(n){var s=e.transition,l=i.transition;if(l)if(!o&&(o=a[r]={}),zn(l))F(o,n);else for(var u=Ve(l),c=0;c<u.length;c++){var h=u[c],f=n[h];o[h]=f}else if(zn(s)||me(s,r)>=0){!o&&(o=a[r]={});for(var d=we(n),c=0;c<d.length;c++){var h=d[c],f=n[h];l$(i[h],f)&&(o[h]=f)}}}}}function gD(r,t,e){var a=t[r];if(a)for(var i=e[r]={},n=we(a),o=0;o<n.length;o++){var s=n[o];i[s]=ys(a[s])}}function n$(r,t,e){for(var a=t.transition,i=zn(a)?Ur:Ve(a||[]),n=0;n<i.length;n++){var o=i[n];if(!(o==="style"||o==="shape"||o==="extra")){var s=r[o];process.env.NODE_ENV!=="production"&&mD(o,"el.transition"),e[o]=s}}}function o$(r,t,e){for(var a=0;a<fD.length;a++){var i=fD[a],n=hD[i],o=t[i];o&&(e[n[0]]=o[0],e[n[1]]=o[1])}for(var a=0;a<Ur.length;a++){var s=Ur[a];t[s]!=null&&(e[s]=t[s])}}function s$(r,t,e,a){if(e){var i=r.style,n;if(i){var o=e.transition,s=t.transition;if(o&&!zn(o)){var l=Ve(o);!n&&(n=a.style={});for(var u=0;u<l.length;u++){var c=l[u],h=i[c];n[c]=h}}else if(r.getAnimationStyleProps&&(zn(s)||zn(o)||me(s,"style")>=0)){var f=r.getAnimationStyleProps(),d=f?f.style:null;if(d){!n&&(n=a.style={});for(var p=we(e),u=0;u<p.length;u++){var c=p[u];if(d[c]){var h=i[c];n[c]=h}}}}}}}function l$(r,t){return Dt(r)?r!==t:r!=null&&isFinite(r)}var mD;process.env.NODE_ENV!=="production"&&(mD=function(r,t){K(Oh,r)||je("Prop `"+r+"` is not a permitted in `"+t+"`. Only `"+we(Oh).join("`, `")+"` are permitted.")});var yD=xe(),u$=["percent","easing","shape","style","extra"];function _D(r){r.stopAnimation("keyframe"),r.attr(yD(r))}function Gh(r,t,e){if(!(!e.isAnimationEnabled()||!t)){if(G(t)){M(t,function(s){Gh(r,s,e)});return}var a=t.keyframes,i=t.duration;if(e&&i==null){var n=so("enter",e,0);i=n&&n.duration}if(!(!a||!i)){var o=yD(r);M(zh,function(s){if(!(s&&!r[s])){var l,u=!1;a.sort(function(c,h){return c.percent-h.percent}),M(a,function(c){var h=r.animators,f=s?c[s]:c;if(process.env.NODE_ENV!=="production"&&c.percent>=1&&(u=!0),!!f){var d=we(f);if(s||(d=Ie(d,function(g){return me(u$,g)<0})),!!d.length){l||(l=r.animate(s,t.loop,!0),l.scope="keyframe");for(var p=0;p<h.length;p++)h[p]!==l&&h[p].targetName===l.targetName&&h[p].stopTracks(d);s&&(o[s]=o[s]||{});var v=s?o[s]:o;M(d,function(g){v[g]=((s?r[s]:r)||{})[g]}),l.whenWithKeys(i*c.percent,f,d,c.easing)}}}),l&&(process.env.NODE_ENV!=="production"&&(u||je("End frame with percent: 1 is missing in the keyframeAnimation.",!0)),l.delay(t.delay||0).duration(i).start(t.easing))}})}}}var ka="emphasis",mi="normal",Mm="blur",Em="select",yi=[mi,ka,Mm,Em],Im={normal:["itemStyle"],emphasis:[ka,"itemStyle"],blur:[Mm,"itemStyle"],select:[Em,"itemStyle"]},Pm={normal:["label"],emphasis:[ka,"label"],blur:[Mm,"label"],select:[Em,"label"]},c$=["x","y"],h$="e\0\0",Sr={normal:{},emphasis:{},blur:{},select:{}},bD={cartesian2d:Y9,geo:X9,single:q9,polar:J9,calendar:Q9};function Wh(r){return r instanceof _e}function km(r){return r instanceof hr}function f$(r,t){t.copyTransform(r),km(t)&&km(r)&&(t.setStyle(r.style),t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel,t.invisible=r.invisible,t.ignore=r.ignore,Wh(t)&&Wh(r)&&t.setShape(r.shape))}var d$=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i,n){this._progressiveEls=null;var o=this._data,s=e.getData(),l=this.group,u=xD(e,s,a,i);o||l.removeAll(),s.diff(o).add(function(h){Vm(i,null,h,u(h,n),e,l,s)}).remove(function(h){var f=o.getItemGraphicEl(h);f&&Fh(f,Pa(f).option,e)}).update(function(h,f){var d=o.getItemGraphicEl(f);Vm(i,d,h,u(h,n),e,l,s)}).execute();var c=e.get("clip",!0)?Sl(e.coordinateSystem,!1,e):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},t.prototype.incrementalPrepareRender=function(e,a,i){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,a,i,n,o){var s=a.getData(),l=xD(a,s,i,n),u=this._progressiveEls=[];function c(d){d.isGroup||(d.incremental=!0,d.ensureState("emphasis").hoverLayer=!0)}for(var h=e.start;h<e.end;h++){var f=Vm(null,null,h,l(h,o),a,this.group,s);f&&(f.traverse(c),u.push(f))}},t.prototype.eachRendered=function(e){ti(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,a,i,n){var o=a.element;if(o==null||i.name===o)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1},t.type="custom",t}(We);const p$=d$;function Nm(r){var t=r.type,e;if(t==="path"){var a=r.shape,i=a.width!=null&&a.height!=null?{x:a.x||0,y:a.y||0,width:a.width,height:a.height}:null,n=DD(a);e=lc(n,null,i,a.layout||"center"),Pa(e).customPathData=n}else if(t==="image")e=new bt({}),Pa(e).customImagePath=r.style.image;else if(t==="text")e=new Ae({});else if(t==="group")e=new oe;else{if(t==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=up(t);if(!o){var s="";process.env.NODE_ENV!=="production"&&(s='graphic type "'+t+'" can not be found.'),Pe(s)}e=new o}return Pa(e).customGraphicType=t,e.name=r.name,e.z2EmphasisLift=1,e.z2SelectLift=1,e}function Rm(r,t,e,a,i,n,o){_D(t);var s=i&&i.normal.cfg;s&&t.setTextConfig(s),a&&a.transition==null&&(a.transition=c$);var l=a&&a.style;if(l){if(t.type==="text"){var u=l;K(u,"textFill")&&(u.fill=u.textFill),K(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,h=Wh(t)?l.decal:null;r&&h&&(h.dirty=!0,c=Eo(h,r)),l.__decalPattern=c}if(km(t)&&l){var c=l.__decalPattern;c&&(l.decal=c)}Bh(t,a,n,{dataIndex:e,isInit:o,clearStyle:!0}),Gh(t,a.keyframeAnimation,n)}function wD(r,t,e,a,i){var n=t.isGroup?null:t,o=i&&i[r].cfg;if(n){var s=n.ensureState(r);if(a===!1){var l=n.getState(r);l&&(l.style=null)}else s.style=a||null;o&&(s.textConfig=o),qi(n)}}function v$(r,t,e){if(!r.isGroup){var a=r,i=e.currentZ,n=e.currentZLevel;a.z=i,a.zlevel=n;var o=t.z2;o!=null&&(a.z2=o||0);for(var s=0;s<yi.length;s++)g$(a,t,yi[s])}}function g$(r,t,e){var a=e===mi,i=a?t:Hh(t,e),n=i?i.z2:null,o;n!=null&&(o=a?r:r.ensureState(e),o.z2=n||0)}function xD(r,t,e,a){var i=r.get("renderItem"),n=r.coordinateSystem,o={};n&&(process.env.NODE_ENV!=="production"&&(ae(i,"series.render is required."),ae(n.prepareCustoms||bD[n.type],"This coordSys does not support custom series.")),o=n.prepareCustoms?n.prepareCustoms(n):bD[n.type](n));for(var s=ie({getWidth:a.getWidth,getHeight:a.getHeight,getZr:a.getZr,getDevicePixelRatio:a.getDevicePixelRatio,value:w,style:S,ordinalRawValue:x,styleEmphasis:L,visual:A,barLayout:D,currentSeriesIndices:E,font:I},o.api||{}),l={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:o.coordSys,dataInsideLength:t.count(),encode:m$(r.getData())},u,c,h={},f={},d={},p={},v=0;v<yi.length;v++){var g=yi[v];d[g]=r.getModel(Im[g]),p[g]=r.getModel(Pm[g])}function m(P){return P===u?c||(c=t.getItemModel(P)):t.getItemModel(P)}function y(P,k){return t.hasItemOption?P===u?h[k]||(h[k]=m(P).getModel(Im[k])):m(P).getModel(Im[k]):d[k]}function _(P,k){return t.hasItemOption?P===u?f[k]||(f[k]=m(P).getModel(Pm[k])):m(P).getModel(Pm[k]):p[k]}return function(P,k){return u=P,c=null,h={},f={},i&&i(ie({dataIndexInside:P,dataIndex:t.getRawIndex(P),actionType:k?k.type:null},l),s)};function w(P,k){return k==null&&(k=u),t.getStore().get(t.getDimensionIndex(P||0),k)}function x(P,k){k==null&&(k=u),P=P||0;var N=t.getDimensionInfo(P);if(!N){var O=t.getDimensionIndex(P);return O>=0?t.getStore().get(O,k):void 0}var R=t.get(N.name,k),V=N&&N.ordinalMeta;return V?V.categories[R]:R}function S(P,k){process.env.NODE_ENV!=="production"&&cD("api.style","Please write literal style directly instead."),k==null&&(k=u);var N=t.getItemVisual(k,"style"),O=N&&N.fill,R=N&&N.opacity,V=y(k,mi).getItemStyle();O!=null&&(V.fill=O),R!=null&&(V.opacity=R);var B={inheritColor:X(O)?O:"#000"},H=_(k,mi),Y=Fe(H,null,B,!1,!0);Y.text=H.getShallow("show")?le(r.getFormattedLabel(k,mi),Oo(t,k)):null;var $=fc(H,B,!1);return T(P,V),V=lD(V,Y,$),P&&C(V,P),V.legacy=!0,V}function L(P,k){process.env.NODE_ENV!=="production"&&cD("api.styleEmphasis","Please write literal style directly instead."),k==null&&(k=u);var N=y(k,ka).getItemStyle(),O=_(k,ka),R=Fe(O,null,null,!0,!0);R.text=O.getShallow("show")?nr(r.getFormattedLabel(k,ka),r.getFormattedLabel(k,mi),Oo(t,k)):null;var V=fc(O,null,!0);return T(P,N),N=lD(N,R,V),P&&C(N,P),N.legacy=!0,N}function C(P,k){for(var N in k)K(k,N)&&(P[N]=k[N])}function T(P,k){P&&(P.textFill&&(k.textFill=P.textFill),P.textPosition&&(k.textPosition=P.textPosition))}function A(P,k){if(k==null&&(k=u),K(aD,P)){var N=t.getItemVisual(k,"style");return N?N[aD[P]]:null}if(K(W9,P))return t.getItemVisual(k,P)}function D(P){if(n.type==="cartesian2d"){var k=n.getBaseAxis();return yB(ie({axis:k},P))}}function E(){return e.getCurrentSeriesIndices()}function I(P){return fp(P,e)}}function m$(r){var t={};return M(r.dimensions,function(e){var a=r.getDimensionInfo(e);if(!a.isExtraCoord){var i=a.coordDim,n=t[i]=t[i]||[];n[a.coordDimIndex]=r.getDimensionIndex(e)}}),t}function Vm(r,t,e,a,i,n,o){if(!a){n.remove(t);return}var s=Om(r,t,e,a,i,n);return s&&o.setItemGraphicEl(e,s),s&&qe(s,a.focus,a.blurScope,a.emphasisDisabled),s}function Om(r,t,e,a,i,n){process.env.NODE_ENV!=="production"&&ae(a,"should not have an null/undefined element setting");var o=-1,s=t;t&&SD(t,a,i)&&(o=me(n.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=Nm(a),s&&f$(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Sr.normal.cfg=Sr.normal.conOpt=Sr.emphasis.cfg=Sr.emphasis.conOpt=Sr.blur.cfg=Sr.blur.conOpt=Sr.select.cfg=Sr.select.conOpt=null,Sr.isLegacy=!1,_$(u,e,a,i,l,Sr),y$(u,e,a,i,l),Rm(r,u,e,a,Sr,i,l),K(a,"info")&&(Pa(u).info=a.info);for(var c=0;c<yi.length;c++){var h=yi[c];if(h!==mi){var f=Hh(a,h),d=zm(a,f,h);wD(h,u,f,d,Sr)}}return v$(u,a,i),a.type==="group"&&b$(r,u,e,a,i),o>=0?n.replaceAt(u,o):n.add(u),u}function SD(r,t,e){var a=Pa(r),i=t.type,n=t.shape,o=t.style;return e.isUniversalTransitionEnabled()||i!=null&&i!==a.customGraphicType||i==="path"&&L$(n)&&DD(n)!==a.customPathData||i==="image"&&K(o,"image")&&o.image!==a.customImagePath}function y$(r,t,e,a,i){var n=e.clipPath;if(n===!1)r&&r.getClipPath()&&r.removeClipPath();else if(n){var o=r.getClipPath();o&&SD(o,n,a)&&(o=null),o||(o=Nm(n),process.env.NODE_ENV!=="production"&&ae(Wh(o),"Only any type of `path` can be used in `clipPath`, rather than "+o.type+"."),r.setClipPath(o)),Rm(null,o,t,n,null,a,i)}}function _$(r,t,e,a,i,n){if(!r.isGroup){LD(e,null,n),LD(e,ka,n);var o=n.normal.conOpt,s=n.emphasis.conOpt,l=n.blur.conOpt,u=n.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=n.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=Nm(o),r.setTextContent(c)),Rm(null,c,t,o,null,a,i);for(var h=o&&o.style,f=0;f<yi.length;f++){var d=yi[f];if(d!==mi){var p=n[d].conOpt;wD(d,c,p,zm(o,p,d),null)}}h?c.dirty():c.markRedraw()}}}}function LD(r,t,e){var a=t?Hh(r,t):r,i=t?zm(r,a,ka):r.style,n=r.type,o=a?a.textConfig:null,s=r.textContent,l=s?t?Hh(s,t):s:null;if(i&&(e.isLegacy||nD(i,n,!!o,!!l))){e.isLegacy=!0;var u=oD(i,n,!t);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var c=l;!c.type&&(c.type="text"),process.env.NODE_ENV!=="production"&&ae(c.type==="text",'textContent.type must be "text"')}var h=t?e[t]:e.normal;h.cfg=o,h.conOpt=l}function Hh(r,t){return t?r?r[t]:null:r}function zm(r,t,e){var a=t&&t.style;return a==null&&e===ka&&r&&(a=r.styleEmphasis),a}function b$(r,t,e,a,i){var n=a.children,o=n?n.length:0,s=a.$mergeChildren,l=s==="byName"||a.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){x$({api:r,oldChildren:t.children()||[],newChildren:n||[],dataIndex:e,seriesModel:i,group:t});return}u&&t.removeAll();for(var c=0;c<o;c++){var h=n[c],f=t.childAt(c);h?(h.ignore==null&&(h.ignore=!1),Om(r,f,e,h,i,t)):(process.env.NODE_ENV!=="production"&&ae(f,"renderItem should not return a group containing elements as null/undefined/{} if they do not exist before."),f.ignore=!0)}for(var d=t.childCount()-1;d>=c;d--){var p=t.childAt(d);w$(t,p,i)}}}function w$(r,t,e){t&&Fh(t,Pa(r).option,e)}function x$(r){new Ca(r.oldChildren,r.newChildren,TD,TD,r).add(CD).update(CD).remove(S$).execute()}function TD(r,t){var e=r&&r.name;return e??h$+t}function CD(r,t){var e=this.context,a=r!=null?e.newChildren[r]:null,i=t!=null?e.oldChildren[t]:null;Om(e.api,i,e.dataIndex,a,e.seriesModel,e.group)}function S$(r){var t=this.context,e=t.oldChildren[r];e&&Fh(e,Pa(e).option,t.seriesModel)}function DD(r){return r&&(r.pathData||r.d)}function L$(r){return r&&(K(r,"pathData")||K(r,"d"))}function T$(r){r.registerChartView(p$),r.registerSeriesModel($9)}var Bn=xe(),AD=ne,Bm=j,C$=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,a,i){var n=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=a,!(!i&&this._lastValue===n&&this._lastStatus===o)){this._lastValue=n,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,n,t,e,a);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=c;var h=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new oe,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),a.getZr().add(s);else{var f=fe(MD,e,h);this.updatePointerEl(s,u,f),this.updateLabelEl(s,u,f,e)}PD(s,e,!0),this._renderHandle(n)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var a=e.get("animation"),i=t.axis,n=i.type==="category",o=e.get("snap");if(!o&&!n)return!1;if(a==="auto"||a==null){var s=this.animationThreshold;if(n&&i.getBandWidth()>s)return!0;if(o){var l=lg(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},r.prototype.makeElOption=function(t,e,a,i,n){},r.prototype.createPointerEl=function(t,e,a,i){var n=e.pointer;if(n){var o=Bn(t).pointerEl=new nn[n.type](AD(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,a,i){if(e.label){var n=Bn(t).labelEl=new Ae(AD(e.label));t.add(n),ID(n,i)}},r.prototype.updatePointerEl=function(t,e,a){var i=Bn(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),a(i,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,a,i){var n=Bn(t).labelEl;n&&(n.setStyle(e.label.style),a(n,{x:e.label.x,y:e.label.y}),ID(n,i))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,a=this._api.getZr(),i=this._handle,n=e.getModel("handle"),o=e.get("status");if(!n.get("show")||!o||o==="hide"){i&&a.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Gs(n.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){da(u.event)},onmousedown:Bm(this._onHandleDragMove,this,0,0),drift:Bm(this._onHandleDragMove,this),ondragend:Bm(this._onHandleDragEnd,this)}),a.add(i)),PD(i,e,!1),i.setStyle(n.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=n.get("size");G(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Co(this,"_doDispatchAxisPointer",n.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){MD(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Fm(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var a=this._handle;if(a){this._dragging=!0;var i=this.updateHandleTransform(Fm(a),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,a.stopAnimation(),a.attr(Fm(i)),Bn(a).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),a=this._group,i=this._handle;e&&a&&(this._lastGraphicKey=null,a&&e.remove(a),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Qs(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,a){return a=a||0,{x:t[a],y:t[1-a],width:e[a],height:e[1-a]}},r}();function MD(r,t,e,a){ED(Bn(e).lastProp,a)||(Bn(e).lastProp=a,t?Me(e,a,r):(e.stopAnimation(),e.attr(a)))}function ED(r,t){if(re(r)&&re(t)){var e=!0;return M(t,function(a,i){e=e&&ED(r[i],a)}),!!e}else return r===t}function ID(r,t){r[t.get(["label","show"])?"show":"hide"]()}function Fm(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function PD(r,t,e){var a=t.get("z"),i=t.get("zlevel");r&&r.traverse(function(n){n.type!=="group"&&(a!=null&&(n.z=a),i!=null&&(n.zlevel=i),n.silent=e)})}const Gm=C$;function Wm(r){var t=r.get("type"),e=r.getModel(t+"Style"),a;return t==="line"?(a=e.getLineStyle(),a.fill=null):t==="shadow"&&(a=e.getAreaStyle(),a.stroke=null),a}function kD(r,t,e,a,i){var n=e.get("value"),o=ND(n,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=go(s.get("padding")||0),u=s.getFont(),c=ws(o,u),h=i.position,f=c.width+l[1]+l[3],d=c.height+l[0]+l[2],p=i.align;p==="right"&&(h[0]-=f),p==="center"&&(h[0]-=f/2);var v=i.verticalAlign;v==="bottom"&&(h[1]-=d),v==="middle"&&(h[1]-=d/2),D$(h,f,d,a);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:Fe(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function D$(r,t,e,a){var i=a.getWidth(),n=a.getHeight();r[0]=Math.min(r[0]+t,i)-t,r[1]=Math.min(r[1]+e,n)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function ND(r,t,e,a,i){r=t.scale.parse(r);var n=t.scale.getLabel({value:r},{precision:i.precision}),o=i.formatter;if(o){var s={value:Av(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};M(a,function(l){var u=e.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,h=u&&u.getDataParams(c);h&&s.seriesData.push(h)}),X(o)?n=o.replace("{value}",n):te(o)&&(n=o(s))}return n}function Hm(r,t,e){var a=Jt();return Mi(a,a,e.rotation),Hr(a,a,e.position),Rr([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],a)}function RD(r,t,e,a,i,n){var o=Ma.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=i.get(["label","margin"]),kD(t,a,i,n,{position:Hm(a.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function $m(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function VD(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}function OD(r,t,e,a,i,n){return{cx:r,cy:t,r0:e,r:a,startAngle:i,endAngle:n,clockwise:!0}}var A$=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,i,n,o){var s=i.axis,l=s.grid,u=n.get("type"),c=zD(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var f=Wm(n),d=M$[u](s,h,c);d.style=f,e.graphicKey=d.type,e.pointer=d}var p=ig(l.model,i);RD(a,e,p,i,n,o)},t.prototype.getHandleTransform=function(e,a,i){var n=ig(a.axis.grid.model,a,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=Hm(a.axis,e,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,a,i,n){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=zD(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,h=[e.x,e.y];h[c]+=a[c],h[c]=Math.min(l[1],h[c]),h[c]=Math.max(l[0],h[c]);var f=(u[1]+u[0])/2,d=[f,f];d[c]=h[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:e.rotation,cursorPoint:d,tooltipOption:p[c]}},t}(Gm);function zD(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var M$={line:function(r,t,e){var a=$m([t,e[0]],[t,e[1]],BD(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,t,e){var a=Math.max(1,r.getBandWidth()),i=e[1]-e[0];return{type:"Rect",shape:VD([t-a/2,e[0]],[a,i],BD(r))}}};function BD(r){return r.dim==="x"?0:1}const E$=A$;var I$=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(Se);const P$=I$;var Na=xe(),k$=M;function FD(r,t,e){if(!Le.node){var a=t.getZr();Na(a).records||(Na(a).records={}),N$(a,t);var i=Na(a).records[r]||(Na(a).records[r]={});i.handler=e}}function N$(r,t){if(Na(r).initialized)return;Na(r).initialized=!0,e("click",fe(GD,"click")),e("mousemove",fe(GD,"mousemove")),e("globalout",V$);function e(a,i){r.on(a,function(n){var o=O$(t);k$(Na(r).records,function(s){s&&i(s,n,o.dispatchAction)}),R$(o.pendings,t)})}}function R$(r,t){var e=r.showTip.length,a=r.hideTip.length,i;e?i=r.showTip[e-1]:a&&(i=r.hideTip[a-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function V$(r,t,e){r.handler("leave",null,e)}function GD(r,t,e,a){t.handler(r,e,a)}function O$(r){var t={showTip:[],hideTip:[]},e=function(a){var i=t[a.type];i?i.push(a):(a.dispatchAction=e,r.dispatchAction(a))};return{dispatchAction:e,pendings:t}}function Um(r,t){if(!Le.node){var e=t.getZr(),a=(Na(e).records||{})[r];a&&(Na(e).records[r]=null)}}var z$=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){var n=a.getComponent("tooltip"),o=e.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";FD("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,a){Um("axisPointer",a)},t.prototype.dispose=function(e,a){Um("axisPointer",a)},t.type="axisPointer",t}(Ke);const B$=z$;function WD(r,t){var e=[],a=r.seriesIndex,i;if(a==null||!(i=t.getSeriesByIndex(a)))return{point:[]};var n=i.getData(),o=zi(n,r);if(o==null||o<0||G(o))return{point:[]};var s=n.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)e=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),h=c.dim,f=u.dim,d=h==="x"||h==="radius"?1:0,p=n.mapDimension(f),v=[];v[d]=n.get(p,o),v[1-d]=n.get(n.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(v)||[]}else e=l.dataToPoint(n.getValues(W(l.dimensions,function(m){return n.mapDimension(m)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:s}}var HD=xe();function F$(r,t,e){var a=r.currTrigger,i=[r.x,r.y],n=r,o=r.dispatchAction||j(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){$h(i)&&(i=WD({seriesIndex:n.seriesIndex,dataIndex:n.dataIndex},t).point);var l=$h(i),u=n.axesInfo,c=s.axesInfo,h=a==="leave"||$h(i),f={},d={},p={list:[],map:{}},v={showPointer:fe(W$,d),showTooltip:fe(H$,p)};M(s.coordSysMap,function(m,y){var _=l||m.containPoint(i);M(s.coordSysAxesInfo[y],function(w,x){var S=w.axis,L=Z$(u,w);if(!h&&_&&(!u||L)){var C=L&&L.value;C==null&&!l&&(C=S.pointToData(i)),C!=null&&$D(w,C,v,!1,f)}})});var g={};return M(c,function(m,y){var _=m.linkGroup;_&&!d[y]&&M(_.axesInfo,function(w,x){var S=d[x];if(w!==m&&S){var L=S.value;_.mapper&&(L=m.axis.scale.parse(_.mapper(L,UD(w),UD(m)))),g[m.key]=L}})}),M(g,function(m,y){$D(c[y],m,v,!0,f)}),$$(d,c,f),U$(p,i,r,o),Y$(c,o,e),f}}function $D(r,t,e,a,i){var n=r.axis;if(!(n.scale.isBlank()||!n.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=G$(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&F(i,s[0]),!a&&r.snap&&n.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function G$(r,t){var e=t.axis,a=e.dim,i=r,n=[],o=Number.MAX_VALUE,s=-1;return M(t.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(a),h,f;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(c,r,e);f=d.dataIndices,h=d.nestestValue}else{if(f=l.getData().indicesOfNearest(c[0],r,e.type==="category"?.5:null),!f.length)return;h=l.getData().get(c[0],f[0])}if(!(h==null||!isFinite(h))){var p=r-h,v=Math.abs(p);v<=o&&((v<o||p>=0&&s<0)&&(o=v,s=p,i=h,n.length=0),M(f,function(g){n.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:n,snapToValue:i}}function W$(r,t,e,a){r[t.key]={value:e,payloadBatch:a}}function H$(r,t,e,a){var i=e.payloadBatch,n=t.axis,o=n.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=Dl(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:n.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function $$(r,t,e){var a=e.axesInfo=[];M(t,function(i,n){var o=i.axisPointerModel.option,s=r[n];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function U$(r,t,e,a){if($h(t)||!r.list.length){a({type:"hideTip"});return}var i=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:r.list})}function Y$(r,t,e){var a=e.getZr(),i="axisPointerLastHighlights",n=HD(a)[i]||{},o=HD(a)[i]={};M(r,function(u,c){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&M(h.seriesDataIndices,function(f){var d=f.seriesIndex+" | "+f.dataIndex;o[d]=f})});var s=[],l=[];M(n,function(u,c){!o[c]&&l.push(u)}),M(o,function(u,c){!n[c]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function Z$(r,t){for(var e=0;e<(r||[]).length;e++){var a=r[e];if(t.axis.dim===a.axisDim&&t.axis.model.componentIndex===a.axisIndex)return a}}function UD(r){var t=r.axis.model,e={},a=e.axisDim=r.axis.dim;return e.axisIndex=e[a+"AxisIndex"]=t.componentIndex,e.axisName=e[a+"AxisName"]=t.name,e.axisId=e[a+"AxisId"]=t.id,e}function $h(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Ul(r){Mn.registerAxisPointerClass("CartesianAxisPointer",E$),r.registerComponentModel(P$),r.registerComponentView(B$),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!G(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=R6(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},F$)}function X$(r){ye(gT),ye(Ul)}var j$=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,i,n,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),h=s.dataToCoord(a),f=n.get("type");if(f&&f!=="none"){var d=Wm(n),p=K$[f](s,l,h,c);p.style=d,e.graphicKey=p.type,e.pointer=p}var v=n.get(["label","margin"]),g=q$(a,i,n,l,v);kD(e,i,n,o,g)},t}(Gm);function q$(r,t,e,a,i){var n=t.axis,o=n.dataToCoord(r),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,c,h;if(n.dim==="radius"){var f=Jt();Mi(f,f,s),Hr(f,f,[a.cx,a.cy]),u=Rr([o,-i],f);var d=t.getModel("axisLabel").get("rotate")||0,p=Ma.innerTextLayout(s,d*Math.PI/180,-1);c=p.textAlign,h=p.textVerticalAlign}else{var v=l[1];u=a.coordToPoint([v+i,o]);var g=a.cx,m=a.cy;c=Math.abs(u[0]-g)/v<.3?"center":u[0]>g?"left":"right",h=Math.abs(u[1]-m)/v<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:c,verticalAlign:h}}var K$={line:function(r,t,e,a){return r.dim==="angle"?{type:"Line",shape:$m(t.coordToPoint([a[0],e]),t.coordToPoint([a[1],e]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:e}}},shadow:function(r,t,e,a){var i=Math.max(1,r.getBandWidth()),n=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:OD(t.cx,t.cy,a[0],a[1],(-e-i/2)*n,(-e+i/2)*n)}:{type:"Sector",shape:OD(t.cx,t.cy,e-i/2,e+i/2,0,Math.PI*2)}}};const J$=j$;var Q$=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.findAxisModel=function(e){var a,i=this.ecModel;return i.eachComponent(e,function(n){n.getCoordSysModel()===this&&(a=n)},this),a},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(Se);const eU=Q$;var Ym=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",ot).models[0]},t.type="polarAxis",t}(Se);at(Ym,pl);var tU=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="angleAxis",t}(Ym),rU=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="radiusAxis",t}(Ym),Zm=function(r){z(t,r);function t(e,a){return r.call(this,"radius",e,a)||this}return t.prototype.pointToData=function(e,a){return this.polar.pointToData(e,a)[this.dim==="radius"?0:1]},t}(zr);Zm.prototype.dataToRadius=zr.prototype.dataToCoord,Zm.prototype.radiusToData=zr.prototype.coordToData;const aU=Zm;var iU=xe(),Xm=function(r){z(t,r);function t(e,a){return r.call(this,"angle",e,a||[0,360])||this}return t.prototype.pointToData=function(e,a){return this.polar.pointToData(e,a)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,a=e.getLabelModel(),i=e.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var s=n[0],l=e.dataToCoord(s+1)-e.dataToCoord(s),u=Math.abs(l),c=ws(s==null?"":s+"",a.getFont(),"center","top"),h=Math.max(c.height,7),f=h/u;isNaN(f)&&(f=1/0);var d=Math.max(0,Math.floor(f)),p=iU(e.model),v=p.lastAutoInterval,g=p.lastTickCount;return v!=null&&g!=null&&Math.abs(v-d)<=1&&Math.abs(g-o)<=1&&v>d?d=v:(p.lastTickCount=o,p.lastAutoInterval=d),d},t}(zr);Xm.prototype.dataToAngle=zr.prototype.dataToCoord,Xm.prototype.angleToData=zr.prototype.coordToData;const nU=Xm;var YD=["radius","angle"],oU=function(){function r(t){this.dimensions=YD,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new aU,this._angleAxis=new nU,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},r.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},r.prototype.getAxis=function(t){var e="_"+t+"Axis";return this[e]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(t){var e=[],a=this._angleAxis,i=this._radiusAxis;return a.scale.type===t&&e.push(a),i.scale.type===t&&e.push(i),e},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(t){var e=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},r.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},r.prototype.pointToData=function(t,e){var a=this.pointToCoord(t);return[this._radiusAxis.radiusToData(a[0],e),this._angleAxis.angleToData(a[1],e)]},r.prototype.pointToCoord=function(t){var e=t[0]-this.cx,a=t[1]-this.cy,i=this.getAngleAxis(),n=i.getExtent(),o=Math.min(n[0],n[1]),s=Math.max(n[0],n[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(e*e+a*a);e/=l,a/=l;for(var u=Math.atan2(-a,e)/Math.PI*180,c=u<o?1:-1;u<o||u>s;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(t){var e=t[0],a=t[1]/180*Math.PI,i=Math.cos(a)*e+this.cx,n=-Math.sin(a)*e+this.cy;return[i,n]},r.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),a=e.getExtent().slice();a[0]>a[1]&&a.reverse();var i=t.getExtent(),n=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:a[0],r:a[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:t.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,h=u*u+c*c,f=this.r,d=this.r0;return f!==d&&h-o<=f*f&&h+o>=d*d}}},r.prototype.convertToPixel=function(t,e,a){var i=ZD(e);return i===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(t,e,a){var i=ZD(e);return i===this?this.pointToData(a):null},r}();function ZD(r){var t=r.seriesModel,e=r.polarModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}const sU=oU;function lU(r,t,e){var a=t.get("center"),i=e.getWidth(),n=e.getHeight();r.cx=Z(a[0],i),r.cy=Z(a[1],n);var o=r.getRadiusAxis(),s=Math.min(i,n)/2,l=t.get("radius");l==null?l=[0,"100%"]:G(l)||(l=[0,l]);var u=[Z(l[0],s),Z(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function uU(r,t){var e=this,a=e.getAngleAxis(),i=e.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===e){var l=s.getData();M(ah(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),M(ah(l,"angle"),function(u){a.scale.unionExtentFromData(l,u)})}}),No(a.scale,a.model),No(i.scale,i.model),a.type==="category"&&!a.onBand){var n=a.getExtent(),o=360/a.scale.count();a.inverse?n[1]+=o:n[1]-=o,a.setExtent(n[0],n[1])}}function cU(r){return r.mainType==="angleAxis"}function XD(r,t){var e;if(r.type=t.get("type"),r.scale=rh(t),r.onBand=t.get("boundaryGap")&&r.type==="category",r.inverse=t.get("inverse"),cU(t)){r.inverse=r.inverse!==t.get("clockwise");var a=t.get("startAngle"),i=(e=t.get("endAngle"))!==null&&e!==void 0?e:a+(r.inverse?-360:360);r.setExtent(a,i)}t.axis=r,r.model=t}var hU={dimensions:YD,create:function(r,t){var e=[];return r.eachComponent("polar",function(a,i){var n=new sU(i+"");n.update=uU;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");XD(o,l),XD(s,u),lU(n,a,t),e.push(n),a.coordinateSystem=n,n.model=a}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var i=a.getReferringComponents("polar",ot).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error('Polar "'+it(a.get("polarIndex"),a.get("polarId"),0)+'" not found');a.coordinateSystem=i.coordinateSystem}}),e}};const fU=hU;var dU=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Uh(r,t,e){t[1]>t[0]&&(t=t.slice().reverse());var a=r.coordToPoint([t[0],e]),i=r.coordToPoint([t[1],e]);return{x1:a[0],y1:a[1],x2:i[0],y2:i[1]}}function Yh(r){var t=r.getRadiusAxis();return t.inverse?0:1}function jD(r){var t=r[0],e=r[r.length-1];t&&e&&Math.abs(Math.abs(t.coord-e.coord)-360)<1e-4&&r.pop()}var pU=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="PolarAxisPointer",e}return t.prototype.render=function(e,a){if(this.group.removeAll(),!!e.get("show")){var i=e.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),s=i.getTicksCoords(),l=i.getMinorTicksCoords(),u=W(i.getViewLabels(),function(c){c=ne(c);var h=i.scale,f=h.type==="ordinal"?h.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(f),c});jD(u),jD(s),M(dU,function(c){e.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&vU[c](this.group,e,n,s,l,o,u)},this)}},t.type="angleAxis",t}(Mn),vU={axisLine:function(r,t,e,a,i,n){var o=t.getModel(["axisLine","lineStyle"]),s=e.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=Yh(e),h=c?0:1,f,d=Math.abs(u[1]-u[0])===360?"Circle":"Arc";n[h]===0?f=new nn[d]({shape:{cx:e.cx,cy:e.cy,r:n[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):f=new tc({shape:{cx:e.cx,cy:e.cy,r:n[c],r0:n[h]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,r.add(f)},axisTick:function(r,t,e,a,i,n){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=n[Yh(e)],u=W(a,function(c){return new mt({shape:Uh(e,[l,l+s],c.coord)})});r.add(dr(u,{style:ie(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,t,e,a,i,n){if(i.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=n[Yh(e)],c=[],h=0;h<i.length;h++)for(var f=0;f<i[h].length;f++)c.push(new mt({shape:Uh(e,[u,u+l],i[h][f].coord)}));r.add(dr(c,{style:ie(s.getModel("lineStyle").getLineStyle(),ie(o.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(r,t,e,a,i,n,o){var s=t.getCategories(!0),l=t.getModel("axisLabel"),u=l.get("margin"),c=t.get("triggerEvent");M(o,function(h,f){var d=l,p=h.tickValue,v=n[Yh(e)],g=e.coordToPoint([v+u,h.coord]),m=e.cx,y=e.cy,_=Math.abs(g[0]-m)/v<.3?"center":g[0]>m?"left":"right",w=Math.abs(g[1]-y)/v<.3?"middle":g[1]>y?"top":"bottom";if(s&&s[p]){var x=s[p];re(x)&&x.textStyle&&(d=new Ge(x.textStyle,l,l.ecModel))}var S=new Ae({silent:Ma.isLabelSilent(t),style:Fe(d,{x:g[0],y:g[1],fill:d.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:_,verticalAlign:w})});if(r.add(S),c){var L=Ma.makeAxisEventDataBase(t);L.targetType="axisLabel",L.value=h.rawLabel,ue(S).eventData=L}},this)},splitLine:function(r,t,e,a,i,n){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=0;h<a.length;h++){var f=u++%l.length;c[f]=c[f]||[],c[f].push(new mt({shape:Uh(e,n,a[h].coord)}))}for(var h=0;h<c.length;h++)r.add(dr(c[h],{style:ie({stroke:l[h%l.length]},s.getLineStyle()),silent:!0,z:t.get("z")}))},minorSplitLine:function(r,t,e,a,i,n){if(i.length){for(var o=t.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<i.length;u++)for(var c=0;c<i[u].length;c++)l.push(new mt({shape:Uh(e,n,i[u][c].coord)}));r.add(dr(l,{style:s.getLineStyle(),silent:!0,z:t.get("z")}))}},splitArea:function(r,t,e,a,i,n){if(a.length){var o=t.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=Math.PI/180,f=-a[0].coord*h,d=Math.min(n[0],n[1]),p=Math.max(n[0],n[1]),v=t.get("clockwise"),g=1,m=a.length;g<=m;g++){var y=g===m?a[0].coord:a[g].coord,_=u++%l.length;c[_]=c[_]||[],c[_].push(new Yt({shape:{cx:e.cx,cy:e.cy,r0:d,r:p,startAngle:f,endAngle:-y*h,clockwise:v},silent:!0})),f=-y*h}for(var g=0;g<c.length;g++)r.add(dr(c[g],{style:ie({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}};const gU=pU;var mU=["axisLine","axisTickLabel","axisName"],yU=["splitLine","splitArea","minorSplitLine"],_U=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="PolarAxisPointer",e}return t.prototype.render=function(e,a){if(this.group.removeAll(),!!e.get("show")){var i=this._axisGroup,n=this._axisGroup=new oe;this.group.add(n);var o=e.axis,s=o.polar,l=s.getAngleAxis(),u=o.getTicksCoords(),c=o.getMinorTicksCoords(),h=l.getExtent()[0],f=o.getExtent(),d=wU(s,e,h),p=new Ma(e,d);M(mU,p.add,p),n.add(p.getGroup()),Fs(i,n,e),M(yU,function(v){e.get([v,"show"])&&!o.scale.isBlank()&&bU[v](this.group,e,s,h,f,u,c)},this)}},t.type="radiusAxis",t}(Mn),bU={splitLine:function(r,t,e,a,i,n){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,c=e.getAngleAxis(),h=Math.PI/180,f=c.getExtent(),d=Math.abs(f[1]-f[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var p=[],v=0;v<n.length;v++){var g=u++%l.length;p[g]=p[g]||[],p[g].push(new nn[d]({shape:{cx:e.cx,cy:e.cy,r:Math.max(n[v].coord,0),startAngle:-f[0]*h,endAngle:-f[1]*h,clockwise:c.inverse}}))}for(var v=0;v<p.length;v++)r.add(dr(p[v],{style:ie({stroke:l[v%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(r,t,e,a,i,n,o){if(o.length){for(var s=t.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],c=0;c<o.length;c++)for(var h=0;h<o[c].length;h++)u.push(new Qa({shape:{cx:e.cx,cy:e.cy,r:o[c][h].coord}}));r.add(dr(u,{style:ie({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(r,t,e,a,i,n){if(n.length){var o=t.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=n[0].coord,f=1;f<n.length;f++){var d=u++%l.length;c[d]=c[d]||[],c[d].push(new Yt({shape:{cx:e.cx,cy:e.cy,r0:h,r:n[f].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),h=n[f].coord}for(var f=0;f<c.length;f++)r.add(dr(c[f],{style:ie({fill:l[f%l.length]},s.getAreaStyle()),silent:!0}))}}};function wU(r,t,e){return{position:[r.cx,r.cy],rotation:e/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}const xU=_U;function qD(r){return r.get("stack")||"__ec_stack_"+r.seriesIndex}function KD(r,t){return t.dim+r.model.componentIndex}function SU(r,t,e){var a={},i=LU(Ie(t.getSeriesByType(r),function(n){return!t.isSeriesFiltered(n)&&n.coordinateSystem&&n.coordinateSystem.type==="polar"}));t.eachSeriesByType(r,function(n){if(n.coordinateSystem.type==="polar"){var o=n.getData(),s=n.coordinateSystem,l=s.getBaseAxis(),u=KD(s,l),c=qD(n),h=i[u][c],f=h.offset,d=h.width,p=s.getOtherAxis(l),v=n.coordinateSystem.cx,g=n.coordinateSystem.cy,m=n.get("barMinHeight")||0,y=n.get("barMinAngle")||0;a[c]=a[c]||[];for(var _=o.mapDimension(p.dim),w=o.mapDimension(l.dim),x=ui(o,_),S=l.dim!=="radius"||!n.get("roundCap",!0),L=p.model,C=L.get("startValue"),T=p.dataToCoord(C||0),A=0,D=o.count();A<D;A++){var E=o.get(_,A),I=o.get(w,A),P=E>=0?"p":"n",k=T;x&&(a[c][I]||(a[c][I]={p:T,n:T}),k=a[c][I][P]);var N=void 0,O=void 0,R=void 0,V=void 0;if(p.dim==="radius"){var B=p.dataToCoord(E)-T,H=l.dataToCoord(I);Math.abs(B)<m&&(B=(B<0?-1:1)*m),N=k,O=k+B,R=H-f,V=R-d,x&&(a[c][I][P]=O)}else{var Y=p.dataToCoord(E,S)-T,$=l.dataToCoord(I);Math.abs(Y)<y&&(Y=(Y<0?-1:1)*y),N=$+f,O=N+d,R=k,V=k+Y,x&&(a[c][I][P]=V)}o.setItemLayout(A,{cx:v,cy:g,r0:N,r:O,startAngle:-R*Math.PI/180,endAngle:-V*Math.PI/180,clockwise:R>=V})}}})}function LU(r){var t={};M(r,function(a,i){var n=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=KD(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/n.count(),h=t[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},f=h.stacks;t[l]=h;var d=qD(a);f[d]||h.autoWidthCount++,f[d]=f[d]||{width:0,maxWidth:0};var p=Z(a.get("barWidth"),c),v=Z(a.get("barMaxWidth"),c),g=a.get("barGap"),m=a.get("barCategoryGap");p&&!f[d].width&&(p=Math.min(h.remainedWidth,p),f[d].width=p,h.remainedWidth-=p),v&&(f[d].maxWidth=v),g!=null&&(h.gap=g),m!=null&&(h.categoryGap=m)});var e={};return M(t,function(a,i){e[i]={};var n=a.stacks,o=a.bandWidth,s=Z(a.categoryGap,o),l=Z(a.gap,1),u=a.remainedWidth,c=a.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),M(n,function(v,g){var m=v.maxWidth;m&&m<h&&(m=Math.min(m,u),v.width&&(m=Math.min(m,v.width)),u-=m,v.width=m,c--)}),h=(u-s)/(c+(c-1)*l),h=Math.max(h,0);var f=0,d;M(n,function(v,g){v.width||(v.width=h),d=v,f+=v.width*(1+l)}),d&&(f-=d.width*l);var p=-f/2;M(n,function(v,g){e[i][g]=e[i][g]||{offset:p,width:v.width},p+=v.width*(1+l)})}),e}var TU={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},CU={splitNumber:5},DU=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="polar",t}(Ke);function AU(r){ye(Ul),Mn.registerAxisPointerClass("PolarAxisPointer",J$),r.registerCoordinateSystem("polar",fU),r.registerComponentModel(eU),r.registerComponentView(DU),Bo(r,"angle",tU,TU),Bo(r,"radius",rU,CU),r.registerComponentView(gU),r.registerComponentView(xU),r.registerLayout(fe(SU,"bar"))}function jm(r,t){t=t||{};var e=r.coordinateSystem,a=r.axis,i={},n=a.position,o=a.orient,s=e.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[o==="vertical"?u.vertical[n]:l[0],o==="horizontal"?u.horizontal[n]:l[3]];var c={horizontal:0,vertical:1};i.rotation=Math.PI/2*c[o];var h={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=h[n],r.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),it(t.labelInside,r.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var f=t.rotate;return f==null&&(f=r.get(["axisLabel","rotate"])),i.labelRotation=n==="top"?-f:f,i.z2=1,i}var MU=["axisLine","axisTickLabel","axisName"],EU=["splitArea","splitLine"],IU=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="SingleAxisPointer",e}return t.prototype.render=function(e,a,i,n){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new oe;var l=jm(e),u=new Ma(e,l);M(MU,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),M(EU,function(c){e.get([c,"show"])&&PU[c](this,this.group,this._axisGroup,e)},this),Fs(s,this._axisGroup,e),r.prototype.render.call(this,e,a,i,n)},t.prototype.remove=function(){fT(this)},t.type="singleAxis",t}(Mn),PU={splitLine:function(r,t,e,a){var i=a.axis;if(!i.scale.isBlank()){var n=a.getModel("splitLine"),o=n.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=a.coordinateSystem.getRect(),c=i.isHorizontal(),h=[],f=0,d=i.getTicksCoords({tickModel:n}),p=[],v=[],g=0;g<d.length;++g){var m=i.toGlobalCoord(d[g].coord);c?(p[0]=m,p[1]=u.y,v[0]=m,v[1]=u.y+u.height):(p[0]=u.x,p[1]=m,v[0]=u.x+u.width,v[1]=m);var y=new mt({shape:{x1:p[0],y1:p[1],x2:v[0],y2:v[1]},silent:!0});uo(y.shape,l);var _=f++%s.length;h[_]=h[_]||[],h[_].push(y)}for(var w=o.getLineStyle(["color"]),g=0;g<h.length;++g)t.add(dr(h[g],{style:ie({stroke:s[g%s.length]},w),silent:!0}))}},splitArea:function(r,t,e,a){hT(r,e,a,a)}};const kU=IU;var JD=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getCoordSysModel=function(){return this},t.type="singleAxis",t.layoutMode="box",t.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},t}(Se);at(JD,pl.prototype);const qm=JD;var NU=function(r){z(t,r);function t(e,a,i,n,o){var s=r.call(this,e,a,i)||this;return s.type=n||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.pointToData=function(e,a){return this.coordinateSystem.pointToData(e)[0]},t}(zr);const RU=NU;var QD=["single"],VU=function(){function r(t,e,a){this.type="single",this.dimension="single",this.dimensions=QD,this.axisPointerEnabled=!0,this.model=t,this._init(t,e,a)}return r.prototype._init=function(t,e,a){var i=this.dimension,n=new RU(i,rh(t),[0,0],t.get("type"),t.get("position")),o=n.type==="category";n.onBand=o&&t.get("boundaryGap"),n.inverse=t.get("inverse"),n.orient=t.get("orient"),t.axis=n,n.model=t,n.coordinateSystem=this,this._axis=n},r.prototype.update=function(t,e){t.eachSeries(function(a){if(a.coordinateSystem===this){var i=a.getData();M(i.mapDimensionsAll(this.dimension),function(n){this._axis.scale.unionExtentFromData(i,n)},this),No(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(t,e){this._rect=ct({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var t=this._rect,e=this._axis,a=e.isHorizontal(),i=a?[0,t.width]:[0,t.height],n=e.inverse?1:0;e.setExtent(i[n],i[1-n]),this._updateAxisTransform(e,a?t.x:t.y)},r.prototype._updateAxisTransform=function(t,e){var a=t.getExtent(),i=a[0]+a[1],n=t.isHorizontal();t.toGlobalCoord=n?function(o){return o+e}:function(o){return i-o+e},t.toLocalCoord=n?function(o){return o-e}:function(o){return i-o+e}},r.prototype.getAxis=function(){return this._axis},r.prototype.getBaseAxis=function(){return this._axis},r.prototype.getAxes=function(){return[this._axis]},r.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},r.prototype.containPoint=function(t){var e=this.getRect(),a=this.getAxis(),i=a.orient;return i==="horizontal"?a.contain(a.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:a.contain(a.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},r.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t[e.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(t){var e=this.getAxis(),a=this.getRect(),i=[],n=e.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),i[n]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-n]=n===0?a.y+a.height/2:a.x+a.width/2,i},r.prototype.convertToPixel=function(t,e,a){var i=eA(e);return i===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(t,e,a){var i=eA(e);return i===this?this.pointToData(a):null},r}();function eA(r){var t=r.seriesModel,e=r.singleAxisModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function OU(r,t){var e=[];return r.eachComponent("singleAxis",function(a,i){var n=new VU(a,r,t);n.name="single_"+i,n.resize(a,t),a.coordinateSystem=n,e.push(n)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var i=a.getReferringComponents("singleAxis",ot).models[0];a.coordinateSystem=i&&i.coordinateSystem}}),e}var zU={create:OU,dimensions:QD};const BU=zU;var tA=["x","y"],FU=["width","height"],GU=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,i,n,o){var s=i.axis,l=s.coordinateSystem,u=Km(l,1-Zh(s)),c=l.dataToPoint(a)[0],h=n.get("type");if(h&&h!=="none"){var f=Wm(n),d=WU[h](s,c,u);d.style=f,e.graphicKey=d.type,e.pointer=d}var p=jm(i);RD(a,e,p,i,n,o)},t.prototype.getHandleTransform=function(e,a,i){var n=jm(a,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=Hm(a.axis,e,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,a,i,n){var o=i.axis,s=o.coordinateSystem,l=Zh(o),u=Km(s,l),c=[e.x,e.y];c[l]+=a[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var h=Km(s,1-l),f=(h[1]+h[0])/2,d=[f,f];return d[l]=c[l],{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},t}(Gm),WU={line:function(r,t,e){var a=$m([t,e[0]],[t,e[1]],Zh(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,t,e){var a=r.getBandWidth(),i=e[1]-e[0];return{type:"Rect",shape:VD([t-a/2,e[0]],[a,i],Zh(r))}}};function Zh(r){return r.isHorizontal()?0:1}function Km(r,t){var e=r.getRect();return[e[tA[t]],e[tA[t]]+e[FU[t]]]}const HU=GU;var $U=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="single",t}(Ke);function UU(r){ye(Ul),Mn.registerAxisPointerClass("SingleAxisPointer",HU),r.registerComponentView($U),r.registerComponentView(kU),r.registerComponentModel(qm),Bo(r,"single",qm,qm.defaultOption),r.registerCoordinateSystem("single",BU)}var YU=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a,i){var n=mo(e);r.prototype.init.apply(this,arguments),rA(e,n)},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),rA(this.option,e)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(Se);function rA(r,t){var e=r.cellSize,a;G(e)?a=e:a=r.cellSize=[e,e],a.length===1&&(a[1]=a[0]);var i=W([0,1],function(n){return X5(t,n)&&(a[n]="auto"),a[n]!=null&&a[n]!=="auto"});ii(r,t,{type:"box",ignoreSize:i})}const ZU=YU;var XU=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){var n=this.group;n.removeAll();var o=e.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=a.getLocaleModel();this._renderDayRect(e,s,n),this._renderLines(e,s,l,n),this._renderYearText(e,s,l,n),this._renderMonthText(e,u,l,n),this._renderWeekText(e,u,s,l,n)},t.prototype._renderDayRect=function(e,a,i){for(var n=e.coordinateSystem,o=e.getModel("itemStyle").getItemStyle(),s=n.getCellWidth(),l=n.getCellHeight(),u=a.start.time;u<=a.end.time;u=n.getNextNDay(u,1).time){var c=n.dataToRect([u],!1).tl,h=new Te({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(h)}},t.prototype._renderLines=function(e,a,i,n){var o=this,s=e.coordinateSystem,l=e.getModel(["splitLine","lineStyle"]).getLineStyle(),u=e.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=a.start,f=0;h.time<=a.end.time;f++){p(h.formatedDate),f===0&&(h=s.getDateInfo(a.start.y+"-"+a.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=s.getDateInfo(d)}p(s.getNextNDay(a.end.time,1).formatedDate);function p(v){o._firstDayOfMonth.push(s.getDateInfo(v)),o._firstDayPoints.push(s.dataToRect([v],!1).tl);var g=o._getLinePointsOfOneWeek(e,v,i);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,n)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,n),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,n)},t.prototype._getEdgesPoints=function(e,a,i){var n=[e[0].slice(),e[e.length-1].slice()],o=i==="horizontal"?0:1;return n[0][o]=n[0][o]-a/2,n[1][o]=n[1][o]+a/2,n},t.prototype._drawSplitline=function(e,a,i){var n=new Xt({z2:20,shape:{points:e},style:a});i.add(n)},t.prototype._getLinePointsOfOneWeek=function(e,a,i){for(var n=e.coordinateSystem,o=n.getDateInfo(a),s=[],l=0;l<7;l++){var u=n.getNextNDay(o.time,l),c=n.dataToRect([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},t.prototype._formatterLabel=function(e,a){return X(e)&&e?U5(e,a):te(e)?e(a):a.nameMap},t.prototype._yearTextPositionControl=function(e,a,i,n,o){var s=a[0],l=a[1],u=["center","bottom"];n==="bottom"?(l+=o,u=["center","top"]):n==="left"?s-=o:n==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(n==="left"||n==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},t.prototype._renderYearText=function(e,a,i,n){var o=e.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,h=(u[0][1]+u[1][1])/2,f=i==="horizontal"?0:1,d={top:[c,u[f][1]],bottom:[c,u[1-f][1]],left:[u[1-f][0],h],right:[u[f][0],h]},p=a.start.y;+a.end.y>+a.start.y&&(p=p+"-"+a.end.y);var v=o.get("formatter"),g={start:a.start.y,end:a.end.y,nameMap:p},m=this._formatterLabel(v,g),y=new Ae({z2:30,style:Fe(o,{text:m}),silent:o.get("silent")});y.attr(this._yearTextPositionControl(y,d[l],i,l,s)),n.add(y)}},t.prototype._monthTextPositionControl=function(e,a,i,n,o){var s="left",l="top",u=e[0],c=e[1];return i==="horizontal"?(c=c+o,a&&(s="center"),n==="start"&&(l="bottom")):(u=u+o,a&&(l="middle"),n==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(e,a,i,n){var o=e.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),h=[this._tlpoints,this._blpoints];(!s||X(s))&&(s&&(a=mp(s)||a),s=a.get(["time","monthAbbr"])||[]);var f=u==="start"?0:1,d=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",v=o.get("silent"),g=0;g<h[f].length-1;g++){var m=h[f][g].slice(),y=this._firstDayOfMonth[g];if(p){var _=this._firstDayPoints[g];m[d]=(_[d]+h[0][g+1][d])/2}var w=o.get("formatter"),x=s[+y.m-1],S={yyyy:y.y,yy:(y.y+"").slice(2),MM:y.m,M:+y.m,nameMap:x},L=this._formatterLabel(w,S),C=new Ae({z2:30,style:F(Fe(o,{text:L}),this._monthTextPositionControl(m,p,i,u,l)),silent:v});n.add(C)}}},t.prototype._weekTextPositionControl=function(e,a,i,n,o){var s="center",l="middle",u=e[0],c=e[1],h=i==="start";return a==="horizontal"?(u=u+n+(h?1:-1)*o[0]/2,s=h?"right":"left"):(c=c+n+(h?1:-1)*o[1]/2,l=h?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},t.prototype._renderWeekText=function(e,a,i,n,o){var s=e.getModel("dayLabel");if(s.get("show")){var l=e.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),h=s.get("margin"),f=l.getFirstDayOfWeek();if(!c||X(c)){c&&(a=mp(c)||a);var d=a.get(["time","dayOfWeekShort"]);c=d||W(a.get(["time","dayOfWeekAbbr"]),function(S){return S[0]})}var p=l.getNextNDay(i.end.time,7-i.lweek).time,v=[l.getCellWidth(),l.getCellHeight()];h=Z(h,Math.min(v[1],v[0])),u==="start"&&(p=l.getNextNDay(i.start.time,-(7+i.fweek)).time,h=-h);for(var g=s.get("silent"),m=0;m<7;m++){var y=l.getNextNDay(p,m),_=l.dataToRect([y.time],!1).center,w=m;w=Math.abs((m+f)%7);var x=new Ae({z2:30,style:F(Fe(s,{text:c[w]}),this._weekTextPositionControl(_,n,u,h,v)),silent:g});o.add(x)}}},t.type="calendar",t}(Ke);const jU=XU;var Jm=864e5,qU=function(){function r(t,e,a){this.type="calendar",this.dimensions=r.dimensions,this.getDimensionsInfo=r.getDimensionsInfo,this._model=t}return r.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},r.prototype.getRangeInfo=function(){return this._rangeInfo},r.prototype.getModel=function(){return this._model},r.prototype.getRect=function(){return this._rect},r.prototype.getCellWidth=function(){return this._sw},r.prototype.getCellHeight=function(){return this._sh},r.prototype.getOrient=function(){return this._orient},r.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},r.prototype.getDateInfo=function(t){t=Zr(t);var e=t.getFullYear(),a=t.getMonth()+1,i=a<10?"0"+a:""+a,n=t.getDate(),o=n<10?"0"+n:""+n,s=t.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:e+"",m:i,d:o,day:s,time:t.getTime(),formatedDate:e+"-"+i+"-"+o,date:t}},r.prototype.getNextNDay=function(t,e){return e=e||0,e===0?this.getDateInfo(t):(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+e),this.getDateInfo(t))},r.prototype.update=function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var a=this._rangeInfo.weeks||1,i=["width","height"],n=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[a,7]:[7,a];M([0,1],function(h){c(n,h)&&(o[i[h]]=n[h]*s[h])});var l={width:e.getWidth(),height:e.getHeight()},u=this._rect=ct(o,l);M([0,1],function(h){c(n,h)||(n[h]=u[i[h]]/s[h])});function c(h,f){return h[f]!=null&&h[f]!=="auto"}this._sw=n[0],this._sh=n[1]},r.prototype.dataToPoint=function(t,e){G(t)&&(t=t[0]),e==null&&(e=!0);var a=this.getDateInfo(t),i=this._rangeInfo,n=a.formatedDate;if(e&&!(a.time>=i.start.time&&a.time<i.end.time+Jm))return[NaN,NaN];var o=a.day,s=this._getRangeInfo([i.start.time,n]).nthWeek;return this._orient==="vertical"?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]:[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},r.prototype.pointToData=function(t){var e=this.pointToDate(t);return e&&e.time},r.prototype.dataToRect=function(t,e){var a=this.dataToPoint(t,e);return{contentShape:{x:a[0]-(this._sw-this._lineWidth)/2,y:a[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:a,tl:[a[0]-this._sw/2,a[1]-this._sh/2],tr:[a[0]+this._sw/2,a[1]-this._sh/2],br:[a[0]+this._sw/2,a[1]+this._sh/2],bl:[a[0]-this._sw/2,a[1]+this._sh/2]}},r.prototype.pointToDate=function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,a=Math.floor((t[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(a,e-1,i):this._getDateByWeeksAndDay(e,a-1,i)},r.prototype.convertToPixel=function(t,e,a){var i=aA(e);return i===this?i.dataToPoint(a):null},r.prototype.convertFromPixel=function(t,e,a){var i=aA(e);return i===this?i.pointToData(a):null},r.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},r.prototype._initRangeOption=function(){var t=this._model.get("range"),e;if(G(t)&&t.length===1&&(t=t[0]),G(t))e=t;else{var a=t.toString();if(/^\d{4}$/.test(a)&&(e=[a+"-01-01",a+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(a)){var i=this.getDateInfo(a),n=i.date;n.setMonth(n.getMonth()+1);var o=this.getNextNDay(n,-1);e=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(a)&&(e=[a,a])}if(!e)return process.env.NODE_ENV!=="production"&&Cr("Invalid date range."),t;var s=this._getRangeInfo(e);return s.start.time>s.end.time&&e.reverse(),e},r.prototype._getRangeInfo=function(t){var e=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],a;e[0].time>e[1].time&&(a=!0,e.reverse());var i=Math.floor(e[1].time/Jm)-Math.floor(e[0].time/Jm)+1,n=new Date(e[0].time),o=n.getDate(),s=e[1].date.getDate();n.setDate(o+i-1);var l=n.getDate();if(l!==s)for(var u=n.getTime()-e[1].time>0?1:-1;(l=n.getDate())!==s&&(n.getTime()-e[1].time)*u>0;)i-=u,n.setDate(l-u);var c=Math.floor((i+e[0].day+6)/7),h=a?-c+1:c-1;return a&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:i,weeks:c,nthWeek:h,fweek:e[0].day,lweek:e[1].day}},r.prototype._getDateByWeeksAndDay=function(t,e,a){var i=this._getRangeInfo(a);if(t>i.weeks||t===0&&e<i.fweek||t===i.weeks&&e>i.lweek)return null;var n=(t-1)*7-i.fweek+e,o=new Date(i.start.time);return o.setDate(+i.start.d+n),this.getDateInfo(o)},r.create=function(t,e){var a=[];return t.eachComponent("calendar",function(i){var n=new r(i);a.push(n),i.coordinateSystem=n}),t.eachSeries(function(i){i.get("coordinateSystem")==="calendar"&&(i.coordinateSystem=a[i.get("calendarIndex")||0])}),a},r.dimensions=["time","value"],r}();function aA(r){var t=r.calendarModel,e=r.seriesModel,a=t?t.coordinateSystem:e?e.coordinateSystem:null;return a}const KU=qU;function JU(r){r.registerComponentModel(ZU),r.registerComponentView(jU),r.registerCoordinateSystem("calendar",KU)}function QU(r,t){var e=r.existing;if(t.id=r.keyInfo.id,!t.type&&e&&(t.type=e.type),t.parentId==null){var a=t.parentOption;a?t.parentId=a.id:e&&(t.parentId=e.parentId)}t.parentOption=null}function iA(r,t){var e;return M(t,function(a){r[a]!=null&&r[a]!=="auto"&&(e=!0)}),e}function eY(r,t,e){var a=F({},e),i=r[t],n=e.$action||"merge";if(n==="merge")if(i){if(process.env.NODE_ENV!=="production"){var o=e.type;ae(!o||i.type===o,'Please set $action: "replace" to change `type`')}de(i,a,!0),ii(i,a,{ignoreSize:!0}),Lb(e,i),Xh(e,i),Xh(e,i,"shape"),Xh(e,i,"style"),Xh(e,i,"extra"),e.clipPath=i.clipPath}else r[t]=a;else n==="replace"?r[t]=a:n==="remove"&&i&&(r[t]=null)}var nA=["transition","enterFrom","leaveTo"],tY=nA.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Xh(r,t,e){if(e&&(!r[e]&&t[e]&&(r[e]={}),r=r[e],t=t[e]),!(!r||!t))for(var a=e?nA:tY,i=0;i<a.length;i++){var n=a[i];r[n]==null&&t[n]!=null&&(r[n]=t[n])}}function rY(r,t){if(r&&(r.hv=t.hv=[iA(t,["left","right"]),iA(t,["top","bottom"])],r.type==="group")){var e=r,a=t;e.width==null&&(e.width=a.width=0),e.height==null&&(e.height=a.height=0)}}var aY=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventAutoZ=!0,e}return t.prototype.mergeOption=function(e,a){var i=this.option.elements;this.option.elements=null,r.prototype.mergeOption.call(this,e,a),this.option.elements=i},t.prototype.optionUpdated=function(e,a){var i=this.option,n=(a?i:e).elements,o=i.elements=a?[]:i.elements,s=[];this._flatten(n,s,null);var l=y1(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];M(l,function(c,h){var f=c.newOption;process.env.NODE_ENV!=="production"&&ae(re(f)||c.existing,"Empty graphic option definition"),f&&(u.push(f),QU(c,f),eY(o,h,f),rY(o[h],f))},this),i.elements=Ie(o,function(c){return c&&delete c.$action,c!=null})},t.prototype._flatten=function(e,a,i){M(e,function(n){if(n){i&&(n.parentOption=i),a.push(n);var o=n.children;o&&o.length&&this._flatten(o,a,n),delete n.children}},this)},t.prototype.useElOptionsToUpdate=function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e},t.type="graphic",t.defaultOption={elements:[]},t}(Se),oA={path:null,compoundPath:null,group:oe,image:bt,text:Ae},Lr=xe(),iY=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this._elMap=Q()},t.prototype.render=function(e,a,i){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,i)},t.prototype._updateElements=function(e){var a=e.useElOptionsToUpdate();if(a){var i=this._elMap,n=this.group,o=e.get("z"),s=e.get("zlevel");M(a,function(l){var u=ut(l.id,null),c=u!=null?i.get(u):null,h=ut(l.parentId,null),f=h!=null?i.get(h):n,d=l.type,p=l.style;d==="text"&&p&&l.hv&&l.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var v=l.textContent,g=l.textConfig;if(p&&nD(p,d,!!g,!!v)){var m=oD(p,d,!0);!g&&m.textConfig&&(g=l.textConfig=m.textConfig),!v&&m.textContent&&(v=m.textContent)}var y=nY(l);process.env.NODE_ENV!=="production"&&c&&ae(f===c.parent,"Changing parent is not supported.");var _=l.$action||"merge",w=_==="merge",x=_==="replace";if(w){var S=!c,L=c;S?L=sA(u,f,l.type,i):(L&&(Lr(L).isNew=!1),_D(L)),L&&(Bh(L,y,e,{isInit:S}),lA(L,l,o,s))}else if(x){jh(c,l,i,e);var C=sA(u,f,l.type,i);C&&(Bh(C,y,e,{isInit:!0}),lA(C,l,o,s))}else _==="remove"&&(pD(c,l),jh(c,l,i,e));var T=i.get(u);if(T&&v)if(w){var A=T.getTextContent();A?A.attr(v):T.setTextContent(new Ae(v))}else x&&T.setTextContent(new Ae(v));if(T){var D=l.clipPath;if(D){var E=D.type,I=void 0,S=!1;if(w){var P=T.getClipPath();S=!P||Lr(P).type!==E,I=S?Qm(E):P}else x&&(S=!0,I=Qm(E));T.setClipPath(I),Bh(I,D,e,{isInit:S}),Gh(I,D.keyframeAnimation,e)}var k=Lr(T);T.setTextConfig(g),k.option=l,oY(T,e,l),an({el:T,componentModel:e,itemName:T.name,itemTooltipOption:l.tooltip}),Gh(T,l.keyframeAnimation,e)}})}},t.prototype._relocate=function(e,a){for(var i=e.option.elements,n=this.group,o=this._elMap,s=a.getWidth(),l=a.getHeight(),u=["x","y"],c=0;c<i.length;c++){var h=i[c],f=ut(h.id,null),d=f!=null?o.get(f):null;if(!(!d||!d.isGroup)){var p=d.parent,v=p===n,g=Lr(d),m=Lr(p);g.width=Z(g.option.width,v?s:m.width)||0,g.height=Z(g.option.height,v?l:m.height)||0}}for(var c=i.length-1;c>=0;c--){var h=i[c],f=ut(h.id,null),d=f!=null?o.get(f):null;if(d){var p=d.parent,m=Lr(p),y=p===n?{width:s,height:l}:{width:m.width,height:m.height},_={},w=Sc(d,h,y,null,{hv:h.hv,boundingMode:h.bounding},_);if(!Lr(d).isNew&&w){for(var x=h.transition,S={},L=0;L<u.length;L++){var C=u[L],T=_[C];x&&(zn(x)||me(x,C)>=0)?S[C]=T:d[C]=T}Me(d,S,e,0)}else d.attr(_)}}},t.prototype._clear=function(){var e=this,a=this._elMap;a.each(function(i){jh(i,Lr(i).option,a,e._lastGraphicModel)}),this._elMap=Q()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(Ke);function Qm(r){process.env.NODE_ENV!=="production"&&ae(r,"graphic type MUST be set");var t=K(oA,r)?oA[r]:up(r);process.env.NODE_ENV!=="production"&&ae(t,"graphic type "+r+" can not be found");var e=new t({});return Lr(e).type=r,e}function sA(r,t,e,a){var i=Qm(e);return t.add(i),a.set(r,i),Lr(i).id=r,Lr(i).isNew=!0,i}function jh(r,t,e,a){var i=r&&r.parent;i&&(r.type==="group"&&r.traverse(function(n){jh(n,t,e,a)}),Fh(r,t,a),e.removeKey(Lr(r).id))}function lA(r,t,e,a){r.isGroup||M([["cursor",hr.prototype.cursor],["zlevel",a||0],["z",e||0],["z2",0]],function(i){var n=i[0];K(t,n)?r[n]=le(t[n],i[1]):r[n]==null&&(r[n]=i[1])}),M(we(t),function(i){if(i.indexOf("on")===0){var n=t[i];r[i]=te(n)?n:null}}),K(t,"draggable")&&(r.draggable=t.draggable),t.name!=null&&(r.name=t.name),t.id!=null&&(r.id=t.id)}function nY(r){return r=F({},r),M(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(Sb),function(t){delete r[t]}),r}function oY(r,t,e){var a=ue(r).eventData;!r.silent&&!r.ignore&&!a&&(a=ue(r).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:r.name}),a&&(a.info=e.info)}function sY(r){r.registerComponentModel(aY),r.registerComponentView(iY),r.registerPreprocessor(function(t){var e=t.graphic;G(e)?!e[0]||!e[0].elements?t.graphic=[{elements:e}]:t.graphic=[t.graphic[0]]:e&&!e.elements&&(t.graphic=[{elements:[e]}])})}var uA=["x","y","radius","angle","single"],lY=["cartesian2d","polar","singleAxis"];function uY(r){var t=r.get("coordinateSystem");return me(lY,t)>=0}function _i(r){return process.env.NODE_ENV!=="production"&&ae(r),r+"Axis"}function cY(r,t){var e=Q(),a=[],i=Q();r.eachComponent({mainType:"dataZoom",query:t},function(c){i.get(c.uid)||s(c)});var n;do n=!1,r.eachComponent("dataZoom",o);while(n);function o(c){!i.get(c.uid)&&l(c)&&(s(c),n=!0)}function s(c){i.set(c.uid,!0),a.push(c),u(c)}function l(c){var h=!1;return c.eachTargetAxis(function(f,d){var p=e.get(f);p&&p[d]&&(h=!0)}),h}function u(c){c.eachTargetAxis(function(h,f){(e.get(h)||e.set(h,[]))[f]=!0})}return a}function cA(r){var t=r.ecModel,e={infoList:[],infoMap:Q()};return r.eachTargetAxis(function(a,i){var n=t.getComponent(_i(a),i);if(n){var o=n.getCoordSysModel();if(o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(n)}}}),e}var ey=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r}(),hY=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,a,i){var n=hA(e);this.settledOption=n,this.mergeDefaultAndTheme(e,i),this._doInit(n)},t.prototype.mergeOption=function(e){var a=hA(e);de(this.option,e,!0),de(this.settledOption,a,!0),this._doInit(a)},t.prototype._doInit=function(e){var a=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var i=this.settledOption;M([["start","startValue"],["end","endValue"]],function(n,o){this._rangePropMode[o]==="value"&&(a[n[0]]=i[n[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),a=this._targetAxisInfoMap=Q(),i=this._fillSpecifiedTargetAxis(a);i?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(n){n.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var a=!1;return M(uA,function(i){var n=this.getReferringComponents(_i(i),TN);if(n.specified){a=!0;var o=new ey;M(n.models,function(s){o.add(s.componentIndex)}),e.set(i,o)}},this),a},t.prototype._fillAutoTargetAxisByOrient=function(e,a){var i=this.ecModel,n=!0;if(n){var o=a==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(n){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===a}});l(s,"single")}function l(u,c){var h=u[0];if(h){var f=new ey;if(f.add(h.componentIndex),e.set(c,f),n=!1,c==="x"||c==="y"){var d=h.getReferringComponents("grid",ot).models[0];d&&M(u,function(p){h.componentIndex!==p.componentIndex&&d===p.getReferringComponents("grid",ot).models[0]&&f.add(p.componentIndex)})}}}n&&M(uA,function(u){if(n){var c=i.findComponents({mainType:_i(u),filter:function(f){return f.get("type",!0)==="category"}});if(c[0]){var h=new ey;h.add(c[0].componentIndex),e.set(u,h),n=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(a){!e&&(e=a)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var a=this._rangePropMode,i=this.get("rangeMode");M([["start","startValue"],["end","endValue"]],function(n,o){var s=e[n[0]]!=null,l=e[n[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":i?a[o]=i[o]:s&&(a[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(a,i){e==null&&(e=this.ecModel.getComponent(_i(a),i))},this),e},t.prototype.eachTargetAxis=function(e,a){this._targetAxisInfoMap.each(function(i,n){M(i.indexList,function(o){e.call(a,n,o)})})},t.prototype.getAxisProxy=function(e,a){var i=this.getAxisModel(e,a);if(i)return i.__dzAxisProxy},t.prototype.getAxisModel=function(e,a){process.env.NODE_ENV!=="production"&&ae(e&&a!=null);var i=this._targetAxisInfoMap.get(e);if(i&&i.indexMap[a])return this.ecModel.getComponent(_i(e),a)},t.prototype.setRawRange=function(e){var a=this.option,i=this.settledOption;M([["start","startValue"],["end","endValue"]],function(n){(e[n[0]]!=null||e[n[1]]!=null)&&(a[n[0]]=i[n[0]]=e[n[0]],a[n[1]]=i[n[1]]=e[n[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var a=this.option;M(["start","startValue","end","endValue"],function(i){a[i]=e[i]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,a){if(e==null&&a==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(e,a).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var a,i=this._targetAxisInfoMap.keys(),n=0;n<i.length;n++)for(var o=i[n],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;a||(a=u)}return a},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return process.env.NODE_ENV!=="production"&&ae(this._orient),this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(Se);function hA(r){var t={};return M(["start","end","startValue","endValue","throttle"],function(e){r.hasOwnProperty(e)&&(t[e]=r[e])}),t}const Yl=hY;var fY=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.select",t}(Yl);const dY=fY;var pY=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i,n){this.dataZoomModel=e,this.ecModel=a,this.api=i},t.type="dataZoom",t}(Ke);const ty=pY;var vY=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.select",t}(ty);const gY=vY;var jo=M,fA=cr,mY=function(){function r(t,e,a,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=a}return r.prototype.hostedBy=function(t){return this._dataZoomModel===t},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(uY(e)){var a=_i(this._dimName),i=e.getReferringComponents(a,ot).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}},this),t},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return ne(this._minMaxSpan)},r.prototype.calculateDataWindow=function(t){var e=this._dataExtent,a=this.getAxisModel(),i=a.axis.scale,n=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;jo(["start","end"],function(f,d){var p=t[f],v=t[f+"Value"];n[d]==="percent"?(p==null&&(p=o[d]),v=i.parse(ke(p,o,e))):(u=!0,v=v==null?e[d]:i.parse(v),p=ke(v,e,o)),l[d]=v==null||isNaN(v)?e[d]:v,s[d]=p==null||isNaN(p)?o[d]:p}),fA(l),fA(s);var c=this._minMaxSpan;u?h(l,s,e,o,!1):h(s,l,o,e,!0);function h(f,d,p,v,g){var m=g?"Span":"ValueSpan";Rn(0,f,p,"all",c["min"+m],c["max"+m]);for(var y=0;y<2;y++)d[y]=ke(f[y],p,v,!0),g&&(d[y]=i.parse(d[y]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=yY(this,this._dimName,e),this._updateMinMaxSpan();var a=this.calculateDataWindow(t.settledOption);this._valueWindow=a.valueWindow,this._percentWindow=a.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(t,e){if(t!==this._dataZoomModel)return;var a=this._dimName,i=this.getTargetSeriesModels(),n=t.get("filterMode"),o=this._valueWindow;if(n==="none")return;jo(i,function(l){var u=l.getData(),c=u.mapDimensionsAll(a);if(c.length){if(n==="weakFilter"){var h=u.getStore(),f=W(c,function(d){return u.getDimensionIndex(d)},u);u.filterSelf(function(d){for(var p,v,g,m=0;m<c.length;m++){var y=h.get(f[m],d),_=!isNaN(y),w=y<o[0],x=y>o[1];if(_&&!w&&!x)return!0;_&&(g=!0),w&&(p=!0),x&&(v=!0)}return g&&p&&v})}else jo(c,function(d){if(n==="empty")l.setData(u=u.map(d,function(v){return s(v)?v:NaN}));else{var p={};p[d]=o,u.selectRange(p)}});jo(c,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,a=this._dataExtent;jo(["min","max"],function(i){var n=e.get(i+"Span"),o=e.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?n=ke(a[0]+o,a,[0,100],!0):n!=null&&(o=ke(n,[0,100],a,!0)-a[0]),t[i+"Span"]=n,t[i+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,a=this._valueWindow;if(e){var i=n1(a,[0,500]);i=Math.min(i,20);var n=t.axis.scale.rawExtentInfo;e[0]!==0&&n.setDeterminedMinMax("min",+a[0].toFixed(i)),e[1]!==100&&n.setDeterminedMinMax("max",+a[1].toFixed(i)),n.freeze()}},r}();function yY(r,t,e){var a=[1/0,-1/0];jo(e,function(o){GB(a,o.getData(),t)});var i=r.getAxisModel(),n=dS(i.axis.scale,i,a).calculate();return[n.min,n.max]}const _Y=mY;var bY={getTargetSeries:function(r){function t(i){r.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(o,s){var l=r.getComponent(_i(o),s);i(o,s,l,n)})})}t(function(i,n,o,s){o.__dzAxisProxy=null});var e=[];t(function(i,n,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new _Y(i,n,s,r),e.push(o.__dzAxisProxy))});var a=Q();return M(e,function(i){M(i.getTargetSeriesModels(),function(n){a.set(n.uid,n)})}),a},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(a,i){e.getAxisProxy(a,i).reset(e)}),e.eachTargetAxis(function(a,i){e.getAxisProxy(a,i).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var a=e.findRepresentativeAxisProxy();if(a){var i=a.getDataPercentWindow(),n=a.getDataValueWindow();e.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})}})}};const wY=bY;function xY(r){r.registerAction("dataZoom",function(t,e){var a=cY(e,t);M(a,function(i){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var dA=!1;function ry(r){dA||(dA=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,wY),xY(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function SY(r){r.registerComponentModel(dY),r.registerComponentView(gY),ry(r)}var Tr=function(){function r(){}return r}(),pA={};function qo(r,t){pA[r]=t}function vA(r){return pA[r]}var LY=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;M(this.option.feature,function(a,i){var n=vA(i);n&&(n.getDefaultOption&&(n.defaultOption=n.getDefaultOption(e)),de(a,n.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(Se);const TY=LY;function CY(r,t,e){var a=t.getBoxLayoutParams(),i=t.get("padding"),n={width:e.getWidth(),height:e.getHeight()},o=ct(a,n,i);un(t.get("orient"),r,t.get("itemGap"),o.width,o.height),Sc(r,a,n,i)}function gA(r,t){var e=go(t.get("padding")),a=t.getItemStyle(["color","opacity"]);return a.fill=t.get("backgroundColor"),r=new Te({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:a,silent:!0,z2:-1}),r}var DY=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,i,n){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},c=this._features||(this._features={}),h=[];M(u,function(p,v){h.push(v)}),new Ca(this._featureNames||[],h).add(f).update(f).remove(fe(f,null)).execute(),this._featureNames=h;function f(p,v){var g=h[p],m=h[v],y=u[g],_=new Ge(y,e,e.ecModel),w;if(n&&n.newTitle!=null&&n.featureName===g&&(y.title=n.newTitle),g&&!m){if(AY(g))w={onclick:_.option.onclick,featureName:g};else{var x=vA(g);if(!x)return;w=new x}c[g]=w}else if(w=c[m],!w)return;w.uid=ho("toolbox-feature"),w.model=_,w.ecModel=a,w.api=i;var S=w instanceof Tr;if(!g&&m){S&&w.dispose&&w.dispose(a,i);return}if(!_.get("show")||S&&w.unusable){S&&w.remove&&w.remove(a,i);return}d(_,w,g),_.setIconStatus=function(L,C){var T=this.option,A=this.iconPaths;T.iconStatus=T.iconStatus||{},T.iconStatus[L]=C,A[L]&&(C==="emphasis"?xa:Sa)(A[L])},w instanceof Tr&&w.render&&w.render(_,a,i,n)}function d(p,v,g){var m=p.getModel("iconStyle"),y=p.getModel(["emphasis","iconStyle"]),_=v instanceof Tr&&v.getIcons?v.getIcons():p.get("icon"),w=p.get("title")||{},x,S;X(_)?(x={},x[g]=_):x=_,X(w)?(S={},S[g]=w):S=w;var L=p.iconPaths={};M(x,function(C,T){var A=Gs(C,{},{x:-s/2,y:-s/2,width:s,height:s});A.setStyle(m.getItemStyle());var D=A.ensureState("emphasis");D.style=y.getItemStyle();var E=new Ae({style:{text:S[T],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null,font:fp({fontStyle:y.get("textFontStyle"),fontFamily:y.get("textFontFamily"),fontSize:y.get("textFontSize"),fontWeight:y.get("textFontWeight")},a)},ignore:!0});A.setTextContent(E),an({el:A,componentModel:e,itemName:T,formatterParamsExtra:{title:S[T]}}),A.__title=S[T],A.on("mouseover",function(){var I=y.getItemStyle(),P=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";E.setStyle({fill:y.get("textFill")||I.fill||I.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),A.setTextConfig({position:y.get("textPosition")||P}),E.ignore=!e.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",T])!=="emphasis"&&i.leaveEmphasis(this),E.hide()}),(p.get(["iconStatus",T])==="emphasis"?xa:Sa)(A),o.add(A),A.on("click",j(v.onclick,v,a,i,T)),L[T]=A})}CY(o,e,i),o.add(gA(o.getBoundingRect(),e)),l||o.eachChild(function(p){var v=p.__title,g=p.ensureState("emphasis"),m=g.textConfig||(g.textConfig={}),y=p.getTextContent(),_=y&&y.ensureState("emphasis");if(_&&!te(_)&&v){var w=_.style||(_.style={}),x=ws(v,Ae.makeFont(w)),S=p.x+o.x,L=p.y+o.y+s,C=!1;L+x.height>i.getHeight()&&(m.position="top",C=!0);var T=C?-5-x.height:s+10;S+x.width/2>i.getWidth()?(m.position=["100%",T],w.align="right"):S-x.width/2<0&&(m.position=[0,T],w.align="left")}})},t.prototype.updateView=function(e,a,i,n){M(this._features,function(o){o instanceof Tr&&o.updateView&&o.updateView(o.model,a,i,n)})},t.prototype.remove=function(e,a){M(this._features,function(i){i instanceof Tr&&i.remove&&i.remove(e,a)}),this.group.removeAll()},t.prototype.dispose=function(e,a){M(this._features,function(i){i instanceof Tr&&i.dispose&&i.dispose(e,a)})},t.type="toolbox",t}(Ke);function AY(r){return r.indexOf("my")===0}const MY=DY;var EY=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,a){var i=this.model,n=i.get("name")||e.get("title.0.text")||"echarts",o=a.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=a.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Le.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=n+"."+s,c.target="_blank",c.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var f=l.split(","),d=f[0].indexOf("base64")>-1,p=o?decodeURIComponent(f[1]):f[1];d&&(p=window.atob(p));var v=n+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,m=new Uint8Array(g);g--;)m[g]=p.charCodeAt(g);var y=new Blob([m]);window.navigator.msSaveOrOpenBlob(y,v)}else{var _=document.createElement("iframe");document.body.appendChild(_);var w=_.contentWindow,x=w.document;x.open("image/svg+xml","replace"),x.write(p),x.close(),w.focus(),x.execCommand("SaveAs",!0,v),document.body.removeChild(_)}}else{var S=i.get("lang"),L='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(S&&S[0]||"")+'" /></body>',C=window.open();C.document.write(L),C.document.title=n}},t.getDefaultOption=function(e){var a={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},t}(Tr);const IY=EY;var mA="__ec_magicType_stack__",PY=[["line","bar"],["stack"]],kY=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,a=e.get("icon"),i={};return M(e.get("type"),function(n){a[n]&&(i[n]=a[n])}),i},t.getDefaultOption=function(e){var a={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return a},t.prototype.onclick=function(e,a,i){var n=this.model,o=n.get(["seriesIndex",i]);if(yA[i]){var s={series:[]},l=function(h){var f=h.subType,d=h.id,p=yA[i](f,d,h,n);p&&(ie(p,h.option),s.series.push(p));var v=h.coordinateSystem;if(v&&v.type==="cartesian2d"&&(i==="line"||i==="bar")){var g=v.getAxesByScale("ordinal")[0];if(g){var m=g.dim,y=m+"Axis",_=h.getReferringComponents(y,ot).models[0],w=_.componentIndex;s[y]=s[y]||[];for(var x=0;x<=w;x++)s[y][w]=s[y][w]||{};s[y][w].boundaryGap=i==="bar"}}};M(PY,function(h){me(h,i)>=0&&M(h,function(f){n.setIconStatus(f,"normal")})}),n.setIconStatus(i,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=de({stack:n.option.title.tiled,tiled:n.option.title.stack},n.option.title),n.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),a.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},t}(Tr),yA={line:function(r,t,e,a){if(r==="bar")return de({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(r,t,e,a){if(r==="line")return de({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(r,t,e,a){var i=e.get("stack")===mA;if(r==="line"||r==="bar")return a.setIconStatus("stack",i?"normal":"emphasis"),de({id:t,stack:i?"":mA},a.get(["option","stack"])||{},!0)}};ra({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});const NY=kY;var qh=new Array(60).join("-"),Ko=" ";function RY(r){var t={},e=[],a=[];return r.eachRawSeries(function(i){var n=i.coordinateSystem;if(n&&(n.type==="cartesian2d"||n.type==="polar")){var o=n.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:n.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(i)}else e.push(i)}else e.push(i)}),{seriesGroupByCategoryAxis:t,other:e,meta:a}}function VY(r){var t=[];return M(r,function(e,a){var i=e.categoryAxis,n=e.valueAxis,o=n.dim,s=[" "].concat(W(e.series,function(d){return d.name})),l=[i.model.getCategories()];M(e.series,function(d){var p=d.getRawData();l.push(d.getRawData().mapArray(p.mapDimension(o),function(v){return v}))});for(var u=[s.join(Ko)],c=0;c<l[0].length;c++){for(var h=[],f=0;f<l.length;f++)h.push(l[f][c]);u.push(h.join(Ko))}t.push(u.join(`
249
+ `))}),t.join(`
250
+
251
+ `+qh+`
252
+
253
+ `)}function OY(r){return W(r,function(t){var e=t.getRawData(),a=[t.name],i=[];return e.each(e.dimensions,function(){for(var n=arguments.length,o=arguments[n-1],s=e.getName(o),l=0;l<n-1;l++)i[l]=arguments[l];a.push((s?s+Ko:"")+i.join(Ko))}),a.join(`
254
+ `)}).join(`
255
+
256
+ `+qh+`
257
+
258
+ `)}function zY(r){var t=RY(r);return{value:Ie([VY(t.seriesGroupByCategoryAxis),OY(t.other)],function(e){return!!e.replace(/[\n\t\s]/g,"")}).join(`
259
+
260
+ `+qh+`
261
+
262
+ `),meta:t.meta}}function Kh(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function BY(r){var t=r.slice(0,r.indexOf(`
263
+ `));if(t.indexOf(Ko)>=0)return!0}var ay=new RegExp("["+Ko+"]+","g");function FY(r){for(var t=r.split(/\n+/g),e=Kh(t.shift()).split(ay),a=[],i=W(e,function(l){return{name:l,data:[]}}),n=0;n<t.length;n++){var o=Kh(t[n]).split(ay);a.push(o.shift());for(var s=0;s<o.length;s++)i[s]&&(i[s].data[n]=o[s])}return{series:i,categories:a}}function GY(r){for(var t=r.split(/\n+/g),e=Kh(t.shift()),a=[],i=0;i<t.length;i++){var n=Kh(t[i]);if(n){var o=n.split(ay),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),a[i]={name:s,value:[]},l=a[i].value):l=a[i]=[];for(var c=0;c<o.length;c++)l.push(+o[c]);l.length===1&&(u?a[i].value=l[0]:a[i]=l[0])}}return{name:e,data:a}}function WY(r,t){var e=r.split(new RegExp(`
264
+ *`+qh+`
265
+ *`,"g")),a={series:[]};return M(e,function(i,n){if(BY(i)){var o=FY(i),s=t[n],l=s.axisDim+"Axis";s&&(a[l]=a[l]||[],a[l][s.axisIndex]={data:o.categories},a.series=a.series.concat(o.series))}else{var o=GY(i);a.series.push(o)}}),a}var HY=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,a){setTimeout(function(){a.dispatchAction({type:"hideTip"})});var i=a.getDom(),n=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=n.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=n.get("lang")||[];s.innerHTML=l[0]||n.get("title"),s.style.cssText="margin:10px 20px",s.style.color=n.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var h=n.get("optionToContent"),f=n.get("contentToOption"),d=zY(e);if(te(h)){var p=h(a.getOption());X(p)?u.innerHTML=p:Li(p)&&u.appendChild(p)}else{c.readOnly=n.get("readOnly");var v=c.style;v.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",v.color=n.get("textColor"),v.borderColor=n.get("textareaBorderColor"),v.backgroundColor=n.get("textareaColor"),c.value=d.value,u.appendChild(c)}var g=d.meta,m=document.createElement("div");m.style.cssText="position:absolute;bottom:5px;left:0;right:0";var y="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",_=document.createElement("div"),w=document.createElement("div");y+=";background-color:"+n.get("buttonColor"),y+=";color:"+n.get("buttonTextColor");var x=this;function S(){i.removeChild(o),x._dom=null}If(_,"click",S),If(w,"click",function(){if(f==null&&h!=null||f!=null&&h==null){process.env.NODE_ENV!=="production"&&je("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."),S();return}var L;try{te(f)?L=f(u,a.getOption()):L=WY(c.value,g)}catch(C){throw S(),new Error("Data view format error "+C)}L&&a.dispatchAction({type:"changeDataView",newOption:L}),S()}),_.innerHTML=l[1],w.innerHTML=l[2],w.style.cssText=_.style.cssText=y,!n.get("readOnly")&&m.appendChild(w),m.appendChild(_),o.appendChild(s),o.appendChild(u),o.appendChild(m),u.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},t.prototype.remove=function(e,a){this._dom&&a.getDom().removeChild(this._dom)},t.prototype.dispose=function(e,a){this.remove(e,a)},t.getDefaultOption=function(e){var a={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:e.getLocaleModel().get(["toolbox","dataView","title"]),lang:e.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return a},t}(Tr);function $Y(r,t){return W(r,function(e,a){var i=t&&t[a];if(re(i)&&!G(i)){var n=re(e)&&!G(e);n||(e={value:e});var o=i.name!=null&&e.name==null;return e=ie(e,i),o&&delete e.name,e}else return e})}ra({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,t){var e=[];M(r.newOption.series,function(a){var i=t.getSeriesByName(a.name)[0];if(!i)e.push(F({type:"scatter"},a));else{var n=i.get("data");e.push({name:a.name,data:$Y(a.data,n)})}}),t.mergeOption(ie({series:e},r.newOption))});const UY=HY;var _A=M,bA=xe();function YY(r,t){var e=iy(r);_A(t,function(a,i){for(var n=e.length-1;n>=0;n--){var o=e[n];if(o[i])break}if(n<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();e[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),e.push(t)}function ZY(r){var t=iy(r),e=t[t.length-1];t.length>1&&t.pop();var a={};return _A(e,function(i,n){for(var o=t.length-1;o>=0;o--)if(i=t[o][n],i){a[n]=i;break}}),a}function XY(r){bA(r).snapshots=null}function jY(r){return iy(r).length}function iy(r){var t=bA(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var qY=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,a){XY(e),a.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var a={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])};return a},t}(Tr);ra({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});const KY=qY;var JY=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],QY=function(){function r(t,e,a){var i=this;this._targetInfoList=[];var n=wA(e,t);M(eZ,function(o,s){(!a||!a.include||me(a.include,s)>=0)&&o(n,i._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(a,i,n){if((a.coordRanges||(a.coordRanges=[])).push(i),!a.coordRange){a.coordRange=i;var o=oy[a.brushType](0,n,i);a.__rangeOffset={offset:TA[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,a){M(t,function(i){var n=this.findTargetInfo(i,e);n&&n!==!0&&M(n.coordSyses,function(o){var s=oy[i.brushType](1,o,i.range,!0);a(i,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){M(t,function(a){var i=this.findTargetInfo(a,e);if(process.env.NODE_ENV!=="production"&&(ae(!i||i===!0||a.coordRange,"coordRange must be specified when coord index specified."),ae(!i||i!==!0||a.range,"range must be specified in global brush.")),a.range=a.range||[],i&&i!==!0){a.panelId=i.panelId;var n=oy[a.brushType](0,i.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?TA[a.brushType](n.values,o.offset,tZ(n.xyMinMax,o.xyMinMax)):n.values}},this)},r.prototype.makePanelOpts=function(t,e){return W(this._targetInfoList,function(a){var i=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:e?e(a):null,clipPath:y2(i),isTargetByCursor:b2(i,t,a.coordSysModel),getLinearBrushOtherExtent:_2(i)}})},r.prototype.controlSeries=function(t,e,a){var i=this.findTargetInfo(t,a);return i===!0||i&&me(i.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var a=this._targetInfoList,i=wA(e,t),n=0;n<a.length;n++){var o=a[n],s=t.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<xA.length;l++)if(xA[l](i,o))return o}return!0},r}();function ny(r){return r[0]>r[1]&&r.reverse(),r}function wA(r,t){return Cs(r,t,{includeMainTypes:JY})}var eZ={grid:function(r,t){var e=r.xAxisModels,a=r.yAxisModels,i=r.gridModels,n=Q(),o={},s={};!e&&!a&&!i||(M(e,function(l){var u=l.axis.grid.model;n.set(u.id,u),o[u.id]=!0}),M(a,function(l){var u=l.axis.grid.model;n.set(u.id,u),s[u.id]=!0}),M(i,function(l){n.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),n.each(function(l){var u=l.coordinateSystem,c=[];M(u.getCartesians(),function(h,f){(me(e,h.getAxis("x").model)>=0||me(a,h.getAxis("y").model)>=0)&&c.push(h)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:SA.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){M(r.geoModels,function(e){var a=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:a,coordSyses:[a],getPanelRect:SA.geo})})}},xA=[function(r,t){var e=r.xAxisModel,a=r.yAxisModel,i=r.gridModel;return!i&&e&&(i=e.axis.grid.model),!i&&a&&(i=a.axis.grid.model),i&&i===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],SA={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(rn(r)),t}},oy={lineX:fe(LA,0),lineY:fe(LA,1),rect:function(r,t,e,a){var i=r?t.pointToData([e[0][0],e[1][0]],a):t.dataToPoint([e[0][0],e[1][0]],a),n=r?t.pointToData([e[0][1],e[1][1]],a):t.dataToPoint([e[0][1],e[1][1]],a),o=[ny([i[0],n[0]]),ny([i[1],n[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,a){var i=[[1/0,-1/0],[1/0,-1/0]],n=W(e,function(o){var s=r?t.pointToData(o,a):t.dataToPoint(o,a);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:n,xyMinMax:i}}};function LA(r,t,e,a){process.env.NODE_ENV!=="production"&&ae(e.type==="cartesian2d","lineX/lineY brush is available only in cartesian2d.");var i=e.getAxis(["x","y"][r]),n=ny(W([0,1],function(s){return t?i.coordToData(i.toLocalCoord(a[s]),!0):i.toGlobalCoord(i.dataToCoord(a[s]))})),o=[];return o[r]=n,o[1-r]=[NaN,NaN],{values:n,xyMinMax:o}}var TA={lineX:fe(CA,0),lineY:fe(CA,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return W(r,function(a,i){return[a[0]-e[0]*t[i][0],a[1]-e[1]*t[i][1]]})}};function CA(r,t,e,a){return[t[0]-a[r]*e[0],t[1]-a[r]*e[1]]}function tZ(r,t){var e=DA(r),a=DA(t),i=[e[0]/a[0],e[1]/a[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function DA(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}const sy=QY;var ly=M,rZ=bN("toolbox-dataZoom_"),aZ=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,i,n){this._brushController||(this._brushController=new pm(i.getZr()),this._brushController.on("brush",j(this._onBrush,this)).mount()),oZ(e,a,this,n,i),nZ(e,a)},t.prototype.onclick=function(e,a,i){iZ[i].call(this)},t.prototype.remove=function(e,a){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,a){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var a=e.areas;if(!e.isEnd||!a.length)return;var i={},n=this.ecModel;this._brushController.updateCovers([]);var o=new sy(uy(this.model),n,{include:["grid"]});o.matchOutputRanges(a,n,function(u,c,h){if(h.type==="cartesian2d"){var f=u.brushType;f==="rect"?(s("x",h,c[0]),s("y",h,c[1])):s({lineX:"x",lineY:"y"}[f],h,c)}}),YY(n,i),this._dispatchZoomAction(i);function s(u,c,h){var f=c.getAxis(u),d=f.model,p=l(u,d,n),v=p.findRepresentativeAxisProxy(d).getMinMaxSpan();(v.minValueSpan!=null||v.maxValueSpan!=null)&&(h=Rn(0,h.slice(),f.scale.getExtent(),0,v.minValueSpan,v.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:h[0],endValue:h[1]})}function l(u,c,h){var f;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var p=d.getAxisModel(u,c.componentIndex);p&&(f=d)}),f}},t.prototype._dispatchZoomAction=function(e){var a=[];ly(e,function(i,n){a.push(ne(i))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},t.getDefaultOption=function(e){var a={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return a},t}(Tr),iZ={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(ZY(this.ecModel))}};function uy(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function nZ(r,t){r.setIconStatus("back",jY(t)>1?"emphasis":"normal")}function oZ(r,t,e,a,i){var n=e._isZoomActive;a&&a.type==="takeGlobalCursor"&&(n=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),e._isZoomActive=n,r.setIconStatus("zoom",n?"emphasis":"normal");var o=new sy(uy(r),t,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(n&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}eV("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var a=t.getModel(e),i=[],n=uy(a),o=Cs(r,n);ly(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),ly(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var h=l.componentIndex,f={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:rZ+u+h};f[c]=h,i.push(f)}return i});const sZ=aZ;function lZ(r){r.registerComponentModel(TY),r.registerComponentView(MY),qo("saveAsImage",IY),qo("magicType",NY),qo("dataView",UY),qo("dataZoom",sZ),qo("restore",KY),ye(SY)}var uZ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(Se);const cZ=uZ;function AA(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function MA(r){if(Le.domSupported){for(var t=document.documentElement.style,e=0,a=r.length;e<a;e++)if(r[e]in t)return r[e]}}var EA=MA(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),hZ=MA(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function IA(r,t){if(!r)return t;t=bb(t,!0);var e=r.indexOf(t);return r=e===-1?t:"-"+r.slice(0,e)+"-"+t,r.toLowerCase()}function fZ(r,t){var e=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return e?t?e[t]:e:null}var dZ=IA(hZ,"transition"),cy=IA(EA,"transform"),pZ="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Le.transform3dSupported?"will-change:transform;":"");function vZ(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function gZ(r,t,e){if(!X(e)||e==="inside")return"";var a=r.get("backgroundColor"),i=r.get("borderWidth");t=sn(t);var n=vZ(e),o=Math.max(Math.round(i)*1.5,6),s="",l=cy+":",u;me(["left","right"],n)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=n==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=n==="top"?225:45)+"deg)");var c=u*Math.PI/180,h=o+i,f=h*Math.abs(Math.cos(c))+h*Math.abs(Math.sin(c)),d=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-h)/2)*100)/100;s+=";"+n+":-"+d+"px";var p=t+" solid "+i+"px;",v=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+a+";"];return'<div style="'+v.join("")+'"></div>'}function mZ(r,t){var e="cubic-bezier(0.23,1,0.32,1)",a=" "+r/2+"s "+e,i="opacity"+a+",visibility"+a;return t||(a=" "+r+"s "+e,i+=Le.transformSupported?","+cy+a:",left"+a+",top"+a),dZ+":"+i}function PA(r,t,e){var a=r.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Le.transformSupported)return e?"top:"+i+";left:"+a+";":[["top",i],["left",a]];var n=Le.transform3dSupported,o="translate"+(n?"3d":"")+"("+a+","+i+(n?",0":"")+")";return e?"top:0;left:0;"+cy+":"+o+";":[["top",0],["left",0],[EA,o]]}function yZ(r){var t=[],e=r.get("fontSize"),a=r.getTextColor();a&&t.push("color:"+a),t.push("font:"+r.getFont());var i=le(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+i+"px");var n=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return n&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+n),M(["decoration","align"],function(u){var c=r.get(u);c&&t.push("text-"+u+":"+c)}),t.join(";")}function _Z(r,t,e){var a=[],i=r.get("transitionDuration"),n=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),c=r.getModel("textStyle"),h=Cw(r,"html"),f=l+"px "+u+"px "+o+"px "+s;return a.push("box-shadow:"+f),t&&i&&a.push(mZ(i,e)),n&&a.push("background-color:"+n),M(["width","color","radius"],function(d){var p="border-"+d,v=bb(p),g=r.get(v);g!=null&&a.push(p+":"+g+(d==="color"?"":"px"))}),a.push(yZ(c)),h!=null&&a.push("padding:"+go(h).join("px ")+"px"),a.join(";")+";"}function kA(r,t,e,a,i){var n=t&&t.painter;if(e){var o=n&&n.getViewportRoot();o&&GP(r,o,e,a,i)}else{r[0]=a,r[1]=i;var s=n&&n.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var bZ=function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Le.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var i=this._zr=t.getZr(),n=e.appendTo,o=n&&(X(n)?document.querySelector(n):Li(n)?n:te(n)&&n(t.getDom()));kA(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(a),this._api=t,this._container=o;var s=this;a.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},a.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();sr(c,l,!0),u.dispatch("mousemove",l)}},a.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),a=fZ(e,"position"),i=e.style;i.position!=="absolute"&&a!=="absolute"&&(i.position="relative")}var n=t.get("alwaysShowContent");n&&this._moveIfResized(),this._alwaysShowContent=n,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,i=a.style,n=this._styleCoord;a.innerHTML?i.cssText=pZ+_Z(t,!this._firstShow,this._longHide)+PA(n[0],n[1],!0)+("border-color:"+sn(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,a,i,n){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(X(n)&&a.get("trigger")==="item"&&!AA(a)&&(s=gZ(a,i,n)),X(t))o.innerHTML=t+s;else if(t){o.innerHTML="",G(t)||(t=[t]);for(var l=0;l<t.length;l++)Li(t[l])&&t[l].parentNode!==o&&o.appendChild(t[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},r.prototype.moveTo=function(t,e){if(this.el){var a=this._styleCoord;if(kA(a,this._zr,this._container,t,e),a[0]!=null&&a[1]!=null){var i=this.el.style,n=PA(a[0],a[1]);M(n,function(o){i[o[0]]=o[1]})}}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){var t=this,e=this.el.style;e.visibility="hidden",e.opacity="0",Le.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(j(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this.el.parentNode;t&&t.removeChild(this.el),this.el=this._container=null},r}();const wZ=bZ;var xZ=function(){function r(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),RA(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return r.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(t,e,a,i,n){var o=this;re(t)&&Pe(process.env.NODE_ENV!=="production"?"Passing DOM nodes as content is not supported in richText tooltip!":""),this.el&&this._zr.remove(this.el);var s=a.getModel("textStyle");this.el=new Ae({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:a.get(["textStyle","color"]),padding:Cw(a,"richText"),verticalAlign:"top",align:"left"},z:a.get("z")}),M(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=a.get(u)}),M(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),a=NA(t.style);return[e.width+a.left+a.right,e.height+a.top+a.bottom]},r.prototype.moveTo=function(t,e){var a=this.el;if(a){var i=this._styleCoord;RA(i,this._zr,t,e),t=i[0],e=i[1];var n=a.style,o=bi(n.borderWidth||0),s=NA(n);a.x=t+o+s.left,a.y=e+o+s.top,a.markRedraw()}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(j(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r}();function bi(r){return Math.max(0,r)}function NA(r){var t=bi(r.shadowBlur||0),e=bi(r.shadowOffsetX||0),a=bi(r.shadowOffsetY||0);return{left:bi(t-e),right:bi(t+e),top:bi(t-a),bottom:bi(t+a)}}function RA(r,t,e,a){r[0]=e,r[1]=a,r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}const SZ=xZ;var LZ=new Te({shape:{x:-1,y:-1,width:2,height:2}}),TZ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){if(!(Le.node||!a.getDom())){var i=e.getComponent("tooltip"),n=this._renderMode=DN(i.get("renderMode"));this._tooltipContent=n==="richText"?new SZ(a):new wZ(a,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},t.prototype.render=function(e,a,i){if(!(Le.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=a,this._api=i;var n=this._tooltipContent;n.update(e),n.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&e.get("transitionDuration")?Co(this,"_updatePosition",50,"fixRate"):Qs(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel,a=e.get("triggerOn");FD("itemTooltip",this._api,j(function(i,n,o){a!=="none"&&(a.indexOf(i)>=0?this._tryShow(n,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,a=this._ecModel,i=this._api,n=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&n!=="none"&&n!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(e,a,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,a,i,n){if(!(n.from===this.uid||Le.node||!i.getDom())){var o=VA(n,i);this._ticket="";var s=n.dataByCoordSys,l=MZ(n,a,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:n.position,positionDefault:"bottom"},o)}else if(n.tooltip&&n.x!=null&&n.y!=null){var c=LZ;c.x=n.x,c.y=n.y,c.update(),ue(c).tooltipConfig={name:null,option:n.tooltip},this._tryShow({offsetX:n.x,offsetY:n.y,target:c},o)}else if(s)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:s,tooltipOption:n.tooltipOption},o);else if(n.seriesIndex!=null){if(this._manuallyAxisShowTip(e,a,i,n))return;var h=WD(n,a),f=h.point[0],d=h.point[1];f!=null&&d!=null&&this._tryShow({offsetX:f,offsetY:d,target:h.el,position:n.position,positionDefault:"bottom"},o)}else n.x!=null&&n.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},o))}},t.prototype.manuallyHideTip=function(e,a,i,n){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,n.from!==this.uid&&this._hide(VA(n,i))},t.prototype._manuallyAxisShowTip=function(e,a,i,n){var o=n.seriesIndex,s=n.dataIndex,l=a.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=a.getSeriesByIndex(o);if(u){var c=u.getData(),h=Zl([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:n.position}),!0}}},t.prototype._tryShow=function(e,a){var i=e.target,n=this._tooltipModel;if(n){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(i){var s=ue(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;dn(i,function(c){if(ue(c).dataIndex!=null)return l=c,!0;if(ue(c).tooltipConfig!=null)return u=c,!0},!0),l?this._showSeriesItemTooltip(e,l,a):u?this._showComponentItemTooltip(e,u,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},t.prototype._showOrMove=function(e,a){var i=e.get("showDelay");a=j(a,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(a,i):a()},t.prototype._showAxisTooltip=function(e,a){var i=this._ecModel,n=this._tooltipModel,o=[a.offsetX,a.offsetY],s=Zl([a.tooltipOption],n),l=this._renderMode,u=[],c=dt("section",{blocks:[],noHeader:!0}),h=[],f=new Up;M(e,function(y){M(y.dataByAxis,function(_){var w=i.getComponent(_.axisDim+"Axis",_.axisIndex),x=_.value;if(!(!w||x==null)){var S=ND(x,w.axis,i,_.seriesDataIndices,_.valueLabelOpt),L=dt("section",{header:S,noHeader:!Dr(S),sortBlocks:!0,blocks:[]});c.blocks.push(L),M(_.seriesDataIndices,function(C){var T=i.getSeriesByIndex(C.seriesIndex),A=C.dataIndexInside,D=T.getDataParams(A);if(!(D.dataIndex<0)){D.axisDim=_.axisDim,D.axisIndex=_.axisIndex,D.axisType=_.axisType,D.axisId=_.axisId,D.axisValue=Av(w.axis,{value:x}),D.axisValueLabel=S,D.marker=f.makeTooltipMarker("item",sn(D.color),l);var E=ow(T.formatTooltip(A,!0,null)),I=E.frag;if(I){var P=Zl([T],n).get("valueFormatter");L.blocks.push(P?F({valueFormatter:P},I):I)}E.text&&h.push(E.text),u.push(D)}})}})}),c.blocks.reverse(),h.reverse();var d=a.position,p=s.get("order"),v=Sw(c,f,l,p,i.get("useUTC"),s.get("textStyle"));v&&h.unshift(v);var g=l==="richText"?`
266
+
267
+ `:"<br/>",m=h.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],d,null,f)})},t.prototype._showSeriesItemTooltip=function(e,a,i){var n=this._ecModel,o=ue(a),s=o.seriesIndex,l=n.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,h=o.dataType,f=u.getData(h),d=this._renderMode,p=e.positionDefault,v=Zl([f.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=v.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(c,h),y=new Up;m.marker=y.makeTooltipMarker("item",sn(m.color),d);var _=ow(u.formatTooltip(c,!1,h)),w=v.get("order"),x=v.get("valueFormatter"),S=_.frag,L=S?Sw(x?F({valueFormatter:x},S):S,y,d,w,n.get("useUTC"),v.get("textStyle")):_.text,C="item_"+u.name+"_"+c;this._showOrMove(v,function(){this._showTooltipContent(v,L,m,C,e.offsetX,e.offsetY,e.position,e.target,y)}),i({type:"showTip",dataIndexInside:c,dataIndex:f.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,a,i){var n=this._renderMode==="html",o=ue(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(X(l)){var c=l;l={content:c,formatter:c},u=!0}u&&n&&l.content&&(l=ne(l),l.content=At(l.content));var h=[l],f=this._ecModel.getComponent(o.componentMainType,o.componentIndex);f&&h.push(f),h.push({formatter:l.content});var d=e.positionDefault,p=Zl(h,this._tooltipModel,d?{position:d}:null),v=p.get("content"),g=Math.random()+"",m=new Up;this._showOrMove(p,function(){var y=ne(p.get("formatterParams")||{});this._showTooltipContent(p,v,y,g,e.offsetX,e.offsetY,e.position,a,m)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,a,i,n,o,s,l,u,c){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var h=this._tooltipContent;h.setEnterable(e.get("enterable"));var f=e.get("formatter");l=l||e.get("position");var d=a,p=this._getNearestPoint([o,s],i,e.get("trigger"),e.get("borderColor")),v=p.color;if(f)if(X(f)){var g=e.ecModel.get("useUTC"),m=G(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;d=f,y&&(d=gc(m.axisValue,d,g)),d=xb(d,i,!0)}else if(te(f)){var _=j(function(w,x){w===this._ticket&&(h.setContent(x,c,e,v,l),this._updatePosition(e,l,o,s,h,i,u))},this);this._ticket=n,d=f(i,n,_)}else d=f;h.setContent(d,c,e,v,l),h.show(e,v),this._updatePosition(e,l,o,s,h,i,u)}},t.prototype._getNearestPoint=function(e,a,i,n){if(i==="axis"||G(a))return{color:n||(this._renderMode==="html"?"#fff":"none")};if(!G(a))return{color:n||a.color||a.borderColor}},t.prototype._updatePosition=function(e,a,i,n,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();a=a||e.get("position");var h=o.getSize(),f=e.get("align"),d=e.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),te(a)&&(a=a([i,n],s,o.el,p,{viewSize:[u,c],contentSize:h.slice()})),G(a))i=Z(a[0],u),n=Z(a[1],c);else if(re(a)){var v=a;v.width=h[0],v.height=h[1];var g=ct(v,{width:u,height:c});i=g.x,n=g.y,f=null,d=null}else if(X(a)&&l){var m=AZ(a,p,h,e.get("borderWidth"));i=m[0],n=m[1]}else{var m=CZ(i,n,o,u,c,f?null:20,d?null:20);i=m[0],n=m[1]}if(f&&(i-=OA(f)?h[0]/2:f==="right"?h[0]:0),d&&(n-=OA(d)?h[1]/2:d==="bottom"?h[1]:0),AA(e)){var m=DZ(i,n,o,u,c);i=m[0],n=m[1]}o.moveTo(i,n)},t.prototype._updateContentNotChangedOnAxis=function(e,a){var i=this._lastDataByCoordSys,n=this._cbParamsList,o=!!i&&i.length===e.length;return o&&M(i,function(s,l){var u=s.dataByAxis||[],c=e[l]||{},h=c.dataByAxis||[];o=o&&u.length===h.length,o&&M(u,function(f,d){var p=h[d]||{},v=f.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&f.value===p.value&&f.axisType===p.axisType&&f.axisId===p.axisId&&v.length===g.length,o&&M(v,function(m,y){var _=g[y];o=o&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),n&&M(f.seriesDataIndices,function(m){var y=m.seriesIndex,_=a[y],w=n[y];_&&w&&w.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=a,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,a){Le.node||!a.getDom()||(Qs(this,"_updatePosition"),this._tooltipContent.dispose(),Um("itemTooltip",a))},t.type="tooltip",t}(Ke);function Zl(r,t,e){var a=t.ecModel,i;e?(i=new Ge(e,a,a),i=new Ge(t.option,i,a)):i=t;for(var n=r.length-1;n>=0;n--){var o=r[n];o&&(o instanceof Ge&&(o=o.get("tooltip",!0)),X(o)&&(o={formatter:o}),o&&(i=new Ge(o,i,a)))}return i}function VA(r,t){return r.dispatchAction||j(t.dispatchAction,t)}function CZ(r,t,e,a,i,n,o){var s=e.getSize(),l=s[0],u=s[1];return n!=null&&(r+l+n+2>a?r-=l+n:r+=n),o!=null&&(t+u+o>i?t-=u+o:t+=o),[r,t]}function DZ(r,t,e,a,i){var n=e.getSize(),o=n[0],s=n[1];return r=Math.min(r+o,a)-o,t=Math.min(t+s,i)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function AZ(r,t,e,a){var i=e[0],n=e[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=t.width,c=t.height;switch(r){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-n/2;break;case"top":s=t.x+u/2-i/2,l=t.y-n-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+o;break;case"left":s=t.x-i-o,l=t.y+c/2-n/2;break;case"right":s=t.x+u+o,l=t.y+c/2-n/2}return[s,l]}function OA(r){return r==="center"||r==="middle"}function MZ(r,t,e){var a=Sd(r).queryOptionMap,i=a.keys()[0];if(!(!i||i==="series")){var n=Ds(t,i,a.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=n.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=ue(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}const EZ=TZ;function IZ(r){ye(Ul),r.registerComponentModel(cZ),r.registerComponentView(EZ),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},et),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},et)}var PZ=["rect","polygon","keep","clear"];function kZ(r,t){var e=Ve(r?r.brush:[]);if(e.length){var a=[];M(e,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var i=r&&r.toolbox;G(i)&&(i=i[0]),i||(i={feature:{}},r.toolbox=[i]);var n=i.feature||(i.feature={}),o=n.brush||(n.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),NZ(s),t&&!s.length&&s.push.apply(s,PZ)}}function NZ(r){var t={};M(r,function(e){t[e]=1}),r.length=0,M(t,function(e,a){r.push(a)})}var zA=M;function BA(r){if(r){for(var t in r)if(r.hasOwnProperty(t))return!0}}function hy(r,t,e){var a={};return zA(t,function(n){var o=a[n]=i();zA(r[n],function(s,l){if(Lt.isValidType(l)){var u={type:l,visual:s};e&&e(u,n),o[l]=new Lt(u),l==="opacity"&&(u=ne(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Lt(u))}})}),a;function i(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function FA(r,t,e){var a;M(e,function(i){t.hasOwnProperty(i)&&BA(t[i])&&(a=!0)}),a&&M(e,function(i){t.hasOwnProperty(i)&&BA(t[i])?r[i]=ne(t[i]):delete r[i]})}function RZ(r,t,e,a,i,n){var o={};M(r,function(h){var f=Lt.prepareVisualTypes(t[h]);o[h]=f});var s;function l(h){return Kp(e,s,h)}function u(h,f){Xw(e,s,h,f)}n==null?e.each(c):e.each([n],c);function c(h,f){s=n==null?h:f;var d=e.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var p=a.call(i,h),v=t[p],g=o[p],m=0,y=g.length;m<y;m++){var _=g[m];v[_]&&v[_].applyVisual(h,l,u)}}}function VZ(r,t,e,a){var i={};return M(r,function(n){var o=Lt.prepareVisualTypes(t[n]);i[n]=o}),{progress:function(o,s){var l;a!=null&&(l=s.getDimensionIndex(a));function u(x){return Kp(s,h,x)}function c(x,S){Xw(s,h,x,S)}for(var h,f=s.getStore();(h=o.next())!=null;){var d=s.getRawDataItem(h);if(!(d&&d.visualMap===!1))for(var p=a!=null?f.get(l,h):h,v=e(p),g=t[v],m=i[v],y=0,_=m.length;y<_;y++){var w=m[y];g[w]&&g[w].applyVisual(p,u,c)}}}}}function OZ(r){var t=r.brushType,e={point:function(a){return GA[t].point(a,e,r)},rect:function(a){return GA[t].rect(a,e,r)}};return e}var GA={lineX:WA(0),lineY:WA(1),rect:{point:function(r,t,e){return r&&e.boundingRect.contain(r[0],r[1])},rect:function(r,t,e){return r&&e.boundingRect.intersect(r)}},polygon:{point:function(r,t,e){return r&&e.boundingRect.contain(r[0],r[1])&&_n(e.range,r[0],r[1])},rect:function(r,t,e){var a=e.range;if(!r||a.length<=1)return!1;var i=r.x,n=r.y,o=r.width,s=r.height,l=a[0];if(_n(a,i,n)||_n(a,i+o,n)||_n(a,i,n+s)||_n(a,i+o,n+s)||ge.create(r).contain(l[0],l[1])||Ws(i,n,i+o,n,a)||Ws(i,n,i,n+s,a)||Ws(i+o,n,i+o,n+s,a)||Ws(i,n+s,i+o,n+s,a))return!0}}};function WA(r){var t=["x","y"],e=["width","height"];return{point:function(a,i,n){if(a){var o=n.range,s=a[r];return Xl(s,o)}},rect:function(a,i,n){if(a){var o=n.range,s=[a[t[r]],a[t[r]]+a[e[r]]];return s[1]<s[0]&&s.reverse(),Xl(s[0],o)||Xl(s[1],o)||Xl(o[0],s)||Xl(o[1],s)}}}}function Xl(r,t){return t[0]<=r&&r<=t[1]}var HA=["inBrush","outOfBrush"],fy="__ecBrushSelect",dy="__ecInBrushSelectEvent";function $A(r){r.eachComponent({mainType:"brush"},function(t){var e=t.brushTargetManager=new sy(t.option,r);e.setInputRanges(t.areas,r)})}function zZ(r,t,e){var a=[],i,n;r.eachComponent({mainType:"brush"},function(o){e&&e.type==="takeGlobalCursor"&&o.setBrushOption(e.key==="brush"?e.brushOption:{brushType:!1})}),$A(r),r.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:ne(o.areas),selected:[]};a.push(l);var u=o.option,c=u.brushLink,h=[],f=[],d=[],p=!1;s||(i=u.throttleType,n=u.throttleDelay);var v=W(o.areas,function(x){var S=WZ[x.brushType],L=ie({boundingRect:S?S(x):void 0},x);return L.selectors=OZ(L),L}),g=hy(o.option,HA,function(x){x.mappingMethod="fixed"});G(c)&&M(c,function(x){h[x]=1});function m(x){return c==="all"||!!h[x]}function y(x){return!!x.length}r.eachSeries(function(x,S){var L=d[S]=[];x.subType==="parallel"?_(x,S):w(x,S,L)});function _(x,S){var L=x.coordinateSystem;p=p||L.hasAxisBrushed(),m(S)&&L.eachActiveState(x.getData(),function(C,T){C==="active"&&(f[T]=1)})}function w(x,S,L){if(!(!x.brushSelector||GZ(o,S))&&(M(v,function(T){o.brushTargetManager.controlSeries(T,x,r)&&L.push(T),p=p||y(L)}),m(S)&&y(L))){var C=x.getData();C.each(function(T){UA(x,L,C,T)&&(f[T]=1)})}}r.eachSeries(function(x,S){var L={seriesId:x.id,seriesIndex:S,seriesName:x.name,dataIndex:[]};l.selected.push(L);var C=d[S],T=x.getData(),A=m(S)?function(D){return f[D]?(L.dataIndex.push(T.getRawIndex(D)),"inBrush"):"outOfBrush"}:function(D){return UA(x,C,T,D)?(L.dataIndex.push(T.getRawIndex(D)),"inBrush"):"outOfBrush"};(m(S)?p:y(C))&&RZ(HA,g,T,A)})}),BZ(t,i,n,a,e)}function BZ(r,t,e,a,i){if(i){var n=r.getZr();if(!n[dy]){n[fy]||(n[fy]=FZ);var o=Co(n,fy,e,t);o(r,a)}}}function FZ(r,t){if(!r.isDisposed()){var e=r.getZr();e[dy]=!0,r.dispatchAction({type:"brushSelect",batch:t}),e[dy]=!1}}function UA(r,t,e,a){for(var i=0,n=t.length;i<n;i++){var o=t[i];if(r.brushSelector(a,e,o.selectors,o))return!0}}function GZ(r,t){var e=r.option.seriesIndex;return e!=null&&e!=="all"&&(G(e)?me(e,t)<0:t!==e)}var WZ={rect:function(r){return YA(r.range)},polygon:function(r){for(var t,e=r.range,a=0,i=e.length;a<i;a++){t=t||[[1/0,-1/0],[1/0,-1/0]];var n=e[a];n[0]<t[0][0]&&(t[0][0]=n[0]),n[0]>t[0][1]&&(t[0][1]=n[0]),n[1]<t[1][0]&&(t[1][0]=n[1]),n[1]>t[1][1]&&(t[1][1]=n[1])}return t&&YA(t)}};function YA(r){return new ge(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var HZ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){this.ecModel=e,this.api=a,this.model,(this._brushController=new pm(a.getZr())).on("brush",j(this._onBrush,this)).mount()},t.prototype.render=function(e,a,i,n){this.model=e,this._updateController(e,a,i,n)},t.prototype.updateTransform=function(e,a,i,n){$A(a),this._updateController(e,a,i,n)},t.prototype.updateVisual=function(e,a,i,n){this.updateTransform(e,a,i,n)},t.prototype.updateView=function(e,a,i,n){this._updateController(e,a,i,n)},t.prototype._updateController=function(e,a,i,n){(!n||n.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(i)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var a=this.model.id,i=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:ne(i),$from:a}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:ne(i),$from:a})},t.type="brush",t}(Ke);const $Z=HZ;var UZ="#ddd",YZ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.areas=[],e.brushOption={},e}return t.prototype.optionUpdated=function(e,a){var i=this.option;!a&&FA(i,e,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:UZ},n.hasOwnProperty("liftZ")||(n.liftZ=5)},t.prototype.setAreas=function(e){process.env.NODE_ENV!=="production"&&(ae(G(e)),M(e,function(a){ae(a.brushType,"Illegal areas")})),e&&(this.areas=W(e,function(a){return ZA(this.option,a)},this))},t.prototype.setBrushOption=function(e){this.brushOption=ZA(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(Se);function ZA(r,t){return de({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Ge(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},t,!0)}const ZZ=YZ;var XZ=["rect","polygon","lineX","lineY","keep","clear"],jZ=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,i){var n,o,s;a.eachComponent({mainType:"brush"},function(l){n=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=n,this._brushMode=o,M(e.get("type",!0),function(l){e.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===n)?"emphasis":"normal")})},t.prototype.updateView=function(e,a,i){this.render(e,a,i)},t.prototype.getIcons=function(){var e=this.model,a=e.get("icon",!0),i={};return M(e.get("type",!0),function(n){a[n]&&(i[n]=a[n])}),i},t.prototype.onclick=function(e,a,i){var n=this._brushType,o=this._brushMode;i==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?n:n===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(e){var a={show:!0,type:XZ.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])};return a},t}(Tr);const qZ=jZ;function KZ(r){r.registerComponentView($Z),r.registerComponentModel(ZZ),r.registerPreprocessor(kZ),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,zZ),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(a){a.setAreas(t.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},et),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},et),qo("brush",qZ)}var JZ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(Se),QZ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){if(this.group.removeAll(),!!e.get("show")){var n=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=le(e.get("textBaseline"),e.get("textVerticalAlign")),c=new Ae({style:Fe(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=c.getBoundingRect(),f=e.get("subtext"),d=new Ae({style:Fe(s,{text:f,fill:s.getTextColor(),y:h.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=e.get("link"),v=e.get("sublink"),g=e.get("triggerEvent",!0);c.silent=!p&&!g,d.silent=!v&&!g,p&&c.on("click",function(){wc(p,"_"+e.get("target"))}),v&&d.on("click",function(){wc(v,"_"+e.get("subtarget"))}),ue(c).eventData=ue(d).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,n.add(c),f&&n.add(d);var m=n.getBoundingRect(),y=e.getBoxLayoutParams();y.width=m.width,y.height=m.height;var _=ct(y,{width:i.getWidth(),height:i.getHeight()},e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),n.x=_.x,n.y=_.y,n.markRedraw();var w={align:l,verticalAlign:u};c.setStyle(w),d.setStyle(w),m=n.getBoundingRect();var x=_.margin,S=e.getItemStyle(["color","opacity"]);S.fill=e.get("backgroundColor");var L=new Te({shape:{x:m.x-x[3],y:m.y-x[0],width:m.width+x[1]+x[3],height:m.height+x[0]+x[2],r:e.get("borderRadius")},style:S,subPixelOptimize:!0,silent:!0});n.add(L)}},t.type="title",t}(Ke);function eX(r){r.registerComponentModel(JZ),r.registerComponentView(QZ)}var tX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode="box",e}return t.prototype.init=function(e,a,i){this.mergeDefaultAndTheme(e,i),this._initData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){e==null&&(e=this.option.currentIndex);var a=this._data.count();this.option.loop?e=(e%a+a)%a:(e>=a&&(e=a-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e=this.option,a=e.data||[],i=e.axisType,n=this._names=[],o;i==="category"?(o=[],M(a,function(u,c){var h=ut(eo(u),""),f;re(u)?(f=ne(u),f.value=c):f=c,o.push(f),n.push(h)})):o=a;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Ft([{name:"value",type:s}],this);l.initData(o,n)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},t}(Se);const XA=tX;var jA=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline.slider",t.defaultOption=ri(XA.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),t}(XA);at(jA,Dc.prototype);const rX=jA;var aX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline",t}(Ke);const iX=aX;var nX=function(r){z(t,r);function t(e,a,i,n){var o=r.call(this,e,a,i)||this;return o.type=n||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t}(zr);const oX=nX;var py=Math.PI,qA=xe(),sX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){this.api=a},t.prototype.render=function(e,a,i){if(this.model=e,this.api=i,this.ecModel=a,this.group.removeAll(),e.get("show",!0)){var n=this._layout(e,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(n,e);e.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return dt("nameValue",{noName:!0,value:c})},M(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](n,o,l,e)},this),this._renderAxisLabel(n,s,l,e),this._position(n,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,a){var i=e.get(["label","position"]),n=e.get("orient"),o=uX(e,a),s;i==null||i==="auto"?s=n==="horizontal"?o.y+o.height/2<a.getHeight()/2?"-":"+":o.x+o.width/2<a.getWidth()/2?"+":"-":X(i)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][i]:s=i;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:py/2},h=n==="vertical"?o.height:o.width,f=e.getModel("controlStyle"),d=f.get("show",!0),p=d?f.get("itemSize"):0,v=d?f.get("itemGap"):0,g=p+v,m=e.get(["label","rotate"])||0;m=m*py/180;var y,_,w,x=f.get("position",!0),S=d&&f.get("showPlayBtn",!0),L=d&&f.get("showPrevBtn",!0),C=d&&f.get("showNextBtn",!0),T=0,A=h;x==="left"||x==="bottom"?(S&&(y=[0,0],T+=g),L&&(_=[T,0],T+=g),C&&(w=[A-p,0],A-=g)):(S&&(y=[A-p,0],A-=g),L&&(_=[0,0],T+=g),C&&(w=[A-p,0],A-=g));var D=[T,A];return e.get("inverse")&&D.reverse(),{viewRect:o,mainLength:h,orient:n,rotation:c[n],labelRotation:m,labelPosOpt:s,labelAlign:e.get(["label","align"])||l[n],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||u[n],playPosition:y,prevBtnPosition:_,nextBtnPosition:w,axisExtent:D,controlSize:p,controlGap:v}},t.prototype._position=function(e,a){var i=this._mainGroup,n=this._labelGroup,o=e.viewRect;if(e.orient==="vertical"){var s=Jt(),l=o.x,u=o.y+o.height;Hr(s,s,[-l,-u]),Mi(s,s,-py/2),Hr(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=y(o),h=y(i.getBoundingRect()),f=y(n.getBoundingRect()),d=[i.x,i.y],p=[n.x,n.y];p[0]=d[0]=c[0][0];var v=e.labelPosOpt;if(v==null||X(v)){var g=v==="+"?0:1;_(d,h,c,1,g),_(p,f,c,1,1-g)}else{var g=v>=0?0:1;_(d,h,c,1,g),p[1]=d[1]+v}i.setPosition(d),n.setPosition(p),i.rotation=n.rotation=e.rotation,m(i),m(n);function m(w){w.originX=c[0][0]-w.x,w.originY=c[1][0]-w.y}function y(w){return[[w.x,w.x+w.width],[w.y,w.y+w.height]]}function _(w,x,S,L,C){w[L]+=S[L][C]-x[L][C]}},t.prototype._createAxis=function(e,a){var i=a.getData(),n=a.get("axisType"),o=lX(a,n);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new oX("value",o,e.axisExtent,n);return l.model=a,l},t.prototype._createGroup=function(e){var a=this[e]=new oe;return this.group.add(a),a},t.prototype._renderAxisLine=function(e,a,i,n){var o=i.getExtent();if(n.get(["lineStyle","show"])){var s=new mt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:F({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(s);var l=this._progressLine=new mt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:ie({lineCap:"round",lineWidth:s.style.lineWidth},n.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(l)}},t.prototype._renderAxisTick=function(e,a,i,n){var o=this,s=n.getData(),l=i.scale.getTicks();this._tickSymbols=[],M(l,function(u){var c=i.dataToCoord(u.value),h=s.getItemModel(u.value),f=h.getModel("itemStyle"),d=h.getModel(["emphasis","itemStyle"]),p=h.getModel(["progress","itemStyle"]),v={x:c,y:0,onclick:j(o._changeTimeline,o,u.value)},g=KA(h,f,a,v);g.ensureState("emphasis").style=d.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),Ki(g);var m=ue(g);h.get("tooltip")?(m.dataIndex=u.value,m.dataModel=n):m.dataIndex=m.dataModel=null,o._tickSymbols.push(g)})},t.prototype._renderAxisLabel=function(e,a,i,n){var o=this,s=i.getLabelModel();if(s.get("show")){var l=n.getData(),u=i.getViewLabels();this._tickLabels=[],M(u,function(c){var h=c.tickValue,f=l.getItemModel(h),d=f.getModel("label"),p=f.getModel(["emphasis","label"]),v=f.getModel(["progress","label"]),g=i.dataToCoord(c.tickValue),m=new Ae({x:g,y:0,rotation:e.labelRotation-e.rotation,onclick:j(o._changeTimeline,o,h),silent:!1,style:Fe(d,{text:c.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});m.ensureState("emphasis").style=Fe(p),m.ensureState("progress").style=Fe(v),a.add(m),Ki(m),qA(m).dataIndex=h,o._tickLabels.push(m)})}},t.prototype._renderControl=function(e,a,i,n){var o=e.controlSize,s=e.rotation,l=n.getModel("controlStyle").getItemStyle(),u=n.getModel(["emphasis","controlStyle"]).getItemStyle(),c=n.getPlayState(),h=n.get("inverse",!0);f(e.nextBtnPosition,"next",j(this._changeTimeline,this,h?"-":"+")),f(e.prevBtnPosition,"prev",j(this._changeTimeline,this,h?"+":"-")),f(e.playPosition,c?"stop":"play",j(this._handlePlayClick,this,!c),!0);function f(d,p,v,g){if(d){var m=Er(le(n.get(["controlStyle",p+"BtnSize"]),o),o),y=[0,-m/2,m,m],_=cX(n,p+"Icon",y,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:v});_.ensureState("emphasis").style=u,a.add(_),Ki(_)}}},t.prototype._renderCurrentPointer=function(e,a,i,n){var o=n.getData(),s=n.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(h){h.draggable=!0,h.drift=j(u._handlePointerDrag,u),h.ondragend=j(u._handlePointerDragend,u),JA(h,u._progressLine,s,i,n,!0)},onUpdate:function(h){JA(h,u._progressLine,s,i,n)}};this._currentPointer=KA(l,l,this._mainGroup,{},this._currentPointer,c)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,a,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,a){var i=this._toAxisCoord(e)[0],n=this._axis,o=cr(n.getExtent().slice());i>o[1]&&(i=o[1]),i<o[0]&&(i=o[0]),this._currentPointer.x=i,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=i,s.dirty());var l=this._findNearestTick(i),u=this.model;(a||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},t.prototype._doPlayStop=function(){var e=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var a=e.model;e._changeTimeline(a.getCurrentIndex()+(a.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},t.prototype._toAxisCoord=function(e){var a=this._mainGroup.getLocalTransform();return Rr(e,a,!0)},t.prototype._findNearestTick=function(e){var a=this.model.getData(),i=1/0,n,o=this._axis;return a.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-e);c<i&&(i=c,n=l)}),n},t.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},t.prototype._changeTimeline=function(e){var a=this.model.getCurrentIndex();e==="+"?e=a+1:e==="-"&&(e=a-1),this.api.dispatchAction({type:"timelineChange",currentIndex:e,from:this.uid})},t.prototype._updateTicksStatus=function(){var e=this.model.getCurrentIndex(),a=this._tickSymbols,i=this._tickLabels;if(a)for(var n=0;n<a.length;n++)a&&a[n]&&a[n].toggleState("progress",n<e);if(i)for(var n=0;n<i.length;n++)i&&i[n]&&i[n].toggleState("progress",qA(i[n]).dataIndex<=e)},t.type="timeline.slider",t}(iX);function lX(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new Sv({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new cS({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new ci}}function uX(r,t){return ct(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},r.get("padding"))}function cX(r,t,e,a){var i=a.style,n=Gs(r.get(["controlStyle",t]),a||{},new ge(e[0],e[1],e[2],e[3]));return i&&n.setStyle(i),n}function KA(r,t,e,a,i,n){var o=t.get("color");if(i)i.setColor(o),e.add(i),n&&n.onUpdate(i);else{var s=r.get("symbol");i=lt(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),e.add(i),n&&n.onCreate(i)}var l=t.getItemStyle(["color"]);i.setStyle(l),a=de({rectHover:!0,z2:100},a,!0);var u=Ao(r.get("symbolSize"));a.scaleX=u[0]/2,a.scaleY=u[1]/2;var c=pn(r.get("symbolOffset"),u);c&&(a.x=(a.x||0)+c[0],a.y=(a.y||0)+c[1]);var h=r.get("symbolRotate");return a.rotation=(h||0)*Math.PI/180||0,i.attr(a),i.updateTransform(),i}function JA(r,t,e,a,i,n){if(!r.dragging){var o=i.getModel("checkpointStyle"),s=a.dataToCoord(i.getData().get("value",e));if(n||!o.get("animation",!0))r.attr({x:s,y:0}),t&&t.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};r.stopAnimation(null,!0),r.animateTo({x:s,y:0},l),t&&t.animateTo({shape:{x2:s}},l)}}}const hX=sX;function fX(r){r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e,a){var i=e.getComponent("timeline");return i&&t.currentIndex!=null&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),a.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),e.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),ie({currentIndex:i.option.currentIndex},t)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var a=e.getComponent("timeline");a&&t.playState!=null&&a.setPlayState(t.playState)})}function dX(r){var t=r&&r.timeline;G(t)||(t=t?[t]:[]),M(t,function(e){e&&pX(e)})}function pX(r){var t=r.type,e={number:"value",time:"time"};if(e[t]&&(r.axisType=e[t],delete r.type),QA(r),Fn(r,"controlPosition")){var a=r.controlStyle||(r.controlStyle={});Fn(a,"position")||(a.position=r.controlPosition),a.position==="none"&&!Fn(a,"show")&&(a.show=!1,delete a.position),delete r.controlPosition}M(r.data||[],function(i){re(i)&&!G(i)&&(!Fn(i,"value")&&Fn(i,"name")&&(i.value=i.name),QA(i))})}function QA(r){var t=r.itemStyle||(r.itemStyle={}),e=t.emphasis||(t.emphasis={}),a=r.label||r.label||{},i=a.normal||(a.normal={}),n={normal:1,emphasis:1};M(a,function(o,s){!n[s]&&!Fn(i,s)&&(i[s]=o)}),e.label&&!Fn(a,"emphasis")&&(a.emphasis=e.label,delete e.label)}function Fn(r,t){return r.hasOwnProperty(t)}function vX(r){r.registerComponentModel(rX),r.registerComponentView(hX),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),fX(r),r.registerPreprocessor(dX)}function vy(r,t){if(!r)return!1;for(var e=G(r)?r:[r],a=0;a<e.length;a++)if(e[a]&&e[a][t])return!0;return!1}function Jh(r){Oi(r,"label",["show"])}var Qh=xe(),eM=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.createdBySelf=!1,e}return t.prototype.init=function(e,a,i){if(process.env.NODE_ENV!=="production"&&this.type==="marker")throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(e,i),this._mergeOption(e,i,!1,!0)},t.prototype.isAnimationEnabled=function(){if(Le.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,a){this._mergeOption(e,a,!1,!1)},t.prototype._mergeOption=function(e,a,i,n){var o=this.mainType;i||a.eachSeries(function(s){var l=s.get(this.mainType,!0),u=Qh(s)[o];if(!l||!l.data){Qh(s)[o]=null;return}u?u._mergeOption(l,a,!0):(n&&Jh(l),M(l.data,function(c){c instanceof Array?(Jh(c[0]),Jh(c[1])):Jh(c)}),u=this.createMarkerModelFromSeries(l,this,a),F(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),Qh(s)[o]=u},this)},t.prototype.formatTooltip=function(e,a,i){var n=this.getData(),o=this.getRawValue(e),s=n.getName(e);return dt("section",{header:this.name,blocks:[dt("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,a){var i=Dc.prototype.getDataParams.call(this,e,a),n=this.__hostSeries;return n&&(i.seriesId=n.id,i.seriesName=n.name,i.seriesType=n.subType),i},t.getMarkerModelFromSeries=function(e,a){return Qh(e)[a]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(Se);at(eM,Dc.prototype);const wi=eM;var gX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,i){return new t(e,a,i)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(wi);const mX=gX;function gy(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function yX(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function ef(r,t,e,a,i,n){var o=[],s=ui(t,a),l=s?t.getCalculationInfo("stackResultDimension"):a,u=yy(t,l,r),c=t.indicesOfNearest(l,u)[0];o[i]=t.get(e,c),o[n]=t.get(l,c);var h=t.get(a,c),f=Yr(t.get(a,c));return f=Math.min(f,20),f>=0&&(o[n]=+o[n].toFixed(f)),[o,h]}var my={min:fe(ef,"min"),max:fe(ef,"max"),average:fe(ef,"average"),median:fe(ef,"median")};function jl(r,t){if(t){var e=r.getData(),a=r.coordinateSystem,i=a&&a.dimensions;if(!yX(t)&&!G(t.coord)&&G(i)){var n=tM(t,e,a,r);if(t=ne(t),t.type&&my[t.type]&&n.baseAxis&&n.valueAxis){var o=me(i,n.baseAxis.dim),s=me(i,n.valueAxis.dim),l=my[t.type](e,n.baseDataDim,n.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!G(i))t.coord=[];else for(var u=t.coord,c=0;c<2;c++)my[u[c]]&&(u[c]=yy(e,e.mapDimension(i[c]),u[c]));return t}}function tM(r,t,e,a){var i={};return r.valueIndex!=null||r.valueDim!=null?(i.valueDataDim=r.valueIndex!=null?t.getDimension(r.valueIndex):r.valueDim,i.valueAxis=e.getAxis(_X(a,i.valueDataDim)),i.baseAxis=e.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=a.getBaseAxis(),i.valueAxis=e.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function _X(r,t){var e=r.getData().getDimensionInfo(t);return e&&e.coordDim}function ql(r,t){return r&&r.containData&&t.coord&&!gy(t)?r.containData(t.coord):!0}function bX(r,t,e){return r&&r.containZone&&t.coord&&e.coord&&!gy(t)&&!gy(e)?r.containZone(t.coord,e.coord):!0}function rM(r,t){return r?function(e,a,i,n){var o=n<2?e.coord&&e.coord[n]:e.value;return ni(o,t[n])}:function(e,a,i,n){return ni(e.value,t[n])}}function yy(r,t,e){if(e==="average"){var a=0,i=0;return r.each(t,function(n,o){isNaN(n)||(a+=n,i++)}),a/i}else return e==="median"?r.getMedian(t):r.getDataExtent(t)[e==="max"?1:0]}var _y=xe(),wX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=Q()},t.prototype.render=function(e,a,i){var n=this,o=this.markerGroupMap;o.each(function(s){_y(s).keep=!1}),a.eachSeries(function(s){var l=wi.getMarkerModelFromSeries(s,n.type);l&&n.renderSeries(s,l,a,i)}),o.each(function(s){!_y(s).keep&&n.group.remove(s.group)})},t.prototype.markKeep=function(e){_y(e).keep=!0},t.prototype.toggleBlurSeries=function(e,a){var i=this;M(e,function(n){var o=wi.getMarkerModelFromSeries(n,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?c_(l):Xd(l))})}})},t.type="marker",t}(Ke);const by=wX;function aM(r,t,e){var a=t.coordinateSystem;r.each(function(i){var n=r.getItemModel(i),o,s=Z(n.get("x"),e.getWidth()),l=Z(n.get("y"),e.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(t.getMarkerPosition)o=t.getMarkerPosition(r.getValues(r.dimensions,i));else if(a){var u=r.get(a.dimensions[0],i),c=r.get(a.dimensions[1],i);o=a.dataToPoint([u,c])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(i,o)})}var xX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,i){a.eachSeries(function(n){var o=wi.getMarkerModelFromSeries(n,"markPoint");o&&(aM(o.getData(),n,i),this.markerGroupMap.get(n.id).updateLayout())},this)},t.prototype.renderSeries=function(e,a,i,n){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new xl),h=SX(o,e,a);a.setData(h),aM(a.getData(),e,n),h.each(function(f){var d=h.getItemModel(f),p=d.getShallow("symbol"),v=d.getShallow("symbolSize"),g=d.getShallow("symbolRotate"),m=d.getShallow("symbolOffset"),y=d.getShallow("symbolKeepAspect");if(te(p)||te(v)||te(g)||te(m)){var _=a.getRawValue(f),w=a.getDataParams(f);te(p)&&(p=p(_,w)),te(v)&&(v=v(_,w)),te(g)&&(g=g(_,w)),te(m)&&(m=m(_,w))}var x=d.getModel("itemStyle").getItemStyle(),S=rl(l,"color");x.fill||(x.fill=S),h.setItemVisual(f,{symbol:p,symbolSize:v,symbolRotate:g,symbolOffset:m,symbolKeepAspect:y,style:x})}),c.updateData(h),this.group.add(c.group),h.eachItemGraphicEl(function(f){f.traverse(function(d){ue(d).dataModel=a})}),this.markKeep(c),c.group.silent=a.get("silent")||e.get("silent")},t.type="markPoint",t}(by);function SX(r,t,e){var a;r?a=W(r&&r.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return F(F({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var i=new Ft(a,e),n=W(e.get("data"),fe(jl,t));r&&(n=Ie(n,fe(ql,r)));var o=rM(!!r,a);return i.initData(n,null,o),i}const LX=xX;function TX(r){r.registerComponentModel(mX),r.registerComponentView(LX),r.registerPreprocessor(function(t){vy(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var CX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,i){return new t(e,a,i)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(wi);const DX=CX;var tf=xe(),AX=function(r,t,e,a){var i=r.getData(),n;if(G(a))n=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=t.getAxis(a.yAxis!=null?"y":"x"),l=it(a.yAxis,a.xAxis);else{var u=tM(a,i,t,r);s=u.valueAxis;var c=Xx(i,u.valueDataDim);l=yy(i,c,o)}var h=s.dim==="x"?0:1,f=1-h,d=ne(a),p={coord:[]};d.type=null,d.coord=[],d.coord[f]=-1/0,p.coord[f]=1/0;var v=e.get("precision");v>=0&&De(l)&&(l=+l.toFixed(Math.min(v,20))),d.coord[h]=p.coord[h]=l,n=[d,p,{type:o,valueIndex:a.valueIndex,value:l}]}else process.env.NODE_ENV!=="production"&&Cr("Invalid markLine data."),n=[]}var g=[jl(r,n[0]),jl(r,n[1]),F({},n[2])];return g[2].type=g[2].type||null,de(g[2],g[0]),de(g[2],g[1]),g};function rf(r){return!isNaN(r)&&!isFinite(r)}function iM(r,t,e,a){var i=1-r,n=a.dimensions[r];return rf(t[i])&&rf(e[i])&&t[r]===e[r]&&a.getAxis(n).containData(t[r])}function MX(r,t){if(r.type==="cartesian2d"){var e=t[0].coord,a=t[1].coord;if(e&&a&&(iM(1,e,a,r)||iM(0,e,a,r)))return!0}return ql(r,t[0])&&ql(r,t[1])}function wy(r,t,e,a,i){var n=a.coordinateSystem,o=r.getItemModel(t),s,l=Z(o.get("x"),i.getWidth()),u=Z(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,t));else{var c=n.dimensions,h=r.get(c[0],t),f=r.get(c[1],t);s=n.dataToPoint([h,f])}if(Cn(n,"cartesian2d")){var d=n.getAxis("x"),p=n.getAxis("y"),c=n.dimensions;rf(r.get(c[0],t))?s[0]=d.toGlobalCoord(d.getExtent()[e?0:1]):rf(r.get(c[1],t))&&(s[1]=p.toGlobalCoord(p.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(t,s)}var EX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,i){a.eachSeries(function(n){var o=wi.getMarkerModelFromSeries(n,"markLine");if(o){var s=o.getData(),l=tf(o).from,u=tf(o).to;l.each(function(c){wy(l,c,!0,n,i),wy(u,c,!1,n,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(n.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,a,i,n){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Xg);this.group.add(c.group);var h=IX(o,e,a),f=h.from,d=h.to,p=h.line;tf(a).from=f,tf(a).to=d,a.setData(p);var v=a.get("symbol"),g=a.get("symbolSize"),m=a.get("symbolRotate"),y=a.get("symbolOffset");G(v)||(v=[v,v]),G(g)||(g=[g,g]),G(m)||(m=[m,m]),G(y)||(y=[y,y]),h.from.each(function(w){_(f,w,!0),_(d,w,!1)}),p.each(function(w){var x=p.getItemModel(w).getModel("lineStyle").getLineStyle();p.setItemLayout(w,[f.getItemLayout(w),d.getItemLayout(w)]),x.stroke==null&&(x.stroke=f.getItemVisual(w,"style").fill),p.setItemVisual(w,{fromSymbolKeepAspect:f.getItemVisual(w,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(w,"symbolOffset"),fromSymbolRotate:f.getItemVisual(w,"symbolRotate"),fromSymbolSize:f.getItemVisual(w,"symbolSize"),fromSymbol:f.getItemVisual(w,"symbol"),toSymbolKeepAspect:d.getItemVisual(w,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(w,"symbolOffset"),toSymbolRotate:d.getItemVisual(w,"symbolRotate"),toSymbolSize:d.getItemVisual(w,"symbolSize"),toSymbol:d.getItemVisual(w,"symbol"),style:x})}),c.updateData(p),h.line.eachItemGraphicEl(function(w){ue(w).dataModel=a,w.traverse(function(x){ue(x).dataModel=a})});function _(w,x,S){var L=w.getItemModel(x);wy(w,x,S,e,n);var C=L.getModel("itemStyle").getItemStyle();C.fill==null&&(C.fill=rl(l,"color")),w.setItemVisual(x,{symbolKeepAspect:L.get("symbolKeepAspect"),symbolOffset:le(L.get("symbolOffset",!0),y[S?0:1]),symbolRotate:le(L.get("symbolRotate",!0),m[S?0:1]),symbolSize:le(L.get("symbolSize"),g[S?0:1]),symbol:le(L.get("symbol",!0),v[S?0:1]),style:C})}this.markKeep(c),c.group.silent=a.get("silent")||e.get("silent")},t.type="markLine",t}(by);function IX(r,t,e){var a;r?a=W(r&&r.dimensions,function(u){var c=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return F(F({},c),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var i=new Ft(a,e),n=new Ft(a,e),o=new Ft([],e),s=W(e.get("data"),fe(AX,t,r,e));r&&(s=Ie(s,fe(MX,r)));var l=rM(!!r,a);return i.initData(W(s,function(u){return u[0]}),null,l),n.initData(W(s,function(u){return u[1]}),null,l),o.initData(W(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:n,line:o}}const PX=EX;function kX(r){r.registerComponentModel(DX),r.registerComponentView(PX),r.registerPreprocessor(function(t){vy(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var NX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,i){return new t(e,a,i)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(wi);const RX=NX;var af=xe(),VX=function(r,t,e,a){var i=a[0],n=a[1];if(!(!i||!n)){var o=jl(r,i),s=jl(r,n),l=o.coord,u=s.coord;l[0]=it(l[0],-1/0),l[1]=it(l[1],-1/0),u[0]=it(u[0],1/0),u[1]=it(u[1],1/0);var c=_f([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function nf(r){return!isNaN(r)&&!isFinite(r)}function nM(r,t,e,a){var i=1-r;return nf(t[i])&&nf(e[i])}function OX(r,t){var e=t.coord[0],a=t.coord[1],i={coord:e,x:t.x0,y:t.y0},n={coord:a,x:t.x1,y:t.y1};return Cn(r,"cartesian2d")?e&&a&&(nM(1,e,a)||nM(0,e,a))?!0:bX(r,i,n):ql(r,i)||ql(r,n)}function oM(r,t,e,a,i){var n=a.coordinateSystem,o=r.getItemModel(t),s,l=Z(o.get(e[0]),i.getWidth()),u=Z(o.get(e[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var c=r.getValues(["x0","y0"],t),h=r.getValues(["x1","y1"],t),f=n.clampData(c),d=n.clampData(h),p=[];e[0]==="x0"?p[0]=f[0]>d[0]?h[0]:c[0]:p[0]=f[0]>d[0]?c[0]:h[0],e[1]==="y0"?p[1]=f[1]>d[1]?h[1]:c[1]:p[1]=f[1]>d[1]?c[1]:h[1],s=a.getMarkerPosition(p,e,!0)}else{var v=r.get(e[0],t),g=r.get(e[1],t),m=[v,g];n.clampData&&n.clampData(m,m),s=n.dataToPoint(m,!0)}if(Cn(n,"cartesian2d")){var y=n.getAxis("x"),_=n.getAxis("y"),v=r.get(e[0],t),g=r.get(e[1],t);nf(v)?s[0]=y.toGlobalCoord(y.getExtent()[e[0]==="x0"?0:1]):nf(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[e[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var sM=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],zX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,i){a.eachSeries(function(n){var o=wi.getMarkerModelFromSeries(n,"markArea");if(o){var s=o.getData();s.each(function(l){var u=W(sM,function(h){return oM(s,l,h,n,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},t.prototype.renderSeries=function(e,a,i,n){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new oe});this.group.add(c.group),this.markKeep(c);var h=BX(o,e,a);a.setData(h),h.each(function(f){var d=W(sM,function(C){return oM(h,f,C,e,n)}),p=o.getAxis("x").scale,v=o.getAxis("y").scale,g=p.getExtent(),m=v.getExtent(),y=[p.parse(h.get("x0",f)),p.parse(h.get("x1",f))],_=[v.parse(h.get("y0",f)),v.parse(h.get("y1",f))];cr(y),cr(_);var w=!(g[0]>y[1]||g[1]<y[0]||m[0]>_[1]||m[1]<_[0]),x=!w;h.setItemLayout(f,{points:d,allClipped:x});var S=h.getItemModel(f).getModel("itemStyle").getItemStyle(),L=rl(l,"color");S.fill||(S.fill=L,X(S.fill)&&(S.fill=Su(S.fill,.4))),S.stroke||(S.stroke=L),h.setItemVisual(f,"style",S)}),h.diff(af(c).data).add(function(f){var d=h.getItemLayout(f);if(!d.allClipped){var p=new Zt({shape:{points:d.points}});h.setItemGraphicEl(f,p),c.group.add(p)}}).update(function(f,d){var p=af(c).data.getItemGraphicEl(d),v=h.getItemLayout(f);v.allClipped?p&&c.group.remove(p):(p?Me(p,{shape:{points:v.points}},a,f):p=new Zt({shape:{points:v.points}}),h.setItemGraphicEl(f,p),c.group.add(p))}).remove(function(f){var d=af(c).data.getItemGraphicEl(f);c.group.remove(d)}).execute(),h.eachItemGraphicEl(function(f,d){var p=h.getItemModel(d),v=h.getItemVisual(d,"style");f.useStyle(h.getItemVisual(d,"style")),xt(f,ft(p),{labelFetcher:a,labelDataIndex:d,defaultText:h.getName(d)||"",inheritColor:X(v.fill)?Su(v.fill,1):"#000"}),wt(f,p),qe(f,null,null,p.get(["emphasis","disabled"])),ue(f).dataModel=a}),af(c).data=h,c.group.silent=a.get("silent")||e.get("silent")},t.type="markArea",t}(by);function BX(r,t,e){var a,i,n=["x0","y0","x1","y1"];if(r){var o=W(r&&r.dimensions,function(u){var c=t.getData(),h=c.getDimensionInfo(c.mapDimension(u))||{};return F(F({},h),{name:u,ordinalMeta:null})});i=W(n,function(u,c){return{name:u,type:o[c%2].type}}),a=new Ft(i,e)}else i=[{name:"value",type:"float"}],a=new Ft(i,e);var s=W(e.get("data"),fe(VX,t,r,e));r&&(s=Ie(s,fe(OX,r)));var l=r?function(u,c,h,f){var d=u.coord[Math.floor(f/2)][f%2];return ni(d,i[f])}:function(u,c,h,f){return ni(u.value,i[f])};return a.initData(s,null,l),a.hasItemOption=!0,a}const FX=zX;function GX(r){r.registerComponentModel(RX),r.registerComponentView(FX),r.registerPreprocessor(function(t){vy(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var WX=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},HX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,a,i){this.mergeDefaultAndTheme(e,i),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),this._updateSelector(e)},t.prototype._updateSelector=function(e){var a=e.selector,i=this.ecModel;a===!0&&(a=e.selector=["all","inverse"]),G(a)&&M(a,function(n,o){X(n)&&(n={type:n}),a[o]=de(n,WX(i,n.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var a=!1,i=0;i<e.length;i++){var n=e[i].get("name");if(this.isSelected(n)){this.select(n),a=!0;break}}!a&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var a=[],i=[];e.eachRawSeries(function(l){var u=l.name;i.push(u);var c;if(l.legendVisualProvider){var h=l.legendVisualProvider,f=h.getAllNames();e.isSeriesFiltered(l)||(i=i.concat(f)),f.length?a=a.concat(f):c=!0}else c=!0;c&&xd(l)&&a.push(l.name)}),this._availableNames=i;var n=this.get("data")||a,o=Q(),s=W(n,function(l){return(X(l)||De(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new Ge(l,this,this.ecModel))},this);this._data=Ie(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var a=this.option.selected,i=this.get("selectedMode");if(i==="single"){var n=this._data;M(n,function(o){a[o.get("name")]=!1})}a[e]=!0},t.prototype.unSelect=function(e){this.get("selectedMode")!=="single"&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var a=this.option.selected;a.hasOwnProperty(e)||(a[e]=!0),this[a[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,a=this.option.selected;M(e,function(i){a[i.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,a=this.option.selected;M(e,function(i){var n=i.get("name",!0);a.hasOwnProperty(n)||(a[n]=!0),a[n]=!a[n]})},t.prototype.isSelected=function(e){var a=this.option.selected;return!(a.hasOwnProperty(e)&&!a[e])&&me(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(Se);const xy=HX;var Jo=fe,Sy=M,of=oe,$X=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new of),this.group.add(this._selectorGroup=new of),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,a,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,a,i,l,s,u);var c=e.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},f=e.get("padding"),d=ct(c,h,f),p=this.layoutInner(e,o,d,n,l,u),v=ct(ie({width:p.width,height:p.height},c),h,f);this.group.x=v.x-p.x,this.group.y=v.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=gA(p,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,a,i,n,o,s,l){var u=this.getContentGroup(),c=Q(),h=a.get("selectedMode"),f=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&f.push(d.id)}),Sy(a.getData(),function(d,p){var v=d.get("name");if(!this.newlineDisabled&&(v===""||v===`
268
+ `)){var g=new of;g.newline=!0,u.add(g);return}var m=i.getSeriesByName(v)[0];if(!c.get(v)){if(m){var y=m.getData(),_=y.getVisual("legendLineStyle")||{},w=y.getVisual("legendIcon"),x=y.getVisual("style"),S=this._createItem(m,v,p,d,a,e,_,x,w,h,n);S.on("click",Jo(lM,v,null,n,f)).on("mouseover",Jo(Ly,m.name,null,n,f)).on("mouseout",Jo(Ty,m.name,null,n,f)),i.ssr&&S.eachChild(function(L){var C=ue(L);C.seriesIndex=m.seriesIndex,C.dataIndex=p,C.ssrType="legend"}),c.set(v,!0)}else i.eachRawSeries(function(L){if(!c.get(v)&&L.legendVisualProvider){var C=L.legendVisualProvider;if(!C.containName(v))return;var T=C.indexOfName(v),A=C.getItemVisual(T,"style"),D=C.getItemVisual(T,"legendIcon"),E=er(A.fill);E&&E[3]===0&&(E[3]=.2,A=F(F({},A),{fill:va(E,"rgba")}));var I=this._createItem(L,v,p,d,a,e,{},A,D,h,n);I.on("click",Jo(lM,null,v,n,f)).on("mouseover",Jo(Ly,null,v,n,f)).on("mouseout",Jo(Ty,null,v,n,f)),i.ssr&&I.eachChild(function(P){var k=ue(P);k.seriesIndex=L.seriesIndex,k.dataIndex=p,k.ssrType="legend"}),c.set(v,!0)}},this);process.env.NODE_ENV!=="production"&&(c.get(v)||console.warn(v+" series not exists. Legend data should be same with series name or data name."))}},this),o&&this._createSelector(o,a,n,s,l)},t.prototype._createSelector=function(e,a,i,n,o){var s=this.getSelectorGroup();Sy(e,function(u){var c=u.type,h=new Ae({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(h);var f=a.getModel("selectorLabel"),d=a.getModel(["emphasis","selectorLabel"]);xt(h,{normal:f,emphasis:d},{defaultText:u.title}),Ki(h)})},t.prototype._createItem=function(e,a,i,n,o,s,l,u,c,h,f){var d=e.visualDrawType,p=o.get("itemWidth"),v=o.get("itemHeight"),g=o.isSelected(a),m=n.get("symbolRotate"),y=n.get("symbolKeepAspect"),_=n.get("icon");c=_||c||"roundRect";var w=UX(c,n,l,u,d,g,f),x=new of,S=n.getModel("textStyle");if(te(e.getLegendIcon)&&(!_||_==="inherit"))x.add(e.getLegendIcon({itemWidth:p,itemHeight:v,icon:c,iconRotate:m,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:y}));else{var L=_==="inherit"&&e.getData().getVisual("symbol")?m==="inherit"?e.getData().getVisual("symbolRotate"):m:0;x.add(YX({itemWidth:p,itemHeight:v,icon:c,iconRotate:L,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:y}))}var C=s==="left"?p+5:-5,T=s,A=o.get("formatter"),D=a;X(A)&&A?D=A.replace("{name}",a??""):te(A)&&(D=A(a));var E=g?S.getTextColor():n.get("inactiveColor");x.add(new Ae({style:Fe(S,{text:D,x:C,y:v/2,fill:E,align:T,verticalAlign:"middle"},{inheritColor:E})}));var I=new Te({shape:x.getBoundingRect(),style:{fill:"transparent"}}),P=n.getModel("tooltip");return P.get("show")&&an({el:I,componentModel:o,itemName:a,itemTooltipOption:P.option}),x.add(I),x.eachChild(function(k){k.silent=!0}),I.silent=!h,this.getContentGroup().add(x),Ki(x),x.__legendDataIndex=i,x},t.prototype.layoutInner=function(e,a,i,n,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();un(e.get("orient"),l,e.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),h=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){un("horizontal",u,e.get("selectorItemGap",!0));var f=u.getBoundingRect(),d=[-f.x,-f.y],p=e.get("selectorButtonGap",!0),v=e.getOrient().index,g=v===0?"width":"height",m=v===0?"height":"width",y=v===0?"y":"x";s==="end"?d[v]+=c[g]+p:h[v]+=f[g]+p,d[1-v]+=c[m]/2-f[m]/2,u.x=d[0],u.y=d[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[g]=c[g]+p+f[g],_[m]=Math.max(c[m],f[m]),_[y]=Math.min(0,f[y]+d[1-v]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Ke);function UX(r,t,e,a,i,n,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),Sy(g,function(y,_){g[_]==="inherit"&&(g[_]=m[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?a.decal:Eo(h,o),u.fill==="inherit"&&(u.fill=a[i]),u.stroke==="inherit"&&(u.stroke=a[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?a:e).opacity),s(u,a);var f=t.getModel("lineStyle"),d=f.getLineStyle();if(s(d,e),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),d.stroke==="auto"&&(d.stroke=a.fill),!n){var p=t.get("inactiveBorderWidth"),v=u[c];u.lineWidth=p==="auto"?a.lineWidth>0&&v?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),d.stroke=f.get("inactiveColor"),d.lineWidth=f.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function YX(r){var t=r.icon||"roundRect",e=lt(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill="#fff",e.style.lineWidth=2),e}function lM(r,t,e,a){Ty(r,t,e,a),e.dispatchAction({type:"legendToggleSelect",name:r??t}),Ly(r,t,e,a)}function uM(r){for(var t=r.getZr().storage.getDisplayList(),e,a=0,i=t.length;a<i&&!(e=t[a].states.emphasis);)a++;return e&&e.hoverLayer}function Ly(r,t,e,a){uM(e)||e.dispatchAction({type:"highlight",seriesName:r,name:t,excludeSeriesId:a})}function Ty(r,t,e,a){uM(e)||e.dispatchAction({type:"downplay",seriesName:r,name:t,excludeSeriesId:a})}const cM=$X;function ZX(r){var t=r.findComponents({mainType:"legend"});t&&t.length&&r.filterSeries(function(e){for(var a=0;a<t.length;a++)if(!t[a].isSelected(e.name))return!1;return!0})}function Kl(r,t,e){var a=r==="allSelect"||r==="inverseSelect",i={},n=[];e.eachComponent({mainType:"legend",query:t},function(s){a?s[r]():s[r](t.name),hM(s,i),n.push(s.componentIndex)});var o={};return e.eachComponent("legend",function(s){M(i,function(l,u){s[l?"select":"unSelect"](u)}),hM(s,o)}),a?{selected:o,legendIndex:n}:{name:t.name,selected:o}}function hM(r,t){var e=t||{};return M(r.getData(),function(a){var i=a.get("name");if(!(i===`
269
+ `||i==="")){var n=r.isSelected(i);K(e,i)?e[i]=e[i]&&n:e[i]=n}}),e}function XX(r){r.registerAction("legendToggleSelect","legendselectchanged",fe(Kl,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",fe(Kl,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",fe(Kl,"inverseSelect")),r.registerAction("legendSelect","legendselected",fe(Kl,"select")),r.registerAction("legendUnSelect","legendunselected",fe(Kl,"unSelect"))}function fM(r){r.registerComponentModel(xy),r.registerComponentView(cM),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,ZX),r.registerSubTypeDefaulter("legend",function(){return"plain"}),XX(r)}var jX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(e,a,i){var n=mo(e);r.prototype.init.call(this,e,a,i),dM(this,e,n)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),dM(this,this.option,e)},t.type="legend.scroll",t.defaultOption=ri(xy.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(xy);function dM(r,t,e){var a=r.getOrient(),i=[1,1];i[a.index]=0,ii(t,e,{type:"box",ignoreSize:!!i})}const qX=jX;var pM=oe,Cy=["width","height"],Dy=["x","y"],KX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!0,e._currentIndex=0,e}return t.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new pM),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new pM)},t.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,a,i,n,o,s,l){var u=this;r.prototype.renderInner.call(this,e,a,i,n,o,s,l);var c=this._controllerGroup,h=a.get("pageIconSize",!0),f=G(h)?h:[h,h];p("pagePrev",0);var d=a.getModel("pageTextStyle");c.add(new Ae({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(v,g){var m=v+"DataIndex",y=Gs(a.get("pageIcons",!0)[a.getOrient().name][g],{onclick:j(u._pageGo,u,m,a,n)},{x:-f[0]/2,y:-f[1]/2,width:f[0],height:f[1]});y.name=v,c.add(y)}},t.prototype.layoutInner=function(e,a,i,n,o,s){var l=this.getSelectorGroup(),u=e.getOrient().index,c=Cy[u],h=Dy[u],f=Cy[1-u],d=Dy[1-u];o&&un("horizontal",l,e.get("selectorItemGap",!0));var p=e.get("selectorButtonGap",!0),v=l.getBoundingRect(),g=[-v.x,-v.y],m=ne(i);o&&(m[c]=i[c]-v[c]-p);var y=this._layoutContentAndController(e,n,m,u,c,f,d,h);if(o){if(s==="end")g[u]+=y[c]+p;else{var _=v[c]+p;g[u]-=_,y[h]-=_}y[c]+=v[c]+p,g[1-u]+=y[d]+y[f]/2-v[f]/2,y[f]=Math.max(y[f],v[f]),y[d]=Math.min(y[d],v[d]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return y},t.prototype._layoutContentAndController=function(e,a,i,n,o,s,l,u){var c=this.getContentGroup(),h=this._containerGroup,f=this._controllerGroup;un(e.get("orient"),c,e.get("itemGap"),n?i.width:null,n?null:i.height),un("horizontal",f,e.get("pageButtonItemGap",!0));var d=c.getBoundingRect(),p=f.getBoundingRect(),v=this._showController=d[o]>i[o],g=[-d.x,-d.y];a||(g[n]=c[u]);var m=[0,0],y=[-p.x,-p.y],_=le(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(v){var w=e.get("pageButtonPosition",!0);w==="end"?y[n]+=i[o]-p[o]:m[n]+=p[o]+_}y[1-n]+=d[s]/2-p[s]/2,c.setPosition(g),h.setPosition(m),f.setPosition(y);var x={x:0,y:0};if(x[o]=v?i[o]:d[o],x[s]=Math.max(d[s],p[s]),x[l]=Math.min(0,p[l]+y[1-n]),h.__rectSize=i[o],v){var S={x:0,y:0};S[o]=Math.max(i[o]-p[o]-_,0),S[s]=x[s],h.setClipPath(new Te({shape:S})),h.__rectSize=S[o]}else f.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var L=this._getPageInfo(e);return L.pageIndex!=null&&Me(c,{x:L.contentPosition[0],y:L.contentPosition[1]},v?e:null),this._updatePageInfoView(e,L),x},t.prototype._pageGo=function(e,a,i){var n=this._getPageInfo(a)[e];n!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:a.id})},t.prototype._updatePageInfoView=function(e,a){var i=this._controllerGroup;M(["pagePrev","pageNext"],function(c){var h=c+"DataIndex",f=a[h]!=null,d=i.childOfName(c);d&&(d.setStyle("fill",f?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),d.cursor=f?"pointer":"default")});var n=i.childOfName("pageText"),o=e.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;n&&o&&n.setStyle("text",X(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var a=e.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,o=e.getOrient().index,s=Cy[o],l=Dy[o],u=this._findTargetItemIndex(a),c=i.children(),h=c[u],f=c.length,d=f?1:0,p={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return p;var v=w(h);p.contentPosition[o]=-v.s;for(var g=u+1,m=v,y=v,_=null;g<=f;++g)_=w(c[g]),(!_&&y.e>m.s+n||_&&!x(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=_;for(var g=u-1,m=v,y=v,_=null;g>=-1;--g)_=w(c[g]),(!_||!x(y,_.s))&&m.i<y.i&&(y=m,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=m.i),++p.pageCount,++p.pageIndex),m=_;return p;function w(S){if(S){var L=S.getBoundingRect(),C=L[l]+S[l];return{s:C,e:C+L[s],i:S.__legendDataIndex}}}function x(S,L){return S.e>=L&&S.s<=L+n}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var a,i=this.getContentGroup(),n;return i.eachChild(function(o,s){var l=o.__legendDataIndex;n==null&&l!=null&&(n=s),l===e&&(a=s)}),a??n},t.type="legend.scroll",t}(cM);const JX=KX;function QX(r){r.registerAction("legendScroll","legendscroll",function(t,e){var a=t.scrollDataIndex;a!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(a)})})}function ej(r){ye(fM),r.registerComponentModel(qX),r.registerComponentView(JX),QX(r)}function tj(r){ye(fM),ye(ej)}var rj=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=ri(Yl.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Yl);const aj=rj;var Ay=xe();function ij(r,t,e){Ay(r).coordSysRecordMap.each(function(a){var i=a.dataZoomInfoMap.get(t.uid);i&&(i.getRange=e)})}function nj(r,t){for(var e=Ay(r).coordSysRecordMap,a=e.keys(),i=0;i<a.length;i++){var n=a[i],o=e.get(n),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||vM(e,o))}}}function vM(r,t){if(t){r.removeKey(t.model.uid);var e=t.controller;e&&e.dispose()}}function oj(r,t){var e={model:t,containsPoint:fe(lj,t),dispatchAction:fe(sj,r),dataZoomInfoMap:null,controller:null},a=e.controller=new Ml(r.getZr());return M(["pan","zoom","scrollMove"],function(i){a.on(i,function(n){var o=[];e.dataZoomInfoMap.each(function(s){if(n.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,e.model.mainType,e.controller,n);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&e.dispatchAction(o)})}),e}function sj(r,t){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function lj(r,t,e,a){return r.coordinateSystem.containPoint([e,a])}function uj(r){var t,e="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return r.each(function(n){var o=n.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;a[e+s]>a[e+t]&&(t=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function cj(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var a=Ay(e),i=a.coordSysRecordMap||(a.coordSysRecordMap=Q());i.each(function(n){n.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(n){var o=cA(n);M(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,oj(e,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=Q());c.set(n.uid,{dzReferCoordSysInfo:s,model:n,getRange:null})})}),i.each(function(n){var o=n.controller,s,l=n.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){vM(i,n);return}var c=uj(l);o.enable(c.controlType,c.opt),o.setPointerChecker(n.containsPoint),Co(n,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var hj=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,a,i){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),ij(i,e,{pan:j(My.pan,this),zoom:j(My.zoom,this),scrollMove:j(My.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){nj(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(ty),My={zoom:function(r,t,e,a){var i=this.range,n=i.slice(),o=r.axisModels[0];if(o){var s=Ey[t](null,[a.originX,a.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(n[1]-n[0])+n[0],u=Math.max(1/a.scale,0);n[0]=(n[0]-l)*u+l,n[1]=(n[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Rn(0,n,[0,100],0,c.minSpan,c.maxSpan),this.range=n,i[0]!==n[0]||i[1]!==n[1])return n}},pan:gM(function(r,t,e,a,i,n){var o=Ey[a]([n.oldX,n.oldY],[n.newX,n.newY],t,i,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:gM(function(r,t,e,a,i,n){var o=Ey[a]([0,0],[n.scrollDelta,n.scrollDelta],t,i,e);return o.signal*(r[1]-r[0])*n.scrollDelta})};function gM(r){return function(t,e,a,i){var n=this.range,o=n.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,a,i);if(Rn(l,o,[0,100],"all"),this.range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var Ey={grid:function(r,t,e,a,i){var n=e.axis,o={},s=i.model.coordinateSystem.getRect();return r=r||[0,0],n.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=n.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=n.inverse?-1:1),o},polar:function(r,t,e,a,i){var n=e.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=n.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=n.inverse?-1:1),o},singleAxis:function(r,t,e,a,i){var n=e.axis,o=i.model.coordinateSystem.getRect(),s={};return r=r||[0,0],n.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=n.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=n.inverse?-1:1),s}};const fj=hj;function mM(r){ry(r),r.registerComponentModel(aj),r.registerComponentView(fj),cj(r)}var dj=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=ri(Yl.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(Yl);const pj=dj;var Jl=Te,yM=7,vj=1,Iy=30,gj=7,Ql="horizontal",_M="vertical",mj=5,yj=["line","bar","candlestick","scatter"],_j={easing:"cubicOut",duration:100,delay:0},bj=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,a){this.api=a,this._onBrush=j(this._onBrush,this),this._onBrushEnd=j(this._onBrushEnd,this)},t.prototype.render=function(e,a,i,n){if(r.prototype.render.apply(this,arguments),Co(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!n||n.type!=="dataZoom"||n.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Qs(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new oe;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(a),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,a=this.api,i=e.get("brushSelect"),n=i?gj:0,o=this._findCoordRect(),s={width:a.getWidth(),height:a.getHeight()},l=this._orient===Ql?{right:s.width-o.x-o.width,top:s.height-Iy-yM-n,width:o.width,height:Iy}:{right:yM,top:o.y,width:Iy,height:o.height},u=mo(e.option);M(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=l[h])});var c=ct(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===_M&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,a=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Ql&&!o?{scaleY:l?1:-1,scaleX:1}:i===Ql&&o?{scaleY:l?1:-1,scaleX:-1}:i===_M&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=a.x-u.x,e.y=a.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,a=this._size,i=this._displayables.sliderGroup,n=e.get("brushSelect");i.add(new Jl({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new Jl({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:j(this._onClickPanel,this)}),s=this.api.getZr();n?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var a=this._size,i=this._shadowSize||[],n=e.series,o=n.getRawData(),s=n.getShadowDim&&n.getShadowDim(),l=s&&o.getDimensionInfo(s)?n.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==i[0]||a[1]!==i[1]){var h=o.getDataExtent(l),f=(h[1]-h[0])*.3;h=[h[0]-f,h[1]+f];var d=[0,a[1]],p=[0,a[0]],v=[[a[0],0],[0,0]],g=[],m=p[1]/(o.count()-1),y=0,_=Math.round(o.count()/a[0]),w;o.each([l],function(T,A){if(_>0&&A%_){y+=m;return}var D=T==null||isNaN(T)||T==="",E=D?0:ke(T,h,d,!0);D&&!w&&A?(v.push([v[v.length-1][0],0]),g.push([g[g.length-1][0],0])):!D&&w&&(v.push([y,0]),g.push([y,0])),v.push([y,E]),g.push([y,E]),y+=m,w=D}),u=this._shadowPolygonPts=v,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var x=this.dataZoomModel;function S(T){var A=x.getModel(T?"selectedDataBackground":"dataBackground"),D=new oe,E=new Zt({shape:{points:u},segmentIgnoreThreshold:1,style:A.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),I=new Xt({shape:{points:c},segmentIgnoreThreshold:1,style:A.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return D.add(E),D.add(I),D}for(var L=0;L<3;L++){var C=S(L===1);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,a=e.get("showDataShadow");if(a!==!1){var i,n=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();M(l,function(u){if(!i&&!(a!==!0&&me(yj,u.get("type"))<0)){var c=n.getComponent(_i(o),s).axis,h=wj(o),f,d=u.coordinateSystem;h!=null&&d.getOtherAxis&&(f=d.getOtherAxis(c).inverse),h=u.getData().mapDimension(h),i={thisAxis:c,series:u,thisDim:o,otherDim:h,otherAxisInverse:f}}},this)},this),i}},t.prototype._renderHandle=function(){var e=this.group,a=this._displayables,i=a.handles=[null,null],n=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,h=l.get("brushSelect"),f=a.filler=new Jl({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(f),o.add(new Jl({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:vj,fill:"rgba(0,0,0,0)"}})),M([0,1],function(_){var w=l.get("handleIcon");!Vc[w]&&w.indexOf("path://")<0&&w.indexOf("image://")<0&&(w="path://"+w,process.env.NODE_ENV!=="production"&&Ir("handleIcon now needs 'path://' prefix when using a path string"));var x=lt(w,-1,0,2,2,null,!0);x.attr({cursor:bM(this._orient),draggable:!0,drift:j(this._onDragMove,this,_),ondragend:j(this._onDragEnd,this),onmouseover:j(this._showDataInfo,this,!0),onmouseout:j(this._showDataInfo,this,!1),z2:5});var S=x.getBoundingRect(),L=l.get("handleSize");this._handleHeight=Z(L,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,x.setStyle(l.getModel("handleStyle").getItemStyle()),x.style.strokeNoScale=!0,x.rectHover=!0,x.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Ki(x);var C=l.get("handleColor");C!=null&&(x.style.fill=C),o.add(i[_]=x);var T=l.getModel("textStyle"),A=l.get("handleLabel")||{},D=A.show||!1;e.add(n[_]=new Ae({silent:!0,invisible:!D,style:Fe(T,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:T.getTextColor(),font:T.getFont()}),z2:10}))},this);var d=f;if(h){var p=Z(l.get("moveHandleSize"),s[1]),v=a.moveHandle=new Te({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,m=a.moveHandleIcon=lt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);m.silent=!0,m.y=s[1]+p/2-.5,v.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(p,10));d=a.moveZone=new Te({invisible:!0,shape:{y:s[1]-y,height:p+y}}),d.on("mouseover",function(){u.enterEmphasis(v)}).on("mouseout",function(){u.leaveEmphasis(v)}),o.add(v),o.add(m),o.add(d)}d.attr({draggable:!0,cursor:bM(this._orient),drift:j(this._onDragMove,this,"all"),ondragstart:j(this._showDataInfo,this,!0),ondragend:j(this._onDragEnd,this),onmouseover:j(this._showDataInfo,this,!0),onmouseout:j(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[ke(e[0],[0,100],a,!0),ke(e[1],[0,100],a,!0)]},t.prototype._updateInterval=function(e,a){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Rn(a,n,o,i.get("zoomLock")?"all":e,s.minSpan!=null?ke(s.minSpan,l,o,!0):null,s.maxSpan!=null?ke(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=cr([ke(n[0],o,l,!0),ke(n[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},t.prototype._updateView=function(e){var a=this._displayables,i=this._handleEnds,n=cr(i.slice()),o=this._size;M([0,1],function(d){var p=a.handles[d],v=this._handleHeight;p.attr({scaleX:v/2,scaleY:v/2,x:i[d]+(d?-1:1),y:o[1]/2-v/2})},this),a.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]});var s={x:n[0],width:n[1]-n[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,n[0],n[1],o[0]],c=0;c<l.length;c++){var h=l[c],f=h.getClipPath();f||(f=new Te,h.setClipPath(f)),f.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var a=this.dataZoomModel,i=this._displayables,n=i.handleLabels,o=this._orient,s=["",""];if(a.get("showDetail")){var l=a.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,h=e?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(h[0],u),this._formatLabel(h[1],u)]}}var f=cr(this._handleEnds.slice());d.call(this,0),d.call(this,1);function d(p){var v=rn(i.handles[p].parent,this.group),g=cc(p===0?"right":"left",v),m=this._handleWidth/2+mj,y=Rr([f[p]+(p===0?-m:m),this._size[1]/2],v);n[p].setStyle({x:y[0],y:y[1],verticalAlign:o===Ql?"middle":g,align:o===Ql?g:"center",text:s[p]})}},t.prototype._formatLabel=function(e,a){var i=this.dataZoomModel,n=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=a.getPixelPrecision());var s=e==null||isNaN(e)?"":a.type==="category"||a.type==="time"?a.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(o,20));return te(n)?n(e,s):X(n)?n.replace("{value}",s):s},t.prototype._showDataInfo=function(e){var a=this.dataZoomModel.get("handleLabel")||{},i=a.show||!1,n=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=n.get("show")||!1,s=e||this._dragging?o:i,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},t.prototype._onDragMove=function(e,a,i,n){this._dragging=!0,da(n.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Rr([a,i],o,!0),l=this._updateInterval(e,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var e=this.dataZoomModel.get("realtime");!e&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var a=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(i[0]<0||i[0]>a[0]||i[1]<0||i[1]>a[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var a=e.offsetX,i=e.offsetY;this._brushStart=new ve(a,i),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var i=a.shape,n=+new Date;if(!(n-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=cr([ke(i.x,o,s,!0),ke(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(da(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,a){var i=this._displayables,n=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Jl({silent:!0,style:n.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,a),c=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:h[1]})},t.prototype._dispatchZoomAction=function(e){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?_j:null,start:a[0],end:a[1]})},t.prototype._findCoordRect=function(){var e,a=cA(this.dataZoomModel).infoList;if(!e&&a.length){var i=a[0].model.coordinateSystem;e=i.getRect&&i.getRect()}if(!e){var n=this.api.getWidth(),o=this.api.getHeight();e={x:n*.2,y:o*.2,width:n*.6,height:o*.6}}return e},t.type="dataZoom.slider",t}(ty);function wj(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function bM(r){return r==="vertical"?"ns-resize":"ew-resize"}const xj=bj;function wM(r){r.registerComponentModel(pj),r.registerComponentView(xj),ry(r)}function Sj(r){ye(mM),ye(wM)}var Lj={get:function(r,t,e){var a=ne((Tj[r]||{})[t]);return e&&G(a)?a[a.length-1]:a}},Tj={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const xM=Lj;var SM=Lt.mapVisual,Cj=Lt.eachVisual,Dj=G,LM=M,Aj=cr,Mj=ke,Ej=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,a,i){this.mergeDefaultAndTheme(e,i)},t.prototype.optionUpdated=function(e,a){var i=this.option;!a&&FA(i,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var a=this.stateList;e=j(e,this),this.controllerVisuals=hy(this.option.controller,a,e),this.targetVisuals=hy(this.option.target,a,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,a=[];return e==null||e==="all"?this.ecModel.eachSeries(function(i,n){a.push(n)}):a=Ve(e),a},t.prototype.eachTargetSeries=function(e,a){M(this.getTargetSeriesIndices(),function(i){var n=this.ecModel.getSeriesByIndex(i);n&&e.call(a,n)},this)},t.prototype.isTargetSeries=function(e){var a=!1;return this.eachTargetSeries(function(i){i===e&&(a=!0)}),a},t.prototype.formatValueText=function(e,a,i){var n=this.option,o=n.precision,s=this.dataBound,l=n.formatter,u;i=i||["<",">"],G(e)&&(e=e.slice(),u=!0);var c=a?e:u?[h(e[0]),h(e[1])]:h(e);if(X(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(te(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?i[0]+" "+c[1]:e[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function h(f){return f===s[0]?"min":f===s[1]?"max":(+f).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,a=Aj([e.min,e.max]);this._dataExtent=a},t.prototype.getDataDimensionIndex=function(e){var a=this.option.dimension;if(a!=null)return e.getDimensionIndex(a);for(var i=e.dimensions,n=i.length-1;n>=0;n--){var o=i[n],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,a=this.option,i={inRange:a.inRange,outOfRange:a.outOfRange},n=a.target||(a.target={}),o=a.controller||(a.controller={});de(n,i),de(o,i);var s=this.isCategory();l.call(this,n),l.call(this,o),u.call(this,n,"inRange","outOfRange"),c.call(this,o);function l(h){Dj(a.color)&&!h.inRange&&(h.inRange={color:a.color.slice().reverse()}),h.inRange=h.inRange||{color:e.get("gradientColor")}}function u(h,f,d){var p=h[f],v=h[d];p&&!v&&(v=h[d]={},LM(p,function(g,m){if(Lt.isValidType(m)){var y=xM.get(m,"inactive",s);y!=null&&(v[m]=y,m==="color"&&!v.hasOwnProperty("opacity")&&!v.hasOwnProperty("colorAlpha")&&(v.opacity=[0,0]))}}))}function c(h){var f=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,d=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),v=this.getItemSymbol(),g=v||"roundRect";LM(this.stateList,function(m){var y=this.itemSize,_=h[m];_||(_=h[m]={color:s?p:[p]}),_.symbol==null&&(_.symbol=f&&ne(f)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=d&&ne(d)||(s?y[0]:[y[0],y[0]])),_.symbol=SM(_.symbol,function(S){return S==="none"?g:S});var w=_.symbolSize;if(w!=null){var x=-1/0;Cj(w,function(S){S>x&&(x=S)}),_.symbolSize=SM(w,function(S){return Mj(S,[0,x],[0,y[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(Se);const sf=Ej;var TM=[20,140],Ij=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=TM[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=TM[1])},t.prototype._resetRange=function(){var e=this.getExtent(),a=this.option.range;!a||a.auto?(e.auto=1,this.option.range=e):G(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],e[0]),a[1]=Math.min(a[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),M(this.stateList,function(e){var a=this.option.controller[e].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),a=cr((this.get("range")||[]).slice());return a[0]>e[1]&&(a[0]=e[1]),a[1]>e[1]&&(a[1]=e[1]),a[0]<e[0]&&(a[0]=e[0]),a[1]<e[0]&&(a[1]=e[0]),a},t.prototype.getValueState=function(e){var a=this.option.range,i=this.getExtent();return(a[0]<=i[0]||a[0]<=e)&&(a[1]>=i[1]||e<=a[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&n.push(l)},this),a.push({seriesId:i.id,dataIndex:n})},this),a},t.prototype.getVisualMeta=function(e){var a=CM(this,"outOfRange",this.getExtent()),i=CM(this,"inRange",this.option.range.slice()),n=[];function o(d,p){n.push({value:d,color:e(d,p)})}for(var s=0,l=0,u=i.length,c=a.length;l<c&&(!i.length||a[l]<=i[0]);l++)a[l]<i[s]&&o(a[l],"outOfRange");for(var h=1;s<u;s++,h=0)h&&n.length&&o(i[s],"outOfRange"),o(i[s],"inRange");for(var h=1;l<c;l++)(!i.length||i[i.length-1]<a[l])&&(h&&(n.length&&o(n[n.length-1].value,"outOfRange"),h=0),o(a[l],"outOfRange"));var f=n.length;return{stops:n,outerColors:[f?n[0].color:"transparent",f?n[f-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=ri(sf.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),t}(sf);function CM(r,t,e){if(e[0]===e[1])return e.slice();for(var a=200,i=(e[1]-e[0])/a,n=e[0],o=[],s=0;s<=a&&n<e[1];s++)o.push(n),n+=i;return o.push(e[1]),o}const Pj=Ij;var kj=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.autoPositionValues={left:1,right:1,top:1,bottom:1},e}return t.prototype.init=function(e,a){this.ecModel=e,this.api=a},t.prototype.render=function(e,a,i,n){if(this.visualMapModel=e,e.get("show")===!1){this.group.removeAll();return}this.doRender(e,a,i,n)},t.prototype.renderBackground=function(e){var a=this.visualMapModel,i=go(a.get("padding")||0),n=e.getBoundingRect();e.add(new Te({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:a.get("backgroundColor"),stroke:a.get("borderColor"),lineWidth:a.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,a,i){i=i||{};var n=i.forceState,o=this.visualMapModel,s={};if(a==="color"){var l=o.get("contentColor");s.color=l}function u(d){return s[d]}function c(d,p){s[d]=p}var h=o.controllerVisuals[n||o.getValueState(e)],f=Lt.prepareVisualTypes(h);return M(f,function(d){var p=h[d];i.convertOpacityToAlpha&&d==="opacity"&&(d="colorAlpha",p=h.__alphaForOpacity),Lt.dependsOn(d,a)&&p&&p.applyVisual(e,u,c)}),s[a]},t.prototype.positionGroup=function(e){var a=this.visualMapModel,i=this.api;Sc(e,a.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},t.prototype.doRender=function(e,a,i,n){},t.type="visualMap",t}(Ke);const DM=kj;var AM=[["left","right","width"],["top","bottom","height"]];function MM(r,t,e){var a=r.option,i=a.align;if(i!=null&&i!=="auto")return i;for(var n={width:t.getWidth(),height:t.getHeight()},o=a.orient==="horizontal"?1:0,s=AM[o],l=[0,null,10],u={},c=0;c<3;c++)u[AM[1-o][c]]=l[c],u[s[c]]=c===2?e[0]:a[s[c]];var h=[["x","width",3],["y","height",0]][o],f=ct(u,n,a.padding);return s[(f.margin[h[2]]||0)+f[h[0]]+f[h[1]]*.5<n[h[1]]*.5?0:1]}function lf(r,t){return M(r||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),r}var la=ke,Nj=M,EM=Math.min,Py=Math.max,Rj=12,Vj=6,Oj=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._shapes={},e._dataInterval=[],e._handleEnds=[],e._hoverLinkDataIndices=[],e}return t.prototype.init=function(e,a){r.prototype.init.call(this,e,a),this._hoverLinkFromSeriesMouseOver=j(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=j(this._hideIndicator,this)},t.prototype.doRender=function(e,a,i,n){(!n||n.type!=="selectDataRange"||n.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,a=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(a);var i=e.get("text");this._renderEndsText(a,i,0),this._renderEndsText(a,i,1),this._updateView(!0),this.renderBackground(a),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(a)},t.prototype._renderEndsText=function(e,a,i){if(a){var n=a[1-i];n=n!=null?n+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,i===0?-s:l[1]+s],u),h=this._applyTransform(i===0?"bottom":"top",u),f=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new Ae({style:Fe(d,{x:c[0],y:c[1],verticalAlign:f==="horizontal"?"middle":h,align:f==="horizontal"?h:"center",text:n})}))}},t.prototype._renderBar=function(e){var a=this.visualMapModel,i=this._shapes,n=a.itemSize,o=this._orient,s=this._useHandle,l=MM(a,this.api,n),u=i.mainGroup=this._createBarGroup(l),c=new oe;u.add(c),c.add(i.outOfRange=IM()),c.add(i.inRange=IM(null,s?kM(this._orient):null,j(this._dragHandle,this,"all",!1),j(this._dragHandle,this,"all",!0))),c.setClipPath(new Te({shape:{x:0,y:0,width:n[0],height:n[1],r:3}}));var h=a.textStyleModel.getTextRect("国"),f=Py(h.width,h.height);s&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(a,u,0,n,f,o),this._createHandle(a,u,1,n,f,o)),this._createIndicator(a,u,n,f,o),e.add(u)},t.prototype._createHandle=function(e,a,i,n,o,s){var l=j(this._dragHandle,this,i,!1),u=j(this._dragHandle,this,i,!0),c=Er(e.get("handleSize"),n[0]),h=lt(e.get("handleIcon"),-c/2,-c/2,c,c,null,!0),f=kM(this._orient);h.attr({cursor:f,draggable:!0,drift:l,ondragend:u,onmousemove:function(m){da(m.event)}}),h.x=n[0]/2,h.useStyle(e.getModel("handleStyle").getItemStyle()),h.setStyle({strokeNoScale:!0,strokeFirst:!0}),h.style.lineWidth*=2,h.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),Ji(h,!0),a.add(h);var d=this.visualMapModel.textStyleModel,p=new Ae({cursor:f,draggable:!0,drift:l,onmousemove:function(m){da(m.event)},ondragend:u,style:Fe(d,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var v=[c,0],g=this._shapes;g.handleThumbs[i]=h,g.handleLabelPoints[i]=v,g.handleLabels[i]=p},t.prototype._createIndicator=function(e,a,i,n,o){var s=Er(e.get("indicatorSize"),i[0]),l=lt(e.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=e.getModel("indicatorStyle").getItemStyle();if(l instanceof bt){var c=l.style;l.useStyle(F({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);a.add(l);var h=this.visualMapModel.textStyleModel,f=new Ae({silent:!0,invisible:!0,style:Fe(h,{x:0,y:0,text:""})});this.group.add(f);var d=[(o==="horizontal"?n/2:Vj)+i[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=f,p.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,a,i,n){if(this._useHandle){if(this._dragging=!a,!a){var o=this._applyTransform([i,n],this._shapes.mainGroup,!0);this._updateInterval(e,o[1]),this._hideIndicator(),this._updateView()}a===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),a?!this._hovering&&this._clearHoverLinkToSeries():PM(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,a=this._dataInterval=e.getSelected(),i=e.getExtent(),n=[0,e.itemSize[1]];this._handleEnds=[la(a[0],i,n,!0),la(a[1],i,n,!0)]},t.prototype._updateInterval=function(e,a){a=a||0;var i=this.visualMapModel,n=this._handleEnds,o=[0,i.itemSize[1]];Rn(a,n,o,e,0);var s=i.getExtent();this._dataInterval=[la(n[0],o,s,!0),la(n[1],o,s,!0)]},t.prototype._updateView=function(e){var a=this.visualMapModel,i=a.getExtent(),n=this._shapes,o=[0,a.itemSize[1]],s=e?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,i,s,"inRange"),u=this._createBarVisual(i,i,o,"outOfRange");n.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),n.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},t.prototype._createBarVisual=function(e,a,i,n){var o={forceState:n,convertOpacityToAlpha:!0},s=this._makeColorGradient(e,o),l=[this.getControllerVisual(e[0],"symbolSize",o),this.getControllerVisual(e[1],"symbolSize",o)],u=this._createBarPoints(i,l);return{barColor:new zs(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},t.prototype._makeColorGradient=function(e,a){var i=100,n=[],o=(e[1]-e[0])/i;n.push({color:this.getControllerVisual(e[0],"color",a),offset:0});for(var s=1;s<i;s++){var l=e[0]+o*s;if(l>e[1])break;n.push({color:this.getControllerVisual(l,"color",a),offset:s/i})}return n.push({color:this.getControllerVisual(e[1],"color",a),offset:1}),n},t.prototype._createBarPoints=function(e,a){var i=this.visualMapModel.itemSize;return[[i[0]-a[0],e[0]],[i[0],e[0]],[i[0],e[1]],[i[0]-a[1],e[1]]]},t.prototype._createBarGroup=function(e){var a=this._orient,i=this.visualMapModel.get("inverse");return new oe(a==="horizontal"&&!i?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&i?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!i?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,a){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=n.itemSize,u=n.getExtent(),c=this._applyTransform("left",i.mainGroup);Nj([0,1],function(h){var f=o[h];f.setStyle("fill",a.handlesColor[h]),f.y=e[h];var d=la(e[h],[0,l[1]],u,!0),p=this.getControllerVisual(d,"symbolSize");f.scaleX=f.scaleY=p/l[0],f.x=l[0]-p/2;var v=Rr(i.handleLabelPoints[h],rn(f,this.group));if(this._orient==="horizontal"){var g=c==="left"||c==="top"?(l[0]-p)/2:(l[0]-p)/-2;v[1]+=g}s[h].setStyle({x:v[0],y:v[1],text:n.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,a,i,n){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,h=c.indicator;if(h){h.attr("invisible",!1);var f={convertOpacityToAlpha:!0},d=this.getControllerVisual(e,"color",f),p=this.getControllerVisual(e,"symbolSize"),v=la(e,s,u,!0),g=l[0]-p/2,m={x:h.x,y:h.y};h.y=v,h.x=g;var y=Rr(c.indicatorLabelPoint,rn(h,this.group)),_=c.indicatorLabel;_.attr("invisible",!1);var w=this._applyTransform("left",c.mainGroup),x=this._orient,S=x==="horizontal";_.setStyle({text:(i||"")+o.formatValueText(a),verticalAlign:S?w:"middle",align:S?"center":w});var L={x:g,y:v,style:{fill:d}},C={style:{x:y[0],y:y[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var T={duration:100,easing:"cubicInOut",additive:!0};h.x=m.x,h.y=m.y,h.animateTo(L,T),_.animateTo(C,T)}else h.attr(L),_.attr(C);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var D=0;D<A.length;D++)this.api.enterBlur(A[D])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(a){if(e._hovering=!0,!e._dragging){var i=e.visualMapModel.itemSize,n=e._applyTransform([a.offsetX,a.offsetY],e._shapes.mainGroup,!0,!0);n[1]=EM(Py(0,n[1]),i[1]),e._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,a){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],s=i.getExtent();e=EM(Py(o[0],e),o[1]);var l=zj(i,s,o),u=[e-l,e+l],c=la(e,o,s,!0),h=[la(u[0],o,s,!0),la(u[1],o,s,!0)];u[0]<o[0]&&(h[0]=-1/0),u[1]>o[1]&&(h[1]=1/0),a&&(h[0]===-1/0?this._showIndicator(c,h[1],"< ",l):h[1]===1/0?this._showIndicator(c,h[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var f=this._hoverLinkDataIndices,d=[];(a||PM(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var p=SN(f,d);this._dispatchHighDown("downplay",lf(p[0],i)),this._dispatchHighDown("highlight",lf(p[1],i))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var a;if(dn(e.target,function(l){var u=ue(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var i=this.ecModel.getSeriesByIndex(a.seriesIndex),n=this.visualMapModel;if(n.isTargetSeries(i)){var o=i.getData(a.dataType),s=o.getStore().get(n.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var i=0;i<a.length;i++)this.api.leaveBlur(a[i])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",lf(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,a,i,n){var o=rn(a,n?null:this.group);return G(e)?Rr(e,o,i):cc(e,o,i)},t.prototype._dispatchHighDown=function(e,a){a&&a.length&&this.api.dispatchAction({type:e,batch:a})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(DM);function IM(r,t,e,a){return new Zt({shape:{points:r},draggable:!!e,cursor:t,drift:e,onmousemove:function(i){da(i.event)},ondragend:a})}function zj(r,t,e){var a=Rj/2,i=r.get("hoverLinkDataSize");return i&&(a=la(i,t,e,!0)/2),a}function PM(r){var t=r.get("hoverLinkOnHandle");return!!(t??r.get("realtime"))}function kM(r){return r==="vertical"?"ns-resize":"ew-resize"}const Bj=Oj;var Fj={type:"selectDataRange",event:"dataRangeSelected",update:"update"},Gj=function(r,t){t.eachComponent({mainType:"visualMap",query:r},function(e){e.setSelected(r.selected)})},Wj=[{createOnAllSeries:!0,reset:function(r,t){var e=[];return t.eachComponent("visualMap",function(a){var i=r.pipelineContext;!a.isTargetSeries(r)||i&&i.large||e.push(VZ(a.stateList,a.targetVisuals,j(a.getValueState,a),a.getDataDimensionIndex(r.getData())))}),e}},{createOnAllSeries:!0,reset:function(r,t){var e=r.getData(),a=[];t.eachComponent("visualMap",function(i){if(i.isTargetSeries(r)){var n=i.getVisualMeta(j(Hj,null,r,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(e);o>=0&&(n.dimension=o,a.push(n))}}),r.getData().setVisual("visualMeta",a)}}];function Hj(r,t,e,a){for(var i=t.targetVisuals[a],n=Lt.prepareVisualTypes(i),o={color:rl(r.getData(),"color")},s=0,l=n.length;s<l;s++){var u=n[s],c=i[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(e,h,f)}return o.color;function h(d){return o[d]}function f(d,p){o[d]=p}}var NM=M;function $j(r){var t=r&&r.visualMap;G(t)||(t=t?[t]:[]),NM(t,function(e){if(e){Qo(e,"splitList")&&!Qo(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var a=e.pieces;a&&G(a)&&NM(a,function(i){re(i)&&(Qo(i,"start")&&!Qo(i,"min")&&(i.min=i.start),Qo(i,"end")&&!Qo(i,"max")&&(i.max=i.end))})}})}function Qo(r,t){return r&&r.hasOwnProperty&&r.hasOwnProperty(t)}var RM=!1;function VM(r){RM||(RM=!0,r.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(Fj,Gj),M(Wj,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor($j))}function OM(r){r.registerComponentModel(Pj),r.registerComponentView(Bj),VM(r)}var Uj=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],Yj[this._mode].call(this,this._pieceList),this._resetSelected(e,a);var n=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=ne(n)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=W(this._pieceList,function(l){return l=ne(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,a={},i=Lt.listVisualTypes(),n=this.isCategory();M(e.pieces,function(s){M(i,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),M(a,function(s,l){var u=!1;M(this.stateList,function(c){u=u||o(e,c,l)||o(e.target,c,l)},this),!u&&M(this.stateList,function(c){(e[c]||(e[c]={}))[l]=xM.get(l,c==="inRange"?"active":"inactive",n)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,a){var i=this.option,n=this._pieceList,o=(a?i:e).selected||{};if(i.selected=o,M(n,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;M(n,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=ne(e)},t.prototype.getValueState=function(e){var a=Lt.findPieceIndex(e,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[],i=this._pieceList;return this.eachTargetSeries(function(n){var o=[],s=n.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=Lt.findPieceIndex(l,i);c===e&&o.push(u)},this),a.push({seriesId:n.id,dataIndex:o})},this),a},t.prototype.getRepresentValue=function(e){var a;if(this.isCategory())a=e.value;else if(e.value!=null)a=e.value;else{var i=e.interval||[];a=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return a},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var a=[],i=["",""],n=this;function o(c,h){var f=n.getRepresentValue({interval:c});h||(h=n.getValueState(f));var d=e(f,h);c[0]===-1/0?i[0]=d:c[1]===1/0?i[1]=d:a.push({value:c[0],color:d},{value:c[1],color:d})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return M(s,function(c){var h=c.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:a,outerColors:i}},t.type="visualMap.piecewise",t.defaultOption=ri(sf.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(sf),Yj={splitNumber:function(r){var t=this.option,e=Math.min(t.precision,20),a=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var n=(a[1]-a[0])/i;+n.toFixed(e)!==n&&e<5;)e++;t.precision=e,n=+n.toFixed(e),t.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o<i;s+=n,o++){var l=o===i-1?a[1]:s+n;r.push({interval:[s,l],close:[1,1]})}t.maxOpen&&r.push({interval:[a[1],1/0],close:[0,0]}),u1(r),M(r,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var t=this.option;M(t.categories,function(e){r.push({text:this.formatValueText(e,!0),value:e})},this),zM(t,r)},pieces:function(r){var t=this.option;M(t.pieces,function(e,a){re(e)||(e={value:e});var i={text:"",index:a};if(e.label!=null&&(i.text=e.label),e.hasOwnProperty("value")){var n=i.value=e.value;i.interval=[n,n],i.close=[1,1]}else{for(var o=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],h=0;h<2;h++){for(var f=[["gte","gt","min"],["lte","lt","max"]][h],d=0;d<3&&o[h]==null;d++)o[h]=e[f[d]],s[h]=l[d],c[h]=d===2;o[h]==null&&(o[h]=u[h])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),process.env.NODE_ENV!=="production"&&o[0]>o[1]&&console.warn("Piece "+a+"is illegal: "+o+" lower bound should not greater then uppper bound."),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=Lt.retrieveVisuals(e),r.push(i)},this),zM(t,r),u1(r),M(r,function(e){var a=e.close,i=[["<","≤"][a[1]],[">","≥"][a[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,i)},this)}};function zM(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}const Zj=Uj;var Xj=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var a=this.visualMapModel,i=a.get("textGap"),n=a.textStyleModel,o=n.getFont(),s=n.getTextColor(),l=this._getItemAlign(),u=a.itemSize,c=this._getViewData(),h=c.endsText,f=it(a.get("showLabel",!0),!h),d=!a.get("selectedMode");h&&this._renderEndsText(e,h[0],u,f,l),M(c.viewPieceList,function(p){var v=p.piece,g=new oe;g.onclick=j(this._onItemClick,this,v),this._enableHoverLink(g,p.indexInModelPieceList);var m=a.getRepresentValue(v);if(this._createItemSymbol(g,m,[0,0,u[0],u[1]],d),f){var y=this.visualMapModel.getValueState(m);g.add(new Ae({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:v.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1},silent:d}))}e.add(g)},this),h&&this._renderEndsText(e,h[1],u,f,l),un(a.get("orient"),e,a.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,a){var i=this;e.on("mouseover",function(){return n("highlight")}).on("mouseout",function(){return n("downplay")});var n=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:lf(s.findTargetDataIndices(a),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,a=e.option;if(a.orient==="vertical")return MM(e,this.api,e.itemSize);var i=a.align;return(!i||i==="auto")&&(i="left"),i},t.prototype._renderEndsText=function(e,a,i,n,o){if(a){var s=new oe,l=this.visualMapModel.textStyleModel;s.add(new Ae({style:Fe(l,{x:n?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:n?o:"center",text:a})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,a=W(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=e.get("text"),n=e.get("orient"),o=e.get("inverse");return(n==="horizontal"?o:!o)?a.reverse():i&&(i=i.slice().reverse()),{viewPieceList:a,endsText:i}},t.prototype._createItemSymbol=function(e,a,i,n){var o=lt(this.getControllerVisual(a,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(a,"color"));o.silent=n,e.add(o)},t.prototype._onItemClick=function(e){var a=this.visualMapModel,i=a.option,n=i.selectedMode;if(n){var o=ne(i.selected),s=a.getSelectedMapKey(e);n==="single"||n===!0?(o[s]=!0,M(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(DM);const jj=Xj;function BM(r){r.registerComponentModel(Zj),r.registerComponentView(jj),VM(r)}function qj(r){ye(OM),ye(BM)}var Kj={label:{enabled:!0},decal:{show:!1}},FM=xe(),Jj={};function Qj(r,t){var e=r.getModel("aria");if(!e.get("enabled"))return;var a=ne(Kj);de(a.label,r.getLocaleModel().get("aria"),!1),de(e.option,a,!1),i(),n();function i(){var u=e.getModel("decal"),c=u.get("show");if(c){var h=Q();r.eachSeries(function(f){if(!f.isColorBySeries()){var d=h.get(f.type);d||(d={},h.set(f.type,d)),FM(f).scope=d}}),r.eachRawSeries(function(f){if(r.isSeriesFiltered(f))return;if(te(f.enableAriaDecal)){f.enableAriaDecal();return}var d=f.getData();if(f.isColorBySeries()){var y=Ep(f.ecModel,f.name,Jj,r.getSeriesCount()),_=d.getVisual("decal");d.setVisual("decal",w(_,y))}else{var p=f.getRawData(),v={},g=FM(f).scope;d.each(function(x){var S=d.getRawIndex(x);v[S]=x});var m=p.count();p.each(function(x){var S=v[x],L=p.getName(x)||x+"",C=Ep(f.ecModel,L,g,m),T=d.getItemVisual(S,"decal");d.setItemVisual(S,"decal",w(T,C))})}function w(x,S){var L=x?F(F({},S),x):S;return L.dirty=!0,L}})}}function n(){var u=t.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),h=e.getModel("label");if(h.option=ie(h.option,c),!!h.get("enabled")){if(u.setAttribute("role","img"),h.get("description")){u.setAttribute("aria-label",h.get("description"));return}var f=r.getSeriesCount(),d=h.get(["data","maxCount"])||10,p=h.get(["series","maxCount"])||10,v=Math.min(f,p),g;if(!(f<1)){var m=s();if(m){var y=h.get(["general","withTitle"]);g=o(y,{title:m})}else g=h.get(["general","withoutTitle"]);var _=[],w=f>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);g+=o(w,{seriesCount:f}),r.eachSeries(function(C,T){if(T<v){var A=void 0,D=C.get("name"),E=D?"withName":"withoutName";A=f>1?h.get(["series","multiple",E]):h.get(["series","single",E]),A=o(A,{seriesId:C.seriesIndex,seriesName:C.get("name"),seriesType:l(C.subType)});var I=C.getData();if(I.count()>d){var P=h.get(["data","partialData"]);A+=o(P,{displayCnt:d})}else A+=h.get(["data","allData"]);for(var k=h.get(["data","separator","middle"]),N=h.get(["data","separator","end"]),O=h.get(["data","excludeDimensionId"]),R=[],V=0;V<I.count();V++)if(V<d){var B=I.getName(V),H=O?Ie(I.getValues(V),function($,U){return me(O,U)===-1}):I.getValues(V),Y=h.get(["data",B?"withName":"withoutName"]);R.push(o(Y,{name:B,value:H.join(k)}))}A+=R.join(k)+N,_.push(A)}});var x=h.getModel(["series","multiple","separator"]),S=x.get("middle"),L=x.get("end");g+=_.join(S)+L,u.setAttribute("aria-label",g)}}}}function o(u,c){if(!X(u))return u;var h=u;return M(c,function(f,d){h=h.replace(new RegExp("\\{\\s*"+d+"\\s*\\}","g"),f)}),h}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=r.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function eq(r){if(!(!r||!r.aria)){var t=r.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},M(["description","general","series","data"],function(e){t[e]!=null&&(t.label[e]=t[e])})}}function tq(r){r.registerPreprocessor(eq),r.registerVisual(r.PRIORITY.VISUAL.ARIA,Qj)}var GM={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},rq=function(){function r(t){var e=this._condVal=X(t)?new RegExp(t):Ky(t)?t:null;if(e==null){var a="";process.env.NODE_ENV!=="production"&&(a=Ot("Illegal regexp",t,"in")),Pe(a)}}return r.prototype.evaluate=function(t){var e=typeof t;return X(e)?this._condVal.test(t):De(e)?this._condVal.test(t+""):!1},r}(),aq=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),iq=function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(!t[e].evaluate())return!1;return!0},r}(),nq=function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].evaluate())return!0;return!1},r}(),oq=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),sq=function(){function r(){}return r.prototype.evaluate=function(){for(var t=!!this.valueParser,e=this.getValue,a=e(this.valueGetterParam),i=t?this.valueParser(a):null,n=0;n<this.subCondList.length;n++)if(!this.subCondList[n].evaluate(t?i:a))return!1;return!0},r}();function ky(r,t){if(r===!0||r===!1){var e=new aq;return e.value=r,e}var a="";return HM(r)||(process.env.NODE_ENV!=="production"&&(a=Ot("Illegal config. Expect a plain object but actually",r)),Pe(a)),r.and?WM("and",r,t):r.or?WM("or",r,t):r.not?lq(r,t):uq(r,t)}function WM(r,t,e){var a=t[r],i="";process.env.NODE_ENV!=="production"&&(i=Ot('"and"/"or" condition should only be `'+r+": [...]` and must not be empty array.","Illegal condition:",t)),G(a)||Pe(i),a.length||Pe(i);var n=r==="and"?new iq:new nq;return n.children=W(a,function(o){return ky(o,e)}),n.children.length||Pe(i),n}function lq(r,t){var e=r.not,a="";process.env.NODE_ENV!=="production"&&(a=Ot('"not" condition should only be `not: {}`.',"Illegal condition:",r)),HM(e)||Pe(a);var i=new oq;return i.child=ky(e,t),i.child||Pe(a),i}function uq(r,t){for(var e="",a=t.prepareGetValue(r),i=[],n=we(r),o=r.parser,s=o?lw(o):null,l=0;l<n.length;l++){var u=n[l];if(!(u==="parser"||t.valueGetterAttrMap.get(u))){var c=K(GM,u)?GM[u]:u,h=r[u],f=s?s(h):h,d=FV(c,f)||c==="reg"&&new rq(f);d||(process.env.NODE_ENV!=="production"&&(e=Ot('Illegal relational operation: "'+u+'" in condition:',r)),Pe(e)),i.push(d)}}i.length||(process.env.NODE_ENV!=="production"&&(e=Ot("Relational condition must have at least one operator.","Illegal condition:",r)),Pe(e));var p=new sq;return p.valueGetterParam=a,p.valueParser=s,p.getValue=t.getValue,p.subCondList=i,p}function HM(r){return re(r)&&!Dt(r)}var cq=function(){function r(t,e){this._cond=ky(t,e)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function hq(r,t){return new cq(r,t)}var fq={type:"echarts:filter",transform:function(r){for(var t=r.upstream,e,a=hq(r.config,{valueGetterAttrMap:Q({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;K(s,"dimension")||(process.env.NODE_ENV!=="production"&&(l=Ot('Relation condition must has prop "dimension" specified.',"Illegal condition:",s)),Pe(l));var c=t.getDimensionInfo(u);return c||(process.env.NODE_ENV!=="production"&&(l=Ot("Can not find dimension info via: "+u+`.
270
+ `,"Existing dimensions: ",t.cloneAllDimensionInfo(),`.
271
+ `,"Illegal condition:",s,`.
272
+ `)),Pe(l)),{dimIdx:c.index}},getValue:function(s){return t.retrieveValueFromItem(e,s.dimIdx)}}),i=[],n=0,o=t.count();n<o;n++)e=t.getRawDataItem(n),a.evaluate()&&i.push(e);return{data:i}}},Ny="";process.env.NODE_ENV!=="production"&&(Ny=["Valid config is like:",'{ dimension: "age", order: "asc" }','or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));var dq={type:"echarts:sort",transform:function(r){var t=r.upstream,e=r.config,a="",i=Ve(e);i.length||(process.env.NODE_ENV!=="production"&&(a="Empty `config` in sort transform."),Pe(a));var n=[];M(i,function(c){var h=c.dimension,f=c.order,d=c.parser,p=c.incomparable;if(h==null&&(process.env.NODE_ENV!=="production"&&(a='Sort transform config must has "dimension" specified.'+Ny),Pe(a)),f!=="asc"&&f!=="desc"&&(process.env.NODE_ENV!=="production"&&(a='Sort transform config must has "order" specified.'+Ny),Pe(a)),p&&p!=="min"&&p!=="max"){var v="";process.env.NODE_ENV!=="production"&&(v='incomparable must be "min" or "max" rather than "'+p+'".'),Pe(v)}if(f!=="asc"&&f!=="desc"){var g="";process.env.NODE_ENV!=="production"&&(g='order must be "asc" or "desc" rather than "'+f+'".'),Pe(g)}var m=t.getDimensionInfo(h);m||(process.env.NODE_ENV!=="production"&&(a=Ot("Can not find dimension info via: "+h+`.
273
+ `,"Existing dimensions: ",t.cloneAllDimensionInfo(),`.
274
+ `,"Illegal config:",c,`.
275
+ `)),Pe(a));var y=d?lw(d):null;d&&!y&&(process.env.NODE_ENV!=="production"&&(a=Ot("Invalid parser name "+d+`.
276
+ `,"Illegal config:",c,`.
277
+ `)),Pe(a)),n.push({dimIdx:m.index,parser:y,comparator:new cw(f,p)})});var o=t.sourceFormat;o!==Et&&o!==gr&&(process.env.NODE_ENV!=="production"&&(a='sourceFormat "'+o+'" is not supported yet'),Pe(a));for(var s=[],l=0,u=t.count();l<u;l++)s.push(t.getRawDataItem(l));return s.sort(function(c,h){for(var f=0;f<n.length;f++){var d=n[f],p=t.retrieveValueFromItem(c,d.dimIdx),v=t.retrieveValueFromItem(h,d.dimIdx);d.parser&&(p=d.parser(p),v=d.parser(v));var g=d.comparator.evaluate(p,v);if(g!==0)return g}return 0}),{data:s}}};function pq(r){r.registerTransform(fq),r.registerTransform(dq)}var vq=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.prototype.init=function(e,a,i){r.prototype.init.call(this,e,a,i),this._sourceManager=new gw(this),mw(this)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),mw(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:ta},t}(Se),gq=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.type="dataset",t}(Ke);function mq(r){r.registerComponentModel(vq),r.registerComponentView(gq)}var ua=Jr.CMD;function es(r,t){return Math.abs(r-t)<1e-5}function Ry(r){var t=r.data,e=r.len(),a=[],i,n=0,o=0,s=0,l=0;function u(I,P){i&&i.length>2&&a.push(i),i=[I,P]}function c(I,P,k,N){es(I,k)&&es(P,N)||i.push(I,P,k,N,k,N)}function h(I,P,k,N,O,R){var V=Math.abs(P-I),B=Math.tan(V/4)*4/3,H=P<I?-1:1,Y=Math.cos(I),$=Math.sin(I),U=Math.cos(P),q=Math.sin(P),Ce=Y*O+k,ce=$*R+N,he=U*O+k,ee=q*R+N,pe=O*B*H,J=R*B*H;i.push(Ce-pe*$,ce+J*Y,he+pe*q,ee-J*U,he,ee)}for(var f,d,p,v,g=0;g<e;){var m=t[g++],y=g===1;switch(y&&(n=t[g],o=t[g+1],s=n,l=o,(m===ua.L||m===ua.C||m===ua.Q)&&(i=[s,l])),m){case ua.M:n=s=t[g++],o=l=t[g++],u(s,l);break;case ua.L:f=t[g++],d=t[g++],c(n,o,f,d),n=f,o=d;break;case ua.C:i.push(t[g++],t[g++],t[g++],t[g++],n=t[g++],o=t[g++]);break;case ua.Q:f=t[g++],d=t[g++],p=t[g++],v=t[g++],i.push(n+2/3*(f-n),o+2/3*(d-o),p+2/3*(f-p),v+2/3*(d-v),p,v),n=p,o=v;break;case ua.A:var _=t[g++],w=t[g++],x=t[g++],S=t[g++],L=t[g++],C=t[g++]+L;g+=1;var T=!t[g++];f=Math.cos(L)*x+_,d=Math.sin(L)*S+w,y?(s=f,l=d,u(s,l)):c(n,o,f,d),n=Math.cos(C)*x+_,o=Math.sin(C)*S+w;for(var A=(T?-1:1)*Math.PI/2,D=L;T?D>C:D<C;D+=A){var E=T?Math.max(D+A,C):Math.min(D+A,C);h(D,E,_,w,x,S)}break;case ua.R:s=n=t[g++],l=o=t[g++],f=s+t[g++],d=l+t[g++],u(f,l),c(f,l,f,d),c(f,d,s,d),c(s,d,s,l),c(s,l,f,l);break;case ua.Z:i&&c(n,o,s,l),n=s,o=l;break}}return i&&i.length>2&&a.push(i),a}function Vy(r,t,e,a,i,n,o,s,l,u){if(es(r,e)&&es(t,a)&&es(i,o)&&es(n,s)){l.push(o,s);return}var c=2/u,h=c*c,f=o-r,d=s-t,p=Math.sqrt(f*f+d*d);f/=p,d/=p;var v=e-r,g=a-t,m=i-o,y=n-s,_=v*v+g*g,w=m*m+y*y;if(_<h&&w<h){l.push(o,s);return}var x=f*v+d*g,S=-f*m-d*y,L=_-x*x,C=w-S*S;if(L<h&&x>=0&&C<h&&S>=0){l.push(o,s);return}var T=[],A=[];Ua(r,e,i,o,.5,T),Ua(t,a,n,s,.5,A),Vy(T[0],A[0],T[1],A[1],T[2],A[2],T[3],A[3],l,u),Vy(T[4],A[4],T[5],A[5],T[6],A[6],T[7],A[7],l,u)}function yq(r,t){var e=Ry(r),a=[];t=t||1;for(var i=0;i<e.length;i++){var n=e[i],o=[],s=n[0],l=n[1];o.push(s,l);for(var u=2;u<n.length;){var c=n[u++],h=n[u++],f=n[u++],d=n[u++],p=n[u++],v=n[u++];Vy(s,l,c,h,f,d,p,v,o,t),s=p,l=v}a.push(o)}return a}function $M(r,t,e){var a=r[t],i=r[1-t],n=Math.abs(a/i),o=Math.ceil(Math.sqrt(n*e)),s=Math.floor(e/o);s===0&&(s=1,o=e);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,h=e-c;if(h>0)for(var u=0;u<h;u++)l[u%o]+=1;return l}function UM(r,t,e){for(var a=r.r0,i=r.r,n=r.startAngle,o=r.endAngle,s=Math.abs(o-n),l=s*i,u=i-a,c=l>Math.abs(u),h=$M([l,u],c?0:1,t),f=(c?s:u)/h.length,d=0;d<h.length;d++)for(var p=(c?u:s)/h[d],v=0;v<h[d];v++){var g={};c?(g.startAngle=n+f*d,g.endAngle=n+f*(d+1),g.r0=a+p*v,g.r=a+p*(v+1)):(g.startAngle=n+p*v,g.endAngle=n+p*(v+1),g.r0=a+f*d,g.r=a+f*(d+1)),g.clockwise=r.clockwise,g.cx=r.cx,g.cy=r.cy,e.push(g)}}function _q(r,t,e){for(var a=r.width,i=r.height,n=a>i,o=$M([a,i],n?0:1,t),s=n?"width":"height",l=n?"height":"width",u=n?"x":"y",c=n?"y":"x",h=r[s]/o.length,f=0;f<o.length;f++)for(var d=r[l]/o[f],p=0;p<o[f];p++){var v={};v[u]=f*h,v[c]=p*d,v[s]=h,v[l]=d,v.x+=r.x,v.y+=r.y,e.push(v)}}function YM(r,t,e,a){return r*a-e*t}function bq(r,t,e,a,i,n,o,s){var l=e-r,u=a-t,c=o-i,h=s-n,f=YM(c,h,l,u);if(Math.abs(f)<1e-6)return null;var d=r-i,p=t-n,v=YM(d,p,c,h)/f;return v<0||v>1?null:new ve(v*l+r,v*u+t)}function wq(r,t,e){var a=new ve;ve.sub(a,e,t),a.normalize();var i=new ve;ve.sub(i,r,t);var n=i.dot(a);return n}function ts(r,t){var e=r[r.length-1];e&&e[0]===t[0]&&e[1]===t[1]||r.push(t)}function xq(r,t,e){for(var a=r.length,i=[],n=0;n<a;n++){var o=r[n],s=r[(n+1)%a],l=bq(o[0],o[1],s[0],s[1],t.x,t.y,e.x,e.y);l&&i.push({projPt:wq(l,t,e),pt:l,idx:n})}if(i.length<2)return[{points:r},{points:r}];i.sort(function(g,m){return g.projPt-m.projPt});var u=i[0],c=i[i.length-1];if(c.idx<u.idx){var h=u;u=c,c=h}for(var f=[u.pt.x,u.pt.y],d=[c.pt.x,c.pt.y],p=[f],v=[d],n=u.idx+1;n<=c.idx;n++)ts(p,r[n].slice());ts(p,d),ts(p,f);for(var n=c.idx+1;n<=u.idx+a;n++)ts(v,r[n%a].slice());return ts(v,f),ts(v,d),[{points:p},{points:v}]}function ZM(r){var t=r.points,e=[],a=[];Uu(t,e,a);var i=new ge(e[0],e[1],a[0]-e[0],a[1]-e[1]),n=i.width,o=i.height,s=i.x,l=i.y,u=new ve,c=new ve;return n>o?(u.x=c.x=s+n/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+n),xq(t,u,c)}function uf(r,t,e,a){if(e===1)a.push(t);else{var i=Math.floor(e/2),n=r(t);uf(r,n[0],i,a),uf(r,n[1],e-i,a)}return a}function Sq(r,t){for(var e=[],a=0;a<t;a++)e.push(rp(r));return e}function Lq(r,t){t.setStyle(r.style),t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel}function Tq(r){for(var t=[],e=0;e<r.length;)t.push([r[e++],r[e++]]);return t}function Cq(r,t){var e=[],a=r.shape,i;switch(r.type){case"rect":_q(a,t,e),i=Te;break;case"sector":UM(a,t,e),i=Yt;break;case"circle":UM({r0:0,r:a.r,startAngle:0,endAngle:Math.PI*2,cx:a.cx,cy:a.cy},t,e),i=Yt;break;default:var n=r.getComputedTransform(),o=n?Math.sqrt(Math.max(n[0]*n[0]+n[1]*n[1],n[2]*n[2]+n[3]*n[3])):1,s=W(yq(r.getUpdatedPathProxy(),o),function(m){return Tq(m)}),l=s.length;if(l===0)uf(ZM,{points:s[0]},t,e);else if(l===t)for(var u=0;u<l;u++)e.push({points:s[u]});else{var c=0,h=W(s,function(m){var y=[],_=[];Uu(m,y,_);var w=(_[1]-y[1])*(_[0]-y[0]);return c+=w,{poly:m,area:w}});h.sort(function(m,y){return y.area-m.area});for(var f=t,u=0;u<l;u++){var d=h[u];if(f<=0)break;var p=u===l-1?f:Math.ceil(d.area/c*t);p<0||(uf(ZM,{points:d.poly},p,e),f-=p)}}i=Zt;break}if(!i)return Sq(r,t);for(var v=[],u=0;u<e.length;u++){var g=new i;g.setShape(e[u]),Lq(r,g),v.push(g)}return v}function Dq(r,t){var e=r.length,a=t.length;if(e===a)return[r,t];for(var i=[],n=[],o=e<a?r:t,s=Math.min(e,a),l=Math.abs(a-e)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,h=[o[0],o[1]],f=l,d=2;d<s;){var p=o[d-2],v=o[d-1],g=o[d++],m=o[d++],y=o[d++],_=o[d++],w=o[d++],x=o[d++];if(f<=0){h.push(g,m,y,_,w,x);continue}for(var S=Math.min(f,c-1)+1,L=1;L<=S;L++){var C=L/S;Ua(p,g,y,w,C,i),Ua(v,m,_,x,C,n),p=i[3],v=n[3],h.push(i[1],n[1],i[2],n[2],p,v),g=i[5],m=n[5],y=i[6],_=n[6]}f-=S-1}return o===r?[h,t]:[r,h]}function XM(r,t){for(var e=r.length,a=r[e-2],i=r[e-1],n=[],o=0;o<t.length;)n[o++]=a,n[o++]=i;return n}function Aq(r,t){for(var e,a,i,n=[],o=[],s=0;s<Math.max(r.length,t.length);s++){var l=r[s],u=t[s],c=void 0,h=void 0;l?u?(e=Dq(l,u),c=e[0],h=e[1],a=c,i=h):(h=XM(i||l,l),c=l):(c=XM(a||u,u),h=u),n.push(c),o.push(h)}return[n,o]}function jM(r){for(var t=0,e=0,a=0,i=r.length,n=0,o=i-2;n<i;o=n,n+=2){var s=r[o],l=r[o+1],u=r[n],c=r[n+1],h=s*c-u*l;t+=h,e+=(s+u)*h,a+=(l+c)*h}return t===0?[r[0]||0,r[1]||0]:[e/t/3,a/t/3,t]}function Mq(r,t,e,a){for(var i=(r.length-2)/6,n=1/0,o=0,s=r.length,l=s-2,u=0;u<i;u++){for(var c=u*6,h=0,f=0;f<s;f+=2){var d=f===0?c:(c+f-2)%l+2,p=r[d]-e[0],v=r[d+1]-e[1],g=t[f]-a[0],m=t[f+1]-a[1],y=g-p,_=m-v;h+=y*y+_*_}h<n&&(n=h,o=u)}return o}function Eq(r){for(var t=[],e=r.length,a=0;a<e;a+=2)t[a]=r[e-a-2],t[a+1]=r[e-a-1];return t}function Iq(r,t,e,a){for(var i=[],n,o=0;o<r.length;o++){var s=r[o],l=t[o],u=jM(s),c=jM(l);n==null&&(n=u[2]<0!=c[2]<0);var h=[],f=[],d=0,p=1/0,v=[],g=s.length;n&&(s=Eq(s));for(var m=Mq(s,l,u,c)*6,y=g-2,_=0;_<y;_+=2){var w=(m+_)%y+2;h[_+2]=s[w]-u[0],h[_+3]=s[w+1]-u[1]}if(h[0]=s[m]-u[0],h[1]=s[m+1]-u[1],e>0)for(var x=a/e,S=-a/2;S<=a/2;S+=x){for(var L=Math.sin(S),C=Math.cos(S),T=0,_=0;_<s.length;_+=2){var A=h[_],D=h[_+1],E=l[_]-c[0],I=l[_+1]-c[1],P=E*C-I*L,k=E*L+I*C;v[_]=P,v[_+1]=k;var N=P-A,O=k-D;T+=N*N+O*O}if(T<p){p=T,d=S;for(var R=0;R<v.length;R++)f[R]=v[R]}}else for(var V=0;V<g;V+=2)f[V]=l[V]-c[0],f[V+1]=l[V+1]-c[1];i.push({from:h,to:f,fromCp:u,toCp:c,rotation:-d})}return i}function cf(r){return r.__isCombineMorphing}var qM="__mOriginal_";function hf(r,t,e){var a=qM+t,i=r[a]||r[t];r[a]||(r[a]=r[t]);var n=e.replace,o=e.after,s=e.before;r[t]=function(){var l=arguments,u;return s&&s.apply(this,l),n?u=n.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function eu(r,t){var e=qM+t;r[e]&&(r[t]=r[e],r[e]=null)}function KM(r,t){for(var e=0;e<r.length;e++)for(var a=r[e],i=0;i<a.length;){var n=a[i],o=a[i+1];a[i++]=t[0]*n+t[2]*o+t[4],a[i++]=t[1]*n+t[3]*o+t[5]}}function JM(r,t){var e=r.getUpdatedPathProxy(),a=t.getUpdatedPathProxy(),i=Aq(Ry(e),Ry(a)),n=i[0],o=i[1],s=r.getComputedTransform(),l=t.getComputedTransform();function u(){this.transform=null}s&&KM(n,s),l&&KM(o,l),hf(t,"updateTransform",{replace:u}),t.transform=null;var c=Iq(n,o,10,Math.PI),h=[];hf(t,"buildPath",{replace:function(f){for(var d=t.__morphT,p=1-d,v=[],g=0;g<c.length;g++){var m=c[g],y=m.from,_=m.to,w=m.rotation*d,x=m.fromCp,S=m.toCp,L=Math.sin(w),C=Math.cos(w);fu(v,x,S,d);for(var T=0;T<y.length;T+=2){var A=y[T],D=y[T+1],E=_[T],I=_[T+1],P=A*p+E*d,k=D*p+I*d;h[T]=P*C-k*L+v[0],h[T+1]=P*L+k*C+v[1]}var N=h[0],O=h[1];f.moveTo(N,O);for(var T=2;T<y.length;){var E=h[T++],I=h[T++],R=h[T++],V=h[T++],B=h[T++],H=h[T++];N===E&&O===I&&R===B&&V===H?f.lineTo(B,H):f.bezierCurveTo(E,I,R,V,B,H),N=B,O=H}}}})}function Oy(r,t,e){if(!r||!t)return t;var a=e.done,i=e.during;JM(r,t),t.__morphT=0;function n(){eu(t,"buildPath"),eu(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},ie({during:function(o){t.dirtyShape(),i&&i(o)},done:function(){n(),a&&a()}},e)),t}function Pq(r,t,e,a,i,n){var o=16;r=i===e?0:Math.round(32767*(r-e)/(i-e)),t=n===a?0:Math.round(32767*(t-a)/(n-a));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,h=0;(r&u)>0&&(c=1),(t&u)>0&&(h=1),s+=u*u*(3*c^h),h===0&&(c===1&&(r=u-1-r,t=u-1-t),l=r,r=t,t=l)}return s}function ff(r){var t=1/0,e=1/0,a=-1/0,i=-1/0,n=W(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return t=Math.min(c,t),e=Math.min(h,e),a=Math.max(c,a),i=Math.max(h,i),[c,h]}),o=W(n,function(s,l){return{cp:s,z:Pq(s[0],s[1],t,e,a,i),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function QM(r){return Cq(r.path,r.count)}function zy(){return{fromIndividuals:[],toIndividuals:[],count:0}}function kq(r,t,e){var a=[];function i(x){for(var S=0;S<x.length;S++){var L=x[S];cf(L)?i(L.childrenRef()):L instanceof _e&&a.push(L)}}i(r);var n=a.length;if(!n)return zy();var o=e.dividePath||QM,s=o({path:t,count:n});if(s.length!==n)return console.error("Invalid morphing: unmatched splitted path"),zy();a=ff(a),s=ff(s);for(var l=e.done,u=e.during,c=e.individualDelay,h=new ma,f=0;f<n;f++){var d=a[f],p=s[f];p.parent=t,p.copyTransform(h),c||JM(d,p)}t.__isCombineMorphing=!0,t.childrenRef=function(){return s};function v(x){for(var S=0;S<s.length;S++)s[S].addSelfToZr(x)}hf(t,"addSelfToZr",{after:function(x){v(x)}}),hf(t,"removeSelfFromZr",{after:function(x){for(var S=0;S<s.length;S++)s[S].removeSelfFromZr(x)}});function g(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,eu(t,"addSelfToZr"),eu(t,"removeSelfFromZr")}var m=s.length;if(c)for(var y=m,_=function(){y--,y===0&&(g(),l&&l())},f=0;f<m;f++){var w=c?ie({delay:(e.delay||0)+c(f,m,a[f],s[f]),done:_},e):e;Oy(a[f],s[f],w)}else t.__morphT=0,t.animateTo({__morphT:1},ie({during:function(x){for(var S=0;S<m;S++){var L=s[S];L.__morphT=t.__morphT,L.dirtyShape()}u&&u(x)},done:function(){g();for(var x=0;x<r.length;x++)eu(r[x],"updateTransform");l&&l()}},e));return t.__zr&&v(t.__zr),{fromIndividuals:a,toIndividuals:s,count:m}}function Nq(r,t,e){var a=t.length,i=[],n=e.dividePath||QM;function o(d){for(var p=0;p<d.length;p++){var v=d[p];cf(v)?o(v.childrenRef()):v instanceof _e&&i.push(v)}}if(cf(r)){o(r.childrenRef());var s=i.length;if(s<a)for(var l=0,u=s;u<a;u++)i.push(rp(i[l++%s]));i.length=a}else{i=n({path:r,count:a});for(var c=r.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(c);if(i.length!==a)return console.error("Invalid morphing: unmatched splitted path"),zy()}i=ff(i),t=ff(t);for(var h=e.individualDelay,u=0;u<a;u++){var f=h?ie({delay:(e.delay||0)+h(u,a,i[u],t[u])},e):e;Oy(i[u],t[u],f)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function eE(r){return G(r[0])}function tE(r,t){for(var e=[],a=r.length,i=0;i<a;i++)e.push({one:r[i],many:[]});for(var i=0;i<t.length;i++){var n=t[i].length,o=void 0;for(o=0;o<n;o++)e[o%a].many.push(t[i][o])}for(var s=0,i=a-1;i>=0;i--)if(!e[i].many.length){var l=e[s].many;if(l.length<=1)if(s)s=0;else return e;var n=l.length,u=Math.ceil(n/2);e[i].many=l.slice(u,n),e[s].many=l.slice(0,u),s++}return e}var Rq={clone:function(r){for(var t=[],e=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a<r.count;a++){var i=rp(r.path);i.setStyle("opacity",e),t.push(i)}return t},split:null};function By(r,t,e,a,i,n){if(!r.length||!t.length)return;var o=so("update",a,i);if(!(o&&o.duration>0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;eE(r)&&(u=r,c=t),eE(t)&&(u=t,c=r);function h(m,y,_,w,x){var S=m.many,L=m.one;if(S.length===1&&!x){var C=y?S[0]:L,T=y?L:S[0];if(cf(C))h({many:[C],one:T},!0,_,w,!0);else{var A=s?ie({delay:s(_,w)},l):l;Oy(C,T,A),n(C,T,C,T,A)}}else for(var D=ie({dividePath:Rq[e],individualDelay:s&&function(O,R,V,B){return s(O+_,w)}},l),E=y?kq(S,L,D):Nq(L,S,D),I=E.fromIndividuals,P=E.toIndividuals,k=I.length,N=0;N<k;N++){var A=s?ie({delay:s(N,k)},l):l;n(I[N],P[N],y?S[N]:m.one,y?m.one:S[N],A)}}for(var f=u?u===r:r.length>t.length,d=u?tE(c,u):tE(f?t:r,[f?r:t]),p=0,v=0;v<d.length;v++)p+=d[v].many.length;for(var g=0,v=0;v<d.length;v++)h(d[v],f,g,p),g+=d[v].many.length}function Gn(r){if(!r)return[];if(G(r)){for(var t=[],e=0;e<r.length;e++)t.push(Gn(r[e]));return t}var a=[];return r.traverse(function(i){i instanceof _e&&!i.disableMorphing&&!i.invisible&&!i.ignore&&a.push(i)}),a}var rE=1e4,Vq=0,aE=1,iE=2,Oq=xe();function zq(r,t){for(var e=r.dimensions,a=0;a<e.length;a++){var i=r.getDimensionInfo(e[a]);if(i&&i.otherDims[t]===0)return e[a]}}function Bq(r,t,e){var a=r.getDimensionInfo(e),i=a&&a.ordinalMeta;if(a){var n=r.get(a.name,t);return i&&i.categories[n]||n+""}}function nE(r,t,e,a){var i=a?"itemChildGroupId":"itemGroupId",n=zq(r,i);if(n){var o=Bq(r,t,n);return o}var s=r.getRawDataItem(t),l=a?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!a)return e||r.getId(t)}function oE(r){var t=[];return M(r,function(e){var a=e.data,i=e.dataGroupId;if(a.count()>rE){process.env.NODE_ENV!=="production"&&je("Universal transition is disabled on large data > 10k.");return}for(var n=a.getIndices(),o=0;o<n.length;o++)t.push({data:a,groupId:nE(a,o,i,!1),childGroupId:nE(a,o,i,!0),divide:e.divide,dataIndex:o})}),t}function Fy(r,t,e){r.traverse(function(a){a instanceof _e&&Ze(a,{style:{opacity:0}},t,{dataIndex:e,isFrom:!0})})}function Gy(r){if(r.parent){var t=r.getComputedTransform();r.setLocalTransform(t),r.parent.remove(r)}}function rs(r){r.stopAnimation(),r.isGroup&&r.traverse(function(t){t.stopAnimation()})}function Fq(r,t,e){var a=so("update",e,t);a&&r.traverse(function(i){if(i instanceof hr){var n=m5(i);n&&i.animateFrom({style:n},a)}})}function Gq(r,t){var e=r.length;if(e!==t.length)return!1;for(var a=0;a<e;a++){var i=r[a],n=t[a];if(i.data.getId(i.dataIndex)!==n.data.getId(n.dataIndex))return!1}return!0}function sE(r,t,e){var a=oE(r),i=oE(t);function n(_,w,x,S,L){(x||_)&&w.animateFrom({style:x&&x!==_?F(F({},x.style),_.style):_.style},L)}var o=!1,s=Vq,l=Q(),u=Q();a.forEach(function(_){_.groupId&&l.set(_.groupId,!0),_.childGroupId&&u.set(_.childGroupId,!0)});for(var c=0;c<i.length;c++){var h=i[c].groupId;if(u.get(h)){s=aE;break}var f=i[c].childGroupId;if(f&&l.get(f)){s=iE;break}}function d(_,w){return function(x){var S=x.data,L=x.dataIndex;return w?S.getId(L):_?s===aE?x.childGroupId:x.groupId:s===iE?x.childGroupId:x.groupId}}var p=Gq(a,i),v={};if(!p)for(var c=0;c<i.length;c++){var g=i[c],m=g.data.getItemGraphicEl(g.dataIndex);m&&(v[m.id]=!0)}function y(_,w){var x=a[w],S=i[_],L=S.data.hostModel,C=x.data.getItemGraphicEl(x.dataIndex),T=S.data.getItemGraphicEl(S.dataIndex);if(C===T){T&&Fq(T,S.dataIndex,L);return}C&&v[C.id]||T&&(rs(T),C?(rs(C),Gy(C),o=!0,By(Gn(C),Gn(T),S.divide,L,_,n)):Fy(T,L,_))}new Ca(a,i,d(!0,p),d(!1,p),null,"multiple").update(y).updateManyToOne(function(_,w){var x=i[_],S=x.data,L=S.hostModel,C=S.getItemGraphicEl(x.dataIndex),T=Ie(W(w,function(A){return a[A].data.getItemGraphicEl(a[A].dataIndex)}),function(A){return A&&A!==C&&!v[A.id]});C&&(rs(C),T.length?(M(T,function(A){rs(A),Gy(A)}),o=!0,By(Gn(T),Gn(C),x.divide,L,_,n)):Fy(C,L,x.dataIndex))}).updateOneToMany(function(_,w){var x=a[w],S=x.data.getItemGraphicEl(x.dataIndex);if(!(S&&v[S.id])){var L=Ie(W(_,function(T){return i[T].data.getItemGraphicEl(i[T].dataIndex)}),function(T){return T&&T!==S}),C=i[_[0]].data.hostModel;L.length&&(M(L,function(T){return rs(T)}),S?(rs(S),Gy(S),o=!0,By(Gn(S),Gn(L),x.divide,C,_[0],n)):M(L,function(T){return Fy(T,C,_[0])}))}}).updateManyToMany(function(_,w){new Ca(w,_,function(x){return a[x].data.getId(a[x].dataIndex)},function(x){return i[x].data.getId(i[x].dataIndex)}).update(function(x,S){y(_[x],w[S])}).execute()}).execute(),o&&M(t,function(_){var w=_.data,x=w.hostModel,S=x&&e.getViewOfSeriesModel(x),L=so("update",x,0);S&&x.isAnimationEnabled()&&L&&L.duration>0&&S.group.traverse(function(C){C instanceof _e&&!C.animators.length&&C.animateFrom({style:{opacity:0}},L)})})}function lE(r){var t=r.getModel("universalTransition").get("seriesKey");return t||r.id}function uE(r){return G(r)?r.sort().join(","):r}function xi(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function Wq(r,t){var e=Q(),a=Q(),i=Q();M(r.oldSeries,function(o,s){var l=r.oldDataGroupIds[s],u=r.oldData[s],c=lE(o),h=uE(c);a.set(h,{dataGroupId:l,data:u}),G(c)&&M(c,function(f){i.set(f,{key:h,dataGroupId:l,data:u})})});function n(o){e.get(o)&&je("Duplicated seriesKey in universalTransition "+o)}return M(t.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),l=o.getData(),u=lE(o),c=uE(u),h=a.get(c);if(h)process.env.NODE_ENV!=="production"&&n(c),e.set(c,{oldSeries:[{dataGroupId:h.dataGroupId,divide:xi(h.data),data:h.data}],newSeries:[{dataGroupId:s,divide:xi(l),data:l}]});else if(G(u)){process.env.NODE_ENV!=="production"&&n(c);var f=[];M(u,function(v){var g=a.get(v);g.data&&f.push({dataGroupId:g.dataGroupId,divide:xi(g.data),data:g.data})}),f.length&&e.set(c,{oldSeries:f,newSeries:[{dataGroupId:s,data:l,divide:xi(l)}]})}else{var d=i.get(u);if(d){var p=e.get(d.key);p||(p={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:xi(d.data)}],newSeries:[]},e.set(d.key,p)),p.newSeries.push({dataGroupId:s,data:l,divide:xi(l)})}}}}),e}function cE(r,t){for(var e=0;e<r.length;e++){var a=t.seriesIndex!=null&&t.seriesIndex===r[e].seriesIndex||t.seriesId!=null&&t.seriesId===r[e].id;if(a)return e}}function Hq(r,t,e,a){var i=[],n=[];M(Ve(r.from),function(o){var s=cE(t.oldSeries,o);s>=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:xi(t.oldData[s]),groupIdDim:o.dimension})}),M(Ve(r.to),function(o){var s=cE(e.updatedSeries,o);if(s>=0){var l=e.updatedSeries[s].getData();n.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:xi(l),groupIdDim:o.dimension})}}),i.length>0&&n.length>0&&sE(i,n,a)}function $q(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){M(Ve(a.seriesTransition),function(i){M(Ve(i.to),function(n){for(var o=a.updatedSeries,s=0;s<o.length;s++)(n.seriesIndex!=null&&n.seriesIndex===o[s].seriesIndex||n.seriesId!=null&&n.seriesId===o[s].id)&&(o[s][Ec]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(t,e,a){var i=Oq(e);if(i.oldSeries&&a.updatedSeries&&a.optionChanged){var n=a.seriesTransition;if(n)M(Ve(n),function(d){Hq(d,i,a,e)});else{var o=Wq(i,a);M(o.keys(),function(d){var p=o.get(d);sE(p.oldSeries,p.newSeries,e)})}M(a.updatedSeries,function(d){d[Ec]&&(d[Ec]=!1)})}for(var s=t.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],c=i.oldData=[],h=0;h<s.length;h++){var f=s[h].getData();f.count()<rE&&(l.push(s[h]),u.push(s[h].get("dataGroupId")),c.push(f))}})}ye([o4]),ye([Q3]),ye([E4,X4,s6,X6,hF,nG,VG,xW,qW,n8,g8,bH,ZH,o7,C7,k7,K7,s9,b9,A9,G9,T$]),ye(X$),ye(AU),ye(JT),ye(UU),ye(w2),ye(JU),ye(sY),ye(lZ),ye(IZ),ye(Ul),ye(KZ),ye(eX),ye(vX),ye(TX),ye(kX),ye(GX),ye(tj),ye(Sj),ye(mM),ye(wM),ye(qj),ye(OM),ye(BM),ye(tq),ye(pq),ye(mq),ye($q),ye(m3);const xQ="",Uq={name:"IdmPoint",components:{LocationFilled:dP,Download:hP,Search:$y},emits:["point","more"],props:{map:{type:Object},show:{type:Boolean},ts:{type:String},timeZone:{type:Number,default:8},meteo:{type:Object}},data(){return{showMeteo:!1,meteoMarker:void 0,helper:is,activeIndex:1,showMoreDialog:!1,position:void 0,rawSearchIcon:b.markRaw($y),currentData:void 0,tableData:{},dialogTableData:{},pickedDate:void 0}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){this.map&&this.show&&this.handleBind()}},ts:{handler(){this.showMeteo&&this.initTableData()}},meteo:{handler(){this.meteo?(this.showMeteo=!0,this.initTableData(),this.handleRender()):this.showMeteo=!1}}},computed:{computeDate(){return function(r){return r?`${Ue(r).format("MMM-DD/HHmm, YYYY")}`:"-"}},computeTime(){return function(r){return r?`${Ue(r).format("MMM-DD,HHmm")}`:"-"}},computeHourL(){return function(r){return r?`${Ue(r).format("HH")}`:"-"}},computeHourZ(){return function(r){return r?`${Ue(r).utc().format("HH")}Z`:"-"}},computeWeek(){return function(r){return r?`${Ue(r).format("dddd")}`:"-"}},computeMMMDD(){return function(r){return r?`${Ue(r).format("MMM-DD")}`:"-"}},computeTimeZone(){return`(UTC ${this.timeZone<0?this.timeZone:"+"+this.timeZone})`},computeLat(){return function(r,t=4){return Re.LngLatHelper.lat2pretty(r,t).pretty}},computeLng(){return function(r,t=4){return Re.LngLatHelper.lng2pretty(r,t).pretty}},roundPrecision(){return function(r,t=4){return isNaN(r)?"-":Re.LngLatHelper.roundPrecision(r,t)}}},mounted(){},methods:{initTableData(){var r,t,e,a,i,n,o,s,l,u,c,h,f,d,p,v,g,m,y,_,w,x,S,L,C,T,A,D,E,I,P,k,N;this.currentData=(r=au.pickHourly(this.meteo,this.ts?Ue(this.ts):Ue()))==null?void 0:r[0],this.pickedDate=Ue(this.ts).clone().set({hour:0,minute:0,second:0,millisecond:0}).format(),this.tableData={hours:[],utcHours:[],weatherUrls:[],temp:[],precipProbability:[],precip1h:[],visibility:[],humidity:[],windSpeed:[],windDir:[],windGust:[],sigwaveHeight:[],sigwaveDir:[],windwaveHeight:[],windwaveDir:[],windwavePeriod:[],swellHeight:[],swellDir:[],swellPeriod:[],currentSpeed:[],currentDir:[]};for(let O=0;O<8;O++){const R=Ue(this.ts).clone().utc().add(3*O,"h").format();this.tableData.hours.push(R);const V=((t=au.pickHourly(this.meteo,R))==null?void 0:t[0])||{};this.tableData.weatherUrls.push((e=V.weather)==null?void 0:e.url),this.tableData.temp.push(this.roundPrecision((a=V.weather)==null?void 0:a.temp,0)),this.tableData.precipProbability.push(this.roundPrecision((n=(i=V.weather)==null?void 0:i.precip)==null?void 0:n.probability,0)),this.tableData.precip1h.push(this.roundPrecision((s=(o=V.weather)==null?void 0:o.precip)==null?void 0:s.sum,0)),this.tableData.visibility.push(this.roundPrecision((l=V.weather)==null?void 0:l.visibility,0)),this.tableData.windSpeed.push(this.roundPrecision((c=(u=V.weather)==null?void 0:u.wind)==null?void 0:c.kts,1)),this.tableData.windDir.push((f=(h=V.weather)==null?void 0:h.wind)==null?void 0:f.angle),this.tableData.windGust.push(this.roundPrecision((p=(d=V.weather)==null?void 0:d.wind)==null?void 0:p.gusts,1)),this.tableData.sigwaveHeight.push(this.roundPrecision((g=(v=V.wave)==null?void 0:v.sig)==null?void 0:g.height,1)),this.tableData.sigwaveDir.push((y=(m=V.wave)==null?void 0:m.sig)==null?void 0:y.degree),this.tableData.windwaveHeight.push(this.roundPrecision((w=(_=V.wave)==null?void 0:_.wd)==null?void 0:w.height,1)),this.tableData.windwaveDir.push((S=(x=V.wave)==null?void 0:x.wd)==null?void 0:S.degree),this.tableData.windwavePeriod.push(this.roundPrecision((C=(L=V.wave)==null?void 0:L.wd)==null?void 0:C.period,1)),this.tableData.swellHeight.push(this.roundPrecision((A=(T=V.wave)==null?void 0:T.swell)==null?void 0:A.height,1)),this.tableData.swellDir.push((E=(D=V.wave)==null?void 0:D.swell)==null?void 0:E.degree),this.tableData.swellPeriod.push(this.roundPrecision((P=(I=V.wave)==null?void 0:I.swell)==null?void 0:P.period,1)),this.tableData.currentSpeed.push(this.roundPrecision((k=V.current)==null?void 0:k.speed,1)),this.tableData.currentDir.push((N=V.current)==null?void 0:N.degree)}},handleSelectTab(r){this.activeIndex=r},handleBind(){var r,t;this.show?((r=this.map)==null||r.on("click",this.handleClick),this.map.getCanvas().style.cursor="pointer"):((t=this.map)==null||t.off("click",this.handleClick),this.map.getCanvas().style.cursor="grab",this.showMeteo=!1)},handleClick(r){r.originalEvent.stopPropagation();const t=r.originalEvent.target.className;if(t.indexOf("close")>-1)this.showMeteo=!1;else if(t==="more")this.$emit("more",this.meteo);else if(t==="mapboxgl-canvas")this.$emit("point",r.lngLat);else return!1},handleRender(){var r;if(this.meteo){const t=document.getElementById("point-meteo");this.meteoMarker?(r=this.meteoMarker)==null||r.setLngLat([this.meteo.lng,this.meteo.lat]):this.meteoMarker=new ha.Marker(t).setLngLat([this.meteo.lng,this.meteo.lat]).addTo(this.map)}},handleMore(){this.showMoreDialog=!0,this.initDialogTableData(),this.$nextTick(()=>{this.initEchart()})},initDialogTableData(){var r,t,e,a,i,n,o,s,l,u,c,h,f,d,p,v,g,m,y,_,w,x,S,L,C,T,A,D,E,I,P,k,N;this.dialogTableData={hours:[],utcHours:[],weatherUrls:[],temp:[],precipProbability:[],precip1h:[],visibility:[],humidity:[],windSpeed:[],windDir:[],windGust:[],sigwaveHeight:[],sigwaveDir:[],windwaveHeight:[],windwaveDir:[],windwavePeriod:[],swellHeight:[],swellDir:[],swellPeriod:[],currentSpeed:[],currentDir:[]};for(let O=0;O<24;O++){const R=Ue(this.pickedDate).clone().utc().add(O,"h").format();this.dialogTableData.hours.push(R);const V=((r=au.pickHourly(this.meteo,R))==null?void 0:r[0])||{};console.log(this.pickedDate,R,V),this.dialogTableData.weatherUrls.push((t=V.weather)==null?void 0:t.url),this.dialogTableData.temp.push(this.roundPrecision((e=V.weather)==null?void 0:e.temp,0)),this.dialogTableData.precipProbability.push(this.roundPrecision((i=(a=V.weather)==null?void 0:a.precip)==null?void 0:i.probability,0)),this.dialogTableData.precip1h.push(this.roundPrecision((o=(n=V.weather)==null?void 0:n.precip)==null?void 0:o.sum,0)),this.dialogTableData.visibility.push(this.roundPrecision((s=V.weather)==null?void 0:s.visibility,0)),this.dialogTableData.humidity.push(this.roundPrecision((l=V.weather)==null?void 0:l.rh,0)),this.dialogTableData.windSpeed.push(this.roundPrecision((c=(u=V.weather)==null?void 0:u.wind)==null?void 0:c.kts,1)),this.dialogTableData.windDir.push((f=(h=V.weather)==null?void 0:h.wind)==null?void 0:f.angle),this.dialogTableData.windGust.push(this.roundPrecision((p=(d=V.weather)==null?void 0:d.wind)==null?void 0:p.gusts,1)),this.dialogTableData.sigwaveHeight.push(this.roundPrecision((g=(v=V.wave)==null?void 0:v.sig)==null?void 0:g.height,1)),this.dialogTableData.sigwaveDir.push((y=(m=V.wave)==null?void 0:m.sig)==null?void 0:y.degree),this.dialogTableData.windwaveHeight.push(this.roundPrecision((w=(_=V.wave)==null?void 0:_.wd)==null?void 0:w.height,1)),this.dialogTableData.windwaveDir.push((S=(x=V.wave)==null?void 0:x.wd)==null?void 0:S.degree),this.dialogTableData.windwavePeriod.push(this.roundPrecision((C=(L=V.wave)==null?void 0:L.wd)==null?void 0:C.period,1)),this.dialogTableData.swellHeight.push(this.roundPrecision((A=(T=V.wave)==null?void 0:T.swell)==null?void 0:A.height,1)),this.dialogTableData.swellDir.push((E=(D=V.wave)==null?void 0:D.swell)==null?void 0:E.degree),this.dialogTableData.swellPeriod.push(this.roundPrecision((P=(I=V.wave)==null?void 0:I.swell)==null?void 0:P.period,1)),this.dialogTableData.currentSpeed.push(this.roundPrecision((k=V.current)==null?void 0:k.speed,1)),this.dialogTableData.currentDir.push((N=V.current)==null?void 0:N.degree)}},initEchart(){var p,v,g,m,y,_,w,x,S,L,C;const r=[],t=[],e=[],a=[],i=[],n=[],o=[],s=[];for(let T=0;T<7;T++){const A=Ue(this.ts).clone().add(1*T,"d");r.push(this.computeMMMDD(A)),t.push(this.computeWeek(A));const D=((p=au.pickDaily(this.meteo,A))==null?void 0:p[0])||{};e.push(this.roundPrecision((g=(v=D.weather)==null?void 0:v.temp)==null?void 0:g.min,0)),a.push(this.roundPrecision((y=(m=D.weather)==null?void 0:m.temp)==null?void 0:y.max,0)),n.push(this.roundPrecision((w=(_=D.weather)==null?void 0:_.wind)==null?void 0:w.kts,1)+" kts"),s.push(this.roundPrecision((S=(x=D.weather)==null?void 0:x.precip)==null?void 0:S.sum,0)+" mm"),i.push({symbol:"image://"+((L=D.weather)==null?void 0:L.url)}),o.push({symbol:"image://"+((C=D.weather)==null?void 0:C.url)})}const l=Math.max(...a)-Math.min(...e),u=Math.min(...e)-1.5*l,c=Math.max(...a)+2*l,h=4+.5/r.length*92+"%",f=Pz(document.getElementById("weather-chart")),d={grid:{bottom:0,top:0,left:"4%",right:"4%"},tooltip:{trigger:"none",show:!1},legend:{show:!1},xAxis:{left:0,right:0,top:"50%",height:"50%",type:"category",data:r,show:!1},singleAxis:[{left:h,right:h,type:"category",axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1},boundaryGap:!1,data:t,top:"0%",height:"2%"},{left:h,right:h,type:"category",axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1},boundaryGap:!1,data:r,top:"8%",height:"2%"},{left:h,right:h,type:"category",show:!1,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1},boundaryGap:!1,data:r,top:"27%",height:"2%"},{left:h,right:h,type:"category",axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1},boundaryGap:!1,data:n,top:"78%",height:"2%"},{left:h,right:h,type:"category",show:!1,axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1},boundaryGap:!1,data:s,top:"86%",height:"2%"}],yAxis:{type:"value",name:"温度(℃)",show:!1,min:u,max:c,axisLabel:{formatter:"{value} °C"}},series:[{singleAxisIndex:0,coordinateSystem:"singleAxis",type:"scatter",data:[],symbolSize:0},{singleAxisIndex:1,coordinateSystem:"singleAxis",type:"scatter",data:[],symbolSize:0},{singleAxisIndex:2,coordinateSystem:"singleAxis",type:"scatter",data:i,symbolSize:36},{name:"温度(℃)",type:"line",data:e,smooth:!0,itemStyle:{color:"#2a57b7"},label:{show:!0,position:[-10,12],formatter:"{c} °C",fontSize:10},markArea:{itemStyle:{color:"rgba(0, 0, 0, 0.1)"},data:[[{x:"4%"},{x:4+1/r.length*92+"%"}]]}},{name:"温度(℃)",type:"line",data:a,smooth:!0,itemStyle:{color:"#a7c4ff"},label:{show:!0,position:[-10,-12],formatter:"{c} °C",fontSize:10}},{singleAxisIndex:3,coordinateSystem:"singleAxis",type:"scatter",data:[]},{singleAxisIndex:4,coordinateSystem:"singleAxis",type:"scatter",data:[]}]};f.setOption(d),f.on("click",T=>{var A=T.dataIndex;this.pickedDate=T.name,this.initDialogTableData(),d.series[T.seriesIndex+1].markArea={itemStyle:{color:"rgba(0, 0, 0, 0.1)"},data:[[{x:4+A/r.length*92+"%"},{x:4+(A+1)/r.length*92+"%"}]]},f.setOption(d)})}}},Yq={id:"point-meteo",class:"point-meteo"},Zq={class:"meteo-box"},Xq={class:"header-box flex-between"},jq={class:"flex-center"},qq={class:"lnglat"},Kq={class:"main-box"},Jq={class:"summary-row flex-between"},Qq={class:"summary flex-center"},eK=["src"],tK={class:"temp"},rK={class:"des info"},aK={class:"flex-start"},iK={class:"flex-start"},nK={class:"flex-start"},oK={class:"date flex-col-center-end"},sK={class:""},lK={class:""},uK={class:"detail-box"},cK={class:"menu-header flex-start"},hK={key:0,class:"basic-table"},fK={class:"day"},dK={class:"hour"},pK={class:"icon"},vK=["src"],gK={class:"text"},mK={class:"text"},yK={class:"text"},_K={class:"text"},bK={key:1,class:"wave-current-table"},wK={class:"day"},xK={class:"hour"},SK={class:"icon"},LK=["src"],TK={class:"text"},CK={class:"text"},DK={class:"text"},AK={class:"text"},MK={class:"header-box flex-between"},EK={class:"bg"},IK={class:"search-box"},PK={class:"content-box"},kK={class:"title-box flex-between"},NK={class:"main-title"},RK={class:"sub-title"},VK={class:"flex-end"},OK={class:"card-box"},zK={class:"date"},BK={class:"basic-table",border:"0"},FK={class:"day"},GK={class:"hour"},WK={class:"icon"},HK=["src"],$K={class:"text"},UK={class:"text"},YK={class:"text"},ZK={class:"text"},XK={class:"text"},jK={class:"text"},qK={class:"text"},KK={class:"text"},JK={class:"wave-current-table"},QK={class:"text"},eJ={class:"text"},tJ={class:"text"},rJ={class:"text"},aJ={class:"text"},iJ={class:"text"},nJ={class:"text"},oJ={class:"text"},sJ={class:"text"};function lJ(r,t,e,a,i,n){var h,f,d,p,v,g,m,y,_,w,x,S,L,C;const o=b.resolveComponent("LocationFilled"),s=b.resolveComponent("ElIcon"),l=b.resolveComponent("ElInput"),u=b.resolveComponent("Download"),c=b.resolveComponent("ElDialog");return b.openBlock(),b.createElementBlock("div",null,[b.withDirectives(b.createElementVNode("div",Yq,[b.createElementVNode("div",Zq,[b.createElementVNode("div",Xq,[b.createElementVNode("div",jq,[b.createVNode(s,{size:"22"},{default:b.withCtx(()=>[b.createVNode(o)]),_:1}),b.createElementVNode("div",qq,b.toDisplayString(n.computeLat((h=e.meteo)==null?void 0:h.lat))+","+b.toDisplayString(n.computeLng((f=e.meteo)==null?void 0:f.lng)),1)]),b.createElementVNode("div",{class:"iconfont close",onClick:t[0]||(t[0]=T=>i.showMeteo=!1)},"")]),b.createElementVNode("div",Kq,[b.createElementVNode("div",Jq,[b.createElementVNode("div",Qq,[b.createElementVNode("img",{class:"iconfont icon",style:{"margin-right":"5px"},src:(p=(d=i.currentData)==null?void 0:d.weather)==null?void 0:p.url},null,8,eK),b.createElementVNode("div",tK,[b.createElementVNode("span",null,[b.createTextVNode(b.toDisplayString(n.roundPrecision((g=(v=i.currentData)==null?void 0:v.weather)==null?void 0:g.temp,0)),1),t[9]||(t[9]=b.createElementVNode("span",{style:{"font-size":"14px"}},"°C",-1))])]),b.createElementVNode("div",rK,[b.createElementVNode("div",aK,[t[10]||(t[10]=b.createElementVNode("label",null,"Precip : ",-1)),b.createElementVNode("span",null,b.toDisplayString(n.roundPrecision((_=(y=(m=i.currentData)==null?void 0:m.weather)==null?void 0:y.precip)==null?void 0:_.probability,2))+" mm",1)]),b.createElementVNode("div",iK,[t[11]||(t[11]=b.createElementVNode("label",null,"Visibility : ",-1)),b.createElementVNode("span",null,b.toDisplayString(n.roundPrecision((x=(w=i.currentData)==null?void 0:w.weather)==null?void 0:x.visibility,0))+" nm",1)]),b.createElementVNode("div",nK,[t[12]||(t[12]=b.createElementVNode("label",null,"Wind : ",-1)),b.createElementVNode("span",null,b.toDisplayString(n.roundPrecision((C=(L=(S=i.currentData)==null?void 0:S.weather)==null?void 0:L.wind)==null?void 0:C.kts,1))+" kts",1)])])]),b.createElementVNode("div",oK,[b.createElementVNode("div",sK,b.toDisplayString(n.computeTime(e.ts)),1),b.createElementVNode("div",lK,b.toDisplayString(n.computeTimeZone),1)])]),b.createElementVNode("div",uK,[b.createElementVNode("div",cK,[b.createElementVNode("div",{class:b.normalizeClass(["menu-item",i.activeIndex===1?"active":""]),onClick:t[1]||(t[1]=b.withModifiers(T=>n.handleSelectTab(1),["prevent"]))},"Basis",2),b.createElementVNode("div",{class:b.normalizeClass(["menu-item",i.activeIndex===2?"active":""]),onClick:t[2]||(t[2]=b.withModifiers(T=>n.handleSelectTab(2),["prevent"]))},"Wave & Current",2)]),i.activeIndex===1?(b.openBlock(),b.createElementBlock("table",hK,[b.createElementVNode("tr",fK,[t[13]||(t[13]=b.createElementVNode("th",{rowspan:"1",colspan:"1",class:"tr-title"},"Hours",-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.tableData.hours,T=>(b.openBlock(),b.createElementBlock("th",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(n.computeHourL(T)),1))),128))]),b.createElementVNode("tr",dK,[t[14]||(t[14]=b.createElementVNode("th",{rowspan:"1",colspan:"1",class:"tr-title"},null,-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.tableData.hours,T=>(b.openBlock(),b.createElementBlock("th",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(n.computeHourZ(T)),1))),128))]),b.createElementVNode("tr",pK,[t[15]||(t[15]=b.createElementVNode("th",{rowspan:"1",colspan:"1",class:"tr-title"},null,-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.tableData.weatherUrls,T=>(b.openBlock(),b.createElementBlock("th",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},[b.createElementVNode("img",{class:"iconfont weather-icon",src:T},null,8,vK)]))),128))]),b.createElementVNode("tr",gK,[t[16]||(t[16]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Temp"),b.createElementVNode("span",{class:"unit"},"°C")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.tableData.temp,T=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(T),1))),128))]),b.createElementVNode("tr",mK,[t[17]||(t[17]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Precip"),b.createElementVNode("span",{class:"unit"},"mm")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.tableData.precipProbability,T=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(T),1))),128))]),b.createElementVNode("tr",yK,[t[18]||(t[18]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Visibility"),b.createElementVNode("span",{class:"unit"},"nm")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.tableData.visibility,T=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(T),1))),128))]),b.createElementVNode("tr",_K,[t[19]||(t[19]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Wind"),b.createElementVNode("span",{class:"unit"},"kts")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.tableData.windSpeed,(T,A)=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},[b.createElementVNode("span",{class:"iconfont icon blue",style:b.normalizeStyle({display:"inline-block",transform:`rotate(${i.tableData.windDir[A]}deg)`})},"",4),b.createElementVNode("span",null,b.toDisplayString(T),1)]))),128))])])):b.createCommentVNode("",!0),i.activeIndex===2?(b.openBlock(),b.createElementBlock("table",bK,[b.createElementVNode("tr",wK,[t[20]||(t[20]=b.createElementVNode("th",{rowspan:"1",colspan:"1",class:"tr-title"},"Hours",-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.tableData.hours,T=>(b.openBlock(),b.createElementBlock("th",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(n.computeHourL(T)),1))),128))]),b.createElementVNode("tr",xK,[t[21]||(t[21]=b.createElementVNode("th",{rowspan:"1",colspan:"1",class:"td-title td-col"},null,-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.tableData.hours,T=>(b.openBlock(),b.createElementBlock("th",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(n.computeHourZ(T)),1))),128))]),b.createElementVNode("tr",SK,[t[22]||(t[22]=b.createElementVNode("th",{rowspan:"1",colspan:"1",class:"td-title td-col"},null,-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.tableData.weatherUrls,T=>(b.openBlock(),b.createElementBlock("th",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},[b.createElementVNode("img",{class:"iconfont weather-icon",src:T},null,8,LK)]))),128))]),b.createElementVNode("tr",TK,[t[23]||(t[23]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Sig Wave"),b.createElementVNode("span",{class:"unit"},"m")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.tableData.sigwaveHeight,(T,A)=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},[b.createElementVNode("span",{class:"iconfont icon blue",style:b.normalizeStyle({display:"inline-block",transform:`rotate(${i.tableData.sigwaveDir[A]}deg)`})},"",4),b.createElementVNode("span",null,b.toDisplayString(T),1)]))),128))]),b.createElementVNode("tr",CK,[t[24]||(t[24]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Wind Wave"),b.createElementVNode("span",{class:"unit"},"m")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.tableData.windwaveHeight,(T,A)=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},[b.createElementVNode("span",{class:"iconfont icon orange",style:b.normalizeStyle({display:"inline-block",transform:`rotate(${i.tableData.sigwaveDir[A]}deg)`})},"",4),b.createElementVNode("span",null,b.toDisplayString(T),1)]))),128))]),b.createElementVNode("tr",DK,[t[25]||(t[25]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Swell"),b.createElementVNode("span",{class:"unit"},"m")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.tableData.swellHeight,(T,A)=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},[b.createElementVNode("span",{class:"iconfont icon orange",style:b.normalizeStyle({display:"inline-block",transform:`rotate(${i.tableData.swellDir[A]}deg)`})},"",4),b.createElementVNode("span",null,b.toDisplayString(T),1)]))),128))]),b.createElementVNode("tr",AK,[t[26]||(t[26]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Current"),b.createElementVNode("span",{class:"unit"},"kts")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.tableData.currentSpeed,(T,A)=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},[b.createElementVNode("span",{class:"iconfont icon gray",style:b.normalizeStyle({display:"inline-block",transform:`rotate(${i.tableData.currentDir[A]}deg)`})},"",4),b.createElementVNode("span",null,b.toDisplayString(T),1)]))),128))])])):b.createCommentVNode("",!0)])]),r.$attrs.permission&i.helper.LEVEL.Prime?(b.openBlock(),b.createElementBlock("div",{key:0,class:"more",onClick:t[3]||(t[3]=b.withModifiers((...T)=>n.handleMore&&n.handleMore(...T),["prevent"]))},t[27]||(t[27]=[b.createElementVNode("span",null,"More >>",-1)]))):b.createCommentVNode("",!0)])],512),[[b.vShow,i.showMeteo]]),b.createVNode(c,{modelValue:i.showMoreDialog,"onUpdate:modelValue":t[8]||(t[8]=T=>i.showMoreDialog=T),title:"",modal:!1,fullscreen:!0,"show-close":!1,class:"more-detail-dialog","close-on-click-modal":!1},{default:b.withCtx(()=>{var T,A;return[b.createElementVNode("div",MK,[b.createElementVNode("div",EK,[b.createElementVNode("div",IK,[b.createVNode(l,{"prefix-icon":i.rawSearchIcon,placeholder:"Location search",modelValue:i.position,"onUpdate:modelValue":t[4]||(t[4]=D=>i.position=D),class:"input",clearable:"",onFocus:t[5]||(t[5]=D=>r.placeholder=""),onBlur:t[6]||(t[6]=D=>r.placeholder="")},null,8,["prefix-icon","modelValue"])]),b.createElementVNode("div",{class:"iconfont close-btn flex-end",onClick:t[7]||(t[7]=D=>i.showMoreDialog=!1)},"")])]),b.createElementVNode("div",PK,[b.createElementVNode("div",kK,[b.createElementVNode("div",null,[b.createElementVNode("div",NK,"Weather forecast for "+b.toDisplayString(n.computeLat((T=e.meteo)==null?void 0:T.lat))+","+b.toDisplayString(n.computeLng((A=e.meteo)==null?void 0:A.lng)),1),b.createElementVNode("div",RK,"At coordinates, issued "+b.toDisplayString(n.computeDate(e.ts))+" "+b.toDisplayString(n.computeTimeZone),1)]),b.createElementVNode("div",VK,[t[28]||(t[28]=b.createElementVNode("span",{class:"iconfont icon"},"",-1)),b.createVNode(s,{size:"20px",class:"icon"},{default:b.withCtx(()=>[b.createVNode(u)]),_:1})])]),t[50]||(t[50]=b.createElementVNode("div",{id:"weather-chart"},null,-1)),b.createElementVNode("div",OK,[b.createElementVNode("div",zK,b.toDisplayString(n.computeWeek(i.pickedDate))+" "+b.toDisplayString(n.computeMMMDD(i.pickedDate)),1),b.createElementVNode("table",BK,[b.createElementVNode("tr",FK,[t[29]||(t[29]=b.createElementVNode("th",{rowspan:"1",colspan:"1",class:"tr-title"},"Local time (UTC+8)",-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.hours,D=>(b.openBlock(),b.createElementBlock("th",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(n.computeHourL(D)),1))),128))]),b.createElementVNode("tr",GK,[t[30]||(t[30]=b.createElementVNode("th",{rowspan:"1",colspan:"1",class:"tr-title"},"UTC time",-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.hours,D=>(b.openBlock(),b.createElementBlock("th",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(n.computeHourZ(D)),1))),128))]),b.createElementVNode("tr",WK,[t[31]||(t[31]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},"Weather",-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.weatherUrls,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},[D?(b.openBlock(),b.createElementBlock("img",{key:0,class:"iconfont weather-icon",src:D},null,8,HK)):b.createCommentVNode("",!0)]))),128))]),b.createElementVNode("tr",$K,[t[32]||(t[32]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Temperature"),b.createElementVNode("span",{class:"unit"},"°C")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.temp,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(D),1))),128))]),b.createElementVNode("tr",UK,[t[33]||(t[33]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Precipitation Probability"),b.createElementVNode("span",{class:"unit"},"%")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.precipProbability,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(D),1))),128))]),b.createElementVNode("tr",YK,[t[34]||(t[34]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Precipitation 1h"),b.createElementVNode("span",{class:"unit"},"mm")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.precip1h,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(D),1))),128))]),b.createElementVNode("tr",ZK,[t[35]||(t[35]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Visibility"),b.createElementVNode("span",{class:"unit"},"nm")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.visibility,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(D),1))),128))]),b.createElementVNode("tr",XK,[t[36]||(t[36]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Relative Humidity"),b.createElementVNode("span",{class:"unit"},"%")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.humidity,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(D),1))),128))]),b.createElementVNode("tr",jK,[t[37]||(t[37]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},"Wind direction",-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.windDir,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},[D?(b.openBlock(),b.createElementBlock("span",{key:0,class:"iconfont icon",style:b.normalizeStyle({display:"inline-block",transform:`rotate(${D}deg)`})},"",4)):b.createCommentVNode("",!0)]))),128))]),b.createElementVNode("tr",qK,[t[38]||(t[38]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Wind speed"),b.createElementVNode("span",{class:"unit"},"kts")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.windSpeed,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(D),1))),128))]),b.createElementVNode("tr",KK,[t[39]||(t[39]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Wind gust"),b.createElementVNode("span",{class:"unit"},"kts")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.windGust,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(D),1))),128))])]),t[49]||(t[49]=b.createElementVNode("div",{style:{"text-align":"center",padding:"3px"}},"Wave & Current",-1)),b.createElementVNode("table",JK,[b.createElementVNode("tr",QK,[t[40]||(t[40]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Wind wave height"),b.createElementVNode("span",{class:"unit"},"m")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.windwaveHeight,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(D),1))),128))]),b.createElementVNode("tr",eJ,[t[41]||(t[41]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},"Wind wave direction",-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.windwaveDir,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},[D?(b.openBlock(),b.createElementBlock("span",{key:0,class:"iconfont icon",style:b.normalizeStyle({display:"inline-block",transform:`rotate(${D}deg)`})},"",4)):b.createCommentVNode("",!0)]))),128))]),b.createElementVNode("tr",tJ,[t[42]||(t[42]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Wind wave period"),b.createElementVNode("span",{class:"unit"},"s")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.windwavePeriod,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(D),1))),128))]),b.createElementVNode("tr",rJ,[t[43]||(t[43]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Swell height"),b.createElementVNode("span",{class:"unit"},"m")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.swellHeight,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(D),1))),128))]),b.createElementVNode("tr",aJ,[t[44]||(t[44]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},"Swell direction",-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.swellDir,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},[D?(b.openBlock(),b.createElementBlock("span",{key:0,class:"iconfont icon",style:b.normalizeStyle({display:"inline-block",transform:`rotate(${D}deg)`})},"",4)):b.createCommentVNode("",!0)]))),128))]),b.createElementVNode("tr",iJ,[t[45]||(t[45]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Swell period"),b.createElementVNode("span",{class:"unit"},"s")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.swellPeriod,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(D),1))),128))]),b.createElementVNode("tr",nJ,[t[46]||(t[46]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Sig wave height"),b.createElementVNode("span",{class:"unit"},"m")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.sigwaveHeight,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(D),1))),128))]),b.createElementVNode("tr",oJ,[t[47]||(t[47]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},"Current direction",-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.currentDir,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},[D?(b.openBlock(),b.createElementBlock("span",{key:0,class:"iconfont icon",style:b.normalizeStyle({display:"inline-block",transform:`rotate(${D}deg)`})},"",4)):b.createCommentVNode("",!0)]))),128))]),b.createElementVNode("tr",sJ,[t[48]||(t[48]=b.createElementVNode("td",{rowspan:"1",colspan:"1",class:"tr-title"},[b.createTextVNode("Current speed"),b.createElementVNode("span",{class:"unit"},"kts")],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(i.dialogTableData.currentSpeed,D=>(b.openBlock(),b.createElementBlock("td",{rowspan:"1",colspan:"1",class:"td-title td-col",key:Math.random()},b.toDisplayString(D),1))),128))])])])])]}),_:1},8,["modelValue"])])}const uJ=ze(Uq,[["render",lJ],["__scopeId","data-v-06b5d63e"]]),cJ={name:"IdmWarZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"war-zone-source",zoneLayer:"war-zone-layer",zoneLabelLayer:"war-zone-label-layer"}},watch:{zone:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.zone&&(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-color":"#f44336","fill-opacity":.4}},this.beforeLayer),this.map.addLayer({id:this.zoneLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":1,"line-color":"#f44336"}},this.beforeLayer),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-1]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLayer+"-border")&&this.map.removeLayer(this.zoneLayer+"-border"),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function hJ(r,t,e,a,i,n){return b.openBlock(),b.createElementBlock("div")}const fJ=ze(cJ,[["render",hJ]]),dJ={name:"IdmGmdssArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"gmdss-area-source",areaLayer:"gmdss-area-layer",areaLabelLayer:"gmdss-area-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["match",["get","val"],"AreaI","#EB8996","AreaII","#6F448B","AreaIII","#3E8BD3","AreaIV","#5EBCC4","AreaV","#00AAE7","AreaVI","#9CCE6D","AreaVII","#F4AE00","AreaVIII","#EF9A85","AreaIX","#00AAA7","AreaX","#7AC49F","AreaXI","#DFDFDF","AreaXII","#FFF974","AreaXIII","#EF9A85","AreaXIV","#86A2D1","AreaXV","#EC8972","AreaXVI","#EAC2DA","AreaXVII","#B9C8E7","AreaXVIII","#BBA1C8","AreaXIX","#FAE0BD","AreaXX","#DBECC8","AreaXXI","#D496AF","#ffffff"]}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":12,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-opacity":.8,"text-color":"#000"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function pJ(r,t,e,a,i,n){return b.openBlock(),b.createElementBlock("div")}const vJ=ze(dJ,[["render",pJ]]),gJ={name:"IdmEcaZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"eca-zone-source",zoneLayer:"eca-zone-layer",zoneLabelLayer:"eca-zone-label-layer"}},watch:{zone:{handler(){this.zone?this.handleRender():this.handleClear()}}},methods:{handleRender(){var r;this.map?(this.handleClear(),this.zone&&(this.map.getSource(this.source)?(r=this.map)==null||r.getSource(this.source).setData(this.zone):(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":"#05f324"}}),this.map.addLayer({id:this.zoneLayer+"-border",type:"line",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-color":"#04c021","line-width":1,"line-opacity":1}},this.beforeLayer),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-max-width":16,"text-justify":"left","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}})))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLayer+"-border")&&this.map.removeLayer(this.zoneLayer+"-border"),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function mJ(r,t,e,a,i,n){return b.openBlock(),b.createElementBlock("div")}const yJ=ze(gJ,[["render",mJ]]),SQ="",_J={name:"IdmAlertZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"alert-zone-source",polygonLayer:"alert-zone-polygon-layer",polygonLabelLayer:"alert-zone-polygon-label-layer",lineLayer:"alert-zone-line-layer",lineLabelLayer:"alert-zone-line-label-layer",pointLayer:"alert-zone-point-layer",showZone:!1,form:{}}},watch:{zone:{handler(){var r,t;this.zone?(this.handleRender(),(r=this.map)==null||r.on("click",[this.polygonLabelLayer,this.lineLabelLayer,this.pointLayer],this.handleClick)):(this.handleClear(),(t=this.map)==null||t.off("click",[this.polygonLabelLayer,this.lineLabelLayer,this.pointLayer],this.handleClick))}}},methods:{handleClick(r){var a;const t=r.features[0],e=(a=this.zone)==null?void 0:a.features.filter(i=>{var n;return i.properties.id===((n=t==null?void 0:t.properties)==null?void 0:n.id)})[0];if(e){this.showZone=!0,this.form={...e.properties};const i=document.getElementById("idm-gl3-zone-info");this.marker?this.marker.setLngLat([r.lngLat.lng,r.lngLat.lat]):this.marker=new ha.Marker(i).setLngLat([r.lngLat.lng,r.lngLat.lat]).setOffset([0,0]).addTo(this.map)}},handleRender(){var r;this.map?(this.handleClear(),this.zone&&(this.map.getSource(this.source)?(r=this.map)==null||r.getSource(this.source).setData(this.zone):(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.polygonLayer,type:"fill",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"fill-outline-color":"#d57d02","fill-opacity":.4,"fill-color":"#d57d02"}}),this.map.addLayer({id:this.polygonLayer+"-border",type:"line",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-width":1,"line-color":"#d57d02"}}),this.map.addLayer({id:this.lineLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["!=","disabled",!0]],paint:{"line-color":"#d57d02","line-width":2}}),this.map.addLayer({id:this.polygonLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-image":"alert","icon-size":.08,"icon-allow-overlap":!0,"icon-rotation-alignment":"viewport"},paint:{"icon-opacity":.8}}),this.map.addLayer({id:this.lineLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","LineString"],["!=","disabled",!0]],layout:{"symbol-placement":"line-center","icon-image":"alert","icon-size":.08,"icon-allow-overlap":!0,"icon-rotation-alignment":"viewport"},paint:{"icon-opacity":.8}}),this.map.addLayer({id:this.pointLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-image":"alert","icon-size":.08},paint:{"icon-opacity":.8}})))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.polygonLayer)&&this.map.removeLayer(this.polygonLayer),this.map.getLayer(this.polygonLayer+"-border")&&this.map.removeLayer(this.polygonLayer+"-border"),this.map.getLayer(this.polygonLabelLayer)&&this.map.removeLayer(this.polygonLabelLayer),this.map.getLayer(this.lineLayer)&&this.map.removeLayer(this.lineLayer),this.map.getLayer(this.lineLabelLayer)&&this.map.removeLayer(this.lineLabelLayer),this.map.getLayer(this.pointLayer)&&this.map.removeLayer(this.pointLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},bJ={id:"idm-gl3-zone-info"},wJ=["innerHTML"];function xJ(r,t,e,a,i,n){var o;return b.withDirectives((b.openBlock(),b.createElementBlock("div",bJ,[b.createElementVNode("div",{class:"iconfont close",onClick:t[0]||(t[0]=s=>i.showZone=!1)},""),b.createElementVNode("div",{class:"rich-context",innerHTML:(o=i.form)==null?void 0:o.name},null,8,wJ)],512)),[[b.vShow,i.showZone]])}const SJ=ze(_J,[["render",xJ]]),LQ="",LJ={name:"IdmPort",props:{map:{type:Object},port:{type:Object},beforeLayer:{type:String}},emits:["port"],data(){return{source:"port-source",layer:"port-layer",showPort:!1,form:{},marker:void 0}},computed:{computeLat(){return function(r){return Re.LngLatHelper.lat2pretty(r,4).pretty}},computeLng(){return function(r){return Re.LngLatHelper.lng2pretty(r,4).pretty}}},watch:{port:{handler(){var r,t;this.port?(this.handleRender(),(r=this.map)==null||r.on("click",[this.layer],this.handleClick)):(this.handleClear(),(t=this.map)==null||t.off("click",[this.layer],this.handleClick))}}},methods:{handleClick(r){var a;const t=r.features[0],e=(a=this.port)==null?void 0:a.features.filter(i=>{var n;return i.properties.id===((n=t==null?void 0:t.properties)==null?void 0:n.id)})[0];if(e){this.showPort=!0,this.form={...e.properties},this.form.lng=e.geometry.coordinates[0],this.form.lat=e.geometry.coordinates[1];const i=document.getElementById("port-info");this.marker?this.marker.setLngLat([r.lngLat.lng,r.lngLat.lat]):this.marker=new ha.Marker(i).setLngLat([r.lngLat.lng,r.lngLat.lat]).setOffset([0,-85]).addTo(this.map)}},handleEmit(){this.$emit("port",this.form)},handleRender(){var r;this.map?this.port&&(this.map.getSource(this.source)?(r=this.map)==null||r.getSource(this.source).setData(this.port):(this.map.addSource(this.source,{type:"geojson",data:this.port}),this.map.addLayer({id:this.layer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"port","text-anchor":"left","text-field":"{name}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[1,0]},paint:{"text-color":"rgba(0, 0, 0, 0.8)","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.showPort=!1,this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},TJ={id:"port-info"},CJ={class:"port-box"},DJ={class:"flex-start"},AJ={class:"flex-start"},MJ={class:"flex-start"},EJ={class:"flex-start",style:{"align-items":"flex-start"}};function IJ(r,t,e,a,i,n){return b.withDirectives((b.openBlock(),b.createElementBlock("div",TJ,[b.createElementVNode("div",{class:"close iconfont",onClick:t[0]||(t[0]=o=>i.showPort=!1)},""),b.createElementVNode("div",CJ,[b.createElementVNode("div",DJ,[t[2]||(t[2]=b.createElementVNode("label",null,"Name : ",-1)),b.createElementVNode("span",{onClick:t[1]||(t[1]=(...o)=>n.handleEmit&&n.handleEmit(...o))},b.toDisplayString(i.form.name),1)]),b.createElementVNode("div",AJ,[t[3]||(t[3]=b.createElementVNode("label",null,"Position : ",-1)),b.createElementVNode("span",null,b.toDisplayString(n.computeLat(i.form.lat))+", "+b.toDisplayString(n.computeLng(i.form.lng)),1)]),b.createElementVNode("div",MJ,[t[4]||(t[4]=b.createElementVNode("label",null,"LoCode : ",-1)),b.createElementVNode("span",null,b.toDisplayString(i.form.loCode||"-"),1)]),b.createElementVNode("div",EJ,[t[5]||(t[5]=b.createElementVNode("label",null,"Region : ",-1)),b.createElementVNode("span",null,b.toDisplayString(i.form.zoneName||"-"),1)])])],512)),[[b.vShow,i.showPort]])}const PJ=ze(LJ,[["render",IJ],["__scopeId","data-v-c07e4c45"]]),kJ={name:"IdmLoadLine",props:{map:{type:Object},line:{type:Object},beforeLayer:{type:String}},data(){return{source:"load-line-source",lineLayer:"load-line-layer",lineLabelLayer:"load-line-label-layer"}},watch:{line:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.line&&(this.map.addSource(this.source,{type:"geojson",data:this.line}),this.map.addLayer({id:this.lineLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.75,"fill-color":["match",["get","val"],"LLGreen","#A0C0C0","LLRed","#F5A39D","LLBlue","#6B94E4","#ffffff"]}},this.beforeLayer),this.map.addLayer({id:this.lineLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{lbl} (Length < {shipLength}, {start} - {end})","text-rotation-alignment":"viewport","text-offset":[0,1],"text-size":10,"text-allow-overlap":!0},paint:{"text-opacity":.8}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.lineLayer)&&this.map.removeLayer(this.lineLayer),this.map.getLayer(this.lineLabelLayer)&&this.map.removeLayer(this.lineLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function NJ(r,t,e,a,i,n){return b.openBlock(),b.createElementBlock("div")}const RJ=ze(kJ,[["render",NJ]]),VJ={name:"IdmTimezone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"time-zone-source",zoneLayer:"time-zone-layer",zoneLabelLayer:"time-zone-label-layer"}},watch:{zone:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.zone&&(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["match",["get","offSet"],"-11.5","rgba(255,0,0,0.4)","-11","rgba(0,255,0,0.3)","-10.5","rgba(0,255,0,0.3)","-10","rgba(0,0,255,0.3)","-9.5","rgba(0,0,255,0.3)","-9","rgba(255,0,0,0.4)","-8.5","rgba(255,0,0,0.4)","-8","rgba(0,255,0,0.3)","-7.5","rgba(0,255,0,0.3)","-7","rgba(0,0,255,0.3)","-6.5","rgba(0,0,255,0.3)","-6","rgba(255,0,0,0.4)","-5.5","rgba(255,0,0,0.4)","-5","rgba(0,255,0,0.3)","-4.5","rgba(0,255,0,0.3)","-4","rgba(0,0,255,0.3)","-3.5","rgba(0,0,255,0.3)","-3","rgba(255,0,0,0.4)","-2.5","rgba(255,0,0,0.4)","-2","rgba(0,255,0,0.3)","-1.5","rgba(0,255,0,0.3)","-1","rgba(0,0,255,0.3)","-0.5","rgba(0,0,255,0.3)","+0","rgba(255,0,0,0.4)","+0.5","rgba(255,0,0,0.4)","+1","rgba(0,255,0,0.3)","+1.5","rgba(0,255,0,0.3)","+2","rgba(0,0,255,0.3)","+2.5","rgba(0,0,255,0.3)","+3","rgba(255,0,0,0.4)","+3.5","rgba(255,0,0,0.4)","+4","rgba(0,255,0,0.3)","+4.5","rgba(0,255,0,0.3)","+5","rgba(0,0,255,0.3)","+5.5","rgba(0,0,255,0.3)","+6","rgba(255,0,0,0.4)","+6.5","rgba(255,0,0,0.4)","+7","rgba(0,255,0,0.3)","+7.5","rgba(0,255,0,0.3)","+8","rgba(0,0,255,0.3)","+8.5","rgba(0,0,255,0.3)","+9","rgba(255,0,0,0.4)","+9.5","rgba(255,0,0,0.4)","+10","rgba(0,255,0,0.3)","+10.5","rgba(0,255,0,0.3)","+11","rgba(0,0,255,0.3)","+11.5","rgba(0,0,255,0.3)","rgba(255,0,0,0.4)"]}}),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{offSet}","text-rotation-alignment":"viewport","text-size":12,"text-offset":[0,1]},paint:{"text-opacity":.8,"text-color":"#fff"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function OJ(r,t,e,a,i,n){return b.openBlock(),b.createElementBlock("div")}const zJ=ze(VJ,[["render",OJ]]),BJ={name:"IdmVoluntaryReportingArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"vra-source",areaLayer:"vra-layer",areaLabelLayer:"vra-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":"#9f30f9"}},this.beforeLayer),this.map.addLayer({id:this.areaLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":1,"line-color":"#9f30f9"}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLayer+"-border")&&this.map.removeLayer(this.areaLayer+"-border"),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function FJ(r,t,e,a,i,n){return b.openBlock(),b.createElementBlock("div")}const GJ=ze(BJ,[["render",FJ]]),WJ={name:"IdmSpecialArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"special-area-source",areaLayer:"special-area-layer",areaLabelLayer:"special-area-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.area.features.forEach(r=>{r.geometry.type==="Polygon"&&r.geometry.coordinates.forEach(t=>Re.LngLatHelper.convertToMonotonicLng2(t))}),this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":["match",["get","val"],"DefaultStyle","rgb(0,0,0)","JWCriskArea","rgb(0,0,0)","rgb(0,0,0)"]}},this.beforeLayer),this.map.addLayer({id:this.areaLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":.4,"line-color":"rgb(0,0,0)"}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLayer+"-border")&&this.map.removeLayer(this.areaLayer+"-border"),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function HJ(r,t,e,a,i,n){return b.openBlock(),b.createElementBlock("div")}const $J=ze(WJ,[["render",HJ]]),UJ={name:"IdmTerminator",props:{map:{type:Object},area:{type:Object}},data(){return{source:"terminator-source",layer:"terminator-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.layer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":"rgba(0, 0, 0, 0.4)"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function YJ(r,t,e,a,i,n){return b.openBlock(),b.createElementBlock("div")}const ZJ=ze(UJ,[["render",YJ]]),TQ="",XJ={name:"IdmLatLng",props:{map:{type:Object},show:{type:Boolean},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{lngLat:void 0,source:"idm-lat-lng-source",layer:"idm-lat-lng-layer",labelLayer:"idm-lat-lng-label-layer",right:10}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){var r;this.map&&((r=this.map)==null||r.on("mousemove",this.handleMouseMove))},immediate:!0},toggleVersion:{handler(){var r,t;this.right=(((r=document.getElementsByClassName("legend-bars")[0])==null?void 0:r.clientWidth)||-10)+(((t=document.getElementsByClassName("right-bar")[0])==null?void 0:t.clientWidth)||0)+20},immediate:!0}},methods:{handleBind(){var r,t;this.show?((r=this.map)==null||r.on("zoomend",this.handleZoomEnd),this.handleRender()):(this.handleClear(),(t=this.map)==null||t.off("zoomend",this.handleZoomEnd))},handleMouseMove(r){const t=r.lngLat,e=Re.LngLatHelper.lng2pretty(t.lng,2),a=Re.LngLatHelper.lat2pretty(t.lat,2);this.lngLat={lng:e,lat:a}},handleComputeLatLngs(){var a;const r=(a=this.map)==null?void 0:a.getZoom();console.log(r);let t=30;r>4?t=10:r>3&&(t=15);const e=[];for(let i=-60;i<90;i+=t)e.push({type:"Feature",geometry:{type:"LineString",coordinates:[[-180,i],[180,i]]}});for(let i=-180;i<180;i+=t)e.push({type:"Feature",geometry:{type:"LineString",coordinates:[[i,-90],[i,90]]}});for(let i=180;i>-180;i-=t)for(let n=-60;n<90;n+=t)e.push({type:"Feature",geometry:{type:"Point",coordinates:[i,n]},properties:{val:`${n>0?n+" N":n===0?n:n*-1+" S"}, ${i>0?i+" E":i*-1+" W"}`}});return e},handleZoomEnd(){var t;const r=this.handleComputeLatLngs();(t=this.map)==null||t.getSource(this.source).setData(be.featureCollection(r))},handleRender(){if(this.map){const r=this.handleComputeLatLngs();this.map.addSource(this.source,{type:"geojson",data:{type:"FeatureCollection",features:r}}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"rgba(0, 0, 0, 0.3)","line-width":1}}),this.map.addLayer({id:this.labelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{val}","text-rotation-alignment":"viewport","text-offset":[0,1],"text-size":10,"text-allow-overlap":!0},paint:{"text-opacity":.8}})}},handleClear(){var r,t,e,a,i,n;(r=this.map)!=null&&r.getLayer(this.layer)&&((t=this.map)==null||t.removeLayer(this.layer)),(e=this.map)!=null&&e.getLayer(this.labelLayer)&&((a=this.map)==null||a.removeLayer(this.labelLayer)),(i=this.map)!=null&&i.getSource(this.source)&&((n=this.map)==null||n.removeSource(this.source))}}};function jJ(r,t,e,a,i,n){return i.lngLat?(b.openBlock(),b.createElementBlock("div",{key:0,class:"lat-lng-tip",style:b.normalizeStyle({right:i.right+"px",bottom:e.bottom})},[b.createElementVNode("span",null,b.toDisplayString(i.lngLat.lat.pretty),1),t[0]||(t[0]=b.createElementVNode("span",null,", ",-1)),b.createElementVNode("span",null,b.toDisplayString(i.lngLat.lng.pretty),1)],4)):b.createCommentVNode("",!0)}const Wy=ze(XJ,[["render",jJ],["__scopeId","data-v-73241fe7"]]),qJ={name:"IdmMeasure",props:{map:{type:Object},show:{type:Boolean}},data(){return{geojson:[],source:"measure-source",layer:"measure-layer",labelLayer:"measure-label-layer",tmpSource:"measure-tmp-source",tmpLayer:"measure-tmp-layer",tmpLabelLayer:"measure-tmp-label-layer",closeMarkers:{},pointMarkers:{},tipMarker:void 0,contextmenu:void 0,navigation:"RL"}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){this.map&&this.handleBind()}}},methods:{handleBind(){var r,t,e,a,i,n,o,s,l,u;if(this.show)(r=this.map)==null||r.getCanvas().addEventListener("keydown",this.handleKeydown),(t=this.map)==null||t.on("mousemove",this.handleMove),(e=this.map)==null||e.on("dblclick",this.handleDblClick),(a=this.map)==null||a.on("click",this.handleClick),(i=this.map)==null||i.on("contextmenu",this.handleContextmenu),this.map&&(this.map.getCanvas().style.cursor="crosshair");else{(n=this.map)==null||n.getCanvas().removeEventListener("keydown",this.handleKeydown),(o=this.map)==null||o.off("mousemove",this.handleMove),(s=this.map)==null||s.off("dblclick",this.handleDblClick),(l=this.map)==null||l.off("click",this.handleClick),(u=this.map)==null||u.off("contextmenu",this.handleContextmenu);for(const c of this.geojson)this.handleClear(c,!0);this.geojson=[],this.map&&(this.map.getCanvas().style.cursor="grab")}},handleKeydown(r){if(r.key==="Shift"){this.navigation=this.navigation==="RL"?"GC":"RL";const e=this.geojson.at(-1).features.filter(a=>a.geometry.type==="Point");e.length&&(e.at(-1).properties.mode=this.navigation)}},handleDrag(r){var e,a,i,n,o,s,l,u,c,h;const t=(a=(e=r.target)==null?void 0:e._element)==null?void 0:a.id;if((t==null?void 0:t.split("-").length)===2){const f=this.geojson.filter(g=>g.id===t.split("-")[0])[0];this.pointMarkers[f.id].filter(g=>{var m;return((m=g._element)==null?void 0:m.id)===t})[0].setLngLat([(n=(i=r.target)==null?void 0:i._lngLat)==null?void 0:n.lng,(s=(o=r.target)==null?void 0:o._lngLat)==null?void 0:s.lat]);let p;f.features.forEach((g,m)=>{if(g.geometry.type==="Point"&&g.properties.id==t.split("-")[1]){p=m;return}});const v=f.features.filter(g=>g.geometry.type==="Point");this.handleTmpPointUpdate(f,v[p-1],{lng:(u=(l=r.target)==null?void 0:l._lngLat)==null?void 0:u.lng,lat:(h=(c=r.target)==null?void 0:c._lngLat)==null?void 0:h.lat,properties:v[p].properties},p===v.length-1?void 0:v[p+1])}},handleDragEnd(r){var e,a,i,n,o,s,l,u,c,h;const t=(a=(e=r.target)==null?void 0:e._element)==null?void 0:a.id;if((t==null?void 0:t.split("-").length)===2){const f=this.geojson.filter(v=>v.id===t.split("-")[0])[0];this.pointMarkers[f.id].filter(v=>{var g;return((g=v._element)==null?void 0:g.id)===t})[0].setLngLat([(n=(i=r.target)==null?void 0:i._lngLat)==null?void 0:n.lng,(s=(o=r.target)==null?void 0:o._lngLat)==null?void 0:s.lat]);const p=f.features.filter(v=>v.geometry.type==="Point"&&v.properties.id==t.split("-")[1])[0];p.geometry.coordinates=[(u=(l=r.target)==null?void 0:l._lngLat)==null?void 0:u.lng,(h=(c=r.target)==null?void 0:c._lngLat)==null?void 0:h.lat],f.features=f.features.filter(v=>v.geometry.type==="Point"),this.handlePointUpdate(f)}},handleContextmenu(r){var e,a,i,n;r.preventDefault(),(e=this.contextmenu)==null||e.remove();const t=(n=(i=(a=r.originalEvent)==null?void 0:a.target)==null?void 0:i.parentElement)==null?void 0:n.id;if((t==null?void 0:t.split("-").length)===2){const s=this.geojson.filter(l=>l.id===t.split("-")[0])[0].features.filter(l=>l.geometry.type==="Point");if(s.length>2&&s.filter(u=>u.properties.id===(t==null?void 0:t.split("-")[1]))[0]){const u=document.createElement("div");u.className="point-contextmenu-marker",u.innerHTML=`<span id="del-${t}" class="del-point">Del</span>`,this.contextmenu=new ha.Marker(u).setOffset([24,0]).setLngLat([r.lngLat.lng,r.lngLat.lat]).addTo(this.map)}}},handleClick(r){var e,a,i,n,o;(e=this.contextmenu)==null||e.remove();const t=r.originalEvent.target.className;if(t==="marker-close"){const s=(i=(a=r.originalEvent)==null?void 0:a.srcElement)==null?void 0:i.id,l=this.geojson.filter(u=>u.id===s)[0];l&&this.handleClear(l,!0),this.geojson=this.geojson.filter(u=>u.id!==s)}else if(t==="del-point"){const s=(o=(n=r.originalEvent.target.id)==null?void 0:n.replace("del-",""))==null?void 0:o.split("-"),l=this.geojson.filter(u=>u.id===s[0])[0];l.features=l.features.filter(u=>u.geometry.type==="Point"&&u.properties.id!==s[1]),this.handlePointUpdate(l)}else if(t!=="marker-label"){let s=this.geojson.at(-1);s||(s=be.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(s)),s.features=s.features.filter(u=>u.geometry.type==="Point");const l=be.feature({type:"Point",coordinates:[r.lngLat.lng,r.lngLat.lat]},{id:new Date().getTime().toString(),mode:this.navigation});s.features.push(l),this.handlePointUpdate(s)}},handlePointUpdate(r){const t=r.features;if(t.length>1){let e=0;const a=[];for(let i=1;i<t.length;i++){const n=t[i-1],o=t[i],s=n.properties,l={lng:n.geometry.coordinates[0],lat:n.geometry.coordinates[1]},u={lng:o.geometry.coordinates[0],lat:o.geometry.coordinates[1]},c=Re.LaneHelper.calculateDistance(l,u,s.mode==="RL",2),h=Re.LaneHelper.calculateBearing(l,u,s.mode==="RL",2);e=Re.LngLatHelper.roundPrecision(e+c,2);let f;s.mode==="RL"?f=Re.LngLatHelper.convertToMonotonicLng([l,u]):f=Re.LngLatHelper.convertToMonotonicLng(Re.LaneHelper.interpolateCoordinates(l,u,200));const d=be.lineString(f.map(p=>[p.lng,p.lat]));d.properties.dist=c,d.properties.bearing=h,d.properties.total=e,a.push(d)}t.push(...a),r.total=e}return this.handleRender(r),r},handleTmpPointUpdate(r,t,e,a){const i=be.featureCollection([]);let n,o;if(t){const l=t.properties,u={lng:t.geometry.coordinates[0],lat:t.geometry.coordinates[1]},c={lng:e.lng,lat:e.lat};n=Re.LaneHelper.calculateDistance(u,c,l.mode==="RL",2),o=Re.LaneHelper.calculateBearing(u,c,l.mode==="RL",2);let h;l.mode==="RL"?h=Re.LngLatHelper.convertToMonotonicLng([u,c]):h=Re.LngLatHelper.convertToMonotonicLng(Re.LaneHelper.interpolateCoordinates(u,c,200));const f=be.lineString(h.map(d=>[d.lng,d.lat]));f.properties.dist=n,f.properties.bearing=o,i.features.push(f)}if(a){const l=e.properties,u=e,c={lng:a.geometry.coordinates[0],lat:a.geometry.coordinates[1]};n=Re.LaneHelper.calculateDistance(u,c,l.mode==="RL",2),o=Re.LaneHelper.calculateBearing(u,c,l.mode==="RL",2);let h;l.mode==="RL"?h=Re.LngLatHelper.convertToMonotonicLng([u,c]):h=Re.LngLatHelper.convertToMonotonicLng(Re.LaneHelper.interpolateCoordinates(u,c,200));const f=be.lineString(h.map(d=>[d.lng,d.lat]));f.properties.dist=n,f.properties.bearing=o,i.features.push(f)}this.map.getSource(this.tmpSource)?this.map.getSource(this.tmpSource).setData(i):this.map.addSource(this.tmpSource,{type:"geojson",data:i}),this.map.getLayer(this.tmpLayer)||this.map.addLayer({id:this.tmpLayer,type:"line",source:this.tmpSource,filter:["==","$type","LineString"],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#F44336","line-width":2,"line-opacity":1,"line-dasharray":[3,2]}}),this.map.getLayer(this.tmpLabelLayer)||this.map.addLayer({id:this.tmpLabelLayer,type:"symbol",source:this.tmpSource,filter:["==","$type","LineString"],layout:{"symbol-placement":"line-center","text-field":"{dist} nm","text-rotation-alignment":"map","text-size":12},paint:{"text-opacity":1,"text-color":"#fff","text-halo-color":"#F44336","text-halo-width":4,"text-halo-blur":0}});let s;if(a?s='<div class="marker-label">Drag and drop</div>':s=`<div class="marker-label">Tol distance: <b>${Re.LngLatHelper.roundPrecision((r.total??0)+n,2)}</b>nm, bearing: <b>${o}</b>°</div><div class="marker-label">${this.navigation==="RL"?"RL":"GC"} mode, using 'Shift' to switch</div><div class="marker-label">Double click to end</div>`,this.tipMarker)this.tipMarker._element.innerHTML=s,this.tipMarker.setLngLat([e.lng,e.lat]);else{const l=document.createElement("div");l.className="tip-marker",l.innerHTML=s,this.tipMarker=new ha.Marker(l).setOffset([140,0]).setLngLat([e.lng,e.lat]).addTo(this.map)}},handleMove(r){this.map.getCanvas().style.cursor="crosshair";let t=this.geojson.at(-1);t||(t=be.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(t));const e=t.features.filter(a=>a.geometry.type==="Point");e!=null&&e.length&&this.handleTmpPointUpdate(t,e.at(-1),{lng:r.lngLat.lng,lat:r.lngLat.lat})},handleDblClick(r){r.preventDefault();let t=this.geojson.at(-1);t.closed=!0,this.handleRender(t),t=be.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(t)},handleRender(r){var t;if((t=r==null?void 0:r.features)!=null&&t.length){const e=`${r.id}-${this.source}`,a=`${r.id}-${this.layer}`,i=`${r.id}-${this.labelLayer}`;this.map.getSource(e)?this.map.getSource(e).setData(r):this.map.addSource(e,{type:"geojson",data:r}),this.handleClear(r,!1),this.map.addLayer({id:a,type:"line",source:e,filter:["==","$type","LineString"],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#F44336","line-width":2}}),this.map.addLayer({id:i,type:"symbol",source:e,filter:["==","$type","LineString"],layout:{"symbol-placement":"line-center","text-field":"{dist}nm,{bearing}°","text-rotation-alignment":"map","text-size":12},paint:{"text-opacity":1,"text-color":"#fff","text-halo-color":"#F44336","text-halo-width":4,"text-halo-blur":0}});const n=r.features.filter(o=>o.geometry.type==="Point");for(const o of n){const s=document.createElement("div");s.id=`${r.id}-${o.properties.id}`,s.className=`${r.closed?"point-marker closed":"point-marker"}`,s.innerHTML='<div class="marker-circle"></div>';const l=new ha.Marker({element:s,draggable:!0,contextmenu:!0}).setLngLat(o.geometry.coordinates).addTo(this.map);l.on("drag",this.handleDrag),l.on("dragend",this.handleDragEnd),this.pointMarkers[r.id]?this.pointMarkers[r.id].push(l):this.pointMarkers[r.id]=[l]}if(r.closed){const o=n.at(-1),l=r.features.filter(c=>c.geometry.type==="LineString").at(-1),u=document.createElement("div");u.className="point-summary-marker",u.innerHTML=`<div id="${r.id}" class="marker-close">×</div><div class="marker-label">Tol: ${l.properties.total}nm</div>`,this.closeMarkers[r.id]=new ha.Marker(u).setOffset([60,0]).setLngLat(o.geometry.coordinates).addTo(this.map)}}},handleClear(r,t=!0){var n,o,s,l,u,c,h,f,d;const e=`${r.id}-${this.source}`,a=`${r.id}-${this.layer}`,i=`${r.id}-${this.labelLayer}`;(n=this.map)!=null&&n.getLayer(a)&&this.map.removeLayer(a),(o=this.map)!=null&&o.getLayer(i)&&this.map.removeLayer(i),(s=this.map)!=null&&s.getLayer(this.tmpLayer)&&this.map.removeLayer(this.tmpLayer),(l=this.map)!=null&&l.getLayer(this.tmpLabelLayer)&&this.map.removeLayer(this.tmpLabelLayer),(u=this.closeMarkers[r.id])==null||u.remove(),this.closeMarkers[r.id]=void 0,(c=this.pointMarkers[r.id])==null||c.forEach(p=>{p==null||p.remove()}),this.pointMarkers[r.id]=[],(h=this.tipMarker)==null||h.remove(),this.tipMarker=void 0,t&&((f=this.map)!=null&&f.getSource(e))&&this.map.removeSource(e),t&&((d=this.map)!=null&&d.getSource(this.tmpSource))&&this.map.removeSource(this.tmpSource)}}};function KJ(r,t,e,a,i,n){return b.openBlock(),b.createElementBlock("div")}const JJ=ze(qJ,[["render",KJ]]),CQ="",QJ={name:"IdmENC",props:{map:{type:Object},enabled:{type:Boolean},beforeLayer:{type:String,default:"grayland"},bottom:{type:String,default:"280px"},token:{type:String,default:""},toggleVersion:{type:Number},permission:{type:Number}},emits:["enc"],data(){return{helper:is,vendor:this.$attrs.permission&is.LEVEL.Supper?"hi":"i4",right:10}},watch:{vendor:{handler(){this.$emit("enc",this.vendor)},immediate:!0},toggleVersion:{handler(){var r;this.right=(((r=document.getElementsByClassName("right-bar")[0])==null?void 0:r.clientWidth)||0)+10},immediate:!0}},methods:{}},eQ={key:0},tQ={class:"bar-item"};function rQ(r,t,e,a,i,n){const o=b.resolveComponent("ElTooltip");return e.enabled&&e.permission&i.helper.LEVEL.Supper?(b.openBlock(),b.createElementBlock("div",eQ,[b.createElementVNode("div",{class:"menu-bar-box",style:b.normalizeStyle({position:"absolute",right:i.right+"px",bottom:e.bottom})},[b.createElementVNode("div",tQ,[b.createVNode(o,{placement:"left",effect:"light",content:"Hifleet","show-after":1e3},{default:b.withCtx(()=>[b.createElementVNode("div",{class:b.normalizeClass(i.vendor==="hi"?"menu-icon active":"menu-icon"),onClick:t[0]||(t[0]=s=>i.vendor="hi")},t[2]||(t[2]=[b.createElementVNode("span",{class:"iconfont"},"HI",-1)]),2)]),_:1}),b.createVNode(o,{placement:"left",effect:"light",content:"I4insight","show-after":1e3},{default:b.withCtx(()=>[b.createElementVNode("div",{class:b.normalizeClass(i.vendor==="i4"?"menu-icon active":"menu-icon"),onClick:t[1]||(t[1]=s=>i.vendor="i4")},t[3]||(t[3]=[b.createElementVNode("span",{class:"iconfont"},"I4",-1)]),2)]),_:1})])],4)])):b.createCommentVNode("",!0)}const aQ=ze(QJ,[["render",rQ],["__scopeId","data-v-150235f7"]]),DQ="",iQ={name:"IdmGLV2",components:{IdmGlLayer:JE,IdmWindBarb:rI,IdmWindParticle:oI,IdmCurrents:cI,IdmCurrentParticle:pI,IdmSigWave:mI,IdmSwell:bI,IdmPrmsl:SI,IdmIceberg:CI,IdmTropicals:pf,IdmPrecip3h:ZI,IdmVisibility:KI,IdmWaterTemp:tP,IdmTemp:nP,IdmArctic:uP,IdmWarZone:fJ,IdmGmdssArea:vJ,IdmEcaZone:yJ,IdmAlertZone:SJ,IdmPort:PJ,IdmLoadLine:RJ,IdmTimezone:zJ,IdmVRA:GJ,IdmSpecialArea:$J,IdmTerminator:ZJ,IdmLatLng:Wy,IdmMeasure:JJ,IdmPoint:uJ,IdmENC:aQ},props:{map:{type:Object,default:void 0},token:{type:String},ts:{type:String},beforeLayer:{type:String,default:""},toggleVersion:{type:Number}},emits:["toggleVersion","activeWeatherLayers"],data(){return{weatherLayers:{},activeWeatherLayers:[],weatherWeight:0,otherLayers:{},otherWeight:0,showCoord:!1,showMeasure:!1,showPoint:!1,show3d:!1,meteo:void 0,source:"",gateway:"https://cbe.idmwx.com",mapProjection:"mercator",zoom:6,viewport:void 0,particleFactor:void 0,showRampColor:!1,activeWindLayer:!1,showWindFeather:!1,showWindParticle:!1,showCurrentIsoband:!1,showCurrentParticle:!1,enc:"",defaultMeteoToken:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNseTVudHJzYzAwNWUwbHBsZHkyaDRqczMiLCJyb2xlIjoxLCJuYW1lIjoiZmFrZUBvcm13eC5jb20iLCJwbGF0SWQiOiJnZDBtdDFkIiwiY29tcGFueSI6eyJpZCI6bnVsbCwiY2hpbGRyZW4iOltdfSwiaWF0IjoxNzIzMDI0MDI0LCJleHAiOjM5MzA1NDQwMjR9.RrKcdcMnq-FxBLJQ-i6lx2FscDE46y8EvHIemPW4HTg",helper:new Hy}},watch:{ts:{handler(r,t){r&&t&&Ue(r).utc().format("yyyy-MM-DD HH")!==Ue(t).utc().format("yyyy-MM-DD HH")&&this.$nextTick(()=>{this.handleDateChange({tropicals:!1})})},immediate:!0},map:{handler(){this.map&&(this.map.on("zoomend",this.handleDragEndWithZoom4Json),this.map.on("dragend",this.handleDragEndWithZoom4Json),this.map.on("move",this.handleDragEndWithZoom4Image),this.viewport=new ru(this.map),this.handleRampColorInitial())},immediate:!0},enc:{handler(r,t){var e,a,i,n,o,s,l,u;r?((a=(e=this.map)==null?void 0:e.getLayer(r))==null||a.setLayoutProperty("visibility","visible"),(n=(i=this.map)==null?void 0:i.getLayer(t))==null||n.setLayoutProperty("visibility","none")):((s=(o=this.map)==null?void 0:o.getLayer("i4"))==null||s.setLayoutProperty("visibility","none"),(u=(l=this.map)==null?void 0:l.getLayer("hi"))==null||u.setLayoutProperty("visibility","none"))}},activeWeatherLayers:{handler(){var r,t,e,a,i,n,o,s,l,u,c,h,f,d,p,v,g,m;if(!this.map)return!1;this.activeWeatherLayers.length>0?((t=(r=this.map)==null?void 0:r.getLayer(this.enc))==null||t.setLayoutProperty("visibility","none"),(a=(e=this.map)==null?void 0:e.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))==null||a.setLayoutProperty("visibility","visible"),(n=this.map)!=null&&n.getLayer((i=this.viewport)==null?void 0:i.rampColorLayer)&&((o=this.map)!=null&&o.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))&&this.mapProjection==="mercator"&&((l=this.map)==null||l.moveLayer((s=this.viewport)==null?void 0:s.rampColorLayer,this.helper.mapboxCustomer.layers.countryBoundary.id)),(c=this.map)!=null&&c.getLayer((u=this.viewport)==null?void 0:u.particleLayer)&&((h=this.map)!=null&&h.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))&&this.mapProjection==="mercator"&&((d=this.map)==null||d.moveLayer((f=this.viewport)==null?void 0:f.particleLayer,this.helper.mapboxCustomer.layers.countryBoundary.id))):((v=(p=this.map)==null?void 0:p.getLayer(this.enc))==null||v.setLayoutProperty("visibility","visible"),(m=(g=this.map)==null?void 0:g.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))==null||m.setLayoutProperty("visibility","none")),this.$emit("activeWeatherLayers",this.activeWeatherLayers)},immediate:!0}},methods:{async fetchWeatherLayers(r={tropicals:!1}){var i,n,o,s,l,u,c,h;const t=new Date().valueOf();let e=0,a=0;if(this.map){const f=((i=this.map)==null?void 0:i.getZoom())+1,d=(n=this.map)==null?void 0:n.getBounds(),p=`${d._sw.lng},${d._sw.lat},${d._ne.lng},${d._ne.lat}`;if(this.particleFactor){const v=ns.WEATHER_LAYERS.find(g=>{var m;return((m=g.peer)==null?void 0:m.weight)===this.particleFactor.weight});this.particleFactor.particle?this.weatherWeight=this.weatherWeight&v.weight?this.weatherWeight:this.weatherWeight+v.weight:this.weatherWeight=this.weatherWeight&v.weight?this.weatherWeight-v.weight:this.weatherWeight}if(this.weatherWeight>0){let v=this.weatherWeight,g;if(r.tropicals||this.weatherWeight&256&&(g=this.weatherLayers.tropicals,g&&(v-=256,g.version=Math.random()+1)),v>0){const m=await Ra.get(`${this.gateway}/api/arc/weather/layers/links?l=${v}&v=${this.source}&z=${f}&bbox=${p}&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(a=new Date().valueOf()-(t+e),console.log("weather links elapsed: ",a,", total: ",e+=a),((o=m==null?void 0:m.data)==null?void 0:o.code)===0){const y=(s=m==null?void 0:m.data)==null?void 0:s.data,_=[];for(const x in y)x==="ice-edge"&&(y[x]="https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"),x!=="tropicals"&&_.push(Ra.get(y[x],{headers:{Authorization:this.token||this.defaultMeteoToken,key:x},responseType:/\.(jpg|png)$/.test(y[x])?"blob":"json"}).catch(S=>{console.log(`[${x}] fetch layer error: ${S}`)}));const w=await Promise.all(_);this.weatherLayers={},w.map(x=>{var C,T,A,D;const S=((C=x==null?void 0:x.data)==null?void 0:C.data)||(x==null?void 0:x.data),L=(A=(T=x==null?void 0:x.config)==null?void 0:T.headers)==null?void 0:A.key;L&&S&&(this.weatherLayers[L]={raw:S,type:((D=x==null?void 0:x.config)==null?void 0:D.responseType)==="blob"?"image":"json",etime:this.ts})}),y.tropicals&&Ra.get(y.tropicals,{headers:{Authorization:this.token||this.defaultMeteoToken,key:"tropicals"}}).then(x=>{var C,T,A;const S=Re.TropicalHelper.convert2Geojson(((C=x==null?void 0:x.data)==null?void 0:C.data)||(x==null?void 0:x.data)),L=(A=(T=x==null?void 0:x.config)==null?void 0:T.headers)==null?void 0:A.key;this.weatherLayers[L]={data:S,active:!0,cached:!1,type:"json",etime:this.ts,version:Math.random()+1}})}if(a=new Date().valueOf()-(t+e),console.log("weather layers elapsed: ",a,", total: ",e+=a),this.weatherLayers["swell-direction"]||this.weatherLayers["swell-height"]){const y=(l=this.weatherLayers["swell-direction"])==null?void 0:l.raw,_=(u=this.weatherLayers["swell-height"])==null?void 0:u.raw;delete this.weatherLayers["swell-direction"],delete this.weatherLayers["swell-height"],this.weatherLayers.swell={type:"json",direction:y,height:{raw:_},etime:this.ts}}if(this.weatherLayers["current-direction"]||this.weatherLayers["current-speed"]){const y=(c=this.weatherLayers["current-direction"])==null?void 0:c.raw,_=(h=this.weatherLayers["current-speed"])==null?void 0:h.raw;delete this.weatherLayers["current-direction"],delete this.weatherLayers["current-speed"],this.weatherLayers.current={type:"json",direction:y,speed:{raw:_},etime:this.ts}}}g&&(g.etime=this.ts,g.cached=!0,this.weatherLayers.tropicals=g)}this.handleWeatherLayerToggle(),this.handleDragEndWithZoom4Json()}this.$emit("toggleVersion",Math.random())},async fetchOtherLayers(r={all:!1,dayNight:!1,enc:!1}){var t,e,a,i;if(this.map){let n=this.otherWeight;if(n){let o=!1;if(this.otherWeight&2048&&(n=this.otherWeight-2048,o=!0),n){if(r.all){const s=await Ra.get(`${this.gateway}/api/arc/other/layers/links?l=${n}&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(((t=s==null?void 0:s.data)==null?void 0:t.code)===0){const l=(e=s==null?void 0:s.data)==null?void 0:e.data,u=[];for(const h in l)u.push(Ra.get(l[h],{headers:{Authorization:this.token||this.defaultMeteoToken,key:h}}));const c=await Promise.all(u);this.otherLayers={enc:o},c.map(h=>{var p,v,g;const f=((p=h==null?void 0:h.data)==null?void 0:p.data)||(h==null?void 0:h.data),d=(g=(v=h==null?void 0:h.config)==null?void 0:v.headers)==null?void 0:g.key;this.otherLayers[d]=f})}}else if(r.dayNight&&n&1024){const s=await Ra.get(`${this.gateway}/api/arc/other/layers/links?l=1024&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(((a=s==null?void 0:s.data)==null?void 0:a.code)===0){const l=(i=s==null?void 0:s.data)==null?void 0:i.data,u=[];for(const h in l)u.push(Ra.get(l[h],{headers:{Authorization:this.token||this.defaultMeteoToken,key:h}}));(await Promise.all(u)).map(h=>{var p,v,g;const f=((p=h==null?void 0:h.data)==null?void 0:p.data)||(h==null?void 0:h.data),d=(g=(v=h==null?void 0:h.config)==null?void 0:v.headers)==null?void 0:g.key;this.otherLayers[d]=f})}}}else this.otherLayers={enc:o}}else this.otherLayers={};this.handleBeforeLayerToggle()}},handleRampColorState(){var r;if(this.showRampColor=!1,this.showWindParticle=!1,this.showCurrentParticle=!1,(r=this.particleFactor)!=null&&r.particle)this.showRampColor=!0,this.particleFactor.key==="wind"&&(this.showWindParticle=!0),this.particleFactor.key==="current"&&(this.showCurrentParticle=!0);else for(const t of this.activeWeatherLayers)["png","jpg"].includes(t.type)&&(this.showRampColor=!0);this.activeWindLayer=!!this.activeWeatherLayers.find(t=>t.key==="wind"),this.$refs.layer&&(this.$refs.layer.activeWeatherLayers=this.activeWeatherLayers)},handleRampColorInitial(){var r,t,e,a,i,n,o,s,l,u,c,h;this.viewport.map.getSource((r=this.viewport)==null?void 0:r.rampColorSource)||this.viewport.map.addSource((t=this.viewport)==null?void 0:t.rampColorSource,{type:"canvas",canvas:(e=this.viewport)==null?void 0:e.rampColorCanvas,animate:!0,coordinates:this.viewport.getBoundLngLat()}),this.viewport.map.getLayer((a=this.viewport)==null?void 0:a.rampColorLayer)||this.viewport.map.addLayer({type:"raster",id:(i=this.viewport)==null?void 0:i.rampColorLayer,source:(n=this.viewport)==null?void 0:n.rampColorSource,layout:{visibility:"none"}},this.beforeLayer),this.viewport.map.getSource((o=this.viewport)==null?void 0:o.particleSource)||this.viewport.map.addSource((s=this.viewport)==null?void 0:s.particleSource,{type:"canvas",canvas:(l=this.viewport)==null?void 0:l.particleCanvas,animate:!0,coordinates:this.viewport.getBoundLngLat()}),this.viewport.map.getLayer((u=this.viewport)==null?void 0:u.particleLayer)||this.viewport.map.addLayer({type:"raster",id:(c=this.viewport)==null?void 0:c.particleLayer,source:(h=this.viewport)==null?void 0:h.particleSource,layout:{visibility:"none"}},this.beforeLayer)},handleDragEndWithZoom4Json(){var u,c,h,f;const r=new Date().valueOf();let t=0,e=0;const a=(u=this.map)==null?void 0:u.getBounds(),i=this.map.getZoom(),n=Re.LngLatHelper.convertToStdLng(a._sw.lng),o=Re.LngLatHelper.convertToStdLng(a._ne.lng),s=Math.floor(a._sw.lat),l=Math.ceil(a._ne.lat);for(const d in this.weatherLayers)if(this.weatherLayers[d].active&&this.weatherLayers[d].type==="json"){this.weatherLayers[d].active=!1,this.weatherLayers[d].version=Math.random()+1;let p=[];if(["swell","current"].includes(d)){const v=((c=this.weatherLayers[d])==null?void 0:c.direction)||{};for(const g in v)if(g>s&&g<l&&(!(i<=this.zoom)||g%(i<this.zoom/2?5:3)===0)){const m=v[g].lng;n>o?m.forEach((y,_)=>{var w;if((y>=n&&y<=180||y>=-180&&y<=o)&&(!(i<=this.zoom)||y%(i<this.zoom/2?5:3)===0)){const x=be.point([y,g],{val:v[g].val[_],spd:(w=v[g].spd)==null?void 0:w[_]});p.push(x)}}):m.forEach((y,_)=>{var w;if(y>=n&&y<=o&&(!(i<=this.zoom)||y%(i<this.zoom/2?5:3)===0)){const x=be.point([y,g],{val:v[g].val[_],spd:(w=v[g].spd)==null?void 0:w[_]});p.push(x)}})}if(e=new Date().valueOf()-(r+t),console.log("direction elapsed: ",e,", total: ",t+=e),d==="swell"){const g=this.weatherLayers[d].height;if(g){if(!g.data){const m=[];for(const y in(h=g.raw)==null?void 0:h.LineString){const _=g.raw.LineString[y];for(const w of _)m.push(be.lineString(w,{val:Number(y)}));g.data=be.featureCollection(m)}}if(g.data){const m=this.handleBboxClip(g.data,a);p=p.concat(m)}e=new Date().valueOf()-(r+t),console.log("height elapsed: ",e,", total: ",t+=e)}}if(d==="current"){const g=this.weatherLayers[d].speed;if(g){if(!g.data){const y=[];for(const _ in(f=g.raw)==null?void 0:f.Polygon){const w=g.raw.Polygon[_];for(const x of w)y.push(be.polygon(x,{val:Number(_)}))}g.data=be.featureCollection(y)}const m=i<this.zoom?g.data.features.filter(y=>y.properties.val>.5):g.data.features;p=p.concat(m),e=new Date().valueOf()-(r+t),console.log("speed elapsed: ",e,", total: ",t+=e)}}}else if(d==="wind"){const v=this.weatherLayers.wind.raw;for(const g in v)if(g>s&&g<l&&(!(i<=this.zoom)||g%(i<this.zoom/2?5:3)===0)){const m=v[g].lng;n>o?m.forEach((y,_)=>{if((y>=n&&y<=180||y>=-180&&y<=o)&&(!(i<=this.zoom)||y%(i<this.zoom/2?5:3)===0)){const w=be.point([y,g],{val:v[g].val[_],spd:v[g].spd[_]});p.push(w)}}):m.forEach((y,_)=>{if(y>=n&&y<=o&&(!(i<=this.zoom)||y%(i<this.zoom/2?5:3)===0)){const w=be.point([y,g],{val:v[g].val[_],spd:v[g].spd[_]});p.push(w)}})}e=new Date().valueOf()-(r+t),console.log("wind barb elapsed: ",e,", total: ",t+=e)}else if(d==="sig-wave-height"){if(this.weatherLayers[d].data)p=this.weatherLayers[d].data;else{const v=this.weatherLayers[d].raw;if(v){const g=[];for(const m in v.Polygon){const y=v.Polygon[m];for(const _ of y)g.push(be.polygon(_,{val:Number(m)}))}for(const m in v.Point){const y=v.Point[m];for(const _ of y)g.push(...be.points(_,{val:Number(m)}).features)}p=p.concat(g)}}e=new Date().valueOf()-(r+t),console.log("sigWave elapsed: ",e,", total: ",t+=e)}else if(d==="prmsl"){if(this.weatherLayers[d].data)p=this.weatherLayers[d].data;else{const v=this.weatherLayers[d].raw;if(v){const g=[];for(const m in v.LineString){const y=v.LineString[m];for(const _ of y)g.push(be.lineString(_,{val:Number(m)}))}for(const m in v.Point)v.Point[m].lng.forEach((y,_)=>{y=Re.LngLatHelper.convertToStdLng(y),g.push(be.point([y,m],{val:v.Point[m].val[_],type:v.Point[m].type[_]}))});p=p.concat(g)}}e=new Date().valueOf()-(r+t),console.log("prmsl elapsed: ",e,", total: ",t+=e)}else if(d==="arctic"||d==="iceberg"){if(this.weatherLayers[d].data)p=this.weatherLayers[d].data;else{const v=this.weatherLayers[d].raw;if(v){const g=[];for(const m in v.LineString){const y=v.LineString[m];for(const _ of y)g.push(be.lineString(_,{val:Number(m)}))}p=p.concat(g)}}e=new Date().valueOf()-(r+t)}console.log(d," elapsed: ",e,", total: ",t+=e),p.length&&(this.weatherLayers[d].data=be.featureCollection(p)),this.weatherLayers[d].active=!0,this.weatherLayers[d].version=Math.random()+1}},handleDragEndWithZoom4Image(){for(const r in this.weatherLayers)this.weatherLayers[r].active&&this.weatherLayers[r].type==="image"&&(this.weatherLayers[r].active=!0,this.weatherLayers[r].version=Math.random()+1)},handleBboxClip(r,t){const e=[],a=Re.LngLatHelper.convertToStdLng(t._sw.lng),i=Re.LngLatHelper.convertToStdLng(t._ne.lng);return r.features.forEach(n=>{if(n.geometry.type!=="Point")if(a>i){let o=[a,t._sw.lat,180,t._ne.lat],s=be.bboxClip(n,o);s.geometry.coordinates.length&&e.push(s),o=[-180,t._sw.lat,i,t._ne.lat],s=be.bboxClip(n,o),s.geometry.coordinates.length&&e.push(s)}else{const o=[a,t._sw.lat,i,t._ne.lat],s=be.bboxClip(n,o);s.geometry.coordinates.length&&e.push(s)}else e.push(n)}),e},handleWeatherLayerToggle(){var r;for(const t in this.weatherLayers)this.weatherLayers[t].active=!1,this.weatherLayers[t].version=Math.random()+1;for(const t of this.activeWeatherLayers){let e=t.key;e.indexOf("swell")>-1?e="swell":e.indexOf("current")>-1&&(e="current"),this.weatherLayers[e]&&(this.weatherLayers[e].active=!0,this.weatherLayers[e].version=Math.random()+1,((r=this.particleFactor)==null?void 0:r.key)===e&&this.weatherLayers[`${e}-particle`]&&(this.weatherLayers[`${e}-particle`].active=this.particleFactor.particle))}this.handleBeforeLayerToggle()},handleBeforeLayerToggle(){var r,t,e,a,i,n,o,s,l,u,c,h,f;(r=this.map)!=null&&r.getLayer(this.beforeLayer)&&((t=this.activeWeatherLayers)!=null&&t.length||(e=this.otherLayers)!=null&&e["war-zones"]||(a=this.otherLayers)!=null&&a["gmdss-areas"]||(i=this.otherLayers)!=null&&i["load-lines"]||(n=this.otherLayers)!=null&&n["high-risk-area"]||(o=this.otherLayers)!=null&&o["time-zones"]||(s=this.otherLayers)!=null&&s.pirates||(l=this.otherLayers)!=null&&l.ports||(u=this.otherLayers)!=null&&u.enc||(c=this.otherLayers)!=null&&c["voluntary-reporting-area"]||(h=this.otherLayers)!=null&&h["eca-zones"]||(f=this.otherLayers)!=null&&f["special-area"])&&this.map.setLayoutProperty(this.beforeLayer,"visibility","visible")},handleDateChange(r={tropicals:!1}){this.fetchWeatherLayers(r),this.fetchOtherLayers({dayNight:!0})},handleWeatherLayerChange(r,t){this.showWindParticle=!1,this.showCurrentParticle=!1,this.map?setTimeout(()=>{this.activeWeatherLayers=JSON.parse(JSON.stringify(r));const e=this.activeWeatherLayers.some(n=>{var o;return["wind","current"].includes(n.key)&&(!((o=Object.keys(n))!=null&&o.some(s=>s==="particle"))||!!n.particle)}),a=this.activeWeatherLayers.some(n=>["png","jpg"].includes(n.type));e&&!a?(this.activeWeatherLayers.forEach(n=>{n.key==="wind"&&n.particle&&(this.particleFactor=n,this.showWindParticle=!0),n.key==="current"&&n.particle&&(this.particleFactor=n,this.showCurrentParticle=!0)}),this.particleFactor.particle=!0):a&&this.particleFactor&&(this.particleFactor.particle=!1);const i=r==null?void 0:r.reduce((n,o)=>n+(n&(o==null?void 0:o.weight)?0:o==null?void 0:o.weight),0);this.weatherWeight!==i||this.source!==t?(this.source=t,this.weatherWeight=i,this.fetchWeatherLayers({tropicals:!1})):this.handleWeatherLayerToggle()}):setTimeout(()=>{this.handleWeatherLayerChange(r,t)},500)},handleOtherLayerChange(r){if(!this.map)setTimeout(()=>{this.handleOtherLayerChange(r)},500);else{const t=r==null?void 0:r.reduce((e,a)=>e+(a==null?void 0:a.weight),0);r.find(e=>e.key==="enc")?this.enc="i4":this.enc="",this.otherWeight!=t&&(this.otherWeight=t,this.fetchOtherLayers({all:!0}))}},async handlePointChange(r){console.log(this.ts);const t=this.ts?Ue(this.ts).utc().format():Ue().utc().format(),e={lat:r.lat,lng:r.lng,datetime:t,forecastDays:7,selfHosted:!1},a=await Ra.post(`${this.gateway}/api/arc/meteo2/spot/forecast`,e,{headers:{Authorization:this.token||this.defaultMeteoToken}});(a==null?void 0:a.data.code)===0&&(this.meteo={...a==null?void 0:a.data.data,...r})},handle3dToggle(r){var t,e,a,i,n,o,s,l,u,c,h,f,d,p,v,g,m,y,_,w;r?(this.map.setProjection("globe"),this.mapProjection="globe",(e=this.map)!=null&&e.getLayer((t=this.viewport)==null?void 0:t.rampColorLayer)&&((a=this.map)!=null&&a.getLayer(this.helper.mapboxCustomer.layers.water.id))&&((n=this.map)==null||n.moveLayer((i=this.viewport)==null?void 0:i.rampColorLayer,this.helper.mapboxCustomer.layers.water.id)),(s=this.map)!=null&&s.getLayer((o=this.viewport)==null?void 0:o.particleLayer)&&((l=this.map)!=null&&l.getLayer(this.helper.mapboxCustomer.layers.water.id))&&((c=this.map)==null||c.moveLayer((u=this.viewport)==null?void 0:u.particleLayer,this.helper.mapboxCustomer.layers.water.id)),this.map.off("zoomend",this.handleDragEndWithZoom4Json),this.map.off("dragend",this.handleDragEndWithZoom4Json),this.map.off("move",this.handleDragEndWithZoom4Image)):(this.map.setProjection("mercator"),this.mapProjection="mercator",this.map.on("zoomend",this.handleDragEndWithZoom4Json),this.map.on("dragend",this.handleDragEndWithZoom4Json),this.map.on("move",this.handleDragEndWithZoom4Image),this.handleDragEndWithZoom4Image(),this.handleDragEndWithZoom4Json(),(f=this.map)!=null&&f.getLayer((h=this.viewport)==null?void 0:h.rampColorLayer)&&((d=this.map)!=null&&d.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))&&((v=this.map)==null||v.moveLayer((p=this.viewport)==null?void 0:p.rampColorLayer,this.helper.mapboxCustomer.layers.countryBoundary.id)),(m=this.map)!=null&&m.getLayer((g=this.viewport)==null?void 0:g.particleLayer)&&((y=this.map)!=null&&y.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))&&((w=this.map)==null||w.moveLayer((_=this.viewport)==null?void 0:_.particleLayer,this.helper.mapboxCustomer.layers.countryBoundary.id)))},handleParticle(r){this.particleFactor=r,this.weatherLayers[r.key]&&(this.weatherLayers[r.key].particle=r.particle),this.activeWeatherLayers.map(a=>{var i;return a.key===r.key?a.particle=r.particle:(i=Object.keys(a))!=null&&i.some(n=>n==="particle")&&(a.particle=!1),a});let t=localStorage.getItem("activeWeatherLayersCache");const e=JSON.parse(t)||[];e==null||e.forEach(a=>{var i;a.key===r.key?a.particle=r.particle:(i=Object.keys(a))!=null&&i.some(n=>n==="particle")&&(a.particle=!1)}),localStorage.setItem("activeWeatherLayersCache",JSON.stringify(e)),this.fetchWeatherLayers({tropicals:!1})},handleToggleVersion(){this.$emit("toggleVersion",Math.random())}}},nQ={key:0,className:"map-gl-home"};function oQ(r,t,e,a,i,n){var V,B,H,Y,$,U,q,Ce,ce,he,ee,pe,J,se,Oe,Ee,Ne,$e,rt,Nt,Tt,ca,Gr,tu,as,fE;const o=b.resolveComponent("IdmGlLayer"),s=b.resolveComponent("IdmENC"),l=b.resolveComponent("IdmSigWave"),u=b.resolveComponent("IdmSwell"),c=b.resolveComponent("IdmPrmsl"),h=b.resolveComponent("IdmIceberg"),f=b.resolveComponent("IdmTropicals"),d=b.resolveComponent("IdmCurrents"),p=b.resolveComponent("IdmCurrentParticle"),v=b.resolveComponent("IdmWindBarb"),g=b.resolveComponent("IdmWindParticle"),m=b.resolveComponent("IdmPrecip3h"),y=b.resolveComponent("IdmVisibility"),_=b.resolveComponent("IdmWaterTemp"),w=b.resolveComponent("IdmTemp"),x=b.resolveComponent("IdmArctic"),S=b.resolveComponent("IdmWarZone"),L=b.resolveComponent("IdmGmdssArea"),C=b.resolveComponent("IdmEcaZone"),T=b.resolveComponent("IdmAlertZone"),A=b.resolveComponent("IdmPort"),D=b.resolveComponent("IdmLoadLine"),E=b.resolveComponent("IdmTimezone"),I=b.resolveComponent("IdmVRA"),P=b.resolveComponent("IdmSpecialArea"),k=b.resolveComponent("IdmTerminator"),N=b.resolveComponent("IdmLatLng"),O=b.resolveComponent("IdmMeasure"),R=b.resolveComponent("IdmPoint");return e.map?(b.openBlock(),b.createElementBlock("div",nQ,[b.createVNode(o,b.mergeProps({ref:"layer",map:e.map,"toggle-version":e.toggleVersion,"map-projection":i.mapProjection,showWindFeather:i.showWindFeather,showWindParticle:i.showWindParticle,showCurrentIsoband:i.showCurrentIsoband,showCurrentParticle:i.showCurrentParticle},r.$attrs,{onWeather:n.handleWeatherLayerChange,onOther:n.handleOtherLayerChange,onToggleWindParticle:t[0]||(t[0]=Ht=>i.showWindParticle=Ht),onToggleWindFeather:t[1]||(t[1]=Ht=>i.showWindFeather=Ht),onToggleCurrentParticle:t[2]||(t[2]=Ht=>i.showCurrentParticle=Ht),onToggleCurrentIsoband:t[3]||(t[3]=Ht=>i.showCurrentIsoband=Ht),onCoordinate:t[4]||(t[4]=Ht=>i.showCoord=Ht),onMeasure:t[5]||(t[5]=Ht=>i.showMeasure=Ht),onPoint:t[6]||(t[6]=Ht=>i.showPoint=Ht),on3d:n.handle3dToggle,onHandleToggleVersion:n.handleToggleVersion}),null,16,["map","toggle-version","map-projection","showWindFeather","showWindParticle","showCurrentIsoband","showCurrentParticle","onWeather","onOther","on3d","onHandleToggleVersion"]),b.createVNode(s,b.mergeProps({map:e.map,token:e.token,enabled:(V=i.otherLayers)==null?void 0:V.enc,"toggle-version":e.toggleVersion},r.$attrs,{onEnc:t[7]||(t[7]=Ht=>i.enc=Ht)}),null,16,["map","token","enabled","toggle-version"]),b.createVNode(l,b.mergeProps({map:e.map,"sig-wave":(B=i.weatherLayers)==null?void 0:B["sig-wave-height"],"before-layer":e.beforeLayer,activeWeatherLayers:i.activeWeatherLayers},r.$attrs),null,16,["map","sig-wave","before-layer","activeWeatherLayers"]),b.createVNode(u,b.mergeProps({map:e.map,swell:(H=i.weatherLayers)==null?void 0:H.swell,"before-layer":e.beforeLayer,activeWeatherLayers:i.activeWeatherLayers},r.$attrs),null,16,["map","swell","before-layer","activeWeatherLayers"]),b.createVNode(c,b.mergeProps({map:e.map,prmsl:(Y=i.weatherLayers)==null?void 0:Y.prmsl,"before-layer":e.beforeLayer,"active-weather-layers":i.activeWeatherLayers},r.$attrs),null,16,["map","prmsl","before-layer","active-weather-layers"]),b.createVNode(h,b.mergeProps({map:e.map,iceberg:($=i.weatherLayers)==null?void 0:$.iceberg,"before-layer":e.beforeLayer},r.$attrs),null,16,["map","iceberg","before-layer"]),b.createVNode(f,b.mergeProps({map:e.map,date:e.ts,tropicals:(U=i.weatherLayers)==null?void 0:U.tropicals,"before-layer":e.beforeLayer},r.$attrs),null,16,["map","date","tropicals","before-layer"]),b.createVNode(d,b.mergeProps({map:e.map,"map-projection":i.mapProjection,current:(q=i.weatherLayers)==null?void 0:q.current,"before-layer":e.beforeLayer,showCurrentIsoband:i.showCurrentIsoband,showCurrentParticle:i.showCurrentParticle,"margin-bottom":i.activeWindLayer?i.showRampColor?"84px":"56px":i.showRampColor?"56px":"30px","toggle-version":e.toggleVersion,"weather-layers":i.weatherLayers},r.$attrs,{onParticle:n.handleParticle,onHandleToggleVersion:n.handleToggleVersion}),null,16,["map","map-projection","current","before-layer","showCurrentIsoband","showCurrentParticle","margin-bottom","toggle-version","weather-layers","onParticle","onHandleToggleVersion"]),b.createVNode(p,b.mergeProps({viewport:i.viewport,factor:(Ce=i.weatherLayers)==null?void 0:Ce["current-particle"],"before-layer":e.beforeLayer,"toggle-version":e.toggleVersion},r.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),b.createVNode(v,b.mergeProps({ref:"windBarb",map:e.map,"map-projection":i.mapProjection,wind:(ce=i.weatherLayers)==null?void 0:ce.wind,current:(he=i.weatherLayers)==null?void 0:he.current,"before-layer":e.beforeLayer,"margin-bottom":i.showRampColor?"56px":"30px",showWindFeather:i.showWindFeather,showWindParticle:i.showWindParticle},r.$attrs,{"toggle-version":e.toggleVersion,"weather-layers":i.weatherLayers,onParticle:n.handleParticle}),null,16,["map","map-projection","wind","current","before-layer","margin-bottom","showWindFeather","showWindParticle","toggle-version","weather-layers","onParticle"]),b.createVNode(g,b.mergeProps({viewport:i.viewport,factor:(ee=i.weatherLayers)==null?void 0:ee["wind-particle"],"before-layer":e.beforeLayer,"toggle-version":e.toggleVersion},r.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),b.createVNode(m,b.mergeProps({viewport:i.viewport,factor:(pe=i.weatherLayers)==null?void 0:pe.precip3h,"before-layer":e.beforeLayer,"toggle-version":e.toggleVersion},r.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),b.createVNode(y,b.mergeProps({viewport:i.viewport,factor:(J=i.weatherLayers)==null?void 0:J.visibility,"before-layer":e.beforeLayer,"toggle-version":e.toggleVersion},r.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),b.createVNode(_,b.mergeProps({viewport:i.viewport,factor:(se=i.weatherLayers)==null?void 0:se["water-temp"],"before-layer":e.beforeLayer,"toggle-version":e.toggleVersion},r.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),b.createVNode(w,b.mergeProps({viewport:i.viewport,factor:(Oe=i.weatherLayers)==null?void 0:Oe.temp,"before-layer":e.beforeLayer,"toggle-version":e.toggleVersion},r.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),b.createVNode(x,b.mergeProps({viewport:i.viewport,factor:(Ee=i.weatherLayers)==null?void 0:Ee.arctic,"before-layer":e.beforeLayer,"toggle-version":e.toggleVersion},r.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),b.createVNode(S,b.mergeProps({map:e.map,zone:(Ne=i.otherLayers)==null?void 0:Ne["war-zones"],"before-layer":e.beforeLayer},r.$attrs),null,16,["map","zone","before-layer"]),b.createVNode(L,b.mergeProps({map:e.map,area:($e=i.otherLayers)==null?void 0:$e["gmdss-areas"],"before-layer":e.beforeLayer},r.$attrs),null,16,["map","area","before-layer"]),b.createVNode(C,b.mergeProps({map:e.map,zone:(rt=i.otherLayers)==null?void 0:rt["eca-zones"],"before-layer":e.beforeLayer},r.$attrs),null,16,["map","zone","before-layer"]),b.createVNode(T,b.mergeProps({map:e.map,zone:(Nt=i.otherLayers)==null?void 0:Nt["alert-zones"],"before-layer":e.beforeLayer},r.$attrs),null,16,["map","zone","before-layer"]),b.createVNode(A,b.mergeProps({map:e.map,port:(Tt=i.otherLayers)==null?void 0:Tt.ports,"before-layer":e.beforeLayer},r.$attrs),null,16,["map","port","before-layer"]),b.createVNode(D,b.mergeProps({map:e.map,line:(ca=i.otherLayers)==null?void 0:ca["load-lines"],"before-layer":e.beforeLayer},r.$attrs),null,16,["map","line","before-layer"]),b.createVNode(E,b.mergeProps({map:e.map,zone:(Gr=i.otherLayers)==null?void 0:Gr["time-zones"],"before-layer":e.beforeLayer},r.$attrs),null,16,["map","zone","before-layer"]),b.createVNode(I,b.mergeProps({map:e.map,area:(tu=i.otherLayers)==null?void 0:tu["voluntary-reporting-area"],"before-layer":e.beforeLayer},r.$attrs),null,16,["map","area","before-layer"]),b.createVNode(P,b.mergeProps({map:e.map,area:(as=i.otherLayers)==null?void 0:as["special-area"],"before-layer":e.beforeLayer},r.$attrs),null,16,["map","area","before-layer"]),b.createVNode(k,b.mergeProps({map:e.map,area:(fE=i.otherLayers)==null?void 0:fE["day-night"]},r.$attrs),null,16,["map","area"]),b.createVNode(N,b.mergeProps({map:e.map,show:i.showCoord,"toggle-version":e.toggleVersion},r.$attrs),null,16,["map","show","toggle-version"]),b.createVNode(O,b.mergeProps({map:e.map,show:i.showMeasure},r.$attrs),null,16,["map","show"]),b.createVNode(R,b.mergeProps({map:e.map,show:i.showPoint,meteo:i.meteo,ts:e.ts},r.$attrs,{onPoint:n.handlePointChange}),null,16,["map","show","meteo","ts","onPoint"])])):b.createCommentVNode("",!0)}const hE=ze(iQ,[["render",oQ]]),sQ={install(r){r.component("MapboxGL",hE),r.component("TropicalGL",pf),r.component("LatLngGL",Wy)}};Ye.LatLngGL=Wy,Ye.MapboxGL=hE,Ye.MapboxGLPlugin=sQ,Ye.MapboxHelper=Hy,Ye.ParticleSchema=Ct,Ye.TropicalGL=pf,Ye.Viewport=ru,Ye.WebGL=Va,Ye.WebGLSchema=vt,Object.defineProperty(Ye,Symbol.toStringTag,{value:"Module"})});