diff --git a/changelog.md b/changelog.md index bc327ce5..3e510e0d 100644 --- a/changelog.md +++ b/changelog.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) -## [Unreleased] +## [0.3.0] - 2022-08-23 ### Added @@ -35,7 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Workflow to deploy documentation on Github pages +- Workflow to deploy documentation on GitHub pages - Create default class structure draw/metadata/parser/render and their individual tests. - Add default error for parser - Add `Draw` and `drawDefaultModel` methods to DefaultDrawer.js @@ -61,5 +61,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add new classes LetoObjectNode, LetoTypeNode, LetoAttribute, LetoLink. - Add function renderString for SVG template. +[0.3.0]: https://github.com/ditrit/leto-modelizer-plugin-core/blob/0.3.0/changelog.md [0.2.0]: https://github.com/ditrit/leto-modelizer-plugin-core/blob/0.2.0/changelog.md [0.1.0]: https://github.com/ditrit/leto-modelizer-plugin-core/blob/0.1.0/changelog.md diff --git a/dist/leto-modelizer-plugin-core.js b/dist/leto-modelizer-plugin-core.js index e7eaae2f..932352cf 100644 --- a/dist/leto-modelizer-plugin-core.js +++ b/dist/leto-modelizer-plugin-core.js @@ -1 +1 @@ -(()=>{"use strict";var t={d:(n,e)=>{for(var r in e)t.o(e,r)&&!t.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:e[r]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{Component:()=>y,ComponentAttribute:()=>q,ComponentAttributeDefinition:()=>k,ComponentDefinition:()=>m,ComponentDrawOption:()=>O,ComponentLink:()=>V,DefaultDrawer:()=>LS,DefaultMetadata:()=>HS,DefaultParser:()=>GS,DefaultRender:()=>ZS,FileInformation:()=>u,FileInput:()=>J,ParseError:()=>oE});var e={};function r(t,n){for(var e=0;eEt,Delaunay:()=>Lc,FormatSpecifier:()=>Vs,InternMap:()=>Pt,InternSet:()=>Ct,Node:()=>hg,Voronoi:()=>qc,ZoomTransform:()=>ES,active:()=>da,arc:()=>lT,area:()=>_T,areaRadial:()=>kT,ascending:()=>tt,autoType:()=>mf,axisBottom:()=>de,axisLeft:()=>pe,axisRight:()=>he,axisTop:()=>le,bin:()=>ln,bisect:()=>st,bisectCenter:()=>ft,bisectLeft:()=>ct,bisectRight:()=>ut,bisector:()=>et,blob:()=>ts,blur:()=>lt,blur2:()=>ht,blurImage:()=>dt,brush:()=>$a,brushSelection:()=>Ua,brushX:()=>Ya,brushY:()=>La,buffer:()=>es,chord:()=>eu,chordDirected:()=>iu,chordTranspose:()=>ru,cluster:()=>og,color:()=>ci,contourDensity:()=>pc,contours:()=>sc,count:()=>bt,create:()=>IM,creator:()=>wr,cross:()=>wt,csv:()=>us,csvFormat:()=>uf,csvFormatBody:()=>cf,csvFormatRow:()=>sf,csvFormatRows:()=>ff,csvFormatValue:()=>lf,csvParse:()=>of,csvParseRows:()=>af,cubehelix:()=>tc,cumsum:()=>Mt,curveBasis:()=>bA,curveBasisClosed:()=>mA,curveBasisOpen:()=>wA,curveBumpX:()=>OT,curveBumpY:()=>jT,curveBundle:()=>TA,curveCardinal:()=>EA,curveCardinalClosed:()=>NA,curveCardinalOpen:()=>CA,curveCatmullRom:()=>zA,curveCatmullRomClosed:()=>DA,curveCatmullRomOpen:()=>IA,curveLinear:()=>yT,curveLinearClosed:()=>BA,curveMonotoneX:()=>GA,curveMonotoneY:()=>WA,curveNatural:()=>QA,curveStep:()=>tS,curveStepAfter:()=>eS,curveStepBefore:()=>nS,descending:()=>nt,deviation:()=>At,difference:()=>Wn,disjoint:()=>Zn,dispatch:()=>xe,drag:()=>Zc,dragDisable:()=>Yr,dragEnable:()=>Lr,dsv:()=>as,dsvFormat:()=>ef,easeBack:()=>Gf,easeBackIn:()=>Xf,easeBackInOut:()=>Gf,easeBackOut:()=>Vf,easeBounce:()=>Lf,easeBounceIn:()=>Yf,easeBounceInOut:()=>$f,easeBounceOut:()=>Lf,easeCircle:()=>Bf,easeCircleIn:()=>If,easeCircleInOut:()=>Bf,easeCircleOut:()=>Ff,easeCubic:()=>fa,easeCubicIn:()=>ua,easeCubicInOut:()=>fa,easeCubicOut:()=>ca,easeElastic:()=>Kf,easeElasticIn:()=>Zf,easeElasticInOut:()=>Qf,easeElasticOut:()=>Kf,easeExp:()=>qf,easeExpIn:()=>Rf,easeExpInOut:()=>qf,easeExpOut:()=>Df,easeLinear:()=>wf,easePoly:()=>kf,easePolyIn:()=>Sf,easePolyInOut:()=>kf,easePolyOut:()=>Ef,easeQuad:()=>Af,easeQuadIn:()=>Mf,easeQuadInOut:()=>Af,easeQuadOut:()=>Tf,easeSin:()=>jf,easeSinIn:()=>Cf,easeSinInOut:()=>jf,easeSinOut:()=>Of,every:()=>Ln,extent:()=>St,fcumsum:()=>Nt,filter:()=>Hn,flatGroup:()=>Bt,flatRollup:()=>Ut,forceCenter:()=>gs,forceCollide:()=>Ns,forceLink:()=>Os,forceManyBody:()=>Is,forceRadial:()=>Fs,forceSimulation:()=>qs,forceX:()=>Bs,forceY:()=>Us,format:()=>Qs,formatDefaultLocale:()=>rl,formatLocale:()=>el,formatPrefix:()=>Js,formatSpecifier:()=>Xs,fsum:()=>kt,geoAlbers:()=>my,geoAlbersUsa:()=>xy,geoArea:()=>uh,geoAzimuthalEqualArea:()=>Ay,geoAzimuthalEqualAreaRaw:()=>Ty,geoAzimuthalEquidistant:()=>Ey,geoAzimuthalEquidistantRaw:()=>Sy,geoBounds:()=>Yh,geoCentroid:()=>td,geoCircle:()=>ld,geoClipAntimeridian:()=>wd,geoClipCircle:()=>Md,geoClipExtent:()=>Cd,geoClipRectangle:()=>Pd,geoConicConformal:()=>jy,geoConicConformalRaw:()=>Oy,geoConicEqualArea:()=>_y,geoConicEqualAreaRaw:()=>by,geoConicEquidistant:()=>qy,geoConicEquidistantRaw:()=>Dy,geoContains:()=>Gd,geoDistance:()=>Fd,geoEqualEarth:()=>$y,geoEqualEarthRaw:()=>Ly,geoEquirectangular:()=>Ry,geoEquirectangularRaw:()=>zy,geoGnomonic:()=>Xy,geoGnomonicRaw:()=>Hy,geoGraticule:()=>Kd,geoGraticule10:()=>Qd,geoIdentity:()=>Vy,geoInterpolate:()=>Jd,geoLength:()=>Dd,geoMercator:()=>Ny,geoMercatorRaw:()=>ky,geoNaturalEarth1:()=>Wy,geoNaturalEarth1Raw:()=>Gy,geoOrthographic:()=>Ky,geoOrthographicRaw:()=>Zy,geoPath:()=>ey,geoProjection:()=>yy,geoProjectionMutator:()=>gy,geoRotation:()=>cd,geoStereographic:()=>Jy,geoStereographicRaw:()=>Qy,geoStream:()=>ql,geoTransform:()=>ry,geoTransverseMercator:()=>ng,geoTransverseMercatorRaw:()=>tg,gray:()=>ju,greatest:()=>bn,greatestIndex:()=>Rn,group:()=>qt,groupSort:()=>Qt,groups:()=>It,hcl:()=>Yu,hierarchy:()=>ug,histogram:()=>ln,hsl:()=>xi,html:()=>ps,image:()=>fs,index:()=>$t,indexes:()=>Ht,interpolate:()=>Vi,interpolateArray:()=>Fi,interpolateBasis:()=>Ei,interpolateBasisClosed:()=>ki,interpolateBlues:()=>lM,interpolateBrBG:()=>Mw,interpolateBuGn:()=>Uw,interpolateBuPu:()=>Lw,interpolateCividis:()=>wM,interpolateCool:()=>AM,interpolateCubehelix:()=>Tv,interpolateCubehelixDefault:()=>MM,interpolateCubehelixLong:()=>Av,interpolateDate:()=>Ui,interpolateDiscrete:()=>lv,interpolateGnBu:()=>Hw,interpolateGreens:()=>dM,interpolateGreys:()=>yM,interpolateHcl:()=>xv,interpolateHclLong:()=>wv,interpolateHsl:()=>vv,interpolateHslLong:()=>bv,interpolateHue:()=>hv,interpolateInferno:()=>DM,interpolateLab:()=>_v,interpolateMagma:()=>RM,interpolateNumber:()=>Yi,interpolateNumberArray:()=>qi,interpolateObject:()=>Li,interpolateOrRd:()=>Vw,interpolateOranges:()=>xM,interpolatePRGn:()=>Aw,interpolatePiYG:()=>Ew,interpolatePlasma:()=>qM,interpolatePuBu:()=>Kw,interpolatePuBuGn:()=>Ww,interpolatePuOr:()=>Nw,interpolatePuRd:()=>Jw,interpolatePurples:()=>vM,interpolateRainbow:()=>EM,interpolateRdBu:()=>Cw,interpolateRdGy:()=>jw,interpolateRdPu:()=>nM,interpolateRdYlBu:()=>Rw,interpolateRdYlGn:()=>qw,interpolateReds:()=>_M,interpolateRgb:()=>ji,interpolateRgbBasis:()=>Ri,interpolateRgbBasisClosed:()=>Di,interpolateRound:()=>dv,interpolateSinebow:()=>CM,interpolateSpectral:()=>Fw,interpolateString:()=>Xi,interpolateTransformCss:()=>ko,interpolateTransformSvg:()=>No,interpolateTurbo:()=>OM,interpolateViridis:()=>zM,interpolateWarm:()=>TM,interpolateYlGn:()=>oM,interpolateYlGnBu:()=>rM,interpolateYlOrBr:()=>uM,interpolateYlOrRd:()=>fM,interpolateZoom:()=>yv,interrupt:()=>wo,intersection:()=>Kn,interval:()=>TS,isoFormat:()=>xS,isoParse:()=>MS,json:()=>ls,lab:()=>zu,lch:()=>Uu,least:()=>jn,leastIndex:()=>zn,line:()=>bT,lineRadial:()=>ET,link:()=>qT,linkHorizontal:()=>IT,linkRadial:()=>BT,linkVertical:()=>FT,local:()=>BM,map:()=>Xn,matcher:()=>Ee,max:()=>hn,maxIndex:()=>dn,mean:()=>Tn,median:()=>An,medianIndex:()=>Sn,merge:()=>En,min:()=>pn,minIndex:()=>yn,mode:()=>kn,namespace:()=>Le,namespaces:()=>Ye,nice:()=>fn,now:()=>ao,pack:()=>Rg,packEnclose:()=>_g,packSiblings:()=>jg,pairs:()=>Nn,partition:()=>Ug,path:()=>hu,permute:()=>Gt,pie:()=>wT,piecewise:()=>Sv,pointRadial:()=>NT,pointer:()=>Wi,pointers:()=>YM,polygonArea:()=>kv,polygonCentroid:()=>Nv,polygonContains:()=>jv,polygonHull:()=>Ov,polygonLength:()=>zv,precisionFixed:()=>il,precisionPrefix:()=>ol,precisionRound:()=>al,quadtree:()=>xs,quantile:()=>_n,quantileIndex:()=>xn,quantileSorted:()=>mn,quantize:()=>Ev,quickselect:()=>gn,radialArea:()=>kT,radialLine:()=>ET,randomBates:()=>Uv,randomBernoulli:()=>$v,randomBeta:()=>Vv,randomBinomial:()=>Gv,randomCauchy:()=>Zv,randomExponential:()=>Yv,randomGamma:()=>Xv,randomGeometric:()=>Hv,randomInt:()=>qv,randomIrwinHall:()=>Bv,randomLcg:()=>tb,randomLogNormal:()=>Fv,randomLogistic:()=>Kv,randomNormal:()=>Iv,randomPareto:()=>Lv,randomPoisson:()=>Qv,randomUniform:()=>Dv,randomWeibull:()=>Wv,range:()=>Cn,rank:()=>On,reduce:()=>Vn,reverse:()=>Gn,rgb:()=>hi,ribbon:()=>Mu,ribbonArrow:()=>Tu,rollup:()=>Yt,rollups:()=>Lt,scaleBand:()=>ob,scaleDiverging:()=>ow,scaleDivergingLog:()=>aw,scaleDivergingPow:()=>cw,scaleDivergingSqrt:()=>fw,scaleDivergingSymlog:()=>uw,scaleIdentity:()=>mb,scaleImplicit:()=>rb,scaleLinear:()=>_b,scaleLog:()=>Nb,scaleOrdinal:()=>ib,scalePoint:()=>ub,scalePow:()=>Ib,scaleQuantile:()=>Lb,scaleQuantize:()=>$b,scaleRadial:()=>Yb,scaleSequential:()=>Qx,scaleSequentialLog:()=>Jx,scaleSequentialPow:()=>nw,scaleSequentialQuantile:()=>rw,scaleSequentialSqrt:()=>ew,scaleSequentialSymlog:()=>tw,scaleSqrt:()=>Fb,scaleSymlog:()=>jb,scaleThreshold:()=>Hb,scaleTime:()=>Gx,scaleUtc:()=>Wx,scan:()=>Dn,schemeAccent:()=>hw,schemeBlues:()=>sM,schemeBrBG:()=>ww,schemeBuGn:()=>Bw,schemeBuPu:()=>Yw,schemeCategory10:()=>lw,schemeDark2:()=>dw,schemeGnBu:()=>$w,schemeGreens:()=>hM,schemeGreys:()=>pM,schemeOrRd:()=>Xw,schemeOranges:()=>mM,schemePRGn:()=>Tw,schemePaired:()=>pw,schemePastel1:()=>yw,schemePastel2:()=>gw,schemePiYG:()=>Sw,schemePuBu:()=>Zw,schemePuBuGn:()=>Gw,schemePuOr:()=>kw,schemePuRd:()=>Qw,schemePurples:()=>gM,schemeRdBu:()=>Pw,schemeRdGy:()=>Ow,schemeRdPu:()=>tM,schemeRdYlBu:()=>zw,schemeRdYlGn:()=>Dw,schemeReds:()=>bM,schemeSet1:()=>vw,schemeSet2:()=>bw,schemeSet3:()=>_w,schemeSpectral:()=>Iw,schemeTableau10:()=>mw,schemeYlGn:()=>iM,schemeYlGnBu:()=>eM,schemeYlOrBr:()=>aM,schemeYlOrRd:()=>cM,select:()=>qr,selectAll:()=>LM,selection:()=>Dr,selector:()=>Me,selectorAll:()=>Se,shuffle:()=>qn,shuffler:()=>In,some:()=>$n,sort:()=>Wt,stack:()=>uS,stackOffsetDiverging:()=>fS,stackOffsetExpand:()=>cS,stackOffsetNone:()=>rS,stackOffsetSilhouette:()=>sS,stackOffsetWiggle:()=>lS,stackOrderAppearance:()=>hS,stackOrderAscending:()=>pS,stackOrderDescending:()=>gS,stackOrderInsideOut:()=>vS,stackOrderNone:()=>iS,stackOrderReverse:()=>bS,stratify:()=>Vg,style:()=>tr,subset:()=>ne,sum:()=>Fn,superset:()=>Jn,svg:()=>ys,symbol:()=>pA,symbolAsterisk:()=>YT,symbolCircle:()=>LT,symbolCross:()=>$T,symbolDiamond:()=>VT,symbolDiamond2:()=>GT,symbolPlus:()=>WT,symbolSquare:()=>ZT,symbolSquare2:()=>KT,symbolStar:()=>nA,symbolTriangle:()=>rA,symbolTriangle2:()=>oA,symbolWye:()=>sA,symbolX:()=>lA,symbols:()=>hA,symbolsFill:()=>hA,symbolsStroke:()=>dA,text:()=>is,thresholdFreedmanDiaconis:()=>wn,thresholdScott:()=>Mn,thresholdSturges:()=>sn,tickFormat:()=>vb,tickIncrement:()=>un,tickStep:()=>cn,ticks:()=>an,timeDay:()=>p_,timeDays:()=>y_,timeFormat:()=>Mm,timeFormatDefaultLocale:()=>$x,timeFormatLocale:()=>xm,timeFriday:()=>w_,timeFridays:()=>N_,timeHour:()=>l_,timeHours:()=>h_,timeInterval:()=>t_,timeMillisecond:()=>e_,timeMilliseconds:()=>r_,timeMinute:()=>c_,timeMinutes:()=>f_,timeMonday:()=>b_,timeMondays:()=>A_,timeMonth:()=>O_,timeMonths:()=>j_,timeParse:()=>Tm,timeSaturday:()=>M_,timeSaturdays:()=>P_,timeSecond:()=>o_,timeSeconds:()=>a_,timeSunday:()=>v_,timeSundays:()=>T_,timeThursday:()=>x_,timeThursdays:()=>k_,timeTickInterval:()=>vm,timeTicks:()=>gm,timeTuesday:()=>__,timeTuesdays:()=>S_,timeWednesday:()=>m_,timeWednesdays:()=>E_,timeWeek:()=>v_,timeWeeks:()=>T_,timeYear:()=>R_,timeYears:()=>D_,timeout:()=>yo,timer:()=>fo,timerFlush:()=>so,transition:()=>ia,transpose:()=>Bn,tree:()=>ev,treemap:()=>uv,treemapBinary:()=>cv,treemapDice:()=>Bg,treemapResquarify:()=>sv,treemapSlice:()=>rv,treemapSliceDice:()=>fv,treemapSquarify:()=>av,tsv:()=>cs,tsvFormat:()=>yf,tsvFormatBody:()=>gf,tsvFormatRow:()=>bf,tsvFormatRows:()=>vf,tsvFormatValue:()=>_f,tsvParse:()=>df,tsvParseRows:()=>pf,union:()=>ee,utcDay:()=>$_,utcDays:()=>H_,utcFormat:()=>Am,utcFriday:()=>Q_,utcFridays:()=>om,utcHour:()=>U_,utcHours:()=>Y_,utcMillisecond:()=>e_,utcMilliseconds:()=>r_,utcMinute:()=>I_,utcMinutes:()=>F_,utcMonday:()=>G_,utcMondays:()=>nm,utcMonth:()=>cm,utcMonths:()=>fm,utcParse:()=>Sm,utcSaturday:()=>J_,utcSaturdays:()=>am,utcSecond:()=>o_,utcSeconds:()=>a_,utcSunday:()=>V_,utcSundays:()=>tm,utcThursday:()=>K_,utcThursdays:()=>im,utcTickInterval:()=>ym,utcTicks:()=>pm,utcTuesday:()=>W_,utcTuesdays:()=>em,utcWednesday:()=>Z_,utcWednesdays:()=>rm,utcWeek:()=>V_,utcWeeks:()=>tm,utcYear:()=>lm,utcYears:()=>hm,variance:()=>Tt,window:()=>Ze,xml:()=>ds,zip:()=>Yn,zoom:()=>IS,zoomIdentity:()=>kS,zoomTransform:()=>NS});var a=i((function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{path:null,name:null};o(this,t);var e=n.path,r=n.name;this.path=e||null,this.name=r||null}));const u=a;function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function f(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function s(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{id:null,name:null,definition:null,drawOption:null,attributes:[],children:[]};f(this,a),t=o.call(this);var e=n.id,r=n.name,i=n.definition,u=n.drawOption,c=n.attributes,s=n.children;return t.id=e||null,t.name=r||null,t.definition=i||null,t.drawOption=u||null,t.attributes=c||[],t.children=s||[],t}return n=a,(e=[{key:"addChild",value:function(t){var n=t.definition.parentTypes;this.definition.isContainer&&n.includes(this.definition.type)&&!this.children.includes(t)&&this.children.push(t)}}])&&s(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),a}(u);const y=p;function g(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{type:null,icon:null,model:null,parentTypes:[],definedAttributes:[],isContainer:!1,displayable:!0,required:!1};b(this,t);var e=n.type,r=n.icon,i=n.model,o=n.parentTypes,a=n.definedAttributes,u=n.isContainer,c=n.displayable,f=n.required;this.type=e||null,this.icon=r||null,this.model=i||null,this.parentTypes=o||[],this.definedAttributes=a||[],this.isContainer=void 0!==u&&u,this.displayable=void 0===c||c,this.required=void 0!==f&&f}));const m=_;function x(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function w(t){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{name:null,type:null,linkTypes:[],required:!1,rules:{values:null,min:null,max:null,regex:null}};S(this,t);var e=n.name,r=n.type,i=n.linkTypes,o=n.required,a=n.rules;this.name=e||null,this.type=r||null,this.linkTypes=i||[],this.required=o||!1,this.rules=w({values:null,min:null,max:null,regex:null},a)}));const k=E;function N(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{x:null,y:null,width:null,height:null};C(this,t);var e=n.x,r=n.y,i=n.width,o=n.height;this.x=e||null,this.y=r||null,this.width=i||null,this.height=o||null}));function j(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{name:null,value:null,type:null};R(this,t);var e=n.name,r=n.value,i=n.type;this.name=e||null,this.value=r||null,this.type=i||null}));const q=D;function I(t){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I(t)}function F(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function B(t){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{from:{id:null},to:{id:null},type:null};Y(this,o),t=i.call(this);var e=n.from,r=n.to,a=n.type;return t.from=B({id:null},e),t.to=B({id:null},r),t.type=a||null,t}return n=o,Object.defineProperty(n,"prototype",{writable:!1}),n}(u);const V=X;function G(t){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}function W(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Z(t,n){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},Z(t,n)}function K(t,n){if(n&&("object"===G(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Q(t){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Q(t)}const J=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&Z(t,n)}(o,t);var n,e,r,i=(e=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=Q(e);if(r){var i=Q(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return K(this,t)});function o(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{path:null,name:null,content:null};W(this,o),t=i.call(this,n);var e=n.content;return t.content=e||null,t}return n=o,Object.defineProperty(n,"prototype",{writable:!1}),n}(u);function tt(t,n){return null==t||null==n?NaN:tn?1:t>=n?0:NaN}function nt(t,n){return null==t||null==n?NaN:nt?1:n>=t?0:NaN}function et(t){let n,e,r;function i(t,r,i=0,o=t.length){if(i>>1;e(t[n],r)<0?i=n+1:o=n}while(itt(t(n),e),r=(n,e)=>t(n)-e):(n=t===tt||t===nt?t:rt,e=t,r=t),{left:i,center:function(t,n,e=0,o=t.length){const a=i(t,n,e,o-1);return a>e&&r(t[a-1],n)>-r(t[a],n)?a-1:a},right:function(t,r,i=0,o=t.length){if(i>>1;e(t[n],r)<=0?i=n+1:o=n}while(i=n&&(yield n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(r=+r)>=r&&(yield r)}}const at=et(tt),ut=at.right,ct=at.left,ft=et(it).center,st=ut;function lt(t,n){if(!((n=+n)>=0))throw new RangeError("invalid r");let e=t.length;if(!((e=Math.floor(e))>=0))throw new RangeError("invalid length");if(!e||!n)return t;const r=vt(n),i=t.slice();return r(t,i,0,e,1),r(i,t,0,e,1),r(t,i,0,e,1),t}const ht=pt(vt),dt=pt((function(t){const n=vt(t);return(t,e,r,i,o)=>{n(t,e,0+(r<<=2),0+(i<<=2),o<<=2),n(t,e,r+1,i+1,o),n(t,e,r+2,i+2,o),n(t,e,r+3,i+3,o)}}));function pt(t){return function(n,e,r=e){if(!((e=+e)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=n;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(void 0!==a?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!e&&!r)return n;const u=e&&t(e),c=r&&t(r),f=i.slice();return u&&c?(yt(u,f,i,o,a),yt(u,i,f,o,a),yt(u,f,i,o,a),gt(c,i,f,o,a),gt(c,f,i,o,a),gt(c,i,f,o,a)):u?(yt(u,i,f,o,a),yt(u,f,i,o,a),yt(u,i,f,o,a)):c&&(gt(c,i,f,o,a),gt(c,f,i,o,a),gt(c,i,f,o,a)),n}}function yt(t,n,e,r,i){for(let o=0,a=r*i;o{if(!((o-=a)>=i))return;let u=t*r[i];const c=a*t;for(let t=i,n=i+c;t{if(!((a-=u)>=o))return;let c=n*i[o];const f=u*n,s=f+u;for(let t=o,n=o+f;t=n&&++e;else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(i=+i)>=i&&++e}return e}function _t(t){return 0|t.length}function mt(t){return!(t>0)}function xt(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function wt(...t){const n="function"==typeof t[t.length-1]&&function(t){return n=>t(...n)}(t.pop()),e=(t=t.map(xt)).map(_t),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||e.some(mt))return o;for(;;){o.push(i.map(((n,e)=>t[e][n])));let a=r;for(;++i[a]===e[a];){if(0===a)return n?o.map(n):o;i[a--]=0}}}function Mt(t,n){var e=0,r=0;return Float64Array.from(t,void 0===n?t=>e+=+t||0:i=>e+=+n(i,r++,t)||0)}function Tt(t,n){let e,r=0,i=0,o=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(e=n-i,i+=e/++r,o+=e*(n-i));else{let a=-1;for(let u of t)null!=(u=n(u,++a,t))&&(u=+u)>=u&&(e=u-i,i+=e/++r,o+=e*(u-i))}if(r>1)return o/(r-1)}function At(t,n){const e=Tt(t,n);return e?Math.sqrt(e):e}function St(t,n){let e,r;if(void 0===n)for(const n of t)null!=n&&(void 0===e?n>=n&&(e=r=n):(e>n&&(e=n),r=o&&(e=r=o):(e>o&&(e=o),r0){for(o=t[--i];i>0&&(n=o,e=t[--i],o=n+e,r=e-(o-n),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(e=2*r,n=o+e,e==n-o&&(o=n))}return o}}function kt(t,n){const e=new Et;if(void 0===n)for(let n of t)(n=+n)&&e.add(n);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&e.add(i)}return+e}function Nt(t,n){const e=new Et;let r=-1;return Float64Array.from(t,void 0===n?t=>e.add(+t||0):i=>e.add(+n(i,++r,t)||0))}class Pt extends Map{constructor(t,n=Rt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,e]of t)this.set(n,e)}get(t){return super.get(Ot(this,t))}has(t){return super.has(Ot(this,t))}set(t,n){return super.set(jt(this,t),n)}delete(t){return super.delete(zt(this,t))}}class Ct extends Set{constructor(t,n=Rt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const n of t)this.add(n)}has(t){return super.has(Ot(this,t))}add(t){return super.add(jt(this,t))}delete(t){return super.delete(zt(this,t))}}function Ot({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function jt({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function zt({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function Rt(t){return null!==t&&"object"==typeof t?t.valueOf():t}function Dt(t){return t}function qt(t,...n){return Vt(t,Dt,Dt,n)}function It(t,...n){return Vt(t,Array.from,Dt,n)}function Ft(t,n){for(let e=1,r=n.length;et.pop().map((([n,e])=>[...t,n,e]))));return t}function Bt(t,...n){return Ft(It(t,...n),n)}function Ut(t,n,...e){return Ft(Lt(t,n,...e),e)}function Yt(t,n,...e){return Vt(t,Dt,n,e)}function Lt(t,n,...e){return Vt(t,Array.from,n,e)}function $t(t,...n){return Vt(t,Dt,Xt,n)}function Ht(t,...n){return Vt(t,Array.from,Xt,n)}function Xt(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function Vt(t,n,e,r){return function t(i,o){if(o>=r.length)return e(i);const a=new Pt,u=r[o++];let c=-1;for(const t of i){const n=u(t,++c,i),e=a.get(n);e?e.push(t):a.set(n,[t])}for(const[n,e]of a)a.set(n,t(e,o));return n(a)}(t,0)}function Gt(t,n){return Array.from(n,(n=>t[n]))}function Wt(t,...n){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[e]=n;if(e&&2!==e.length||n.length>1){const r=Uint32Array.from(t,((t,n)=>n));return n.length>1?(n=n.map((n=>t.map(n))),r.sort(((t,e)=>{for(const r of n){const n=Kt(r[t],r[e]);if(n)return n}}))):(e=t.map(e),r.sort(((t,n)=>Kt(e[t],e[n])))),Gt(t,r)}return t.sort(Zt(e))}function Zt(t=tt){if(t===tt)return Kt;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,e)=>{const r=t(n,e);return r||0===r?r:(0===t(e,e))-(0===t(n,n))}}function Kt(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(tn?1:0)}function Qt(t,n,e){return(2!==n.length?Wt(Yt(t,n,e),(([t,n],[e,r])=>tt(n,r)||tt(t,e))):Wt(qt(t,e),(([t,e],[r,i])=>n(e,i)||tt(t,r)))).map((([t])=>t))}var Jt=Array.prototype,tn=Jt.slice;function nn(t){return()=>t}Jt.map;var en=Math.sqrt(50),rn=Math.sqrt(10),on=Math.sqrt(2);function an(t,n,e){var r,i,o,a,u=-1;if(e=+e,(t=+t)==(n=+n)&&e>0)return[t];if((r=n0){let e=Math.round(t/a),r=Math.round(n/a);for(e*an&&--r,o=new Array(i=r-e+1);++un&&--r,o=new Array(i=r-e+1);++u=0?(o>=en?10:o>=rn?5:o>=on?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=en?10:o>=rn?5:o>=on?2:1)}function cn(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=en?i*=10:o>=rn?i*=5:o>=on&&(i*=2),n0?(t=Math.floor(t/i)*i,n=Math.ceil(n/i)*i):i<0&&(t=Math.ceil(t*i)/i,n=Math.floor(n*i)/i),r=i}}function sn(t){return Math.ceil(Math.log(bt(t))/Math.LN2)+1}function ln(){var t=Dt,n=St,e=sn;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a,u=r.length,c=new Array(u);for(i=0;i=l)if(t>=l&&n===St){const t=un(s,l,e);isFinite(t)&&(t>0?l=(Math.floor(l/t)+1)*t:t<0&&(l=(Math.ceil(l*-t)+1)/-t))}else h.pop()}for(var d=h.length;h[0]<=s;)h.shift(),--d;for(;h[d-1]>l;)h.pop(),--d;var p,y=new Array(d+1);for(i=0;i<=d;++i)(p=y[i]=[]).x0=i>0?h[i-1]:s,p.x1=i0)for(i=0;i=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e=i)&&(e=i)}return e}function dn(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e=n)&&(e=n,r=i);else for(let o of t)null!=(o=n(o,++i,t))&&(e=o)&&(e=o,r=i);return r}function pn(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e>i||void 0===e&&i>=i)&&(e=i)}return e}function yn(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e>n||void 0===e&&n>=n)&&(e=n,r=i);else for(let o of t)null!=(o=n(o,++i,t))&&(e>o||void 0===e&&o>=o)&&(e=o,r=i);return r}function gn(t,n,e=0,r=t.length-1,i){for(i=void 0===i?Kt:Zt(i);r>e;){if(r-e>600){const o=r-e+1,a=n-e+1,u=Math.log(o),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(o-c)/o)*(a-o/2<0?-1:1);gn(t,n,Math.max(e,Math.floor(n-a*c/o+f)),Math.min(r,Math.floor(n+(o-a)*c/o+f)),i)}const o=t[n];let a=e,u=r;for(vn(t,e,n),i(t[r],o)>0&&vn(t,e,r);a0;)--u}0===i(t[e],o)?vn(t,e,u):(++u,vn(t,u,r)),u<=n&&(e=u+1),n<=u&&(r=u-1)}return t}function vn(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function bn(t,n=tt){let e,r=!1;if(1===n.length){let i;for(const o of t){const t=n(o);(r?tt(t,i)>0:0===tt(t,t))&&(e=o,i=t,r=!0)}}else for(const i of t)(r?n(i,e)>0:0===n(i,i))&&(e=i,r=!0);return e}function _n(t,n,e){if(r=(t=Float64Array.from(ot(t,e))).length){if((n=+n)<=0||r<2)return pn(t);if(n>=1)return hn(t);var r,i=(r-1)*n,o=Math.floor(i),a=hn(gn(t,o).subarray(0,o+1));return a+(pn(t.subarray(o+1))-a)*(i-o)}}function mn(t,n,e=it){if(r=t.length){if((n=+n)<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,o=Math.floor(i),a=+e(t[o],o,t);return a+(+e(t[o+1],o+1,t)-a)*(i-o)}}function xn(t,n,e){if(r=(t=Float64Array.from(ot(t,e))).length){if((n=+n)<=0||r<2)return yn(t);if(n>=1)return dn(t);var r,i=Math.floor((r-1)*n),o=gn(Uint32Array.from(t,((t,n)=>n)),i,0,r-1,((n,e)=>Kt(t[n],t[e])));return bn(o.subarray(0,i+1),(n=>t[n]))}}function wn(t,n,e){return Math.ceil((e-n)/(2*(_n(t,.75)-_n(t,.25))*Math.pow(bt(t),-1/3)))}function Mn(t,n,e){return Math.ceil((e-n)*Math.cbrt(bt(t))/(3.49*At(t)))}function Tn(t,n){let e=0,r=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(++e,r+=n);else{let i=-1;for(let o of t)null!=(o=n(o,++i,t))&&(o=+o)>=o&&(++e,r+=o)}if(e)return r/e}function An(t,n){return _n(t,.5,n)}function Sn(t,n){return xn(t,.5,n)}function En(t){return Array.from(function*(t){for(const n of t)yield*n}(t))}function kn(t,n){const e=new Pt;if(void 0===n)for(let n of t)null!=n&&n>=n&&e.set(n,(e.get(n)||0)+1);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&i>=i&&e.set(i,(e.get(i)||0)+1)}let r,i=0;for(const[t,n]of e)n>i&&(i=n,r=t);return r}function Nn(t,n=Pn){const e=[];let r,i=!1;for(const o of t)i&&e.push(n(r,o)),r=o,i=!0;return e}function Pn(t,n){return[t,n]}function Cn(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++rn(e[t],e[r]);let o,a;return Uint32Array.from(e,((t,n)=>n)).sort(n===tt?(t,n)=>Kt(e[t],e[n]):Zt(i)).forEach(((t,n)=>{const e=i(t,void 0===o?t:o);e>=0?((void 0===o||e>0)&&(o=t,a=n),r[t]=a):r[t]=NaN})),r}function jn(t,n=tt){let e,r=!1;if(1===n.length){let i;for(const o of t){const t=n(o);(r?tt(t,i)<0:0===tt(t,t))&&(e=o,i=t,r=!0)}}else for(const i of t)(r?n(i,e)<0:0===n(i,i))&&(e=i,r=!0);return e}function zn(t,n=tt){if(1===n.length)return yn(t,n);let e,r=-1,i=-1;for(const o of t)++i,(r<0?0===n(o,o):n(o,e)<0)&&(e=o,r=i);return r}function Rn(t,n=tt){if(1===n.length)return dn(t,n);let e,r=-1,i=-1;for(const o of t)++i,(r<0?0===n(o,o):n(o,e)>0)&&(e=o,r=i);return r}function Dn(t,n){const e=zn(t,n);return e<0?void 0:e}const qn=In(Math.random);function In(t){return function(n,e=0,r=n.length){let i=r-(e=+e);for(;i;){const r=t()*i--|0,o=n[i+e];n[i+e]=n[r+e],n[r+e]=o}return n}}function Fn(t,n){let e=0;if(void 0===n)for(let n of t)(n=+n)&&(e+=n);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&(e+=i)}return e}function Bn(t){if(!(i=t.length))return[];for(var n=-1,e=pn(t,Un),r=new Array(e);++nn(e,r,t)))}function Vn(t,n,e){if("function"!=typeof n)throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if(({done:i,value:e}=r.next()),i)return;++a}for(;({done:i,value:o}=r.next()),!i;)e=n(e,o,++a,t);return e}function Gn(t){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).reverse()}function Wn(t,...n){t=new Ct(t);for(const e of n)for(const n of e)t.delete(n);return t}function Zn(t,n){const e=n[Symbol.iterator](),r=new Ct;for(const n of t){if(r.has(n))return!1;let t,i;for(;({value:t,done:i}=e.next())&&!i;){if(Object.is(n,t))return!1;r.add(t)}}return!0}function Kn(t,...n){t=new Ct(t),n=n.map(Qn);t:for(const e of t)for(const r of n)if(!r.has(e)){t.delete(e);continue t}return t}function Qn(t){return t instanceof Ct?t:new Ct(t)}function Jn(t,n){const e=t[Symbol.iterator](),r=new Set;for(const t of n){const n=te(t);if(r.has(n))continue;let i,o;for(;({value:i,done:o}=e.next());){if(o)return!1;const t=te(i);if(r.add(t),Object.is(n,t))break}}return!0}function te(t){return null!==t&&"object"==typeof t?t.valueOf():t}function ne(t,n){return Jn(n,t)}function ee(...t){const n=new Ct;for(const e of t)for(const t of e)n.add(t);return n}function re(t){return t}var ie=1e-6;function oe(t){return"translate("+t+",0)"}function ae(t){return"translate(0,"+t+")"}function ue(t){return n=>+t(n)}function ce(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),e=>+t(e)+n}function fe(){return!this.__axis}function se(t,n){var e=[],r=null,i=null,o=6,a=6,u=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,f=1===t||4===t?-1:1,s=4===t||2===t?"x":"y",l=1===t||3===t?oe:ae;function h(h){var d=null==r?n.ticks?n.ticks.apply(n,e):n.domain():r,p=null==i?n.tickFormat?n.tickFormat.apply(n,e):re:i,y=Math.max(o,0)+u,g=n.range(),v=+g[0]+c,b=+g[g.length-1]+c,_=(n.bandwidth?ce:ue)(n.copy(),c),m=h.selection?h.selection():h,x=m.selectAll(".domain").data([null]),w=m.selectAll(".tick").data(d,n).order(),M=w.exit(),T=w.enter().append("g").attr("class","tick"),A=w.select("line"),S=w.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(T),A=A.merge(T.append("line").attr("stroke","currentColor").attr(s+"2",f*o)),S=S.merge(T.append("text").attr("fill","currentColor").attr(s,f*y).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==m&&(x=x.transition(h),w=w.transition(h),A=A.transition(h),S=S.transition(h),M=M.transition(h).attr("opacity",ie).attr("transform",(function(t){return isFinite(t=_(t))?l(t+c):this.getAttribute("transform")})),T.attr("opacity",ie).attr("transform",(function(t){var n=this.parentNode.__axis;return l((n&&isFinite(n=n(t))?n:_(t))+c)}))),M.remove(),x.attr("d",4===t||2===t?a?"M"+f*a+","+v+"H"+c+"V"+b+"H"+f*a:"M"+c+","+v+"V"+b:a?"M"+v+","+f*a+"V"+c+"H"+b+"V"+f*a:"M"+v+","+c+"H"+b),w.attr("opacity",1).attr("transform",(function(t){return l(_(t)+c)})),A.attr(s+"2",f*o),S.attr(s,f*y).text(p),m.filter(fe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),m.each((function(){this.__axis=_}))}return h.scale=function(t){return arguments.length?(n=t,h):n},h.ticks=function(){return e=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(e=null==t?[]:Array.from(t),h):e.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(u=+t,h):u},h.offset=function(t){return arguments.length?(c=+t,h):c},h}function le(t){return se(1,t)}function he(t){return se(2,t)}function de(t){return se(3,t)}function pe(t){return se(4,t)}var ye={value:()=>{}};function ge(){for(var t,n=0,e=arguments.length,r={};n=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function _e(t,n){for(var e,r=0,i=t.length;r0)for(var e,r,i=new Array(e),o=0;on?1:t>=n?0:NaN}ze.prototype={constructor:ze,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Ue="http://www.w3.org/1999/xhtml";const Ye={svg:"http://www.w3.org/2000/svg",xhtml:Ue,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Le(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Ye.hasOwnProperty(n)?{space:Ye[n],local:t}:t}function $e(t){return function(){this.removeAttribute(t)}}function He(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Xe(t,n){return function(){this.setAttribute(t,n)}}function Ve(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Ge(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function We(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Ze(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ke(t){return function(){this.style.removeProperty(t)}}function Qe(t,n,e){return function(){this.style.setProperty(t,n,e)}}function Je(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function tr(t,n){return t.style.getPropertyValue(n)||Ze(t).getComputedStyle(t,null).getPropertyValue(n)}function nr(t){return function(){delete this[t]}}function er(t,n){return function(){this[t]=n}}function rr(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function ir(t){return t.trim().split(/^|\s+/)}function or(t){return t.classList||new ar(t)}function ar(t){this._node=t,this._names=ir(t.getAttribute("class")||"")}function ur(t,n){for(var e=or(t),r=-1,i=n.length;++r=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}function kr(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var jr=[null];function zr(t,n){this._groups=t,this._parents=n}function Rr(){return new zr([[document.documentElement]],jr)}zr.prototype=Rr.prototype={constructor:zr,select:function(t){"function"!=typeof t&&(t=Me(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i=x&&(x=m+1);!(_=g[x])&&++x=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=Be);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?Ke:"function"==typeof n?Je:Qe)(t,n,null==e?"":e)):tr(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?nr:"function"==typeof n?rr:er)(t,n)):this.node()[t]},classed:function(t,n){var e=ir(t+"");if(arguments.length<2){for(var r=or(this.node()),i=-1,o=e.length;++i>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?si(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?si(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Jr.exec(t))?new di(n[1],n[2],n[3],1):(n=ti.exec(t))?new di(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=ni.exec(t))?si(n[1],n[2],n[3],n[4]):(n=ei.exec(t))?si(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=ri.exec(t))?_i(n[1],n[2]/100,n[3]/100,1):(n=ii.exec(t))?_i(n[1],n[2]/100,n[3]/100,n[4]):oi.hasOwnProperty(t)?fi(oi[t]):"transparent"===t?new di(NaN,NaN,NaN,0):null}function fi(t){return new di(t>>16&255,t>>8&255,255&t,1)}function si(t,n,e,r){return r<=0&&(t=n=e=NaN),new di(t,n,e,r)}function li(t){return t instanceof Xr||(t=ci(t)),t?new di((t=t.rgb()).r,t.g,t.b,t.opacity):new di}function hi(t,n,e,r){return 1===arguments.length?li(t):new di(t,n,e,null==r?1:r)}function di(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function pi(){return`#${bi(this.r)}${bi(this.g)}${bi(this.b)}`}function yi(){const t=gi(this.opacity);return`${1===t?"rgb(":"rgba("}${vi(this.r)}, ${vi(this.g)}, ${vi(this.b)}${1===t?")":`, ${t})`}`}function gi(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function vi(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function bi(t){return((t=vi(t))<16?"0":"")+t.toString(16)}function _i(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new wi(t,n,e,r)}function mi(t){if(t instanceof wi)return new wi(t.h,t.s,t.l,t.opacity);if(t instanceof Xr||(t=ci(t)),!t)return new wi;if(t instanceof wi)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,c=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e0&&c<1?0:a,new wi(a,u,c,t.opacity)}function xi(t,n,e,r){return 1===arguments.length?mi(t):new wi(t,n,e,null==r?1:r)}function wi(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Mi(t){return(t=(t||0)%360)<0?t+360:t}function Ti(t){return Math.max(0,Math.min(1,t||0))}function Ai(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function Si(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}function Ei(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r=240?t-240:t+120,i,r),Ai(t,i,r),Ai(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new wi(Mi(this.h),Ti(this.s),Ti(this.l),gi(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=gi(this.opacity);return`${1===t?"hsl(":"hsla("}${Mi(this.h)}, ${100*Ti(this.s)}%, ${100*Ti(this.l)}%${1===t?")":`, ${t})`}`}}));const Ni=t=>()=>t;function Pi(t,n){return function(e){return t+e*n}}function Ci(t,n){var e=n-t;return e?Pi(t,e>180||e<-180?e-360*Math.round(e/360):e):Ni(isNaN(t)?n:t)}function Oi(t,n){var e=n-t;return e?Pi(t,e):Ni(isNaN(t)?n:t)}const ji=function t(n){var e=function(t){return 1==(t=+t)?Oi:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):Ni(isNaN(n)?e:n)}}(n);function r(t,n){var r=e((t=hi(t)).r,(n=hi(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=Oi(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function zi(t){return function(n){var e,r,i=n.length,o=new Array(i),a=new Array(i),u=new Array(i);for(e=0;eo&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,c.push({i:a,x:Yi(e,r)})),o=Hi.lastIndex;return o=0&&n._call.call(void 0,t),n=n._next;--Qi}function lo(){eo=(no=io.now())+ro,Qi=Ji=0;try{so()}finally{Qi=0,function(){for(var t,n,e=Zi,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Zi=n);Ki=t,po(r)}(),eo=0}}function ho(){var t=io.now(),n=t-no;n>1e3&&(ro-=n,no=t)}function po(t){Qi||(Ji&&(Ji=clearTimeout(Ji)),t-eo>24?(t<1/0&&(Ji=setTimeout(lo,t-io.now()-ro)),to&&(to=clearInterval(to))):(to||(no=io.now(),to=setInterval(ho,1e3)),Qi=1,oo(lo)))}function yo(t,n,e){var r=new co;return n=null==n?0:+n,r.restart((e=>{r.stop(),t(e+n)}),n,e),r}co.prototype=fo.prototype={constructor:co,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?ao():+e)+(null==n?0:+n),this._next||Ki===this||(Ki?Ki._next=this:Zi=this,Ki=this),this._call=t,this._time=e,po()},stop:function(){this._call&&(this._call=null,this._time=1/0,po())}};var go=xe("start","end","cancel","interrupt"),vo=[];function bo(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(c){var f,s,l,h;if(1!==e.state)return u();for(f in i)if((h=i[f]).name===e.name){if(3===h.state)return yo(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[f]):+f0)throw new Error("too late; already scheduled");return e}function mo(t,n){var e=xo(t,n);if(e.state>3)throw new Error("too late; already running");return e}function xo(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function wo(t,n){var e,r,i,o=t.__transition,a=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):a=!1;a&&delete t.__transition}}var Mo,To=180/Math.PI,Ao={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function So(t,n,e,r,i,o){var a,u,c;return(a=Math.sqrt(t*t+n*n))&&(t/=a,n/=a),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(u=Math.sqrt(e*e+r*r))&&(e/=u,r/=u,c/=u),t*r180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Yi(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,a.rotate,u,c),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Yi(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,a.skewX,u,c),function(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:Yi(t,e)},{i:u-2,x:Yi(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,c),o=a=null,function(t){for(var n,e=-1,r=c.length;++e=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?_o:mo;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}var Zo=Dr.prototype.constructor;function Ko(t){return function(){this.style.removeProperty(t)}}function Qo(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function Jo(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&Qo(t,o,e)),r}return o._value=n,o}function ta(t){return function(n){this.textContent=t.call(this,n)}}function na(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&ta(r)),n}return r._value=t,r}var ea=0;function ra(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function ia(t){return Dr().transition(t)}function oa(){return++ea}var aa=Dr.prototype;function ua(t){return t*t*t}function ca(t){return--t*t*t+1}function fa(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}ra.prototype=ia.prototype={constructor:ra,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Me(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a1&&e.name===n)return new ra([[t]],ha,n,+r);return null}const pa=t=>()=>t;function ya(t,{sourceEvent:n,target:e,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function ga(t){t.stopImmediatePropagation()}function va(t){t.preventDefault(),t.stopImmediatePropagation()}var ba={name:"drag"},_a={name:"space"},ma={name:"handle"},xa={name:"center"};const{abs:wa,max:Ma,min:Ta}=Math;function Aa(t){return[+t[0],+t[1]]}function Sa(t){return[Aa(t[0]),Aa(t[1])]}var Ea={name:"x",handles:["w","e"].map(Ra),input:function(t,n){return null==t?null:[[+t[0],n[0][1]],[+t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ka={name:"y",handles:["n","s"].map(Ra),input:function(t,n){return null==t?null:[[n[0][0],+t[0]],[n[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Na={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Ra),input:function(t){return null==t?null:Sa(t)},output:function(t){return t}},Pa={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ca={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Oa={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ja={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},za={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Ra(t){return{type:t}}function Da(t){return!t.ctrlKey&&!t.button}function qa(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Ia(){return navigator.maxTouchPoints||"ontouchstart"in this}function Fa(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ba(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Ua(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function Ya(){return Ha(Ea)}function La(){return Ha(ka)}function $a(){return Ha(Na)}function Ha(t){var n,e=qa,r=Da,i=Ia,o=!0,a=xe("start","brush","end"),u=6;function c(n){var e=n.property("__brush",y).selectAll(".overlay").data([Ra("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Pa.overlay).merge(e).each((function(){var t=Fa(this).extent;qr(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),n.selectAll(".selection").data([Ra("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Pa.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=n.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return Pa[t.type]})),n.each(f).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).on("touchstart.brush",h).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(){var t=qr(this),n=Fa(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?n[1][0]-u/2:n[0][0]-u/2})).attr("y",(function(t){return"s"===t.type[0]?n[1][1]-u/2:n[0][1]-u/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+u:u})).attr("height",(function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+u:u}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function s(t,n,e){var r=t.__brush.emitter;return!r||e&&r.clean?new l(t,n,e):r}function l(t,n,e){this.that=t,this.args=n,this.state=t.__brush,this.active=0,this.clean=e}function h(e){if((!n||e.touches)&&r.apply(this,arguments)){var i,a,u,c,l,h,d,p,y,g,v,b=this,_=e.target.__data__.type,m="selection"===(o&&e.metaKey?_="overlay":_)?ba:o&&e.altKey?xa:ma,x=t===ka?null:ja[_],w=t===Ea?null:za[_],M=Fa(b),T=M.extent,A=M.selection,S=T[0][0],E=T[0][1],k=T[1][0],N=T[1][1],P=0,C=0,O=x&&w&&o&&e.shiftKey,j=Array.from(e.touches||[e],(t=>{const n=t.identifier;return(t=Wi(t,b)).point0=t.slice(),t.identifier=n,t}));wo(b);var z=s(b,arguments,!0).beforestart();if("overlay"===_){A&&(y=!0);const n=[j[0],j[1]||j[0]];M.selection=A=[[i=t===ka?S:Ta(n[0][0],n[1][0]),u=t===Ea?E:Ta(n[0][1],n[1][1])],[l=t===ka?k:Ma(n[0][0],n[1][0]),d=t===Ea?N:Ma(n[0][1],n[1][1])]],j.length>1&&F(e)}else i=A[0][0],u=A[0][1],l=A[1][0],d=A[1][1];a=i,c=u,h=l,p=d;var R=qr(b).attr("pointer-events","none"),D=R.selectAll(".overlay").attr("cursor",Pa[_]);if(e.touches)z.moved=I,z.ended=B;else{var q=qr(e.view).on("mousemove.brush",I,!0).on("mouseup.brush",B,!0);o&&q.on("keydown.brush",U,!0).on("keyup.brush",Y,!0),Yr(e.view)}f.call(b),z.start(e,m.name)}function I(t){for(const n of t.changedTouches||[t])for(const t of j)t.identifier===n.identifier&&(t.cur=Wi(n,b));if(O&&!g&&!v&&1===j.length){const t=j[0];wa(t.cur[0]-t[0])>wa(t.cur[1]-t[1])?v=!0:g=!0}for(const t of j)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);y=!0,va(t),F(t)}function F(t){const n=j[0],e=n.point0;var r;switch(P=n[0]-e[0],C=n[1]-e[1],m){case _a:case ba:x&&(P=Ma(S-i,Ta(k-l,P)),a=i+P,h=l+P),w&&(C=Ma(E-u,Ta(N-d,C)),c=u+C,p=d+C);break;case ma:j[1]?(x&&(a=Ma(S,Ta(k,j[0][0])),h=Ma(S,Ta(k,j[1][0])),x=1),w&&(c=Ma(E,Ta(N,j[0][1])),p=Ma(E,Ta(N,j[1][1])),w=1)):(x<0?(P=Ma(S-i,Ta(k-i,P)),a=i+P,h=l):x>0&&(P=Ma(S-l,Ta(k-l,P)),a=i,h=l+P),w<0?(C=Ma(E-u,Ta(N-u,C)),c=u+C,p=d):w>0&&(C=Ma(E-d,Ta(N-d,C)),c=u,p=d+C));break;case xa:x&&(a=Ma(S,Ta(k,i-P*x)),h=Ma(S,Ta(k,l+P*x))),w&&(c=Ma(E,Ta(N,u-C*w)),p=Ma(E,Ta(N,d+C*w)))}h0&&(i=a-P),w<0?d=p-C:w>0&&(u=c-C),m=_a,D.attr("cursor",Pa.selection),F(t));break;default:return}va(t)}function Y(t){switch(t.keyCode){case 16:O&&(g=v=O=!1,F(t));break;case 18:m===xa&&(x<0?l=h:x>0&&(i=a),w<0?d=p:w>0&&(u=c),m=ma,F(t));break;case 32:m===_a&&(t.altKey?(x&&(l=h-P*x,i=a+P*x),w&&(d=p-C*w,u=c+C*w),m=xa):(x<0?l=h:x>0&&(i=a),w<0?d=p:w>0&&(u=c),m=ma),D.attr("cursor",Pa[_]),F(t));break;default:return}va(t)}}function d(t){s(this,arguments).moved(t)}function p(t){s(this,arguments).ended(t)}function y(){var n=this.__brush||{selection:null};return n.extent=Sa(e.apply(this,arguments)),n.dim=t,n}return c.move=function(n,e,r){n.tween?n.on("start.brush",(function(t){s(this,arguments).beforestart().start(t)})).on("interrupt.brush end.brush",(function(t){s(this,arguments).end(t)})).tween("brush",(function(){var n=this,r=n.__brush,i=s(n,arguments),o=r.selection,a=t.input("function"==typeof e?e.apply(this,arguments):e,r.extent),u=Vi(o,a);function c(t){r.selection=1===t&&null===a?null:u(t),f.call(n),i.brush()}return null!==o&&null!==a?c:c(1)})):n.each((function(){var n=this,i=arguments,o=n.__brush,a=t.input("function"==typeof e?e.apply(n,i):e,o.extent),u=s(n,i).beforestart();wo(n),o.selection=null===a?null:a,f.call(n),u.start(r).brush(r).end(r)}))},c.clear=function(t,n){c.move(t,null,n)},l.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,n){return this.starting?(this.starting=!1,this.emit("start",t,n)):this.emit("brush",t),this},brush:function(t,n){return this.emit("brush",t,n),this},end:function(t,n){return 0==--this.active&&(delete this.state.emitter,this.emit("end",t,n)),this},emit:function(n,e,r){var i=qr(this.that).datum();a.call(n,this.that,new ya(n,{sourceEvent:e,target:c,selection:t.output(this.state.selection),mode:r,dispatch:a}),i)}},c.extent=function(t){return arguments.length?(e="function"==typeof t?t:pa(Sa(t)),c):e},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:pa(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:pa(!!t),c):i},c.handleSize=function(t){return arguments.length?(u=+t,c):u},c.keyModifiers=function(t){return arguments.length?(o=!!t,c):o},c.on=function(){var t=a.on.apply(a,arguments);return t===a?c:t},c}var Xa=Math.abs,Va=Math.cos,Ga=Math.sin,Wa=Math.PI,Za=Wa/2,Ka=2*Wa,Qa=Math.max,Ja=1e-12;function tu(t,n){return Array.from({length:n-t},((n,e)=>t+e))}function nu(t){return function(n,e){return t(n.source.value+n.target.value,e.source.value+e.target.value)}}function eu(){return ou(!1,!1)}function ru(){return ou(!1,!0)}function iu(){return ou(!0,!1)}function ou(t,n){var e=0,r=null,i=null,o=null;function a(a){var u,c=a.length,f=new Array(c),s=tu(0,c),l=new Array(c*c),h=new Array(c),d=0;a=Float64Array.from({length:c*c},n?(t,n)=>a[n%c][n/c|0]:(t,n)=>a[n/c|0][n%c]);for(let n=0;nr(f[t],f[n])));for(const e of s){const r=n;if(t){const t=tu(1+~c,c).filter((t=>t<0?a[~t*c+e]:a[e*c+t]));i&&t.sort(((t,n)=>i(t<0?-a[~t*c+e]:a[e*c+t],n<0?-a[~n*c+e]:a[e*c+n])));for(const r of t)r<0?(l[~r*c+e]||(l[~r*c+e]={source:null,target:null})).target={index:e,startAngle:n,endAngle:n+=a[~r*c+e]*d,value:a[~r*c+e]}:(l[e*c+r]||(l[e*c+r]={source:null,target:null})).source={index:e,startAngle:n,endAngle:n+=a[e*c+r]*d,value:a[e*c+r]};h[e]={index:e,startAngle:r,endAngle:n,value:f[e]}}else{const t=tu(0,c).filter((t=>a[e*c+t]||a[t*c+e]));i&&t.sort(((t,n)=>i(a[e*c+t],a[e*c+n])));for(const r of t){let t;if(ecu)if(Math.abs(s*u-c*f)>cu&&i){var h=e-o,d=r-a,p=u*u+c*c,y=h*h+d*d,g=Math.sqrt(p),v=Math.sqrt(l),b=i*Math.tan((au-Math.acos((p+l-y)/(2*g*v)))/2),_=b/v,m=b/g;Math.abs(_-1)>cu&&(this._+="L"+(t+_*f)+","+(n+_*s)),this._+="A"+i+","+i+",0,0,"+ +(s*h>f*d)+","+(this._x1=t+m*u)+","+(this._y1=n+m*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,r,i,o){t=+t,n=+n,o=!!o;var a=(e=+e)*Math.cos(r),u=e*Math.sin(r),c=t+a,f=n+u,s=1^o,l=o?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+c+","+f:(Math.abs(this._x1-c)>cu||Math.abs(this._y1-f)>cu)&&(this._+="L"+c+","+f),e&&(l<0&&(l=l%uu+uu),l>fu?this._+="A"+e+","+e+",0,1,"+s+","+(t-a)+","+(n-u)+"A"+e+","+e+",0,1,"+s+","+(this._x1=c)+","+(this._y1=f):l>cu&&(this._+="A"+e+","+e+",0,"+ +(l>=au)+","+s+","+(this._x1=t+e*Math.cos(i))+","+(this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};const hu=lu;var du=Array.prototype.slice;function pu(t){return function(){return t}}function yu(t){return t.source}function gu(t){return t.target}function vu(t){return t.radius}function bu(t){return t.startAngle}function _u(t){return t.endAngle}function mu(){return 0}function xu(){return 10}function wu(t){var n=yu,e=gu,r=vu,i=vu,o=bu,a=_u,u=mu,c=null;function f(){var f,s=n.apply(this,arguments),l=e.apply(this,arguments),h=u.apply(this,arguments)/2,d=du.call(arguments),p=+r.apply(this,(d[0]=s,d)),y=o.apply(this,d)-Za,g=a.apply(this,d)-Za,v=+i.apply(this,(d[0]=l,d)),b=o.apply(this,d)-Za,_=a.apply(this,d)-Za;if(c||(c=f=hu()),h>Ja&&(Xa(g-y)>2*h+Ja?g>y?(y+=h,g-=h):(y-=h,g+=h):y=g=(y+g)/2,Xa(_-b)>2*h+Ja?_>b?(b+=h,_-=h):(b-=h,_+=h):b=_=(b+_)/2),c.moveTo(p*Va(y),p*Ga(y)),c.arc(0,0,p,y,g),y!==b||g!==_)if(t){var m=+t.apply(this,arguments),x=v-m,w=(b+_)/2;c.quadraticCurveTo(0,0,x*Va(b),x*Ga(b)),c.lineTo(v*Va(w),v*Ga(w)),c.lineTo(x*Va(_),x*Ga(_))}else c.quadraticCurveTo(0,0,v*Va(b),v*Ga(b)),c.arc(0,0,v,b,_);if(c.quadraticCurveTo(0,0,p*Va(y),p*Ga(y)),c.closePath(),f)return c=null,f+""||null}return t&&(f.headRadius=function(n){return arguments.length?(t="function"==typeof n?n:pu(+n),f):t}),f.radius=function(t){return arguments.length?(r=i="function"==typeof t?t:pu(+t),f):r},f.sourceRadius=function(t){return arguments.length?(r="function"==typeof t?t:pu(+t),f):r},f.targetRadius=function(t){return arguments.length?(i="function"==typeof t?t:pu(+t),f):i},f.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:pu(+t),f):o},f.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:pu(+t),f):a},f.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:pu(+t),f):u},f.source=function(t){return arguments.length?(n=t,f):n},f.target=function(t){return arguments.length?(e=t,f):e},f.context=function(t){return arguments.length?(c=null==t?null:t,f):c},f}function Mu(){return wu()}function Tu(){return wu(xu)}const Au=Math.PI/180,Su=180/Math.PI,Eu=.96422,ku=.82521,Nu=4/29,Pu=6/29,Cu=3*Pu*Pu;function Ou(t){if(t instanceof Ru)return new Ru(t.l,t.a,t.b,t.opacity);if(t instanceof Lu)return $u(t);t instanceof di||(t=li(t));var n,e,r=Fu(t.r),i=Fu(t.g),o=Fu(t.b),a=Du((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?n=e=a:(n=Du((.4360747*r+.3850649*i+.1430804*o)/Eu),e=Du((.0139322*r+.0971045*i+.7141733*o)/ku)),new Ru(116*a-16,500*(n-a),200*(a-e),t.opacity)}function ju(t,n){return new Ru(t,0,0,null==n?1:n)}function zu(t,n,e,r){return 1===arguments.length?Ou(t):new Ru(t,n,e,null==r?1:r)}function Ru(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function Du(t){return t>.008856451679035631?Math.pow(t,1/3):t/Cu+Nu}function qu(t){return t>Pu?t*t*t:Cu*(t-Nu)}function Iu(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Fu(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Bu(t){if(t instanceof Lu)return new Lu(t.h,t.c,t.l,t.opacity);if(t instanceof Ru||(t=Ou(t)),0===t.a&&0===t.b)return new Lu(NaN,0()=>t;function oc(t,n){for(var e,r=-1,i=n.length;++rr!=d>r&&e<(h-f)*(r-s)/(d-s)+f&&(i=-i)}return i}function uc(t,n,e){var r,i,o,a;return function(t,n,e){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])}(t,n,e)&&(i=t[r=+(t[0]===n[0])],o=e[r],a=n[r],i<=o&&o<=a||a<=o&&o<=i)}function cc(){}var fc=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function sc(){var t=1,n=1,e=sn,r=u;function i(t){var n=e(t);if(Array.isArray(n))n=n.slice().sort(rc);else{const e=St(t),r=cn(e[0],e[1],n);n=an(Math.floor(e[0]/r)*r,Math.floor(e[1]/r-1)*r,n)}return n.map((n=>o(t,n)))}function o(e,i){var o=[],u=[];return function(e,r,i){var o,u,c,f,s,l,h=new Array,d=new Array;for(o=u=-1,f=e[0]>=r,fc[f<<1].forEach(p);++o=r,fc[c|f<<1].forEach(p);for(fc[f<<0].forEach(p);++u=r,s=e[u*t]>=r,fc[f<<1|s<<2].forEach(p);++o=r,l=s,s=e[u*t+o+1]>=r,fc[c|f<<1|s<<2|l<<3].forEach(p);fc[f|s<<3].forEach(p)}for(o=-1,s=e[u*t]>=r,fc[s<<2].forEach(p);++o=r,fc[s<<2|l<<3].forEach(p);function p(t){var n,e,r=[t[0][0]+o,t[0][1]+u],c=[t[1][0]+o,t[1][1]+u],f=a(r),s=a(c);(n=d[f])?(e=h[s])?(delete d[n.end],delete h[e.start],n===e?(n.ring.push(c),i(n.ring)):h[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[n.end],n.ring.push(c),d[n.end=s]=n):(n=h[s])?(e=d[f])?(delete h[n.start],delete d[e.end],n===e?(n.ring.push(c),i(n.ring)):h[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete h[n.start],n.ring.unshift(r),h[n.start=f]=n):h[f]=d[s]={start:f,end:s,ring:[r,c]}}fc[s<<3].forEach(p)}(e,i,(function(t){r(t,e,i),function(t){for(var n=0,e=t.length,r=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++n0?o.push([t]):u.push(t)})),u.forEach((function(t){for(var n,e=0,r=o.length;e0&&a0&&u=0&&o>=0))throw new Error("invalid size");return t=r,n=o,i},i.thresholds=function(t){return arguments.length?(e="function"==typeof t?t:Array.isArray(t)?ic(ec.call(t)):ic(t),i):e},i.smooth=function(t){return arguments.length?(r=t?u:cc,i):r===u},i}function lc(t){return t[0]}function hc(t){return t[1]}function dc(){return 1}function pc(){var t=lc,n=hc,e=dc,r=960,i=500,o=20,a=2,u=3*o,c=r+2*u>>a,f=i+2*u>>a,s=ic(20);function l(r){var i=new Float32Array(c*f),s=Math.pow(2,-a),l=-1;for(const o of r){var h=(t(o,++l,r)+u)*s,d=(n(o,l,r)+u)*s,p=+e(o,l,r);if(h>=0&&h=0&&dt*r)))(n).map(((t,n)=>(t.value=+e[n],d(t))))}function d(t){return t.coordinates.forEach(p),t}function p(t){t.forEach(y)}function y(t){t.forEach(g)}function g(t){t[0]=t[0]*Math.pow(2,a)-u,t[1]=t[1]*Math.pow(2,a)-u}function v(){return c=r+2*(u=3*o)>>a,f=i+2*u>>a,h}return h.contours=function(t){var n=l(t),e=sc().size([c,f]),r=Math.pow(2,2*a),i=t=>{t=+t;var i=d(e.contour(n,t*r));return i.value=t,i};return Object.defineProperty(i,"max",{get:()=>hn(n)/r}),i},h.x=function(n){return arguments.length?(t="function"==typeof n?n:ic(+n),h):t},h.y=function(t){return arguments.length?(n="function"==typeof t?t:ic(+t),h):n},h.weight=function(t){return arguments.length?(e="function"==typeof t?t:ic(+t),h):e},h.size=function(t){if(!arguments.length)return[r,i];var n=+t[0],e=+t[1];if(!(n>=0&&e>=0))throw new Error("invalid size");return r=n,i=e,v()},h.cellSize=function(t){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(t)/Math.LN2),v()},h.thresholds=function(t){return arguments.length?(s="function"==typeof t?t:Array.isArray(t)?ic(ec.call(t)):ic(t),h):s},h.bandwidth=function(t){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*t*t+1)-1)/2,v()},h}const yc=134217729;function gc(t,n,e,r,i){let o,a,u,c,f=n[0],s=r[0],l=0,h=0;s>f==s>-f?(o=f,f=n[++l]):(o=s,s=r[++h]);let d=0;if(lf==s>-f?(a=f+o,u=o-(a-f),f=n[++l]):(a=s+o,u=o-(a-s),s=r[++h]),o=a,0!==u&&(i[d++]=u);lf==s>-f?(a=o+f,c=a-o,u=o-(a-c)+(f-c),f=n[++l]):(a=o+s,c=a-o,u=o-(a-c)+(s-c),s=r[++h]),o=a,0!==u&&(i[d++]=u);for(;l0!=u>0)return c;const f=Math.abs(a+u);return Math.abs(c)>=33306690738754716e-32*f?c:-function(t,n,e,r,i,o,a){let u,c,f,s,l,h,d,p,y,g,v,b,_,m,x,w,M,T;const A=t-i,S=e-i,E=n-o,k=r-o;m=A*k,h=yc*A,d=h-(h-A),p=A-d,h=yc*k,y=h-(h-k),g=k-y,x=p*g-(m-d*y-p*y-d*g),w=E*S,h=yc*E,d=h-(h-E),p=E-d,h=yc*S,y=h-(h-S),g=S-y,M=p*g-(w-d*y-p*y-d*g),v=x-M,l=x-v,bc[0]=x-(v+l)+(l-M),b=m+v,l=b-m,_=m-(b-l)+(v-l),v=_-w,l=_-v,bc[1]=_-(v+l)+(l-w),T=b+v,l=T-b,bc[2]=b-(T-l)+(v-l),bc[3]=T;let N=function(t,n){let e=n[0];for(let t=1;t<4;t++)e+=n[t];return e}(0,bc),P=22204460492503146e-32*a;if(N>=P||-N>=P)return N;if(l=t-A,u=t-(A+l)+(l-i),l=e-S,f=e-(S+l)+(l-i),l=n-E,c=n-(E+l)+(l-o),l=r-k,s=r-(k+l)+(l-o),0===u&&0===c&&0===f&&0===s)return N;if(P=11093356479670487e-47*a+33306690738754706e-32*Math.abs(N),N+=A*s+k*u-(E*f+S*c),N>=P||-N>=P)return N;m=u*k,h=yc*u,d=h-(h-u),p=u-d,h=yc*k,y=h-(h-k),g=k-y,x=p*g-(m-d*y-p*y-d*g),w=c*S,h=yc*c,d=h-(h-c),p=c-d,h=yc*S,y=h-(h-S),g=S-y,M=p*g-(w-d*y-p*y-d*g),v=x-M,l=x-v,wc[0]=x-(v+l)+(l-M),b=m+v,l=b-m,_=m-(b-l)+(v-l),v=_-w,l=_-v,wc[1]=_-(v+l)+(l-w),T=b+v,l=T-b,wc[2]=b-(T-l)+(v-l),wc[3]=T;const C=gc(4,bc,4,wc,_c);m=A*s,h=yc*A,d=h-(h-A),p=A-d,h=yc*s,y=h-(h-s),g=s-y,x=p*g-(m-d*y-p*y-d*g),w=E*f,h=yc*E,d=h-(h-E),p=E-d,h=yc*f,y=h-(h-f),g=f-y,M=p*g-(w-d*y-p*y-d*g),v=x-M,l=x-v,wc[0]=x-(v+l)+(l-M),b=m+v,l=b-m,_=m-(b-l)+(v-l),v=_-w,l=_-v,wc[1]=_-(v+l)+(l-w),T=b+v,l=T-b,wc[2]=b-(T-l)+(v-l),wc[3]=T;const O=gc(C,_c,4,wc,mc);m=u*s,h=yc*u,d=h-(h-u),p=u-d,h=yc*s,y=h-(h-s),g=s-y,x=p*g-(m-d*y-p*y-d*g),w=c*f,h=yc*c,d=h-(h-c),p=c-d,h=yc*f,y=h-(h-f),g=f-y,M=p*g-(w-d*y-p*y-d*g),v=x-M,l=x-v,wc[0]=x-(v+l)+(l-M),b=m+v,l=b-m,_=m-(b-l)+(v-l),v=_-w,l=_-v,wc[1]=_-(v+l)+(l-w),T=b+v,l=T-b,wc[2]=b-(T-l)+(v-l),wc[3]=T;const j=gc(O,mc,4,wc,xc);return xc[j-1]}(t,n,e,r,i,o,f)}vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(8),vc(8),vc(8),vc(4),vc(8),vc(8),vc(8),vc(12),vc(192),vc(192),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(8),vc(8),vc(8),vc(8),vc(8),vc(8),vc(8),vc(8),vc(8),vc(4),vc(4),vc(4),vc(8),vc(16),vc(16),vc(16),vc(32),vc(32),vc(48),vc(64),vc(1152),vc(1152),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(24),vc(24),vc(24),vc(24),vc(24),vc(24),vc(24),vc(24),vc(24),vc(24),vc(1152),vc(1152),vc(1152),vc(1152),vc(1152),vc(2304),vc(2304),vc(3456),vc(5760),vc(8),vc(8),vc(8),vc(16),vc(24),vc(48),vc(48),vc(96),vc(192),vc(384),vc(384),vc(384),vc(768),vc(96),vc(96),vc(96),vc(1152);const Tc=Math.pow(2,-52),Ac=new Uint32Array(512);class Sc{static from(t,n=Oc,e=jc){const r=t.length,i=new Float64Array(2*r);for(let o=0;o>1;if(n>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const e=Math.max(2*n-5,0);this._triangles=new Uint32Array(3*e),this._halfedges=new Int32Array(3*e),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:t,_hullPrev:n,_hullNext:e,_hullTri:r,_hullHash:i}=this,o=t.length>>1;let a=1/0,u=1/0,c=-1/0,f=-1/0;for(let n=0;nc&&(c=e),r>f&&(f=r),this._ids[n]=n}const s=(a+c)/2,l=(u+f)/2;let h,d,p,y=1/0;for(let n=0;n0&&(d=n,y=e)}let b=t[2*d],_=t[2*d+1],m=1/0;for(let n=0;nr&&(n[e++]=i,r=this._dists[i])}return this.hull=n.subarray(0,e),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(Mc(g,v,b,_,x,w)<0){const t=d,n=b,e=_;d=p,b=x,_=w,p=t,x=n,w=e}const M=function(t,n,e,r,i,o){const a=e-t,u=r-n,c=i-t,f=o-n,s=a*a+u*u,l=c*c+f*f,h=.5/(a*f-u*c);return{x:t+(f*s-u*l)*h,y:n+(a*l-c*s)*h}}(g,v,b,_,x,w);this._cx=M.x,this._cy=M.y;for(let n=0;n0&&Math.abs(f-o)<=Tc&&Math.abs(s-a)<=Tc)continue;if(o=f,a=s,c===h||c===d||c===p)continue;let l=0;for(let t=0,n=this._hashKey(f,s);t=0;)if(g=y,g===l){g=-1;break}if(-1===g)continue;let v=this._addTriangle(g,c,e[g],-1,-1,r[g]);r[c]=this._legalize(v+2),r[g]=v,T++;let b=e[g];for(;y=e[b],Mc(f,s,t[2*b],t[2*b+1],t[2*y],t[2*y+1])<0;)v=this._addTriangle(b,c,y,r[c],-1,r[b]),r[c]=this._legalize(v+2),e[b]=b,T--,b=y;if(g===l)for(;y=n[g],Mc(f,s,t[2*y],t[2*y+1],t[2*g],t[2*g+1])<0;)v=this._addTriangle(y,c,g,-1,r[g],r[y]),this._legalize(v+2),r[y]=v,e[g]=g,T--,g=y;this._hullStart=n[c]=g,e[g]=n[b]=c,e[c]=b,i[this._hashKey(f,s)]=c,i[this._hashKey(t[2*g],t[2*g+1])]=g}this.hull=new Uint32Array(T);for(let t=0,n=this._hullStart;t0?3-e:1+e)/4}(t-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:n,_halfedges:e,coords:r}=this;let i=0,o=0;for(;;){const a=e[t],u=t-t%3;if(o=u+(t+2)%3,-1===a){if(0===i)break;t=Ac[--i];continue}const c=a-a%3,f=u+(t+1)%3,s=c+(a+2)%3,l=n[o],h=n[t],d=n[f],p=n[s];if(kc(r[2*l],r[2*l+1],r[2*h],r[2*h+1],r[2*d],r[2*d+1],r[2*p],r[2*p+1])){n[t]=p,n[a]=l;const r=e[s];if(-1===r){let n=this._hullStart;do{if(this._hullTri[n]===s){this._hullTri[n]=t;break}n=this._hullPrev[n]}while(n!==this._hullStart)}this._link(t,r),this._link(a,e[o]),this._link(o,s);const u=c+(a+1)%3;i=e&&n[t[a]]>o;)t[a+1]=t[a--];t[a+1]=r}else{let i=e+1,o=r;Cc(t,e+r>>1,i),n[t[e]]>n[t[r]]&&Cc(t,e,r),n[t[i]]>n[t[r]]&&Cc(t,i,r),n[t[e]]>n[t[i]]&&Cc(t,e,i);const a=t[i],u=n[a];for(;;){do{i++}while(n[t[i]]u);if(o=o-e?(Pc(t,n,i,r),Pc(t,n,e,o-1)):(Pc(t,n,e,o-1),Pc(t,n,i,r))}}function Cc(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function Oc(t){return t[0]}function jc(t){return t[1]}const zc=1e-6;class Rc{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,n){this._+=`L${this._x1=+t},${this._y1=+n}`}arc(t,n,e){const r=(t=+t)+(e=+e),i=n=+n;if(e<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>zc||Math.abs(this._y1-i)>zc)&&(this._+="L"+r+","+i),e&&(this._+=`A${e},${e},0,1,1,${t-e},${n}A${e},${e},0,1,1,${this._x1=r},${this._y1=i}`)}rect(t,n,e,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${+e}v${+r}h${-e}Z`}value(){return this._||null}}class Dc{constructor(){this._=[]}moveTo(t,n){this._.push([t,n])}closePath(){this._.push(this._[0].slice())}lineTo(t,n){this._.push([t,n])}value(){return this._.length?this._:null}}class qc{constructor(t,[n,e,r,i]=[0,0,960,500]){if(!((r=+r)>=(n=+n)&&(i=+i)>=(e=+e)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=r,this.xmin=n,this.ymax=i,this.ymin=e,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:n,triangles:e},vectors:r}=this,i=this.circumcenters=this._circumcenters.subarray(0,e.length/3*2);for(let n,r,o=0,a=0,u=e.length;o1;)i-=2;for(let t=2;t4)for(let t=0;t0){if(n>=this.ymax)return null;(i=(this.ymax-n)/r)0){if(t>=this.xmax)return null;(i=(this.xmax-t)/e)this.xmax?2:0)|(nthis.ymax?8:0)}}const Ic=2*Math.PI,Fc=Math.pow;function Bc(t){return t[0]}function Uc(t){return t[1]}function Yc(t,n,e){return[t+Math.sin(t+n)*e,n+Math.cos(t-n)*e]}class Lc{static from(t,n=Bc,e=Uc,r){return new Lc("length"in t?function(t,n,e,r){const i=t.length,o=new Float64Array(2*i);for(let a=0;a2&&function(t){const{triangles:n,coords:e}=t;for(let t=0;t1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:n.length/2},((t,n)=>n)).sort(((t,e)=>n[2*t]-n[2*e]||n[2*t+1]-n[2*e+1]));const t=this.collinear[0],e=this.collinear[this.collinear.length-1],r=[n[2*t],n[2*t+1],n[2*e],n[2*e+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let t=0,e=n.length/2;t0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],o[r[0]]=1,2===r.length&&(o[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(t){return new qc(this,t)}*neighbors(t){const{inedges:n,hull:e,_hullIndex:r,halfedges:i,triangles:o,collinear:a}=this;if(a){const n=a.indexOf(t);return n>0&&(yield a[n-1]),void(n=0&&i!==e&&i!==r;)e=i;return i}_step(t,n,e){const{inedges:r,hull:i,_hullIndex:o,halfedges:a,triangles:u,points:c}=this;if(-1===r[t]||!c.length)return(t+1)%(c.length>>1);let f=t,s=Fc(n-c[2*t],2)+Fc(e-c[2*t+1],2);const l=r[t];let h=l;do{let r=u[h];const l=Fc(n-c[2*r],2)+Fc(e-c[2*r+1],2);if(l()=>t;function Hc(t,{sourceEvent:n,subject:e,target:r,identifier:i,active:o,x:a,y:u,dx:c,dy:f,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:s}})}function Xc(t){return!t.ctrlKey&&!t.button}function Vc(){return this.parentNode}function Gc(t,n){return null==n?{x:t.x,y:t.y}:n}function Wc(){return navigator.maxTouchPoints||"ontouchstart"in this}function Zc(){var t,n,e,r,i=Xc,o=Vc,a=Gc,u=Wc,c={},f=xe("start","drag","end"),s=0,l=0;function h(t){t.on("mousedown.drag",d).filter(u).on("touchstart.drag",g).on("touchmove.drag",v,Ir).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(a,u){if(!r&&i.call(this,a,u)){var c=_(this,o.call(this,a,u),a,u,"mouse");c&&(qr(a.view).on("mousemove.drag",p,Fr).on("mouseup.drag",y,Fr),Yr(a.view),Br(a),e=!1,t=a.clientX,n=a.clientY,c("start",a))}}function p(r){if(Ur(r),!e){var i=r.clientX-t,o=r.clientY-n;e=i*i+o*o>l}c.mouse("drag",r)}function y(t){qr(t.view).on("mousemove.drag mouseup.drag",null),Lr(t.view,e),Ur(t),c.mouse("end",t)}function g(t,n){if(i.call(this,t,n)){var e,r,a=t.changedTouches,u=o.call(this,t,n),c=a.length;for(e=0;e=o?c=!0:10===(r=t.charCodeAt(a++))?f=!0:13===r&&(f=!0,10===t.charCodeAt(a)&&++a),t.slice(i+1,n-1).replace(/""/g,'"')}for(;a9999?"+"+nf(t,6):nf(t,4)}(t.getUTCFullYear())+"-"+nf(t.getUTCMonth()+1,2)+"-"+nf(t.getUTCDate(),2)+(i?"T"+nf(n,2)+":"+nf(e,2)+":"+nf(r,2)+"."+nf(i,3)+"Z":r?"T"+nf(n,2)+":"+nf(e,2)+":"+nf(r,2)+"Z":e||n?"T"+nf(n,2)+":"+nf(e,2)+"Z":"")}(t):n.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,n){var e,i,o=r(t,(function(t,r){if(e)return e(t,r-1);i=t,e=n?function(t,n){var e=Jc(t);return function(r,i){return n(e(r),i,t)}}(t,n):Jc(t)}));return o.columns=i||[],o},parseRows:r,format:function(n,e){return null==e&&(e=tf(n)),[e.map(a).join(t)].concat(i(n,e)).join("\n")},formatBody:function(t,n){return null==n&&(n=tf(t)),i(t,n).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}}var rf=ef(","),of=rf.parse,af=rf.parseRows,uf=rf.format,cf=rf.formatBody,ff=rf.formatRows,sf=rf.formatRow,lf=rf.formatValue,hf=ef("\t"),df=hf.parse,pf=hf.parseRows,yf=hf.format,gf=hf.formatBody,vf=hf.formatRows,bf=hf.formatRow,_f=hf.formatValue;function mf(t){for(var n in t){var e,r,i=t[n].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(e=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;xf&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=e;else i=null;t[n]=i}return t}const xf=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),wf=t=>+t;function Mf(t){return t*t}function Tf(t){return t*(2-t)}function Af(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var Sf=function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e}(3),Ef=function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(3),kf=function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(3),Nf=Math.PI,Pf=Nf/2;function Cf(t){return 1==+t?1:1-Math.cos(t*Pf)}function Of(t){return Math.sin(t*Pf)}function jf(t){return(1-Math.cos(Nf*t))/2}function zf(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Rf(t){return zf(1-+t)}function Df(t){return 1-zf(t)}function qf(t){return((t*=2)<=1?zf(1-t):2-zf(t-1))/2}function If(t){return 1-Math.sqrt(1-t*t)}function Ff(t){return Math.sqrt(1- --t*t)}function Bf(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Uf=7.5625;function Yf(t){return 1-Lf(1-t)}function Lf(t){return(t=+t)<.36363636363636365?Uf*t*t:t<.7272727272727273?Uf*(t-=.5454545454545454)*t+.75:t<.9090909090909091?Uf*(t-=.8181818181818182)*t+.9375:Uf*(t-=.9545454545454546)*t+.984375}function $f(t){return((t*=2)<=1?1-Lf(1-t):Lf(t-1)+1)/2}var Hf=1.70158,Xf=function t(n){function e(t){return(t=+t)*t*(n*(t-1)+t)}return n=+n,e.overshoot=t,e}(Hf),Vf=function t(n){function e(t){return--t*t*((t+1)*n+t)+1}return n=+n,e.overshoot=t,e}(Hf),Gf=function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(Hf),Wf=2*Math.PI,Zf=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=Wf);function i(t){return n*zf(- --t)*Math.sin((r-t)/e)}return i.amplitude=function(n){return t(n,e*Wf)},i.period=function(e){return t(n,e)},i}(1,.3),Kf=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=Wf);function i(t){return 1-n*zf(t=+t)*Math.sin((t+r)/e)}return i.amplitude=function(n){return t(n,e*Wf)},i.period=function(e){return t(n,e)},i}(1,.3),Qf=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=Wf);function i(t){return((t=2*t-1)<0?n*zf(-t)*Math.sin((r-t)/e):2-n*zf(t)*Math.sin((r+t)/e))/2}return i.amplitude=function(n){return t(n,e*Wf)},i.period=function(e){return t(n,e)},i}(1,.3);function Jf(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function ts(t,n){return fetch(t,n).then(Jf)}function ns(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function es(t,n){return fetch(t,n).then(ns)}function rs(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function is(t,n){return fetch(t,n).then(rs)}function os(t){return function(n,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=void 0),is(n,e).then((function(n){return t(n,r)}))}}function as(t,n,e,r){3===arguments.length&&"function"==typeof e&&(r=e,e=void 0);var i=ef(t);return is(n,e).then((function(t){return i.parse(t,r)}))}var us=os(of),cs=os(df);function fs(t,n){return new Promise((function(e,r){var i=new Image;for(var o in n)i[o]=n[o];i.onerror=r,i.onload=function(){e(i)},i.src=t}))}function ss(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function ls(t,n){return fetch(t,n).then(ss)}function hs(t){return(n,e)=>is(n,e).then((n=>(new DOMParser).parseFromString(n,t)))}const ds=hs("application/xml");var ps=hs("text/html"),ys=hs("image/svg+xml");function gs(t,n){var e,r=1;function i(){var i,o,a=e.length,u=0,c=0;for(i=0;i=(o=(y+v)/2))?y=o:v=o,(s=e>=(a=(g+b)/2))?g=a:b=a,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(u=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===u&&e===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=n>=(o=(y+v)/2))?y=o:v=o,(s=e>=(a=(g+b)/2))?g=a:b=a}while((l=s<<1|f)==(h=(c>=a)<<1|u>=o));return i[h]=d,i[l]=p,t}function bs(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function _s(t){return t[0]}function ms(t){return t[1]}function xs(t,n,e){var r=new ws(null==n?_s:n,null==e?ms:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function ws(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Ms(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var Ts=xs.prototype=ws.prototype;function As(t){return function(){return t}}function Ss(t){return 1e-6*(t()-.5)}function Es(t){return t.x+t.vx}function ks(t){return t.y+t.vy}function Ns(t){var n,e,r,i=1,o=1;function a(){for(var t,a,c,f,s,l,h,d=n.length,p=0;pf+p||os+p||ac.index){var y=f-u.x-u.vx,g=s-u.y-u.vy,v=y*y+g*g;vt.r&&(t.r=t[n].r)}function c(){if(n){var r,i,o=n.length;for(e=new Array(o),r=0;r[u(t,n,r),t])));for(a=0,i=new Array(f);as&&(s=r),il&&(l=i));if(c>s||f>l)return this;for(this.cover(c,f).cover(s,l),e=0;et||t>=i||r>n||n>=o;)switch(u=(nh||(o=c.y0)>d||(a=c.x1)=v)<<1|t>=g)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var b=t-+this._x.call(null,y.data),_=n-+this._y.call(null,y.data),m=b*b+_*_;if(m=(u=(p+g)/2))?p=u:g=u,(s=a>=(c=(y+v)/2))?y=c:v=c,n=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},Ts.removeAll=function(t){for(var n=0,e=t.length;n(t=(1664525*t+1013904223)%js)/js}();function l(){h(),f.call("tick",n),e1?(null==e?u.delete(t):u.set(t,p(e)),n):u.get(t)},find:function(n,e,r){var i,o,a,u,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f1?(f.on(t,e),n):f.on(t)}}}function Is(){var t,n,e,r,i,o=As(-30),a=1,u=1/0,c=.81;function f(e){var i,o=t.length,a=xs(t,zs,Rs).visitAfter(l);for(r=e,i=0;i=u)){(t.data!==n||t.next)&&(0===l&&(p+=(l=Ss(e))*l),0===h&&(p+=(h=Ss(e))*h),p1?r[0]+r.slice(2):r,+t.slice(e+1)]}function Ls(t){return(t=Ys(Math.abs(t)))?t[1]:NaN}var $s,Hs=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Xs(t){if(!(n=Hs.exec(t)))throw new Error("invalid format: "+t);var n;return new Vs({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Vs(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Gs(t,n){var e=Ys(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Xs.prototype=Vs.prototype,Vs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Ws={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>Gs(100*t,n),r:Gs,s:function(t,n){var e=Ys(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-($s=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Ys(t,Math.max(0,n+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Zs(t){return t}var Ks,Qs,Js,tl=Array.prototype.map,nl=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function el(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?Zs:(n=tl.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(t.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return o.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",u=void 0===t.numerals?Zs:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(tl.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",f=void 0===t.minus?"−":t.minus+"",s=void 0===t.nan?"NaN":t.nan+"";function l(t){var n=(t=Xs(t)).fill,e=t.align,l=t.sign,h=t.symbol,d=t.zero,p=t.width,y=t.comma,g=t.precision,v=t.trim,b=t.type;"n"===b?(y=!0,b="g"):Ws[b]||(void 0===g&&(g=12),v=!0,b="g"),(d||"0"===n&&"="===e)&&(d=!0,n="0",e="=");var _="$"===h?i:"#"===h&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",m="$"===h?o:/[%p]/.test(b)?c:"",x=Ws[b],w=/[defgprs%]/.test(b);function M(t){var i,o,c,h=_,M=m;if("c"===b)M=x(t)+M,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?s:x(Math.abs(t),g),v&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),T&&0==+t&&"+"!==l&&(T=!1),h=(T?"("===l?l:f:"-"===l||"("===l?"":l)+h,M=("s"===b?nl[8+$s/3]:"")+M+(T&&"("===l?")":""),w)for(i=-1,o=t.length;++i(c=t.charCodeAt(i))||c>57){M=(46===c?a+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}y&&!d&&(t=r(t,1/0));var A=h.length+t.length+M.length,S=A>1)+h+t+M+S.slice(A);break;default:t=S+h+t+M}return u(t)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return t+""},M}return{format:l,formatPrefix:function(t,n){var e=l(((t=Xs(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Ls(n)/3))),i=Math.pow(10,-r),o=nl[8+r/3];return function(t){return e(i*t)+o}}}}function rl(t){return Ks=el(t),Qs=Ks.format,Js=Ks.formatPrefix,Ks}function il(t){return Math.max(0,-Ls(Math.abs(t)))}function ol(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ls(n)/3)))-Ls(Math.abs(t)))}function al(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Ls(n)-Ls(t))+1}rl({thousands:",",grouping:[3],currency:["$",""]});var ul=1e-6,cl=1e-12,fl=Math.PI,sl=fl/2,ll=fl/4,hl=2*fl,dl=180/fl,pl=fl/180,yl=Math.abs,gl=Math.atan,vl=Math.atan2,bl=Math.cos,_l=Math.ceil,ml=Math.exp,xl=(Math.floor,Math.hypot),wl=Math.log,Ml=Math.pow,Tl=Math.sin,Al=Math.sign||function(t){return t>0?1:t<0?-1:0},Sl=Math.sqrt,El=Math.tan;function kl(t){return t>1?0:t<-1?fl:Math.acos(t)}function Nl(t){return t>1?sl:t<-1?-sl:Math.asin(t)}function Pl(t){return(t=Tl(t/2))*t}function Cl(){}function Ol(t,n){t&&zl.hasOwnProperty(t.type)&&zl[t.type](t,n)}var jl={Feature:function(t,n){Ol(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,o=bl(n=(n*=pl)/2+ll),a=Tl(n),u=Yl*a,c=Ul*o+u*bl(i),f=u*r*Tl(i);th.add(vl(f,c)),Bl=t,Ul=o,Yl=a}function uh(t){return nh=new Et,ql(t,eh),2*nh}function ch(t){return[vl(t[1],t[0]),Nl(t[2])]}function fh(t){var n=t[0],e=t[1],r=bl(e);return[r*bl(n),r*Tl(n),Tl(e)]}function sh(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function lh(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function hh(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function dh(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function ph(t){var n=Sl(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var yh,gh,vh,bh,_h,mh,xh,wh,Mh,Th,Ah,Sh,Eh,kh,Nh,Ph,Ch={point:Oh,lineStart:zh,lineEnd:Rh,polygonStart:function(){Ch.point=Dh,Ch.lineStart=qh,Ch.lineEnd=Ih,Kl=new Et,eh.polygonStart()},polygonEnd:function(){eh.polygonEnd(),Ch.point=Oh,Ch.lineStart=zh,Ch.lineEnd=Rh,th<0?(Ll=-(Hl=180),$l=-(Xl=90)):Kl>ul?Xl=90:Kl<-1e-6&&($l=-90),Jl[0]=Ll,Jl[1]=Hl},sphere:function(){Ll=-(Hl=180),$l=-(Xl=90)}};function Oh(t,n){Ql.push(Jl=[Ll=t,Hl=t]),n<$l&&($l=n),n>Xl&&(Xl=n)}function jh(t,n){var e=fh([t*pl,n*pl]);if(Zl){var r=lh(Zl,e),i=lh([r[1],-r[0],0],r);ph(i),i=ch(i);var o,a=t-Vl,u=a>0?1:-1,c=i[0]*dl*u,f=yl(a)>180;f^(u*VlXl&&(Xl=o):f^(u*Vl<(c=(c+360)%360-180)&&cXl&&(Xl=n)),f?tFh(Ll,Hl)&&(Hl=t):Fh(t,Hl)>Fh(Ll,Hl)&&(Ll=t):Hl>=Ll?(tHl&&(Hl=t)):t>Vl?Fh(Ll,t)>Fh(Ll,Hl)&&(Hl=t):Fh(t,Hl)>Fh(Ll,Hl)&&(Ll=t)}else Ql.push(Jl=[Ll=t,Hl=t]);n<$l&&($l=n),n>Xl&&(Xl=n),Zl=e,Vl=t}function zh(){Ch.point=jh}function Rh(){Jl[0]=Ll,Jl[1]=Hl,Ch.point=Oh,Zl=null}function Dh(t,n){if(Zl){var e=t-Vl;Kl.add(yl(e)>180?e+(e>0?360:-360):e)}else Gl=t,Wl=n;eh.point(t,n),jh(t,n)}function qh(){eh.lineStart()}function Ih(){Dh(Gl,Wl),eh.lineEnd(),yl(Kl)>ul&&(Ll=-(Hl=180)),Jl[0]=Ll,Jl[1]=Hl,Zl=null}function Fh(t,n){return(n-=t)<0?n+360:n}function Bh(t,n){return t[0]-n[0]}function Uh(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nFh(r[0],r[1])&&(r[1]=i[1]),Fh(i[0],r[1])>Fh(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=0,r=o[e=o.length-1];n<=e;r=i,++n)i=o[n],(u=Fh(r[1],i[0]))>a&&(a=u,Ll=i[0],Hl=r[1])}return Ql=Jl=null,Ll===1/0||$l===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ll,$l],[Hl,Xl]]}var Lh={sphere:Cl,point:$h,lineStart:Xh,lineEnd:Wh,polygonStart:function(){Lh.lineStart=Zh,Lh.lineEnd=Kh},polygonEnd:function(){Lh.lineStart=Xh,Lh.lineEnd=Wh}};function $h(t,n){t*=pl;var e=bl(n*=pl);Hh(e*bl(t),e*Tl(t),Tl(n))}function Hh(t,n,e){++yh,vh+=(t-vh)/yh,bh+=(n-bh)/yh,_h+=(e-_h)/yh}function Xh(){Lh.point=Vh}function Vh(t,n){t*=pl;var e=bl(n*=pl);kh=e*bl(t),Nh=e*Tl(t),Ph=Tl(n),Lh.point=Gh,Hh(kh,Nh,Ph)}function Gh(t,n){t*=pl;var e=bl(n*=pl),r=e*bl(t),i=e*Tl(t),o=Tl(n),a=vl(Sl((a=Nh*o-Ph*i)*a+(a=Ph*r-kh*o)*a+(a=kh*i-Nh*r)*a),kh*r+Nh*i+Ph*o);gh+=a,mh+=a*(kh+(kh=r)),xh+=a*(Nh+(Nh=i)),wh+=a*(Ph+(Ph=o)),Hh(kh,Nh,Ph)}function Wh(){Lh.point=$h}function Zh(){Lh.point=Qh}function Kh(){Jh(Sh,Eh),Lh.point=$h}function Qh(t,n){Sh=t,Eh=n,t*=pl,n*=pl,Lh.point=Jh;var e=bl(n);kh=e*bl(t),Nh=e*Tl(t),Ph=Tl(n),Hh(kh,Nh,Ph)}function Jh(t,n){t*=pl;var e=bl(n*=pl),r=e*bl(t),i=e*Tl(t),o=Tl(n),a=Nh*o-Ph*i,u=Ph*r-kh*o,c=kh*i-Nh*r,f=xl(a,u,c),s=Nl(f),l=f&&-s/f;Mh.add(l*a),Th.add(l*u),Ah.add(l*c),gh+=s,mh+=s*(kh+(kh=r)),xh+=s*(Nh+(Nh=i)),wh+=s*(Ph+(Ph=o)),Hh(kh,Nh,Ph)}function td(t){yh=gh=vh=bh=_h=mh=xh=wh=0,Mh=new Et,Th=new Et,Ah=new Et,ql(t,Lh);var n=+Mh,e=+Th,r=+Ah,i=xl(n,e,r);return ifl?t+Math.round(-t/hl)*hl:t,n]}function id(t,n,e){return(t%=hl)?n||e?ed(ad(t),ud(n,e)):ad(t):n||e?ud(n,e):rd}function od(t){return function(n,e){return[(n+=t)>fl?n-hl:n<-fl?n+hl:n,e]}}function ad(t){var n=od(t);return n.invert=od(-t),n}function ud(t,n){var e=bl(t),r=Tl(t),i=bl(n),o=Tl(n);function a(t,n){var a=bl(n),u=bl(t)*a,c=Tl(t)*a,f=Tl(n),s=f*e+u*r;return[vl(c*i-s*o,u*e-f*r),Nl(s*i+c*o)]}return a.invert=function(t,n){var a=bl(n),u=bl(t)*a,c=Tl(t)*a,f=Tl(n),s=f*i-c*o;return[vl(c*i+f*o,u*e+s*r),Nl(s*e-u*r)]},a}function cd(t){function n(n){return(n=t(n[0]*pl,n[1]*pl))[0]*=dl,n[1]*=dl,n}return t=id(t[0]*pl,t[1]*pl,t.length>2?t[2]*pl:0),n.invert=function(n){return(n=t.invert(n[0]*pl,n[1]*pl))[0]*=dl,n[1]*=dl,n},n}function fd(t,n,e,r,i,o){if(e){var a=bl(n),u=Tl(n),c=r*e;null==i?(i=n+r*hl,o=n-c/2):(i=sd(a,i),o=sd(a,o),(r>0?io)&&(i+=r*hl));for(var f,s=i;r>0?s>o:s1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function dd(t,n){return yl(t[0]-n[0])=0;--o)i.point((s=f[o])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function gd(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r=0?1:-1,S=A*T,E=S>fl,k=g*w;if(c.add(vl(k*A*Tl(S),v*M+k*bl(S))),a+=E?T+A*hl:T,E^p>=e^m>=e){var N=lh(fh(d),fh(_));ph(N);var P=lh(o,N);ph(P);var C=(E^T>=0?-1:1)*Nl(P[2]);(r>C||r===C&&(N[0]||N[1]))&&(u+=E^T>=0?1:-1)}}return(a<-1e-6||a0){for(l||(i.polygonStart(),l=!0),i.lineStart(),t=0;t1&&2&c&&h.push(h.pop().concat(h.shift())),a.push(h.filter(md))}return h}}function md(t){return t.length>1}function xd(t,n){return((t=t.x)[0]<0?t[1]-sl-ul:sl-t[1])-((n=n.x)[0]<0?n[1]-sl-ul:sl-n[1])}rd.invert=rd;const wd=_d((function(){return!0}),(function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,a){var u=o>0?fl:-fl,c=yl(o-e);yl(c-fl)0?sl:-sl),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(o,r),n=0):i!==u&&c>=fl&&(yl(e-i)ul?gl((Tl(n)*(o=bl(r))*Tl(e)-Tl(r)*(i=bl(n))*Tl(t))/(i*o*a)):(n+r)/2}(e,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),n=0),t.point(e=o,r=a),i=u},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var i;if(null==t)i=e*sl,r.point(-fl,i),r.point(0,i),r.point(fl,i),r.point(fl,0),r.point(fl,-i),r.point(0,-i),r.point(-fl,-i),r.point(-fl,0),r.point(-fl,i);else if(yl(t[0]-n[0])>ul){var o=t[0]0,i=yl(n)>ul;function o(t,e){return bl(t)*bl(e)>n}function a(t,e,r){var i=[1,0,0],o=lh(fh(t),fh(e)),a=sh(o,o),u=o[0],c=a-u*u;if(!c)return!r&&t;var f=n*a/c,s=-n*u/c,l=lh(i,o),h=dh(i,f);hh(h,dh(o,s));var d=l,p=sh(h,d),y=sh(d,d),g=p*p-y*(sh(h,h)-1);if(!(g<0)){var v=Sl(g),b=dh(d,(-p-v)/y);if(hh(b,h),b=ch(b),!r)return b;var _,m=t[0],x=e[0],w=t[1],M=e[1];x0^b[1]<(yl(b[0]-m)fl^(m<=b[0]&&b[0]<=x)){var S=dh(d,(-p+v)/y);return hh(S,h),[b,ch(S)]}}}function u(n,e){var i=r?t:fl-t,o=0;return n<-i?o|=1:n>i&&(o|=2),e<-i?o|=4:e>i&&(o|=8),o}return _d(o,(function(t){var n,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],y=o(l,h),g=r?y?0:u(l,h):y?u(l+(l<0?fl:-fl),h):0;if(!n&&(f=c=y)&&t.lineStart(),y!==c&&(!(d=a(n,p))||dd(n,d)||dd(p,d))&&(p[2]=1),y!==c)s=0,y?(t.lineStart(),d=a(p,n),t.point(d[0],d[1])):(d=a(n,p),t.point(d[0],d[1],2),t.lineEnd()),n=d;else if(i&&n&&r^y){var v;g&e||!(v=a(p,n,!0))||(s=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1],3)))}!y||n&&dd(n,p)||t.point(p[0],p[1]),n=p,c=y,e=g},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return s|(f&&c)<<1}}}),(function(n,r,i,o){fd(o,t,e,i,n,r)}),r?[0,-t]:[-fl,t-fl])}var Td,Ad,Sd,Ed,kd=1e9,Nd=-kd;function Pd(t,n,e,r){function i(i,o){return t<=i&&i<=e&&n<=o&&o<=r}function o(i,o,u,f){var s=0,l=0;if(null==i||(s=a(i,u))!==(l=a(o,u))||c(i,o)<0^u>0)do{f.point(0===s||3===s?t:e,s>1?r:n)}while((s=(s+u+4)%4)!==l);else f.point(o[0],o[1])}function a(r,i){return yl(r[0]-t)0?0:3:yl(r[0]-e)0?2:1:yl(r[1]-n)0?1:0:i>0?3:2}function u(t,n){return c(t.x,n.x)}function c(t,n){var e=a(t,1),r=a(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var c,f,s,l,h,d,p,y,g,v,b,_=a,m=hd(),x={point:w,lineStart:function(){x.point=M,f&&f.push(s=[]),v=!0,g=!1,p=y=NaN},lineEnd:function(){c&&(M(l,h),d&&g&&m.rejoin(),c.push(m.result())),x.point=w,g&&_.lineEnd()},polygonStart:function(){_=m,c=[],f=[],b=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,i=f.length;er&&(h-o)*(r-a)>(d-a)*(t-o)&&++n:d<=r&&(h-o)*(r-a)<(d-a)*(t-o)&&--n;return n}(),e=b&&n,i=(c=En(c)).length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&yd(c,u,n,o,a),a.polygonEnd()),_=a,c=f=s=null}};function w(t,n){i(t,n)&&_.point(t,n)}function M(o,a){var u=i(o,a);if(f&&s.push([o,a]),v)l=o,h=a,d=u,v=!1,u&&(_.lineStart(),_.point(o,a));else if(u&&g)_.point(o,a);else{var c=[p=Math.max(Nd,Math.min(kd,p)),y=Math.max(Nd,Math.min(kd,y))],m=[o=Math.max(Nd,Math.min(kd,o)),a=Math.max(Nd,Math.min(kd,a))];!function(t,n,e,r,i,o){var a,u=t[0],c=t[1],f=0,s=1,l=n[0]-u,h=n[1]-c;if(a=e-u,l||!(a>0)){if(a/=l,l<0){if(a0){if(a>s)return;a>f&&(f=a)}if(a=i-u,l||!(a<0)){if(a/=l,l<0){if(a>s)return;a>f&&(f=a)}else if(l>0){if(a0)){if(a/=h,h<0){if(a0){if(a>s)return;a>f&&(f=a)}if(a=o-c,h||!(a<0)){if(a/=h,h<0){if(a>s)return;a>f&&(f=a)}else if(h>0){if(a0&&(t[0]=u+f*l,t[1]=c+f*h),s<1&&(n[0]=u+s*l,n[1]=c+s*h),!0}}}}}(c,m,t,n,e,r)?u&&(_.lineStart(),_.point(o,a),b=!1):(g||(_.lineStart(),_.point(c[0],c[1])),_.point(m[0],m[1]),u||_.lineEnd(),b=!1)}p=o,y=a,g=u}return x}}function Cd(){var t,n,e,r=0,i=0,o=960,a=500;return e={stream:function(e){return t&&n===e?t:t=Pd(r,i,o,a)(n=e)},extent:function(u){return arguments.length?(r=+u[0][0],i=+u[0][1],o=+u[1][0],a=+u[1][1],t=n=null,e):[[r,i],[o,a]]}}}var Od={sphere:Cl,point:Cl,lineStart:function(){Od.point=zd,Od.lineEnd=jd},lineEnd:Cl,polygonStart:Cl,polygonEnd:Cl};function jd(){Od.point=Od.lineEnd=Cl}function zd(t,n){Ad=t*=pl,Sd=Tl(n*=pl),Ed=bl(n),Od.point=Rd}function Rd(t,n){t*=pl;var e=Tl(n*=pl),r=bl(n),i=yl(t-Ad),o=bl(i),a=r*Tl(i),u=Ed*e-Sd*r*o,c=Sd*e+Ed*r*o;Td.add(vl(Sl(a*a+u*u),c)),Ad=t,Sd=e,Ed=r}function Dd(t){return Td=new Et,ql(t,Od),+Td}var qd=[null,null],Id={type:"LineString",coordinates:qd};function Fd(t,n){return qd[0]=t,qd[1]=n,Dd(Id)}var Bd={Feature:function(t,n){return Yd(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r0&&(i=Fd(t[o],t[o-1]))>0&&e<=i&&r<=i&&(e+r-i)*(1-Math.pow((e-r)/i,2))ul})).map(c)).concat(Cn(_l(o/d)*d,i,d).filter((function(t){return yl(t%y)>ul})).map(f))}return v.lines=function(){return b().map((function(t){return{type:"LineString",coordinates:t}}))},v.outline=function(){return{type:"Polygon",coordinates:[s(r).concat(l(a).slice(1),s(e).reverse().slice(1),l(u).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],u=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),u>a&&(t=u,u=a,a=t),v.precision(g)):[[r,u],[e,a]]},v.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],i=+e[1][1],n>t&&(e=n,n=t,t=e),o>i&&(e=o,o=i,i=e),v.precision(g)):[[n,o],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(p=+t[0],y=+t[1],v):[p,y]},v.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],v):[h,d]},v.precision=function(h){return arguments.length?(g=+h,c=Wd(o,i,90),f=Zd(n,t,g),s=Wd(u,a,90),l=Zd(r,e,g),v):g},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Qd(){return Kd()()}function Jd(t,n){var e=t[0]*pl,r=t[1]*pl,i=n[0]*pl,o=n[1]*pl,a=bl(r),u=Tl(r),c=bl(o),f=Tl(o),s=a*bl(e),l=a*Tl(e),h=c*bl(i),d=c*Tl(i),p=2*Nl(Sl(Pl(o-r)+a*c*Pl(i-e))),y=Tl(p),g=p?function(t){var n=Tl(t*=p)/y,e=Tl(p-t)/y,r=e*s+n*h,i=e*l+n*d,o=e*u+n*f;return[vl(i,r)*dl,vl(o,Sl(r*r+i*i))*dl]}:function(){return[e*dl,r*dl]};return g.distance=p,g}const tp=t=>t;var np,ep,rp,ip,op=new Et,ap=new Et,up={point:Cl,lineStart:Cl,lineEnd:Cl,polygonStart:function(){up.lineStart=cp,up.lineEnd=lp},polygonEnd:function(){up.lineStart=up.lineEnd=up.point=Cl,op.add(yl(ap)),ap=new Et},result:function(){var t=op/2;return op=new Et,t}};function cp(){up.point=fp}function fp(t,n){up.point=sp,np=rp=t,ep=ip=n}function sp(t,n){ap.add(ip*t-rp*n),rp=t,ip=n}function lp(){sp(np,ep)}const hp=up;var dp=1/0,pp=dp,yp=-dp,gp=yp,vp={point:function(t,n){typ&&(yp=t),ngp&&(gp=n)},lineStart:Cl,lineEnd:Cl,polygonStart:Cl,polygonEnd:Cl,result:function(){var t=[[dp,pp],[yp,gp]];return yp=gp=-(pp=dp=1/0),t}};const bp=vp;var _p,mp,xp,wp,Mp=0,Tp=0,Ap=0,Sp=0,Ep=0,kp=0,Np=0,Pp=0,Cp=0,Op={point:jp,lineStart:zp,lineEnd:qp,polygonStart:function(){Op.lineStart=Ip,Op.lineEnd=Fp},polygonEnd:function(){Op.point=jp,Op.lineStart=zp,Op.lineEnd=qp},result:function(){var t=Cp?[Np/Cp,Pp/Cp]:kp?[Sp/kp,Ep/kp]:Ap?[Mp/Ap,Tp/Ap]:[NaN,NaN];return Mp=Tp=Ap=Sp=Ep=kp=Np=Pp=Cp=0,t}};function jp(t,n){Mp+=t,Tp+=n,++Ap}function zp(){Op.point=Rp}function Rp(t,n){Op.point=Dp,jp(xp=t,wp=n)}function Dp(t,n){var e=t-xp,r=n-wp,i=Sl(e*e+r*r);Sp+=i*(xp+t)/2,Ep+=i*(wp+n)/2,kp+=i,jp(xp=t,wp=n)}function qp(){Op.point=jp}function Ip(){Op.point=Bp}function Fp(){Up(_p,mp)}function Bp(t,n){Op.point=Up,jp(_p=xp=t,mp=wp=n)}function Up(t,n){var e=t-xp,r=n-wp,i=Sl(e*e+r*r);Sp+=i*(xp+t)/2,Ep+=i*(wp+n)/2,kp+=i,Np+=(i=wp*t-xp*n)*(xp+t),Pp+=i*(wp+n),Cp+=3*i,jp(xp=t,wp=n)}const Yp=Op;function Lp(t){this._context=t}Lp.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,hl)}},result:Cl};var $p,Hp,Xp,Vp,Gp,Wp=new Et,Zp={point:Cl,lineStart:function(){Zp.point=Kp},lineEnd:function(){$p&&Qp(Hp,Xp),Zp.point=Cl},polygonStart:function(){$p=!0},polygonEnd:function(){$p=null},result:function(){var t=+Wp;return Wp=new Et,t}};function Kp(t,n){Zp.point=Qp,Hp=Vp=t,Xp=Gp=n}function Qp(t,n){Vp-=t,Gp-=n,Wp.add(Sl(Vp*Vp+Gp*Gp)),Vp=t,Gp=n}const Jp=Zp;function ty(){this._string=[]}function ny(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function ey(t,n){var e,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),ql(t,e(r))),r.result()}return o.area=function(t){return ql(t,e(hp)),hp.result()},o.measure=function(t){return ql(t,e(Jp)),Jp.result()},o.bounds=function(t){return ql(t,e(bp)),bp.result()},o.centroid=function(t){return ql(t,e(Yp)),Yp.result()},o.projection=function(n){return arguments.length?(e=null==n?(t=null,tp):(t=n).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(n=null,new ty):new Lp(n=t),"function"!=typeof i&&r.pointRadius(i),o):n},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(n)}function ry(t){return{stream:iy(t)}}function iy(t){return function(n){var e=new oy;for(var r in t)e[r]=t[r];return e.stream=n,e}}function oy(){}function ay(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),ql(e,t.stream(bp)),n(bp.result()),null!=r&&t.clipExtent(r),t}function uy(t,n,e){return ay(t,(function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],o=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),a=+n[0][0]+(r-o*(e[1][0]+e[0][0]))/2,u=+n[0][1]+(i-o*(e[1][1]+e[0][1]))/2;t.scale(150*o).translate([a,u])}),e)}function cy(t,n,e){return uy(t,[[0,0],n],e)}function fy(t,n,e){return ay(t,(function(e){var r=+n,i=r/(e[1][0]-e[0][0]),o=(r-i*(e[1][0]+e[0][0]))/2,a=-i*e[0][1];t.scale(150*i).translate([o,a])}),e)}function sy(t,n,e){return ay(t,(function(e){var r=+n,i=r/(e[1][1]-e[0][1]),o=-i*e[0][0],a=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([o,a])}),e)}ty.prototype={_radius:4.5,_circle:ny(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:null==this._circle&&(this._circle=ny(this._radius)),this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},oy.prototype={constructor:oy,point:function(t,n){this.stream.point(t,n)},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()}};var ly=bl(30*pl);function hy(t,n){return+n?function(t,n){function e(r,i,o,a,u,c,f,s,l,h,d,p,y,g){var v=f-r,b=s-i,_=v*v+b*b;if(_>4*n&&y--){var m=a+h,x=u+d,w=c+p,M=Sl(m*m+x*x+w*w),T=Nl(w/=M),A=yl(yl(w)-1)n||yl((v*N+b*P)/_-.5)>.3||a*h+u*d+c*p2?t[2]%360*pl:0,N()):[g*dl,v*dl,b*dl]},E.angle=function(t){return arguments.length?(_=t%360*pl,N()):_*dl},E.reflectX=function(t){return arguments.length?(m=t?-1:1,N()):m<0},E.reflectY=function(t){return arguments.length?(x=t?-1:1,N()):x<0},E.precision=function(t){return arguments.length?(a=hy(u,S=t*t),P()):Sl(S)},E.fitExtent=function(t,n){return uy(E,t,n)},E.fitSize=function(t,n){return cy(E,t,n)},E.fitWidth=function(t,n){return fy(E,t,n)},E.fitHeight=function(t,n){return sy(E,t,n)},function(){return n=t.apply(this,arguments),E.invert=n.invert&&k,N()}}function vy(t){var n=0,e=fl/3,r=gy(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*pl,e=t[1]*pl):[n*dl,e*dl]},i}function by(t,n){var e=Tl(t),r=(e+Tl(n))/2;if(yl(r)=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:a).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[a.stream(n=e),u.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e0?n<-sl+ul&&(n=-sl+ul):n>sl-ul&&(n=sl-ul);var e=i/Ml(Cy(n),r);return[e*Tl(r*t),i-e*bl(r*t)]}return o.invert=function(t,n){var e=i-n,o=Al(r)*Sl(t*t+e*e),a=vl(t,yl(e))*Al(e);return e*r<0&&(a-=fl*Al(t)*Al(e)),[a/r,2*gl(Ml(i/o,1/r))-sl]},o}function jy(){return vy(Oy).scale(109.5).parallels([30,30])}function zy(t,n){return[t,n]}function Ry(){return yy(zy).scale(152.63)}function Dy(t,n){var e=bl(t),r=t===n?Tl(t):(e-bl(n))/(n-t),i=e/r+t;if(yl(r)2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)}function eg(t,n){return t.parent===n.parent?1:2}function rg(t,n){return t+n.x}function ig(t,n){return Math.max(t,n.y)}function og(){var t=eg,n=1,e=1,r=!1;function i(i){var o,a=0;i.eachAfter((function(n){var e=n.children;e?(n.x=function(t){return t.reduce(rg,0)/t.length}(e),n.y=function(t){return 1+t.reduce(ig,0)}(e)):(n.x=o?a+=t(n,o):0,n.y=0,o=n)}));var u=function(t){for(var n;n=t.children;)t=n[0];return t}(i),c=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(i),f=u.x-t(u,c)/2,s=c.x+t(c,u)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*n,t.y=(i.y-t.y)*e}:function(t){t.x=(t.x-f)/(s-f)*n,t.y=(1-(i.y?t.y/i.y:1))*e})}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i}function ag(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function ug(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=fg)):void 0===n&&(n=cg);for(var e,r,i,o,a,u=new hg(t),c=[u];e=c.pop();)if((i=n(e.data))&&(a=(i=Array.from(i)).length))for(e.children=i,o=a-1;o>=0;--o)c.push(r=i[o]=new hg(i[o])),r.parent=e,r.depth=e.depth+1;return u.eachBefore(lg)}function cg(t){return t.children}function fg(t){return Array.isArray(t)?t[1]:null}function sg(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function lg(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function hg(t){this.data=t,this.depth=this.height=0,this.parent=null}function dg(t){return null==t?null:pg(t)}function pg(t){if("function"!=typeof t)throw new Error;return t}function yg(){return 0}function gg(t){return function(){return t}}Ly.invert=function(t,n){for(var e,r=n,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=e=(r*(Iy+Fy*i+o*(By+Uy*i))-n)/(Iy+3*Fy*i+o*(7*By+9*Uy*i)))*r)*i*i,!(yl(e)ul&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},Zy.invert=My(Nl),Qy.invert=My((function(t){return 2*gl(t)})),tg.invert=function(t,n){return[-n,2*gl(ml(t))-sl]},hg.prototype=ug.prototype={constructor:hg,count:function(){return this.eachAfter(ag)},each:function(t,n){let e=-1;for(const r of this)t.call(n,r,++e,this);return this},eachAfter:function(t,n){for(var e,r,i,o=this,a=[o],u=[],c=-1;o=a.pop();)if(u.push(o),e=o.children)for(r=0,i=e.length;r=0;--r)o.push(e[r]);return this},find:function(t,n){let e=-1;for(const r of this)if(t.call(n,r,++e,this))return r},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return ug(this).eachBefore(sg)},[Symbol.iterator]:function*(){var t,n,e,r,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(yield i,n=i.children)for(e=0,r=n.length;e(t=(1664525*t+1013904223)%vg)/vg}function _g(t){return mg(t,bg())}function mg(t,n){for(var e,r,i=0,o=(t=function(t,n){let e,r,i=t.length;for(;i;)r=n()*i--|0,e=t[i],t[i]=t[r],t[r]=e;return t}(Array.from(t),n)).length,a=[];i0&&e*e>r*r+i*i}function Tg(t,n){for(var e=0;e1e-6?(E+Math.sqrt(E*E-4*S*k))/(2*S):k/E);return{x:r+w+M*N,y:i+T+A*N,r:N}}function kg(t,n,e){var r,i,o,a,u=t.x-n.x,c=t.y-n.y,f=u*u+c*c;f?(i=n.r+e.r,i*=i,a=t.r+e.r,i>(a*=a)?(r=(f+a-i)/(2*f),o=Math.sqrt(Math.max(0,a/f-r*r)),e.x=t.x-r*u-o*c,e.y=t.y-r*c+o*u):(r=(f+i-a)/(2*f),o=Math.sqrt(Math.max(0,i/f-r*r)),e.x=n.x+r*u-o*c,e.y=n.y+r*c+o*u)):(e.x=n.x+e.r,e.y=n.y)}function Ng(t,n){var e=t.r+n.r-1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function Pg(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,o=(n.y*e.r+e.y*n.r)/r;return i*i+o*o}function Cg(t){this._=t,this.next=null,this.previous=null}function Og(t,n){if(!(a=(e=t,t="object"==typeof e&&"length"in e?e:Array.from(e)).length))return 0;var e,r,i,o,a,u,c,f,s,l,h,d;if((r=t[0]).x=0,r.y=0,!(a>1))return r.r;if(i=t[1],r.x=-i.r,i.x=r.r,i.y=0,!(a>2))return r.r+i.r;kg(i,r,o=t[2]),r=new Cg(r),i=new Cg(i),o=new Cg(o),r.next=o.previous=i,i.next=r.previous=o,o.next=i.previous=r;t:for(f=3;ffunction(t){let n=(t=`${t}`).length;return Wg(t,n-1)&&!Wg(t,n-2)&&(t=t.slice(0,-1)),"/"===t[0]?t:`/${t}`}(t(n,e,r)))),e=n.map(Gg),i=new Set(n).add("");for(const t of e)i.has(t)||(i.add(t),n.push(t),e.push(Gg(t)),h.push($g));d=(t,e)=>n[e],p=(t,n)=>e[n]}for(a=0,i=h.length;a=0&&(f=h[t],f.data===$g);--t)f.data=null}if(u.parent=Yg,u.eachBefore((function(t){t.depth=t.parent.depth+1,--i})).eachBefore(lg),u.parent=null,i>0)throw new Error("cycle");return u}return r.id=function(t){return arguments.length?(n=dg(t),r):n},r.parentId=function(t){return arguments.length?(e=dg(t),r):e},r.path=function(n){return arguments.length?(t=dg(n),r):t},r}function Gg(t){let n=t.length;if(n<2)return"";for(;--n>1&&!Wg(t,n););return t.slice(0,n)}function Wg(t,n){if("/"===t[n]){let e=0;for(;n>0&&"\\"===t[--n];)++e;if(0==(1&e))return!0}return!1}function Zg(t,n){return t.parent===n.parent?1:2}function Kg(t){var n=t.children;return n?n[0]:t.t}function Qg(t){var n=t.children;return n?n[n.length-1]:t.t}function Jg(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function tv(t,n,e){return t.a.parent===n.parent?t.a:e}function nv(t,n){this._=t,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=n}function ev(){var t=Zg,n=1,e=1,r=null;function i(i){var c=function(t){for(var n,e,r,i,o,a=new nv(t,0),u=[a];n=u.pop();)if(r=n._.children)for(n.children=new Array(o=r.length),i=o-1;i>=0;--i)u.push(e=n.children[i]=new nv(r[i],i)),e.parent=n;return(a.parent=new nv(null,0)).children=[a],a}(i);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)i.eachBefore(u);else{var f=i,s=i,l=i;i.eachBefore((function(t){t.xs.x&&(s=t),t.depth>l.depth&&(l=t)}));var h=f===s?1:t(f,s)/2,d=h-f.x,p=n/(s.x+h+d),y=e/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*y}))}return i}function o(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){!function(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)(n=i[o]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var o=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-o):n.z=o}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,o=n,a=n,u=e,c=o.parent.children[0],f=o.m,s=a.m,l=u.m,h=c.m;u=Qg(u),o=Kg(o),u&&o;)c=Kg(c),(a=Qg(a)).a=n,(i=u.z+l-o.z-f+t(u._,o._))>0&&(Jg(tv(u,n,r),n,i),f+=i,s+=i),l+=u.m,f+=o.m,h+=c.m,s+=a.m;u&&!Qg(a)&&(a.t=u,a.m+=l-s),o&&!Kg(c)&&(c.t=o,c.m+=f-h,r=n)}return r}(n,i,n.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(t){t.x*=n,t.y=t.depth*e}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i}function rv(t,n,e,r,i){for(var o,a=t.children,u=-1,c=a.length,f=t.value&&(i-e)/t.value;++uh&&(h=u),g=s*s*y,(d=Math.max(h/g,g/l))>p){s-=u;break}p=d}v.push(a={value:s,dice:c1?n:1)},e}(iv);function uv(){var t=av,n=!1,e=1,r=1,i=[0],o=yg,a=yg,u=yg,c=yg,f=yg;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(Fg),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l=e-1){var s=u[n];return s.x0=i,s.y0=o,s.x1=a,void(s.y1=c)}for(var l=f[n],h=r/2+l,d=n+1,p=e-1;d>>1;f[y]c-o){var b=r?(i*v+a*g)/r:a;t(n,d,g,i,o,b,c),t(d,e,v,b,o,a,c)}else{var _=r?(o*v+c*g)/r:c;t(n,d,g,i,o,a,_),t(d,e,v,i,_,a,c)}}(0,c,t.value,n,e,r,i)}function fv(t,n,e,r,i){(1&t.depth?rv:Bg)(t,n,e,r,i)}const sv=function t(n){function e(t,e,r,i,o){if((a=t._squarify)&&a.ratio===n)for(var a,u,c,f,s,l=-1,h=a.length,d=t.value;++l1?n:1)},e}(iv);function lv(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}function hv(t,n){var e=Ci(+t,+n);return function(t){var n=e(t);return n-360*Math.floor(n/360)}}function dv(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}function pv(t){return((t=Math.exp(t))+1/t)/2}const yv=function t(n,e,r){function i(t,i){var o,a,u=t[0],c=t[1],f=t[2],s=i[0],l=i[1],h=i[2],d=s-u,p=l-c,y=d*d+p*p;if(y<1e-12)a=Math.log(h/f)/n,o=function(t){return[u+t*d,c+t*p,f*Math.exp(n*t*a)]};else{var g=Math.sqrt(y),v=(h*h-f*f+r*y)/(2*f*e*g),b=(h*h-f*f-r*y)/(2*h*e*g),_=Math.log(Math.sqrt(v*v+1)-v),m=Math.log(Math.sqrt(b*b+1)-b);a=(m-_)/n,o=function(t){var r,i=t*a,o=pv(_),s=f/(e*g)*(o*(r=n*i+_,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(_));return[u+s*d,c+s*p,f*o/pv(n*i+_)]}}return o.duration=1e3*a*n/Math.SQRT2,o}return i.rho=function(n){var e=Math.max(.001,+n),r=e*e;return t(e,r,r*r)},i}(Math.SQRT2,2,4);function gv(t){return function(n,e){var r=t((n=xi(n)).h,(e=xi(e)).h),i=Oi(n.s,e.s),o=Oi(n.l,e.l),a=Oi(n.opacity,e.opacity);return function(t){return n.h=r(t),n.s=i(t),n.l=o(t),n.opacity=a(t),n+""}}}const vv=gv(Ci);var bv=gv(Oi);function _v(t,n){var e=Oi((t=zu(t)).l,(n=zu(n)).l),r=Oi(t.a,n.a),i=Oi(t.b,n.b),o=Oi(t.opacity,n.opacity);return function(n){return t.l=e(n),t.a=r(n),t.b=i(n),t.opacity=o(n),t+""}}function mv(t){return function(n,e){var r=t((n=Yu(n)).h,(e=Yu(e)).h),i=Oi(n.c,e.c),o=Oi(n.l,e.l),a=Oi(n.opacity,e.opacity);return function(t){return n.h=r(t),n.c=i(t),n.l=o(t),n.opacity=a(t),n+""}}}const xv=mv(Ci);var wv=mv(Oi);function Mv(t){return function n(e){function r(n,r){var i=t((n=tc(n)).h,(r=tc(r)).h),o=Oi(n.s,r.s),a=Oi(n.l,r.l),u=Oi(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=a(Math.pow(t,e)),n.opacity=u(t),n+""}}return e=+e,r.gamma=n,r}(1)}const Tv=Mv(Ci);var Av=Mv(Oi);function Sv(t,n){void 0===n&&(n=t,t=Vi);for(var e=0,r=n.length-1,i=n[0],o=new Array(r<0?0:r);e1&&(o=t[e[i-2]],a=t[e[i-1]],u=t[r],(a[0]-o[0])*(u[1]-o[1])-(a[1]-o[1])*(u[0]-o[0])<=0);)--i;e[i++]=r}var o,a,u;return e.slice(0,i)}function Ov(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n=0;--n)f.push(t[r[o[n]][2]]);for(n=+u;nu!=f>u&&a<(c-e)*(u-r)/(f-r)+e&&(s=!s),c=e,f=r;return s}function zv(t){for(var n,e,r=-1,i=t.length,o=t[i-1],a=o[0],u=o[1],c=0;++r1);return t+e*o*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(Rv),Fv=function t(n){var e=Iv.source(n);function r(){var t=e.apply(this,arguments);return function(){return Math.exp(t())}}return r.source=t,r}(Rv),Bv=function t(n){function e(t){return(t=+t)<=0?()=>0:function(){for(var e=0,r=t;r>1;--r)e+=n();return e+r*n()}}return e.source=t,e}(Rv),Uv=function t(n){var e=Bv.source(n);function r(t){if(0==(t=+t))return n;var r=e(t);return function(){return r()/t}}return r.source=t,r}(Rv),Yv=function t(n){function e(t){return function(){return-Math.log1p(-n())/t}}return e.source=t,e}(Rv),Lv=function t(n){function e(t){if((t=+t)<0)throw new RangeError("invalid alpha");return t=1/-t,function(){return Math.pow(1-n(),t)}}return e.source=t,e}(Rv),$v=function t(n){function e(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return function(){return Math.floor(n()+t)}}return e.source=t,e}(Rv),Hv=function t(n){function e(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return 0===t?()=>1/0:1===t?()=>1:(t=Math.log1p(-t),function(){return 1+Math.floor(Math.log1p(-n())/t)})}return e.source=t,e}(Rv),Xv=function t(n){var e=Iv.source(n)();function r(t,r){if((t=+t)<0)throw new RangeError("invalid k");if(0===t)return()=>0;if(r=null==r?1:+r,1===t)return()=>-Math.log1p(-n())*r;var i=(t<1?t+1:t)-1/3,o=1/(3*Math.sqrt(i)),a=t<1?()=>Math.pow(n(),1/t):()=>1;return function(){do{do{var t=e(),u=1+o*t}while(u<=0);u*=u*u;var c=1-n()}while(c>=1-.0331*t*t*t*t&&Math.log(c)>=.5*t*t+i*(1-u+Math.log(u)));return i*u*a()*r}}return r.source=t,r}(Rv),Vv=function t(n){var e=Xv.source(n);function r(t,n){var r=e(t),i=e(n);return function(){var t=r();return 0===t?0:t/(t+i())}}return r.source=t,r}(Rv),Gv=function t(n){var e=Hv.source(n),r=Vv.source(n);function i(t,n){return t=+t,(n=+n)>=1?()=>t:n<=0?()=>0:function(){for(var i=0,o=t,a=n;o*a>16&&o*(1-a)>16;){var u=Math.floor((o+1)*a),c=r(u,o-u+1)();c<=a?(i+=u,o-=u,a=(a-c)/(1-c)):(o=u-1,a/=c)}for(var f=a<.5,s=e(f?a:1-a),l=s(),h=0;l<=o;++h)l+=s();return i+(f?h:o-h)}}return i.source=t,i}(Rv),Wv=function t(n){function e(t,e,r){var i;return 0==(t=+t)?i=t=>-Math.log(t):(t=1/t,i=n=>Math.pow(n,t)),e=null==e?0:+e,r=null==r?1:+r,function(){return e+r*i(-Math.log1p(-n()))}}return e.source=t,e}(Rv),Zv=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,function(){return t+e*Math.tan(Math.PI*n())}}return e.source=t,e}(Rv),Kv=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,function(){var r=n();return t+e*Math.log(r/(1-r))}}return e.source=t,e}(Rv),Qv=function t(n){var e=Xv.source(n),r=Gv.source(n);function i(t){return function(){for(var i=0,o=t;o>16;){var a=Math.floor(.875*o),u=e(a)();if(u>o)return i+r(a-1,o/u)();i+=a,o-=u}for(var c=-Math.log1p(-n()),f=0;c<=o;++f)c-=Math.log1p(-n());return i+f}}return i.source=t,i}(Rv),Jv=1/4294967296;function tb(t=Math.random()){let n=0|(0<=t&&t<1?t/Jv:Math.abs(t));return()=>(n=1664525*n+1013904223|0,Jv*(n>>>0))}function nb(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function eb(t,n){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof n?this.interpolator(n):this.range(n)}return this}const rb=Symbol("implicit");function ib(){var t=new Pt,n=[],e=[],r=rb;function i(i){let o=t.get(i);if(void 0===o){if(r!==rb)return r;t.set(i,o=n.push(i)-1)}return e[o%e.length]}return i.domain=function(e){if(!arguments.length)return n.slice();n=[],t=new Pt;for(const r of e)t.has(r)||t.set(r,n.push(r)-1);return i},i.range=function(t){return arguments.length?(e=Array.from(t),i):e.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return ib(n,e).unknown(r)},nb.apply(i,arguments),i}function ob(){var t,n,e=ib().unknown(void 0),r=e.domain,i=e.range,o=0,a=1,u=!1,c=0,f=0,s=.5;function l(){var e=r().length,l=an&&(e=t,t=n,n=e),f=function(e){return Math.max(t,Math.min(n,e))}),r=c>2?db:hb,i=o=null,l}function l(n){return null==n||isNaN(n=+n)?e:(i||(i=r(a.map(t),u,c)))(t(f(n)))}return l.invert=function(e){return f(n((o||(o=r(u,a.map(t),Yi)))(e)))},l.domain=function(t){return arguments.length?(a=Array.from(t,cb),s()):a.slice()},l.range=function(t){return arguments.length?(u=Array.from(t),s()):u.slice()},l.rangeRound=function(t){return u=Array.from(t),c=dv,s()},l.clamp=function(t){return arguments.length?(f=!!t||sb,s()):f!==sb},l.interpolate=function(t){return arguments.length?(c=t,s()):c},l.unknown=function(t){return arguments.length?(e=t,l):e},function(e,r){return t=e,n=r,s()}}function gb(){return yb()(sb,sb)}function vb(t,n,e,r){var i,o=cn(t,n,e);switch((r=Xs(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(n));return null!=r.precision||isNaN(i=ol(o,a))||(r.precision=i),Js(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=al(o,Math.max(Math.abs(t),Math.abs(n))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=il(o))||(r.precision=i-2*("%"===r.type))}return Qs(r)}function bb(t){var n=t.domain;return t.ticks=function(t){var e=n();return an(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return vb(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i,o=n(),a=0,u=o.length-1,c=o[a],f=o[u],s=10;for(f0;){if((i=un(c,f,e))===r)return o[a]=c,o[u]=f,n(o);if(i>0)c=Math.floor(c/i)*i,f=Math.ceil(f/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,f=Math.floor(f*i)/i}r=i}return t},t}function _b(){var t=gb();return t.copy=function(){return pb(t,_b())},nb.apply(t,arguments),bb(t)}function mb(t){var n;function e(t){return null==t||isNaN(t=+t)?n:t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=Array.from(n,cb),e):t.slice()},e.unknown=function(t){return arguments.length?(n=t,e):n},e.copy=function(){return mb(t).unknown(n)},t=arguments.length?Array.from(t,cb):[0,1],bb(e)}function xb(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a-t(-n,e)}function kb(t){const n=t(wb,Mb),e=n.domain;let r,i,o=10;function a(){return r=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),n=>Math.log(n)/t)}(o),i=function(t){return 10===t?Sb:t===Math.E?Math.exp:n=>Math.pow(t,n)}(o),e()[0]<0?(r=Eb(r),i=Eb(i),t(Tb,Ab)):t(wb,Mb),n}return n.base=function(t){return arguments.length?(o=+t,a()):o},n.domain=function(t){return arguments.length?(e(t),a()):e()},n.ticks=t=>{const n=e();let a=n[0],u=n[n.length-1];const c=u0){for(;l<=h;++l)for(f=1;fu)break;p.push(s)}}else for(;l<=h;++l)for(f=o-1;f>=1;--f)if(s=l>0?f/i(-l):f*i(l),!(su)break;p.push(s)}2*p.length{if(null==t&&(t=10),null==e&&(e=10===o?"s":","),"function"!=typeof e&&(o%1||null!=(e=Xs(e)).precision||(e.trim=!0),e=Qs(e)),t===1/0)return e;const a=Math.max(1,o*t/n.ticks().length);return t=>{let n=t/i(Math.round(r(t)));return n*oe(xb(e(),{floor:t=>i(Math.floor(r(t))),ceil:t=>i(Math.ceil(r(t)))})),n}function Nb(){const t=kb(yb()).domain([1,10]);return t.copy=()=>pb(t,Nb()).base(t.base()),nb.apply(t,arguments),t}function Pb(t){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/t))}}function Cb(t){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*t}}function Ob(t){var n=1,e=t(Pb(n),Cb(n));return e.constant=function(e){return arguments.length?t(Pb(n=+e),Cb(n)):n},bb(e)}function jb(){var t=Ob(yb());return t.copy=function(){return pb(t,jb()).constant(t.constant())},nb.apply(t,arguments)}function zb(t){return function(n){return n<0?-Math.pow(-n,t):Math.pow(n,t)}}function Rb(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Db(t){return t<0?-t*t:t*t}function qb(t){var n=t(sb,sb),e=1;function r(){return 1===e?t(sb,sb):.5===e?t(Rb,Db):t(zb(e),zb(1/e))}return n.exponent=function(t){return arguments.length?(e=+t,r()):e},bb(n)}function Ib(){var t=qb(yb());return t.copy=function(){return pb(t,Ib()).exponent(t.exponent())},nb.apply(t,arguments),t}function Fb(){return Ib.apply(null,arguments).exponent(.5)}function Bb(t){return Math.sign(t)*t*t}function Ub(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Yb(){var t,n=gb(),e=[0,1],r=!1;function i(e){var i=Ub(n(e));return isNaN(i)?t:r?Math.round(i):i}return i.invert=function(t){return n.invert(Bb(t))},i.domain=function(t){return arguments.length?(n.domain(t),i):n.domain()},i.range=function(t){return arguments.length?(n.range((e=Array.from(t,cb)).map(Bb)),i):e.slice()},i.rangeRound=function(t){return i.range(t).round(!0)},i.round=function(t){return arguments.length?(r=!!t,i):r},i.clamp=function(t){return arguments.length?(n.clamp(t),i):n.clamp()},i.unknown=function(n){return arguments.length?(t=n,i):t},i.copy=function(){return Yb(n.domain(),e).round(r).clamp(n.clamp()).unknown(t)},nb.apply(i,arguments),bb(i)}function Lb(){var t,n=[],e=[],r=[];function i(){var t=0,i=Math.max(1,e.length);for(r=new Array(i-1);++t0?r[i-1]:n[0],i=r?[i[r-1],e]:[i[a-1],i[a]]},a.unknown=function(n){return arguments.length?(t=n,a):a},a.thresholds=function(){return i.slice()},a.copy=function(){return $b().domain([n,e]).range(o).unknown(t)},nb.apply(bb(a),arguments)}function Hb(){var t,n=[.5],e=[0,1],r=1;function i(i){return null!=i&&i<=i?e[st(n,i,0,r)]:t}return i.domain=function(t){return arguments.length?(n=Array.from(t),r=Math.min(n.length,e.length-1),i):n.slice()},i.range=function(t){return arguments.length?(e=Array.from(t),r=Math.min(n.length,e.length-1),i):e.slice()},i.invertExtent=function(t){var r=e.indexOf(t);return[n[r-1],n[r]]},i.unknown=function(n){return arguments.length?(t=n,i):t},i.copy=function(){return Hb().domain(n).range(e).unknown(t)},nb.apply(i,arguments)}const Xb=1e3,Vb=6e4,Gb=36e5,Wb=864e5,Zb=6048e5,Kb=31536e6;var Qb=new Date,Jb=new Date;function t_(t,n,e,r){function i(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return i.floor=function(n){return t(n=new Date(+n)),n},i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n0))return u;do{u.push(a=new Date(+e)),n(e,o),t(e)}while(a=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););}))},e&&(i.count=function(n,r){return Qb.setTime(+n),Jb.setTime(+r),t(Qb),t(Jb),Math.floor(e(Qb,Jb))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}var n_=t_((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));n_.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?t_((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):n_:null};const e_=n_;var r_=n_.range,i_=t_((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,n){t.setTime(+t+n*Xb)}),(function(t,n){return(n-t)/Xb}),(function(t){return t.getUTCSeconds()}));const o_=i_;var a_=i_.range,u_=t_((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Xb)}),(function(t,n){t.setTime(+t+n*Vb)}),(function(t,n){return(n-t)/Vb}),(function(t){return t.getMinutes()}));const c_=u_;var f_=u_.range,s_=t_((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Xb-t.getMinutes()*Vb)}),(function(t,n){t.setTime(+t+n*Gb)}),(function(t,n){return(n-t)/Gb}),(function(t){return t.getHours()}));const l_=s_;var h_=s_.range,d_=t_((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Vb)/Wb),(t=>t.getDate()-1));const p_=d_;var y_=d_.range;function g_(t){return t_((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Vb)/Zb}))}var v_=g_(0),b_=g_(1),__=g_(2),m_=g_(3),x_=g_(4),w_=g_(5),M_=g_(6),T_=v_.range,A_=b_.range,S_=__.range,E_=m_.range,k_=x_.range,N_=w_.range,P_=M_.range,C_=t_((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));const O_=C_;var j_=C_.range,z_=t_((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));z_.every=function(t){return isFinite(t=Math.floor(t))&&t>0?t_((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,e){n.setFullYear(n.getFullYear()+e*t)})):null};const R_=z_;var D_=z_.range,q_=t_((function(t){t.setUTCSeconds(0,0)}),(function(t,n){t.setTime(+t+n*Vb)}),(function(t,n){return(n-t)/Vb}),(function(t){return t.getUTCMinutes()}));const I_=q_;var F_=q_.range,B_=t_((function(t){t.setUTCMinutes(0,0,0)}),(function(t,n){t.setTime(+t+n*Gb)}),(function(t,n){return(n-t)/Gb}),(function(t){return t.getUTCHours()}));const U_=B_;var Y_=B_.range,L_=t_((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/Wb}),(function(t){return t.getUTCDate()-1}));const $_=L_;var H_=L_.range;function X_(t){return t_((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/Zb}))}var V_=X_(0),G_=X_(1),W_=X_(2),Z_=X_(3),K_=X_(4),Q_=X_(5),J_=X_(6),tm=V_.range,nm=G_.range,em=W_.range,rm=Z_.range,im=K_.range,om=Q_.range,am=J_.range,um=t_((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCMonth(t.getUTCMonth()+n)}),(function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}));const cm=um;var fm=um.range,sm=t_((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));sm.every=function(t){return isFinite(t=Math.floor(t))&&t>0?t_((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null};const lm=sm;var hm=sm.range;function dm(t,n,e,r,i,o){const a=[[o_,1,Xb],[o_,5,5e3],[o_,15,15e3],[o_,30,3e4],[o,1,Vb],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,Gb],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,Wb],[r,2,1728e5],[e,1,Zb],[n,1,2592e6],[n,3,7776e6],[t,1,Kb]];function u(n,e,r){const i=Math.abs(e-n)/r,o=et((([,,t])=>t)).right(a,i);if(o===a.length)return t.every(cn(n/Kb,e/Kb,r));if(0===o)return e_.every(Math.max(cn(n,e,r),1));const[u,c]=a[i/a[o-1][2]=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Yx,s:Lx,S:fx,u:sx,U:lx,V:dx,w:px,W:yx,x:null,X:null,y:gx,Y:bx,Z:mx,"%":Ux},m={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:xx,e:xx,f:Sx,g:qx,G:Fx,H:wx,I:Mx,j:Tx,L:Ax,m:Ex,M:kx,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Yx,s:Lx,S:Nx,u:Px,U:Cx,V:jx,w:zx,W:Rx,x:null,X:null,y:Dx,Y:Ix,Z:Bx,"%":Ux},x={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p.get(r[0].toLowerCase()),e+r[0].length):-1},A:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h.get(r[0].toLowerCase()),e+r[0].length):-1},b:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=b.get(r[0].toLowerCase()),e+r[0].length):-1},B:function(t,n,e){var r=y.exec(n.slice(e));return r?(t.m=g.get(r[0].toLowerCase()),e+r[0].length):-1},c:function(t,e,r){return T(t,n,e,r)},d:Hm,e:Hm,f:Km,g:Um,G:Bm,H:Vm,I:Vm,j:Xm,L:Zm,m:$m,M:Gm,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s.get(r[0].toLowerCase()),e+r[0].length):-1},q:Lm,Q:Jm,s:tx,S:Wm,u:Dm,U:qm,V:Im,w:Rm,W:Fm,x:function(t,n,r){return T(t,e,n,r)},X:function(t,n,e){return T(t,r,n,e)},y:Um,Y:Bm,Z:Ym,"%":Qm};function w(t,n){return function(e){var r,i,o,a=[],u=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++u53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=_m(mm(o.y,0,1))).getUTCDay(),r=i>4||0===i?G_.ceil(r):G_(r),r=$_.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=bm(mm(o.y,0,1))).getDay(),r=i>4||0===i?b_.ceil(r):b_(r),r=p_.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?_m(mm(o.y,0,1)).getUTCDay():bm(mm(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,_m(o)):bm(o)}}function T(t,n,e,r){for(var i,o,a=0,u=n.length,c=e.length;a=c)return-1;if(37===(i=n.charCodeAt(a++))){if(i=n.charAt(a++),!(o=x[i in Em?n.charAt(a++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return _.x=w(e,_),_.X=w(r,_),_.c=w(n,_),m.x=w(e,m),m.X=w(r,m),m.c=w(n,m),{format:function(t){var n=w(t+="",_);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=w(t+="",m);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t+="",!0);return n.toString=function(){return t},n}}}var wm,Mm,Tm,Am,Sm,Em={"-":"",_:" ",0:"0"},km=/^\s*\d+/,Nm=/^%/,Pm=/[\\^$*+?|[\]().{}]/g;function Cm(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o[t.toLowerCase(),n])))}function Rm(t,n,e){var r=km.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function Dm(t,n,e){var r=km.exec(n.slice(e,e+1));return r?(t.u=+r[0],e+r[0].length):-1}function qm(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.U=+r[0],e+r[0].length):-1}function Im(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.V=+r[0],e+r[0].length):-1}function Fm(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.W=+r[0],e+r[0].length):-1}function Bm(t,n,e){var r=km.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function Um(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function Ym(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function Lm(t,n,e){var r=km.exec(n.slice(e,e+1));return r?(t.q=3*r[0]-3,e+r[0].length):-1}function $m(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Hm(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Xm(t,n,e){var r=km.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function Vm(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function Gm(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function Wm(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function Zm(t,n,e){var r=km.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function Km(t,n,e){var r=km.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function Qm(t,n,e){var r=Nm.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function Jm(t,n,e){var r=km.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function tx(t,n,e){var r=km.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function nx(t,n){return Cm(t.getDate(),n,2)}function ex(t,n){return Cm(t.getHours(),n,2)}function rx(t,n){return Cm(t.getHours()%12||12,n,2)}function ix(t,n){return Cm(1+p_.count(R_(t),t),n,3)}function ox(t,n){return Cm(t.getMilliseconds(),n,3)}function ax(t,n){return ox(t,n)+"000"}function ux(t,n){return Cm(t.getMonth()+1,n,2)}function cx(t,n){return Cm(t.getMinutes(),n,2)}function fx(t,n){return Cm(t.getSeconds(),n,2)}function sx(t){var n=t.getDay();return 0===n?7:n}function lx(t,n){return Cm(v_.count(R_(t)-1,t),n,2)}function hx(t){var n=t.getDay();return n>=4||0===n?x_(t):x_.ceil(t)}function dx(t,n){return t=hx(t),Cm(x_.count(R_(t),t)+(4===R_(t).getDay()),n,2)}function px(t){return t.getDay()}function yx(t,n){return Cm(b_.count(R_(t)-1,t),n,2)}function gx(t,n){return Cm(t.getFullYear()%100,n,2)}function vx(t,n){return Cm((t=hx(t)).getFullYear()%100,n,2)}function bx(t,n){return Cm(t.getFullYear()%1e4,n,4)}function _x(t,n){var e=t.getDay();return Cm((t=e>=4||0===e?x_(t):x_.ceil(t)).getFullYear()%1e4,n,4)}function mx(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Cm(n/60|0,"0",2)+Cm(n%60,"0",2)}function xx(t,n){return Cm(t.getUTCDate(),n,2)}function wx(t,n){return Cm(t.getUTCHours(),n,2)}function Mx(t,n){return Cm(t.getUTCHours()%12||12,n,2)}function Tx(t,n){return Cm(1+$_.count(lm(t),t),n,3)}function Ax(t,n){return Cm(t.getUTCMilliseconds(),n,3)}function Sx(t,n){return Ax(t,n)+"000"}function Ex(t,n){return Cm(t.getUTCMonth()+1,n,2)}function kx(t,n){return Cm(t.getUTCMinutes(),n,2)}function Nx(t,n){return Cm(t.getUTCSeconds(),n,2)}function Px(t){var n=t.getUTCDay();return 0===n?7:n}function Cx(t,n){return Cm(V_.count(lm(t)-1,t),n,2)}function Ox(t){var n=t.getUTCDay();return n>=4||0===n?K_(t):K_.ceil(t)}function jx(t,n){return t=Ox(t),Cm(K_.count(lm(t),t)+(4===lm(t).getUTCDay()),n,2)}function zx(t){return t.getUTCDay()}function Rx(t,n){return Cm(G_.count(lm(t)-1,t),n,2)}function Dx(t,n){return Cm(t.getUTCFullYear()%100,n,2)}function qx(t,n){return Cm((t=Ox(t)).getUTCFullYear()%100,n,2)}function Ix(t,n){return Cm(t.getUTCFullYear()%1e4,n,4)}function Fx(t,n){var e=t.getUTCDay();return Cm((t=e>=4||0===e?K_(t):K_.ceil(t)).getUTCFullYear()%1e4,n,4)}function Bx(){return"+0000"}function Ux(){return"%"}function Yx(t){return+t}function Lx(t){return Math.floor(+t/1e3)}function $x(t){return wm=xm(t),Mm=wm.format,Tm=wm.parse,Am=wm.utcFormat,Sm=wm.utcParse,wm}function Hx(t){return new Date(t)}function Xx(t){return t instanceof Date?+t:+new Date(+t)}function Vx(t,n,e,r,i,o,a,u,c,f){var s=gb(),l=s.invert,h=s.domain,d=f(".%L"),p=f(":%S"),y=f("%I:%M"),g=f("%I %p"),v=f("%a %d"),b=f("%b %d"),_=f("%B"),m=f("%Y");function x(t){return(c(t)n(r/(t.length-1))))},e.quantiles=function(n){return Array.from({length:n+1},((e,r)=>_n(t,r/n)))},e.copy=function(){return rw(n).domain(t)},eb.apply(e,arguments)}function iw(){var t,n,e,r,i,o,a,u=0,c=.5,f=1,s=1,l=sb,h=!1;function d(t){return isNaN(t=+t)?a:(t=.5+((t=+o(t))-n)*(s*tRi(t[t.length-1]);var ww=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(sw);const Mw=xw(ww);var Tw=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(sw);const Aw=xw(Tw);var Sw=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(sw);const Ew=xw(Sw);var kw=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(sw);const Nw=xw(kw);var Pw=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(sw);const Cw=xw(Pw);var Ow=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(sw);const jw=xw(Ow);var zw=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(sw);const Rw=xw(zw);var Dw=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(sw);const qw=xw(Dw);var Iw=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(sw);const Fw=xw(Iw);var Bw=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(sw);const Uw=xw(Bw);var Yw=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(sw);const Lw=xw(Yw);var $w=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(sw);const Hw=xw($w);var Xw=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(sw);const Vw=xw(Xw);var Gw=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(sw);const Ww=xw(Gw);var Zw=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(sw);const Kw=xw(Zw);var Qw=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(sw);const Jw=xw(Qw);var tM=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(sw);const nM=xw(tM);var eM=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(sw);const rM=xw(eM);var iM=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(sw);const oM=xw(iM);var aM=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(sw);const uM=xw(aM);var cM=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(sw);const fM=xw(cM);var sM=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(sw);const lM=xw(sM);var hM=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(sw);const dM=xw(hM);var pM=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(sw);const yM=xw(pM);var gM=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(sw);const vM=xw(gM);var bM=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(sw);const _M=xw(bM);var mM=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(sw);const xM=xw(mM);function wM(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"}const MM=Av(tc(300,.5,0),tc(-240,.5,1));var TM=Av(tc(-100,.75,.35),tc(80,1.5,.8)),AM=Av(tc(260,.75,.35),tc(80,1.5,.8)),SM=tc();function EM(t){(t<0||t>1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return SM.h=360*t-100,SM.s=1.5-1.5*n,SM.l=.8-.9*n,SM+""}var kM=hi(),NM=Math.PI/3,PM=2*Math.PI/3;function CM(t){var n;return t=(.5-t)*Math.PI,kM.r=255*(n=Math.sin(t))*n,kM.g=255*(n=Math.sin(t+NM))*n,kM.b=255*(n=Math.sin(t+PM))*n,kM+""}function OM(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function jM(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}const zM=jM(sw("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var RM=jM(sw("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),DM=jM(sw("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),qM=jM(sw("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function IM(t){return qr(wr(t).call(document.documentElement))}var FM=0;function BM(){return new UM}function UM(){this._="@"+(++FM).toString(36)}function YM(t,n){return t.target&&(t=Gi(t),void 0===n&&(n=t.currentTarget),t=t.touches||[t]),Array.from(t,(t=>Wi(t,n)))}function LM(t){return"string"==typeof t?new zr([document.querySelectorAll(t)],[document.documentElement]):new zr([Te(t)],jr)}function $M(t){return function(){return t}}UM.prototype=BM.prototype={constructor:UM,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};const HM=Math.abs,XM=Math.atan2,VM=Math.cos,GM=Math.max,WM=Math.min,ZM=Math.sin,KM=Math.sqrt,QM=1e-12,JM=Math.PI,tT=JM/2,nT=2*JM;function eT(t){return t>1?0:t<-1?JM:Math.acos(t)}function rT(t){return t>=1?tT:t<=-1?-tT:Math.asin(t)}function iT(t){return t.innerRadius}function oT(t){return t.outerRadius}function aT(t){return t.startAngle}function uT(t){return t.endAngle}function cT(t){return t&&t.padAngle}function fT(t,n,e,r,i,o,a,u){var c=e-t,f=r-n,s=a-i,l=u-o,h=l*c-s*f;if(!(h*hP*P+C*C&&(T=S,A=E),{cx:T,cy:A,x01:-s,y01:-l,x11:T*(i/x-1),y11:A*(i/x-1)}}function lT(){var t=iT,n=oT,e=$M(0),r=null,i=aT,o=uT,a=cT,u=null;function c(){var c,f,s=+t.apply(this,arguments),l=+n.apply(this,arguments),h=i.apply(this,arguments)-tT,d=o.apply(this,arguments)-tT,p=HM(d-h),y=d>h;if(u||(u=c=hu()),lQM)if(p>nT-QM)u.moveTo(l*VM(h),l*ZM(h)),u.arc(0,0,l,h,d,!y),s>QM&&(u.moveTo(s*VM(d),s*ZM(d)),u.arc(0,0,s,d,h,y));else{var g,v,b=h,_=d,m=h,x=d,w=p,M=p,T=a.apply(this,arguments)/2,A=T>QM&&(r?+r.apply(this,arguments):KM(s*s+l*l)),S=WM(HM(l-s)/2,+e.apply(this,arguments)),E=S,k=S;if(A>QM){var N=rT(A/s*ZM(T)),P=rT(A/l*ZM(T));(w-=2*N)>QM?(m+=N*=y?1:-1,x-=N):(w=0,m=x=(h+d)/2),(M-=2*P)>QM?(b+=P*=y?1:-1,_-=P):(M=0,b=_=(h+d)/2)}var C=l*VM(b),O=l*ZM(b),j=s*VM(x),z=s*ZM(x);if(S>QM){var R,D=l*VM(_),q=l*ZM(_),I=s*VM(m),F=s*ZM(m);if(pQM?k>QM?(g=sT(I,F,C,O,l,k,y),v=sT(D,q,j,z,l,k,y),u.moveTo(g.cx+g.x01,g.cy+g.y01),kQM&&w>QM?E>QM?(g=sT(j,z,D,q,s,-E,y),v=sT(C,O,I,F,s,-E,y),u.lineTo(g.cx+g.x01,g.cy+g.y01),E=s;--l)u.point(g[l],v[l]);u.lineEnd(),u.areaEnd()}y&&(g[f]=+t(h,f,c),v[f]=+n(h,f,c),u.point(r?+r(h,f,c):g[f],e?+e(h,f,c):v[f]))}if(d)return u=null,d+""||null}function f(){return bT().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?gT:$M(+t),n="function"==typeof n?n:$M(void 0===n?0:+n),e="function"==typeof e?e:void 0===e?vT:$M(+e),c.x=function(n){return arguments.length?(t="function"==typeof n?n:$M(+n),r=null,c):t},c.x0=function(n){return arguments.length?(t="function"==typeof n?n:$M(+n),c):t},c.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:$M(+t),c):r},c.y=function(t){return arguments.length?(n="function"==typeof t?t:$M(+t),e=null,c):n},c.y0=function(t){return arguments.length?(n="function"==typeof t?t:$M(+t),c):n},c.y1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:$M(+t),c):e},c.lineX0=c.lineY0=function(){return f().x(t).y(n)},c.lineY1=function(){return f().x(t).y(e)},c.lineX1=function(){return f().x(r).y(n)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:$M(!!t),c):i},c.curve=function(t){return arguments.length?(a=t,null!=o&&(u=a(o)),c):a},c.context=function(t){return arguments.length?(null==t?o=u=null:u=a(o=t),c):o},c}function mT(t,n){return nt?1:n>=t?0:NaN}function xT(t){return t}function wT(){var t=xT,n=mT,e=null,r=$M(0),i=$M(nT),o=$M(0);function a(a){var u,c,f,s,l,h=(a=dT(a)).length,d=0,p=new Array(h),y=new Array(h),g=+r.apply(this,arguments),v=Math.min(nT,Math.max(-nT,i.apply(this,arguments)-g)),b=Math.min(Math.abs(v)/h,o.apply(this,arguments)),_=b*(v<0?-1:1);for(u=0;u0&&(d+=l);for(null!=n?p.sort((function(t,e){return n(y[t],y[e])})):null!=e&&p.sort((function(t,n){return e(a[t],a[n])})),u=0,f=d?(v-h*_)/d:0;u0?l*f:0)+_,y[c]={data:a[c],index:u,value:l,startAngle:g,endAngle:s,padAngle:b};return y}return a.value=function(n){return arguments.length?(t="function"==typeof n?n:$M(+n),a):t},a.sortValues=function(t){return arguments.length?(n=t,e=null,a):n},a.sort=function(t){return arguments.length?(e=t,n=null,a):e},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:$M(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:$M(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:$M(+t),a):o},a}pT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var MT=AT(yT);function TT(t){this._curve=t}function AT(t){function n(n){return new TT(t(n))}return n._curve=t,n}function ST(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(AT(t)):n()._curve},t}function ET(){return ST(bT().curve(MT))}function kT(){var t=_T().curve(MT),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return ST(e())},delete t.lineX0,t.lineEndAngle=function(){return ST(r())},delete t.lineX1,t.lineInnerRadius=function(){return ST(i())},delete t.lineY0,t.lineOuterRadius=function(){return ST(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(AT(t)):n()._curve},t}function NT(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}TT.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};class PT{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}class CT{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,n){if(t=+t,n=+n,0==this._point++)this._x0=t,this._y0=n;else{const e=NT(this._x0,this._y0),r=NT(this._x0,this._y0=(this._y0+n)/2),i=NT(t,this._y0),o=NT(t,n);this._context.moveTo(...e),this._context.bezierCurveTo(...r,...i,...o)}}}function OT(t){return new PT(t,!0)}function jT(t){return new PT(t,!1)}function zT(t){return new CT(t)}function RT(t){return t.source}function DT(t){return t.target}function qT(t){let n=RT,e=DT,r=gT,i=vT,o=null,a=null;function u(){let u;const c=hT.call(arguments),f=n.apply(this,c),s=e.apply(this,c);if(null==o&&(a=t(u=hu())),a.lineStart(),c[0]=f,a.point(+r.apply(this,c),+i.apply(this,c)),c[0]=s,a.point(+r.apply(this,c),+i.apply(this,c)),a.lineEnd(),u)return a=null,u+""||null}return u.source=function(t){return arguments.length?(n=t,u):n},u.target=function(t){return arguments.length?(e=t,u):e},u.x=function(t){return arguments.length?(r="function"==typeof t?t:$M(+t),u):r},u.y=function(t){return arguments.length?(i="function"==typeof t?t:$M(+t),u):i},u.context=function(n){return arguments.length?(null==n?o=a=null:a=t(o=n),u):o},u}function IT(){return qT(OT)}function FT(){return qT(jT)}function BT(){const t=qT(zT);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const UT=KM(3),YT={draw(t,n){const e=.59436*KM(n+WM(n/28,.75)),r=e/2,i=r*UT;t.moveTo(0,e),t.lineTo(0,-e),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},LT={draw(t,n){const e=KM(n/JM);t.moveTo(e,0),t.arc(0,0,e,0,nT)}},$T={draw(t,n){const e=KM(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},HT=KM(1/3),XT=2*HT,VT={draw(t,n){const e=KM(n/XT),r=e*HT;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},GT={draw(t,n){const e=.62625*KM(n);t.moveTo(0,-e),t.lineTo(e,0),t.lineTo(0,e),t.lineTo(-e,0),t.closePath()}},WT={draw(t,n){const e=.87559*KM(n-WM(n/7,2));t.moveTo(-e,0),t.lineTo(e,0),t.moveTo(0,e),t.lineTo(0,-e)}},ZT={draw(t,n){const e=KM(n),r=-e/2;t.rect(r,r,e,e)}},KT={draw(t,n){const e=.4431*KM(n);t.moveTo(e,e),t.lineTo(e,-e),t.lineTo(-e,-e),t.lineTo(-e,e),t.closePath()}},QT=ZM(JM/10)/ZM(7*JM/10),JT=ZM(nT/10)*QT,tA=-VM(nT/10)*QT,nA={draw(t,n){const e=KM(.8908130915292852*n),r=JT*e,i=tA*e;t.moveTo(0,-e),t.lineTo(r,i);for(let n=1;n<5;++n){const o=nT*n/5,a=VM(o),u=ZM(o);t.lineTo(u*e,-a*e),t.lineTo(a*r-u*i,u*r+a*i)}t.closePath()}},eA=KM(3),rA={draw(t,n){const e=-KM(n/(3*eA));t.moveTo(0,2*e),t.lineTo(-eA*e,-e),t.lineTo(eA*e,-e),t.closePath()}},iA=KM(3),oA={draw(t,n){const e=.6824*KM(n),r=e/2,i=e*iA/2;t.moveTo(0,-e),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},aA=-.5,uA=KM(3)/2,cA=1/KM(12),fA=3*(cA/2+1),sA={draw(t,n){const e=KM(n/fA),r=e/2,i=e*cA,o=r,a=e*cA+e,u=-o,c=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(u,c),t.lineTo(aA*r-uA*i,uA*r+aA*i),t.lineTo(aA*o-uA*a,uA*o+aA*a),t.lineTo(aA*u-uA*c,uA*u+aA*c),t.lineTo(aA*r+uA*i,aA*i-uA*r),t.lineTo(aA*o+uA*a,aA*a-uA*o),t.lineTo(aA*u+uA*c,aA*c-uA*u),t.closePath()}},lA={draw(t,n){const e=.6189*KM(n-WM(n/6,1.7));t.moveTo(-e,-e),t.lineTo(e,e),t.moveTo(-e,e),t.lineTo(e,-e)}},hA=[LT,$T,VT,ZT,nA,rA,sA],dA=[LT,WT,lA,oA,YT,KT,GT];function pA(t,n){let e=null;function r(){let r;if(e||(e=r=hu()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),r)return e=null,r+""||null}return t="function"==typeof t?t:$M(t||LT),n="function"==typeof n?n:$M(void 0===n?64:+n),r.type=function(n){return arguments.length?(t="function"==typeof n?n:$M(n),r):t},r.size=function(t){return arguments.length?(n="function"==typeof t?t:$M(+t),r):n},r.context=function(t){return arguments.length?(e=null==t?null:t,r):e},r}function yA(){}function gA(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function vA(t){this._context=t}function bA(t){return new vA(t)}function _A(t){this._context=t}function mA(t){return new _A(t)}function xA(t){this._context=t}function wA(t){return new xA(t)}function MA(t,n){this._basis=new vA(t),this._beta=n}vA.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:gA(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);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:gA(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},_A.prototype={areaStart:yA,areaEnd:yA,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)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:gA(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},xA.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:gA(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},MA.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],o=n[0],a=t[e]-i,u=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*a),this._beta*n[c]+(1-this._beta)*(o+r*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};const TA=function t(n){function e(t){return 1===n?new vA(t):new MA(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function AA(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function SA(t,n){this._context=t,this._k=(1-n)/6}SA.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:AA(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:AA(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const EA=function t(n){function e(t){return new SA(t,n)}return e.tension=function(n){return t(+n)},e}(0);function kA(t,n){this._context=t,this._k=(1-n)/6}kA.prototype={areaStart:yA,areaEnd:yA,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)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:AA(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const NA=function t(n){function e(t){return new kA(t,n)}return e.tension=function(n){return t(+n)},e}(0);function PA(t,n){this._context=t,this._k=(1-n)/6}PA.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,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:AA(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const CA=function t(n){function e(t){return new PA(t,n)}return e.tension=function(n){return t(+n)},e}(0);function OA(t,n,e){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>QM){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>QM){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*f+t._x1*t._l23_2a-n*t._l12_2a)/s,a=(a*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function jA(t,n){this._context=t,this._alpha=n}jA.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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:OA(this,t,n)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const zA=function t(n){function e(t){return n?new jA(t,n):new SA(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function RA(t,n){this._context=t,this._alpha=n}RA.prototype={areaStart:yA,areaEnd:yA,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)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:OA(this,t,n)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const DA=function t(n){function e(t){return n?new RA(t,n):new kA(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function qA(t,n){this._context=t,this._alpha=n}qA.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,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:OA(this,t,n)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const IA=function t(n){function e(t){return n?new qA(t,n):new PA(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function FA(t){this._context=t}function BA(t){return new FA(t)}function UA(t){return t<0?-1:1}function YA(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(e-t._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(UA(o)+UA(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function LA(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function $A(t,n,e){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*n,o-u,a-u*e,o,a)}function HA(t){this._context=t}function XA(t){this._context=new VA(t)}function VA(t){this._context=t}function GA(t){return new HA(t)}function WA(t){return new XA(t)}function ZA(t){this._context=t}function KA(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(a[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n1)for(var e,r,i,o=1,a=t[n[0]],u=a.length;o=0;)e[n]=n;return e}function oS(t,n){return t[n]}function aS(t){const n=[];return n.key=t,n}function uS(){var t=$M([]),n=iS,e=rS,r=oS;function i(i){var o,a,u=Array.from(t.apply(this,arguments),aS),c=u.length,f=-1;for(const t of i)for(o=0,++f;o0){for(var e,r,i,o=0,a=t[0].length;o0)for(var e,r,i,o,a,u,c=0,f=t[n[0]].length;c0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)}function sS(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],o=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,a=1;ao&&(o=n,r=e);return r}function pS(t){var n=t.map(yS);return iS(t).sort((function(t,e){return n[t]-n[e]}))}function yS(t){for(var n,e=0,r=-1,i=t.length;++r=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var _S="%Y-%m-%dT%H:%M:%S.%LZ",mS=Date.prototype.toISOString?function(t){return t.toISOString()}:Am(_S);const xS=mS;var wS=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:Sm(_S);const MS=wS;function TS(t,n,e){var r=new co,i=n;return null==n?(r.restart(t,n,e),r):(r._restart=r.restart,r.restart=function(t,n,e){n=+n,e=null==e?ao():+e,r._restart((function o(a){a+=i,r._restart(o,i+=n,e),t(a)}),n,e)},r.restart(t,n,e),r)}const AS=t=>()=>t;function SS(t,{sourceEvent:n,target:e,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function ES(t,n,e){this.k=t,this.x=n,this.y=e}ES.prototype={constructor:ES,scale:function(t){return 1===t?this:new ES(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new ES(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var kS=new ES(1,0,0);function NS(t){for(;!t.__zoom;)if(!(t=t.parentNode))return kS;return t.__zoom}function PS(t){t.stopImmediatePropagation()}function CS(t){t.preventDefault(),t.stopImmediatePropagation()}function OS(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function jS(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function zS(){return this.__zoom||kS}function RS(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function DS(){return navigator.maxTouchPoints||"ontouchstart"in this}function qS(t,n,e){var r=t.invertX(n[0][0])-e[0][0],i=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],a=t.invertY(n[1][1])-e[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function IS(){var t,n,e,r=OS,i=jS,o=qS,a=RS,u=DS,c=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],s=250,l=yv,h=xe("start","zoom","end"),d=500,p=0,y=10;function g(t){t.property("__zoom",zS).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",T).on("dblclick.zoom",A).filter(u).on("touchstart.zoom",S).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(t,n){return(n=Math.max(c[0],Math.min(c[1],n)))===t.k?t:new ES(n,t.x,t.y)}function b(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new ES(t.k,r,i)}function _(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function m(t,n,e,r){t.on("start.zoom",(function(){x(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){x(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,o=arguments,a=x(t,o).event(r),u=i.apply(t,o),c=null==e?_(u):"function"==typeof e?e.apply(t,o):e,f=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),s=t.__zoom,h="function"==typeof n?n.apply(t,o):n,d=l(s.invert(c).concat(f/s.k),h.invert(c).concat(f/h.k));return function(t){if(1===t)t=h;else{var n=d(t),e=f/n[2];t=new ES(e,c[0]-n[0]*e,c[1]-n[1]*e)}a.zoom(null,t)}}))}function x(t,n,e){return!e&&t.__zooming||new w(t,n)}function w(t,n){this.that=t,this.args=n,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,n),this.taps=0}function M(t,...n){if(r.apply(this,arguments)){var e=x(this,n).event(t),i=this.__zoom,u=Math.max(c[0],Math.min(c[1],i.k*Math.pow(2,a.apply(this,arguments)))),s=Wi(t);if(e.wheel)e.mouse[0][0]===s[0]&&e.mouse[0][1]===s[1]||(e.mouse[1]=i.invert(e.mouse[0]=s)),clearTimeout(e.wheel);else{if(i.k===u)return;e.mouse=[s,i.invert(s)],wo(this),e.start()}CS(t),e.wheel=setTimeout(l,150),e.zoom("mouse",o(b(v(i,u),e.mouse[0],e.mouse[1]),e.extent,f))}function l(){e.wheel=null,e.end()}}function T(t,...n){if(!e&&r.apply(this,arguments)){var i=t.currentTarget,a=x(this,n,!0).event(t),u=qr(t.view).on("mousemove.zoom",h,!0).on("mouseup.zoom",d,!0),c=Wi(t,i),s=t.clientX,l=t.clientY;Yr(t.view),PS(t),a.mouse=[c,this.__zoom.invert(c)],wo(this),a.start()}function h(t){if(CS(t),!a.moved){var n=t.clientX-s,e=t.clientY-l;a.moved=n*n+e*e>p}a.event(t).zoom("mouse",o(b(a.that.__zoom,a.mouse[0]=Wi(t,i),a.mouse[1]),a.extent,f))}function d(t){u.on("mousemove.zoom mouseup.zoom",null),Lr(t.view,a.moved),CS(t),a.event(t).end()}}function A(t,...n){if(r.apply(this,arguments)){var e=this.__zoom,a=Wi(t.changedTouches?t.changedTouches[0]:t,this),u=e.invert(a),c=e.k*(t.shiftKey?.5:2),l=o(b(v(e,c),a,u),i.apply(this,n),f);CS(t),s>0?qr(this).transition().duration(s).call(m,l,a,t):qr(this).call(g.transform,l,a,t)}}function S(e,...i){if(r.apply(this,arguments)){var o,a,u,c,f=e.touches,s=f.length,l=x(this,i,e.changedTouches.length===s).event(e);for(PS(e),a=0;at.length)&&(n=t.length);for(var e=0,r=new Array(n);e0&&void 0!==arguments[0]?arguments[0]:"#root",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;BS(this,t),this.parentId=n,this.resources=r,this.d3=e,this.margin=10,this.actions={selection:{current:null,style:"2px solid hsl(205, 100%, 50%)",offset:"3px"},drag:{state:!1,deltaX:0,deltay:0}}}var n,r;return n=t,r=[{key:"draw",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.d3.select(this.parentId).selectAll(".component").data(n,(function(t){return t.id}));return this.initializeComponents(n,e),this.setViewPortAction(this.d3.select("#viewport")),n.forEach((function(n){t.setComponentAction(n)})),!0}},{key:"setViewPortAction",value:function(t){var n=this;t.on("mousedown",(function(){n.__unselectComponent()}))}},{key:"setComponentAction",value:function(t){var n=this,e=this.d3.select("#".concat(t.id));e.call(this.d3.drag().on("start",(function(r){n.__dragStart(r,t,e)})).on("drag",(function(r){n.__selectComponent(t.id),n.__dragPending(r,t,e)})).on("end",(function(t){n.actions.drag.state||n.__toggleComponentSelection(t.subject.id),n.__dragEnd(e)})))}},{key:"__dragStart",value:function(t,n,e){this.actions.drag.state=!1,this.d3.select("use").attr("xlink:href","#".concat(n.id)),this.actions.drag.deltaX=t.x-e.attr("x"),this.actions.drag.deltaY=t.y-e.attr("y"),e.attr("cursor","grabbing")}},{key:"__dragPending",value:function(t,n,e){this.actions.drag.state=!0;var r=t.x-this.actions.drag.deltaX,i=t.y-this.actions.drag.deltaY;e.attr("x",r).attr("y",i),n.drawOption.x=r,n.drawOption.y=i}},{key:"__dragEnd",value:function(t){t.attr("cursor","grab"),this.actions.drag.state=!1,this.actions.drag.deltaX=0,this.actions.drag.deltaY=0}},{key:"__unselectComponent",value:function(){this.actions.selection.current&&(this.d3.select("#".concat(this.actions.selection.current)).style("outline",""),this.actions.selection.current=null)}},{key:"__selectComponent",value:function(t){this.__unselectComponent(),this.d3.select("#".concat(t)).style("outline",this.actions.selection.style).style("outline-offset",this.actions.selection.offset),this.actions.selection.current=t}},{key:"__toggleComponentSelection",value:function(t){this.actions.selection.current===t?this.__unselectComponent():this.__selectComponent(t)}},{key:"initializeComponents",value:function(t,n){var e,r=this,i=t.filter((function(t){return!t.drawOption&&(t.drawOption=new O,!0)})),o={width:0,height:0},a=function(t){if(Array.isArray(t))return FS(t)}(e=new Set(t.map((function(t){return t.definition.model}))))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,n){if(t){if("string"==typeof t)return FS(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?FS(t,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=n.enter().append("svg");if(n.exit().remove(),u.attr("id",(function(t){return t.id})).attr("class",(function(t){return"component component-".concat(t.definition.model)})).html((function(t){return r.resources.models[t.definition.model]})),u.each((function(n,e,i){var a=t[e];r.storeComponentSize(i[e],a),a.drawOption.width>o.width&&(o.width=a.drawOption.width),a.drawOption.height>o.height&&(o.height=a.drawOption.height)})),i.length>0){var c=document.querySelector("#viewport").clientWidth;i.forEach((function(t,n){return r.setComponentPosition(t,n,c,o)}))}a.forEach((function(t){var n=r.d3.selectAll("".concat(r.parentId," .component-").concat(t));r["draw".concat(t)]?r["draw".concat(t)](n):r.drawDefaultModel(n)}))}},{key:"setComponentPosition",value:function(t,n,e,r){var i=r.width,o=r.height,a=parseInt(e/(i+this.margin),10),u=n%a,c=parseInt(n/a,10);t.drawOption.x=u*(i+this.margin),t.drawOption.y=c*(o+this.margin)}},{key:"storeComponentSize",value:function(t,n){var e=this.getComponentSize(t),r=e.width,i=e.height;n.drawOption.width=r,n.drawOption.height=i}},{key:"getComponentSize",value:function(t){var n=this.d3.select(t).node().getBBox();return{width:n.width,height:n.height}}},{key:"drawDefaultModel",value:function(t){var n=this;t.attr("x",(function(t){return t.drawOption.x})).attr("y",(function(t){return t.drawOption.y})).attr("cursor","grab"),t.select(".component-name").text((function(t){return t.name})),t.select(".component-type").text((function(t){return t.definition.type})),t.select(".component-icon").html((function(t){return n.resources.icons[t.definition.icon]}))}}],r&&US(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();const LS=YS;function $S(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:[];XS(this,t),this.definitions=n}var n,e;return n=t,e=[{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{components:t,links:t,errors:[]}}},{key:"isParsable",value:function(t){return null!=t}}],e&&VS(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),t}();function WS(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:"Error happened when trying to parse.",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"Error";return QS(this,o),(t=i.call(this,n)).name="ParseError",t.startLine=e,t.startColumn=r,t.endLine=a,t.endColumn=u,t.severity=c,t}return r=o,Object.defineProperty(r,"prototype",{writable:!1}),r}(tE(Error));var aE=exports;for(var uE in n)aE[uE]=n[uE];n.__esModule&&Object.defineProperty(aE,"__esModule",{value:!0})})(); \ No newline at end of file +(()=>{var t={316:(t,n,e)=>{"use strict";var r=e(287);t.exports=function(t,n){n=n||{};var e=new r,i=n.inPlace||!1,o=t.map((function(t){return i?t:{width:t.width,height:t.height,item:t}}));o=o.sort((function(t,n){return n.width*n.height-t.width*t.height})),e.fit(o);var a={width:o.reduce((function(t,n){return Math.max(t,n.x+n.width)}),0),height:o.reduce((function(t,n){return Math.max(t,n.y+n.height)}),0)};return i||(a.items=o),a}},287:t=>{var n=function(){};n.prototype={fit:function(t){var n,e,r,i,o=t.length,a=o>0?t[0].width:0,u=o>0?t[0].height:0;for(this.root={x:0,y:0,width:a,height:u},n=0;n=this.root.width+t,o=e&&this.root.width>=this.root.height+n;return i?this.growRight(t,n):o?this.growDown(t,n):r?this.growRight(t,n):e?this.growDown(t,n):null},growRight:function(t,n){var e;return this.root={used:!0,x:0,y:0,width:this.root.width+t,height:this.root.height,down:this.root,right:{x:this.root.width,y:0,width:t,height:this.root.height}},(e=this.findNode(this.root,t,n))?this.splitNode(e,t,n):null},growDown:function(t,n){var e;return this.root={used:!0,x:0,y:0,width:this.root.width,height:this.root.height+n,down:{x:0,y:this.root.height,width:this.root.width,height:n},right:this.root},(e=this.findNode(this.root,t,n))?this.splitNode(e,t,n):null}},t.exports=n}},n={};function e(r){var i=n[r];if(void 0!==i)return i.exports;var o=n[r]={exports:{}};return t[r](o,o.exports,e),o.exports}e.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},e.d=(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";e.r(r),e.d(r,{Component:()=>y,ComponentAttribute:()=>q,ComponentAttributeDefinition:()=>k,ComponentDefinition:()=>m,ComponentDrawOption:()=>C,ComponentLink:()=>V,DefaultDrawer:()=>HS,DefaultMetadata:()=>VS,DefaultParser:()=>ZS,DefaultRender:()=>QS,FileInformation:()=>u,FileInput:()=>J,ParseError:()=>uE});var t={};function n(t,n){for(var e=0;eEt,Delaunay:()=>Lc,FormatSpecifier:()=>Vs,InternMap:()=>Pt,InternSet:()=>Ot,Node:()=>hg,Voronoi:()=>qc,ZoomTransform:()=>ES,active:()=>da,arc:()=>lT,area:()=>_T,areaRadial:()=>kT,ascending:()=>tt,autoType:()=>mf,axisBottom:()=>de,axisLeft:()=>pe,axisRight:()=>he,axisTop:()=>le,bin:()=>ln,bisect:()=>st,bisectCenter:()=>ft,bisectLeft:()=>ct,bisectRight:()=>ut,bisector:()=>et,blob:()=>ts,blur:()=>lt,blur2:()=>ht,blurImage:()=>dt,brush:()=>$a,brushSelection:()=>Ua,brushX:()=>Ya,brushY:()=>La,buffer:()=>es,chord:()=>eu,chordDirected:()=>iu,chordTranspose:()=>ru,cluster:()=>og,color:()=>ci,contourDensity:()=>pc,contours:()=>sc,count:()=>bt,create:()=>FM,creator:()=>wr,cross:()=>wt,csv:()=>us,csvFormat:()=>uf,csvFormatBody:()=>cf,csvFormatRow:()=>sf,csvFormatRows:()=>ff,csvFormatValue:()=>lf,csvParse:()=>of,csvParseRows:()=>af,cubehelix:()=>tc,cumsum:()=>Mt,curveBasis:()=>bA,curveBasisClosed:()=>mA,curveBasisOpen:()=>wA,curveBumpX:()=>CT,curveBumpY:()=>jT,curveBundle:()=>TA,curveCardinal:()=>EA,curveCardinalClosed:()=>NA,curveCardinalOpen:()=>OA,curveCatmullRom:()=>zA,curveCatmullRomClosed:()=>DA,curveCatmullRomOpen:()=>FA,curveLinear:()=>yT,curveLinearClosed:()=>BA,curveMonotoneX:()=>GA,curveMonotoneY:()=>WA,curveNatural:()=>QA,curveStep:()=>tS,curveStepAfter:()=>eS,curveStepBefore:()=>nS,descending:()=>nt,deviation:()=>At,difference:()=>Wn,disjoint:()=>Zn,dispatch:()=>xe,drag:()=>Zc,dragDisable:()=>Yr,dragEnable:()=>Lr,dsv:()=>as,dsvFormat:()=>ef,easeBack:()=>Gf,easeBackIn:()=>Xf,easeBackInOut:()=>Gf,easeBackOut:()=>Vf,easeBounce:()=>Lf,easeBounceIn:()=>Yf,easeBounceInOut:()=>$f,easeBounceOut:()=>Lf,easeCircle:()=>Bf,easeCircleIn:()=>Ff,easeCircleInOut:()=>Bf,easeCircleOut:()=>If,easeCubic:()=>fa,easeCubicIn:()=>ua,easeCubicInOut:()=>fa,easeCubicOut:()=>ca,easeElastic:()=>Kf,easeElasticIn:()=>Zf,easeElasticInOut:()=>Qf,easeElasticOut:()=>Kf,easeExp:()=>qf,easeExpIn:()=>Rf,easeExpInOut:()=>qf,easeExpOut:()=>Df,easeLinear:()=>wf,easePoly:()=>kf,easePolyIn:()=>Sf,easePolyInOut:()=>kf,easePolyOut:()=>Ef,easeQuad:()=>Af,easeQuadIn:()=>Mf,easeQuadInOut:()=>Af,easeQuadOut:()=>Tf,easeSin:()=>jf,easeSinIn:()=>Of,easeSinInOut:()=>jf,easeSinOut:()=>Cf,every:()=>Ln,extent:()=>St,fcumsum:()=>Nt,filter:()=>Hn,flatGroup:()=>Bt,flatRollup:()=>Ut,forceCenter:()=>gs,forceCollide:()=>Ns,forceLink:()=>Cs,forceManyBody:()=>Fs,forceRadial:()=>Is,forceSimulation:()=>qs,forceX:()=>Bs,forceY:()=>Us,format:()=>Qs,formatDefaultLocale:()=>rl,formatLocale:()=>el,formatPrefix:()=>Js,formatSpecifier:()=>Xs,fsum:()=>kt,geoAlbers:()=>my,geoAlbersUsa:()=>xy,geoArea:()=>uh,geoAzimuthalEqualArea:()=>Ay,geoAzimuthalEqualAreaRaw:()=>Ty,geoAzimuthalEquidistant:()=>Ey,geoAzimuthalEquidistantRaw:()=>Sy,geoBounds:()=>Yh,geoCentroid:()=>td,geoCircle:()=>ld,geoClipAntimeridian:()=>wd,geoClipCircle:()=>Md,geoClipExtent:()=>Od,geoClipRectangle:()=>Pd,geoConicConformal:()=>jy,geoConicConformalRaw:()=>Cy,geoConicEqualArea:()=>_y,geoConicEqualAreaRaw:()=>by,geoConicEquidistant:()=>qy,geoConicEquidistantRaw:()=>Dy,geoContains:()=>Gd,geoDistance:()=>Id,geoEqualEarth:()=>$y,geoEqualEarthRaw:()=>Ly,geoEquirectangular:()=>Ry,geoEquirectangularRaw:()=>zy,geoGnomonic:()=>Xy,geoGnomonicRaw:()=>Hy,geoGraticule:()=>Kd,geoGraticule10:()=>Qd,geoIdentity:()=>Vy,geoInterpolate:()=>Jd,geoLength:()=>Dd,geoMercator:()=>Ny,geoMercatorRaw:()=>ky,geoNaturalEarth1:()=>Wy,geoNaturalEarth1Raw:()=>Gy,geoOrthographic:()=>Ky,geoOrthographicRaw:()=>Zy,geoPath:()=>ey,geoProjection:()=>yy,geoProjectionMutator:()=>gy,geoRotation:()=>cd,geoStereographic:()=>Jy,geoStereographicRaw:()=>Qy,geoStream:()=>ql,geoTransform:()=>ry,geoTransverseMercator:()=>ng,geoTransverseMercatorRaw:()=>tg,gray:()=>ju,greatest:()=>bn,greatestIndex:()=>Rn,group:()=>qt,groupSort:()=>Qt,groups:()=>Ft,hcl:()=>Yu,hierarchy:()=>ug,histogram:()=>ln,hsl:()=>xi,html:()=>ps,image:()=>fs,index:()=>$t,indexes:()=>Ht,interpolate:()=>Vi,interpolateArray:()=>Ii,interpolateBasis:()=>Ei,interpolateBasisClosed:()=>ki,interpolateBlues:()=>lM,interpolateBrBG:()=>Mw,interpolateBuGn:()=>Uw,interpolateBuPu:()=>Lw,interpolateCividis:()=>wM,interpolateCool:()=>AM,interpolateCubehelix:()=>Tv,interpolateCubehelixDefault:()=>MM,interpolateCubehelixLong:()=>Av,interpolateDate:()=>Ui,interpolateDiscrete:()=>lv,interpolateGnBu:()=>Hw,interpolateGreens:()=>dM,interpolateGreys:()=>yM,interpolateHcl:()=>xv,interpolateHclLong:()=>wv,interpolateHsl:()=>vv,interpolateHslLong:()=>bv,interpolateHue:()=>hv,interpolateInferno:()=>DM,interpolateLab:()=>_v,interpolateMagma:()=>RM,interpolateNumber:()=>Yi,interpolateNumberArray:()=>qi,interpolateObject:()=>Li,interpolateOrRd:()=>Vw,interpolateOranges:()=>xM,interpolatePRGn:()=>Aw,interpolatePiYG:()=>Ew,interpolatePlasma:()=>qM,interpolatePuBu:()=>Kw,interpolatePuBuGn:()=>Ww,interpolatePuOr:()=>Nw,interpolatePuRd:()=>Jw,interpolatePurples:()=>vM,interpolateRainbow:()=>EM,interpolateRdBu:()=>Ow,interpolateRdGy:()=>jw,interpolateRdPu:()=>nM,interpolateRdYlBu:()=>Rw,interpolateRdYlGn:()=>qw,interpolateReds:()=>_M,interpolateRgb:()=>ji,interpolateRgbBasis:()=>Ri,interpolateRgbBasisClosed:()=>Di,interpolateRound:()=>dv,interpolateSinebow:()=>OM,interpolateSpectral:()=>Iw,interpolateString:()=>Xi,interpolateTransformCss:()=>ko,interpolateTransformSvg:()=>No,interpolateTurbo:()=>CM,interpolateViridis:()=>zM,interpolateWarm:()=>TM,interpolateYlGn:()=>oM,interpolateYlGnBu:()=>rM,interpolateYlOrBr:()=>uM,interpolateYlOrRd:()=>fM,interpolateZoom:()=>yv,interrupt:()=>wo,intersection:()=>Kn,interval:()=>TS,isoFormat:()=>xS,isoParse:()=>MS,json:()=>ls,lab:()=>zu,lch:()=>Uu,least:()=>jn,leastIndex:()=>zn,line:()=>bT,lineRadial:()=>ET,link:()=>qT,linkHorizontal:()=>FT,linkRadial:()=>BT,linkVertical:()=>IT,local:()=>BM,map:()=>Xn,matcher:()=>Ee,max:()=>hn,maxIndex:()=>dn,mean:()=>Tn,median:()=>An,medianIndex:()=>Sn,merge:()=>En,min:()=>pn,minIndex:()=>yn,mode:()=>kn,namespace:()=>Le,namespaces:()=>Ye,nice:()=>fn,now:()=>ao,pack:()=>Rg,packEnclose:()=>_g,packSiblings:()=>jg,pairs:()=>Nn,partition:()=>Ug,path:()=>hu,permute:()=>Gt,pie:()=>wT,piecewise:()=>Sv,pointRadial:()=>NT,pointer:()=>Wi,pointers:()=>YM,polygonArea:()=>kv,polygonCentroid:()=>Nv,polygonContains:()=>jv,polygonHull:()=>Cv,polygonLength:()=>zv,precisionFixed:()=>il,precisionPrefix:()=>ol,precisionRound:()=>al,quadtree:()=>xs,quantile:()=>_n,quantileIndex:()=>xn,quantileSorted:()=>mn,quantize:()=>Ev,quickselect:()=>gn,radialArea:()=>kT,radialLine:()=>ET,randomBates:()=>Uv,randomBernoulli:()=>$v,randomBeta:()=>Vv,randomBinomial:()=>Gv,randomCauchy:()=>Zv,randomExponential:()=>Yv,randomGamma:()=>Xv,randomGeometric:()=>Hv,randomInt:()=>qv,randomIrwinHall:()=>Bv,randomLcg:()=>tb,randomLogNormal:()=>Iv,randomLogistic:()=>Kv,randomNormal:()=>Fv,randomPareto:()=>Lv,randomPoisson:()=>Qv,randomUniform:()=>Dv,randomWeibull:()=>Wv,range:()=>On,rank:()=>Cn,reduce:()=>Vn,reverse:()=>Gn,rgb:()=>hi,ribbon:()=>Mu,ribbonArrow:()=>Tu,rollup:()=>Yt,rollups:()=>Lt,scaleBand:()=>ob,scaleDiverging:()=>ow,scaleDivergingLog:()=>aw,scaleDivergingPow:()=>cw,scaleDivergingSqrt:()=>fw,scaleDivergingSymlog:()=>uw,scaleIdentity:()=>mb,scaleImplicit:()=>rb,scaleLinear:()=>_b,scaleLog:()=>Nb,scaleOrdinal:()=>ib,scalePoint:()=>ub,scalePow:()=>Fb,scaleQuantile:()=>Lb,scaleQuantize:()=>$b,scaleRadial:()=>Yb,scaleSequential:()=>Qx,scaleSequentialLog:()=>Jx,scaleSequentialPow:()=>nw,scaleSequentialQuantile:()=>rw,scaleSequentialSqrt:()=>ew,scaleSequentialSymlog:()=>tw,scaleSqrt:()=>Ib,scaleSymlog:()=>jb,scaleThreshold:()=>Hb,scaleTime:()=>Gx,scaleUtc:()=>Wx,scan:()=>Dn,schemeAccent:()=>hw,schemeBlues:()=>sM,schemeBrBG:()=>ww,schemeBuGn:()=>Bw,schemeBuPu:()=>Yw,schemeCategory10:()=>lw,schemeDark2:()=>dw,schemeGnBu:()=>$w,schemeGreens:()=>hM,schemeGreys:()=>pM,schemeOrRd:()=>Xw,schemeOranges:()=>mM,schemePRGn:()=>Tw,schemePaired:()=>pw,schemePastel1:()=>yw,schemePastel2:()=>gw,schemePiYG:()=>Sw,schemePuBu:()=>Zw,schemePuBuGn:()=>Gw,schemePuOr:()=>kw,schemePuRd:()=>Qw,schemePurples:()=>gM,schemeRdBu:()=>Pw,schemeRdGy:()=>Cw,schemeRdPu:()=>tM,schemeRdYlBu:()=>zw,schemeRdYlGn:()=>Dw,schemeReds:()=>bM,schemeSet1:()=>vw,schemeSet2:()=>bw,schemeSet3:()=>_w,schemeSpectral:()=>Fw,schemeTableau10:()=>mw,schemeYlGn:()=>iM,schemeYlGnBu:()=>eM,schemeYlOrBr:()=>aM,schemeYlOrRd:()=>cM,select:()=>qr,selectAll:()=>LM,selection:()=>Dr,selector:()=>Me,selectorAll:()=>Se,shuffle:()=>qn,shuffler:()=>Fn,some:()=>$n,sort:()=>Wt,stack:()=>uS,stackOffsetDiverging:()=>fS,stackOffsetExpand:()=>cS,stackOffsetNone:()=>rS,stackOffsetSilhouette:()=>sS,stackOffsetWiggle:()=>lS,stackOrderAppearance:()=>hS,stackOrderAscending:()=>pS,stackOrderDescending:()=>gS,stackOrderInsideOut:()=>vS,stackOrderNone:()=>iS,stackOrderReverse:()=>bS,stratify:()=>Vg,style:()=>tr,subset:()=>ne,sum:()=>In,superset:()=>Jn,svg:()=>ys,symbol:()=>pA,symbolAsterisk:()=>YT,symbolCircle:()=>LT,symbolCross:()=>$T,symbolDiamond:()=>VT,symbolDiamond2:()=>GT,symbolPlus:()=>WT,symbolSquare:()=>ZT,symbolSquare2:()=>KT,symbolStar:()=>nA,symbolTriangle:()=>rA,symbolTriangle2:()=>oA,symbolWye:()=>sA,symbolX:()=>lA,symbols:()=>hA,symbolsFill:()=>hA,symbolsStroke:()=>dA,text:()=>is,thresholdFreedmanDiaconis:()=>wn,thresholdScott:()=>Mn,thresholdSturges:()=>sn,tickFormat:()=>vb,tickIncrement:()=>un,tickStep:()=>cn,ticks:()=>an,timeDay:()=>p_,timeDays:()=>y_,timeFormat:()=>Mm,timeFormatDefaultLocale:()=>$x,timeFormatLocale:()=>xm,timeFriday:()=>w_,timeFridays:()=>N_,timeHour:()=>l_,timeHours:()=>h_,timeInterval:()=>t_,timeMillisecond:()=>e_,timeMilliseconds:()=>r_,timeMinute:()=>c_,timeMinutes:()=>f_,timeMonday:()=>b_,timeMondays:()=>A_,timeMonth:()=>C_,timeMonths:()=>j_,timeParse:()=>Tm,timeSaturday:()=>M_,timeSaturdays:()=>P_,timeSecond:()=>o_,timeSeconds:()=>a_,timeSunday:()=>v_,timeSundays:()=>T_,timeThursday:()=>x_,timeThursdays:()=>k_,timeTickInterval:()=>vm,timeTicks:()=>gm,timeTuesday:()=>__,timeTuesdays:()=>S_,timeWednesday:()=>m_,timeWednesdays:()=>E_,timeWeek:()=>v_,timeWeeks:()=>T_,timeYear:()=>R_,timeYears:()=>D_,timeout:()=>yo,timer:()=>fo,timerFlush:()=>so,transition:()=>ia,transpose:()=>Bn,tree:()=>ev,treemap:()=>uv,treemapBinary:()=>cv,treemapDice:()=>Bg,treemapResquarify:()=>sv,treemapSlice:()=>rv,treemapSliceDice:()=>fv,treemapSquarify:()=>av,tsv:()=>cs,tsvFormat:()=>yf,tsvFormatBody:()=>gf,tsvFormatRow:()=>bf,tsvFormatRows:()=>vf,tsvFormatValue:()=>_f,tsvParse:()=>df,tsvParseRows:()=>pf,union:()=>ee,utcDay:()=>$_,utcDays:()=>H_,utcFormat:()=>Am,utcFriday:()=>Q_,utcFridays:()=>om,utcHour:()=>U_,utcHours:()=>Y_,utcMillisecond:()=>e_,utcMilliseconds:()=>r_,utcMinute:()=>F_,utcMinutes:()=>I_,utcMonday:()=>G_,utcMondays:()=>nm,utcMonth:()=>cm,utcMonths:()=>fm,utcParse:()=>Sm,utcSaturday:()=>J_,utcSaturdays:()=>am,utcSecond:()=>o_,utcSeconds:()=>a_,utcSunday:()=>V_,utcSundays:()=>tm,utcThursday:()=>K_,utcThursdays:()=>im,utcTickInterval:()=>ym,utcTicks:()=>pm,utcTuesday:()=>W_,utcTuesdays:()=>em,utcWednesday:()=>Z_,utcWednesdays:()=>rm,utcWeek:()=>V_,utcWeeks:()=>tm,utcYear:()=>lm,utcYears:()=>hm,variance:()=>Tt,window:()=>Ze,xml:()=>ds,zip:()=>Yn,zoom:()=>FS,zoomIdentity:()=>kS,zoomTransform:()=>NS});var a=i((function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{path:null,name:null};o(this,t);var e=n.path,r=n.name;this.path=e||null,this.name=r||null}));const u=a;function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function f(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function s(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{id:null,name:null,definition:null,drawOption:null,attributes:[],children:[]};f(this,a),t=o.call(this);var e=n.id,r=n.name,i=n.definition,u=n.drawOption,c=n.attributes,s=n.children;return t.id=e||null,t.name=r||null,t.definition=i||null,t.drawOption=u||null,t.attributes=c||[],t.children=s||[],t}return n=a,(e=[{key:"addChild",value:function(t){var n=t.definition.parentTypes;this.definition.isContainer&&n.includes(this.definition.type)&&!this.children.includes(t)&&this.children.push(t)}}])&&s(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),a}(u);const y=p;function g(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{type:null,icon:null,model:null,parentTypes:[],definedAttributes:[],isContainer:!1};b(this,t);var e=n.type,r=n.icon,i=n.model,o=n.parentTypes,a=n.definedAttributes,u=n.isContainer;this.type=e||null,this.icon=r||null,this.model=i||null,this.parentTypes=o||[],this.definedAttributes=a||[],this.isContainer=void 0!==u&&u}));const m=_;function x(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function w(t){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{name:null,type:null,linkType:null,linkRef:[],containerRef:[],required:!1,definedAttributes:[],rules:{values:null,min:null,max:null,regex:null}};S(this,t);var e=n.name,r=n.type,i=n.linkType,o=n.linkRef,a=n.containerRef,u=n.definedAttributes,c=n.required,f=n.rules;this.name=e||null,this.type=r||null,this.linkType=i||null,this.linkRef=o||[],this.containerRef=a||[],this.definedAttributes=u||[],this.required=c||!1,this.rules=w({values:null,min:null,max:null,regex:null},f)}));const k=E;function N(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{x:null,y:null,width:null,height:null};O(this,t);var e=n.x,r=n.y,i=n.width,o=n.height;this.x=e||null,this.y=r||null,this.width=i||null,this.height=o||null}));function j(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{name:null,value:null,type:null};R(this,t);var e=n.name,r=n.value,i=n.type;this.name=e||null,this.value=r||null,this.type=i||null}));const q=D;function F(t){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F(t)}function I(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function B(t){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{from:{id:null},to:{id:null},type:null};Y(this,o),t=i.call(this);var e=n.from,r=n.to,a=n.type;return t.from=B({id:null},e),t.to=B({id:null},r),t.type=a||null,t}return n=o,Object.defineProperty(n,"prototype",{writable:!1}),n}(u);const V=X;function G(t){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}function W(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Z(t,n){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},Z(t,n)}function K(t,n){if(n&&("object"===G(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Q(t){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Q(t)}const J=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&Z(t,n)}(o,t);var n,e,r,i=(e=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=Q(e);if(r){var i=Q(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return K(this,t)});function o(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{path:null,name:null,content:null};W(this,o),t=i.call(this,n);var e=n.content;return t.content=e||null,t}return n=o,Object.defineProperty(n,"prototype",{writable:!1}),n}(u);function tt(t,n){return null==t||null==n?NaN:tn?1:t>=n?0:NaN}function nt(t,n){return null==t||null==n?NaN:nt?1:n>=t?0:NaN}function et(t){let n,e,r;function i(t,r,i=0,o=t.length){if(i>>1;e(t[n],r)<0?i=n+1:o=n}while(itt(t(n),e),r=(n,e)=>t(n)-e):(n=t===tt||t===nt?t:rt,e=t,r=t),{left:i,center:function(t,n,e=0,o=t.length){const a=i(t,n,e,o-1);return a>e&&r(t[a-1],n)>-r(t[a],n)?a-1:a},right:function(t,r,i=0,o=t.length){if(i>>1;e(t[n],r)<=0?i=n+1:o=n}while(i=n&&(yield n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(r=+r)>=r&&(yield r)}}const at=et(tt),ut=at.right,ct=at.left,ft=et(it).center,st=ut;function lt(t,n){if(!((n=+n)>=0))throw new RangeError("invalid r");let e=t.length;if(!((e=Math.floor(e))>=0))throw new RangeError("invalid length");if(!e||!n)return t;const r=vt(n),i=t.slice();return r(t,i,0,e,1),r(i,t,0,e,1),r(t,i,0,e,1),t}const ht=pt(vt),dt=pt((function(t){const n=vt(t);return(t,e,r,i,o)=>{n(t,e,0+(r<<=2),0+(i<<=2),o<<=2),n(t,e,r+1,i+1,o),n(t,e,r+2,i+2,o),n(t,e,r+3,i+3,o)}}));function pt(t){return function(n,e,r=e){if(!((e=+e)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=n;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(void 0!==a?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!e&&!r)return n;const u=e&&t(e),c=r&&t(r),f=i.slice();return u&&c?(yt(u,f,i,o,a),yt(u,i,f,o,a),yt(u,f,i,o,a),gt(c,i,f,o,a),gt(c,f,i,o,a),gt(c,i,f,o,a)):u?(yt(u,i,f,o,a),yt(u,f,i,o,a),yt(u,i,f,o,a)):c&&(gt(c,i,f,o,a),gt(c,f,i,o,a),gt(c,i,f,o,a)),n}}function yt(t,n,e,r,i){for(let o=0,a=r*i;o{if(!((o-=a)>=i))return;let u=t*r[i];const c=a*t;for(let t=i,n=i+c;t{if(!((a-=u)>=o))return;let c=n*i[o];const f=u*n,s=f+u;for(let t=o,n=o+f;t=n&&++e;else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(i=+i)>=i&&++e}return e}function _t(t){return 0|t.length}function mt(t){return!(t>0)}function xt(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function wt(...t){const n="function"==typeof t[t.length-1]&&function(t){return n=>t(...n)}(t.pop()),e=(t=t.map(xt)).map(_t),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||e.some(mt))return o;for(;;){o.push(i.map(((n,e)=>t[e][n])));let a=r;for(;++i[a]===e[a];){if(0===a)return n?o.map(n):o;i[a--]=0}}}function Mt(t,n){var e=0,r=0;return Float64Array.from(t,void 0===n?t=>e+=+t||0:i=>e+=+n(i,r++,t)||0)}function Tt(t,n){let e,r=0,i=0,o=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(e=n-i,i+=e/++r,o+=e*(n-i));else{let a=-1;for(let u of t)null!=(u=n(u,++a,t))&&(u=+u)>=u&&(e=u-i,i+=e/++r,o+=e*(u-i))}if(r>1)return o/(r-1)}function At(t,n){const e=Tt(t,n);return e?Math.sqrt(e):e}function St(t,n){let e,r;if(void 0===n)for(const n of t)null!=n&&(void 0===e?n>=n&&(e=r=n):(e>n&&(e=n),r=o&&(e=r=o):(e>o&&(e=o),r0){for(o=t[--i];i>0&&(n=o,e=t[--i],o=n+e,r=e-(o-n),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(e=2*r,n=o+e,e==n-o&&(o=n))}return o}}function kt(t,n){const e=new Et;if(void 0===n)for(let n of t)(n=+n)&&e.add(n);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&e.add(i)}return+e}function Nt(t,n){const e=new Et;let r=-1;return Float64Array.from(t,void 0===n?t=>e.add(+t||0):i=>e.add(+n(i,++r,t)||0))}class Pt extends Map{constructor(t,n=Rt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,e]of t)this.set(n,e)}get(t){return super.get(Ct(this,t))}has(t){return super.has(Ct(this,t))}set(t,n){return super.set(jt(this,t),n)}delete(t){return super.delete(zt(this,t))}}class Ot extends Set{constructor(t,n=Rt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const n of t)this.add(n)}has(t){return super.has(Ct(this,t))}add(t){return super.add(jt(this,t))}delete(t){return super.delete(zt(this,t))}}function Ct({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function jt({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function zt({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function Rt(t){return null!==t&&"object"==typeof t?t.valueOf():t}function Dt(t){return t}function qt(t,...n){return Vt(t,Dt,Dt,n)}function Ft(t,...n){return Vt(t,Array.from,Dt,n)}function It(t,n){for(let e=1,r=n.length;et.pop().map((([n,e])=>[...t,n,e]))));return t}function Bt(t,...n){return It(Ft(t,...n),n)}function Ut(t,n,...e){return It(Lt(t,n,...e),e)}function Yt(t,n,...e){return Vt(t,Dt,n,e)}function Lt(t,n,...e){return Vt(t,Array.from,n,e)}function $t(t,...n){return Vt(t,Dt,Xt,n)}function Ht(t,...n){return Vt(t,Array.from,Xt,n)}function Xt(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function Vt(t,n,e,r){return function t(i,o){if(o>=r.length)return e(i);const a=new Pt,u=r[o++];let c=-1;for(const t of i){const n=u(t,++c,i),e=a.get(n);e?e.push(t):a.set(n,[t])}for(const[n,e]of a)a.set(n,t(e,o));return n(a)}(t,0)}function Gt(t,n){return Array.from(n,(n=>t[n]))}function Wt(t,...n){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[e]=n;if(e&&2!==e.length||n.length>1){const r=Uint32Array.from(t,((t,n)=>n));return n.length>1?(n=n.map((n=>t.map(n))),r.sort(((t,e)=>{for(const r of n){const n=Kt(r[t],r[e]);if(n)return n}}))):(e=t.map(e),r.sort(((t,n)=>Kt(e[t],e[n])))),Gt(t,r)}return t.sort(Zt(e))}function Zt(t=tt){if(t===tt)return Kt;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,e)=>{const r=t(n,e);return r||0===r?r:(0===t(e,e))-(0===t(n,n))}}function Kt(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(tn?1:0)}function Qt(t,n,e){return(2!==n.length?Wt(Yt(t,n,e),(([t,n],[e,r])=>tt(n,r)||tt(t,e))):Wt(qt(t,e),(([t,e],[r,i])=>n(e,i)||tt(t,r)))).map((([t])=>t))}var Jt=Array.prototype,tn=Jt.slice;function nn(t){return()=>t}Jt.map;var en=Math.sqrt(50),rn=Math.sqrt(10),on=Math.sqrt(2);function an(t,n,e){var r,i,o,a,u=-1;if(e=+e,(t=+t)==(n=+n)&&e>0)return[t];if((r=n0){let e=Math.round(t/a),r=Math.round(n/a);for(e*an&&--r,o=new Array(i=r-e+1);++un&&--r,o=new Array(i=r-e+1);++u=0?(o>=en?10:o>=rn?5:o>=on?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=en?10:o>=rn?5:o>=on?2:1)}function cn(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=en?i*=10:o>=rn?i*=5:o>=on&&(i*=2),n0?(t=Math.floor(t/i)*i,n=Math.ceil(n/i)*i):i<0&&(t=Math.ceil(t*i)/i,n=Math.floor(n*i)/i),r=i}}function sn(t){return Math.ceil(Math.log(bt(t))/Math.LN2)+1}function ln(){var t=Dt,n=St,e=sn;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a,u=r.length,c=new Array(u);for(i=0;i=l)if(t>=l&&n===St){const t=un(s,l,e);isFinite(t)&&(t>0?l=(Math.floor(l/t)+1)*t:t<0&&(l=(Math.ceil(l*-t)+1)/-t))}else h.pop()}for(var d=h.length;h[0]<=s;)h.shift(),--d;for(;h[d-1]>l;)h.pop(),--d;var p,y=new Array(d+1);for(i=0;i<=d;++i)(p=y[i]=[]).x0=i>0?h[i-1]:s,p.x1=i0)for(i=0;i=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e=i)&&(e=i)}return e}function dn(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e=n)&&(e=n,r=i);else for(let o of t)null!=(o=n(o,++i,t))&&(e=o)&&(e=o,r=i);return r}function pn(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e>i||void 0===e&&i>=i)&&(e=i)}return e}function yn(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e>n||void 0===e&&n>=n)&&(e=n,r=i);else for(let o of t)null!=(o=n(o,++i,t))&&(e>o||void 0===e&&o>=o)&&(e=o,r=i);return r}function gn(t,n,e=0,r=t.length-1,i){for(i=void 0===i?Kt:Zt(i);r>e;){if(r-e>600){const o=r-e+1,a=n-e+1,u=Math.log(o),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(o-c)/o)*(a-o/2<0?-1:1);gn(t,n,Math.max(e,Math.floor(n-a*c/o+f)),Math.min(r,Math.floor(n+(o-a)*c/o+f)),i)}const o=t[n];let a=e,u=r;for(vn(t,e,n),i(t[r],o)>0&&vn(t,e,r);a0;)--u}0===i(t[e],o)?vn(t,e,u):(++u,vn(t,u,r)),u<=n&&(e=u+1),n<=u&&(r=u-1)}return t}function vn(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function bn(t,n=tt){let e,r=!1;if(1===n.length){let i;for(const o of t){const t=n(o);(r?tt(t,i)>0:0===tt(t,t))&&(e=o,i=t,r=!0)}}else for(const i of t)(r?n(i,e)>0:0===n(i,i))&&(e=i,r=!0);return e}function _n(t,n,e){if(r=(t=Float64Array.from(ot(t,e))).length){if((n=+n)<=0||r<2)return pn(t);if(n>=1)return hn(t);var r,i=(r-1)*n,o=Math.floor(i),a=hn(gn(t,o).subarray(0,o+1));return a+(pn(t.subarray(o+1))-a)*(i-o)}}function mn(t,n,e=it){if(r=t.length){if((n=+n)<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,o=Math.floor(i),a=+e(t[o],o,t);return a+(+e(t[o+1],o+1,t)-a)*(i-o)}}function xn(t,n,e){if(r=(t=Float64Array.from(ot(t,e))).length){if((n=+n)<=0||r<2)return yn(t);if(n>=1)return dn(t);var r,i=Math.floor((r-1)*n),o=gn(Uint32Array.from(t,((t,n)=>n)),i,0,r-1,((n,e)=>Kt(t[n],t[e])));return bn(o.subarray(0,i+1),(n=>t[n]))}}function wn(t,n,e){return Math.ceil((e-n)/(2*(_n(t,.75)-_n(t,.25))*Math.pow(bt(t),-1/3)))}function Mn(t,n,e){return Math.ceil((e-n)*Math.cbrt(bt(t))/(3.49*At(t)))}function Tn(t,n){let e=0,r=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(++e,r+=n);else{let i=-1;for(let o of t)null!=(o=n(o,++i,t))&&(o=+o)>=o&&(++e,r+=o)}if(e)return r/e}function An(t,n){return _n(t,.5,n)}function Sn(t,n){return xn(t,.5,n)}function En(t){return Array.from(function*(t){for(const n of t)yield*n}(t))}function kn(t,n){const e=new Pt;if(void 0===n)for(let n of t)null!=n&&n>=n&&e.set(n,(e.get(n)||0)+1);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&i>=i&&e.set(i,(e.get(i)||0)+1)}let r,i=0;for(const[t,n]of e)n>i&&(i=n,r=t);return r}function Nn(t,n=Pn){const e=[];let r,i=!1;for(const o of t)i&&e.push(n(r,o)),r=o,i=!0;return e}function Pn(t,n){return[t,n]}function On(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++rn(e[t],e[r]);let o,a;return Uint32Array.from(e,((t,n)=>n)).sort(n===tt?(t,n)=>Kt(e[t],e[n]):Zt(i)).forEach(((t,n)=>{const e=i(t,void 0===o?t:o);e>=0?((void 0===o||e>0)&&(o=t,a=n),r[t]=a):r[t]=NaN})),r}function jn(t,n=tt){let e,r=!1;if(1===n.length){let i;for(const o of t){const t=n(o);(r?tt(t,i)<0:0===tt(t,t))&&(e=o,i=t,r=!0)}}else for(const i of t)(r?n(i,e)<0:0===n(i,i))&&(e=i,r=!0);return e}function zn(t,n=tt){if(1===n.length)return yn(t,n);let e,r=-1,i=-1;for(const o of t)++i,(r<0?0===n(o,o):n(o,e)<0)&&(e=o,r=i);return r}function Rn(t,n=tt){if(1===n.length)return dn(t,n);let e,r=-1,i=-1;for(const o of t)++i,(r<0?0===n(o,o):n(o,e)>0)&&(e=o,r=i);return r}function Dn(t,n){const e=zn(t,n);return e<0?void 0:e}const qn=Fn(Math.random);function Fn(t){return function(n,e=0,r=n.length){let i=r-(e=+e);for(;i;){const r=t()*i--|0,o=n[i+e];n[i+e]=n[r+e],n[r+e]=o}return n}}function In(t,n){let e=0;if(void 0===n)for(let n of t)(n=+n)&&(e+=n);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&(e+=i)}return e}function Bn(t){if(!(i=t.length))return[];for(var n=-1,e=pn(t,Un),r=new Array(e);++nn(e,r,t)))}function Vn(t,n,e){if("function"!=typeof n)throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if(({done:i,value:e}=r.next()),i)return;++a}for(;({done:i,value:o}=r.next()),!i;)e=n(e,o,++a,t);return e}function Gn(t){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).reverse()}function Wn(t,...n){t=new Ot(t);for(const e of n)for(const n of e)t.delete(n);return t}function Zn(t,n){const e=n[Symbol.iterator](),r=new Ot;for(const n of t){if(r.has(n))return!1;let t,i;for(;({value:t,done:i}=e.next())&&!i;){if(Object.is(n,t))return!1;r.add(t)}}return!0}function Kn(t,...n){t=new Ot(t),n=n.map(Qn);t:for(const e of t)for(const r of n)if(!r.has(e)){t.delete(e);continue t}return t}function Qn(t){return t instanceof Ot?t:new Ot(t)}function Jn(t,n){const e=t[Symbol.iterator](),r=new Set;for(const t of n){const n=te(t);if(r.has(n))continue;let i,o;for(;({value:i,done:o}=e.next());){if(o)return!1;const t=te(i);if(r.add(t),Object.is(n,t))break}}return!0}function te(t){return null!==t&&"object"==typeof t?t.valueOf():t}function ne(t,n){return Jn(n,t)}function ee(...t){const n=new Ot;for(const e of t)for(const t of e)n.add(t);return n}function re(t){return t}var ie=1e-6;function oe(t){return"translate("+t+",0)"}function ae(t){return"translate(0,"+t+")"}function ue(t){return n=>+t(n)}function ce(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),e=>+t(e)+n}function fe(){return!this.__axis}function se(t,n){var e=[],r=null,i=null,o=6,a=6,u=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,f=1===t||4===t?-1:1,s=4===t||2===t?"x":"y",l=1===t||3===t?oe:ae;function h(h){var d=null==r?n.ticks?n.ticks.apply(n,e):n.domain():r,p=null==i?n.tickFormat?n.tickFormat.apply(n,e):re:i,y=Math.max(o,0)+u,g=n.range(),v=+g[0]+c,b=+g[g.length-1]+c,_=(n.bandwidth?ce:ue)(n.copy(),c),m=h.selection?h.selection():h,x=m.selectAll(".domain").data([null]),w=m.selectAll(".tick").data(d,n).order(),M=w.exit(),T=w.enter().append("g").attr("class","tick"),A=w.select("line"),S=w.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(T),A=A.merge(T.append("line").attr("stroke","currentColor").attr(s+"2",f*o)),S=S.merge(T.append("text").attr("fill","currentColor").attr(s,f*y).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==m&&(x=x.transition(h),w=w.transition(h),A=A.transition(h),S=S.transition(h),M=M.transition(h).attr("opacity",ie).attr("transform",(function(t){return isFinite(t=_(t))?l(t+c):this.getAttribute("transform")})),T.attr("opacity",ie).attr("transform",(function(t){var n=this.parentNode.__axis;return l((n&&isFinite(n=n(t))?n:_(t))+c)}))),M.remove(),x.attr("d",4===t||2===t?a?"M"+f*a+","+v+"H"+c+"V"+b+"H"+f*a:"M"+c+","+v+"V"+b:a?"M"+v+","+f*a+"V"+c+"H"+b+"V"+f*a:"M"+v+","+c+"H"+b),w.attr("opacity",1).attr("transform",(function(t){return l(_(t)+c)})),A.attr(s+"2",f*o),S.attr(s,f*y).text(p),m.filter(fe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),m.each((function(){this.__axis=_}))}return h.scale=function(t){return arguments.length?(n=t,h):n},h.ticks=function(){return e=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(e=null==t?[]:Array.from(t),h):e.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(u=+t,h):u},h.offset=function(t){return arguments.length?(c=+t,h):c},h}function le(t){return se(1,t)}function he(t){return se(2,t)}function de(t){return se(3,t)}function pe(t){return se(4,t)}var ye={value:()=>{}};function ge(){for(var t,n=0,e=arguments.length,r={};n=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function _e(t,n){for(var e,r=0,i=t.length;r0)for(var e,r,i=new Array(e),o=0;on?1:t>=n?0:NaN}ze.prototype={constructor:ze,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Ue="http://www.w3.org/1999/xhtml";const Ye={svg:"http://www.w3.org/2000/svg",xhtml:Ue,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Le(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Ye.hasOwnProperty(n)?{space:Ye[n],local:t}:t}function $e(t){return function(){this.removeAttribute(t)}}function He(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Xe(t,n){return function(){this.setAttribute(t,n)}}function Ve(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Ge(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function We(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Ze(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ke(t){return function(){this.style.removeProperty(t)}}function Qe(t,n,e){return function(){this.style.setProperty(t,n,e)}}function Je(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function tr(t,n){return t.style.getPropertyValue(n)||Ze(t).getComputedStyle(t,null).getPropertyValue(n)}function nr(t){return function(){delete this[t]}}function er(t,n){return function(){this[t]=n}}function rr(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function ir(t){return t.trim().split(/^|\s+/)}function or(t){return t.classList||new ar(t)}function ar(t){this._node=t,this._names=ir(t.getAttribute("class")||"")}function ur(t,n){for(var e=or(t),r=-1,i=n.length;++r=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}function kr(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var jr=[null];function zr(t,n){this._groups=t,this._parents=n}function Rr(){return new zr([[document.documentElement]],jr)}zr.prototype=Rr.prototype={constructor:zr,select:function(t){"function"!=typeof t&&(t=Me(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i=x&&(x=m+1);!(_=g[x])&&++x=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=Be);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?Ke:"function"==typeof n?Je:Qe)(t,n,null==e?"":e)):tr(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?nr:"function"==typeof n?rr:er)(t,n)):this.node()[t]},classed:function(t,n){var e=ir(t+"");if(arguments.length<2){for(var r=or(this.node()),i=-1,o=e.length;++i>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?si(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?si(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Jr.exec(t))?new di(n[1],n[2],n[3],1):(n=ti.exec(t))?new di(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=ni.exec(t))?si(n[1],n[2],n[3],n[4]):(n=ei.exec(t))?si(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=ri.exec(t))?_i(n[1],n[2]/100,n[3]/100,1):(n=ii.exec(t))?_i(n[1],n[2]/100,n[3]/100,n[4]):oi.hasOwnProperty(t)?fi(oi[t]):"transparent"===t?new di(NaN,NaN,NaN,0):null}function fi(t){return new di(t>>16&255,t>>8&255,255&t,1)}function si(t,n,e,r){return r<=0&&(t=n=e=NaN),new di(t,n,e,r)}function li(t){return t instanceof Xr||(t=ci(t)),t?new di((t=t.rgb()).r,t.g,t.b,t.opacity):new di}function hi(t,n,e,r){return 1===arguments.length?li(t):new di(t,n,e,null==r?1:r)}function di(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function pi(){return`#${bi(this.r)}${bi(this.g)}${bi(this.b)}`}function yi(){const t=gi(this.opacity);return`${1===t?"rgb(":"rgba("}${vi(this.r)}, ${vi(this.g)}, ${vi(this.b)}${1===t?")":`, ${t})`}`}function gi(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function vi(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function bi(t){return((t=vi(t))<16?"0":"")+t.toString(16)}function _i(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new wi(t,n,e,r)}function mi(t){if(t instanceof wi)return new wi(t.h,t.s,t.l,t.opacity);if(t instanceof Xr||(t=ci(t)),!t)return new wi;if(t instanceof wi)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,c=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e0&&c<1?0:a,new wi(a,u,c,t.opacity)}function xi(t,n,e,r){return 1===arguments.length?mi(t):new wi(t,n,e,null==r?1:r)}function wi(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Mi(t){return(t=(t||0)%360)<0?t+360:t}function Ti(t){return Math.max(0,Math.min(1,t||0))}function Ai(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function Si(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}function Ei(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r=240?t-240:t+120,i,r),Ai(t,i,r),Ai(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new wi(Mi(this.h),Ti(this.s),Ti(this.l),gi(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=gi(this.opacity);return`${1===t?"hsl(":"hsla("}${Mi(this.h)}, ${100*Ti(this.s)}%, ${100*Ti(this.l)}%${1===t?")":`, ${t})`}`}}));const Ni=t=>()=>t;function Pi(t,n){return function(e){return t+e*n}}function Oi(t,n){var e=n-t;return e?Pi(t,e>180||e<-180?e-360*Math.round(e/360):e):Ni(isNaN(t)?n:t)}function Ci(t,n){var e=n-t;return e?Pi(t,e):Ni(isNaN(t)?n:t)}const ji=function t(n){var e=function(t){return 1==(t=+t)?Ci:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):Ni(isNaN(n)?e:n)}}(n);function r(t,n){var r=e((t=hi(t)).r,(n=hi(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=Ci(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function zi(t){return function(n){var e,r,i=n.length,o=new Array(i),a=new Array(i),u=new Array(i);for(e=0;eo&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,c.push({i:a,x:Yi(e,r)})),o=Hi.lastIndex;return o=0&&n._call.call(void 0,t),n=n._next;--Qi}function lo(){eo=(no=io.now())+ro,Qi=Ji=0;try{so()}finally{Qi=0,function(){for(var t,n,e=Zi,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Zi=n);Ki=t,po(r)}(),eo=0}}function ho(){var t=io.now(),n=t-no;n>1e3&&(ro-=n,no=t)}function po(t){Qi||(Ji&&(Ji=clearTimeout(Ji)),t-eo>24?(t<1/0&&(Ji=setTimeout(lo,t-io.now()-ro)),to&&(to=clearInterval(to))):(to||(no=io.now(),to=setInterval(ho,1e3)),Qi=1,oo(lo)))}function yo(t,n,e){var r=new co;return n=null==n?0:+n,r.restart((e=>{r.stop(),t(e+n)}),n,e),r}co.prototype=fo.prototype={constructor:co,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?ao():+e)+(null==n?0:+n),this._next||Ki===this||(Ki?Ki._next=this:Zi=this,Ki=this),this._call=t,this._time=e,po()},stop:function(){this._call&&(this._call=null,this._time=1/0,po())}};var go=xe("start","end","cancel","interrupt"),vo=[];function bo(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(c){var f,s,l,h;if(1!==e.state)return u();for(f in i)if((h=i[f]).name===e.name){if(3===h.state)return yo(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[f]):+f0)throw new Error("too late; already scheduled");return e}function mo(t,n){var e=xo(t,n);if(e.state>3)throw new Error("too late; already running");return e}function xo(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function wo(t,n){var e,r,i,o=t.__transition,a=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):a=!1;a&&delete t.__transition}}var Mo,To=180/Math.PI,Ao={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function So(t,n,e,r,i,o){var a,u,c;return(a=Math.sqrt(t*t+n*n))&&(t/=a,n/=a),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(u=Math.sqrt(e*e+r*r))&&(e/=u,r/=u,c/=u),t*r180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Yi(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,a.rotate,u,c),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Yi(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,a.skewX,u,c),function(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:Yi(t,e)},{i:u-2,x:Yi(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,c),o=a=null,function(t){for(var n,e=-1,r=c.length;++e=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?_o:mo;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}var Zo=Dr.prototype.constructor;function Ko(t){return function(){this.style.removeProperty(t)}}function Qo(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function Jo(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&Qo(t,o,e)),r}return o._value=n,o}function ta(t){return function(n){this.textContent=t.call(this,n)}}function na(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&ta(r)),n}return r._value=t,r}var ea=0;function ra(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function ia(t){return Dr().transition(t)}function oa(){return++ea}var aa=Dr.prototype;function ua(t){return t*t*t}function ca(t){return--t*t*t+1}function fa(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}ra.prototype=ia.prototype={constructor:ra,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Me(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a1&&e.name===n)return new ra([[t]],ha,n,+r);return null}const pa=t=>()=>t;function ya(t,{sourceEvent:n,target:e,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function ga(t){t.stopImmediatePropagation()}function va(t){t.preventDefault(),t.stopImmediatePropagation()}var ba={name:"drag"},_a={name:"space"},ma={name:"handle"},xa={name:"center"};const{abs:wa,max:Ma,min:Ta}=Math;function Aa(t){return[+t[0],+t[1]]}function Sa(t){return[Aa(t[0]),Aa(t[1])]}var Ea={name:"x",handles:["w","e"].map(Ra),input:function(t,n){return null==t?null:[[+t[0],n[0][1]],[+t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ka={name:"y",handles:["n","s"].map(Ra),input:function(t,n){return null==t?null:[[n[0][0],+t[0]],[n[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Na={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Ra),input:function(t){return null==t?null:Sa(t)},output:function(t){return t}},Pa={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Oa={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Ca={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ja={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},za={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Ra(t){return{type:t}}function Da(t){return!t.ctrlKey&&!t.button}function qa(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Fa(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ia(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ba(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Ua(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function Ya(){return Ha(Ea)}function La(){return Ha(ka)}function $a(){return Ha(Na)}function Ha(t){var n,e=qa,r=Da,i=Fa,o=!0,a=xe("start","brush","end"),u=6;function c(n){var e=n.property("__brush",y).selectAll(".overlay").data([Ra("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Pa.overlay).merge(e).each((function(){var t=Ia(this).extent;qr(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),n.selectAll(".selection").data([Ra("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Pa.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=n.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return Pa[t.type]})),n.each(f).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).on("touchstart.brush",h).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(){var t=qr(this),n=Ia(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?n[1][0]-u/2:n[0][0]-u/2})).attr("y",(function(t){return"s"===t.type[0]?n[1][1]-u/2:n[0][1]-u/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+u:u})).attr("height",(function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+u:u}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function s(t,n,e){var r=t.__brush.emitter;return!r||e&&r.clean?new l(t,n,e):r}function l(t,n,e){this.that=t,this.args=n,this.state=t.__brush,this.active=0,this.clean=e}function h(e){if((!n||e.touches)&&r.apply(this,arguments)){var i,a,u,c,l,h,d,p,y,g,v,b=this,_=e.target.__data__.type,m="selection"===(o&&e.metaKey?_="overlay":_)?ba:o&&e.altKey?xa:ma,x=t===ka?null:ja[_],w=t===Ea?null:za[_],M=Ia(b),T=M.extent,A=M.selection,S=T[0][0],E=T[0][1],k=T[1][0],N=T[1][1],P=0,O=0,C=x&&w&&o&&e.shiftKey,j=Array.from(e.touches||[e],(t=>{const n=t.identifier;return(t=Wi(t,b)).point0=t.slice(),t.identifier=n,t}));wo(b);var z=s(b,arguments,!0).beforestart();if("overlay"===_){A&&(y=!0);const n=[j[0],j[1]||j[0]];M.selection=A=[[i=t===ka?S:Ta(n[0][0],n[1][0]),u=t===Ea?E:Ta(n[0][1],n[1][1])],[l=t===ka?k:Ma(n[0][0],n[1][0]),d=t===Ea?N:Ma(n[0][1],n[1][1])]],j.length>1&&I(e)}else i=A[0][0],u=A[0][1],l=A[1][0],d=A[1][1];a=i,c=u,h=l,p=d;var R=qr(b).attr("pointer-events","none"),D=R.selectAll(".overlay").attr("cursor",Pa[_]);if(e.touches)z.moved=F,z.ended=B;else{var q=qr(e.view).on("mousemove.brush",F,!0).on("mouseup.brush",B,!0);o&&q.on("keydown.brush",U,!0).on("keyup.brush",Y,!0),Yr(e.view)}f.call(b),z.start(e,m.name)}function F(t){for(const n of t.changedTouches||[t])for(const t of j)t.identifier===n.identifier&&(t.cur=Wi(n,b));if(C&&!g&&!v&&1===j.length){const t=j[0];wa(t.cur[0]-t[0])>wa(t.cur[1]-t[1])?v=!0:g=!0}for(const t of j)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);y=!0,va(t),I(t)}function I(t){const n=j[0],e=n.point0;var r;switch(P=n[0]-e[0],O=n[1]-e[1],m){case _a:case ba:x&&(P=Ma(S-i,Ta(k-l,P)),a=i+P,h=l+P),w&&(O=Ma(E-u,Ta(N-d,O)),c=u+O,p=d+O);break;case ma:j[1]?(x&&(a=Ma(S,Ta(k,j[0][0])),h=Ma(S,Ta(k,j[1][0])),x=1),w&&(c=Ma(E,Ta(N,j[0][1])),p=Ma(E,Ta(N,j[1][1])),w=1)):(x<0?(P=Ma(S-i,Ta(k-i,P)),a=i+P,h=l):x>0&&(P=Ma(S-l,Ta(k-l,P)),a=i,h=l+P),w<0?(O=Ma(E-u,Ta(N-u,O)),c=u+O,p=d):w>0&&(O=Ma(E-d,Ta(N-d,O)),c=u,p=d+O));break;case xa:x&&(a=Ma(S,Ta(k,i-P*x)),h=Ma(S,Ta(k,l+P*x))),w&&(c=Ma(E,Ta(N,u-O*w)),p=Ma(E,Ta(N,d+O*w)))}h0&&(i=a-P),w<0?d=p-O:w>0&&(u=c-O),m=_a,D.attr("cursor",Pa.selection),I(t));break;default:return}va(t)}function Y(t){switch(t.keyCode){case 16:C&&(g=v=C=!1,I(t));break;case 18:m===xa&&(x<0?l=h:x>0&&(i=a),w<0?d=p:w>0&&(u=c),m=ma,I(t));break;case 32:m===_a&&(t.altKey?(x&&(l=h-P*x,i=a+P*x),w&&(d=p-O*w,u=c+O*w),m=xa):(x<0?l=h:x>0&&(i=a),w<0?d=p:w>0&&(u=c),m=ma),D.attr("cursor",Pa[_]),I(t));break;default:return}va(t)}}function d(t){s(this,arguments).moved(t)}function p(t){s(this,arguments).ended(t)}function y(){var n=this.__brush||{selection:null};return n.extent=Sa(e.apply(this,arguments)),n.dim=t,n}return c.move=function(n,e,r){n.tween?n.on("start.brush",(function(t){s(this,arguments).beforestart().start(t)})).on("interrupt.brush end.brush",(function(t){s(this,arguments).end(t)})).tween("brush",(function(){var n=this,r=n.__brush,i=s(n,arguments),o=r.selection,a=t.input("function"==typeof e?e.apply(this,arguments):e,r.extent),u=Vi(o,a);function c(t){r.selection=1===t&&null===a?null:u(t),f.call(n),i.brush()}return null!==o&&null!==a?c:c(1)})):n.each((function(){var n=this,i=arguments,o=n.__brush,a=t.input("function"==typeof e?e.apply(n,i):e,o.extent),u=s(n,i).beforestart();wo(n),o.selection=null===a?null:a,f.call(n),u.start(r).brush(r).end(r)}))},c.clear=function(t,n){c.move(t,null,n)},l.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,n){return this.starting?(this.starting=!1,this.emit("start",t,n)):this.emit("brush",t),this},brush:function(t,n){return this.emit("brush",t,n),this},end:function(t,n){return 0==--this.active&&(delete this.state.emitter,this.emit("end",t,n)),this},emit:function(n,e,r){var i=qr(this.that).datum();a.call(n,this.that,new ya(n,{sourceEvent:e,target:c,selection:t.output(this.state.selection),mode:r,dispatch:a}),i)}},c.extent=function(t){return arguments.length?(e="function"==typeof t?t:pa(Sa(t)),c):e},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:pa(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:pa(!!t),c):i},c.handleSize=function(t){return arguments.length?(u=+t,c):u},c.keyModifiers=function(t){return arguments.length?(o=!!t,c):o},c.on=function(){var t=a.on.apply(a,arguments);return t===a?c:t},c}var Xa=Math.abs,Va=Math.cos,Ga=Math.sin,Wa=Math.PI,Za=Wa/2,Ka=2*Wa,Qa=Math.max,Ja=1e-12;function tu(t,n){return Array.from({length:n-t},((n,e)=>t+e))}function nu(t){return function(n,e){return t(n.source.value+n.target.value,e.source.value+e.target.value)}}function eu(){return ou(!1,!1)}function ru(){return ou(!1,!0)}function iu(){return ou(!0,!1)}function ou(t,n){var e=0,r=null,i=null,o=null;function a(a){var u,c=a.length,f=new Array(c),s=tu(0,c),l=new Array(c*c),h=new Array(c),d=0;a=Float64Array.from({length:c*c},n?(t,n)=>a[n%c][n/c|0]:(t,n)=>a[n/c|0][n%c]);for(let n=0;nr(f[t],f[n])));for(const e of s){const r=n;if(t){const t=tu(1+~c,c).filter((t=>t<0?a[~t*c+e]:a[e*c+t]));i&&t.sort(((t,n)=>i(t<0?-a[~t*c+e]:a[e*c+t],n<0?-a[~n*c+e]:a[e*c+n])));for(const r of t)r<0?(l[~r*c+e]||(l[~r*c+e]={source:null,target:null})).target={index:e,startAngle:n,endAngle:n+=a[~r*c+e]*d,value:a[~r*c+e]}:(l[e*c+r]||(l[e*c+r]={source:null,target:null})).source={index:e,startAngle:n,endAngle:n+=a[e*c+r]*d,value:a[e*c+r]};h[e]={index:e,startAngle:r,endAngle:n,value:f[e]}}else{const t=tu(0,c).filter((t=>a[e*c+t]||a[t*c+e]));i&&t.sort(((t,n)=>i(a[e*c+t],a[e*c+n])));for(const r of t){let t;if(ecu)if(Math.abs(s*u-c*f)>cu&&i){var h=e-o,d=r-a,p=u*u+c*c,y=h*h+d*d,g=Math.sqrt(p),v=Math.sqrt(l),b=i*Math.tan((au-Math.acos((p+l-y)/(2*g*v)))/2),_=b/v,m=b/g;Math.abs(_-1)>cu&&(this._+="L"+(t+_*f)+","+(n+_*s)),this._+="A"+i+","+i+",0,0,"+ +(s*h>f*d)+","+(this._x1=t+m*u)+","+(this._y1=n+m*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,r,i,o){t=+t,n=+n,o=!!o;var a=(e=+e)*Math.cos(r),u=e*Math.sin(r),c=t+a,f=n+u,s=1^o,l=o?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+c+","+f:(Math.abs(this._x1-c)>cu||Math.abs(this._y1-f)>cu)&&(this._+="L"+c+","+f),e&&(l<0&&(l=l%uu+uu),l>fu?this._+="A"+e+","+e+",0,1,"+s+","+(t-a)+","+(n-u)+"A"+e+","+e+",0,1,"+s+","+(this._x1=c)+","+(this._y1=f):l>cu&&(this._+="A"+e+","+e+",0,"+ +(l>=au)+","+s+","+(this._x1=t+e*Math.cos(i))+","+(this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};const hu=lu;var du=Array.prototype.slice;function pu(t){return function(){return t}}function yu(t){return t.source}function gu(t){return t.target}function vu(t){return t.radius}function bu(t){return t.startAngle}function _u(t){return t.endAngle}function mu(){return 0}function xu(){return 10}function wu(t){var n=yu,e=gu,r=vu,i=vu,o=bu,a=_u,u=mu,c=null;function f(){var f,s=n.apply(this,arguments),l=e.apply(this,arguments),h=u.apply(this,arguments)/2,d=du.call(arguments),p=+r.apply(this,(d[0]=s,d)),y=o.apply(this,d)-Za,g=a.apply(this,d)-Za,v=+i.apply(this,(d[0]=l,d)),b=o.apply(this,d)-Za,_=a.apply(this,d)-Za;if(c||(c=f=hu()),h>Ja&&(Xa(g-y)>2*h+Ja?g>y?(y+=h,g-=h):(y-=h,g+=h):y=g=(y+g)/2,Xa(_-b)>2*h+Ja?_>b?(b+=h,_-=h):(b-=h,_+=h):b=_=(b+_)/2),c.moveTo(p*Va(y),p*Ga(y)),c.arc(0,0,p,y,g),y!==b||g!==_)if(t){var m=+t.apply(this,arguments),x=v-m,w=(b+_)/2;c.quadraticCurveTo(0,0,x*Va(b),x*Ga(b)),c.lineTo(v*Va(w),v*Ga(w)),c.lineTo(x*Va(_),x*Ga(_))}else c.quadraticCurveTo(0,0,v*Va(b),v*Ga(b)),c.arc(0,0,v,b,_);if(c.quadraticCurveTo(0,0,p*Va(y),p*Ga(y)),c.closePath(),f)return c=null,f+""||null}return t&&(f.headRadius=function(n){return arguments.length?(t="function"==typeof n?n:pu(+n),f):t}),f.radius=function(t){return arguments.length?(r=i="function"==typeof t?t:pu(+t),f):r},f.sourceRadius=function(t){return arguments.length?(r="function"==typeof t?t:pu(+t),f):r},f.targetRadius=function(t){return arguments.length?(i="function"==typeof t?t:pu(+t),f):i},f.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:pu(+t),f):o},f.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:pu(+t),f):a},f.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:pu(+t),f):u},f.source=function(t){return arguments.length?(n=t,f):n},f.target=function(t){return arguments.length?(e=t,f):e},f.context=function(t){return arguments.length?(c=null==t?null:t,f):c},f}function Mu(){return wu()}function Tu(){return wu(xu)}const Au=Math.PI/180,Su=180/Math.PI,Eu=.96422,ku=.82521,Nu=4/29,Pu=6/29,Ou=3*Pu*Pu;function Cu(t){if(t instanceof Ru)return new Ru(t.l,t.a,t.b,t.opacity);if(t instanceof Lu)return $u(t);t instanceof di||(t=li(t));var n,e,r=Iu(t.r),i=Iu(t.g),o=Iu(t.b),a=Du((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?n=e=a:(n=Du((.4360747*r+.3850649*i+.1430804*o)/Eu),e=Du((.0139322*r+.0971045*i+.7141733*o)/ku)),new Ru(116*a-16,500*(n-a),200*(a-e),t.opacity)}function ju(t,n){return new Ru(t,0,0,null==n?1:n)}function zu(t,n,e,r){return 1===arguments.length?Cu(t):new Ru(t,n,e,null==r?1:r)}function Ru(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function Du(t){return t>.008856451679035631?Math.pow(t,1/3):t/Ou+Nu}function qu(t){return t>Pu?t*t*t:Ou*(t-Nu)}function Fu(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Iu(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Bu(t){if(t instanceof Lu)return new Lu(t.h,t.c,t.l,t.opacity);if(t instanceof Ru||(t=Cu(t)),0===t.a&&0===t.b)return new Lu(NaN,0()=>t;function oc(t,n){for(var e,r=-1,i=n.length;++rr!=d>r&&e<(h-f)*(r-s)/(d-s)+f&&(i=-i)}return i}function uc(t,n,e){var r,i,o,a;return function(t,n,e){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])}(t,n,e)&&(i=t[r=+(t[0]===n[0])],o=e[r],a=n[r],i<=o&&o<=a||a<=o&&o<=i)}function cc(){}var fc=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function sc(){var t=1,n=1,e=sn,r=u;function i(t){var n=e(t);if(Array.isArray(n))n=n.slice().sort(rc);else{const e=St(t),r=cn(e[0],e[1],n);n=an(Math.floor(e[0]/r)*r,Math.floor(e[1]/r-1)*r,n)}return n.map((n=>o(t,n)))}function o(e,i){var o=[],u=[];return function(e,r,i){var o,u,c,f,s,l,h=new Array,d=new Array;for(o=u=-1,f=e[0]>=r,fc[f<<1].forEach(p);++o=r,fc[c|f<<1].forEach(p);for(fc[f<<0].forEach(p);++u=r,s=e[u*t]>=r,fc[f<<1|s<<2].forEach(p);++o=r,l=s,s=e[u*t+o+1]>=r,fc[c|f<<1|s<<2|l<<3].forEach(p);fc[f|s<<3].forEach(p)}for(o=-1,s=e[u*t]>=r,fc[s<<2].forEach(p);++o=r,fc[s<<2|l<<3].forEach(p);function p(t){var n,e,r=[t[0][0]+o,t[0][1]+u],c=[t[1][0]+o,t[1][1]+u],f=a(r),s=a(c);(n=d[f])?(e=h[s])?(delete d[n.end],delete h[e.start],n===e?(n.ring.push(c),i(n.ring)):h[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[n.end],n.ring.push(c),d[n.end=s]=n):(n=h[s])?(e=d[f])?(delete h[n.start],delete d[e.end],n===e?(n.ring.push(c),i(n.ring)):h[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete h[n.start],n.ring.unshift(r),h[n.start=f]=n):h[f]=d[s]={start:f,end:s,ring:[r,c]}}fc[s<<3].forEach(p)}(e,i,(function(t){r(t,e,i),function(t){for(var n=0,e=t.length,r=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++n0?o.push([t]):u.push(t)})),u.forEach((function(t){for(var n,e=0,r=o.length;e0&&a0&&u=0&&o>=0))throw new Error("invalid size");return t=r,n=o,i},i.thresholds=function(t){return arguments.length?(e="function"==typeof t?t:Array.isArray(t)?ic(ec.call(t)):ic(t),i):e},i.smooth=function(t){return arguments.length?(r=t?u:cc,i):r===u},i}function lc(t){return t[0]}function hc(t){return t[1]}function dc(){return 1}function pc(){var t=lc,n=hc,e=dc,r=960,i=500,o=20,a=2,u=3*o,c=r+2*u>>a,f=i+2*u>>a,s=ic(20);function l(r){var i=new Float32Array(c*f),s=Math.pow(2,-a),l=-1;for(const o of r){var h=(t(o,++l,r)+u)*s,d=(n(o,l,r)+u)*s,p=+e(o,l,r);if(h>=0&&h=0&&dt*r)))(n).map(((t,n)=>(t.value=+e[n],d(t))))}function d(t){return t.coordinates.forEach(p),t}function p(t){t.forEach(y)}function y(t){t.forEach(g)}function g(t){t[0]=t[0]*Math.pow(2,a)-u,t[1]=t[1]*Math.pow(2,a)-u}function v(){return c=r+2*(u=3*o)>>a,f=i+2*u>>a,h}return h.contours=function(t){var n=l(t),e=sc().size([c,f]),r=Math.pow(2,2*a),i=t=>{t=+t;var i=d(e.contour(n,t*r));return i.value=t,i};return Object.defineProperty(i,"max",{get:()=>hn(n)/r}),i},h.x=function(n){return arguments.length?(t="function"==typeof n?n:ic(+n),h):t},h.y=function(t){return arguments.length?(n="function"==typeof t?t:ic(+t),h):n},h.weight=function(t){return arguments.length?(e="function"==typeof t?t:ic(+t),h):e},h.size=function(t){if(!arguments.length)return[r,i];var n=+t[0],e=+t[1];if(!(n>=0&&e>=0))throw new Error("invalid size");return r=n,i=e,v()},h.cellSize=function(t){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(t)/Math.LN2),v()},h.thresholds=function(t){return arguments.length?(s="function"==typeof t?t:Array.isArray(t)?ic(ec.call(t)):ic(t),h):s},h.bandwidth=function(t){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*t*t+1)-1)/2,v()},h}const yc=134217729;function gc(t,n,e,r,i){let o,a,u,c,f=n[0],s=r[0],l=0,h=0;s>f==s>-f?(o=f,f=n[++l]):(o=s,s=r[++h]);let d=0;if(lf==s>-f?(a=f+o,u=o-(a-f),f=n[++l]):(a=s+o,u=o-(a-s),s=r[++h]),o=a,0!==u&&(i[d++]=u);lf==s>-f?(a=o+f,c=a-o,u=o-(a-c)+(f-c),f=n[++l]):(a=o+s,c=a-o,u=o-(a-c)+(s-c),s=r[++h]),o=a,0!==u&&(i[d++]=u);for(;l0!=u>0)return c;const f=Math.abs(a+u);return Math.abs(c)>=33306690738754716e-32*f?c:-function(t,n,e,r,i,o,a){let u,c,f,s,l,h,d,p,y,g,v,b,_,m,x,w,M,T;const A=t-i,S=e-i,E=n-o,k=r-o;m=A*k,h=yc*A,d=h-(h-A),p=A-d,h=yc*k,y=h-(h-k),g=k-y,x=p*g-(m-d*y-p*y-d*g),w=E*S,h=yc*E,d=h-(h-E),p=E-d,h=yc*S,y=h-(h-S),g=S-y,M=p*g-(w-d*y-p*y-d*g),v=x-M,l=x-v,bc[0]=x-(v+l)+(l-M),b=m+v,l=b-m,_=m-(b-l)+(v-l),v=_-w,l=_-v,bc[1]=_-(v+l)+(l-w),T=b+v,l=T-b,bc[2]=b-(T-l)+(v-l),bc[3]=T;let N=function(t,n){let e=n[0];for(let t=1;t<4;t++)e+=n[t];return e}(0,bc),P=22204460492503146e-32*a;if(N>=P||-N>=P)return N;if(l=t-A,u=t-(A+l)+(l-i),l=e-S,f=e-(S+l)+(l-i),l=n-E,c=n-(E+l)+(l-o),l=r-k,s=r-(k+l)+(l-o),0===u&&0===c&&0===f&&0===s)return N;if(P=11093356479670487e-47*a+33306690738754706e-32*Math.abs(N),N+=A*s+k*u-(E*f+S*c),N>=P||-N>=P)return N;m=u*k,h=yc*u,d=h-(h-u),p=u-d,h=yc*k,y=h-(h-k),g=k-y,x=p*g-(m-d*y-p*y-d*g),w=c*S,h=yc*c,d=h-(h-c),p=c-d,h=yc*S,y=h-(h-S),g=S-y,M=p*g-(w-d*y-p*y-d*g),v=x-M,l=x-v,wc[0]=x-(v+l)+(l-M),b=m+v,l=b-m,_=m-(b-l)+(v-l),v=_-w,l=_-v,wc[1]=_-(v+l)+(l-w),T=b+v,l=T-b,wc[2]=b-(T-l)+(v-l),wc[3]=T;const O=gc(4,bc,4,wc,_c);m=A*s,h=yc*A,d=h-(h-A),p=A-d,h=yc*s,y=h-(h-s),g=s-y,x=p*g-(m-d*y-p*y-d*g),w=E*f,h=yc*E,d=h-(h-E),p=E-d,h=yc*f,y=h-(h-f),g=f-y,M=p*g-(w-d*y-p*y-d*g),v=x-M,l=x-v,wc[0]=x-(v+l)+(l-M),b=m+v,l=b-m,_=m-(b-l)+(v-l),v=_-w,l=_-v,wc[1]=_-(v+l)+(l-w),T=b+v,l=T-b,wc[2]=b-(T-l)+(v-l),wc[3]=T;const C=gc(O,_c,4,wc,mc);m=u*s,h=yc*u,d=h-(h-u),p=u-d,h=yc*s,y=h-(h-s),g=s-y,x=p*g-(m-d*y-p*y-d*g),w=c*f,h=yc*c,d=h-(h-c),p=c-d,h=yc*f,y=h-(h-f),g=f-y,M=p*g-(w-d*y-p*y-d*g),v=x-M,l=x-v,wc[0]=x-(v+l)+(l-M),b=m+v,l=b-m,_=m-(b-l)+(v-l),v=_-w,l=_-v,wc[1]=_-(v+l)+(l-w),T=b+v,l=T-b,wc[2]=b-(T-l)+(v-l),wc[3]=T;const j=gc(C,mc,4,wc,xc);return xc[j-1]}(t,n,e,r,i,o,f)}vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(8),vc(8),vc(8),vc(4),vc(8),vc(8),vc(8),vc(12),vc(192),vc(192),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(8),vc(8),vc(8),vc(8),vc(8),vc(8),vc(8),vc(8),vc(8),vc(4),vc(4),vc(4),vc(8),vc(16),vc(16),vc(16),vc(32),vc(32),vc(48),vc(64),vc(1152),vc(1152),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(4),vc(24),vc(24),vc(24),vc(24),vc(24),vc(24),vc(24),vc(24),vc(24),vc(24),vc(1152),vc(1152),vc(1152),vc(1152),vc(1152),vc(2304),vc(2304),vc(3456),vc(5760),vc(8),vc(8),vc(8),vc(16),vc(24),vc(48),vc(48),vc(96),vc(192),vc(384),vc(384),vc(384),vc(768),vc(96),vc(96),vc(96),vc(1152);const Tc=Math.pow(2,-52),Ac=new Uint32Array(512);class Sc{static from(t,n=Cc,e=jc){const r=t.length,i=new Float64Array(2*r);for(let o=0;o>1;if(n>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const e=Math.max(2*n-5,0);this._triangles=new Uint32Array(3*e),this._halfedges=new Int32Array(3*e),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:t,_hullPrev:n,_hullNext:e,_hullTri:r,_hullHash:i}=this,o=t.length>>1;let a=1/0,u=1/0,c=-1/0,f=-1/0;for(let n=0;nc&&(c=e),r>f&&(f=r),this._ids[n]=n}const s=(a+c)/2,l=(u+f)/2;let h,d,p,y=1/0;for(let n=0;n0&&(d=n,y=e)}let b=t[2*d],_=t[2*d+1],m=1/0;for(let n=0;nr&&(n[e++]=i,r=this._dists[i])}return this.hull=n.subarray(0,e),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(Mc(g,v,b,_,x,w)<0){const t=d,n=b,e=_;d=p,b=x,_=w,p=t,x=n,w=e}const M=function(t,n,e,r,i,o){const a=e-t,u=r-n,c=i-t,f=o-n,s=a*a+u*u,l=c*c+f*f,h=.5/(a*f-u*c);return{x:t+(f*s-u*l)*h,y:n+(a*l-c*s)*h}}(g,v,b,_,x,w);this._cx=M.x,this._cy=M.y;for(let n=0;n0&&Math.abs(f-o)<=Tc&&Math.abs(s-a)<=Tc)continue;if(o=f,a=s,c===h||c===d||c===p)continue;let l=0;for(let t=0,n=this._hashKey(f,s);t=0;)if(g=y,g===l){g=-1;break}if(-1===g)continue;let v=this._addTriangle(g,c,e[g],-1,-1,r[g]);r[c]=this._legalize(v+2),r[g]=v,T++;let b=e[g];for(;y=e[b],Mc(f,s,t[2*b],t[2*b+1],t[2*y],t[2*y+1])<0;)v=this._addTriangle(b,c,y,r[c],-1,r[b]),r[c]=this._legalize(v+2),e[b]=b,T--,b=y;if(g===l)for(;y=n[g],Mc(f,s,t[2*y],t[2*y+1],t[2*g],t[2*g+1])<0;)v=this._addTriangle(y,c,g,-1,r[g],r[y]),this._legalize(v+2),r[y]=v,e[g]=g,T--,g=y;this._hullStart=n[c]=g,e[g]=n[b]=c,e[c]=b,i[this._hashKey(f,s)]=c,i[this._hashKey(t[2*g],t[2*g+1])]=g}this.hull=new Uint32Array(T);for(let t=0,n=this._hullStart;t0?3-e:1+e)/4}(t-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:n,_halfedges:e,coords:r}=this;let i=0,o=0;for(;;){const a=e[t],u=t-t%3;if(o=u+(t+2)%3,-1===a){if(0===i)break;t=Ac[--i];continue}const c=a-a%3,f=u+(t+1)%3,s=c+(a+2)%3,l=n[o],h=n[t],d=n[f],p=n[s];if(kc(r[2*l],r[2*l+1],r[2*h],r[2*h+1],r[2*d],r[2*d+1],r[2*p],r[2*p+1])){n[t]=p,n[a]=l;const r=e[s];if(-1===r){let n=this._hullStart;do{if(this._hullTri[n]===s){this._hullTri[n]=t;break}n=this._hullPrev[n]}while(n!==this._hullStart)}this._link(t,r),this._link(a,e[o]),this._link(o,s);const u=c+(a+1)%3;i=e&&n[t[a]]>o;)t[a+1]=t[a--];t[a+1]=r}else{let i=e+1,o=r;Oc(t,e+r>>1,i),n[t[e]]>n[t[r]]&&Oc(t,e,r),n[t[i]]>n[t[r]]&&Oc(t,i,r),n[t[e]]>n[t[i]]&&Oc(t,e,i);const a=t[i],u=n[a];for(;;){do{i++}while(n[t[i]]u);if(o=o-e?(Pc(t,n,i,r),Pc(t,n,e,o-1)):(Pc(t,n,e,o-1),Pc(t,n,i,r))}}function Oc(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function Cc(t){return t[0]}function jc(t){return t[1]}const zc=1e-6;class Rc{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,n){this._+=`L${this._x1=+t},${this._y1=+n}`}arc(t,n,e){const r=(t=+t)+(e=+e),i=n=+n;if(e<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>zc||Math.abs(this._y1-i)>zc)&&(this._+="L"+r+","+i),e&&(this._+=`A${e},${e},0,1,1,${t-e},${n}A${e},${e},0,1,1,${this._x1=r},${this._y1=i}`)}rect(t,n,e,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${+e}v${+r}h${-e}Z`}value(){return this._||null}}class Dc{constructor(){this._=[]}moveTo(t,n){this._.push([t,n])}closePath(){this._.push(this._[0].slice())}lineTo(t,n){this._.push([t,n])}value(){return this._.length?this._:null}}class qc{constructor(t,[n,e,r,i]=[0,0,960,500]){if(!((r=+r)>=(n=+n)&&(i=+i)>=(e=+e)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=r,this.xmin=n,this.ymax=i,this.ymin=e,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:n,triangles:e},vectors:r}=this,i=this.circumcenters=this._circumcenters.subarray(0,e.length/3*2);for(let n,r,o=0,a=0,u=e.length;o1;)i-=2;for(let t=2;t4)for(let t=0;t0){if(n>=this.ymax)return null;(i=(this.ymax-n)/r)0){if(t>=this.xmax)return null;(i=(this.xmax-t)/e)this.xmax?2:0)|(nthis.ymax?8:0)}}const Fc=2*Math.PI,Ic=Math.pow;function Bc(t){return t[0]}function Uc(t){return t[1]}function Yc(t,n,e){return[t+Math.sin(t+n)*e,n+Math.cos(t-n)*e]}class Lc{static from(t,n=Bc,e=Uc,r){return new Lc("length"in t?function(t,n,e,r){const i=t.length,o=new Float64Array(2*i);for(let a=0;a2&&function(t){const{triangles:n,coords:e}=t;for(let t=0;t1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:n.length/2},((t,n)=>n)).sort(((t,e)=>n[2*t]-n[2*e]||n[2*t+1]-n[2*e+1]));const t=this.collinear[0],e=this.collinear[this.collinear.length-1],r=[n[2*t],n[2*t+1],n[2*e],n[2*e+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let t=0,e=n.length/2;t0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],o[r[0]]=1,2===r.length&&(o[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(t){return new qc(this,t)}*neighbors(t){const{inedges:n,hull:e,_hullIndex:r,halfedges:i,triangles:o,collinear:a}=this;if(a){const n=a.indexOf(t);return n>0&&(yield a[n-1]),void(n=0&&i!==e&&i!==r;)e=i;return i}_step(t,n,e){const{inedges:r,hull:i,_hullIndex:o,halfedges:a,triangles:u,points:c}=this;if(-1===r[t]||!c.length)return(t+1)%(c.length>>1);let f=t,s=Ic(n-c[2*t],2)+Ic(e-c[2*t+1],2);const l=r[t];let h=l;do{let r=u[h];const l=Ic(n-c[2*r],2)+Ic(e-c[2*r+1],2);if(l()=>t;function Hc(t,{sourceEvent:n,subject:e,target:r,identifier:i,active:o,x:a,y:u,dx:c,dy:f,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:s}})}function Xc(t){return!t.ctrlKey&&!t.button}function Vc(){return this.parentNode}function Gc(t,n){return null==n?{x:t.x,y:t.y}:n}function Wc(){return navigator.maxTouchPoints||"ontouchstart"in this}function Zc(){var t,n,e,r,i=Xc,o=Vc,a=Gc,u=Wc,c={},f=xe("start","drag","end"),s=0,l=0;function h(t){t.on("mousedown.drag",d).filter(u).on("touchstart.drag",g).on("touchmove.drag",v,Fr).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(a,u){if(!r&&i.call(this,a,u)){var c=_(this,o.call(this,a,u),a,u,"mouse");c&&(qr(a.view).on("mousemove.drag",p,Ir).on("mouseup.drag",y,Ir),Yr(a.view),Br(a),e=!1,t=a.clientX,n=a.clientY,c("start",a))}}function p(r){if(Ur(r),!e){var i=r.clientX-t,o=r.clientY-n;e=i*i+o*o>l}c.mouse("drag",r)}function y(t){qr(t.view).on("mousemove.drag mouseup.drag",null),Lr(t.view,e),Ur(t),c.mouse("end",t)}function g(t,n){if(i.call(this,t,n)){var e,r,a=t.changedTouches,u=o.call(this,t,n),c=a.length;for(e=0;e=o?c=!0:10===(r=t.charCodeAt(a++))?f=!0:13===r&&(f=!0,10===t.charCodeAt(a)&&++a),t.slice(i+1,n-1).replace(/""/g,'"')}for(;a9999?"+"+nf(t,6):nf(t,4)}(t.getUTCFullYear())+"-"+nf(t.getUTCMonth()+1,2)+"-"+nf(t.getUTCDate(),2)+(i?"T"+nf(n,2)+":"+nf(e,2)+":"+nf(r,2)+"."+nf(i,3)+"Z":r?"T"+nf(n,2)+":"+nf(e,2)+":"+nf(r,2)+"Z":e||n?"T"+nf(n,2)+":"+nf(e,2)+"Z":"")}(t):n.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,n){var e,i,o=r(t,(function(t,r){if(e)return e(t,r-1);i=t,e=n?function(t,n){var e=Jc(t);return function(r,i){return n(e(r),i,t)}}(t,n):Jc(t)}));return o.columns=i||[],o},parseRows:r,format:function(n,e){return null==e&&(e=tf(n)),[e.map(a).join(t)].concat(i(n,e)).join("\n")},formatBody:function(t,n){return null==n&&(n=tf(t)),i(t,n).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}}var rf=ef(","),of=rf.parse,af=rf.parseRows,uf=rf.format,cf=rf.formatBody,ff=rf.formatRows,sf=rf.formatRow,lf=rf.formatValue,hf=ef("\t"),df=hf.parse,pf=hf.parseRows,yf=hf.format,gf=hf.formatBody,vf=hf.formatRows,bf=hf.formatRow,_f=hf.formatValue;function mf(t){for(var n in t){var e,r,i=t[n].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(e=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;xf&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=e;else i=null;t[n]=i}return t}const xf=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),wf=t=>+t;function Mf(t){return t*t}function Tf(t){return t*(2-t)}function Af(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var Sf=function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e}(3),Ef=function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(3),kf=function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(3),Nf=Math.PI,Pf=Nf/2;function Of(t){return 1==+t?1:1-Math.cos(t*Pf)}function Cf(t){return Math.sin(t*Pf)}function jf(t){return(1-Math.cos(Nf*t))/2}function zf(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Rf(t){return zf(1-+t)}function Df(t){return 1-zf(t)}function qf(t){return((t*=2)<=1?zf(1-t):2-zf(t-1))/2}function Ff(t){return 1-Math.sqrt(1-t*t)}function If(t){return Math.sqrt(1- --t*t)}function Bf(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Uf=7.5625;function Yf(t){return 1-Lf(1-t)}function Lf(t){return(t=+t)<.36363636363636365?Uf*t*t:t<.7272727272727273?Uf*(t-=.5454545454545454)*t+.75:t<.9090909090909091?Uf*(t-=.8181818181818182)*t+.9375:Uf*(t-=.9545454545454546)*t+.984375}function $f(t){return((t*=2)<=1?1-Lf(1-t):Lf(t-1)+1)/2}var Hf=1.70158,Xf=function t(n){function e(t){return(t=+t)*t*(n*(t-1)+t)}return n=+n,e.overshoot=t,e}(Hf),Vf=function t(n){function e(t){return--t*t*((t+1)*n+t)+1}return n=+n,e.overshoot=t,e}(Hf),Gf=function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(Hf),Wf=2*Math.PI,Zf=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=Wf);function i(t){return n*zf(- --t)*Math.sin((r-t)/e)}return i.amplitude=function(n){return t(n,e*Wf)},i.period=function(e){return t(n,e)},i}(1,.3),Kf=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=Wf);function i(t){return 1-n*zf(t=+t)*Math.sin((t+r)/e)}return i.amplitude=function(n){return t(n,e*Wf)},i.period=function(e){return t(n,e)},i}(1,.3),Qf=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=Wf);function i(t){return((t=2*t-1)<0?n*zf(-t)*Math.sin((r-t)/e):2-n*zf(t)*Math.sin((r+t)/e))/2}return i.amplitude=function(n){return t(n,e*Wf)},i.period=function(e){return t(n,e)},i}(1,.3);function Jf(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function ts(t,n){return fetch(t,n).then(Jf)}function ns(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function es(t,n){return fetch(t,n).then(ns)}function rs(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function is(t,n){return fetch(t,n).then(rs)}function os(t){return function(n,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=void 0),is(n,e).then((function(n){return t(n,r)}))}}function as(t,n,e,r){3===arguments.length&&"function"==typeof e&&(r=e,e=void 0);var i=ef(t);return is(n,e).then((function(t){return i.parse(t,r)}))}var us=os(of),cs=os(df);function fs(t,n){return new Promise((function(e,r){var i=new Image;for(var o in n)i[o]=n[o];i.onerror=r,i.onload=function(){e(i)},i.src=t}))}function ss(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function ls(t,n){return fetch(t,n).then(ss)}function hs(t){return(n,e)=>is(n,e).then((n=>(new DOMParser).parseFromString(n,t)))}const ds=hs("application/xml");var ps=hs("text/html"),ys=hs("image/svg+xml");function gs(t,n){var e,r=1;function i(){var i,o,a=e.length,u=0,c=0;for(i=0;i=(o=(y+v)/2))?y=o:v=o,(s=e>=(a=(g+b)/2))?g=a:b=a,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(u=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===u&&e===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=n>=(o=(y+v)/2))?y=o:v=o,(s=e>=(a=(g+b)/2))?g=a:b=a}while((l=s<<1|f)==(h=(c>=a)<<1|u>=o));return i[h]=d,i[l]=p,t}function bs(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function _s(t){return t[0]}function ms(t){return t[1]}function xs(t,n,e){var r=new ws(null==n?_s:n,null==e?ms:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function ws(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Ms(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var Ts=xs.prototype=ws.prototype;function As(t){return function(){return t}}function Ss(t){return 1e-6*(t()-.5)}function Es(t){return t.x+t.vx}function ks(t){return t.y+t.vy}function Ns(t){var n,e,r,i=1,o=1;function a(){for(var t,a,c,f,s,l,h,d=n.length,p=0;pf+p||os+p||ac.index){var y=f-u.x-u.vx,g=s-u.y-u.vy,v=y*y+g*g;vt.r&&(t.r=t[n].r)}function c(){if(n){var r,i,o=n.length;for(e=new Array(o),r=0;r[u(t,n,r),t])));for(a=0,i=new Array(f);as&&(s=r),il&&(l=i));if(c>s||f>l)return this;for(this.cover(c,f).cover(s,l),e=0;et||t>=i||r>n||n>=o;)switch(u=(nh||(o=c.y0)>d||(a=c.x1)=v)<<1|t>=g)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var b=t-+this._x.call(null,y.data),_=n-+this._y.call(null,y.data),m=b*b+_*_;if(m=(u=(p+g)/2))?p=u:g=u,(s=a>=(c=(y+v)/2))?y=c:v=c,n=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},Ts.removeAll=function(t){for(var n=0,e=t.length;n(t=(1664525*t+1013904223)%js)/js}();function l(){h(),f.call("tick",n),e1?(null==e?u.delete(t):u.set(t,p(e)),n):u.get(t)},find:function(n,e,r){var i,o,a,u,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f1?(f.on(t,e),n):f.on(t)}}}function Fs(){var t,n,e,r,i,o=As(-30),a=1,u=1/0,c=.81;function f(e){var i,o=t.length,a=xs(t,zs,Rs).visitAfter(l);for(r=e,i=0;i=u)){(t.data!==n||t.next)&&(0===l&&(p+=(l=Ss(e))*l),0===h&&(p+=(h=Ss(e))*h),p1?r[0]+r.slice(2):r,+t.slice(e+1)]}function Ls(t){return(t=Ys(Math.abs(t)))?t[1]:NaN}var $s,Hs=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Xs(t){if(!(n=Hs.exec(t)))throw new Error("invalid format: "+t);var n;return new Vs({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Vs(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Gs(t,n){var e=Ys(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Xs.prototype=Vs.prototype,Vs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Ws={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>Gs(100*t,n),r:Gs,s:function(t,n){var e=Ys(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-($s=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Ys(t,Math.max(0,n+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Zs(t){return t}var Ks,Qs,Js,tl=Array.prototype.map,nl=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function el(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?Zs:(n=tl.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(t.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return o.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",u=void 0===t.numerals?Zs:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(tl.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",f=void 0===t.minus?"−":t.minus+"",s=void 0===t.nan?"NaN":t.nan+"";function l(t){var n=(t=Xs(t)).fill,e=t.align,l=t.sign,h=t.symbol,d=t.zero,p=t.width,y=t.comma,g=t.precision,v=t.trim,b=t.type;"n"===b?(y=!0,b="g"):Ws[b]||(void 0===g&&(g=12),v=!0,b="g"),(d||"0"===n&&"="===e)&&(d=!0,n="0",e="=");var _="$"===h?i:"#"===h&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",m="$"===h?o:/[%p]/.test(b)?c:"",x=Ws[b],w=/[defgprs%]/.test(b);function M(t){var i,o,c,h=_,M=m;if("c"===b)M=x(t)+M,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?s:x(Math.abs(t),g),v&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),T&&0==+t&&"+"!==l&&(T=!1),h=(T?"("===l?l:f:"-"===l||"("===l?"":l)+h,M=("s"===b?nl[8+$s/3]:"")+M+(T&&"("===l?")":""),w)for(i=-1,o=t.length;++i(c=t.charCodeAt(i))||c>57){M=(46===c?a+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}y&&!d&&(t=r(t,1/0));var A=h.length+t.length+M.length,S=A>1)+h+t+M+S.slice(A);break;default:t=S+h+t+M}return u(t)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return t+""},M}return{format:l,formatPrefix:function(t,n){var e=l(((t=Xs(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Ls(n)/3))),i=Math.pow(10,-r),o=nl[8+r/3];return function(t){return e(i*t)+o}}}}function rl(t){return Ks=el(t),Qs=Ks.format,Js=Ks.formatPrefix,Ks}function il(t){return Math.max(0,-Ls(Math.abs(t)))}function ol(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ls(n)/3)))-Ls(Math.abs(t)))}function al(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Ls(n)-Ls(t))+1}rl({thousands:",",grouping:[3],currency:["$",""]});var ul=1e-6,cl=1e-12,fl=Math.PI,sl=fl/2,ll=fl/4,hl=2*fl,dl=180/fl,pl=fl/180,yl=Math.abs,gl=Math.atan,vl=Math.atan2,bl=Math.cos,_l=Math.ceil,ml=Math.exp,xl=(Math.floor,Math.hypot),wl=Math.log,Ml=Math.pow,Tl=Math.sin,Al=Math.sign||function(t){return t>0?1:t<0?-1:0},Sl=Math.sqrt,El=Math.tan;function kl(t){return t>1?0:t<-1?fl:Math.acos(t)}function Nl(t){return t>1?sl:t<-1?-sl:Math.asin(t)}function Pl(t){return(t=Tl(t/2))*t}function Ol(){}function Cl(t,n){t&&zl.hasOwnProperty(t.type)&&zl[t.type](t,n)}var jl={Feature:function(t,n){Cl(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,o=bl(n=(n*=pl)/2+ll),a=Tl(n),u=Yl*a,c=Ul*o+u*bl(i),f=u*r*Tl(i);th.add(vl(f,c)),Bl=t,Ul=o,Yl=a}function uh(t){return nh=new Et,ql(t,eh),2*nh}function ch(t){return[vl(t[1],t[0]),Nl(t[2])]}function fh(t){var n=t[0],e=t[1],r=bl(e);return[r*bl(n),r*Tl(n),Tl(e)]}function sh(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function lh(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function hh(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function dh(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function ph(t){var n=Sl(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var yh,gh,vh,bh,_h,mh,xh,wh,Mh,Th,Ah,Sh,Eh,kh,Nh,Ph,Oh={point:Ch,lineStart:zh,lineEnd:Rh,polygonStart:function(){Oh.point=Dh,Oh.lineStart=qh,Oh.lineEnd=Fh,Kl=new Et,eh.polygonStart()},polygonEnd:function(){eh.polygonEnd(),Oh.point=Ch,Oh.lineStart=zh,Oh.lineEnd=Rh,th<0?(Ll=-(Hl=180),$l=-(Xl=90)):Kl>ul?Xl=90:Kl<-1e-6&&($l=-90),Jl[0]=Ll,Jl[1]=Hl},sphere:function(){Ll=-(Hl=180),$l=-(Xl=90)}};function Ch(t,n){Ql.push(Jl=[Ll=t,Hl=t]),n<$l&&($l=n),n>Xl&&(Xl=n)}function jh(t,n){var e=fh([t*pl,n*pl]);if(Zl){var r=lh(Zl,e),i=lh([r[1],-r[0],0],r);ph(i),i=ch(i);var o,a=t-Vl,u=a>0?1:-1,c=i[0]*dl*u,f=yl(a)>180;f^(u*VlXl&&(Xl=o):f^(u*Vl<(c=(c+360)%360-180)&&cXl&&(Xl=n)),f?tIh(Ll,Hl)&&(Hl=t):Ih(t,Hl)>Ih(Ll,Hl)&&(Ll=t):Hl>=Ll?(tHl&&(Hl=t)):t>Vl?Ih(Ll,t)>Ih(Ll,Hl)&&(Hl=t):Ih(t,Hl)>Ih(Ll,Hl)&&(Ll=t)}else Ql.push(Jl=[Ll=t,Hl=t]);n<$l&&($l=n),n>Xl&&(Xl=n),Zl=e,Vl=t}function zh(){Oh.point=jh}function Rh(){Jl[0]=Ll,Jl[1]=Hl,Oh.point=Ch,Zl=null}function Dh(t,n){if(Zl){var e=t-Vl;Kl.add(yl(e)>180?e+(e>0?360:-360):e)}else Gl=t,Wl=n;eh.point(t,n),jh(t,n)}function qh(){eh.lineStart()}function Fh(){Dh(Gl,Wl),eh.lineEnd(),yl(Kl)>ul&&(Ll=-(Hl=180)),Jl[0]=Ll,Jl[1]=Hl,Zl=null}function Ih(t,n){return(n-=t)<0?n+360:n}function Bh(t,n){return t[0]-n[0]}function Uh(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nIh(r[0],r[1])&&(r[1]=i[1]),Ih(i[0],r[1])>Ih(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=0,r=o[e=o.length-1];n<=e;r=i,++n)i=o[n],(u=Ih(r[1],i[0]))>a&&(a=u,Ll=i[0],Hl=r[1])}return Ql=Jl=null,Ll===1/0||$l===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ll,$l],[Hl,Xl]]}var Lh={sphere:Ol,point:$h,lineStart:Xh,lineEnd:Wh,polygonStart:function(){Lh.lineStart=Zh,Lh.lineEnd=Kh},polygonEnd:function(){Lh.lineStart=Xh,Lh.lineEnd=Wh}};function $h(t,n){t*=pl;var e=bl(n*=pl);Hh(e*bl(t),e*Tl(t),Tl(n))}function Hh(t,n,e){++yh,vh+=(t-vh)/yh,bh+=(n-bh)/yh,_h+=(e-_h)/yh}function Xh(){Lh.point=Vh}function Vh(t,n){t*=pl;var e=bl(n*=pl);kh=e*bl(t),Nh=e*Tl(t),Ph=Tl(n),Lh.point=Gh,Hh(kh,Nh,Ph)}function Gh(t,n){t*=pl;var e=bl(n*=pl),r=e*bl(t),i=e*Tl(t),o=Tl(n),a=vl(Sl((a=Nh*o-Ph*i)*a+(a=Ph*r-kh*o)*a+(a=kh*i-Nh*r)*a),kh*r+Nh*i+Ph*o);gh+=a,mh+=a*(kh+(kh=r)),xh+=a*(Nh+(Nh=i)),wh+=a*(Ph+(Ph=o)),Hh(kh,Nh,Ph)}function Wh(){Lh.point=$h}function Zh(){Lh.point=Qh}function Kh(){Jh(Sh,Eh),Lh.point=$h}function Qh(t,n){Sh=t,Eh=n,t*=pl,n*=pl,Lh.point=Jh;var e=bl(n);kh=e*bl(t),Nh=e*Tl(t),Ph=Tl(n),Hh(kh,Nh,Ph)}function Jh(t,n){t*=pl;var e=bl(n*=pl),r=e*bl(t),i=e*Tl(t),o=Tl(n),a=Nh*o-Ph*i,u=Ph*r-kh*o,c=kh*i-Nh*r,f=xl(a,u,c),s=Nl(f),l=f&&-s/f;Mh.add(l*a),Th.add(l*u),Ah.add(l*c),gh+=s,mh+=s*(kh+(kh=r)),xh+=s*(Nh+(Nh=i)),wh+=s*(Ph+(Ph=o)),Hh(kh,Nh,Ph)}function td(t){yh=gh=vh=bh=_h=mh=xh=wh=0,Mh=new Et,Th=new Et,Ah=new Et,ql(t,Lh);var n=+Mh,e=+Th,r=+Ah,i=xl(n,e,r);return ifl?t+Math.round(-t/hl)*hl:t,n]}function id(t,n,e){return(t%=hl)?n||e?ed(ad(t),ud(n,e)):ad(t):n||e?ud(n,e):rd}function od(t){return function(n,e){return[(n+=t)>fl?n-hl:n<-fl?n+hl:n,e]}}function ad(t){var n=od(t);return n.invert=od(-t),n}function ud(t,n){var e=bl(t),r=Tl(t),i=bl(n),o=Tl(n);function a(t,n){var a=bl(n),u=bl(t)*a,c=Tl(t)*a,f=Tl(n),s=f*e+u*r;return[vl(c*i-s*o,u*e-f*r),Nl(s*i+c*o)]}return a.invert=function(t,n){var a=bl(n),u=bl(t)*a,c=Tl(t)*a,f=Tl(n),s=f*i-c*o;return[vl(c*i+f*o,u*e+s*r),Nl(s*e-u*r)]},a}function cd(t){function n(n){return(n=t(n[0]*pl,n[1]*pl))[0]*=dl,n[1]*=dl,n}return t=id(t[0]*pl,t[1]*pl,t.length>2?t[2]*pl:0),n.invert=function(n){return(n=t.invert(n[0]*pl,n[1]*pl))[0]*=dl,n[1]*=dl,n},n}function fd(t,n,e,r,i,o){if(e){var a=bl(n),u=Tl(n),c=r*e;null==i?(i=n+r*hl,o=n-c/2):(i=sd(a,i),o=sd(a,o),(r>0?io)&&(i+=r*hl));for(var f,s=i;r>0?s>o:s1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function dd(t,n){return yl(t[0]-n[0])=0;--o)i.point((s=f[o])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function gd(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r=0?1:-1,S=A*T,E=S>fl,k=g*w;if(c.add(vl(k*A*Tl(S),v*M+k*bl(S))),a+=E?T+A*hl:T,E^p>=e^m>=e){var N=lh(fh(d),fh(_));ph(N);var P=lh(o,N);ph(P);var O=(E^T>=0?-1:1)*Nl(P[2]);(r>O||r===O&&(N[0]||N[1]))&&(u+=E^T>=0?1:-1)}}return(a<-1e-6||a0){for(l||(i.polygonStart(),l=!0),i.lineStart(),t=0;t1&&2&c&&h.push(h.pop().concat(h.shift())),a.push(h.filter(md))}return h}}function md(t){return t.length>1}function xd(t,n){return((t=t.x)[0]<0?t[1]-sl-ul:sl-t[1])-((n=n.x)[0]<0?n[1]-sl-ul:sl-n[1])}rd.invert=rd;const wd=_d((function(){return!0}),(function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,a){var u=o>0?fl:-fl,c=yl(o-e);yl(c-fl)0?sl:-sl),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(o,r),n=0):i!==u&&c>=fl&&(yl(e-i)ul?gl((Tl(n)*(o=bl(r))*Tl(e)-Tl(r)*(i=bl(n))*Tl(t))/(i*o*a)):(n+r)/2}(e,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),n=0),t.point(e=o,r=a),i=u},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var i;if(null==t)i=e*sl,r.point(-fl,i),r.point(0,i),r.point(fl,i),r.point(fl,0),r.point(fl,-i),r.point(0,-i),r.point(-fl,-i),r.point(-fl,0),r.point(-fl,i);else if(yl(t[0]-n[0])>ul){var o=t[0]0,i=yl(n)>ul;function o(t,e){return bl(t)*bl(e)>n}function a(t,e,r){var i=[1,0,0],o=lh(fh(t),fh(e)),a=sh(o,o),u=o[0],c=a-u*u;if(!c)return!r&&t;var f=n*a/c,s=-n*u/c,l=lh(i,o),h=dh(i,f);hh(h,dh(o,s));var d=l,p=sh(h,d),y=sh(d,d),g=p*p-y*(sh(h,h)-1);if(!(g<0)){var v=Sl(g),b=dh(d,(-p-v)/y);if(hh(b,h),b=ch(b),!r)return b;var _,m=t[0],x=e[0],w=t[1],M=e[1];x0^b[1]<(yl(b[0]-m)fl^(m<=b[0]&&b[0]<=x)){var S=dh(d,(-p+v)/y);return hh(S,h),[b,ch(S)]}}}function u(n,e){var i=r?t:fl-t,o=0;return n<-i?o|=1:n>i&&(o|=2),e<-i?o|=4:e>i&&(o|=8),o}return _d(o,(function(t){var n,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],y=o(l,h),g=r?y?0:u(l,h):y?u(l+(l<0?fl:-fl),h):0;if(!n&&(f=c=y)&&t.lineStart(),y!==c&&(!(d=a(n,p))||dd(n,d)||dd(p,d))&&(p[2]=1),y!==c)s=0,y?(t.lineStart(),d=a(p,n),t.point(d[0],d[1])):(d=a(n,p),t.point(d[0],d[1],2),t.lineEnd()),n=d;else if(i&&n&&r^y){var v;g&e||!(v=a(p,n,!0))||(s=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1],3)))}!y||n&&dd(n,p)||t.point(p[0],p[1]),n=p,c=y,e=g},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return s|(f&&c)<<1}}}),(function(n,r,i,o){fd(o,t,e,i,n,r)}),r?[0,-t]:[-fl,t-fl])}var Td,Ad,Sd,Ed,kd=1e9,Nd=-kd;function Pd(t,n,e,r){function i(i,o){return t<=i&&i<=e&&n<=o&&o<=r}function o(i,o,u,f){var s=0,l=0;if(null==i||(s=a(i,u))!==(l=a(o,u))||c(i,o)<0^u>0)do{f.point(0===s||3===s?t:e,s>1?r:n)}while((s=(s+u+4)%4)!==l);else f.point(o[0],o[1])}function a(r,i){return yl(r[0]-t)0?0:3:yl(r[0]-e)0?2:1:yl(r[1]-n)0?1:0:i>0?3:2}function u(t,n){return c(t.x,n.x)}function c(t,n){var e=a(t,1),r=a(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var c,f,s,l,h,d,p,y,g,v,b,_=a,m=hd(),x={point:w,lineStart:function(){x.point=M,f&&f.push(s=[]),v=!0,g=!1,p=y=NaN},lineEnd:function(){c&&(M(l,h),d&&g&&m.rejoin(),c.push(m.result())),x.point=w,g&&_.lineEnd()},polygonStart:function(){_=m,c=[],f=[],b=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,i=f.length;er&&(h-o)*(r-a)>(d-a)*(t-o)&&++n:d<=r&&(h-o)*(r-a)<(d-a)*(t-o)&&--n;return n}(),e=b&&n,i=(c=En(c)).length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&yd(c,u,n,o,a),a.polygonEnd()),_=a,c=f=s=null}};function w(t,n){i(t,n)&&_.point(t,n)}function M(o,a){var u=i(o,a);if(f&&s.push([o,a]),v)l=o,h=a,d=u,v=!1,u&&(_.lineStart(),_.point(o,a));else if(u&&g)_.point(o,a);else{var c=[p=Math.max(Nd,Math.min(kd,p)),y=Math.max(Nd,Math.min(kd,y))],m=[o=Math.max(Nd,Math.min(kd,o)),a=Math.max(Nd,Math.min(kd,a))];!function(t,n,e,r,i,o){var a,u=t[0],c=t[1],f=0,s=1,l=n[0]-u,h=n[1]-c;if(a=e-u,l||!(a>0)){if(a/=l,l<0){if(a0){if(a>s)return;a>f&&(f=a)}if(a=i-u,l||!(a<0)){if(a/=l,l<0){if(a>s)return;a>f&&(f=a)}else if(l>0){if(a0)){if(a/=h,h<0){if(a0){if(a>s)return;a>f&&(f=a)}if(a=o-c,h||!(a<0)){if(a/=h,h<0){if(a>s)return;a>f&&(f=a)}else if(h>0){if(a0&&(t[0]=u+f*l,t[1]=c+f*h),s<1&&(n[0]=u+s*l,n[1]=c+s*h),!0}}}}}(c,m,t,n,e,r)?u&&(_.lineStart(),_.point(o,a),b=!1):(g||(_.lineStart(),_.point(c[0],c[1])),_.point(m[0],m[1]),u||_.lineEnd(),b=!1)}p=o,y=a,g=u}return x}}function Od(){var t,n,e,r=0,i=0,o=960,a=500;return e={stream:function(e){return t&&n===e?t:t=Pd(r,i,o,a)(n=e)},extent:function(u){return arguments.length?(r=+u[0][0],i=+u[0][1],o=+u[1][0],a=+u[1][1],t=n=null,e):[[r,i],[o,a]]}}}var Cd={sphere:Ol,point:Ol,lineStart:function(){Cd.point=zd,Cd.lineEnd=jd},lineEnd:Ol,polygonStart:Ol,polygonEnd:Ol};function jd(){Cd.point=Cd.lineEnd=Ol}function zd(t,n){Ad=t*=pl,Sd=Tl(n*=pl),Ed=bl(n),Cd.point=Rd}function Rd(t,n){t*=pl;var e=Tl(n*=pl),r=bl(n),i=yl(t-Ad),o=bl(i),a=r*Tl(i),u=Ed*e-Sd*r*o,c=Sd*e+Ed*r*o;Td.add(vl(Sl(a*a+u*u),c)),Ad=t,Sd=e,Ed=r}function Dd(t){return Td=new Et,ql(t,Cd),+Td}var qd=[null,null],Fd={type:"LineString",coordinates:qd};function Id(t,n){return qd[0]=t,qd[1]=n,Dd(Fd)}var Bd={Feature:function(t,n){return Yd(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r0&&(i=Id(t[o],t[o-1]))>0&&e<=i&&r<=i&&(e+r-i)*(1-Math.pow((e-r)/i,2))ul})).map(c)).concat(On(_l(o/d)*d,i,d).filter((function(t){return yl(t%y)>ul})).map(f))}return v.lines=function(){return b().map((function(t){return{type:"LineString",coordinates:t}}))},v.outline=function(){return{type:"Polygon",coordinates:[s(r).concat(l(a).slice(1),s(e).reverse().slice(1),l(u).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],u=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),u>a&&(t=u,u=a,a=t),v.precision(g)):[[r,u],[e,a]]},v.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],i=+e[1][1],n>t&&(e=n,n=t,t=e),o>i&&(e=o,o=i,i=e),v.precision(g)):[[n,o],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(p=+t[0],y=+t[1],v):[p,y]},v.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],v):[h,d]},v.precision=function(h){return arguments.length?(g=+h,c=Wd(o,i,90),f=Zd(n,t,g),s=Wd(u,a,90),l=Zd(r,e,g),v):g},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Qd(){return Kd()()}function Jd(t,n){var e=t[0]*pl,r=t[1]*pl,i=n[0]*pl,o=n[1]*pl,a=bl(r),u=Tl(r),c=bl(o),f=Tl(o),s=a*bl(e),l=a*Tl(e),h=c*bl(i),d=c*Tl(i),p=2*Nl(Sl(Pl(o-r)+a*c*Pl(i-e))),y=Tl(p),g=p?function(t){var n=Tl(t*=p)/y,e=Tl(p-t)/y,r=e*s+n*h,i=e*l+n*d,o=e*u+n*f;return[vl(i,r)*dl,vl(o,Sl(r*r+i*i))*dl]}:function(){return[e*dl,r*dl]};return g.distance=p,g}const tp=t=>t;var np,ep,rp,ip,op=new Et,ap=new Et,up={point:Ol,lineStart:Ol,lineEnd:Ol,polygonStart:function(){up.lineStart=cp,up.lineEnd=lp},polygonEnd:function(){up.lineStart=up.lineEnd=up.point=Ol,op.add(yl(ap)),ap=new Et},result:function(){var t=op/2;return op=new Et,t}};function cp(){up.point=fp}function fp(t,n){up.point=sp,np=rp=t,ep=ip=n}function sp(t,n){ap.add(ip*t-rp*n),rp=t,ip=n}function lp(){sp(np,ep)}const hp=up;var dp=1/0,pp=dp,yp=-dp,gp=yp,vp={point:function(t,n){typ&&(yp=t),ngp&&(gp=n)},lineStart:Ol,lineEnd:Ol,polygonStart:Ol,polygonEnd:Ol,result:function(){var t=[[dp,pp],[yp,gp]];return yp=gp=-(pp=dp=1/0),t}};const bp=vp;var _p,mp,xp,wp,Mp=0,Tp=0,Ap=0,Sp=0,Ep=0,kp=0,Np=0,Pp=0,Op=0,Cp={point:jp,lineStart:zp,lineEnd:qp,polygonStart:function(){Cp.lineStart=Fp,Cp.lineEnd=Ip},polygonEnd:function(){Cp.point=jp,Cp.lineStart=zp,Cp.lineEnd=qp},result:function(){var t=Op?[Np/Op,Pp/Op]:kp?[Sp/kp,Ep/kp]:Ap?[Mp/Ap,Tp/Ap]:[NaN,NaN];return Mp=Tp=Ap=Sp=Ep=kp=Np=Pp=Op=0,t}};function jp(t,n){Mp+=t,Tp+=n,++Ap}function zp(){Cp.point=Rp}function Rp(t,n){Cp.point=Dp,jp(xp=t,wp=n)}function Dp(t,n){var e=t-xp,r=n-wp,i=Sl(e*e+r*r);Sp+=i*(xp+t)/2,Ep+=i*(wp+n)/2,kp+=i,jp(xp=t,wp=n)}function qp(){Cp.point=jp}function Fp(){Cp.point=Bp}function Ip(){Up(_p,mp)}function Bp(t,n){Cp.point=Up,jp(_p=xp=t,mp=wp=n)}function Up(t,n){var e=t-xp,r=n-wp,i=Sl(e*e+r*r);Sp+=i*(xp+t)/2,Ep+=i*(wp+n)/2,kp+=i,Np+=(i=wp*t-xp*n)*(xp+t),Pp+=i*(wp+n),Op+=3*i,jp(xp=t,wp=n)}const Yp=Cp;function Lp(t){this._context=t}Lp.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,hl)}},result:Ol};var $p,Hp,Xp,Vp,Gp,Wp=new Et,Zp={point:Ol,lineStart:function(){Zp.point=Kp},lineEnd:function(){$p&&Qp(Hp,Xp),Zp.point=Ol},polygonStart:function(){$p=!0},polygonEnd:function(){$p=null},result:function(){var t=+Wp;return Wp=new Et,t}};function Kp(t,n){Zp.point=Qp,Hp=Vp=t,Xp=Gp=n}function Qp(t,n){Vp-=t,Gp-=n,Wp.add(Sl(Vp*Vp+Gp*Gp)),Vp=t,Gp=n}const Jp=Zp;function ty(){this._string=[]}function ny(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function ey(t,n){var e,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),ql(t,e(r))),r.result()}return o.area=function(t){return ql(t,e(hp)),hp.result()},o.measure=function(t){return ql(t,e(Jp)),Jp.result()},o.bounds=function(t){return ql(t,e(bp)),bp.result()},o.centroid=function(t){return ql(t,e(Yp)),Yp.result()},o.projection=function(n){return arguments.length?(e=null==n?(t=null,tp):(t=n).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(n=null,new ty):new Lp(n=t),"function"!=typeof i&&r.pointRadius(i),o):n},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(n)}function ry(t){return{stream:iy(t)}}function iy(t){return function(n){var e=new oy;for(var r in t)e[r]=t[r];return e.stream=n,e}}function oy(){}function ay(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),ql(e,t.stream(bp)),n(bp.result()),null!=r&&t.clipExtent(r),t}function uy(t,n,e){return ay(t,(function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],o=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),a=+n[0][0]+(r-o*(e[1][0]+e[0][0]))/2,u=+n[0][1]+(i-o*(e[1][1]+e[0][1]))/2;t.scale(150*o).translate([a,u])}),e)}function cy(t,n,e){return uy(t,[[0,0],n],e)}function fy(t,n,e){return ay(t,(function(e){var r=+n,i=r/(e[1][0]-e[0][0]),o=(r-i*(e[1][0]+e[0][0]))/2,a=-i*e[0][1];t.scale(150*i).translate([o,a])}),e)}function sy(t,n,e){return ay(t,(function(e){var r=+n,i=r/(e[1][1]-e[0][1]),o=-i*e[0][0],a=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([o,a])}),e)}ty.prototype={_radius:4.5,_circle:ny(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:null==this._circle&&(this._circle=ny(this._radius)),this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},oy.prototype={constructor:oy,point:function(t,n){this.stream.point(t,n)},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()}};var ly=bl(30*pl);function hy(t,n){return+n?function(t,n){function e(r,i,o,a,u,c,f,s,l,h,d,p,y,g){var v=f-r,b=s-i,_=v*v+b*b;if(_>4*n&&y--){var m=a+h,x=u+d,w=c+p,M=Sl(m*m+x*x+w*w),T=Nl(w/=M),A=yl(yl(w)-1)n||yl((v*N+b*P)/_-.5)>.3||a*h+u*d+c*p2?t[2]%360*pl:0,N()):[g*dl,v*dl,b*dl]},E.angle=function(t){return arguments.length?(_=t%360*pl,N()):_*dl},E.reflectX=function(t){return arguments.length?(m=t?-1:1,N()):m<0},E.reflectY=function(t){return arguments.length?(x=t?-1:1,N()):x<0},E.precision=function(t){return arguments.length?(a=hy(u,S=t*t),P()):Sl(S)},E.fitExtent=function(t,n){return uy(E,t,n)},E.fitSize=function(t,n){return cy(E,t,n)},E.fitWidth=function(t,n){return fy(E,t,n)},E.fitHeight=function(t,n){return sy(E,t,n)},function(){return n=t.apply(this,arguments),E.invert=n.invert&&k,N()}}function vy(t){var n=0,e=fl/3,r=gy(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*pl,e=t[1]*pl):[n*dl,e*dl]},i}function by(t,n){var e=Tl(t),r=(e+Tl(n))/2;if(yl(r)=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:a).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[a.stream(n=e),u.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e0?n<-sl+ul&&(n=-sl+ul):n>sl-ul&&(n=sl-ul);var e=i/Ml(Oy(n),r);return[e*Tl(r*t),i-e*bl(r*t)]}return o.invert=function(t,n){var e=i-n,o=Al(r)*Sl(t*t+e*e),a=vl(t,yl(e))*Al(e);return e*r<0&&(a-=fl*Al(t)*Al(e)),[a/r,2*gl(Ml(i/o,1/r))-sl]},o}function jy(){return vy(Cy).scale(109.5).parallels([30,30])}function zy(t,n){return[t,n]}function Ry(){return yy(zy).scale(152.63)}function Dy(t,n){var e=bl(t),r=t===n?Tl(t):(e-bl(n))/(n-t),i=e/r+t;if(yl(r)2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)}function eg(t,n){return t.parent===n.parent?1:2}function rg(t,n){return t+n.x}function ig(t,n){return Math.max(t,n.y)}function og(){var t=eg,n=1,e=1,r=!1;function i(i){var o,a=0;i.eachAfter((function(n){var e=n.children;e?(n.x=function(t){return t.reduce(rg,0)/t.length}(e),n.y=function(t){return 1+t.reduce(ig,0)}(e)):(n.x=o?a+=t(n,o):0,n.y=0,o=n)}));var u=function(t){for(var n;n=t.children;)t=n[0];return t}(i),c=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(i),f=u.x-t(u,c)/2,s=c.x+t(c,u)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*n,t.y=(i.y-t.y)*e}:function(t){t.x=(t.x-f)/(s-f)*n,t.y=(1-(i.y?t.y/i.y:1))*e})}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i}function ag(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function ug(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=fg)):void 0===n&&(n=cg);for(var e,r,i,o,a,u=new hg(t),c=[u];e=c.pop();)if((i=n(e.data))&&(a=(i=Array.from(i)).length))for(e.children=i,o=a-1;o>=0;--o)c.push(r=i[o]=new hg(i[o])),r.parent=e,r.depth=e.depth+1;return u.eachBefore(lg)}function cg(t){return t.children}function fg(t){return Array.isArray(t)?t[1]:null}function sg(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function lg(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function hg(t){this.data=t,this.depth=this.height=0,this.parent=null}function dg(t){return null==t?null:pg(t)}function pg(t){if("function"!=typeof t)throw new Error;return t}function yg(){return 0}function gg(t){return function(){return t}}Ly.invert=function(t,n){for(var e,r=n,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=e=(r*(Fy+Iy*i+o*(By+Uy*i))-n)/(Fy+3*Iy*i+o*(7*By+9*Uy*i)))*r)*i*i,!(yl(e)ul&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},Zy.invert=My(Nl),Qy.invert=My((function(t){return 2*gl(t)})),tg.invert=function(t,n){return[-n,2*gl(ml(t))-sl]},hg.prototype=ug.prototype={constructor:hg,count:function(){return this.eachAfter(ag)},each:function(t,n){let e=-1;for(const r of this)t.call(n,r,++e,this);return this},eachAfter:function(t,n){for(var e,r,i,o=this,a=[o],u=[],c=-1;o=a.pop();)if(u.push(o),e=o.children)for(r=0,i=e.length;r=0;--r)o.push(e[r]);return this},find:function(t,n){let e=-1;for(const r of this)if(t.call(n,r,++e,this))return r},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return ug(this).eachBefore(sg)},[Symbol.iterator]:function*(){var t,n,e,r,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(yield i,n=i.children)for(e=0,r=n.length;e(t=(1664525*t+1013904223)%vg)/vg}function _g(t){return mg(t,bg())}function mg(t,n){for(var e,r,i=0,o=(t=function(t,n){let e,r,i=t.length;for(;i;)r=n()*i--|0,e=t[i],t[i]=t[r],t[r]=e;return t}(Array.from(t),n)).length,a=[];i0&&e*e>r*r+i*i}function Tg(t,n){for(var e=0;e1e-6?(E+Math.sqrt(E*E-4*S*k))/(2*S):k/E);return{x:r+w+M*N,y:i+T+A*N,r:N}}function kg(t,n,e){var r,i,o,a,u=t.x-n.x,c=t.y-n.y,f=u*u+c*c;f?(i=n.r+e.r,i*=i,a=t.r+e.r,i>(a*=a)?(r=(f+a-i)/(2*f),o=Math.sqrt(Math.max(0,a/f-r*r)),e.x=t.x-r*u-o*c,e.y=t.y-r*c+o*u):(r=(f+i-a)/(2*f),o=Math.sqrt(Math.max(0,i/f-r*r)),e.x=n.x+r*u-o*c,e.y=n.y+r*c+o*u)):(e.x=n.x+e.r,e.y=n.y)}function Ng(t,n){var e=t.r+n.r-1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function Pg(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,o=(n.y*e.r+e.y*n.r)/r;return i*i+o*o}function Og(t){this._=t,this.next=null,this.previous=null}function Cg(t,n){if(!(a=(e=t,t="object"==typeof e&&"length"in e?e:Array.from(e)).length))return 0;var e,r,i,o,a,u,c,f,s,l,h,d;if((r=t[0]).x=0,r.y=0,!(a>1))return r.r;if(i=t[1],r.x=-i.r,i.x=r.r,i.y=0,!(a>2))return r.r+i.r;kg(i,r,o=t[2]),r=new Og(r),i=new Og(i),o=new Og(o),r.next=o.previous=i,i.next=r.previous=o,o.next=i.previous=r;t:for(f=3;ffunction(t){let n=(t=`${t}`).length;return Wg(t,n-1)&&!Wg(t,n-2)&&(t=t.slice(0,-1)),"/"===t[0]?t:`/${t}`}(t(n,e,r)))),e=n.map(Gg),i=new Set(n).add("");for(const t of e)i.has(t)||(i.add(t),n.push(t),e.push(Gg(t)),h.push($g));d=(t,e)=>n[e],p=(t,n)=>e[n]}for(a=0,i=h.length;a=0&&(f=h[t],f.data===$g);--t)f.data=null}if(u.parent=Yg,u.eachBefore((function(t){t.depth=t.parent.depth+1,--i})).eachBefore(lg),u.parent=null,i>0)throw new Error("cycle");return u}return r.id=function(t){return arguments.length?(n=dg(t),r):n},r.parentId=function(t){return arguments.length?(e=dg(t),r):e},r.path=function(n){return arguments.length?(t=dg(n),r):t},r}function Gg(t){let n=t.length;if(n<2)return"";for(;--n>1&&!Wg(t,n););return t.slice(0,n)}function Wg(t,n){if("/"===t[n]){let e=0;for(;n>0&&"\\"===t[--n];)++e;if(0==(1&e))return!0}return!1}function Zg(t,n){return t.parent===n.parent?1:2}function Kg(t){var n=t.children;return n?n[0]:t.t}function Qg(t){var n=t.children;return n?n[n.length-1]:t.t}function Jg(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function tv(t,n,e){return t.a.parent===n.parent?t.a:e}function nv(t,n){this._=t,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=n}function ev(){var t=Zg,n=1,e=1,r=null;function i(i){var c=function(t){for(var n,e,r,i,o,a=new nv(t,0),u=[a];n=u.pop();)if(r=n._.children)for(n.children=new Array(o=r.length),i=o-1;i>=0;--i)u.push(e=n.children[i]=new nv(r[i],i)),e.parent=n;return(a.parent=new nv(null,0)).children=[a],a}(i);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)i.eachBefore(u);else{var f=i,s=i,l=i;i.eachBefore((function(t){t.xs.x&&(s=t),t.depth>l.depth&&(l=t)}));var h=f===s?1:t(f,s)/2,d=h-f.x,p=n/(s.x+h+d),y=e/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*y}))}return i}function o(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){!function(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)(n=i[o]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var o=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-o):n.z=o}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,o=n,a=n,u=e,c=o.parent.children[0],f=o.m,s=a.m,l=u.m,h=c.m;u=Qg(u),o=Kg(o),u&&o;)c=Kg(c),(a=Qg(a)).a=n,(i=u.z+l-o.z-f+t(u._,o._))>0&&(Jg(tv(u,n,r),n,i),f+=i,s+=i),l+=u.m,f+=o.m,h+=c.m,s+=a.m;u&&!Qg(a)&&(a.t=u,a.m+=l-s),o&&!Kg(c)&&(c.t=o,c.m+=f-h,r=n)}return r}(n,i,n.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(t){t.x*=n,t.y=t.depth*e}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i}function rv(t,n,e,r,i){for(var o,a=t.children,u=-1,c=a.length,f=t.value&&(i-e)/t.value;++uh&&(h=u),g=s*s*y,(d=Math.max(h/g,g/l))>p){s-=u;break}p=d}v.push(a={value:s,dice:c1?n:1)},e}(iv);function uv(){var t=av,n=!1,e=1,r=1,i=[0],o=yg,a=yg,u=yg,c=yg,f=yg;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(Ig),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l=e-1){var s=u[n];return s.x0=i,s.y0=o,s.x1=a,void(s.y1=c)}for(var l=f[n],h=r/2+l,d=n+1,p=e-1;d>>1;f[y]c-o){var b=r?(i*v+a*g)/r:a;t(n,d,g,i,o,b,c),t(d,e,v,b,o,a,c)}else{var _=r?(o*v+c*g)/r:c;t(n,d,g,i,o,a,_),t(d,e,v,i,_,a,c)}}(0,c,t.value,n,e,r,i)}function fv(t,n,e,r,i){(1&t.depth?rv:Bg)(t,n,e,r,i)}const sv=function t(n){function e(t,e,r,i,o){if((a=t._squarify)&&a.ratio===n)for(var a,u,c,f,s,l=-1,h=a.length,d=t.value;++l1?n:1)},e}(iv);function lv(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}function hv(t,n){var e=Oi(+t,+n);return function(t){var n=e(t);return n-360*Math.floor(n/360)}}function dv(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}function pv(t){return((t=Math.exp(t))+1/t)/2}const yv=function t(n,e,r){function i(t,i){var o,a,u=t[0],c=t[1],f=t[2],s=i[0],l=i[1],h=i[2],d=s-u,p=l-c,y=d*d+p*p;if(y<1e-12)a=Math.log(h/f)/n,o=function(t){return[u+t*d,c+t*p,f*Math.exp(n*t*a)]};else{var g=Math.sqrt(y),v=(h*h-f*f+r*y)/(2*f*e*g),b=(h*h-f*f-r*y)/(2*h*e*g),_=Math.log(Math.sqrt(v*v+1)-v),m=Math.log(Math.sqrt(b*b+1)-b);a=(m-_)/n,o=function(t){var r,i=t*a,o=pv(_),s=f/(e*g)*(o*(r=n*i+_,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(_));return[u+s*d,c+s*p,f*o/pv(n*i+_)]}}return o.duration=1e3*a*n/Math.SQRT2,o}return i.rho=function(n){var e=Math.max(.001,+n),r=e*e;return t(e,r,r*r)},i}(Math.SQRT2,2,4);function gv(t){return function(n,e){var r=t((n=xi(n)).h,(e=xi(e)).h),i=Ci(n.s,e.s),o=Ci(n.l,e.l),a=Ci(n.opacity,e.opacity);return function(t){return n.h=r(t),n.s=i(t),n.l=o(t),n.opacity=a(t),n+""}}}const vv=gv(Oi);var bv=gv(Ci);function _v(t,n){var e=Ci((t=zu(t)).l,(n=zu(n)).l),r=Ci(t.a,n.a),i=Ci(t.b,n.b),o=Ci(t.opacity,n.opacity);return function(n){return t.l=e(n),t.a=r(n),t.b=i(n),t.opacity=o(n),t+""}}function mv(t){return function(n,e){var r=t((n=Yu(n)).h,(e=Yu(e)).h),i=Ci(n.c,e.c),o=Ci(n.l,e.l),a=Ci(n.opacity,e.opacity);return function(t){return n.h=r(t),n.c=i(t),n.l=o(t),n.opacity=a(t),n+""}}}const xv=mv(Oi);var wv=mv(Ci);function Mv(t){return function n(e){function r(n,r){var i=t((n=tc(n)).h,(r=tc(r)).h),o=Ci(n.s,r.s),a=Ci(n.l,r.l),u=Ci(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=a(Math.pow(t,e)),n.opacity=u(t),n+""}}return e=+e,r.gamma=n,r}(1)}const Tv=Mv(Oi);var Av=Mv(Ci);function Sv(t,n){void 0===n&&(n=t,t=Vi);for(var e=0,r=n.length-1,i=n[0],o=new Array(r<0?0:r);e1&&(o=t[e[i-2]],a=t[e[i-1]],u=t[r],(a[0]-o[0])*(u[1]-o[1])-(a[1]-o[1])*(u[0]-o[0])<=0);)--i;e[i++]=r}var o,a,u;return e.slice(0,i)}function Cv(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n=0;--n)f.push(t[r[o[n]][2]]);for(n=+u;nu!=f>u&&a<(c-e)*(u-r)/(f-r)+e&&(s=!s),c=e,f=r;return s}function zv(t){for(var n,e,r=-1,i=t.length,o=t[i-1],a=o[0],u=o[1],c=0;++r1);return t+e*o*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(Rv),Iv=function t(n){var e=Fv.source(n);function r(){var t=e.apply(this,arguments);return function(){return Math.exp(t())}}return r.source=t,r}(Rv),Bv=function t(n){function e(t){return(t=+t)<=0?()=>0:function(){for(var e=0,r=t;r>1;--r)e+=n();return e+r*n()}}return e.source=t,e}(Rv),Uv=function t(n){var e=Bv.source(n);function r(t){if(0==(t=+t))return n;var r=e(t);return function(){return r()/t}}return r.source=t,r}(Rv),Yv=function t(n){function e(t){return function(){return-Math.log1p(-n())/t}}return e.source=t,e}(Rv),Lv=function t(n){function e(t){if((t=+t)<0)throw new RangeError("invalid alpha");return t=1/-t,function(){return Math.pow(1-n(),t)}}return e.source=t,e}(Rv),$v=function t(n){function e(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return function(){return Math.floor(n()+t)}}return e.source=t,e}(Rv),Hv=function t(n){function e(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return 0===t?()=>1/0:1===t?()=>1:(t=Math.log1p(-t),function(){return 1+Math.floor(Math.log1p(-n())/t)})}return e.source=t,e}(Rv),Xv=function t(n){var e=Fv.source(n)();function r(t,r){if((t=+t)<0)throw new RangeError("invalid k");if(0===t)return()=>0;if(r=null==r?1:+r,1===t)return()=>-Math.log1p(-n())*r;var i=(t<1?t+1:t)-1/3,o=1/(3*Math.sqrt(i)),a=t<1?()=>Math.pow(n(),1/t):()=>1;return function(){do{do{var t=e(),u=1+o*t}while(u<=0);u*=u*u;var c=1-n()}while(c>=1-.0331*t*t*t*t&&Math.log(c)>=.5*t*t+i*(1-u+Math.log(u)));return i*u*a()*r}}return r.source=t,r}(Rv),Vv=function t(n){var e=Xv.source(n);function r(t,n){var r=e(t),i=e(n);return function(){var t=r();return 0===t?0:t/(t+i())}}return r.source=t,r}(Rv),Gv=function t(n){var e=Hv.source(n),r=Vv.source(n);function i(t,n){return t=+t,(n=+n)>=1?()=>t:n<=0?()=>0:function(){for(var i=0,o=t,a=n;o*a>16&&o*(1-a)>16;){var u=Math.floor((o+1)*a),c=r(u,o-u+1)();c<=a?(i+=u,o-=u,a=(a-c)/(1-c)):(o=u-1,a/=c)}for(var f=a<.5,s=e(f?a:1-a),l=s(),h=0;l<=o;++h)l+=s();return i+(f?h:o-h)}}return i.source=t,i}(Rv),Wv=function t(n){function e(t,e,r){var i;return 0==(t=+t)?i=t=>-Math.log(t):(t=1/t,i=n=>Math.pow(n,t)),e=null==e?0:+e,r=null==r?1:+r,function(){return e+r*i(-Math.log1p(-n()))}}return e.source=t,e}(Rv),Zv=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,function(){return t+e*Math.tan(Math.PI*n())}}return e.source=t,e}(Rv),Kv=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,function(){var r=n();return t+e*Math.log(r/(1-r))}}return e.source=t,e}(Rv),Qv=function t(n){var e=Xv.source(n),r=Gv.source(n);function i(t){return function(){for(var i=0,o=t;o>16;){var a=Math.floor(.875*o),u=e(a)();if(u>o)return i+r(a-1,o/u)();i+=a,o-=u}for(var c=-Math.log1p(-n()),f=0;c<=o;++f)c-=Math.log1p(-n());return i+f}}return i.source=t,i}(Rv),Jv=1/4294967296;function tb(t=Math.random()){let n=0|(0<=t&&t<1?t/Jv:Math.abs(t));return()=>(n=1664525*n+1013904223|0,Jv*(n>>>0))}function nb(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function eb(t,n){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof n?this.interpolator(n):this.range(n)}return this}const rb=Symbol("implicit");function ib(){var t=new Pt,n=[],e=[],r=rb;function i(i){let o=t.get(i);if(void 0===o){if(r!==rb)return r;t.set(i,o=n.push(i)-1)}return e[o%e.length]}return i.domain=function(e){if(!arguments.length)return n.slice();n=[],t=new Pt;for(const r of e)t.has(r)||t.set(r,n.push(r)-1);return i},i.range=function(t){return arguments.length?(e=Array.from(t),i):e.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return ib(n,e).unknown(r)},nb.apply(i,arguments),i}function ob(){var t,n,e=ib().unknown(void 0),r=e.domain,i=e.range,o=0,a=1,u=!1,c=0,f=0,s=.5;function l(){var e=r().length,l=an&&(e=t,t=n,n=e),f=function(e){return Math.max(t,Math.min(n,e))}),r=c>2?db:hb,i=o=null,l}function l(n){return null==n||isNaN(n=+n)?e:(i||(i=r(a.map(t),u,c)))(t(f(n)))}return l.invert=function(e){return f(n((o||(o=r(u,a.map(t),Yi)))(e)))},l.domain=function(t){return arguments.length?(a=Array.from(t,cb),s()):a.slice()},l.range=function(t){return arguments.length?(u=Array.from(t),s()):u.slice()},l.rangeRound=function(t){return u=Array.from(t),c=dv,s()},l.clamp=function(t){return arguments.length?(f=!!t||sb,s()):f!==sb},l.interpolate=function(t){return arguments.length?(c=t,s()):c},l.unknown=function(t){return arguments.length?(e=t,l):e},function(e,r){return t=e,n=r,s()}}function gb(){return yb()(sb,sb)}function vb(t,n,e,r){var i,o=cn(t,n,e);switch((r=Xs(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(n));return null!=r.precision||isNaN(i=ol(o,a))||(r.precision=i),Js(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=al(o,Math.max(Math.abs(t),Math.abs(n))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=il(o))||(r.precision=i-2*("%"===r.type))}return Qs(r)}function bb(t){var n=t.domain;return t.ticks=function(t){var e=n();return an(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return vb(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i,o=n(),a=0,u=o.length-1,c=o[a],f=o[u],s=10;for(f0;){if((i=un(c,f,e))===r)return o[a]=c,o[u]=f,n(o);if(i>0)c=Math.floor(c/i)*i,f=Math.ceil(f/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,f=Math.floor(f*i)/i}r=i}return t},t}function _b(){var t=gb();return t.copy=function(){return pb(t,_b())},nb.apply(t,arguments),bb(t)}function mb(t){var n;function e(t){return null==t||isNaN(t=+t)?n:t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=Array.from(n,cb),e):t.slice()},e.unknown=function(t){return arguments.length?(n=t,e):n},e.copy=function(){return mb(t).unknown(n)},t=arguments.length?Array.from(t,cb):[0,1],bb(e)}function xb(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a-t(-n,e)}function kb(t){const n=t(wb,Mb),e=n.domain;let r,i,o=10;function a(){return r=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),n=>Math.log(n)/t)}(o),i=function(t){return 10===t?Sb:t===Math.E?Math.exp:n=>Math.pow(t,n)}(o),e()[0]<0?(r=Eb(r),i=Eb(i),t(Tb,Ab)):t(wb,Mb),n}return n.base=function(t){return arguments.length?(o=+t,a()):o},n.domain=function(t){return arguments.length?(e(t),a()):e()},n.ticks=t=>{const n=e();let a=n[0],u=n[n.length-1];const c=u0){for(;l<=h;++l)for(f=1;fu)break;p.push(s)}}else for(;l<=h;++l)for(f=o-1;f>=1;--f)if(s=l>0?f/i(-l):f*i(l),!(su)break;p.push(s)}2*p.length{if(null==t&&(t=10),null==e&&(e=10===o?"s":","),"function"!=typeof e&&(o%1||null!=(e=Xs(e)).precision||(e.trim=!0),e=Qs(e)),t===1/0)return e;const a=Math.max(1,o*t/n.ticks().length);return t=>{let n=t/i(Math.round(r(t)));return n*oe(xb(e(),{floor:t=>i(Math.floor(r(t))),ceil:t=>i(Math.ceil(r(t)))})),n}function Nb(){const t=kb(yb()).domain([1,10]);return t.copy=()=>pb(t,Nb()).base(t.base()),nb.apply(t,arguments),t}function Pb(t){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/t))}}function Ob(t){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*t}}function Cb(t){var n=1,e=t(Pb(n),Ob(n));return e.constant=function(e){return arguments.length?t(Pb(n=+e),Ob(n)):n},bb(e)}function jb(){var t=Cb(yb());return t.copy=function(){return pb(t,jb()).constant(t.constant())},nb.apply(t,arguments)}function zb(t){return function(n){return n<0?-Math.pow(-n,t):Math.pow(n,t)}}function Rb(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Db(t){return t<0?-t*t:t*t}function qb(t){var n=t(sb,sb),e=1;function r(){return 1===e?t(sb,sb):.5===e?t(Rb,Db):t(zb(e),zb(1/e))}return n.exponent=function(t){return arguments.length?(e=+t,r()):e},bb(n)}function Fb(){var t=qb(yb());return t.copy=function(){return pb(t,Fb()).exponent(t.exponent())},nb.apply(t,arguments),t}function Ib(){return Fb.apply(null,arguments).exponent(.5)}function Bb(t){return Math.sign(t)*t*t}function Ub(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Yb(){var t,n=gb(),e=[0,1],r=!1;function i(e){var i=Ub(n(e));return isNaN(i)?t:r?Math.round(i):i}return i.invert=function(t){return n.invert(Bb(t))},i.domain=function(t){return arguments.length?(n.domain(t),i):n.domain()},i.range=function(t){return arguments.length?(n.range((e=Array.from(t,cb)).map(Bb)),i):e.slice()},i.rangeRound=function(t){return i.range(t).round(!0)},i.round=function(t){return arguments.length?(r=!!t,i):r},i.clamp=function(t){return arguments.length?(n.clamp(t),i):n.clamp()},i.unknown=function(n){return arguments.length?(t=n,i):t},i.copy=function(){return Yb(n.domain(),e).round(r).clamp(n.clamp()).unknown(t)},nb.apply(i,arguments),bb(i)}function Lb(){var t,n=[],e=[],r=[];function i(){var t=0,i=Math.max(1,e.length);for(r=new Array(i-1);++t0?r[i-1]:n[0],i=r?[i[r-1],e]:[i[a-1],i[a]]},a.unknown=function(n){return arguments.length?(t=n,a):a},a.thresholds=function(){return i.slice()},a.copy=function(){return $b().domain([n,e]).range(o).unknown(t)},nb.apply(bb(a),arguments)}function Hb(){var t,n=[.5],e=[0,1],r=1;function i(i){return null!=i&&i<=i?e[st(n,i,0,r)]:t}return i.domain=function(t){return arguments.length?(n=Array.from(t),r=Math.min(n.length,e.length-1),i):n.slice()},i.range=function(t){return arguments.length?(e=Array.from(t),r=Math.min(n.length,e.length-1),i):e.slice()},i.invertExtent=function(t){var r=e.indexOf(t);return[n[r-1],n[r]]},i.unknown=function(n){return arguments.length?(t=n,i):t},i.copy=function(){return Hb().domain(n).range(e).unknown(t)},nb.apply(i,arguments)}const Xb=1e3,Vb=6e4,Gb=36e5,Wb=864e5,Zb=6048e5,Kb=31536e6;var Qb=new Date,Jb=new Date;function t_(t,n,e,r){function i(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return i.floor=function(n){return t(n=new Date(+n)),n},i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n0))return u;do{u.push(a=new Date(+e)),n(e,o),t(e)}while(a=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););}))},e&&(i.count=function(n,r){return Qb.setTime(+n),Jb.setTime(+r),t(Qb),t(Jb),Math.floor(e(Qb,Jb))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}var n_=t_((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));n_.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?t_((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):n_:null};const e_=n_;var r_=n_.range,i_=t_((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,n){t.setTime(+t+n*Xb)}),(function(t,n){return(n-t)/Xb}),(function(t){return t.getUTCSeconds()}));const o_=i_;var a_=i_.range,u_=t_((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Xb)}),(function(t,n){t.setTime(+t+n*Vb)}),(function(t,n){return(n-t)/Vb}),(function(t){return t.getMinutes()}));const c_=u_;var f_=u_.range,s_=t_((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Xb-t.getMinutes()*Vb)}),(function(t,n){t.setTime(+t+n*Gb)}),(function(t,n){return(n-t)/Gb}),(function(t){return t.getHours()}));const l_=s_;var h_=s_.range,d_=t_((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Vb)/Wb),(t=>t.getDate()-1));const p_=d_;var y_=d_.range;function g_(t){return t_((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Vb)/Zb}))}var v_=g_(0),b_=g_(1),__=g_(2),m_=g_(3),x_=g_(4),w_=g_(5),M_=g_(6),T_=v_.range,A_=b_.range,S_=__.range,E_=m_.range,k_=x_.range,N_=w_.range,P_=M_.range,O_=t_((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));const C_=O_;var j_=O_.range,z_=t_((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));z_.every=function(t){return isFinite(t=Math.floor(t))&&t>0?t_((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,e){n.setFullYear(n.getFullYear()+e*t)})):null};const R_=z_;var D_=z_.range,q_=t_((function(t){t.setUTCSeconds(0,0)}),(function(t,n){t.setTime(+t+n*Vb)}),(function(t,n){return(n-t)/Vb}),(function(t){return t.getUTCMinutes()}));const F_=q_;var I_=q_.range,B_=t_((function(t){t.setUTCMinutes(0,0,0)}),(function(t,n){t.setTime(+t+n*Gb)}),(function(t,n){return(n-t)/Gb}),(function(t){return t.getUTCHours()}));const U_=B_;var Y_=B_.range,L_=t_((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/Wb}),(function(t){return t.getUTCDate()-1}));const $_=L_;var H_=L_.range;function X_(t){return t_((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/Zb}))}var V_=X_(0),G_=X_(1),W_=X_(2),Z_=X_(3),K_=X_(4),Q_=X_(5),J_=X_(6),tm=V_.range,nm=G_.range,em=W_.range,rm=Z_.range,im=K_.range,om=Q_.range,am=J_.range,um=t_((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCMonth(t.getUTCMonth()+n)}),(function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}));const cm=um;var fm=um.range,sm=t_((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));sm.every=function(t){return isFinite(t=Math.floor(t))&&t>0?t_((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null};const lm=sm;var hm=sm.range;function dm(t,n,e,r,i,o){const a=[[o_,1,Xb],[o_,5,5e3],[o_,15,15e3],[o_,30,3e4],[o,1,Vb],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,Gb],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,Wb],[r,2,1728e5],[e,1,Zb],[n,1,2592e6],[n,3,7776e6],[t,1,Kb]];function u(n,e,r){const i=Math.abs(e-n)/r,o=et((([,,t])=>t)).right(a,i);if(o===a.length)return t.every(cn(n/Kb,e/Kb,r));if(0===o)return e_.every(Math.max(cn(n,e,r),1));const[u,c]=a[i/a[o-1][2]=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Yx,s:Lx,S:fx,u:sx,U:lx,V:dx,w:px,W:yx,x:null,X:null,y:gx,Y:bx,Z:mx,"%":Ux},m={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:xx,e:xx,f:Sx,g:qx,G:Ix,H:wx,I:Mx,j:Tx,L:Ax,m:Ex,M:kx,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Yx,s:Lx,S:Nx,u:Px,U:Ox,V:jx,w:zx,W:Rx,x:null,X:null,y:Dx,Y:Fx,Z:Bx,"%":Ux},x={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p.get(r[0].toLowerCase()),e+r[0].length):-1},A:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h.get(r[0].toLowerCase()),e+r[0].length):-1},b:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=b.get(r[0].toLowerCase()),e+r[0].length):-1},B:function(t,n,e){var r=y.exec(n.slice(e));return r?(t.m=g.get(r[0].toLowerCase()),e+r[0].length):-1},c:function(t,e,r){return T(t,n,e,r)},d:Hm,e:Hm,f:Km,g:Um,G:Bm,H:Vm,I:Vm,j:Xm,L:Zm,m:$m,M:Gm,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s.get(r[0].toLowerCase()),e+r[0].length):-1},q:Lm,Q:Jm,s:tx,S:Wm,u:Dm,U:qm,V:Fm,w:Rm,W:Im,x:function(t,n,r){return T(t,e,n,r)},X:function(t,n,e){return T(t,r,n,e)},y:Um,Y:Bm,Z:Ym,"%":Qm};function w(t,n){return function(e){var r,i,o,a=[],u=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++u53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=_m(mm(o.y,0,1))).getUTCDay(),r=i>4||0===i?G_.ceil(r):G_(r),r=$_.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=bm(mm(o.y,0,1))).getDay(),r=i>4||0===i?b_.ceil(r):b_(r),r=p_.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?_m(mm(o.y,0,1)).getUTCDay():bm(mm(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,_m(o)):bm(o)}}function T(t,n,e,r){for(var i,o,a=0,u=n.length,c=e.length;a=c)return-1;if(37===(i=n.charCodeAt(a++))){if(i=n.charAt(a++),!(o=x[i in Em?n.charAt(a++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return _.x=w(e,_),_.X=w(r,_),_.c=w(n,_),m.x=w(e,m),m.X=w(r,m),m.c=w(n,m),{format:function(t){var n=w(t+="",_);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=w(t+="",m);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t+="",!0);return n.toString=function(){return t},n}}}var wm,Mm,Tm,Am,Sm,Em={"-":"",_:" ",0:"0"},km=/^\s*\d+/,Nm=/^%/,Pm=/[\\^$*+?|[\]().{}]/g;function Om(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o[t.toLowerCase(),n])))}function Rm(t,n,e){var r=km.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function Dm(t,n,e){var r=km.exec(n.slice(e,e+1));return r?(t.u=+r[0],e+r[0].length):-1}function qm(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.U=+r[0],e+r[0].length):-1}function Fm(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.V=+r[0],e+r[0].length):-1}function Im(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.W=+r[0],e+r[0].length):-1}function Bm(t,n,e){var r=km.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function Um(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function Ym(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function Lm(t,n,e){var r=km.exec(n.slice(e,e+1));return r?(t.q=3*r[0]-3,e+r[0].length):-1}function $m(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Hm(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Xm(t,n,e){var r=km.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function Vm(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function Gm(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function Wm(t,n,e){var r=km.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function Zm(t,n,e){var r=km.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function Km(t,n,e){var r=km.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function Qm(t,n,e){var r=Nm.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function Jm(t,n,e){var r=km.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function tx(t,n,e){var r=km.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function nx(t,n){return Om(t.getDate(),n,2)}function ex(t,n){return Om(t.getHours(),n,2)}function rx(t,n){return Om(t.getHours()%12||12,n,2)}function ix(t,n){return Om(1+p_.count(R_(t),t),n,3)}function ox(t,n){return Om(t.getMilliseconds(),n,3)}function ax(t,n){return ox(t,n)+"000"}function ux(t,n){return Om(t.getMonth()+1,n,2)}function cx(t,n){return Om(t.getMinutes(),n,2)}function fx(t,n){return Om(t.getSeconds(),n,2)}function sx(t){var n=t.getDay();return 0===n?7:n}function lx(t,n){return Om(v_.count(R_(t)-1,t),n,2)}function hx(t){var n=t.getDay();return n>=4||0===n?x_(t):x_.ceil(t)}function dx(t,n){return t=hx(t),Om(x_.count(R_(t),t)+(4===R_(t).getDay()),n,2)}function px(t){return t.getDay()}function yx(t,n){return Om(b_.count(R_(t)-1,t),n,2)}function gx(t,n){return Om(t.getFullYear()%100,n,2)}function vx(t,n){return Om((t=hx(t)).getFullYear()%100,n,2)}function bx(t,n){return Om(t.getFullYear()%1e4,n,4)}function _x(t,n){var e=t.getDay();return Om((t=e>=4||0===e?x_(t):x_.ceil(t)).getFullYear()%1e4,n,4)}function mx(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Om(n/60|0,"0",2)+Om(n%60,"0",2)}function xx(t,n){return Om(t.getUTCDate(),n,2)}function wx(t,n){return Om(t.getUTCHours(),n,2)}function Mx(t,n){return Om(t.getUTCHours()%12||12,n,2)}function Tx(t,n){return Om(1+$_.count(lm(t),t),n,3)}function Ax(t,n){return Om(t.getUTCMilliseconds(),n,3)}function Sx(t,n){return Ax(t,n)+"000"}function Ex(t,n){return Om(t.getUTCMonth()+1,n,2)}function kx(t,n){return Om(t.getUTCMinutes(),n,2)}function Nx(t,n){return Om(t.getUTCSeconds(),n,2)}function Px(t){var n=t.getUTCDay();return 0===n?7:n}function Ox(t,n){return Om(V_.count(lm(t)-1,t),n,2)}function Cx(t){var n=t.getUTCDay();return n>=4||0===n?K_(t):K_.ceil(t)}function jx(t,n){return t=Cx(t),Om(K_.count(lm(t),t)+(4===lm(t).getUTCDay()),n,2)}function zx(t){return t.getUTCDay()}function Rx(t,n){return Om(G_.count(lm(t)-1,t),n,2)}function Dx(t,n){return Om(t.getUTCFullYear()%100,n,2)}function qx(t,n){return Om((t=Cx(t)).getUTCFullYear()%100,n,2)}function Fx(t,n){return Om(t.getUTCFullYear()%1e4,n,4)}function Ix(t,n){var e=t.getUTCDay();return Om((t=e>=4||0===e?K_(t):K_.ceil(t)).getUTCFullYear()%1e4,n,4)}function Bx(){return"+0000"}function Ux(){return"%"}function Yx(t){return+t}function Lx(t){return Math.floor(+t/1e3)}function $x(t){return wm=xm(t),Mm=wm.format,Tm=wm.parse,Am=wm.utcFormat,Sm=wm.utcParse,wm}function Hx(t){return new Date(t)}function Xx(t){return t instanceof Date?+t:+new Date(+t)}function Vx(t,n,e,r,i,o,a,u,c,f){var s=gb(),l=s.invert,h=s.domain,d=f(".%L"),p=f(":%S"),y=f("%I:%M"),g=f("%I %p"),v=f("%a %d"),b=f("%b %d"),_=f("%B"),m=f("%Y");function x(t){return(c(t)n(r/(t.length-1))))},e.quantiles=function(n){return Array.from({length:n+1},((e,r)=>_n(t,r/n)))},e.copy=function(){return rw(n).domain(t)},eb.apply(e,arguments)}function iw(){var t,n,e,r,i,o,a,u=0,c=.5,f=1,s=1,l=sb,h=!1;function d(t){return isNaN(t=+t)?a:(t=.5+((t=+o(t))-n)*(s*tRi(t[t.length-1]);var ww=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(sw);const Mw=xw(ww);var Tw=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(sw);const Aw=xw(Tw);var Sw=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(sw);const Ew=xw(Sw);var kw=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(sw);const Nw=xw(kw);var Pw=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(sw);const Ow=xw(Pw);var Cw=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(sw);const jw=xw(Cw);var zw=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(sw);const Rw=xw(zw);var Dw=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(sw);const qw=xw(Dw);var Fw=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(sw);const Iw=xw(Fw);var Bw=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(sw);const Uw=xw(Bw);var Yw=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(sw);const Lw=xw(Yw);var $w=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(sw);const Hw=xw($w);var Xw=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(sw);const Vw=xw(Xw);var Gw=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(sw);const Ww=xw(Gw);var Zw=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(sw);const Kw=xw(Zw);var Qw=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(sw);const Jw=xw(Qw);var tM=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(sw);const nM=xw(tM);var eM=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(sw);const rM=xw(eM);var iM=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(sw);const oM=xw(iM);var aM=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(sw);const uM=xw(aM);var cM=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(sw);const fM=xw(cM);var sM=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(sw);const lM=xw(sM);var hM=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(sw);const dM=xw(hM);var pM=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(sw);const yM=xw(pM);var gM=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(sw);const vM=xw(gM);var bM=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(sw);const _M=xw(bM);var mM=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(sw);const xM=xw(mM);function wM(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"}const MM=Av(tc(300,.5,0),tc(-240,.5,1));var TM=Av(tc(-100,.75,.35),tc(80,1.5,.8)),AM=Av(tc(260,.75,.35),tc(80,1.5,.8)),SM=tc();function EM(t){(t<0||t>1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return SM.h=360*t-100,SM.s=1.5-1.5*n,SM.l=.8-.9*n,SM+""}var kM=hi(),NM=Math.PI/3,PM=2*Math.PI/3;function OM(t){var n;return t=(.5-t)*Math.PI,kM.r=255*(n=Math.sin(t))*n,kM.g=255*(n=Math.sin(t+NM))*n,kM.b=255*(n=Math.sin(t+PM))*n,kM+""}function CM(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function jM(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}const zM=jM(sw("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var RM=jM(sw("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),DM=jM(sw("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),qM=jM(sw("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function FM(t){return qr(wr(t).call(document.documentElement))}var IM=0;function BM(){return new UM}function UM(){this._="@"+(++IM).toString(36)}function YM(t,n){return t.target&&(t=Gi(t),void 0===n&&(n=t.currentTarget),t=t.touches||[t]),Array.from(t,(t=>Wi(t,n)))}function LM(t){return"string"==typeof t?new zr([document.querySelectorAll(t)],[document.documentElement]):new zr([Te(t)],jr)}function $M(t){return function(){return t}}UM.prototype=BM.prototype={constructor:UM,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};const HM=Math.abs,XM=Math.atan2,VM=Math.cos,GM=Math.max,WM=Math.min,ZM=Math.sin,KM=Math.sqrt,QM=1e-12,JM=Math.PI,tT=JM/2,nT=2*JM;function eT(t){return t>1?0:t<-1?JM:Math.acos(t)}function rT(t){return t>=1?tT:t<=-1?-tT:Math.asin(t)}function iT(t){return t.innerRadius}function oT(t){return t.outerRadius}function aT(t){return t.startAngle}function uT(t){return t.endAngle}function cT(t){return t&&t.padAngle}function fT(t,n,e,r,i,o,a,u){var c=e-t,f=r-n,s=a-i,l=u-o,h=l*c-s*f;if(!(h*hP*P+O*O&&(T=S,A=E),{cx:T,cy:A,x01:-s,y01:-l,x11:T*(i/x-1),y11:A*(i/x-1)}}function lT(){var t=iT,n=oT,e=$M(0),r=null,i=aT,o=uT,a=cT,u=null;function c(){var c,f,s=+t.apply(this,arguments),l=+n.apply(this,arguments),h=i.apply(this,arguments)-tT,d=o.apply(this,arguments)-tT,p=HM(d-h),y=d>h;if(u||(u=c=hu()),lQM)if(p>nT-QM)u.moveTo(l*VM(h),l*ZM(h)),u.arc(0,0,l,h,d,!y),s>QM&&(u.moveTo(s*VM(d),s*ZM(d)),u.arc(0,0,s,d,h,y));else{var g,v,b=h,_=d,m=h,x=d,w=p,M=p,T=a.apply(this,arguments)/2,A=T>QM&&(r?+r.apply(this,arguments):KM(s*s+l*l)),S=WM(HM(l-s)/2,+e.apply(this,arguments)),E=S,k=S;if(A>QM){var N=rT(A/s*ZM(T)),P=rT(A/l*ZM(T));(w-=2*N)>QM?(m+=N*=y?1:-1,x-=N):(w=0,m=x=(h+d)/2),(M-=2*P)>QM?(b+=P*=y?1:-1,_-=P):(M=0,b=_=(h+d)/2)}var O=l*VM(b),C=l*ZM(b),j=s*VM(x),z=s*ZM(x);if(S>QM){var R,D=l*VM(_),q=l*ZM(_),F=s*VM(m),I=s*ZM(m);if(pQM?k>QM?(g=sT(F,I,O,C,l,k,y),v=sT(D,q,j,z,l,k,y),u.moveTo(g.cx+g.x01,g.cy+g.y01),kQM&&w>QM?E>QM?(g=sT(j,z,D,q,s,-E,y),v=sT(O,C,F,I,s,-E,y),u.lineTo(g.cx+g.x01,g.cy+g.y01),E=s;--l)u.point(g[l],v[l]);u.lineEnd(),u.areaEnd()}y&&(g[f]=+t(h,f,c),v[f]=+n(h,f,c),u.point(r?+r(h,f,c):g[f],e?+e(h,f,c):v[f]))}if(d)return u=null,d+""||null}function f(){return bT().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?gT:$M(+t),n="function"==typeof n?n:$M(void 0===n?0:+n),e="function"==typeof e?e:void 0===e?vT:$M(+e),c.x=function(n){return arguments.length?(t="function"==typeof n?n:$M(+n),r=null,c):t},c.x0=function(n){return arguments.length?(t="function"==typeof n?n:$M(+n),c):t},c.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:$M(+t),c):r},c.y=function(t){return arguments.length?(n="function"==typeof t?t:$M(+t),e=null,c):n},c.y0=function(t){return arguments.length?(n="function"==typeof t?t:$M(+t),c):n},c.y1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:$M(+t),c):e},c.lineX0=c.lineY0=function(){return f().x(t).y(n)},c.lineY1=function(){return f().x(t).y(e)},c.lineX1=function(){return f().x(r).y(n)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:$M(!!t),c):i},c.curve=function(t){return arguments.length?(a=t,null!=o&&(u=a(o)),c):a},c.context=function(t){return arguments.length?(null==t?o=u=null:u=a(o=t),c):o},c}function mT(t,n){return nt?1:n>=t?0:NaN}function xT(t){return t}function wT(){var t=xT,n=mT,e=null,r=$M(0),i=$M(nT),o=$M(0);function a(a){var u,c,f,s,l,h=(a=dT(a)).length,d=0,p=new Array(h),y=new Array(h),g=+r.apply(this,arguments),v=Math.min(nT,Math.max(-nT,i.apply(this,arguments)-g)),b=Math.min(Math.abs(v)/h,o.apply(this,arguments)),_=b*(v<0?-1:1);for(u=0;u0&&(d+=l);for(null!=n?p.sort((function(t,e){return n(y[t],y[e])})):null!=e&&p.sort((function(t,n){return e(a[t],a[n])})),u=0,f=d?(v-h*_)/d:0;u0?l*f:0)+_,y[c]={data:a[c],index:u,value:l,startAngle:g,endAngle:s,padAngle:b};return y}return a.value=function(n){return arguments.length?(t="function"==typeof n?n:$M(+n),a):t},a.sortValues=function(t){return arguments.length?(n=t,e=null,a):n},a.sort=function(t){return arguments.length?(e=t,n=null,a):e},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:$M(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:$M(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:$M(+t),a):o},a}pT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var MT=AT(yT);function TT(t){this._curve=t}function AT(t){function n(n){return new TT(t(n))}return n._curve=t,n}function ST(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(AT(t)):n()._curve},t}function ET(){return ST(bT().curve(MT))}function kT(){var t=_T().curve(MT),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return ST(e())},delete t.lineX0,t.lineEndAngle=function(){return ST(r())},delete t.lineX1,t.lineInnerRadius=function(){return ST(i())},delete t.lineY0,t.lineOuterRadius=function(){return ST(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(AT(t)):n()._curve},t}function NT(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}TT.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};class PT{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}class OT{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,n){if(t=+t,n=+n,0==this._point++)this._x0=t,this._y0=n;else{const e=NT(this._x0,this._y0),r=NT(this._x0,this._y0=(this._y0+n)/2),i=NT(t,this._y0),o=NT(t,n);this._context.moveTo(...e),this._context.bezierCurveTo(...r,...i,...o)}}}function CT(t){return new PT(t,!0)}function jT(t){return new PT(t,!1)}function zT(t){return new OT(t)}function RT(t){return t.source}function DT(t){return t.target}function qT(t){let n=RT,e=DT,r=gT,i=vT,o=null,a=null;function u(){let u;const c=hT.call(arguments),f=n.apply(this,c),s=e.apply(this,c);if(null==o&&(a=t(u=hu())),a.lineStart(),c[0]=f,a.point(+r.apply(this,c),+i.apply(this,c)),c[0]=s,a.point(+r.apply(this,c),+i.apply(this,c)),a.lineEnd(),u)return a=null,u+""||null}return u.source=function(t){return arguments.length?(n=t,u):n},u.target=function(t){return arguments.length?(e=t,u):e},u.x=function(t){return arguments.length?(r="function"==typeof t?t:$M(+t),u):r},u.y=function(t){return arguments.length?(i="function"==typeof t?t:$M(+t),u):i},u.context=function(n){return arguments.length?(null==n?o=a=null:a=t(o=n),u):o},u}function FT(){return qT(CT)}function IT(){return qT(jT)}function BT(){const t=qT(zT);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const UT=KM(3),YT={draw(t,n){const e=.59436*KM(n+WM(n/28,.75)),r=e/2,i=r*UT;t.moveTo(0,e),t.lineTo(0,-e),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},LT={draw(t,n){const e=KM(n/JM);t.moveTo(e,0),t.arc(0,0,e,0,nT)}},$T={draw(t,n){const e=KM(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},HT=KM(1/3),XT=2*HT,VT={draw(t,n){const e=KM(n/XT),r=e*HT;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},GT={draw(t,n){const e=.62625*KM(n);t.moveTo(0,-e),t.lineTo(e,0),t.lineTo(0,e),t.lineTo(-e,0),t.closePath()}},WT={draw(t,n){const e=.87559*KM(n-WM(n/7,2));t.moveTo(-e,0),t.lineTo(e,0),t.moveTo(0,e),t.lineTo(0,-e)}},ZT={draw(t,n){const e=KM(n),r=-e/2;t.rect(r,r,e,e)}},KT={draw(t,n){const e=.4431*KM(n);t.moveTo(e,e),t.lineTo(e,-e),t.lineTo(-e,-e),t.lineTo(-e,e),t.closePath()}},QT=ZM(JM/10)/ZM(7*JM/10),JT=ZM(nT/10)*QT,tA=-VM(nT/10)*QT,nA={draw(t,n){const e=KM(.8908130915292852*n),r=JT*e,i=tA*e;t.moveTo(0,-e),t.lineTo(r,i);for(let n=1;n<5;++n){const o=nT*n/5,a=VM(o),u=ZM(o);t.lineTo(u*e,-a*e),t.lineTo(a*r-u*i,u*r+a*i)}t.closePath()}},eA=KM(3),rA={draw(t,n){const e=-KM(n/(3*eA));t.moveTo(0,2*e),t.lineTo(-eA*e,-e),t.lineTo(eA*e,-e),t.closePath()}},iA=KM(3),oA={draw(t,n){const e=.6824*KM(n),r=e/2,i=e*iA/2;t.moveTo(0,-e),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},aA=-.5,uA=KM(3)/2,cA=1/KM(12),fA=3*(cA/2+1),sA={draw(t,n){const e=KM(n/fA),r=e/2,i=e*cA,o=r,a=e*cA+e,u=-o,c=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(u,c),t.lineTo(aA*r-uA*i,uA*r+aA*i),t.lineTo(aA*o-uA*a,uA*o+aA*a),t.lineTo(aA*u-uA*c,uA*u+aA*c),t.lineTo(aA*r+uA*i,aA*i-uA*r),t.lineTo(aA*o+uA*a,aA*a-uA*o),t.lineTo(aA*u+uA*c,aA*c-uA*u),t.closePath()}},lA={draw(t,n){const e=.6189*KM(n-WM(n/6,1.7));t.moveTo(-e,-e),t.lineTo(e,e),t.moveTo(-e,e),t.lineTo(e,-e)}},hA=[LT,$T,VT,ZT,nA,rA,sA],dA=[LT,WT,lA,oA,YT,KT,GT];function pA(t,n){let e=null;function r(){let r;if(e||(e=r=hu()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),r)return e=null,r+""||null}return t="function"==typeof t?t:$M(t||LT),n="function"==typeof n?n:$M(void 0===n?64:+n),r.type=function(n){return arguments.length?(t="function"==typeof n?n:$M(n),r):t},r.size=function(t){return arguments.length?(n="function"==typeof t?t:$M(+t),r):n},r.context=function(t){return arguments.length?(e=null==t?null:t,r):e},r}function yA(){}function gA(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function vA(t){this._context=t}function bA(t){return new vA(t)}function _A(t){this._context=t}function mA(t){return new _A(t)}function xA(t){this._context=t}function wA(t){return new xA(t)}function MA(t,n){this._basis=new vA(t),this._beta=n}vA.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:gA(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);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:gA(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},_A.prototype={areaStart:yA,areaEnd:yA,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)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:gA(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},xA.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:gA(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},MA.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],o=n[0],a=t[e]-i,u=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*a),this._beta*n[c]+(1-this._beta)*(o+r*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};const TA=function t(n){function e(t){return 1===n?new vA(t):new MA(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function AA(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function SA(t,n){this._context=t,this._k=(1-n)/6}SA.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:AA(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:AA(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const EA=function t(n){function e(t){return new SA(t,n)}return e.tension=function(n){return t(+n)},e}(0);function kA(t,n){this._context=t,this._k=(1-n)/6}kA.prototype={areaStart:yA,areaEnd:yA,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)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:AA(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const NA=function t(n){function e(t){return new kA(t,n)}return e.tension=function(n){return t(+n)},e}(0);function PA(t,n){this._context=t,this._k=(1-n)/6}PA.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,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:AA(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const OA=function t(n){function e(t){return new PA(t,n)}return e.tension=function(n){return t(+n)},e}(0);function CA(t,n,e){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>QM){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>QM){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*f+t._x1*t._l23_2a-n*t._l12_2a)/s,a=(a*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function jA(t,n){this._context=t,this._alpha=n}jA.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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:CA(this,t,n)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const zA=function t(n){function e(t){return n?new jA(t,n):new SA(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function RA(t,n){this._context=t,this._alpha=n}RA.prototype={areaStart:yA,areaEnd:yA,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)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:CA(this,t,n)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const DA=function t(n){function e(t){return n?new RA(t,n):new kA(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function qA(t,n){this._context=t,this._alpha=n}qA.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,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:CA(this,t,n)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const FA=function t(n){function e(t){return n?new qA(t,n):new PA(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function IA(t){this._context=t}function BA(t){return new IA(t)}function UA(t){return t<0?-1:1}function YA(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(e-t._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(UA(o)+UA(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function LA(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function $A(t,n,e){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*n,o-u,a-u*e,o,a)}function HA(t){this._context=t}function XA(t){this._context=new VA(t)}function VA(t){this._context=t}function GA(t){return new HA(t)}function WA(t){return new XA(t)}function ZA(t){this._context=t}function KA(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(a[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n1)for(var e,r,i,o=1,a=t[n[0]],u=a.length;o=0;)e[n]=n;return e}function oS(t,n){return t[n]}function aS(t){const n=[];return n.key=t,n}function uS(){var t=$M([]),n=iS,e=rS,r=oS;function i(i){var o,a,u=Array.from(t.apply(this,arguments),aS),c=u.length,f=-1;for(const t of i)for(o=0,++f;o0){for(var e,r,i,o=0,a=t[0].length;o0)for(var e,r,i,o,a,u,c=0,f=t[n[0]].length;c0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)}function sS(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],o=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,a=1;ao&&(o=n,r=e);return r}function pS(t){var n=t.map(yS);return iS(t).sort((function(t,e){return n[t]-n[e]}))}function yS(t){for(var n,e=0,r=-1,i=t.length;++r=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var _S="%Y-%m-%dT%H:%M:%S.%LZ",mS=Date.prototype.toISOString?function(t){return t.toISOString()}:Am(_S);const xS=mS;var wS=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:Sm(_S);const MS=wS;function TS(t,n,e){var r=new co,i=n;return null==n?(r.restart(t,n,e),r):(r._restart=r.restart,r.restart=function(t,n,e){n=+n,e=null==e?ao():+e,r._restart((function o(a){a+=i,r._restart(o,i+=n,e),t(a)}),n,e)},r.restart(t,n,e),r)}const AS=t=>()=>t;function SS(t,{sourceEvent:n,target:e,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function ES(t,n,e){this.k=t,this.x=n,this.y=e}ES.prototype={constructor:ES,scale:function(t){return 1===t?this:new ES(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new ES(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var kS=new ES(1,0,0);function NS(t){for(;!t.__zoom;)if(!(t=t.parentNode))return kS;return t.__zoom}function PS(t){t.stopImmediatePropagation()}function OS(t){t.preventDefault(),t.stopImmediatePropagation()}function CS(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function jS(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function zS(){return this.__zoom||kS}function RS(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function DS(){return navigator.maxTouchPoints||"ontouchstart"in this}function qS(t,n,e){var r=t.invertX(n[0][0])-e[0][0],i=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],a=t.invertY(n[1][1])-e[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function FS(){var t,n,e,r=CS,i=jS,o=qS,a=RS,u=DS,c=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],s=250,l=yv,h=xe("start","zoom","end"),d=500,p=0,y=10;function g(t){t.property("__zoom",zS).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",T).on("dblclick.zoom",A).filter(u).on("touchstart.zoom",S).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(t,n){return(n=Math.max(c[0],Math.min(c[1],n)))===t.k?t:new ES(n,t.x,t.y)}function b(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new ES(t.k,r,i)}function _(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function m(t,n,e,r){t.on("start.zoom",(function(){x(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){x(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,o=arguments,a=x(t,o).event(r),u=i.apply(t,o),c=null==e?_(u):"function"==typeof e?e.apply(t,o):e,f=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),s=t.__zoom,h="function"==typeof n?n.apply(t,o):n,d=l(s.invert(c).concat(f/s.k),h.invert(c).concat(f/h.k));return function(t){if(1===t)t=h;else{var n=d(t),e=f/n[2];t=new ES(e,c[0]-n[0]*e,c[1]-n[1]*e)}a.zoom(null,t)}}))}function x(t,n,e){return!e&&t.__zooming||new w(t,n)}function w(t,n){this.that=t,this.args=n,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,n),this.taps=0}function M(t,...n){if(r.apply(this,arguments)){var e=x(this,n).event(t),i=this.__zoom,u=Math.max(c[0],Math.min(c[1],i.k*Math.pow(2,a.apply(this,arguments)))),s=Wi(t);if(e.wheel)e.mouse[0][0]===s[0]&&e.mouse[0][1]===s[1]||(e.mouse[1]=i.invert(e.mouse[0]=s)),clearTimeout(e.wheel);else{if(i.k===u)return;e.mouse=[s,i.invert(s)],wo(this),e.start()}OS(t),e.wheel=setTimeout(l,150),e.zoom("mouse",o(b(v(i,u),e.mouse[0],e.mouse[1]),e.extent,f))}function l(){e.wheel=null,e.end()}}function T(t,...n){if(!e&&r.apply(this,arguments)){var i=t.currentTarget,a=x(this,n,!0).event(t),u=qr(t.view).on("mousemove.zoom",h,!0).on("mouseup.zoom",d,!0),c=Wi(t,i),s=t.clientX,l=t.clientY;Yr(t.view),PS(t),a.mouse=[c,this.__zoom.invert(c)],wo(this),a.start()}function h(t){if(OS(t),!a.moved){var n=t.clientX-s,e=t.clientY-l;a.moved=n*n+e*e>p}a.event(t).zoom("mouse",o(b(a.that.__zoom,a.mouse[0]=Wi(t,i),a.mouse[1]),a.extent,f))}function d(t){u.on("mousemove.zoom mouseup.zoom",null),Lr(t.view,a.moved),OS(t),a.event(t).end()}}function A(t,...n){if(r.apply(this,arguments)){var e=this.__zoom,a=Wi(t.changedTouches?t.changedTouches[0]:t,this),u=e.invert(a),c=e.k*(t.shiftKey?.5:2),l=o(b(v(e,c),a,u),i.apply(this,n),f);OS(t),s>0?qr(this).transition().duration(s).call(m,l,a,t):qr(this).call(g.transform,l,a,t)}}function S(e,...i){if(r.apply(this,arguments)){var o,a,u,c,f=e.touches,s=f.length,l=x(this,i,e.changedTouches.length===s).event(e);for(PS(e),a=0;at.length)&&(n=t.length);for(var e=0,r=new Array(n);e0&&void 0!==arguments[0]?arguments[0]:"#root",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;YS(this,n),this.parentId=e,this.resources=r,this.d3=t,this.pack=BS(),this.margin=10,this.actions={selection:{current:null,style:"2px solid hsl(205, 100%, 50%)",offset:"3px"},drag:{state:!1,deltaX:0,deltay:0}}}var e,r;return e=n,r=[{key:"draw",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.d3.select(this.parentId).selectAll(".component").data(n,(function(t){return t.id}));return this.initializeComponents(n,e),this.setViewPortAction(this.d3.select("#root")),n.forEach((function(n){t.setComponentAction(n)})),!0}},{key:"setViewPortAction",value:function(t){var n=this;t.on("mousedown",(function(){n.__unselectComponent()}))}},{key:"setComponentAction",value:function(t){var n=this,e=this.d3.select("#".concat(t.id));e.call(this.d3.drag().on("start",(function(r){n.__dragStart(r,t,e)})).on("drag",(function(r){n.__selectComponent(t.id),n.__dragPending(r,t,e)})).on("end",(function(t){n.actions.drag.state||n.__toggleComponentSelection(t.subject.id),n.__dragEnd(e)})))}},{key:"__dragStart",value:function(t,n,e){this.actions.drag.state=!1,this.d3.select("use").attr("xlink:href","#".concat(n.id)),this.actions.drag.deltaX=t.x-e.attr("x"),this.actions.drag.deltaY=t.y-e.attr("y"),e.attr("cursor","grabbing")}},{key:"__dragPending",value:function(t,n,e){this.actions.drag.state=!0;var r=t.x-this.actions.drag.deltaX,i=t.y-this.actions.drag.deltaY;e.attr("x",r).attr("y",i),n.drawOption.x=r,n.drawOption.y=i}},{key:"__dragEnd",value:function(t){t.attr("cursor","grab"),this.actions.drag.state=!1,this.actions.drag.deltaX=0,this.actions.drag.deltaY=0}},{key:"__unselectComponent",value:function(){this.actions.selection.current&&(this.d3.select("#".concat(this.actions.selection.current)).style("outline",""),this.actions.selection.current=null)}},{key:"__selectComponent",value:function(t){this.__unselectComponent(),this.d3.select("#".concat(t)).style("outline",this.actions.selection.style).style("outline-offset",this.actions.selection.offset),this.actions.selection.current=t}},{key:"__toggleComponentSelection",value:function(t){this.actions.selection.current===t?this.__unselectComponent():this.__selectComponent(t)}},{key:"initializeComponents",value:function(t,n){var e,r=this,i=t.filter((function(t){return!t.drawOption&&(t.drawOption=new C,!0)})),o={width:0,height:0},a=function(t){if(Array.isArray(t))return US(t)}(e=new Set(t.map((function(t){return t.definition.model}))))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,n){if(t){if("string"==typeof t)return US(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?US(t,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=n.enter().append("svg");n.exit().remove(),u.attr("id",(function(t){return t.id})).attr("class",(function(t){return"component component-".concat(t.definition.model)})).html((function(t){return r.resources.models[t.definition.model]})),u.each((function(n,e,i){var a=t[e];r.storeComponentSize(i[e],a),a.drawOption.width>o.width&&(o.width=a.drawOption.width),a.drawOption.height>o.height&&(o.height=a.drawOption.height)})),i=i.sort((function(t,n){var e=t.drawOption.width*t.drawOption.height;return n.drawOption.width*n.drawOption.height-e})),this.setComponentPosition(i),a.forEach((function(t){var n=r.d3.selectAll("".concat(r.parentId," .component-").concat(t));r["draw".concat(t)]?r["draw".concat(t)](n):r.drawDefaultModel(n)}))}},{key:"setComponentPosition",value:function(t){var n=this,e=t.map((function(t){return{width:t.drawOption.width+n.margin,height:t.drawOption.height+n.margin,id:t.id}}));e=this.pack(e),t.forEach((function(t){var r=e.items.find((function(n){return n.item.id===t.id}));t.drawOption.x=r.x+n.margin,t.drawOption.y=r.y+n.margin}))}},{key:"storeComponentSize",value:function(t,n){var e=this.getComponentSize(t),r=e.width,i=e.height;n.drawOption.width=r,n.drawOption.height=i}},{key:"getComponentSize",value:function(t){var n=this.d3.select(t).node().getBBox();return{width:n.width,height:n.height}}},{key:"drawDefaultModel",value:function(t){var n=this;t.attr("x",(function(t){return t.drawOption.x})).attr("y",(function(t){return t.drawOption.y})).attr("cursor","grab"),t.select(".component-name").text((function(t){return t.name})),t.select(".component-type").text((function(t){return t.definition.type})),t.select(".component-icon").html((function(t){return n.resources.icons[t.definition.icon]}))}}],r&&LS(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}();const HS=$S;function XS(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:[];GS(this,t),this.definitions=n}var n,e;return n=t,e=[{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{components:t,links:t,errors:[]}}},{key:"isParsable",value:function(t){return null!=t}}],e&&WS(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),t}();function KS(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:"Error happened when trying to parse.",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"Error";return tE(this,o),(t=i.call(this,n)).name="ParseError",t.startLine=e,t.startColumn=r,t.endLine=a,t.endColumn=u,t.severity=c,t}return r=o,Object.defineProperty(r,"prototype",{writable:!1}),r}(eE(Error))})();var i=exports;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})(); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e69b2da2..57c10a0d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "leto-modelizer-plugin-core", - "version": "0.2.0", + "version": "0.3.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "leto-modelizer-plugin-core", - "version": "0.2.0", + "version": "0.3.0", "license": "Mozilla Public License Version 2.0", "dependencies": { "bin-pack": "^1.0.2", diff --git a/package.json b/package.json index 647fff48..26d791c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "leto-modelizer-plugin-core", - "version": "0.2.0", + "version": "0.3.0", "description": "Library that contains all models for modelling tools in Leto's projects.", "main": "dist/leto-modelizer-plugin-core.js", "exports": {