import{j as ss,u as af,s as ap,a as ls,k as Ol,o as Ho,t as us,l as C1,m as P1,_ as fs,b as Lr,d as ke,n as nr,f as Th,h as Dr,p as Ds,i as Bs,q as T1,F as Hl,v as Wl,w as Ts,x as Qs,y as A1,r as tu,z as O1,A as I1,B as j1,C as L1,D as op,E as sp,G as lp,c as D1,H as ts,I as B1,J as R1,K as F1,L as N1,M as k1,N as z1}from"./index.75ed247b.js";const pc=Object.freeze(Object.defineProperty({__proto__:null,get Base(){return Go},get Circle(){return SP},get Ellipse(){return PP},get Image(){return AP},get Line(){return IP},get Marker(){return DP},get Path(){return ov},get Polygon(){return WP},get Polyline(){return VP},get Rect(){return KP},get Text(){return QP}},Symbol.toStringTag,{value:"Module"})),mc=Object.freeze(Object.defineProperty({__proto__:null,get Base(){return To},get Circle(){return oT},get Dom(){return lT},get Ellipse(){return fT},get Image(){return hT},get Line(){return vT},get Marker(){return pT},get Path(){return yT},get Polygon(){return wT},get Polyline(){return MT},get Rect(){return ST},get Text(){return OT}},Symbol.toStringTag,{value:"Module"})),Y1="/sgdaping/assets/persagyLogo.da1c54bb.svg",H1="/sgdaping/assets/persagyLogo2.2c2cd343.svg",W1="/sgdaping/assets/zhijianglogo.3d5e485a.png",G1="/sgdaping/assets/changeVer.0a6966ec.svg",V1="/sgdaping/assets/changeHor.31bd2dd3.svg",$1="/sgdaping/assets/yellowlight.e2ed4936.png",X1="/sgdaping/assets/redlight.da537064.png",U1="/sgdaping/assets/greenlight.46aff2a5.png",K1="/sgdaping/assets/bluegreen.00759706.png",Z1="/sgdaping/assets/yellowgreen.8ba3e101.png",Q1="/sgdaping/assets/redyellow.a4d31e06.png",J1="/sgdaping/assets/bluelight.94881ed2.png",q1="/sgdaping/assets/lastco2.24f784ab.png",t2="/sgdaping/assets/lasthumidity.06543219.png",e2="/sgdaping/assets/lastmethanal.498d635d.png",n2="/sgdaping/assets/lastpm25.c890de2b.png",r2="/sgdaping/assets/lasttemp.af551cbe.png",i2="/sgdaping/assets/floor_co2.1473ef18.png",a2="/sgdaping/assets/floor_jiaquan.5a70d2b7.png",o2="/sgdaping/assets/floor_pm25.a5578d12.png",s2="/sgdaping/assets/floor_shidu.5b65577c.png",l2="/sgdaping/assets/floor_wendu.4c10f196.png",u2="/sgdaping/assets/floor_co2_ver.452fda21.png",f2="/sgdaping/assets/floor_jiaquan_ver.89176ec7.png",c2="/sgdaping/assets/floor_pm25_ver.ae37a6d9.png",h2="/sgdaping/assets/floor_shidu_ver.d5fad17b.png",d2="/sgdaping/assets/floor_wendu_ver.430ba6f4.png",v2="/sgdaping/assets/lastGold.982ba332.svg",g2="/sgdaping/assets/lastGray.80fa12cf.svg",p2="/sgdaping/assets/playbutton.f8f7c1b9.svg",m2="/sgdaping/assets/stopbutton.8e181bb5.svg",Oa={persagyLogo:Y1,zhijiangLogo:W1,changeVer:G1,changeHor:V1,yellowlight:$1,redlight:X1,greenlight:U1,bluegreen:K1,yellowgreen:Z1,redyellow:Q1,bluelight:J1,lastco2:q1,lasthumidity:t2,lastmethanal:e2,lastpm25:n2,lasttemp:r2,floor_co2:i2,floor_jiaquan:a2,floor_pm25:o2,floor_shidu:s2,floor_wendu:l2,floor_co2_ver:u2,floor_jiaquan_ver:f2,floor_pm25_ver:c2,floor_shidu_ver:h2,floor_wendu_ver:d2,lastGold:v2,lastGray:g2,playbutton:p2,stopbutton:m2,CBILogo:H1},y2=ss({props:{navigateItem:{type:String}},setup(a,i){const{CBILogo:t,persagyLogo:e,zhijiangLogo:n,changeHor:r,changeVer:o,playbutton:s,stopbutton:l}=Oa,u=C1(),c=P1(),f=af(),{weatherCont:h,projectObj:d,projectId:v,stopSign:g}=ap(f),p=ls({logo:f.projectId=="Pj3301100002"?n:f.projectId=="Pj1101010007"?t:e,changeHor:r,changeVer:o,playbutton:s,stopbutton:l,nowScreen:u.path.indexOf("horiScreen")>-1?"horizontal":"vertical",nowStr:Ol().format("YYYY.MM.DD HH:mm"),setNowInterval(){setInterval(()=>{var m=Ol().format("YYYY.MM.DD HH:mm");p.nowStr=m},3e4)},changeScreen(){p.nowScreen=="vertical"?(p.nowScreen="horizontal",c.push({path:"/horiScreen"})):(p.nowScreen="vertical",c.push({path:"/verScreen"}))},toPlayStop(){f.stopSign==!0?(f.stopSign=!1,i.emit("toplay")):(f.stopSign=!0,i.emit("tostop"))},toPlay(){f.stopSign=!1,i.emit("toplay")},toStop(){f.stopSign=!0,i.emit("tostop")},toLast(){i.emit("lastpage")},toNext(){i.emit("nextpage")}});return Ho(()=>{console.log("pagehead-mounted"),p.setNowInterval()}),{...us(p),weatherCont:h,projectObj:d,stopSign:g,projectId:v}}}),x2="/sgdaping/assets/lastbutton.98e444b1.svg",w2="/sgdaping/assets/nextButton.aeca7da3.svg";const E2=a=>(Ds("data-v-32a1e720"),a=a(),Bs(),a),M2={class:"horHead horSty"},b2={class:"horHead-content"},_2={class:"firtitle"},S2=E2(()=>ke("div",{class:"sectitle"},"\u61C2\u7A7A\u95F4,\u66F4\u61C2\u529E\u516C",-1)),C2={class:"horHead-left"},P2={key:0,class:"CBIClass"},T2=["src"],A2={class:"horHead-right"},O2={class:"right-item"},I2={class:"item-time"},j2={class:"right-item"},L2={class:"right-item button-wrap",style:{display:"none"}},D2=["src"],B2=["src"];function R2(a,i,t,e,n,r){return Dr(),Lr("div",M2,[ke("div",b2,[ke("div",null,[ke("div",_2,nr(a.projectObj.localName),1),S2])]),ke("div",C2,[a.projectId=="Pj1101010007"?(Dr(),Lr("div",P2,"\u5851\u7F8E\u5C1A\u683C")):Th("",!0),ke("img",{src:a.logo,alt:"",style:{height:"48px"}},null,8,T2)]),ke("div",A2,[ke("div",O2,[ke("span",I2,nr(a.nowStr),1)]),ke("div",j2,nr(a.weatherCont.text),1),ke("div",L2,[ke("img",{class:"controlImg",alt:"",src:x2,onClick:i[0]||(i[0]=(...o)=>a.toLast&&a.toLast(...o))}),ke("img",{class:"controlImg",alt:"",src:a.stopSign?a.playbutton:a.stopbutton,onClick:i[1]||(i[1]=(...o)=>a.toPlayStop&&a.toPlayStop(...o))},null,8,D2),ke("img",{class:"controlImg",alt:"",src:w2,onClick:i[2]||(i[2]=(...o)=>a.toNext&&a.toNext(...o))})]),ke("div",{class:"right-item button-wrap",onClick:i[3]||(i[3]=(...o)=>a.changeScreen&&a.changeScreen(...o))},[ke("img",{class:"firstImg",alt:"",src:a.nowScreen=="vertical"?a.changeHor:a.changeVer},null,8,B2)])])])}const OI=fs(y2,[["render",R2],["__scopeId","data-v-32a1e720"]]);var up=function(a,i,t){if(a==null)return null;const{yellowlight:e,redlight:n,greenlight:r,bluegreen:o,yellowgreen:s,redyellow:l,bluelight:u}=Oa;var c={temp:[{min:Number.NEGATIVE_INFINITY,max:20,image:u,color:"#52A0FF",fcolor:"rgba(0, 95, 163, 0.76)"},{min:20,max:22,image:o,color:"#40DDCE",fcolor:"rgba(0, 160, 163, 0.76)"},{min:22,max:27,image:r,color:"#7ED874",fcolor:"rgba(34, 139, 81, 0.76)"},{min:27,max:28,image:s,color:"#C4E34F",fcolor:"rgba(133, 148, 0, 0.76)"},{min:28,max:30,image:l,color:"#EE9F2B",fcolor:"rgba(173, 107, 0, 0.8)"},{min:30,max:Number.POSITIVE_INFINITY,image:n,color:"#F5483D",fcolor:"rgba(154, 40, 40, 0.8)"}],humidity:[{min:0,max:30,image:n,color:"#F5483D",fcolor:"rgba(173, 107, 0, 0.8)"},{min:30,max:35,image:l,color:"#EE9F2B",fcolor:"rgba(133, 148, 0, 0.76)"},{min:35,max:65,image:r,color:"#7ED874",fcolor:"rgba(34, 139, 81, 0.76)"},{min:65,max:95,image:o,color:"#40DDCE",fcolor:"rgba(0, 160, 163, 0.76)"},{min:95,max:Number.POSITIVE_INFINITY,image:u,color:"#52A0FF",fcolor:"rgba(0, 95, 163, 0.76)"}],co2:[{min:0,max:800,image:r,color:"#7ED874",fcolor:"rgba(34, 139, 81, 0.76)"},{min:800,max:1e3,image:s,color:"#C4E34F",fcolor:"rgba(133, 148, 0, 0.76)"},{min:1e3,max:2500,image:l,color:"#EE9F2B",fcolor:"rgba(173, 107, 0, 0.8)"},{min:2500,max:Number.POSITIVE_INFINITY,image:n,color:"#F5483D",fcolor:"rgba(154, 40, 40, 0.8)"}],methanal:[{min:0,max:.08,image:r,color:"#7ED874",fcolor:"rgba(34, 139, 81, 0.76)"},{min:.08,max:.1,image:s,color:"#C4E34F",fcolor:"rgba(133, 148, 0, 0.76)"},{min:.1,max:.2,image:l,color:"#EE9F2B",fcolor:"rgba(173, 107, 0, 0.8)"},{min:.2,max:Number.POSITIVE_INFINITY,image:n,color:"#F5483D",fcolor:"rgba(154, 40, 40, 0.8)"}],pm25:[{min:0,max:35,image:r,color:"#7ED874",fcolor:"rgba(34, 139, 81, 0.76)"},{min:35,max:75,image:s,color:"#C4E34F",fcolor:"rgba(133, 148, 0, 0.76)"},{min:75,max:150,image:e,color:"#EFD62E",fcolor:"rgba(156, 137, 0, 0.76)"},{min:150,max:250,image:l,color:"#EE9F2B",fcolor:"rgba(173, 107, 0, 0.8)"},{min:250,max:Number.POSITIVE_INFINITY,image:n,color:"#F5483D",fcolor:"rgba(154, 40, 40, 0.8)"}]},f=c[i],h=null;return f.forEach(d=>{a>=d.min&&a{T1().then(n=>{let r=n.data.data||[];e.forEach(o=>{var s=r.filter(u=>u.code==o.code),l=(s[0]||{}).data;o.value=l&&Number(l.toFixed(o.fixed))}),t.realDataArr=e}).catch(n=>{t.realDataArr=e})}),{...us(t)}}});const N2=a=>(Ds("data-v-6bea809c"),a=a(),Bs(),a),k2=N2(()=>ke("div",{class:"head-title"},[ke("span",null,"\u5B9E\u65F6\u6570\u636E"),ke("span",{class:"subhead-title"},"\u4E3B\u52A8\u5F0F\u7A7A\u8C03\uFF0C\u4F1A\u547C\u5438\u7684\u5199\u5B57\u697C")],-1)),z2={class:"contain"},Y2={class:"content_value"},H2={class:"value"},W2={class:"unit"},G2={class:"content_name"};function V2(a,i,t,e,n,r){return Dr(),Lr("div",{class:Ts(["NowData",[a.screenType==="hor"?"horiNowClass":"verticalNowData"]])},[k2,ke("div",z2,[(Dr(!0),Lr(Hl,null,Wl(a.realDataArr,(o,s)=>(Dr(),Lr("div",{class:"item",key:s},[ke("div",{class:"item_content",style:Qs({backgroundImage:"url("+a.selectColor(o.value,o.id)+")"})},[ke("div",Y2,[ke("span",H2,nr(o.value),1),ke("span",W2,nr(o.unit),1)]),ke("div",G2,[ke("span",null,nr(o.name),1)])],4)]))),128))])],2)}const II=fs(F2,[["render",V2],["__scopeId","data-v-6bea809c"]]),$2=ss({props:{screenType:{type:String}},setup(a,i){const{lastco2:t,lasthumidity:e,lastmethanal:n,lastpm25:r,lasttemp:o}=Oa,s=ls({lastDataArr:[]}),l=[{id:"temp",name:"\u6E29\u5EA6",code:"Tdb",unit:"\u2103",maxName:"\u6700\u9AD8\u6E29",minName:"\u6700\u4F4E\u6E29",img:o,fixed:1},{id:"humidity",name:"\u6E7F\u5EA6",code:"RH",unit:"%",maxName:"\u6700\u5927\u503C",max:50,minName:"\u6700\u5C0F\u503C",min:20,img:e,fixed:0},{id:"co2",name:"CO2",code:"CO2",value:2600,unit:"ppm",maxName:"\u6700\u5927\u503C",max:2600,minName:"\u6700\u5C0F\u503C",min:300,img:t,fixed:0},{id:"methanal",name:"\u7532\u919B",code:"HCHO",value:.03,unit:"mg/m\xB3",maxName:"\u6700\u5927\u503C",max:.01,minName:"\u6700\u5C0F\u503C",min:.07,img:n,fixed:2},{id:"pm25",name:"PM2.5",code:"PM2d5",value:120,unit:"ug/m\xB3",maxColor:"#C4E34F",minColor:"#7ed874",maxName:"\u6700\u5927\u503C",max:340,minName:"\u6700\u5C0F\u503C",min:20,img:r,fixed:0}];return Ho(()=>{A1().then(u=>{var c=u.data.data||[];l.forEach(f=>{var h=c.filter(v=>v.code==f.code),d=h[0]||{};f.value=d.avgData?Number(d.avgData.toFixed(f.fixed)):d.avgData,f.max=d.maxData?Number(d.maxData.toFixed(f.fixed)):d.maxData,f.min=d.minData?Number(d.minData.toFixed(f.fixed)):d.minData}),s.lastDataArr=l}).catch(u=>{s.lastDataArr=l})}),{...us(s)}}});const X2=a=>(Ds("data-v-46ba594c"),a=a(),Bs(),a),U2=X2(()=>ke("div",{class:"subhead-title"},[ke("span",null,"\u4E0A\u6708\u6570\u636E")],-1)),K2={class:"itemWrap"},Z2={class:"item-left"},Q2=["src"],J2={class:"item-right"},q2={class:"item-value"},tx={class:"item-content"},ex={class:"item-content-right"},nx={class:"max"},rx={class:"min"};function ix(a,i,t,e,n,r){return Dr(),Lr("div",{class:Ts(["lastMonth",[a.screenType==="hor"?"horiLastMonth":"verLastMonth"]])},[U2,ke("div",K2,[(Dr(!0),Lr(Hl,null,Wl(a.lastDataArr,(o,s)=>(Dr(),Lr("div",{class:"item",key:s},[ke("div",Z2,[ke("img",{src:o.img},null,8,Q2)]),ke("div",J2,[ke("div",q2,[ke("span",null,nr(o.value),1),ke("span",null,nr(o.unit),1)]),ke("div",tx,[ke("div",ex,[ke("div",nx,[ke("span",null,nr(o.maxName),1),ke("span",null,nr(o.max),1),ke("span",null,nr(o.unit),1)]),ke("div",rx,[ke("span",null,nr(o.minName),1),ke("span",null,nr(o.min),1),ke("span",null,nr(o.unit),1)])])])])]))),128))])],2)}const jI=fs($2,[["render",ix],["__scopeId","data-v-46ba594c"]]);function fp(){const a=tu(),i=tu();return Ho(()=>{O1().then(t=>{var e=t.data.data||{},n=e.openRate||0;a.value=n&&Number((n*100).toFixed(0)),i.value=!!n}).catch(t=>{})}),{airValue:a,airStatus:i}}const ax=ss({props:{navigateItem:{type:String},color:{type:String}},setup(a,i){const{airValue:t,airStatus:e}=fp(),n=ls({airValue:t,airStatus:e});return{...us(n)}}});const ox=a=>(Ds("data-v-242cac08"),a=a(),Bs(),a),sx={class:"airSwitch verAirClass"},lx={class:"subhead-title"},ux={class:"air-cont"},fx={class:"air-left"},cx={class:"bar-box"},hx={class:"air-rate"},dx=ox(()=>ke("span",null,"\u7A7A\u8C03\u5F00\u542F\u7387",-1)),vx={class:"air-rate-value"};function gx(a,i,t,e,n,r){return Dr(),Lr("div",sx,[ke("div",lx,[ke("span",null,nr(a.airStatus?"\u7A7A\u8C03\u5DF2\u5F00\u542F":"\u7A7A\u8C03\u5DF2\u5173\u95ED"),1)]),ke("div",ux,[ke("div",fx,[ke("div",cx,[ke("div",{class:"bar",style:Qs({width:a.airValue+"%"})},null,4)]),ke("div",hx,[dx,ke("span",vx,nr(a.airValue)+"%",1)])])])])}const LI=fs(ax,[["render",gx],["__scopeId","data-v-242cac08"]]);var Ah=function(a,i){return Ah=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Ah(a,i)};function je(a,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");Ah(a,i);function t(){this.constructor=a}a.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}var ct=function(){return ct=Object.assign||function(i){for(var t,e=1,n=arguments.length;e0&&r[r.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!r||u[1]>r[0]&&u[1]=a.length&&(a=void 0),{value:a&&a[e++],done:!a}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function Pn(a,i){var t=typeof Symbol=="function"&&a[Symbol.iterator];if(!t)return a;var e=t.call(a),n,r=[],o;try{for(;(i===void 0||i-- >0)&&!(n=e.next()).done;)r.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(t=e.return)&&t.call(e)}finally{if(o)throw o.error}}return r}function ku(){for(var a=0,i=0,t=arguments.length;i-1:!1},Co=function(a,i){if(!io(a))return a;for(var t=[],e=0;et?t:a},Jc=function(a,i){var t=i.toString(),e=t.indexOf(".");if(e===-1)return Math.round(a);var n=t.substr(e+1).length;return n>20&&(n=20),parseFloat(a.toFixed(n))},or=function(a){return Dl(a,"Number")},Px=1e-5;function Ai(a,i,t){return t===void 0&&(t=Px),Math.abs(a-i)i?(e&&(clearTimeout(e),e=null),s=c,o=a.apply(n,r),e||(n=r=null)):!e&&t.trailing!==!1&&(e=setTimeout(l,f)),o};return u.cancel=function(){clearTimeout(e),s=0,e=n=r=null},u},Yx=function(a){return io(a)?Array.prototype.slice.call(a):[]};var gf={};const fl=function(a){return a=a||"g",gf[a]?gf[a]+=1:gf[a]=1,a+gf[a]},Js=function(){};function Fa(a){return qe(a)?0:io(a)?a.length:Object.keys(a).length}var pf;const mf=wc(function(a,i){i===void 0&&(i={});var t=i.fontSize,e=i.fontFamily,n=i.fontWeight,r=i.fontStyle,o=i.fontVariant;return pf||(pf=document.createElement("canvas").getContext("2d")),pf.font=[r,o,n,t+"px",e].join(" "),pf.measureText($n(a)?a:"").width},function(a,i){return i===void 0&&(i={}),ku([a],md(i)).join("")}),Hx=function(a,i,t,e){e===void 0&&(e="...");var n=16,r=mf(e,t),o=$n(a)?a:xc(a),s=i,l=[],u,c;if(mf(a,t)<=i)return a;for(;u=o.substr(0,n),c=mf(u,t),!(c+r>s&&c>s);)if(l.push(u),s-=c,o=o.substr(n),!o)return l.join("");for(;u=o.substr(0,1),c=mf(u,t),!(c+r>s);)if(l.push(u),s-=c,o=o.substr(1),!o)return l.join("");return""+l.join("")+e};var Wx=function(){function a(){this.map={}}return a.prototype.has=function(i){return this.map[i]!==void 0},a.prototype.get=function(i,t){var e=this.map[i];return e===void 0?t:e},a.prototype.set=function(i,t){this.map[i]=t},a.prototype.clear=function(){this.map={}},a.prototype.delete=function(i){delete this.map[i]},a.prototype.size=function(){return Object.keys(this.map).length},a}(),Gr;(function(a){a.FORE="fore",a.MID="mid",a.BG="bg"})(Gr||(Gr={}));var hn;(function(a){a.TOP="top",a.TOP_LEFT="top-left",a.TOP_RIGHT="top-right",a.RIGHT="right",a.RIGHT_TOP="right-top",a.RIGHT_BOTTOM="right-bottom",a.LEFT="left",a.LEFT_TOP="left-top",a.LEFT_BOTTOM="left-bottom",a.BOTTOM="bottom",a.BOTTOM_LEFT="bottom-left",a.BOTTOM_RIGHT="bottom-right",a.RADIUS="radius",a.CIRCLE="circle",a.NONE="none"})(hn||(hn={}));var di;(function(a){a.AXIS="axis",a.GRID="grid",a.LEGEND="legend",a.TOOLTIP="tooltip",a.ANNOTATION="annotation",a.SLIDER="slider",a.SCROLLBAR="scrollbar",a.OTHER="other"})(di||(di={}));var Kl={FORE:3,MID:2,BG:1},wr;(function(a){a.BEFORE_RENDER="beforerender",a.AFTER_RENDER="afterrender",a.BEFORE_PAINT="beforepaint",a.AFTER_PAINT="afterpaint",a.BEFORE_CHANGE_DATA="beforechangedata",a.AFTER_CHANGE_DATA="afterchangedata",a.BEFORE_CLEAR="beforeclear",a.AFTER_CLEAR="afterclear",a.BEFORE_DESTROY="beforedestroy",a.BEFORE_CHANGE_SIZE="beforechangesize",a.AFTER_CHANGE_SIZE="afterchangesize"})(wr||(wr={}));var nl;(function(a){a.BEFORE_DRAW_ANIMATE="beforeanimate",a.AFTER_DRAW_ANIMATE="afteranimate",a.BEFORE_RENDER_LABEL="beforerenderlabel",a.AFTER_RENDER_LABEL="afterrenderlabel"})(nl||(nl={}));var Aa;(function(a){a.MOUSE_ENTER="plot:mouseenter",a.MOUSE_DOWN="plot:mousedown",a.MOUSE_MOVE="plot:mousemove",a.MOUSE_UP="plot:mouseup",a.MOUSE_LEAVE="plot:mouseleave",a.TOUCH_START="plot:touchstart",a.TOUCH_MOVE="plot:touchmove",a.TOUCH_END="plot:touchend",a.TOUCH_CANCEL="plot:touchcancel",a.CLICK="plot:click",a.DBLCLICK="plot:dblclick",a.CONTEXTMENU="plot:contextmenu",a.LEAVE="plot:leave",a.ENTER="plot:enter"})(Aa||(Aa={}));var Kf;(function(a){a.ACTIVE="active",a.INACTIVE="inactive",a.SELECTED="selected",a.DEFAULT="default"})(Kf||(Kf={}));var Vl=["color","shape","size"],ur="_origin",Tv=1,Av=1,Ov=.25,wp={};function Gx(a){var i=wp[a];if(!i)throw new Error("G engine '".concat(a,"' is not exist, please register it at first."));return i}function Ep(a,i){wp[a]=i}function Fl(a,i,t){if(a){if(typeof a.addEventListener=="function")return a.addEventListener(i,t,!1),{remove:function(){a.removeEventListener(i,t,!1)}};if(typeof a.attachEvent=="function")return a.attachEvent("on"+i,t),{remove:function(){a.detachEvent("on"+i,t)}}}}var bu,th,Mp,Ih;function Vx(){bu=document.createElement("table"),th=document.createElement("tr"),Mp=/^\s*<(\w+|!)[^>]*>/,Ih={tr:document.createElement("tbody"),tbody:bu,thead:bu,tfoot:bu,td:th,th,"*":document.createElement("div")}}function rl(a){bu||Vx();var i=Mp.test(a)&&RegExp.$1;(!i||!(i in Ih))&&(i="*");var t=Ih[i];a=typeof a=="string"?a.replace(/(^\s*)|(\s*$)/g,""):a,t.innerHTML=""+a;var e=t.childNodes[0];return e&&t.contains(e)&&t.removeChild(e),e}function Ba(a,i,t){var e;try{e=window.getComputedStyle?window.getComputedStyle(a,null)[i]:a.style[i]}catch(n){}finally{e=e===void 0?t:e}return e}function $x(a,i){var t=Ba(a,"height",i);return t==="auto"&&(t=a.offsetHeight),parseFloat(t)}function Xx(a,i){var t=$x(a,i),e=parseFloat(Ba(a,"borderTopWidth"))||0,n=parseFloat(Ba(a,"paddingTop"))||0,r=parseFloat(Ba(a,"paddingBottom"))||0,o=parseFloat(Ba(a,"borderBottomWidth"))||0,s=parseFloat(Ba(a,"marginTop"))||0,l=parseFloat(Ba(a,"marginBottom"))||0;return t+e+o+n+r+s+l}function Ux(a,i){var t=Ba(a,"width",i);return t==="auto"&&(t=a.offsetWidth),parseFloat(t)}function Kx(a,i){var t=Ux(a,i),e=parseFloat(Ba(a,"borderLeftWidth"))||0,n=parseFloat(Ba(a,"paddingLeft"))||0,r=parseFloat(Ba(a,"paddingRight"))||0,o=parseFloat(Ba(a,"borderRightWidth"))||0,s=parseFloat(Ba(a,"marginRight"))||0,l=parseFloat(Ba(a,"marginLeft"))||0;return t+e+o+n+r+l+s}function Ji(a,i){if(a)for(var t in i)i.hasOwnProperty(t)&&(a.style[t]=i[t]);return a}function Zx(a){var i=getComputedStyle(a);return{width:(a.clientWidth||parseInt(i.width,10))-parseInt(i.paddingLeft,10)-parseInt(i.paddingRight,10),height:(a.clientHeight||parseInt(i.height,10))-parseInt(i.paddingTop,10)-parseInt(i.paddingBottom,10)}}function Iv(a){return typeof a=="number"&&!isNaN(a)}function jv(a,i,t,e){var n=t,r=e;if(i){var o=Zx(a);n=o.width?o.width:n,r=o.height?o.height:r}return{width:Math.max(Iv(n)?n:Tv,Tv),height:Math.max(Iv(r)?r:Av,Av)}}function Qx(a){var i=a.parentNode;i&&i.removeChild(a)}var Jx="*",bp=function(){function a(){this._events={}}return a.prototype.on=function(i,t,e){return this._events[i]||(this._events[i]=[]),this._events[i].push({callback:t,once:!!e}),this},a.prototype.once=function(i,t){return this.on(i,t,!0)},a.prototype.emit=function(i){for(var t=this,e=[],n=1;n2&&(t.push([n].concat(o.splice(0,2))),s="l",n=n==="m"?"l":"L"),s==="o"&&o.length===1&&t.push([n,o[0]]),s==="r")t.push([n].concat(o));else for(;o.length>=i[s]&&(t.push([n].concat(o.splice(0,i[s]))),!!i[s]););return a}),t},jh=function(a,i){for(var t=[],e=0,n=a.length;n-2*!i>e;e+=2){var r=[{x:+a[e-2],y:+a[e-1]},{x:+a[e],y:+a[e+1]},{x:+a[e+2],y:+a[e+3]},{x:+a[e+4],y:+a[e+5]}];i?e?n-4===e?r[3]={x:+a[0],y:+a[1]}:n-2===e&&(r[2]={x:+a[0],y:+a[1]},r[3]={x:+a[2],y:+a[3]}):r[0]={x:+a[n-2],y:+a[n-1]}:n-4===e?r[3]=r[2]:e||(r[0]={x:+a[e],y:+a[e+1]}),t.push(["C",(-r[0].x+6*r[1].x+r[2].x)/6,(-r[0].y+6*r[1].y+r[2].y)/6,(r[1].x+6*r[2].x-r[3].x)/6,(r[1].y+6*r[2].y-r[3].y)/6,r[2].x,r[2].y])}return t},yf=function(a,i,t,e,n){var r=[];if(n===null&&e===null&&(e=t),a=+a,i=+i,t=+t,e=+e,n!==null){var o=Math.PI/180,s=a+t*Math.cos(-e*o),l=a+t*Math.cos(-n*o),u=i+t*Math.sin(-e*o),c=i+t*Math.sin(-n*o);r=[["M",s,u],["A",t,t,0,+(n-e>180),0,l,c]]}else r=[["M",a,i],["m",0,-e],["a",t,e,0,1,1,0,2*e],["a",t,e,0,1,1,0,-2*e],["z"]];return r},Lh=function(a){if(a=$l(a),!a||!a.length)return[["M",0,0]];var i=[],t=0,e=0,n=0,r=0,o=0,s,l;a[0][0]==="M"&&(t=+a[0][1],e=+a[0][2],n=t,r=e,o++,i[0]=["M",t,e]);for(var u=a.length===3&&a[0][0]==="M"&&a[1][0].toUpperCase()==="R"&&a[2][0].toUpperCase()==="Z",c=void 0,f=void 0,h=o,d=a.length;h1&&(M=Math.sqrt(M),t=M*t,e=M*e);var _=t*t,D=e*e,C=(r===o?-1:1)*Math.sqrt(Math.abs((_*D-_*x*x-D*w*w)/(_*x*x+D*w*w)));p=C*t*x/e+(a+s)/2,m=C*-e*w/t+(i+l)/2,v=Math.asin(((i-m)/e).toFixed(9)),g=Math.asin(((l-m)/e).toFixed(9)),v=ag&&(v=v-Math.PI*2),!o&&g>v&&(g=g-Math.PI*2)}var F=g-v;if(Math.abs(F)>c){var k=g,j=s,V=l;g=v+c*(o&&g>v?1:-1),s=p+t*Math.cos(g),l=m+e*Math.sin(g),h=_p(s,l,t,e,n,0,o,j,V,[g,k,p,m])}F=g-v;var st=Math.cos(v),yt=Math.sin(v),Q=Math.cos(g),it=Math.sin(g),Pt=Math.tan(F/4),ht=4/3*t*Pt,lt=4/3*e*Pt,U=[a,i],xt=[a+ht*yt,i-lt*st],Gt=[s+ht*it,l-lt*Q],Bt=[s,l];if(xt[0]=2*U[0]-xt[0],xt[1]=2*U[1]-xt[1],u)return[xt,Gt,Bt].concat(h);h=[xt,Gt,Bt].concat(h).join().split(",");for(var Qt=[],Ie=0,_e=h.length;Ie<_e;Ie++)Qt[Ie]=Ie%2?y(h[Ie-1],h[Ie],f).y:y(h[Ie],h[Ie+1],f).x;return Qt},Dh=function(a,i){var t=Lh(a),e=i&&Lh(i),n={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=[],s=[],l="",u="",c,f=function(w,x,M){var _,D;if(!w)return["C",x.x,x.y,x.x,x.y,x.x,x.y];switch(!(w[0]in{T:1,Q:1})&&(x.qx=x.qy=null),w[0]){case"M":x.X=w[1],x.Y=w[2];break;case"A":w=["C"].concat(_p.apply(0,[x.x,x.y].concat(w.slice(1))));break;case"S":M==="C"||M==="S"?(_=x.x*2-x.bx,D=x.y*2-x.by):(_=x.x,D=x.y),w=["C",_,D].concat(w.slice(1));break;case"T":M==="Q"||M==="T"?(x.qx=x.x*2-x.qx,x.qy=x.y*2-x.qy):(x.qx=x.x,x.qy=x.y),w=["C"].concat(Lv(x.x,x.y,x.qx,x.qy,w[1],w[2]));break;case"Q":x.qx=w[1],x.qy=w[2],w=["C"].concat(Lv(x.x,x.y,w[1],w[2],w[3],w[4]));break;case"L":w=["C"].concat(xf(x.x,x.y,w[1],w[2]));break;case"H":w=["C"].concat(xf(x.x,x.y,w[1],x.y));break;case"V":w=["C"].concat(xf(x.x,x.y,x.x,w[1]));break;case"Z":w=["C"].concat(xf(x.x,x.y,x.X,x.Y));break}return w},h=function(w,x){if(w[x].length>7){w[x].shift();for(var M=w[x];M.length;)o[x]="A",e&&(s[x]="A"),w.splice(x++,0,["C"].concat(M.splice(0,6)));w.splice(x,1),c=Math.max(t.length,e&&e.length||0)}},d=function(w,x,M,_,D){w&&x&&w[D][0]==="M"&&x[D][0]!=="M"&&(x.splice(D,0,["M",_.x,_.y]),M.bx=0,M.by=0,M.x=w[D][1],M.y=w[D][2],c=Math.max(t.length,e&&e.length||0))};c=Math.max(t.length,e&&e.length||0);for(var v=0;v1?1:l<0?0:l;for(var u=l/2,c=12,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,v=0;v0&&d<1&&l.push(d);continue}var g=f*f-4*h*c,p=Math.sqrt(g);if(!(g<0)){var m=(-f+p)/(2*c);m>0&&m<1&&l.push(m);var y=(-f-p)/(2*c);y>0&&y<1&&l.push(y)}}for(var w=l.length,x=w,M;w--;)d=l[w],M=1-d,u[0][w]=M*M*M*a+3*M*M*d*t+3*M*d*d*n+d*d*d*o,u[1][w]=M*M*M*i+3*M*M*d*e+3*M*d*d*r+d*d*d*s;return u[0][x]=a,u[1][x]=i,u[0][x+1]=o,u[1][x+1]=s,u[0].length=u[1].length=x+2,{min:{x:Math.min.apply(0,u[0]),y:Math.min.apply(0,u[1])},max:{x:Math.max.apply(0,u[0]),y:Math.max.apply(0,u[1])}}},rw=function(a,i,t,e,n,r,o,s){if(!(Math.max(a,t)Math.max(n,o)||Math.max(i,e)Math.max(r,s))){var l=(a*e-i*t)*(n-o)-(a-t)*(n*s-r*o),u=(a*e-i*t)*(r-s)-(i-e)*(n*s-r*o),c=(a-t)*(r-s)-(i-e)*(n-o);if(!!c){var f=l/c,h=u/c,d=+f.toFixed(2),v=+h.toFixed(2);if(!(d<+Math.min(a,t).toFixed(2)||d>+Math.max(a,t).toFixed(2)||d<+Math.min(n,o).toFixed(2)||d>+Math.max(n,o).toFixed(2)||v<+Math.min(i,e).toFixed(2)||v>+Math.max(i,e).toFixed(2)||v<+Math.min(r,s).toFixed(2)||v>+Math.max(r,s).toFixed(2)))return{x:f,y:h}}}},Hs=function(a,i,t){return i>=a.x&&i<=a.x+a.width&&t>=a.y&&t<=a.y+a.height},Cp=function(a,i,t,e,n){if(n)return[["M",+a+ +n,i],["l",t-n*2,0],["a",n,n,0,0,1,n,n],["l",0,e-n*2],["a",n,n,0,0,1,-n,n],["l",n*2-t,0],["a",n,n,0,0,1,-n,-n],["l",0,n*2-e],["a",n,n,0,0,1,n,-n],["z"]];var r=[["M",a,i],["l",t,0],["l",0,e],["l",-t,0],["z"]];return r.parsePathArray=Sp,r},Bh=function(a,i,t,e){return a===null&&(a=i=t=e=0),i===null&&(i=a.y,t=a.width,e=a.height,a=a.x),{x:a,y:i,width:t,w:t,height:e,h:e,x2:a+t,y2:i+e,cx:a+t/2,cy:i+e/2,r1:Math.min(t,e)/2,r2:Math.max(t,e)/2,r0:Math.sqrt(t*t+e*e)/2,path:Cp(a,i,t,e),vb:[a,i,t,e].join(" ")}},iw=function(a,i){return a=Bh(a),i=Bh(i),Hs(i,a.x,a.y)||Hs(i,a.x2,a.y)||Hs(i,a.x,a.y2)||Hs(i,a.x2,a.y2)||Hs(a,i.x,i.y)||Hs(a,i.x2,i.y)||Hs(a,i.x,i.y2)||Hs(a,i.x2,i.y2)||(a.xi.x||i.xa.x)&&(a.yi.y||i.ya.y)},Rv=function(a,i,t,e,n,r,o,s){ln(a)||(a=[a,i,t,e,n,r,o,s]);var l=nw.apply(null,a);return Bh(l.min.x,l.min.y,l.max.x-l.min.x,l.max.y-l.min.y)},Fv=function(a,i,t,e,n,r,o,s,l){var u=1-l,c=Math.pow(u,3),f=Math.pow(u,2),h=l*l,d=h*l,v=c*a+f*3*l*t+u*3*l*l*n+d*o,g=c*i+f*3*l*e+u*3*l*l*r+d*s,p=a+2*l*(t-a)+h*(n-2*t+a),m=i+2*l*(e-i)+h*(r-2*e+i),y=t+2*l*(n-t)+h*(o-2*n+t),w=e+2*l*(r-e)+h*(s-2*r+e),x=u*a+l*t,M=u*i+l*e,_=u*n+l*o,D=u*r+l*s,C=90-Math.atan2(p-y,m-w)*180/Math.PI;return{x:v,y:g,m:{x:p,y:m},n:{x:y,y:w},start:{x,y:M},end:{x:_,y:D},alpha:C}},aw=function(a,i,t){var e=Rv(a),n=Rv(i);if(!iw(e,n))return t?0:[];for(var r=Bv.apply(0,a),o=Bv.apply(0,i),s=~~(r/8),l=~~(o/8),u=[],c=[],f={},h=t?0:[],d=0;d=0&&D<=1&&C>=0&&C<=1&&(t?h+=1:h.push({x:_.x,y:_.y,t1:D,t2:C}))}}return h},ow=function(a,i,t){a=Dh(a),i=Dh(i);for(var e,n,r,o,s,l,u,c,f,h,d=t?0:[],v=0,g=a.length;v=3&&(f.length===3&&h.push("Q"),h=h.concat(f[1])),f.length===2&&h.push("L"),h=h.concat(f[f.length-1]),h});return c}var fw=function(a,i,t){if(t===1)return[[].concat(a)];var e=[];if(i[0]==="L"||i[0]==="C"||i[0]==="Q")e=e.concat(uw(a,i,t));else{var n=[].concat(a);n[0]==="M"&&(n[0]="L");for(var r=0;r<=t-1;r++)e.push(n)}return e},cw=function(a,i){if(a.length===1)return a;var t=a.length-1,e=i.length-1,n=t/e,r=[];if(a.length===1&&a[0][0]==="M"){for(var o=0;o=0;l--)o=r[l].index,r[l].type==="add"?a.splice(o,0,[].concat(a[o])):a.splice(o,1)}e=a.length;var f=n-e;if(e0)t=eh(t,a[e-1],1);else{a[e]=i[e];break}a[e]=["Q"].concat(t.reduce(function(n,r){return n.concat(r)},[]));break;case"T":a[e]=["T"].concat(t[0]);break;case"C":if(t.length<3)if(e>0)t=eh(t,a[e-1],2);else{a[e]=i[e];break}a[e]=["C"].concat(t.reduce(function(n,r){return n.concat(r)},[]));break;case"S":if(t.length<2)if(e>0)t=eh(t,a[e-1],1);else{a[e]=i[e];break}a[e]=["S"].concat(t.reduce(function(n,r){return n.concat(r)},[]));break;default:a[e]=i[e]}return a};const Ed=Object.freeze(Object.defineProperty({__proto__:null,catmullRomToBezier:jh,fillPath:cw,fillPathByDiff:Pp,formatPath:Rh,intersection:sw,parsePathArray:Sp,parsePathString:$l,pathToAbsolute:Lh,pathToCurve:Dh,rectPath:Cp},Symbol.toStringTag,{value:"Module"}));var sf=function(){function a(i,t){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=i,this.name=i,this.originalEvent=t,this.timeStamp=t.timeStamp}return a.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},a.prototype.stopPropagation=function(){this.propagationStopped=!0},a.prototype.toString=function(){var i=this.type;return"[Event (type="+i+")]"},a.prototype.save=function(){},a.prototype.restore=function(){},a}();function Ap(a,i){var t=a.indexOf(i);t!==-1&&a.splice(t,1)}var Nv=typeof window<"u"&&typeof window.document<"u";function Op(a,i){if(a.isCanvas())return!0;for(var t=i.getParent(),e=!1;t;){if(t===a){e=!0;break}t=t.getParent()}return e}function Yu(a){return a.cfg.visible&&a.cfg.capture}var Ec=function(a){je(i,a);function i(t){var e=a.call(this)||this;e.destroyed=!1;var n=e.getDefaultCfg();return e.cfg=Wr(n,t),e}return i.prototype.getDefaultCfg=function(){return{}},i.prototype.get=function(t){return this.cfg[t]},i.prototype.set=function(t,e){this.cfg[t]=e},i.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},i}(bp),kv=globalThis&&globalThis.__spreadArray||function(a,i,t){if(t||arguments.length===2)for(var e=0,n=i.length,r;e"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new xw:typeof navigator<"u"?Hv(navigator.userAgent):Sw()}function bw(a){return a!==""&&Mw.reduce(function(i,t){var e=t[0],n=t[1];if(i)return i;var r=n.exec(a);return!!r&&[e,r]},!1)}function Hv(a){var i=bw(a);if(!i)return null;var t=i[0],e=i[1];if(t==="searchbot")return new yw;var n=e[1]&&e[1].split(".").join("_").split("_").slice(0,3);n?n.length0&&(n=1/Math.sqrt(n)),a[0]=i[0]*n,a[1]=i[1]*n,a}function Lw(a,i){return a[0]*i[0]+a[1]*i[1]}function Dw(a,i,t){var e=i[0],n=i[1];return a[0]=t[0]*e+t[3]*n+t[6],a[1]=t[1]*e+t[4]*n+t[7],a}function Fh(a,i){var t=a[0],e=a[1],n=i[0],r=i[1],o=Math.sqrt(t*t+e*e)*Math.sqrt(n*n+r*r),s=o&&(t*n+e*r)/o;return Math.acos(Math.min(Math.max(s,-1),1))}function Bw(a,i){return a[0]===i[0]&&a[1]===i[1]}var Zl=jp;(function(){var a=jw();return function(i,t,e,n,r,o){var s,l;for(t||(t=2),e||(e=0),n?l=Math.min(n*t+e,i.length):l=i.length,s=e;s=0;return t?n?Math.PI*2-e:e:n?e:Math.PI*2-e}function Wv(a,i){var t=[],e=a[0],n=a[1],r=a[2],o=a[3],s=a[4],l=a[5],u=a[6],c=a[7],f=a[8],h=i[0],d=i[1],v=i[2],g=i[3],p=i[4],m=i[5],y=i[6],w=i[7],x=i[8];return t[0]=h*e+d*o+v*u,t[1]=h*n+d*s+v*c,t[2]=h*r+d*l+v*f,t[3]=g*e+p*o+m*u,t[4]=g*n+p*s+m*c,t[5]=g*r+p*l+m*f,t[6]=y*e+w*o+x*u,t[7]=y*n+w*s+x*c,t[8]=y*r+w*l+x*f,t}function Cs(a,i){var t=[],e=i[0],n=i[1];return t[0]=a[0]*e+a[3]*n+a[6],t[1]=a[1]*e+a[4]*n+a[7],t}function bc(a){var i=[],t=a[0],e=a[1],n=a[2],r=a[3],o=a[4],s=a[5],l=a[6],u=a[7],c=a[8],f=c*o-s*u,h=-c*r+s*l,d=u*r-o*l,v=t*f+e*h+n*d;return v?(v=1/v,i[0]=f*v,i[1]=(-c*e+n*u)*v,i[2]=(s*e-n*o)*v,i[3]=h*v,i[4]=(c*t-n*l)*v,i[5]=(-s*t+n*r)*v,i[6]=d*v,i[7]=(-u*t+e*l)*v,i[8]=(o*t-e*r)*v,i):null}var pu=ti,nh="matrix",Nw=["zIndex","capture","visible","type"],kw=["repeat"],zw=":",Yw="*";function Hw(a){for(var i=[],t=0;to.delay&&Nt(i.toAttrs,function(s,l){r.call(o.toAttrs,l)&&(delete o.toAttrs[l],delete o.fromAttrs[l])})}),a}var Bp=function(a){je(i,a);function i(t){var e=a.call(this,t)||this;e.attrs={};var n=e.getDefaultAttrs();return Wr(n,t.attrs),e.attrs=n,e.initAttrs(n),e.initAnimate(),e}return i.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},i.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},i.prototype.onCanvasChange=function(t){},i.prototype.initAttrs=function(t){},i.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},i.prototype.isGroup=function(){return!1},i.prototype.getParent=function(){return this.get("parent")},i.prototype.getCanvas=function(){return this.get("canvas")},i.prototype.attr=function(){for(var t,e=[],n=0;n0?r=Vw(r,x):n.addAnimator(this),r.push(x),this.set("animations",r),this.set("_pause",{isPaused:!1})}},i.prototype.stopAnimate=function(t){var e=this;t===void 0&&(t=!0);var n=this.get("animations");Nt(n,function(r){t&&(r.onFrame?e.attr(r.onFrame(1)):e.attr(r.toAttrs)),r.callback&&r.callback()}),this.set("animating",!1),this.set("animations",[])},i.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations"),n=t.getTime();return Nt(e,function(r){r._paused=!0,r._pauseTime=n,r.pauseCallback&&r.pauseCallback()}),this.set("_pause",{isPaused:!0,pauseTime:n}),this},i.prototype.resumeAnimate=function(){var t=this.get("timeline"),e=t.getTime(),n=this.get("animations"),r=this.get("_pause").pauseTime;return Nt(n,function(o){o.startTime=o.startTime+(e-r),o._paused=!1,o._pauseTime=null,o.resumeCallback&&o.resumeCallback()}),this.set("_pause",{isPaused:!1}),this.set("animations",n),this},i.prototype.emitDelegation=function(t,e){var n=this,r=e.propagationPath;this.getEvents();var o;t==="mouseenter"?o=e.fromShape:t==="mouseleave"&&(o=e.toShape);for(var s=function(f){var h=r[f],d=h.get("name");if(d){if((h.isGroup()||h.isCanvas&&h.isCanvas())&&o&&Op(h,o))return"break";ln(d)?Nt(d,function(v){n.emitDelegateEvent(h,v,e)}):l.emitDelegateEvent(h,d,e)}},l=this,u=0;u0)});l.length>0?(Nt(l,function(c){var f=c.getBBox();o.push(f.minX,f.maxX),s.push(f.minY,f.maxY)}),t=Ra(o),e=ua(o),n=Ra(s),r=ua(s)):(t=0,e=0,n=0,r=0);var u={x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n};return u},i.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,o=[],s=[],l=this.getChildren().filter(function(c){return c.get("visible")&&(!c.isGroup()||c.isGroup()&&c.getChildren().length>0)});l.length>0?(Nt(l,function(c){var f=c.getCanvasBBox();o.push(f.minX,f.maxX),s.push(f.minY,f.maxY)}),t=Ra(o),e=ua(o),n=Ra(s),r=ua(s)):(t=0,e=0,n=0,r=0);var u={x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n};return u},i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return t.children=[],t},i.prototype.onAttrChange=function(t,e,n){if(a.prototype.onAttrChange.call(this,t,e,n),t==="matrix"){var r=this.getTotalMatrix();this._applyChildrenMarix(r)}},i.prototype.applyMatrix=function(t){var e=this.getTotalMatrix();a.prototype.applyMatrix.call(this,t);var n=this.getTotalMatrix();n!==e&&this._applyChildrenMarix(n)},i.prototype._applyChildrenMarix=function(t){var e=this.getChildren();Nt(e,function(n){n.applyMatrix(t)})},i.prototype.addShape=function(){for(var t=[],e=0;e=0;s--){var l=t[s];if(Yu(l)&&(l.isGroup()?o=l.getShape(e,n,r):l.isHit(e,n)&&(o=l)),o)break}return o},i.prototype.add=function(t){var e=this.getCanvas(),n=this.getChildren(),r=this.get("timeline"),o=t.getParent();o&&$w(o,t,!1),t.set("parent",this),e&&Rp(t,e),r&&Fp(t,r),n.push(t),t.onCanvasChange("add"),this._applyElementMatrix(t)},i.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},i.prototype.getChildren=function(){return this.get("children")},i.prototype.sort=function(){var t=this.getChildren();Nt(t,function(e,n){return e[Nh]=n,e}),t.sort(Xw(function(e,n){return e.get("zIndex")-n.get("zIndex")})),this.onCanvasChange("sort")},i.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},i.prototype.destroy=function(){this.get("destroyed")||(this.clear(),a.prototype.destroy.call(this))},i.prototype.getFirst=function(){return this.getChildByIndex(0)},i.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},i.prototype.getChildByIndex=function(t){var e=this.getChildren();return e[t]},i.prototype.getCount=function(){var t=this.getChildren();return t.length},i.prototype.contain=function(t){var e=this.getChildren();return e.indexOf(t)>-1},i.prototype.removeChild=function(t,e){e===void 0&&(e=!0),this.contain(t)&&t.remove(e)},i.prototype.findAll=function(t){var e=[],n=this.getChildren();return Nt(n,function(r){t(r)&&e.push(r),r.isGroup()&&(e=e.concat(r.findAll(t)))}),e},i.prototype.find=function(t){var e=null,n=this.getChildren();return Nt(n,function(r){if(t(r)?e=r:r.isGroup()&&(e=r.find(t)),e)return!1}),e},i.prototype.findById=function(t){return this.find(function(e){return e.get("id")===t})},i.prototype.findByClassName=function(t){return this.find(function(e){return e.get("className")===t})},i.prototype.findAllByName=function(t){return this.findAll(function(e){return e.get("name")===t})},i}(Bp),nu=0,_u=0,mu=0,kp=1e3,Jf,Su,qf=0,Il=0,_c=0,Wu=typeof performance=="object"&&performance.now?performance:Date,zp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(a){setTimeout(a,17)};function Yp(){return Il||(zp(Uw),Il=Wu.now()+_c)}function Uw(){Il=0}function kh(){this._call=this._time=this._next=null}kh.prototype=Hp.prototype={constructor:kh,restart:function(a,i,t){if(typeof a!="function")throw new TypeError("callback is not a function");t=(t==null?Yp():+t)+(i==null?0:+i),!this._next&&Su!==this&&(Su?Su._next=this:Jf=this,Su=this),this._call=a,this._time=t,zh()},stop:function(){this._call&&(this._call=null,this._time=1/0,zh())}};function Hp(a,i,t){var e=new kh;return e.restart(a,i,t),e}function Kw(){Yp(),++nu;for(var a=Jf,i;a;)(i=Il-a._time)>=0&&a._call.call(null,i),a=a._next;--nu}function Vv(){Il=(qf=Wu.now())+_c,nu=_u=0;try{Kw()}finally{nu=0,Qw(),Il=0}}function Zw(){var a=Wu.now(),i=a-qf;i>kp&&(_c-=i,qf=a)}function Qw(){for(var a,i=Jf,t,e=1/0;i;)i._call?(e>i._time&&(e=i._time),a=i,i=i._next):(t=i._next,i._next=null,i=a?a._next=t:Jf=t);Su=a,zh(e)}function zh(a){if(!nu){_u&&(_u=clearTimeout(_u));var i=a-Il;i>24?(a<1/0&&(_u=setTimeout(Vv,a-Wu.now()-_c)),mu&&(mu=clearInterval(mu))):(mu||(qf=Wu.now(),mu=setInterval(Zw,kp)),nu=1,zp(Vv))}}function _d(a,i,t){a.prototype=i.prototype=t,t.constructor=a}function Wp(a,i){var t=Object.create(a.prototype);for(var e in i)t[e]=i[e];return t}function lf(){}var Gu=.7,tc=1/Gu,Ql="\\s*([+-]?\\d+)\\s*",Vu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",is="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Jw=/^#([0-9a-f]{3,8})$/,qw=new RegExp(`^rgb\\(${Ql},${Ql},${Ql}\\)$`),tE=new RegExp(`^rgb\\(${is},${is},${is}\\)$`),eE=new RegExp(`^rgba\\(${Ql},${Ql},${Ql},${Vu}\\)$`),nE=new RegExp(`^rgba\\(${is},${is},${is},${Vu}\\)$`),rE=new RegExp(`^hsl\\(${Vu},${is},${is}\\)$`),iE=new RegExp(`^hsla\\(${Vu},${is},${is},${Vu}\\)$`),$v={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};_d(lf,$u,{copy(a){return Object.assign(new this.constructor,this,a)},displayable(){return this.rgb().displayable()},hex:Xv,formatHex:Xv,formatHex8:aE,formatHsl:oE,formatRgb:Uv,toString:Uv});function Xv(){return this.rgb().formatHex()}function aE(){return this.rgb().formatHex8()}function oE(){return Gp(this).formatHsl()}function Uv(){return this.rgb().formatRgb()}function $u(a){var i,t;return a=(a+"").trim().toLowerCase(),(i=Jw.exec(a))?(t=i[1].length,i=parseInt(i[1],16),t===6?Kv(i):t===3?new Na(i>>8&15|i>>4&240,i>>4&15|i&240,(i&15)<<4|i&15,1):t===8?wf(i>>24&255,i>>16&255,i>>8&255,(i&255)/255):t===4?wf(i>>12&15|i>>8&240,i>>8&15|i>>4&240,i>>4&15|i&240,((i&15)<<4|i&15)/255):null):(i=qw.exec(a))?new Na(i[1],i[2],i[3],1):(i=tE.exec(a))?new Na(i[1]*255/100,i[2]*255/100,i[3]*255/100,1):(i=eE.exec(a))?wf(i[1],i[2],i[3],i[4]):(i=nE.exec(a))?wf(i[1]*255/100,i[2]*255/100,i[3]*255/100,i[4]):(i=rE.exec(a))?Jv(i[1],i[2]/100,i[3]/100,1):(i=iE.exec(a))?Jv(i[1],i[2]/100,i[3]/100,i[4]):$v.hasOwnProperty(a)?Kv($v[a]):a==="transparent"?new Na(NaN,NaN,NaN,0):null}function Kv(a){return new Na(a>>16&255,a>>8&255,a&255,1)}function wf(a,i,t,e){return e<=0&&(a=i=t=NaN),new Na(a,i,t,e)}function sE(a){return a instanceof lf||(a=$u(a)),a?(a=a.rgb(),new Na(a.r,a.g,a.b,a.opacity)):new Na}function Yh(a,i,t,e){return arguments.length===1?sE(a):new Na(a,i,t,e==null?1:e)}function Na(a,i,t,e){this.r=+a,this.g=+i,this.b=+t,this.opacity=+e}_d(Na,Yh,Wp(lf,{brighter(a){return a=a==null?tc:Math.pow(tc,a),new Na(this.r*a,this.g*a,this.b*a,this.opacity)},darker(a){return a=a==null?Gu:Math.pow(Gu,a),new Na(this.r*a,this.g*a,this.b*a,this.opacity)},rgb(){return this},clamp(){return new Na(_l(this.r),_l(this.g),_l(this.b),ec(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Zv,formatHex:Zv,formatHex8:lE,formatRgb:Qv,toString:Qv}));function Zv(){return`#${El(this.r)}${El(this.g)}${El(this.b)}`}function lE(){return`#${El(this.r)}${El(this.g)}${El(this.b)}${El((isNaN(this.opacity)?1:this.opacity)*255)}`}function Qv(){const a=ec(this.opacity);return`${a===1?"rgb(":"rgba("}${_l(this.r)}, ${_l(this.g)}, ${_l(this.b)}${a===1?")":`, ${a})`}`}function ec(a){return isNaN(a)?1:Math.max(0,Math.min(1,a))}function _l(a){return Math.max(0,Math.min(255,Math.round(a)||0))}function El(a){return a=_l(a),(a<16?"0":"")+a.toString(16)}function Jv(a,i,t,e){return e<=0?a=i=t=NaN:t<=0||t>=1?a=i=NaN:i<=0&&(a=NaN),new Yo(a,i,t,e)}function Gp(a){if(a instanceof Yo)return new Yo(a.h,a.s,a.l,a.opacity);if(a instanceof lf||(a=$u(a)),!a)return new Yo;if(a instanceof Yo)return a;a=a.rgb();var i=a.r/255,t=a.g/255,e=a.b/255,n=Math.min(i,t,e),r=Math.max(i,t,e),o=NaN,s=r-n,l=(r+n)/2;return s?(i===r?o=(t-e)/s+(t0&&l<1?0:o,new Yo(o,s,l,a.opacity)}function uE(a,i,t,e){return arguments.length===1?Gp(a):new Yo(a,i,t,e==null?1:e)}function Yo(a,i,t,e){this.h=+a,this.s=+i,this.l=+t,this.opacity=+e}_d(Yo,uE,Wp(lf,{brighter(a){return a=a==null?tc:Math.pow(tc,a),new Yo(this.h,this.s,this.l*a,this.opacity)},darker(a){return a=a==null?Gu:Math.pow(Gu,a),new Yo(this.h,this.s,this.l*a,this.opacity)},rgb(){var a=this.h%360+(this.h<0)*360,i=isNaN(a)||isNaN(this.s)?0:this.s,t=this.l,e=t+(t<.5?t:1-t)*i,n=2*t-e;return new Na(rh(a>=240?a-240:a+120,n,e),rh(a,n,e),rh(a<120?a+240:a-120,n,e),this.opacity)},clamp(){return new Yo(qv(this.h),Ef(this.s),Ef(this.l),ec(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const a=ec(this.opacity);return`${a===1?"hsl(":"hsla("}${qv(this.h)}, ${Ef(this.s)*100}%, ${Ef(this.l)*100}%${a===1?")":`, ${a})`}`}}));function qv(a){return a=(a||0)%360,a<0?a+360:a}function Ef(a){return Math.max(0,Math.min(1,a||0))}function rh(a,i,t){return(a<60?i+(t-i)*a/60:a<180?t:a<240?i+(t-i)*(240-a)/60:i)*255}const Sd=a=>()=>a;function fE(a,i){return function(t){return a+t*i}}function cE(a,i,t){return a=Math.pow(a,t),i=Math.pow(i,t)-a,t=1/t,function(e){return Math.pow(a+e*i,t)}}function hE(a){return(a=+a)==1?Vp:function(i,t){return t-i?cE(i,t,a):Sd(isNaN(i)?t:i)}}function Vp(a,i){var t=i-a;return t?fE(a,t):Sd(isNaN(a)?i:a)}const t0=function a(i){var t=hE(i);function e(n,r){var o=t((n=Yh(n)).r,(r=Yh(r)).r),s=t(n.g,r.g),l=t(n.b,r.b),u=Vp(n.opacity,r.opacity);return function(c){return n.r=o(c),n.g=s(c),n.b=l(c),n.opacity=u(c),n+""}}return e.gamma=a,e}(1);function $p(a,i){i||(i=[]);var t=a?Math.min(i.length,a.length):0,e=i.slice(),n;return function(r){for(n=0;nt&&(r=i.slice(t,r),s[o]?s[o]+=r:s[++o]=r),(e=e[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:Hh(e,n)})),t=ih.lastIndex;return tu.length?(l=$l(r[s]),u=$l(n[s]),u=Pp(u,l),u=Rh(u,l),i.fromAttrs.path=u,i.toAttrs.path=l):i.pathFormatted||(l=$l(r[s]),u=$l(n[s]),u=Rh(u,l),i.fromAttrs.path=u,i.toAttrs.path=l,i.pathFormatted=!0),e[s]=[];for(var c=0;c0){for(var s=i.animators.length-1;s>=0;s--){if(e=i.animators[s],e.destroyed){i.removeAnimator(s);continue}if(!e.isAnimatePaused()){n=e.get("animations");for(var l=n.length-1;l>=0;l--)r=n[l],t=QE(e,r,o),t&&(n.splice(l,1),t=!1,r.callback&&r.callback())}n.length===0&&i.removeAnimator(s)}var u=i.canvas.get("autoDraw");u||i.canvas.draw()}})},a.prototype.addAnimator=function(i){this.animators.push(i)},a.prototype.removeAnimator=function(i){this.animators.splice(i,1)},a.prototype.isAnimating=function(){return!!this.animators.length},a.prototype.stop=function(){this.timer&&this.timer.stop()},a.prototype.stopAllAnimations=function(i){i===void 0&&(i=!0),this.animators.forEach(function(t){t.stopAnimate(i)}),this.animators=[],this.canvas.draw()},a.prototype.getTime=function(){return this.current},a}(),qE=40,f0=0,c0=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function h0(a,i,t){t.name=i,t.target=a,t.currentTarget=a,t.delegateTarget=a,a.emit(i,t)}function tM(a,i,t){if(t.bubbles){var e=void 0,n=!1;if(i==="mouseenter"?(e=t.fromShape,n=!0):i==="mouseleave"&&(n=!0,e=t.toShape),a.isCanvas()&&n)return;if(e&&Op(a,e)){t.bubbles=!1;return}t.name=i,t.currentTarget=a,t.delegateTarget=a,a.emit(i,t)}}var eM=function(){function a(i){var t=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(e){var n=e.type;t._triggerEvent(n,e)},this._onDocumentMove=function(e){var n=t.canvas,r=n.get("el");if(r!==e.target&&(t.dragging||t.currentShape)){var o=t._getPointInfo(e);t.dragging&&t._emitEvent("drag",e,o,t.draggingShape)}},this._onDocumentMouseUp=function(e){var n=t.canvas,r=n.get("el");if(r!==e.target&&t.dragging){var o=t._getPointInfo(e);t.draggingShape&&t._emitEvent("drop",e,o,null),t._emitEvent("dragend",e,o,t.draggingShape),t._afterDrag(t.draggingShape,o,e)}},this.canvas=i.canvas}return a.prototype.init=function(){this._bindEvents()},a.prototype._bindEvents=function(){var i=this,t=this.canvas.get("el");Nt(c0,function(e){t.addEventListener(e,i._eventCallback)}),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},a.prototype._clearEvents=function(){var i=this,t=this.canvas.get("el");Nt(c0,function(e){t.removeEventListener(e,i._eventCallback)}),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},a.prototype._getEventObj=function(i,t,e,n,r,o){var s=new sf(i,t);return s.fromShape=r,s.toShape=o,s.x=e.x,s.y=e.y,s.clientX=e.clientX,s.clientY=e.clientY,s.propagationPath.push(n),s},a.prototype._getShape=function(i,t){return this.canvas.getShape(i.x,i.y,t)},a.prototype._getPointInfo=function(i){var t=this.canvas,e=t.getClientByEvent(i),n=t.getPointByEvent(i);return{x:n.x,y:n.y,clientX:e.x,clientY:e.y}},a.prototype._triggerEvent=function(i,t){var e=this._getPointInfo(t),n=this._getShape(e,t),r=this["_on"+i],o=!1;if(r)r.call(this,e,n,t);else{var s=this.currentShape;i==="mouseenter"||i==="dragenter"||i==="mouseover"?(this._emitEvent(i,t,e,null,null,n),n&&this._emitEvent(i,t,e,n,null,n),i==="mouseenter"&&this.draggingShape&&this._emitEvent("dragenter",t,e,null)):i==="mouseleave"||i==="dragleave"||i==="mouseout"?(o=!0,s&&this._emitEvent(i,t,e,s,s,null),this._emitEvent(i,t,e,null,s,null),i==="mouseleave"&&this.draggingShape&&this._emitEvent("dragleave",t,e,null)):this._emitEvent(i,t,e,n,null,null)}if(o||(this.currentShape=n),n&&!n.get("destroyed")){var l=this.canvas,u=l.get("el");u.style.cursor=n.attr("cursor")||l.get("cursor")}},a.prototype._onmousedown=function(i,t,e){e.button===f0&&(this.mousedownShape=t,this.mousedownPoint=i,this.mousedownTimeStamp=e.timeStamp),this._emitEvent("mousedown",e,i,t,null,null)},a.prototype._emitMouseoverEvents=function(i,t,e,n){var r=this.canvas.get("el");e!==n&&(e&&(this._emitEvent("mouseout",i,t,e,e,n),this._emitEvent("mouseleave",i,t,e,e,n),(!n||n.get("destroyed"))&&(r.style.cursor=this.canvas.get("cursor"))),n&&(this._emitEvent("mouseover",i,t,n,e,n),this._emitEvent("mouseenter",i,t,n,e,n)))},a.prototype._emitDragoverEvents=function(i,t,e,n,r){n?(n!==e&&(e&&this._emitEvent("dragleave",i,t,e,e,n),this._emitEvent("dragenter",i,t,n,e,n)),r||this._emitEvent("dragover",i,t,n)):e&&this._emitEvent("dragleave",i,t,e,e,n),r&&this._emitEvent("dragover",i,t,n)},a.prototype._afterDrag=function(i,t,e){i&&(i.set("capture",!0),this.draggingShape=null),this.dragging=!1;var n=this._getShape(t,e);n!==i&&this._emitMouseoverEvents(e,t,i,n),this.currentShape=n},a.prototype._onmouseup=function(i,t,e){if(e.button===f0){var n=this.draggingShape;this.dragging?(n&&this._emitEvent("drop",e,i,t),this._emitEvent("dragend",e,i,n),this._afterDrag(n,i,e)):(this._emitEvent("mouseup",e,i,t),t===this.mousedownShape&&this._emitEvent("click",e,i,t),this.mousedownShape=null,this.mousedownPoint=null)}},a.prototype._ondragover=function(i,t,e){e.preventDefault();var n=this.currentShape;this._emitDragoverEvents(e,i,n,t,!0)},a.prototype._onmousemove=function(i,t,e){var n=this.canvas,r=this.currentShape,o=this.draggingShape;if(this.dragging)o&&this._emitDragoverEvents(e,i,r,t,!1),this._emitEvent("drag",e,i,o);else{var s=this.mousedownPoint;if(s){var l=this.mousedownShape,u=e.timeStamp,c=u-this.mousedownTimeStamp,f=s.clientX-i.clientX,h=s.clientY-i.clientY,d=f*f+h*h;c>120||d>qE?l&&l.get("draggable")?(o=this.mousedownShape,o.set("capture",!1),this.draggingShape=o,this.dragging=!0,this._emitEvent("dragstart",e,i,o),this.mousedownShape=null,this.mousedownPoint=null):!l&&n.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",e,i,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(e,i,r,t),this._emitEvent("mousemove",e,i,t)):(this._emitMouseoverEvents(e,i,r,t),this._emitEvent("mousemove",e,i,t))}else this._emitMouseoverEvents(e,i,r,t),this._emitEvent("mousemove",e,i,t)}},a.prototype._emitEvent=function(i,t,e,n,r,o){var s=this._getEventObj(i,t,e,n,r,o);if(n){s.shape=n,h0(n,i,s);for(var l=n.getParent();l;)l.emitDelegation(i,s),s.propagationStopped||tM(l,i,s),s.propagationPath.push(l),l=l.getParent()}else{var u=this.canvas;h0(u,i,s)}},a.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},a}(),d0="px",v0=Ip(),nM=v0&&v0.name==="firefox",Sc=function(a){je(i,a);function i(t){var e=a.call(this,t)||this;return e.initContainer(),e.initDom(),e.initEvents(),e.initTimeline(),e}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return t.cursor="default",t.supportCSSTransform=!1,t},i.prototype.initContainer=function(){var t=this.get("container");$n(t)&&(t=document.getElementById(t),this.set("container",t))},i.prototype.initDom=function(){var t=this.createDom();this.set("el",t);var e=this.get("container");e.appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},i.prototype.initEvents=function(){var t=new eM({canvas:this});t.init(),this.set("eventController",t)},i.prototype.initTimeline=function(){var t=new JE(this);this.set("timeline",t)},i.prototype.setDOMSize=function(t,e){var n=this.get("el");Nv&&(n.style.width=t+d0,n.style.height=e+d0)},i.prototype.changeSize=function(t,e){this.setDOMSize(t,e),this.set("width",t),this.set("height",e),this.onCanvasChange("changeSize")},i.prototype.getRenderer=function(){return this.get("renderer")},i.prototype.getCursor=function(){return this.get("cursor")},i.prototype.setCursor=function(t){this.set("cursor",t);var e=this.get("el");Nv&&e&&(e.style.cursor=t)},i.prototype.getPointByEvent=function(t){var e=this.get("supportCSSTransform");if(e){if(nM&&!qe(t.layerX)&&t.layerX!==t.offsetX)return{x:t.layerX,y:t.layerY};if(!qe(t.offsetX))return{x:t.offsetX,y:t.offsetY}}var n=this.getClientByEvent(t),r=n.x,o=n.y;return this.getPointByClient(r,o)},i.prototype.getClientByEvent=function(t){var e=t;return t.touches&&(t.type==="touchend"?e=t.changedTouches[0]:e=t.touches[0]),{x:e.clientX,y:e.clientY}},i.prototype.getPointByClient=function(t,e){var n=this.get("el"),r=n.getBoundingClientRect();return{x:t-r.left,y:e-r.top}},i.prototype.getClientByPoint=function(t,e){var n=this.get("el"),r=n.getBoundingClientRect();return{x:t+r.left,y:e+r.top}},i.prototype.draw=function(){},i.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},i.prototype.clearEvents=function(){var t=this.get("eventController");t.destroy()},i.prototype.isCanvas=function(){return!0},i.prototype.getParent=function(){return null},i.prototype.destroy=function(){var t=this.get("timeline");this.get("destroyed")||(this.clear(),t&&t.stop(),this.clearEvents(),this.removeDom(),a.prototype.destroy.call(this))},i}(Np),Cc=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.isGroup=function(){return!0},i.prototype.isEntityGroup=function(){return!1},i.prototype.clone=function(){for(var t=a.prototype.clone.call(this),e=this.getChildren(),n=0;n=t&&n.minY<=e&&n.maxY>=e},i.prototype.afterAttrsChange=function(t){a.prototype.afterAttrsChange.call(this,t),this.clearCacheBBox()},i.prototype.getBBox=function(){var t=this.cfg.bbox;return t||(t=this.calculateBBox(),this.set("bbox",t)),t},i.prototype.getCanvasBBox=function(){var t=this.cfg.canvasBBox;return t||(t=this.calculateCanvasBBox(),this.set("canvasBBox",t)),t},i.prototype.applyMatrix=function(t){a.prototype.applyMatrix.call(this,t),this.set("canvasBBox",null)},i.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),n=t.minX,r=t.minY,o=t.maxX,s=t.maxY;if(e){var l=Cs(e,[t.minX,t.minY]),u=Cs(e,[t.maxX,t.minY]),c=Cs(e,[t.minX,t.maxY]),f=Cs(e,[t.maxX,t.maxY]);n=Math.min(l[0],u[0],c[0],f[0]),o=Math.max(l[0],u[0],c[0],f[0]),r=Math.min(l[1],u[1],c[1],f[1]),s=Math.max(l[1],u[1],c[1],f[1])}var h=this.attrs;if(h.shadowColor){var d=h.shadowBlur,v=d===void 0?0:d,g=h.shadowOffsetX,p=g===void 0?0:g,m=h.shadowOffsetY,y=m===void 0?0:m,w=n-v+p,x=o+v+p,M=r-v+y,_=s+v+y;n=Math.min(n,w),o=Math.max(o,x),r=Math.min(r,M),s=Math.max(s,_)}return{x:n,y:r,minX:n,minY:r,maxX:o,maxY:s,width:o-n,height:s-r}},i.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},i.prototype.isClipShape=function(){return this.get("isClipShape")},i.prototype.isInShape=function(t,e){return!1},i.prototype.isOnlyHitBox=function(){return!1},i.prototype.isHit=function(t,e){var n=this.get("startArrowShape"),r=this.get("endArrowShape"),o=[t,e,1];o=this.invertFromMatrix(o);var s=o[0],l=o[1],u=this._isInBBox(s,l);return this.isOnlyHitBox()?u:!!(u&&!this.isClipped(s,l)&&(this.isInShape(s,l)||n&&n.isHit(s,l)||r&&r.isHit(s,l)))},i}(Bp),qp=new Map;function Po(a,i){qp.set(a,i)}function Tc(a){return qp.get(a)}function tm(a){var i=a.attr(),t=i.x,e=i.y,n=i.width,r=i.height;return{x:t,y:e,width:n,height:r}}function em(a){var i=a.attr(),t=i.x,e=i.y,n=i.r;return{x:t-n,y:e-n,width:n*2,height:n*2}}function ta(a,i,t,e){var n=a-t,r=i-e;return Math.sqrt(n*n+r*r)}function Vf(a,i){return Math.abs(a-i)<.001}function fu(a,i){var t=Ra(a),e=Ra(i),n=ua(a),r=ua(i);return{x:t,y:e,width:n-t,height:r-e}}function Ac(a){return(a+Math.PI*2)%(Math.PI*2)}const Oi={box:function(a,i,t,e){return fu([a,t],[i,e])},length:function(a,i,t,e){return ta(a,i,t,e)},pointAt:function(a,i,t,e,n){return{x:(1-n)*a+n*t,y:(1-n)*i+n*e}},pointDistance:function(a,i,t,e,n,r){var o=(t-a)*(n-a)+(e-i)*(r-i);if(o<0)return ta(a,i,n,r);var s=(t-a)*(t-a)+(e-i)*(e-i);return o>s?ta(t,e,n,r):this.pointToLine(a,i,t,e,n,r)},pointToLine:function(a,i,t,e,n,r){var o=[t-a,e-i];if(Bw(o,[0,0]))return Math.sqrt((n-a)*(n-a)+(r-i)*(r-i));var s=[-o[1],o[0]];Lp(s,s);var l=[n-a,r-i];return Math.abs(Lw(l,s))},tangentAngle:function(a,i,t,e){return Math.atan2(e-i,t-a)}};var rM=1e-4;function nm(a,i,t,e,n,r){var o,s=1/0,l=[t,e],u=20;r&&r>200&&(u=r/10);for(var c=1/u,f=c/10,h=0;h<=u;h++){var d=h*c,v=[n.apply(null,a.concat([d])),n.apply(null,i.concat([d]))],g=ta(l[0],l[1],v[0],v[1]);g=0&&g=0?[n]:[]}function p0(a,i,t,e){return 2*(1-e)*(i-a)+2*e*(t-i)}function rm(a,i,t,e,n,r,o){var s=Xs(a,t,n,o),l=Xs(i,e,r,o),u=Oi.pointAt(a,i,t,e,o),c=Oi.pointAt(t,e,n,r,o);return[[a,i,u.x,u.y,s,l],[s,l,c.x,c.y,n,r]]}function Vh(a,i,t,e,n,r,o){if(o===0)return(ta(a,i,t,e)+ta(t,e,n,r)+ta(a,i,n,r))/2;var s=rm(a,i,t,e,n,r,.5),l=s[0],u=s[1];return l.push(o-1),u.push(o-1),Vh.apply(null,l)+Vh.apply(null,u)}const im={box:function(a,i,t,e,n,r){var o=g0(a,t,n)[0],s=g0(i,e,r)[0],l=[a,n],u=[i,r];return o!==void 0&&l.push(Xs(a,t,n,o)),s!==void 0&&u.push(Xs(i,e,r,s)),fu(l,u)},length:function(a,i,t,e,n,r){return Vh(a,i,t,e,n,r,3)},nearestPoint:function(a,i,t,e,n,r,o,s){return nm([a,t,n],[i,e,r],o,s,Xs)},pointDistance:function(a,i,t,e,n,r,o,s){var l=this.nearestPoint(a,i,t,e,n,r,o,s);return ta(l.x,l.y,o,s)},interpolationAt:Xs,pointAt:function(a,i,t,e,n,r,o){return{x:Xs(a,t,n,o),y:Xs(i,e,r,o)}},divide:function(a,i,t,e,n,r,o){return rm(a,i,t,e,n,r,o)},tangentAngle:function(a,i,t,e,n,r,o){var s=p0(a,t,n,o),l=p0(i,e,r,o),u=Math.atan2(l,s);return Ac(u)}};function Us(a,i,t,e,n){var r=1-n;return r*r*r*a+3*i*n*r*r+3*t*n*n*r+e*n*n*n}function m0(a,i,t,e,n){var r=1-n;return 3*(r*r*(i-a)+2*r*n*(t-i)+n*n*(e-t))}function ah(a,i,t,e){var n=-3*a+9*i-9*t+3*e,r=6*a-12*i+6*t,o=3*i-3*a,s=[],l,u,c;if(Vf(n,0))Vf(r,0)||(l=-o/r,l>=0&&l<=1&&s.push(l));else{var f=r*r-4*n*o;Vf(f,0)?s.push(-r/(2*n)):f>0&&(c=Math.sqrt(f),l=(-r+c)/(2*n),u=(-r-c)/(2*n),l>=0&&l<=1&&s.push(l),u>=0&&u<=1&&s.push(u))}return s}function am(a,i,t,e,n,r,o,s,l){var u=Us(a,t,n,o,l),c=Us(i,e,r,s,l),f=Oi.pointAt(a,i,t,e,l),h=Oi.pointAt(t,e,n,r,l),d=Oi.pointAt(n,r,o,s,l),v=Oi.pointAt(f.x,f.y,h.x,h.y,l),g=Oi.pointAt(h.x,h.y,d.x,d.y,l);return[[a,i,f.x,f.y,v.x,v.y,u,c],[u,c,g.x,g.y,d.x,d.y,o,s]]}function $h(a,i,t,e,n,r,o,s,l){if(l===0)return iM([a,t,n,o],[i,e,r,s]);var u=am(a,i,t,e,n,r,o,s,.5),c=u[0],f=u[1];return c.push(l-1),f.push(l-1),$h.apply(null,c)+$h.apply(null,f)}const Au={extrema:ah,box:function(a,i,t,e,n,r,o,s){for(var l=[a,o],u=[i,s],c=ah(a,t,n,o),f=ah(i,e,r,s),h=0;h0?t:t*-1}const aM={box:function(a,i,t,e){return{x:a-t,y:i-e,width:t*2,height:e*2}},length:function(a,i,t,e){return Math.PI*(3*(t+e)-Math.sqrt((3*t+e)*(t+3*e)))},nearestPoint:function(a,i,t,e,n,r){var o=t,s=e;if(o===0||s===0)return{x:a,y:i};for(var l=n-a,u=r-i,c=Math.abs(l),f=Math.abs(u),h=o*o,d=s*s,v=Math.PI/4,g,p,m=0;m<4;m++){g=o*Math.cos(v),p=s*Math.sin(v);var y=(h-d)*Math.pow(Math.cos(v),3)/o,w=(d-h)*Math.pow(Math.sin(v),3)/s,x=g-y,M=p-w,_=c-y,D=f-w,C=Math.hypot(M,x),F=Math.hypot(D,_),k=C*Math.asin((x*D-M*_)/(C*F)),j=k/Math.sqrt(h+d-g*g-p*p);v+=j,v=Math.min(Math.PI/2,Math.max(0,v))}return{x:a+y0(g,l),y:i+y0(p,u)}},pointDistance:function(a,i,t,e,n,r){var o=this.nearestPoint(a,i,t,e,n,r);return ta(o.x,o.y,n,r)},pointAt:function(a,i,t,e,n){var r=2*Math.PI*n;return{x:a+t*Math.cos(r),y:i+e*Math.sin(r)}},tangentAngle:function(a,i,t,e,n){var r=2*Math.PI*n,o=Math.atan2(e*Math.cos(r),-t*Math.sin(r));return Ac(o)}};function oM(a,i,t,e,n,r,o,s){return-1*t*Math.cos(n)*Math.sin(s)-e*Math.sin(n)*Math.cos(s)}function sM(a,i,t,e,n,r,o,s){return-1*t*Math.sin(n)*Math.sin(s)+e*Math.cos(n)*Math.cos(s)}function lM(a,i,t){return Math.atan(-i/a*Math.tan(t))}function uM(a,i,t){return Math.atan(i/(a*Math.tan(t)))}function x0(a,i,t,e,n,r){return t*Math.cos(n)*Math.cos(r)-e*Math.sin(n)*Math.sin(r)+a}function w0(a,i,t,e,n,r){return t*Math.sin(n)*Math.cos(r)+e*Math.cos(n)*Math.sin(r)+i}function fM(a,i,t,e){var n=Math.atan2(e*a,t*i);return(n+Math.PI*2)%(Math.PI*2)}function E0(a,i,t){return{x:a*Math.cos(t),y:i*Math.sin(t)}}function M0(a,i,t){var e=Math.cos(t),n=Math.sin(t);return[a*e-i*n,a*n+i*e]}const cM={box:function(a,i,t,e,n,r,o){for(var s=lM(t,e,n),l=1/0,u=-1/0,c=[r,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var h=s+f;ru&&(u=d)}for(var v=uM(t,e,n),g=1/0,p=-1/0,m=[r,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var y=v+f;rp&&(p=w)}return{x:l,y:g,width:u-l,height:p-g}},length:function(a,i,t,e,n,r,o){},nearestPoint:function(a,i,t,e,n,r,o,s,l){var u=M0(s-a,l-i,-n),c=u[0],f=u[1],h=aM.nearestPoint(0,0,t,e,c,f),d=fM(t,e,h.x,h.y);do&&(h=E0(t,e,o));var v=M0(h.x,h.y,n);return{x:v[0]+a,y:v[1]+i}},pointDistance:function(a,i,t,e,n,r,o,s,l){var u=this.nearestPoint(a,i,t,e,s,l);return ta(u.x,u.y,s,l)},pointAt:function(a,i,t,e,n,r,o,s){var l=(o-r)*s+r;return{x:x0(a,i,t,e,n,l),y:w0(a,i,t,e,n,l)}},tangentAngle:function(a,i,t,e,n,r,o,s){var l=(o-r)*s+r,u=oM(a,i,t,e,n,r,o,l),c=sM(a,i,t,e,n,r,o,l);return Ac(Math.atan2(c,u))}};function om(a){for(var i=0,t=[],e=0;e1||i<0||a.length<2)return null;var t=om(a),e=t.segments,n=t.totalLength;if(n===0)return{x:a[0][0],y:a[0][1]};for(var r=0,o=null,s=0;s=r&&i<=r+f){var h=(i-r)/f;o=Oi.pointAt(u[0],u[1],c[0],c[1],h);break}r+=f}return o}function vM(a,i){if(i>1||i<0||a.length<2)return 0;for(var t=om(a),e=t.segments,n=t.totalLength,r=0,o=0,s=0;s=r&&i<=r+f){o=Math.atan2(c[1]-u[1],c[0]-u[0]);break}r+=f}return o}function gM(a,i,t){for(var e=1/0,n=0;n1){var n=yM(i,t);return i*e+n*(e-1)}return i}function yM(a,i){return i?i-a:a*.14}function xM(a,i){var t=Oc(),e=0;if(qe(a)||a==="")return e;if(t.save(),t.font=i,$n(a)&&a.includes(` `)){var n=a.split(` `);Nt(n,function(r){var o=t.measureText(r).width;e1){var n=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=n}Nt(t,function(r,o){isNaN(r)||(t[o]=+r)}),i[e]=t}),i}function _M(a,i,t,e){var n=[],r=!!e,o,s,l,u,c,f,h;if(r){l=e[0],u=e[1];for(var d=0,v=a.length;d2&&(t.push([n].concat(o.splice(0,2))),s="l",n=n==="m"?"l":"L"),s==="o"&&o.length===1&&t.push([n,o[0]]),s==="r")t.push([n].concat(o));else for(;o.length>=i[s]&&(t.push([n].concat(o.splice(0,i[s]))),!!i[s]););return""}),t}var TM=/[a-z]/;function _0(a,i){return[i[0]+(i[0]-a[0]),i[1]+(i[1]-a[1])]}function um(a){var i=lm(a);if(!i||!i.length)return[["M",0,0]];for(var t=!1,e=0;e=0){t=!0;break}}if(!t)return i;var r=[],o=0,s=0,l=0,u=0,c=0,f=i[0];(f[0]==="M"||f[0]==="m")&&(o=+f[1],s=+f[2],l=o,u=s,c++,r[0]=["M",o,s]);for(var e=c,h=i.length;e1&&(t*=Math.sqrt(d),e*=Math.sqrt(d));var v=t*t*(h*h)+e*e*(f*f),g=v?Math.sqrt((t*t*(e*e)-v)/v):1;r===o&&(g*=-1),isNaN(g)&&(g=0);var p=e?g*t*h/e:0,m=t?g*-e*f/t:0,y=(s+u)/2+Math.cos(n)*p-Math.sin(n)*m,w=(l+c)/2+Math.sin(n)*p+Math.cos(n)*m,x=[(f-p)/t,(h-m)/e],M=[(-1*f-p)/t,(-1*h-m)/e],_=S0([1,0],x),D=S0(x,M);return Xh(x,M)<=-1&&(D=Math.PI),Xh(x,M)>=1&&(D=0),o===0&&D>0&&(D=D-2*Math.PI),o===1&&D<0&&(D=D+2*Math.PI),{cx:y,cy:w,rx:Uh(a,[u,c])?0:t,ry:Uh(a,[u,c])?0:e,startAngle:_,endAngle:_+D,xRotation:n,arcFlag:r,sweepFlag:o}}function C0(a,i){return[i[0]+(i[0]-a[0]),i[1]+(i[1]-a[1])]}function fm(a){a=bM(a);for(var i=[],t=null,e=null,n=null,r=0,o=a.length,s=0;s=i&&a<=t};function OM(a,i,t,e){var n=.001,r={x:t.x-a.x,y:t.y-a.y},o={x:i.x-a.x,y:i.y-a.y},s={x:e.x-t.x,y:e.y-t.y},l=o.x*s.y-o.y*s.x,u=l*l,c=o.x*o.x+o.y*o.y,f=s.x*s.x+s.y*s.y,h=null;if(u>n*c*f){var d=(r.x*s.y-r.y*s.x)/l,v=(r.x*o.y-r.y*o.x)/l;P0(d,0,1)&&P0(v,0,1)&&(h={x:a.x+d*o.x,y:a.y+d*o.y})}return h}var IM=1e-6;function sh(a){return Math.abs(a)0!=sh(s[1]-t)>0&&sh(i-(t-o[1])*(o[0]-s[0])/(o[1]-s[1])-o[0])<0&&(e=!e)}return e}function A0(a){for(var i=[],t=a.length,e=0;e1){var o=a[0],s=a[t-1];i.push({from:{x:s[0],y:s[1]},to:{x:o[0],y:o[1]}})}return i}function LM(a,i){var t=!1;return Nt(a,function(e){if(OM(e.from,e.to,i.from,i.to))return t=!0,!1}),t}function O0(a){var i=a.map(function(e){return e[0]}),t=a.map(function(e){return e[1]});return{minX:Math.min.apply(null,i),maxX:Math.max.apply(null,i),minY:Math.min.apply(null,t),maxY:Math.max.apply(null,t)}}function DM(a,i){return!(i.minX>a.maxX||i.maxXa.maxY||i.maxYMath.PI/2?Math.PI-u:u,c=c>Math.PI/2?Math.PI-c:c;var f={xExtra:Math.cos(l/2-u)*(i/2*(1/Math.sin(l/2)))-i/2||0,yExtra:Math.cos(c-l/2)*(i/2*(1/Math.sin(l/2)))-i/2||0};return f}function FM(a){var i=a.attr(),t=i.path,e=i.stroke,n=e?i.lineWidth:0,r=a.get("segments")||fm(t),o=RM(r,n),s=o.x,l=o.y,u=o.width,c=o.height,f={minX:s,minY:l,maxX:s+u,maxY:l+c};return f=Od(a,f),{x:f.minX,y:f.minY,width:f.maxX-f.minX,height:f.maxY-f.minY}}function NM(a){var i=a.attr(),t=i.x1,e=i.y1,n=i.x2,r=i.y2,o=Math.min(t,n),s=Math.max(t,n),l=Math.min(e,r),u=Math.max(e,r),c={minX:o,maxX:s,minY:l,maxY:u};return c=Od(a,c),{x:c.minX,y:c.minY,width:c.maxX-c.minX,height:c.maxY-c.minY}}function kM(a){var i=a.attr(),t=i.x,e=i.y,n=i.rx,r=i.ry;return{x:t-n,y:e-r,width:n*2,height:r*2}}Po("rect",tm);Po("image",tm);Po("circle",em);Po("marker",em);Po("polyline",pM);Po("polygon",mM);Po("text",wM);Po("path",FM);Po("line",NM);Po("ellipse",kM);var I0=0,zM=1/2,YM=1/2,HM=.05,Lc=function(){function a(i){var t=i.xField,e=i.yField,n=i.adjustNames,r=n===void 0?["x","y"]:n,o=i.dimValuesMap;this.adjustNames=r,this.xField=t,this.yField=e,this.dimValuesMap=o}return a.prototype.isAdjust=function(i){return this.adjustNames.indexOf(i)>=0},a.prototype.getAdjustRange=function(i,t,e){var n=this.yField,r=e.indexOf(t),o=e.length,s,l;return!n&&this.isAdjust("y")?(s=0,l=1):o>1?(s=e[r===0?0:r-1],l=e[r===o-1?o-1:r+1],r!==0?s+=(t-s)/2:s-=(l-t)/2,r!==o-1?l-=(l-t)/2:l+=(t-e[o-2])/2):(s=t===0?0:t-.5,l=t===0?1:t+.5),{pre:s,next:l}},a.prototype.adjustData=function(i,t){var e=this,n=this.getDimValues(t);Nt(i,function(r,o){Nt(n,function(s,l){e.adjustDim(l,s,r,o)})})},a.prototype.groupData=function(i,t){return Nt(i,function(e){e[t]===void 0&&(e[t]=I0)}),ul(i,t)},a.prototype.adjustDim=function(i,t,e,n){},a.prototype.getDimValues=function(i){var t=this,e=t.xField,n=t.yField,r=Wr({},this.dimValuesMap),o=[];if(e&&this.isAdjust("x")&&o.push(e),n&&this.isAdjust("y")&&o.push(n),o.forEach(function(l){r&&r[l]||(r[l]=Os(i,l).sort(function(u,c){return u-c}))}),!n&&this.isAdjust("y")){var s="y";r[s]=[I0,1]}return r},a}(),cm={},hm=function(a){return cm[a.toLowerCase()]},Dc=function(a,i){if(hm(a))throw new Error("Adjust type '"+a+"' existed.");cm[a.toLowerCase()]=i};/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var Kh=function(a,i){return Kh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},Kh(a,i)};function Bc(a,i){Kh(a,i);function t(){this.constructor=a}a.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}var ns=function(){return ns=Object.assign||function(i){for(var t,e=1,n=arguments.length;e=0){var v=this.getIntervalOnlyOffset(n,e);d=c+v}else if(!qe(u)&&qe(l)&&u>=0){var v=this.getDodgeOnlyOffset(n,e);d=c+v}else if(!qe(l)&&!qe(u)&&l>=0&&u>=0){var v=this.getIntervalAndDodgeOffset(n,e);d=c+v}else{var g=h*o/n,p=s*g,v=1/2*(h-n*g-(n-1)*p)+((e+1)*g+e*p)-1/2*g-1/2*h;d=(c+f)/2+v}return d},i.prototype.getIntervalOnlyOffset=function(t,e){var n=this,r=n.defaultSize,o=n.intervalPadding,s=n.xDimensionLegenth,l=n.groupNum,u=n.dodgeRatio,c=n.maxColumnWidth,f=n.minColumnWidth,h=n.columnWidthRatio,d=o/s,v=(1-(l-1)*d)/l*u/(t-1),g=((1-d*(l-1))/l-v*(t-1))/t;if(g=qe(h)?g:1/l/t*h,!qe(c)){var p=c/s;g=Math.min(g,p)}if(!qe(f)){var m=f/s;g=Math.max(g,m)}g=r?r/s:g,v=((1-(l-1)*d)/l-t*g)/(t-1);var y=((1/2+e)*g+e*v+1/2*d)*l-d/2;return y},i.prototype.getDodgeOnlyOffset=function(t,e){var n=this,r=n.defaultSize,o=n.dodgePadding,s=n.xDimensionLegenth,l=n.groupNum,u=n.marginRatio,c=n.maxColumnWidth,f=n.minColumnWidth,h=n.columnWidthRatio,d=o/s,v=1*u/(l-1),g=((1-v*(l-1))/l-d*(t-1))/t;if(g=h?1/l/t*h:g,!qe(c)){var p=c/s;g=Math.min(g,p)}if(!qe(f)){var m=f/s;g=Math.max(g,m)}g=r?r/s:g,v=(1-(g*t+d*(t-1))*l)/(l-1);var y=((1/2+e)*g+e*d+1/2*v)*l-v/2;return y},i.prototype.getIntervalAndDodgeOffset=function(t,e){var n=this,r=n.intervalPadding,o=n.dodgePadding,s=n.xDimensionLegenth,l=n.groupNum,u=r/s,c=o/s,f=((1-u*(l-1))/l-c*(t-1))/t,h=((1/2+e)*f+e*c+1/2*u)*l-u/2;return h},i.prototype.getDistribution=function(t){var e=this.adjustDataArray,n=this.cacheMap,r=n[t];return r||(r={},Nt(e,function(o,s){var l=Os(o,t);l.length||l.push(0),Nt(l,function(u){r[u]||(r[u]=[]),r[u].push(s)})}),n[t]=r),r},i}(Lc);function GM(a,i){return(i-a)*Math.random()+a}var VM=function(a){Bc(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.process=function(t){var e=no(t),n=ao(e);return this.adjustData(e,n),e},i.prototype.adjustDim=function(t,e,n){var r=this,o=this.groupData(n,t);return Nt(o,function(s,l){return r.adjustGroup(s,t,parseFloat(l),e)})},i.prototype.getAdjustOffset=function(t){var e=t.pre,n=t.next,r=(n-e)*HM;return GM(e+r,n-r)},i.prototype.adjustGroup=function(t,e,n,r){var o=this,s=this.getAdjustRange(e,n,r);return Nt(t,function(l){l[e]=o.getAdjustOffset(s)}),t},i}(Lc),lh=Wx,$M=function(a){Bc(i,a);function i(t){var e=a.call(this,t)||this,n=t.adjustNames,r=n===void 0?["y"]:n,o=t.height,s=o===void 0?NaN:o,l=t.size,u=l===void 0?10:l,c=t.reverseOrder,f=c===void 0?!1:c;return e.adjustNames=r,e.height=s,e.size=u,e.reverseOrder=f,e}return i.prototype.process=function(t){var e=this,n=e.yField,r=e.reverseOrder,o=n?this.processStack(t):this.processOneDimStack(t);return r?this.reverse(o):o},i.prototype.reverse=function(t){return t.slice(0).reverse()},i.prototype.processStack=function(t){var e=this,n=e.xField,r=e.yField,o=e.reverseOrder,s=o?this.reverse(t):t,l=new lh,u=new lh;return s.map(function(c){return c.map(function(f){var h,d=he(f,n,0),v=he(f,[r]),g=d.toString();if(v=ln(v)?v[1]:v,!qe(v)){var p=v>=0?l:u;p.has(g)||p.set(g,0);var m=p.get(g),y=v+m;return p.set(g,y),ns(ns({},f),(h={},h[r]=[m,y],h))}return f})})},i.prototype.processOneDimStack=function(t){var e=this,n=this,r=n.xField,o=n.height,s=n.reverseOrder,l="y",u=s?this.reverse(t):t,c=new lh;return u.map(function(f){return f.map(function(h){var d,v=e.size,g=h[r],p=v*2/o;c.has(g)||c.set(g,p/2);var m=c.get(g);return c.set(g,m+p),ns(ns({},h),(d={},d[l]=m,d))})})},i}(Lc),XM=function(a){Bc(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.process=function(t){var e=ao(t),n=this,r=n.xField,o=n.yField,s=this.getXValuesMaxMap(e),l=Math.max.apply(Math,Object.keys(s).map(function(u){return s[u]}));return fa(t,function(u){return fa(u,function(c){var f,h,d=c[o],v=c[r];if(ln(d)){var g=(l-s[v])/2;return ns(ns({},c),(f={},f[o]=fa(d,function(m){return g+m}),f))}var p=(l-d)/2;return ns(ns({},c),(h={},h[o]=[p,d+p],h))})})},i.prototype.getXValuesMaxMap=function(t){var e=this,n=this,r=n.xField,o=n.yField,s=ul(t,function(l){return l[r]});return kx(s,function(l){return e.getDimMaxValue(l,o)})},i.prototype.getDimMaxValue=function(t,e){var n=fa(t,function(o){return he(o,e,[])}),r=ao(n);return Math.max.apply(Math,r)},i}(Lc);Dc("Dodge",WM);Dc("Jitter",VM);Dc("Stack",$M);Dc("Symmetric",XM);var j0=function(a,i){return $n(i)?i:a.invert(a.scale(i))},uf=function(){function a(i){this.names=[],this.scales=[],this.linear=!1,this.values=[],this.callback=function(){return[]},this._parseCfg(i)}return a.prototype.mapping=function(){for(var i=this,t=[],e=0;e1?1:Number(i),e=a.length-1,n=Math.floor(e*t),r=e*t-n,o=a[n],s=n===e?o:a[n+1];return dm([uh(o,s,r,0),uh(o,s,r,1),uh(o,s,r,2)])},Sf,gm=function(a){if(a[0]==="#"&&a.length===7)return a;Sf||(Sf=qM()),Sf.style.color=a;var i=document.defaultView.getComputedStyle(Sf,"").getPropertyValue("color"),t=UM.exec(i),e=t[1].split(/\s*,\s*/).map(function(n){return Number(n)});return i=dm(e),i},eb=function(a){var i=$n(a)?a.split("-"):a,t=fa(i,function(e){return vm(e.indexOf("#")===-1?gm(e):e)});return function(e){return tb(t,e)}},nb=function(a){if(JM(a)){var i,t=void 0;if(a[0]==="l"){var e=KM.exec(a),n=+e[1]+90;t=e[2],i="linear-gradient("+n+"deg, "}else if(a[0]==="r"){i="radial-gradient(";var e=ZM.exec(a);t=e[4]}var r=t.match(QM);return Nt(r,function(o,s){var l=o.split(":");i+=l[1]+" "+l[0]*100+"%",s!==r.length-1&&(i+=", ")}),i+=")",i}return a};const Uu={rgb2arr:vm,gradient:eb,toRGB:wc(gm),toCSSGradient:nb};var rb=function(a){ff(i,a);function i(t){var e=a.call(this,t)||this;return e.type="color",e.names=["color"],$n(e.values)&&(e.linear=!0),e.gradient=Uu.gradient(e.values),e}return i.prototype.getLinearValue=function(t){return this.gradient(t)},i}(uf),ib=function(a){ff(i,a);function i(t){var e=a.call(this,t)||this;return e.type="opacity",e.names=["opacity"],e}return i}(uf),ab=function(a){ff(i,a);function i(t){var e=a.call(this,t)||this;return e.names=["x","y"],e.type="position",e}return i.prototype.mapping=function(t,e){var n=this.scales,r=n[0],o=n[1];return qe(t)||qe(e)?[]:[ln(t)?t.map(function(s){return r.scale(s)}):r.scale(t),ln(e)?e.map(function(s){return o.scale(s)}):o.scale(e)]},i}(uf),ob=function(a){ff(i,a);function i(t){var e=a.call(this,t)||this;return e.type="shape",e.names=["shape"],e}return i.prototype.getLinearValue=function(t){var e=Math.round((this.values.length-1)*t);return this.values[e]},i}(uf),sb=function(a){ff(i,a);function i(t){var e=a.call(this,t)||this;return e.type="size",e.names=["size"],e}return i}(uf),pm={};function lb(a){return pm[a]}function cs(a,i){pm[a]=i}var Id=function(){function a(i){this.type="base",this.isCategory=!1,this.isLinear=!1,this.isContinuous=!1,this.isIdentity=!1,this.values=[],this.range=[0,1],this.ticks=[],this.__cfg__=i,this.initCfg(),this.init()}return a.prototype.translate=function(i){return i},a.prototype.change=function(i){Wr(this.__cfg__,i),this.init()},a.prototype.clone=function(){return this.constructor(this.__cfg__)},a.prototype.getTicks=function(){var i=this;return fa(this.ticks,function(t,e){return Mr(t)?t:{text:i.getText(t,e),tickValue:t,value:i.scale(t)}})},a.prototype.getText=function(i,t){var e=this.formatter,n=e?e(i,t):i;return qe(n)||!Rn(n.toString)?"":n.toString()},a.prototype.getConfig=function(i){return this.__cfg__[i]},a.prototype.init=function(){Wr(this,this.__cfg__),this.setDomain(),os(this.getConfig("ticks"))&&(this.ticks=this.calculateTicks())},a.prototype.initCfg=function(){},a.prototype.setDomain=function(){},a.prototype.calculateTicks=function(){var i=this.tickMethod,t=[];if($n(i)){var e=lb(i);if(!e)throw new Error("There is no method to to calculate ticks!");t=e(this)}else Rn(i)&&(t=i(this));return t},a.prototype.rangeMin=function(){return this.range[0]},a.prototype.rangeMax=function(){return this.range[1]},a.prototype.calcPercent=function(i,t,e){return or(i)?(i-t)/(e-t):NaN},a.prototype.calcValue=function(i,t,e){return t+i*(e-t)},a}(),Rc=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="cat",t.isCategory=!0,t}return i.prototype.buildIndexMap=function(){if(!this.translateIndexMap){this.translateIndexMap=new Map;for(var t=0;tthis.max?NaN:this.values[r]},i.prototype.getText=function(t){for(var e=[],n=1;n1?t-1:t}this.translateIndexMap&&(this.translateIndexMap=void 0)},i}(Id),mm=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,$s="\\d\\d?",Ws="\\d\\d",ub="\\d{3}",fb="\\d{4}",Iu="[^\\s]+",ym=/\[([^]*?)\]/gm;function xm(a,i){for(var t=[],e=0,n=a.length;e-1?n:null}};function ol(a){for(var i=[],t=1;t3?0:(a-a%10!==10?1:0)*a%10]}},rc=ol({},jd),Mm=function(a){return rc=ol(rc,a)},D0=function(a){return a.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},Ta=function(a,i){for(i===void 0&&(i=2),a=String(a);a.length0?"-":"+")+Ta(Math.floor(Math.abs(i)/60)*100+Math.abs(i)%60,4)},Z:function(a){var i=a.getTimezoneOffset();return(i>0?"-":"+")+Ta(Math.floor(Math.abs(i)/60),2)+":"+Ta(Math.abs(i)%60,2)}},B0=function(a){return+a-1},R0=[null,$s],F0=[null,Iu],N0=["isPm",Iu,function(a,i){var t=a.toLowerCase();return t===i.amPm[0]?0:t===i.amPm[1]?1:null}],k0=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(a){var i=(a+"").match(/([+-]|\d\d)/gi);if(i){var t=+i[1]*60+parseInt(i[2],10);return i[0]==="+"?t:-t}return 0}],vb={D:["day",$s],DD:["day",Ws],Do:["day",$s+Iu,function(a){return parseInt(a,10)}],M:["month",$s,B0],MM:["month",Ws,B0],YY:["year",Ws,function(a){var i=new Date,t=+(""+i.getFullYear()).substr(0,2);return+(""+(+a>68?t-1:t)+a)}],h:["hour",$s,void 0,"isPm"],hh:["hour",Ws,void 0,"isPm"],H:["hour",$s],HH:["hour",Ws],m:["minute",$s],mm:["minute",Ws],s:["second",$s],ss:["second",Ws],YYYY:["year",fb],S:["millisecond","\\d",function(a){return+a*100}],SS:["millisecond",Ws,function(a){return+a*10}],SSS:["millisecond",ub],d:R0,dd:R0,ddd:F0,dddd:F0,MMM:["month",Iu,L0("monthNamesShort")],MMMM:["month",Iu,L0("monthNames")],a:N0,A:N0,ZZ:k0,Z:k0},ic={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},bm=function(a){return ol(ic,a)},_m=function(a,i,t){if(i===void 0&&(i=ic.default),t===void 0&&(t={}),typeof a=="number"&&(a=new Date(a)),Object.prototype.toString.call(a)!=="[object Date]"||isNaN(a.getTime()))throw new Error("Invalid Date pass to format");i=ic[i]||i;var e=[];i=i.replace(ym,function(r,o){return e.push(o),"@@@"});var n=ol(ol({},rc),t);return i=i.replace(mm,function(r){return db[r](a,n)}),i.replace(/@@@/g,function(){return e.shift()})};function Sm(a,i,t){if(t===void 0&&(t={}),typeof i!="string")throw new Error("Invalid format in fecha parse");if(i=ic[i]||i,a.length>1e3)return null;var e=new Date,n={year:e.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},r=[],o=[],s=i.replace(ym,function(x,M){return o.push(D0(M)),"@@@"}),l={},u={};s=D0(s).replace(mm,function(x){var M=vb[x],_=M[0],D=M[1],C=M[3];if(l[_])throw new Error("Invalid format. "+_+" specified twice in format");return l[_]=!0,C&&(u[C]=!0),r.push(M),"("+D+")"}),Object.keys(u).forEach(function(x){if(!l[x])throw new Error("Invalid format. "+x+" is required in specified format")}),s=s.replace(/@@@/g,function(){return o.shift()});var c=a.match(new RegExp(s,"i"));if(!c)return null;for(var f=ol(ol({},rc),t),h=1;h11||n.month<0||n.day>31||n.day<1||n.hour>23||n.hour<0||n.minute>59||n.minute<0||n.second>59||n.second<0)return null;return m}var Cm={format:_m,parse:Sm,defaultI18n:jd,setGlobalDateI18n:Mm,setGlobalDateMasks:bm};const gb=Object.freeze(Object.defineProperty({__proto__:null,default:Cm,assign:ol,format:_m,parse:Sm,defaultI18n:jd,setGlobalDateI18n:Mm,setGlobalDateMasks:bm},Symbol.toStringTag,{value:"Module"}));function pb(a){return function(i,t,e,n){for(var r=qe(e)?0:e,o=qe(n)?i.length:n;r>>1;a(i[s])>t?o=s:r=s+1}return r}}var z0="format";function Pm(a,i){var t=gb[z0]||Cm[z0];return t(a,i)}function ac(a){return $n(a)&&(a.indexOf("T")>0?a=new Date(a).getTime():a=new Date(a.replace(/-/gi,"/")).getTime()),gp(a)&&(a=a.getTime()),a}var zo=1e3,Sl=60*zo,Cl=60*Sl,Ps=24*Cl,ju=Ps*31,Y0=Ps*365,yu=[["HH:mm:ss",zo],["HH:mm:ss",zo*10],["HH:mm:ss",zo*30],["HH:mm",Sl],["HH:mm",Sl*10],["HH:mm",Sl*30],["HH",Cl],["HH",Cl*6],["HH",Cl*12],["YYYY-MM-DD",Ps],["YYYY-MM-DD",Ps*4],["YYYY-WW",Ps*7],["YYYY-MM",ju],["YYYY-MM",ju*4],["YYYY-MM",ju*6],["YYYY",Ps*380]];function mb(a,i,t){var e=(i-a)/t,n=pb(function(o){return o[1]})(yu,e)-1,r=yu[n];return n<0?r=yu[0]:n>=yu.length&&(r=Ii(yu)),r}var yb=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="timeCat",t}return i.prototype.translate=function(t){t=ac(t);var e=this.values.indexOf(t);return e===-1&&(or(t)&&t-1){var r=this.values[n],o=this.formatter;return r=o?o(r,e):Pm(r,this.mask),r}return t},i.prototype.initCfg=function(){this.tickMethod="time-cat",this.mask="YYYY-MM-DD",this.tickCount=7},i.prototype.setDomain=function(){var t=this.values;Nt(t,function(e,n){t[n]=ac(e)}),t.sort(function(e,n){return e-n}),a.prototype.setDomain.call(this)},i}(Rc),Fc=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.isContinuous=!0,t}return i.prototype.scale=function(t){if(qe(t))return NaN;var e=this.rangeMin(),n=this.rangeMax(),r=this.max,o=this.min;if(r===o)return e;var s=this.getScalePercent(t);return e+s*(n-e)},i.prototype.init=function(){a.prototype.init.call(this);var t=this.ticks,e=ro(t),n=Ii(t);ethis.max&&(this.max=n),qe(this.minLimit)||(this.min=e),qe(this.maxLimit)||(this.max=n)},i.prototype.setDomain=function(){var t=wx(this.values),e=t.min,n=t.max;qe(this.min)&&(this.min=e),qe(this.max)&&(this.max=n),this.min>this.max&&(this.min=e,this.max=n)},i.prototype.calculateTicks=function(){var t=this,e=a.prototype.calculateTicks.call(this);return this.nice||(e=Co(e,function(n){return n>=t.min&&n<=t.max})),e},i.prototype.getScalePercent=function(t){var e=this.max,n=this.min;return(t-n)/(e-n)},i.prototype.getInvertPercent=function(t){return(t-this.rangeMin())/(this.rangeMax()-this.rangeMin())},i}(Id),Nc=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="linear",t.isLinear=!0,t}return i.prototype.invert=function(t){var e=this.getInvertPercent(t);return this.min+e*(this.max-this.min)},i.prototype.initCfg=function(){this.tickMethod="wilkinson-extended",this.nice=!1},i}(Fc);function Ks(a,i){var t=Math.E,e;return i>=0?e=Math.pow(t,Math.log(i)/a):e=Math.pow(t,Math.log(-i)/a)*-1,e}function bo(a,i){return a===1?1:Math.log(i)/Math.log(a)}function Tm(a,i,t){qe(t)&&(t=Math.max.apply(null,a));var e=t;return Nt(a,function(n){n>0&&n1&&(e=1),e}var xb=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="log",t}return i.prototype.invert=function(t){var e=this.base,n=bo(e,this.max),r=this.rangeMin(),o=this.rangeMax()-r,s,l=this.positiveMin;if(l){if(t===0)return 0;s=bo(e,l/e);var u=1/(n-s)*o;if(t=0?1:-1;return Math.pow(s,n)*l},i.prototype.initCfg=function(){this.tickMethod="pow",this.exponent=2,this.tickCount=5,this.nice=!0},i.prototype.getScalePercent=function(t){var e=this.max,n=this.min;if(e===n)return 0;var r=this.exponent,o=(Ks(r,t)-Ks(r,n))/(Ks(r,e)-Ks(r,n));return o},i}(Fc),Eb=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="time",t}return i.prototype.getText=function(t,e){var n=this.translate(t),r=this.formatter;return r?r(n,e):Pm(n,this.mask)},i.prototype.scale=function(t){var e=t;return($n(e)||gp(e))&&(e=this.translate(e)),a.prototype.scale.call(this,e)},i.prototype.translate=function(t){return ac(t)},i.prototype.initCfg=function(){this.tickMethod="time-pretty",this.mask="YYYY-MM-DD",this.tickCount=7,this.nice=!1},i.prototype.setDomain=function(){var t=this.values,e=this.getConfig("min"),n=this.getConfig("max");if((!qe(e)||!or(e))&&(this.min=this.translate(this.min)),(!qe(n)||!or(n))&&(this.max=this.translate(this.max)),t&&t.length){var r=[],o=1/0,s=o,l=0;Nt(t,function(u){var c=ac(u);if(isNaN(c))throw new TypeError("Invalid Time: "+u+" in time scale!");o>c?(s=o,o=c):s>c&&(s=c),l1&&(this.minTickInterval=s-o),qe(e)&&(this.min=o),qe(n)&&(this.max=l)}},i}(Nc),Am=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="quantize",t}return i.prototype.invert=function(t){var e=this.ticks,n=e.length,r=this.getInvertPercent(t),o=Math.floor(r*(n-1));if(o>=n-1)return Ii(e);if(o<0)return ro(e);var s=e[o],l=e[o+1],u=o/(n-1),c=(o+1)/(n-1);return s+(r-u)/(c-u)*(l-s)},i.prototype.initCfg=function(){this.tickMethod="r-pretty",this.tickCount=5,this.nice=!0},i.prototype.calculateTicks=function(){var t=a.prototype.calculateTicks.call(this);return this.nice||(Ii(t)!==this.max&&t.push(this.max),ro(t)!==this.min&&t.unshift(this.min)),t},i.prototype.getScalePercent=function(t){var e=this.ticks;if(tIi(e))return 1;var n=0;return Nt(e,function(r,o){if(t>=r)n=o;else return!1}),n/(e.length-1)},i}(Fc),Mb=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="quantile",t}return i.prototype.initCfg=function(){this.tickMethod="quantile",this.tickCount=5,this.nice=!0},i}(Am),Om={};function Qh(a){return Om[a]}function hs(a,i){if(Qh(a))throw new Error("type '"+a+"' existed.");Om[a]=i}var bb=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="identity",t.isIdentity=!0,t}return i.prototype.calculateTicks=function(){return this.values},i.prototype.scale=function(t){return this.values[0]!==t&&or(t)?t:this.range[0]},i.prototype.invert=function(t){var e=this.range;return te[1]?NaN:this.values[0]},i}(Id);function Im(a){var i=a.values,t=a.tickInterval,e=a.tickCount,n=a.showLast;if(or(t)){var r=Co(i,function(v,g){return g%t===0}),o=Ii(i);return n&&Ii(r)!==o&&r.push(o),r}var s=i.length,l=a.min,u=a.max;if(qe(l)&&(l=0),qe(u)&&(u=i.length-1),!or(e)||e>=s)return i.slice(l,u+1);if(e<=0||u<=0)return[];for(var c=e===1?s:Math.floor(s/(e-1)),f=[],h=l,d=0;d=u);d++)h=Math.min(l+d*c,u),d===e-1&&n?f.push(i[u]):f.push(i[h]);return f}function _b(a){var i=a.min,t=a.max,e=a.nice,n=a.tickCount,r=new Sb;return r.domain([i,t]),e&&r.nice(n),r.ticks(n)}var ch=5,H0=Math.sqrt(50),W0=Math.sqrt(10),G0=Math.sqrt(2),Sb=function(){function a(){this._domain=[0,1]}return a.prototype.domain=function(i){return i?(this._domain=Array.from(i,Number),this):this._domain.slice()},a.prototype.nice=function(i){var t,e;i===void 0&&(i=ch);var n=this._domain.slice(),r=0,o=this._domain.length-1,s=this._domain[r],l=this._domain[o],u;return l0?(s=Math.floor(s/u)*u,l=Math.ceil(l/u)*u,u=$f(s,l,i)):u<0&&(s=Math.ceil(s*u)/u,l=Math.floor(l*u)/u,u=$f(s,l,i)),u>0?(n[r]=Math.floor(s/u)*u,n[o]=Math.ceil(l/u)*u,this.domain(n)):u<0&&(n[r]=Math.ceil(s*u)/u,n[o]=Math.floor(l*u)/u,this.domain(n)),this},a.prototype.ticks=function(i){return i===void 0&&(i=ch),Cb(this._domain[0],this._domain[this._domain.length-1],i||ch)},a}();function Cb(a,i,t){var e,n=-1,r,o,s;if(i=+i,a=+a,t=+t,a===i&&t>0)return[a];if((e=i0)for(a=Math.ceil(a/s),i=Math.floor(i/s),o=new Array(r=Math.ceil(i-a+1));++n=0?(r>=H0?10:r>=W0?5:r>=G0?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(r>=H0?10:r>=W0?5:r>=G0?2:1)}function V0(a,i,t){var e;return t==="ceil"?e=Math.ceil(a/i):t==="floor"?e=Math.floor(a/i):e=Math.round(a/i),e*i}function Ld(a,i,t){var e=V0(a,t,"floor"),n=V0(i,t,"ceil");e=Jc(e,t),n=Jc(n,t);for(var r=[],o=Math.max((n-e)/(Math.pow(2,12)-1),t),s=e;s<=n;s=s+o){var l=Jc(s,o);r.push(l)}return{min:e,max:n,ticks:r}}function Dd(a,i,t){var e,n=a.minLimit,r=a.maxLimit,o=a.min,s=a.max,l=a.tickCount,u=l===void 0?5:l,c=qe(n)?qe(i)?o:i:n,f=qe(r)?qe(t)?s:t:r;if(c>f&&(e=[c,f],f=e[0],c=e[1]),u<=2)return[c,f];for(var h=(f-c)/(u-1),d=[],v=0;v=0&&(l=1),1-s/(o-1)-t+l}function jb(a,i,t){var e=Fa(i),n=xp(i,a),r=1;return 1-n/(e-1)-t+r}function Lb(a,i,t,e,n,r){var o=(a-1)/(r-n),s=(i-1)/(Math.max(r,e)-Math.min(t,n));return 2-Math.max(o/s,s/o)}function Db(a,i){return a>=i?2-(a-1)/(i-1):1}function Bb(a,i,t,e){var n=i-a;return 1-.5*(Math.pow(i-e,2)+Math.pow(a-t,2))/Math.pow(.1*n,2)}function Rb(a,i,t){var e=i-a;if(t>e){var n=(t-e)/2;return 1-Math.pow(n,2)/Math.pow(.1*e,2)}return 1}function Fb(){return 1}function Nb(a,i,t,e,n,r){t===void 0&&(t=5),e===void 0&&(e=!0),n===void 0&&(n=Tb),r===void 0&&(r=[.25,.2,.5,.05]);var o=t<0?0:Math.round(t);if(Number.isNaN(a)||Number.isNaN(i)||typeof a!="number"||typeof i!="number"||!o)return{min:0,max:0,ticks:[]};if(i-a<1e-15||o===1)return{min:a,max:i,ticks:[a]};if(i-a>1e148){var s=t||5,l=(i-a)/s;return{min:a,max:i,ticks:Array(s).fill(null).map(function(xt,Gt){return yl(a+l*Gt)})}}for(var u={score:-2,lmin:0,lmax:0,lstep:0},c=1;c<1/0;){for(var f=0;fu.score&&(!e||C<=a&&F>=i)&&(u.lmin=C,u.lmax=F,u.lstep=k,u.score=Q)}m+=1}v+=1}}c+=1}var it=yl(u.lmax),Pt=yl(u.lmin),ht=yl(u.lstep),lt=Math.floor(Ob((it-Pt)/ht))+1,U=new Array(lt);U[0]=yl(Pt);for(var f=1;f0)o=Math.floor(bo(i,e));else{var l=Tm(r,i,n);o=Math.floor(bo(i,l))}for(var u=s-o,c=Math.ceil(u/t),f=[],h=o;h=0?1:-1;return Math.pow(o,i)*s})}function Hb(a,i){var t=a.length*i;return i===1?a[a.length-1]:i===0?a[0]:t%1!==0?a[Math.ceil(t)-1]:a.length%2===0?(a[t-1]+a[t])/2:a[t]}function Wb(a){var i=a.tickCount,t=a.values;if(!t||!t.length)return[];for(var e=t.slice().sort(function(s,l){return s-l}),n=[],r=0;r1&&(n=n*Math.ceil(s)),e&&nY0)for(var l=oc(t),u=Math.ceil(r/Y0),c=s;c<=l+u;c=c+u)o.push(Xb(c));else if(r>ju)for(var f=Math.ceil(r/ju),h=Jh(i),d=Ub(i,t),c=0;c<=d+f;c=c+f)o.push(Kb(s,c+h));else if(r>Ps)for(var v=new Date(i),g=v.getFullYear(),p=v.getMonth(),m=v.getDate(),y=Math.ceil(r/Ps),w=Zb(i,t),c=0;cCl)for(var v=new Date(i),g=v.getFullYear(),p=v.getMonth(),y=v.getDate(),x=v.getHours(),M=Math.ceil(r/Cl),_=Qb(i,t),c=0;c<=_+M;c=c+M)o.push(new Date(g,p,y,x+c).getTime());else if(r>Sl)for(var D=Jb(i,t),C=Math.ceil(r/Sl),c=0;c<=D+C;c=c+C)o.push(i+c*Sl);else{var F=r;F=512&&console.warn("Notice: current ticks length("+o.length+') >= 512, may cause performance issues, even out of memory. Because of the configure "tickInterval"(in milliseconds, current is '+r+") is too small, increase the value to solve the problem!"),o}cs("cat",Im);cs("time-cat",$b);cs("wilkinson-extended",kb);cs("r-pretty",Gb);cs("time",Vb);cs("time-pretty",qb);cs("log",zb);cs("pow",Yb);cs("quantile",Wb);cs("d3-linear",Pb);hs("cat",Rc);hs("category",Rc);hs("identity",bb);hs("linear",Nc);hs("log",xb);hs("pow",wb);hs("time",Eb);hs("timeCat",yb);hs("quantize",Am);hs("quantile",Mb);var Lm={},Dm=function(a){return Lm[a.toLowerCase()]},cf=function(a,i){if(Dm(a))throw new Error("Attribute type '"+a+"' existed.");Lm[a.toLowerCase()]=i};cf("Color",rb);cf("Opacity",ib);cf("Position",ab);cf("Shape",ob);cf("Size",sb);var Bd=function(){function a(i){this.type="coordinate",this.isRect=!1,this.isHelix=!1,this.isPolar=!1,this.isReflectX=!1,this.isReflectY=!1;var t=i.start,e=i.end,n=i.matrix,r=n===void 0?[1,0,0,0,1,0,0,0,1]:n,o=i.isTransposed,s=o===void 0?!1:o;this.start=t,this.end=e,this.matrix=r,this.originalMatrix=Er([],r),this.isTransposed=s}return a.prototype.initial=function(){this.center={x:(this.start.x+this.end.x)/2,y:(this.start.y+this.end.y)/2},this.width=Math.abs(this.end.x-this.start.x),this.height=Math.abs(this.end.y-this.start.y)},a.prototype.update=function(i){Wr(this,i),this.initial()},a.prototype.convertDim=function(i,t){var e,n=this[t],r=n.start,o=n.end;return this.isReflect(t)&&(e=[o,r],r=e[0],o=e[1]),r+i*(o-r)},a.prototype.invertDim=function(i,t){var e,n=this[t],r=n.start,o=n.end;return this.isReflect(t)&&(e=[o,r],r=e[0],o=e[1]),(i-r)/(o-r)},a.prototype.applyMatrix=function(i,t,e){e===void 0&&(e=0);var n=this.matrix,r=[i,t,e];return Hu(r,r,n),r},a.prototype.invertMatrix=function(i,t,e){e===void 0&&(e=0);var n=this.matrix,r=Pw([0,0,0,0,0,0,0,0,0],n),o=[i,t,e];return r&&Hu(o,o,r),o},a.prototype.convert=function(i){var t=this.convertPoint(i),e=t.x,n=t.y,r=this.applyMatrix(e,n,1);return{x:r[0],y:r[1]}},a.prototype.invert=function(i){var t=this.invertMatrix(i.x,i.y,1);return this.invertPoint({x:t[0],y:t[1]})},a.prototype.rotate=function(i){var t=this.matrix,e=this.center;return Yl(t,t,[-e.x,-e.y]),Md(t,t,i),Yl(t,t,[e.x,e.y]),this},a.prototype.reflect=function(i){return i==="x"?this.isReflectX=!this.isReflectX:this.isReflectY=!this.isReflectY,this},a.prototype.scale=function(i,t){var e=this.matrix,n=this.center;return Yl(e,e,[-n.x,-n.y]),Dp(e,e,[i,t]),Yl(e,e,[n.x,n.y]),this},a.prototype.translate=function(i,t){var e=this.matrix;return Yl(e,e,[i,t]),this},a.prototype.transpose=function(){return this.isTransposed=!this.isTransposed,this},a.prototype.getCenter=function(){return this.center},a.prototype.getWidth=function(){return this.width},a.prototype.getHeight=function(){return this.height},a.prototype.getRadius=function(){return this.radius},a.prototype.isReflect=function(i){return i==="x"?this.isReflectX:this.isReflectY},a.prototype.resetMatrix=function(i){this.matrix=i||Er([],this.originalMatrix)},a}(),Bm=function(a){je(i,a);function i(t){var e=a.call(this,t)||this;return e.isRect=!0,e.type="cartesian",e.initial(),e}return i.prototype.initial=function(){a.prototype.initial.call(this);var t=this.start,e=this.end;this.x={start:t.x,end:e.x},this.y={start:t.y,end:e.y}},i.prototype.convertPoint=function(t){var e,n=t.x,r=t.y;return this.isTransposed&&(e=[r,n],n=e[0],r=e[1]),{x:this.convertDim(n,"x"),y:this.convertDim(r,"y")}},i.prototype.invertPoint=function(t){var e,n=this.invertDim(t.x,"x"),r=this.invertDim(t.y,"y");return this.isTransposed&&(e=[r,n],n=e[0],r=e[1]),{x:n,y:r}},i}(Bd),t_=function(a){je(i,a);function i(t){var e=a.call(this,t)||this;e.isHelix=!0,e.type="helix";var n=t.startAngle,r=n===void 0?1.25*Math.PI:n,o=t.endAngle,s=o===void 0?7.25*Math.PI:o,l=t.innerRadius,u=l===void 0?0:l,c=t.radius;return e.startAngle=r,e.endAngle=s,e.innerRadius=u,e.radius=c,e.initial(),e}return i.prototype.initial=function(){a.prototype.initial.call(this);var t=(this.endAngle-this.startAngle)/(2*Math.PI)+1,e=Math.min(this.width,this.height)/2;this.radius&&this.radius>=0&&this.radius<=1&&(e=e*this.radius),this.d=Math.floor(e*(1-this.innerRadius)/t),this.a=this.d/(Math.PI*2),this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*e,end:this.innerRadius*e+this.d*.99}},i.prototype.convertPoint=function(t){var e,n=t.x,r=t.y;this.isTransposed&&(e=[r,n],n=e[0],r=e[1]);var o=this.convertDim(n,"x"),s=this.a*o,l=this.convertDim(r,"y");return{x:this.center.x+Math.cos(o)*(s+l),y:this.center.y+Math.sin(o)*(s+l)}},i.prototype.invertPoint=function(t){var e,n=this.d+this.y.start,r=jp([0,0],[t.x,t.y],[this.center.x,this.center.y]),o=bd(r,[1,0],!0),s=o*this.a;Xl(r)this.width/e?(s=this.width/e,this.circleCenter={x:this.center.x-(.5-r)*this.width,y:this.center.y-(.5-o)*s*n}):(s=this.height/n,this.circleCenter={x:this.center.x-(.5-r)*s*e,y:this.center.y-(.5-o)*this.height}),this.polarRadius=this.radius,this.radius?this.radius>0&&this.radius<=1?this.polarRadius=s*this.radius:(this.radius<=0||this.radius>s)&&(this.polarRadius=s):this.polarRadius=s,this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*this.polarRadius,end:this.polarRadius}},i.prototype.getRadius=function(){return this.polarRadius},i.prototype.convertPoint=function(t){var e,n=this.getCenter(),r=t.x,o=t.y;return this.isTransposed&&(e=[o,r],r=e[0],o=e[1]),r=this.convertDim(r,"x"),o=this.convertDim(o,"y"),{x:n.x+Math.cos(r)*o,y:n.y+Math.sin(r)*o}},i.prototype.invertPoint=function(t){var e,n=this.getCenter(),r=[t.x-n.x,t.y-n.y],o=this,s=o.startAngle,l=o.endAngle;this.isReflect("x")&&(e=[l,s],s=e[0],l=e[1]);var u=[1,0,0,0,1,0,0,0,1];Md(u,u,s);var c=[1,0,0];Hu(c,c,u);var f=[c[0],c[1]],h=bd(f,r,l0?v:-v;var g=this.invertDim(d,"y"),p={x:0,y:0};return p.x=this.isTransposed?g:v,p.y=this.isTransposed?v:g,p},i.prototype.getCenter=function(){return this.circleCenter},i.prototype.getOneBox=function(){var t=this.startAngle,e=this.endAngle;if(Math.abs(e-t)>=Math.PI*2)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var n=[0,Math.cos(t),Math.cos(e)],r=[0,Math.sin(t),Math.sin(e)],o=Math.min(t,e);o=0;e--)a.removeChild(i[e])}function a_(a,i){return!!a.className.match(new RegExp("(\\s|^)"+i+"(\\s|$)"))}function Ku(a){var i=a.start,t=a.end,e=Math.min(i.x,t.x),n=Math.min(i.y,t.y),r=Math.max(i.x,t.x),o=Math.max(i.y,t.y);return{x:e,y:n,minX:e,minY:n,maxX:r,maxY:o,width:r-e,height:o-n}}function o_(a){var i=a.map(function(s){return s.x}),t=a.map(function(s){return s.y}),e=Math.min.apply(Math,i),n=Math.min.apply(Math,t),r=Math.max.apply(Math,i),o=Math.max.apply(Math,t);return{x:e,y:n,minX:e,minY:n,maxX:r,maxY:o,width:r-e,height:o-n}}function zc(a,i,t,e){var n=a+t,r=i+e;return{x:a,y:i,width:t,height:e,minX:a,minY:i,maxX:isNaN(n)?0:n,maxY:isNaN(r)?0:r}}function Pl(a,i,t){return(1-t)*a+i*t}function Jl(a,i,t){return{x:a.x+Math.cos(t)*i,y:a.y+Math.sin(t)*i}}function s_(a,i){var t=i.x-a.x,e=i.y-a.y;return Math.sqrt(t*t+e*e)}var lc=function(a,i,t){return t===void 0&&(t=Math.pow(Number.EPSILON,.5)),[a,i].includes(1/0)?Math.abs(a)===Math.abs(i):Math.abs(a-i)0?Nt(l,function(u){if(u.get("visible")){if(u.isGroup()&&u.get("children").length===0)return!0;var c=zm(u),f=u.applyToMatrix([c.minX,c.minY,1]),h=u.applyToMatrix([c.minX,c.maxY,1]),d=u.applyToMatrix([c.maxX,c.minY,1]),v=u.applyToMatrix([c.maxX,c.maxY,1]),g=Math.min(f[0],h[0],d[0],v[0]),p=Math.max(f[0],h[0],d[0],v[0]),m=Math.min(f[1],h[1],d[1],v[1]),y=Math.max(f[1],h[1],d[1],v[1]);gr&&(r=p),ms&&(s=y)}}):(n=0,r=0,o=0,s=0),e=zc(n,o,r-n,s-o)}return t?l_(e,t):e}function u_(a,i){if(!(!a.getClip()&&!i.getClip())){var t=i.getClip();if(!t){a.setClip(null);return}var e={type:t.get("type"),attrs:t.attr()};a.setClip(e)}}function Ia(a){return a+"px"}function Ym(a,i,t,e){var n=s_(a,i),r=e/n,o=0;return t==="start"?o=0-r:t==="end"&&(o=1+r),{x:Pl(a.x,i.x,o),y:Pl(a.y,i.y,o)}}var f_={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},Hm=function(a){je(i,a);function i(t){var e=a.call(this,t)||this;return e.initCfg(),e}return i.prototype.getDefaultCfg=function(){return{id:"",name:"",type:"",locationType:"none",offsetX:0,offsetY:0,animate:!1,capture:!0,updateAutoRender:!1,animateOption:{appear:null,update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},events:null,defaultCfg:{},visible:!0}},i.prototype.clear=function(){},i.prototype.update=function(t){var e=this,n=this.get("defaultCfg")||{};Nt(t,function(r,o){var s=e.get(o),l=r;s!==r&&(Mr(r)&&n[o]&&(l=_n({},n[o],r)),e.set(o,l))}),this.updateInner(t),this.afterUpdate(t)},i.prototype.updateInner=function(t){},i.prototype.afterUpdate=function(t){eu(t,"visible")&&(t.visible?this.show():this.hide()),eu(t,"capture")&&this.setCapture(t.capture)},i.prototype.getLayoutBBox=function(){return this.getBBox()},i.prototype.getLocationType=function(){return this.get("locationType")},i.prototype.getOffset=function(){return{offsetX:this.get("offsetX"),offsetY:this.get("offsetY")}},i.prototype.setOffset=function(t,e){this.update({offsetX:t,offsetY:e})},i.prototype.setLocation=function(t){var e=ct({},t);this.update(e)},i.prototype.getLocation=function(){var t=this,e={},n=this.get("locationType"),r=f_[n];return Nt(r,function(o){e[o]=t.get(o)}),e},i.prototype.isList=function(){return!1},i.prototype.isSlider=function(){return!1},i.prototype.init=function(){},i.prototype.initCfg=function(){var t=this,e=this.get("defaultCfg");Nt(e,function(n,r){var o=t.get(r);if(Mr(o)){var s=_n({},n,o);t.set(r,s)}})},i}(Ec),pl="update_status",c_=["visible","tip","delegateObject"],h_=["container","group","shapesMap","isRegister","isUpdating","destroyed"],zi=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{container:null,shapesMap:{},group:null,capture:!0,isRegister:!1,isUpdating:!1,isInit:!0})},i.prototype.remove=function(){this.clear();var t=this.get("group");t.remove()},i.prototype.clear=function(){var t=this.get("group");t.clear(),this.set("shapesMap",{}),this.clearOffScreenCache(),this.set("isInit",!0)},i.prototype.getChildComponentById=function(t){var e=this.getElementById(t),n=e&&e.get("component");return n},i.prototype.getElementById=function(t){return this.get("shapesMap")[t]},i.prototype.getElementByLocalId=function(t){var e=this.getElementId(t);return this.getElementById(e)},i.prototype.getElementsByName=function(t){var e=[];return Nt(this.get("shapesMap"),function(n){n.get("name")===t&&e.push(n)}),e},i.prototype.getContainer=function(){return this.get("container")},i.prototype.updateInner=function(t){this.offScreenRender(),this.get("updateAutoRender")&&this.render()},i.prototype.render=function(){var t=this.get("offScreenGroup");t||(t=this.offScreenRender());var e=this.get("group");this.updateElements(t,e),this.deleteElements(),this.applyOffset(),this.get("eventInitted")||(this.initEvent(),this.set("eventInitted",!0)),this.set("isInit",!1)},i.prototype.show=function(){var t=this.get("group");t.show(),this.set("visible",!0)},i.prototype.hide=function(){var t=this.get("group");t.hide(),this.set("visible",!1)},i.prototype.setCapture=function(t){var e=this.get("group");e.set("capture",t),this.set("capture",t)},i.prototype.destroy=function(){this.removeEvent(),this.remove(),a.prototype.destroy.call(this)},i.prototype.getBBox=function(){return this.get("group").getCanvasBBox()},i.prototype.getLayoutBBox=function(){var t=this.get("group"),e=this.getInnerLayoutBBox(),n=t.getTotalMatrix();return n&&(e=i_(n,e)),e},i.prototype.on=function(t,e,n){var r=this.get("group");return r.on(t,e,n),this},i.prototype.off=function(t,e){var n=this.get("group");return n&&n.off(t,e),this},i.prototype.emit=function(t,e){var n=this.get("group");n.emit(t,e)},i.prototype.init=function(){a.prototype.init.call(this),this.get("group")||this.initGroup(),this.offScreenRender()},i.prototype.getInnerLayoutBBox=function(){return this.get("offScreenBBox")||this.get("group").getBBox()},i.prototype.delegateEmit=function(t,e){var n=this.get("group");e.target=n,n.emit(t,e),Fm(n,t,e)},i.prototype.createOffScreenGroup=function(){var t=this.get("group"),e=t.getGroupBase(),n=new e({delegateObject:this.getDelegateObject()});return n},i.prototype.applyOffset=function(){var t=this.get("offsetX"),e=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t,y:e})},i.prototype.initGroup=function(){var t=this.get("container");this.set("group",t.addGroup({id:this.get("id"),name:this.get("name"),capture:this.get("capture"),visible:this.get("visible"),isComponent:!0,component:this,delegateObject:this.getDelegateObject()}))},i.prototype.offScreenRender=function(){this.clearOffScreenCache();var t=this.createOffScreenGroup();return this.renderInner(t),this.set("offScreenGroup",t),this.set("offScreenBBox",zm(t)),t},i.prototype.addGroup=function(t,e){this.appendDelegateObject(t,e);var n=t.addGroup(e);return this.get("isRegister")&&this.registerElement(n),n},i.prototype.addShape=function(t,e){this.appendDelegateObject(t,e);var n=t.addShape(e);return this.get("isRegister")&&this.registerElement(n),n},i.prototype.addComponent=function(t,e){var n=e.id,r=e.component,o=Ti(e,["id","component"]),s=new r(ct(ct({},o),{id:n,container:t,updateAutoRender:this.get("updateAutoRender")}));return s.init(),s.render(),this.get("isRegister")&&this.registerElement(s.get("group")),s},i.prototype.initEvent=function(){},i.prototype.removeEvent=function(){var t=this.get("group");t.off()},i.prototype.getElementId=function(t){var e=this.get("id"),n=this.get("name");return e+"-"+n+"-"+t},i.prototype.registerElement=function(t){var e=t.get("id");this.get("shapesMap")[e]=t},i.prototype.unregisterElement=function(t){var e=t.get("id");delete this.get("shapesMap")[e]},i.prototype.moveElementTo=function(t,e){var n=Rd(e);t.attr("matrix",n)},i.prototype.addAnimation=function(t,e,n){var r=e.attr("opacity");qe(r)&&(r=1),e.attr("opacity",0),e.animate({opacity:r},n)},i.prototype.removeAnimation=function(t,e,n){e.animate({opacity:0},n)},i.prototype.updateAnimation=function(t,e,n,r){e.animate(n,r)},i.prototype.updateElements=function(t,e){var n=this,r=this.get("animate"),o=this.get("animateOption"),s=t.getChildren().slice(0),l;Nt(s,function(u){var c=u.get("id"),f=n.getElementById(c),h=u.get("name");if(f)if(u.get("isComponent")){var d=u.get("component"),v=f.get("component"),g=yd(d.cfg,px(of(d.cfg),h_));v.update(g),f.set(pl,"update")}else{var p=n.getReplaceAttrs(f,u);r&&o.update?n.updateAnimation(h,f,p,o.update):f.attr(p),u.isGroup()&&n.updateElements(u,f),Nt(c_,function(x){f.set(x,u.get(x))}),u_(f,u),l=f,f.set(pl,"update")}else{e.add(u);var m=e.getChildren();if(m.splice(m.length-1,1),l){var y=m.indexOf(l);m.splice(y+1,0,u)}else m.unshift(u);if(n.registerElement(u),u.set(pl,"add"),u.get("isComponent")){var d=u.get("component");d.set("container",e)}else u.isGroup()&&n.registerNewGroup(u);if(l=u,r){var w=n.get("isInit")?o.appear:o.enter;w&&n.addAnimation(h,u,w)}}})},i.prototype.clearUpdateStatus=function(t){var e=t.getChildren();Nt(e,function(n){n.set(pl,null)})},i.prototype.clearOffScreenCache=function(){var t=this.get("offScreenGroup");t&&t.destroy(),this.set("offScreenGroup",null),this.set("offScreenBBox",null)},i.prototype.getDelegateObject=function(){var t,e=this.get("name"),n=(t={},t[e]=this,t.component=this,t);return n},i.prototype.appendDelegateObject=function(t,e){var n=t.get("delegateObject");e.delegateObject||(e.delegateObject={}),Wr(e.delegateObject,n)},i.prototype.getReplaceAttrs=function(t,e){var n=t.attr(),r=e.attr();return Nt(n,function(o,s){r[s]===void 0&&(r[s]=void 0)}),r},i.prototype.registerNewGroup=function(t){var e=this,n=t.getChildren();Nt(n,function(r){e.registerElement(r),r.set(pl,"add"),r.isGroup()&&e.registerNewGroup(r)})},i.prototype.deleteElements=function(){var t=this,e=this.get("shapesMap"),n=[];Nt(e,function(s,l){!s.get(pl)||s.destroyed?n.push([l,s]):s.set(pl,null)});var r=this.get("animate"),o=this.get("animateOption");Nt(n,function(s){var l=s[0],u=s[1];if(!u.destroyed){var c=u.get("name");if(r&&o.leave){var f=Wr({callback:function(){t.removeElement(u)}},o.leave);t.removeAnimation(c,u,f)}else t.removeElement(u)}delete e[l]})},i.prototype.removeElement=function(t){if(t.get("isGroup")){var e=t.get("component");e&&e.destroy()}t.remove()},i}(Hm),hh="\u2026";function d_(a){for(var i=0,t=0;t0&&a.charCodeAt(i)<128?1:2}function v_(a,i,t){t===void 0&&(t="tail");var e=a.length,n="";if(t==="tail"){for(var r=0,o=0;r=19968&&s<=40869?r+=2:r+=1}r>t&&(t=r,e=n)}return a[e].getBBox().width}function qh(a){if(a.length>m_)return y_(a);var i=0;return Nt(a,function(t){var e=t.getBBox(),n=e.width;i=0?h=v_(r,f,e):h=g_,h&&(i.attr("text",h),c=!0)}return c?i.set("tip",r):i.set("tip",null),c}function Yc(a,i){var t=i.x,e=i.y,n=i.content,r=i.style,o=i.id,s=i.name,l=i.rotate,u=i.maxLength,c=i.autoEllipsis,f=i.isVertical,h=i.ellipsisPosition,d=i.background,v=a.addGroup({id:o+"-group",name:s+"-group",attrs:{x:t,y:e}}),g=v.addShape({type:"text",id:o,name:s,attrs:ct({x:0,y:0,text:n},r)}),p=sc(he(d,"padding",0));if(u&&c){var m=u-(p[1]+p[3]);Du(!f,g,m,h)}if(d){var y=he(d,"style",{}),w=g.getCanvasBBox(),x=w.minX,M=w.minY,_=w.width,D=w.height,C=v.addShape("rect",{id:o+"-bg",name:o+"-bg",attrs:ct({x:x-p[3],y:M-p[0],width:_+p[1]+p[3],height:D+p[0]+p[2]},y)});C.toBack()}Lu(v,t,e),km(v,l,t,e)}const Un={fontFamily:` BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimSun, "sans-serif"`,textColor:"#2C3542",activeTextColor:"#333333",uncheckedColor:"#D8D8D8",lineColor:"#416180",regionColor:"#CCD7EB",verticalAxisRotate:-Math.PI/4,horizontalAxisRotate:Math.PI/4,descriptionIconStroke:"#fff",descriptionIconFill:"rgba(58, 73, 101, .25)"};var w_=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"annotation",type:"line",locationType:"region",start:null,end:null,style:{},text:null,defaultCfg:{style:{fill:Un.textColor,fontSize:12,textAlign:"center",textBaseline:"bottom",fontFamily:Un.fontFamily},text:{position:"center",autoRotate:!0,content:null,offsetX:0,offsetY:0,style:{stroke:Un.lineColor,lineWidth:1}}}})},i.prototype.renderInner=function(t){this.renderLine(t),this.get("text")&&this.renderLabel(t)},i.prototype.renderLine=function(t){var e=this.get("start"),n=this.get("end"),r=this.get("style");this.addShape(t,{type:"line",id:this.getElementId("line"),name:"annotation-line",attrs:ct({x1:e.x,y1:e.y,x2:n.x,y2:n.y},r)})},i.prototype.getLabelPoint=function(t,e,n){var r;return n==="start"?r=0:n==="center"?r=.5:$n(n)&&n.indexOf("%")!==-1?r=parseInt(n,10)/100:or(n)?r=n:r=1,(r>1||r<0)&&(r=1),{x:Pl(t.x,e.x,r),y:Pl(t.y,e.y,r)}},i.prototype.renderLabel=function(t){var e=this.get("text"),n=this.get("start"),r=this.get("end"),o=e.position,s=e.content,l=e.style,u=e.offsetX,c=e.offsetY,f=e.autoRotate,h=e.maxLength,d=e.autoEllipsis,v=e.ellipsisPosition,g=e.background,p=e.isVertical,m=p===void 0?!1:p,y=this.getLabelPoint(n,r,o),w=y.x+u,x=y.y+c,M={id:this.getElementId("line-text"),name:"annotation-line-text",x:w,y:x,content:s,style:l,maxLength:h,autoEllipsis:d,ellipsisPosition:v,background:g,isVertical:m};if(f){var _=[r.x-n.x,r.y-n.y];M.rotate=Math.atan2(_[1],_[0])}Yc(t,M)},i}(zi),E_=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"annotation",type:"text",locationType:"point",x:0,y:0,content:"",rotate:null,style:{},background:null,maxLength:null,autoEllipsis:!0,isVertical:!1,ellipsisPosition:"tail",defaultCfg:{style:{fill:Un.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:Un.fontFamily}}})},i.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},i.prototype.renderInner=function(t){var e=this.getLocation(),n=e.x,r=e.y,o=this.get("content"),s=this.get("style"),l=this.getElementId("text"),u=this.get("name")+"-text",c=this.get("maxLength"),f=this.get("autoEllipsis"),h=this.get("isVertical"),d=this.get("ellipsisPosition"),v=this.get("background"),g=this.get("rotate"),p={id:l,name:u,x:n,y:r,content:o,style:s,maxLength:c,autoEllipsis:f,isVertical:h,ellipsisPosition:d,background:v,rotate:g};Yc(t,p)},i.prototype.resetLocation=function(){var t=this.getElementByLocalId("text-group");if(t){var e=this.getLocation(),n=e.x,r=e.y,o=this.get("rotate");Lu(t,n,r),km(t,o,n,r)}},i}(zi),M_=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"annotation",type:"arc",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:Math.PI*3/2,style:{stroke:"#999",lineWidth:1}})},i.prototype.renderInner=function(t){this.renderArc(t)},i.prototype.getArcPath=function(){var t=this.getLocation(),e=t.center,n=t.radius,r=t.startAngle,o=t.endAngle,s=Jl(e,n,r),l=Jl(e,n,o),u=o-r>Math.PI?1:0,c=[["M",s.x,s.y]];if(o-r===Math.PI*2){var f=Jl(e,n,r+Math.PI);c.push(["A",n,n,0,u,1,f.x,f.y]),c.push(["A",n,n,0,u,1,l.x,l.y])}else c.push(["A",n,n,0,u,1,l.x,l.y]);return c},i.prototype.renderArc=function(t){var e=this.getArcPath(),n=this.get("style");this.addShape(t,{type:"path",id:this.getElementId("arc"),name:"annotation-arc",attrs:ct({path:e},n)})},i}(zi),b_=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"annotation",type:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:Un.regionColor,opacity:.4}}})},i.prototype.renderInner=function(t){this.renderRegion(t)},i.prototype.renderRegion=function(t){var e=this.get("start"),n=this.get("end"),r=this.get("style"),o=Ku({start:e,end:n});this.addShape(t,{type:"rect",id:this.getElementId("region"),name:"annotation-region",attrs:ct({x:o.x,y:o.y,width:o.width,height:o.height},r)})},i}(zi),__=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"annotation",type:"image",locationType:"region",start:null,end:null,src:null,style:{}})},i.prototype.renderInner=function(t){this.renderImage(t)},i.prototype.getImageAttrs=function(){var t=this.get("start"),e=this.get("end"),n=this.get("style"),r=Ku({start:t,end:e}),o=this.get("src");return ct({x:r.x,y:r.y,img:o,width:r.width,height:r.height},n)},i.prototype.renderImage=function(t){this.addShape(t,{type:"image",id:this.getElementId("image"),name:"annotation-image",attrs:this.getImageAttrs()})},i}(zi),S_=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"annotation",type:"dataMarker",locationType:"point",x:0,y:0,point:{},line:{},text:{},direction:"upward",autoAdjust:!0,coordinateBBox:null,defaultCfg:{point:{display:!0,style:{r:3,fill:"#FFFFFF",stroke:"#1890FF",lineWidth:2}},line:{display:!0,length:20,style:{stroke:Un.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:Un.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:Un.fontFamily}}}})},i.prototype.renderInner=function(t){he(this.get("line"),"display")&&this.renderLine(t),he(this.get("text"),"display")&&this.renderText(t),he(this.get("point"),"display")&&this.renderPoint(t),this.get("autoAdjust")&&this.autoAdjust(t)},i.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x")+this.get("offsetX"),y:this.get("y")+this.get("offsetY")})},i.prototype.renderPoint=function(t){var e=this.getShapeAttrs().point;this.addShape(t,{type:"circle",id:this.getElementId("point"),name:"annotation-point",attrs:e})},i.prototype.renderLine=function(t){var e=this.getShapeAttrs().line;this.addShape(t,{type:"path",id:this.getElementId("line"),name:"annotation-line",attrs:e})},i.prototype.renderText=function(t){var e=this.getShapeAttrs().text,n=e.x,r=e.y,o=e.text,s=Ti(e,["x","y","text"]),l=this.get("text"),u=l.background,c=l.maxLength,f=l.autoEllipsis,h=l.isVertival,d=l.ellipsisPosition,v={x:n,y:r,id:this.getElementId("text"),name:"annotation-text",content:o,style:s,background:u,maxLength:c,autoEllipsis:f,isVertival:h,ellipsisPosition:d};Yc(t,v)},i.prototype.autoAdjust=function(t){var e=this.get("direction"),n=this.get("x"),r=this.get("y"),o=he(this.get("line"),"length",0),s=this.get("coordinateBBox"),l=t.getBBox(),u=l.minX,c=l.maxX,f=l.minY,h=l.maxY,d=t.findById(this.getElementId("text-group")),v=t.findById(this.getElementId("text")),g=t.findById(this.getElementId("line"));if(!!s){if(d){if(n+u<=s.minX){var p=s.minX-(n+u);Lu(d,d.attr("x")+p,d.attr("y"))}if(n+c>=s.maxX){var p=n+c-s.maxX;Lu(d,d.attr("x")-p,d.attr("y"))}}if(e==="upward"&&r+f<=s.minY||e!=="upward"&&r+h>=s.maxY){var m=void 0,y=void 0;e==="upward"&&r+f<=s.minY?(m="top",y=1):(m="bottom",y=-1),v.attr("textBaseline",m),g&&g.attr("path",[["M",0,0],["L",0,o*y]]),Lu(d,d.attr("x"),(o+2)*y)}}},i.prototype.getShapeAttrs=function(){var t=he(this.get("line"),"display"),e=he(this.get("point"),"style",{}),n=he(this.get("line"),"style",{}),r=he(this.get("text"),"style",{}),o=this.get("direction"),s=t?he(this.get("line"),"length",0):0,l=o==="upward"?-1:1;return{point:ct({x:0,y:0},e),line:ct({path:[["M",0,0],["L",0,s*l]]},n),text:ct({x:0,y:(s+2)*l,text:he(this.get("text"),"content",""),textBaseline:o==="upward"?"bottom":"top"},r)}},i}(zi),C_=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"annotation",type:"dataRegion",locationType:"points",points:[],lineLength:0,region:{},text:{},defaultCfg:{region:{style:{lineWidth:0,fill:Un.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:Un.textColor,fontFamily:Un.fontFamily}}}})},i.prototype.renderInner=function(t){var e=he(this.get("region"),"style",{});he(this.get("text"),"style",{});var n=this.get("lineLength")||0,r=this.get("points");if(!!r.length){var o=o_(r),s=[];s.push(["M",r[0].x,o.minY-n]),r.forEach(function(u){s.push(["L",u.x,u.y])}),s.push(["L",r[r.length-1].x,r[r.length-1].y-n]),this.addShape(t,{type:"path",id:this.getElementId("region"),name:"annotation-region",attrs:ct({path:s},e)});var l=ct({id:this.getElementId("text"),name:"annotation-text",x:(o.minX+o.maxX)/2,y:o.minY-n},this.get("text"));Yc(t,l)}},i}(zi),P_=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"annotation",type:"regionFilter",locationType:"region",start:null,end:null,color:null,shape:[]})},i.prototype.renderInner=function(t){var e=this,n=this.get("start"),r=this.get("end"),o=this.addGroup(t,{id:this.getElementId("region-filter"),capture:!1});Nt(this.get("shapes"),function(l,u){var c=l.get("type"),f=no(l.attr());e.adjustShapeAttrs(f),e.addShape(o,{id:e.getElementId("shape-"+c+"-"+u),capture:!1,type:c,attrs:f})});var s=Ku({start:n,end:r});o.setClip({type:"rect",attrs:{x:s.minX,y:s.minY,width:s.width,height:s.height}})},i.prototype.adjustShapeAttrs=function(t){var e=this.get("color");t.fill&&(t.fill=t.fillStyle=e),t.stroke=t.strokeStyle=e},i}(zi),T_=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"annotation",type:"shape",draw:Js})},i.prototype.renderInner=function(t){var e=this.get("render");Rn(e)&&e(t)},i}(zi),Nd=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{container:null,containerTpl:"
",updateAutoRender:!0,containerClassName:"",parent:null})},i.prototype.getContainer=function(){return this.get("container")},i.prototype.show=function(){var t=this.get("container");t.style.display="",this.set("visible",!0)},i.prototype.hide=function(){var t=this.get("container");t.style.display="none",this.set("visible",!1)},i.prototype.setCapture=function(t){var e=this.getContainer(),n=t?"auto":"none";e.style.pointerEvents=n,this.set("capture",t)},i.prototype.getBBox=function(){var t=this.getContainer(),e=parseFloat(t.style.left)||0,n=parseFloat(t.style.top)||0;return zc(e,n,t.clientWidth,t.clientHeight)},i.prototype.clear=function(){var t=this.get("container");Fd(t)},i.prototype.destroy=function(){this.removeEvent(),this.removeDom(),a.prototype.destroy.call(this)},i.prototype.init=function(){a.prototype.init.call(this),this.initContainer(),this.initDom(),this.resetStyles(),this.applyStyles(),this.initEvent(),this.initCapture(),this.initVisible()},i.prototype.initCapture=function(){this.setCapture(this.get("capture"))},i.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},i.prototype.initDom=function(){},i.prototype.initContainer=function(){var t=this.get("container");if(qe(t)){t=this.createDom();var e=this.get("parent");$n(e)&&(e=document.getElementById(e),this.set("parent",e)),e.appendChild(t),this.get("containerId")&&t.setAttribute("id",this.get("containerId")),this.set("container",t)}else $n(t)&&(t=document.getElementById(t),this.set("container",t));this.get("parent")||this.set("parent",t.parentNode)},i.prototype.resetStyles=function(){var t=this.get("domStyles"),e=this.get("defaultStyles");t?t=_n({},e,t):t=e,this.set("domStyles",t)},i.prototype.applyStyles=function(){var t=this.get("domStyles");if(!!t){var e=this.getContainer();this.applyChildrenStyles(e,t);var n=this.get("containerClassName");if(n&&a_(e,n)){var r=t[n];Ji(e,r)}}},i.prototype.applyChildrenStyles=function(t,e){Nt(e,function(n,r){var o=t.getElementsByClassName(r);Nt(o,function(s){Ji(s,n)})})},i.prototype.applyStyle=function(t,e){var n=this.get("domStyles");Ji(e,n[t])},i.prototype.createDom=function(){var t=this.get("containerTpl");return rl(t)},i.prototype.initEvent=function(){},i.prototype.removeDom=function(){var t=this.get("container");t&&t.parentNode&&t.parentNode.removeChild(t)},i.prototype.removeEvent=function(){},i.prototype.updateInner=function(t){eu(t,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},i.prototype.resetPosition=function(){},i}(Hm),A_=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"annotation",type:"html",locationType:"point",x:0,y:0,containerTpl:'
',alignX:"left",alignY:"top",html:"",zIndex:7})},i.prototype.render=function(){var t=this.getContainer(),e=this.get("html");Fd(t);var n=Rn(e)?e(t):e;if(pp(n))t.appendChild(n);else if($n(n)||or(n)){var r=rl(""+n);r&&t.appendChild(r)}this.resetPosition()},i.prototype.resetPosition=function(){var t=this.getContainer(),e=this.getLocation(),n=e.x,r=e.y,o=this.get("alignX"),s=this.get("alignY"),l=this.get("offsetX"),u=this.get("offsetY"),c=Kx(t),f=Xx(t),h={x:n,y:r};o==="middle"?h.x-=Math.round(c/2):o==="right"&&(h.x-=Math.round(c)),s==="middle"?h.y-=Math.round(f/2):s==="bottom"&&(h.y-=Math.round(f)),l&&(h.x+=l),u&&(h.y+=u),Ji(t,{position:"absolute",left:h.x+"px",top:h.y+"px",zIndex:this.get("zIndex")})},i}(Nd);const O_=Object.freeze(Object.defineProperty({__proto__:null,Line:w_,Text:E_,Arc:M_,Region:b_,Image:__,DataMarker:S_,DataRegion:C_,RegionFilter:P_,Shape:T_,Html:A_},Symbol.toStringTag,{value:"Module"}));function Cu(a,i,t){var e=i+"Style",n=null;return Nt(t,function(r,o){a[o]&&r[e]&&(n||(n={}),Wr(n,r[e]))}),n}var Wm=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"axis",ticks:[],line:{},tickLine:{},subTickLine:null,title:null,label:{},verticalFactor:1,verticalLimitLength:null,overlapOrder:["autoRotate","autoEllipsis","autoHide"],tickStates:{},optimize:{},defaultCfg:{line:{style:{lineWidth:1,stroke:Un.lineColor}},tickLine:{style:{lineWidth:1,stroke:Un.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:Un.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:Un.textColor,fontFamily:Un.fontFamily,fontWeight:"normal"},offset:10,offsetX:0,offsetY:0},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:Un.textColor,textBaseline:"middle",fontFamily:Un.fontFamily,textAlign:"center"},iconStyle:{fill:Un.descriptionIconFill,stroke:Un.descriptionIconStroke},description:""},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:Un.uncheckedColor}}},optimize:{enable:!0,threshold:400}},theme:{}})},i.prototype.renderInner=function(t){this.get("line")&&this.drawLine(t),this.drawTicks(t),this.get("title")&&this.drawTitle(t)},i.prototype.isList=function(){return!0},i.prototype.getItems=function(){return this.get("ticks")},i.prototype.setItems=function(t){this.update({ticks:t})},i.prototype.updateItem=function(t,e){Wr(t,e),this.clear(),this.render()},i.prototype.clearItems=function(){var t=this.getElementByLocalId("label-group");t&&t.clear()},i.prototype.setItemState=function(t,e,n){t[e]=n,this.updateTickStates(t)},i.prototype.hasState=function(t,e){return!!t[e]},i.prototype.getItemStates=function(t){var e=this.get("tickStates"),n=[];return Nt(e,function(r,o){t[o]&&n.push(o)}),n},i.prototype.clearItemsState=function(t){var e=this,n=this.getItemsByState(t);Nt(n,function(r){e.setItemState(r,t,!1)})},i.prototype.getItemsByState=function(t){var e=this,n=this.getItems();return Co(n,function(r){return e.hasState(r,t)})},i.prototype.getSidePoint=function(t,e){var n=this,r=n.getSideVector(e,t);return{x:t.x+r[0],y:t.y+r[1]}},i.prototype.getTextAnchor=function(t){var e;return Ai(t[0],0)?e="center":t[0]>0?e="start":t[0]<0&&(e="end"),e},i.prototype.getTextBaseline=function(t){var e;return Ai(t[1],0)?e="middle":t[1]>0?e="top":t[1]<0&&(e="bottom"),e},i.prototype.processOverlap=function(t){},i.prototype.drawLine=function(t){var e=this.getLinePath(),n=this.get("line");this.addShape(t,{type:"path",id:this.getElementId("line"),name:"axis-line",attrs:Wr({path:e},n.style)})},i.prototype.getTickLineItems=function(t){var e=this,n=[],r=this.get("tickLine"),o=r.alignTick,s=r.length,l=1,u=t.length;return u>=2&&(l=t[1].value-t[0].value),Nt(t,function(c){var f=c.point;o||(f=e.getTickPoint(c.value-l/2));var h=e.getSidePoint(f,s);n.push({startPoint:f,tickValue:c.value,endPoint:h,tickId:c.id,id:"tickline-"+c.id})}),n},i.prototype.getSubTickLineItems=function(t){var e=[],n=this.get("subTickLine"),r=n.count,o=t.length;if(o>=2)for(var s=0;s0){var n=Fa(e);if(n>t.threshold){var r=Math.ceil(n/t.threshold),o=e.filter(function(s,l){return l%r===0});this.set("ticks",o),this.set("originalTicks",e)}}},i.prototype.getLabelAttrs=function(t,e,n){var r=this.get("label"),o=r.offset,s=r.offsetX,l=r.offsetY,u=r.rotate,c=r.formatter,f=this.getSidePoint(t.point,o),h=this.getSideVector(o,f),d=c?c(t.name,t,e):t.name,v=r.style;v=Rn(v)?he(this.get("theme"),["label","style"],{}):v;var g=Wr({x:f.x+s,y:f.y+l,text:d,textAlign:this.getTextAnchor(h),textBaseline:this.getTextBaseline(h)},v);return u&&(g.matrix=jl(f,u)),g},i.prototype.drawLabels=function(t){var e=this,n=this.get("ticks"),r=this.addGroup(t,{name:"axis-label-group",id:this.getElementId("label-group")});Nt(n,function(h,d){e.addShape(r,{type:"text",name:"axis-label",id:e.getElementId("label-"+h.id),attrs:e.getLabelAttrs(h,d,n),delegateObject:{tick:h,item:h,index:d}})}),this.processOverlap(r);var o=r.getChildren(),s=he(this.get("theme"),["label","style"],{}),l=this.get("label"),u=l.style,c=l.formatter;if(Rn(u)){var f=o.map(function(h){return he(h.get("delegateObject"),"tick")});Nt(o,function(h,d){var v=h.get("delegateObject").tick,g=c?c(v.name,v,d):v.name,p=Wr({},s,u(g,d,f));h.attr(p)})}},i.prototype.getTitleAttrs=function(){var t=this.get("title"),e=t.style,n=t.position,r=t.offset,o=t.spacing,s=o===void 0?0:o,l=t.autoRotate,u=e.fontSize,c=.5;n==="start"?c=0:n==="end"&&(c=1);var f=this.getTickPoint(c),h=this.getSidePoint(f,r||s+u/2),d=Wr({x:h.x,y:h.y,text:t.text},e),v=t.rotate,g=v;if(qe(v)&&l){var p=this.getAxisVector(f),m=[1,0];g=bd(p,m,!0)}if(g){var y=jl(h,g);d.matrix=y}return d},i.prototype.drawTitle=function(t){var e,n=this.getTitleAttrs(),r=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"axis-title",attrs:n});!((e=this.get("title"))===null||e===void 0)&&e.description&&this.drawDescriptionIcon(t,r,n.matrix)},i.prototype.drawDescriptionIcon=function(t,e,n){var r=this.addGroup(t,{name:"axis-description",id:this.getElementById("description")}),o=e.getBBox(),s=o.maxX,l=o.maxY,u=o.height,c=this.get("title").iconStyle,f=4,h=u/2,d=h/6,v=s+f,g=l-u/2,p=[v+h,g-h],m=p[0],y=p[1],w=[m+h,y+h],x=w[0],M=w[1],_=[m,M+h],D=_[0],C=_[1],F=[v,y+h],k=F[0],j=F[1],V=[v+h,g-u/4],st=V[0],yt=V[1],Q=[st,yt+d],it=Q[0],Pt=Q[1],ht=[it,Pt+d],lt=ht[0],U=ht[1],xt=[lt,U+h*3/4],Gt=xt[0],Bt=xt[1];this.addShape(r,{type:"path",id:this.getElementId("title-description-icon"),name:"axis-title-description-icon",attrs:ct({path:[["M",m,y],["A",h,h,0,0,1,x,M],["A",h,h,0,0,1,D,C],["A",h,h,0,0,1,k,j],["A",h,h,0,0,1,m,y],["M",st,yt],["L",it,Pt],["M",lt,U],["L",Gt,Bt]],lineWidth:d,matrix:n},c)}),this.addShape(r,{type:"rect",id:this.getElementId("title-description-rect"),name:"axis-title-description-rect",attrs:{x:v,y:g-u/2,width:u,height:u,stroke:"#000",fill:"#000",opacity:0,matrix:n,cursor:"pointer"}})},i.prototype.applyTickStates=function(t,e){var n=this.getItemStates(t);if(n.length){var r=this.get("tickStates"),o=this.getElementId("label-"+t.id),s=e.findById(o);if(s){var l=Cu(t,"label",r);l&&s.attr(l)}var u=this.getElementId("tickline-"+t.id),c=e.findById(u);if(c){var f=Cu(t,"tickLine",r);f&&c.attr(f)}}},i.prototype.updateTickStates=function(t){var e=this.getItemStates(t),n=this.get("tickStates"),r=this.get("label"),o=this.getElementByLocalId("label-"+t.id),s=this.get("tickLine"),l=this.getElementByLocalId("tickline-"+t.id);if(e.length){if(o){var u=Cu(t,"label",n);u&&o.attr(u)}if(l){var c=Cu(t,"tickLine",n);c&&l.attr(c)}}else o&&o.attr(r.style),l&&l.attr(s.style)},i}(zi);function kd(a,i,t,e){var n=i.getChildren(),r=!1;return Nt(n,function(o){var s=Du(a,o,t,e);r=r||s}),r}function I_(){return Gm}function j_(a,i,t){return kd(a,i,t,"head")}function Gm(a,i,t){return kd(a,i,t,"tail")}function L_(a,i,t){return kd(a,i,t,"middle")}const D_=Object.freeze(Object.defineProperty({__proto__:null,getDefault:I_,ellipsisHead:j_,ellipsisTail:Gm,ellipsisMiddle:L_},Symbol.toStringTag,{value:"Module"}));function B_(a){var i=a.attr("matrix");return i&&i[0]!==1}function Vm(a){var i=B_(a)?r_(a.attr("matrix")):0;return i%360}function td(a,i,t,e){var n=!1,r=Vm(i),o=Math.abs(a?t.attr("y")-i.attr("y"):t.attr("x")-i.attr("x")),s=(a?t.attr("y")>i.attr("y"):t.attr("x")>i.attr("x"))?i.getBBox():t.getBBox();if(a){var l=Math.abs(Math.cos(r));lc(l,0,Math.PI/180)?n=s.width+e>o:n=s.height/l+e>o}else{var l=Math.abs(Math.sin(r));lc(l,0,Math.PI/180)?n=s.width+e>o:n=s.height/l+e>o}return n}function Zu(a,i,t,e){var n=(e==null?void 0:e.minGap)||0,r=i.getChildren().slice().filter(function(d){return d.get("visible")});if(!r.length)return!1;var o=!1;t&&r.reverse();for(var s=r.length,l=r[0],u=l,c=1;c1){h=Math.ceil(h);for(var g=0;g2){var o=n[0],s=n[n.length-1];o.get("visible")||(o.show(),Zu(a,i,!1,e)&&(r=!0)),s.get("visible")||(s.show(),Zu(a,i,!0,e)&&(r=!0))}return r}const Y_=Object.freeze(Object.defineProperty({__proto__:null,getDefault:R_,reserveFirst:F_,reserveLast:N_,reserveBoth:k_,equidistance:Xm,equidistanceWithReverseBoth:z_},Symbol.toStringTag,{value:"Module"}));function H_(a,i){Nt(a,function(t){var e=t.attr("x"),n=t.attr("y"),r=jl({x:e,y:n},i);t.attr("matrix",r)})}function Um(a,i,t,e){var n=i.getChildren();if(!n.length||!a&&n.length<2)return!1;var r=qh(n),o=!1;if(a)o=!!t&&r>t;else{var s=Math.abs(n[1].attr("x")-n[0].attr("x"));o=r>s}if(o){var l=e(t,r);H_(n,l)}return o}function W_(){return Km}function Km(a,i,t,e){return Um(a,i,t,function(){return or(e)?e:a?Un.verticalAxisRotate:Un.horizontalAxisRotate})}function G_(a,i,t){return Um(a,i,t,function(e,n){if(!e)return a?Un.verticalAxisRotate:Un.horizontalAxisRotate;if(a)return-Math.acos(e/n);var r=0;return e>n?r=Math.PI/4:(r=Math.asin(e/n),r>Math.PI/4&&(r=Math.PI/4)),r})}const V_=Object.freeze(Object.defineProperty({__proto__:null,getDefault:W_,fixedAngle:Km,unfixedAngle:G_},Symbol.toStringTag,{value:"Module"})),Zm=Object.freeze(Object.defineProperty({__proto__:null,autoHide:Y_,autoRotate:V_,autoEllipsis:D_},Symbol.toStringTag,{value:"Module"}));var $_=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{type:"line",locationType:"region",start:null,end:null})},i.prototype.getLinePath=function(){var t=this.get("start"),e=this.get("end"),n=[];return n.push(["M",t.x,t.y]),n.push(["L",e.x,e.y]),n},i.prototype.getInnerLayoutBBox=function(){var t=this.get("start"),e=this.get("end"),n=a.prototype.getInnerLayoutBBox.call(this),r=Math.min(t.x,e.x,n.x),o=Math.min(t.y,e.y,n.y),s=Math.max(t.x,e.x,n.maxX),l=Math.max(t.y,e.y,n.maxY);return{x:r,y:o,minX:r,minY:o,maxX:s,maxY:l,width:s-r,height:l-o}},i.prototype.isVertical=function(){var t=this.get("start"),e=this.get("end");return Ai(t.x,e.x)},i.prototype.isHorizontal=function(){var t=this.get("start"),e=this.get("end");return Ai(t.y,e.y)},i.prototype.getTickPoint=function(t){var e=this,n=e.get("start"),r=e.get("end"),o=r.x-n.x,s=r.y-n.y;return{x:n.x+o*t,y:n.y+s*t}},i.prototype.getSideVector=function(t){var e=this.getAxisVector(),n=Lp([0,0],e),r=this.get("verticalFactor"),o=[n[1],n[0]*-1];return _o([0,0],o,t*r)},i.prototype.getAxisVector=function(){var t=this.get("start"),e=this.get("end");return[e.x-t.x,e.y-t.y]},i.prototype.processOverlap=function(t){var e=this,n=this.isVertical(),r=this.isHorizontal();if(!(!n&&!r)){var o=this.get("label"),s=this.get("title"),l=this.get("verticalLimitLength"),u=o.offset,c=l,f=0,h=0;s&&(f=s.style.fontSize,h=s.spacing),c&&(c=c-u-h-f);var d=this.get("overlapOrder");if(Nt(d,function(p){o[p]&&e.canProcessOverlap(p)&&e.autoProcessOverlap(p,o[p],t,c)}),s&&qe(s.offset)){var v=t.getCanvasBBox(),g=n?v.width:v.height;s.offset=u+g+h+f/2}}},i.prototype.canProcessOverlap=function(t){var e=this.get("label");return t==="autoRotate"?qe(e.rotate):!0},i.prototype.autoProcessOverlap=function(t,e,n,r){var o=this,s=this.isVertical(),l=!1,u=Zm[t];if(e===!0)this.get("label"),l=u.getDefault()(s,n,r);else if(Rn(e))l=e(s,n,r);else if(Mr(e)){var c=e;u[c.type]&&(l=u[c.type](s,n,r,c.cfg))}else u[e]&&(l=u[e](s,n,r));if(t==="autoRotate"){if(l){var f=n.getChildren(),h=this.get("verticalFactor");Nt(f,function(v){var g=v.attr("textAlign");if(g==="center"){var p=h>0?"end":"start";v.attr("textAlign",p)}})}}else if(t==="autoHide"){var d=n.getChildren().slice(0);Nt(d,function(v){v.get("visible")||(o.get("isRegister")&&o.unregisterElement(v),v.remove())})}},i}(Wm),X_=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{type:"circle",locationType:"circle",center:null,radius:null,startAngle:-Math.PI/2,endAngle:Math.PI*3/2})},i.prototype.getLinePath=function(){var t=this.get("center"),e=t.x,n=t.y,r=this.get("radius"),o=r,s=this.get("startAngle"),l=this.get("endAngle"),u=[];if(Math.abs(l-s)===Math.PI*2)u=[["M",e,n-o],["A",r,o,0,1,1,e,n+o],["A",r,o,0,1,1,e,n-o],["Z"]];else{var c=this.getCirclePoint(s),f=this.getCirclePoint(l),h=Math.abs(l-s)>Math.PI?1:0,d=s>l?0:1;u=[["M",e,n],["L",c.x,c.y],["A",r,o,0,h,d,f.x,f.y],["L",e,n]]}return u},i.prototype.getTickPoint=function(t){var e=this.get("startAngle"),n=this.get("endAngle"),r=e+(n-e)*t;return this.getCirclePoint(r)},i.prototype.getSideVector=function(t,e){var n=this.get("center"),r=[e.x-n.x,e.y-n.y],o=this.get("verticalFactor"),s=Xl(r);return _o(r,r,o*t/s),r},i.prototype.getAxisVector=function(t){var e=this.get("center"),n=[t.x-e.x,t.y-e.y];return[n[1],-1*n[0]]},i.prototype.getCirclePoint=function(t,e){var n=this.get("center");return e=e||this.get("radius"),{x:n.x+Math.cos(t)*e,y:n.y+Math.sin(t)*e}},i.prototype.canProcessOverlap=function(t){var e=this.get("label");return t==="autoRotate"?qe(e.rotate):!0},i.prototype.processOverlap=function(t){var e=this,n=this.get("label"),r=this.get("title"),o=this.get("verticalLimitLength"),s=n.offset,l=o,u=0,c=0;r&&(u=r.style.fontSize,c=r.spacing),l&&(l=l-s-c-u);var f=this.get("overlapOrder");if(Nt(f,function(d){n[d]&&e.canProcessOverlap(d)&&e.autoProcessOverlap(d,n[d],t,l)}),r&&qe(r.offset)){var h=t.getCanvasBBox().height;r.offset=s+h+c+u/2}},i.prototype.autoProcessOverlap=function(t,e,n,r){var o=this,s=!1,l=Zm[t];if(r>0)if(e===!0)s=l.getDefault()(!1,n,r);else if(Rn(e))s=e(!1,n,r);else if(Mr(e)){var u=e;l[u.type]&&(s=l[u.type](!1,n,r,u.cfg))}else l[e]&&(s=l[e](!1,n,r));if(t==="autoRotate"){if(s){var c=n.getChildren(),f=this.get("verticalFactor");Nt(c,function(d){var v=d.attr("textAlign");if(v==="center"){var g=f>0?"end":"start";d.attr("textAlign",g)}})}}else if(t==="autoHide"){var h=n.getChildren().slice(0);Nt(h,function(d){d.get("visible")||(o.get("isRegister")&&o.unregisterElement(d),d.remove())})}},i}(Wm),zd=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"crosshair",type:"base",line:{},text:null,textBackground:{},capture:!1,defaultCfg:{line:{style:{lineWidth:1,stroke:Un.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:Un.textColor,textAlign:"center",textBaseline:"middle",fontFamily:Un.fontFamily}},textBackground:{padding:5,style:{stroke:Un.lineColor}}}})},i.prototype.renderInner=function(t){this.get("line")&&this.renderLine(t),this.get("text")&&(this.renderText(t),this.renderBackground(t))},i.prototype.renderText=function(t){var e=this.get("text"),n=e.style,r=e.autoRotate,o=e.content;if(!qe(o)){var s=this.getTextPoint(),l=null;if(r){var u=this.getRotateAngle();l=jl(s,u)}this.addShape(t,{type:"text",name:"crosshair-text",id:this.getElementId("text"),attrs:ct(ct(ct({},s),{text:o,matrix:l}),n)})}},i.prototype.renderLine=function(t){var e=this.getLinePath(),n=this.get("line"),r=n.style;this.addShape(t,{type:"path",name:"crosshair-line",id:this.getElementId("line"),attrs:ct({path:e},r)})},i.prototype.renderBackground=function(t){var e=this.getElementId("text"),n=t.findById(e),r=this.get("textBackground");if(r&&n){var o=n.getBBox(),s=sc(r.padding),l=r.style,u=this.addShape(t,{type:"rect",name:"crosshair-text-background",id:this.getElementId("text-background"),attrs:ct({x:o.x-s[3],y:o.y-s[0],width:o.width+s[1]+s[3],height:o.height+s[0]+s[2],matrix:n.attr("matrix")},l)});u.toBack()}},i}(zi),Qm=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{type:"line",locationType:"region",start:null,end:null})},i.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.start,n=t.end,r=this.get("text").position,o=Math.atan2(n.y-e.y,n.x-e.x),s=r==="start"?o-Math.PI/2:o+Math.PI/2;return s},i.prototype.getTextPoint=function(){var t=this.getLocation(),e=t.start,n=t.end,r=this.get("text"),o=r.position,s=r.offset;return Ym(e,n,o,s)},i.prototype.getLinePath=function(){var t=this.getLocation(),e=t.start,n=t.end;return[["M",e.x,e.y],["L",n.x,n.y]]},i}(zd),U_=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{type:"circle",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:Math.PI*3/2})},i.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.startAngle,n=t.endAngle,r=this.get("text").position,o=r==="start"?e+Math.PI/2:n-Math.PI/2;return o},i.prototype.getTextPoint=function(){var t=this.get("text"),e=t.position,n=t.offset,r=this.getLocation(),o=r.center,s=r.radius,l=r.startAngle,u=r.endAngle,c=e==="start"?l:u,f=this.getRotateAngle()-Math.PI,h=Jl(o,s,c),d=Math.cos(f)*n,v=Math.sin(f)*n;return{x:h.x+d,y:h.y+v}},i.prototype.getLinePath=function(){var t=this.getLocation(),e=t.center,n=t.radius,r=t.startAngle,o=t.endAngle,s=null;if(o-r===Math.PI*2){var l=e.x,u=e.y;s=[["M",l,u-n],["A",n,n,0,1,1,l,u+n],["A",n,n,0,1,1,l,u-n],["Z"]]}else{var c=Jl(e,n,r),f=Jl(e,n,o),h=Math.abs(o-r)>Math.PI?1:0,d=r>o?0:1;s=[["M",c.x,c.y],["A",n,n,0,h,d,f.x,f.y]]}return s},i}(zd),Qu="g2-crosshair",ed=Qu+"-line",nd=Qu+"-text",xu;const K_=(xu={},xu[""+Qu]={position:"relative"},xu[""+ed]={position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.25)"},xu[""+nd]={position:"absolute",color:Un.textColor,fontFamily:Un.fontFamily},xu);var Z_=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"crosshair",type:"html",locationType:"region",start:{x:0,y:0},end:{x:0,y:0},capture:!1,text:null,containerTpl:'
',crosshairTpl:'
',textTpl:'{content}',domStyles:null,containerClassName:Qu,defaultStyles:K_,defaultCfg:{text:{position:"start",content:null,align:"center",offset:10}}})},i.prototype.render=function(){this.resetText(),this.resetPosition()},i.prototype.initCrossHair=function(){var t=this.getContainer(),e=this.get("crosshairTpl"),n=rl(e);t.appendChild(n),this.applyStyle(ed,n),this.set("crosshairEl",n)},i.prototype.getTextPoint=function(){var t=this.getLocation(),e=t.start,n=t.end,r=this.get("text"),o=r.position,s=r.offset;return Ym(e,n,o,s)},i.prototype.resetText=function(){var t=this.get("text"),e=this.get("textEl");if(t){var n=t.content;if(!e){var r=this.getContainer(),o=vp(this.get("textTpl"),t);e=rl(o),r.appendChild(e),this.applyStyle(nd,e),this.set("textEl",e)}e.innerHTML=n}else e&&e.remove()},i.prototype.isVertical=function(t,e){return t.x===e.x},i.prototype.resetPosition=function(){var t=this.get("crosshairEl");t||(this.initCrossHair(),t=this.get("crosshairEl"));var e=this.get("start"),n=this.get("end"),r=Math.min(e.x,n.x),o=Math.min(e.y,n.y);this.isVertical(e,n)?Ji(t,{width:"1px",height:Ia(Math.abs(n.y-e.y))}):Ji(t,{height:"1px",width:Ia(Math.abs(n.x-e.x))}),Ji(t,{top:Ia(o),left:Ia(r)}),this.alignText()},i.prototype.alignText=function(){var t=this.get("textEl");if(t){var e=this.get("text").align,n=t.clientWidth,r=this.getTextPoint();switch(e){case"center":r.x=r.x-n/2;break;case"right":r.x=r.x-n}Ji(t,{top:Ia(r.y),left:Ia(r.x)})}},i.prototype.updateInner=function(t){eu(t,"text")&&this.resetText(),a.prototype.updateInner.call(this,t)},i}(Nd);const X0=Object.freeze(Object.defineProperty({__proto__:null,Line:Qm,Circle:U_,Base:zd,Html:Z_},Symbol.toStringTag,{value:"Module"}));var Jm=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:Un.lineColor}}}})},i.prototype.getLineType=function(){var t=this.get("line")||this.get("defaultCfg").line;return t.type},i.prototype.renderInner=function(t){this.drawGrid(t)},i.prototype.getAlternatePath=function(t,e){var n=this.getGridPath(t),r=e.slice(0).reverse(),o=this.getGridPath(r,!0),s=this.get("closed");return s?n=n.concat(o):(o[0][0]="L",n=n.concat(o),n.push(["Z"])),n},i.prototype.getPathStyle=function(){return this.get("line").style},i.prototype.drawGrid=function(t){var e=this,n=this.get("line"),r=this.get("items"),o=this.get("alternateColor"),s=null;Nt(r,function(l,u){var c=l.id||u;if(n){var f=e.getPathStyle();f=Rn(f)?f(l,u,r):f;var h=e.getElementId("line-"+c),d=e.getGridPath(l.points);e.addShape(t,{type:"path",name:"grid-line",id:h,attrs:Wr({path:d},f)})}if(o&&u>0){var v=e.getElementId("region-"+c),g=u%2===0;if($n(o))g&&e.drawAlternateRegion(v,t,s.points,l.points,o);else{var p=g?o[1]:o[0];e.drawAlternateRegion(v,t,s.points,l.points,p)}}s=l})},i.prototype.drawAlternateRegion=function(t,e,n,r,o){var s=this.getAlternatePath(n,r);this.addShape(e,{type:"path",id:t,name:"grid-region",attrs:{path:s,fill:o}})},i}(zi);function Q_(a,i,t,e){var n=t-a,r=e-i;return Math.sqrt(n*n+r*r)}var J_=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{type:"circle",center:null,closed:!0})},i.prototype.getGridPath=function(t,e){var n=this.getLineType(),r=this.get("closed"),o=[];if(t.length)if(n==="circle"){var s=this.get("center"),l=t[0],u=Q_(s.x,s.y,l.x,l.y),c=e?0:1;r?(o.push(["M",s.x,s.y-u]),o.push(["A",u,u,0,0,c,s.x,s.y+u]),o.push(["A",u,u,0,0,c,s.x,s.y-u]),o.push(["Z"])):Nt(t,function(f,h){h===0?o.push(["M",f.x,f.y]):o.push(["A",u,u,0,0,c,f.x,f.y])})}else Nt(t,function(f,h){h===0?o.push(["M",f.x,f.y]):o.push(["L",f.x,f.y])}),r&&o.push(["Z"]);return o},i}(Jm),q_=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{type:"line"})},i.prototype.getGridPath=function(t){var e=[];return Nt(t,function(n,r){r===0?e.push(["M",n.x,n.y]):e.push(["L",n.x,n.y])}),e},i}(Jm),qm=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"legend",layout:"horizontal",locationType:"point",x:0,y:0,offsetX:0,offsetY:0,title:null,background:null})},i.prototype.getLayoutBBox=function(){var t=a.prototype.getLayoutBBox.call(this),e=this.get("maxWidth"),n=this.get("maxHeight"),r=t.width,o=t.height;return e&&(r=Math.min(r,e)),n&&(o=Math.min(o,n)),zc(t.minX,t.minY,r,o)},i.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},i.prototype.resetLocation=function(){var t=this.get("x"),e=this.get("y"),n=this.get("offsetX"),r=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t+n,y:e+r})},i.prototype.applyOffset=function(){this.resetLocation()},i.prototype.getDrawPoint=function(){return this.get("currentPoint")},i.prototype.setDrawPoint=function(t){return this.set("currentPoint",t)},i.prototype.renderInner=function(t){this.resetDraw(),this.get("title")&&this.drawTitle(t),this.drawLegendContent(t),this.get("background")&&this.drawBackground(t)},i.prototype.drawBackground=function(t){var e=this.get("background"),n=t.getBBox(),r=sc(e.padding),o=ct({x:0,y:0,width:n.width+r[1]+r[3],height:n.height+r[0]+r[2]},e.style),s=this.addShape(t,{type:"rect",id:this.getElementId("background"),name:"legend-background",attrs:o});s.toBack()},i.prototype.drawTitle=function(t){var e=this.get("currentPoint"),n=this.get("title"),r=n.spacing,o=n.style,s=n.text,l=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"legend-title",attrs:ct({text:s,x:e.x,y:e.y},o)}),u=l.getBBox();this.set("currentPoint",{x:e.x,y:u.maxY+r})},i.prototype.resetDraw=function(){var t=this.get("background"),e={x:0,y:0};if(t){var n=sc(t.padding);e.x=n[3],e.y=n[0]}this.set("currentPoint",e)},i}(zi),dh={marker:{style:{inactiveFill:"#000",inactiveOpacity:.45,fill:"#000",opacity:1,size:12}},text:{style:{fill:"#ccc",fontSize:12}}},Pf={fill:Un.textColor,fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:Un.fontFamily,fontWeight:"normal",lineHeight:12},vh="navigation-arrow-right",gh="navigation-arrow-left",U0={right:90*Math.PI/180,left:(360-90)*Math.PI/180,up:0,down:180*Math.PI/180},tS=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.currentPageIndex=1,t.totalPagesCnt=1,t.pageWidth=0,t.pageHeight=0,t.startX=0,t.startY=0,t.onNavigationBack=function(){var e=t.getElementByLocalId("item-group");if(t.currentPageIndex>1){t.currentPageIndex-=1,t.updateNavigation();var n=t.getCurrentNavigationMatrix();t.get("animate")?e.animate({matrix:n},100):e.attr({matrix:n})}},t.onNavigationAfter=function(){var e=t.getElementByLocalId("item-group");if(t.currentPageIndexp&&(p=D),d==="horizontal"?(m&&mx&&(x=j.width)}),M=x,x+=h,u&&(x=Math.min(u,x),M=Math.min(u,M)),this.pageWidth=x,this.pageHeight=c-Math.max(p.height,d+_);var F=Math.floor(this.pageHeight/(d+_));Nt(l,function(k,j){j!==0&&j%F===0&&(y+=1,m.x+=x,m.y=o),n.moveElementTo(k,m),k.getParent().setClip({type:"rect",attrs:{x:m.x,y:m.y,width:x,height:d}}),m.y+=d+_}),this.totalPagesCnt=y,this.moveElementTo(g,{x:r+M/2-p.width/2-p.minX,y:c-p.height-p.minY})}this.pageHeight&&this.pageWidth&&e.getParent().setClip({type:"rect",attrs:{x:this.startX,y:this.startY,width:this.pageWidth,height:this.pageHeight}}),s==="horizontal"&&this.get("maxRow")?this.totalPagesCnt=Math.ceil(y/this.get("maxRow")):this.totalPagesCnt=y,this.currentPageIndex>this.totalPagesCnt&&(this.currentPageIndex=1),this.updateNavigation(g),e.attr("matrix",this.getCurrentNavigationMatrix())},i.prototype.drawNavigation=function(t,e,n,r){var o={x:0,y:0},s=this.addGroup(t,{id:this.getElementId("navigation-group"),name:"legend-navigation"}),l=he(r.marker,"style",{}),u=l.size,c=u===void 0?12:u,f=Ti(l,["size"]),h=this.drawArrow(s,o,gh,e==="horizontal"?"up":"left",c,f);h.on("click",this.onNavigationBack);var d=h.getBBox();o.x+=d.width+2;var v=this.addShape(s,{type:"text",id:this.getElementId("navigation-text"),name:"navigation-text",attrs:ct({x:o.x,y:o.y+c/2,text:n,textBaseline:"middle"},he(r.text,"style"))}),g=v.getBBox();o.x+=g.width+2;var p=this.drawArrow(s,o,vh,e==="horizontal"?"down":"right",c,f);return p.on("click",this.onNavigationAfter),s},i.prototype.updateNavigation=function(t){var e=_n({},dh,this.get("pageNavigator")),n=e.marker.style,r=n.fill,o=n.opacity,s=n.inactiveFill,l=n.inactiveOpacity,u=this.currentPageIndex+"/"+this.totalPagesCnt,c=t?t.getChildren()[1]:this.getElementByLocalId("navigation-text"),f=t?t.findById(this.getElementId(gh)):this.getElementByLocalId(gh),h=t?t.findById(this.getElementId(vh)):this.getElementByLocalId(vh);c.attr("text",u),f.attr("opacity",this.currentPageIndex===1?l:o),f.attr("fill",this.currentPageIndex===1?s:r),f.attr("cursor",this.currentPageIndex===1?"not-allowed":"pointer"),h.attr("opacity",this.currentPageIndex===this.totalPagesCnt?l:o),h.attr("fill",this.currentPageIndex===this.totalPagesCnt?s:r),h.attr("cursor",this.currentPageIndex===this.totalPagesCnt?"not-allowed":"pointer");var d=f.getBBox().maxX+2;c.attr("x",d),d+=c.getBBox().width+2,this.updateArrowPath(h,{x:d,y:0})},i.prototype.drawArrow=function(t,e,n,r,o,s){var l=e.x,u=e.y,c=this.addShape(t,{type:"path",id:this.getElementId(n),name:n,attrs:ct({size:o,direction:r,path:[["M",l+o/2,u],["L",l,u+o],["L",l+o,u+o],["Z"]],cursor:"pointer"},s)});return c.attr("matrix",jl({x:l+o/2,y:u+o/2},U0[r])),c},i.prototype.updateArrowPath=function(t,e){var n=e.x,r=e.y,o=t.attr(),s=o.size,l=o.direction,u=jl({x:n+s/2,y:r+s/2},U0[l]);t.attr("path",[["M",n+s/2,r],["L",n,r+s],["L",n+s,r+s],["Z"]]),t.attr("matrix",u)},i.prototype.getCurrentNavigationMatrix=function(){var t=this,e=t.currentPageIndex,n=t.pageWidth,r=t.pageHeight,o=this.get("layout"),s=o==="horizontal"?{x:0,y:r*(1-e)}:{x:n*(1-e),y:0};return Rd(s)},i.prototype.applyItemStates=function(t,e){var n=this.getItemStates(t),r=n.length>0;if(r){var o=e.getChildren(),s=this.get("itemStates");Nt(o,function(l){var u=l.get("name"),c=u.split("-")[2],f=Cu(t,c,s);f&&(l.attr(f),c==="marker"&&!(l.get("isStroke")&&l.get("isFill"))&&(l.get("isStroke")&&l.attr("fill",null),l.get("isFill")&&l.attr("stroke",null)))})}},i.prototype.getLimitItemWidth=function(){var t=this.get("itemWidth"),e=this.get("maxItemWidth");return e?t&&(e=t<=e?t:e):t&&(e=t),e},i}(qm),eS=1.4,K0=.4,nS=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{type:"continue",min:0,max:100,value:null,colors:[],track:{},rail:{},label:{},handler:{},slidable:!0,tip:null,step:null,maxWidth:null,maxHeight:null,defaultCfg:{label:{align:"rail",spacing:5,formatter:null,style:{fontSize:12,fill:Un.textColor,textBaseline:"middle",fontFamily:Un.fontFamily}},handler:{size:10,style:{fill:"#fff",stroke:"#333"}},track:{},rail:{type:"color",size:20,defaultLength:100,style:{fill:"#DCDEE2"}},title:{spacing:5,style:{fill:Un.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}}}})},i.prototype.isSlider=function(){return!0},i.prototype.getValue=function(){return this.getCurrentValue()},i.prototype.getRange=function(){return{min:this.get("min"),max:this.get("max")}},i.prototype.setRange=function(t,e){this.update({min:t,max:e})},i.prototype.setValue=function(t){var e=this.getValue();this.set("value",t);var n=this.get("group");this.resetTrackClip(),this.get("slidable")&&this.resetHandlers(n),this.delegateEmit("valuechanged",{originValue:e,value:t})},i.prototype.initEvent=function(){var t=this.get("group");this.bindSliderEvent(t),this.bindRailEvent(t),this.bindTrackEvent(t)},i.prototype.drawLegendContent=function(t){this.drawRail(t),this.drawLabels(t),this.fixedElements(t),this.resetTrack(t),this.resetTrackClip(t),this.get("slidable")&&this.resetHandlers(t)},i.prototype.bindSliderEvent=function(t){this.bindHandlersEvent(t)},i.prototype.bindHandlersEvent=function(t){var e=this;t.on("legend-handler-min:drag",function(n){var r=e.getValueByCanvasPoint(n.x,n.y),o=e.getCurrentValue(),s=o[1];sr&&(s=r),e.setValue([s,r])})},i.prototype.bindRailEvent=function(t){},i.prototype.bindTrackEvent=function(t){var e=this,n=null;t.on("legend-track:dragstart",function(r){n={x:r.x,y:r.y}}),t.on("legend-track:drag",function(r){if(!!n){var o=e.getValueByCanvasPoint(n.x,n.y),s=e.getValueByCanvasPoint(r.x,r.y),l=e.getCurrentValue(),u=l[1]-l[0],c=e.getRange(),f=s-o;f<0?l[0]+f>c.min?e.setValue([l[0]+f,l[1]+f]):e.setValue([c.min,c.min+u]):f>0&&(f>0&&l[1]+fo&&(f=o),f0&&this.changeRailLength(r,s,n[s]-d)}},i.prototype.changeRailLength=function(t,e,n){var r=t.getBBox(),o;e==="height"?o=this.getRailPath(r.x,r.y,r.width,n):o=this.getRailPath(r.x,r.y,n,r.height),t.attr("path",o)},i.prototype.changeRailPosition=function(t,e,n){var r=t.getBBox(),o=this.getRailPath(e,n,r.width,r.height);t.attr("path",o)},i.prototype.fixedHorizontal=function(t,e,n,r){var o=this.get("label"),s=o.align,l=o.spacing,u=n.getBBox(),c=t.getBBox(),f=e.getBBox(),h=u.height;this.fitRailLength(c,f,u,n),u=n.getBBox(),s==="rail"?(t.attr({x:r.x,y:r.y+h/2}),this.changeRailPosition(n,r.x+c.width+l,r.y),e.attr({x:r.x+c.width+u.width+l*2,y:r.y+h/2})):s==="top"?(t.attr({x:r.x,y:r.y}),e.attr({x:r.x+u.width,y:r.y}),this.changeRailPosition(n,r.x,r.y+c.height+l)):(this.changeRailPosition(n,r.x,r.y),t.attr({x:r.x,y:r.y+u.height+l}),e.attr({x:r.x+u.width,y:r.y+u.height+l}))},i.prototype.fixedVertail=function(t,e,n,r){var o=this.get("label"),s=o.align,l=o.spacing,u=n.getBBox(),c=t.getBBox(),f=e.getBBox();if(this.fitRailLength(c,f,u,n),u=n.getBBox(),s==="rail")t.attr({x:r.x,y:r.y}),this.changeRailPosition(n,r.x,r.y+c.height+l),e.attr({x:r.x,y:r.y+c.height+u.height+l*2});else if(s==="right")t.attr({x:r.x+u.width+l,y:r.y}),this.changeRailPosition(n,r.x,r.y),e.attr({x:r.x+u.width+l,y:r.y+u.height});else{var h=Math.max(c.width,f.width);t.attr({x:r.x,y:r.y}),this.changeRailPosition(n,r.x+h+l,r.y),e.attr({x:r.x,y:r.y+u.height})}},i}(qm),Is="g2-tooltip",js="g2-tooltip-title",Ju="g2-tooltip-list",Hc="g2-tooltip-list-item",Wc="g2-tooltip-marker",Gc="g2-tooltip-value",ty="g2-tooltip-name",Yd="g2-tooltip-crosshair-x",Hd="g2-tooltip-crosshair-y";const rS=Object.freeze(Object.defineProperty({__proto__:null,CONTAINER_CLASS:Is,TITLE_CLASS:js,LIST_CLASS:Ju,LIST_ITEM_CLASS:Hc,MARKER_CLASS:Wc,VALUE_CLASS:Gc,NAME_CLASS:ty,CROSSHAIR_X:Yd,CROSSHAIR_Y:Hd},Symbol.toStringTag,{value:"Module"}));var qo;const iS=(qo={},qo[""+Is]={position:"absolute",visibility:"visible",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"0px 0px 10px #aeaeae",borderRadius:"3px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:Un.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},qo[""+js]={marginBottom:"4px"},qo[""+Ju]={margin:"0px",listStyleType:"none",padding:"0px"},qo[""+Hc]={listStyleType:"none",marginBottom:"4px"},qo[""+Wc]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},qo[""+Gc]={display:"inline-block",float:"right",marginLeft:"30px"},qo[""+Yd]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},qo[""+Hd]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},qo);function aS(a,i,t,e,n){var r={left:an.x+n.width,top:in.y+n.height};return r}function oS(a,i,t,e,n,r){var o=a,s=i;switch(r){case"left":o=a-e-t,s=i-n/2;break;case"right":o=a+t,s=i-n/2;break;case"top":o=a-e/2,s=i-n-t;break;case"bottom":o=a-e/2,s=i+t;break;default:o=a+t,s=i-n-t;break}return{x:o,y:s}}function sS(a,i,t,e,n,r,o){var s=oS(a,i,t,e,n,r);if(o){var l=aS(s.x,s.y,e,n,o);r==="auto"?(l.right&&(s.x=Math.max(0,a-e-t)),l.top&&(s.y=Math.max(0,i-n-t))):r==="top"||r==="bottom"?(l.left&&(s.x=o.x),l.right&&(s.x=o.x+o.width-e),r==="top"&&l.top&&(s.y=i+t),r==="bottom"&&l.bottom&&(s.y=i-n-t)):(l.top&&(s.y=o.y),l.bottom&&(s.y=o.y+o.height-n),r==="left"&&l.left&&(s.x=a+t),r==="right"&&l.right&&(s.x=a-e-t))}return s}function lS(a,i){var t=!1;return Nt(i,function(e){if(eu(a,e))return t=!0,!1}),t}var uS=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"tooltip",type:"html",x:0,y:0,items:[],customContent:null,containerTpl:'
    ',itemTpl:'
  • {name}: {value}
  • `,xCrosshairTpl:'
    ',yCrosshairTpl:'
    ',title:null,showTitle:!0,region:null,crosshairsRegion:null,containerClassName:Is,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:iS})},i.prototype.render=function(){this.get("customContent")?this.renderCustomContent():(this.resetTitle(),this.renderItems()),this.resetPosition()},i.prototype.clear=function(){this.clearCrosshairs(),this.setTitle(""),this.clearItemDoms()},i.prototype.show=function(){var t=this.getContainer();!t||this.destroyed||(this.set("visible",!0),Ji(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},i.prototype.hide=function(){var t=this.getContainer();!t||this.destroyed||(this.set("visible",!1),Ji(t,{visibility:"hidden"}),this.setCrossHairsVisible(!1))},i.prototype.getLocation=function(){return{x:this.get("x"),y:this.get("y")}},i.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetPosition()},i.prototype.setCrossHairsVisible=function(t){var e=t?"":"none",n=this.get("xCrosshairDom"),r=this.get("yCrosshairDom");n&&Ji(n,{display:e}),r&&Ji(r,{display:e})},i.prototype.initContainer=function(){if(a.prototype.initContainer.call(this),this.get("customContent")){this.get("container")&&this.get("container").remove();var t=this.getHtmlContentNode();this.get("parent").appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()}},i.prototype.updateInner=function(t){this.get("customContent")?this.renderCustomContent():(lS(t,["title","showTitle"])&&this.resetTitle(),eu(t,"items")&&this.renderItems()),a.prototype.updateInner.call(this,t)},i.prototype.initDom=function(){this.cacheDoms()},i.prototype.removeDom=function(){a.prototype.removeDom.call(this),this.clearCrosshairs()},i.prototype.resetPosition=function(){var t=this.get("x"),e=this.get("y"),n=this.get("offset"),r=this.getOffset(),o=r.offsetX,s=r.offsetY,l=this.get("position"),u=this.get("region"),c=this.getContainer(),f=this.getBBox(),h=f.width,d=f.height,v;u&&(v=Ku(u));var g=sS(t,e,n,h,d,l,v);Ji(c,{left:Ia(g.x+o),top:Ia(g.y+s)}),this.resetCrosshairs()},i.prototype.renderCustomContent=function(){var t=this.getHtmlContentNode(),e=this.get("parent"),n=this.get("container");n&&n.parentNode===e?e.replaceChild(t,n):e.appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()},i.prototype.getHtmlContentNode=function(){var t,e=this.get("customContent");if(e){var n=e(this.get("title"),this.get("items"));pp(n)?t=n:t=rl(n)}return t},i.prototype.cacheDoms=function(){var t=this.getContainer(),e=t.getElementsByClassName(js)[0],n=t.getElementsByClassName(Ju)[0];this.set("titleDom",e),this.set("listDom",n)},i.prototype.resetTitle=function(){var t=this.get("title"),e=this.get("showTitle");e&&t?this.setTitle(t):this.setTitle("")},i.prototype.setTitle=function(t){var e=this.get("titleDom");e&&(e.innerText=t)},i.prototype.resetCrosshairs=function(){var t=this.get("crosshairsRegion"),e=this.get("crosshairs");if(!t||!e)this.clearCrosshairs();else{var n=Ku(t),r=this.get("xCrosshairDom"),o=this.get("yCrosshairDom");e==="x"?(this.resetCrosshair("x",n),o&&(o.remove(),this.set("yCrosshairDom",null))):e==="y"?(this.resetCrosshair("y",n),r&&(r.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",n),this.resetCrosshair("y",n)),this.setCrossHairsVisible(this.get("visible"))}},i.prototype.resetCrosshair=function(t,e){var n=this.checkCrosshair(t),r=this.get(t);t==="x"?Ji(n,{left:Ia(r),top:Ia(e.y),height:Ia(e.height)}):Ji(n,{top:Ia(r),left:Ia(e.x),width:Ia(e.width)})},i.prototype.checkCrosshair=function(t){var e=t+"CrosshairDom",n=t+"CrosshairTpl",r="CROSSHAIR_"+t.toUpperCase(),o=rS[r],s=this.get(e),l=this.get("parent");return s||(s=rl(this.get(n)),this.applyStyle(o,s),l.appendChild(s),this.set(e,s)),s},i.prototype.renderItems=function(){this.clearItemDoms();var t=this.get("items"),e=this.get("itemTpl"),n=this.get("listDom");n&&(Nt(t,function(r){var o=Uu.toCSSGradient(r.color),s=ct(ct({},r),{color:o}),l=vp(e,s),u=rl(l);n.appendChild(u)}),this.applyChildrenStyles(n,this.get("domStyles")))},i.prototype.clearItemDoms=function(){this.get("listDom")&&Fd(this.get("listDom"))},i.prototype.clearCrosshairs=function(){var t=this.get("xCrosshairDom"),e=this.get("yCrosshairDom");t&&t.remove(),e&&e.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},i}(Nd),fS={opacity:0},cS={stroke:"#C5C5C5",strokeOpacity:.85},hS={fill:"#CACED4",opacity:.85};function dS(a){return fa(a,function(i,t){var e=t===0?"M":"L",n=i[0],r=i[1];return[e,n,r]})}function ey(a){return dS(a)}function vS(a){if(a.length<=2)return ey(a);var i=[];Nt(a,function(o){ui(o,i.slice(i.length-2))||i.push(o[0],o[1])});var t=SM(i,!1),e=ro(a),n=e[0],r=e[1];return t.unshift(["M",n,r]),t}function gS(a,i,t,e){e===void 0&&(e=!0);var n=new Nc({values:a}),r=new Rc({values:fa(a,function(s,l){return l})}),o=fa(a,function(s,l){return[r.scale(l)*i,t-n.scale(s)*t]});return e?vS(o):ey(o)}function pS(a,i){var t=new Nc({values:a}),e=t.max<0?t.max:Math.max(0,t.min);return i-t.scale(e)*i}function mS(a,i,t,e){var n=ku(a),r=pS(e,t);return n.push(["L",i,r]),n.push(["L",0,r]),n.push(["Z"]),n}var yS=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"trend",x:0,y:0,width:200,height:16,smooth:!0,isArea:!1,data:[],backgroundStyle:fS,lineStyle:cS,areaStyle:hS})},i.prototype.renderInner=function(t){var e=this.cfg,n=e.width,r=e.height,o=e.data,s=e.smooth,l=e.isArea,u=e.backgroundStyle,c=e.lineStyle,f=e.areaStyle;this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:ct({x:0,y:0,width:n,height:r},u)});var h=gS(o,n,r,s);if(this.addShape(t,{id:this.getElementId("line"),type:"path",attrs:ct({path:h},c)}),l){var d=mS(h,n,r,o);this.addShape(t,{id:this.getElementId("area"),type:"path",attrs:ct({path:d},f)})}},i.prototype.applyOffset=function(){var t=this.cfg,e=t.x,n=t.y;this.moveElementTo(this.get("group"),{x:e,y:n})},i}(zi),ny={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},Z0=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"handler",x:0,y:0,width:10,height:24,style:ny})},i.prototype.renderInner=function(t){var e=this.cfg,n=e.width,r=e.height,o=e.style,s=o.fill,l=o.stroke,u=o.radius,c=o.opacity,f=o.cursor;this.addShape(t,{type:"rect",id:this.getElementId("background"),attrs:{x:0,y:0,width:n,height:r,fill:s,stroke:l,radius:u,opacity:c,cursor:f}});var h=1/3*n,d=2/3*n,v=1/4*r,g=3/4*r;this.addShape(t,{id:this.getElementId("line-left"),type:"line",attrs:{x1:h,y1:v,x2:h,y2:g,stroke:l,cursor:f}}),this.addShape(t,{id:this.getElementId("line-right"),type:"line",attrs:{x1:d,y1:v,x2:d,y2:g,stroke:l,cursor:f}})},i.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},i.prototype.initEvent=function(){this.bindEvents()},i.prototype.bindEvents=function(){var t=this;this.get("group").on("mouseenter",function(){var e=t.get("style").highLightFill;t.getElementByLocalId("background").attr("fill",e),t.draw()}),this.get("group").on("mouseleave",function(){var e=t.get("style").fill;t.getElementByLocalId("background").attr("fill",e),t.draw()})},i.prototype.draw=function(){var t=this.get("container").get("canvas");t&&t.draw()},i}(zi),xS={fill:"#416180",opacity:.05},wS={fill:"#5B8FF9",opacity:.15,cursor:"move"},Xf=10,ES={width:Xf,height:24},MS={textBaseline:"middle",fill:"#000",opacity:.45},bS="sliderchange",_S=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.onMouseDown=function(e){return function(n){t.currentTarget=e;var r=n.originalEvent;r.stopPropagation(),r.preventDefault(),t.prevX=he(r,"touches.0.pageX",r.pageX),t.prevY=he(r,"touches.0.pageY",r.pageY);var o=t.getContainerDOM();o.addEventListener("mousemove",t.onMouseMove),o.addEventListener("mouseup",t.onMouseUp),o.addEventListener("mouseleave",t.onMouseUp),o.addEventListener("touchmove",t.onMouseMove),o.addEventListener("touchend",t.onMouseUp),o.addEventListener("touchcancel",t.onMouseUp)}},t.onMouseMove=function(e){var n=t.cfg.width,r=[t.get("start"),t.get("end")];e.stopPropagation(),e.preventDefault();var o=he(e,"touches.0.pageX",e.pageX),s=he(e,"touches.0.pageY",e.pageY),l=o-t.prevX,u=t.adjustOffsetRange(l/n);t.updateStartEnd(u),t.updateUI(t.getElementByLocalId("foreground"),t.getElementByLocalId("minText"),t.getElementByLocalId("maxText")),t.prevX=o,t.prevY=s,t.draw(),t.emit(bS,[t.get("start"),t.get("end")].sort()),t.delegateEmit("valuechanged",{originValue:r,value:[t.get("start"),t.get("end")]})},t.onMouseUp=function(){t.currentTarget&&(t.currentTarget=void 0);var e=t.getContainerDOM();e&&(e.removeEventListener("mousemove",t.onMouseMove),e.removeEventListener("mouseup",t.onMouseUp),e.removeEventListener("mouseleave",t.onMouseUp),e.removeEventListener("touchmove",t.onMouseMove),e.removeEventListener("touchend",t.onMouseUp),e.removeEventListener("touchcancel",t.onMouseUp))},t}return i.prototype.setRange=function(t,e){this.set("minLimit",t),this.set("maxLimit",e);var n=this.get("start"),r=this.get("end"),o=Yr(n,t,e),s=Yr(r,t,e);!this.get("isInit")&&(n!==o||r!==s)&&this.setValue([o,s])},i.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},i.prototype.setValue=function(t){var e=this.getRange();if(ln(t)&&t.length===2){var n=[this.get("start"),this.get("end")];this.update({start:Yr(t[0],e.min,e.max),end:Yr(t[1],e.min,e.max)}),this.get("updateAutoRender")||this.render(),this.delegateEmit("valuechanged",{originValue:n,value:t})}},i.prototype.getValue=function(){return[this.get("start"),this.get("end")]},i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"slider",x:0,y:0,width:100,height:16,backgroundStyle:{},foregroundStyle:{},handlerStyle:{},textStyle:{},defaultCfg:{backgroundStyle:xS,foregroundStyle:wS,handlerStyle:ES,textStyle:MS}})},i.prototype.update=function(t){var e=t.start,n=t.end,r=ct({},t);qe(e)||(r.start=Yr(e,0,1)),qe(n)||(r.end=Yr(n,0,1)),a.prototype.update.call(this,r),this.minHandler=this.getChildComponentById(this.getElementId("minHandler")),this.maxHandler=this.getChildComponentById(this.getElementId("maxHandler")),this.trend=this.getChildComponentById(this.getElementId("trend"))},i.prototype.init=function(){this.set("start",Yr(this.get("start"),0,1)),this.set("end",Yr(this.get("end"),0,1)),a.prototype.init.call(this)},i.prototype.render=function(){a.prototype.render.call(this),this.updateUI(this.getElementByLocalId("foreground"),this.getElementByLocalId("minText"),this.getElementByLocalId("maxText"))},i.prototype.renderInner=function(t){var e=this.cfg;e.start,e.end;var n=e.width,r=e.height,o=e.trendCfg,s=o===void 0?{}:o,l=e.minText,u=e.maxText,c=e.backgroundStyle,f=c===void 0?{}:c,h=e.foregroundStyle,d=h===void 0?{}:h,v=e.textStyle,g=v===void 0?{}:v,p=_n({},ny,this.cfg.handlerStyle);Fa(he(s,"data"))&&(this.trend=this.addComponent(t,ct({component:yS,id:this.getElementId("trend"),x:0,y:0,width:n,height:r},s))),this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:ct({x:0,y:0,width:n,height:r},f)}),this.addShape(t,{id:this.getElementId("minText"),type:"text",attrs:ct({y:r/2,textAlign:"right",text:l,silent:!1},g)}),this.addShape(t,{id:this.getElementId("maxText"),type:"text",attrs:ct({y:r/2,textAlign:"left",text:u,silent:!1},g)}),this.addShape(t,{id:this.getElementId("foreground"),name:"foreground",type:"rect",attrs:ct({y:0,height:r},d)});var m=he(p,"width",Xf),y=he(p,"height",24);this.minHandler=this.addComponent(t,{component:Z0,id:this.getElementId("minHandler"),name:"handler-min",x:0,y:(r-y)/2,width:m,height:y,cursor:"ew-resize",style:p}),this.maxHandler=this.addComponent(t,{component:Z0,id:this.getElementId("maxHandler"),name:"handler-max",x:0,y:(r-y)/2,width:m,height:y,cursor:"ew-resize",style:p})},i.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},i.prototype.initEvent=function(){this.bindEvents()},i.prototype.updateUI=function(t,e,n){var r=this.cfg,o=r.start,s=r.end,l=r.width,u=r.minText,c=r.maxText,f=r.handlerStyle,h=r.height,d=o*l,v=s*l;this.trend&&(this.trend.update({width:l,height:h}),this.get("updateAutoRender")||this.trend.render()),t.attr("x",d),t.attr("width",v-d);var g=he(f,"width",Xf);e.attr("text",u),n.attr("text",c);var p=this._dodgeText([d,v],e,n),m=p[0],y=p[1];this.minHandler&&(this.minHandler.update({x:d-g/2}),this.get("updateAutoRender")||this.minHandler.render()),Nt(m,function(w,x){return e.attr(x,w)}),this.maxHandler&&(this.maxHandler.update({x:v-g/2}),this.get("updateAutoRender")||this.maxHandler.render()),Nt(y,function(w,x){return n.attr(x,w)})},i.prototype.bindEvents=function(){var t=this.get("group");t.on("handler-min:mousedown",this.onMouseDown("minHandler")),t.on("handler-min:touchstart",this.onMouseDown("minHandler")),t.on("handler-max:mousedown",this.onMouseDown("maxHandler")),t.on("handler-max:touchstart",this.onMouseDown("maxHandler"));var e=t.findById(this.getElementId("foreground"));e.on("mousedown",this.onMouseDown("foreground")),e.on("touchstart",this.onMouseDown("foreground"))},i.prototype.adjustOffsetRange=function(t){var e=this.cfg,n=e.start,r=e.end;switch(this.currentTarget){case"minHandler":{var o=0-n,s=1-n;return Math.min(s,Math.max(o,t))}case"maxHandler":{var o=0-r,s=1-r;return Math.min(s,Math.max(o,t))}case"foreground":{var o=0-n,s=1-r;return Math.min(s,Math.max(o,t))}}},i.prototype.updateStartEnd=function(t){var e=this.cfg,n=e.start,r=e.end;switch(this.currentTarget){case"minHandler":n+=t;break;case"maxHandler":r+=t;break;case"foreground":n+=t,r+=t;break}this.set("start",n),this.set("end",r)},i.prototype._dodgeText=function(t,e,n){var r,o,s=this.cfg,l=s.handlerStyle,u=s.width,c=2,f=he(l,"width",Xf),h=t[0],d=t[1],v=!1;h>d&&(r=[d,h],h=r[0],d=r[1],o=[n,e],e=o[0],n=o[1],v=!0);var g=e.getBBox(),p=n.getBBox(),m=g.width>h-c?{x:h+f/2+c,textAlign:"left"}:{x:h-f/2-c,textAlign:"right"},y=p.width>u-d-c?{x:d-f/2-c,textAlign:"right"}:{x:d+f/2+c,textAlign:"left"};return v?[y,m]:[m,y]},i.prototype.draw=function(){var t=this.get("container"),e=t&&t.get("canvas");e&&e.draw()},i.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},i}(zi),SS={trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},ph={default:SS,hover:{thumbColor:"rgba(0,0,0,0.2)"}},CS=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.clearEvents=Js,t.onStartEvent=function(e){return function(n){t.isMobile=e,n.originalEvent.preventDefault();var r=e?he(n.originalEvent,"touches.0.clientX"):n.clientX,o=e?he(n.originalEvent,"touches.0.clientY"):n.clientY;t.startPos=t.cfg.isHorizontal?r:o,t.bindLaterEvent()}},t.bindLaterEvent=function(){var e=t.getContainerDOM(),n=[];t.isMobile?n=[Fl(e,"touchmove",t.onMouseMove),Fl(e,"touchend",t.onMouseUp),Fl(e,"touchcancel",t.onMouseUp)]:n=[Fl(e,"mousemove",t.onMouseMove),Fl(e,"mouseup",t.onMouseUp),Fl(e,"mouseleave",t.onMouseUp)],t.clearEvents=function(){n.forEach(function(r){r.remove()})}},t.onMouseMove=function(e){var n=t.cfg,r=n.isHorizontal,o=n.thumbOffset;e.preventDefault();var s=t.isMobile?he(e,"touches.0.clientX"):e.clientX,l=t.isMobile?he(e,"touches.0.clientY"):e.clientY,u=r?s:l,c=u-t.startPos;t.startPos=u,t.updateThumbOffset(o+c)},t.onMouseUp=function(e){e.preventDefault(),t.clearEvents()},t.onTrackClick=function(e){var n=t.cfg,r=n.isHorizontal,o=n.x,s=n.y,l=n.thumbLen,u=t.getContainerDOM(),c=u.getBoundingClientRect(),f=e.clientX,h=e.clientY,d=r?f-c.left-o-l/2:h-c.top-s-l/2,v=t.validateRange(d);t.updateThumbOffset(v)},t.onThumbMouseOver=function(){var e=t.cfg.theme.hover.thumbColor;t.getElementByLocalId("thumb").attr("stroke",e),t.draw()},t.onThumbMouseOut=function(){var e=t.cfg.theme.default.thumbColor;t.getElementByLocalId("thumb").attr("stroke",e),t.draw()},t}return i.prototype.setRange=function(t,e){this.set("minLimit",t),this.set("maxLimit",e);var n=this.getValue(),r=Yr(n,t,e);n!==r&&!this.get("isInit")&&this.setValue(r)},i.prototype.getRange=function(){var t=this.get("minLimit")||0,e=this.get("maxLimit")||1;return{min:t,max:e}},i.prototype.setValue=function(t){var e=this.getRange(),n=this.getValue();this.update({thumbOffset:(this.get("trackLen")-this.get("thumbLen"))*Yr(t,e.min,e.max)}),this.delegateEmit("valuechange",{originalValue:n,value:this.getValue()})},i.prototype.getValue=function(){return Yr(this.get("thumbOffset")/(this.get("trackLen")-this.get("thumbLen")),0,1)},i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return ct(ct({},t),{name:"scrollbar",isHorizontal:!0,minThumbLen:20,thumbOffset:0,theme:ph})},i.prototype.renderInner=function(t){this.renderTrackShape(t),this.renderThumbShape(t)},i.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},i.prototype.initEvent=function(){this.bindEvents()},i.prototype.renderTrackShape=function(t){var e=this.cfg,n=e.trackLen,r=e.theme,o=r===void 0?{default:{}}:r,s=_n({},ph,o).default,l=s.lineCap,u=s.trackColor,c=s.size,f=he(this.cfg,"size",c),h=this.get("isHorizontal")?{x1:0+f/2,y1:f/2,x2:n-f/2,y2:f/2,lineWidth:f,stroke:u,lineCap:l}:{x1:f/2,y1:0+f/2,x2:f/2,y2:n-f/2,lineWidth:f,stroke:u,lineCap:l};return this.addShape(t,{id:this.getElementId("track"),name:"track",type:"line",attrs:h})},i.prototype.renderThumbShape=function(t){var e=this.cfg,n=e.thumbOffset,r=e.thumbLen,o=e.theme,s=_n({},ph,o).default,l=s.size,u=s.lineCap,c=s.thumbColor,f=he(this.cfg,"size",l),h=this.get("isHorizontal")?{x1:n+f/2,y1:f/2,x2:n+r-f/2,y2:f/2,lineWidth:f,stroke:c,lineCap:u,cursor:"default"}:{x1:f/2,y1:n+f/2,x2:f/2,y2:n+r-f/2,lineWidth:f,stroke:c,lineCap:u,cursor:"default"};return this.addShape(t,{id:this.getElementId("thumb"),name:"thumb",type:"line",attrs:h})},i.prototype.bindEvents=function(){var t=this.get("group");t.on("mousedown",this.onStartEvent(!1)),t.on("mouseup",this.onMouseUp),t.on("touchstart",this.onStartEvent(!0)),t.on("touchend",this.onMouseUp);var e=t.findById(this.getElementId("track"));e.on("click",this.onTrackClick);var n=t.findById(this.getElementId("thumb"));n.on("mouseover",this.onThumbMouseOver),n.on("mouseout",this.onThumbMouseOut)},i.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},i.prototype.validateRange=function(t){var e=this.cfg,n=e.thumbLen,r=e.trackLen,o=t;return t+n>r?o=r-n:t+nr.x?r.x:i,t=tr.y?r.y:e,n=n=e&&a<=n}function DS(a,i,t){if($n(a))return a.padEnd(i,t);if(ln(a)){var e=a.length;if(e=this.minX&&i.maxX<=this.maxX&&i.minY>=this.minY&&i.maxY<=this.maxY},a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height)},a.prototype.add=function(){for(var i=[],t=0;ti.minX&&this.minYi.minY},a.prototype.size=function(){return this.width*this.height},a.prototype.isPointIn=function(i){return i.x>=this.minX&&i.x<=this.maxX&&i.y>=this.minY&&i.y<=this.maxY},a}();function BS(a){return[[a.minX,a.minY],[a.maxX,a.minY],[a.maxX,a.maxY],[a.minX,a.maxY]]}function hf(a){if(a.isPolar&&!a.isTransposed)return(a.endAngle-a.startAngle)*a.getRadius();var i=a.convert({x:0,y:0}),t=a.convert({x:1,y:0});return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function RS(a){if(a.isPolar){var i=a.startAngle,t=a.endAngle;return t-i===Math.PI*2}return!1}function $c(a,i){var t=a.getCenter();return Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2))}function FS(a,i){var t=!1;if(a)if(a.type==="theta"){var e=a.start,n=a.end;t=Ul(i.x,e.x,n.x)&&Ul(i.y,e.y,n.y)}else{var r=a.invert(i);t=Ul(r.x,0,1)&&Ul(r.y,0,1)}return t}function iu(a,i){var t=a.getCenter();return Math.atan2(i.y-t.y,i.x-t.x)}function Wd(a,i){i===void 0&&(i=0);var t=a.start,e=a.end,n=a.getWidth(),r=a.getHeight();if(a.isPolar){var o=a.startAngle,s=a.endAngle,l=a.getCenter(),u=a.getRadius();return{type:"path",startState:{path:Tl(l.x,l.y,u+i,o,o)},endState:function(f){var h=(s-o)*f+o,d=Tl(l.x,l.y,u+i,o,h);return{path:d}},attrs:{path:Tl(l.x,l.y,u+i,o,s)}}}var c;return a.isTransposed?c={height:r+i*2}:c={width:n+i*2},{type:"rect",startState:{x:t.x-i,y:e.y-i,width:a.isTransposed?n+i*2:0,height:a.isTransposed?0:r+i*2},endState:c,attrs:{x:t.x-i,y:e.y-i,width:n+i*2,height:r+i*2}}}function NS(a,i){i===void 0&&(i=0);var t=a.start,e=a.end,n=a.getWidth(),r=a.getHeight(),o=Math.min(t.x,e.x),s=Math.min(t.y,e.y);return ca.fromRange(o-i,s-i,o+n+i,s+r+i)}var kS=/^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]+)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/;function zS(a){var i="linear";return kS.test(a)?i="timeCat":$n(a)&&(i="cat"),i}function ay(a,i,t,e){return i===void 0&&(i={}),i.type?i.type:a.type!=="identity"&&Vl.includes(t)&&["interval"].includes(e)||a.isCategory?"cat":a.type}function YS(a,i,t){var e=i||[];if(or(a)||qe(xx(e,a))&&os(t)){var n=Qh("identity");return new n({field:a.toString(),values:[a]})}var r=Os(e,a),o=he(t,"type",zS(r[0])),s=Qh(o);return new s(ct({field:a,values:r},t))}function HS(a,i){if(a.type!=="identity"&&i.type!=="identity"){var t={};for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);a.change(t)}}function qu(a){return a.alias||a.field}function oy(a,i,t){var e=a.values,n=e.length,r;if(n===1)r=[.5,1];else{var o=1,s=0;RS(i)?i.isTransposed?(o=he(t,"widthRatio.multiplePie",1/1.3),s=1/n*o,r=[s/2,1-s/2]):r=[0,1-1/n]:(s=1/n/2,r=[s,1-s])}return r}function WS(a){var i=a.values.filter(function(t){return!qe(t)&&!isNaN(t)});return Math.max.apply(Math,Er(Er([],Pn(i),!1),[qe(a.max)?-1/0:a.max],!1))}function GS(a){var i,t;switch(a){case hn.TOP:i={x:0,y:1},t={x:1,y:1};break;case hn.RIGHT:i={x:1,y:0},t={x:1,y:1};break;case hn.BOTTOM:i={x:0,y:0},t={x:1,y:0};break;case hn.LEFT:i={x:0,y:0},t={x:0,y:1};break;default:i=t={x:0,y:0}}return{start:i,end:t}}function VS(a){var i,t;return a.isTransposed?(i={x:0,y:0},t={x:1,y:0}):(i={x:0,y:0},t={x:0,y:1}),{start:i,end:t}}function Tf(a,i){var t={start:{x:0,y:0},end:{x:0,y:0}};a.isRect?t=GS(i):a.isPolar&&(t=VS(a));var e=t.start,n=t.end;return{start:a.convert(e),end:a.convert(n)}}function sy(a){var i=a.start,t=a.end;return i.x===t.x}function tg(a,i){var t=a.start,e=a.end,n=sy(a);return n?(t.y-e.y)*(i.x-t.x)>0?1:-1:(e.x-t.x)*(t.y-i.y)>0?-1:1}function Af(a,i){var t=he(a,["components","axis"],{});return _n({},he(t,["common"],{}),_n({},he(t,[i],{})))}function eg(a,i,t){var e=he(a,["components","axis"],{});return _n({},he(e,["common","title"],{}),_n({},he(e,[i,"title"],{})),t)}function mh(a){var i=a.x,t=a.y,e=a.circleCenter,n=t.start>t.end,r=a.isTransposed?a.convert({x:n?0:1,y:0}):a.convert({x:0,y:n?0:1}),o=[r.x-e.x,r.y-e.y],s=[1,0],l=r.y>e.y?Fh(o,s):Fh(o,s)*-1,u=l+(i.end-i.start),c=Math.sqrt(Math.pow(r.x-e.x,2)+Math.pow(r.y-e.y,2));return{center:e,radius:c,startAngle:l,endAngle:u}}function fc(a,i){return zu(a)?a===!1?!1:{}:he(a,[i])}function ng(a,i){return he(a,"position",i)}function rg(a,i){return he(i,["title","text"],qu(a))}var cu=function(){function a(i,t){this.destroyed=!1,this.facets=[],this.view=i,this.cfg=_n({},this.getDefaultCfg(),t)}return a.prototype.init=function(){this.container||(this.container=this.createContainer());var i=this.view.getData();this.facets=this.generateFacets(i)},a.prototype.render=function(){this.renderViews()},a.prototype.update=function(){},a.prototype.clear=function(){this.clearFacetViews()},a.prototype.destroy=function(){this.clear(),this.container&&(this.container.remove(!0),this.container=void 0),this.destroyed=!0,this.view=void 0,this.facets=[]},a.prototype.facetToView=function(i){var t=i.region,e=i.data,n=i.padding,r=n===void 0?this.cfg.padding:n,o=this.view.createView({region:t,padding:r});o.data(e||[]),i.view=o,this.beforeEachView(o,i);var s=this.cfg.eachView;return s&&s(o,i),this.afterEachView(o,i),o},a.prototype.createContainer=function(){var i=this.view.getLayer(Gr.FORE);return i.addGroup()},a.prototype.renderViews=function(){this.createFacetViews()},a.prototype.createFacetViews=function(){var i=this;return this.facets.map(function(t){return i.facetToView(t)})},a.prototype.clearFacetViews=function(){var i=this;Nt(this.facets,function(t){t.view&&(i.view.removeView(t.view),t.view=void 0)})},a.prototype.parseSpacing=function(){var i=this.view.viewBBox,t=i.width,e=i.height,n=this.cfg.spacing;return n.map(function(r,o){return or(r)?r/(o===0?t:e):parseFloat(r)/100})},a.prototype.getFieldValues=function(i,t){var e=[],n={};return Nt(i,function(r){var o=r[t];!qe(o)&&!n[o]&&(e.push(o),n[o]=!0)}),e},a.prototype.getRegion=function(i,t,e,n){var r=Pn(this.parseSpacing(),2),o=r[0],s=r[1],l=(1+o)/(t===0?1:t)-o,u=(1+s)/(i===0?1:i)-s,c={x:(l+o)*e,y:(u+s)*n},f={x:c.x+l,y:c.y+u};return{start:c,end:f}},a.prototype.getDefaultCfg=function(){return{eachView:void 0,showTitle:!0,spacing:[0,0],padding:10,fields:[]}},a.prototype.getDefaultTitleCfg=function(){var i=this.view.getTheme().fontFamily;return{style:{fontSize:14,fill:"#666",fontFamily:i}}},a.prototype.processAxis=function(i,t){var e=i.getOptions(),n=e.coordinate,r=i.geometries,o=he(n,"type","rect");if(o==="rect"&&r.length){qe(e.axes)&&(e.axes={});var s=e.axes,l=Pn(r[0].getXYFields(),2),u=l[0],c=l[1],f=fc(s,u),h=fc(s,c);f!==!1&&(e.axes[u]=this.getXAxisOption(u,s,f,t)),h!==!1&&(e.axes[c]=this.getYAxisOption(c,s,h,t))}},a.prototype.getFacetDataFilter=function(i){return function(t){return _x(i,function(e){var n=e.field,r=e.value;return!qe(r)&&n?t[n]===r:!0})}},a}(),ly={},$S=function(a){return ly[uu(a)]},hu=function(a,i){ly[uu(a)]=i},vi=function(){function a(i,t){this.context=i,this.cfg=t,i.addAction(this)}return a.prototype.applyCfg=function(i){Wr(this,i)},a.prototype.init=function(){this.applyCfg(this.cfg)},a.prototype.destroy=function(){this.context.removeAction(this),this.context=null},a}(),XS=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.execute=function(){this.callback&&this.callback(this.context)},i.prototype.destroy=function(){a.prototype.destroy.call(this),this.callback=null},i}(vi),uy={};function US(a,i){var t=uy[a],e=null;if(t){var n=t.ActionClass,r=t.cfg;e=new n(i,r),e.name=a,e.init()}return e}function Wn(a,i,t){uy[a]={ActionClass:i,cfg:t}}function KS(a,i){var t=new XS(i);return t.callback=a,t.name="callback",t}function ZS(a,i){var t=[];if(a.length){t.push(["M",a[0].x,a[0].y]);for(var e=1,n=a.length;e=o[u]?1:0,h=c>Math.PI?1:0,d=t.convert(s),v=$c(t,d);if(v>=.5)if(c===Math.PI*2){var g={x:(s.x+o.x)/2,y:(s.y+o.y)/2},p=t.convert(g);l.push(["A",v,v,0,h,f,p.x,p.y]),l.push(["A",v,v,0,h,f,d.x,d.y])}else l.push(["A",v,v,0,h,f,d.x,d.y]);return l}function JS(a){Nt(a,function(i,t){var e=i;if(e[0].toLowerCase()==="a"){var n=a[t-1],r=a[t+1];r&&r[0].toLowerCase()==="a"?n&&n[0].toLowerCase()==="l"&&(n[0]="M"):n&&n[0].toLowerCase()==="a"&&r&&r[0].toLowerCase()==="l"&&(r[0]="M")}})}var qS=function(a,i,t,e){var n,r=[],o=!!e,s,l,u,c,f,h,d;if(o){n=Pn(e,2),u=n[0],c=n[1];for(var v=0,g=a.length;v=i||n.height>=i?n:null}function nC(a,i){var t=a.event,e=t.target,n=e.getCanvasBBox();return n.width>=i||n.height>=i?e.attr("path"):null}function sl(a){var i=a.event,t,e=i.target;return e&&(t=e.get("element")),t}function au(a){var i=a.event,t=i.target,e;return t&&(e=t.get("delegateObject")),e}function dy(a){var i=a.event.gEvent;return!(i&&i.fromShape&&i.toShape&&i.fromShape.get("element")===i.toShape.get("element"))}function tf(a){return a&&a.component&&a.component.isList()}function vy(a){return a&&a.component&&a.component.isSlider()}function ef(a){var i=a.event,t=i.target;return t&&t.get("name")==="mask"}function Gd(a,i){var t=a.event.target;if(t.get("type")==="path"){var e=nC(a,i);return e?aC(a.view,e):void 0}var n=hy(a,i);return n?Vd(a.view,n):null}function gy(a,i,t){var e=hy(a,t);if(!e)return null;var n=a.view,r=id(n,i,{x:e.x,y:e.y}),o=id(n,i,{x:e.maxX,y:e.maxY}),s={minX:r.x,minY:r.y,maxX:o.x,maxY:o.y};return Vd(i,s)}function ji(a){var i=a.geometries,t=[];return Nt(i,function(e){var n=e.elements;t=t.concat(n)}),a.views&&a.views.length&&Nt(a.views,function(e){t=t.concat(ji(e))}),t}function rC(a,i,t){var e=ji(a);return e.filter(function(n){return Wo(n,i)===t})}function py(a,i){var t=a.geometries,e=[];return Nt(t,function(n){var r=n.getElementsBy(function(o){return o.hasState(i)});e=e.concat(r)}),e}function Wo(a,i){var t=a.getModel(),e=t.data,n;return ln(e)?n=e[0][i]:n=e[i],n}function iC(a,i){return!(i.minX>a.maxX||i.maxXa.maxY||i.maxY=i.x&&a.y<=i.y&&a.maxY>i.y}function as(a){var i=a.parent,t=null;return i&&(t=i.views.filter(function(e){return e!==a})),t}function sC(a,i){var t=a.getCoordinate();return t.invert(i)}function id(a,i,t){var e=sC(a,t);return i.getCoordinate().convert(e)}function yy(a,i,t,e){var n=!1;return Nt(a,function(r){if(r[t]===i[t]&&r[e]===i[e])return n=!0,!1}),n}function ou(a,i){var t=a.getScaleByField(i);return!t&&a.views&&Nt(a.views,function(e){if(t=ou(e,i),t)return!1}),t}var lC=function(){function a(i){this.actions=[],this.event=null,this.cacheMap={},this.view=i}return a.prototype.cache=function(){for(var i=[],t=0;t=0&&t.splice(e,1)},a.prototype.getCurrentPoint=function(){var i=this.event;if(i)if(i.target instanceof HTMLElement){var t=this.view.getCanvas(),e=t.getPointByClient(i.clientX,i.clientY);return e}else return{x:i.x,y:i.y};return null},a.prototype.getCurrentShape=function(){return he(this.event,["gEvent","shape"])},a.prototype.isInPlot=function(){var i=this.getCurrentPoint();return i?this.view.isPointInPlot(i):!1},a.prototype.isInShape=function(i){var t=this.getCurrentShape();return t?t.get("name")===i:!1},a.prototype.isInComponent=function(i){var t=my(this.view),e=this.getCurrentPoint();return e?!!t.find(function(n){var r=n.getBBox();return i?n.get("name")===i&&ag(r,e):ag(r,e)}):!1},a.prototype.destroy=function(){Nt(this.actions.slice(),function(i){i.destroy()}),this.view=null,this.event=null,this.actions=null,this.cacheMap=null},a}(),uC=function(){function a(i,t){this.view=i,this.cfg=t}return a.prototype.init=function(){this.initEvents()},a.prototype.initEvents=function(){},a.prototype.clearEvents=function(){},a.prototype.destroy=function(){this.clearEvents()},a}();function og(a,i,t){var e=a.split(":"),n=e[0],r=i.getAction(n)||US(n,i);if(!r)throw new Error("There is no action named ".concat(n));var o=e[1];return{action:r,methodName:o,arg:t}}function sg(a){var i=a.action,t=a.methodName,e=a.arg;if(i[t])i[t](e);else throw new Error("Action(".concat(i.name,") doesn't have a method called ").concat(t))}var eo={START:"start",SHOW_ENABLE:"showEnable",END:"end",ROLLBACK:"rollback",PROCESSING:"processing"},fC=function(a){je(i,a);function i(t,e){var n=a.call(this,t,e)||this;return n.callbackCaches={},n.emitCaches={},n.steps=e,n}return i.prototype.init=function(){this.initContext(),a.prototype.init.call(this)},i.prototype.destroy=function(){a.prototype.destroy.call(this),this.steps=null,this.context&&(this.context.destroy(),this.context=null),this.callbackCaches=null,this.view=null},i.prototype.initEvents=function(){var t=this;Nt(this.steps,function(e,n){Nt(e,function(r){var o=t.getActionCallback(n,r);o&&t.bindEvent(r.trigger,o)})})},i.prototype.clearEvents=function(){var t=this;Nt(this.steps,function(e,n){Nt(e,function(r){var o=t.getActionCallback(n,r);o&&t.offEvent(r.trigger,o)})})},i.prototype.initContext=function(){var t=this.view,e=new lC(t);this.context=e;var n=this.steps;Nt(n,function(r){Nt(r,function(o){if(Rn(o.action))o.actionObject={action:KS(o.action,e),methodName:"execute"};else if($n(o.action))o.actionObject=og(o.action,e,o.arg);else if(ln(o.action)){var s=o.action,l=ln(o.arg)?o.arg:[o.arg];o.actionObject=[],Nt(s,function(u,c){o.actionObject.push(og(u,e,l[c]))})}})})},i.prototype.isAllowStep=function(t){var e=this.currentStepName,n=this.steps;if(e===t||t===eo.SHOW_ENABLE)return!0;if(t===eo.PROCESSING)return e===eo.START;if(t===eo.START)return e!==eo.PROCESSING;if(t===eo.END)return e===eo.PROCESSING||e===eo.START;if(t===eo.ROLLBACK){if(n[eo.END])return e===eo.END;if(e===eo.START)return!0}return!1},i.prototype.isAllowExecute=function(t,e){if(this.isAllowStep(t)){var n=this.getKey(t,e);return e.once&&this.emitCaches[n]?!1:e.isEnable?e.isEnable(this.context):!0}return!1},i.prototype.enterStep=function(t){this.currentStepName=t,this.emitCaches={}},i.prototype.afterExecute=function(t,e){t!==eo.SHOW_ENABLE&&this.currentStepName!==t&&this.enterStep(t);var n=this.getKey(t,e);this.emitCaches[n]=!0},i.prototype.getKey=function(t,e){return t+e.trigger+e.action},i.prototype.getActionCallback=function(t,e){var n=this,r=this.context,o=this.callbackCaches,s=e.actionObject;if(e.action&&s){var l=this.getKey(t,e);if(!o[l]){var u=function(c){r.event=c,n.isAllowExecute(t,e)?(ln(s)?Nt(s,function(f){r.event=c,sg(f)}):(r.event=c,sg(s)),n.afterExecute(t,e),e.callback&&(r.event=c,e.callback(r))):r.event=null};e.debounce?o[l]=mp(u,e.debounce.wait,e.debounce.immediate):e.throttle?o[l]=xd(u,e.throttle.wait,{leading:e.throttle.leading,trailing:e.throttle.trailing}):o[l]=u}return o[l]}return null},i.prototype.bindEvent=function(t,e){var n=t.split(":");n[0]==="window"?window.addEventListener(n[1],e):n[0]==="document"?document.addEventListener(n[1],e):this.view.on(t,e)},i.prototype.offEvent=function(t,e){var n=t.split(":");n[0]==="window"?window.removeEventListener(n[1],e):n[0]==="document"?document.removeEventListener(n[1],e):this.view.off(t,e)},i}(uC),xy={};function cC(a){return xy[uu(a)]}function Cr(a,i){xy[uu(a)]=i}function hC(a,i,t){var e=cC(a);if(!e)return null;if(rs(e)){var n=Wr(no(e),t);return new fC(i,n)}else{var r=e;return new r(i,t)}}function dC(a){return{title:{autoRotate:!0,position:"center",spacing:a.axisTitleSpacing,style:{fill:a.axisTitleTextFillColor,fontSize:a.axisTitleTextFontSize,lineHeight:a.axisTitleTextLineHeight,textBaseline:"middle",fontFamily:a.fontFamily},iconStyle:{fill:a.axisDescriptionIconFillColor}},label:{autoRotate:!1,autoEllipsis:!1,autoHide:{type:"equidistance",cfg:{minGap:6}},offset:a.axisLabelOffset,style:{fill:a.axisLabelFillColor,fontSize:a.axisLabelFontSize,lineHeight:a.axisLabelLineHeight,fontFamily:a.fontFamily}},line:{style:{lineWidth:a.axisLineBorder,stroke:a.axisLineBorderColor}},grid:{line:{type:"line",style:{stroke:a.axisGridBorderColor,lineWidth:a.axisGridBorder,lineDash:a.axisGridLineDash}},alignTick:!0,animate:!0},tickLine:{style:{lineWidth:a.axisTickLineBorder,stroke:a.axisTickLineBorderColor},alignTick:!0,length:a.axisTickLineLength},subTickLine:null,animate:!0}}function vC(a){return{title:null,marker:{symbol:"circle",spacing:a.legendMarkerSpacing,style:{r:a.legendCircleMarkerSize,fill:a.legendMarkerColor}},itemName:{spacing:5,style:{fill:a.legendItemNameFillColor,fontFamily:a.fontFamily,fontSize:a.legendItemNameFontSize,lineHeight:a.legendItemNameLineHeight,fontWeight:a.legendItemNameFontWeight,textAlign:"start",textBaseline:"middle"}},itemStates:{active:{nameStyle:{opacity:.8}},unchecked:{nameStyle:{fill:"#D8D8D8"},markerStyle:{fill:"#D8D8D8",stroke:"#D8D8D8"}},inactive:{nameStyle:{fill:"#D8D8D8"},markerStyle:{opacity:.2}}},flipPage:!0,pageNavigator:{marker:{style:{size:a.legendPageNavigatorMarkerSize,inactiveFill:a.legendPageNavigatorMarkerInactiveFillColor,inactiveOpacity:a.legendPageNavigatorMarkerInactiveFillOpacity,fill:a.legendPageNavigatorMarkerFillColor,opacity:a.legendPageNavigatorMarkerFillOpacity}},text:{style:{fill:a.legendPageNavigatorTextFillColor,fontSize:a.legendPageNavigatorTextFontSize}}},animate:!1,maxItemWidth:200,itemSpacing:a.legendItemSpacing,itemMarginBottom:a.legendItemMarginBottom,padding:a.legendPadding}}function wy(a){var i,t={point:{default:{fill:a.pointFillColor,r:a.pointSize,stroke:a.pointBorderColor,lineWidth:a.pointBorder,fillOpacity:a.pointFillOpacity},active:{stroke:a.pointActiveBorderColor,lineWidth:a.pointActiveBorder},selected:{stroke:a.pointSelectedBorderColor,lineWidth:a.pointSelectedBorder},inactive:{fillOpacity:a.pointInactiveFillOpacity,strokeOpacity:a.pointInactiveBorderOpacity}},hollowPoint:{default:{fill:a.hollowPointFillColor,lineWidth:a.hollowPointBorder,stroke:a.hollowPointBorderColor,strokeOpacity:a.hollowPointBorderOpacity,r:a.hollowPointSize},active:{stroke:a.hollowPointActiveBorderColor,strokeOpacity:a.hollowPointActiveBorderOpacity},selected:{lineWidth:a.hollowPointSelectedBorder,stroke:a.hollowPointSelectedBorderColor,strokeOpacity:a.hollowPointSelectedBorderOpacity},inactive:{strokeOpacity:a.hollowPointInactiveBorderOpacity}},area:{default:{fill:a.areaFillColor,fillOpacity:a.areaFillOpacity,stroke:null},active:{fillOpacity:a.areaActiveFillOpacity},selected:{fillOpacity:a.areaSelectedFillOpacity},inactive:{fillOpacity:a.areaInactiveFillOpacity}},hollowArea:{default:{fill:null,stroke:a.hollowAreaBorderColor,lineWidth:a.hollowAreaBorder,strokeOpacity:a.hollowAreaBorderOpacity},active:{fill:null,lineWidth:a.hollowAreaActiveBorder},selected:{fill:null,lineWidth:a.hollowAreaSelectedBorder},inactive:{strokeOpacity:a.hollowAreaInactiveBorderOpacity}},interval:{default:{fill:a.intervalFillColor,fillOpacity:a.intervalFillOpacity},active:{stroke:a.intervalActiveBorderColor,lineWidth:a.intervalActiveBorder},selected:{stroke:a.intervalSelectedBorderColor,lineWidth:a.intervalSelectedBorder},inactive:{fillOpacity:a.intervalInactiveFillOpacity,strokeOpacity:a.intervalInactiveBorderOpacity}},hollowInterval:{default:{fill:a.hollowIntervalFillColor,stroke:a.hollowIntervalBorderColor,lineWidth:a.hollowIntervalBorder,strokeOpacity:a.hollowIntervalBorderOpacity},active:{stroke:a.hollowIntervalActiveBorderColor,lineWidth:a.hollowIntervalActiveBorder,strokeOpacity:a.hollowIntervalActiveBorderOpacity},selected:{stroke:a.hollowIntervalSelectedBorderColor,lineWidth:a.hollowIntervalSelectedBorder,strokeOpacity:a.hollowIntervalSelectedBorderOpacity},inactive:{stroke:a.hollowIntervalInactiveBorderColor,lineWidth:a.hollowIntervalInactiveBorder,strokeOpacity:a.hollowIntervalInactiveBorderOpacity}},line:{default:{stroke:a.lineBorderColor,lineWidth:a.lineBorder,strokeOpacity:a.lineBorderOpacity,fill:null,lineAppendWidth:10,lineCap:"round",lineJoin:"round"},active:{lineWidth:a.lineActiveBorder},selected:{lineWidth:a.lineSelectedBorder},inactive:{strokeOpacity:a.lineInactiveBorderOpacity}}},e=dC(a),n=vC(a);return{background:a.backgroundColor,defaultColor:a.brandColor,subColor:a.subColor,semanticRed:a.paletteSemanticRed,semanticGreen:a.paletteSemanticGreen,padding:"auto",fontFamily:a.fontFamily,columnWidthRatio:1/2,maxColumnWidth:null,minColumnWidth:null,roseWidthRatio:.9999999,multiplePieWidthRatio:1/1.3,colors10:a.paletteQualitative10,colors20:a.paletteQualitative20,sequenceColors:a.paletteSequence,shapes:{point:["hollow-circle","hollow-square","hollow-bowtie","hollow-diamond","hollow-hexagon","hollow-triangle","hollow-triangle-down","circle","square","bowtie","diamond","hexagon","triangle","triangle-down","cross","tick","plus","hyphen","line"],line:["line","dash","dot","smooth"],area:["area","smooth","line","smooth-line"],interval:["rect","hollow-rect","line","tick"]},sizes:[1,10],geometries:{interval:{rect:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:function(r){var o=r.geometry.coordinate;if(o.isPolar&&o.isTransposed){var s=uc(r.getModel(),o),l=s.startAngle,u=s.endAngle,c=(l+u)/2,f=7.5,h=f*Math.cos(c),d=f*Math.sin(c);return{matrix:ti(null,[["t",h,d]])}}return t.interval.selected}}},"hollow-rect":{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},line:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},tick:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},funnel:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}},pyramid:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}}},line:{line:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},dot:{default:{style:ct(ct({},t.line.default),{lineCap:null,lineDash:[1,1]})},active:{style:ct(ct({},t.line.active),{lineCap:null,lineDash:[1,1]})},inactive:{style:ct(ct({},t.line.inactive),{lineCap:null,lineDash:[1,1]})},selected:{style:ct(ct({},t.line.selected),{lineCap:null,lineDash:[1,1]})}},dash:{default:{style:ct(ct({},t.line.default),{lineCap:null,lineDash:[5.5,1]})},active:{style:ct(ct({},t.line.active),{lineCap:null,lineDash:[5.5,1]})},inactive:{style:ct(ct({},t.line.inactive),{lineCap:null,lineDash:[5.5,1]})},selected:{style:ct(ct({},t.line.selected),{lineCap:null,lineDash:[5.5,1]})}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vh:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hvh:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vhv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}}},polygon:{polygon:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}}},point:{circle:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},square:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},bowtie:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},diamond:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},hexagon:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},triangle:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},"triangle-down":{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},"hollow-circle":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-square":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-bowtie":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-diamond":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-hexagon":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-triangle":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-triangle-down":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},cross:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},tick:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},plus:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},hyphen:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},line:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}}},area:{area:{default:{style:t.area.default},active:{style:t.area.active},inactive:{style:t.area.inactive},selected:{style:t.area.selected}},smooth:{default:{style:t.area.default},active:{style:t.area.active},inactive:{style:t.area.inactive},selected:{style:t.area.selected}},line:{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}},"smooth-line":{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}}},schema:{candle:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},box:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}}},edge:{line:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vhv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},arc:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}}},violin:{violin:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hollow:{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}},"hollow-smooth":{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}}}},components:{axis:{common:e,top:{position:"top",grid:null,title:null,verticalLimitLength:1/2},bottom:{position:"bottom",grid:null,title:null,verticalLimitLength:1/2},left:{position:"left",title:null,line:null,tickLine:null,verticalLimitLength:1/3},right:{position:"right",title:null,line:null,tickLine:null,verticalLimitLength:1/3},circle:{title:null,grid:_n({},e.grid,{line:{type:"line"}})},radius:{title:null,grid:_n({},e.grid,{line:{type:"circle"}})}},legend:{common:n,right:{layout:"vertical",padding:a.legendVerticalPadding},left:{layout:"vertical",padding:a.legendVerticalPadding},top:{layout:"horizontal",padding:a.legendHorizontalPadding},bottom:{layout:"horizontal",padding:a.legendHorizontalPadding},continuous:{title:null,background:null,track:{},rail:{type:"color",size:a.sliderRailHeight,defaultLength:a.sliderRailWidth,style:{fill:a.sliderRailFillColor,stroke:a.sliderRailBorderColor,lineWidth:a.sliderRailBorder}},label:{align:"rail",spacing:4,formatter:null,style:{fill:a.sliderLabelTextFillColor,fontSize:a.sliderLabelTextFontSize,lineHeight:a.sliderLabelTextLineHeight,textBaseline:"middle",fontFamily:a.fontFamily}},handler:{size:a.sliderHandlerWidth,style:{fill:a.sliderHandlerFillColor,stroke:a.sliderHandlerBorderColor}},slidable:!0,padding:n.padding}},tooltip:{showContent:!0,follow:!0,showCrosshairs:!1,showMarkers:!0,shared:!1,enterable:!1,position:"auto",marker:{symbol:"circle",stroke:"#fff",shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0,0,0,0.09)",lineWidth:2,r:4},crosshairs:{line:{style:{stroke:a.tooltipCrosshairsBorderColor,lineWidth:a.tooltipCrosshairsBorder}},text:null,textBackground:{padding:2,style:{fill:"rgba(0, 0, 0, 0.25)",lineWidth:0,stroke:null}},follow:!1},domStyles:(i={},i["".concat(Is)]={position:"absolute",visibility:"hidden",zIndex:8,transition:"left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s",backgroundColor:a.tooltipContainerFillColor,opacity:a.tooltipContainerFillOpacity,boxShadow:a.tooltipContainerShadow,borderRadius:"".concat(a.tooltipContainerBorderRadius,"px"),color:a.tooltipTextFillColor,fontSize:"".concat(a.tooltipTextFontSize,"px"),fontFamily:a.fontFamily,lineHeight:"".concat(a.tooltipTextLineHeight,"px"),padding:"0 12px 0 12px"},i["".concat(js)]={marginBottom:"12px",marginTop:"12px"},i["".concat(Ju)]={margin:0,listStyleType:"none",padding:0},i["".concat(Hc)]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},i["".concat(Wc)]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},i["".concat(Gc)]={display:"inline-block",float:"right",marginLeft:"30px"},i)},annotation:{arc:{style:{stroke:a.annotationArcBorderColor,lineWidth:a.annotationArcBorder},animate:!0},line:{style:{stroke:a.annotationLineBorderColor,lineDash:a.annotationLineDash,lineWidth:a.annotationLineBorder},text:{position:"start",autoRotate:!0,style:{fill:a.annotationTextFillColor,stroke:a.annotationTextBorderColor,lineWidth:a.annotationTextBorder,fontSize:a.annotationTextFontSize,textAlign:"start",fontFamily:a.fontFamily,textBaseline:"bottom"}},animate:!0},text:{style:{fill:a.annotationTextFillColor,stroke:a.annotationTextBorderColor,lineWidth:a.annotationTextBorder,fontSize:a.annotationTextFontSize,textBaseline:"middle",textAlign:"start",fontFamily:a.fontFamily},animate:!0},region:{top:!1,style:{lineWidth:a.annotationRegionBorder,stroke:a.annotationRegionBorderColor,fill:a.annotationRegionFillColor,fillOpacity:a.annotationRegionFillOpacity},animate:!0},image:{top:!1,animate:!0},dataMarker:{top:!0,point:{style:{r:3,stroke:a.brandColor,lineWidth:2}},line:{style:{stroke:a.annotationLineBorderColor,lineWidth:a.annotationLineBorder},length:a.annotationDataMarkerLineLength},text:{style:{textAlign:"start",fill:a.annotationTextFillColor,stroke:a.annotationTextBorderColor,lineWidth:a.annotationTextBorder,fontSize:a.annotationTextFontSize,fontFamily:a.fontFamily}},direction:"upward",autoAdjust:!0,animate:!0},dataRegion:{style:{region:{fill:a.annotationRegionFillColor,fillOpacity:a.annotationRegionFillOpacity},text:{textAlign:"center",textBaseline:"bottom",fill:a.annotationTextFillColor,stroke:a.annotationTextBorderColor,lineWidth:a.annotationTextBorder,fontSize:a.annotationTextFontSize,fontFamily:a.fontFamily}},animate:!0}},slider:{common:{padding:[8,8,8,8],backgroundStyle:{fill:a.cSliderBackgroundFillColor,opacity:a.cSliderBackgroundFillOpacity},foregroundStyle:{fill:a.cSliderForegroundFillColor,opacity:a.cSliderForegroundFillOpacity},handlerStyle:{width:a.cSliderHandlerWidth,height:a.cSliderHandlerHeight,fill:a.cSliderHandlerFillColor,opacity:a.cSliderHandlerFillOpacity,stroke:a.cSliderHandlerBorderColor,lineWidth:a.cSliderHandlerBorder,radius:a.cSliderHandlerBorderRadius,highLightFill:a.cSliderHandlerHighlightFillColor},textStyle:{fill:a.cSliderTextFillColor,opacity:a.cSliderTextFillOpacity,fontSize:a.cSliderTextFontSize,lineHeight:a.cSliderTextLineHeight,fontWeight:a.cSliderTextFontWeight,stroke:a.cSliderTextBorderColor,lineWidth:a.cSliderTextBorder}}},scrollbar:{common:{padding:[8,8,8,8]},default:{style:{trackColor:a.scrollbarTrackFillColor,thumbColor:a.scrollbarThumbFillColor}},hover:{style:{thumbColor:a.scrollbarThumbHighlightFillColor}}}},labels:{offset:12,style:{fill:a.labelFillColor,fontSize:a.labelFontSize,fontFamily:a.fontFamily,stroke:a.labelBorderColor,lineWidth:a.labelBorder},fillColorDark:a.labelFillColorDark,fillColorLight:a.labelFillColorLight,autoRotate:!0},innerLabels:{style:{fill:a.innerLabelFillColor,fontSize:a.innerLabelFontSize,fontFamily:a.fontFamily,stroke:a.innerLabelBorderColor,lineWidth:a.innerLabelBorder},autoRotate:!0},overflowLabels:{style:{fill:a.overflowLabelFillColor,fontSize:a.overflowLabelFontSize,fontFamily:a.fontFamily,stroke:a.overflowLabelBorderColor,lineWidth:a.overflowLabelBorder}},pieLabels:{labelHeight:14,offset:10,labelLine:{style:{lineWidth:a.labelLineBorder}},autoRotate:!0}}}var ir={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},Nl={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},gC=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],pC=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],mC=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],Ey=function(a){a===void 0&&(a={});var i=a.paletteQualitative10,t=i===void 0?gC:i,e=a.paletteQualitative20,n=e===void 0?pC:e,r=a.brandColor,o=r===void 0?t[0]:r,s={backgroundColor:"transparent",brandColor:o,subColor:"rgba(0,0,0,0.05)",paletteQualitative10:t,paletteQualitative20:n,paletteSemanticRed:"#F4664A",paletteSemanticGreen:"#30BF78",paletteSemanticYellow:"#FAAD14",paletteSequence:mC,fontFamily:`"Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`,axisLineBorderColor:ir[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:ir[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisDescriptionIconFillColor:Nl[85],axisTickLineBorderColor:ir[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:ir[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:ir[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:ir[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:ir[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:o,legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:ir[65],legendItemNameFontSize:12,legendItemNameLineHeight:12,legendItemNameFontWeight:"normal",legendItemSpacing:24,legendItemMarginBottom:12,legendPadding:[8,8,8,8],legendHorizontalPadding:[8,0,8,0],legendVerticalPadding:[0,8,0,8],legendPageNavigatorMarkerSize:12,legendPageNavigatorMarkerInactiveFillColor:ir[100],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:ir[100],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:ir[45],legendPageNavigatorTextFontSize:12,sliderRailFillColor:ir[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:ir[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:ir[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:ir[25],annotationArcBorderColor:ir[15],annotationArcBorder:1,annotationLineBorderColor:ir[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:ir[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:ir[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:ir[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:ir[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:ir[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:Nl[100],innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:ir[65],overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:Nl[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:ir[25],cSliderRailHieght:16,cSliderBackgroundFillColor:"#416180",cSliderBackgroundFillOpacity:.05,cSliderForegroundFillColor:"#5B8FF9",cSliderForegroundFillOpacity:.15,cSliderHandlerHeight:24,cSliderHandlerWidth:10,cSliderHandlerFillColor:"#F7F7F7",cSliderHandlerFillOpacity:1,cSliderHandlerHighlightFillColor:"#FFF",cSliderHandlerBorderColor:"#BFBFBF",cSliderHandlerBorder:1,cSliderHandlerBorderRadius:2,cSliderTextFillColor:"#000",cSliderTextFillOpacity:.45,cSliderTextFontSize:12,cSliderTextLineHeight:12,cSliderTextFontWeight:"normal",cSliderTextBorderColor:null,cSliderTextBorder:0,scrollbarTrackFillColor:"rgba(0,0,0,0)",scrollbarThumbFillColor:"rgba(0,0,0,0.15)",scrollbarThumbHighlightFillColor:"rgba(0,0,0,0.2)",pointFillColor:o,pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:Nl[100],pointBorderOpacity:1,pointActiveBorderColor:ir[100],pointSelectedBorder:2,pointSelectedBorderColor:ir[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:o,hollowPointBorderOpacity:.95,hollowPointFillColor:Nl[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:ir[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:ir[100],hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:o,lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:o,areaFillOpacity:.25,areaActiveFillColor:o,areaActiveFillOpacity:.5,areaSelectedFillColor:o,areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:o,hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:ir[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:ir[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:o,intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:ir[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:ir[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:o,hollowIntervalBorderOpacity:1,hollowIntervalFillColor:Nl[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:ir[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:ir[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3};return ct(ct({},s),a)};Ey();function hc(a){var i=a.styleSheet,t=i===void 0?{}:i,e=Ti(a,["styleSheet"]),n=Ey(t);return _n({},wy(n),e)}var yC=hc({}),ad={default:yC};function yh(a){return he(ad,uu(a),ad.default)}function xC(a,i){ad[uu(a)]=hc(i)}function lg(a,i,t){var e=t.translate(a),n=t.translate(i);return Ai(e,n)}function wC(a,i){var t=i.coordinate,e=i.getXScale(),n=e.range,r=n[n.length-1],o=n[0],s=t.invert(a),l=s.x;return t.isPolar&&l>(1+r)/2&&(l=o),e.translate(e.invert(l))}function ug(a,i,t){var e=t.coordinate,n=t.getYScale(),r=n.field,o=e.invert(i),s=n.invert(o.y),l=As(a,function(u){var c=u[ur];return c[r][0]<=s&&c[r][1]>=s});return l||a[a.length-1]}var EC=wc(function(a){if(a.isCategory)return 1;for(var i=a.values,t=i.length,e=a.translate(i[0]),n=e,r=0;rn&&(n=s)}return(n-e)/(t-1)});function MC(a,i,t){var e=i.getAttribute("position"),n=e.getFields(),r=i.scales,o=Rn(t)||!t?n[0]:t,s=r[o],l=s?s.getText(a[o]):a[o]||o;return Rn(t)?t(l,a):l}function bC(a){var i=md(a.attributes);return Co(i,function(t){return wl(Vl,t.type)})}function My(a){var i,t,e=bC(a),n;try{for(var r=rr(e),o=r.next();!o.done;o=r.next()){var s=o.value,l=s.getScale(s.type);if(l&&l.isLinear){var u=he(a.scaleDefs,l.field),c=ay(l,u,s.type,a.type);if(c!=="cat"){n=l;break}}}}catch(d){i={error:d}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(i)throw i.error}}var f=a.getXScale(),h=a.getYScale();return n||h||f}function _C(a,i){var t=i.field,e=a[t];if(ln(e)){var n=e.map(function(r){return i.getText(r)});return n.join("-")}return i.getText(e)}function SC(a,i){var t,e=i.getGroupScales();if(e.length&&(t=e[0]),t){var n=t.field;return t.getText(a[n])}var r=My(i);return qu(r)}function by(a,i,t){if(i.length===0)return null;var e=t.type,n=t.getXScale(),r=t.getYScale(),o=n.field,s=r.field,l=null;if(e==="heatmap"||e==="point"){for(var u=t.coordinate,c=u.invert(a),f=n.invert(c.x),h=r.invert(c.y),d=1/0,v=0;v=x)if(C)ln(l)||(l=[]),l.push(F);else{l=F;break}}ln(l)&&(l=ug(l,a,t))}else{var k=void 0;if(!n.isLinear&&n.type!=="timeCat"){for(var v=0;vn.translate(D)||xn.max||xMath.abs(n.translate(k[ur][o])-x)&&(w=k)}var Q=EC(t.getXScale());return!l&&Math.abs(n.translate(w[ur][o])-x)<=Q/2&&(l=w),l}function _y(a,i,t,e){var n,r;t===void 0&&(t=""),e===void 0&&(e=!1);var o=a[ur],s=MC(o,i,t),l=i.tooltipOption,u=i.theme.defaultColor,c=[],f,h;function d(F,k){if(e||!qe(k)&&k!==""){var j={title:s,data:o,mappingData:a,name:F,value:k,color:a.color||u,marker:!0};c.push(j)}}if(Mr(l)){var v=l.fields,g=l.callback;if(g){var p=v.map(function(F){return a[ur][F]}),m=g.apply(void 0,Er([],Pn(p),!1)),y=ct({data:a[ur],mappingData:a,title:s,color:a.color||u,marker:!0},m);c.push(y)}else{var w=i.scales;try{for(var x=rr(v),M=x.next();!M.done;M=x.next()){var _=M.value;if(!qe(o[_])){var D=w[_];f=qu(D),h=D.getText(o[_]),d(f,h)}}}catch(F){n={error:F}}finally{try{M&&!M.done&&(r=x.return)&&r.call(x)}finally{if(n)throw n.error}}}}else{var C=My(i);h=_C(o,C),f=SC(o,i),d(f,h)}return c}function fg(a,i,t,e){var n,r,o=e.showNil,s=[],l=a.dataArray;if(!os(l)){a.sort(l);try{for(var u=rr(l),c=u.next();!c.done;c=u.next()){var f=c.value,h=by(i,f,a);if(h){var d=a.getElementId(h),v=a.elementsMap[d];if(a.type==="heatmap"||v.visible){var g=_y(h,a,t,o);g.length&&s.push(g)}}}}catch(p){n={error:p}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}return s}function cg(a,i,t,e){var n=e.showNil,r=[],o=a.container,s=o.getShape(i.x,i.y);if(s&&s.get("visible")&&s.get("origin")){var l=s.get("origin").mappingData,u=_y(l,a,t,n);u.length&&r.push(u)}return r}function od(a,i,t){var e,n,r=[],o=a.geometries,s=t.shared,l=t.title,u=t.reversed;try{for(var c=rr(o),f=c.next();!f.done;f=c.next()){var h=f.value;if(h.visible&&h.tooltipOption!==!1){var d=h.type,v=void 0;["point","edge","polygon"].includes(d)?v=cg(h,i,l,t):["area","line","path","heatmap"].includes(d)||s!==!1?v=fg(h,i,l,t):v=cg(h,i,l,t),v.length&&(u&&v.reverse(),r.push(v))}}}catch(g){e={error:g}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}return r}function CC(a,i,t){var e,n,r=od(a,i,t);try{for(var o=rr(a.views),s=o.next();!s.done;s=o.next()){var l=s.value;r=r.concat(od(l,i,t))}}catch(u){e={error:u}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}function PC(a){return!or(a)&&!ln(a)}function Xd(a){a===void 0&&(a=0);var i=ln(a)?a:[a];switch(i.length){case 0:i=[0,0,0,0];break;case 1:i=new Array(4).fill(i[0]);break;case 2:i=Er(Er([],Pn(i),!1),Pn(i),!1);break;case 3:i=Er(Er([],Pn(i),!1),[i[1]],!1);break;default:i=i.slice(0,4);break}return i}var Ud={};function du(a,i){Ud[a]=i}function TC(){return Object.keys(Ud)}function AC(a){return Ud[a]}var OC=function(){function a(i){this.option=this.wrapperOption(i)}return a.prototype.update=function(i){return this.option=this.wrapperOption(i),this},a.prototype.hasAction=function(i){var t=this.option.actions;return yc(t,function(e){return e[0]===i})},a.prototype.create=function(i,t){var e=this.option,n=e.type,r=e.cfg,o=n==="theta",s=ct({start:i,end:t},r),l=n_(o?"polar":n);return this.coordinate=new l(s),this.coordinate.type=n,o&&(this.hasAction("transpose")||this.transpose()),this.execActions(),this.coordinate},a.prototype.adjust=function(i,t){return this.coordinate.update({start:i,end:t}),this.coordinate.resetMatrix(),this.execActions(["scale","rotate","translate"]),this.coordinate},a.prototype.rotate=function(i){return this.option.actions.push(["rotate",i]),this},a.prototype.reflect=function(i){return this.option.actions.push(["reflect",i]),this},a.prototype.scale=function(i,t){return this.option.actions.push(["scale",i,t]),this},a.prototype.transpose=function(){return this.option.actions.push(["transpose"]),this},a.prototype.getOption=function(){return this.option},a.prototype.getCoordinate=function(){return this.coordinate},a.prototype.wrapperOption=function(i){return ct({type:"rect",actions:[],cfg:{}},i)},a.prototype.execActions=function(i){var t=this,e=this.option.actions;Nt(e,function(n){var r,o=Pn(n),s=o[0],l=o.slice(1),u=qe(i)?!0:i.includes(s);u&&(r=t.coordinate)[s].apply(r,Er([],Pn(l),!1))})},a}(),qi=function(){function a(i,t,e){this.view=i,this.gEvent=t,this.data=e,this.type=t.type}return a.fromData=function(i,t,e){return new a(i,new sf(t,{}),e)},Object.defineProperty(a.prototype,"target",{get:function(){return this.gEvent.target},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"event",{get:function(){return this.gEvent.originalEvent},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"x",{get:function(){return this.gEvent.x},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"y",{get:function(){return this.gEvent.y},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"clientX",{get:function(){return this.gEvent.clientX},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"clientY",{get:function(){return this.gEvent.clientY},enumerable:!1,configurable:!0}),a.prototype.toString=function(){return"[Event (type=".concat(this.type,")]")},a.prototype.clone=function(){return new a(this.view,this.gEvent,this.data)},a}();function IC(a){var i=a.getController("axis"),t=a.getController("legend"),e=a.getController("annotation"),n=a.getController("slider"),r=a.getController("scrollbar");[i,n,r,t,e].forEach(function(o){o&&o.layout()})}var jC=function(){function a(){this.scales=new Map,this.syncScales=new Map}return a.prototype.createScale=function(i,t,e,n){var r=e,o=this.getScaleMeta(n);if(t.length===0&&o){var s=o.scale,l={type:s.type};s.isCategory&&(l.values=s.values),r=_n(l,o.scaleDef,e)}var u=YS(i,t,r);return this.cacheScale(u,e,n),u},a.prototype.sync=function(i,t){var e=this;this.syncScales.forEach(function(n,r){var o=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER,l=[];Nt(n,function(u){var c=e.getScale(u);s=or(c.max)?Math.max(s,c.max):s,o=or(c.min)?Math.min(o,c.min):o,Nt(c.values,function(f){l.includes(f)||l.push(f)})}),Nt(n,function(u){var c=e.getScale(u);if(c.isContinuous)c.change({min:o,max:s,values:l});else if(c.isCategory){var f=c.range,h=e.getScaleMeta(u);l&&!he(h,["scaleDef","range"])&&(f=oy(_n({},c,{values:l}),i,t)),c.change({values:l,range:f})}})})},a.prototype.cacheScale=function(i,t,e){var n=this.getScaleMeta(e);n&&n.scale.type===i.type?(HS(n.scale,i),n.scaleDef=t):(n={key:e,scale:i,scaleDef:t},this.scales.set(e,n));var r=this.getSyncKey(n);if(n.syncKey=r,this.removeFromSyncScales(e),r){var o=this.syncScales.get(r);o||(o=[],this.syncScales.set(r,o)),o.push(e)}},a.prototype.getScale=function(i){var t=this.getScaleMeta(i);if(!t){var e=Ii(i.split("-")),n=this.syncScales.get(e);n&&n.length&&(t=this.getScaleMeta(n[0]))}return t&&t.scale},a.prototype.deleteScale=function(i){var t=this.getScaleMeta(i);if(t){var e=t.syncKey,n=this.syncScales.get(e);if(n&&n.length){var r=n.indexOf(i);r!==-1&&n.splice(r,1)}}this.scales.delete(i)},a.prototype.clear=function(){this.scales.clear(),this.syncScales.clear()},a.prototype.removeFromSyncScales=function(i){var t=this;this.syncScales.forEach(function(e,n){var r=e.indexOf(i);if(r!==-1)return e.splice(r,1),e.length===0&&t.syncScales.delete(n),!1})},a.prototype.getSyncKey=function(i){var t=i.scale,e=i.scaleDef,n=t.field,r=he(e,["sync"]);return r===!0?n:r===!1?void 0:r},a.prototype.getScaleMeta=function(i){return this.scales.get(i)},a}(),Uf=function(){function a(i,t,e,n){i===void 0&&(i=0),t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0),this.top=i,this.right=t,this.bottom=e,this.left=n}return a.instance=function(i,t,e,n){return i===void 0&&(i=0),t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0),new a(i,t,e,n)},a.prototype.max=function(i){var t=Pn(i,4),e=t[0],n=t[1],r=t[2],o=t[3];return this.top=Math.max(this.top,e),this.right=Math.max(this.right,n),this.bottom=Math.max(this.bottom,r),this.left=Math.max(this.left,o),this},a.prototype.shrink=function(i){var t=Pn(i,4),e=t[0],n=t[1],r=t[2],o=t[3];return this.top+=e,this.right+=n,this.bottom+=r,this.left+=o,this},a.prototype.inc=function(i,t){var e=i.width,n=i.height;switch(t){case hn.TOP:case hn.TOP_LEFT:case hn.TOP_RIGHT:this.top+=n;break;case hn.RIGHT:case hn.RIGHT_TOP:case hn.RIGHT_BOTTOM:this.right+=e;break;case hn.BOTTOM:case hn.BOTTOM_LEFT:case hn.BOTTOM_RIGHT:this.bottom+=n;break;case hn.LEFT:case hn.LEFT_TOP:case hn.LEFT_BOTTOM:this.left+=e;break}return this},a.prototype.getPadding=function(){return[this.top,this.right,this.bottom,this.left]},a.prototype.clone=function(){return new(a.bind.apply(a,Er([void 0],Pn(this.getPadding()),!1)))},a}();function LC(a){var i=a.padding;if(!PC(i))return new(Uf.bind.apply(Uf,Er([void 0],Pn(Xd(i)),!1)));var t=a.viewBBox,e=new Uf,n=[],r=[],o=[];return Nt(a.getComponents(),function(s){var l=s.type;l===di.AXIS?n.push(s):[di.LEGEND,di.SLIDER,di.SCROLLBAR].includes(l)?r.push(s):l!==di.GRID&&l!==di.TOOLTIP&&o.push(s)}),Nt(n,function(s){var l=s.component,u=l.getLayoutBBox(),c=new ca(u.x,u.y,u.width,u.height),f=c.exceed(t);e.max(f)}),Nt(r,function(s){var l=s.component,u=s.direction,c=l.getLayoutBBox(),f=l.get("padding"),h=new ca(c.x,c.y,c.width,c.height).expand(f);e.inc(h,u)}),Nt(o,function(s){var l=s.component,u=s.direction,c=l.getLayoutBBox(),f=new ca(c.x,c.y,c.width,c.height);e.inc(f,u)}),e}function DC(a,i,t){var e=t.instance();i.forEach(function(n){n.autoPadding=e.max(n.autoPadding.getPadding())})}var Sy=function(a){je(i,a);function i(t){var e=a.call(this,{visible:t.visible})||this;e.views=[],e.geometries=[],e.controllers=[],e.interactions={},e.limitInPlot=!1,e.options={data:[],animate:!0},e.usedControllers=TC(),e.scalePool=new jC,e.layoutFunc=IC,e.isPreMouseInPlot=!1,e.isDataChanged=!1,e.isCoordinateChanged=!1,e.createdScaleKeys=new Map,e.onCanvasEvent=function(w){var x=w.name;if(!x.includes(":")){var M=e.createViewEvent(w);e.doPlotEvent(M),e.emit(x,M)}},e.onDelegateEvents=function(w){var x=w.name;if(!!x.includes(":")){var M=e.createViewEvent(w);e.emit(x,M)}};var n=t.id,r=n===void 0?fl("view"):n,o=t.parent,s=t.canvas,l=t.backgroundGroup,u=t.middleGroup,c=t.foregroundGroup,f=t.region,h=f===void 0?{start:{x:0,y:0},end:{x:1,y:1}}:f,d=t.padding,v=t.appendPadding,g=t.theme,p=t.options,m=t.limitInPlot,y=t.syncViewPadding;return e.parent=o,e.canvas=s,e.backgroundGroup=l,e.middleGroup=u,e.foregroundGroup=c,e.region=h,e.padding=d,e.appendPadding=v,e.options=ct(ct({},e.options),p),e.limitInPlot=m,e.id=r,e.syncViewPadding=y,e.themeObject=Mr(g)?_n({},yh("default"),hc(g)):yh(g),e.init(),e}return i.prototype.setLayout=function(t){this.layoutFunc=t},i.prototype.init=function(){this.calculateViewBBox(),this.initEvents(),this.initComponentController(),this.initOptions()},i.prototype.render=function(t,e){t===void 0&&(t=!1),this.emit(wr.BEFORE_RENDER,qi.fromData(this,wr.BEFORE_RENDER,e)),this.paint(t),this.emit(wr.AFTER_RENDER,qi.fromData(this,wr.AFTER_RENDER,e)),this.visible===!1&&this.changeVisible(!1)},i.prototype.clear=function(){var t=this;this.emit(wr.BEFORE_CLEAR),this.filteredData=[],this.coordinateInstance=void 0,this.isDataChanged=!1,this.isCoordinateChanged=!1;for(var e=this.geometries,n=0;n');k.appendChild(j);var V=jv(k,l,r,o),st=Gx(h),yt=new st.Canvas(ct({container:j,pixelRatio:d,localRefresh:g,supportCSSTransform:w},V));return e=a.call(this,{parent:null,canvas:yt,backgroundGroup:yt.addGroup({zIndex:Kl.BG}),middleGroup:yt.addGroup({zIndex:Kl.MID}),foregroundGroup:yt.addGroup({zIndex:Kl.FORE}),padding:u,appendPadding:c,visible:m,options:_,limitInPlot:D,theme:C,syncViewPadding:F})||this,e.onResize=mp(function(){e.forceFit()},300),e.ele=k,e.canvas=yt,e.width=V.width,e.height=V.height,e.autoFit=l,e.localRefresh=g,e.renderer=h,e.wrapperElement=j,e.updateCanvasStyle(),e.bindAutoFit(),e.initDefaultInteractions(M),e}return i.prototype.initDefaultInteractions=function(t){var e=this;Nt(t,function(n){e.interaction(n)})},i.prototype.aria=function(t){var e="aria-label";t===!1?this.ele.removeAttribute(e):this.ele.setAttribute(e,t.label)},i.prototype.changeSize=function(t,e){return this.width===t&&this.height===e?this:(this.emit(wr.BEFORE_CHANGE_SIZE),this.width=t,this.height=e,this.canvas.changeSize(t,e),this.render(!0),this.emit(wr.AFTER_CHANGE_SIZE),this)},i.prototype.clear=function(){a.prototype.clear.call(this),this.aria(!1)},i.prototype.destroy=function(){a.prototype.destroy.call(this),this.unbindAutoFit(),this.canvas.destroy(),Qx(this.wrapperElement),this.wrapperElement=null},i.prototype.changeVisible=function(t){return a.prototype.changeVisible.call(this,t),this.wrapperElement.style.display=t?"":"none",this},i.prototype.forceFit=function(){if(!this.destroyed){var t=jv(this.ele,!0,this.width,this.height),e=t.width,n=t.height;this.changeSize(e,n)}},i.prototype.updateCanvasStyle=function(){Ji(this.canvas.get("el"),{display:"inline-block",verticalAlign:"middle"})},i.prototype.bindAutoFit=function(){this.autoFit&&window.addEventListener("resize",this.onResize)},i.prototype.unbindAutoFit=function(){this.autoFit&&window.removeEventListener("resize",this.onResize)},i}(Sy),vu=function(){function a(i){this.visible=!0,this.components=[],this.view=i}return a.prototype.clear=function(i){Nt(this.components,function(t){t.component.destroy()}),this.components=[]},a.prototype.destroy=function(){this.clear()},a.prototype.getComponents=function(){return this.components},a.prototype.changeVisible=function(i){this.visible!==i&&(this.components.forEach(function(t){i?t.component.show():t.component.hide()}),this.visible=i)},a}();function BC(a){for(var i=[],t=function(n){var r=a[n],o=As(i,function(s){return s.color===r.color&&s.name===r.name&&s.value===r.value&&s.title===r.title});o||i.push(r)},e=0;e1){var x=u[0],M=Math.abs(t.y-x[0].y);try{for(var _=rr(u),D=_.next();!D.done;D=_.next()){var C=D.value,F=Math.abs(t.y-C[0].y);F<=M&&(x=C,M=F)}}catch(k){s={error:k}}finally{try{D&&!D.done&&(l=_.return)&&l.call(_)}finally{if(s)throw s.error}}u=[x]}return BC(ao(u))}return[]},i.prototype.layout=function(){},i.prototype.update=function(){if(this.point&&this.showTooltip(this.point),this.tooltip){var t=this.view.getCanvas();this.tooltip.set("region",{start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}})}},i.prototype.isCursorEntered=function(t){if(this.tooltip){var e=this.tooltip.getContainer(),n=this.tooltip.get("capture");if(e&&n){var r=e.getBoundingClientRect(),o=r.x,s=r.y,l=r.width,u=r.height;return new ca(o,s,l,u).isPointIn(t)}}return!1},i.prototype.getTooltipCfg=function(){var t=this.view,e=t.getOptions().tooltip,n=this.processCustomContent(e),r=t.getTheme(),o=he(r,["components","tooltip"],{}),s=he(n,"enterable",o.enterable);return _n({},o,n,{capture:!!(s||this.isLocked)})},i.prototype.processCustomContent=function(t){if(zu(t)||!he(t,"customContent"))return t;var e=t.customContent,n=function(r,o){var s=e(r,o)||"";return $n(s)?'
    '+s+"
    ":s};return ct(ct({},t),{customContent:n})},i.prototype.getTitle=function(t){var e=t[0].title||t[0].name;return this.title=e,e},i.prototype.renderTooltip=function(){var t=this.view.getCanvas(),e={start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}},n=this.getTooltipCfg(),r=new Vc(ct(ct({parent:t.get("el").parentNode,region:e},n),{visible:!1,crosshairs:null}));r.init(),this.tooltip=r},i.prototype.renderTooltipMarkers=function(t,e){var n,r,o=this.getTooltipMarkersGroup(),s=this.view.getRootView(),l=s.limitInPlot;try{for(var u=rr(t),c=u.next();!c.done;c=u.next()){var f=c.value,h=f.x,d=f.y;if(l||(o==null?void 0:o.getClip())){var v=Wd(s.getCoordinate()),g=v.type,p=v.attrs;o==null||o.setClip({type:g,attrs:p})}else o==null||o.setClip(void 0);var m=this.view.getTheme(),y=he(m,["components","tooltip","marker"],{}),w=ct(ct({fill:f.color,symbol:"circle",shadowColor:f.color},Rn(e)?ct(ct({},y),e(f)):e),{x:h,y:d});o.addShape("marker",{attrs:w})}}catch(x){n={error:x}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}},i.prototype.renderCrosshairs=function(t,e){var n=he(e,["crosshairs","type"],"x");n==="x"?(this.yCrosshair&&this.yCrosshair.hide(),this.renderXCrosshairs(t,e)):n==="y"?(this.xCrosshair&&this.xCrosshair.hide(),this.renderYCrosshairs(t,e)):n==="xy"&&(this.renderXCrosshairs(t,e),this.renderYCrosshairs(t,e))},i.prototype.renderXCrosshairs=function(t,e){var n=this.getViewWithGeometry(this.view).getCoordinate(),r,o;if(n.isRect)n.isTransposed?(r={x:n.start.x,y:t.y},o={x:n.end.x,y:t.y}):(r={x:t.x,y:n.end.y},o={x:t.x,y:n.start.y});else{var s=iu(n,t),l=n.getCenter(),u=n.getRadius();o=ei(l.x,l.y,u,s),r=l}var c=_n({start:r,end:o,container:this.getTooltipCrosshairsGroup()},he(e,"crosshairs",{}),this.getCrosshairsText("x",t,e));delete c.type;var f=this.xCrosshair;f?f.update(c):(f=new Qm(c),f.init()),f.render(),f.show(),this.xCrosshair=f},i.prototype.renderYCrosshairs=function(t,e){var n=this.getViewWithGeometry(this.view).getCoordinate(),r,o;if(n.isRect){var s=void 0,l=void 0;n.isTransposed?(s={x:t.x,y:n.end.y},l={x:t.x,y:n.start.y}):(s={x:n.start.x,y:t.y},l={x:n.end.x,y:t.y}),r={start:s,end:l},o="Line"}else r={center:n.getCenter(),radius:$c(n,t),startAngle:n.startAngle,endAngle:n.endAngle},o="Circle";r=_n({container:this.getTooltipCrosshairsGroup()},r,he(e,"crosshairs",{}),this.getCrosshairsText("y",t,e)),delete r.type;var u=this.yCrosshair;u?n.isRect&&u.get("type")==="circle"||!n.isRect&&u.get("type")==="line"?(u=new X0[o](r),u.init()):u.update(r):(u=new X0[o](r),u.init()),u.render(),u.show(),this.yCrosshair=u},i.prototype.getCrosshairsText=function(t,e,n){var r=he(n,["crosshairs","text"]),o=he(n,["crosshairs","follow"]),s=this.items;if(r){var l=this.getViewWithGeometry(this.view),u=s[0],c=l.getXScale(),f=l.getYScales()[0],h=void 0,d=void 0;if(o){var v=this.view.getCoordinate().invert(e);h=c.invert(v.x),d=f.invert(v.y)}else h=u.data[c.field],d=u.data[f.field];var g=t==="x"?h:d;return Rn(r)?r=r(t,g,s,e):r.content=g,{text:r}}},i.prototype.getGuideGroup=function(){if(!this.guideGroup){var t=this.view.foregroundGroup;this.guideGroup=t.addGroup({name:"tooltipGuide",capture:!1})}return this.guideGroup},i.prototype.getTooltipMarkersGroup=function(){var t=this.tooltipMarkersGroup;return t&&!t.destroyed?(t.clear(),t.show()):(t=this.getGuideGroup().addGroup({name:"tooltipMarkersGroup"}),t.toFront(),this.tooltipMarkersGroup=t),t},i.prototype.getTooltipCrosshairsGroup=function(){var t=this.tooltipCrosshairsGroup;return t||(t=this.getGuideGroup().addGroup({name:"tooltipCrosshairsGroup",capture:!1}),t.toBack(),this.tooltipCrosshairsGroup=t),t},i.prototype.findItemsFromView=function(t,e){var n,r;if(t.getOptions().tooltip===!1)return[];var o=this.getTooltipCfg(),s=od(t,e,o);try{for(var l=rr(t.views),u=l.next();!u.done;u=l.next()){var c=u.value;s=s.concat(this.findItemsFromView(c,e))}}catch(f){n={error:f}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return s},i.prototype.getViewWithGeometry=function(t){var e=this;return t.geometries.length?t:As(t.views,function(n){return e.getViewWithGeometry(n)})},i.prototype.getItemsAfterProcess=function(t){var e=this.getTooltipCfg().customItems,n=e||function(r){return r};return n(t)},i}(vu),Cy={};function Py(a){return Cy[a.toLowerCase()]}function oo(a,i){Cy[a.toLowerCase()]=i}var su={appear:{duration:450,easing:"easeQuadOut"},update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},FC={interval:function(a){return{enter:{animation:a.isRect?a.isTransposed?"scale-in-x":"scale-in-y":"fade-in"},update:{animation:a.isPolar&&a.isTransposed?"sector-path-update":null},leave:{animation:"fade-out"}}},line:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},path:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},point:{appear:{animation:"zoom-in"},enter:{animation:"zoom-in"},leave:{animation:"zoom-out"}},area:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},polygon:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},schema:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},edge:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},label:{appear:{animation:"fade-in",delay:450},enter:{animation:"fade-in"},update:{animation:"position-update"},leave:{animation:"fade-out"}}},hg={line:function(){return{animation:"wave-in"}},area:function(){return{animation:"wave-in"}},path:function(){return{animation:"fade-in"}},interval:function(a){var i;return a.isRect?i=a.isTransposed?"grow-in-x":"grow-in-y":(i="grow-in-xy",a.isPolar&&a.isTransposed&&(i="wave-in")),{animation:i}},schema:function(a){var i;return a.isRect?i=a.isTransposed?"grow-in-x":"grow-in-y":i="grow-in-xy",{animation:i}},polygon:function(){return{animation:"fade-in",duration:500}},edge:function(){return{animation:"fade-in"}}};function NC(a,i){return{delay:Rn(a.delay)?a.delay(i):a.delay,easing:Rn(a.easing)?a.easing(i):a.easing,duration:Rn(a.duration)?a.duration(i):a.duration,callback:a.callback,repeat:a.repeat}}function Ty(a,i,t){var e=FC[a];return e&&(Rn(e)&&(e=e(i)),e=_n({},su,e),t)?e[t]:e}function ql(a,i,t){var e=he(a.get("origin"),"data",ur),n=i.animation,r=NC(i,e);if(n){var o=Py(n);o&&o(a,r,t)}else a.animate(t.toAttrs,r)}function kC(a,i,t,e,n){if(hg[t]){var r=hg[t](e),o=Py(he(r,"animation",""));if(o){var s=ct(ct(ct({},su.appear),r),i);a.stopAnimate(),o(a,s,{coordinate:e,minYPoint:n,toAttrs:null})}}}var Zd="element-background",Ay=function(a){je(i,a);function i(t){var e=a.call(this,t)||this;e.labelShape=[],e.states=[];var n=t.shapeFactory,r=t.container,o=t.offscreenGroup,s=t.elementIndex,l=t.visible,u=l===void 0?!0:l;return e.shapeFactory=n,e.container=r,e.offscreenGroup=o,e.visible=u,e.elementIndex=s,e}return i.prototype.draw=function(t,e){e===void 0&&(e=!1),this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.drawShape(t,e),this.visible===!1&&this.changeVisible(!1)},i.prototype.update=function(t){var e=this,n=e.shapeFactory,r=e.shape;if(!!r){this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.setShapeInfo(r,t);var o=this.getOffscreenGroup(),s=n.drawShape(this.shapeType,t,o);s.cfg.data=this.data,s.cfg.origin=t,s.cfg.element=this,this.syncShapeStyle(r,s,this.getStates(),this.getAnimateCfg("update"))}},i.prototype.destroy=function(){var t=this,e=t.shapeFactory,n=t.shape;if(n){var r=this.getAnimateCfg("leave");r?ql(n,r,{coordinate:e.coordinate,toAttrs:ct({},n.attr())}):n.remove(!0)}this.states=[],this.shapeFactory=void 0,this.container=void 0,this.shape=void 0,this.animate=void 0,this.geometry=void 0,this.labelShape=[],this.model=void 0,this.data=void 0,this.offscreenGroup=void 0,this.statesStyle=void 0,a.prototype.destroy.call(this)},i.prototype.changeVisible=function(t){a.prototype.changeVisible.call(this,t),t?(this.shape&&this.shape.show(),this.labelShape&&this.labelShape.forEach(function(e){e.show()})):(this.shape&&this.shape.hide(),this.labelShape&&this.labelShape.forEach(function(e){e.hide()}))},i.prototype.setState=function(t,e){var n=this,r=n.states,o=n.shapeFactory,s=n.model,l=n.shape,u=n.shapeType,c=r.indexOf(t);if(e){if(c>-1)return;r.push(t),(t==="active"||t==="selected")&&(l==null||l.toFront())}else{if(c===-1)return;if(r.splice(c,1),t==="active"||t==="selected"){var f=this.geometry,h=f.sortZIndex,d=f.zIndexReversed,v=d?this.geometry.elements.length-this.elementIndex:this.elementIndex;h?l.setZIndex(v):l.set("zIndex",v)}}var g=o.drawShape(u,s,this.getOffscreenGroup());r.length?this.syncShapeStyle(l,g,r,null):this.syncShapeStyle(l,g,["reset"],null),g.remove(!0);var p={state:t,stateStatus:e,element:this,target:this.container};this.container.emit("statechange",p),Fm(this.shape,"statechange",p)},i.prototype.clearStates=function(){var t=this,e=this.states;Nt(e,function(n){t.setState(n,!1)}),this.states=[]},i.prototype.hasState=function(t){return this.states.includes(t)},i.prototype.getStates=function(){return this.states},i.prototype.getData=function(){return this.data},i.prototype.getModel=function(){return this.model},i.prototype.getBBox=function(){var t=this,e=t.shape,n=t.labelShape,r={x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};return e&&(r=e.getCanvasBBox()),n&&n.forEach(function(o){var s=o.getCanvasBBox();r.x=Math.min(s.x,r.x),r.y=Math.min(s.y,r.y),r.minX=Math.min(s.minX,r.minX),r.minY=Math.min(s.minY,r.minY),r.maxX=Math.max(s.maxX,r.maxX),r.maxY=Math.max(s.maxY,r.maxY)}),r.width=r.maxX-r.minX,r.height=r.maxY-r.minY,r},i.prototype.getStatesStyle=function(){if(!this.statesStyle){var t=this,e=t.shapeType,n=t.geometry,r=t.shapeFactory,o=n.stateOption,s=r.defaultShapeType,l=r.theme[e]||r.theme[s];this.statesStyle=_n({},l,o)}return this.statesStyle},i.prototype.getStateStyle=function(t,e){var n=this.getStatesStyle(),r=he(n,[t,"style"],{}),o=r[e]||r;return Rn(o)?o(this):o},i.prototype.getAnimateCfg=function(t){var e=this,n=this.animate;if(n){var r=n[t];return r&&ct(ct({},r),{callback:function(){var o;Rn(r.callback)&&r.callback(),(o=e.geometry)===null||o===void 0||o.emit(nl.AFTER_DRAW_ANIMATE)}})}return null},i.prototype.drawShape=function(t,e){var n;e===void 0&&(e=!1);var r=this,o=r.shapeFactory,s=r.container,l=r.shapeType;if(this.shape=o.drawShape(l,t,s),this.shape){this.setShapeInfo(this.shape,t);var u=this.shape.cfg.name;u?$n(u)&&(this.shape.cfg.name=["element",u]):this.shape.cfg.name=["element",this.shapeFactory.geometryType];var c=e?"enter":"appear",f=this.getAnimateCfg(c);f&&((n=this.geometry)===null||n===void 0||n.emit(nl.BEFORE_DRAW_ANIMATE),ql(this.shape,f,{coordinate:o.coordinate,toAttrs:ct({},this.shape.attr())}))}},i.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},i.prototype.setShapeInfo=function(t,e){var n=this;if(t.cfg.origin=e,t.cfg.element=this,t.isGroup()){var r=t.get("children");r.forEach(function(o){n.setShapeInfo(o,e)})}},i.prototype.syncShapeStyle=function(t,e,n,r,o){var s=this,l;if(n===void 0&&(n=[]),o===void 0&&(o=0),!(!t||!e)){var u=t.get("clipShape"),c=e.get("clipShape");if(this.syncShapeStyle(u,c,n,r),t.isGroup())for(var f=t.get("children"),h=e.get("children"),d=0;d=0?r=e:n<=0?r=n:r=0,r},i.prototype.createAttrOption=function(t,e,n){if(qe(e)||Mr(e))Mr(e)&&ui(Object.keys(e),["values"])?li(this.attributeOption,t,{fields:e.values}):li(this.attributeOption,t,e);else{var r={};or(e)?r.values=[e]:r.fields=wu(e),n&&(Rn(n)?r.callback=n:r.values=n),li(this.attributeOption,t,r)}},i.prototype.initAttributes=function(){var t=this,e=this,n=e.attributes,r=e.attributeOption,o=e.theme,s=e.shapeType;this.groupScales=[];var l={},u=function(h){if(r.hasOwnProperty(h)){var d=r[h];if(!d)return{value:void 0};var v=ct({},d),g=v.callback,p=v.values,m=v.fields,y=m===void 0?[]:m,w=y.map(function(M){var _=t.scales[M];if(!l[M]&&Vl.includes(h)){var D=ay(_,he(t.scaleDefs,M),h,t.type);D==="cat"&&(t.groupScales.push(_),l[M]=!0)}return _});v.scales=w,h!=="position"&&w.length===1&&w[0].type==="identity"?v.values=w[0].values:!g&&!p&&(h==="size"?v.values=o.sizes:h==="shape"?v.values=o.shapes[s]||[]:h==="color"&&(w.length?v.values=w[0].values.length<=10?o.colors10:o.colors20:v.values=o.colors10));var x=Dm(h);n[h]=new x(v)}};for(var c in r){var f=u(c);if(typeof f=="object")return f.value}},i.prototype.processData=function(t){var e,n;this.hasSorted=!1;for(var r=this.getAttribute("position").scales,o=r.filter(function(D){return D.isCategory}),s=this.groupData(t),l=[],u=0,c=s.length;us&&(s=f)}var h=this.scaleDefs,d={};ot.max&&!he(h,[r,"max"])&&(d.max=s),t.change(d)},i.prototype.beforeMapping=function(t){var e=t;if(this.sortable&&this.sort(e),this.generatePoints)for(var n=0,r=e.length;n1)for(var h=0;h0})}function Fy(a,i,t){var e=t.data,n=t.origin,r=t.animateCfg,o=t.coordinate,s=he(r,"update");a.set("data",e),a.set("origin",n),a.set("animateCfg",r),a.set("coordinate",o),a.set("visible",i.get("visible")),(a.getChildren()||[]).forEach(function(l,u){var c=i.getChildByIndex(u);if(!c)a.removeChild(l),l.remove(!0);else{l.set("data",e),l.set("origin",n),l.set("animateCfg",r),l.set("coordinate",o);var f=iy(l,c);s?ql(l,s,{toAttrs:f,coordinate:o}):l.attr(f),c.isGroup()&&Fy(l,c,t)}}),Nt(i.getChildren(),function(l,u){u>=a.getCount()&&(l.destroyed||a.add(l))})}var UC=function(){function a(i){this.shapesMap={};var t=i.layout,e=i.container;this.layout=t,this.container=e}return a.prototype.render=function(i,t,e){return e===void 0&&(e=!1),Fu(this,void 0,void 0,function(){var n,r,o,s,l,u,c,f,h=this;return Nu(this,function(d){switch(d.label){case 0:if(n={},r=this.createOffscreenGroup(),!i.length)return[3,2];try{for(o=rr(i),s=o.next();!s.done;s=o.next())l=s.value,l&&(n[l.id]=this.renderLabel(l,r))}catch(v){c={error:v}}finally{try{s&&!s.done&&(f=o.return)&&f.call(o)}finally{if(c)throw c.error}}return[4,this.doLayout(i,t,n)];case 1:d.sent(),this.renderLabelLine(i,n),this.renderLabelBackground(i,n),this.adjustLabel(i,n),d.label=2;case 2:return u=this.shapesMap,Nt(n,function(v,g){if(v.destroyed)delete n[g];else{if(u[g]){var p=v.get("data"),m=v.get("origin"),y=v.get("coordinate"),w=v.get("animateCfg"),x=u[g];Fy(x,n[g],{data:p,origin:m,animateCfg:w,coordinate:y}),n[g]=x}else{if(h.container.destroyed)return;h.container.add(v);var M=he(v.get("animateCfg"),e?"enter":"appear");M&&ql(v,M,{toAttrs:ct({},v.attr()),coordinate:v.get("coordinate")})}delete u[g]}}),Nt(u,function(v){var g=he(v.get("animateCfg"),"leave");g?ql(v,g,{toAttrs:null,coordinate:v.get("coordinate")}):v.remove(!0)}),this.shapesMap=n,r.destroy(),[2]}})})},a.prototype.clear=function(){this.container.clear(),this.shapesMap={}},a.prototype.destroy=function(){this.container.destroy(),this.shapesMap=null},a.prototype.renderLabel=function(i,t){var e=i.id,n=i.elementId,r=i.data,o=i.mappingData,s=i.coordinate,l=i.animate,u=i.content,c=i.capture,f={id:e,elementId:n,capture:c,data:r,origin:ct(ct({},o),{data:o[ur]}),coordinate:s},h=t.addGroup(ct({name:"label",animateCfg:this.animate===!1||l===null||l===!1?!1:_n({},this.animate,l)},f)),d;if(u.isGroup&&u.isGroup()||u.isShape&&u.isShape()){var v=u.getCanvasBBox(),g=v.width,p=v.height,m=he(i,"textAlign","left"),y=i.x,w=i.y-p/2;m==="center"?y=y-g/2:(m==="right"||m==="end")&&(y=y-g),Uc(u,y,w),d=u,h.add(u)}else{var x=he(i,["style","fill"]);d=h.addShape("text",ct({attrs:ct(ct({x:i.x,y:i.y,textAlign:i.textAlign,textBaseline:he(i,"textBaseline","middle"),text:i.content},i.style),{fill:Ix(x)?i.color:x})},f))}return i.rotate&&By(d,i.rotate),h},a.prototype.doLayout=function(i,t,e){return Fu(this,void 0,void 0,function(){var n,r=this;return Nu(this,function(o){switch(o.label){case 0:return this.layout?(n=ln(this.layout)?this.layout:[this.layout],[4,Promise.all(n.map(function(s){var l=YC(he(s,"type",""));if(!!l){var u=[],c=[];return Nt(e,function(f,h){u.push(f),c.push(t[f.get("elementId")])}),l(i,u,c,r.region,s.cfg)}}))]):[3,2];case 1:o.sent(),o.label=2;case 2:return[2]}})})},a.prototype.renderLabelLine=function(i,t){Nt(i,function(e){var n=he(e,"coordinate");if(!(!e||!n)){var r=n.getCenter(),o=n.getRadius();if(!!e.labelLine){var s=he(e,"labelLine",{}),l=e.id,u=s.path;if(!u){var c=ei(r.x,r.y,o,e.angle);u=[["M",c.x,c.y],["L",e.x,e.y]]}var f=t[l];f.destroyed||f.addShape("path",{capture:!1,attrs:ct({path:u,stroke:e.color?e.color:he(e,["style","fill"],"#000"),fill:null},s.style),id:l,origin:e.mappingData,data:e.data,coordinate:e.coordinate})}}})},a.prototype.renderLabelBackground=function(i,t){Nt(i,function(e){var n=he(e,"coordinate"),r=he(e,"background");if(!(!r||!n)){var o=e.id,s=t[o];if(!s.destroyed){var l=s.getChildren()[0];if(l){var u=Ry(s,e,r.padding),c=u.rotation,f=Ti(u,["rotation"]),h=s.addShape("rect",{attrs:ct(ct({},f),r.style||{}),id:o,origin:e.mappingData,data:e.data,coordinate:e.coordinate});if(h.setZIndex(-1),c){var d=l.getMatrix();h.setMatrix(d)}}}}})},a.prototype.createOffscreenGroup=function(){var i=this.container,t=i.getGroupBase(),e=new t({});return e},a.prototype.adjustLabel=function(i,t){Nt(i,function(e){if(e){var n=e.id,r=t[n];if(!r.destroyed){var o=r.findAll(function(s){return s.get("type")!=="path"});Nt(o,function(s){s&&(e.offsetX&&s.attr("x",s.attr("x")+e.offsetX),e.offsetY&&s.attr("y",s.attr("y")+e.offsetY))})}}})},a}();function vg(a){var i=0;return Nt(a,function(t){i+=t}),i/a.length}var Jd=function(){function a(i){this.geometry=i}return a.prototype.getLabelItems=function(i){var t=this,e=[],n=this.getLabelCfgs(i);return Nt(i,function(r,o){var s=n[o];if(!s||qe(r.x)||qe(r.y)){e.push(null);return}var l=ln(s.content)?s.content:[s.content];s.content=l;var u=l.length;Nt(l,function(c,f){if(qe(c)||c===""){e.push(null);return}var h=ct(ct({},s),t.getLabelPoint(s,r,f));h.textAlign||(h.textAlign=t.getLabelAlign(h,f,u)),h.offset<=0&&(h.labelLine=null),e.push(h)})}),e},a.prototype.render=function(i,t){return t===void 0&&(t=!1),Fu(this,void 0,void 0,function(){var e,n,r;return Nu(this,function(o){switch(o.label){case 0:return e=this.getLabelItems(i),n=this.getLabelsRenderer(),r=this.getGeometryShapes(),[4,n.render(e,r,t)];case 1:return o.sent(),[2]}})})},a.prototype.clear=function(){var i=this.labelsRenderer;i&&i.clear()},a.prototype.destroy=function(){var i=this.labelsRenderer;i&&i.destroy(),this.labelsRenderer=null},a.prototype.getCoordinate=function(){return this.geometry.coordinate},a.prototype.getDefaultLabelCfg=function(i,t){var e=this.geometry,n=e.type,r=e.theme;return n==="polygon"||n==="interval"&&t==="middle"||i<0&&!["line","point","path"].includes(n)?he(r,"innerLabels",{}):he(r,"labels",{})},a.prototype.getThemedLabelCfg=function(i){var t=this.geometry,e=this.getDefaultLabelCfg(),n=t.type,r=t.theme,o;return n==="polygon"||i.offset<0&&!["line","point","path"].includes(n)?o=_n({},e,r.innerLabels,i):o=_n({},e,r.labels,i),o},a.prototype.setLabelPosition=function(i,t,e,n){},a.prototype.getLabelOffset=function(i){var t=this.getCoordinate(),e=this.getOffsetVector(i);return t.isTransposed?e[0]:e[1]},a.prototype.getLabelOffsetPoint=function(i,t,e){var n=i.offset,r=this.getCoordinate(),o=r.isTransposed,s=o?"x":"y",l=o?1:-1,u={x:0,y:0};return t>0||e===1?u[s]=n*l:u[s]=n*l*-1,u},a.prototype.getLabelPoint=function(i,t,e){var n=this.getCoordinate(),r=i.content.length;function o(p,m,y){y===void 0&&(y=!1);var w=p;return ln(w)&&(i.content.length===1?y?w=vg(w):w.length<=2?w=w[p.length-1]:w=vg(w):w=w[m]),w}var s={content:i.content[e],x:0,y:0,start:{x:0,y:0},color:"#fff"},l=ln(t.shape)?t.shape[0]:t.shape,u=l==="funnel"||l==="pyramid";if(this.geometry.type==="polygon"){var c=LS(t.x,t.y);s.x=c[0],s.y=c[1]}else this.geometry.type==="interval"&&!u?(s.x=o(t.x,e,!0),s.y=o(t.y,e)):(s.x=o(t.x,e),s.y=o(t.y,e));if(u){var f=he(t,"nextPoints"),h=he(t,"points");if(f){var d=n.convert(h[1]),v=n.convert(f[1]);s.x=(d.x+v.x)/2,s.y=(d.y+v.y)/2}else if(l==="pyramid"){var d=n.convert(h[1]),v=n.convert(h[2]);s.x=(d.x+v.x)/2,s.y=(d.y+v.y)/2}}i.position&&this.setLabelPosition(s,t,e,i.position);var g=this.getLabelOffsetPoint(i,e,r);return s.start={x:s.x,y:s.y},s.x+=g.x,s.y+=g.y,s.color=t.color,s},a.prototype.getLabelAlign=function(i,t,e){var n="center",r=this.getCoordinate();if(r.isTransposed){var o=i.offset;o<0?n="right":o===0?n="center":n="left",e>1&&t===0&&(n==="right"?n="left":n==="left"&&(n="right"))}return n},a.prototype.getLabelId=function(i){var t=this.geometry,e=t.type,n=t.getXScale(),r=t.getYScale(),o=i[ur],s=t.getElementId(i);return e==="line"||e==="area"?s+=" ".concat(o[n.field]):e==="path"&&(s+=" ".concat(o[n.field],"-").concat(o[r.field])),s},a.prototype.getLabelsRenderer=function(){var i=this.geometry,t=i.labelsContainer,e=i.labelOption,n=i.canvasRegion,r=i.animateOption,o=this.geometry.coordinate,s=this.labelsRenderer;return s||(s=new UC({container:t,layout:he(e,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=s),s.region=n,s.animate=r?Ty("label",o):!1,s},a.prototype.getLabelCfgs=function(i){var t=this,e=this.geometry,n=e.labelOption,r=e.scales,o=e.coordinate,s=n,l=s.fields,u=s.callback,c=s.cfg,f=l.map(function(d){return r[d]}),h=[];return Nt(i,function(d,v){var g=d[ur],p=t.getLabelText(g,f),m;if(u){var y=l.map(function(D){return g[D]});if(m=u.apply(void 0,Er([],Pn(y),!1)),qe(m)){h.push(null);return}}var w=ct(ct({id:t.getLabelId(d),elementId:t.geometry.getElementId(d),data:g,mappingData:d,coordinate:o},c),m);Rn(w.position)&&(w.position=w.position(g,d,v));var x=t.getLabelOffset(w.offset||0),M=t.getDefaultLabelCfg(x,w.position);w=_n({},M,w),w.offset=t.getLabelOffset(w.offset||0);var _=w.content;Rn(_)?w.content=_(g,d,v):Gl(_)&&(w.content=p[0]),h.push(w)}),h},a.prototype.getLabelText=function(i,t){var e=[];return Nt(t,function(n){var r=i[n.field];ln(r)?r=r.map(function(o){return n.getText(o)}):r=n.getText(r),qe(r)||r===""?e.push(null):e.push(r)}),e},a.prototype.getOffsetVector=function(i){i===void 0&&(i=0);var t=this.getCoordinate(),e=0;return or(i)&&(e=i),t.isTransposed?t.applyMatrix(e,0):t.applyMatrix(0,e)},a.prototype.getGeometryShapes=function(){var i=this.geometry,t={};return Nt(i.elementsMap,function(e,n){t[n]=e.shape}),Nt(i.getOffscreenGroup().getChildren(),function(e){var n=i.getElementId(e.get("origin").mappingData);t[n]=e}),t},a}();function gg(a,i,t){if(!a)return t;var e;if(a.callback&&a.callback.length>1){var n=Array(a.callback.length-1).fill("");e=a.mapping.apply(a,Er([i],Pn(n),!1)).join("")}else e=a.mapping(i).join("");return e||t}var Ll={hexagon:function(a,i,t){var e=t/2*Math.sqrt(3);return[["M",a,i-t],["L",a+e,i-t/2],["L",a+e,i+t/2],["L",a,i+t],["L",a-e,i+t/2],["L",a-e,i-t/2],["Z"]]},bowtie:function(a,i,t){var e=t-1.5;return[["M",a-t,i-e],["L",a+t,i+e],["L",a+t,i-e],["L",a-t,i+e],["Z"]]},cross:function(a,i,t){return[["M",a-t,i-t],["L",a+t,i+t],["M",a+t,i-t],["L",a-t,i+t]]},tick:function(a,i,t){return[["M",a-t/2,i-t],["L",a+t/2,i-t],["M",a,i-t],["L",a,i+t],["M",a-t/2,i+t],["L",a+t/2,i+t]]},plus:function(a,i,t){return[["M",a-t,i],["L",a+t,i],["M",a,i-t],["L",a,i+t]]},hyphen:function(a,i,t){return[["M",a-t,i],["L",a+t,i]]},line:function(a,i,t){return[["M",a,i-t],["L",a,i+t]]}},KC=["line","cross","tick","plus","hyphen"];function ZC(a,i){return Rn(i)?i(a):_n({},a,i)}function QC(a,i){var t=a.symbol;if($n(t)&&KC.indexOf(t)!==-1){var e=he(a,"style",{}),n=he(e,"lineWidth",1),r=e.stroke||e.fill||i;a.style=_n({},a.style,{lineWidth:n,stroke:r,fill:null})}}function Ny(a){var i=a.symbol;$n(i)&&Ll[i]&&(a.symbol=Ll[i])}function xh(a){return a.startsWith(hn.LEFT)||a.startsWith(hn.RIGHT)?"vertical":"horizontal"}function JC(a,i,t,e,n){var r=t.getScale(t.type);if(r.isCategory){var o=r.field,s=i.getAttribute("color"),l=i.getAttribute("shape"),u=a.getTheme().defaultColor,c=i.coordinate.isPolar;return r.getTicks().map(function(f,h){var d,v=f.text,g=f.value,p=v,m=r.invert(g),y=a.filterFieldData(o,[(d={},d[o]=m,d)]).length===0;Nt(a.views,function(D){var C;D.filterFieldData(o,[(C={},C[o]=m,C)]).length||(y=!0)});var w=gg(s,m,u),x=gg(l,m,"point"),M=i.getShapeMarker(x,{color:w,isInPolar:c}),_=n;return Rn(_)&&(_=_(p,h,ct({name:p,value:m},_n({},e,M)))),M=_n({},e,M,ja(ct({},_),["style"])),QC(M,w),_&&_.style&&(M.style=ZC(M.style,_.style)),Ny(M),{id:m,name:p,value:m,marker:M,unchecked:y}})}return[]}function qC(a,i,t){return t.map(function(e,n){var r=i;Rn(r)&&(r=r(e.name,n,_n({},a,e)));var o=Rn(e.marker)?e.marker(e.name,n,_n({},a,e)):e.marker,s=_n({},a,r,o);return Ny(s),e.marker=s,e})}function pg(a,i){var t=he(a,["components","legend"],{});return _n({},he(t,["common"],{}),_n({},he(t,[i],{})))}function wh(a){return a?!1:a==null||isNaN(a)}function mg(a){if(ln(a))return wh(a[1].y);var i=a.y;return ln(i)?wh(i[0]):wh(i)}function qd(a,i,t){if(i===void 0&&(i=!1),t===void 0&&(t=!0),!a.length||a.length===1&&!t)return[];if(i){for(var e=[],n=0,r=a.length;n=a&&n<=a+t&&r>=i&&r<=i+e}function nf(a,i){return!(i.minX>a.maxX||i.maxXa.maxY||i.maxY=0&&n<1/2*Math.PI?(s={x:o.minX,y:o.minY},l={x:o.maxX,y:o.maxY}):1/2*Math.PI<=n&&n1&&(t*=Math.sqrt(d),e*=Math.sqrt(d));var v=t*t*(h*h)+e*e*(f*f),g=v?Math.sqrt((t*t*(e*e)-v)/v):1;r===o&&(g*=-1),isNaN(g)&&(g=0);var p=e?g*t*h/e:0,m=t?g*-e*f/t:0,y=(s+u)/2+Math.cos(n)*p-Math.sin(n)*m,w=(l+c)/2+Math.sin(n)*p+Math.cos(n)*m,x=[(f-p)/t,(h-m)/e],M=[(-1*f-p)/t,(-1*h-m)/e],_=xg([1,0],x),D=xg(x,M);return ld(x,M)<=-1&&(D=Math.PI),ld(x,M)>=1&&(D=0),o===0&&D>0&&(D=D-2*Math.PI),o===1&&D<0&&(D=D+2*Math.PI),{cx:y,cy:w,rx:yg(a,[u,c])?0:t,ry:yg(a,[u,c])?0:e,startAngle:_,endAngle:_+D,xRotation:n,arcFlag:r,sweepFlag:o}}var vc=Math.sin,gc=Math.cos,ev=Math.atan2,If=Math.PI;function $y(a,i,t,e,n,r,o){var s=i.stroke,l=i.lineWidth,u=t-n,c=e-r,f=ev(c,u),h=new ov({type:"path",canvas:a.get("canvas"),isArrowShape:!0,attrs:{path:"M"+10*gc(If/6)+","+10*vc(If/6)+" L0,0 L"+10*gc(If/6)+",-"+10*vc(If/6),stroke:s,lineWidth:l}});h.translate(n,r),h.rotateAtPoint(n,r,f),a.set(o?"startArrowShape":"endArrowShape",h)}function Xy(a,i,t,e,n,r,o){var s=i.startArrow,l=i.endArrow,u=i.stroke,c=i.lineWidth,f=o?s:l,h=f.d,d=f.fill,v=f.stroke,g=f.lineWidth,p=Ti(f,["d","fill","stroke","lineWidth"]),m=t-n,y=e-r,w=ev(y,m);h&&(n=n-gc(w)*h,r=r-vc(w)*h);var x=new ov({type:"path",canvas:a.get("canvas"),isArrowShape:!0,attrs:ct(ct({},p),{stroke:v||u,lineWidth:g||c,fill:d})});x.translate(n,r),x.rotateAtPoint(n,r,w),a.set(o?"startArrowShape":"endArrowShape",x)}function Al(a,i,t,e,n){var r=ev(e-i,t-a);return{dx:gc(r)*n,dy:vc(r)*n}}function nv(a,i,t,e,n,r){typeof i.startArrow=="object"?Xy(a,i,t,e,n,r,!0):i.startArrow?$y(a,i,t,e,n,r,!0):a.set("startArrowShape",null)}function rv(a,i,t,e,n,r){typeof i.endArrow=="object"?Xy(a,i,t,e,n,r,!1):i.endArrow?$y(a,i,t,e,n,r,!1):a.set("startArrowShape",null)}var wg={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"};function lu(a,i){var t=i.attr();for(var e in t){var n=t[e],r=wg[e]?wg[e]:e;r==="matrix"&&n?a.transform(n[0],n[1],n[3],n[4],n[6],n[7]):r==="lineDash"&&a.setLineDash?ln(n)&&a.setLineDash(n):(r==="strokeStyle"||r==="fillStyle"?n=pP(a,i,n):r==="globalAlpha"&&(n=n*a.globalAlpha),a[r]=n)}}function ud(a,i,t){for(var e=0;eM?x:M,j=x>M?1:x/M,V=x>M?M/x:1;i.translate(y,w),i.rotate(C),i.scale(j,V),i.arc(0,0,k,_,D,1-F),i.scale(1/j,1/V),i.rotate(-C),i.translate(-y,-w)}break}case"Z":i.closePath();break}if(h==="Z")s=l;else{var st=f.length;s=[f[st-2],f[st-1]]}}}}function Zy(a,i){var t=a.get("canvas");t&&(i==="remove"&&(a._cacheCanvasBBox=a.get("cacheCanvasBBox")),a.get("hasChanged")||(a.set("hasChanged",!0),a.cfg.parent&&a.cfg.parent.get("hasChanged")||(t.refreshElement(a,i,t),t.get("autoDraw")&&t.draw())))}function wP(a){var i;if(a.destroyed)i=a._cacheCanvasBBox;else{var t=a.get("cacheCanvasBBox"),e=t&&!!(t.width&&t.height),n=a.getCanvasBBox(),r=n&&!!(n.width&&n.height);e&&r?i=uP(t,n):e?i=t:r&&(i=n)}return i}function EP(a){if(!a.length)return null;var i=[],t=[],e=[],n=[];return Nt(a,function(r){var o=wP(r);o&&(i.push(o.minX),t.push(o.minY),e.push(o.maxX),n.push(o.maxY))}),{minX:Ra(i),minY:Ra(t),maxX:ua(e),maxY:ua(n)}}function MP(a,i){return!a||!i||!nf(a,i)?null:{minX:Math.max(a.minX,i.minX),minY:Math.max(a.minY,i.minY),maxX:Math.min(a.maxX,i.maxX),maxY:Math.min(a.maxY,i.maxY)}}var av=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.onCanvasChange=function(t){Zy(this,t)},i.prototype.getShapeBase=function(){return pc},i.prototype.getGroupBase=function(){return i},i.prototype._applyClip=function(t,e){e&&(t.save(),lu(t,e),e.createPath(t),t.restore(),t.clip(),e._afterDraw())},i.prototype.cacheCanvasBBox=function(){var t=this.cfg.children,e=[],n=[];Nt(t,function(h){var d=h.cfg.cacheCanvasBBox;d&&h.cfg.isInView&&(e.push(d.minX,d.maxX),n.push(d.minY,d.maxY))});var r=null;if(e.length){var o=Ra(e),s=ua(e),l=Ra(n),u=ua(n);r={minX:o,minY:l,x:o,y:l,maxX:s,maxY:u,width:s-o,height:u-l};var c=this.cfg.canvas;if(c){var f=c.getViewRange();this.set("isInView",nf(r,f))}}else this.set("isInView",!1);this.set("cacheCanvasBBox",r)},i.prototype.draw=function(t,e){var n=this.cfg.children,r=e?this.cfg.refresh:!0;n.length&&r&&(t.save(),lu(t,this),this._applyClip(t,this.getClip()),ud(t,n,e),t.restore(),this.cacheCanvasBBox()),this.cfg.refresh=null,this.set("hasChanged",!1)},i.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("hasChanged",!1)},i}(Cc),bP=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultAttrs=function(){var t=a.prototype.getDefaultAttrs.call(this);return ct(ct({},t),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},i.prototype.getShapeBase=function(){return pc},i.prototype.getGroupBase=function(){return av},i.prototype.onCanvasChange=function(t){Zy(this,t)},i.prototype.calculateBBox=function(){var t=this.get("type"),e=this.getHitLineWidth(),n=Tc(t),r=n(this),o=e/2,s=r.x-o,l=r.y-o,u=r.x+r.width+o,c=r.y+r.height+o;return{x:s,minX:s,y:l,minY:l,width:r.width+e,height:r.height+e,maxX:u,maxY:c}},i.prototype.isFill=function(){return!!this.attrs.fill||this.isClipShape()},i.prototype.isStroke=function(){return!!this.attrs.stroke},i.prototype._applyClip=function(t,e){e&&(t.save(),lu(t,e),e.createPath(t),t.restore(),t.clip(),e._afterDraw())},i.prototype.draw=function(t,e){var n=this.cfg.clipShape;if(e){if(this.cfg.refresh===!1){this.set("hasChanged",!1);return}var r=this.getCanvasBBox();if(!nf(e,r)){this.set("hasChanged",!1),this.cfg.isInView&&this._afterDraw();return}}t.save(),lu(t,this),this._applyClip(t,n),this.drawPath(t),t.restore(),this._afterDraw()},i.prototype.getCanvasViewBox=function(){var t=this.cfg.canvas;return t?t.getViewRange():null},i.prototype.cacheCanvasBBox=function(){var t=this.getCanvasViewBox();if(t){var e=this.getCanvasBBox(),n=nf(e,t);this.set("isInView",n),n?this.set("cacheCanvasBBox",e):this.set("cacheCanvasBBox",null)}},i.prototype._afterDraw=function(){this.cacheCanvasBBox(),this.set("hasChanged",!1),this.set("refresh",null)},i.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("isInView",null),this.set("hasChanged",!1)},i.prototype.drawPath=function(t){this.createPath(t),this.strokeAndFill(t),this.afterDrawPath(t)},i.prototype.fill=function(t){t.fill()},i.prototype.stroke=function(t){t.stroke()},i.prototype.strokeAndFill=function(t){var e=this.attrs,n=e.lineWidth,r=e.opacity,o=e.strokeOpacity,s=e.fillOpacity;this.isFill()&&(!qe(s)&&s!==1?(t.globalAlpha=s,this.fill(t),t.globalAlpha=r):this.fill(t)),this.isStroke()&&n>0&&(!qe(o)&&o!==1&&(t.globalAlpha=o),this.stroke(t)),this.afterDrawPath(t)},i.prototype.createPath=function(t){},i.prototype.afterDrawPath=function(t){},i.prototype.isInShape=function(t,e){var n=this.isStroke(),r=this.isFill(),o=this.getHitLineWidth();return this.isInStrokeOrPath(t,e,n,r,o)},i.prototype.isInStrokeOrPath=function(t,e,n,r,o){return!1},i.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t.lineWidth+t.lineAppendWidth},i}(Pc);const Go=bP;var _P=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultAttrs=function(){var t=a.prototype.getDefaultAttrs.call(this);return ct(ct({},t),{x:0,y:0,r:0})},i.prototype.isInStrokeOrPath=function(t,e,n,r,o){var s=this.attr(),l=s.x,u=s.y,c=s.r,f=o/2,h=Wy(l,u,t,e);return r&&n?h<=c+f:r?h<=c:n?h>=c-f&&h<=c+f:!1},i.prototype.createPath=function(t){var e=this.attr(),n=e.x,r=e.y,o=e.r;t.beginPath(),t.arc(n,r,o,0,Math.PI*2,!1),t.closePath()},i}(Go);const SP=_P;function jf(a,i,t,e){return a/(t*t)+i/(e*e)}var CP=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultAttrs=function(){var t=a.prototype.getDefaultAttrs.call(this);return ct(ct({},t),{x:0,y:0,rx:0,ry:0})},i.prototype.isInStrokeOrPath=function(t,e,n,r,o){var s=this.attr(),l=o/2,u=s.x,c=s.y,f=s.rx,h=s.ry,d=(t-u)*(t-u),v=(e-c)*(e-c);return r&&n?jf(d,v,f+l,h+l)<=1:r?jf(d,v,f,h)<=1:n?jf(d,v,f-l,h-l)>=1&&jf(d,v,f+l,h+l)<=1:!1},i.prototype.createPath=function(t){var e=this.attr(),n=e.x,r=e.y,o=e.rx,s=e.ry;if(t.beginPath(),t.ellipse)t.ellipse(n,r,o,s,0,0,Math.PI*2,!1);else{var l=o>s?o:s,u=o>s?1:o/s,c=o>s?s/o:1;t.save(),t.translate(n,r),t.scale(u,c),t.arc(0,0,l,0,Math.PI*2),t.restore(),t.closePath()}},i}(Go);const PP=CP;function Eg(a){return a instanceof HTMLElement&&$n(a.nodeName)&&a.nodeName.toUpperCase()==="CANVAS"}var TP=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultAttrs=function(){var t=a.prototype.getDefaultAttrs.call(this);return ct(ct({},t),{x:0,y:0,width:0,height:0})},i.prototype.initAttrs=function(t){this._setImage(t.img)},i.prototype.isStroke=function(){return!1},i.prototype.isOnlyHitBox=function(){return!0},i.prototype._afterLoading=function(){if(this.get("toDraw")===!0){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},i.prototype._setImage=function(t){var e=this,n=this.attrs;if($n(t)){var r=new Image;r.onload=function(){if(e.destroyed)return!1;e.attr("img",r),e.set("loading",!1),e._afterLoading();var o=e.get("callback");o&&o.call(e)},r.crossOrigin="Anonymous",r.src=t,this.set("loading",!0)}else t instanceof Image?(n.width||(n.width=t.width),n.height||(n.height=t.height)):Eg(t)&&(n.width||(n.width=Number(t.getAttribute("width"))),n.height||(n.height,Number(t.getAttribute("height"))))},i.prototype.onAttrChange=function(t,e,n){a.prototype.onAttrChange.call(this,t,e,n),t==="img"&&this._setImage(e)},i.prototype.createPath=function(t){if(this.get("loading")){this.set("toDraw",!0),this.set("context",t);return}var e=this.attr(),n=e.x,r=e.y,o=e.width,s=e.height,l=e.sx,u=e.sy,c=e.swidth,f=e.sheight,h=e.img;(h instanceof Image||Eg(h))&&(!qe(l)&&!qe(u)&&!qe(c)&&!qe(f)?t.drawImage(h,l,u,c,f,n,r,o,s):t.drawImage(h,n,r,o,s))},i}(Go);const AP=TP;function tl(a,i,t,e,n,r,o){var s=Math.min(a,t),l=Math.max(a,t),u=Math.min(i,e),c=Math.max(i,e),f=n/2;return r>=s-f&&r<=l+f&&o>=u-f&&o<=c+f?Oi.pointToLine(a,i,t,e,r,o)<=n/2:!1}var OP=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultAttrs=function(){var t=a.prototype.getDefaultAttrs.call(this);return ct(ct({},t),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},i.prototype.initAttrs=function(t){this.setArrow()},i.prototype.onAttrChange=function(t,e,n){a.prototype.onAttrChange.call(this,t,e,n),this.setArrow()},i.prototype.setArrow=function(){var t=this.attr(),e=t.x1,n=t.y1,r=t.x2,o=t.y2,s=t.startArrow,l=t.endArrow;s&&nv(this,t,r,o,e,n),l&&rv(this,t,e,n,r,o)},i.prototype.isInStrokeOrPath=function(t,e,n,r,o){if(!n||!o)return!1;var s=this.attr(),l=s.x1,u=s.y1,c=s.x2,f=s.y2;return tl(l,u,c,f,o,t,e)},i.prototype.createPath=function(t){var e=this.attr(),n=e.x1,r=e.y1,o=e.x2,s=e.y2,l=e.startArrow,u=e.endArrow,c={dx:0,dy:0},f={dx:0,dy:0};l&&l.d&&(c=Al(n,r,o,s,e.startArrow.d)),u&&u.d&&(f=Al(n,r,o,s,e.endArrow.d)),t.beginPath(),t.moveTo(n+c.dx,r+c.dy),t.lineTo(o-f.dx,s-f.dy)},i.prototype.afterDrawPath=function(t){var e=this.get("startArrowShape"),n=this.get("endArrowShape");e&&e.draw(t),n&&n.draw(t)},i.prototype.getTotalLength=function(){var t=this.attr(),e=t.x1,n=t.y1,r=t.x2,o=t.y2;return Oi.length(e,n,r,o)},i.prototype.getPoint=function(t){var e=this.attr(),n=e.x1,r=e.y1,o=e.x2,s=e.y2;return Oi.pointAt(n,r,o,s,t)},i}(Go);const IP=OP;var jP={circle:function(a,i,t){return[["M",a-t,i],["A",t,t,0,1,0,a+t,i],["A",t,t,0,1,0,a-t,i]]},square:function(a,i,t){return[["M",a-t,i-t],["L",a+t,i-t],["L",a+t,i+t],["L",a-t,i+t],["Z"]]},diamond:function(a,i,t){return[["M",a-t,i],["L",a,i-t],["L",a+t,i],["L",a,i+t],["Z"]]},triangle:function(a,i,t){var e=t*Math.sin(.3333333333333333*Math.PI);return[["M",a-t,i+e],["L",a,i-e],["L",a+t,i+e],["Z"]]},"triangle-down":function(a,i,t){var e=t*Math.sin(.3333333333333333*Math.PI);return[["M",a-t,i-e],["L",a+t,i-e],["L",a,i+e],["Z"]]}},LP=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.initAttrs=function(t){this._resetParamsCache()},i.prototype._resetParamsCache=function(){this.set("paramsCache",{})},i.prototype.onAttrChange=function(t,e,n){a.prototype.onAttrChange.call(this,t,e,n),["symbol","x","y","r","radius"].indexOf(t)!==-1&&this._resetParamsCache()},i.prototype.isOnlyHitBox=function(){return!0},i.prototype._getR=function(t){return qe(t.r)?t.radius:t.r},i.prototype._getPath=function(){var t=this.attr(),e=t.x,n=t.y,r=t.symbol||"circle",o=this._getR(t),s,l;if(Rn(r))s=r,l=s(e,n,o),l=um(l);else{if(s=i.Symbols[r],!s)return console.warn(r+" marker is not supported."),null;l=s(e,n,o)}return l},i.prototype.createPath=function(t){var e=this._getPath(),n=this.get("paramsCache");Ky(this,t,{path:e},n)},i.Symbols=jP,i}(Go);const DP=LP;function Qy(a,i,t){var e=Oc();return a.createPath(e),e.isPointInPath(i,t)}var BP=1e-6;function Eh(a){return Math.abs(a)0!=Eh(s[1]-t)>0&&Eh(i-(t-o[1])*(o[0]-s[0])/(o[1]-s[1])-o[0])<0&&(e=!e)}return e}function Pu(a,i,t,e,n,r,o,s){var l=(Math.atan2(s-i,o-a)+Math.PI*2)%(Math.PI*2);if(ln)return!1;var u={x:a+t*Math.cos(l),y:i+t*Math.sin(l)};return Wy(u.x,u.y,o,s)<=r/2}var FP=ti;function NP(a){for(var i=!1,t=a.length,e=0;ew?y:w,F=y>w?1:y/w,k=y>w?w/y:1,j=FP(null,[["t",-p,-m],["r",-_],["s",1/F,1/k]]);Hu(D,D,j),r=Pu(0,0,C,x,M,i,D[0],D[1]);break}if(r)break}}return r}function zP(a){for(var i=a.length,t=[],e=[],n=[],r=0;r0&&e.push(n),{polygons:t,polylines:e}}const Lf=ct({hasArc:NP,extractPolygons:zP,isPointInStroke:kP},Ed);function Mg(a,i,t){for(var e=!1,n=0;n=c[0]&&t<=c[1]&&(n=(t-c[0])/(c[1]-c[0]),r=f)});var s=o[r];if(qe(s)||qe(r))return null;var l=s.length,u=o[r+1];return Au.pointAt(s[l-2],s[l-1],u[1],u[2],u[3],u[4],u[5],u[6],n)},i.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",Lf.pathToCurve(t))},i.prototype._setTcache=function(){var t=0,e=0,n=[],r,o,s,l,u=this.get("curve");if(!!u){if(Nt(u,function(c,f){s=u[f+1],l=c.length,s&&(t+=Au.length(c[l-2],c[l-1],s[1],s[2],s[3],s[4],s[5],s[6])||0)}),this.set("totalLength",t),t===0){this.set("tCache",[]);return}Nt(u,function(c,f){s=u[f+1],l=c.length,s&&(r=[],r[0]=e/t,o=Au.length(c[l-2],c[l-1],s[1],s[2],s[3],s[4],s[5],s[6]),e+=o||0,r[1]=e/t,n.push(r))}),this.set("tCache",n)}},i.prototype.getStartTangent=function(){var t=this.getSegments(),e;if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,o=t[1].startTangent;e=[],o?(e.push([n[0]-o[0],n[1]-o[1]]),e.push([n[0],n[1]])):(e.push([r[0],r[1]]),e.push([n[0],n[1]]))}return e},i.prototype.getEndTangent=function(){var t=this.getSegments(),e=t.length,n;if(e>1){var r=t[e-2].currentPoint,o=t[e-1].currentPoint,s=t[e-1].endTangent;n=[],s?(n.push([o[0]-s[0],o[1]-s[1]]),n.push([o[0],o[1]])):(n.push([r[0],r[1]]),n.push([o[0],o[1]]))}return n},i}(Go);const ov=YP;function qy(a,i,t,e,n){var r=a.length;if(r<2)return!1;for(var o=0;o=s[0]&&t<=s[1]&&(r=(t-s[0])/(s[1]-s[0]),o=l)}),Oi.pointAt(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r)},i.prototype._setTcache=function(){var t=this.attr().points;if(!(!t||t.length===0)){var e=this.getTotalLength();if(!(e<=0)){var n=0,r=[],o,s;Nt(t,function(l,u){t[u+1]&&(o=[],o[0]=n/e,s=Oi.length(l[0],l[1],t[u+1][0],t[u+1][1]),n+=s,o[1]=n/e,r.push(o))}),this.set("tCache",r)}}},i.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},i.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},i}(Go);const VP=GP;function $P(a,i,t,e,n,r,o){var s=n/2;return Ml(a-s,i-s,t,n,r,o)||Ml(a+t-s,i-s,n,e,r,o)||Ml(a+s,i+e-s,t,n,r,o)||Ml(a-s,i+s,n,e,r,o)}function XP(a,i,t,e,n,r,o,s){return tl(a+n,i,a+t-n,i,r,o,s)||tl(a+t,i+n,a+t,i+e-n,r,o,s)||tl(a+t-n,i+e,a+n,i+e,r,o,s)||tl(a,i+e-n,a,i+n,r,o,s)||Pu(a+t-n,i+n,n,1.5*Math.PI,2*Math.PI,r,o,s)||Pu(a+t-n,i+e-n,n,0,.5*Math.PI,r,o,s)||Pu(a+n,i+e-n,n,.5*Math.PI,Math.PI,r,o,s)||Pu(a+n,i+n,n,Math.PI,1.5*Math.PI,r,o,s)}var UP=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultAttrs=function(){var t=a.prototype.getDefaultAttrs.call(this);return ct(ct({},t),{x:0,y:0,width:0,height:0,radius:0})},i.prototype.isInStrokeOrPath=function(t,e,n,r,o){var s=this.attr(),l=s.x,u=s.y,c=s.width,f=s.height,h=s.radius;if(h){var v=!1;return n&&(v=XP(l,u,c,f,h,o,t,e)),!v&&r&&(v=Qy(this,t,e)),v}else{var d=o/2;if(r&&n)return Ml(l-d,u-d,c+d,f+d,t,e);if(r)return Ml(l,u,c,f,t,e);if(n)return $P(l,u,c,f,o,t,e)}},i.prototype.createPath=function(t){var e=this.attr(),n=e.x,r=e.y,o=e.width,s=e.height,l=e.radius;if(t.beginPath(),l===0)t.rect(n,r,o,s);else{var u=mP(l),c=u[0],f=u[1],h=u[2],d=u[3];t.moveTo(n+c,r),t.lineTo(n+o-f,r),f!==0&&t.arc(n+o-f,r+f,f,-Math.PI/2,0),t.lineTo(n+o,r+s-h),h!==0&&t.arc(n+o-h,r+s-h,h,0,Math.PI/2),t.lineTo(n+d,r+s),d!==0&&t.arc(n+d,r+s-d,d,Math.PI/2,Math.PI),t.lineTo(n,r+c),c!==0&&t.arc(n+c,r+c,c,Math.PI,Math.PI*1.5),t.closePath()}},i}(Go);const KP=UP;var ZP=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultAttrs=function(){var t=a.prototype.getDefaultAttrs.call(this);return ct(ct({},t),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},i.prototype.isOnlyHitBox=function(){return!0},i.prototype.initAttrs=function(t){this._assembleFont(),t.text&&this._setText(t.text)},i.prototype._assembleFont=function(){var t=this.attrs;t.font=jc(t)},i.prototype._setText=function(t){var e=null;$n(t)&&t.indexOf(` `)!==-1&&(e=t.split(` `)),this.set("textArr",e)},i.prototype.onAttrChange=function(t,e,n){a.prototype.onAttrChange.call(this,t,e,n),t.startsWith("font")&&this._assembleFont(),t==="text"&&this._setText(e)},i.prototype._getSpaceingY=function(){var t=this.attrs,e=t.lineHeight,n=t.fontSize*1;return e?e-n:n*.14},i.prototype._drawTextArr=function(t,e,n){var r=this.attrs,o=r.textBaseline,s=r.x,l=r.y,u=r.fontSize*1,c=this._getSpaceingY(),f=Ic(r.text,r.fontSize,r.lineHeight),h;Nt(e,function(d,v){h=l+v*(c+u)-f+u,o==="middle"&&(h+=f-u-(f-u)/2),o==="top"&&(h+=f-u),qe(d)||(n?t.fillText(d,s,h):t.strokeText(d,s,h))})},i.prototype._drawText=function(t,e){var n=this.attr(),r=n.x,o=n.y,s=this.get("textArr");if(s)this._drawTextArr(t,s,e);else{var l=n.text;qe(l)||(e?t.fillText(l,r,o):t.strokeText(l,r,o))}},i.prototype.strokeAndFill=function(t){var e=this.attrs,n=e.lineWidth,r=e.opacity,o=e.strokeOpacity,s=e.fillOpacity;this.isStroke()&&n>0&&(!qe(o)&&o!==1&&(t.globalAlpha=r),this.stroke(t)),this.isFill()&&(!qe(s)&&s!==1?(t.globalAlpha=s,this.fill(t),t.globalAlpha=r):this.fill(t)),this.afterDrawPath(t)},i.prototype.fill=function(t){this._drawText(t,!0)},i.prototype.stroke=function(t){this._drawText(t,!1)},i}(Go);const QP=ZP;function JP(a,i){if(i){var t=bc(i);return Cs(t,a)}return a}function t1(a,i,t){var e=a.getTotalMatrix();if(e){var n=JP([i,t,1],e),r=n[0],o=n[1];return[r,o]}return[i,t]}function bg(a,i,t){if(a.isCanvas&&a.isCanvas())return!0;if(!Yu(a)||a.cfg.isInView===!1)return!1;if(a.cfg.clipShape){var e=t1(a,i,t),n=e[0],r=e[1];if(a.isClipped(n,r))return!1}var o=a.cfg.cacheCanvasBBox||a.getCanvasBBox();return i>=o.minX&&i<=o.maxX&&t>=o.minY&&t<=o.maxY}function e1(a,i,t){if(!bg(a,i,t))return null;for(var e=null,n=a.getChildren(),r=n.length,o=r-1;o>=0;o--){var s=n[o];if(s.isGroup())e=e1(s,i,t);else if(bg(s,i,t)){var l=s,u=t1(s,i,t),c=u[0],f=u[1];l.isInShape(c,f)&&(e=s)}if(e)break}return e}var qP=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getDefaultCfg=function(){var t=a.prototype.getDefaultCfg.call(this);return t.renderer="canvas",t.autoDraw=!0,t.localRefresh=!0,t.refreshElements=[],t.clipView=!0,t.quickHit=!1,t},i.prototype.onCanvasChange=function(t){(t==="attr"||t==="sort"||t==="changeSize")&&(this.set("refreshElements",[this]),this.draw())},i.prototype.getShapeBase=function(){return pc},i.prototype.getGroupBase=function(){return av},i.prototype.getPixelRatio=function(){var t=this.get("pixelRatio")||lP();return t>=1?Math.ceil(t):1},i.prototype.getViewRange=function(){return{minX:0,minY:0,maxX:this.cfg.width,maxY:this.cfg.height}},i.prototype.createDom=function(){var t=document.createElement("canvas"),e=t.getContext("2d");return this.set("context",e),t},i.prototype.setDOMSize=function(t,e){a.prototype.setDOMSize.call(this,t,e);var n=this.get("context"),r=this.get("el"),o=this.getPixelRatio();r.width=o*t,r.height=o*e,o>1&&n.scale(o,o)},i.prototype.clear=function(){a.prototype.clear.call(this),this._clearFrame();var t=this.get("context"),e=this.get("el");t.clearRect(0,0,e.width,e.height)},i.prototype.getShape=function(t,e){var n;return this.get("quickHit")?n=e1(this,t,e):n=a.prototype.getShape.call(this,t,e,null),n},i.prototype._getRefreshRegion=function(){var t=this.get("refreshElements"),e=this.getViewRange(),n;if(t.length&&t[0]===this)n=e;else if(n=EP(t),n){n.minX=Math.floor(n.minX),n.minY=Math.floor(n.minY),n.maxX=Math.ceil(n.maxX),n.maxY=Math.ceil(n.maxY),n.maxY+=1;var r=this.get("clipView");r&&(n=MP(n,e))}return n},i.prototype.refreshElement=function(t){var e=this.get("refreshElements");e.push(t)},i.prototype._clearFrame=function(){var t=this.get("drawFrame");t&&(Bx(t),this.set("drawFrame",null),this.set("refreshElements",[]))},i.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},i.prototype._drawAll=function(){var t=this.get("context"),e=this.get("el"),n=this.getChildren();t.clearRect(0,0,e.width,e.height),lu(t,this),ud(t,n),this.set("refreshElements",[])},i.prototype._drawRegion=function(){var t=this.get("context"),e=this.get("refreshElements"),n=this.getChildren(),r=this._getRefreshRegion();r?(t.clearRect(r.minX,r.minY,r.maxX-r.minX,r.maxY-r.minY),t.save(),t.beginPath(),t.rect(r.minX,r.minY,r.maxX-r.minX,r.maxY-r.minY),t.clip(),lu(t,this),yP(this,n,r),ud(t,n,r),t.restore()):e.length&&Uy(e),Nt(e,function(o){o.get("hasChanged")&&o.set("hasChanged",!1)}),this.set("refreshElements",[])},i.prototype._startDraw=function(){var t=this,e=this.get("drawFrame");e||(e=Dx(function(){t.get("localRefresh")?t._drawRegion():t._drawAll(),t.set("drawFrame",null)}),this.set("drawFrame",e))},i.prototype.skipDraw=function(){},i.prototype.removeDom=function(){var t=this.get("el");t.width=0,t.height=0,t.parentNode.removeChild(t)},i}(Sc),tT="0.5.12";const eT=Object.freeze(Object.defineProperty({__proto__:null,Shape:pc,version:tT,Canvas:qP,Group:av,getArcParams:dc,Event:sf,Base:Ec,AbstractCanvas:Sc,AbstractGroup:Cc,AbstractShape:Pc,getBBoxMethod:Tc,registerBBox:Po,getTextHeight:Ic,assembleFont:jc,isAllowCapture:Yu,multiplyVec2:Cs,invert:bc,getOffScreenContext:Oc,registerEasing:Jp,PathUtil:Ed},Symbol.toStringTag,{value:"Module"}));var cd={rect:"path",circle:"circle",line:"line",path:"path",marker:"path",text:"text",polyline:"polyline",polygon:"polygon",image:"image",ellipse:"ellipse",dom:"foreignObject"},er={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",x:"x",y:"y",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",x1:"x1",x2:"x2",y1:"y1",y2:"y2",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",startArrow:"marker-start",endArrow:"marker-end",path:"d",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio"};function So(a){return document.createElementNS("http://www.w3.org/2000/svg",a)}function n1(a){var i=cd[a.type],t=a.getParent();if(!i)throw new Error("the type "+a.type+" is not supported by svg");var e=So(i);if(a.get("id")&&(e.id=a.get("id")),a.set("el",e),a.set("attrs",{}),t){var n=t.get("el");n||(n=t.createDom(),t.set("el",n)),n.appendChild(e)}return e}function r1(a,i){var t=a.get("el"),e=Yx(t.children).sort(i),n=document.createDocumentFragment();e.forEach(function(r){n.appendChild(r)}),t.appendChild(n)}function nT(a,i){var t=a.parentNode,e=Array.from(t.childNodes).filter(function(s){return s.nodeType===1&&s.nodeName.toLowerCase()!=="defs"}),n=e[i],r=e.indexOf(a);if(n){if(r>i)t.insertBefore(a,n);else if(r0&&(e?"stroke"in n?this._setColor(t,"stroke",s):"strokeStyle"in n&&this._setColor(t,"stroke",l):this._setColor(t,"stroke",s||l),c&&h.setAttribute(er.strokeOpacity,c),f&&h.setAttribute(er.lineWidth,f))},i.prototype._setColor=function(t,e,n){var r=this.get("el");if(!n){r.setAttribute(er[e],"none");return}if(n=n.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(n)){var o=t.find("gradient",n);o||(o=t.addGradient(n)),r.setAttribute(er[e],"url(#"+o+")")}else if(/^[p,P]{1}[\s]*\(/.test(n)){var o=t.find("pattern",n);o||(o=t.addPattern(n)),r.setAttribute(er[e],"url(#"+o+")")}else r.setAttribute(er[e],n)},i.prototype.shadow=function(t,e){var n=this.attr(),r=e||n,o=r.shadowOffsetX,s=r.shadowOffsetY,l=r.shadowBlur,u=r.shadowColor;(o||s||l||u)&&rT(this,t)},i.prototype.transform=function(t){var e=this.attr(),n=(t||e).matrix;n&&vf(this)},i.prototype.isInShape=function(t,e){return this.isPointInPath(t,e)},i.prototype.isPointInPath=function(t,e){var n=this.get("el"),r=this.get("canvas"),o=r.get("el").getBoundingClientRect(),s=t+o.left,l=e+o.top,u=document.elementFromPoint(s,l);return!!(u&&u.isEqualNode(n))},i.prototype.getHitLineWidth=function(){var t=this.attrs,e=t.lineWidth,n=t.lineAppendWidth;return this.isStroke()?e+n:0},i}(Pc);const To=iT;var aT=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="circle",t.canFill=!0,t.canStroke=!0,t}return i.prototype.getDefaultAttrs=function(){var t=a.prototype.getDefaultAttrs.call(this);return ct(ct({},t),{x:0,y:0,r:0})},i.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");Nt(e||n,function(o,s){s==="x"||s==="y"?r.setAttribute("c"+s,o):er[s]&&r.setAttribute(er[s],o)})},i}(To);const oT=aT;var sT=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="dom",t.canFill=!1,t.canStroke=!1,t}return i.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");if(Nt(e||n,function(u,c){er[c]&&r.setAttribute(er[c],u)}),typeof n.html=="function"){var o=n.html.call(this,n);if(o instanceof Element||o instanceof HTMLDocument){for(var s=r.childNodes,l=s.length-1;l>=0;l--)r.removeChild(s[l]);r.appendChild(o)}else r.innerHTML=o}else r.innerHTML=n.html},i}(To);const lT=sT;var uT=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="ellipse",t.canFill=!0,t.canStroke=!0,t}return i.prototype.getDefaultAttrs=function(){var t=a.prototype.getDefaultAttrs.call(this);return ct(ct({},t),{x:0,y:0,rx:0,ry:0})},i.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");Nt(e||n,function(o,s){s==="x"||s==="y"?r.setAttribute("c"+s,o):er[s]&&r.setAttribute(er[s],o)})},i}(To);const fT=uT;var cT=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="image",t.canFill=!1,t.canStroke=!1,t}return i.prototype.getDefaultAttrs=function(){var t=a.prototype.getDefaultAttrs.call(this);return ct(ct({},t),{x:0,y:0,width:0,height:0})},i.prototype.createPath=function(t,e){var n=this,r=this.attr(),o=this.get("el");Nt(e||r,function(s,l){l==="img"?n._setImage(r.img):er[l]&&o.setAttribute(er[l],s)})},i.prototype.setAttr=function(t,e){this.attrs[t]=e,t==="img"&&this._setImage(e)},i.prototype._setImage=function(t){var e=this.attr(),n=this.get("el");if($n(t))n.setAttribute("href",t);else if(t instanceof window.Image)e.width||(n.setAttribute("width",t.width),this.attr("width",t.width)),e.height||(n.setAttribute("height",t.height),this.attr("height",t.height)),n.setAttribute("href",t.src);else if(t instanceof HTMLElement&&$n(t.nodeName)&&t.nodeName.toUpperCase()==="CANVAS")n.setAttribute("href",t.toDataURL());else if(t instanceof ImageData){var r=document.createElement("canvas");r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.getContext("2d").putImageData(t,0,0),e.width||(n.setAttribute("width",""+t.width),this.attr("width",t.width)),e.height||(n.setAttribute("height",""+t.height),this.attr("height",t.height)),n.setAttribute("href",r.toDataURL())}},i}(To);const hT=cT;var dT=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="line",t.canFill=!1,t.canStroke=!0,t}return i.prototype.getDefaultAttrs=function(){var t=a.prototype.getDefaultAttrs.call(this);return ct(ct({},t),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},i.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");Nt(e||n,function(o,s){if(s==="startArrow"||s==="endArrow")if(o){var l=Mr(o)?t.addArrow(n,er[s]):t.getDefaultArrow(n,er[s]);r.setAttribute(er[s],"url(#"+l+")")}else r.removeAttribute(er[s]);else er[s]&&r.setAttribute(er[s],o)})},i.prototype.getTotalLength=function(){var t=this.attr(),e=t.x1,n=t.y1,r=t.x2,o=t.y2;return Oi.length(e,n,r,o)},i.prototype.getPoint=function(t){var e=this.attr(),n=e.x1,r=e.y1,o=e.x2,s=e.y2;return Oi.pointAt(n,r,o,s,t)},i}(To);const vT=dT;var Df={circle:function(a,i,t){return[["M",a,i],["m",-t,0],["a",t,t,0,1,0,t*2,0],["a",t,t,0,1,0,-t*2,0]]},square:function(a,i,t){return[["M",a-t,i-t],["L",a+t,i-t],["L",a+t,i+t],["L",a-t,i+t],["Z"]]},diamond:function(a,i,t){return[["M",a-t,i],["L",a,i-t],["L",a+t,i],["L",a,i+t],["Z"]]},triangle:function(a,i,t){var e=t*Math.sin(.3333333333333333*Math.PI);return[["M",a-t,i+e],["L",a,i-e],["L",a+t,i+e],["z"]]},triangleDown:function(a,i,t){var e=t*Math.sin(.3333333333333333*Math.PI);return[["M",a-t,i-e],["L",a+t,i-e],["L",a,i+e],["Z"]]}};const _g={get:function(a){return Df[a]},register:function(a,i){Df[a]=i},remove:function(a){delete Df[a]},getAll:function(){return Df}};var gT=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="marker",t.canFill=!0,t.canStroke=!0,t}return i.prototype.createPath=function(t){var e=this.get("el");e.setAttribute("d",this._assembleMarker())},i.prototype._assembleMarker=function(){var t=this._getPath();return ln(t)?t.map(function(e){return e.join(" ")}).join(""):t},i.prototype._getPath=function(){var t=this.attr(),e=t.x,n=t.y,r=t.r||t.radius,o=t.symbol||"circle",s;return Rn(o)?s=o:s=_g.get(o),s?s(e,n,r):(console.warn(s+" symbol is not exist."),null)},i.symbolsFactory=_g,i}(To);const pT=gT;var mT=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="path",t.canFill=!0,t.canStroke=!0,t}return i.prototype.getDefaultAttrs=function(){var t=a.prototype.getDefaultAttrs.call(this);return ct(ct({},t),{startArrow:!1,endArrow:!1})},i.prototype.createPath=function(t,e){var n=this,r=this.attr(),o=this.get("el");Nt(e||r,function(s,l){if(l==="path"&&ln(s))o.setAttribute("d",n._formatPath(s));else if(l==="startArrow"||l==="endArrow")if(s){var u=Mr(s)?t.addArrow(r,er[l]):t.getDefaultArrow(r,er[l]);o.setAttribute(er[l],"url(#"+u+")")}else o.removeAttribute(er[l]);else er[l]&&o.setAttribute(er[l],s)})},i.prototype._formatPath=function(t){var e=t.map(function(n){return n.join(" ")}).join("");return~e.indexOf("NaN")?"":e},i.prototype.getTotalLength=function(){var t=this.get("el");return t?t.getTotalLength():null},i.prototype.getPoint=function(t){var e=this.get("el"),n=this.getTotalLength();if(n===0)return null;var r=e?e.getPointAtLength(t*n):null;return r?{x:r.x,y:r.y}:null},i}(To);const yT=mT;var xT=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="polygon",t.canFill=!0,t.canStroke=!0,t}return i.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");Nt(e||n,function(o,s){s==="points"&&ln(o)&&o.length>=2?r.setAttribute("points",o.map(function(l){return l[0]+","+l[1]}).join(" ")):er[s]&&r.setAttribute(er[s],o)})},i}(To);const wT=xT;var ET=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="polyline",t.canFill=!0,t.canStroke=!0,t}return i.prototype.getDefaultAttrs=function(){var t=a.prototype.getDefaultAttrs.call(this);return ct(ct({},t),{startArrow:!1,endArrow:!1})},i.prototype.onAttrChange=function(t,e,n){a.prototype.onAttrChange.call(this,t,e,n),["points"].indexOf(t)!==-1&&this._resetCache()},i.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},i.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");Nt(e||n,function(o,s){s==="points"&&ln(o)&&o.length>=2?r.setAttribute("points",o.map(function(l){return l[0]+","+l[1]}).join(" ")):er[s]&&r.setAttribute(er[s],o)})},i.prototype.getTotalLength=function(){var t=this.attr().points,e=this.get("totalLength");return qe(e)?(this.set("totalLength",sm.length(t)),this.get("totalLength")):e},i.prototype.getPoint=function(t){var e=this.attr().points,n=this.get("tCache");n||(this._setTcache(),n=this.get("tCache"));var r,o;return Nt(n,function(s,l){t>=s[0]&&t<=s[1]&&(r=(t-s[0])/(s[1]-s[0]),o=l)}),Oi.pointAt(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r)},i.prototype._setTcache=function(){var t=this.attr().points;if(!(!t||t.length===0)){var e=this.getTotalLength();if(!(e<=0)){var n=0,r=[],o,s;Nt(t,function(l,u){t[u+1]&&(o=[],o[0]=n/e,s=Oi.length(l[0],l[1],t[u+1][0],t[u+1][1]),n+=s,o[1]=n/e,r.push(o))}),this.set("tCache",r)}}},i.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},i.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},i}(To);const MT=ET;function bT(a){var i=0,t=0,e=0,n=0;return ln(a)?a.length===1?i=t=e=n=a[0]:a.length===2?(i=e=a[0],t=n=a[1]):a.length===3?(i=a[0],t=n=a[1],e=a[2]):(i=a[0],t=a[1],e=a[2],n=a[3]):i=t=e=n=a,{r1:i,r2:t,r3:e,r4:n}}var _T=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="rect",t.canFill=!0,t.canStroke=!0,t}return i.prototype.getDefaultAttrs=function(){var t=a.prototype.getDefaultAttrs.call(this);return ct(ct({},t),{x:0,y:0,width:0,height:0,radius:0})},i.prototype.createPath=function(t,e){var n=this,r=this.attr(),o=this.get("el"),s=!1,l=["x","y","width","height","radius"];Nt(e||r,function(u,c){l.indexOf(c)!==-1&&!s?(o.setAttribute("d",n._assembleRect(r)),s=!0):l.indexOf(c)===-1&&er[c]&&o.setAttribute(er[c],u)})},i.prototype._assembleRect=function(t){var e=t.x,n=t.y,r=t.width,o=t.height,s=t.radius;if(!s)return"M "+e+","+n+" l "+r+",0 l 0,"+o+" l"+-r+" 0 z";var l=bT(s);ln(s)?s.length===1?l.r1=l.r2=l.r3=l.r4=s[0]:s.length===2?(l.r1=l.r3=s[0],l.r2=l.r4=s[1]):s.length===3?(l.r1=s[0],l.r2=l.r4=s[1],l.r3=s[2]):(l.r1=s[0],l.r2=s[1],l.r3=s[2],l.r4=s[3]):l.r1=l.r2=l.r3=l.r4=s;var u=[["M "+(e+l.r1)+","+n],["l "+(r-l.r1-l.r2)+",0"],["a "+l.r2+","+l.r2+",0,0,1,"+l.r2+","+l.r2],["l 0,"+(o-l.r2-l.r3)],["a "+l.r3+","+l.r3+",0,0,1,"+-l.r3+","+l.r3],["l "+(l.r3+l.r4-r)+",0"],["a "+l.r4+","+l.r4+",0,0,1,"+-l.r4+","+-l.r4],["l 0,"+(l.r4+l.r1-o)],["a "+l.r1+","+l.r1+",0,0,1,"+l.r1+","+-l.r1],["z"]];return u.join(" ")},i}(To);const ST=_T;var Sg=.3,CT={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},PT={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},TT={left:"left",start:"left",center:"middle",right:"end",end:"end"},AT=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="text",t.canFill=!0,t.canStroke=!0,t}return i.prototype.getDefaultAttrs=function(){var t=a.prototype.getDefaultAttrs.call(this);return ct(ct({},t),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},i.prototype.createPath=function(t,e){var n=this,r=this.attr(),o=this.get("el");this._setFont(),Nt(e||r,function(s,l){l==="text"?n._setText(""+s):l==="matrix"&&s?vf(n):er[l]&&o.setAttribute(er[l],s)}),o.setAttribute("paint-order","stroke"),o.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},i.prototype._setFont=function(){var t=this.get("el"),e=this.attr(),n=e.textBaseline,r=e.textAlign,o=Ip();o&&o.name==="firefox"?t.setAttribute("dominant-baseline",PT[n]||"alphabetic"):t.setAttribute("alignment-baseline",CT[n]||"baseline"),t.setAttribute("text-anchor",TT[r]||"left")},i.prototype._setText=function(t){var e=this.get("el"),n=this.attr(),r=n.x,o=n.textBaseline,s=o===void 0?"bottom":o;if(!t)e.innerHTML="";else if(~t.indexOf(` `)){var l=t.split(` `),u=l.length-1,c="";Nt(l,function(f,h){h===0?s==="alphabetic"?c+=''+f+"":s==="top"?c+=''+f+"":s==="middle"?c+=''+f+"":s==="bottom"?c+=''+f+"":s==="hanging"&&(c+=''+f+""):c+=''+f+""}),e.innerHTML=c}else e.innerHTML=t},i}(To);const OT=AT;var IT=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,jT=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,LT=/[\d.]+:(#[^\s]+|[^)]+\))/gi;function o1(a){var i=a.match(LT);if(!i)return"";var t="";return i.sort(function(e,n){return e=e.split(":"),n=n.split(":"),Number(e[0])-Number(n[0])}),Nt(i,function(e){e=e.split(":"),t+=''}),t}function DT(a,i){var t=IT.exec(a),e=gd(pd(parseFloat(t[1])),Math.PI*2),n=t[2],r,o;e>=0&&e<.5*Math.PI?(r={x:0,y:0},o={x:1,y:1}):.5*Math.PI<=e&&e`;t.innerHTML=e},a}(),Cg=function(){function a(i,t){this.cfg={};var e=So("marker"),n=fl("marker_");e.setAttribute("id",n);var r=So("path");r.setAttribute("stroke",i.stroke||"none"),r.setAttribute("fill",i.fill||"none"),e.appendChild(r),e.setAttribute("overflow","visible"),e.setAttribute("orient","auto-start-reverse"),this.el=e,this.child=r,this.id=n;var o=i[t==="marker-start"?"startArrow":"endArrow"];return this.stroke=i.stroke||"#000",o===!0?this._setDefaultPath(t,r):(this.cfg=o,this._setMarker(i.lineWidth,r)),this}return a.prototype.match=function(){return!1},a.prototype._setDefaultPath=function(i,t){var e=this.el;t.setAttribute("d","M0,0 L"+10*Math.cos(Math.PI/6)+",5 L0,10"),e.setAttribute("refX",""+10*Math.cos(Math.PI/6)),e.setAttribute("refY",""+5)},a.prototype._setMarker=function(i,t){var e=this.el,n=this.cfg.path,r=this.cfg.d;ln(n)&&(n=n.map(function(o){return o.join(" ")}).join("")),t.setAttribute("d",n),e.appendChild(t),r&&e.setAttribute("refX",""+r/i)},a.prototype.update=function(i){var t=this.child;t.attr?t.attr("fill",i):t.setAttribute("fill",i)},a}(),zT=function(){function a(i){this.type="clip",this.cfg={};var t=So("clipPath");this.el=t,this.id=fl("clip_"),t.id=this.id;var e=i.cfg.el;return t.appendChild(e),this.cfg=i,this}return a.prototype.match=function(){return!1},a.prototype.remove=function(){var i=this.el;i.parentNode.removeChild(i)},a}(),YT=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,HT=function(){function a(i){this.cfg={};var t=So("pattern");t.setAttribute("patternUnits","userSpaceOnUse");var e=So("image");t.appendChild(e);var n=fl("pattern_");t.id=n,this.el=t,this.id=n,this.cfg=i;var r=YT.exec(i),o=r[2];e.setAttribute("href",o);var s=new Image;o.match(/^data:/i)||(s.crossOrigin="Anonymous"),s.src=o;function l(){t.setAttribute("width",""+s.width),t.setAttribute("height",""+s.height)}return s.complete?l():(s.onload=l,s.src=s.src),this}return a.prototype.match=function(i,t){return this.cfg===t},a}(),WT=function(){function a(i){var t=So("defs"),e=fl("defs_");t.id=e,i.appendChild(t),this.children=[],this.defaultArrow={},this.el=t,this.canvas=i}return a.prototype.find=function(i,t){for(var e=this.children,n=null,r=0;r0&&(d[0][0]="L")),r=r.concat(d)}),r.push(["Z"])}return r}function Kc(a,i,t,e,n){for(var r=Vr(a,i,!i,"lineWidth"),o=a.connectNulls,s=a.isInCircle,l=a.points,u=a.showSinglePoint,c=qd(l,o,u),f=[],h=0,d=c.length;ho&&(o=l),l=e[0]}));var p=this.scales[v];try{for(var m=rr(t),y=m.next();!y.done;y=m.next()){var w=y.value,x=this.getDrawCfg(w),M=x.x,_=x.y,D=p.scale(w[ur][v]);this.drawGrayScaleBlurredCircle(M-u.x,_-c.y,n+r,D,g)}}catch(k){o={error:k}}finally{try{y&&!y.done&&(s=m.return)&&s.call(m)}finally{if(o)throw o.error}}var C=g.getImageData(0,0,f,h);this.clearShadowCanvasCtx(),this.colorize(C),g.putImageData(C,0,0);var F=this.getImageShape();F.attr("x",u.x),F.attr("y",c.y),F.attr("width",f),F.attr("height",h),F.attr("img",g.canvas),F.set("origin",this.getShapeInfo(t))},i.prototype.getDefaultSize=function(){var t=this.getAttribute("position"),e=this.coordinate;return Math.min(e.getWidth()/(t.scales[0].ticks.length*4),e.getHeight()/(t.scales[1].ticks.length*4))},i.prototype.clearShadowCanvasCtx=function(){var t=this.getShadowCanvasCtx();t.clearRect(0,0,t.canvas.width,t.canvas.height)},i.prototype.getShadowCanvasCtx=function(){var t=this.shadowCanvas;return t||(t=document.createElement("canvas"),this.shadowCanvas=t),t.width=this.coordinate.getWidth(),t.height=this.coordinate.getHeight(),t.getContext("2d")},i.prototype.getGrayScaleBlurredCanvas=function(){return this.grayScaleBlurredCanvas||(this.grayScaleBlurredCanvas=document.createElement("canvas")),this.grayScaleBlurredCanvas},i.prototype.drawGrayScaleBlurredCircle=function(t,e,n,r,o){var s=this.getGrayScaleBlurredCanvas();o.globalAlpha=r,o.drawImage(s,t-n,e-n)},i.prototype.colorize=function(t){for(var e=this.getAttribute("color"),n=t.data,r=this.paletteCache,o=3;oi&&(t=t?i/(1+e/t):0,e=i-t),n+r>i&&(n=n?i/(1+r/n):0,r=i-n),[t||0,e||0,n||0,r||0]}function u1(a,i,t){var e=[];if(t.isRect){var n=t.isTransposed?{x:t.start.x,y:i[0].y}:{x:i[0].x,y:t.start.y},r=t.isTransposed?{x:t.end.x,y:i[2].y}:{x:i[3].x,y:t.end.y},o=he(a,["background","style","radius"]);if(o){var s=t.isTransposed?Math.abs(i[0].y-i[2].y):i[2].x-i[1].x,l=t.isTransposed?t.getWidth():t.getHeight(),u=Pn(l1(o,Math.min(s,l)),4),c=u[0],f=u[1],h=u[2],d=u[3],v=t.isTransposed&&t.isReflect("y"),g=v?0:1,p=function(_){return v?-_:_};e.push(["M",n.x,r.y+p(c)]),c!==0&&e.push(["A",c,c,0,0,g,n.x+c,r.y]),e.push(["L",r.x-f,r.y]),f!==0&&e.push(["A",f,f,0,0,g,r.x,r.y+p(f)]),e.push(["L",r.x,n.y-p(h)]),h!==0&&e.push(["A",h,h,0,0,g,r.x-h,n.y]),e.push(["L",n.x+d,n.y]),d!==0&&e.push(["A",d,d,0,0,g,n.x,n.y-p(d)])}else e.push(["M",n.x,n.y]),e.push(["L",r.x,n.y]),e.push(["L",r.x,r.y]),e.push(["L",n.x,r.y]),e.push(["L",n.x,n.y]);e.push(["z"])}if(t.isPolar){var m=t.getCenter(),y=uc(a,t),w=y.startAngle,x=y.endAngle;if(t.type!=="theta"&&!t.isTransposed)e=Tl(m.x,m.y,t.getRadius(),w,x);else{var M=function(C){return Math.pow(C,2)},c=Math.sqrt(M(m.x-i[0].x)+M(m.y-i[0].y)),f=Math.sqrt(M(m.x-i[2].x)+M(m.y-i[2].y));e=Tl(m.x,m.y,c,t.startAngle,t.endAngle,f)}}return e}function QT(a,i,t){var e=t.getWidth(),n=t.getHeight(),r=t.type==="rect",o=[],s=(a[2].x-a[1].x)/2,l=t.isTransposed?s*n/e:s*e/n;return i==="round"?(r?(o.push(["M",a[0].x,a[0].y+l]),o.push(["L",a[1].x,a[1].y-l]),o.push(["A",s,s,0,0,1,a[2].x,a[2].y-l]),o.push(["L",a[3].x,a[3].y+l]),o.push(["A",s,s,0,0,1,a[0].x,a[0].y+l])):(o.push(["M",a[0].x,a[0].y]),o.push(["L",a[1].x,a[1].y]),o.push(["A",s,s,0,0,1,a[2].x,a[2].y]),o.push(["L",a[3].x,a[3].y]),o.push(["A",s,s,0,0,1,a[0].x,a[0].y])),o.push(["z"])):o=fv(a),o}function f1(a,i,t){var e=[];return qe(i)?t?e.push(["M",a[0].x,a[0].y],["L",a[1].x,a[1].y],["L",(a[2].x+a[3].x)/2,(a[2].y+a[3].y)/2],["Z"]):e.push(["M",a[0].x,a[0].y],["L",a[1].x,a[1].y],["L",a[2].x,a[2].y],["L",a[3].x,a[3].y],["Z"]):e.push(["M",a[0].x,a[0].y],["L",a[1].x,a[1].y],["L",i[1].x,i[1].y],["L",i[0].x,i[0].y],["Z"]),e}function Eu(a,i){return[i,a]}function JT(a,i,t){var e,n,r,o,s,l,u,c=Pn(Er([],Pn(a),!1),4),f=c[0],h=c[1],d=c[2],v=c[3],g=Pn(typeof t=="number"?Array(4).fill(t):t,4),p=g[0],m=g[1],y=g[2],w=g[3];i.isTransposed&&(e=Pn(Eu(h,v),2),h=e[0],v=e[1]),i.isReflect("y")&&(n=Pn(Eu(f,h),2),f=n[0],h=n[1],r=Pn(Eu(d,v),2),d=r[0],v=r[1]),i.isReflect("x")&&(o=Pn(Eu(f,v),2),f=o[0],v=o[1],s=Pn(Eu(h,d),2),h=s[0],d=s[1]);var x=[],M=function(_){return Math.abs(_)};return l=Pn(l1([p,m,y,w],Math.min(M(v.x-f.x),M(h.y-f.y))).map(function(_){return M(_)}),4),p=l[0],m=l[1],y=l[2],w=l[3],i.isTransposed&&(u=Pn([w,p,m,y],4),p=u[0],m=u[1],y=u[2],w=u[3]),f.yo&&(n=o)}return n}function tA(a,i){if(i){var t=ao(a),e=Os(t,i);return e.length}return a.length}function cv(a){var i=a.theme,t=a.coordinate,e=a.getXScale(),n=e.values,r=a.beforeMappingData,o=n.length,s=hf(a.coordinate),l=a.intervalPadding,u=a.dodgePadding,c=a.maxColumnWidth||i.maxColumnWidth,f=a.minColumnWidth||i.minColumnWidth,h=a.columnWidthRatio||i.columnWidthRatio,d=a.multiplePieWidthRatio||i.multiplePieWidthRatio,v=a.roseWidthRatio||i.roseWidthRatio;if(e.isLinear&&n.length>1){n.sort();var g=qT(n,e);o=(e.max-e.min)/g,n.length>o&&(o=n.length)}var p=e.range,m=1/o,y=1;if(t.isPolar?t.isTransposed&&o>1?y=d:y=v:(e.isLinear&&(m*=p[1]-p[0]),y=h),!qe(l)&&l>=0){var w=l/s;m=(1-(o-1)*w)/o}else m*=y;if(a.getAdjust("dodge")){var x=a.getAdjust("dodge"),M=x.dodgeBy,_=tA(r,M);if(!qe(u)&&u>=0){var D=u/s;m=(m-D*(_-1))/_}else!qe(l)&&l>=0&&(m*=y),m=m/_;m=m>=0?m:0}if(!qe(c)&&c>=0){var C=c/s;m>C&&(m=C)}if(!qe(f)&&f>=0){var F=f/s;m0&&!he(e,[n,"min"])&&t.change({min:0}),o<=0&&!he(e,[n,"max"])&&t.change({max:0}))}},i.prototype.getDrawCfg=function(t){var e=a.prototype.getDrawCfg.call(this,t);return e.background=this.background,e},i}(hl),nA=function(a){je(i,a);function i(t){var e=a.call(this,t)||this;e.type="line";var n=t.sortable,r=n===void 0?!1:n;return e.sortable=r,e}return i}(lv),c1=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"],rA=["cross","tick","plus","hyphen","line"];function hv(a,i,t,e,n){var r,o,s=Vr(i,n,!n,"r"),l=a.parsePoints(i.points),u=l[0];if(i.isStack)u=l[1];else if(l.length>1){var c=t.addGroup();try{for(var f=rr(l),h=f.next();!h.done;h=f.next()){var d=h.value;c.addShape({type:"marker",attrs:ct(ct(ct({},s),{symbol:Ll[e]||e}),d)})}}catch(v){r={error:v}}finally{try{h&&!h.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}return c}return t.addShape({type:"marker",attrs:ct(ct(ct({},s),{symbol:Ll[e]||e}),u)})}cl("point",{defaultShapeType:"hollow-circle",getDefaultPoints:function(a){return tv(a)}});Nt(c1,function(a){gr("point","hollow-".concat(a),{draw:function(i,t){return hv(this,i,t,a,!0)},getMarker:function(i){var t=i.color;return{symbol:Ll[a]||a,style:{r:4.5,stroke:t,fill:null}}}})});var iA=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="point",t.shapeType="point",t.generatePoints=!0,t}return i.prototype.getDrawCfg=function(t){var e=a.prototype.getDrawCfg.call(this,t);return ct(ct({},e),{isStack:!!this.getAdjust("stack")})},i}(hl);function aA(a){for(var i=a[0],t=1,e=[["M",i.x,i.y]];t2?"weight":"normal",r;if(a.isInCircle){var o={x:0,y:1};return n==="normal"?r=fA(e[0],e[1],o):(t.fill=t.stroke,r=cA(e,o)),r=this.parsePath(r),i.addShape("path",{attrs:ct(ct({},t),{path:r})})}else{if(n==="normal")return e=this.parsePoints(e),r=ry((e[1].x+e[0].x)/2,e[0].y,Math.abs(e[1].x-e[0].x)/2,Math.PI,Math.PI*2),i.addShape("path",{attrs:ct(ct({},t),{path:r})});var s=hd(e[1],e[3]),l=hd(e[2],e[0]);return r=[["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],s,["L",e[3].x,e[3].y],["L",e[2].x,e[2].y],l,["Z"]],r=this.parsePath(r),t.fill=t.stroke,i.addShape("path",{attrs:ct(ct({},t),{path:r})})}},getMarker:function(a){return{symbol:"circle",style:{r:4.5,fill:a.color}}}});function hA(a,i){var t=hd(a,i),e=[["M",a.x,a.y]];return e.push(t),e}gr("edge","smooth",{draw:function(a,i){var t=Vr(a,!0,!1,"lineWidth"),e=a.points,n=this.parsePath(hA(e[0],e[1]));return i.addShape("path",{attrs:ct(ct({},t),{path:n})})},getMarker:function(a){return{symbol:"circle",style:{r:4.5,fill:a.color}}}});var Bf=1/3;function dA(a,i){var t=[];t.push({x:a.x,y:a.y*(1-Bf)+i.y*Bf}),t.push({x:i.x,y:a.y*(1-Bf)+i.y*Bf}),t.push(i);var e=[["M",a.x,a.y]];return Nt(t,function(n){e.push(["L",n.x,n.y])}),e}gr("edge","vhv",{draw:function(a,i){var t=Vr(a,!0,!1,"lineWidth"),e=a.points,n=this.parsePath(dA(e[0],e[1]));return i.addShape("path",{attrs:ct(ct({},t),{path:n})})},getMarker:function(a){return{symbol:"circle",style:{r:4.5,fill:a.color}}}});gr("interval","funnel",{getPoints:function(a){return a.size=a.size*2,uv(a)},draw:function(a,i){var t=Vr(a,!1,!0),e=this.parsePath(f1(a.points,a.nextPoints,!1)),n=i.addShape("path",{attrs:ct(ct({},t),{path:e}),name:"interval"});return n},getMarker:function(a){var i=a.color;return{symbol:"square",style:{r:4,fill:i}}}});gr("interval","hollow-rect",{draw:function(a,i){var t=Vr(a,!0,!1),e=i,n=a==null?void 0:a.background;if(n){e=i.addGroup();var r=Yy(a),o=u1(a,this.parsePoints(a.points),this.coordinate);e.addShape("path",{attrs:ct(ct({},r),{path:o}),zIndex:-1,name:Zd})}var s=this.parsePath(fv(a.points)),l=e.addShape("path",{attrs:ct(ct({},t),{path:s}),name:"interval"});return n?e:l},getMarker:function(a){var i=a.color,t=a.isInPolar;return t?{symbol:"circle",style:{r:4.5,stroke:i,fill:null}}:{symbol:"square",style:{r:4,stroke:i,fill:null}}}});function vA(a){var i=a.x,t=a.y,e=a.y0;return ln(t)?t.map(function(n,r){return{x:ln(i)?i[r]:i,y:n}}):[{x:i,y:e},{x:i,y:t}]}gr("interval","line",{getPoints:function(a){return vA(a)},draw:function(a,i){var t=Vr(a,!0,!1,"lineWidth"),e=ja(ct({},t),["fill"]),n=this.parsePath(fv(a.points,!1)),r=i.addShape("path",{attrs:ct(ct({},e),{path:n}),name:"interval"});return r},getMarker:function(a){var i=a.color;return{symbol:function(t,e,n){return[["M",t,e-n],["L",t,e+n]]},style:{r:5,stroke:i}}}});gr("interval","pyramid",{getPoints:function(a){return a.size=a.size*2,uv(a)},draw:function(a,i){var t=Vr(a,!1,!0),e=this.parsePath(f1(a.points,a.nextPoints,!0)),n=i.addShape("path",{attrs:ct(ct({},t),{path:e}),name:"interval"});return n},getMarker:function(a){var i=a.color;return{symbol:"square",style:{r:4,fill:i}}}});function gA(a){var i,t=a.x,e=a.y,n=a.y0,r=a.size,o,s;ln(e)?(i=Pn(e,2),o=i[0],s=i[1]):(o=n,s=e);var l=t+r/2,u=t-r/2;return[{x:t,y:o},{x:t,y:s},{x:u,y:o},{x:l,y:o},{x:u,y:s},{x:l,y:s}]}function pA(a){return[["M",a[0].x,a[0].y],["L",a[1].x,a[1].y],["M",a[2].x,a[2].y],["L",a[3].x,a[3].y],["M",a[4].x,a[4].y],["L",a[5].x,a[5].y]]}gr("interval","tick",{getPoints:function(a){return gA(a)},draw:function(a,i){var t=Vr(a,!0,!1),e=this.parsePath(pA(a.points)),n=i.addShape("path",{attrs:ct(ct({},t),{path:e}),name:"interval"});return n},getMarker:function(a){var i=a.color;return{symbol:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},style:{r:5,stroke:i}}}});var mA=function(a,i,t){var e=a.x,n=a.y,r=i.x,o=i.y,s;switch(t){case"hv":s=[{x:r,y:n}];break;case"vh":s=[{x:e,y:o}];break;case"hvh":var l=(r+e)/2;s=[{x:l,y:n},{x:l,y:o}];break;case"vhv":var u=(n+o)/2;s=[{x:e,y:u},{x:r,y:u}];break}return s};function yA(a,i){var t=[];return Nt(a,function(e,n){var r=a[n+1];if(t.push(e),r){var o=mA(e,r,i);t=t.concat(o)}}),t}function xA(a){return a.map(function(i,t){return t===0?["M",i.x,i.y]:["L",i.x,i.y]})}function wA(a,i){var t=qd(a.points,a.connectNulls,a.showSinglePoint),e=[];return Nt(t,function(n){var r=yA(n,i);e=e.concat(xA(r))}),ct(ct({},Vr(a,!0,!1,"lineWidth")),{path:e})}Nt(["hv","vh","hvh","vhv"],function(a){gr("line",a,{draw:function(i,t){var e=wA(i,a),n=t.addShape({type:"path",attrs:e,name:"line"});return n},getMarker:function(i){return Hy(i,a)}})});Nt(rA,function(a){gr("point",a,{draw:function(i,t){return hv(this,i,t,a,!0)},getMarker:function(i){var t=i.color;return{symbol:Ll[a],style:{r:4.5,stroke:t,fill:null}}}})});gr("point","image",{draw:function(a,i){var t,e,n=Vr(a,!1,!1,"r").r,r=this.parsePoints(a.points),o=r[0];if(a.isStack)o=r[1];else if(r.length>1){var s=i.addGroup();try{for(var l=rr(r),u=l.next();!u.done;u=l.next()){var c=u.value;s.addShape("image",{attrs:{x:c.x-n/2,y:c.y-n,width:n,height:n,img:a.shape[1]}})}}catch(f){t={error:f}}finally{try{u&&!u.done&&(e=l.return)&&e.call(l)}finally{if(t)throw t.error}}return s}return i.addShape("image",{attrs:{x:o.x-n/2,y:o.y-n,width:n,height:n,img:a.shape[1]}})},getMarker:function(a){var i=a.color;return{symbol:"circle",style:{r:4.5,fill:i}}}});Nt(c1,function(a){gr("point",a,{draw:function(i,t){return hv(this,i,t,a,!1)},getMarker:function(i){var t=i.color;return{symbol:Ll[a]||a,style:{r:4.5,fill:t}}}})});function Pg(a){var i=ln(a)?a:[a],t=i[0],e=i[i.length-1],n=i.length>1?i[1]:t,r=i.length>3?i[3]:e,o=i.length>2?i[2]:n;return{min:t,max:e,min1:n,max1:r,median:o}}function Tg(a,i,t){var e=t/2,n;if(ln(i)){var r=Pg(i),o=r.min,s=r.max,l=r.median,u=r.min1,c=r.max1,f=a-e,h=a+e;n=[[f,s],[h,s],[a,s],[a,c],[f,u],[f,c],[h,c],[h,u],[a,u],[a,o],[f,o],[h,o],[f,l],[h,l]]}else{i=qe(i)?.5:i;var d=Pg(a),o=d.min,s=d.max,l=d.median,u=d.min1,c=d.max1,v=i-e,g=i+e;n=[[o,v],[o,g],[o,i],[u,i],[u,v],[u,g],[c,g],[c,v],[c,i],[s,i],[s,v],[s,g],[l,v],[l,g]]}return n.map(function(p){return{x:p[0],y:p[1]}})}function EA(a){return[["M",a[0].x,a[0].y],["L",a[1].x,a[1].y],["M",a[2].x,a[2].y],["L",a[3].x,a[3].y],["M",a[4].x,a[4].y],["L",a[5].x,a[5].y],["L",a[6].x,a[6].y],["L",a[7].x,a[7].y],["L",a[4].x,a[4].y],["Z"],["M",a[8].x,a[8].y],["L",a[9].x,a[9].y],["M",a[10].x,a[10].y],["L",a[11].x,a[11].y],["M",a[12].x,a[12].y],["L",a[13].x,a[13].y]]}gr("schema","box",{getPoints:function(a){var i=a.x,t=a.y,e=a.size;return Tg(i,t,e)},draw:function(a,i){var t=Vr(a,!0,!1),e=this.parsePath(EA(a.points)),n=i.addShape("path",{attrs:ct(ct({},t),{path:e,name:"schema"})});return n},getMarker:function(a){var i=a.color;return{symbol:function(t,e,n){var r=[e-6,e-3,e,e+3,e+6],o=Tg(t,r,n);return[["M",o[0].x+1,o[0].y],["L",o[1].x-1,o[1].y],["M",o[2].x,o[2].y],["L",o[3].x,o[3].y],["M",o[4].x,o[4].y],["L",o[5].x,o[5].y],["L",o[6].x,o[6].y],["L",o[7].x,o[7].y],["L",o[4].x,o[4].y],["Z"],["M",o[8].x,o[8].y],["L",o[9].x,o[9].y],["M",o[10].x+1,o[10].y],["L",o[11].x-1,o[11].y],["M",o[12].x,o[12].y],["L",o[13].x,o[13].y]]},style:{r:6,lineWidth:1,stroke:i}}}});function MA(a){var i=ln(a)?a:[a],t=i.sort(function(e,n){return n-e});return DS(t,4,t[t.length-1])}function Ag(a,i,t){var e=MA(i);return[{x:a,y:e[0]},{x:a,y:e[1]},{x:a-t/2,y:e[2]},{x:a-t/2,y:e[1]},{x:a+t/2,y:e[1]},{x:a+t/2,y:e[2]},{x:a,y:e[2]},{x:a,y:e[3]}]}function bA(a){return[["M",a[0].x,a[0].y],["L",a[1].x,a[1].y],["M",a[2].x,a[2].y],["L",a[3].x,a[3].y],["L",a[4].x,a[4].y],["L",a[5].x,a[5].y],["Z"],["M",a[6].x,a[6].y],["L",a[7].x,a[7].y]]}gr("schema","candle",{getPoints:function(a){var i=a.x,t=a.y,e=a.size;return Ag(i,t,e)},draw:function(a,i){var t=Vr(a,!0,!0),e=this.parsePath(bA(a.points)),n=i.addShape("path",{attrs:ct(ct({},t),{path:e,name:"schema"})});return n},getMarker:function(a){var i=a.color;return{symbol:function(t,e,n){var r=[e+7.5,e+3,e-3,e-7.5],o=Ag(t,r,n);return[["M",o[0].x,o[0].y],["L",o[1].x,o[1].y],["M",o[2].x,o[2].y],["L",o[3].x,o[3].y],["L",o[4].x,o[4].y],["L",o[5].x,o[5].y],["Z"],["M",o[6].x,o[6].y],["L",o[7].x,o[7].y]]},style:{lineWidth:1,stroke:i,fill:i,r:6}}}});function _A(a,i){var t=Math.abs(a[0].x-a[2].x),e=Math.abs(a[0].y-a[2].y),n=Math.min(t,e);i&&(n=Yr(i,0,Math.min(t,e))),n=n/2;var r=(a[0].x+a[2].x)/2,o=(a[0].y+a[2].y)/2;return{x:r-n,y:o-n,width:n*2,height:n*2}}gr("polygon","square",{draw:function(a,i){if(!os(a.points)){var t=Vr(a,!0,!0),e=this.parsePoints(a.points);return i.addShape("rect",{attrs:ct(ct({},t),_A(e,a.size)),name:"polygon"})}},getMarker:function(a){var i=a.color;return{symbol:"square",style:{r:4,fill:i}}}});gr("violin","smooth",{draw:function(a,i){var t=Vr(a,!0,!0),e=this.parsePath(zy(a.points));return i.addShape("path",{attrs:ct(ct({},t),{path:e})})},getMarker:function(a){var i=a.color;return{symbol:"circle",style:{stroke:null,r:4,fill:i}}}});gr("violin","hollow",{draw:function(a,i){var t=Vr(a,!0,!1),e=this.parsePath(ky(a.points));return i.addShape("path",{attrs:ct(ct({},t),{path:e})})},getMarker:function(a){var i=a.color;return{symbol:"circle",style:{r:4,fill:null,stroke:i}}}});gr("violin","hollow-smooth",{draw:function(a,i){var t=Vr(a,!0,!1),e=this.parsePath(zy(a.points));return i.addShape("path",{attrs:ct(ct({},t),{path:e})})},getMarker:function(a){var i=a.color;return{symbol:"circle",style:{r:4,fill:null,stroke:i}}}});var SA=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getLabelValueDir=function(t){var e="y",n=t.points;return n[0][e]<=n[2][e]?1:-1},i.prototype.getLabelOffsetPoint=function(t,e,n,r){var o,s=a.prototype.getLabelOffsetPoint.call(this,t,e,n),l=this.getCoordinate(),u=l.isTransposed,c=u?"x":"y",f=this.getLabelValueDir(t.mappingData);return s=ct(ct({},s),(o={},o[c]=s[c]*f,o)),l.isReflect("x")&&(s=ct(ct({},s),{x:s.x*-1})),l.isReflect("y")&&(s=ct(ct({},s),{y:s.y*-1})),s},i.prototype.getThemedLabelCfg=function(t){var e=this.geometry,n=this.getDefaultLabelCfg(),r=e.theme;return _n({},n,r.labels,t.position==="middle"?{offset:0}:{},t)},i.prototype.setLabelPosition=function(t,e,n,r){var o=this.getCoordinate(),s=o.isTransposed,l=e.points,u=o.convert(l[0]),c=o.convert(l[2]),f=this.getLabelValueDir(e),h,d,v,g,p=ln(e.shape)?e.shape[0]:e.shape;if(p==="funnel"||p==="pyramid"){var m=he(e,"nextPoints"),y=he(e,"points");if(m){var w=o.convert(y[0]),x=o.convert(y[1]),M=o.convert(m[0]),_=o.convert(m[1]);s?(h=Math.min(M.y,w.y),v=Math.max(M.y,w.y),d=(x.x+_.x)/2,g=(w.x+M.x)/2):(h=Math.min((x.y+_.y)/2,(w.y+M.y)/2),v=Math.max((x.y+_.y)/2,(w.y+M.y)/2),d=_.x,g=w.x)}else h=Math.min(c.y,u.y),v=Math.max(c.y,u.y),d=c.x,g=u.x}else h=Math.min(c.y,u.y),v=Math.max(c.y,u.y),d=c.x,g=u.x;switch(r){case"right":t.x=d,t.y=(h+v)/2,t.textAlign=he(t,"textAlign",f>0?"left":"right");break;case"left":t.x=g,t.y=(h+v)/2,t.textAlign=he(t,"textAlign",f>0?"left":"right");break;case"bottom":s&&(t.x=(d+g)/2),t.y=v,t.textAlign=he(t,"textAlign","center"),t.textBaseline=he(t,"textBaseline",f>0?"bottom":"top");break;case"middle":s&&(t.x=(d+g)/2),t.y=(h+v)/2,t.textAlign=he(t,"textAlign","center"),t.textBaseline=he(t,"textBaseline","middle");break;case"top":s&&(t.x=(d+g)/2),t.y=h,t.textAlign=he(t,"textAlign","center"),t.textBaseline=he(t,"textBaseline",f>0?"bottom":"top");break}},i}(Jd),Rf=Math.PI/2,h1=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getLabelOffset=function(t){var e=this.getCoordinate(),n=0;if(or(t))n=t;else if($n(t)&&t.indexOf("%")!==-1){var r=e.getRadius();e.innerRadius>0&&(r=r*(1-e.innerRadius)),n=parseFloat(t)*.01*r}return n},i.prototype.getLabelItems=function(t){var e=a.prototype.getLabelItems.call(this,t),n=this.geometry.getYScale();return fa(e,function(r){if(r&&n){var o=n.scale(he(r.data,n.field));return ct(ct({},r),{percent:o})}return r})},i.prototype.getLabelAlign=function(t){var e=this.getCoordinate(),n;if(t.labelEmit)n=t.angle<=Math.PI/2&&t.angle>=-Math.PI/2?"left":"right";else if(!e.isTransposed)n="center";else{var r=e.getCenter(),o=t.offset;Math.abs(t.x-r.x)<1?n="center":t.angle>Math.PI||t.angle<=0?n=o>0?"left":"right":n=o>0?"right":"left"}return n},i.prototype.getLabelPoint=function(t,e,n){var r=1,o,s=t.content[n];this.isToMiddle(e)?o=this.getMiddlePoint(e.points):(t.content.length===1&&n===0?n=1:n===0&&(r=-1),o=this.getArcPoint(e,n));var l=t.offset*r,u=this.getPointAngle(o),c=t.labelEmit,f=this.getCirclePoint(u,l,o,c);return f.r===0?f.content="":(f.content=s,f.angle=u,f.color=e.color),f.rotate=t.autoRotate?this.getLabelRotate(u,l,c):t.rotate,f.start={x:o.x,y:o.y},f},i.prototype.getArcPoint=function(t,e){return e===void 0&&(e=0),!ln(t.x)&&!ln(t.y)?{x:t.x,y:t.y}:{x:ln(t.x)?t.x[e]:t.x,y:ln(t.y)?t.y[e]:t.y}},i.prototype.getPointAngle=function(t){return iu(this.getCoordinate(),t)},i.prototype.getCirclePoint=function(t,e,n,r){var o=this.getCoordinate(),s=o.getCenter(),l=$c(o,n);if(l===0)return ct(ct({},s),{r:l});var u=t;if(o.isTransposed&&l>e&&!r){var c=Math.asin(e/(2*l));u=t+c*2}else l=l+e;return{x:s.x+l*Math.cos(u),y:s.y+l*Math.sin(u),r:l}},i.prototype.getLabelRotate=function(t,e,n){var r=t+Rf;return n&&(r-=Rf),r&&(r>Rf?r=r-Math.PI:r<-Rf&&(r=r+Math.PI)),r},i.prototype.getMiddlePoint=function(t){var e=this.getCoordinate(),n=t.length,r={x:0,y:0};return Nt(t,function(o){r.x+=o.x,r.y+=o.y}),r.x/=n,r.y/=n,r=e.convert(r),r},i.prototype.isToMiddle=function(t){return t.x.length>2},i}(Jd),CA=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.defaultLayout="distribute",t}return i.prototype.getDefaultLabelCfg=function(t,e){var n=a.prototype.getDefaultLabelCfg.call(this,t,e);return _n({},n,he(this.geometry.theme,"pieLabels",{}))},i.prototype.getLabelOffset=function(t){return a.prototype.getLabelOffset.call(this,t)||0},i.prototype.getLabelRotate=function(t,e,n){var r;return e<0&&(r=t,r>Math.PI/2&&(r=r-Math.PI),r<-Math.PI/2&&(r=r+Math.PI)),r},i.prototype.getLabelAlign=function(t){var e=this.getCoordinate(),n=e.getCenter(),r;return t.angle<=Math.PI/2&&t.x>=n.x?r="left":r="right",t.offset<=0&&(r==="right"?r="left":r="right"),r},i.prototype.getArcPoint=function(t){return t},i.prototype.getPointAngle=function(t){var e=this.getCoordinate(),n={x:ln(t.x)?t.x[0]:t.x,y:t.y[0]},r={x:ln(t.x)?t.x[1]:t.x,y:t.y[1]},o,s=iu(e,n);if(t.points&&t.points[0].y===t.points[1].y)o=s;else{var l=iu(e,r);s>=l&&(l=l+Math.PI*2),o=s+(l-s)/2}return o},i.prototype.getCirclePoint=function(t,e){var n=this.getCoordinate(),r=n.getCenter(),o=n.getRadius()+e;return ct(ct({},ei(r.x,r.y,o,t)),{angle:t,r:o})},i}(h1),Og=4;function PA(a,i,t,e,n,r){var o,s,l=!0,u=e.start,c=e.end,f=Math.min(u.y,c.y),h=Math.abs(u.y-c.y),d,v=0,g=Number.MIN_VALUE,p=i.map(function(D){return D.y>v&&(v=D.y),D.yh&&(h=v-f);l;)for(p.forEach(function(D){var C=(Math.min.apply(g,D.targets)+Math.max.apply(g,D.targets))/2;D.pos=Math.min(Math.max(g,C-D.size/2),h-D.size)}),l=!1,d=p.length;d--;)if(d>0){var m=p[d-1],y=p[d];m.pos+m.size>y.pos&&(m.size+=y.size,m.targets=m.targets.concat(y.targets),m.pos+m.size>h&&(m.pos=h-m.size),p.splice(d,1),l=!0)}d=0,p.forEach(function(D){var C=f+t/2;D.targets.forEach(function(){i[d].y=D.pos+C,C+=t,d++})});var w={};try{for(var x=rr(a),M=x.next();!M.done;M=x.next()){var _=M.value;w[_.get("id")]=_}}catch(D){o={error:D}}finally{try{M&&!M.done&&(s=x.return)&&s.call(x)}finally{if(o)throw o.error}}i.forEach(function(D){var C=D.r*D.r,F=Math.pow(Math.abs(D.y-n.y),2);if(C0){var l=14,u=o+n,c=u*2+l*2,f={start:r.start,end:r.end},h=[[],[]];a.forEach(function(d){!d||(d.textAlign==="right"?h[0].push(d):h[1].push(d))}),h.forEach(function(d,v){var g=c/l;d.length>g&&(d.sort(function(p,m){return m["..percent"]-p["..percent"]}),d.splice(g,d.length-g)),d.sort(function(p,m){return p.y-m.y}),PA(i,d,l,f,s,v)})}Nt(a,function(d){if(d&&d.labelLine){var v=d.offset,g=d.angle,p=ei(s.x,s.y,o,g),m=ei(s.x,s.y,o+v/2,g),y=d.x+he(d,"offsetX",0),w=d.y+he(d,"offsetY",0),x={x:y-Math.cos(g)*Og,y:w-Math.sin(g)*Og};Mr(d.labelLine)||(d.labelLine={}),d.labelLine.path=["M ".concat(p.x),"".concat(p.y," Q").concat(m.x),"".concat(m.y," ").concat(x.x),x.y].join(",")}})}}function d1(a,i,t){var e=a.filter(function(v){return!v.invisible});e.sort(function(v,g){return v.y-g.y});var n=!0,r=t.minY,o=t.maxY,s=Math.abs(r-o),l,u=0,c=Number.MIN_VALUE,f=e.map(function(v){return v.y>u&&(u=v.y),v.ys&&(s=u-r);n;)for(f.forEach(function(v){var g=(Math.min.apply(c,v.targets)+Math.max.apply(c,v.targets))/2;v.pos=Math.min(Math.max(c,g-v.size/2),s-v.size),v.pos=Math.max(0,v.pos)}),n=!1,l=f.length;l--;)if(l>0){var h=f[l-1],d=f[l];h.pos+h.size>d.pos&&(h.size+=d.size,h.targets=h.targets.concat(d.targets),h.pos+h.size>s&&(h.pos=s-h.size),f.splice(l,1),n=!0)}l=0,f.forEach(function(v){var g=r+i/2;v.targets.forEach(function(){e[l].y=v.pos+g,g+=i,l++})})}var Ig=4;function AA(a,i){var t=i.getCenter(),e=i.getRadius();if(a&&a.labelLine){var n=a.angle,r=a.offset,o=ei(t.x,t.y,e,n),s=a.x+he(a,"offsetX",0)*(Math.cos(n)>0?1:-1),l=a.y+he(a,"offsetY",0)*(Math.sin(n)>0?1:-1),u={x:s-Math.cos(n)*Ig,y:l-Math.sin(n)*Ig},c=a.labelLine.smooth,f=[],h=u.x-t.x,d=u.y-t.y,v=Math.atan(d/h);if(h<0&&(v+=Math.PI),c===!1){Mr(a.labelLine)||(a.labelLine={});var g=0;(n<0&&n>-Math.PI/2||n>Math.PI*1.5)&&u.y>o.y&&(g=1),n>=0&&no.y&&(g=1),n>=Math.PI/2&&nu.y&&(g=1),(n<-Math.PI/2||n>=Math.PI&&nu.y&&(g=1);var p=r/2>4?4:Math.max(r/2-1,0),m=ei(t.x,t.y,e+p,n),y=ei(t.x,t.y,e+r/2,v),w=0;f.push("M ".concat(o.x," ").concat(o.y)),f.push("L ".concat(m.x," ").concat(m.y)),f.push("A ".concat(t.x," ").concat(t.y," 0 ").concat(w," ").concat(g," ").concat(y.x," ").concat(y.y)),f.push("L ".concat(u.x," ").concat(u.y))}else{var m=ei(t.x,t.y,e+(r/2>4?4:Math.max(r/2-1,0)),n),x=o.xMath.pow(Math.E,-16)&&f.push.apply(f,["C",u.x+x*4,u.y,2*m.x-o.x,2*m.y-o.y,o.x,o.y]),f.push("L ".concat(o.x," ").concat(o.y))}a.labelLine.path=f.join(" ")}}function OA(a,i,t,e){var n,r,o=Co(a,function(C){return!qe(C)}),s=i[0]&&i[0].get("coordinate");if(!!s){var l=s.getCenter(),u=s.getRadius(),c={};try{for(var f=rr(i),h=f.next();!h.done;h=f.next()){var d=h.value;c[d.get("id")]=d}}catch(C){n={error:C}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}var v=he(o[0],"labelHeight",14),g=he(o[0],"offset",0);if(!(g<=0)){var p="left",m="right",y=ul(o,function(C){return C.xk&&(C.sort(function(j,V){return V.percent-j.percent}),Nt(C,function(j,V){V+1>k&&(c[j.id].set("visible",!1),j.invisible=!0)})),d1(C,v,D)}),Nt(y,function(C,F){Nt(C,function(k){var j=F===m,V=c[k.id],st=V.getChildByIndex(0);if(st){var yt=u+g,Q=k.y-l.y,it=Math.pow(yt,2),Pt=Math.pow(Q,2),ht=it-Pt>0?it-Pt:0,lt=Math.sqrt(ht),U=Math.abs(Math.cos(k.angle)*yt);j?k.x=l.x+Math.max(lt,U):k.x=l.x-Math.max(lt,U)}st&&(st.attr("y",k.y),st.attr("x",k.x)),AA(k,s)})})}}}var vd=4,IA=4,jg=4;function jA(a,i,t){var e=i.getCenter(),n=i.getRadius(),r={x:a.x-(t?jg:-jg),y:a.y},o=ei(e.x,e.y,n+vd,a.angle),s={x:r.x,y:r.y},l={x:o.x,y:o.y},u=ei(e.x,e.y,n,a.angle),c="";if(r.y!==o.y){var f=t?4:-4;s.y=r.y,a.angle<0&&a.angle>=-Math.PI/2&&(s.x=Math.max(o.x,r.x-f),r.y0&&a.angleo.y?l.y=s.y:(l.y=o.y,l.x=Math.max(l.x,s.x-f))),a.angle>Math.PI/2&&(s.x=Math.min(o.x,r.x-f),r.y>o.y?l.y=s.y:(l.y=o.y,l.x=Math.min(l.x,s.x-f))),a.angle<-Math.PI/2&&(s.x=Math.min(o.x,r.x-f),r.ys.x||C.x===s.x&&C.y>s.y,j=qe(C.offsetX)?IA:C.offsetX,V=ei(s.x,s.y,l+vd,C.angle),st=v+j;C.x=s.x+(k?1:-1)*(l+st),C.y=V.y}}});var g=o.start,p=o.end,m="left",y="right",w=ul(a,function(C){return C.xx&&(x=Math.min(F,Math.abs(g.y-p.y)))});var M={minX:g.x,maxX:p.x,minY:s.y-x/2,maxY:s.y+x/2};Nt(w,function(C,F){var k=x/d;C.length>k&&(C.sort(function(j,V){return V.percent-j.percent}),Nt(C,function(j,V){V>k&&(u[j.id].set("visible",!1),j.invisible=!0)})),d1(C,d,M)});var _=M.minY,D=M.maxY;Nt(w,function(C,F){var k=F===y;Nt(C,function(j){var V=he(u,j&&[j.id]);if(!!V){if(j.y<_||j.y>D){V.set("visible",!1);return}var st=V.getChildByIndex(0),yt=st.getCanvasBBox(),Q={x:k?yt.x:yt.maxX,y:yt.y+yt.height/2};Uc(st,j.x-Q.x,j.y-Q.y),j.labelLine&&jA(j,o,k)}})})}}function DA(a,i,t,e){Nt(i,function(n){var r=e.minX,o=e.minY,s=e.maxX,l=e.maxY,u=n.getCanvasBBox(),c=u.minX,f=u.minY,h=u.maxX,d=u.maxY,v=u.x,g=u.y,p=u.width,m=u.height,y=v,w=g;(cs?y=s-p:h>s&&(y=y-(h-s)),f>l?w=l-m:d>l&&(w=w-(d-l)),(y!==v||w!==g)&&Uc(n,y-v,w-g)})}function BA(a,i,t,e){Nt(i,function(n,r){var o=n.getCanvasBBox(),s=t[r].getBBox();(o.minXs.maxX||o.maxY>s.maxY)&&n.remove(!0)})}var RA=100,v1=function(){function a(i){i===void 0&&(i={}),this.bitmap={};var t=i.xGap,e=t===void 0?1:t,n=i.yGap,r=n===void 0?8:n;this.xGap=e,this.yGap=r}return a.prototype.hasGap=function(i){for(var t=!0,e=this.bitmap,n=Math.round(i.minX),r=Math.round(i.maxX),o=Math.round(i.minY),s=Math.round(i.maxY),l=n;l<=r;l+=1){if(!e[l]){e[l]={};continue}if(l===n||l===r){for(var u=o;u<=s;u++)if(e[l][u]){t=!1;break}}else if(e[l][o]||e[l][s]){t=!1;break}}return t},a.prototype.fillGap=function(i){for(var t=this.bitmap,e=Math.round(i.minX),n=Math.round(i.maxX),r=Math.round(i.minY),o=Math.round(i.maxY),s=e;s<=n;s+=1)t[s]||(t[s]={});for(var s=e;s<=n;s+=this.xGap){for(var l=r;l<=o;l+=this.yGap)t[s][l]=!0;t[s][o]=!0}if(this.yGap!==1)for(var s=r;s<=o;s+=1)t[e][s]=!0,t[n][s]=!0;if(this.xGap!==1)for(var s=e;s<=n;s+=1)t[s][r]=!0,t[s][o]=!0},a.prototype.destroy=function(){this.bitmap={}},a}();function FA(a,i,t){t===void 0&&(t=RA);var e=-1,n=a.attr(),r=n.x,o=n.y,s=a.getCanvasBBox(),l=Math.sqrt(s.width*s.width+s.height*s.height),u,c=-e,f=0,h=0,d=function(m){var y=m*.1;return[y*Math.cos(y),y*Math.sin(y)]};if(i.hasGap(s))return i.fillGap(s),!0;for(var v=!1,g=0,p={};Math.min(Math.abs(f),Math.abs(h))4)return[];var i=function(n,r){return[r.x-n.x,r.y-n.y]},t=i(a[0],a[1]),e=i(a[1],a[2]);return[t,e]}function Ff(a,i,t){i===void 0&&(i=0),t===void 0&&(t={x:0,y:0});var e=a.x,n=a.y;return{x:(e-t.x)*Math.cos(-i)+(n-t.y)*Math.sin(-i)+t.x,y:(t.x-e)*Math.sin(-i)+(n-t.y)*Math.cos(-i)+t.y}}function Dg(a){var i=[{x:a.x,y:a.y},{x:a.x+a.width,y:a.y},{x:a.x+a.width,y:a.y+a.height},{x:a.x,y:a.y+a.height}],t=a.rotation;return t?[Ff(i[0],t,i[0]),Ff(i[1],t,i[0]),Ff(i[2],t,i[0]),Ff(i[3],t,i[0])]:i}function Bg(a,i){if(a.length>4)return{min:0,max:0};var t=[];return a.forEach(function(e){t.push(YA([e.x,e.y],i))}),{min:Math.min.apply(Math,Er([],Pn(t),!1)),max:Math.max.apply(Math,Er([],Pn(t),!1))}}function HA(a,i){return a.max>i.min&&a.mina.x+a.width+t||i.x+i.widtha.y+a.height+t||i.y+i.height"u")){var i;try{i=new Blob([a.toString()],{type:"application/javascript"})}catch(t){i=new window.BlobBuilder,i.append(a.toString()),i=i.getBlob()}return new $A(URL.createObjectURL(i))}}var UA=function(a){function i(){function u(w,x){return(w[0]||0)*(x[0]||0)+(w[1]||0)*(x[1]||0)+(w[2]||0)*(x[2]||0)}function c(w){if(w.length>4)return[];var x=function(D,C){return[C.x-D.x,C.y-D.y]},M=x(w[0],w[1]),_=x(w[1],w[2]);return[M,_]}function f(w,x,M){x===void 0&&(x=0),M===void 0&&(M={x:0,y:0});var _=w.x,D=w.y;return{x:(_-M.x)*Math.cos(-x)+(D-M.y)*Math.sin(-x)+M.x,y:(M.x-_)*Math.sin(-x)+(D-M.y)*Math.cos(-x)+M.y}}function h(w){var x=[{x:w.x,y:w.y},{x:w.x+w.width,y:w.y},{x:w.x+w.width,y:w.y+w.height},{x:w.x,y:w.y+w.height}],M=w.rotation;return M?[f(x[0],M,x[0]),f(x[1],M,x[0]),f(x[2],M,x[0]),f(x[3],M,x[0])]:x}function d(w,x){if(w.length>4)return{min:0,max:0};var M=[];return w.forEach(function(_){M.push(u([_.x,_.y],x))}),{min:Math.min.apply(null,M),max:Math.max.apply(null,M)}}function v(w,x){return w.max>x.min&&w.minw.x+w.width+M||x.x+x.widthw.y+w.height+M||x.y+x.height=r.height:o.width>=r.width}function t4(a,i,t){var e=!!a.getAdjust("stack");return e||i.every(function(n,r){var o=t[r];return qA(a,n,o)})}function e4(a,i,t){var e=a.coordinate,n=ca.fromObject(t.getBBox()),r=ll(i);e.isTransposed?r.attr({x:n.minX+n.width/2,textAlign:"center"}):r.attr({y:n.minY+n.height/2,textBaseline:"middle"})}function n4(a,i,t){var e;if(t.length!==0){var n=(e=t[0])===null||e===void 0?void 0:e.get("element"),r=n==null?void 0:n.geometry;if(!(!r||r.type!=="interval")){var o=t4(r,i,t);o&&t.forEach(function(s,l){var u=i[l];e4(r,u,s)})}}}function r4(a){var i=500,t=[],e=Math.max(Math.floor(a.length/i),1);return Nt(a,function(n,r){r%e===0?t.push(n):n.set("visible",!1)}),t}function i4(a,i,t){var e;if(t.length!==0){var n=(e=t[0])===null||e===void 0?void 0:e.get("element"),r=n==null?void 0:n.geometry;if(!(!r||r.type!=="interval")){var o=r4(i),s=Pn(r.getXYFields(),1),l=s[0],u=[],c=[],f=ul(o,function(p){return p.get("data")[l]}),h=hp(fa(o,function(p){return p.get("data")[l]})),d;o.forEach(function(p){p.set("visible",!0)});var v=function(p){p&&(p.length&&c.push(p.pop()),c.push.apply(c,Er([],Pn(p),!1)))};for(Fa(h)>0&&(d=h.shift(),v(f[d])),Fa(h)>0&&(d=h.pop(),v(f[d])),Nt(h.reverse(),function(p){v(f[p])});c.length>0;){var g=c.shift();g.get("visible")&&(XC(g,u)?g.set("visible",!1):u.push(g))}}}}function a4(a,i){var t=a.getXYFields()[1],e=[],n=i.sort(function(r,o){return r.get("data")[t]-r.get("data")[t]});return n.length>0&&e.push(n.shift()),n.length>0&&e.push(n.pop()),e.push.apply(e,Er([],Pn(n),!1)),e}function g1(a,i,t){return a.some(function(e){return t(e,i)})}function o4(a,i,t){t===void 0&&(t=0);var e=Math.max(0,Math.min(a.x+a.width+t,i.x+i.width+t)-Math.max(a.x-t,i.x-t)),n=Math.max(0,Math.min(a.y+a.height+t,i.y+i.height+t)-Math.max(a.y-t,i.y-t));return e*n}function kg(a,i){return g1(a,i,function(t,e){var n=ll(t),r=ll(e);return o4(n.getCanvasBBox(),r.getCanvasBBox(),2)>0})}function s4(a,i,t,e,n){var r,o;if(t.length!==0){var s=(r=t[0])===null||r===void 0?void 0:r.get("element"),l=s==null?void 0:s.geometry;if(!(!l||l.type!=="point")){var u=Pn(l.getXYFields(),2),c=u[0],f=u[1],h=ul(i,function(g){return g.get("data")[c]}),d=[],v=n&&n.offset||((o=a[0])===null||o===void 0?void 0:o.offset)||12;fa(of(h).reverse(),function(g){for(var p=a4(l,h[g]);p.length;){var m=p.shift(),y=ll(m);if(g1(d,m,function(M,_){return M.get("data")[c]===_.get("data")[c]&&M.get("data")[f]===_.get("data")[f]})){y.set("visible",!1);continue}var w=kg(d,m),x=!1;if(w&&(y.attr("y",y.attr("y")+2*v),x=kg(d,m)),x){y.set("visible",!1);continue}d.push(m)}})}}}function l4(a,i){var t=a.getXYFields()[1],e=[],n=i.sort(function(r,o){return r.get("data")[t]-r.get("data")[t]});return n.length>0&&e.push(n.shift()),n.length>0&&e.push(n.pop()),e.push.apply(e,Er([],Pn(n),!1)),e}function p1(a,i,t){return a.some(function(e){return t(e,i)})}function u4(a,i,t){t===void 0&&(t=0);var e=Math.max(0,Math.min(a.x+a.width+t,i.x+i.width+t)-Math.max(a.x-t,i.x-t)),n=Math.max(0,Math.min(a.y+a.height+t,i.y+i.height+t)-Math.max(a.y-t,i.y-t));return e*n}function zg(a,i){return p1(a,i,function(t,e){var n=ll(t),r=ll(e);return u4(n.getCanvasBBox(),r.getCanvasBBox(),2)>0})}function f4(a,i,t,e,n){var r,o;if(t.length!==0){var s=(r=t[0])===null||r===void 0?void 0:r.get("element"),l=s==null?void 0:s.geometry;if(!(!l||["path","line","area"].indexOf(l.type)<0)){var u=Pn(l.getXYFields(),2),c=u[0],f=u[1],h=ul(i,function(g){return g.get("data")[c]}),d=[],v=n&&n.offset||((o=a[0])===null||o===void 0?void 0:o.offset)||12;fa(of(h).reverse(),function(g){for(var p=l4(l,h[g]);p.length;){var m=p.shift(),y=ll(m);if(p1(d,m,function(M,_){return M.get("data")[c]===_.get("data")[c]&&M.get("data")[f]===_.get("data")[f]})){y.set("visible",!1);continue}var w=zg(d,m),x=!1;if(w&&(y.attr("y",y.attr("y")+2*v),x=zg(d,m)),x){y.set("visible",!1);continue}d.push(m)}})}}}var _h;function c4(){return _h||(_h=document.createElement("canvas").getContext("2d")),_h}var Nf=wc(function(a,i){i===void 0&&(i={});var t=i.fontSize,e=i.fontFamily,n=i.fontWeight,r=i.fontStyle,o=i.fontVariant,s=c4();return s.font=[r,o,n,"".concat(t,"px"),e].join(" "),s.measureText($n(a)?a:"").width},function(a,i){return i===void 0&&(i={}),Er([a],Pn(md(i)),!1).join("")}),h4=function(a,i,t){var e=16,n=Nf("...",t),r;$n(a)?r=a:r=xc(a);var o=i,s=[],l,u;if(Nf(a,t)<=i)return a;for(;l=r.substr(0,e),u=Nf(l,t),!(u+n>o&&u>o);)if(s.push(l),o-=u,r=r.substr(e),!r)return s.join("");for(;l=r.substr(0,1),u=Nf(l,t),!(u+n>o);)if(s.push(l),o-=u,r=r.substr(1),!r)return s.join("");return"".concat(s.join(""),"...")};function d4(a,i,t,e,n){if(!(i.length<=0)){var r=(n==null?void 0:n.direction)||["top","right","bottom","left"],o=(n==null?void 0:n.action)||"translate",s=(n==null?void 0:n.margin)||0,l=i[0].get("coordinate");if(!!l){var u=NS(l,s),c=u.minX,f=u.minY,h=u.maxX,d=u.maxY;Nt(i,function(v){var g=v.getCanvasBBox(),p=g.minX,m=g.minY,y=g.maxX,w=g.maxY,x=g.x,M=g.y,_=g.width,D=g.height,C=x,F=M;if(r.indexOf("left")>=0&&(p=0&&(m=0&&(p>h?C=h-_:y>h&&(C=C-(y-h))),r.indexOf("bottom")>=0&&(m>d?F=d-D:w>d&&(F=F-(w-d))),C!==x||F!==M){var k=C-x;if(o==="translate")Uc(v,k,F-M);else if(o==="ellipsis"){var j=v.findAll(function(V){return V.get("type")==="text"});j.forEach(function(V){var st=yd(V.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),yt=V.getCanvasBBox(),Q=h4(V.attr("text"),yt.width-Math.abs(k),st);V.attr("text",Q)})}else v.hide()}})}}}function v4(a,i,t){var e={fillOpacity:qe(a.attr("fillOpacity"))?1:a.attr("fillOpacity"),strokeOpacity:qe(a.attr("strokeOpacity"))?1:a.attr("strokeOpacity"),opacity:qe(a.attr("opacity"))?1:a.attr("opacity")};a.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),a.animate(e,i)}function g4(a,i,t){var e={fillOpacity:0,strokeOpacity:0,opacity:0},n=i.easing,r=i.duration,o=i.delay;a.animate(e,r,n,function(){a.remove(!0)},o)}function p4(a,i,t){var e,n=Pn(i,2),r=n[0],o=n[1];return a.applyToMatrix([r,o,1]),t==="x"?(a.setMatrix(ti(a.getMatrix(),[["t",-r,-o],["s",.01,1],["t",r,o]])),e=ti(a.getMatrix(),[["t",-r,-o],["s",100,1],["t",r,o]])):t==="y"?(a.setMatrix(ti(a.getMatrix(),[["t",-r,-o],["s",1,.01],["t",r,o]])),e=ti(a.getMatrix(),[["t",-r,-o],["s",1,100],["t",r,o]])):t==="xy"&&(a.setMatrix(ti(a.getMatrix(),[["t",-r,-o],["s",.01,.01],["t",r,o]])),e=ti(a.getMatrix(),[["t",-r,-o],["s",100,100],["t",r,o]])),e}function dv(a,i,t,e,n){var r=t.start,o=t.end,s=t.getWidth(),l=t.getHeight(),u,c;n==="y"?(u=r.x+s/2,c=e.yr.x?e.x:r.x,c=r.y+l/2):n==="xy"&&(t.isPolar?(u=t.getCenter().x,c=t.getCenter().y):(u=(r.x+o.x)/2,c=(r.y+o.y)/2));var f=p4(a,[u,c],n);a.animate({matrix:f},i)}function m4(a,i,t){var e=t.coordinate,n=t.minYPoint;dv(a,i,e,n,"x")}function y4(a,i,t){var e=t.coordinate,n=t.minYPoint;dv(a,i,e,n,"y")}function x4(a,i,t){var e=t.coordinate,n=t.minYPoint;dv(a,i,e,n,"xy")}function w4(a,i,t){var e=a.getTotalLength();a.attr("lineDash",[e]),a.animate(function(n){return{lineDashOffset:(1-n)*e}},i)}function E4(a,i,t){var e=t.toAttrs,n=e.x,r=e.y;delete e.x,delete e.y,a.attr(e),a.animate({x:n,y:r},i)}function M4(a,i,t){var e=a.getBBox(),n=a.get("origin").mappingData,r=n.points,o=r[0].y-r[1].y>0?e.maxX:e.minX,s=(e.minY+e.maxY)/2;a.applyToMatrix([o,s,1]);var l=ti(a.getMatrix(),[["t",-o,-s],["s",.01,1],["t",o,s]]);a.setMatrix(l),a.animate({matrix:ti(a.getMatrix(),[["t",-o,-s],["s",100,1],["t",o,s]])},i)}function b4(a,i,t){var e=a.getBBox(),n=a.get("origin").mappingData,r=(e.minX+e.maxX)/2,o=n.points,s=o[0].y-o[1].y<=0?e.maxY:e.minY;a.applyToMatrix([r,s,1]);var l=ti(a.getMatrix(),[["t",-r,-s],["s",1,.01],["t",r,s]]);a.setMatrix(l),a.animate({matrix:ti(a.getMatrix(),[["t",-r,-s],["s",1,100],["t",r,s]])},i)}function Yg(a,i){var t,e=dc(a,i),n=e.startAngle,r=e.endAngle;return!Ai(n,-Math.PI*.5)&&n<-Math.PI*.5&&(n+=Math.PI*2),!Ai(r,-Math.PI*.5)&&r<-Math.PI*.5&&(r+=Math.PI*2),i[5]===0&&(t=Pn([r,n],2),n=t[0],r=t[1]),Ai(n,Math.PI*1.5)&&(n=Math.PI*-.5),Ai(r,Math.PI*-.5)&&!Ai(n,r)&&(r=Math.PI*1.5),{startAngle:n,endAngle:r}}function Hg(a){var i;return a[0]==="M"||a[0]==="L"?i=[a[1],a[2]]:(a[0]==="a"||a[0]==="A"||a[0]==="C")&&(i=[a[a.length-2],a[a.length-1]]),i}function Wg(a){var i,t,e,n=a.filter(function(w){return w[0]==="A"||w[0]==="a"});if(n.length===0)return{startAngle:0,endAngle:0,radius:0,innerRadius:0};var r=n[0],o=n.length>1?n[1]:n[0],s=a.indexOf(r),l=a.indexOf(o),u=Hg(a[s-1]),c=Hg(a[l-1]),f=Yg(u,r),h=f.startAngle,d=f.endAngle,v=Yg(c,o),g=v.startAngle,p=v.endAngle;Ai(h,g)&&Ai(d,p)?(t=h,e=d):(t=Math.min(h,g),e=Math.max(d,p));var m=r[1],y=n[n.length-1][1];return m=0;u--){var c=this.getFacetsByLevel(t,u);try{for(var f=(e=void 0,rr(c)),h=f.next();!h.done;h=f.next()){var d=h.value;this.isLeaf(d)||(d.originColIndex=d.columnIndex,d.columnIndex=this.getRegionIndex(d.children),d.columnValuesLength=o.length)}}catch(v){e={error:v}}finally{try{h&&!h.done&&(n=f.return)&&n.call(f)}finally{if(e)throw e.error}}}},i.prototype.getFacetsByLevel=function(t,e){var n=[];return t.forEach(function(r){r.rowIndex===e&&n.push(r)}),n},i.prototype.getRegionIndex=function(t){var e=t[0],n=t[t.length-1];return(n.columnIndex-e.columnIndex)/2+e.columnIndex},i.prototype.isLeaf=function(t){return!t.children||!t.children.length},i.prototype.getRows=function(){return this.cfg.fields.length+1},i.prototype.getChildFacets=function(t,e,n){var r=this,o=this.cfg.fields,s=o.length;if(!(s=d){var p=n.parsePosition([v[l],v[s.field]]);p&&h.push(p)}if(v[l]===f)return!1}),h},i.prototype.parsePercentPosition=function(t){var e=parseFloat(t[0])/100,n=parseFloat(t[1])/100,r=this.view.getCoordinate(),o=r.start,s=r.end,l={x:Math.min(o.x,s.x),y:Math.min(o.y,s.y)},u=r.getWidth()*e+l.x,c=r.getHeight()*n+l.y;return{x:u,y:c}},i.prototype.getCoordinateBBox=function(){var t=this.view.getCoordinate(),e=t.start,n=t.end,r=t.getWidth(),o=t.getHeight(),s={x:Math.min(e.x,n.x),y:Math.min(e.y,n.y)};return{x:s.x,y:s.y,minX:s.x,minY:s.y,maxX:s.x+r,maxY:s.y+o,width:r,height:o}},i.prototype.getAnnotationCfg=function(t,e,n){var r=this,o=this.view.getCoordinate(),s=this.view.getCanvas(),l={};if(qe(e))return null;var u=e.start,c=e.end,f=e.position,h=this.parsePosition(u),d=this.parsePosition(c),v=this.parsePosition(f);if(["arc","image","line","region","regionFilter"].includes(t)&&(!h||!d))return null;if(["text","dataMarker","html"].includes(t)&&!v)return null;if(t==="arc"){var g=e;g.start,g.end;var p=Ti(g,["start","end"]),m=iu(o,h),y=iu(o,d);m>y&&(y=Math.PI*2+y),l=ct(ct({},p),{center:o.getCenter(),radius:$c(o,h),startAngle:m,endAngle:y})}else if(t==="image"){var w=e;w.start,w.end;var p=Ti(w,["start","end"]);l=ct(ct({},p),{start:h,end:d,src:e.src})}else if(t==="line"){var x=e;x.start,x.end;var p=Ti(x,["start","end"]);l=ct(ct({},p),{start:h,end:d,text:he(e,"text",null)})}else if(t==="region"){var M=e;M.start,M.end;var p=Ti(M,["start","end"]);l=ct(ct({},p),{start:h,end:d})}else if(t==="text"){var _=this.view.getData(),D=e;D.position;var C=D.content,p=Ti(D,["position","content"]),F=C;Rn(C)&&(F=C(_)),l=ct(ct(ct({},v),p),{content:F})}else if(t==="dataMarker"){var k=e;k.position;var j=k.point,V=k.line,st=k.text,yt=k.autoAdjust,Q=k.direction,p=Ti(k,["position","point","line","text","autoAdjust","direction"]);l=ct(ct(ct({},p),v),{coordinateBBox:this.getCoordinateBBox(),point:j,line:V,text:st,autoAdjust:yt,direction:Q})}else if(t==="dataRegion"){var it=e,Pt=it.start,ht=it.end,lt=it.region,st=it.text,U=it.lineLength,p=Ti(it,["start","end","region","text","lineLength"]);l=ct(ct({},p),{points:this.getRegionPoints(Pt,ht),region:lt,text:st,lineLength:U})}else if(t==="regionFilter"){var xt=e;xt.start,xt.end;var Gt=xt.apply,Bt=xt.color,p=Ti(xt,["start","end","apply","color"]),Qt=this.view.geometries,Ie=[],_e=function(dt){!dt||(dt.isGroup()?dt.getChildren().forEach(function(Z){return _e(Z)}):Ie.push(dt))};Nt(Qt,function(dt){Gt?wl(Gt,dt.type)&&Nt(dt.elements,function(Z){_e(Z.shape)}):Nt(dt.elements,function(Z){_e(Z.shape)})}),l=ct(ct({},p),{color:Bt,shapes:Ie,start:h,end:d})}else if(t==="shape"){var Ue=e,Fe=Ue.render,ft=Ti(Ue,["render"]),gt=function(at){if(Rn(e.render))return Fe(at,r.view,{parsePosition:r.parsePosition.bind(r)})};l=ct(ct({},ft),{render:gt})}else if(t==="html"){var P=e,Kt=P.html;P.position;var ft=Ti(P,["html","position"]),H=function(dt){return Rn(Kt)?Kt(dt,r.view):Kt};l=ct(ct(ct({},ft),v),{parent:s.get("el").parentNode,html:H})}var ot=_n({},n,ct(ct({},l),{top:e.top,style:e.style,offsetX:e.offsetX,offsetY:e.offsetY}));return t!=="html"&&(ot.container=this.getComponentContainer(ot)),ot.animate=this.view.getOptions().animate&&ot.animate&&he(e,"animate",ot.animate),ot.animateOption=_n({},su,ot.animateOption,e.animateOption),ot},i.prototype.isTop=function(t){return he(t,"top",!0)},i.prototype.getComponentContainer=function(t){return this.isTop(t)?this.foregroundContainer:this.backgroundContainer},i.prototype.getAnnotationTheme=function(t){return he(this.view.getTheme(),["components","annotation",t],{})},i.prototype.updateOrCreate=function(t){var e=this.cache.get(this.getCacheKey(t));if(e){var n=t.type,r=this.getAnnotationTheme(n),o=this.getAnnotationCfg(n,t,r);o&&ja(o,["container"]),e.component.update(ct(ct({},o||{}),{visible:!!o})),wl(zf,t.type)&&e.component.render()}else e=this.createAnnotation(t),e&&(e.component.init(),wl(zf,t.type)&&e.component.render());return e},i.prototype.syncCache=function(t){var e=this,n=new Map(this.cache);return t.forEach(function(r,o){n.set(o,r)}),n.forEach(function(r,o){As(e.option,function(s){return o===e.getCacheKey(s)})||(r.component.destroy(),n.delete(o))}),n},i.prototype.getCacheKey=function(t){return t},i}(vu);function Vg(a,i){var t=_n({},he(a,["components","axis","common"]),he(a,["components","axis",i]));return he(t,["grid"],{})}function Yf(a,i,t,e){var n=[],r=i.getTicks();return a.isPolar&&r.push({value:1,text:"",tickValue:""}),r.reduce(function(o,s,l){var u=s.value;if(e)n.push({points:[a.convert(t==="y"?{x:0,y:u}:{x:u,y:0}),a.convert(t==="y"?{x:1,y:u}:{x:u,y:1})]});else if(l){var c=o.value,f=(c+u)/2;n.push({points:[a.convert(t==="y"?{x:0,y:f}:{x:f,y:0}),a.convert(t==="y"?{x:1,y:f}:{x:f,y:1})]})}return s},r[0]),n}function Ch(a,i,t,e,n){var r=i.values.length,o=[],s=t.getTicks();return s.reduce(function(l,u){var c=l?l.value:u.value,f=u.value,h=(c+f)/2;return n==="x"?o.push({points:[a.convert({x:e?f:h,y:0}),a.convert({x:e?f:h,y:1})]}):o.push({points:fa(Array(r+1),function(d,v){return a.convert({x:v/r,y:e?f:h})})}),u},s[0]),o}function $g(a,i){var t=he(i,"grid");if(t===null)return!1;var e=he(a,"grid");return!(t===void 0&&e===null)}var Vs=["container"],Xg=ct(ct({},su),{appear:null}),R4=function(a){je(i,a);function i(t){var e=a.call(this,t)||this;return e.cache=new Map,e.gridContainer=e.view.getLayer(Gr.BG).addGroup(),e.gridForeContainer=e.view.getLayer(Gr.FORE).addGroup(),e.axisContainer=e.view.getLayer(Gr.BG).addGroup(),e.axisForeContainer=e.view.getLayer(Gr.FORE).addGroup(),e}return Object.defineProperty(i.prototype,"name",{get:function(){return"axis"},enumerable:!1,configurable:!0}),i.prototype.init=function(){},i.prototype.render=function(){this.update()},i.prototype.layout=function(){var t=this,e=this.view.getCoordinate();Nt(this.getComponents(),function(n){var r=n.component,o=n.direction,s=n.type,l=n.extra,u=l.dim,c=l.scale,f=l.alignTick,h;if(s===di.AXIS)e.isPolar?u==="x"?h=e.isTransposed?Tf(e,o):mh(e):u==="y"&&(h=e.isTransposed?mh(e):Tf(e,o)):h=Tf(e,o);else if(s===di.GRID)if(e.isPolar){var d=void 0;e.isTransposed?d=u==="x"?Ch(e,t.view.getYScales()[0],c,f,u):Yf(e,c,u,f):d=u==="x"?Yf(e,c,u,f):Ch(e,t.view.getXScale(),c,f,u),h={items:d,center:t.view.getCoordinate().getCenter()}}else h={items:Yf(e,c,u,f)};r.update(h)})},i.prototype.update=function(){this.option=this.view.getOptions().axes;var t=new Map;this.updateXAxes(t),this.updateYAxes(t);var e=new Map;this.cache.forEach(function(n,r){t.has(r)?e.set(r,n):n.component.destroy()}),this.cache=e},i.prototype.clear=function(){a.prototype.clear.call(this),this.cache.clear(),this.gridContainer.clear(),this.gridForeContainer.clear(),this.axisContainer.clear(),this.axisForeContainer.clear()},i.prototype.destroy=function(){a.prototype.destroy.call(this),this.gridContainer.remove(!0),this.gridForeContainer.remove(!0),this.axisContainer.remove(!0),this.axisForeContainer.remove(!0)},i.prototype.getComponents=function(){var t=[];return this.cache.forEach(function(e){t.push(e)}),t},i.prototype.updateXAxes=function(t){var e=this.view.getXScale();if(!(!e||e.isIdentity)){var n=fc(this.option,e.field);if(n!==!1){var r=ng(n,hn.BOTTOM),o=Gr.BG,s="x",l=this.view.getCoordinate(),u=this.getId("axis",e.field),c=this.getId("grid",e.field);if(l.isRect){var f=this.cache.get(u);if(f){var h=this.getLineAxisCfg(e,n,r);ja(h,Vs),f.component.update(h),t.set(u,f)}else f=this.createLineAxis(e,n,o,r,s),this.cache.set(u,f),t.set(u,f);var d=this.cache.get(c);if(d){var h=this.getLineGridCfg(e,n,r,s);ja(h,Vs),d.component.update(h),t.set(c,d)}else d=this.createLineGrid(e,n,o,r,s),d&&(this.cache.set(c,d),t.set(c,d))}else if(l.isPolar){var f=this.cache.get(u);if(f){var h=l.isTransposed?this.getLineAxisCfg(e,n,hn.RADIUS):this.getCircleAxisCfg(e,n,r);ja(h,Vs),f.component.update(h),t.set(u,f)}else{if(l.isTransposed){if(Gl(n))return;f=this.createLineAxis(e,n,o,hn.RADIUS,s)}else f=this.createCircleAxis(e,n,o,r,s);this.cache.set(u,f),t.set(u,f)}var d=this.cache.get(c);if(d){var h=l.isTransposed?this.getCircleGridCfg(e,n,hn.RADIUS,s):this.getLineGridCfg(e,n,hn.CIRCLE,s);ja(h,Vs),d.component.update(h),t.set(c,d)}else{if(l.isTransposed){if(Gl(n))return;d=this.createCircleGrid(e,n,o,hn.RADIUS,s)}else d=this.createLineGrid(e,n,o,hn.CIRCLE,s);d&&(this.cache.set(c,d),t.set(c,d))}}}}},i.prototype.updateYAxes=function(t){var e=this,n=this.view.getYScales();Nt(n,function(r,o){if(!(!r||r.isIdentity)){var s=r.field,l=fc(e.option,s);if(l!==!1){var u=Gr.BG,c="y",f=e.getId("axis",s),h=e.getId("grid",s),d=e.view.getCoordinate();if(d.isRect){var v=ng(l,o===0?hn.LEFT:hn.RIGHT),g=e.cache.get(f);if(g){var p=e.getLineAxisCfg(r,l,v);ja(p,Vs),g.component.update(p),t.set(f,g)}else g=e.createLineAxis(r,l,u,v,c),e.cache.set(f,g),t.set(f,g);var m=e.cache.get(h);if(m){var p=e.getLineGridCfg(r,l,v,c);ja(p,Vs),m.component.update(p),t.set(h,m)}else m=e.createLineGrid(r,l,u,v,c),m&&(e.cache.set(h,m),t.set(h,m))}else if(d.isPolar){var g=e.cache.get(f);if(g){var p=d.isTransposed?e.getCircleAxisCfg(r,l,hn.CIRCLE):e.getLineAxisCfg(r,l,hn.RADIUS);ja(p,Vs),g.component.update(p),t.set(f,g)}else{if(d.isTransposed){if(Gl(l))return;g=e.createCircleAxis(r,l,u,hn.CIRCLE,c)}else g=e.createLineAxis(r,l,u,hn.RADIUS,c);e.cache.set(f,g),t.set(f,g)}var m=e.cache.get(h);if(m){var p=d.isTransposed?e.getLineGridCfg(r,l,hn.CIRCLE,c):e.getCircleGridCfg(r,l,hn.RADIUS,c);ja(p,Vs),m.component.update(p),t.set(h,m)}else{if(d.isTransposed){if(Gl(l))return;m=e.createLineGrid(r,l,u,hn.CIRCLE,c)}else m=e.createCircleGrid(r,l,u,hn.RADIUS,c);m&&(e.cache.set(h,m),t.set(h,m))}}}}})},i.prototype.createLineAxis=function(t,e,n,r,o){var s={component:new PS(this.getLineAxisCfg(t,e,r)),layer:n,direction:r===hn.RADIUS?hn.NONE:r,type:di.AXIS,extra:{dim:o,scale:t}};return s.component.set("field",t.field),s.component.init(),s},i.prototype.createLineGrid=function(t,e,n,r,o){var s=this.getLineGridCfg(t,e,r,o);if(s){var l={component:new AS(s),layer:n,direction:hn.NONE,type:di.GRID,extra:{dim:o,scale:t,alignTick:he(s,"alignTick",!0)}};return l.component.init(),l}},i.prototype.createCircleAxis=function(t,e,n,r,o){var s={component:new TS(this.getCircleAxisCfg(t,e,r)),layer:n,direction:r,type:di.AXIS,extra:{dim:o,scale:t}};return s.component.set("field",t.field),s.component.init(),s},i.prototype.createCircleGrid=function(t,e,n,r,o){var s=this.getCircleGridCfg(t,e,r,o);if(s){var l={component:new OS(s),layer:n,direction:hn.NONE,type:di.GRID,extra:{dim:o,scale:t,alignTick:he(s,"alignTick",!0)}};return l.component.init(),l}},i.prototype.getLineAxisCfg=function(t,e,n){var r=he(e,["top"])?this.axisForeContainer:this.axisContainer,o=this.view.getCoordinate(),s=Tf(o,n),l=rg(t,e),u=Af(this.view.getTheme(),n),c=he(e,["title"])?_n({title:{style:{text:l}}},{title:eg(this.view.getTheme(),n,e.title)},e):e,f=_n(ct(ct({container:r},s),{ticks:t.getTicks().map(function(w){return{id:"".concat(w.tickValue),name:w.text,value:w.value}}),verticalFactor:o.isPolar?tg(s,o.getCenter())*-1:tg(s,o.getCenter()),theme:u}),u,c),h=this.getAnimateCfg(f),d=h.animate,v=h.animateOption;f.animateOption=v,f.animate=d;var g=sy(s),p=he(f,"verticalLimitLength",g?1/3:1/2);if(p<=1){var m=this.view.getCanvas().get("width"),y=this.view.getCanvas().get("height");f.verticalLimitLength=p*(g?m:y)}return f},i.prototype.getLineGridCfg=function(t,e,n,r){if(!!$g(Af(this.view.getTheme(),n),e)){var o=Vg(this.view.getTheme(),n),s=_n({container:he(e,["top"])?this.gridForeContainer:this.gridContainer},o,he(e,"grid"),this.getAnimateCfg(e));return s.items=Yf(this.view.getCoordinate(),t,r,he(s,"alignTick",!0)),s}},i.prototype.getCircleAxisCfg=function(t,e,n){var r=he(e,["top"])?this.axisForeContainer:this.axisContainer,o=this.view.getCoordinate(),s=t.getTicks().map(function(g){return{id:"".concat(g.tickValue),name:g.text,value:g.value}});!t.isCategory&&Math.abs(o.endAngle-o.startAngle)===Math.PI*2&&s.pop();var l=rg(t,e),u=Af(this.view.getTheme(),hn.CIRCLE),c=he(e,["title"])?_n({title:{style:{text:l}}},{title:eg(this.view.getTheme(),n,e.title)},e):e,f=_n(ct(ct({container:r},mh(this.view.getCoordinate())),{ticks:s,verticalFactor:1,theme:u}),u,c),h=this.getAnimateCfg(f),d=h.animate,v=h.animateOption;return f.animate=d,f.animateOption=v,f},i.prototype.getCircleGridCfg=function(t,e,n,r){if(!!$g(Af(this.view.getTheme(),n),e)){var o=Vg(this.view.getTheme(),hn.RADIUS),s=_n({container:he(e,["top"])?this.gridForeContainer:this.gridContainer,center:this.view.getCoordinate().getCenter()},o,he(e,"grid"),this.getAnimateCfg(e)),l=he(s,"alignTick",!0),u=r==="x"?this.view.getYScales()[0]:this.view.getXScale();return s.items=Ch(this.view.getCoordinate(),u,t,l,r),s}},i.prototype.getId=function(t,e){var n=this.view.getCoordinate();return"".concat(t,"-").concat(e,"-").concat(n.type)},i.prototype.getAnimateCfg=function(t){return{animate:this.view.getOptions().animate&&he(t,"animate"),animateOption:t&&t.animateOption?_n({},Xg,t.animateOption):Xg}},i}(vu);function el(a,i,t){return t===hn.TOP?[a.minX+a.width/2-i.width/2,a.minY]:t===hn.BOTTOM?[a.minX+a.width/2-i.width/2,a.maxY-i.height]:t===hn.LEFT?[a.minX,a.minY+a.height/2-i.height/2]:t===hn.RIGHT?[a.maxX-i.width,a.minY+a.height/2-i.height/2]:t===hn.TOP_LEFT||t===hn.LEFT_TOP?[a.tl.x,a.tl.y]:t===hn.TOP_RIGHT||t===hn.RIGHT_TOP?[a.tr.x-i.width,a.tr.y]:t===hn.BOTTOM_LEFT||t===hn.LEFT_BOTTOM?[a.bl.x,a.bl.y-i.height]:t===hn.BOTTOM_RIGHT||t===hn.RIGHT_BOTTOM?[a.br.x-i.width,a.br.y-i.height]:[0,0]}function Ug(a,i){return zu(a)?a===!1?!1:{}:he(a,[i],a)}function Hf(a){return he(a,"position",hn.BOTTOM)}var F4=function(a){je(i,a);function i(t){var e=a.call(this,t)||this;return e.container=e.view.getLayer(Gr.FORE).addGroup(),e}return Object.defineProperty(i.prototype,"name",{get:function(){return"legend"},enumerable:!1,configurable:!0}),i.prototype.init=function(){},i.prototype.render=function(){this.update()},i.prototype.layout=function(){var t=this;this.layoutBBox=this.view.viewBBox,Nt(this.components,function(e){var n=e.component,r=e.direction,o=xh(r),s=n.get("maxWidthRatio"),l=n.get("maxHeightRatio"),u=t.getCategoryLegendSizeCfg(o,s,l),c=n.get("maxWidth"),f=n.get("maxHeight");n.update({maxWidth:Math.min(u.maxWidth,c||0),maxHeight:Math.min(u.maxHeight,f||0)});var h=n.get("padding"),d=n.getLayoutBBox(),v=new ca(d.x,d.y,d.width,d.height).expand(h),g=Pn(el(t.view.viewBBox,v,r),2),p=g[0],m=g[1],y=Pn(el(t.layoutBBox,v,r),2),w=y[0],x=y[1],M=0,_=0;r.startsWith("top")||r.startsWith("bottom")?(M=p,_=x):(M=w,_=m),n.setLocation({x:M+h[3],y:_+h[0]}),t.layoutBBox=t.layoutBBox.cut(v,r)})},i.prototype.update=function(){var t=this;this.option=this.view.getOptions().legends;var e={},n=function(h,d,v){var g=t.getId(v.field),p=t.getComponentById(g);if(p){var m=void 0,y=Ug(t.option,v.field);y!==!1&&(he(y,"custom")?m=t.getCategoryCfg(h,d,v,y,!0):v.isLinear?m=t.getContinuousCfg(h,d,v,y):v.isCategory&&(m=t.getCategoryCfg(h,d,v,y))),m&&(ja(m,["container"]),p.direction=Hf(y),p.component.update(m),e[g]=!0)}else{var w=t.createFieldLegend(h,d,v);w&&(w.component.init(),t.components.push(w),e[g]=!0)}};if(he(this.option,"custom")){var r="global-custom",o=this.getComponentById(r);if(o){var s=this.getCategoryCfg(void 0,void 0,void 0,this.option,!0);ja(s,["container"]),o.component.update(s),e[r]=!0}else{var l=this.createCustomLegend(void 0,void 0,void 0,this.option);if(l){l.init();var u=Gr.FORE,c=Hf(this.option);this.components.push({id:r,component:l,layer:u,direction:c,type:di.LEGEND,extra:void 0}),e[r]=!0}}}else this.loopLegends(n);var f=[];Nt(this.getComponents(),function(h){e[h.id]?f.push(h):h.component.destroy()}),this.components=f},i.prototype.clear=function(){a.prototype.clear.call(this),this.container.clear()},i.prototype.destroy=function(){a.prototype.destroy.call(this),this.container.remove(!0)},i.prototype.getGeometries=function(t){var e=this,n=t.geometries;return Nt(t.views,function(r){n=n.concat(e.getGeometries(r))}),n},i.prototype.loopLegends=function(t){var e=this.view.getRootView()===this.view;if(!!e){var n=this.getGeometries(this.view),r={};Nt(n,function(o){var s=o.getGroupAttributes();Nt(s,function(l){var u=l.getScale(l.type);!u||u.type==="identity"||r[u.field]||(t(o,l,u),r[u.field]=!0)})})}},i.prototype.createFieldLegend=function(t,e,n){var r,o=Ug(this.option,n.field),s=Gr.FORE,l=Hf(o);if(o!==!1&&(he(o,"custom")?r=this.createCustomLegend(t,e,n,o):n.isLinear?r=this.createContinuousLegend(t,e,n,o):n.isCategory&&(r=this.createCategoryLegend(t,e,n,o))),r)return r.set("field",n.field),{id:this.getId(n.field),component:r,layer:s,direction:l,type:di.LEGEND,extra:{scale:n}}},i.prototype.createCustomLegend=function(t,e,n,r){var o=this.getCategoryCfg(t,e,n,r,!0);return new Q0(o)},i.prototype.createContinuousLegend=function(t,e,n,r){var o=this.getContinuousCfg(t,e,n,ja(r,["value"]));return new IS(o)},i.prototype.createCategoryLegend=function(t,e,n,r){var o=this.getCategoryCfg(t,e,n,r);return new Q0(o)},i.prototype.getContinuousCfg=function(t,e,n,r){var o=n.getTicks(),s=As(o,function(g){return g.value===0}),l=As(o,function(g){return g.value===1}),u=o.map(function(g){var p=g.value,m=g.tickValue,y=e.mapping(n.invert(p)).join("");return{value:m,attrValue:y,color:y,scaleValue:p}});s||u.push({value:n.min,attrValue:e.mapping(n.invert(0)).join(""),color:e.mapping(n.invert(0)).join(""),scaleValue:0}),l||u.push({value:n.max,attrValue:e.mapping(n.invert(1)).join(""),color:e.mapping(n.invert(1)).join(""),scaleValue:1}),u.sort(function(g,p){return g.value-p.value});var c={min:ro(u).value,max:Ii(u).value,colors:[],rail:{type:e.type},track:{}};e.type==="size"&&(c.track={style:{fill:e.type==="size"?this.view.getTheme().defaultColor:void 0}}),e.type==="color"&&(c.colors=u.map(function(g){return g.attrValue}));var f=this.container,h=Hf(r),d=xh(h),v=he(r,"title");return v&&(v=_n({text:qu(n)},v)),c.container=f,c.layout=d,c.title=v,c.animateOption=su,this.mergeLegendCfg(c,r,"continuous")},i.prototype.getCategoryCfg=function(t,e,n,r,o){var s=this.container,l=he(r,"position",hn.BOTTOM),u=pg(this.view.getTheme(),l),c=he(u,["marker"]),f=he(r,"marker"),h=xh(l),d=he(u,["pageNavigator"]),v=he(r,"pageNavigator"),g=o?qC(c,f,r.items):JC(this.view,t,e,c,f),p=he(r,"title");p&&(p=_n({text:n?qu(n):""},p));var m=he(r,"maxWidthRatio"),y=he(r,"maxHeightRatio"),w=this.getCategoryLegendSizeCfg(h,m,y);w.container=s,w.layout=h,w.items=g,w.title=p,w.animateOption=su,w.pageNavigator=_n({},d,v);var x=this.mergeLegendCfg(w,r,l);x.reversed&&x.items.reverse();var M=he(x,"maxItemWidth");return M&&M<=1&&(x.maxItemWidth=this.view.viewBBox.width*M),x},i.prototype.mergeLegendCfg=function(t,e,n){var r=n.split("-")[0],o=pg(this.view.getTheme(),r);return _n({},o,t,e)},i.prototype.getId=function(t){return"".concat(this.name,"-").concat(t)},i.prototype.getComponentById=function(t){return As(this.components,function(e){return e.id===t})},i.prototype.getCategoryLegendSizeCfg=function(t,e,n){e===void 0&&(e=Ov),n===void 0&&(n=Ov);var r=this.view.viewBBox,o=r.width,s=r.height;return t==="vertical"?{maxWidth:o*e,maxHeight:s}:{maxWidth:o,maxHeight:s*n}},i}(vu),N4=function(a){je(i,a);function i(t){var e=a.call(this,t)||this;return e.onChangeFn=Js,e.resetMeasure=function(){e.clear()},e.onValueChange=function(n){var r=Pn(n,2),o=r[0],s=r[1];e.start=o,e.end=s,e.changeViewData(o,s)},e.container=e.view.getLayer(Gr.FORE).addGroup(),e.onChangeFn=xd(e.onValueChange,20,{leading:!0}),e.width=0,e.view.on(wr.BEFORE_CHANGE_DATA,e.resetMeasure),e.view.on(wr.BEFORE_CHANGE_SIZE,e.resetMeasure),e}return Object.defineProperty(i.prototype,"name",{get:function(){return"slider"},enumerable:!1,configurable:!0}),i.prototype.destroy=function(){a.prototype.destroy.call(this),this.view.off(wr.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(wr.BEFORE_CHANGE_SIZE,this.resetMeasure)},i.prototype.init=function(){},i.prototype.render=function(){this.option=this.view.getOptions().slider;var t=this.getSliderCfg(),e=t.start,n=t.end;qe(this.start)&&(this.start=e,this.end=n);var r=this.view.getOptions().data;this.option&&!os(r)?this.slider?this.slider=this.updateSlider():(this.slider=this.createSlider(),this.slider.component.on("sliderchange",this.onChangeFn)):this.slider&&(this.slider.component.destroy(),this.slider=void 0)},i.prototype.layout=function(){var t=this;if(this.option&&!this.width&&(this.measureSlider(),setTimeout(function(){t.view.destroyed||t.changeViewData(t.start,t.end)},0)),this.slider){var e=this.view.coordinateBBox.width,n=this.slider.component.get("padding"),r=Pn(n,4),o=r[0];r[1],r[2];var s=r[3],l=this.slider.component.getLayoutBBox(),u=new ca(l.x,l.y,Math.min(l.width,e),l.height).expand(n),c=this.getMinMaxText(this.start,this.end),f=c.minText,h=c.maxText,d=Pn(el(this.view.viewBBox,u,hn.BOTTOM),2);d[0];var v=d[1],g=Pn(el(this.view.coordinateBBox,u,hn.BOTTOM),2),p=g[0];g[1],this.slider.component.update(ct(ct({},this.getSliderCfg()),{x:p+s,y:v+o,width:this.width,start:this.start,end:this.end,minText:f,maxText:h})),this.view.viewBBox=this.view.viewBBox.cut(u,hn.BOTTOM)}},i.prototype.update=function(){this.render()},i.prototype.createSlider=function(){var t=this.getSliderCfg(),e=new _S(ct({container:this.container},t));return e.init(),{component:e,layer:Gr.FORE,direction:hn.BOTTOM,type:di.SLIDER}},i.prototype.updateSlider=function(){var t=this.getSliderCfg();if(this.width){var e=this.getMinMaxText(this.start,this.end),n=e.minText,r=e.maxText;t=ct(ct({},t),{width:this.width,start:this.start,end:this.end,minText:n,maxText:r})}return this.slider.component.update(t),this.slider},i.prototype.measureSlider=function(){var t=this.getSliderCfg().width;this.width=t},i.prototype.getSliderCfg=function(){var t={height:16,start:0,end:1,minText:"",maxText:"",x:0,y:0,width:this.view.coordinateBBox.width};if(Mr(this.option)){var e=ct({data:this.getData()},he(this.option,"trendCfg",{}));t=_n({},t,this.getThemeOptions(),this.option),t=ct(ct({},t),{trendCfg:e})}return t.start=Yr(Math.min(qe(t.start)?0:t.start,qe(t.end)?1:t.end),0,1),t.end=Yr(Math.max(qe(t.start)?0:t.start,qe(t.end)?1:t.end),0,1),t},i.prototype.getData=function(){var t=this.view.getOptions().data,e=Pn(this.view.getYScales(),1),n=e[0],r=this.view.getGroupScales();if(r.length){var o=r[0],s=o.field,l=o.ticks;return t.reduce(function(u,c){return c[s]===l[0]&&u.push(c[n.field]),u},[])}return t.map(function(u){return u[n.field]||0})},i.prototype.getThemeOptions=function(){var t=this.view.getTheme();return he(t,["components","slider","common"],{})},i.prototype.getMinMaxText=function(t,e){var n=this.view.getOptions().data,r=this.view.getXScale(),o=Os(n,r.field);r.isLinear&&(o=o.sort());var s=o,l=Fa(n);if(!r||!l)return{};var u=Fa(s),c=Math.round(t*(u-1)),f=Math.round(e*(u-1)),h=he(s,[c]),d=he(s,[f]),v=this.getSliderCfg().formatter;return v&&(h=v(h,n[c],c),d=v(d,n[f],f)),{minText:h,maxText:d}},i.prototype.changeViewData=function(t,e){var n=this.view.getOptions().data,r=this.view.getXScale(),o=Fa(n);if(!(!r||!o)){var s=Os(n,r.field),l=this.view.getXScale().isLinear?s.sort(function(d,v){return Number(d)-Number(v)}):s,u=l,c=Fa(u),f=Math.round(t*(c-1)),h=Math.round(e*(c-1));this.view.filter(r.field,function(d,v){var g=u.indexOf(d);return g>-1?Ul(g,f,h):!0}),this.view.render(!0)}},i.prototype.getComponents=function(){return this.slider?[this.slider]:[]},i.prototype.clear=function(){this.slider&&(this.slider.component.destroy(),this.slider=void 0),this.width=0,this.start=void 0,this.end=void 0},i}(vu),Wf=0,Kg=8,k4=32,z4=20,Y4=function(a){je(i,a);function i(t){var e=a.call(this,t)||this;return e.onChangeFn=Js,e.resetMeasure=function(){e.clear()},e.onValueChange=function(n){var r=n.ratio,o=e.getValidScrollbarCfg().animate;e.ratio=Yr(r,0,1);var s=e.view.getOptions().animate;o||e.view.animate(!1),e.changeViewData(e.getScrollRange(),!0),e.view.animate(s)},e.container=e.view.getLayer(Gr.FORE).addGroup(),e.onChangeFn=xd(e.onValueChange,20,{leading:!0}),e.trackLen=0,e.thumbLen=0,e.ratio=0,e.view.on(wr.BEFORE_CHANGE_DATA,e.resetMeasure),e.view.on(wr.BEFORE_CHANGE_SIZE,e.resetMeasure),e}return Object.defineProperty(i.prototype,"name",{get:function(){return"scrollbar"},enumerable:!1,configurable:!0}),i.prototype.destroy=function(){a.prototype.destroy.call(this),this.view.off(wr.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(wr.BEFORE_CHANGE_SIZE,this.resetMeasure)},i.prototype.init=function(){},i.prototype.render=function(){this.option=this.view.getOptions().scrollbar,this.option?this.scrollbar?this.scrollbar=this.updateScrollbar():(this.scrollbar=this.createScrollbar(),this.scrollbar.component.on("scrollchange",this.onChangeFn)):this.scrollbar&&(this.scrollbar.component.destroy(),this.scrollbar=void 0)},i.prototype.layout=function(){var t=this;if(this.option&&!this.trackLen&&(this.measureScrollbar(),setTimeout(function(){t.view.destroyed||t.changeViewData(t.getScrollRange(),!0)})),this.scrollbar){var e=this.view.coordinateBBox.width,n=this.scrollbar.component.get("padding"),r=this.scrollbar.component.getLayoutBBox(),o=new ca(r.x,r.y,Math.min(r.width,e),r.height).expand(n),s=this.getScrollbarComponentCfg(),l=void 0,u=void 0;if(s.isHorizontal){var c=Pn(el(this.view.viewBBox,o,hn.BOTTOM),2);c[0];var f=c[1],h=Pn(el(this.view.coordinateBBox,o,hn.BOTTOM),2),d=h[0];h[1],l=d,u=f}else{var v=Pn(el(this.view.viewBBox,o,hn.RIGHT),2);v[0];var f=v[1],g=Pn(el(this.view.viewBBox,o,hn.RIGHT),2),d=g[0];g[1],l=d,u=f}l+=n[3],u+=n[0],this.trackLen?this.scrollbar.component.update(ct(ct({},s),{x:l,y:u,trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio})):this.scrollbar.component.update(ct(ct({},s),{x:l,y:u})),this.view.viewBBox=this.view.viewBBox.cut(o,s.isHorizontal?hn.BOTTOM:hn.RIGHT)}},i.prototype.update=function(){this.render()},i.prototype.getComponents=function(){return this.scrollbar?[this.scrollbar]:[]},i.prototype.clear=function(){this.scrollbar&&(this.scrollbar.component.destroy(),this.scrollbar=void 0),this.trackLen=0,this.thumbLen=0,this.ratio=0,this.cnt=0,this.step=0,this.data=void 0,this.xScaleCfg=void 0,this.yScalesCfg=[]},i.prototype.setValue=function(t){this.onValueChange({ratio:t})},i.prototype.getValue=function(){return this.ratio},i.prototype.getThemeOptions=function(){var t=this.view.getTheme();return he(t,["components","scrollbar","common"],{})},i.prototype.getScrollbarTheme=function(t){var e=he(this.view.getTheme(),["components","scrollbar"]),n=t||{},r=n.thumbHighlightColor,o=Ti(n,["thumbHighlightColor"]);return{default:_n({},he(e,["default","style"],{}),o),hover:_n({},he(e,["hover","style"],{}),{thumbColor:r})}},i.prototype.measureScrollbar=function(){var t=this.view.getXScale(),e=this.view.getYScales().slice();this.data=this.getScrollbarData(),this.step=this.getStep(),this.cnt=this.getCnt();var n=this.getScrollbarComponentCfg(),r=n.trackLen,o=n.thumbLen;this.trackLen=r,this.thumbLen=o,this.xScaleCfg={field:t.field,values:t.values||[]},this.yScalesCfg=e},i.prototype.getScrollRange=function(){var t=Math.floor((this.cnt-this.step)*Yr(this.ratio,0,1)),e=Math.min(t+this.step-1,this.cnt-1);return[t,e]},i.prototype.changeViewData=function(t,e){var n=this,r=Pn(t,2),o=r[0],s=r[1],l=this.getValidScrollbarCfg().type,u=l!=="vertical",c=Os(this.data,this.xScaleCfg.field),f=this.view.getXScale().isLinear?c.sort(function(d,v){return Number(d)-Number(v)}):c,h=u?f:f.reverse();this.yScalesCfg.forEach(function(d){n.view.scale(d.field,{formatter:d.formatter,type:d.type,min:d.min,max:d.max,tickMethod:d.tickMethod})}),this.view.filter(this.xScaleCfg.field,function(d){var v=h.indexOf(d);return v>-1?Ul(v,o,s):!0}),this.view.render(!0)},i.prototype.createScrollbar=function(){var t=this.getValidScrollbarCfg().type,e=t!=="vertical",n=new CS(ct(ct({container:this.container},this.getScrollbarComponentCfg()),{x:0,y:0}));return n.init(),{component:n,layer:Gr.FORE,direction:e?hn.BOTTOM:hn.RIGHT,type:di.SCROLLBAR}},i.prototype.updateScrollbar=function(){var t=this.getScrollbarComponentCfg(),e=this.trackLen?ct(ct({},t),{trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio}):ct({},t);return this.scrollbar.component.update(e),this.scrollbar},i.prototype.getStep=function(){if(this.step)return this.step;var t=this.view.coordinateBBox,e=this.getValidScrollbarCfg(),n=e.type,r=e.categorySize,o=n!=="vertical";return Math.floor((o?t.width:t.height)/r)},i.prototype.getCnt=function(){if(this.cnt)return this.cnt;var t=this.view.getXScale(),e=this.getScrollbarData(),n=Os(e,t.field);return Fa(n)},i.prototype.getScrollbarComponentCfg=function(){var t=this.view,e=t.coordinateBBox,n=t.viewBBox,r=this.getValidScrollbarCfg(),o=r.type,s=r.padding,l=r.width,u=r.height,c=r.style,f=o!=="vertical",h=Pn(s,4),d=h[0],v=h[1],g=h[2],p=h[3],m=f?{x:e.minX+p,y:n.maxY-u-g}:{x:n.maxX-l-v,y:e.minY+d},y=this.getStep(),w=this.getCnt(),x=f?e.width-p-v:e.height-d-g,M=Math.max(x*Yr(y/w,0,1),z4);return ct(ct({},this.getThemeOptions()),{x:m.x,y:m.y,size:f?u:l,isHorizontal:f,trackLen:x,thumbLen:M,thumbOffset:0,theme:this.getScrollbarTheme(c)})},i.prototype.getValidScrollbarCfg=function(){var t={type:"horizontal",categorySize:k4,width:Kg,height:Kg,padding:[0,0,0,0],animate:!0,style:{}};return Mr(this.option)&&(t=ct(ct({},t),this.option)),(!Mr(this.option)||!this.option.padding)&&(t.padding=t.type==="horizontal"?[Wf,0,Wf,0]:[0,Wf,0,Wf]),t},i.prototype.getScrollbarData=function(){var t=this.view.getCoordinate(),e=this.getValidScrollbarCfg(),n=this.view.getOptions().data||[];return t.isReflect("y")&&e.type==="vertical"&&(n=Er([],Pn(n),!1).reverse()),n},i}(vu),H4={fill:"#CCD6EC",opacity:.3};function W4(a,i,t){var e,n,r,o,s,l,u=CC(a,i,t);if(u.length){u=ao(u);try{for(var c=rr(u),f=c.next();!f.done;f=c.next()){var h=f.value;try{for(var d=(r=void 0,rr(h)),v=d.next();!v.done;v=d.next()){var g=v.value,p=g.mappingData,m=p.x,y=p.y;g.x=ln(m)?m[m.length-1]:m,g.y=ln(y)?y[y.length-1]:y}}catch(k){r={error:k}}finally{try{v&&!v.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}}}catch(k){e={error:k}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}var w=t.shared;if(w===!1&&u.length>1){var x=u[0],M=Math.abs(i.y-x[0].y);try{for(var _=rr(u),D=_.next();!D.done;D=_.next()){var C=D.value,F=Math.abs(i.y-C[0].y);F<=M&&(x=C,M=F)}}catch(k){s={error:k}}finally{try{D&&!D.done&&(l=_.return)&&l.call(_)}finally{if(s)throw s.error}}u=[x]}return hp(ao(u))}return[]}var G4=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.show=function(t){var e=this.context.view,n=this.context.event,r=e.getController("tooltip").getTooltipCfg(),o=W4(e,{x:n.x,y:n.y},r);if(!ui(o,this.items)&&(this.items=o,o.length)){var s=e.getXScale().field,l=o[0].data[s],u=[],c=e.geometries;if(Nt(c,function(ht){if(ht.type==="interval"||ht.type==="schema"){var lt=ht.getElementsBy(function(U){var xt=U.getData();return xt[s]===l});u=u.concat(lt)}}),u.length){var f=e.getCoordinate(),h=u[0].shape.getCanvasBBox(),d=u[0].shape.getCanvasBBox(),v=h;Nt(u,function(ht){var lt=ht.shape.getCanvasBBox();f.isTransposed?(lt.minYd.maxY&&(d=lt)):(lt.minXd.maxX&&(d=lt)),v.x=Math.min(lt.minX,v.minX),v.y=Math.min(lt.minY,v.minY),v.width=Math.max(lt.maxX,v.maxX)-v.x,v.height=Math.max(lt.maxY,v.maxY)-v.y});var g=e.backgroundGroup,p=e.coordinateBBox,m=void 0;if(f.isRect){var y=e.getXScale(),w=t||{},x=w.appendRatio,M=w.appendWidth;qe(M)&&(x=qe(x)?y.isLinear?0:.25:x,M=f.isTransposed?x*d.height:x*h.width);var _=void 0,D=void 0,C=void 0,F=void 0;f.isTransposed?(_=p.minX,D=Math.min(d.minY,h.minY)-M,C=p.width,F=v.height+M*2):(_=Math.min(h.minX,d.minX)-M,D=p.minY,C=v.width+M*2,F=p.height),m=[["M",_,D],["L",_+C,D],["L",_+C,D+F],["L",_,D+F],["Z"]]}else{var k=ro(u),j=Ii(u),V=uc(k.getModel(),f).startAngle,st=uc(j.getModel(),f).endAngle,yt=f.getCenter(),Q=f.getRadius(),it=f.innerRadius*Q;m=Tl(yt.x,yt.y,Q,V,st,it)}if(this.regionPath)this.regionPath.attr("path",m),this.regionPath.show();else{var Pt=he(t,"style",H4);this.regionPath=g.addShape({type:"path",name:"active-region",capture:!1,attrs:ct(ct({},Pt),{path:m})})}}}},i.prototype.hide=function(){this.regionPath&&this.regionPath.hide(),this.items=null},i.prototype.destroy=function(){this.hide(),this.regionPath&&this.regionPath.remove(!0),a.prototype.destroy.call(this)},i}(vi),m1=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.timeStamp=0,t}return i.prototype.show=function(){var t=this.context,e=t.event,n=t.view,r=n.isTooltipLocked();if(!r){var o=this.timeStamp,s=+new Date,l=he(t.view.getOptions(),"tooltip.showDelay",16);if(s-o>l){var u=this.location,c={x:e.x,y:e.y};(!u||!ui(u,c))&&this.showTooltip(n,c),this.timeStamp=s,this.location=c}}},i.prototype.hide=function(){var t=this.context.view,e=t.getController("tooltip"),n=this.context.event,r=n.clientX,o=n.clientY;e.isCursorEntered({x:r,y:o})||t.isTooltipLocked()||(this.hideTooltip(t),this.location=null)},i.prototype.showTooltip=function(t,e){t.showTooltip(e)},i.prototype.hideTooltip=function(t){t.hideTooltip()},i}(vi),V4=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.showTooltip=function(t,e){var n=as(t);Nt(n,function(r){var o=id(t,r,e);r.showTooltip(o)})},i.prototype.hideTooltip=function(t){var e=as(t);Nt(e,function(n){n.hideTooltip()})},i}(m1),$4=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.timeStamp=0,t}return i.prototype.destroy=function(){a.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},i.prototype.show=function(){var t=this.context,e=t.event,n=this.timeStamp,r=+new Date;if(r-n>16){var o=this.location,s={x:e.x,y:e.y};(!o||!ui(o,s))&&this.showTooltip(s),this.timeStamp=r,this.location=s}},i.prototype.hide=function(){this.hideTooltip(),this.location=null},i.prototype.showTooltip=function(t){var e=this.context,n=e.event,r=n.target;if(r&&r.get("tip")){this.tooltip||this.renderTooltip();var o=r.get("tip");this.tooltip.update(ct({title:o},t)),this.tooltip.show()}},i.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},i.prototype.renderTooltip=function(){var t,e=this.context.view,n=e.canvas,r={start:{x:0,y:0},end:{x:n.get("width"),y:n.get("height")}},o=e.getTheme(),s=he(o,["components","tooltip","domStyles"],{}),l=new Vc({parent:n.get("el").parentNode,region:r,visible:!1,crosshairs:null,domStyles:ct({},_n({},s,(t={},t[Is]={"max-width":"50%"},t[js]={"word-break":"break-all"},t)))});l.init(),l.setCapture(!1),this.tooltip=l},i}(vi),gv=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.stateName="",t}return i.prototype.hasState=function(t){return t.hasState(this.stateName)},i.prototype.setElementState=function(t,e){t.setState(this.stateName,e)},i.prototype.setState=function(){this.setStateEnable(!0)},i.prototype.clear=function(){var t=this.context.view;this.clearViewState(t)},i.prototype.clearViewState=function(t){var e=this,n=py(t,this.stateName);Nt(n,function(r){e.setElementState(r,!1)})},i}(vi);function Zg(a){return he(a.get("delegateObject"),"item")}var pv=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.ignoreListItemStates=["unchecked"],t}return i.prototype.isItemIgnore=function(t,e){var n=this.ignoreListItemStates,r=n.filter(function(o){return e.hasState(t,o)});return!!r.length},i.prototype.setStateByComponent=function(t,e,n){var r=this.context.view,o=t.get("field"),s=ji(r);this.setElementsStateByItem(s,o,e,n)},i.prototype.setStateByElement=function(t,e){this.setElementState(t,e)},i.prototype.isMathItem=function(t,e,n){var r=this.context.view,o=ou(r,e),s=Wo(t,e);return!qe(s)&&n.name===o.getText(s)},i.prototype.setElementsStateByItem=function(t,e,n,r){var o=this;Nt(t,function(s){o.isMathItem(s,e,n)&&s.setState(o.stateName,r)})},i.prototype.setStateEnable=function(t){var e=sl(this.context);if(e)dy(this.context)&&this.setStateByElement(e,t);else{var n=au(this.context);if(tf(n)){var r=n.item,o=n.component;if(r&&o&&!this.isItemIgnore(r,o)){var s=this.context.event.gEvent;if(s&&s.fromShape&&s.toShape&&Zg(s.fromShape)===Zg(s.toShape))return;this.setStateByComponent(o,r,t)}}}},i.prototype.toggle=function(){var t=sl(this.context);if(t){var e=t.hasState(this.stateName);this.setElementState(t,!e)}},i.prototype.reset=function(){this.setStateEnable(!1)},i}(gv),X4=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.stateName="active",t}return i.prototype.active=function(){this.setState()},i}(pv),U4=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.cache={},t}return i.prototype.getColorScale=function(t,e){var n=e.geometry.getAttribute("color");if(!n)return null;var r=t.getScaleByField(n.getFields()[0]);return r},i.prototype.getLinkPath=function(t,e){var n=this.context.view,r=n.getCoordinate().isTransposed,o=t.shape.getCanvasBBox(),s=e.shape.getCanvasBBox(),l=r?[["M",o.minX,o.minY],["L",s.minX,s.maxY],["L",s.maxX,s.maxY],["L",o.maxX,o.minY],["Z"]]:[["M",o.maxX,o.minY],["L",s.minX,s.minY],["L",s.minX,s.maxY],["L",o.maxX,o.maxY],["Z"]];return l},i.prototype.addLinkShape=function(t,e,n,r){var o={opacity:.4,fill:e.shape.attr("fill")};t.addShape({type:"path",attrs:ct(ct({},_n({},o,Rn(r)?r(o,e):r)),{path:this.getLinkPath(e,n)})})},i.prototype.linkByElement=function(t,e){var n=this,r=this.context.view,o=this.getColorScale(r,t);if(!!o){var s=Wo(t,o.field);if(!this.cache[s]){var l=rC(r,o.field,s),u=this.linkGroup,c=u.addGroup();this.cache[s]=c;var f=l.length;Nt(l,function(h,d){if(d=0},e)},i}(mv),q4=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.stateName="active",t}return i.prototype.highlight=function(){this.setState()},i.prototype.setElementState=function(t,e){var n=this.context.view,r=ji(n);y1(r,function(o){return t===o},e)},i.prototype.clear=function(){var t=this.context.view;xv(t)},i}(yv),t5=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.stateName="selected",t}return i.prototype.selected=function(){this.setState()},i}(mv),e5=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.stateName="selected",t}return i.prototype.selected=function(){this.setState()},i}(pv),n5=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.stateName="selected",t}return i.prototype.selected=function(){this.setState()},i}(yv),Rl=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.stateName="",t.ignoreItemStates=[],t}return i.prototype.getTriggerListInfo=function(){var t=au(this.context),e=null;return tf(t)&&(e={item:t.item,list:t.component}),e},i.prototype.getAllowComponents=function(){var t=this,e=this.context.view,n=my(e),r=[];return Nt(n,function(o){o.isList()&&t.allowSetStateByElement(o)&&r.push(o)}),r},i.prototype.hasState=function(t,e){return t.hasState(e,this.stateName)},i.prototype.clearAllComponentsState=function(){var t=this,e=this.getAllowComponents();Nt(e,function(n){n.clearItemsState(t.stateName)})},i.prototype.allowSetStateByElement=function(t){var e=t.get("field");if(!e)return!1;if(this.cfg&&this.cfg.componentNames){var n=t.get("name");if(this.cfg.componentNames.indexOf(n)===-1)return!1}var r=this.context.view,o=ou(r,e);return o&&o.isCategory},i.prototype.allowSetStateByItem=function(t,e){var n=this.ignoreItemStates;if(n.length){var r=n.filter(function(o){return e.hasState(t,o)});return r.length===0}return!0},i.prototype.setStateByElement=function(t,e,n){var r=t.get("field"),o=this.context.view,s=ou(o,r),l=Wo(e,r),u=s.getText(l);this.setItemsState(t,u,n)},i.prototype.setStateEnable=function(t){var e=this,n=sl(this.context);if(n){var r=this.getAllowComponents();Nt(r,function(u){e.setStateByElement(u,n,t)})}else{var o=au(this.context);if(tf(o)){var s=o.item,l=o.component;this.allowSetStateByElement(l)&&this.allowSetStateByItem(s,l)&&this.setItemState(l,s,t)}}},i.prototype.setItemsState=function(t,e,n){var r=this,o=t.getItems();Nt(o,function(s){s.name===e&&r.setItemState(t,s,n)})},i.prototype.setItemState=function(t,e,n){t.setItemState(e,this.stateName,n)},i.prototype.setState=function(){this.setStateEnable(!0)},i.prototype.reset=function(){this.setStateEnable(!1)},i.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var e=t.list,n=t.item,r=this.hasState(e,n);this.setItemState(e,n,!r)}},i.prototype.clear=function(){var t=this.getTriggerListInfo();t?t.list.clearItemsState(this.stateName):this.clearAllComponentsState()},i}(vi),r5=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.stateName="active",t}return i.prototype.active=function(){this.setState()},i}(Rl),Qg="inactive",Jg="active";function i5(a){var i=a.getItems();Nt(i,function(t){a.hasState(t,Jg)&&a.setItemState(t,Jg,!1),a.hasState(t,Qg)&&a.setItemState(t,Qg,!1)})}var Mu="inactive",ml="active",Ev=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.stateName=ml,t.ignoreItemStates=["unchecked"],t}return i.prototype.setItemsState=function(t,e,n){this.setHighlightBy(t,function(r){return r.name===e},n)},i.prototype.setItemState=function(t,e,n){t.getItems(),this.setHighlightBy(t,function(r){return r===e},n)},i.prototype.setHighlightBy=function(t,e,n){var r=t.getItems();if(n)Nt(r,function(l){e(l)?(t.hasState(l,Mu)&&t.setItemState(l,Mu,!1),t.setItemState(l,ml,!0)):t.hasState(l,ml)||t.setItemState(l,Mu,!0)});else{var o=t.getItemsByState(ml),s=!0;Nt(o,function(l){if(!e(l))return s=!1,!1}),s?this.clear():Nt(r,function(l){e(l)&&(t.hasState(l,ml)&&t.setItemState(l,ml,!1),t.setItemState(l,Mu,!0))})}},i.prototype.highlight=function(){this.setState()},i.prototype.clear=function(){var t=this.getTriggerListInfo();if(t)i5(t.list);else{var e=this.getAllowComponents();Nt(e,function(n){n.clearItemsState(ml),n.clearItemsState(Mu)})}},i}(Rl),a5=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.stateName="selected",t}return i.prototype.selected=function(){this.setState()},i}(Rl),o5=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.stateName="unchecked",t}return i.prototype.unchecked=function(){this.setState()},i}(Rl),kl="unchecked",Gf="checked",s5=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.stateName=Gf,t}return i.prototype.setItemState=function(t,e,n){this.setCheckedBy(t,function(r){return r===e},n)},i.prototype.setCheckedBy=function(t,e,n){var r=t.getItems();n&&Nt(r,function(o){e(o)?(t.hasState(o,kl)&&t.setItemState(o,kl,!1),t.setItemState(o,Gf,!0)):t.hasState(o,Gf)||t.setItemState(o,kl,!0)})},i.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var e=t.list,n=t.item,r=!yc(e.getItems(),function(o){return e.hasState(o,kl)});r||e.hasState(n,kl)?this.setItemState(e,n,!0):this.reset()}},i.prototype.checked=function(){this.setState()},i.prototype.reset=function(){var t=this.getAllowComponents();Nt(t,function(e){e.clearItemsState(Gf),e.clearItemsState(kl)})},i}(Rl),zl="unchecked",l5=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.toggle=function(){var t,e,n,r,o,s,l,u,c=this.getTriggerListInfo();if(c!=null&&c.item){var f=c.list,h=c.item,d=f.getItems(),v=d.filter(function(k){return!f.hasState(k,zl)}),g=d.filter(function(k){return f.hasState(k,zl)}),p=v[0];if(d.length===v.length)try{for(var m=rr(d),y=m.next();!y.done;y=m.next()){var w=y.value;f.setItemState(w,zl,w.id!==h.id)}}catch(k){t={error:k}}finally{try{y&&!y.done&&(e=m.return)&&e.call(m)}finally{if(t)throw t.error}}else if(d.length-g.length===1)if(p.id===h.id)try{for(var x=rr(d),M=x.next();!M.done;M=x.next()){var w=M.value;f.setItemState(w,zl,!1)}}catch(k){n={error:k}}finally{try{M&&!M.done&&(r=x.return)&&r.call(x)}finally{if(n)throw n.error}}else try{for(var _=rr(d),D=_.next();!D.done;D=_.next()){var w=D.value;f.setItemState(w,zl,w.id!==h.id)}}catch(k){o={error:k}}finally{try{D&&!D.done&&(s=_.return)&&s.call(_)}finally{if(o)throw o.error}}else try{for(var C=rr(d),F=C.next();!F.done;F=C.next()){var w=F.value;f.setItemState(w,zl,w.id!==h.id)}}catch(k){l={error:k}}finally{try{F&&!F.done&&(u=C.return)&&u.call(C)}finally{if(l)throw l.error}}}},i}(Rl),qg="showRadio",Ph="legend-radio-tip",u5=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.timeStamp=0,t}return i.prototype.show=function(){var t=this.getTriggerListInfo();if(t!=null&&t.item){var e=t.list,n=t.item;e.setItemState(n,qg,!0)}},i.prototype.hide=function(){var t=this.getTriggerListInfo();if(t!=null&&t.item){var e=t.list,n=t.item;e.setItemState(n,qg,!1)}},i.prototype.destroy=function(){a.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},i.prototype.showTip=function(){var t=this.context,e=t.event,n=this.timeStamp,r=+new Date,o=this.context.event.target;if(r-n>16&&o.get("name")==="legend-item-radio"){var s=this.location,l={x:e.x,y:e.y};this.timeStamp=r,this.location=l,(!s||!ui(s,l))&&this.showTooltip(l)}},i.prototype.hideTip=function(){this.hideTooltip(),this.location=null},i.prototype.showTooltip=function(t){var e=this.context,n=e.event,r=n.target;if(r&&r.get("tip")){this.tooltip||this.renderTooltip();var o=e.view.getCanvas().get("el").getBoundingClientRect(),s=o.x,l=o.y;this.tooltip.update(ct(ct({title:r.get("tip")},t),{x:t.x+s,y:t.y+l})),this.tooltip.show()}},i.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},i.prototype.renderTooltip=function(){var t,e=(t={},t[Is]={padding:"6px 8px",transform:"translate(-50%, -80%)",background:"rgba(0,0,0,0.75)",color:"#fff","border-radius":"2px","z-index":100},t[js]={"font-size":"12px","line-height":"14px","margin-bottom":0,"word-break":"break-all"},t);document.getElementById(Ph)&&document.body.removeChild(document.getElementById(Ph));var n=new Vc({parent:document.body,region:null,visible:!1,crosshairs:null,domStyles:e,containerId:Ph});n.init(),n.setCapture(!1),this.tooltip=n},i}(Rl),Mv=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.maskShape=null,t.points=[],t.starting=!1,t.moving=!1,t.preMovePoint=null,t.shapeType="path",t}return i.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},i.prototype.emitEvent=function(t){var e="mask:".concat(t),n=this.context.view,r=this.context.event;n.emit(e,{target:this.maskShape,shape:this.maskShape,points:this.points,x:r.x,y:r.y})},i.prototype.createMask=function(){var t=this.context.view,e=this.getMaskAttrs(),n=t.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:ct({fill:"#C5D4EB",opacity:.3},e)});return n},i.prototype.getMaskPath=function(){return[]},i.prototype.show=function(){this.maskShape&&(this.maskShape.show(),this.emitEvent("show"))},i.prototype.start=function(t){this.starting=!0,this.moving=!1,this.points=[this.getCurrentPoint()],this.maskShape||(this.maskShape=this.createMask(),this.maskShape.set("capture",!1)),this.updateMask(t==null?void 0:t.maskStyle),this.emitEvent("start")},i.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint()},i.prototype.move=function(){if(!(!this.moving||!this.maskShape)){var t=this.getCurrentPoint(),e=this.preMovePoint,n=t.x-e.x,r=t.y-e.y,o=this.points;Nt(o,function(s){s.x+=n,s.y+=r}),this.updateMask(),this.emitEvent("change"),this.preMovePoint=t}},i.prototype.updateMask=function(t){var e=_n({},this.getMaskAttrs(),t);this.maskShape.attr(e)},i.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null},i.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.maskShape&&this.maskShape.set("capture",!0)},i.prototype.hide=function(){this.maskShape&&(this.maskShape.hide(),this.emitEvent("hide"))},i.prototype.resize=function(){this.starting&&this.maskShape&&(this.points.push(this.getCurrentPoint()),this.updateMask(),this.emitEvent("change"))},i.prototype.destroy=function(){this.points=[],this.maskShape&&this.maskShape.remove(),this.maskShape=null,this.preMovePoint=null,a.prototype.destroy.call(this)},i}(vi),f5=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.shapeType="circle",t}return i.prototype.getMaskAttrs=function(){var t=this.points,e=Ii(this.points),n=0,r=0,o=0;if(t.length){var s=t[0];n=$d(s,e)/2,r=(e.x+s.x)/2,o=(e.y+s.y)/2}return{x:r,y:o,r:n}},i}(Mv),w1=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.shapeType="rect",t}return i.prototype.getRegion=function(){var t=this.points;return{start:ro(t),end:Ii(t)}},i.prototype.getMaskAttrs=function(){var t=this.getRegion(),e=t.start,n=t.end,r=Math.min(e.x,n.x),o=Math.min(e.y,n.y),s=Math.abs(n.x-e.x),l=Math.abs(n.y-e.y);return{x:r,y:o,width:s,height:l}},i}(Mv);function tp(a){a.x=Yr(a.x,0,1),a.y=Yr(a.y,0,1)}var E1=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.dim="x",t.inPlot=!0,t}return i.prototype.getRegion=function(){var t=null,e=null,n=this.points,r=this.dim,o=this.context.view.getCoordinate(),s=o.invert(ro(n)),l=o.invert(Ii(n));return this.inPlot&&(tp(s),tp(l)),r==="x"?(t=o.convert({x:s.x,y:0}),e=o.convert({x:l.x,y:1})):(t=o.convert({x:0,y:s.y}),e=o.convert({x:1,y:l.y})),{start:t,end:e}},i}(w1),M1=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getMaskPath=function(){var t=this.points,e=[];return t.length&&(Nt(t,function(n,r){r===0?e.push(["M",n.x,n.y]):e.push(["L",n.x,n.y])}),e.push(["L",t[0].x,t[0].y])),e},i.prototype.getMaskAttrs=function(){return{path:this.getMaskPath()}},i.prototype.addPoint=function(){this.resize()},i}(Mv),c5=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.getMaskPath=function(){var t=this.points;return oC(t,!0)},i}(M1),h5=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.setCursor=function(t){var e=this.context.view;e.getCanvas().setCursor(t)},i.prototype.default=function(){this.setCursor("default")},i.prototype.pointer=function(){this.setCursor("pointer")},i.prototype.move=function(){this.setCursor("move")},i.prototype.crosshair=function(){this.setCursor("crosshair")},i.prototype.wait=function(){this.setCursor("wait")},i.prototype.help=function(){this.setCursor("help")},i.prototype.text=function(){this.setCursor("text")},i.prototype.eResize=function(){this.setCursor("e-resize")},i.prototype.wResize=function(){this.setCursor("w-resize")},i.prototype.nResize=function(){this.setCursor("n-resize")},i.prototype.sResize=function(){this.setCursor("s-resize")},i.prototype.neResize=function(){this.setCursor("ne-resize")},i.prototype.nwResize=function(){this.setCursor("nw-resize")},i.prototype.seResize=function(){this.setCursor("se-resize")},i.prototype.swResize=function(){this.setCursor("sw-resize")},i.prototype.nsResize=function(){this.setCursor("ns-resize")},i.prototype.ewResize=function(){this.setCursor("ew-resize")},i.prototype.zoomIn=function(){this.setCursor("zoom-in")},i.prototype.zoomOut=function(){this.setCursor("zoom-out")},i}(vi),d5=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.filterView=function(t,e,n){var r=this;t.getScaleByField(e)&&t.filter(e,n),t.views&&t.views.length&&Nt(t.views,function(o){r.filterView(o,e,n)})},i.prototype.filter=function(){var t=au(this.context);if(t){var e=this.context.view,n=t.component,r=n.get("field");if(tf(t)){if(r){var o=n.getItemsByState("unchecked"),s=ou(e,r),l=o.map(function(d){return d.name});l.length?this.filterView(e,r,function(d){var v=s.getText(d);return!l.includes(v)}):this.filterView(e,r,null),e.render(!0)}}else if(vy(t)){var u=n.getValue(),c=Pn(u,2),f=c[0],h=c[1];this.filterView(e,r,function(d){return d>=f&&d<=h}),e.render(!0)}}},i}(vi);function ep(a,i,t,e){var n=Math.min(t[i],e[i]),r=Math.max(t[i],e[i]),o=Pn(a.range,2),s=o[0],l=o[1];if(nl&&(r=l),n===l&&r===l)return null;var u=a.invert(n),c=a.invert(r);if(a.isCategory){var f=a.values.indexOf(u),h=a.values.indexOf(c),d=a.values.slice(f,h+1);return function(v){return d.includes(v)}}else return function(v){return v>=u&&v<=c}}var Mo;(function(a){a.FILTER="brush-filter-processing",a.RESET="brush-filter-reset",a.BEFORE_FILTER="brush-filter:beforefilter",a.AFTER_FILTER="brush-filter:afterfilter",a.BEFORE_RESET="brush-filter:beforereset",a.AFTER_RESET="brush-filter:afterreset"})(Mo||(Mo={}));var Zc=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.dims=["x","y"],t.startPoint=null,t.isStarted=!1,t}return i.prototype.hasDim=function(t){return this.dims.includes(t)},i.prototype.start=function(){var t=this.context;this.isStarted=!0,this.startPoint=t.getCurrentPoint()},i.prototype.filter=function(){var t,e;if(ef(this.context)){var n=this.context.event.target,r=n.getCanvasBBox();t={x:r.x,y:r.y},e={x:r.maxX,y:r.maxY}}else{if(!this.isStarted)return;t=this.startPoint,e=this.context.getCurrentPoint()}if(!(Math.abs(t.x-e.x)<5||Math.abs(t.x-e.y)<5)){var o=this.context,s=o.view,l=o.event,u={view:s,event:l,dims:this.dims};s.emit(Mo.BEFORE_FILTER,qi.fromData(s,Mo.BEFORE_FILTER,u));var c=s.getCoordinate(),f=c.invert(e),h=c.invert(t);if(this.hasDim("x")){var d=s.getXScale(),v=ep(d,"x",f,h);this.filterView(s,d.field,v)}if(this.hasDim("y")){var g=s.getYScales()[0],v=ep(g,"y",f,h);this.filterView(s,g.field,v)}this.reRender(s,{source:Mo.FILTER}),s.emit(Mo.AFTER_FILTER,qi.fromData(s,Mo.AFTER_FILTER,u))}},i.prototype.end=function(){this.isStarted=!1},i.prototype.reset=function(){var t=this.context.view;if(t.emit(Mo.BEFORE_RESET,qi.fromData(t,Mo.BEFORE_RESET,{})),this.isStarted=!1,this.hasDim("x")){var e=t.getXScale();this.filterView(t,e.field,null)}if(this.hasDim("y")){var n=t.getYScales()[0];this.filterView(t,n.field,null)}this.reRender(t,{source:Mo.RESET}),t.emit(Mo.AFTER_RESET,qi.fromData(t,Mo.AFTER_RESET,{}))},i.prototype.filterView=function(t,e,n){t.filter(e,n)},i.prototype.reRender=function(t,e){t.render(!0,e)},i}(vi),bv=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.filterView=function(t,e,n){var r=as(t);Nt(r,function(o){o.filter(e,n)})},i.prototype.reRender=function(t){var e=as(t);Nt(e,function(n){n.render(!0)})},i}(Zc),v5=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.filter=function(){var t=au(this.context),e=this.context.view,n=ji(e);if(ef(this.context)){var r=Gd(this.context,10);r&&Nt(n,function(g){r.includes(g)?g.show():g.hide()})}else if(t){var o=t.component,s=o.get("field");if(tf(t)){if(s){var l=o.getItemsByState("unchecked"),u=ou(e,s),c=l.map(function(g){return g.name});Nt(n,function(g){var p=Wo(g,s),m=u.getText(p);c.indexOf(m)>=0?g.hide():g.show()})}}else if(vy(t)){var f=o.getValue(),h=Pn(f,2),d=h[0],v=h[1];Nt(n,function(g){var p=Wo(g,s);p>=d&&p<=v?g.show():g.hide()})}}},i.prototype.clear=function(){var t=ji(this.context.view);Nt(t,function(e){e.show()})},i.prototype.reset=function(){this.clear()},i}(vi),b1=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.byRecord=!1,t}return i.prototype.filter=function(){ef(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},i.prototype.filterByRecord=function(){var t=this.context.view,e=Gd(this.context,10);if(!!e){var n=t.getXScale().field,r=t.getYScales()[0].field,o=e.map(function(l){return l.getModel().data}),s=as(t);Nt(s,function(l){var u=ji(l);Nt(u,function(c){var f=c.getModel().data;yy(o,f,n,r)?c.show():c.hide()})})}},i.prototype.filterByBBox=function(){var t=this,e=this.context.view,n=as(e);Nt(n,function(r){var o=gy(t.context,r,10),s=ji(r);o&&Nt(s,function(l){o.includes(l)?l.show():l.hide()})})},i.prototype.reset=function(){var t=as(this.context.view);Nt(t,function(e){var n=ji(e);Nt(n,function(r){r.show()})})},i}(vi),g5=10,p5=5,m5=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.buttonGroup=null,t.buttonCfg={name:"button",text:"button",textStyle:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"},padding:[8,10],style:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},activeStyle:{fill:"#e6e6e6"}},t}return i.prototype.getButtonCfg=function(){return _n(this.buttonCfg,this.cfg)},i.prototype.drawButton=function(){var t=this.getButtonCfg(),e=this.context.view.foregroundGroup.addGroup({name:t.name}),n=e.addShape({type:"text",name:"button-text",attrs:ct({text:t.text},t.textStyle)}),r=n.getBBox(),o=Xd(t.padding),s=e.addShape({type:"rect",name:"button-rect",attrs:ct({x:r.x-o[3],y:r.y-o[0],width:r.width+o[1]+o[3],height:r.height+o[0]+o[2]},t.style)});s.toBack(),e.on("mouseenter",function(){s.attr(t.activeStyle)}),e.on("mouseleave",function(){s.attr(t.style)}),this.buttonGroup=e},i.prototype.resetPosition=function(){var t=this.context.view,e=t.getCoordinate(),n=e.convert({x:1,y:1}),r=this.buttonGroup,o=r.getBBox(),s=ti(null,[["t",n.x-o.width-g5,n.y+o.height+p5]]);r.setMatrix(s)},i.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},i.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},i.prototype.destroy=function(){var t=this.buttonGroup;t&&t.remove(),a.prototype.destroy.call(this)},i}(vi),y5=4,x5=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.starting=!1,t.dragStart=!1,t}return i.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint()},i.prototype.drag=function(){if(!!this.startPoint){var t=this.context.getCurrentPoint(),e=this.context.view,n=this.context.event;this.dragStart?e.emit("drag",{target:n.target,x:n.x,y:n.y}):$d(t,this.startPoint)>y5&&(e.emit("dragstart",{target:n.target,x:n.x,y:n.y}),this.dragStart=!0)}},i.prototype.end=function(){if(this.dragStart){var t=this.context.view,e=this.context.event;t.emit("dragend",{target:e.target,x:e.x,y:e.y})}this.starting=!1,this.dragStart=!1},i}(vi),w5=5,E5=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.starting=!1,t.isMoving=!1,t.startPoint=null,t.startMatrix=null,t}return i.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint(),this.startMatrix=this.context.view.middleGroup.getMatrix()},i.prototype.move=function(){if(!!this.starting){var t=this.startPoint,e=this.context.getCurrentPoint(),n=$d(t,e);if(n>w5&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var r=this.context.view,o=ti(this.startMatrix,[["t",e.x-t.x,e.y-t.y]]);r.backgroundGroup.setMatrix(o),r.foregroundGroup.setMatrix(o),r.middleGroup.setMatrix(o)}}},i.prototype.end=function(){this.isMoving&&(this.isMoving=!1),this.startMatrix=null,this.starting=!1,this.startPoint=null},i.prototype.reset=function(){this.starting=!1,this.startPoint=null,this.isMoving=!1;var t=this.context.view;t.backgroundGroup.resetMatrix(),t.foregroundGroup.resetMatrix(),t.middleGroup.resetMatrix(),this.isMoving=!1},i}(vi),np="x",rp="y",_1=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.dims=[np,rp],t.cfgFields=["dims"],t.cacheScaleDefs={},t}return i.prototype.hasDim=function(t){return this.dims.includes(t)},i.prototype.getScale=function(t){var e=this.context.view;return t==="x"?e.getXScale():e.getYScales()[0]},i.prototype.resetDim=function(t){var e=this.context.view;if(this.hasDim(t)&&this.cacheScaleDefs[t]){var n=this.getScale(t);e.scale(n.field,this.cacheScaleDefs[t]),this.cacheScaleDefs[t]=null}},i.prototype.reset=function(){this.resetDim(np),this.resetDim(rp);var t=this.context.view;t.render(!0)},i}(vi),M5=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.startPoint=null,t.starting=!1,t.startCache={},t}return i.prototype.start=function(){var t=this;this.startPoint=this.context.getCurrentPoint(),this.starting=!0;var e=this.dims;Nt(e,function(n){var r=t.getScale(n),o=r.min,s=r.max,l=r.values;t.startCache[n]={min:o,max:s,values:l}})},i.prototype.end=function(){this.startPoint=null,this.starting=!1,this.startCache={}},i.prototype.translate=function(){var t=this;if(!!this.starting){var e=this.startPoint,n=this.context.view.getCoordinate(),r=this.context.getCurrentPoint(),o=n.invert(e),s=n.invert(r),l=s.x-o.x,u=s.y-o.y,c=this.context.view,f=this.dims;Nt(f,function(h){t.translateDim(h,{x:l*-1,y:u*-1})}),c.render(!0)}},i.prototype.translateDim=function(t,e){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.translateLinear(t,n,e)}},i.prototype.translateLinear=function(t,e,n){var r=this.context.view,o=this.startCache[t],s=o.min,l=o.max,u=l-s,c=n[t]*u;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:s,max:l}),r.scale(e.field,{nice:!1,min:s+c,max:l+c})},i.prototype.reset=function(){a.prototype.reset.call(this),this.startPoint=null,this.starting=!1},i}(_1),b5=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.zoomRatio=.05,t}return i.prototype.zoomIn=function(){this.zoom(this.zoomRatio)},i.prototype.zoom=function(t){var e=this,n=this.dims;Nt(n,function(r){e.zoomDim(r,t)}),this.context.view.render(!0)},i.prototype.zoomOut=function(){this.zoom(-1*this.zoomRatio)},i.prototype.zoomDim=function(t,e){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.zoomLinear(t,n,e)}},i.prototype.zoomLinear=function(t,e,n){var r=this.context.view;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:e.min,max:e.max});var o=this.cacheScaleDefs[t],s=o.max-o.min,l=e.min,u=e.max,c=n*s,f=l-c,h=u+c,d=h-f,v=d/s;h>f&&v<100&&v>.01&&r.scale(e.field,{nice:!1,min:l-c,max:u+c})},i}(_1);function _5(a){var i=a.gEvent.originalEvent;return i.deltaY>0}var S5=1,C5=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.scroll=function(t){var e=this.context,n=e.view,r=e.event;if(!!n.getOptions().scrollbar){var o=(t==null?void 0:t.wheelDelta)||S5,s=n.getController("scrollbar"),l=n.getXScale(),u=n.getOptions().data,c=Fa(Os(u,l.field)),f=Fa(l.values),h=s.getValue(),d=Math.floor((c-f)*h),v=d+(_5(r)?o:-o),g=o/(c-f)/1e4,p=Yr(v/(c-f)+g,0,1);s.setValue(p)}},i}(vi),P5="aixs-description-tooltip",T5=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.show=function(){var t=this.context,e=au(t).axis,n=e.cfg.title,r=n.description,o=n.text,s=n.descriptionTooltipStyle,l=t.event,u=l.x,c=l.y;this.tooltip||this.renderTooltip(),this.tooltip.update({title:o||"",customContent:function(){return`
    \u5B57\u6BB5\u8BF4\u660E\uFF1A`).concat(r,`
    `)},x:u,y:c}),this.tooltip.show()},i.prototype.destroy=function(){a.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},i.prototype.hide=function(){this.tooltip&&this.tooltip.hide()},i.prototype.renderTooltip=function(){var t,e=this.context.view,n=e.canvas,r={start:{x:0,y:0},end:{x:n.get("width"),y:n.get("height")}},o=new Vc({parent:n.get("el").parentNode,region:r,visible:!1,containerId:P5,domStyles:ct({},_n({},(t={},t[Is]={"max-width":"50%",padding:"10px","line-height":"15px","font-size":"12px",color:"rgba(0, 0, 0, .65)"},t[js]={"word-break":"break-all","margin-bottom":"3px"},t)))});o.init(),o.setCapture(!1),this.tooltip=o},i}(vi);xC("dark",wy(sP));Ep("canvas",eT);Ep("svg",$T);ds("Polygon",oA);ds("Interval",eA);ds("Schema",sA);ds("Path",lv);ds("Point",iA);ds("Line",nA);ds("Area",UT);ds("Edge",KT);ds("Heatmap",ZT);ds("Violin",uA);Xc("base",Jd);Xc("interval",SA);Xc("pie",CA);Xc("polar",h1);ka("overlap",zA);ka("distribute",TA);ka("fixed-overlap",kA);ka("hide-overlap",ZA);ka("limit-in-shape",BA);ka("limit-in-canvas",DA);ka("limit-in-plot",d4);ka("pie-outer",OA);ka("adjust-color",JA);ka("interval-adjust-position",n4);ka("interval-hide-overlap",i4);ka("point-adjust-position",s4);ka("pie-spider",LA);ka("path-adjust-position",f4);oo("fade-in",v4);oo("fade-out",g4);oo("grow-in-x",m4);oo("grow-in-xy",x4);oo("grow-in-y",y4);oo("scale-in-x",M4);oo("scale-in-y",b4);oo("wave-in",S4);oo("zoom-in",C4);oo("zoom-out",P4);oo("position-update",E4);oo("sector-path-update",_4);oo("path-in",w4);hu("rect",j4);hu("mirror",I4);hu("list",A4);hu("matrix",O4);hu("circle",T4);hu("tree",L4);du("axis",R4);du("legend",F4);du("tooltip",RC);du("annotation",B4);du("slider",N4);du("scrollbar",Y4);Wn("tooltip",m1);Wn("sibling-tooltip",V4);Wn("ellipsis-text",$4);Wn("element-active",X4);Wn("element-single-active",Z4);Wn("element-range-active",K4);Wn("element-highlight",wv);Wn("element-highlight-by-x",J4);Wn("element-highlight-by-color",Q4);Wn("element-single-highlight",q4);Wn("element-range-highlight",x1);Wn("element-sibling-highlight",x1,{effectSiblings:!0,effectByRecord:!0});Wn("element-selected",e5);Wn("element-single-selected",n5);Wn("element-range-selected",t5);Wn("element-link-by-color",U4);Wn("active-region",G4);Wn("list-active",r5);Wn("list-selected",a5);Wn("list-highlight",Ev);Wn("list-unchecked",o5);Wn("list-checked",s5);Wn("list-focus",l5);Wn("list-radio",u5);Wn("legend-item-highlight",Ev,{componentNames:["legend"]});Wn("axis-label-highlight",Ev,{componentNames:["axis"]});Wn("axis-description",T5);Wn("rect-mask",w1);Wn("x-rect-mask",E1,{dim:"x"});Wn("y-rect-mask",E1,{dim:"y"});Wn("circle-mask",f5);Wn("path-mask",M1);Wn("smooth-path-mask",c5);Wn("cursor",h5);Wn("data-filter",d5);Wn("brush",Zc);Wn("brush-x",Zc,{dims:["x"]});Wn("brush-y",Zc,{dims:["y"]});Wn("sibling-filter",bv);Wn("sibling-x-filter",bv);Wn("sibling-y-filter",bv);Wn("element-filter",v5);Wn("element-sibling-filter",b1);Wn("element-sibling-filter-record",b1,{byRecord:!0});Wn("view-drag",x5);Wn("view-move",E5);Wn("scale-translate",M5);Wn("scale-zoom",b5);Wn("reset-button",m5,{name:"reset-button",text:"reset"});Wn("mousewheel-scroll",C5);function il(a){return a.isInPlot()}Cr("tooltip",{start:[{trigger:"plot:mousemove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"plot:touchmove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseleave",action:"tooltip:hide"},{trigger:"plot:leave",action:"tooltip:hide"},{trigger:"plot:touchend",action:"tooltip:hide"}]});Cr("ellipsis-text",{start:[{trigger:"legend-item-name:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"legend-item-name:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"legend-item-name:mouseleave",action:"ellipsis-text:hide"},{trigger:"legend-item-name:touchend",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseleave",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseout",action:"ellipsis-text:hide"},{trigger:"axis-label:touchend",action:"ellipsis-text:hide"}]});Cr("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]});Cr("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]});Cr("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]});Cr("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]});Cr("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]});Cr("legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","element-active:reset"]}]});Cr("legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","element-highlight:reset"]}]});Cr("axis-label-highlight",{start:[{trigger:"axis-label:mouseenter",action:["axis-label-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"axis-label:mouseleave",action:["axis-label-highlight:reset","element-highlight:reset"]}]});Cr("element-list-highlight",{start:[{trigger:"element:mouseenter",action:["list-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"element:mouseleave",action:["list-highlight:reset","element-highlight:reset"]}]});Cr("element-range-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:function(a){return!a.isInShape("mask")},action:["rect-mask:start","rect-mask:show"]},{trigger:"mask:dragstart",action:["rect-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:drag",action:["rect-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end"]},{trigger:"mask:dragend",action:["rect-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(a){return!a.isInPlot()},action:["element-range-highlight:clear","rect-mask:end","rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","rect-mask:hide"]}]});Cr("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:il,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:il,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:il,action:["brush:filter","brush:end","rect-mask:end","rect-mask:hide","reset-button:show"]}],rollback:[{trigger:"reset-button:click",action:["brush:reset","reset-button:hide","cursor:crosshair"]}]});Cr("brush-visible",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"plot:mousedown",action:["rect-mask:start","rect-mask:show"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end","rect-mask:hide","element-filter:filter","element-range-highlight:clear"]}],rollback:[{trigger:"dblclick",action:["element-filter:clear"]}]});Cr("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:il,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:il,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:il,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]});Cr("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:il,action:"path-mask:start"},{trigger:"mousedown",isEnable:il,action:"path-mask:show"}],processing:[{trigger:"mousemove",action:"path-mask:addPoint"}],end:[{trigger:"mouseup",action:"path-mask:end"}],rollback:[{trigger:"dblclick",action:"path-mask:hide"}]});Cr("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]});Cr("legend-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:["cursor:pointer","list-radio:show"]},{trigger:"legend-item:mouseleave",action:["cursor:default","list-radio:hide"]}],start:[{trigger:"legend-item:click",isEnable:function(a){return!a.isInShape("legend-item-radio")},action:["legend-item-highlight:reset","element-highlight:reset","list-unchecked:toggle","data-filter:filter","list-radio:show"]},{trigger:"legend-item-radio:mouseenter",action:["list-radio:showTip"]},{trigger:"legend-item-radio:mouseleave",action:["list-radio:hideTip"]},{trigger:"legend-item-radio:click",action:["list-focus:toggle","data-filter:filter","list-radio:show"]}]});Cr("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]});Cr("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]});Cr("legend-visible-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["legend-item-highlight:reset","element-highlight:reset","list-unchecked:toggle","element-filter:filter"]}]});Cr("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]});Cr("axis-description",{start:[{trigger:"axis-description:mousemove",action:"axis-description:show"}],end:[{trigger:"axis-description:mouseleave",action:"axis-description:hide"}]});function ip(a){return a.gEvent.preventDefault(),a.gEvent.originalEvent.deltaY>0}Cr("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(a){return ip(a.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(a){return!ip(a.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]});Cr("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]});Cr("plot-mousewheel-scroll",{start:[{trigger:"plot:mousewheel",action:"mousewheel-scroll:scroll"}]});const A5=ss({props:{navigateItem:{type:String},color:{type:String}},setup(a,i){const{airValue:t,airStatus:e}=fp(),n=ls({airStatus:e,achart:null});I1(t,(o,s)=>{r()}),j1(()=>{n.achart&&n.achart.destroy()});const r=()=>{n.achart&&(n.achart.destroy(),console.log("allData.achart",n.achart),n.achart=null);var o=t.value||0;const s=[{type:"\u5F00\u542F",value:o},{type:"\u5173\u95ED",value:100-o}],l=new Kd({container:"container",autoFit:!0});l.data(s),l.legend(!1),l.tooltip(!1),l.coordinate("theta",{radius:.9,innerRadius:.8});const u=l.interval().animate({appear:{easing:"easeQuadIn",delay:0,duration:1e3}}).adjust("stack").position("value").color("type",["l(90) 0:#BFA17E 1:#E0D1BB","#3C3F52"]).style({opacity:1,strokeOpacity:0,lineCap:"round"});var c=`
    ${s[0].value}%
    `;l.annotation().html({position:["50%","50%"],html:c,offsetY:-43}),l.annotation().text({position:["50%","50%"],content:"\u7A7A\u8C03\u5F00\u542F\u7387",style:{fontSize:16,fill:"#F8EDDA",fontWeight:400,textAlign:"center"},offsetY:26}),l.render(),n.achart=l,u.elements[0].setState("active",!0)};return Ho(()=>{}),{...us(n)}}});const O5=a=>(Ds("data-v-6f8e2b6b"),a=a(),Bs(),a),I5={class:"airSwitch"},j5={class:"airWrap"},L5=O5(()=>ke("div",{class:"container",id:"container"},null,-1)),D5={class:"air-title"};function B5(a,i,t,e,n,r){return Dr(),Lr("div",I5,[ke("div",j5,[L5,ke("div",D5,[ke("span",null,nr(a.airStatus?"\u7A7A\u8C03\u5DF2\u5F00\u542F":"\u7A7A\u8C03\u5DF2\u5173\u95ED"),1)])])])}const DI=fs(A5,[["render",B5],["__scopeId","data-v-6f8e2b6b"]]),R5=ss({props:{screenType:{type:String}},setup(a,i){const t=ls({}),e=tu(),n=(r,o,s)=>{gr("point","breath-point",{draw(d,v){const g=d.data,p={x:d.x,y:d.y},m=v.addGroup();return g.time===r[r.length-1].time&&g.temp===r[r.length-1].temp&&(m.addShape("circle",{attrs:{x:p.x,y:p.y,r:8,fill:"#F2E2CC"}}),m.addShape("circle",{attrs:{x:p.x,y:p.y,r:4,fill:"#ffffff",filter:"blur(2px)",opacity:.5}})),m}}),e.value&&e.value.offsetWidth,e.value&&e.value.offsetHeight;var l=e.value&&new Kd({container:"tempChartBox",autoFit:!0,padding:[70,50,46,60]});l.data(r),l.scale("time",{}),l.scale("temp",{type:"linear",minTickInterval:1,min:o,max:s}),l.axis("time",{line:{style:{lineWidth:1,stroke:"rgba(224,194,155,0.2)",lineDash:[3,3]}},label:{style:{fill:"#E0C29B",fontSize:12}},tickLine:null}),l.axis("temp",{tickLine:null,grid:{line:{style:{lineWidth:1,stroke:"rgba(224,194,155,0.2)",lineDash:[3,3]}}},label:{style:{fill:"#E0C29B",fontSize:12}}}),l.legend(!1),l.line().animate({appear:{easing:"easeQuadIn",delay:100,duration:1500}}).position("time*temp").color("#F2E3CD").shape("smooth").tooltip(!1).style({lineWidth:3}),l.area().animate({appear:{easing:"easeQuadIn",delay:100,duration:1500}}).position("time*temp").color("l(90) 0:rgba(237,217,190,0.8) 0.6:rgb(149, 162, 194, 0.01)").tooltip(!1).shape("smooth"),l.point().tooltip(!1).position("time*temp").shape("breath-point");var u=r[r.length-1],c=Ol(),f=c.format("YYYY.MM.DD");const h=`
    ${f}${u&&u.time}
    \u5BA4\u5185\u6E29\u5EA6\uFF1A${u&&u.temp&&Number(u.temp).toFixed(1)}\u2103
    `;return u&&u.time&&l.annotation().html({position:u,html:h,alignX:"right",alignY:"bottom",offsetX:60,offsetY:-15}),l.annotation().text({position:function(d,v){return["0%","0%"]},content:"\u6E29\u5EA6/\u2103",style:{fill:"#E0C29B",fontSize:"12"},offsetX:-40,offsetY:-46}),l.render(),l};return Ho(()=>{L1().then(r=>{var o=r.data.data||[],s=[];o.forEach(c=>{var f=c.time||"",h=f.substr(8,2),d=f.substr(10,2);c.time=h+":"+d,c.temp=c&&c.temp?Number(c.temp).toFixed(1):c.temp,c.temp&&s.push(c.temp)});var l=Math.floor(Math.min(...s)),u=Math.ceil(Math.max(...s));op(()=>{n(o,l,u)})}).catch(r=>{})}),{...us(t),tempChartRef:e}}});const F5=a=>(Ds("data-v-a29e2755"),a=a(),Bs(),a),N5={class:"temChartCont"},k5={class:"subhead-title"},z5=F5(()=>ke("span",null,"\u5B9E\u65F6\u6E29\u5EA6",-1)),Y5=[z5],H5={id:"tempChartBox",class:"tempChartBox",ref:"tempChartRef"};function W5(a,i,t,e,n,r){return Dr(),Lr("div",{class:Ts(["temChart",[a.screenType==="hor"?"horiCompClass":"verCompClass "]])},[ke("div",N5,[sp(ke("div",k5,Y5,512),[[lp,a.screenType==="ver"]]),ke("div",H5,null,512)])],2)}const BI=fs(R5,[["render",W5],["__scopeId","data-v-a29e2755"]]),G5=ss({props:{screenType:{type:String}},setup(a,i){const t=af(),e=ls({widthBase:"0%",compareBase:"0%"}),n=D1(()=>{const r=t.lastAllEnergy;var o={energyBase:r.energyBase?r.energyBase.toFixed(1):r.energyBase,energyTotal:r.energyTotal?r.energyTotal.toFixed(1):r.energyTotal,energyCompare:r.energyCompare?(r.energyCompare*100).toFixed(0):r.energyCompare};return e.compareBase=r.energyCompare*100+"%",e.widthBase="100%",o});return t.$subscribe((r,o)=>{}),Ho(()=>{}),{...us(e),lastAllComputed:n,projectStore:t}},computed:{}});const _v=a=>(Ds("data-v-25ee413e"),a=a(),Bs(),a),V5=_v(()=>ke("div",{class:"subhead-title"},[ke("span",null,"\u4E0A\u6708\u603B\u80FD\u8017")],-1)),$5={class:"saveEnergy"},X5={class:"backImage"},U5={class:"value"},K5={class:"energySave"},Z5={class:"textDiv"},Q5=_v(()=>ke("span",null,"\u9879\u76EE\u80FD\u8017",-1)),J5={class:"value"},q5={class:"energyTotal"},tO={class:"textDiv"},eO=_v(()=>ke("span",null,"\u57FA\u51C6\u80FD\u8017",-1)),nO={class:"value"};function rO(a,i,t,e,n,r){return Dr(),Lr("div",{class:Ts(["lastMonth",[a.screenType==="hor"?"horizontalClass ":"verLastClass "]])},[V5,ke("div",$5,[ke("span",X5,[ts("\u8282\u80FD"),ke("span",U5,nr(a.lastAllComputed.energyCompare)+"%",1)])]),ke("div",K5,[ke("div",Z5,[Q5,ke("span",J5,nr(a.lastAllComputed.energyTotal)+"kWh",1)]),ke("div",{class:"saveBack",style:Qs({width:a.compareBase})},null,4)]),ke("div",q5,[ke("div",tO,[eO,ke("span",nO,nr(a.lastAllComputed.energyBase)+"kWh",1)]),ke("div",{class:"totalBack",style:Qs({width:a.widthBase})},null,4)])],2)}const RI=fs(G5,[["render",rO],["__scopeId","data-v-25ee413e"]]),iO=ss({props:{screenType:{type:String}},setup(a,i){const t=tu(),e=tu(),n=ls({videoWidth:0,videoLeft:0,doNum(g,p){return g&&g.toFixed(p)}});let r={},o={},s={};function l(g){window.requestAnimationFrame(()=>{l(g)}),g.clearRect(0,0,800,300),g.fillStyle="#FFDEB4",g.shadowOffsetX=0,g.shadowOffsetY=0,g.shadowColor="#ffffff",g.shadowBlur=10,u(g,3),c({x:h(173),y:h(173)},{x:h(110),y:h(120)},{x:h(20),y:h(120)}),o=f(o,{x:h(515),y:h(150)},{x:h(590),y:h(150)},{x:h(676),y:h(50)}),s=f(s,{x:h(512),y:h(210)},{x:h(670),y:h(210)},{x:h(756),y:h(250)})}function u(g,p){g.beginPath(),g.arc(r.x,r.y,p,0,Math.PI*2),g.closePath(),g.fill(),g.beginPath(),g.arc(o.x,o.y,p,0,Math.PI*2),g.closePath(),g.fill(),g.beginPath(),g.arc(s.x,s.y,p,0,Math.PI*2),g.closePath(),g.fill()}function c(g,p,m){r.x>p.x&&r.x<=g.x&&(r.x=r.x-1,r.y=r.y-1*(p.y-g.y)/(p.x-g.x)),r.x>m.x&&r.x<=p.x&&(r.x=r.x-1,r.y=r.y-1*(m.y-p.y)/(m.x-p.x)),r.x==m.x&&(r=g)}function f(g,p,m,y){return g.x>=p.x&&g.x=m.x&&(g.x=g.x+1,g.y=g.y+1*(y.y-m.y)/(y.x-m.x)),g.x==y.x&&(g=p),g}function h(g){let p=B1(),m=g/192*p;return Number(m.toFixed(0))}Ho(()=>{op(()=>{let p=t.value.offsetHeight/692*2116,m=e.value.offsetWidth;n.videoWidth=p,n.videoLeft=(m-p)/2;var y=document.getElementById("co2Canvas");y.setAttribute("width",h(800)+"px"),y.setAttribute("height",h(300)+"px");var w=y.getContext("2d");w.moveTo(h(20),h(120)),w.lineTo(h(110),h(120)),w.lineTo(h(173),h(173)),w.lineWidth=1,w.strokeStyle="rgba(247, 230, 205, 0.4)",w.setLineDash([h(2),h(3)]),w.stroke(),w.beginPath(),w.moveTo(h(676),h(50)),w.lineTo(h(590),h(150)),w.lineTo(h(515),h(150)),w.lineWidth=1,w.strokeStyle="rgba(247, 230, 205, 0.4)",w.setLineDash([h(2),h(3)]),w.stroke(),w.beginPath(),w.moveTo(h(756),h(250)),w.lineTo(h(670),h(210)),w.lineTo(h(512),h(210)),w.lineWidth=1,w.strokeStyle="rgba(247, 230, 205, 0.4)",w.setLineDash([h(2),h(3)]),w.stroke();var x=document.getElementById("circleCanvas1");x.setAttribute("width",h(800)+"px"),x.setAttribute("height",h(300)+"px");var M=x.getContext("2d");r={x:h(173),y:h(173)},o={x:h(515),y:h(150)},s={x:h(512),y:h(210)},l(M)})});const d=af(),{lastAllEnergy:v}=ap(d);return d.$subscribe((g,p)=>{const m=p.lastAllEnergy||{};n.lastAllEnergyRes={cdmCo2:m.cdmCo2?m.cdmCo2.toFixed(2):m.cdmCo2,cdmTree:m.cdmTree?m.cdmTree.toFixed(0):m.cdmTree,cdmC:m.cdmC?m.cdmC.toFixed(2):m.cdmC,energySaving:m.energySaving?m.energySaving.toFixed(0):m.energySaving}}),Ho(()=>{}),{...us(n),svideo:t,saveCont:e,lastAllEnergy:v}},computed:{}}),aO="/sgdaping/assets/round1.3f179f0a.png",oO="/sgdaping/assets/round2.7a1a2069.png",sO="/sgdaping/assets/round3.61e0aed3.png",lO="/sgdaping/assets/round4.6fddfd82.png",uO="/sgdaping/assets/round5.398880f2.png",Sv="/sgdaping/assets/saveLight.0e63e0e5.png",fO="/sgdaping/assets/saveCo2.f203e456.png",cO="/sgdaping/assets/saveCarbon.073b9188.png",hO="/sgdaping/assets/saveTree.7b54f2da.png",dO="/sgdaping/assets/saveEnergy.bfe3145a.mov";const Qr=a=>(Ds("data-v-ba9ae691"),a=a(),Bs(),a),vO={class:"lastMonthCont"},gO=Qr(()=>ke("div",{class:"subhead-title"},[ke("span",null,"\u4E0A\u6708\u8282\u7EA6\u80FD\u8017")],-1)),pO={class:"saveCont",ref:"saveCont"},mO={class:"saveCenterCont"},yO={class:"centerOval"},xO=Qr(()=>ke("img",{class:"round1",src:aO},null,-1)),wO=Qr(()=>ke("img",{class:"round2",src:oO},null,-1)),EO=Qr(()=>ke("img",{class:"round3",src:sO},null,-1)),MO=Qr(()=>ke("img",{class:"round4",src:lO},null,-1)),bO=Qr(()=>ke("img",{class:"round5",src:uO},null,-1)),_O={class:"electWrap"},SO=Qr(()=>ke("div",null,"\u8282\u7EA6\u7535",-1)),CO={class:"value"},PO={class:"num"},TO=Qr(()=>ke("canvas",{id:"co2Canvas",class:"co2Canvas"},null,-1)),AO=Qr(()=>ke("canvas",{id:"circleCanvas1",class:"circleCanvas1"},null,-1)),OO={class:"outOval outOvalCo2"},IO=Qr(()=>ke("div",{class:"outCircle"},null,-1)),jO=Qr(()=>ke("div",{class:"inOval"},null,-1)),LO=Qr(()=>ke("img",{class:"saveLight",src:Sv},null,-1)),DO=Qr(()=>ke("img",{class:"saveCo2",src:fO},null,-1)),BO={class:"co2Wrap sco2"},RO={class:"value"},FO={class:"outOval outOvalCarbon"},NO=Qr(()=>ke("div",{class:"outCircle"},null,-1)),kO=Qr(()=>ke("div",{class:"inOval"},null,-1)),zO=Qr(()=>ke("img",{class:"saveLight",src:Sv},null,-1)),YO=Qr(()=>ke("img",{class:"saveCo2",src:cO},null,-1)),HO={class:"co2Wrap sco2"},WO={class:"value"},GO={class:"outOval outOvalTree"},VO=Qr(()=>ke("div",{class:"outCircle"},null,-1)),$O=Qr(()=>ke("div",{class:"inOval"},null,-1)),XO=Qr(()=>ke("img",{class:"saveLight",src:Sv},null,-1)),UO=Qr(()=>ke("img",{class:"saveCo2",src:hO},null,-1)),KO={class:"co2Wrap sco2"},ZO={class:"value"},QO={style:{display:"none"},class:"svideo",autoplay:"",loop:"",muted:"",ref:"svideo"},JO=Qr(()=>ke("source",{src:dO},null,-1)),qO=[JO];function tI(a,i,t,e,n,r){return Dr(),Lr("div",{class:Ts(["lastMonth",[a.screenType==="hor"?"horSaveClass ":"verSaveClass"]])},[ke("div",vO,[gO,ke("div",pO,[ke("div",mO,[ke("div",yO,[xO,wO,ts(),EO,MO,bO,ke("div",_O,[SO,ke("div",CO,[ke("span",PO,nr(a.doNum(a.lastAllEnergy.energySaving,0)),1),ts("\u5EA6 ")])])]),TO,AO,ke("div",OO,[IO,jO,LO,DO,ke("div",BO,[ts(" \u51CF\u6392"),ke("span",RO,nr(a.doNum(a.lastAllEnergy.cdmCo2,2))+"Kg",1),ts("CO\u2082 ")])]),ke("div",FO,[NO,kO,zO,YO,ke("div",HO,[ts(" \u51CF\u6392"),ke("span",WO,nr(a.doNum(a.lastAllEnergy.cdmC,2))+"Kg",1),ts("\u78B3 ")])]),ke("div",GO,[VO,$O,XO,UO,ke("div",KO,[ts(" \u4E3A\u56FD\u5BB6\u79CD"),ke("span",ZO,nr(a.doNum(a.lastAllEnergy.cdmTree,0)),1),ts("\u68F5\u6811 ")])])]),ke("video",QO,qO,512)],512)])],2)}const FI=fs(iO,[["render",tI],["__scopeId","data-v-ba9ae691"]]),eI=ss({props:{screenType:{type:String},showPing:{type:Number}},setup(a,i){const t=af(),e=ls({selectColor:up,timeoutsign:null,selIndicator:{},selIndicatorId:"",nowIndicatorIndex:null,allIndicator:[{id:"temp",index:0,code:"Tdb",name:"\u6E29\u5EA6",img:Oa.floor_wendu,verimg:Oa.floor_wendu_ver,unit:"\u2103",fixed:1},{id:"humidity",index:1,code:"RH",name:"\u6E7F\u5EA6",img:Oa.floor_shidu,verimg:Oa.floor_shidu_ver,unit:"%",fixed:0},{id:"co2",index:2,code:"CO2",name:"CO\u2082",img:Oa.floor_co2,verimg:Oa.floor_co2_ver,unit:"ppm",fixed:0},{id:"methanal",index:3,code:"HCHO",name:"\u7532\u919B",img:Oa.floor_jiaquan,verimg:Oa.floor_jiaquan_ver,unit:"mg/m\xB3",fixed:2},{id:"pm25",index:4,code:"PM2d5",name:"PM2.5",img:Oa.floor_pm25,verimg:Oa.floor_pm25_ver,unit:"ug/m\xB3",fixed:0}],allBuild:[],nowBuildName:"",nowBuildPage:1,allFloor:[],firstPageParams:[],secondPageParams:[],nowPage:1,pageNum:0,showFloors:[],totalAvgValues:null,hqueryBuild(){R1().then(n=>{var r=(n.data||{}).content||[];if(t.projectId=="Pj3301100002"){var o=r.filter(s=>s.localName=="1#\u697C");e.allBuild=o}else e.allBuild=r;e.nowBuildPage=1,e.fqueryFs()}).catch(n=>{i.emit("donetowpage")})},fqueryFs(){var n=(e.allBuild[e.nowBuildPage-1]||{}).id;!n||F1({criteria:{projectId:t.projectId,buildingId:n},size:14,page:1,orders:[{column:"floorSequenceId",asc:!0}]}).then(r=>{var o=r.data.content||[];if(o=o.filter(function(v){return v.spaceNum>0}),o.length==0){if(e.nowBuildPage=e.nowBuildPage+1,e.nowBuildPage>e.allBuild.length){i.emit("donetowpage");return}e.fqueryFs();return}e.nowBuildName=e.allBuild[e.nowBuildPage-1].localName,e.allFloor=o;var s=o.length,l,u;s<=7?(l=s,u=0,e.pageNum=1):(l=Math.ceil(s/2),u=Math.floor(s/2),e.pageNum=2);var c=e.floorHandle(l),f=e.floorHandle(u),h=o.slice(0,l),d=o.slice(l);e.firstPageParams=h.map(v=>{var g={};return g.id=v.id,g.projectId=t.projectId,g.spaceNum=c,g}),e.secondPageParams=d.map(v=>{var g={};return g.id=v.id,g.projectId=t.projectId,g.spaceNum=f,g}),e.nowIndicatorIndex=0,e.getTimeFloorParam(3e3)}).catch(function(r){if(e.nowBuildPage=e.nowBuildPage+1,e.nowBuildPage>e.allBuild.length){i.emit("donetowpage");return}e.fqueryFs()})},toplay(){e.getTimeFloorParam(500)},tostop(){clearTimeout(e.timeoutsign)},getTimeFloorParam(n){var r=e.nowPage==1?e.firstPageParams:e.secondPageParams;e.fqueryParam(r).then(()=>{t.stopSign||(e.timeoutsign=setTimeout(()=>{if(e.nowIndicatorIndex=e.nowIndicatorIndex+1,e.nowIndicatorIndex==5){if(e.pageNum==e.nowPage){e.nowPage=1,e.nowBuildPage==e.allBuild.length?(i.emit("donetowpage"),clearTimeout(e.timeoutsign)):(e.nowBuildPage=e.nowBuildPage+1,e.fqueryFs());return}e.pageNum==2&&e.nowPage==1&&(e.nowPage=2,e.nowIndicatorIndex=0)}e.getTimeFloorParam(3e3)},n))}).catch(()=>{})},fqueryParam(n){var r=Ol(),o=Ol().subtract(30,"minutes"),s=o.format("YYYYMMDDHHmmss"),l=r.format("YYYYMMDDHHmmss"),u=e.nowIndicatorIndex;e.selIndicator=e.allIndicator[u];var c=e.selIndicator.code;return N1(l,s,c,n).then(f=>{var h=(f.data.data||{}).floors||[];e.totalAvgValues=f.data.data.avgValues||null,e.totalAvgValues&&(e.totalAvgValues=e.totalAvgValues.toFixed(e.selIndicator.fixed));var d=document.getElementById("floorWrap")&&document.getElementById("floorWrap").offsetHeight;h.forEach(v=>{var g=e.allFloor.filter(w=>w.id==v.id),p=g[0]||{};v.name=p.name,v.localId=p.localId,v.localName=p.localName;var m=(v.dataSpaces||[]).length,y=e.spaceHandle(m);v.spacewidth=100/y.lineNum,v.spaceheight=100/y.floorline,v.floorHeight=d/h.length}),e.showFloors=h,e.selIndicatorId=e.selIndicator.id}).catch(f=>{})},spaceHandle(n){var r=n,o=Math.ceil(n/14);return r=Math.ceil(n/o),{lineNum:r,floorline:o}},floorHandle(n){var r=28;return r}});return Ho(()=>{e.nowPage=1,e.hqueryBuild()}),{...us(e)}}});const nI={key:0,class:"leftChange"},rI={class:"allIndicator"},iI={class:"title"},aI={class:"ltextCont"},oI={class:"value"},sI={class:"name"},lI={class:"other"},uI=["src"],fI=["onClick"],cI={class:"title"},hI={key:1,class:"topChange"},dI={class:"allIndicator"},vI=["onClick"],gI={class:"imageDiv"},pI=["src"],mI={class:"textCont"},yI={class:"value"},xI={class:"floorWrap",id:"floorWrap"},wI={class:"floor-num"},EI={class:"floor-space"};function MI(a,i,t,e,n,r){return Dr(),Lr("div",{class:Ts(["floorSpace",[a.screenType==="hor"?"horiFloorClass ":"verFloorClass "]])},[sp(ke("div",{class:"buildName"},nr(a.nowBuildName),513),[[lp,a.allBuild.length]]),a.screenType=="hor"?(Dr(),Lr("div",nI,[ke("div",rI,[ke("div",{class:"showItem",style:Qs({top:a.selIndicator.index*16+"%"})},[ke("div",iI,nr(a.selIndicator.name),1),ke("div",aI,[ke("div",oI,nr(a.totalAvgValues)+nr(a.selIndicator.unit),1),ke("div",sI,"\u5E73\u5747"+nr(a.selIndicator.name),1)]),ke("div",lI,[ke("img",{class:"img",src:a.selIndicator.img},null,8,uI)])],4),(Dr(!0),Lr(Hl,null,Wl(a.allIndicator,(o,s)=>(Dr(),Lr("div",{class:Ts(["eachItem",{select:o.id==a.selIndicator.id}]),onClick:l=>a.clickIndicator(s)},[ke("div",cI,nr(o.name),1)],10,fI))),256))])])):Th("",!0),a.screenType=="ver"?(Dr(),Lr("div",hI,[ke("div",dI,[(Dr(!0),Lr(Hl,null,Wl(a.allIndicator,(o,s)=>(Dr(),Lr("div",{class:Ts(["eachItem",{select:o.id==a.selIndicator.id}]),onClick:l=>a.clickIndicator(s)},[ke("span",null,nr(o.name),1)],10,vI))),256))]),ke("div",gI,[ke("img",{src:a.selIndicator.verimg},null,8,pI)]),ke("div",mI,[ts(" \u5E73\u5747"),ke("span",null,nr(a.selIndicator.name),1),ke("span",yI,nr(a.totalAvgValues),1),ke("span",null,nr(a.selIndicator.unit),1)])])):Th("",!0),ke("div",xI,[(Dr(!0),Lr(Hl,null,Wl(a.showFloors,(o,s)=>(Dr(),Lr("div",{class:"floor-item",key:s,style:Qs({height:o.floorHeight+"px"})},[ke("div",wI,[ke("span",null,nr(o.localName),1)]),ke("div",EI,[(Dr(!0),Lr(Hl,null,Wl(o.dataSpaces,(l,u)=>(Dr(),Lr("div",{class:"space-box",key:u,style:Qs({width:o.spacewidth+"%",height:o.spaceheight+"%"})},[ke("div",{class:"space-name",style:Qs({backgroundColor:a.selectColor(l.avgValues,a.selIndicatorId,!0)})},nr(l.localName),5)],4))),128))])],4))),128))])],2)}const NI=fs(eI,[["render",MI],["__scopeId","data-v-b97b7467"]]);var S1={exports:{}};(function(a,i){(function(e,n){a.exports=n()})(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(r,o,s){n.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:s})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,o){if(o&1&&(r=n(r)),o&8||o&4&&typeof r=="object"&&r&&r.__esModule)return r;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:r}),o&2&&typeof r!="string")for(var l in r)n.d(s,l,function(u){return r[u]}.bind(null,l));return s},n.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(o,"a",o),o},n.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},n.p="",n(n.s="./src/index.ts")}({"./node_modules/_@antv_hierarchy@0.6.6@@antv/hierarchy/build/hierarchy.js":function(t,e,n){(function(o,s){t.exports=s()})(typeof self<"u"?self:this,function(){return function(r){var o={};function s(l){if(o[l])return o[l].exports;var u=o[l]={i:l,l:!1,exports:{}};return r[l].call(u.exports,u,u.exports,s),u.l=!0,u.exports}return s.m=r,s.c=o,s.d=function(l,u,c){s.o(l,u)||Object.defineProperty(l,u,{configurable:!1,enumerable:!0,get:c})},s.n=function(l){var u=l&&l.__esModule?function(){return l.default}:function(){return l};return s.d(u,"a",u),u},s.o=function(l,u){return Object.prototype.hasOwnProperty.call(l,u)},s.p="",s(s.s=31)}([function(r,o,s){var l=s(4);o.a=function(u){return Array.isArray?Array.isArray(u):Object(l.a)(u,"Array")}},function(r,o,s){var l=function(u){return u!==null&&typeof u!="function"&&isFinite(u.length)};o.a=l},function(r,o,s){var l=s(0),u=s(13);function c(f,h){if(!!f){var d;if(Object(l.a)(f))for(var v=0,g=f.length;v-1:!1};o.a=u},function(r,o,s){o.a=function(l){var u=typeof l;return l!==null&&u==="object"||u==="function"}},function(r,o,s){var l=s(2),u=s(1),c=function(f,h){if(!Object(u.a)(f))return f;var d=[];return Object(l.a)(f,function(v,g){h(v,g)&&d.push(v)}),d};o.a=c},function(r,o,s){var l=function(u){return typeof u=="object"&&u!==null};o.a=l},function(r,o,s){o.a=u;function l(c,f){for(var h in f)f.hasOwnProperty(h)&&h!=="constructor"&&f[h]!==void 0&&(c[h]=f[h])}function u(c,f,h,d){return f&&l(c,f),h&&l(c,h),d&&l(c,d),c}},function(r,o,s){var l=s(30),u=["LR","RL","TB","BT","H","V"],c=["LR","RL","H"],f=function(v){return c.indexOf(v)>-1},h=u[0];r.exports=function(d,v,g){var p=v.direction||h;if(v.isHorizontal=f(p),p&&u.indexOf(p)===-1)throw new TypeError("Invalid direction: "+p);if(p===u[0])g(d,v);else if(p===u[1])g(d,v),d.right2left();else if(p===u[2])g(d,v);else if(p===u[3])g(d,v),d.bottom2top();else if(p===u[4]||p===u[5]){var m=l(d,v),y=m.left,w=m.right;g(y,v),g(w,v),v.isHorizontal?y.right2left():y.bottom2top(),w.translate(y.x-w.x,y.y-w.y),d.x=y.x,d.y=w.y;var x=d.getBoundingBox();v.isHorizontal?x.top<0&&d.translate(0,-x.top):x.left<0&&d.translate(-x.left,0)}var M=v.fixedRoot;return M===void 0&&(M=!0),M&&d.translate(-(d.x+d.width/2+d.hgap),-(d.y+d.height/2+d.vgap)),d}},function(r,o,s){var l=s(7),u=18,c=u*2,f=u,h={getId:function(p){return p.id||p.name},getHGap:function(p){return p.hgap||f},getVGap:function(p){return p.vgap||f},getChildren:function(p){return p.children},getHeight:function(p){return p.height||c},getWidth:function(p){var m=p.label||" ";return p.width||m.split("").length*u}};function d(g,p){var m=this;if(m.vgap=m.hgap=0,g instanceof d)return g;m.data=g;var y=p.getHGap(g),w=p.getVGap(g);return m.width=p.getWidth(g),m.height=p.getHeight(g),m.id=p.getId(g),m.x=m.y=0,m.depth=0,m.children||(m.children=[]),m.addGap(y,w),m}l.assign(d.prototype,{isRoot:function(){return this.depth===0},isLeaf:function(){return this.children.length===0},addGap:function(p,m){var y=this;y.hgap+=p,y.vgap+=m,y.width+=2*p,y.height+=2*m},eachNode:function(p){for(var m=this,y=[m],w;w=y.shift();)p(w),y=w.children.concat(y)},DFTraverse:function(p){this.eachNode(p)},BFTraverse:function(p){for(var m=this,y=[m],w;w=y.shift();)p(w),y=y.concat(w.children)},getBoundingBox:function(){var p={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(function(m){p.left=Math.min(p.left,m.x),p.top=Math.min(p.top,m.y),p.width=Math.max(p.width,m.x+m.width),p.height=Math.max(p.height,m.y+m.height)}),p},translate:function(p,m){p===void 0&&(p=0),m===void 0&&(m=0),this.eachNode(function(y){y.x+=p,y.y+=m})},right2left:function(){var p=this,m=p.getBoundingBox();p.eachNode(function(y){y.x=y.x-(y.x-m.left)*2-y.width}),p.translate(m.width,0)},bottom2top:function(){var p=this,m=p.getBoundingBox();p.eachNode(function(y){y.y=y.y-(y.y-m.top)*2-y.height}),p.translate(0,m.height)}});function v(g,p,m){p===void 0&&(p={}),p=l.assign({},h,p);var y=new d(g,p),w=[y],x;if(!m&&!g.collapsed){for(;x=w.shift();)if(!x.data.collapsed){var M=p.getChildren(x.data),_=M?M.length:0;if(x.children=new Array(_),M&&_)for(var D=0;D<_;D++){var C=new d(M[D],p);x.children[D]=C,w.push(C),C.parent=x,C.depth=x.depth+1}}}return y}r.exports=v},function(r,o,s){var l=s(6),u=s(20);function c(f,h){var d=Object(u.a)(h),v=d.length;if(Object(l.a)(f))return!v;for(var g=0;g-1;)u.call(h,m,1);return h};o.a=f},function(r,o,s){var l=s(2),u=s(0),c=s(9),f=function(h,d,v){if(!Object(u.a)(h)&&!Object(c.a)(h))return h;var g=v;return Object(l.a)(h,function(p,m){g=d(g,p,m)}),g};o.a=f},function(r,o,s){var l=s(1),u=s(21),c=function(f,h){var d=[];if(!Object(l.a)(f))return d;for(var v=-1,g=[],p=f.length;++vm[w])return 1;if(p[w]f?f:u};o.a=l},function(r,o,s){var l=function(u,c){var f=c.toString(),h=f.indexOf(".");if(h===-1)return Math.round(u);var d=f.substr(h+1).length;return d>20&&(d=20),parseFloat(u.toFixed(d))};o.a=l},function(r,o,s){var l=s(5),u=function(c){return Object(l.a)(c)&&c%1!==0};o.a=u},function(r,o,s){var l=s(5),u=function(c){return Object(l.a)(c)&&c%2===0};o.a=u},function(r,o,s){var l=s(5),u=Number.isInteger?Number.isInteger:function(c){return Object(l.a)(c)&&c%1===0};o.a=u},function(r,o,s){var l=s(5),u=function(c){return Object(l.a)(c)&&c<0};o.a=u},function(r,o,s){o.a=u;var l=1e-5;function u(c,f,h){return h===void 0&&(h=l),Math.abs(c-f)0};o.a=u},function(r,o,s){var l=s(2),u=s(0),c=s(3);o.a=function(f,h){if(!!Object(u.a)(f)){var d=f[0],v;Object(c.a)(h)?v=h(f[0]):v=f[0][h];var g;return Object(l.a)(f,function(p){Object(c.a)(h)?g=h(p):g=p[h],g>v&&(d=p,v=g)}),d}}},function(r,o,s){var l=s(2),u=s(0),c=s(3);o.a=function(f,h){if(!!Object(u.a)(f)){var d=f[0],v;Object(c.a)(h)?v=h(f[0]):v=f[0][h];var g;return Object(l.a)(f,function(p){Object(c.a)(h)?g=h(p):g=p[h],gu?(f&&(clearTimeout(f),f=null),g=y,v=l.apply(h,d),f||(h=d=null)):!f&&c.trailing!==!1&&(f=setTimeout(p,w)),v};return m.cancel=function(){clearTimeout(f),g=0,f=h=d=null},m}},function(r,o,s){var l=s(1);o.a=function(u){return Object(l.a)(u)?Array.prototype.slice.call(u):[]}},function(r,o,s){var l={};o.a=function(u){return u=u||"g",l[u]?l[u]+=1:l[u]=1,u+l[u]}},function(r,o,s){o.a=function(){}},function(r,o,s){o.a=function(l){return l}},function(r,o,s){o.a=c;var l=s(6),u=s(1);function c(f){return Object(l.a)(f)?0:Object(u.a)(f)?f.length:Object.keys(f).length}},function(r,o,s){var l=function(){function u(){this.map={}}return u.prototype.has=function(c){return this.map[c]!==void 0},u.prototype.get=function(c,f){var h=this.map[c];return h===void 0?f:h},u.prototype.set=function(c,f){this.map[c]=f},u.prototype.clear=function(){this.map={}},u.prototype.delete=function(c){delete this.map[c]},u.prototype.size=function(){return Object.keys(this.map).length},u}();o.a=l},function(r,o){function s(d,v,g,p){p===void 0&&(p=[]);var m=this;m.w=d||0,m.h=v||0,m.y=g||0,m.x=0,m.c=p||[],m.cs=p.length,m.prelim=0,m.mod=0,m.shift=0,m.change=0,m.tl=null,m.tr=null,m.el=null,m.er=null,m.msel=0,m.mser=0}s.fromNode=function(d,v){if(!d)return null;var g=[];return d.children.forEach(function(p){g.push(s.fromNode(p,v))}),v?new s(d.height,d.width,d.x,g):new s(d.width,d.height,d.y,g)};function l(d,v,g){g?d.y+=v:d.x+=v,d.children.forEach(function(p){l(p,v,g)})}function u(d,v){var g=v?d.y:d.x;return d.children.forEach(function(p){g=Math.min(u(p,v),g)}),g}function c(d,v){var g=u(d,v);l(d,-g,v)}function f(d,v,g){g?v.y=d.x:v.x=d.x,d.c.forEach(function(p,m){f(p,v.children[m],g)})}function h(d,v,g){g===void 0&&(g=0),v?(d.x=g,g+=d.width):(d.y=g,g+=d.height),d.children.forEach(function(p){h(p,v,g)})}r.exports=function(d,v){v===void 0&&(v={});var g=v.isHorizontal;function p(Q){if(Q.cs===0){m(Q);return}p(Q.c[0]);for(var it=st(_(Q.c[0].el),0,null),Pt=1;PtPt.low&&(Pt=Pt.nxt);var Gt=lt+ht.prelim+ht.w-(xt+U.prelim);Gt>0&&(xt+=Gt,w(Q,it,Pt.index,Gt));var Bt=_(ht),Qt=_(U);Bt<=Qt&&(ht=M(ht),ht!==null&&(lt+=ht.mod)),Bt>=Qt&&(U=x(U),U!==null&&(xt+=U.mod))}!ht&&!!U?D(Q,it,U,xt):!!ht&&!U&&C(Q,it,ht,lt)}function w(Q,it,Pt,ht){Q.c[it].mod+=ht,Q.c[it].msel+=ht,Q.c[it].mser+=ht,j(Q,it,Pt,ht)}function x(Q){return Q.cs===0?Q.tl:Q.c[0]}function M(Q){return Q.cs===0?Q.tr:Q.c[Q.cs-1]}function _(Q){return Q.y+Q.h}function D(Q,it,Pt,ht){var lt=Q.c[0].el;lt.tl=Pt;var U=ht-Pt.mod-Q.c[0].msel;lt.mod+=U,lt.prelim-=U,Q.c[0].el=Q.c[it].el,Q.c[0].msel=Q.c[it].msel}function C(Q,it,Pt,ht){var lt=Q.c[it].er;lt.tr=Pt;var U=ht-Pt.mod-Q.c[it].mser;lt.mod+=U,lt.prelim-=U,Q.c[it].er=Q.c[it-1].er,Q.c[it].mser=Q.c[it-1].mser}function F(Q){Q.prelim=(Q.c[0].prelim+Q.c[0].mod+Q.c[Q.cs-1].mod+Q.c[Q.cs-1].prelim+Q.c[Q.cs-1].w)/2-Q.w/2}function k(Q,it){it+=Q.mod,Q.x=Q.prelim+it,V(Q);for(var Pt=0;Pt=Pt.low;)Pt=Pt.nxt;return{low:Q,index:it,nxt:Pt}}h(d,g);var yt=s.fromNode(d,g);return p(yt),k(yt,0),f(yt,d,g),c(d,g),d}},function(r,o,s){function l(p,m){p.prototype=Object.create(m.prototype),p.prototype.constructor=p,p.__proto__=m}var u=s(11),c=s(115),f=s(17),h=s(7),d=function(p){l(m,p);function m(){return p.apply(this,arguments)||this}var y=m.prototype;return y.execute=function(){var x=this;return x.rootNode.width=0,f(x.rootNode,x.options,c)},m}(u),v={};function g(p,m){return m=h.assign({},v,m),new d(p,m).execute()}r.exports=g},function(r,o,s){var l=s(7);function u(h,d){d===void 0&&(d=[]);var v=this;v.x=v.y=0,v.leftChild=v.rightChild=null,v.height=0,v.children=d}var c={isHorizontal:!0,nodeSep:20,nodeSize:20,rankSep:200,subTreeSep:10};function f(h,d,v){v?(d.x=h.x,d.y=h.y):(d.x=h.y,d.y=h.x),h.children.forEach(function(g,p){f(g,d.children[p],v)})}r.exports=function(h,d){d===void 0&&(d={}),d=l.assign({},c,d);var v=0;function g(x){if(!x)return null;x.width=0,x.depth&&x.depth>v&&(v=x.depth);var M=x.children,_=M.length,D=new u(x.height,[]);return M.forEach(function(C,F){var k=g(C);D.children.push(k),F===0&&(D.leftChild=k),F===_-1&&(D.rightChild=k)}),D.originNode=x,D.isLeaf=x.isLeaf(),D}function p(x){if(x.isLeaf||x.children.length===0)x.drawingDepth=v;else{var M=x.children.map(function(D){return p(D)}),_=Math.min.apply(null,M);x.drawingDepth=_-1}return x.drawingDepth}var m;function y(x){x.x=x.drawingDepth*d.rankSep,x.isLeaf?(x.y=0,m&&(x.y=m.y+m.height+d.nodeSep,x.originNode.parent!==m.originNode.parent&&(x.y+=d.subTreeSep)),m=x):(x.children.forEach(function(M){y(M)}),x.y=(x.leftChild.y+x.rightChild.y)/2)}var w=g(h);return p(w),y(w),f(w,h,d.isHorizontal),h}},function(r,o,s){function l(y,w){y.prototype=Object.create(w.prototype),y.prototype.constructor=y,y.__proto__=w}var u=s(11),c=s(117),f=s(30),h=s(7),d=["LR","RL","H"],v=d[0],g=function(y){l(w,y);function w(){return y.apply(this,arguments)||this}var x=w.prototype;return x.execute=function(){var _=this,D=_.options,C=_.rootNode;D.isHorizontal=!0;var F=D.indent,k=F===void 0?20:F,j=D.dropCap,V=j===void 0?!0:j,st=D.direction||v;if(st&&d.indexOf(st)===-1)throw new TypeError("Invalid direction: "+st);if(st===d[0])c(C,k,V);else if(st===d[1])c(C,k,V),C.right2left();else if(st===d[2]){var yt=f(C,D),Q=yt.left,it=yt.right;c(Q,k,V),Q.right2left(),c(it,k,V);var Pt=Q.getBoundingBox();it.translate(Pt.width,0),C.x=it.x-C.width/2}return C},w}(u),p={};function m(y,w){return w=h.assign({},p,w),new g(y,w).execute()}r.exports=m},function(r,o){function s(l,u,c,f){if(!f)try{if(l.id===l.parent.children[0].id){l.x+=c*l.depth,l.y=u?u.y:0;return}}catch(h){}l.x+=c*l.depth,l.y=u?u.y+u.height:0}r.exports=function(l,u,c){var f=null;l.eachNode(function(h){s(h,f,u,c),f=h})}},function(r,o,s){function l(p,m){p.prototype=Object.create(m.prototype),p.prototype.constructor=p,p.__proto__=m}var u=s(11),c=s(119),f=s(17),h=s(7),d=function(p){l(m,p);function m(){return p.apply(this,arguments)||this}var y=m.prototype;return y.execute=function(){var x=this;return f(x.rootNode,x.options,c)},m}(u),v={};function g(p,m){return m=h.assign({},v,m),new d(p,m).execute()}r.exports=g},function(r,o,s){var l=s(7);function u(h,d){var v=0;return h.children.length?h.children.forEach(function(g){v+=u(g,d)}):v=h.height,h._subTreeSep=d.getSubTreeSep(h.data),h.totalHeight=Math.max(h.height,v)+2*h._subTreeSep,h.totalHeight}function c(h){var d=h.children,v=d.length;if(v){d.forEach(function(x){c(x)});var g=d[0],p=d[v-1],m=p.y-g.y+p.height,y=0;if(d.forEach(function(x){y+=x.totalHeight}),m>h.height)h.y=g.y+m/2-h.height/2;else if(d.length!==1||h.height>y){var w=h.y+(h.height-m)/2-g.y;d.forEach(function(x){x.translate(0,w)})}else h.y=(g.y+g.height/2+p.y+p.height/2)/2-h.height/2}}var f={getSubTreeSep:function(){return 0}};r.exports=function(h,d){d===void 0&&(d={}),d=l.assign({},f,d),h.parent={x:0,width:0,height:0,y:0},h.BFTraverse(function(v){v.x=v.parent.x+v.parent.width}),h.parent=null,u(h,d),h.startY=0,h.y=h.totalHeight/2-h.height/2,h.eachNode(function(v){var g=v.children,p=g.length;if(p){var m=g[0];if(m.startY=v.startY+v._subTreeSep,p===1)m.y=v.y+v.height/2-m.height/2;else{m.y=m.startY+m.totalHeight/2-m.height/2;for(var y=1;yl?l:o};e.default=r},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/clear-animation-frame.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});function r(o){var s=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame||clearTimeout;s(o)}e.default=r},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/clone.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-array.js"),o=function(s){if(typeof s!="object"||s===null)return s;var l;if(r.default(s)){l=[];for(var u=0,c=s.length;u-1:!1};e.default=o},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/debounce.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});function r(o,s,l){var u;return function(){var c=this,f=arguments,h=function(){u=null,l||o.apply(c,f)},d=l&&!u;clearTimeout(u),u=setTimeout(h,s),d&&o.apply(c,f)}}e.default=r},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/deep-mix.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-array.js"),o=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-plain-object.js"),s=5;function l(c,f,h,d){h=h||0,d=d||s;for(var v in f)if(f.hasOwnProperty(v)){var g=f[v];g!==null&&o.default(g)?(o.default(c[v])||(c[v]={}),h20&&(c=20),parseFloat(o.toFixed(c))};e.default=r},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/flatten-deep.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-array.js"),o=function(s,l){if(l===void 0&&(l=[]),!r.default(s))l.push(s);else for(var u=0;u0};e.default=o},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-prototype.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=Object.prototype,o=function(s){var l=s&&s.constructor,u=typeof l=="function"&&l.prototype||r;return s===u};e.default=o},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-reg-exp.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-type.js"),o=function(s){return r.default(s,"RegExp")};e.default=o},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-string.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-type.js");e.default=function(o){return r.default(o,"String")}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-type.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r={}.toString,o=function(s,l){return r.call(s)==="[object "+l+"]"};e.default=o},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-undefined.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=function(o){return o===void 0};e.default=r},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/keys.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/each.js"),o=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-function.js"),s=Object.keys?function(l){return Object.keys(l)}:function(l){var u=[];return r.default(l,function(c,f){o.default(l)&&f==="prototype"||u.push(f)}),u};e.default=s},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/last.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-array-like.js");function o(s){if(r.default(s)){var l=s;return l[l.length-1]}}e.default=o},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/lower-case.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-string.js"),o=function(s){return r.default(s).toLowerCase()};e.default=o},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/lower-first.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-string.js"),o=function(s){var l=r.default(s);return l.charAt(0).toLowerCase()+l.substring(1)};e.default=o},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/map-values.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-nil.js"),o=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-object.js"),s=function(l){return l};e.default=function(l,u){u===void 0&&(u=s);var c={};return o.default(l)&&!r.default(l)&&Object.keys(l).forEach(function(f){c[f]=u(l[f],f)}),c}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/map.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-array-like.js"),o=function(s,l){if(!r.default(s))return s;for(var u=[],c=0;cf&&(c=d,f=h)}),c}}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/memoize.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-function.js");e.default=function(o,s){if(!r.default(o))throw new TypeError("Expected a function");var l=function(){for(var u=[],c=0;c-1;)o.call(u,v,1);return u};e.default=l},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/reduce.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/each.js"),o=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-array.js"),s=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-plain-object.js"),l=function(u,c,f){if(!o.default(u)&&!s.default(u))return u;var h=f;return r.default(u,function(d,v){h=c(h,d,v)}),h};e.default=l},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/remove.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-array-like.js"),o=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/pull-at.js"),s=function(l,u){var c=[];if(!r.default(l))return c;for(var f=-1,h=[],d=l.length;++fv[p])return 1;if(d[p]o?(l&&(clearTimeout(l),l=null),h=g,f=r.apply(u,c),l||(u=c=null)):!l&&s.trailing!==!1&&(l=setTimeout(d,p)),f};return v.cancel=function(){clearTimeout(l),h=0,l=u=c=null},v}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-array.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-array-like.js");e.default=function(o){return r.default(o)?Array.prototype.slice.call(o):[]}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-degree.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=180/Math.PI,o=function(s){return r*s};e.default=o},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-integer.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=parseInt},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-radian.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=Math.PI/180,o=function(s){return r*s};e.default=o},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-string.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-nil.js");e.default=function(o){return r.default(o)?"":o.toString()}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/union.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/uniq.js"),o=function(){for(var s=[],l=0;lot?1:H>=ot?0:NaN}function s(H){return H.length===1&&(H=l(H)),{left:function(ot,at,dt,Z){for(dt==null&&(dt=0),Z==null&&(Z=ot.length);dt>>1;H(ot[mt],at)<0?dt=mt+1:Z=mt}return dt},right:function(ot,at,dt,Z){for(dt==null&&(dt=0),Z==null&&(Z=ot.length);dt>>1;H(ot[mt],at)>0?Z=mt:dt=mt+1}return dt}}}function l(H){return function(ot,at){return o(H(ot),at)}}var u=s(o),c=u.right,f=u.left;function h(H,ot){ot==null&&(ot=d);for(var at=0,dt=H.length-1,Z=H[0],mt=new Array(dt<0?0:dt);atH?1:ot>=H?0:NaN}function p(H){return H===null?NaN:+H}function m(H,ot){var at=H.length,dt=0,Z=-1,mt=0,S,B,A=0;if(ot==null)for(;++Z1)return A/(dt-1)}function y(H,ot){var at=m(H,ot);return at&&Math.sqrt(at)}function w(H,ot){var at=H.length,dt=-1,Z,mt,S;if(ot==null){for(;++dt=Z)for(mt=S=Z;++dtZ&&(mt=Z),S=Z)for(mt=S=Z;++dtZ&&(mt=Z),S0)return[H];if((dt=ot0)for(H=Math.ceil(H/B),ot=Math.floor(ot/B),S=new Array(mt=Math.ceil(ot-H+1));++Z=0?(mt>=k?10:mt>=j?5:mt>=V?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(mt>=k?10:mt>=j?5:mt>=V?2:1)}function Q(H,ot,at){var dt=Math.abs(ot-H)/Math.max(0,at),Z=Math.pow(10,Math.floor(Math.log(dt)/Math.LN10)),mt=dt/Z;return mt>=k?Z*=10:mt>=j?Z*=5:mt>=V&&(Z*=2),otpt;)It.pop(),--Zt;var Lt=new Array(Zt+1),Yt;for(mt=0;mt<=Zt;++mt)Yt=Lt[mt]=[],Yt.x0=mt>0?It[mt-1]:J,Yt.x1=mt=1)return+at(H[dt-1],dt-1,H);var dt,Z=(dt-1)*ot,mt=Math.floor(Z),S=+at(H[mt],mt,H),B=+at(H[mt+1],mt+1,H);return S+(B-S)*(Z-mt)}}function lt(H,ot,at){return H=_.call(H,p).sort(o),Math.ceil((at-ot)/(2*(ht(H,.75)-ht(H,.25))*Math.pow(H.length,-1/3)))}function U(H,ot,at){return Math.ceil((at-ot)/(3.5*y(H)*Math.pow(H.length,-1/3)))}function xt(H,ot){var at=H.length,dt=-1,Z,mt;if(ot==null){for(;++dt=Z)for(mt=Z;++dtmt&&(mt=Z)}else for(;++dt=Z)for(mt=Z;++dtmt&&(mt=Z);return mt}function Gt(H,ot){var at=H.length,dt=at,Z=-1,mt,S=0;if(ot==null)for(;++Z=0;)for(S=H[ot],at=S.length;--at>=0;)mt[--Z]=S[at];return mt}function Ie(H,ot){var at=H.length,dt=-1,Z,mt;if(ot==null){for(;++dt=Z)for(mt=Z;++dtZ&&(mt=Z)}else for(;++dt=Z)for(mt=Z;++dtZ&&(mt=Z);return mt}function _e(H,ot){for(var at=ot.length,dt=new Array(at);at--;)dt[at]=H[ot[at]];return dt}function Ue(H,ot){if(!!(at=H.length)){var at,dt=0,Z=0,mt,S=H[Z];for(ot==null&&(ot=o);++dtCt?1:vt>=Ct?0:NaN}function l(vt){var Ct=vt,At=vt;vt.length===1&&(Ct=function(Wt,ne){return vt(Wt)-ne},At=u(vt));function Ut(Wt,ne,ae,ge){for(ae==null&&(ae=0),ge==null&&(ge=Wt.length);ae>>1;At(Wt[Pe],ne)<0?ae=Pe+1:ge=Pe}return ae}function Vt(Wt,ne,ae,ge){for(ae==null&&(ae=0),ge==null&&(ge=Wt.length);ae>>1;At(Wt[Pe],ne)>0?ge=Pe:ae=Pe+1}return ae}function se(Wt,ne,ae,ge){ae==null&&(ae=0),ge==null&&(ge=Wt.length);var Pe=Ut(Wt,ne,ae,ge-1);return Pe>ae&&Ct(Wt[Pe-1],ne)>-Ct(Wt[Pe],ne)?Pe-1:Pe}return{left:Ut,center:se,right:Vt}}function u(vt){return function(Ct,At){return s(vt(Ct),At)}}function c(vt){return vt===null?NaN:+vt}function f(vt,Ct){var At,Ut,ae,Vt,se,Wt,ne,ae,ge,Pe,ze,Te,en;return r.__generator(this,function(wn){switch(wn.label){case 0:if(Ct!==void 0)return[3,9];wn.label=1;case 1:wn.trys.push([1,6,7,8]),At=r.__values(vt),Ut=At.next(),wn.label=2;case 2:return Ut.done?[3,5]:(ae=Ut.value,ae!=null&&(ae=+ae)>=ae?[4,ae]:[3,4]);case 3:wn.sent(),wn.label=4;case 4:return Ut=At.next(),[3,2];case 5:return[3,8];case 6:return Vt=wn.sent(),Pe={error:Vt},[3,8];case 7:try{Ut&&!Ut.done&&(ze=At.return)&&ze.call(At)}finally{if(Pe)throw Pe.error}return[7];case 8:return[3,17];case 9:se=-1,wn.label=10;case 10:wn.trys.push([10,15,16,17]),Wt=r.__values(vt),ne=Wt.next(),wn.label=11;case 11:return ne.done?[3,14]:(ae=ne.value,(ae=Ct(ae,++se,vt))!=null&&(ae=+ae)>=ae?[4,ae]:[3,13]);case 12:wn.sent(),wn.label=13;case 13:return ne=Wt.next(),[3,11];case 14:return[3,17];case 15:return ge=wn.sent(),Te={error:ge},[3,17];case 16:try{ne&&!ne.done&&(en=Wt.return)&&en.call(Wt)}finally{if(Te)throw Te.error}return[7];case 17:return[2]}})}var h=l(s),d=h.right,v=h.left,g=l(c).center;function p(vt,Ct){var At,Ut,Vt,se,Wt=0;if(Ct===void 0)try{for(var ne=r.__values(vt),ae=ne.next();!ae.done;ae=ne.next()){var ge=ae.value;ge!=null&&(ge=+ge)>=ge&&++Wt}}catch(en){At={error:en}}finally{try{ae&&!ae.done&&(Ut=ne.return)&&Ut.call(ne)}finally{if(At)throw At.error}}else{var Pe=-1;try{for(var ze=r.__values(vt),Te=ze.next();!Te.done;Te=ze.next()){var ge=Te.value;(ge=Ct(ge,++Pe,vt))!=null&&(ge=+ge)>=ge&&++Wt}}catch(en){Vt={error:en}}finally{try{Te&&!Te.done&&(se=ze.return)&&se.call(ze)}finally{if(Vt)throw Vt.error}}}return Wt}function m(vt){return vt.length|0}function y(vt){return!(vt>0)}function w(vt){return typeof vt!="object"||"length"in vt?vt:Array.from(vt)}function x(vt){return function(Ct){return vt.apply(void 0,r.__spread(Ct))}}function M(){for(var vt=[],Ct=0;Ctvt?1:Ct>=vt?0:NaN}function C(vt,Ct){var At,Ut,Vt,se,Wt=0,ne,ae=0,ge=0;if(Ct===void 0)try{for(var Pe=r.__values(vt),ze=Pe.next();!ze.done;ze=Pe.next()){var Te=ze.value;Te!=null&&(Te=+Te)>=Te&&(ne=Te-ae,ae+=ne/++Wt,ge+=ne*(Te-ae))}}catch(fr){At={error:fr}}finally{try{ze&&!ze.done&&(Ut=Pe.return)&&Ut.call(Pe)}finally{if(At)throw At.error}}else{var en=-1;try{for(var wn=r.__values(vt),Qn=wn.next();!Qn.done;Qn=wn.next()){var Te=Qn.value;(Te=Ct(Te,++en,vt))!=null&&(Te=+Te)>=Te&&(ne=Te-ae,ae+=ne/++Wt,ge+=ne*(Te-ae))}}catch(fr){Vt={error:fr}}finally{try{Qn&&!Qn.done&&(se=wn.return)&&se.call(wn)}finally{if(Vt)throw Vt.error}}}if(Wt>1)return ge/(Wt-1)}function F(vt,Ct){var At=C(vt,Ct);return At&&Math.sqrt(At)}function k(vt,Ct){var At,Ut,Vt,se,Wt,ne;if(Ct===void 0)try{for(var ae=r.__values(vt),ge=ae.next();!ge.done;ge=ae.next()){var Pe=ge.value;Pe!=null&&(Wt===void 0?Pe>=Pe&&(Wt=ne=Pe):(Wt>Pe&&(Wt=Pe),ne=Pe&&(Wt=ne=Pe):(Wt>Pe&&(Wt=Pe),ne0){for(Wt=Ct[--At];At>0&&(Ut=Wt,Vt=Ct[--At],Wt=Ut+Vt,se=Vt-(Wt-Ut),!se););At>0&&(se<0&&Ct[At-1]<0||se>0&&Ct[At-1]>0)&&(Vt=se*2,Ut=Wt+Vt,Vt==Ut-Wt&&(Wt=Ut))}return Wt},vt}();function V(vt,Ct){var At,Ut,Vt,se,Wt=new j;if(Ct===void 0)try{for(var ne=r.__values(vt),ae=ne.next();!ae.done;ae=ne.next()){var ge=ae.value;(ge=+ge)&&Wt.add(ge)}}catch(en){At={error:en}}finally{try{ae&&!ae.done&&(Ut=ne.return)&&Ut.call(ne)}finally{if(At)throw At.error}}else{var Pe=-1;try{for(var ze=r.__values(vt),Te=ze.next();!Te.done;Te=ze.next()){var ge=Te.value;(ge=+Ct(ge,++Pe,vt))&&Wt.add(ge)}}catch(en){Vt={error:en}}finally{try{Te&&!Te.done&&(se=ze.return)&&se.call(ze)}finally{if(Vt)throw Vt.error}}}return+Wt}var st=function(vt){r.__extends(Ct,vt);function Ct(At,Ut){var Vt,se;At===void 0&&(At=[]),Ut===void 0&&(Ut=ht);var Wt=vt.call(this)||this;Object.defineProperties(Wt,{_intern:{value:new Map},_key:{value:Ut}});try{for(var ne=r.__values(At),ae=ne.next();!ae.done;ae=ne.next()){var ge=r.__read(ae.value,2),Pe=ge[0],ze=ge[1];Wt.set(Pe,ze)}}catch(Te){Vt={error:Te}}finally{try{ae&&!ae.done&&(se=ne.return)&&se.call(ne)}finally{if(Vt)throw Vt.error}}return Wt}return Ct.prototype.get=function(At){return vt.prototype.get.call(this,Q(this,At))},Ct.prototype.has=function(At){return vt.prototype.has.call(this,Q(this,At))},Ct.prototype.set=function(At,Ut){return vt.prototype.set.call(this,it(this,At),Ut)},Ct.prototype.delete=function(At){return vt.prototype.delete.call(this,Pt(this,At))},Ct}(Map),yt=function(vt){r.__extends(Ct,vt);function Ct(At,Ut){var Vt,se;At===void 0&&(At=[]),Ut===void 0&&(Ut=ht);var Wt=vt.call(this)||this;Object.defineProperties(Wt,{_intern:{value:new Map},_key:{value:Ut}});try{for(var ne=r.__values(At),ae=ne.next();!ae.done;ae=ne.next()){var ge=ae.value;Wt.add(ge)}}catch(Pe){Vt={error:Pe}}finally{try{ae&&!ae.done&&(se=ne.return)&&se.call(ne)}finally{if(Vt)throw Vt.error}}return Wt}return Ct.prototype.has=function(At){return vt.prototype.has.call(this,Q(this,At))},Ct.prototype.add=function(At){return vt.prototype.add.call(this,it(this,At))},Ct.prototype.delete=function(At){return vt.prototype.delete.call(this,Pt(this,At))},Ct}(Set);function Q(vt,Ct){var At=vt._intern,Ut=vt._key,Vt=Ut(Ct);return At.has(Vt)?At.get(Vt):Ct}function it(vt,Ct){var At=vt._intern,Ut=vt._key,Vt=Ut(Ct);return At.has(Vt)?At.get(Vt):(At.set(Vt,Ct),Ct)}function Pt(vt,Ct){var At=vt._intern,Ut=vt._key,Vt=Ut(Ct);return At.has(Vt)&&(Ct=At.get(Ct),At.delete(Vt)),Ct}function ht(vt){return vt!==null&&typeof vt=="object"?vt.valueOf():vt}function lt(vt){return vt}function U(vt){for(var Ct=[],At=1;At=Ut.length)return At(se);var ze=new st,Te=Ut[Wt++],en=-1;try{for(var wn=r.__values(se),Qn=wn.next();!Qn.done;Qn=wn.next()){var fr=Qn.value,cr=Te(fr,++en,se),xr=ze.get(cr);xr?xr.push(fr):ze.set(cr,[fr])}}catch(Li){ne={error:Li}}finally{try{Qn&&!Qn.done&&(ae=wn.return)&&ae.call(wn)}finally{if(ne)throw ne.error}}try{for(var Jr=r.__values(ze),gi=Jr.next();!gi.done;gi=Jr.next()){var pi=r.__read(gi.value,2),cr=pi[0],ha=pi[1];ze.set(cr,Vt(ha,Wt))}}catch(Li){ge={error:Li}}finally{try{gi&&!gi.done&&(Pe=Jr.return)&&Pe.call(Jr)}finally{if(ge)throw ge.error}}return Ct(ze)}(vt,0)}function Fe(vt,Ct){return Array.from(Ct,function(At){return vt[At]})}function ft(vt){for(var Ct=[],At=1;At1){var Wt=Uint32Array.from(vt,function(ne,ae){return ae});return Ct.length>1?(Ct=Ct.map(function(ne){return vt.map(ne)}),Wt.sort(function(ne,ae){var ge,Pe;try{for(var ze=r.__values(Ct),Te=ze.next();!Te.done;Te=ze.next()){var en=Te.value,wn=s(en[ne],en[ae]);if(wn)return wn}}catch(Qn){ge={error:Qn}}finally{try{Te&&!Te.done&&(Pe=ze.return)&&Pe.call(ze)}finally{if(ge)throw ge.error}}})):(se=vt.map(se),Wt.sort(function(ne,ae){return s(se[ne],se[ae])})),Fe(vt,Wt)}return vt.sort(se)}function gt(vt,Ct,At){return(Ct.length===1?ft(Gt(vt,Ct,At),function(Ut,Vt){var se=r.__read(Ut,2),Wt=se[0],ne=se[1],ae=r.__read(Vt,2),ge=ae[0],Pe=ae[1];return s(ne,Pe)||s(Wt,ge)}):ft(U(vt,At),function(Ut,Vt){var se=r.__read(Ut,2),Wt=se[0],ne=se[1],ae=r.__read(Vt,2),ge=ae[0],Pe=ae[1];return Ct(ne,Pe)||s(Wt,ge)})).map(function(Ut){var Vt=r.__read(Ut,1),se=Vt[0];return se})}var P=Array.prototype,Kt=P.slice;function H(vt){return function(){return vt}}var ot=Math.sqrt(50),at=Math.sqrt(10),dt=Math.sqrt(2);function Z(vt,Ct,At){var Ut,Vt=-1,se,Wt,ne;if(Ct=+Ct,vt=+vt,At=+At,vt===Ct&&At>0)return[vt];if((Ut=Ct0)for(vt=Math.ceil(vt/ne),Ct=Math.floor(Ct/ne),Wt=new Array(se=Math.ceil(Ct-vt+1));++Vt=0?(se>=ot?10:se>=at?5:se>=dt?2:1)*Math.pow(10,Vt):-Math.pow(10,-Vt)/(se>=ot?10:se>=at?5:se>=dt?2:1)}function S(vt,Ct,At){var Ut=Math.abs(Ct-vt)/Math.max(0,At),Vt=Math.pow(10,Math.floor(Math.log(Ut)/Math.LN10)),se=Ut/Vt;return se>=ot?Vt*=10:se>=at?Vt*=5:se>=dt&&(Vt*=2),Ct0?(vt=Math.floor(vt/Vt)*Vt,Ct=Math.ceil(Ct/Vt)*Vt):Vt<0&&(vt=Math.ceil(vt*Vt)/Vt,Ct=Math.floor(Ct*Vt)/Vt),Ut=Vt}}function A(vt){return Math.ceil(Math.log(p(vt))/Math.LN2)+1}function z(){var vt=lt,Ct=k,At=A;function Ut(Vt){var se;Array.isArray(Vt)||(Vt=Array.from(Vt));var Wt,ne=Vt.length,ae,ge=new Array(ne);for(Wt=0;Wt=Te)if(wn>=Te&&Ct===k){var fr=mt(ze,Te,Qn);isFinite(fr)&&(fr>0?Te=(Math.floor(Te/fr)+1)*fr:fr<0&&(Te=(Math.ceil(Te*-fr)+1)/-fr))}else en.pop()}for(var cr=en.length;en[0]<=ze;)en.shift(),--cr;for(;en[cr-1]>Te;)en.pop(),--cr;var xr=new Array(cr+1),Jr;for(Wt=0;Wt<=cr;++Wt)Jr=xr[Wt]=[],Jr.x0=Wt>0?en[Wt-1]:ze,Jr.x1=Wt=ge)&&(Wt=ge)}}catch(en){At={error:en}}finally{try{ae&&!ae.done&&(Ut=ne.return)&&Ut.call(ne)}finally{if(At)throw At.error}}else{var Pe=-1;try{for(var ze=r.__values(vt),Te=ze.next();!Te.done;Te=ze.next()){var ge=Te.value;(ge=Ct(ge,++Pe,vt))!=null&&(Wt=ge)&&(Wt=ge)}}catch(en){Vt={error:en}}finally{try{Te&&!Te.done&&(se=ze.return)&&se.call(ze)}finally{if(Vt)throw Vt.error}}}return Wt}function pt(vt,Ct){var At,Ut,Vt,se,Wt;if(Ct===void 0)try{for(var ne=r.__values(vt),ae=ne.next();!ae.done;ae=ne.next()){var ge=ae.value;ge!=null&&(Wt>ge||Wt===void 0&&ge>=ge)&&(Wt=ge)}}catch(en){At={error:en}}finally{try{ae&&!ae.done&&(Ut=ne.return)&&Ut.call(ne)}finally{if(At)throw At.error}}else{var Pe=-1;try{for(var ze=r.__values(vt),Te=ze.next();!Te.done;Te=ze.next()){var ge=Te.value;(ge=Ct(ge,++Pe,vt))!=null&&(Wt>ge||Wt===void 0&&ge>=ge)&&(Wt=ge)}}catch(en){Vt={error:en}}finally{try{Te&&!Te.done&&(se=ze.return)&&se.call(ze)}finally{if(Vt)throw Vt.error}}}return Wt}function It(vt,Ct,At,Ut,Vt){for(At===void 0&&(At=0),Ut===void 0&&(Ut=vt.length-1),Vt===void 0&&(Vt=s);Ut>At;){if(Ut-At>600){var se=Ut-At+1,Wt=Ct-At+1,ne=Math.log(se),ae=.5*Math.exp(2*ne/3),ge=.5*Math.sqrt(ne*ae*(se-ae)/se)*(Wt-se/2<0?-1:1),Pe=Math.max(At,Math.floor(Ct-Wt*ae/se+ge)),ze=Math.min(Ut,Math.floor(Ct+(se-Wt)*ae/se+ge));It(vt,Ct,Pe,ze,Vt)}var Te=vt[Ct],en=At,wn=Ut;for(Zt(vt,At,Ct),Vt(vt[Ut],Te)>0&&Zt(vt,At,Ut);en0;)--wn}Vt(vt[At],Te)===0?Zt(vt,At,wn):(++wn,Zt(vt,wn,Ut)),wn<=Ct&&(At=wn+1),Ct<=wn&&(Ut=wn-1)}return vt}function Zt(vt,Ct,At){var Ut=vt[Ct];vt[Ct]=vt[At],vt[At]=Ut}function Lt(vt,Ct,At){if(vt=Float64Array.from(f(vt,At)),!!(Ut=vt.length)){if((Ct=+Ct)<=0||Ut<2)return pt(vt);if(Ct>=1)return J(vt);var Ut,Vt=(Ut-1)*Ct,se=Math.floor(Vt),Wt=J(It(vt,se).subarray(0,se+1)),ne=pt(vt.subarray(se+1));return Wt+(ne-Wt)*(Vt-se)}}function Yt(vt,Ct,At){if(At===void 0&&(At=c),!!(Ut=vt.length)){if((Ct=+Ct)<=0||Ut<2)return+At(vt[0],0,vt);if(Ct>=1)return+At(vt[Ut-1],Ut-1,vt);var Ut,Vt=(Ut-1)*Ct,se=Math.floor(Vt),Wt=+At(vt[se],se,vt),ne=+At(vt[se+1],se+1,vt);return Wt+(ne-Wt)*(Vt-se)}}function Se(vt,Ct,At){return Math.ceil((At-Ct)/(2*(Lt(vt,.75)-Lt(vt,.25))*Math.pow(p(vt),-1/3)))}function Ke(vt,Ct,At){return Math.ceil((At-Ct)/(3.5*F(vt)*Math.pow(p(vt),-1/3)))}function fn(vt,Ct){var At,Ut,Vt,se,Wt,ne=-1,ae=-1;if(Ct===void 0)try{for(var ge=r.__values(vt),Pe=ge.next();!Pe.done;Pe=ge.next()){var ze=Pe.value;++ae,ze!=null&&(Wt=ze)&&(Wt=ze,ne=ae)}}catch(wn){At={error:wn}}finally{try{Pe&&!Pe.done&&(Ut=ge.return)&&Ut.call(ge)}finally{if(At)throw At.error}}else try{for(var Te=r.__values(vt),en=Te.next();!en.done;en=Te.next()){var ze=en.value;(ze=Ct(ze,++ae,vt))!=null&&(Wt=ze)&&(Wt=ze,ne=ae)}}catch(wn){Vt={error:wn}}finally{try{en&&!en.done&&(se=Te.return)&&se.call(Te)}finally{if(Vt)throw Vt.error}}return ne}function on(vt,Ct){var At,Ut,Vt,se,Wt=0,ne=0;if(Ct===void 0)try{for(var ae=r.__values(vt),ge=ae.next();!ge.done;ge=ae.next()){var Pe=ge.value;Pe!=null&&(Pe=+Pe)>=Pe&&(++Wt,ne+=Pe)}}catch(wn){At={error:wn}}finally{try{ge&&!ge.done&&(Ut=ae.return)&&Ut.call(ae)}finally{if(At)throw At.error}}else{var ze=-1;try{for(var Te=r.__values(vt),en=Te.next();!en.done;en=Te.next()){var Pe=en.value;(Pe=Ct(Pe,++ze,vt))!=null&&(Pe=+Pe)>=Pe&&(++Wt,ne+=Pe)}}catch(wn){Vt={error:wn}}finally{try{en&&!en.done&&(se=Te.return)&&se.call(Te)}finally{if(Vt)throw Vt.error}}}if(Wt)return ne/Wt}function mn(vt,Ct){return Lt(vt,.5,Ct)}function Sn(vt){var Ct,At,Ut,Vt,se,Wt;return r.__generator(this,function(ne){switch(ne.label){case 0:ne.trys.push([0,5,6,7]),Ct=r.__values(vt),At=Ct.next(),ne.label=1;case 1:return At.done?[3,4]:(Ut=At.value,[5,r.__values(Ut)]);case 2:ne.sent(),ne.label=3;case 3:return At=Ct.next(),[3,1];case 4:return[3,7];case 5:return Vt=ne.sent(),se={error:Vt},[3,7];case 6:try{At&&!At.done&&(Wt=Ct.return)&&Wt.call(Ct)}finally{if(se)throw se.error}return[7];case 7:return[2]}})}function xn(vt){return Array.from(Sn(vt))}function bn(vt,Ct){var At,Ut,Vt,se,Wt,ne=-1,ae=-1;if(Ct===void 0)try{for(var ge=r.__values(vt),Pe=ge.next();!Pe.done;Pe=ge.next()){var ze=Pe.value;++ae,ze!=null&&(Wt>ze||Wt===void 0&&ze>=ze)&&(Wt=ze,ne=ae)}}catch(wn){At={error:wn}}finally{try{Pe&&!Pe.done&&(Ut=ge.return)&&Ut.call(ge)}finally{if(At)throw At.error}}else try{for(var Te=r.__values(vt),en=Te.next();!en.done;en=Te.next()){var ze=en.value;(ze=Ct(ze,++ae,vt))!=null&&(Wt>ze||Wt===void 0&&ze>=ze)&&(Wt=ze,ne=ae)}}catch(wn){Vt={error:wn}}finally{try{en&&!en.done&&(se=Te.return)&&se.call(Te)}finally{if(Vt)throw Vt.error}}return ne}function An(vt,Ct){var At,Ut;Ct===void 0&&(Ct=Dn);var Vt=[],se,Wt=!1;try{for(var ne=r.__values(vt),ae=ne.next();!ae.done;ae=ne.next()){var ge=ae.value;Wt&&Vt.push(Ct(se,ge)),se=ge,Wt=!0}}catch(Pe){At={error:Pe}}finally{try{ae&&!ae.done&&(Ut=ne.return)&&Ut.call(ne)}finally{if(At)throw At.error}}return Vt}function Dn(vt,Ct){return[vt,Ct]}function Ht(vt,Ct,At){vt=+vt,Ct=+Ct,At=(Vt=arguments.length)<2?(Ct=vt,vt=0,1):Vt<3?1:+At;for(var Ut=-1,Vt=Math.max(0,Math.ceil((Ct-vt)/At))|0,se=new Array(Vt);++Ut0:s(Te,Te)===0)&&(Wt=ze,ae=Te,ne=!0)}}catch(Qn){At={error:Qn}}finally{try{Pe&&!Pe.done&&(Ut=ge.return)&&Ut.call(ge)}finally{if(At)throw At.error}}}else try{for(var en=r.__values(vt),wn=en.next();!wn.done;wn=en.next()){var Te=wn.value;(ne?Ct(Te,Wt)>0:Ct(Te,Te)===0)&&(Wt=Te,ne=!0)}}catch(Qn){Vt={error:Qn}}finally{try{wn&&!wn.done&&(se=en.return)&&se.call(en)}finally{if(Vt)throw Vt.error}}return Wt}function Ve(vt,Ct){var At,Ut;if(Ct===void 0&&(Ct=s),Ct.length===1)return fn(vt,Ct);var Vt,se=-1,Wt=-1;try{for(var ne=r.__values(vt),ae=ne.next();!ae.done;ae=ne.next()){var ge=ae.value;++Wt,(se<0?Ct(ge,ge)===0:Ct(ge,Vt)>0)&&(Vt=ge,se=Wt)}}catch(Pe){At={error:Pe}}finally{try{ae&&!ae.done&&(Ut=ne.return)&&Ut.call(ne)}finally{if(At)throw At.error}}return se}function Fn(vt,Ct){var At=oe(vt,Ct);return At<0?void 0:At}var Pr=pr(Math.random);function pr(vt){return function(At,Ut,Vt){Ut===void 0&&(Ut=0),Vt===void 0&&(Vt=At.length);for(var se=Vt-(Ut=+Ut);se;){var Wt=vt()*se--|0,ne=At[se+Ut];At[se+Ut]=At[Wt+Ut],At[Wt+Ut]=ne}return At}}function Br(vt,Ct){var At,Ut,Vt,se,Wt=0;if(Ct===void 0)try{for(var ne=r.__values(vt),ae=ne.next();!ae.done;ae=ne.next()){var ge=ae.value;(ge=+ge)&&(Wt+=ge)}}catch(en){At={error:en}}finally{try{ae&&!ae.done&&(Ut=ne.return)&&Ut.call(ne)}finally{if(At)throw At.error}}else{var Pe=-1;try{for(var ze=r.__values(vt),Te=ze.next();!Te.done;Te=ze.next()){var ge=Te.value;(ge=+Ct(ge,++Pe,vt))&&(Wt+=ge)}}catch(en){Vt={error:en}}finally{try{Te&&!Te.done&&(se=ze.return)&&se.call(ze)}finally{if(Vt)throw Vt.error}}}return Wt}function sr(vt){if(!(se=vt.length))return[];for(var Ct=-1,At=pt(vt,Ft),Ut=new Array(At);++Ct=x.length)return _!=null&&j.sort(_),D!=null?D(j):j;for(var Q=-1,it=j.length,Pt=x[V++],ht,lt,U=l(),xt,Gt=st();++Qx.length)return j;var st,yt=M[V-1];return D!=null&&V>=x.length?st=j.entries():(st=[],j.each(function(Q,it){st.push({key:it,values:k(Q,V)})})),yt!=null?st.sort(function(Q,it){return yt(Q.key,it.key)}):st}return C={object:function(j){return F(j,0,c,f)},map:function(j){return F(j,0,h,d)},entries:function(j){return k(F(j,0,h,d),0)},key:function(j){return x.push(j),C},sortKeys:function(j){return M[x.length-1]=j,C},sortValues:function(j){return _=j,C},rollup:function(j){return D=j,C}}}function c(){return{}}function f(x,M,_){x[M]=_}function h(){return l()}function d(x,M,_){x.set(M,_)}function v(){}var g=l.prototype;v.prototype=p.prototype={constructor:v,has:g.has,add:function(x){return x+="",this[o+x]=x,this},remove:g.remove,clear:g.clear,values:g.keys,size:g.size,empty:g.empty,each:g.each};function p(x,M){var _=new v;if(x instanceof v)x.each(function(F){_.add(F)});else if(x){var D=-1,C=x.length;if(M==null)for(;++Dd&&(d=ft),gtv&&(v=gt)}function m(ft,gt,P){var Kt=gt[1][0]-gt[0][0],H=gt[1][1]-gt[0][1],ot=ft.clipExtent&&ft.clipExtent();ft.scale(150).translate([0,0]),ot!=null&&ft.clipExtent(null),s.geoStream(P,ft.stream(g));var at=g.result(),dt=Math.min(Kt/(at[1][0]-at[0][0]),H/(at[1][1]-at[0][1])),Z=+gt[0][0]+(Kt-dt*(at[1][0]+at[0][0]))/2,mt=+gt[0][1]+(H-dt*(at[1][1]+at[0][1]))/2;return ot!=null&&ft.clipExtent(ot),ft.scale(dt*150).translate([Z,mt])}function y(ft,gt,P){return m(ft,[[0,0],gt],P)}function w(ft){var gt=ft.length;return{point:function(P,Kt){for(var H=-1;++H=.12&&It<.234&&pt>=-.425&&pt<-.214?H:It>=.166&&It<.234&&pt>=-.214&&pt<-.115?at:P).invert(A)},S.stream=function(A){return ft&>===A?ft:ft=w([P.stream(gt=A),H.stream(A),at.stream(A)])},S.precision=function(A){return arguments.length?(P.precision(A),H.precision(A),at.precision(A),B()):P.precision()},S.scale=function(A){return arguments.length?(P.scale(A),H.scale(A*.35),at.scale(A),S.translate(P.translate())):P.scale()},S.translate=function(A){if(!arguments.length)return P.translate();var z=P.scale(),J=+A[0],pt=+A[1];return Kt=P.translate(A).clipExtent([[J-.455*z,pt-.238*z],[J+.455*z,pt+.238*z]]).stream(mt),ot=H.translate([J-.307*z,pt+.201*z]).clipExtent([[J-.425*z+u,pt+.12*z+u],[J-.214*z-u,pt+.234*z-u]]).stream(mt),dt=at.translate([J-.205*z,pt+.212*z]).clipExtent([[J-.214*z+u,pt+.166*z+u],[J-.115*z-u,pt+.234*z-u]]).stream(mt),B()},S.fitExtent=function(A,z){return m(S,A,z)},S.fitSize=function(A,z){return y(S,A,z)};function B(){return ft=gt=null,S}return S.drawCompositionBorders=function(A){var z=P([-102.91,26.3]),J=P([-104,27.5]),pt=P([-108,29.1]),It=P([-110,29.1]),Zt=P([-110,26.7]),Lt=P([-112.8,27.6]),Yt=P([-114.3,30.6]),Se=P([-119.3,30.1]);A.moveTo(z[0],z[1]),A.lineTo(J[0],J[1]),A.lineTo(pt[0],pt[1]),A.lineTo(It[0],It[1]),A.moveTo(Zt[0],Zt[1]),A.lineTo(Lt[0],Lt[1]),A.lineTo(Yt[0],Yt[1]),A.lineTo(Se[0],Se[1])},S.getCompositionBorders=function(){var A=l.path();return this.drawCompositionBorders(A),A.toString()},S.scale(1070)}function M(ft){var gt=ft.length;return{point:function(P,Kt){for(var H=-1;++H=.12&&fn<.234&&Ke>=-.425&&Ke<-.214?H:fn>=.166&&fn<.234&&Ke>=-.214&&Ke<-.115?at:fn>=.2064&&fn<.2413&&Ke>=.312&&Ke<.385?Z:fn>=.09&&fn<.1197&&Ke>=-.4243&&Ke<-.3232?S:fn>=-.0518&&fn<.0895&&Ke>=-.4243&&Ke<-.3824?A:P).invert(Lt)},It.stream=function(Lt){return ft&>===Lt?ft:ft=M([P.stream(gt=Lt),H.stream(Lt),at.stream(Lt),Z.stream(Lt),S.stream(Lt),A.stream(Lt)])},It.precision=function(Lt){return arguments.length?(P.precision(Lt),H.precision(Lt),at.precision(Lt),Z.precision(Lt),S.precision(Lt),A.precision(Lt),Zt()):P.precision()},It.scale=function(Lt){return arguments.length?(P.scale(Lt),H.scale(Lt*.35),at.scale(Lt),Z.scale(Lt),S.scale(Lt*2),A.scale(Lt),It.translate(P.translate())):P.scale()},It.translate=function(Lt){if(!arguments.length)return P.translate();var Yt=P.scale(),Se=+Lt[0],Ke=+Lt[1];return Kt=P.translate(Lt).clipExtent([[Se-.455*Yt,Ke-.238*Yt],[Se+.455*Yt,Ke+.238*Yt]]).stream(pt),ot=H.translate([Se-.307*Yt,Ke+.201*Yt]).clipExtent([[Se-.425*Yt+u,Ke+.12*Yt+u],[Se-.214*Yt-u,Ke+.233*Yt-u]]).stream(pt),dt=at.translate([Se-.205*Yt,Ke+.212*Yt]).clipExtent([[Se-.214*Yt+u,Ke+.166*Yt+u],[Se-.115*Yt-u,Ke+.233*Yt-u]]).stream(pt),mt=Z.translate([Se+.35*Yt,Ke+.224*Yt]).clipExtent([[Se+.312*Yt+u,Ke+.2064*Yt+u],[Se+.385*Yt-u,Ke+.233*Yt-u]]).stream(pt),B=S.translate([Se-.492*Yt,Ke+.09*Yt]).clipExtent([[Se-.4243*Yt+u,Ke+.0903*Yt+u],[Se-.3233*Yt-u,Ke+.1197*Yt-u]]).stream(pt),z=A.translate([Se-.408*Yt,Ke+.018*Yt]).clipExtent([[Se-.4244*Yt+u,Ke-.0519*Yt+u],[Se-.3824*Yt-u,Ke+.0895*Yt-u]]).stream(pt),Zt()},It.fitExtent=function(Lt,Yt){return m(It,Lt,Yt)},It.fitSize=function(Lt,Yt){return y(It,Lt,Yt)};function Zt(){return ft=gt=null,It}return It.drawCompositionBorders=function(Lt){var Yt=P([-110.4641,28.2805]),Se=P([-104.0597,28.9528]),Ke=P([-103.7049,25.1031]),fn=P([-109.8337,24.4531]),on=P([-124.4745,28.1407]),mn=P([-110.931,30.8844]),Sn=P([-109.8337,24.4531]),xn=P([-122.4628,21.8562]),bn=P([-76.8579,25.1544]),An=P([-72.429,24.2097]),Dn=P([-72.8265,22.7056]),Ht=P([-77.1852,23.6392]),kt=P([-125.0093,29.7791]),oe=P([-118.5193,31.3262]),fe=P([-118.064,29.6912]),Ve=P([-124.4369,28.169]),Fn=P([-128.1314,37.4582]),Pr=P([-125.2132,38.214]),pr=P([-122.3616,30.5115]),Br=P([-125.0315,29.8211]);Lt.moveTo(Yt[0],Yt[1]),Lt.lineTo(Se[0],Se[1]),Lt.lineTo(Ke[0],Ke[1]),Lt.lineTo(Ke[0],Ke[1]),Lt.lineTo(fn[0],fn[1]),Lt.closePath(),Lt.moveTo(on[0],on[1]),Lt.lineTo(mn[0],mn[1]),Lt.lineTo(Sn[0],Sn[1]),Lt.lineTo(Sn[0],Sn[1]),Lt.lineTo(xn[0],xn[1]),Lt.closePath(),Lt.moveTo(bn[0],bn[1]),Lt.lineTo(An[0],An[1]),Lt.lineTo(Dn[0],Dn[1]),Lt.lineTo(Dn[0],Dn[1]),Lt.lineTo(Ht[0],Ht[1]),Lt.closePath(),Lt.moveTo(kt[0],kt[1]),Lt.lineTo(oe[0],oe[1]),Lt.lineTo(fe[0],fe[1]),Lt.lineTo(fe[0],fe[1]),Lt.lineTo(Ve[0],Ve[1]),Lt.closePath(),Lt.moveTo(Fn[0],Fn[1]),Lt.lineTo(Pr[0],Pr[1]),Lt.lineTo(pr[0],pr[1]),Lt.lineTo(pr[0],pr[1]),Lt.lineTo(Br[0],Br[1]),Lt.closePath()},It.getCompositionBorders=function(){var Lt=l.path();return this.drawCompositionBorders(Lt),Lt.toString()},It.scale(1070)}function D(ft){var gt=ft.length;return{point:function(P,Kt){for(var H=-1;++H=.05346&&J<.0897&&z>=-.13388&&z<-.0322?H:P).invert(S)},Z.stream=function(S){return ft&>===S?ft:ft=D([P.stream(gt=S),H.stream(S)])},Z.precision=function(S){return arguments.length?(P.precision(S),H.precision(S),mt()):P.precision()},Z.scale=function(S){return arguments.length?(P.scale(S),H.scale(S),Z.translate(P.translate())):P.scale()},Z.translate=function(S){if(!arguments.length)return P.translate();var B=P.scale(),A=+S[0],z=+S[1];return Kt=P.translate(S).clipExtent([[A-.06857*B,z-.1288*B],[A+.13249*B,z+.06*B]]).stream(dt),ot=H.translate([A+.1*B,z-.094*B]).clipExtent([[A-.1331*B+u,z+.053457*B+u],[A-.0354*B-u,z+.08969*B-u]]).stream(dt),mt()},Z.fitExtent=function(S,B){return m(Z,S,B)},Z.fitSize=function(S,B){return y(Z,S,B)};function mt(){return ft=gt=null,Z}return Z.drawCompositionBorders=function(S){var B=P([-14.034675,34.965007]),A=P([-7.4208899,35.536988]),z=P([-7.3148275,33.54359]);S.moveTo(B[0],B[1]),S.lineTo(A[0],A[1]),S.lineTo(z[0],z[1])},Z.getCompositionBorders=function(){var S=l.path();return this.drawCompositionBorders(S),S.toString()},Z.scale(2700)}function F(ft){var gt=ft.length;return{point:function(P,Kt){for(var H=-1;++H=.0093&&It<.03678&&pt>=-.03875&&pt<-.0116?H:It>=-.0412&&It<.0091&&pt>=-.07782&&pt<-.01166?at:P).invert(A)},S.stream=function(A){return ft&>===A?ft:ft=F([P.stream(gt=A),H.stream(A),at.stream(A)])},S.precision=function(A){return arguments.length?(P.precision(A),H.precision(A),at.precision(A),B()):P.precision()},S.scale=function(A){return arguments.length?(P.scale(A),H.scale(A),at.scale(A*.6),S.translate(P.translate())):P.scale()},S.translate=function(A){if(!arguments.length)return P.translate();var z=P.scale(),J=+A[0],pt=+A[1];return Kt=P.translate(A).clipExtent([[J-.0115*z,pt-.1138*z],[J+.2105*z,pt+.0673*z]]).stream(mt),ot=H.translate([J-.0265*z,pt+.025*z]).clipExtent([[J-.0388*z+u,pt+.0093*z+u],[J-.0116*z-u,pt+.0368*z-u]]).stream(mt),dt=at.translate([J-.045*z,pt+-.02*z]).clipExtent([[J-.0778*z+u,pt-.0413*z+u],[J-.0117*z-u,pt+.0091*z-u]]).stream(mt),B()},S.fitExtent=function(A,z){return m(S,A,z)},S.fitSize=function(A,z){return y(S,A,z)};function B(){return ft=gt=null,S}return S.drawCompositionBorders=function(A){var z=P([-12.8351,38.7113]),J=P([-10.8482,38.7633]),pt=P([-10.8181,37.2072]),It=P([-12.7345,37.1573]),Zt=P([-16.0753,41.4436]),Lt=P([-10.9168,41.6861]),Yt=P([-10.8557,38.7747]),Se=P([-15.6728,38.5505]);A.moveTo(z[0],z[1]),A.lineTo(J[0],J[1]),A.lineTo(pt[0],pt[1]),A.lineTo(pt[0],pt[1]),A.lineTo(It[0],It[1]),A.closePath(),A.moveTo(Zt[0],Zt[1]),A.lineTo(Lt[0],Lt[1]),A.lineTo(Yt[0],Yt[1]),A.lineTo(Yt[0],Yt[1]),A.lineTo(Se[0],Se[1]),A.closePath()},S.getCompositionBorders=function(){var A=l.path();return this.drawCompositionBorders(A),A.toString()},S.scale(4200)}function j(ft){var gt=ft.length;return{point:function(P,Kt){for(var H=-1;++H=-.0676&&J<-.026&&z>=-.0857&&z<-.0263?H:P).invert(S)},Z.stream=function(S){return ft&>===S?ft:ft=j([P.stream(gt=S),H.stream(S)])},Z.precision=function(S){return arguments.length?(P.precision(S),H.precision(S),mt()):P.precision()},Z.scale=function(S){return arguments.length?(P.scale(S),H.scale(S),Z.translate(P.translate())):P.scale()},Z.translate=function(S){if(!arguments.length)return P.translate();var B=P.scale(),A=+S[0],z=+S[1];return Kt=P.translate(S).clipExtent([[A-.0262*B,z-.0734*B],[A+.1741*B,z+.079*B]]).stream(dt),ot=H.translate([A-.06*B,z-.04*B]).clipExtent([[A-.0857*B+u,z-.0676*B+u],[A-.0263*B-u,z-.026*B-u]]).stream(dt),mt()},Z.fitExtent=function(S,B){return m(Z,S,B)},Z.fitSize=function(S,B){return y(Z,S,B)};function mt(){return ft=gt=null,Z}return Z.drawCompositionBorders=function(S){var B=P([-84.9032,2.3757]),A=P([-81.5047,2.3708]),z=P([-81.5063,-.01]),J=P([-84.9086,-.005]);S.moveTo(B[0],B[1]),S.lineTo(A[0],A[1]),S.lineTo(z[0],z[1]),S.lineTo(J[0],J[1]),S.closePath()},Z.getCompositionBorders=function(){var S=l.path();return this.drawCompositionBorders(S),S.toString()},Z.scale(3500)}function st(ft){var gt=ft.length;return{point:function(P,Kt){for(var H=-1;++H=.2582&&Lt<.32&&Zt>=-.1036&&Zt<-.087?H:Lt>=-.01298&&Lt<.0133&&Zt>=-.11396&&Zt<-.05944?at:Lt>=.01539&&Lt<.03911&&Zt>=-.089&&Zt<-.0588?Z:P).invert(J)},A.stream=function(J){return ft&>===J?ft:ft=st([P.stream(gt=J),H.stream(J),at.stream(J),Z.stream(J)])},A.precision=function(J){return arguments.length?(P.precision(J),H.precision(J),at.precision(J),Z.precision(J),z()):P.precision()},A.scale=function(J){return arguments.length?(P.scale(J),H.scale(J*.15),at.scale(J*1.5),Z.scale(J*1.5),A.translate(P.translate())):P.scale()},A.translate=function(J){if(!arguments.length)return P.translate();var pt=P.scale(),It=+J[0],Zt=+J[1];return Kt=P.translate(J).clipExtent([[It-.059*pt,Zt-.3835*pt],[It+.4498*pt,Zt+.3375*pt]]).stream(B),ot=H.translate([It-.087*pt,Zt+.17*pt]).clipExtent([[It-.1166*pt+u,Zt+.2582*pt+u],[It-.06*pt-u,Zt+.32*pt-u]]).stream(B),dt=at.translate([It-.092*pt,Zt-0*pt]).clipExtent([[It-.114*pt+u,Zt-.013*pt+u],[It-.0594*pt-u,Zt+.0133*pt-u]]).stream(B),mt=Z.translate([It-.089*pt,Zt-.0265*pt]).clipExtent([[It-.089*pt+u,Zt+.0154*pt+u],[It-.0588*pt-u,Zt+.0391*pt-u]]).stream(B),z()},A.fitExtent=function(J,pt){return m(A,J,pt)},A.fitSize=function(J,pt){return y(A,J,pt)};function z(){return ft=gt=null,A}return A.drawCompositionBorders=function(J){var pt=P([-82.6999,-51.3043]),It=P([-77.5442,-51.6631]),Zt=P([-78.0254,-55.186]),Lt=P([-83.6106,-54.7785]),Yt=P([-80.0638,-35.984]),Se=P([-76.2153,-36.1811]),Ke=P([-76.2994,-37.6839]),fn=P([-80.2231,-37.4757]),on=P([-78.442,-37.706]),mn=P([-76.263,-37.8054]),Sn=P([-76.344,-39.1595]),xn=P([-78.5638,-39.0559]);J.moveTo(pt[0],pt[1]),J.lineTo(It[0],It[1]),J.lineTo(Zt[0],Zt[1]),J.lineTo(Zt[0],Zt[1]),J.lineTo(Lt[0],Lt[1]),J.closePath(),J.moveTo(Yt[0],Yt[1]),J.lineTo(Se[0],Se[1]),J.lineTo(Ke[0],Ke[1]),J.lineTo(Ke[0],Ke[1]),J.lineTo(fn[0],fn[1]),J.closePath(),J.moveTo(on[0],on[1]),J.lineTo(mn[0],mn[1]),J.lineTo(Sn[0],Sn[1]),J.lineTo(Sn[0],Sn[1]),J.lineTo(xn[0],xn[1]),J.closePath()},A.getCompositionBorders=function(){var J=l.path();return this.drawCompositionBorders(J),J.toString()},A.scale(700)}function Q(ft){var gt=ft.length;return{point:function(P,Kt){for(var H=-1;++H=-.10925&&It<-.02701&&pt>=-.135&&pt<-.0397?H:It>=.04713&&It<.11138&&pt>=-.03986&&pt<.051?at:P).invert(A)},S.stream=function(A){return ft&>===A?ft:ft=Q([P.stream(gt=A),H.stream(A),at.stream(A)])},S.precision=function(A){return arguments.length?(P.precision(A),H.precision(A),at.precision(A),B()):P.precision()},S.scale=function(A){return arguments.length?(P.scale(A),H.scale(A),at.scale(A*.7),S.translate(P.translate())):P.scale()},S.translate=function(A){if(!arguments.length)return P.translate();var z=P.scale(),J=+A[0],pt=+A[1];return Kt=P.translate(A).clipExtent([[J-.1352*z,pt-.1091*z],[J+.117*z,pt+.098*z]]).stream(mt),ot=H.translate([J-.0425*z,pt-.005*z]).clipExtent([[J-.135*z+u,pt-.1093*z+u],[J-.0397*z-u,pt-.027*z-u]]).stream(mt),dt=at.translate(A).clipExtent([[J-.0399*z+u,pt+.0471*z+u],[J+.051*z-u,pt+.1114*z-u]]).stream(mt),B()},S.fitExtent=function(A,z){return m(S,A,z)},S.fitSize=function(A,z){return y(S,A,z)};function B(){return ft=gt=null,S}return S.drawCompositionBorders=function(A){var z=P([126.01320483689143,41.621090310215585]),J=P([133.04304387025903,42.15087523707186]),pt=P([133.3021766080688,37.43975444725098]),It=P([126.87889168628224,36.95488945159779]),Zt=P([132.9,29.8]),Lt=P([134,33]),Yt=P([139.3,33.2]),Se=P([139.16,30.5]);A.moveTo(z[0],z[1]),A.lineTo(J[0],J[1]),A.lineTo(pt[0],pt[1]),A.lineTo(It[0],It[1]),A.closePath(),A.moveTo(Zt[0],Zt[1]),A.lineTo(Lt[0],Lt[1]),A.lineTo(Yt[0],Yt[1]),A.lineTo(Se[0],Se[1])},S.getCompositionBorders=function(){var A=l.path();return this.drawCompositionBorders(A),A.toString()},S.scale(2200)}function Pt(ft){var gt=ft.length;return{point:function(P,Kt){for(var H=-1;++H=.029&&Ve<.0864&&fe>=-.14&&fe<-.0996?H:Ve>=0&&Ve<.029&&fe>=-.14&&fe<-.0996?at:Ve>=-.032&&Ve<0&&fe>=-.14&&fe<-.0996?Z:Ve>=-.052&&Ve<-.032&&fe>=-.14&&fe<-.0996?S:Ve>=-.076&&Ve<.052&&fe>=-.14&&fe<-.0996?A:Ve>=-.076&&Ve<-.052&&fe>=.0967&&fe<.1371?J:Ve>=-.052&&Ve<-.02&&fe>=.0967&&fe<.1371?It:Ve>=-.02&&Ve<.012&&fe>=.0967&&fe<.1371?Lt:Ve>=.012&&Ve<.033&&fe>=.0967&&fe<.1371?Se:Ve>=.033&&Ve<.0864&&fe>=.0967&&fe<.1371?fn:P).invert(Ht)},An.stream=function(Ht){return ft&>===Ht?ft:ft=Pt([P.stream(gt=Ht),H.stream(Ht),at.stream(Ht),Z.stream(Ht),S.stream(Ht),A.stream(Ht),J.stream(Ht),It.stream(Ht),Lt.stream(Ht),Se.stream(Ht),fn.stream(Ht),mn.stream(Ht)])},An.precision=function(Ht){return arguments.length?(P.precision(Ht),H.precision(Ht),at.precision(Ht),Z.precision(Ht),S.precision(Ht),A.precision(Ht),J.precision(Ht),It.precision(Ht),Lt.precision(Ht),Se.precision(Ht),fn.precision(Ht),mn.precision(Ht),Dn()):P.precision()},An.scale=function(Ht){return arguments.length?(P.scale(Ht),H.scale(Ht*.6),at.scale(Ht*1.6),Z.scale(Ht*1.4),S.scale(Ht*5),A.scale(Ht*1.3),J.scale(Ht*1.6),It.scale(Ht*1.2),Lt.scale(Ht*.3),Se.scale(Ht*2.7),fn.scale(Ht*.5),mn.scale(Ht*.06),An.translate(P.translate())):P.scale()},An.translate=function(Ht){if(!arguments.length)return P.translate();var kt=P.scale(),oe=+Ht[0],fe=+Ht[1];return Kt=P.translate(Ht).clipExtent([[oe-.0996*kt,fe-.0908*kt],[oe+.0967*kt,fe+.0864*kt]]).stream(bn),ot=H.translate([oe-.12*kt,fe+.0575*kt]).clipExtent([[oe-.14*kt+u,fe+.029*kt+u],[oe-.0996*kt-u,fe+.0864*kt-u]]).stream(bn),dt=at.translate([oe-.12*kt,fe+.013*kt]).clipExtent([[oe-.14*kt+u,fe+0*kt+u],[oe-.0996*kt-u,fe+.029*kt-u]]).stream(bn),mt=Z.translate([oe-.12*kt,fe-.014*kt]).clipExtent([[oe-.14*kt+u,fe-.032*kt+u],[oe-.0996*kt-u,fe+0*kt-u]]).stream(bn),B=S.translate([oe-.12*kt,fe-.044*kt]).clipExtent([[oe-.14*kt+u,fe-.052*kt+u],[oe-.0996*kt-u,fe-.032*kt-u]]).stream(bn),z=A.translate([oe-.12*kt,fe-.065*kt]).clipExtent([[oe-.14*kt+u,fe-.076*kt+u],[oe-.0996*kt-u,fe-.052*kt-u]]).stream(bn),pt=J.translate([oe+.117*kt,fe-.064*kt]).clipExtent([[oe+.0967*kt+u,fe-.076*kt+u],[oe+.1371*kt-u,fe-.052*kt-u]]).stream(bn),Zt=It.translate([oe+.116*kt,fe-.0355*kt]).clipExtent([[oe+.0967*kt+u,fe-.052*kt+u],[oe+.1371*kt-u,fe-.02*kt-u]]).stream(bn),Yt=Lt.translate([oe+.116*kt,fe-.0048*kt]).clipExtent([[oe+.0967*kt+u,fe-.02*kt+u],[oe+.1371*kt-u,fe+.012*kt-u]]).stream(bn),Ke=Se.translate([oe+.116*kt,fe+.022*kt]).clipExtent([[oe+.0967*kt+u,fe+.012*kt+u],[oe+.1371*kt-u,fe+.033*kt-u]]).stream(bn),Sn=mn.translate([oe+.11*kt,fe+.045*kt]).clipExtent([[oe+.0967*kt+u,fe+.033*kt+u],[oe+.1371*kt-u,fe+.06*kt-u]]).stream(bn),on=fn.translate([oe+.115*kt,fe+.075*kt]).clipExtent([[oe+.0967*kt+u,fe+.06*kt+u],[oe+.1371*kt-u,fe+.0864*kt-u]]).stream(bn),Dn()},An.fitExtent=function(Ht,kt){return m(An,Ht,kt)},An.fitSize=function(Ht,kt){return y(An,Ht,kt)};function Dn(){return ft=gt=null,An}return An.drawCompositionBorders=function(Ht){var kt,oe,fe,Ve;kt=P([-7.938886725111036,43.7219460918835]),oe=P([-4.832080896458295,44.12930268549372]),fe=P([-4.205299743793263,40.98096346967365]),Ve=P([-7.071796453126152,40.610037319181444]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([-8.42751373617692,45.32889452553031]),oe=P([-5.18599305777107,45.7566442062976]),fe=P([-4.832080905154431,44.129302726751426]),Ve=P([-7.938886737126192,43.72194613263854]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([-9.012656899657046,47.127733821030176]),oe=P([-5.6105244772793155,47.579777861410626]),fe=P([-5.185993067168585,45.756644248170346]),Ve=P([-8.427513749141811,45.32889456686326]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([-9.405747558985553,48.26506375557457]),oe=P([-5.896175018439575,48.733352850851624]),fe=P([-5.610524487556043,47.57977790393761]),Ve=P([-9.012656913808351,47.127733862971255]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([-9.908436061346974,49.642448789505856]),oe=P([-6.262026716233124,50.131426841787174]),fe=P([-5.896175029331232,48.73335289377258]),Ve=P([-9.40574757396393,48.26506379787767]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([11.996907706504462,50.16039028163579]),oe=P([15.649907879773343,49.68279246765253]),fe=P([15.156712840526632,48.30371557625831]),Ve=P([11.64122661754411,48.761078240546816]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([11.641226606955788,48.7610781975889]),oe=P([15.156712825832164,48.30371553390465]),fe=P([14.549932166241172,46.4866532486199]),Ve=P([11.204443787952183,46.91899233914248]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([11.204443778297161,46.918992296823646]),oe=P([14.549932152815039,46.486653206856396]),fe=P([13.994409796764009,44.695833444323256]),Ve=P([10.805306599253848,45.105133870684924]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([10.805306590412085,45.10513382903308]),oe=P([13.99440978444733,44.695833403183606]),fe=P([13.654633799024392,43.53552468558152]),Ve=P([10.561516803980956,43.930671459798624]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([10.561516795617383,43.93067141859757]),oe=P([13.654633787361952,43.5355246448671]),fe=P([12.867691604239901,40.640701985019405]),Ve=P([9.997809515987688,41.00288343254471]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([10.8,42.4]),oe=P([12.8,42.13]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1])},An.getCompositionBorders=function(){var Ht=l.path();return this.drawCompositionBorders(Ht),Ht.toString()},An.scale(2700)}function lt(ft){var gt=ft.length;return{point:function(P,Kt){for(var H=-1;++H=-.31&&Ve<-.24&&fe>=.14&&fe<.24?H:Ve>=-.24&&Ve<-.17&&fe>=.14&&fe<.24?at:Ve>=-.17&&Ve<-.12&&fe>=.21&&fe<.24?S:Ve>=-.17&&Ve<-.14&&fe>=.14&&fe<.165?A:Ve>=-.17&&Ve<-.1&&fe>=.14&&fe<.24?Z:Ve>=-.1&&Ve<-.03&&fe>=.14&&fe<.24?J:Ve>=-.03&&Ve<.04&&fe>=.14&&fe<.24?It:Ve>=-.31&&Ve<-.24&&fe>=.24&&fe<.34?Lt:Ve>=-.24&&Ve<-.17&&fe>=.24&&fe<.34?Se:Ve>=-.17&&Ve<-.1&&fe>=.24&&fe<.34?fn:Ve>=-.1&&Ve<-.03&&fe>=.24&&fe<.34?mn:P).invert(Ht)},An.stream=function(Ht){return ft&>===Ht?ft:ft=lt([P.stream(gt=Ht),at.stream(Ht),Lt.stream(Ht),H.stream(Ht),It.stream(Ht),J.stream(Ht),Se.stream(Ht),fn.stream(Ht),mn.stream(Ht),Z.stream(Ht),S.stream(Ht),A.stream(Ht)])},An.precision=function(Ht){return arguments.length?(P.precision(Ht),at.precision(Ht),Lt.precision(Ht),H.precision(Ht),It.precision(Ht),J.precision(Ht),Se.precision(Ht),fn.precision(Ht),mn.precision(Ht),Z.precision(Ht),S.precision(Ht),A.precision(Ht),Dn()):P.precision()},An.scale=function(Ht){return arguments.length?(P.scale(Ht),H.scale(Ht*3),at.scale(Ht*.8),Lt.scale(Ht*3.5),fn.scale(Ht*2.7),Z.scale(Ht*2),S.scale(Ht*2),A.scale(Ht*2),J.scale(Ht*3),It.scale(Ht),Se.scale(Ht*5.5),mn.scale(Ht*6),An.translate(P.translate())):P.scale()},An.translate=function(Ht){if(!arguments.length)return P.translate();var kt=P.scale(),oe=+Ht[0],fe=+Ht[1];return Kt=P.translate([oe-.08*kt,fe]).clipExtent([[oe-.51*kt,fe-.33*kt],[oe+.5*kt,fe+.33*kt]]).stream(bn),ot=H.translate([oe+.19*kt,fe-.275*kt]).clipExtent([[oe+.14*kt+u,fe-.31*kt+u],[oe+.24*kt-u,fe-.24*kt-u]]).stream(bn),dt=at.translate([oe+.19*kt,fe-.205*kt]).clipExtent([[oe+.14*kt+u,fe-.24*kt+u],[oe+.24*kt-u,fe-.17*kt-u]]).stream(bn),mt=Z.translate([oe+.19*kt,fe-.135*kt]).clipExtent([[oe+.14*kt+u,fe-.17*kt+u],[oe+.24*kt-u,fe-.1*kt-u]]).stream(bn),B=S.translate([oe+.225*kt,fe-.147*kt]).clipExtent([[oe+.21*kt+u,fe-.17*kt+u],[oe+.24*kt-u,fe-.12*kt-u]]).stream(bn),z=A.translate([oe+.153*kt,fe-.15*kt]).clipExtent([[oe+.14*kt+u,fe-.17*kt+u],[oe+.165*kt-u,fe-.14*kt-u]]).stream(bn),pt=J.translate([oe+.19*kt,fe-.065*kt]).clipExtent([[oe+.14*kt+u,fe-.1*kt+u],[oe+.24*kt-u,fe-.03*kt-u]]).stream(bn),Zt=It.translate([oe+.19*kt,fe+.005*kt]).clipExtent([[oe+.14*kt+u,fe-.03*kt+u],[oe+.24*kt-u,fe+.04*kt-u]]).stream(bn),Yt=Lt.translate([oe+.29*kt,fe-.275*kt]).clipExtent([[oe+.24*kt+u,fe-.31*kt+u],[oe+.34*kt-u,fe-.24*kt-u]]).stream(bn),Ke=Se.translate([oe+.29*kt,fe-.205*kt]).clipExtent([[oe+.24*kt+u,fe-.24*kt+u],[oe+.34*kt-u,fe-.17*kt-u]]).stream(bn),on=fn.translate([oe+.29*kt,fe-.135*kt]).clipExtent([[oe+.24*kt+u,fe-.17*kt+u],[oe+.34*kt-u,fe-.1*kt-u]]).stream(bn),Sn=mn.translate([oe+.29*kt,fe-.065*kt]).clipExtent([[oe+.24*kt+u,fe-.1*kt+u],[oe+.34*kt-u,fe-.03*kt-u]]).stream(bn),Dn()},An.fitExtent=function(Ht,kt){return m(An,Ht,kt)},An.fitSize=function(Ht,kt){return y(An,Ht,kt)};function Dn(){return ft=gt=null,An}return An.drawCompositionBorders=function(Ht){var kt,oe,fe,Ve;kt=P([42.45755610828648,63.343658547914934]),oe=P([52.65837266667029,59.35045080290929]),fe=P([47.19754502247785,56.12653496548117]),Ve=P([37.673034273363044,59.61638268506111]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([59.41110754003403,62.35069727399336]),oe=P([66.75050228640794,57.11797303636038]),fe=P([60.236065725110436,54.63331433818992]),Ve=P([52.65837313153311,59.350450804599355]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([48.81091130080243,66.93353402634641]),oe=P([59.41110730654679,62.35069740653086]),fe=P([52.6583728974441,59.3504509222445]),Ve=P([42.45755631675751,63.34365868805821]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([31.054198418446475,52.1080673766184]),oe=P([39.09869284884117,49.400700047190554]),fe=P([36.0580811499175,46.02944174908498]),Ve=P([28.690508588835726,48.433126979386415]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([33.977877745912025,55.849945501331]),oe=P([42.75328432167726,52.78455122462353]),fe=P([39.09869297540224,49.400700176148625]),Ve=P([31.05419851807008,52.10806751810923]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([52.658372900759296,59.35045068526415]),oe=P([60.23606549583304,54.63331423800264]),fe=P([54.6756370953122,51.892298789399455]),Ve=P([47.19754524788189,56.126534861222794]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([47.19754506082455,56.126534735591456]),oe=P([54.675636900123514,51.892298681337095]),fe=P([49.94448648951486,48.98775484983285]),Ve=P([42.75328468716108,52.78455126060818]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([42.75328453416769,52.78455113209101]),oe=P([49.94448632339758,48.98775473706457]),fe=P([45.912339990394315,45.99361784987003]),Ve=P([39.09869317356607,49.40070009378711]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([37.673034114296634,59.61638254183119]),oe=P([47.197544835420544,56.126534839849846]),fe=P([42.75328447467064,52.78455135314068]),Ve=P([33.977877870363905,55.849945644671145]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([44.56748486446032,57.26489367845818]),fe=P([43.9335791193588,53.746540942601726]),Ve=P([43,56]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath(),kt=P([37.673034114296634,59.61638254183119]),oe=P([40.25902691953466,58.83002044222639]),fe=P([38.458270492742024,57.26232178028002]),Ve=P([35.97754948030156,58.00266637992386]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ve[0],Ve[1]),Ht.closePath()},An.getCompositionBorders=function(){var Ht=l.path();return this.drawCompositionBorders(Ht),Ht.toString()},An.scale(750)}function xt(ft){var gt=ft.length;return{point:function(P,Kt){for(var H=-1;++H=-.0067&&It<.0015&&pt>=-.0232&&pt<-.0154?H:It>=-.022&&It<-.014&&pt>=-.023&&pt<-.014?at:P).invert(A)},S.stream=function(A){return ft&>===A?ft:ft=xt([P.stream(gt=A),H.stream(A),at.stream(A)])},S.precision=function(A){return arguments.length?(P.precision(A),H.precision(A),at.precision(A),B()):P.precision()},S.scale=function(A){return arguments.length?(P.scale(A),H.scale(A),at.scale(A),S.translate(P.translate())):P.scale()},S.translate=function(A){if(!arguments.length)return P.translate();var z=P.scale(),J=+A[0],pt=+A[1];return Kt=P.translate(A).clipExtent([[J-.0245*z,pt-.026*z],[J+.023*z,pt+.026*z]]).stream(mt),ot=H.translate([J-.0186*z,pt-.00325*z]).clipExtent([[J-.0232*z+u,pt-.0067*z+u],[J-.0154*z-u,pt+.0015*z-u]]).stream(mt),dt=at.translate([J-.0185*z,pt-.017*z]).clipExtent([[J-.023*z+u,pt-.022*z+u],[J-.014*z-u,pt-.014*z-u]]).stream(mt),B()},S.fitExtent=function(A,z){return m(S,A,z)},S.fitSize=function(A,z){return y(S,A,z)};function B(){return ft=gt=null,S}return S.drawCompositionBorders=function(A){var z=P([3.30573,52.5562]),J=P([4.043,52.572]),pt=P([4.0646,52.1017]),It=P([3.3382,52.0861]),Zt=P([3.262,53.439]),Lt=P([4.1373,53.4571]),Yt=P([4.1574,52.9946]),Se=P([3.2951,52.9768]);A.moveTo(z[0],z[1]),A.lineTo(J[0],J[1]),A.lineTo(pt[0],pt[1]),A.lineTo(pt[0],pt[1]),A.lineTo(It[0],It[1]),A.closePath(),A.moveTo(Zt[0],Zt[1]),A.lineTo(Lt[0],Lt[1]),A.lineTo(Yt[0],Yt[1]),A.lineTo(Yt[0],Yt[1]),A.lineTo(Se[0],Se[1]),A.closePath()},S.getCompositionBorders=function(){var A=l.path();return this.drawCompositionBorders(A),A.toString()},S.scale(4200)}function Bt(ft){var gt=ft.length;return{point:function(P,Kt){for(var H=-1;++H=-.0521&&J<.0229&&z>=-.0111&&z<.1?H:P).invert(S)},Z.stream=function(S){return ft&>===S?ft:ft=Bt([P.stream(gt=S),H.stream(S)])},Z.precision=function(S){return arguments.length?(P.precision(S),H.precision(S),mt()):P.precision()},Z.scale=function(S){return arguments.length?(P.scale(S),H.scale(S*.615),Z.translate(P.translate())):P.scale()},Z.translate=function(S){if(!arguments.length)return P.translate();var B=P.scale(),A=+S[0],z=+S[1];return Kt=P.translate(S).clipExtent([[A-.11*B,z-.0521*B],[A-.0111*B,z+.0521*B]]).stream(dt),ot=H.translate([A+.09*B,z-0*B]).clipExtent([[A-.0111*B+u,z-.0521*B+u],[A+.1*B-u,z+.024*B-u]]).stream(dt),mt()},Z.fitExtent=function(S,B){return m(Z,S,B)},Z.fitSize=function(S,B){return y(Z,S,B)};function mt(){return ft=gt=null,Z}return Z.drawCompositionBorders=function(S){var B=P([106.3214,2.0228]),A=P([105.1843,2.3761]),z=P([104.2151,3.3618]),J=P([104.215,4.5651]);S.moveTo(B[0],B[1]),S.lineTo(A[0],A[1]),S.lineTo(z[0],z[1]),S.lineTo(J[0],J[1])},Z.getCompositionBorders=function(){var S=l.path();return this.drawCompositionBorders(S),S.toString()},Z.scale(4800)}function Ie(ft){var gt=ft.length;return{point:function(P,Kt){for(var H=-1;++H=-.02&&It<0&&pt>=-.038&&pt<-.005?H:It>=0&&It<.02&&pt>=-.038&&pt<-.005?at:P).invert(A)},S.stream=function(A){return ft&>===A?ft:ft=Ie([P.stream(gt=A),H.stream(A),at.stream(A)])},S.precision=function(A){return arguments.length?(P.precision(A),H.precision(A),at.precision(A),B()):P.precision()},S.scale=function(A){return arguments.length?(P.scale(A),H.scale(A*1.5),at.scale(A*4),S.translate(P.translate())):P.scale()},S.translate=function(A){if(!arguments.length)return P.translate();var z=P.scale(),J=+A[0],pt=+A[1];return Kt=P.translate(A).clipExtent([[J-.005*z,pt-.02*z],[J+.038*z,pt+.02*z]]).stream(mt),ot=H.translate([J-.025*z,pt-.01*z]).clipExtent([[J-.038*z+u,pt-.02*z+u],[J-.005*z-u,pt+0*z-u]]).stream(mt),dt=at.translate([J-.025*z,pt+.01*z]).clipExtent([[J-.038*z+u,pt-0*z+u],[J-.005*z-u,pt+.02*z-u]]).stream(mt),B()},S.fitExtent=function(A,z){return m(S,A,z)},S.fitSize=function(A,z){return y(S,A,z)};function B(){return ft=gt=null,S}return S.drawCompositionBorders=function(A){var z,J,pt,It;z=P([9.21327272751682,2.645820439454123]),J=P([11.679126293239872,2.644755519268689]),pt=P([11.676845389029227,.35307824637606433]),It=P([9.213572917774014,.35414205204417754]),A.moveTo(z[0],z[1]),A.lineTo(J[0],J[1]),A.lineTo(pt[0],pt[1]),A.lineTo(It[0],It[1]),A.closePath(),z=P([7.320873711543669,2.64475551449975]),J=P([9.213272722738658,2.645820434679803]),pt=P([9.213422896480349,1.4999812505283054]),It=P([7.322014760520787,1.4989168878985566]),A.moveTo(z[0],z[1]),A.lineTo(J[0],J[1]),A.lineTo(pt[0],pt[1]),A.lineTo(It[0],It[1]),A.closePath(),z=P([7.3220147605302905,1.4989168783492766]),J=P([9.213422896481598,1.499981240979021]),pt=P([9.213572912999604,.354142056817247]),It=P([7.323154615739809,.353078251154504]),A.moveTo(z[0],z[1]),A.lineTo(J[0],J[1]),A.lineTo(pt[0],pt[1]),A.lineTo(It[0],It[1]),A.closePath()},S.getCompositionBorders=function(){var A=l.path();return this.drawCompositionBorders(A),A.toString()},S.scale(12e3)}function Ue(ft){var gt=ft.length;return{point:function(P,Kt){for(var H=-1;++H=-.089&&J<.06&&z>=.029&&z<.046?H:P).invert(S)},Z.stream=function(S){return ft&>===S?ft:ft=Ue([P.stream(gt=S),H.stream(S)])},Z.precision=function(S){return arguments.length?(P.precision(S),H.precision(S),mt()):P.precision()},Z.scale=function(S){return arguments.length?(P.scale(S),H.scale(S),Z.translate(P.translate())):P.scale()},Z.translate=function(S){if(!arguments.length)return P.translate();var B=P.scale(),A=+S[0],z=+S[1];return Kt=P.translate(S).clipExtent([[A-.065*B,z-.089*B],[A+.075*B,z+.089*B]]).stream(dt),ot=H.translate([A+.01*B,z+.025*B]).clipExtent([[A+.029*B+u,z-.089*B+u],[A+.046*B-u,z-.06*B-u]]).stream(dt),mt()},Z.fitExtent=function(S,B){return m(Z,S,B)},Z.fitSize=function(S,B){return y(Z,S,B)};function mt(){return ft=gt=null,Z}return Z.drawCompositionBorders=function(S){var B,A,z,J;B=P([-1.113205870242365,59.64920050773357]),A=P([.807899092399606,59.59085836472269]),z=P([.5778611961420386,57.93467822832577]),J=P([-1.25867782078448,57.99029450085142]),S.moveTo(B[0],B[1]),S.lineTo(A[0],A[1]),S.lineTo(z[0],z[1]),S.lineTo(J[0],J[1]),S.closePath()},Z.getCompositionBorders=function(){var S=l.path();return this.drawCompositionBorders(S),S.toString()},Z.scale(2800)}o.geoAlbersUk=Fe,o.geoAlbersUsa=x,o.geoAlbersUsaTerritories=_,o.geoConicConformalEurope=U,o.geoConicConformalFrance=ht,o.geoConicConformalNetherlands=Gt,o.geoConicConformalPortugal=k,o.geoConicConformalSpain=C,o.geoConicEquidistantJapan=it,o.geoMercatorEcuador=V,o.geoMercatorEquatorialGuinea=_e,o.geoMercatorMalaysia=Qt,o.geoTransverseMercatorChile=yt,Object.defineProperty(o,"__esModule",{value:!0})})},"./node_modules/_d3-dsv@1.2.0@d3-dsv/dist/d3-dsv.js":function(t,e,n){(function(r,o){o(e)})(this,function(r){var o={},s={},l=34,u=10,c=13;function f(U){return new Function("d","return {"+U.map(function(xt,Gt){return JSON.stringify(xt)+": d["+Gt+'] || ""'}).join(",")+"}")}function h(U,xt){var Gt=f(U);return function(Bt,Qt){return xt(Gt(Bt),Qt,U)}}function d(U){var xt=Object.create(null),Gt=[];return U.forEach(function(Bt){for(var Qt in Bt)Qt in xt||Gt.push(xt[Qt]=Qt)}),Gt}function v(U,xt){var Gt=U+"",Bt=Gt.length;return Bt9999?"+"+v(U,6):v(U,4)}function p(U){var xt=U.getUTCHours(),Gt=U.getUTCMinutes(),Bt=U.getUTCSeconds(),Qt=U.getUTCMilliseconds();return isNaN(U)?"Invalid Date":g(U.getUTCFullYear())+"-"+v(U.getUTCMonth()+1,2)+"-"+v(U.getUTCDate(),2)+(Qt?"T"+v(xt,2)+":"+v(Gt,2)+":"+v(Bt,2)+"."+v(Qt,3)+"Z":Bt?"T"+v(xt,2)+":"+v(Gt,2)+":"+v(Bt,2)+"Z":Gt||xt?"T"+v(xt,2)+":"+v(Gt,2)+"Z":"")}function m(U){var xt=new RegExp('["'+U+` \r]`),Gt=U.charCodeAt(0);function Bt(P,Kt){var H,ot,at=Qt(P,function(dt,Z){if(H)return H(dt,Z-1);ot=dt,H=Kt?h(dt,Kt):f(dt)});return at.columns=ot||[],at}function Qt(P,Kt){var H=[],ot=P.length,at=0,dt=0,Z,mt=ot<=0,S=!1;P.charCodeAt(ot-1)===u&&--ot,P.charCodeAt(ot-1)===c&&--ot;function B(){if(mt)return s;if(S)return S=!1,o;var z,J=at,pt;if(P.charCodeAt(J)===l){for(;at++=ot?mt=!0:(pt=P.charCodeAt(at++))===u?S=!0:pt===c&&(S=!0,P.charCodeAt(at)===u&&++at),P.slice(J+1,z-1).replace(/""/g,'"')}for(;at0?1:b<0?-1:0},x=Math.sin,M=Math.tan,_=1e-6,D=1e-12,C=Math.PI,F=C/2,k=C/4,j=Math.SQRT1_2,V=U(2),st=U(C),yt=C*2,Q=180/C,it=C/180;function Pt(b){return b?b/Math.sin(b):1}function ht(b){return b>1?F:b<-1?-F:Math.asin(b)}function lt(b){return b>1?0:b<-1?C:Math.acos(b)}function U(b){return b>0?Math.sqrt(b):0}function xt(b){return b=h(2*b),(b-1)/(b+1)}function Gt(b){return(h(b)-h(-b))/2}function Bt(b){return(h(b)+h(-b))/2}function Qt(b){return v(b+U(b*b+1))}function Ie(b){return v(b+U(b*b-1))}function _e(b){var T=M(b/2),L=2*v(f(b/2))/(T*T);function R(K,X){var rt=f(K),bt=f(X),_t=x(X),Dt=bt*rt,$t=-((1-Dt?v((1+Dt)/2)/(1-Dt):-.5)+L/(1+Dt));return[$t*bt*x(K),$t*_t]}return R.invert=function(K,X){var rt=U(K*K+X*X),bt=-b/2,_t=50,Dt;if(!rt)return[0,0];do{var $t=bt/2,re=f($t),pe=x($t),we=M($t),Ne=v(1/re);bt-=Dt=(2/we*Ne-L*we-rt)/(-Ne/(pe*pe)+1-L/(2*re*re))}while(l(Dt)>_&&--_t>0);var tn=x(bt);return[c(K*tn,rt*f(bt)),ht(X*tn/rt)]},R}var Ue=function(){var b=F,T=o.geoProjectionMutator(_e),L=T(b);return L.radius=function(R){return arguments.length?T(b=R*it):b*Q},L.scale(179.976).clipAngle(147)};function Fe(b,T){var L=f(T),R=Pt(lt(L*f(b/=2)));return[2*L*x(b)*R,x(T)*R]}Fe.invert=function(b,T){if(!(b*b+4*T*T>C*C+_)){var L=b,R=T,K=25;do{var X=x(L),rt=x(L/2),bt=f(L/2),_t=x(R),Dt=f(R),$t=x(2*R),re=_t*_t,pe=Dt*Dt,we=rt*rt,Ne=1-pe*bt*bt,tn=Ne?lt(Dt*bt)*U(cn=1/Ne):cn=0,cn,Cn=2*tn*Dt*rt-b,jn=tn*_t-T,Nn=cn*(pe*we+tn*Dt*bt*re),Yn=cn*(.5*X*$t-tn*2*_t*rt),Hn=cn*.25*($t*rt-tn*_t*pe*X),yr=cn*(re*bt+tn*we*Dt),oi=Yn*Hn-yr*Nn;if(!oi)break;var Pi=(jn*Yn-Cn*yr)/oi,si=(Cn*Hn-jn*Nn)/oi;L-=Pi,R-=si}while((l(Pi)>_||l(si)>_)&&--K>0);return[L,R]}};var ft=function(){return o.geoProjection(Fe).scale(152.63)};function gt(b){var T=x(b),L=f(b),R=b>=0?1:-1,K=M(R*b),X=(1+T-L)/2;function rt(bt,_t){var Dt=f(_t),$t=f(bt/=2);return[(1+Dt)*x(bt),(R*_t>-c($t,K)-.001?0:-R*10)+X+x(_t)*L-(1+Dt)*T*$t]}return rt.invert=function(bt,_t){var Dt=0,$t=0,re=50;do{var pe=f(Dt),we=x(Dt),Ne=f($t),tn=x($t),cn=1+Ne,Cn=cn*we-bt,jn=X+tn*L-cn*T*pe-_t,Nn=cn*pe/2,Yn=-we*tn,Hn=T*cn*we/2,yr=L*Ne+T*pe*tn,oi=Yn*Hn-yr*Nn,Pi=(jn*Yn-Cn*yr)/oi/2,si=(Cn*Hn-jn*Nn)/oi;Dt-=Pi,$t-=si}while((l(Pi)>_||l(si)>_)&&--re>0);return R*$t>-c(f(Dt),K)-.001?[Dt*2,$t]:null},rt}var P=function(){var b=20*it,T=b>=0?1:-1,L=M(T*b),R=o.geoProjectionMutator(gt),K=R(b),X=K.stream;return K.parallel=function(rt){return arguments.length?(L=M((T=(b=rt*it)>=0?1:-1)*b),R(b)):b*Q},K.stream=function(rt){var bt=K.rotate(),_t=X(rt),Dt=(K.rotate([0,0]),X(rt));return K.rotate(bt),_t.sphere=function(){Dt.polygonStart(),Dt.lineStart();for(var $t=T*-180;T*$t<180;$t+=T*90)Dt.point($t,T*90);for(;T*($t-=b)>=-180;)Dt.point($t,T*-c(f($t*it/2),L)*Q);Dt.lineEnd(),Dt.polygonEnd()},_t},K.scale(218.695).center([0,28.0974])};function Kt(b,T){var L=M(T/2),R=U(1-L*L),K=1+R*f(b/=2),X=x(b)*R/K,rt=L/K,bt=X*X,_t=rt*rt;return[4/3*X*(3+bt-3*_t),4/3*rt*(3+3*bt-_t)]}Kt.invert=function(b,T){if(b*=3/8,T*=3/8,!b&&l(T)>1)return null;var L=b*b,R=T*T,K=1+L+R,X=U((K-U(K*K-4*T*T))/2),rt=ht(X)/3,bt=X?Ie(l(T/X))/3:Qt(l(b))/3,_t=f(rt),Dt=Bt(bt),$t=Dt*Dt-_t*_t;return[w(b)*2*c(Gt(bt)*_t,.25-$t),w(T)*2*c(Dt*x(rt),.25+$t)]};var H=function(){return o.geoProjection(Kt).scale(66.1603)},ot=U(8),at=v(1+V);function dt(b,T){var L=l(T);return LD&&--R>0);return[b/(f(L)*(ot-1/x(L))),w(T)*L]};var Z=function(){return o.geoProjection(dt).scale(112.314)};function mt(b){var T=2*C/b;function L(R,K){var X=o.geoAzimuthalEquidistantRaw(R,K);if(l(R)>F){var rt=c(X[1],X[0]),bt=U(X[0]*X[0]+X[1]*X[1]),_t=T*y((rt-F)/T)+F,Dt=c(x(rt-=_t),2-f(rt));rt=_t+ht(C/bt*x(Dt))-Dt,X[0]=bt*f(rt),X[1]=bt*x(rt)}return X}return L.invert=function(R,K){var X=U(R*R+K*K);if(X>F){var rt=c(K,R),bt=T*y((rt-F)/T)+F,_t=rt>bt?-1:1,Dt=X*f(bt-rt),$t=1/M(_t*lt((Dt-C)/U(C*(C-2*Dt)+X*X)));rt=bt+2*u(($t+_t*U($t*$t-3))/3),R=X*f(rt),K=X*x(rt)}return o.geoAzimuthalEquidistantRaw.invert(R,K)},L}var S=function(){var b=5,T=o.geoProjectionMutator(mt),L=T(b),R=L.stream,K=.01,X=-f(K*it),rt=x(K*it);return L.lobes=function(bt){return arguments.length?T(b=+bt):b},L.stream=function(bt){var _t=L.rotate(),Dt=R(bt),$t=(L.rotate([0,0]),R(bt));return L.rotate(_t),Dt.sphere=function(){$t.polygonStart(),$t.lineStart();for(var re=0,pe=360/b,we=2*C/b,Ne=90-180/b,tn=F;re_&&--R>0);return T/2}function A(b,T,L){function R(K,X){return[b*K*f(X=B(L,X)),T*x(X)]}return R.invert=function(K,X){return X=ht(X/T),[K/(b*f(X)),ht((2*X+x(2*X))/L)]},R}var z=A(V/F,V,C),J=function(){return o.geoProjection(z).scale(169.529)},pt=2.00276,It=1.11072;function Zt(b,T){var L=B(C,T);return[pt*b/(1/f(T)+It/f(L)),(T+V*x(L))/pt]}Zt.invert=function(b,T){var L=pt*T,R=T<0?-k:k,K=25,X,rt;do rt=L-V*x(R),R-=X=(x(2*R)+2*R-C*x(rt))/(2*f(2*R)+2+C*f(rt)*V*f(R));while(l(X)>_&&--K>0);return rt=L-V*x(R),[b*(1/f(rt)+It/f(R))/pt,rt]};var Lt=function(){return o.geoProjection(Zt).scale(160.857)},Yt=function(b){var T=0,L=o.geoProjectionMutator(b),R=L(T);return R.parallel=function(K){return arguments.length?L(T=K*it):T*Q},R};function Se(b,T){return[b*f(T),T]}Se.invert=function(b,T){return[b/f(T),T]};var Ke=function(){return o.geoProjection(Se).scale(152.63)};function fn(b){if(!b)return Se;var T=1/M(b);function L(R,K){var X=T+b-K,rt=X&&R*f(K)/X;return[X*x(rt),T-X*f(rt)]}return L.invert=function(R,K){var X=U(R*R+(K=T-K)*K),rt=T+b-X;return[X/f(rt)*c(R,K),rt]},L}var on=function(){return Yt(fn).scale(123.082).center([0,26.1441]).parallel(45)};function mn(b){function T(L,R){var K=F-R,X=K&&L*b*x(K)/K;return[K*x(X)/b,F-K*f(X)]}return T.invert=function(L,R){var K=L*b,X=F-R,rt=U(K*K+X*X),bt=c(K,X);return[(rt?rt/x(rt):1)*bt/b,F-rt]},T}var Sn=function(){var b=.5,T=o.geoProjectionMutator(mn),L=T(b);return L.fraction=function(R){return arguments.length?T(b=+R):b},L.scale(158.837)},xn=A(1,4/C,C),bn=function(){return o.geoProjection(xn).scale(152.63)};function An(b,T,L,R,K,X){var rt=f(X),bt;if(l(b)>1||l(X)>1)bt=lt(L*K+T*R*rt);else{var _t=x(b/2),Dt=x(X/2);bt=2*ht(U(_t*_t+T*R*Dt*Dt))}return l(bt)>_?[bt,c(R*x(X),T*K-L*R*rt)]:[0,0]}function Dn(b,T,L){return lt((b*b+T*T-L*L)/(2*b*T))}function Ht(b){return b-2*C*d((b+C)/(2*C))}function kt(b,T,L){for(var R=[[b[0],b[1],x(b[1]),f(b[1])],[T[0],T[1],x(T[1]),f(T[1])],[L[0],L[1],x(L[1]),f(L[1])]],K=R[2],X,rt=0;rt<3;++rt,K=X)X=R[rt],K.v=An(X[1]-K[1],K[3],K[2],X[3],X[2],X[0]-K[0]),K.point=[0,0];var bt=Dn(R[0].v[0],R[2].v[0],R[1].v[0]),_t=Dn(R[0].v[0],R[1].v[0],R[2].v[0]),Dt=C-bt;R[2].point[1]=0,R[0].point[0]=-(R[1].point[0]=R[0].v[0]/2);var $t=[R[2].point[0]=R[0].point[0]+R[2].v[0]*f(bt),2*(R[0].point[1]=R[1].point[1]=R[2].v[0]*x(bt))];function re(pe,we){var Ne=x(we),tn=f(we),cn=new Array(3),Cn;for(Cn=0;Cn<3;++Cn){var jn=R[Cn];if(cn[Cn]=An(we-jn[1],jn[3],jn[2],tn,Ne,pe-jn[0]),!cn[Cn][0])return jn.point;cn[Cn][1]=Ht(cn[Cn][1]-jn.v[1])}var Nn=$t.slice();for(Cn=0;Cn<3;++Cn){var Yn=Cn==2?0:Cn+1,Hn=Dn(R[Cn].v[0],cn[Cn][0],cn[Yn][0]);cn[Cn][1]<0&&(Hn=-Hn),Cn?Cn==1?(Hn=_t-Hn,Nn[0]-=cn[Cn][0]*f(Hn),Nn[1]-=cn[Cn][0]*x(Hn)):(Hn=Dt-Hn,Nn[0]+=cn[Cn][0]*f(Hn),Nn[1]+=cn[Cn][0]*x(Hn)):(Nn[0]+=cn[Cn][0]*f(Hn),Nn[1]-=cn[Cn][0]*x(Hn))}return Nn[0]/=3,Nn[1]/=3,Nn}return re}function oe(b){return b[0]*=it,b[1]*=it,b}function fe(){return Ve([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ve(b,T,L){var R=o.geoCentroid({type:"MultiPoint",coordinates:[b,T,L]}),K=[-R[0],-R[1]],X=o.geoRotation(K),rt=o.geoProjection(kt(oe(X(b)),oe(X(T)),oe(X(L)))).rotate(K),bt=rt.center;return delete rt.rotate,rt.center=function(_t){return arguments.length?bt(X(_t)):X.invert(bt())},rt.clipAngle(90)}function Fn(b,T){var L=U(1-x(T));return[2/st*b*L,st*(1-L)]}Fn.invert=function(b,T){var L=(L=T/st-1)*L;return[L>0?b*U(C/L)/2:0,ht(1-L)]};var Pr=function(){return o.geoProjection(Fn).scale(95.6464).center([0,30])};function pr(b){var T=M(b);function L(R,K){return[R,(R?R/x(R):1)*(x(K)*f(R)-T*f(K))]}return L.invert=T?function(R,K){R&&(K*=x(R)/R);var X=f(R);return[R,2*c(U(X*X+T*T-K*K)-X,T-K)]}:function(R,K){return[R,ht(R?K*M(R)/R:K)]},L}var Br=function(){return Yt(pr).scale(249.828).clipAngle(90)},sr=U(3);function Ft(b,T){return[sr*b*(2*f(2*T/3)-1)/st,sr*st*x(T/3)]}Ft.invert=function(b,T){var L=3*ht(T/(sr*st));return[st*b/(sr*(2*f(2*L/3)-1)),L]};var zt=function(){return o.geoProjection(Ft).scale(156.19)};function ie(b){var T=f(b);function L(R,K){return[R*T,x(K)/T]}return L.invert=function(R,K){return[R/T,ht(K*T)]},L}var ue=function(){return Yt(ie).parallel(38.58).scale(195.044)};function be(b){var T=f(b);function L(R,K){return[R*T,(1+T)*M(K/2)]}return L.invert=function(R,K){return[R/T,u(K/(1+T))*2]},L}var Ae=function(){return Yt(be).scale(124.75)};function Ze(b,T){var L=U(8/(3*C));return[L*b*(1-l(T)/C),L*T]}Ze.invert=function(b,T){var L=U(8/(3*C)),R=T/L;return[b/(L*(1-l(R)/C)),R]};var un=function(){return o.geoProjection(Ze).scale(165.664)};function an(b,T){var L=U(4-3*x(l(T)));return[2/U(6*C)*b*L,w(T)*U(2*C/3)*(2-L)]}an.invert=function(b,T){var L=2-l(T)/U(2*C/3);return[b*U(6*C)/(2*L),w(T)*ht((4-L*L)/3)]};var Ce=function(){return o.geoProjection(an).scale(165.664)};function nn(b,T){var L=U(C*(4+C));return[2/L*b*(1+U(1-4*T*T/(C*C))),4/L*T]}nn.invert=function(b,T){var L=U(C*(4+C))/2;return[b*L/(1+U(1-T*T*(4+C)/(4*C))),T*L/2]};var vn=function(){return o.geoProjection(nn).scale(180.739)};function ye(b,T){var L=(2+F)*x(T);T/=2;for(var R=0,K=1/0;R<10&&l(K)>_;R++){var X=f(T);T-=K=(T+x(T)*(X+2)-L)/(2*X*(1+X))}return[2/U(C*(4+C))*b*(1+f(T)),2*U(C/(4+C))*x(T)]}ye.invert=function(b,T){var L=T*U((4+C)/C)/2,R=ht(L),K=f(R);return[b/(2/U(C*(4+C))*(1+K)),ht((R+L*(K+2))/(2+F))]};var dn=function(){return o.geoProjection(ye).scale(180.739)};function gn(b,T){return[b*(1+f(T))/U(2+C),2*T/U(2+C)]}gn.invert=function(b,T){var L=U(2+C),R=T*L/2;return[L*b/(1+f(R)),R]};var vt=function(){return o.geoProjection(gn).scale(173.044)};function Ct(b,T){for(var L=(1+F)*x(T),R=0,K=1/0;R<10&&l(K)>_;R++)T-=K=(T+x(T)-L)/(1+f(T));return L=U(2+C),[b*(1+f(T))/L,2*T/L]}Ct.invert=function(b,T){var L=1+F,R=U(L/2);return[b*2*R/(1+f(T*=R)),ht((T+x(T))/L)]};var At=function(){return o.geoProjection(Ct).scale(173.044)},Ut=3+2*V;function Vt(b,T){var L=x(b/=2),R=f(b),K=U(f(T)),X=f(T/=2),rt=x(T)/(X+V*R*K),bt=U(2/(1+rt*rt)),_t=U((V*X+(R+L)*K)/(V*X+(R-L)*K));return[Ut*(bt*(_t-1/_t)-2*v(_t)),Ut*(bt*rt*(_t+1/_t)-2*u(rt))]}Vt.invert=function(b,T){if(!(X=Kt.invert(b/1.2,T*1.065)))return null;var L=X[0],R=X[1],K=20,X;b/=Ut,T/=Ut;do{var rt=L/2,bt=R/2,_t=x(rt),Dt=f(rt),$t=x(bt),re=f(bt),pe=f(R),we=U(pe),Ne=$t/(re+V*Dt*we),tn=Ne*Ne,cn=U(2/(1+tn)),Cn=V*re+(Dt+_t)*we,jn=V*re+(Dt-_t)*we,Nn=Cn/jn,Yn=U(Nn),Hn=Yn-1/Yn,yr=Yn+1/Yn,oi=cn*Hn-2*v(Yn)-b,Pi=cn*Ne*yr-2*u(Ne)-T,si=$t&&j*we*_t*tn/$t,Eo=(V*Dt*re+we)/(2*(re+V*Dt*we)*(re+V*Dt*we)*we),Qo=-.5*Ne*cn*cn*cn,dl=Qo*si,vl=Qo*Eo,Pa=(Pa=2*re+V*we*(Dt-_t))*Pa*Yn,to=(V*Dt*re*we+pe)/Pa,Jo=-(V*_t*$t)/(we*Pa),Ms=Hn*dl-2*to/Yn+cn*(to+to/Nn),bs=Hn*vl-2*Jo/Yn+cn*(Jo+Jo/Nn),_s=Ne*yr*dl-2*si/(1+tn)+cn*yr*si+cn*Ne*(to-to/Nn),zs=Ne*yr*vl-2*Eo/(1+tn)+cn*yr*Eo+cn*Ne*(Jo-Jo/Nn),Ys=bs*_s-zs*Ms;if(!Ys)break;var gl=(Pi*bs-oi*zs)/Ys,gu=(oi*_s-Pi*Ms)/Ys;L-=gl,R=g(-F,p(F,R-gu))}while((l(gl)>_||l(gu)>_)&&--K>0);return l(l(R)-F)<_?[0,R]:K&&[L,R]};var se=function(){return o.geoProjection(Vt).scale(62.5271)},Wt=f(35*it);function ne(b,T){var L=M(T/2);return[b*Wt*U(1-L*L),(1+Wt)*L]}ne.invert=function(b,T){var L=T/(1+Wt);return[b&&b/(Wt*U(1-L*L)),2*u(L)]};var ae=function(){return o.geoProjection(ne).scale(137.152)};function ge(b,T){var L=T/2,R=f(L);return[2*b/st*f(T)*R*R,st*M(L)]}ge.invert=function(b,T){var L=u(T/st),R=f(L),K=2*L;return[b*st/2/(f(K)*R*R),K]};var Pe=function(){return o.geoProjection(ge).scale(135.264)};function ze(b){return[b[0]/2,ht(M(b[1]/2*it))*Q]}function Te(b){return[b[0]*2,2*u(x(b[1]*it))*Q]}var en=function(b){b==null&&(b=o.geoOrthographic);var T=b(),L=o.geoEquirectangular().scale(Q).precision(0).clipAngle(null).translate([0,0]);function R(X){return T(ze(X))}T.invert&&(R.invert=function(X){return Te(T.invert(X))}),R.stream=function(X){var rt=T.stream(X),bt=L.stream({point:function(_t,Dt){rt.point(_t/2,ht(M(-Dt/2*it))*Q)},lineStart:function(){rt.lineStart()},lineEnd:function(){rt.lineEnd()},polygonStart:function(){rt.polygonStart()},polygonEnd:function(){rt.polygonEnd()}});return bt.sphere=rt.sphere,bt};function K(X){R[X]=function(rt){return arguments.length?(T[X](rt),R):T[X]()}}return R.rotate=function(X){return arguments.length?(L.rotate(X),R):L.rotate()},R.center=function(X){return arguments.length?(T.center(ze(X)),R):Te(T.center())},K("clipAngle"),K("clipExtent"),K("scale"),K("translate"),K("precision"),R.scale(249.5)};function wn(b,T){var L=2*C/T,R=b*b;function K(X,rt){var bt=o.geoAzimuthalEquidistantRaw(X,rt),_t=bt[0],Dt=bt[1],$t=_t*_t+Dt*Dt;if($t>R){var re=U($t),pe=c(Dt,_t),we=L*y(pe/L),Ne=pe-we,tn=b*f(Ne),cn=(b*x(Ne)-Ne*x(tn))/(F-tn),Cn=Qn(Ne,cn),jn=(C-b)/fr(Cn,tn,C);_t=re;var Nn=50,Yn;do _t-=Yn=(b+fr(Cn,tn,_t)*jn-re)/(Cn(_t)*jn);while(l(Yn)>_&&--Nn>0);Dt=Ne*x(_t),_tR){var _t=U(bt),Dt=c(rt,X),$t=L*y(Dt/L),re=Dt-$t;X=_t*f(re),rt=_t*x(re);for(var pe=X-F,we=x(X),Ne=rt/we,tn=X_||l(Ne)>_)&&--tn>0);return[re,pe]},_t},Jr=xr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555),gi=function(){return o.geoProjection(Jr).scale(149.995)},pi=xr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742),ha=function(){return o.geoProjection(pi).scale(153.93)},Li=xr(5/6*C,-.62636,-.0344,0,1.3493,-.05524,0,.045),za=function(){return o.geoProjection(Li).scale(130.945)};function ni(b,T){var L=b*b,R=T*T;return[b*(1-.162388*R)*(.87-952426e-9*L*L),T*(1+R/12)]}ni.invert=function(b,T){var L=b,R=T,K=50,X;do{var rt=R*R;R-=X=(R*(1+rt/12)-T)/(1+rt/4)}while(l(X)>_&&--K>0);K=50,b/=1-.162388*rt;do{var bt=(bt=L*L)*bt;L-=X=(L*(.87-952426e-9*bt)-b)/(.87-.00476213*bt)}while(l(X)>_&&--K>0);return[L,R]};var da=function(){return o.geoProjection(ni).scale(131.747)},va=xr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762),Ya=function(){return o.geoProjection(va).scale(131.087)},Yi=function(b){var T=b(F,0)[0]-b(-F,0)[0];function L(R,K){var X=R>0?-.5:.5,rt=b(R+X*C,K);return rt[0]-=X*T,rt}return b.invert&&(L.invert=function(R,K){var X=R>0?-.5:.5,rt=b.invert(R+X*T,K),bt=rt[0]-X*C;return bt<-C?bt+=2*C:bt>C&&(bt-=2*C),rt[0]=bt,rt}),L};function mi(b,T){var L=w(b),R=w(T),K=f(T),X=f(b)*K,rt=x(b)*K,bt=x(R*T);b=l(c(rt,bt)),T=ht(X),l(b-F)>_&&(b%=F);var _t=so(b>C/4?F-b:b,T);return b>C/4&&(bt=_t[0],_t[0]=-_t[1],_t[1]=-bt),_t[0]*=L,_t[1]*=-R,_t}mi.invert=function(b,T){l(b)>1&&(b=w(b)*2-b),l(T)>1&&(T=w(T)*2-T);var L=w(b),R=w(T),K=-L*b,X=-R*T,rt=X/K<1,bt=$(rt?X:K,rt?K:X),_t=bt[0],Dt=bt[1],$t=f(Dt);return rt&&(_t=-F-_t),[L*(c(x(_t)*$t,-x(Dt))+C),R*ht(f(_t)*$t)]};function so(b,T){if(T===F)return[0,0];var L=x(T),R=L*L,K=R*R,X=1+K,rt=1+3*K,bt=1-K,_t=ht(1/U(X)),Dt=bt+R*X*_t,$t=(1-L)/Dt,re=U($t),pe=$t*X,we=U(pe),Ne=re*bt,tn,cn;if(b===0)return[0,-(Ne+R*we)];var Cn=f(T),jn=1/Cn,Nn=2*L*Cn,Yn=(-3*R+_t*rt)*Nn,Hn=(-Dt*Cn-(1-L)*Yn)/(Dt*Dt),yr=.5*Hn/re,oi=bt*yr-2*R*re*Nn,Pi=R*X*Hn+$t*rt*Nn,si=-jn*Nn,Eo=-jn*Pi,Qo=-2*jn*oi,dl=4*b/C,vl;if(b>.222*C||T.175*C){if(tn=(Ne+R*U(pe*(1+K)-Ne*Ne))/(1+K),b>C/4)return[tn,tn];var Pa=tn,to=.5*tn;tn=.5*(to+Pa),cn=50;do{var Jo=U(pe-tn*tn),Ms=tn*(Qo+si*Jo)+Eo*ht(tn/we)-dl;if(!Ms)break;Ms<0?to=tn:Pa=tn,tn=.5*(to+Pa)}while(l(Pa-to)>_&&--cn>0)}else{tn=_,cn=25;do{var bs=tn*tn,_s=U(pe-bs),zs=Qo+si*_s,Ys=tn*zs+Eo*ht(tn/we)-dl,gl=zs+(Eo-si*bs)/_s;tn-=vl=_s?Ys/gl:0}while(l(vl)>_&&--cn>0)}return[tn,-Ne-R*U(pe-tn*tn)]}function $(b,T){for(var L=0,R=1,K=.5,X=50;;){var rt=K*K,bt=U(K),_t=ht(1/U(1+rt)),Dt=1-rt+K*(1+rt)*_t,$t=(1-bt)/Dt,re=U($t),pe=$t*(1+rt),we=re*(1-rt),Ne=pe-b*b,tn=U(Ne),cn=T+we+K*tn;if(l(R-L)0?L=K:R=K,K=.5*(L+R)}if(!X)return null;var Cn=ht(bt),jn=f(Cn),Nn=1/jn,Yn=2*bt*jn,Hn=(-3*K+_t*(1+3*rt))*Yn,yr=(-Dt*jn-(1-bt)*Hn)/(Dt*Dt),oi=.5*yr/re,Pi=(1-rt)*oi-2*K*re*Yn,si=-2*Nn*Pi,Eo=-Nn*Yn,Qo=-Nn*(K*(1+rt)*yr+$t*(1+3*rt)*Yn);return[C/4*(b*(si+Eo*tn)+Qo*ht(b/U(pe))),Cn]}var Tt=function(){return o.geoProjection(Yi(mi)).scale(239.75)};function Xt(b,T,L){var R,K,X;return b?(R=de(b,L),T?(K=de(T,1-L),X=K[1]*K[1]+L*R[0]*R[0]*K[0]*K[0],[[R[0]*K[2]/X,R[1]*R[2]*K[0]*K[1]/X],[R[1]*K[1]/X,-R[0]*R[2]*K[0]*K[2]/X],[R[2]*K[1]*K[2]/X,-L*R[0]*R[1]*K[0]/X]]):[[R[0],0],[R[1],0],[R[2],0]]):(K=de(T,1-L),[[0,K[0]/K[1]],[1/K[1],0],[K[2]/K[1],0]])}function de(b,T){var L,R,K,X,rt;if(T<_)return X=x(b),R=f(b),L=T*(b-X*R)/4,[X-L*R,R+L*X,1-T*X*X/2,b-L];if(T>=1-_)return L=(1-T)/4,R=Bt(b),X=xt(b),K=1/R,rt=R*Gt(b),[X+L*(rt-b)/(R*R),K-L*X*K*(rt-b),K+L*X*K*(rt+b),2*u(h(b))-F+L*(rt-b)/R];var bt=[1,0,0,0,0,0,0,0,0],_t=[U(T),0,0,0,0,0,0,0,0],Dt=0;for(R=U(1-T),rt=1;l(_t[Dt]/bt[Dt])>_&&Dt<8;)L=bt[Dt++],_t[Dt]=(L-R)/2,bt[Dt]=(L+R)/2,R=U(L*R),rt*=2;K=rt*bt[Dt]*b;do X=_t[Dt]*x(R=K)/bt[Dt],K=(ht(X)+K)/2;while(--Dt);return[x(K),X=f(K),X/f(K-R),K]}function Oe(b,T,L){var R=l(b),K=l(T),X=Gt(K);if(R){var rt=1/x(R),bt=1/(M(R)*M(R)),_t=-(bt+L*(X*X*rt*rt)-1+L),Dt=(L-1)*bt,$t=(-_t+U(_t*_t-4*Dt))/2;return[Le(u(1/U($t)),L)*w(b),Le(u(U(($t/bt-1)/L)),1-L)*w(T)]}return[0,Le(u(X),1-L)*w(T)]}function Le(b,T){if(!T)return b;if(T===1)return v(M(b/2+k));for(var L=1,R=U(1-T),K=U(T),X=0;l(K)>_;X++){if(b%C){var rt=u(R*M(b)/L);rt<0&&(rt+=C),b+=rt+~~(b/C)*C}else b+=b;K=(L+R)/2,R=U(L*R),K=((L=K)-R)/2}return b/(m(2,X)*L)}function We(b,T){var L=(V-1)/(V+1),R=U(1-L*L),K=Le(F,R*R),X=-1,rt=v(M(C/4+l(T)/2)),bt=h(X*rt)/U(L),_t=xe(bt*f(X*b),bt*x(X*b)),Dt=Oe(_t[0],_t[1],R*R);return[-Dt[1],(T>=0?1:-1)*(.5*K-Dt[0])]}function xe(b,T){var L=b*b,R=T+1,K=1-L-T*T;return[.5*((b>=0?F:-F)-c(K,2*b)),-.25*v(K*K+4*L)+.5*v(R*R+L)]}function Je(b,T){var L=T[0]*T[0]+T[1]*T[1];return[(b[0]*T[0]+b[1]*T[1])/L,(b[1]*T[0]-b[0]*T[1])/L]}We.invert=function(b,T){var L=(V-1)/(V+1),R=U(1-L*L),K=Le(F,R*R),X=-1,rt=Xt(.5*K-T,-b,R*R),bt=Je(rt[0],rt[1]),_t=c(bt[1],bt[0])/X;return[_t,2*u(h(.5/X*v(L*bt[0]*bt[0]+L*bt[1]*bt[1])))-F]};var Mn=function(){return o.geoProjection(Yi(We)).scale(151.496)};function pn(b,T){if(arguments.length<2&&(T=b),T===1)return o.geoAzimuthalEqualAreaRaw;if(T===1/0)return Tn;function L(R,K){var X=o.geoAzimuthalEqualAreaRaw(R/T,K);return X[0]*=b,X}return L.invert=function(R,K){var X=o.geoAzimuthalEqualAreaRaw.invert(R/b,K);return X[0]*=T,X},L}function Tn(b,T){return[b*f(T)/f(T/=2),2*x(T)]}Tn.invert=function(b,T){var L=2*ht(T/2);return[b*f(L/2)/f(L),L]};var On=function(){var b=2,T=o.geoProjectionMutator(pn),L=T(b);return L.coefficient=function(R){return arguments.length?T(b=+R):b},L.scale(169.529)};function Kn(b){var T=x(b),L=f(b),R=Gn(b);R.invert=Gn(-b);function K(X,rt){var bt=R(X,rt);X=bt[0],rt=bt[1];var _t=x(rt),Dt=f(rt),$t=f(X),re=lt(T*_t+L*Dt*$t),pe=x(re),we=l(pe)>_?re/pe:1;return[we*L*x(X),(l(X)>F?we:-we)*(T*Dt-L*_t*$t)]}return K.invert=function(X,rt){var bt=U(X*X+rt*rt),_t=-x(bt),Dt=f(bt),$t=bt*Dt,re=-rt*_t,pe=bt*T,we=U($t*$t+re*re-pe*pe),Ne=c($t*pe+re*we,re*pe-$t*we),tn=(bt>F?-1:1)*c(X*_t,bt*f(Ne)*Dt+rt*x(Ne)*_t);return R.invert(tn,Ne)},K}function Gn(b){var T=x(b),L=f(b);return function(R,K){var X=f(K),rt=f(R)*X,bt=x(R)*X,_t=x(K);return[c(bt,rt*L-_t*T),ht(_t*L+rt*T)]}}var Jn=function(){var b=0,T=o.geoProjectionMutator(Kn),L=T(b),R=L.rotate,K=L.stream,X=o.geoCircle();return L.parallel=function(rt){if(!arguments.length)return b*Q;var bt=L.rotate();return T(b=rt*it).rotate(bt)},L.rotate=function(rt){return arguments.length?(R.call(L,[rt[0],rt[1]-b*Q]),X.center([-rt[0],-rt[1]]),L):(rt=R.call(L),rt[1]+=b*Q,rt)},L.stream=function(rt){return rt=K(rt),rt.sphere=function(){rt.polygonStart();var bt=.01,_t=X.radius(90-bt)().coordinates[0],Dt=_t.length-1,$t=-1,re;for(rt.lineStart();++$t=0;)rt.point((re=_t[$t])[0],re[1]);rt.lineEnd(),rt.polygonEnd()},rt},L.scale(79.4187).parallel(45).clipAngle(180-.001)},Vn=41+48/36+37/3600,hr=ie(0);function ar(b){var T=Vn*it,L=Fn(C,T)[0]-Fn(-C,T)[0],R=hr(0,T)[1],K=Fn(0,T)[1],X=st-K,rt=yt/b,bt=4/yt,_t=R+X*X*4/yt;function Dt($t,re){var pe,we=l(re);if(we>T){var Ne=p(b-1,g(0,d(($t+C)/rt)));$t+=C*(b-1)/b-Ne*rt,pe=Fn($t,we),pe[0]=pe[0]*yt/L-yt*(b-1)/(2*b)+Ne*yt/b,pe[1]=R+(pe[1]-K)*4*X/yt,re<0&&(pe[1]=-pe[1])}else pe=hr($t,re);return pe[0]*=bt,pe[1]/=_t,pe}return Dt.invert=function($t,re){$t/=bt,re*=_t;var pe=l(re);if(pe>R){var we=p(b-1,g(0,d(($t+C)/rt)));$t=($t+C*(b-1)/b-we*rt)*L/yt;var Ne=Fn.invert($t,.25*(pe-R)*yt/X+K);return Ne[0]-=C*(b-1)/b-we*rt,re<0&&(Ne[1]=-Ne[1]),Ne}return hr.invert($t,re)},Dt}function mr(b){return{type:"Polygon",coordinates:[s.range(-180,180+b/2,b).map(function(T,L){return[T,L&1?90-1e-6:Vn]}).concat(s.range(180,-180-b/2,-b).map(function(T,L){return[T,L&1?-90+1e-6:-Vn]}))]}}var dr=function(){var b=4,T=o.geoProjectionMutator(ar),L=T(b),R=L.stream;return L.lobes=function(K){return arguments.length?T(b=+K):b},L.stream=function(K){var X=L.rotate(),rt=R(K),bt=(L.rotate([0,0]),R(K));return L.rotate(X),rt.sphere=function(){o.geoStream(mr(180/b),bt)},rt},L.scale(239.75)};function Rr(b){var T=1+b,L=x(1/T),R=ht(L),K=2*U(C/(X=C+4*R*T)),X,rt=.5*K*(T+U(b*(2+b))),bt=b*b,_t=T*T;function Dt($t,re){var pe=1-x(re),we,Ne;if(pe&&pe<2){var tn=F-re,cn=25,Cn;do{var jn=x(tn),Nn=f(tn),Yn=R+c(jn,T-Nn),Hn=1+_t-2*T*Nn;tn-=Cn=(tn-bt*R-T*jn+Hn*Yn-.5*pe*X)/(2*T*jn*Yn)}while(l(Cn)>D&&--cn>0);we=K*U(Hn),Ne=$t*Yn/C}else we=K*(b+pe),Ne=$t*R/C;return[we*x(Ne),rt-we*f(Ne)]}return Dt.invert=function($t,re){var pe=$t*$t+(re-=rt)*re,we=(1+_t-pe/(K*K))/(2*T),Ne=lt(we),tn=x(Ne),cn=R+c(tn,T-we);return[ht($t/U(pe))*C/cn,ht(1-2*(Ne-bt*R-T*tn+(1+_t-2*T*we)*cn)/X)]},Dt}var Tr=function(){var b=1,T=o.geoProjectionMutator(Rr),L=T(b);return L.ratio=function(R){return arguments.length?T(b=+R):b},L.scale(167.774).center([0,18.67])},Hr=.7109889596207567,Ar=.0528035274542;function br(b,T){return T>-Hr?(b=z(b,T),b[1]+=Ar,b):Se(b,T)}br.invert=function(b,T){return T>-Hr?z.invert(b,T-Ar):Se.invert(b,T)};var $r=function(){return o.geoProjection(br).rotate([-20,-55]).scale(164.263).center([0,-5.4036])};function _r(b,T){return l(T)>Hr?(b=z(b,T),b[1]-=T>0?Ar:-Ar,b):Se(b,T)}_r.invert=function(b,T){return l(T)>Hr?z.invert(b,T+(T>0?Ar:-Ar)):Se.invert(b,T)};var zn=function(){return o.geoProjection(_r).scale(152.63)};function tr(b,T){return l(b[0]-T[0])<_&&l(b[1]-T[1])<_}function Fr(b,T){for(var L=-1,R=b.length,K=b[0],X,rt,bt,_t=[];++L=0;--_t)L=b[1][_t],R=L[0][0],K=L[0][1],X=L[1][1],rt=L[2][0],bt=L[2][1],T.push(Fr([[rt-_,bt-_],[rt-_,X+_],[R+_,X+_],[R+_,K-_]],30));return{type:"Polygon",coordinates:[s.merge(T)]}}var Nr=function(b,T){var L=yi(T);T=T.map(function(bt){return bt.map(function(_t){return[[_t[0][0]*it,_t[0][1]*it],[_t[1][0]*it,_t[1][1]*it],[_t[2][0]*it,_t[2][1]*it]]})});var R=T.map(function(bt){return bt.map(function(_t){var Dt=b(_t[0][0],_t[0][1])[0],$t=b(_t[2][0],_t[2][1])[0],re=b(_t[1][0],_t[0][1])[1],pe=b(_t[1][0],_t[1][1])[1],we;return re>pe&&(we=re,re=pe,pe=we),[[Dt,re],[$t,pe]]})});function K(bt,_t){for(var Dt=_t<0?-1:1,$t=T[+(_t<0)],re=0,pe=$t.length-1;re$t[re][2][0];++re);var we=b(bt-$t[re][1][0],_t);return we[0]+=b($t[re][1][0],Dt*_t>Dt*$t[re][0][1]?$t[re][0][1]:_t)[0],we}b.invert&&(K.invert=function(bt,_t){for(var Dt=R[+(_t<0)],$t=T[+(_t<0)],re=0,pe=Dt.length;re2)return null;L/=2,R/=2;var X=L*L,rt=R*R,bt=2*R/(1+X+rt);return bt=m((1+bt)/(1-bt),1/b),[c(2*L,1-X-rt)/b,ht((bt-1)/(bt+1))]},T}var uo=function(){var b=.5,T=o.geoProjectionMutator(Ha),L=T(b);return L.spacing=function(R){return arguments.length?T(b=+R):b},L.scale(124.75)},Wi=C/V;function Gi(b,T){return[b*(1+U(f(T)))/2,T/(f(T/2)*f(b/6))]}Gi.invert=function(b,T){var L=l(b),R=l(T),K=_,X=F;R_||l(cn)>_)&&--K>0);return K&&[L,R]};var Ei=function(){return o.geoProjection(ia).scale(139.98)};function Vi(b,T){return[x(b)/f(T),M(T)*f(b)]}Vi.invert=function(b,T){var L=b*b,R=T*T,K=R+1,X=b?j*U((K-U(L*L+2*L*(R-1)+K*K))/L+1):1/U(K);return[ht(b*X),w(T)*lt(X)]};var $i=function(){return o.geoProjection(Vi).scale(144.049).clipAngle(90-.001)};function aa(b){var T=f(b),L=M(k+b/2);function R(K,X){var rt=X-b,bt=l(rt)<_?K*T:l(bt=k+X/2)<_||l(l(bt)-F)<_?0:K*rt/v(M(bt)/L);return[bt,rt]}return R.invert=function(K,X){var rt,bt=X+b;return[l(X)<_?K/T:l(rt=k+bt/2)<_||l(l(rt)-F)<_?0:K*v(M(rt)/L)/X,bt]},R}var Wa=function(){return Yt(aa).parallel(40).scale(158.837)};function Ri(b,T){return[b,1.25*v(M(k+.4*T))]}Ri.invert=function(b,T){return[b,2.5*u(h(.8*T))-.625*C]};var Kr=function(){return o.geoProjection(Ri).scale(108.318)};function Zr(b){var T=b.length-1;function L(R,K){for(var X=f(K),rt=2/(1+X*f(R)),bt=rt*X*x(R),_t=rt*x(K),Dt=T,$t=b[Dt],re=$t[0],pe=$t[1],we;--Dt>=0;)$t=b[Dt],re=$t[0]+bt*(we=re)-_t*pe,pe=$t[1]+bt*pe+_t*we;return re=bt*(we=re)-_t*pe,pe=bt*pe+_t*we,[re,pe]}return L.invert=function(R,K){var X=20,rt=R,bt=K;do{for(var _t=T,Dt=b[_t],$t=Dt[0],re=Dt[1],pe=0,we=0,Ne;--_t>=0;)Dt=b[_t],pe=$t+rt*(Ne=pe)-bt*we,we=re+rt*we+bt*Ne,$t=Dt[0]+rt*(Ne=$t)-bt*re,re=Dt[1]+rt*re+bt*Ne;pe=$t+rt*(Ne=pe)-bt*we,we=re+rt*we+bt*Ne,$t=rt*(Ne=$t)-bt*re-R,re=rt*re+bt*Ne-K;var tn=pe*pe+we*we,cn,Cn;rt-=cn=($t*pe+re*we)/tn,bt-=Cn=(re*pe-$t*we)/tn}while(l(cn)+l(Cn)>_*_&&--X>0);if(X){var jn=U(rt*rt+bt*bt),Nn=2*u(jn*.5),Yn=x(Nn);return[c(rt*Yn,jn*f(Nn)),jn?ht(bt*Yn/jn):0]}},L}var Ir=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],ci=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ao=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Mi=[[.9245,0],[0,0],[.01943,0]],ri=[[.721316,0],[0,0],[-.00881625,-.00617325]];function ii(){return ai(Ir,[152,-64]).scale(1500).center([-160.908,62.4864]).clipAngle(25)}function pa(){return ai(ci,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Fi(){return ai(Ao,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Xi(){return ai(Mi,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function hi(){return ai(ri,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function ai(b,T){var L=o.geoProjection(Zr(b)).rotate(T).clipAngle(90),R=o.geoRotation(T),K=L.center;return delete L.rotate,L.center=function(X){return arguments.length?K(R(X)):R.invert(K())},L}var Ga=U(6),fo=U(7);function Vo(b,T){var L=ht(7*x(T)/(3*Ga));return[Ga*b*(2*f(2*L/3)-1)/fo,9*x(L/3)/fo]}Vo.invert=function(b,T){var L=3*ht(T*fo/9);return[b*fo/(Ga*(2*f(2*L/3)-1)),ht(x(L)*3*Ga/7)]};var $o=function(){return o.geoProjection(Vo).scale(164.859)};function ma(b,T){for(var L=(1+j)*x(T),R=T,K=0,X;K<25&&(R-=X=(x(R/2)+x(R)-L)/(.5*f(R/2)+f(R)),!(l(X)<_));K++);return[b*(1+2*f(R)/f(R/2))/(3*V),2*U(3)*x(R/2)/U(2+V)]}ma.invert=function(b,T){var L=T*U(2+V)/(2*U(3)),R=2*ht(L);return[3*V*b/(1+2*f(R)/f(R/2)),ht((L+x(R))/(1+j))]};var Va=function(){return o.geoProjection(ma).scale(188.209)};function oa(b,T){for(var L=U(6/(4+C)),R=(1+C/4)*x(T),K=T/2,X=0,rt;X<25&&(K-=rt=(K/2+x(K)-R)/(.5+f(K)),!(l(rt)<_));X++);return[L*(.5+f(K))*b/1.5,L*K]}oa.invert=function(b,T){var L=U(6/(4+C)),R=T/L;return l(l(R)-F)<_&&(R=R<0?-F:F),[1.5*b/(L*(.5+f(R))),ht((R/2+x(R))/(1+C/4))]};var vs=function(){return o.geoProjection(oa).scale(166.518)};function co(b,T){var L=T*T,R=L*L;return[b*(.8707-.131979*L+R*(-.013791+R*(.003971*L-.001529*R))),T*(1.007226+L*(.015085+R*(-.044475+.028874*L-.005916*R)))]}co.invert=function(b,T){var L=T,R=25,K;do{var X=L*L,rt=X*X;L-=K=(L*(1.007226+X*(.015085+rt*(-.044475+.028874*X-.005916*rt)))-T)/(1.007226+X*(.015085*3+rt*(-.044475*7+.028874*9*X-.005916*11*rt)))}while(l(K)>_&&--R>0);return[b/(.8707+(X=L*L)*(-.131979+X*(-.013791+X*X*X*(.003971-.001529*X)))),L]};var ya=function(){return o.geoProjection(co).scale(175.295)};function Ui(b,T){var L=T*T,R=L*L,K=L*R;return[b*(.84719-.13063*L+K*K*(-.04515+.05494*L-.02326*R+.00331*K)),T*(1.01183+R*R*(-.02625+.01926*L-.00396*R))]}Ui.invert=function(b,T){var L=T,R=25,K,X,rt,bt;do X=L*L,rt=X*X,L-=K=(L*(1.01183+rt*rt*(-.02625+.01926*X-.00396*rt))-T)/(1.01183+rt*rt*(9*-.02625+11*.01926*X+13*-.00396*rt));while(l(K)>D&&--R>0);return X=L*L,rt=X*X,bt=X*rt,[b/(.84719-.13063*X+bt*bt*(-.04515+.05494*X-.02326*rt+.00331*bt)),L]};var ho=function(){return o.geoProjection(Ui).scale(175.295)};function Oo(b,T){return[b*(1+f(T))/2,2*(T-M(T/2))]}Oo.invert=function(b,T){for(var L=T/2,R=0,K=1/0;R<10&&l(K)>_;++R){var X=f(T/2);T-=K=(T-M(T/2)-L)/(1-.5/(X*X))}return[2*b/(1+f(T)),T]};var vo=function(){return o.geoProjection(Oo).scale(152.63)},xa=1.0148,sa=.23185,gs=-.14499,Xo=.02406,go=xa,Uo=5*sa,ps=7*gs,$a=9*Xo,bi=1.790857183;function Ki(b,T){var L=T*T;return[b,T*(xa+L*L*(sa+L*(gs+Xo*L)))]}Ki.invert=function(b,T){T>bi?T=bi:T<-bi&&(T=-bi);var L=T,R;do{var K=L*L;L-=R=(L*(xa+K*K*(sa+K*(gs+Xo*K)))-T)/(go+K*K*(Uo+K*(ps+$a*K)))}while(l(R)>_);return[b,L]};var Xa=function(){return o.geoProjection(Ki).scale(139.319)};function wa(b,T){if(l(T)<_)return[b,0];var L=M(T),R=b*x(T);return[x(R)/L,T+(1-f(R))/L]}wa.invert=function(b,T){if(l(T)<_)return[b,0];var L=b*b+T*T,R=T*.5,K=10,X;do{var rt=M(R),bt=1/f(R),_t=L-2*T*R+R*R;R-=X=(rt*_t+2*(R-T))/(2+_t*bt*bt+2*(R-T)*rt)}while(l(X)>_&&--K>0);return rt=M(R),[(l(T)=0;)if(R=T[bt],L[0]===R[0]&&L[1]===R[1]){if(X)return[X,L];X=L}}}function ws(b){for(var T=b.length,L=[],R=b[T-1],K=0;K0?[-R[0],0]:[180-R[0],180])};var T=Ea.map(function(L){return{face:L,project:b(L)}});return[-1,0,0,1,0,1,4,5].forEach(function(L,R){var K=T[L];K&&(K.children||(K.children=[])).push(T[R])}),Ua(T[0],function(L,R){return T[L<-C/2?R<0?6:4:L<0?R<0?2:0:LR^we>R&&L<(pe-Dt)*(R-$t)/(we-$t)+Dt&&(K=!K)}return K},xo=function(b,T){var L=T.stream,R;if(!L)throw new Error("invalid projection");switch(b&&b.type){case"Feature":R=Qa;break;case"FeatureCollection":R=Fs;break;default:R=Ro;break}return R(b,L)};function Fs(b,T){return{type:"FeatureCollection",features:b.features.map(function(L){return Qa(L,T)})}}function Qa(b,T){return{type:"Feature",id:b.id,properties:b.properties,geometry:Ro(b.geometry,T)}}function wo(b,T){return{type:"GeometryCollection",geometries:b.geometries.map(function(L){return Ro(L,T)})}}function Ro(b,T){if(!b)return null;if(b.type==="GeometryCollection")return wo(b,T);var L;switch(b.type){case"Point":L=_a;break;case"MultiPoint":L=_a;break;case"LineString":L=Ja;break;case"MultiLineString":L=Ja;break;case"Polygon":L=la;break;case"MultiPolygon":L=la;break;case"Sphere":L=la;break;default:return null}return o.geoStream(b,T(L)),L.result()}var jr=[],kr=[],_a={point:function(b,T){jr.push([b,T])},result:function(){var b=jr.length?jr.length<2?{type:"Point",coordinates:jr[0]}:{type:"MultiPoint",coordinates:jr}:null;return jr=[],b}},Ja={lineStart:Bo,point:function(b,T){jr.push([b,T])},lineEnd:function(){jr.length&&(kr.push(jr),jr=[])},result:function(){var b=kr.length?kr.length<2?{type:"LineString",coordinates:kr[0]}:{type:"MultiLineString",coordinates:kr}:null;return kr=[],b}},la={polygonStart:Bo,lineStart:Bo,point:function(b,T){jr.push([b,T])},lineEnd:function(){var b=jr.length;if(b){do jr.push(jr[0].slice());while(++b<4);kr.push(jr),jr=[]}},polygonEnd:Bo,result:function(){if(!kr.length)return null;var b=[],T=[];return kr.forEach(function(L){Zo(L)?b.push([L]):T.push(L)}),T.forEach(function(L){var R=L[0];b.some(function(K){if(ba(K[0],R))return K.push(L),!0})||b.push([L])}),kr=[],b.length?b.length>1?{type:"MultiPolygon",coordinates:b}:{type:"Polygon",coordinates:b[0]}:null}},Qi=function(b){var T=b(F,0)[0]-b(-F,0)[0];function L(R,K){var X=l(R)0?R-C:R+C,K),bt=(rt[0]-rt[1])*j,_t=(rt[0]+rt[1])*j;if(X)return[bt,_t];var Dt=T*j,$t=bt>0^_t>0?-1:1;return[$t*bt-w(_t)*Dt,$t*_t-w(bt)*Dt]}return b.invert&&(L.invert=function(R,K){var X=(R+K)*j,rt=(K-R)*j,bt=l(X)<.5*T&&l(rt)<.5*T;if(!bt){var _t=T*j,Dt=X>0^rt>0?-1:1,$t=-Dt*R+(rt>0?1:-1)*_t,re=-Dt*K+(X>0?1:-1)*_t;X=(-$t-re)*j,rt=($t-re)*j}var pe=b.invert(X,rt);return bt||(pe[0]+=X>0?C:-C),pe}),o.geoProjection(L).rotate([-90,-90,45]).clipAngle(180-.001)},qa=function(){return Qi(mi).scale(176.423)},Sa=function(){return Qi(We).scale(111.48)},G=function(b,T){if(!(0<=(T=+T)&&T<=20))throw new Error("invalid digits");function L(_t){var Dt=_t.length,$t=2,re=new Array(Dt);for(re[0]=+_t[0].toFixed(T),re[1]=+_t[1].toFixed(T);$t_&&--bt>0);var pe=R*(Dt=M(rt)),we=M(l(K)0?F:-F)*(_t+K*($t-rt)/2+K*K*($t-2*_t+rt)/2)]}qt.invert=function(b,T){var L=T/F,R=L*90,K=p(18,l(R/5)),X=g(0,d(K));do{var rt=St[X][1],bt=St[X+1][1],_t=St[p(19,X+2)][1],Dt=_t-rt,$t=_t-2*bt+rt,re=2*(l(L)-bt)/Dt,pe=$t/Dt,we=re*(1-pe*re*(1-2*pe*re));if(we>=0||X===1){R=(T>=0?5:-5)*(we+K);var Ne=50,tn;do K=p(18,l(R)/5),X=d(K),we=K-X,rt=St[X][1],bt=St[X+1][1],_t=St[p(19,X+2)][1],R-=(tn=(T>=0?F:-F)*(bt+we*(_t-rt)/2+we*we*(_t-2*bt+rt)/2)-T)*Q;while(l(tn)>D&&--Ne>0);break}}while(--X>=0);var cn=St[X][0],Cn=St[X+1][0],jn=St[p(19,X+2)][0];return[b/(Cn+we*(jn-cn)/2+we*we*(jn-2*Cn+cn)/2),R*it]};var me=function(){return o.geoProjection(qt).scale(152.63)};function Me(b){function T(L,R){var K=f(R),X=(b-1)/(b-K*f(L));return[X*K*x(L),X*x(R)]}return T.invert=function(L,R){var K=L*L+R*R,X=U(K),rt=(b-U(1-K*(b+1)/(b-1)))/((b-1)/X+X/(b-1));return[c(L*rt,X*U(1-rt*rt)),X?ht(R*rt/X):0]},T}function Be(b,T){var L=Me(b);if(!T)return L;var R=f(T),K=x(T);function X(rt,bt){var _t=L(rt,bt),Dt=_t[1],$t=Dt*K/(b-1)+R;return[_t[0]*R/$t,Dt/$t]}return X.invert=function(rt,bt){var _t=(b-1)/(b-1-bt*K);return L.invert(_t*rt,_t*bt*R)},X}var Ye=function(){var b=2,T=0,L=o.geoProjectionMutator(Be),R=L(b,T);return R.distance=function(K){return arguments.length?L(b=+K,T):b},R.tilt=function(K){return arguments.length?L(b,T=K*it):T*Q},R.scale(432.147).clipAngle(lt(1/b)*Q-1e-6)},Qe=1e-4,Ee=1e4,He=-180,I=He+Qe,Y=180,et=Y-Qe,nt=-90,E=nt+Qe,O=90,W=O-Qe;function N(b){return b.length>0}function q(b){return Math.floor(b*Ee)/Ee}function wt(b){return b===nt||b===O?[0,b]:[He,q(b)]}function ut(b){var T=b[0],L=b[1],R=!1;return T<=I?(T=He,R=!0):T>=et&&(T=Y,R=!0),L<=E?(L=nt,R=!0):L>=W&&(L=O,R=!0),R?[T,L]:b}function Et(b){return b.map(ut)}function Mt(b,T,L){for(var R=0,K=b.length;R=et||$t<=E||$t>=W){X[rt]=ut(_t);for(var re=rt+1;reI&&weE&&Ne=bt)break;L.push({index:-1,polygon:T,ring:X=X.slice(re-1)}),X[0]=wt(X[0][1]),rt=-1,bt=X.length}}}}function Rt(b){var T,L=b.length,R={},K={},X,rt,bt,_t,Dt;for(T=0;T0?C-bt:bt)*Q],Dt=o.geoProjection(b(rt)).rotate(_t),$t=o.geoRotation(_t),re=Dt.center;return delete Dt.rotate,Dt.center=function(pe){return arguments.length?re($t(pe)):$t.invert(re())},Dt.clipAngle(90)};function ve(b){var T=f(b);function L(R,K){var X=o.geoGnomonicRaw(R,K);return X[0]*=T,X}return L.invert=function(R,K){return o.geoGnomonicRaw.invert(R/T,K)},L}function Re(){return $e([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function $e(b,T){return le(ve,b,T)}function De(b){if(!(b*=2))return o.geoAzimuthalEquidistantRaw;var T=-b/2,L=-T,R=b*b,K=M(L),X=.5/x(L);function rt(bt,_t){var Dt=lt(f(_t)*f(bt-T)),$t=lt(f(_t)*f(bt-L)),re=_t<0?-1:1;return Dt*=Dt,$t*=$t,[(Dt-$t)/(2*b),re*U(4*R*$t-(R-Dt+$t)*(R-Dt+$t))/(2*b)]}return rt.invert=function(bt,_t){var Dt=_t*_t,$t=f(U(Dt+(pe=bt+T)*pe)),re=f(U(Dt+(pe=bt+L)*pe)),pe,we;return[c(we=$t-re,pe=($t+re)*K),(_t<0?-1:1)*lt(U(pe*pe+we*we)*X)]},rt}function Xe(){return rn([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function rn(b,T){return le(De,b,T)}function En(b,T){if(l(T)<_)return[b,0];var L=l(T/F),R=ht(L);if(l(b)<_||l(l(T)-F)<_)return[0,w(T)*C*M(R/2)];var K=f(R),X=l(C/b-b/C)/2,rt=X*X,bt=K/(L+K-1),_t=bt*(2/L-1),Dt=_t*_t,$t=Dt+rt,re=bt-Dt,pe=rt+bt;return[w(b)*C*(X*re+U(rt*re*re-$t*(bt*bt-Dt)))/$t,w(T)*C*(_t*pe-X*U((rt+1)*$t-pe*pe))/$t]}En.invert=function(b,T){if(l(T)<_)return[b,0];if(l(b)<_)return[0,F*x(2*u(T/C))];var L=(b/=C)*b,R=(T/=C)*T,K=L+R,X=K*K,rt=-l(T)*(1+K),bt=rt-2*R+L,_t=-2*rt+1+2*R+X,Dt=R/_t+(2*bt*bt*bt/(_t*_t*_t)-9*rt*bt/(_t*_t))/27,$t=(rt-bt*bt/(3*_t))/_t,re=2*U(-$t/3),pe=lt(3*Dt/($t*re))/3;return[C*(K-1+U(1+2*(L-R)+X))/(2*b),w(T)*C*(-re*f(pe+C/3)-bt/(3*_t))]};var yn=function(){return o.geoProjection(En).scale(79.4183)};function kn(b,T){if(l(T)<_)return[b,0];var L=l(T/F),R=ht(L);if(l(b)<_||l(l(T)-F)<_)return[0,w(T)*C*M(R/2)];var K=f(R),X=l(C/b-b/C)/2,rt=X*X,bt=K*(U(1+rt)-X*K)/(1+rt*L*L);return[w(b)*C*bt,w(T)*C*U(1-bt*(2*X+bt))]}kn.invert=function(b,T){if(!b)return[0,F*x(2*u(T/C))];var L=l(b/C),R=(1-L*L-(T/=C)*T)/(2*L),K=R*R,X=U(K+1);return[w(b)*C*(X-R),w(T)*F*x(2*c(U((1-2*R*L)*(R+X)-L),U(X+R+L)))]};var In=function(){return o.geoProjection(kn).scale(79.4183)};function Ln(b,T){if(l(T)<_)return[b,0];var L=T/F,R=ht(L);if(l(b)<_||l(l(T)-F)<_)return[0,C*M(R/2)];var K=(C/b-b/C)/2,X=L/(1+f(R));return[C*(w(b)*U(K*K+1-X*X)-K),C*X]}Ln.invert=function(b,T){if(!T)return[b,0];var L=T/C,R=(C*C*(1-L*L)-b*b)/(2*C*b);return[b?C*(w(b)*U(R*R+1)-R):0,F*x(2*u(L))]};var Ge=function(){return o.geoProjection(Ln).scale(79.4183)};function Bn(b,T){if(!T)return[b,0];var L=l(T);if(!b||L===F)return[0,T];var R=L/F,K=R*R,X=(8*R-K*(K+2)-5)/(2*K*(R-1)),rt=X*X,bt=R*X,_t=K+rt+2*bt,Dt=R+3*X,$t=b/F,re=$t+1/$t,pe=w(l(b)-F)*U(re*re-4),we=pe*pe,Ne=_t*(K+rt*we-1)+(1-K)*(K*(Dt*Dt+4*rt)+12*bt*rt+4*rt*rt),tn=(pe*(_t+rt-1)+2*U(Ne))/(4*_t+we);return[w(b)*F*tn,w(T)*F*U(1+pe*l(tn)-tn*tn)]}Bn.invert=function(b,T){var L;if(!b||!T)return[b,T];T/=C;var R=w(b)*b/F,K=(R*R-1+4*T*T)/l(R),X=K*K,rt=2*T,bt=50;do{var _t=rt*rt,Dt=(8*rt-_t*(_t+2)-5)/(2*_t*(rt-1)),$t=(3*rt-_t*rt-10)/(2*_t*rt),re=Dt*Dt,pe=rt*Dt,we=rt+Dt,Ne=we*we,tn=rt+3*Dt,cn=Ne*(_t+re*X-1)+(1-_t)*(_t*(tn*tn+4*re)+re*(12*pe+4*re)),Cn=-2*we*(4*pe*re+(1-4*_t+3*_t*_t)*(1+$t)+re*(-6+14*_t-X+(-8+8*_t-2*X)*$t)+pe*(-8+12*_t+(-10+10*_t-X)*$t)),jn=U(cn),Nn=K*(Ne+re-1)+2*jn-R*(4*Ne+X),Yn=K*(2*Dt*$t+2*we*(1+$t))+Cn/jn-8*we*(K*(-1+re+Ne)+2*jn)*(1+$t)/(X+4*Ne);rt-=L=Nn/Yn}while(L>_&&--bt>0);return[w(b)*(U(K*K+4)+K)*C/4,F*rt]};var qn=function(){return o.geoProjection(Bn).scale(127.16)},Xn=4*C+3*U(3),sn=2*U(2*C*U(3)/Xn),Zn=A(sn*U(3)/C,sn,Xn/6),vr=function(){return o.geoProjection(Zn).scale(176.84)};function Sr(b,T){return[b*U(1-3*T*T/(C*C)),T]}Sr.invert=function(b,T){return[b/U(1-3*T*T/(C*C)),T]};var zr=function(){return o.geoProjection(Sr).scale(152.63)};function Ca(b,T){var L=.90631*x(T),R=U(1-L*L),K=U(2/(1+R*f(b/=3)));return[2.66723*R*K*x(b),1.24104*L*K]}Ca.invert=function(b,T){var L=b/2.66723,R=T/1.24104,K=U(L*L+R*R),X=2*ht(K/2);return[3*c(b*M(X),2.66723*K),K&&ht(T*x(X)/(1.24104*.90631*K))]};var Ci=function(){return o.geoProjection(Ca).scale(172.632)};function Fo(b,T){var L=f(T),R=f(b)*L,K=1-R,X=f(b=c(x(b)*L,-x(T))),rt=x(b);return L=U(1-R*R),[rt*L-X*K,-X*L-rt*K]}Fo.invert=function(b,T){var L=(b*b+T*T)/-2,R=U(-L*(2+L)),K=T*L+b*R,X=b*L-T*R,rt=U(X*X+K*K);return[c(R*K,rt*(1+L)),rt?-ht(R*X/rt):0]};var No=function(){return o.geoProjection(Fo).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)};function Ns(b,T){var L=Fe(b,T);return[(L[0]+b/F)/2,(L[1]+T)/2]}Ns.invert=function(b,T){var L=b,R=T,K=25;do{var X=f(R),rt=x(R),bt=x(2*R),_t=rt*rt,Dt=X*X,$t=x(L),re=f(L/2),pe=x(L/2),we=pe*pe,Ne=1-Dt*re*re,tn=Ne?lt(X*re)*U(cn=1/Ne):cn=0,cn,Cn=.5*(2*tn*X*pe+L/F)-b,jn=.5*(tn*rt+R)-T,Nn=.5*cn*(Dt*we+tn*X*re*_t)+.5/F,Yn=cn*($t*bt/4-tn*rt*pe),Hn=.125*cn*(bt*pe-tn*rt*Dt*$t),yr=.5*cn*(_t*re+tn*we*X)+.5,oi=Yn*Hn-yr*Nn,Pi=(jn*Yn-Cn*yr)/oi,si=(Cn*Hn-jn*Nn)/oi;L-=Pi,R-=si}while((l(Pi)>_||l(si)>_)&&--K>0);return[L,R]};var ks=function(){return o.geoProjection(Ns).scale(158.837)};r.geoAiry=Ue,r.geoAiryRaw=_e,r.geoAitoff=ft,r.geoAitoffRaw=Fe,r.geoArmadillo=P,r.geoArmadilloRaw=gt,r.geoAugust=H,r.geoAugustRaw=Kt,r.geoBaker=Z,r.geoBakerRaw=dt,r.geoBerghaus=S,r.geoBerghausRaw=mt,r.geoBoggs=Lt,r.geoBoggsRaw=Zt,r.geoBonne=on,r.geoBonneRaw=fn,r.geoBottomley=Sn,r.geoBottomleyRaw=mn,r.geoBromley=bn,r.geoBromleyRaw=xn,r.geoChamberlin=Ve,r.geoChamberlinRaw=kt,r.geoChamberlinAfrica=fe,r.geoCollignon=Pr,r.geoCollignonRaw=Fn,r.geoCraig=Br,r.geoCraigRaw=pr,r.geoCraster=zt,r.geoCrasterRaw=Ft,r.geoCylindricalEqualArea=ue,r.geoCylindricalEqualAreaRaw=ie,r.geoCylindricalStereographic=Ae,r.geoCylindricalStereographicRaw=be,r.geoEckert1=un,r.geoEckert1Raw=Ze,r.geoEckert2=Ce,r.geoEckert2Raw=an,r.geoEckert3=vn,r.geoEckert3Raw=nn,r.geoEckert4=dn,r.geoEckert4Raw=ye,r.geoEckert5=vt,r.geoEckert5Raw=gn,r.geoEckert6=At,r.geoEckert6Raw=Ct,r.geoEisenlohr=se,r.geoEisenlohrRaw=Vt,r.geoFahey=ae,r.geoFaheyRaw=ne,r.geoFoucaut=Pe,r.geoFoucautRaw=ge,r.geoGilbert=en,r.geoGingery=cr,r.geoGingeryRaw=wn,r.geoGinzburg4=gi,r.geoGinzburg4Raw=Jr,r.geoGinzburg5=ha,r.geoGinzburg5Raw=pi,r.geoGinzburg6=za,r.geoGinzburg6Raw=Li,r.geoGinzburg8=da,r.geoGinzburg8Raw=ni,r.geoGinzburg9=Ya,r.geoGinzburg9Raw=va,r.geoGringorten=Tt,r.geoGringortenRaw=mi,r.geoGuyou=Mn,r.geoGuyouRaw=We,r.geoHammer=On,r.geoHammerRaw=pn,r.geoHammerRetroazimuthal=Jn,r.geoHammerRetroazimuthalRaw=Kn,r.geoHealpix=dr,r.geoHealpixRaw=ar,r.geoHill=Tr,r.geoHillRaw=Rr,r.geoHomolosine=zn,r.geoHomolosineRaw=_r,r.geoInterrupt=Nr,r.geoInterruptedBoggs=ga,r.geoInterruptedHomolosine=Di,r.geoInterruptedMollweide=lo,r.geoInterruptedMollweideHemispheres=Ur,r.geoInterruptedSinuMollweide=Or,r.geoInterruptedSinusoidal=Bi,r.geoKavrayskiy7=qr,r.geoKavrayskiy7Raw=xi,r.geoLagrange=uo,r.geoLagrangeRaw=Ha,r.geoLarrivee=wi,r.geoLarriveeRaw=Gi,r.geoLaskowski=Ei,r.geoLaskowskiRaw=ia,r.geoLittrow=$i,r.geoLittrowRaw=Vi,r.geoLoximuthal=Wa,r.geoLoximuthalRaw=aa,r.geoMiller=Kr,r.geoMillerRaw=Ri,r.geoModifiedStereographic=ai,r.geoModifiedStereographicRaw=Zr,r.geoModifiedStereographicAlaska=ii,r.geoModifiedStereographicGs48=pa,r.geoModifiedStereographicGs50=Fi,r.geoModifiedStereographicMiller=Xi,r.geoModifiedStereographicLee=hi,r.geoMollweide=J,r.geoMollweideRaw=z,r.geoMtFlatPolarParabolic=$o,r.geoMtFlatPolarParabolicRaw=Vo,r.geoMtFlatPolarQuartic=Va,r.geoMtFlatPolarQuarticRaw=ma,r.geoMtFlatPolarSinusoidal=vs,r.geoMtFlatPolarSinusoidalRaw=oa,r.geoNaturalEarth=ya,r.geoNaturalEarthRaw=co,r.geoNaturalEarth2=ho,r.geoNaturalEarth2Raw=Ui,r.geoNellHammer=vo,r.geoNellHammerRaw=Oo,r.geoPatterson=Xa,r.geoPattersonRaw=Ki,r.geoPolyconic=ms,r.geoPolyconicRaw=wa,r.geoPolyhedral=Ua,r.geoPolyhedralButterfly=Lo,r.geoPolyhedralCollignon=Ma,r.geoPolyhedralWaterman=Es,r.geoProject=xo,r.geoGringortenQuincuncial=qa,r.geoPeirceQuincuncial=Sa,r.geoPierceQuincuncial=Sa,r.geoQuantize=G,r.geoQuincuncial=Qi,r.geoRectangularPolyconic=Ot,r.geoRectangularPolyconicRaw=tt,r.geoRobinson=me,r.geoRobinsonRaw=qt,r.geoSatellite=Ye,r.geoSatelliteRaw=Be,r.geoSinuMollweide=$r,r.geoSinuMollweideRaw=br,r.geoSinusoidal=Ke,r.geoSinusoidalRaw=Se,r.geoStitch=Jt,r.geoTimes=te,r.geoTimesRaw=ce,r.geoTwoPointAzimuthal=$e,r.geoTwoPointAzimuthalRaw=ve,r.geoTwoPointAzimuthalUsa=Re,r.geoTwoPointEquidistant=rn,r.geoTwoPointEquidistantRaw=De,r.geoTwoPointEquidistantUsa=Xe,r.geoVanDerGrinten=yn,r.geoVanDerGrintenRaw=En,r.geoVanDerGrinten2=In,r.geoVanDerGrinten2Raw=kn,r.geoVanDerGrinten3=Ge,r.geoVanDerGrinten3Raw=Ln,r.geoVanDerGrinten4=qn,r.geoVanDerGrinten4Raw=Bn,r.geoWagner4=vr,r.geoWagner4Raw=Zn,r.geoWagner6=zr,r.geoWagner6Raw=Sr,r.geoWagner7=Ci,r.geoWagner7Raw=Ca,r.geoWiechel=No,r.geoWiechelRaw=Fo,r.geoWinkel3=ks,r.geoWinkel3Raw=Ns,Object.defineProperty(r,"__esModule",{value:!0})})},"./node_modules/_d3-geo@1.12.1@d3-geo/dist/d3-geo.js":function(t,e,n){(function(r,o){o(e,n("./node_modules/_d3-array@1.2.4@d3-array/dist/d3-array.js"))})(this,function(r,o){function s(){return new l}function l(){this.reset()}l.prototype={constructor:l,reset:function(){this.s=this.t=0},add:function(E){c(u,E,this.t),c(this,u.s,this.s),this.s?this.t+=u.t:this.s=u.t},valueOf:function(){return this.s}};var u=new l;function c(E,O,W){var N=E.s=O+W,q=N-O,wt=N-q;E.t=O-wt+(W-q)}var f=1e-6,h=1e-12,d=Math.PI,v=d/2,g=d/4,p=d*2,m=180/d,y=d/180,w=Math.abs,x=Math.atan,M=Math.atan2,_=Math.cos,D=Math.ceil,C=Math.exp,F=Math.log,k=Math.pow,j=Math.sin,V=Math.sign||function(E){return E>0?1:E<0?-1:0},st=Math.sqrt,yt=Math.tan;function Q(E){return E>1?0:E<-1?d:Math.acos(E)}function it(E){return E>1?v:E<-1?-v:Math.asin(E)}function Pt(E){return(E=j(E/2))*E}function ht(){}function lt(E,O){E&&xt.hasOwnProperty(E.type)&&xt[E.type](E,O)}var U={Feature:function(E,O){lt(E.geometry,O)},FeatureCollection:function(E,O){for(var W=E.features,N=-1,q=W.length;++N=0?1:-1,q=N*W,wt=_(O),ut=j(O),Et=P*ut,Mt=gt*wt+Et*_(q),Rt=Et*N*j(q);Ie.add(M(Rt,Mt)),ft=E,gt=wt,P=ut}function Z(E){return _e.reset(),Qt(E,Kt),_e*2}function mt(E){return[M(E[1],E[0]),it(E[2])]}function S(E){var O=E[0],W=E[1],N=_(W);return[N*_(O),N*j(O),j(W)]}function B(E,O){return E[0]*O[0]+E[1]*O[1]+E[2]*O[2]}function A(E,O){return[E[1]*O[2]-E[2]*O[1],E[2]*O[0]-E[0]*O[2],E[0]*O[1]-E[1]*O[0]]}function z(E,O){E[0]+=O[0],E[1]+=O[1],E[2]+=O[2]}function J(E,O){return[E[0]*O,E[1]*O,E[2]*O]}function pt(E){var O=st(E[0]*E[0]+E[1]*E[1]+E[2]*E[2]);E[0]/=O,E[1]/=O,E[2]/=O}var It,Zt,Lt,Yt,Se,Ke,fn,on,mn=s(),Sn,xn,bn={point:An,lineStart:Ht,lineEnd:kt,polygonStart:function(){bn.point=oe,bn.lineStart=fe,bn.lineEnd=Ve,mn.reset(),Kt.polygonStart()},polygonEnd:function(){Kt.polygonEnd(),bn.point=An,bn.lineStart=Ht,bn.lineEnd=kt,Ie<0?(It=-(Lt=180),Zt=-(Yt=90)):mn>f?Yt=90:mn<-f&&(Zt=-90),xn[0]=It,xn[1]=Lt},sphere:function(){It=-(Lt=180),Zt=-(Yt=90)}};function An(E,O){Sn.push(xn=[It=E,Lt=E]),OYt&&(Yt=O)}function Dn(E,O){var W=S([E*y,O*y]);if(on){var N=A(on,W),q=[N[1],-N[0],0],wt=A(q,N);pt(wt),wt=mt(wt);var ut=E-Se,Et=ut>0?1:-1,Mt=wt[0]*m*Et,Rt,jt=w(ut)>180;jt^(Et*SeYt&&(Yt=Rt)):(Mt=(Mt+360)%360-180,jt^(Et*SeYt&&(Yt=O))),jt?EFn(It,Lt)&&(Lt=E):Fn(E,Lt)>Fn(It,Lt)&&(It=E):Lt>=It?(ELt&&(Lt=E)):E>Se?Fn(It,E)>Fn(It,Lt)&&(Lt=E):Fn(E,Lt)>Fn(It,Lt)&&(It=E)}else Sn.push(xn=[It=E,Lt=E]);OYt&&(Yt=O),on=W,Se=E}function Ht(){bn.point=Dn}function kt(){xn[0]=It,xn[1]=Lt,bn.point=An,on=null}function oe(E,O){if(on){var W=E-Se;mn.add(w(W)>180?W+(W>0?360:-360):W)}else Ke=E,fn=O;Kt.point(E,O),Dn(E,O)}function fe(){Kt.lineStart()}function Ve(){oe(Ke,fn),Kt.lineEnd(),w(mn)>f&&(It=-(Lt=180)),xn[0]=It,xn[1]=Lt,on=null}function Fn(E,O){return(O-=E)<0?O+360:O}function Pr(E,O){return E[0]-O[0]}function pr(E,O){return E[0]<=E[1]?E[0]<=O&&O<=E[1]:OFn(N[0],N[1])&&(N[1]=q[1]),Fn(q[0],N[1])>Fn(N[0],N[1])&&(N[0]=q[0])):wt.push(N=q);for(ut=-1/0,W=wt.length-1,O=0,N=wt[W];O<=W;N=q,++O)q=wt[O],(Et=Fn(N[1],q[0]))>ut&&(ut=Et,It=q[0],Lt=N[1])}return Sn=xn=null,It===1/0||Zt===1/0?[[NaN,NaN],[NaN,NaN]]:[[It,Zt],[Lt,Yt]]}var sr,Ft,zt,ie,ue,be,Ae,Ze,un,an,Ce,nn,vn,ye,dn,gn,vt={sphere:ht,point:Ct,lineStart:Ut,lineEnd:Wt,polygonStart:function(){vt.lineStart=ne,vt.lineEnd=ae},polygonEnd:function(){vt.lineStart=Ut,vt.lineEnd=Wt}};function Ct(E,O){E*=y,O*=y;var W=_(O);At(W*_(E),W*j(E),j(O))}function At(E,O,W){++sr,zt+=(E-zt)/sr,ie+=(O-ie)/sr,ue+=(W-ue)/sr}function Ut(){vt.point=Vt}function Vt(E,O){E*=y,O*=y;var W=_(O);ye=W*_(E),dn=W*j(E),gn=j(O),vt.point=se,At(ye,dn,gn)}function se(E,O){E*=y,O*=y;var W=_(O),N=W*_(E),q=W*j(E),wt=j(O),ut=M(st((ut=dn*wt-gn*q)*ut+(ut=gn*N-ye*wt)*ut+(ut=ye*q-dn*N)*ut),ye*N+dn*q+gn*wt);Ft+=ut,be+=ut*(ye+(ye=N)),Ae+=ut*(dn+(dn=q)),Ze+=ut*(gn+(gn=wt)),At(ye,dn,gn)}function Wt(){vt.point=Ct}function ne(){vt.point=ge}function ae(){Pe(nn,vn),vt.point=Ct}function ge(E,O){nn=E,vn=O,E*=y,O*=y,vt.point=Pe;var W=_(O);ye=W*_(E),dn=W*j(E),gn=j(O),At(ye,dn,gn)}function Pe(E,O){E*=y,O*=y;var W=_(O),N=W*_(E),q=W*j(E),wt=j(O),ut=dn*wt-gn*q,Et=gn*N-ye*wt,Mt=ye*q-dn*N,Rt=st(ut*ut+Et*Et+Mt*Mt),jt=it(Rt),ee=Rt&&-jt/Rt;un+=ee*ut,an+=ee*Et,Ce+=ee*Mt,Ft+=jt,be+=jt*(ye+(ye=N)),Ae+=jt*(dn+(dn=q)),Ze+=jt*(gn+(gn=wt)),At(ye,dn,gn)}function ze(E){sr=Ft=zt=ie=ue=be=Ae=Ze=un=an=Ce=0,Qt(E,vt);var O=un,W=an,N=Ce,q=O*O+W*W+N*N;return qd?E+Math.round(-E/p)*p:E,O]}wn.invert=wn;function Qn(E,O,W){return(E%=p)?O||W?en(cr(E),xr(O,W)):cr(E):O||W?xr(O,W):wn}function fr(E){return function(O,W){return O+=E,[O>d?O-p:O<-d?O+p:O,W]}}function cr(E){var O=fr(E);return O.invert=fr(-E),O}function xr(E,O){var W=_(E),N=j(E),q=_(O),wt=j(O);function ut(Et,Mt){var Rt=_(Mt),jt=_(Et)*Rt,ee=j(Et)*Rt,Jt=j(Mt),ce=Jt*W+jt*N;return[M(ee*q-ce*wt,jt*W-Jt*N),it(ce*q+ee*wt)]}return ut.invert=function(Et,Mt){var Rt=_(Mt),jt=_(Et)*Rt,ee=j(Et)*Rt,Jt=j(Mt),ce=Jt*q-ee*wt;return[M(ee*q+Jt*wt,jt*W+ce*N),it(ce*W-jt*N)]},ut}function Jr(E){E=Qn(E[0]*y,E[1]*y,E.length>2?E[2]*y:0);function O(W){return W=E(W[0]*y,W[1]*y),W[0]*=m,W[1]*=m,W}return O.invert=function(W){return W=E.invert(W[0]*y,W[1]*y),W[0]*=m,W[1]*=m,W},O}function gi(E,O,W,N,q,wt){if(!!W){var ut=_(O),Et=j(O),Mt=N*W;q==null?(q=O+N*p,wt=O-Mt/2):(q=pi(ut,q),wt=pi(ut,wt),(N>0?qwt)&&(q+=N*p));for(var Rt,jt=q;N>0?jt>wt:jt1&&E.push(E.pop().concat(E.shift()))},result:function(){var W=E;return E=[],O=null,W}}}function za(E,O){return w(E[0]-O[0])=0;--Et)q.point((ee=jt[Et])[0],ee[1]);else N(Jt.x,Jt.p.x,-1,q);Jt=Jt.p}Jt=Jt.o,jt=Jt.z,ce=!ce}while(!Jt.v);q.lineEnd()}}}function va(E){if(!!(O=E.length)){for(var O,W=0,N=E[0],q;++W=0?1:-1,In=kn*yn,Ln=In>d,Ge=le*rn;if(Ya.add(M(Ge*kn*j(In),ve*En+Ge*_(In))),ut+=Ln?yn+kn*p:yn,Ln^ce>=W^De>=W){var Bn=A(S(Jt),S($e));pt(Bn);var qn=A(wt,Bn);pt(qn);var Xn=(Ln^yn>=0?-1:1)*it(qn[2]);(N>Xn||N===Xn&&(Bn[0]||Bn[1]))&&(Et+=Ln^yn>=0?1:-1)}}return(ut<-f||ut0){for(Mt||(q.polygonStart(),Mt=!0),q.lineStart(),En=0;En1&&Xe&2&&rn.push(rn.pop().concat(rn.shift())),jt.push(rn.filter($))}}return Jt}}function $(E){return E.length>1}function Tt(E,O){return((E=E.x)[0]<0?E[1]-v-f:v-E[1])-((O=O.x)[0]<0?O[1]-v-f:v-O[1])}var Xt=so(function(){return!0},de,Le,[-d,-v]);function de(E){var O=NaN,W=NaN,N=NaN,q;return{lineStart:function(){E.lineStart(),q=1},point:function(wt,ut){var Et=wt>0?d:-d,Mt=w(wt-O);w(Mt-d)0?v:-v),E.point(N,W),E.lineEnd(),E.lineStart(),E.point(Et,W),E.point(wt,W),q=0):N!==Et&&Mt>=d&&(w(O-N)f?x((j(O)*(wt=_(N))*j(W)-j(N)*(q=_(O))*j(E))/(q*wt*ut)):(O+N)/2}function Le(E,O,W,N){var q;if(E==null)q=W*v,N.point(-d,q),N.point(0,q),N.point(d,q),N.point(d,0),N.point(d,-q),N.point(0,-q),N.point(-d,-q),N.point(-d,0),N.point(-d,q);else if(w(E[0]-O[0])>f){var wt=E[0]0,q=w(O)>f;function wt(jt,ee,Jt,ce){gi(ce,E,W,Jt,jt,ee)}function ut(jt,ee){return _(jt)*_(ee)>O}function Et(jt){var ee,Jt,ce,te,le;return{lineStart:function(){te=ce=!1,le=1},point:function(ve,Re){var $e=[ve,Re],De,Xe=ut(ve,Re),rn=N?Xe?0:Rt(ve,Re):Xe?Rt(ve+(ve<0?d:-d),Re):0;if(!ee&&(te=ce=Xe)&&jt.lineStart(),Xe!==ce&&(De=Mt(ee,$e),(!De||za(ee,De)||za($e,De))&&($e[2]=1)),Xe!==ce)le=0,Xe?(jt.lineStart(),De=Mt($e,ee),jt.point(De[0],De[1])):(De=Mt(ee,$e),jt.point(De[0],De[1],2),jt.lineEnd()),ee=De;else if(q&&ee&&N^Xe){var En;!(rn&Jt)&&(En=Mt($e,ee,!0))&&(le=0,N?(jt.lineStart(),jt.point(En[0][0],En[0][1]),jt.point(En[1][0],En[1][1]),jt.lineEnd()):(jt.point(En[1][0],En[1][1]),jt.lineEnd(),jt.lineStart(),jt.point(En[0][0],En[0][1],3)))}Xe&&(!ee||!za(ee,$e))&&jt.point($e[0],$e[1]),ee=$e,ce=Xe,Jt=rn},lineEnd:function(){ce&&jt.lineEnd(),ee=null},clean:function(){return le|(te&&ce)<<1}}}function Mt(jt,ee,Jt){var ce=S(jt),te=S(ee),le=[1,0,0],ve=A(ce,te),Re=B(ve,ve),$e=ve[0],De=Re-$e*$e;if(!De)return!Jt&&jt;var Xe=O*Re/De,rn=-O*$e/De,En=A(le,ve),yn=J(le,Xe),kn=J(ve,rn);z(yn,kn);var In=En,Ln=B(yn,In),Ge=B(In,In),Bn=Ln*Ln-Ge*(B(yn,yn)-1);if(!(Bn<0)){var qn=st(Bn),Xn=J(In,(-Ln-qn)/Ge);if(z(Xn,yn),Xn=mt(Xn),!Jt)return Xn;var sn=jt[0],Zn=ee[0],vr=jt[1],Sr=ee[1],zr;Zn0^Xn[1]<(w(Xn[0]-sn)d^(sn<=Xn[0]&&Xn[0]<=Zn)){var No=J(In,(-Ln+qn)/Ge);return z(No,yn),[Xn,mt(No)]}}}function Rt(jt,ee){var Jt=N?E:d-E,ce=0;return jt<-Jt?ce|=1:jt>Jt&&(ce|=2),ee<-Jt?ce|=4:ee>Jt&&(ce|=8),ce}return so(ut,Et,wt,N?[0,-E]:[-d,E-d])}function xe(E,O,W,N,q,wt){var ut=E[0],Et=E[1],Mt=O[0],Rt=O[1],jt=0,ee=1,Jt=Mt-ut,ce=Rt-Et,te;if(te=W-ut,!(!Jt&&te>0)){if(te/=Jt,Jt<0){if(te0){if(te>ee)return;te>jt&&(jt=te)}if(te=q-ut,!(!Jt&&te<0)){if(te/=Jt,Jt<0){if(te>ee)return;te>jt&&(jt=te)}else if(Jt>0){if(te0)){if(te/=ce,ce<0){if(te0){if(te>ee)return;te>jt&&(jt=te)}if(te=wt-Et,!(!ce&&te<0)){if(te/=ce,ce<0){if(te>ee)return;te>jt&&(jt=te)}else if(ce>0){if(te0&&(E[0]=ut+jt*Jt,E[1]=Et+jt*ce),ee<1&&(O[0]=ut+ee*Jt,O[1]=Et+ee*ce),!0}}}}}var Je=1e9,Mn=-Je;function pn(E,O,W,N){function q(Rt,jt){return E<=Rt&&Rt<=W&&O<=jt&&jt<=N}function wt(Rt,jt,ee,Jt){var ce=0,te=0;if(Rt==null||(ce=ut(Rt,ee))!==(te=ut(jt,ee))||Mt(Rt,jt)<0^ee>0)do Jt.point(ce===0||ce===3?E:W,ce>1?N:O);while((ce=(ce+ee+4)%4)!==te);else Jt.point(jt[0],jt[1])}function ut(Rt,jt){return w(Rt[0]-E)0?0:3:w(Rt[0]-W)0?2:1:w(Rt[1]-O)0?1:0:jt>0?3:2}function Et(Rt,jt){return Mt(Rt.x,jt.x)}function Mt(Rt,jt){var ee=ut(Rt,1),Jt=ut(jt,1);return ee!==Jt?ee-Jt:ee===0?jt[1]-Rt[1]:ee===1?Rt[0]-jt[0]:ee===2?Rt[1]-jt[1]:jt[0]-Rt[0]}return function(Rt){var jt=Rt,ee=Li(),Jt,ce,te,le,ve,Re,$e,De,Xe,rn,En,yn={point:kn,lineStart:Bn,lineEnd:qn,polygonStart:Ln,polygonEnd:Ge};function kn(sn,Zn){q(sn,Zn)&&jt.point(sn,Zn)}function In(){for(var sn=0,Zn=0,vr=ce.length;ZnN&&(Ns-Fo)*(N-No)>(ks-No)*(E-Fo)&&++sn:ks<=N&&(Ns-Fo)*(N-No)<(ks-No)*(E-Fo)&&--sn;return sn}function Ln(){jt=ee,Jt=[],ce=[],En=!0}function Ge(){var sn=In(),Zn=En&&sn,vr=(Jt=o.merge(Jt)).length;(Zn||vr)&&(Rt.polygonStart(),Zn&&(Rt.lineStart(),wt(null,null,1,Rt),Rt.lineEnd()),vr&&da(Jt,Et,sn,wt,Rt),Rt.polygonEnd()),jt=Rt,Jt=ce=te=null}function Bn(){yn.point=Xn,ce&&ce.push(te=[]),rn=!0,Xe=!1,$e=De=NaN}function qn(){Jt&&(Xn(le,ve),Re&&Xe&&ee.rejoin(),Jt.push(ee.result())),yn.point=kn,Xe&&jt.lineEnd()}function Xn(sn,Zn){var vr=q(sn,Zn);if(ce&&te.push([sn,Zn]),rn)le=sn,ve=Zn,Re=vr,rn=!1,vr&&(jt.lineStart(),jt.point(sn,Zn));else if(vr&&Xe)jt.point(sn,Zn);else{var Sr=[$e=Math.max(Mn,Math.min(Je,$e)),De=Math.max(Mn,Math.min(Je,De))],zr=[sn=Math.max(Mn,Math.min(Je,sn)),Zn=Math.max(Mn,Math.min(Je,Zn))];xe(Sr,zr,E,O,W,N)?(Xe||(jt.lineStart(),jt.point(Sr[0],Sr[1])),jt.point(zr[0],zr[1]),vr||jt.lineEnd(),En=!1):vr&&(jt.lineStart(),jt.point(sn,Zn),En=!1)}$e=sn,De=Zn,Xe=vr}return yn}}function Tn(){var E=0,O=0,W=960,N=500,q,wt,ut;return ut={stream:function(Et){return q&&wt===Et?q:q=pn(E,O,W,N)(wt=Et)},extent:function(Et){return arguments.length?(E=+Et[0][0],O=+Et[0][1],W=+Et[1][0],N=+Et[1][1],q=wt=null,ut):[[E,O],[W,N]]}}}var On=s(),Kn,Gn,Jn,Vn={sphere:ht,point:ht,lineStart:hr,lineEnd:ht,polygonStart:ht,polygonEnd:ht};function hr(){Vn.point=mr,Vn.lineEnd=ar}function ar(){Vn.point=Vn.lineEnd=ht}function mr(E,O){E*=y,O*=y,Kn=E,Gn=j(O),Jn=_(O),Vn.point=dr}function dr(E,O){E*=y,O*=y;var W=j(O),N=_(O),q=w(E-Kn),wt=_(q),ut=j(q),Et=N*ut,Mt=Jn*W-Gn*N*wt,Rt=Gn*W+Jn*N*wt;On.add(M(st(Et*Et+Mt*Mt),Rt)),Kn=E,Gn=W,Jn=N}function Rr(E){return On.reset(),Qt(E,Vn),+On}var Tr=[null,null],Hr={type:"LineString",coordinates:Tr};function Ar(E,O){return Tr[0]=E,Tr[1]=O,Rr(Hr)}var br={Feature:function(E,O){return _r(E.geometry,O)},FeatureCollection:function(E,O){for(var W=E.features,N=-1,q=W.length;++N0&&(q=Ar(E[wt],E[wt-1]),q>0&&W<=q&&N<=q&&(W+N-q)*(1-Math.pow((W-N)/q,2))f}).map(Jt)).concat(o.range(D(wt/Rt)*Rt,q,Rt).filter(function(De){return w(De%ee)>f}).map(ce))}return Re.lines=function(){return $e().map(function(De){return{type:"LineString",coordinates:De}})},Re.outline=function(){return{type:"Polygon",coordinates:[te(N).concat(le(ut).slice(1),te(W).reverse().slice(1),le(Et).reverse().slice(1))]}},Re.extent=function(De){return arguments.length?Re.extentMajor(De).extentMinor(De):Re.extentMinor()},Re.extentMajor=function(De){return arguments.length?(N=+De[0][0],W=+De[1][0],Et=+De[0][1],ut=+De[1][1],N>W&&(De=N,N=W,W=De),Et>ut&&(De=Et,Et=ut,ut=De),Re.precision(ve)):[[N,Et],[W,ut]]},Re.extentMinor=function(De){return arguments.length?(O=+De[0][0],E=+De[1][0],wt=+De[0][1],q=+De[1][1],O>E&&(De=O,O=E,E=De),wt>q&&(De=wt,wt=q,q=De),Re.precision(ve)):[[O,wt],[E,q]]},Re.step=function(De){return arguments.length?Re.stepMajor(De).stepMinor(De):Re.stepMinor()},Re.stepMajor=function(De){return arguments.length?(jt=+De[0],ee=+De[1],Re):[jt,ee]},Re.stepMinor=function(De){return arguments.length?(Mt=+De[0],Rt=+De[1],Re):[Mt,Rt]},Re.precision=function(De){return arguments.length?(ve=+De,Jt=ga(wt,q,90),ce=fi(O,E,ve),te=ga(Et,ut,90),le=fi(N,W,ve),Re):ve},Re.extentMajor([[-180,-90+f],[180,90-f]]).extentMinor([[-180,-80-f],[180,80+f]])}function Xr(){return Di()()}function lo(E,O){var W=E[0]*y,N=E[1]*y,q=O[0]*y,wt=O[1]*y,ut=_(N),Et=j(N),Mt=_(wt),Rt=j(wt),jt=ut*_(W),ee=ut*j(W),Jt=Mt*_(q),ce=Mt*j(q),te=2*it(st(Pt(wt-N)+ut*Mt*Pt(q-W))),le=j(te),ve=te?function(Re){var $e=j(Re*=te)/le,De=j(te-Re)/le,Xe=De*jt+$e*Jt,rn=De*ee+$e*ce,En=De*Et+$e*Rt;return[M(rn,Xe)*m,M(En,st(Xe*Xe+rn*rn))*m]}:function(){return[W*m,N*m]};return ve.distance=te,ve}function Hi(E){return E}var Ur=s(),na=s(),Or,ra,Bi,xi,qr={point:ht,lineStart:ht,lineEnd:ht,polygonStart:function(){qr.lineStart=Ha,qr.lineEnd=Gi},polygonEnd:function(){qr.lineStart=qr.lineEnd=qr.point=ht,Ur.add(w(na)),na.reset()},result:function(){var E=Ur/2;return Ur.reset(),E}};function Ha(){qr.point=uo}function uo(E,O){qr.point=Wi,Or=Bi=E,ra=xi=O}function Wi(E,O){na.add(xi*E-Bi*O),Bi=E,xi=O}function Gi(){Wi(Or,ra)}var wi=1/0,ia=wi,Ei=-wi,Vi=Ei,$i={point:aa,lineStart:ht,lineEnd:ht,polygonStart:ht,polygonEnd:ht,result:function(){var E=[[wi,ia],[Ei,Vi]];return Ei=Vi=-(ia=wi=1/0),E}};function aa(E,O){EEi&&(Ei=E),OVi&&(Vi=O)}var Wa=0,Ri=0,Kr=0,Zr=0,Ir=0,ci=0,Ao=0,Mi=0,ri=0,ii,pa,Fi,Xi,hi={point:ai,lineStart:Ga,lineEnd:$o,polygonStart:function(){hi.lineStart=ma,hi.lineEnd=Va},polygonEnd:function(){hi.point=ai,hi.lineStart=Ga,hi.lineEnd=$o},result:function(){var E=ri?[Ao/ri,Mi/ri]:ci?[Zr/ci,Ir/ci]:Kr?[Wa/Kr,Ri/Kr]:[NaN,NaN];return Wa=Ri=Kr=Zr=Ir=ci=Ao=Mi=ri=0,E}};function ai(E,O){Wa+=E,Ri+=O,++Kr}function Ga(){hi.point=fo}function fo(E,O){hi.point=Vo,ai(Fi=E,Xi=O)}function Vo(E,O){var W=E-Fi,N=O-Xi,q=st(W*W+N*N);Zr+=q*(Fi+E)/2,Ir+=q*(Xi+O)/2,ci+=q,ai(Fi=E,Xi=O)}function $o(){hi.point=ai}function ma(){hi.point=oa}function Va(){vs(ii,pa)}function oa(E,O){hi.point=vs,ai(ii=Fi=E,pa=Xi=O)}function vs(E,O){var W=E-Fi,N=O-Xi,q=st(W*W+N*N);Zr+=q*(Fi+E)/2,Ir+=q*(Xi+O)/2,ci+=q,q=Xi*E-Fi*O,Ao+=q*(Fi+E),Mi+=q*(Xi+O),ri+=q*3,ai(Fi=E,Xi=O)}function co(E){this._context=E}co.prototype={_radius:4.5,pointRadius:function(E){return this._radius=E,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(E,O){switch(this._point){case 0:{this._context.moveTo(E,O),this._point=1;break}case 1:{this._context.lineTo(E,O);break}default:{this._context.moveTo(E+this._radius,O),this._context.arc(E,O,this._radius,0,p);break}}},result:ht};var ya=s(),Ui,ho,Oo,vo,xa,sa={point:ht,lineStart:function(){sa.point=gs},lineEnd:function(){Ui&&Xo(ho,Oo),sa.point=ht},polygonStart:function(){Ui=!0},polygonEnd:function(){Ui=null},result:function(){var E=+ya;return ya.reset(),E}};function gs(E,O){sa.point=Xo,ho=vo=E,Oo=xa=O}function Xo(E,O){vo-=E,xa-=O,ya.add(st(vo*vo+xa*xa)),vo=E,xa=O}function go(){this._string=[]}go.prototype={_radius:4.5,_circle:Uo(4.5),pointRadius:function(E){return(E=+E)!==this._radius&&(this._radius=E,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(E,O){switch(this._point){case 0:{this._string.push("M",E,",",O),this._point=1;break}case 1:{this._string.push("L",E,",",O);break}default:{this._circle==null&&(this._circle=Uo(this._radius)),this._string.push("M",E,",",O,this._circle);break}}},result:function(){if(this._string.length){var E=this._string.join("");return this._string=[],E}else return null}};function Uo(E){return"m0,"+E+"a"+E+","+E+" 0 1,1 0,"+-2*E+"a"+E+","+E+" 0 1,1 0,"+2*E+"z"}function ps(E,O){var W=4.5,N,q;function wt(ut){return ut&&(typeof W=="function"&&q.pointRadius(+W.apply(this,arguments)),Qt(ut,N(q))),q.result()}return wt.area=function(ut){return Qt(ut,N(qr)),qr.result()},wt.measure=function(ut){return Qt(ut,N(sa)),sa.result()},wt.bounds=function(ut){return Qt(ut,N($i)),$i.result()},wt.centroid=function(ut){return Qt(ut,N(hi)),hi.result()},wt.projection=function(ut){return arguments.length?(N=ut==null?(E=null,Hi):(E=ut).stream,wt):E},wt.context=function(ut){return arguments.length?(q=ut==null?(O=null,new go):new co(O=ut),typeof W!="function"&&q.pointRadius(W),wt):O},wt.pointRadius=function(ut){return arguments.length?(W=typeof ut=="function"?ut:(q.pointRadius(+ut),+ut),wt):W},wt.projection(E).context(O)}function $a(E){return{stream:bi(E)}}function bi(E){return function(O){var W=new Ki;for(var N in E)W[N]=E[N];return W.stream=O,W}}function Ki(){}Ki.prototype={constructor:Ki,point:function(E,O){this.stream.point(E,O)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Xa(E,O,W){var N=E.clipExtent&&E.clipExtent();return E.scale(150).translate([0,0]),N!=null&&E.clipExtent(null),Qt(W,E.stream($i)),O($i.result()),N!=null&&E.clipExtent(N),E}function wa(E,O,W){return Xa(E,function(N){var q=O[1][0]-O[0][0],wt=O[1][1]-O[0][1],ut=Math.min(q/(N[1][0]-N[0][0]),wt/(N[1][1]-N[0][1])),Et=+O[0][0]+(q-ut*(N[1][0]+N[0][0]))/2,Mt=+O[0][1]+(wt-ut*(N[1][1]+N[0][1]))/2;E.scale(150*ut).translate([Et,Mt])},W)}function ms(E,O,W){return wa(E,[[0,0],O],W)}function Io(E,O,W){return Xa(E,function(N){var q=+O,wt=q/(N[1][0]-N[0][0]),ut=(q-wt*(N[1][0]+N[0][0]))/2,Et=-wt*N[0][1];E.scale(150*wt).translate([ut,Et])},W)}function ys(E,O,W){return Xa(E,function(N){var q=+O,wt=q/(N[1][1]-N[0][1]),ut=-wt*N[0][0],Et=(q-wt*(N[1][1]+N[0][1]))/2;E.scale(150*wt).translate([ut,Et])},W)}var jo=16,Rs=_(30*y);function Zi(E,O){return+O?Ua(E,O):xs(E)}function xs(E){return bi({point:function(O,W){O=E(O,W),this.stream.point(O[0],O[1])}})}function Ua(E,O){function W(N,q,wt,ut,Et,Mt,Rt,jt,ee,Jt,ce,te,le,ve){var Re=Rt-N,$e=jt-q,De=Re*Re+$e*$e;if(De>4*O&&le--){var Xe=ut+Jt,rn=Et+ce,En=Mt+te,yn=st(Xe*Xe+rn*rn+En*En),kn=it(En/=yn),In=w(w(En)-1)O||w((Re*qn+$e*Xn)/De-.5)>.3||ut*Jt+Et*ce+Mt*te2?sn[2]%360*y:0,qn()):[Et*m,Mt*m,Rt*m]},Ge.angle=function(sn){return arguments.length?(ee=sn%360*y,qn()):ee*m},Ge.reflectX=function(sn){return arguments.length?(Jt=sn?-1:1,qn()):Jt<0},Ge.reflectY=function(sn){return arguments.length?(ce=sn?-1:1,qn()):ce<0},Ge.precision=function(sn){return arguments.length?(En=Zi(yn,rn=sn*sn),Xn()):st(rn)},Ge.fitExtent=function(sn,Zn){return wa(Ge,sn,Zn)},Ge.fitSize=function(sn,Zn){return ms(Ge,sn,Zn)},Ge.fitWidth=function(sn,Zn){return Io(Ge,sn,Zn)},Ge.fitHeight=function(sn,Zn){return ys(Ge,sn,Zn)};function qn(){var sn=ws(W,0,0,Jt,ce,ee).apply(null,O(wt,ut)),Zn=(ee?ws:po)(W,N-sn[0],q-sn[1],Jt,ce,ee);return jt=Qn(Et,Mt,Rt),yn=en(O,Zn),kn=en(jt,yn),En=Zi(yn,rn),Xn()}function Xn(){return In=Ln=null,Ge}return function(){return O=E.apply(this,arguments),Ge.invert=O.invert&&Bn,qn()}}function Ea(E){var O=0,W=d/3,N=mo(E),q=N(O,W);return q.parallels=function(wt){return arguments.length?N(O=wt[0]*y,W=wt[1]*y):[O*m,W*m]},q}function Lo(E){var O=_(E);function W(N,q){return[N*O,j(q)/O]}return W.invert=function(N,q){return[N/O,it(q*O)]},W}function Do(E,O){var W=j(E),N=(W+j(O))/2;if(w(N)=.12&&ve<.234&&le>=-.425&&le<-.214?q:ve>=.166&&ve<.234&&le>=-.214&&le<-.115?ut:W).invert(Jt)},jt.stream=function(Jt){return E&&O===Jt?E:E=Es([W.stream(O=Jt),q.stream(Jt),ut.stream(Jt)])},jt.precision=function(Jt){return arguments.length?(W.precision(Jt),q.precision(Jt),ut.precision(Jt),ee()):W.precision()},jt.scale=function(Jt){return arguments.length?(W.scale(Jt),q.scale(Jt*.35),ut.scale(Jt),jt.translate(W.translate())):W.scale()},jt.translate=function(Jt){if(!arguments.length)return W.translate();var ce=W.scale(),te=+Jt[0],le=+Jt[1];return N=W.translate(Jt).clipExtent([[te-.455*ce,le-.238*ce],[te+.455*ce,le+.238*ce]]).stream(Rt),wt=q.translate([te-.307*ce,le+.201*ce]).clipExtent([[te-.425*ce+f,le+.12*ce+f],[te-.214*ce-f,le+.234*ce-f]]).stream(Rt),Et=ut.translate([te-.205*ce,le+.212*ce]).clipExtent([[te-.214*ce+f,le+.166*ce+f],[te-.115*ce-f,le+.234*ce-f]]).stream(Rt),ee()},jt.fitExtent=function(Jt,ce){return wa(jt,Jt,ce)},jt.fitSize=function(Jt,ce){return ms(jt,Jt,ce)},jt.fitWidth=function(Jt,ce){return Io(jt,Jt,ce)},jt.fitHeight=function(Jt,ce){return ys(jt,Jt,ce)};function ee(){return E=O=null,jt}return jt.scale(1070)}function Ko(E){return function(O,W){var N=_(O),q=_(W),wt=E(N*q);return[wt*q*j(O),wt*j(W)]}}function Za(E){return function(O,W){var N=st(O*O+W*W),q=E(N),wt=j(q),ut=_(q);return[M(O*wt,N*ut),it(N&&W*wt/N)]}}var Si=Ko(function(E){return st(2/(1+E))});Si.invert=Za(function(E){return 2*it(E/2)});function Bo(){return _i(Si).scale(124.75).clipAngle(180-.001)}var Zo=Ko(function(E){return(E=Q(E))&&E/j(E)});Zo.invert=Za(function(E){return E});function ba(){return _i(Zo).scale(79.4188).clipAngle(180-.001)}function xo(E,O){return[E,F(yt((v+O)/2))]}xo.invert=function(E,O){return[E,2*x(C(O))-v]};function Fs(){return Qa(xo).scale(961/p)}function Qa(E){var O=_i(E),W=O.center,N=O.scale,q=O.translate,wt=O.clipExtent,ut=null,Et,Mt,Rt;O.scale=function(ee){return arguments.length?(N(ee),jt()):N()},O.translate=function(ee){return arguments.length?(q(ee),jt()):q()},O.center=function(ee){return arguments.length?(W(ee),jt()):W()},O.clipExtent=function(ee){return arguments.length?(ee==null?ut=Et=Mt=Rt=null:(ut=+ee[0][0],Et=+ee[0][1],Mt=+ee[1][0],Rt=+ee[1][1]),jt()):ut==null?null:[[ut,Et],[Mt,Rt]]};function jt(){var ee=d*N(),Jt=O(Jr(O.rotate()).invert([0,0]));return wt(ut==null?[[Jt[0]-ee,Jt[1]-ee],[Jt[0]+ee,Jt[1]+ee]]:E===xo?[[Math.max(Jt[0]-ee,ut),Et],[Math.min(Jt[0]+ee,Mt),Rt]]:[[ut,Math.max(Jt[1]-ee,Et)],[Mt,Math.min(Jt[1]+ee,Rt)]])}return jt()}function wo(E){return yt((v+E)/2)}function Ro(E,O){var W=_(E),N=E===O?j(E):F(W/_(O))/F(wo(O)/wo(E)),q=W*k(wo(E),N)/N;if(!N)return xo;function wt(ut,Et){q>0?Et<-v+f&&(Et=-v+f):Et>v-f&&(Et=v-f);var Mt=q/k(wo(Et),N);return[Mt*j(N*ut),q-Mt*_(N*ut)]}return wt.invert=function(ut,Et){var Mt=q-Et,Rt=V(N)*st(ut*ut+Mt*Mt),jt=M(ut,w(Mt))*V(Mt);return Mt*N<0&&(jt-=d*V(ut)*V(Mt)),[jt/N,2*x(k(q/Rt,1/N))-v]},wt}function jr(){return Ea(Ro).scale(109.5).parallels([30,30])}function kr(E,O){return[E,O]}kr.invert=kr;function _a(){return _i(kr).scale(152.63)}function Ja(E,O){var W=_(E),N=E===O?j(E):(W-_(O))/(O-E),q=W/N+E;if(w(N)f&&--N>0);return[E/(.8707+(wt=W*W)*(-.131979+wt*(-.013791+wt*wt*wt*(.003971-.001529*wt)))),W]};function Qe(){return _i(Ye).scale(175.295)}function Ee(E,O){return[_(O)*j(E),j(O)]}Ee.invert=Za(it);function He(){return _i(Ee).scale(249.5).clipAngle(90+f)}function I(E,O){var W=_(O),N=1+_(E)*W;return[W*j(E)/N,j(O)/N]}I.invert=Za(function(E){return 2*x(E)});function Y(){return _i(I).scale(250).clipAngle(142)}function et(E,O){return[F(yt((v+O)/2)),-E]}et.invert=function(E,O){return[-O,2*x(C(E))-v]};function nt(){var E=Qa(et),O=E.center,W=E.rotate;return E.center=function(N){return arguments.length?O([-N[1],N[0]]):(N=O(),[N[1],-N[0]])},E.rotate=function(N){return arguments.length?W([N[0],N[1],N.length>2?N[2]+90:90]):(N=W(),[N[0],N[1],N[2]-90])},W([0,0,90]).scale(159.155)}r.geoAlbers=Ma,r.geoAlbersUsa=Ka,r.geoArea=Z,r.geoAzimuthalEqualArea=Bo,r.geoAzimuthalEqualAreaRaw=Si,r.geoAzimuthalEquidistant=ba,r.geoAzimuthalEquidistantRaw=Zo,r.geoBounds=Br,r.geoCentroid=ze,r.geoCircle=ha,r.geoClipAntimeridian=Xt,r.geoClipCircle=We,r.geoClipExtent=Tn,r.geoClipRectangle=pn,r.geoConicConformal=jr,r.geoConicConformalRaw=Ro,r.geoConicEqualArea=yo,r.geoConicEqualAreaRaw=Do,r.geoConicEquidistant=la,r.geoConicEquidistantRaw=Ja,r.geoContains=ea,r.geoDistance=Ar,r.geoEqualEarth=qt,r.geoEqualEarthRaw=St,r.geoEquirectangular=_a,r.geoEquirectangularRaw=kr,r.geoGnomonic=Me,r.geoGnomonicRaw=me,r.geoGraticule=Di,r.geoGraticule10=Xr,r.geoIdentity=Be,r.geoInterpolate=lo,r.geoLength=Rr,r.geoMercator=Fs,r.geoMercatorRaw=xo,r.geoNaturalEarth1=Qe,r.geoNaturalEarth1Raw=Ye,r.geoOrthographic=He,r.geoOrthographicRaw=Ee,r.geoPath=ps,r.geoProjection=_i,r.geoProjectionMutator=mo,r.geoRotation=Jr,r.geoStereographic=Y,r.geoStereographicRaw=I,r.geoStream=Qt,r.geoTransform=$a,r.geoTransverseMercator=nt,r.geoTransverseMercatorRaw=et,Object.defineProperty(r,"__esModule",{value:!0})})},"./node_modules/_d3-geo@1.6.4@d3-geo/build/d3-geo.js":function(t,e,n){(function(r,o){o(e,n("./node_modules/_d3-array@1.2.4@d3-array/dist/d3-array.js"))})(this,function(r,o){var s=function(){return new l};function l(){this.reset()}l.prototype={constructor:l,reset:function(){this.s=this.t=0},add:function(G){c(u,G,this.t),c(this,u.s,this.s),this.s?this.t+=u.t:this.s=u.t},valueOf:function(){return this.s}};var u=new l;function c(G,tt,Ot){var St=G.s=tt+Ot,qt=St-tt,me=St-qt;G.t=tt-me+(Ot-qt)}var f=1e-6,h=1e-12,d=Math.PI,v=d/2,g=d/4,p=d*2,m=180/d,y=d/180,w=Math.abs,x=Math.atan,M=Math.atan2,_=Math.cos,D=Math.ceil,C=Math.exp,F=Math.log,k=Math.pow,j=Math.sin,V=Math.sign||function(G){return G>0?1:G<0?-1:0},st=Math.sqrt,yt=Math.tan;function Q(G){return G>1?0:G<-1?d:Math.acos(G)}function it(G){return G>1?v:G<-1?-v:Math.asin(G)}function Pt(G){return(G=j(G/2))*G}function ht(){}function lt(G,tt){G&&xt.hasOwnProperty(G.type)&&xt[G.type](G,tt)}var U={Feature:function(G,tt){lt(G.geometry,tt)},FeatureCollection:function(G,tt){for(var Ot=G.features,St=-1,qt=Ot.length;++St=0?1:-1,qt=St*Ot,me=_(tt),Me=j(tt),Be=P*Me,Ye=gt*me+Be*_(qt),Qe=Be*St*j(qt);Ie.add(M(Qe,Ye)),ft=G,gt=me,P=Me}var Z=function(G){return _e.reset(),Qt(G,Kt),_e*2};function mt(G){return[M(G[1],G[0]),it(G[2])]}function S(G){var tt=G[0],Ot=G[1],St=_(Ot);return[St*_(tt),St*j(tt),j(Ot)]}function B(G,tt){return G[0]*tt[0]+G[1]*tt[1]+G[2]*tt[2]}function A(G,tt){return[G[1]*tt[2]-G[2]*tt[1],G[2]*tt[0]-G[0]*tt[2],G[0]*tt[1]-G[1]*tt[0]]}function z(G,tt){G[0]+=tt[0],G[1]+=tt[1],G[2]+=tt[2]}function J(G,tt){return[G[0]*tt,G[1]*tt,G[2]*tt]}function pt(G){var tt=st(G[0]*G[0]+G[1]*G[1]+G[2]*G[2]);G[0]/=tt,G[1]/=tt,G[2]/=tt}var It,Zt,Lt,Yt,Se,Ke,fn,on,mn=s(),Sn,xn,bn={point:An,lineStart:Ht,lineEnd:kt,polygonStart:function(){bn.point=oe,bn.lineStart=fe,bn.lineEnd=Ve,mn.reset(),Kt.polygonStart()},polygonEnd:function(){Kt.polygonEnd(),bn.point=An,bn.lineStart=Ht,bn.lineEnd=kt,Ie<0?(It=-(Lt=180),Zt=-(Yt=90)):mn>f?Yt=90:mn<-f&&(Zt=-90),xn[0]=It,xn[1]=Lt}};function An(G,tt){Sn.push(xn=[It=G,Lt=G]),ttYt&&(Yt=tt)}function Dn(G,tt){var Ot=S([G*y,tt*y]);if(on){var St=A(on,Ot),qt=[St[1],-St[0],0],me=A(qt,St);pt(me),me=mt(me);var Me=G-Se,Be=Me>0?1:-1,Ye=me[0]*m*Be,Qe,Ee=w(Me)>180;Ee^(Be*SeYt&&(Yt=Qe)):(Ye=(Ye+360)%360-180,Ee^(Be*SeYt&&(Yt=tt))),Ee?GFn(It,Lt)&&(Lt=G):Fn(G,Lt)>Fn(It,Lt)&&(It=G):Lt>=It?(GLt&&(Lt=G)):G>Se?Fn(It,G)>Fn(It,Lt)&&(Lt=G):Fn(G,Lt)>Fn(It,Lt)&&(It=G)}else Sn.push(xn=[It=G,Lt=G]);ttYt&&(Yt=tt),on=Ot,Se=G}function Ht(){bn.point=Dn}function kt(){xn[0]=It,xn[1]=Lt,bn.point=An,on=null}function oe(G,tt){if(on){var Ot=G-Se;mn.add(w(Ot)>180?Ot+(Ot>0?360:-360):Ot)}else Ke=G,fn=tt;Kt.point(G,tt),Dn(G,tt)}function fe(){Kt.lineStart()}function Ve(){oe(Ke,fn),Kt.lineEnd(),w(mn)>f&&(It=-(Lt=180)),xn[0]=It,xn[1]=Lt,on=null}function Fn(G,tt){return(tt-=G)<0?tt+360:tt}function Pr(G,tt){return G[0]-tt[0]}function pr(G,tt){return G[0]<=G[1]?G[0]<=tt&&tt<=G[1]:ttFn(St[0],St[1])&&(St[1]=qt[1]),Fn(qt[0],St[1])>Fn(St[0],St[1])&&(St[0]=qt[0])):me.push(St=qt);for(Me=-1/0,Ot=me.length-1,tt=0,St=me[Ot];tt<=Ot;St=qt,++tt)qt=me[tt],(Be=Fn(St[1],qt[0]))>Me&&(Me=Be,It=qt[0],Lt=St[1])}return Sn=xn=null,It===1/0||Zt===1/0?[[NaN,NaN],[NaN,NaN]]:[[It,Zt],[Lt,Yt]]},sr,Ft,zt,ie,ue,be,Ae,Ze,un,an,Ce,nn,vn,ye,dn,gn,vt={sphere:ht,point:Ct,lineStart:Ut,lineEnd:Wt,polygonStart:function(){vt.lineStart=ne,vt.lineEnd=ae},polygonEnd:function(){vt.lineStart=Ut,vt.lineEnd=Wt}};function Ct(G,tt){G*=y,tt*=y;var Ot=_(tt);At(Ot*_(G),Ot*j(G),j(tt))}function At(G,tt,Ot){++sr,zt+=(G-zt)/sr,ie+=(tt-ie)/sr,ue+=(Ot-ue)/sr}function Ut(){vt.point=Vt}function Vt(G,tt){G*=y,tt*=y;var Ot=_(tt);ye=Ot*_(G),dn=Ot*j(G),gn=j(tt),vt.point=se,At(ye,dn,gn)}function se(G,tt){G*=y,tt*=y;var Ot=_(tt),St=Ot*_(G),qt=Ot*j(G),me=j(tt),Me=M(st((Me=dn*me-gn*qt)*Me+(Me=gn*St-ye*me)*Me+(Me=ye*qt-dn*St)*Me),ye*St+dn*qt+gn*me);Ft+=Me,be+=Me*(ye+(ye=St)),Ae+=Me*(dn+(dn=qt)),Ze+=Me*(gn+(gn=me)),At(ye,dn,gn)}function Wt(){vt.point=Ct}function ne(){vt.point=ge}function ae(){Pe(nn,vn),vt.point=Ct}function ge(G,tt){nn=G,vn=tt,G*=y,tt*=y,vt.point=Pe;var Ot=_(tt);ye=Ot*_(G),dn=Ot*j(G),gn=j(tt),At(ye,dn,gn)}function Pe(G,tt){G*=y,tt*=y;var Ot=_(tt),St=Ot*_(G),qt=Ot*j(G),me=j(tt),Me=dn*me-gn*qt,Be=gn*St-ye*me,Ye=ye*qt-dn*St,Qe=st(Me*Me+Be*Be+Ye*Ye),Ee=it(Qe),He=Qe&&-Ee/Qe;un+=He*Me,an+=He*Be,Ce+=He*Ye,Ft+=Ee,be+=Ee*(ye+(ye=St)),Ae+=Ee*(dn+(dn=qt)),Ze+=Ee*(gn+(gn=me)),At(ye,dn,gn)}var ze=function(G){sr=Ft=zt=ie=ue=be=Ae=Ze=un=an=Ce=0,Qt(G,vt);var tt=un,Ot=an,St=Ce,qt=tt*tt+Ot*Ot+St*St;return qtd?G-p:G<-d?G+p:G,tt]}wn.invert=wn;function Qn(G,tt,Ot){return(G%=p)?tt||Ot?en(cr(G),xr(tt,Ot)):cr(G):tt||Ot?xr(tt,Ot):wn}function fr(G){return function(tt,Ot){return tt+=G,[tt>d?tt-p:tt<-d?tt+p:tt,Ot]}}function cr(G){var tt=fr(G);return tt.invert=fr(-G),tt}function xr(G,tt){var Ot=_(G),St=j(G),qt=_(tt),me=j(tt);function Me(Be,Ye){var Qe=_(Ye),Ee=_(Be)*Qe,He=j(Be)*Qe,I=j(Ye),Y=I*Ot+Ee*St;return[M(He*qt-Y*me,Ee*Ot-I*St),it(Y*qt+He*me)]}return Me.invert=function(Be,Ye){var Qe=_(Ye),Ee=_(Be)*Qe,He=j(Be)*Qe,I=j(Ye),Y=I*qt-He*me;return[M(He*qt+I*me,Ee*Ot+Y*St),it(Y*Ot-Ee*St)]},Me}var Jr=function(G){G=Qn(G[0]*y,G[1]*y,G.length>2?G[2]*y:0);function tt(Ot){return Ot=G(Ot[0]*y,Ot[1]*y),Ot[0]*=m,Ot[1]*=m,Ot}return tt.invert=function(Ot){return Ot=G.invert(Ot[0]*y,Ot[1]*y),Ot[0]*=m,Ot[1]*=m,Ot},tt};function gi(G,tt,Ot,St,qt,me){if(!!Ot){var Me=_(tt),Be=j(tt),Ye=St*Ot;qt==null?(qt=tt+St*p,me=tt-Ye/2):(qt=pi(Me,qt),me=pi(Me,me),(St>0?qtme)&&(qt+=St*p));for(var Qe,Ee=qt;St>0?Ee>me:Ee1&&G.push(G.pop().concat(G.shift()))},result:function(){var Ot=G;return G=[],tt=null,Ot}}},za=function(G,tt,Ot,St,qt,me){var Me=G[0],Be=G[1],Ye=tt[0],Qe=tt[1],Ee=0,He=1,I=Ye-Me,Y=Qe-Be,et;if(et=Ot-Me,!(!I&&et>0)){if(et/=I,I<0){if(et0){if(et>He)return;et>Ee&&(Ee=et)}if(et=qt-Me,!(!I&&et<0)){if(et/=I,I<0){if(et>He)return;et>Ee&&(Ee=et)}else if(I>0){if(et0)){if(et/=Y,Y<0){if(et0){if(et>He)return;et>Ee&&(Ee=et)}if(et=me-Be,!(!Y&&et<0)){if(et/=Y,Y<0){if(et>He)return;et>Ee&&(Ee=et)}else if(Y>0){if(et0&&(G[0]=Me+Ee*I,G[1]=Be+Ee*Y),He<1&&(tt[0]=Me+He*I,tt[1]=Be+He*Y),!0}}}}},ni=function(G,tt){return w(G[0]-tt[0])=0;--Be)qt.point((He=Ee[Be])[0],He[1]);else St(I.x,I.p.x,-1,qt);I=I.p}I=I.o,Ee=I.z,Y=!Y}while(!I.v);qt.lineEnd()}}};function Ya(G){if(!!(tt=G.length)){for(var tt,Ot=0,St=G[0],qt;++Ot0)do I.point(Y===0||Y===3?G:Ot,Y>1?St:tt);while((Y=(Y+He+4)%4)!==et);else I.point(Ee[0],Ee[1])}function Me(Qe,Ee){return w(Qe[0]-G)0?0:3:w(Qe[0]-Ot)0?2:1:w(Qe[1]-tt)0?1:0:Ee>0?3:2}function Be(Qe,Ee){return Ye(Qe.x,Ee.x)}function Ye(Qe,Ee){var He=Me(Qe,1),I=Me(Ee,1);return He!==I?He-I:He===0?Ee[1]-Qe[1]:He===1?Qe[0]-Ee[0]:He===2?Qe[1]-Ee[1]:Ee[0]-Qe[0]}return function(Qe){var Ee=Qe,He=Li(),I,Y,et,nt,E,O,W,N,q,wt,ut,Et={point:Mt,lineStart:Jt,lineEnd:ce,polygonStart:jt,polygonEnd:ee};function Mt(le,ve){qt(le,ve)&&Ee.point(le,ve)}function Rt(){for(var le=0,ve=0,Re=Y.length;veSt&&(kn-En)*(St-yn)>(In-yn)*(G-En)&&++le:In<=St&&(kn-En)*(St-yn)<(In-yn)*(G-En)&&--le;return le}function jt(){Ee=He,I=[],Y=[],ut=!0}function ee(){var le=Rt(),ve=ut&&le,Re=(I=o.merge(I)).length;(ve||Re)&&(Qe.polygonStart(),ve&&(Qe.lineStart(),me(null,null,1,Qe),Qe.lineEnd()),Re&&va(I,Be,le,me,Qe),Qe.polygonEnd()),Ee=Qe,I=Y=et=null}function Jt(){Et.point=te,Y&&Y.push(et=[]),wt=!0,q=!1,W=N=NaN}function ce(){I&&(te(nt,E),O&&q&&He.rejoin(),I.push(He.result())),Et.point=Mt,q&&Ee.lineEnd()}function te(le,ve){var Re=qt(le,ve);if(Y&&et.push([le,ve]),wt)nt=le,E=ve,O=Re,wt=!1,Re&&(Ee.lineStart(),Ee.point(le,ve));else if(Re&&q)Ee.point(le,ve);else{var $e=[W=Math.max(mi,Math.min(Yi,W)),N=Math.max(mi,Math.min(Yi,N))],De=[le=Math.max(mi,Math.min(Yi,le)),ve=Math.max(mi,Math.min(Yi,ve))];za($e,De,G,tt,Ot,St)?(q||(Ee.lineStart(),Ee.point($e[0],$e[1])),Ee.point(De[0],De[1]),Re||Ee.lineEnd(),ut=!1):Re&&(Ee.lineStart(),Ee.point(le,ve),ut=!1)}W=le,N=ve,q=Re}return Et}}var $=function(){var G=0,tt=0,Ot=960,St=500,qt,me,Me;return Me={stream:function(Be){return qt&&me===Be?qt:qt=so(G,tt,Ot,St)(me=Be)},extent:function(Be){return arguments.length?(G=+Be[0][0],tt=+Be[0][1],Ot=+Be[1][0],St=+Be[1][1],qt=me=null,Me):[[G,tt],[Ot,St]]}}},Tt=s(),Xt=function(G,tt){var Ot=tt[0],St=tt[1],qt=[j(Ot),-_(Ot),0],me=0,Me=0;Tt.reset();for(var Be=0,Ye=G.length;Be=0?1:-1,Mt=Et*ut,Rt=Mt>d,jt=et*q;if(Tt.add(M(jt*Et*j(Mt),nt*wt+jt*_(Mt))),me+=Rt?ut+Et*p:ut,Rt^I>=Ot^W>=Ot){var ee=A(S(He),S(O));pt(ee);var Jt=A(qt,ee);pt(Jt);var ce=(Rt^ut>=0?-1:1)*it(Jt[2]);(St>ce||St===ce&&(ee[0]||ee[1]))&&(Me+=Rt^ut>=0?1:-1)}}return(me<-f||mef}).map(I)).concat(o.range(D(me/Qe)*Qe,qt,Qe).filter(function(N){return w(N%He)>f}).map(Y))}return O.lines=function(){return W().map(function(N){return{type:"LineString",coordinates:N}})},O.outline=function(){return{type:"Polygon",coordinates:[et(St).concat(nt(Me).slice(1),et(Ot).reverse().slice(1),nt(Be).reverse().slice(1))]}},O.extent=function(N){return arguments.length?O.extentMajor(N).extentMinor(N):O.extentMinor()},O.extentMajor=function(N){return arguments.length?(St=+N[0][0],Ot=+N[1][0],Be=+N[0][1],Me=+N[1][1],St>Ot&&(N=St,St=Ot,Ot=N),Be>Me&&(N=Be,Be=Me,Me=N),O.precision(E)):[[St,Be],[Ot,Me]]},O.extentMinor=function(N){return arguments.length?(tt=+N[0][0],G=+N[1][0],me=+N[0][1],qt=+N[1][1],tt>G&&(N=tt,tt=G,G=N),me>qt&&(N=me,me=qt,qt=N),O.precision(E)):[[tt,me],[G,qt]]},O.step=function(N){return arguments.length?O.stepMajor(N).stepMinor(N):O.stepMinor()},O.stepMajor=function(N){return arguments.length?(Ee=+N[0],He=+N[1],O):[Ee,He]},O.stepMinor=function(N){return arguments.length?(Ye=+N[0],Qe=+N[1],O):[Ye,Qe]},O.precision=function(N){return arguments.length?(E=+N,I=br(me,qt,90),Y=$r(tt,G,E),et=br(Be,Me,90),nt=$r(St,Ot,E),O):E},O.extentMajor([[-180,-90+f],[180,90-f]]).extentMinor([[-180,-80-f],[180,80+f]])}function zn(){return _r()()}var tr=function(G,tt){var Ot=G[0]*y,St=G[1]*y,qt=tt[0]*y,me=tt[1]*y,Me=_(St),Be=j(St),Ye=_(me),Qe=j(me),Ee=Me*_(Ot),He=Me*j(Ot),I=Ye*_(qt),Y=Ye*j(qt),et=2*it(st(Pt(me-St)+Me*Ye*Pt(qt-Ot))),nt=j(et),E=et?function(O){var W=j(O*=et)/nt,N=j(et-O)/nt,q=N*Ee+W*I,wt=N*He+W*Y,ut=N*Be+W*Qe;return[M(wt,q)*m,M(ut,st(q*q+wt*wt))*m]}:function(){return[Ot*m,St*m]};return E.distance=et,E},Fr=function(G){return G},yi=s(),Nr=s(),ea,ga,fi,Di,Xr={point:ht,lineStart:ht,lineEnd:ht,polygonStart:function(){Xr.lineStart=lo,Xr.lineEnd=na},polygonEnd:function(){Xr.lineStart=Xr.lineEnd=Xr.point=ht,yi.add(w(Nr)),Nr.reset()},result:function(){var G=yi/2;return yi.reset(),G}};function lo(){Xr.point=Hi}function Hi(G,tt){Xr.point=Ur,ea=fi=G,ga=Di=tt}function Ur(G,tt){Nr.add(Di*G-fi*tt),fi=G,Di=tt}function na(){Ur(ea,ga)}var Or=1/0,ra=Or,Bi=-Or,xi=Bi,qr={point:Ha,lineStart:ht,lineEnd:ht,polygonStart:ht,polygonEnd:ht,result:function(){var G=[[Or,ra],[Bi,xi]];return Bi=xi=-(ra=Or=1/0),G}};function Ha(G,tt){GBi&&(Bi=G),ttxi&&(xi=tt)}var uo=0,Wi=0,Gi=0,wi=0,ia=0,Ei=0,Vi=0,$i=0,aa=0,Wa,Ri,Kr,Zr,Ir={point:ci,lineStart:Ao,lineEnd:ii,polygonStart:function(){Ir.lineStart=pa,Ir.lineEnd=Fi},polygonEnd:function(){Ir.point=ci,Ir.lineStart=Ao,Ir.lineEnd=ii},result:function(){var G=aa?[Vi/aa,$i/aa]:Ei?[wi/Ei,ia/Ei]:Gi?[uo/Gi,Wi/Gi]:[NaN,NaN];return uo=Wi=Gi=wi=ia=Ei=Vi=$i=aa=0,G}};function ci(G,tt){uo+=G,Wi+=tt,++Gi}function Ao(){Ir.point=Mi}function Mi(G,tt){Ir.point=ri,ci(Kr=G,Zr=tt)}function ri(G,tt){var Ot=G-Kr,St=tt-Zr,qt=st(Ot*Ot+St*St);wi+=qt*(Kr+G)/2,ia+=qt*(Zr+tt)/2,Ei+=qt,ci(Kr=G,Zr=tt)}function ii(){Ir.point=ci}function pa(){Ir.point=Xi}function Fi(){hi(Wa,Ri)}function Xi(G,tt){Ir.point=hi,ci(Wa=Kr=G,Ri=Zr=tt)}function hi(G,tt){var Ot=G-Kr,St=tt-Zr,qt=st(Ot*Ot+St*St);wi+=qt*(Kr+G)/2,ia+=qt*(Zr+tt)/2,Ei+=qt,qt=Zr*G-Kr*tt,Vi+=qt*(Kr+G),$i+=qt*(Zr+tt),aa+=qt*3,ci(Kr=G,Zr=tt)}function ai(G){this._context=G}ai.prototype={_radius:4.5,pointRadius:function(G){return this._radius=G,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(G,tt){switch(this._point){case 0:{this._context.moveTo(G,tt),this._point=1;break}case 1:{this._context.lineTo(G,tt);break}default:{this._context.moveTo(G+this._radius,tt),this._context.arc(G,tt,this._radius,0,p);break}}},result:ht};var Ga=s(),fo,Vo,$o,ma,Va,oa={point:ht,lineStart:function(){oa.point=vs},lineEnd:function(){fo&&co(Vo,$o),oa.point=ht},polygonStart:function(){fo=!0},polygonEnd:function(){fo=null},result:function(){var G=+Ga;return Ga.reset(),G}};function vs(G,tt){oa.point=co,Vo=ma=G,$o=Va=tt}function co(G,tt){ma-=G,Va-=tt,Ga.add(st(ma*ma+Va*Va)),ma=G,Va=tt}function ya(){this._string=[]}ya.prototype={_radius:4.5,_circle:Ui(4.5),pointRadius:function(G){return(G=+G)!==this._radius&&(this._radius=G,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(G,tt){switch(this._point){case 0:{this._string.push("M",G,",",tt),this._point=1;break}case 1:{this._string.push("L",G,",",tt);break}default:{this._circle==null&&(this._circle=Ui(this._radius)),this._string.push("M",G,",",tt,this._circle);break}}},result:function(){if(this._string.length){var G=this._string.join("");return this._string=[],G}else return null}};function Ui(G){return"m0,"+G+"a"+G+","+G+" 0 1,1 0,"+-2*G+"a"+G+","+G+" 0 1,1 0,"+2*G+"z"}var ho=function(G,tt){var Ot=4.5,St,qt;function me(Me){return Me&&(typeof Ot=="function"&&qt.pointRadius(+Ot.apply(this,arguments)),Qt(Me,St(qt))),qt.result()}return me.area=function(Me){return Qt(Me,St(Xr)),Xr.result()},me.measure=function(Me){return Qt(Me,St(oa)),oa.result()},me.bounds=function(Me){return Qt(Me,St(qr)),qr.result()},me.centroid=function(Me){return Qt(Me,St(Ir)),Ir.result()},me.projection=function(Me){return arguments.length?(St=Me==null?(G=null,Fr):(G=Me).stream,me):G},me.context=function(Me){return arguments.length?(qt=Me==null?(tt=null,new ya):new ai(tt=Me),typeof Ot!="function"&&qt.pointRadius(Ot),me):tt},me.pointRadius=function(Me){return arguments.length?(Ot=typeof Me=="function"?Me:(qt.pointRadius(+Me),+Me),me):Ot},me.projection(G).context(tt)},Oo=function(G,tt,Ot,St){return function(qt,me){var Me=tt(me),Be=qt.invert(St[0],St[1]),Ye=Li(),Qe=tt(Ye),Ee=!1,He,I,Y,et={point:nt,lineStart:O,lineEnd:W,polygonStart:function(){et.point=N,et.lineStart=q,et.lineEnd=wt,I=[],He=[]},polygonEnd:function(){et.point=nt,et.lineStart=O,et.lineEnd=W,I=o.merge(I);var ut=Xt(He,Be);I.length?(Ee||(me.polygonStart(),Ee=!0),va(I,xa,ut,Ot,me)):ut&&(Ee||(me.polygonStart(),Ee=!0),me.lineStart(),Ot(null,null,1,me),me.lineEnd()),Ee&&(me.polygonEnd(),Ee=!1),I=He=null},sphere:function(){me.polygonStart(),me.lineStart(),Ot(null,null,1,me),me.lineEnd(),me.polygonEnd()}};function nt(ut,Et){var Mt=qt(ut,Et);G(ut=Mt[0],Et=Mt[1])&&me.point(ut,Et)}function E(ut,Et){var Mt=qt(ut,Et);Me.point(Mt[0],Mt[1])}function O(){et.point=E,Me.lineStart()}function W(){et.point=nt,Me.lineEnd()}function N(ut,Et){Y.push([ut,Et]);var Mt=qt(ut,Et);Qe.point(Mt[0],Mt[1])}function q(){Qe.lineStart(),Y=[]}function wt(){N(Y[0][0],Y[0][1]),Qe.lineEnd();var ut=Qe.clean(),Et=Ye.result(),Mt,Rt=Et.length,jt,ee,Jt;if(Y.pop(),He.push(Y),Y=null,!!Rt){if(ut&1){if(ee=Et[0],(jt=ee.length-1)>0){for(Ee||(me.polygonStart(),Ee=!0),me.lineStart(),Mt=0;Mt1&&ut&2&&Et.push(Et.pop().concat(Et.shift())),I.push(Et.filter(vo))}}return et}};function vo(G){return G.length>1}function xa(G,tt){return((G=G.x)[0]<0?G[1]-v-f:v-G[1])-((tt=tt.x)[0]<0?tt[1]-v-f:v-tt[1])}var sa=Oo(function(){return!0},gs,go,[-d,-v]);function gs(G){var tt=NaN,Ot=NaN,St=NaN,qt;return{lineStart:function(){G.lineStart(),qt=1},point:function(me,Me){var Be=me>0?d:-d,Ye=w(me-tt);w(Ye-d)0?v:-v),G.point(St,Ot),G.lineEnd(),G.lineStart(),G.point(Be,Ot),G.point(me,Ot),qt=0):St!==Be&&Ye>=d&&(w(tt-St)f?x((j(tt)*(me=_(St))*j(Ot)-j(St)*(qt=_(tt))*j(G))/(qt*me*Me)):(tt+St)/2}function go(G,tt,Ot,St){var qt;if(G==null)qt=Ot*v,St.point(-d,qt),St.point(0,qt),St.point(d,qt),St.point(d,0),St.point(d,-qt),St.point(0,-qt),St.point(-d,-qt),St.point(-d,0),St.point(-d,qt);else if(w(G[0]-tt[0])>f){var me=G[0]0,qt=w(Ot)>f;function me(Ee,He,I,Y){gi(Y,G,tt,I,Ee,He)}function Me(Ee,He){return _(Ee)*_(He)>Ot}function Be(Ee){var He,I,Y,et,nt;return{lineStart:function(){et=Y=!1,nt=1},point:function(E,O){var W=[E,O],N,q=Me(E,O),wt=St?q?0:Qe(E,O):q?Qe(E+(E<0?d:-d),O):0;if(!He&&(et=Y=q)&&Ee.lineStart(),q!==Y&&(N=Ye(He,W),(!N||ni(He,N)||ni(W,N))&&(W[0]+=f,W[1]+=f,q=Me(W[0],W[1]))),q!==Y)nt=0,q?(Ee.lineStart(),N=Ye(W,He),Ee.point(N[0],N[1])):(N=Ye(He,W),Ee.point(N[0],N[1]),Ee.lineEnd()),He=N;else if(qt&&He&&St^q){var ut;!(wt&I)&&(ut=Ye(W,He,!0))&&(nt=0,St?(Ee.lineStart(),Ee.point(ut[0][0],ut[0][1]),Ee.point(ut[1][0],ut[1][1]),Ee.lineEnd()):(Ee.point(ut[1][0],ut[1][1]),Ee.lineEnd(),Ee.lineStart(),Ee.point(ut[0][0],ut[0][1])))}q&&(!He||!ni(He,W))&&Ee.point(W[0],W[1]),He=W,Y=q,I=wt},lineEnd:function(){Y&&Ee.lineEnd(),He=null},clean:function(){return nt|(et&&Y)<<1}}}function Ye(Ee,He,I){var Y=S(Ee),et=S(He),nt=[1,0,0],E=A(Y,et),O=B(E,E),W=E[0],N=O-W*W;if(!N)return!I&&Ee;var q=Ot*O/N,wt=-Ot*W/N,ut=A(nt,E),Et=J(nt,q),Mt=J(E,wt);z(Et,Mt);var Rt=ut,jt=B(Et,Rt),ee=B(Rt,Rt),Jt=jt*jt-ee*(B(Et,Et)-1);if(!(Jt<0)){var ce=st(Jt),te=J(Rt,(-jt-ce)/ee);if(z(te,Et),te=mt(te),!I)return te;var le=Ee[0],ve=He[0],Re=Ee[1],$e=He[1],De;ve0^te[1]<(w(te[0]-le)d^(le<=te[0]&&te[0]<=ve)){var yn=J(Rt,(-jt+ce)/ee);return z(yn,Et),[te,mt(yn)]}}}function Qe(Ee,He){var I=St?G:d-G,Y=0;return Ee<-I?Y|=1:Ee>I&&(Y|=2),He<-I?Y|=4:He>I&&(Y|=8),Y}return Oo(Me,Be,me,St?[0,-G]:[-d,G-d])},ps=function(G){return{stream:$a(G)}};function $a(G){return function(tt){var Ot=new bi;for(var St in G)Ot[St]=G[St];return Ot.stream=tt,Ot}}function bi(){}bi.prototype={constructor:bi,point:function(G,tt){this.stream.point(G,tt)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Ki(G,tt,Ot){var St=tt[1][0]-tt[0][0],qt=tt[1][1]-tt[0][1],me=G.clipExtent&&G.clipExtent();G.scale(150).translate([0,0]),me!=null&&G.clipExtent(null),Qt(Ot,G.stream(qr));var Me=qr.result(),Be=Math.min(St/(Me[1][0]-Me[0][0]),qt/(Me[1][1]-Me[0][1])),Ye=+tt[0][0]+(St-Be*(Me[1][0]+Me[0][0]))/2,Qe=+tt[0][1]+(qt-Be*(Me[1][1]+Me[0][1]))/2;return me!=null&&G.clipExtent(me),G.scale(Be*150).translate([Ye,Qe])}function Xa(G,tt,Ot){return Ki(G,[[0,0],tt],Ot)}var wa=16,ms=_(30*y),Io=function(G,tt){return+tt?jo(G,tt):ys(G)};function ys(G){return $a({point:function(tt,Ot){tt=G(tt,Ot),this.stream.point(tt[0],tt[1])}})}function jo(G,tt){function Ot(St,qt,me,Me,Be,Ye,Qe,Ee,He,I,Y,et,nt,E){var O=Qe-St,W=Ee-qt,N=O*O+W*W;if(N>4*tt&&nt--){var q=Me+I,wt=Be+Y,ut=Ye+et,Et=st(q*q+wt*wt+ut*ut),Mt=it(ut/=Et),Rt=w(w(ut)-1)tt||w((O*ce+W*te)/N-.5)>.3||Me*I+Be*Y+Ye*et2?te[2]%360*y:0,Jt()):[Qe*m,Ee*m,He*m]},Rt.precision=function(te){return arguments.length?(ut=Io(ee,wt=te*te),ce()):st(wt)},Rt.fitExtent=function(te,le){return Ki(Rt,te,le)},Rt.fitSize=function(te,le){return Xa(Rt,te,le)};function Jt(){Y=en(I=Qn(Qe,Ee,He),tt);var te=tt(Be,Ye);return me=St-te[0]*Ot,Me=qt+te[1]*Ot,ce()}function ce(){return Et=Mt=null,Rt}return function(){return tt=G.apply(this,arguments),Rt.invert=tt.invert&&jt,Jt()}}function Ua(G){var tt=0,Ot=d/3,St=xs(G),qt=St(tt,Ot);return qt.parallels=function(me){return arguments.length?St(tt=me[0]*y,Ot=me[1]*y):[tt*m,Ot*m]},qt}function Ni(G){var tt=_(G);function Ot(St,qt){return[St*tt,j(qt)/tt]}return Ot.invert=function(St,qt){return[St/tt,it(qt*tt)]},Ot}function ki(G,tt){var Ot=j(G),St=(Ot+j(tt))/2;if(w(St)=.12&&E<.234&&nt>=-.425&&nt<-.214?qt:E>=.166&&E<.234&&nt>=-.214&&nt<-.115?Me:Ot).invert(I)},Ee.stream=function(I){return G&&tt===I?G:G=_i([Ot.stream(tt=I),qt.stream(I),Me.stream(I)])},Ee.precision=function(I){return arguments.length?(Ot.precision(I),qt.precision(I),Me.precision(I),He()):Ot.precision()},Ee.scale=function(I){return arguments.length?(Ot.scale(I),qt.scale(I*.35),Me.scale(I),Ee.translate(Ot.translate())):Ot.scale()},Ee.translate=function(I){if(!arguments.length)return Ot.translate();var Y=Ot.scale(),et=+I[0],nt=+I[1];return St=Ot.translate(I).clipExtent([[et-.455*Y,nt-.238*Y],[et+.455*Y,nt+.238*Y]]).stream(Qe),me=qt.translate([et-.307*Y,nt+.201*Y]).clipExtent([[et-.425*Y+f,nt+.12*Y+f],[et-.214*Y-f,nt+.234*Y-f]]).stream(Qe),Be=Me.translate([et-.205*Y,nt+.212*Y]).clipExtent([[et-.214*Y+f,nt+.166*Y+f],[et-.115*Y-f,nt+.234*Y-f]]).stream(Qe),He()},Ee.fitExtent=function(I,Y){return Ki(Ee,I,Y)},Ee.fitSize=function(I,Y){return Xa(Ee,I,Y)};function He(){return G=tt=null,Ee}return Ee.scale(1070)};function Ea(G){return function(tt,Ot){var St=_(tt),qt=_(Ot),me=G(St*qt);return[me*qt*j(tt),me*j(Ot)]}}function Lo(G){return function(tt,Ot){var St=st(tt*tt+Ot*Ot),qt=G(St),me=j(qt),Me=_(qt);return[M(tt*me,St*Me),it(St&&Ot*me/St)]}}var Do=Ea(function(G){return st(2/(1+G))});Do.invert=Lo(function(G){return 2*it(G/2)});var yo=function(){return Zi(Do).scale(124.75).clipAngle(180-.001)},Ma=Ea(function(G){return(G=Q(G))&&G/j(G)});Ma.invert=Lo(function(G){return G});var Es=function(){return Zi(Ma).scale(79.4188).clipAngle(180-.001)};function Ka(G,tt){return[G,F(yt((v+tt)/2))]}Ka.invert=function(G,tt){return[G,2*x(C(tt))-v]};var Ko=function(){return Za(Ka).scale(961/p)};function Za(G){var tt=Zi(G),Ot=tt.center,St=tt.scale,qt=tt.translate,me=tt.clipExtent,Me=null,Be,Ye,Qe;tt.scale=function(He){return arguments.length?(St(He),Ee()):St()},tt.translate=function(He){return arguments.length?(qt(He),Ee()):qt()},tt.center=function(He){return arguments.length?(Ot(He),Ee()):Ot()},tt.clipExtent=function(He){return arguments.length?(He==null?Me=Be=Ye=Qe=null:(Me=+He[0][0],Be=+He[0][1],Ye=+He[1][0],Qe=+He[1][1]),Ee()):Me==null?null:[[Me,Be],[Ye,Qe]]};function Ee(){var He=d*St(),I=tt(Jr(tt.rotate()).invert([0,0]));return me(Me==null?[[I[0]-He,I[1]-He],[I[0]+He,I[1]+He]]:G===Ka?[[Math.max(I[0]-He,Me),Be],[Math.min(I[0]+He,Ye),Qe]]:[[Me,Math.max(I[1]-He,Be)],[Ye,Math.min(I[1]+He,Qe)]])}return Ee()}function Si(G){return yt((v+G)/2)}function Bo(G,tt){var Ot=_(G),St=G===tt?j(G):F(Ot/_(tt))/F(Si(tt)/Si(G)),qt=Ot*k(Si(G),St)/St;if(!St)return Ka;function me(Me,Be){qt>0?Be<-v+f&&(Be=-v+f):Be>v-f&&(Be=v-f);var Ye=qt/k(Si(Be),St);return[Ye*j(St*Me),qt-Ye*_(St*Me)]}return me.invert=function(Me,Be){var Ye=qt-Be,Qe=V(St)*st(Me*Me+Ye*Ye);return[M(Me,w(Ye))/St*V(Ye),2*x(k(qt/Qe,1/St))-v]},me}var Zo=function(){return Ua(Bo).scale(109.5).parallels([30,30])};function ba(G,tt){return[G,tt]}ba.invert=ba;var xo=function(){return Zi(ba).scale(152.63)};function Fs(G,tt){var Ot=_(G),St=G===tt?j(G):(Ot-_(tt))/(tt-G),qt=Ot/St+G;if(w(St)2?St[2]+90:90]):(St=Ot(),[St[0],St[1],St[2]-90])},Ot([0,0,90]).scale(159.155)};r.geoArea=Z,r.geoBounds=Br,r.geoCentroid=ze,r.geoCircle=ha,r.geoClipExtent=$,r.geoContains=Ar,r.geoDistance=Jn,r.geoGraticule=_r,r.geoGraticule10=zn,r.geoInterpolate=tr,r.geoLength=On,r.geoPath=ho,r.geoAlbers=ws,r.geoAlbersUsa=mo,r.geoAzimuthalEqualArea=yo,r.geoAzimuthalEqualAreaRaw=Do,r.geoAzimuthalEquidistant=Es,r.geoAzimuthalEquidistantRaw=Ma,r.geoConicConformal=Zo,r.geoConicConformalRaw=Bo,r.geoConicEqualArea=po,r.geoConicEqualAreaRaw=ki,r.geoConicEquidistant=Qa,r.geoConicEquidistantRaw=Fs,r.geoEquirectangular=xo,r.geoEquirectangularRaw=ba,r.geoGnomonic=Ro,r.geoGnomonicRaw=wo,r.geoIdentity=kr,r.geoProjection=Zi,r.geoProjectionMutator=xs,r.geoMercator=Ko,r.geoMercatorRaw=Ka,r.geoOrthographic=Ja,r.geoOrthographicRaw=_a,r.geoStereographic=Qi,r.geoStereographicRaw=la,r.geoTransverseMercator=Sa,r.geoTransverseMercatorRaw=qa,r.geoRotation=Jr,r.geoStream=Qt,r.geoTransform=ps,Object.defineProperty(r,"__esModule",{value:!0})})},"./node_modules/_d3-geo@2.0.1@d3-geo/dist/d3-geo.js":function(t,e,n){(function(r,o){o(e,n("./node_modules/_d3-array@2.11.0@d3-array/dist/d3-array.js"))})(this,function(r,o){var s=1e-6,l=1e-12,u=Math.PI,c=u/2,f=u/4,h=u*2,d=180/u,v=u/180,g=Math.abs,p=Math.atan,m=Math.atan2,y=Math.cos,w=Math.ceil,x=Math.exp,M=Math.hypot,_=Math.log,D=Math.pow,C=Math.sin,F=Math.sign||function(I){return I>0?1:I<0?-1:0},k=Math.sqrt,j=Math.tan;function V(I){return I>1?0:I<-1?u:Math.acos(I)}function st(I){return I>1?c:I<-1?-c:Math.asin(I)}function yt(I){return(I=C(I/2))*I}function Q(){}function it(I,Y){I&&ht.hasOwnProperty(I.type)&&ht[I.type](I,Y)}var Pt={Feature:function(I,Y){it(I.geometry,Y)},FeatureCollection:function(I,Y){for(var et=I.features,nt=-1,E=et.length;++nt=0?1:-1,E=nt*et,O=y(Y),W=C(Y),N=Fe*W,q=Ue*O+N*y(E),wt=N*nt*C(E);Gt.add(m(wt,q)),_e=I,Ue=O,Fe=W}function ot(I){return Bt=new o.Adder,xt(I,ft),Bt*2}function at(I){return[m(I[1],I[0]),st(I[2])]}function dt(I){var Y=I[0],et=I[1],nt=y(et);return[nt*y(Y),nt*C(Y),C(et)]}function Z(I,Y){return I[0]*Y[0]+I[1]*Y[1]+I[2]*Y[2]}function mt(I,Y){return[I[1]*Y[2]-I[2]*Y[1],I[2]*Y[0]-I[0]*Y[2],I[0]*Y[1]-I[1]*Y[0]]}function S(I,Y){I[0]+=Y[0],I[1]+=Y[1],I[2]+=Y[2]}function B(I,Y){return[I[0]*Y,I[1]*Y,I[2]*Y]}function A(I){var Y=k(I[0]*I[0]+I[1]*I[1]+I[2]*I[2]);I[0]/=Y,I[1]/=Y,I[2]/=Y}var z,J,pt,It,Zt,Lt,Yt,Se,Ke,fn,on,mn={point:Sn,lineStart:bn,lineEnd:An,polygonStart:function(){mn.point=Dn,mn.lineStart=Ht,mn.lineEnd=kt,Ke=new o.Adder,ft.polygonStart()},polygonEnd:function(){ft.polygonEnd(),mn.point=Sn,mn.lineStart=bn,mn.lineEnd=An,Gt<0?(z=-(pt=180),J=-(It=90)):Ke>s?It=90:Ke<-s&&(J=-90),on[0]=z,on[1]=pt},sphere:function(){z=-(pt=180),J=-(It=90)}};function Sn(I,Y){fn.push(on=[z=I,pt=I]),YIt&&(It=Y)}function xn(I,Y){var et=dt([I*v,Y*v]);if(Se){var nt=mt(Se,et),E=[nt[1],-nt[0],0],O=mt(E,nt);A(O),O=at(O);var W=I-Zt,N=W>0?1:-1,q=O[0]*d*N,wt,ut=g(W)>180;ut^(N*ZtIt&&(It=wt)):(q=(q+360)%360-180,ut^(N*ZtIt&&(It=Y))),ut?Ioe(z,pt)&&(pt=I):oe(I,pt)>oe(z,pt)&&(z=I):pt>=z?(Ipt&&(pt=I)):I>Zt?oe(z,I)>oe(z,pt)&&(pt=I):oe(I,pt)>oe(z,pt)&&(z=I)}else fn.push(on=[z=I,pt=I]);YIt&&(It=Y),Se=et,Zt=I}function bn(){mn.point=xn}function An(){on[0]=z,on[1]=pt,mn.point=Sn,Se=null}function Dn(I,Y){if(Se){var et=I-Zt;Ke.add(g(et)>180?et+(et>0?360:-360):et)}else Lt=I,Yt=Y;ft.point(I,Y),xn(I,Y)}function Ht(){ft.lineStart()}function kt(){Dn(Lt,Yt),ft.lineEnd(),g(Ke)>s&&(z=-(pt=180)),on[0]=z,on[1]=pt,Se=null}function oe(I,Y){return(Y-=I)<0?Y+360:Y}function fe(I,Y){return I[0]-Y[0]}function Ve(I,Y){return I[0]<=I[1]?I[0]<=Y&&Y<=I[1]:Yoe(nt[0],nt[1])&&(nt[1]=E[1]),oe(E[0],nt[1])>oe(nt[0],nt[1])&&(nt[0]=E[0])):O.push(nt=E);for(W=-1/0,et=O.length-1,Y=0,nt=O[et];Y<=et;nt=E,++Y)E=O[Y],(N=oe(nt[1],E[0]))>W&&(W=N,z=E[0],pt=nt[1])}return fn=on=null,z===1/0||J===1/0?[[NaN,NaN],[NaN,NaN]]:[[z,J],[pt,It]]}var Pr,pr,Br,sr,Ft,zt,ie,ue,be,Ae,Ze,un,an,Ce,nn,vn,ye={sphere:Q,point:dn,lineStart:vt,lineEnd:Ut,polygonStart:function(){ye.lineStart=Vt,ye.lineEnd=se},polygonEnd:function(){ye.lineStart=vt,ye.lineEnd=Ut}};function dn(I,Y){I*=v,Y*=v;var et=y(Y);gn(et*y(I),et*C(I),C(Y))}function gn(I,Y,et){++Pr,Br+=(I-Br)/Pr,sr+=(Y-sr)/Pr,Ft+=(et-Ft)/Pr}function vt(){ye.point=Ct}function Ct(I,Y){I*=v,Y*=v;var et=y(Y);Ce=et*y(I),nn=et*C(I),vn=C(Y),ye.point=At,gn(Ce,nn,vn)}function At(I,Y){I*=v,Y*=v;var et=y(Y),nt=et*y(I),E=et*C(I),O=C(Y),W=m(k((W=nn*O-vn*E)*W+(W=vn*nt-Ce*O)*W+(W=Ce*E-nn*nt)*W),Ce*nt+nn*E+vn*O);pr+=W,zt+=W*(Ce+(Ce=nt)),ie+=W*(nn+(nn=E)),ue+=W*(vn+(vn=O)),gn(Ce,nn,vn)}function Ut(){ye.point=dn}function Vt(){ye.point=Wt}function se(){ne(un,an),ye.point=dn}function Wt(I,Y){un=I,an=Y,I*=v,Y*=v,ye.point=ne;var et=y(Y);Ce=et*y(I),nn=et*C(I),vn=C(Y),gn(Ce,nn,vn)}function ne(I,Y){I*=v,Y*=v;var et=y(Y),nt=et*y(I),E=et*C(I),O=C(Y),W=nn*O-vn*E,N=vn*nt-Ce*O,q=Ce*E-nn*nt,wt=M(W,N,q),ut=st(wt),Et=wt&&-ut/wt;be.add(Et*W),Ae.add(Et*N),Ze.add(Et*q),pr+=ut,zt+=ut*(Ce+(Ce=nt)),ie+=ut*(nn+(nn=E)),ue+=ut*(vn+(vn=O)),gn(Ce,nn,vn)}function ae(I){Pr=pr=Br=sr=Ft=zt=ie=ue=0,be=new o.Adder,Ae=new o.Adder,Ze=new o.Adder,xt(I,ye);var Y=+be,et=+Ae,nt=+Ze,E=M(Y,et,nt);return Eu?I+Math.round(-I/h)*h:I,Y]}ze.invert=ze;function Te(I,Y,et){return(I%=h)?Y||et?Pe(wn(I),Qn(Y,et)):wn(I):Y||et?Qn(Y,et):ze}function en(I){return function(Y,et){return Y+=I,[Y>u?Y-h:Y<-u?Y+h:Y,et]}}function wn(I){var Y=en(I);return Y.invert=en(-I),Y}function Qn(I,Y){var et=y(I),nt=C(I),E=y(Y),O=C(Y);function W(N,q){var wt=y(q),ut=y(N)*wt,Et=C(N)*wt,Mt=C(q),Rt=Mt*et+ut*nt;return[m(Et*E-Rt*O,ut*et-Mt*nt),st(Rt*E+Et*O)]}return W.invert=function(N,q){var wt=y(q),ut=y(N)*wt,Et=C(N)*wt,Mt=C(q),Rt=Mt*E-Et*O;return[m(Et*E+Mt*O,ut*et+Rt*nt),st(Rt*et-ut*nt)]},W}function fr(I){I=Te(I[0]*v,I[1]*v,I.length>2?I[2]*v:0);function Y(et){return et=I(et[0]*v,et[1]*v),et[0]*=d,et[1]*=d,et}return Y.invert=function(et){return et=I.invert(et[0]*v,et[1]*v),et[0]*=d,et[1]*=d,et},Y}function cr(I,Y,et,nt,E,O){if(!!et){var W=y(Y),N=C(Y),q=nt*et;E==null?(E=Y+nt*h,O=Y-q/2):(E=xr(W,E),O=xr(W,O),(nt>0?EO)&&(E+=nt*h));for(var wt,ut=E;nt>0?ut>O:ut1&&I.push(I.pop().concat(I.shift()))},result:function(){var et=I;return I=[],Y=null,et}}}function pi(I,Y){return g(I[0]-Y[0])=0;--N)E.point((Et=ut[N])[0],Et[1]);else nt(Mt.x,Mt.p.x,-1,E);Mt=Mt.p}Mt=Mt.o,ut=Mt.z,Rt=!Rt}while(!Mt.v);E.lineEnd()}}}function za(I){if(!!(Y=I.length)){for(var Y,et=0,nt=I[0],E;++et=0?1:-1,En=rn*Xe,yn=En>u,kn=Jt*$e;if(q.add(m(kn*rn*C(En),ce*De+kn*y(En))),W+=yn?Xe+rn*h:Xe,yn^jt>=et^ve>=et){var In=mt(dt(Rt),dt(le));A(In);var Ln=mt(O,In);A(Ln);var Ge=(yn^Xe>=0?-1:1)*st(Ln[2]);(nt>Ge||nt===Ge&&(In[0]||In[1]))&&(N+=yn^Xe>=0?1:-1)}}return(W<-s||W0){for(q||(E.polygonStart(),q=!0),E.lineStart(),$e=0;$e1&&ve&2&&Re.push(Re.pop().concat(Re.shift())),ut.push(Re.filter(Ya))}}return Mt}}function Ya(I){return I.length>1}function Yi(I,Y){return((I=I.x)[0]<0?I[1]-c-s:c-I[1])-((Y=Y.x)[0]<0?Y[1]-c-s:c-Y[1])}var mi=va(function(){return!0},so,Tt,[-u,-c]);function so(I){var Y=NaN,et=NaN,nt=NaN,E;return{lineStart:function(){I.lineStart(),E=1},point:function(O,W){var N=O>0?u:-u,q=g(O-Y);g(q-u)0?c:-c),I.point(nt,et),I.lineEnd(),I.lineStart(),I.point(N,et),I.point(O,et),E=0):nt!==N&&q>=u&&(g(Y-nt)s?p((C(Y)*(O=y(nt))*C(et)-C(nt)*(E=y(Y))*C(I))/(E*O*W)):(Y+nt)/2}function Tt(I,Y,et,nt){var E;if(I==null)E=et*c,nt.point(-u,E),nt.point(0,E),nt.point(u,E),nt.point(u,0),nt.point(u,-E),nt.point(0,-E),nt.point(-u,-E),nt.point(-u,0),nt.point(-u,E);else if(g(I[0]-Y[0])>s){var O=I[0]0,E=g(Y)>s;function O(ut,Et,Mt,Rt){cr(Rt,I,et,Mt,ut,Et)}function W(ut,Et){return y(ut)*y(Et)>Y}function N(ut){var Et,Mt,Rt,jt,ee;return{lineStart:function(){jt=Rt=!1,ee=1},point:function(Jt,ce){var te=[Jt,ce],le,ve=W(Jt,ce),Re=nt?ve?0:wt(Jt,ce):ve?wt(Jt+(Jt<0?u:-u),ce):0;if(!Et&&(jt=Rt=ve)&&ut.lineStart(),ve!==Rt&&(le=q(Et,te),(!le||pi(Et,le)||pi(te,le))&&(te[2]=1)),ve!==Rt)ee=0,ve?(ut.lineStart(),le=q(te,Et),ut.point(le[0],le[1])):(le=q(Et,te),ut.point(le[0],le[1],2),ut.lineEnd()),Et=le;else if(E&&Et&&nt^ve){var $e;!(Re&Mt)&&($e=q(te,Et,!0))&&(ee=0,nt?(ut.lineStart(),ut.point($e[0][0],$e[0][1]),ut.point($e[1][0],$e[1][1]),ut.lineEnd()):(ut.point($e[1][0],$e[1][1]),ut.lineEnd(),ut.lineStart(),ut.point($e[0][0],$e[0][1],3)))}ve&&(!Et||!pi(Et,te))&&ut.point(te[0],te[1]),Et=te,Rt=ve,Mt=Re},lineEnd:function(){Rt&&ut.lineEnd(),Et=null},clean:function(){return ee|(jt&&Rt)<<1}}}function q(ut,Et,Mt){var Rt=dt(ut),jt=dt(Et),ee=[1,0,0],Jt=mt(Rt,jt),ce=Z(Jt,Jt),te=Jt[0],le=ce-te*te;if(!le)return!Mt&&ut;var ve=Y*ce/le,Re=-Y*te/le,$e=mt(ee,Jt),De=B(ee,ve),Xe=B(Jt,Re);S(De,Xe);var rn=$e,En=Z(De,rn),yn=Z(rn,rn),kn=En*En-yn*(Z(De,De)-1);if(!(kn<0)){var In=k(kn),Ln=B(rn,(-En-In)/yn);if(S(Ln,De),Ln=at(Ln),!Mt)return Ln;var Ge=ut[0],Bn=Et[0],qn=ut[1],Xn=Et[1],sn;Bn0^Ln[1]<(g(Ln[0]-Ge)u^(Ge<=Ln[0]&&Ln[0]<=Bn)){var zr=B(rn,(-En+In)/yn);return S(zr,De),[Ln,at(zr)]}}}function wt(ut,Et){var Mt=nt?I:u-I,Rt=0;return ut<-Mt?Rt|=1:ut>Mt&&(Rt|=2),Et<-Mt?Rt|=4:Et>Mt&&(Rt|=8),Rt}return va(W,N,O,nt?[0,-I]:[-u,I-u])}function de(I,Y,et,nt,E,O){var W=I[0],N=I[1],q=Y[0],wt=Y[1],ut=0,Et=1,Mt=q-W,Rt=wt-N,jt;if(jt=et-W,!(!Mt&&jt>0)){if(jt/=Mt,Mt<0){if(jt0){if(jt>Et)return;jt>ut&&(ut=jt)}if(jt=E-W,!(!Mt&&jt<0)){if(jt/=Mt,Mt<0){if(jt>Et)return;jt>ut&&(ut=jt)}else if(Mt>0){if(jt0)){if(jt/=Rt,Rt<0){if(jt0){if(jt>Et)return;jt>ut&&(ut=jt)}if(jt=O-N,!(!Rt&&jt<0)){if(jt/=Rt,Rt<0){if(jt>Et)return;jt>ut&&(ut=jt)}else if(Rt>0){if(jt0&&(I[0]=W+ut*Mt,I[1]=N+ut*Rt),Et<1&&(Y[0]=W+Et*Mt,Y[1]=N+Et*Rt),!0}}}}}var Oe=1e9,Le=-Oe;function We(I,Y,et,nt){function E(wt,ut){return I<=wt&&wt<=et&&Y<=ut&&ut<=nt}function O(wt,ut,Et,Mt){var Rt=0,jt=0;if(wt==null||(Rt=W(wt,Et))!==(jt=W(ut,Et))||q(wt,ut)<0^Et>0)do Mt.point(Rt===0||Rt===3?I:et,Rt>1?nt:Y);while((Rt=(Rt+Et+4)%4)!==jt);else Mt.point(ut[0],ut[1])}function W(wt,ut){return g(wt[0]-I)0?0:3:g(wt[0]-et)0?2:1:g(wt[1]-Y)0?1:0:ut>0?3:2}function N(wt,ut){return q(wt.x,ut.x)}function q(wt,ut){var Et=W(wt,1),Mt=W(ut,1);return Et!==Mt?Et-Mt:Et===0?ut[1]-wt[1]:Et===1?wt[0]-ut[0]:Et===2?wt[1]-ut[1]:ut[0]-wt[0]}return function(wt){var ut=wt,Et=gi(),Mt,Rt,jt,ee,Jt,ce,te,le,ve,Re,$e,De={point:Xe,lineStart:kn,lineEnd:In,polygonStart:En,polygonEnd:yn};function Xe(Ge,Bn){E(Ge,Bn)&&ut.point(Ge,Bn)}function rn(){for(var Ge=0,Bn=0,qn=Rt.length;Bnnt&&(Ca-Sr)*(nt-zr)>(Ci-zr)*(I-Sr)&&++Ge:Ci<=nt&&(Ca-Sr)*(nt-zr)<(Ci-zr)*(I-Sr)&&--Ge;return Ge}function En(){ut=Et,Mt=[],Rt=[],$e=!0}function yn(){var Ge=rn(),Bn=$e&&Ge,qn=(Mt=o.merge(Mt)).length;(Bn||qn)&&(wt.polygonStart(),Bn&&(wt.lineStart(),O(null,null,1,wt),wt.lineEnd()),qn&&Li(Mt,N,Ge,O,wt),wt.polygonEnd()),ut=wt,Mt=Rt=jt=null}function kn(){De.point=Ln,Rt&&Rt.push(jt=[]),Re=!0,ve=!1,te=le=NaN}function In(){Mt&&(Ln(ee,Jt),ce&&ve&&Et.rejoin(),Mt.push(Et.result())),De.point=Xe,ve&&ut.lineEnd()}function Ln(Ge,Bn){var qn=E(Ge,Bn);if(Rt&&jt.push([Ge,Bn]),Re)ee=Ge,Jt=Bn,ce=qn,Re=!1,qn&&(ut.lineStart(),ut.point(Ge,Bn));else if(qn&&ve)ut.point(Ge,Bn);else{var Xn=[te=Math.max(Le,Math.min(Oe,te)),le=Math.max(Le,Math.min(Oe,le))],sn=[Ge=Math.max(Le,Math.min(Oe,Ge)),Bn=Math.max(Le,Math.min(Oe,Bn))];de(Xn,sn,I,Y,et,nt)?(ve||(ut.lineStart(),ut.point(Xn[0],Xn[1])),ut.point(sn[0],sn[1]),qn||ut.lineEnd(),$e=!1):qn&&(ut.lineStart(),ut.point(Ge,Bn),$e=!1)}te=Ge,le=Bn,ve=qn}return De}}function xe(){var I=0,Y=0,et=960,nt=500,E,O,W;return W={stream:function(N){return E&&O===N?E:E=We(I,Y,et,nt)(O=N)},extent:function(N){return arguments.length?(I=+N[0][0],Y=+N[0][1],et=+N[1][0],nt=+N[1][1],E=O=null,W):[[I,Y],[et,nt]]}}}var Je,Mn,pn,Tn,On={sphere:Q,point:Q,lineStart:Kn,lineEnd:Q,polygonStart:Q,polygonEnd:Q};function Kn(){On.point=Jn,On.lineEnd=Gn}function Gn(){On.point=On.lineEnd=Q}function Jn(I,Y){I*=v,Y*=v,Mn=I,pn=C(Y),Tn=y(Y),On.point=Vn}function Vn(I,Y){I*=v,Y*=v;var et=C(Y),nt=y(Y),E=g(I-Mn),O=y(E),W=C(E),N=nt*W,q=Tn*et-pn*nt*O,wt=pn*et+Tn*nt*O;Je.add(m(k(N*N+q*q),wt)),Mn=I,pn=et,Tn=nt}function hr(I){return Je=new o.Adder,xt(I,On),+Je}var ar=[null,null],mr={type:"LineString",coordinates:ar};function dr(I,Y){return ar[0]=I,ar[1]=Y,hr(mr)}var Rr={Feature:function(I,Y){return Hr(I.geometry,Y)},FeatureCollection:function(I,Y){for(var et=I.features,nt=-1,E=et.length;++nt0&&(E=dr(I[O],I[O-1]),E>0&&et<=E&&nt<=E&&(et+nt-E)*(1-Math.pow((et-nt)/E,2))s}).map(Mt)).concat(o.range(w(O/wt)*wt,E,wt).filter(function(le){return g(le%Et)>s}).map(Rt))}return ce.lines=function(){return te().map(function(le){return{type:"LineString",coordinates:le}})},ce.outline=function(){return{type:"Polygon",coordinates:[jt(nt).concat(ee(W).slice(1),jt(et).reverse().slice(1),ee(N).reverse().slice(1))]}},ce.extent=function(le){return arguments.length?ce.extentMajor(le).extentMinor(le):ce.extentMinor()},ce.extentMajor=function(le){return arguments.length?(nt=+le[0][0],et=+le[1][0],N=+le[0][1],W=+le[1][1],nt>et&&(le=nt,nt=et,et=le),N>W&&(le=N,N=W,W=le),ce.precision(Jt)):[[nt,N],[et,W]]},ce.extentMinor=function(le){return arguments.length?(Y=+le[0][0],I=+le[1][0],O=+le[0][1],E=+le[1][1],Y>I&&(le=Y,Y=I,I=le),O>E&&(le=O,O=E,E=le),ce.precision(Jt)):[[Y,O],[I,E]]},ce.step=function(le){return arguments.length?ce.stepMajor(le).stepMinor(le):ce.stepMinor()},ce.stepMajor=function(le){return arguments.length?(ut=+le[0],Et=+le[1],ce):[ut,Et]},ce.stepMinor=function(le){return arguments.length?(q=+le[0],wt=+le[1],ce):[q,wt]},ce.precision=function(le){return arguments.length?(Jt=+le,Mt=Fr(O,E,90),Rt=yi(Y,I,Jt),jt=Fr(N,W,90),ee=yi(nt,et,Jt),ce):Jt},ce.extentMajor([[-180,-90+s],[180,90-s]]).extentMinor([[-180,-80-s],[180,80+s]])}function ea(){return Nr()()}function ga(I,Y){var et=I[0]*v,nt=I[1]*v,E=Y[0]*v,O=Y[1]*v,W=y(nt),N=C(nt),q=y(O),wt=C(O),ut=W*y(et),Et=W*C(et),Mt=q*y(E),Rt=q*C(E),jt=2*st(k(yt(O-nt)+W*q*yt(E-et))),ee=C(jt),Jt=jt?function(ce){var te=C(ce*=jt)/ee,le=C(jt-ce)/ee,ve=le*ut+te*Mt,Re=le*Et+te*Rt,$e=le*N+te*wt;return[m(Re,ve)*d,m($e,k(ve*ve+Re*Re))*d]}:function(){return[et*d,nt*d]};return Jt.distance=jt,Jt}var fi=function(I){return I},Di=new o.Adder,Xr=new o.Adder,lo,Hi,Ur,na,Or={point:Q,lineStart:Q,lineEnd:Q,polygonStart:function(){Or.lineStart=ra,Or.lineEnd=qr},polygonEnd:function(){Or.lineStart=Or.lineEnd=Or.point=Q,Di.add(g(Xr)),Xr=new o.Adder},result:function(){var I=Di/2;return Di=new o.Adder,I}};function ra(){Or.point=Bi}function Bi(I,Y){Or.point=xi,lo=Ur=I,Hi=na=Y}function xi(I,Y){Xr.add(na*I-Ur*Y),Ur=I,na=Y}function qr(){xi(lo,Hi)}var Ha=1/0,uo=Ha,Wi=-Ha,Gi=Wi,wi={point:ia,lineStart:Q,lineEnd:Q,polygonStart:Q,polygonEnd:Q,result:function(){var I=[[Ha,uo],[Wi,Gi]];return Wi=Gi=-(uo=Ha=1/0),I}};function ia(I,Y){IWi&&(Wi=I),YGi&&(Gi=Y)}var Ei=0,Vi=0,$i=0,aa=0,Wa=0,Ri=0,Kr=0,Zr=0,Ir=0,ci,Ao,Mi,ri,ii={point:pa,lineStart:Fi,lineEnd:ai,polygonStart:function(){ii.lineStart=Ga,ii.lineEnd=fo},polygonEnd:function(){ii.point=pa,ii.lineStart=Fi,ii.lineEnd=ai},result:function(){var I=Ir?[Kr/Ir,Zr/Ir]:Ri?[aa/Ri,Wa/Ri]:$i?[Ei/$i,Vi/$i]:[NaN,NaN];return Ei=Vi=$i=aa=Wa=Ri=Kr=Zr=Ir=0,I}};function pa(I,Y){Ei+=I,Vi+=Y,++$i}function Fi(){ii.point=Xi}function Xi(I,Y){ii.point=hi,pa(Mi=I,ri=Y)}function hi(I,Y){var et=I-Mi,nt=Y-ri,E=k(et*et+nt*nt);aa+=E*(Mi+I)/2,Wa+=E*(ri+Y)/2,Ri+=E,pa(Mi=I,ri=Y)}function ai(){ii.point=pa}function Ga(){ii.point=Vo}function fo(){$o(ci,Ao)}function Vo(I,Y){ii.point=$o,pa(ci=Mi=I,Ao=ri=Y)}function $o(I,Y){var et=I-Mi,nt=Y-ri,E=k(et*et+nt*nt);aa+=E*(Mi+I)/2,Wa+=E*(ri+Y)/2,Ri+=E,E=ri*I-Mi*Y,Kr+=E*(Mi+I),Zr+=E*(ri+Y),Ir+=E*3,pa(Mi=I,ri=Y)}function ma(I){this._context=I}ma.prototype={_radius:4.5,pointRadius:function(I){return this._radius=I,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(I,Y){switch(this._point){case 0:{this._context.moveTo(I,Y),this._point=1;break}case 1:{this._context.lineTo(I,Y);break}default:{this._context.moveTo(I+this._radius,Y),this._context.arc(I,Y,this._radius,0,h);break}}},result:Q};var Va=new o.Adder,oa,vs,co,ya,Ui,ho={point:Q,lineStart:function(){ho.point=Oo},lineEnd:function(){oa&&vo(vs,co),ho.point=Q},polygonStart:function(){oa=!0},polygonEnd:function(){oa=null},result:function(){var I=+Va;return Va=new o.Adder,I}};function Oo(I,Y){ho.point=vo,vs=ya=I,co=Ui=Y}function vo(I,Y){ya-=I,Ui-=Y,Va.add(k(ya*ya+Ui*Ui)),ya=I,Ui=Y}function xa(){this._string=[]}xa.prototype={_radius:4.5,_circle:sa(4.5),pointRadius:function(I){return(I=+I)!==this._radius&&(this._radius=I,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(I,Y){switch(this._point){case 0:{this._string.push("M",I,",",Y),this._point=1;break}case 1:{this._string.push("L",I,",",Y);break}default:{this._circle==null&&(this._circle=sa(this._radius)),this._string.push("M",I,",",Y,this._circle);break}}},result:function(){if(this._string.length){var I=this._string.join("");return this._string=[],I}else return null}};function sa(I){return"m0,"+I+"a"+I+","+I+" 0 1,1 0,"+-2*I+"a"+I+","+I+" 0 1,1 0,"+2*I+"z"}function gs(I,Y){var et=4.5,nt,E;function O(W){return W&&(typeof et=="function"&&E.pointRadius(+et.apply(this,arguments)),xt(W,nt(E))),E.result()}return O.area=function(W){return xt(W,nt(Or)),Or.result()},O.measure=function(W){return xt(W,nt(ho)),ho.result()},O.bounds=function(W){return xt(W,nt(wi)),wi.result()},O.centroid=function(W){return xt(W,nt(ii)),ii.result()},O.projection=function(W){return arguments.length?(nt=W==null?(I=null,fi):(I=W).stream,O):I},O.context=function(W){return arguments.length?(E=W==null?(Y=null,new xa):new ma(Y=W),typeof et!="function"&&E.pointRadius(et),O):Y},O.pointRadius=function(W){return arguments.length?(et=typeof W=="function"?W:(E.pointRadius(+W),+W),O):et},O.projection(I).context(Y)}function Xo(I){return{stream:go(I)}}function go(I){return function(Y){var et=new Uo;for(var nt in I)et[nt]=I[nt];return et.stream=Y,et}}function Uo(){}Uo.prototype={constructor:Uo,point:function(I,Y){this.stream.point(I,Y)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function ps(I,Y,et){var nt=I.clipExtent&&I.clipExtent();return I.scale(150).translate([0,0]),nt!=null&&I.clipExtent(null),xt(et,I.stream(wi)),Y(wi.result()),nt!=null&&I.clipExtent(nt),I}function $a(I,Y,et){return ps(I,function(nt){var E=Y[1][0]-Y[0][0],O=Y[1][1]-Y[0][1],W=Math.min(E/(nt[1][0]-nt[0][0]),O/(nt[1][1]-nt[0][1])),N=+Y[0][0]+(E-W*(nt[1][0]+nt[0][0]))/2,q=+Y[0][1]+(O-W*(nt[1][1]+nt[0][1]))/2;I.scale(150*W).translate([N,q])},et)}function bi(I,Y,et){return $a(I,[[0,0],Y],et)}function Ki(I,Y,et){return ps(I,function(nt){var E=+Y,O=E/(nt[1][0]-nt[0][0]),W=(E-O*(nt[1][0]+nt[0][0]))/2,N=-O*nt[0][1];I.scale(150*O).translate([W,N])},et)}function Xa(I,Y,et){return ps(I,function(nt){var E=+Y,O=E/(nt[1][1]-nt[0][1]),W=-O*nt[0][0],N=(E-O*(nt[1][1]+nt[0][1]))/2;I.scale(150*O).translate([W,N])},et)}var wa=16,ms=y(30*v);function Io(I,Y){return+Y?jo(I,Y):ys(I)}function ys(I){return go({point:function(Y,et){Y=I(Y,et),this.stream.point(Y[0],Y[1])}})}function jo(I,Y){function et(nt,E,O,W,N,q,wt,ut,Et,Mt,Rt,jt,ee,Jt){var ce=wt-nt,te=ut-E,le=ce*ce+te*te;if(le>4*Y&&ee--){var ve=W+Mt,Re=N+Rt,$e=q+jt,De=k(ve*ve+Re*Re+$e*$e),Xe=st($e/=De),rn=g(g($e)-1)Y||g((ce*In+te*Ln)/le-.5)>.3||W*Mt+N*Rt+q*jt2?Ge[2]%360*v:0,In()):[N*d,q*d,wt*d]},yn.angle=function(Ge){return arguments.length?(Et=Ge%360*v,In()):Et*d},yn.reflectX=function(Ge){return arguments.length?(Mt=Ge?-1:1,In()):Mt<0},yn.reflectY=function(Ge){return arguments.length?(Rt=Ge?-1:1,In()):Rt<0},yn.precision=function(Ge){return arguments.length?($e=Io(De,Re=Ge*Ge),Ln()):k(Re)},yn.fitExtent=function(Ge,Bn){return $a(yn,Ge,Bn)},yn.fitSize=function(Ge,Bn){return bi(yn,Ge,Bn)},yn.fitWidth=function(Ge,Bn){return Ki(yn,Ge,Bn)},yn.fitHeight=function(Ge,Bn){return Xa(yn,Ge,Bn)};function In(){var Ge=Ua(et,0,0,Mt,Rt,Et).apply(null,Y(O,W)),Bn=Ua(et,nt-Ge[0],E-Ge[1],Mt,Rt,Et);return ut=Te(N,q,wt),De=Pe(Y,Bn),Xe=Pe(ut,De),$e=Io(De,Re),Ln()}function Ln(){return rn=En=null,yn}return function(){return Y=I.apply(this,arguments),yn.invert=Y.invert&&kn,In()}}function po(I){var Y=0,et=u/3,nt=ki(I),E=nt(Y,et);return E.parallels=function(O){return arguments.length?nt(Y=O[0]*v,et=O[1]*v):[Y*d,et*d]},E}function ws(I){var Y=y(I);function et(nt,E){return[nt*Y,C(E)/Y]}return et.invert=function(nt,E){return[nt/Y,st(E*Y)]},et}function _i(I,Y){var et=C(I),nt=(et+C(Y))/2;if(g(nt)=.12&&Jt<.234&&ee>=-.425&&ee<-.214?E:Jt>=.166&&Jt<.234&&ee>=-.214&&ee<-.115?W:et).invert(Mt)},ut.stream=function(Mt){return I&&Y===Mt?I:I=Lo([et.stream(Y=Mt),E.stream(Mt),W.stream(Mt)])},ut.precision=function(Mt){return arguments.length?(et.precision(Mt),E.precision(Mt),W.precision(Mt),Et()):et.precision()},ut.scale=function(Mt){return arguments.length?(et.scale(Mt),E.scale(Mt*.35),W.scale(Mt),ut.translate(et.translate())):et.scale()},ut.translate=function(Mt){if(!arguments.length)return et.translate();var Rt=et.scale(),jt=+Mt[0],ee=+Mt[1];return nt=et.translate(Mt).clipExtent([[jt-.455*Rt,ee-.238*Rt],[jt+.455*Rt,ee+.238*Rt]]).stream(wt),O=E.translate([jt-.307*Rt,ee+.201*Rt]).clipExtent([[jt-.425*Rt+s,ee+.12*Rt+s],[jt-.214*Rt-s,ee+.234*Rt-s]]).stream(wt),N=W.translate([jt-.205*Rt,ee+.212*Rt]).clipExtent([[jt-.214*Rt+s,ee+.166*Rt+s],[jt-.115*Rt-s,ee+.234*Rt-s]]).stream(wt),Et()},ut.fitExtent=function(Mt,Rt){return $a(ut,Mt,Rt)},ut.fitSize=function(Mt,Rt){return bi(ut,Mt,Rt)},ut.fitWidth=function(Mt,Rt){return Ki(ut,Mt,Rt)},ut.fitHeight=function(Mt,Rt){return Xa(ut,Mt,Rt)};function Et(){return I=Y=null,ut}return ut.scale(1070)}function yo(I){return function(Y,et){var nt=y(Y),E=y(et),O=I(nt*E);return O===1/0?[2,0]:[O*E*C(Y),O*C(et)]}}function Ma(I){return function(Y,et){var nt=k(Y*Y+et*et),E=I(nt),O=C(E),W=y(E);return[m(Y*O,nt*W),st(nt&&et*O/nt)]}}var Es=yo(function(I){return k(2/(1+I))});Es.invert=Ma(function(I){return 2*st(I/2)});function Ka(){return Ni(Es).scale(124.75).clipAngle(180-.001)}var Ko=yo(function(I){return(I=V(I))&&I/C(I)});Ko.invert=Ma(function(I){return I});function Za(){return Ni(Ko).scale(79.4188).clipAngle(180-.001)}function Si(I,Y){return[I,_(j((c+Y)/2))]}Si.invert=function(I,Y){return[I,2*p(x(Y))-c]};function Bo(){return Zo(Si).scale(961/h)}function Zo(I){var Y=Ni(I),et=Y.center,nt=Y.scale,E=Y.translate,O=Y.clipExtent,W=null,N,q,wt;Y.scale=function(Et){return arguments.length?(nt(Et),ut()):nt()},Y.translate=function(Et){return arguments.length?(E(Et),ut()):E()},Y.center=function(Et){return arguments.length?(et(Et),ut()):et()},Y.clipExtent=function(Et){return arguments.length?(Et==null?W=N=q=wt=null:(W=+Et[0][0],N=+Et[0][1],q=+Et[1][0],wt=+Et[1][1]),ut()):W==null?null:[[W,N],[q,wt]]};function ut(){var Et=u*nt(),Mt=Y(fr(Y.rotate()).invert([0,0]));return O(W==null?[[Mt[0]-Et,Mt[1]-Et],[Mt[0]+Et,Mt[1]+Et]]:I===Si?[[Math.max(Mt[0]-Et,W),N],[Math.min(Mt[0]+Et,q),wt]]:[[W,Math.max(Mt[1]-Et,N)],[q,Math.min(Mt[1]+Et,wt)]])}return ut()}function ba(I){return j((c+I)/2)}function xo(I,Y){var et=y(I),nt=I===Y?C(I):_(et/y(Y))/_(ba(Y)/ba(I)),E=et*D(ba(I),nt)/nt;if(!nt)return Si;function O(W,N){E>0?N<-c+s&&(N=-c+s):N>c-s&&(N=c-s);var q=E/D(ba(N),nt);return[q*C(nt*W),E-q*y(nt*W)]}return O.invert=function(W,N){var q=E-N,wt=F(nt)*k(W*W+q*q),ut=m(W,g(q))*F(q);return q*nt<0&&(ut-=u*F(W)*F(q)),[ut/nt,2*p(D(E/wt,1/nt))-c]},O}function Fs(){return po(xo).scale(109.5).parallels([30,30])}function Qa(I,Y){return[I,Y]}Qa.invert=Qa;function wo(){return Ni(Qa).scale(152.63)}function Ro(I,Y){var et=y(I),nt=I===Y?C(I):(et-y(Y))/(Y-I),E=et/nt+I;if(g(nt)s&&--nt>0);return[I/(.8707+(O=et*et)*(-.131979+O*(-.013791+O*O*O*(.003971-.001529*O)))),et]};function me(){return Ni(qt).scale(175.295)}function Me(I,Y){return[y(Y)*C(I),C(Y)]}Me.invert=Ma(st);function Be(){return Ni(Me).scale(249.5).clipAngle(90+s)}function Ye(I,Y){var et=y(Y),nt=1+y(I)*et;return[et*C(I)/nt,C(Y)/nt]}Ye.invert=Ma(function(I){return 2*p(I)});function Qe(){return Ni(Ye).scale(250).clipAngle(142)}function Ee(I,Y){return[_(j((c+Y)/2)),-I]}Ee.invert=function(I,Y){return[-Y,2*p(x(I))-c]};function He(){var I=Zo(Ee),Y=I.center,et=I.rotate;return I.center=function(nt){return arguments.length?Y([-nt[1],nt[0]]):(nt=Y(),[nt[1],-nt[0]])},I.rotate=function(nt){return arguments.length?et([nt[0],nt[1],nt.length>2?nt[2]+90:90]):(nt=et(),[nt[0],nt[1],nt[2]-90])},et([0,0,90]).scale(159.155)}r.geoAlbers=Ea,r.geoAlbersUsa=Do,r.geoArea=ot,r.geoAzimuthalEqualArea=Ka,r.geoAzimuthalEqualAreaRaw=Es,r.geoAzimuthalEquidistant=Za,r.geoAzimuthalEquidistantRaw=Ko,r.geoBounds=Fn,r.geoCentroid=ae,r.geoCircle=Jr,r.geoClipAntimeridian=mi,r.geoClipCircle=Xt,r.geoClipExtent=xe,r.geoClipRectangle=We,r.geoConicConformal=Fs,r.geoConicConformalRaw=xo,r.geoConicEqualArea=mo,r.geoConicEqualAreaRaw=_i,r.geoConicEquidistant=jr,r.geoConicEquidistantRaw=Ro,r.geoContains=tr,r.geoDistance=dr,r.geoEqualEarth=G,r.geoEqualEarthRaw=Sa,r.geoEquirectangular=wo,r.geoEquirectangularRaw=Qa,r.geoGnomonic=Ot,r.geoGnomonicRaw=tt,r.geoGraticule=Nr,r.geoGraticule10=ea,r.geoIdentity=St,r.geoInterpolate=ga,r.geoLength=hr,r.geoMercator=Bo,r.geoMercatorRaw=Si,r.geoNaturalEarth1=me,r.geoNaturalEarth1Raw=qt,r.geoOrthographic=Be,r.geoOrthographicRaw=Me,r.geoPath=gs,r.geoProjection=Ni,r.geoProjectionMutator=ki,r.geoRotation=fr,r.geoStereographic=Qe,r.geoStereographicRaw=Ye,r.geoStream=xt,r.geoTransform=Xo,r.geoTransverseMercator=He,r.geoTransverseMercatorRaw=Ee,Object.defineProperty(r,"__esModule",{value:!0})})},"./node_modules/_d3-hexjson@1.1.1@d3-hexjson/build/d3-hexjson.js":function(t,e,n){(function(r,o){o(e,n("./node_modules/_d3-array@1.2.4@d3-array/dist/d3-array.js"))})(this,function(r,o){function s(g,p,m){var y=g.layout,w=[],x=0;Object.keys(g.hexes).forEach(function(yt){g.hexes[yt].key=yt,w.push(g.hexes[yt])});var M=o.max(w,function(yt){return+yt.q}),_=o.min(w,function(yt){return+yt.q}),D=o.max(w,function(yt){return+yt.r}),C=o.min(w,function(yt){return+yt.r}),F=M-_+1,k=D-C+1;y==="odd-r"||y==="even-r"?x=o.min([p/((F+.5)*Math.sqrt(3)),m/((k+1/3)*1.5)]):x=o.min([m/((k+.5)*Math.sqrt(3)),p/((F+1/3)*1.5)]);var j=x*Math.sqrt(3),V=c(y,j,x),st=f(V);return w.forEach(function(yt){yt.qc=yt.q-_,yt.rc=D-yt.r,yt.x=l(yt,y,j,x),yt.y=u(yt,y,j,x),yt.vertices=V,yt.points=st}),w}function l(g,p,m,y){var w=0,x=0;switch(p){case"odd-r":x=g.rc%2===1?m:m/2,w=g.qc*m+x;break;case"even-r":x=g.rc%2===0?m:m/2,w=g.qc*m+x;break;case"odd-q":case"even-q":w=g.qc*y*1.5+y;break}return w}function u(g,p,m,y){var w=0,x=0;switch(p){case"odd-r":case"even-r":w=g.rc*y*1.5+y;break;case"odd-q":x=g.qc%2===1?m:m/2,w=g.rc*m+x;break;case"even-q":x=g.qc%2===0?m:m/2,w=g.rc*m+x;break}return w}function c(g,p,m){var y=[];switch(g){case"odd-r":case"even-r":y.push({x:0,y:0-m}),y.push({x:0+p*.5,y:0-.5*m}),y.push({x:0+p*.5,y:0+.5*m}),y.push({x:0,y:0+m}),y.push({x:0-p*.5,y:0+.5*m}),y.push({x:0-p*.5,y:0-.5*m});break;case"odd-q":case"even-q":y.push({x:0-m,y:0}),y.push({x:0-.5*m,y:0-p*.5}),y.push({x:0+.5*m,y:0-p*.5}),y.push({x:0+m,y:0}),y.push({x:0+.5*m,y:0+p*.5}),y.push({x:0-.5*m,y:0+p*.5});break}return y}function f(g){var p="";return g.forEach(function(m){p+=m.x+","+m.y+" "}),p.substring(0,p.length-1)}function h(g){var p={};p.layout=g.layout,p.hexes={};var m=[];Object.keys(g.hexes).forEach(function(F){m.push(g.hexes[F])});var y=o.max(m,function(F){return+F.q}),w=o.min(m,function(F){return+F.q}),x=o.max(m,function(F){return+F.r}),M=o.min(m,function(F){return+F.r}),_,D,C;for(_=w;_<=y;_++)for(D=M;D<=x;D++)C="Q"+_+"R"+D,p.hexes[C]={q:_,r:D};return p}function d(g,p,m,y){var w=[],x=g.layout;Object.keys(g.hexes).forEach(function(Bt){w.push(g.hexes[Bt])});var M=o.max(w,function(Bt){return+Bt.q}),_=o.min(w,function(Bt){return+Bt.q}),D=o.max(w,function(Bt){return+Bt.r}),C=o.min(w,function(Bt){return+Bt.r}),F=M-_+1,k=D-C+1,j;x==="odd-r"||x==="even-r"?j=o.min([p/((F+.5)*Math.sqrt(3)),m/((k+1/3)*1.5)]):j=o.min([m/((k+.5)*Math.sqrt(3)),p/((F+1/3)*1.5)]);var V=j*Math.sqrt(3),st=[],yt=j*j*4,Q=w.length;if(Q>1){w.forEach(function(Bt){Bt.qc=Bt.q-_,Bt.rc=D-Bt.r,Bt.x=l(Bt,x,V,j),Bt.y=u(Bt,x,V,j)});for(var it=0;it1){w.forEach(function(Qt){Qt.qc=Qt.q-_,Qt.rc=D-Qt.r,Qt.x=l(Qt,x,V,j),Qt.y=u(Qt,x,V,j)});for(var it=0;it=0;)zt+=ie[ue].value;Ft.value=zt}function g(){return this.eachAfter(v)}function p(Ft){var zt=this,ie,ue=[zt],be,Ae,Ze;do for(ie=ue.reverse(),ue=[];zt=ie.pop();)if(Ft(zt),be=zt.children,be)for(Ae=0,Ze=be.length;Ae=0;--be)ie.push(ue[be]);return this}function y(Ft){for(var zt=this,ie=[zt],ue=[],be,Ae,Ze;zt=ie.pop();)if(ue.push(zt),be=zt.children,be)for(Ae=0,Ze=be.length;Ae=0;)ie+=ue[be].value;zt.value=ie})}function x(Ft){return this.eachBefore(function(zt){zt.children&&zt.children.sort(Ft)})}function M(Ft){for(var zt=this,ie=_(zt,Ft),ue=[zt];zt!==ie;)zt=zt.parent,ue.push(zt);for(var be=ue.length;Ft!==ie;)ue.splice(be,0,Ft),Ft=Ft.parent;return ue}function _(Ft,zt){if(Ft===zt)return Ft;var ie=Ft.ancestors(),ue=zt.ancestors(),be=null;for(Ft=ie.pop(),zt=ue.pop();Ft===zt;)be=Ft,Ft=ie.pop(),zt=ue.pop();return be}function D(){for(var Ft=this,zt=[Ft];Ft=Ft.parent;)zt.push(Ft);return zt}function C(){var Ft=[];return this.each(function(zt){Ft.push(zt)}),Ft}function F(){var Ft=[];return this.eachBefore(function(zt){zt.children||Ft.push(zt)}),Ft}function k(){var Ft=this,zt=[];return Ft.each(function(ie){ie!==Ft&&zt.push({source:ie.parent,target:ie})}),zt}function j(Ft,zt){var ie=new it(Ft),ue=+Ft.value&&(ie.value=Ft.value),be,Ae=[ie],Ze,un,an,Ce;for(zt==null&&(zt=st);be=Ae.pop();)if(ue&&(be.value=+be.data.value),(un=zt(be.data))&&(Ce=un.length))for(be.children=new Array(Ce),an=Ce-1;an>=0;--an)Ae.push(Ze=be.children[an]=new it(un[an])),Ze.parent=be,Ze.depth=be.depth+1;return ie.eachBefore(Q)}function V(){return j(this).eachBefore(yt)}function st(Ft){return Ft.children}function yt(Ft){Ft.data=Ft.data.data}function Q(Ft){var zt=0;do Ft.height=zt;while((Ft=Ft.parent)&&Ft.height<++zt)}function it(Ft){this.data=Ft,this.depth=this.height=0,this.parent=null}it.prototype=j.prototype={constructor:it,count:g,each:p,eachAfter:y,eachBefore:m,sum:w,sort:x,path:M,ancestors:D,descendants:C,leaves:F,links:k,copy:V};var Pt=Array.prototype.slice;function ht(Ft){for(var zt=Ft.length,ie,ue;zt;)ue=Math.random()*zt--|0,ie=Ft[zt],Ft[zt]=Ft[ue],Ft[ue]=ie;return Ft}function lt(Ft){for(var zt=0,ie=(Ft=ht(Pt.call(Ft))).length,ue=[],be,Ae;zt0&&ie*ie>ue*ue+be*be}function Bt(Ft,zt){for(var ie=0;iean?(be=(Ce+an-Ae)/(2*Ce),un=Math.sqrt(Math.max(0,an/Ce-be*be)),ie.x=Ft.x-be*ue-un*Ze,ie.y=Ft.y-be*Ze+un*ue):(be=(Ce+Ae-an)/(2*Ce),un=Math.sqrt(Math.max(0,Ae/Ce-be*be)),ie.x=zt.x+be*ue-un*Ze,ie.y=zt.y+be*Ze+un*ue)):(ie.x=zt.x+ie.r,ie.y=zt.y)}function ft(Ft,zt){var ie=Ft.r+zt.r-1e-6,ue=zt.x-Ft.x,be=zt.y-Ft.y;return ie>0&&ie*ie>ue*ue+be*be}function gt(Ft){var zt=Ft._,ie=Ft.next._,ue=zt.r+ie.r,be=(zt.x*ie.r+ie.x*zt.r)/ue,Ae=(zt.y*ie.r+ie.y*zt.r)/ue;return be*be+Ae*Ae}function P(Ft){this._=Ft,this.next=null,this.previous=null}function Kt(Ft){if(!(be=Ft.length))return 0;var zt,ie,ue,be,Ae,Ze,un,an,Ce,nn,vn;if(zt=Ft[0],zt.x=0,zt.y=0,!(be>1))return zt.r;if(ie=Ft[1],zt.x=-ie.r,ie.x=zt.r,ie.y=0,!(be>2))return zt.r+ie.r;Fe(ie,zt,ue=Ft[2]),zt=new P(zt),ie=new P(ie),ue=new P(ue),zt.next=ue.previous=ie,ie.next=zt.previous=ue,ue.next=ie.previous=zt;t:for(un=3;un0)throw new Error("cycle");return un}return ie.id=function(ue){return arguments.length?(Ft=at(ue),ie):Ft},ie.parentId=function(ue){return arguments.length?(zt=at(ue),ie):zt},ie}function on(Ft,zt){return Ft.parent===zt.parent?1:2}function mn(Ft){var zt=Ft.children;return zt?zt[0]:Ft.t}function Sn(Ft){var zt=Ft.children;return zt?zt[zt.length-1]:Ft.t}function xn(Ft,zt,ie){var ue=ie/(zt.i-Ft.i);zt.c-=ue,zt.s+=ie,Ft.c+=ue,zt.z+=ie,zt.m+=ie}function bn(Ft){for(var zt=0,ie=0,ue=Ft.children,be=ue.length,Ae;--be>=0;)Ae=ue[be],Ae.z+=zt,Ae.m+=zt,zt+=Ae.s+(ie+=Ae.c)}function An(Ft,zt,ie){return Ft.a.parent===zt.parent?Ft.a:ie}function Dn(Ft,zt){this._=Ft,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=zt}Dn.prototype=Object.create(it.prototype);function Ht(Ft){for(var zt=new Dn(Ft,0),ie,ue=[zt],be,Ae,Ze,un;ie=ue.pop();)if(Ae=ie._.children)for(ie.children=new Array(un=Ae.length),Ze=un-1;Ze>=0;--Ze)ue.push(be=ie.children[Ze]=new Dn(Ae[Ze],Ze)),be.parent=ie;return(zt.parent=new Dn(null,0)).children=[zt],zt}function kt(){var Ft=on,zt=1,ie=1,ue=null;function be(Ce){var nn=Ht(Ce);if(nn.eachAfter(Ae),nn.parent.m=-nn.z,nn.eachBefore(Ze),ue)Ce.eachBefore(an);else{var vn=Ce,ye=Ce,dn=Ce;Ce.eachBefore(function(Ut){Ut.xye.x&&(ye=Ut),Ut.depth>dn.depth&&(dn=Ut)});var gn=vn===ye?1:Ft(vn,ye)/2,vt=gn-vn.x,Ct=zt/(ye.x+gn+vt),At=ie/(dn.depth||1);Ce.eachBefore(function(Ut){Ut.x=(Ut.x+vt)*Ct,Ut.y=Ut.depth*At})}return Ce}function Ae(Ce){var nn=Ce.children,vn=Ce.parent.children,ye=Ce.i?vn[Ce.i-1]:null;if(nn){bn(Ce);var dn=(nn[0].z+nn[nn.length-1].z)/2;ye?(Ce.z=ye.z+Ft(Ce._,ye._),Ce.m=Ce.z-dn):Ce.z=dn}else ye&&(Ce.z=ye.z+Ft(Ce._,ye._));Ce.parent.A=un(Ce,ye,Ce.parent.A||vn[0])}function Ze(Ce){Ce._.x=Ce.z+Ce.parent.m,Ce.m+=Ce.parent.m}function un(Ce,nn,vn){if(nn){for(var ye=Ce,dn=Ce,gn=nn,vt=ye.parent.children[0],Ct=ye.m,At=dn.m,Ut=gn.m,Vt=vt.m,se;gn=Sn(gn),ye=mn(ye),gn&&ye;)vt=mn(vt),dn=Sn(dn),dn.a=Ce,se=gn.z+Ut-ye.z-Ct+Ft(gn._,ye._),se>0&&(xn(An(gn,Ce,vn),Ce,se),Ct+=se,At+=se),Ut+=gn.m,Ct+=ye.m,Vt+=vt.m,At+=dn.m;gn&&!Sn(dn)&&(dn.t=gn,dn.m+=Ut-At),ye&&!mn(vt)&&(vt.t=ye,vt.m+=Ct-Vt,vn=Ce)}return vn}function an(Ce){Ce.x*=zt,Ce.y=Ce.depth*ie}return be.separation=function(Ce){return arguments.length?(Ft=Ce,be):Ft},be.size=function(Ce){return arguments.length?(ue=!1,zt=+Ce[0],ie=+Ce[1],be):ue?null:[zt,ie]},be.nodeSize=function(Ce){return arguments.length?(ue=!0,zt=+Ce[0],ie=+Ce[1],be):ue?[zt,ie]:null},be}function oe(Ft,zt,ie,ue,be){for(var Ae=Ft.children,Ze,un=-1,an=Ae.length,Ce=Ft.value&&(be-ie)/Ft.value;++unUt&&(Ut=Ce),ne=Ct*Ct*Wt,Vt=Math.max(Ut/ne,ne/At),Vt>se){Ct-=Ce;break}se=Vt}Ze.push(an={value:Ct,dice:dn1?ue:1)},ie}(fe);function Pr(){var Ft=Fn,zt=!1,ie=1,ue=1,be=[0],Ae=dt,Ze=dt,un=dt,an=dt,Ce=dt;function nn(ye){return ye.x0=ye.y0=0,ye.x1=ie,ye.y1=ue,ye.eachBefore(vn),be=[0],zt&&ye.eachBefore(J),ye}function vn(ye){var dn=be[ye.depth],gn=ye.x0+dn,vt=ye.y0+dn,Ct=ye.x1-dn,At=ye.y1-dn;Ct=ye-1){var Ut=Ae[vn];Ut.x0=gn,Ut.y0=vt,Ut.x1=Ct,Ut.y1=At;return}for(var Vt=Ce[vn],se=dn/2+Vt,Wt=vn+1,ne=ye-1;Wt>>1;Ce[ae]At-vt){var ze=(gn*Pe+Ct*ge)/dn;nn(vn,Wt,ge,gn,vt,ze,At),nn(Wt,ye,Pe,ze,vt,Ct,At)}else{var Te=(vt*Pe+At*ge)/dn;nn(vn,Wt,ge,gn,vt,Ct,Te),nn(Wt,ye,Pe,gn,Te,Ct,At)}}}function Br(Ft,zt,ie,ue,be){(Ft.depth&1?oe:pt)(Ft,zt,ie,ue,be)}var sr=function Ft(zt){function ie(ue,be,Ae,Ze,un){if((an=ue._squarify)&&an.ratio===zt)for(var an,Ce,nn,vn,ye=-1,dn,gn=an.length,vt=ue.value;++ye1?ue:1)},ie}(fe);r.cluster=d,r.hierarchy=j,r.pack=S,r.packEnclose=lt,r.packSiblings=H,r.partition=It,r.stratify=fn,r.tree=kt,r.treemap=Pr,r.treemapBinary=pr,r.treemapDice=pt,r.treemapResquarify=sr,r.treemapSlice=oe,r.treemapSliceDice=Br,r.treemapSquarify=Fn,Object.defineProperty(r,"__esModule",{value:!0})})},"./node_modules/_d3-path@1.0.9@d3-path/dist/d3-path.js":function(t,e,n){(function(r,o){o(e)})(this,function(r){var o=Math.PI,s=2*o,l=1e-6,u=s-l;function c(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function f(){return new c}c.prototype=f.prototype={constructor:c,moveTo:function(h,d){this._+="M"+(this._x0=this._x1=+h)+","+(this._y0=this._y1=+d)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(h,d){this._+="L"+(this._x1=+h)+","+(this._y1=+d)},quadraticCurveTo:function(h,d,v,g){this._+="Q"+ +h+","+ +d+","+(this._x1=+v)+","+(this._y1=+g)},bezierCurveTo:function(h,d,v,g,p,m){this._+="C"+ +h+","+ +d+","+ +v+","+ +g+","+(this._x1=+p)+","+(this._y1=+m)},arcTo:function(h,d,v,g,p){h=+h,d=+d,v=+v,g=+g,p=+p;var m=this._x1,y=this._y1,w=v-h,x=g-d,M=m-h,_=y-d,D=M*M+_*_;if(p<0)throw new Error("negative radius: "+p);if(this._x1===null)this._+="M"+(this._x1=h)+","+(this._y1=d);else if(D>l)if(!(Math.abs(_*w-x*M)>l)||!p)this._+="L"+(this._x1=h)+","+(this._y1=d);else{var C=v-m,F=g-y,k=w*w+x*x,j=C*C+F*F,V=Math.sqrt(k),st=Math.sqrt(D),yt=p*Math.tan((o-Math.acos((k+D-j)/(2*V*st)))/2),Q=yt/st,it=yt/V;Math.abs(Q-1)>l&&(this._+="L"+(h+Q*M)+","+(d+Q*_)),this._+="A"+p+","+p+",0,0,"+ +(_*C>M*F)+","+(this._x1=h+it*w)+","+(this._y1=d+it*x)}},arc:function(h,d,v,g,p,m){h=+h,d=+d,v=+v,m=!!m;var y=v*Math.cos(g),w=v*Math.sin(g),x=h+y,M=d+w,_=1^m,D=m?g-p:p-g;if(v<0)throw new Error("negative radius: "+v);this._x1===null?this._+="M"+x+","+M:(Math.abs(this._x1-x)>l||Math.abs(this._y1-M)>l)&&(this._+="L"+x+","+M),v&&(D<0&&(D=D%s+s),D>u?this._+="A"+v+","+v+",0,1,"+_+","+(h-y)+","+(d-w)+"A"+v+","+v+",0,1,"+_+","+(this._x1=x)+","+(this._y1=M):D>l&&(this._+="A"+v+","+v+",0,"+ +(D>=o)+","+_+","+(this._x1=h+v*Math.cos(p))+","+(this._y1=d+v*Math.sin(p))))},rect:function(h,d,v,g){this._+="M"+(this._x0=this._x1=+h)+","+(this._y0=this._y1=+d)+"h"+ +v+"v"+ +g+"h"+-v+"Z"},toString:function(){return this._}},r.path=f,Object.defineProperty(r,"__esModule",{value:!0})})},"./node_modules/_d3-path@2.0.0@d3-path/dist/d3-path.js":function(t,e,n){(function(r,o){o(e)})(this,function(r){var o=Math.PI,s=2*o,l=1e-6,u=s-l;function c(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function f(){return new c}c.prototype=f.prototype={constructor:c,moveTo:function(h,d){this._+="M"+(this._x0=this._x1=+h)+","+(this._y0=this._y1=+d)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(h,d){this._+="L"+(this._x1=+h)+","+(this._y1=+d)},quadraticCurveTo:function(h,d,v,g){this._+="Q"+ +h+","+ +d+","+(this._x1=+v)+","+(this._y1=+g)},bezierCurveTo:function(h,d,v,g,p,m){this._+="C"+ +h+","+ +d+","+ +v+","+ +g+","+(this._x1=+p)+","+(this._y1=+m)},arcTo:function(h,d,v,g,p){h=+h,d=+d,v=+v,g=+g,p=+p;var m=this._x1,y=this._y1,w=v-h,x=g-d,M=m-h,_=y-d,D=M*M+_*_;if(p<0)throw new Error("negative radius: "+p);if(this._x1===null)this._+="M"+(this._x1=h)+","+(this._y1=d);else if(D>l)if(!(Math.abs(_*w-x*M)>l)||!p)this._+="L"+(this._x1=h)+","+(this._y1=d);else{var C=v-m,F=g-y,k=w*w+x*x,j=C*C+F*F,V=Math.sqrt(k),st=Math.sqrt(D),yt=p*Math.tan((o-Math.acos((k+D-j)/(2*V*st)))/2),Q=yt/st,it=yt/V;Math.abs(Q-1)>l&&(this._+="L"+(h+Q*M)+","+(d+Q*_)),this._+="A"+p+","+p+",0,0,"+ +(_*C>M*F)+","+(this._x1=h+it*w)+","+(this._y1=d+it*x)}},arc:function(h,d,v,g,p,m){h=+h,d=+d,v=+v,m=!!m;var y=v*Math.cos(g),w=v*Math.sin(g),x=h+y,M=d+w,_=1^m,D=m?g-p:p-g;if(v<0)throw new Error("negative radius: "+v);this._x1===null?this._+="M"+x+","+M:(Math.abs(this._x1-x)>l||Math.abs(this._y1-M)>l)&&(this._+="L"+x+","+M),v&&(D<0&&(D=D%s+s),D>u?this._+="A"+v+","+v+",0,1,"+_+","+(h-y)+","+(d-w)+"A"+v+","+v+",0,1,"+_+","+(this._x1=x)+","+(this._y1=M):D>l&&(this._+="A"+v+","+v+",0,"+ +(D>=o)+","+_+","+(this._x1=h+v*Math.cos(p))+","+(this._y1=d+v*Math.sin(p))))},rect:function(h,d,v,g){this._+="M"+(this._x0=this._x1=+h)+","+(this._y0=this._y1=+d)+"h"+ +v+"v"+ +g+"h"+-v+"Z"},toString:function(){return this._}},r.path=f,Object.defineProperty(r,"__esModule",{value:!0})})},"./node_modules/_d3-sankey@0.9.1@d3-sankey/dist/d3-sankey.js":function(t,e,n){var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js");(function(o,s){s(e,n("./node_modules/_d3-array@1.2.4@d3-array/dist/d3-array.js"),n("./node_modules/_d3-collection@1.0.7@d3-collection/dist/d3-collection.js"),n("./node_modules/_d3-shape@1.3.7@d3-shape/dist/d3-shape.js"))})(this,function(o,s,l,u){function c(V){return V.target.depth}function f(V){return V.depth}function h(V,st){return st-1-V.height}function d(V,st){return V.sourceLinks.length?V.depth:st-1}function v(V){return V.targetLinks.length?V.depth:V.sourceLinks.length?s.min(V.sourceLinks,c)-1:0}function g(V){return function(){return V}}function p(V,st){return y(V.source,st.source)||V.index-st.index}function m(V,st){return y(V.target,st.target)||V.index-st.index}function y(V,st){return V.y0-st.y0}function w(V){return V.value}function x(V){return V.index}function M(V){return V.nodes}function _(V){return V.links}function D(V,st){var yt=V.get(st);if(!yt)throw new Error("missing: "+st);return yt}function C(){var V=0,st=0,yt=1,Q=1,it=24,Pt=8,ht=x,lt=d,U,xt=M,Gt=_,Bt=6;function Qt(){var gt={nodes:xt.apply(null,arguments),links:Gt.apply(null,arguments)};return Ie(gt),_e(gt),Ue(gt),Fe(gt),ft(gt),gt}Qt.update=function(gt){return ft(gt),gt},Qt.nodeId=function(gt){return arguments.length?(ht=typeof gt=="function"?gt:g(gt),Qt):ht},Qt.nodeAlign=function(gt){return arguments.length?(lt=typeof gt=="function"?gt:g(gt),Qt):lt},Qt.nodeSort=function(gt){return arguments.length?(U=gt,Qt):U},Qt.nodeWidth=function(gt){return arguments.length?(it=+gt,Qt):it},Qt.nodePadding=function(gt){return arguments.length?(Pt=+gt,Qt):Pt},Qt.nodes=function(gt){return arguments.length?(xt=typeof gt=="function"?gt:g(gt),Qt):xt},Qt.links=function(gt){return arguments.length?(Gt=typeof gt=="function"?gt:g(gt),Qt):Gt},Qt.size=function(gt){return arguments.length?(V=st=0,yt=+gt[0],Q=+gt[1],Qt):[yt-V,Q-st]},Qt.extent=function(gt){return arguments.length?(V=+gt[0][0],yt=+gt[1][0],st=+gt[0][1],Q=+gt[1][1],Qt):[[V,st],[yt,Q]]},Qt.iterations=function(gt){return arguments.length?(Bt=+gt,Qt):Bt};function Ie(gt){gt.nodes.forEach(function(Kt,H){Kt.index=H,Kt.sourceLinks=[],Kt.targetLinks=[]});var P=l.map(gt.nodes,ht);gt.links.forEach(function(Kt,H){Kt.index=H;var ot=Kt.source,at=Kt.target;typeof ot!="object"&&(ot=Kt.source=D(P,ot)),typeof at!="object"&&(at=Kt.target=D(P,at)),ot.sourceLinks.push(Kt),at.targetLinks.push(Kt)})}function _e(gt){gt.nodes.forEach(function(P){P.value=Math.max(s.sum(P.sourceLinks,w),s.sum(P.targetLinks,w))})}function Ue(gt){var P,Kt,H,ot=gt.nodes.length;for(P=gt.nodes,Kt=[],H=0;P.length;++H,P=Kt,Kt=[]){if(H>ot)throw new Error("circular link");P.forEach(function(dt){dt.depth=H,dt.sourceLinks.forEach(function(Z){Kt.indexOf(Z.target)<0&&Kt.push(Z.target)})})}for(P=gt.nodes,Kt=[],H=0;P.length;++H,P=Kt,Kt=[]){if(H>ot)throw new Error("circular link");P.forEach(function(dt){dt.height=H,dt.targetLinks.forEach(function(Z){Kt.indexOf(Z.source)<0&&Kt.push(Z.source)})})}var at=(yt-V-it)/(H-1);gt.nodes.forEach(function(dt){dt.x1=(dt.x0=V+Math.max(0,Math.min(H-1,Math.floor(lt.call(null,dt,H))))*at)+it})}function Fe(gt){var P=l.nest().key(function(mt){return mt.x0}).sortKeys(s.ascending).entries(gt.nodes).map(function(mt){return mt.values});ot(),Z();for(var Kt=.9,H=Bt;H>0;--H,Kt*=.9)dt(Kt),Z(),at(Kt),Z();function ot(){var mt=s.min(P,function(S){return(Q-st-(S.length-1)*Pt)/s.sum(S,w)});P.forEach(function(S){U!=null&&S.sort(U),S.forEach(function(B,A){B.y1=(B.y0=A)+B.value*mt})}),gt.links.forEach(function(S){S.width=S.value*mt})}function at(mt){P.forEach(function(S){S.forEach(function(B){var A,z,J,pt,It=B.y0;try{for(var Zt=r.__values(B.sourceLinks.sort(m)),Lt=Zt.next();!Lt.done;Lt=Zt.next()){var Yt=Lt.value,Se=Yt.target,Ke=Yt.width,fn=Yt.value;if(fn>0){var on=0;try{for(var mn=(J=void 0,r.__values(Se.targetLinks)),Sn=mn.next();!Sn.done;Sn=mn.next()){var xn=Sn.value,bn=xn.source,An=xn.width;if(bn===B)break;on+=An+Pt/2}}catch(Dn){J={error:Dn}}finally{try{Sn&&!Sn.done&&(pt=mn.return)&&pt.call(mn)}finally{if(J)throw J.error}}on=(It-on-Se.y0)*mt*(fn/Math.min(B.value,Se.value)),Se.y0+=on,Se.y1+=on}It+=Ke+Pt/2}}catch(Dn){A={error:Dn}}finally{try{Lt&&!Lt.done&&(z=Zt.return)&&z.call(Zt)}finally{if(A)throw A.error}}})})}function dt(mt){P.slice().reverse().forEach(function(S){S.forEach(function(B){var A,z,J,pt,It=B.y0;try{for(var Zt=r.__values(B.targetLinks.sort(p)),Lt=Zt.next();!Lt.done;Lt=Zt.next()){var Yt=Lt.value,Se=Yt.source,Ke=Yt.width,fn=Yt.value;if(fn>0){var on=0;try{for(var mn=(J=void 0,r.__values(Se.sourceLinks)),Sn=mn.next();!Sn.done;Sn=mn.next()){var xn=Sn.value,bn=xn.target,An=xn.width;if(bn===B)break;on+=An+Pt/2}}catch(Dn){J={error:Dn}}finally{try{Sn&&!Sn.done&&(pt=mn.return)&&pt.call(mn)}finally{if(J)throw J.error}}on=(It-on-Se.y0)*mt*(fn/Math.min(B.value,Se.value)),Se.y0+=on,Se.y1+=on}It+=Ke+Pt/2}}catch(Dn){A={error:Dn}}finally{try{Lt&&!Lt.done&&(z=Zt.return)&&z.call(Zt)}finally{if(A)throw A.error}}})})}function Z(){P.forEach(function(mt){var S,B,A=st,z=mt.length,J;for(U===void 0&&mt.sort(y),J=0;J0&&(S.y0+=B,S.y1+=B),A=S.y1+Pt;if(B=A-Pt-Q,B>0)for(A=S.y0-=B,S.y1-=B,J=z-2;J>=0;--J)S=mt[J],B=S.y1+Pt-A,B>0&&(S.y0-=B,S.y1-=B),A=S.y0})}}function ft(gt){gt.nodes.forEach(function(P){P.sourceLinks.sort(m),P.targetLinks.sort(p)}),gt.nodes.forEach(function(P){var Kt=P.y0,H=Kt;P.sourceLinks.forEach(function(ot){ot.y0=Kt+ot.width/2,Kt+=ot.width}),P.targetLinks.forEach(function(ot){ot.y1=H+ot.width/2,H+=ot.width})})}return Qt}function F(V){return[V.source.x1,V.y0]}function k(V){return[V.target.x0,V.y1]}function j(){return u.linkHorizontal().source(F).target(k)}o.sankey=C,o.sankeyCenter=v,o.sankeyLeft=f,o.sankeyRight=h,o.sankeyJustify=d,o.sankeyLinkHorizontal=j,Object.defineProperty(o,"__esModule",{value:!0})})},"./node_modules/_d3-shape@1.3.7@d3-shape/dist/d3-shape.js":function(t,e,n){(function(r,o){o(e,n("./node_modules/_d3-path@1.0.9@d3-path/dist/d3-path.js"))})(this,function(r,o){function s($){return function(){return $}}var l=Math.abs,u=Math.atan2,c=Math.cos,f=Math.max,h=Math.min,d=Math.sin,v=Math.sqrt,g=1e-12,p=Math.PI,m=p/2,y=2*p;function w($){return $>1?0:$<-1?p:Math.acos($)}function x($){return $>=1?m:$<=-1?-m:Math.asin($)}function M($){return $.innerRadius}function _($){return $.outerRadius}function D($){return $.startAngle}function C($){return $.endAngle}function F($){return $&&$.padAngle}function k($,Tt,Xt,de,Oe,Le,We,xe){var Je=Xt-$,Mn=de-Tt,pn=We-Oe,Tn=xe-Le,On=Tn*Je-pn*Mn;if(!(On*OnFr*Fr+yi*yi&&(Ar=$r,br=_r),{cx:Ar,cy:br,x01:-pn,y01:-Tn,x11:Ar*(Oe/Rr-1),y11:br*(Oe/Rr-1)}}function V(){var $=M,Tt=_,Xt=s(0),de=null,Oe=D,Le=C,We=F,xe=null;function Je(){var Mn,pn,Tn=+$.apply(this,arguments),On=+Tt.apply(this,arguments),Kn=Oe.apply(this,arguments)-m,Gn=Le.apply(this,arguments)-m,Jn=l(Gn-Kn),Vn=Gn>Kn;if(xe||(xe=Mn=o.path()),Ong))xe.moveTo(0,0);else if(Jn>y-g)xe.moveTo(On*c(Kn),On*d(Kn)),xe.arc(0,0,On,Kn,Gn,!Vn),Tn>g&&(xe.moveTo(Tn*c(Gn),Tn*d(Gn)),xe.arc(0,0,Tn,Gn,Kn,Vn));else{var hr=Kn,ar=Gn,mr=Kn,dr=Gn,Rr=Jn,Tr=Jn,Hr=We.apply(this,arguments)/2,Ar=Hr>g&&(de?+de.apply(this,arguments):v(Tn*Tn+On*On)),br=h(l(On-Tn)/2,+Xt.apply(this,arguments)),$r=br,_r=br,zn,tr;if(Ar>g){var Fr=x(Ar/Tn*d(Hr)),yi=x(Ar/On*d(Hr));(Rr-=Fr*2)>g?(Fr*=Vn?1:-1,mr+=Fr,dr-=Fr):(Rr=0,mr=dr=(Kn+Gn)/2),(Tr-=yi*2)>g?(yi*=Vn?1:-1,hr+=yi,ar-=yi):(Tr=0,hr=ar=(Kn+Gn)/2)}var Nr=On*c(hr),ea=On*d(hr),ga=Tn*c(dr),fi=Tn*d(dr);if(br>g){var Di=On*c(ar),Xr=On*d(ar),lo=Tn*c(mr),Hi=Tn*d(mr),Ur;if(Jng?_r>g?(zn=j(lo,Hi,Nr,ea,On,_r,Vn),tr=j(Di,Xr,ga,fi,On,_r,Vn),xe.moveTo(zn.cx+zn.x01,zn.cy+zn.y01),_rg)||!(Rr>g)?xe.lineTo(ga,fi):$r>g?(zn=j(ga,fi,Di,Xr,Tn,-$r,Vn),tr=j(Nr,ea,lo,Hi,Tn,-$r,Vn),xe.lineTo(zn.cx+zn.x01,zn.cy+zn.y01),$r=On;--Kn)xe.point(ar[Kn],mr[Kn]);xe.lineEnd(),xe.areaEnd()}Vn&&(ar[Tn]=+$(Jn,Tn,pn),mr[Tn]=+Xt(Jn,Tn,pn),xe.point(Tt?+Tt(Jn,Tn,pn):ar[Tn],de?+de(Jn,Tn,pn):mr[Tn]))}if(hr)return xe=null,hr+""||null}function Mn(){return Pt().defined(Oe).curve(We).context(Le)}return Je.x=function(pn){return arguments.length?($=typeof pn=="function"?pn:s(+pn),Tt=null,Je):$},Je.x0=function(pn){return arguments.length?($=typeof pn=="function"?pn:s(+pn),Je):$},Je.x1=function(pn){return arguments.length?(Tt=pn==null?null:typeof pn=="function"?pn:s(+pn),Je):Tt},Je.y=function(pn){return arguments.length?(Xt=typeof pn=="function"?pn:s(+pn),de=null,Je):Xt},Je.y0=function(pn){return arguments.length?(Xt=typeof pn=="function"?pn:s(+pn),Je):Xt},Je.y1=function(pn){return arguments.length?(de=pn==null?null:typeof pn=="function"?pn:s(+pn),Je):de},Je.lineX0=Je.lineY0=function(){return Mn().x($).y(Xt)},Je.lineY1=function(){return Mn().x($).y(de)},Je.lineX1=function(){return Mn().x(Tt).y(Xt)},Je.defined=function(pn){return arguments.length?(Oe=typeof pn=="function"?pn:s(!!pn),Je):Oe},Je.curve=function(pn){return arguments.length?(We=pn,Le!=null&&(xe=We(Le)),Je):We},Je.context=function(pn){return arguments.length?(pn==null?Le=xe=null:xe=We(Le=pn),Je):Le},Je}function lt($,Tt){return Tt<$?-1:Tt>$?1:Tt>=$?0:NaN}function U($){return $}function xt(){var $=U,Tt=lt,Xt=null,de=s(0),Oe=s(y),Le=s(0);function We(xe){var Je,Mn=xe.length,pn,Tn,On=0,Kn=new Array(Mn),Gn=new Array(Mn),Jn=+de.apply(this,arguments),Vn=Math.min(y,Math.max(-y,Oe.apply(this,arguments)-Jn)),hr,ar=Math.min(Math.abs(Vn)/Mn,Le.apply(this,arguments)),mr=ar*(Vn<0?-1:1),dr;for(Je=0;Je0&&(On+=dr);for(Tt!=null?Kn.sort(function(Rr,Tr){return Tt(Gn[Rr],Gn[Tr])}):Xt!=null&&Kn.sort(function(Rr,Tr){return Xt(xe[Rr],xe[Tr])}),Je=0,Tn=On?(Vn-Mn*mr)/On:0;Je0?dr*Tn:0)+mr,Gn[pn]={data:xe[pn],index:Je,value:dr,startAngle:Jn,endAngle:hr,padAngle:ar};return Gn}return We.value=function(xe){return arguments.length?($=typeof xe=="function"?xe:s(+xe),We):$},We.sortValues=function(xe){return arguments.length?(Tt=xe,Xt=null,We):Tt},We.sort=function(xe){return arguments.length?(Xt=xe,Tt=null,We):Xt},We.startAngle=function(xe){return arguments.length?(de=typeof xe=="function"?xe:s(+xe),We):de},We.endAngle=function(xe){return arguments.length?(Oe=typeof xe=="function"?xe:s(+xe),We):Oe},We.padAngle=function(xe){return arguments.length?(Le=typeof xe=="function"?xe:s(+xe),We):Le},We}var Gt=Qt(yt);function Bt($){this._curve=$}Bt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function($,Tt){this._curve.point(Tt*Math.sin($),Tt*-Math.cos($))}};function Qt($){function Tt(Xt){return new Bt($(Xt))}return Tt._curve=$,Tt}function Ie($){var Tt=$.curve;return $.angle=$.x,delete $.x,$.radius=$.y,delete $.y,$.curve=function(Xt){return arguments.length?Tt(Qt(Xt)):Tt()._curve},$}function _e(){return Ie(Pt().curve(Gt))}function Ue(){var $=ht().curve(Gt),Tt=$.curve,Xt=$.lineX0,de=$.lineX1,Oe=$.lineY0,Le=$.lineY1;return $.angle=$.x,delete $.x,$.startAngle=$.x0,delete $.x0,$.endAngle=$.x1,delete $.x1,$.radius=$.y,delete $.y,$.innerRadius=$.y0,delete $.y0,$.outerRadius=$.y1,delete $.y1,$.lineStartAngle=function(){return Ie(Xt())},delete $.lineX0,$.lineEndAngle=function(){return Ie(de())},delete $.lineX1,$.lineInnerRadius=function(){return Ie(Oe())},delete $.lineY0,$.lineOuterRadius=function(){return Ie(Le())},delete $.lineY1,$.curve=function(We){return arguments.length?Tt(Qt(We)):Tt()._curve},$}function Fe($,Tt){return[(Tt=+Tt)*Math.cos($-=Math.PI/2),Tt*Math.sin($)]}var ft=Array.prototype.slice;function gt($){return $.source}function P($){return $.target}function Kt($){var Tt=gt,Xt=P,de=Q,Oe=it,Le=null;function We(){var xe,Je=ft.call(arguments),Mn=Tt.apply(this,Je),pn=Xt.apply(this,Je);if(Le||(Le=xe=o.path()),$(Le,+de.apply(this,(Je[0]=Mn,Je)),+Oe.apply(this,Je),+de.apply(this,(Je[0]=pn,Je)),+Oe.apply(this,Je)),xe)return Le=null,xe+""||null}return We.source=function(xe){return arguments.length?(Tt=xe,We):Tt},We.target=function(xe){return arguments.length?(Xt=xe,We):Xt},We.x=function(xe){return arguments.length?(de=typeof xe=="function"?xe:s(+xe),We):de},We.y=function(xe){return arguments.length?(Oe=typeof xe=="function"?xe:s(+xe),We):Oe},We.context=function(xe){return arguments.length?(Le=xe==null?null:xe,We):Le},We}function H($,Tt,Xt,de,Oe){$.moveTo(Tt,Xt),$.bezierCurveTo(Tt=(Tt+de)/2,Xt,Tt,Oe,de,Oe)}function ot($,Tt,Xt,de,Oe){$.moveTo(Tt,Xt),$.bezierCurveTo(Tt,Xt=(Xt+Oe)/2,de,Xt,de,Oe)}function at($,Tt,Xt,de,Oe){var Le=Fe(Tt,Xt),We=Fe(Tt,Xt=(Xt+Oe)/2),xe=Fe(de,Xt),Je=Fe(de,Oe);$.moveTo(Le[0],Le[1]),$.bezierCurveTo(We[0],We[1],xe[0],xe[1],Je[0],Je[1])}function dt(){return Kt(H)}function Z(){return Kt(ot)}function mt(){var $=Kt(at);return $.angle=$.x,delete $.x,$.radius=$.y,delete $.y,$}var S={draw:function($,Tt){var Xt=Math.sqrt(Tt/p);$.moveTo(Xt,0),$.arc(0,0,Xt,0,y)}},B={draw:function($,Tt){var Xt=Math.sqrt(Tt/5)/2;$.moveTo(-3*Xt,-Xt),$.lineTo(-Xt,-Xt),$.lineTo(-Xt,-3*Xt),$.lineTo(Xt,-3*Xt),$.lineTo(Xt,-Xt),$.lineTo(3*Xt,-Xt),$.lineTo(3*Xt,Xt),$.lineTo(Xt,Xt),$.lineTo(Xt,3*Xt),$.lineTo(-Xt,3*Xt),$.lineTo(-Xt,Xt),$.lineTo(-3*Xt,Xt),$.closePath()}},A=Math.sqrt(1/3),z=A*2,J={draw:function($,Tt){var Xt=Math.sqrt(Tt/z),de=Xt*A;$.moveTo(0,-Xt),$.lineTo(de,0),$.lineTo(0,Xt),$.lineTo(-de,0),$.closePath()}},pt=.8908130915292852,It=Math.sin(p/10)/Math.sin(7*p/10),Zt=Math.sin(y/10)*It,Lt=-Math.cos(y/10)*It,Yt={draw:function($,Tt){var Xt=Math.sqrt(Tt*pt),de=Zt*Xt,Oe=Lt*Xt;$.moveTo(0,-Xt),$.lineTo(de,Oe);for(var Le=1;Le<5;++Le){var We=y*Le/5,xe=Math.cos(We),Je=Math.sin(We);$.lineTo(Je*Xt,-xe*Xt),$.lineTo(xe*de-Je*Oe,Je*de+xe*Oe)}$.closePath()}},Se={draw:function($,Tt){var Xt=Math.sqrt(Tt),de=-Xt/2;$.rect(de,de,Xt,Xt)}},Ke=Math.sqrt(3),fn={draw:function($,Tt){var Xt=-Math.sqrt(Tt/(Ke*3));$.moveTo(0,Xt*2),$.lineTo(-Ke*Xt,-Xt),$.lineTo(Ke*Xt,-Xt),$.closePath()}},on=-.5,mn=Math.sqrt(3)/2,Sn=1/Math.sqrt(12),xn=(Sn/2+1)*3,bn={draw:function($,Tt){var Xt=Math.sqrt(Tt/xn),de=Xt/2,Oe=Xt*Sn,Le=de,We=Xt*Sn+Xt,xe=-Le,Je=We;$.moveTo(de,Oe),$.lineTo(Le,We),$.lineTo(xe,Je),$.lineTo(on*de-mn*Oe,mn*de+on*Oe),$.lineTo(on*Le-mn*We,mn*Le+on*We),$.lineTo(on*xe-mn*Je,mn*xe+on*Je),$.lineTo(on*de+mn*Oe,on*Oe-mn*de),$.lineTo(on*Le+mn*We,on*We-mn*Le),$.lineTo(on*xe+mn*Je,on*Je-mn*xe),$.closePath()}},An=[S,B,J,Se,Yt,fn,bn];function Dn(){var $=s(S),Tt=s(64),Xt=null;function de(){var Oe;if(Xt||(Xt=Oe=o.path()),$.apply(this,arguments).draw(Xt,+Tt.apply(this,arguments)),Oe)return Xt=null,Oe+""||null}return de.type=function(Oe){return arguments.length?($=typeof Oe=="function"?Oe:s(Oe),de):$},de.size=function(Oe){return arguments.length?(Tt=typeof Oe=="function"?Oe:s(+Oe),de):Tt},de.context=function(Oe){return arguments.length?(Xt=Oe==null?null:Oe,de):Xt},de}function Ht(){}function kt($,Tt,Xt){$._context.bezierCurveTo((2*$._x0+$._x1)/3,(2*$._y0+$._y1)/3,($._x0+2*$._x1)/3,($._y0+2*$._y1)/3,($._x0+4*$._x1+Tt)/6,($._y0+4*$._y1+Xt)/6)}function oe($){this._context=$}oe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:kt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function($,Tt){switch($=+$,Tt=+Tt,this._point){case 0:this._point=1,this._line?this._context.lineTo($,Tt):this._context.moveTo($,Tt);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:kt(this,$,Tt);break}this._x0=this._x1,this._x1=$,this._y0=this._y1,this._y1=Tt}};function fe($){return new oe($)}function Ve($){this._context=$}Ve.prototype={areaStart:Ht,areaEnd:Ht,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function($,Tt){switch($=+$,Tt=+Tt,this._point){case 0:this._point=1,this._x2=$,this._y2=Tt;break;case 1:this._point=2,this._x3=$,this._y3=Tt;break;case 2:this._point=3,this._x4=$,this._y4=Tt,this._context.moveTo((this._x0+4*this._x1+$)/6,(this._y0+4*this._y1+Tt)/6);break;default:kt(this,$,Tt);break}this._x0=this._x1,this._x1=$,this._y0=this._y1,this._y1=Tt}};function Fn($){return new Ve($)}function Pr($){this._context=$}Pr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function($,Tt){switch($=+$,Tt=+Tt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Xt=(this._x0+4*this._x1+$)/6,de=(this._y0+4*this._y1+Tt)/6;this._line?this._context.lineTo(Xt,de):this._context.moveTo(Xt,de);break;case 3:this._point=4;default:kt(this,$,Tt);break}this._x0=this._x1,this._x1=$,this._y0=this._y1,this._y1=Tt}};function pr($){return new Pr($)}function Br($,Tt){this._basis=new oe($),this._beta=Tt}Br.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var $=this._x,Tt=this._y,Xt=$.length-1;if(Xt>0)for(var de=$[0],Oe=Tt[0],Le=$[Xt]-de,We=Tt[Xt]-Oe,xe=-1,Je;++xe<=Xt;)Je=xe/Xt,this._basis.point(this._beta*$[xe]+(1-this._beta)*(de+Je*Le),this._beta*Tt[xe]+(1-this._beta)*(Oe+Je*We));this._x=this._y=null,this._basis.lineEnd()},point:function($,Tt){this._x.push(+$),this._y.push(+Tt)}};var sr=function $(Tt){function Xt(de){return Tt===1?new oe(de):new Br(de,Tt)}return Xt.beta=function(de){return $(+de)},Xt}(.85);function Ft($,Tt,Xt){$._context.bezierCurveTo($._x1+$._k*($._x2-$._x0),$._y1+$._k*($._y2-$._y0),$._x2+$._k*($._x1-Tt),$._y2+$._k*($._y1-Xt),$._x2,$._y2)}function zt($,Tt){this._context=$,this._k=(1-Tt)/6}zt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ft(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function($,Tt){switch($=+$,Tt=+Tt,this._point){case 0:this._point=1,this._line?this._context.lineTo($,Tt):this._context.moveTo($,Tt);break;case 1:this._point=2,this._x1=$,this._y1=Tt;break;case 2:this._point=3;default:Ft(this,$,Tt);break}this._x0=this._x1,this._x1=this._x2,this._x2=$,this._y0=this._y1,this._y1=this._y2,this._y2=Tt}};var ie=function $(Tt){function Xt(de){return new zt(de,Tt)}return Xt.tension=function(de){return $(+de)},Xt}(0);function ue($,Tt){this._context=$,this._k=(1-Tt)/6}ue.prototype={areaStart:Ht,areaEnd:Ht,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function($,Tt){switch($=+$,Tt=+Tt,this._point){case 0:this._point=1,this._x3=$,this._y3=Tt;break;case 1:this._point=2,this._context.moveTo(this._x4=$,this._y4=Tt);break;case 2:this._point=3,this._x5=$,this._y5=Tt;break;default:Ft(this,$,Tt);break}this._x0=this._x1,this._x1=this._x2,this._x2=$,this._y0=this._y1,this._y1=this._y2,this._y2=Tt}};var be=function $(Tt){function Xt(de){return new ue(de,Tt)}return Xt.tension=function(de){return $(+de)},Xt}(0);function Ae($,Tt){this._context=$,this._k=(1-Tt)/6}Ae.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function($,Tt){switch($=+$,Tt=+Tt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ft(this,$,Tt);break}this._x0=this._x1,this._x1=this._x2,this._x2=$,this._y0=this._y1,this._y1=this._y2,this._y2=Tt}};var Ze=function $(Tt){function Xt(de){return new Ae(de,Tt)}return Xt.tension=function(de){return $(+de)},Xt}(0);function un($,Tt,Xt){var de=$._x1,Oe=$._y1,Le=$._x2,We=$._y2;if($._l01_a>g){var xe=2*$._l01_2a+3*$._l01_a*$._l12_a+$._l12_2a,Je=3*$._l01_a*($._l01_a+$._l12_a);de=(de*xe-$._x0*$._l12_2a+$._x2*$._l01_2a)/Je,Oe=(Oe*xe-$._y0*$._l12_2a+$._y2*$._l01_2a)/Je}if($._l23_a>g){var Mn=2*$._l23_2a+3*$._l23_a*$._l12_a+$._l12_2a,pn=3*$._l23_a*($._l23_a+$._l12_a);Le=(Le*Mn+$._x1*$._l23_2a-Tt*$._l12_2a)/pn,We=(We*Mn+$._y1*$._l23_2a-Xt*$._l12_2a)/pn}$._context.bezierCurveTo(de,Oe,Le,We,$._x2,$._y2)}function an($,Tt){this._context=$,this._alpha=Tt}an.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function($,Tt){if($=+$,Tt=+Tt,this._point){var Xt=this._x2-$,de=this._y2-Tt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Xt*Xt+de*de,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo($,Tt):this._context.moveTo($,Tt);break;case 1:this._point=2;break;case 2:this._point=3;default:un(this,$,Tt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=$,this._y0=this._y1,this._y1=this._y2,this._y2=Tt}};var Ce=function $(Tt){function Xt(de){return Tt?new an(de,Tt):new zt(de,0)}return Xt.alpha=function(de){return $(+de)},Xt}(.5);function nn($,Tt){this._context=$,this._alpha=Tt}nn.prototype={areaStart:Ht,areaEnd:Ht,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function($,Tt){if($=+$,Tt=+Tt,this._point){var Xt=this._x2-$,de=this._y2-Tt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Xt*Xt+de*de,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=$,this._y3=Tt;break;case 1:this._point=2,this._context.moveTo(this._x4=$,this._y4=Tt);break;case 2:this._point=3,this._x5=$,this._y5=Tt;break;default:un(this,$,Tt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=$,this._y0=this._y1,this._y1=this._y2,this._y2=Tt}};var vn=function $(Tt){function Xt(de){return Tt?new nn(de,Tt):new ue(de,0)}return Xt.alpha=function(de){return $(+de)},Xt}(.5);function ye($,Tt){this._context=$,this._alpha=Tt}ye.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function($,Tt){if($=+$,Tt=+Tt,this._point){var Xt=this._x2-$,de=this._y2-Tt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Xt*Xt+de*de,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:un(this,$,Tt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=$,this._y0=this._y1,this._y1=this._y2,this._y2=Tt}};var dn=function $(Tt){function Xt(de){return Tt?new ye(de,Tt):new Ae(de,0)}return Xt.alpha=function(de){return $(+de)},Xt}(.5);function gn($){this._context=$}gn.prototype={areaStart:Ht,areaEnd:Ht,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function($,Tt){$=+$,Tt=+Tt,this._point?this._context.lineTo($,Tt):(this._point=1,this._context.moveTo($,Tt))}};function vt($){return new gn($)}function Ct($){return $<0?-1:1}function At($,Tt,Xt){var de=$._x1-$._x0,Oe=Tt-$._x1,Le=($._y1-$._y0)/(de||Oe<0&&-0),We=(Xt-$._y1)/(Oe||de<0&&-0),xe=(Le*Oe+We*de)/(de+Oe);return(Ct(Le)+Ct(We))*Math.min(Math.abs(Le),Math.abs(We),.5*Math.abs(xe))||0}function Ut($,Tt){var Xt=$._x1-$._x0;return Xt?(3*($._y1-$._y0)/Xt-Tt)/2:Tt}function Vt($,Tt,Xt){var de=$._x0,Oe=$._y0,Le=$._x1,We=$._y1,xe=(Le-de)/3;$._context.bezierCurveTo(de+xe,Oe+xe*Tt,Le-xe,We-xe*Xt,Le,We)}function se($){this._context=$}se.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Vt(this,this._t0,Ut(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function($,Tt){var Xt=NaN;if($=+$,Tt=+Tt,!($===this._x1&&Tt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo($,Tt):this._context.moveTo($,Tt);break;case 1:this._point=2;break;case 2:this._point=3,Vt(this,Ut(this,Xt=At(this,$,Tt)),Xt);break;default:Vt(this,this._t0,Xt=At(this,$,Tt));break}this._x0=this._x1,this._x1=$,this._y0=this._y1,this._y1=Tt,this._t0=Xt}}};function Wt($){this._context=new ne($)}(Wt.prototype=Object.create(se.prototype)).point=function($,Tt){se.prototype.point.call(this,Tt,$)};function ne($){this._context=$}ne.prototype={moveTo:function($,Tt){this._context.moveTo(Tt,$)},closePath:function(){this._context.closePath()},lineTo:function($,Tt){this._context.lineTo(Tt,$)},bezierCurveTo:function($,Tt,Xt,de,Oe,Le){this._context.bezierCurveTo(Tt,$,de,Xt,Le,Oe)}};function ae($){return new se($)}function ge($){return new Wt($)}function Pe($){this._context=$}Pe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var $=this._x,Tt=this._y,Xt=$.length;if(Xt)if(this._line?this._context.lineTo($[0],Tt[0]):this._context.moveTo($[0],Tt[0]),Xt===2)this._context.lineTo($[1],Tt[1]);else for(var de=ze($),Oe=ze(Tt),Le=0,We=1;We=0;--Tt)Oe[Tt]=(We[Tt]-Oe[Tt+1])/Le[Tt];for(Le[Xt-1]=($[Xt]+Oe[Xt-1])/2,Tt=0;Tt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function($,Tt){switch($=+$,Tt=+Tt,this._point){case 0:this._point=1,this._line?this._context.lineTo($,Tt):this._context.moveTo($,Tt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Tt),this._context.lineTo($,Tt);else{var Xt=this._x*(1-this._t)+$*this._t;this._context.lineTo(Xt,this._y),this._context.lineTo(Xt,Tt)}break}}this._x=$,this._y=Tt}};function wn($){return new en($,.5)}function Qn($){return new en($,0)}function fr($){return new en($,1)}function cr($,Tt){if((We=$.length)>1)for(var Xt=1,de,Oe,Le=$[Tt[0]],We,xe=Le.length;Xt=0;)Xt[Tt]=Tt;return Xt}function Jr($,Tt){return $[Tt]}function gi(){var $=s([]),Tt=xr,Xt=cr,de=Jr;function Oe(Le){var We=$.apply(this,arguments),xe,Je=Le.length,Mn=We.length,pn=new Array(Mn),Tn;for(xe=0;xe0){for(var Xt,de,Oe=0,Le=$[0].length,We;Oe0)for(var Xt,de=0,Oe,Le,We,xe,Je,Mn=$[Tt[0]].length;de0?(Oe[0]=We,Oe[1]=We+=Le):Le<0?(Oe[1]=xe,Oe[0]=xe+=Le):(Oe[0]=0,Oe[1]=Le)}function Li($,Tt){if((Oe=$.length)>0){for(var Xt=0,de=$[Tt[0]],Oe,Le=de.length;Xt0)||!((Le=(Oe=$[Tt[0]]).length)>0))){for(var Xt=0,de=1,Oe,Le,We;deLe&&(Le=Oe,Xt=Tt);return Xt}function va($){var Tt=$.map(Ya);return xr($).sort(function(Xt,de){return Tt[Xt]-Tt[de]})}function Ya($){for(var Tt=0,Xt=-1,de=$.length,Oe;++Xt0)){if(Yt/=Zt,Zt<0){if(Yt0){if(Yt>It)return;Yt>pt&&(pt=Yt)}if(Yt=dt-B,!(!Zt&&Yt<0)){if(Yt/=Zt,Zt<0){if(Yt>It)return;Yt>pt&&(pt=Yt)}else if(Zt>0){if(Yt0)){if(Yt/=Lt,Lt<0){if(Yt0){if(Yt>It)return;Yt>pt&&(pt=Yt)}if(Yt=Z-A,!(!Lt&&Yt<0)){if(Yt/=Lt,Lt<0){if(Yt>It)return;Yt>pt&&(pt=Yt)}else if(Lt>0){if(Yt0)&&!(It<1)||(pt>0&&(H[0]=[B+pt*Zt,A+pt*Lt]),It<1&&(H[1]=[B+It*Zt,A+It*Lt])),!0}}}}}function y(H,ot,at,dt,Z){var mt=H[1];if(mt)return!0;var S=H[0],B=H.left,A=H.right,z=B[0],J=B[1],pt=A[0],It=A[1],Zt=(z+pt)/2,Lt=(J+It)/2,Yt,Se;if(It===J){if(Zt=dt)return;if(z>pt){if(!S)S=[Zt,at];else if(S[1]>=Z)return;mt=[Zt,Z]}else{if(!S)S=[Zt,Z];else if(S[1]1)if(z>pt){if(!S)S=[(at-Se)/Yt,at];else if(S[1]>=Z)return;mt=[(Z-Se)/Yt,Z]}else{if(!S)S=[(Z-Se)/Yt,Z];else if(S[1]=dt)return;mt=[dt,Yt*dt+Se]}else{if(!S)S=[dt,Yt*dt+Se];else if(S[0]Bt||Math.abs(mt[0][1]-mt[1][1])>Bt))&&delete Fe[Z]}function x(H){return _e[H.index]={site:H,halfedges:[]}}function M(H,ot){var at=H.site,dt=ot.left,Z=ot.right;return at===Z&&(Z=dt,dt=at),Z?Math.atan2(Z[1]-dt[1],Z[0]-dt[0]):(at===dt?(dt=ot[1],Z=ot[0]):(dt=ot[0],Z=ot[1]),Math.atan2(dt[0]-Z[0],Z[1]-dt[1]))}function _(H,ot){return ot[+(ot.left!==H.site)]}function D(H,ot){return ot[+(ot.left===H.site)]}function C(){for(var H=0,ot=_e.length,at,dt,Z,mt;HBt||Math.abs(Se-Zt)>Bt)&&(z.splice(A,0,Fe.push(g(B,Lt,Math.abs(Yt-H)Bt?[H,Math.abs(It-H)Bt?[Math.abs(Zt-dt)Bt?[at,Math.abs(It-at)Bt?[Math.abs(Zt-ot)=-Qt)){var Zt=A*A+z*z,Lt=J*J+pt*pt,Yt=(pt*Zt-z*Lt)/It,Se=(A*Lt-J*Zt)/It,Ke=k.pop()||new V;Ke.arc=H,Ke.site=Z,Ke.x=Yt+S,Ke.y=(Ke.cy=Se+B)+Math.sqrt(Yt*Yt+Se*Se),H.circle=Ke;for(var fn=null,on=Ue._;on;)if(Ke.yBt)B=B.L;else if(S=ot-Gt(B,at),S>Bt){if(!B.R){dt=B;break}B=B.R}else{mt>-Bt?(dt=B.P,Z=B):S>-Bt?(dt=B,Z=B.N):dt=Z=B;break}x(H);var A=Pt(H);if(Ie.insert(dt,A),!(!dt&&!Z)){if(dt===Z){yt(dt),Z=Pt(dt.site),Ie.insert(A,Z),A.edge=Z.edge=v(dt.site,A.site),st(dt),st(Z);return}if(!Z){A.edge=v(dt.site,A.site);return}yt(dt),yt(Z);var z=dt.site,J=z[0],pt=z[1],It=H[0]-J,Zt=H[1]-pt,Lt=Z.site,Yt=Lt[0]-J,Se=Lt[1]-pt,Ke=2*(It*Se-Zt*Yt),fn=It*It+Zt*Zt,on=Yt*Yt+Se*Se,mn=[(Se*fn-Zt*on)/Ke+J,(It*on-Yt*fn)/Ke+pt];p(Z.edge,z,Lt,mn),A.edge=v(z,H,null,mn),Z.edge=v(H,Lt,null,mn),st(dt),st(Z)}}function xt(H,ot){var at=H.site,dt=at[0],Z=at[1],mt=Z-ot;if(!mt)return dt;var S=H.P;if(!S)return-1/0;at=S.site;var B=at[0],A=at[1],z=A-ot;if(!z)return B;var J=B-dt,pt=1/mt-1/z,It=J/z;return pt?(-It+Math.sqrt(It*It-2*pt*(J*J/(-2*z)-A+z/2+Z-mt/2)))/pt+dt:(dt+B)/2}function Gt(H,ot){var at=H.N;if(at)return xt(at,ot);var dt=H.site;return dt[1]===ot?dt[0]:1/0}var Bt=1e-6,Qt=1e-12,Ie,_e,Ue,Fe;function ft(H,ot,at){return(H[0]-at[0])*(ot[1]-H[1])-(H[0]-ot[0])*(at[1]-H[1])}function gt(H,ot){return ot[1]-H[1]||ot[0]-H[0]}function P(H,ot){var at=H.sort(gt).pop(),dt,Z,mt;for(Fe=[],_e=new Array(H.length),Ie=new u,Ue=new u;;)if(mt=j,at&&(!mt||at[1]=S)return null;var A=H-B.site[0],z=ot-B.site[1],J=A*A+z*z;do B=dt.cells[Z=mt],mt=null,B.halfedges.forEach(function(pt){var It=dt.edges[pt],Zt=It.left;if(!((Zt===B.site||!Zt)&&!(Zt=It.right))){var Lt=H-Zt[0],Yt=ot-Zt[1],Se=Lt*Lt+Yt*Yt;Se0;--M)if(x=g[M].dequeue(),x){m=m.concat(f(v,g,p,x,!0));break}}}return m}function f(v,g,p,m,y){var w=y?[]:void 0;return r.forEach(v.inEdges(m.v),function(x){var M=v.edge(x),_=v.node(x.v);y&&w.push({v:x.v,w:x.w}),_.out-=M,d(g,p,_)}),r.forEach(v.outEdges(m.v),function(x){var M=v.edge(x),_=x.w,D=v.node(_);D.in-=M,d(g,p,D)}),v.removeNode(m.v),w}function h(v,g){var p=new o,m=0,y=0;r.forEach(v.nodes(),function(M){p.setNode(M,{v:M,in:0,out:0})}),r.forEach(v.edges(),function(M){var _=p.edge(M.v,M.w)||0,D=g(M),C=_+D;p.setEdge(M.v,M.w,C),y=Math.max(y,p.node(M.v).out+=D),m=Math.max(m,p.node(M.w).in+=D)});var w=r.range(y+m+3).map(function(){return new s}),x=m+1;return r.forEach(p.nodes(),function(M){d(w,x,p.node(M))}),{graph:p,buckets:w,zeroIdx:x}}function d(v,g,p){p.out?p.in?v[p.out-p.in+g].enqueue(p):v[v.length-1].enqueue(p):v[0].enqueue(p)}},"./node_modules/_dagre@0.8.5@dagre/lib/layout.js":function(t,e,n){var r=n("./node_modules/_dagre@0.8.5@dagre/lib/lodash.js"),o=n("./node_modules/_dagre@0.8.5@dagre/lib/acyclic.js"),s=n("./node_modules/_dagre@0.8.5@dagre/lib/normalize.js"),l=n("./node_modules/_dagre@0.8.5@dagre/lib/rank/index.js"),u=n("./node_modules/_dagre@0.8.5@dagre/lib/util.js").normalizeRanks,c=n("./node_modules/_dagre@0.8.5@dagre/lib/parent-dummy-chains.js"),f=n("./node_modules/_dagre@0.8.5@dagre/lib/util.js").removeEmptyRanks,h=n("./node_modules/_dagre@0.8.5@dagre/lib/nesting-graph.js"),d=n("./node_modules/_dagre@0.8.5@dagre/lib/add-border-segments.js"),v=n("./node_modules/_dagre@0.8.5@dagre/lib/coordinate-system.js"),g=n("./node_modules/_dagre@0.8.5@dagre/lib/order/index.js"),p=n("./node_modules/_dagre@0.8.5@dagre/lib/position/index.js"),m=n("./node_modules/_dagre@0.8.5@dagre/lib/util.js"),y=n("./node_modules/_dagre@0.8.5@dagre/lib/graphlib.js").Graph;t.exports=w;function w(ft,gt){var P=gt&>.debugTiming?m.time:m.notime;P("layout",function(){var Kt=P(" buildLayoutGraph",function(){return yt(ft)});P(" runLayout",function(){x(Kt,P)}),P(" updateInputGraph",function(){M(ft,Kt)})})}function x(ft,gt){gt(" makeSpaceForEdgeLabels",function(){Q(ft)}),gt(" removeSelfEdges",function(){Qt(ft)}),gt(" acyclic",function(){o.run(ft)}),gt(" nestingGraph.run",function(){h.run(ft)}),gt(" rank",function(){l(m.asNonCompoundGraph(ft))}),gt(" injectEdgeLabelProxies",function(){it(ft)}),gt(" removeEmptyRanks",function(){f(ft)}),gt(" nestingGraph.cleanup",function(){h.cleanup(ft)}),gt(" normalizeRanks",function(){u(ft)}),gt(" assignRankMinMax",function(){Pt(ft)}),gt(" removeEdgeLabelProxies",function(){ht(ft)}),gt(" normalize.run",function(){s.run(ft)}),gt(" parentDummyChains",function(){c(ft)}),gt(" addBorderSegments",function(){d(ft)}),gt(" order",function(){g(ft)}),gt(" insertSelfEdges",function(){Ie(ft)}),gt(" adjustCoordinateSystem",function(){v.adjust(ft)}),gt(" position",function(){p(ft)}),gt(" positionSelfEdges",function(){_e(ft)}),gt(" removeBorderNodes",function(){Bt(ft)}),gt(" normalize.undo",function(){s.undo(ft)}),gt(" fixupEdgeLabelCoords",function(){xt(ft)}),gt(" undoCoordinateSystem",function(){v.undo(ft)}),gt(" translateGraph",function(){lt(ft)}),gt(" assignNodeIntersects",function(){U(ft)}),gt(" reversePoints",function(){Gt(ft)}),gt(" acyclic.undo",function(){o.undo(ft)})}function M(ft,gt){r.forEach(ft.nodes(),function(P){var Kt=ft.node(P),H=gt.node(P);Kt&&(Kt.x=H.x,Kt.y=H.y,gt.children(P).length&&(Kt.width=H.width,Kt.height=H.height))}),r.forEach(ft.edges(),function(P){var Kt=ft.edge(P),H=gt.edge(P);Kt.points=H.points,r.has(H,"x")&&(Kt.x=H.x,Kt.y=H.y)}),ft.graph().width=gt.graph().width,ft.graph().height=gt.graph().height}var _=["nodesep","edgesep","ranksep","marginx","marginy"],D={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},C=["acyclicer","ranker","rankdir","align"],F=["width","height"],k={width:0,height:0},j=["minlen","weight","width","height","labeloffset"],V={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},st=["labelpos"];function yt(ft){var gt=new y({multigraph:!0,compound:!0}),P=Fe(ft.graph());return gt.setGraph(r.merge({},D,Ue(P,_),r.pick(P,C))),r.forEach(ft.nodes(),function(Kt){var H=Fe(ft.node(Kt));gt.setNode(Kt,r.defaults(Ue(H,F),k)),gt.setParent(Kt,ft.parent(Kt))}),r.forEach(ft.edges(),function(Kt){var H=Fe(ft.edge(Kt));gt.setEdge(Kt,r.merge({},V,Ue(H,j),r.pick(H,st)))}),gt}function Q(ft){var gt=ft.graph();gt.ranksep/=2,r.forEach(ft.edges(),function(P){var Kt=ft.edge(P);Kt.minlen*=2,Kt.labelpos.toLowerCase()!=="c"&&(gt.rankdir==="TB"||gt.rankdir==="BT"?Kt.width+=Kt.labeloffset:Kt.height+=Kt.labeloffset)})}function it(ft){r.forEach(ft.edges(),function(gt){var P=ft.edge(gt);if(P.width&&P.height){var Kt=ft.node(gt.v),H=ft.node(gt.w),ot={rank:(H.rank-Kt.rank)/2+Kt.rank,e:gt};m.addDummyNode(ft,"edge-proxy",ot,"_ep")}})}function Pt(ft){var gt=0;r.forEach(ft.nodes(),function(P){var Kt=ft.node(P);Kt.borderTop&&(Kt.minRank=ft.node(Kt.borderTop).rank,Kt.maxRank=ft.node(Kt.borderBottom).rank,gt=r.max(gt,Kt.maxRank))}),ft.graph().maxRank=gt}function ht(ft){r.forEach(ft.nodes(),function(gt){var P=ft.node(gt);P.dummy==="edge-proxy"&&(ft.edge(P.e).labelRank=P.rank,ft.removeNode(gt))})}function lt(ft){var gt=Number.POSITIVE_INFINITY,P=0,Kt=Number.POSITIVE_INFINITY,H=0,ot=ft.graph(),at=ot.marginx||0,dt=ot.marginy||0;function Z(mt){var S=mt.x,B=mt.y,A=mt.width,z=mt.height;gt=Math.min(gt,S-A/2),P=Math.max(P,S+A/2),Kt=Math.min(Kt,B-z/2),H=Math.max(H,B+z/2)}r.forEach(ft.nodes(),function(mt){Z(ft.node(mt))}),r.forEach(ft.edges(),function(mt){var S=ft.edge(mt);r.has(S,"x")&&Z(S)}),gt-=at,Kt-=dt,r.forEach(ft.nodes(),function(mt){var S=ft.node(mt);S.x-=gt,S.y-=Kt}),r.forEach(ft.edges(),function(mt){var S=ft.edge(mt);r.forEach(S.points,function(B){B.x-=gt,B.y-=Kt}),r.has(S,"x")&&(S.x-=gt),r.has(S,"y")&&(S.y-=Kt)}),ot.width=P-gt+at,ot.height=H-Kt+dt}function U(ft){r.forEach(ft.edges(),function(gt){var P=ft.edge(gt),Kt=ft.node(gt.v),H=ft.node(gt.w),ot,at;P.points?(ot=P.points[0],at=P.points[P.points.length-1]):(P.points=[],ot=H,at=Kt),P.points.unshift(m.intersectRect(Kt,ot)),P.points.push(m.intersectRect(H,at))})}function xt(ft){r.forEach(ft.edges(),function(gt){var P=ft.edge(gt);if(r.has(P,"x"))switch((P.labelpos==="l"||P.labelpos==="r")&&(P.width-=P.labeloffset),P.labelpos){case"l":P.x-=P.width/2+P.labeloffset;break;case"r":P.x+=P.width/2+P.labeloffset;break}})}function Gt(ft){r.forEach(ft.edges(),function(gt){var P=ft.edge(gt);P.reversed&&P.points.reverse()})}function Bt(ft){r.forEach(ft.nodes(),function(gt){if(ft.children(gt).length){var P=ft.node(gt),Kt=ft.node(P.borderTop),H=ft.node(P.borderBottom),ot=ft.node(r.last(P.borderLeft)),at=ft.node(r.last(P.borderRight));P.width=Math.abs(at.x-ot.x),P.height=Math.abs(H.y-Kt.y),P.x=ot.x+P.width/2,P.y=Kt.y+P.height/2}}),r.forEach(ft.nodes(),function(gt){ft.node(gt).dummy==="border"&&ft.removeNode(gt)})}function Qt(ft){r.forEach(ft.edges(),function(gt){if(gt.v===gt.w){var P=ft.node(gt.v);P.selfEdges||(P.selfEdges=[]),P.selfEdges.push({e:gt,label:ft.edge(gt)}),ft.removeEdge(gt)}})}function Ie(ft){var gt=m.buildLayerMatrix(ft);r.forEach(gt,function(P){var Kt=0;r.forEach(P,function(H,ot){var at=ft.node(H);at.order=ot+Kt,r.forEach(at.selfEdges,function(dt){m.addDummyNode(ft,"selfedge",{width:dt.label.width,height:dt.label.height,rank:at.rank,order:ot+ ++Kt,e:dt.e,label:dt.label},"_se")}),delete at.selfEdges})})}function _e(ft){r.forEach(ft.nodes(),function(gt){var P=ft.node(gt);if(P.dummy==="selfedge"){var Kt=ft.node(P.e.v),H=Kt.x+Kt.width/2,ot=Kt.y,at=P.x-H,dt=Kt.height/2;ft.setEdge(P.e,P.label),ft.removeNode(gt),P.label.points=[{x:H+2*at/3,y:ot-dt},{x:H+5*at/6,y:ot-dt},{x:H+at,y:ot},{x:H+5*at/6,y:ot+dt},{x:H+2*at/3,y:ot+dt}],P.label.x=P.x,P.label.y=P.y}})}function Ue(ft,gt){return r.mapValues(r.pick(ft,gt),Number)}function Fe(ft){var gt={};return r.forEach(ft,function(P,Kt){gt[Kt.toLowerCase()]=P}),gt}},"./node_modules/_dagre@0.8.5@dagre/lib/lodash.js":function(t,e,n){var r;try{r={cloneDeep:n("./node_modules/_lodash@4.17.20@lodash/cloneDeep.js"),constant:n("./node_modules/_lodash@4.17.20@lodash/constant.js"),defaults:n("./node_modules/_lodash@4.17.20@lodash/defaults.js"),each:n("./node_modules/_lodash@4.17.20@lodash/each.js"),filter:n("./node_modules/_lodash@4.17.20@lodash/filter.js"),find:n("./node_modules/_lodash@4.17.20@lodash/find.js"),flatten:n("./node_modules/_lodash@4.17.20@lodash/flatten.js"),forEach:n("./node_modules/_lodash@4.17.20@lodash/forEach.js"),forIn:n("./node_modules/_lodash@4.17.20@lodash/forIn.js"),has:n("./node_modules/_lodash@4.17.20@lodash/has.js"),isUndefined:n("./node_modules/_lodash@4.17.20@lodash/isUndefined.js"),last:n("./node_modules/_lodash@4.17.20@lodash/last.js"),map:n("./node_modules/_lodash@4.17.20@lodash/map.js"),mapValues:n("./node_modules/_lodash@4.17.20@lodash/mapValues.js"),max:n("./node_modules/_lodash@4.17.20@lodash/max.js"),merge:n("./node_modules/_lodash@4.17.20@lodash/merge.js"),min:n("./node_modules/_lodash@4.17.20@lodash/min.js"),minBy:n("./node_modules/_lodash@4.17.20@lodash/minBy.js"),now:n("./node_modules/_lodash@4.17.20@lodash/now.js"),pick:n("./node_modules/_lodash@4.17.20@lodash/pick.js"),range:n("./node_modules/_lodash@4.17.20@lodash/range.js"),reduce:n("./node_modules/_lodash@4.17.20@lodash/reduce.js"),sortBy:n("./node_modules/_lodash@4.17.20@lodash/sortBy.js"),uniqueId:n("./node_modules/_lodash@4.17.20@lodash/uniqueId.js"),values:n("./node_modules/_lodash@4.17.20@lodash/values.js"),zipObject:n("./node_modules/_lodash@4.17.20@lodash/zipObject.js")}}catch(o){}r||(r=window._),t.exports=r},"./node_modules/_dagre@0.8.5@dagre/lib/nesting-graph.js":function(t,e,n){var r=n("./node_modules/_dagre@0.8.5@dagre/lib/lodash.js"),o=n("./node_modules/_dagre@0.8.5@dagre/lib/util.js");t.exports={run:s,cleanup:f};function s(h){var d=o.addDummyNode(h,"root",{},"_root"),v=u(h),g=r.max(r.values(v))-1,p=2*g+1;h.graph().nestingRoot=d,r.forEach(h.edges(),function(y){h.edge(y).minlen*=p});var m=c(h)+1;r.forEach(h.children(),function(y){l(h,d,p,m,g,v,y)}),h.graph().nodeRankFactor=p}function l(h,d,v,g,p,m,y){var w=h.children(y);if(!w.length){y!==d&&h.setEdge(d,y,{weight:0,minlen:v});return}var x=o.addBorderNode(h,"_bt"),M=o.addBorderNode(h,"_bb"),_=h.node(y);h.setParent(x,y),_.borderTop=x,h.setParent(M,y),_.borderBottom=M,r.forEach(w,function(D){l(h,d,v,g,p,m,D);var C=h.node(D),F=C.borderTop?C.borderTop:D,k=C.borderBottom?C.borderBottom:D,j=C.borderTop?g:2*g,V=F!==k?1:p-m[y]+1;h.setEdge(x,F,{weight:j,minlen:V,nestingEdge:!0}),h.setEdge(k,M,{weight:j,minlen:V,nestingEdge:!0})}),h.parent(y)||h.setEdge(d,x,{weight:0,minlen:p+m[y]})}function u(h){var d={};function v(g,p){var m=h.children(g);m&&m.length&&r.forEach(m,function(y){v(y,p+1)}),d[g]=p}return r.forEach(h.children(),function(g){v(g,1)}),d}function c(h){return r.reduce(h.edges(),function(d,v){return d+h.edge(v).weight},0)}function f(h){var d=h.graph();h.removeNode(d.nestingRoot),delete d.nestingRoot,r.forEach(h.edges(),function(v){var g=h.edge(v);g.nestingEdge&&h.removeEdge(v)})}},"./node_modules/_dagre@0.8.5@dagre/lib/normalize.js":function(t,e,n){var r=n("./node_modules/_dagre@0.8.5@dagre/lib/lodash.js"),o=n("./node_modules/_dagre@0.8.5@dagre/lib/util.js");t.exports={run:s,undo:u};function s(c){c.graph().dummyChains=[],r.forEach(c.edges(),function(f){l(c,f)})}function l(c,f){var h=f.v,d=c.node(h).rank,v=f.w,g=c.node(v).rank,p=f.name,m=c.edge(f),y=m.labelRank;if(g!==d+1){c.removeEdge(f);var w,x,M;for(M=0,++d;d0;)y%2&&(w+=g[y+1]),y=y-1>>1,g[y]+=m.weight;p+=m.weight*w})),p}},"./node_modules/_dagre@0.8.5@dagre/lib/order/index.js":function(t,e,n){var r=n("./node_modules/_dagre@0.8.5@dagre/lib/lodash.js"),o=n("./node_modules/_dagre@0.8.5@dagre/lib/order/init-order.js"),s=n("./node_modules/_dagre@0.8.5@dagre/lib/order/cross-count.js"),l=n("./node_modules/_dagre@0.8.5@dagre/lib/order/sort-subgraph.js"),u=n("./node_modules/_dagre@0.8.5@dagre/lib/order/build-layer-graph.js"),c=n("./node_modules/_dagre@0.8.5@dagre/lib/order/add-subgraph-constraints.js"),f=n("./node_modules/_dagre@0.8.5@dagre/lib/graphlib.js").Graph,h=n("./node_modules/_dagre@0.8.5@dagre/lib/util.js");t.exports=d;function d(m){var y=h.maxRank(m),w=v(m,r.range(1,y+1),"inEdges"),x=v(m,r.range(y-1,-1,-1),"outEdges"),M=o(m);p(m,M);for(var _=Number.POSITIVE_INFINITY,D,C=0,F=0;F<4;++C,++F){g(C%2?w:x,C%4>=2),M=h.buildLayerMatrix(m);var k=s(m,M);k<_&&(F=0,D=r.cloneDeep(M),_=k)}p(m,D)}function v(m,y,w){return r.map(y,function(x){return u(m,x,w)})}function g(m,y){var w=new f;r.forEach(m,function(x){var M=x.graph().root,_=l(x,M,w,y);r.forEach(_.vs,function(D,C){x.node(D).order=C}),c(x,w,_.vs)})}function p(m,y){r.forEach(y,function(w){r.forEach(w,function(x,M){m.node(x).order=M})})}},"./node_modules/_dagre@0.8.5@dagre/lib/order/init-order.js":function(t,e,n){var r=n("./node_modules/_dagre@0.8.5@dagre/lib/lodash.js");t.exports=o;function o(s){var l={},u=r.filter(s.nodes(),function(v){return!s.children(v).length}),c=r.max(r.map(u,function(v){return s.node(v).rank})),f=r.map(r.range(c+1),function(){return[]});function h(v){if(!r.has(l,v)){l[v]=!0;var g=s.node(v);f[g.rank].push(v),r.forEach(s.successors(v),h)}}var d=r.sortBy(u,function(v){return s.node(v).rank});return r.forEach(d,h),f}},"./node_modules/_dagre@0.8.5@dagre/lib/order/resolve-conflicts.js":function(t,e,n){var r=n("./node_modules/_dagre@0.8.5@dagre/lib/lodash.js");t.exports=o;function o(u,c){var f={};r.forEach(u,function(d,v){var g=f[d.v]={indegree:0,in:[],out:[],vs:[d.v],i:v};r.isUndefined(d.barycenter)||(g.barycenter=d.barycenter,g.weight=d.weight)}),r.forEach(c.edges(),function(d){var v=f[d.v],g=f[d.w];!r.isUndefined(v)&&!r.isUndefined(g)&&(g.indegree++,v.out.push(f[d.w]))});var h=r.filter(f,function(d){return!d.indegree});return s(h)}function s(u){var c=[];function f(v){return function(g){g.merged||(r.isUndefined(g.barycenter)||r.isUndefined(v.barycenter)||g.barycenter>=v.barycenter)&&l(v,g)}}function h(v){return function(g){g.in.push(v),--g.indegree===0&&u.push(g)}}for(;u.length;){var d=u.pop();c.push(d),r.forEach(d.in.reverse(),f(d)),r.forEach(d.out,h(d))}return r.map(r.filter(c,function(v){return!v.merged}),function(v){return r.pick(v,["vs","i","barycenter","weight"])})}function l(u,c){var f=0,h=0;u.weight&&(f+=u.barycenter*u.weight,h+=u.weight),c.weight&&(f+=c.barycenter*c.weight,h+=c.weight),u.vs=c.vs.concat(u.vs),u.barycenter=f/h,u.weight=h,u.i=Math.min(c.i,u.i),c.merged=!0}},"./node_modules/_dagre@0.8.5@dagre/lib/order/sort-subgraph.js":function(t,e,n){var r=n("./node_modules/_dagre@0.8.5@dagre/lib/lodash.js"),o=n("./node_modules/_dagre@0.8.5@dagre/lib/order/barycenter.js"),s=n("./node_modules/_dagre@0.8.5@dagre/lib/order/resolve-conflicts.js"),l=n("./node_modules/_dagre@0.8.5@dagre/lib/order/sort.js");t.exports=u;function u(h,d,v,g){var p=h.children(d),m=h.node(d),y=m?m.borderLeft:void 0,w=m?m.borderRight:void 0,x={};y&&(p=r.filter(p,function(k){return k!==y&&k!==w}));var M=o(h,p);r.forEach(M,function(k){if(h.children(k.v).length){var j=u(h,k.v,v,g);x[k.v]=j,r.has(j,"barycenter")&&f(k,j)}});var _=s(M,v);c(_,x);var D=l(_,g);if(y&&(D.vs=r.flatten([y,D.vs,w],!0),h.predecessors(y).length)){var C=h.node(h.predecessors(y)[0]),F=h.node(h.predecessors(w)[0]);r.has(D,"barycenter")||(D.barycenter=0,D.weight=0),D.barycenter=(D.barycenter*D.weight+C.order+F.order)/(D.weight+2),D.weight+=2}return D}function c(h,d){r.forEach(h,function(v){v.vs=r.flatten(v.vs.map(function(g){return d[g]?d[g].vs:g}),!0)})}function f(h,d){r.isUndefined(h.barycenter)?(h.barycenter=d.barycenter,h.weight=d.weight):(h.barycenter=(h.barycenter*h.weight+d.barycenter*d.weight)/(h.weight+d.weight),h.weight+=d.weight)}},"./node_modules/_dagre@0.8.5@dagre/lib/order/sort.js":function(t,e,n){var r=n("./node_modules/_dagre@0.8.5@dagre/lib/lodash.js"),o=n("./node_modules/_dagre@0.8.5@dagre/lib/util.js");t.exports=s;function s(c,f){var h=o.partition(c,function(x){return r.has(x,"barycenter")}),d=h.lhs,v=r.sortBy(h.rhs,function(x){return-x.i}),g=[],p=0,m=0,y=0;d.sort(u(!!f)),y=l(g,v,y),r.forEach(d,function(x){y+=x.vs.length,g.push(x.vs),p+=x.barycenter*x.weight,m+=x.weight,y=l(g,v,y)});var w={vs:r.flatten(g,!0)};return m&&(w.barycenter=p/m,w.weight=m),w}function l(c,f,h){for(var d;f.length&&(d=r.last(f)).i<=h;)f.pop(),c.push(d.vs),h++;return h}function u(c){return function(f,h){return f.barycenterh.barycenter?1:c?h.i-f.i:f.i-h.i}}},"./node_modules/_dagre@0.8.5@dagre/lib/parent-dummy-chains.js":function(t,e,n){var r=n("./node_modules/_dagre@0.8.5@dagre/lib/lodash.js");t.exports=o;function o(u){var c=l(u);r.forEach(u.graph().dummyChains,function(f){for(var h=u.node(f),d=h.edgeObj,v=s(u,c,d.v,d.w),g=v.path,p=v.lca,m=0,y=g[m],w=!0;f!==d.w;){if(h=u.node(f),w){for(;(y=g[m])!==p&&u.node(y).maxRankg||p>c[m].lim));for(y=m,m=h;(m=u.parent(m))!==y;)v.push(m);return{path:d.concat(v.reverse()),lca:y}}function l(u){var c={},f=0;function h(d){var v=f;r.forEach(u.children(d),h),c[d]={low:v,lim:f++}}return r.forEach(u.children(),h),c}},"./node_modules/_dagre@0.8.5@dagre/lib/position/bk.js":function(t,e,n){var r=n("./node_modules/_dagre@0.8.5@dagre/lib/lodash.js"),o=n("./node_modules/_dagre@0.8.5@dagre/lib/graphlib.js").Graph,s=n("./node_modules/_dagre@0.8.5@dagre/lib/util.js");t.exports={positionX:w,findType1Conflicts:l,findType2Conflicts:u,addConflict:f,hasConflict:h,verticalAlignment:d,horizontalCompaction:v,alignCoordinates:m,findSmallestWidthAlignment:p,balance:y};function l(_,D){var C={};function F(k,j){var V=0,st=0,yt=k.length,Q=r.last(j);return r.forEach(j,function(it,Pt){var ht=c(_,it),lt=ht?_.node(ht).order:yt;(ht||it===Q)&&(r.forEach(j.slice(st,Pt+1),function(U){r.forEach(_.predecessors(U),function(xt){var Gt=_.node(xt),Bt=Gt.order;(BtQ)&&f(C,ht,it)})})}function k(j,V){var st=-1,yt,Q=0;return r.forEach(V,function(it,Pt){if(_.node(it).dummy==="border"){var ht=_.predecessors(it);ht.length&&(yt=_.node(ht[0]).order,F(V,Q,Pt,st,yt),Q=Pt,st=yt)}F(V,Q,V.length,yt,j.length)}),V}return r.reduce(D,k),C}function c(_,D){if(_.node(D).dummy)return r.find(_.predecessors(D),function(C){return _.node(C).dummy})}function f(_,D,C){if(D>C){var F=D;D=C,C=F}var k=_[D];k||(_[D]=k={}),k[C]=!0}function h(_,D,C){if(D>C){var F=D;D=C,C=F}return r.has(_[D],C)}function d(_,D,C,F){var k={},j={},V={};return r.forEach(D,function(st){r.forEach(st,function(yt,Q){k[yt]=yt,j[yt]=yt,V[yt]=Q})}),r.forEach(D,function(st){var yt=-1;r.forEach(st,function(Q){var it=F(Q);if(it.length){it=r.sortBy(it,function(xt){return V[xt]});for(var Pt=(it.length-1)/2,ht=Math.floor(Pt),lt=Math.ceil(Pt);ht<=lt;++ht){var U=it[ht];j[Q]===Q&&ytyt.lim&&(Q=yt,it=!0);var Pt=r.filter(F.edges(),function(ht){return it===D(C,C.node(ht.v),Q)&&it!==D(C,C.node(ht.w),Q)});return r.minBy(Pt,function(ht){return s(F,ht)})}function x(C,F,k,j){var V=k.v,st=k.w;C.removeEdge(V,st),C.setEdge(j.v,j.w,{}),p(C),d(C,F),M(C,F)}function M(C,F){var k=r.find(C.nodes(),function(V){return!F.node(V).parent}),j=u(C,k);j=j.slice(1),r.forEach(j,function(V){var st=C.node(V).parent,yt=F.edge(V,st),Q=!1;yt||(yt=F.edge(st,V),Q=!0),F.node(V).rank=F.node(st).rank+(Q?yt.minlen:-yt.minlen)})}function _(C,F,k){return C.hasEdge(F,k)}function D(C,F,k){return k.low<=F.lim&&F.lim<=k.lim}},"./node_modules/_dagre@0.8.5@dagre/lib/rank/util.js":function(t,e,n){var r=n("./node_modules/_dagre@0.8.5@dagre/lib/lodash.js");t.exports={longestPath:o,slack:s};function o(l){var u={};function c(f){var h=l.node(f);if(r.has(u,f))return h.rank;u[f]=!0;var d=r.min(r.map(l.outEdges(f),function(v){return c(v.w)-l.edge(v).minlen}));return(d===Number.POSITIVE_INFINITY||d===void 0||d===null)&&(d=0),h.rank=d}r.forEach(l.sources(),c)}function s(l,u){return l.node(u.w).rank-l.node(u.v).rank-l.edge(u).minlen}},"./node_modules/_dagre@0.8.5@dagre/lib/util.js":function(t,e,n){var r=n("./node_modules/_dagre@0.8.5@dagre/lib/lodash.js"),o=n("./node_modules/_dagre@0.8.5@dagre/lib/graphlib.js").Graph;t.exports={addDummyNode:s,simplify:l,asNonCompoundGraph:u,successorWeights:c,predecessorWeights:f,intersectRect:h,buildLayerMatrix:d,normalizeRanks:v,removeEmptyRanks:g,addBorderNode:p,maxRank:m,partition:y,time:w,notime:x};function s(M,_,D,C){var F;do F=r.uniqueId(C);while(M.hasNode(F));return D.dummy=_,M.setNode(F,D),F}function l(M){var _=new o().setGraph(M.graph());return r.forEach(M.nodes(),function(D){_.setNode(D,M.node(D))}),r.forEach(M.edges(),function(D){var C=_.edge(D.v,D.w)||{weight:0,minlen:1},F=M.edge(D);_.setEdge(D.v,D.w,{weight:C.weight+F.weight,minlen:Math.max(C.minlen,F.minlen)})}),_}function u(M){var _=new o({multigraph:M.isMultigraph()}).setGraph(M.graph());return r.forEach(M.nodes(),function(D){M.children(D).length||_.setNode(D,M.node(D))}),r.forEach(M.edges(),function(D){_.setEdge(D,M.edge(D))}),_}function c(M){var _=r.map(M.nodes(),function(D){var C={};return r.forEach(M.outEdges(D),function(F){C[F.w]=(C[F.w]||0)+M.edge(F).weight}),C});return r.zipObject(M.nodes(),_)}function f(M){var _=r.map(M.nodes(),function(D){var C={};return r.forEach(M.inEdges(D),function(F){C[F.v]=(C[F.v]||0)+M.edge(F).weight}),C});return r.zipObject(M.nodes(),_)}function h(M,_){var D=M.x,C=M.y,F=_.x-D,k=_.y-C,j=M.width/2,V=M.height/2;if(!F&&!k)throw new Error("Not possible to find intersection inside of the rectangle");var st,yt;return Math.abs(k)*j>Math.abs(F)*V?(k<0&&(V=-V),st=V*F/k,yt=V):(F<0&&(j=-j),st=j,yt=j*k/F),{x:D+st,y:C+yt}}function d(M){var _=r.map(r.range(m(M)+1),function(){return[]});return r.forEach(M.nodes(),function(D){var C=M.node(D),F=C.rank;r.isUndefined(F)||(_[F][C.order]=D)}),_}function v(M){var _=r.min(r.map(M.nodes(),function(D){return M.node(D).rank}));r.forEach(M.nodes(),function(D){var C=M.node(D);r.has(C,"rank")&&(C.rank-=_)})}function g(M){var _=r.min(r.map(M.nodes(),function(k){return M.node(k).rank})),D=[];r.forEach(M.nodes(),function(k){var j=M.node(k).rank-_;D[j]||(D[j]=[]),D[j].push(k)});var C=0,F=M.graph().nodeRankFactor;r.forEach(D,function(k,j){r.isUndefined(k)&&j%F!==0?--C:C&&r.forEach(k,function(V){M.node(V).rank+=C})})}function p(M,_,D,C){var F={width:0,height:0};return arguments.length>=4&&(F.rank=D,F.order=C),s(M,"border",F,_)}function m(M){return r.max(r.map(M.nodes(),function(_){var D=M.node(_).rank;if(!r.isUndefined(D))return D}))}function y(M,_){var D={lhs:[],rhs:[]};return r.forEach(M,function(C){_(C)?D.lhs.push(C):D.rhs.push(C)}),D}function w(M,_){var D=r.now();try{return _()}finally{console.log(M+" time: "+(r.now()-D)+"ms")}}function x(M,_){return _()}},"./node_modules/_dagre@0.8.5@dagre/lib/version.js":function(t,e){t.exports="0.8.5"},"./node_modules/_graphlib@2.1.8@graphlib/index.js":function(t,e,n){var r=n("./node_modules/_graphlib@2.1.8@graphlib/lib/index.js");t.exports={Graph:r.Graph,json:n("./node_modules/_graphlib@2.1.8@graphlib/lib/json.js"),alg:n("./node_modules/_graphlib@2.1.8@graphlib/lib/alg/index.js"),version:r.version}},"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/components.js":function(t,e,n){var r=n("./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js");t.exports=o;function o(s){var l={},u=[],c;function f(h){r.has(l,h)||(l[h]=!0,c.push(h),r.each(s.successors(h),f),r.each(s.predecessors(h),f))}return r.each(s.nodes(),function(h){c=[],f(h),c.length&&u.push(c)}),u}},"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/dfs.js":function(t,e,n){var r=n("./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js");t.exports=o;function o(l,u,c){r.isArray(u)||(u=[u]);var f=(l.isDirected()?l.successors:l.neighbors).bind(l),h=[],d={};return r.each(u,function(v){if(!l.hasNode(v))throw new Error("Graph does not have node: "+v);s(l,v,c==="post",d,f,h)}),h}function s(l,u,c,f,h,d){r.has(f,u)||(f[u]=!0,c||d.push(u),r.each(h(u),function(v){s(l,v,c,f,h,d)}),c&&d.push(u))}},"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/dijkstra-all.js":function(t,e,n){var r=n("./node_modules/_graphlib@2.1.8@graphlib/lib/alg/dijkstra.js"),o=n("./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js");t.exports=s;function s(l,u,c){return o.transform(l.nodes(),function(f,h){f[h]=r(l,h,u,c)},{})}},"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/dijkstra.js":function(t,e,n){var r=n("./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js"),o=n("./node_modules/_graphlib@2.1.8@graphlib/lib/data/priority-queue.js");t.exports=l;var s=r.constant(1);function l(c,f,h,d){return u(c,String(f),h||s,d||function(v){return c.outEdges(v)})}function u(c,f,h,d){var v={},g=new o,p,m,y=function(w){var x=w.v!==p?w.v:w.w,M=v[x],_=h(w),D=m.distance+_;if(_<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+w+" Weight: "+_);D0&&(p=g.removeMin(),m=v[p],m.distance!==Number.POSITIVE_INFINITY);)d(p).forEach(y);return v}},"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/find-cycles.js":function(t,e,n){var r=n("./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js"),o=n("./node_modules/_graphlib@2.1.8@graphlib/lib/alg/tarjan.js");t.exports=s;function s(l){return r.filter(o(l),function(u){return u.length>1||u.length===1&&l.hasEdge(u[0],u[0])})}},"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/floyd-warshall.js":function(t,e,n){var r=n("./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js");t.exports=s;var o=r.constant(1);function s(u,c,f){return l(u,c||o,f||function(h){return u.outEdges(h)})}function l(u,c,f){var h={},d=u.nodes();return d.forEach(function(v){h[v]={},h[v][v]={distance:0},d.forEach(function(g){v!==g&&(h[v][g]={distance:Number.POSITIVE_INFINITY})}),f(v).forEach(function(g){var p=g.v===v?g.w:g.v,m=c(g);h[v][p]={distance:m,predecessor:v}})}),d.forEach(function(v){var g=h[v];d.forEach(function(p){var m=h[p];d.forEach(function(y){var w=m[v],x=g[y],M=m[y],_=w.distance+x.distance;_0;){if(v=d.removeMin(),r.has(h,v))f.setEdge(v,h[v]);else{if(p)throw new Error("Input graph is not connected: "+u);p=!0}u.nodeEdges(v).forEach(g)}return f}},"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/tarjan.js":function(t,e,n){var r=n("./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js");t.exports=o;function o(s){var l=0,u=[],c={},f=[];function h(d){var v=c[d]={onStack:!0,lowlink:l,index:l++};if(u.push(d),s.successors(d).forEach(function(m){r.has(c,m)?c[m].onStack&&(v.lowlink=Math.min(v.lowlink,c[m].index)):(h(m),v.lowlink=Math.min(v.lowlink,c[m].lowlink))}),v.lowlink===v.index){var g=[],p;do p=u.pop(),c[p].onStack=!1,g.push(p);while(d!==p);f.push(g)}}return s.nodes().forEach(function(d){r.has(c,d)||h(d)}),f}},"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/topsort.js":function(t,e,n){var r=n("./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js");t.exports=o,o.CycleException=s;function o(l){var u={},c={},f=[];function h(d){if(r.has(c,d))throw new s;r.has(u,d)||(c[d]=!0,u[d]=!0,r.each(l.predecessors(d),h),delete c[d],f.push(d))}if(r.each(l.sinks(),h),r.size(u)!==l.nodeCount())throw new s;return f}function s(){}s.prototype=new Error},"./node_modules/_graphlib@2.1.8@graphlib/lib/data/priority-queue.js":function(t,e,n){var r=n("./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js");t.exports=o;function o(){this._arr=[],this._keyIndices={}}o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map(function(s){return s.key})},o.prototype.has=function(s){return r.has(this._keyIndices,s)},o.prototype.priority=function(s){var l=this._keyIndices[s];if(l!==void 0)return this._arr[l].priority},o.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(s,l){var u=this._keyIndices;if(s=String(s),!r.has(u,s)){var c=this._arr,f=c.length;return u[s]=f,c.push({key:s,priority:l}),this._decrease(f),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var s=this._arr.pop();return delete this._keyIndices[s.key],this._heapify(0),s.key},o.prototype.decrease=function(s,l){var u=this._keyIndices[s];if(l>this._arr[u].priority)throw new Error("New priority is greater than current priority. Key: "+s+" Old: "+this._arr[u].priority+" New: "+l);this._arr[u].priority=l,this._decrease(u)},o.prototype._heapify=function(s){var l=this._arr,u=2*s,c=u+1,f=s;u>1,!(l[c].priority1?y.setNode(w,p):y.setNode(w)}),this},u.prototype.setNode=function(g,p){return r.has(this._nodes,g)?(arguments.length>1&&(this._nodes[g]=p),this):(this._nodes[g]=arguments.length>1?p:this._defaultNodeLabelFn(g),this._isCompound&&(this._parent[g]=s,this._children[g]={},this._children[s][g]=!0),this._in[g]={},this._preds[g]={},this._out[g]={},this._sucs[g]={},++this._nodeCount,this)},u.prototype.node=function(g){return this._nodes[g]},u.prototype.hasNode=function(g){return r.has(this._nodes,g)},u.prototype.removeNode=function(g){var p=this;if(r.has(this._nodes,g)){var m=function(y){p.removeEdge(p._edgeObjs[y])};delete this._nodes[g],this._isCompound&&(this._removeFromParentsChildList(g),delete this._parent[g],r.each(this.children(g),function(y){p.setParent(y)}),delete this._children[g]),r.each(r.keys(this._in[g]),m),delete this._in[g],delete this._preds[g],r.each(r.keys(this._out[g]),m),delete this._out[g],delete this._sucs[g],--this._nodeCount}return this},u.prototype.setParent=function(g,p){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(p))p=s;else{p+="";for(var m=p;!r.isUndefined(m);m=this.parent(m))if(m===g)throw new Error("Setting "+p+" as parent of "+g+" would create a cycle");this.setNode(p)}return this.setNode(g),this._removeFromParentsChildList(g),this._parent[g]=p,this._children[p][g]=!0,this},u.prototype._removeFromParentsChildList=function(g){delete this._children[this._parent[g]][g]},u.prototype.parent=function(g){if(this._isCompound){var p=this._parent[g];if(p!==s)return p}},u.prototype.children=function(g){if(r.isUndefined(g)&&(g=s),this._isCompound){var p=this._children[g];if(p)return r.keys(p)}else{if(g===s)return this.nodes();if(this.hasNode(g))return[]}},u.prototype.predecessors=function(g){var p=this._preds[g];if(p)return r.keys(p)},u.prototype.successors=function(g){var p=this._sucs[g];if(p)return r.keys(p)},u.prototype.neighbors=function(g){var p=this.predecessors(g);if(p)return r.union(p,this.successors(g))},u.prototype.isLeaf=function(g){var p;return this.isDirected()?p=this.successors(g):p=this.neighbors(g),p.length===0},u.prototype.filterNodes=function(g){var p=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});p.setGraph(this.graph());var m=this;r.each(this._nodes,function(x,M){g(M)&&p.setNode(M,x)}),r.each(this._edgeObjs,function(x){p.hasNode(x.v)&&p.hasNode(x.w)&&p.setEdge(x,m.edge(x))});var y={};function w(x){var M=m.parent(x);return M===void 0||p.hasNode(M)?(y[x]=M,M):M in y?y[M]:w(M)}return this._isCompound&&r.each(p.nodes(),function(x){p.setParent(x,w(x))}),p},u.prototype.setDefaultEdgeLabel=function(g){return r.isFunction(g)||(g=r.constant(g)),this._defaultEdgeLabelFn=g,this},u.prototype.edgeCount=function(){return this._edgeCount},u.prototype.edges=function(){return r.values(this._edgeObjs)},u.prototype.setPath=function(g,p){var m=this,y=arguments;return r.reduce(g,function(w,x){return y.length>1?m.setEdge(w,x,p):m.setEdge(w,x),x}),this},u.prototype.setEdge=function(){var g,p,m,y,w=!1,x=arguments[0];typeof x=="object"&&x!==null&&"v"in x?(g=x.v,p=x.w,m=x.name,arguments.length===2&&(y=arguments[1],w=!0)):(g=x,p=arguments[1],m=arguments[3],arguments.length>2&&(y=arguments[2],w=!0)),g=""+g,p=""+p,r.isUndefined(m)||(m=""+m);var M=h(this._isDirected,g,p,m);if(r.has(this._edgeLabels,M))return w&&(this._edgeLabels[M]=y),this;if(!r.isUndefined(m)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(g),this.setNode(p),this._edgeLabels[M]=w?y:this._defaultEdgeLabelFn(g,p,m);var _=d(this._isDirected,g,p,m);return g=_.v,p=_.w,Object.freeze(_),this._edgeObjs[M]=_,c(this._preds[p],g),c(this._sucs[g],p),this._in[p][M]=_,this._out[g][M]=_,this._edgeCount++,this},u.prototype.edge=function(g,p,m){var y=arguments.length===1?v(this._isDirected,arguments[0]):h(this._isDirected,g,p,m);return this._edgeLabels[y]},u.prototype.hasEdge=function(g,p,m){var y=arguments.length===1?v(this._isDirected,arguments[0]):h(this._isDirected,g,p,m);return r.has(this._edgeLabels,y)},u.prototype.removeEdge=function(g,p,m){var y=arguments.length===1?v(this._isDirected,arguments[0]):h(this._isDirected,g,p,m),w=this._edgeObjs[y];return w&&(g=w.v,p=w.w,delete this._edgeLabels[y],delete this._edgeObjs[y],f(this._preds[p],g),f(this._sucs[g],p),delete this._in[p][y],delete this._out[g][y],this._edgeCount--),this},u.prototype.inEdges=function(g,p){var m=this._in[g];if(m){var y=r.values(m);return p?r.filter(y,function(w){return w.v===p}):y}},u.prototype.outEdges=function(g,p){var m=this._out[g];if(m){var y=r.values(m);return p?r.filter(y,function(w){return w.w===p}):y}},u.prototype.nodeEdges=function(g,p){var m=this.inEdges(g,p);if(m)return m.concat(this.outEdges(g,p))};function c(g,p){g[p]?g[p]++:g[p]=1}function f(g,p){--g[p]||delete g[p]}function h(g,p,m,y){var w=""+p,x=""+m;if(!g&&w>x){var M=w;w=x,x=M}return w+l+x+l+(r.isUndefined(y)?o:y)}function d(g,p,m,y){var w=""+p,x=""+m;if(!g&&w>x){var M=w;w=x,x=M}var _={v:w,w:x};return y&&(_.name=y),_}function v(g,p){return h(g,p.v,p.w,p.name)}},"./node_modules/_graphlib@2.1.8@graphlib/lib/index.js":function(t,e,n){t.exports={Graph:n("./node_modules/_graphlib@2.1.8@graphlib/lib/graph.js"),version:n("./node_modules/_graphlib@2.1.8@graphlib/lib/version.js")}},"./node_modules/_graphlib@2.1.8@graphlib/lib/json.js":function(t,e,n){var r=n("./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js"),o=n("./node_modules/_graphlib@2.1.8@graphlib/lib/graph.js");t.exports={write:s,read:c};function s(f){var h={options:{directed:f.isDirected(),multigraph:f.isMultigraph(),compound:f.isCompound()},nodes:l(f),edges:u(f)};return r.isUndefined(f.graph())||(h.value=r.clone(f.graph())),h}function l(f){return r.map(f.nodes(),function(h){var d=f.node(h),v=f.parent(h),g={v:h};return r.isUndefined(d)||(g.value=d),r.isUndefined(v)||(g.parent=v),g})}function u(f){return r.map(f.edges(),function(h){var d=f.edge(h),v={v:h.v,w:h.w};return r.isUndefined(h.name)||(v.name=h.name),r.isUndefined(d)||(v.value=d),v})}function c(f){var h=new o(f.options).setGraph(f.value);return r.each(f.nodes,function(d){h.setNode(d.v,d.value),d.parent&&h.setParent(d.v,d.parent)}),r.each(f.edges,function(d){h.setEdge({v:d.v,w:d.w,name:d.name},d.value)}),h}},"./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js":function(t,e,n){var r;try{r={clone:n("./node_modules/_lodash@4.17.20@lodash/clone.js"),constant:n("./node_modules/_lodash@4.17.20@lodash/constant.js"),each:n("./node_modules/_lodash@4.17.20@lodash/each.js"),filter:n("./node_modules/_lodash@4.17.20@lodash/filter.js"),has:n("./node_modules/_lodash@4.17.20@lodash/has.js"),isArray:n("./node_modules/_lodash@4.17.20@lodash/isArray.js"),isEmpty:n("./node_modules/_lodash@4.17.20@lodash/isEmpty.js"),isFunction:n("./node_modules/_lodash@4.17.20@lodash/isFunction.js"),isUndefined:n("./node_modules/_lodash@4.17.20@lodash/isUndefined.js"),keys:n("./node_modules/_lodash@4.17.20@lodash/keys.js"),map:n("./node_modules/_lodash@4.17.20@lodash/map.js"),reduce:n("./node_modules/_lodash@4.17.20@lodash/reduce.js"),size:n("./node_modules/_lodash@4.17.20@lodash/size.js"),transform:n("./node_modules/_lodash@4.17.20@lodash/transform.js"),union:n("./node_modules/_lodash@4.17.20@lodash/union.js"),values:n("./node_modules/_lodash@4.17.20@lodash/values.js")}}catch(o){}r||(r=window._),t.exports=r},"./node_modules/_graphlib@2.1.8@graphlib/lib/version.js":function(t,e){t.exports="2.1.8"},"./node_modules/_isarray@0.0.1@isarray/index.js":function(t,e){t.exports=Array.isArray||function(n){return Object.prototype.toString.call(n)=="[object Array]"}},"./node_modules/_lodash@4.17.20@lodash/_DataView.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_getNative.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_root.js"),s=r(o,"DataView");t.exports=s},"./node_modules/_lodash@4.17.20@lodash/_Hash.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_hashClear.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_hashDelete.js"),s=n("./node_modules/_lodash@4.17.20@lodash/_hashGet.js"),l=n("./node_modules/_lodash@4.17.20@lodash/_hashHas.js"),u=n("./node_modules/_lodash@4.17.20@lodash/_hashSet.js");function c(f){var h=-1,d=f==null?0:f.length;for(this.clear();++h-1}t.exports=o},"./node_modules/_lodash@4.17.20@lodash/_arrayIncludesWith.js":function(t,e){function n(r,o,s){for(var l=-1,u=r==null?0:r.length;++l0&&c(g)?u>1?s(g,u-1,c,f,h):r(h,g):f||(h[h.length]=g)}return h}t.exports=s},"./node_modules/_lodash@4.17.20@lodash/_baseFor.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_createBaseFor.js"),o=r();t.exports=o},"./node_modules/_lodash@4.17.20@lodash/_baseForOwn.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseFor.js"),o=n("./node_modules/_lodash@4.17.20@lodash/keys.js");function s(l,u){return l&&r(l,u,o)}t.exports=s},"./node_modules/_lodash@4.17.20@lodash/_baseGet.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_castPath.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_toKey.js");function s(l,u){u=r(u,l);for(var c=0,f=u.length;l!=null&&co}t.exports=n},"./node_modules/_lodash@4.17.20@lodash/_baseHas.js":function(t,e){var n=Object.prototype,r=n.hasOwnProperty;function o(s,l){return s!=null&&r.call(s,l)}t.exports=o},"./node_modules/_lodash@4.17.20@lodash/_baseHasIn.js":function(t,e){function n(r,o){return r!=null&&o in Object(r)}t.exports=n},"./node_modules/_lodash@4.17.20@lodash/_baseIndexOf.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseFindIndex.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_baseIsNaN.js"),s=n("./node_modules/_lodash@4.17.20@lodash/_strictIndexOf.js");function l(u,c,f){return c===c?s(u,c,f):r(u,o,f)}t.exports=l},"./node_modules/_lodash@4.17.20@lodash/_baseIsArguments.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseGetTag.js"),o=n("./node_modules/_lodash@4.17.20@lodash/isObjectLike.js"),s="[object Arguments]";function l(u){return o(u)&&r(u)==s}t.exports=l},"./node_modules/_lodash@4.17.20@lodash/_baseIsEqual.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseIsEqualDeep.js"),o=n("./node_modules/_lodash@4.17.20@lodash/isObjectLike.js");function s(l,u,c,f,h){return l===u?!0:l==null||u==null||!o(l)&&!o(u)?l!==l&&u!==u:r(l,u,c,f,s,h)}t.exports=s},"./node_modules/_lodash@4.17.20@lodash/_baseIsEqualDeep.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_Stack.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_equalArrays.js"),s=n("./node_modules/_lodash@4.17.20@lodash/_equalByTag.js"),l=n("./node_modules/_lodash@4.17.20@lodash/_equalObjects.js"),u=n("./node_modules/_lodash@4.17.20@lodash/_getTag.js"),c=n("./node_modules/_lodash@4.17.20@lodash/isArray.js"),f=n("./node_modules/_lodash@4.17.20@lodash/isBuffer.js"),h=n("./node_modules/_lodash@4.17.20@lodash/isTypedArray.js"),d=1,v="[object Arguments]",g="[object Array]",p="[object Object]",m=Object.prototype,y=m.hasOwnProperty;function w(x,M,_,D,C,F){var k=c(x),j=c(M),V=k?g:u(x),st=j?g:u(M);V=V==v?p:V,st=st==v?p:st;var yt=V==p,Q=st==p,it=V==st;if(it&&f(x)){if(!f(M))return!1;k=!0,yt=!1}if(it&&!yt)return F||(F=new r),k||h(x)?o(x,M,_,D,C,F):s(x,M,V,_,D,C,F);if(!(_&d)){var Pt=yt&&y.call(x,"__wrapped__"),ht=Q&&y.call(M,"__wrapped__");if(Pt||ht){var lt=Pt?x.value():x,U=ht?M.value():M;return F||(F=new r),C(lt,U,_,D,F)}}return it?(F||(F=new r),l(x,M,_,D,C,F)):!1}t.exports=w},"./node_modules/_lodash@4.17.20@lodash/_baseIsMap.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_getTag.js"),o=n("./node_modules/_lodash@4.17.20@lodash/isObjectLike.js"),s="[object Map]";function l(u){return o(u)&&r(u)==s}t.exports=l},"./node_modules/_lodash@4.17.20@lodash/_baseIsMatch.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_Stack.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_baseIsEqual.js"),s=1,l=2;function u(c,f,h,d){var v=h.length,g=v,p=!d;if(c==null)return!g;for(c=Object(c);v--;){var m=h[v];if(p&&m[2]?m[1]!==c[m[0]]:!(m[0]in c))return!1}for(;++v=f){var _=v?null:u(d);if(_)return c(_);w=!1,m=l,M=new r}else M=v?[]:x;t:for(;++pl||h&&d&&g&&!v&&!p||c&&d&&g||!u&&g||!f)return 1;if(!c&&!h&&!p&&s=v)return g;var p=u[c];return g*(p=="desc"?-1:1)}}return s.index-l.index}t.exports=o},"./node_modules/_lodash@4.17.20@lodash/_copyArray.js":function(t,e){function n(r,o){var s=-1,l=r.length;for(o||(o=Array(l));++s1?c[h-1]:void 0,v=h>2?c[2]:void 0;for(d=l.length>3&&typeof d=="function"?(h--,d):void 0,v&&o(c[0],c[1],v)&&(d=h<3?void 0:d,h=1),u=Object(u);++f-1?d[v?c[g]:g]:void 0}}t.exports=l},"./node_modules/_lodash@4.17.20@lodash/_createRange.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseRange.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_isIterateeCall.js"),s=n("./node_modules/_lodash@4.17.20@lodash/toFinite.js");function l(u){return function(c,f,h){return h&&typeof h!="number"&&o(c,f,h)&&(f=h=void 0),c=s(c),f===void 0?(f=c,c=0):f=s(f),h=h===void 0?cy))return!1;var x=p.get(f),M=p.get(h);if(x&&M)return x==h&&M==f;var _=-1,D=!0,C=d&u?new r:void 0;for(p.set(f,h),p.set(h,f);++_-1&&s%1==0&&s-1}t.exports=o},"./node_modules/_lodash@4.17.20@lodash/_listCacheSet.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_assocIndexOf.js");function o(s,l){var u=this.__data__,c=r(u,s);return c<0?(++this.size,u.push([s,l])):u[c][1]=l,this}t.exports=o},"./node_modules/_lodash@4.17.20@lodash/_mapCacheClear.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_Hash.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_ListCache.js"),s=n("./node_modules/_lodash@4.17.20@lodash/_Map.js");function l(){this.size=0,this.__data__={hash:new r,map:new(s||o),string:new r}}t.exports=l},"./node_modules/_lodash@4.17.20@lodash/_mapCacheDelete.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_getMapData.js");function o(s){var l=r(this,s).delete(s);return this.size-=l?1:0,l}t.exports=o},"./node_modules/_lodash@4.17.20@lodash/_mapCacheGet.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_getMapData.js");function o(s){return r(this,s).get(s)}t.exports=o},"./node_modules/_lodash@4.17.20@lodash/_mapCacheHas.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_getMapData.js");function o(s){return r(this,s).has(s)}t.exports=o},"./node_modules/_lodash@4.17.20@lodash/_mapCacheSet.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_getMapData.js");function o(s,l){var u=r(this,s),c=u.size;return u.set(s,l),this.size+=u.size==c?0:1,this}t.exports=o},"./node_modules/_lodash@4.17.20@lodash/_mapToArray.js":function(t,e){function n(r){var o=-1,s=Array(r.size);return r.forEach(function(l,u){s[++o]=[u,l]}),s}t.exports=n},"./node_modules/_lodash@4.17.20@lodash/_matchesStrictComparable.js":function(t,e){function n(r,o){return function(s){return s==null?!1:s[r]===o&&(o!==void 0||r in Object(s))}}t.exports=n},"./node_modules/_lodash@4.17.20@lodash/_memoizeCapped.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/memoize.js"),o=500;function s(l){var u=r(l,function(f){return c.size===o&&c.clear(),f}),c=u.cache;return u}t.exports=s},"./node_modules/_lodash@4.17.20@lodash/_nativeCreate.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_getNative.js"),o=r(Object,"create");t.exports=o},"./node_modules/_lodash@4.17.20@lodash/_nativeKeys.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_overArg.js"),o=r(Object.keys,Object);t.exports=o},"./node_modules/_lodash@4.17.20@lodash/_nativeKeysIn.js":function(t,e){function n(r){var o=[];if(r!=null)for(var s in Object(r))o.push(s);return o}t.exports=n},"./node_modules/_lodash@4.17.20@lodash/_nodeUtil.js":function(t,e,n){(function(r){var o=n("./node_modules/_lodash@4.17.20@lodash/_freeGlobal.js"),s=e&&!e.nodeType&&e,l=s&&typeof r=="object"&&r&&!r.nodeType&&r,u=l&&l.exports===s,c=u&&o.process,f=function(){try{var h=l&&l.require&&l.require("util").types;return h||c&&c.binding&&c.binding("util")}catch(d){}}();r.exports=f}).call(this,n("./node_modules/_webpack@4.46.0@webpack/buildin/module.js")(t))},"./node_modules/_lodash@4.17.20@lodash/_objectToString.js":function(t,e){var n=Object.prototype,r=n.toString;function o(s){return r.call(s)}t.exports=o},"./node_modules/_lodash@4.17.20@lodash/_overArg.js":function(t,e){function n(r,o){return function(s){return r(o(s))}}t.exports=n},"./node_modules/_lodash@4.17.20@lodash/_overRest.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_apply.js"),o=Math.max;function s(l,u,c){return u=o(u===void 0?l.length-1:u,0),function(){for(var f=arguments,h=-1,d=o(f.length-u,0),v=Array(d);++h0){if(++u>=n)return arguments[0]}else u=0;return l.apply(void 0,arguments)}}t.exports=s},"./node_modules/_lodash@4.17.20@lodash/_stackClear.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_ListCache.js");function o(){this.__data__=new r,this.size=0}t.exports=o},"./node_modules/_lodash@4.17.20@lodash/_stackDelete.js":function(t,e){function n(r){var o=this.__data__,s=o.delete(r);return this.size=o.size,s}t.exports=n},"./node_modules/_lodash@4.17.20@lodash/_stackGet.js":function(t,e){function n(r){return this.__data__.get(r)}t.exports=n},"./node_modules/_lodash@4.17.20@lodash/_stackHas.js":function(t,e){function n(r){return this.__data__.has(r)}t.exports=n},"./node_modules/_lodash@4.17.20@lodash/_stackSet.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_ListCache.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_Map.js"),s=n("./node_modules/_lodash@4.17.20@lodash/_MapCache.js"),l=200;function u(c,f){var h=this.__data__;if(h instanceof r){var d=h.__data__;if(!o||d.length2?d[2]:void 0;for(p&&s(d[0],d[1],p)&&(g=1);++v-1&&o%1==0&&o<=n}t.exports=r},"./node_modules/_lodash@4.17.20@lodash/isMap.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseIsMap.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_baseUnary.js"),s=n("./node_modules/_lodash@4.17.20@lodash/_nodeUtil.js"),l=s&&s.isMap,u=l?o(l):r;t.exports=u},"./node_modules/_lodash@4.17.20@lodash/isObject.js":function(t,e){function n(r){var o=typeof r;return r!=null&&(o=="object"||o=="function")}t.exports=n},"./node_modules/_lodash@4.17.20@lodash/isObjectLike.js":function(t,e){function n(r){return r!=null&&typeof r=="object"}t.exports=n},"./node_modules/_lodash@4.17.20@lodash/isPlainObject.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseGetTag.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_getPrototype.js"),s=n("./node_modules/_lodash@4.17.20@lodash/isObjectLike.js"),l="[object Object]",u=Function.prototype,c=Object.prototype,f=u.toString,h=c.hasOwnProperty,d=f.call(Object);function v(g){if(!s(g)||r(g)!=l)return!1;var p=o(g);if(p===null)return!0;var m=h.call(p,"constructor")&&p.constructor;return typeof m=="function"&&m instanceof m&&f.call(m)==d}t.exports=v},"./node_modules/_lodash@4.17.20@lodash/isSet.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseIsSet.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_baseUnary.js"),s=n("./node_modules/_lodash@4.17.20@lodash/_nodeUtil.js"),l=s&&s.isSet,u=l?o(l):r;t.exports=u},"./node_modules/_lodash@4.17.20@lodash/isString.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseGetTag.js"),o=n("./node_modules/_lodash@4.17.20@lodash/isArray.js"),s=n("./node_modules/_lodash@4.17.20@lodash/isObjectLike.js"),l="[object String]";function u(c){return typeof c=="string"||!o(c)&&s(c)&&r(c)==l}t.exports=u},"./node_modules/_lodash@4.17.20@lodash/isSymbol.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseGetTag.js"),o=n("./node_modules/_lodash@4.17.20@lodash/isObjectLike.js"),s="[object Symbol]";function l(u){return typeof u=="symbol"||o(u)&&r(u)==s}t.exports=l},"./node_modules/_lodash@4.17.20@lodash/isTypedArray.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseIsTypedArray.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_baseUnary.js"),s=n("./node_modules/_lodash@4.17.20@lodash/_nodeUtil.js"),l=s&&s.isTypedArray,u=l?o(l):r;t.exports=u},"./node_modules/_lodash@4.17.20@lodash/isUndefined.js":function(t,e){function n(r){return r===void 0}t.exports=n},"./node_modules/_lodash@4.17.20@lodash/keys.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_arrayLikeKeys.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_baseKeys.js"),s=n("./node_modules/_lodash@4.17.20@lodash/isArrayLike.js");function l(u){return s(u)?r(u):o(u)}t.exports=l},"./node_modules/_lodash@4.17.20@lodash/keysIn.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_arrayLikeKeys.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_baseKeysIn.js"),s=n("./node_modules/_lodash@4.17.20@lodash/isArrayLike.js");function l(u){return s(u)?r(u,!0):o(u)}t.exports=l},"./node_modules/_lodash@4.17.20@lodash/last.js":function(t,e){function n(r){var o=r==null?0:r.length;return o?r[o-1]:void 0}t.exports=n},"./node_modules/_lodash@4.17.20@lodash/map.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_arrayMap.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_baseIteratee.js"),s=n("./node_modules/_lodash@4.17.20@lodash/_baseMap.js"),l=n("./node_modules/_lodash@4.17.20@lodash/isArray.js");function u(c,f){var h=l(c)?r:s;return h(c,o(f,3))}t.exports=u},"./node_modules/_lodash@4.17.20@lodash/mapValues.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseAssignValue.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_baseForOwn.js"),s=n("./node_modules/_lodash@4.17.20@lodash/_baseIteratee.js");function l(u,c){var f={};return c=s(c,3),o(u,function(h,d,v){r(f,d,c(h,d,v))}),f}t.exports=l},"./node_modules/_lodash@4.17.20@lodash/max.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseExtremum.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_baseGt.js"),s=n("./node_modules/_lodash@4.17.20@lodash/identity.js");function l(u){return u&&u.length?r(u,s,o):void 0}t.exports=l},"./node_modules/_lodash@4.17.20@lodash/memoize.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_MapCache.js"),o="Expected a function";function s(l,u){if(typeof l!="function"||u!=null&&typeof u!="function")throw new TypeError(o);var c=function(){var f=arguments,h=u?u.apply(this,f):f[0],d=c.cache;if(d.has(h))return d.get(h);var v=l.apply(this,f);return c.cache=d.set(h,v)||d,v};return c.cache=new(s.Cache||r),c}s.Cache=r,t.exports=s},"./node_modules/_lodash@4.17.20@lodash/merge.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseMerge.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_createAssigner.js"),s=o(function(l,u,c){r(l,u,c)});t.exports=s},"./node_modules/_lodash@4.17.20@lodash/min.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseExtremum.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_baseLt.js"),s=n("./node_modules/_lodash@4.17.20@lodash/identity.js");function l(u){return u&&u.length?r(u,s,o):void 0}t.exports=l},"./node_modules/_lodash@4.17.20@lodash/minBy.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseExtremum.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_baseIteratee.js"),s=n("./node_modules/_lodash@4.17.20@lodash/_baseLt.js");function l(u,c){return u&&u.length?r(u,o(c,2),s):void 0}t.exports=l},"./node_modules/_lodash@4.17.20@lodash/noop.js":function(t,e){function n(){}t.exports=n},"./node_modules/_lodash@4.17.20@lodash/now.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_root.js"),o=function(){return r.Date.now()};t.exports=o},"./node_modules/_lodash@4.17.20@lodash/pick.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_basePick.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_flatRest.js"),s=o(function(l,u){return l==null?{}:r(l,u)});t.exports=s},"./node_modules/_lodash@4.17.20@lodash/property.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseProperty.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_basePropertyDeep.js"),s=n("./node_modules/_lodash@4.17.20@lodash/_isKey.js"),l=n("./node_modules/_lodash@4.17.20@lodash/_toKey.js");function u(c){return s(c)?r(l(c)):o(c)}t.exports=u},"./node_modules/_lodash@4.17.20@lodash/range.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_createRange.js"),o=r();t.exports=o},"./node_modules/_lodash@4.17.20@lodash/reduce.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_arrayReduce.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_baseEach.js"),s=n("./node_modules/_lodash@4.17.20@lodash/_baseIteratee.js"),l=n("./node_modules/_lodash@4.17.20@lodash/_baseReduce.js"),u=n("./node_modules/_lodash@4.17.20@lodash/isArray.js");function c(f,h,d){var v=u(f)?r:l,g=arguments.length<3;return v(f,s(h,4),d,g,o)}t.exports=c},"./node_modules/_lodash@4.17.20@lodash/size.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseKeys.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_getTag.js"),s=n("./node_modules/_lodash@4.17.20@lodash/isArrayLike.js"),l=n("./node_modules/_lodash@4.17.20@lodash/isString.js"),u=n("./node_modules/_lodash@4.17.20@lodash/_stringSize.js"),c="[object Map]",f="[object Set]";function h(d){if(d==null)return 0;if(s(d))return l(d)?u(d):d.length;var v=o(d);return v==c||v==f?d.size:r(d).length}t.exports=h},"./node_modules/_lodash@4.17.20@lodash/sortBy.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseFlatten.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_baseOrderBy.js"),s=n("./node_modules/_lodash@4.17.20@lodash/_baseRest.js"),l=n("./node_modules/_lodash@4.17.20@lodash/_isIterateeCall.js"),u=s(function(c,f){if(c==null)return[];var h=f.length;return h>1&&l(c,f[0],f[1])?f=[]:h>2&&l(f[0],f[1],f[2])&&(f=[f[0]]),o(c,r(f,1),[])});t.exports=u},"./node_modules/_lodash@4.17.20@lodash/stubArray.js":function(t,e){function n(){return[]}t.exports=n},"./node_modules/_lodash@4.17.20@lodash/stubFalse.js":function(t,e){function n(){return!1}t.exports=n},"./node_modules/_lodash@4.17.20@lodash/toFinite.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/toNumber.js"),o=1/0,s=17976931348623157e292;function l(u){if(!u)return u===0?u:0;if(u=r(u),u===o||u===-o){var c=u<0?-1:1;return c*s}return u===u?u:0}t.exports=l},"./node_modules/_lodash@4.17.20@lodash/toInteger.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/toFinite.js");function o(s){var l=r(s),u=l%1;return l===l?u?l-u:l:0}t.exports=o},"./node_modules/_lodash@4.17.20@lodash/toNumber.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/isObject.js"),o=n("./node_modules/_lodash@4.17.20@lodash/isSymbol.js"),s=0/0,l=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,f=/^0o[0-7]+$/i,h=parseInt;function d(v){if(typeof v=="number")return v;if(o(v))return s;if(r(v)){var g=typeof v.valueOf=="function"?v.valueOf():v;v=r(g)?g+"":g}if(typeof v!="string")return v===0?v:+v;v=v.replace(l,"");var p=c.test(v);return p||f.test(v)?h(v.slice(2),p?2:8):u.test(v)?s:+v}t.exports=d},"./node_modules/_lodash@4.17.20@lodash/toPlainObject.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_copyObject.js"),o=n("./node_modules/_lodash@4.17.20@lodash/keysIn.js");function s(l){return r(l,o(l))}t.exports=s},"./node_modules/_lodash@4.17.20@lodash/toString.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseToString.js");function o(s){return s==null?"":r(s)}t.exports=o},"./node_modules/_lodash@4.17.20@lodash/transform.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_arrayEach.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_baseCreate.js"),s=n("./node_modules/_lodash@4.17.20@lodash/_baseForOwn.js"),l=n("./node_modules/_lodash@4.17.20@lodash/_baseIteratee.js"),u=n("./node_modules/_lodash@4.17.20@lodash/_getPrototype.js"),c=n("./node_modules/_lodash@4.17.20@lodash/isArray.js"),f=n("./node_modules/_lodash@4.17.20@lodash/isBuffer.js"),h=n("./node_modules/_lodash@4.17.20@lodash/isFunction.js"),d=n("./node_modules/_lodash@4.17.20@lodash/isObject.js"),v=n("./node_modules/_lodash@4.17.20@lodash/isTypedArray.js");function g(p,m,y){var w=c(p),x=w||f(p)||v(p);if(m=l(m,4),y==null){var M=p&&p.constructor;x?y=w?new M:[]:d(p)?y=h(M)?o(u(p)):{}:y={}}return(x?r:s)(p,function(_,D,C){return m(y,_,D,C)}),y}t.exports=g},"./node_modules/_lodash@4.17.20@lodash/union.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseFlatten.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_baseRest.js"),s=n("./node_modules/_lodash@4.17.20@lodash/_baseUniq.js"),l=n("./node_modules/_lodash@4.17.20@lodash/isArrayLikeObject.js"),u=o(function(c){return s(r(c,1,l,!0))});t.exports=u},"./node_modules/_lodash@4.17.20@lodash/uniqueId.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/toString.js"),o=0;function s(l){var u=++o;return r(l)+u}t.exports=s},"./node_modules/_lodash@4.17.20@lodash/values.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_baseValues.js"),o=n("./node_modules/_lodash@4.17.20@lodash/keys.js");function s(l){return l==null?[]:r(l,o(l))}t.exports=s},"./node_modules/_lodash@4.17.20@lodash/zipObject.js":function(t,e,n){var r=n("./node_modules/_lodash@4.17.20@lodash/_assignValue.js"),o=n("./node_modules/_lodash@4.17.20@lodash/_baseZipObject.js");function s(l,u){return o(l||[],u||[],r)}t.exports=s},"./node_modules/_parse-svg-path@0.1.2@parse-svg-path/index.js":function(t,e){t.exports=o;var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},r=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function o(u){var c=[];return u.replace(r,function(f,h,d){var v=h.toLowerCase();for(d=l(d),v=="m"&&d.length>2&&(c.push([h].concat(d.splice(0,2))),v="l",h=h=="m"?"l":"L");;){if(d.length==n[v])return d.unshift(h),c.push(d);if(d.length=h){var F=(m-h)/(m-g[2]),k=[v[0]*(1-F)+g[0]*F,v[1]*(1-F)+g[1]*F];return{length:m,pos:k}}g[0]=v[0],g[1]=v[1],g[2]=m}}else if(w[0]==="Q"){g[0]=p[0]=v[0],g[1]=p[1]=v[1],g[2]=m;for(var x=100,M=0;M<=x;M++){var _=M/x,D=st(w,_),C=yt(w,_);if(m+=u(v[0],v[1],D,C),v[0]=D,v[1]=C,typeof h=="number"&&m>=h){var F=(m-h)/(m-g[2]),k=[v[0]*(1-F)+g[0]*F,v[1]*(1-F)+g[1]*F];return{length:m,pos:k}}g[0]=v[0],g[1]=v[1],g[2]=m}}else if(w[0]==="L"){if(g[0]=v[0],g[1]=v[1],g[2]=m,m+=u(v[0],v[1],w[1],w[2]),v[0]=w[1],v[1]=w[2],typeof h=="number"&&m>=h){var F=(m-h)/(m-g[2]),k=[v[0]*(1-F)+g[0]*F,v[1]*(1-F)+g[1]*F];return{length:m,pos:k}}g[0]=v[0],g[1]=v[1],g[2]=m}}return{length:m,pos:v};function j(Q,it){return Math.pow(1-it,3)*p[0]+3*Math.pow(1-it,2)*it*Q[1]+3*(1-it)*Math.pow(it,2)*Q[3]+Math.pow(it,3)*Q[5]}function V(Q,it){return Math.pow(1-it,3)*p[1]+3*Math.pow(1-it,2)*it*Q[2]+3*(1-it)*Math.pow(it,2)*Q[4]+Math.pow(it,3)*Q[6]}function st(Q,it){return Math.pow(1-it,2)*p[0]+2*(1-it)*it*Q[1]+Math.pow(it,2)*Q[3]}function yt(Q,it){return Math.pow(1-it,2)*p[1]+2*(1-it)*it*Q[2]+Math.pow(it,2)*Q[4]}};function u(h,d,v,g){var p=h-v,m=d-g;return Math.sqrt(p*p+m*m)}function c(h){for(var d,v=0,g=0,p={S:{to:"C",x:3},T:{to:"Q",x:1}},m=0,y=h.length;mMath.abs(x[D][C])&&(C=F);for(var k=D;k=D;st--)x[st][V]-=x[st][D]*x[D][V]/x[D][D]}for(var yt=M-1;yt>=0;yt--){for(var Q=0,it=yt+1;it=0;U--)U>1?lt+=it[U]+"x^"+U+" + ":U===1?lt+=it[U]+"x + ":lt+=it[U];return{string:lt,points:ht,predict:Pt,equation:[].concat(f(it)).reverse(),r2:g(d(w,ht),x.precision)}}};function m(){var y=function(x,M){return c({_round:g},x,u({},M,function(_,D){return p[M](_,c({},h,D))}))};return Object.keys(p).reduce(y,{})}l.exports=m()})},"./node_modules/_simple-statistics@6.1.1@simple-statistics/dist/simple-statistics.min.js":function(t,e,n){(function(r,o){o(e)})(this,function(r){function o(S){if(S.length===0)return 0;for(var B,A=S[0],z=0,J=1;J=Math.abs(S[J])?z+=A-B+S[J]:z+=S[J]-B+A,A=B;return A+z}function s(S){if(S.length===0)throw new Error("mean requires at least one data point");return o(S)/S.length}function l(S,B){var A,z,J=s(S),pt=0;if(B===2)for(z=0;zB&&(B=S[A]);return B}function g(S,B){var A=S.length*B;if(S.length===0)throw new Error("quantile requires at least one data point.");if(B<0||1Yt&&m(S,A,z);SeYt;)Ke--}S[A]===Yt?m(S,A,Ke):m(S,++Ke,z),Ke<=B&&(A=Ke+1),B<=Ke&&(z=Ke-1)}}function m(S,B,A){var z=S[B];S[B]=S[A],S[A]=z}function y(S,B){var A=S.slice();if(Array.isArray(B)){(function(pt,It){for(var Zt=[0],Lt=0;LtS[S.length-1])return 1;var A=function(pt,It){for(var Zt=0,Lt=0,Yt=pt.length;Lt>>1]?Yt=Zt:Lt=-~Zt;return Lt}(S,B);if(S[A]!==B)return A/S.length;A++;var z=function(pt,It){for(var Zt=0,Lt=0,Yt=pt.length;Lt=pt[Zt=Lt+Yt>>>1]?Lt=-~Zt:Yt=Zt;return Lt}(S,B);if(z===A)return A/S.length;var J=z-A+1;return J*(z+A)/2/J/S.length}function D(S){var B=y(S,.75),A=y(S,.25);if(typeof B=="number"&&typeof A=="number")return B-A}function C(S){return+y(S,.5)}function F(S){for(var B=C(S),A=[],z=0;z=z[A][Zt]);--on)(Se=yt(Lt,Zt,pt,It)+z[A-1][Lt-1])A&&(A=S[z]),S[z]S.length)throw new Error("cannot generate more classes than there are data values");var A=h(S);if(V(A)===1)return[A];var z=st(B,A.length),J=st(B,A.length);(function(Yt,Se,Ke){for(var fn,on=Se[0].length,mn=Yt[Math.floor(on/2)],Sn=[],xn=[],bn=0;bn=Math.abs(J)&&(fn+=1);else if(A==="greater")for(Lt=0;Lt<=z;Lt++)pt[Lt]>=J&&(fn+=1);else for(Lt=0;Lt<=z;Lt++)pt[Lt]<=J&&(fn+=1);return fn/z},r.bisect=function(S,B,A,z,J){if(typeof S!="function")throw new TypeError("func must be a function");for(var pt=0;ptst&&(st=Pt[0]),Pt[1]yt&&(yt=Pt[1])}function it(Pt){switch(Pt.type){case"GeometryCollection":Pt.geometries.forEach(it);break;case"Point":Q(Pt.coordinates);break;case"MultiPoint":Pt.coordinates.forEach(Q);break}}C.arcs.forEach(function(Pt){for(var ht=-1,lt=Pt.length,U;++htst&&(st=U[0]),U[1]yt&&(yt=U[1])});for(k in C.objects)it(C.objects[k]);return[j,V,st,yt]}function u(C,F){for(var k,j=C.length,V=j-F;V<--j;)k=C[V],C[V++]=C[j],C[j]=k}function c(C,F){return typeof F=="string"&&(F=C.objects[F]),F.type==="GeometryCollection"?{type:"FeatureCollection",features:F.geometries.map(function(k){return f(C,k)})}:f(C,F)}function f(C,F){var k=F.id,j=F.bbox,V=F.properties==null?{}:F.properties,st=h(C,F);return k==null&&j==null?{type:"Feature",properties:V,geometry:st}:j==null?{type:"Feature",id:k,properties:V,geometry:st}:{type:"Feature",id:k,bbox:j,properties:V,geometry:st}}function h(C,F){var k=s(C.transform),j=C.arcs;function V(ht,lt){lt.length&<.pop();for(var U=j[ht<0?~ht:ht],xt=0,Gt=U.length;xt1)j=p(C,F,k);else for(V=0,j=new Array(st=C.arcs.length);V1)for(var lt=1,U=Q(Pt[0]),xt,Gt;ltU&&(Gt=Pt[0],Pt[0]=Pt[lt],Pt[lt]=Gt,U=xt);return Pt}).filter(function(it){return it.length>0})}}function x(C,F){for(var k=0,j=C.length;k>>1;C[V]=2))throw new Error("n must be \u22652");it=C.bbox||l(C);var k=it[0],j=it[1],V=it[2],st=it[3],yt;F={scale:[V-k?(V-k)/(yt-1):1,st-j?(st-j)/(yt-1):1],translate:[k,j]}}else it=C.bbox;var Q=_(F),it,Pt,ht=C.objects,lt={};function U(Bt){return Q(Bt)}function xt(Bt){var Qt;switch(Bt.type){case"GeometryCollection":Qt={type:"GeometryCollection",geometries:Bt.geometries.map(xt)};break;case"Point":Qt={type:"Point",coordinates:U(Bt.coordinates)};break;case"MultiPoint":Qt={type:"MultiPoint",coordinates:Bt.coordinates.map(U)};break;default:return Bt}return Bt.id!=null&&(Qt.id=Bt.id),Bt.bbox!=null&&(Qt.bbox=Bt.bbox),Bt.properties!=null&&(Qt.properties=Bt.properties),Qt}function Gt(Bt){var Qt=0,Ie=1,_e=Bt.length,Ue,Fe=new Array(_e);for(Fe[0]=Q(Bt[0],0);++Qt<_e;)((Ue=Q(Bt[Qt],Qt))[0]||Ue[1])&&(Fe[Ie++]=Ue);return Ie===1&&(Fe[Ie++]=[0,0]),Fe.length=Ie,Fe}for(Pt in ht)lt[Pt]=xt(ht[Pt]);return{type:"Topology",bbox:it,transform:F,objects:lt,arcs:C.arcs.map(Gt)}}r.bbox=l,r.feature=c,r.merge=y,r.mergeArcs=w,r.mesh=v,r.meshArcs=g,r.neighbors=M,r.quantize=D,r.transform=s,r.untransform=_,Object.defineProperty(r,"__esModule",{value:!0})})},"./node_modules/_tslib@2.1.0@tslib/tslib.js":function(t,e,n){(function(r){var o,s;/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var l,u,c,f,h,d,v,g,p,m,y,w,x,M,_,D,C,F,k,j,V,st,yt,Q;(function(it){var Pt=typeof r=="object"?r:typeof self=="object"?self:typeof this=="object"?this:{};o=[e],s=function(lt){it(ht(Pt,ht(lt)))}.apply(e,o),s!==void 0&&(t.exports=s);function ht(lt,U){return lt!==Pt&&(typeof Object.create=="function"?Object.defineProperty(lt,"__esModule",{value:!0}):lt.__esModule=!0),function(xt,Gt){return lt[xt]=U?U(xt,Gt):Gt}}})(function(it){var Pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,U){lt.__proto__=U}||function(lt,U){for(var xt in U)Object.prototype.hasOwnProperty.call(U,xt)&&(lt[xt]=U[xt])};l=function(lt,U){if(typeof U!="function"&&U!==null)throw new TypeError("Class extends value "+String(U)+" is not a constructor or null");Pt(lt,U);function xt(){this.constructor=lt}lt.prototype=U===null?Object.create(U):(xt.prototype=U.prototype,new xt)},u=Object.assign||function(lt){for(var U,xt=1,Gt=arguments.length;xt=0;_e--)(Ie=lt[_e])&&(Qt=(Bt<3?Ie(Qt):Bt>3?Ie(U,xt,Qt):Ie(U,xt))||Qt);return Bt>3&&Qt&&Object.defineProperty(U,xt,Qt),Qt},h=function(lt,U){return function(xt,Gt){U(xt,Gt,lt)}},d=function(lt,U){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(lt,U)},v=function(lt,U,xt,Gt){function Bt(Qt){return Qt instanceof xt?Qt:new xt(function(Ie){Ie(Qt)})}return new(xt||(xt=Promise))(function(Qt,Ie){function _e(ft){try{Fe(Gt.next(ft))}catch(gt){Ie(gt)}}function Ue(ft){try{Fe(Gt.throw(ft))}catch(gt){Ie(gt)}}function Fe(ft){ft.done?Qt(ft.value):Bt(ft.value).then(_e,Ue)}Fe((Gt=Gt.apply(lt,U||[])).next())})},g=function(lt,U){var xt={label:0,sent:function(){if(Qt[0]&1)throw Qt[1];return Qt[1]},trys:[],ops:[]},Gt,Bt,Qt,Ie;return Ie={next:_e(0),throw:_e(1),return:_e(2)},typeof Symbol=="function"&&(Ie[Symbol.iterator]=function(){return this}),Ie;function _e(Fe){return function(ft){return Ue([Fe,ft])}}function Ue(Fe){if(Gt)throw new TypeError("Generator is already executing.");for(;xt;)try{if(Gt=1,Bt&&(Qt=Fe[0]&2?Bt.return:Fe[0]?Bt.throw||((Qt=Bt.return)&&Qt.call(Bt),0):Bt.next)&&!(Qt=Qt.call(Bt,Fe[1])).done)return Qt;switch(Bt=0,Qt&&(Fe=[Fe[0]&2,Qt.value]),Fe[0]){case 0:case 1:Qt=Fe;break;case 4:return xt.label++,{value:Fe[1],done:!1};case 5:xt.label++,Bt=Fe[1],Fe=[0];continue;case 7:Fe=xt.ops.pop(),xt.trys.pop();continue;default:if(Qt=xt.trys,!(Qt=Qt.length>0&&Qt[Qt.length-1])&&(Fe[0]===6||Fe[0]===2)){xt=0;continue}if(Fe[0]===3&&(!Qt||Fe[1]>Qt[0]&&Fe[1]=lt.length&&(lt=void 0),{value:lt&<[Gt++],done:!lt}}};throw new TypeError(U?"Object is not iterable.":"Symbol.iterator is not defined.")},y=function(lt,U){var xt=typeof Symbol=="function"&<[Symbol.iterator];if(!xt)return lt;var Gt=xt.call(lt),Bt,Qt=[],Ie;try{for(;(U===void 0||U-- >0)&&!(Bt=Gt.next()).done;)Qt.push(Bt.value)}catch(_e){Ie={error:_e}}finally{try{Bt&&!Bt.done&&(xt=Gt.return)&&xt.call(Gt)}finally{if(Ie)throw Ie.error}}return Qt},w=function(){for(var lt=[],U=0;U1||_e(P,Kt)})})}function _e(P,Kt){try{Ue(Gt[P](Kt))}catch(H){gt(Qt[0][3],H)}}function Ue(P){P.value instanceof _?Promise.resolve(P.value.v).then(Fe,ft):gt(Qt[0][2],P)}function Fe(P){_e("next",P)}function ft(P){_e("throw",P)}function gt(P,Kt){P(Kt),Qt.shift(),Qt.length&&_e(Qt[0][0],Qt[0][1])}},C=function(lt){var U,xt;return U={},Gt("next"),Gt("throw",function(Bt){throw Bt}),Gt("return"),U[Symbol.iterator]=function(){return this},U;function Gt(Bt,Qt){U[Bt]=lt[Bt]?function(Ie){return(xt=!xt)?{value:_(lt[Bt](Ie)),done:Bt==="return"}:Qt?Qt(Ie):Ie}:Qt}},F=function(lt){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var U=lt[Symbol.asyncIterator],xt;return U?U.call(lt):(lt=typeof m=="function"?m(lt):lt[Symbol.iterator](),xt={},Gt("next"),Gt("throw"),Gt("return"),xt[Symbol.asyncIterator]=function(){return this},xt);function Gt(Qt){xt[Qt]=lt[Qt]&&function(Ie){return new Promise(function(_e,Ue){Ie=lt[Qt](Ie),Bt(_e,Ue,Ie.done,Ie.value)})}}function Bt(Qt,Ie,_e,Ue){Promise.resolve(Ue).then(function(Fe){Qt({value:Fe,done:_e})},Ie)}},k=function(lt,U){return Object.defineProperty?Object.defineProperty(lt,"raw",{value:U}):lt.raw=U,lt};var ht=Object.create?function(lt,U){Object.defineProperty(lt,"default",{enumerable:!0,value:U})}:function(lt,U){lt.default=U};j=function(lt){if(lt&<.__esModule)return lt;var U={};if(lt!=null)for(var xt in lt)xt!=="default"&&Object.prototype.hasOwnProperty.call(lt,xt)&&Q(U,lt,xt);return ht(U,lt),U},V=function(lt){return lt&<.__esModule?lt:{default:lt}},st=function(lt,U){if(!U.has(lt))throw new TypeError("attempted to get private field on non-instance");return U.get(lt)},yt=function(lt,U,xt){if(!U.has(lt))throw new TypeError("attempted to set private field on non-instance");return U.set(lt,xt),xt},it("__extends",l),it("__assign",u),it("__rest",c),it("__decorate",f),it("__param",h),it("__metadata",d),it("__awaiter",v),it("__generator",g),it("__exportStar",p),it("__createBinding",Q),it("__values",m),it("__read",y),it("__spread",w),it("__spreadArrays",x),it("__spreadArray",M),it("__await",_),it("__asyncGenerator",D),it("__asyncDelegator",C),it("__asyncValues",F),it("__makeTemplateObject",k),it("__importStar",j),it("__importDefault",V),it("__classPrivateFieldGet",st),it("__classPrivateFieldSet",yt)})}).call(this,n("./node_modules/_webpack@4.46.0@webpack/buildin/global.js"))},"./node_modules/_webpack@4.46.0@webpack/buildin/global.js":function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){typeof window=="object"&&(n=window)}t.exports=n},"./node_modules/_webpack@4.46.0@webpack/buildin/module.js":function(t,e){t.exports=function(n){return n.webpackPolyfill||(n.deprecate=function(){},n.paths=[],n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),n.webpackPolyfill=1),n}},"./node_modules/_wolfy87-eventemitter@5.2.9@wolfy87-eventemitter/EventEmitter.js":function(t,e,n){var r;/*! * EventEmitter v5.2.9 - git.io/ee * Unlicense - http://unlicense.org/ * Oliver Caldwell - https://oli.me.uk/ * @preserve */(function(o){function s(){}var l=s.prototype,u=o.EventEmitter;function c(d,v){for(var g=d.length;g--;)if(d[g].listener===v)return g;return-1}function f(d){return function(){return this[d].apply(this,arguments)}}l.getListeners=function(v){var g=this._getEvents(),p,m;if(v instanceof RegExp){p={};for(m in g)g.hasOwnProperty(m)&&v.test(m)&&(p[m]=g[m])}else p=g[v]||(g[v]=[]);return p},l.flattenListeners=function(v){var g=[],p;for(p=0;pFe&&(Fe=ft.count)}),o.forIn(U,function(ft){var gt=ft.x,P=ft.y,Kt=ft.count,H={};H[Qt]=Kt,y.sizeByCount?(H[Gt]=_e.map(function(ot){return gt+ft.count/Fe*ot[0]}),H[Bt]=_e.map(function(ot){return(P+ft.count/Fe*ot[1])/ht})):(H[Gt]=_e.map(function(ot){return gt+ot[0]}),H[Bt]=_e.map(function(ot){return(P+ot[1])/ht})),Ue.push(H)}),m.rows=Ue}s.DataSet.registerTransform("bin.hexagon",p),s.DataSet.registerTransform("bin.hex",p),s.DataSet.registerTransform("hexbin",p)},"./src/transform/bin/histogram.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),s=r.__importDefault(n("./src/util/partition.ts")),l=n("./src/data-set.ts"),u=n("./src/util/option-parser.ts"),c={as:["x","count"],bins:void 0,offset:0,groupBy:[]};function f(v,g,p){var m=v-p,y=Math.floor(m/g);return[y*g+p,(y+1)*g+p]}function h(v){return Math.ceil(Math.log(v)/Math.LN2)+1}function d(v,g){g=o.assign({},c,g);var p=u.getField(g);if(v.rows.length!==0){var m=v.range(p),y=m[1]-m[0],w=g.binWidth,x=g.bins;if(!w&&x){if(x<=0)throw new TypeError("Invalid bins: it must be a positive number!");w=y/x}if(!w&&!x){var M=h(v.rows.length);w=y/M}var _=g.offset%w,D=[],C=g.groupBy,F=s.default(v.rows,C);o.forIn(F,function(k){var j={},V=k.map(function(Pt){return Pt[p]});V.forEach(function(Pt){var ht=r.__read(f(Pt,w,_),2),lt=ht[0],U=ht[1],xt=lt+"-"+U;j[xt]=j[xt]||{x0:lt,x1:U,count:0},j[xt].count++});var st=r.__read(g.as,2),yt=st[0],Q=st[1];if(!yt||!Q)throw new TypeError('Invalid as: it must be an array with 2 elements (e.g. [ "x", "count" ])!');var it=o.pick(k[0],C);o.forIn(j,function(Pt){var ht=o.assign({},it);ht[yt]=[Pt.x0,Pt.x1],ht[Q]=Pt.count,D.push(ht)})}),v.rows=D}}l.DataSet.registerTransform("bin.histogram",d),l.DataSet.registerTransform("bin.dot",d)},"./src/transform/bin/quantile.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),s=n("./node_modules/_simple-statistics@6.1.1@simple-statistics/dist/simple-statistics.min.js"),l=r.__importDefault(n("./src/util/partition.ts")),u=r.__importDefault(n("./src/util/p-by-fraction.ts")),c=n("./src/data-set.ts"),f=c.DataSet.registerTransform,h=n("./src/util/option-parser.ts"),d={as:"_bin",groupBy:[],fraction:4};function v(g,p){p=o.assign({},d,p);var m=h.getField(p),y=p.as;if(!o.isString(y))throw new TypeError('Invalid as: it must be a string (e.g. "_bin")!');var w=p.p,x=p.fraction;(!o.isArray(w)||w.length===0)&&(w=u.default(x));var M=g.rows,_=p.groupBy,D=l.default(M,_),C=[];o.forIn(D,function(F){var k=F[0],j=F.map(function(st){return st[m]}),V=w.map(function(st){return s.quantile(j,st)});k[y]=V,C.push(k)}),g.rows=C}f("bin.quantile",v)},"./src/transform/bin/rectangle.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),s=n("./src/data-set.ts"),l=s.DataSet.registerTransform,u=n("./src/util/option-parser.ts"),c={as:["x","y","count"],bins:[30,30],offset:[0,0],sizeByCount:!1};function f(d,v,g){var p=d-g,m=Math.floor(p/v);return[m*v+g,(m+1)*v+g]}function h(d,v){v=o.assign({},c,v);var g=r.__read(u.getFields(v),2),p=g[0],m=g[1];if(!p||!m)throw new TypeError("Invalid fields: must be an array with 2 strings!");var y=d.range(p),w=d.range(m),x=y[1]-y[0],M=w[1]-w[0],_=v.binWidth||[];if(_.length!==2){var D=r.__read(v.bins,2),C=D[0],F=D[1];if(C<=0||F<=0)throw new TypeError("Invalid bins: must be an array with 2 positive numbers (e.g. [ 30, 30 ])!");_=[x/C,M/F]}var k=d.rows.map(function(xt){return[xt[p],xt[m]]}),j={},V=r.__read(v.offset,2),st=V[0],yt=V[1];k.forEach(function(xt){var Gt=r.__read(f(xt[0],_[0],st),2),Bt=Gt[0],Qt=Gt[1],Ie=r.__read(f(xt[1],_[1],yt),2),_e=Ie[0],Ue=Ie[1],Fe=Bt+"-"+Qt+"-"+_e+"-"+Ue;j[Fe]=j[Fe]||{x0:Bt,x1:Qt,y0:_e,y1:Ue,count:0},j[Fe].count++});var Q=[],it=r.__read(v.as,3),Pt=it[0],ht=it[1],lt=it[2];if(!Pt||!ht||!lt)throw new TypeError('Invalid as: it must be an array with 3 strings (e.g. [ "x", "y", "count" ])!');if(!v.sizeByCount)o.forIn(j,function(xt){var Gt={};Gt[Pt]=[xt.x0,xt.x1,xt.x1,xt.x0],Gt[ht]=[xt.y0,xt.y0,xt.y1,xt.y1],Gt[lt]=xt.count,Q.push(Gt)});else{var U=0;o.forIn(j,function(xt){xt.count>U&&(U=xt.count)}),o.forIn(j,function(xt){var Gt=xt.x0,Bt=xt.x1,Qt=xt.y0,Ie=xt.y1,_e=xt.count,Ue=_e/U,Fe=r.__read([(Gt+Bt)/2,(Qt+Ie)/2],2),ft=Fe[0],gt=Fe[1],P=(Bt-Gt)*Ue/2,Kt=(Ie-Qt)*Ue/2,H=ft-P,ot=ft+P,at=gt-Kt,dt=gt+Kt,Z={};Z[Pt]=[H,ot,ot,H],Z[ht]=[at,at,dt,dt],Z[lt]=_e,Q.push(Z)})}d.rows=Q}l("bin.rectangle",h),l("bin.rect",h)},"./src/transform/default.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./src/data-set.ts");r.DataSet.registerTransform("default",function(o){return o})},"./src/transform/diagram/arc.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=n("./src/data-set.ts"),s={y:0,thickness:.05,weight:!1,marginRatio:.1,id:function(v){return v.id},source:function(v){return v.source},target:function(v){return v.target},sourceWeight:function(v){return v.value||1},targetWeight:function(v){return v.value||1},sortBy:null};function l(v,g,p){return p===void 0&&(p={}),v.forEach(function(m){var y=g.edgeSource(m),w=g.edgeTarget(m);p[y]||(p[y]={id:y}),p[w]||(p[w]={id:w})}),r.values(p)}function u(v,g,p){r.forIn(v,function(m,y){m.inEdges=g.filter(function(w){return""+p.target(w)==""+y}),m.outEdges=g.filter(function(w){return""+p.source(w)==""+y}),m.edges=m.outEdges.concat(m.inEdges),m.frequency=m.edges.length,m.value=0,m.inEdges.forEach(function(w){m.value+=p.targetWeight(w)}),m.outEdges.forEach(function(w){m.value+=p.sourceWeight(w)})})}function c(v,g){var p={weight:function(y,w){return w.value-y.value},frequency:function(y,w){return w.frequency-y.frequency},id:function(y,w){return(""+g.id(y)).localeCompare(""+g.id(w))}},m=p[g.sortBy];!m&&r.isFunction(g.sortBy)&&(m=g.sortBy),m&&v.sort(m)}function f(v,g){var p=v.length;if(!p)throw new TypeError("Invalid nodes: it's empty!");if(g.weight){var m=g.marginRatio;if(m<0||m>=1)throw new TypeError("Invalid marginRatio: it must be in range [0, 1)!");var y=m/(2*p),w=g.thickness;if(w<=0||w>=1)throw new TypeError("Invalid thickness: it must be in range (0, 1)!");var x=0;v.forEach(function(_){x+=_.value}),v.forEach(function(_){_.weight=_.value/x,_.width=_.weight*(1-m),_.height=w}),v.forEach(function(_,D){for(var C=0,F=D-1;F>=0;F--)C+=v[F].width+2*y;var k=_.minX=y+C,j=_.maxX=_.minX+_.width,V=_.minY=g.y-w/2,st=_.maxY=V+w;_.x=[k,j,j,k],_.y=[V,V,st,st]})}else{var M=1/p;v.forEach(function(_,D){_.x=(D+.5)*M,_.y=g.y})}}function h(v,g,p){if(p.weight){var m={};r.forIn(v,function(y,w){m[w]=y.value}),g.forEach(function(y){var w=p.source(y),x=p.target(y),M=v[w],_=v[x];if(M&&_){var D=m[w],C=p.sourceWeight(y),F=M.minX+(M.value-D)/M.value*M.width,k=F+C/M.value*M.width;m[w]-=C;var j=m[x],V=p.targetWeight(y),st=_.minX+(_.value-j)/_.value*_.width,yt=st+V/_.value*_.width;m[x]-=V;var Q=p.y;y.x=[F,k,st,yt],y.y=[Q,Q,Q,Q]}})}else g.forEach(function(y){var w=v[p.source(y)],x=v[p.target(y)];w&&x&&(y.x=[w.x,x.x],y.y=[w.y,x.y])})}function d(v,g){g=r.assign({},s,g);var p={},m=v.nodes,y=v.edges;(!r.isArray(m)||m.length===0)&&(m=l(y,g,p)),m.forEach(function(w){var x=g.id(w);p[x]=w}),u(p,y,g),c(m,g),f(m,g),h(p,y,g),v.nodes=m,v.edges=y}o.DataSet.registerTransform("diagram.arc",d),o.DataSet.registerTransform("arc",d)},"./src/transform/diagram/dagre.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),s=r.__importDefault(n("./node_modules/_dagre@0.8.5@dagre/index.js")),l=n("./src/data-set.ts"),u={rankdir:"TB",align:"TB",nodesep:50,edgesep:10,ranksep:50,source:function(f){return f.source},target:function(f){return f.target}};function c(f,h){h=o.assign({},u,h);var d=new s.default.graphlib.Graph;d.setGraph({}),d.setDefaultEdgeLabel(function(){return{}}),f.nodes.forEach(function(p){var m=h.nodeId?h.nodeId(p):p.id;!p.height&&!p.width&&(p.height=p.width=h.edgesep),d.setNode(m,p)}),f.edges.forEach(function(p){d.setEdge(h.source(p),h.target(p))}),s.default.layout(d);var v=[],g=[];d.nodes().forEach(function(p){var m=d.node(p),y=m.x,w=m.y,x=m.height,M=m.width;m.x=[y-M/2,y+M/2,y+M/2,y-M/2],m.y=[w+x/2,w+x/2,w-x/2,w-x/2],v.push(m)}),d.edges().forEach(function(p){var m=d.edge(p).points,y={};y.x=m.map(function(w){return w.x}),y.y=m.map(function(w){return w.y}),g.push(y)}),f.nodes=v,f.edges=g}l.DataSet.registerTransform("diagram.dagre",c),l.DataSet.registerTransform("dagre",c)},"./src/transform/diagram/sankey.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=n("./node_modules/_d3-sankey@0.9.1@d3-sankey/dist/d3-sankey.js"),s=n("./src/data-set.ts"),l={sankeyLeft:o.sankeyLeft,sankeyRight:o.sankeyRight,sankeyCenter:o.sankeyCenter,sankeyJustify:o.sankeyJustify},u={value:function(f){return f.value},source:function(f){return f.source},target:function(f){return f.target},nodeAlign:"sankeyJustify",nodeWidth:.02,nodePadding:.02,sort:void 0};function c(f,h){h=r.assign({},u,h);var d=null;r.isString(h.nodeAlign)?d=l[h.nodeAlign]:r.isFunction(h.nodeAlign)&&(d=h.nodeAlign);var v=o.sankey().nodeSort(h.sort).links(function(g){return g.edges}).nodeWidth(h.nodeWidth).nodePadding(h.nodePadding).extent([[0,0],[1,1]]);r.isFunction(h.nodeId)&&v.nodeId(h.nodeId),d&&v.nodeAlign(d),v(f),f.nodes.forEach(function(g){var p=g.x0,m=g.x1,y=g.y0,w=g.y1;g.x=[p,m,m,p],g.y=[y,y,w,w]}),f.edges.forEach(function(g){var p=g.source,m=g.target,y=p.x1,w=m.x0;g.x=[y,y,w,w];var x=g.width/2;g.y=[g.y0+x,g.y0-x,g.y1+x,g.y1-x]})}s.DataSet.registerTransform("diagram.sankey",c),s.DataSet.registerTransform("sankey",c)},"./src/transform/diagram/voronoi.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=r.__importStar(n("./node_modules/_d3-voronoi@1.1.4@d3-voronoi/dist/d3-voronoi.js")),s=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),l=n("./src/data-set.ts"),u=l.DataSet.registerTransform,c=n("./src/util/option-parser.ts"),f={as:["_x","_y"]};function h(d,v){v=s.assign({},f,v);var g=v.as;if(!s.isArray(g)||g.length!==2)throw new TypeError("Invalid as: must be an array with two strings!");var p=g[0],m=g[1],y=c.getFields(v);if(!s.isArray(y)||y.length!==2)throw new TypeError("Invalid fields: must be an array with two strings!");var w=y[0],x=y[1],M=d.rows,_=M.map(function(F){return[F[w],F[x]]}),D=o.voronoi();v.extend&&D.extent(v.extend),v.size&&D.size(v.size);var C=D(_).polygons();M.forEach(function(F,k){var j=C[k].filter(function(V){return!!V});F[p]=j.map(function(V){return V[0]}),F[m]=j.map(function(V){return V[1]})})}u("diagram.voronoi",h),u("voronoi",h)},"./src/transform/fill-rows.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),s=r.__importDefault(n("./src/util/partition.ts")),l=n("./src/data-set.ts"),u={fillBy:"group",groupBy:[],orderBy:[]};function c(h,d){var v=h.map(function(g){return g});return d.forEach(function(g){var p=v.indexOf(g);p>-1&&v.splice(p,1)}),v}function f(h,d){d=o.assign({},u,d);var v=h.rows,g=d.groupBy,p=d.orderBy,m=s.default(v,g,p),y=0,w=[];o.forIn(m,function(k){k.length>y&&(y=k.length,w=k)});var x=[],M={};if(w.forEach(function(k){var j=p.map(function(V){return k[V]}).join("-");x.push(j),M[j]=k}),d.fillBy==="order"){var _=w[0],D=[],C={};v.forEach(function(k){var j=p.map(function(V){return k[V]}).join("-");D.indexOf(j)===-1&&(D.push(j),C[j]=k)});var F=c(D,x);F.forEach(function(k){var j={};g.forEach(function(V){j[V]=_[V]}),p.forEach(function(V){j[V]=C[k][V]}),v.push(j),w.push(j),x.push(k),M[k]=j}),y=w.length}o.forIn(m,function(k){if(k!==w&&k.length=y-k.length)return!0;var it=M[yt],Pt={};return g.forEach(function(ht){Pt[ht]=j[ht]}),p.forEach(function(ht){Pt[ht]=it[ht]}),v.push(Pt),!1})}})}l.DataSet.registerTransform("fill-rows",f),l.DataSet.registerTransform("fillRows",f)},"./src/transform/filter.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./src/data-set.ts");function o(s){return!!s}r.DataSet.registerTransform("filter",function(s,l){s.rows=s.rows.filter(l.callback||o)})},"./src/transform/fold.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=n("./src/data-set.ts"),s=n("./src/util/option-parser.ts"),l={fields:[],key:"key",retains:[],value:"value"};o.DataSet.registerTransform("fold",function(u,c){var f=u.getColumnNames();c=r.assign({},l,c);var h=s.getFields(c);h.length===0&&(console.warn("warning: option fields is not specified, will fold all columns."),h=f);var d=c.key,v=c.value,g=c.retains;(!g||g.length===0)&&(g=r.difference(f,h));var p=[];u.rows.forEach(function(m){h.forEach(function(y){var w=r.pick(m,g);w[d]=y,w[v]=m[y],p.push(w)})}),u.rows=p})},"./src/transform/geo/centroid.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=n("./src/data-set.ts"),s=o.DataSet.registerTransform,l=n("./src/util/option-parser.ts"),u={as:["_centroid_x","_centroid_y"]};function c(f,h){h=r.assign({},u,h);var d=l.getField(h),v=h.geoView||h.geoDataView;if(r.isString(v)&&f.dataSet&&(v=f.dataSet.getView(v)),!v||v.dataType!=="geo")throw new TypeError("Invalid geoView: must be a DataView of GEO dataType!");var g=h.as;if(!r.isArray(g)||g.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "cX", "cY" ])!');var p=g[0],m=g[1];f.rows.forEach(function(y){var w=v.geoFeatureByName(y[d]);w&&(v._projectedAs?(y[p]=w[v._projectedAs[2]],y[m]=w[v._projectedAs[3]]):(y[p]=w.centroidX,y[m]=w.centroidY))})}s("geo.centroid",c)},"./src/transform/geo/projection.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),s=n("./node_modules/_d3-geo@1.6.4@d3-geo/build/d3-geo.js"),l=r.__importDefault(n("./node_modules/_point-at-length@1.1.0@point-at-length/index.js")),u=n("./src/data-set.ts"),c=u.DataSet.registerTransform,f=r.__importDefault(n("./src/util/get-geo-projection.ts")),h={as:["_x","_y","_centroid_x","_centroid_y"]};function d(v,g){if(v.dataType!=="geo"&&v.dataType!=="geo-graticule")throw new TypeError("Invalid dataView: this transform is for Geo data only!");g=o.assign({},h,g);var p=g.projection;if(!p)throw new TypeError("Invalid projection!");p=f.default(p);var m=s.geoPath(p),y=g.as;if(!o.isArray(y)||y.length!==4)throw new TypeError('Invalid as: it must be an array with 4 strings (e.g. [ "x", "y", "cX", "cY" ])!');v._projectedAs=y;var w=r.__read(y,4),x=w[0],M=w[1],_=w[2],D=w[3];v.rows.forEach(function(C){C[x]=[],C[M]=[];var F=m(C);if(F){var k=l.default(F);k._path.forEach(function(V){C[x].push(V[1]),C[M].push(V[2])});var j=m.centroid(C);C[_]=j[0],C[D]=j[1]}}),v.rows=v.rows.filter(function(C){return C[x].length!==0})}c("geo.projection",d)},"./src/transform/geo/region.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=n("./src/data-set.ts"),s=o.DataSet.registerTransform,l=n("./src/util/option-parser.ts"),u={as:["_x","_y"]};function c(f,h){h=r.assign({},u,h);var d=l.getField(h),v=h.geoView||h.geoDataView;if(r.isString(v)&&(v=f.dataSet.getView(v)),!v||v.dataType!=="geo")throw new TypeError("Invalid geoView: must be a DataView of GEO dataType!");var g=h.as;if(!r.isArray(g)||g.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var p=g[0],m=g[1];f.rows.forEach(function(y){var w=v.geoFeatureByName(y[d]);w&&(v._projectedAs?(y[p]=w[v._projectedAs[0]],y[m]=w[v._projectedAs[1]]):(y[p]=w.longitude,y[m]=w.latitude))})}s("geo.region",c)},"./src/transform/hierarchy/cluster.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=r.__importStar(n("./node_modules/_d3-hierarchy@1.1.9@d3-hierarchy/dist/d3-hierarchy.js")),s=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),l=n("./src/data-set.ts"),u=n("./src/util/option-parser.ts"),c={field:"value",size:[1,1],nodeSize:null,separation:null,as:["x","y"]};function f(h,d){if(h.dataType!==l.DataSet.CONSTANTS.HIERARCHY||!h.root)throw new TypeError("Invalid DataView: This transform is for Hierarchy data only!");var v=h.root;d=s.assign({},c,d);var g=d.as;if(!s.isArray(g)||g.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var p=void 0;try{p=u.getField(d)}catch(x){console.warn(x)}p&&v.sum(function(x){return x[p]});var m=o.cluster();m.size(d.size),d.nodeSize&&m.nodeSize(d.nodeSize),d.separation&&m.separation(d.separation),m(v);var y=g[0],w=g[1];v.each(function(x){x[y]=x.x,x[w]=x.y})}l.DataSet.registerTransform("hierarchy.cluster",f),l.DataSet.registerTransform("dendrogram",f)},"./src/transform/hierarchy/compact-box.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=r.__importDefault(n("./node_modules/_@antv_hierarchy@0.6.6@@antv/hierarchy/build/hierarchy.js")),s=n("./src/data-set.ts"),l={};function u(c,f){var h=c.root;if(f=Object.assign({},l,f),c.dataType!==s.DataSet.CONSTANTS.HIERARCHY)throw new TypeError("Invalid DataView: This transform is for Hierarchy data only!");c.root=o.default.compactBox(h,f)}s.DataSet.registerTransform("hierarchy.compact-box",u),s.DataSet.registerTransform("compact-box-tree",u),s.DataSet.registerTransform("non-layered-tidy-tree",u),s.DataSet.registerTransform("mindmap-logical",u)},"./src/transform/hierarchy/dendrogram.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=r.__importDefault(n("./node_modules/_@antv_hierarchy@0.6.6@@antv/hierarchy/build/hierarchy.js")),s=n("./src/data-set.ts"),l={};function u(c,f){var h=c.root;if(f=Object.assign({},l,f),c.dataType!==s.DataSet.CONSTANTS.HIERARCHY)throw new TypeError("Invalid DataView: This transform is for Hierarchy data only!");c.root=o.default.dendrogram(h,f)}s.DataSet.registerTransform("hierarchy.dendrogram",u),s.DataSet.registerTransform("dendrogram",u)},"./src/transform/hierarchy/indented.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=r.__importDefault(n("./node_modules/_@antv_hierarchy@0.6.6@@antv/hierarchy/build/hierarchy.js")),s=n("./src/data-set.ts"),l={};function u(c,f){var h=c.root;if(f=Object.assign({},l,f),c.dataType!==s.DataSet.CONSTANTS.HIERARCHY)throw new TypeError("Invalid DataView: This transform is for Hierarchy data only!");c.root=o.default.indented(h,f)}s.DataSet.registerTransform("hierarchy.indented",u),s.DataSet.registerTransform("indented-tree",u)},"./src/transform/hierarchy/pack.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),s=r.__importStar(n("./node_modules/_d3-hierarchy@1.1.9@d3-hierarchy/dist/d3-hierarchy.js")),l=n("./src/data-set.ts"),u=n("./src/util/option-parser.ts"),c={field:"value",size:[1,1],padding:0,as:["x","y","r"]};function f(h,d){if(h.dataType!==l.DataSet.CONSTANTS.HIERARCHY)throw new TypeError("Invalid DataView: This transform is for Hierarchy data only!");var v=h.root;d=o.assign({},c,d);var g=d.as;if(!o.isArray(g)||g.length!==3)throw new TypeError('Invalid as: it must be an array with 3 strings (e.g. [ "x", "y", "r" ])!');var p;try{p=u.getField(d)}catch(M){console.warn(M)}p&&v.sum(function(M){return M[p]}).sort(function(M,_){return _[p]-M[p]});var m=s.pack();m.size(d.size),d.padding&&m.padding(d.padding),m(v);var y=g[0],w=g[1],x=g[2];v.each(function(M){M[y]=M.x,M[w]=M.y,M[x]=M.r})}l.DataSet.registerTransform("hierarchy.pack",f),l.DataSet.registerTransform("hierarchy.circle-packing",f),l.DataSet.registerTransform("circle-packing",f)},"./src/transform/hierarchy/partition.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=r.__importStar(n("./node_modules/_d3-hierarchy@1.1.9@d3-hierarchy/dist/d3-hierarchy.js")),s=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),l=n("./src/data-set.ts"),u=n("./src/util/option-parser.ts"),c={field:"value",size:[1,1],round:!1,padding:0,sort:!0,as:["x","y"]};function f(h,d){if(h.dataType!==l.DataSet.CONSTANTS.HIERARCHY)throw new TypeError("Invalid DataView: This transform is for Hierarchy data only!");var v=h.root;d=s.assign({},c,d);var g=d.as;if(!s.isArray(g)||g.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var p;try{p=u.getField(d)}catch(x){console.warn(x)}p&&v.sum(function(x){return x[p]});var m=o.partition();m.size(d.size).round(d.round).padding(d.padding),m(v);var y=g[0],w=g[1];v.each(function(x){x[y]=[x.x0,x.x1,x.x1,x.x0],x[w]=[x.y1,x.y1,x.y0,x.y0],["x0","x1","y0","y1"].forEach(function(M){g.indexOf(M)===-1&&delete x[M]})})}l.DataSet.registerTransform("hierarchy.partition",f),l.DataSet.registerTransform("adjacency",f)},"./src/transform/hierarchy/tree.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=r.__importStar(n("./node_modules/_d3-hierarchy@1.1.9@d3-hierarchy/dist/d3-hierarchy.js")),s=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),l=n("./src/data-set.ts"),u=n("./src/util/option-parser.ts"),c={field:"value",size:[1,1],nodeSize:null,separation:null,as:["x","y"]};function f(h,d){if(h.dataType!==l.DataSet.CONSTANTS.HIERARCHY)throw new TypeError("Invalid DataView: This transform is for Hierarchy data only!");var v=h.root;d=s.assign({},c,d);var g=d.as;if(!s.isArray(g)||g.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var p;try{p=u.getField(d)}catch(x){console.warn(x)}p&&v.sum(function(x){return x[p]});var m=o.tree();m.size(d.size),d.nodeSize&&m.nodeSize(d.nodeSize),d.separation&&m.separation(d.separation),m(v);var y=g[0],w=g[1];v.each(function(x){x[y]=x.x,x[w]=x.y})}l.DataSet.registerTransform("hierarchy.tree",f),l.DataSet.registerTransform("tree",f)},"./src/transform/hierarchy/treemap.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=r.__importStar(n("./node_modules/_d3-hierarchy@1.1.9@d3-hierarchy/dist/d3-hierarchy.js")),s=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),l=n("./src/data-set.ts"),u=n("./src/util/option-parser.ts"),c={field:"value",tile:"treemapSquarify",size:[1,1],round:!1,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,as:["x","y"]};function f(h,d){if(h.dataType!==l.DataSet.CONSTANTS.HIERARCHY)throw new TypeError("Invalid DataView: This transform is for Hierarchy data only!");var v=h.root;d=s.assign({},c,d);var g=d.as;if(!s.isArray(g)||g.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var p;try{p=u.getField(d)}catch(x){console.warn(x)}p&&v.sum(function(x){return x[p]});var m=o.treemap();m.tile(o[d.tile]).size(d.size).round(d.round).padding(d.padding).paddingInner(d.paddingInner).paddingOuter(d.paddingOuter).paddingTop(d.paddingTop).paddingRight(d.paddingRight).paddingBottom(d.paddingBottom).paddingLeft(d.paddingLeft),m(v);var y=g[0],w=g[1];v.each(function(x){x[y]=[x.x0,x.x1,x.x1,x.x0],x[w]=[x.y1,x.y1,x.y0,x.y0],["x0","x1","y0","y1"].forEach(function(M){g.indexOf(M)===-1&&delete x[M]})})}l.DataSet.registerTransform("hierarchy.treemap",f),l.DataSet.registerTransform("treemap",f)},"./src/transform/impute.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),s=r.__importStar(n("./node_modules/_simple-statistics@6.1.1@simple-statistics/dist/simple-statistics.min.js")),l=r.__importDefault(n("./src/util/partition.ts")),u=n("./src/data-set.ts"),c=n("./src/util/option-parser.ts"),f={groupBy:[]};function h(p){return p.filter(function(m){return!o.isUndefined(m)})}var d=["mean","median","max","min"],v={};d.forEach(function(p){v[p]=function(m,y){return s[p](y)}}),v.value=function(p,m,y){return y};function g(p,m){m=o.assign({},f,m);var y=c.getField(m),w=m.method;if(!w)throw new TypeError("Invalid method!");if(w==="value"&&!o.has(m,"value"))throw new TypeError("Invalid value: it is nil.");var x=h(p.getColumn(y)),M=l.default(p.rows,m.groupBy);o.forIn(M,function(_){var D=h(_.map(function(C){return C[y]}));D.length===0&&(D=x),_.forEach(function(C){if(o.isUndefined(C[y]))if(o.isFunction(w))C[y]=w(C,D,m.value,_);else if(o.isString(w))C[y]=v[w](C,D,m.value);else throw new TypeError("Invalid method: must be a function or one of "+d.join(", "))})})}u.DataSet.registerTransform("impute",g)},"./src/transform/kde.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),s=r.__importDefault(n("./src/util/get-series-values.ts")),l=r.__importDefault(n("./src/util/kernel.ts")),u=r.__importStar(n("./src/util/bandwidth.ts")),c=r.__importDefault(n("./src/util/partition.ts")),f=n("./src/data-set.ts"),h=n("./src/util/option-parser.ts"),d=n("./node_modules/_simple-statistics@6.1.1@simple-statistics/dist/simple-statistics.min.js"),v={minSize:.01,as:["key","y","size"],extent:[],method:"gaussian",bandwidth:"nrd",step:0,groupBy:[]},g=o.keys(l.default),p=o.keys(u);function m(y,w){w=o.assign({},v,w);var x=h.getFields(w);if(!o.isArray(x)||x.length<1)throw new TypeError("invalid fields: must be an array of at least 1 strings!");var M=w.as;if(!o.isArray(M)||M.length!==3)throw new TypeError("invalid as: must be an array of 3 strings!");var _=w.method;if(o.isString(_)){if(g.indexOf(_)===-1)throw new TypeError("invalid method: "+_+". Must be one of "+g.join(", "));_=l.default[_]}if(!o.isFunction(_))throw new TypeError("invalid method: kernel method must be a function!");var D=w.extent;if(!o.isArray(D)||D.length===0){var C=[];o.each(x,function(yt){var Q=y.range(yt);C=C.concat(Q)}),D=[Math.min.apply(Math,r.__spread(C)),Math.max.apply(Math,r.__spread(C))]}var F=w.bandwidth;o.isString(F)&&u[F]?F=u[F](y.getColumn(x[0])):o.isFunction(F)?F=F(y.getColumn(x[0])):(!o.isNumber(F)||F<=0)&&(F=u.nrd(y.getColumn(x[0])));var k=s.default(D,w.step?w.step:F),j=[],V=w.groupBy,st=c.default(y.rows,V);o.forIn(st,function(yt){var Q={};o.each(x,function(it){var Pt=o.pick(yt[0],V);Q[it]=d.kernelDensityEstimation(yt.map(function(Gt){return Gt[it]}),_,F);var ht=r.__read(M,3),lt=ht[0],U=ht[1],xt=ht[2];Pt[lt]=it,Pt[U]=[],Pt[xt]=[],o.each(k,function(Gt){var Bt=Q[it](Gt);Bt>=w.minSize&&(Pt[U].push(Gt),Pt[xt].push(Bt))}),j.push(Pt)})}),y.rows=j}f.DataSet.registerTransform("kernel-density-estimation",m),f.DataSet.registerTransform("kde",m),f.DataSet.registerTransform("KDE",m),e.default={KERNEL_METHODS:g,BANDWIDTH_METHODS:p}},"./src/transform/kernel-smooth/density.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),s=r.__importDefault(n("./src/util/get-series-values.ts")),l=r.__importDefault(n("./src/util/kernel.ts")),u=n("./src/data-set.ts"),c=n("./src/util/option-parser.ts"),f=n("./src/util/bandwidth.ts"),h={as:["x","y","z"],method:"gaussian"},d=o.keys(l.default);function v(g,p){var m,y;p=o.assign({},h,p);var w=c.getFields(p);if(!o.isArray(w)||w.length!==2)throw new TypeError("invalid fields: must be an array of 2 strings!");var x=r.__read(p.as,3),M=x[0],_=x[1],D=x[2];if(!o.isString(M)||!o.isString(_)||!o.isString(D))throw new TypeError("invalid as: must be an array of 3 strings!");var C;if(o.isString(p.method)){if(d.indexOf(p.method)===-1)throw new TypeError("invalid method: "+p.method+". Must be one of "+d.join(", "));C=l.default[p.method]}var F=r.__read(w,2),k=F[0],j=F[1],V=p.extent,st=p.bandwidth,yt,Q;V&&Array.isArray(V)&&Array.isArray(V[0])&&Array.isArray(V[1])?(m=r.__read(V,2),yt=m[0],Q=m[1]):(yt=g.range(k),Q=g.range(j));var it,Pt;st&&Array.isArray(st)&&st.slice(0,2).every(o.isNumber)&&st.slice(0,2).every(function(gt){return gt>0})?(y=r.__read(st,2),it=y[0],Pt=y[1]):(it=f.silverman(g.getColumn(k)),Pt=f.silverman(g.getColumn(j)));for(var ht=s.default(yt,it),lt=s.default(Q,Pt),U=g.rows.length,xt=[],Gt=0;GtV&&(ht=V/Gt,Bt=Math.ceil(Gt*ht/Q)),U=k/Bt}),o.forIn(D,function(xt){var Gt=[lt*yt,(lt+1)*yt],Bt=Gt[1]-Gt[0],Qt=Bt*(1-it)/Q,Ie=0,_e=0;o.each(xt,function(Ue){for(var Fe=Ue[y],ft=Math.round(Fe*ht),gt=0;gtf[d])return 1}return 0}:r.isString(l)&&(u=function(c,f){return c[l]f[l]?1:0}),s.sort(u)}e.default=o},"./src/util/tag-cloud.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=Math.PI/180,s=1<<11>>5,l=1<<11;function u(k){return k.text}function c(){return"serif"}function f(){return"normal"}function h(k){return k.value}function d(){return~~(Math.random()*2)*90}function v(){return 1}function g(k,j,V,st){if(!j.sprite){var yt=k.context,Q=k.ratio;yt.clearRect(0,0,(s<<5)/Q,l/Q);var it=0,Pt=0,ht=0,lt=V.length;for(--st;++st>5<<5,xt=~~Math.max(Math.abs(Ie+_e),Math.abs(Ie-_e))}else U=U+31>>5<<5;if(xt>ht&&(ht=xt),it+U>=s<<5&&(it=0,Pt+=ht,ht=0),Pt+xt>=l)break;yt.translate((it+(U>>1))/Q,(Pt+(xt>>1))/Q),j.rotate&&yt.rotate(j.rotate*o),yt.fillText(j.text,0,0),j.padding&&(yt.lineWidth=2*j.padding,yt.strokeText(j.text,0,0)),yt.restore(),j.width=U,j.height=xt,j.xoff=it,j.yoff=Pt,j.x1=U>>1,j.y1=xt>>1,j.x0=-j.x1,j.y0=-j.y1,j.hasText=!0,it+=U}for(var Fe=yt.getImageData(0,0,(s<<5)/Q,l/Q).data,ft=[];--st>=0;)if(j=V[st],!!j.hasText){for(var U=j.width,gt=U>>5,xt=j.y1-j.y0,P=0;P>5),dt=Fe[(Pt+ot)*(s<<5)+(it+P)<<2]?1<<31-P%32:0;ft[at]|=dt,Kt|=dt}Kt?H=ot:(j.y0++,xt--,ot--,Pt++)}j.y1=j.y0+H,j.sprite=ft.slice(0,(j.y1-j.y0)*gt)}}}function p(k,j,V){V>>=5;for(var st=k.sprite,yt=k.width>>5,Q=k.x-(yt<<4),it=Q&127,Pt=32-it,ht=k.y1-k.y0,lt=(k.y+k.y0)*V+(Q>>5),U,xt=0;xt>>it:0))&j[lt+Gt])return!0;lt+=V}return!1}function m(k,j){var V=k[0],st=k[1];j.x+j.x0st.x&&(st.x=j.x+j.x1),j.y+j.y1>st.y&&(st.y=j.y+j.y1)}function y(k,j){return k.x+k.x1>j[0].x&&k.x+k.x0j[0].y&&k.y+k.y0>5)*k[1]),P=lt.length,Kt=[],H=lt.map(function(Z,mt){return Z.text=j.call(this,Z,mt),Z.font=V.call(this,Z,mt),Z.style=yt.call(this,Z,mt),Z.weight=Q.call(this,Z,mt),Z.rotate=it.call(this,Z,mt),Z.size=~~st.call(this,Z,mt),Z.padding=Pt.call(this,Z,mt),Z}).sort(function(Z,mt){return mt.size-Z.size}),ot=-1,at=Bt.board?[{x:0,y:0},{x:Ue,y:Fe}]:null;dt();function dt(){for(var Z=Date.now();Date.now()-Z>1,mt.y=Fe*(xt()+.5)>>1,g(ft,mt,H,ot),mt.hasText&&Ie(gt,mt,at)&&(Kt.push(mt),at?Bt.hasImage||m(at,mt):at=[{x:mt.x+mt.x0,y:mt.y+mt.y0},{x:mt.x+mt.x1,y:mt.y+mt.y1}],mt.x-=k[0]>>1,mt.y-=k[1]>>1)}Bt._tags=Kt,Bt._bounds=at}return Bt};function Qt(_e){_e.width=_e.height=1;var Ue=Math.sqrt(_e.getContext("2d").getImageData(0,0,1,1).data.length>>2);_e.width=(s<<5)/Ue,_e.height=l/Ue;var Fe=_e.getContext("2d");return Fe.fillStyle=Fe.strokeStyle="red",Fe.textAlign="center",{context:Fe,ratio:Ue}}function Ie(_e,Ue,Fe){for(var ft=Ue.x,gt=Ue.y,P=Math.sqrt(k[0]*k[0]+k[1]*k[1]),Kt=ht(k),H=xt()<.5?1:-1,ot,at=-H,dt,Z;(ot=Kt(at+=H))&&(dt=~~ot[0],Z=~~ot[1],!(Math.min(Math.abs(dt),Math.abs(Z))>=P));)if(Ue.x=ft+dt,Ue.y=gt+Z,!(Ue.x+Ue.x0<0||Ue.y+Ue.y0<0||Ue.x+Ue.x1>k[0]||Ue.y+Ue.y1>k[1])&&(!Fe||!p(Ue,_e,k[0]))&&(!Fe||y(Ue,Fe))){for(var mt=Ue.sprite,S=Ue.width>>5,B=k[0]>>5,A=Ue.x-(S<<4),z=A&127,J=32-z,pt=Ue.y1-Ue.y0,It=void 0,Zt=(Ue.y+Ue.y0)*B+(A>>5),Lt=0;Lt>>z:0);Zt+=B}return delete Ue.sprite,!0}return!1}return Bt.createMask=function(_e){var Ue=document.createElement("canvas"),Fe=r.__read(k,2),ft=Fe[0],gt=Fe[1];if(!(!ft||!gt)){var P=ft>>5,Kt=M((ft>>5)*gt);Ue.width=ft,Ue.height=gt;var H=Ue.getContext("2d");H.drawImage(_e,0,0,_e.width,_e.height,0,0,ft,gt);for(var ot=H.getImageData(0,0,ft,gt).data,at=0;at>5),mt=at*ft+dt<<2,S=ot[mt]>=250&&ot[mt+1]>=250&&ot[mt+2]>=250,B=S?1<<31-dt%32:0;Kt[Z]|=B}Bt.board=Kt,Bt.hasImage=!0}},Bt.timeInterval=function(_e){return arguments.length?(U=_e==null?1/0:_e,Bt):U},Bt.words=function(_e){return arguments.length?(lt=_e,Bt):lt},Bt.size=function(_e){return arguments.length?(k=[+_e[0],+_e[1]],Bt):k},Bt.font=function(_e){return arguments.length?(V=D(_e),Bt):V},Bt.fontStyle=function(_e){return arguments.length?(yt=D(_e),Bt):yt},Bt.fontWeight=function(_e){return arguments.length?(Q=D(_e),Bt):Q},Bt.rotate=function(_e){return arguments.length?(it=D(_e),Bt):it},Bt.text=function(_e){return arguments.length?(j=D(_e),Bt):j},Bt.spiral=function(_e){return arguments.length?(ht=C[_e]||_e,Bt):ht},Bt.fontSize=function(_e){return arguments.length?(st=D(_e),Bt):st},Bt.padding=function(_e){return arguments.length?(Pt=D(_e),Bt):Pt},Bt.random=function(_e){return arguments.length?(xt=_e,Bt):xt},Bt}e.default=F},"./src/view.ts":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.View=void 0;var r=n("./node_modules/_tslib@2.1.0@tslib/tslib.js"),o=r.__importDefault(n("./node_modules/_wolfy87-eventemitter@5.2.9@wolfy87-eventemitter/EventEmitter.js")),s=n("./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js");function l(c){var f={};return s.forIn(c,function(h,d){s.isObject(h)&&h.isView?f[d]=h:s.isArray(h)?f[d]=h.concat([]):s.isPlainObject(h)?f[d]=s.clone(h):f[d]=h}),f}var u=function(c){r.__extends(f,c);function f(h,d){var v=c.call(this)||this;if(v.isView=!0,v.isDataView=!0,v.watchingStates=null,v.dataType="table",v.transforms=[],v.origin=[],v.rows=[],h&&h.isDataSet?v.dataSet=h:(v.dataSet=null,d=h),v.loose=!v.dataSet,d&&(v.watchingStates=d.watchingStates),!v.loose){var g=v.watchingStates;h.on("statechange",function(p){s.isArray(g)?g.indexOf(p)>-1&&v._reExecute():v._reExecute()})}return v}return f.prototype._parseStateExpression=function(h){var d=this.dataSet;if(d!==null){var v=/^\$state\.(\w+)/.exec(h);return v?d.state[v[1]]:h}},f.prototype._preparseOptions=function(h){var d=this,v=l(h);return this.loose||s.forIn(v,function(g,p){s.isString(g)&&/^\$state\./.test(g)&&(v[p]=d._parseStateExpression(g))}),v},f.prototype._prepareSource=function(h,d){if(this._source={source:h,options:d},d){var v=this._preparseOptions(d);this.origin=f.DataSet.getConnector(v.type)(h,v,this)}else if(h instanceof f||s.isString(h))this.origin=f.DataSet.getConnector("default")(h,this.dataSet);else if(s.isArray(h))this.origin=h;else if(s.isObject(h)&&h.type){var v=this._preparseOptions(h);this.origin=f.DataSet.getConnector(v.type)(v,this)}else throw new TypeError("Invalid source");return this.rows=s.deepMix([],this.origin),this},f.prototype.source=function(h,d){return this._prepareSource(h,d)._reExecuteTransforms(),this.trigger("change",[]),this},f.prototype.transform=function(h){return h&&h.type&&(this.transforms.push(h),this._executeTransform(h)),this},f.prototype._executeTransform=function(h){h=this._preparseOptions(h);var d=f.DataSet.getTransform(h.type);d(this,h)},f.prototype._reExecuteTransforms=function(){var h=this;this.transforms.forEach(function(d){h._executeTransform(d)})},f.prototype.addRow=function(h){this.rows.push(h)},f.prototype.removeRow=function(h){this.rows.splice(h,1)},f.prototype.updateRow=function(h,d){s.assign(this.rows[h],d)},f.prototype.findRows=function(h){return this.rows.filter(function(d){return s.isMatch(d,h)})},f.prototype.findRow=function(h){return s.find(this.rows,h)},f.prototype.getColumnNames=function(){var h=this.rows[0];return h?s.keys(h):[]},f.prototype.getColumnName=function(h){return this.getColumnNames()[h]},f.prototype.getColumnIndex=function(h){var d=this.getColumnNames();return d.indexOf(h)},f.prototype.getColumn=function(h){return this.rows.map(function(d){return d[h]})},f.prototype.getColumnData=function(h){return this.getColumn(h)},f.prototype.getSubset=function(h,d,v){for(var g=[],p=h;p<=d;p++)g.push(s.pick(this.rows[p],v));return g},f.prototype.toString=function(h){return h===void 0&&(h=!1),h?JSON.stringify(this.rows,null,2):JSON.stringify(this.rows)},f.prototype._reExecute=function(){var h=this._source,d=h.source,v=h.options;this._prepareSource(d,v),this._reExecuteTransforms(),this.trigger("change",[])},f}(o.default);e.View=u}})})})(S1);const bI=k1(S1.exports);gr("interval","borderRadius",{draw:function(i,t){var e=i.points,n=[];return n.push(["M",e[0].x,e[0].y]),n.push(["L",e[1].x,e[1].y]),n.push(["L",e[2].x,e[2].y]),n.push(["L",e[3].x,e[3].y]),n.push("Z"),n=this.parsePath(n),t.addShape("rect",{attrs:{x:n[1][1],y:n[1][2],width:n[2][1]-n[1][1],height:n[0][2]-n[1][2],fill:i.color,radius:(n[2][1]-n[1][1])/2}})}});const _I=ss({props:{screenType:{type:String}},setup(a,i){const t=af(),e=tu(),n=ls({lastChart:null,ds:null,intervalInt:null,getLastDayEnergy(){z1().then(r=>{var o=r.data.content||[];if(o.sort(function(s,l){return s.date-l.date}),o.forEach(function(s){var l=s.date;s.Date=l.substr(0,4)+"-"+l.substr(4,2)+"-"+l.substr(6,2),s.value=Number(((s.energyAcTerminal||0)+(s.energyCooling||0)+(s.energyHeating||0)+(s.energyLight||0)+(s.energyOthers||0)).toFixed(0))}),o.length==0){setTimeout(()=>{i.emit("donethreepage")},6e3);return}n.lastChart=n.cInitChart(o),n.setChartInterval()}).catch(()=>{setTimeout(()=>{i.emit("donethreepage")},6e3)})},toplay(){n.setChartInterval()},tostop(){clearInterval(n.intervalInt)},setChartInterval(){if(a.screenType=="ver"){if(t.stopSign)return;n.intervalInt=setInterval(()=>{var r=Ol(n.ds.state.laststart).add(1,"days"),o=Ol(n.ds.state.lastend).add(1,"days");n.ds.setState("laststart",r.format("YYYY-MM-DD")),n.ds.setState("lastend",o.format("YYYY-MM-DD"));const s=n.ds.views.ttime.rows;n.lastChart.changeData(s),s.length==11&&(clearInterval(n.intervalInt),i.emit("donethreepage"))},800)}},cInitChart(r){if(a.screenType=="hor")var o=r[r.length-1]&&r[r.length-1].Date,s=8;else var o=r[11]&&r[11].Date,s=12;let l=new bI({state:{laststart:r[0]&&r[0].Date,lastend:o}});var u=l.createView("ttime",{});u.source(r).transform({type:"filter",callback:function(h){var d=h.Date;return d<=l.state.lastend&&d>=l.state.laststart}}),document.getElementsByTagName("body")[0].offsetWidth-80;var c=e.value&&new Kd({container:"lastChartBox",autoFit:!0,padding:[20,20,36,20]});return c&&(c.data(u.rows),c.tooltip(!1),c.scale("Date",{tickInterval:2,type:"timeCat",mask:"MM-DD"}),c.scale("value",{tickCount:5,type:"linear"}),c.axis("Date",{line:{style:{lineWidth:1,stroke:"rgba(224,194,155,0.1)",lineDash:[3,3]}},label:{style:{fill:"#E0C29B",fontSize:12}},tickLine:null}),c.axis("value",{line:null,grid:{line:{style:{lineWidth:1,stroke:"rgba(224,194,155,0.2)",lineDash:[3,3]}}},tickline:null,label:null}),c.legend(!1),c.interval().position("Date*value").color("l(90) 0:#BFA17E 1:#E0D1BB").shape("borderRadius").adjust({type:"stack"}).size(s).label("value",{offset:12,style:{fill:"#E0C29B",fontSize:12}}),c.render(),n.ds=l,c)}});return Ho(()=>{console.log("energychart-mounted"),n.getLastDayEnergy()}),{...us(n),lastChartBox:e}}});const SI=a=>(Ds("data-v-8ec787c8"),a=a(),Bs(),a),CI=SI(()=>ke("div",{class:"subhead-title"},[ke("span",null,"\u4E0A\u6708\u6BCF\u65E5\u80FD\u8017\uFF08kWh\uFF09")],-1)),PI={id:"lastChartBox",class:"lastChartBox",ref:"lastChartBox"};function TI(a,i,t,e,n,r){return Dr(),Lr("div",{class:Ts(["lastChart",[a.screenType==="hor"?"horizontalClass":"verticalTemChart"]])},[CI,ke("div",PI,null,512)],2)}const kI=fs(_I,[["render",TI],["__scopeId","data-v-8ec787c8"]]),zI="/sgdaping/assets/background.4e64a7f0.png";export{NI as H,jI as L,II as N,BI as T,zI as _,LI as a,RI as b,DI as c,FI as d,kI as l,OI as p};