import{h as is,u as fc,s as np,r as as,i as tl,o as os,t as ss,j as b1,k as _1,_ as ls,c as kr,a as en,l as nr,f as zr,p as us,g as fs,q as S1,F as kl,m as zl,n as As,v as Ks,w as C1,x as Wf,y as P1,z as A1,A as T1,B as O1,C as rp,D as ip,E as I1,G as Ol,H as j1,I as L1,J as D1,d as bv,K as R1,L as B1}from"./index.07ea06ba.js";const cc=Object.freeze(Object.defineProperty({__proto__:null,get Base(){return Yo},get Circle(){return uP},get Ellipse(){return cP},get Image(){return dP},get Line(){return gP},get Marker(){return yP},get Path(){return ev},get Polygon(){return PP},get Polyline(){return TP},get Rect(){return LP},get Text(){return RP}},Symbol.toStringTag,{value:"Module"})),hc=Object.freeze(Object.defineProperty({__proto__:null,get Base(){return Po},get Circle(){return GP},get Dom(){return XP},get Ellipse(){return $P},get Image(){return ZP},get Line(){return JP},get Marker(){return tA},get Path(){return nA},get Polygon(){return iA},get Polyline(){return oA},get Rect(){return uA},get Text(){return vA}},Symbol.toStringTag,{value:"Module"})),F1="/sgdaping/assets/persagyLogo.ab350717.svg",N1="/sgdaping/assets/zhijianglogo.3d5e485a.png",k1="/sgdaping/assets/changeVer.84012da4.svg",z1="/sgdaping/assets/changeHor.b7ed1543.svg",Y1="/sgdaping/assets/yellowlight.e2ed4936.png",H1="/sgdaping/assets/redlight.da537064.png",W1="/sgdaping/assets/greenlight.46aff2a5.png",G1="/sgdaping/assets/bluegreen.00759706.png",V1="/sgdaping/assets/yellowgreen.8ba3e101.png",X1="/sgdaping/assets/redyellow.a4d31e06.png",U1="/sgdaping/assets/bluelight.94881ed2.png",$1="/sgdaping/assets/lastco2.24f784ab.png",K1="/sgdaping/assets/lasthumidity.06543219.png",Z1="/sgdaping/assets/lastmethanal.498d635d.png",Q1="/sgdaping/assets/lastpm25.c890de2b.png",J1="/sgdaping/assets/lasttemp.af551cbe.png",q1="/sgdaping/assets/floor_co2.1473ef18.png",t2="/sgdaping/assets/floor_jiaquan.5a70d2b7.png",e2="/sgdaping/assets/floor_pm25.a5578d12.png",n2="/sgdaping/assets/floor_shidu.5b65577c.png",r2="/sgdaping/assets/floor_wendu.4c10f196.png",i2="/sgdaping/assets/floor_co2_ver.452fda21.png",a2="/sgdaping/assets/floor_jiaquan_ver.89176ec7.png",o2="/sgdaping/assets/floor_pm25_ver.ae37a6d9.png",s2="/sgdaping/assets/floor_shidu_ver.d5fad17b.png",l2="/sgdaping/assets/floor_wendu_ver.430ba6f4.png",u2="/sgdaping/assets/lastGold.982ba332.svg",f2="/sgdaping/assets/lastGray.80fa12cf.svg",Aa={persagyLogo:F1,zhijiangLogo:N1,changeVer:k1,changeHor:z1,yellowlight:Y1,redlight:H1,greenlight:W1,bluegreen:G1,yellowgreen:V1,redyellow:X1,bluelight:U1,lastco2:$1,lasthumidity:K1,lastmethanal:Z1,lastpm25:Q1,lasttemp:J1,floor_co2:q1,floor_jiaquan:t2,floor_pm25:e2,floor_shidu:n2,floor_wendu:r2,floor_co2_ver:i2,floor_jiaquan_ver:a2,floor_pm25_ver:o2,floor_shidu_ver:s2,floor_wendu_ver:l2,lastGold:u2,lastGray:f2},c2=is({props:{navigateItem:{type:String}},setup(a,i){const{persagyLogo:t,zhijiangLogo:e,changeHor:n,changeVer:r}=Aa,o=b1(),s=_1(),l=fc(),{weatherCont:u,projectObj:c,projectId:f}=np(l),h=as({logo:f=="Pj3301100002"?e:t,changeHor:n,changeVer:r,nowScreen:o.path.indexOf("horiScreen")>-1?"horizontal":"vertical",nowStr:tl().format("YYYY.MM.DD HH:mm"),setNowInterval(){setInterval(()=>{h.nowstr=tl().format("YYYY.MM.DD HH:mm")},5e3)},changeScreen(){h.nowScreen=="vertical"?(h.nowScreen="horizontal",s.push({path:"/horiScreen"})):(h.nowScreen="vertical",s.push({path:"/verScreen"}))}});return os(()=>{h.setNowInterval()}),{...ss(h),weatherCont:u,projectObj:c}}});const ap=a=>(us("data-v-dd18d5d2"),a=a(),fs(),a),h2={class:"horHead horSty"},d2={class:"horHead-content"},v2={class:"firtitle"},g2=ap(()=>en("div",{class:"sectitle"},"\u61C2\u7A7A\u95F4,\u66F4\u61C2\u529E\u516C",-1)),p2={class:"horHead-left"},m2=["src"],y2={class:"horHead-right"},x2={class:"right-item"},E2={class:"item-time"},w2={class:"right-item"},M2=["src"],b2=ap(()=>en("div",{class:"right-item",style:{display:"none"}},"\u9000\u51FA",-1));function _2(a,i,t,e,n,r){return zr(),kr("div",h2,[en("div",d2,[en("div",null,[en("div",v2,nr(a.projectObj.localName),1),g2])]),en("div",p2,[en("img",{src:a.logo,alt:"",style:{height:"60px"}},null,8,m2)]),en("div",y2,[en("div",x2,[en("span",E2,nr(a.nowStr),1)]),en("div",w2,nr(a.weatherCont.text),1),en("div",{class:"right-item",onClick:i[0]||(i[0]=(...o)=>a.changeScreen&&a.changeScreen(...o))},[en("img",{class:"firstImg",alt:"",src:a.nowScreen=="vertical"?a.changeHor:a.changeVer},null,8,M2)]),b2])])}const B5=ls(c2,[["render",_2],["__scopeId","data-v-dd18d5d2"]]);var op=function(a,i,t){if(a==null)return null;const{yellowlight:e,redlight:n,greenlight:r,bluegreen:o,yellowgreen:s,redyellow:l,bluelight:u}=Aa;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{S1().then(e=>{let n=e.data.data||[],r=[{id:"temp",code:"Tdb",name:"\u6E29\u5EA6",unit:"\u2103",level:"low",fixed:1},{id:"humidity",name:"\u6E7F\u5EA6",code:"RH",unit:"%",level:"middle",fixed:0},{id:"co2",name:"CO\u2082",code:"CO2",unit:"ppm",level:"low",fixed:0},{id:"methanal",code:"HCHO",name:"\u7532\u919B",unit:"mg/m\xB3",level:"low",fixed:2},{id:"pm25",code:"PM2d5",name:"PM2.5",unit:"ug/m\xB3",level:"low",fixed:0}];r.forEach(o=>{var s=n.filter(u=>u.code==o.code),l=(s[0]||{}).data;o.value=l&&Number(l.toFixed(o.fixed))}),t.realDataArr=r}).catch(e=>{})}),{...ss(t)}}});const C2=a=>(us("data-v-a2afdba0"),a=a(),fs(),a),P2=C2(()=>en("div",{class:"head-title"},[en("span",null,"\u5B9E\u65F6\u6570\u636E"),en("span",{class:"subhead-title"},"\u4E3B\u52A8\u5F0F\u7A7A\u8C03\uFF0C\u4F1A\u547C\u5438\u7684\u5199\u5B57\u697C")],-1)),A2={class:"contain"},T2={class:"content_value"},O2={class:"content_name"};function I2(a,i,t,e,n,r){return zr(),kr("div",{class:As(["NowData",[a.screenType==="hor"?"horiNowClass":"verticalNowData"]])},[P2,en("div",A2,[(zr(!0),kr(kl,null,zl(a.realDataArr,(o,s)=>(zr(),kr("div",{class:"item",key:s},[en("div",{class:"item_content",style:Ks({backgroundImage:"url("+a.selectColor(o.value,o.id)+")"})},[en("div",T2,[en("span",null,nr(o.value),1),en("span",null,nr(o.unit),1)]),en("div",O2,[en("span",null,nr(o.name),1)])],4)]))),128))])],2)}const F5=ls(S2,[["render",I2],["__scopeId","data-v-a2afdba0"]]),j2=is({props:{screenType:{type:String}},setup(a,i){const{lastco2:t,lasthumidity:e,lastmethanal:n,lastpm25:r,lasttemp:o}=Aa,s=as({lastDataArr:[]});return os(()=>{C1().then(l=>{var u=l.data.data||[],c=[{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}];c.forEach(f=>{var h=u.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=c}).catch(l=>{})}),{...ss(s)}}});const L2=a=>(us("data-v-0f3407ba"),a=a(),fs(),a),D2=L2(()=>en("div",{class:"subhead-title"},[en("span",null,"\u4E0A\u6708\u6570\u636E")],-1)),R2={class:"itemWrap"},B2={class:"item-left"},F2=["src"],N2={class:"item-right"},k2={class:"item-value"},z2={class:"item-content"},Y2={class:"item-content-right"},H2={class:"max"},W2={class:"min"};function G2(a,i,t,e,n,r){return zr(),kr("div",{class:As(["lastMonth",[a.screenType==="hor"?"horiLastMonth":"verticalLastMonth"]])},[D2,en("div",R2,[(zr(!0),kr(kl,null,zl(a.lastDataArr,(o,s)=>(zr(),kr("div",{class:"item",key:s},[en("div",B2,[en("img",{src:o.img},null,8,F2)]),en("div",N2,[en("div",k2,[en("span",null,nr(o.value),1),en("span",null,nr(o.unit),1)]),en("div",z2,[en("div",Y2,[en("div",H2,[en("span",null,nr(o.maxName),1),en("span",null,nr(o.max),1),en("span",null,nr(o.unit),1)]),en("div",W2,[en("span",null,nr(o.minName),1),en("span",null,nr(o.min),1),en("span",null,nr(o.unit),1)])])])])]))),128))])],2)}const N5=ls(j2,[["render",G2],["__scopeId","data-v-0f3407ba"]]);function sp(){const a=Wf(),i=Wf();return os(()=>{P1().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 V2=is({props:{navigateItem:{type:String},color:{type:String}},setup(a,i){const{airValue:t,airStatus:e}=sp(),n=as({airValue:t,airStatus:e});return{...ss(n)}}});const X2=a=>(us("data-v-12f64086"),a=a(),fs(),a),U2={class:"airSwitch verticalClass"},$2={class:"subhead-title"},K2={class:"air-cont"},Z2={class:"air-left"},Q2={class:"bar-box"},J2={class:"air-rate"},q2=X2(()=>en("span",null,"\u7A7A\u8C03\u5F00\u542F\u7387",-1)),tx={class:"air-rate-value"};function ex(a,i,t,e,n,r){return zr(),kr("div",U2,[en("div",$2,[en("span",null,nr(a.airStatus?"\u7A7A\u8C03\u5DF2\u5F00\u542F":"\u7A7A\u8C03\u5DF2\u5173\u95ED"),1)]),en("div",K2,[en("div",Z2,[en("div",Q2,[en("div",{class:"bar",style:Ks({width:a.airValue+"%"})},null,4)]),en("div",J2,[q2,en("span",tx,nr(a.airValue)+"%",1)])])])])}const k5=ls(V2,[["render",ex],["__scopeId","data-v-12f64086"]]);var _h=function(a,i){return _h=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])},_h(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");_h(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 Ru(){for(var a=0,i=0,t=arguments.length;i-1:!1},So=function(a,i){if(!no(a))return a;for(var t=[],e=0;et?t:a},Uc=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 Il(a,"Number")},dx=1e-5;function Ai(a,i,t){return t===void 0&&(t=dx),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},Px=function(a){return no(a)?Array.prototype.slice.call(a):[]};var ff={};const ul=function(a){return a=a||"g",ff[a]?ff[a]+=1:ff[a]=1,a+ff[a]},Zs=function(){};function Da(a){return Je(a)?0:no(a)?a.length:Object.keys(a).length}var cf;const hf=gc(function(a,i){i===void 0&&(i={});var t=i.fontSize,e=i.fontFamily,n=i.fontWeight,r=i.fontStyle,o=i.fontVariant;return cf||(cf=document.createElement("canvas").getContext("2d")),cf.font=[r,o,n,t+"px",e].join(" "),cf.measureText(Xn(a)?a:"").width},function(a,i){return i===void 0&&(i={}),Ru([a],hd(i)).join("")}),Ax=function(a,i,t,e){e===void 0&&(e="...");var n=16,r=hf(e,t),o=Xn(a)?a:vc(a),s=i,l=[],u,c;if(hf(a,t)<=i)return a;for(;u=o.substr(0,n),c=hf(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=hf(u,t),!(c+r>s);)if(l.push(u),s-=c,o=o.substr(1),!o)return l.join("");return""+l.join("")+e};var Tx=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 hi;(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"})(hi||(hi={}));var Xl={FORE:3,MID:2,BG:1},Er;(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"})(Er||(Er={}));var el;(function(a){a.BEFORE_DRAW_ANIMATE="beforeanimate",a.AFTER_DRAW_ANIMATE="afteranimate",a.BEFORE_RENDER_LABEL="beforerenderlabel",a.AFTER_RENDER_LABEL="afterrenderlabel"})(el||(el={}));var Pa;(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"})(Pa||(Pa={}));var Gf;(function(a){a.ACTIVE="active",a.INACTIVE="inactive",a.SELECTED="selected",a.DEFAULT="default"})(Gf||(Gf={}));var Hl=["color","shape","size"],ur="_origin",_v=1,Sv=1,Cv=.25,mp={};function Ox(a){var i=mp[a];if(!i)throw new Error("G engine '".concat(a,"' is not exist, please register it at first."));return i}function yp(a,i){mp[a]=i}function Dl(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 xu,Kc,xp,Ch;function Ix(){xu=document.createElement("table"),Kc=document.createElement("tr"),xp=/^\s*<(\w+|!)[^>]*>/,Ch={tr:document.createElement("tbody"),tbody:xu,thead:xu,tfoot:xu,td:Kc,th:Kc,"*":document.createElement("div")}}function nl(a){xu||Ix();var i=xp.test(a)&&RegExp.$1;(!i||!(i in Ch))&&(i="*");var t=Ch[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 La(a,i,t){var e;try{e=window.getComputedStyle?window.getComputedStyle(a,null)[i]:a.style[i]}catch{}finally{e=e===void 0?t:e}return e}function jx(a,i){var t=La(a,"height",i);return t==="auto"&&(t=a.offsetHeight),parseFloat(t)}function Lx(a,i){var t=jx(a,i),e=parseFloat(La(a,"borderTopWidth"))||0,n=parseFloat(La(a,"paddingTop"))||0,r=parseFloat(La(a,"paddingBottom"))||0,o=parseFloat(La(a,"borderBottomWidth"))||0,s=parseFloat(La(a,"marginTop"))||0,l=parseFloat(La(a,"marginBottom"))||0;return t+e+o+n+r+s+l}function Dx(a,i){var t=La(a,"width",i);return t==="auto"&&(t=a.offsetWidth),parseFloat(t)}function Rx(a,i){var t=Dx(a,i),e=parseFloat(La(a,"borderLeftWidth"))||0,n=parseFloat(La(a,"paddingLeft"))||0,r=parseFloat(La(a,"paddingRight"))||0,o=parseFloat(La(a,"borderRightWidth"))||0,s=parseFloat(La(a,"marginRight"))||0,l=parseFloat(La(a,"marginLeft"))||0;return t+e+o+n+r+l+s}function Qi(a,i){if(a)for(var t in i)i.hasOwnProperty(t)&&(a.style[t]=i[t]);return a}function Bx(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 Pv(a){return typeof a=="number"&&!isNaN(a)}function Av(a,i,t,e){var n=t,r=e;if(i){var o=Bx(a);n=o.width?o.width:n,r=o.height?o.height:r}return{width:Math.max(Pv(n)?n:_v,_v),height:Math.max(Pv(r)?r:Sv,Sv)}}function Fx(a){var i=a.parentNode;i&&i.removeChild(a)}var Nx="*",Ep=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},Ph=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},df=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},Ah=function(a){if(a=Wl(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*E*E)/(_*x*x+D*E*E)));p=C*t*x/e+(a+s)/2,m=C*-e*E/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=wp(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,$=[a,i],xt=[a+ht*yt,i-lt*st],Gt=[s+ht*it,l-lt*Q],Rt=[s,l];if(xt[0]=2*$[0]-xt[0],xt[1]=2*$[1]-xt[1],u)return[xt,Gt,Rt].concat(h);h=[xt,Gt,Rt].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},Th=function(a,i){var t=Ah(a),e=i&&Ah(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(E,x,M){var _,D;if(!E)return["C",x.x,x.y,x.x,x.y,x.x,x.y];switch(!(E[0]in{T:1,Q:1})&&(x.qx=x.qy=null),E[0]){case"M":x.X=E[1],x.Y=E[2];break;case"A":E=["C"].concat(wp.apply(0,[x.x,x.y].concat(E.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),E=["C",_,D].concat(E.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),E=["C"].concat(Tv(x.x,x.y,x.qx,x.qy,E[1],E[2]));break;case"Q":x.qx=E[1],x.qy=E[2],E=["C"].concat(Tv(x.x,x.y,E[1],E[2],E[3],E[4]));break;case"L":E=["C"].concat(vf(x.x,x.y,E[1],E[2]));break;case"H":E=["C"].concat(vf(x.x,x.y,E[1],x.y));break;case"V":E=["C"].concat(vf(x.x,x.y,x.x,E[1]));break;case"Z":E=["C"].concat(vf(x.x,x.y,x.X,x.Y));break}return E},h=function(E,x){if(E[x].length>7){E[x].shift();for(var M=E[x];M.length;)o[x]="A",e&&(s[x]="A"),E.splice(x++,0,["C"].concat(M.splice(0,6)));E.splice(x,1),c=Math.max(t.length,e&&e.length||0)}},d=function(E,x,M,_,D){E&&x&&E[D][0]==="M"&&x[D][0]!=="M"&&(x.splice(D,0,["M",_.x,_.y]),M.bx=0,M.by=0,M.x=E[D][1],M.y=E[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 E=l.length,x=E,M;E--;)d=l[E],M=1-d,u[0][E]=M*M*M*a+3*M*M*d*t+3*M*d*d*n+d*d*d*o,u[1][E]=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])}}},Wx=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}}}},zs=function(a,i,t){return i>=a.x&&i<=a.x+a.width&&t>=a.y&&t<=a.y+a.height},bp=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=Mp,r},Oh=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:bp(a,i,t,e),vb:[a,i,t,e].join(" ")}},Gx=function(a,i){return a=Oh(a),i=Oh(i),zs(i,a.x,a.y)||zs(i,a.x2,a.y)||zs(i,a.x,a.y2)||zs(i,a.x2,a.y2)||zs(a,i.x,i.y)||zs(a,i.x2,i.y)||zs(a,i.x,i.y2)||zs(a,i.x2,i.y2)||(a.xi.x||i.xa.x)&&(a.yi.y||i.ya.y)},jv=function(a,i,t,e,n,r,o,s){ln(a)||(a=[a,i,t,e,n,r,o,s]);var l=Hx.apply(null,a);return Oh(l.min.x,l.min.y,l.max.x-l.min.x,l.max.y-l.min.y)},Lv=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),E=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-E)*180/Math.PI;return{x:v,y:g,m:{x:p,y:m},n:{x:y,y:E},start:{x,y:M},end:{x:_,y:D},alpha:C}},Vx=function(a,i,t){var e=jv(a),n=jv(i);if(!Gx(e,n))return t?0:[];for(var r=Iv.apply(0,a),o=Iv.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},Xx=function(a,i,t){a=Th(a),i=Th(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 Zx=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(Kx(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},Qx=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=Zc(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=Zc(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=Zc(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 pd=Object.freeze(Object.defineProperty({__proto__:null,catmullRomToBezier:Ph,fillPath:Qx,fillPathByDiff:_p,formatPath:Ih,intersection:Ux,parsePathArray:Mp,parsePathString:Wl,pathToAbsolute:Ah,pathToCurve:Th,rectPath:bp},Symbol.toStringTag,{value:"Module"}));var ef=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 Cp(a,i){var t=a.indexOf(i);t!==-1&&a.splice(t,1)}var Dv=typeof window<"u"&&typeof window.document<"u";function Pp(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 Fu(a){return a.cfg.visible&&a.cfg.capture}var pc=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}(Ep),Rv=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 aE:typeof navigator<"u"?Nv(navigator.userAgent):cE()}function uE(a){return a!==""&&lE.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 Nv(a){var i=uE(a);if(!i)return null;var t=i[0],e=i[1];if(t==="searchbot")return new iE;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 xE(a,i){return a[0]*i[0]+a[1]*i[1]}function EE(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 jh(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 wE(a,i){return a[0]===i[0]&&a[1]===i[1]}var Ul=Tp;(function(){var a=yE();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 kv(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],E=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+E*o+x*u,t[7]=y*n+E*s+x*c,t[8]=y*r+E*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 yc(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 hu=qr,Qc="matrix",_E=["zIndex","capture","visible","type"],SE=["repeat"],CE=":",PE="*";function AE(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 jp=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=IE(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&&Pp(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=bo(o),e=qa(o),n=bo(s),r=qa(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=bo(o),e=qa(o),n=bo(s),r=qa(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(Fu(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&&jE(o,t,!1),t.set("parent",this),e&&Lp(t,e),r&&Dp(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[Lh]=n,e}),t.sort(LE(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}(jp),Jl=0,Eu=0,du=0,Bp=1e3,Uf,wu,$f=0,Pl=0,xc=0,ku=typeof performance=="object"&&performance.now?performance:Date,Fp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(a){setTimeout(a,17)};function Np(){return Pl||(Fp(DE),Pl=ku.now()+xc)}function DE(){Pl=0}function Dh(){this._call=this._time=this._next=null}Dh.prototype=kp.prototype={constructor:Dh,restart:function(a,i,t){if(typeof a!="function")throw new TypeError("callback is not a function");t=(t==null?Np():+t)+(i==null?0:+i),!this._next&&wu!==this&&(wu?wu._next=this:Uf=this,wu=this),this._call=a,this._time=t,Rh()},stop:function(){this._call&&(this._call=null,this._time=1/0,Rh())}};function kp(a,i,t){var e=new Dh;return e.restart(a,i,t),e}function RE(){Np(),++Jl;for(var a=Uf,i;a;)(i=Pl-a._time)>=0&&a._call.call(null,i),a=a._next;--Jl}function Yv(){Pl=($f=ku.now())+xc,Jl=Eu=0;try{RE()}finally{Jl=0,FE(),Pl=0}}function BE(){var a=ku.now(),i=a-$f;i>Bp&&(xc-=i,$f=a)}function FE(){for(var a,i=Uf,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:Uf=t);wu=a,Rh(e)}function Rh(a){if(!Jl){Eu&&(Eu=clearTimeout(Eu));var i=a-Pl;i>24?(a<1/0&&(Eu=setTimeout(Yv,a-ku.now()-xc)),du&&(du=clearInterval(du))):(du||($f=ku.now(),du=setInterval(BE,Bp)),Jl=1,Fp(Yv))}}function xd(a,i,t){a.prototype=i.prototype=t,t.constructor=a}function zp(a,i){var t=Object.create(a.prototype);for(var e in i)t[e]=i[e];return t}function nf(){}var zu=.7,Kf=1/zu,$l="\\s*([+-]?\\d+)\\s*",Yu="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",es="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",NE=/^#([0-9a-f]{3,8})$/,kE=new RegExp("^rgb\\("+[$l,$l,$l]+"\\)$"),zE=new RegExp("^rgb\\("+[es,es,es]+"\\)$"),YE=new RegExp("^rgba\\("+[$l,$l,$l,Yu]+"\\)$"),HE=new RegExp("^rgba\\("+[es,es,es,Yu]+"\\)$"),WE=new RegExp("^hsl\\("+[Yu,es,es]+"\\)$"),GE=new RegExp("^hsla\\("+[Yu,es,es,Yu]+"\\)$"),Hv={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};xd(nf,Hu,{copy:function(a){return Object.assign(new this.constructor,this,a)},displayable:function(){return this.rgb().displayable()},hex:Wv,formatHex:Wv,formatHsl:VE,formatRgb:Gv,toString:Gv});function Wv(){return this.rgb().formatHex()}function VE(){return Yp(this).formatHsl()}function Gv(){return this.rgb().formatRgb()}function Hu(a){var i,t;return a=(a+"").trim().toLowerCase(),(i=NE.exec(a))?(t=i[1].length,i=parseInt(i[1],16),t===6?Vv(i):t===3?new to(i>>8&15|i>>4&240,i>>4&15|i&240,(i&15)<<4|i&15,1):t===8?gf(i>>24&255,i>>16&255,i>>8&255,(i&255)/255):t===4?gf(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=kE.exec(a))?new to(i[1],i[2],i[3],1):(i=zE.exec(a))?new to(i[1]*255/100,i[2]*255/100,i[3]*255/100,1):(i=YE.exec(a))?gf(i[1],i[2],i[3],i[4]):(i=HE.exec(a))?gf(i[1]*255/100,i[2]*255/100,i[3]*255/100,i[4]):(i=WE.exec(a))?$v(i[1],i[2]/100,i[3]/100,1):(i=GE.exec(a))?$v(i[1],i[2]/100,i[3]/100,i[4]):Hv.hasOwnProperty(a)?Vv(Hv[a]):a==="transparent"?new to(NaN,NaN,NaN,0):null}function Vv(a){return new to(a>>16&255,a>>8&255,a&255,1)}function gf(a,i,t,e){return e<=0&&(a=i=t=NaN),new to(a,i,t,e)}function XE(a){return a instanceof nf||(a=Hu(a)),a?(a=a.rgb(),new to(a.r,a.g,a.b,a.opacity)):new to}function Bh(a,i,t,e){return arguments.length===1?XE(a):new to(a,i,t,e==null?1:e)}function to(a,i,t,e){this.r=+a,this.g=+i,this.b=+t,this.opacity=+e}xd(to,Bh,zp(nf,{brighter:function(a){return a=a==null?Kf:Math.pow(Kf,a),new to(this.r*a,this.g*a,this.b*a,this.opacity)},darker:function(a){return a=a==null?zu:Math.pow(zu,a),new to(this.r*a,this.g*a,this.b*a,this.opacity)},rgb:function(){return this},displayable:function(){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:Xv,formatHex:Xv,formatRgb:Uv,toString:Uv}));function Xv(){return"#"+Jc(this.r)+Jc(this.g)+Jc(this.b)}function Uv(){var a=this.opacity;return a=isNaN(a)?1:Math.max(0,Math.min(1,a)),(a===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(a===1?")":", "+a+")")}function Jc(a){return a=Math.max(0,Math.min(255,Math.round(a)||0)),(a<16?"0":"")+a.toString(16)}function $v(a,i,t,e){return e<=0?a=i=t=NaN:t<=0||t>=1?a=i=NaN:i<=0&&(a=NaN),new Jo(a,i,t,e)}function Yp(a){if(a instanceof Jo)return new Jo(a.h,a.s,a.l,a.opacity);if(a instanceof nf||(a=Hu(a)),!a)return new Jo;if(a instanceof Jo)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 Jo(o,s,l,a.opacity)}function UE(a,i,t,e){return arguments.length===1?Yp(a):new Jo(a,i,t,e==null?1:e)}function Jo(a,i,t,e){this.h=+a,this.s=+i,this.l=+t,this.opacity=+e}xd(Jo,UE,zp(nf,{brighter:function(a){return a=a==null?Kf:Math.pow(Kf,a),new Jo(this.h,this.s,this.l*a,this.opacity)},darker:function(a){return a=a==null?zu:Math.pow(zu,a),new Jo(this.h,this.s,this.l*a,this.opacity)},rgb:function(){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 to(qc(a>=240?a-240:a+120,n,e),qc(a,n,e),qc(a<120?a+240:a-120,n,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var a=this.opacity;return a=isNaN(a)?1:Math.max(0,Math.min(1,a)),(a===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(a===1?")":", "+a+")")}}));function qc(a,i,t){return(a<60?i+(t-i)*a/60:a<180?t:a<240?i+(t-i)*(240-a)/60:i)*255}function Ed(a){return function(){return a}}function $E(a,i){return function(t){return a+t*i}}function KE(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 ZE(a){return(a=+a)==1?Hp:function(i,t){return t-i?KE(i,t,a):Ed(isNaN(i)?t:i)}}function Hp(a,i){var t=i-a;return t?$E(a,t):Ed(isNaN(a)?i:a)}const Kv=function a(i){var t=ZE(i);function e(n,r){var o=t((n=Bh(n)).r,(r=Bh(r)).r),s=t(n.g,r.g),l=t(n.b,r.b),u=Hp(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 Wp(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:Fh(e,n)})),t=th.lastIndex;return tu.length?(l=Wl(r[s]),u=Wl(n[s]),u=_p(u,l),u=Ih(u,l),i.fromAttrs.path=u,i.toAttrs.path=l):i.pathFormatted||(l=Wl(r[s]),u=Wl(n[s]),u=Ih(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=Rw(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}(),Fw=40,a0=0,o0=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function s0(a,i,t){t.name=i,t.target=a,t.currentTarget=a,t.delegateTarget=a,a.emit(i,t)}function Nw(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&&Pp(a,e)){t.bubbles=!1;return}t.name=i,t.currentTarget=a,t.delegateTarget=a,a.emit(i,t)}}var kw=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(o0,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(o0,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 ef(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===a0&&(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===a0){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>Fw?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,s0(n,i,s);for(var l=n.getParent();l;)l.emitDelegation(i,s),s.propagationStopped||Nw(l,i,s),s.propagationPath.push(l),l=l.getParent()}else{var u=this.canvas;s0(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}(),l0="px",u0=Ap(),zw=u0&&u0.name==="firefox",Ec=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");Xn(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 kw({canvas:this});t.init(),this.set("eventController",t)},i.prototype.initTimeline=function(){var t=new Bw(this);this.set("timeline",t)},i.prototype.setDOMSize=function(t,e){var n=this.get("el");Dv&&(n.style.width=t+l0,n.style.height=e+l0)},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");Dv&&e&&(e.style.cursor=t)},i.prototype.getPointByEvent=function(t){var e=this.get("supportCSSTransform");if(e){if(zw&&!Je(t.layerX)&&t.layerX!==t.offsetX)return{x:t.layerX,y:t.layerY};if(!Je(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}(Rp),wc=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,E=n-v+p,x=o+v+p,M=r-v+y,_=s+v+y;n=Math.min(n,E),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}(jp),Zp=new Map;function Co(a,i){Zp.set(a,i)}function bc(a){return Zp.get(a)}function Qp(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 Jp(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 f0(a){return Math.min.apply(null,a)}function c0(a){return Math.max.apply(null,a)}function qi(a,i,t,e){var n=a-t,r=i-e;return Math.sqrt(n*n+r*r)}function kf(a,i){return Math.abs(a-i)<.001}function ou(a,i){var t=f0(a),e=f0(i),n=c0(a),r=c0(i);return{x:t,y:e,width:n-t,height:r-e}}function _c(a){return(a+Math.PI*2)%(Math.PI*2)}const Ti={box:function(a,i,t,e){return ou([a,t],[i,e])},length:function(a,i,t,e){return qi(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 qi(a,i,n,r);var s=(t-a)*(t-a)+(e-i)*(e-i);return o>s?qi(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(wE(o,[0,0]))return Math.sqrt((n-a)*(n-a)+(r-i)*(r-i));var s=[-o[1],o[0]];Op(s,s);var l=[n-a,r-i];return Math.abs(xE(l,s))},tangentAngle:function(a,i,t,e){return Math.atan2(e-i,t-a)}};var Yw=1e-4;function qp(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=qi(l[0],l[1],v[0],v[1]);g=0&&g=0?[n]:[]}function d0(a,i,t,e){return 2*(1-e)*(i-a)+2*e*(t-i)}function tm(a,i,t,e,n,r,o){var s=Vs(a,t,n,o),l=Vs(i,e,r,o),u=Ti.pointAt(a,i,t,e,o),c=Ti.pointAt(t,e,n,r,o);return[[a,i,u.x,u.y,s,l],[s,l,c.x,c.y,n,r]]}function zh(a,i,t,e,n,r,o){if(o===0)return(qi(a,i,t,e)+qi(t,e,n,r)+qi(a,i,n,r))/2;var s=tm(a,i,t,e,n,r,.5),l=s[0],u=s[1];return l.push(o-1),u.push(o-1),zh.apply(null,l)+zh.apply(null,u)}const em={box:function(a,i,t,e,n,r){var o=h0(a,t,n)[0],s=h0(i,e,r)[0],l=[a,n],u=[i,r];return o!==void 0&&l.push(Vs(a,t,n,o)),s!==void 0&&u.push(Vs(i,e,r,s)),ou(l,u)},length:function(a,i,t,e,n,r){return zh(a,i,t,e,n,r,3)},nearestPoint:function(a,i,t,e,n,r,o,s){return qp([a,t,n],[i,e,r],o,s,Vs)},pointDistance:function(a,i,t,e,n,r,o,s){var l=this.nearestPoint(a,i,t,e,n,r,o,s);return qi(l.x,l.y,o,s)},interpolationAt:Vs,pointAt:function(a,i,t,e,n,r,o){return{x:Vs(a,t,n,o),y:Vs(i,e,r,o)}},divide:function(a,i,t,e,n,r,o){return tm(a,i,t,e,n,r,o)},tangentAngle:function(a,i,t,e,n,r,o){var s=d0(a,t,n,o),l=d0(i,e,r,o),u=Math.atan2(l,s);return _c(u)}};function Xs(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 v0(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 eh(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(kf(n,0))kf(r,0)||(l=-o/r,l>=0&&l<=1&&s.push(l));else{var f=r*r-4*n*o;kf(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 nm(a,i,t,e,n,r,o,s,l){var u=Xs(a,t,n,o,l),c=Xs(i,e,r,s,l),f=Ti.pointAt(a,i,t,e,l),h=Ti.pointAt(t,e,n,r,l),d=Ti.pointAt(n,r,o,s,l),v=Ti.pointAt(f.x,f.y,h.x,h.y,l),g=Ti.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 Yh(a,i,t,e,n,r,o,s,l){if(l===0)return Hw([a,t,n,o],[i,e,r,s]);var u=nm(a,i,t,e,n,r,o,s,.5),c=u[0],f=u[1];return c.push(l-1),f.push(l-1),Yh.apply(null,c)+Yh.apply(null,f)}const Su={extrema:eh,box:function(a,i,t,e,n,r,o,s){for(var l=[a,o],u=[i,s],c=eh(a,t,n,o),f=eh(i,e,r,s),h=0;h0?t:t*-1}const Ww={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,E=(d-h)*Math.pow(Math.sin(v),3)/s,x=g-y,M=p-E,_=c-y,D=f-E,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+g0(g,l),y:i+g0(p,u)}},pointDistance:function(a,i,t,e,n,r){var o=this.nearestPoint(a,i,t,e,n,r);return qi(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 _c(o)}};function Gw(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 Vw(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 Xw(a,i,t){return Math.atan(-i/a*Math.tan(t))}function Uw(a,i,t){return Math.atan(i/(a*Math.tan(t)))}function p0(a,i,t,e,n,r){return t*Math.cos(n)*Math.cos(r)-e*Math.sin(n)*Math.sin(r)+a}function m0(a,i,t,e,n,r){return t*Math.sin(n)*Math.cos(r)+e*Math.cos(n)*Math.sin(r)+i}function $w(a,i,t,e){var n=Math.atan2(e*a,t*i);return(n+Math.PI*2)%(Math.PI*2)}function y0(a,i,t){return{x:a*Math.cos(t),y:i*Math.sin(t)}}function x0(a,i,t){var e=Math.cos(t),n=Math.sin(t);return[a*e-i*n,a*n+i*e]}const Kw={box:function(a,i,t,e,n,r,o){for(var s=Xw(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=Uw(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=E)}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=x0(s-a,l-i,-n),c=u[0],f=u[1],h=Ww.nearestPoint(0,0,t,e,c,f),d=$w(t,e,h.x,h.y);do&&(h=y0(t,e,o));var v=x0(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 qi(u.x,u.y,s,l)},pointAt:function(a,i,t,e,n,r,o,s){var l=(o-r)*s+r;return{x:p0(a,i,t,e,n,l),y:m0(a,i,t,e,n,l)}},tangentAngle:function(a,i,t,e,n,r,o,s){var l=(o-r)*s+r,u=Gw(a,i,t,e,n,r,o,l),c=Vw(a,i,t,e,n,r,o,l);return _c(Math.atan2(c,u))}};function rm(a){for(var i=0,t=[],e=0;e1||i<0||a.length<2)return null;var t=rm(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=Ti.pointAt(u[0],u[1],c[0],c[1],h);break}r+=f}return o}function Jw(a,i){if(i>1||i<0||a.length<2)return 0;for(var t=rm(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 qw(a,i,t){for(var e=1/0,n=0;n1){var n=nM(i,t);return i*e+n*(e-1)}return i}function nM(a,i){return i?i-a:a*.14}function rM(a,i){var t=Sc(),e=0;if(Je(a)||a==="")return e;if(t.save(),t.font=i,Xn(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 lM(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 hM=/[a-z]/;function w0(a,i){return[i[0]+(i[0]-a[0]),i[1]+(i[1]-a[1])]}function om(a){var i=am(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,E=(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],_=M0([1,0],x),D=M0(x,M);return Hh(x,M)<=-1&&(D=Math.PI),Hh(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:E,rx:Wh(a,[u,c])?0:t,ry:Wh(a,[u,c])?0:e,startAngle:_,endAngle:_+D,xRotation:n,arcFlag:r,sweepFlag:o}}function b0(a,i){return[i[0]+(i[0]-a[0]),i[1]+(i[1]-a[1])]}function sm(a){a=sM(a);for(var i=[],t=null,e=null,n=null,r=0,o=a.length,s=0;s=i&&a<=t};function vM(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;_0(d,0,1)&&_0(v,0,1)&&(h={x:a.x+d*o.x,y:a.y+d*o.y})}return h}var gM=1e-6;function rh(a){return Math.abs(a)0!=rh(s[1]-t)>0&&rh(i-(t-o[1])*(o[0]-s[0])/(o[1]-s[1])-o[0])<0&&(e=!e)}return e}function C0(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 mM(a,i){var t=!1;return Nt(a,function(e){if(vM(e.from,e.to,i.from,i.to))return t=!0,!1}),t}function P0(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 yM(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 wM(a){var i=a.attr(),t=i.path,e=i.stroke,n=e?i.lineWidth:0,r=a.get("segments")||sm(t),o=EM(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=Sd(a,f),{x:f.minX,y:f.minY,width:f.maxX-f.minX,height:f.maxY-f.minY}}function MM(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=Sd(a,c),{x:c.minX,y:c.minY,width:c.maxX-c.minX,height:c.maxY-c.minY}}function bM(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}}Co("rect",Qp);Co("image",Qp);Co("circle",Jp);Co("marker",Jp);Co("polyline",tM);Co("polygon",eM);Co("text",iM);Co("path",wM);Co("line",MM);Co("ellipse",bM);var A0=0,_M=1/2,SM=1/2,CM=.05,Ac=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]=A0)}),ll(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]=[A0,1]}return r},a}(),lm={},um=function(a){return lm[a.toLowerCase()]},Tc=function(a,i){if(um(a))throw new Error("Adjust type '"+a+"' existed.");lm[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 Gh=function(a,i){return Gh=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])},Gh(a,i)};function Oc(a,i){Gh(a,i);function t(){this.constructor=a}a.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}var qo=function(){return qo=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(!Je(u)&&Je(l)&&u>=0){var v=this.getDodgeOnlyOffset(n,e);d=c+v}else if(!Je(l)&&!Je(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=Je(h)?g:1/l/t*h,!Je(c)){var p=c/s;g=Math.min(g,p)}if(!Je(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,!Je(c)){var p=c/s;g=Math.min(g,p)}if(!Je(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}(Ac);function AM(a,i){return(i-a)*Math.random()+a}var TM=function(a){Oc(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.process=function(t){var e=Ja(t),n=ro(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)*CM;return AM(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}(Ac),ih=Tx,OM=function(a){Oc(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 ih,u=new ih;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,!Je(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),qo(qo({},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 ih;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),qo(qo({},h),(d={},d[l]=m,d))})})},i}(Ac),IM=function(a){Oc(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.process=function(t){var e=ro(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 la(t,function(u){return la(u,function(c){var f,h,d=c[o],v=c[r];if(ln(d)){var g=(l-s[v])/2;return qo(qo({},c),(f={},f[o]=la(d,function(m){return g+m}),f))}var p=(l-d)/2;return qo(qo({},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=ll(t,function(l){return l[r]});return Sx(s,function(l){return e.getDimMaxValue(l,o)})},i.prototype.getDimMaxValue=function(t,e){var n=la(t,function(o){return he(o,e,[])}),r=ro(n);return Math.max.apply(Math,r)},i}(Ac);Tc("Dodge",PM);Tc("Jitter",TM);Tc("Stack",OM);Tc("Symmetric",IM);var T0=function(a,i){return Xn(i)?i:a.invert(a.scale(i))},rf=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 fm([ah(o,s,r,0),ah(o,s,r,1),ah(o,s,r,2)])},xf,hm=function(a){if(a[0]==="#"&&a.length===7)return a;xf||(xf=FM()),xf.style.color=a;var i=document.defaultView.getComputedStyle(xf,"").getPropertyValue("color"),t=jM.exec(i),e=t[1].split(/\s*,\s*/).map(function(n){return Number(n)});return i=fm(e),i},kM=function(a){var i=Xn(a)?a.split("-"):a,t=la(i,function(e){return cm(e.indexOf("#")===-1?hm(e):e)});return function(e){return NM(t,e)}},zM=function(a){if(BM(a)){var i,t=void 0;if(a[0]==="l"){var e=LM.exec(a),n=+e[1]+90;t=e[2],i="linear-gradient("+n+"deg, "}else if(a[0]==="r"){i="radial-gradient(";var e=DM.exec(a);t=e[4]}var r=t.match(RM);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 Gu={rgb2arr:cm,gradient:kM,toRGB:gc(hm),toCSSGradient:zM};var YM=function(a){af(i,a);function i(t){var e=a.call(this,t)||this;return e.type="color",e.names=["color"],Xn(e.values)&&(e.linear=!0),e.gradient=Gu.gradient(e.values),e}return i.prototype.getLinearValue=function(t){return this.gradient(t)},i}(rf),HM=function(a){af(i,a);function i(t){var e=a.call(this,t)||this;return e.type="opacity",e.names=["opacity"],e}return i}(rf),WM=function(a){af(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 Je(t)||Je(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}(rf),GM=function(a){af(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}(rf),VM=function(a){af(i,a);function i(t){var e=a.call(this,t)||this;return e.type="size",e.names=["size"],e}return i}(rf),dm={};function XM(a){return dm[a]}function cs(a,i){dm[a]=i}var Cd=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 la(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 Je(n)||!Bn(n.toString)?"":n.toString()},a.prototype.getConfig=function(i){return this.__cfg__[i]},a.prototype.init=function(){Wr(this,this.__cfg__),this.setDomain(),rs(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(Xn(i)){var e=XM(i);if(!e)throw new Error("There is no method to to calculate ticks!");t=e(this)}else Bn(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}(),Ic=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}(Cd),vm=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Gs="\\d\\d?",Ys="\\d\\d",UM="\\d{3}",$M="\\d{4}",Pu="[^\\s]+",gm=/\[([^]*?)\]/gm;function pm(a,i){for(var t=[],e=0,n=a.length;e-1?n:null}};function al(a){for(var i=[],t=1;t3?0:(a-a%10!==10?1:0)*a%10]}},Qf=al({},Pd),xm=function(a){return Qf=al(Qf,a)},I0=function(a){return a.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},Ca=function(a,i){for(i===void 0&&(i=2),a=String(a);a.length0?"-":"+")+Ca(Math.floor(Math.abs(i)/60)*100+Math.abs(i)%60,4)},Z:function(a){var i=a.getTimezoneOffset();return(i>0?"-":"+")+Ca(Math.floor(Math.abs(i)/60),2)+":"+Ca(Math.abs(i)%60,2)}},j0=function(a){return+a-1},L0=[null,Gs],D0=[null,Pu],R0=["isPm",Pu,function(a,i){var t=a.toLowerCase();return t===i.amPm[0]?0:t===i.amPm[1]?1:null}],B0=["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}],JM={D:["day",Gs],DD:["day",Ys],Do:["day",Gs+Pu,function(a){return parseInt(a,10)}],M:["month",Gs,j0],MM:["month",Ys,j0],YY:["year",Ys,function(a){var i=new Date,t=+(""+i.getFullYear()).substr(0,2);return+(""+(+a>68?t-1:t)+a)}],h:["hour",Gs,void 0,"isPm"],hh:["hour",Ys,void 0,"isPm"],H:["hour",Gs],HH:["hour",Ys],m:["minute",Gs],mm:["minute",Ys],s:["second",Gs],ss:["second",Ys],YYYY:["year",$M],S:["millisecond","\\d",function(a){return+a*100}],SS:["millisecond",Ys,function(a){return+a*10}],SSS:["millisecond",UM],d:L0,dd:L0,ddd:D0,dddd:D0,MMM:["month",Pu,O0("monthNamesShort")],MMMM:["month",Pu,O0("monthNames")],a:R0,A:R0,ZZ:B0,Z:B0},Jf={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"},Em=function(a){return al(Jf,a)},wm=function(a,i,t){if(i===void 0&&(i=Jf.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=Jf[i]||i;var e=[];i=i.replace(gm,function(r,o){return e.push(o),"@@@"});var n=al(al({},Qf),t);return i=i.replace(vm,function(r){return QM[r](a,n)}),i.replace(/@@@/g,function(){return e.shift()})};function Mm(a,i,t){if(t===void 0&&(t={}),typeof i!="string")throw new Error("Invalid format in fecha parse");if(i=Jf[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(gm,function(x,M){return o.push(I0(M)),"@@@"}),l={},u={};s=I0(s).replace(vm,function(x){var M=JM[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=al(al({},Qf),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 bm={format:wm,parse:Mm,defaultI18n:Pd,setGlobalDateI18n:xm,setGlobalDateMasks:Em};const qM=Object.freeze(Object.defineProperty({__proto__:null,default:bm,assign:al,format:wm,parse:Mm,defaultI18n:Pd,setGlobalDateI18n:xm,setGlobalDateMasks:Em},Symbol.toStringTag,{value:"Module"}));function tb(a){return function(i,t,e,n){for(var r=Je(e)?0:e,o=Je(n)?i.length:n;r>>1;a(i[s])>t?o=s:r=s+1}return r}}var F0="format";function _m(a,i){var t=qM[F0]||bm[F0];return t(a,i)}function qf(a){return Xn(a)&&(a.indexOf("T")>0?a=new Date(a).getTime():a=new Date(a.replace(/-/gi,"/")).getTime()),hp(a)&&(a=a.getTime()),a}var ko=1e3,Ml=60*ko,bl=60*Ml,Ps=24*bl,Au=Ps*31,N0=Ps*365,vu=[["HH:mm:ss",ko],["HH:mm:ss",ko*10],["HH:mm:ss",ko*30],["HH:mm",Ml],["HH:mm",Ml*10],["HH:mm",Ml*30],["HH",bl],["HH",bl*6],["HH",bl*12],["YYYY-MM-DD",Ps],["YYYY-MM-DD",Ps*4],["YYYY-WW",Ps*7],["YYYY-MM",Au],["YYYY-MM",Au*4],["YYYY-MM",Au*6],["YYYY",Ps*380]];function eb(a,i,t){var e=(i-a)/t,n=tb(function(o){return o[1]})(vu,e)-1,r=vu[n];return n<0?r=vu[0]:n>=vu.length&&(r=Oi(vu)),r}var nb=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=qf(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):_m(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]=qf(e)}),t.sort(function(e,n){return e-n}),a.prototype.setDomain.call(this)},i}(Ic),jc=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(Je(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=eo(t),n=Oi(t);ethis.max&&(this.max=n),Je(this.minLimit)||(this.min=e),Je(this.maxLimit)||(this.max=n)},i.prototype.setDomain=function(){var t=ox(this.values),e=t.min,n=t.max;Je(this.min)&&(this.min=e),Je(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=So(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}(Cd),Lc=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}(jc);function Us(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 wo(a,i){return a===1?1:Math.log(i)/Math.log(a)}function Sm(a,i,t){Je(t)&&(t=Math.max.apply(null,a));var e=t;return Nt(a,function(n){n>0&&n1&&(e=1),e}var rb=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=wo(e,this.max),r=this.rangeMin(),o=this.rangeMax()-r,s,l=this.positiveMin;if(l){if(t===0)return 0;s=wo(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=(Us(r,t)-Us(r,n))/(Us(r,e)-Us(r,n));return o},i}(jc),ab=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):_m(n,this.mask)},i.prototype.scale=function(t){var e=t;return(Xn(e)||hp(e))&&(e=this.translate(e)),a.prototype.scale.call(this,e)},i.prototype.translate=function(t){return qf(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((!Je(e)||!or(e))&&(this.min=this.translate(this.min)),(!Je(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=qf(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),Je(e)&&(this.min=o),Je(n)&&(this.max=l)}},i}(Lc),Cm=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 Oi(e);if(o<0)return eo(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||(Oi(t)!==this.max&&t.push(this.max),eo(t)!==this.min&&t.unshift(this.min)),t},i.prototype.getScalePercent=function(t){var e=this.ticks;if(tOi(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}(jc),ob=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}(Cm),Pm={};function Xh(a){return Pm[a]}function hs(a,i){if(Xh(a))throw new Error("type '"+a+"' existed.");Pm[a]=i}var sb=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}(Cd);function Am(a){var i=a.values,t=a.tickInterval,e=a.tickCount,n=a.showLast;if(or(t)){var r=So(i,function(v,g){return g%t===0}),o=Oi(i);return n&&Oi(r)!==o&&r.push(o),r}var s=i.length,l=a.min,u=a.max;if(Je(l)&&(l=0),Je(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 lb(a){var i=a.min,t=a.max,e=a.nice,n=a.tickCount,r=new ub;return r.domain([i,t]),e&&r.nice(n),r.ticks(n)}var sh=5,k0=Math.sqrt(50),z0=Math.sqrt(10),Y0=Math.sqrt(2),ub=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=sh);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=zf(s,l,i)):u<0&&(s=Math.ceil(s*u)/u,l=Math.floor(l*u)/u,u=zf(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=sh),fb(this._domain[0],this._domain[this._domain.length-1],i||sh)},a}();function fb(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>=k0?10:r>=z0?5:r>=Y0?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(r>=k0?10:r>=z0?5:r>=Y0?2:1)}function H0(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 Ad(a,i,t){var e=H0(a,t,"floor"),n=H0(i,t,"ceil");e=Uc(e,t),n=Uc(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=Uc(s,o);r.push(l)}return{min:e,max:n,ticks:r}}function Td(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=Je(n)?Je(i)?o:i:n,f=Je(r)?Je(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 pb(a,i,t){var e=Da(i),n=pp(i,a),r=1;return 1-n/(e-1)-t+r}function mb(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 yb(a,i){return a>=i?2-(a-1)/(i-1):1}function xb(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 Eb(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 wb(){return 1}function Mb(a,i,t,e,n,r){t===void 0&&(t=5),e===void 0&&(e=!0),n===void 0&&(n=hb),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 ml(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=ml(u.lmax),Pt=ml(u.lmin),ht=ml(u.lstep),lt=Math.floor(vb((it-Pt)/ht))+1,$=new Array(lt);$[0]=ml(Pt);for(var f=1;f0)o=Math.floor(wo(i,e));else{var l=Sm(r,i,n);o=Math.floor(wo(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 Cb(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 Pb(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&&nN0)for(var l=tc(t),u=Math.ceil(r/N0),c=s;c<=l+u;c=c+u)o.push(Ib(c));else if(r>Au)for(var f=Math.ceil(r/Au),h=Uh(i),d=jb(i,t),c=0;c<=d+f;c=c+f)o.push(Lb(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),E=Db(i,t),c=0;cbl)for(var v=new Date(i),g=v.getFullYear(),p=v.getMonth(),y=v.getDate(),x=v.getHours(),M=Math.ceil(r/bl),_=Rb(i,t),c=0;c<=_+M;c=c+M)o.push(new Date(g,p,y,x+c).getTime());else if(r>Ml)for(var D=Bb(i,t),C=Math.ceil(r/Ml),c=0;c<=D+C;c=c+C)o.push(i+c*Ml);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",Am);cs("time-cat",Ob);cs("wilkinson-extended",bb);cs("r-pretty",Ab);cs("time",Tb);cs("time-pretty",Fb);cs("log",_b);cs("pow",Sb);cs("quantile",Pb);cs("d3-linear",cb);hs("cat",Ic);hs("category",Ic);hs("identity",sb);hs("linear",Lc);hs("log",rb);hs("pow",ib);hs("time",ab);hs("timeCat",nb);hs("quantize",Cm);hs("quantile",ob);var Om={},Im=function(a){return Om[a.toLowerCase()]},of=function(a,i){if(Im(a))throw new Error("Attribute type '"+a+"' existed.");Om[a.toLowerCase()]=i};of("Color",YM);of("Opacity",HM);of("Position",WM);of("Shape",GM);of("Size",VM);var Od=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=wr([],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 Nu(r,r,n),r},a.prototype.invertMatrix=function(i,t,e){e===void 0&&(e=0);var n=this.matrix,r=dE([0,0,0,0,0,0,0,0,0],n),o=[i,t,e];return r&&Nu(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 Nl(t,t,[-e.x,-e.y]),md(t,t,i),Nl(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 Nl(e,e,[-n.x,-n.y]),Ip(e,e,[i,t]),Nl(e,e,[n.x,n.y]),this},a.prototype.translate=function(i,t){var e=this.matrix;return Nl(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||wr([],this.originalMatrix)},a}(),jm=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}(Od),Nb=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=Tp([0,0],[t.x,t.y],[this.center.x,this.center.y]),o=yd(r,[1,0],!0),s=o*this.a;Gl(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];Nu(c,c,u);var f=[c[0],c[1]],h=yd(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 Wb(a,i){return!!a.className.match(new RegExp("(\\s|^)"+i+"(\\s|$)"))}function Vu(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 Gb(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 Rc(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 _l(a,i,t){return(1-t)*a+i*t}function Kl(a,i,t){return{x:a.x+Math.cos(t)*i,y:a.y+Math.sin(t)*i}}function Vb(a,i){var t=i.x-a.x,e=i.y-a.y;return Math.sqrt(t*t+e*e)}var nc=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=Fm(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=Rc(n,o,r-n,s-o)}return t?Xb(e,t):e}function Ub(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 Ta(a){return a+"px"}function Nm(a,i,t,e){var n=Vb(a,i),r=e/n,o=0;return t==="start"?o=0-r:t==="end"&&(o=1+r),{x:_l(a.x,i.x,o),y:_l(a.y,i.y,o)}}var $b={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},km=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){Ql(t,"visible")&&(t.visible?this.show():this.hide()),Ql(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=$b[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}(pc),gl="update_status",Kb=["visible","tip","delegateObject"],Zb=["container","group","shapesMap","isRegister","isUpdating","destroyed"],ki=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=Hb(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),Dm(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",Fm(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=Pi(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=Id(e);t.attr("matrix",n)},i.prototype.addAnimation=function(t,e,n){var r=e.attr("opacity");Je(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=dd(d.cfg,nx(tf(d.cfg),Zb));v.update(g),f.set(gl,"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(Kb,function(x){f.set(x,u.get(x))}),Ub(f,u),l=f,f.set(gl,"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(gl,"add"),u.get("isComponent")){var d=u.get("component");d.set("container",e)}else u.isGroup()&&n.registerNewGroup(u);if(l=u,r){var E=n.get("isInit")?o.appear:o.enter;E&&n.addAnimation(h,u,E)}}})},i.prototype.clearUpdateStatus=function(t){var e=t.getChildren();Nt(e,function(n){n.set(gl,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(gl,"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(gl)||s.destroyed?n.push([l,s]):s.set(gl,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}(km),lh="\u2026";function Qb(a){for(var i=0,t=0;t0&&a.charCodeAt(i)<128?1:2}function Jb(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 $h(a){if(a.length>e_)return n_(a);var i=0;return Nt(a,function(t){var e=t.getBBox(),n=e.width;i=0?h=Jb(r,f,e):h=qb,h&&(i.attr("text",h),c=!0)}return c?i.set("tip",r):i.set("tip",null),c}function Bc(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=ec(he(d,"padding",0));if(u&&c){var m=u-(p[1]+p[3]);Ou(!f,g,m,h)}if(d){var y=he(d,"style",{}),E=g.getCanvasBBox(),x=E.minX,M=E.minY,_=E.width,D=E.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()}Tu(v,t,e),Bm(v,l,t,e)}const $n={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 i_=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:$n.textColor,fontSize:12,textAlign:"center",textBaseline:"bottom",fontFamily:$n.fontFamily},text:{position:"center",autoRotate:!0,content:null,offsetX:0,offsetY:0,style:{stroke:$n.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:Xn(n)&&n.indexOf("%")!==-1?r=parseInt(n,10)/100:or(n)?r=n:r=1,(r>1||r<0)&&(r=1),{x:_l(t.x,e.x,r),y:_l(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),E=y.x+u,x=y.y+c,M={id:this.getElementId("line-text"),name:"annotation-line-text",x:E,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])}Bc(t,M)},i}(ki),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:"text",locationType:"point",x:0,y:0,content:"",rotate:null,style:{},background:null,maxLength:null,autoEllipsis:!0,isVertical:!1,ellipsisPosition:"tail",defaultCfg:{style:{fill:$n.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:$n.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};Bc(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");Tu(t,n,r),Bm(t,o,n,r)}},i}(ki),o_=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=Kl(e,n,r),l=Kl(e,n,o),u=o-r>Math.PI?1:0,c=[["M",s.x,s.y]];if(o-r===Math.PI*2){var f=Kl(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}(ki),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:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:$n.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=Vu({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}(ki),l_=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=Vu({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}(ki),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),{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:$n.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:$n.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:$n.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=Pi(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};Bc(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);Tu(d,d.attr("x")+p,d.attr("y"))}if(n+c>=s.maxX){var p=n+c-s.maxX;Tu(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]]),Tu(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}(ki),f_=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:$n.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:$n.textColor,fontFamily:$n.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=Gb(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"));Bc(t,l)}},i}(ki),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:"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=Ja(l.attr());e.adjustShapeAttrs(f),e.addShape(o,{id:e.getElementId("shape-"+c+"-"+u),capture:!1,type:c,attrs:f})});var s=Vu({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}(ki),h_=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:Zs})},i.prototype.renderInner=function(t){var e=this.get("render");Bn(e)&&e(t)},i}(ki),Ld=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 Rc(e,n,t.clientWidth,t.clientHeight)},i.prototype.clear=function(){var t=this.get("container");jd(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(Je(t)){t=this.createDom();var e=this.get("parent");Xn(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 Xn(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&&Wb(e,n)){var r=t[n];Qi(e,r)}}},i.prototype.applyChildrenStyles=function(t,e){Nt(e,function(n,r){var o=t.getElementsByClassName(r);Nt(o,function(s){Qi(s,n)})})},i.prototype.applyStyle=function(t,e){var n=this.get("domStyles");Qi(e,n[t])},i.prototype.createDom=function(){var t=this.get("containerTpl");return nl(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){Ql(t,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},i.prototype.resetPosition=function(){},i}(km),d_=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");jd(t);var n=Bn(e)?e(t):e;if(dp(n))t.appendChild(n);else if(Xn(n)||or(n)){var r=nl(""+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=Rx(t),f=Lx(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),Qi(t,{position:"absolute",left:h.x+"px",top:h.y+"px",zIndex:this.get("zIndex")})},i}(Ld);const v_=Object.freeze(Object.defineProperty({__proto__:null,Line:i_,Text:a_,Arc:o_,Region:s_,Image:l_,DataMarker:u_,DataRegion:f_,RegionFilter:c_,Shape:h_,Html:d_},Symbol.toStringTag,{value:"Module"}));function Mu(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 zm=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:$n.lineColor}},tickLine:{style:{lineWidth:1,stroke:$n.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:$n.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:$n.textColor,fontFamily:$n.fontFamily,fontWeight:"normal"},offset:10,offsetX:0,offsetY:0},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:$n.textColor,textBaseline:"middle",fontFamily:$n.fontFamily,textAlign:"center"},iconStyle:{fill:$n.descriptionIconFill,stroke:$n.descriptionIconStroke},description:""},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:$n.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 So(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=Da(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=Bn(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=Al(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(Bn(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(Je(v)&&l){var p=this.getAxisVector(f),m=[1,0];g=yd(p,m,!0)}if(g){var y=Al(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],E=[m+h,y+h],x=E[0],M=E[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],$=ht[1],xt=[lt,$+h*3/4],Gt=xt[0],Rt=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,$],["L",Gt,Rt]],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=Mu(t,"label",r);l&&s.attr(l)}var u=this.getElementId("tickline-"+t.id),c=e.findById(u);if(c){var f=Mu(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=Mu(t,"label",n);u&&o.attr(u)}if(l){var c=Mu(t,"tickLine",n);c&&l.attr(c)}}else o&&o.attr(r.style),l&&l.attr(s.style)},i}(ki);function Dd(a,i,t,e){var n=i.getChildren(),r=!1;return Nt(n,function(o){var s=Ou(a,o,t,e);r=r||s}),r}function g_(){return Ym}function p_(a,i,t){return Dd(a,i,t,"head")}function Ym(a,i,t){return Dd(a,i,t,"tail")}function m_(a,i,t){return Dd(a,i,t,"middle")}const y_=Object.freeze(Object.defineProperty({__proto__:null,getDefault:g_,ellipsisHead:p_,ellipsisTail:Ym,ellipsisMiddle:m_},Symbol.toStringTag,{value:"Module"}));function x_(a){var i=a.attr("matrix");return i&&i[0]!==1}function Hm(a){var i=x_(a)?Yb(a.attr("matrix")):0;return i%360}function Kh(a,i,t,e){var n=!1,r=Hm(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));nc(l,0,Math.PI/180)?n=s.width+e>o:n=s.height/l+e>o}else{var l=Math.abs(Math.sin(r));nc(l,0,Math.PI/180)?n=s.width+e>o:n=s.height/l+e>o}return n}function Xu(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(),Xu(a,i,!1,e)&&(r=!0)),s.get("visible")||(s.show(),Xu(a,i,!0,e)&&(r=!0))}return r}const S_=Object.freeze(Object.defineProperty({__proto__:null,getDefault:E_,reserveFirst:w_,reserveLast:M_,reserveBoth:b_,equidistance:Gm,equidistanceWithReverseBoth:__},Symbol.toStringTag,{value:"Module"}));function C_(a,i){Nt(a,function(t){var e=t.attr("x"),n=t.attr("y"),r=Al({x:e,y:n},i);t.attr("matrix",r)})}function Vm(a,i,t,e){var n=i.getChildren();if(!n.length||!a&&n.length<2)return!1;var r=$h(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);C_(n,l)}return o}function P_(){return Xm}function Xm(a,i,t,e){return Vm(a,i,t,function(){return or(e)?e:a?$n.verticalAxisRotate:$n.horizontalAxisRotate})}function A_(a,i,t){return Vm(a,i,t,function(e,n){if(!e)return a?$n.verticalAxisRotate:$n.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 T_=Object.freeze(Object.defineProperty({__proto__:null,getDefault:P_,fixedAngle:Xm,unfixedAngle:A_},Symbol.toStringTag,{value:"Module"})),Um=Object.freeze(Object.defineProperty({__proto__:null,autoHide:S_,autoRotate:T_,autoEllipsis:y_},Symbol.toStringTag,{value:"Module"}));var O_=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=Op([0,0],e),r=this.get("verticalFactor"),o=[n[1],n[0]*-1];return Mo([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&&Je(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"?Je(e.rotate):!0},i.prototype.autoProcessOverlap=function(t,e,n,r){var o=this,s=this.isVertical(),l=!1,u=Um[t];if(e===!0)this.get("label"),l=u.getDefault()(s,n,r);else if(Bn(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}(zm),I_=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=Gl(r);return Mo(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"?Je(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&&Je(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=Um[t];if(r>0)if(e===!0)s=l.getDefault()(!1,n,r);else if(Bn(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}(zm),Rd=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:$n.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:$n.textColor,textAlign:"center",textBaseline:"middle",fontFamily:$n.fontFamily}},textBackground:{padding:5,style:{stroke:$n.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(!Je(o)){var s=this.getTextPoint(),l=null;if(r){var u=this.getRotateAngle();l=Al(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=ec(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}(ki),$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),{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 Nm(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}(Rd),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",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=Kl(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=Kl(e,n,r),f=Kl(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}(Rd),Uu="g2-crosshair",Zh=Uu+"-line",Qh=Uu+"-text",gu;const L_=(gu={},gu[""+Uu]={position:"relative"},gu[""+Zh]={position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.25)"},gu[""+Qh]={position:"absolute",color:$n.textColor,fontFamily:$n.fontFamily},gu);var D_=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:Uu,defaultStyles:L_,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=nl(e);t.appendChild(n),this.applyStyle(Zh,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 Nm(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=cp(this.get("textTpl"),t);e=nl(o),r.appendChild(e),this.applyStyle(Qh,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)?Qi(t,{width:"1px",height:Ta(Math.abs(n.y-e.y))}):Qi(t,{height:"1px",width:Ta(Math.abs(n.x-e.x))}),Qi(t,{top:Ta(o),left:Ta(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}Qi(t,{top:Ta(r.y),left:Ta(r.x)})}},i.prototype.updateInner=function(t){Ql(t,"text")&&this.resetText(),a.prototype.updateInner.call(this,t)},i}(Ld);const G0=Object.freeze(Object.defineProperty({__proto__:null,Line:$m,Circle:j_,Base:Rd,Html:D_},Symbol.toStringTag,{value:"Module"}));var Km=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:$n.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=Bn(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(Xn(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}(ki);function R_(a,i,t,e){var n=t-a,r=e-i;return Math.sqrt(n*n+r*r)}var 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),{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=R_(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}(Km),F_=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}(Km),Zm=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)),Rc(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=ec(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=ec(t.padding);e.x=n[3],e.y=n[0]}this.set("currentPoint",e)},i}(ki),uh={marker:{style:{inactiveFill:"#000",inactiveOpacity:.45,fill:"#000",opacity:1,size:12}},text:{style:{fill:"#ccc",fontSize:12}}},wf={fill:$n.textColor,fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:$n.fontFamily,fontWeight:"normal",lineHeight:12},fh="navigation-arrow-right",ch="navigation-arrow-left",V0={right:90*Math.PI/180,left:(360-90)*Math.PI/180,up:0,down:180*Math.PI/180},N_=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=Pi(l,["size"]),h=this.drawArrow(s,o,ch,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,fh,e==="horizontal"?"down":"right",c,f);return p.on("click",this.onNavigationAfter),s},i.prototype.updateNavigation=function(t){var e=_n({},uh,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(ch)):this.getElementByLocalId(ch),h=t?t.findById(this.getElementId(fh)):this.getElementByLocalId(fh);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",Al({x:l+o/2,y:u+o/2},V0[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=Al({x:n+s/2,y:r+s/2},V0[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 Id(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=Mu(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}(Zm),k_=1.4,X0=.4,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),{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:$n.textColor,textBaseline:"middle",fontFamily:$n.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:$n.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}(Zm),Is="g2-tooltip",js="g2-tooltip-title",$u="g2-tooltip-list",Fc="g2-tooltip-list-item",Nc="g2-tooltip-marker",kc="g2-tooltip-value",Qm="g2-tooltip-name",Bd="g2-tooltip-crosshair-x",Fd="g2-tooltip-crosshair-y";const Y_=Object.freeze(Object.defineProperty({__proto__:null,CONTAINER_CLASS:Is,TITLE_CLASS:js,LIST_CLASS:$u,LIST_ITEM_CLASS:Fc,MARKER_CLASS:Nc,VALUE_CLASS:kc,NAME_CLASS:Qm,CROSSHAIR_X:Bd,CROSSHAIR_Y:Fd},Symbol.toStringTag,{value:"Module"}));var Zo;const H_=(Zo={},Zo[""+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:$n.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},Zo[""+js]={marginBottom:"4px"},Zo[""+$u]={margin:"0px",listStyleType:"none",padding:"0px"},Zo[""+Fc]={listStyleType:"none",marginBottom:"4px"},Zo[""+Nc]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},Zo[""+kc]={display:"inline-block",float:"right",marginLeft:"30px"},Zo[""+Bd]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Zo[""+Fd]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Zo);function W_(a,i,t,e,n){var r={left:an.x+n.width,top:in.y+n.height};return r}function G_(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 V_(a,i,t,e,n,r,o){var s=G_(a,i,t,e,n,r);if(o){var l=W_(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 X_(a,i){var t=!1;return Nt(i,function(e){if(Ql(a,e))return t=!0,!1}),t}var 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),{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:H_})},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),Qi(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},i.prototype.hide=function(){var t=this.getContainer();!t||this.destroyed||(this.set("visible",!1),Qi(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&&Qi(n,{display:e}),r&&Qi(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():(X_(t,["title","showTitle"])&&this.resetTitle(),Ql(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=Vu(u));var g=V_(t,e,n,h,d,l,v);Qi(c,{left:Ta(g.x+o),top:Ta(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"));dp(n)?t=n:t=nl(n)}return t},i.prototype.cacheDoms=function(){var t=this.getContainer(),e=t.getElementsByClassName(js)[0],n=t.getElementsByClassName($u)[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=Vu(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"?Qi(n,{left:Ta(r),top:Ta(e.y),height:Ta(e.height)}):Qi(n,{top:Ta(r),left:Ta(e.x),width:Ta(e.width)})},i.prototype.checkCrosshair=function(t){var e=t+"CrosshairDom",n=t+"CrosshairTpl",r="CROSSHAIR_"+t.toUpperCase(),o=Y_[r],s=this.get(e),l=this.get("parent");return s||(s=nl(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=Gu.toCSSGradient(r.color),s=ct(ct({},r),{color:o}),l=cp(e,s),u=nl(l);n.appendChild(u)}),this.applyChildrenStyles(n,this.get("domStyles")))},i.prototype.clearItemDoms=function(){this.get("listDom")&&jd(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}(Ld),$_={opacity:0},K_={stroke:"#C5C5C5",strokeOpacity:.85},Z_={fill:"#CACED4",opacity:.85};function Q_(a){return la(a,function(i,t){var e=t===0?"M":"L",n=i[0],r=i[1];return[e,n,r]})}function Jm(a){return Q_(a)}function J_(a){if(a.length<=2)return Jm(a);var i=[];Nt(a,function(o){li(o,i.slice(i.length-2))||i.push(o[0],o[1])});var t=uM(i,!1),e=eo(a),n=e[0],r=e[1];return t.unshift(["M",n,r]),t}function q_(a,i,t,e){e===void 0&&(e=!0);var n=new Lc({values:a}),r=new Ic({values:la(a,function(s,l){return l})}),o=la(a,function(s,l){return[r.scale(l)*i,t-n.scale(s)*t]});return e?J_(o):Jm(o)}function tS(a,i){var t=new Lc({values:a}),e=t.max<0?t.max:Math.max(0,t.min);return i-t.scale(e)*i}function eS(a,i,t,e){var n=Ru(a),r=tS(e,t);return n.push(["L",i,r]),n.push(["L",0,r]),n.push(["Z"]),n}var 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),{name:"trend",x:0,y:0,width:200,height:16,smooth:!0,isArea:!1,data:[],backgroundStyle:$_,lineStyle:K_,areaStyle:Z_})},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=q_(o,n,r,s);if(this.addShape(t,{id:this.getElementId("line"),type:"path",attrs:ct({path:h},c)}),l){var d=eS(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}(ki),qm={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},U0=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:qm})},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}(ki),rS={fill:"#416180",opacity:.05},iS={fill:"#5B8FF9",opacity:.15,cursor:"move"},Yf=10,aS={width:Yf,height:24},oS={textBaseline:"middle",fill:"#000",opacity:.45},sS="sliderchange",lS=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(sS,[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:rS,foregroundStyle:iS,handlerStyle:aS,textStyle:oS}})},i.prototype.update=function(t){var e=t.start,n=t.end,r=ct({},t);Je(e)||(r.start=Yr(e,0,1)),Je(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({},qm,this.cfg.handlerStyle);Da(he(s,"data"))&&(this.trend=this.addComponent(t,ct({component:nS,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",Yf),y=he(p,"height",24);this.minHandler=this.addComponent(t,{component:U0,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:U0,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",Yf);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(E,x){return e.attr(x,E)}),this.maxHandler&&(this.maxHandler.update({x:v-g/2}),this.get("updateAutoRender")||this.maxHandler.render()),Nt(y,function(E,x){return n.attr(x,E)})},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",Yf),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}(ki),uS={trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},hh={default:uS,hover:{thumbColor:"rgba(0,0,0,0.2)"}},fS=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.clearEvents=Zs,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=[Dl(e,"touchmove",t.onMouseMove),Dl(e,"touchend",t.onMouseUp),Dl(e,"touchcancel",t.onMouseUp)]:n=[Dl(e,"mousemove",t.onMouseMove),Dl(e,"mouseup",t.onMouseUp),Dl(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:hh})},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({},hh,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({},hh,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 yS(a,i,t){if(Xn(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 xS(a){return[[a.minX,a.minY],[a.maxX,a.minY],[a.maxX,a.maxY],[a.minX,a.maxY]]}function sf(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 ES(a){if(a.isPolar){var i=a.startAngle,t=a.endAngle;return t-i===Math.PI*2}return!1}function Yc(a,i){var t=a.getCenter();return Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2))}function wS(a,i){var t=!1;if(a)if(a.type==="theta"){var e=a.start,n=a.end;t=Vl(i.x,e.x,n.x)&&Vl(i.y,e.y,n.y)}else{var r=a.invert(i);t=Vl(r.x,0,1)&&Vl(r.y,0,1)}return t}function tu(a,i){var t=a.getCenter();return Math.atan2(i.y-t.y,i.x-t.x)}function Nd(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:Sl(l.x,l.y,u+i,o,o)},endState:function(f){var h=(s-o)*f+o,d=Sl(l.x,l.y,u+i,o,h);return{path:d}},attrs:{path:Sl(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 MS(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 ua.fromRange(o-i,s-i,o+n+i,s+r+i)}var bS=/^(?:(?!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 _S(a){var i="linear";return bS.test(a)?i="timeCat":Xn(a)&&(i="cat"),i}function ny(a,i,t,e){return i===void 0&&(i={}),i.type?i.type:a.type!=="identity"&&Hl.includes(t)&&["interval"].includes(e)||a.isCategory?"cat":a.type}function SS(a,i,t){var e=i||[];if(or(a)||Je(ax(e,a))&&rs(t)){var n=Xh("identity");return new n({field:a.toString(),values:[a]})}var r=Os(e,a),o=he(t,"type",_S(r[0])),s=Xh(o);return new s(ct({field:a,values:r},t))}function CS(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 Ku(a){return a.alias||a.field}function ry(a,i,t){var e=a.values,n=e.length,r;if(n===1)r=[.5,1];else{var o=1,s=0;ES(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 PS(a){var i=a.values.filter(function(t){return!Je(t)&&!isNaN(t)});return Math.max.apply(Math,wr(wr([],Pn(i),!1),[Je(a.max)?-1/0:a.max],!1))}function AS(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 TS(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 Mf(a,i){var t={start:{x:0,y:0},end:{x:0,y:0}};a.isRect?t=AS(i):a.isPolar&&(t=TS(a));var e=t.start,n=t.end;return{start:a.convert(e),end:a.convert(n)}}function iy(a){var i=a.start,t=a.end;return i.x===t.x}function Q0(a,i){var t=a.start,e=a.end,n=iy(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 bf(a,i){var t=he(a,["components","axis"],{});return _n({},he(t,["common"],{}),_n({},he(t,[i],{})))}function J0(a,i,t){var e=he(a,["components","axis"],{});return _n({},he(e,["common","title"],{}),_n({},he(e,[i,"title"],{})),t)}function dh(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?jh(o,s):jh(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 ic(a,i){return Bu(a)?a===!1?!1:{}:he(a,[i])}function q0(a,i){return he(a,"position",i)}function tg(a,i){return he(i,["title","text"],Ku(a))}var su=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];!Je(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){Je(e.axes)&&(e.axes={});var s=e.axes,l=Pn(r[0].getXYFields(),2),u=l[0],c=l[1],f=ic(s,u),h=ic(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 fx(i,function(e){var n=e.field,r=e.value;return!Je(r)&&n?t[n]===r:!0})}},a}(),ay={},OS=function(a){return ay[au(a)]},lu=function(a,i){ay[au(a)]=i},di=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}(),IS=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}(di),oy={};function jS(a,i){var t=oy[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){oy[a]={ActionClass:i,cfg:t}}function LS(a,i){var t=new IS(i);return t.callback=a,t.name="callback",t}function DS(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=Yc(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 BS(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 FS=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 zS(a,i){var t=a.event,e=t.target,n=e.getCanvasBBox();return n.width>=i||n.height>=i?e.attr("path"):null}function ol(a){var i=a.event,t,e=i.target;return e&&(t=e.get("element")),t}function eu(a){var i=a.event,t=i.target,e;return t&&(e=t.get("delegateObject")),e}function fy(a){var i=a.event.gEvent;return!(i&&i.fromShape&&i.toShape&&i.fromShape.get("element")===i.toShape.get("element"))}function Zu(a){return a&&a.component&&a.component.isList()}function cy(a){return a&&a.component&&a.component.isSlider()}function Qu(a){var i=a.event,t=i.target;return t&&t.get("name")==="mask"}function kd(a,i){var t=a.event.target;if(t.get("type")==="path"){var e=zS(a,i);return e?WS(a.view,e):void 0}var n=uy(a,i);return n?zd(a.view,n):null}function hy(a,i,t){var e=uy(a,t);if(!e)return null;var n=a.view,r=qh(n,i,{x:e.x,y:e.y}),o=qh(n,i,{x:e.maxX,y:e.maxY}),s={minX:r.x,minY:r.y,maxX:o.x,maxY:o.y};return zd(i,s)}function Ii(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(Ii(e))}),t}function YS(a,i,t){var e=Ii(a);return e.filter(function(n){return zo(n,i)===t})}function dy(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 zo(a,i){var t=a.getModel(),e=t.data,n;return ln(e)?n=e[0][i]:n=e[i],n}function HS(a,i){return!(i.minX>a.maxX||i.maxXa.maxY||i.maxY=i.x&&a.y<=i.y&&a.maxY>i.y}function ns(a){var i=a.parent,t=null;return i&&(t=i.views.filter(function(e){return e!==a})),t}function VS(a,i){var t=a.getCoordinate();return t.invert(i)}function qh(a,i,t){var e=VS(a,t);return i.getCoordinate().convert(e)}function gy(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 nu(a,i){var t=a.getScaleByField(i);return!t&&a.views&&Nt(a.views,function(e){if(t=nu(e,i),t)return!1}),t}var XS=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=vy(this.view),e=this.getCurrentPoint();return e?!!t.find(function(n){var r=n.getBBox();return i?n.get("name")===i&&ng(r,e):ng(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}(),US=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 rg(a,i,t){var e=a.split(":"),n=e[0],r=i.getAction(n)||jS(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 ig(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 Qa={START:"start",SHOW_ENABLE:"showEnable",END:"end",ROLLBACK:"rollback",PROCESSING:"processing"},$S=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 XS(t);this.context=e;var n=this.steps;Nt(n,function(r){Nt(r,function(o){if(Bn(o.action))o.actionObject={action:LS(o.action,e),methodName:"execute"};else if(Xn(o.action))o.actionObject=rg(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(rg(u,e,l[c]))})}})})},i.prototype.isAllowStep=function(t){var e=this.currentStepName,n=this.steps;if(e===t||t===Qa.SHOW_ENABLE)return!0;if(t===Qa.PROCESSING)return e===Qa.START;if(t===Qa.START)return e!==Qa.PROCESSING;if(t===Qa.END)return e===Qa.PROCESSING||e===Qa.START;if(t===Qa.ROLLBACK){if(n[Qa.END])return e===Qa.END;if(e===Qa.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!==Qa.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,ig(f)}):(r.event=c,ig(s)),n.afterExecute(t,e),e.callback&&(r.event=c,e.callback(r))):r.event=null};e.debounce?o[l]=vp(u,e.debounce.wait,e.debounce.immediate):e.throttle?o[l]=vd(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}(US),py={};function KS(a){return py[au(a)]}function Cr(a,i){py[au(a)]=i}function ZS(a,i,t){var e=KS(a);if(!e)return null;if(ts(e)){var n=Wr(Ja(e),t);return new $S(i,n)}else{var r=e;return new r(i,t)}}function QS(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 JS(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 my(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=QS(a),n=JS(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=rc(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:qr(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($u)]={margin:0,listStyleType:"none",padding:0},i["".concat(Fc)]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},i["".concat(Nc)]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},i["".concat(kc)]={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"},Rl={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},qS=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],tC=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],eC=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],yy=function(a){a===void 0&&(a={});var i=a.paletteQualitative10,t=i===void 0?qS:i,e=a.paletteQualitative20,n=e===void 0?tC: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:eC,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:Rl[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:Rl[100],innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:ir[65],overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:Rl[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:Rl[100],pointBorderOpacity:1,pointActiveBorderColor:ir[100],pointSelectedBorder:2,pointSelectedBorderColor:ir[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:o,hollowPointBorderOpacity:.95,hollowPointFillColor:Rl[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:Rl[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:ir[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:ir[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3};return ct(ct({},s),a)};yy();function oc(a){var i=a.styleSheet,t=i===void 0?{}:i,e=Pi(a,["styleSheet"]),n=yy(t);return _n({},my(n),e)}var nC=oc({}),td={default:nC};function vh(a){return he(td,au(a),td.default)}function rC(a,i){td[au(a)]=oc(i)}function ag(a,i,t){var e=t.translate(a),n=t.translate(i);return Ai(e,n)}function iC(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 og(a,i,t){var e=t.coordinate,n=t.getYScale(),r=n.field,o=e.invert(i),s=n.invert(o.y),l=Ts(a,function(u){var c=u[ur];return c[r][0]<=s&&c[r][1]>=s});return l||a[a.length-1]}var aC=gc(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 oC(a,i,t){var e=i.getAttribute("position"),n=e.getFields(),r=i.scales,o=Bn(t)||!t?n[0]:t,s=r[o],l=s?s.getText(a[o]):a[o]||o;return Bn(t)?t(l,a):l}function sC(a){var i=hd(a.attributes);return So(i,function(t){return xl(Hl,t.type)})}function xy(a){var i,t,e=sC(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=ny(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 lC(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 uC(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=xy(i);return Ku(r)}function Ey(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=og(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)&&(E=k)}var Q=aC(t.getXScale());return!l&&Math.abs(n.translate(E[ur][o])-x)<=Q/2&&(l=E),l}function wy(a,i,t,e){var n,r;t===void 0&&(t=""),e===void 0&&(e=!1);var o=a[ur],s=oC(o,i,t),l=i.tooltipOption,u=i.theme.defaultColor,c=[],f,h;function d(F,k){if(e||!Je(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,wr([],Pn(p),!1)),y=ct({data:a[ur],mappingData:a,title:s,color:a.color||u,marker:!0},m);c.push(y)}else{var E=i.scales;try{for(var x=rr(v),M=x.next();!M.done;M=x.next()){var _=M.value;if(!Je(o[_])){var D=E[_];f=Ku(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=xy(i);h=lC(o,C),f=uC(o,i),d(f,h)}return c}function sg(a,i,t,e){var n,r,o=e.showNil,s=[],l=a.dataArray;if(!rs(l)){a.sort(l);try{for(var u=rr(l),c=u.next();!c.done;c=u.next()){var f=c.value,h=Ey(i,f,a);if(h){var d=a.getElementId(h),v=a.elementsMap[d];if(a.type==="heatmap"||v.visible){var g=wy(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 lg(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=wy(l,a,t,n);u.length&&r.push(u)}return r}function ed(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=lg(h,i,l,t):["area","line","path","heatmap"].includes(d)||s!==!1?v=sg(h,i,l,t):v=lg(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 fC(a,i,t){var e,n,r=ed(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(ed(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 cC(a){return!or(a)&&!ln(a)}function Hd(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=wr(wr([],Pn(i),!1),Pn(i),!1);break;case 3:i=wr(wr([],Pn(i),!1),[i[1]],!1);break;default:i=i.slice(0,4);break}return i}var Wd={};function uu(a,i){Wd[a]=i}function hC(){return Object.keys(Wd)}function dC(a){return Wd[a]}var vC=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 dc(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=zb(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=Je(i)?!0:i.includes(s);u&&(r=t.coordinate)[s].apply(r,wr([],Pn(l),!1))})},a}(),Ji=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 ef(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 gC(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 pC=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=SS(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=ry(_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?(CS(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=Oi(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}(),Hf=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,wr([void 0],Pn(this.getPadding()),!1)))},a}();function mC(a){var i=a.padding;if(!cC(i))return new(Hf.bind.apply(Hf,wr([void 0],Pn(Hd(i)),!1)));var t=a.viewBBox,e=new Hf,n=[],r=[],o=[];return Nt(a.getComponents(),function(s){var l=s.type;l===hi.AXIS?n.push(s):[hi.LEGEND,hi.SLIDER,hi.SCROLLBAR].includes(l)?r.push(s):l!==hi.GRID&&l!==hi.TOOLTIP&&o.push(s)}),Nt(n,function(s){var l=s.component,u=l.getLayoutBBox(),c=new ua(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 ua(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 ua(c.x,c.y,c.width,c.height);e.inc(f,u)}),e}function yC(a,i,t){var e=t.instance();i.forEach(function(n){n.autoPadding=e.max(n.autoPadding.getPadding())})}var My=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=hC(),e.scalePool=new pC,e.layoutFunc=gC,e.isPreMouseInPlot=!1,e.isDataChanged=!1,e.isCoordinateChanged=!1,e.createdScaleKeys=new Map,e.onCanvasEvent=function(E){var x=E.name;if(!x.includes(":")){var M=e.createViewEvent(E);e.doPlotEvent(M),e.emit(x,M)}},e.onDelegateEvents=function(E){var x=E.name;if(!!x.includes(":")){var M=e.createViewEvent(E);e.emit(x,M)}};var n=t.id,r=n===void 0?ul("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({},vh("default"),oc(g)):vh(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(Er.BEFORE_RENDER,Ji.fromData(this,Er.BEFORE_RENDER,e)),this.paint(t),this.emit(Er.AFTER_RENDER,Ji.fromData(this,Er.AFTER_RENDER,e)),this.visible===!1&&this.changeVisible(!1)},i.prototype.clear=function(){var t=this;this.emit(Er.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=Av(k,l,r,o),st=Ox(h),yt=new st.Canvas(ct({container:j,pixelRatio:d,localRefresh:g,supportCSSTransform:E},V));return e=a.call(this,{parent:null,canvas:yt,backgroundGroup:yt.addGroup({zIndex:Xl.BG}),middleGroup:yt.addGroup({zIndex:Xl.MID}),foregroundGroup:yt.addGroup({zIndex:Xl.FORE}),padding:u,appendPadding:c,visible:m,options:_,limitInPlot:D,theme:C,syncViewPadding:F})||this,e.onResize=vp(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(Er.BEFORE_CHANGE_SIZE),this.width=t,this.height=e,this.canvas.changeSize(t,e),this.render(!0),this.emit(Er.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(),Fx(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=Av(this.ele,!0,this.width,this.height),e=t.width,n=t.height;this.changeSize(e,n)}},i.prototype.updateCanvasStyle=function(){Qi(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}(My),fu=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 xC(a){for(var i=[],t=function(n){var r=a[n],o=Ts(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 xC(ro(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 ua(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(Bu(t)||!he(t,"customContent"))return t;var e=t.customContent,n=function(r,o){var s=e(r,o)||"";return Xn(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 zc(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=Nd(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"],{}),E=ct(ct({fill:f.color,symbol:"circle",shadowColor:f.color},Bn(e)?ct(ct({},y),e(f)):e),{x:h,y:d});o.addShape("marker",{attrs:E})}}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=tu(n,t),l=n.getCenter(),u=n.getRadius();o=ti(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 $m(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:Yc(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 G0[o](r),u.init()):u.update(r):(u=new G0[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 Bn(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=ed(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:Ts(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}(fu),by={};function _y(a){return by[a.toLowerCase()]}function io(a,i){by[a.toLowerCase()]=i}var ru={appear:{duration:450,easing:"easeQuadOut"},update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},wC={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"}}},ug={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 MC(a,i){return{delay:Bn(a.delay)?a.delay(i):a.delay,easing:Bn(a.easing)?a.easing(i):a.easing,duration:Bn(a.duration)?a.duration(i):a.duration,callback:a.callback,repeat:a.repeat}}function Sy(a,i,t){var e=wC[a];return e&&(Bn(e)&&(e=e(i)),e=_n({},ru,e),t)?e[t]:e}function Zl(a,i,t){var e=he(a.get("origin"),"data",ur),n=i.animation,r=MC(i,e);if(n){var o=_y(n);o&&o(a,r,t)}else a.animate(t.toAttrs,r)}function bC(a,i,t,e,n){if(ug[t]){var r=ug[t](e),o=_y(he(r,"animation",""));if(o){var s=ct(ct(ct({},ru.appear),r),i);a.stopAnimate(),o(a,s,{coordinate:e,minYPoint:n,toAttrs:null})}}}var Vd="element-background",Cy=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?Zl(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),Dm(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 Bn(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;Bn(r.callback)&&r.callback(),(o=e.geometry)===null||o===void 0||o.emit(el.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?Xn(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(el.BEFORE_DRAW_ANIMATE),Zl(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(Je(e)||Mr(e))Mr(e)&&li(Object.keys(e),["values"])?si(this.attributeOption,t,{fields:e.values}):si(this.attributeOption,t,e);else{var r={};or(e)?r.values=[e]:r.fields=pu(e),n&&(Bn(n)?r.callback=n:r.values=n),si(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,E=y.map(function(M){var _=t.scales[M];if(!l[M]&&Hl.includes(h)){var D=ny(_,he(t.scaleDefs,M),h,t.type);D==="cat"&&(t.groupScales.push(_),l[M]=!0)}return _});v.scales=E,h!=="position"&&E.length===1&&E[0].type==="identity"?v.values=E[0].values:!g&&!p&&(h==="size"?v.values=o.sizes:h==="shape"?v.values=o.shapes[s]||[]:h==="color"&&(E.length?v.values=E[0].values.length<=10?o.colors10:o.colors20:v.values=o.colors10));var x=Im(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 Dy(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=ey(l,c);s?Zl(l,s,{toAttrs:f,coordinate:o}):l.attr(f),c.isGroup()&&Dy(l,c,t)}}),Nt(i.getChildren(),function(l,u){u>=a.getCount()&&(l.destroyed||a.add(l))})}var jC=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),Lu(this,void 0,void 0,function(){var n,r,o,s,l,u,c,f,h=this;return Du(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"),E=v.get("animateCfg"),x=u[g];Dy(x,n[g],{data:p,origin:m,animateCfg:E,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&&Zl(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?Zl(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,E=i.y-p/2;m==="center"?y=y-g/2:(m==="right"||m==="end")&&(y=y-g),Wc(u,y,E),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:mx(x)?i.color:x})},f))}return i.rotate&&jy(d,i.rotate),h},a.prototype.doLayout=function(i,t,e){return Lu(this,void 0,void 0,function(){var n,r=this;return Du(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=SC(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=ti(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=Ly(s,e,r.padding),c=u.rotation,f=Pi(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 cg(a){var i=0;return Nt(a,function(t){i+=t}),i/a.length}var Ud=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||Je(r.x)||Je(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(Je(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),Lu(this,void 0,void 0,function(){var e,n,r;return Du(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 E=p;return ln(E)&&(i.content.length===1?y?E=cg(E):E.length<=2?E=E[p.length-1]:E=cg(E):E=E[m]),E}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=mS(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 jC({container:t,layout:he(e,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=s),s.region=n,s.animate=r?Sy("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,wr([],Pn(y),!1)),Je(m)){h.push(null);return}}var E=ct(ct({id:t.getLabelId(d),elementId:t.geometry.getElementId(d),data:g,mappingData:d,coordinate:o},c),m);Bn(E.position)&&(E.position=E.position(g,d,v));var x=t.getLabelOffset(E.offset||0),M=t.getDefaultLabelCfg(x,E.position);E=_n({},M,E),E.offset=t.getLabelOffset(E.offset||0);var _=E.content;Bn(_)?E.content=_(g,d,v):Yl(_)&&(E.content=p[0]),h.push(E)}),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),Je(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 hg(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,wr([i],Pn(n),!1)).join("")}else e=a.mapping(i).join("");return e||t}var Tl={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]]}},LC=["line","cross","tick","plus","hyphen"];function DC(a,i){return Bn(i)?i(a):_n({},a,i)}function RC(a,i){var t=a.symbol;if(Xn(t)&&LC.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 Ry(a){var i=a.symbol;Xn(i)&&Tl[i]&&(a.symbol=Tl[i])}function gh(a){return a.startsWith(hn.LEFT)||a.startsWith(hn.RIGHT)?"vertical":"horizontal"}function BC(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 E=hg(s,m,u),x=hg(l,m,"point"),M=i.getShapeMarker(x,{color:E,isInPolar:c}),_=n;return Bn(_)&&(_=_(p,h,ct({name:p,value:m},_n({},e,M)))),M=_n({},e,M,Oa(ct({},_),["style"])),RC(M,E),_&&_.style&&(M.style=DC(M.style,_.style)),Ry(M),{id:m,name:p,value:m,marker:M,unchecked:y}})}return[]}function FC(a,i,t){return t.map(function(e,n){var r=i;Bn(r)&&(r=r(e.name,n,_n({},a,e)));var o=Bn(e.marker)?e.marker(e.name,n,_n({},a,e)):e.marker,s=_n({},a,r,o);return Ry(s),e.marker=s,e})}function dg(a,i){var t=he(a,["components","legend"],{});return _n({},he(t,["common"],{}),_n({},he(t,[i],{})))}function ph(a){return a?!1:a==null||isNaN(a)}function vg(a){if(ln(a))return ph(a[1].y);var i=a.y;return ln(i)?ph(i[0]):ph(i)}function $d(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 Ju(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,E=(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],_=pg([1,0],x),D=pg(x,M);return rd(x,M)<=-1&&(D=Math.PI),rd(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:E,rx:gg(a,[u,c])?0:t,ry:gg(a,[u,c])?0:e,startAngle:_,endAngle:_+D,xRotation:n,arcFlag:r,sweepFlag:o}}var lc=Math.sin,uc=Math.cos,Zd=Math.atan2,Sf=Math.PI;function Wy(a,i,t,e,n,r,o){var s=i.stroke,l=i.lineWidth,u=t-n,c=e-r,f=Zd(c,u),h=new ev({type:"path",canvas:a.get("canvas"),isArrowShape:!0,attrs:{path:"M"+10*uc(Sf/6)+","+10*lc(Sf/6)+" L0,0 L"+10*uc(Sf/6)+",-"+10*lc(Sf/6),stroke:s,lineWidth:l}});h.translate(n,r),h.rotateAtPoint(n,r,f),a.set(o?"startArrowShape":"endArrowShape",h)}function Gy(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=Pi(f,["d","fill","stroke","lineWidth"]),m=t-n,y=e-r,E=Zd(y,m);h&&(n=n-uc(E)*h,r=r-lc(E)*h);var x=new ev({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,E),a.set(o?"startArrowShape":"endArrowShape",x)}function Cl(a,i,t,e,n){var r=Zd(e-i,t-a);return{dx:uc(r)*n,dy:lc(r)*n}}function Qd(a,i,t,e,n,r){typeof i.startArrow=="object"?Gy(a,i,t,e,n,r,!0):i.startArrow?Wy(a,i,t,e,n,r,!0):a.set("startArrowShape",null)}function Jd(a,i,t,e,n,r){typeof i.endArrow=="object"?Gy(a,i,t,e,n,r,!1):i.endArrow?Wy(a,i,t,e,n,r,!1):a.set("startArrowShape",null)}var mg={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"};function iu(a,i){var t=i.attr();for(var e in t){var n=t[e],r=mg[e]?mg[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=tP(a,i,n):r==="globalAlpha"&&(n=n*a.globalAlpha),a[r]=n)}}function id(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,E),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,-E)}break}case"Z":i.closePath();break}if(h==="Z")s=l;else{var st=f.length;s=[f[st-2],f[st-1]]}}}}function Uy(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 iP(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=UC(t,n):e?i=t:r&&(i=n)}return i}function aP(a){if(!a.length)return null;var i=[],t=[],e=[],n=[];return Nt(a,function(r){var o=iP(r);o&&(i.push(o.minX),t.push(o.minY),e.push(o.maxX),n.push(o.maxY))}),{minX:bo(i),minY:bo(t),maxX:qa(e),maxY:qa(n)}}function oP(a,i){return!a||!i||!Ju(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 tv=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.onCanvasChange=function(t){Uy(this,t)},i.prototype.getShapeBase=function(){return cc},i.prototype.getGroupBase=function(){return i},i.prototype._applyClip=function(t,e){e&&(t.save(),iu(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=bo(e),s=qa(e),l=bo(n),u=qa(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",Ju(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(),iu(t,this),this._applyClip(t,this.getClip()),id(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}(wc),sP=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 cc},i.prototype.getGroupBase=function(){return tv},i.prototype.onCanvasChange=function(t){Uy(this,t)},i.prototype.calculateBBox=function(){var t=this.get("type"),e=this.getHitLineWidth(),n=bc(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(),iu(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(!Ju(e,r)){this.set("hasChanged",!1),this.cfg.isInView&&this._afterDraw();return}}t.save(),iu(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=Ju(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()&&(!Je(s)&&s!==1?(t.globalAlpha=s,this.fill(t),t.globalAlpha=r):this.fill(t)),this.isStroke()&&n>0&&(!Je(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}(Mc);const Yo=sP;var lP=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=zy(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}(Yo);const uP=lP;function Cf(a,i,t,e){return a/(t*t)+i/(e*e)}var fP=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?Cf(d,v,f+l,h+l)<=1:r?Cf(d,v,f,h)<=1:n?Cf(d,v,f-l,h-l)>=1&&Cf(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}(Yo);const cP=fP;function yg(a){return a instanceof HTMLElement&&Xn(a.nodeName)&&a.nodeName.toUpperCase()==="CANVAS"}var hP=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(Xn(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)):yg(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||yg(h))&&(!Je(l)&&!Je(u)&&!Je(c)&&!Je(f)?t.drawImage(h,l,u,c,f,n,r,o,s):t.drawImage(h,n,r,o,s))},i}(Yo);const dP=hP;function Js(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?Ti.pointToLine(a,i,t,e,r,o)<=n/2:!1}var vP=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&&Qd(this,t,r,o,e,n),l&&Jd(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 Js(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=Cl(n,r,o,s,e.startArrow.d)),u&&u.d&&(f=Cl(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 Ti.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 Ti.pointAt(n,r,o,s,t)},i}(Yo);const gP=vP;var pP={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"]]}},mP=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 Je(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(Bn(r))s=r,l=s(e,n,o),l=om(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");Xy(this,t,{path:e},n)},i.Symbols=pP,i}(Yo);const yP=mP;function $y(a,i,t){var e=Sc();return a.createPath(e),e.isPointInPath(i,t)}var xP=1e-6;function mh(a){return Math.abs(a)0!=mh(s[1]-t)>0&&mh(i-(t-o[1])*(o[0]-s[0])/(o[1]-s[1])-o[0])<0&&(e=!e)}return e}function bu(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 zy(u.x,u.y,o,s)<=r/2}var wP=qr;function MP(a){for(var i=!1,t=a.length,e=0;eE?y:E,F=y>E?1:y/E,k=y>E?E/y:1,j=wP(null,[["t",-p,-m],["r",-_],["s",1/F,1/k]]);Nu(D,D,j),r=bu(0,0,C,x,M,i,D[0],D[1]);break}if(r)break}}return r}function _P(a){for(var i=a.length,t=[],e=[],n=[],r=0;r0&&e.push(n),{polygons:t,polylines:e}}const Pf=ct({hasArc:MP,extractPolygons:_P,isPointInStroke:bP},pd);function xg(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(Je(s)||Je(r))return null;var l=s.length,u=o[r+1];return Su.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",Pf.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+=Su.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=Su.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}(Yo);const ev=SP;function Zy(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)}),Ti.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=Ti.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}(Yo);const TP=AP;function OP(a,i,t,e,n,r,o){var s=n/2;return El(a-s,i-s,t,n,r,o)||El(a+t-s,i-s,n,e,r,o)||El(a+s,i+e-s,t,n,r,o)||El(a-s,i+s,n,e,r,o)}function IP(a,i,t,e,n,r,o,s){return Js(a+n,i,a+t-n,i,r,o,s)||Js(a+t,i+n,a+t,i+e-n,r,o,s)||Js(a+t-n,i+e,a+n,i+e,r,o,s)||Js(a,i+e-n,a,i+n,r,o,s)||bu(a+t-n,i+n,n,1.5*Math.PI,2*Math.PI,r,o,s)||bu(a+t-n,i+e-n,n,0,.5*Math.PI,r,o,s)||bu(a+n,i+e-n,n,.5*Math.PI,Math.PI,r,o,s)||bu(a+n,i+n,n,Math.PI,1.5*Math.PI,r,o,s)}var jP=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=IP(l,u,c,f,h,o,t,e)),!v&&r&&(v=$y(this,t,e)),v}else{var d=o/2;if(r&&n)return El(l-d,u-d,c+d,f+d,t,e);if(r)return El(l,u,c,f,t,e);if(n)return OP(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=eP(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}(Yo);const LP=jP;var DP=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=Pc(t)},i.prototype._setText=function(t){var e=null;Xn(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=Cc(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),Je(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;Je(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&&(!Je(o)&&o!==1&&(t.globalAlpha=r),this.stroke(t)),this.isFill()&&(!Je(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}(Yo);const RP=DP;function BP(a,i){if(i){var t=yc(i);return Cs(t,a)}return a}function Qy(a,i,t){var e=a.getTotalMatrix();if(e){var n=BP([i,t,1],e),r=n[0],o=n[1];return[r,o]}return[i,t]}function Eg(a,i,t){if(a.isCanvas&&a.isCanvas())return!0;if(!Fu(a)||a.cfg.isInView===!1)return!1;if(a.cfg.clipShape){var e=Qy(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 Jy(a,i,t){if(!Eg(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=Jy(s,i,t);else if(Eg(s,i,t)){var l=s,u=Qy(s,i,t),c=u[0],f=u[1];l.isInShape(c,f)&&(e=s)}if(e)break}return e}var FP=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 cc},i.prototype.getGroupBase=function(){return tv},i.prototype.getPixelRatio=function(){var t=this.get("pixelRatio")||XC();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=Jy(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=aP(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=oP(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&&(wx(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),iu(t,this),id(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(),iu(t,this),nP(this,n,r),id(t,n,r),t.restore()):e.length&&Vy(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=Ex(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}(Ec),NP="0.5.12";const kP=Object.freeze(Object.defineProperty({__proto__:null,Shape:cc,version:NP,Canvas:FP,Group:tv,getArcParams:sc,Event:ef,Base:pc,AbstractCanvas:Ec,AbstractGroup:wc,AbstractShape:Mc,getBBoxMethod:bc,registerBBox:Co,getTextHeight:Cc,assembleFont:Pc,isAllowCapture:Fu,multiplyVec2:Cs,invert:yc,getOffScreenContext:Sc,registerEasing:Kp,PathUtil:pd},Symbol.toStringTag,{value:"Module"}));var od={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 _o(a){return document.createElementNS("http://www.w3.org/2000/svg",a)}function qy(a){var i=od[a.type],t=a.getParent();if(!i)throw new Error("the type "+a.type+" is not supported by svg");var e=_o(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 t1(a,i){var t=a.get("el"),e=Px(t.children).sort(i),n=document.createDocumentFragment();e.forEach(function(r){n.appendChild(r)}),t.appendChild(n)}function zP(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)&&YP(this,t)},i.prototype.transform=function(t){var e=this.attr(),n=(t||e).matrix;n&&uf(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}(Mc);const Po=HP;var WP=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}(Po);const GP=WP;var VP=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}(Po);const XP=VP;var UP=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}(Po);const $P=UP;var KP=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(Xn(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&&Xn(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}(Po);const ZP=KP;var QP=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 Ti.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 Ti.pointAt(n,r,o,s,t)},i}(Po);const JP=QP;var Af={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 wg={get:function(a){return Af[a]},register:function(a,i){Af[a]=i},remove:function(a){delete Af[a]},getAll:function(){return Af}};var qP=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 Bn(o)?s=o:s=wg.get(o),s?s(e,n,r):(console.warn(s+" symbol is not exist."),null)},i.symbolsFactory=wg,i}(Po);const tA=qP;var eA=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}(Po);const nA=eA;var rA=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}(Po);const iA=rA;var aA=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 Je(e)?(this.set("totalLength",im.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)}),Ti.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=Ti.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}(Po);const oA=aA;function sA(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 lA=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=sA(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}(Po);const uA=lA;var Mg=.3,fA={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},cA={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},hA={left:"left",start:"left",center:"middle",right:"end",end:"end"},dA=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?uf(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=Ap();o&&o.name==="firefox"?t.setAttribute("dominant-baseline",cA[n]||"alphabetic"):t.setAttribute("alignment-baseline",fA[n]||"baseline"),t.setAttribute("text-anchor",hA[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}(Po);const vA=dA;var gA=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,pA=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,mA=/[\d.]+:(#[^\s]+|[^)]+\))/gi;function r1(a){var i=a.match(mA);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 yA(a,i){var t=gA.exec(a),e=fd(cd(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}(),bg=function(){function a(i,t){this.cfg={};var e=_o("marker"),n=ul("marker_");e.setAttribute("id",n);var r=_o("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}(),_A=function(){function a(i){this.type="clip",this.cfg={};var t=_o("clipPath");this.el=t,this.id=ul("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}(),SA=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,CA=function(){function a(i){this.cfg={};var t=_o("pattern");t.setAttribute("patternUnits","userSpaceOnUse");var e=_o("image");t.appendChild(e);var n=ul("pattern_");t.id=n,this.el=t,this.id=n,this.cfg=i;var r=SA.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}(),PA=function(){function a(i){var t=_o("defs"),e=ul("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 Gc(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=$d(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 E=y.value,x=this.getDrawCfg(E),M=x.x,_=x.y,D=p.scale(E[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 o1(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(a1(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=rc(a,t),E=y.startAngle,x=y.endAngle;if(t.type!=="theta"&&!t.isTransposed)e=Sl(m.x,m.y,t.getRadius(),E,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=Sl(m.x,m.y,c,t.startAngle,t.endAngle,f)}}return e}function RA(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=av(a),o}function s1(a,i,t){var e=[];return Je(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 mu(a,i){return[i,a]}function BA(a,i,t){var e,n,r,o,s,l,u,c=Pn(wr([],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],E=g[3];i.isTransposed&&(e=Pn(mu(h,v),2),h=e[0],v=e[1]),i.isReflect("y")&&(n=Pn(mu(f,h),2),f=n[0],h=n[1],r=Pn(mu(d,v),2),d=r[0],v=r[1]),i.isReflect("x")&&(o=Pn(mu(f,v),2),f=o[0],v=o[1],s=Pn(mu(h,d),2),h=s[0],d=s[1]);var x=[],M=function(_){return Math.abs(_)};return l=Pn(a1([p,m,y,E],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],E=l[3],i.isTransposed&&(u=Pn([E,p,m,y],4),p=u[0],m=u[1],y=u[2],E=u[3]),f.yo&&(n=o)}return n}function NA(a,i){if(i){var t=ro(a),e=Os(t,i);return e.length}return a.length}function ov(a){var i=a.theme,t=a.coordinate,e=a.getXScale(),n=e.values,r=a.beforeMappingData,o=n.length,s=sf(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=FA(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),!Je(l)&&l>=0){var E=l/s;m=(1-(o-1)*E)/o}else m*=y;if(a.getAdjust("dodge")){var x=a.getAdjust("dodge"),M=x.dodgeBy,_=NA(r,M);if(!Je(u)&&u>=0){var D=u/s;m=(m-D*(_-1))/_}else!Je(l)&&l>=0&&(m*=y),m=m/_;m=m>=0?m:0}if(!Je(c)&&c>=0){var C=c/s;m>C&&(m=C)}if(!Je(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}(cl),zA=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}(rv),l1=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"],YA=["cross","tick","plus","hyphen","line"];function sv(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:Tl[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:Tl[e]||e}),u)})}fl("point",{defaultShapeType:"hollow-circle",getDefaultPoints:function(a){return Kd(a)}});Nt(l1,function(a){gr("point","hollow-".concat(a),{draw:function(i,t){return sv(this,i,t,a,!0)},getMarker:function(i){var t=i.color;return{symbol:Tl[a]||a,style:{r:4.5,stroke:t,fill:null}}}})});var HA=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}(cl);function WA(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=$A(e[0],e[1],o):(t.fill=t.stroke,r=KA(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=ty((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=sd(e[1],e[3]),l=sd(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 ZA(a,i){var t=sd(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(ZA(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 Tf=1/3;function QA(a,i){var t=[];t.push({x:a.x,y:a.y*(1-Tf)+i.y*Tf}),t.push({x:i.x,y:a.y*(1-Tf)+i.y*Tf}),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(QA(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,iv(a)},draw:function(a,i){var t=Vr(a,!1,!0),e=this.parsePath(s1(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=Ny(a),o=o1(a,this.parsePoints(a.points),this.coordinate);e.addShape("path",{attrs:ct(ct({},r),{path:o}),zIndex:-1,name:Vd})}var s=this.parsePath(av(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 JA(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 JA(a)},draw:function(a,i){var t=Vr(a,!0,!1,"lineWidth"),e=Oa(ct({},t),["fill"]),n=this.parsePath(av(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,iv(a)},draw:function(a,i){var t=Vr(a,!1,!0),e=this.parsePath(s1(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 qA(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 tT(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 qA(a)},draw:function(a,i){var t=Vr(a,!0,!1),e=this.parsePath(tT(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 eT=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 nT(a,i){var t=[];return Nt(a,function(e,n){var r=a[n+1];if(t.push(e),r){var o=eT(e,r,i);t=t.concat(o)}}),t}function rT(a){return a.map(function(i,t){return t===0?["M",i.x,i.y]:["L",i.x,i.y]})}function iT(a,i){var t=$d(a.points,a.connectNulls,a.showSinglePoint),e=[];return Nt(t,function(n){var r=nT(n,i);e=e.concat(rT(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=iT(i,a),n=t.addShape({type:"path",attrs:e,name:"line"});return n},getMarker:function(i){return ky(i,a)}})});Nt(YA,function(a){gr("point",a,{draw:function(i,t){return sv(this,i,t,a,!0)},getMarker:function(i){var t=i.color;return{symbol:Tl[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(l1,function(a){gr("point",a,{draw:function(i,t){return sv(this,i,t,a,!1)},getMarker:function(i){var t=i.color;return{symbol:Tl[a]||a,style:{r:4.5,fill:t}}}})});function _g(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 Sg(a,i,t){var e=t/2,n;if(ln(i)){var r=_g(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=Je(i)?.5:i;var d=_g(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 aT(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 Sg(i,t,e)},draw:function(a,i){var t=Vr(a,!0,!1),e=this.parsePath(aT(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=Sg(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 oT(a){var i=ln(a)?a:[a],t=i.sort(function(e,n){return n-e});return yS(t,4,t[t.length-1])}function Cg(a,i,t){var e=oT(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 sT(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 Cg(i,t,e)},draw:function(a,i){var t=Vr(a,!0,!0),e=this.parsePath(sT(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=Cg(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 lT(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(!rs(a.points)){var t=Vr(a,!0,!0),e=this.parsePoints(a.points);return i.addShape("rect",{attrs:ct(ct({},t),lT(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(Fy(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(By(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(Fy(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 uT=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 E=o.convert(y[0]),x=o.convert(y[1]),M=o.convert(m[0]),_=o.convert(m[1]);s?(h=Math.min(M.y,E.y),v=Math.max(M.y,E.y),d=(x.x+_.x)/2,g=(E.x+M.x)/2):(h=Math.min((x.y+_.y)/2,(E.y+M.y)/2),v=Math.max((x.y+_.y)/2,(E.y+M.y)/2),d=_.x,g=E.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}(Ud),Of=Math.PI/2,u1=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(Xn(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 la(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 tu(this.getCoordinate(),t)},i.prototype.getCirclePoint=function(t,e,n,r){var o=this.getCoordinate(),s=o.getCenter(),l=Yc(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+Of;return n&&(r-=Of),r&&(r>Of?r=r-Math.PI:r<-Of&&(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}(Ud),fT=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=tu(e,n);if(t.points&&t.points[0].y===t.points[1].y)o=s;else{var l=tu(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({},ti(r.x,r.y,o,t)),{angle:t,r:o})},i}(u1),Pg=4;function cT(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 E={};try{for(var x=rr(a),M=x.next();!M.done;M=x.next()){var _=M.value;E[_.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}),cT(i,d,l,f,s,v)})}Nt(a,function(d){if(d&&d.labelLine){var v=d.offset,g=d.angle,p=ti(s.x,s.y,o,g),m=ti(s.x,s.y,o+v/2,g),y=d.x+he(d,"offsetX",0),E=d.y+he(d,"offsetY",0),x={x:y-Math.cos(g)*Pg,y:E-Math.sin(g)*Pg};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 f1(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 Ag=4;function dT(a,i){var t=i.getCenter(),e=i.getRadius();if(a&&a.labelLine){var n=a.angle,r=a.offset,o=ti(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)*Ag,y:l-Math.sin(n)*Ag},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=ti(t.x,t.y,e+p,n),y=ti(t.x,t.y,e+r/2,v),E=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(E," ").concat(g," ").concat(y.x," ").concat(y.y)),f.push("L ".concat(u.x," ").concat(u.y))}else{var m=ti(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 vT(a,i,t,e){var n,r,o=So(a,function(C){return!Je(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=ll(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)})),f1(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),$=Math.abs(Math.cos(k.angle)*yt);j?k.x=l.x+Math.max(lt,$):k.x=l.x-Math.max(lt,$)}st&&(st.attr("y",k.y),st.attr("x",k.x)),dT(k,s)})})}}}var ud=4,gT=4,Tg=4;function pT(a,i,t){var e=i.getCenter(),n=i.getRadius(),r={x:a.x-(t?Tg:-Tg),y:a.y},o=ti(e.x,e.y,n+ud,a.angle),s={x:r.x,y:r.y},l={x:o.x,y:o.y},u=ti(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=Je(C.offsetX)?gT:C.offsetX,V=ti(s.x,s.y,l+ud,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",E=ll(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(E,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)})),f1(C,d,M)});var _=M.minY,D=M.maxY;Nt(E,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};Wc(st,j.x-Q.x,j.y-Q.y),j.labelLine&&pT(j,o,k)}})})}}function yT(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,E=g;(cs?y=s-p:h>s&&(y=y-(h-s)),f>l?E=l-m:d>l&&(E=E-(d-l)),(y!==v||E!==g)&&Wc(n,y-v,E-g)})}function xT(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 ET=100,c1=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 wT(a,i,t){t===void 0&&(t=ET);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 If(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 Ig(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?[If(i[0],t,i[0]),If(i[1],t,i[0]),If(i[2],t,i[0]),If(i[3],t,i[0])]:i}function jg(a,i){if(a.length>4)return{min:0,max:0};var t=[];return a.forEach(function(e){t.push(ST([e.x,e.y],i))}),{min:Math.min.apply(Math,wr([],Pn(t),!1)),max:Math.max.apply(Math,wr([],Pn(t),!1))}}function CT(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{i=new window.BlobBuilder,i.append(a.toString()),i=i.getBlob()}return new OT(URL.createObjectURL(i))}}var jT=function(a){function i(){function u(E,x){return(E[0]||0)*(x[0]||0)+(E[1]||0)*(x[1]||0)+(E[2]||0)*(x[2]||0)}function c(E){if(E.length>4)return[];var x=function(D,C){return[C.x-D.x,C.y-D.y]},M=x(E[0],E[1]),_=x(E[1],E[2]);return[M,_]}function f(E,x,M){x===void 0&&(x=0),M===void 0&&(M={x:0,y:0});var _=E.x,D=E.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(E){var x=[{x:E.x,y:E.y},{x:E.x+E.width,y:E.y},{x:E.x+E.width,y:E.y+E.height},{x:E.x,y:E.y+E.height}],M=E.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(E,x){if(E.length>4)return{min:0,max:0};var M=[];return E.forEach(function(_){M.push(u([_.x,_.y],x))}),{min:Math.min.apply(null,M),max:Math.max.apply(null,M)}}function v(E,x){return E.max>x.min&&E.minE.x+E.width+M||x.x+x.widthE.y+E.height+M||x.y+x.height=r.height:o.width>=r.width}function NT(a,i,t){var e=!!a.getAdjust("stack");return e||i.every(function(n,r){var o=t[r];return FT(a,n,o)})}function kT(a,i,t){var e=a.coordinate,n=ua.fromObject(t.getBBox()),r=sl(i);e.isTransposed?r.attr({x:n.minX+n.width/2,textAlign:"center"}):r.attr({y:n.minY+n.height/2,textBaseline:"middle"})}function zT(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=NT(r,i,t);o&&t.forEach(function(s,l){var u=i[l];kT(r,u,s)})}}}function YT(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 HT(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=YT(i),s=Pn(r.getXYFields(),1),l=s[0],u=[],c=[],f=ll(o,function(p){return p.get("data")[l]}),h=up(la(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,wr([],Pn(p),!1)))};for(Da(h)>0&&(d=h.shift(),v(f[d])),Da(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")&&(IC(g,u)?g.set("visible",!1):u.push(g))}}}}function WT(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,wr([],Pn(n),!1)),e}function h1(a,i,t){return a.some(function(e){return t(e,i)})}function GT(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 Bg(a,i){return h1(a,i,function(t,e){var n=sl(t),r=sl(e);return GT(n.getCanvasBBox(),r.getCanvasBBox(),2)>0})}function VT(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=ll(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;la(tf(h).reverse(),function(g){for(var p=WT(l,h[g]);p.length;){var m=p.shift(),y=sl(m);if(h1(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 E=Bg(d,m),x=!1;if(E&&(y.attr("y",y.attr("y")+2*v),x=Bg(d,m)),x){y.set("visible",!1);continue}d.push(m)}})}}}function XT(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,wr([],Pn(n),!1)),e}function d1(a,i,t){return a.some(function(e){return t(e,i)})}function UT(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 Fg(a,i){return d1(a,i,function(t,e){var n=sl(t),r=sl(e);return UT(n.getCanvasBBox(),r.getCanvasBBox(),2)>0})}function $T(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=ll(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;la(tf(h).reverse(),function(g){for(var p=XT(l,h[g]);p.length;){var m=p.shift(),y=sl(m);if(d1(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 E=Fg(d,m),x=!1;if(E&&(y.attr("y",y.attr("y")+2*v),x=Fg(d,m)),x){y.set("visible",!1);continue}d.push(m)}})}}}var Eh;function KT(){return Eh||(Eh=document.createElement("canvas").getContext("2d")),Eh}var jf=gc(function(a,i){i===void 0&&(i={});var t=i.fontSize,e=i.fontFamily,n=i.fontWeight,r=i.fontStyle,o=i.fontVariant,s=KT();return s.font=[r,o,n,"".concat(t,"px"),e].join(" "),s.measureText(Xn(a)?a:"").width},function(a,i){return i===void 0&&(i={}),wr([a],Pn(hd(i)),!1).join("")}),ZT=function(a,i,t){var e=16,n=jf("...",t),r;Xn(a)?r=a:r=vc(a);var o=i,s=[],l,u;if(jf(a,t)<=i)return a;for(;l=r.substr(0,e),u=jf(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=jf(l,t),!(u+n>o);)if(s.push(l),o-=u,r=r.substr(1),!r)return s.join("");return"".concat(s.join(""),"...")};function QT(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=MS(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,E=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:E>d&&(F=F-(E-d))),C!==x||F!==M){var k=C-x;if(o==="translate")Wc(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=dd(V.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),yt=V.getCanvasBBox(),Q=ZT(V.attr("text"),yt.width-Math.abs(k),st);V.attr("text",Q)})}else v.hide()}})}}}function JT(a,i,t){var e={fillOpacity:Je(a.attr("fillOpacity"))?1:a.attr("fillOpacity"),strokeOpacity:Je(a.attr("strokeOpacity"))?1:a.attr("strokeOpacity"),opacity:Je(a.attr("opacity"))?1:a.attr("opacity")};a.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),a.animate(e,i)}function qT(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 t4(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(qr(a.getMatrix(),[["t",-r,-o],["s",.01,1],["t",r,o]])),e=qr(a.getMatrix(),[["t",-r,-o],["s",100,1],["t",r,o]])):t==="y"?(a.setMatrix(qr(a.getMatrix(),[["t",-r,-o],["s",1,.01],["t",r,o]])),e=qr(a.getMatrix(),[["t",-r,-o],["s",1,100],["t",r,o]])):t==="xy"&&(a.setMatrix(qr(a.getMatrix(),[["t",-r,-o],["s",.01,.01],["t",r,o]])),e=qr(a.getMatrix(),[["t",-r,-o],["s",100,100],["t",r,o]])),e}function lv(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=t4(a,[u,c],n);a.animate({matrix:f},i)}function e4(a,i,t){var e=t.coordinate,n=t.minYPoint;lv(a,i,e,n,"x")}function n4(a,i,t){var e=t.coordinate,n=t.minYPoint;lv(a,i,e,n,"y")}function r4(a,i,t){var e=t.coordinate,n=t.minYPoint;lv(a,i,e,n,"xy")}function i4(a,i,t){var e=a.getTotalLength();a.attr("lineDash",[e]),a.animate(function(n){return{lineDashOffset:(1-n)*e}},i)}function a4(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 o4(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=qr(a.getMatrix(),[["t",-o,-s],["s",.01,1],["t",o,s]]);a.setMatrix(l),a.animate({matrix:qr(a.getMatrix(),[["t",-o,-s],["s",100,1],["t",o,s]])},i)}function s4(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=qr(a.getMatrix(),[["t",-r,-s],["s",1,.01],["t",r,s]]);a.setMatrix(l),a.animate({matrix:qr(a.getMatrix(),[["t",-r,-s],["s",1,100],["t",r,s]])},i)}function Ng(a,i){var t,e=sc(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 kg(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 zg(a){var i,t,e,n=a.filter(function(E){return E[0]==="A"||E[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=kg(a[s-1]),c=kg(a[l-1]),f=Ng(u,r),h=f.startAngle,d=f.endAngle,v=Ng(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(Je(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=Pi(g,["start","end"]),m=tu(o,h),y=tu(o,d);m>y&&(y=Math.PI*2+y),l=ct(ct({},p),{center:o.getCenter(),radius:Yc(o,h),startAngle:m,endAngle:y})}else if(t==="image"){var E=e;E.start,E.end;var p=Pi(E,["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=Pi(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=Pi(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=Pi(D,["position","content"]),F=C;Bn(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=Pi(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,$=it.lineLength,p=Pi(it,["start","end","region","text","lineLength"]);l=ct(ct({},p),{points:this.getRegionPoints(Pt,ht),region:lt,text:st,lineLength:$})}else if(t==="regionFilter"){var xt=e;xt.start,xt.end;var Gt=xt.apply,Rt=xt.color,p=Pi(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?xl(Gt,dt.type)&&Nt(dt.elements,function(Z){_e(Z.shape)}):Nt(dt.elements,function(Z){_e(Z.shape)})}),l=ct(ct({},p),{color:Rt,shapes:Ie,start:h,end:d})}else if(t==="shape"){var Ue=e,Fe=Ue.render,ft=Pi(Ue,["render"]),gt=function(at){if(Bn(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=Pi(P,["html","position"]),H=function(dt){return Bn(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({},ru,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&&Oa(o,["container"]),e.component.update(ct(ct({},o||{}),{visible:!!o})),xl(Df,t.type)&&e.component.render()}else e=this.createAnnotation(t),e&&(e.component.init(),xl(Df,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){Ts(e.option,function(s){return o===e.getCacheKey(s)})||(r.component.destroy(),n.delete(o))}),n},i.prototype.getCacheKey=function(t){return t},i}(fu);function Hg(a,i){var t=_n({},he(a,["components","axis","common"]),he(a,["components","axis",i]));return he(t,["grid"],{})}function Rf(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 Mh(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:la(Array(r+1),function(d,v){return a.convert({x:v/r,y:e?f:h})})}),u},s[0]),o}function Wg(a,i){var t=he(i,"grid");if(t===null)return!1;var e=he(a,"grid");return!(t===void 0&&e===null)}var Ws=["container"],Gg=ct(ct({},ru),{appear:null}),E4=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===hi.AXIS)e.isPolar?u==="x"?h=e.isTransposed?Mf(e,o):dh(e):u==="y"&&(h=e.isTransposed?dh(e):Mf(e,o)):h=Mf(e,o);else if(s===hi.GRID)if(e.isPolar){var d=void 0;e.isTransposed?d=u==="x"?Mh(e,t.view.getYScales()[0],c,f,u):Rf(e,c,u,f):d=u==="x"?Rf(e,c,u,f):Mh(e,t.view.getXScale(),c,f,u),h={items:d,center:t.view.getCoordinate().getCenter()}}else h={items:Rf(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=ic(this.option,e.field);if(n!==!1){var r=q0(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);Oa(h,Ws),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);Oa(h,Ws),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);Oa(h,Ws),f.component.update(h),t.set(u,f)}else{if(l.isTransposed){if(Yl(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);Oa(h,Ws),d.component.update(h),t.set(c,d)}else{if(l.isTransposed){if(Yl(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=ic(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=q0(l,o===0?hn.LEFT:hn.RIGHT),g=e.cache.get(f);if(g){var p=e.getLineAxisCfg(r,l,v);Oa(p,Ws),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);Oa(p,Ws),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);Oa(p,Ws),g.component.update(p),t.set(f,g)}else{if(d.isTransposed){if(Yl(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);Oa(p,Ws),m.component.update(p),t.set(h,m)}else{if(d.isTransposed){if(Yl(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 cS(this.getLineAxisCfg(t,e,r)),layer:n,direction:r===hn.RADIUS?hn.NONE:r,type:hi.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 dS(s),layer:n,direction:hn.NONE,type:hi.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 hS(this.getCircleAxisCfg(t,e,r)),layer:n,direction:r,type:hi.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 vS(s),layer:n,direction:hn.NONE,type:hi.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=Mf(o,n),l=tg(t,e),u=bf(this.view.getTheme(),n),c=he(e,["title"])?_n({title:{style:{text:l}}},{title:J0(this.view.getTheme(),n,e.title)},e):e,f=_n(ct(ct({container:r},s),{ticks:t.getTicks().map(function(E){return{id:"".concat(E.tickValue),name:E.text,value:E.value}}),verticalFactor:o.isPolar?Q0(s,o.getCenter())*-1:Q0(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=iy(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(!!Wg(bf(this.view.getTheme(),n),e)){var o=Hg(this.view.getTheme(),n),s=_n({container:he(e,["top"])?this.gridForeContainer:this.gridContainer},o,he(e,"grid"),this.getAnimateCfg(e));return s.items=Rf(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=tg(t,e),u=bf(this.view.getTheme(),hn.CIRCLE),c=he(e,["title"])?_n({title:{style:{text:l}}},{title:J0(this.view.getTheme(),n,e.title)},e):e,f=_n(ct(ct({container:r},dh(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(!!Wg(bf(this.view.getTheme(),n),e)){var o=Hg(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=Mh(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({},Gg,t.animateOption):Gg}},i}(fu);function qs(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 Vg(a,i){return Bu(a)?a===!1?!1:{}:he(a,[i],a)}function Bf(a){return he(a,"position",hn.BOTTOM)}var w4=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=gh(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 ua(d.x,d.y,d.width,d.height).expand(h),g=Pn(qs(t.view.viewBBox,v,r),2),p=g[0],m=g[1],y=Pn(qs(t.layoutBBox,v,r),2),E=y[0],x=y[1],M=0,_=0;r.startsWith("top")||r.startsWith("bottom")?(M=p,_=x):(M=E,_=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=Vg(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&&(Oa(m,["container"]),p.direction=Bf(y),p.component.update(m),e[g]=!0)}else{var E=t.createFieldLegend(h,d,v);E&&(E.component.init(),t.components.push(E),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);Oa(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=Bf(this.option);this.components.push({id:r,component:l,layer:u,direction:c,type:hi.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=Vg(this.option,n.field),s=Gr.FORE,l=Bf(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:hi.LEGEND,extra:{scale:n}}},i.prototype.createCustomLegend=function(t,e,n,r){var o=this.getCategoryCfg(t,e,n,r,!0);return new $0(o)},i.prototype.createContinuousLegend=function(t,e,n,r){var o=this.getContinuousCfg(t,e,n,Oa(r,["value"]));return new gS(o)},i.prototype.createCategoryLegend=function(t,e,n,r){var o=this.getCategoryCfg(t,e,n,r);return new $0(o)},i.prototype.getContinuousCfg=function(t,e,n,r){var o=n.getTicks(),s=Ts(o,function(g){return g.value===0}),l=Ts(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:eo(u).value,max:Oi(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=Bf(r),d=gh(h),v=he(r,"title");return v&&(v=_n({text:Ku(n)},v)),c.container=f,c.layout=d,c.title=v,c.animateOption=ru,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=dg(this.view.getTheme(),l),c=he(u,["marker"]),f=he(r,"marker"),h=gh(l),d=he(u,["pageNavigator"]),v=he(r,"pageNavigator"),g=o?FC(c,f,r.items):BC(this.view,t,e,c,f),p=he(r,"title");p&&(p=_n({text:n?Ku(n):""},p));var m=he(r,"maxWidthRatio"),y=he(r,"maxHeightRatio"),E=this.getCategoryLegendSizeCfg(h,m,y);E.container=s,E.layout=h,E.items=g,E.title=p,E.animateOption=ru,E.pageNavigator=_n({},d,v);var x=this.mergeLegendCfg(E,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=dg(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 Ts(this.components,function(e){return e.id===t})},i.prototype.getCategoryLegendSizeCfg=function(t,e,n){e===void 0&&(e=Cv),n===void 0&&(n=Cv);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}(fu),M4=function(a){je(i,a);function i(t){var e=a.call(this,t)||this;return e.onChangeFn=Zs,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=vd(e.onValueChange,20,{leading:!0}),e.width=0,e.view.on(Er.BEFORE_CHANGE_DATA,e.resetMeasure),e.view.on(Er.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(Er.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(Er.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;Je(this.start)&&(this.start=e,this.end=n);var r=this.view.getOptions().data;this.option&&!rs(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 ua(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(qs(this.view.viewBBox,u,hn.BOTTOM),2);d[0];var v=d[1],g=Pn(qs(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 lS(ct({container:this.container},t));return e.init(),{component:e,layer:Gr.FORE,direction:hn.BOTTOM,type:hi.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(Je(t.start)?0:t.start,Je(t.end)?1:t.end),0,1),t.end=Yr(Math.max(Je(t.start)?0:t.start,Je(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=Da(n);if(!r||!l)return{};var u=Da(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=Da(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=Da(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?Vl(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}(fu),Ff=0,Xg=8,b4=32,_4=20,S4=function(a){je(i,a);function i(t){var e=a.call(this,t)||this;return e.onChangeFn=Zs,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=vd(e.onValueChange,20,{leading:!0}),e.trackLen=0,e.thumbLen=0,e.ratio=0,e.view.on(Er.BEFORE_CHANGE_DATA,e.resetMeasure),e.view.on(Er.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(Er.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(Er.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 ua(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(qs(this.view.viewBBox,o,hn.BOTTOM),2);c[0];var f=c[1],h=Pn(qs(this.view.coordinateBBox,o,hn.BOTTOM),2),d=h[0];h[1],l=d,u=f}else{var v=Pn(qs(this.view.viewBBox,o,hn.RIGHT),2);v[0];var f=v[1],g=Pn(qs(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=Pi(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?Vl(v,o,s):!0}),this.view.render(!0)},i.prototype.createScrollbar=function(){var t=this.getValidScrollbarCfg().type,e=t!=="vertical",n=new fS(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:hi.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 Da(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(),E=this.getCnt(),x=f?e.width-p-v:e.height-d-g,M=Math.max(x*Yr(y/E,0,1),_4);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:b4,width:Xg,height:Xg,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"?[Ff,0,Ff,0]:[0,Ff,0,Ff]),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=wr([],Pn(n),!1).reverse()),n},i}(fu),C4={fill:"#CCD6EC",opacity:.3};function P4(a,i,t){var e,n,r,o,s,l,u=fC(a,i,t);if(u.length){u=ro(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 E=t.shared;if(E===!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 up(ro(u))}return[]}var A4=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=P4(e,{x:n.x,y:n.y},r);if(!li(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($){var xt=$.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(),E=t||{},x=E.appendRatio,M=E.appendWidth;Je(M)&&(x=Je(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=eo(u),j=Oi(u),V=rc(k.getModel(),f).startAngle,st=rc(j.getModel(),f).endAngle,yt=f.getCenter(),Q=f.getRadius(),it=f.innerRadius*Q;m=Sl(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",C4);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}(di),v1=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||!li(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}(di),T4=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.showTooltip=function(t,e){var n=ns(t);Nt(n,function(r){var o=qh(t,r,e);r.showTooltip(o)})},i.prototype.hideTooltip=function(t){var e=ns(t);Nt(e,function(n){n.hideTooltip()})},i}(v1),O4=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||!li(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 zc({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}(di),fv=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=dy(t,this.stateName);Nt(n,function(r){e.setElementState(r,!1)})},i}(di);function Ug(a){return he(a.get("delegateObject"),"item")}var cv=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=Ii(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=nu(r,e),s=zo(t,e);return!Je(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=ol(this.context);if(e)fy(this.context)&&this.setStateByElement(e,t);else{var n=eu(this.context);if(Zu(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&&Ug(s.fromShape)===Ug(s.toShape))return;this.setStateByComponent(o,r,t)}}}},i.prototype.toggle=function(){var t=ol(this.context);if(t){var e=t.hasState(this.stateName);this.setElementState(t,!e)}},i.prototype.reset=function(){this.setStateEnable(!1)},i}(fv),I4=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}(cv),j4=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,Bn(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=zo(t,o.field);if(!this.cache[s]){var l=YS(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}(hv),F4=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=Ii(n);g1(r,function(o){return t===o},e)},i.prototype.clear=function(){var t=this.context.view;vv(t)},i}(dv),N4=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}(hv),k4=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}(cv),z4=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}(dv),Ll=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=eu(this.context),e=null;return Zu(t)&&(e={item:t.item,list:t.component}),e},i.prototype.getAllowComponents=function(){var t=this,e=this.context.view,n=vy(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=nu(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=nu(o,r),l=zo(e,r),u=s.getText(l);this.setItemsState(t,u,n)},i.prototype.setStateEnable=function(t){var e=this,n=ol(this.context);if(n){var r=this.getAllowComponents();Nt(r,function(u){e.setStateByElement(u,n,t)})}else{var o=eu(this.context);if(Zu(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}(di),Y4=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}(Ll),$g="inactive",Kg="active";function H4(a){var i=a.getItems();Nt(i,function(t){a.hasState(t,Kg)&&a.setItemState(t,Kg,!1),a.hasState(t,$g)&&a.setItemState(t,$g,!1)})}var yu="inactive",pl="active",pv=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.stateName=pl,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,yu)&&t.setItemState(l,yu,!1),t.setItemState(l,pl,!0)):t.hasState(l,pl)||t.setItemState(l,yu,!0)});else{var o=t.getItemsByState(pl),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,pl)&&t.setItemState(l,pl,!1),t.setItemState(l,yu,!0))})}},i.prototype.highlight=function(){this.setState()},i.prototype.clear=function(){var t=this.getTriggerListInfo();if(t)H4(t.list);else{var e=this.getAllowComponents();Nt(e,function(n){n.clearItemsState(pl),n.clearItemsState(yu)})}},i}(Ll),W4=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}(Ll),G4=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}(Ll),Bl="unchecked",Nf="checked",V4=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.stateName=Nf,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,Bl)&&t.setItemState(o,Bl,!1),t.setItemState(o,Nf,!0)):t.hasState(o,Nf)||t.setItemState(o,Bl,!0)})},i.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var e=t.list,n=t.item,r=!dc(e.getItems(),function(o){return e.hasState(o,Bl)});r||e.hasState(n,Bl)?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(Nf),e.clearItemsState(Bl)})},i}(Ll),Fl="unchecked",X4=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,Fl)}),g=d.filter(function(k){return f.hasState(k,Fl)}),p=v[0];if(d.length===v.length)try{for(var m=rr(d),y=m.next();!y.done;y=m.next()){var E=y.value;f.setItemState(E,Fl,E.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 E=M.value;f.setItemState(E,Fl,!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 E=D.value;f.setItemState(E,Fl,E.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 E=F.value;f.setItemState(E,Fl,E.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}(Ll),Zg="showRadio",bh="legend-radio-tip",U4=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,Zg,!0)}},i.prototype.hide=function(){var t=this.getTriggerListInfo();if(t!=null&&t.item){var e=t.list,n=t.item;e.setItemState(n,Zg,!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||!li(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(bh)&&document.body.removeChild(document.getElementById(bh));var n=new zc({parent:document.body,region:null,visible:!1,crosshairs:null,domStyles:e,containerId:bh});n.init(),n.setCapture(!1),this.tooltip=n},i}(Ll),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}(di),$4=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=Oi(this.points),n=0,r=0,o=0;if(t.length){var s=t[0];n=Yd(s,e)/2,r=(e.x+s.x)/2,o=(e.y+s.y)/2}return{x:r,y:o,r:n}},i}(mv),m1=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:eo(t),end:Oi(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 Qg(a){a.x=Yr(a.x,0,1),a.y=Yr(a.y,0,1)}var y1=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(eo(n)),l=o.invert(Oi(n));return this.inPlot&&(Qg(s),Qg(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}(m1),x1=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),K4=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 GS(t,!0)},i}(x1),Z4=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}(di),Q4=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=eu(this.context);if(t){var e=this.context.view,n=t.component,r=n.get("field");if(Zu(t)){if(r){var o=n.getItemsByState("unchecked"),s=nu(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(cy(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}(di);function Jg(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 Eo;(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"})(Eo||(Eo={}));var Vc=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(Qu(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(Eo.BEFORE_FILTER,Ji.fromData(s,Eo.BEFORE_FILTER,u));var c=s.getCoordinate(),f=c.invert(e),h=c.invert(t);if(this.hasDim("x")){var d=s.getXScale(),v=Jg(d,"x",f,h);this.filterView(s,d.field,v)}if(this.hasDim("y")){var g=s.getYScales()[0],v=Jg(g,"y",f,h);this.filterView(s,g.field,v)}this.reRender(s,{source:Eo.FILTER}),s.emit(Eo.AFTER_FILTER,Ji.fromData(s,Eo.AFTER_FILTER,u))}},i.prototype.end=function(){this.isStarted=!1},i.prototype.reset=function(){var t=this.context.view;if(t.emit(Eo.BEFORE_RESET,Ji.fromData(t,Eo.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:Eo.RESET}),t.emit(Eo.AFTER_RESET,Ji.fromData(t,Eo.AFTER_RESET,{}))},i.prototype.filterView=function(t,e,n){t.filter(e,n)},i.prototype.reRender=function(t,e){t.render(!0,e)},i}(di),yv=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=ns(t);Nt(r,function(o){o.filter(e,n)})},i.prototype.reRender=function(t){var e=ns(t);Nt(e,function(n){n.render(!0)})},i}(Vc),J4=function(a){je(i,a);function i(){return a!==null&&a.apply(this,arguments)||this}return i.prototype.filter=function(){var t=eu(this.context),e=this.context.view,n=Ii(e);if(Qu(this.context)){var r=kd(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(Zu(t)){if(s){var l=o.getItemsByState("unchecked"),u=nu(e,s),c=l.map(function(g){return g.name});Nt(n,function(g){var p=zo(g,s),m=u.getText(p);c.indexOf(m)>=0?g.hide():g.show()})}}else if(cy(t)){var f=o.getValue(),h=Pn(f,2),d=h[0],v=h[1];Nt(n,function(g){var p=zo(g,s);p>=d&&p<=v?g.show():g.hide()})}}},i.prototype.clear=function(){var t=Ii(this.context.view);Nt(t,function(e){e.show()})},i.prototype.reset=function(){this.clear()},i}(di),E1=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(){Qu(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},i.prototype.filterByRecord=function(){var t=this.context.view,e=kd(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=ns(t);Nt(s,function(l){var u=Ii(l);Nt(u,function(c){var f=c.getModel().data;gy(o,f,n,r)?c.show():c.hide()})})}},i.prototype.filterByBBox=function(){var t=this,e=this.context.view,n=ns(e);Nt(n,function(r){var o=hy(t.context,r,10),s=Ii(r);o&&Nt(s,function(l){o.includes(l)?l.show():l.hide()})})},i.prototype.reset=function(){var t=ns(this.context.view);Nt(t,function(e){var n=Ii(e);Nt(n,function(r){r.show()})})},i}(di),q4=10,tO=5,eO=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=Hd(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=qr(null,[["t",n.x-o.width-q4,n.y+o.height+tO]]);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}(di),nO=4,rO=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}):Yd(t,this.startPoint)>nO&&(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}(di),iO=5,aO=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=Yd(t,e);if(n>iO&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var r=this.context.view,o=qr(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}(di),qg="x",tp="y",w1=function(a){je(i,a);function i(){var t=a!==null&&a.apply(this,arguments)||this;return t.dims=[qg,tp],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(qg),this.resetDim(tp);var t=this.context.view;t.render(!0)},i}(di),oO=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}(w1),sO=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}(w1);function lO(a){var i=a.gEvent.originalEvent;return i.deltaY>0}var uO=1,fO=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)||uO,s=n.getController("scrollbar"),l=n.getXScale(),u=n.getOptions().data,c=Da(Os(u,l.field)),f=Da(l.values),h=s.getValue(),d=Math.floor((c-f)*h),v=d+(lO(r)?o:-o),g=o/(c-f)/1e4,p=Yr(v/(c-f)+g,0,1);s.setValue(p)}},i}(di),cO="aixs-description-tooltip",hO=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=eu(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 zc({parent:n.get("el").parentNode,region:r,visible:!1,containerId:cO,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}(di);rC("dark",my(VC));yp("canvas",kP);yp("svg",OA);ds("Polygon",GA);ds("Interval",kA);ds("Schema",VA);ds("Path",rv);ds("Point",HA);ds("Line",zA);ds("Area",jA);ds("Edge",LA);ds("Heatmap",DA);ds("Violin",UA);Hc("base",Ud);Hc("interval",uT);Hc("pie",fT);Hc("polar",u1);Ra("overlap",_T);Ra("distribute",hT);Ra("fixed-overlap",bT);Ra("hide-overlap",DT);Ra("limit-in-shape",xT);Ra("limit-in-canvas",yT);Ra("limit-in-plot",QT);Ra("pie-outer",vT);Ra("adjust-color",BT);Ra("interval-adjust-position",zT);Ra("interval-hide-overlap",HT);Ra("point-adjust-position",VT);Ra("pie-spider",mT);Ra("path-adjust-position",$T);io("fade-in",JT);io("fade-out",qT);io("grow-in-x",e4);io("grow-in-xy",r4);io("grow-in-y",n4);io("scale-in-x",o4);io("scale-in-y",s4);io("wave-in",u4);io("zoom-in",f4);io("zoom-out",c4);io("position-update",a4);io("sector-path-update",l4);io("path-in",i4);lu("rect",p4);lu("mirror",g4);lu("list",d4);lu("matrix",v4);lu("circle",h4);lu("tree",m4);uu("axis",E4);uu("legend",w4);uu("tooltip",EC);uu("annotation",x4);uu("slider",M4);uu("scrollbar",S4);Wn("tooltip",v1);Wn("sibling-tooltip",T4);Wn("ellipsis-text",O4);Wn("element-active",I4);Wn("element-single-active",D4);Wn("element-range-active",L4);Wn("element-highlight",gv);Wn("element-highlight-by-x",B4);Wn("element-highlight-by-color",R4);Wn("element-single-highlight",F4);Wn("element-range-highlight",p1);Wn("element-sibling-highlight",p1,{effectSiblings:!0,effectByRecord:!0});Wn("element-selected",k4);Wn("element-single-selected",z4);Wn("element-range-selected",N4);Wn("element-link-by-color",j4);Wn("active-region",A4);Wn("list-active",Y4);Wn("list-selected",W4);Wn("list-highlight",pv);Wn("list-unchecked",G4);Wn("list-checked",V4);Wn("list-focus",X4);Wn("list-radio",U4);Wn("legend-item-highlight",pv,{componentNames:["legend"]});Wn("axis-label-highlight",pv,{componentNames:["axis"]});Wn("axis-description",hO);Wn("rect-mask",m1);Wn("x-rect-mask",y1,{dim:"x"});Wn("y-rect-mask",y1,{dim:"y"});Wn("circle-mask",$4);Wn("path-mask",x1);Wn("smooth-path-mask",K4);Wn("cursor",Z4);Wn("data-filter",Q4);Wn("brush",Vc);Wn("brush-x",Vc,{dims:["x"]});Wn("brush-y",Vc,{dims:["y"]});Wn("sibling-filter",yv);Wn("sibling-x-filter",yv);Wn("sibling-y-filter",yv);Wn("element-filter",J4);Wn("element-sibling-filter",E1);Wn("element-sibling-filter-record",E1,{byRecord:!0});Wn("view-drag",rO);Wn("view-move",aO);Wn("scale-translate",oO);Wn("scale-zoom",sO);Wn("reset-button",eO,{name:"reset-button",text:"reset"});Wn("mousewheel-scroll",fO);function rl(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:rl,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:rl,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:rl,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:rl,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:rl,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:rl,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:rl,action:"path-mask:start"},{trigger:"mousedown",isEnable:rl,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 ep(a){return a.gEvent.preventDefault(),a.gEvent.originalEvent.deltaY>0}Cr("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(a){return ep(a.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(a){return!ep(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 dO=is({props:{navigateItem:{type:String},color:{type:String}},setup(a,i){const{airValue:t,airStatus:e}=sp(),n=as({airStatus:e});A1(t,(o,s)=>{r()});const r=()=>{var o=t.value||0;const s=[{type:"\u5F00\u542F",value:o},{type:"\u5173\u95ED",value:100-o}],l=new Gd({container:"container",autoFit:!0});l.data(s),l.legend(!1),l.tooltip(!1),l.coordinate("theta",{radius:.9,innerRadius:.8});const u=l.interval().adjust("stack").position("value").color("type",["l(90) 0:#BFA17E 1:#E0D1BB","#3C3F52"]).style({opacity:1,lineCap:"round"});l.annotation().text({position:["50%","50%"],content:s[0].value+"%",style:{fontSize:40,fill:"#F8EDDA",fontWeight:700,textAlign:"center"},offsetY:-10}),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(),u.elements[0].setState("active",!0)};return os(()=>{}),{...ss(n)}}});const vO=a=>(us("data-v-f3ee71b7"),a=a(),fs(),a),gO={class:"airSwitch"},pO={class:"airWrap"},mO=vO(()=>en("div",{class:"container",id:"container"},null,-1)),yO={class:"air-title"};function xO(a,i,t,e,n,r){return zr(),kr("div",gO,[en("div",pO,[mO,en("div",yO,[en("span",null,nr(a.airStatus?"\u7A7A\u8C03\u5DF2\u5F00\u542F":"\u7A7A\u8C03\u5DF2\u5173\u95ED"),1)])])])}const z5=ls(dO,[["render",xO],["__scopeId","data-v-f3ee71b7"]]),EO=is({props:{screenType:{type:String}},setup(a,i){const t=as({}),e=Wf(),n=r=>{gr("point","breath-point",{draw(f,h){const d=f.data,v={x:f.x,y:f.y},g=h.addGroup();return d.time===r[r.length-1].time&&d.temp===r[r.length-1].temp&&(g.addShape("circle",{attrs:{x:v.x,y:v.y,r:8,fill:"#F2E2CC"}}),g.addShape("circle",{attrs:{x:v.x,y:v.y,r:4,fill:"#ffffff",filter:"blur(2px)",opacity:.5}})),g}}),e.value&&e.value.offsetWidth,e.value&&e.value.offsetHeight;var o=new Gd({container:"tempChartBox",autoFit:!0,padding:[50,50,46,60]});o.data(r),o.scale("time",{}),o.scale("temp",{tickCount:5,minTickInterval:2}),o.axis("time",{label:{style:{fill:"#E0C29B",fontSize:12}},tickLine:null}),o.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}}}),o.legend(!1),o.line().position("time*temp").color("#F2E3CD").shape("smooth").tooltip(!1).style({lineWidth:3}),o.area().position("time*temp").color("l(90) 0:#F2E3CD 1:#CFAE88").tooltip(!1).shape("smooth"),o.point().position("time*temp").shape("breath-point");var s=r[r.length-1],l=tl(),u=l.format("YYYY.MM.DD");const c=`
    ${u}${s&&s.time}
    \u5BA4\u5185\u6E29\u5EA6\uFF1A${s&&s.temp&&Number(s.temp).toFixed(1)}\u2103
    `;return o.annotation().html({position:s,html:c,alignX:"right",alignY:"bottom",offsetX:60,offsetY:-20}),o.annotation().text({position:function(f,h){return["0%","0%"]},content:"\u6E29\u5EA6/\u2103",style:{fill:"#E0C29B",fontSize:"12"},offsetX:-40,offsetY:-24}),o.render(),o};return os(()=>{T1().then(r=>{var o=r.data.data||[];o.forEach(s=>{var l=s.time||"",u=l.substr(8,2),c=l.substr(10,2);s.time=u+":"+c,s.temp=s&&s.temp?Number(s.temp).toFixed(1):s.temp}),O1(()=>{n(o)})}).catch(r=>{})}),{...ss(t),tempChartRef:e}}});const wO=a=>(us("data-v-b4597bbe"),a=a(),fs(),a),MO={class:"subhead-title"},bO=wO(()=>en("span",null,"\u5B9E\u65F6\u6E29\u5EA6",-1)),_O=[bO],SO={id:"tempChartBox",class:"tempChartBox",ref:"tempChartRef"};function CO(a,i,t,e,n,r){return zr(),kr("div",{class:As(["temChart",[a.screenType==="hor"?"horiCompClass":"verCompClass "]])},[rp(en("div",MO,_O,512),[[ip,a.screenType==="ver"]]),en("div",SO,null,512)],2)}const Y5=ls(EO,[["render",CO],["__scopeId","data-v-b4597bbe"]]),PO=is({props:{screenType:{type:String}},setup(a,i){const t=fc(),e=as({widthBase:"0%"}),n=I1(()=>{const r=t.lastAllEnergy;var o={energySaving:r.energySaving?r.energySaving.toFixed(1):r.energySaving,energyTotal:r.energyTotal?r.energyTotal.toFixed(1):r.energyTotal,energyCompare:r.energyCompare?(r.energyCompare*100).toFixed(1):r.energyCompare};return o});return t.$subscribe((r,o)=>{e.widthBase="100%"}),os(()=>{t.setLastAllEnergy()}),{...ss(e),lastAllComputed:n,projectStore:t}},computed:{}});const xv=a=>(us("data-v-b661b970"),a=a(),fs(),a),AO=xv(()=>en("div",{class:"subhead-title"},[en("span",null,"\u4E0A\u6708\u603B\u80FD\u8017")],-1)),TO={class:"saveEnergy"},OO={class:"energySave"},IO={class:"textDiv"},jO=xv(()=>en("span",null,"\u4E2D\u6D77\u80FD\u8017",-1)),LO={class:"energyTotal"},DO={class:"textDiv"},RO=xv(()=>en("span",null,"\u57FA\u51C6\u80FD\u8017",-1));function BO(a,i,t,e,n,r){return zr(),kr("div",{class:As(["lastMonth",[a.screenType==="hor"?"horizontalClass ":"verLastClass "]])},[AO,en("div",TO,[en("span",null,"\u8282\u80FD"+nr(a.lastAllComputed.energyCompare)+"%",1)]),en("div",OO,[en("div",IO,[jO,en("span",null,nr(a.lastAllComputed.energySaving)+"kWh",1)]),en("div",{class:"saveBack",style:Ks({width:a.lastAllComputed.energyCompare+"%"})},null,4)]),en("div",LO,[en("div",DO,[RO,en("span",null,nr(a.lastAllComputed.energyTotal)+"kWh",1)]),en("div",{class:"totalBack",style:Ks({width:a.widthBase})},null,4)])],2)}const H5=ls(PO,[["render",BO],["__scopeId","data-v-b661b970"]]),FO=is({props:{screenType:{type:String}},setup(a,i){const t=fc(),{lastAllEnergy:e}=np(t),n=as({lastAllEnergyRes:{}});return t.$subscribe((r,o)=>{const s=o.lastAllEnergy||{};n.lastAllEnergyRes={cdmCo2:s.cdmCo2?s.cdmCo2.toFixed(2):s.cdmCo2,cdmTree:s.cdmTree?s.cdmTree.toFixed(2):s.cdmTree,cdmC:s.cdmC?s.cdmC.toFixed(2):s.cdmC,energySaving:s.energySaving?s.energySaving.toFixed(2):s.energySaving}}),os(()=>{}),{...ss(n),lastAllEnergy:e}},computed:{}}),NO="/sgdaping/assets/saveEnergy.5cc0e925.mov";const Ev=a=>(us("data-v-c9e5839c"),a=a(),fs(),a),kO=Ev(()=>en("div",{class:"subhead-title"},[en("span",null,"\u4E0A\u6708\u8282\u7EA6\u80FD\u8017")],-1)),zO={class:"saveCont"},YO={class:"co2Wrap sco2"},HO=Ol(" \u51CF\u6392"),WO={class:"value"},GO=Ol("CO2 "),VO={class:"co2Wrap scarbon"},XO=Ol(" \u51CF\u6392"),UO={class:"value"},$O=Ol("\u78B3 "),KO={class:"co2Wrap stree"},ZO=Ol(" \u4E3A\u56FD\u5BB6\u79CD"),QO={class:"value"},JO=Ol("\u68F5\u6811 "),qO={class:"electWrap"},t5=Ev(()=>en("div",null,"\u8282\u7EA6\u7535",-1)),e5={class:"value"},n5=Ev(()=>en("video",{class:"svideo",autoplay:"",loop:"",muted:""},[en("source",{src:NO})],-1));function r5(a,i,t,e,n,r){return zr(),kr("div",{class:As(["lastMonth",[a.screenType==="hor"?"horizontalClass ":"verAllClass "]])},[kO,en("div",zO,[en("div",YO,[HO,en("span",WO,nr(a.lastAllEnergyRes.cdmCo2)+"Kg",1),GO]),en("div",VO,[XO,en("span",UO,nr(a.lastAllEnergyRes.cdmC)+"Kg",1),$O]),en("div",KO,[ZO,en("span",QO,nr(a.lastAllEnergyRes.cdmTree),1),JO]),en("div",qO,[t5,en("div",e5,nr(a.lastAllEnergyRes.energySaving)+"\u5EA6",1)]),n5])],2)}const W5=ls(FO,[["render",r5],["__scopeId","data-v-c9e5839c"]]),i5=is({props:{screenType:{type:String},showPing:{type:Number}},setup(a,i){const t=fc(),e=as({selectColor:op,selIndicator:{},selIndicatorId:"",nowIndicatorIndex:null,allIndicator:[{id:"temp",index:0,code:"Tdb",name:"\u6E29\u5EA6",img:Aa.floor_wendu,verimg:Aa.floor_wendu_ver,unit:"\u2103",fixed:1},{id:"humidity",index:1,code:"RH",name:"\u6E7F\u5EA6",img:Aa.floor_shidu,verimg:Aa.floor_shidu_ver,unit:"%",fixed:0},{id:"co2",index:2,code:"CO2",name:"CO\u2082",img:Aa.floor_co2,verimg:Aa.floor_co2_ver,unit:"ppm",fixed:0},{id:"methanal",index:3,code:"HCHO",name:"\u7532\u919B",img:Aa.floor_jiaquan,verimg:Aa.floor_jiaquan_ver,unit:"mg/m\xB3",fixed:2},{id:"pm25",index:4,code:"PM2d5",name:"PM2.5",img:Aa.floor_pm25,verimg:Aa.floor_pm25_ver,unit:"ug/m\xB3",fixed:0}],allBuild:[],nowBuildName:"",nowBuildPage:1,allFloor:[],firstPageParams:[],secondPageParams:[],nowPage:1,pageNum:0,showFloors:[],totalAvgValues:null,hqueryBuild(){j1().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=>{})},fqueryFs(){var n=(e.allBuild[e.nowBuildPage-1]||{}).id;!n||L1({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()}).catch(function(r){})},getTimeFloorParam(){var n=e.nowPage==1?e.firstPageParams:e.secondPageParams;e.fqueryParam(n).then(()=>{var r=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(r)):(e.nowBuildPage=e.nowBuildPage+1,e.fqueryFs());return}e.pageNum==2&&e.nowPage==1&&(e.nowPage=2,e.nowIndicatorIndex=0)}e.getTimeFloorParam()},2e3)})},fqueryParam(n){var r=tl(),o=tl().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 D1(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(E=>E.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})},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 os(()=>{e.nowPage=1,e.hqueryBuild()}),{...ss(e)}}});const a5=a=>(us("data-v-c62db53e"),a=a(),fs(),a),o5={key:0,class:"leftChange"},s5={class:"allIndicator"},l5={class:"title"},u5={class:"textCont"},f5={class:"value"},c5=a5(()=>en("br",null,null,-1)),h5={class:"name"},d5={class:"other"},v5=["src"],g5=["onClick"],p5={class:"title"},m5={key:1,class:"topChange"},y5={class:"allIndicator"},x5=["onClick"],E5={class:"imageDiv"},w5=["src"],M5={class:"textCont"},b5=Ol(" \u5E73\u5747"),_5={class:"value"},S5={class:"floorWrap",id:"floorWrap"},C5={class:"floor-num"},P5={class:"floor-space"};function A5(a,i,t,e,n,r){return zr(),kr("div",{class:As(["floorSpace",[a.screenType==="hor"?"horiFloorClass ":"verFloorClass "]])},[rp(en("div",{class:"buildName"},nr(a.nowBuildName),513),[[ip,a.allBuild.length]]),a.screenType=="hor"?(zr(),kr("div",o5,[en("div",s5,[en("div",{class:"showItem",style:Ks({top:a.selIndicator.index*16+"%"})},[en("div",l5,nr(a.selIndicator.name),1),en("div",u5,[en("span",f5,nr(a.totalAvgValues)+nr(a.selIndicator.unit),1),c5,en("span",h5,"\u5E73\u5747"+nr(a.selIndicator.name),1)]),en("div",d5,[en("img",{class:"img",src:a.selIndicator.img},null,8,v5)])],4),(zr(!0),kr(kl,null,zl(a.allIndicator,(o,s)=>(zr(),kr("div",{class:As(["eachItem",{select:o.id==a.selIndicator.id}]),onClick:l=>a.clickIndicator(s)},[en("div",p5,nr(o.name),1)],10,g5))),256))])])):bv("",!0),a.screenType=="ver"?(zr(),kr("div",m5,[en("div",y5,[(zr(!0),kr(kl,null,zl(a.allIndicator,(o,s)=>(zr(),kr("div",{class:As(["eachItem",{select:o.id==a.selIndicator.id}]),onClick:l=>a.clickIndicator(s)},[en("span",null,nr(o.name),1)],10,x5))),256))]),en("div",E5,[en("img",{src:a.selIndicator.verimg},null,8,w5)]),en("div",M5,[b5,en("span",null,nr(a.selIndicator.name),1),en("span",_5,nr(a.totalAvgValues),1),en("span",null,nr(a.selIndicator.unit),1)])])):bv("",!0),en("div",S5,[(zr(!0),kr(kl,null,zl(a.showFloors,(o,s)=>(zr(),kr("div",{class:"floor-item",key:s,style:Ks({height:o.floorHeight+"px"})},[en("div",C5,[en("span",null,nr(o.localName),1)]),en("div",P5,[(zr(!0),kr(kl,null,zl(o.dataSpaces,(l,u)=>(zr(),kr("div",{class:"space-box",key:u,style:Ks({width:o.spacewidth+"%",height:o.spaceheight+"%"})},[en("div",{class:"space-name",style:Ks({backgroundColor:a.selectColor(l.avgValues,a.selIndicatorId,!0)})},nr(l.localName),5)],4))),128))])],4))),128))])],2)}const G5=ls(i5,[["render",A5],["__scopeId","data-v-c62db53e"]]);var M1={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,E=m.right;g(y,v),g(E,v),v.isHorizontal?y.right2left():y.bottom2top(),E.translate(y.x-E.x,y.y-E.y),d.x=y.x,d.y=E.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),E=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,E),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],E;E=y.shift();)p(E),y=E.children.concat(y)},DFTraverse:function(p){this.eachNode(p)},BFTraverse:function(p){for(var m=this,y=[m],E;E=y.shift();)p(E),y=y.concat(E.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),E=[y],x;if(!m&&!g.collapsed){for(;x=E.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,E.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[E])return 1;if(p[E]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,E)),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+$.prelim);Gt>0&&(xt+=Gt,E(Q,it,Pt.index,Gt));var Rt=_(ht),Qt=_($);Rt<=Qt&&(ht=M(ht),ht!==null&&(lt+=ht.mod)),Rt>=Qt&&($=x($),$!==null&&(xt+=$.mod))}!ht&&!!$?D(Q,it,$,xt):!!ht&&!$&&C(Q,it,ht,lt)}function E(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 $=ht-Pt.mod-Q.c[0].msel;lt.mod+=$,lt.prelim-=$,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 $=ht-Pt.mod-Q.c[it].mser;lt.mod+=$,lt.prelim-=$,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 E=g(h);return p(E),y(E),f(E,h,d.isHorizontal),h}},function(r,o,s){function l(y,E){y.prototype=Object.create(E.prototype),y.prototype.constructor=y,y.__proto__=E}var u=s(11),c=s(117),f=s(30),h=s(7),d=["LR","RL","H"],v=d[0],g=function(y){l(E,y);function E(){return y.apply(this,arguments)||this}var x=E.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},E}(u),p={};function m(y,E){return E=h.assign({},p,E),new g(y,E).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{}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 E=h.y+(h.height-m)/2-g.y;d.forEach(function(x){x.translate(0,E)})}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,R,T=0;if(ot==null)for(;++Z1)return T/(dt-1)}function y(H,ot){var at=m(H,ot);return at&&Math.sqrt(at)}function E(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/R),ot=Math.floor(ot/R),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),R=+at(H[mt+1],mt+1,H);return S+(R-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 $(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,Tt=vt;vt.length===1&&(Ct=function(Wt,ne){return vt(Wt)-ne},Tt=u(vt));function $t(Wt,ne,ae,ge){for(ae==null&&(ae=0),ge==null&&(ge=Wt.length);ae>>1;Tt(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;Tt(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=$t(Wt,ne,ae,ge-1);return Pe>ae&&Ct(Wt[Pe-1],ne)>-Ct(Wt[Pe],ne)?Pe-1:Pe}return{left:$t,center:se,right:Vt}}function u(vt){return function(Ct,Tt){return s(vt(Ct),Tt)}}function c(vt){return vt===null?NaN:+vt}function f(vt,Ct){var Tt,$t,ae,Vt,se,Wt,ne,ae,ge,Pe,ke,Ae,tn;return r.__generator(this,function(En){switch(En.label){case 0:if(Ct!==void 0)return[3,9];En.label=1;case 1:En.trys.push([1,6,7,8]),Tt=r.__values(vt),$t=Tt.next(),En.label=2;case 2:return $t.done?[3,5]:(ae=$t.value,ae!=null&&(ae=+ae)>=ae?[4,ae]:[3,4]);case 3:En.sent(),En.label=4;case 4:return $t=Tt.next(),[3,2];case 5:return[3,8];case 6:return Vt=En.sent(),Pe={error:Vt},[3,8];case 7:try{$t&&!$t.done&&(ke=Tt.return)&&ke.call(Tt)}finally{if(Pe)throw Pe.error}return[7];case 8:return[3,17];case 9:se=-1,En.label=10;case 10:En.trys.push([10,15,16,17]),Wt=r.__values(vt),ne=Wt.next(),En.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:En.sent(),En.label=13;case 13:return ne=Wt.next(),[3,11];case 14:return[3,17];case 15:return ge=En.sent(),Ae={error:ge},[3,17];case 16:try{ne&&!ne.done&&(tn=Wt.return)&&tn.call(Wt)}finally{if(Ae)throw Ae.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 Tt,$t,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(tn){Tt={error:tn}}finally{try{ae&&!ae.done&&($t=ne.return)&&$t.call(ne)}finally{if(Tt)throw Tt.error}}else{var Pe=-1;try{for(var ke=r.__values(vt),Ae=ke.next();!Ae.done;Ae=ke.next()){var ge=Ae.value;(ge=Ct(ge,++Pe,vt))!=null&&(ge=+ge)>=ge&&++Wt}}catch(tn){Vt={error:tn}}finally{try{Ae&&!Ae.done&&(se=ke.return)&&se.call(ke)}finally{if(Vt)throw Vt.error}}}return Wt}function m(vt){return vt.length|0}function y(vt){return!(vt>0)}function E(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 Tt,$t,Vt,se,Wt=0,ne,ae=0,ge=0;if(Ct===void 0)try{for(var Pe=r.__values(vt),ke=Pe.next();!ke.done;ke=Pe.next()){var Ae=ke.value;Ae!=null&&(Ae=+Ae)>=Ae&&(ne=Ae-ae,ae+=ne/++Wt,ge+=ne*(Ae-ae))}}catch(fr){Tt={error:fr}}finally{try{ke&&!ke.done&&($t=Pe.return)&&$t.call(Pe)}finally{if(Tt)throw Tt.error}}else{var tn=-1;try{for(var En=r.__values(vt),Qn=En.next();!Qn.done;Qn=En.next()){var Ae=Qn.value;(Ae=Ct(Ae,++tn,vt))!=null&&(Ae=+Ae)>=Ae&&(ne=Ae-ae,ae+=ne/++Wt,ge+=ne*(Ae-ae))}}catch(fr){Vt={error:fr}}finally{try{Qn&&!Qn.done&&(se=En.return)&&se.call(En)}finally{if(Vt)throw Vt.error}}}if(Wt>1)return ge/(Wt-1)}function F(vt,Ct){var Tt=C(vt,Ct);return Tt&&Math.sqrt(Tt)}function k(vt,Ct){var Tt,$t,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[--Tt];Tt>0&&($t=Wt,Vt=Ct[--Tt],Wt=$t+Vt,se=Vt-(Wt-$t),!se););Tt>0&&(se<0&&Ct[Tt-1]<0||se>0&&Ct[Tt-1]>0)&&(Vt=se*2,$t=Wt+Vt,Vt==$t-Wt&&(Wt=$t))}return Wt},vt}();function V(vt,Ct){var Tt,$t,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(tn){Tt={error:tn}}finally{try{ae&&!ae.done&&($t=ne.return)&&$t.call(ne)}finally{if(Tt)throw Tt.error}}else{var Pe=-1;try{for(var ke=r.__values(vt),Ae=ke.next();!Ae.done;Ae=ke.next()){var ge=Ae.value;(ge=+Ct(ge,++Pe,vt))&&Wt.add(ge)}}catch(tn){Vt={error:tn}}finally{try{Ae&&!Ae.done&&(se=ke.return)&&se.call(ke)}finally{if(Vt)throw Vt.error}}}return+Wt}var st=function(vt){r.__extends(Ct,vt);function Ct(Tt,$t){var Vt,se;Tt===void 0&&(Tt=[]),$t===void 0&&($t=ht);var Wt=vt.call(this)||this;Object.defineProperties(Wt,{_intern:{value:new Map},_key:{value:$t}});try{for(var ne=r.__values(Tt),ae=ne.next();!ae.done;ae=ne.next()){var ge=r.__read(ae.value,2),Pe=ge[0],ke=ge[1];Wt.set(Pe,ke)}}catch(Ae){Vt={error:Ae}}finally{try{ae&&!ae.done&&(se=ne.return)&&se.call(ne)}finally{if(Vt)throw Vt.error}}return Wt}return Ct.prototype.get=function(Tt){return vt.prototype.get.call(this,Q(this,Tt))},Ct.prototype.has=function(Tt){return vt.prototype.has.call(this,Q(this,Tt))},Ct.prototype.set=function(Tt,$t){return vt.prototype.set.call(this,it(this,Tt),$t)},Ct.prototype.delete=function(Tt){return vt.prototype.delete.call(this,Pt(this,Tt))},Ct}(Map),yt=function(vt){r.__extends(Ct,vt);function Ct(Tt,$t){var Vt,se;Tt===void 0&&(Tt=[]),$t===void 0&&($t=ht);var Wt=vt.call(this)||this;Object.defineProperties(Wt,{_intern:{value:new Map},_key:{value:$t}});try{for(var ne=r.__values(Tt),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(Tt){return vt.prototype.has.call(this,Q(this,Tt))},Ct.prototype.add=function(Tt){return vt.prototype.add.call(this,it(this,Tt))},Ct.prototype.delete=function(Tt){return vt.prototype.delete.call(this,Pt(this,Tt))},Ct}(Set);function Q(vt,Ct){var Tt=vt._intern,$t=vt._key,Vt=$t(Ct);return Tt.has(Vt)?Tt.get(Vt):Ct}function it(vt,Ct){var Tt=vt._intern,$t=vt._key,Vt=$t(Ct);return Tt.has(Vt)?Tt.get(Vt):(Tt.set(Vt,Ct),Ct)}function Pt(vt,Ct){var Tt=vt._intern,$t=vt._key,Vt=$t(Ct);return Tt.has(Vt)&&(Ct=Tt.get(Ct),Tt.delete(Vt)),Ct}function ht(vt){return vt!==null&&typeof vt=="object"?vt.valueOf():vt}function lt(vt){return vt}function $(vt){for(var Ct=[],Tt=1;Tt=$t.length)return Tt(se);var ke=new st,Ae=$t[Wt++],tn=-1;try{for(var En=r.__values(se),Qn=En.next();!Qn.done;Qn=En.next()){var fr=Qn.value,cr=Ae(fr,++tn,se),xr=ke.get(cr);xr?xr.push(fr):ke.set(cr,[fr])}}catch(ji){ne={error:ji}}finally{try{Qn&&!Qn.done&&(ae=En.return)&&ae.call(En)}finally{if(ne)throw ne.error}}try{for(var Qr=r.__values(ke),vi=Qr.next();!vi.done;vi=Qr.next()){var gi=r.__read(vi.value,2),cr=gi[0],fa=gi[1];ke.set(cr,Vt(fa,Wt))}}catch(ji){ge={error:ji}}finally{try{vi&&!vi.done&&(Pe=Qr.return)&&Pe.call(Qr)}finally{if(ge)throw ge.error}}return Ct(ke)}(vt,0)}function Fe(vt,Ct){return Array.from(Ct,function(Tt){return vt[Tt]})}function ft(vt){for(var Ct=[],Tt=1;Tt1){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 ke=r.__values(Ct),Ae=ke.next();!Ae.done;Ae=ke.next()){var tn=Ae.value,En=s(tn[ne],tn[ae]);if(En)return En}}catch(Qn){ge={error:Qn}}finally{try{Ae&&!Ae.done&&(Pe=ke.return)&&Pe.call(ke)}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,Tt){return(Ct.length===1?ft(Gt(vt,Ct,Tt),function($t,Vt){var se=r.__read($t,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($(vt,Tt),function($t,Vt){var se=r.__read($t,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($t){var Vt=r.__read($t,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,Tt){var $t,Vt=-1,se,Wt,ne;if(Ct=+Ct,vt=+vt,Tt=+Tt,vt===Ct&&Tt>0)return[vt];if(($t=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,Tt){var $t=Math.abs(Ct-vt)/Math.max(0,Tt),Vt=Math.pow(10,Math.floor(Math.log($t)/Math.LN10)),se=$t/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),$t=Vt}}function T(vt){return Math.ceil(Math.log(p(vt))/Math.LN2)+1}function z(){var vt=lt,Ct=k,Tt=T;function $t(Vt){var se;Array.isArray(Vt)||(Vt=Array.from(Vt));var Wt,ne=Vt.length,ae,ge=new Array(ne);for(Wt=0;Wt=Ae)if(En>=Ae&&Ct===k){var fr=mt(ke,Ae,Qn);isFinite(fr)&&(fr>0?Ae=(Math.floor(Ae/fr)+1)*fr:fr<0&&(Ae=(Math.ceil(Ae*-fr)+1)/-fr))}else tn.pop()}for(var cr=tn.length;tn[0]<=ke;)tn.shift(),--cr;for(;tn[cr-1]>Ae;)tn.pop(),--cr;var xr=new Array(cr+1),Qr;for(Wt=0;Wt<=cr;++Wt)Qr=xr[Wt]=[],Qr.x0=Wt>0?tn[Wt-1]:ke,Qr.x1=Wt=ge)&&(Wt=ge)}}catch(tn){Tt={error:tn}}finally{try{ae&&!ae.done&&($t=ne.return)&&$t.call(ne)}finally{if(Tt)throw Tt.error}}else{var Pe=-1;try{for(var ke=r.__values(vt),Ae=ke.next();!Ae.done;Ae=ke.next()){var ge=Ae.value;(ge=Ct(ge,++Pe,vt))!=null&&(Wt=ge)&&(Wt=ge)}}catch(tn){Vt={error:tn}}finally{try{Ae&&!Ae.done&&(se=ke.return)&&se.call(ke)}finally{if(Vt)throw Vt.error}}}return Wt}function pt(vt,Ct){var Tt,$t,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(tn){Tt={error:tn}}finally{try{ae&&!ae.done&&($t=ne.return)&&$t.call(ne)}finally{if(Tt)throw Tt.error}}else{var Pe=-1;try{for(var ke=r.__values(vt),Ae=ke.next();!Ae.done;Ae=ke.next()){var ge=Ae.value;(ge=Ct(ge,++Pe,vt))!=null&&(Wt>ge||Wt===void 0&&ge>=ge)&&(Wt=ge)}}catch(tn){Vt={error:tn}}finally{try{Ae&&!Ae.done&&(se=ke.return)&&se.call(ke)}finally{if(Vt)throw Vt.error}}}return Wt}function It(vt,Ct,Tt,$t,Vt){for(Tt===void 0&&(Tt=0),$t===void 0&&($t=vt.length-1),Vt===void 0&&(Vt=s);$t>Tt;){if($t-Tt>600){var se=$t-Tt+1,Wt=Ct-Tt+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(Tt,Math.floor(Ct-Wt*ae/se+ge)),ke=Math.min($t,Math.floor(Ct+(se-Wt)*ae/se+ge));It(vt,Ct,Pe,ke,Vt)}var Ae=vt[Ct],tn=Tt,En=$t;for(Zt(vt,Tt,Ct),Vt(vt[$t],Ae)>0&&Zt(vt,Tt,$t);tn0;)--En}Vt(vt[Tt],Ae)===0?Zt(vt,Tt,En):(++En,Zt(vt,En,$t)),En<=Ct&&(Tt=En+1),Ct<=En&&($t=En-1)}return vt}function Zt(vt,Ct,Tt){var $t=vt[Ct];vt[Ct]=vt[Tt],vt[Tt]=$t}function Lt(vt,Ct,Tt){if(vt=Float64Array.from(f(vt,Tt)),!!($t=vt.length)){if((Ct=+Ct)<=0||$t<2)return pt(vt);if(Ct>=1)return J(vt);var $t,Vt=($t-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,Tt){if(Tt===void 0&&(Tt=c),!!($t=vt.length)){if((Ct=+Ct)<=0||$t<2)return+Tt(vt[0],0,vt);if(Ct>=1)return+Tt(vt[$t-1],$t-1,vt);var $t,Vt=($t-1)*Ct,se=Math.floor(Vt),Wt=+Tt(vt[se],se,vt),ne=+Tt(vt[se+1],se+1,vt);return Wt+(ne-Wt)*(Vt-se)}}function Se(vt,Ct,Tt){return Math.ceil((Tt-Ct)/(2*(Lt(vt,.75)-Lt(vt,.25))*Math.pow(p(vt),-1/3)))}function $e(vt,Ct,Tt){return Math.ceil((Tt-Ct)/(3.5*F(vt)*Math.pow(p(vt),-1/3)))}function fn(vt,Ct){var Tt,$t,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 ke=Pe.value;++ae,ke!=null&&(Wt=ke)&&(Wt=ke,ne=ae)}}catch(En){Tt={error:En}}finally{try{Pe&&!Pe.done&&($t=ge.return)&&$t.call(ge)}finally{if(Tt)throw Tt.error}}else try{for(var Ae=r.__values(vt),tn=Ae.next();!tn.done;tn=Ae.next()){var ke=tn.value;(ke=Ct(ke,++ae,vt))!=null&&(Wt=ke)&&(Wt=ke,ne=ae)}}catch(En){Vt={error:En}}finally{try{tn&&!tn.done&&(se=Ae.return)&&se.call(Ae)}finally{if(Vt)throw Vt.error}}return ne}function on(vt,Ct){var Tt,$t,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(En){Tt={error:En}}finally{try{ge&&!ge.done&&($t=ae.return)&&$t.call(ae)}finally{if(Tt)throw Tt.error}}else{var ke=-1;try{for(var Ae=r.__values(vt),tn=Ae.next();!tn.done;tn=Ae.next()){var Pe=tn.value;(Pe=Ct(Pe,++ke,vt))!=null&&(Pe=+Pe)>=Pe&&(++Wt,ne+=Pe)}}catch(En){Vt={error:En}}finally{try{tn&&!tn.done&&(se=Ae.return)&&se.call(Ae)}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,Tt,$t,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),Tt=Ct.next(),ne.label=1;case 1:return Tt.done?[3,4]:($t=Tt.value,[5,r.__values($t)]);case 2:ne.sent(),ne.label=3;case 3:return Tt=Ct.next(),[3,1];case 4:return[3,7];case 5:return Vt=ne.sent(),se={error:Vt},[3,7];case 6:try{Tt&&!Tt.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 Tt,$t,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 ke=Pe.value;++ae,ke!=null&&(Wt>ke||Wt===void 0&&ke>=ke)&&(Wt=ke,ne=ae)}}catch(En){Tt={error:En}}finally{try{Pe&&!Pe.done&&($t=ge.return)&&$t.call(ge)}finally{if(Tt)throw Tt.error}}else try{for(var Ae=r.__values(vt),tn=Ae.next();!tn.done;tn=Ae.next()){var ke=tn.value;(ke=Ct(ke,++ae,vt))!=null&&(Wt>ke||Wt===void 0&&ke>=ke)&&(Wt=ke,ne=ae)}}catch(En){Vt={error:En}}finally{try{tn&&!tn.done&&(se=Ae.return)&&se.call(Ae)}finally{if(Vt)throw Vt.error}}return ne}function Tn(vt,Ct){var Tt,$t;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){Tt={error:Pe}}finally{try{ae&&!ae.done&&($t=ne.return)&&$t.call(ne)}finally{if(Tt)throw Tt.error}}return Vt}function Dn(vt,Ct){return[vt,Ct]}function Ht(vt,Ct,Tt){vt=+vt,Ct=+Ct,Tt=(Vt=arguments.length)<2?(Ct=vt,vt=0,1):Vt<3?1:+Tt;for(var $t=-1,Vt=Math.max(0,Math.ceil((Ct-vt)/Tt))|0,se=new Array(Vt);++$t0:s(Ae,Ae)===0)&&(Wt=ke,ae=Ae,ne=!0)}}catch(Qn){Tt={error:Qn}}finally{try{Pe&&!Pe.done&&($t=ge.return)&&$t.call(ge)}finally{if(Tt)throw Tt.error}}}else try{for(var tn=r.__values(vt),En=tn.next();!En.done;En=tn.next()){var Ae=En.value;(ne?Ct(Ae,Wt)>0:Ct(Ae,Ae)===0)&&(Wt=Ae,ne=!0)}}catch(Qn){Vt={error:Qn}}finally{try{En&&!En.done&&(se=tn.return)&&se.call(tn)}finally{if(Vt)throw Vt.error}}return Wt}function Ge(vt,Ct){var Tt,$t;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){Tt={error:Pe}}finally{try{ae&&!ae.done&&($t=ne.return)&&$t.call(ne)}finally{if(Tt)throw Tt.error}}return se}function Fn(vt,Ct){var Tt=oe(vt,Ct);return Tt<0?void 0:Tt}var Pr=pr(Math.random);function pr(vt){return function(Tt,$t,Vt){$t===void 0&&($t=0),Vt===void 0&&(Vt=Tt.length);for(var se=Vt-($t=+$t);se;){var Wt=vt()*se--|0,ne=Tt[se+$t];Tt[se+$t]=Tt[Wt+$t],Tt[Wt+$t]=ne}return Tt}}function Lr(vt,Ct){var Tt,$t,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(tn){Tt={error:tn}}finally{try{ae&&!ae.done&&($t=ne.return)&&$t.call(ne)}finally{if(Tt)throw Tt.error}}else{var Pe=-1;try{for(var ke=r.__values(vt),Ae=ke.next();!Ae.done;Ae=ke.next()){var ge=Ae.value;(ge=+Ct(ge,++Pe,vt))&&(Wt+=ge)}}catch(tn){Vt={error:tn}}finally{try{Ae&&!Ae.done&&(se=ke.return)&&se.call(ke)}finally{if(Vt)throw Vt.error}}}return Wt}function sr(vt){if(!(se=vt.length))return[];for(var Ct=-1,Tt=pt(vt,Ft),$t=new Array(Tt);++Ct=x.length)return _!=null&&j.sort(_),D!=null?D(j):j;for(var Q=-1,it=j.length,Pt=x[V++],ht,lt,$=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 E(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(T)},S.stream=function(T){return ft&>===T?ft:ft=E([P.stream(gt=T),H.stream(T),at.stream(T)])},S.precision=function(T){return arguments.length?(P.precision(T),H.precision(T),at.precision(T),R()):P.precision()},S.scale=function(T){return arguments.length?(P.scale(T),H.scale(T*.35),at.scale(T),S.translate(P.translate())):P.scale()},S.translate=function(T){if(!arguments.length)return P.translate();var z=P.scale(),J=+T[0],pt=+T[1];return Kt=P.translate(T).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),R()},S.fitExtent=function(T,z){return m(S,T,z)},S.fitSize=function(T,z){return y(S,T,z)};function R(){return ft=gt=null,S}return S.drawCompositionBorders=function(T){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]);T.moveTo(z[0],z[1]),T.lineTo(J[0],J[1]),T.lineTo(pt[0],pt[1]),T.lineTo(It[0],It[1]),T.moveTo(Zt[0],Zt[1]),T.lineTo(Lt[0],Lt[1]),T.lineTo(Yt[0],Yt[1]),T.lineTo(Se[0],Se[1])},S.getCompositionBorders=function(){var T=l.path();return this.drawCompositionBorders(T),T.toString()},S.scale(1070)}function M(ft){var gt=ft.length;return{point:function(P,Kt){for(var H=-1;++H=.12&&fn<.234&&$e>=-.425&&$e<-.214?H:fn>=.166&&fn<.234&&$e>=-.214&&$e<-.115?at:fn>=.2064&&fn<.2413&&$e>=.312&&$e<.385?Z:fn>=.09&&fn<.1197&&$e>=-.4243&&$e<-.3232?S:fn>=-.0518&&fn<.0895&&$e>=-.4243&&$e<-.3824?T: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),T.stream(Lt)])},It.precision=function(Lt){return arguments.length?(P.precision(Lt),H.precision(Lt),at.precision(Lt),Z.precision(Lt),S.precision(Lt),T.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),T.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],$e=+Lt[1];return Kt=P.translate(Lt).clipExtent([[Se-.455*Yt,$e-.238*Yt],[Se+.455*Yt,$e+.238*Yt]]).stream(pt),ot=H.translate([Se-.307*Yt,$e+.201*Yt]).clipExtent([[Se-.425*Yt+u,$e+.12*Yt+u],[Se-.214*Yt-u,$e+.233*Yt-u]]).stream(pt),dt=at.translate([Se-.205*Yt,$e+.212*Yt]).clipExtent([[Se-.214*Yt+u,$e+.166*Yt+u],[Se-.115*Yt-u,$e+.233*Yt-u]]).stream(pt),mt=Z.translate([Se+.35*Yt,$e+.224*Yt]).clipExtent([[Se+.312*Yt+u,$e+.2064*Yt+u],[Se+.385*Yt-u,$e+.233*Yt-u]]).stream(pt),R=S.translate([Se-.492*Yt,$e+.09*Yt]).clipExtent([[Se-.4243*Yt+u,$e+.0903*Yt+u],[Se-.3233*Yt-u,$e+.1197*Yt-u]]).stream(pt),z=T.translate([Se-.408*Yt,$e+.018*Yt]).clipExtent([[Se-.4244*Yt+u,$e-.0519*Yt+u],[Se-.3824*Yt-u,$e+.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]),$e=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]),Tn=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]),Ge=P([-124.4369,28.169]),Fn=P([-128.1314,37.4582]),Pr=P([-125.2132,38.214]),pr=P([-122.3616,30.5115]),Lr=P([-125.0315,29.8211]);Lt.moveTo(Yt[0],Yt[1]),Lt.lineTo(Se[0],Se[1]),Lt.lineTo($e[0],$e[1]),Lt.lineTo($e[0],$e[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(Tn[0],Tn[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(Ge[0],Ge[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(Lr[0],Lr[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 R=P.scale(),T=+S[0],z=+S[1];return Kt=P.translate(S).clipExtent([[T-.06857*R,z-.1288*R],[T+.13249*R,z+.06*R]]).stream(dt),ot=H.translate([T+.1*R,z-.094*R]).clipExtent([[T-.1331*R+u,z+.053457*R+u],[T-.0354*R-u,z+.08969*R-u]]).stream(dt),mt()},Z.fitExtent=function(S,R){return m(Z,S,R)},Z.fitSize=function(S,R){return y(Z,S,R)};function mt(){return ft=gt=null,Z}return Z.drawCompositionBorders=function(S){var R=P([-14.034675,34.965007]),T=P([-7.4208899,35.536988]),z=P([-7.3148275,33.54359]);S.moveTo(R[0],R[1]),S.lineTo(T[0],T[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(T)},S.stream=function(T){return ft&>===T?ft:ft=F([P.stream(gt=T),H.stream(T),at.stream(T)])},S.precision=function(T){return arguments.length?(P.precision(T),H.precision(T),at.precision(T),R()):P.precision()},S.scale=function(T){return arguments.length?(P.scale(T),H.scale(T),at.scale(T*.6),S.translate(P.translate())):P.scale()},S.translate=function(T){if(!arguments.length)return P.translate();var z=P.scale(),J=+T[0],pt=+T[1];return Kt=P.translate(T).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),R()},S.fitExtent=function(T,z){return m(S,T,z)},S.fitSize=function(T,z){return y(S,T,z)};function R(){return ft=gt=null,S}return S.drawCompositionBorders=function(T){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]);T.moveTo(z[0],z[1]),T.lineTo(J[0],J[1]),T.lineTo(pt[0],pt[1]),T.lineTo(pt[0],pt[1]),T.lineTo(It[0],It[1]),T.closePath(),T.moveTo(Zt[0],Zt[1]),T.lineTo(Lt[0],Lt[1]),T.lineTo(Yt[0],Yt[1]),T.lineTo(Yt[0],Yt[1]),T.lineTo(Se[0],Se[1]),T.closePath()},S.getCompositionBorders=function(){var T=l.path();return this.drawCompositionBorders(T),T.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 R=P.scale(),T=+S[0],z=+S[1];return Kt=P.translate(S).clipExtent([[T-.0262*R,z-.0734*R],[T+.1741*R,z+.079*R]]).stream(dt),ot=H.translate([T-.06*R,z-.04*R]).clipExtent([[T-.0857*R+u,z-.0676*R+u],[T-.0263*R-u,z-.026*R-u]]).stream(dt),mt()},Z.fitExtent=function(S,R){return m(Z,S,R)},Z.fitSize=function(S,R){return y(Z,S,R)};function mt(){return ft=gt=null,Z}return Z.drawCompositionBorders=function(S){var R=P([-84.9032,2.3757]),T=P([-81.5047,2.3708]),z=P([-81.5063,-.01]),J=P([-84.9086,-.005]);S.moveTo(R[0],R[1]),S.lineTo(T[0],T[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)},T.stream=function(J){return ft&>===J?ft:ft=st([P.stream(gt=J),H.stream(J),at.stream(J),Z.stream(J)])},T.precision=function(J){return arguments.length?(P.precision(J),H.precision(J),at.precision(J),Z.precision(J),z()):P.precision()},T.scale=function(J){return arguments.length?(P.scale(J),H.scale(J*.15),at.scale(J*1.5),Z.scale(J*1.5),T.translate(P.translate())):P.scale()},T.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(R),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(R),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(R),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(R),z()},T.fitExtent=function(J,pt){return m(T,J,pt)},T.fitSize=function(J,pt){return y(T,J,pt)};function z(){return ft=gt=null,T}return T.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]),$e=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($e[0],$e[1]),J.lineTo($e[0],$e[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()},T.getCompositionBorders=function(){var J=l.path();return this.drawCompositionBorders(J),J.toString()},T.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(T)},S.stream=function(T){return ft&>===T?ft:ft=Q([P.stream(gt=T),H.stream(T),at.stream(T)])},S.precision=function(T){return arguments.length?(P.precision(T),H.precision(T),at.precision(T),R()):P.precision()},S.scale=function(T){return arguments.length?(P.scale(T),H.scale(T),at.scale(T*.7),S.translate(P.translate())):P.scale()},S.translate=function(T){if(!arguments.length)return P.translate();var z=P.scale(),J=+T[0],pt=+T[1];return Kt=P.translate(T).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(T).clipExtent([[J-.0399*z+u,pt+.0471*z+u],[J+.051*z-u,pt+.1114*z-u]]).stream(mt),R()},S.fitExtent=function(T,z){return m(S,T,z)},S.fitSize=function(T,z){return y(S,T,z)};function R(){return ft=gt=null,S}return S.drawCompositionBorders=function(T){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]);T.moveTo(z[0],z[1]),T.lineTo(J[0],J[1]),T.lineTo(pt[0],pt[1]),T.lineTo(It[0],It[1]),T.closePath(),T.moveTo(Zt[0],Zt[1]),T.lineTo(Lt[0],Lt[1]),T.lineTo(Yt[0],Yt[1]),T.lineTo(Se[0],Se[1])},S.getCompositionBorders=function(){var T=l.path();return this.drawCompositionBorders(T),T.toString()},S.scale(2200)}function Pt(ft){var gt=ft.length;return{point:function(P,Kt){for(var H=-1;++H=.029&&Ge<.0864&&fe>=-.14&&fe<-.0996?H:Ge>=0&&Ge<.029&&fe>=-.14&&fe<-.0996?at:Ge>=-.032&&Ge<0&&fe>=-.14&&fe<-.0996?Z:Ge>=-.052&&Ge<-.032&&fe>=-.14&&fe<-.0996?S:Ge>=-.076&&Ge<.052&&fe>=-.14&&fe<-.0996?T:Ge>=-.076&&Ge<-.052&&fe>=.0967&&fe<.1371?J:Ge>=-.052&&Ge<-.02&&fe>=.0967&&fe<.1371?It:Ge>=-.02&&Ge<.012&&fe>=.0967&&fe<.1371?Lt:Ge>=.012&&Ge<.033&&fe>=.0967&&fe<.1371?Se:Ge>=.033&&Ge<.0864&&fe>=.0967&&fe<.1371?fn:P).invert(Ht)},Tn.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),T.stream(Ht),J.stream(Ht),It.stream(Ht),Lt.stream(Ht),Se.stream(Ht),fn.stream(Ht),mn.stream(Ht)])},Tn.precision=function(Ht){return arguments.length?(P.precision(Ht),H.precision(Ht),at.precision(Ht),Z.precision(Ht),S.precision(Ht),T.precision(Ht),J.precision(Ht),It.precision(Ht),Lt.precision(Ht),Se.precision(Ht),fn.precision(Ht),mn.precision(Ht),Dn()):P.precision()},Tn.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),T.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),Tn.translate(P.translate())):P.scale()},Tn.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),R=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=T.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),$e=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()},Tn.fitExtent=function(Ht,kt){return m(Tn,Ht,kt)},Tn.fitSize=function(Ht,kt){return y(Tn,Ht,kt)};function Dn(){return ft=gt=null,Tn}return Tn.drawCompositionBorders=function(Ht){var kt,oe,fe,Ge;kt=P([-7.938886725111036,43.7219460918835]),oe=P([-4.832080896458295,44.12930268549372]),fe=P([-4.205299743793263,40.98096346967365]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([-8.42751373617692,45.32889452553031]),oe=P([-5.18599305777107,45.7566442062976]),fe=P([-4.832080905154431,44.129302726751426]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([-9.012656899657046,47.127733821030176]),oe=P([-5.6105244772793155,47.579777861410626]),fe=P([-5.185993067168585,45.756644248170346]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([-9.405747558985553,48.26506375557457]),oe=P([-5.896175018439575,48.733352850851624]),fe=P([-5.610524487556043,47.57977790393761]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([-9.908436061346974,49.642448789505856]),oe=P([-6.262026716233124,50.131426841787174]),fe=P([-5.896175029331232,48.73335289377258]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([11.996907706504462,50.16039028163579]),oe=P([15.649907879773343,49.68279246765253]),fe=P([15.156712840526632,48.30371557625831]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([11.641226606955788,48.7610781975889]),oe=P([15.156712825832164,48.30371553390465]),fe=P([14.549932166241172,46.4866532486199]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([11.204443778297161,46.918992296823646]),oe=P([14.549932152815039,46.486653206856396]),fe=P([13.994409796764009,44.695833444323256]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([10.805306590412085,45.10513382903308]),oe=P([13.99440978444733,44.695833403183606]),fe=P([13.654633799024392,43.53552468558152]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([10.561516795617383,43.93067141859757]),oe=P([13.654633787361952,43.5355246448671]),fe=P([12.867691604239901,40.640701985019405]),Ge=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(Ge[0],Ge[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])},Tn.getCompositionBorders=function(){var Ht=l.path();return this.drawCompositionBorders(Ht),Ht.toString()},Tn.scale(2700)}function lt(ft){var gt=ft.length;return{point:function(P,Kt){for(var H=-1;++H=-.31&&Ge<-.24&&fe>=.14&&fe<.24?H:Ge>=-.24&&Ge<-.17&&fe>=.14&&fe<.24?at:Ge>=-.17&&Ge<-.12&&fe>=.21&&fe<.24?S:Ge>=-.17&&Ge<-.14&&fe>=.14&&fe<.165?T:Ge>=-.17&&Ge<-.1&&fe>=.14&&fe<.24?Z:Ge>=-.1&&Ge<-.03&&fe>=.14&&fe<.24?J:Ge>=-.03&&Ge<.04&&fe>=.14&&fe<.24?It:Ge>=-.31&&Ge<-.24&&fe>=.24&&fe<.34?Lt:Ge>=-.24&&Ge<-.17&&fe>=.24&&fe<.34?Se:Ge>=-.17&&Ge<-.1&&fe>=.24&&fe<.34?fn:Ge>=-.1&&Ge<-.03&&fe>=.24&&fe<.34?mn:P).invert(Ht)},Tn.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),T.stream(Ht)])},Tn.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),T.precision(Ht),Dn()):P.precision()},Tn.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),T.scale(Ht*2),J.scale(Ht*3),It.scale(Ht),Se.scale(Ht*5.5),mn.scale(Ht*6),Tn.translate(P.translate())):P.scale()},Tn.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),R=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=T.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),$e=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()},Tn.fitExtent=function(Ht,kt){return m(Tn,Ht,kt)},Tn.fitSize=function(Ht,kt){return y(Tn,Ht,kt)};function Dn(){return ft=gt=null,Tn}return Tn.drawCompositionBorders=function(Ht){var kt,oe,fe,Ge;kt=P([42.45755610828648,63.343658547914934]),oe=P([52.65837266667029,59.35045080290929]),fe=P([47.19754502247785,56.12653496548117]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([59.41110754003403,62.35069727399336]),oe=P([66.75050228640794,57.11797303636038]),fe=P([60.236065725110436,54.63331433818992]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([48.81091130080243,66.93353402634641]),oe=P([59.41110730654679,62.35069740653086]),fe=P([52.6583728974441,59.3504509222445]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([31.054198418446475,52.1080673766184]),oe=P([39.09869284884117,49.400700047190554]),fe=P([36.0580811499175,46.02944174908498]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([33.977877745912025,55.849945501331]),oe=P([42.75328432167726,52.78455122462353]),fe=P([39.09869297540224,49.400700176148625]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([52.658372900759296,59.35045068526415]),oe=P([60.23606549583304,54.63331423800264]),fe=P([54.6756370953122,51.892298789399455]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([47.19754506082455,56.126534735591456]),oe=P([54.675636900123514,51.892298681337095]),fe=P([49.94448648951486,48.98775484983285]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([42.75328453416769,52.78455113209101]),oe=P([49.94448632339758,48.98775473706457]),fe=P([45.912339990394315,45.99361784987003]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([37.673034114296634,59.61638254183119]),oe=P([47.197544835420544,56.126534839849846]),fe=P([42.75328447467064,52.78455135314068]),Ge=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(Ge[0],Ge[1]),Ht.closePath(),kt=P([44.56748486446032,57.26489367845818]),fe=P([43.9335791193588,53.746540942601726]),Ge=P([43,56]),Ht.moveTo(kt[0],kt[1]),Ht.lineTo(oe[0],oe[1]),Ht.lineTo(fe[0],fe[1]),Ht.lineTo(Ge[0],Ge[1]),Ht.closePath(),kt=P([37.673034114296634,59.61638254183119]),oe=P([40.25902691953466,58.83002044222639]),fe=P([38.458270492742024,57.26232178028002]),Ge=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(Ge[0],Ge[1]),Ht.closePath()},Tn.getCompositionBorders=function(){var Ht=l.path();return this.drawCompositionBorders(Ht),Ht.toString()},Tn.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(T)},S.stream=function(T){return ft&>===T?ft:ft=xt([P.stream(gt=T),H.stream(T),at.stream(T)])},S.precision=function(T){return arguments.length?(P.precision(T),H.precision(T),at.precision(T),R()):P.precision()},S.scale=function(T){return arguments.length?(P.scale(T),H.scale(T),at.scale(T),S.translate(P.translate())):P.scale()},S.translate=function(T){if(!arguments.length)return P.translate();var z=P.scale(),J=+T[0],pt=+T[1];return Kt=P.translate(T).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),R()},S.fitExtent=function(T,z){return m(S,T,z)},S.fitSize=function(T,z){return y(S,T,z)};function R(){return ft=gt=null,S}return S.drawCompositionBorders=function(T){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]);T.moveTo(z[0],z[1]),T.lineTo(J[0],J[1]),T.lineTo(pt[0],pt[1]),T.lineTo(pt[0],pt[1]),T.lineTo(It[0],It[1]),T.closePath(),T.moveTo(Zt[0],Zt[1]),T.lineTo(Lt[0],Lt[1]),T.lineTo(Yt[0],Yt[1]),T.lineTo(Yt[0],Yt[1]),T.lineTo(Se[0],Se[1]),T.closePath()},S.getCompositionBorders=function(){var T=l.path();return this.drawCompositionBorders(T),T.toString()},S.scale(4200)}function Rt(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=Rt([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 R=P.scale(),T=+S[0],z=+S[1];return Kt=P.translate(S).clipExtent([[T-.11*R,z-.0521*R],[T-.0111*R,z+.0521*R]]).stream(dt),ot=H.translate([T+.09*R,z-0*R]).clipExtent([[T-.0111*R+u,z-.0521*R+u],[T+.1*R-u,z+.024*R-u]]).stream(dt),mt()},Z.fitExtent=function(S,R){return m(Z,S,R)},Z.fitSize=function(S,R){return y(Z,S,R)};function mt(){return ft=gt=null,Z}return Z.drawCompositionBorders=function(S){var R=P([106.3214,2.0228]),T=P([105.1843,2.3761]),z=P([104.2151,3.3618]),J=P([104.215,4.5651]);S.moveTo(R[0],R[1]),S.lineTo(T[0],T[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(T)},S.stream=function(T){return ft&>===T?ft:ft=Ie([P.stream(gt=T),H.stream(T),at.stream(T)])},S.precision=function(T){return arguments.length?(P.precision(T),H.precision(T),at.precision(T),R()):P.precision()},S.scale=function(T){return arguments.length?(P.scale(T),H.scale(T*1.5),at.scale(T*4),S.translate(P.translate())):P.scale()},S.translate=function(T){if(!arguments.length)return P.translate();var z=P.scale(),J=+T[0],pt=+T[1];return Kt=P.translate(T).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),R()},S.fitExtent=function(T,z){return m(S,T,z)},S.fitSize=function(T,z){return y(S,T,z)};function R(){return ft=gt=null,S}return S.drawCompositionBorders=function(T){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]),T.moveTo(z[0],z[1]),T.lineTo(J[0],J[1]),T.lineTo(pt[0],pt[1]),T.lineTo(It[0],It[1]),T.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]),T.moveTo(z[0],z[1]),T.lineTo(J[0],J[1]),T.lineTo(pt[0],pt[1]),T.lineTo(It[0],It[1]),T.closePath(),z=P([7.3220147605302905,1.4989168783492766]),J=P([9.213422896481598,1.499981240979021]),pt=P([9.213572912999604,.354142056817247]),It=P([7.323154615739809,.353078251154504]),T.moveTo(z[0],z[1]),T.lineTo(J[0],J[1]),T.lineTo(pt[0],pt[1]),T.lineTo(It[0],It[1]),T.closePath()},S.getCompositionBorders=function(){var T=l.path();return this.drawCompositionBorders(T),T.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 R=P.scale(),T=+S[0],z=+S[1];return Kt=P.translate(S).clipExtent([[T-.065*R,z-.089*R],[T+.075*R,z+.089*R]]).stream(dt),ot=H.translate([T+.01*R,z+.025*R]).clipExtent([[T+.029*R+u,z-.089*R+u],[T+.046*R-u,z-.06*R-u]]).stream(dt),mt()},Z.fitExtent=function(S,R){return m(Z,S,R)},Z.fitSize=function(S,R){return y(Z,S,R)};function mt(){return ft=gt=null,Z}return Z.drawCompositionBorders=function(S){var R,T,z,J;R=P([-1.113205870242365,59.64920050773357]),T=P([.807899092399606,59.59085836472269]),z=P([.5778611961420386,57.93467822832577]),J=P([-1.25867782078448,57.99029450085142]),S.moveTo(R[0],R[1]),S.lineTo(T[0],T[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=$,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($){return new Function("d","return {"+$.map(function(xt,Gt){return JSON.stringify(xt)+": d["+Gt+'] || ""'}).join(",")+"}")}function h($,xt){var Gt=f($);return function(Rt,Qt){return xt(Gt(Rt),Qt,$)}}function d($){var xt=Object.create(null),Gt=[];return $.forEach(function(Rt){for(var Qt in Rt)Qt in xt||Gt.push(xt[Qt]=Qt)}),Gt}function v($,xt){var Gt=$+"",Rt=Gt.length;return Rt9999?"+"+v($,6):v($,4)}function p($){var xt=$.getUTCHours(),Gt=$.getUTCMinutes(),Rt=$.getUTCSeconds(),Qt=$.getUTCMilliseconds();return isNaN($)?"Invalid Date":g($.getUTCFullYear())+"-"+v($.getUTCMonth()+1,2)+"-"+v($.getUTCDate(),2)+(Qt?"T"+v(xt,2)+":"+v(Gt,2)+":"+v(Rt,2)+"."+v(Qt,3)+"Z":Rt?"T"+v(xt,2)+":"+v(Gt,2)+":"+v(Rt,2)+"Z":Gt||xt?"T"+v(xt,2)+":"+v(Gt,2)+"Z":"")}function m($){var xt=new RegExp('["'+$+` \r]`),Gt=$.charCodeAt(0);function Rt(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 R(){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=$(2),st=$(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 $(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 Rt(b){return(h(b)+h(-b))/2}function Qt(b){return v(b+$(b*b+1))}function Ie(b){return v(b+$(b*b-1))}function _e(b){var A=M(b/2),L=2*v(f(b/2))/(A*A);function B(K,U){var rt=f(K),bt=f(U),_t=x(U),Dt=bt*rt,Xt=-((1-Dt?v((1+Dt)/2)/(1-Dt):-.5)+L/(1+Dt));return[Xt*bt*x(K),Xt*_t]}return B.invert=function(K,U){var rt=$(K*K+U*U),bt=-b/2,_t=50,Dt;if(!rt)return[0,0];do{var Xt=bt/2,re=f(Xt),pe=x(Xt),Ee=M(Xt),Ne=v(1/re);bt-=Dt=(2/Ee*Ne-L*Ee-rt)/(-Ne/(pe*pe)+1-L/(2*re*re))}while(l(Dt)>_&&--_t>0);var qe=x(bt);return[c(K*qe,rt*f(bt)),ht(U*qe/rt)]},B}var Ue=function(){var b=F,A=o.geoProjectionMutator(_e),L=A(b);return L.radius=function(B){return arguments.length?A(b=B*it):b*Q},L.scale(179.976).clipAngle(147)};function Fe(b,A){var L=f(A),B=Pt(lt(L*f(b/=2)));return[2*L*x(b)*B,x(A)*B]}Fe.invert=function(b,A){if(!(b*b+4*A*A>C*C+_)){var L=b,B=A,K=25;do{var U=x(L),rt=x(L/2),bt=f(L/2),_t=x(B),Dt=f(B),Xt=x(2*B),re=_t*_t,pe=Dt*Dt,Ee=rt*rt,Ne=1-pe*bt*bt,qe=Ne?lt(Dt*bt)*$(cn=1/Ne):cn=0,cn,Cn=2*qe*Dt*rt-b,jn=qe*_t-A,Nn=cn*(pe*Ee+qe*Dt*bt*re),Yn=cn*(.5*U*Xt-qe*2*_t*rt),Hn=cn*.25*(Xt*rt-qe*_t*pe*U),yr=cn*(re*bt+qe*Ee*Dt),ai=Yn*Hn-yr*Nn;if(!ai)break;var Ci=(jn*Yn-Cn*yr)/ai,oi=(Cn*Hn-jn*Nn)/ai;L-=Ci,B-=oi}while((l(Ci)>_||l(oi)>_)&&--K>0);return[L,B]}};var ft=function(){return o.geoProjection(Fe).scale(152.63)};function gt(b){var A=x(b),L=f(b),B=b>=0?1:-1,K=M(B*b),U=(1+A-L)/2;function rt(bt,_t){var Dt=f(_t),Xt=f(bt/=2);return[(1+Dt)*x(bt),(B*_t>-c(Xt,K)-.001?0:-B*10)+U+x(_t)*L-(1+Dt)*A*Xt]}return rt.invert=function(bt,_t){var Dt=0,Xt=0,re=50;do{var pe=f(Dt),Ee=x(Dt),Ne=f(Xt),qe=x(Xt),cn=1+Ne,Cn=cn*Ee-bt,jn=U+qe*L-cn*A*pe-_t,Nn=cn*pe/2,Yn=-Ee*qe,Hn=A*cn*Ee/2,yr=L*Ne+A*pe*qe,ai=Yn*Hn-yr*Nn,Ci=(jn*Yn-Cn*yr)/ai/2,oi=(Cn*Hn-jn*Nn)/ai;Dt-=Ci,Xt-=oi}while((l(Ci)>_||l(oi)>_)&&--re>0);return B*Xt>-c(f(Dt),K)-.001?[Dt*2,Xt]:null},rt}var P=function(){var b=20*it,A=b>=0?1:-1,L=M(A*b),B=o.geoProjectionMutator(gt),K=B(b),U=K.stream;return K.parallel=function(rt){return arguments.length?(L=M((A=(b=rt*it)>=0?1:-1)*b),B(b)):b*Q},K.stream=function(rt){var bt=K.rotate(),_t=U(rt),Dt=(K.rotate([0,0]),U(rt));return K.rotate(bt),_t.sphere=function(){Dt.polygonStart(),Dt.lineStart();for(var Xt=A*-180;A*Xt<180;Xt+=A*90)Dt.point(Xt,A*90);for(;A*(Xt-=b)>=-180;)Dt.point(Xt,A*-c(f(Xt*it/2),L)*Q);Dt.lineEnd(),Dt.polygonEnd()},_t},K.scale(218.695).center([0,28.0974])};function Kt(b,A){var L=M(A/2),B=$(1-L*L),K=1+B*f(b/=2),U=x(b)*B/K,rt=L/K,bt=U*U,_t=rt*rt;return[4/3*U*(3+bt-3*_t),4/3*rt*(3+3*bt-_t)]}Kt.invert=function(b,A){if(b*=3/8,A*=3/8,!b&&l(A)>1)return null;var L=b*b,B=A*A,K=1+L+B,U=$((K-$(K*K-4*A*A))/2),rt=ht(U)/3,bt=U?Ie(l(A/U))/3:Qt(l(b))/3,_t=f(rt),Dt=Rt(bt),Xt=Dt*Dt-_t*_t;return[E(b)*2*c(Gt(bt)*_t,.25-Xt),E(A)*2*c(Dt*x(rt),.25+Xt)]};var H=function(){return o.geoProjection(Kt).scale(66.1603)},ot=$(8),at=v(1+V);function dt(b,A){var L=l(A);return LD&&--B>0);return[b/(f(L)*(ot-1/x(L))),E(A)*L]};var Z=function(){return o.geoProjection(dt).scale(112.314)};function mt(b){var A=2*C/b;function L(B,K){var U=o.geoAzimuthalEquidistantRaw(B,K);if(l(B)>F){var rt=c(U[1],U[0]),bt=$(U[0]*U[0]+U[1]*U[1]),_t=A*y((rt-F)/A)+F,Dt=c(x(rt-=_t),2-f(rt));rt=_t+ht(C/bt*x(Dt))-Dt,U[0]=bt*f(rt),U[1]=bt*x(rt)}return U}return L.invert=function(B,K){var U=$(B*B+K*K);if(U>F){var rt=c(K,B),bt=A*y((rt-F)/A)+F,_t=rt>bt?-1:1,Dt=U*f(bt-rt),Xt=1/M(_t*lt((Dt-C)/$(C*(C-2*Dt)+U*U)));rt=bt+2*u((Xt+_t*$(Xt*Xt-3))/3),B=U*f(rt),K=U*x(rt)}return o.geoAzimuthalEquidistantRaw.invert(B,K)},L}var S=function(){var b=5,A=o.geoProjectionMutator(mt),L=A(b),B=L.stream,K=.01,U=-f(K*it),rt=x(K*it);return L.lobes=function(bt){return arguments.length?A(b=+bt):b},L.stream=function(bt){var _t=L.rotate(),Dt=B(bt),Xt=(L.rotate([0,0]),B(bt));return L.rotate(_t),Dt.sphere=function(){Xt.polygonStart(),Xt.lineStart();for(var re=0,pe=360/b,Ee=2*C/b,Ne=90-180/b,qe=F;re_&&--B>0);return A/2}function T(b,A,L){function B(K,U){return[b*K*f(U=R(L,U)),A*x(U)]}return B.invert=function(K,U){return U=ht(U/A),[K/(b*f(U)),ht((2*U+x(2*U))/L)]},B}var z=T(V/F,V,C),J=function(){return o.geoProjection(z).scale(169.529)},pt=2.00276,It=1.11072;function Zt(b,A){var L=R(C,A);return[pt*b/(1/f(A)+It/f(L)),(A+V*x(L))/pt]}Zt.invert=function(b,A){var L=pt*A,B=A<0?-k:k,K=25,U,rt;do rt=L-V*x(B),B-=U=(x(2*B)+2*B-C*x(rt))/(2*f(2*B)+2+C*f(rt)*V*f(B));while(l(U)>_&&--K>0);return rt=L-V*x(B),[b*(1/f(rt)+It/f(B))/pt,rt]};var Lt=function(){return o.geoProjection(Zt).scale(160.857)},Yt=function(b){var A=0,L=o.geoProjectionMutator(b),B=L(A);return B.parallel=function(K){return arguments.length?L(A=K*it):A*Q},B};function Se(b,A){return[b*f(A),A]}Se.invert=function(b,A){return[b/f(A),A]};var $e=function(){return o.geoProjection(Se).scale(152.63)};function fn(b){if(!b)return Se;var A=1/M(b);function L(B,K){var U=A+b-K,rt=U&&B*f(K)/U;return[U*x(rt),A-U*f(rt)]}return L.invert=function(B,K){var U=$(B*B+(K=A-K)*K),rt=A+b-U;return[U/f(rt)*c(B,K),rt]},L}var on=function(){return Yt(fn).scale(123.082).center([0,26.1441]).parallel(45)};function mn(b){function A(L,B){var K=F-B,U=K&&L*b*x(K)/K;return[K*x(U)/b,F-K*f(U)]}return A.invert=function(L,B){var K=L*b,U=F-B,rt=$(K*K+U*U),bt=c(K,U);return[(rt?rt/x(rt):1)*bt/b,F-rt]},A}var Sn=function(){var b=.5,A=o.geoProjectionMutator(mn),L=A(b);return L.fraction=function(B){return arguments.length?A(b=+B):b},L.scale(158.837)},xn=T(1,4/C,C),bn=function(){return o.geoProjection(xn).scale(152.63)};function Tn(b,A,L,B,K,U){var rt=f(U),bt;if(l(b)>1||l(U)>1)bt=lt(L*K+A*B*rt);else{var _t=x(b/2),Dt=x(U/2);bt=2*ht($(_t*_t+A*B*Dt*Dt))}return l(bt)>_?[bt,c(B*x(U),A*K-L*B*rt)]:[0,0]}function Dn(b,A,L){return lt((b*b+A*A-L*L)/(2*b*A))}function Ht(b){return b-2*C*d((b+C)/(2*C))}function kt(b,A,L){for(var B=[[b[0],b[1],x(b[1]),f(b[1])],[A[0],A[1],x(A[1]),f(A[1])],[L[0],L[1],x(L[1]),f(L[1])]],K=B[2],U,rt=0;rt<3;++rt,K=U)U=B[rt],K.v=Tn(U[1]-K[1],K[3],K[2],U[3],U[2],U[0]-K[0]),K.point=[0,0];var bt=Dn(B[0].v[0],B[2].v[0],B[1].v[0]),_t=Dn(B[0].v[0],B[1].v[0],B[2].v[0]),Dt=C-bt;B[2].point[1]=0,B[0].point[0]=-(B[1].point[0]=B[0].v[0]/2);var Xt=[B[2].point[0]=B[0].point[0]+B[2].v[0]*f(bt),2*(B[0].point[1]=B[1].point[1]=B[2].v[0]*x(bt))];function re(pe,Ee){var Ne=x(Ee),qe=f(Ee),cn=new Array(3),Cn;for(Cn=0;Cn<3;++Cn){var jn=B[Cn];if(cn[Cn]=Tn(Ee-jn[1],jn[3],jn[2],qe,Ne,pe-jn[0]),!cn[Cn][0])return jn.point;cn[Cn][1]=Ht(cn[Cn][1]-jn.v[1])}var Nn=Xt.slice();for(Cn=0;Cn<3;++Cn){var Yn=Cn==2?0:Cn+1,Hn=Dn(B[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 Ge([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ge(b,A,L){var B=o.geoCentroid({type:"MultiPoint",coordinates:[b,A,L]}),K=[-B[0],-B[1]],U=o.geoRotation(K),rt=o.geoProjection(kt(oe(U(b)),oe(U(A)),oe(U(L)))).rotate(K),bt=rt.center;return delete rt.rotate,rt.center=function(_t){return arguments.length?bt(U(_t)):U.invert(bt())},rt.clipAngle(90)}function Fn(b,A){var L=$(1-x(A));return[2/st*b*L,st*(1-L)]}Fn.invert=function(b,A){var L=(L=A/st-1)*L;return[L>0?b*$(C/L)/2:0,ht(1-L)]};var Pr=function(){return o.geoProjection(Fn).scale(95.6464).center([0,30])};function pr(b){var A=M(b);function L(B,K){return[B,(B?B/x(B):1)*(x(K)*f(B)-A*f(K))]}return L.invert=A?function(B,K){B&&(K*=x(B)/B);var U=f(B);return[B,2*c($(U*U+A*A-K*K)-U,A-K)]}:function(B,K){return[B,ht(B?K*M(B)/B:K)]},L}var Lr=function(){return Yt(pr).scale(249.828).clipAngle(90)},sr=$(3);function Ft(b,A){return[sr*b*(2*f(2*A/3)-1)/st,sr*st*x(A/3)]}Ft.invert=function(b,A){var L=3*ht(A/(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 A=f(b);function L(B,K){return[B*A,x(K)/A]}return L.invert=function(B,K){return[B/A,ht(K*A)]},L}var ue=function(){return Yt(ie).parallel(38.58).scale(195.044)};function be(b){var A=f(b);function L(B,K){return[B*A,(1+A)*M(K/2)]}return L.invert=function(B,K){return[B/A,u(K/(1+A))*2]},L}var Te=function(){return Yt(be).scale(124.75)};function Ke(b,A){var L=$(8/(3*C));return[L*b*(1-l(A)/C),L*A]}Ke.invert=function(b,A){var L=$(8/(3*C)),B=A/L;return[b/(L*(1-l(B)/C)),B]};var un=function(){return o.geoProjection(Ke).scale(165.664)};function an(b,A){var L=$(4-3*x(l(A)));return[2/$(6*C)*b*L,E(A)*$(2*C/3)*(2-L)]}an.invert=function(b,A){var L=2-l(A)/$(2*C/3);return[b*$(6*C)/(2*L),E(A)*ht((4-L*L)/3)]};var Ce=function(){return o.geoProjection(an).scale(165.664)};function nn(b,A){var L=$(C*(4+C));return[2/L*b*(1+$(1-4*A*A/(C*C))),4/L*A]}nn.invert=function(b,A){var L=$(C*(4+C))/2;return[b*L/(1+$(1-A*A*(4+C)/(4*C))),A*L/2]};var vn=function(){return o.geoProjection(nn).scale(180.739)};function ye(b,A){var L=(2+F)*x(A);A/=2;for(var B=0,K=1/0;B<10&&l(K)>_;B++){var U=f(A);A-=K=(A+x(A)*(U+2)-L)/(2*U*(1+U))}return[2/$(C*(4+C))*b*(1+f(A)),2*$(C/(4+C))*x(A)]}ye.invert=function(b,A){var L=A*$((4+C)/C)/2,B=ht(L),K=f(B);return[b/(2/$(C*(4+C))*(1+K)),ht((B+L*(K+2))/(2+F))]};var dn=function(){return o.geoProjection(ye).scale(180.739)};function gn(b,A){return[b*(1+f(A))/$(2+C),2*A/$(2+C)]}gn.invert=function(b,A){var L=$(2+C),B=A*L/2;return[L*b/(1+f(B)),B]};var vt=function(){return o.geoProjection(gn).scale(173.044)};function Ct(b,A){for(var L=(1+F)*x(A),B=0,K=1/0;B<10&&l(K)>_;B++)A-=K=(A+x(A)-L)/(1+f(A));return L=$(2+C),[b*(1+f(A))/L,2*A/L]}Ct.invert=function(b,A){var L=1+F,B=$(L/2);return[b*2*B/(1+f(A*=B)),ht((A+x(A))/L)]};var Tt=function(){return o.geoProjection(Ct).scale(173.044)},$t=3+2*V;function Vt(b,A){var L=x(b/=2),B=f(b),K=$(f(A)),U=f(A/=2),rt=x(A)/(U+V*B*K),bt=$(2/(1+rt*rt)),_t=$((V*U+(B+L)*K)/(V*U+(B-L)*K));return[$t*(bt*(_t-1/_t)-2*v(_t)),$t*(bt*rt*(_t+1/_t)-2*u(rt))]}Vt.invert=function(b,A){if(!(U=Kt.invert(b/1.2,A*1.065)))return null;var L=U[0],B=U[1],K=20,U;b/=$t,A/=$t;do{var rt=L/2,bt=B/2,_t=x(rt),Dt=f(rt),Xt=x(bt),re=f(bt),pe=f(B),Ee=$(pe),Ne=Xt/(re+V*Dt*Ee),qe=Ne*Ne,cn=$(2/(1+qe)),Cn=V*re+(Dt+_t)*Ee,jn=V*re+(Dt-_t)*Ee,Nn=Cn/jn,Yn=$(Nn),Hn=Yn-1/Yn,yr=Yn+1/Yn,ai=cn*Hn-2*v(Yn)-b,Ci=cn*Ne*yr-2*u(Ne)-A,oi=Xt&&j*Ee*_t*qe/Xt,xo=(V*Dt*re+Ee)/(2*(re+V*Dt*Ee)*(re+V*Dt*Ee)*Ee),$o=-.5*Ne*cn*cn*cn,hl=$o*oi,dl=$o*xo,Sa=(Sa=2*re+V*Ee*(Dt-_t))*Sa*Yn,Za=(V*Dt*re*Ee+pe)/Sa,Ko=-(V*_t*Xt)/(Ee*Sa),Ms=Hn*hl-2*Za/Yn+cn*(Za+Za/Nn),bs=Hn*dl-2*Ko/Yn+cn*(Ko+Ko/Nn),_s=Ne*yr*hl-2*oi/(1+qe)+cn*yr*oi+cn*Ne*(Za-Za/Nn),Ns=Ne*yr*dl-2*xo/(1+qe)+cn*yr*xo+cn*Ne*(Ko-Ko/Nn),ks=bs*_s-Ns*Ms;if(!ks)break;var vl=(Ci*bs-ai*Ns)/ks,cu=(ai*_s-Ci*Ms)/ks;L-=vl,B=g(-F,p(F,B-cu))}while((l(vl)>_||l(cu)>_)&&--K>0);return l(l(B)-F)<_?[0,B]:K&&[L,B]};var se=function(){return o.geoProjection(Vt).scale(62.5271)},Wt=f(35*it);function ne(b,A){var L=M(A/2);return[b*Wt*$(1-L*L),(1+Wt)*L]}ne.invert=function(b,A){var L=A/(1+Wt);return[b&&b/(Wt*$(1-L*L)),2*u(L)]};var ae=function(){return o.geoProjection(ne).scale(137.152)};function ge(b,A){var L=A/2,B=f(L);return[2*b/st*f(A)*B*B,st*M(L)]}ge.invert=function(b,A){var L=u(A/st),B=f(L),K=2*L;return[b*st/2/(f(K)*B*B),K]};var Pe=function(){return o.geoProjection(ge).scale(135.264)};function ke(b){return[b[0]/2,ht(M(b[1]/2*it))*Q]}function Ae(b){return[b[0]*2,2*u(x(b[1]*it))*Q]}var tn=function(b){b==null&&(b=o.geoOrthographic);var A=b(),L=o.geoEquirectangular().scale(Q).precision(0).clipAngle(null).translate([0,0]);function B(U){return A(ke(U))}A.invert&&(B.invert=function(U){return Ae(A.invert(U))}),B.stream=function(U){var rt=A.stream(U),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(U){B[U]=function(rt){return arguments.length?(A[U](rt),B):A[U]()}}return B.rotate=function(U){return arguments.length?(L.rotate(U),B):L.rotate()},B.center=function(U){return arguments.length?(A.center(ke(U)),B):Ae(A.center())},K("clipAngle"),K("clipExtent"),K("scale"),K("translate"),K("precision"),B.scale(249.5)};function En(b,A){var L=2*C/A,B=b*b;function K(U,rt){var bt=o.geoAzimuthalEquidistantRaw(U,rt),_t=bt[0],Dt=bt[1],Xt=_t*_t+Dt*Dt;if(Xt>B){var re=$(Xt),pe=c(Dt,_t),Ee=L*y(pe/L),Ne=pe-Ee,qe=b*f(Ne),cn=(b*x(Ne)-Ne*x(qe))/(F-qe),Cn=Qn(Ne,cn),jn=(C-b)/fr(Cn,qe,C);_t=re;var Nn=50,Yn;do _t-=Yn=(b+fr(Cn,qe,_t)*jn-re)/(Cn(_t)*jn);while(l(Yn)>_&&--Nn>0);Dt=Ne*x(_t),_tB){var _t=$(bt),Dt=c(rt,U),Xt=L*y(Dt/L),re=Dt-Xt;U=_t*f(re),rt=_t*x(re);for(var pe=U-F,Ee=x(U),Ne=rt/Ee,qe=U_||l(Ne)>_)&&--qe>0);return[re,pe]},_t},Qr=xr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555),vi=function(){return o.geoProjection(Qr).scale(149.995)},gi=xr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742),fa=function(){return o.geoProjection(gi).scale(153.93)},ji=xr(5/6*C,-.62636,-.0344,0,1.3493,-.05524,0,.045),Ba=function(){return o.geoProjection(ji).scale(130.945)};function ei(b,A){var L=b*b,B=A*A;return[b*(1-.162388*B)*(.87-952426e-9*L*L),A*(1+B/12)]}ei.invert=function(b,A){var L=b,B=A,K=50,U;do{var rt=B*B;B-=U=(B*(1+rt/12)-A)/(1+rt/4)}while(l(U)>_&&--K>0);K=50,b/=1-.162388*rt;do{var bt=(bt=L*L)*bt;L-=U=(L*(.87-952426e-9*bt)-b)/(.87-.00476213*bt)}while(l(U)>_&&--K>0);return[L,B]};var ca=function(){return o.geoProjection(ei).scale(131.747)},ha=xr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762),Fa=function(){return o.geoProjection(ha).scale(131.087)},zi=function(b){var A=b(F,0)[0]-b(-F,0)[0];function L(B,K){var U=B>0?-.5:.5,rt=b(B+U*C,K);return rt[0]-=U*A,rt}return b.invert&&(L.invert=function(B,K){var U=B>0?-.5:.5,rt=b.invert(B+U*A,K),bt=rt[0]-U*C;return bt<-C?bt+=2*C:bt>C&&(bt-=2*C),rt[0]=bt,rt}),L};function pi(b,A){var L=E(b),B=E(A),K=f(A),U=f(b)*K,rt=x(b)*K,bt=x(B*A);b=l(c(rt,bt)),A=ht(U),l(b-F)>_&&(b%=F);var _t=ao(b>C/4?F-b:b,A);return b>C/4&&(bt=_t[0],_t[0]=-_t[1],_t[1]=-bt),_t[0]*=L,_t[1]*=-B,_t}pi.invert=function(b,A){l(b)>1&&(b=E(b)*2-b),l(A)>1&&(A=E(A)*2-A);var L=E(b),B=E(A),K=-L*b,U=-B*A,rt=U/K<1,bt=X(rt?U:K,rt?K:U),_t=bt[0],Dt=bt[1],Xt=f(Dt);return rt&&(_t=-F-_t),[L*(c(x(_t)*Xt,-x(Dt))+C),B*ht(f(_t)*Xt)]};function ao(b,A){if(A===F)return[0,0];var L=x(A),B=L*L,K=B*B,U=1+K,rt=1+3*K,bt=1-K,_t=ht(1/$(U)),Dt=bt+B*U*_t,Xt=(1-L)/Dt,re=$(Xt),pe=Xt*U,Ee=$(pe),Ne=re*bt,qe,cn;if(b===0)return[0,-(Ne+B*Ee)];var Cn=f(A),jn=1/Cn,Nn=2*L*Cn,Yn=(-3*B+_t*rt)*Nn,Hn=(-Dt*Cn-(1-L)*Yn)/(Dt*Dt),yr=.5*Hn/re,ai=bt*yr-2*B*re*Nn,Ci=B*U*Hn+Xt*rt*Nn,oi=-jn*Nn,xo=-jn*Ci,$o=-2*jn*ai,hl=4*b/C,dl;if(b>.222*C||A.175*C){if(qe=(Ne+B*$(pe*(1+K)-Ne*Ne))/(1+K),b>C/4)return[qe,qe];var Sa=qe,Za=.5*qe;qe=.5*(Za+Sa),cn=50;do{var Ko=$(pe-qe*qe),Ms=qe*($o+oi*Ko)+xo*ht(qe/Ee)-hl;if(!Ms)break;Ms<0?Za=qe:Sa=qe,qe=.5*(Za+Sa)}while(l(Sa-Za)>_&&--cn>0)}else{qe=_,cn=25;do{var bs=qe*qe,_s=$(pe-bs),Ns=$o+oi*_s,ks=qe*Ns+xo*ht(qe/Ee)-hl,vl=Ns+(xo-oi*bs)/_s;qe-=dl=_s?ks/vl:0}while(l(dl)>_&&--cn>0)}return[qe,-Ne-B*$(pe-qe*qe)]}function X(b,A){for(var L=0,B=1,K=.5,U=50;;){var rt=K*K,bt=$(K),_t=ht(1/$(1+rt)),Dt=1-rt+K*(1+rt)*_t,Xt=(1-bt)/Dt,re=$(Xt),pe=Xt*(1+rt),Ee=re*(1-rt),Ne=pe-b*b,qe=$(Ne),cn=A+Ee+K*qe;if(l(B-L)0?L=K:B=K,K=.5*(L+B)}if(!U)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),ai=.5*yr/re,Ci=(1-rt)*ai-2*K*re*Yn,oi=-2*Nn*Ci,xo=-Nn*Yn,$o=-Nn*(K*(1+rt)*yr+Xt*(1+3*rt)*Yn);return[C/4*(b*(oi+xo*qe)+$o*ht(b/$(pe))),Cn]}var At=function(){return o.geoProjection(zi(pi)).scale(239.75)};function Ut(b,A,L){var B,K,U;return b?(B=de(b,L),A?(K=de(A,1-L),U=K[1]*K[1]+L*B[0]*B[0]*K[0]*K[0],[[B[0]*K[2]/U,B[1]*B[2]*K[0]*K[1]/U],[B[1]*K[1]/U,-B[0]*B[2]*K[0]*K[2]/U],[B[2]*K[1]*K[2]/U,-L*B[0]*B[1]*K[0]/U]]):[[B[0],0],[B[1],0],[B[2],0]]):(K=de(A,1-L),[[0,K[0]/K[1]],[1/K[1],0],[K[2]/K[1],0]])}function de(b,A){var L,B,K,U,rt;if(A<_)return U=x(b),B=f(b),L=A*(b-U*B)/4,[U-L*B,B+L*U,1-A*U*U/2,b-L];if(A>=1-_)return L=(1-A)/4,B=Rt(b),U=xt(b),K=1/B,rt=B*Gt(b),[U+L*(rt-b)/(B*B),K-L*U*K*(rt-b),K+L*U*K*(rt+b),2*u(h(b))-F+L*(rt-b)/B];var bt=[1,0,0,0,0,0,0,0,0],_t=[$(A),0,0,0,0,0,0,0,0],Dt=0;for(B=$(1-A),rt=1;l(_t[Dt]/bt[Dt])>_&&Dt<8;)L=bt[Dt++],_t[Dt]=(L-B)/2,bt[Dt]=(L+B)/2,B=$(L*B),rt*=2;K=rt*bt[Dt]*b;do U=_t[Dt]*x(B=K)/bt[Dt],K=(ht(U)+K)/2;while(--Dt);return[x(K),U=f(K),U/f(K-B),K]}function Oe(b,A,L){var B=l(b),K=l(A),U=Gt(K);if(B){var rt=1/x(B),bt=1/(M(B)*M(B)),_t=-(bt+L*(U*U*rt*rt)-1+L),Dt=(L-1)*bt,Xt=(-_t+$(_t*_t-4*Dt))/2;return[Le(u(1/$(Xt)),L)*E(b),Le(u($((Xt/bt-1)/L)),1-L)*E(A)]}return[0,Le(u(U),1-L)*E(A)]}function Le(b,A){if(!A)return b;if(A===1)return v(M(b/2+k));for(var L=1,B=$(1-A),K=$(A),U=0;l(K)>_;U++){if(b%C){var rt=u(B*M(b)/L);rt<0&&(rt+=C),b+=rt+~~(b/C)*C}else b+=b;K=(L+B)/2,B=$(L*B),K=((L=K)-B)/2}return b/(m(2,U)*L)}function He(b,A){var L=(V-1)/(V+1),B=$(1-L*L),K=Le(F,B*B),U=-1,rt=v(M(C/4+l(A)/2)),bt=h(U*rt)/$(L),_t=xe(bt*f(U*b),bt*x(U*b)),Dt=Oe(_t[0],_t[1],B*B);return[-Dt[1],(A>=0?1:-1)*(.5*K-Dt[0])]}function xe(b,A){var L=b*b,B=A+1,K=1-L-A*A;return[.5*((b>=0?F:-F)-c(K,2*b)),-.25*v(K*K+4*L)+.5*v(B*B+L)]}function Qe(b,A){var L=A[0]*A[0]+A[1]*A[1];return[(b[0]*A[0]+b[1]*A[1])/L,(b[1]*A[0]-b[0]*A[1])/L]}He.invert=function(b,A){var L=(V-1)/(V+1),B=$(1-L*L),K=Le(F,B*B),U=-1,rt=Ut(.5*K-A,-b,B*B),bt=Qe(rt[0],rt[1]),_t=c(bt[1],bt[0])/U;return[_t,2*u(h(.5/U*v(L*bt[0]*bt[0]+L*bt[1]*bt[1])))-F]};var Mn=function(){return o.geoProjection(zi(He)).scale(151.496)};function pn(b,A){if(arguments.length<2&&(A=b),A===1)return o.geoAzimuthalEqualAreaRaw;if(A===1/0)return An;function L(B,K){var U=o.geoAzimuthalEqualAreaRaw(B/A,K);return U[0]*=b,U}return L.invert=function(B,K){var U=o.geoAzimuthalEqualAreaRaw.invert(B/b,K);return U[0]*=A,U},L}function An(b,A){return[b*f(A)/f(A/=2),2*x(A)]}An.invert=function(b,A){var L=2*ht(A/2);return[b*f(L/2)/f(L),L]};var On=function(){var b=2,A=o.geoProjectionMutator(pn),L=A(b);return L.coefficient=function(B){return arguments.length?A(b=+B):b},L.scale(169.529)};function Kn(b){var A=x(b),L=f(b),B=Gn(b);B.invert=Gn(-b);function K(U,rt){var bt=B(U,rt);U=bt[0],rt=bt[1];var _t=x(rt),Dt=f(rt),Xt=f(U),re=lt(A*_t+L*Dt*Xt),pe=x(re),Ee=l(pe)>_?re/pe:1;return[Ee*L*x(U),(l(U)>F?Ee:-Ee)*(A*Dt-L*_t*Xt)]}return K.invert=function(U,rt){var bt=$(U*U+rt*rt),_t=-x(bt),Dt=f(bt),Xt=bt*Dt,re=-rt*_t,pe=bt*A,Ee=$(Xt*Xt+re*re-pe*pe),Ne=c(Xt*pe+re*Ee,re*pe-Xt*Ee),qe=(bt>F?-1:1)*c(U*_t,bt*f(Ne)*Dt+rt*x(Ne)*_t);return B.invert(qe,Ne)},K}function Gn(b){var A=x(b),L=f(b);return function(B,K){var U=f(K),rt=f(B)*U,bt=x(B)*U,_t=x(K);return[c(bt,rt*L-_t*A),ht(_t*L+rt*A)]}}var Jn=function(){var b=0,A=o.geoProjectionMutator(Kn),L=A(b),B=L.rotate,K=L.stream,U=o.geoCircle();return L.parallel=function(rt){if(!arguments.length)return b*Q;var bt=L.rotate();return A(b=rt*it).rotate(bt)},L.rotate=function(rt){return arguments.length?(B.call(L,[rt[0],rt[1]-b*Q]),U.center([-rt[0],-rt[1]]),L):(rt=B.call(L),rt[1]+=b*Q,rt)},L.stream=function(rt){return rt=K(rt),rt.sphere=function(){rt.polygonStart();var bt=.01,_t=U.radius(90-bt)().coordinates[0],Dt=_t.length-1,Xt=-1,re;for(rt.lineStart();++Xt=0;)rt.point((re=_t[Xt])[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 A=Vn*it,L=Fn(C,A)[0]-Fn(-C,A)[0],B=hr(0,A)[1],K=Fn(0,A)[1],U=st-K,rt=yt/b,bt=4/yt,_t=B+U*U*4/yt;function Dt(Xt,re){var pe,Ee=l(re);if(Ee>A){var Ne=p(b-1,g(0,d((Xt+C)/rt)));Xt+=C*(b-1)/b-Ne*rt,pe=Fn(Xt,Ee),pe[0]=pe[0]*yt/L-yt*(b-1)/(2*b)+Ne*yt/b,pe[1]=B+(pe[1]-K)*4*U/yt,re<0&&(pe[1]=-pe[1])}else pe=hr(Xt,re);return pe[0]*=bt,pe[1]/=_t,pe}return Dt.invert=function(Xt,re){Xt/=bt,re*=_t;var pe=l(re);if(pe>B){var Ee=p(b-1,g(0,d((Xt+C)/rt)));Xt=(Xt+C*(b-1)/b-Ee*rt)*L/yt;var Ne=Fn.invert(Xt,.25*(pe-B)*yt/U+K);return Ne[0]-=C*(b-1)/b-Ee*rt,re<0&&(Ne[1]=-Ne[1]),Ne}return hr.invert(Xt,re)},Dt}function mr(b){return{type:"Polygon",coordinates:[s.range(-180,180+b/2,b).map(function(A,L){return[A,L&1?90-1e-6:Vn]}).concat(s.range(180,-180-b/2,-b).map(function(A,L){return[A,L&1?-90+1e-6:-Vn]}))]}}var dr=function(){var b=4,A=o.geoProjectionMutator(ar),L=A(b),B=L.stream;return L.lobes=function(K){return arguments.length?A(b=+K):b},L.stream=function(K){var U=L.rotate(),rt=B(K),bt=(L.rotate([0,0]),B(K));return L.rotate(U),rt.sphere=function(){o.geoStream(mr(180/b),bt)},rt},L.scale(239.75)};function Dr(b){var A=1+b,L=x(1/A),B=ht(L),K=2*$(C/(U=C+4*B*A)),U,rt=.5*K*(A+$(b*(2+b))),bt=b*b,_t=A*A;function Dt(Xt,re){var pe=1-x(re),Ee,Ne;if(pe&&pe<2){var qe=F-re,cn=25,Cn;do{var jn=x(qe),Nn=f(qe),Yn=B+c(jn,A-Nn),Hn=1+_t-2*A*Nn;qe-=Cn=(qe-bt*B-A*jn+Hn*Yn-.5*pe*U)/(2*A*jn*Yn)}while(l(Cn)>D&&--cn>0);Ee=K*$(Hn),Ne=Xt*Yn/C}else Ee=K*(b+pe),Ne=Xt*B/C;return[Ee*x(Ne),rt-Ee*f(Ne)]}return Dt.invert=function(Xt,re){var pe=Xt*Xt+(re-=rt)*re,Ee=(1+_t-pe/(K*K))/(2*A),Ne=lt(Ee),qe=x(Ne),cn=B+c(qe,A-Ee);return[ht(Xt/$(pe))*C/cn,ht(1-2*(Ne-bt*B-A*qe+(1+_t-2*A*Ee)*cn)/U)]},Dt}var Ar=function(){var b=1,A=o.geoProjectionMutator(Dr),L=A(b);return L.ratio=function(B){return arguments.length?A(b=+B):b},L.scale(167.774).center([0,18.67])},Hr=.7109889596207567,Tr=.0528035274542;function br(b,A){return A>-Hr?(b=z(b,A),b[1]+=Tr,b):Se(b,A)}br.invert=function(b,A){return A>-Hr?z.invert(b,A-Tr):Se.invert(b,A)};var Xr=function(){return o.geoProjection(br).rotate([-20,-55]).scale(164.263).center([0,-5.4036])};function _r(b,A){return l(A)>Hr?(b=z(b,A),b[1]-=A>0?Tr:-Tr,b):Se(b,A)}_r.invert=function(b,A){return l(A)>Hr?z.invert(b,A+(A>0?Tr:-Tr)):Se.invert(b,A)};var zn=function(){return o.geoProjection(_r).scale(152.63)};function tr(b,A){return l(b[0]-A[0])<_&&l(b[1]-A[1])<_}function Rr(b,A){for(var L=-1,B=b.length,K=b[0],U,rt,bt,_t=[];++L=0;--_t)L=b[1][_t],B=L[0][0],K=L[0][1],U=L[1][1],rt=L[2][0],bt=L[2][1],A.push(Rr([[rt-_,bt-_],[rt-_,U+_],[B+_,U+_],[B+_,K-_]],30));return{type:"Polygon",coordinates:[s.merge(A)]}}var Br=function(b,A){var L=mi(A);A=A.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 B=A.map(function(bt){return bt.map(function(_t){var Dt=b(_t[0][0],_t[0][1])[0],Xt=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],Ee;return re>pe&&(Ee=re,re=pe,pe=Ee),[[Dt,re],[Xt,pe]]})});function K(bt,_t){for(var Dt=_t<0?-1:1,Xt=A[+(_t<0)],re=0,pe=Xt.length-1;reXt[re][2][0];++re);var Ee=b(bt-Xt[re][1][0],_t);return Ee[0]+=b(Xt[re][1][0],Dt*_t>Dt*Xt[re][0][1]?Xt[re][0][1]:_t)[0],Ee}b.invert&&(K.invert=function(bt,_t){for(var Dt=B[+(_t<0)],Xt=A[+(_t<0)],re=0,pe=Dt.length;re2)return null;L/=2,B/=2;var U=L*L,rt=B*B,bt=2*B/(1+U+rt);return bt=m((1+bt)/(1-bt),1/b),[c(2*L,1-U-rt)/b,ht((bt-1)/(bt+1))]},A}var so=function(){var b=.5,A=o.geoProjectionMutator(Na),L=A(b);return L.spacing=function(B){return arguments.length?A(b=+B):b},L.scale(124.75)},Hi=C/V;function Wi(b,A){return[b*(1+$(f(A)))/2,A/(f(A/2)*f(b/6))]}Wi.invert=function(b,A){var L=l(b),B=l(A),K=_,U=F;B_||l(cn)>_)&&--K>0);return K&&[L,B]};var Ei=function(){return o.geoProjection(ra).scale(139.98)};function Gi(b,A){return[x(b)/f(A),M(A)*f(b)]}Gi.invert=function(b,A){var L=b*b,B=A*A,K=B+1,U=b?j*$((K-$(L*L+2*L*(B-1)+K*K))/L+1):1/$(K);return[ht(b*U),E(A)*lt(U)]};var Vi=function(){return o.geoProjection(Gi).scale(144.049).clipAngle(90-.001)};function ia(b){var A=f(b),L=M(k+b/2);function B(K,U){var rt=U-b,bt=l(rt)<_?K*A:l(bt=k+U/2)<_||l(l(bt)-F)<_?0:K*rt/v(M(bt)/L);return[bt,rt]}return B.invert=function(K,U){var rt,bt=U+b;return[l(U)<_?K/A:l(rt=k+bt/2)<_||l(l(rt)-F)<_?0:K*v(M(rt)/L)/U,bt]},B}var ka=function(){return Yt(ia).parallel(40).scale(158.837)};function Ri(b,A){return[b,1.25*v(M(k+.4*A))]}Ri.invert=function(b,A){return[b,2.5*u(h(.8*A))-.625*C]};var Kr=function(){return o.geoProjection(Ri).scale(108.318)};function Zr(b){var A=b.length-1;function L(B,K){for(var U=f(K),rt=2/(1+U*f(B)),bt=rt*U*x(B),_t=rt*x(K),Dt=A,Xt=b[Dt],re=Xt[0],pe=Xt[1],Ee;--Dt>=0;)Xt=b[Dt],re=Xt[0]+bt*(Ee=re)-_t*pe,pe=Xt[1]+bt*pe+_t*Ee;return re=bt*(Ee=re)-_t*pe,pe=bt*pe+_t*Ee,[re,pe]}return L.invert=function(B,K){var U=20,rt=B,bt=K;do{for(var _t=A,Dt=b[_t],Xt=Dt[0],re=Dt[1],pe=0,Ee=0,Ne;--_t>=0;)Dt=b[_t],pe=Xt+rt*(Ne=pe)-bt*Ee,Ee=re+rt*Ee+bt*Ne,Xt=Dt[0]+rt*(Ne=Xt)-bt*re,re=Dt[1]+rt*re+bt*Ne;pe=Xt+rt*(Ne=pe)-bt*Ee,Ee=re+rt*Ee+bt*Ne,Xt=rt*(Ne=Xt)-bt*re-B,re=rt*re+bt*Ne-K;var qe=pe*pe+Ee*Ee,cn,Cn;rt-=cn=(Xt*pe+re*Ee)/qe,bt-=Cn=(re*pe-Xt*Ee)/qe}while(l(cn)+l(Cn)>_*_&&--U>0);if(U){var jn=$(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]],fi=[[.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]],wi=[[.9245,0],[0,0],[.01943,0]],ni=[[.721316,0],[0,0],[-.00881625,-.00617325]];function ri(){return ii(Ir,[152,-64]).scale(1500).center([-160.908,62.4864]).clipAngle(25)}function va(){return ii(fi,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Bi(){return ii(Ao,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Xi(){return ii(wi,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function ci(){return ii(ni,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function ii(b,A){var L=o.geoProjection(Zr(b)).rotate(A).clipAngle(90),B=o.geoRotation(A),K=L.center;return delete L.rotate,L.center=function(U){return arguments.length?K(B(U)):B.invert(K())},L}var za=$(6),lo=$(7);function Ho(b,A){var L=ht(7*x(A)/(3*za));return[za*b*(2*f(2*L/3)-1)/lo,9*x(L/3)/lo]}Ho.invert=function(b,A){var L=3*ht(A*lo/9);return[b*lo/(za*(2*f(2*L/3)-1)),ht(x(L)*3*za/7)]};var Wo=function(){return o.geoProjection(Ho).scale(164.859)};function ga(b,A){for(var L=(1+j)*x(A),B=A,K=0,U;K<25&&(B-=U=(x(B/2)+x(B)-L)/(.5*f(B/2)+f(B)),!(l(U)<_));K++);return[b*(1+2*f(B)/f(B/2))/(3*V),2*$(3)*x(B/2)/$(2+V)]}ga.invert=function(b,A){var L=A*$(2+V)/(2*$(3)),B=2*ht(L);return[3*V*b/(1+2*f(B)/f(B/2)),ht((L+x(B))/(1+j))]};var Ya=function(){return o.geoProjection(ga).scale(188.209)};function aa(b,A){for(var L=$(6/(4+C)),B=(1+C/4)*x(A),K=A/2,U=0,rt;U<25&&(K-=rt=(K/2+x(K)-B)/(.5+f(K)),!(l(rt)<_));U++);return[L*(.5+f(K))*b/1.5,L*K]}aa.invert=function(b,A){var L=$(6/(4+C)),B=A/L;return l(l(B)-F)<_&&(B=B<0?-F:F),[1.5*b/(L*(.5+f(B))),ht((B/2+x(B))/(1+C/4))]};var vs=function(){return o.geoProjection(aa).scale(166.518)};function uo(b,A){var L=A*A,B=L*L;return[b*(.8707-.131979*L+B*(-.013791+B*(.003971*L-.001529*B))),A*(1.007226+L*(.015085+B*(-.044475+.028874*L-.005916*B)))]}uo.invert=function(b,A){var L=A,B=25,K;do{var U=L*L,rt=U*U;L-=K=(L*(1.007226+U*(.015085+rt*(-.044475+.028874*U-.005916*rt)))-A)/(1.007226+U*(.015085*3+rt*(-.044475*7+.028874*9*U-.005916*11*rt)))}while(l(K)>_&&--B>0);return[b/(.8707+(U=L*L)*(-.131979+U*(-.013791+U*U*U*(.003971-.001529*U)))),L]};var pa=function(){return o.geoProjection(uo).scale(175.295)};function Ui(b,A){var L=A*A,B=L*L,K=L*B;return[b*(.84719-.13063*L+K*K*(-.04515+.05494*L-.02326*B+.00331*K)),A*(1.01183+B*B*(-.02625+.01926*L-.00396*B))]}Ui.invert=function(b,A){var L=A,B=25,K,U,rt,bt;do U=L*L,rt=U*U,L-=K=(L*(1.01183+rt*rt*(-.02625+.01926*U-.00396*rt))-A)/(1.01183+rt*rt*(9*-.02625+11*.01926*U+13*-.00396*rt));while(l(K)>D&&--B>0);return U=L*L,rt=U*U,bt=U*rt,[b/(.84719-.13063*U+bt*bt*(-.04515+.05494*U-.02326*rt+.00331*bt)),L]};var fo=function(){return o.geoProjection(Ui).scale(175.295)};function To(b,A){return[b*(1+f(A))/2,2*(A-M(A/2))]}To.invert=function(b,A){for(var L=A/2,B=0,K=1/0;B<10&&l(K)>_;++B){var U=f(A/2);A-=K=(A-M(A/2)-L)/(1-.5/(U*U))}return[2*b/(1+f(A)),A]};var co=function(){return o.geoProjection(To).scale(152.63)},ma=1.0148,oa=.23185,gs=-.14499,Go=.02406,ho=ma,Vo=5*oa,ps=7*gs,Ha=9*Go,Mi=1.790857183;function $i(b,A){var L=A*A;return[b,A*(ma+L*L*(oa+L*(gs+Go*L)))]}$i.invert=function(b,A){A>Mi?A=Mi:A<-Mi&&(A=-Mi);var L=A,B;do{var K=L*L;L-=B=(L*(ma+K*K*(oa+K*(gs+Go*K)))-A)/(ho+K*K*(Vo+K*(ps+Ha*K)))}while(l(B)>_);return[b,L]};var Wa=function(){return o.geoProjection($i).scale(139.319)};function ya(b,A){if(l(A)<_)return[b,0];var L=M(A),B=b*x(A);return[x(B)/L,A+(1-f(B))/L]}ya.invert=function(b,A){if(l(A)<_)return[b,0];var L=b*b+A*A,B=A*.5,K=10,U;do{var rt=M(B),bt=1/f(B),_t=L-2*A*B+B*B;B-=U=(rt*_t+2*(B-A))/(2+_t*bt*bt+2*(B-A)*rt)}while(l(U)>_&&--K>0);return rt=M(B),[(l(A)=0;)if(B=A[bt],L[0]===B[0]&&L[1]===B[1]){if(U)return[U,L];U=L}}}function Es(b){for(var A=b.length,L=[],B=b[A-1],K=0;K0?[-B[0],0]:[180-B[0],180])};var A=xa.map(function(L){return{face:L,project:b(L)}});return[-1,0,0,1,0,1,4,5].forEach(function(L,B){var K=A[L];K&&(K.children||(K.children=[])).push(A[B])}),Ga(A[0],function(L,B){return A[L<-C/2?B<0?6:4:L<0?B<0?2:0:LB^Ee>B&&L<(pe-Dt)*(B-Xt)/(Ee-Xt)+Dt&&(K=!K)}return K},mo=function(b,A){var L=A.stream,B;if(!L)throw new Error("invalid projection");switch(b&&b.type){case"Feature":B=Ua;break;case"FeatureCollection":B=Rs;break;default:B=Ro;break}return B(b,L)};function Rs(b,A){return{type:"FeatureCollection",features:b.features.map(function(L){return Ua(L,A)})}}function Ua(b,A){return{type:"Feature",id:b.id,properties:b.properties,geometry:Ro(b.geometry,A)}}function yo(b,A){return{type:"GeometryCollection",geometries:b.geometries.map(function(L){return Ro(L,A)})}}function Ro(b,A){if(!b)return null;if(b.type==="GeometryCollection")return yo(b,A);var L;switch(b.type){case"Point":L=Ma;break;case"MultiPoint":L=Ma;break;case"LineString":L=$a;break;case"MultiLineString":L=$a;break;case"Polygon":L=sa;break;case"MultiPolygon":L=sa;break;case"Sphere":L=sa;break;default:return null}return o.geoStream(b,A(L)),L.result()}var jr=[],Fr=[],Ma={point:function(b,A){jr.push([b,A])},result:function(){var b=jr.length?jr.length<2?{type:"Point",coordinates:jr[0]}:{type:"MultiPoint",coordinates:jr}:null;return jr=[],b}},$a={lineStart:Do,point:function(b,A){jr.push([b,A])},lineEnd:function(){jr.length&&(Fr.push(jr),jr=[])},result:function(){var b=Fr.length?Fr.length<2?{type:"LineString",coordinates:Fr[0]}:{type:"MultiLineString",coordinates:Fr}:null;return Fr=[],b}},sa={polygonStart:Do,lineStart:Do,point:function(b,A){jr.push([b,A])},lineEnd:function(){var b=jr.length;if(b){do jr.push(jr[0].slice());while(++b<4);Fr.push(jr),jr=[]}},polygonEnd:Do,result:function(){if(!Fr.length)return null;var b=[],A=[];return Fr.forEach(function(L){Uo(L)?b.push([L]):A.push(L)}),A.forEach(function(L){var B=L[0];b.some(function(K){if(wa(K[0],B))return K.push(L),!0})||b.push([L])}),Fr=[],b.length?b.length>1?{type:"MultiPolygon",coordinates:b}:{type:"Polygon",coordinates:b[0]}:null}},Zi=function(b){var A=b(F,0)[0]-b(-F,0)[0];function L(B,K){var U=l(B)0?B-C:B+C,K),bt=(rt[0]-rt[1])*j,_t=(rt[0]+rt[1])*j;if(U)return[bt,_t];var Dt=A*j,Xt=bt>0^_t>0?-1:1;return[Xt*bt-E(_t)*Dt,Xt*_t-E(bt)*Dt]}return b.invert&&(L.invert=function(B,K){var U=(B+K)*j,rt=(K-B)*j,bt=l(U)<.5*A&&l(rt)<.5*A;if(!bt){var _t=A*j,Dt=U>0^rt>0?-1:1,Xt=-Dt*B+(rt>0?1:-1)*_t,re=-Dt*K+(U>0?1:-1)*_t;U=(-Xt-re)*j,rt=(Xt-re)*j}var pe=b.invert(U,rt);return bt||(pe[0]+=U>0?C:-C),pe}),o.geoProjection(L).rotate([-90,-90,45]).clipAngle(180-.001)},Ka=function(){return Zi(pi).scale(176.423)},ba=function(){return Zi(He).scale(111.48)},G=function(b,A){if(!(0<=(A=+A)&&A<=20))throw new Error("invalid digits");function L(_t){var Dt=_t.length,Xt=2,re=new Array(Dt);for(re[0]=+_t[0].toFixed(A),re[1]=+_t[1].toFixed(A);Xt_&&--bt>0);var pe=B*(Dt=M(rt)),Ee=M(l(K)0?F:-F)*(_t+K*(Xt-rt)/2+K*K*(Xt-2*_t+rt)/2)]}qt.invert=function(b,A){var L=A/F,B=L*90,K=p(18,l(B/5)),U=g(0,d(K));do{var rt=St[U][1],bt=St[U+1][1],_t=St[p(19,U+2)][1],Dt=_t-rt,Xt=_t-2*bt+rt,re=2*(l(L)-bt)/Dt,pe=Xt/Dt,Ee=re*(1-pe*re*(1-2*pe*re));if(Ee>=0||U===1){B=(A>=0?5:-5)*(Ee+K);var Ne=50,qe;do K=p(18,l(B)/5),U=d(K),Ee=K-U,rt=St[U][1],bt=St[U+1][1],_t=St[p(19,U+2)][1],B-=(qe=(A>=0?F:-F)*(bt+Ee*(_t-rt)/2+Ee*Ee*(_t-2*bt+rt)/2)-A)*Q;while(l(qe)>D&&--Ne>0);break}}while(--U>=0);var cn=St[U][0],Cn=St[U+1][0],jn=St[p(19,U+2)][0];return[b/(Cn+Ee*(jn-cn)/2+Ee*Ee*(jn-2*Cn+cn)/2),B*it]};var me=function(){return o.geoProjection(qt).scale(152.63)};function Me(b){function A(L,B){var K=f(B),U=(b-1)/(b-K*f(L));return[U*K*x(L),U*x(B)]}return A.invert=function(L,B){var K=L*L+B*B,U=$(K),rt=(b-$(1-K*(b+1)/(b-1)))/((b-1)/U+U/(b-1));return[c(L*rt,U*$(1-rt*rt)),U?ht(B*rt/U):0]},A}function Re(b,A){var L=Me(b);if(!A)return L;var B=f(A),K=x(A);function U(rt,bt){var _t=L(rt,bt),Dt=_t[1],Xt=Dt*K/(b-1)+B;return[_t[0]*B/Xt,Dt/Xt]}return U.invert=function(rt,bt){var _t=(b-1)/(b-1-bt*K);return L.invert(_t*rt,_t*bt*B)},U}var ze=function(){var b=2,A=0,L=o.geoProjectionMutator(Re),B=L(b,A);return B.distance=function(K){return arguments.length?L(b=+K,A):b},B.tilt=function(K){return arguments.length?L(b,A=K*it):A*Q},B.scale(432.147).clipAngle(lt(1/b)*Q-1e-6)},Ze=1e-4,we=1e4,Ye=-180,I=Ye+Ze,Y=180,et=Y-Ze,nt=-90,w=nt+Ze,O=90,W=O-Ze;function N(b){return b.length>0}function q(b){return Math.floor(b*we)/we}function Et(b){return b===nt||b===O?[0,b]:[Ye,q(b)]}function ut(b){var A=b[0],L=b[1],B=!1;return A<=I?(A=Ye,B=!0):A>=et&&(A=Y,B=!0),L<=w?(L=nt,B=!0):L>=W&&(L=O,B=!0),B?[A,L]:b}function wt(b){return b.map(ut)}function Mt(b,A,L){for(var B=0,K=b.length;B=et||Xt<=w||Xt>=W){U[rt]=ut(_t);for(var re=rt+1;reI&&Eew&&Ne=bt)break;L.push({index:-1,polygon:A,ring:U=U.slice(re-1)}),U[0]=Et(U[0][1]),rt=-1,bt=U.length}}}}function Bt(b){var A,L=b.length,B={},K={},U,rt,bt,_t,Dt;for(A=0;A0?C-bt:bt)*Q],Dt=o.geoProjection(b(rt)).rotate(_t),Xt=o.geoRotation(_t),re=Dt.center;return delete Dt.rotate,Dt.center=function(pe){return arguments.length?re(Xt(pe)):Xt.invert(re())},Dt.clipAngle(90)};function ve(b){var A=f(b);function L(B,K){var U=o.geoGnomonicRaw(B,K);return U[0]*=A,U}return L.invert=function(B,K){return o.geoGnomonicRaw.invert(B/A,K)},L}function Be(){return Ve([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Ve(b,A){return le(ve,b,A)}function De(b){if(!(b*=2))return o.geoAzimuthalEquidistantRaw;var A=-b/2,L=-A,B=b*b,K=M(L),U=.5/x(L);function rt(bt,_t){var Dt=lt(f(_t)*f(bt-A)),Xt=lt(f(_t)*f(bt-L)),re=_t<0?-1:1;return Dt*=Dt,Xt*=Xt,[(Dt-Xt)/(2*b),re*$(4*B*Xt-(B-Dt+Xt)*(B-Dt+Xt))/(2*b)]}return rt.invert=function(bt,_t){var Dt=_t*_t,Xt=f($(Dt+(pe=bt+A)*pe)),re=f($(Dt+(pe=bt+L)*pe)),pe,Ee;return[c(Ee=Xt-re,pe=(Xt+re)*K),(_t<0?-1:1)*lt($(pe*pe+Ee*Ee)*U)]},rt}function Xe(){return rn([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function rn(b,A){return le(De,b,A)}function wn(b,A){if(l(A)<_)return[b,0];var L=l(A/F),B=ht(L);if(l(b)<_||l(l(A)-F)<_)return[0,E(A)*C*M(B/2)];var K=f(B),U=l(C/b-b/C)/2,rt=U*U,bt=K/(L+K-1),_t=bt*(2/L-1),Dt=_t*_t,Xt=Dt+rt,re=bt-Dt,pe=rt+bt;return[E(b)*C*(U*re+$(rt*re*re-Xt*(bt*bt-Dt)))/Xt,E(A)*C*(_t*pe-U*$((rt+1)*Xt-pe*pe))/Xt]}wn.invert=function(b,A){if(l(A)<_)return[b,0];if(l(b)<_)return[0,F*x(2*u(A/C))];var L=(b/=C)*b,B=(A/=C)*A,K=L+B,U=K*K,rt=-l(A)*(1+K),bt=rt-2*B+L,_t=-2*rt+1+2*B+U,Dt=B/_t+(2*bt*bt*bt/(_t*_t*_t)-9*rt*bt/(_t*_t))/27,Xt=(rt-bt*bt/(3*_t))/_t,re=2*$(-Xt/3),pe=lt(3*Dt/(Xt*re))/3;return[C*(K-1+$(1+2*(L-B)+U))/(2*b),E(A)*C*(-re*f(pe+C/3)-bt/(3*_t))]};var yn=function(){return o.geoProjection(wn).scale(79.4183)};function kn(b,A){if(l(A)<_)return[b,0];var L=l(A/F),B=ht(L);if(l(b)<_||l(l(A)-F)<_)return[0,E(A)*C*M(B/2)];var K=f(B),U=l(C/b-b/C)/2,rt=U*U,bt=K*($(1+rt)-U*K)/(1+rt*L*L);return[E(b)*C*bt,E(A)*C*$(1-bt*(2*U+bt))]}kn.invert=function(b,A){if(!b)return[0,F*x(2*u(A/C))];var L=l(b/C),B=(1-L*L-(A/=C)*A)/(2*L),K=B*B,U=$(K+1);return[E(b)*C*(U-B),E(A)*F*x(2*c($((1-2*B*L)*(B+U)-L),$(U+B+L)))]};var In=function(){return o.geoProjection(kn).scale(79.4183)};function Ln(b,A){if(l(A)<_)return[b,0];var L=A/F,B=ht(L);if(l(b)<_||l(l(A)-F)<_)return[0,C*M(B/2)];var K=(C/b-b/C)/2,U=L/(1+f(B));return[C*(E(b)*$(K*K+1-U*U)-K),C*U]}Ln.invert=function(b,A){if(!A)return[b,0];var L=A/C,B=(C*C*(1-L*L)-b*b)/(2*C*b);return[b?C*(E(b)*$(B*B+1)-B):0,F*x(2*u(L))]};var We=function(){return o.geoProjection(Ln).scale(79.4183)};function Rn(b,A){if(!A)return[b,0];var L=l(A);if(!b||L===F)return[0,A];var B=L/F,K=B*B,U=(8*B-K*(K+2)-5)/(2*K*(B-1)),rt=U*U,bt=B*U,_t=K+rt+2*bt,Dt=B+3*U,Xt=b/F,re=Xt+1/Xt,pe=E(l(b)-F)*$(re*re-4),Ee=pe*pe,Ne=_t*(K+rt*Ee-1)+(1-K)*(K*(Dt*Dt+4*rt)+12*bt*rt+4*rt*rt),qe=(pe*(_t+rt-1)+2*$(Ne))/(4*_t+Ee);return[E(b)*F*qe,E(A)*F*$(1+pe*l(qe)-qe*qe)]}Rn.invert=function(b,A){var L;if(!b||!A)return[b,A];A/=C;var B=E(b)*b/F,K=(B*B-1+4*A*A)/l(B),U=K*K,rt=2*A,bt=50;do{var _t=rt*rt,Dt=(8*rt-_t*(_t+2)-5)/(2*_t*(rt-1)),Xt=(3*rt-_t*rt-10)/(2*_t*rt),re=Dt*Dt,pe=rt*Dt,Ee=rt+Dt,Ne=Ee*Ee,qe=rt+3*Dt,cn=Ne*(_t+re*U-1)+(1-_t)*(_t*(qe*qe+4*re)+re*(12*pe+4*re)),Cn=-2*Ee*(4*pe*re+(1-4*_t+3*_t*_t)*(1+Xt)+re*(-6+14*_t-U+(-8+8*_t-2*U)*Xt)+pe*(-8+12*_t+(-10+10*_t-U)*Xt)),jn=$(cn),Nn=K*(Ne+re-1)+2*jn-B*(4*Ne+U),Yn=K*(2*Dt*Xt+2*Ee*(1+Xt))+Cn/jn-8*Ee*(K*(-1+re+Ne)+2*jn)*(1+Xt)/(U+4*Ne);rt-=L=Nn/Yn}while(L>_&&--bt>0);return[E(b)*($(K*K+4)+K)*C/4,F*rt]};var qn=function(){return o.geoProjection(Rn).scale(127.16)},Un=4*C+3*$(3),sn=2*$(2*C*$(3)/Un),Zn=T(sn*$(3)/C,sn,Un/6),vr=function(){return o.geoProjection(Zn).scale(176.84)};function Sr(b,A){return[b*$(1-3*A*A/(C*C)),A]}Sr.invert=function(b,A){return[b/$(1-3*A*A/(C*C)),A]};var Nr=function(){return o.geoProjection(Sr).scale(152.63)};function _a(b,A){var L=.90631*x(A),B=$(1-L*L),K=$(2/(1+B*f(b/=3)));return[2.66723*B*K*x(b),1.24104*L*K]}_a.invert=function(b,A){var L=b/2.66723,B=A/1.24104,K=$(L*L+B*B),U=2*ht(K/2);return[3*c(b*M(U),2.66723*K),K&&ht(A*x(U)/(1.24104*.90631*K))]};var Si=function(){return o.geoProjection(_a).scale(172.632)};function Bo(b,A){var L=f(A),B=f(b)*L,K=1-B,U=f(b=c(x(b)*L,-x(A))),rt=x(b);return L=$(1-B*B),[rt*L-U*K,-U*L-rt*K]}Bo.invert=function(b,A){var L=(b*b+A*A)/-2,B=$(-L*(2+L)),K=A*L+b*B,U=b*L-A*B,rt=$(U*U+K*K);return[c(B*K,rt*(1+L)),rt?-ht(B*U/rt):0]};var Fo=function(){return o.geoProjection(Bo).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)};function Bs(b,A){var L=Fe(b,A);return[(L[0]+b/F)/2,(L[1]+A)/2]}Bs.invert=function(b,A){var L=b,B=A,K=25;do{var U=f(B),rt=x(B),bt=x(2*B),_t=rt*rt,Dt=U*U,Xt=x(L),re=f(L/2),pe=x(L/2),Ee=pe*pe,Ne=1-Dt*re*re,qe=Ne?lt(U*re)*$(cn=1/Ne):cn=0,cn,Cn=.5*(2*qe*U*pe+L/F)-b,jn=.5*(qe*rt+B)-A,Nn=.5*cn*(Dt*Ee+qe*U*re*_t)+.5/F,Yn=cn*(Xt*bt/4-qe*rt*pe),Hn=.125*cn*(bt*pe-qe*rt*Dt*Xt),yr=.5*cn*(_t*re+qe*Ee*U)+.5,ai=Yn*Hn-yr*Nn,Ci=(jn*Yn-Cn*yr)/ai,oi=(Cn*Hn-jn*Nn)/ai;L-=Ci,B-=oi}while((l(Ci)>_||l(oi)>_)&&--K>0);return[L,B]};var Fs=function(){return o.geoProjection(Bs).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=Ge,r.geoChamberlinRaw=kt,r.geoChamberlinAfrica=fe,r.geoCollignon=Pr,r.geoCollignonRaw=Fn,r.geoCraig=Lr,r.geoCraigRaw=pr,r.geoCraster=zt,r.geoCrasterRaw=Ft,r.geoCylindricalEqualArea=ue,r.geoCylindricalEqualAreaRaw=ie,r.geoCylindricalStereographic=Te,r.geoCylindricalStereographicRaw=be,r.geoEckert1=un,r.geoEckert1Raw=Ke,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=Tt,r.geoEckert6Raw=Ct,r.geoEisenlohr=se,r.geoEisenlohrRaw=Vt,r.geoFahey=ae,r.geoFaheyRaw=ne,r.geoFoucaut=Pe,r.geoFoucautRaw=ge,r.geoGilbert=tn,r.geoGingery=cr,r.geoGingeryRaw=En,r.geoGinzburg4=vi,r.geoGinzburg4Raw=Qr,r.geoGinzburg5=fa,r.geoGinzburg5Raw=gi,r.geoGinzburg6=Ba,r.geoGinzburg6Raw=ji,r.geoGinzburg8=ca,r.geoGinzburg8Raw=ei,r.geoGinzburg9=Fa,r.geoGinzburg9Raw=ha,r.geoGringorten=At,r.geoGringortenRaw=pi,r.geoGuyou=Mn,r.geoGuyouRaw=He,r.geoHammer=On,r.geoHammerRaw=pn,r.geoHammerRetroazimuthal=Jn,r.geoHammerRetroazimuthalRaw=Kn,r.geoHealpix=dr,r.geoHealpixRaw=ar,r.geoHill=Ar,r.geoHillRaw=Dr,r.geoHomolosine=zn,r.geoHomolosineRaw=_r,r.geoInterrupt=Br,r.geoInterruptedBoggs=da,r.geoInterruptedHomolosine=Li,r.geoInterruptedMollweide=oo,r.geoInterruptedMollweideHemispheres=$r,r.geoInterruptedSinuMollweide=Or,r.geoInterruptedSinusoidal=Di,r.geoKavrayskiy7=Jr,r.geoKavrayskiy7Raw=yi,r.geoLagrange=so,r.geoLagrangeRaw=Na,r.geoLarrivee=xi,r.geoLarriveeRaw=Wi,r.geoLaskowski=Ei,r.geoLaskowskiRaw=ra,r.geoLittrow=Vi,r.geoLittrowRaw=Gi,r.geoLoximuthal=ka,r.geoLoximuthalRaw=ia,r.geoMiller=Kr,r.geoMillerRaw=Ri,r.geoModifiedStereographic=ii,r.geoModifiedStereographicRaw=Zr,r.geoModifiedStereographicAlaska=ri,r.geoModifiedStereographicGs48=va,r.geoModifiedStereographicGs50=Bi,r.geoModifiedStereographicMiller=Xi,r.geoModifiedStereographicLee=ci,r.geoMollweide=J,r.geoMollweideRaw=z,r.geoMtFlatPolarParabolic=Wo,r.geoMtFlatPolarParabolicRaw=Ho,r.geoMtFlatPolarQuartic=Ya,r.geoMtFlatPolarQuarticRaw=ga,r.geoMtFlatPolarSinusoidal=vs,r.geoMtFlatPolarSinusoidalRaw=aa,r.geoNaturalEarth=pa,r.geoNaturalEarthRaw=uo,r.geoNaturalEarth2=fo,r.geoNaturalEarth2Raw=Ui,r.geoNellHammer=co,r.geoNellHammerRaw=To,r.geoPatterson=Wa,r.geoPattersonRaw=$i,r.geoPolyconic=ms,r.geoPolyconicRaw=ya,r.geoPolyhedral=Ga,r.geoPolyhedralButterfly=jo,r.geoPolyhedralCollignon=Ea,r.geoPolyhedralWaterman=ws,r.geoProject=mo,r.geoGringortenQuincuncial=Ka,r.geoPeirceQuincuncial=ba,r.geoPierceQuincuncial=ba,r.geoQuantize=G,r.geoQuincuncial=Zi,r.geoRectangularPolyconic=Ot,r.geoRectangularPolyconicRaw=tt,r.geoRobinson=me,r.geoRobinsonRaw=qt,r.geoSatellite=ze,r.geoSatelliteRaw=Re,r.geoSinuMollweide=Xr,r.geoSinuMollweideRaw=br,r.geoSinusoidal=$e,r.geoSinusoidalRaw=Se,r.geoStitch=Jt,r.geoTimes=te,r.geoTimesRaw=ce,r.geoTwoPointAzimuthal=Ve,r.geoTwoPointAzimuthalRaw=ve,r.geoTwoPointAzimuthalUsa=Be,r.geoTwoPointEquidistant=rn,r.geoTwoPointEquidistantRaw=De,r.geoTwoPointEquidistantUsa=Xe,r.geoVanDerGrinten=yn,r.geoVanDerGrintenRaw=wn,r.geoVanDerGrinten2=In,r.geoVanDerGrinten2Raw=kn,r.geoVanDerGrinten3=We,r.geoVanDerGrinten3Raw=Ln,r.geoVanDerGrinten4=qn,r.geoVanDerGrinten4Raw=Rn,r.geoWagner4=vr,r.geoWagner4Raw=Zn,r.geoWagner6=Nr,r.geoWagner6Raw=Sr,r.geoWagner7=Si,r.geoWagner7Raw=_a,r.geoWiechel=Fo,r.geoWiechelRaw=Bo,r.geoWinkel3=Fs,r.geoWinkel3Raw=Bs,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(w){c(u,w,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(w,O,W){var N=w.s=O+W,q=N-O,Et=N-q;w.t=O-Et+(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,E=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(w){return w>0?1:w<0?-1:0},st=Math.sqrt,yt=Math.tan;function Q(w){return w>1?0:w<-1?d:Math.acos(w)}function it(w){return w>1?v:w<-1?-v:Math.asin(w)}function Pt(w){return(w=j(w/2))*w}function ht(){}function lt(w,O){w&&xt.hasOwnProperty(w.type)&&xt[w.type](w,O)}var $={Feature:function(w,O){lt(w.geometry,O)},FeatureCollection:function(w,O){for(var W=w.features,N=-1,q=W.length;++N=0?1:-1,q=N*W,Et=_(O),ut=j(O),wt=P*ut,Mt=gt*Et+wt*_(q),Bt=wt*N*j(q);Ie.add(M(Bt,Mt)),ft=w,gt=Et,P=ut}function Z(w){return _e.reset(),Qt(w,Kt),_e*2}function mt(w){return[M(w[1],w[0]),it(w[2])]}function S(w){var O=w[0],W=w[1],N=_(W);return[N*_(O),N*j(O),j(W)]}function R(w,O){return w[0]*O[0]+w[1]*O[1]+w[2]*O[2]}function T(w,O){return[w[1]*O[2]-w[2]*O[1],w[2]*O[0]-w[0]*O[2],w[0]*O[1]-w[1]*O[0]]}function z(w,O){w[0]+=O[0],w[1]+=O[1],w[2]+=O[2]}function J(w,O){return[w[0]*O,w[1]*O,w[2]*O]}function pt(w){var O=st(w[0]*w[0]+w[1]*w[1]+w[2]*w[2]);w[0]/=O,w[1]/=O,w[2]/=O}var It,Zt,Lt,Yt,Se,$e,fn,on,mn=s(),Sn,xn,bn={point:Tn,lineStart:Ht,lineEnd:kt,polygonStart:function(){bn.point=oe,bn.lineStart=fe,bn.lineEnd=Ge,mn.reset(),Kt.polygonStart()},polygonEnd:function(){Kt.polygonEnd(),bn.point=Tn,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 Tn(w,O){Sn.push(xn=[It=w,Lt=w]),OYt&&(Yt=O)}function Dn(w,O){var W=S([w*y,O*y]);if(on){var N=T(on,W),q=[N[1],-N[0],0],Et=T(q,N);pt(Et),Et=mt(Et);var ut=w-Se,wt=ut>0?1:-1,Mt=Et[0]*m*wt,Bt,jt=E(ut)>180;jt^(wt*SeYt&&(Yt=Bt)):(Mt=(Mt+360)%360-180,jt^(wt*SeYt&&(Yt=O))),jt?wFn(It,Lt)&&(Lt=w):Fn(w,Lt)>Fn(It,Lt)&&(It=w):Lt>=It?(wLt&&(Lt=w)):w>Se?Fn(It,w)>Fn(It,Lt)&&(Lt=w):Fn(w,Lt)>Fn(It,Lt)&&(It=w)}else Sn.push(xn=[It=w,Lt=w]);OYt&&(Yt=O),on=W,Se=w}function Ht(){bn.point=Dn}function kt(){xn[0]=It,xn[1]=Lt,bn.point=Tn,on=null}function oe(w,O){if(on){var W=w-Se;mn.add(E(W)>180?W+(W>0?360:-360):W)}else $e=w,fn=O;Kt.point(w,O),Dn(w,O)}function fe(){Kt.lineStart()}function Ge(){oe($e,fn),Kt.lineEnd(),E(mn)>f&&(It=-(Lt=180)),xn[0]=It,xn[1]=Lt,on=null}function Fn(w,O){return(O-=w)<0?O+360:O}function Pr(w,O){return w[0]-O[0]}function pr(w,O){return w[0]<=w[1]?w[0]<=O&&O<=w[1]:OFn(N[0],N[1])&&(N[1]=q[1]),Fn(q[0],N[1])>Fn(N[0],N[1])&&(N[0]=q[0])):Et.push(N=q);for(ut=-1/0,W=Et.length-1,O=0,N=Et[W];O<=W;N=q,++O)q=Et[O],(wt=Fn(N[1],q[0]))>ut&&(ut=wt,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,Te,Ke,un,an,Ce,nn,vn,ye,dn,gn,vt={sphere:ht,point:Ct,lineStart:$t,lineEnd:Wt,polygonStart:function(){vt.lineStart=ne,vt.lineEnd=ae},polygonEnd:function(){vt.lineStart=$t,vt.lineEnd=Wt}};function Ct(w,O){w*=y,O*=y;var W=_(O);Tt(W*_(w),W*j(w),j(O))}function Tt(w,O,W){++sr,zt+=(w-zt)/sr,ie+=(O-ie)/sr,ue+=(W-ue)/sr}function $t(){vt.point=Vt}function Vt(w,O){w*=y,O*=y;var W=_(O);ye=W*_(w),dn=W*j(w),gn=j(O),vt.point=se,Tt(ye,dn,gn)}function se(w,O){w*=y,O*=y;var W=_(O),N=W*_(w),q=W*j(w),Et=j(O),ut=M(st((ut=dn*Et-gn*q)*ut+(ut=gn*N-ye*Et)*ut+(ut=ye*q-dn*N)*ut),ye*N+dn*q+gn*Et);Ft+=ut,be+=ut*(ye+(ye=N)),Te+=ut*(dn+(dn=q)),Ke+=ut*(gn+(gn=Et)),Tt(ye,dn,gn)}function Wt(){vt.point=Ct}function ne(){vt.point=ge}function ae(){Pe(nn,vn),vt.point=Ct}function ge(w,O){nn=w,vn=O,w*=y,O*=y,vt.point=Pe;var W=_(O);ye=W*_(w),dn=W*j(w),gn=j(O),Tt(ye,dn,gn)}function Pe(w,O){w*=y,O*=y;var W=_(O),N=W*_(w),q=W*j(w),Et=j(O),ut=dn*Et-gn*q,wt=gn*N-ye*Et,Mt=ye*q-dn*N,Bt=st(ut*ut+wt*wt+Mt*Mt),jt=it(Bt),ee=Bt&&-jt/Bt;un+=ee*ut,an+=ee*wt,Ce+=ee*Mt,Ft+=jt,be+=jt*(ye+(ye=N)),Te+=jt*(dn+(dn=q)),Ke+=jt*(gn+(gn=Et)),Tt(ye,dn,gn)}function ke(w){sr=Ft=zt=ie=ue=be=Te=Ke=un=an=Ce=0,Qt(w,vt);var O=un,W=an,N=Ce,q=O*O+W*W+N*N;return qd?w+Math.round(-w/p)*p:w,O]}En.invert=En;function Qn(w,O,W){return(w%=p)?O||W?tn(cr(w),xr(O,W)):cr(w):O||W?xr(O,W):En}function fr(w){return function(O,W){return O+=w,[O>d?O-p:O<-d?O+p:O,W]}}function cr(w){var O=fr(w);return O.invert=fr(-w),O}function xr(w,O){var W=_(w),N=j(w),q=_(O),Et=j(O);function ut(wt,Mt){var Bt=_(Mt),jt=_(wt)*Bt,ee=j(wt)*Bt,Jt=j(Mt),ce=Jt*W+jt*N;return[M(ee*q-ce*Et,jt*W-Jt*N),it(ce*q+ee*Et)]}return ut.invert=function(wt,Mt){var Bt=_(Mt),jt=_(wt)*Bt,ee=j(wt)*Bt,Jt=j(Mt),ce=Jt*q-ee*Et;return[M(ee*q+Jt*Et,jt*W+ce*N),it(ce*W-jt*N)]},ut}function Qr(w){w=Qn(w[0]*y,w[1]*y,w.length>2?w[2]*y:0);function O(W){return W=w(W[0]*y,W[1]*y),W[0]*=m,W[1]*=m,W}return O.invert=function(W){return W=w.invert(W[0]*y,W[1]*y),W[0]*=m,W[1]*=m,W},O}function vi(w,O,W,N,q,Et){if(!!W){var ut=_(O),wt=j(O),Mt=N*W;q==null?(q=O+N*p,Et=O-Mt/2):(q=gi(ut,q),Et=gi(ut,Et),(N>0?qEt)&&(q+=N*p));for(var Bt,jt=q;N>0?jt>Et:jt1&&w.push(w.pop().concat(w.shift()))},result:function(){var W=w;return w=[],O=null,W}}}function Ba(w,O){return E(w[0]-O[0])=0;--wt)q.point((ee=jt[wt])[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 ha(w){if(!!(O=w.length)){for(var O,W=0,N=w[0],q;++W=0?1:-1,In=kn*yn,Ln=In>d,We=le*rn;if(Fa.add(M(We*kn*j(In),ve*wn+We*_(In))),ut+=Ln?yn+kn*p:yn,Ln^ce>=W^De>=W){var Rn=T(S(Jt),S(Ve));pt(Rn);var qn=T(Et,Rn);pt(qn);var Un=(Ln^yn>=0?-1:1)*it(qn[2]);(N>Un||N===Un&&(Rn[0]||Rn[1]))&&(wt+=Ln^yn>=0?1:-1)}}return(ut<-f||ut0){for(Mt||(q.polygonStart(),Mt=!0),q.lineStart(),wn=0;wn1&&Xe&2&&rn.push(rn.pop().concat(rn.shift())),jt.push(rn.filter(X))}}return Jt}}function X(w){return w.length>1}function At(w,O){return((w=w.x)[0]<0?w[1]-v-f:v-w[1])-((O=O.x)[0]<0?O[1]-v-f:v-O[1])}var Ut=ao(function(){return!0},de,Le,[-d,-v]);function de(w){var O=NaN,W=NaN,N=NaN,q;return{lineStart:function(){w.lineStart(),q=1},point:function(Et,ut){var wt=Et>0?d:-d,Mt=E(Et-O);E(Mt-d)0?v:-v),w.point(N,W),w.lineEnd(),w.lineStart(),w.point(wt,W),w.point(Et,W),q=0):N!==wt&&Mt>=d&&(E(O-N)f?x((j(O)*(Et=_(N))*j(W)-j(N)*(q=_(O))*j(w))/(q*Et*ut)):(O+N)/2}function Le(w,O,W,N){var q;if(w==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(E(w[0]-O[0])>f){var Et=w[0]0,q=E(O)>f;function Et(jt,ee,Jt,ce){vi(ce,w,W,Jt,jt,ee)}function ut(jt,ee){return _(jt)*_(ee)>O}function wt(jt){var ee,Jt,ce,te,le;return{lineStart:function(){te=ce=!1,le=1},point:function(ve,Be){var Ve=[ve,Be],De,Xe=ut(ve,Be),rn=N?Xe?0:Bt(ve,Be):Xe?Bt(ve+(ve<0?d:-d),Be):0;if(!ee&&(te=ce=Xe)&&jt.lineStart(),Xe!==ce&&(De=Mt(ee,Ve),(!De||Ba(ee,De)||Ba(Ve,De))&&(Ve[2]=1)),Xe!==ce)le=0,Xe?(jt.lineStart(),De=Mt(Ve,ee),jt.point(De[0],De[1])):(De=Mt(ee,Ve),jt.point(De[0],De[1],2),jt.lineEnd()),ee=De;else if(q&&ee&&N^Xe){var wn;!(rn&Jt)&&(wn=Mt(Ve,ee,!0))&&(le=0,N?(jt.lineStart(),jt.point(wn[0][0],wn[0][1]),jt.point(wn[1][0],wn[1][1]),jt.lineEnd()):(jt.point(wn[1][0],wn[1][1]),jt.lineEnd(),jt.lineStart(),jt.point(wn[0][0],wn[0][1],3)))}Xe&&(!ee||!Ba(ee,Ve))&&jt.point(Ve[0],Ve[1]),ee=Ve,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=T(ce,te),Be=R(ve,ve),Ve=ve[0],De=Be-Ve*Ve;if(!De)return!Jt&&jt;var Xe=O*Be/De,rn=-O*Ve/De,wn=T(le,ve),yn=J(le,Xe),kn=J(ve,rn);z(yn,kn);var In=wn,Ln=R(yn,In),We=R(In,In),Rn=Ln*Ln-We*(R(yn,yn)-1);if(!(Rn<0)){var qn=st(Rn),Un=J(In,(-Ln-qn)/We);if(z(Un,yn),Un=mt(Un),!Jt)return Un;var sn=jt[0],Zn=ee[0],vr=jt[1],Sr=ee[1],Nr;Zn0^Un[1]<(E(Un[0]-sn)d^(sn<=Un[0]&&Un[0]<=Zn)){var Fo=J(In,(-Ln+qn)/We);return z(Fo,yn),[Un,mt(Fo)]}}}function Bt(jt,ee){var Jt=N?w:d-w,ce=0;return jt<-Jt?ce|=1:jt>Jt&&(ce|=2),ee<-Jt?ce|=4:ee>Jt&&(ce|=8),ce}return ao(ut,wt,Et,N?[0,-w]:[-d,w-d])}function xe(w,O,W,N,q,Et){var ut=w[0],wt=w[1],Mt=O[0],Bt=O[1],jt=0,ee=1,Jt=Mt-ut,ce=Bt-wt,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=Et-wt,!(!ce&&te<0)){if(te/=ce,ce<0){if(te>ee)return;te>jt&&(jt=te)}else if(ce>0){if(te0&&(w[0]=ut+jt*Jt,w[1]=wt+jt*ce),ee<1&&(O[0]=ut+ee*Jt,O[1]=wt+ee*ce),!0}}}}}var Qe=1e9,Mn=-Qe;function pn(w,O,W,N){function q(Bt,jt){return w<=Bt&&Bt<=W&&O<=jt&&jt<=N}function Et(Bt,jt,ee,Jt){var ce=0,te=0;if(Bt==null||(ce=ut(Bt,ee))!==(te=ut(jt,ee))||Mt(Bt,jt)<0^ee>0)do Jt.point(ce===0||ce===3?w:W,ce>1?N:O);while((ce=(ce+ee+4)%4)!==te);else Jt.point(jt[0],jt[1])}function ut(Bt,jt){return E(Bt[0]-w)0?0:3:E(Bt[0]-W)0?2:1:E(Bt[1]-O)0?1:0:jt>0?3:2}function wt(Bt,jt){return Mt(Bt.x,jt.x)}function Mt(Bt,jt){var ee=ut(Bt,1),Jt=ut(jt,1);return ee!==Jt?ee-Jt:ee===0?jt[1]-Bt[1]:ee===1?Bt[0]-jt[0]:ee===2?Bt[1]-jt[1]:jt[0]-Bt[0]}return function(Bt){var jt=Bt,ee=ji(),Jt,ce,te,le,ve,Be,Ve,De,Xe,rn,wn,yn={point:kn,lineStart:Rn,lineEnd:qn,polygonStart:Ln,polygonEnd:We};function kn(sn,Zn){q(sn,Zn)&&jt.point(sn,Zn)}function In(){for(var sn=0,Zn=0,vr=ce.length;ZnN&&(Bs-Bo)*(N-Fo)>(Fs-Fo)*(w-Bo)&&++sn:Fs<=N&&(Bs-Bo)*(N-Fo)<(Fs-Fo)*(w-Bo)&&--sn;return sn}function Ln(){jt=ee,Jt=[],ce=[],wn=!0}function We(){var sn=In(),Zn=wn&&sn,vr=(Jt=o.merge(Jt)).length;(Zn||vr)&&(Bt.polygonStart(),Zn&&(Bt.lineStart(),Et(null,null,1,Bt),Bt.lineEnd()),vr&&ca(Jt,wt,sn,Et,Bt),Bt.polygonEnd()),jt=Bt,Jt=ce=te=null}function Rn(){yn.point=Un,ce&&ce.push(te=[]),rn=!0,Xe=!1,Ve=De=NaN}function qn(){Jt&&(Un(le,ve),Be&&Xe&&ee.rejoin(),Jt.push(ee.result())),yn.point=kn,Xe&&jt.lineEnd()}function Un(sn,Zn){var vr=q(sn,Zn);if(ce&&te.push([sn,Zn]),rn)le=sn,ve=Zn,Be=vr,rn=!1,vr&&(jt.lineStart(),jt.point(sn,Zn));else if(vr&&Xe)jt.point(sn,Zn);else{var Sr=[Ve=Math.max(Mn,Math.min(Qe,Ve)),De=Math.max(Mn,Math.min(Qe,De))],Nr=[sn=Math.max(Mn,Math.min(Qe,sn)),Zn=Math.max(Mn,Math.min(Qe,Zn))];xe(Sr,Nr,w,O,W,N)?(Xe||(jt.lineStart(),jt.point(Sr[0],Sr[1])),jt.point(Nr[0],Nr[1]),vr||jt.lineEnd(),wn=!1):vr&&(jt.lineStart(),jt.point(sn,Zn),wn=!1)}Ve=sn,De=Zn,Xe=vr}return yn}}function An(){var w=0,O=0,W=960,N=500,q,Et,ut;return ut={stream:function(wt){return q&&Et===wt?q:q=pn(w,O,W,N)(Et=wt)},extent:function(wt){return arguments.length?(w=+wt[0][0],O=+wt[0][1],W=+wt[1][0],N=+wt[1][1],q=Et=null,ut):[[w,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(w,O){w*=y,O*=y,Kn=w,Gn=j(O),Jn=_(O),Vn.point=dr}function dr(w,O){w*=y,O*=y;var W=j(O),N=_(O),q=E(w-Kn),Et=_(q),ut=j(q),wt=N*ut,Mt=Jn*W-Gn*N*Et,Bt=Gn*W+Jn*N*Et;On.add(M(st(wt*wt+Mt*Mt),Bt)),Kn=w,Gn=W,Jn=N}function Dr(w){return On.reset(),Qt(w,Vn),+On}var Ar=[null,null],Hr={type:"LineString",coordinates:Ar};function Tr(w,O){return Ar[0]=w,Ar[1]=O,Dr(Hr)}var br={Feature:function(w,O){return _r(w.geometry,O)},FeatureCollection:function(w,O){for(var W=w.features,N=-1,q=W.length;++N0&&(q=Tr(w[Et],w[Et-1]),q>0&&W<=q&&N<=q&&(W+N-q)*(1-Math.pow((W-N)/q,2))f}).map(Jt)).concat(o.range(D(Et/Bt)*Bt,q,Bt).filter(function(De){return E(De%ee)>f}).map(ce))}return Be.lines=function(){return Ve().map(function(De){return{type:"LineString",coordinates:De}})},Be.outline=function(){return{type:"Polygon",coordinates:[te(N).concat(le(ut).slice(1),te(W).reverse().slice(1),le(wt).reverse().slice(1))]}},Be.extent=function(De){return arguments.length?Be.extentMajor(De).extentMinor(De):Be.extentMinor()},Be.extentMajor=function(De){return arguments.length?(N=+De[0][0],W=+De[1][0],wt=+De[0][1],ut=+De[1][1],N>W&&(De=N,N=W,W=De),wt>ut&&(De=wt,wt=ut,ut=De),Be.precision(ve)):[[N,wt],[W,ut]]},Be.extentMinor=function(De){return arguments.length?(O=+De[0][0],w=+De[1][0],Et=+De[0][1],q=+De[1][1],O>w&&(De=O,O=w,w=De),Et>q&&(De=Et,Et=q,q=De),Be.precision(ve)):[[O,Et],[w,q]]},Be.step=function(De){return arguments.length?Be.stepMajor(De).stepMinor(De):Be.stepMinor()},Be.stepMajor=function(De){return arguments.length?(jt=+De[0],ee=+De[1],Be):[jt,ee]},Be.stepMinor=function(De){return arguments.length?(Mt=+De[0],Bt=+De[1],Be):[Mt,Bt]},Be.precision=function(De){return arguments.length?(ve=+De,Jt=da(Et,q,90),ce=ui(O,w,ve),te=da(wt,ut,90),le=ui(N,W,ve),Be):ve},Be.extentMajor([[-180,-90+f],[180,90-f]]).extentMinor([[-180,-80-f],[180,80+f]])}function Ur(){return Li()()}function oo(w,O){var W=w[0]*y,N=w[1]*y,q=O[0]*y,Et=O[1]*y,ut=_(N),wt=j(N),Mt=_(Et),Bt=j(Et),jt=ut*_(W),ee=ut*j(W),Jt=Mt*_(q),ce=Mt*j(q),te=2*it(st(Pt(Et-N)+ut*Mt*Pt(q-W))),le=j(te),ve=te?function(Be){var Ve=j(Be*=te)/le,De=j(te-Be)/le,Xe=De*jt+Ve*Jt,rn=De*ee+Ve*ce,wn=De*wt+Ve*Bt;return[M(rn,Xe)*m,M(wn,st(Xe*Xe+rn*rn))*m]}:function(){return[W*m,N*m]};return ve.distance=te,ve}function Yi(w){return w}var $r=s(),ea=s(),Or,na,Di,yi,Jr={point:ht,lineStart:ht,lineEnd:ht,polygonStart:function(){Jr.lineStart=Na,Jr.lineEnd=Wi},polygonEnd:function(){Jr.lineStart=Jr.lineEnd=Jr.point=ht,$r.add(E(ea)),ea.reset()},result:function(){var w=$r/2;return $r.reset(),w}};function Na(){Jr.point=so}function so(w,O){Jr.point=Hi,Or=Di=w,na=yi=O}function Hi(w,O){ea.add(yi*w-Di*O),Di=w,yi=O}function Wi(){Hi(Or,na)}var xi=1/0,ra=xi,Ei=-xi,Gi=Ei,Vi={point:ia,lineStart:ht,lineEnd:ht,polygonStart:ht,polygonEnd:ht,result:function(){var w=[[xi,ra],[Ei,Gi]];return Ei=Gi=-(ra=xi=1/0),w}};function ia(w,O){wEi&&(Ei=w),OGi&&(Gi=O)}var ka=0,Ri=0,Kr=0,Zr=0,Ir=0,fi=0,Ao=0,wi=0,ni=0,ri,va,Bi,Xi,ci={point:ii,lineStart:za,lineEnd:Wo,polygonStart:function(){ci.lineStart=ga,ci.lineEnd=Ya},polygonEnd:function(){ci.point=ii,ci.lineStart=za,ci.lineEnd=Wo},result:function(){var w=ni?[Ao/ni,wi/ni]:fi?[Zr/fi,Ir/fi]:Kr?[ka/Kr,Ri/Kr]:[NaN,NaN];return ka=Ri=Kr=Zr=Ir=fi=Ao=wi=ni=0,w}};function ii(w,O){ka+=w,Ri+=O,++Kr}function za(){ci.point=lo}function lo(w,O){ci.point=Ho,ii(Bi=w,Xi=O)}function Ho(w,O){var W=w-Bi,N=O-Xi,q=st(W*W+N*N);Zr+=q*(Bi+w)/2,Ir+=q*(Xi+O)/2,fi+=q,ii(Bi=w,Xi=O)}function Wo(){ci.point=ii}function ga(){ci.point=aa}function Ya(){vs(ri,va)}function aa(w,O){ci.point=vs,ii(ri=Bi=w,va=Xi=O)}function vs(w,O){var W=w-Bi,N=O-Xi,q=st(W*W+N*N);Zr+=q*(Bi+w)/2,Ir+=q*(Xi+O)/2,fi+=q,q=Xi*w-Bi*O,Ao+=q*(Bi+w),wi+=q*(Xi+O),ni+=q*3,ii(Bi=w,Xi=O)}function uo(w){this._context=w}uo.prototype={_radius:4.5,pointRadius:function(w){return this._radius=w,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(w,O){switch(this._point){case 0:{this._context.moveTo(w,O),this._point=1;break}case 1:{this._context.lineTo(w,O);break}default:{this._context.moveTo(w+this._radius,O),this._context.arc(w,O,this._radius,0,p);break}}},result:ht};var pa=s(),Ui,fo,To,co,ma,oa={point:ht,lineStart:function(){oa.point=gs},lineEnd:function(){Ui&&Go(fo,To),oa.point=ht},polygonStart:function(){Ui=!0},polygonEnd:function(){Ui=null},result:function(){var w=+pa;return pa.reset(),w}};function gs(w,O){oa.point=Go,fo=co=w,To=ma=O}function Go(w,O){co-=w,ma-=O,pa.add(st(co*co+ma*ma)),co=w,ma=O}function ho(){this._string=[]}ho.prototype={_radius:4.5,_circle:Vo(4.5),pointRadius:function(w){return(w=+w)!==this._radius&&(this._radius=w,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(w,O){switch(this._point){case 0:{this._string.push("M",w,",",O),this._point=1;break}case 1:{this._string.push("L",w,",",O);break}default:{this._circle==null&&(this._circle=Vo(this._radius)),this._string.push("M",w,",",O,this._circle);break}}},result:function(){if(this._string.length){var w=this._string.join("");return this._string=[],w}else return null}};function Vo(w){return"m0,"+w+"a"+w+","+w+" 0 1,1 0,"+-2*w+"a"+w+","+w+" 0 1,1 0,"+2*w+"z"}function ps(w,O){var W=4.5,N,q;function Et(ut){return ut&&(typeof W=="function"&&q.pointRadius(+W.apply(this,arguments)),Qt(ut,N(q))),q.result()}return Et.area=function(ut){return Qt(ut,N(Jr)),Jr.result()},Et.measure=function(ut){return Qt(ut,N(oa)),oa.result()},Et.bounds=function(ut){return Qt(ut,N(Vi)),Vi.result()},Et.centroid=function(ut){return Qt(ut,N(ci)),ci.result()},Et.projection=function(ut){return arguments.length?(N=ut==null?(w=null,Yi):(w=ut).stream,Et):w},Et.context=function(ut){return arguments.length?(q=ut==null?(O=null,new ho):new uo(O=ut),typeof W!="function"&&q.pointRadius(W),Et):O},Et.pointRadius=function(ut){return arguments.length?(W=typeof ut=="function"?ut:(q.pointRadius(+ut),+ut),Et):W},Et.projection(w).context(O)}function Ha(w){return{stream:Mi(w)}}function Mi(w){return function(O){var W=new $i;for(var N in w)W[N]=w[N];return W.stream=O,W}}function $i(){}$i.prototype={constructor:$i,point:function(w,O){this.stream.point(w,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 Wa(w,O,W){var N=w.clipExtent&&w.clipExtent();return w.scale(150).translate([0,0]),N!=null&&w.clipExtent(null),Qt(W,w.stream(Vi)),O(Vi.result()),N!=null&&w.clipExtent(N),w}function ya(w,O,W){return Wa(w,function(N){var q=O[1][0]-O[0][0],Et=O[1][1]-O[0][1],ut=Math.min(q/(N[1][0]-N[0][0]),Et/(N[1][1]-N[0][1])),wt=+O[0][0]+(q-ut*(N[1][0]+N[0][0]))/2,Mt=+O[0][1]+(Et-ut*(N[1][1]+N[0][1]))/2;w.scale(150*ut).translate([wt,Mt])},W)}function ms(w,O,W){return ya(w,[[0,0],O],W)}function Oo(w,O,W){return Wa(w,function(N){var q=+O,Et=q/(N[1][0]-N[0][0]),ut=(q-Et*(N[1][0]+N[0][0]))/2,wt=-Et*N[0][1];w.scale(150*Et).translate([ut,wt])},W)}function ys(w,O,W){return Wa(w,function(N){var q=+O,Et=q/(N[1][1]-N[0][1]),ut=-Et*N[0][0],wt=(q-Et*(N[1][1]+N[0][1]))/2;w.scale(150*Et).translate([ut,wt])},W)}var Io=16,Ds=_(30*y);function Ki(w,O){return+O?Ga(w,O):xs(w)}function xs(w){return Mi({point:function(O,W){O=w(O,W),this.stream.point(O[0],O[1])}})}function Ga(w,O){function W(N,q,Et,ut,wt,Mt,Bt,jt,ee,Jt,ce,te,le,ve){var Be=Bt-N,Ve=jt-q,De=Be*Be+Ve*Ve;if(De>4*O&&le--){var Xe=ut+Jt,rn=wt+ce,wn=Mt+te,yn=st(Xe*Xe+rn*rn+wn*wn),kn=it(wn/=yn),In=E(E(wn)-1)O||E((Be*qn+Ve*Un)/De-.5)>.3||ut*Jt+wt*ce+Mt*te2?sn[2]%360*y:0,qn()):[wt*m,Mt*m,Bt*m]},We.angle=function(sn){return arguments.length?(ee=sn%360*y,qn()):ee*m},We.reflectX=function(sn){return arguments.length?(Jt=sn?-1:1,qn()):Jt<0},We.reflectY=function(sn){return arguments.length?(ce=sn?-1:1,qn()):ce<0},We.precision=function(sn){return arguments.length?(wn=Ki(yn,rn=sn*sn),Un()):st(rn)},We.fitExtent=function(sn,Zn){return ya(We,sn,Zn)},We.fitSize=function(sn,Zn){return ms(We,sn,Zn)},We.fitWidth=function(sn,Zn){return Oo(We,sn,Zn)},We.fitHeight=function(sn,Zn){return ys(We,sn,Zn)};function qn(){var sn=Es(W,0,0,Jt,ce,ee).apply(null,O(Et,ut)),Zn=(ee?Es:vo)(W,N-sn[0],q-sn[1],Jt,ce,ee);return jt=Qn(wt,Mt,Bt),yn=tn(O,Zn),kn=tn(jt,yn),wn=Ki(yn,rn),Un()}function Un(){return In=Ln=null,We}return function(){return O=w.apply(this,arguments),We.invert=O.invert&&Rn,qn()}}function xa(w){var O=0,W=d/3,N=go(w),q=N(O,W);return q.parallels=function(Et){return arguments.length?N(O=Et[0]*y,W=Et[1]*y):[O*m,W*m]},q}function jo(w){var O=_(w);function W(N,q){return[N*O,j(q)/O]}return W.invert=function(N,q){return[N/O,it(q*O)]},W}function Lo(w,O){var W=j(w),N=(W+j(O))/2;if(E(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 w&&O===Jt?w:w=ws([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(Bt),Et=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(Bt),wt=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(Bt),ee()},jt.fitExtent=function(Jt,ce){return ya(jt,Jt,ce)},jt.fitSize=function(Jt,ce){return ms(jt,Jt,ce)},jt.fitWidth=function(Jt,ce){return Oo(jt,Jt,ce)},jt.fitHeight=function(Jt,ce){return ys(jt,Jt,ce)};function ee(){return w=O=null,jt}return jt.scale(1070)}function Xo(w){return function(O,W){var N=_(O),q=_(W),Et=w(N*q);return[Et*q*j(O),Et*j(W)]}}function Xa(w){return function(O,W){var N=st(O*O+W*W),q=w(N),Et=j(q),ut=_(q);return[M(O*Et,N*ut),it(N&&W*Et/N)]}}var _i=Xo(function(w){return st(2/(1+w))});_i.invert=Xa(function(w){return 2*it(w/2)});function Do(){return bi(_i).scale(124.75).clipAngle(180-.001)}var Uo=Xo(function(w){return(w=Q(w))&&w/j(w)});Uo.invert=Xa(function(w){return w});function wa(){return bi(Uo).scale(79.4188).clipAngle(180-.001)}function mo(w,O){return[w,F(yt((v+O)/2))]}mo.invert=function(w,O){return[w,2*x(C(O))-v]};function Rs(){return Ua(mo).scale(961/p)}function Ua(w){var O=bi(w),W=O.center,N=O.scale,q=O.translate,Et=O.clipExtent,ut=null,wt,Mt,Bt;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=wt=Mt=Bt=null:(ut=+ee[0][0],wt=+ee[0][1],Mt=+ee[1][0],Bt=+ee[1][1]),jt()):ut==null?null:[[ut,wt],[Mt,Bt]]};function jt(){var ee=d*N(),Jt=O(Qr(O.rotate()).invert([0,0]));return Et(ut==null?[[Jt[0]-ee,Jt[1]-ee],[Jt[0]+ee,Jt[1]+ee]]:w===mo?[[Math.max(Jt[0]-ee,ut),wt],[Math.min(Jt[0]+ee,Mt),Bt]]:[[ut,Math.max(Jt[1]-ee,wt)],[Mt,Math.min(Jt[1]+ee,Bt)]])}return jt()}function yo(w){return yt((v+w)/2)}function Ro(w,O){var W=_(w),N=w===O?j(w):F(W/_(O))/F(yo(O)/yo(w)),q=W*k(yo(w),N)/N;if(!N)return mo;function Et(ut,wt){q>0?wt<-v+f&&(wt=-v+f):wt>v-f&&(wt=v-f);var Mt=q/k(yo(wt),N);return[Mt*j(N*ut),q-Mt*_(N*ut)]}return Et.invert=function(ut,wt){var Mt=q-wt,Bt=V(N)*st(ut*ut+Mt*Mt),jt=M(ut,E(Mt))*V(Mt);return Mt*N<0&&(jt-=d*V(ut)*V(Mt)),[jt/N,2*x(k(q/Bt,1/N))-v]},Et}function jr(){return xa(Ro).scale(109.5).parallels([30,30])}function Fr(w,O){return[w,O]}Fr.invert=Fr;function Ma(){return bi(Fr).scale(152.63)}function $a(w,O){var W=_(w),N=w===O?j(w):(W-_(O))/(O-w),q=W/N+w;if(E(N)f&&--N>0);return[w/(.8707+(Et=W*W)*(-.131979+Et*(-.013791+Et*Et*Et*(.003971-.001529*Et)))),W]};function Ze(){return bi(ze).scale(175.295)}function we(w,O){return[_(O)*j(w),j(O)]}we.invert=Xa(it);function Ye(){return bi(we).scale(249.5).clipAngle(90+f)}function I(w,O){var W=_(O),N=1+_(w)*W;return[W*j(w)/N,j(O)/N]}I.invert=Xa(function(w){return 2*x(w)});function Y(){return bi(I).scale(250).clipAngle(142)}function et(w,O){return[F(yt((v+O)/2)),-w]}et.invert=function(w,O){return[-O,2*x(C(w))-v]};function nt(){var w=Ua(et),O=w.center,W=w.rotate;return w.center=function(N){return arguments.length?O([-N[1],N[0]]):(N=O(),[N[1],-N[0]])},w.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=Ea,r.geoAlbersUsa=Va,r.geoArea=Z,r.geoAzimuthalEqualArea=Do,r.geoAzimuthalEqualAreaRaw=_i,r.geoAzimuthalEquidistant=wa,r.geoAzimuthalEquidistantRaw=Uo,r.geoBounds=Lr,r.geoCentroid=ke,r.geoCircle=fa,r.geoClipAntimeridian=Ut,r.geoClipCircle=He,r.geoClipExtent=An,r.geoClipRectangle=pn,r.geoConicConformal=jr,r.geoConicConformalRaw=Ro,r.geoConicEqualArea=po,r.geoConicEqualAreaRaw=Lo,r.geoConicEquidistant=sa,r.geoConicEquidistantRaw=$a,r.geoContains=ta,r.geoDistance=Tr,r.geoEqualEarth=qt,r.geoEqualEarthRaw=St,r.geoEquirectangular=Ma,r.geoEquirectangularRaw=Fr,r.geoGnomonic=Me,r.geoGnomonicRaw=me,r.geoGraticule=Li,r.geoGraticule10=Ur,r.geoIdentity=Re,r.geoInterpolate=oo,r.geoLength=Dr,r.geoMercator=Rs,r.geoMercatorRaw=mo,r.geoNaturalEarth1=Ze,r.geoNaturalEarth1Raw=ze,r.geoOrthographic=Ye,r.geoOrthographicRaw=we,r.geoPath=ps,r.geoProjection=bi,r.geoProjectionMutator=go,r.geoRotation=Qr,r.geoStereographic=Y,r.geoStereographicRaw=I,r.geoStream=Qt,r.geoTransform=Ha,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,E=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 $={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),Re=P*Me,ze=gt*me+Re*_(qt),Ze=Re*St*j(qt);Ie.add(M(Ze,ze)),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 R(G,tt){return G[0]*tt[0]+G[1]*tt[1]+G[2]*tt[2]}function T(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,$e,fn,on,mn=s(),Sn,xn,bn={point:Tn,lineStart:Ht,lineEnd:kt,polygonStart:function(){bn.point=oe,bn.lineStart=fe,bn.lineEnd=Ge,mn.reset(),Kt.polygonStart()},polygonEnd:function(){Kt.polygonEnd(),bn.point=Tn,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 Tn(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=T(on,Ot),qt=[St[1],-St[0],0],me=T(qt,St);pt(me),me=mt(me);var Me=G-Se,Re=Me>0?1:-1,ze=me[0]*m*Re,Ze,we=E(Me)>180;we^(Re*SeYt&&(Yt=Ze)):(ze=(ze+360)%360-180,we^(Re*SeYt&&(Yt=tt))),we?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=Tn,on=null}function oe(G,tt){if(on){var Ot=G-Se;mn.add(E(Ot)>180?Ot+(Ot>0?360:-360):Ot)}else $e=G,fn=tt;Kt.point(G,tt),Dn(G,tt)}function fe(){Kt.lineStart()}function Ge(){oe($e,fn),Kt.lineEnd(),E(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],(Re=Fn(St[1],qt[0]))>Me&&(Me=Re,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,Te,Ke,un,an,Ce,nn,vn,ye,dn,gn,vt={sphere:ht,point:Ct,lineStart:$t,lineEnd:Wt,polygonStart:function(){vt.lineStart=ne,vt.lineEnd=ae},polygonEnd:function(){vt.lineStart=$t,vt.lineEnd=Wt}};function Ct(G,tt){G*=y,tt*=y;var Ot=_(tt);Tt(Ot*_(G),Ot*j(G),j(tt))}function Tt(G,tt,Ot){++sr,zt+=(G-zt)/sr,ie+=(tt-ie)/sr,ue+=(Ot-ue)/sr}function $t(){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,Tt(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)),Te+=Me*(dn+(dn=qt)),Ke+=Me*(gn+(gn=me)),Tt(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),Tt(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,Re=gn*St-ye*me,ze=ye*qt-dn*St,Ze=st(Me*Me+Re*Re+ze*ze),we=it(Ze),Ye=Ze&&-we/Ze;un+=Ye*Me,an+=Ye*Re,Ce+=Ye*ze,Ft+=we,be+=we*(ye+(ye=St)),Te+=we*(dn+(dn=qt)),Ke+=we*(gn+(gn=me)),Tt(ye,dn,gn)}var ke=function(G){sr=Ft=zt=ie=ue=be=Te=Ke=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]}En.invert=En;function Qn(G,tt,Ot){return(G%=p)?tt||Ot?tn(cr(G),xr(tt,Ot)):cr(G):tt||Ot?xr(tt,Ot):En}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(Re,ze){var Ze=_(ze),we=_(Re)*Ze,Ye=j(Re)*Ze,I=j(ze),Y=I*Ot+we*St;return[M(Ye*qt-Y*me,we*Ot-I*St),it(Y*qt+Ye*me)]}return Me.invert=function(Re,ze){var Ze=_(ze),we=_(Re)*Ze,Ye=j(Re)*Ze,I=j(ze),Y=I*qt-Ye*me;return[M(Ye*qt+I*me,we*Ot+Y*St),it(Y*Ot-we*St)]},Me}var Qr=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 vi(G,tt,Ot,St,qt,me){if(!!Ot){var Me=_(tt),Re=j(tt),ze=St*Ot;qt==null?(qt=tt+St*p,me=tt-ze/2):(qt=gi(Me,qt),me=gi(Me,me),(St>0?qtme)&&(qt+=St*p));for(var Ze,we=qt;St>0?we>me:we1&&G.push(G.pop().concat(G.shift()))},result:function(){var Ot=G;return G=[],tt=null,Ot}}},Ba=function(G,tt,Ot,St,qt,me){var Me=G[0],Re=G[1],ze=tt[0],Ze=tt[1],we=0,Ye=1,I=ze-Me,Y=Ze-Re,et;if(et=Ot-Me,!(!I&&et>0)){if(et/=I,I<0){if(et0){if(et>Ye)return;et>we&&(we=et)}if(et=qt-Me,!(!I&&et<0)){if(et/=I,I<0){if(et>Ye)return;et>we&&(we=et)}else if(I>0){if(et0)){if(et/=Y,Y<0){if(et0){if(et>Ye)return;et>we&&(we=et)}if(et=me-Re,!(!Y&&et<0)){if(et/=Y,Y<0){if(et>Ye)return;et>we&&(we=et)}else if(Y>0){if(et0&&(G[0]=Me+we*I,G[1]=Re+we*Y),Ye<1&&(tt[0]=Me+Ye*I,tt[1]=Re+Ye*Y),!0}}}}},ei=function(G,tt){return E(G[0]-tt[0])=0;--Re)qt.point((Ye=we[Re])[0],Ye[1]);else St(I.x,I.p.x,-1,qt);I=I.p}I=I.o,we=I.z,Y=!Y}while(!I.v);qt.lineEnd()}}};function Fa(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+Ye+4)%4)!==et);else I.point(we[0],we[1])}function Me(Ze,we){return E(Ze[0]-G)0?0:3:E(Ze[0]-Ot)0?2:1:E(Ze[1]-tt)0?1:0:we>0?3:2}function Re(Ze,we){return ze(Ze.x,we.x)}function ze(Ze,we){var Ye=Me(Ze,1),I=Me(we,1);return Ye!==I?Ye-I:Ye===0?we[1]-Ze[1]:Ye===1?Ze[0]-we[0]:Ye===2?Ze[1]-we[1]:we[0]-Ze[0]}return function(Ze){var we=Ze,Ye=ji(),I,Y,et,nt,w,O,W,N,q,Et,ut,wt={point:Mt,lineStart:Jt,lineEnd:ce,polygonStart:jt,polygonEnd:ee};function Mt(le,ve){qt(le,ve)&&we.point(le,ve)}function Bt(){for(var le=0,ve=0,Be=Y.length;veSt&&(kn-wn)*(St-yn)>(In-yn)*(G-wn)&&++le:In<=St&&(kn-wn)*(St-yn)<(In-yn)*(G-wn)&&--le;return le}function jt(){we=Ye,I=[],Y=[],ut=!0}function ee(){var le=Bt(),ve=ut&&le,Be=(I=o.merge(I)).length;(ve||Be)&&(Ze.polygonStart(),ve&&(Ze.lineStart(),me(null,null,1,Ze),Ze.lineEnd()),Be&&ha(I,Re,le,me,Ze),Ze.polygonEnd()),we=Ze,I=Y=et=null}function Jt(){wt.point=te,Y&&Y.push(et=[]),Et=!0,q=!1,W=N=NaN}function ce(){I&&(te(nt,w),O&&q&&Ye.rejoin(),I.push(Ye.result())),wt.point=Mt,q&&we.lineEnd()}function te(le,ve){var Be=qt(le,ve);if(Y&&et.push([le,ve]),Et)nt=le,w=ve,O=Be,Et=!1,Be&&(we.lineStart(),we.point(le,ve));else if(Be&&q)we.point(le,ve);else{var Ve=[W=Math.max(pi,Math.min(zi,W)),N=Math.max(pi,Math.min(zi,N))],De=[le=Math.max(pi,Math.min(zi,le)),ve=Math.max(pi,Math.min(zi,ve))];Ba(Ve,De,G,tt,Ot,St)?(q||(we.lineStart(),we.point(Ve[0],Ve[1])),we.point(De[0],De[1]),Be||we.lineEnd(),ut=!1):Be&&(we.lineStart(),we.point(le,ve),ut=!1)}W=le,N=ve,q=Be}return wt}}var X=function(){var G=0,tt=0,Ot=960,St=500,qt,me,Me;return Me={stream:function(Re){return qt&&me===Re?qt:qt=ao(G,tt,Ot,St)(me=Re)},extent:function(Re){return arguments.length?(G=+Re[0][0],tt=+Re[0][1],Ot=+Re[1][0],St=+Re[1][1],qt=me=null,Me):[[G,tt],[Ot,St]]}}},At=s(),Ut=function(G,tt){var Ot=tt[0],St=tt[1],qt=[j(Ot),-_(Ot),0],me=0,Me=0;At.reset();for(var Re=0,ze=G.length;Re=0?1:-1,Mt=wt*ut,Bt=Mt>d,jt=et*q;if(At.add(M(jt*wt*j(Mt),nt*Et+jt*_(Mt))),me+=Bt?ut+wt*p:ut,Bt^I>=Ot^W>=Ot){var ee=T(S(Ye),S(O));pt(ee);var Jt=T(qt,ee);pt(Jt);var ce=(Bt^ut>=0?-1:1)*it(Jt[2]);(St>ce||St===ce&&(ee[0]||ee[1]))&&(Me+=Bt^ut>=0?1:-1)}}return(me<-f||mef}).map(I)).concat(o.range(D(me/Ze)*Ze,qt,Ze).filter(function(N){return E(N%Ye)>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(Re).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],Re=+N[0][1],Me=+N[1][1],St>Ot&&(N=St,St=Ot,Ot=N),Re>Me&&(N=Re,Re=Me,Me=N),O.precision(w)):[[St,Re],[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(w)):[[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?(we=+N[0],Ye=+N[1],O):[we,Ye]},O.stepMinor=function(N){return arguments.length?(ze=+N[0],Ze=+N[1],O):[ze,Ze]},O.precision=function(N){return arguments.length?(w=+N,I=br(me,qt,90),Y=Xr(tt,G,w),et=br(Re,Me,90),nt=Xr(St,Ot,w),O):w},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),Re=j(St),ze=_(me),Ze=j(me),we=Me*_(Ot),Ye=Me*j(Ot),I=ze*_(qt),Y=ze*j(qt),et=2*it(st(Pt(me-St)+Me*ze*Pt(qt-Ot))),nt=j(et),w=et?function(O){var W=j(O*=et)/nt,N=j(et-O)/nt,q=N*we+W*I,Et=N*Ye+W*Y,ut=N*Re+W*Ze;return[M(Et,q)*m,M(ut,st(q*q+Et*Et))*m]}:function(){return[Ot*m,St*m]};return w.distance=et,w},Rr=function(G){return G},mi=s(),Br=s(),ta,da,ui,Li,Ur={point:ht,lineStart:ht,lineEnd:ht,polygonStart:function(){Ur.lineStart=oo,Ur.lineEnd=ea},polygonEnd:function(){Ur.lineStart=Ur.lineEnd=Ur.point=ht,mi.add(E(Br)),Br.reset()},result:function(){var G=mi/2;return mi.reset(),G}};function oo(){Ur.point=Yi}function Yi(G,tt){Ur.point=$r,ta=ui=G,da=Li=tt}function $r(G,tt){Br.add(Li*G-ui*tt),ui=G,Li=tt}function ea(){$r(ta,da)}var Or=1/0,na=Or,Di=-Or,yi=Di,Jr={point:Na,lineStart:ht,lineEnd:ht,polygonStart:ht,polygonEnd:ht,result:function(){var G=[[Or,na],[Di,yi]];return Di=yi=-(na=Or=1/0),G}};function Na(G,tt){GDi&&(Di=G),ttyi&&(yi=tt)}var so=0,Hi=0,Wi=0,xi=0,ra=0,Ei=0,Gi=0,Vi=0,ia=0,ka,Ri,Kr,Zr,Ir={point:fi,lineStart:Ao,lineEnd:ri,polygonStart:function(){Ir.lineStart=va,Ir.lineEnd=Bi},polygonEnd:function(){Ir.point=fi,Ir.lineStart=Ao,Ir.lineEnd=ri},result:function(){var G=ia?[Gi/ia,Vi/ia]:Ei?[xi/Ei,ra/Ei]:Wi?[so/Wi,Hi/Wi]:[NaN,NaN];return so=Hi=Wi=xi=ra=Ei=Gi=Vi=ia=0,G}};function fi(G,tt){so+=G,Hi+=tt,++Wi}function Ao(){Ir.point=wi}function wi(G,tt){Ir.point=ni,fi(Kr=G,Zr=tt)}function ni(G,tt){var Ot=G-Kr,St=tt-Zr,qt=st(Ot*Ot+St*St);xi+=qt*(Kr+G)/2,ra+=qt*(Zr+tt)/2,Ei+=qt,fi(Kr=G,Zr=tt)}function ri(){Ir.point=fi}function va(){Ir.point=Xi}function Bi(){ci(ka,Ri)}function Xi(G,tt){Ir.point=ci,fi(ka=Kr=G,Ri=Zr=tt)}function ci(G,tt){var Ot=G-Kr,St=tt-Zr,qt=st(Ot*Ot+St*St);xi+=qt*(Kr+G)/2,ra+=qt*(Zr+tt)/2,Ei+=qt,qt=Zr*G-Kr*tt,Gi+=qt*(Kr+G),Vi+=qt*(Zr+tt),ia+=qt*3,fi(Kr=G,Zr=tt)}function ii(G){this._context=G}ii.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 za=s(),lo,Ho,Wo,ga,Ya,aa={point:ht,lineStart:function(){aa.point=vs},lineEnd:function(){lo&&uo(Ho,Wo),aa.point=ht},polygonStart:function(){lo=!0},polygonEnd:function(){lo=null},result:function(){var G=+za;return za.reset(),G}};function vs(G,tt){aa.point=uo,Ho=ga=G,Wo=Ya=tt}function uo(G,tt){ga-=G,Ya-=tt,za.add(st(ga*ga+Ya*Ya)),ga=G,Ya=tt}function pa(){this._string=[]}pa.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 fo=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(Ur)),Ur.result()},me.measure=function(Me){return Qt(Me,St(aa)),aa.result()},me.bounds=function(Me){return Qt(Me,St(Jr)),Jr.result()},me.centroid=function(Me){return Qt(Me,St(Ir)),Ir.result()},me.projection=function(Me){return arguments.length?(St=Me==null?(G=null,Rr):(G=Me).stream,me):G},me.context=function(Me){return arguments.length?(qt=Me==null?(tt=null,new pa):new ii(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)},To=function(G,tt,Ot,St){return function(qt,me){var Me=tt(me),Re=qt.invert(St[0],St[1]),ze=ji(),Ze=tt(ze),we=!1,Ye,I,Y,et={point:nt,lineStart:O,lineEnd:W,polygonStart:function(){et.point=N,et.lineStart=q,et.lineEnd=Et,I=[],Ye=[]},polygonEnd:function(){et.point=nt,et.lineStart=O,et.lineEnd=W,I=o.merge(I);var ut=Ut(Ye,Re);I.length?(we||(me.polygonStart(),we=!0),ha(I,ma,ut,Ot,me)):ut&&(we||(me.polygonStart(),we=!0),me.lineStart(),Ot(null,null,1,me),me.lineEnd()),we&&(me.polygonEnd(),we=!1),I=Ye=null},sphere:function(){me.polygonStart(),me.lineStart(),Ot(null,null,1,me),me.lineEnd(),me.polygonEnd()}};function nt(ut,wt){var Mt=qt(ut,wt);G(ut=Mt[0],wt=Mt[1])&&me.point(ut,wt)}function w(ut,wt){var Mt=qt(ut,wt);Me.point(Mt[0],Mt[1])}function O(){et.point=w,Me.lineStart()}function W(){et.point=nt,Me.lineEnd()}function N(ut,wt){Y.push([ut,wt]);var Mt=qt(ut,wt);Ze.point(Mt[0],Mt[1])}function q(){Ze.lineStart(),Y=[]}function Et(){N(Y[0][0],Y[0][1]),Ze.lineEnd();var ut=Ze.clean(),wt=ze.result(),Mt,Bt=wt.length,jt,ee,Jt;if(Y.pop(),Ye.push(Y),Y=null,!!Bt){if(ut&1){if(ee=wt[0],(jt=ee.length-1)>0){for(we||(me.polygonStart(),we=!0),me.lineStart(),Mt=0;Mt1&&ut&2&&wt.push(wt.pop().concat(wt.shift())),I.push(wt.filter(co))}}return et}};function co(G){return G.length>1}function ma(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 oa=To(function(){return!0},gs,ho,[-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 Re=me>0?d:-d,ze=E(me-tt);E(ze-d)0?v:-v),G.point(St,Ot),G.lineEnd(),G.lineStart(),G.point(Re,Ot),G.point(me,Ot),qt=0):St!==Re&&ze>=d&&(E(tt-St)f?x((j(tt)*(me=_(St))*j(Ot)-j(St)*(qt=_(tt))*j(G))/(qt*me*Me)):(tt+St)/2}function ho(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(E(G[0]-tt[0])>f){var me=G[0]0,qt=E(Ot)>f;function me(we,Ye,I,Y){vi(Y,G,tt,I,we,Ye)}function Me(we,Ye){return _(we)*_(Ye)>Ot}function Re(we){var Ye,I,Y,et,nt;return{lineStart:function(){et=Y=!1,nt=1},point:function(w,O){var W=[w,O],N,q=Me(w,O),Et=St?q?0:Ze(w,O):q?Ze(w+(w<0?d:-d),O):0;if(!Ye&&(et=Y=q)&&we.lineStart(),q!==Y&&(N=ze(Ye,W),(!N||ei(Ye,N)||ei(W,N))&&(W[0]+=f,W[1]+=f,q=Me(W[0],W[1]))),q!==Y)nt=0,q?(we.lineStart(),N=ze(W,Ye),we.point(N[0],N[1])):(N=ze(Ye,W),we.point(N[0],N[1]),we.lineEnd()),Ye=N;else if(qt&&Ye&&St^q){var ut;!(Et&I)&&(ut=ze(W,Ye,!0))&&(nt=0,St?(we.lineStart(),we.point(ut[0][0],ut[0][1]),we.point(ut[1][0],ut[1][1]),we.lineEnd()):(we.point(ut[1][0],ut[1][1]),we.lineEnd(),we.lineStart(),we.point(ut[0][0],ut[0][1])))}q&&(!Ye||!ei(Ye,W))&&we.point(W[0],W[1]),Ye=W,Y=q,I=Et},lineEnd:function(){Y&&we.lineEnd(),Ye=null},clean:function(){return nt|(et&&Y)<<1}}}function ze(we,Ye,I){var Y=S(we),et=S(Ye),nt=[1,0,0],w=T(Y,et),O=R(w,w),W=w[0],N=O-W*W;if(!N)return!I&&we;var q=Ot*O/N,Et=-Ot*W/N,ut=T(nt,w),wt=J(nt,q),Mt=J(w,Et);z(wt,Mt);var Bt=ut,jt=R(wt,Bt),ee=R(Bt,Bt),Jt=jt*jt-ee*(R(wt,wt)-1);if(!(Jt<0)){var ce=st(Jt),te=J(Bt,(-jt-ce)/ee);if(z(te,wt),te=mt(te),!I)return te;var le=we[0],ve=Ye[0],Be=we[1],Ve=Ye[1],De;ve0^te[1]<(E(te[0]-le)d^(le<=te[0]&&te[0]<=ve)){var yn=J(Bt,(-jt+ce)/ee);return z(yn,wt),[te,mt(yn)]}}}function Ze(we,Ye){var I=St?G:d-G,Y=0;return we<-I?Y|=1:we>I&&(Y|=2),Ye<-I?Y|=4:Ye>I&&(Y|=8),Y}return To(Me,Re,me,St?[0,-G]:[-d,G-d])},ps=function(G){return{stream:Ha(G)}};function Ha(G){return function(tt){var Ot=new Mi;for(var St in G)Ot[St]=G[St];return Ot.stream=tt,Ot}}function Mi(){}Mi.prototype={constructor:Mi,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 $i(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(Jr));var Me=Jr.result(),Re=Math.min(St/(Me[1][0]-Me[0][0]),qt/(Me[1][1]-Me[0][1])),ze=+tt[0][0]+(St-Re*(Me[1][0]+Me[0][0]))/2,Ze=+tt[0][1]+(qt-Re*(Me[1][1]+Me[0][1]))/2;return me!=null&&G.clipExtent(me),G.scale(Re*150).translate([ze,Ze])}function Wa(G,tt,Ot){return $i(G,[[0,0],tt],Ot)}var ya=16,ms=_(30*y),Oo=function(G,tt){return+tt?Io(G,tt):ys(G)};function ys(G){return Ha({point:function(tt,Ot){tt=G(tt,Ot),this.stream.point(tt[0],tt[1])}})}function Io(G,tt){function Ot(St,qt,me,Me,Re,ze,Ze,we,Ye,I,Y,et,nt,w){var O=Ze-St,W=we-qt,N=O*O+W*W;if(N>4*tt&&nt--){var q=Me+I,Et=Re+Y,ut=ze+et,wt=st(q*q+Et*Et+ut*ut),Mt=it(ut/=wt),Bt=E(E(ut)-1)tt||E((O*ce+W*te)/N-.5)>.3||Me*I+Re*Y+ze*et2?te[2]%360*y:0,Jt()):[Ze*m,we*m,Ye*m]},Bt.precision=function(te){return arguments.length?(ut=Oo(ee,Et=te*te),ce()):st(Et)},Bt.fitExtent=function(te,le){return $i(Bt,te,le)},Bt.fitSize=function(te,le){return Wa(Bt,te,le)};function Jt(){Y=tn(I=Qn(Ze,we,Ye),tt);var te=tt(Re,ze);return me=St-te[0]*Ot,Me=qt+te[1]*Ot,ce()}function ce(){return wt=Mt=null,Bt}return function(){return tt=G.apply(this,arguments),Bt.invert=tt.invert&&jt,Jt()}}function Ga(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 Fi(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 Ni(G,tt){var Ot=j(G),St=(Ot+j(tt))/2;if(E(St)=.12&&w<.234&&nt>=-.425&&nt<-.214?qt:w>=.166&&w<.234&&nt>=-.214&&nt<-.115?Me:Ot).invert(I)},we.stream=function(I){return G&&tt===I?G:G=bi([Ot.stream(tt=I),qt.stream(I),Me.stream(I)])},we.precision=function(I){return arguments.length?(Ot.precision(I),qt.precision(I),Me.precision(I),Ye()):Ot.precision()},we.scale=function(I){return arguments.length?(Ot.scale(I),qt.scale(I*.35),Me.scale(I),we.translate(Ot.translate())):Ot.scale()},we.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(Ze),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(Ze),Re=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(Ze),Ye()},we.fitExtent=function(I,Y){return $i(we,I,Y)},we.fitSize=function(I,Y){return Wa(we,I,Y)};function Ye(){return G=tt=null,we}return we.scale(1070)};function xa(G){return function(tt,Ot){var St=_(tt),qt=_(Ot),me=G(St*qt);return[me*qt*j(tt),me*j(Ot)]}}function jo(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 Lo=xa(function(G){return st(2/(1+G))});Lo.invert=jo(function(G){return 2*it(G/2)});var po=function(){return Ki(Lo).scale(124.75).clipAngle(180-.001)},Ea=xa(function(G){return(G=Q(G))&&G/j(G)});Ea.invert=jo(function(G){return G});var ws=function(){return Ki(Ea).scale(79.4188).clipAngle(180-.001)};function Va(G,tt){return[G,F(yt((v+tt)/2))]}Va.invert=function(G,tt){return[G,2*x(C(tt))-v]};var Xo=function(){return Xa(Va).scale(961/p)};function Xa(G){var tt=Ki(G),Ot=tt.center,St=tt.scale,qt=tt.translate,me=tt.clipExtent,Me=null,Re,ze,Ze;tt.scale=function(Ye){return arguments.length?(St(Ye),we()):St()},tt.translate=function(Ye){return arguments.length?(qt(Ye),we()):qt()},tt.center=function(Ye){return arguments.length?(Ot(Ye),we()):Ot()},tt.clipExtent=function(Ye){return arguments.length?(Ye==null?Me=Re=ze=Ze=null:(Me=+Ye[0][0],Re=+Ye[0][1],ze=+Ye[1][0],Ze=+Ye[1][1]),we()):Me==null?null:[[Me,Re],[ze,Ze]]};function we(){var Ye=d*St(),I=tt(Qr(tt.rotate()).invert([0,0]));return me(Me==null?[[I[0]-Ye,I[1]-Ye],[I[0]+Ye,I[1]+Ye]]:G===Va?[[Math.max(I[0]-Ye,Me),Re],[Math.min(I[0]+Ye,ze),Ze]]:[[Me,Math.max(I[1]-Ye,Re)],[ze,Math.min(I[1]+Ye,Ze)]])}return we()}function _i(G){return yt((v+G)/2)}function Do(G,tt){var Ot=_(G),St=G===tt?j(G):F(Ot/_(tt))/F(_i(tt)/_i(G)),qt=Ot*k(_i(G),St)/St;if(!St)return Va;function me(Me,Re){qt>0?Re<-v+f&&(Re=-v+f):Re>v-f&&(Re=v-f);var ze=qt/k(_i(Re),St);return[ze*j(St*Me),qt-ze*_(St*Me)]}return me.invert=function(Me,Re){var ze=qt-Re,Ze=V(St)*st(Me*Me+ze*ze);return[M(Me,E(ze))/St*V(ze),2*x(k(qt/Ze,1/St))-v]},me}var Uo=function(){return Ga(Do).scale(109.5).parallels([30,30])};function wa(G,tt){return[G,tt]}wa.invert=wa;var mo=function(){return Ki(wa).scale(152.63)};function Rs(G,tt){var Ot=_(G),St=G===tt?j(G):(Ot-_(tt))/(tt-G),qt=Ot/St+G;if(E(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=Lr,r.geoCentroid=ke,r.geoCircle=fa,r.geoClipExtent=X,r.geoContains=Tr,r.geoDistance=Jn,r.geoGraticule=_r,r.geoGraticule10=zn,r.geoInterpolate=tr,r.geoLength=On,r.geoPath=fo,r.geoAlbers=Es,r.geoAlbersUsa=go,r.geoAzimuthalEqualArea=po,r.geoAzimuthalEqualAreaRaw=Lo,r.geoAzimuthalEquidistant=ws,r.geoAzimuthalEquidistantRaw=Ea,r.geoConicConformal=Uo,r.geoConicConformalRaw=Do,r.geoConicEqualArea=vo,r.geoConicEqualAreaRaw=Ni,r.geoConicEquidistant=Ua,r.geoConicEquidistantRaw=Rs,r.geoEquirectangular=mo,r.geoEquirectangularRaw=wa,r.geoGnomonic=Ro,r.geoGnomonicRaw=yo,r.geoIdentity=Fr,r.geoProjection=Ki,r.geoProjectionMutator=xs,r.geoMercator=Xo,r.geoMercatorRaw=Va,r.geoOrthographic=$a,r.geoOrthographicRaw=Ma,r.geoStereographic=Zi,r.geoStereographicRaw=sa,r.geoTransverseMercator=ba,r.geoTransverseMercatorRaw=Ka,r.geoRotation=Qr,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,E=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,w=et.length;++nt=0?1:-1,w=nt*et,O=y(Y),W=C(Y),N=Fe*W,q=Ue*O+N*y(w),Et=N*nt*C(w);Gt.add(m(Et,q)),_e=I,Ue=O,Fe=W}function ot(I){return Rt=new o.Adder,xt(I,ft),Rt*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 R(I,Y){return[I[0]*Y,I[1]*Y,I[2]*Y]}function T(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,$e,fn,on,mn={point:Sn,lineStart:bn,lineEnd:Tn,polygonStart:function(){mn.point=Dn,mn.lineStart=Ht,mn.lineEnd=kt,$e=new o.Adder,ft.polygonStart()},polygonEnd:function(){ft.polygonEnd(),mn.point=Sn,mn.lineStart=bn,mn.lineEnd=Tn,Gt<0?(z=-(pt=180),J=-(It=90)):$e>s?It=90:$e<-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),w=[nt[1],-nt[0],0],O=mt(w,nt);T(O),O=at(O);var W=I-Zt,N=W>0?1:-1,q=O[0]*d*N,Et,ut=g(W)>180;ut^(N*ZtIt&&(It=Et)):(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 Tn(){on[0]=z,on[1]=pt,mn.point=Sn,Se=null}function Dn(I,Y){if(Se){var et=I-Zt;$e.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($e)>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 Ge(I,Y){return I[0]<=I[1]?I[0]<=Y&&Y<=I[1]:Yoe(nt[0],nt[1])&&(nt[1]=w[1]),oe(w[0],nt[1])>oe(nt[0],nt[1])&&(nt[0]=w[0])):O.push(nt=w);for(W=-1/0,et=O.length-1,Y=0,nt=O[et];Y<=et;nt=w,++Y)w=O[Y],(N=oe(nt[1],w[0]))>W&&(W=N,z=w[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,Lr,sr,Ft,zt,ie,ue,be,Te,Ke,un,an,Ce,nn,vn,ye={sphere:Q,point:dn,lineStart:vt,lineEnd:$t,polygonStart:function(){ye.lineStart=Vt,ye.lineEnd=se},polygonEnd:function(){ye.lineStart=vt,ye.lineEnd=$t}};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,Lr+=(I-Lr)/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=Tt,gn(Ce,nn,vn)}function Tt(I,Y){I*=v,Y*=v;var et=y(Y),nt=et*y(I),w=et*C(I),O=C(Y),W=m(k((W=nn*O-vn*w)*W+(W=vn*nt-Ce*O)*W+(W=Ce*w-nn*nt)*W),Ce*nt+nn*w+vn*O);pr+=W,zt+=W*(Ce+(Ce=nt)),ie+=W*(nn+(nn=w)),ue+=W*(vn+(vn=O)),gn(Ce,nn,vn)}function $t(){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),w=et*C(I),O=C(Y),W=nn*O-vn*w,N=vn*nt-Ce*O,q=Ce*w-nn*nt,Et=M(W,N,q),ut=st(Et),wt=Et&&-ut/Et;be.add(wt*W),Te.add(wt*N),Ke.add(wt*q),pr+=ut,zt+=ut*(Ce+(Ce=nt)),ie+=ut*(nn+(nn=w)),ue+=ut*(vn+(vn=O)),gn(Ce,nn,vn)}function ae(I){Pr=pr=Lr=sr=Ft=zt=ie=ue=0,be=new o.Adder,Te=new o.Adder,Ke=new o.Adder,xt(I,ye);var Y=+be,et=+Te,nt=+Ke,w=M(Y,et,nt);return wu?I+Math.round(-I/h)*h:I,Y]}ke.invert=ke;function Ae(I,Y,et){return(I%=h)?Y||et?Pe(En(I),Qn(Y,et)):En(I):Y||et?Qn(Y,et):ke}function tn(I){return function(Y,et){return Y+=I,[Y>u?Y-h:Y<-u?Y+h:Y,et]}}function En(I){var Y=tn(I);return Y.invert=tn(-I),Y}function Qn(I,Y){var et=y(I),nt=C(I),w=y(Y),O=C(Y);function W(N,q){var Et=y(q),ut=y(N)*Et,wt=C(N)*Et,Mt=C(q),Bt=Mt*et+ut*nt;return[m(wt*w-Bt*O,ut*et-Mt*nt),st(Bt*w+wt*O)]}return W.invert=function(N,q){var Et=y(q),ut=y(N)*Et,wt=C(N)*Et,Mt=C(q),Bt=Mt*w-wt*O;return[m(wt*w+Mt*O,ut*et+Bt*nt),st(Bt*et-ut*nt)]},W}function fr(I){I=Ae(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,w,O){if(!!et){var W=y(Y),N=C(Y),q=nt*et;w==null?(w=Y+nt*h,O=Y-q/2):(w=xr(W,w),O=xr(W,O),(nt>0?wO)&&(w+=nt*h));for(var Et,ut=w;nt>0?ut>O:ut1&&I.push(I.pop().concat(I.shift()))},result:function(){var et=I;return I=[],Y=null,et}}}function gi(I,Y){return g(I[0]-Y[0])=0;--N)w.point((wt=ut[N])[0],wt[1]);else nt(Mt.x,Mt.p.x,-1,w);Mt=Mt.p}Mt=Mt.o,ut=Mt.z,Bt=!Bt}while(!Mt.v);w.lineEnd()}}}function Ba(I){if(!!(Y=I.length)){for(var Y,et=0,nt=I[0],w;++et=0?1:-1,wn=rn*Xe,yn=wn>u,kn=Jt*Ve;if(q.add(m(kn*rn*C(wn),ce*De+kn*y(wn))),W+=yn?Xe+rn*h:Xe,yn^jt>=et^ve>=et){var In=mt(dt(Bt),dt(le));T(In);var Ln=mt(O,In);T(Ln);var We=(yn^Xe>=0?-1:1)*st(Ln[2]);(nt>We||nt===We&&(In[0]||In[1]))&&(N+=yn^Xe>=0?1:-1)}}return(W<-s||W0){for(q||(w.polygonStart(),q=!0),w.lineStart(),Ve=0;Ve1&&ve&2&&Be.push(Be.pop().concat(Be.shift())),ut.push(Be.filter(Fa))}}return Mt}}function Fa(I){return I.length>1}function zi(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 pi=ha(function(){return!0},ao,At,[-u,-c]);function ao(I){var Y=NaN,et=NaN,nt=NaN,w;return{lineStart:function(){I.lineStart(),w=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),w=0):nt!==N&&q>=u&&(g(Y-nt)s?p((C(Y)*(O=y(nt))*C(et)-C(nt)*(w=y(Y))*C(I))/(w*O*W)):(Y+nt)/2}function At(I,Y,et,nt){var w;if(I==null)w=et*c,nt.point(-u,w),nt.point(0,w),nt.point(u,w),nt.point(u,0),nt.point(u,-w),nt.point(0,-w),nt.point(-u,-w),nt.point(-u,0),nt.point(-u,w);else if(g(I[0]-Y[0])>s){var O=I[0]0,w=g(Y)>s;function O(ut,wt,Mt,Bt){cr(Bt,I,et,Mt,ut,wt)}function W(ut,wt){return y(ut)*y(wt)>Y}function N(ut){var wt,Mt,Bt,jt,ee;return{lineStart:function(){jt=Bt=!1,ee=1},point:function(Jt,ce){var te=[Jt,ce],le,ve=W(Jt,ce),Be=nt?ve?0:Et(Jt,ce):ve?Et(Jt+(Jt<0?u:-u),ce):0;if(!wt&&(jt=Bt=ve)&&ut.lineStart(),ve!==Bt&&(le=q(wt,te),(!le||gi(wt,le)||gi(te,le))&&(te[2]=1)),ve!==Bt)ee=0,ve?(ut.lineStart(),le=q(te,wt),ut.point(le[0],le[1])):(le=q(wt,te),ut.point(le[0],le[1],2),ut.lineEnd()),wt=le;else if(w&&wt&&nt^ve){var Ve;!(Be&Mt)&&(Ve=q(te,wt,!0))&&(ee=0,nt?(ut.lineStart(),ut.point(Ve[0][0],Ve[0][1]),ut.point(Ve[1][0],Ve[1][1]),ut.lineEnd()):(ut.point(Ve[1][0],Ve[1][1]),ut.lineEnd(),ut.lineStart(),ut.point(Ve[0][0],Ve[0][1],3)))}ve&&(!wt||!gi(wt,te))&&ut.point(te[0],te[1]),wt=te,Bt=ve,Mt=Be},lineEnd:function(){Bt&&ut.lineEnd(),wt=null},clean:function(){return ee|(jt&&Bt)<<1}}}function q(ut,wt,Mt){var Bt=dt(ut),jt=dt(wt),ee=[1,0,0],Jt=mt(Bt,jt),ce=Z(Jt,Jt),te=Jt[0],le=ce-te*te;if(!le)return!Mt&&ut;var ve=Y*ce/le,Be=-Y*te/le,Ve=mt(ee,Jt),De=R(ee,ve),Xe=R(Jt,Be);S(De,Xe);var rn=Ve,wn=Z(De,rn),yn=Z(rn,rn),kn=wn*wn-yn*(Z(De,De)-1);if(!(kn<0)){var In=k(kn),Ln=R(rn,(-wn-In)/yn);if(S(Ln,De),Ln=at(Ln),!Mt)return Ln;var We=ut[0],Rn=wt[0],qn=ut[1],Un=wt[1],sn;Rn0^Ln[1]<(g(Ln[0]-We)u^(We<=Ln[0]&&Ln[0]<=Rn)){var Nr=R(rn,(-wn+In)/yn);return S(Nr,De),[Ln,at(Nr)]}}}function Et(ut,wt){var Mt=nt?I:u-I,Bt=0;return ut<-Mt?Bt|=1:ut>Mt&&(Bt|=2),wt<-Mt?Bt|=4:wt>Mt&&(Bt|=8),Bt}return ha(W,N,O,nt?[0,-I]:[-u,I-u])}function de(I,Y,et,nt,w,O){var W=I[0],N=I[1],q=Y[0],Et=Y[1],ut=0,wt=1,Mt=q-W,Bt=Et-N,jt;if(jt=et-W,!(!Mt&&jt>0)){if(jt/=Mt,Mt<0){if(jt0){if(jt>wt)return;jt>ut&&(ut=jt)}if(jt=w-W,!(!Mt&&jt<0)){if(jt/=Mt,Mt<0){if(jt>wt)return;jt>ut&&(ut=jt)}else if(Mt>0){if(jt0)){if(jt/=Bt,Bt<0){if(jt0){if(jt>wt)return;jt>ut&&(ut=jt)}if(jt=O-N,!(!Bt&&jt<0)){if(jt/=Bt,Bt<0){if(jt>wt)return;jt>ut&&(ut=jt)}else if(Bt>0){if(jt0&&(I[0]=W+ut*Mt,I[1]=N+ut*Bt),wt<1&&(Y[0]=W+wt*Mt,Y[1]=N+wt*Bt),!0}}}}}var Oe=1e9,Le=-Oe;function He(I,Y,et,nt){function w(Et,ut){return I<=Et&&Et<=et&&Y<=ut&&ut<=nt}function O(Et,ut,wt,Mt){var Bt=0,jt=0;if(Et==null||(Bt=W(Et,wt))!==(jt=W(ut,wt))||q(Et,ut)<0^wt>0)do Mt.point(Bt===0||Bt===3?I:et,Bt>1?nt:Y);while((Bt=(Bt+wt+4)%4)!==jt);else Mt.point(ut[0],ut[1])}function W(Et,ut){return g(Et[0]-I)0?0:3:g(Et[0]-et)0?2:1:g(Et[1]-Y)0?1:0:ut>0?3:2}function N(Et,ut){return q(Et.x,ut.x)}function q(Et,ut){var wt=W(Et,1),Mt=W(ut,1);return wt!==Mt?wt-Mt:wt===0?ut[1]-Et[1]:wt===1?Et[0]-ut[0]:wt===2?Et[1]-ut[1]:ut[0]-Et[0]}return function(Et){var ut=Et,wt=vi(),Mt,Bt,jt,ee,Jt,ce,te,le,ve,Be,Ve,De={point:Xe,lineStart:kn,lineEnd:In,polygonStart:wn,polygonEnd:yn};function Xe(We,Rn){w(We,Rn)&&ut.point(We,Rn)}function rn(){for(var We=0,Rn=0,qn=Bt.length;Rnnt&&(_a-Sr)*(nt-Nr)>(Si-Nr)*(I-Sr)&&++We:Si<=nt&&(_a-Sr)*(nt-Nr)<(Si-Nr)*(I-Sr)&&--We;return We}function wn(){ut=wt,Mt=[],Bt=[],Ve=!0}function yn(){var We=rn(),Rn=Ve&&We,qn=(Mt=o.merge(Mt)).length;(Rn||qn)&&(Et.polygonStart(),Rn&&(Et.lineStart(),O(null,null,1,Et),Et.lineEnd()),qn&&ji(Mt,N,We,O,Et),Et.polygonEnd()),ut=Et,Mt=Bt=jt=null}function kn(){De.point=Ln,Bt&&Bt.push(jt=[]),Be=!0,ve=!1,te=le=NaN}function In(){Mt&&(Ln(ee,Jt),ce&&ve&&wt.rejoin(),Mt.push(wt.result())),De.point=Xe,ve&&ut.lineEnd()}function Ln(We,Rn){var qn=w(We,Rn);if(Bt&&jt.push([We,Rn]),Be)ee=We,Jt=Rn,ce=qn,Be=!1,qn&&(ut.lineStart(),ut.point(We,Rn));else if(qn&&ve)ut.point(We,Rn);else{var Un=[te=Math.max(Le,Math.min(Oe,te)),le=Math.max(Le,Math.min(Oe,le))],sn=[We=Math.max(Le,Math.min(Oe,We)),Rn=Math.max(Le,Math.min(Oe,Rn))];de(Un,sn,I,Y,et,nt)?(ve||(ut.lineStart(),ut.point(Un[0],Un[1])),ut.point(sn[0],sn[1]),qn||ut.lineEnd(),Ve=!1):qn&&(ut.lineStart(),ut.point(We,Rn),Ve=!1)}te=We,le=Rn,ve=qn}return De}}function xe(){var I=0,Y=0,et=960,nt=500,w,O,W;return W={stream:function(N){return w&&O===N?w:w=He(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],w=O=null,W):[[I,Y],[et,nt]]}}}var Qe,Mn,pn,An,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),An=y(Y),On.point=Vn}function Vn(I,Y){I*=v,Y*=v;var et=C(Y),nt=y(Y),w=g(I-Mn),O=y(w),W=C(w),N=nt*W,q=An*et-pn*nt*O,Et=pn*et+An*nt*O;Qe.add(m(k(N*N+q*q),Et)),Mn=I,pn=et,An=nt}function hr(I){return Qe=new o.Adder,xt(I,On),+Qe}var ar=[null,null],mr={type:"LineString",coordinates:ar};function dr(I,Y){return ar[0]=I,ar[1]=Y,hr(mr)}var Dr={Feature:function(I,Y){return Hr(I.geometry,Y)},FeatureCollection:function(I,Y){for(var et=I.features,nt=-1,w=et.length;++nt0&&(w=dr(I[O],I[O-1]),w>0&&et<=w&&nt<=w&&(et+nt-w)*(1-Math.pow((et-nt)/w,2))s}).map(Mt)).concat(o.range(E(O/Et)*Et,w,Et).filter(function(le){return g(le%wt)>s}).map(Bt))}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],w=+le[1][1],Y>I&&(le=Y,Y=I,I=le),O>w&&(le=O,O=w,w=le),ce.precision(Jt)):[[Y,O],[I,w]]},ce.step=function(le){return arguments.length?ce.stepMajor(le).stepMinor(le):ce.stepMinor()},ce.stepMajor=function(le){return arguments.length?(ut=+le[0],wt=+le[1],ce):[ut,wt]},ce.stepMinor=function(le){return arguments.length?(q=+le[0],Et=+le[1],ce):[q,Et]},ce.precision=function(le){return arguments.length?(Jt=+le,Mt=Rr(O,w,90),Bt=mi(Y,I,Jt),jt=Rr(N,W,90),ee=mi(nt,et,Jt),ce):Jt},ce.extentMajor([[-180,-90+s],[180,90-s]]).extentMinor([[-180,-80-s],[180,80+s]])}function ta(){return Br()()}function da(I,Y){var et=I[0]*v,nt=I[1]*v,w=Y[0]*v,O=Y[1]*v,W=y(nt),N=C(nt),q=y(O),Et=C(O),ut=W*y(et),wt=W*C(et),Mt=q*y(w),Bt=q*C(w),jt=2*st(k(yt(O-nt)+W*q*yt(w-et))),ee=C(jt),Jt=jt?function(ce){var te=C(ce*=jt)/ee,le=C(jt-ce)/ee,ve=le*ut+te*Mt,Be=le*wt+te*Bt,Ve=le*N+te*Et;return[m(Be,ve)*d,m(Ve,k(ve*ve+Be*Be))*d]}:function(){return[et*d,nt*d]};return Jt.distance=jt,Jt}var ui=function(I){return I},Li=new o.Adder,Ur=new o.Adder,oo,Yi,$r,ea,Or={point:Q,lineStart:Q,lineEnd:Q,polygonStart:function(){Or.lineStart=na,Or.lineEnd=Jr},polygonEnd:function(){Or.lineStart=Or.lineEnd=Or.point=Q,Li.add(g(Ur)),Ur=new o.Adder},result:function(){var I=Li/2;return Li=new o.Adder,I}};function na(){Or.point=Di}function Di(I,Y){Or.point=yi,oo=$r=I,Yi=ea=Y}function yi(I,Y){Ur.add(ea*I-$r*Y),$r=I,ea=Y}function Jr(){yi(oo,Yi)}var Na=1/0,so=Na,Hi=-Na,Wi=Hi,xi={point:ra,lineStart:Q,lineEnd:Q,polygonStart:Q,polygonEnd:Q,result:function(){var I=[[Na,so],[Hi,Wi]];return Hi=Wi=-(so=Na=1/0),I}};function ra(I,Y){IHi&&(Hi=I),YWi&&(Wi=Y)}var Ei=0,Gi=0,Vi=0,ia=0,ka=0,Ri=0,Kr=0,Zr=0,Ir=0,fi,Ao,wi,ni,ri={point:va,lineStart:Bi,lineEnd:ii,polygonStart:function(){ri.lineStart=za,ri.lineEnd=lo},polygonEnd:function(){ri.point=va,ri.lineStart=Bi,ri.lineEnd=ii},result:function(){var I=Ir?[Kr/Ir,Zr/Ir]:Ri?[ia/Ri,ka/Ri]:Vi?[Ei/Vi,Gi/Vi]:[NaN,NaN];return Ei=Gi=Vi=ia=ka=Ri=Kr=Zr=Ir=0,I}};function va(I,Y){Ei+=I,Gi+=Y,++Vi}function Bi(){ri.point=Xi}function Xi(I,Y){ri.point=ci,va(wi=I,ni=Y)}function ci(I,Y){var et=I-wi,nt=Y-ni,w=k(et*et+nt*nt);ia+=w*(wi+I)/2,ka+=w*(ni+Y)/2,Ri+=w,va(wi=I,ni=Y)}function ii(){ri.point=va}function za(){ri.point=Ho}function lo(){Wo(fi,Ao)}function Ho(I,Y){ri.point=Wo,va(fi=wi=I,Ao=ni=Y)}function Wo(I,Y){var et=I-wi,nt=Y-ni,w=k(et*et+nt*nt);ia+=w*(wi+I)/2,ka+=w*(ni+Y)/2,Ri+=w,w=ni*I-wi*Y,Kr+=w*(wi+I),Zr+=w*(ni+Y),Ir+=w*3,va(wi=I,ni=Y)}function ga(I){this._context=I}ga.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 Ya=new o.Adder,aa,vs,uo,pa,Ui,fo={point:Q,lineStart:function(){fo.point=To},lineEnd:function(){aa&&co(vs,uo),fo.point=Q},polygonStart:function(){aa=!0},polygonEnd:function(){aa=null},result:function(){var I=+Ya;return Ya=new o.Adder,I}};function To(I,Y){fo.point=co,vs=pa=I,uo=Ui=Y}function co(I,Y){pa-=I,Ui-=Y,Ya.add(k(pa*pa+Ui*Ui)),pa=I,Ui=Y}function ma(){this._string=[]}ma.prototype={_radius:4.5,_circle:oa(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=oa(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 oa(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,w;function O(W){return W&&(typeof et=="function"&&w.pointRadius(+et.apply(this,arguments)),xt(W,nt(w))),w.result()}return O.area=function(W){return xt(W,nt(Or)),Or.result()},O.measure=function(W){return xt(W,nt(fo)),fo.result()},O.bounds=function(W){return xt(W,nt(xi)),xi.result()},O.centroid=function(W){return xt(W,nt(ri)),ri.result()},O.projection=function(W){return arguments.length?(nt=W==null?(I=null,ui):(I=W).stream,O):I},O.context=function(W){return arguments.length?(w=W==null?(Y=null,new ma):new ga(Y=W),typeof et!="function"&&w.pointRadius(et),O):Y},O.pointRadius=function(W){return arguments.length?(et=typeof W=="function"?W:(w.pointRadius(+W),+W),O):et},O.projection(I).context(Y)}function Go(I){return{stream:ho(I)}}function ho(I){return function(Y){var et=new Vo;for(var nt in I)et[nt]=I[nt];return et.stream=Y,et}}function Vo(){}Vo.prototype={constructor:Vo,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(xi)),Y(xi.result()),nt!=null&&I.clipExtent(nt),I}function Ha(I,Y,et){return ps(I,function(nt){var w=Y[1][0]-Y[0][0],O=Y[1][1]-Y[0][1],W=Math.min(w/(nt[1][0]-nt[0][0]),O/(nt[1][1]-nt[0][1])),N=+Y[0][0]+(w-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 Mi(I,Y,et){return Ha(I,[[0,0],Y],et)}function $i(I,Y,et){return ps(I,function(nt){var w=+Y,O=w/(nt[1][0]-nt[0][0]),W=(w-O*(nt[1][0]+nt[0][0]))/2,N=-O*nt[0][1];I.scale(150*O).translate([W,N])},et)}function Wa(I,Y,et){return ps(I,function(nt){var w=+Y,O=w/(nt[1][1]-nt[0][1]),W=-O*nt[0][0],N=(w-O*(nt[1][1]+nt[0][1]))/2;I.scale(150*O).translate([W,N])},et)}var ya=16,ms=y(30*v);function Oo(I,Y){return+Y?Io(I,Y):ys(I)}function ys(I){return ho({point:function(Y,et){Y=I(Y,et),this.stream.point(Y[0],Y[1])}})}function Io(I,Y){function et(nt,w,O,W,N,q,Et,ut,wt,Mt,Bt,jt,ee,Jt){var ce=Et-nt,te=ut-w,le=ce*ce+te*te;if(le>4*Y&&ee--){var ve=W+Mt,Be=N+Bt,Ve=q+jt,De=k(ve*ve+Be*Be+Ve*Ve),Xe=st(Ve/=De),rn=g(g(Ve)-1)Y||g((ce*In+te*Ln)/le-.5)>.3||W*Mt+N*Bt+q*jt2?We[2]%360*v:0,In()):[N*d,q*d,Et*d]},yn.angle=function(We){return arguments.length?(wt=We%360*v,In()):wt*d},yn.reflectX=function(We){return arguments.length?(Mt=We?-1:1,In()):Mt<0},yn.reflectY=function(We){return arguments.length?(Bt=We?-1:1,In()):Bt<0},yn.precision=function(We){return arguments.length?(Ve=Oo(De,Be=We*We),Ln()):k(Be)},yn.fitExtent=function(We,Rn){return Ha(yn,We,Rn)},yn.fitSize=function(We,Rn){return Mi(yn,We,Rn)},yn.fitWidth=function(We,Rn){return $i(yn,We,Rn)},yn.fitHeight=function(We,Rn){return Wa(yn,We,Rn)};function In(){var We=Ga(et,0,0,Mt,Bt,wt).apply(null,Y(O,W)),Rn=Ga(et,nt-We[0],w-We[1],Mt,Bt,wt);return ut=Ae(N,q,Et),De=Pe(Y,Rn),Xe=Pe(ut,De),Ve=Oo(De,Be),Ln()}function Ln(){return rn=wn=null,yn}return function(){return Y=I.apply(this,arguments),yn.invert=Y.invert&&kn,In()}}function vo(I){var Y=0,et=u/3,nt=Ni(I),w=nt(Y,et);return w.parallels=function(O){return arguments.length?nt(Y=O[0]*v,et=O[1]*v):[Y*d,et*d]},w}function Es(I){var Y=y(I);function et(nt,w){return[nt*Y,C(w)/Y]}return et.invert=function(nt,w){return[nt/Y,st(w*Y)]},et}function bi(I,Y){var et=C(I),nt=(et+C(Y))/2;if(g(nt)=.12&&Jt<.234&&ee>=-.425&&ee<-.214?w:Jt>=.166&&Jt<.234&&ee>=-.214&&ee<-.115?W:et).invert(Mt)},ut.stream=function(Mt){return I&&Y===Mt?I:I=jo([et.stream(Y=Mt),w.stream(Mt),W.stream(Mt)])},ut.precision=function(Mt){return arguments.length?(et.precision(Mt),w.precision(Mt),W.precision(Mt),wt()):et.precision()},ut.scale=function(Mt){return arguments.length?(et.scale(Mt),w.scale(Mt*.35),W.scale(Mt),ut.translate(et.translate())):et.scale()},ut.translate=function(Mt){if(!arguments.length)return et.translate();var Bt=et.scale(),jt=+Mt[0],ee=+Mt[1];return nt=et.translate(Mt).clipExtent([[jt-.455*Bt,ee-.238*Bt],[jt+.455*Bt,ee+.238*Bt]]).stream(Et),O=w.translate([jt-.307*Bt,ee+.201*Bt]).clipExtent([[jt-.425*Bt+s,ee+.12*Bt+s],[jt-.214*Bt-s,ee+.234*Bt-s]]).stream(Et),N=W.translate([jt-.205*Bt,ee+.212*Bt]).clipExtent([[jt-.214*Bt+s,ee+.166*Bt+s],[jt-.115*Bt-s,ee+.234*Bt-s]]).stream(Et),wt()},ut.fitExtent=function(Mt,Bt){return Ha(ut,Mt,Bt)},ut.fitSize=function(Mt,Bt){return Mi(ut,Mt,Bt)},ut.fitWidth=function(Mt,Bt){return $i(ut,Mt,Bt)},ut.fitHeight=function(Mt,Bt){return Wa(ut,Mt,Bt)};function wt(){return I=Y=null,ut}return ut.scale(1070)}function po(I){return function(Y,et){var nt=y(Y),w=y(et),O=I(nt*w);return O===1/0?[2,0]:[O*w*C(Y),O*C(et)]}}function Ea(I){return function(Y,et){var nt=k(Y*Y+et*et),w=I(nt),O=C(w),W=y(w);return[m(Y*O,nt*W),st(nt&&et*O/nt)]}}var ws=po(function(I){return k(2/(1+I))});ws.invert=Ea(function(I){return 2*st(I/2)});function Va(){return Fi(ws).scale(124.75).clipAngle(180-.001)}var Xo=po(function(I){return(I=V(I))&&I/C(I)});Xo.invert=Ea(function(I){return I});function Xa(){return Fi(Xo).scale(79.4188).clipAngle(180-.001)}function _i(I,Y){return[I,_(j((c+Y)/2))]}_i.invert=function(I,Y){return[I,2*p(x(Y))-c]};function Do(){return Uo(_i).scale(961/h)}function Uo(I){var Y=Fi(I),et=Y.center,nt=Y.scale,w=Y.translate,O=Y.clipExtent,W=null,N,q,Et;Y.scale=function(wt){return arguments.length?(nt(wt),ut()):nt()},Y.translate=function(wt){return arguments.length?(w(wt),ut()):w()},Y.center=function(wt){return arguments.length?(et(wt),ut()):et()},Y.clipExtent=function(wt){return arguments.length?(wt==null?W=N=q=Et=null:(W=+wt[0][0],N=+wt[0][1],q=+wt[1][0],Et=+wt[1][1]),ut()):W==null?null:[[W,N],[q,Et]]};function ut(){var wt=u*nt(),Mt=Y(fr(Y.rotate()).invert([0,0]));return O(W==null?[[Mt[0]-wt,Mt[1]-wt],[Mt[0]+wt,Mt[1]+wt]]:I===_i?[[Math.max(Mt[0]-wt,W),N],[Math.min(Mt[0]+wt,q),Et]]:[[W,Math.max(Mt[1]-wt,N)],[q,Math.min(Mt[1]+wt,Et)]])}return ut()}function wa(I){return j((c+I)/2)}function mo(I,Y){var et=y(I),nt=I===Y?C(I):_(et/y(Y))/_(wa(Y)/wa(I)),w=et*D(wa(I),nt)/nt;if(!nt)return _i;function O(W,N){w>0?N<-c+s&&(N=-c+s):N>c-s&&(N=c-s);var q=w/D(wa(N),nt);return[q*C(nt*W),w-q*y(nt*W)]}return O.invert=function(W,N){var q=w-N,Et=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(w/Et,1/nt))-c]},O}function Rs(){return vo(mo).scale(109.5).parallels([30,30])}function Ua(I,Y){return[I,Y]}Ua.invert=Ua;function yo(){return Fi(Ua).scale(152.63)}function Ro(I,Y){var et=y(I),nt=I===Y?C(I):(et-y(Y))/(Y-I),w=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 Fi(qt).scale(175.295)}function Me(I,Y){return[y(Y)*C(I),C(Y)]}Me.invert=Ea(st);function Re(){return Fi(Me).scale(249.5).clipAngle(90+s)}function ze(I,Y){var et=y(Y),nt=1+y(I)*et;return[et*C(I)/nt,C(Y)/nt]}ze.invert=Ea(function(I){return 2*p(I)});function Ze(){return Fi(ze).scale(250).clipAngle(142)}function we(I,Y){return[_(j((c+Y)/2)),-I]}we.invert=function(I,Y){return[-Y,2*p(x(I))-c]};function Ye(){var I=Uo(we),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=xa,r.geoAlbersUsa=Lo,r.geoArea=ot,r.geoAzimuthalEqualArea=Va,r.geoAzimuthalEqualAreaRaw=ws,r.geoAzimuthalEquidistant=Xa,r.geoAzimuthalEquidistantRaw=Xo,r.geoBounds=Fn,r.geoCentroid=ae,r.geoCircle=Qr,r.geoClipAntimeridian=pi,r.geoClipCircle=Ut,r.geoClipExtent=xe,r.geoClipRectangle=He,r.geoConicConformal=Rs,r.geoConicConformalRaw=mo,r.geoConicEqualArea=go,r.geoConicEqualAreaRaw=bi,r.geoConicEquidistant=jr,r.geoConicEquidistantRaw=Ro,r.geoContains=tr,r.geoDistance=dr,r.geoEqualEarth=G,r.geoEqualEarthRaw=ba,r.geoEquirectangular=yo,r.geoEquirectangularRaw=Ua,r.geoGnomonic=Ot,r.geoGnomonicRaw=tt,r.geoGraticule=Br,r.geoGraticule10=ta,r.geoIdentity=St,r.geoInterpolate=da,r.geoLength=hr,r.geoMercator=Do,r.geoMercatorRaw=_i,r.geoNaturalEarth1=me,r.geoNaturalEarth1Raw=qt,r.geoOrthographic=Re,r.geoOrthographicRaw=Me,r.geoPath=gs,r.geoProjection=Fi,r.geoProjectionMutator=Ni,r.geoRotation=fr,r.geoStereographic=Ze,r.geoStereographicRaw=ze,r.geoStream=xt,r.geoTransform=Go,r.geoTransverseMercator=Ye,r.geoTransverseMercatorRaw=we,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,E=[],x=0;Object.keys(g.hexes).forEach(function(yt){g.hexes[yt].key=yt,E.push(g.hexes[yt])});var M=o.max(E,function(yt){return+yt.q}),_=o.min(E,function(yt){return+yt.q}),D=o.max(E,function(yt){return+yt.r}),C=o.min(E,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 E.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}),E}function l(g,p,m,y){var E=0,x=0;switch(p){case"odd-r":x=g.rc%2===1?m:m/2,E=g.qc*m+x;break;case"even-r":x=g.rc%2===0?m:m/2,E=g.qc*m+x;break;case"odd-q":case"even-q":E=g.qc*y*1.5+y;break}return E}function u(g,p,m,y){var E=0,x=0;switch(p){case"odd-r":case"even-r":E=g.rc*y*1.5+y;break;case"odd-q":x=g.qc%2===1?m:m/2,E=g.rc*m+x;break;case"even-q":x=g.qc%2===0?m:m/2,E=g.rc*m+x;break}return E}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}),E=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(_=E;_<=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 E=[],x=g.layout;Object.keys(g.hexes).forEach(function(Rt){E.push(g.hexes[Rt])});var M=o.max(E,function(Rt){return+Rt.q}),_=o.min(E,function(Rt){return+Rt.q}),D=o.max(E,function(Rt){return+Rt.r}),C=o.min(E,function(Rt){return+Rt.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=E.length;if(Q>1){E.forEach(function(Rt){Rt.qc=Rt.q-_,Rt.rc=D-Rt.r,Rt.x=l(Rt,x,V,j),Rt.y=u(Rt,x,V,j)});for(var it=0;it1){E.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,Te,Ke;do for(ie=ue.reverse(),ue=[];zt=ie.pop();)if(Ft(zt),be=zt.children,be)for(Te=0,Ke=be.length;Te=0;--be)ie.push(ue[be]);return this}function y(Ft){for(var zt=this,ie=[zt],ue=[],be,Te,Ke;zt=ie.pop();)if(ue.push(zt),be=zt.children,be)for(Te=0,Ke=be.length;Te=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,Te=[ie],Ke,un,an,Ce;for(zt==null&&(zt=st);be=Te.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)Te.push(Ke=be.children[an]=new it(un[an])),Ke.parent=be,Ke.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:E,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,Te;zt0&&ie*ie>ue*ue+be*be}function Rt(Ft,zt){for(var ie=0;iean?(be=(Ce+an-Te)/(2*Ce),un=Math.sqrt(Math.max(0,an/Ce-be*be)),ie.x=Ft.x-be*ue-un*Ke,ie.y=Ft.y-be*Ke+un*ue):(be=(Ce+Te-an)/(2*Ce),un=Math.sqrt(Math.max(0,Te/Ce-be*be)),ie.x=zt.x+be*ue-un*Ke,ie.y=zt.y+be*Ke+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,Te=(zt.y*ie.r+ie.y*zt.r)/ue;return be*be+Te*Te}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,Te,Ke,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,Te;--be>=0;)Te=ue[be],Te.z+=zt,Te.m+=zt,zt+=Te.s+(ie+=Te.c)}function Tn(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,Te,Ke,un;ie=ue.pop();)if(Te=ie._.children)for(ie.children=new Array(un=Te.length),Ke=un-1;Ke>=0;--Ke)ue.push(be=ie.children[Ke]=new Dn(Te[Ke],Ke)),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(Te),nn.parent.m=-nn.z,nn.eachBefore(Ke),ue)Ce.eachBefore(an);else{var vn=Ce,ye=Ce,dn=Ce;Ce.eachBefore(function($t){$t.xye.x&&(ye=$t),$t.depth>dn.depth&&(dn=$t)});var gn=vn===ye?1:Ft(vn,ye)/2,vt=gn-vn.x,Ct=zt/(ye.x+gn+vt),Tt=ie/(dn.depth||1);Ce.eachBefore(function($t){$t.x=($t.x+vt)*Ct,$t.y=$t.depth*Tt})}return Ce}function Te(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 Ke(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,Tt=dn.m,$t=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+$t-ye.z-Ct+Ft(gn._,ye._),se>0&&(xn(Tn(gn,Ce,vn),Ce,se),Ct+=se,Tt+=se),$t+=gn.m,Ct+=ye.m,Vt+=vt.m,Tt+=dn.m;gn&&!Sn(dn)&&(dn.t=gn,dn.m+=$t-Tt),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 Te=Ft.children,Ke,un=-1,an=Te.length,Ce=Ft.value&&(be-ie)/Ft.value;++un$t&&($t=Ce),ne=Ct*Ct*Wt,Vt=Math.max($t/ne,ne/Tt),Vt>se){Ct-=Ce;break}se=Vt}Ke.push(an={value:Ct,dice:dn1?ue:1)},ie}(fe);function Pr(){var Ft=Fn,zt=!1,ie=1,ue=1,be=[0],Te=dt,Ke=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,Tt=ye.y1-dn;Ct=ye-1){var $t=Te[vn];$t.x0=gn,$t.y0=vt,$t.x1=Ct,$t.y1=Tt;return}for(var Vt=Ce[vn],se=dn/2+Vt,Wt=vn+1,ne=ye-1;Wt>>1;Ce[ae]Tt-vt){var ke=(gn*Pe+Ct*ge)/dn;nn(vn,Wt,ge,gn,vt,ke,Tt),nn(Wt,ye,Pe,ke,vt,Ct,Tt)}else{var Ae=(vt*Pe+Tt*ge)/dn;nn(vn,Wt,ge,gn,vt,Ct,Ae),nn(Wt,ye,Pe,gn,Ae,Ct,Tt)}}}function Lr(Ft,zt,ie,ue,be){(Ft.depth&1?oe:pt)(Ft,zt,ie,ue,be)}var sr=function Ft(zt){function ie(ue,be,Te,Ke,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=Lr,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,E=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(_*E-x*M)>l)||!p)this._+="L"+(this._x1=h)+","+(this._y1=d);else{var C=v-m,F=g-y,k=E*E+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*E)+","+(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),E=v*Math.sin(g),x=h+y,M=d+E,_=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-E)+"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,E=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(_*E-x*M)>l)||!p)this._+="L"+(this._x1=h)+","+(this._y1=d);else{var C=v-m,F=g-y,k=E*E+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*E)+","+(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),E=v*Math.sin(g),x=h+y,M=d+E,_=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-E)+"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 E(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,$,xt=M,Gt=_,Rt=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?($=gt,Qt):$},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?(Rt=+gt,Qt):Rt};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,E),s.sum(P.targetLinks,E))})}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=Rt;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,E)});P.forEach(function(S){$!=null&&S.sort($),S.forEach(function(R,T){R.y1=(R.y0=T)+R.value*mt})}),gt.links.forEach(function(S){S.width=S.value*mt})}function at(mt){P.forEach(function(S){S.forEach(function(R){var T,z,J,pt,It=R.y0;try{for(var Zt=r.__values(R.sourceLinks.sort(m)),Lt=Zt.next();!Lt.done;Lt=Zt.next()){var Yt=Lt.value,Se=Yt.target,$e=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,Tn=xn.width;if(bn===R)break;on+=Tn+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(R.value,Se.value)),Se.y0+=on,Se.y1+=on}It+=$e+Pt/2}}catch(Dn){T={error:Dn}}finally{try{Lt&&!Lt.done&&(z=Zt.return)&&z.call(Zt)}finally{if(T)throw T.error}}})})}function dt(mt){P.slice().reverse().forEach(function(S){S.forEach(function(R){var T,z,J,pt,It=R.y0;try{for(var Zt=r.__values(R.targetLinks.sort(p)),Lt=Zt.next();!Lt.done;Lt=Zt.next()){var Yt=Lt.value,Se=Yt.source,$e=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,Tn=xn.width;if(bn===R)break;on+=Tn+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(R.value,Se.value)),Se.y0+=on,Se.y1+=on}It+=$e+Pt/2}}catch(Dn){T={error:Dn}}finally{try{Lt&&!Lt.done&&(z=Zt.return)&&z.call(Zt)}finally{if(T)throw T.error}}})})}function Z(){P.forEach(function(mt){var S,R,T=st,z=mt.length,J;for($===void 0&&mt.sort(y),J=0;J0&&(S.y0+=R,S.y1+=R),T=S.y1+Pt;if(R=T-Pt-Q,R>0)for(T=S.y0-=R,S.y1-=R,J=z-2;J>=0;--J)S=mt[J],R=S.y1+Pt-T,R>0&&(S.y0-=R,S.y1-=R),T=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(X){return function(){return X}}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 E(X){return X>1?0:X<-1?p:Math.acos(X)}function x(X){return X>=1?m:X<=-1?-m:Math.asin(X)}function M(X){return X.innerRadius}function _(X){return X.outerRadius}function D(X){return X.startAngle}function C(X){return X.endAngle}function F(X){return X&&X.padAngle}function k(X,At,Ut,de,Oe,Le,He,xe){var Qe=Ut-X,Mn=de-At,pn=He-Oe,An=xe-Le,On=An*Qe-pn*Mn;if(!(On*OnRr*Rr+mi*mi&&(Tr=Xr,br=_r),{cx:Tr,cy:br,x01:-pn,y01:-An,x11:Tr*(Oe/Dr-1),y11:br*(Oe/Dr-1)}}function V(){var X=M,At=_,Ut=s(0),de=null,Oe=D,Le=C,He=F,xe=null;function Qe(){var Mn,pn,An=+X.apply(this,arguments),On=+At.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),An>g&&(xe.moveTo(An*c(Gn),An*d(Gn)),xe.arc(0,0,An,Gn,Kn,Vn));else{var hr=Kn,ar=Gn,mr=Kn,dr=Gn,Dr=Jn,Ar=Jn,Hr=He.apply(this,arguments)/2,Tr=Hr>g&&(de?+de.apply(this,arguments):v(An*An+On*On)),br=h(l(On-An)/2,+Ut.apply(this,arguments)),Xr=br,_r=br,zn,tr;if(Tr>g){var Rr=x(Tr/An*d(Hr)),mi=x(Tr/On*d(Hr));(Dr-=Rr*2)>g?(Rr*=Vn?1:-1,mr+=Rr,dr-=Rr):(Dr=0,mr=dr=(Kn+Gn)/2),(Ar-=mi*2)>g?(mi*=Vn?1:-1,hr+=mi,ar-=mi):(Ar=0,hr=ar=(Kn+Gn)/2)}var Br=On*c(hr),ta=On*d(hr),da=An*c(dr),ui=An*d(dr);if(br>g){var Li=On*c(ar),Ur=On*d(ar),oo=An*c(mr),Yi=An*d(mr),$r;if(Jng?_r>g?(zn=j(oo,Yi,Br,ta,On,_r,Vn),tr=j(Li,Ur,da,ui,On,_r,Vn),xe.moveTo(zn.cx+zn.x01,zn.cy+zn.y01),_rg)||!(Dr>g)?xe.lineTo(da,ui):Xr>g?(zn=j(da,ui,Li,Ur,An,-Xr,Vn),tr=j(Br,ta,oo,Yi,An,-Xr,Vn),xe.lineTo(zn.cx+zn.x01,zn.cy+zn.y01),Xr=On;--Kn)xe.point(ar[Kn],mr[Kn]);xe.lineEnd(),xe.areaEnd()}Vn&&(ar[An]=+X(Jn,An,pn),mr[An]=+Ut(Jn,An,pn),xe.point(At?+At(Jn,An,pn):ar[An],de?+de(Jn,An,pn):mr[An]))}if(hr)return xe=null,hr+""||null}function Mn(){return Pt().defined(Oe).curve(He).context(Le)}return Qe.x=function(pn){return arguments.length?(X=typeof pn=="function"?pn:s(+pn),At=null,Qe):X},Qe.x0=function(pn){return arguments.length?(X=typeof pn=="function"?pn:s(+pn),Qe):X},Qe.x1=function(pn){return arguments.length?(At=pn==null?null:typeof pn=="function"?pn:s(+pn),Qe):At},Qe.y=function(pn){return arguments.length?(Ut=typeof pn=="function"?pn:s(+pn),de=null,Qe):Ut},Qe.y0=function(pn){return arguments.length?(Ut=typeof pn=="function"?pn:s(+pn),Qe):Ut},Qe.y1=function(pn){return arguments.length?(de=pn==null?null:typeof pn=="function"?pn:s(+pn),Qe):de},Qe.lineX0=Qe.lineY0=function(){return Mn().x(X).y(Ut)},Qe.lineY1=function(){return Mn().x(X).y(de)},Qe.lineX1=function(){return Mn().x(At).y(Ut)},Qe.defined=function(pn){return arguments.length?(Oe=typeof pn=="function"?pn:s(!!pn),Qe):Oe},Qe.curve=function(pn){return arguments.length?(He=pn,Le!=null&&(xe=He(Le)),Qe):He},Qe.context=function(pn){return arguments.length?(pn==null?Le=xe=null:xe=He(Le=pn),Qe):Le},Qe}function lt(X,At){return AtX?1:At>=X?0:NaN}function $(X){return X}function xt(){var X=$,At=lt,Ut=null,de=s(0),Oe=s(y),Le=s(0);function He(xe){var Qe,Mn=xe.length,pn,An,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(Qe=0;Qe0&&(On+=dr);for(At!=null?Kn.sort(function(Dr,Ar){return At(Gn[Dr],Gn[Ar])}):Ut!=null&&Kn.sort(function(Dr,Ar){return Ut(xe[Dr],xe[Ar])}),Qe=0,An=On?(Vn-Mn*mr)/On:0;Qe0?dr*An:0)+mr,Gn[pn]={data:xe[pn],index:Qe,value:dr,startAngle:Jn,endAngle:hr,padAngle:ar};return Gn}return He.value=function(xe){return arguments.length?(X=typeof xe=="function"?xe:s(+xe),He):X},He.sortValues=function(xe){return arguments.length?(At=xe,Ut=null,He):At},He.sort=function(xe){return arguments.length?(Ut=xe,At=null,He):Ut},He.startAngle=function(xe){return arguments.length?(de=typeof xe=="function"?xe:s(+xe),He):de},He.endAngle=function(xe){return arguments.length?(Oe=typeof xe=="function"?xe:s(+xe),He):Oe},He.padAngle=function(xe){return arguments.length?(Le=typeof xe=="function"?xe:s(+xe),He):Le},He}var Gt=Qt(yt);function Rt(X){this._curve=X}Rt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(X,At){this._curve.point(At*Math.sin(X),At*-Math.cos(X))}};function Qt(X){function At(Ut){return new Rt(X(Ut))}return At._curve=X,At}function Ie(X){var At=X.curve;return X.angle=X.x,delete X.x,X.radius=X.y,delete X.y,X.curve=function(Ut){return arguments.length?At(Qt(Ut)):At()._curve},X}function _e(){return Ie(Pt().curve(Gt))}function Ue(){var X=ht().curve(Gt),At=X.curve,Ut=X.lineX0,de=X.lineX1,Oe=X.lineY0,Le=X.lineY1;return X.angle=X.x,delete X.x,X.startAngle=X.x0,delete X.x0,X.endAngle=X.x1,delete X.x1,X.radius=X.y,delete X.y,X.innerRadius=X.y0,delete X.y0,X.outerRadius=X.y1,delete X.y1,X.lineStartAngle=function(){return Ie(Ut())},delete X.lineX0,X.lineEndAngle=function(){return Ie(de())},delete X.lineX1,X.lineInnerRadius=function(){return Ie(Oe())},delete X.lineY0,X.lineOuterRadius=function(){return Ie(Le())},delete X.lineY1,X.curve=function(He){return arguments.length?At(Qt(He)):At()._curve},X}function Fe(X,At){return[(At=+At)*Math.cos(X-=Math.PI/2),At*Math.sin(X)]}var ft=Array.prototype.slice;function gt(X){return X.source}function P(X){return X.target}function Kt(X){var At=gt,Ut=P,de=Q,Oe=it,Le=null;function He(){var xe,Qe=ft.call(arguments),Mn=At.apply(this,Qe),pn=Ut.apply(this,Qe);if(Le||(Le=xe=o.path()),X(Le,+de.apply(this,(Qe[0]=Mn,Qe)),+Oe.apply(this,Qe),+de.apply(this,(Qe[0]=pn,Qe)),+Oe.apply(this,Qe)),xe)return Le=null,xe+""||null}return He.source=function(xe){return arguments.length?(At=xe,He):At},He.target=function(xe){return arguments.length?(Ut=xe,He):Ut},He.x=function(xe){return arguments.length?(de=typeof xe=="function"?xe:s(+xe),He):de},He.y=function(xe){return arguments.length?(Oe=typeof xe=="function"?xe:s(+xe),He):Oe},He.context=function(xe){return arguments.length?(Le=xe==null?null:xe,He):Le},He}function H(X,At,Ut,de,Oe){X.moveTo(At,Ut),X.bezierCurveTo(At=(At+de)/2,Ut,At,Oe,de,Oe)}function ot(X,At,Ut,de,Oe){X.moveTo(At,Ut),X.bezierCurveTo(At,Ut=(Ut+Oe)/2,de,Ut,de,Oe)}function at(X,At,Ut,de,Oe){var Le=Fe(At,Ut),He=Fe(At,Ut=(Ut+Oe)/2),xe=Fe(de,Ut),Qe=Fe(de,Oe);X.moveTo(Le[0],Le[1]),X.bezierCurveTo(He[0],He[1],xe[0],xe[1],Qe[0],Qe[1])}function dt(){return Kt(H)}function Z(){return Kt(ot)}function mt(){var X=Kt(at);return X.angle=X.x,delete X.x,X.radius=X.y,delete X.y,X}var S={draw:function(X,At){var Ut=Math.sqrt(At/p);X.moveTo(Ut,0),X.arc(0,0,Ut,0,y)}},R={draw:function(X,At){var Ut=Math.sqrt(At/5)/2;X.moveTo(-3*Ut,-Ut),X.lineTo(-Ut,-Ut),X.lineTo(-Ut,-3*Ut),X.lineTo(Ut,-3*Ut),X.lineTo(Ut,-Ut),X.lineTo(3*Ut,-Ut),X.lineTo(3*Ut,Ut),X.lineTo(Ut,Ut),X.lineTo(Ut,3*Ut),X.lineTo(-Ut,3*Ut),X.lineTo(-Ut,Ut),X.lineTo(-3*Ut,Ut),X.closePath()}},T=Math.sqrt(1/3),z=T*2,J={draw:function(X,At){var Ut=Math.sqrt(At/z),de=Ut*T;X.moveTo(0,-Ut),X.lineTo(de,0),X.lineTo(0,Ut),X.lineTo(-de,0),X.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(X,At){var Ut=Math.sqrt(At*pt),de=Zt*Ut,Oe=Lt*Ut;X.moveTo(0,-Ut),X.lineTo(de,Oe);for(var Le=1;Le<5;++Le){var He=y*Le/5,xe=Math.cos(He),Qe=Math.sin(He);X.lineTo(Qe*Ut,-xe*Ut),X.lineTo(xe*de-Qe*Oe,Qe*de+xe*Oe)}X.closePath()}},Se={draw:function(X,At){var Ut=Math.sqrt(At),de=-Ut/2;X.rect(de,de,Ut,Ut)}},$e=Math.sqrt(3),fn={draw:function(X,At){var Ut=-Math.sqrt(At/($e*3));X.moveTo(0,Ut*2),X.lineTo(-$e*Ut,-Ut),X.lineTo($e*Ut,-Ut),X.closePath()}},on=-.5,mn=Math.sqrt(3)/2,Sn=1/Math.sqrt(12),xn=(Sn/2+1)*3,bn={draw:function(X,At){var Ut=Math.sqrt(At/xn),de=Ut/2,Oe=Ut*Sn,Le=de,He=Ut*Sn+Ut,xe=-Le,Qe=He;X.moveTo(de,Oe),X.lineTo(Le,He),X.lineTo(xe,Qe),X.lineTo(on*de-mn*Oe,mn*de+on*Oe),X.lineTo(on*Le-mn*He,mn*Le+on*He),X.lineTo(on*xe-mn*Qe,mn*xe+on*Qe),X.lineTo(on*de+mn*Oe,on*Oe-mn*de),X.lineTo(on*Le+mn*He,on*He-mn*Le),X.lineTo(on*xe+mn*Qe,on*Qe-mn*xe),X.closePath()}},Tn=[S,R,J,Se,Yt,fn,bn];function Dn(){var X=s(S),At=s(64),Ut=null;function de(){var Oe;if(Ut||(Ut=Oe=o.path()),X.apply(this,arguments).draw(Ut,+At.apply(this,arguments)),Oe)return Ut=null,Oe+""||null}return de.type=function(Oe){return arguments.length?(X=typeof Oe=="function"?Oe:s(Oe),de):X},de.size=function(Oe){return arguments.length?(At=typeof Oe=="function"?Oe:s(+Oe),de):At},de.context=function(Oe){return arguments.length?(Ut=Oe==null?null:Oe,de):Ut},de}function Ht(){}function kt(X,At,Ut){X._context.bezierCurveTo((2*X._x0+X._x1)/3,(2*X._y0+X._y1)/3,(X._x0+2*X._x1)/3,(X._y0+2*X._y1)/3,(X._x0+4*X._x1+At)/6,(X._y0+4*X._y1+Ut)/6)}function oe(X){this._context=X}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(X,At){switch(X=+X,At=+At,this._point){case 0:this._point=1,this._line?this._context.lineTo(X,At):this._context.moveTo(X,At);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,X,At);break}this._x0=this._x1,this._x1=X,this._y0=this._y1,this._y1=At}};function fe(X){return new oe(X)}function Ge(X){this._context=X}Ge.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(X,At){switch(X=+X,At=+At,this._point){case 0:this._point=1,this._x2=X,this._y2=At;break;case 1:this._point=2,this._x3=X,this._y3=At;break;case 2:this._point=3,this._x4=X,this._y4=At,this._context.moveTo((this._x0+4*this._x1+X)/6,(this._y0+4*this._y1+At)/6);break;default:kt(this,X,At);break}this._x0=this._x1,this._x1=X,this._y0=this._y1,this._y1=At}};function Fn(X){return new Ge(X)}function Pr(X){this._context=X}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(X,At){switch(X=+X,At=+At,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Ut=(this._x0+4*this._x1+X)/6,de=(this._y0+4*this._y1+At)/6;this._line?this._context.lineTo(Ut,de):this._context.moveTo(Ut,de);break;case 3:this._point=4;default:kt(this,X,At);break}this._x0=this._x1,this._x1=X,this._y0=this._y1,this._y1=At}};function pr(X){return new Pr(X)}function Lr(X,At){this._basis=new oe(X),this._beta=At}Lr.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var X=this._x,At=this._y,Ut=X.length-1;if(Ut>0)for(var de=X[0],Oe=At[0],Le=X[Ut]-de,He=At[Ut]-Oe,xe=-1,Qe;++xe<=Ut;)Qe=xe/Ut,this._basis.point(this._beta*X[xe]+(1-this._beta)*(de+Qe*Le),this._beta*At[xe]+(1-this._beta)*(Oe+Qe*He));this._x=this._y=null,this._basis.lineEnd()},point:function(X,At){this._x.push(+X),this._y.push(+At)}};var sr=function X(At){function Ut(de){return At===1?new oe(de):new Lr(de,At)}return Ut.beta=function(de){return X(+de)},Ut}(.85);function Ft(X,At,Ut){X._context.bezierCurveTo(X._x1+X._k*(X._x2-X._x0),X._y1+X._k*(X._y2-X._y0),X._x2+X._k*(X._x1-At),X._y2+X._k*(X._y1-Ut),X._x2,X._y2)}function zt(X,At){this._context=X,this._k=(1-At)/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(X,At){switch(X=+X,At=+At,this._point){case 0:this._point=1,this._line?this._context.lineTo(X,At):this._context.moveTo(X,At);break;case 1:this._point=2,this._x1=X,this._y1=At;break;case 2:this._point=3;default:Ft(this,X,At);break}this._x0=this._x1,this._x1=this._x2,this._x2=X,this._y0=this._y1,this._y1=this._y2,this._y2=At}};var ie=function X(At){function Ut(de){return new zt(de,At)}return Ut.tension=function(de){return X(+de)},Ut}(0);function ue(X,At){this._context=X,this._k=(1-At)/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(X,At){switch(X=+X,At=+At,this._point){case 0:this._point=1,this._x3=X,this._y3=At;break;case 1:this._point=2,this._context.moveTo(this._x4=X,this._y4=At);break;case 2:this._point=3,this._x5=X,this._y5=At;break;default:Ft(this,X,At);break}this._x0=this._x1,this._x1=this._x2,this._x2=X,this._y0=this._y1,this._y1=this._y2,this._y2=At}};var be=function X(At){function Ut(de){return new ue(de,At)}return Ut.tension=function(de){return X(+de)},Ut}(0);function Te(X,At){this._context=X,this._k=(1-At)/6}Te.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(X,At){switch(X=+X,At=+At,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,X,At);break}this._x0=this._x1,this._x1=this._x2,this._x2=X,this._y0=this._y1,this._y1=this._y2,this._y2=At}};var Ke=function X(At){function Ut(de){return new Te(de,At)}return Ut.tension=function(de){return X(+de)},Ut}(0);function un(X,At,Ut){var de=X._x1,Oe=X._y1,Le=X._x2,He=X._y2;if(X._l01_a>g){var xe=2*X._l01_2a+3*X._l01_a*X._l12_a+X._l12_2a,Qe=3*X._l01_a*(X._l01_a+X._l12_a);de=(de*xe-X._x0*X._l12_2a+X._x2*X._l01_2a)/Qe,Oe=(Oe*xe-X._y0*X._l12_2a+X._y2*X._l01_2a)/Qe}if(X._l23_a>g){var Mn=2*X._l23_2a+3*X._l23_a*X._l12_a+X._l12_2a,pn=3*X._l23_a*(X._l23_a+X._l12_a);Le=(Le*Mn+X._x1*X._l23_2a-At*X._l12_2a)/pn,He=(He*Mn+X._y1*X._l23_2a-Ut*X._l12_2a)/pn}X._context.bezierCurveTo(de,Oe,Le,He,X._x2,X._y2)}function an(X,At){this._context=X,this._alpha=At}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(X,At){if(X=+X,At=+At,this._point){var Ut=this._x2-X,de=this._y2-At;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Ut*Ut+de*de,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(X,At):this._context.moveTo(X,At);break;case 1:this._point=2;break;case 2:this._point=3;default:un(this,X,At);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=X,this._y0=this._y1,this._y1=this._y2,this._y2=At}};var Ce=function X(At){function Ut(de){return At?new an(de,At):new zt(de,0)}return Ut.alpha=function(de){return X(+de)},Ut}(.5);function nn(X,At){this._context=X,this._alpha=At}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(X,At){if(X=+X,At=+At,this._point){var Ut=this._x2-X,de=this._y2-At;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Ut*Ut+de*de,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=X,this._y3=At;break;case 1:this._point=2,this._context.moveTo(this._x4=X,this._y4=At);break;case 2:this._point=3,this._x5=X,this._y5=At;break;default:un(this,X,At);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=X,this._y0=this._y1,this._y1=this._y2,this._y2=At}};var vn=function X(At){function Ut(de){return At?new nn(de,At):new ue(de,0)}return Ut.alpha=function(de){return X(+de)},Ut}(.5);function ye(X,At){this._context=X,this._alpha=At}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(X,At){if(X=+X,At=+At,this._point){var Ut=this._x2-X,de=this._y2-At;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Ut*Ut+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,X,At);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=X,this._y0=this._y1,this._y1=this._y2,this._y2=At}};var dn=function X(At){function Ut(de){return At?new ye(de,At):new Te(de,0)}return Ut.alpha=function(de){return X(+de)},Ut}(.5);function gn(X){this._context=X}gn.prototype={areaStart:Ht,areaEnd:Ht,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(X,At){X=+X,At=+At,this._point?this._context.lineTo(X,At):(this._point=1,this._context.moveTo(X,At))}};function vt(X){return new gn(X)}function Ct(X){return X<0?-1:1}function Tt(X,At,Ut){var de=X._x1-X._x0,Oe=At-X._x1,Le=(X._y1-X._y0)/(de||Oe<0&&-0),He=(Ut-X._y1)/(Oe||de<0&&-0),xe=(Le*Oe+He*de)/(de+Oe);return(Ct(Le)+Ct(He))*Math.min(Math.abs(Le),Math.abs(He),.5*Math.abs(xe))||0}function $t(X,At){var Ut=X._x1-X._x0;return Ut?(3*(X._y1-X._y0)/Ut-At)/2:At}function Vt(X,At,Ut){var de=X._x0,Oe=X._y0,Le=X._x1,He=X._y1,xe=(Le-de)/3;X._context.bezierCurveTo(de+xe,Oe+xe*At,Le-xe,He-xe*Ut,Le,He)}function se(X){this._context=X}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,$t(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(X,At){var Ut=NaN;if(X=+X,At=+At,!(X===this._x1&&At===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(X,At):this._context.moveTo(X,At);break;case 1:this._point=2;break;case 2:this._point=3,Vt(this,$t(this,Ut=Tt(this,X,At)),Ut);break;default:Vt(this,this._t0,Ut=Tt(this,X,At));break}this._x0=this._x1,this._x1=X,this._y0=this._y1,this._y1=At,this._t0=Ut}}};function Wt(X){this._context=new ne(X)}(Wt.prototype=Object.create(se.prototype)).point=function(X,At){se.prototype.point.call(this,At,X)};function ne(X){this._context=X}ne.prototype={moveTo:function(X,At){this._context.moveTo(At,X)},closePath:function(){this._context.closePath()},lineTo:function(X,At){this._context.lineTo(At,X)},bezierCurveTo:function(X,At,Ut,de,Oe,Le){this._context.bezierCurveTo(At,X,de,Ut,Le,Oe)}};function ae(X){return new se(X)}function ge(X){return new Wt(X)}function Pe(X){this._context=X}Pe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var X=this._x,At=this._y,Ut=X.length;if(Ut)if(this._line?this._context.lineTo(X[0],At[0]):this._context.moveTo(X[0],At[0]),Ut===2)this._context.lineTo(X[1],At[1]);else for(var de=ke(X),Oe=ke(At),Le=0,He=1;He=0;--At)Oe[At]=(He[At]-Oe[At+1])/Le[At];for(Le[Ut-1]=(X[Ut]+Oe[Ut-1])/2,At=0;At=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(X,At){switch(X=+X,At=+At,this._point){case 0:this._point=1,this._line?this._context.lineTo(X,At):this._context.moveTo(X,At);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,At),this._context.lineTo(X,At);else{var Ut=this._x*(1-this._t)+X*this._t;this._context.lineTo(Ut,this._y),this._context.lineTo(Ut,At)}break}}this._x=X,this._y=At}};function En(X){return new tn(X,.5)}function Qn(X){return new tn(X,0)}function fr(X){return new tn(X,1)}function cr(X,At){if((He=X.length)>1)for(var Ut=1,de,Oe,Le=X[At[0]],He,xe=Le.length;Ut=0;)Ut[At]=At;return Ut}function Qr(X,At){return X[At]}function vi(){var X=s([]),At=xr,Ut=cr,de=Qr;function Oe(Le){var He=X.apply(this,arguments),xe,Qe=Le.length,Mn=He.length,pn=new Array(Mn),An;for(xe=0;xe0){for(var Ut,de,Oe=0,Le=X[0].length,He;Oe0)for(var Ut,de=0,Oe,Le,He,xe,Qe,Mn=X[At[0]].length;de0?(Oe[0]=He,Oe[1]=He+=Le):Le<0?(Oe[1]=xe,Oe[0]=xe+=Le):(Oe[0]=0,Oe[1]=Le)}function ji(X,At){if((Oe=X.length)>0){for(var Ut=0,de=X[At[0]],Oe,Le=de.length;Ut0)||!((Le=(Oe=X[At[0]]).length)>0))){for(var Ut=0,de=1,Oe,Le,He;deLe&&(Le=Oe,Ut=At);return Ut}function ha(X){var At=X.map(Fa);return xr(X).sort(function(Ut,de){return At[Ut]-At[de]})}function Fa(X){for(var At=0,Ut=-1,de=X.length,Oe;++Ut0)){if(Yt/=Zt,Zt<0){if(Yt0){if(Yt>It)return;Yt>pt&&(pt=Yt)}if(Yt=dt-R,!(!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-T,!(!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]=[R+pt*Zt,T+pt*Lt]),It<1&&(H[1]=[R+It*Zt,T+It*Lt])),!0}}}}}function y(H,ot,at,dt,Z){var mt=H[1];if(mt)return!0;var S=H[0],R=H.left,T=H.right,z=R[0],J=R[1],pt=T[0],It=T[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]Rt||Math.abs(mt[0][1]-mt[1][1])>Rt))&&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;HRt||Math.abs(Se-Zt)>Rt)&&(z.splice(T,0,Fe.push(g(R,Lt,Math.abs(Yt-H)Rt?[H,Math.abs(It-H)Rt?[Math.abs(Zt-dt)Rt?[at,Math.abs(It-at)Rt?[Math.abs(Zt-ot)=-Qt)){var Zt=T*T+z*z,Lt=J*J+pt*pt,Yt=(pt*Zt-z*Lt)/It,Se=(T*Lt-J*Zt)/It,$e=k.pop()||new V;$e.arc=H,$e.site=Z,$e.x=Yt+S,$e.y=($e.cy=Se+R)+Math.sqrt(Yt*Yt+Se*Se),H.circle=$e;for(var fn=null,on=Ue._;on;)if($e.yRt)R=R.L;else if(S=ot-Gt(R,at),S>Rt){if(!R.R){dt=R;break}R=R.R}else{mt>-Rt?(dt=R.P,Z=R):S>-Rt?(dt=R,Z=R.N):dt=Z=R;break}x(H);var T=Pt(H);if(Ie.insert(dt,T),!(!dt&&!Z)){if(dt===Z){yt(dt),Z=Pt(dt.site),Ie.insert(T,Z),T.edge=Z.edge=v(dt.site,T.site),st(dt),st(Z);return}if(!Z){T.edge=v(dt.site,T.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,$e=2*(It*Se-Zt*Yt),fn=It*It+Zt*Zt,on=Yt*Yt+Se*Se,mn=[(Se*fn-Zt*on)/$e+J,(It*on-Yt*fn)/$e+pt];p(Z.edge,z,Lt,mn),T.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 R=at[0],T=at[1],z=T-ot;if(!z)return R;var J=R-dt,pt=1/mt-1/z,It=J/z;return pt?(-It+Math.sqrt(It*It-2*pt*(J*J/(-2*z)-T+z/2+Z-mt/2)))/pt+dt:(dt+R)/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 Rt=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 T=H-R.site[0],z=ot-R.site[1],J=T*T+z*z;do R=dt.cells[Z=mt],mt=null,R.halfedges.forEach(function(pt){var It=dt.edges[pt],Zt=It.left;if(!((Zt===R.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 E=y?[]:void 0;return r.forEach(v.inEdges(m.v),function(x){var M=v.edge(x),_=v.node(x.v);y&&E.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),E}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 E=r.range(y+m+3).map(function(){return new s}),x=m+1;return r.forEach(p.nodes(),function(M){d(E,x,p.node(M))}),{graph:p,buckets:E,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=E;function E(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(){Rt(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(){$(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,R=mt.y,T=mt.width,z=mt.height;gt=Math.min(gt,S-T/2),P=Math.max(P,S+T/2),Kt=Math.min(Kt,R-z/2),H=Math.max(H,R+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(R){R.x-=gt,R.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 $(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 Rt(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{}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 E=h.children(y);if(!E.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(E,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 E,x,M;for(M=0,++d;d0;)y%2&&(E+=g[y+1]),y=y-1>>1,g[y]+=m.weight;p+=m.weight*E})),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),E=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?E: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,E){return r.map(y,function(x){return u(m,x,E)})}function g(m,y){var E=new f;r.forEach(m,function(x){var M=x.graph().root,_=l(x,M,E,y);r.forEach(_.vs,function(D,C){x.node(D).order=C}),c(x,E,_.vs)})}function p(m,y){r.forEach(y,function(E){r.forEach(E,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,E=m?m.borderRight:void 0,x={};y&&(p=r.filter(p,function(k){return k!==y&&k!==E}));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,E],!0),h.predecessors(y).length)){var C=h.node(h.predecessors(y)[0]),F=h.node(h.predecessors(E)[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 E={vs:r.flatten(g,!0)};return m&&(E.barycenter=p/m,E.weight=m),E}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],E=!0;f!==d.w;){if(h=u.node(f),E){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:E,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($){r.forEach(_.predecessors($),function(xt){var Gt=_.node(xt),Rt=Gt.order;(RtQ)&&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 $=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:E,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 E(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(E){var x=E.v!==p?E.v:E.w,M=v[x],_=h(E),D=m.distance+_;if(_<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+E+" 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 E=m[v],x=g[y],M=m[y],_=E.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(E,p):y.setNode(E)}),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 E(x){var M=m.parent(x);return M===void 0||p.hasNode(M)?(y[x]=M,M):M in y?y[M]:E(M)}return this._isCompound&&r.each(p.nodes(),function(x){p.setParent(x,E(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(E,x){return y.length>1?m.setEdge(E,x,p):m.setEdge(E,x),x}),this},u.prototype.setEdge=function(){var g,p,m,y,E=!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],E=!0)):(g=x,p=arguments[1],m=arguments[3],arguments.length>2&&(y=arguments[2],E=!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 E&&(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]=E?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),E=this._edgeObjs[y];return E&&(g=E.v,p=E.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(E){return E.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(E){return E.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 E=""+p,x=""+m;if(!g&&E>x){var M=E;E=x,x=M}return E+l+x+l+(r.isUndefined(y)?o:y)}function d(g,p,m,y){var E=""+p,x=""+m;if(!g&&E>x){var M=E;E=x,x=M}var _={v:E,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{}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 E(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,$=ht?M.value():M;return F||(F=new r),C(lt,$,_,D,F)}}return it?(F||(F=new r),l(x,M,_,D,C,F)):!1}t.exports=E},"./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(_);E=!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{}}();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 E=c(p),x=E||f(p)||v(p);if(m=l(m,4),y==null){var M=p&&p.constructor;x?y=E?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(E[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(E,_),C=yt(E,_);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(E[0]==="L"){if(g[0]=v[0],g[1]=v[1],g[2]=m,m+=u(v[0],v[1],E[1],E[2]),v[0]=E[1],v[1]=E[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;$--)$>1?lt+=it[$]+"x^"+$+" + ":$===1?lt+=it[$]+"x + ":lt+=it[$];return{string:lt,points:ht,predict:Pt,equation:[].concat(f(it)).reverse(),r2:g(d(E,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 R,T=S[0],z=0,J=1;J=Math.abs(S[J])?z+=T-R+S[J]:z+=S[J]-R+T,T=R;return T+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,R){var T,z,J=s(S),pt=0;if(R===2)for(z=0;zR&&(R=S[T]);return R}function g(S,R){var T=S.length*R;if(S.length===0)throw new Error("quantile requires at least one data point.");if(R<0||1Yt&&m(S,T,z);Se<$e;){for(m(S,Se,$e),Se++,$e--;S[Se]Yt;)$e--}S[T]===Yt?m(S,T,$e):m(S,++$e,z),$e<=R&&(T=$e+1),R<=$e&&(z=$e-1)}}function m(S,R,T){var z=S[R];S[R]=S[T],S[T]=z}function y(S,R){var T=S.slice();if(Array.isArray(R)){(function(pt,It){for(var Zt=[0],Lt=0;LtS[S.length-1])return 1;var T=function(pt,It){for(var Zt=0,Lt=0,Yt=pt.length;Lt>>1]?Yt=Zt:Lt=-~Zt;return Lt}(S,R);if(S[T]!==R)return T/S.length;T++;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,R);if(z===T)return T/S.length;var J=z-T+1;return J*(z+T)/2/J/S.length}function D(S){var R=y(S,.75),T=y(S,.25);if(typeof R=="number"&&typeof T=="number")return R-T}function C(S){return+y(S,.5)}function F(S){for(var R=C(S),T=[],z=0;z=z[T][Zt]);--on)(Se=yt(Lt,Zt,pt,It)+z[T-1][Lt-1])T&&(T=S[z]),S[z]S.length)throw new Error("cannot generate more classes than there are data values");var T=h(S);if(V(T)===1)return[T];var z=st(R,T.length),J=st(R,T.length);(function(Yt,Se,$e){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(T==="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,R,T,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,$;++htst&&(st=$[0]),$[1]yt&&(yt=$[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 $=j[ht<0?~ht:ht],xt=0,Gt=$.length;xt1)j=p(C,F,k);else for(V=0,j=new Array(st=C.arcs.length);V1)for(var lt=1,$=Q(Pt[0]),xt,Gt;lt$&&(Gt=Pt[0],Pt[0]=Pt[lt],Pt[lt]=Gt,$=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 $(Rt){return Q(Rt)}function xt(Rt){var Qt;switch(Rt.type){case"GeometryCollection":Qt={type:"GeometryCollection",geometries:Rt.geometries.map(xt)};break;case"Point":Qt={type:"Point",coordinates:$(Rt.coordinates)};break;case"MultiPoint":Qt={type:"MultiPoint",coordinates:Rt.coordinates.map($)};break;default:return Rt}return Rt.id!=null&&(Qt.id=Rt.id),Rt.bbox!=null&&(Qt.bbox=Rt.bbox),Rt.properties!=null&&(Qt.properties=Rt.properties),Qt}function Gt(Rt){var Qt=0,Ie=1,_e=Rt.length,Ue,Fe=new Array(_e);for(Fe[0]=Q(Rt[0],0);++Qt<_e;)((Ue=Q(Rt[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=E,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,E,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,$){return lt!==Pt&&(typeof Object.create=="function"?Object.defineProperty(lt,"__esModule",{value:!0}):lt.__esModule=!0),function(xt,Gt){return lt[xt]=$?$(xt,Gt):Gt}}})(function(it){var Pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,$){lt.__proto__=$}||function(lt,$){for(var xt in $)Object.prototype.hasOwnProperty.call($,xt)&&(lt[xt]=$[xt])};l=function(lt,$){if(typeof $!="function"&&$!==null)throw new TypeError("Class extends value "+String($)+" is not a constructor or null");Pt(lt,$);function xt(){this.constructor=lt}lt.prototype=$===null?Object.create($):(xt.prototype=$.prototype,new xt)},u=Object.assign||function(lt){for(var $,xt=1,Gt=arguments.length;xt=0;_e--)(Ie=lt[_e])&&(Qt=(Rt<3?Ie(Qt):Rt>3?Ie($,xt,Qt):Ie($,xt))||Qt);return Rt>3&&Qt&&Object.defineProperty($,xt,Qt),Qt},h=function(lt,$){return function(xt,Gt){$(xt,Gt,lt)}},d=function(lt,$){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(lt,$)},v=function(lt,$,xt,Gt){function Rt(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):Rt(ft.value).then(_e,Ue)}Fe((Gt=Gt.apply(lt,$||[])).next())})},g=function(lt,$){var xt={label:0,sent:function(){if(Qt[0]&1)throw Qt[1];return Qt[1]},trys:[],ops:[]},Gt,Rt,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,Rt&&(Qt=Fe[0]&2?Rt.return:Fe[0]?Rt.throw||((Qt=Rt.return)&&Qt.call(Rt),0):Rt.next)&&!(Qt=Qt.call(Rt,Fe[1])).done)return Qt;switch(Rt=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++,Rt=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($?"Object is not iterable.":"Symbol.iterator is not defined.")},y=function(lt,$){var xt=typeof Symbol=="function"&<[Symbol.iterator];if(!xt)return lt;var Gt=xt.call(lt),Rt,Qt=[],Ie;try{for(;($===void 0||$-- >0)&&!(Rt=Gt.next()).done;)Qt.push(Rt.value)}catch(_e){Ie={error:_e}}finally{try{Rt&&!Rt.done&&(xt=Gt.return)&&xt.call(Gt)}finally{if(Ie)throw Ie.error}}return Qt},E=function(){for(var lt=[],$=0;$1||_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 $,xt;return $={},Gt("next"),Gt("throw",function(Rt){throw Rt}),Gt("return"),$[Symbol.iterator]=function(){return this},$;function Gt(Rt,Qt){$[Rt]=lt[Rt]?function(Ie){return(xt=!xt)?{value:_(lt[Rt](Ie)),done:Rt==="return"}:Qt?Qt(Ie):Ie}:Qt}},F=function(lt){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var $=lt[Symbol.asyncIterator],xt;return $?$.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),Rt(_e,Ue,Ie.done,Ie.value)})}}function Rt(Qt,Ie,_e,Ue){Promise.resolve(Ue).then(function(Fe){Qt({value:Fe,done:_e})},Ie)}},k=function(lt,$){return Object.defineProperty?Object.defineProperty(lt,"raw",{value:$}):lt.raw=$,lt};var ht=Object.create?function(lt,$){Object.defineProperty(lt,"default",{enumerable:!0,value:$})}:function(lt,$){lt.default=$};j=function(lt){if(lt&<.__esModule)return lt;var $={};if(lt!=null)for(var xt in lt)xt!=="default"&&Object.prototype.hasOwnProperty.call(lt,xt)&&Q($,lt,xt);return ht($,lt),$},V=function(lt){return lt&<.__esModule?lt:{default:lt}},st=function(lt,$){if(!$.has(lt))throw new TypeError("attempted to get private field on non-instance");return $.get(lt)},yt=function(lt,$,xt){if(!$.has(lt))throw new TypeError("attempted to set private field on non-instance");return $.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",E),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{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($,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[Rt]=_e.map(function(ot){return(P+ft.count/Fe*ot[1])/ht})):(H[Gt]=_e.map(function(ot){return gt+ot[0]}),H[Rt]=_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],E=g.binWidth,x=g.bins;if(!E&&x){if(x<=0)throw new TypeError("Invalid bins: it must be a positive number!");E=y/x}if(!E&&!x){var M=h(v.rows.length);E=y/M}var _=g.offset%E,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,E,_),2),lt=ht[0],$=ht[1],xt=lt+"-"+$;j[xt]=j[xt]||{x0:lt,x1:$,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 E=p.p,x=p.fraction;(!o.isArray(E)||E.length===0)&&(E=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=E.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),E=d.range(m),x=y[1]-y[0],M=E[1]-E[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),Rt=Gt[0],Qt=Gt[1],Ie=r.__read(f(xt[1],_[1],yt),2),_e=Ie[0],Ue=Ie[1],Fe=Rt+"-"+Qt+"-"+_e+"-"+Ue;j[Fe]=j[Fe]||{x0:Rt,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 $=0;o.forIn(j,function(xt){xt.count>$&&($=xt.count)}),o.forIn(j,function(xt){var Gt=xt.x0,Rt=xt.x1,Qt=xt.y0,Ie=xt.y1,_e=xt.count,Ue=_e/$,Fe=r.__read([(Gt+Rt)/2,(Qt+Ie)/2],2),ft=Fe[0],gt=Fe[1],P=(Rt-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),E=g.edgeTarget(m);p[y]||(p[y]={id:y}),p[E]||(p[E]={id:E})}),r.values(p)}function u(v,g,p){r.forIn(v,function(m,y){m.inEdges=g.filter(function(E){return""+p.target(E)==""+y}),m.outEdges=g.filter(function(E){return""+p.source(E)==""+y}),m.edges=m.outEdges.concat(m.inEdges),m.frequency=m.edges.length,m.value=0,m.inEdges.forEach(function(E){m.value+=p.targetWeight(E)}),m.outEdges.forEach(function(E){m.value+=p.sourceWeight(E)})})}function c(v,g){var p={weight:function(y,E){return E.value-y.value},frequency:function(y,E){return E.frequency-y.frequency},id:function(y,E){return(""+g.id(y)).localeCompare(""+g.id(E))}},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),E=g.thickness;if(E<=0||E>=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=E}),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-E/2,st=_.maxY=V+E;_.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,E){m[E]=y.value}),g.forEach(function(y){var E=p.source(y),x=p.target(y),M=v[E],_=v[x];if(M&&_){var D=m[E],C=p.sourceWeight(y),F=M.minX+(M.value-D)/M.value*M.width,k=F+C/M.value*M.width;m[E]-=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 E=v[p.source(y)],x=v[p.target(y)];E&&x&&(y.x=[E.x,x.x],y.y=[E.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(E){var x=g.id(E);p[x]=E}),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,E=m.y,x=m.height,M=m.width;m.x=[y-M/2,y+M/2,y+M/2,y-M/2],m.y=[E+x/2,E+x/2,E-x/2,E-x/2],v.push(m)}),d.edges().forEach(function(p){var m=d.edge(p).points,y={};y.x=m.map(function(E){return E.x}),y.y=m.map(function(E){return E.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,E=g.y1;g.x=[p,m,m,p],g.y=[y,y,E,E]}),f.edges.forEach(function(g){var p=g.source,m=g.target,y=p.x1,E=m.x0;g.x=[y,y,E,E];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 E=y[0],x=y[1],M=d.rows,_=M.map(function(F){return[F[E],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,E=[];o.forIn(m,function(k){k.length>y&&(y=k.length,E=k)});var x=[],M={};if(E.forEach(function(k){var j=p.map(function(V){return k[V]}).join("-");x.push(j),M[j]=k}),d.fillBy==="order"){var _=E[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),E.push(j),x.push(k),M[k]=j}),y=E.length}o.forIn(m,function(k){if(k!==E&&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 E=r.pick(m,g);E[d]=y,E[v]=m[y],p.push(E)})}),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 E=v.geoFeatureByName(y[d]);E&&(v._projectedAs?(y[p]=E[v._projectedAs[2]],y[m]=E[v._projectedAs[3]]):(y[p]=E.centroidX,y[m]=E.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 E=r.__read(y,4),x=E[0],M=E[1],_=E[2],D=E[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 E=v.geoFeatureByName(y[d]);E&&(v._projectedAs?(y[p]=E[v._projectedAs[0]],y[m]=E[v._projectedAs[1]]):(y[p]=E.longitude,y[m]=E.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],E=g[1];v.each(function(x){x[y]=x.x,x[E]=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],E=g[1],x=g[2];v.each(function(M){M[y]=M.x,M[E]=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],E=g[1];v.each(function(x){x[y]=[x.x0,x.x1,x.x1,x.x0],x[E]=[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],E=g[1];v.each(function(x){x[y]=x.x,x[E]=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],E=g[1];v.each(function(x){x[y]=[x.x0,x.x1,x.x1,x.x0],x[E]=[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),E=m.method;if(!E)throw new TypeError("Invalid method!");if(E==="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(E))C[y]=E(C,D,m.value,_);else if(o.isString(E))C[y]=v[E](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,E){E=o.assign({},v,E);var x=h.getFields(E);if(!o.isArray(x)||x.length<1)throw new TypeError("invalid fields: must be an array of at least 1 strings!");var M=E.as;if(!o.isArray(M)||M.length!==3)throw new TypeError("invalid as: must be an array of 3 strings!");var _=E.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=E.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=E.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,E.step?E.step:F),j=[],V=E.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],$=ht[1],xt=ht[2];Pt[lt]=it,Pt[$]=[],Pt[xt]=[],o.each(k,function(Gt){var Rt=Q[it](Gt);Rt>=E.minSize&&(Pt[$].push(Gt),Pt[xt].push(Rt))}),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 E=c.getFields(p);if(!o.isArray(E)||E.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(E,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),$=g.rows.length,xt=[],Gt=0;GtV&&(ht=V/Gt,Rt=Math.ceil(Gt*ht/Q)),$=k/Rt}),o.forIn(D,function(xt){var Gt=[lt*yt,(lt+1)*yt],Rt=Gt[1]-Gt[0],Qt=Rt*(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 $=$+31>>5<<5;if(xt>ht&&(ht=xt),it+$>=s<<5&&(it=0,Pt+=ht,ht=0),Pt+xt>=l)break;yt.translate((it+($>>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=$,j.height=xt,j.xoff=it,j.yoff=Pt,j.x1=$>>1,j.y1=xt>>1,j.x0=-j.x1,j.y0=-j.y1,j.hasText=!0,it+=$}for(var Fe=yt.getImageData(0,0,(s<<5)/Q,l/Q).data,ft=[];--st>=0;)if(j=V[st],!!j.hasText){for(var $=j.width,gt=$>>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),$,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=Rt.board?[{x:0,y:0},{x:Ue,y:Fe}]:null;dt();function dt(){for(var Z=Date.now();Date.now()-Z<$&&++ot>1,mt.y=Fe*(xt()+.5)>>1,g(ft,mt,H,ot),mt.hasText&&Ie(gt,mt,at)&&(Kt.push(mt),at?Rt.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)}Rt._tags=Kt,Rt._bounds=at}return Rt};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,R=k[0]>>5,T=Ue.x-(S<<4),z=T&127,J=32-z,pt=Ue.y1-Ue.y0,It=void 0,Zt=(Ue.y+Ue.y0)*R+(T>>5),Lt=0;Lt>>z:0);Zt+=R}return delete Ue.sprite,!0}return!1}return Rt.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,R=S?1<<31-dt%32:0;Kt[Z]|=R}Rt.board=Kt,Rt.hasImage=!0}},Rt.timeInterval=function(_e){return arguments.length?($=_e==null?1/0:_e,Rt):$},Rt.words=function(_e){return arguments.length?(lt=_e,Rt):lt},Rt.size=function(_e){return arguments.length?(k=[+_e[0],+_e[1]],Rt):k},Rt.font=function(_e){return arguments.length?(V=D(_e),Rt):V},Rt.fontStyle=function(_e){return arguments.length?(yt=D(_e),Rt):yt},Rt.fontWeight=function(_e){return arguments.length?(Q=D(_e),Rt):Q},Rt.rotate=function(_e){return arguments.length?(it=D(_e),Rt):it},Rt.text=function(_e){return arguments.length?(j=D(_e),Rt):j},Rt.spiral=function(_e){return arguments.length?(ht=C[_e]||_e,Rt):ht},Rt.fontSize=function(_e){return arguments.length?(st=D(_e),Rt):st},Rt.padding=function(_e){return arguments.length?(Pt=D(_e),Rt):Pt},Rt.random=function(_e){return arguments.length?(xt=_e,Rt):xt},Rt}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}})})})(M1);const T5=R1(M1.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 O5=is({props:{screenType:{type:String}},setup(a,i){const t=Wf(),e=as({lastChart:null,ds:null,getLastDayEnergy(){B1().then(n=>{var r=n.data.content||[];r.forEach(function(o){var s=o.date;o.Date=s.substr(0,4)+"-"+s.substr(4,2)+"-"+s.substr(6,2),o.value=Number(((o.energyAcTerminal||0)+(o.energyCooling||0)+(o.energyHeating||0)+(o.energyLight||0)+(o.energyOthers||0)).toFixed(0))}),e.lastChart=e.cInitChart(r),console.log("contx,contx",i,i.emit),e.setChartInterval()})},setChartInterval(){if(a.screenType=="ver")var n=tl().subtract(1,"months").date(1),r=tl().subtract(1,"months").date(12),o=tl().subtract(1,"months"),s=setInterval(()=>{n.add(1,"days"),r.add(1,"days"),e.ds.setState("laststart",n.format("YYYY-MM-DD")),e.ds.setState("lastend",r.format("YYYY-MM-DD")),e.ds.on("statechange",(l,u)=>{const c=e.ds.views.bar.rows;e.lastChart.changeData(c)}),r.format("YYYY-MM-DD")==o.endOf("month").format("YYYY-MM-DD")&&(clearInterval(s),i.emit("donethreepage"))},1500)},cInitChart(n){if(a.screenType=="hor")var r=n[n.length-1]&&n[n.length-1].Date;else var r=n[11]&&n[11].Date;let o=new T5({state:{laststart:n[0]&&n[0].Date,lastend:r}});var s=o.createView("bar",{watchingStates:["laststart","lastend"]});s.source(n).transform({type:"filter",callback:function(c){var f=c.Date;return f<=o.state.lastend&&f>=o.state.laststart}}),document.getElementsByTagName("body")[0].offsetWidth-80,console.log("lastChartBox",t.value);var l=t.value&&new Gd({container:"lastChartBox",autoFit:!0,padding:[20,20,36,20]});return l&&(l.data(s.rows),l.tooltip(!1),l.scale("Date",{tickCount:12,type:"timeCat",mask:"MM-DD"}),l.scale("value",{tickCount:5,type:"linear"}),l.axis("Date",{line:{style:{lineWidth:1,stroke:"rgba(224,194,155,0.6)",lineDash:[3,3]}},label:{style:{fill:"#E0C29B",fontSize:12}},tickLine:null}),l.axis("value",{line:null,grid:{line:{style:{lineWidth:1,stroke:"rgba(224,194,155,0.5)",lineDash:[3,3]}}},tickline:null,label:null}),l.legend(!1),l.interval().position("Date*value").color("l(90) 0:#BFA17E 1:#E0D1BB").shape("borderRadius").adjust({type:"stack"}).size(12).label("value",{offset:10,style:{fill:"#E0C29B",fontSize:12}}),l.render(),e.ds=o,l)}});return os(()=>{e.getLastDayEnergy()}),{...ss(e),lastChartBox:t}}});const I5=a=>(us("data-v-77e2bc7f"),a=a(),fs(),a),j5=I5(()=>en("div",{class:"subhead-title"},[en("span",null,"\u4E0A\u6708\u6BCF\u65E5\u80FD\u8017\uFF08kWh\uFF09")],-1)),L5={id:"lastChartBox",class:"lastChartBox",ref:"lastChartBox"};function D5(a,i,t,e,n,r){return zr(),kr("div",{class:As(["lastChart",[a.screenType==="hor"?"horizontalClass":"verticalTemChart"]])},[j5,en("div",L5,null,512)],2)}const V5=ls(O5,[["render",D5],["__scopeId","data-v-77e2bc7f"]]),X5="/sgdaping/assets/hor_big_bg.48593e2d.png";export{G5 as H,N5 as L,F5 as N,Y5 as T,X5 as _,k5 as a,H5 as b,z5 as c,W5 as d,V5 as l,B5 as p};