@orbcharts/plugins-basic 3.0.0-alpha.42 → 3.0.0-alpha.43
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +200 -200
- package/dist/orbcharts-plugins-basic.es.js +5477 -5426
- package/dist/orbcharts-plugins-basic.umd.js +8 -8
- package/dist/src/base/BaseBarStack.d.ts +1 -1
- package/dist/src/base/BaseBars.d.ts +1 -1
- package/dist/src/base/BaseBarsTriangle.d.ts +1 -1
- package/dist/src/base/BaseDots.d.ts +1 -1
- package/dist/src/base/BaseLineAreas.d.ts +1 -1
- package/dist/src/base/BaseLines.d.ts +1 -1
- package/dist/src/multiGrid/defaults.d.ts +2 -1
- package/dist/src/multiGrid/index.d.ts +1 -0
- package/dist/src/multiGrid/plugins/MultiLineAreas.d.ts +1 -0
- package/dist/src/multiGrid/types.d.ts +4 -4
- package/package.json +42 -42
- package/src/base/BaseBarStack.ts +881 -879
- package/src/base/BaseBars.ts +750 -748
- package/src/base/BaseBarsTriangle.ts +659 -657
- package/src/base/BaseDots.ts +639 -637
- package/src/base/BaseGroupAxis.ts +496 -496
- package/src/base/BaseLegend.ts +636 -636
- package/src/base/BaseLineAreas.ts +621 -624
- package/src/base/BaseLines.ts +692 -695
- package/src/base/BaseValueAxis.ts +479 -479
- package/src/base/types.ts +2 -2
- package/src/grid/defaults.ts +121 -121
- package/src/grid/gridObservables.ts +263 -263
- package/src/grid/index.ts +15 -15
- package/src/grid/plugins/BarStack.ts +37 -37
- package/src/grid/plugins/Bars.ts +37 -37
- package/src/grid/plugins/BarsDiverging.ts +39 -39
- package/src/grid/plugins/BarsTriangle.ts +34 -34
- package/src/grid/plugins/Dots.ts +35 -35
- package/src/grid/plugins/GridLegend.ts +58 -58
- package/src/grid/plugins/GroupAux.ts +643 -643
- package/src/grid/plugins/GroupAxis.ts +30 -30
- package/src/grid/plugins/LineAreas.ts +36 -36
- package/src/grid/plugins/Lines.ts +35 -35
- package/src/grid/plugins/ScalingArea.ts +174 -174
- package/src/grid/plugins/ValueAxis.ts +31 -31
- package/src/grid/plugins/ValueStackAxis.ts +70 -70
- package/src/grid/types.ts +120 -120
- package/src/index.ts +9 -9
- package/src/multiGrid/defaults.ts +147 -140
- package/src/multiGrid/index.ts +11 -10
- package/src/multiGrid/multiGridObservables.ts +289 -278
- package/src/multiGrid/plugins/MultiBarStack.ts +60 -60
- package/src/multiGrid/plugins/MultiBars.ts +59 -59
- package/src/multiGrid/plugins/MultiBarsTriangle.ts +58 -58
- package/src/multiGrid/plugins/MultiDots.ts +58 -58
- package/src/multiGrid/plugins/MultiGridLegend.ts +88 -88
- package/src/multiGrid/plugins/MultiGroupAxis.ts +53 -53
- package/src/multiGrid/plugins/MultiLineAreas.ts +59 -0
- package/src/multiGrid/plugins/MultiLines.ts +58 -58
- package/src/multiGrid/plugins/MultiValueAxis.ts +53 -53
- package/src/multiGrid/plugins/OverlappingValueAxes.ts +164 -165
- package/src/multiGrid/types.ts +67 -67
- package/src/noneData/defaults.ts +61 -61
- package/src/noneData/index.ts +3 -3
- package/src/noneData/plugins/Container.ts +10 -10
- package/src/noneData/plugins/Tooltip.ts +304 -304
- package/src/noneData/types.ts +26 -26
- package/src/series/defaults.ts +99 -99
- package/src/series/index.ts +6 -6
- package/src/series/plugins/Bubbles.ts +551 -549
- package/src/series/plugins/Pie.ts +600 -598
- package/src/series/plugins/PieEventTexts.ts +194 -194
- package/src/series/plugins/PieLabels.ts +288 -285
- package/src/series/plugins/SeriesLegend.ts +58 -58
- package/src/series/seriesUtils.ts +50 -50
- package/src/series/types.ts +67 -67
- package/src/tree/defaults.ts +22 -22
- package/src/tree/index.ts +3 -3
- package/src/tree/plugins/TreeLegend.ts +58 -58
- package/src/tree/plugins/TreeMap.ts +302 -300
- package/src/tree/types.ts +23 -23
- package/src/utils/commonUtils.ts +21 -21
- package/src/utils/d3Graphics.ts +124 -124
- package/src/utils/d3Utils.ts +73 -73
- package/src/utils/observables.ts +14 -14
- package/src/utils/orbchartsUtils.ts +100 -100
- package/tsconfig.dev.json +16 -16
- package/tsconfig.json +13 -13
- package/tsconfig.prod.json +13 -13
- package/vite.config.js +49 -49
@@ -1,15 +1,15 @@
|
|
1
|
-
(function(Z,cr){typeof exports=="object"&&typeof module<"u"?cr(exports):typeof define=="function"&&define.amd?define(["exports"],cr):(Z=typeof globalThis<"u"?globalThis:Z||self,cr(Z["orbcharts-plugins-basic"]={}))})(this,function(Z){"use strict";const cr={lineCurve:"curveLinear",lineWidth:2},
|
1
|
+
(function(Z,cr){typeof exports=="object"&&typeof module<"u"?cr(exports):typeof define=="function"&&define.amd?define(["exports"],cr):(Z=typeof globalThis<"u"?globalThis:Z||self,cr(Z["orbcharts-plugins-basic"]={}))})(this,function(Z){"use strict";const cr={lineCurve:"curveLinear",lineWidth:2},Bh={lineCurve:"curveLinear",linearGradientOpacity:[1,0]},Yh={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},Hh={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24},Fo={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},Sx={...Fo},Wh={barWidth:0,barGroupPadding:10,barRadius:!1},qh={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},Xh={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},Lu={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},jh=Lu,Vh={},Zh={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};var Eu=function(t,e){return Eu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Eu(t,e)};function lr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Eu(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function Ax(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(h){a(h)}}function u(l){try{c(r.throw(l))}catch(h){a(h)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(t,e||[])).next())})}function Kh(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function fr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function hr(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function ui(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function dr(t){return this instanceof dr?(this.v=t,this):new dr(t)}function Mx(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(d){return function(p){return Promise.resolve(p).then(d,h)}}function s(d,p){r[d]&&(i[d]=function(g){return new Promise(function(m,y){o.push([d,g,m,y])>1||u(d,g)})},p&&(i[d]=p(i[d])))}function u(d,p){try{c(r[d](p))}catch(g){f(o[0][3],g)}}function c(d){d.value instanceof dr?Promise.resolve(d.value.v).then(l,h):f(o[0][2],d)}function l(d){u("next",d)}function h(d){u("throw",d)}function f(d,p){d(p),o.shift(),o.length&&u(o[0][0],o[0][1])}}function Tx(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof fr=="function"?fr(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,u){a=t[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(c){o({value:c,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function mt(t){return typeof t=="function"}function ku(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Cu=ku(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
|
2
2
|
`+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
3
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function Iu(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Go=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=fr(a),u=s.next();!u.done;u=s.next()){var c=u.value;c.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(mt(l))try{l()}catch(g){o=g instanceof Cu?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=fr(h),d=f.next();!d.done;d=f.next()){var p=d.value;try{Jh(p)}catch(g){o=o??[],g instanceof Cu?o=ui(ui([],hr(o)),hr(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new Cu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Jh(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&Iu(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Iu(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Kh=Go.EMPTY;function Qh(t){return t instanceof Go||t&&"closed"in t&&mt(t.remove)&&mt(t.add)&&mt(t.unsubscribe)}function Jh(t){mt(t)?t():t.unsubscribe()}var td={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ed={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,ui([t,e],hr(n)))},clearTimeout:function(t){var e=ed.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function nd(t){ed.setTimeout(function(){throw t})}function Ru(){}function zo(t){t()}var Nu=function(t){lr(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Qh(n)&&n.add(r)):r.destination=Tx,r}return e.create=function(n,r,i){return new ci(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Go),Sx=Function.prototype.bind;function Fu(t,e){return Sx.call(t,e)}var Ax=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){Oo(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Oo(r)}else Oo(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Oo(n)}},t}(),ci=function(t){lr(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(mt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&td.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Fu(n.next,s),error:n.error&&Fu(n.error,s),complete:n.complete&&Fu(n.complete,s)}):a=n}return o.destination=new Ax(a),o}return e}(Nu);function Oo(t){nd(t)}function Mx(t){throw t}var Tx={closed:!0,next:Ru,error:Mx,complete:Ru},Gu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function pr(t){return t}function Px(t){return t.length===0?pr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var lt=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=Lx(e)?e:new ci(e,n,r);return zo(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=rd(n),new n(function(i,o){var a=new ci({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[Gu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Px(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=rd(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function rd(t){var e;return(e=t??td.Promise)!==null&&e!==void 0?e:Promise}function Dx(t){return t&&mt(t.next)&&mt(t.error)&&mt(t.complete)}function Lx(t){return t&&t instanceof Nu||Dx(t)&&Qh(t)}function Ex(t){return mt(t==null?void 0:t.lift)}function le(t){return function(e){if(Ex(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function oe(t,e,n,r,i){return new kx(t,e,n,r,i)}var kx=function(t){lr(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(c){try{r(c)}catch(l){n.error(l)}}:t.prototype._next,u._error=o?function(c){try{o(c)}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(Nu),Cx=ku(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),rt=function(t){lr(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new id(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new Cx},e.prototype.next=function(n){var r=this;zo(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=fr(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;zo(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;zo(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?Kh:(this.currentObservers=null,s.push(n),new Go(function(){r.currentObservers=null,Iu(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new lt;return n.source=this,n},e.create=function(n,r){return new id(n,r)},e}(lt),id=function(t){lr(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Kh},e}(rt),od={now:function(){return(od.delegate||Date).now()},delegate:void 0},Ix=function(t){lr(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=od);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),c=0,l=1;l<o.length&&o[l]<=u;l+=2)c=l;c&&o.splice(0,c+1)}},e}(rt),ad=new lt(function(t){return t.complete()});function Rx(t){return t&&mt(t.schedule)}function zu(t){return t[t.length-1]}function Nx(t){return mt(zu(t))?t.pop():void 0}function Ou(t){return Rx(zu(t))?t.pop():void 0}function Fx(t,e){return typeof zu(t)=="number"?t.pop():e}var Uu=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function sd(t){return mt(t==null?void 0:t.then)}function ud(t){return mt(t[Gu])}function cd(t){return Symbol.asyncIterator&&mt(t==null?void 0:t[Symbol.asyncIterator])}function ld(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Gx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var fd=Gx();function hd(t){return mt(t==null?void 0:t[fd])}function dd(t){return wx(this,arguments,function(){var n,r,i,o;return Zh(this,function(a){switch(a.label){case 0:n=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,dr(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,dr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,dr(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function pd(t){return mt(t==null?void 0:t.getReader)}function fe(t){if(t instanceof lt)return t;if(t!=null){if(ud(t))return zx(t);if(Uu(t))return Ox(t);if(sd(t))return Ux(t);if(cd(t))return gd(t);if(hd(t))return Bx(t);if(pd(t))return Yx(t)}throw ld(t)}function zx(t){return new lt(function(e){var n=t[Gu]();if(mt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ox(t){return new lt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Ux(t){return new lt(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,nd)})}function Bx(t){return new lt(function(e){var n,r;try{for(var i=fr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function gd(t){return new lt(function(e){Wx(t,e).catch(function(n){return e.error(n)})})}function Yx(t){return gd(dd(t))}function Wx(t,e){var n,r,i,o;return _x(this,void 0,void 0,function(){var a,s;return Zh(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=$x(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function un(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function md(t,e){return e===void 0&&(e=0),le(function(n,r){n.subscribe(oe(r,function(i){return un(r,t,function(){return r.next(i)},e)},function(){return un(r,t,function(){return r.complete()},e)},function(i){return un(r,t,function(){return r.error(i)},e)}))})}function yd(t,e){return e===void 0&&(e=0),le(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Hx(t,e){return fe(t).pipe(yd(e),md(e))}function qx(t,e){return fe(t).pipe(yd(e),md(e))}function Xx(t,e){return new lt(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function jx(t,e){return new lt(function(n){var r;return un(n,e,function(){r=t[fd](),un(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return mt(r==null?void 0:r.return)&&r.return()}})}function bd(t,e){if(!t)throw new Error("Iterable cannot be null");return new lt(function(n){un(n,e,function(){var r=t[Symbol.asyncIterator]();un(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Vx(t,e){return bd(dd(t),e)}function Zx(t,e){if(t!=null){if(ud(t))return Hx(t,e);if(Uu(t))return Xx(t,e);if(sd(t))return qx(t,e);if(cd(t))return bd(t,e);if(hd(t))return jx(t,e);if(pd(t))return Vx(t,e)}throw ld(t)}function Uo(t,e){return e?Zx(t,e):fe(t)}function li(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ou(t);return Uo(t,n)}var vd=ku(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function U(t,e){return le(function(n,r){var i=0;n.subscribe(oe(r,function(o){r.next(t.call(e,o,i++))}))})}var Kx=Array.isArray;function Qx(t,e){return Kx(e)?t.apply(void 0,ui([],hr(e))):t(e)}function xd(t){return U(function(e){return Qx(t,e)})}var Jx=Array.isArray,t_=Object.getPrototypeOf,e_=Object.prototype,n_=Object.keys;function r_(t){if(t.length===1){var e=t[0];if(Jx(e))return{args:e,keys:null};if(i_(e)){var n=n_(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function i_(t){return t&&typeof t=="object"&&t_(t)===e_}function o_(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function H(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ou(t),r=Nx(t),i=r_(t),o=i.args,a=i.keys;if(o.length===0)return Uo([],n);var s=new lt(a_(o,n,a?function(u){return o_(a,u)}:pr));return r?s.pipe(xd(r)):s}function a_(t,e,n){return n===void 0&&(n=pr),function(r){_d(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(l){_d(e,function(){var h=Uo(t[l],e),f=!1;h.subscribe(oe(r,function(d){o[l]=d,f||(f=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},c=0;c<i;c++)u(c)},r)}}function _d(t,e,n){t?un(n,t,e):e()}function s_(t,e,n,r,i,o,a,s){var u=[],c=0,l=0,h=!1,f=function(){h&&!u.length&&!c&&e.complete()},d=function(g){return c<r?p(g):u.push(g)},p=function(g){c++;var m=!1;fe(n(g,l++)).subscribe(oe(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var v=u.shift();a||p(v)};u.length&&c<r;)y();f()}catch(v){e.error(v)}}))};return t.subscribe(oe(e,d,function(){h=!0,f()})),function(){}}function Bu(t,e,n){return n===void 0&&(n=1/0),mt(e)?Bu(function(r,i){return U(function(o,a){return e(r,o,i,a)})(fe(t(r,i)))},n):(typeof e=="number"&&(n=e),le(function(r,i){return s_(r,i,t,n)}))}function u_(t){return t===void 0&&(t=1/0),Bu(pr,t)}function c_(t){return new lt(function(e){fe(t()).subscribe(e)})}var l_=["addListener","removeListener"],f_=["addEventListener","removeEventListener"],h_=["on","off"];function Yu(t,e,n,r){if(mt(n)&&(r=n,n=void 0),r)return Yu(t,e,n).pipe(xd(r));var i=hr(g_(t)?f_.map(function(s){return function(u){return t[s](e,u,n)}}):d_(t)?l_.map(wd(t,e)):p_(t)?h_.map(wd(t,e)):[],2),o=i[0],a=i[1];if(!o&&Uu(t))return Bu(function(s){return Yu(s,e,n)})(fe(t));if(!o)throw new TypeError("Invalid event target");return new lt(function(s){var u=function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];return s.next(1<c.length?c:c[0])};return o(u),function(){return a(u)}})}function wd(t,e){return function(n){return function(r){return t[n](e,r)}}}function d_(t){return mt(t.addListener)&&mt(t.removeListener)}function p_(t){return mt(t.on)&&mt(t.off)}function g_(t){return mt(t.addEventListener)&&mt(t.removeEventListener)}function $d(t,e,n){return c_(function(){return t()?e:n})}function Wu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ou(t),r=Fx(t,1/0),i=t;return i.length?i.length===1?fe(i[0]):u_(r)(Uo(i,n)):ad}function fi(t,e){return le(function(n,r){var i=0;n.subscribe(oe(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function m_(t){return le(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function y_(t){return t<=0?function(){return ad}:le(function(e,n){var r=0;e.subscribe(oe(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function ft(t,e){return e===void 0&&(e=pr),t=t??b_,le(function(n,r){var i,o=!0;n.subscribe(oe(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function b_(t,e){return t===e}function v_(t){return t===void 0&&(t=x_),le(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function x_(){return new vd}function hi(t,e){var n=arguments.length>=2;return function(r){return r.pipe(pr,y_(1),n?m_(e):v_(function(){return new vd}))}}function __(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new rt}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(c){var l,h,f,d=0,p=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,p=g=!1},v=function(){var x=l;y(),x==null||x.unsubscribe()};return le(function(x,b){d++,!g&&!p&&m();var w=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=Hu(v,u))}),w.subscribe(b),!l&&d>0&&(l=new ci({next:function($){return w.next($)},error:function($){g=!0,m(),h=Hu(y,i,$),w.error($)},complete:function(){p=!0,m(),h=Hu(y,a),w.complete()}}),fe(x).subscribe(l))})(c)}}function Hu(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new ci({next:function(){i.unsubscribe(),t()}});return fe(e.apply(void 0,ui([],hr(n)))).subscribe(i)}}function Ye(t,e,n){var r,i=!1;return r=t,__({connector:function(){return new Ix(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function B(t,e){return le(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(oe(r,function(u){i==null||i.unsubscribe();var c=0,l=o++;fe(t(u,l)).subscribe(i=oe(r,function(h){return r.next(e?e(u,h,l,c++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function F(t){return le(function(e,n){fe(t).subscribe(oe(n,function(){return n.complete()},Ru)),!n.closed&&e.subscribe(n)})}const gr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Bo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function w_(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Sd(t){let e,n,r;t.length!==2?(e=Bo,n=(s,u)=>Bo(t(s),u),r=(s,u)=>t(s)-u):(e=t===Bo||t===w_?t:$_,n=t,r=t);function i(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<0?c=h+1:l=h}while(c<l)}return c}function o(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<=0?c=h+1:l=h}while(c<l)}return c}function a(s,u,c=0,l=s.length){const h=i(s,u,c,l-1);return h>c&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function $_(){return 0}function S_(t){return t===null?NaN:+t}const A_=Sd(Bo),Ad=A_.right;Sd(S_).center;class Md extends Map{constructor(e,n=P_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(Td(this,e))}has(e){return super.has(Td(this,e))}set(e,n){return super.set(M_(this,e),n)}delete(e){return super.delete(T_(this,e))}}function Td({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function M_({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function T_({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function P_(t){return t!==null&&typeof t=="object"?t.valueOf():t}const D_=Math.sqrt(50),L_=Math.sqrt(10),E_=Math.sqrt(2);function Yo(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=D_?10:o>=L_?5:o>=E_?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?Yo(t,e,n*2):[s,u,c]}function k_(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Yo(e,t,n):Yo(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function qu(t,e,n){return e=+e,t=+t,n=+n,Yo(t,e,n)[2]}function C_(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?qu(e,t,n):qu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function I_(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}var R_={value:()=>{}};function Pd(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Wo(n)}function Wo(t){this._=t}function N_(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Wo.prototype=Pd.prototype={constructor:Wo,on:function(t,e){var n=this._,r=N_(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=F_(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=Dd(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Dd(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Wo(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function F_(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Dd(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=R_,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Xu="http://www.w3.org/1999/xhtml";const Ld={svg:"http://www.w3.org/2000/svg",xhtml:Xu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ho(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Ld.hasOwnProperty(e)?{space:Ld[e],local:t}:t}function G_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Xu&&e.documentElement.namespaceURI===Xu?e.createElement(t):e.createElementNS(n,t)}}function z_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ed(t){var e=Ho(t);return(e.local?z_:G_)(e)}function O_(){}function ju(t){return t==null?O_:function(){return this.querySelector(t)}}function U_(t){typeof t!="function"&&(t=ju(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=t.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new ve(r,this._parents)}function B_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Y_(){return[]}function kd(t){return t==null?Y_:function(){return this.querySelectorAll(t)}}function W_(t){return function(){return B_(t.apply(this,arguments))}}function H_(t){typeof t=="function"?t=W_(t):t=kd(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new ve(r,i)}function Cd(t){return function(){return this.matches(t)}}function Id(t){return function(e){return e.matches(t)}}var q_=Array.prototype.find;function X_(t){return function(){return q_.call(this.children,t)}}function j_(){return this.firstElementChild}function V_(t){return this.select(t==null?j_:X_(typeof t=="function"?t:Id(t)))}var Z_=Array.prototype.filter;function K_(){return Array.from(this.children)}function Q_(t){return function(){return Z_.call(this.children,t)}}function J_(t){return this.selectAll(t==null?K_:Q_(typeof t=="function"?t:Id(t)))}function tw(t){typeof t!="function"&&(t=Cd(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new ve(r,this._parents)}function Rd(t){return new Array(t.length)}function ew(){return new ve(this._enter||this._groups.map(Rd),this._parents)}function qo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}qo.prototype={constructor:qo,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function nw(t){return function(){return t}}function rw(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new qo(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function iw(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),d;for(s=0;s<l;++s)(u=e[s])&&(f[s]=d=a.call(u,u.__data__,s,e)+"",c.has(d)?i[s]=u:c.set(d,u));for(s=0;s<h;++s)d=a.call(t,o[s],s,o)+"",(u=c.get(d))?(r[s]=u,u.__data__=o[s],c.delete(d)):n[s]=new qo(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function ow(t){return t.__data__}function aw(t,e){if(!arguments.length)return Array.from(this,ow);var n=e?iw:rw,r=this._parents,i=this._groups;typeof t!="function"&&(t=nw(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,d=sw(t.call(l,l&&l.__data__,c,r)),p=d.length,g=s[c]=new Array(p),m=a[c]=new Array(p),y=u[c]=new Array(f);n(l,h,g,m,y,d,e);for(var v=0,x=0,b,w;v<p;++v)if(b=g[v]){for(v>=x&&(x=v+1);!(w=m[x])&&++x<p;);b._next=w||null}}return a=new ve(a,r),a._enter=s,a._exit=u,a}function sw(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function uw(){return new ve(this._exit||this._groups.map(Rd),this._parents)}function cw(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function lw(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],l=r[u],h=c.length,f=s[u]=new Array(h),d,p=0;p<h;++p)(d=c[p]||l[p])&&(f[p]=d);for(;u<i;++u)s[u]=n[u];return new ve(s,this._parents)}function fw(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function hw(t){t||(t=dw);function e(h,f){return h&&f?t(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(e)}return new ve(i,this._parents).order()}function dw(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function pw(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function gw(){return Array.from(this)}function mw(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function yw(){let t=0;for(const e of this)++t;return t}function bw(){return!this.node()}function vw(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function xw(t){return function(){this.removeAttribute(t)}}function _w(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ww(t,e){return function(){this.setAttribute(t,e)}}function $w(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Sw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Aw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Mw(t,e){var n=Ho(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?_w:xw:typeof e=="function"?n.local?Aw:Sw:n.local?$w:ww)(n,e))}function Nd(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Tw(t){return function(){this.style.removeProperty(t)}}function Pw(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Dw(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Lw(t,e,n){return arguments.length>1?this.each((e==null?Tw:typeof e=="function"?Dw:Pw)(t,e,n??"")):mr(this.node(),t)}function mr(t,e){return t.style.getPropertyValue(e)||Nd(t).getComputedStyle(t,null).getPropertyValue(e)}function Ew(t){return function(){delete this[t]}}function kw(t,e){return function(){this[t]=e}}function Cw(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Iw(t,e){return arguments.length>1?this.each((e==null?Ew:typeof e=="function"?Cw:kw)(t,e)):this.node()[t]}function Fd(t){return t.trim().split(/^|\s+/)}function Vu(t){return t.classList||new Gd(t)}function Gd(t){this._node=t,this._names=Fd(t.getAttribute("class")||"")}Gd.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function zd(t,e){for(var n=Vu(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Od(t,e){for(var n=Vu(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Rw(t){return function(){zd(this,t)}}function Nw(t){return function(){Od(this,t)}}function Fw(t,e){return function(){(e.apply(this,arguments)?zd:Od)(this,t)}}function Gw(t,e){var n=Fd(t+"");if(arguments.length<2){for(var r=Vu(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Fw:e?Rw:Nw)(n,e))}function zw(){this.textContent=""}function Ow(t){return function(){this.textContent=t}}function Uw(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Bw(t){return arguments.length?this.each(t==null?zw:(typeof t=="function"?Uw:Ow)(t)):this.node().textContent}function Yw(){this.innerHTML=""}function Ww(t){return function(){this.innerHTML=t}}function Hw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function qw(t){return arguments.length?this.each(t==null?Yw:(typeof t=="function"?Hw:Ww)(t)):this.node().innerHTML}function Xw(){this.nextSibling&&this.parentNode.appendChild(this)}function jw(){return this.each(Xw)}function Vw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Zw(){return this.each(Vw)}function Kw(t){var e=typeof t=="function"?t:Ed(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Qw(){return null}function Jw(t,e){var n=typeof t=="function"?t:Ed(t),r=e==null?Qw:typeof e=="function"?e:ju(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function t$(){var t=this.parentNode;t&&t.removeChild(this)}function e$(){return this.each(t$)}function n$(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function r$(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function i$(t){return this.select(t?r$:n$)}function o$(t){return arguments.length?this.property("__data__",t):this.node().__data__}function a$(t){return function(e){t.call(this,e,this.__data__)}}function s$(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function u$(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function c$(t,e,n){return function(){var r=this.__on,i,o=a$(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function l$(t,e,n){var r=s$(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(i=0,l=s[u];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?c$:u$,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Ud(t,e,n){var r=Nd(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function f$(t,e){return function(){return Ud(this,t,e)}}function h$(t,e){return function(){return Ud(this,t,e.apply(this,arguments))}}function d$(t,e){return this.each((typeof e=="function"?h$:f$)(t,e))}function*p$(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var g$=[null];function ve(t,e){this._groups=t,this._parents=e}function di(){return new ve([[document.documentElement]],g$)}function m$(){return this}ve.prototype=di.prototype={constructor:ve,select:U_,selectAll:H_,selectChild:V_,selectChildren:J_,filter:tw,data:aw,enter:ew,exit:uw,join:cw,merge:lw,selection:m$,order:fw,sort:hw,call:pw,nodes:gw,node:mw,size:yw,empty:bw,each:vw,attr:Mw,style:Lw,property:Iw,classed:Gw,text:Bw,html:qw,raise:jw,lower:Zw,append:Kw,insert:Jw,remove:e$,clone:i$,datum:o$,on:l$,dispatch:d$,[Symbol.iterator]:p$};function Zu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Bd(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function pi(){}var gi=.7,Xo=1/gi,yr="\\s*([+-]?\\d+)\\s*",mi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",y$=/^#([0-9a-f]{3,8})$/,b$=new RegExp(`^rgb\\(${yr},${yr},${yr}\\)$`),v$=new RegExp(`^rgb\\(${Le},${Le},${Le}\\)$`),x$=new RegExp(`^rgba\\(${yr},${yr},${yr},${mi}\\)$`),_$=new RegExp(`^rgba\\(${Le},${Le},${Le},${mi}\\)$`),w$=new RegExp(`^hsl\\(${mi},${Le},${Le}\\)$`),$$=new RegExp(`^hsla\\(${mi},${Le},${Le},${mi}\\)$`),Yd={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Zu(pi,Mn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Wd,formatHex:Wd,formatHex8:S$,formatHsl:A$,formatRgb:Hd,toString:Hd});function Wd(){return this.rgb().formatHex()}function S$(){return this.rgb().formatHex8()}function A$(){return Zd(this).formatHsl()}function Hd(){return this.rgb().formatRgb()}function Mn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=y$.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?qd(e):n===3?new ee(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?jo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?jo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=b$.exec(t))?new ee(e[1],e[2],e[3],1):(e=v$.exec(t))?new ee(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=x$.exec(t))?jo(e[1],e[2],e[3],e[4]):(e=_$.exec(t))?jo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=w$.exec(t))?Vd(e[1],e[2]/100,e[3]/100,1):(e=$$.exec(t))?Vd(e[1],e[2]/100,e[3]/100,e[4]):Yd.hasOwnProperty(t)?qd(Yd[t]):t==="transparent"?new ee(NaN,NaN,NaN,0):null}function qd(t){return new ee(t>>16&255,t>>8&255,t&255,1)}function jo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ee(t,e,n,r)}function M$(t){return t instanceof pi||(t=Mn(t)),t?(t=t.rgb(),new ee(t.r,t.g,t.b,t.opacity)):new ee}function Ku(t,e,n,r){return arguments.length===1?M$(t):new ee(t,e,n,r??1)}function ee(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Zu(ee,Ku,Bd(pi,{brighter(t){return t=t==null?Xo:Math.pow(Xo,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?gi:Math.pow(gi,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ee(Tn(this.r),Tn(this.g),Tn(this.b),Vo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Xd,formatHex:Xd,formatHex8:T$,formatRgb:jd,toString:jd}));function Xd(){return`#${Pn(this.r)}${Pn(this.g)}${Pn(this.b)}`}function T$(){return`#${Pn(this.r)}${Pn(this.g)}${Pn(this.b)}${Pn((isNaN(this.opacity)?1:this.opacity)*255)}`}function jd(){const t=Vo(this.opacity);return`${t===1?"rgb(":"rgba("}${Tn(this.r)}, ${Tn(this.g)}, ${Tn(this.b)}${t===1?")":`, ${t})`}`}function Vo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Tn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Pn(t){return t=Tn(t),(t<16?"0":"")+t.toString(16)}function Vd(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new xe(t,e,n,r)}function Zd(t){if(t instanceof xe)return new xe(t.h,t.s,t.l,t.opacity);if(t instanceof pi||(t=Mn(t)),!t)return new xe;if(t instanceof xe)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new xe(a,s,u,t.opacity)}function P$(t,e,n,r){return arguments.length===1?Zd(t):new xe(t,e,n,r??1)}function xe(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Zu(xe,P$,Bd(pi,{brighter(t){return t=t==null?Xo:Math.pow(Xo,t),new xe(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?gi:Math.pow(gi,t),new xe(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ee(Qu(t>=240?t-240:t+120,i,r),Qu(t,i,r),Qu(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new xe(Kd(this.h),Zo(this.s),Zo(this.l),Vo(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=Vo(this.opacity);return`${t===1?"hsl(":"hsla("}${Kd(this.h)}, ${Zo(this.s)*100}%, ${Zo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Kd(t){return t=(t||0)%360,t<0?t+360:t}function Zo(t){return Math.max(0,Math.min(1,t||0))}function Qu(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Ju=t=>()=>t;function D$(t,e){return function(n){return t+n*e}}function L$(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function E$(t){return(t=+t)==1?Qd:function(e,n){return n-e?L$(e,n,t):Ju(isNaN(e)?n:e)}}function Qd(t,e){var n=e-t;return n?D$(t,n):Ju(isNaN(t)?e:t)}const Ko=function t(e){var n=E$(e);function r(i,o){var a=n((i=Ku(i)).r,(o=Ku(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=Qd(i.opacity,o.opacity);return function(l){return i.r=a(l),i.g=s(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=t,r}(1);function k$(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function C$(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function I$(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=nc(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function R$(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function _e(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function N$(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=nc(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var tc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ec=new RegExp(tc.source,"g");function F$(t){return function(){return t}}function G$(t){return function(e){return t(e)+""}}function Jd(t,e){var n=tc.lastIndex=ec.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=tc.exec(t))&&(i=ec.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:_e(r,i)})),n=ec.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?G$(u[0].x):F$(e):(e=u.length,function(c){for(var l=0,h;l<e;++l)s[(h=u[l]).i]=h.x(c);return s.join("")})}function nc(t,e){var n=typeof e,r;return e==null||n==="boolean"?Ju(e):(n==="number"?_e:n==="string"?(r=Mn(e))?(e=r,Ko):Jd:e instanceof Mn?Ko:e instanceof Date?R$:C$(e)?k$:Array.isArray(e)?I$:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?N$:_e)(t,e)}function z$(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var tp=180/Math.PI,ep={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function np(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*tp,skewX:Math.atan(u)*tp,scaleX:a,scaleY:s}}var Qo;function O$(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ep:np(e.a,e.b,e.c,e.d,e.e,e.f)}function U$(t){return t==null||(Qo||(Qo=document.createElementNS("http://www.w3.org/2000/svg","g")),Qo.setAttribute("transform",t),!(t=Qo.transform.baseVal.consolidate()))?ep:(t=t.matrix,np(t.a,t.b,t.c,t.d,t.e,t.f))}function rp(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push("translate(",null,e,null,n);p.push({i:g-4,x:_e(c,h)},{i:g-2,x:_e(l,f)})}else(h||f)&&d.push("translate("+h+e+f+n)}function a(c,l,h,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:_e(c,l)})):l&&h.push(i(h)+"rotate("+l+r)}function s(c,l,h,f){c!==l?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:_e(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push(i(d)+"scale(",null,",",null,")");p.push({i:g-4,x:_e(c,h)},{i:g-2,x:_e(l,f)})}else(h!==1||f!==1)&&d.push(i(d)+"scale("+h+","+f+")")}return function(c,l){var h=[],f=[];return c=t(c),l=t(l),o(c.translateX,c.translateY,l.translateX,l.translateY,h,f),a(c.rotate,l.rotate,h,f),s(c.skewX,l.skewX,h,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,h,f),c=l=null,function(d){for(var p=-1,g=f.length,m;++p<g;)h[(m=f[p]).i]=m.x(d);return h.join("")}}}var B$=rp(O$,"px, ","px)","deg)"),Y$=rp(U$,", ",")",")"),br=0,yi=0,bi=0,ip=1e3,Jo,vi,ta=0,Dn=0,ea=0,xi=typeof performance=="object"&&performance.now?performance:Date,op=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function rc(){return Dn||(op(W$),Dn=xi.now()+ea)}function W$(){Dn=0}function na(){this._call=this._time=this._next=null}na.prototype=ap.prototype={constructor:na,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?rc():+n)+(e==null?0:+e),!this._next&&vi!==this&&(vi?vi._next=this:Jo=this,vi=this),this._call=t,this._time=n,ic()},stop:function(){this._call&&(this._call=null,this._time=1/0,ic())}};function ap(t,e,n){var r=new na;return r.restart(t,e,n),r}function H$(){rc(),++br;for(var t=Jo,e;t;)(e=Dn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--br}function sp(){Dn=(ta=xi.now())+ea,br=yi=0;try{H$()}finally{br=0,X$(),Dn=0}}function q$(){var t=xi.now(),e=t-ta;e>ip&&(ea-=e,ta=t)}function X$(){for(var t,e=Jo,n,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:Jo=n);vi=t,ic(r)}function ic(t){if(!br){yi&&(yi=clearTimeout(yi));var e=t-Dn;e>24?(t<1/0&&(yi=setTimeout(sp,t-xi.now()-ea)),bi&&(bi=clearInterval(bi))):(bi||(ta=xi.now(),bi=setInterval(q$,ip)),br=1,op(sp))}}function up(t,e,n){var r=new na;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var j$=Pd("start","end","cancel","interrupt"),V$=[],cp=0,lp=1,oc=2,ra=3,fp=4,ac=5,ia=6;function oa(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;Z$(t,n,{name:e,index:r,group:i,on:j$,tween:V$,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:cp})}function sc(t,e){var n=we(t,e);if(n.state>cp)throw new Error("too late; already scheduled");return n}function Ee(t,e){var n=we(t,e);if(n.state>ra)throw new Error("too late; already running");return n}function we(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Z$(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=ap(o,0,n.time);function o(c){n.state=lp,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,d;if(n.state!==lp)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===ra)return up(a);d.state===fp?(d.state=ia,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=ia,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(up(function(){n.state===ra&&(n.state=fp,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=oc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===oc){for(n.state=ra,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=d);i.length=h+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=ac,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===ac&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=ia,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function K$(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>oc&&r.state<ac,r.state=ia,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function Q$(t){return this.each(function(){K$(this,t)})}function J$(t,e){var n,r;return function(){var i=Ee(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function tS(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ee(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function eS(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=we(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?J$:tS)(n,t,e))}function uc(t,e,n){var r=t._id;return t.each(function(){var i=Ee(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return we(i,r).value[e]}}function hp(t,e){var n;return(typeof e=="number"?_e:e instanceof Mn?Ko:(n=Mn(e))?(e=n,Ko):Jd)(t,e)}function nS(t){return function(){this.removeAttribute(t)}}function rS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function iS(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function oS(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function aS(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function sS(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function uS(t,e){var n=Ho(t),r=n==="transform"?Y$:hp;return this.attrTween(t,typeof e=="function"?(n.local?sS:aS)(n,r,uc(this,"attr."+t,e)):e==null?(n.local?rS:nS)(n):(n.local?oS:iS)(n,r,e))}function cS(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function lS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function fS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&lS(t,o)),n}return i._value=e,i}function hS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&cS(t,o)),n}return i._value=e,i}function dS(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Ho(t);return this.tween(n,(r.local?fS:hS)(r,e))}function pS(t,e){return function(){sc(this,t).delay=+e.apply(this,arguments)}}function gS(t,e){return e=+e,function(){sc(this,t).delay=e}}function mS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?pS:gS)(e,t)):we(this.node(),e).delay}function yS(t,e){return function(){Ee(this,t).duration=+e.apply(this,arguments)}}function bS(t,e){return e=+e,function(){Ee(this,t).duration=e}}function vS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?yS:bS)(e,t)):we(this.node(),e).duration}function xS(t,e){if(typeof e!="function")throw new Error;return function(){Ee(this,t).ease=e}}function _S(t){var e=this._id;return arguments.length?this.each(xS(e,t)):we(this.node(),e).ease}function wS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ee(this,t).ease=n}}function $S(t){if(typeof t!="function")throw new Error;return this.each(wS(this._id,t))}function SS(t){typeof t!="function"&&(t=Cd(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new We(r,this._parents,this._name,this._id)}function AS(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],c=n[s],l=u.length,h=a[s]=new Array(l),f,d=0;d<l;++d)(f=u[d]||c[d])&&(h[d]=f);for(;s<r;++s)a[s]=e[s];return new We(a,this._parents,this._name,this._id)}function MS(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function TS(t,e,n){var r,i,o=MS(e)?sc:Ee;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function PS(t,e){var n=this._id;return arguments.length<2?we(this.node(),n).on.on(t):this.each(TS(n,t,e))}function DS(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function LS(){return this.on("end.remove",DS(this._id))}function ES(t){var e=this._name,n=this._id;typeof t!="function"&&(t=ju(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,oa(c[f],e,n,f,c,we(l,n)));return new We(o,this._parents,e,n)}function kS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=kd(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,l,h=0;h<c;++h)if(l=u[h]){for(var f=t.call(l,l.__data__,h,u),d,p=we(l,n),g=0,m=f.length;g<m;++g)(d=f[g])&&oa(d,e,n,g,f,p);o.push(f),a.push(l)}return new We(o,a,e,n)}var CS=di.prototype.constructor;function IS(){return new CS(this._groups,this._parents)}function RS(t,e){var n,r,i;return function(){var o=mr(this,t),a=(this.style.removeProperty(t),mr(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function dp(t){return function(){this.style.removeProperty(t)}}function NS(t,e,n){var r,i=n+"",o;return function(){var a=mr(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function FS(t,e,n){var r,i,o;return function(){var a=mr(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),mr(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function GS(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Ee(this,t),c=u.on,l=u.value[o]==null?s||(s=dp(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function zS(t,e,n){var r=(t+="")=="transform"?B$:hp;return e==null?this.styleTween(t,RS(t,r)).on("end.style."+t,dp(t)):typeof e=="function"?this.styleTween(t,FS(t,r,uc(this,"style."+t,e))).each(GS(this._id,t)):this.styleTween(t,NS(t,r,e),n).on("end.style."+t,null)}function OS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function US(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&OS(t,a,n)),r}return o._value=e,o}function BS(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,US(t,e,n??""))}function YS(t){return function(){this.textContent=t}}function WS(t){return function(){var e=t(this);this.textContent=e??""}}function HS(t){return this.tween("text",typeof t=="function"?WS(uc(this,"text",t)):YS(t==null?"":t+""))}function qS(t){return function(e){this.textContent=t.call(this,e)}}function XS(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&qS(i)),e}return r._value=t,r}function jS(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,XS(t))}function VS(){for(var t=this._name,e=this._id,n=pp(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=we(u,e);oa(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new We(r,this._parents,t,n)}function ZS(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=Ee(this,r),l=c.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var KS=0;function We(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function pp(){return++KS}var He=di.prototype;We.prototype={constructor:We,select:ES,selectAll:kS,selectChild:He.selectChild,selectChildren:He.selectChildren,filter:SS,merge:AS,selection:IS,transition:VS,call:He.call,nodes:He.nodes,node:He.node,size:He.size,empty:He.empty,each:He.each,on:PS,attr:uS,attrTween:dS,style:zS,styleTween:BS,text:HS,textTween:jS,remove:LS,tween:eS,delay:mS,duration:vS,ease:_S,easeVarying:$S,end:ZS,[Symbol.iterator]:He[Symbol.iterator]};function QS(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var JS={time:null,delay:0,duration:250,ease:QS};function t3(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function e3(t){var e,n;t instanceof We?(e=t._id,t=t._name):(e=pp(),(n=JS).time=rc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&oa(u,t,e,c,a,n||t3(u,e));return new We(r,this._parents,t,e)}di.prototype.interrupt=Q$,di.prototype.transition=e3;function n3(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function aa(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function vr(t){return t=aa(Math.abs(t)),t?t[1]:NaN}function r3(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function i3(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var o3=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function sa(t){if(!(e=o3.exec(t)))throw new Error("invalid format: "+t);var e;return new cc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}sa.prototype=cc.prototype;function cc(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}cc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function a3(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var gp;function s3(t,e){var n=aa(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(gp=Math.max(-8,Math.min(8,Math.floor(i/3)))*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")+aa(t,Math.max(0,e+o-1))[0]}function mp(t,e){var n=aa(t,e);if(!n)return t+"";var r=n[0],i=n[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")}const yp={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:n3,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>mp(t*100,e),r:mp,s:s3,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function bp(t){return t}var vp=Array.prototype.map,xp=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function u3(t){var e=t.grouping===void 0||t.thousands===void 0?bp:r3(vp.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?bp:i3(vp.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(h){h=sa(h);var f=h.fill,d=h.align,p=h.sign,g=h.symbol,m=h.zero,y=h.width,v=h.comma,x=h.precision,b=h.trim,w=h.type;w==="n"?(v=!0,w="g"):yp[w]||(x===void 0&&(x=12),b=!0,w="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var $=g==="$"?n:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",A=g==="$"?r:/[%p]/.test(w)?a:"",_=yp[w],L=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function E(T){var I=$,P=A,D,C,S;if(w==="c")P=_(T)+P,T="";else{T=+T;var R=T<0||1/T<0;if(T=isNaN(T)?u:_(Math.abs(T),x),b&&(T=a3(T)),R&&+T==0&&p!=="+"&&(R=!1),I=(R?p==="("?p:s:p==="-"||p==="("?"":p)+I,P=(w==="s"?xp[8+gp/3]:"")+P+(R&&p==="("?")":""),L){for(D=-1,C=T.length;++D<C;)if(S=T.charCodeAt(D),48>S||S>57){P=(S===46?i+T.slice(D+1):T.slice(D))+P,T=T.slice(0,D);break}}}v&&!m&&(T=e(T,1/0));var G=I.length+T.length+P.length,M=G<y?new Array(y-G+1).join(f):"";switch(v&&m&&(T=e(M+T,M.length?y-P.length:1/0),M=""),d){case"<":T=I+T+P+M;break;case"=":T=I+M+T+P;break;case"^":T=M.slice(0,G=M.length>>1)+I+T+P+M.slice(G);break;default:T=M+I+T+P;break}return o(T)}return E.toString=function(){return h+""},E}function l(h,f){var d=c((h=sa(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(vr(f)/3)))*3,g=Math.pow(10,-p),m=xp[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var ua,_p,wp;c3({thousands:",",grouping:[3],currency:["$",""]});function c3(t){return ua=u3(t),_p=ua.format,wp=ua.formatPrefix,ua}function l3(t){return Math.max(0,-vr(Math.abs(t)))}function f3(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vr(e)/3)))*3-vr(Math.abs(t)))}function h3(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,vr(e)-vr(t))+1}function ca(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const $p=Symbol("implicit");function Sp(){var t=new Md,e=[],n=[],r=$p;function i(o){let a=t.get(o);if(a===void 0){if(r!==$p)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Md;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Sp(e,n).unknown(r)},ca.apply(i,arguments),i}function Ap(){var t=Sp().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,l=.5;delete t.unknown;function h(){var f=e().length,d=i<r,p=d?i:r,g=d?r:i;o=(g-p)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),p+=(g-p-o*(f-u))*l,a=o*(1-u),s&&(p=Math.round(p),a=Math.round(a));var m=I_(f).map(function(y){return p+o*y});return n(d?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),h()):e()},t.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,h()):s},t.padding=function(f){return arguments.length?(u=Math.min(1,c=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(c=+f,h()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),h()):l},t.copy=function(){return Ap(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},ca.apply(h(),arguments)}function Mp(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Mp(e())},t}function d3(){return Mp(Ap.apply(null,arguments).paddingInner(1))}function p3(t){return function(){return t}}function g3(t){return+t}var Tp=[0,1];function xr(t){return t}function lc(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:p3(isNaN(e)?NaN:.5)}function m3(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function y3(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=lc(i,r),o=n(a,o)):(r=lc(r,i),o=n(o,a)),function(s){return o(r(s))}}function b3(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=lc(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=Ad(t,s,1,r)-1;return o[u](i[u](s))}}function v3(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function x3(){var t=Tp,e=Tp,n=nc,r,i,o,a=xr,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==xr&&(a=m3(t[0],t[f-1])),s=f>2?b3:y3,u=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(u||(u=s(t.map(r),e,n)))(r(a(f)))}return h.invert=function(f){return a(i((c||(c=s(e,t.map(r),_e)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,g3),l()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),l()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=z$,l()},h.clamp=function(f){return arguments.length?(a=f?!0:xr,l()):a!==xr},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,d){return r=f,i=d,l()}}function _3(){return x3()(xr,xr)}function w3(t,e,n,r){var i=C_(t,e,n),o;switch(r=sa(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=f3(i,a))&&(r.precision=o),wp(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=h3(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=l3(i))&&(r.precision=o-(r.type==="%")*2);break}}return _p(r)}function Pp(t){var e=t.domain;return t.ticks=function(n){var r=e();return k_(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return w3(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,l=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);l-- >0;){if(c=qu(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function Dp(){var t=_3();return t.copy=function(){return v3(t,Dp())},ca.apply(t,arguments),Pp(t)}function Lp(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[Ad(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Lp().domain([t,e]).range(i).unknown(o)},ca.apply(Pp(a),arguments)}function _i(t,e,n){this.k=t,this.x=e,this.y=n}_i.prototype={constructor:_i,scale:function(t){return t===1?this:new _i(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new _i(this.k,this.x+this.k*t,this.y+this.k*e)},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+")"}},_i.prototype;function la(t){return Object.prototype.toString.call(t)==="[object Object]"}function fc(t,e){if(la(t)===!1||la(e)===!1)return Object.assign({},e);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let s;la(r[a])&&la(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var hc=function(t,e){return hc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},hc(t,e)};function qe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");hc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function $3(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(h){a(h)}}function u(l){try{c(r.throw(l))}catch(h){a(h)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(t,[])).next())})}function Ep(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function _r(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function wi(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function $i(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function wr(t){return this instanceof wr?(this.v=t,this):new wr(t)}function S3(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(d){return function(p){return Promise.resolve(p).then(d,h)}}function s(d,p){r[d]&&(i[d]=function(g){return new Promise(function(m,y){o.push([d,g,m,y])>1||u(d,g)})},p&&(i[d]=p(i[d])))}function u(d,p){try{c(r[d](p))}catch(g){f(o[0][3],g)}}function c(d){d.value instanceof wr?Promise.resolve(d.value.v).then(l,h):f(o[0][2],d)}function l(d){u("next",d)}function h(d){u("throw",d)}function f(d,p){d(p),o.shift(),o.length&&u(o[0][0],o[0][1])}}function A3(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof _r=="function"?_r(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,u){a=t[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(c){o({value:c,done:s})},a)}}function Pt(t){return typeof t=="function"}function dc(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var pc=dc(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function Iu(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Go=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=fr(a),u=s.next();!u.done;u=s.next()){var c=u.value;c.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(mt(l))try{l()}catch(g){o=g instanceof Cu?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=fr(h),d=f.next();!d.done;d=f.next()){var p=d.value;try{td(p)}catch(g){o=o??[],g instanceof Cu?o=ui(ui([],hr(o)),hr(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new Cu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)td(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&Iu(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Iu(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Qh=Go.EMPTY;function Jh(t){return t instanceof Go||t&&"closed"in t&&mt(t.remove)&&mt(t.add)&&mt(t.unsubscribe)}function td(t){mt(t)?t():t.unsubscribe()}var ed={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},nd={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,ui([t,e],hr(n)))},clearTimeout:function(t){var e=nd.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function rd(t){nd.setTimeout(function(){throw t})}function Ru(){}function zo(t){t()}var Nu=function(t){lr(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Jh(n)&&n.add(r)):r.destination=Ex,r}return e.create=function(n,r,i){return new ci(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Go),Px=Function.prototype.bind;function Fu(t,e){return Px.call(t,e)}var Dx=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){Oo(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Oo(r)}else Oo(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Oo(n)}},t}(),ci=function(t){lr(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(mt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&ed.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Fu(n.next,s),error:n.error&&Fu(n.error,s),complete:n.complete&&Fu(n.complete,s)}):a=n}return o.destination=new Dx(a),o}return e}(Nu);function Oo(t){rd(t)}function Lx(t){throw t}var Ex={closed:!0,next:Ru,error:Lx,complete:Ru},Gu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function pr(t){return t}function kx(t){return t.length===0?pr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var lt=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=Ix(e)?e:new ci(e,n,r);return zo(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=id(n),new n(function(i,o){var a=new ci({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[Gu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return kx(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=id(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function id(t){var e;return(e=t??ed.Promise)!==null&&e!==void 0?e:Promise}function Cx(t){return t&&mt(t.next)&&mt(t.error)&&mt(t.complete)}function Ix(t){return t&&t instanceof Nu||Cx(t)&&Jh(t)}function Rx(t){return mt(t==null?void 0:t.lift)}function le(t){return function(e){if(Rx(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function oe(t,e,n,r,i){return new Nx(t,e,n,r,i)}var Nx=function(t){lr(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(c){try{r(c)}catch(l){n.error(l)}}:t.prototype._next,u._error=o?function(c){try{o(c)}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(Nu),Fx=ku(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),nt=function(t){lr(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new od(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new Fx},e.prototype.next=function(n){var r=this;zo(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=fr(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;zo(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;zo(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?Qh:(this.currentObservers=null,s.push(n),new Go(function(){r.currentObservers=null,Iu(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new lt;return n.source=this,n},e.create=function(n,r){return new od(n,r)},e}(lt),od=function(t){lr(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Qh},e}(nt),ad={now:function(){return(ad.delegate||Date).now()},delegate:void 0},Gx=function(t){lr(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=ad);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),c=0,l=1;l<o.length&&o[l]<=u;l+=2)c=l;c&&o.splice(0,c+1)}},e}(nt),sd=new lt(function(t){return t.complete()});function zx(t){return t&&mt(t.schedule)}function zu(t){return t[t.length-1]}function Ox(t){return mt(zu(t))?t.pop():void 0}function Ou(t){return zx(zu(t))?t.pop():void 0}function Ux(t,e){return typeof zu(t)=="number"?t.pop():e}var Uu=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function ud(t){return mt(t==null?void 0:t.then)}function cd(t){return mt(t[Gu])}function ld(t){return Symbol.asyncIterator&&mt(t==null?void 0:t[Symbol.asyncIterator])}function fd(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Bx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var hd=Bx();function dd(t){return mt(t==null?void 0:t[hd])}function pd(t){return Mx(this,arguments,function(){var n,r,i,o;return Kh(this,function(a){switch(a.label){case 0:n=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,dr(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,dr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,dr(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function gd(t){return mt(t==null?void 0:t.getReader)}function fe(t){if(t instanceof lt)return t;if(t!=null){if(cd(t))return Yx(t);if(Uu(t))return Hx(t);if(ud(t))return Wx(t);if(ld(t))return md(t);if(dd(t))return qx(t);if(gd(t))return Xx(t)}throw fd(t)}function Yx(t){return new lt(function(e){var n=t[Gu]();if(mt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Hx(t){return new lt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Wx(t){return new lt(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,rd)})}function qx(t){return new lt(function(e){var n,r;try{for(var i=fr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function md(t){return new lt(function(e){jx(t,e).catch(function(n){return e.error(n)})})}function Xx(t){return md(pd(t))}function jx(t,e){var n,r,i,o;return Ax(this,void 0,void 0,function(){var a,s;return Kh(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=Tx(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function cn(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function yd(t,e){return e===void 0&&(e=0),le(function(n,r){n.subscribe(oe(r,function(i){return cn(r,t,function(){return r.next(i)},e)},function(){return cn(r,t,function(){return r.complete()},e)},function(i){return cn(r,t,function(){return r.error(i)},e)}))})}function bd(t,e){return e===void 0&&(e=0),le(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Vx(t,e){return fe(t).pipe(bd(e),yd(e))}function Zx(t,e){return fe(t).pipe(bd(e),yd(e))}function Kx(t,e){return new lt(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Qx(t,e){return new lt(function(n){var r;return cn(n,e,function(){r=t[hd](),cn(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return mt(r==null?void 0:r.return)&&r.return()}})}function vd(t,e){if(!t)throw new Error("Iterable cannot be null");return new lt(function(n){cn(n,e,function(){var r=t[Symbol.asyncIterator]();cn(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Jx(t,e){return vd(pd(t),e)}function t_(t,e){if(t!=null){if(cd(t))return Vx(t,e);if(Uu(t))return Kx(t,e);if(ud(t))return Zx(t,e);if(ld(t))return vd(t,e);if(dd(t))return Qx(t,e);if(gd(t))return Jx(t,e)}throw fd(t)}function Uo(t,e){return e?t_(t,e):fe(t)}function li(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ou(t);return Uo(t,n)}var xd=ku(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function O(t,e){return le(function(n,r){var i=0;n.subscribe(oe(r,function(o){r.next(t.call(e,o,i++))}))})}var e_=Array.isArray;function n_(t,e){return e_(e)?t.apply(void 0,ui([],hr(e))):t(e)}function _d(t){return O(function(e){return n_(t,e)})}var r_=Array.isArray,i_=Object.getPrototypeOf,o_=Object.prototype,a_=Object.keys;function s_(t){if(t.length===1){var e=t[0];if(r_(e))return{args:e,keys:null};if(u_(e)){var n=a_(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function u_(t){return t&&typeof t=="object"&&i_(t)===o_}function c_(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function W(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ou(t),r=Ox(t),i=s_(t),o=i.args,a=i.keys;if(o.length===0)return Uo([],n);var s=new lt(l_(o,n,a?function(u){return c_(a,u)}:pr));return r?s.pipe(_d(r)):s}function l_(t,e,n){return n===void 0&&(n=pr),function(r){wd(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(l){wd(e,function(){var h=Uo(t[l],e),f=!1;h.subscribe(oe(r,function(d){o[l]=d,f||(f=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},c=0;c<i;c++)u(c)},r)}}function wd(t,e,n){t?cn(n,t,e):e()}function f_(t,e,n,r,i,o,a,s){var u=[],c=0,l=0,h=!1,f=function(){h&&!u.length&&!c&&e.complete()},d=function(g){return c<r?p(g):u.push(g)},p=function(g){c++;var m=!1;fe(n(g,l++)).subscribe(oe(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var v=u.shift();a||p(v)};u.length&&c<r;)y();f()}catch(v){e.error(v)}}))};return t.subscribe(oe(e,d,function(){h=!0,f()})),function(){}}function Bu(t,e,n){return n===void 0&&(n=1/0),mt(e)?Bu(function(r,i){return O(function(o,a){return e(r,o,i,a)})(fe(t(r,i)))},n):(typeof e=="number"&&(n=e),le(function(r,i){return f_(r,i,t,n)}))}function h_(t){return t===void 0&&(t=1/0),Bu(pr,t)}function d_(t){return new lt(function(e){fe(t()).subscribe(e)})}var p_=["addListener","removeListener"],g_=["addEventListener","removeEventListener"],m_=["on","off"];function Yu(t,e,n,r){if(mt(n)&&(r=n,n=void 0),r)return Yu(t,e,n).pipe(_d(r));var i=hr(v_(t)?g_.map(function(s){return function(u){return t[s](e,u,n)}}):y_(t)?p_.map($d(t,e)):b_(t)?m_.map($d(t,e)):[],2),o=i[0],a=i[1];if(!o&&Uu(t))return Bu(function(s){return Yu(s,e,n)})(fe(t));if(!o)throw new TypeError("Invalid event target");return new lt(function(s){var u=function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];return s.next(1<c.length?c:c[0])};return o(u),function(){return a(u)}})}function $d(t,e){return function(n){return function(r){return t[n](e,r)}}}function y_(t){return mt(t.addListener)&&mt(t.removeListener)}function b_(t){return mt(t.on)&&mt(t.off)}function v_(t){return mt(t.addEventListener)&&mt(t.removeEventListener)}function Sd(t,e,n){return d_(function(){return t()?e:n})}function Hu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ou(t),r=Ux(t,1/0),i=t;return i.length?i.length===1?fe(i[0]):h_(r)(Uo(i,n)):sd}function fi(t,e){return le(function(n,r){var i=0;n.subscribe(oe(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function x_(t){return le(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function __(t){return t<=0?function(){return sd}:le(function(e,n){var r=0;e.subscribe(oe(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function ft(t,e){return e===void 0&&(e=pr),t=t??w_,le(function(n,r){var i,o=!0;n.subscribe(oe(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function w_(t,e){return t===e}function $_(t){return t===void 0&&(t=S_),le(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function S_(){return new xd}function hi(t,e){var n=arguments.length>=2;return function(r){return r.pipe(pr,__(1),n?x_(e):$_(function(){return new xd}))}}function A_(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new nt}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(c){var l,h,f,d=0,p=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,p=g=!1},v=function(){var x=l;y(),x==null||x.unsubscribe()};return le(function(x,b){d++,!g&&!p&&m();var w=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=Wu(v,u))}),w.subscribe(b),!l&&d>0&&(l=new ci({next:function($){return w.next($)},error:function($){g=!0,m(),h=Wu(y,i,$),w.error($)},complete:function(){p=!0,m(),h=Wu(y,a),w.complete()}}),fe(x).subscribe(l))})(c)}}function Wu(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new ci({next:function(){i.unsubscribe(),t()}});return fe(e.apply(void 0,ui([],hr(n)))).subscribe(i)}}function Le(t,e,n){var r,i=!1;return r=t,A_({connector:function(){return new Gx(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function B(t,e){return le(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(oe(r,function(u){i==null||i.unsubscribe();var c=0,l=o++;fe(t(u,l)).subscribe(i=oe(r,function(h){return r.next(e?e(u,h,l,c++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function F(t){return le(function(e,n){fe(t).subscribe(oe(n,function(){return n.complete()},Ru)),!n.closed&&e.subscribe(n)})}const gr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Bo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function M_(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ad(t){let e,n,r;t.length!==2?(e=Bo,n=(s,u)=>Bo(t(s),u),r=(s,u)=>t(s)-u):(e=t===Bo||t===M_?t:T_,n=t,r=t);function i(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<0?c=h+1:l=h}while(c<l)}return c}function o(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<=0?c=h+1:l=h}while(c<l)}return c}function a(s,u,c=0,l=s.length){const h=i(s,u,c,l-1);return h>c&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function T_(){return 0}function P_(t){return t===null?NaN:+t}const D_=Ad(Bo),Md=D_.right;Ad(P_).center;class Td extends Map{constructor(e,n=k_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(Pd(this,e))}has(e){return super.has(Pd(this,e))}set(e,n){return super.set(L_(this,e),n)}delete(e){return super.delete(E_(this,e))}}function Pd({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function L_({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function E_({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function k_(t){return t!==null&&typeof t=="object"?t.valueOf():t}const C_=Math.sqrt(50),I_=Math.sqrt(10),R_=Math.sqrt(2);function Yo(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=C_?10:o>=I_?5:o>=R_?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?Yo(t,e,n*2):[s,u,c]}function N_(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Yo(e,t,n):Yo(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function qu(t,e,n){return e=+e,t=+t,n=+n,Yo(t,e,n)[2]}function F_(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?qu(e,t,n):qu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function G_(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}var z_={value:()=>{}};function Dd(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ho(n)}function Ho(t){this._=t}function O_(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ho.prototype=Dd.prototype={constructor:Ho,on:function(t,e){var n=this._,r=O_(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=U_(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=Ld(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Ld(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Ho(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function U_(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Ld(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=z_,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Xu="http://www.w3.org/1999/xhtml";const Ed={svg:"http://www.w3.org/2000/svg",xhtml:Xu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Wo(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Ed.hasOwnProperty(e)?{space:Ed[e],local:t}:t}function B_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Xu&&e.documentElement.namespaceURI===Xu?e.createElement(t):e.createElementNS(n,t)}}function Y_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function kd(t){var e=Wo(t);return(e.local?Y_:B_)(e)}function H_(){}function ju(t){return t==null?H_:function(){return this.querySelector(t)}}function W_(t){typeof t!="function"&&(t=ju(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=t.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new ve(r,this._parents)}function q_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function X_(){return[]}function Cd(t){return t==null?X_:function(){return this.querySelectorAll(t)}}function j_(t){return function(){return q_(t.apply(this,arguments))}}function V_(t){typeof t=="function"?t=j_(t):t=Cd(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new ve(r,i)}function Id(t){return function(){return this.matches(t)}}function Rd(t){return function(e){return e.matches(t)}}var Z_=Array.prototype.find;function K_(t){return function(){return Z_.call(this.children,t)}}function Q_(){return this.firstElementChild}function J_(t){return this.select(t==null?Q_:K_(typeof t=="function"?t:Rd(t)))}var tw=Array.prototype.filter;function ew(){return Array.from(this.children)}function nw(t){return function(){return tw.call(this.children,t)}}function rw(t){return this.selectAll(t==null?ew:nw(typeof t=="function"?t:Rd(t)))}function iw(t){typeof t!="function"&&(t=Id(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new ve(r,this._parents)}function Nd(t){return new Array(t.length)}function ow(){return new ve(this._enter||this._groups.map(Nd),this._parents)}function qo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}qo.prototype={constructor:qo,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function aw(t){return function(){return t}}function sw(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new qo(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function uw(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),d;for(s=0;s<l;++s)(u=e[s])&&(f[s]=d=a.call(u,u.__data__,s,e)+"",c.has(d)?i[s]=u:c.set(d,u));for(s=0;s<h;++s)d=a.call(t,o[s],s,o)+"",(u=c.get(d))?(r[s]=u,u.__data__=o[s],c.delete(d)):n[s]=new qo(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function cw(t){return t.__data__}function lw(t,e){if(!arguments.length)return Array.from(this,cw);var n=e?uw:sw,r=this._parents,i=this._groups;typeof t!="function"&&(t=aw(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,d=fw(t.call(l,l&&l.__data__,c,r)),p=d.length,g=s[c]=new Array(p),m=a[c]=new Array(p),y=u[c]=new Array(f);n(l,h,g,m,y,d,e);for(var v=0,x=0,b,w;v<p;++v)if(b=g[v]){for(v>=x&&(x=v+1);!(w=m[x])&&++x<p;);b._next=w||null}}return a=new ve(a,r),a._enter=s,a._exit=u,a}function fw(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function hw(){return new ve(this._exit||this._groups.map(Nd),this._parents)}function dw(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function pw(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],l=r[u],h=c.length,f=s[u]=new Array(h),d,p=0;p<h;++p)(d=c[p]||l[p])&&(f[p]=d);for(;u<i;++u)s[u]=n[u];return new ve(s,this._parents)}function gw(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function mw(t){t||(t=yw);function e(h,f){return h&&f?t(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(e)}return new ve(i,this._parents).order()}function yw(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function bw(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function vw(){return Array.from(this)}function xw(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function _w(){let t=0;for(const e of this)++t;return t}function ww(){return!this.node()}function $w(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function Sw(t){return function(){this.removeAttribute(t)}}function Aw(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Mw(t,e){return function(){this.setAttribute(t,e)}}function Tw(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Pw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Dw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Lw(t,e){var n=Wo(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?Aw:Sw:typeof e=="function"?n.local?Dw:Pw:n.local?Tw:Mw)(n,e))}function Fd(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ew(t){return function(){this.style.removeProperty(t)}}function kw(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Cw(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Iw(t,e,n){return arguments.length>1?this.each((e==null?Ew:typeof e=="function"?Cw:kw)(t,e,n??"")):mr(this.node(),t)}function mr(t,e){return t.style.getPropertyValue(e)||Fd(t).getComputedStyle(t,null).getPropertyValue(e)}function Rw(t){return function(){delete this[t]}}function Nw(t,e){return function(){this[t]=e}}function Fw(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Gw(t,e){return arguments.length>1?this.each((e==null?Rw:typeof e=="function"?Fw:Nw)(t,e)):this.node()[t]}function Gd(t){return t.trim().split(/^|\s+/)}function Vu(t){return t.classList||new zd(t)}function zd(t){this._node=t,this._names=Gd(t.getAttribute("class")||"")}zd.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Od(t,e){for(var n=Vu(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ud(t,e){for(var n=Vu(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function zw(t){return function(){Od(this,t)}}function Ow(t){return function(){Ud(this,t)}}function Uw(t,e){return function(){(e.apply(this,arguments)?Od:Ud)(this,t)}}function Bw(t,e){var n=Gd(t+"");if(arguments.length<2){for(var r=Vu(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Uw:e?zw:Ow)(n,e))}function Yw(){this.textContent=""}function Hw(t){return function(){this.textContent=t}}function Ww(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function qw(t){return arguments.length?this.each(t==null?Yw:(typeof t=="function"?Ww:Hw)(t)):this.node().textContent}function Xw(){this.innerHTML=""}function jw(t){return function(){this.innerHTML=t}}function Vw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Zw(t){return arguments.length?this.each(t==null?Xw:(typeof t=="function"?Vw:jw)(t)):this.node().innerHTML}function Kw(){this.nextSibling&&this.parentNode.appendChild(this)}function Qw(){return this.each(Kw)}function Jw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function t$(){return this.each(Jw)}function e$(t){var e=typeof t=="function"?t:kd(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function n$(){return null}function r$(t,e){var n=typeof t=="function"?t:kd(t),r=e==null?n$:typeof e=="function"?e:ju(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function i$(){var t=this.parentNode;t&&t.removeChild(this)}function o$(){return this.each(i$)}function a$(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function s$(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function u$(t){return this.select(t?s$:a$)}function c$(t){return arguments.length?this.property("__data__",t):this.node().__data__}function l$(t){return function(e){t.call(this,e,this.__data__)}}function f$(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function h$(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function d$(t,e,n){return function(){var r=this.__on,i,o=l$(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function p$(t,e,n){var r=f$(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(i=0,l=s[u];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?d$:h$,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Bd(t,e,n){var r=Fd(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function g$(t,e){return function(){return Bd(this,t,e)}}function m$(t,e){return function(){return Bd(this,t,e.apply(this,arguments))}}function y$(t,e){return this.each((typeof e=="function"?m$:g$)(t,e))}function*b$(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var v$=[null];function ve(t,e){this._groups=t,this._parents=e}function di(){return new ve([[document.documentElement]],v$)}function x$(){return this}ve.prototype=di.prototype={constructor:ve,select:W_,selectAll:V_,selectChild:J_,selectChildren:rw,filter:iw,data:lw,enter:ow,exit:hw,join:dw,merge:pw,selection:x$,order:gw,sort:mw,call:bw,nodes:vw,node:xw,size:_w,empty:ww,each:$w,attr:Lw,style:Iw,property:Gw,classed:Bw,text:qw,html:Zw,raise:Qw,lower:t$,append:e$,insert:r$,remove:o$,clone:u$,datum:c$,on:p$,dispatch:y$,[Symbol.iterator]:b$};function Zu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Yd(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function pi(){}var gi=.7,Xo=1/gi,yr="\\s*([+-]?\\d+)\\s*",mi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_$=/^#([0-9a-f]{3,8})$/,w$=new RegExp(`^rgb\\(${yr},${yr},${yr}\\)$`),$$=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),S$=new RegExp(`^rgba\\(${yr},${yr},${yr},${mi}\\)$`),A$=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${mi}\\)$`),M$=new RegExp(`^hsl\\(${mi},${Ee},${Ee}\\)$`),T$=new RegExp(`^hsla\\(${mi},${Ee},${Ee},${mi}\\)$`),Hd={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Zu(pi,Mn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Wd,formatHex:Wd,formatHex8:P$,formatHsl:D$,formatRgb:qd,toString:qd});function Wd(){return this.rgb().formatHex()}function P$(){return this.rgb().formatHex8()}function D$(){return Kd(this).formatHsl()}function qd(){return this.rgb().formatRgb()}function Mn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=_$.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Xd(e):n===3?new ee(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?jo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?jo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=w$.exec(t))?new ee(e[1],e[2],e[3],1):(e=$$.exec(t))?new ee(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=S$.exec(t))?jo(e[1],e[2],e[3],e[4]):(e=A$.exec(t))?jo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=M$.exec(t))?Zd(e[1],e[2]/100,e[3]/100,1):(e=T$.exec(t))?Zd(e[1],e[2]/100,e[3]/100,e[4]):Hd.hasOwnProperty(t)?Xd(Hd[t]):t==="transparent"?new ee(NaN,NaN,NaN,0):null}function Xd(t){return new ee(t>>16&255,t>>8&255,t&255,1)}function jo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ee(t,e,n,r)}function L$(t){return t instanceof pi||(t=Mn(t)),t?(t=t.rgb(),new ee(t.r,t.g,t.b,t.opacity)):new ee}function Ku(t,e,n,r){return arguments.length===1?L$(t):new ee(t,e,n,r??1)}function ee(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Zu(ee,Ku,Yd(pi,{brighter(t){return t=t==null?Xo:Math.pow(Xo,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?gi:Math.pow(gi,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ee(Tn(this.r),Tn(this.g),Tn(this.b),Vo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:jd,formatHex:jd,formatHex8:E$,formatRgb:Vd,toString:Vd}));function jd(){return`#${Pn(this.r)}${Pn(this.g)}${Pn(this.b)}`}function E$(){return`#${Pn(this.r)}${Pn(this.g)}${Pn(this.b)}${Pn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Vd(){const t=Vo(this.opacity);return`${t===1?"rgb(":"rgba("}${Tn(this.r)}, ${Tn(this.g)}, ${Tn(this.b)}${t===1?")":`, ${t})`}`}function Vo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Tn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Pn(t){return t=Tn(t),(t<16?"0":"")+t.toString(16)}function Zd(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new xe(t,e,n,r)}function Kd(t){if(t instanceof xe)return new xe(t.h,t.s,t.l,t.opacity);if(t instanceof pi||(t=Mn(t)),!t)return new xe;if(t instanceof xe)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new xe(a,s,u,t.opacity)}function k$(t,e,n,r){return arguments.length===1?Kd(t):new xe(t,e,n,r??1)}function xe(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Zu(xe,k$,Yd(pi,{brighter(t){return t=t==null?Xo:Math.pow(Xo,t),new xe(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?gi:Math.pow(gi,t),new xe(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ee(Qu(t>=240?t-240:t+120,i,r),Qu(t,i,r),Qu(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new xe(Qd(this.h),Zo(this.s),Zo(this.l),Vo(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=Vo(this.opacity);return`${t===1?"hsl(":"hsla("}${Qd(this.h)}, ${Zo(this.s)*100}%, ${Zo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Qd(t){return t=(t||0)%360,t<0?t+360:t}function Zo(t){return Math.max(0,Math.min(1,t||0))}function Qu(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Ju=t=>()=>t;function C$(t,e){return function(n){return t+n*e}}function I$(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function R$(t){return(t=+t)==1?Jd:function(e,n){return n-e?I$(e,n,t):Ju(isNaN(e)?n:e)}}function Jd(t,e){var n=e-t;return n?C$(t,n):Ju(isNaN(t)?e:t)}const Ko=function t(e){var n=R$(e);function r(i,o){var a=n((i=Ku(i)).r,(o=Ku(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=Jd(i.opacity,o.opacity);return function(l){return i.r=a(l),i.g=s(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=t,r}(1);function N$(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function F$(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function G$(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=nc(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function z$(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function _e(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function O$(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=nc(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var tc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ec=new RegExp(tc.source,"g");function U$(t){return function(){return t}}function B$(t){return function(e){return t(e)+""}}function tp(t,e){var n=tc.lastIndex=ec.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=tc.exec(t))&&(i=ec.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:_e(r,i)})),n=ec.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?B$(u[0].x):U$(e):(e=u.length,function(c){for(var l=0,h;l<e;++l)s[(h=u[l]).i]=h.x(c);return s.join("")})}function nc(t,e){var n=typeof e,r;return e==null||n==="boolean"?Ju(e):(n==="number"?_e:n==="string"?(r=Mn(e))?(e=r,Ko):tp:e instanceof Mn?Ko:e instanceof Date?z$:F$(e)?N$:Array.isArray(e)?G$:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?O$:_e)(t,e)}function Y$(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var ep=180/Math.PI,np={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function rp(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*ep,skewX:Math.atan(u)*ep,scaleX:a,scaleY:s}}var Qo;function H$(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?np:rp(e.a,e.b,e.c,e.d,e.e,e.f)}function W$(t){return t==null||(Qo||(Qo=document.createElementNS("http://www.w3.org/2000/svg","g")),Qo.setAttribute("transform",t),!(t=Qo.transform.baseVal.consolidate()))?np:(t=t.matrix,rp(t.a,t.b,t.c,t.d,t.e,t.f))}function ip(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push("translate(",null,e,null,n);p.push({i:g-4,x:_e(c,h)},{i:g-2,x:_e(l,f)})}else(h||f)&&d.push("translate("+h+e+f+n)}function a(c,l,h,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:_e(c,l)})):l&&h.push(i(h)+"rotate("+l+r)}function s(c,l,h,f){c!==l?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:_e(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push(i(d)+"scale(",null,",",null,")");p.push({i:g-4,x:_e(c,h)},{i:g-2,x:_e(l,f)})}else(h!==1||f!==1)&&d.push(i(d)+"scale("+h+","+f+")")}return function(c,l){var h=[],f=[];return c=t(c),l=t(l),o(c.translateX,c.translateY,l.translateX,l.translateY,h,f),a(c.rotate,l.rotate,h,f),s(c.skewX,l.skewX,h,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,h,f),c=l=null,function(d){for(var p=-1,g=f.length,m;++p<g;)h[(m=f[p]).i]=m.x(d);return h.join("")}}}var q$=ip(H$,"px, ","px)","deg)"),X$=ip(W$,", ",")",")"),br=0,yi=0,bi=0,op=1e3,Jo,vi,ta=0,Dn=0,ea=0,xi=typeof performance=="object"&&performance.now?performance:Date,ap=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function rc(){return Dn||(ap(j$),Dn=xi.now()+ea)}function j$(){Dn=0}function na(){this._call=this._time=this._next=null}na.prototype=sp.prototype={constructor:na,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?rc():+n)+(e==null?0:+e),!this._next&&vi!==this&&(vi?vi._next=this:Jo=this,vi=this),this._call=t,this._time=n,ic()},stop:function(){this._call&&(this._call=null,this._time=1/0,ic())}};function sp(t,e,n){var r=new na;return r.restart(t,e,n),r}function V$(){rc(),++br;for(var t=Jo,e;t;)(e=Dn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--br}function up(){Dn=(ta=xi.now())+ea,br=yi=0;try{V$()}finally{br=0,K$(),Dn=0}}function Z$(){var t=xi.now(),e=t-ta;e>op&&(ea-=e,ta=t)}function K$(){for(var t,e=Jo,n,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:Jo=n);vi=t,ic(r)}function ic(t){if(!br){yi&&(yi=clearTimeout(yi));var e=t-Dn;e>24?(t<1/0&&(yi=setTimeout(up,t-xi.now()-ea)),bi&&(bi=clearInterval(bi))):(bi||(ta=xi.now(),bi=setInterval(Z$,op)),br=1,ap(up))}}function cp(t,e,n){var r=new na;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var Q$=Dd("start","end","cancel","interrupt"),J$=[],lp=0,fp=1,oc=2,ra=3,hp=4,ac=5,ia=6;function oa(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;tS(t,n,{name:e,index:r,group:i,on:Q$,tween:J$,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:lp})}function sc(t,e){var n=we(t,e);if(n.state>lp)throw new Error("too late; already scheduled");return n}function ke(t,e){var n=we(t,e);if(n.state>ra)throw new Error("too late; already running");return n}function we(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function tS(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=sp(o,0,n.time);function o(c){n.state=fp,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,d;if(n.state!==fp)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===ra)return cp(a);d.state===hp?(d.state=ia,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=ia,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(cp(function(){n.state===ra&&(n.state=hp,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=oc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===oc){for(n.state=ra,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=d);i.length=h+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=ac,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===ac&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=ia,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function eS(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>oc&&r.state<ac,r.state=ia,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function nS(t){return this.each(function(){eS(this,t)})}function rS(t,e){var n,r;return function(){var i=ke(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function iS(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=ke(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function oS(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=we(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?rS:iS)(n,t,e))}function uc(t,e,n){var r=t._id;return t.each(function(){var i=ke(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return we(i,r).value[e]}}function dp(t,e){var n;return(typeof e=="number"?_e:e instanceof Mn?Ko:(n=Mn(e))?(e=n,Ko):tp)(t,e)}function aS(t){return function(){this.removeAttribute(t)}}function sS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function uS(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function cS(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function lS(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function fS(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function hS(t,e){var n=Wo(t),r=n==="transform"?X$:dp;return this.attrTween(t,typeof e=="function"?(n.local?fS:lS)(n,r,uc(this,"attr."+t,e)):e==null?(n.local?sS:aS)(n):(n.local?cS:uS)(n,r,e))}function dS(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function pS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function gS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&pS(t,o)),n}return i._value=e,i}function mS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&dS(t,o)),n}return i._value=e,i}function yS(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Wo(t);return this.tween(n,(r.local?gS:mS)(r,e))}function bS(t,e){return function(){sc(this,t).delay=+e.apply(this,arguments)}}function vS(t,e){return e=+e,function(){sc(this,t).delay=e}}function xS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?bS:vS)(e,t)):we(this.node(),e).delay}function _S(t,e){return function(){ke(this,t).duration=+e.apply(this,arguments)}}function wS(t,e){return e=+e,function(){ke(this,t).duration=e}}function $S(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?_S:wS)(e,t)):we(this.node(),e).duration}function SS(t,e){if(typeof e!="function")throw new Error;return function(){ke(this,t).ease=e}}function AS(t){var e=this._id;return arguments.length?this.each(SS(e,t)):we(this.node(),e).ease}function MS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;ke(this,t).ease=n}}function TS(t){if(typeof t!="function")throw new Error;return this.each(MS(this._id,t))}function PS(t){typeof t!="function"&&(t=Id(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new We(r,this._parents,this._name,this._id)}function DS(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],c=n[s],l=u.length,h=a[s]=new Array(l),f,d=0;d<l;++d)(f=u[d]||c[d])&&(h[d]=f);for(;s<r;++s)a[s]=e[s];return new We(a,this._parents,this._name,this._id)}function LS(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function ES(t,e,n){var r,i,o=LS(e)?sc:ke;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function kS(t,e){var n=this._id;return arguments.length<2?we(this.node(),n).on.on(t):this.each(ES(n,t,e))}function CS(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function IS(){return this.on("end.remove",CS(this._id))}function RS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=ju(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,oa(c[f],e,n,f,c,we(l,n)));return new We(o,this._parents,e,n)}function NS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Cd(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,l,h=0;h<c;++h)if(l=u[h]){for(var f=t.call(l,l.__data__,h,u),d,p=we(l,n),g=0,m=f.length;g<m;++g)(d=f[g])&&oa(d,e,n,g,f,p);o.push(f),a.push(l)}return new We(o,a,e,n)}var FS=di.prototype.constructor;function GS(){return new FS(this._groups,this._parents)}function zS(t,e){var n,r,i;return function(){var o=mr(this,t),a=(this.style.removeProperty(t),mr(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function pp(t){return function(){this.style.removeProperty(t)}}function OS(t,e,n){var r,i=n+"",o;return function(){var a=mr(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function US(t,e,n){var r,i,o;return function(){var a=mr(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),mr(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function BS(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=ke(this,t),c=u.on,l=u.value[o]==null?s||(s=pp(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function YS(t,e,n){var r=(t+="")=="transform"?q$:dp;return e==null?this.styleTween(t,zS(t,r)).on("end.style."+t,pp(t)):typeof e=="function"?this.styleTween(t,US(t,r,uc(this,"style."+t,e))).each(BS(this._id,t)):this.styleTween(t,OS(t,r,e),n).on("end.style."+t,null)}function HS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function WS(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&HS(t,a,n)),r}return o._value=e,o}function qS(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,WS(t,e,n??""))}function XS(t){return function(){this.textContent=t}}function jS(t){return function(){var e=t(this);this.textContent=e??""}}function VS(t){return this.tween("text",typeof t=="function"?jS(uc(this,"text",t)):XS(t==null?"":t+""))}function ZS(t){return function(e){this.textContent=t.call(this,e)}}function KS(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&ZS(i)),e}return r._value=t,r}function QS(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,KS(t))}function JS(){for(var t=this._name,e=this._id,n=gp(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=we(u,e);oa(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new We(r,this._parents,t,n)}function t3(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=ke(this,r),l=c.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var e3=0;function We(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function gp(){return++e3}var qe=di.prototype;We.prototype={constructor:We,select:RS,selectAll:NS,selectChild:qe.selectChild,selectChildren:qe.selectChildren,filter:PS,merge:DS,selection:GS,transition:JS,call:qe.call,nodes:qe.nodes,node:qe.node,size:qe.size,empty:qe.empty,each:qe.each,on:kS,attr:hS,attrTween:yS,style:YS,styleTween:qS,text:VS,textTween:QS,remove:IS,tween:oS,delay:xS,duration:$S,ease:AS,easeVarying:TS,end:t3,[Symbol.iterator]:qe[Symbol.iterator]};function n3(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var r3={time:null,delay:0,duration:250,ease:n3};function i3(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function o3(t){var e,n;t instanceof We?(e=t._id,t=t._name):(e=gp(),(n=r3).time=rc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&oa(u,t,e,c,a,n||i3(u,e));return new We(r,this._parents,t,e)}di.prototype.interrupt=nS,di.prototype.transition=o3;function a3(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function aa(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function vr(t){return t=aa(Math.abs(t)),t?t[1]:NaN}function s3(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function u3(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var c3=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function sa(t){if(!(e=c3.exec(t)))throw new Error("invalid format: "+t);var e;return new cc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}sa.prototype=cc.prototype;function cc(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}cc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function l3(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var mp;function f3(t,e){var n=aa(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(mp=Math.max(-8,Math.min(8,Math.floor(i/3)))*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")+aa(t,Math.max(0,e+o-1))[0]}function yp(t,e){var n=aa(t,e);if(!n)return t+"";var r=n[0],i=n[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")}const bp={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:a3,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>yp(t*100,e),r:yp,s:f3,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function vp(t){return t}var xp=Array.prototype.map,_p=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function h3(t){var e=t.grouping===void 0||t.thousands===void 0?vp:s3(xp.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?vp:u3(xp.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(h){h=sa(h);var f=h.fill,d=h.align,p=h.sign,g=h.symbol,m=h.zero,y=h.width,v=h.comma,x=h.precision,b=h.trim,w=h.type;w==="n"?(v=!0,w="g"):bp[w]||(x===void 0&&(x=12),b=!0,w="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var $=g==="$"?n:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",S=g==="$"?r:/[%p]/.test(w)?a:"",_=bp[w],D=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function L(P){var I=$,k=S,T,C,M;if(w==="c")k=_(P)+k,P="";else{P=+P;var R=P<0||1/P<0;if(P=isNaN(P)?u:_(Math.abs(P),x),b&&(P=l3(P)),R&&+P==0&&p!=="+"&&(R=!1),I=(R?p==="("?p:s:p==="-"||p==="("?"":p)+I,k=(w==="s"?_p[8+mp/3]:"")+k+(R&&p==="("?")":""),D){for(T=-1,C=P.length;++T<C;)if(M=P.charCodeAt(T),48>M||M>57){k=(M===46?i+P.slice(T+1):P.slice(T))+k,P=P.slice(0,T);break}}}v&&!m&&(P=e(P,1/0));var G=I.length+P.length+k.length,A=G<y?new Array(y-G+1).join(f):"";switch(v&&m&&(P=e(A+P,A.length?y-k.length:1/0),A=""),d){case"<":P=I+P+k+A;break;case"=":P=I+A+P+k;break;case"^":P=A.slice(0,G=A.length>>1)+I+P+k+A.slice(G);break;default:P=A+I+P+k;break}return o(P)}return L.toString=function(){return h+""},L}function l(h,f){var d=c((h=sa(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(vr(f)/3)))*3,g=Math.pow(10,-p),m=_p[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var ua,wp,$p;d3({thousands:",",grouping:[3],currency:["$",""]});function d3(t){return ua=h3(t),wp=ua.format,$p=ua.formatPrefix,ua}function p3(t){return Math.max(0,-vr(Math.abs(t)))}function g3(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vr(e)/3)))*3-vr(Math.abs(t)))}function m3(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,vr(e)-vr(t))+1}function ca(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const Sp=Symbol("implicit");function Ap(){var t=new Td,e=[],n=[],r=Sp;function i(o){let a=t.get(o);if(a===void 0){if(r!==Sp)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Td;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Ap(e,n).unknown(r)},ca.apply(i,arguments),i}function Mp(){var t=Ap().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,l=.5;delete t.unknown;function h(){var f=e().length,d=i<r,p=d?i:r,g=d?r:i;o=(g-p)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),p+=(g-p-o*(f-u))*l,a=o*(1-u),s&&(p=Math.round(p),a=Math.round(a));var m=G_(f).map(function(y){return p+o*y});return n(d?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),h()):e()},t.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,h()):s},t.padding=function(f){return arguments.length?(u=Math.min(1,c=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(c=+f,h()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),h()):l},t.copy=function(){return Mp(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},ca.apply(h(),arguments)}function Tp(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Tp(e())},t}function y3(){return Tp(Mp.apply(null,arguments).paddingInner(1))}function b3(t){return function(){return t}}function v3(t){return+t}var Pp=[0,1];function xr(t){return t}function lc(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:b3(isNaN(e)?NaN:.5)}function x3(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function _3(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=lc(i,r),o=n(a,o)):(r=lc(r,i),o=n(o,a)),function(s){return o(r(s))}}function w3(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=lc(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=Md(t,s,1,r)-1;return o[u](i[u](s))}}function $3(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function S3(){var t=Pp,e=Pp,n=nc,r,i,o,a=xr,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==xr&&(a=x3(t[0],t[f-1])),s=f>2?w3:_3,u=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(u||(u=s(t.map(r),e,n)))(r(a(f)))}return h.invert=function(f){return a(i((c||(c=s(e,t.map(r),_e)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,v3),l()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),l()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=Y$,l()},h.clamp=function(f){return arguments.length?(a=f?!0:xr,l()):a!==xr},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,d){return r=f,i=d,l()}}function A3(){return S3()(xr,xr)}function M3(t,e,n,r){var i=F_(t,e,n),o;switch(r=sa(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=g3(i,a))&&(r.precision=o),$p(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=m3(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=p3(i))&&(r.precision=o-(r.type==="%")*2);break}}return wp(r)}function Dp(t){var e=t.domain;return t.ticks=function(n){var r=e();return N_(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return M3(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,l=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);l-- >0;){if(c=qu(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function Lp(){var t=A3();return t.copy=function(){return $3(t,Lp())},ca.apply(t,arguments),Dp(t)}function Ep(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[Md(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Ep().domain([t,e]).range(i).unknown(o)},ca.apply(Dp(a),arguments)}function _i(t,e,n){this.k=t,this.x=e,this.y=n}_i.prototype={constructor:_i,scale:function(t){return t===1?this:new _i(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new _i(this.k,this.x+this.k*t,this.y+this.k*e)},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+")"}},_i.prototype;function la(t){return Object.prototype.toString.call(t)==="[object Object]"}function fc(t,e){if(la(t)===!1||la(e)===!1)return Object.assign({},e);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let s;la(r[a])&&la(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var hc=function(t,e){return hc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},hc(t,e)};function Xe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");hc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function T3(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(h){a(h)}}function u(l){try{c(r.throw(l))}catch(h){a(h)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(t,[])).next())})}function kp(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function _r(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function wi(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function $i(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function wr(t){return this instanceof wr?(this.v=t,this):new wr(t)}function P3(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(d){return function(p){return Promise.resolve(p).then(d,h)}}function s(d,p){r[d]&&(i[d]=function(g){return new Promise(function(m,y){o.push([d,g,m,y])>1||u(d,g)})},p&&(i[d]=p(i[d])))}function u(d,p){try{c(r[d](p))}catch(g){f(o[0][3],g)}}function c(d){d.value instanceof wr?Promise.resolve(d.value.v).then(l,h):f(o[0][2],d)}function l(d){u("next",d)}function h(d){u("throw",d)}function f(d,p){d(p),o.shift(),o.length&&u(o[0][0],o[0][1])}}function D3(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof _r=="function"?_r(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,u){a=t[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(c){o({value:c,done:s})},a)}}function Pt(t){return typeof t=="function"}function dc(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var pc=dc(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
|
4
4
|
`+e.map(function(n,r){return r+1+") "+n.toString()}).join(`
|
5
|
-
`):"",this.name="UnsubscriptionError",this.errors=e}});function fa(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Si=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=_r(a),u=s.next();!u.done;u=s.next()){var c=u.value;c.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(Pt(l))try{l()}catch(g){o=g instanceof pc?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=_r(h),d=f.next();!d.done;d=f.next()){var p=d.value;try{Ip(p)}catch(g){o=o??[],g instanceof pc?o=$i($i([],wi(o)),wi(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new pc(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Ip(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&fa(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&fa(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),kp=Si.EMPTY;function Cp(t){return t instanceof Si||t&&"closed"in t&&Pt(t.remove)&&Pt(t.add)&&Pt(t.unsubscribe)}function Ip(t){Pt(t)?t():t.unsubscribe()}var Rp={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},M3={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,$i([t,e],wi(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Np(t){M3.setTimeout(function(){throw t})}function gc(){}function ha(t){t()}var mc=function(t){qe(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Cp(n)&&n.add(r)):r.destination=L3,r}return e.create=function(n,r,i){return new Ai(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Si),T3=Function.prototype.bind;function yc(t,e){return T3.call(t,e)}var P3=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){da(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){da(r)}else da(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){da(n)}},t}(),Ai=function(t){qe(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Pt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Rp.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&yc(n.next,s),error:n.error&&yc(n.error,s),complete:n.complete&&yc(n.complete,s)}):a=n}return o.destination=new P3(a),o}return e}(mc);function da(t){Np(t)}function D3(t){throw t}var L3={closed:!0,next:gc,error:D3,complete:gc},bc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Fp(t){return t}function E3(t){return t.length===0?Fp:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var $e=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=C3(e)?e:new Ai(e,n,r);return ha(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=Gp(n),new n(function(i,o){var a=new Ai({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[bc]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return E3(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Gp(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function Gp(t){var e;return(e=t??Rp.Promise)!==null&&e!==void 0?e:Promise}function k3(t){return t&&Pt(t.next)&&Pt(t.error)&&Pt(t.complete)}function C3(t){return t&&t instanceof mc||k3(t)&&Cp(t)}function I3(t){return Pt(t==null?void 0:t.lift)}function Ln(t){return function(e){if(I3(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Mi(t,e,n,r,i){return new R3(t,e,n,r,i)}var R3=function(t){qe(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(c){try{r(c)}catch(l){n.error(l)}}:t.prototype._next,u._error=o?function(c){try{o(c)}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(mc),N3=dc(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ti=function(t){qe(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new zp(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new N3},e.prototype.next=function(n){var r=this;ha(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=_r(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;ha(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;ha(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?kp:(this.currentObservers=null,s.push(n),new Si(function(){r.currentObservers=null,fa(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new $e;return n.source=this,n},e.create=function(n,r){return new zp(n,r)},e}($e),zp=function(t){qe(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:kp},e}(Ti),vc={now:function(){return(vc.delegate||Date).now()},delegate:void 0},F3=function(t){qe(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=vc);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),c=0,l=1;l<o.length&&o[l]<=u;l+=2)c=l;c&&o.splice(0,c+1)}},e}(Ti),G3=function(t){qe(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(Si),Op={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,$i([t,e],wi(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},z3=function(t){qe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),Op.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Op.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,fa(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(G3),Up=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=vc.now,t}(),O3=function(t){qe(e,t);function e(n,r){r===void 0&&(r=Up.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(Up);new O3(z3);function U3(t){return t&&Pt(t.schedule)}function B3(t){return t[t.length-1]}function Bp(t){return U3(B3(t))?t.pop():void 0}var Yp=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Wp(t){return Pt(t==null?void 0:t.then)}function Hp(t){return Pt(t[bc])}function qp(t){return Symbol.asyncIterator&&Pt(t==null?void 0:t[Symbol.asyncIterator])}function Xp(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Y3(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var jp=Y3();function Vp(t){return Pt(t==null?void 0:t[jp])}function Zp(t){return S3(this,arguments,function(){var e,n,r,i;return Ep(this,function(o){switch(o.label){case 0:e=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,wr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,wr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,wr(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Kp(t){return Pt(t==null?void 0:t.getReader)}function cn(t){if(t instanceof $e)return t;if(t!=null){if(Hp(t))return W3(t);if(Yp(t))return H3(t);if(Wp(t))return q3(t);if(qp(t))return Qp(t);if(Vp(t))return X3(t);if(Kp(t))return j3(t)}throw Xp(t)}function W3(t){return new $e(function(e){var n=t[bc]();if(Pt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function H3(t){return new $e(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function q3(t){return new $e(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Np)})}function X3(t){return new $e(function(e){var n,r;try{for(var i=_r(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Qp(t){return new $e(function(e){V3(t,e).catch(function(n){return e.error(n)})})}function j3(t){return Qp(Zp(t))}function V3(t,e){var n,r,i,o;return $3(this,void 0,void 0,function(){var a,s;return Ep(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=A3(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function En(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function Jp(t,e){return e===void 0&&(e=0),Ln(function(n,r){n.subscribe(Mi(r,function(i){return En(r,t,function(){return r.next(i)},e)},function(){return En(r,t,function(){return r.complete()},e)},function(i){return En(r,t,function(){return r.error(i)},e)}))})}function tg(t,e){return e===void 0&&(e=0),Ln(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Z3(t,e){return cn(t).pipe(tg(e),Jp(e))}function K3(t,e){return cn(t).pipe(tg(e),Jp(e))}function Q3(t,e){return new $e(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function J3(t,e){return new $e(function(n){var r;return En(n,e,function(){r=t[jp](),En(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return Pt(r==null?void 0:r.return)&&r.return()}})}function eg(t,e){if(!t)throw new Error("Iterable cannot be null");return new $e(function(n){En(n,e,function(){var r=t[Symbol.asyncIterator]();En(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function tA(t,e){return eg(Zp(t),e)}function eA(t,e){if(t!=null){if(Hp(t))return Z3(t,e);if(Yp(t))return Q3(t,e);if(Wp(t))return K3(t,e);if(qp(t))return eg(t,e);if(Vp(t))return J3(t,e);if(Kp(t))return tA(t,e)}throw Xp(t)}function nA(t,e){return e?eA(t,e):cn(t)}dc(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function ng(t,e){return Ln(function(n,r){var i=0;n.subscribe(Mi(r,function(o){r.next(t.call(e,o,i++))}))})}function rA(t,e,n,r,i,o,a,s){var u=[],c=0,l=0,h=!1,f=function(){h&&!u.length&&!c&&e.complete()},d=function(g){return c<r?p(g):u.push(g)},p=function(g){c++;var m=!1;cn(n(g,l++)).subscribe(Mi(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var v=u.shift();a||p(v)};u.length&&c<r;)y();f()}catch(v){e.error(v)}}))};return t.subscribe(Mi(e,d,function(){h=!0,f()})),function(){}}function rg(t,e,n){return n===void 0&&(n=1/0),Pt(e)?rg(function(r,i){return ng(function(o,a){return e(r,o,i,a)})(cn(t(r,i)))},n):(typeof e=="number"&&(n=e),Ln(function(r,i){return rA(r,i,t,n)}))}function iA(t){return rg(Fp,t)}function oA(){return iA(1)}function ig(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return oA()(nA(t,Bp(t)))}function aA(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new Ti}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(c){var l,h,f,d=0,p=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,p=g=!1},v=function(){var x=l;y(),x==null||x.unsubscribe()};return Ln(function(x,b){d++,!g&&!p&&m();var w=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=xc(v,u))}),w.subscribe(b),!l&&d>0&&(l=new Ai({next:function($){return w.next($)},error:function($){g=!0,m(),h=xc(y,i,$),w.error($)},complete:function(){p=!0,m(),h=xc(y,a),w.complete()}}),cn(x).subscribe(l))})(c)}}function xc(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new Ai({next:function(){i.unsubscribe(),t()}});return cn(e.apply(void 0,$i([],wi(n)))).subscribe(i)}}function sA(t,e,n){var r,i=!1;return r=t,aA({connector:function(){return new F3(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function uA(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Bp(t);return Ln(function(r,i){(n?ig(t,r,n):ig(t,r)).subscribe(i)})}function cA(t){return Ln(function(e,n){cn(t).subscribe(Mi(n,function(){return n.complete()},gc)),!n.closed&&e.subscribe(n)})}const og=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=gr.scaleDomain,scaleRange:i=gr.scaleRange})=>{const o=r[0]??gr.scaleDomain[0],a=r[1]??gr.scaleDomain[1],s=i[0]??gr.scaleRange[0],u=i[1]??gr.scaleRange[1],c=o==="auto"?e:o,l=a==="auto"?t:a,h=t-(t-c)/(1-s),f=l/u;return Dp().domain([h,f]).range([0,n])},ag=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return d3().domain(t).range(r).padding(n)},lA=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),Lp().domain([-0,e+0]).range(i)};function fA({name:t,defaultParams:e,initFn:n}){const r=new Ti,i=new Ti,o=new WeakMap;let a=()=>{},s,u=e;return{params$:i,name:t,defaultParams:e,init(){s&&(a=n(s)??(()=>{}),o.set(s.selection,s))},destroy(){a(),s&&(s.selection.remove(),s=void 0),r.next(void 0)},setPresetParams:c=>{u=fc(c,e)},setContext:c=>{s=c,s.observer.fullParams$=i.pipe(cA(r),uA({}),ng(l=>fc(l,u)),sA(1))}}}const Pi=()=>function(t,e){return function(n){return class{constructor(){const r=fA({name:t,defaultParams:e,initFn:n});this.params$=r.params$,this.name=r.name,this.defaultParams=r.defaultParams,this.init=r.init,this.destroy=r.destroy,this.setPresetParams=r.setPresetParams,this.setContext=r.setContext}}}},Di=Pi(),ae=Pi(),Xe=Pi(),sg=Pi(),ug=Pi();function _t(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function cg(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function pa(t){let e,n,r;t.length!==2?(e=_t,n=(s,u)=>_t(t(s),u),r=(s,u)=>t(s)-u):(e=t===_t||t===cg?t:hA,n=t,r=t);function i(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<0?c=h+1:l=h}while(c<l)}return c}function o(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<=0?c=h+1:l=h}while(c<l)}return c}function a(s,u,c=0,l=s.length){const h=i(s,u,c,l-1);return h>c&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function hA(){return 0}function ga(t){return t===null?NaN:+t}function*dA(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const lg=pa(_t),fg=lg.right,pA=lg.left,gA=pa(ga).center,kn=fg;function mA(t,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=_c(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const hg=dg(_c),yA=dg(bA);function dg(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(a!==void 0?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!n&&!r)return e;const s=n&&t(n),u=r&&t(r),c=i.slice();return s&&u?($r(s,c,i,o,a),$r(s,i,c,o,a),$r(s,c,i,o,a),Sr(u,i,c,o,a),Sr(u,c,i,o,a),Sr(u,i,c,o,a)):s?($r(s,i,c,o,a),$r(s,c,i,o,a),$r(s,i,c,o,a)):u&&(Sr(u,i,c,o,a),Sr(u,c,i,o,a),Sr(u,i,c,o,a)),e}}function $r(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function Sr(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function bA(t){const e=_c(t);return(n,r,i,o,a)=>{i<<=2,o<<=2,a<<=2,e(n,r,i+0,o+0,a),e(n,r,i+1,o+1,a),e(n,r,i+2,o+2,a),e(n,r,i+3,o+3,a)}}function _c(t){const e=Math.floor(t);if(e===t)return vA(t);const n=t-e,r=2*t+1;return(i,o,a,s,u)=>{if(!((s-=u)>=a))return;let c=e*o[a];const l=u*e,h=l+u;for(let f=a,d=a+l;f<d;f+=u)c+=o[Math.min(s,f)];for(let f=a,d=s;f<=d;f+=u)c+=o[Math.min(s,f+l)],i[f]=(c+n*(o[Math.max(a,f-h)]+o[Math.min(s,f+h)]))/r,c-=o[Math.max(a,f-l)]}}function vA(t){const e=2*t+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let s=t*r[i];const u=a*t;for(let c=i,l=i+u;c<l;c+=a)s+=r[Math.min(o,c)];for(let c=i,l=o;c<=l;c+=a)s+=r[Math.min(o,c+u)],n[c]=s/e,s-=r[Math.max(i,c-u)]}}function ma(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(i=+i)>=i&&++n}return n}function xA(t){return t.length|0}function _A(t){return!(t>0)}function wA(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function $A(t){return e=>t(...e)}function SA(...t){const e=typeof t[t.length-1]=="function"&&$A(t.pop());t=t.map(wA);const n=t.map(xA),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(_A))return o;for(;;){o.push(i.map((s,u)=>t[u][s]));let a=r;for(;++i[a]===n[a];){if(a===0)return e?o.map(e):o;i[a--]=0}}}function AA(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?i=>n+=+i||0:i=>n+=+e(i,r++,t)||0)}function pg(t,e){let n=0,r,i=0,o=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i));else{let a=-1;for(let s of t)(s=e(s,++a,t))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,o+=r*(s-i))}if(n>1)return o/(n-1)}function gg(t,e){const n=pg(t,e);return n&&Math.sqrt(n)}function Li(t,e){let n,r;if(e===void 0)for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class Dt{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const o=n[i],a=e+o,s=Math.abs(e)<Math.abs(o)?e-(a-o):o-(a-e);s&&(n[r++]=s),e=a}return n[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let n=this._n,r,i,o,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,i=e[--n],a=r+i,o=i-(a-r),!o););n>0&&(o<0&&e[n-1]<0||o>0&&e[n-1]>0)&&(i=o*2,r=a+i,i==r-a&&(a=r))}return a}}function MA(t,e){const n=new Dt;if(e===void 0)for(let r of t)(r=+r)&&n.add(r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function TA(t,e){const n=new Dt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class Ei extends Map{constructor(e,n=bg){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(wc(this,e))}has(e){return super.has(wc(this,e))}set(e,n){return super.set(mg(this,e),n)}delete(e){return super.delete(yg(this,e))}}class Cn extends Set{constructor(e,n=bg){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has(wc(this,e))}add(e){return super.add(mg(this,e))}delete(e){return super.delete(yg(this,e))}}function wc({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function mg({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function yg({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function bg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Ar(t){return t}function vg(t,...e){return Mr(t,Ar,Ar,e)}function xg(t,...e){return Mr(t,Array.from,Ar,e)}function _g(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(i=>i.pop().map(([o,a])=>[...i,o,a]));return t}function PA(t,...e){return _g(xg(t,...e),e)}function DA(t,e,...n){return _g($g(t,e,...n),n)}function wg(t,e,...n){return Mr(t,Ar,e,n)}function $g(t,e,...n){return Mr(t,Array.from,e,n)}function LA(t,...e){return Mr(t,Ar,Sg,e)}function EA(t,...e){return Mr(t,Array.from,Sg,e)}function Sg(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function Mr(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Ei,u=r[a++];let c=-1;for(const l of o){const h=u(l,++c,o),f=s.get(h);f?f.push(l):s.set(h,[l])}for(const[l,h]of s)s.set(l,i(h,a));return e(s)}(t,0)}function Ag(t,e){return Array.from(e,n=>t[n])}function $c(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){const r=Uint32Array.from(t,(i,o)=>o);return e.length>1?(e=e.map(i=>t.map(i)),r.sort((i,o)=>{for(const a of e){const s=Tr(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>Tr(n[i],n[o]))),Ag(t,r)}return t.sort(Sc(n))}function Sc(t=_t){if(t===_t)return Tr;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function Tr(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function kA(t,e,n){return(e.length!==2?$c(wg(t,e,n),([r,i],[o,a])=>_t(i,a)||_t(r,o)):$c(vg(t,n),([r,i],[o,a])=>e(i,a)||_t(r,o))).map(([r])=>r)}var CA=Array.prototype,IA=CA.slice;function Ac(t){return()=>t}const RA=Math.sqrt(50),NA=Math.sqrt(10),FA=Math.sqrt(2);function ya(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=RA?10:o>=NA?5:o>=FA?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?ya(t,e,n*2):[s,u,c]}function In(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?ya(e,t,n):ya(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function Rn(t,e,n){return e=+e,t=+t,n=+n,ya(t,e,n)[2]}function ba(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Rn(e,t,n):Rn(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Mc(t,e,n){let r;for(;;){const i=Rn(t,e,n);if(i===r||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function Tc(t){return Math.max(1,Math.ceil(Math.log(ma(t))/Math.LN2)+1)}function Mg(){var t=Ar,e=Li,n=Tc;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,u,c=new Array(a);for(o=0;o<a;++o)c[o]=t(i[o],o,i);var l=e(c),h=l[0],f=l[1],d=n(c,h,f);if(!Array.isArray(d)){const x=f,b=+d;if(e===Li&&([h,f]=Mc(h,f,b)),d=In(h,f,b),d[0]<=h&&(u=Rn(h,f,b)),d[d.length-1]>=f)if(x>=f&&e===Li){const w=Rn(h,f,b);isFinite(w)&&(w>0?f=(Math.floor(f/w)+1)*w:w<0&&(f=(Math.ceil(f*-w)+1)/-w))}else d.pop()}for(var p=d.length,g=0,m=p;d[g]<=h;)++g;for(;d[m-1]>f;)--m;(g||m<p)&&(d=d.slice(g,m),p=m-g);var y=new Array(p+1),v;for(o=0;o<=p;++o)v=y[o]=[],v.x0=o>0?d[o-1]:h,v.x1=o<p?d[o]:f;if(isFinite(u)){if(u>0)for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[Math.min(p,Math.floor((s-h)/u))].push(i[o]);else if(u<0){for(o=0;o<a;++o)if((s=c[o])!=null&&h<=s&&s<=f){const x=Math.floor((h-s)*u);y[Math.min(p,x+(d[x]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[kn(d,s,0,p)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Ac(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Ac([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Ac(Array.isArray(i)?IA.call(i):i),r):n},r}function ki(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Pc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);return r}function va(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Dc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);return r}function xa(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?Tr:Sc(i);r>n;){if(r-n>600){const u=r-n+1,c=e-n+1,l=Math.log(u),h=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*h*(u-h)/u)*(c-u/2<0?-1:1),d=Math.max(n,Math.floor(e-c*h/u+f)),p=Math.min(r,Math.floor(e+(u-c)*h/u+f));xa(t,e,d,p,i)}const o=t[e];let a=n,s=r;for(Ci(t,n,e),i(t[r],o)>0&&Ci(t,n,r);a<s;){for(Ci(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Ci(t,n,s):(++s,Ci(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Ci(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Tg(t,e=_t){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?_t(a,i)>0:_t(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)>0:e(i,i)===0)&&(n=i,r=!0);return n}function Ii(t,e,n){if(t=Float64Array.from(dA(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return va(t);if(e>=1)return ki(t);var r,i=(r-1)*e,o=Math.floor(i),a=ki(xa(t,o).subarray(0,o+1)),s=va(t.subarray(o+1));return a+(s-a)*(i-o)}}function Pg(t,e,n=ga){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),s=+n(t[o+1],o+1,t);return a+(s-a)*(i-o)}}function Dg(t,e,n=ga){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>ga(n(t[u],u,t))),e<=0)return Dc(r);if(e>=1)return Pc(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return xa(i,a,0,o,(s,u)=>Tr(r[s],r[u])),a=Tg(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function GA(t,e,n){const r=ma(t),i=Ii(t,.75)-Ii(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function zA(t,e,n){const r=ma(t),i=gg(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function OA(t,e){let n=0,r=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function UA(t,e){return Ii(t,.5,e)}function BA(t,e){return Dg(t,.5,e)}function*YA(t){for(const e of t)yield*e}function Lc(t){return Array.from(YA(t))}function WA(t,e){const n=new Ei;if(e===void 0)for(let o of t)o!=null&&o>=o&&n.set(o,(n.get(o)||0)+1);else{let o=-1;for(let a of t)(a=e(a,++o,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,i=0;for(const[o,a]of n)a>i&&(i=a,r=o);return r}function HA(t,e=qA){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function qA(t,e){return[t,e]}function ln(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function XA(t,e=_t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");let n=Array.from(t);const r=new Float64Array(n.length);e.length!==2&&(n=n.map(e),e=_t);const i=(s,u)=>e(n[s],n[u]);let o,a;return t=Uint32Array.from(n,(s,u)=>u),t.sort(e===_t?(s,u)=>Tr(n[s],n[u]):Sc(i)),t.forEach((s,u)=>{const c=i(s,o===void 0?s:o);c>=0?((o===void 0||c>0)&&(o=s,a=u),r[s]=a):r[s]=NaN}),r}function jA(t,e=_t){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?_t(a,i)<0:_t(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)<0:e(i,i)===0)&&(n=i,r=!0);return n}function Lg(t,e=_t){if(e.length===1)return Dc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)<0)&&(n=o,r=i);return r}function VA(t,e=_t){if(e.length===1)return Pc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)>0)&&(n=o,r=i);return r}function ZA(t,e){const n=Lg(t,e);return n<0?void 0:n}const KA=Eg(Math.random);function Eg(t){return function(n,r=0,i=n.length){let o=i-(r=+r);for(;o;){const a=t()*o--|0,s=n[o+r];n[o+r]=n[a+r],n[a+r]=s}return n}}function QA(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function kg(t){if(!(o=t.length))return[];for(var e=-1,n=va(t,JA),r=new Array(n);++e<n;)for(var i=-1,o,a=r[e]=new Array(o);++i<o;)a[i]=t[i][e];return r}function JA(t){return t.length}function t5(){return kg(arguments)}function e5(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(!e(r,++n,t))return!1;return!0}function n5(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(e(r,++n,t))return!0;return!1}function r5(t,e){if(typeof e!="function")throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of t)e(i,++r,t)&&n.push(i);return n}function i5(t,e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof e!="function")throw new TypeError("mapper is not a function");return Array.from(t,(n,r)=>e(n,r,t))}function o5(t,e,n){if(typeof e!="function")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:n}=r.next(),i)return;++a}for(;{done:i,value:o}=r.next(),!i;)n=e(n,o,++a,t);return n}function a5(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function s5(t,...e){t=new Cn(t);for(const n of e)for(const r of n)t.delete(r);return t}function u5(t,e){const n=e[Symbol.iterator](),r=new Cn;for(const i of t){if(r.has(i))return!1;let o,a;for(;({value:o,done:a}=n.next())&&!a;){if(Object.is(i,o))return!1;r.add(o)}}return!0}function c5(t,...e){t=new Cn(t),e=e.map(l5);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function l5(t){return t instanceof Cn?t:new Cn(t)}function Cg(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=Ig(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const u=Ig(a);if(r.add(u),Object.is(o,u))break}}return!0}function Ig(t){return t!==null&&typeof t=="object"?t.valueOf():t}function f5(t,e){return Cg(e,t)}function h5(...t){const e=new Cn;for(const n of t)for(const r of n)e.add(r);return e}function d5(t){return t}var _a=1,wa=2,Ec=3,Ri=4,Rg=1e-6;function p5(t){return"translate("+t+",0)"}function g5(t){return"translate(0,"+t+")"}function m5(t){return e=>+t(e)}function y5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function b5(){return!this.__axis}function $a(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===_a||t===Ri?-1:1,l=t===Ri||t===wa?"x":"y",h=t===_a||t===Ec?p5:g5;function f(d){var p=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):d5),m=Math.max(o,0)+s,y=e.range(),v=+y[0]+u,x=+y[y.length-1]+u,b=(e.bandwidth?y5:m5)(e.copy(),u),w=d.selection?d.selection():d,$=w.selectAll(".domain").data([null]),A=w.selectAll(".tick").data(p,e).order(),_=A.exit(),L=A.enter().append("g").attr("class","tick"),E=A.select("line"),T=A.select("text");$=$.merge($.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge(L),E=E.merge(L.append("line").attr("stroke","currentColor").attr(l+"2",c*o)),T=T.merge(L.append("text").attr("fill","currentColor").attr(l,c*m).attr("dy",t===_a?"0em":t===Ec?"0.71em":"0.32em")),d!==w&&($=$.transition(d),A=A.transition(d),E=E.transition(d),T=T.transition(d),_=_.transition(d).attr("opacity",Rg).attr("transform",function(I){return isFinite(I=b(I))?h(I+u):this.getAttribute("transform")}),L.attr("opacity",Rg).attr("transform",function(I){var P=this.parentNode.__axis;return h((P&&isFinite(P=P(I))?P:b(I))+u)})),_.remove(),$.attr("d",t===Ri||t===wa?a?"M"+c*a+","+v+"H"+u+"V"+x+"H"+c*a:"M"+u+","+v+"V"+x:a?"M"+v+","+c*a+"V"+u+"H"+x+"V"+c*a:"M"+v+","+u+"H"+x),A.attr("opacity",1).attr("transform",function(I){return h(b(I)+u)}),E.attr(l+"2",c*o),T.attr(l,c*m).text(g),w.filter(b5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===wa?"start":t===Ri?"end":"middle"),w.each(function(){this.__axis=b})}return f.scale=function(d){return arguments.length?(e=d,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(d){return arguments.length?(n=d==null?[]:Array.from(d),f):n.slice()},f.tickValues=function(d){return arguments.length?(r=d==null?null:Array.from(d),f):r&&r.slice()},f.tickFormat=function(d){return arguments.length?(i=d,f):i},f.tickSize=function(d){return arguments.length?(o=a=+d,f):o},f.tickSizeInner=function(d){return arguments.length?(o=+d,f):o},f.tickSizeOuter=function(d){return arguments.length?(a=+d,f):a},f.tickPadding=function(d){return arguments.length?(s=+d,f):s},f.offset=function(d){return arguments.length?(u=+d,f):u},f}function Ng(t){return $a(_a,t)}function v5(t){return $a(wa,t)}function x5(t){return $a(Ec,t)}function Fg(t){return $a(Ri,t)}var _5={value:()=>{}};function Nn(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Sa(n)}function Sa(t){this._=t}function w5(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Sa.prototype=Nn.prototype={constructor:Sa,on:function(t,e){var n=this._,r=w5(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=$5(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=Gg(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Gg(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Sa(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function $5(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Gg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=_5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var kc="http://www.w3.org/1999/xhtml";const Cc={svg:"http://www.w3.org/2000/svg",xhtml:kc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ni(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Cc.hasOwnProperty(e)?{space:Cc[e],local:t}:t}function S5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===kc&&e.documentElement.namespaceURI===kc?e.createElement(t):e.createElementNS(n,t)}}function A5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Aa(t){var e=Ni(t);return(e.local?A5:S5)(e)}function M5(){}function Ma(t){return t==null?M5:function(){return this.querySelector(t)}}function T5(t){typeof t!="function"&&(t=Ma(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=t.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new Yt(r,this._parents)}function zg(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function P5(){return[]}function Ic(t){return t==null?P5:function(){return this.querySelectorAll(t)}}function D5(t){return function(){return zg(t.apply(this,arguments))}}function L5(t){typeof t=="function"?t=D5(t):t=Ic(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new Yt(r,i)}function Rc(t){return function(){return this.matches(t)}}function Og(t){return function(e){return e.matches(t)}}var E5=Array.prototype.find;function k5(t){return function(){return E5.call(this.children,t)}}function C5(){return this.firstElementChild}function I5(t){return this.select(t==null?C5:k5(typeof t=="function"?t:Og(t)))}var R5=Array.prototype.filter;function N5(){return Array.from(this.children)}function F5(t){return function(){return R5.call(this.children,t)}}function G5(t){return this.selectAll(t==null?N5:F5(typeof t=="function"?t:Og(t)))}function z5(t){typeof t!="function"&&(t=Rc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new Yt(r,this._parents)}function Ug(t){return new Array(t.length)}function O5(){return new Yt(this._enter||this._groups.map(Ug),this._parents)}function Ta(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ta.prototype={constructor:Ta,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function U5(t){return function(){return t}}function B5(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Ta(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function Y5(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),d;for(s=0;s<l;++s)(u=e[s])&&(f[s]=d=a.call(u,u.__data__,s,e)+"",c.has(d)?i[s]=u:c.set(d,u));for(s=0;s<h;++s)d=a.call(t,o[s],s,o)+"",(u=c.get(d))?(r[s]=u,u.__data__=o[s],c.delete(d)):n[s]=new Ta(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function W5(t){return t.__data__}function H5(t,e){if(!arguments.length)return Array.from(this,W5);var n=e?Y5:B5,r=this._parents,i=this._groups;typeof t!="function"&&(t=U5(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,d=q5(t.call(l,l&&l.__data__,c,r)),p=d.length,g=s[c]=new Array(p),m=a[c]=new Array(p),y=u[c]=new Array(f);n(l,h,g,m,y,d,e);for(var v=0,x=0,b,w;v<p;++v)if(b=g[v]){for(v>=x&&(x=v+1);!(w=m[x])&&++x<p;);b._next=w||null}}return a=new Yt(a,r),a._enter=s,a._exit=u,a}function q5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function X5(){return new Yt(this._exit||this._groups.map(Ug),this._parents)}function j5(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function V5(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],l=r[u],h=c.length,f=s[u]=new Array(h),d,p=0;p<h;++p)(d=c[p]||l[p])&&(f[p]=d);for(;u<i;++u)s[u]=n[u];return new Yt(s,this._parents)}function Z5(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function K5(t){t||(t=Q5);function e(h,f){return h&&f?t(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(e)}return new Yt(i,this._parents).order()}function Q5(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function J5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function t6(){return Array.from(this)}function e6(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function n6(){let t=0;for(const e of this)++t;return t}function r6(){return!this.node()}function i6(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function o6(t){return function(){this.removeAttribute(t)}}function a6(t){return function(){this.removeAttributeNS(t.space,t.local)}}function s6(t,e){return function(){this.setAttribute(t,e)}}function u6(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function c6(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function l6(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function f6(t,e){var n=Ni(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?a6:o6:typeof e=="function"?n.local?l6:c6:n.local?u6:s6)(n,e))}function Nc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function h6(t){return function(){this.style.removeProperty(t)}}function d6(t,e,n){return function(){this.style.setProperty(t,e,n)}}function p6(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function g6(t,e,n){return arguments.length>1?this.each((e==null?h6:typeof e=="function"?p6:d6)(t,e,n??"")):Fn(this.node(),t)}function Fn(t,e){return t.style.getPropertyValue(e)||Nc(t).getComputedStyle(t,null).getPropertyValue(e)}function m6(t){return function(){delete this[t]}}function y6(t,e){return function(){this[t]=e}}function b6(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function v6(t,e){return arguments.length>1?this.each((e==null?m6:typeof e=="function"?b6:y6)(t,e)):this.node()[t]}function Bg(t){return t.trim().split(/^|\s+/)}function Fc(t){return t.classList||new Yg(t)}function Yg(t){this._node=t,this._names=Bg(t.getAttribute("class")||"")}Yg.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Wg(t,e){for(var n=Fc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Hg(t,e){for(var n=Fc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function x6(t){return function(){Wg(this,t)}}function _6(t){return function(){Hg(this,t)}}function w6(t,e){return function(){(e.apply(this,arguments)?Wg:Hg)(this,t)}}function $6(t,e){var n=Bg(t+"");if(arguments.length<2){for(var r=Fc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?w6:e?x6:_6)(n,e))}function S6(){this.textContent=""}function A6(t){return function(){this.textContent=t}}function M6(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function T6(t){return arguments.length?this.each(t==null?S6:(typeof t=="function"?M6:A6)(t)):this.node().textContent}function P6(){this.innerHTML=""}function D6(t){return function(){this.innerHTML=t}}function L6(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function E6(t){return arguments.length?this.each(t==null?P6:(typeof t=="function"?L6:D6)(t)):this.node().innerHTML}function k6(){this.nextSibling&&this.parentNode.appendChild(this)}function C6(){return this.each(k6)}function I6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function R6(){return this.each(I6)}function N6(t){var e=typeof t=="function"?t:Aa(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function F6(){return null}function G6(t,e){var n=typeof t=="function"?t:Aa(t),r=e==null?F6:typeof e=="function"?e:Ma(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function z6(){var t=this.parentNode;t&&t.removeChild(this)}function O6(){return this.each(z6)}function U6(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function B6(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Y6(t){return this.select(t?B6:U6)}function W6(t){return arguments.length?this.property("__data__",t):this.node().__data__}function H6(t){return function(e){t.call(this,e,this.__data__)}}function q6(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function X6(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function j6(t,e,n){return function(){var r=this.__on,i,o=H6(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function V6(t,e,n){var r=q6(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(i=0,l=s[u];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?j6:X6,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function qg(t,e,n){var r=Nc(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Z6(t,e){return function(){return qg(this,t,e)}}function K6(t,e){return function(){return qg(this,t,e.apply(this,arguments))}}function Q6(t,e){return this.each((typeof e=="function"?K6:Z6)(t,e))}function*J6(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Gc=[null];function Yt(t,e){this._groups=t,this._parents=e}function Gn(){return new Yt([[document.documentElement]],Gc)}function t8(){return this}Yt.prototype=Gn.prototype={constructor:Yt,select:T5,selectAll:L5,selectChild:I5,selectChildren:G5,filter:z5,data:H5,enter:O5,exit:X5,join:j5,merge:V5,selection:t8,order:Z5,sort:K5,call:J5,nodes:t6,node:e6,size:n6,empty:r6,each:i6,attr:f6,style:g6,property:v6,classed:$6,text:T6,html:E6,raise:C6,lower:R6,append:N6,insert:G6,remove:O6,clone:Y6,datum:W6,on:V6,dispatch:Q6,[Symbol.iterator]:J6};function V(t){return typeof t=="string"?new Yt([[document.querySelector(t)]],[document.documentElement]):new Yt([[t]],Gc)}function e8(t){return V(Aa(t).call(document.documentElement))}var n8=0;function Xg(){return new zc}function zc(){this._="@"+(++n8).toString(36)}zc.prototype=Xg.prototype={constructor:zc,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function jg(t){let e;for(;e=t.sourceEvent;)t=e;return t}function se(t,e){if(t=jg(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function r8(t,e){return t.target&&(t=jg(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>se(n,e))}function i8(t){return typeof t=="string"?new Yt([document.querySelectorAll(t)],[document.documentElement]):new Yt([zg(t)],Gc)}const o8={passive:!1},Fi={capture:!0,passive:!1};function Oc(t){t.stopImmediatePropagation()}function Pr(t){t.preventDefault(),t.stopImmediatePropagation()}function Pa(t){var e=t.document.documentElement,n=V(t).on("dragstart.drag",Pr,Fi);"onselectstart"in e?n.on("selectstart.drag",Pr,Fi):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Da(t,e){var n=t.document.documentElement,r=V(t).on("dragstart.drag",null);e&&(r.on("click.drag",Pr,Fi),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const La=t=>()=>t;function Uc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:u,dy:c,dispatch:l}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,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:s,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:l}})}Uc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function a8(t){return!t.ctrlKey&&!t.button}function s8(){return this.parentNode}function u8(t,e){return e??{x:t.x,y:t.y}}function c8(){return navigator.maxTouchPoints||"ontouchstart"in this}function Vg(){var t=a8,e=s8,n=u8,r=c8,i={},o=Nn("start","drag","end"),a=0,s,u,c,l,h=0;function f(b){b.on("mousedown.drag",d).filter(r).on("touchstart.drag",m).on("touchmove.drag",y,o8).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(b,w){if(!(l||!t.call(this,b,w))){var $=x(this,e.call(this,b,w),b,w,"mouse");$&&(V(b.view).on("mousemove.drag",p,Fi).on("mouseup.drag",g,Fi),Pa(b.view),Oc(b),c=!1,s=b.clientX,u=b.clientY,$("start",b))}}function p(b){if(Pr(b),!c){var w=b.clientX-s,$=b.clientY-u;c=w*w+$*$>h}i.mouse("drag",b)}function g(b){V(b.view).on("mousemove.drag mouseup.drag",null),Da(b.view,c),Pr(b),i.mouse("end",b)}function m(b,w){if(t.call(this,b,w)){var $=b.changedTouches,A=e.call(this,b,w),_=$.length,L,E;for(L=0;L<_;++L)(E=x(this,A,b,w,$[L].identifier,$[L]))&&(Oc(b),E("start",b,$[L]))}}function y(b){var w=b.changedTouches,$=w.length,A,_;for(A=0;A<$;++A)(_=i[w[A].identifier])&&(Pr(b),_("drag",b,w[A]))}function v(b){var w=b.changedTouches,$=w.length,A,_;for(l&&clearTimeout(l),l=setTimeout(function(){l=null},500),A=0;A<$;++A)(_=i[w[A].identifier])&&(Oc(b),_("end",b,w[A]))}function x(b,w,$,A,_,L){var E=o.copy(),T=se(L||$,w),I,P,D;if((D=n.call(b,new Uc("beforestart",{sourceEvent:$,target:f,identifier:_,active:a,x:T[0],y:T[1],dx:0,dy:0,dispatch:E}),A))!=null)return I=D.x-T[0]||0,P=D.y-T[1]||0,function C(S,R,G){var M=T,N;switch(S){case"start":i[_]=C,N=a++;break;case"end":delete i[_],--a;case"drag":T=se(G||R,w),N=a;break}E.call(S,b,new Uc(S,{sourceEvent:R,subject:D,target:f,identifier:_,active:N,x:T[0]+I,y:T[1]+P,dx:T[0]-M[0],dy:T[1]-M[1],dispatch:E}),A)}}return f.filter=function(b){return arguments.length?(t=typeof b=="function"?b:La(!!b),f):t},f.container=function(b){return arguments.length?(e=typeof b=="function"?b:La(b),f):e},f.subject=function(b){return arguments.length?(n=typeof b=="function"?b:La(b),f):n},f.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:La(!!b),f):r},f.on=function(){var b=o.on.apply(o,arguments);return b===o?f:b},f.clickDistance=function(b){return arguments.length?(h=(b=+b)*b,f):Math.sqrt(h)},f}function Dr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Gi(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function fn(){}var zn=.7,Lr=1/zn,Er="\\s*([+-]?\\d+)\\s*",zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ke="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",l8=/^#([0-9a-f]{3,8})$/,f8=new RegExp(`^rgb\\(${Er},${Er},${Er}\\)$`),h8=new RegExp(`^rgb\\(${ke},${ke},${ke}\\)$`),d8=new RegExp(`^rgba\\(${Er},${Er},${Er},${zi}\\)$`),p8=new RegExp(`^rgba\\(${ke},${ke},${ke},${zi}\\)$`),g8=new RegExp(`^hsl\\(${zi},${ke},${ke}\\)$`),m8=new RegExp(`^hsla\\(${zi},${ke},${ke},${zi}\\)$`),Zg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Dr(fn,hn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Kg,formatHex:Kg,formatHex8:y8,formatHsl:b8,formatRgb:Qg,toString:Qg});function Kg(){return this.rgb().formatHex()}function y8(){return this.rgb().formatHex8()}function b8(){return r0(this).formatHsl()}function Qg(){return this.rgb().formatRgb()}function hn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=l8.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Jg(e):n===3?new kt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ea(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ea(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=f8.exec(t))?new kt(e[1],e[2],e[3],1):(e=h8.exec(t))?new kt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=d8.exec(t))?Ea(e[1],e[2],e[3],e[4]):(e=p8.exec(t))?Ea(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=g8.exec(t))?n0(e[1],e[2]/100,e[3]/100,1):(e=m8.exec(t))?n0(e[1],e[2]/100,e[3]/100,e[4]):Zg.hasOwnProperty(t)?Jg(Zg[t]):t==="transparent"?new kt(NaN,NaN,NaN,0):null}function Jg(t){return new kt(t>>16&255,t>>8&255,t&255,1)}function Ea(t,e,n,r){return r<=0&&(t=e=n=NaN),new kt(t,e,n,r)}function Bc(t){return t instanceof fn||(t=hn(t)),t?(t=t.rgb(),new kt(t.r,t.g,t.b,t.opacity)):new kt}function kr(t,e,n,r){return arguments.length===1?Bc(t):new kt(t,e,n,r??1)}function kt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Dr(kt,kr,Gi(fn,{brighter(t){return t=t==null?Lr:Math.pow(Lr,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new kt(On(this.r),On(this.g),On(this.b),ka(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:t0,formatHex:t0,formatHex8:v8,formatRgb:e0,toString:e0}));function t0(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}`}function v8(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}${Un((isNaN(this.opacity)?1:this.opacity)*255)}`}function e0(){const t=ka(this.opacity);return`${t===1?"rgb(":"rgba("}${On(this.r)}, ${On(this.g)}, ${On(this.b)}${t===1?")":`, ${t})`}`}function ka(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function On(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Un(t){return t=On(t),(t<16?"0":"")+t.toString(16)}function n0(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Se(t,e,n,r)}function r0(t){if(t instanceof Se)return new Se(t.h,t.s,t.l,t.opacity);if(t instanceof fn||(t=hn(t)),!t)return new Se;if(t instanceof Se)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Se(a,s,u,t.opacity)}function Ca(t,e,n,r){return arguments.length===1?r0(t):new Se(t,e,n,r??1)}function Se(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Dr(Se,Ca,Gi(fn,{brighter(t){return t=t==null?Lr:Math.pow(Lr,t),new Se(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new Se(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new kt(Yc(t>=240?t-240:t+120,i,r),Yc(t,i,r),Yc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Se(i0(this.h),Ia(this.s),Ia(this.l),ka(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=ka(this.opacity);return`${t===1?"hsl(":"hsla("}${i0(this.h)}, ${Ia(this.s)*100}%, ${Ia(this.l)*100}%${t===1?")":`, ${t})`}`}}));function i0(t){return t=(t||0)%360,t<0?t+360:t}function Ia(t){return Math.max(0,Math.min(1,t||0))}function Yc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const o0=Math.PI/180,a0=180/Math.PI,Ra=18,s0=.96422,u0=1,c0=.82521,l0=4/29,Cr=6/29,f0=3*Cr*Cr,x8=Cr*Cr*Cr;function h0(t){if(t instanceof Ae)return new Ae(t.l,t.a,t.b,t.opacity);if(t instanceof Ce)return p0(t);t instanceof kt||(t=Bc(t));var e=Xc(t.r),n=Xc(t.g),r=Xc(t.b),i=Wc((.2225045*e+.7168786*n+.0606169*r)/u0),o,a;return e===n&&n===r?o=a=i:(o=Wc((.4360747*e+.3850649*n+.1430804*r)/s0),a=Wc((.0139322*e+.0971045*n+.7141733*r)/c0)),new Ae(116*i-16,500*(o-i),200*(i-a),t.opacity)}function _8(t,e){return new Ae(t,0,0,e??1)}function Na(t,e,n,r){return arguments.length===1?h0(t):new Ae(t,e,n,r??1)}function Ae(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Dr(Ae,Na,Gi(fn,{brighter(t){return new Ae(this.l+Ra*(t??1),this.a,this.b,this.opacity)},darker(t){return new Ae(this.l-Ra*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=s0*Hc(e),t=u0*Hc(t),n=c0*Hc(n),new kt(qc(3.1338561*e-1.6168667*t-.4906146*n),qc(-.9787684*e+1.9161415*t+.033454*n),qc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Wc(t){return t>x8?Math.pow(t,1/3):t/f0+l0}function Hc(t){return t>Cr?t*t*t:f0*(t-l0)}function qc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Xc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function d0(t){if(t instanceof Ce)return new Ce(t.h,t.c,t.l,t.opacity);if(t instanceof Ae||(t=h0(t)),t.a===0&&t.b===0)return new Ce(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*a0;return new Ce(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function w8(t,e,n,r){return arguments.length===1?d0(t):new Ce(n,e,t,r??1)}function Fa(t,e,n,r){return arguments.length===1?d0(t):new Ce(t,e,n,r??1)}function Ce(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function p0(t){if(isNaN(t.h))return new Ae(t.l,0,0,t.opacity);var e=t.h*o0;return new Ae(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Dr(Ce,Fa,Gi(fn,{brighter(t){return new Ce(this.h,this.c,this.l+Ra*(t??1),this.opacity)},darker(t){return new Ce(this.h,this.c,this.l-Ra*(t??1),this.opacity)},rgb(){return p0(this).rgb()}}));var g0=-.14861,jc=1.78277,Vc=-.29227,Ga=-.90649,Oi=1.97294,m0=Oi*Ga,y0=Oi*jc,b0=jc*Vc-Ga*g0;function $8(t){if(t instanceof Bn)return new Bn(t.h,t.s,t.l,t.opacity);t instanceof kt||(t=Bc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(b0*r+m0*e-y0*n)/(b0+m0-y0),o=r-i,a=(Oi*(n-i)-Vc*o)/Ga,s=Math.sqrt(a*a+o*o)/(Oi*i*(1-i)),u=s?Math.atan2(a,o)*a0-120:NaN;return new Bn(u<0?u+360:u,s,i,t.opacity)}function Me(t,e,n,r){return arguments.length===1?$8(t):new Bn(t,e,n,r??1)}function Bn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Dr(Bn,Me,Gi(fn,{brighter(t){return t=t==null?Lr:Math.pow(Lr,t),new Bn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new Bn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*o0,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new kt(255*(e+n*(g0*r+jc*i)),255*(e+n*(Vc*r+Ga*i)),255*(e+n*(Oi*r)),this.opacity)}}));function v0(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}function x0(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return v0((n-r/e)*e,a,i,o,s)}}function _0(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return v0((n-r/e)*e,i,o,a,s)}}const za=t=>()=>t;function w0(t,e){return function(n){return t+n*e}}function S8(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Oa(t,e){var n=e-t;return n?w0(t,n>180||n<-180?n-360*Math.round(n/360):n):za(isNaN(t)?e:t)}function A8(t){return(t=+t)==1?Ct:function(e,n){return n-e?S8(e,n,t):za(isNaN(e)?n:e)}}function Ct(t,e){var n=e-t;return n?w0(t,n):za(isNaN(t)?e:t)}const Ui=function t(e){var n=A8(e);function r(i,o){var a=n((i=kr(i)).r,(o=kr(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=Ct(i.opacity,o.opacity);return function(l){return i.r=a(l),i.g=s(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=t,r}(1);function $0(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=kr(e[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=t(r),i=t(i),o=t(o),s.opacity=1,function(u){return s.r=r(u),s.g=i(u),s.b=o(u),s+""}}}var S0=$0(x0),M8=$0(_0);function Zc(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function A0(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function T8(t,e){return(A0(e)?Zc:M0)(t,e)}function M0(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=dn(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function T0(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function he(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function P0(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=dn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Kc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qc=new RegExp(Kc.source,"g");function P8(t){return function(){return t}}function D8(t){return function(e){return t(e)+""}}function Jc(t,e){var n=Kc.lastIndex=Qc.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=Kc.exec(t))&&(i=Qc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:he(r,i)})),n=Qc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?D8(u[0].x):P8(e):(e=u.length,function(c){for(var l=0,h;l<e;++l)s[(h=u[l]).i]=h.x(c);return s.join("")})}function dn(t,e){var n=typeof e,r;return e==null||n==="boolean"?za(e):(n==="number"?he:n==="string"?(r=hn(e))?(e=r,Ui):Jc:e instanceof hn?Ui:e instanceof Date?T0:A0(e)?Zc:Array.isArray(e)?M0:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?P0:he)(t,e)}function L8(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function E8(t,e){var n=Oa(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ua(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var D0=180/Math.PI,tl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function L0(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*D0,skewX:Math.atan(u)*D0,scaleX:a,scaleY:s}}var Ba;function k8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?tl:L0(e.a,e.b,e.c,e.d,e.e,e.f)}function C8(t){return t==null||(Ba||(Ba=document.createElementNS("http://www.w3.org/2000/svg","g")),Ba.setAttribute("transform",t),!(t=Ba.transform.baseVal.consolidate()))?tl:(t=t.matrix,L0(t.a,t.b,t.c,t.d,t.e,t.f))}function E0(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push("translate(",null,e,null,n);p.push({i:g-4,x:he(c,h)},{i:g-2,x:he(l,f)})}else(h||f)&&d.push("translate("+h+e+f+n)}function a(c,l,h,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:he(c,l)})):l&&h.push(i(h)+"rotate("+l+r)}function s(c,l,h,f){c!==l?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:he(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push(i(d)+"scale(",null,",",null,")");p.push({i:g-4,x:he(c,h)},{i:g-2,x:he(l,f)})}else(h!==1||f!==1)&&d.push(i(d)+"scale("+h+","+f+")")}return function(c,l){var h=[],f=[];return c=t(c),l=t(l),o(c.translateX,c.translateY,l.translateX,l.translateY,h,f),a(c.rotate,l.rotate,h,f),s(c.skewX,l.skewX,h,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,h,f),c=l=null,function(d){for(var p=-1,g=f.length,m;++p<g;)h[(m=f[p]).i]=m.x(d);return h.join("")}}}var k0=E0(k8,"px, ","px)","deg)"),C0=E0(C8,", ",")",")"),I8=1e-12;function I0(t){return((t=Math.exp(t))+1/t)/2}function R8(t){return((t=Math.exp(t))-1/t)/2}function N8(t){return((t=Math.exp(2*t))-1)/(t+1)}const R0=function t(e,n,r){function i(o,a){var s=o[0],u=o[1],c=o[2],l=a[0],h=a[1],f=a[2],d=l-s,p=h-u,g=d*d+p*p,m,y;if(g<I8)y=Math.log(f/c)/e,m=function(A){return[s+A*d,u+A*p,c*Math.exp(e*A*y)]};else{var v=Math.sqrt(g),x=(f*f-c*c+r*g)/(2*c*n*v),b=(f*f-c*c-r*g)/(2*f*n*v),w=Math.log(Math.sqrt(x*x+1)-x),$=Math.log(Math.sqrt(b*b+1)-b);y=($-w)/e,m=function(A){var _=A*y,L=I0(w),E=c/(n*v)*(L*N8(e*_+w)-R8(w));return[s+E*d,u+E*p,c*L/I0(e*_+w)]}}return m.duration=y*1e3*e/Math.SQRT2,m}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,u=s*s;return t(a,s,u)},i}(Math.SQRT2,2,4);function N0(t){return function(e,n){var r=t((e=Ca(e)).h,(n=Ca(n)).h),i=Ct(e.s,n.s),o=Ct(e.l,n.l),a=Ct(e.opacity,n.opacity);return function(s){return e.h=r(s),e.s=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const F8=N0(Oa);var G8=N0(Ct);function z8(t,e){var n=Ct((t=Na(t)).l,(e=Na(e)).l),r=Ct(t.a,e.a),i=Ct(t.b,e.b),o=Ct(t.opacity,e.opacity);return function(a){return t.l=n(a),t.a=r(a),t.b=i(a),t.opacity=o(a),t+""}}function F0(t){return function(e,n){var r=t((e=Fa(e)).h,(n=Fa(n)).h),i=Ct(e.c,n.c),o=Ct(e.l,n.l),a=Ct(e.opacity,n.opacity);return function(s){return e.h=r(s),e.c=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const O8=F0(Oa);var U8=F0(Ct);function G0(t){return function e(n){n=+n;function r(i,o){var a=t((i=Me(i)).h,(o=Me(o)).h),s=Ct(i.s,o.s),u=Ct(i.l,o.l),c=Ct(i.opacity,o.opacity);return function(l){return i.h=a(l),i.s=s(l),i.l=u(Math.pow(l,n)),i.opacity=c(l),i+""}}return r.gamma=e,r}(1)}const B8=G0(Oa);var Ya=G0(Ct);function z0(t,e){e===void 0&&(e=t,t=dn);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function Y8(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Ir=0,Bi=0,Yi=0,O0=1e3,Wa,Wi,Ha=0,Yn=0,qa=0,Hi=typeof performance=="object"&&performance.now?performance:Date,U0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qi(){return Yn||(U0(W8),Yn=Hi.now()+qa)}function W8(){Yn=0}function Xi(){this._call=this._time=this._next=null}Xi.prototype=Xa.prototype={constructor:Xi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?qi():+n)+(e==null?0:+e),!this._next&&Wi!==this&&(Wi?Wi._next=this:Wa=this,Wi=this),this._call=t,this._time=n,el()},stop:function(){this._call&&(this._call=null,this._time=1/0,el())}};function Xa(t,e,n){var r=new Xi;return r.restart(t,e,n),r}function B0(){qi(),++Ir;for(var t=Wa,e;t;)(e=Yn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Ir}function Y0(){Yn=(Ha=Hi.now())+qa,Ir=Bi=0;try{B0()}finally{Ir=0,q8(),Yn=0}}function H8(){var t=Hi.now(),e=t-Ha;e>O0&&(qa-=e,Ha=t)}function q8(){for(var t,e=Wa,n,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:Wa=n);Wi=t,el(r)}function el(t){if(!Ir){Bi&&(Bi=clearTimeout(Bi));var e=t-Yn;e>24?(t<1/0&&(Bi=setTimeout(Y0,t-Hi.now()-qa)),Yi&&(Yi=clearInterval(Yi))):(Yi||(Ha=Hi.now(),Yi=setInterval(H8,O0)),Ir=1,U0(Y0))}}function nl(t,e,n){var r=new Xi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function X8(t,e,n){var r=new Xi,i=e;return e==null?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(o,a,s){a=+a,s=s==null?qi():+s,r._restart(function u(c){c+=i,r._restart(u,i+=a,s),o(c)},a,s)},r.restart(t,e,n),r)}var j8=Nn("start","end","cancel","interrupt"),V8=[],W0=0,rl=1,il=2,ja=3,H0=4,ol=5,Va=6;function Za(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;Z8(t,n,{name:e,index:r,group:i,on:j8,tween:V8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:W0})}function al(t,e){var n=Te(t,e);if(n.state>W0)throw new Error("too late; already scheduled");return n}function Ie(t,e){var n=Te(t,e);if(n.state>ja)throw new Error("too late; already running");return n}function Te(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Z8(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Xa(o,0,n.time);function o(c){n.state=rl,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,d;if(n.state!==rl)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===ja)return nl(a);d.state===H0?(d.state=Va,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=Va,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(nl(function(){n.state===ja&&(n.state=H0,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=il,n.on.call("start",t,t.__data__,n.index,n.group),n.state===il){for(n.state=ja,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=d);i.length=h+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=ol,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===ol&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Va,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function Wn(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>il&&r.state<ol,r.state=Va,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function K8(t){return this.each(function(){Wn(this,t)})}function Q8(t,e){var n,r;return function(){var i=Ie(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function J8(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ie(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function t4(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Te(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?Q8:J8)(n,t,e))}function sl(t,e,n){var r=t._id;return t.each(function(){var i=Ie(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Te(i,r).value[e]}}function q0(t,e){var n;return(typeof e=="number"?he:e instanceof hn?Ui:(n=hn(e))?(e=n,Ui):Jc)(t,e)}function e4(t){return function(){this.removeAttribute(t)}}function n4(t){return function(){this.removeAttributeNS(t.space,t.local)}}function r4(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function i4(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function o4(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function a4(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function s4(t,e){var n=Ni(t),r=n==="transform"?C0:q0;return this.attrTween(t,typeof e=="function"?(n.local?a4:o4)(n,r,sl(this,"attr."+t,e)):e==null?(n.local?n4:e4)(n):(n.local?i4:r4)(n,r,e))}function u4(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function c4(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function l4(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&c4(t,o)),n}return i._value=e,i}function f4(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&u4(t,o)),n}return i._value=e,i}function h4(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Ni(t);return this.tween(n,(r.local?l4:f4)(r,e))}function d4(t,e){return function(){al(this,t).delay=+e.apply(this,arguments)}}function p4(t,e){return e=+e,function(){al(this,t).delay=e}}function g4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?d4:p4)(e,t)):Te(this.node(),e).delay}function m4(t,e){return function(){Ie(this,t).duration=+e.apply(this,arguments)}}function y4(t,e){return e=+e,function(){Ie(this,t).duration=e}}function b4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?m4:y4)(e,t)):Te(this.node(),e).duration}function v4(t,e){if(typeof e!="function")throw new Error;return function(){Ie(this,t).ease=e}}function x4(t){var e=this._id;return arguments.length?this.each(v4(e,t)):Te(this.node(),e).ease}function _4(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ie(this,t).ease=n}}function w4(t){if(typeof t!="function")throw new Error;return this.each(_4(this._id,t))}function $4(t){typeof t!="function"&&(t=Rc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new Re(r,this._parents,this._name,this._id)}function S4(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],c=n[s],l=u.length,h=a[s]=new Array(l),f,d=0;d<l;++d)(f=u[d]||c[d])&&(h[d]=f);for(;s<r;++s)a[s]=e[s];return new Re(a,this._parents,this._name,this._id)}function A4(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function M4(t,e,n){var r,i,o=A4(e)?al:Ie;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function T4(t,e){var n=this._id;return arguments.length<2?Te(this.node(),n).on.on(t):this.each(M4(n,t,e))}function P4(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function D4(){return this.on("end.remove",P4(this._id))}function L4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ma(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,Za(c[f],e,n,f,c,Te(l,n)));return new Re(o,this._parents,e,n)}function E4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ic(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,l,h=0;h<c;++h)if(l=u[h]){for(var f=t.call(l,l.__data__,h,u),d,p=Te(l,n),g=0,m=f.length;g<m;++g)(d=f[g])&&Za(d,e,n,g,f,p);o.push(f),a.push(l)}return new Re(o,a,e,n)}var k4=Gn.prototype.constructor;function C4(){return new k4(this._groups,this._parents)}function I4(t,e){var n,r,i;return function(){var o=Fn(this,t),a=(this.style.removeProperty(t),Fn(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function X0(t){return function(){this.style.removeProperty(t)}}function R4(t,e,n){var r,i=n+"",o;return function(){var a=Fn(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function N4(t,e,n){var r,i,o;return function(){var a=Fn(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),Fn(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function F4(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Ie(this,t),c=u.on,l=u.value[o]==null?s||(s=X0(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function G4(t,e,n){var r=(t+="")=="transform"?k0:q0;return e==null?this.styleTween(t,I4(t,r)).on("end.style."+t,X0(t)):typeof e=="function"?this.styleTween(t,N4(t,r,sl(this,"style."+t,e))).each(F4(this._id,t)):this.styleTween(t,R4(t,r,e),n).on("end.style."+t,null)}function z4(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function O4(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&z4(t,a,n)),r}return o._value=e,o}function U4(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,O4(t,e,n??""))}function B4(t){return function(){this.textContent=t}}function Y4(t){return function(){var e=t(this);this.textContent=e??""}}function W4(t){return this.tween("text",typeof t=="function"?Y4(sl(this,"text",t)):B4(t==null?"":t+""))}function H4(t){return function(e){this.textContent=t.call(this,e)}}function q4(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&H4(i)),e}return r._value=t,r}function X4(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,q4(t))}function j4(){for(var t=this._name,e=this._id,n=V0(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=Te(u,e);Za(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Re(r,this._parents,t,n)}function V4(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=Ie(this,r),l=c.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var Z4=0;function Re(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function j0(t){return Gn().transition(t)}function V0(){return++Z4}var je=Gn.prototype;Re.prototype=j0.prototype={constructor:Re,select:L4,selectAll:E4,selectChild:je.selectChild,selectChildren:je.selectChildren,filter:$4,merge:S4,selection:C4,transition:j4,call:je.call,nodes:je.nodes,node:je.node,size:je.size,empty:je.empty,each:je.each,on:T4,attr:s4,attrTween:h4,style:G4,styleTween:U4,text:W4,textTween:X4,remove:D4,tween:t4,delay:g4,duration:b4,ease:x4,easeVarying:w4,end:V4,[Symbol.iterator]:je[Symbol.iterator]};const K4=t=>+t;function Q4(t){return t*t}function J4(t){return t*(2-t)}function Z0(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function tM(t){return t*t*t}function eM(t){return--t*t*t+1}function ji(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ul=3,nM=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(ul),rM=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(ul),K0=function t(e){e=+e;function n(r){return((r*=2)<=1?Math.pow(r,e):2-Math.pow(2-r,e))/2}return n.exponent=t,n}(ul),Q0=Math.PI,J0=Q0/2;function iM(t){return+t==1?1:1-Math.cos(t*J0)}function oM(t){return Math.sin(t*J0)}function t1(t){return(1-Math.cos(Q0*t))/2}function pn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function aM(t){return pn(1-+t)}function sM(t){return 1-pn(t)}function e1(t){return((t*=2)<=1?pn(1-t):2-pn(t-1))/2}function uM(t){return 1-Math.sqrt(1-t*t)}function cM(t){return Math.sqrt(1- --t*t)}function n1(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var cl=4/11,lM=6/11,fM=8/11,hM=3/4,dM=9/11,pM=10/11,gM=15/16,mM=21/22,yM=63/64,Ka=1/cl/cl;function bM(t){return 1-Vi(1-t)}function Vi(t){return(t=+t)<cl?Ka*t*t:t<fM?Ka*(t-=lM)*t+hM:t<pM?Ka*(t-=dM)*t+gM:Ka*(t-=mM)*t+yM}function vM(t){return((t*=2)<=1?1-Vi(1-t):Vi(t-1)+1)/2}var ll=1.70158,xM=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(ll),_M=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(ll),r1=function t(e){e=+e;function n(r){return((r*=2)<1?r*r*((e+1)*r-e):(r-=2)*r*((e+1)*r+e)+2)/2}return n.overshoot=t,n}(ll),Rr=2*Math.PI,fl=1,hl=.3,wM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return e*pn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(fl,hl),Qa=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return 1-e*pn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(fl,hl),$M=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return((o=o*2-1)<0?e*pn(-o)*Math.sin((r-o)/n):2-e*pn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(fl,hl),SM={time:null,delay:0,duration:250,ease:ji};function AM(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function MM(t){var e,n;t instanceof Re?(e=t._id,t=t._name):(e=V0(),(n=SM).time=qi(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&Za(u,t,e,c,a,n||AM(u,e));return new Re(r,this._parents,t,e)}Gn.prototype.interrupt=K8,Gn.prototype.transition=MM;var TM=[null];function PM(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>rl&&r.name===e)return new Re([[t]],TM,e,+i)}return null}const dl=t=>()=>t;function DM(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function LM(t){t.stopImmediatePropagation()}function pl(t){t.preventDefault(),t.stopImmediatePropagation()}var i1={name:"drag"},gl={name:"space"},Nr={name:"handle"},Fr={name:"center"};const{abs:o1,max:Gt,min:zt}=Math;function a1(t){return[+t[0],+t[1]]}function ml(t){return[a1(t[0]),a1(t[1])]}var Ja={name:"x",handles:["w","e"].map(Zi),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ts={name:"y",handles:["n","s"].map(Zi),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},EM={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Zi),input:function(t){return t==null?null:ml(t)},output:function(t){return t}},Ve={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"},s1={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},u1={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},kM={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},CM={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Zi(t){return{type:t}}function IM(t){return!t.ctrlKey&&!t.button}function RM(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function NM(){return navigator.maxTouchPoints||"ontouchstart"in this}function yl(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function FM(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function GM(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function zM(){return bl(Ja)}function OM(){return bl(ts)}function UM(){return bl(EM)}function bl(t){var e=RM,n=IM,r=NM,i=!0,o=Nn("start","brush","end"),a=6,s;function u(m){var y=m.property("__brush",g).selectAll(".overlay").data([Zi("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ve.overlay).merge(y).each(function(){var x=yl(this).extent;V(this).attr("x",x[0][0]).attr("y",x[0][1]).attr("width",x[1][0]-x[0][0]).attr("height",x[1][1]-x[0][1])}),m.selectAll(".selection").data([Zi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ve.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var v=m.selectAll(".handle").data(t.handles,function(x){return x.type});v.exit().remove(),v.enter().append("rect").attr("class",function(x){return"handle handle--"+x.type}).attr("cursor",function(x){return Ve[x.type]}),m.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(r).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}u.move=function(m,y,v){m.tween?m.on("start.brush",function(x){l(this,arguments).beforestart().start(x)}).on("interrupt.brush end.brush",function(x){l(this,arguments).end(x)}).tween("brush",function(){var x=this,b=x.__brush,w=l(x,arguments),$=b.selection,A=t.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),_=dn($,A);function L(E){b.selection=E===1&&A===null?null:_(E),c.call(x),w.brush()}return $!==null&&A!==null?L:L(1)}):m.each(function(){var x=this,b=arguments,w=x.__brush,$=t.input(typeof y=="function"?y.apply(x,b):y,w.extent),A=l(x,b).beforestart();Wn(x),w.selection=$===null?null:$,c.call(x),A.start(v).brush(v).end(v)})},u.clear=function(m,y){u.move(m,null,y)};function c(){var m=V(this),y=yl(this).selection;y?(m.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(v){return v.type[v.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(v){return v.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(v){return v.type==="n"||v.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(v){return v.type==="e"||v.type==="w"?y[1][1]-y[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(m,y,v){var x=m.__brush.emitter;return x&&(!v||!x.clean)?x:new h(m,y,v)}function h(m,y,v){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=v}h.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,y){return this.starting?(this.starting=!1,this.emit("start",m,y)):this.emit("brush",m),this},brush:function(m,y){return this.emit("brush",m,y),this},end:function(m,y){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,y)),this},emit:function(m,y,v){var x=V(this.that).datum();o.call(m,this.that,new DM(m,{sourceEvent:y,target:u,selection:t.output(this.state.selection),mode:v,dispatch:o}),x)}};function f(m){if(s&&!m.touches||!n.apply(this,arguments))return;var y=this,v=m.target.__data__.type,x=(i&&m.metaKey?v="overlay":v)==="selection"?i1:i&&m.altKey?Fr:Nr,b=t===ts?null:kM[v],w=t===Ja?null:CM[v],$=yl(y),A=$.extent,_=$.selection,L=A[0][0],E,T,I=A[0][1],P,D,C=A[1][0],S,R,G=A[1][1],M,N,z=0,k=0,Y,j=b&&w&&i&&m.shiftKey,W,X,Q=Array.from(m.touches||[m],it=>{const Mt=it.identifier;return it=se(it,y),it.point0=it.slice(),it.identifier=Mt,it});Wn(y);var ct=l(y,arguments,!0).beforestart();if(v==="overlay"){_&&(Y=!0);const it=[Q[0],Q[1]||Q[0]];$.selection=_=[[E=t===ts?L:zt(it[0][0],it[1][0]),P=t===Ja?I:zt(it[0][1],it[1][1])],[S=t===ts?C:Gt(it[0][0],it[1][0]),M=t===Ja?G:Gt(it[0][1],it[1][1])]],Q.length>1&&xt(m)}else E=_[0][0],P=_[0][1],S=_[1][0],M=_[1][1];T=E,D=P,R=S,N=M;var O=V(y).attr("pointer-events","none"),tt=O.selectAll(".overlay").attr("cursor",Ve[v]);if(m.touches)ct.moved=q,ct.ended=gt;else{var st=V(m.view).on("mousemove.brush",q,!0).on("mouseup.brush",gt,!0);i&&st.on("keydown.brush",Ft,!0).on("keyup.brush",te,!0),Pa(m.view)}c.call(y),ct.start(m,x.name);function q(it){for(const Mt of it.changedTouches||[it])for(const No of Q)No.identifier===Mt.identifier&&(No.cur=se(Mt,y));if(j&&!W&&!X&&Q.length===1){const Mt=Q[0];o1(Mt.cur[0]-Mt[0])>o1(Mt.cur[1]-Mt[1])?X=!0:W=!0}for(const Mt of Q)Mt.cur&&(Mt[0]=Mt.cur[0],Mt[1]=Mt.cur[1]);Y=!0,pl(it),xt(it)}function xt(it){const Mt=Q[0],No=Mt.point0;var An;switch(z=Mt[0]-No[0],k=Mt[1]-No[1],x){case gl:case i1:{b&&(z=Gt(L-E,zt(C-S,z)),T=E+z,R=S+z),w&&(k=Gt(I-P,zt(G-M,k)),D=P+k,N=M+k);break}case Nr:{Q[1]?(b&&(T=Gt(L,zt(C,Q[0][0])),R=Gt(L,zt(C,Q[1][0])),b=1),w&&(D=Gt(I,zt(G,Q[0][1])),N=Gt(I,zt(G,Q[1][1])),w=1)):(b<0?(z=Gt(L-E,zt(C-E,z)),T=E+z,R=S):b>0&&(z=Gt(L-S,zt(C-S,z)),T=E,R=S+z),w<0?(k=Gt(I-P,zt(G-P,k)),D=P+k,N=M):w>0&&(k=Gt(I-M,zt(G-M,k)),D=P,N=M+k));break}case Fr:{b&&(T=Gt(L,zt(C,E-z*b)),R=Gt(L,zt(C,S+z*b))),w&&(D=Gt(I,zt(G,P-k*w)),N=Gt(I,zt(G,M+k*w)));break}}R<T&&(b*=-1,An=E,E=S,S=An,An=T,T=R,R=An,v in s1&&tt.attr("cursor",Ve[v=s1[v]])),N<D&&(w*=-1,An=P,P=M,M=An,An=D,D=N,N=An,v in u1&&tt.attr("cursor",Ve[v=u1[v]])),$.selection&&(_=$.selection),W&&(T=_[0][0],R=_[1][0]),X&&(D=_[0][1],N=_[1][1]),(_[0][0]!==T||_[0][1]!==D||_[1][0]!==R||_[1][1]!==N)&&($.selection=[[T,D],[R,N]],c.call(y),ct.brush(it,x.name))}function gt(it){if(LM(it),it.touches){if(it.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Da(it.view,Y),st.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);O.attr("pointer-events","all"),tt.attr("cursor",Ve.overlay),$.selection&&(_=$.selection),FM(_)&&($.selection=null,c.call(y)),ct.end(it,x.name)}function Ft(it){switch(it.keyCode){case 16:{j=b&&w;break}case 18:{x===Nr&&(b&&(S=R-z*b,E=T+z*b),w&&(M=N-k*w,P=D+k*w),x=Fr,xt(it));break}case 32:{(x===Nr||x===Fr)&&(b<0?S=R-z:b>0&&(E=T-z),w<0?M=N-k:w>0&&(P=D-k),x=gl,tt.attr("cursor",Ve.selection),xt(it));break}default:return}pl(it)}function te(it){switch(it.keyCode){case 16:{j&&(W=X=j=!1,xt(it));break}case 18:{x===Fr&&(b<0?S=R:b>0&&(E=T),w<0?M=N:w>0&&(P=D),x=Nr,xt(it));break}case 32:{x===gl&&(it.altKey?(b&&(S=R-z*b,E=T+z*b),w&&(M=N-k*w,P=D+k*w),x=Fr):(b<0?S=R:b>0&&(E=T),w<0?M=N:w>0&&(P=D),x=Nr),tt.attr("cursor",Ve[v]),xt(it));break}default:return}pl(it)}}function d(m){l(this,arguments).moved(m)}function p(m){l(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=ml(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:dl(ml(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:dl(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:dl(!!m),u):r},u.handleSize=function(m){return arguments.length?(a=+m,u):a},u.keyModifiers=function(m){return arguments.length?(i=!!m,u):i},u.on=function(){var m=o.on.apply(o,arguments);return m===o?u:m},u}var c1=Math.abs,Gr=Math.cos,zr=Math.sin,l1=Math.PI,es=l1/2,f1=l1*2,h1=Math.max,vl=1e-12;function xl(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function BM(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function YM(){return _l(!1,!1)}function WM(){return _l(!1,!0)}function HM(){return _l(!0,!1)}function _l(t,e){var n=0,r=null,i=null,o=null;function a(s){var u=s.length,c=new Array(u),l=xl(0,u),h=new Array(u*u),f=new Array(u),d=0,p;s=Float64Array.from({length:u*u},e?(g,m)=>s[m%u][m/u|0]:(g,m)=>s[m/u|0][m%u]);for(let g=0;g<u;++g){let m=0;for(let y=0;y<u;++y)m+=s[g*u+y]+t*s[y*u+g];d+=c[g]=m}d=h1(0,f1-n*u)/d,p=d?n:f1/u;{let g=0;r&&l.sort((m,y)=>r(c[m],c[y]));for(const m of l){const y=g;if(t){const v=xl(~u+1,u).filter(x=>x<0?s[~x*u+m]:s[m*u+x]);i&&v.sort((x,b)=>i(x<0?-s[~x*u+m]:s[m*u+x],b<0?-s[~b*u+m]:s[m*u+b]));for(const x of v)if(x<0){const b=h[~x*u+m]||(h[~x*u+m]={source:null,target:null});b.target={index:m,startAngle:g,endAngle:g+=s[~x*u+m]*d,value:s[~x*u+m]}}else{const b=h[m*u+x]||(h[m*u+x]={source:null,target:null});b.source={index:m,startAngle:g,endAngle:g+=s[m*u+x]*d,value:s[m*u+x]}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}else{const v=xl(0,u).filter(x=>s[m*u+x]||s[x*u+m]);i&&v.sort((x,b)=>i(s[m*u+x],s[m*u+b]));for(const x of v){let b;if(m<x?(b=h[m*u+x]||(h[m*u+x]={source:null,target:null}),b.source={index:m,startAngle:g,endAngle:g+=s[m*u+x]*d,value:s[m*u+x]}):(b=h[x*u+m]||(h[x*u+m]={source:null,target:null}),b.target={index:m,startAngle:g,endAngle:g+=s[m*u+x]*d,value:s[m*u+x]},m===x&&(b.source=b.target)),b.source&&b.target&&b.source.value<b.target.value){const w=b.source;b.source=b.target,b.target=w}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}g+=p}}return h=Object.values(h),h.groups=f,o?h.sort(o):h}return a.padAngle=function(s){return arguments.length?(n=h1(0,s),a):n},a.sortGroups=function(s){return arguments.length?(r=s,a):r},a.sortSubgroups=function(s){return arguments.length?(i=s,a):i},a.sortChords=function(s){return arguments.length?(s==null?o=null:(o=BM(s))._=s,a):o&&o._},a}const wl=Math.PI,$l=2*wl,Hn=1e-6,qM=$l-Hn;function d1(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function XM(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return d1;const n=10**e;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let Ki=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?d1:XM(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,a){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,u=r-e,c=i-n,l=a-e,h=s-n,f=l*l+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>Hn)if(!(Math.abs(h*u-c*l)>Hn)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let d=r-a,p=i-s,g=u*u+c*c,m=d*d+p*p,y=Math.sqrt(g),v=Math.sqrt(f),x=o*Math.tan((wl-Math.acos((g+f-m)/(2*y*v)))/2),b=x/v,w=x/y;Math.abs(b-1)>Hn&&this._append`L${e+b*l},${n+b*h}`,this._append`A${o},${o},0,0,${+(h*d>l*p)},${this._x1=e+w*u},${this._y1=n+w*c}`}}arc(e,n,r,i,o,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),c=e+s,l=n+u,h=1^a,f=a?i-o:o-i;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Hn||Math.abs(this._y1-l)>Hn)&&this._append`L${c},${l}`,r&&(f<0&&(f=f%$l+$l),f>qM?this._append`A${r},${r},0,1,${h},${e-s},${n-u}A${r},${r},0,1,${h},${this._x1=c},${this._y1=l}`:f>Hn&&this._append`A${r},${r},0,${+(f>=wl)},${h},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Sl(){return new Ki}Sl.prototype=Ki.prototype;function jM(t=3){return new Ki(+t)}var VM=Array.prototype.slice;function qn(t){return function(){return t}}function ZM(t){return t.source}function KM(t){return t.target}function p1(t){return t.radius}function QM(t){return t.startAngle}function JM(t){return t.endAngle}function t7(){return 0}function e7(){return 10}function g1(t){var e=ZM,n=KM,r=p1,i=p1,o=QM,a=JM,s=t7,u=null;function c(){var l,h=e.apply(this,arguments),f=n.apply(this,arguments),d=s.apply(this,arguments)/2,p=VM.call(arguments),g=+r.apply(this,(p[0]=h,p)),m=o.apply(this,p)-es,y=a.apply(this,p)-es,v=+i.apply(this,(p[0]=f,p)),x=o.apply(this,p)-es,b=a.apply(this,p)-es;if(u||(u=l=Sl()),d>vl&&(c1(y-m)>d*2+vl?y>m?(m+=d,y-=d):(m-=d,y+=d):m=y=(m+y)/2,c1(b-x)>d*2+vl?b>x?(x+=d,b-=d):(x-=d,b+=d):x=b=(x+b)/2),u.moveTo(g*Gr(m),g*zr(m)),u.arc(0,0,g,m,y),m!==x||y!==b)if(t){var w=+t.apply(this,arguments),$=v-w,A=(x+b)/2;u.quadraticCurveTo(0,0,$*Gr(x),$*zr(x)),u.lineTo(v*Gr(A),v*zr(A)),u.lineTo($*Gr(b),$*zr(b))}else u.quadraticCurveTo(0,0,v*Gr(x),v*zr(x)),u.arc(0,0,v,x,b);if(u.quadraticCurveTo(0,0,g*Gr(m),g*zr(m)),u.closePath(),l)return u=null,l+""||null}return t&&(c.headRadius=function(l){return arguments.length?(t=typeof l=="function"?l:qn(+l),c):t}),c.radius=function(l){return arguments.length?(r=i=typeof l=="function"?l:qn(+l),c):r},c.sourceRadius=function(l){return arguments.length?(r=typeof l=="function"?l:qn(+l),c):r},c.targetRadius=function(l){return arguments.length?(i=typeof l=="function"?l:qn(+l),c):i},c.startAngle=function(l){return arguments.length?(o=typeof l=="function"?l:qn(+l),c):o},c.endAngle=function(l){return arguments.length?(a=typeof l=="function"?l:qn(+l),c):a},c.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:qn(+l),c):s},c.source=function(l){return arguments.length?(e=l,c):e},c.target=function(l){return arguments.length?(n=l,c):n},c.context=function(l){return arguments.length?(u=l??null,c):u},c}function n7(){return g1()}function r7(){return g1(e7)}var i7=Array.prototype,m1=i7.slice;function o7(t,e){return t-e}function a7(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}const gn=t=>()=>t;function s7(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=u7(t,e[n]))return i;return 0}function u7(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,s=a-1;o<a;s=o++){var u=t[o],c=u[0],l=u[1],h=t[s],f=h[0],d=h[1];if(c7(u,h,e))return 0;l>r!=d>r&&n<(f-c)*(r-l)/(d-l)+c&&(i=-i)}return i}function c7(t,e,n){var r;return l7(t,e,n)&&f7(t[r=+(t[0]===e[0])],n[r],e[r])}function l7(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function f7(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function h7(){}var Ze=[[],[[[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 Al(){var t=1,e=1,n=Tc,r=u;function i(c){var l=n(c);if(Array.isArray(l))l=l.slice().sort(o7);else{const h=Li(c,d7);for(l=In(...Mc(h[0],h[1],l),l);l[l.length-1]>=h[1];)l.pop();for(;l[1]<h[0];)l.shift()}return l.map(h=>o(c,h))}function o(c,l){const h=l==null?NaN:+l;if(isNaN(h))throw new Error(`invalid value: ${l}`);var f=[],d=[];return a(c,h,function(p){r(p,c,h),a7(p)>0?f.push([p]):d.push(p)}),d.forEach(function(p){for(var g=0,m=f.length,y;g<m;++g)if(s7((y=f[g])[0],p)!==-1){y.push(p);return}}),{type:"MultiPolygon",value:l,coordinates:f}}function a(c,l,h){var f=new Array,d=new Array,p,g,m,y,v,x;for(p=g=-1,y=Xn(c[0],l),Ze[y<<1].forEach(b);++p<t-1;)m=y,y=Xn(c[p+1],l),Ze[m|y<<1].forEach(b);for(Ze[y<<0].forEach(b);++g<e-1;){for(p=-1,y=Xn(c[g*t+t],l),v=Xn(c[g*t],l),Ze[y<<1|v<<2].forEach(b);++p<t-1;)m=y,y=Xn(c[g*t+t+p+1],l),x=v,v=Xn(c[g*t+p+1],l),Ze[m|y<<1|v<<2|x<<3].forEach(b);Ze[y|v<<3].forEach(b)}for(p=-1,v=c[g*t]>=l,Ze[v<<2].forEach(b);++p<t-1;)x=v,v=Xn(c[g*t+p+1],l),Ze[v<<2|x<<3].forEach(b);Ze[v<<3].forEach(b);function b(w){var $=[w[0][0]+p,w[0][1]+g],A=[w[1][0]+p,w[1][1]+g],_=s($),L=s(A),E,T;(E=d[_])?(T=f[L])?(delete d[E.end],delete f[T.start],E===T?(E.ring.push(A),h(E.ring)):f[E.start]=d[T.end]={start:E.start,end:T.end,ring:E.ring.concat(T.ring)}):(delete d[E.end],E.ring.push(A),d[E.end=L]=E):(E=f[L])?(T=d[_])?(delete f[E.start],delete d[T.end],E===T?(E.ring.push(A),h(E.ring)):f[T.start]=d[E.end]={start:T.start,end:E.end,ring:T.ring.concat(E.ring)}):(delete f[E.start],E.ring.unshift($),f[E.start=_]=E):f[_]=d[L]={start:_,end:L,ring:[$,A]}}}function s(c){return c[0]*2+c[1]*(t+1)*4}function u(c,l,h){c.forEach(function(f){var d=f[0],p=f[1],g=d|0,m=p|0,y=Ml(l[m*t+g]);d>0&&d<t&&g===d&&(f[0]=y1(d,Ml(l[m*t+g-1]),y,h)),p>0&&p<e&&m===p&&(f[1]=y1(p,Ml(l[(m-1)*t+g]),y,h))})}return i.contour=o,i.size=function(c){if(!arguments.length)return[t,e];var l=Math.floor(c[0]),h=Math.floor(c[1]);if(!(l>=0&&h>=0))throw new Error("invalid size");return t=l,e=h,i},i.thresholds=function(c){return arguments.length?(n=typeof c=="function"?c:Array.isArray(c)?gn(m1.call(c)):gn(c),i):n},i.smooth=function(c){return arguments.length?(r=c?u:h7,i):r===u},i}function d7(t){return isFinite(t)?t:NaN}function Xn(t,e){return t==null?!1:+t>=e}function Ml(t){return t==null||isNaN(t=+t)?-1/0:t}function y1(t,e,n,r){const i=r-e,o=n-e,a=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(a)?t:t+a-.5}function p7(t){return t[0]}function g7(t){return t[1]}function m7(){return 1}function y7(){var t=p7,e=g7,n=m7,r=960,i=500,o=20,a=2,s=o*3,u=r+s*2>>a,c=i+s*2>>a,l=gn(20);function h(v){var x=new Float32Array(u*c),b=Math.pow(2,-a),w=-1;for(const P of v){var $=(t(P,++w,v)+s)*b,A=(e(P,w,v)+s)*b,_=+n(P,w,v);if(_&&$>=0&&$<u&&A>=0&&A<c){var L=Math.floor($),E=Math.floor(A),T=$-L-.5,I=A-E-.5;x[L+E*u]+=(1-T)*(1-I)*_,x[L+1+E*u]+=T*(1-I)*_,x[L+1+(E+1)*u]+=T*I*_,x[L+(E+1)*u]+=(1-T)*I*_}}return hg({data:x,width:u,height:c},o*b),x}function f(v){var x=h(v),b=l(x),w=Math.pow(2,2*a);return Array.isArray(b)||(b=In(Number.MIN_VALUE,ki(x)/w,b)),Al().size([u,c]).thresholds(b.map($=>$*w))(x).map(($,A)=>($.value=+b[A],d($)))}f.contours=function(v){var x=h(v),b=Al().size([u,c]),w=Math.pow(2,2*a),$=A=>{A=+A;var _=d(b.contour(x,A*w));return _.value=A,_};return Object.defineProperty($,"max",{get:()=>ki(x)/w}),$};function d(v){return v.coordinates.forEach(p),v}function p(v){v.forEach(g)}function g(v){v.forEach(m)}function m(v){v[0]=v[0]*Math.pow(2,a)-s,v[1]=v[1]*Math.pow(2,a)-s}function y(){return s=o*3,u=r+s*2>>a,c=i+s*2>>a,f}return f.x=function(v){return arguments.length?(t=typeof v=="function"?v:gn(+v),f):t},f.y=function(v){return arguments.length?(e=typeof v=="function"?v:gn(+v),f):e},f.weight=function(v){return arguments.length?(n=typeof v=="function"?v:gn(+v),f):n},f.size=function(v){if(!arguments.length)return[r,i];var x=+v[0],b=+v[1];if(!(x>=0&&b>=0))throw new Error("invalid size");return r=x,i=b,y()},f.cellSize=function(v){if(!arguments.length)return 1<<a;if(!((v=+v)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(v)/Math.LN2),y()},f.thresholds=function(v){return arguments.length?(l=typeof v=="function"?v:Array.isArray(v)?gn(m1.call(v)):gn(v),f):l},f.bandwidth=function(v){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((v=+v)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*v*v+1)-1)/2,y()},f}const Ke=11102230246251565e-32,Ot=134217729,b7=(3+8*Ke)*Ke;function Tl(t,e,n,r,i){let o,a,s,u,c=e[0],l=r[0],h=0,f=0;l>c==l>-c?(o=c,c=e[++h]):(o=l,l=r[++f]);let d=0;if(h<t&&f<n)for(l>c==l>-c?(a=c+o,s=o-(a-c),c=e[++h]):(a=l+o,s=o-(a-l),l=r[++f]),o=a,s!==0&&(i[d++]=s);h<t&&f<n;)l>c==l>-c?(a=o+c,u=a-o,s=o-(a-u)+(c-u),c=e[++h]):(a=o+l,u=a-o,s=o-(a-u)+(l-u),l=r[++f]),o=a,s!==0&&(i[d++]=s);for(;h<t;)a=o+c,u=a-o,s=o-(a-u)+(c-u),c=e[++h],o=a,s!==0&&(i[d++]=s);for(;f<n;)a=o+l,u=a-o,s=o-(a-u)+(l-u),l=r[++f],o=a,s!==0&&(i[d++]=s);return(o!==0||d===0)&&(i[d++]=o),d}function v7(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function Qi(t){return new Float64Array(t)}const x7=(3+16*Ke)*Ke,_7=(2+12*Ke)*Ke,w7=(9+64*Ke)*Ke*Ke,Or=Qi(4),b1=Qi(8),v1=Qi(12),x1=Qi(16),Wt=Qi(4);function $7(t,e,n,r,i,o,a){let s,u,c,l,h,f,d,p,g,m,y,v,x,b,w,$,A,_;const L=t-i,E=n-i,T=e-o,I=r-o;b=L*I,f=Ot*L,d=f-(f-L),p=L-d,f=Ot*I,g=f-(f-I),m=I-g,w=p*m-(b-d*g-p*g-d*m),$=T*E,f=Ot*T,d=f-(f-T),p=T-d,f=Ot*E,g=f-(f-E),m=E-g,A=p*m-($-d*g-p*g-d*m),y=w-A,h=w-y,Or[0]=w-(y+h)+(h-A),v=b+y,h=v-b,x=b-(v-h)+(y-h),y=x-$,h=x-y,Or[1]=x-(y+h)+(h-$),_=v+y,h=_-v,Or[2]=v-(_-h)+(y-h),Or[3]=_;let P=v7(4,Or),D=_7*a;if(P>=D||-P>=D||(h=t-L,s=t-(L+h)+(h-i),h=n-E,c=n-(E+h)+(h-i),h=e-T,u=e-(T+h)+(h-o),h=r-I,l=r-(I+h)+(h-o),s===0&&u===0&&c===0&&l===0)||(D=w7*a+b7*Math.abs(P),P+=L*l+I*s-(T*c+E*u),P>=D||-P>=D))return P;b=s*I,f=Ot*s,d=f-(f-s),p=s-d,f=Ot*I,g=f-(f-I),m=I-g,w=p*m-(b-d*g-p*g-d*m),$=u*E,f=Ot*u,d=f-(f-u),p=u-d,f=Ot*E,g=f-(f-E),m=E-g,A=p*m-($-d*g-p*g-d*m),y=w-A,h=w-y,Wt[0]=w-(y+h)+(h-A),v=b+y,h=v-b,x=b-(v-h)+(y-h),y=x-$,h=x-y,Wt[1]=x-(y+h)+(h-$),_=v+y,h=_-v,Wt[2]=v-(_-h)+(y-h),Wt[3]=_;const C=Tl(4,Or,4,Wt,b1);b=L*l,f=Ot*L,d=f-(f-L),p=L-d,f=Ot*l,g=f-(f-l),m=l-g,w=p*m-(b-d*g-p*g-d*m),$=T*c,f=Ot*T,d=f-(f-T),p=T-d,f=Ot*c,g=f-(f-c),m=c-g,A=p*m-($-d*g-p*g-d*m),y=w-A,h=w-y,Wt[0]=w-(y+h)+(h-A),v=b+y,h=v-b,x=b-(v-h)+(y-h),y=x-$,h=x-y,Wt[1]=x-(y+h)+(h-$),_=v+y,h=_-v,Wt[2]=v-(_-h)+(y-h),Wt[3]=_;const S=Tl(C,b1,4,Wt,v1);b=s*l,f=Ot*s,d=f-(f-s),p=s-d,f=Ot*l,g=f-(f-l),m=l-g,w=p*m-(b-d*g-p*g-d*m),$=u*c,f=Ot*u,d=f-(f-u),p=u-d,f=Ot*c,g=f-(f-c),m=c-g,A=p*m-($-d*g-p*g-d*m),y=w-A,h=w-y,Wt[0]=w-(y+h)+(h-A),v=b+y,h=v-b,x=b-(v-h)+(y-h),y=x-$,h=x-y,Wt[1]=x-(y+h)+(h-$),_=v+y,h=_-v,Wt[2]=v-(_-h)+(y-h),Wt[3]=_;const R=Tl(S,v1,4,Wt,x1);return x1[R-1]}function ns(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),u=a-s,c=Math.abs(a+s);return Math.abs(u)>=x7*c?u:-$7(t,e,n,r,i,o,c)}const _1=Math.pow(2,-52),rs=new Uint32Array(512);class is{static from(e,n=P7,r=D7){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const s=e[a];o[2*a]=n(s),o[2*a+1]=r(s)}return new is(o)}constructor(e){const n=e.length>>1;if(n>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),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),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:e,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=e.length>>1;let s=1/0,u=1/0,c=-1/0,l=-1/0;for(let L=0;L<a;L++){const E=e[2*L],T=e[2*L+1];E<s&&(s=E),T<u&&(u=T),E>c&&(c=E),T>l&&(l=T),this._ids[L]=L}const h=(s+c)/2,f=(u+l)/2;let d,p,g;for(let L=0,E=1/0;L<a;L++){const T=Pl(h,f,e[2*L],e[2*L+1]);T<E&&(d=L,E=T)}const m=e[2*d],y=e[2*d+1];for(let L=0,E=1/0;L<a;L++){if(L===d)continue;const T=Pl(m,y,e[2*L],e[2*L+1]);T<E&&T>0&&(p=L,E=T)}let v=e[2*p],x=e[2*p+1],b=1/0;for(let L=0;L<a;L++){if(L===d||L===p)continue;const E=M7(m,y,v,x,e[2*L],e[2*L+1]);E<b&&(g=L,b=E)}let w=e[2*g],$=e[2*g+1];if(b===1/0){for(let T=0;T<a;T++)this._dists[T]=e[2*T]-e[0]||e[2*T+1]-e[1];Ur(this._ids,this._dists,0,a-1);const L=new Uint32Array(a);let E=0;for(let T=0,I=-1/0;T<a;T++){const P=this._ids[T],D=this._dists[P];D>I&&(L[E++]=P,I=D)}this.hull=L.subarray(0,E),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(ns(m,y,v,x,w,$)<0){const L=p,E=v,T=x;p=g,v=w,x=$,g=L,w=E,$=T}const A=T7(m,y,v,x,w,$);this._cx=A.x,this._cy=A.y;for(let L=0;L<a;L++)this._dists[L]=Pl(e[2*L],e[2*L+1],A.x,A.y);Ur(this._ids,this._dists,0,a-1),this._hullStart=d;let _=3;r[d]=n[g]=p,r[p]=n[d]=g,r[g]=n[p]=d,i[d]=0,i[p]=1,i[g]=2,o.fill(-1),o[this._hashKey(m,y)]=d,o[this._hashKey(v,x)]=p,o[this._hashKey(w,$)]=g,this.trianglesLen=0,this._addTriangle(d,p,g,-1,-1,-1);for(let L=0,E,T;L<this._ids.length;L++){const I=this._ids[L],P=e[2*I],D=e[2*I+1];if(L>0&&Math.abs(P-E)<=_1&&Math.abs(D-T)<=_1||(E=P,T=D,I===d||I===p||I===g))continue;let C=0;for(let N=0,z=this._hashKey(P,D);N<this._hashSize&&(C=o[(z+N)%this._hashSize],!(C!==-1&&C!==r[C]));N++);C=n[C];let S=C,R;for(;R=r[S],ns(P,D,e[2*S],e[2*S+1],e[2*R],e[2*R+1])>=0;)if(S=R,S===C){S=-1;break}if(S===-1)continue;let G=this._addTriangle(S,I,r[S],-1,-1,i[S]);i[I]=this._legalize(G+2),i[S]=G,_++;let M=r[S];for(;R=r[M],ns(P,D,e[2*M],e[2*M+1],e[2*R],e[2*R+1])<0;)G=this._addTriangle(M,I,R,i[I],-1,i[M]),i[I]=this._legalize(G+2),r[M]=M,_--,M=R;if(S===C)for(;R=n[S],ns(P,D,e[2*R],e[2*R+1],e[2*S],e[2*S+1])<0;)G=this._addTriangle(R,I,S,-1,i[S],i[R]),this._legalize(G+2),i[R]=G,r[S]=S,_--,S=R;this._hullStart=n[I]=S,r[S]=n[M]=I,r[I]=M,o[this._hashKey(P,D)]=I,o[this._hashKey(e[2*S],e[2*S+1])]=S}this.hull=new Uint32Array(_);for(let L=0,E=this._hullStart;L<_;L++)this.hull[L]=E,E=r[E];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(S7(e-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const s=r[e],u=e-e%3;if(a=u+(e+2)%3,s===-1){if(o===0)break;e=rs[--o];continue}const c=s-s%3,l=u+(e+1)%3,h=c+(s+2)%3,f=n[a],d=n[e],p=n[l],g=n[h];if(A7(i[2*f],i[2*f+1],i[2*d],i[2*d+1],i[2*p],i[2*p+1],i[2*g],i[2*g+1])){n[e]=g,n[s]=f;const y=r[h];if(y===-1){let x=this._hullStart;do{if(this._hullTri[x]===h){this._hullTri[x]=e;break}x=this._hullPrev[x]}while(x!==this._hullStart)}this._link(e,y),this._link(s,r[a]),this._link(a,h);const v=c+(s+1)%3;o<rs.length&&(rs[o++]=v)}else{if(o===0)break;e=rs[--o]}}return a}_link(e,n){this._halfedges[e]=n,n!==-1&&(this._halfedges[n]=e)}_addTriangle(e,n,r,i,o,a){const s=this.trianglesLen;return this._triangles[s]=e,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,o),this._link(s+2,a),this.trianglesLen+=3,s}}function S7(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Pl(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function A7(t,e,n,r,i,o,a,s){const u=t-a,c=e-s,l=n-a,h=r-s,f=i-a,d=o-s,p=u*u+c*c,g=l*l+h*h,m=f*f+d*d;return u*(h*m-g*d)-c*(l*m-g*f)+p*(l*d-h*f)<0}function M7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,c=o-e,l=a*a+s*s,h=u*u+c*c,f=.5/(a*c-s*u),d=(c*l-s*h)*f,p=(a*h-u*l)*f;return d*d+p*p}function T7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,c=o-e,l=a*a+s*s,h=u*u+c*c,f=.5/(a*c-s*u),d=t+(c*l-s*h)*f,p=e+(a*h-u*l)*f;return{x:d,y:p}}function Ur(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const o=t[i],a=e[o];let s=i-1;for(;s>=n&&e[t[s]]>a;)t[s+1]=t[s--];t[s+1]=o}else{const i=n+r>>1;let o=n+1,a=r;Ji(t,i,o),e[t[n]]>e[t[r]]&&Ji(t,n,r),e[t[o]]>e[t[r]]&&Ji(t,o,r),e[t[n]]>e[t[o]]&&Ji(t,n,o);const s=t[o],u=e[s];for(;;){do o++;while(e[t[o]]<u);do a--;while(e[t[a]]>u);if(a<o)break;Ji(t,o,a)}t[n+1]=t[a],t[a]=s,r-o+1>=a-n?(Ur(t,e,o,r),Ur(t,e,n,a-1)):(Ur(t,e,n,a-1),Ur(t,e,o,r))}}function Ji(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function P7(t){return t[0]}function D7(t){return t[1]}const w1=1e-6;class jn{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,n){this._+=`L${this._x1=+e},${this._y1=+n}`}arc(e,n,r){e=+e,n=+n,r=+r;const i=e+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>w1||Math.abs(this._y1-o)>w1)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${e-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(e,n,r,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class Dl{constructor(){this._=[]}moveTo(e,n){this._.push([e,n])}closePath(){this._.push(this._[0].slice())}lineTo(e,n){this._.push([e,n])}value(){return this._.length?this._:null}}class $1{constructor(e,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:n,triangles:r},vectors:i}=this;let o,a;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let g=0,m=0,y=r.length,v,x;g<y;g+=3,m+=2){const b=r[g]*2,w=r[g+1]*2,$=r[g+2]*2,A=e[b],_=e[b+1],L=e[w],E=e[w+1],T=e[$],I=e[$+1],P=L-A,D=E-_,C=T-A,S=I-_,R=(P*S-D*C)*2;if(Math.abs(R)<1e-9){if(o===void 0){o=a=0;for(const M of n)o+=e[M*2],a+=e[M*2+1];o/=n.length,a/=n.length}const G=1e9*Math.sign((o-A)*S-(a-_)*C);v=(A+T)/2-G*S,x=(_+I)/2+G*C}else{const G=1/R,M=P*P+D*D,N=C*C+S*S;v=A+(S*M-D*N)*G,x=_+(P*N-C*M)*G}s[m]=v,s[m+1]=x}let u=n[n.length-1],c,l=u*4,h,f=e[2*u],d,p=e[2*u+1];i.fill(0);for(let g=0;g<n.length;++g)u=n[g],c=l,h=f,d=p,l=u*4,f=e[2*u],p=e[2*u+1],i[c+2]=i[l]=d-p,i[c+3]=i[l+1]=f-h}render(e){const n=e==null?e=new jn:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let l=0,h=r.length;l<h;++l){const f=r[l];if(f<l)continue;const d=Math.floor(l/3)*2,p=Math.floor(f/3)*2,g=a[d],m=a[d+1],y=a[p],v=a[p+1];this._renderSegment(g,m,y,v,e)}let u,c=o[o.length-1];for(let l=0;l<o.length;++l){u=c,c=o[l];const h=Math.floor(i[c]/3)*2,f=a[h],d=a[h+1],p=u*4,g=this._project(f,d,s[p+2],s[p+3]);g&&this._renderSegment(f,d,g[0],g[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new jn:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(e,n){const r=n==null?n=new jn:void 0,i=this._clip(e);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let n=0,r=e.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(e){const n=new Dl;return this.renderCell(e,n),n.value()}_renderSegment(e,n,r,i,o){let a;const s=this._regioncode(e,n),u=this._regioncode(r,i);s===0&&u===0?(o.moveTo(e,n),o.lineTo(r,i)):(a=this._clipSegment(e,n,r,i,s,u))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(e,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(e,n,r)===e}*neighbors(e){const n=this._clip(e);if(n)for(const r of this.delaunay.neighbors(e)){const i=this._clip(r);if(i){t:for(let o=0,a=n.length;o<a;o+=2)for(let s=0,u=i.length;s<u;s+=2)if(n[o]===i[s]&&n[o+1]===i[s+1]&&n[(o+2)%a]===i[(s+u-2)%u]&&n[(o+3)%a]===i[(s+u-1)%u]){yield r;break t}}}}_cell(e){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[e];if(a===-1)return null;const s=[];let u=a;do{const c=Math.floor(u/3);if(s.push(n[c*2],n[c*2+1]),u=u%3===2?u-2:u+1,o[u]!==e)break;u=i[u]}while(u!==a&&u!==-1);return s}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(e);if(n===null)return null;const{vectors:r}=this,i=e*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(e,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(e,n))}_clipFinite(e,n){const r=n.length;let i=null,o,a,s=n[r-2],u=n[r-1],c,l=this._regioncode(s,u),h,f=0;for(let d=0;d<r;d+=2)if(o=s,a=u,s=n[d],u=n[d+1],c=l,l=this._regioncode(s,u),c===0&&l===0)h=f,f=0,i?i.push(s,u):i=[s,u];else{let p,g,m,y,v;if(c===0){if((p=this._clipSegment(o,a,s,u,c,l))===null)continue;[g,m,y,v]=p}else{if((p=this._clipSegment(s,u,o,a,l,c))===null)continue;[y,v,g,m]=p,h=f,f=this._edgecode(g,m),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(g,m):i=[g,m]}h=f,f=this._edgecode(y,v),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(y,v):i=[y,v]}if(i)h=f,f=this._edgecode(i[0],i[1]),h&&f&&this._edge(e,h,f,i,i.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(e,n,r,i,o,a){const s=o<a;for(s&&([e,n,r,i,o,a]=[r,i,e,n,a,o]);;){if(o===0&&a===0)return s?[r,i,e,n]:[e,n,r,i];if(o&a)return null;let u,c,l=o||a;l&8?(u=e+(r-e)*(this.ymax-n)/(i-n),c=this.ymax):l&4?(u=e+(r-e)*(this.ymin-n)/(i-n),c=this.ymin):l&2?(c=n+(i-n)*(this.xmax-e)/(r-e),u=this.xmax):(c=n+(i-n)*(this.xmin-e)/(r-e),u=this.xmin),o?(e=u,n=c,o=this._regioncode(e,n)):(r=u,i=c,a=this._regioncode(r,i))}}_clipInfinite(e,n,r,i,o,a){let s=Array.from(n),u;if((u=this._project(s[0],s[1],r,i))&&s.unshift(u[0],u[1]),(u=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(u[0],u[1]),s=this._clipFinite(e,s))for(let c=0,l=s.length,h,f=this._edgecode(s[l-2],s[l-1]);c<l;c+=2)h=f,f=this._edgecode(s[c],s[c+1]),h&&f&&(c=this._edge(e,h,f,s,c),l=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,n,r,i,o){for(;n!==r;){let a,s;switch(n){case 5:n=4;continue;case 4:n=6,a=this.xmax,s=this.ymin;break;case 6:n=2;continue;case 2:n=10,a=this.xmax,s=this.ymax;break;case 10:n=8;continue;case 8:n=9,a=this.xmin,s=this.ymax;break;case 9:n=1;continue;case 1:n=5,a=this.xmin,s=this.ymin;break}(i[o]!==a||i[o+1]!==s)&&this.contains(e,a,s)&&(i.splice(o,0,a,s),o+=2)}return o}_project(e,n,r,i){let o=1/0,a,s,u;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(u=this.ymin,s=e+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(u=this.ymax,s=e+(o=a)*r)}if(r>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/r)<o&&(s=this.xmax,u=n+(o=a)*i)}else if(r<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/r)<o&&(s=this.xmin,u=n+(o=a)*i)}return[s,u]}_edgecode(e,n){return(e===this.xmin?1:e===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(e,n){return(e<this.xmin?1:e>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let n=0;n<e.length;n+=2){const r=(n+2)%e.length,i=(n+4)%e.length;(e[n]===e[r]&&e[r]===e[i]||e[n+1]===e[r+1]&&e[r+1]===e[i+1])&&(e.splice(r,2),n-=2)}e.length||(e=null)}return e}}const L7=2*Math.PI,Br=Math.pow;function E7(t){return t[0]}function k7(t){return t[1]}function C7(t){const{triangles:e,coords:n}=t;for(let r=0;r<e.length;r+=3){const i=2*e[r],o=2*e[r+1],a=2*e[r+2];if((n[a]-n[i])*(n[o+1]-n[i+1])-(n[o]-n[i])*(n[a+1]-n[i+1])>1e-10)return!1}return!0}function I7(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Ll{static from(e,n=E7,r=k7,i){return new Ll("length"in e?R7(e,n,r,i):Float64Array.from(N7(e,n,r,i)))}constructor(e){this._delaunator=new is(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,n=this.points;if(e.hull&&e.hull.length>2&&C7(e)){this.collinear=Int32Array.from({length:n.length/2},(f,d)=>d).sort((f,d)=>n[2*f]-n[2*d]||n[2*f+1]-n[2*d+1]);const u=this.collinear[0],c=this.collinear[this.collinear.length-1],l=[n[2*u],n[2*u+1],n[2*c],n[2*c+1]],h=1e-8*Math.hypot(l[3]-l[1],l[2]-l[0]);for(let f=0,d=n.length/2;f<d;++f){const p=I7(n[2*f],n[2*f+1],h);n[2*f]=p[0],n[2*f+1]=p[1]}this._delaunator=new is(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let u=0,c=r.length;u<c;++u){const l=o[u%3===2?u-2:u+1];(r[u]===-1||a[l]===-1)&&(a[l]=u)}for(let u=0,c=i.length;u<c;++u)s[i[u]]=u;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new $1(this,e)}*neighbors(e){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:s}=this;if(s){const h=s.indexOf(e);h>0&&(yield s[h-1]),h<s.length-1&&(yield s[h+1]);return}const u=n[e];if(u===-1)return;let c=u,l=-1;do{if(yield l=a[c],c=c%3===2?c-2:c+1,a[c]!==e)return;if(c=o[c],c===-1){const h=r[(i[e]+1)%r.length];h!==l&&(yield h);return}}while(c!==u)}find(e,n,r=0){if(e=+e,e!==e||(n=+n,n!==n))return-1;const i=r;let o;for(;(o=this._step(r,e,n))>=0&&o!==r&&o!==i;)r=o;return o}_step(e,n,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:s,triangles:u,points:c}=this;if(i[e]===-1||!c.length)return(e+1)%(c.length>>1);let l=e,h=Br(n-c[e*2],2)+Br(r-c[e*2+1],2);const f=i[e];let d=f;do{let p=u[d];const g=Br(n-c[p*2],2)+Br(r-c[p*2+1],2);if(g<h&&(h=g,l=p),d=d%3===2?d-2:d+1,u[d]!==e)break;if(d=s[d],d===-1){if(d=o[(a[e]+1)%o.length],d!==p&&Br(n-c[d*2],2)+Br(r-c[d*2+1],2)<h)return d;break}}while(d!==f);return l}render(e){const n=e==null?e=new jn:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,s=i.length;a<s;++a){const u=i[a];if(u<a)continue;const c=o[a]*2,l=o[u]*2;e.moveTo(r[c],r[c+1]),e.lineTo(r[l],r[l+1])}return this.renderHull(e),n&&n.value()}renderPoints(e,n){n===void 0&&(!e||typeof e.moveTo!="function")&&(n=e,e=null),n=n==null?2:+n;const r=e==null?e=new jn:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const s=i[o],u=i[o+1];e.moveTo(s+n,u),e.arc(s,u,n,0,L7)}return r&&r.value()}renderHull(e){const n=e==null?e=new jn:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;e.moveTo(i[o],i[o+1]);for(let s=1;s<a;++s){const u=2*r[s];e.lineTo(i[u],i[u+1])}return e.closePath(),n&&n.value()}hullPolygon(){const e=new Dl;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new jn:void 0,{points:i,triangles:o}=this,a=o[e*=3]*2,s=o[e+1]*2,u=o[e+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[u],i[u+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:e}=this;for(let n=0,r=e.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(e){const n=new Dl;return this.renderTriangle(e,n),n.value()}}function R7(t,e,n,r){const i=t.length,o=new Float64Array(i*2);for(let a=0;a<i;++a){const s=t[a];o[a*2]=e.call(r,s,a,t),o[a*2+1]=n.call(r,s,a,t)}return o}function*N7(t,e,n,r){let i=0;for(const o of t)yield e.call(r,o,i,t),yield n.call(r,o,i,t),++i}var S1={},El={},kl=34,to=10,Cl=13;function A1(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function F7(t,e){var n=A1(t);return function(r,i){return e(n(r),i,t)}}function M1(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var i in r)i in e||n.push(e[i]=i)}),n}function ne(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function G7(t){return t<0?"-"+ne(-t,6):t>9999?"+"+ne(t,6):ne(t,4)}function z7(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":G7(t.getUTCFullYear())+"-"+ne(t.getUTCMonth()+1,2)+"-"+ne(t.getUTCDate(),2)+(i?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"."+ne(i,3)+"Z":r?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"Z":n||e?"T"+ne(e,2)+":"+ne(n,2)+"Z":"")}function os(t){var e=new RegExp('["'+t+`
|
6
|
-
\r]`),n=t.charCodeAt(0);function r(h,f){var d,p,g=i(h,function(m,y){if(d)return d(m,y-1);p=m,d=f?
|
7
|
-
`)}function s(h,f){return f==null&&(f=
|
5
|
+
`):"",this.name="UnsubscriptionError",this.errors=e}});function fa(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Si=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=_r(a),u=s.next();!u.done;u=s.next()){var c=u.value;c.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(Pt(l))try{l()}catch(g){o=g instanceof pc?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=_r(h),d=f.next();!d.done;d=f.next()){var p=d.value;try{Rp(p)}catch(g){o=o??[],g instanceof pc?o=$i($i([],wi(o)),wi(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new pc(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Rp(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&fa(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&fa(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Cp=Si.EMPTY;function Ip(t){return t instanceof Si||t&&"closed"in t&&Pt(t.remove)&&Pt(t.add)&&Pt(t.unsubscribe)}function Rp(t){Pt(t)?t():t.unsubscribe()}var Np={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},L3={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,$i([t,e],wi(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Fp(t){L3.setTimeout(function(){throw t})}function gc(){}function ha(t){t()}var mc=function(t){Xe(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Ip(n)&&n.add(r)):r.destination=I3,r}return e.create=function(n,r,i){return new Ai(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Si),E3=Function.prototype.bind;function yc(t,e){return E3.call(t,e)}var k3=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){da(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){da(r)}else da(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){da(n)}},t}(),Ai=function(t){Xe(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Pt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Np.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&yc(n.next,s),error:n.error&&yc(n.error,s),complete:n.complete&&yc(n.complete,s)}):a=n}return o.destination=new k3(a),o}return e}(mc);function da(t){Fp(t)}function C3(t){throw t}var I3={closed:!0,next:gc,error:C3,complete:gc},bc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Gp(t){return t}function R3(t){return t.length===0?Gp:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var $e=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=F3(e)?e:new Ai(e,n,r);return ha(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=zp(n),new n(function(i,o){var a=new Ai({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[bc]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return R3(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=zp(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function zp(t){var e;return(e=t??Np.Promise)!==null&&e!==void 0?e:Promise}function N3(t){return t&&Pt(t.next)&&Pt(t.error)&&Pt(t.complete)}function F3(t){return t&&t instanceof mc||N3(t)&&Ip(t)}function G3(t){return Pt(t==null?void 0:t.lift)}function Ln(t){return function(e){if(G3(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Mi(t,e,n,r,i){return new z3(t,e,n,r,i)}var z3=function(t){Xe(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(c){try{r(c)}catch(l){n.error(l)}}:t.prototype._next,u._error=o?function(c){try{o(c)}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(mc),O3=dc(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ti=function(t){Xe(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new Op(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new O3},e.prototype.next=function(n){var r=this;ha(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=_r(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;ha(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;ha(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?Cp:(this.currentObservers=null,s.push(n),new Si(function(){r.currentObservers=null,fa(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new $e;return n.source=this,n},e.create=function(n,r){return new Op(n,r)},e}($e),Op=function(t){Xe(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Cp},e}(Ti),vc={now:function(){return(vc.delegate||Date).now()},delegate:void 0},U3=function(t){Xe(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=vc);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),c=0,l=1;l<o.length&&o[l]<=u;l+=2)c=l;c&&o.splice(0,c+1)}},e}(Ti),B3=function(t){Xe(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(Si),Up={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,$i([t,e],wi(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},Y3=function(t){Xe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),Up.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Up.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,fa(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(B3),Bp=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=vc.now,t}(),H3=function(t){Xe(e,t);function e(n,r){r===void 0&&(r=Bp.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(Bp);new H3(Y3);function W3(t){return t&&Pt(t.schedule)}function q3(t){return t[t.length-1]}function Yp(t){return W3(q3(t))?t.pop():void 0}var Hp=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Wp(t){return Pt(t==null?void 0:t.then)}function qp(t){return Pt(t[bc])}function Xp(t){return Symbol.asyncIterator&&Pt(t==null?void 0:t[Symbol.asyncIterator])}function jp(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function X3(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Vp=X3();function Zp(t){return Pt(t==null?void 0:t[Vp])}function Kp(t){return P3(this,arguments,function(){var e,n,r,i;return kp(this,function(o){switch(o.label){case 0:e=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,wr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,wr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,wr(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Qp(t){return Pt(t==null?void 0:t.getReader)}function ln(t){if(t instanceof $e)return t;if(t!=null){if(qp(t))return j3(t);if(Hp(t))return V3(t);if(Wp(t))return Z3(t);if(Xp(t))return Jp(t);if(Zp(t))return K3(t);if(Qp(t))return Q3(t)}throw jp(t)}function j3(t){return new $e(function(e){var n=t[bc]();if(Pt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function V3(t){return new $e(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Z3(t){return new $e(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Fp)})}function K3(t){return new $e(function(e){var n,r;try{for(var i=_r(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Jp(t){return new $e(function(e){J3(t,e).catch(function(n){return e.error(n)})})}function Q3(t){return Jp(Kp(t))}function J3(t,e){var n,r,i,o;return T3(this,void 0,void 0,function(){var a,s;return kp(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=D3(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function En(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function tg(t,e){return e===void 0&&(e=0),Ln(function(n,r){n.subscribe(Mi(r,function(i){return En(r,t,function(){return r.next(i)},e)},function(){return En(r,t,function(){return r.complete()},e)},function(i){return En(r,t,function(){return r.error(i)},e)}))})}function eg(t,e){return e===void 0&&(e=0),Ln(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function tA(t,e){return ln(t).pipe(eg(e),tg(e))}function eA(t,e){return ln(t).pipe(eg(e),tg(e))}function nA(t,e){return new $e(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function rA(t,e){return new $e(function(n){var r;return En(n,e,function(){r=t[Vp](),En(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return Pt(r==null?void 0:r.return)&&r.return()}})}function ng(t,e){if(!t)throw new Error("Iterable cannot be null");return new $e(function(n){En(n,e,function(){var r=t[Symbol.asyncIterator]();En(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function iA(t,e){return ng(Kp(t),e)}function oA(t,e){if(t!=null){if(qp(t))return tA(t,e);if(Hp(t))return nA(t,e);if(Wp(t))return eA(t,e);if(Xp(t))return ng(t,e);if(Zp(t))return rA(t,e);if(Qp(t))return iA(t,e)}throw jp(t)}function aA(t,e){return e?oA(t,e):ln(t)}dc(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function rg(t,e){return Ln(function(n,r){var i=0;n.subscribe(Mi(r,function(o){r.next(t.call(e,o,i++))}))})}function sA(t,e,n,r,i,o,a,s){var u=[],c=0,l=0,h=!1,f=function(){h&&!u.length&&!c&&e.complete()},d=function(g){return c<r?p(g):u.push(g)},p=function(g){c++;var m=!1;ln(n(g,l++)).subscribe(Mi(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var v=u.shift();a||p(v)};u.length&&c<r;)y();f()}catch(v){e.error(v)}}))};return t.subscribe(Mi(e,d,function(){h=!0,f()})),function(){}}function ig(t,e,n){return n===void 0&&(n=1/0),Pt(e)?ig(function(r,i){return rg(function(o,a){return e(r,o,i,a)})(ln(t(r,i)))},n):(typeof e=="number"&&(n=e),Ln(function(r,i){return sA(r,i,t,n)}))}function uA(t){return ig(Gp,t)}function cA(){return uA(1)}function og(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cA()(aA(t,Yp(t)))}function lA(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new Ti}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(c){var l,h,f,d=0,p=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,p=g=!1},v=function(){var x=l;y(),x==null||x.unsubscribe()};return Ln(function(x,b){d++,!g&&!p&&m();var w=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=xc(v,u))}),w.subscribe(b),!l&&d>0&&(l=new Ai({next:function($){return w.next($)},error:function($){g=!0,m(),h=xc(y,i,$),w.error($)},complete:function(){p=!0,m(),h=xc(y,a),w.complete()}}),ln(x).subscribe(l))})(c)}}function xc(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new Ai({next:function(){i.unsubscribe(),t()}});return ln(e.apply(void 0,$i([],wi(n)))).subscribe(i)}}function fA(t,e,n){var r,i=!1;return r=t,lA({connector:function(){return new U3(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function hA(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Yp(t);return Ln(function(r,i){(n?og(t,r,n):og(t,r)).subscribe(i)})}function dA(t){return Ln(function(e,n){ln(t).subscribe(Mi(n,function(){return n.complete()},gc)),!n.closed&&e.subscribe(n)})}const ag=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=gr.scaleDomain,scaleRange:i=gr.scaleRange})=>{const o=r[0]??gr.scaleDomain[0],a=r[1]??gr.scaleDomain[1],s=i[0]??gr.scaleRange[0],u=i[1]??gr.scaleRange[1],c=o==="auto"?e:o,l=a==="auto"?t:a,h=t-(t-c)/(1-s),f=l/u;return Lp().domain([h,f]).range([0,n])},sg=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return y3().domain(t).range(r).padding(n)},pA=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),Ep().domain([-0,e+0]).range(i)};function gA({name:t,defaultParams:e,initFn:n}){const r=new Ti,i=new Ti,o=new WeakMap;let a=()=>{},s,u=e;return{params$:i,name:t,defaultParams:e,init(){s&&(a=n(s)??(()=>{}),o.set(s.selection,s))},destroy(){a(),s&&(s.selection.remove(),s=void 0),r.next(void 0)},setPresetParams:c=>{u=fc(c,e)},setContext:c=>{s=c,s.observer.fullParams$=i.pipe(dA(r),hA({}),rg(l=>fc(l,u)),fA(1))}}}const Pi=()=>function(t,e){return function(n){return class{constructor(){const r=gA({name:t,defaultParams:e,initFn:n});this.params$=r.params$,this.name=r.name,this.defaultParams=r.defaultParams,this.init=r.init,this.destroy=r.destroy,this.setPresetParams=r.setPresetParams,this.setContext=r.setContext}}}},Di=Pi(),ae=Pi(),Ce=Pi(),ug=Pi(),cg=Pi();function _t(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function lg(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function pa(t){let e,n,r;t.length!==2?(e=_t,n=(s,u)=>_t(t(s),u),r=(s,u)=>t(s)-u):(e=t===_t||t===lg?t:mA,n=t,r=t);function i(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<0?c=h+1:l=h}while(c<l)}return c}function o(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<=0?c=h+1:l=h}while(c<l)}return c}function a(s,u,c=0,l=s.length){const h=i(s,u,c,l-1);return h>c&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function mA(){return 0}function ga(t){return t===null?NaN:+t}function*yA(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const fg=pa(_t),hg=fg.right,bA=fg.left,vA=pa(ga).center,kn=hg;function xA(t,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=_c(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const dg=pg(_c),_A=pg(wA);function pg(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(a!==void 0?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!n&&!r)return e;const s=n&&t(n),u=r&&t(r),c=i.slice();return s&&u?($r(s,c,i,o,a),$r(s,i,c,o,a),$r(s,c,i,o,a),Sr(u,i,c,o,a),Sr(u,c,i,o,a),Sr(u,i,c,o,a)):s?($r(s,i,c,o,a),$r(s,c,i,o,a),$r(s,i,c,o,a)):u&&(Sr(u,i,c,o,a),Sr(u,c,i,o,a),Sr(u,i,c,o,a)),e}}function $r(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function Sr(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function wA(t){const e=_c(t);return(n,r,i,o,a)=>{i<<=2,o<<=2,a<<=2,e(n,r,i+0,o+0,a),e(n,r,i+1,o+1,a),e(n,r,i+2,o+2,a),e(n,r,i+3,o+3,a)}}function _c(t){const e=Math.floor(t);if(e===t)return $A(t);const n=t-e,r=2*t+1;return(i,o,a,s,u)=>{if(!((s-=u)>=a))return;let c=e*o[a];const l=u*e,h=l+u;for(let f=a,d=a+l;f<d;f+=u)c+=o[Math.min(s,f)];for(let f=a,d=s;f<=d;f+=u)c+=o[Math.min(s,f+l)],i[f]=(c+n*(o[Math.max(a,f-h)]+o[Math.min(s,f+h)]))/r,c-=o[Math.max(a,f-l)]}}function $A(t){const e=2*t+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let s=t*r[i];const u=a*t;for(let c=i,l=i+u;c<l;c+=a)s+=r[Math.min(o,c)];for(let c=i,l=o;c<=l;c+=a)s+=r[Math.min(o,c+u)],n[c]=s/e,s-=r[Math.max(i,c-u)]}}function ma(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(i=+i)>=i&&++n}return n}function SA(t){return t.length|0}function AA(t){return!(t>0)}function MA(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function TA(t){return e=>t(...e)}function PA(...t){const e=typeof t[t.length-1]=="function"&&TA(t.pop());t=t.map(MA);const n=t.map(SA),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(AA))return o;for(;;){o.push(i.map((s,u)=>t[u][s]));let a=r;for(;++i[a]===n[a];){if(a===0)return e?o.map(e):o;i[a--]=0}}}function DA(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?i=>n+=+i||0:i=>n+=+e(i,r++,t)||0)}function gg(t,e){let n=0,r,i=0,o=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i));else{let a=-1;for(let s of t)(s=e(s,++a,t))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,o+=r*(s-i))}if(n>1)return o/(n-1)}function mg(t,e){const n=gg(t,e);return n&&Math.sqrt(n)}function Li(t,e){let n,r;if(e===void 0)for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class Dt{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const o=n[i],a=e+o,s=Math.abs(e)<Math.abs(o)?e-(a-o):o-(a-e);s&&(n[r++]=s),e=a}return n[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let n=this._n,r,i,o,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,i=e[--n],a=r+i,o=i-(a-r),!o););n>0&&(o<0&&e[n-1]<0||o>0&&e[n-1]>0)&&(i=o*2,r=a+i,i==r-a&&(a=r))}return a}}function LA(t,e){const n=new Dt;if(e===void 0)for(let r of t)(r=+r)&&n.add(r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function EA(t,e){const n=new Dt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class Ei extends Map{constructor(e,n=vg){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(wc(this,e))}has(e){return super.has(wc(this,e))}set(e,n){return super.set(yg(this,e),n)}delete(e){return super.delete(bg(this,e))}}class Cn extends Set{constructor(e,n=vg){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has(wc(this,e))}add(e){return super.add(yg(this,e))}delete(e){return super.delete(bg(this,e))}}function wc({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function yg({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function bg({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function vg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Ar(t){return t}function xg(t,...e){return Mr(t,Ar,Ar,e)}function _g(t,...e){return Mr(t,Array.from,Ar,e)}function wg(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(i=>i.pop().map(([o,a])=>[...i,o,a]));return t}function kA(t,...e){return wg(_g(t,...e),e)}function CA(t,e,...n){return wg(Sg(t,e,...n),n)}function $g(t,e,...n){return Mr(t,Ar,e,n)}function Sg(t,e,...n){return Mr(t,Array.from,e,n)}function IA(t,...e){return Mr(t,Ar,Ag,e)}function RA(t,...e){return Mr(t,Array.from,Ag,e)}function Ag(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function Mr(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Ei,u=r[a++];let c=-1;for(const l of o){const h=u(l,++c,o),f=s.get(h);f?f.push(l):s.set(h,[l])}for(const[l,h]of s)s.set(l,i(h,a));return e(s)}(t,0)}function Mg(t,e){return Array.from(e,n=>t[n])}function $c(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){const r=Uint32Array.from(t,(i,o)=>o);return e.length>1?(e=e.map(i=>t.map(i)),r.sort((i,o)=>{for(const a of e){const s=Tr(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>Tr(n[i],n[o]))),Mg(t,r)}return t.sort(Sc(n))}function Sc(t=_t){if(t===_t)return Tr;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function Tr(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function NA(t,e,n){return(e.length!==2?$c($g(t,e,n),([r,i],[o,a])=>_t(i,a)||_t(r,o)):$c(xg(t,n),([r,i],[o,a])=>e(i,a)||_t(r,o))).map(([r])=>r)}var FA=Array.prototype,GA=FA.slice;function Ac(t){return()=>t}const zA=Math.sqrt(50),OA=Math.sqrt(10),UA=Math.sqrt(2);function ya(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=zA?10:o>=OA?5:o>=UA?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?ya(t,e,n*2):[s,u,c]}function In(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?ya(e,t,n):ya(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function Rn(t,e,n){return e=+e,t=+t,n=+n,ya(t,e,n)[2]}function ba(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Rn(e,t,n):Rn(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Mc(t,e,n){let r;for(;;){const i=Rn(t,e,n);if(i===r||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function Tc(t){return Math.max(1,Math.ceil(Math.log(ma(t))/Math.LN2)+1)}function Tg(){var t=Ar,e=Li,n=Tc;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,u,c=new Array(a);for(o=0;o<a;++o)c[o]=t(i[o],o,i);var l=e(c),h=l[0],f=l[1],d=n(c,h,f);if(!Array.isArray(d)){const x=f,b=+d;if(e===Li&&([h,f]=Mc(h,f,b)),d=In(h,f,b),d[0]<=h&&(u=Rn(h,f,b)),d[d.length-1]>=f)if(x>=f&&e===Li){const w=Rn(h,f,b);isFinite(w)&&(w>0?f=(Math.floor(f/w)+1)*w:w<0&&(f=(Math.ceil(f*-w)+1)/-w))}else d.pop()}for(var p=d.length,g=0,m=p;d[g]<=h;)++g;for(;d[m-1]>f;)--m;(g||m<p)&&(d=d.slice(g,m),p=m-g);var y=new Array(p+1),v;for(o=0;o<=p;++o)v=y[o]=[],v.x0=o>0?d[o-1]:h,v.x1=o<p?d[o]:f;if(isFinite(u)){if(u>0)for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[Math.min(p,Math.floor((s-h)/u))].push(i[o]);else if(u<0){for(o=0;o<a;++o)if((s=c[o])!=null&&h<=s&&s<=f){const x=Math.floor((h-s)*u);y[Math.min(p,x+(d[x]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[kn(d,s,0,p)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Ac(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Ac([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Ac(Array.isArray(i)?GA.call(i):i),r):n},r}function ki(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Pc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);return r}function va(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Dc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);return r}function xa(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?Tr:Sc(i);r>n;){if(r-n>600){const u=r-n+1,c=e-n+1,l=Math.log(u),h=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*h*(u-h)/u)*(c-u/2<0?-1:1),d=Math.max(n,Math.floor(e-c*h/u+f)),p=Math.min(r,Math.floor(e+(u-c)*h/u+f));xa(t,e,d,p,i)}const o=t[e];let a=n,s=r;for(Ci(t,n,e),i(t[r],o)>0&&Ci(t,n,r);a<s;){for(Ci(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Ci(t,n,s):(++s,Ci(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Ci(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Pg(t,e=_t){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?_t(a,i)>0:_t(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)>0:e(i,i)===0)&&(n=i,r=!0);return n}function Ii(t,e,n){if(t=Float64Array.from(yA(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return va(t);if(e>=1)return ki(t);var r,i=(r-1)*e,o=Math.floor(i),a=ki(xa(t,o).subarray(0,o+1)),s=va(t.subarray(o+1));return a+(s-a)*(i-o)}}function Dg(t,e,n=ga){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),s=+n(t[o+1],o+1,t);return a+(s-a)*(i-o)}}function Lg(t,e,n=ga){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>ga(n(t[u],u,t))),e<=0)return Dc(r);if(e>=1)return Pc(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return xa(i,a,0,o,(s,u)=>Tr(r[s],r[u])),a=Pg(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function BA(t,e,n){const r=ma(t),i=Ii(t,.75)-Ii(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function YA(t,e,n){const r=ma(t),i=mg(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function HA(t,e){let n=0,r=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function WA(t,e){return Ii(t,.5,e)}function qA(t,e){return Lg(t,.5,e)}function*XA(t){for(const e of t)yield*e}function Lc(t){return Array.from(XA(t))}function jA(t,e){const n=new Ei;if(e===void 0)for(let o of t)o!=null&&o>=o&&n.set(o,(n.get(o)||0)+1);else{let o=-1;for(let a of t)(a=e(a,++o,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,i=0;for(const[o,a]of n)a>i&&(i=a,r=o);return r}function VA(t,e=ZA){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function ZA(t,e){return[t,e]}function fn(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function KA(t,e=_t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");let n=Array.from(t);const r=new Float64Array(n.length);e.length!==2&&(n=n.map(e),e=_t);const i=(s,u)=>e(n[s],n[u]);let o,a;return t=Uint32Array.from(n,(s,u)=>u),t.sort(e===_t?(s,u)=>Tr(n[s],n[u]):Sc(i)),t.forEach((s,u)=>{const c=i(s,o===void 0?s:o);c>=0?((o===void 0||c>0)&&(o=s,a=u),r[s]=a):r[s]=NaN}),r}function QA(t,e=_t){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?_t(a,i)<0:_t(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)<0:e(i,i)===0)&&(n=i,r=!0);return n}function Eg(t,e=_t){if(e.length===1)return Dc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)<0)&&(n=o,r=i);return r}function JA(t,e=_t){if(e.length===1)return Pc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)>0)&&(n=o,r=i);return r}function t5(t,e){const n=Eg(t,e);return n<0?void 0:n}const e5=kg(Math.random);function kg(t){return function(n,r=0,i=n.length){let o=i-(r=+r);for(;o;){const a=t()*o--|0,s=n[o+r];n[o+r]=n[a+r],n[a+r]=s}return n}}function n5(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function Cg(t){if(!(o=t.length))return[];for(var e=-1,n=va(t,r5),r=new Array(n);++e<n;)for(var i=-1,o,a=r[e]=new Array(o);++i<o;)a[i]=t[i][e];return r}function r5(t){return t.length}function i5(){return Cg(arguments)}function o5(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(!e(r,++n,t))return!1;return!0}function a5(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(e(r,++n,t))return!0;return!1}function s5(t,e){if(typeof e!="function")throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of t)e(i,++r,t)&&n.push(i);return n}function u5(t,e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof e!="function")throw new TypeError("mapper is not a function");return Array.from(t,(n,r)=>e(n,r,t))}function c5(t,e,n){if(typeof e!="function")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:n}=r.next(),i)return;++a}for(;{done:i,value:o}=r.next(),!i;)n=e(n,o,++a,t);return n}function l5(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function f5(t,...e){t=new Cn(t);for(const n of e)for(const r of n)t.delete(r);return t}function h5(t,e){const n=e[Symbol.iterator](),r=new Cn;for(const i of t){if(r.has(i))return!1;let o,a;for(;({value:o,done:a}=n.next())&&!a;){if(Object.is(i,o))return!1;r.add(o)}}return!0}function d5(t,...e){t=new Cn(t),e=e.map(p5);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function p5(t){return t instanceof Cn?t:new Cn(t)}function Ig(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=Rg(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const u=Rg(a);if(r.add(u),Object.is(o,u))break}}return!0}function Rg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function g5(t,e){return Ig(e,t)}function m5(...t){const e=new Cn;for(const n of t)for(const r of n)e.add(r);return e}function y5(t){return t}var _a=1,wa=2,Ec=3,Ri=4,Ng=1e-6;function b5(t){return"translate("+t+",0)"}function v5(t){return"translate(0,"+t+")"}function x5(t){return e=>+t(e)}function _5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function w5(){return!this.__axis}function $a(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===_a||t===Ri?-1:1,l=t===Ri||t===wa?"x":"y",h=t===_a||t===Ec?b5:v5;function f(d){var p=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):y5),m=Math.max(o,0)+s,y=e.range(),v=+y[0]+u,x=+y[y.length-1]+u,b=(e.bandwidth?_5:x5)(e.copy(),u),w=d.selection?d.selection():d,$=w.selectAll(".domain").data([null]),S=w.selectAll(".tick").data(p,e).order(),_=S.exit(),D=S.enter().append("g").attr("class","tick"),L=S.select("line"),P=S.select("text");$=$.merge($.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(D),L=L.merge(D.append("line").attr("stroke","currentColor").attr(l+"2",c*o)),P=P.merge(D.append("text").attr("fill","currentColor").attr(l,c*m).attr("dy",t===_a?"0em":t===Ec?"0.71em":"0.32em")),d!==w&&($=$.transition(d),S=S.transition(d),L=L.transition(d),P=P.transition(d),_=_.transition(d).attr("opacity",Ng).attr("transform",function(I){return isFinite(I=b(I))?h(I+u):this.getAttribute("transform")}),D.attr("opacity",Ng).attr("transform",function(I){var k=this.parentNode.__axis;return h((k&&isFinite(k=k(I))?k:b(I))+u)})),_.remove(),$.attr("d",t===Ri||t===wa?a?"M"+c*a+","+v+"H"+u+"V"+x+"H"+c*a:"M"+u+","+v+"V"+x:a?"M"+v+","+c*a+"V"+u+"H"+x+"V"+c*a:"M"+v+","+u+"H"+x),S.attr("opacity",1).attr("transform",function(I){return h(b(I)+u)}),L.attr(l+"2",c*o),P.attr(l,c*m).text(g),w.filter(w5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===wa?"start":t===Ri?"end":"middle"),w.each(function(){this.__axis=b})}return f.scale=function(d){return arguments.length?(e=d,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(d){return arguments.length?(n=d==null?[]:Array.from(d),f):n.slice()},f.tickValues=function(d){return arguments.length?(r=d==null?null:Array.from(d),f):r&&r.slice()},f.tickFormat=function(d){return arguments.length?(i=d,f):i},f.tickSize=function(d){return arguments.length?(o=a=+d,f):o},f.tickSizeInner=function(d){return arguments.length?(o=+d,f):o},f.tickSizeOuter=function(d){return arguments.length?(a=+d,f):a},f.tickPadding=function(d){return arguments.length?(s=+d,f):s},f.offset=function(d){return arguments.length?(u=+d,f):u},f}function Fg(t){return $a(_a,t)}function $5(t){return $a(wa,t)}function S5(t){return $a(Ec,t)}function Gg(t){return $a(Ri,t)}var A5={value:()=>{}};function Nn(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Sa(n)}function Sa(t){this._=t}function M5(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Sa.prototype=Nn.prototype={constructor:Sa,on:function(t,e){var n=this._,r=M5(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=T5(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=zg(n[i],t.name,e);else if(e==null)for(i in n)n[i]=zg(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Sa(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function T5(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function zg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=A5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var kc="http://www.w3.org/1999/xhtml";const Cc={svg:"http://www.w3.org/2000/svg",xhtml:kc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ni(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Cc.hasOwnProperty(e)?{space:Cc[e],local:t}:t}function P5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===kc&&e.documentElement.namespaceURI===kc?e.createElement(t):e.createElementNS(n,t)}}function D5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Aa(t){var e=Ni(t);return(e.local?D5:P5)(e)}function L5(){}function Ma(t){return t==null?L5:function(){return this.querySelector(t)}}function E5(t){typeof t!="function"&&(t=Ma(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=t.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new Yt(r,this._parents)}function Og(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function k5(){return[]}function Ic(t){return t==null?k5:function(){return this.querySelectorAll(t)}}function C5(t){return function(){return Og(t.apply(this,arguments))}}function I5(t){typeof t=="function"?t=C5(t):t=Ic(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new Yt(r,i)}function Rc(t){return function(){return this.matches(t)}}function Ug(t){return function(e){return e.matches(t)}}var R5=Array.prototype.find;function N5(t){return function(){return R5.call(this.children,t)}}function F5(){return this.firstElementChild}function G5(t){return this.select(t==null?F5:N5(typeof t=="function"?t:Ug(t)))}var z5=Array.prototype.filter;function O5(){return Array.from(this.children)}function U5(t){return function(){return z5.call(this.children,t)}}function B5(t){return this.selectAll(t==null?O5:U5(typeof t=="function"?t:Ug(t)))}function Y5(t){typeof t!="function"&&(t=Rc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new Yt(r,this._parents)}function Bg(t){return new Array(t.length)}function H5(){return new Yt(this._enter||this._groups.map(Bg),this._parents)}function Ta(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ta.prototype={constructor:Ta,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function W5(t){return function(){return t}}function q5(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Ta(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function X5(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),d;for(s=0;s<l;++s)(u=e[s])&&(f[s]=d=a.call(u,u.__data__,s,e)+"",c.has(d)?i[s]=u:c.set(d,u));for(s=0;s<h;++s)d=a.call(t,o[s],s,o)+"",(u=c.get(d))?(r[s]=u,u.__data__=o[s],c.delete(d)):n[s]=new Ta(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function j5(t){return t.__data__}function V5(t,e){if(!arguments.length)return Array.from(this,j5);var n=e?X5:q5,r=this._parents,i=this._groups;typeof t!="function"&&(t=W5(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,d=Z5(t.call(l,l&&l.__data__,c,r)),p=d.length,g=s[c]=new Array(p),m=a[c]=new Array(p),y=u[c]=new Array(f);n(l,h,g,m,y,d,e);for(var v=0,x=0,b,w;v<p;++v)if(b=g[v]){for(v>=x&&(x=v+1);!(w=m[x])&&++x<p;);b._next=w||null}}return a=new Yt(a,r),a._enter=s,a._exit=u,a}function Z5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function K5(){return new Yt(this._exit||this._groups.map(Bg),this._parents)}function Q5(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function J5(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],l=r[u],h=c.length,f=s[u]=new Array(h),d,p=0;p<h;++p)(d=c[p]||l[p])&&(f[p]=d);for(;u<i;++u)s[u]=n[u];return new Yt(s,this._parents)}function t6(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function e6(t){t||(t=n6);function e(h,f){return h&&f?t(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(e)}return new Yt(i,this._parents).order()}function n6(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function r6(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function i6(){return Array.from(this)}function o6(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function a6(){let t=0;for(const e of this)++t;return t}function s6(){return!this.node()}function u6(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function c6(t){return function(){this.removeAttribute(t)}}function l6(t){return function(){this.removeAttributeNS(t.space,t.local)}}function f6(t,e){return function(){this.setAttribute(t,e)}}function h6(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function d6(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function p6(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function g6(t,e){var n=Ni(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?l6:c6:typeof e=="function"?n.local?p6:d6:n.local?h6:f6)(n,e))}function Nc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function m6(t){return function(){this.style.removeProperty(t)}}function y6(t,e,n){return function(){this.style.setProperty(t,e,n)}}function b6(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function v6(t,e,n){return arguments.length>1?this.each((e==null?m6:typeof e=="function"?b6:y6)(t,e,n??"")):Fn(this.node(),t)}function Fn(t,e){return t.style.getPropertyValue(e)||Nc(t).getComputedStyle(t,null).getPropertyValue(e)}function x6(t){return function(){delete this[t]}}function _6(t,e){return function(){this[t]=e}}function w6(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function $6(t,e){return arguments.length>1?this.each((e==null?x6:typeof e=="function"?w6:_6)(t,e)):this.node()[t]}function Yg(t){return t.trim().split(/^|\s+/)}function Fc(t){return t.classList||new Hg(t)}function Hg(t){this._node=t,this._names=Yg(t.getAttribute("class")||"")}Hg.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Wg(t,e){for(var n=Fc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function qg(t,e){for(var n=Fc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function S6(t){return function(){Wg(this,t)}}function A6(t){return function(){qg(this,t)}}function M6(t,e){return function(){(e.apply(this,arguments)?Wg:qg)(this,t)}}function T6(t,e){var n=Yg(t+"");if(arguments.length<2){for(var r=Fc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?M6:e?S6:A6)(n,e))}function P6(){this.textContent=""}function D6(t){return function(){this.textContent=t}}function L6(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function E6(t){return arguments.length?this.each(t==null?P6:(typeof t=="function"?L6:D6)(t)):this.node().textContent}function k6(){this.innerHTML=""}function C6(t){return function(){this.innerHTML=t}}function I6(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function R6(t){return arguments.length?this.each(t==null?k6:(typeof t=="function"?I6:C6)(t)):this.node().innerHTML}function N6(){this.nextSibling&&this.parentNode.appendChild(this)}function F6(){return this.each(N6)}function G6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function z6(){return this.each(G6)}function O6(t){var e=typeof t=="function"?t:Aa(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function U6(){return null}function B6(t,e){var n=typeof t=="function"?t:Aa(t),r=e==null?U6:typeof e=="function"?e:Ma(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Y6(){var t=this.parentNode;t&&t.removeChild(this)}function H6(){return this.each(Y6)}function W6(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function q6(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function X6(t){return this.select(t?q6:W6)}function j6(t){return arguments.length?this.property("__data__",t):this.node().__data__}function V6(t){return function(e){t.call(this,e,this.__data__)}}function Z6(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function K6(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function Q6(t,e,n){return function(){var r=this.__on,i,o=V6(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function J6(t,e,n){var r=Z6(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(i=0,l=s[u];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?Q6:K6,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Xg(t,e,n){var r=Nc(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function t8(t,e){return function(){return Xg(this,t,e)}}function e8(t,e){return function(){return Xg(this,t,e.apply(this,arguments))}}function n8(t,e){return this.each((typeof e=="function"?e8:t8)(t,e))}function*r8(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Gc=[null];function Yt(t,e){this._groups=t,this._parents=e}function Gn(){return new Yt([[document.documentElement]],Gc)}function i8(){return this}Yt.prototype=Gn.prototype={constructor:Yt,select:E5,selectAll:I5,selectChild:G5,selectChildren:B5,filter:Y5,data:V5,enter:H5,exit:K5,join:Q5,merge:J5,selection:i8,order:t6,sort:e6,call:r6,nodes:i6,node:o6,size:a6,empty:s6,each:u6,attr:g6,style:v6,property:$6,classed:T6,text:E6,html:R6,raise:F6,lower:z6,append:O6,insert:B6,remove:H6,clone:X6,datum:j6,on:J6,dispatch:n8,[Symbol.iterator]:r8};function V(t){return typeof t=="string"?new Yt([[document.querySelector(t)]],[document.documentElement]):new Yt([[t]],Gc)}function o8(t){return V(Aa(t).call(document.documentElement))}var a8=0;function jg(){return new zc}function zc(){this._="@"+(++a8).toString(36)}zc.prototype=jg.prototype={constructor:zc,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function Vg(t){let e;for(;e=t.sourceEvent;)t=e;return t}function se(t,e){if(t=Vg(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function s8(t,e){return t.target&&(t=Vg(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>se(n,e))}function u8(t){return typeof t=="string"?new Yt([document.querySelectorAll(t)],[document.documentElement]):new Yt([Og(t)],Gc)}const c8={passive:!1},Fi={capture:!0,passive:!1};function Oc(t){t.stopImmediatePropagation()}function Pr(t){t.preventDefault(),t.stopImmediatePropagation()}function Pa(t){var e=t.document.documentElement,n=V(t).on("dragstart.drag",Pr,Fi);"onselectstart"in e?n.on("selectstart.drag",Pr,Fi):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Da(t,e){var n=t.document.documentElement,r=V(t).on("dragstart.drag",null);e&&(r.on("click.drag",Pr,Fi),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const La=t=>()=>t;function Uc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:u,dy:c,dispatch:l}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,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:s,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:l}})}Uc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function l8(t){return!t.ctrlKey&&!t.button}function f8(){return this.parentNode}function h8(t,e){return e??{x:t.x,y:t.y}}function d8(){return navigator.maxTouchPoints||"ontouchstart"in this}function Zg(){var t=l8,e=f8,n=h8,r=d8,i={},o=Nn("start","drag","end"),a=0,s,u,c,l,h=0;function f(b){b.on("mousedown.drag",d).filter(r).on("touchstart.drag",m).on("touchmove.drag",y,c8).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(b,w){if(!(l||!t.call(this,b,w))){var $=x(this,e.call(this,b,w),b,w,"mouse");$&&(V(b.view).on("mousemove.drag",p,Fi).on("mouseup.drag",g,Fi),Pa(b.view),Oc(b),c=!1,s=b.clientX,u=b.clientY,$("start",b))}}function p(b){if(Pr(b),!c){var w=b.clientX-s,$=b.clientY-u;c=w*w+$*$>h}i.mouse("drag",b)}function g(b){V(b.view).on("mousemove.drag mouseup.drag",null),Da(b.view,c),Pr(b),i.mouse("end",b)}function m(b,w){if(t.call(this,b,w)){var $=b.changedTouches,S=e.call(this,b,w),_=$.length,D,L;for(D=0;D<_;++D)(L=x(this,S,b,w,$[D].identifier,$[D]))&&(Oc(b),L("start",b,$[D]))}}function y(b){var w=b.changedTouches,$=w.length,S,_;for(S=0;S<$;++S)(_=i[w[S].identifier])&&(Pr(b),_("drag",b,w[S]))}function v(b){var w=b.changedTouches,$=w.length,S,_;for(l&&clearTimeout(l),l=setTimeout(function(){l=null},500),S=0;S<$;++S)(_=i[w[S].identifier])&&(Oc(b),_("end",b,w[S]))}function x(b,w,$,S,_,D){var L=o.copy(),P=se(D||$,w),I,k,T;if((T=n.call(b,new Uc("beforestart",{sourceEvent:$,target:f,identifier:_,active:a,x:P[0],y:P[1],dx:0,dy:0,dispatch:L}),S))!=null)return I=T.x-P[0]||0,k=T.y-P[1]||0,function C(M,R,G){var A=P,N;switch(M){case"start":i[_]=C,N=a++;break;case"end":delete i[_],--a;case"drag":P=se(G||R,w),N=a;break}L.call(M,b,new Uc(M,{sourceEvent:R,subject:T,target:f,identifier:_,active:N,x:P[0]+I,y:P[1]+k,dx:P[0]-A[0],dy:P[1]-A[1],dispatch:L}),S)}}return f.filter=function(b){return arguments.length?(t=typeof b=="function"?b:La(!!b),f):t},f.container=function(b){return arguments.length?(e=typeof b=="function"?b:La(b),f):e},f.subject=function(b){return arguments.length?(n=typeof b=="function"?b:La(b),f):n},f.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:La(!!b),f):r},f.on=function(){var b=o.on.apply(o,arguments);return b===o?f:b},f.clickDistance=function(b){return arguments.length?(h=(b=+b)*b,f):Math.sqrt(h)},f}function Dr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Gi(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function hn(){}var zn=.7,Lr=1/zn,Er="\\s*([+-]?\\d+)\\s*",zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",p8=/^#([0-9a-f]{3,8})$/,g8=new RegExp(`^rgb\\(${Er},${Er},${Er}\\)$`),m8=new RegExp(`^rgb\\(${Ie},${Ie},${Ie}\\)$`),y8=new RegExp(`^rgba\\(${Er},${Er},${Er},${zi}\\)$`),b8=new RegExp(`^rgba\\(${Ie},${Ie},${Ie},${zi}\\)$`),v8=new RegExp(`^hsl\\(${zi},${Ie},${Ie}\\)$`),x8=new RegExp(`^hsla\\(${zi},${Ie},${Ie},${zi}\\)$`),Kg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Dr(hn,dn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Qg,formatHex:Qg,formatHex8:_8,formatHsl:w8,formatRgb:Jg,toString:Jg});function Qg(){return this.rgb().formatHex()}function _8(){return this.rgb().formatHex8()}function w8(){return i0(this).formatHsl()}function Jg(){return this.rgb().formatRgb()}function dn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=p8.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?t0(e):n===3?new kt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ea(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ea(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=g8.exec(t))?new kt(e[1],e[2],e[3],1):(e=m8.exec(t))?new kt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=y8.exec(t))?Ea(e[1],e[2],e[3],e[4]):(e=b8.exec(t))?Ea(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=v8.exec(t))?r0(e[1],e[2]/100,e[3]/100,1):(e=x8.exec(t))?r0(e[1],e[2]/100,e[3]/100,e[4]):Kg.hasOwnProperty(t)?t0(Kg[t]):t==="transparent"?new kt(NaN,NaN,NaN,0):null}function t0(t){return new kt(t>>16&255,t>>8&255,t&255,1)}function Ea(t,e,n,r){return r<=0&&(t=e=n=NaN),new kt(t,e,n,r)}function Bc(t){return t instanceof hn||(t=dn(t)),t?(t=t.rgb(),new kt(t.r,t.g,t.b,t.opacity)):new kt}function kr(t,e,n,r){return arguments.length===1?Bc(t):new kt(t,e,n,r??1)}function kt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Dr(kt,kr,Gi(hn,{brighter(t){return t=t==null?Lr:Math.pow(Lr,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new kt(On(this.r),On(this.g),On(this.b),ka(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:e0,formatHex:e0,formatHex8:$8,formatRgb:n0,toString:n0}));function e0(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}`}function $8(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}${Un((isNaN(this.opacity)?1:this.opacity)*255)}`}function n0(){const t=ka(this.opacity);return`${t===1?"rgb(":"rgba("}${On(this.r)}, ${On(this.g)}, ${On(this.b)}${t===1?")":`, ${t})`}`}function ka(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function On(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Un(t){return t=On(t),(t<16?"0":"")+t.toString(16)}function r0(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Se(t,e,n,r)}function i0(t){if(t instanceof Se)return new Se(t.h,t.s,t.l,t.opacity);if(t instanceof hn||(t=dn(t)),!t)return new Se;if(t instanceof Se)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Se(a,s,u,t.opacity)}function Ca(t,e,n,r){return arguments.length===1?i0(t):new Se(t,e,n,r??1)}function Se(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Dr(Se,Ca,Gi(hn,{brighter(t){return t=t==null?Lr:Math.pow(Lr,t),new Se(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new Se(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new kt(Yc(t>=240?t-240:t+120,i,r),Yc(t,i,r),Yc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Se(o0(this.h),Ia(this.s),Ia(this.l),ka(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=ka(this.opacity);return`${t===1?"hsl(":"hsla("}${o0(this.h)}, ${Ia(this.s)*100}%, ${Ia(this.l)*100}%${t===1?")":`, ${t})`}`}}));function o0(t){return t=(t||0)%360,t<0?t+360:t}function Ia(t){return Math.max(0,Math.min(1,t||0))}function Yc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const a0=Math.PI/180,s0=180/Math.PI,Ra=18,u0=.96422,c0=1,l0=.82521,f0=4/29,Cr=6/29,h0=3*Cr*Cr,S8=Cr*Cr*Cr;function d0(t){if(t instanceof Ae)return new Ae(t.l,t.a,t.b,t.opacity);if(t instanceof Re)return g0(t);t instanceof kt||(t=Bc(t));var e=Xc(t.r),n=Xc(t.g),r=Xc(t.b),i=Hc((.2225045*e+.7168786*n+.0606169*r)/c0),o,a;return e===n&&n===r?o=a=i:(o=Hc((.4360747*e+.3850649*n+.1430804*r)/u0),a=Hc((.0139322*e+.0971045*n+.7141733*r)/l0)),new Ae(116*i-16,500*(o-i),200*(i-a),t.opacity)}function A8(t,e){return new Ae(t,0,0,e??1)}function Na(t,e,n,r){return arguments.length===1?d0(t):new Ae(t,e,n,r??1)}function Ae(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Dr(Ae,Na,Gi(hn,{brighter(t){return new Ae(this.l+Ra*(t??1),this.a,this.b,this.opacity)},darker(t){return new Ae(this.l-Ra*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=u0*Wc(e),t=c0*Wc(t),n=l0*Wc(n),new kt(qc(3.1338561*e-1.6168667*t-.4906146*n),qc(-.9787684*e+1.9161415*t+.033454*n),qc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Hc(t){return t>S8?Math.pow(t,1/3):t/h0+f0}function Wc(t){return t>Cr?t*t*t:h0*(t-f0)}function qc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Xc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function p0(t){if(t instanceof Re)return new Re(t.h,t.c,t.l,t.opacity);if(t instanceof Ae||(t=d0(t)),t.a===0&&t.b===0)return new Re(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*s0;return new Re(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function M8(t,e,n,r){return arguments.length===1?p0(t):new Re(n,e,t,r??1)}function Fa(t,e,n,r){return arguments.length===1?p0(t):new Re(t,e,n,r??1)}function Re(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function g0(t){if(isNaN(t.h))return new Ae(t.l,0,0,t.opacity);var e=t.h*a0;return new Ae(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Dr(Re,Fa,Gi(hn,{brighter(t){return new Re(this.h,this.c,this.l+Ra*(t??1),this.opacity)},darker(t){return new Re(this.h,this.c,this.l-Ra*(t??1),this.opacity)},rgb(){return g0(this).rgb()}}));var m0=-.14861,jc=1.78277,Vc=-.29227,Ga=-.90649,Oi=1.97294,y0=Oi*Ga,b0=Oi*jc,v0=jc*Vc-Ga*m0;function T8(t){if(t instanceof Bn)return new Bn(t.h,t.s,t.l,t.opacity);t instanceof kt||(t=Bc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(v0*r+y0*e-b0*n)/(v0+y0-b0),o=r-i,a=(Oi*(n-i)-Vc*o)/Ga,s=Math.sqrt(a*a+o*o)/(Oi*i*(1-i)),u=s?Math.atan2(a,o)*s0-120:NaN;return new Bn(u<0?u+360:u,s,i,t.opacity)}function Me(t,e,n,r){return arguments.length===1?T8(t):new Bn(t,e,n,r??1)}function Bn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Dr(Bn,Me,Gi(hn,{brighter(t){return t=t==null?Lr:Math.pow(Lr,t),new Bn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new Bn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*a0,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new kt(255*(e+n*(m0*r+jc*i)),255*(e+n*(Vc*r+Ga*i)),255*(e+n*(Oi*r)),this.opacity)}}));function x0(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}function _0(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return x0((n-r/e)*e,a,i,o,s)}}function w0(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return x0((n-r/e)*e,i,o,a,s)}}const za=t=>()=>t;function $0(t,e){return function(n){return t+n*e}}function P8(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Oa(t,e){var n=e-t;return n?$0(t,n>180||n<-180?n-360*Math.round(n/360):n):za(isNaN(t)?e:t)}function D8(t){return(t=+t)==1?Ct:function(e,n){return n-e?P8(e,n,t):za(isNaN(e)?n:e)}}function Ct(t,e){var n=e-t;return n?$0(t,n):za(isNaN(t)?e:t)}const Ui=function t(e){var n=D8(e);function r(i,o){var a=n((i=kr(i)).r,(o=kr(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=Ct(i.opacity,o.opacity);return function(l){return i.r=a(l),i.g=s(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=t,r}(1);function S0(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=kr(e[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=t(r),i=t(i),o=t(o),s.opacity=1,function(u){return s.r=r(u),s.g=i(u),s.b=o(u),s+""}}}var A0=S0(_0),L8=S0(w0);function Zc(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function M0(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function E8(t,e){return(M0(e)?Zc:T0)(t,e)}function T0(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=pn(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function P0(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function he(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function D0(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=pn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Kc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qc=new RegExp(Kc.source,"g");function k8(t){return function(){return t}}function C8(t){return function(e){return t(e)+""}}function Jc(t,e){var n=Kc.lastIndex=Qc.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=Kc.exec(t))&&(i=Qc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:he(r,i)})),n=Qc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?C8(u[0].x):k8(e):(e=u.length,function(c){for(var l=0,h;l<e;++l)s[(h=u[l]).i]=h.x(c);return s.join("")})}function pn(t,e){var n=typeof e,r;return e==null||n==="boolean"?za(e):(n==="number"?he:n==="string"?(r=dn(e))?(e=r,Ui):Jc:e instanceof dn?Ui:e instanceof Date?P0:M0(e)?Zc:Array.isArray(e)?T0:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?D0:he)(t,e)}function I8(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function R8(t,e){var n=Oa(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ua(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var L0=180/Math.PI,tl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function E0(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*L0,skewX:Math.atan(u)*L0,scaleX:a,scaleY:s}}var Ba;function N8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?tl:E0(e.a,e.b,e.c,e.d,e.e,e.f)}function F8(t){return t==null||(Ba||(Ba=document.createElementNS("http://www.w3.org/2000/svg","g")),Ba.setAttribute("transform",t),!(t=Ba.transform.baseVal.consolidate()))?tl:(t=t.matrix,E0(t.a,t.b,t.c,t.d,t.e,t.f))}function k0(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push("translate(",null,e,null,n);p.push({i:g-4,x:he(c,h)},{i:g-2,x:he(l,f)})}else(h||f)&&d.push("translate("+h+e+f+n)}function a(c,l,h,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:he(c,l)})):l&&h.push(i(h)+"rotate("+l+r)}function s(c,l,h,f){c!==l?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:he(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push(i(d)+"scale(",null,",",null,")");p.push({i:g-4,x:he(c,h)},{i:g-2,x:he(l,f)})}else(h!==1||f!==1)&&d.push(i(d)+"scale("+h+","+f+")")}return function(c,l){var h=[],f=[];return c=t(c),l=t(l),o(c.translateX,c.translateY,l.translateX,l.translateY,h,f),a(c.rotate,l.rotate,h,f),s(c.skewX,l.skewX,h,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,h,f),c=l=null,function(d){for(var p=-1,g=f.length,m;++p<g;)h[(m=f[p]).i]=m.x(d);return h.join("")}}}var C0=k0(N8,"px, ","px)","deg)"),I0=k0(F8,", ",")",")"),G8=1e-12;function R0(t){return((t=Math.exp(t))+1/t)/2}function z8(t){return((t=Math.exp(t))-1/t)/2}function O8(t){return((t=Math.exp(2*t))-1)/(t+1)}const N0=function t(e,n,r){function i(o,a){var s=o[0],u=o[1],c=o[2],l=a[0],h=a[1],f=a[2],d=l-s,p=h-u,g=d*d+p*p,m,y;if(g<G8)y=Math.log(f/c)/e,m=function(S){return[s+S*d,u+S*p,c*Math.exp(e*S*y)]};else{var v=Math.sqrt(g),x=(f*f-c*c+r*g)/(2*c*n*v),b=(f*f-c*c-r*g)/(2*f*n*v),w=Math.log(Math.sqrt(x*x+1)-x),$=Math.log(Math.sqrt(b*b+1)-b);y=($-w)/e,m=function(S){var _=S*y,D=R0(w),L=c/(n*v)*(D*O8(e*_+w)-z8(w));return[s+L*d,u+L*p,c*D/R0(e*_+w)]}}return m.duration=y*1e3*e/Math.SQRT2,m}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,u=s*s;return t(a,s,u)},i}(Math.SQRT2,2,4);function F0(t){return function(e,n){var r=t((e=Ca(e)).h,(n=Ca(n)).h),i=Ct(e.s,n.s),o=Ct(e.l,n.l),a=Ct(e.opacity,n.opacity);return function(s){return e.h=r(s),e.s=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const U8=F0(Oa);var B8=F0(Ct);function Y8(t,e){var n=Ct((t=Na(t)).l,(e=Na(e)).l),r=Ct(t.a,e.a),i=Ct(t.b,e.b),o=Ct(t.opacity,e.opacity);return function(a){return t.l=n(a),t.a=r(a),t.b=i(a),t.opacity=o(a),t+""}}function G0(t){return function(e,n){var r=t((e=Fa(e)).h,(n=Fa(n)).h),i=Ct(e.c,n.c),o=Ct(e.l,n.l),a=Ct(e.opacity,n.opacity);return function(s){return e.h=r(s),e.c=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const H8=G0(Oa);var W8=G0(Ct);function z0(t){return function e(n){n=+n;function r(i,o){var a=t((i=Me(i)).h,(o=Me(o)).h),s=Ct(i.s,o.s),u=Ct(i.l,o.l),c=Ct(i.opacity,o.opacity);return function(l){return i.h=a(l),i.s=s(l),i.l=u(Math.pow(l,n)),i.opacity=c(l),i+""}}return r.gamma=e,r}(1)}const q8=z0(Oa);var Ya=z0(Ct);function O0(t,e){e===void 0&&(e=t,t=pn);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function X8(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Ir=0,Bi=0,Yi=0,U0=1e3,Ha,Hi,Wa=0,Yn=0,qa=0,Wi=typeof performance=="object"&&performance.now?performance:Date,B0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qi(){return Yn||(B0(j8),Yn=Wi.now()+qa)}function j8(){Yn=0}function Xi(){this._call=this._time=this._next=null}Xi.prototype=Xa.prototype={constructor:Xi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?qi():+n)+(e==null?0:+e),!this._next&&Hi!==this&&(Hi?Hi._next=this:Ha=this,Hi=this),this._call=t,this._time=n,el()},stop:function(){this._call&&(this._call=null,this._time=1/0,el())}};function Xa(t,e,n){var r=new Xi;return r.restart(t,e,n),r}function Y0(){qi(),++Ir;for(var t=Ha,e;t;)(e=Yn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Ir}function H0(){Yn=(Wa=Wi.now())+qa,Ir=Bi=0;try{Y0()}finally{Ir=0,Z8(),Yn=0}}function V8(){var t=Wi.now(),e=t-Wa;e>U0&&(qa-=e,Wa=t)}function Z8(){for(var t,e=Ha,n,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:Ha=n);Hi=t,el(r)}function el(t){if(!Ir){Bi&&(Bi=clearTimeout(Bi));var e=t-Yn;e>24?(t<1/0&&(Bi=setTimeout(H0,t-Wi.now()-qa)),Yi&&(Yi=clearInterval(Yi))):(Yi||(Wa=Wi.now(),Yi=setInterval(V8,U0)),Ir=1,B0(H0))}}function nl(t,e,n){var r=new Xi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function K8(t,e,n){var r=new Xi,i=e;return e==null?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(o,a,s){a=+a,s=s==null?qi():+s,r._restart(function u(c){c+=i,r._restart(u,i+=a,s),o(c)},a,s)},r.restart(t,e,n),r)}var Q8=Nn("start","end","cancel","interrupt"),J8=[],W0=0,rl=1,il=2,ja=3,q0=4,ol=5,Va=6;function Za(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;t4(t,n,{name:e,index:r,group:i,on:Q8,tween:J8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:W0})}function al(t,e){var n=Te(t,e);if(n.state>W0)throw new Error("too late; already scheduled");return n}function Ne(t,e){var n=Te(t,e);if(n.state>ja)throw new Error("too late; already running");return n}function Te(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function t4(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Xa(o,0,n.time);function o(c){n.state=rl,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,d;if(n.state!==rl)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===ja)return nl(a);d.state===q0?(d.state=Va,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=Va,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(nl(function(){n.state===ja&&(n.state=q0,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=il,n.on.call("start",t,t.__data__,n.index,n.group),n.state===il){for(n.state=ja,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=d);i.length=h+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=ol,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===ol&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Va,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function Hn(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>il&&r.state<ol,r.state=Va,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function e4(t){return this.each(function(){Hn(this,t)})}function n4(t,e){var n,r;return function(){var i=Ne(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function r4(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ne(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function i4(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Te(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?n4:r4)(n,t,e))}function sl(t,e,n){var r=t._id;return t.each(function(){var i=Ne(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Te(i,r).value[e]}}function X0(t,e){var n;return(typeof e=="number"?he:e instanceof dn?Ui:(n=dn(e))?(e=n,Ui):Jc)(t,e)}function o4(t){return function(){this.removeAttribute(t)}}function a4(t){return function(){this.removeAttributeNS(t.space,t.local)}}function s4(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function u4(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function c4(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function l4(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function f4(t,e){var n=Ni(t),r=n==="transform"?I0:X0;return this.attrTween(t,typeof e=="function"?(n.local?l4:c4)(n,r,sl(this,"attr."+t,e)):e==null?(n.local?a4:o4)(n):(n.local?u4:s4)(n,r,e))}function h4(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function d4(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function p4(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&d4(t,o)),n}return i._value=e,i}function g4(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&h4(t,o)),n}return i._value=e,i}function m4(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Ni(t);return this.tween(n,(r.local?p4:g4)(r,e))}function y4(t,e){return function(){al(this,t).delay=+e.apply(this,arguments)}}function b4(t,e){return e=+e,function(){al(this,t).delay=e}}function v4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?y4:b4)(e,t)):Te(this.node(),e).delay}function x4(t,e){return function(){Ne(this,t).duration=+e.apply(this,arguments)}}function _4(t,e){return e=+e,function(){Ne(this,t).duration=e}}function w4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?x4:_4)(e,t)):Te(this.node(),e).duration}function $4(t,e){if(typeof e!="function")throw new Error;return function(){Ne(this,t).ease=e}}function S4(t){var e=this._id;return arguments.length?this.each($4(e,t)):Te(this.node(),e).ease}function A4(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ne(this,t).ease=n}}function M4(t){if(typeof t!="function")throw new Error;return this.each(A4(this._id,t))}function T4(t){typeof t!="function"&&(t=Rc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new Fe(r,this._parents,this._name,this._id)}function P4(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],c=n[s],l=u.length,h=a[s]=new Array(l),f,d=0;d<l;++d)(f=u[d]||c[d])&&(h[d]=f);for(;s<r;++s)a[s]=e[s];return new Fe(a,this._parents,this._name,this._id)}function D4(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function L4(t,e,n){var r,i,o=D4(e)?al:Ne;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function E4(t,e){var n=this._id;return arguments.length<2?Te(this.node(),n).on.on(t):this.each(L4(n,t,e))}function k4(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function C4(){return this.on("end.remove",k4(this._id))}function I4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ma(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,Za(c[f],e,n,f,c,Te(l,n)));return new Fe(o,this._parents,e,n)}function R4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ic(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,l,h=0;h<c;++h)if(l=u[h]){for(var f=t.call(l,l.__data__,h,u),d,p=Te(l,n),g=0,m=f.length;g<m;++g)(d=f[g])&&Za(d,e,n,g,f,p);o.push(f),a.push(l)}return new Fe(o,a,e,n)}var N4=Gn.prototype.constructor;function F4(){return new N4(this._groups,this._parents)}function G4(t,e){var n,r,i;return function(){var o=Fn(this,t),a=(this.style.removeProperty(t),Fn(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function j0(t){return function(){this.style.removeProperty(t)}}function z4(t,e,n){var r,i=n+"",o;return function(){var a=Fn(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function O4(t,e,n){var r,i,o;return function(){var a=Fn(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),Fn(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function U4(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Ne(this,t),c=u.on,l=u.value[o]==null?s||(s=j0(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function B4(t,e,n){var r=(t+="")=="transform"?C0:X0;return e==null?this.styleTween(t,G4(t,r)).on("end.style."+t,j0(t)):typeof e=="function"?this.styleTween(t,O4(t,r,sl(this,"style."+t,e))).each(U4(this._id,t)):this.styleTween(t,z4(t,r,e),n).on("end.style."+t,null)}function Y4(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function H4(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Y4(t,a,n)),r}return o._value=e,o}function W4(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,H4(t,e,n??""))}function q4(t){return function(){this.textContent=t}}function X4(t){return function(){var e=t(this);this.textContent=e??""}}function j4(t){return this.tween("text",typeof t=="function"?X4(sl(this,"text",t)):q4(t==null?"":t+""))}function V4(t){return function(e){this.textContent=t.call(this,e)}}function Z4(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&V4(i)),e}return r._value=t,r}function K4(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Z4(t))}function Q4(){for(var t=this._name,e=this._id,n=Z0(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=Te(u,e);Za(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Fe(r,this._parents,t,n)}function J4(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=Ne(this,r),l=c.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var tM=0;function Fe(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function V0(t){return Gn().transition(t)}function Z0(){return++tM}var je=Gn.prototype;Fe.prototype=V0.prototype={constructor:Fe,select:I4,selectAll:R4,selectChild:je.selectChild,selectChildren:je.selectChildren,filter:T4,merge:P4,selection:F4,transition:Q4,call:je.call,nodes:je.nodes,node:je.node,size:je.size,empty:je.empty,each:je.each,on:E4,attr:f4,attrTween:m4,style:B4,styleTween:W4,text:j4,textTween:K4,remove:C4,tween:i4,delay:v4,duration:w4,ease:S4,easeVarying:M4,end:J4,[Symbol.iterator]:je[Symbol.iterator]};const eM=t=>+t;function nM(t){return t*t}function rM(t){return t*(2-t)}function K0(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function iM(t){return t*t*t}function oM(t){return--t*t*t+1}function ji(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ul=3,aM=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(ul),sM=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(ul),Q0=function t(e){e=+e;function n(r){return((r*=2)<=1?Math.pow(r,e):2-Math.pow(2-r,e))/2}return n.exponent=t,n}(ul),J0=Math.PI,t1=J0/2;function uM(t){return+t==1?1:1-Math.cos(t*t1)}function cM(t){return Math.sin(t*t1)}function e1(t){return(1-Math.cos(J0*t))/2}function gn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function lM(t){return gn(1-+t)}function fM(t){return 1-gn(t)}function n1(t){return((t*=2)<=1?gn(1-t):2-gn(t-1))/2}function hM(t){return 1-Math.sqrt(1-t*t)}function dM(t){return Math.sqrt(1- --t*t)}function r1(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var cl=4/11,pM=6/11,gM=8/11,mM=3/4,yM=9/11,bM=10/11,vM=15/16,xM=21/22,_M=63/64,Ka=1/cl/cl;function wM(t){return 1-Vi(1-t)}function Vi(t){return(t=+t)<cl?Ka*t*t:t<gM?Ka*(t-=pM)*t+mM:t<bM?Ka*(t-=yM)*t+vM:Ka*(t-=xM)*t+_M}function $M(t){return((t*=2)<=1?1-Vi(1-t):Vi(t-1)+1)/2}var ll=1.70158,SM=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(ll),AM=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(ll),i1=function t(e){e=+e;function n(r){return((r*=2)<1?r*r*((e+1)*r-e):(r-=2)*r*((e+1)*r+e)+2)/2}return n.overshoot=t,n}(ll),Rr=2*Math.PI,fl=1,hl=.3,MM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return e*gn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(fl,hl),Qa=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return 1-e*gn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(fl,hl),TM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return((o=o*2-1)<0?e*gn(-o)*Math.sin((r-o)/n):2-e*gn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(fl,hl),PM={time:null,delay:0,duration:250,ease:ji};function DM(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function LM(t){var e,n;t instanceof Fe?(e=t._id,t=t._name):(e=Z0(),(n=PM).time=qi(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&Za(u,t,e,c,a,n||DM(u,e));return new Fe(r,this._parents,t,e)}Gn.prototype.interrupt=e4,Gn.prototype.transition=LM;var EM=[null];function kM(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>rl&&r.name===e)return new Fe([[t]],EM,e,+i)}return null}const dl=t=>()=>t;function CM(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function IM(t){t.stopImmediatePropagation()}function pl(t){t.preventDefault(),t.stopImmediatePropagation()}var o1={name:"drag"},gl={name:"space"},Nr={name:"handle"},Fr={name:"center"};const{abs:a1,max:Gt,min:zt}=Math;function s1(t){return[+t[0],+t[1]]}function ml(t){return[s1(t[0]),s1(t[1])]}var Ja={name:"x",handles:["w","e"].map(Zi),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ts={name:"y",handles:["n","s"].map(Zi),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},RM={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Zi),input:function(t){return t==null?null:ml(t)},output:function(t){return t}},Ve={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"},u1={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},c1={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},NM={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},FM={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Zi(t){return{type:t}}function GM(t){return!t.ctrlKey&&!t.button}function zM(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function OM(){return navigator.maxTouchPoints||"ontouchstart"in this}function yl(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function UM(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function BM(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function YM(){return bl(Ja)}function HM(){return bl(ts)}function WM(){return bl(RM)}function bl(t){var e=zM,n=GM,r=OM,i=!0,o=Nn("start","brush","end"),a=6,s;function u(m){var y=m.property("__brush",g).selectAll(".overlay").data([Zi("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ve.overlay).merge(y).each(function(){var x=yl(this).extent;V(this).attr("x",x[0][0]).attr("y",x[0][1]).attr("width",x[1][0]-x[0][0]).attr("height",x[1][1]-x[0][1])}),m.selectAll(".selection").data([Zi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ve.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var v=m.selectAll(".handle").data(t.handles,function(x){return x.type});v.exit().remove(),v.enter().append("rect").attr("class",function(x){return"handle handle--"+x.type}).attr("cursor",function(x){return Ve[x.type]}),m.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(r).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}u.move=function(m,y,v){m.tween?m.on("start.brush",function(x){l(this,arguments).beforestart().start(x)}).on("interrupt.brush end.brush",function(x){l(this,arguments).end(x)}).tween("brush",function(){var x=this,b=x.__brush,w=l(x,arguments),$=b.selection,S=t.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),_=pn($,S);function D(L){b.selection=L===1&&S===null?null:_(L),c.call(x),w.brush()}return $!==null&&S!==null?D:D(1)}):m.each(function(){var x=this,b=arguments,w=x.__brush,$=t.input(typeof y=="function"?y.apply(x,b):y,w.extent),S=l(x,b).beforestart();Hn(x),w.selection=$===null?null:$,c.call(x),S.start(v).brush(v).end(v)})},u.clear=function(m,y){u.move(m,null,y)};function c(){var m=V(this),y=yl(this).selection;y?(m.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(v){return v.type[v.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(v){return v.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(v){return v.type==="n"||v.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(v){return v.type==="e"||v.type==="w"?y[1][1]-y[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(m,y,v){var x=m.__brush.emitter;return x&&(!v||!x.clean)?x:new h(m,y,v)}function h(m,y,v){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=v}h.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,y){return this.starting?(this.starting=!1,this.emit("start",m,y)):this.emit("brush",m),this},brush:function(m,y){return this.emit("brush",m,y),this},end:function(m,y){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,y)),this},emit:function(m,y,v){var x=V(this.that).datum();o.call(m,this.that,new CM(m,{sourceEvent:y,target:u,selection:t.output(this.state.selection),mode:v,dispatch:o}),x)}};function f(m){if(s&&!m.touches||!n.apply(this,arguments))return;var y=this,v=m.target.__data__.type,x=(i&&m.metaKey?v="overlay":v)==="selection"?o1:i&&m.altKey?Fr:Nr,b=t===ts?null:NM[v],w=t===Ja?null:FM[v],$=yl(y),S=$.extent,_=$.selection,D=S[0][0],L,P,I=S[0][1],k,T,C=S[1][0],M,R,G=S[1][1],A,N,z=0,E=0,Y,j=b&&w&&i&&m.shiftKey,H,X,Q=Array.from(m.touches||[m],it=>{const Mt=it.identifier;return it=se(it,y),it.point0=it.slice(),it.identifier=Mt,it});Hn(y);var ct=l(y,arguments,!0).beforestart();if(v==="overlay"){_&&(Y=!0);const it=[Q[0],Q[1]||Q[0]];$.selection=_=[[L=t===ts?D:zt(it[0][0],it[1][0]),k=t===Ja?I:zt(it[0][1],it[1][1])],[M=t===ts?C:Gt(it[0][0],it[1][0]),A=t===Ja?G:Gt(it[0][1],it[1][1])]],Q.length>1&&xt(m)}else L=_[0][0],k=_[0][1],M=_[1][0],A=_[1][1];P=L,T=k,R=M,N=A;var U=V(y).attr("pointer-events","none"),tt=U.selectAll(".overlay").attr("cursor",Ve[v]);if(m.touches)ct.moved=q,ct.ended=gt;else{var st=V(m.view).on("mousemove.brush",q,!0).on("mouseup.brush",gt,!0);i&&st.on("keydown.brush",Ft,!0).on("keyup.brush",te,!0),Pa(m.view)}c.call(y),ct.start(m,x.name);function q(it){for(const Mt of it.changedTouches||[it])for(const No of Q)No.identifier===Mt.identifier&&(No.cur=se(Mt,y));if(j&&!H&&!X&&Q.length===1){const Mt=Q[0];a1(Mt.cur[0]-Mt[0])>a1(Mt.cur[1]-Mt[1])?X=!0:H=!0}for(const Mt of Q)Mt.cur&&(Mt[0]=Mt.cur[0],Mt[1]=Mt.cur[1]);Y=!0,pl(it),xt(it)}function xt(it){const Mt=Q[0],No=Mt.point0;var An;switch(z=Mt[0]-No[0],E=Mt[1]-No[1],x){case gl:case o1:{b&&(z=Gt(D-L,zt(C-M,z)),P=L+z,R=M+z),w&&(E=Gt(I-k,zt(G-A,E)),T=k+E,N=A+E);break}case Nr:{Q[1]?(b&&(P=Gt(D,zt(C,Q[0][0])),R=Gt(D,zt(C,Q[1][0])),b=1),w&&(T=Gt(I,zt(G,Q[0][1])),N=Gt(I,zt(G,Q[1][1])),w=1)):(b<0?(z=Gt(D-L,zt(C-L,z)),P=L+z,R=M):b>0&&(z=Gt(D-M,zt(C-M,z)),P=L,R=M+z),w<0?(E=Gt(I-k,zt(G-k,E)),T=k+E,N=A):w>0&&(E=Gt(I-A,zt(G-A,E)),T=k,N=A+E));break}case Fr:{b&&(P=Gt(D,zt(C,L-z*b)),R=Gt(D,zt(C,M+z*b))),w&&(T=Gt(I,zt(G,k-E*w)),N=Gt(I,zt(G,A+E*w)));break}}R<P&&(b*=-1,An=L,L=M,M=An,An=P,P=R,R=An,v in u1&&tt.attr("cursor",Ve[v=u1[v]])),N<T&&(w*=-1,An=k,k=A,A=An,An=T,T=N,N=An,v in c1&&tt.attr("cursor",Ve[v=c1[v]])),$.selection&&(_=$.selection),H&&(P=_[0][0],R=_[1][0]),X&&(T=_[0][1],N=_[1][1]),(_[0][0]!==P||_[0][1]!==T||_[1][0]!==R||_[1][1]!==N)&&($.selection=[[P,T],[R,N]],c.call(y),ct.brush(it,x.name))}function gt(it){if(IM(it),it.touches){if(it.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Da(it.view,Y),st.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);U.attr("pointer-events","all"),tt.attr("cursor",Ve.overlay),$.selection&&(_=$.selection),UM(_)&&($.selection=null,c.call(y)),ct.end(it,x.name)}function Ft(it){switch(it.keyCode){case 16:{j=b&&w;break}case 18:{x===Nr&&(b&&(M=R-z*b,L=P+z*b),w&&(A=N-E*w,k=T+E*w),x=Fr,xt(it));break}case 32:{(x===Nr||x===Fr)&&(b<0?M=R-z:b>0&&(L=P-z),w<0?A=N-E:w>0&&(k=T-E),x=gl,tt.attr("cursor",Ve.selection),xt(it));break}default:return}pl(it)}function te(it){switch(it.keyCode){case 16:{j&&(H=X=j=!1,xt(it));break}case 18:{x===Fr&&(b<0?M=R:b>0&&(L=P),w<0?A=N:w>0&&(k=T),x=Nr,xt(it));break}case 32:{x===gl&&(it.altKey?(b&&(M=R-z*b,L=P+z*b),w&&(A=N-E*w,k=T+E*w),x=Fr):(b<0?M=R:b>0&&(L=P),w<0?A=N:w>0&&(k=T),x=Nr),tt.attr("cursor",Ve[v]),xt(it));break}default:return}pl(it)}}function d(m){l(this,arguments).moved(m)}function p(m){l(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=ml(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:dl(ml(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:dl(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:dl(!!m),u):r},u.handleSize=function(m){return arguments.length?(a=+m,u):a},u.keyModifiers=function(m){return arguments.length?(i=!!m,u):i},u.on=function(){var m=o.on.apply(o,arguments);return m===o?u:m},u}var l1=Math.abs,Gr=Math.cos,zr=Math.sin,f1=Math.PI,es=f1/2,h1=f1*2,d1=Math.max,vl=1e-12;function xl(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function qM(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function XM(){return _l(!1,!1)}function jM(){return _l(!1,!0)}function VM(){return _l(!0,!1)}function _l(t,e){var n=0,r=null,i=null,o=null;function a(s){var u=s.length,c=new Array(u),l=xl(0,u),h=new Array(u*u),f=new Array(u),d=0,p;s=Float64Array.from({length:u*u},e?(g,m)=>s[m%u][m/u|0]:(g,m)=>s[m/u|0][m%u]);for(let g=0;g<u;++g){let m=0;for(let y=0;y<u;++y)m+=s[g*u+y]+t*s[y*u+g];d+=c[g]=m}d=d1(0,h1-n*u)/d,p=d?n:h1/u;{let g=0;r&&l.sort((m,y)=>r(c[m],c[y]));for(const m of l){const y=g;if(t){const v=xl(~u+1,u).filter(x=>x<0?s[~x*u+m]:s[m*u+x]);i&&v.sort((x,b)=>i(x<0?-s[~x*u+m]:s[m*u+x],b<0?-s[~b*u+m]:s[m*u+b]));for(const x of v)if(x<0){const b=h[~x*u+m]||(h[~x*u+m]={source:null,target:null});b.target={index:m,startAngle:g,endAngle:g+=s[~x*u+m]*d,value:s[~x*u+m]}}else{const b=h[m*u+x]||(h[m*u+x]={source:null,target:null});b.source={index:m,startAngle:g,endAngle:g+=s[m*u+x]*d,value:s[m*u+x]}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}else{const v=xl(0,u).filter(x=>s[m*u+x]||s[x*u+m]);i&&v.sort((x,b)=>i(s[m*u+x],s[m*u+b]));for(const x of v){let b;if(m<x?(b=h[m*u+x]||(h[m*u+x]={source:null,target:null}),b.source={index:m,startAngle:g,endAngle:g+=s[m*u+x]*d,value:s[m*u+x]}):(b=h[x*u+m]||(h[x*u+m]={source:null,target:null}),b.target={index:m,startAngle:g,endAngle:g+=s[m*u+x]*d,value:s[m*u+x]},m===x&&(b.source=b.target)),b.source&&b.target&&b.source.value<b.target.value){const w=b.source;b.source=b.target,b.target=w}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}g+=p}}return h=Object.values(h),h.groups=f,o?h.sort(o):h}return a.padAngle=function(s){return arguments.length?(n=d1(0,s),a):n},a.sortGroups=function(s){return arguments.length?(r=s,a):r},a.sortSubgroups=function(s){return arguments.length?(i=s,a):i},a.sortChords=function(s){return arguments.length?(s==null?o=null:(o=qM(s))._=s,a):o&&o._},a}const wl=Math.PI,$l=2*wl,Wn=1e-6,ZM=$l-Wn;function p1(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function KM(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return p1;const n=10**e;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let Ki=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?p1:KM(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,a){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,u=r-e,c=i-n,l=a-e,h=s-n,f=l*l+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>Wn)if(!(Math.abs(h*u-c*l)>Wn)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let d=r-a,p=i-s,g=u*u+c*c,m=d*d+p*p,y=Math.sqrt(g),v=Math.sqrt(f),x=o*Math.tan((wl-Math.acos((g+f-m)/(2*y*v)))/2),b=x/v,w=x/y;Math.abs(b-1)>Wn&&this._append`L${e+b*l},${n+b*h}`,this._append`A${o},${o},0,0,${+(h*d>l*p)},${this._x1=e+w*u},${this._y1=n+w*c}`}}arc(e,n,r,i,o,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),c=e+s,l=n+u,h=1^a,f=a?i-o:o-i;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Wn||Math.abs(this._y1-l)>Wn)&&this._append`L${c},${l}`,r&&(f<0&&(f=f%$l+$l),f>ZM?this._append`A${r},${r},0,1,${h},${e-s},${n-u}A${r},${r},0,1,${h},${this._x1=c},${this._y1=l}`:f>Wn&&this._append`A${r},${r},0,${+(f>=wl)},${h},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Sl(){return new Ki}Sl.prototype=Ki.prototype;function QM(t=3){return new Ki(+t)}var JM=Array.prototype.slice;function qn(t){return function(){return t}}function t7(t){return t.source}function e7(t){return t.target}function g1(t){return t.radius}function n7(t){return t.startAngle}function r7(t){return t.endAngle}function i7(){return 0}function o7(){return 10}function m1(t){var e=t7,n=e7,r=g1,i=g1,o=n7,a=r7,s=i7,u=null;function c(){var l,h=e.apply(this,arguments),f=n.apply(this,arguments),d=s.apply(this,arguments)/2,p=JM.call(arguments),g=+r.apply(this,(p[0]=h,p)),m=o.apply(this,p)-es,y=a.apply(this,p)-es,v=+i.apply(this,(p[0]=f,p)),x=o.apply(this,p)-es,b=a.apply(this,p)-es;if(u||(u=l=Sl()),d>vl&&(l1(y-m)>d*2+vl?y>m?(m+=d,y-=d):(m-=d,y+=d):m=y=(m+y)/2,l1(b-x)>d*2+vl?b>x?(x+=d,b-=d):(x-=d,b+=d):x=b=(x+b)/2),u.moveTo(g*Gr(m),g*zr(m)),u.arc(0,0,g,m,y),m!==x||y!==b)if(t){var w=+t.apply(this,arguments),$=v-w,S=(x+b)/2;u.quadraticCurveTo(0,0,$*Gr(x),$*zr(x)),u.lineTo(v*Gr(S),v*zr(S)),u.lineTo($*Gr(b),$*zr(b))}else u.quadraticCurveTo(0,0,v*Gr(x),v*zr(x)),u.arc(0,0,v,x,b);if(u.quadraticCurveTo(0,0,g*Gr(m),g*zr(m)),u.closePath(),l)return u=null,l+""||null}return t&&(c.headRadius=function(l){return arguments.length?(t=typeof l=="function"?l:qn(+l),c):t}),c.radius=function(l){return arguments.length?(r=i=typeof l=="function"?l:qn(+l),c):r},c.sourceRadius=function(l){return arguments.length?(r=typeof l=="function"?l:qn(+l),c):r},c.targetRadius=function(l){return arguments.length?(i=typeof l=="function"?l:qn(+l),c):i},c.startAngle=function(l){return arguments.length?(o=typeof l=="function"?l:qn(+l),c):o},c.endAngle=function(l){return arguments.length?(a=typeof l=="function"?l:qn(+l),c):a},c.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:qn(+l),c):s},c.source=function(l){return arguments.length?(e=l,c):e},c.target=function(l){return arguments.length?(n=l,c):n},c.context=function(l){return arguments.length?(u=l??null,c):u},c}function a7(){return m1()}function s7(){return m1(o7)}var u7=Array.prototype,y1=u7.slice;function c7(t,e){return t-e}function l7(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}const mn=t=>()=>t;function f7(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=h7(t,e[n]))return i;return 0}function h7(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,s=a-1;o<a;s=o++){var u=t[o],c=u[0],l=u[1],h=t[s],f=h[0],d=h[1];if(d7(u,h,e))return 0;l>r!=d>r&&n<(f-c)*(r-l)/(d-l)+c&&(i=-i)}return i}function d7(t,e,n){var r;return p7(t,e,n)&&g7(t[r=+(t[0]===e[0])],n[r],e[r])}function p7(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function g7(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function m7(){}var Ze=[[],[[[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 Al(){var t=1,e=1,n=Tc,r=u;function i(c){var l=n(c);if(Array.isArray(l))l=l.slice().sort(c7);else{const h=Li(c,y7);for(l=In(...Mc(h[0],h[1],l),l);l[l.length-1]>=h[1];)l.pop();for(;l[1]<h[0];)l.shift()}return l.map(h=>o(c,h))}function o(c,l){const h=l==null?NaN:+l;if(isNaN(h))throw new Error(`invalid value: ${l}`);var f=[],d=[];return a(c,h,function(p){r(p,c,h),l7(p)>0?f.push([p]):d.push(p)}),d.forEach(function(p){for(var g=0,m=f.length,y;g<m;++g)if(f7((y=f[g])[0],p)!==-1){y.push(p);return}}),{type:"MultiPolygon",value:l,coordinates:f}}function a(c,l,h){var f=new Array,d=new Array,p,g,m,y,v,x;for(p=g=-1,y=Xn(c[0],l),Ze[y<<1].forEach(b);++p<t-1;)m=y,y=Xn(c[p+1],l),Ze[m|y<<1].forEach(b);for(Ze[y<<0].forEach(b);++g<e-1;){for(p=-1,y=Xn(c[g*t+t],l),v=Xn(c[g*t],l),Ze[y<<1|v<<2].forEach(b);++p<t-1;)m=y,y=Xn(c[g*t+t+p+1],l),x=v,v=Xn(c[g*t+p+1],l),Ze[m|y<<1|v<<2|x<<3].forEach(b);Ze[y|v<<3].forEach(b)}for(p=-1,v=c[g*t]>=l,Ze[v<<2].forEach(b);++p<t-1;)x=v,v=Xn(c[g*t+p+1],l),Ze[v<<2|x<<3].forEach(b);Ze[v<<3].forEach(b);function b(w){var $=[w[0][0]+p,w[0][1]+g],S=[w[1][0]+p,w[1][1]+g],_=s($),D=s(S),L,P;(L=d[_])?(P=f[D])?(delete d[L.end],delete f[P.start],L===P?(L.ring.push(S),h(L.ring)):f[L.start]=d[P.end]={start:L.start,end:P.end,ring:L.ring.concat(P.ring)}):(delete d[L.end],L.ring.push(S),d[L.end=D]=L):(L=f[D])?(P=d[_])?(delete f[L.start],delete d[P.end],L===P?(L.ring.push(S),h(L.ring)):f[P.start]=d[L.end]={start:P.start,end:L.end,ring:P.ring.concat(L.ring)}):(delete f[L.start],L.ring.unshift($),f[L.start=_]=L):f[_]=d[D]={start:_,end:D,ring:[$,S]}}}function s(c){return c[0]*2+c[1]*(t+1)*4}function u(c,l,h){c.forEach(function(f){var d=f[0],p=f[1],g=d|0,m=p|0,y=Ml(l[m*t+g]);d>0&&d<t&&g===d&&(f[0]=b1(d,Ml(l[m*t+g-1]),y,h)),p>0&&p<e&&m===p&&(f[1]=b1(p,Ml(l[(m-1)*t+g]),y,h))})}return i.contour=o,i.size=function(c){if(!arguments.length)return[t,e];var l=Math.floor(c[0]),h=Math.floor(c[1]);if(!(l>=0&&h>=0))throw new Error("invalid size");return t=l,e=h,i},i.thresholds=function(c){return arguments.length?(n=typeof c=="function"?c:Array.isArray(c)?mn(y1.call(c)):mn(c),i):n},i.smooth=function(c){return arguments.length?(r=c?u:m7,i):r===u},i}function y7(t){return isFinite(t)?t:NaN}function Xn(t,e){return t==null?!1:+t>=e}function Ml(t){return t==null||isNaN(t=+t)?-1/0:t}function b1(t,e,n,r){const i=r-e,o=n-e,a=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(a)?t:t+a-.5}function b7(t){return t[0]}function v7(t){return t[1]}function x7(){return 1}function _7(){var t=b7,e=v7,n=x7,r=960,i=500,o=20,a=2,s=o*3,u=r+s*2>>a,c=i+s*2>>a,l=mn(20);function h(v){var x=new Float32Array(u*c),b=Math.pow(2,-a),w=-1;for(const k of v){var $=(t(k,++w,v)+s)*b,S=(e(k,w,v)+s)*b,_=+n(k,w,v);if(_&&$>=0&&$<u&&S>=0&&S<c){var D=Math.floor($),L=Math.floor(S),P=$-D-.5,I=S-L-.5;x[D+L*u]+=(1-P)*(1-I)*_,x[D+1+L*u]+=P*(1-I)*_,x[D+1+(L+1)*u]+=P*I*_,x[D+(L+1)*u]+=(1-P)*I*_}}return dg({data:x,width:u,height:c},o*b),x}function f(v){var x=h(v),b=l(x),w=Math.pow(2,2*a);return Array.isArray(b)||(b=In(Number.MIN_VALUE,ki(x)/w,b)),Al().size([u,c]).thresholds(b.map($=>$*w))(x).map(($,S)=>($.value=+b[S],d($)))}f.contours=function(v){var x=h(v),b=Al().size([u,c]),w=Math.pow(2,2*a),$=S=>{S=+S;var _=d(b.contour(x,S*w));return _.value=S,_};return Object.defineProperty($,"max",{get:()=>ki(x)/w}),$};function d(v){return v.coordinates.forEach(p),v}function p(v){v.forEach(g)}function g(v){v.forEach(m)}function m(v){v[0]=v[0]*Math.pow(2,a)-s,v[1]=v[1]*Math.pow(2,a)-s}function y(){return s=o*3,u=r+s*2>>a,c=i+s*2>>a,f}return f.x=function(v){return arguments.length?(t=typeof v=="function"?v:mn(+v),f):t},f.y=function(v){return arguments.length?(e=typeof v=="function"?v:mn(+v),f):e},f.weight=function(v){return arguments.length?(n=typeof v=="function"?v:mn(+v),f):n},f.size=function(v){if(!arguments.length)return[r,i];var x=+v[0],b=+v[1];if(!(x>=0&&b>=0))throw new Error("invalid size");return r=x,i=b,y()},f.cellSize=function(v){if(!arguments.length)return 1<<a;if(!((v=+v)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(v)/Math.LN2),y()},f.thresholds=function(v){return arguments.length?(l=typeof v=="function"?v:Array.isArray(v)?mn(y1.call(v)):mn(v),f):l},f.bandwidth=function(v){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((v=+v)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*v*v+1)-1)/2,y()},f}const Ke=11102230246251565e-32,Ot=134217729,w7=(3+8*Ke)*Ke;function Tl(t,e,n,r,i){let o,a,s,u,c=e[0],l=r[0],h=0,f=0;l>c==l>-c?(o=c,c=e[++h]):(o=l,l=r[++f]);let d=0;if(h<t&&f<n)for(l>c==l>-c?(a=c+o,s=o-(a-c),c=e[++h]):(a=l+o,s=o-(a-l),l=r[++f]),o=a,s!==0&&(i[d++]=s);h<t&&f<n;)l>c==l>-c?(a=o+c,u=a-o,s=o-(a-u)+(c-u),c=e[++h]):(a=o+l,u=a-o,s=o-(a-u)+(l-u),l=r[++f]),o=a,s!==0&&(i[d++]=s);for(;h<t;)a=o+c,u=a-o,s=o-(a-u)+(c-u),c=e[++h],o=a,s!==0&&(i[d++]=s);for(;f<n;)a=o+l,u=a-o,s=o-(a-u)+(l-u),l=r[++f],o=a,s!==0&&(i[d++]=s);return(o!==0||d===0)&&(i[d++]=o),d}function $7(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function Qi(t){return new Float64Array(t)}const S7=(3+16*Ke)*Ke,A7=(2+12*Ke)*Ke,M7=(9+64*Ke)*Ke*Ke,Or=Qi(4),v1=Qi(8),x1=Qi(12),_1=Qi(16),Ht=Qi(4);function T7(t,e,n,r,i,o,a){let s,u,c,l,h,f,d,p,g,m,y,v,x,b,w,$,S,_;const D=t-i,L=n-i,P=e-o,I=r-o;b=D*I,f=Ot*D,d=f-(f-D),p=D-d,f=Ot*I,g=f-(f-I),m=I-g,w=p*m-(b-d*g-p*g-d*m),$=P*L,f=Ot*P,d=f-(f-P),p=P-d,f=Ot*L,g=f-(f-L),m=L-g,S=p*m-($-d*g-p*g-d*m),y=w-S,h=w-y,Or[0]=w-(y+h)+(h-S),v=b+y,h=v-b,x=b-(v-h)+(y-h),y=x-$,h=x-y,Or[1]=x-(y+h)+(h-$),_=v+y,h=_-v,Or[2]=v-(_-h)+(y-h),Or[3]=_;let k=$7(4,Or),T=A7*a;if(k>=T||-k>=T||(h=t-D,s=t-(D+h)+(h-i),h=n-L,c=n-(L+h)+(h-i),h=e-P,u=e-(P+h)+(h-o),h=r-I,l=r-(I+h)+(h-o),s===0&&u===0&&c===0&&l===0)||(T=M7*a+w7*Math.abs(k),k+=D*l+I*s-(P*c+L*u),k>=T||-k>=T))return k;b=s*I,f=Ot*s,d=f-(f-s),p=s-d,f=Ot*I,g=f-(f-I),m=I-g,w=p*m-(b-d*g-p*g-d*m),$=u*L,f=Ot*u,d=f-(f-u),p=u-d,f=Ot*L,g=f-(f-L),m=L-g,S=p*m-($-d*g-p*g-d*m),y=w-S,h=w-y,Ht[0]=w-(y+h)+(h-S),v=b+y,h=v-b,x=b-(v-h)+(y-h),y=x-$,h=x-y,Ht[1]=x-(y+h)+(h-$),_=v+y,h=_-v,Ht[2]=v-(_-h)+(y-h),Ht[3]=_;const C=Tl(4,Or,4,Ht,v1);b=D*l,f=Ot*D,d=f-(f-D),p=D-d,f=Ot*l,g=f-(f-l),m=l-g,w=p*m-(b-d*g-p*g-d*m),$=P*c,f=Ot*P,d=f-(f-P),p=P-d,f=Ot*c,g=f-(f-c),m=c-g,S=p*m-($-d*g-p*g-d*m),y=w-S,h=w-y,Ht[0]=w-(y+h)+(h-S),v=b+y,h=v-b,x=b-(v-h)+(y-h),y=x-$,h=x-y,Ht[1]=x-(y+h)+(h-$),_=v+y,h=_-v,Ht[2]=v-(_-h)+(y-h),Ht[3]=_;const M=Tl(C,v1,4,Ht,x1);b=s*l,f=Ot*s,d=f-(f-s),p=s-d,f=Ot*l,g=f-(f-l),m=l-g,w=p*m-(b-d*g-p*g-d*m),$=u*c,f=Ot*u,d=f-(f-u),p=u-d,f=Ot*c,g=f-(f-c),m=c-g,S=p*m-($-d*g-p*g-d*m),y=w-S,h=w-y,Ht[0]=w-(y+h)+(h-S),v=b+y,h=v-b,x=b-(v-h)+(y-h),y=x-$,h=x-y,Ht[1]=x-(y+h)+(h-$),_=v+y,h=_-v,Ht[2]=v-(_-h)+(y-h),Ht[3]=_;const R=Tl(M,x1,4,Ht,_1);return _1[R-1]}function ns(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),u=a-s,c=Math.abs(a+s);return Math.abs(u)>=S7*c?u:-T7(t,e,n,r,i,o,c)}const w1=Math.pow(2,-52),rs=new Uint32Array(512);class is{static from(e,n=k7,r=C7){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const s=e[a];o[2*a]=n(s),o[2*a+1]=r(s)}return new is(o)}constructor(e){const n=e.length>>1;if(n>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),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),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:e,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=e.length>>1;let s=1/0,u=1/0,c=-1/0,l=-1/0;for(let D=0;D<a;D++){const L=e[2*D],P=e[2*D+1];L<s&&(s=L),P<u&&(u=P),L>c&&(c=L),P>l&&(l=P),this._ids[D]=D}const h=(s+c)/2,f=(u+l)/2;let d,p,g;for(let D=0,L=1/0;D<a;D++){const P=Pl(h,f,e[2*D],e[2*D+1]);P<L&&(d=D,L=P)}const m=e[2*d],y=e[2*d+1];for(let D=0,L=1/0;D<a;D++){if(D===d)continue;const P=Pl(m,y,e[2*D],e[2*D+1]);P<L&&P>0&&(p=D,L=P)}let v=e[2*p],x=e[2*p+1],b=1/0;for(let D=0;D<a;D++){if(D===d||D===p)continue;const L=L7(m,y,v,x,e[2*D],e[2*D+1]);L<b&&(g=D,b=L)}let w=e[2*g],$=e[2*g+1];if(b===1/0){for(let P=0;P<a;P++)this._dists[P]=e[2*P]-e[0]||e[2*P+1]-e[1];Ur(this._ids,this._dists,0,a-1);const D=new Uint32Array(a);let L=0;for(let P=0,I=-1/0;P<a;P++){const k=this._ids[P],T=this._dists[k];T>I&&(D[L++]=k,I=T)}this.hull=D.subarray(0,L),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(ns(m,y,v,x,w,$)<0){const D=p,L=v,P=x;p=g,v=w,x=$,g=D,w=L,$=P}const S=E7(m,y,v,x,w,$);this._cx=S.x,this._cy=S.y;for(let D=0;D<a;D++)this._dists[D]=Pl(e[2*D],e[2*D+1],S.x,S.y);Ur(this._ids,this._dists,0,a-1),this._hullStart=d;let _=3;r[d]=n[g]=p,r[p]=n[d]=g,r[g]=n[p]=d,i[d]=0,i[p]=1,i[g]=2,o.fill(-1),o[this._hashKey(m,y)]=d,o[this._hashKey(v,x)]=p,o[this._hashKey(w,$)]=g,this.trianglesLen=0,this._addTriangle(d,p,g,-1,-1,-1);for(let D=0,L,P;D<this._ids.length;D++){const I=this._ids[D],k=e[2*I],T=e[2*I+1];if(D>0&&Math.abs(k-L)<=w1&&Math.abs(T-P)<=w1||(L=k,P=T,I===d||I===p||I===g))continue;let C=0;for(let N=0,z=this._hashKey(k,T);N<this._hashSize&&(C=o[(z+N)%this._hashSize],!(C!==-1&&C!==r[C]));N++);C=n[C];let M=C,R;for(;R=r[M],ns(k,T,e[2*M],e[2*M+1],e[2*R],e[2*R+1])>=0;)if(M=R,M===C){M=-1;break}if(M===-1)continue;let G=this._addTriangle(M,I,r[M],-1,-1,i[M]);i[I]=this._legalize(G+2),i[M]=G,_++;let A=r[M];for(;R=r[A],ns(k,T,e[2*A],e[2*A+1],e[2*R],e[2*R+1])<0;)G=this._addTriangle(A,I,R,i[I],-1,i[A]),i[I]=this._legalize(G+2),r[A]=A,_--,A=R;if(M===C)for(;R=n[M],ns(k,T,e[2*R],e[2*R+1],e[2*M],e[2*M+1])<0;)G=this._addTriangle(R,I,M,-1,i[M],i[R]),this._legalize(G+2),i[R]=G,r[M]=M,_--,M=R;this._hullStart=n[I]=M,r[M]=n[A]=I,r[I]=A,o[this._hashKey(k,T)]=I,o[this._hashKey(e[2*M],e[2*M+1])]=M}this.hull=new Uint32Array(_);for(let D=0,L=this._hullStart;D<_;D++)this.hull[D]=L,L=r[L];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(P7(e-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const s=r[e],u=e-e%3;if(a=u+(e+2)%3,s===-1){if(o===0)break;e=rs[--o];continue}const c=s-s%3,l=u+(e+1)%3,h=c+(s+2)%3,f=n[a],d=n[e],p=n[l],g=n[h];if(D7(i[2*f],i[2*f+1],i[2*d],i[2*d+1],i[2*p],i[2*p+1],i[2*g],i[2*g+1])){n[e]=g,n[s]=f;const y=r[h];if(y===-1){let x=this._hullStart;do{if(this._hullTri[x]===h){this._hullTri[x]=e;break}x=this._hullPrev[x]}while(x!==this._hullStart)}this._link(e,y),this._link(s,r[a]),this._link(a,h);const v=c+(s+1)%3;o<rs.length&&(rs[o++]=v)}else{if(o===0)break;e=rs[--o]}}return a}_link(e,n){this._halfedges[e]=n,n!==-1&&(this._halfedges[n]=e)}_addTriangle(e,n,r,i,o,a){const s=this.trianglesLen;return this._triangles[s]=e,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,o),this._link(s+2,a),this.trianglesLen+=3,s}}function P7(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Pl(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function D7(t,e,n,r,i,o,a,s){const u=t-a,c=e-s,l=n-a,h=r-s,f=i-a,d=o-s,p=u*u+c*c,g=l*l+h*h,m=f*f+d*d;return u*(h*m-g*d)-c*(l*m-g*f)+p*(l*d-h*f)<0}function L7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,c=o-e,l=a*a+s*s,h=u*u+c*c,f=.5/(a*c-s*u),d=(c*l-s*h)*f,p=(a*h-u*l)*f;return d*d+p*p}function E7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,c=o-e,l=a*a+s*s,h=u*u+c*c,f=.5/(a*c-s*u),d=t+(c*l-s*h)*f,p=e+(a*h-u*l)*f;return{x:d,y:p}}function Ur(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const o=t[i],a=e[o];let s=i-1;for(;s>=n&&e[t[s]]>a;)t[s+1]=t[s--];t[s+1]=o}else{const i=n+r>>1;let o=n+1,a=r;Ji(t,i,o),e[t[n]]>e[t[r]]&&Ji(t,n,r),e[t[o]]>e[t[r]]&&Ji(t,o,r),e[t[n]]>e[t[o]]&&Ji(t,n,o);const s=t[o],u=e[s];for(;;){do o++;while(e[t[o]]<u);do a--;while(e[t[a]]>u);if(a<o)break;Ji(t,o,a)}t[n+1]=t[a],t[a]=s,r-o+1>=a-n?(Ur(t,e,o,r),Ur(t,e,n,a-1)):(Ur(t,e,n,a-1),Ur(t,e,o,r))}}function Ji(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function k7(t){return t[0]}function C7(t){return t[1]}const $1=1e-6;class jn{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,n){this._+=`L${this._x1=+e},${this._y1=+n}`}arc(e,n,r){e=+e,n=+n,r=+r;const i=e+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>$1||Math.abs(this._y1-o)>$1)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${e-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(e,n,r,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class Dl{constructor(){this._=[]}moveTo(e,n){this._.push([e,n])}closePath(){this._.push(this._[0].slice())}lineTo(e,n){this._.push([e,n])}value(){return this._.length?this._:null}}class S1{constructor(e,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:n,triangles:r},vectors:i}=this;let o,a;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let g=0,m=0,y=r.length,v,x;g<y;g+=3,m+=2){const b=r[g]*2,w=r[g+1]*2,$=r[g+2]*2,S=e[b],_=e[b+1],D=e[w],L=e[w+1],P=e[$],I=e[$+1],k=D-S,T=L-_,C=P-S,M=I-_,R=(k*M-T*C)*2;if(Math.abs(R)<1e-9){if(o===void 0){o=a=0;for(const A of n)o+=e[A*2],a+=e[A*2+1];o/=n.length,a/=n.length}const G=1e9*Math.sign((o-S)*M-(a-_)*C);v=(S+P)/2-G*M,x=(_+I)/2+G*C}else{const G=1/R,A=k*k+T*T,N=C*C+M*M;v=S+(M*A-T*N)*G,x=_+(k*N-C*A)*G}s[m]=v,s[m+1]=x}let u=n[n.length-1],c,l=u*4,h,f=e[2*u],d,p=e[2*u+1];i.fill(0);for(let g=0;g<n.length;++g)u=n[g],c=l,h=f,d=p,l=u*4,f=e[2*u],p=e[2*u+1],i[c+2]=i[l]=d-p,i[c+3]=i[l+1]=f-h}render(e){const n=e==null?e=new jn:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let l=0,h=r.length;l<h;++l){const f=r[l];if(f<l)continue;const d=Math.floor(l/3)*2,p=Math.floor(f/3)*2,g=a[d],m=a[d+1],y=a[p],v=a[p+1];this._renderSegment(g,m,y,v,e)}let u,c=o[o.length-1];for(let l=0;l<o.length;++l){u=c,c=o[l];const h=Math.floor(i[c]/3)*2,f=a[h],d=a[h+1],p=u*4,g=this._project(f,d,s[p+2],s[p+3]);g&&this._renderSegment(f,d,g[0],g[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new jn:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(e,n){const r=n==null?n=new jn:void 0,i=this._clip(e);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let n=0,r=e.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(e){const n=new Dl;return this.renderCell(e,n),n.value()}_renderSegment(e,n,r,i,o){let a;const s=this._regioncode(e,n),u=this._regioncode(r,i);s===0&&u===0?(o.moveTo(e,n),o.lineTo(r,i)):(a=this._clipSegment(e,n,r,i,s,u))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(e,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(e,n,r)===e}*neighbors(e){const n=this._clip(e);if(n)for(const r of this.delaunay.neighbors(e)){const i=this._clip(r);if(i){t:for(let o=0,a=n.length;o<a;o+=2)for(let s=0,u=i.length;s<u;s+=2)if(n[o]===i[s]&&n[o+1]===i[s+1]&&n[(o+2)%a]===i[(s+u-2)%u]&&n[(o+3)%a]===i[(s+u-1)%u]){yield r;break t}}}}_cell(e){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[e];if(a===-1)return null;const s=[];let u=a;do{const c=Math.floor(u/3);if(s.push(n[c*2],n[c*2+1]),u=u%3===2?u-2:u+1,o[u]!==e)break;u=i[u]}while(u!==a&&u!==-1);return s}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(e);if(n===null)return null;const{vectors:r}=this,i=e*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(e,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(e,n))}_clipFinite(e,n){const r=n.length;let i=null,o,a,s=n[r-2],u=n[r-1],c,l=this._regioncode(s,u),h,f=0;for(let d=0;d<r;d+=2)if(o=s,a=u,s=n[d],u=n[d+1],c=l,l=this._regioncode(s,u),c===0&&l===0)h=f,f=0,i?i.push(s,u):i=[s,u];else{let p,g,m,y,v;if(c===0){if((p=this._clipSegment(o,a,s,u,c,l))===null)continue;[g,m,y,v]=p}else{if((p=this._clipSegment(s,u,o,a,l,c))===null)continue;[y,v,g,m]=p,h=f,f=this._edgecode(g,m),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(g,m):i=[g,m]}h=f,f=this._edgecode(y,v),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(y,v):i=[y,v]}if(i)h=f,f=this._edgecode(i[0],i[1]),h&&f&&this._edge(e,h,f,i,i.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(e,n,r,i,o,a){const s=o<a;for(s&&([e,n,r,i,o,a]=[r,i,e,n,a,o]);;){if(o===0&&a===0)return s?[r,i,e,n]:[e,n,r,i];if(o&a)return null;let u,c,l=o||a;l&8?(u=e+(r-e)*(this.ymax-n)/(i-n),c=this.ymax):l&4?(u=e+(r-e)*(this.ymin-n)/(i-n),c=this.ymin):l&2?(c=n+(i-n)*(this.xmax-e)/(r-e),u=this.xmax):(c=n+(i-n)*(this.xmin-e)/(r-e),u=this.xmin),o?(e=u,n=c,o=this._regioncode(e,n)):(r=u,i=c,a=this._regioncode(r,i))}}_clipInfinite(e,n,r,i,o,a){let s=Array.from(n),u;if((u=this._project(s[0],s[1],r,i))&&s.unshift(u[0],u[1]),(u=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(u[0],u[1]),s=this._clipFinite(e,s))for(let c=0,l=s.length,h,f=this._edgecode(s[l-2],s[l-1]);c<l;c+=2)h=f,f=this._edgecode(s[c],s[c+1]),h&&f&&(c=this._edge(e,h,f,s,c),l=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,n,r,i,o){for(;n!==r;){let a,s;switch(n){case 5:n=4;continue;case 4:n=6,a=this.xmax,s=this.ymin;break;case 6:n=2;continue;case 2:n=10,a=this.xmax,s=this.ymax;break;case 10:n=8;continue;case 8:n=9,a=this.xmin,s=this.ymax;break;case 9:n=1;continue;case 1:n=5,a=this.xmin,s=this.ymin;break}(i[o]!==a||i[o+1]!==s)&&this.contains(e,a,s)&&(i.splice(o,0,a,s),o+=2)}return o}_project(e,n,r,i){let o=1/0,a,s,u;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(u=this.ymin,s=e+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(u=this.ymax,s=e+(o=a)*r)}if(r>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/r)<o&&(s=this.xmax,u=n+(o=a)*i)}else if(r<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/r)<o&&(s=this.xmin,u=n+(o=a)*i)}return[s,u]}_edgecode(e,n){return(e===this.xmin?1:e===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(e,n){return(e<this.xmin?1:e>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let n=0;n<e.length;n+=2){const r=(n+2)%e.length,i=(n+4)%e.length;(e[n]===e[r]&&e[r]===e[i]||e[n+1]===e[r+1]&&e[r+1]===e[i+1])&&(e.splice(r,2),n-=2)}e.length||(e=null)}return e}}const I7=2*Math.PI,Br=Math.pow;function R7(t){return t[0]}function N7(t){return t[1]}function F7(t){const{triangles:e,coords:n}=t;for(let r=0;r<e.length;r+=3){const i=2*e[r],o=2*e[r+1],a=2*e[r+2];if((n[a]-n[i])*(n[o+1]-n[i+1])-(n[o]-n[i])*(n[a+1]-n[i+1])>1e-10)return!1}return!0}function G7(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Ll{static from(e,n=R7,r=N7,i){return new Ll("length"in e?z7(e,n,r,i):Float64Array.from(O7(e,n,r,i)))}constructor(e){this._delaunator=new is(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,n=this.points;if(e.hull&&e.hull.length>2&&F7(e)){this.collinear=Int32Array.from({length:n.length/2},(f,d)=>d).sort((f,d)=>n[2*f]-n[2*d]||n[2*f+1]-n[2*d+1]);const u=this.collinear[0],c=this.collinear[this.collinear.length-1],l=[n[2*u],n[2*u+1],n[2*c],n[2*c+1]],h=1e-8*Math.hypot(l[3]-l[1],l[2]-l[0]);for(let f=0,d=n.length/2;f<d;++f){const p=G7(n[2*f],n[2*f+1],h);n[2*f]=p[0],n[2*f+1]=p[1]}this._delaunator=new is(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let u=0,c=r.length;u<c;++u){const l=o[u%3===2?u-2:u+1];(r[u]===-1||a[l]===-1)&&(a[l]=u)}for(let u=0,c=i.length;u<c;++u)s[i[u]]=u;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new S1(this,e)}*neighbors(e){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:s}=this;if(s){const h=s.indexOf(e);h>0&&(yield s[h-1]),h<s.length-1&&(yield s[h+1]);return}const u=n[e];if(u===-1)return;let c=u,l=-1;do{if(yield l=a[c],c=c%3===2?c-2:c+1,a[c]!==e)return;if(c=o[c],c===-1){const h=r[(i[e]+1)%r.length];h!==l&&(yield h);return}}while(c!==u)}find(e,n,r=0){if(e=+e,e!==e||(n=+n,n!==n))return-1;const i=r;let o;for(;(o=this._step(r,e,n))>=0&&o!==r&&o!==i;)r=o;return o}_step(e,n,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:s,triangles:u,points:c}=this;if(i[e]===-1||!c.length)return(e+1)%(c.length>>1);let l=e,h=Br(n-c[e*2],2)+Br(r-c[e*2+1],2);const f=i[e];let d=f;do{let p=u[d];const g=Br(n-c[p*2],2)+Br(r-c[p*2+1],2);if(g<h&&(h=g,l=p),d=d%3===2?d-2:d+1,u[d]!==e)break;if(d=s[d],d===-1){if(d=o[(a[e]+1)%o.length],d!==p&&Br(n-c[d*2],2)+Br(r-c[d*2+1],2)<h)return d;break}}while(d!==f);return l}render(e){const n=e==null?e=new jn:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,s=i.length;a<s;++a){const u=i[a];if(u<a)continue;const c=o[a]*2,l=o[u]*2;e.moveTo(r[c],r[c+1]),e.lineTo(r[l],r[l+1])}return this.renderHull(e),n&&n.value()}renderPoints(e,n){n===void 0&&(!e||typeof e.moveTo!="function")&&(n=e,e=null),n=n==null?2:+n;const r=e==null?e=new jn:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const s=i[o],u=i[o+1];e.moveTo(s+n,u),e.arc(s,u,n,0,I7)}return r&&r.value()}renderHull(e){const n=e==null?e=new jn:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;e.moveTo(i[o],i[o+1]);for(let s=1;s<a;++s){const u=2*r[s];e.lineTo(i[u],i[u+1])}return e.closePath(),n&&n.value()}hullPolygon(){const e=new Dl;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new jn:void 0,{points:i,triangles:o}=this,a=o[e*=3]*2,s=o[e+1]*2,u=o[e+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[u],i[u+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:e}=this;for(let n=0,r=e.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(e){const n=new Dl;return this.renderTriangle(e,n),n.value()}}function z7(t,e,n,r){const i=t.length,o=new Float64Array(i*2);for(let a=0;a<i;++a){const s=t[a];o[a*2]=e.call(r,s,a,t),o[a*2+1]=n.call(r,s,a,t)}return o}function*O7(t,e,n,r){let i=0;for(const o of t)yield e.call(r,o,i,t),yield n.call(r,o,i,t),++i}var A1={},El={},kl=34,to=10,Cl=13;function M1(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function U7(t,e){var n=M1(t);return function(r,i){return e(n(r),i,t)}}function T1(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var i in r)i in e||n.push(e[i]=i)}),n}function ne(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function B7(t){return t<0?"-"+ne(-t,6):t>9999?"+"+ne(t,6):ne(t,4)}function Y7(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":B7(t.getUTCFullYear())+"-"+ne(t.getUTCMonth()+1,2)+"-"+ne(t.getUTCDate(),2)+(i?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"."+ne(i,3)+"Z":r?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"Z":n||e?"T"+ne(e,2)+":"+ne(n,2)+"Z":"")}function os(t){var e=new RegExp('["'+t+`
|
6
|
+
\r]`),n=t.charCodeAt(0);function r(h,f){var d,p,g=i(h,function(m,y){if(d)return d(m,y-1);p=m,d=f?U7(m,f):M1(m)});return g.columns=p||[],g}function i(h,f){var d=[],p=h.length,g=0,m=0,y,v=p<=0,x=!1;h.charCodeAt(p-1)===to&&--p,h.charCodeAt(p-1)===Cl&&--p;function b(){if(v)return El;if(x)return x=!1,A1;var $,S=g,_;if(h.charCodeAt(S)===kl){for(;g++<p&&h.charCodeAt(g)!==kl||h.charCodeAt(++g)===kl;);return($=g)>=p?v=!0:(_=h.charCodeAt(g++))===to?x=!0:_===Cl&&(x=!0,h.charCodeAt(g)===to&&++g),h.slice(S+1,$-1).replace(/""/g,'"')}for(;g<p;){if((_=h.charCodeAt($=g++))===to)x=!0;else if(_===Cl)x=!0,h.charCodeAt(g)===to&&++g;else if(_!==n)continue;return h.slice(S,$)}return v=!0,h.slice(S,p)}for(;(y=b())!==El;){for(var w=[];y!==A1&&y!==El;)w.push(y),y=b();f&&(w=f(w,m++))==null||d.push(w)}return d}function o(h,f){return h.map(function(d){return f.map(function(p){return l(d[p])}).join(t)})}function a(h,f){return f==null&&(f=T1(h)),[f.map(l).join(t)].concat(o(h,f)).join(`
|
7
|
+
`)}function s(h,f){return f==null&&(f=T1(h)),o(h,f).join(`
|
8
8
|
`)}function u(h){return h.map(c).join(`
|
9
|
-
`)}function c(h){return h.map(l).join(t)}function l(h){return h==null?"":h instanceof Date?z7(h):e.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:u,formatRow:c,formatValue:l}}var Vn=os(","),T1=Vn.parse,O7=Vn.parseRows,U7=Vn.format,B7=Vn.formatBody,Y7=Vn.formatRows,W7=Vn.formatRow,H7=Vn.formatValue,Zn=os(" "),P1=Zn.parse,q7=Zn.parseRows,X7=Zn.format,j7=Zn.formatBody,V7=Zn.formatRows,Z7=Zn.formatRow,K7=Zn.formatValue;function Q7(t){for(var e in t){var n=t[e].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))J7&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const J7=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function t9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function e9(t,e){return fetch(t,e).then(t9)}function n9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function r9(t,e){return fetch(t,e).then(n9)}function i9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function as(t,e){return fetch(t,e).then(i9)}function D1(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),as(e,n).then(function(i){return t(i,r)})}}function o9(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=os(t);return as(e,n).then(function(o){return i.parse(o,r)})}var a9=D1(T1),s9=D1(P1);function u9(t,e){return new Promise(function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t})}function c9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function l9(t,e){return fetch(t,e).then(c9)}function Il(t){return(e,n)=>as(e,n).then(r=>new DOMParser().parseFromString(r,t))}const f9=Il("application/xml");var h9=Il("text/html"),d9=Il("image/svg+xml");function p9(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,u=0,c=0;for(o=0;o<a;++o)s=n[o],u+=s.x,c+=s.y;for(u=(u/a-t)*r,c=(c/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=u,s.y-=c}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function g9(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return L1(this.cover(e,n),e,n,t)}function L1(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,a={data:r},s=t._x0,u=t._y0,c=t._x1,l=t._y1,h,f,d,p,g,m,y,v;if(!o)return t._root=a,t;for(;o.length;)if((g=e>=(h=(s+c)/2))?s=h:c=h,(m=n>=(f=(u+l)/2))?u=f:l=f,i=o,!(o=o[y=m<<1|g]))return i[y]=a,t;if(d=+t._x.call(null,o.data),p=+t._y.call(null,o.data),e===d&&n===p)return a.next=o,i?i[y]=a:t._root=a,t;do i=i?i[y]=new Array(4):t._root=new Array(4),(g=e>=(h=(s+c)/2))?s=h:c=h,(m=n>=(f=(u+l)/2))?u=f:l=f;while((y=m<<1|g)===(v=(p>=f)<<1|d>=h));return i[v]=o,i[y]=a,t}function m9(t){var e,n,r=t.length,i,o,a=new Array(r),s=new Array(r),u=1/0,c=1/0,l=-1/0,h=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,s[n]=o,i<u&&(u=i),i>l&&(l=i),o<c&&(c=o),o>h&&(h=o));if(u>l||c>h)return this;for(this.cover(u,c).cover(l,h),n=0;n<r;++n)L1(this,a[n],s[n],t[n]);return this}function y9(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a=i-n||1,s=this._root,u,c;n>t||t>=i||r>e||e>=o;)switch(c=(e<r)<<1|t<n,u=new Array(4),u[c]=s,s=u,a*=2,c){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function b9(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function v9(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Ht(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function x9(t,e,n){var r,i=this._x0,o=this._y0,a,s,u,c,l=this._x1,h=this._y1,f=[],d=this._root,p,g;for(d&&f.push(new Ht(d,i,o,l,h)),n==null?n=1/0:(i=t-n,o=e-n,l=t+n,h=e+n,n*=n);p=f.pop();)if(!(!(d=p.node)||(a=p.x0)>l||(s=p.y0)>h||(u=p.x1)<i||(c=p.y1)<o))if(d.length){var m=(a+u)/2,y=(s+c)/2;f.push(new Ht(d[3],m,y,u,c),new Ht(d[2],a,y,m,c),new Ht(d[1],m,s,u,y),new Ht(d[0],a,s,m,y)),(g=(e>=y)<<1|t>=m)&&(p=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=p)}else{var v=t-+this._x.call(null,d.data),x=e-+this._y.call(null,d.data),b=v*v+x*x;if(b<n){var w=Math.sqrt(n=b);i=t-w,o=e-w,l=t+w,h=e+w,r=d.data}}return r}function _9(t){if(isNaN(l=+this._x.call(null,t))||isNaN(h=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,a=this._x0,s=this._y0,u=this._x1,c=this._y1,l,h,f,d,p,g,m,y;if(!n)return this;if(n.length)for(;;){if((p=l>=(f=(a+u)/2))?a=f:u=f,(g=h>=(d=(s+c)/2))?s=d:c=d,e=n,!(n=n[m=g<<1|p]))return this;if(!n.length)break;(e[m+1&3]||e[m+2&3]||e[m+3&3])&&(r=e,y=m)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[m]=o:delete e[m],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=o,this)}function w9(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function $9(){return this._root}function S9(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function A9(t){var e=[],n,r=this._root,i,o,a,s,u;for(r&&e.push(new Ht(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,a=n.y0,s=n.x1,u=n.y1)&&r.length){var c=(o+s)/2,l=(a+u)/2;(i=r[3])&&e.push(new Ht(i,c,l,s,u)),(i=r[2])&&e.push(new Ht(i,o,l,c,u)),(i=r[1])&&e.push(new Ht(i,c,a,s,l)),(i=r[0])&&e.push(new Ht(i,o,a,c,l))}return this}function M9(t){var e=[],n=[],r;for(this._root&&e.push(new Ht(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,u=r.x1,c=r.y1,l=(a+u)/2,h=(s+c)/2;(o=i[0])&&e.push(new Ht(o,a,s,l,h)),(o=i[1])&&e.push(new Ht(o,l,s,u,h)),(o=i[2])&&e.push(new Ht(o,a,h,l,c)),(o=i[3])&&e.push(new Ht(o,l,h,u,c))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function T9(t){return t[0]}function P9(t){return arguments.length?(this._x=t,this):this._x}function D9(t){return t[1]}function L9(t){return arguments.length?(this._y=t,this):this._y}function ss(t,e,n){var r=new Rl(e??T9,n??D9,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Rl(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function E1(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var qt=ss.prototype=Rl.prototype;qt.copy=function(){var t=new Rl(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=E1(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=E1(r));return t},qt.add=g9,qt.addAll=m9,qt.cover=y9,qt.data=b9,qt.extent=v9,qt.find=x9,qt.remove=_9,qt.removeAll=w9,qt.root=$9,qt.size=S9,qt.visit=A9,qt.visitAfter=M9,qt.x=P9,qt.y=L9;function Lt(t){return function(){return t}}function mn(t){return(t()-.5)*1e-6}function E9(t){return t.x+t.vx}function k9(t){return t.y+t.vy}function k1(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Lt(t==null?1:+t));function a(){for(var c,l=e.length,h,f,d,p,g,m,y=0;y<o;++y)for(h=ss(e,E9,k9).visitAfter(s),c=0;c<l;++c)f=e[c],g=n[f.index],m=g*g,d=f.x+f.vx,p=f.y+f.vy,h.visit(v);function v(x,b,w,$,A){var _=x.data,L=x.r,E=g+L;if(_){if(_.index>f.index){var T=d-_.x-_.vx,I=p-_.y-_.vy,P=T*T+I*I;P<E*E&&(T===0&&(T=mn(r),P+=T*T),I===0&&(I=mn(r),P+=I*I),P=(E-(P=Math.sqrt(P)))/P*i,f.vx+=(T*=P)*(E=(L*=L)/(m+L)),f.vy+=(I*=P)*E,_.vx-=T*(E=1-E),_.vy-=I*E)}return}return b>d+E||$<d-E||w>p+E||A<p-E}}function s(c){if(c.data)return c.r=n[c.data.index];for(var l=c.r=0;l<4;++l)c[l]&&c[l].r>c.r&&(c.r=c[l].r)}function u(){if(e){var c,l=e.length,h;for(n=new Array(l),c=0;c<l;++c)h=e[c],n[h.index]=+t(h,c,e)}}return a.initialize=function(c,l){e=c,r=l,u()},a.iterations=function(c){return arguments.length?(o=+c,a):o},a.strength=function(c){return arguments.length?(i=+c,a):i},a.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Lt(+c),u(),a):t},a}function C9(t){return t.index}function C1(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function I9(t){var e=C9,n=h,r,i=Lt(30),o,a,s,u,c,l=1;t==null&&(t=[]);function h(m){return 1/Math.min(s[m.source.index],s[m.target.index])}function f(m){for(var y=0,v=t.length;y<l;++y)for(var x=0,b,w,$,A,_,L,E;x<v;++x)b=t[x],w=b.source,$=b.target,A=$.x+$.vx-w.x-w.vx||mn(c),_=$.y+$.vy-w.y-w.vy||mn(c),L=Math.sqrt(A*A+_*_),L=(L-o[x])/L*m*r[x],A*=L,_*=L,$.vx-=A*(E=u[x]),$.vy-=_*E,w.vx+=A*(E=1-E),w.vy+=_*E}function d(){if(a){var m,y=a.length,v=t.length,x=new Map(a.map((w,$)=>[e(w,$,a),w])),b;for(m=0,s=new Array(y);m<v;++m)b=t[m],b.index=m,typeof b.source!="object"&&(b.source=C1(x,b.source)),typeof b.target!="object"&&(b.target=C1(x,b.target)),s[b.source.index]=(s[b.source.index]||0)+1,s[b.target.index]=(s[b.target.index]||0)+1;for(m=0,u=new Array(v);m<v;++m)b=t[m],u[m]=s[b.source.index]/(s[b.source.index]+s[b.target.index]);r=new Array(v),p(),o=new Array(v),g()}}function p(){if(a)for(var m=0,y=t.length;m<y;++m)r[m]=+n(t[m],m,t)}function g(){if(a)for(var m=0,y=t.length;m<y;++m)o[m]=+i(t[m],m,t)}return f.initialize=function(m,y){a=m,c=y,d()},f.links=function(m){return arguments.length?(t=m,d(),f):t},f.id=function(m){return arguments.length?(e=m,f):e},f.iterations=function(m){return arguments.length?(l=+m,f):l},f.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Lt(+m),p(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Lt(+m),g(),f):i},f}const R9=1664525,N9=1013904223,I1=4294967296;function F9(){let t=1;return()=>(t=(R9*t+N9)%I1)/I1}function G9(t){return t.x}function z9(t){return t.y}var O9=10,U9=Math.PI*(3-Math.sqrt(5));function R1(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=Xa(h),c=Nn("tick","end"),l=F9();t==null&&(t=[]);function h(){f(),c.call("tick",e),n<r&&(u.stop(),c.call("end",e))}function f(g){var m,y=t.length,v;g===void 0&&(g=1);for(var x=0;x<g;++x)for(n+=(o-n)*i,s.forEach(function(b){b(n)}),m=0;m<y;++m)v=t[m],v.fx==null?v.x+=v.vx*=a:(v.x=v.fx,v.vx=0),v.fy==null?v.y+=v.vy*=a:(v.y=v.fy,v.vy=0);return e}function d(){for(var g=0,m=t.length,y;g<m;++g){if(y=t[g],y.index=g,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var v=O9*Math.sqrt(.5+g),x=g*U9;y.x=v*Math.cos(x),y.y=v*Math.sin(x)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function p(g){return g.initialize&&g.initialize(t,l),g}return d(),e={tick:f,restart:function(){return u.restart(h),e},stop:function(){return u.stop(),e},nodes:function(g){return arguments.length?(t=g,d(),s.forEach(p),e):t},alpha:function(g){return arguments.length?(n=+g,e):n},alphaMin:function(g){return arguments.length?(r=+g,e):r},alphaDecay:function(g){return arguments.length?(i=+g,e):+i},alphaTarget:function(g){return arguments.length?(o=+g,e):o},velocityDecay:function(g){return arguments.length?(a=1-g,e):1-a},randomSource:function(g){return arguments.length?(l=g,s.forEach(p),e):l},force:function(g,m){return arguments.length>1?(m==null?s.delete(g):s.set(g,p(m)),e):s.get(g)},find:function(g,m,y){var v=0,x=t.length,b,w,$,A,_;for(y==null?y=1/0:y*=y,v=0;v<x;++v)A=t[v],b=g-A.x,w=m-A.y,$=b*b+w*w,$<y&&(_=A,y=$);return _},on:function(g,m){return arguments.length>1?(c.on(g,m),e):c.on(g)}}}function N1(){var t,e,n,r,i=Lt(-30),o,a=1,s=1/0,u=.81;function c(d){var p,g=t.length,m=ss(t,G9,z9).visitAfter(h);for(r=d,p=0;p<g;++p)e=t[p],m.visit(f)}function l(){if(t){var d,p=t.length,g;for(o=new Array(p),d=0;d<p;++d)g=t[d],o[g.index]=+i(g,d,t)}}function h(d){var p=0,g,m,y=0,v,x,b;if(d.length){for(v=x=b=0;b<4;++b)(g=d[b])&&(m=Math.abs(g.value))&&(p+=g.value,y+=m,v+=m*g.x,x+=m*g.y);d.x=v/y,d.y=x/y}else{g=d,g.x=g.data.x,g.y=g.data.y;do p+=o[g.data.index];while(g=g.next)}d.value=p}function f(d,p,g,m){if(!d.value)return!0;var y=d.x-e.x,v=d.y-e.y,x=m-p,b=y*y+v*v;if(x*x/u<b)return b<s&&(y===0&&(y=mn(n),b+=y*y),v===0&&(v=mn(n),b+=v*v),b<a&&(b=Math.sqrt(a*b)),e.vx+=y*d.value*r/b,e.vy+=v*d.value*r/b),!0;if(d.length||b>=s)return;(d.data!==e||d.next)&&(y===0&&(y=mn(n),b+=y*y),v===0&&(v=mn(n),b+=v*v),b<a&&(b=Math.sqrt(a*b)));do d.data!==e&&(x=o[d.data.index]*r/b,e.vx+=y*x,e.vy+=v*x);while(d=d.next)}return c.initialize=function(d,p){t=d,n=p,l()},c.strength=function(d){return arguments.length?(i=typeof d=="function"?d:Lt(+d),l(),c):i},c.distanceMin=function(d){return arguments.length?(a=d*d,c):Math.sqrt(a)},c.distanceMax=function(d){return arguments.length?(s=d*d,c):Math.sqrt(s)},c.theta=function(d){return arguments.length?(u=d*d,c):Math.sqrt(u)},c}function B9(t,e,n){var r,i=Lt(.1),o,a;typeof t!="function"&&(t=Lt(+t)),e==null&&(e=0),n==null&&(n=0);function s(c){for(var l=0,h=r.length;l<h;++l){var f=r[l],d=f.x-e||1e-6,p=f.y-n||1e-6,g=Math.sqrt(d*d+p*p),m=(a[l]-g)*o[l]*c/g;f.vx+=d*m,f.vy+=p*m}}function u(){if(r){var c,l=r.length;for(o=new Array(l),a=new Array(l),c=0;c<l;++c)a[c]=+t(r[c],c,r),o[c]=isNaN(a[c])?0:+i(r[c],c,r)}}return s.initialize=function(c){r=c,u()},s.strength=function(c){return arguments.length?(i=typeof c=="function"?c:Lt(+c),u(),s):i},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Lt(+c),u(),s):t},s.x=function(c){return arguments.length?(e=+c,s):e},s.y=function(c){return arguments.length?(n=+c,s):n},s}function F1(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,c=n.length,l;u<c;++u)l=n[u],l.vx+=(i[u]-l.x)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Lt(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Lt(+s),a(),o):t},o}function G1(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,c=n.length,l;u<c;++u)l=n[u],l.vy+=(i[u]-l.y)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Lt(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Lt(+s),a(),o):t},o}function Y9(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function us(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Yr(t){return t=us(Math.abs(t)),t?t[1]:NaN}function W9(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function H9(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var q9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wr(t){if(!(e=q9.exec(t)))throw new Error("invalid format: "+t);var e;return new cs({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Wr.prototype=cs.prototype;function cs(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}cs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function X9(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var z1;function j9(t,e){var n=us(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(z1=Math.max(-8,Math.min(8,Math.floor(i/3)))*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")+us(t,Math.max(0,e+o-1))[0]}function O1(t,e){var n=us(t,e);if(!n)return t+"";var r=n[0],i=n[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")}const U1={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Y9,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>O1(t*100,e),r:O1,s:j9,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function B1(t){return t}var Y1=Array.prototype.map,W1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function H1(t){var e=t.grouping===void 0||t.thousands===void 0?B1:W9(Y1.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?B1:H9(Y1.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(h){h=Wr(h);var f=h.fill,d=h.align,p=h.sign,g=h.symbol,m=h.zero,y=h.width,v=h.comma,x=h.precision,b=h.trim,w=h.type;w==="n"?(v=!0,w="g"):U1[w]||(x===void 0&&(x=12),b=!0,w="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var $=g==="$"?n:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",A=g==="$"?r:/[%p]/.test(w)?a:"",_=U1[w],L=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function E(T){var I=$,P=A,D,C,S;if(w==="c")P=_(T)+P,T="";else{T=+T;var R=T<0||1/T<0;if(T=isNaN(T)?u:_(Math.abs(T),x),b&&(T=X9(T)),R&&+T==0&&p!=="+"&&(R=!1),I=(R?p==="("?p:s:p==="-"||p==="("?"":p)+I,P=(w==="s"?W1[8+z1/3]:"")+P+(R&&p==="("?")":""),L){for(D=-1,C=T.length;++D<C;)if(S=T.charCodeAt(D),48>S||S>57){P=(S===46?i+T.slice(D+1):T.slice(D))+P,T=T.slice(0,D);break}}}v&&!m&&(T=e(T,1/0));var G=I.length+T.length+P.length,M=G<y?new Array(y-G+1).join(f):"";switch(v&&m&&(T=e(M+T,M.length?y-P.length:1/0),M=""),d){case"<":T=I+T+P+M;break;case"=":T=I+M+T+P;break;case"^":T=M.slice(0,G=M.length>>1)+I+T+P+M.slice(G);break;default:T=M+I+T+P;break}return o(T)}return E.toString=function(){return h+""},E}function l(h,f){var d=c((h=Wr(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(Yr(f)/3)))*3,g=Math.pow(10,-p),m=W1[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var ls,eo,Nl;q1({thousands:",",grouping:[3],currency:["$",""]});function q1(t){return ls=H1(t),eo=ls.format,Nl=ls.formatPrefix,ls}function X1(t){return Math.max(0,-Yr(Math.abs(t)))}function j1(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Yr(e)/3)))*3-Yr(Math.abs(t)))}function V1(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Yr(e)-Yr(t))+1}var et=1e-6,no=1e-12,ht=Math.PI,St=ht/2,fs=ht/4,Xt=ht*2,yt=180/ht,nt=ht/180,dt=Math.abs,Hr=Math.atan,jt=Math.atan2,J=Math.cos,hs=Math.ceil,Z1=Math.exp,Fl=Math.hypot,ds=Math.log,Gl=Math.pow,K=Math.sin,de=Math.sign||function(t){return t>0?1:t<0?-1:0},It=Math.sqrt,zl=Math.tan;function K1(t){return t>1?0:t<-1?ht:Math.acos(t)}function Vt(t){return t>1?St:t<-1?-St:Math.asin(t)}function Q1(t){return(t=K(t/2))*t}function wt(){}function ps(t,e){t&&tm.hasOwnProperty(t.type)&&tm[t.type](t,e)}var J1={Feature:function(t,e){ps(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)ps(n[r].geometry,e)}},tm={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Ol(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Ol(n[r],e,0)},Polygon:function(t,e){em(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)em(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ps(n[r],e)}};function Ol(t,e,n){var r=-1,i=t.length-n,o;for(e.lineStart();++r<i;)o=t[r],e.point(o[0],o[1],o[2]);e.lineEnd()}function em(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Ol(t[n],e,1);e.polygonEnd()}function Pe(t,e){t&&J1.hasOwnProperty(t.type)?J1[t.type](t,e):ps(t,e)}var gs=new Dt,ms=new Dt,nm,rm,Ul,Bl,Yl,Ne={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){gs=new Dt,Ne.lineStart=V9,Ne.lineEnd=Z9},polygonEnd:function(){var t=+gs;ms.add(t<0?Xt+t:t),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){ms.add(Xt)}};function V9(){Ne.point=K9}function Z9(){im(nm,rm)}function K9(t,e){Ne.point=im,nm=t,rm=e,t*=nt,e*=nt,Ul=t,Bl=J(e=e/2+fs),Yl=K(e)}function im(t,e){t*=nt,e*=nt,e=e/2+fs;var n=t-Ul,r=n>=0?1:-1,i=r*n,o=J(e),a=K(e),s=Yl*a,u=Bl*o+s*J(i),c=s*r*K(i);gs.add(jt(c,u)),Ul=t,Bl=o,Yl=a}function Q9(t){return ms=new Dt,Pe(t,Ne),ms*2}function ys(t){return[jt(t[1],t[0]),Vt(t[2])]}function Kn(t){var e=t[0],n=t[1],r=J(n);return[r*J(e),r*K(e),K(n)]}function bs(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function qr(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Wl(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function vs(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function xs(t){var e=It(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var $t,re,At,ue,Qn,om,am,Xr,ro,yn,Qe,Je={point:Hl,lineStart:um,lineEnd:cm,polygonStart:function(){Je.point=lm,Je.lineStart=J9,Je.lineEnd=tT,ro=new Dt,Ne.polygonStart()},polygonEnd:function(){Ne.polygonEnd(),Je.point=Hl,Je.lineStart=um,Je.lineEnd=cm,gs<0?($t=-(At=180),re=-(ue=90)):ro>et?ue=90:ro<-et&&(re=-90),Qe[0]=$t,Qe[1]=At},sphere:function(){$t=-(At=180),re=-(ue=90)}};function Hl(t,e){yn.push(Qe=[$t=t,At=t]),e<re&&(re=e),e>ue&&(ue=e)}function sm(t,e){var n=Kn([t*nt,e*nt]);if(Xr){var r=qr(Xr,n),i=[r[1],-r[0],0],o=qr(i,r);xs(o),o=ys(o);var a=t-Qn,s=a>0?1:-1,u=o[0]*yt*s,c,l=dt(a)>180;l^(s*Qn<u&&u<s*t)?(c=o[1]*yt,c>ue&&(ue=c)):(u=(u+360)%360-180,l^(s*Qn<u&&u<s*t)?(c=-o[1]*yt,c<re&&(re=c)):(e<re&&(re=e),e>ue&&(ue=e))),l?t<Qn?ce($t,t)>ce($t,At)&&(At=t):ce(t,At)>ce($t,At)&&($t=t):At>=$t?(t<$t&&($t=t),t>At&&(At=t)):t>Qn?ce($t,t)>ce($t,At)&&(At=t):ce(t,At)>ce($t,At)&&($t=t)}else yn.push(Qe=[$t=t,At=t]);e<re&&(re=e),e>ue&&(ue=e),Xr=n,Qn=t}function um(){Je.point=sm}function cm(){Qe[0]=$t,Qe[1]=At,Je.point=Hl,Xr=null}function lm(t,e){if(Xr){var n=t-Qn;ro.add(dt(n)>180?n+(n>0?360:-360):n)}else om=t,am=e;Ne.point(t,e),sm(t,e)}function J9(){Ne.lineStart()}function tT(){lm(om,am),Ne.lineEnd(),dt(ro)>et&&($t=-(At=180)),Qe[0]=$t,Qe[1]=At,Xr=null}function ce(t,e){return(e-=t)<0?e+360:e}function eT(t,e){return t[0]-e[0]}function fm(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function nT(t){var e,n,r,i,o,a,s;if(ue=At=-($t=re=1/0),yn=[],Pe(t,Je),n=yn.length){for(yn.sort(eT),e=1,r=yn[0],o=[r];e<n;++e)i=yn[e],fm(r,i[0])||fm(r,i[1])?(ce(r[0],i[1])>ce(r[0],r[1])&&(r[1]=i[1]),ce(i[0],r[1])>ce(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,e=0,r=o[n];e<=n;r=i,++e)i=o[e],(s=ce(r[1],i[0]))>a&&(a=s,$t=i[0],At=r[1])}return yn=Qe=null,$t===1/0||re===1/0?[[NaN,NaN],[NaN,NaN]]:[[$t,re],[At,ue]]}var io,_s,ws,$s,Ss,As,Ms,Ts,ql,Xl,jl,hm,dm,Zt,Kt,Qt,De={sphere:wt,point:Vl,lineStart:pm,lineEnd:gm,polygonStart:function(){De.lineStart=oT,De.lineEnd=aT},polygonEnd:function(){De.lineStart=pm,De.lineEnd=gm}};function Vl(t,e){t*=nt,e*=nt;var n=J(e);oo(n*J(t),n*K(t),K(e))}function oo(t,e,n){++io,ws+=(t-ws)/io,$s+=(e-$s)/io,Ss+=(n-Ss)/io}function pm(){De.point=rT}function rT(t,e){t*=nt,e*=nt;var n=J(e);Zt=n*J(t),Kt=n*K(t),Qt=K(e),De.point=iT,oo(Zt,Kt,Qt)}function iT(t,e){t*=nt,e*=nt;var n=J(e),r=n*J(t),i=n*K(t),o=K(e),a=jt(It((a=Kt*o-Qt*i)*a+(a=Qt*r-Zt*o)*a+(a=Zt*i-Kt*r)*a),Zt*r+Kt*i+Qt*o);_s+=a,As+=a*(Zt+(Zt=r)),Ms+=a*(Kt+(Kt=i)),Ts+=a*(Qt+(Qt=o)),oo(Zt,Kt,Qt)}function gm(){De.point=Vl}function oT(){De.point=sT}function aT(){mm(hm,dm),De.point=Vl}function sT(t,e){hm=t,dm=e,t*=nt,e*=nt,De.point=mm;var n=J(e);Zt=n*J(t),Kt=n*K(t),Qt=K(e),oo(Zt,Kt,Qt)}function mm(t,e){t*=nt,e*=nt;var n=J(e),r=n*J(t),i=n*K(t),o=K(e),a=Kt*o-Qt*i,s=Qt*r-Zt*o,u=Zt*i-Kt*r,c=Fl(a,s,u),l=Vt(c),h=c&&-l/c;ql.add(h*a),Xl.add(h*s),jl.add(h*u),_s+=l,As+=l*(Zt+(Zt=r)),Ms+=l*(Kt+(Kt=i)),Ts+=l*(Qt+(Qt=o)),oo(Zt,Kt,Qt)}function uT(t){io=_s=ws=$s=Ss=As=Ms=Ts=0,ql=new Dt,Xl=new Dt,jl=new Dt,Pe(t,De);var e=+ql,n=+Xl,r=+jl,i=Fl(e,n,r);return i<no&&(e=As,n=Ms,r=Ts,_s<et&&(e=ws,n=$s,r=Ss),i=Fl(e,n,r),i<no)?[NaN,NaN]:[jt(n,e)*yt,Vt(r/i)*yt]}function jr(t){return function(){return t}}function Zl(t,e){function n(r,i){return r=t(r,i),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,i){return r=e.invert(r,i),r&&t.invert(r[0],r[1])}),n}function Kl(t,e){return dt(t)>ht&&(t-=Math.round(t/Xt)*Xt),[t,e]}Kl.invert=Kl;function Ql(t,e,n){return(t%=Xt)?e||n?Zl(bm(t),vm(e,n)):bm(t):e||n?vm(e,n):Kl}function ym(t){return function(e,n){return e+=t,dt(e)>ht&&(e-=Math.round(e/Xt)*Xt),[e,n]}}function bm(t){var e=ym(t);return e.invert=ym(-t),e}function vm(t,e){var n=J(t),r=K(t),i=J(e),o=K(e);function a(s,u){var c=J(u),l=J(s)*c,h=K(s)*c,f=K(u),d=f*n+l*r;return[jt(h*i-d*o,l*n-f*r),Vt(d*i+h*o)]}return a.invert=function(s,u){var c=J(u),l=J(s)*c,h=K(s)*c,f=K(u),d=f*i-h*o;return[jt(h*i+f*o,l*n+d*r),Vt(d*n-l*r)]},a}function xm(t){t=Ql(t[0]*nt,t[1]*nt,t.length>2?t[2]*nt:0);function e(n){return n=t(n[0]*nt,n[1]*nt),n[0]*=yt,n[1]*=yt,n}return e.invert=function(n){return n=t.invert(n[0]*nt,n[1]*nt),n[0]*=yt,n[1]*=yt,n},e}function _m(t,e,n,r,i,o){if(n){var a=J(e),s=K(e),u=r*n;i==null?(i=e+r*Xt,o=e-u/2):(i=wm(a,i),o=wm(a,o),(r>0?i<o:i>o)&&(i+=r*Xt));for(var c,l=i;r>0?l>o:l<o;l-=u)c=ys([a,-s*J(l),-s*K(l)]),t.point(c[0],c[1])}}function wm(t,e){e=Kn(e),e[0]-=t,xs(e);var n=K1(-e[1]);return((-e[2]<0?-n:n)+Xt-et)%Xt}function cT(){var t=jr([0,0]),e=jr(90),n=jr(2),r,i,o={point:a};function a(u,c){r.push(u=i(u,c)),u[0]*=yt,u[1]*=yt}function s(){var u=t.apply(this,arguments),c=e.apply(this,arguments)*nt,l=n.apply(this,arguments)*nt;return r=[],i=Ql(-u[0]*nt,-u[1]*nt,0).invert,_m(o,c,l,1),u={type:"Polygon",coordinates:[r]},r=i=null,u}return s.center=function(u){return arguments.length?(t=typeof u=="function"?u:jr([+u[0],+u[1]]),s):t},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:jr(+u),s):e},s.precision=function(u){return arguments.length?(n=typeof u=="function"?u:jr(+u),s):n},s}function $m(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:wt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Ps(t,e){return dt(t[0]-e[0])<et&&dt(t[1]-e[1])<et}function Ds(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Sm(t,e,n,r,i){var o=[],a=[],s,u;if(t.forEach(function(p){if(!((g=p.length-1)<=0)){var g,m=p[0],y=p[g],v;if(Ps(m,y)){if(!m[2]&&!y[2]){for(i.lineStart(),s=0;s<g;++s)i.point((m=p[s])[0],m[1]);i.lineEnd();return}y[0]+=2*et}o.push(v=new Ds(m,p,null,!0)),a.push(v.o=new Ds(m,null,v,!1)),o.push(v=new Ds(y,p,null,!1)),a.push(v.o=new Ds(y,null,v,!0))}}),!!o.length){for(a.sort(e),Am(o),Am(a),s=0,u=a.length;s<u;++s)a[s].e=n=!n;for(var c=o[0],l,h;;){for(var f=c,d=!0;f.v;)if((f=f.n)===c)return;l=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(s=0,u=l.length;s<u;++s)i.point((h=l[s])[0],h[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(l=f.p.z,s=l.length-1;s>=0;--s)i.point((h=l[s])[0],h[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,l=f.z,d=!d}while(!f.v);i.lineEnd()}}}function Am(t){if(e=t.length){for(var e,n=0,r=t[0],i;++n<e;)r.n=i=t[n],i.p=r,r=i;r.n=i=t[0],i.p=r}}function Jl(t){return dt(t[0])<=ht?t[0]:de(t[0])*((dt(t[0])+ht)%Xt-ht)}function Mm(t,e){var n=Jl(e),r=e[1],i=K(r),o=[K(n),-J(n),0],a=0,s=0,u=new Dt;i===1?r=St+et:i===-1&&(r=-St-et);for(var c=0,l=t.length;c<l;++c)if(f=(h=t[c]).length)for(var h,f,d=h[f-1],p=Jl(d),g=d[1]/2+fs,m=K(g),y=J(g),v=0;v<f;++v,p=b,m=$,y=A,d=x){var x=h[v],b=Jl(x),w=x[1]/2+fs,$=K(w),A=J(w),_=b-p,L=_>=0?1:-1,E=L*_,T=E>ht,I=m*$;if(u.add(jt(I*L*K(E),y*A+I*J(E))),a+=T?_+L*Xt:_,T^p>=n^b>=n){var P=qr(Kn(d),Kn(x));xs(P);var D=qr(o,P);xs(D);var C=(T^_>=0?-1:1)*Vt(D[2]);(r>C||r===C&&(P[0]||P[1]))&&(s+=T^_>=0?1:-1)}}return(a<-et||a<et&&u<-no)^s&1}function Tm(t,e,n,r){return function(i){var o=e(i),a=$m(),s=e(a),u=!1,c,l,h,f={point:d,lineStart:g,lineEnd:m,polygonStart:function(){f.point=y,f.lineStart=v,f.lineEnd=x,l=[],c=[]},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=m,l=Lc(l);var b=Mm(c,r);l.length?(u||(i.polygonStart(),u=!0),Sm(l,fT,b,n,i)):b&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),l=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(b,w){t(b,w)&&i.point(b,w)}function p(b,w){o.point(b,w)}function g(){f.point=p,o.lineStart()}function m(){f.point=d,o.lineEnd()}function y(b,w){h.push([b,w]),s.point(b,w)}function v(){s.lineStart(),h=[]}function x(){y(h[0][0],h[0][1]),s.lineEnd();var b=s.clean(),w=a.result(),$,A=w.length,_,L,E;if(h.pop(),c.push(h),h=null,!!A){if(b&1){if(L=w[0],(_=L.length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),$=0;$<_;++$)i.point((E=L[$])[0],E[1]);i.lineEnd()}return}A>1&&b&2&&w.push(w.pop().concat(w.shift())),l.push(w.filter(lT))}}return f}}function lT(t){return t.length>1}function fT(t,e){return((t=t.x)[0]<0?t[1]-St-et:St-t[1])-((e=e.x)[0]<0?e[1]-St-et:St-e[1])}const tf=Tm(function(){return!0},hT,pT,[-ht,-St]);function hT(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?ht:-ht,u=dt(o-e);dt(u-ht)<et?(t.point(e,n=(n+a)/2>0?St:-St),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(o,n),i=0):r!==s&&u>=ht&&(dt(e-r)<et&&(e-=r*et),dt(o-s)<et&&(o-=s*et),n=dT(e,n,o,a),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),i=0),t.point(e=o,n=a),r=s},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-i}}}function dT(t,e,n,r){var i,o,a=K(t-n);return dt(a)>et?Hr((K(e)*(o=J(r))*K(n)-K(r)*(i=J(e))*K(t))/(i*o*a)):(e+r)/2}function pT(t,e,n,r){var i;if(t==null)i=n*St,r.point(-ht,i),r.point(0,i),r.point(ht,i),r.point(ht,0),r.point(ht,-i),r.point(0,-i),r.point(-ht,-i),r.point(-ht,0),r.point(-ht,i);else if(dt(t[0]-e[0])>et){var o=t[0]<e[0]?ht:-ht;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function Pm(t){var e=J(t),n=2*nt,r=e>0,i=dt(e)>et;function o(l,h,f,d){_m(d,t,n,f,l,h)}function a(l,h){return J(l)*J(h)>e}function s(l){var h,f,d,p,g;return{lineStart:function(){p=d=!1,g=1},point:function(m,y){var v=[m,y],x,b=a(m,y),w=r?b?0:c(m,y):b?c(m+(m<0?ht:-ht),y):0;if(!h&&(p=d=b)&&l.lineStart(),b!==d&&(x=u(h,v),(!x||Ps(h,x)||Ps(v,x))&&(v[2]=1)),b!==d)g=0,b?(l.lineStart(),x=u(v,h),l.point(x[0],x[1])):(x=u(h,v),l.point(x[0],x[1],2),l.lineEnd()),h=x;else if(i&&h&&r^b){var $;!(w&f)&&($=u(v,h,!0))&&(g=0,r?(l.lineStart(),l.point($[0][0],$[0][1]),l.point($[1][0],$[1][1]),l.lineEnd()):(l.point($[1][0],$[1][1]),l.lineEnd(),l.lineStart(),l.point($[0][0],$[0][1],3)))}b&&(!h||!Ps(h,v))&&l.point(v[0],v[1]),h=v,d=b,f=w},lineEnd:function(){d&&l.lineEnd(),h=null},clean:function(){return g|(p&&d)<<1}}}function u(l,h,f){var d=Kn(l),p=Kn(h),g=[1,0,0],m=qr(d,p),y=bs(m,m),v=m[0],x=y-v*v;if(!x)return!f&&l;var b=e*y/x,w=-e*v/x,$=qr(g,m),A=vs(g,b),_=vs(m,w);Wl(A,_);var L=$,E=bs(A,L),T=bs(L,L),I=E*E-T*(bs(A,A)-1);if(!(I<0)){var P=It(I),D=vs(L,(-E-P)/T);if(Wl(D,A),D=ys(D),!f)return D;var C=l[0],S=h[0],R=l[1],G=h[1],M;S<C&&(M=C,C=S,S=M);var N=S-C,z=dt(N-ht)<et,k=z||N<et;if(!z&&G<R&&(M=R,R=G,G=M),k?z?R+G>0^D[1]<(dt(D[0]-C)<et?R:G):R<=D[1]&&D[1]<=G:N>ht^(C<=D[0]&&D[0]<=S)){var Y=vs(L,(-E+P)/T);return Wl(Y,A),[D,ys(Y)]}}}function c(l,h){var f=r?t:ht-t,d=0;return l<-f?d|=1:l>f&&(d|=2),h<-f?d|=4:h>f&&(d|=8),d}return Tm(a,s,o,r?[0,-t]:[-ht,t-ht])}function gT(t,e,n,r,i,o){var a=t[0],s=t[1],u=e[0],c=e[1],l=0,h=1,f=u-a,d=c-s,p;if(p=n-a,!(!f&&p>0)){if(p/=f,f<0){if(p<l)return;p<h&&(h=p)}else if(f>0){if(p>h)return;p>l&&(l=p)}if(p=i-a,!(!f&&p<0)){if(p/=f,f<0){if(p>h)return;p>l&&(l=p)}else if(f>0){if(p<l)return;p<h&&(h=p)}if(p=r-s,!(!d&&p>0)){if(p/=d,d<0){if(p<l)return;p<h&&(h=p)}else if(d>0){if(p>h)return;p>l&&(l=p)}if(p=o-s,!(!d&&p<0)){if(p/=d,d<0){if(p>h)return;p>l&&(l=p)}else if(d>0){if(p<l)return;p<h&&(h=p)}return l>0&&(t[0]=a+l*f,t[1]=s+l*d),h<1&&(e[0]=a+h*f,e[1]=s+h*d),!0}}}}}var ao=1e9,Ls=-ao;function Es(t,e,n,r){function i(c,l){return t<=c&&c<=n&&e<=l&&l<=r}function o(c,l,h,f){var d=0,p=0;if(c==null||(d=a(c,h))!==(p=a(l,h))||u(c,l)<0^h>0)do f.point(d===0||d===3?t:n,d>1?r:e);while((d=(d+h+4)%4)!==p);else f.point(l[0],l[1])}function a(c,l){return dt(c[0]-t)<et?l>0?0:3:dt(c[0]-n)<et?l>0?2:1:dt(c[1]-e)<et?l>0?1:0:l>0?3:2}function s(c,l){return u(c.x,l.x)}function u(c,l){var h=a(c,1),f=a(l,1);return h!==f?h-f:h===0?l[1]-c[1]:h===1?c[0]-l[0]:h===2?c[1]-l[1]:l[0]-c[0]}return function(c){var l=c,h=$m(),f,d,p,g,m,y,v,x,b,w,$,A={point:_,lineStart:I,lineEnd:P,polygonStart:E,polygonEnd:T};function _(C,S){i(C,S)&&l.point(C,S)}function L(){for(var C=0,S=0,R=d.length;S<R;++S)for(var G=d[S],M=1,N=G.length,z=G[0],k,Y,j=z[0],W=z[1];M<N;++M)k=j,Y=W,z=G[M],j=z[0],W=z[1],Y<=r?W>r&&(j-k)*(r-Y)>(W-Y)*(t-k)&&++C:W<=r&&(j-k)*(r-Y)<(W-Y)*(t-k)&&--C;return C}function E(){l=h,f=[],d=[],$=!0}function T(){var C=L(),S=$&&C,R=(f=Lc(f)).length;(S||R)&&(c.polygonStart(),S&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),R&&Sm(f,s,C,o,c),c.polygonEnd()),l=c,f=d=p=null}function I(){A.point=D,d&&d.push(p=[]),w=!0,b=!1,v=x=NaN}function P(){f&&(D(g,m),y&&b&&h.rejoin(),f.push(h.result())),A.point=_,b&&l.lineEnd()}function D(C,S){var R=i(C,S);if(d&&p.push([C,S]),w)g=C,m=S,y=R,w=!1,R&&(l.lineStart(),l.point(C,S));else if(R&&b)l.point(C,S);else{var G=[v=Math.max(Ls,Math.min(ao,v)),x=Math.max(Ls,Math.min(ao,x))],M=[C=Math.max(Ls,Math.min(ao,C)),S=Math.max(Ls,Math.min(ao,S))];gT(G,M,t,e,n,r)?(b||(l.lineStart(),l.point(G[0],G[1])),l.point(M[0],M[1]),R||l.lineEnd(),$=!1):R&&(l.lineStart(),l.point(C,S),$=!1)}v=C,x=S,b=R}return A}}function mT(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Es(t,e,n,r)(o=s)},extent:function(s){return arguments.length?(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[t,e],[n,r]]}}}var ef,nf,ks,Cs,Vr={sphere:wt,point:wt,lineStart:yT,lineEnd:wt,polygonStart:wt,polygonEnd:wt};function yT(){Vr.point=vT,Vr.lineEnd=bT}function bT(){Vr.point=Vr.lineEnd=wt}function vT(t,e){t*=nt,e*=nt,nf=t,ks=K(e),Cs=J(e),Vr.point=xT}function xT(t,e){t*=nt,e*=nt;var n=K(e),r=J(e),i=dt(t-nf),o=J(i),a=K(i),s=r*a,u=Cs*n-ks*r*o,c=ks*n+Cs*r*o;ef.add(jt(It(s*s+u*u),c)),nf=t,ks=n,Cs=r}function Dm(t){return ef=new Dt,Pe(t,Vr),+ef}var rf=[null,null],_T={type:"LineString",coordinates:rf};function Is(t,e){return rf[0]=t,rf[1]=e,Dm(_T)}var Lm={Feature:function(t,e){return Rs(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Rs(n[r].geometry,e))return!0;return!1}},Em={Sphere:function(){return!0},Point:function(t,e){return km(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(km(n[r],e))return!0;return!1},LineString:function(t,e){return Cm(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Cm(n[r],e))return!0;return!1},Polygon:function(t,e){return Im(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Im(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Rs(n[r],e))return!0;return!1}};function Rs(t,e){return t&&Em.hasOwnProperty(t.type)?Em[t.type](t,e):!1}function km(t,e){return Is(t,e)===0}function Cm(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Is(t[o],e),r===0||o>0&&(i=Is(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<no*i))return!0;n=r}return!1}function Im(t,e){return!!Mm(t.map(wT),Rm(e))}function wT(t){return t=t.map(Rm),t.pop(),t}function Rm(t){return[t[0]*nt,t[1]*nt]}function $T(t,e){return(t&&Lm.hasOwnProperty(t.type)?Lm[t.type]:Rs)(t,e)}function Nm(t,e,n){var r=ln(t,e-et,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function Fm(t,e,n){var r=ln(t,e-et,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function Gm(){var t,e,n,r,i,o,a,s,u=10,c=u,l=90,h=360,f,d,p,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:v()}}function v(){return ln(hs(r/l)*l,n,l).map(p).concat(ln(hs(s/h)*h,a,h).map(g)).concat(ln(hs(e/u)*u,t,u).filter(function(x){return dt(x%l)>et}).map(f)).concat(ln(hs(o/c)*c,i,c).filter(function(x){return dt(x%h)>et}).map(d))}return y.lines=function(){return v().map(function(x){return{type:"LineString",coordinates:x}})},y.outline=function(){return{type:"Polygon",coordinates:[p(r).concat(g(a).slice(1),p(n).reverse().slice(1),g(s).reverse().slice(1))]}},y.extent=function(x){return arguments.length?y.extentMajor(x).extentMinor(x):y.extentMinor()},y.extentMajor=function(x){return arguments.length?(r=+x[0][0],n=+x[1][0],s=+x[0][1],a=+x[1][1],r>n&&(x=r,r=n,n=x),s>a&&(x=s,s=a,a=x),y.precision(m)):[[r,s],[n,a]]},y.extentMinor=function(x){return arguments.length?(e=+x[0][0],t=+x[1][0],o=+x[0][1],i=+x[1][1],e>t&&(x=e,e=t,t=x),o>i&&(x=o,o=i,i=x),y.precision(m)):[[e,o],[t,i]]},y.step=function(x){return arguments.length?y.stepMajor(x).stepMinor(x):y.stepMinor()},y.stepMajor=function(x){return arguments.length?(l=+x[0],h=+x[1],y):[l,h]},y.stepMinor=function(x){return arguments.length?(u=+x[0],c=+x[1],y):[u,c]},y.precision=function(x){return arguments.length?(m=+x,f=Nm(o,i,90),d=Fm(e,t,m),p=Nm(s,a,90),g=Fm(r,n,m),y):m},y.extentMajor([[-180,-90+et],[180,90-et]]).extentMinor([[-180,-80-et],[180,80+et]])}function ST(){return Gm()()}function AT(t,e){var n=t[0]*nt,r=t[1]*nt,i=e[0]*nt,o=e[1]*nt,a=J(r),s=K(r),u=J(o),c=K(o),l=a*J(n),h=a*K(n),f=u*J(i),d=u*K(i),p=2*Vt(It(Q1(o-r)+a*u*Q1(i-n))),g=K(p),m=p?function(y){var v=K(y*=p)/g,x=K(p-y)/g,b=x*l+v*f,w=x*h+v*d,$=x*s+v*c;return[jt(w,b)*yt,jt($,It(b*b+w*w))*yt]}:function(){return[n*yt,r*yt]};return m.distance=p,m}const so=t=>t;var of=new Dt,af=new Dt,zm,Om,sf,uf,tn={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){tn.lineStart=MT,tn.lineEnd=PT},polygonEnd:function(){tn.lineStart=tn.lineEnd=tn.point=wt,of.add(dt(af)),af=new Dt},result:function(){var t=of/2;return of=new Dt,t}};function MT(){tn.point=TT}function TT(t,e){tn.point=Um,zm=sf=t,Om=uf=e}function Um(t,e){af.add(uf*t-sf*e),sf=t,uf=e}function PT(){Um(zm,Om)}var Zr=1/0,Ns=Zr,uo=-Zr,Fs=uo,Gs={point:DT,lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var t=[[Zr,Ns],[uo,Fs]];return uo=Fs=-(Ns=Zr=1/0),t}};function DT(t,e){t<Zr&&(Zr=t),t>uo&&(uo=t),e<Ns&&(Ns=e),e>Fs&&(Fs=e)}var cf=0,lf=0,co=0,zs=0,Os=0,Kr=0,ff=0,hf=0,lo=0,Bm,Ym,Fe,Ge,pe={point:Jn,lineStart:Wm,lineEnd:Hm,polygonStart:function(){pe.lineStart=kT,pe.lineEnd=CT},polygonEnd:function(){pe.point=Jn,pe.lineStart=Wm,pe.lineEnd=Hm},result:function(){var t=lo?[ff/lo,hf/lo]:Kr?[zs/Kr,Os/Kr]:co?[cf/co,lf/co]:[NaN,NaN];return cf=lf=co=zs=Os=Kr=ff=hf=lo=0,t}};function Jn(t,e){cf+=t,lf+=e,++co}function Wm(){pe.point=LT}function LT(t,e){pe.point=ET,Jn(Fe=t,Ge=e)}function ET(t,e){var n=t-Fe,r=e-Ge,i=It(n*n+r*r);zs+=i*(Fe+t)/2,Os+=i*(Ge+e)/2,Kr+=i,Jn(Fe=t,Ge=e)}function Hm(){pe.point=Jn}function kT(){pe.point=IT}function CT(){qm(Bm,Ym)}function IT(t,e){pe.point=qm,Jn(Bm=Fe=t,Ym=Ge=e)}function qm(t,e){var n=t-Fe,r=e-Ge,i=It(n*n+r*r);zs+=i*(Fe+t)/2,Os+=i*(Ge+e)/2,Kr+=i,i=Ge*t-Fe*e,ff+=i*(Fe+t),hf+=i*(Ge+e),lo+=i*3,Jn(Fe=t,Ge=e)}function Xm(t){this._context=t}Xm.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(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Xt);break}}},result:wt};var df=new Dt,pf,jm,Vm,fo,ho,po={point:wt,lineStart:function(){po.point=RT},lineEnd:function(){pf&&Zm(jm,Vm),po.point=wt},polygonStart:function(){pf=!0},polygonEnd:function(){pf=null},result:function(){var t=+df;return df=new Dt,t}};function RT(t,e){po.point=Zm,jm=fo=t,Vm=ho=e}function Zm(t,e){fo-=t,ho-=e,df.add(It(fo*fo+ho*ho)),fo=t,ho=e}let Km,Us,Qm,Jm;class ty{constructor(e){this._append=e==null?ey:NT(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==Qm||this._append!==Us){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,Qm=r,Us=this._append,Jm=this._,this._=i}this._+=Jm;break}}}result(){const e=this._;return this._="",e.length?e:null}}function ey(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function NT(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return ey;if(e!==Km){const n=10**e;Km=e,Us=function(i){let o=1;this._+=i[0];for(const a=i.length;o<a;++o)this._+=Math.round(arguments[o]*n)/n+i[o]}}return Us}function FT(t,e){let n=3,r=4.5,i,o;function a(s){return s&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),Pe(s,i(o))),o.result()}return a.area=function(s){return Pe(s,i(tn)),tn.result()},a.measure=function(s){return Pe(s,i(po)),po.result()},a.bounds=function(s){return Pe(s,i(Gs)),Gs.result()},a.centroid=function(s){return Pe(s,i(pe)),pe.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,so):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new ty(n)):new Xm(e=s),typeof r!="function"&&o.pointRadius(r),a):e},a.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(o.pointRadius(+s),+s),a):r},a.digits=function(s){if(!arguments.length)return n;if(s==null)n=null;else{const u=Math.floor(s);if(!(u>=0))throw new RangeError(`invalid digits: ${s}`);n=u}return e===null&&(o=new ty(n)),a},a.projection(t).digits(n).context(e)}function GT(t){return{stream:go(t)}}function go(t){return function(e){var n=new gf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function gf(){}gf.prototype={constructor:gf,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function mf(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Pe(n,t.stream(Gs)),e(Gs.result()),r!=null&&t.clipExtent(r),t}function Bs(t,e,n){return mf(t,function(r){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+e[0][0]+(i-a*(r[1][0]+r[0][0]))/2,u=+e[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([s,u])},n)}function yf(t,e,n){return Bs(t,[[0,0],e],n)}function bf(t,e,n){return mf(t,function(r){var i=+e,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];t.scale(150*o).translate([a,s])},n)}function vf(t,e,n){return mf(t,function(r){var i=+e,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,s])},n)}var ny=16,zT=J(30*nt);function ry(t,e){return+e?UT(t,e):OT(t)}function OT(t){return go({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function UT(t,e){function n(r,i,o,a,s,u,c,l,h,f,d,p,g,m){var y=c-r,v=l-i,x=y*y+v*v;if(x>4*e&&g--){var b=a+f,w=s+d,$=u+p,A=It(b*b+w*w+$*$),_=Vt($/=A),L=dt(dt($)-1)<et||dt(o-h)<et?(o+h)/2:jt(w,b),E=t(L,_),T=E[0],I=E[1],P=T-r,D=I-i,C=v*P-y*D;(C*C/x>e||dt((y*P+v*D)/x-.5)>.3||a*f+s*d+u*p<zT)&&(n(r,i,o,a,s,u,T,I,L,b/=A,w/=A,$,g,m),m.point(T,I),n(T,I,L,b,w,$,c,l,h,f,d,p,g,m))}}return function(r){var i,o,a,s,u,c,l,h,f,d,p,g,m={point:y,lineStart:v,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=w},polygonEnd:function(){r.polygonEnd(),m.lineStart=v}};function y(_,L){_=t(_,L),r.point(_[0],_[1])}function v(){h=NaN,m.point=x,r.lineStart()}function x(_,L){var E=Kn([_,L]),T=t(_,L);n(h,f,l,d,p,g,h=T[0],f=T[1],l=_,d=E[0],p=E[1],g=E[2],ny,r),r.point(h,f)}function b(){m.point=y,r.lineEnd()}function w(){v(),m.point=$,m.lineEnd=A}function $(_,L){x(i=_,L),o=h,a=f,s=d,u=p,c=g,m.point=x}function A(){n(h,f,l,d,p,g,o,a,i,s,u,c,ny,r),m.lineEnd=b,b()}return m}}var BT=go({point:function(t,e){this.stream.point(t*nt,e*nt)}});function YT(t){return go({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function WT(t,e,n,r,i){function o(a,s){return a*=r,s*=i,[e+t*a,n-t*s]}return o.invert=function(a,s){return[(a-e)/t*r,(n-s)/t*i]},o}function iy(t,e,n,r,i,o){if(!o)return WT(t,e,n,r,i);var a=J(o),s=K(o),u=a*t,c=s*t,l=a/t,h=s/t,f=(s*n-a*e)/t,d=(s*e+a*n)/t;function p(g,m){return g*=r,m*=i,[u*g-c*m+e,n-c*g-u*m]}return p.invert=function(g,m){return[r*(l*g-h*m+f),i*(d-h*g-l*m)]},p}function ze(t){return xf(function(){return t})()}function xf(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,u=0,c=0,l,h=0,f=1,d=1,p=null,g=tf,m=null,y,v,x,b=so,w=.5,$,A,_,L,E;function T(C){return _(C[0]*nt,C[1]*nt)}function I(C){return C=_.invert(C[0],C[1]),C&&[C[0]*yt,C[1]*yt]}T.stream=function(C){return L&&E===C?L:L=BT(YT(l)(g($(b(E=C)))))},T.preclip=function(C){return arguments.length?(g=C,p=void 0,D()):g},T.postclip=function(C){return arguments.length?(b=C,m=y=v=x=null,D()):b},T.clipAngle=function(C){return arguments.length?(g=+C?Pm(p=C*nt):(p=null,tf),D()):p*yt},T.clipExtent=function(C){return arguments.length?(b=C==null?(m=y=v=x=null,so):Es(m=+C[0][0],y=+C[0][1],v=+C[1][0],x=+C[1][1]),D()):m==null?null:[[m,y],[v,x]]},T.scale=function(C){return arguments.length?(n=+C,P()):n},T.translate=function(C){return arguments.length?(r=+C[0],i=+C[1],P()):[r,i]},T.center=function(C){return arguments.length?(o=C[0]%360*nt,a=C[1]%360*nt,P()):[o*yt,a*yt]},T.rotate=function(C){return arguments.length?(s=C[0]%360*nt,u=C[1]%360*nt,c=C.length>2?C[2]%360*nt:0,P()):[s*yt,u*yt,c*yt]},T.angle=function(C){return arguments.length?(h=C%360*nt,P()):h*yt},T.reflectX=function(C){return arguments.length?(f=C?-1:1,P()):f<0},T.reflectY=function(C){return arguments.length?(d=C?-1:1,P()):d<0},T.precision=function(C){return arguments.length?($=ry(A,w=C*C),D()):It(w)},T.fitExtent=function(C,S){return Bs(T,C,S)},T.fitSize=function(C,S){return yf(T,C,S)},T.fitWidth=function(C,S){return bf(T,C,S)},T.fitHeight=function(C,S){return vf(T,C,S)};function P(){var C=iy(n,0,0,f,d,h).apply(null,e(o,a)),S=iy(n,r-C[0],i-C[1],f,d,h);return l=Ql(s,u,c),A=Zl(e,S),_=Zl(l,A),$=ry(A,w),D()}function D(){return L=E=null,T}return function(){return e=t.apply(this,arguments),T.invert=e.invert&&I,P()}}function _f(t){var e=0,n=ht/3,r=xf(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*nt,n=o[1]*nt):[e*yt,n*yt]},i}function HT(t){var e=J(t);function n(r,i){return[r*e,K(i)/e]}return n.invert=function(r,i){return[r/e,Vt(i*e)]},n}function oy(t,e){var n=K(t),r=(n+K(e))/2;if(dt(r)<et)return HT(t);var i=1+n*(2*r-n),o=It(i)/r;function a(s,u){var c=It(i-2*r*K(u))/r;return[c*K(s*=r),o-c*J(s)]}return a.invert=function(s,u){var c=o-u,l=jt(s,dt(c))*de(c);return c*r<0&&(l-=ht*de(s)*de(c)),[l/r,Vt((i-(s*s+c*c)*r*r)/(2*r))]},a}function Ys(){return _f(oy).scale(155.424).center([0,33.6442])}function ay(){return Ys().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function qT(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function XT(){var t,e,n=ay(),r,i=Ys().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Ys().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,u,c={point:function(f,d){u=[f,d]}};function l(f){var d=f[0],p=f[1];return u=null,r.point(d,p),u||(o.point(d,p),u)||(s.point(d,p),u)}l.invert=function(f){var d=n.scale(),p=n.translate(),g=(f[0]-p[0])/d,m=(f[1]-p[1])/d;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?i:m>=.166&&m<.234&&g>=-.214&&g<-.115?a:n).invert(f)},l.stream=function(f){return t&&e===f?t:t=qT([n.stream(e=f),i.stream(f),a.stream(f)])},l.precision=function(f){return arguments.length?(n.precision(f),i.precision(f),a.precision(f),h()):n.precision()},l.scale=function(f){return arguments.length?(n.scale(f),i.scale(f*.35),a.scale(f),l.translate(n.translate())):n.scale()},l.translate=function(f){if(!arguments.length)return n.translate();var d=n.scale(),p=+f[0],g=+f[1];return r=n.translate(f).clipExtent([[p-.455*d,g-.238*d],[p+.455*d,g+.238*d]]).stream(c),o=i.translate([p-.307*d,g+.201*d]).clipExtent([[p-.425*d+et,g+.12*d+et],[p-.214*d-et,g+.234*d-et]]).stream(c),s=a.translate([p-.205*d,g+.212*d]).clipExtent([[p-.214*d+et,g+.166*d+et],[p-.115*d-et,g+.234*d-et]]).stream(c),h()},l.fitExtent=function(f,d){return Bs(l,f,d)},l.fitSize=function(f,d){return yf(l,f,d)},l.fitWidth=function(f,d){return bf(l,f,d)},l.fitHeight=function(f,d){return vf(l,f,d)};function h(){return t=e=null,l}return l.scale(1070)}function sy(t){return function(e,n){var r=J(e),i=J(n),o=t(r*i);return o===1/0?[2,0]:[o*i*K(e),o*K(n)]}}function mo(t){return function(e,n){var r=It(e*e+n*n),i=t(r),o=K(i),a=J(i);return[jt(e*o,r*a),Vt(r&&n*o/r)]}}var wf=sy(function(t){return It(2/(1+t))});wf.invert=mo(function(t){return 2*Vt(t/2)});function jT(){return ze(wf).scale(124.75).clipAngle(180-.001)}var $f=sy(function(t){return(t=K1(t))&&t/K(t)});$f.invert=mo(function(t){return t});function VT(){return ze($f).scale(79.4188).clipAngle(180-.001)}function yo(t,e){return[t,ds(zl((St+e)/2))]}yo.invert=function(t,e){return[t,2*Hr(Z1(e))-St]};function ZT(){return uy(yo).scale(961/Xt)}function uy(t){var e=ze(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,u,c;e.scale=function(h){return arguments.length?(r(h),l()):r()},e.translate=function(h){return arguments.length?(i(h),l()):i()},e.center=function(h){return arguments.length?(n(h),l()):n()},e.clipExtent=function(h){return arguments.length?(h==null?a=s=u=c=null:(a=+h[0][0],s=+h[0][1],u=+h[1][0],c=+h[1][1]),l()):a==null?null:[[a,s],[u,c]]};function l(){var h=ht*r(),f=e(xm(e.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:t===yo?[[Math.max(f[0]-h,a),s],[Math.min(f[0]+h,u),c]]:[[a,Math.max(f[1]-h,s)],[u,Math.min(f[1]+h,c)]])}return l()}function Ws(t){return zl((St+t)/2)}function cy(t,e){var n=J(t),r=t===e?K(t):ds(n/J(e))/ds(Ws(e)/Ws(t)),i=n*Gl(Ws(t),r)/r;if(!r)return yo;function o(a,s){i>0?s<-St+et&&(s=-St+et):s>St-et&&(s=St-et);var u=i/Gl(Ws(s),r);return[u*K(r*a),i-u*J(r*a)]}return o.invert=function(a,s){var u=i-s,c=de(r)*It(a*a+u*u),l=jt(a,dt(u))*de(u);return u*r<0&&(l-=ht*de(a)*de(u)),[l/r,2*Hr(Gl(i/c,1/r))-St]},o}function KT(){return _f(cy).scale(109.5).parallels([30,30])}function bo(t,e){return[t,e]}bo.invert=bo;function QT(){return ze(bo).scale(152.63)}function ly(t,e){var n=J(t),r=t===e?K(t):(n-J(e))/(e-t),i=n/r+t;if(dt(r)<et)return bo;function o(a,s){var u=i-s,c=r*a;return[u*K(c),i-u*J(c)]}return o.invert=function(a,s){var u=i-s,c=jt(a,dt(u))*de(u);return u*r<0&&(c-=ht*de(a)*de(u)),[c/r,i-de(r)*It(a*a+u*u)]},o}function JT(){return _f(ly).scale(131.154).center([0,13.9389])}var vo=1.340264,xo=-.081106,_o=893e-6,wo=.003796,Hs=It(3)/2,tP=12;function Sf(t,e){var n=Vt(Hs*K(e)),r=n*n,i=r*r*r;return[t*J(n)/(Hs*(vo+3*xo*r+i*(7*_o+9*wo*r))),n*(vo+xo*r+i*(_o+wo*r))]}Sf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<tP&&(s=n*(vo+xo*r+i*(_o+wo*r))-e,u=vo+3*xo*r+i*(7*_o+9*wo*r),n-=a=s/u,r=n*n,i=r*r*r,!(dt(a)<no));++o);return[Hs*t*(vo+3*xo*r+i*(7*_o+9*wo*r))/J(n),Vt(K(n)/Hs)]};function eP(){return ze(Sf).scale(177.158)}function Af(t,e){var n=J(e),r=J(t)*n;return[n*K(t)/r,K(e)/r]}Af.invert=mo(Hr);function nP(){return ze(Af).scale(144.049).clipAngle(60)}function rP(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,u=null,c,l,h,f=1,d=1,p=go({point:function(b,w){var $=x([b,w]);this.stream.point($[0],$[1])}}),g=so,m,y;function v(){return f=t*r,d=t*i,m=y=null,x}function x(b){var w=b[0]*f,$=b[1]*d;if(o){var A=$*a-w*s;w=w*a+$*s,$=A}return[w+e,$+n]}return x.invert=function(b){var w=b[0]-e,$=b[1]-n;if(o){var A=$*a+w*s;w=w*a-$*s,$=A}return[w/f,$/d]},x.stream=function(b){return m&&y===b?m:m=p(g(y=b))},x.postclip=function(b){return arguments.length?(g=b,u=c=l=h=null,v()):g},x.clipExtent=function(b){return arguments.length?(g=b==null?(u=c=l=h=null,so):Es(u=+b[0][0],c=+b[0][1],l=+b[1][0],h=+b[1][1]),v()):u==null?null:[[u,c],[l,h]]},x.scale=function(b){return arguments.length?(t=+b,v()):t},x.translate=function(b){return arguments.length?(e=+b[0],n=+b[1],v()):[e,n]},x.angle=function(b){return arguments.length?(o=b%360*nt,s=K(o),a=J(o),v()):o*yt},x.reflectX=function(b){return arguments.length?(r=b?-1:1,v()):r<0},x.reflectY=function(b){return arguments.length?(i=b?-1:1,v()):i<0},x.fitExtent=function(b,w){return Bs(x,b,w)},x.fitSize=function(b,w){return yf(x,b,w)},x.fitWidth=function(b,w){return bf(x,b,w)},x.fitHeight=function(b,w){return vf(x,b,w)},x}function Mf(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Mf.invert=function(t,e){var n=e,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(dt(i)>et&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function iP(){return ze(Mf).scale(175.295)}function Tf(t,e){return[J(e)*K(t),K(e)]}Tf.invert=mo(Vt);function oP(){return ze(Tf).scale(249.5).clipAngle(90+et)}function Pf(t,e){var n=J(e),r=1+J(t)*n;return[n*K(t)/r,K(e)/r]}Pf.invert=mo(function(t){return 2*Hr(t)});function aP(){return ze(Pf).scale(250).clipAngle(142)}function Df(t,e){return[ds(zl((St+e)/2)),-t]}Df.invert=function(t,e){return[-e,2*Hr(Z1(t))-St]};function sP(){var t=uy(Df),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function uP(t,e){return t.parent===e.parent?1:2}function cP(t){return t.reduce(lP,0)/t.length}function lP(t,e){return t+e.x}function fP(t){return 1+t.reduce(hP,0)}function hP(t,e){return Math.max(t,e.y)}function dP(t){for(var e;e=t.children;)t=e[0];return t}function pP(t){for(var e;e=t.children;)t=e[e.length-1];return t}function gP(){var t=uP,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var d=f.children;d?(f.x=cP(d),f.y=fP(d)):(f.x=a?s+=t(f,a):0,f.y=0,a=f)});var u=dP(o),c=pP(o),l=u.x-t(u,c)/2,h=c.x+t(c,u)/2;return o.eachAfter(r?function(f){f.x=(f.x-o.x)*e,f.y=(o.y-f.y)*n}:function(f){f.x=(f.x-l)/(h-l)*e,f.y=(1-(o.y?f.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(t=o,i):t},i.size=function(o){return arguments.length?(r=!1,e=+o[0],n=+o[1],i):r?null:[e,n]},i.nodeSize=function(o){return arguments.length?(r=!0,e=+o[0],n=+o[1],i):r?[e,n]:null},i}function mP(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function yP(){return this.eachAfter(mP)}function bP(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function vP(t,e){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(t.call(e,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function xP(t,e){for(var n=this,r=[n],i=[],o,a,s,u=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,s=o.length;a<s;++a)r.push(o[a]);for(;n=i.pop();)t.call(e,n,++u,this);return this}function _P(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function wP(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function $P(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function SP(t){for(var e=this,n=AP(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function AP(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function MP(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function TP(){return Array.from(this)}function PP(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function DP(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*LP(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function qs(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=CP)):e===void 0&&(e=kP);for(var n=new tr(t),r,i=[n],o,a,s,u;r=i.pop();)if((a=e(r.data))&&(u=(a=Array.from(a)).length))for(r.children=a,s=u-1;s>=0;--s)i.push(o=a[s]=new tr(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(fy)}function EP(){return qs(this).eachBefore(IP)}function kP(t){return t.children}function CP(t){return Array.isArray(t)?t[1]:null}function IP(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function fy(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function tr(t){this.data=t,this.depth=this.height=0,this.parent=null}tr.prototype=qs.prototype={constructor:tr,count:yP,each:bP,eachAfter:xP,eachBefore:vP,find:_P,sum:wP,sort:$P,path:SP,ancestors:MP,descendants:TP,leaves:PP,links:DP,copy:EP,[Symbol.iterator]:LP};function Xs(t){return t==null?null:hy(t)}function hy(t){if(typeof t!="function")throw new Error;return t}function er(){return 0}function Qr(t){return function(){return t}}const RP=1664525,NP=1013904223,dy=4294967296;function Lf(){let t=1;return()=>(t=(RP*t+NP)%dy)/dy}function FP(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function GP(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function zP(t){return py(t,Lf())}function py(t,e){for(var n=0,r=(t=GP(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&gy(a,o)?++n:(a=UP(i=OP(i,o)),n=0);return a}function OP(t,e){var n,r;if(Ef(e,t))return[e];for(n=0;n<t.length;++n)if(js(e,t[n])&&Ef($o(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(js($o(t[n],t[r]),e)&&js($o(t[n],e),t[r])&&js($o(t[r],e),t[n])&&Ef(my(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function js(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function gy(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Ef(t,e){for(var n=0;n<e.length;++n)if(!gy(t,e[n]))return!1;return!0}function UP(t){switch(t.length){case 1:return BP(t[0]);case 2:return $o(t[0],t[1]);case 3:return my(t[0],t[1],t[2])}}function BP(t){return{x:t.x,y:t.y,r:t.r}}function $o(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,c=a-r,l=s-i,h=Math.sqrt(u*u+c*c);return{x:(n+o+u/h*l)/2,y:(r+a+c/h*l)/2,r:(h+i+s)/2}}function my(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,c=n.x,l=n.y,h=n.r,f=r-a,d=r-c,p=i-s,g=i-l,m=u-o,y=h-o,v=r*r+i*i-o*o,x=v-a*a-s*s+u*u,b=v-c*c-l*l+h*h,w=d*p-f*g,$=(p*b-g*x)/(w*2)-r,A=(g*m-p*y)/w,_=(d*x-f*b)/(w*2)-i,L=(f*y-d*m)/w,E=A*A+L*L-1,T=2*(o+$*A+_*L),I=$*$+_*_-o*o,P=-(Math.abs(E)>1e-6?(T+Math.sqrt(T*T-4*E*I))/(2*E):I/T);return{x:r+$+A*P,y:i+_+L*P,r:P}}function yy(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,u,c=r*r+a*a;c?(o=e.r+n.r,o*=o,u=t.r+n.r,u*=u,o>u?(i=(c+u-o)/(2*c),s=Math.sqrt(Math.max(0,u/c-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(c+o-u)/(2*c),s=Math.sqrt(Math.max(0,o/c-i*i)),n.x=e.x+i*r-s*a,n.y=e.y+i*a+s*r)):(n.x=e.x+n.r,n.y=e.y)}function by(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function vy(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Vs(t){this._=t,this.next=null,this.previous=null}function xy(t,e){if(!(o=(t=FP(t)).length))return 0;var n,r,i,o,a,s,u,c,l,h,f;if(n=t[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;yy(r,n,i=t[2]),n=new Vs(n),r=new Vs(r),i=new Vs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;u<o;++u){yy(n._,r._,i=t[u]),i=new Vs(i),c=r.next,l=n.previous,h=r._.r,f=n._.r;do if(h<=f){if(by(c._,i._)){r=c,n.next=r,r.previous=n,--u;continue t}h+=c._.r,c=c.next}else{if(by(l._,i._)){n=l,n.next=r,r.previous=n,--u;continue t}f+=l._.r,l=l.previous}while(c!==l.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=vy(n);(i=i.next)!==r;)(s=vy(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=py(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function YP(t){return xy(t,Lf()),t}function WP(t){return Math.sqrt(t.value)}function HP(){var t=null,e=1,n=1,r=er;function i(o){const a=Lf();return o.x=e/2,o.y=n/2,t?o.eachBefore(_y(t)).eachAfter(kf(r,.5,a)).eachBefore(wy(1)):o.eachBefore(_y(WP)).eachAfter(kf(er,1,a)).eachAfter(kf(r,o.r/Math.min(e,n),a)).eachBefore(wy(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=Xs(o),i):t},i.size=function(o){return arguments.length?(e=+o[0],n=+o[1],i):[e,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:Qr(+o),i):r},i}function _y(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function kf(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,s=t(r)*e||0,u;if(s)for(o=0;o<a;++o)i[o].r+=s;if(u=xy(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=u+s}}}function wy(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function $y(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function So(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,c=t.value&&(r-e)/t.value;++s<u;)a=o[s],a.y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}function qP(){var t=1,e=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=t,a.y1=e/s,a.eachBefore(o(e,s)),r&&a.eachBefore($y),a}function o(a,s){return function(u){u.children&&So(u,u.x0,a*(u.depth+1)/s,u.x1,a*(u.depth+2)/s);var c=u.x0,l=u.y0,h=u.x1-n,f=u.y1-n;h<c&&(c=h=(c+h)/2),f<l&&(l=f=(l+f)/2),u.x0=c,u.y0=l,u.x1=h,u.y1=f}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(t=+a[0],e=+a[1],i):[t,e]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var XP={depth:-1},Sy={},Cf={};function jP(t){return t.id}function VP(t){return t.parentId}function ZP(){var t=jP,e=VP,n;function r(i){var o=Array.from(i),a=t,s=e,u,c,l,h,f,d,p,g,m=new Map;if(n!=null){const y=o.map((b,w)=>KP(n(b,w,i))),v=y.map(Ay),x=new Set(y).add("");for(const b of v)x.has(b)||(x.add(b),y.push(b),v.push(Ay(b)),o.push(Cf));a=(b,w)=>y[w],s=(b,w)=>v[w]}for(l=0,u=o.length;l<u;++l)c=o[l],d=o[l]=new tr(c),(p=a(c,l,i))!=null&&(p+="")&&(g=d.id=p,m.set(g,m.has(g)?Sy:d)),(p=s(c,l,i))!=null&&(p+="")&&(d.parent=p);for(l=0;l<u;++l)if(d=o[l],p=d.parent){if(f=m.get(p),!f)throw new Error("missing: "+p);if(f===Sy)throw new Error("ambiguous: "+p);f.children?f.children.push(d):f.children=[d],d.parent=f}else{if(h)throw new Error("multiple roots");h=d}if(!h)throw new Error("no root");if(n!=null){for(;h.data===Cf&&h.children.length===1;)h=h.children[0],--u;for(let y=o.length-1;y>=0&&(d=o[y],d.data===Cf);--y)d.data=null}if(h.parent=XP,h.eachBefore(function(y){y.depth=y.parent.depth+1,--u}).eachBefore(fy),h.parent=null,u>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=Xs(i),r):t},r.parentId=function(i){return arguments.length?(e=Xs(i),r):e},r.path=function(i){return arguments.length?(n=Xs(i),r):n},r}function KP(t){t=`${t}`;let e=t.length;return If(t,e-1)&&!If(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function Ay(t){let e=t.length;if(e<2)return"";for(;--e>1&&!If(t,e););return t.slice(0,e)}function If(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function QP(t,e){return t.parent===e.parent?1:2}function Rf(t){var e=t.children;return e?e[0]:t.t}function Nf(t){var e=t.children;return e?e[e.length-1]:t.t}function JP(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function tD(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function eD(t,e,n){return t.a.parent===e.parent?t.a:n}function Zs(t,e){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=e}Zs.prototype=Object.create(tr.prototype);function nD(t){for(var e=new Zs(t,0),n,r=[e],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new Zs(o[a],a)),i.parent=n;return(e.parent=new Zs(null,0)).children=[e],e}function rD(){var t=QP,e=1,n=1,r=null;function i(c){var l=nD(c);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),r)c.eachBefore(u);else{var h=c,f=c,d=c;c.eachBefore(function(v){v.x<h.x&&(h=v),v.x>f.x&&(f=v),v.depth>d.depth&&(d=v)});var p=h===f?1:t(h,f)/2,g=p-h.x,m=e/(f.x+p+g),y=n/(d.depth||1);c.eachBefore(function(v){v.x=(v.x+g)*m,v.y=v.depth*y})}return c}function o(c){var l=c.children,h=c.parent.children,f=c.i?h[c.i-1]:null;if(l){tD(c);var d=(l[0].z+l[l.length-1].z)/2;f?(c.z=f.z+t(c._,f._),c.m=c.z-d):c.z=d}else f&&(c.z=f.z+t(c._,f._));c.parent.A=s(c,f,c.parent.A||h[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function s(c,l,h){if(l){for(var f=c,d=c,p=l,g=f.parent.children[0],m=f.m,y=d.m,v=p.m,x=g.m,b;p=Nf(p),f=Rf(f),p&&f;)g=Rf(g),d=Nf(d),d.a=c,b=p.z+v-f.z-m+t(p._,f._),b>0&&(JP(eD(p,c,h),c,b),m+=b,y+=b),v+=p.m,m+=f.m,x+=g.m,y+=d.m;p&&!Nf(d)&&(d.t=p,d.m+=v-y),f&&!Rf(g)&&(g.t=f,g.m+=m-x,h=c)}return h}function u(c){c.x*=e,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(t=c,i):t},i.size=function(c){return arguments.length?(r=!1,e=+c[0],n=+c[1],i):r?null:[e,n]},i.nodeSize=function(c){return arguments.length?(r=!0,e=+c[0],n=+c[1],i):r?[e,n]:null},i}function Ks(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,c=t.value&&(i-n)/t.value;++s<u;)a=o[s],a.x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}var My=(1+Math.sqrt(5))/2;function Ty(t,e,n,r,i,o){for(var a=[],s=e.children,u,c,l=0,h=0,f=s.length,d,p,g=e.value,m,y,v,x,b,w,$;l<f;){d=i-n,p=o-r;do m=s[h++].value;while(!m&&h<f);for(y=v=m,w=Math.max(p/d,d/p)/(g*t),$=m*m*w,b=Math.max(v/$,$/y);h<f;++h){if(m+=c=s[h].value,c<y&&(y=c),c>v&&(v=c),$=m*m*w,x=Math.max(v/$,$/y),x>b){m-=c;break}b=x}a.push(u={value:m,dice:d<p,children:s.slice(l,h)}),u.dice?So(u,n,r,i,g?r+=p*m/g:o):Ks(u,n,r,g?n+=d*m/g:i,o),g-=m,l=h}return a}const Ff=function t(e){function n(r,i,o,a,s){Ty(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(My);function Py(){var t=Ff,e=!1,n=1,r=1,i=[0],o=er,a=er,s=er,u=er,c=er;function l(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(h),i=[0],e&&f.eachBefore($y),f}function h(f){var d=i[f.depth],p=f.x0+d,g=f.y0+d,m=f.x1-d,y=f.y1-d;m<p&&(p=m=(p+m)/2),y<g&&(g=y=(g+y)/2),f.x0=p,f.y0=g,f.x1=m,f.y1=y,f.children&&(d=i[f.depth+1]=o(f)/2,p+=c(f)-d,g+=a(f)-d,m-=s(f)-d,y-=u(f)-d,m<p&&(p=m=(p+m)/2),y<g&&(g=y=(g+y)/2),t(f,p,g,m,y))}return l.round=function(f){return arguments.length?(e=!!f,l):e},l.size=function(f){return arguments.length?(n=+f[0],r=+f[1],l):[n,r]},l.tile=function(f){return arguments.length?(t=hy(f),l):t},l.padding=function(f){return arguments.length?l.paddingInner(f).paddingOuter(f):l.paddingInner()},l.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:Qr(+f),l):o},l.paddingOuter=function(f){return arguments.length?l.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):l.paddingTop()},l.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:Qr(+f),l):a},l.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Qr(+f),l):s},l.paddingBottom=function(f){return arguments.length?(u=typeof f=="function"?f:Qr(+f),l):u},l.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:Qr(+f),l):c},l}function iD(t,e,n,r,i){var o=t.children,a,s=o.length,u,c=new Array(s+1);for(c[0]=u=a=0;a<s;++a)c[a+1]=u+=o[a].value;l(0,s,t.value,e,n,r,i);function l(h,f,d,p,g,m,y){if(h>=f-1){var v=o[h];v.x0=p,v.y0=g,v.x1=m,v.y1=y;return}for(var x=c[h],b=d/2+x,w=h+1,$=f-1;w<$;){var A=w+$>>>1;c[A]<b?w=A+1:$=A}b-c[w-1]<c[w]-b&&h+1<w&&--w;var _=c[w]-x,L=d-_;if(m-p>y-g){var E=d?(p*L+m*_)/d:m;l(h,w,_,p,g,E,y),l(w,f,L,E,g,m,y)}else{var T=d?(g*L+y*_)/d:y;l(h,w,_,p,g,m,T),l(w,f,L,p,T,m,y)}}}function oD(t,e,n,r,i){(t.depth&1?Ks:So)(t,e,n,r,i)}const aD=function t(e){function n(r,i,o,a,s){if((u=r._squarify)&&u.ratio===e)for(var u,c,l,h,f=-1,d,p=u.length,g=r.value;++f<p;){for(c=u[f],l=c.children,h=c.value=0,d=l.length;h<d;++h)c.value+=l[h].value;c.dice?So(c,i,o,a,g?o+=(s-o)*c.value/g:s):Ks(c,i,o,g?i+=(a-i)*c.value/g:a,s),g-=c.value}else r._squarify=u=Ty(e,r,i,o,a,s),u.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(My);function sD(t){for(var e=-1,n=t.length,r,i=t[n-1],o=0;++e<n;)r=i,i=t[e],o+=r[1]*i[0]-r[0]*i[1];return o/2}function uD(t){for(var e=-1,n=t.length,r=0,i=0,o,a=t[n-1],s,u=0;++e<n;)o=a,a=t[e],u+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return u*=3,[r/u,i/u]}function cD(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function lD(t,e){return t[0]-e[0]||t[1]-e[1]}function Dy(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&cD(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function fD(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(lD),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=Dy(r),a=Dy(i),s=a[0]===o[0],u=a[a.length-1]===o[o.length-1],c=[];for(e=o.length-1;e>=0;--e)c.push(t[r[o[e]][2]]);for(e=+s;e<a.length-u;++e)c.push(t[r[a[e]][2]]);return c}function hD(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],u,c,l=!1,h=0;h<n;++h)r=t[h],u=r[0],c=r[1],c>o!=s>o&&i<(a-u)*(o-c)/(s-c)+u&&(l=!l),a=u,s=c;return l}function dD(t){for(var e=-1,n=t.length,r=t[n-1],i,o,a=r[0],s=r[1],u=0;++e<n;)i=a,o=s,r=t[e],a=r[0],s=r[1],i-=a,o-=s,u+=Math.hypot(i,o);return u}const Nt=Math.random,pD=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return e()*i+r}}return n.source=t,n}(Nt),gD=function t(e){function n(r,i){return arguments.length<2&&(i=r,r=0),r=Math.floor(r),i=Math.floor(i)-r,function(){return Math.floor(e()*i+r)}}return n.source=t,n}(Nt),Gf=function t(e){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=e()*2-1,s=e()*2-1,a=o*o+s*s;while(!a||a>1);return r+i*s*Math.sqrt(-2*Math.log(a)/a)}}return n.source=t,n}(Nt),mD=function t(e){var n=Gf.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Nt),Ly=function t(e){function n(r){return(r=+r)<=0?()=>0:function(){for(var i=0,o=r;o>1;--o)i+=e();return i+o*e()}}return n.source=t,n}(Nt),yD=function t(e){var n=Ly.source(e);function r(i){if((i=+i)==0)return e;var o=n(i);return function(){return o()/i}}return r.source=t,r}(Nt),bD=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Nt),vD=function t(e){function n(r){if((r=+r)<0)throw new RangeError("invalid alpha");return r=1/-r,function(){return Math.pow(1-e(),r)}}return n.source=t,n}(Nt),xD=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+r)}}return n.source=t,n}(Nt),Ey=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return r===0?()=>1/0:r===1?()=>1:(r=Math.log1p(-r),function(){return 1+Math.floor(Math.log1p(-e())/r)})}return n.source=t,n}(Nt),zf=function t(e){var n=Gf.source(e)();function r(i,o){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(o=o==null?1:+o,i===1)return()=>-Math.log1p(-e())*o;var a=(i<1?i+1:i)-1/3,s=1/(3*Math.sqrt(a)),u=i<1?()=>Math.pow(e(),1/i):()=>1;return function(){do{do var c=n(),l=1+s*c;while(l<=0);l*=l*l;var h=1-e()}while(h>=1-.0331*c*c*c*c&&Math.log(h)>=.5*c*c+a*(1-l+Math.log(l)));return a*l*u()*o}}return r.source=t,r}(Nt),ky=function t(e){var n=zf.source(e);function r(i,o){var a=n(i),s=n(o);return function(){var u=a();return u===0?0:u/(u+s())}}return r.source=t,r}(Nt),Cy=function t(e){var n=Ey.source(e),r=ky.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,u=o,c=a;u*c>16&&u*(1-c)>16;){var l=Math.floor((u+1)*c),h=r(l,u-l+1)();h<=c?(s+=l,u-=l,c=(c-h)/(1-h)):(u=l-1,c/=h)}for(var f=c<.5,d=f?c:1-c,p=n(d),g=p(),m=0;g<=u;++m)g+=p();return s+(f?m:u-m)}}return i.source=t,i}(Nt),_D=function t(e){function n(r,i,o){var a;return(r=+r)==0?a=s=>-Math.log(s):(r=1/r,a=s=>Math.pow(s,r)),i=i==null?0:+i,o=o==null?1:+o,function(){return i+o*a(-Math.log1p(-e()))}}return n.source=t,n}(Nt),wD=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){return r+i*Math.tan(Math.PI*e())}}return n.source=t,n}(Nt),$D=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){var o=e();return r+i*Math.log(o/(1-o))}}return n.source=t,n}(Nt),SD=function t(e){var n=zf.source(e),r=Cy.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var u=Math.floor(.875*s),c=n(u)();if(c>s)return a+r(u-1,s/c)();a+=u,s-=c}for(var l=-Math.log1p(-e()),h=0;l<=s;++h)l-=Math.log1p(-e());return a+h}}return i.source=t,i}(Nt),AD=1664525,MD=1013904223,Iy=1/4294967296;function TD(t=Math.random()){let e=(0<=t&&t<1?t/Iy:Math.abs(t))|0;return()=>(e=AD*e+MD|0,Iy*(e>>>0))}function ge(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function en(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Of=Symbol("implicit");function Uf(){var t=new Ei,e=[],n=[],r=Of;function i(o){let a=t.get(o);if(a===void 0){if(r!==Of)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Ei;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Uf(e,n).unknown(r)},ge.apply(i,arguments),i}function Bf(){var t=Uf().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,l=.5;delete t.unknown;function h(){var f=e().length,d=i<r,p=d?i:r,g=d?r:i;o=(g-p)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),p+=(g-p-o*(f-u))*l,a=o*(1-u),s&&(p=Math.round(p),a=Math.round(a));var m=ln(f).map(function(y){return p+o*y});return n(d?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),h()):e()},t.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,h()):s},t.padding=function(f){return arguments.length?(u=Math.min(1,c=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(c=+f,h()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),h()):l},t.copy=function(){return Bf(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},ge.apply(h(),arguments)}function Ry(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ry(e())},t}function Yf(){return Ry(Bf.apply(null,arguments).paddingInner(1))}function PD(t){return function(){return t}}function Qs(t){return+t}var Ny=[0,1];function Jt(t){return t}function Wf(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:PD(isNaN(e)?NaN:.5)}function DD(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function LD(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Wf(i,r),o=n(a,o)):(r=Wf(r,i),o=n(o,a)),function(s){return o(r(s))}}function ED(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Wf(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=kn(t,s,1,r)-1;return o[u](i[u](s))}}function Ao(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Js(){var t=Ny,e=Ny,n=dn,r,i,o,a=Jt,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==Jt&&(a=DD(t[0],t[f-1])),s=f>2?ED:LD,u=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(u||(u=s(t.map(r),e,n)))(r(a(f)))}return h.invert=function(f){return a(i((c||(c=s(e,t.map(r),he)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,Qs),l()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),l()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=Ua,l()},h.clamp=function(f){return arguments.length?(a=f?!0:Jt,l()):a!==Jt},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,d){return r=f,i=d,l()}}function Hf(){return Js()(Jt,Jt)}function Fy(t,e,n,r){var i=ba(t,e,n),o;switch(r=Wr(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=j1(i,a))&&(r.precision=o),Nl(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=V1(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=X1(i))&&(r.precision=o-(r.type==="%")*2);break}}return eo(r)}function bn(t){var e=t.domain;return t.ticks=function(n){var r=e();return In(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return Fy(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,l=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);l-- >0;){if(c=Rn(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function qf(){var t=Hf();return t.copy=function(){return Ao(t,qf())},ge.apply(t,arguments),bn(t)}function Gy(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Qs),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Gy(t).unknown(e)},t=arguments.length?Array.from(t,Qs):[0,1],bn(n)}function zy(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),t[n]=e.floor(i),t[r]=e.ceil(o),t}function Oy(t){return Math.log(t)}function Uy(t){return Math.exp(t)}function kD(t){return-Math.log(-t)}function CD(t){return-Math.exp(-t)}function ID(t){return isFinite(t)?+("1e"+t):t<0?0:t}function RD(t){return t===10?ID:t===Math.E?Math.exp:e=>Math.pow(t,e)}function ND(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function By(t){return(e,n)=>-t(-e,n)}function Xf(t){const e=t(Oy,Uy),n=e.domain;let r=10,i,o;function a(){return i=ND(r),o=RD(r),n()[0]<0?(i=By(i),o=By(o),t(kD,CD)):t(Oy,Uy),e}return e.base=function(s){return arguments.length?(r=+s,a()):r},e.domain=function(s){return arguments.length?(n(s),a()):n()},e.ticks=s=>{const u=n();let c=u[0],l=u[u.length-1];const h=l<c;h&&([c,l]=[l,c]);let f=i(c),d=i(l),p,g;const m=s==null?10:+s;let y=[];if(!(r%1)&&d-f<m){if(f=Math.floor(f),d=Math.ceil(d),c>0){for(;f<=d;++f)for(p=1;p<r;++p)if(g=f<0?p/o(-f):p*o(f),!(g<c)){if(g>l)break;y.push(g)}}else for(;f<=d;++f)for(p=r-1;p>=1;--p)if(g=f>0?p/o(-f):p*o(f),!(g<c)){if(g>l)break;y.push(g)}y.length*2<m&&(y=In(c,l,m))}else y=In(f,d,Math.min(d-f,m)).map(o);return h?y.reverse():y},e.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Wr(u)).precision==null&&(u.trim=!0),u=eo(u)),s===1/0)return u;const c=Math.max(1,r*s/e.ticks().length);return l=>{let h=l/o(Math.round(i(l)));return h*r<r-.5&&(h*=r),h<=c?u(l):""}},e.nice=()=>n(zy(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function Yy(){const t=Xf(Js()).domain([1,10]);return t.copy=()=>Ao(t,Yy()).base(t.base()),ge.apply(t,arguments),t}function Wy(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Hy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function jf(t){var e=1,n=t(Wy(e),Hy(e));return n.constant=function(r){return arguments.length?t(Wy(e=+r),Hy(e)):e},bn(n)}function qy(){var t=jf(Js());return t.copy=function(){return Ao(t,qy()).constant(t.constant())},ge.apply(t,arguments)}function Xy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function FD(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function GD(t){return t<0?-t*t:t*t}function Vf(t){var e=t(Jt,Jt),n=1;function r(){return n===1?t(Jt,Jt):n===.5?t(FD,GD):t(Xy(n),Xy(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},bn(e)}function tu(){var t=Vf(Js());return t.copy=function(){return Ao(t,tu()).exponent(t.exponent())},ge.apply(t,arguments),t}function zD(){return tu.apply(null,arguments).exponent(.5)}function jy(t){return Math.sign(t)*t*t}function OD(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Vy(){var t=Hf(),e=[0,1],n=!1,r;function i(o){var a=OD(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(jy(o))},i.domain=function(o){return arguments.length?(t.domain(o),i):t.domain()},i.range=function(o){return arguments.length?(t.range((e=Array.from(o,Qs)).map(jy)),i):e.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(t.clamp(o),i):t.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Vy(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},ge.apply(i,arguments),bn(i)}function Zy(){var t=[],e=[],n=[],r;function i(){var a=0,s=Math.max(1,e.length);for(n=new Array(s-1);++a<s;)n[a-1]=Pg(t,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:e[kn(n,a)]}return o.invertExtent=function(a){var s=e.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:t[0],s<n.length?n[s]:t[t.length-1]]},o.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let s of a)s!=null&&!isNaN(s=+s)&&t.push(s);return t.sort(_t),i()},o.range=function(a){return arguments.length?(e=Array.from(a),i()):e.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return Zy().domain(t).range(e).unknown(r)},ge.apply(o,arguments)}function Ky(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[kn(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Ky().domain([t,e]).range(i).unknown(o)},ge.apply(bn(a),arguments)}function Qy(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[kn(t,o,0,r)]:n}return i.domain=function(o){return arguments.length?(t=Array.from(o),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(o){return arguments.length?(e=Array.from(o),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(o){var a=e.indexOf(o);return[t[a-1],t[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Qy().domain(t).range(e).unknown(n)},ge.apply(i,arguments)}const Zf=new Date,Kf=new Date;function Tt(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(e(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return u;let c;do u.push(c=new Date(+o)),e(o,s),t(o);while(c<o&&o<a);return u},i.filter=o=>Tt(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!o(a););else for(;--s>=0;)for(;e(a,1),!o(a););}),n&&(i.count=(o,a)=>(Zf.setTime(+o),Kf.setTime(+a),t(Zf),t(Kf),Math.floor(n(Zf,Kf))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Jr=Tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Jr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Tt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Jr);const Jy=Jr.range,nn=1e3,me=nn*60,rn=me*60,on=rn*24,Qf=on*7,tb=on*30,Jf=on*365,an=Tt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*nn)},(t,e)=>(e-t)/nn,t=>t.getUTCSeconds()),eb=an.range,eu=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn)},(t,e)=>{t.setTime(+t+e*me)},(t,e)=>(e-t)/me,t=>t.getMinutes()),UD=eu.range,nu=Tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*me)},(t,e)=>(e-t)/me,t=>t.getUTCMinutes()),BD=nu.range,ru=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn-t.getMinutes()*me)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getHours()),YD=ru.range,iu=Tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getUTCHours()),WD=iu.range,ti=Tt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*me)/on,t=>t.getDate()-1),HD=ti.range,Mo=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>t.getUTCDate()-1),qD=Mo.range,th=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>Math.floor(t/on)),XD=th.range;function nr(t){return Tt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*me)/Qf)}const ei=nr(0),To=nr(1),nb=nr(2),rb=nr(3),rr=nr(4),ib=nr(5),ob=nr(6),ab=ei.range,jD=To.range,VD=nb.range,ZD=rb.range,KD=rr.range,QD=ib.range,JD=ob.range;function ir(t){return Tt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Qf)}const ni=ir(0),Po=ir(1),sb=ir(2),ub=ir(3),or=ir(4),cb=ir(5),lb=ir(6),fb=ni.range,tL=Po.range,eL=sb.range,nL=ub.range,rL=or.range,iL=cb.range,oL=lb.range,ou=Tt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),aL=ou.range,au=Tt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),sL=au.range,Oe=Tt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Oe.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const uL=Oe.range,Ue=Tt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Ue.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const cL=Ue.range;function hb(t,e,n,r,i,o){const a=[[an,1,nn],[an,5,5*nn],[an,15,15*nn],[an,30,30*nn],[o,1,me],[o,5,5*me],[o,15,15*me],[o,30,30*me],[i,1,rn],[i,3,3*rn],[i,6,6*rn],[i,12,12*rn],[r,1,on],[r,2,2*on],[n,1,Qf],[e,1,tb],[e,3,3*tb],[t,1,Jf]];function s(c,l,h){const f=l<c;f&&([c,l]=[l,c]);const d=h&&typeof h.range=="function"?h:u(c,l,h),p=d?d.range(c,+l+1):[];return f?p.reverse():p}function u(c,l,h){const f=Math.abs(l-c)/h,d=pa(([,,m])=>m).right(a,f);if(d===a.length)return t.every(ba(c/Jf,l/Jf,h));if(d===0)return Jr.every(Math.max(ba(c,l,h),1));const[p,g]=a[f/a[d-1][2]<a[d][2]/f?d-1:d];return p.every(g)}return[s,u]}const[db,pb]=hb(Ue,au,ni,th,iu,nu),[gb,mb]=hb(Oe,ou,ei,ti,ru,eu);function eh(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function nh(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Do(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function yb(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,c=Lo(i),l=Eo(i),h=Lo(o),f=Eo(o),d=Lo(a),p=Eo(a),g=Lo(s),m=Eo(s),y=Lo(u),v=Eo(u),x={a:R,A:G,b:M,B:N,c:null,d:$b,e:$b,f:kL,g:BL,G:WL,H:DL,I:LL,j:EL,L:Sb,m:CL,M:IL,p:z,q:k,Q:Lb,s:Eb,S:RL,u:NL,U:FL,V:GL,w:zL,W:OL,x:null,X:null,y:UL,Y:YL,Z:HL,"%":Db},b={a:Y,A:j,b:W,B:X,c:null,d:Mb,e:Mb,f:VL,g:oE,G:sE,H:qL,I:XL,j:jL,L:Tb,m:ZL,M:KL,p:Q,q:ct,Q:Lb,s:Eb,S:QL,u:JL,U:tE,V:eE,w:nE,W:rE,x:null,X:null,y:iE,Y:aE,Z:uE,"%":Db},w={a:E,A:T,b:I,B:P,c:D,d:_b,e:_b,f:AL,g:xb,G:vb,H:wb,I:wb,j:_L,L:SL,m:xL,M:wL,p:L,q:vL,Q:TL,s:PL,S:$L,u:pL,U:gL,V:mL,w:dL,W:yL,x:C,X:S,y:xb,Y:vb,Z:bL,"%":ML};x.x=$(n,x),x.X=$(r,x),x.c=$(e,x),b.x=$(n,b),b.X=$(r,b),b.c=$(e,b);function $(O,tt){return function(st){var q=[],xt=-1,gt=0,Ft=O.length,te,it,Mt;for(st instanceof Date||(st=new Date(+st));++xt<Ft;)O.charCodeAt(xt)===37&&(q.push(O.slice(gt,xt)),(it=bb[te=O.charAt(++xt)])!=null?te=O.charAt(++xt):it=te==="e"?" ":"0",(Mt=tt[te])&&(te=Mt(st,it)),q.push(te),gt=xt+1);return q.push(O.slice(gt,xt)),q.join("")}}function A(O,tt){return function(st){var q=Do(1900,void 0,1),xt=_(q,O,st+="",0),gt,Ft;if(xt!=st.length)return null;if("Q"in q)return new Date(q.Q);if("s"in q)return new Date(q.s*1e3+("L"in q?q.L:0));if(tt&&!("Z"in q)&&(q.Z=0),"p"in q&&(q.H=q.H%12+q.p*12),q.m===void 0&&(q.m="q"in q?q.q:0),"V"in q){if(q.V<1||q.V>53)return null;"w"in q||(q.w=1),"Z"in q?(gt=nh(Do(q.y,0,1)),Ft=gt.getUTCDay(),gt=Ft>4||Ft===0?Po.ceil(gt):Po(gt),gt=Mo.offset(gt,(q.V-1)*7),q.y=gt.getUTCFullYear(),q.m=gt.getUTCMonth(),q.d=gt.getUTCDate()+(q.w+6)%7):(gt=eh(Do(q.y,0,1)),Ft=gt.getDay(),gt=Ft>4||Ft===0?To.ceil(gt):To(gt),gt=ti.offset(gt,(q.V-1)*7),q.y=gt.getFullYear(),q.m=gt.getMonth(),q.d=gt.getDate()+(q.w+6)%7)}else("W"in q||"U"in q)&&("w"in q||(q.w="u"in q?q.u%7:"W"in q?1:0),Ft="Z"in q?nh(Do(q.y,0,1)).getUTCDay():eh(Do(q.y,0,1)).getDay(),q.m=0,q.d="W"in q?(q.w+6)%7+q.W*7-(Ft+5)%7:q.w+q.U*7-(Ft+6)%7);return"Z"in q?(q.H+=q.Z/100|0,q.M+=q.Z%100,nh(q)):eh(q)}}function _(O,tt,st,q){for(var xt=0,gt=tt.length,Ft=st.length,te,it;xt<gt;){if(q>=Ft)return-1;if(te=tt.charCodeAt(xt++),te===37){if(te=tt.charAt(xt++),it=w[te in bb?tt.charAt(xt++):te],!it||(q=it(O,st,q))<0)return-1}else if(te!=st.charCodeAt(q++))return-1}return q}function L(O,tt,st){var q=c.exec(tt.slice(st));return q?(O.p=l.get(q[0].toLowerCase()),st+q[0].length):-1}function E(O,tt,st){var q=d.exec(tt.slice(st));return q?(O.w=p.get(q[0].toLowerCase()),st+q[0].length):-1}function T(O,tt,st){var q=h.exec(tt.slice(st));return q?(O.w=f.get(q[0].toLowerCase()),st+q[0].length):-1}function I(O,tt,st){var q=y.exec(tt.slice(st));return q?(O.m=v.get(q[0].toLowerCase()),st+q[0].length):-1}function P(O,tt,st){var q=g.exec(tt.slice(st));return q?(O.m=m.get(q[0].toLowerCase()),st+q[0].length):-1}function D(O,tt,st){return _(O,e,tt,st)}function C(O,tt,st){return _(O,n,tt,st)}function S(O,tt,st){return _(O,r,tt,st)}function R(O){return a[O.getDay()]}function G(O){return o[O.getDay()]}function M(O){return u[O.getMonth()]}function N(O){return s[O.getMonth()]}function z(O){return i[+(O.getHours()>=12)]}function k(O){return 1+~~(O.getMonth()/3)}function Y(O){return a[O.getUTCDay()]}function j(O){return o[O.getUTCDay()]}function W(O){return u[O.getUTCMonth()]}function X(O){return s[O.getUTCMonth()]}function Q(O){return i[+(O.getUTCHours()>=12)]}function ct(O){return 1+~~(O.getUTCMonth()/3)}return{format:function(O){var tt=$(O+="",x);return tt.toString=function(){return O},tt},parse:function(O){var tt=A(O+="",!1);return tt.toString=function(){return O},tt},utcFormat:function(O){var tt=$(O+="",b);return tt.toString=function(){return O},tt},utcParse:function(O){var tt=A(O+="",!0);return tt.toString=function(){return O},tt}}}var bb={"-":"",_:" ",0:"0"},Rt=/^\s*\d+/,lL=/^%/,fL=/[\\^$*+?|[\]().{}]/g;function pt(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function hL(t){return t.replace(fL,"\\$&")}function Lo(t){return new RegExp("^(?:"+t.map(hL).join("|")+")","i")}function Eo(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function dL(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function pL(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function gL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function mL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function yL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function vb(t,e,n){var r=Rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function xb(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function bL(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function vL(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function xL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function _b(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function _L(t,e,n){var r=Rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function wb(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function wL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function $L(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function SL(t,e,n){var r=Rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function AL(t,e,n){var r=Rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ML(t,e,n){var r=lL.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function TL(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function PL(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function $b(t,e){return pt(t.getDate(),e,2)}function DL(t,e){return pt(t.getHours(),e,2)}function LL(t,e){return pt(t.getHours()%12||12,e,2)}function EL(t,e){return pt(1+ti.count(Oe(t),t),e,3)}function Sb(t,e){return pt(t.getMilliseconds(),e,3)}function kL(t,e){return Sb(t,e)+"000"}function CL(t,e){return pt(t.getMonth()+1,e,2)}function IL(t,e){return pt(t.getMinutes(),e,2)}function RL(t,e){return pt(t.getSeconds(),e,2)}function NL(t){var e=t.getDay();return e===0?7:e}function FL(t,e){return pt(ei.count(Oe(t)-1,t),e,2)}function Ab(t){var e=t.getDay();return e>=4||e===0?rr(t):rr.ceil(t)}function GL(t,e){return t=Ab(t),pt(rr.count(Oe(t),t)+(Oe(t).getDay()===4),e,2)}function zL(t){return t.getDay()}function OL(t,e){return pt(To.count(Oe(t)-1,t),e,2)}function UL(t,e){return pt(t.getFullYear()%100,e,2)}function BL(t,e){return t=Ab(t),pt(t.getFullYear()%100,e,2)}function YL(t,e){return pt(t.getFullYear()%1e4,e,4)}function WL(t,e){var n=t.getDay();return t=n>=4||n===0?rr(t):rr.ceil(t),pt(t.getFullYear()%1e4,e,4)}function HL(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+pt(e/60|0,"0",2)+pt(e%60,"0",2)}function Mb(t,e){return pt(t.getUTCDate(),e,2)}function qL(t,e){return pt(t.getUTCHours(),e,2)}function XL(t,e){return pt(t.getUTCHours()%12||12,e,2)}function jL(t,e){return pt(1+Mo.count(Ue(t),t),e,3)}function Tb(t,e){return pt(t.getUTCMilliseconds(),e,3)}function VL(t,e){return Tb(t,e)+"000"}function ZL(t,e){return pt(t.getUTCMonth()+1,e,2)}function KL(t,e){return pt(t.getUTCMinutes(),e,2)}function QL(t,e){return pt(t.getUTCSeconds(),e,2)}function JL(t){var e=t.getUTCDay();return e===0?7:e}function tE(t,e){return pt(ni.count(Ue(t)-1,t),e,2)}function Pb(t){var e=t.getUTCDay();return e>=4||e===0?or(t):or.ceil(t)}function eE(t,e){return t=Pb(t),pt(or.count(Ue(t),t)+(Ue(t).getUTCDay()===4),e,2)}function nE(t){return t.getUTCDay()}function rE(t,e){return pt(Po.count(Ue(t)-1,t),e,2)}function iE(t,e){return pt(t.getUTCFullYear()%100,e,2)}function oE(t,e){return t=Pb(t),pt(t.getUTCFullYear()%100,e,2)}function aE(t,e){return pt(t.getUTCFullYear()%1e4,e,4)}function sE(t,e){var n=t.getUTCDay();return t=n>=4||n===0?or(t):or.ceil(t),pt(t.getUTCFullYear()%1e4,e,4)}function uE(){return"+0000"}function Db(){return"%"}function Lb(t){return+t}function Eb(t){return Math.floor(+t/1e3)}var ri,rh,kb,su,ih;Cb({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Cb(t){return ri=yb(t),rh=ri.format,kb=ri.parse,su=ri.utcFormat,ih=ri.utcParse,ri}var Ib="%Y-%m-%dT%H:%M:%S.%LZ";function cE(t){return t.toISOString()}var lE=Date.prototype.toISOString?cE:su(Ib);const fE=lE;function hE(t){var e=new Date(t);return isNaN(e)?null:e}var dE=+new Date("2000-01-01T00:00:00.000Z")?hE:ih(Ib);const pE=dE;function gE(t){return new Date(t)}function mE(t){return t instanceof Date?+t:+new Date(+t)}function oh(t,e,n,r,i,o,a,s,u,c){var l=Hf(),h=l.invert,f=l.domain,d=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),v=c("%b %d"),x=c("%B"),b=c("%Y");function w($){return(u($)<$?d:s($)<$?p:a($)<$?g:o($)<$?m:r($)<$?i($)<$?y:v:n($)<$?x:b)($)}return l.invert=function($){return new Date(h($))},l.domain=function($){return arguments.length?f(Array.from($,mE)):f().map(gE)},l.ticks=function($){var A=f();return t(A[0],A[A.length-1],$??10)},l.tickFormat=function($,A){return A==null?w:c(A)},l.nice=function($){var A=f();return(!$||typeof $.range!="function")&&($=e(A[0],A[A.length-1],$??10)),$?f(zy(A,$)):l},l.copy=function(){return Ao(l,oh(t,e,n,r,i,o,a,s,u,c))},l}function yE(){return ge.apply(oh(gb,mb,Oe,ou,ei,ti,ru,eu,an,rh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function bE(){return ge.apply(oh(db,pb,Ue,au,ni,Mo,iu,nu,an,su).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function uu(){var t=0,e=1,n,r,i,o,a=Jt,s=!1,u;function c(h){return h==null||isNaN(h=+h)?u:a(i===0?.5:(h=(o(h)-n)*i,s?Math.max(0,Math.min(1,h)):h))}c.domain=function(h){return arguments.length?([t,e]=h,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),c):[t,e]},c.clamp=function(h){return arguments.length?(s=!!h,c):s},c.interpolator=function(h){return arguments.length?(a=h,c):a};function l(h){return function(f){var d,p;return arguments.length?([d,p]=f,a=h(d,p),c):[a(0),a(1)]}}return c.range=l(dn),c.rangeRound=l(Ua),c.unknown=function(h){return arguments.length?(u=h,c):u},function(h){return o=h,n=h(t),r=h(e),i=n===r?0:1/(r-n),c}}function vn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Rb(){var t=bn(uu()(Jt));return t.copy=function(){return vn(t,Rb())},en.apply(t,arguments)}function Nb(){var t=Xf(uu()).domain([1,10]);return t.copy=function(){return vn(t,Nb()).base(t.base())},en.apply(t,arguments)}function Fb(){var t=jf(uu());return t.copy=function(){return vn(t,Fb()).constant(t.constant())},en.apply(t,arguments)}function ah(){var t=Vf(uu());return t.copy=function(){return vn(t,ah()).exponent(t.exponent())},en.apply(t,arguments)}function vE(){return ah.apply(null,arguments).exponent(.5)}function Gb(){var t=[],e=Jt;function n(r){if(r!=null&&!isNaN(r=+r))return e((kn(t,r,1)-1)/(t.length-1))}return n.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let i of r)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(_t),n},n.interpolator=function(r){return arguments.length?(e=r,n):e},n.range=function(){return t.map((r,i)=>e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>Ii(t,o/r))},n.copy=function(){return Gb(e).domain(t)},en.apply(n,arguments)}function cu(){var t=0,e=.5,n=1,r=1,i,o,a,s,u,c=Jt,l,h=!1,f;function d(g){return isNaN(g=+g)?f:(g=.5+((g=+l(g))-o)*(r*g<r*o?s:u),c(h?Math.max(0,Math.min(1,g)):g))}d.domain=function(g){return arguments.length?([t,e,n]=g,i=l(t=+t),o=l(e=+e),a=l(n=+n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,d):[t,e,n]},d.clamp=function(g){return arguments.length?(h=!!g,d):h},d.interpolator=function(g){return arguments.length?(c=g,d):c};function p(g){return function(m){var y,v,x;return arguments.length?([y,v,x]=m,c=z0(g,[y,v,x]),d):[c(0),c(.5),c(1)]}}return d.range=p(dn),d.rangeRound=p(Ua),d.unknown=function(g){return arguments.length?(f=g,d):f},function(g){return l=g,i=g(t),o=g(e),a=g(n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,d}}function zb(){var t=bn(cu()(Jt));return t.copy=function(){return vn(t,zb())},en.apply(t,arguments)}function Ob(){var t=Xf(cu()).domain([.1,1,10]);return t.copy=function(){return vn(t,Ob()).base(t.base())},en.apply(t,arguments)}function Ub(){var t=jf(cu());return t.copy=function(){return vn(t,Ub()).constant(t.constant())},en.apply(t,arguments)}function sh(){var t=Vf(cu());return t.copy=function(){return vn(t,sh()).exponent(t.exponent())},en.apply(t,arguments)}function xE(){return sh.apply(null,arguments).exponent(.5)}function ut(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const _E=ut("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),wE=ut("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),$E=ut("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),SE=ut("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),AE=ut("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),ME=ut("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),TE=ut("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),PE=ut("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),DE=ut("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),LE=ut("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),EE=ut("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),bt=t=>S0(t[t.length-1]);var Bb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ut);const kE=bt(Bb);var Yb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ut);const CE=bt(Yb);var Wb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ut);const IE=bt(Wb);var Hb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ut);const RE=bt(Hb);var qb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ut);const NE=bt(qb);var Xb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ut);const FE=bt(Xb);var jb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ut);const GE=bt(jb);var Vb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ut);const zE=bt(Vb);var Zb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ut);const OE=bt(Zb);var Kb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ut);const UE=bt(Kb);var Qb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ut);const BE=bt(Qb);var Jb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ut);const YE=bt(Jb);var tv=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ut);const WE=bt(tv);var ev=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ut);const HE=bt(ev);var nv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ut);const qE=bt(nv);var rv=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ut);const XE=bt(rv);var iv=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ut);const jE=bt(iv);var ov=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ut);const VE=bt(ov);var av=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ut);const ZE=bt(av);var sv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ut);const KE=bt(sv);var uv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ut);const QE=bt(uv);var cv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ut);const JE=bt(cv);var lv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ut);const tk=bt(lv);var fv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ut);const ek=bt(fv);var hv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ut);const nk=bt(hv);var dv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ut);const rk=bt(dv);var pv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ut);const ik=bt(pv);function ok(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-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const ak=Ya(Me(300,.5,0),Me(-240,.5,1));var sk=Ya(Me(-100,.75,.35),Me(80,1.5,.8)),uk=Ya(Me(260,.75,.35),Me(80,1.5,.8)),lu=Me();function ck(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return lu.h=360*t-100,lu.s=1.5-1.5*e,lu.l=.8-.9*e,lu+""}var fu=kr(),lk=Math.PI/3,fk=Math.PI*2/3;function hk(t){var e;return t=(.5-t)*Math.PI,fu.r=255*(e=Math.sin(t))*e,fu.g=255*(e=Math.sin(t+lk))*e,fu.b=255*(e=Math.sin(t+fk))*e,fu+""}function dk(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-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function hu(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const pk=hu(ut("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var gk=hu(ut("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),mk=hu(ut("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),yk=hu(ut("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function at(t){return function(){return t}}const gv=Math.abs,Ut=Math.atan2,sn=Math.cos,bk=Math.max,ii=Math.min,ie=Math.sin,vt=Math.sqrt,Bt=1e-12,xn=Math.PI,du=xn/2,_n=2*xn;function vk(t){return t>1?0:t<-1?xn:Math.acos(t)}function mv(t){return t>=1?du:t<=-1?-du:Math.asin(t)}function ko(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new Ki(e)}function xk(t){return t.innerRadius}function _k(t){return t.outerRadius}function wk(t){return t.startAngle}function $k(t){return t.endAngle}function Sk(t){return t&&t.padAngle}function Ak(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,h=s-o,f=h*u-l*c;if(!(f*f<Bt))return f=(l*(e-o)-h*(t-i))/f,[t+f*u,e+f*c]}function pu(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/vt(s*s+u*u),l=c*u,h=-c*s,f=t+l,d=e+h,p=n+l,g=r+h,m=(f+p)/2,y=(d+g)/2,v=p-f,x=g-d,b=v*v+x*x,w=i-o,$=f*g-p*d,A=(x<0?-1:1)*vt(bk(0,w*w*b-$*$)),_=($*x-v*A)/b,L=(-$*v-x*A)/b,E=($*x+v*A)/b,T=(-$*v+x*A)/b,I=_-m,P=L-y,D=E-m,C=T-y;return I*I+P*P>D*D+C*C&&(_=E,L=T),{cx:_,cy:L,x01:-l,y01:-h,x11:_*(i/w-1),y11:L*(i/w-1)}}function yv(){var t=xk,e=_k,n=at(0),r=null,i=wk,o=$k,a=Sk,s=null,u=ko(c);function c(){var l,h,f=+t.apply(this,arguments),d=+e.apply(this,arguments),p=i.apply(this,arguments)-du,g=o.apply(this,arguments)-du,m=gv(g-p),y=g>p;if(s||(s=l=u()),d<f&&(h=d,d=f,f=h),!(d>Bt))s.moveTo(0,0);else if(m>_n-Bt)s.moveTo(d*sn(p),d*ie(p)),s.arc(0,0,d,p,g,!y),f>Bt&&(s.moveTo(f*sn(g),f*ie(g)),s.arc(0,0,f,g,p,y));else{var v=p,x=g,b=p,w=g,$=m,A=m,_=a.apply(this,arguments)/2,L=_>Bt&&(r?+r.apply(this,arguments):vt(f*f+d*d)),E=ii(gv(d-f)/2,+n.apply(this,arguments)),T=E,I=E,P,D;if(L>Bt){var C=mv(L/f*ie(_)),S=mv(L/d*ie(_));($-=C*2)>Bt?(C*=y?1:-1,b+=C,w-=C):($=0,b=w=(p+g)/2),(A-=S*2)>Bt?(S*=y?1:-1,v+=S,x-=S):(A=0,v=x=(p+g)/2)}var R=d*sn(v),G=d*ie(v),M=f*sn(w),N=f*ie(w);if(E>Bt){var z=d*sn(x),k=d*ie(x),Y=f*sn(b),j=f*ie(b),W;if(m<xn)if(W=Ak(R,G,Y,j,z,k,M,N)){var X=R-W[0],Q=G-W[1],ct=z-W[0],O=k-W[1],tt=1/ie(vk((X*ct+Q*O)/(vt(X*X+Q*Q)*vt(ct*ct+O*O)))/2),st=vt(W[0]*W[0]+W[1]*W[1]);T=ii(E,(f-st)/(tt-1)),I=ii(E,(d-st)/(tt+1))}else T=I=0}A>Bt?I>Bt?(P=pu(Y,j,R,G,d,I,y),D=pu(z,k,M,N,d,I,y),s.moveTo(P.cx+P.x01,P.cy+P.y01),I<E?s.arc(P.cx,P.cy,I,Ut(P.y01,P.x01),Ut(D.y01,D.x01),!y):(s.arc(P.cx,P.cy,I,Ut(P.y01,P.x01),Ut(P.y11,P.x11),!y),s.arc(0,0,d,Ut(P.cy+P.y11,P.cx+P.x11),Ut(D.cy+D.y11,D.cx+D.x11),!y),s.arc(D.cx,D.cy,I,Ut(D.y11,D.x11),Ut(D.y01,D.x01),!y))):(s.moveTo(R,G),s.arc(0,0,d,v,x,!y)):s.moveTo(R,G),!(f>Bt)||!($>Bt)?s.lineTo(M,N):T>Bt?(P=pu(M,N,z,k,f,-T,y),D=pu(R,G,Y,j,f,-T,y),s.lineTo(P.cx+P.x01,P.cy+P.y01),T<E?s.arc(P.cx,P.cy,T,Ut(P.y01,P.x01),Ut(D.y01,D.x01),!y):(s.arc(P.cx,P.cy,T,Ut(P.y01,P.x01),Ut(P.y11,P.x11),!y),s.arc(0,0,f,Ut(P.cy+P.y11,P.cx+P.x11),Ut(D.cy+D.y11,D.cx+D.x11),y),s.arc(D.cx,D.cy,T,Ut(D.y11,D.x11),Ut(D.y01,D.x01),!y))):s.arc(0,0,f,w,b,y)}if(s.closePath(),l)return s=null,l+""||null}return c.centroid=function(){var l=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-xn/2;return[sn(h)*l,ie(h)*l]},c.innerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:at(+l),c):t},c.outerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:at(+l),c):e},c.cornerRadius=function(l){return arguments.length?(n=typeof l=="function"?l:at(+l),c):n},c.padRadius=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:at(+l),c):r},c.startAngle=function(l){return arguments.length?(i=typeof l=="function"?l:at(+l),c):i},c.endAngle=function(l){return arguments.length?(o=typeof l=="function"?l:at(+l),c):o},c.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:at(+l),c):a},c.context=function(l){return arguments.length?(s=l??null,c):s},c}var Mk=Array.prototype.slice;function gu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function bv(t){this._context=t}bv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function mu(t){return new bv(t)}function uh(t){return t[0]}function ch(t){return t[1]}function yu(t,e){var n=at(!0),r=null,i=mu,o=null,a=ko(s);t=typeof t=="function"?t:t===void 0?uh:at(t),e=typeof e=="function"?e:e===void 0?ch:at(e);function s(u){var c,l=(u=gu(u)).length,h,f=!1,d;for(r==null&&(o=i(d=a())),c=0;c<=l;++c)!(c<l&&n(h=u[c],c,u))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(h,c,u),+e(h,c,u));if(d)return o=null,d+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:at(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:at(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:at(!!u),s):n},s.curve=function(u){return arguments.length?(i=u,r!=null&&(o=i(r)),s):i},s.context=function(u){return arguments.length?(u==null?r=o=null:o=i(r=u),s):r},s}function lh(t,e,n){var r=null,i=at(!0),o=null,a=mu,s=null,u=ko(c);t=typeof t=="function"?t:t===void 0?uh:at(+t),e=typeof e=="function"?e:at(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?ch:at(+n);function c(h){var f,d,p,g=(h=gu(h)).length,m,y=!1,v,x=new Array(g),b=new Array(g);for(o==null&&(s=a(v=u())),f=0;f<=g;++f){if(!(f<g&&i(m=h[f],f,h))===y)if(y=!y)d=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=f-1;p>=d;--p)s.point(x[p],b[p]);s.lineEnd(),s.areaEnd()}y&&(x[f]=+t(m,f,h),b[f]=+e(m,f,h),s.point(r?+r(m,f,h):x[f],n?+n(m,f,h):b[f]))}if(v)return s=null,v+""||null}function l(){return yu().defined(i).curve(a).context(o)}return c.x=function(h){return arguments.length?(t=typeof h=="function"?h:at(+h),r=null,c):t},c.x0=function(h){return arguments.length?(t=typeof h=="function"?h:at(+h),c):t},c.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:at(+h),c):r},c.y=function(h){return arguments.length?(e=typeof h=="function"?h:at(+h),n=null,c):e},c.y0=function(h){return arguments.length?(e=typeof h=="function"?h:at(+h),c):e},c.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:at(+h),c):n},c.lineX0=c.lineY0=function(){return l().x(t).y(e)},c.lineY1=function(){return l().x(t).y(n)},c.lineX1=function(){return l().x(r).y(e)},c.defined=function(h){return arguments.length?(i=typeof h=="function"?h:at(!!h),c):i},c.curve=function(h){return arguments.length?(a=h,o!=null&&(s=a(o)),c):a},c.context=function(h){return arguments.length?(h==null?o=s=null:s=a(o=h),c):o},c}function Tk(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Pk(t){return t}function vv(){var t=Pk,e=Tk,n=null,r=at(0),i=at(_n),o=at(0);function a(s){var u,c=(s=gu(s)).length,l,h,f=0,d=new Array(c),p=new Array(c),g=+r.apply(this,arguments),m=Math.min(_n,Math.max(-_n,i.apply(this,arguments)-g)),y,v=Math.min(Math.abs(m)/c,o.apply(this,arguments)),x=v*(m<0?-1:1),b;for(u=0;u<c;++u)(b=p[d[u]=u]=+t(s[u],u,s))>0&&(f+=b);for(e!=null?d.sort(function(w,$){return e(p[w],p[$])}):n!=null&&d.sort(function(w,$){return n(s[w],s[$])}),u=0,h=f?(m-c*x)/f:0;u<c;++u,g=y)l=d[u],b=p[l],y=g+(b>0?b*h:0)+x,p[l]={data:s[l],index:u,value:b,startAngle:g,endAngle:y,padAngle:v};return p}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:at(+s),a):t},a.sortValues=function(s){return arguments.length?(e=s,n=null,a):e},a.sort=function(s){return arguments.length?(n=s,e=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:at(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:at(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:at(+s),a):o},a}var xv=fh(mu);function _v(t){this._curve=t}_v.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};function fh(t){function e(n){return new _v(t(n))}return e._curve=t,e}function Co(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(fh(n)):e()._curve},t}function wv(){return Co(yu().curve(xv))}function $v(){var t=lh().curve(xv),e=t.curve,n=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 Co(n())},delete t.lineX0,t.lineEndAngle=function(){return Co(r())},delete t.lineX1,t.lineInnerRadius=function(){return Co(i())},delete t.lineY0,t.lineOuterRadius=function(){return Co(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(fh(a)):e()._curve},t}function Io(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class Sv{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}class Dk{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,n){if(e=+e,n=+n,this._point===0)this._point=1;else{const r=Io(this._x0,this._y0),i=Io(this._x0,this._y0=(this._y0+n)/2),o=Io(e,this._y0),a=Io(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function Av(t){return new Sv(t,!0)}function Mv(t){return new Sv(t,!1)}function Lk(t){return new Dk(t)}function Ek(t){return t.source}function kk(t){return t.target}function bu(t){let e=Ek,n=kk,r=uh,i=ch,o=null,a=null,s=ko(u);function u(){let c;const l=Mk.call(arguments),h=e.apply(this,l),f=n.apply(this,l);if(o==null&&(a=t(c=s())),a.lineStart(),l[0]=h,a.point(+r.apply(this,l),+i.apply(this,l)),l[0]=f,a.point(+r.apply(this,l),+i.apply(this,l)),a.lineEnd(),c)return a=null,c+""||null}return u.source=function(c){return arguments.length?(e=c,u):e},u.target=function(c){return arguments.length?(n=c,u):n},u.x=function(c){return arguments.length?(r=typeof c=="function"?c:at(+c),u):r},u.y=function(c){return arguments.length?(i=typeof c=="function"?c:at(+c),u):i},u.context=function(c){return arguments.length?(c==null?o=a=null:a=t(o=c),u):o},u}function Ck(){return bu(Av)}function Ik(){return bu(Mv)}function Rk(){const t=bu(Lk);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const Nk=vt(3),Tv={draw(t,e){const n=vt(e+ii(e/28,.75))*.59436,r=n/2,i=r*Nk;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},vu={draw(t,e){const n=vt(e/xn);t.moveTo(n,0),t.arc(0,0,n,0,_n)}},Pv={draw(t,e){const n=vt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},Dv=vt(1/3),Fk=Dv*2,Lv={draw(t,e){const n=vt(e/Fk),r=n*Dv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Ev={draw(t,e){const n=vt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},kv={draw(t,e){const n=vt(e-ii(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},Cv={draw(t,e){const n=vt(e),r=-n/2;t.rect(r,r,n,n)}},Iv={draw(t,e){const n=vt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},Gk=.8908130915292852,Rv=ie(xn/10)/ie(7*xn/10),zk=ie(_n/10)*Rv,Ok=-sn(_n/10)*Rv,Nv={draw(t,e){const n=vt(e*Gk),r=zk*n,i=Ok*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=_n*o/5,s=sn(a),u=ie(a);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},hh=vt(3),Fv={draw(t,e){const n=-vt(e/(hh*3));t.moveTo(0,n*2),t.lineTo(-hh*n,-n),t.lineTo(hh*n,-n),t.closePath()}},Uk=vt(3),Gv={draw(t,e){const n=vt(e)*.6824,r=n/2,i=n*Uk/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},ye=-.5,be=vt(3)/2,dh=1/vt(12),Bk=(dh/2+1)*3,zv={draw(t,e){const n=vt(e/Bk),r=n/2,i=n*dh,o=r,a=n*dh+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(ye*r-be*i,be*r+ye*i),t.lineTo(ye*o-be*a,be*o+ye*a),t.lineTo(ye*s-be*u,be*s+ye*u),t.lineTo(ye*r+be*i,ye*i-be*r),t.lineTo(ye*o+be*a,ye*a-be*o),t.lineTo(ye*s+be*u,ye*u-be*s),t.closePath()}},ph={draw(t,e){const n=vt(e-ii(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},Ov=[vu,Pv,Lv,Cv,Nv,Fv,zv],Yk=[vu,kv,ph,Gv,Tv,Iv,Ev];function Wk(t,e){let n=null,r=ko(i);t=typeof t=="function"?t:at(t||vu),e=typeof e=="function"?e:at(e===void 0?64:+e);function i(){let o;if(n||(n=o=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(t=typeof o=="function"?o:at(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:at(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function wn(){}function xu(t,e,n){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+e)/6,(t._y0+4*t._y1+n)/6)}function _u(t){this._context=t}_u.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:xu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:xu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Hk(t){return new _u(t)}function Uv(t){this._context=t}Uv.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:xu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function qk(t){return new Uv(t)}function Bv(t){this._context=t}Bv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:xu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Xk(t){return new Bv(t)}function Yv(t,e){this._basis=new _u(t),this._beta=e}Yv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r=t[0],i=e[0],o=t[n]-r,a=e[n]-i,s=-1,u;++s<=n;)u=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(r+u*o),this._beta*e[s]+(1-this._beta)*(i+u*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const jk=function t(e){function n(r){return e===1?new _u(r):new Yv(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function wu(t,e,n){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-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function gh(t,e){this._context=t,this._k=(1-e)/6}gh.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:wu(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:wu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Vk=function t(e){function n(r){return new gh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function mh(t,e){this._context=t,this._k=(1-e)/6}mh.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:wu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Zk=function t(e){function n(r){return new mh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function yh(t,e){this._context=t,this._k=(1-e)/6}yh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,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:wu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Kk=function t(e){function n(r){return new yh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function bh(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Bt){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Bt){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/l,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Wv(t,e){this._context=t,this._alpha=e}Wv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:bh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Qk=function t(e){function n(r){return e?new Wv(r,e):new gh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Hv(t,e){this._context=t,this._alpha=e}Hv.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:bh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Jk=function t(e){function n(r){return e?new Hv(r,e):new mh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function qv(t,e){this._context=t,this._alpha=e}qv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+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:bh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const tC=function t(e){function n(r){return e?new qv(r,e):new yh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Xv(t){this._context=t}Xv.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function eC(t){return new Xv(t)}function jv(t){return t<0?-1:1}function Vv(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(jv(o)+jv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Zv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function vh(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function $u(t){this._context=t}$u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:vh(this,this._t0,Zv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,vh(this,Zv(this,n=Vv(this,t,e)),n);break;default:vh(this,this._t0,n=Vv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Kv(t){this._context=new Qv(t)}(Kv.prototype=Object.create($u.prototype)).point=function(t,e){$u.prototype.point.call(this,e,t)};function Qv(t){this._context=t}Qv.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function nC(t){return new $u(t)}function rC(t){return new Kv(t)}function Jv(t){this._context=t}Jv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=t2(t),i=t2(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function t2(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,a[e]-=r*a[e-1];for(i[n-1]=a[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function iC(t){return new Jv(t)}function Su(t,e){this._context=t,this._t=e}Su.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function oC(t){return new Su(t,.5)}function aC(t){return new Su(t,0)}function sC(t){return new Su(t,1)}function oi(t,e){if((a=t.length)>1)for(var n=1,r,i,o=t[e[0]],a,s=o.length;n<a;++n)for(i=o,o=t[e[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function ai(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function uC(t,e){return t[e]}function cC(t){const e=[];return e.key=t,e}function lC(){var t=at([]),e=ai,n=oi,r=uC;function i(o){var a=Array.from(t.apply(this,arguments),cC),s,u=a.length,c=-1,l;for(const h of o)for(s=0,++c;s<u;++s)(a[s][c]=[0,+r(h,a[s].key,c,o)]).data=h;for(s=0,l=gu(e(a));s<u;++s)a[l[s]].index=s;return n(a,l),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:at(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:at(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?ai:typeof o=="function"?o:at(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??oi,i):n},i}function fC(t,e){if((r=t.length)>0){for(var n,r,i=0,o=t[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=t[n][i][1]||0;if(a)for(n=0;n<r;++n)t[n][i][1]/=a}oi(t,e)}}function hC(t,e){if((u=t.length)>0)for(var n,r=0,i,o,a,s,u,c=t[e[0]].length;r<c;++r)for(a=s=0,n=0;n<u;++n)(o=(i=t[e[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function dC(t,e){if((i=t.length)>0){for(var n=0,r=t[e[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=t[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}oi(t,e)}}function pC(t,e){if(!(!((a=t.length)>0)||!((o=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,u=0,c=0;s<a;++s){for(var l=t[e[s]],h=l[r][1]||0,f=l[r-1][1]||0,d=(h-f)/2,p=0;p<s;++p){var g=t[e[p]],m=g[r][1]||0,y=g[r-1][1]||0;d+=m-y}u+=h,c+=d*h}i[r-1][1]+=i[r-1][0]=n,u&&(n-=c/u)}i[r-1][1]+=i[r-1][0]=n,oi(t,e)}}function e2(t){var e=t.map(gC);return ai(t).sort(function(n,r){return e[n]-e[r]})}function gC(t){for(var e=-1,n=0,r=t.length,i,o=-1/0;++e<r;)(i=+t[e][1])>o&&(o=i,n=e);return n}function n2(t){var e=t.map(r2);return ai(t).sort(function(n,r){return e[n]-e[r]})}function r2(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function mC(t){return n2(t).reverse()}function yC(t){var e=t.length,n,r,i=t.map(r2),o=e2(t),a=0,s=0,u=[],c=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],u.push(r)):(s+=i[r],c.push(r));return c.reverse().concat(u)}function bC(t){return ai(t).reverse()}const Au=t=>()=>t;function vC(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Be(t,e,n){this.k=t,this.x=e,this.y=n}Be.prototype={constructor:Be,scale:function(t){return t===1?this:new Be(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Be(this.k,this.x+this.k*t,this.y+this.k*e)},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 Mu=new Be(1,0,0);i2.prototype=Be.prototype;function i2(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Mu;return t.__zoom}function xh(t){t.stopImmediatePropagation()}function Ro(t){t.preventDefault(),t.stopImmediatePropagation()}function xC(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function _C(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.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 o2(){return this.__zoom||Mu}function wC(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function $C(){return navigator.maxTouchPoints||"ontouchstart"in this}function SC(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[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 a2(){var t=xC,e=_C,n=SC,r=wC,i=$C,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=R0,c=Nn("start","zoom","end"),l,h,f,d=500,p=150,g=0,m=10;function y(D){D.property("__zoom",o2).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",E).filter(i).on("touchstart.zoom",T).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",P).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(D,C,S,R){var G=D.selection?D.selection():D;G.property("__zoom",o2),D!==G?w(D,C,S,R):G.interrupt().each(function(){$(this,arguments).event(R).start().zoom(null,typeof C=="function"?C.apply(this,arguments):C).end()})},y.scaleBy=function(D,C,S,R){y.scaleTo(D,function(){var G=this.__zoom.k,M=typeof C=="function"?C.apply(this,arguments):C;return G*M},S,R)},y.scaleTo=function(D,C,S,R){y.transform(D,function(){var G=e.apply(this,arguments),M=this.__zoom,N=S==null?b(G):typeof S=="function"?S.apply(this,arguments):S,z=M.invert(N),k=typeof C=="function"?C.apply(this,arguments):C;return n(x(v(M,k),N,z),G,a)},S,R)},y.translateBy=function(D,C,S,R){y.transform(D,function(){return n(this.__zoom.translate(typeof C=="function"?C.apply(this,arguments):C,typeof S=="function"?S.apply(this,arguments):S),e.apply(this,arguments),a)},null,R)},y.translateTo=function(D,C,S,R,G){y.transform(D,function(){var M=e.apply(this,arguments),N=this.__zoom,z=R==null?b(M):typeof R=="function"?R.apply(this,arguments):R;return n(Mu.translate(z[0],z[1]).scale(N.k).translate(typeof C=="function"?-C.apply(this,arguments):-C,typeof S=="function"?-S.apply(this,arguments):-S),M,a)},R,G)};function v(D,C){return C=Math.max(o[0],Math.min(o[1],C)),C===D.k?D:new Be(C,D.x,D.y)}function x(D,C,S){var R=C[0]-S[0]*D.k,G=C[1]-S[1]*D.k;return R===D.x&&G===D.y?D:new Be(D.k,R,G)}function b(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function w(D,C,S,R){D.on("start.zoom",function(){$(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){$(this,arguments).event(R).end()}).tween("zoom",function(){var G=this,M=arguments,N=$(G,M).event(R),z=e.apply(G,M),k=S==null?b(z):typeof S=="function"?S.apply(G,M):S,Y=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),j=G.__zoom,W=typeof C=="function"?C.apply(G,M):C,X=u(j.invert(k).concat(Y/j.k),W.invert(k).concat(Y/W.k));return function(Q){if(Q===1)Q=W;else{var ct=X(Q),O=Y/ct[2];Q=new Be(O,k[0]-ct[0]*O,k[1]-ct[1]*O)}N.zoom(null,Q)}})}function $(D,C,S){return!S&&D.__zooming||new A(D,C)}function A(D,C){this.that=D,this.args=C,this.active=0,this.sourceEvent=null,this.extent=e.apply(D,C),this.taps=0}A.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,C){return this.mouse&&D!=="mouse"&&(this.mouse[1]=C.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=C.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=C.invert(this.touch1[0])),this.that.__zoom=C,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var C=V(this.that).datum();c.call(D,this.that,new vC(D,{sourceEvent:this.sourceEvent,target:y,type:D,transform:this.that.__zoom,dispatch:c}),C)}};function _(D,...C){if(!t.apply(this,arguments))return;var S=$(this,C).event(D),R=this.__zoom,G=Math.max(o[0],Math.min(o[1],R.k*Math.pow(2,r.apply(this,arguments)))),M=se(D);if(S.wheel)(S.mouse[0][0]!==M[0]||S.mouse[0][1]!==M[1])&&(S.mouse[1]=R.invert(S.mouse[0]=M)),clearTimeout(S.wheel);else{if(R.k===G)return;S.mouse=[M,R.invert(M)],Wn(this),S.start()}Ro(D),S.wheel=setTimeout(N,p),S.zoom("mouse",n(x(v(R,G),S.mouse[0],S.mouse[1]),S.extent,a));function N(){S.wheel=null,S.end()}}function L(D,...C){if(f||!t.apply(this,arguments))return;var S=D.currentTarget,R=$(this,C,!0).event(D),G=V(D.view).on("mousemove.zoom",k,!0).on("mouseup.zoom",Y,!0),M=se(D,S),N=D.clientX,z=D.clientY;Pa(D.view),xh(D),R.mouse=[M,this.__zoom.invert(M)],Wn(this),R.start();function k(j){if(Ro(j),!R.moved){var W=j.clientX-N,X=j.clientY-z;R.moved=W*W+X*X>g}R.event(j).zoom("mouse",n(x(R.that.__zoom,R.mouse[0]=se(j,S),R.mouse[1]),R.extent,a))}function Y(j){G.on("mousemove.zoom mouseup.zoom",null),Da(j.view,R.moved),Ro(j),R.event(j).end()}}function E(D,...C){if(t.apply(this,arguments)){var S=this.__zoom,R=se(D.changedTouches?D.changedTouches[0]:D,this),G=S.invert(R),M=S.k*(D.shiftKey?.5:2),N=n(x(v(S,M),R,G),e.apply(this,C),a);Ro(D),s>0?V(this).transition().duration(s).call(w,N,R,D):V(this).call(y.transform,N,R,D)}}function T(D,...C){if(t.apply(this,arguments)){var S=D.touches,R=S.length,G=$(this,C,D.changedTouches.length===R).event(D),M,N,z,k;for(xh(D),N=0;N<R;++N)z=S[N],k=se(z,this),k=[k,this.__zoom.invert(k),z.identifier],G.touch0?!G.touch1&&G.touch0[2]!==k[2]&&(G.touch1=k,G.taps=0):(G.touch0=k,M=!0,G.taps=1+!!l);l&&(l=clearTimeout(l)),M&&(G.taps<2&&(h=k[0],l=setTimeout(function(){l=null},d)),Wn(this),G.start())}}function I(D,...C){if(this.__zooming){var S=$(this,C).event(D),R=D.changedTouches,G=R.length,M,N,z,k;for(Ro(D),M=0;M<G;++M)N=R[M],z=se(N,this),S.touch0&&S.touch0[2]===N.identifier?S.touch0[0]=z:S.touch1&&S.touch1[2]===N.identifier&&(S.touch1[0]=z);if(N=S.that.__zoom,S.touch1){var Y=S.touch0[0],j=S.touch0[1],W=S.touch1[0],X=S.touch1[1],Q=(Q=W[0]-Y[0])*Q+(Q=W[1]-Y[1])*Q,ct=(ct=X[0]-j[0])*ct+(ct=X[1]-j[1])*ct;N=v(N,Math.sqrt(Q/ct)),z=[(Y[0]+W[0])/2,(Y[1]+W[1])/2],k=[(j[0]+X[0])/2,(j[1]+X[1])/2]}else if(S.touch0)z=S.touch0[0],k=S.touch0[1];else return;S.zoom("touch",n(x(N,z,k),S.extent,a))}}function P(D,...C){if(this.__zooming){var S=$(this,C).event(D),R=D.changedTouches,G=R.length,M,N;for(xh(D),f&&clearTimeout(f),f=setTimeout(function(){f=null},d),M=0;M<G;++M)N=R[M],S.touch0&&S.touch0[2]===N.identifier?delete S.touch0:S.touch1&&S.touch1[2]===N.identifier&&delete S.touch1;if(S.touch1&&!S.touch0&&(S.touch0=S.touch1,delete S.touch1),S.touch0)S.touch0[1]=this.__zoom.invert(S.touch0[0]);else if(S.end(),S.taps===2&&(N=se(N,this),Math.hypot(h[0]-N[0],h[1]-N[1])<m)){var z=V(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return y.wheelDelta=function(D){return arguments.length?(r=typeof D=="function"?D:Au(+D),y):r},y.filter=function(D){return arguments.length?(t=typeof D=="function"?D:Au(!!D),y):t},y.touchable=function(D){return arguments.length?(i=typeof D=="function"?D:Au(!!D),y):i},y.extent=function(D){return arguments.length?(e=typeof D=="function"?D:Au([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),y):e},y.scaleExtent=function(D){return arguments.length?(o[0]=+D[0],o[1]=+D[1],y):[o[0],o[1]]},y.translateExtent=function(D){return arguments.length?(a[0][0]=+D[0][0],a[1][0]=+D[1][0],a[0][1]=+D[0][1],a[1][1]=+D[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(D){return arguments.length?(n=D,y):n},y.duration=function(D){return arguments.length?(s=+D,y):s},y.interpolate=function(D){return arguments.length?(u=D,y):u},y.on=function(){var D=c.on.apply(c,arguments);return D===c?y:D},y.clickDistance=function(D){return arguments.length?(g=(D=+D)*D,y):Math.sqrt(g)},y.tapDistance=function(D){return arguments.length?(m=+D,y):m},y}const _h=Object.freeze(Object.defineProperty({__proto__:null,Adder:Dt,Delaunay:Ll,FormatSpecifier:cs,InternMap:Ei,InternSet:Cn,Node:tr,Path:Ki,Voronoi:$1,ZoomTransform:Be,active:PM,arc:yv,area:lh,areaRadial:$v,ascending:_t,autoType:Q7,axisBottom:x5,axisLeft:Fg,axisRight:v5,axisTop:Ng,bin:Mg,bisect:kn,bisectCenter:gA,bisectLeft:pA,bisectRight:fg,bisector:pa,blob:e9,blur:mA,blur2:hg,blurImage:yA,brush:UM,brushSelection:GM,brushX:zM,brushY:OM,buffer:r9,chord:YM,chordDirected:HM,chordTranspose:WM,cluster:gP,color:hn,contourDensity:y7,contours:Al,count:ma,create:e8,creator:Aa,cross:SA,csv:a9,csvFormat:U7,csvFormatBody:B7,csvFormatRow:W7,csvFormatRows:Y7,csvFormatValue:H7,csvParse:T1,csvParseRows:O7,cubehelix:Me,cumsum:AA,curveBasis:Hk,curveBasisClosed:qk,curveBasisOpen:Xk,curveBumpX:Av,curveBumpY:Mv,curveBundle:jk,curveCardinal:Vk,curveCardinalClosed:Zk,curveCardinalOpen:Kk,curveCatmullRom:Qk,curveCatmullRomClosed:Jk,curveCatmullRomOpen:tC,curveLinear:mu,curveLinearClosed:eC,curveMonotoneX:nC,curveMonotoneY:rC,curveNatural:iC,curveStep:oC,curveStepAfter:sC,curveStepBefore:aC,descending:cg,deviation:gg,difference:s5,disjoint:u5,dispatch:Nn,drag:Vg,dragDisable:Pa,dragEnable:Da,dsv:o9,dsvFormat:os,easeBack:r1,easeBackIn:xM,easeBackInOut:r1,easeBackOut:_M,easeBounce:Vi,easeBounceIn:bM,easeBounceInOut:vM,easeBounceOut:Vi,easeCircle:n1,easeCircleIn:uM,easeCircleInOut:n1,easeCircleOut:cM,easeCubic:ji,easeCubicIn:tM,easeCubicInOut:ji,easeCubicOut:eM,easeElastic:Qa,easeElasticIn:wM,easeElasticInOut:$M,easeElasticOut:Qa,easeExp:e1,easeExpIn:aM,easeExpInOut:e1,easeExpOut:sM,easeLinear:K4,easePoly:K0,easePolyIn:nM,easePolyInOut:K0,easePolyOut:rM,easeQuad:Z0,easeQuadIn:Q4,easeQuadInOut:Z0,easeQuadOut:J4,easeSin:t1,easeSinIn:iM,easeSinInOut:t1,easeSinOut:oM,every:e5,extent:Li,fcumsum:TA,filter:r5,flatGroup:PA,flatRollup:DA,forceCenter:p9,forceCollide:k1,forceLink:I9,forceManyBody:N1,forceRadial:B9,forceSimulation:R1,forceX:F1,forceY:G1,get format(){return eo},formatDefaultLocale:q1,formatLocale:H1,get formatPrefix(){return Nl},formatSpecifier:Wr,fsum:MA,geoAlbers:ay,geoAlbersUsa:XT,geoArea:Q9,geoAzimuthalEqualArea:jT,geoAzimuthalEqualAreaRaw:wf,geoAzimuthalEquidistant:VT,geoAzimuthalEquidistantRaw:$f,geoBounds:nT,geoCentroid:uT,geoCircle:cT,geoClipAntimeridian:tf,geoClipCircle:Pm,geoClipExtent:mT,geoClipRectangle:Es,geoConicConformal:KT,geoConicConformalRaw:cy,geoConicEqualArea:Ys,geoConicEqualAreaRaw:oy,geoConicEquidistant:JT,geoConicEquidistantRaw:ly,geoContains:$T,geoDistance:Is,geoEqualEarth:eP,geoEqualEarthRaw:Sf,geoEquirectangular:QT,geoEquirectangularRaw:bo,geoGnomonic:nP,geoGnomonicRaw:Af,geoGraticule:Gm,geoGraticule10:ST,geoIdentity:rP,geoInterpolate:AT,geoLength:Dm,geoMercator:ZT,geoMercatorRaw:yo,geoNaturalEarth1:iP,geoNaturalEarth1Raw:Mf,geoOrthographic:oP,geoOrthographicRaw:Tf,geoPath:FT,geoProjection:ze,geoProjectionMutator:xf,geoRotation:xm,geoStereographic:aP,geoStereographicRaw:Pf,geoStream:Pe,geoTransform:GT,geoTransverseMercator:sP,geoTransverseMercatorRaw:Df,gray:_8,greatest:Tg,greatestIndex:VA,group:vg,groupSort:kA,groups:xg,hcl:Fa,hierarchy:qs,histogram:Mg,hsl:Ca,html:h9,image:u9,index:LA,indexes:EA,interpolate:dn,interpolateArray:T8,interpolateBasis:x0,interpolateBasisClosed:_0,interpolateBlues:JE,interpolateBrBG:kE,interpolateBuGn:UE,interpolateBuPu:BE,interpolateCividis:ok,interpolateCool:uk,interpolateCubehelix:B8,interpolateCubehelixDefault:ak,interpolateCubehelixLong:Ya,interpolateDate:T0,interpolateDiscrete:L8,interpolateGnBu:YE,interpolateGreens:tk,interpolateGreys:ek,interpolateHcl:O8,interpolateHclLong:U8,interpolateHsl:F8,interpolateHslLong:G8,interpolateHue:E8,interpolateInferno:mk,interpolateLab:z8,interpolateMagma:gk,interpolateNumber:he,interpolateNumberArray:Zc,interpolateObject:P0,interpolateOrRd:WE,interpolateOranges:ik,interpolatePRGn:CE,interpolatePiYG:IE,interpolatePlasma:yk,interpolatePuBu:qE,interpolatePuBuGn:HE,interpolatePuOr:RE,interpolatePuRd:XE,interpolatePurples:nk,interpolateRainbow:ck,interpolateRdBu:NE,interpolateRdGy:FE,interpolateRdPu:jE,interpolateRdYlBu:GE,interpolateRdYlGn:zE,interpolateReds:rk,interpolateRgb:Ui,interpolateRgbBasis:S0,interpolateRgbBasisClosed:M8,interpolateRound:Ua,interpolateSinebow:hk,interpolateSpectral:OE,interpolateString:Jc,interpolateTransformCss:k0,interpolateTransformSvg:C0,interpolateTurbo:dk,interpolateViridis:pk,interpolateWarm:sk,interpolateYlGn:ZE,interpolateYlGnBu:VE,interpolateYlOrBr:KE,interpolateYlOrRd:QE,interpolateZoom:R0,interrupt:Wn,intersection:c5,interval:X8,isoFormat:fE,isoParse:pE,json:l9,lab:Na,lch:w8,least:jA,leastIndex:Lg,line:yu,lineRadial:wv,link:bu,linkHorizontal:Ck,linkRadial:Rk,linkVertical:Ik,local:Xg,map:i5,matcher:Rc,max:ki,maxIndex:Pc,mean:OA,median:UA,medianIndex:BA,merge:Lc,min:va,minIndex:Dc,mode:WA,namespace:Ni,namespaces:Cc,nice:Mc,now:qi,pack:HP,packEnclose:zP,packSiblings:YP,pairs:HA,partition:qP,path:Sl,pathRound:jM,permute:Ag,pie:vv,piecewise:z0,pointRadial:Io,pointer:se,pointers:r8,polygonArea:sD,polygonCentroid:uD,polygonContains:hD,polygonHull:fD,polygonLength:dD,precisionFixed:X1,precisionPrefix:j1,precisionRound:V1,quadtree:ss,quantile:Ii,quantileIndex:Dg,quantileSorted:Pg,quantize:Y8,quickselect:xa,radialArea:$v,radialLine:wv,randomBates:yD,randomBernoulli:xD,randomBeta:ky,randomBinomial:Cy,randomCauchy:wD,randomExponential:bD,randomGamma:zf,randomGeometric:Ey,randomInt:gD,randomIrwinHall:Ly,randomLcg:TD,randomLogNormal:mD,randomLogistic:$D,randomNormal:Gf,randomPareto:vD,randomPoisson:SD,randomUniform:pD,randomWeibull:_D,range:ln,rank:XA,reduce:o5,reverse:a5,rgb:kr,ribbon:n7,ribbonArrow:r7,rollup:wg,rollups:$g,scaleBand:Bf,scaleDiverging:zb,scaleDivergingLog:Ob,scaleDivergingPow:sh,scaleDivergingSqrt:xE,scaleDivergingSymlog:Ub,scaleIdentity:Gy,scaleImplicit:Of,scaleLinear:qf,scaleLog:Yy,scaleOrdinal:Uf,scalePoint:Yf,scalePow:tu,scaleQuantile:Zy,scaleQuantize:Ky,scaleRadial:Vy,scaleSequential:Rb,scaleSequentialLog:Nb,scaleSequentialPow:ah,scaleSequentialQuantile:Gb,scaleSequentialSqrt:vE,scaleSequentialSymlog:Fb,scaleSqrt:zD,scaleSymlog:qy,scaleThreshold:Qy,scaleTime:yE,scaleUtc:bE,scan:ZA,schemeAccent:wE,schemeBlues:cv,schemeBrBG:Bb,schemeBuGn:Kb,schemeBuPu:Qb,schemeCategory10:_E,schemeDark2:$E,schemeGnBu:Jb,schemeGreens:lv,schemeGreys:fv,schemeObservable10:SE,schemeOrRd:tv,schemeOranges:pv,schemePRGn:Yb,schemePaired:AE,schemePastel1:ME,schemePastel2:TE,schemePiYG:Wb,schemePuBu:nv,schemePuBuGn:ev,schemePuOr:Hb,schemePuRd:rv,schemePurples:hv,schemeRdBu:qb,schemeRdGy:Xb,schemeRdPu:iv,schemeRdYlBu:jb,schemeRdYlGn:Vb,schemeReds:dv,schemeSet1:PE,schemeSet2:DE,schemeSet3:LE,schemeSpectral:Zb,schemeTableau10:EE,schemeYlGn:av,schemeYlGnBu:ov,schemeYlOrBr:sv,schemeYlOrRd:uv,select:V,selectAll:i8,selection:Gn,selector:Ma,selectorAll:Ic,shuffle:KA,shuffler:Eg,some:n5,sort:$c,stack:lC,stackOffsetDiverging:hC,stackOffsetExpand:fC,stackOffsetNone:oi,stackOffsetSilhouette:dC,stackOffsetWiggle:pC,stackOrderAppearance:e2,stackOrderAscending:n2,stackOrderDescending:mC,stackOrderInsideOut:yC,stackOrderNone:ai,stackOrderReverse:bC,stratify:ZP,style:Fn,subset:f5,sum:QA,superset:Cg,svg:d9,symbol:Wk,symbolAsterisk:Tv,symbolCircle:vu,symbolCross:Pv,symbolDiamond:Lv,symbolDiamond2:Ev,symbolPlus:kv,symbolSquare:Cv,symbolSquare2:Iv,symbolStar:Nv,symbolTimes:ph,symbolTriangle:Fv,symbolTriangle2:Gv,symbolWye:zv,symbolX:ph,symbols:Ov,symbolsFill:Ov,symbolsStroke:Yk,text:as,thresholdFreedmanDiaconis:GA,thresholdScott:zA,thresholdSturges:Tc,tickFormat:Fy,tickIncrement:Rn,tickStep:ba,ticks:In,timeDay:ti,timeDays:HD,get timeFormat(){return rh},timeFormatDefaultLocale:Cb,timeFormatLocale:yb,timeFriday:ib,timeFridays:QD,timeHour:ru,timeHours:YD,timeInterval:Tt,timeMillisecond:Jr,timeMilliseconds:Jy,timeMinute:eu,timeMinutes:UD,timeMonday:To,timeMondays:jD,timeMonth:ou,timeMonths:aL,get timeParse(){return kb},timeSaturday:ob,timeSaturdays:JD,timeSecond:an,timeSeconds:eb,timeSunday:ei,timeSundays:ab,timeThursday:rr,timeThursdays:KD,timeTickInterval:mb,timeTicks:gb,timeTuesday:nb,timeTuesdays:VD,timeWednesday:rb,timeWednesdays:ZD,timeWeek:ei,timeWeeks:ab,timeYear:Oe,timeYears:uL,timeout:nl,timer:Xa,timerFlush:B0,transition:j0,transpose:kg,tree:rD,treemap:Py,treemapBinary:iD,treemapDice:So,treemapResquarify:aD,treemapSlice:Ks,treemapSliceDice:oD,treemapSquarify:Ff,tsv:s9,tsvFormat:X7,tsvFormatBody:j7,tsvFormatRow:Z7,tsvFormatRows:V7,tsvFormatValue:K7,tsvParse:P1,tsvParseRows:q7,union:h5,unixDay:th,unixDays:XD,utcDay:Mo,utcDays:qD,get utcFormat(){return su},utcFriday:cb,utcFridays:iL,utcHour:iu,utcHours:WD,utcMillisecond:Jr,utcMilliseconds:Jy,utcMinute:nu,utcMinutes:BD,utcMonday:Po,utcMondays:tL,utcMonth:au,utcMonths:sL,get utcParse(){return ih},utcSaturday:lb,utcSaturdays:oL,utcSecond:an,utcSeconds:eb,utcSunday:ni,utcSundays:fb,utcThursday:or,utcThursdays:rL,utcTickInterval:pb,utcTicks:db,utcTuesday:sb,utcTuesdays:eL,utcWednesday:ub,utcWednesdays:nL,utcWeek:ni,utcWeeks:fb,utcYear:Ue,utcYears:cL,variance:pg,window:Nc,xml:f9,zip:t5,zoom:a2,zoomIdentity:Mu,zoomTransform:i2},Symbol.toStringTag,{value:"Module"}));function s2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function AC(t,e){function n(i){var s;const o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+i+"</svg>";const a=document.createDocumentFragment();for(;a&&((s=o==null?void 0:o.firstChild)!=null&&s.firstChild);)a.appendChild(o.firstChild.firstChild);return a}const r=t.node();for(;r.hasChildNodes();)r.removeChild(r.firstChild);t.node().appendChild(n(e))}function ar(t){return t.substring(0,4)!=="ease"?ji:_h[t]??ji}function Tu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=qf().domain([0,1]).range([0,t/2]),a=o(n);return yv().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const wh=(t,e)=>e instanceof Function?e(t):eo(e)(t);function u2(t,e=10){var i;const n=document.createElement("canvas").getContext("2d");return(((i=n==null?void 0:n.measureText(t))==null?void 0:i.width)??0)*e/10}function MC(t){const e=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):e}function TC(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return MC(e)}function Et(t,e){const n=e.colors[e.colorScheme];return t==="series"?n.series[0]:t=="none"?"none":n[t]!=null?n[t]:n.primary}function $h({datum:t,colorType:e,fullChartParams:n}){return e==="series"?t.color?t.color:n.colors[n.colorScheme].series[0]:e=="none"?"none":n.colors[n.colorScheme][e]!=null?n.colors[n.colorScheme][e]:n.colors[n.colorScheme].primary}function ot(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function $n(t,e){const r=Math.random().toString(36).substr(2,5);return ot(t,e,r)}const si=({selection:t,pluginName:e,clipPathID:n,existSeriesLabels$:r,gridContainer$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=ot(e,"series"),u=ot(e,"axes"),c=ot(e,"graphic"),l=r.pipe(U((p,g)=>t.selectAll(`g.${s}`).data(p,m=>m).join(m=>m.append("g").classed(s,!0).each((y,v,x)=>{V(x[v]).selectAll(`g.${u}`).data([v]).join(b=>b.append("g").classed(u,!0).attr("clip-path",`url(#${n})`).each((w,$,A)=>{V(A[$]).selectAll("defs").data([$]).join("defs"),V(A[$]).selectAll("g").data([$]).join("g").classed(c,!0)}),b=>b,b=>b.remove())}),m=>m,m=>m.remove())),B(p=>H({seriesSelection:li(p),gridContainer:i})),U(p=>(p.seriesSelection.transition().attr("transform",(g,m)=>{const y=p.gridContainer[m]??p.gridContainer[0],v=y.translate,x=y.scale;return`translate(${v[0]}, ${v[1]}) scale(${x[0]}, ${x[1]})`}),p.seriesSelection)),Ye(1)),h=H({seriesSelection:l,gridAxesTransform:o}).pipe(B(async p=>p),U(p=>p.seriesSelection.select(`g.${u}`).style("transform",p.gridAxesTransform.value)),Ye(1)),f=h.pipe(U(p=>p.select("defs")),Ye(1)),d=H({axesSelection:h,gridGraphicTransform:a}).pipe(B(async p=>p),U(p=>{const g=p.axesSelection.select(`g.${c}`);return g.transition().duration(50).style("transform",p.gridGraphicTransform.value),g}),Ye(1));return{seriesSelection$:l,axesSelection$:h,defsSelection$:f,graphicGSelection$:d}},Sh=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r})=>{const i=new rt,o=new lt(a=>{H({dataFormatter:t,computedData:n}).pipe(F(i),B(async s=>s)).subscribe(s=>{const c=s.computedData[0]?s.computedData[0].length-1:0,l=s.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-s.dataFormatter.grid.groupAxis.scalePadding:s.dataFormatter.grid.groupAxis.scaleDomain[0]-s.dataFormatter.grid.groupAxis.scalePadding,h=s.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?c+s.dataFormatter.grid.groupAxis.scalePadding:s.dataFormatter.grid.groupAxis.scaleDomain[1]+s.dataFormatter.grid.groupAxis.scalePadding,d=(s.dataFormatter.grid.gridData.seriesDirection==="row"?(s.computedData[0]??[]).map(p=>p.groupLabel):s.computedData.map(p=>p[0].groupLabel)).filter((p,g)=>g>=l&&g<=h);a.next(d)})});return new lt(a=>{H({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(F(i),B(async s=>s)).subscribe(s=>{const u=s.dataFormatter.grid.valueAxis.position==="right"||s.dataFormatter.grid.valueAxis.position==="bottom",c=lA({axisLabels:s.scaleRangeGroupLabels,axisWidth:s.axisSize.width,reverse:u}),l=f=>s.dataFormatter.grid.groupAxis.position==="bottom"||s.dataFormatter.grid.groupAxis.position==="top"?f.offsetX-s.fullChartParams.padding.left:f.offsetY-s.fullChartParams.padding.top,h=f=>{const d=l(f),p=c(d);return{groupIndex:p,groupLabel:s.scaleRangeGroupLabels[p]??""}};return a.next(h),function(){i.next(void 0)}})})};function PC(t="curveLinear"){return yu().x(e=>e.axisX).y(e=>e.axisY).curve(_h[t])}function DC(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function LC({selection:t,pathClassName:e,segmentData:n,linePath:r,params:i}){return t.selectAll("path").data(n,(a,s)=>a.length?`${a[0].id}_${a[a.length-1].id}`:s).join(a=>a.append("path").classed(e,!0).attr("fill","none").attr("pointer-events","visibleStroke").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),a=>a,a=>a.remove()).attr("stroke-width",i.lineWidth).attr("stroke",(a,s)=>a[0]&&a[0].color).attr("d",a=>r(a))}function EC({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function kC({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{V(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(ar(r)).tween("tween",(c,l,h)=>f=>{const d=c.width*f;u.attr("x",0).attr("y",0).attr("width",p=>d).attr("height",p=>p.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const c2=(t,{selection:e,computedData$:n,existSeriesLabels$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullDataFormatter$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridAxesSize$:h,gridHighlight$:f,gridContainer$:d,event$:p})=>{const g=new rt,m=$n(t,"clipPath-box"),y=ot(t,"path"),{seriesSelection$:v,axesSelection$:x,defsSelection$:b,graphicGSelection$:w}=si({selection:e,pluginName:t,clipPathID:m,existSeriesLabels$:r,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),$=new lt(P=>{const D=a.pipe(F(g)).subscribe(C=>{if(!C)return;const S=PC(C.lineCurve);P.next(S)});return()=>{D.unsubscribe()}}),A=new lt(P=>{n.pipe(F(g),B(async D=>D)).subscribe(D=>{const C=D[0]&&D[0][0]?D.map(S=>S[0].seriesLabel):[];P.next(C)})}),_=u.pipe(U(P=>P.transitionDuration),ft()),L=u.pipe(U(P=>P.transitionEase),ft());H({defsSelection:b,seriesLabels:A,axisSize:h,transitionDuration:_,transitionEase:L}).pipe(F(g),B(async P=>P)).subscribe(P=>{const C=[{id:m,width:P.axisSize.width,height:P.axisSize.height}].concat(P.seriesLabels.map(S=>({id:`orbcharts__clipPath_${S}`,width:P.axisSize.width,height:P.axisSize.height})));kC({defsSelection:P.defsSelection,clipPathData:C,transitionDuration:P.transitionDuration,transitionEase:P.transitionEase})});const E=n.pipe(U(P=>{const D=new Map;return P.flat().forEach(C=>D.set(C.id,C)),D})),T=Sh({fullDataFormatter$:s,gridAxesSize$:h,computedData$:n,fullChartParams$:u}),I=u.pipe(F(g),U(P=>P.highlightTarget),ft());return H({graphicGSelection:w,seriesLabels:A,computedData:n,SeriesDataMap:i,GroupDataMap:o,linePath:$,params:a,highlightTarget:I,gridGroupPositionFn:T}).pipe(F(g),B(async P=>P)).subscribe(P=>{P.graphicGSelection.each((D,C,S)=>{const R=DC(P.computedData[C]??[]);LC({selection:V(S[C]),pathClassName:y,linePath:P.linePath,segmentData:R,params:P.params}).on("mouseover",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:k,groupLabel:Y}=P.gridGroupPositionFn(M),X=P.GroupDataMap.get(Y).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:P.highlightTarget,datum:X,gridIndex:X.gridIndex,series:P.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:P.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:P.computedData})}).on("mousemove",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:k,groupLabel:Y}=P.gridGroupPositionFn(M),X=P.GroupDataMap.get(Y).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:P.highlightTarget,datum:X,gridIndex:X.gridIndex,series:P.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:P.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:P.computedData})}).on("mouseout",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:k,groupLabel:Y}=P.gridGroupPositionFn(M),X=P.GroupDataMap.get(Y).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:P.highlightTarget,datum:X,gridIndex:X.gridIndex,series:P.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:P.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:P.computedData})}).on("click",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:k,groupLabel:Y}=P.gridGroupPositionFn(M),X=P.GroupDataMap.get(Y).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:P.highlightTarget,datum:X,gridIndex:X.gridIndex,series:P.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:P.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:P.computedData})})})}),u.pipe(F(g),fi(P=>P.highlightTarget==="series"),B(P=>H({graphicGSelection:w,highlight:f,DataMap:E,fullChartParams:u}).pipe(F(g),B(async D=>D)))).subscribe(P=>{const D=P.DataMap.get(P.highlight[0]);EC({selection:P.graphicGSelection,seriesLabel:D&&D.seriesLabel?D.seriesLabel:null,fullChartParams:P.fullChartParams})}),()=>{g.next(void 0)}},l2="Lines",CC=ae(l2,cr)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=c2(l2,{selection:t,computedData$:n.computedData$,existSeriesLabels$:n.existSeriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainer$:n.gridContainer$,event$:r.event$});return()=>{i.next(void 0),o()}});function IC(t="curveLinear",e){return lh().x(n=>n.axisX).y0(n=>e).y1(n=>n.axisY).curve(_h[t])}function RC(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function NC({selection:t,pathClassName:e,segmentData:n,areaPath:r,linearGradientIds:i,params:o}){return t.selectAll("path").data(n,(s,u)=>s.length?`${s[0].id}_${s[s.length-1].id}`:u).join(s=>s.append("path").classed(e,!0).attr("fill","none").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),s=>s,s=>s.remove()).attr("fill",(s,u)=>s[0]?`url(#${i[s[0].seriesIndex]})`:"").attr("d",s=>r(s))}function FC({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function GC({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
|
9
|
+
`)}function c(h){return h.map(l).join(t)}function l(h){return h==null?"":h instanceof Date?Y7(h):e.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:u,formatRow:c,formatValue:l}}var Vn=os(","),P1=Vn.parse,H7=Vn.parseRows,W7=Vn.format,q7=Vn.formatBody,X7=Vn.formatRows,j7=Vn.formatRow,V7=Vn.formatValue,Zn=os(" "),D1=Zn.parse,Z7=Zn.parseRows,K7=Zn.format,Q7=Zn.formatBody,J7=Zn.formatRows,t9=Zn.formatRow,e9=Zn.formatValue;function n9(t){for(var e in t){var n=t[e].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))r9&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const r9=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function i9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function o9(t,e){return fetch(t,e).then(i9)}function a9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function s9(t,e){return fetch(t,e).then(a9)}function u9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function as(t,e){return fetch(t,e).then(u9)}function L1(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),as(e,n).then(function(i){return t(i,r)})}}function c9(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=os(t);return as(e,n).then(function(o){return i.parse(o,r)})}var l9=L1(P1),f9=L1(D1);function h9(t,e){return new Promise(function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t})}function d9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function p9(t,e){return fetch(t,e).then(d9)}function Il(t){return(e,n)=>as(e,n).then(r=>new DOMParser().parseFromString(r,t))}const g9=Il("application/xml");var m9=Il("text/html"),y9=Il("image/svg+xml");function b9(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,u=0,c=0;for(o=0;o<a;++o)s=n[o],u+=s.x,c+=s.y;for(u=(u/a-t)*r,c=(c/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=u,s.y-=c}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function v9(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return E1(this.cover(e,n),e,n,t)}function E1(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,a={data:r},s=t._x0,u=t._y0,c=t._x1,l=t._y1,h,f,d,p,g,m,y,v;if(!o)return t._root=a,t;for(;o.length;)if((g=e>=(h=(s+c)/2))?s=h:c=h,(m=n>=(f=(u+l)/2))?u=f:l=f,i=o,!(o=o[y=m<<1|g]))return i[y]=a,t;if(d=+t._x.call(null,o.data),p=+t._y.call(null,o.data),e===d&&n===p)return a.next=o,i?i[y]=a:t._root=a,t;do i=i?i[y]=new Array(4):t._root=new Array(4),(g=e>=(h=(s+c)/2))?s=h:c=h,(m=n>=(f=(u+l)/2))?u=f:l=f;while((y=m<<1|g)===(v=(p>=f)<<1|d>=h));return i[v]=o,i[y]=a,t}function x9(t){var e,n,r=t.length,i,o,a=new Array(r),s=new Array(r),u=1/0,c=1/0,l=-1/0,h=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,s[n]=o,i<u&&(u=i),i>l&&(l=i),o<c&&(c=o),o>h&&(h=o));if(u>l||c>h)return this;for(this.cover(u,c).cover(l,h),n=0;n<r;++n)E1(this,a[n],s[n],t[n]);return this}function _9(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a=i-n||1,s=this._root,u,c;n>t||t>=i||r>e||e>=o;)switch(c=(e<r)<<1|t<n,u=new Array(4),u[c]=s,s=u,a*=2,c){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function w9(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function $9(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Wt(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function S9(t,e,n){var r,i=this._x0,o=this._y0,a,s,u,c,l=this._x1,h=this._y1,f=[],d=this._root,p,g;for(d&&f.push(new Wt(d,i,o,l,h)),n==null?n=1/0:(i=t-n,o=e-n,l=t+n,h=e+n,n*=n);p=f.pop();)if(!(!(d=p.node)||(a=p.x0)>l||(s=p.y0)>h||(u=p.x1)<i||(c=p.y1)<o))if(d.length){var m=(a+u)/2,y=(s+c)/2;f.push(new Wt(d[3],m,y,u,c),new Wt(d[2],a,y,m,c),new Wt(d[1],m,s,u,y),new Wt(d[0],a,s,m,y)),(g=(e>=y)<<1|t>=m)&&(p=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=p)}else{var v=t-+this._x.call(null,d.data),x=e-+this._y.call(null,d.data),b=v*v+x*x;if(b<n){var w=Math.sqrt(n=b);i=t-w,o=e-w,l=t+w,h=e+w,r=d.data}}return r}function A9(t){if(isNaN(l=+this._x.call(null,t))||isNaN(h=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,a=this._x0,s=this._y0,u=this._x1,c=this._y1,l,h,f,d,p,g,m,y;if(!n)return this;if(n.length)for(;;){if((p=l>=(f=(a+u)/2))?a=f:u=f,(g=h>=(d=(s+c)/2))?s=d:c=d,e=n,!(n=n[m=g<<1|p]))return this;if(!n.length)break;(e[m+1&3]||e[m+2&3]||e[m+3&3])&&(r=e,y=m)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[m]=o:delete e[m],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=o,this)}function M9(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function T9(){return this._root}function P9(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function D9(t){var e=[],n,r=this._root,i,o,a,s,u;for(r&&e.push(new Wt(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,a=n.y0,s=n.x1,u=n.y1)&&r.length){var c=(o+s)/2,l=(a+u)/2;(i=r[3])&&e.push(new Wt(i,c,l,s,u)),(i=r[2])&&e.push(new Wt(i,o,l,c,u)),(i=r[1])&&e.push(new Wt(i,c,a,s,l)),(i=r[0])&&e.push(new Wt(i,o,a,c,l))}return this}function L9(t){var e=[],n=[],r;for(this._root&&e.push(new Wt(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,u=r.x1,c=r.y1,l=(a+u)/2,h=(s+c)/2;(o=i[0])&&e.push(new Wt(o,a,s,l,h)),(o=i[1])&&e.push(new Wt(o,l,s,u,h)),(o=i[2])&&e.push(new Wt(o,a,h,l,c)),(o=i[3])&&e.push(new Wt(o,l,h,u,c))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function E9(t){return t[0]}function k9(t){return arguments.length?(this._x=t,this):this._x}function C9(t){return t[1]}function I9(t){return arguments.length?(this._y=t,this):this._y}function ss(t,e,n){var r=new Rl(e??E9,n??C9,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Rl(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function k1(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var qt=ss.prototype=Rl.prototype;qt.copy=function(){var t=new Rl(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=k1(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=k1(r));return t},qt.add=v9,qt.addAll=x9,qt.cover=_9,qt.data=w9,qt.extent=$9,qt.find=S9,qt.remove=A9,qt.removeAll=M9,qt.root=T9,qt.size=P9,qt.visit=D9,qt.visitAfter=L9,qt.x=k9,qt.y=I9;function Lt(t){return function(){return t}}function yn(t){return(t()-.5)*1e-6}function R9(t){return t.x+t.vx}function N9(t){return t.y+t.vy}function C1(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Lt(t==null?1:+t));function a(){for(var c,l=e.length,h,f,d,p,g,m,y=0;y<o;++y)for(h=ss(e,R9,N9).visitAfter(s),c=0;c<l;++c)f=e[c],g=n[f.index],m=g*g,d=f.x+f.vx,p=f.y+f.vy,h.visit(v);function v(x,b,w,$,S){var _=x.data,D=x.r,L=g+D;if(_){if(_.index>f.index){var P=d-_.x-_.vx,I=p-_.y-_.vy,k=P*P+I*I;k<L*L&&(P===0&&(P=yn(r),k+=P*P),I===0&&(I=yn(r),k+=I*I),k=(L-(k=Math.sqrt(k)))/k*i,f.vx+=(P*=k)*(L=(D*=D)/(m+D)),f.vy+=(I*=k)*L,_.vx-=P*(L=1-L),_.vy-=I*L)}return}return b>d+L||$<d-L||w>p+L||S<p-L}}function s(c){if(c.data)return c.r=n[c.data.index];for(var l=c.r=0;l<4;++l)c[l]&&c[l].r>c.r&&(c.r=c[l].r)}function u(){if(e){var c,l=e.length,h;for(n=new Array(l),c=0;c<l;++c)h=e[c],n[h.index]=+t(h,c,e)}}return a.initialize=function(c,l){e=c,r=l,u()},a.iterations=function(c){return arguments.length?(o=+c,a):o},a.strength=function(c){return arguments.length?(i=+c,a):i},a.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Lt(+c),u(),a):t},a}function F9(t){return t.index}function I1(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function G9(t){var e=F9,n=h,r,i=Lt(30),o,a,s,u,c,l=1;t==null&&(t=[]);function h(m){return 1/Math.min(s[m.source.index],s[m.target.index])}function f(m){for(var y=0,v=t.length;y<l;++y)for(var x=0,b,w,$,S,_,D,L;x<v;++x)b=t[x],w=b.source,$=b.target,S=$.x+$.vx-w.x-w.vx||yn(c),_=$.y+$.vy-w.y-w.vy||yn(c),D=Math.sqrt(S*S+_*_),D=(D-o[x])/D*m*r[x],S*=D,_*=D,$.vx-=S*(L=u[x]),$.vy-=_*L,w.vx+=S*(L=1-L),w.vy+=_*L}function d(){if(a){var m,y=a.length,v=t.length,x=new Map(a.map((w,$)=>[e(w,$,a),w])),b;for(m=0,s=new Array(y);m<v;++m)b=t[m],b.index=m,typeof b.source!="object"&&(b.source=I1(x,b.source)),typeof b.target!="object"&&(b.target=I1(x,b.target)),s[b.source.index]=(s[b.source.index]||0)+1,s[b.target.index]=(s[b.target.index]||0)+1;for(m=0,u=new Array(v);m<v;++m)b=t[m],u[m]=s[b.source.index]/(s[b.source.index]+s[b.target.index]);r=new Array(v),p(),o=new Array(v),g()}}function p(){if(a)for(var m=0,y=t.length;m<y;++m)r[m]=+n(t[m],m,t)}function g(){if(a)for(var m=0,y=t.length;m<y;++m)o[m]=+i(t[m],m,t)}return f.initialize=function(m,y){a=m,c=y,d()},f.links=function(m){return arguments.length?(t=m,d(),f):t},f.id=function(m){return arguments.length?(e=m,f):e},f.iterations=function(m){return arguments.length?(l=+m,f):l},f.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Lt(+m),p(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Lt(+m),g(),f):i},f}const z9=1664525,O9=1013904223,R1=4294967296;function U9(){let t=1;return()=>(t=(z9*t+O9)%R1)/R1}function B9(t){return t.x}function Y9(t){return t.y}var H9=10,W9=Math.PI*(3-Math.sqrt(5));function N1(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=Xa(h),c=Nn("tick","end"),l=U9();t==null&&(t=[]);function h(){f(),c.call("tick",e),n<r&&(u.stop(),c.call("end",e))}function f(g){var m,y=t.length,v;g===void 0&&(g=1);for(var x=0;x<g;++x)for(n+=(o-n)*i,s.forEach(function(b){b(n)}),m=0;m<y;++m)v=t[m],v.fx==null?v.x+=v.vx*=a:(v.x=v.fx,v.vx=0),v.fy==null?v.y+=v.vy*=a:(v.y=v.fy,v.vy=0);return e}function d(){for(var g=0,m=t.length,y;g<m;++g){if(y=t[g],y.index=g,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var v=H9*Math.sqrt(.5+g),x=g*W9;y.x=v*Math.cos(x),y.y=v*Math.sin(x)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function p(g){return g.initialize&&g.initialize(t,l),g}return d(),e={tick:f,restart:function(){return u.restart(h),e},stop:function(){return u.stop(),e},nodes:function(g){return arguments.length?(t=g,d(),s.forEach(p),e):t},alpha:function(g){return arguments.length?(n=+g,e):n},alphaMin:function(g){return arguments.length?(r=+g,e):r},alphaDecay:function(g){return arguments.length?(i=+g,e):+i},alphaTarget:function(g){return arguments.length?(o=+g,e):o},velocityDecay:function(g){return arguments.length?(a=1-g,e):1-a},randomSource:function(g){return arguments.length?(l=g,s.forEach(p),e):l},force:function(g,m){return arguments.length>1?(m==null?s.delete(g):s.set(g,p(m)),e):s.get(g)},find:function(g,m,y){var v=0,x=t.length,b,w,$,S,_;for(y==null?y=1/0:y*=y,v=0;v<x;++v)S=t[v],b=g-S.x,w=m-S.y,$=b*b+w*w,$<y&&(_=S,y=$);return _},on:function(g,m){return arguments.length>1?(c.on(g,m),e):c.on(g)}}}function F1(){var t,e,n,r,i=Lt(-30),o,a=1,s=1/0,u=.81;function c(d){var p,g=t.length,m=ss(t,B9,Y9).visitAfter(h);for(r=d,p=0;p<g;++p)e=t[p],m.visit(f)}function l(){if(t){var d,p=t.length,g;for(o=new Array(p),d=0;d<p;++d)g=t[d],o[g.index]=+i(g,d,t)}}function h(d){var p=0,g,m,y=0,v,x,b;if(d.length){for(v=x=b=0;b<4;++b)(g=d[b])&&(m=Math.abs(g.value))&&(p+=g.value,y+=m,v+=m*g.x,x+=m*g.y);d.x=v/y,d.y=x/y}else{g=d,g.x=g.data.x,g.y=g.data.y;do p+=o[g.data.index];while(g=g.next)}d.value=p}function f(d,p,g,m){if(!d.value)return!0;var y=d.x-e.x,v=d.y-e.y,x=m-p,b=y*y+v*v;if(x*x/u<b)return b<s&&(y===0&&(y=yn(n),b+=y*y),v===0&&(v=yn(n),b+=v*v),b<a&&(b=Math.sqrt(a*b)),e.vx+=y*d.value*r/b,e.vy+=v*d.value*r/b),!0;if(d.length||b>=s)return;(d.data!==e||d.next)&&(y===0&&(y=yn(n),b+=y*y),v===0&&(v=yn(n),b+=v*v),b<a&&(b=Math.sqrt(a*b)));do d.data!==e&&(x=o[d.data.index]*r/b,e.vx+=y*x,e.vy+=v*x);while(d=d.next)}return c.initialize=function(d,p){t=d,n=p,l()},c.strength=function(d){return arguments.length?(i=typeof d=="function"?d:Lt(+d),l(),c):i},c.distanceMin=function(d){return arguments.length?(a=d*d,c):Math.sqrt(a)},c.distanceMax=function(d){return arguments.length?(s=d*d,c):Math.sqrt(s)},c.theta=function(d){return arguments.length?(u=d*d,c):Math.sqrt(u)},c}function q9(t,e,n){var r,i=Lt(.1),o,a;typeof t!="function"&&(t=Lt(+t)),e==null&&(e=0),n==null&&(n=0);function s(c){for(var l=0,h=r.length;l<h;++l){var f=r[l],d=f.x-e||1e-6,p=f.y-n||1e-6,g=Math.sqrt(d*d+p*p),m=(a[l]-g)*o[l]*c/g;f.vx+=d*m,f.vy+=p*m}}function u(){if(r){var c,l=r.length;for(o=new Array(l),a=new Array(l),c=0;c<l;++c)a[c]=+t(r[c],c,r),o[c]=isNaN(a[c])?0:+i(r[c],c,r)}}return s.initialize=function(c){r=c,u()},s.strength=function(c){return arguments.length?(i=typeof c=="function"?c:Lt(+c),u(),s):i},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Lt(+c),u(),s):t},s.x=function(c){return arguments.length?(e=+c,s):e},s.y=function(c){return arguments.length?(n=+c,s):n},s}function G1(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,c=n.length,l;u<c;++u)l=n[u],l.vx+=(i[u]-l.x)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Lt(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Lt(+s),a(),o):t},o}function z1(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,c=n.length,l;u<c;++u)l=n[u],l.vy+=(i[u]-l.y)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Lt(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Lt(+s),a(),o):t},o}function X9(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function us(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Yr(t){return t=us(Math.abs(t)),t?t[1]:NaN}function j9(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function V9(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var Z9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Hr(t){if(!(e=Z9.exec(t)))throw new Error("invalid format: "+t);var e;return new cs({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Hr.prototype=cs.prototype;function cs(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}cs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function K9(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var O1;function Q9(t,e){var n=us(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(O1=Math.max(-8,Math.min(8,Math.floor(i/3)))*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")+us(t,Math.max(0,e+o-1))[0]}function U1(t,e){var n=us(t,e);if(!n)return t+"";var r=n[0],i=n[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")}const B1={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:X9,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>U1(t*100,e),r:U1,s:Q9,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Y1(t){return t}var H1=Array.prototype.map,W1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function q1(t){var e=t.grouping===void 0||t.thousands===void 0?Y1:j9(H1.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?Y1:V9(H1.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(h){h=Hr(h);var f=h.fill,d=h.align,p=h.sign,g=h.symbol,m=h.zero,y=h.width,v=h.comma,x=h.precision,b=h.trim,w=h.type;w==="n"?(v=!0,w="g"):B1[w]||(x===void 0&&(x=12),b=!0,w="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var $=g==="$"?n:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",S=g==="$"?r:/[%p]/.test(w)?a:"",_=B1[w],D=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function L(P){var I=$,k=S,T,C,M;if(w==="c")k=_(P)+k,P="";else{P=+P;var R=P<0||1/P<0;if(P=isNaN(P)?u:_(Math.abs(P),x),b&&(P=K9(P)),R&&+P==0&&p!=="+"&&(R=!1),I=(R?p==="("?p:s:p==="-"||p==="("?"":p)+I,k=(w==="s"?W1[8+O1/3]:"")+k+(R&&p==="("?")":""),D){for(T=-1,C=P.length;++T<C;)if(M=P.charCodeAt(T),48>M||M>57){k=(M===46?i+P.slice(T+1):P.slice(T))+k,P=P.slice(0,T);break}}}v&&!m&&(P=e(P,1/0));var G=I.length+P.length+k.length,A=G<y?new Array(y-G+1).join(f):"";switch(v&&m&&(P=e(A+P,A.length?y-k.length:1/0),A=""),d){case"<":P=I+P+k+A;break;case"=":P=I+A+P+k;break;case"^":P=A.slice(0,G=A.length>>1)+I+P+k+A.slice(G);break;default:P=A+I+P+k;break}return o(P)}return L.toString=function(){return h+""},L}function l(h,f){var d=c((h=Hr(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(Yr(f)/3)))*3,g=Math.pow(10,-p),m=W1[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var ls,eo,Nl;X1({thousands:",",grouping:[3],currency:["$",""]});function X1(t){return ls=q1(t),eo=ls.format,Nl=ls.formatPrefix,ls}function j1(t){return Math.max(0,-Yr(Math.abs(t)))}function V1(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Yr(e)/3)))*3-Yr(Math.abs(t)))}function Z1(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Yr(e)-Yr(t))+1}var et=1e-6,no=1e-12,ht=Math.PI,St=ht/2,fs=ht/4,Xt=ht*2,yt=180/ht,rt=ht/180,dt=Math.abs,Wr=Math.atan,jt=Math.atan2,J=Math.cos,hs=Math.ceil,K1=Math.exp,Fl=Math.hypot,ds=Math.log,Gl=Math.pow,K=Math.sin,de=Math.sign||function(t){return t>0?1:t<0?-1:0},It=Math.sqrt,zl=Math.tan;function Q1(t){return t>1?0:t<-1?ht:Math.acos(t)}function Vt(t){return t>1?St:t<-1?-St:Math.asin(t)}function J1(t){return(t=K(t/2))*t}function wt(){}function ps(t,e){t&&em.hasOwnProperty(t.type)&&em[t.type](t,e)}var tm={Feature:function(t,e){ps(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)ps(n[r].geometry,e)}},em={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Ol(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Ol(n[r],e,0)},Polygon:function(t,e){nm(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)nm(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ps(n[r],e)}};function Ol(t,e,n){var r=-1,i=t.length-n,o;for(e.lineStart();++r<i;)o=t[r],e.point(o[0],o[1],o[2]);e.lineEnd()}function nm(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Ol(t[n],e,1);e.polygonEnd()}function Pe(t,e){t&&tm.hasOwnProperty(t.type)?tm[t.type](t,e):ps(t,e)}var gs=new Dt,ms=new Dt,rm,im,Ul,Bl,Yl,Ge={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){gs=new Dt,Ge.lineStart=J9,Ge.lineEnd=tT},polygonEnd:function(){var t=+gs;ms.add(t<0?Xt+t:t),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){ms.add(Xt)}};function J9(){Ge.point=eT}function tT(){om(rm,im)}function eT(t,e){Ge.point=om,rm=t,im=e,t*=rt,e*=rt,Ul=t,Bl=J(e=e/2+fs),Yl=K(e)}function om(t,e){t*=rt,e*=rt,e=e/2+fs;var n=t-Ul,r=n>=0?1:-1,i=r*n,o=J(e),a=K(e),s=Yl*a,u=Bl*o+s*J(i),c=s*r*K(i);gs.add(jt(c,u)),Ul=t,Bl=o,Yl=a}function nT(t){return ms=new Dt,Pe(t,Ge),ms*2}function ys(t){return[jt(t[1],t[0]),Vt(t[2])]}function Kn(t){var e=t[0],n=t[1],r=J(n);return[r*J(e),r*K(e),K(n)]}function bs(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function qr(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Hl(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function vs(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function xs(t){var e=It(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var $t,re,At,ue,Qn,am,sm,Xr,ro,bn,Qe,Je={point:Wl,lineStart:cm,lineEnd:lm,polygonStart:function(){Je.point=fm,Je.lineStart=rT,Je.lineEnd=iT,ro=new Dt,Ge.polygonStart()},polygonEnd:function(){Ge.polygonEnd(),Je.point=Wl,Je.lineStart=cm,Je.lineEnd=lm,gs<0?($t=-(At=180),re=-(ue=90)):ro>et?ue=90:ro<-et&&(re=-90),Qe[0]=$t,Qe[1]=At},sphere:function(){$t=-(At=180),re=-(ue=90)}};function Wl(t,e){bn.push(Qe=[$t=t,At=t]),e<re&&(re=e),e>ue&&(ue=e)}function um(t,e){var n=Kn([t*rt,e*rt]);if(Xr){var r=qr(Xr,n),i=[r[1],-r[0],0],o=qr(i,r);xs(o),o=ys(o);var a=t-Qn,s=a>0?1:-1,u=o[0]*yt*s,c,l=dt(a)>180;l^(s*Qn<u&&u<s*t)?(c=o[1]*yt,c>ue&&(ue=c)):(u=(u+360)%360-180,l^(s*Qn<u&&u<s*t)?(c=-o[1]*yt,c<re&&(re=c)):(e<re&&(re=e),e>ue&&(ue=e))),l?t<Qn?ce($t,t)>ce($t,At)&&(At=t):ce(t,At)>ce($t,At)&&($t=t):At>=$t?(t<$t&&($t=t),t>At&&(At=t)):t>Qn?ce($t,t)>ce($t,At)&&(At=t):ce(t,At)>ce($t,At)&&($t=t)}else bn.push(Qe=[$t=t,At=t]);e<re&&(re=e),e>ue&&(ue=e),Xr=n,Qn=t}function cm(){Je.point=um}function lm(){Qe[0]=$t,Qe[1]=At,Je.point=Wl,Xr=null}function fm(t,e){if(Xr){var n=t-Qn;ro.add(dt(n)>180?n+(n>0?360:-360):n)}else am=t,sm=e;Ge.point(t,e),um(t,e)}function rT(){Ge.lineStart()}function iT(){fm(am,sm),Ge.lineEnd(),dt(ro)>et&&($t=-(At=180)),Qe[0]=$t,Qe[1]=At,Xr=null}function ce(t,e){return(e-=t)<0?e+360:e}function oT(t,e){return t[0]-e[0]}function hm(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function aT(t){var e,n,r,i,o,a,s;if(ue=At=-($t=re=1/0),bn=[],Pe(t,Je),n=bn.length){for(bn.sort(oT),e=1,r=bn[0],o=[r];e<n;++e)i=bn[e],hm(r,i[0])||hm(r,i[1])?(ce(r[0],i[1])>ce(r[0],r[1])&&(r[1]=i[1]),ce(i[0],r[1])>ce(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,e=0,r=o[n];e<=n;r=i,++e)i=o[e],(s=ce(r[1],i[0]))>a&&(a=s,$t=i[0],At=r[1])}return bn=Qe=null,$t===1/0||re===1/0?[[NaN,NaN],[NaN,NaN]]:[[$t,re],[At,ue]]}var io,_s,ws,$s,Ss,As,Ms,Ts,ql,Xl,jl,dm,pm,Zt,Kt,Qt,De={sphere:wt,point:Vl,lineStart:gm,lineEnd:mm,polygonStart:function(){De.lineStart=cT,De.lineEnd=lT},polygonEnd:function(){De.lineStart=gm,De.lineEnd=mm}};function Vl(t,e){t*=rt,e*=rt;var n=J(e);oo(n*J(t),n*K(t),K(e))}function oo(t,e,n){++io,ws+=(t-ws)/io,$s+=(e-$s)/io,Ss+=(n-Ss)/io}function gm(){De.point=sT}function sT(t,e){t*=rt,e*=rt;var n=J(e);Zt=n*J(t),Kt=n*K(t),Qt=K(e),De.point=uT,oo(Zt,Kt,Qt)}function uT(t,e){t*=rt,e*=rt;var n=J(e),r=n*J(t),i=n*K(t),o=K(e),a=jt(It((a=Kt*o-Qt*i)*a+(a=Qt*r-Zt*o)*a+(a=Zt*i-Kt*r)*a),Zt*r+Kt*i+Qt*o);_s+=a,As+=a*(Zt+(Zt=r)),Ms+=a*(Kt+(Kt=i)),Ts+=a*(Qt+(Qt=o)),oo(Zt,Kt,Qt)}function mm(){De.point=Vl}function cT(){De.point=fT}function lT(){ym(dm,pm),De.point=Vl}function fT(t,e){dm=t,pm=e,t*=rt,e*=rt,De.point=ym;var n=J(e);Zt=n*J(t),Kt=n*K(t),Qt=K(e),oo(Zt,Kt,Qt)}function ym(t,e){t*=rt,e*=rt;var n=J(e),r=n*J(t),i=n*K(t),o=K(e),a=Kt*o-Qt*i,s=Qt*r-Zt*o,u=Zt*i-Kt*r,c=Fl(a,s,u),l=Vt(c),h=c&&-l/c;ql.add(h*a),Xl.add(h*s),jl.add(h*u),_s+=l,As+=l*(Zt+(Zt=r)),Ms+=l*(Kt+(Kt=i)),Ts+=l*(Qt+(Qt=o)),oo(Zt,Kt,Qt)}function hT(t){io=_s=ws=$s=Ss=As=Ms=Ts=0,ql=new Dt,Xl=new Dt,jl=new Dt,Pe(t,De);var e=+ql,n=+Xl,r=+jl,i=Fl(e,n,r);return i<no&&(e=As,n=Ms,r=Ts,_s<et&&(e=ws,n=$s,r=Ss),i=Fl(e,n,r),i<no)?[NaN,NaN]:[jt(n,e)*yt,Vt(r/i)*yt]}function jr(t){return function(){return t}}function Zl(t,e){function n(r,i){return r=t(r,i),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,i){return r=e.invert(r,i),r&&t.invert(r[0],r[1])}),n}function Kl(t,e){return dt(t)>ht&&(t-=Math.round(t/Xt)*Xt),[t,e]}Kl.invert=Kl;function Ql(t,e,n){return(t%=Xt)?e||n?Zl(vm(t),xm(e,n)):vm(t):e||n?xm(e,n):Kl}function bm(t){return function(e,n){return e+=t,dt(e)>ht&&(e-=Math.round(e/Xt)*Xt),[e,n]}}function vm(t){var e=bm(t);return e.invert=bm(-t),e}function xm(t,e){var n=J(t),r=K(t),i=J(e),o=K(e);function a(s,u){var c=J(u),l=J(s)*c,h=K(s)*c,f=K(u),d=f*n+l*r;return[jt(h*i-d*o,l*n-f*r),Vt(d*i+h*o)]}return a.invert=function(s,u){var c=J(u),l=J(s)*c,h=K(s)*c,f=K(u),d=f*i-h*o;return[jt(h*i+f*o,l*n+d*r),Vt(d*n-l*r)]},a}function _m(t){t=Ql(t[0]*rt,t[1]*rt,t.length>2?t[2]*rt:0);function e(n){return n=t(n[0]*rt,n[1]*rt),n[0]*=yt,n[1]*=yt,n}return e.invert=function(n){return n=t.invert(n[0]*rt,n[1]*rt),n[0]*=yt,n[1]*=yt,n},e}function wm(t,e,n,r,i,o){if(n){var a=J(e),s=K(e),u=r*n;i==null?(i=e+r*Xt,o=e-u/2):(i=$m(a,i),o=$m(a,o),(r>0?i<o:i>o)&&(i+=r*Xt));for(var c,l=i;r>0?l>o:l<o;l-=u)c=ys([a,-s*J(l),-s*K(l)]),t.point(c[0],c[1])}}function $m(t,e){e=Kn(e),e[0]-=t,xs(e);var n=Q1(-e[1]);return((-e[2]<0?-n:n)+Xt-et)%Xt}function dT(){var t=jr([0,0]),e=jr(90),n=jr(2),r,i,o={point:a};function a(u,c){r.push(u=i(u,c)),u[0]*=yt,u[1]*=yt}function s(){var u=t.apply(this,arguments),c=e.apply(this,arguments)*rt,l=n.apply(this,arguments)*rt;return r=[],i=Ql(-u[0]*rt,-u[1]*rt,0).invert,wm(o,c,l,1),u={type:"Polygon",coordinates:[r]},r=i=null,u}return s.center=function(u){return arguments.length?(t=typeof u=="function"?u:jr([+u[0],+u[1]]),s):t},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:jr(+u),s):e},s.precision=function(u){return arguments.length?(n=typeof u=="function"?u:jr(+u),s):n},s}function Sm(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:wt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Ps(t,e){return dt(t[0]-e[0])<et&&dt(t[1]-e[1])<et}function Ds(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Am(t,e,n,r,i){var o=[],a=[],s,u;if(t.forEach(function(p){if(!((g=p.length-1)<=0)){var g,m=p[0],y=p[g],v;if(Ps(m,y)){if(!m[2]&&!y[2]){for(i.lineStart(),s=0;s<g;++s)i.point((m=p[s])[0],m[1]);i.lineEnd();return}y[0]+=2*et}o.push(v=new Ds(m,p,null,!0)),a.push(v.o=new Ds(m,null,v,!1)),o.push(v=new Ds(y,p,null,!1)),a.push(v.o=new Ds(y,null,v,!0))}}),!!o.length){for(a.sort(e),Mm(o),Mm(a),s=0,u=a.length;s<u;++s)a[s].e=n=!n;for(var c=o[0],l,h;;){for(var f=c,d=!0;f.v;)if((f=f.n)===c)return;l=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(s=0,u=l.length;s<u;++s)i.point((h=l[s])[0],h[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(l=f.p.z,s=l.length-1;s>=0;--s)i.point((h=l[s])[0],h[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,l=f.z,d=!d}while(!f.v);i.lineEnd()}}}function Mm(t){if(e=t.length){for(var e,n=0,r=t[0],i;++n<e;)r.n=i=t[n],i.p=r,r=i;r.n=i=t[0],i.p=r}}function Jl(t){return dt(t[0])<=ht?t[0]:de(t[0])*((dt(t[0])+ht)%Xt-ht)}function Tm(t,e){var n=Jl(e),r=e[1],i=K(r),o=[K(n),-J(n),0],a=0,s=0,u=new Dt;i===1?r=St+et:i===-1&&(r=-St-et);for(var c=0,l=t.length;c<l;++c)if(f=(h=t[c]).length)for(var h,f,d=h[f-1],p=Jl(d),g=d[1]/2+fs,m=K(g),y=J(g),v=0;v<f;++v,p=b,m=$,y=S,d=x){var x=h[v],b=Jl(x),w=x[1]/2+fs,$=K(w),S=J(w),_=b-p,D=_>=0?1:-1,L=D*_,P=L>ht,I=m*$;if(u.add(jt(I*D*K(L),y*S+I*J(L))),a+=P?_+D*Xt:_,P^p>=n^b>=n){var k=qr(Kn(d),Kn(x));xs(k);var T=qr(o,k);xs(T);var C=(P^_>=0?-1:1)*Vt(T[2]);(r>C||r===C&&(k[0]||k[1]))&&(s+=P^_>=0?1:-1)}}return(a<-et||a<et&&u<-no)^s&1}function Pm(t,e,n,r){return function(i){var o=e(i),a=Sm(),s=e(a),u=!1,c,l,h,f={point:d,lineStart:g,lineEnd:m,polygonStart:function(){f.point=y,f.lineStart=v,f.lineEnd=x,l=[],c=[]},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=m,l=Lc(l);var b=Tm(c,r);l.length?(u||(i.polygonStart(),u=!0),Am(l,gT,b,n,i)):b&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),l=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(b,w){t(b,w)&&i.point(b,w)}function p(b,w){o.point(b,w)}function g(){f.point=p,o.lineStart()}function m(){f.point=d,o.lineEnd()}function y(b,w){h.push([b,w]),s.point(b,w)}function v(){s.lineStart(),h=[]}function x(){y(h[0][0],h[0][1]),s.lineEnd();var b=s.clean(),w=a.result(),$,S=w.length,_,D,L;if(h.pop(),c.push(h),h=null,!!S){if(b&1){if(D=w[0],(_=D.length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),$=0;$<_;++$)i.point((L=D[$])[0],L[1]);i.lineEnd()}return}S>1&&b&2&&w.push(w.pop().concat(w.shift())),l.push(w.filter(pT))}}return f}}function pT(t){return t.length>1}function gT(t,e){return((t=t.x)[0]<0?t[1]-St-et:St-t[1])-((e=e.x)[0]<0?e[1]-St-et:St-e[1])}const tf=Pm(function(){return!0},mT,bT,[-ht,-St]);function mT(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?ht:-ht,u=dt(o-e);dt(u-ht)<et?(t.point(e,n=(n+a)/2>0?St:-St),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(o,n),i=0):r!==s&&u>=ht&&(dt(e-r)<et&&(e-=r*et),dt(o-s)<et&&(o-=s*et),n=yT(e,n,o,a),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),i=0),t.point(e=o,n=a),r=s},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-i}}}function yT(t,e,n,r){var i,o,a=K(t-n);return dt(a)>et?Wr((K(e)*(o=J(r))*K(n)-K(r)*(i=J(e))*K(t))/(i*o*a)):(e+r)/2}function bT(t,e,n,r){var i;if(t==null)i=n*St,r.point(-ht,i),r.point(0,i),r.point(ht,i),r.point(ht,0),r.point(ht,-i),r.point(0,-i),r.point(-ht,-i),r.point(-ht,0),r.point(-ht,i);else if(dt(t[0]-e[0])>et){var o=t[0]<e[0]?ht:-ht;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function Dm(t){var e=J(t),n=2*rt,r=e>0,i=dt(e)>et;function o(l,h,f,d){wm(d,t,n,f,l,h)}function a(l,h){return J(l)*J(h)>e}function s(l){var h,f,d,p,g;return{lineStart:function(){p=d=!1,g=1},point:function(m,y){var v=[m,y],x,b=a(m,y),w=r?b?0:c(m,y):b?c(m+(m<0?ht:-ht),y):0;if(!h&&(p=d=b)&&l.lineStart(),b!==d&&(x=u(h,v),(!x||Ps(h,x)||Ps(v,x))&&(v[2]=1)),b!==d)g=0,b?(l.lineStart(),x=u(v,h),l.point(x[0],x[1])):(x=u(h,v),l.point(x[0],x[1],2),l.lineEnd()),h=x;else if(i&&h&&r^b){var $;!(w&f)&&($=u(v,h,!0))&&(g=0,r?(l.lineStart(),l.point($[0][0],$[0][1]),l.point($[1][0],$[1][1]),l.lineEnd()):(l.point($[1][0],$[1][1]),l.lineEnd(),l.lineStart(),l.point($[0][0],$[0][1],3)))}b&&(!h||!Ps(h,v))&&l.point(v[0],v[1]),h=v,d=b,f=w},lineEnd:function(){d&&l.lineEnd(),h=null},clean:function(){return g|(p&&d)<<1}}}function u(l,h,f){var d=Kn(l),p=Kn(h),g=[1,0,0],m=qr(d,p),y=bs(m,m),v=m[0],x=y-v*v;if(!x)return!f&&l;var b=e*y/x,w=-e*v/x,$=qr(g,m),S=vs(g,b),_=vs(m,w);Hl(S,_);var D=$,L=bs(S,D),P=bs(D,D),I=L*L-P*(bs(S,S)-1);if(!(I<0)){var k=It(I),T=vs(D,(-L-k)/P);if(Hl(T,S),T=ys(T),!f)return T;var C=l[0],M=h[0],R=l[1],G=h[1],A;M<C&&(A=C,C=M,M=A);var N=M-C,z=dt(N-ht)<et,E=z||N<et;if(!z&&G<R&&(A=R,R=G,G=A),E?z?R+G>0^T[1]<(dt(T[0]-C)<et?R:G):R<=T[1]&&T[1]<=G:N>ht^(C<=T[0]&&T[0]<=M)){var Y=vs(D,(-L+k)/P);return Hl(Y,S),[T,ys(Y)]}}}function c(l,h){var f=r?t:ht-t,d=0;return l<-f?d|=1:l>f&&(d|=2),h<-f?d|=4:h>f&&(d|=8),d}return Pm(a,s,o,r?[0,-t]:[-ht,t-ht])}function vT(t,e,n,r,i,o){var a=t[0],s=t[1],u=e[0],c=e[1],l=0,h=1,f=u-a,d=c-s,p;if(p=n-a,!(!f&&p>0)){if(p/=f,f<0){if(p<l)return;p<h&&(h=p)}else if(f>0){if(p>h)return;p>l&&(l=p)}if(p=i-a,!(!f&&p<0)){if(p/=f,f<0){if(p>h)return;p>l&&(l=p)}else if(f>0){if(p<l)return;p<h&&(h=p)}if(p=r-s,!(!d&&p>0)){if(p/=d,d<0){if(p<l)return;p<h&&(h=p)}else if(d>0){if(p>h)return;p>l&&(l=p)}if(p=o-s,!(!d&&p<0)){if(p/=d,d<0){if(p>h)return;p>l&&(l=p)}else if(d>0){if(p<l)return;p<h&&(h=p)}return l>0&&(t[0]=a+l*f,t[1]=s+l*d),h<1&&(e[0]=a+h*f,e[1]=s+h*d),!0}}}}}var ao=1e9,Ls=-ao;function Es(t,e,n,r){function i(c,l){return t<=c&&c<=n&&e<=l&&l<=r}function o(c,l,h,f){var d=0,p=0;if(c==null||(d=a(c,h))!==(p=a(l,h))||u(c,l)<0^h>0)do f.point(d===0||d===3?t:n,d>1?r:e);while((d=(d+h+4)%4)!==p);else f.point(l[0],l[1])}function a(c,l){return dt(c[0]-t)<et?l>0?0:3:dt(c[0]-n)<et?l>0?2:1:dt(c[1]-e)<et?l>0?1:0:l>0?3:2}function s(c,l){return u(c.x,l.x)}function u(c,l){var h=a(c,1),f=a(l,1);return h!==f?h-f:h===0?l[1]-c[1]:h===1?c[0]-l[0]:h===2?c[1]-l[1]:l[0]-c[0]}return function(c){var l=c,h=Sm(),f,d,p,g,m,y,v,x,b,w,$,S={point:_,lineStart:I,lineEnd:k,polygonStart:L,polygonEnd:P};function _(C,M){i(C,M)&&l.point(C,M)}function D(){for(var C=0,M=0,R=d.length;M<R;++M)for(var G=d[M],A=1,N=G.length,z=G[0],E,Y,j=z[0],H=z[1];A<N;++A)E=j,Y=H,z=G[A],j=z[0],H=z[1],Y<=r?H>r&&(j-E)*(r-Y)>(H-Y)*(t-E)&&++C:H<=r&&(j-E)*(r-Y)<(H-Y)*(t-E)&&--C;return C}function L(){l=h,f=[],d=[],$=!0}function P(){var C=D(),M=$&&C,R=(f=Lc(f)).length;(M||R)&&(c.polygonStart(),M&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),R&&Am(f,s,C,o,c),c.polygonEnd()),l=c,f=d=p=null}function I(){S.point=T,d&&d.push(p=[]),w=!0,b=!1,v=x=NaN}function k(){f&&(T(g,m),y&&b&&h.rejoin(),f.push(h.result())),S.point=_,b&&l.lineEnd()}function T(C,M){var R=i(C,M);if(d&&p.push([C,M]),w)g=C,m=M,y=R,w=!1,R&&(l.lineStart(),l.point(C,M));else if(R&&b)l.point(C,M);else{var G=[v=Math.max(Ls,Math.min(ao,v)),x=Math.max(Ls,Math.min(ao,x))],A=[C=Math.max(Ls,Math.min(ao,C)),M=Math.max(Ls,Math.min(ao,M))];vT(G,A,t,e,n,r)?(b||(l.lineStart(),l.point(G[0],G[1])),l.point(A[0],A[1]),R||l.lineEnd(),$=!1):R&&(l.lineStart(),l.point(C,M),$=!1)}v=C,x=M,b=R}return S}}function xT(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Es(t,e,n,r)(o=s)},extent:function(s){return arguments.length?(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[t,e],[n,r]]}}}var ef,nf,ks,Cs,Vr={sphere:wt,point:wt,lineStart:_T,lineEnd:wt,polygonStart:wt,polygonEnd:wt};function _T(){Vr.point=$T,Vr.lineEnd=wT}function wT(){Vr.point=Vr.lineEnd=wt}function $T(t,e){t*=rt,e*=rt,nf=t,ks=K(e),Cs=J(e),Vr.point=ST}function ST(t,e){t*=rt,e*=rt;var n=K(e),r=J(e),i=dt(t-nf),o=J(i),a=K(i),s=r*a,u=Cs*n-ks*r*o,c=ks*n+Cs*r*o;ef.add(jt(It(s*s+u*u),c)),nf=t,ks=n,Cs=r}function Lm(t){return ef=new Dt,Pe(t,Vr),+ef}var rf=[null,null],AT={type:"LineString",coordinates:rf};function Is(t,e){return rf[0]=t,rf[1]=e,Lm(AT)}var Em={Feature:function(t,e){return Rs(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Rs(n[r].geometry,e))return!0;return!1}},km={Sphere:function(){return!0},Point:function(t,e){return Cm(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Cm(n[r],e))return!0;return!1},LineString:function(t,e){return Im(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Im(n[r],e))return!0;return!1},Polygon:function(t,e){return Rm(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Rm(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Rs(n[r],e))return!0;return!1}};function Rs(t,e){return t&&km.hasOwnProperty(t.type)?km[t.type](t,e):!1}function Cm(t,e){return Is(t,e)===0}function Im(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Is(t[o],e),r===0||o>0&&(i=Is(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<no*i))return!0;n=r}return!1}function Rm(t,e){return!!Tm(t.map(MT),Nm(e))}function MT(t){return t=t.map(Nm),t.pop(),t}function Nm(t){return[t[0]*rt,t[1]*rt]}function TT(t,e){return(t&&Em.hasOwnProperty(t.type)?Em[t.type]:Rs)(t,e)}function Fm(t,e,n){var r=fn(t,e-et,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function Gm(t,e,n){var r=fn(t,e-et,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function zm(){var t,e,n,r,i,o,a,s,u=10,c=u,l=90,h=360,f,d,p,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:v()}}function v(){return fn(hs(r/l)*l,n,l).map(p).concat(fn(hs(s/h)*h,a,h).map(g)).concat(fn(hs(e/u)*u,t,u).filter(function(x){return dt(x%l)>et}).map(f)).concat(fn(hs(o/c)*c,i,c).filter(function(x){return dt(x%h)>et}).map(d))}return y.lines=function(){return v().map(function(x){return{type:"LineString",coordinates:x}})},y.outline=function(){return{type:"Polygon",coordinates:[p(r).concat(g(a).slice(1),p(n).reverse().slice(1),g(s).reverse().slice(1))]}},y.extent=function(x){return arguments.length?y.extentMajor(x).extentMinor(x):y.extentMinor()},y.extentMajor=function(x){return arguments.length?(r=+x[0][0],n=+x[1][0],s=+x[0][1],a=+x[1][1],r>n&&(x=r,r=n,n=x),s>a&&(x=s,s=a,a=x),y.precision(m)):[[r,s],[n,a]]},y.extentMinor=function(x){return arguments.length?(e=+x[0][0],t=+x[1][0],o=+x[0][1],i=+x[1][1],e>t&&(x=e,e=t,t=x),o>i&&(x=o,o=i,i=x),y.precision(m)):[[e,o],[t,i]]},y.step=function(x){return arguments.length?y.stepMajor(x).stepMinor(x):y.stepMinor()},y.stepMajor=function(x){return arguments.length?(l=+x[0],h=+x[1],y):[l,h]},y.stepMinor=function(x){return arguments.length?(u=+x[0],c=+x[1],y):[u,c]},y.precision=function(x){return arguments.length?(m=+x,f=Fm(o,i,90),d=Gm(e,t,m),p=Fm(s,a,90),g=Gm(r,n,m),y):m},y.extentMajor([[-180,-90+et],[180,90-et]]).extentMinor([[-180,-80-et],[180,80+et]])}function PT(){return zm()()}function DT(t,e){var n=t[0]*rt,r=t[1]*rt,i=e[0]*rt,o=e[1]*rt,a=J(r),s=K(r),u=J(o),c=K(o),l=a*J(n),h=a*K(n),f=u*J(i),d=u*K(i),p=2*Vt(It(J1(o-r)+a*u*J1(i-n))),g=K(p),m=p?function(y){var v=K(y*=p)/g,x=K(p-y)/g,b=x*l+v*f,w=x*h+v*d,$=x*s+v*c;return[jt(w,b)*yt,jt($,It(b*b+w*w))*yt]}:function(){return[n*yt,r*yt]};return m.distance=p,m}const so=t=>t;var of=new Dt,af=new Dt,Om,Um,sf,uf,tn={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){tn.lineStart=LT,tn.lineEnd=kT},polygonEnd:function(){tn.lineStart=tn.lineEnd=tn.point=wt,of.add(dt(af)),af=new Dt},result:function(){var t=of/2;return of=new Dt,t}};function LT(){tn.point=ET}function ET(t,e){tn.point=Bm,Om=sf=t,Um=uf=e}function Bm(t,e){af.add(uf*t-sf*e),sf=t,uf=e}function kT(){Bm(Om,Um)}var Zr=1/0,Ns=Zr,uo=-Zr,Fs=uo,Gs={point:CT,lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var t=[[Zr,Ns],[uo,Fs]];return uo=Fs=-(Ns=Zr=1/0),t}};function CT(t,e){t<Zr&&(Zr=t),t>uo&&(uo=t),e<Ns&&(Ns=e),e>Fs&&(Fs=e)}var cf=0,lf=0,co=0,zs=0,Os=0,Kr=0,ff=0,hf=0,lo=0,Ym,Hm,ze,Oe,pe={point:Jn,lineStart:Wm,lineEnd:qm,polygonStart:function(){pe.lineStart=NT,pe.lineEnd=FT},polygonEnd:function(){pe.point=Jn,pe.lineStart=Wm,pe.lineEnd=qm},result:function(){var t=lo?[ff/lo,hf/lo]:Kr?[zs/Kr,Os/Kr]:co?[cf/co,lf/co]:[NaN,NaN];return cf=lf=co=zs=Os=Kr=ff=hf=lo=0,t}};function Jn(t,e){cf+=t,lf+=e,++co}function Wm(){pe.point=IT}function IT(t,e){pe.point=RT,Jn(ze=t,Oe=e)}function RT(t,e){var n=t-ze,r=e-Oe,i=It(n*n+r*r);zs+=i*(ze+t)/2,Os+=i*(Oe+e)/2,Kr+=i,Jn(ze=t,Oe=e)}function qm(){pe.point=Jn}function NT(){pe.point=GT}function FT(){Xm(Ym,Hm)}function GT(t,e){pe.point=Xm,Jn(Ym=ze=t,Hm=Oe=e)}function Xm(t,e){var n=t-ze,r=e-Oe,i=It(n*n+r*r);zs+=i*(ze+t)/2,Os+=i*(Oe+e)/2,Kr+=i,i=Oe*t-ze*e,ff+=i*(ze+t),hf+=i*(Oe+e),lo+=i*3,Jn(ze=t,Oe=e)}function jm(t){this._context=t}jm.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(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Xt);break}}},result:wt};var df=new Dt,pf,Vm,Zm,fo,ho,po={point:wt,lineStart:function(){po.point=zT},lineEnd:function(){pf&&Km(Vm,Zm),po.point=wt},polygonStart:function(){pf=!0},polygonEnd:function(){pf=null},result:function(){var t=+df;return df=new Dt,t}};function zT(t,e){po.point=Km,Vm=fo=t,Zm=ho=e}function Km(t,e){fo-=t,ho-=e,df.add(It(fo*fo+ho*ho)),fo=t,ho=e}let Qm,Us,Jm,ty;class ey{constructor(e){this._append=e==null?ny:OT(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==Jm||this._append!==Us){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,Jm=r,Us=this._append,ty=this._,this._=i}this._+=ty;break}}}result(){const e=this._;return this._="",e.length?e:null}}function ny(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function OT(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return ny;if(e!==Qm){const n=10**e;Qm=e,Us=function(i){let o=1;this._+=i[0];for(const a=i.length;o<a;++o)this._+=Math.round(arguments[o]*n)/n+i[o]}}return Us}function UT(t,e){let n=3,r=4.5,i,o;function a(s){return s&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),Pe(s,i(o))),o.result()}return a.area=function(s){return Pe(s,i(tn)),tn.result()},a.measure=function(s){return Pe(s,i(po)),po.result()},a.bounds=function(s){return Pe(s,i(Gs)),Gs.result()},a.centroid=function(s){return Pe(s,i(pe)),pe.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,so):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new ey(n)):new jm(e=s),typeof r!="function"&&o.pointRadius(r),a):e},a.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(o.pointRadius(+s),+s),a):r},a.digits=function(s){if(!arguments.length)return n;if(s==null)n=null;else{const u=Math.floor(s);if(!(u>=0))throw new RangeError(`invalid digits: ${s}`);n=u}return e===null&&(o=new ey(n)),a},a.projection(t).digits(n).context(e)}function BT(t){return{stream:go(t)}}function go(t){return function(e){var n=new gf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function gf(){}gf.prototype={constructor:gf,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function mf(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Pe(n,t.stream(Gs)),e(Gs.result()),r!=null&&t.clipExtent(r),t}function Bs(t,e,n){return mf(t,function(r){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+e[0][0]+(i-a*(r[1][0]+r[0][0]))/2,u=+e[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([s,u])},n)}function yf(t,e,n){return Bs(t,[[0,0],e],n)}function bf(t,e,n){return mf(t,function(r){var i=+e,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];t.scale(150*o).translate([a,s])},n)}function vf(t,e,n){return mf(t,function(r){var i=+e,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,s])},n)}var ry=16,YT=J(30*rt);function iy(t,e){return+e?WT(t,e):HT(t)}function HT(t){return go({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function WT(t,e){function n(r,i,o,a,s,u,c,l,h,f,d,p,g,m){var y=c-r,v=l-i,x=y*y+v*v;if(x>4*e&&g--){var b=a+f,w=s+d,$=u+p,S=It(b*b+w*w+$*$),_=Vt($/=S),D=dt(dt($)-1)<et||dt(o-h)<et?(o+h)/2:jt(w,b),L=t(D,_),P=L[0],I=L[1],k=P-r,T=I-i,C=v*k-y*T;(C*C/x>e||dt((y*k+v*T)/x-.5)>.3||a*f+s*d+u*p<YT)&&(n(r,i,o,a,s,u,P,I,D,b/=S,w/=S,$,g,m),m.point(P,I),n(P,I,D,b,w,$,c,l,h,f,d,p,g,m))}}return function(r){var i,o,a,s,u,c,l,h,f,d,p,g,m={point:y,lineStart:v,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=w},polygonEnd:function(){r.polygonEnd(),m.lineStart=v}};function y(_,D){_=t(_,D),r.point(_[0],_[1])}function v(){h=NaN,m.point=x,r.lineStart()}function x(_,D){var L=Kn([_,D]),P=t(_,D);n(h,f,l,d,p,g,h=P[0],f=P[1],l=_,d=L[0],p=L[1],g=L[2],ry,r),r.point(h,f)}function b(){m.point=y,r.lineEnd()}function w(){v(),m.point=$,m.lineEnd=S}function $(_,D){x(i=_,D),o=h,a=f,s=d,u=p,c=g,m.point=x}function S(){n(h,f,l,d,p,g,o,a,i,s,u,c,ry,r),m.lineEnd=b,b()}return m}}var qT=go({point:function(t,e){this.stream.point(t*rt,e*rt)}});function XT(t){return go({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function jT(t,e,n,r,i){function o(a,s){return a*=r,s*=i,[e+t*a,n-t*s]}return o.invert=function(a,s){return[(a-e)/t*r,(n-s)/t*i]},o}function oy(t,e,n,r,i,o){if(!o)return jT(t,e,n,r,i);var a=J(o),s=K(o),u=a*t,c=s*t,l=a/t,h=s/t,f=(s*n-a*e)/t,d=(s*e+a*n)/t;function p(g,m){return g*=r,m*=i,[u*g-c*m+e,n-c*g-u*m]}return p.invert=function(g,m){return[r*(l*g-h*m+f),i*(d-h*g-l*m)]},p}function Ue(t){return xf(function(){return t})()}function xf(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,u=0,c=0,l,h=0,f=1,d=1,p=null,g=tf,m=null,y,v,x,b=so,w=.5,$,S,_,D,L;function P(C){return _(C[0]*rt,C[1]*rt)}function I(C){return C=_.invert(C[0],C[1]),C&&[C[0]*yt,C[1]*yt]}P.stream=function(C){return D&&L===C?D:D=qT(XT(l)(g($(b(L=C)))))},P.preclip=function(C){return arguments.length?(g=C,p=void 0,T()):g},P.postclip=function(C){return arguments.length?(b=C,m=y=v=x=null,T()):b},P.clipAngle=function(C){return arguments.length?(g=+C?Dm(p=C*rt):(p=null,tf),T()):p*yt},P.clipExtent=function(C){return arguments.length?(b=C==null?(m=y=v=x=null,so):Es(m=+C[0][0],y=+C[0][1],v=+C[1][0],x=+C[1][1]),T()):m==null?null:[[m,y],[v,x]]},P.scale=function(C){return arguments.length?(n=+C,k()):n},P.translate=function(C){return arguments.length?(r=+C[0],i=+C[1],k()):[r,i]},P.center=function(C){return arguments.length?(o=C[0]%360*rt,a=C[1]%360*rt,k()):[o*yt,a*yt]},P.rotate=function(C){return arguments.length?(s=C[0]%360*rt,u=C[1]%360*rt,c=C.length>2?C[2]%360*rt:0,k()):[s*yt,u*yt,c*yt]},P.angle=function(C){return arguments.length?(h=C%360*rt,k()):h*yt},P.reflectX=function(C){return arguments.length?(f=C?-1:1,k()):f<0},P.reflectY=function(C){return arguments.length?(d=C?-1:1,k()):d<0},P.precision=function(C){return arguments.length?($=iy(S,w=C*C),T()):It(w)},P.fitExtent=function(C,M){return Bs(P,C,M)},P.fitSize=function(C,M){return yf(P,C,M)},P.fitWidth=function(C,M){return bf(P,C,M)},P.fitHeight=function(C,M){return vf(P,C,M)};function k(){var C=oy(n,0,0,f,d,h).apply(null,e(o,a)),M=oy(n,r-C[0],i-C[1],f,d,h);return l=Ql(s,u,c),S=Zl(e,M),_=Zl(l,S),$=iy(S,w),T()}function T(){return D=L=null,P}return function(){return e=t.apply(this,arguments),P.invert=e.invert&&I,k()}}function _f(t){var e=0,n=ht/3,r=xf(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*rt,n=o[1]*rt):[e*yt,n*yt]},i}function VT(t){var e=J(t);function n(r,i){return[r*e,K(i)/e]}return n.invert=function(r,i){return[r/e,Vt(i*e)]},n}function ay(t,e){var n=K(t),r=(n+K(e))/2;if(dt(r)<et)return VT(t);var i=1+n*(2*r-n),o=It(i)/r;function a(s,u){var c=It(i-2*r*K(u))/r;return[c*K(s*=r),o-c*J(s)]}return a.invert=function(s,u){var c=o-u,l=jt(s,dt(c))*de(c);return c*r<0&&(l-=ht*de(s)*de(c)),[l/r,Vt((i-(s*s+c*c)*r*r)/(2*r))]},a}function Ys(){return _f(ay).scale(155.424).center([0,33.6442])}function sy(){return Ys().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function ZT(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function KT(){var t,e,n=sy(),r,i=Ys().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Ys().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,u,c={point:function(f,d){u=[f,d]}};function l(f){var d=f[0],p=f[1];return u=null,r.point(d,p),u||(o.point(d,p),u)||(s.point(d,p),u)}l.invert=function(f){var d=n.scale(),p=n.translate(),g=(f[0]-p[0])/d,m=(f[1]-p[1])/d;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?i:m>=.166&&m<.234&&g>=-.214&&g<-.115?a:n).invert(f)},l.stream=function(f){return t&&e===f?t:t=ZT([n.stream(e=f),i.stream(f),a.stream(f)])},l.precision=function(f){return arguments.length?(n.precision(f),i.precision(f),a.precision(f),h()):n.precision()},l.scale=function(f){return arguments.length?(n.scale(f),i.scale(f*.35),a.scale(f),l.translate(n.translate())):n.scale()},l.translate=function(f){if(!arguments.length)return n.translate();var d=n.scale(),p=+f[0],g=+f[1];return r=n.translate(f).clipExtent([[p-.455*d,g-.238*d],[p+.455*d,g+.238*d]]).stream(c),o=i.translate([p-.307*d,g+.201*d]).clipExtent([[p-.425*d+et,g+.12*d+et],[p-.214*d-et,g+.234*d-et]]).stream(c),s=a.translate([p-.205*d,g+.212*d]).clipExtent([[p-.214*d+et,g+.166*d+et],[p-.115*d-et,g+.234*d-et]]).stream(c),h()},l.fitExtent=function(f,d){return Bs(l,f,d)},l.fitSize=function(f,d){return yf(l,f,d)},l.fitWidth=function(f,d){return bf(l,f,d)},l.fitHeight=function(f,d){return vf(l,f,d)};function h(){return t=e=null,l}return l.scale(1070)}function uy(t){return function(e,n){var r=J(e),i=J(n),o=t(r*i);return o===1/0?[2,0]:[o*i*K(e),o*K(n)]}}function mo(t){return function(e,n){var r=It(e*e+n*n),i=t(r),o=K(i),a=J(i);return[jt(e*o,r*a),Vt(r&&n*o/r)]}}var wf=uy(function(t){return It(2/(1+t))});wf.invert=mo(function(t){return 2*Vt(t/2)});function QT(){return Ue(wf).scale(124.75).clipAngle(180-.001)}var $f=uy(function(t){return(t=Q1(t))&&t/K(t)});$f.invert=mo(function(t){return t});function JT(){return Ue($f).scale(79.4188).clipAngle(180-.001)}function yo(t,e){return[t,ds(zl((St+e)/2))]}yo.invert=function(t,e){return[t,2*Wr(K1(e))-St]};function tP(){return cy(yo).scale(961/Xt)}function cy(t){var e=Ue(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,u,c;e.scale=function(h){return arguments.length?(r(h),l()):r()},e.translate=function(h){return arguments.length?(i(h),l()):i()},e.center=function(h){return arguments.length?(n(h),l()):n()},e.clipExtent=function(h){return arguments.length?(h==null?a=s=u=c=null:(a=+h[0][0],s=+h[0][1],u=+h[1][0],c=+h[1][1]),l()):a==null?null:[[a,s],[u,c]]};function l(){var h=ht*r(),f=e(_m(e.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:t===yo?[[Math.max(f[0]-h,a),s],[Math.min(f[0]+h,u),c]]:[[a,Math.max(f[1]-h,s)],[u,Math.min(f[1]+h,c)]])}return l()}function Hs(t){return zl((St+t)/2)}function ly(t,e){var n=J(t),r=t===e?K(t):ds(n/J(e))/ds(Hs(e)/Hs(t)),i=n*Gl(Hs(t),r)/r;if(!r)return yo;function o(a,s){i>0?s<-St+et&&(s=-St+et):s>St-et&&(s=St-et);var u=i/Gl(Hs(s),r);return[u*K(r*a),i-u*J(r*a)]}return o.invert=function(a,s){var u=i-s,c=de(r)*It(a*a+u*u),l=jt(a,dt(u))*de(u);return u*r<0&&(l-=ht*de(a)*de(u)),[l/r,2*Wr(Gl(i/c,1/r))-St]},o}function eP(){return _f(ly).scale(109.5).parallels([30,30])}function bo(t,e){return[t,e]}bo.invert=bo;function nP(){return Ue(bo).scale(152.63)}function fy(t,e){var n=J(t),r=t===e?K(t):(n-J(e))/(e-t),i=n/r+t;if(dt(r)<et)return bo;function o(a,s){var u=i-s,c=r*a;return[u*K(c),i-u*J(c)]}return o.invert=function(a,s){var u=i-s,c=jt(a,dt(u))*de(u);return u*r<0&&(c-=ht*de(a)*de(u)),[c/r,i-de(r)*It(a*a+u*u)]},o}function rP(){return _f(fy).scale(131.154).center([0,13.9389])}var vo=1.340264,xo=-.081106,_o=893e-6,wo=.003796,Ws=It(3)/2,iP=12;function Sf(t,e){var n=Vt(Ws*K(e)),r=n*n,i=r*r*r;return[t*J(n)/(Ws*(vo+3*xo*r+i*(7*_o+9*wo*r))),n*(vo+xo*r+i*(_o+wo*r))]}Sf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<iP&&(s=n*(vo+xo*r+i*(_o+wo*r))-e,u=vo+3*xo*r+i*(7*_o+9*wo*r),n-=a=s/u,r=n*n,i=r*r*r,!(dt(a)<no));++o);return[Ws*t*(vo+3*xo*r+i*(7*_o+9*wo*r))/J(n),Vt(K(n)/Ws)]};function oP(){return Ue(Sf).scale(177.158)}function Af(t,e){var n=J(e),r=J(t)*n;return[n*K(t)/r,K(e)/r]}Af.invert=mo(Wr);function aP(){return Ue(Af).scale(144.049).clipAngle(60)}function sP(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,u=null,c,l,h,f=1,d=1,p=go({point:function(b,w){var $=x([b,w]);this.stream.point($[0],$[1])}}),g=so,m,y;function v(){return f=t*r,d=t*i,m=y=null,x}function x(b){var w=b[0]*f,$=b[1]*d;if(o){var S=$*a-w*s;w=w*a+$*s,$=S}return[w+e,$+n]}return x.invert=function(b){var w=b[0]-e,$=b[1]-n;if(o){var S=$*a+w*s;w=w*a-$*s,$=S}return[w/f,$/d]},x.stream=function(b){return m&&y===b?m:m=p(g(y=b))},x.postclip=function(b){return arguments.length?(g=b,u=c=l=h=null,v()):g},x.clipExtent=function(b){return arguments.length?(g=b==null?(u=c=l=h=null,so):Es(u=+b[0][0],c=+b[0][1],l=+b[1][0],h=+b[1][1]),v()):u==null?null:[[u,c],[l,h]]},x.scale=function(b){return arguments.length?(t=+b,v()):t},x.translate=function(b){return arguments.length?(e=+b[0],n=+b[1],v()):[e,n]},x.angle=function(b){return arguments.length?(o=b%360*rt,s=K(o),a=J(o),v()):o*yt},x.reflectX=function(b){return arguments.length?(r=b?-1:1,v()):r<0},x.reflectY=function(b){return arguments.length?(i=b?-1:1,v()):i<0},x.fitExtent=function(b,w){return Bs(x,b,w)},x.fitSize=function(b,w){return yf(x,b,w)},x.fitWidth=function(b,w){return bf(x,b,w)},x.fitHeight=function(b,w){return vf(x,b,w)},x}function Mf(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Mf.invert=function(t,e){var n=e,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(dt(i)>et&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function uP(){return Ue(Mf).scale(175.295)}function Tf(t,e){return[J(e)*K(t),K(e)]}Tf.invert=mo(Vt);function cP(){return Ue(Tf).scale(249.5).clipAngle(90+et)}function Pf(t,e){var n=J(e),r=1+J(t)*n;return[n*K(t)/r,K(e)/r]}Pf.invert=mo(function(t){return 2*Wr(t)});function lP(){return Ue(Pf).scale(250).clipAngle(142)}function Df(t,e){return[ds(zl((St+e)/2)),-t]}Df.invert=function(t,e){return[-e,2*Wr(K1(t))-St]};function fP(){var t=cy(Df),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function hP(t,e){return t.parent===e.parent?1:2}function dP(t){return t.reduce(pP,0)/t.length}function pP(t,e){return t+e.x}function gP(t){return 1+t.reduce(mP,0)}function mP(t,e){return Math.max(t,e.y)}function yP(t){for(var e;e=t.children;)t=e[0];return t}function bP(t){for(var e;e=t.children;)t=e[e.length-1];return t}function vP(){var t=hP,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var d=f.children;d?(f.x=dP(d),f.y=gP(d)):(f.x=a?s+=t(f,a):0,f.y=0,a=f)});var u=yP(o),c=bP(o),l=u.x-t(u,c)/2,h=c.x+t(c,u)/2;return o.eachAfter(r?function(f){f.x=(f.x-o.x)*e,f.y=(o.y-f.y)*n}:function(f){f.x=(f.x-l)/(h-l)*e,f.y=(1-(o.y?f.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(t=o,i):t},i.size=function(o){return arguments.length?(r=!1,e=+o[0],n=+o[1],i):r?null:[e,n]},i.nodeSize=function(o){return arguments.length?(r=!0,e=+o[0],n=+o[1],i):r?[e,n]:null},i}function xP(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function _P(){return this.eachAfter(xP)}function wP(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function $P(t,e){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(t.call(e,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function SP(t,e){for(var n=this,r=[n],i=[],o,a,s,u=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,s=o.length;a<s;++a)r.push(o[a]);for(;n=i.pop();)t.call(e,n,++u,this);return this}function AP(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function MP(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function TP(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function PP(t){for(var e=this,n=DP(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function DP(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function LP(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function EP(){return Array.from(this)}function kP(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function CP(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*IP(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function qs(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=FP)):e===void 0&&(e=NP);for(var n=new tr(t),r,i=[n],o,a,s,u;r=i.pop();)if((a=e(r.data))&&(u=(a=Array.from(a)).length))for(r.children=a,s=u-1;s>=0;--s)i.push(o=a[s]=new tr(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(hy)}function RP(){return qs(this).eachBefore(GP)}function NP(t){return t.children}function FP(t){return Array.isArray(t)?t[1]:null}function GP(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function hy(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function tr(t){this.data=t,this.depth=this.height=0,this.parent=null}tr.prototype=qs.prototype={constructor:tr,count:_P,each:wP,eachAfter:SP,eachBefore:$P,find:AP,sum:MP,sort:TP,path:PP,ancestors:LP,descendants:EP,leaves:kP,links:CP,copy:RP,[Symbol.iterator]:IP};function Xs(t){return t==null?null:dy(t)}function dy(t){if(typeof t!="function")throw new Error;return t}function er(){return 0}function Qr(t){return function(){return t}}const zP=1664525,OP=1013904223,py=4294967296;function Lf(){let t=1;return()=>(t=(zP*t+OP)%py)/py}function UP(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function BP(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function YP(t){return gy(t,Lf())}function gy(t,e){for(var n=0,r=(t=BP(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&my(a,o)?++n:(a=WP(i=HP(i,o)),n=0);return a}function HP(t,e){var n,r;if(Ef(e,t))return[e];for(n=0;n<t.length;++n)if(js(e,t[n])&&Ef($o(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(js($o(t[n],t[r]),e)&&js($o(t[n],e),t[r])&&js($o(t[r],e),t[n])&&Ef(yy(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function js(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function my(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Ef(t,e){for(var n=0;n<e.length;++n)if(!my(t,e[n]))return!1;return!0}function WP(t){switch(t.length){case 1:return qP(t[0]);case 2:return $o(t[0],t[1]);case 3:return yy(t[0],t[1],t[2])}}function qP(t){return{x:t.x,y:t.y,r:t.r}}function $o(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,c=a-r,l=s-i,h=Math.sqrt(u*u+c*c);return{x:(n+o+u/h*l)/2,y:(r+a+c/h*l)/2,r:(h+i+s)/2}}function yy(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,c=n.x,l=n.y,h=n.r,f=r-a,d=r-c,p=i-s,g=i-l,m=u-o,y=h-o,v=r*r+i*i-o*o,x=v-a*a-s*s+u*u,b=v-c*c-l*l+h*h,w=d*p-f*g,$=(p*b-g*x)/(w*2)-r,S=(g*m-p*y)/w,_=(d*x-f*b)/(w*2)-i,D=(f*y-d*m)/w,L=S*S+D*D-1,P=2*(o+$*S+_*D),I=$*$+_*_-o*o,k=-(Math.abs(L)>1e-6?(P+Math.sqrt(P*P-4*L*I))/(2*L):I/P);return{x:r+$+S*k,y:i+_+D*k,r:k}}function by(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,u,c=r*r+a*a;c?(o=e.r+n.r,o*=o,u=t.r+n.r,u*=u,o>u?(i=(c+u-o)/(2*c),s=Math.sqrt(Math.max(0,u/c-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(c+o-u)/(2*c),s=Math.sqrt(Math.max(0,o/c-i*i)),n.x=e.x+i*r-s*a,n.y=e.y+i*a+s*r)):(n.x=e.x+n.r,n.y=e.y)}function vy(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function xy(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Vs(t){this._=t,this.next=null,this.previous=null}function _y(t,e){if(!(o=(t=UP(t)).length))return 0;var n,r,i,o,a,s,u,c,l,h,f;if(n=t[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;by(r,n,i=t[2]),n=new Vs(n),r=new Vs(r),i=new Vs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;u<o;++u){by(n._,r._,i=t[u]),i=new Vs(i),c=r.next,l=n.previous,h=r._.r,f=n._.r;do if(h<=f){if(vy(c._,i._)){r=c,n.next=r,r.previous=n,--u;continue t}h+=c._.r,c=c.next}else{if(vy(l._,i._)){n=l,n.next=r,r.previous=n,--u;continue t}f+=l._.r,l=l.previous}while(c!==l.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=xy(n);(i=i.next)!==r;)(s=xy(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=gy(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function XP(t){return _y(t,Lf()),t}function jP(t){return Math.sqrt(t.value)}function VP(){var t=null,e=1,n=1,r=er;function i(o){const a=Lf();return o.x=e/2,o.y=n/2,t?o.eachBefore(wy(t)).eachAfter(kf(r,.5,a)).eachBefore($y(1)):o.eachBefore(wy(jP)).eachAfter(kf(er,1,a)).eachAfter(kf(r,o.r/Math.min(e,n),a)).eachBefore($y(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=Xs(o),i):t},i.size=function(o){return arguments.length?(e=+o[0],n=+o[1],i):[e,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:Qr(+o),i):r},i}function wy(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function kf(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,s=t(r)*e||0,u;if(s)for(o=0;o<a;++o)i[o].r+=s;if(u=_y(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=u+s}}}function $y(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function Sy(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function So(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,c=t.value&&(r-e)/t.value;++s<u;)a=o[s],a.y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}function ZP(){var t=1,e=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=t,a.y1=e/s,a.eachBefore(o(e,s)),r&&a.eachBefore(Sy),a}function o(a,s){return function(u){u.children&&So(u,u.x0,a*(u.depth+1)/s,u.x1,a*(u.depth+2)/s);var c=u.x0,l=u.y0,h=u.x1-n,f=u.y1-n;h<c&&(c=h=(c+h)/2),f<l&&(l=f=(l+f)/2),u.x0=c,u.y0=l,u.x1=h,u.y1=f}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(t=+a[0],e=+a[1],i):[t,e]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var KP={depth:-1},Ay={},Cf={};function QP(t){return t.id}function JP(t){return t.parentId}function tD(){var t=QP,e=JP,n;function r(i){var o=Array.from(i),a=t,s=e,u,c,l,h,f,d,p,g,m=new Map;if(n!=null){const y=o.map((b,w)=>eD(n(b,w,i))),v=y.map(My),x=new Set(y).add("");for(const b of v)x.has(b)||(x.add(b),y.push(b),v.push(My(b)),o.push(Cf));a=(b,w)=>y[w],s=(b,w)=>v[w]}for(l=0,u=o.length;l<u;++l)c=o[l],d=o[l]=new tr(c),(p=a(c,l,i))!=null&&(p+="")&&(g=d.id=p,m.set(g,m.has(g)?Ay:d)),(p=s(c,l,i))!=null&&(p+="")&&(d.parent=p);for(l=0;l<u;++l)if(d=o[l],p=d.parent){if(f=m.get(p),!f)throw new Error("missing: "+p);if(f===Ay)throw new Error("ambiguous: "+p);f.children?f.children.push(d):f.children=[d],d.parent=f}else{if(h)throw new Error("multiple roots");h=d}if(!h)throw new Error("no root");if(n!=null){for(;h.data===Cf&&h.children.length===1;)h=h.children[0],--u;for(let y=o.length-1;y>=0&&(d=o[y],d.data===Cf);--y)d.data=null}if(h.parent=KP,h.eachBefore(function(y){y.depth=y.parent.depth+1,--u}).eachBefore(hy),h.parent=null,u>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=Xs(i),r):t},r.parentId=function(i){return arguments.length?(e=Xs(i),r):e},r.path=function(i){return arguments.length?(n=Xs(i),r):n},r}function eD(t){t=`${t}`;let e=t.length;return If(t,e-1)&&!If(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function My(t){let e=t.length;if(e<2)return"";for(;--e>1&&!If(t,e););return t.slice(0,e)}function If(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function nD(t,e){return t.parent===e.parent?1:2}function Rf(t){var e=t.children;return e?e[0]:t.t}function Nf(t){var e=t.children;return e?e[e.length-1]:t.t}function rD(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function iD(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function oD(t,e,n){return t.a.parent===e.parent?t.a:n}function Zs(t,e){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=e}Zs.prototype=Object.create(tr.prototype);function aD(t){for(var e=new Zs(t,0),n,r=[e],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new Zs(o[a],a)),i.parent=n;return(e.parent=new Zs(null,0)).children=[e],e}function sD(){var t=nD,e=1,n=1,r=null;function i(c){var l=aD(c);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),r)c.eachBefore(u);else{var h=c,f=c,d=c;c.eachBefore(function(v){v.x<h.x&&(h=v),v.x>f.x&&(f=v),v.depth>d.depth&&(d=v)});var p=h===f?1:t(h,f)/2,g=p-h.x,m=e/(f.x+p+g),y=n/(d.depth||1);c.eachBefore(function(v){v.x=(v.x+g)*m,v.y=v.depth*y})}return c}function o(c){var l=c.children,h=c.parent.children,f=c.i?h[c.i-1]:null;if(l){iD(c);var d=(l[0].z+l[l.length-1].z)/2;f?(c.z=f.z+t(c._,f._),c.m=c.z-d):c.z=d}else f&&(c.z=f.z+t(c._,f._));c.parent.A=s(c,f,c.parent.A||h[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function s(c,l,h){if(l){for(var f=c,d=c,p=l,g=f.parent.children[0],m=f.m,y=d.m,v=p.m,x=g.m,b;p=Nf(p),f=Rf(f),p&&f;)g=Rf(g),d=Nf(d),d.a=c,b=p.z+v-f.z-m+t(p._,f._),b>0&&(rD(oD(p,c,h),c,b),m+=b,y+=b),v+=p.m,m+=f.m,x+=g.m,y+=d.m;p&&!Nf(d)&&(d.t=p,d.m+=v-y),f&&!Rf(g)&&(g.t=f,g.m+=m-x,h=c)}return h}function u(c){c.x*=e,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(t=c,i):t},i.size=function(c){return arguments.length?(r=!1,e=+c[0],n=+c[1],i):r?null:[e,n]},i.nodeSize=function(c){return arguments.length?(r=!0,e=+c[0],n=+c[1],i):r?[e,n]:null},i}function Ks(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,c=t.value&&(i-n)/t.value;++s<u;)a=o[s],a.x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}var Ty=(1+Math.sqrt(5))/2;function Py(t,e,n,r,i,o){for(var a=[],s=e.children,u,c,l=0,h=0,f=s.length,d,p,g=e.value,m,y,v,x,b,w,$;l<f;){d=i-n,p=o-r;do m=s[h++].value;while(!m&&h<f);for(y=v=m,w=Math.max(p/d,d/p)/(g*t),$=m*m*w,b=Math.max(v/$,$/y);h<f;++h){if(m+=c=s[h].value,c<y&&(y=c),c>v&&(v=c),$=m*m*w,x=Math.max(v/$,$/y),x>b){m-=c;break}b=x}a.push(u={value:m,dice:d<p,children:s.slice(l,h)}),u.dice?So(u,n,r,i,g?r+=p*m/g:o):Ks(u,n,r,g?n+=d*m/g:i,o),g-=m,l=h}return a}const Ff=function t(e){function n(r,i,o,a,s){Py(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Ty);function Dy(){var t=Ff,e=!1,n=1,r=1,i=[0],o=er,a=er,s=er,u=er,c=er;function l(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(h),i=[0],e&&f.eachBefore(Sy),f}function h(f){var d=i[f.depth],p=f.x0+d,g=f.y0+d,m=f.x1-d,y=f.y1-d;m<p&&(p=m=(p+m)/2),y<g&&(g=y=(g+y)/2),f.x0=p,f.y0=g,f.x1=m,f.y1=y,f.children&&(d=i[f.depth+1]=o(f)/2,p+=c(f)-d,g+=a(f)-d,m-=s(f)-d,y-=u(f)-d,m<p&&(p=m=(p+m)/2),y<g&&(g=y=(g+y)/2),t(f,p,g,m,y))}return l.round=function(f){return arguments.length?(e=!!f,l):e},l.size=function(f){return arguments.length?(n=+f[0],r=+f[1],l):[n,r]},l.tile=function(f){return arguments.length?(t=dy(f),l):t},l.padding=function(f){return arguments.length?l.paddingInner(f).paddingOuter(f):l.paddingInner()},l.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:Qr(+f),l):o},l.paddingOuter=function(f){return arguments.length?l.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):l.paddingTop()},l.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:Qr(+f),l):a},l.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Qr(+f),l):s},l.paddingBottom=function(f){return arguments.length?(u=typeof f=="function"?f:Qr(+f),l):u},l.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:Qr(+f),l):c},l}function uD(t,e,n,r,i){var o=t.children,a,s=o.length,u,c=new Array(s+1);for(c[0]=u=a=0;a<s;++a)c[a+1]=u+=o[a].value;l(0,s,t.value,e,n,r,i);function l(h,f,d,p,g,m,y){if(h>=f-1){var v=o[h];v.x0=p,v.y0=g,v.x1=m,v.y1=y;return}for(var x=c[h],b=d/2+x,w=h+1,$=f-1;w<$;){var S=w+$>>>1;c[S]<b?w=S+1:$=S}b-c[w-1]<c[w]-b&&h+1<w&&--w;var _=c[w]-x,D=d-_;if(m-p>y-g){var L=d?(p*D+m*_)/d:m;l(h,w,_,p,g,L,y),l(w,f,D,L,g,m,y)}else{var P=d?(g*D+y*_)/d:y;l(h,w,_,p,g,m,P),l(w,f,D,p,P,m,y)}}}function cD(t,e,n,r,i){(t.depth&1?Ks:So)(t,e,n,r,i)}const lD=function t(e){function n(r,i,o,a,s){if((u=r._squarify)&&u.ratio===e)for(var u,c,l,h,f=-1,d,p=u.length,g=r.value;++f<p;){for(c=u[f],l=c.children,h=c.value=0,d=l.length;h<d;++h)c.value+=l[h].value;c.dice?So(c,i,o,a,g?o+=(s-o)*c.value/g:s):Ks(c,i,o,g?i+=(a-i)*c.value/g:a,s),g-=c.value}else r._squarify=u=Py(e,r,i,o,a,s),u.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Ty);function fD(t){for(var e=-1,n=t.length,r,i=t[n-1],o=0;++e<n;)r=i,i=t[e],o+=r[1]*i[0]-r[0]*i[1];return o/2}function hD(t){for(var e=-1,n=t.length,r=0,i=0,o,a=t[n-1],s,u=0;++e<n;)o=a,a=t[e],u+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return u*=3,[r/u,i/u]}function dD(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function pD(t,e){return t[0]-e[0]||t[1]-e[1]}function Ly(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&dD(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function gD(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(pD),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=Ly(r),a=Ly(i),s=a[0]===o[0],u=a[a.length-1]===o[o.length-1],c=[];for(e=o.length-1;e>=0;--e)c.push(t[r[o[e]][2]]);for(e=+s;e<a.length-u;++e)c.push(t[r[a[e]][2]]);return c}function mD(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],u,c,l=!1,h=0;h<n;++h)r=t[h],u=r[0],c=r[1],c>o!=s>o&&i<(a-u)*(o-c)/(s-c)+u&&(l=!l),a=u,s=c;return l}function yD(t){for(var e=-1,n=t.length,r=t[n-1],i,o,a=r[0],s=r[1],u=0;++e<n;)i=a,o=s,r=t[e],a=r[0],s=r[1],i-=a,o-=s,u+=Math.hypot(i,o);return u}const Nt=Math.random,bD=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return e()*i+r}}return n.source=t,n}(Nt),vD=function t(e){function n(r,i){return arguments.length<2&&(i=r,r=0),r=Math.floor(r),i=Math.floor(i)-r,function(){return Math.floor(e()*i+r)}}return n.source=t,n}(Nt),Gf=function t(e){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=e()*2-1,s=e()*2-1,a=o*o+s*s;while(!a||a>1);return r+i*s*Math.sqrt(-2*Math.log(a)/a)}}return n.source=t,n}(Nt),xD=function t(e){var n=Gf.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Nt),Ey=function t(e){function n(r){return(r=+r)<=0?()=>0:function(){for(var i=0,o=r;o>1;--o)i+=e();return i+o*e()}}return n.source=t,n}(Nt),_D=function t(e){var n=Ey.source(e);function r(i){if((i=+i)==0)return e;var o=n(i);return function(){return o()/i}}return r.source=t,r}(Nt),wD=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Nt),$D=function t(e){function n(r){if((r=+r)<0)throw new RangeError("invalid alpha");return r=1/-r,function(){return Math.pow(1-e(),r)}}return n.source=t,n}(Nt),SD=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+r)}}return n.source=t,n}(Nt),ky=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return r===0?()=>1/0:r===1?()=>1:(r=Math.log1p(-r),function(){return 1+Math.floor(Math.log1p(-e())/r)})}return n.source=t,n}(Nt),zf=function t(e){var n=Gf.source(e)();function r(i,o){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(o=o==null?1:+o,i===1)return()=>-Math.log1p(-e())*o;var a=(i<1?i+1:i)-1/3,s=1/(3*Math.sqrt(a)),u=i<1?()=>Math.pow(e(),1/i):()=>1;return function(){do{do var c=n(),l=1+s*c;while(l<=0);l*=l*l;var h=1-e()}while(h>=1-.0331*c*c*c*c&&Math.log(h)>=.5*c*c+a*(1-l+Math.log(l)));return a*l*u()*o}}return r.source=t,r}(Nt),Cy=function t(e){var n=zf.source(e);function r(i,o){var a=n(i),s=n(o);return function(){var u=a();return u===0?0:u/(u+s())}}return r.source=t,r}(Nt),Iy=function t(e){var n=ky.source(e),r=Cy.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,u=o,c=a;u*c>16&&u*(1-c)>16;){var l=Math.floor((u+1)*c),h=r(l,u-l+1)();h<=c?(s+=l,u-=l,c=(c-h)/(1-h)):(u=l-1,c/=h)}for(var f=c<.5,d=f?c:1-c,p=n(d),g=p(),m=0;g<=u;++m)g+=p();return s+(f?m:u-m)}}return i.source=t,i}(Nt),AD=function t(e){function n(r,i,o){var a;return(r=+r)==0?a=s=>-Math.log(s):(r=1/r,a=s=>Math.pow(s,r)),i=i==null?0:+i,o=o==null?1:+o,function(){return i+o*a(-Math.log1p(-e()))}}return n.source=t,n}(Nt),MD=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){return r+i*Math.tan(Math.PI*e())}}return n.source=t,n}(Nt),TD=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){var o=e();return r+i*Math.log(o/(1-o))}}return n.source=t,n}(Nt),PD=function t(e){var n=zf.source(e),r=Iy.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var u=Math.floor(.875*s),c=n(u)();if(c>s)return a+r(u-1,s/c)();a+=u,s-=c}for(var l=-Math.log1p(-e()),h=0;l<=s;++h)l-=Math.log1p(-e());return a+h}}return i.source=t,i}(Nt),DD=1664525,LD=1013904223,Ry=1/4294967296;function ED(t=Math.random()){let e=(0<=t&&t<1?t/Ry:Math.abs(t))|0;return()=>(e=DD*e+LD|0,Ry*(e>>>0))}function ge(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function en(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Of=Symbol("implicit");function Uf(){var t=new Ei,e=[],n=[],r=Of;function i(o){let a=t.get(o);if(a===void 0){if(r!==Of)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Ei;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Uf(e,n).unknown(r)},ge.apply(i,arguments),i}function Bf(){var t=Uf().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,l=.5;delete t.unknown;function h(){var f=e().length,d=i<r,p=d?i:r,g=d?r:i;o=(g-p)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),p+=(g-p-o*(f-u))*l,a=o*(1-u),s&&(p=Math.round(p),a=Math.round(a));var m=fn(f).map(function(y){return p+o*y});return n(d?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),h()):e()},t.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,h()):s},t.padding=function(f){return arguments.length?(u=Math.min(1,c=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(c=+f,h()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),h()):l},t.copy=function(){return Bf(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},ge.apply(h(),arguments)}function Ny(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ny(e())},t}function Yf(){return Ny(Bf.apply(null,arguments).paddingInner(1))}function kD(t){return function(){return t}}function Qs(t){return+t}var Fy=[0,1];function Jt(t){return t}function Hf(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:kD(isNaN(e)?NaN:.5)}function CD(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function ID(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Hf(i,r),o=n(a,o)):(r=Hf(r,i),o=n(o,a)),function(s){return o(r(s))}}function RD(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Hf(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=kn(t,s,1,r)-1;return o[u](i[u](s))}}function Ao(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Js(){var t=Fy,e=Fy,n=pn,r,i,o,a=Jt,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==Jt&&(a=CD(t[0],t[f-1])),s=f>2?RD:ID,u=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(u||(u=s(t.map(r),e,n)))(r(a(f)))}return h.invert=function(f){return a(i((c||(c=s(e,t.map(r),he)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,Qs),l()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),l()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=Ua,l()},h.clamp=function(f){return arguments.length?(a=f?!0:Jt,l()):a!==Jt},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,d){return r=f,i=d,l()}}function Wf(){return Js()(Jt,Jt)}function Gy(t,e,n,r){var i=ba(t,e,n),o;switch(r=Hr(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=V1(i,a))&&(r.precision=o),Nl(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Z1(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=j1(i))&&(r.precision=o-(r.type==="%")*2);break}}return eo(r)}function vn(t){var e=t.domain;return t.ticks=function(n){var r=e();return In(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return Gy(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,l=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);l-- >0;){if(c=Rn(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function qf(){var t=Wf();return t.copy=function(){return Ao(t,qf())},ge.apply(t,arguments),vn(t)}function zy(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Qs),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return zy(t).unknown(e)},t=arguments.length?Array.from(t,Qs):[0,1],vn(n)}function Oy(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),t[n]=e.floor(i),t[r]=e.ceil(o),t}function Uy(t){return Math.log(t)}function By(t){return Math.exp(t)}function ND(t){return-Math.log(-t)}function FD(t){return-Math.exp(-t)}function GD(t){return isFinite(t)?+("1e"+t):t<0?0:t}function zD(t){return t===10?GD:t===Math.E?Math.exp:e=>Math.pow(t,e)}function OD(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Yy(t){return(e,n)=>-t(-e,n)}function Xf(t){const e=t(Uy,By),n=e.domain;let r=10,i,o;function a(){return i=OD(r),o=zD(r),n()[0]<0?(i=Yy(i),o=Yy(o),t(ND,FD)):t(Uy,By),e}return e.base=function(s){return arguments.length?(r=+s,a()):r},e.domain=function(s){return arguments.length?(n(s),a()):n()},e.ticks=s=>{const u=n();let c=u[0],l=u[u.length-1];const h=l<c;h&&([c,l]=[l,c]);let f=i(c),d=i(l),p,g;const m=s==null?10:+s;let y=[];if(!(r%1)&&d-f<m){if(f=Math.floor(f),d=Math.ceil(d),c>0){for(;f<=d;++f)for(p=1;p<r;++p)if(g=f<0?p/o(-f):p*o(f),!(g<c)){if(g>l)break;y.push(g)}}else for(;f<=d;++f)for(p=r-1;p>=1;--p)if(g=f>0?p/o(-f):p*o(f),!(g<c)){if(g>l)break;y.push(g)}y.length*2<m&&(y=In(c,l,m))}else y=In(f,d,Math.min(d-f,m)).map(o);return h?y.reverse():y},e.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Hr(u)).precision==null&&(u.trim=!0),u=eo(u)),s===1/0)return u;const c=Math.max(1,r*s/e.ticks().length);return l=>{let h=l/o(Math.round(i(l)));return h*r<r-.5&&(h*=r),h<=c?u(l):""}},e.nice=()=>n(Oy(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function Hy(){const t=Xf(Js()).domain([1,10]);return t.copy=()=>Ao(t,Hy()).base(t.base()),ge.apply(t,arguments),t}function Wy(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function qy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function jf(t){var e=1,n=t(Wy(e),qy(e));return n.constant=function(r){return arguments.length?t(Wy(e=+r),qy(e)):e},vn(n)}function Xy(){var t=jf(Js());return t.copy=function(){return Ao(t,Xy()).constant(t.constant())},ge.apply(t,arguments)}function jy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function UD(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function BD(t){return t<0?-t*t:t*t}function Vf(t){var e=t(Jt,Jt),n=1;function r(){return n===1?t(Jt,Jt):n===.5?t(UD,BD):t(jy(n),jy(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},vn(e)}function tu(){var t=Vf(Js());return t.copy=function(){return Ao(t,tu()).exponent(t.exponent())},ge.apply(t,arguments),t}function YD(){return tu.apply(null,arguments).exponent(.5)}function Vy(t){return Math.sign(t)*t*t}function HD(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Zy(){var t=Wf(),e=[0,1],n=!1,r;function i(o){var a=HD(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(Vy(o))},i.domain=function(o){return arguments.length?(t.domain(o),i):t.domain()},i.range=function(o){return arguments.length?(t.range((e=Array.from(o,Qs)).map(Vy)),i):e.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(t.clamp(o),i):t.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Zy(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},ge.apply(i,arguments),vn(i)}function Ky(){var t=[],e=[],n=[],r;function i(){var a=0,s=Math.max(1,e.length);for(n=new Array(s-1);++a<s;)n[a-1]=Dg(t,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:e[kn(n,a)]}return o.invertExtent=function(a){var s=e.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:t[0],s<n.length?n[s]:t[t.length-1]]},o.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let s of a)s!=null&&!isNaN(s=+s)&&t.push(s);return t.sort(_t),i()},o.range=function(a){return arguments.length?(e=Array.from(a),i()):e.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return Ky().domain(t).range(e).unknown(r)},ge.apply(o,arguments)}function Qy(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[kn(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Qy().domain([t,e]).range(i).unknown(o)},ge.apply(vn(a),arguments)}function Jy(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[kn(t,o,0,r)]:n}return i.domain=function(o){return arguments.length?(t=Array.from(o),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(o){return arguments.length?(e=Array.from(o),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(o){var a=e.indexOf(o);return[t[a-1],t[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Jy().domain(t).range(e).unknown(n)},ge.apply(i,arguments)}const Zf=new Date,Kf=new Date;function Tt(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(e(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return u;let c;do u.push(c=new Date(+o)),e(o,s),t(o);while(c<o&&o<a);return u},i.filter=o=>Tt(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!o(a););else for(;--s>=0;)for(;e(a,1),!o(a););}),n&&(i.count=(o,a)=>(Zf.setTime(+o),Kf.setTime(+a),t(Zf),t(Kf),Math.floor(n(Zf,Kf))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Jr=Tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Jr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Tt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Jr);const tb=Jr.range,nn=1e3,me=nn*60,rn=me*60,on=rn*24,Qf=on*7,eb=on*30,Jf=on*365,an=Tt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*nn)},(t,e)=>(e-t)/nn,t=>t.getUTCSeconds()),nb=an.range,eu=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn)},(t,e)=>{t.setTime(+t+e*me)},(t,e)=>(e-t)/me,t=>t.getMinutes()),WD=eu.range,nu=Tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*me)},(t,e)=>(e-t)/me,t=>t.getUTCMinutes()),qD=nu.range,ru=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn-t.getMinutes()*me)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getHours()),XD=ru.range,iu=Tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getUTCHours()),jD=iu.range,ti=Tt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*me)/on,t=>t.getDate()-1),VD=ti.range,Mo=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>t.getUTCDate()-1),ZD=Mo.range,th=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>Math.floor(t/on)),KD=th.range;function nr(t){return Tt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*me)/Qf)}const ei=nr(0),To=nr(1),rb=nr(2),ib=nr(3),rr=nr(4),ob=nr(5),ab=nr(6),sb=ei.range,QD=To.range,JD=rb.range,tL=ib.range,eL=rr.range,nL=ob.range,rL=ab.range;function ir(t){return Tt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Qf)}const ni=ir(0),Po=ir(1),ub=ir(2),cb=ir(3),or=ir(4),lb=ir(5),fb=ir(6),hb=ni.range,iL=Po.range,oL=ub.range,aL=cb.range,sL=or.range,uL=lb.range,cL=fb.range,ou=Tt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),lL=ou.range,au=Tt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),fL=au.range,Be=Tt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Be.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const hL=Be.range,Ye=Tt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Ye.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const dL=Ye.range;function db(t,e,n,r,i,o){const a=[[an,1,nn],[an,5,5*nn],[an,15,15*nn],[an,30,30*nn],[o,1,me],[o,5,5*me],[o,15,15*me],[o,30,30*me],[i,1,rn],[i,3,3*rn],[i,6,6*rn],[i,12,12*rn],[r,1,on],[r,2,2*on],[n,1,Qf],[e,1,eb],[e,3,3*eb],[t,1,Jf]];function s(c,l,h){const f=l<c;f&&([c,l]=[l,c]);const d=h&&typeof h.range=="function"?h:u(c,l,h),p=d?d.range(c,+l+1):[];return f?p.reverse():p}function u(c,l,h){const f=Math.abs(l-c)/h,d=pa(([,,m])=>m).right(a,f);if(d===a.length)return t.every(ba(c/Jf,l/Jf,h));if(d===0)return Jr.every(Math.max(ba(c,l,h),1));const[p,g]=a[f/a[d-1][2]<a[d][2]/f?d-1:d];return p.every(g)}return[s,u]}const[pb,gb]=db(Ye,au,ni,th,iu,nu),[mb,yb]=db(Be,ou,ei,ti,ru,eu);function eh(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function nh(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Do(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function bb(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,c=Lo(i),l=Eo(i),h=Lo(o),f=Eo(o),d=Lo(a),p=Eo(a),g=Lo(s),m=Eo(s),y=Lo(u),v=Eo(u),x={a:R,A:G,b:A,B:N,c:null,d:Sb,e:Sb,f:NL,g:qL,G:jL,H:CL,I:IL,j:RL,L:Ab,m:FL,M:GL,p:z,q:E,Q:Eb,s:kb,S:zL,u:OL,U:UL,V:BL,w:YL,W:HL,x:null,X:null,y:WL,Y:XL,Z:VL,"%":Lb},b={a:Y,A:j,b:H,B:X,c:null,d:Tb,e:Tb,f:JL,g:cE,G:fE,H:ZL,I:KL,j:QL,L:Pb,m:tE,M:eE,p:Q,q:ct,Q:Eb,s:kb,S:nE,u:rE,U:iE,V:oE,w:aE,W:sE,x:null,X:null,y:uE,Y:lE,Z:hE,"%":Lb},w={a:L,A:P,b:I,B:k,c:T,d:wb,e:wb,f:DL,g:_b,G:xb,H:$b,I:$b,j:AL,L:PL,m:SL,M:ML,p:D,q:$L,Q:EL,s:kL,S:TL,u:bL,U:vL,V:xL,w:yL,W:_L,x:C,X:M,y:_b,Y:xb,Z:wL,"%":LL};x.x=$(n,x),x.X=$(r,x),x.c=$(e,x),b.x=$(n,b),b.X=$(r,b),b.c=$(e,b);function $(U,tt){return function(st){var q=[],xt=-1,gt=0,Ft=U.length,te,it,Mt;for(st instanceof Date||(st=new Date(+st));++xt<Ft;)U.charCodeAt(xt)===37&&(q.push(U.slice(gt,xt)),(it=vb[te=U.charAt(++xt)])!=null?te=U.charAt(++xt):it=te==="e"?" ":"0",(Mt=tt[te])&&(te=Mt(st,it)),q.push(te),gt=xt+1);return q.push(U.slice(gt,xt)),q.join("")}}function S(U,tt){return function(st){var q=Do(1900,void 0,1),xt=_(q,U,st+="",0),gt,Ft;if(xt!=st.length)return null;if("Q"in q)return new Date(q.Q);if("s"in q)return new Date(q.s*1e3+("L"in q?q.L:0));if(tt&&!("Z"in q)&&(q.Z=0),"p"in q&&(q.H=q.H%12+q.p*12),q.m===void 0&&(q.m="q"in q?q.q:0),"V"in q){if(q.V<1||q.V>53)return null;"w"in q||(q.w=1),"Z"in q?(gt=nh(Do(q.y,0,1)),Ft=gt.getUTCDay(),gt=Ft>4||Ft===0?Po.ceil(gt):Po(gt),gt=Mo.offset(gt,(q.V-1)*7),q.y=gt.getUTCFullYear(),q.m=gt.getUTCMonth(),q.d=gt.getUTCDate()+(q.w+6)%7):(gt=eh(Do(q.y,0,1)),Ft=gt.getDay(),gt=Ft>4||Ft===0?To.ceil(gt):To(gt),gt=ti.offset(gt,(q.V-1)*7),q.y=gt.getFullYear(),q.m=gt.getMonth(),q.d=gt.getDate()+(q.w+6)%7)}else("W"in q||"U"in q)&&("w"in q||(q.w="u"in q?q.u%7:"W"in q?1:0),Ft="Z"in q?nh(Do(q.y,0,1)).getUTCDay():eh(Do(q.y,0,1)).getDay(),q.m=0,q.d="W"in q?(q.w+6)%7+q.W*7-(Ft+5)%7:q.w+q.U*7-(Ft+6)%7);return"Z"in q?(q.H+=q.Z/100|0,q.M+=q.Z%100,nh(q)):eh(q)}}function _(U,tt,st,q){for(var xt=0,gt=tt.length,Ft=st.length,te,it;xt<gt;){if(q>=Ft)return-1;if(te=tt.charCodeAt(xt++),te===37){if(te=tt.charAt(xt++),it=w[te in vb?tt.charAt(xt++):te],!it||(q=it(U,st,q))<0)return-1}else if(te!=st.charCodeAt(q++))return-1}return q}function D(U,tt,st){var q=c.exec(tt.slice(st));return q?(U.p=l.get(q[0].toLowerCase()),st+q[0].length):-1}function L(U,tt,st){var q=d.exec(tt.slice(st));return q?(U.w=p.get(q[0].toLowerCase()),st+q[0].length):-1}function P(U,tt,st){var q=h.exec(tt.slice(st));return q?(U.w=f.get(q[0].toLowerCase()),st+q[0].length):-1}function I(U,tt,st){var q=y.exec(tt.slice(st));return q?(U.m=v.get(q[0].toLowerCase()),st+q[0].length):-1}function k(U,tt,st){var q=g.exec(tt.slice(st));return q?(U.m=m.get(q[0].toLowerCase()),st+q[0].length):-1}function T(U,tt,st){return _(U,e,tt,st)}function C(U,tt,st){return _(U,n,tt,st)}function M(U,tt,st){return _(U,r,tt,st)}function R(U){return a[U.getDay()]}function G(U){return o[U.getDay()]}function A(U){return u[U.getMonth()]}function N(U){return s[U.getMonth()]}function z(U){return i[+(U.getHours()>=12)]}function E(U){return 1+~~(U.getMonth()/3)}function Y(U){return a[U.getUTCDay()]}function j(U){return o[U.getUTCDay()]}function H(U){return u[U.getUTCMonth()]}function X(U){return s[U.getUTCMonth()]}function Q(U){return i[+(U.getUTCHours()>=12)]}function ct(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var tt=$(U+="",x);return tt.toString=function(){return U},tt},parse:function(U){var tt=S(U+="",!1);return tt.toString=function(){return U},tt},utcFormat:function(U){var tt=$(U+="",b);return tt.toString=function(){return U},tt},utcParse:function(U){var tt=S(U+="",!0);return tt.toString=function(){return U},tt}}}var vb={"-":"",_:" ",0:"0"},Rt=/^\s*\d+/,pL=/^%/,gL=/[\\^$*+?|[\]().{}]/g;function pt(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function mL(t){return t.replace(gL,"\\$&")}function Lo(t){return new RegExp("^(?:"+t.map(mL).join("|")+")","i")}function Eo(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function yL(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function bL(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function vL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function xL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function _L(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function xb(t,e,n){var r=Rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function _b(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function wL(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function $L(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function SL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function wb(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function AL(t,e,n){var r=Rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function $b(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ML(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function TL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function PL(t,e,n){var r=Rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function DL(t,e,n){var r=Rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function LL(t,e,n){var r=pL.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function EL(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function kL(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Sb(t,e){return pt(t.getDate(),e,2)}function CL(t,e){return pt(t.getHours(),e,2)}function IL(t,e){return pt(t.getHours()%12||12,e,2)}function RL(t,e){return pt(1+ti.count(Be(t),t),e,3)}function Ab(t,e){return pt(t.getMilliseconds(),e,3)}function NL(t,e){return Ab(t,e)+"000"}function FL(t,e){return pt(t.getMonth()+1,e,2)}function GL(t,e){return pt(t.getMinutes(),e,2)}function zL(t,e){return pt(t.getSeconds(),e,2)}function OL(t){var e=t.getDay();return e===0?7:e}function UL(t,e){return pt(ei.count(Be(t)-1,t),e,2)}function Mb(t){var e=t.getDay();return e>=4||e===0?rr(t):rr.ceil(t)}function BL(t,e){return t=Mb(t),pt(rr.count(Be(t),t)+(Be(t).getDay()===4),e,2)}function YL(t){return t.getDay()}function HL(t,e){return pt(To.count(Be(t)-1,t),e,2)}function WL(t,e){return pt(t.getFullYear()%100,e,2)}function qL(t,e){return t=Mb(t),pt(t.getFullYear()%100,e,2)}function XL(t,e){return pt(t.getFullYear()%1e4,e,4)}function jL(t,e){var n=t.getDay();return t=n>=4||n===0?rr(t):rr.ceil(t),pt(t.getFullYear()%1e4,e,4)}function VL(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+pt(e/60|0,"0",2)+pt(e%60,"0",2)}function Tb(t,e){return pt(t.getUTCDate(),e,2)}function ZL(t,e){return pt(t.getUTCHours(),e,2)}function KL(t,e){return pt(t.getUTCHours()%12||12,e,2)}function QL(t,e){return pt(1+Mo.count(Ye(t),t),e,3)}function Pb(t,e){return pt(t.getUTCMilliseconds(),e,3)}function JL(t,e){return Pb(t,e)+"000"}function tE(t,e){return pt(t.getUTCMonth()+1,e,2)}function eE(t,e){return pt(t.getUTCMinutes(),e,2)}function nE(t,e){return pt(t.getUTCSeconds(),e,2)}function rE(t){var e=t.getUTCDay();return e===0?7:e}function iE(t,e){return pt(ni.count(Ye(t)-1,t),e,2)}function Db(t){var e=t.getUTCDay();return e>=4||e===0?or(t):or.ceil(t)}function oE(t,e){return t=Db(t),pt(or.count(Ye(t),t)+(Ye(t).getUTCDay()===4),e,2)}function aE(t){return t.getUTCDay()}function sE(t,e){return pt(Po.count(Ye(t)-1,t),e,2)}function uE(t,e){return pt(t.getUTCFullYear()%100,e,2)}function cE(t,e){return t=Db(t),pt(t.getUTCFullYear()%100,e,2)}function lE(t,e){return pt(t.getUTCFullYear()%1e4,e,4)}function fE(t,e){var n=t.getUTCDay();return t=n>=4||n===0?or(t):or.ceil(t),pt(t.getUTCFullYear()%1e4,e,4)}function hE(){return"+0000"}function Lb(){return"%"}function Eb(t){return+t}function kb(t){return Math.floor(+t/1e3)}var ri,rh,Cb,su,ih;Ib({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ib(t){return ri=bb(t),rh=ri.format,Cb=ri.parse,su=ri.utcFormat,ih=ri.utcParse,ri}var Rb="%Y-%m-%dT%H:%M:%S.%LZ";function dE(t){return t.toISOString()}var pE=Date.prototype.toISOString?dE:su(Rb);const gE=pE;function mE(t){var e=new Date(t);return isNaN(e)?null:e}var yE=+new Date("2000-01-01T00:00:00.000Z")?mE:ih(Rb);const bE=yE;function vE(t){return new Date(t)}function xE(t){return t instanceof Date?+t:+new Date(+t)}function oh(t,e,n,r,i,o,a,s,u,c){var l=Wf(),h=l.invert,f=l.domain,d=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),v=c("%b %d"),x=c("%B"),b=c("%Y");function w($){return(u($)<$?d:s($)<$?p:a($)<$?g:o($)<$?m:r($)<$?i($)<$?y:v:n($)<$?x:b)($)}return l.invert=function($){return new Date(h($))},l.domain=function($){return arguments.length?f(Array.from($,xE)):f().map(vE)},l.ticks=function($){var S=f();return t(S[0],S[S.length-1],$??10)},l.tickFormat=function($,S){return S==null?w:c(S)},l.nice=function($){var S=f();return(!$||typeof $.range!="function")&&($=e(S[0],S[S.length-1],$??10)),$?f(Oy(S,$)):l},l.copy=function(){return Ao(l,oh(t,e,n,r,i,o,a,s,u,c))},l}function _E(){return ge.apply(oh(mb,yb,Be,ou,ei,ti,ru,eu,an,rh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function wE(){return ge.apply(oh(pb,gb,Ye,au,ni,Mo,iu,nu,an,su).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function uu(){var t=0,e=1,n,r,i,o,a=Jt,s=!1,u;function c(h){return h==null||isNaN(h=+h)?u:a(i===0?.5:(h=(o(h)-n)*i,s?Math.max(0,Math.min(1,h)):h))}c.domain=function(h){return arguments.length?([t,e]=h,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),c):[t,e]},c.clamp=function(h){return arguments.length?(s=!!h,c):s},c.interpolator=function(h){return arguments.length?(a=h,c):a};function l(h){return function(f){var d,p;return arguments.length?([d,p]=f,a=h(d,p),c):[a(0),a(1)]}}return c.range=l(pn),c.rangeRound=l(Ua),c.unknown=function(h){return arguments.length?(u=h,c):u},function(h){return o=h,n=h(t),r=h(e),i=n===r?0:1/(r-n),c}}function xn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Nb(){var t=vn(uu()(Jt));return t.copy=function(){return xn(t,Nb())},en.apply(t,arguments)}function Fb(){var t=Xf(uu()).domain([1,10]);return t.copy=function(){return xn(t,Fb()).base(t.base())},en.apply(t,arguments)}function Gb(){var t=jf(uu());return t.copy=function(){return xn(t,Gb()).constant(t.constant())},en.apply(t,arguments)}function ah(){var t=Vf(uu());return t.copy=function(){return xn(t,ah()).exponent(t.exponent())},en.apply(t,arguments)}function $E(){return ah.apply(null,arguments).exponent(.5)}function zb(){var t=[],e=Jt;function n(r){if(r!=null&&!isNaN(r=+r))return e((kn(t,r,1)-1)/(t.length-1))}return n.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let i of r)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(_t),n},n.interpolator=function(r){return arguments.length?(e=r,n):e},n.range=function(){return t.map((r,i)=>e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>Ii(t,o/r))},n.copy=function(){return zb(e).domain(t)},en.apply(n,arguments)}function cu(){var t=0,e=.5,n=1,r=1,i,o,a,s,u,c=Jt,l,h=!1,f;function d(g){return isNaN(g=+g)?f:(g=.5+((g=+l(g))-o)*(r*g<r*o?s:u),c(h?Math.max(0,Math.min(1,g)):g))}d.domain=function(g){return arguments.length?([t,e,n]=g,i=l(t=+t),o=l(e=+e),a=l(n=+n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,d):[t,e,n]},d.clamp=function(g){return arguments.length?(h=!!g,d):h},d.interpolator=function(g){return arguments.length?(c=g,d):c};function p(g){return function(m){var y,v,x;return arguments.length?([y,v,x]=m,c=O0(g,[y,v,x]),d):[c(0),c(.5),c(1)]}}return d.range=p(pn),d.rangeRound=p(Ua),d.unknown=function(g){return arguments.length?(f=g,d):f},function(g){return l=g,i=g(t),o=g(e),a=g(n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,d}}function Ob(){var t=vn(cu()(Jt));return t.copy=function(){return xn(t,Ob())},en.apply(t,arguments)}function Ub(){var t=Xf(cu()).domain([.1,1,10]);return t.copy=function(){return xn(t,Ub()).base(t.base())},en.apply(t,arguments)}function Bb(){var t=jf(cu());return t.copy=function(){return xn(t,Bb()).constant(t.constant())},en.apply(t,arguments)}function sh(){var t=Vf(cu());return t.copy=function(){return xn(t,sh()).exponent(t.exponent())},en.apply(t,arguments)}function SE(){return sh.apply(null,arguments).exponent(.5)}function ut(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const AE=ut("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ME=ut("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),TE=ut("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),PE=ut("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),DE=ut("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),LE=ut("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),EE=ut("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),kE=ut("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),CE=ut("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),IE=ut("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),RE=ut("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),bt=t=>A0(t[t.length-1]);var Yb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ut);const NE=bt(Yb);var Hb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ut);const FE=bt(Hb);var Wb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ut);const GE=bt(Wb);var qb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ut);const zE=bt(qb);var Xb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ut);const OE=bt(Xb);var jb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ut);const UE=bt(jb);var Vb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ut);const BE=bt(Vb);var Zb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ut);const YE=bt(Zb);var Kb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ut);const HE=bt(Kb);var Qb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ut);const WE=bt(Qb);var Jb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ut);const qE=bt(Jb);var tv=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ut);const XE=bt(tv);var ev=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ut);const jE=bt(ev);var nv=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ut);const VE=bt(nv);var rv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ut);const ZE=bt(rv);var iv=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ut);const KE=bt(iv);var ov=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ut);const QE=bt(ov);var av=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ut);const JE=bt(av);var sv=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ut);const tk=bt(sv);var uv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ut);const ek=bt(uv);var cv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ut);const nk=bt(cv);var lv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ut);const rk=bt(lv);var fv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ut);const ik=bt(fv);var hv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ut);const ok=bt(hv);var dv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ut);const ak=bt(dv);var pv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ut);const sk=bt(pv);var gv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ut);const uk=bt(gv);function ck(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-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const lk=Ya(Me(300,.5,0),Me(-240,.5,1));var fk=Ya(Me(-100,.75,.35),Me(80,1.5,.8)),hk=Ya(Me(260,.75,.35),Me(80,1.5,.8)),lu=Me();function dk(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return lu.h=360*t-100,lu.s=1.5-1.5*e,lu.l=.8-.9*e,lu+""}var fu=kr(),pk=Math.PI/3,gk=Math.PI*2/3;function mk(t){var e;return t=(.5-t)*Math.PI,fu.r=255*(e=Math.sin(t))*e,fu.g=255*(e=Math.sin(t+pk))*e,fu.b=255*(e=Math.sin(t+gk))*e,fu+""}function yk(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-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function hu(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const bk=hu(ut("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var vk=hu(ut("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),xk=hu(ut("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),_k=hu(ut("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function at(t){return function(){return t}}const mv=Math.abs,Ut=Math.atan2,sn=Math.cos,wk=Math.max,ii=Math.min,ie=Math.sin,vt=Math.sqrt,Bt=1e-12,_n=Math.PI,du=_n/2,wn=2*_n;function $k(t){return t>1?0:t<-1?_n:Math.acos(t)}function yv(t){return t>=1?du:t<=-1?-du:Math.asin(t)}function ko(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new Ki(e)}function Sk(t){return t.innerRadius}function Ak(t){return t.outerRadius}function Mk(t){return t.startAngle}function Tk(t){return t.endAngle}function Pk(t){return t&&t.padAngle}function Dk(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,h=s-o,f=h*u-l*c;if(!(f*f<Bt))return f=(l*(e-o)-h*(t-i))/f,[t+f*u,e+f*c]}function pu(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/vt(s*s+u*u),l=c*u,h=-c*s,f=t+l,d=e+h,p=n+l,g=r+h,m=(f+p)/2,y=(d+g)/2,v=p-f,x=g-d,b=v*v+x*x,w=i-o,$=f*g-p*d,S=(x<0?-1:1)*vt(wk(0,w*w*b-$*$)),_=($*x-v*S)/b,D=(-$*v-x*S)/b,L=($*x+v*S)/b,P=(-$*v+x*S)/b,I=_-m,k=D-y,T=L-m,C=P-y;return I*I+k*k>T*T+C*C&&(_=L,D=P),{cx:_,cy:D,x01:-l,y01:-h,x11:_*(i/w-1),y11:D*(i/w-1)}}function bv(){var t=Sk,e=Ak,n=at(0),r=null,i=Mk,o=Tk,a=Pk,s=null,u=ko(c);function c(){var l,h,f=+t.apply(this,arguments),d=+e.apply(this,arguments),p=i.apply(this,arguments)-du,g=o.apply(this,arguments)-du,m=mv(g-p),y=g>p;if(s||(s=l=u()),d<f&&(h=d,d=f,f=h),!(d>Bt))s.moveTo(0,0);else if(m>wn-Bt)s.moveTo(d*sn(p),d*ie(p)),s.arc(0,0,d,p,g,!y),f>Bt&&(s.moveTo(f*sn(g),f*ie(g)),s.arc(0,0,f,g,p,y));else{var v=p,x=g,b=p,w=g,$=m,S=m,_=a.apply(this,arguments)/2,D=_>Bt&&(r?+r.apply(this,arguments):vt(f*f+d*d)),L=ii(mv(d-f)/2,+n.apply(this,arguments)),P=L,I=L,k,T;if(D>Bt){var C=yv(D/f*ie(_)),M=yv(D/d*ie(_));($-=C*2)>Bt?(C*=y?1:-1,b+=C,w-=C):($=0,b=w=(p+g)/2),(S-=M*2)>Bt?(M*=y?1:-1,v+=M,x-=M):(S=0,v=x=(p+g)/2)}var R=d*sn(v),G=d*ie(v),A=f*sn(w),N=f*ie(w);if(L>Bt){var z=d*sn(x),E=d*ie(x),Y=f*sn(b),j=f*ie(b),H;if(m<_n)if(H=Dk(R,G,Y,j,z,E,A,N)){var X=R-H[0],Q=G-H[1],ct=z-H[0],U=E-H[1],tt=1/ie($k((X*ct+Q*U)/(vt(X*X+Q*Q)*vt(ct*ct+U*U)))/2),st=vt(H[0]*H[0]+H[1]*H[1]);P=ii(L,(f-st)/(tt-1)),I=ii(L,(d-st)/(tt+1))}else P=I=0}S>Bt?I>Bt?(k=pu(Y,j,R,G,d,I,y),T=pu(z,E,A,N,d,I,y),s.moveTo(k.cx+k.x01,k.cy+k.y01),I<L?s.arc(k.cx,k.cy,I,Ut(k.y01,k.x01),Ut(T.y01,T.x01),!y):(s.arc(k.cx,k.cy,I,Ut(k.y01,k.x01),Ut(k.y11,k.x11),!y),s.arc(0,0,d,Ut(k.cy+k.y11,k.cx+k.x11),Ut(T.cy+T.y11,T.cx+T.x11),!y),s.arc(T.cx,T.cy,I,Ut(T.y11,T.x11),Ut(T.y01,T.x01),!y))):(s.moveTo(R,G),s.arc(0,0,d,v,x,!y)):s.moveTo(R,G),!(f>Bt)||!($>Bt)?s.lineTo(A,N):P>Bt?(k=pu(A,N,z,E,f,-P,y),T=pu(R,G,Y,j,f,-P,y),s.lineTo(k.cx+k.x01,k.cy+k.y01),P<L?s.arc(k.cx,k.cy,P,Ut(k.y01,k.x01),Ut(T.y01,T.x01),!y):(s.arc(k.cx,k.cy,P,Ut(k.y01,k.x01),Ut(k.y11,k.x11),!y),s.arc(0,0,f,Ut(k.cy+k.y11,k.cx+k.x11),Ut(T.cy+T.y11,T.cx+T.x11),y),s.arc(T.cx,T.cy,P,Ut(T.y11,T.x11),Ut(T.y01,T.x01),!y))):s.arc(0,0,f,w,b,y)}if(s.closePath(),l)return s=null,l+""||null}return c.centroid=function(){var l=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-_n/2;return[sn(h)*l,ie(h)*l]},c.innerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:at(+l),c):t},c.outerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:at(+l),c):e},c.cornerRadius=function(l){return arguments.length?(n=typeof l=="function"?l:at(+l),c):n},c.padRadius=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:at(+l),c):r},c.startAngle=function(l){return arguments.length?(i=typeof l=="function"?l:at(+l),c):i},c.endAngle=function(l){return arguments.length?(o=typeof l=="function"?l:at(+l),c):o},c.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:at(+l),c):a},c.context=function(l){return arguments.length?(s=l??null,c):s},c}var Lk=Array.prototype.slice;function gu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function vv(t){this._context=t}vv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function mu(t){return new vv(t)}function uh(t){return t[0]}function ch(t){return t[1]}function yu(t,e){var n=at(!0),r=null,i=mu,o=null,a=ko(s);t=typeof t=="function"?t:t===void 0?uh:at(t),e=typeof e=="function"?e:e===void 0?ch:at(e);function s(u){var c,l=(u=gu(u)).length,h,f=!1,d;for(r==null&&(o=i(d=a())),c=0;c<=l;++c)!(c<l&&n(h=u[c],c,u))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(h,c,u),+e(h,c,u));if(d)return o=null,d+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:at(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:at(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:at(!!u),s):n},s.curve=function(u){return arguments.length?(i=u,r!=null&&(o=i(r)),s):i},s.context=function(u){return arguments.length?(u==null?r=o=null:o=i(r=u),s):r},s}function lh(t,e,n){var r=null,i=at(!0),o=null,a=mu,s=null,u=ko(c);t=typeof t=="function"?t:t===void 0?uh:at(+t),e=typeof e=="function"?e:at(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?ch:at(+n);function c(h){var f,d,p,g=(h=gu(h)).length,m,y=!1,v,x=new Array(g),b=new Array(g);for(o==null&&(s=a(v=u())),f=0;f<=g;++f){if(!(f<g&&i(m=h[f],f,h))===y)if(y=!y)d=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=f-1;p>=d;--p)s.point(x[p],b[p]);s.lineEnd(),s.areaEnd()}y&&(x[f]=+t(m,f,h),b[f]=+e(m,f,h),s.point(r?+r(m,f,h):x[f],n?+n(m,f,h):b[f]))}if(v)return s=null,v+""||null}function l(){return yu().defined(i).curve(a).context(o)}return c.x=function(h){return arguments.length?(t=typeof h=="function"?h:at(+h),r=null,c):t},c.x0=function(h){return arguments.length?(t=typeof h=="function"?h:at(+h),c):t},c.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:at(+h),c):r},c.y=function(h){return arguments.length?(e=typeof h=="function"?h:at(+h),n=null,c):e},c.y0=function(h){return arguments.length?(e=typeof h=="function"?h:at(+h),c):e},c.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:at(+h),c):n},c.lineX0=c.lineY0=function(){return l().x(t).y(e)},c.lineY1=function(){return l().x(t).y(n)},c.lineX1=function(){return l().x(r).y(e)},c.defined=function(h){return arguments.length?(i=typeof h=="function"?h:at(!!h),c):i},c.curve=function(h){return arguments.length?(a=h,o!=null&&(s=a(o)),c):a},c.context=function(h){return arguments.length?(h==null?o=s=null:s=a(o=h),c):o},c}function Ek(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function kk(t){return t}function xv(){var t=kk,e=Ek,n=null,r=at(0),i=at(wn),o=at(0);function a(s){var u,c=(s=gu(s)).length,l,h,f=0,d=new Array(c),p=new Array(c),g=+r.apply(this,arguments),m=Math.min(wn,Math.max(-wn,i.apply(this,arguments)-g)),y,v=Math.min(Math.abs(m)/c,o.apply(this,arguments)),x=v*(m<0?-1:1),b;for(u=0;u<c;++u)(b=p[d[u]=u]=+t(s[u],u,s))>0&&(f+=b);for(e!=null?d.sort(function(w,$){return e(p[w],p[$])}):n!=null&&d.sort(function(w,$){return n(s[w],s[$])}),u=0,h=f?(m-c*x)/f:0;u<c;++u,g=y)l=d[u],b=p[l],y=g+(b>0?b*h:0)+x,p[l]={data:s[l],index:u,value:b,startAngle:g,endAngle:y,padAngle:v};return p}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:at(+s),a):t},a.sortValues=function(s){return arguments.length?(e=s,n=null,a):e},a.sort=function(s){return arguments.length?(n=s,e=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:at(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:at(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:at(+s),a):o},a}var _v=fh(mu);function wv(t){this._curve=t}wv.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};function fh(t){function e(n){return new wv(t(n))}return e._curve=t,e}function Co(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(fh(n)):e()._curve},t}function $v(){return Co(yu().curve(_v))}function Sv(){var t=lh().curve(_v),e=t.curve,n=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 Co(n())},delete t.lineX0,t.lineEndAngle=function(){return Co(r())},delete t.lineX1,t.lineInnerRadius=function(){return Co(i())},delete t.lineY0,t.lineOuterRadius=function(){return Co(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(fh(a)):e()._curve},t}function Io(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class Av{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}class Ck{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,n){if(e=+e,n=+n,this._point===0)this._point=1;else{const r=Io(this._x0,this._y0),i=Io(this._x0,this._y0=(this._y0+n)/2),o=Io(e,this._y0),a=Io(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function Mv(t){return new Av(t,!0)}function Tv(t){return new Av(t,!1)}function Ik(t){return new Ck(t)}function Rk(t){return t.source}function Nk(t){return t.target}function bu(t){let e=Rk,n=Nk,r=uh,i=ch,o=null,a=null,s=ko(u);function u(){let c;const l=Lk.call(arguments),h=e.apply(this,l),f=n.apply(this,l);if(o==null&&(a=t(c=s())),a.lineStart(),l[0]=h,a.point(+r.apply(this,l),+i.apply(this,l)),l[0]=f,a.point(+r.apply(this,l),+i.apply(this,l)),a.lineEnd(),c)return a=null,c+""||null}return u.source=function(c){return arguments.length?(e=c,u):e},u.target=function(c){return arguments.length?(n=c,u):n},u.x=function(c){return arguments.length?(r=typeof c=="function"?c:at(+c),u):r},u.y=function(c){return arguments.length?(i=typeof c=="function"?c:at(+c),u):i},u.context=function(c){return arguments.length?(c==null?o=a=null:a=t(o=c),u):o},u}function Fk(){return bu(Mv)}function Gk(){return bu(Tv)}function zk(){const t=bu(Ik);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const Ok=vt(3),Pv={draw(t,e){const n=vt(e+ii(e/28,.75))*.59436,r=n/2,i=r*Ok;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},vu={draw(t,e){const n=vt(e/_n);t.moveTo(n,0),t.arc(0,0,n,0,wn)}},Dv={draw(t,e){const n=vt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},Lv=vt(1/3),Uk=Lv*2,Ev={draw(t,e){const n=vt(e/Uk),r=n*Lv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},kv={draw(t,e){const n=vt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},Cv={draw(t,e){const n=vt(e-ii(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},Iv={draw(t,e){const n=vt(e),r=-n/2;t.rect(r,r,n,n)}},Rv={draw(t,e){const n=vt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},Bk=.8908130915292852,Nv=ie(_n/10)/ie(7*_n/10),Yk=ie(wn/10)*Nv,Hk=-sn(wn/10)*Nv,Fv={draw(t,e){const n=vt(e*Bk),r=Yk*n,i=Hk*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=wn*o/5,s=sn(a),u=ie(a);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},hh=vt(3),Gv={draw(t,e){const n=-vt(e/(hh*3));t.moveTo(0,n*2),t.lineTo(-hh*n,-n),t.lineTo(hh*n,-n),t.closePath()}},Wk=vt(3),zv={draw(t,e){const n=vt(e)*.6824,r=n/2,i=n*Wk/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},ye=-.5,be=vt(3)/2,dh=1/vt(12),qk=(dh/2+1)*3,Ov={draw(t,e){const n=vt(e/qk),r=n/2,i=n*dh,o=r,a=n*dh+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(ye*r-be*i,be*r+ye*i),t.lineTo(ye*o-be*a,be*o+ye*a),t.lineTo(ye*s-be*u,be*s+ye*u),t.lineTo(ye*r+be*i,ye*i-be*r),t.lineTo(ye*o+be*a,ye*a-be*o),t.lineTo(ye*s+be*u,ye*u-be*s),t.closePath()}},ph={draw(t,e){const n=vt(e-ii(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},Uv=[vu,Dv,Ev,Iv,Fv,Gv,Ov],Xk=[vu,Cv,ph,zv,Pv,Rv,kv];function jk(t,e){let n=null,r=ko(i);t=typeof t=="function"?t:at(t||vu),e=typeof e=="function"?e:at(e===void 0?64:+e);function i(){let o;if(n||(n=o=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(t=typeof o=="function"?o:at(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:at(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function $n(){}function xu(t,e,n){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+e)/6,(t._y0+4*t._y1+n)/6)}function _u(t){this._context=t}_u.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:xu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:xu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Vk(t){return new _u(t)}function Bv(t){this._context=t}Bv.prototype={areaStart:$n,areaEnd:$n,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:xu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Zk(t){return new Bv(t)}function Yv(t){this._context=t}Yv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:xu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Kk(t){return new Yv(t)}function Hv(t,e){this._basis=new _u(t),this._beta=e}Hv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r=t[0],i=e[0],o=t[n]-r,a=e[n]-i,s=-1,u;++s<=n;)u=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(r+u*o),this._beta*e[s]+(1-this._beta)*(i+u*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Qk=function t(e){function n(r){return e===1?new _u(r):new Hv(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function wu(t,e,n){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-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function gh(t,e){this._context=t,this._k=(1-e)/6}gh.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:wu(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:wu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Jk=function t(e){function n(r){return new gh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function mh(t,e){this._context=t,this._k=(1-e)/6}mh.prototype={areaStart:$n,areaEnd:$n,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:wu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const tC=function t(e){function n(r){return new mh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function yh(t,e){this._context=t,this._k=(1-e)/6}yh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,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:wu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const eC=function t(e){function n(r){return new yh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function bh(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Bt){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Bt){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/l,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Wv(t,e){this._context=t,this._alpha=e}Wv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:bh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const nC=function t(e){function n(r){return e?new Wv(r,e):new gh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function qv(t,e){this._context=t,this._alpha=e}qv.prototype={areaStart:$n,areaEnd:$n,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:bh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const rC=function t(e){function n(r){return e?new qv(r,e):new mh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Xv(t,e){this._context=t,this._alpha=e}Xv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+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:bh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const iC=function t(e){function n(r){return e?new Xv(r,e):new yh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function jv(t){this._context=t}jv.prototype={areaStart:$n,areaEnd:$n,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function oC(t){return new jv(t)}function Vv(t){return t<0?-1:1}function Zv(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Vv(o)+Vv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Kv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function vh(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function $u(t){this._context=t}$u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:vh(this,this._t0,Kv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,vh(this,Kv(this,n=Zv(this,t,e)),n);break;default:vh(this,this._t0,n=Zv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Qv(t){this._context=new Jv(t)}(Qv.prototype=Object.create($u.prototype)).point=function(t,e){$u.prototype.point.call(this,e,t)};function Jv(t){this._context=t}Jv.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function aC(t){return new $u(t)}function sC(t){return new Qv(t)}function t2(t){this._context=t}t2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=e2(t),i=e2(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function e2(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,a[e]-=r*a[e-1];for(i[n-1]=a[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function uC(t){return new t2(t)}function Su(t,e){this._context=t,this._t=e}Su.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function cC(t){return new Su(t,.5)}function lC(t){return new Su(t,0)}function fC(t){return new Su(t,1)}function oi(t,e){if((a=t.length)>1)for(var n=1,r,i,o=t[e[0]],a,s=o.length;n<a;++n)for(i=o,o=t[e[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function ai(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function hC(t,e){return t[e]}function dC(t){const e=[];return e.key=t,e}function pC(){var t=at([]),e=ai,n=oi,r=hC;function i(o){var a=Array.from(t.apply(this,arguments),dC),s,u=a.length,c=-1,l;for(const h of o)for(s=0,++c;s<u;++s)(a[s][c]=[0,+r(h,a[s].key,c,o)]).data=h;for(s=0,l=gu(e(a));s<u;++s)a[l[s]].index=s;return n(a,l),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:at(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:at(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?ai:typeof o=="function"?o:at(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??oi,i):n},i}function gC(t,e){if((r=t.length)>0){for(var n,r,i=0,o=t[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=t[n][i][1]||0;if(a)for(n=0;n<r;++n)t[n][i][1]/=a}oi(t,e)}}function mC(t,e){if((u=t.length)>0)for(var n,r=0,i,o,a,s,u,c=t[e[0]].length;r<c;++r)for(a=s=0,n=0;n<u;++n)(o=(i=t[e[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function yC(t,e){if((i=t.length)>0){for(var n=0,r=t[e[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=t[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}oi(t,e)}}function bC(t,e){if(!(!((a=t.length)>0)||!((o=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,u=0,c=0;s<a;++s){for(var l=t[e[s]],h=l[r][1]||0,f=l[r-1][1]||0,d=(h-f)/2,p=0;p<s;++p){var g=t[e[p]],m=g[r][1]||0,y=g[r-1][1]||0;d+=m-y}u+=h,c+=d*h}i[r-1][1]+=i[r-1][0]=n,u&&(n-=c/u)}i[r-1][1]+=i[r-1][0]=n,oi(t,e)}}function n2(t){var e=t.map(vC);return ai(t).sort(function(n,r){return e[n]-e[r]})}function vC(t){for(var e=-1,n=0,r=t.length,i,o=-1/0;++e<r;)(i=+t[e][1])>o&&(o=i,n=e);return n}function r2(t){var e=t.map(i2);return ai(t).sort(function(n,r){return e[n]-e[r]})}function i2(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function xC(t){return r2(t).reverse()}function _C(t){var e=t.length,n,r,i=t.map(i2),o=n2(t),a=0,s=0,u=[],c=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],u.push(r)):(s+=i[r],c.push(r));return c.reverse().concat(u)}function wC(t){return ai(t).reverse()}const Au=t=>()=>t;function $C(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function He(t,e,n){this.k=t,this.x=e,this.y=n}He.prototype={constructor:He,scale:function(t){return t===1?this:new He(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new He(this.k,this.x+this.k*t,this.y+this.k*e)},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 Mu=new He(1,0,0);o2.prototype=He.prototype;function o2(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Mu;return t.__zoom}function xh(t){t.stopImmediatePropagation()}function Ro(t){t.preventDefault(),t.stopImmediatePropagation()}function SC(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function AC(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.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 a2(){return this.__zoom||Mu}function MC(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function TC(){return navigator.maxTouchPoints||"ontouchstart"in this}function PC(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[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 s2(){var t=SC,e=AC,n=PC,r=MC,i=TC,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=N0,c=Nn("start","zoom","end"),l,h,f,d=500,p=150,g=0,m=10;function y(T){T.property("__zoom",a2).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",L).filter(i).on("touchstart.zoom",P).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(T,C,M,R){var G=T.selection?T.selection():T;G.property("__zoom",a2),T!==G?w(T,C,M,R):G.interrupt().each(function(){$(this,arguments).event(R).start().zoom(null,typeof C=="function"?C.apply(this,arguments):C).end()})},y.scaleBy=function(T,C,M,R){y.scaleTo(T,function(){var G=this.__zoom.k,A=typeof C=="function"?C.apply(this,arguments):C;return G*A},M,R)},y.scaleTo=function(T,C,M,R){y.transform(T,function(){var G=e.apply(this,arguments),A=this.__zoom,N=M==null?b(G):typeof M=="function"?M.apply(this,arguments):M,z=A.invert(N),E=typeof C=="function"?C.apply(this,arguments):C;return n(x(v(A,E),N,z),G,a)},M,R)},y.translateBy=function(T,C,M,R){y.transform(T,function(){return n(this.__zoom.translate(typeof C=="function"?C.apply(this,arguments):C,typeof M=="function"?M.apply(this,arguments):M),e.apply(this,arguments),a)},null,R)},y.translateTo=function(T,C,M,R,G){y.transform(T,function(){var A=e.apply(this,arguments),N=this.__zoom,z=R==null?b(A):typeof R=="function"?R.apply(this,arguments):R;return n(Mu.translate(z[0],z[1]).scale(N.k).translate(typeof C=="function"?-C.apply(this,arguments):-C,typeof M=="function"?-M.apply(this,arguments):-M),A,a)},R,G)};function v(T,C){return C=Math.max(o[0],Math.min(o[1],C)),C===T.k?T:new He(C,T.x,T.y)}function x(T,C,M){var R=C[0]-M[0]*T.k,G=C[1]-M[1]*T.k;return R===T.x&&G===T.y?T:new He(T.k,R,G)}function b(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function w(T,C,M,R){T.on("start.zoom",function(){$(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){$(this,arguments).event(R).end()}).tween("zoom",function(){var G=this,A=arguments,N=$(G,A).event(R),z=e.apply(G,A),E=M==null?b(z):typeof M=="function"?M.apply(G,A):M,Y=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),j=G.__zoom,H=typeof C=="function"?C.apply(G,A):C,X=u(j.invert(E).concat(Y/j.k),H.invert(E).concat(Y/H.k));return function(Q){if(Q===1)Q=H;else{var ct=X(Q),U=Y/ct[2];Q=new He(U,E[0]-ct[0]*U,E[1]-ct[1]*U)}N.zoom(null,Q)}})}function $(T,C,M){return!M&&T.__zooming||new S(T,C)}function S(T,C){this.that=T,this.args=C,this.active=0,this.sourceEvent=null,this.extent=e.apply(T,C),this.taps=0}S.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,C){return this.mouse&&T!=="mouse"&&(this.mouse[1]=C.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=C.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=C.invert(this.touch1[0])),this.that.__zoom=C,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var C=V(this.that).datum();c.call(T,this.that,new $C(T,{sourceEvent:this.sourceEvent,target:y,type:T,transform:this.that.__zoom,dispatch:c}),C)}};function _(T,...C){if(!t.apply(this,arguments))return;var M=$(this,C).event(T),R=this.__zoom,G=Math.max(o[0],Math.min(o[1],R.k*Math.pow(2,r.apply(this,arguments)))),A=se(T);if(M.wheel)(M.mouse[0][0]!==A[0]||M.mouse[0][1]!==A[1])&&(M.mouse[1]=R.invert(M.mouse[0]=A)),clearTimeout(M.wheel);else{if(R.k===G)return;M.mouse=[A,R.invert(A)],Hn(this),M.start()}Ro(T),M.wheel=setTimeout(N,p),M.zoom("mouse",n(x(v(R,G),M.mouse[0],M.mouse[1]),M.extent,a));function N(){M.wheel=null,M.end()}}function D(T,...C){if(f||!t.apply(this,arguments))return;var M=T.currentTarget,R=$(this,C,!0).event(T),G=V(T.view).on("mousemove.zoom",E,!0).on("mouseup.zoom",Y,!0),A=se(T,M),N=T.clientX,z=T.clientY;Pa(T.view),xh(T),R.mouse=[A,this.__zoom.invert(A)],Hn(this),R.start();function E(j){if(Ro(j),!R.moved){var H=j.clientX-N,X=j.clientY-z;R.moved=H*H+X*X>g}R.event(j).zoom("mouse",n(x(R.that.__zoom,R.mouse[0]=se(j,M),R.mouse[1]),R.extent,a))}function Y(j){G.on("mousemove.zoom mouseup.zoom",null),Da(j.view,R.moved),Ro(j),R.event(j).end()}}function L(T,...C){if(t.apply(this,arguments)){var M=this.__zoom,R=se(T.changedTouches?T.changedTouches[0]:T,this),G=M.invert(R),A=M.k*(T.shiftKey?.5:2),N=n(x(v(M,A),R,G),e.apply(this,C),a);Ro(T),s>0?V(this).transition().duration(s).call(w,N,R,T):V(this).call(y.transform,N,R,T)}}function P(T,...C){if(t.apply(this,arguments)){var M=T.touches,R=M.length,G=$(this,C,T.changedTouches.length===R).event(T),A,N,z,E;for(xh(T),N=0;N<R;++N)z=M[N],E=se(z,this),E=[E,this.__zoom.invert(E),z.identifier],G.touch0?!G.touch1&&G.touch0[2]!==E[2]&&(G.touch1=E,G.taps=0):(G.touch0=E,A=!0,G.taps=1+!!l);l&&(l=clearTimeout(l)),A&&(G.taps<2&&(h=E[0],l=setTimeout(function(){l=null},d)),Hn(this),G.start())}}function I(T,...C){if(this.__zooming){var M=$(this,C).event(T),R=T.changedTouches,G=R.length,A,N,z,E;for(Ro(T),A=0;A<G;++A)N=R[A],z=se(N,this),M.touch0&&M.touch0[2]===N.identifier?M.touch0[0]=z:M.touch1&&M.touch1[2]===N.identifier&&(M.touch1[0]=z);if(N=M.that.__zoom,M.touch1){var Y=M.touch0[0],j=M.touch0[1],H=M.touch1[0],X=M.touch1[1],Q=(Q=H[0]-Y[0])*Q+(Q=H[1]-Y[1])*Q,ct=(ct=X[0]-j[0])*ct+(ct=X[1]-j[1])*ct;N=v(N,Math.sqrt(Q/ct)),z=[(Y[0]+H[0])/2,(Y[1]+H[1])/2],E=[(j[0]+X[0])/2,(j[1]+X[1])/2]}else if(M.touch0)z=M.touch0[0],E=M.touch0[1];else return;M.zoom("touch",n(x(N,z,E),M.extent,a))}}function k(T,...C){if(this.__zooming){var M=$(this,C).event(T),R=T.changedTouches,G=R.length,A,N;for(xh(T),f&&clearTimeout(f),f=setTimeout(function(){f=null},d),A=0;A<G;++A)N=R[A],M.touch0&&M.touch0[2]===N.identifier?delete M.touch0:M.touch1&&M.touch1[2]===N.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(N=se(N,this),Math.hypot(h[0]-N[0],h[1]-N[1])<m)){var z=V(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return y.wheelDelta=function(T){return arguments.length?(r=typeof T=="function"?T:Au(+T),y):r},y.filter=function(T){return arguments.length?(t=typeof T=="function"?T:Au(!!T),y):t},y.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:Au(!!T),y):i},y.extent=function(T){return arguments.length?(e=typeof T=="function"?T:Au([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),y):e},y.scaleExtent=function(T){return arguments.length?(o[0]=+T[0],o[1]=+T[1],y):[o[0],o[1]]},y.translateExtent=function(T){return arguments.length?(a[0][0]=+T[0][0],a[1][0]=+T[1][0],a[0][1]=+T[0][1],a[1][1]=+T[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(T){return arguments.length?(n=T,y):n},y.duration=function(T){return arguments.length?(s=+T,y):s},y.interpolate=function(T){return arguments.length?(u=T,y):u},y.on=function(){var T=c.on.apply(c,arguments);return T===c?y:T},y.clickDistance=function(T){return arguments.length?(g=(T=+T)*T,y):Math.sqrt(g)},y.tapDistance=function(T){return arguments.length?(m=+T,y):m},y}const _h=Object.freeze(Object.defineProperty({__proto__:null,Adder:Dt,Delaunay:Ll,FormatSpecifier:cs,InternMap:Ei,InternSet:Cn,Node:tr,Path:Ki,Voronoi:S1,ZoomTransform:He,active:kM,arc:bv,area:lh,areaRadial:Sv,ascending:_t,autoType:n9,axisBottom:S5,axisLeft:Gg,axisRight:$5,axisTop:Fg,bin:Tg,bisect:kn,bisectCenter:vA,bisectLeft:bA,bisectRight:hg,bisector:pa,blob:o9,blur:xA,blur2:dg,blurImage:_A,brush:WM,brushSelection:BM,brushX:YM,brushY:HM,buffer:s9,chord:XM,chordDirected:VM,chordTranspose:jM,cluster:vP,color:dn,contourDensity:_7,contours:Al,count:ma,create:o8,creator:Aa,cross:PA,csv:l9,csvFormat:W7,csvFormatBody:q7,csvFormatRow:j7,csvFormatRows:X7,csvFormatValue:V7,csvParse:P1,csvParseRows:H7,cubehelix:Me,cumsum:DA,curveBasis:Vk,curveBasisClosed:Zk,curveBasisOpen:Kk,curveBumpX:Mv,curveBumpY:Tv,curveBundle:Qk,curveCardinal:Jk,curveCardinalClosed:tC,curveCardinalOpen:eC,curveCatmullRom:nC,curveCatmullRomClosed:rC,curveCatmullRomOpen:iC,curveLinear:mu,curveLinearClosed:oC,curveMonotoneX:aC,curveMonotoneY:sC,curveNatural:uC,curveStep:cC,curveStepAfter:fC,curveStepBefore:lC,descending:lg,deviation:mg,difference:f5,disjoint:h5,dispatch:Nn,drag:Zg,dragDisable:Pa,dragEnable:Da,dsv:c9,dsvFormat:os,easeBack:i1,easeBackIn:SM,easeBackInOut:i1,easeBackOut:AM,easeBounce:Vi,easeBounceIn:wM,easeBounceInOut:$M,easeBounceOut:Vi,easeCircle:r1,easeCircleIn:hM,easeCircleInOut:r1,easeCircleOut:dM,easeCubic:ji,easeCubicIn:iM,easeCubicInOut:ji,easeCubicOut:oM,easeElastic:Qa,easeElasticIn:MM,easeElasticInOut:TM,easeElasticOut:Qa,easeExp:n1,easeExpIn:lM,easeExpInOut:n1,easeExpOut:fM,easeLinear:eM,easePoly:Q0,easePolyIn:aM,easePolyInOut:Q0,easePolyOut:sM,easeQuad:K0,easeQuadIn:nM,easeQuadInOut:K0,easeQuadOut:rM,easeSin:e1,easeSinIn:uM,easeSinInOut:e1,easeSinOut:cM,every:o5,extent:Li,fcumsum:EA,filter:s5,flatGroup:kA,flatRollup:CA,forceCenter:b9,forceCollide:C1,forceLink:G9,forceManyBody:F1,forceRadial:q9,forceSimulation:N1,forceX:G1,forceY:z1,get format(){return eo},formatDefaultLocale:X1,formatLocale:q1,get formatPrefix(){return Nl},formatSpecifier:Hr,fsum:LA,geoAlbers:sy,geoAlbersUsa:KT,geoArea:nT,geoAzimuthalEqualArea:QT,geoAzimuthalEqualAreaRaw:wf,geoAzimuthalEquidistant:JT,geoAzimuthalEquidistantRaw:$f,geoBounds:aT,geoCentroid:hT,geoCircle:dT,geoClipAntimeridian:tf,geoClipCircle:Dm,geoClipExtent:xT,geoClipRectangle:Es,geoConicConformal:eP,geoConicConformalRaw:ly,geoConicEqualArea:Ys,geoConicEqualAreaRaw:ay,geoConicEquidistant:rP,geoConicEquidistantRaw:fy,geoContains:TT,geoDistance:Is,geoEqualEarth:oP,geoEqualEarthRaw:Sf,geoEquirectangular:nP,geoEquirectangularRaw:bo,geoGnomonic:aP,geoGnomonicRaw:Af,geoGraticule:zm,geoGraticule10:PT,geoIdentity:sP,geoInterpolate:DT,geoLength:Lm,geoMercator:tP,geoMercatorRaw:yo,geoNaturalEarth1:uP,geoNaturalEarth1Raw:Mf,geoOrthographic:cP,geoOrthographicRaw:Tf,geoPath:UT,geoProjection:Ue,geoProjectionMutator:xf,geoRotation:_m,geoStereographic:lP,geoStereographicRaw:Pf,geoStream:Pe,geoTransform:BT,geoTransverseMercator:fP,geoTransverseMercatorRaw:Df,gray:A8,greatest:Pg,greatestIndex:JA,group:xg,groupSort:NA,groups:_g,hcl:Fa,hierarchy:qs,histogram:Tg,hsl:Ca,html:m9,image:h9,index:IA,indexes:RA,interpolate:pn,interpolateArray:E8,interpolateBasis:_0,interpolateBasisClosed:w0,interpolateBlues:rk,interpolateBrBG:NE,interpolateBuGn:WE,interpolateBuPu:qE,interpolateCividis:ck,interpolateCool:hk,interpolateCubehelix:q8,interpolateCubehelixDefault:lk,interpolateCubehelixLong:Ya,interpolateDate:P0,interpolateDiscrete:I8,interpolateGnBu:XE,interpolateGreens:ik,interpolateGreys:ok,interpolateHcl:H8,interpolateHclLong:W8,interpolateHsl:U8,interpolateHslLong:B8,interpolateHue:R8,interpolateInferno:xk,interpolateLab:Y8,interpolateMagma:vk,interpolateNumber:he,interpolateNumberArray:Zc,interpolateObject:D0,interpolateOrRd:jE,interpolateOranges:uk,interpolatePRGn:FE,interpolatePiYG:GE,interpolatePlasma:_k,interpolatePuBu:ZE,interpolatePuBuGn:VE,interpolatePuOr:zE,interpolatePuRd:KE,interpolatePurples:ak,interpolateRainbow:dk,interpolateRdBu:OE,interpolateRdGy:UE,interpolateRdPu:QE,interpolateRdYlBu:BE,interpolateRdYlGn:YE,interpolateReds:sk,interpolateRgb:Ui,interpolateRgbBasis:A0,interpolateRgbBasisClosed:L8,interpolateRound:Ua,interpolateSinebow:mk,interpolateSpectral:HE,interpolateString:Jc,interpolateTransformCss:C0,interpolateTransformSvg:I0,interpolateTurbo:yk,interpolateViridis:bk,interpolateWarm:fk,interpolateYlGn:tk,interpolateYlGnBu:JE,interpolateYlOrBr:ek,interpolateYlOrRd:nk,interpolateZoom:N0,interrupt:Hn,intersection:d5,interval:K8,isoFormat:gE,isoParse:bE,json:p9,lab:Na,lch:M8,least:QA,leastIndex:Eg,line:yu,lineRadial:$v,link:bu,linkHorizontal:Fk,linkRadial:zk,linkVertical:Gk,local:jg,map:u5,matcher:Rc,max:ki,maxIndex:Pc,mean:HA,median:WA,medianIndex:qA,merge:Lc,min:va,minIndex:Dc,mode:jA,namespace:Ni,namespaces:Cc,nice:Mc,now:qi,pack:VP,packEnclose:YP,packSiblings:XP,pairs:VA,partition:ZP,path:Sl,pathRound:QM,permute:Mg,pie:xv,piecewise:O0,pointRadial:Io,pointer:se,pointers:s8,polygonArea:fD,polygonCentroid:hD,polygonContains:mD,polygonHull:gD,polygonLength:yD,precisionFixed:j1,precisionPrefix:V1,precisionRound:Z1,quadtree:ss,quantile:Ii,quantileIndex:Lg,quantileSorted:Dg,quantize:X8,quickselect:xa,radialArea:Sv,radialLine:$v,randomBates:_D,randomBernoulli:SD,randomBeta:Cy,randomBinomial:Iy,randomCauchy:MD,randomExponential:wD,randomGamma:zf,randomGeometric:ky,randomInt:vD,randomIrwinHall:Ey,randomLcg:ED,randomLogNormal:xD,randomLogistic:TD,randomNormal:Gf,randomPareto:$D,randomPoisson:PD,randomUniform:bD,randomWeibull:AD,range:fn,rank:KA,reduce:c5,reverse:l5,rgb:kr,ribbon:a7,ribbonArrow:s7,rollup:$g,rollups:Sg,scaleBand:Bf,scaleDiverging:Ob,scaleDivergingLog:Ub,scaleDivergingPow:sh,scaleDivergingSqrt:SE,scaleDivergingSymlog:Bb,scaleIdentity:zy,scaleImplicit:Of,scaleLinear:qf,scaleLog:Hy,scaleOrdinal:Uf,scalePoint:Yf,scalePow:tu,scaleQuantile:Ky,scaleQuantize:Qy,scaleRadial:Zy,scaleSequential:Nb,scaleSequentialLog:Fb,scaleSequentialPow:ah,scaleSequentialQuantile:zb,scaleSequentialSqrt:$E,scaleSequentialSymlog:Gb,scaleSqrt:YD,scaleSymlog:Xy,scaleThreshold:Jy,scaleTime:_E,scaleUtc:wE,scan:t5,schemeAccent:ME,schemeBlues:lv,schemeBrBG:Yb,schemeBuGn:Qb,schemeBuPu:Jb,schemeCategory10:AE,schemeDark2:TE,schemeGnBu:tv,schemeGreens:fv,schemeGreys:hv,schemeObservable10:PE,schemeOrRd:ev,schemeOranges:gv,schemePRGn:Hb,schemePaired:DE,schemePastel1:LE,schemePastel2:EE,schemePiYG:Wb,schemePuBu:rv,schemePuBuGn:nv,schemePuOr:qb,schemePuRd:iv,schemePurples:dv,schemeRdBu:Xb,schemeRdGy:jb,schemeRdPu:ov,schemeRdYlBu:Vb,schemeRdYlGn:Zb,schemeReds:pv,schemeSet1:kE,schemeSet2:CE,schemeSet3:IE,schemeSpectral:Kb,schemeTableau10:RE,schemeYlGn:sv,schemeYlGnBu:av,schemeYlOrBr:uv,schemeYlOrRd:cv,select:V,selectAll:u8,selection:Gn,selector:Ma,selectorAll:Ic,shuffle:e5,shuffler:kg,some:a5,sort:$c,stack:pC,stackOffsetDiverging:mC,stackOffsetExpand:gC,stackOffsetNone:oi,stackOffsetSilhouette:yC,stackOffsetWiggle:bC,stackOrderAppearance:n2,stackOrderAscending:r2,stackOrderDescending:xC,stackOrderInsideOut:_C,stackOrderNone:ai,stackOrderReverse:wC,stratify:tD,style:Fn,subset:g5,sum:n5,superset:Ig,svg:y9,symbol:jk,symbolAsterisk:Pv,symbolCircle:vu,symbolCross:Dv,symbolDiamond:Ev,symbolDiamond2:kv,symbolPlus:Cv,symbolSquare:Iv,symbolSquare2:Rv,symbolStar:Fv,symbolTimes:ph,symbolTriangle:Gv,symbolTriangle2:zv,symbolWye:Ov,symbolX:ph,symbols:Uv,symbolsFill:Uv,symbolsStroke:Xk,text:as,thresholdFreedmanDiaconis:BA,thresholdScott:YA,thresholdSturges:Tc,tickFormat:Gy,tickIncrement:Rn,tickStep:ba,ticks:In,timeDay:ti,timeDays:VD,get timeFormat(){return rh},timeFormatDefaultLocale:Ib,timeFormatLocale:bb,timeFriday:ob,timeFridays:nL,timeHour:ru,timeHours:XD,timeInterval:Tt,timeMillisecond:Jr,timeMilliseconds:tb,timeMinute:eu,timeMinutes:WD,timeMonday:To,timeMondays:QD,timeMonth:ou,timeMonths:lL,get timeParse(){return Cb},timeSaturday:ab,timeSaturdays:rL,timeSecond:an,timeSeconds:nb,timeSunday:ei,timeSundays:sb,timeThursday:rr,timeThursdays:eL,timeTickInterval:yb,timeTicks:mb,timeTuesday:rb,timeTuesdays:JD,timeWednesday:ib,timeWednesdays:tL,timeWeek:ei,timeWeeks:sb,timeYear:Be,timeYears:hL,timeout:nl,timer:Xa,timerFlush:Y0,transition:V0,transpose:Cg,tree:sD,treemap:Dy,treemapBinary:uD,treemapDice:So,treemapResquarify:lD,treemapSlice:Ks,treemapSliceDice:cD,treemapSquarify:Ff,tsv:f9,tsvFormat:K7,tsvFormatBody:Q7,tsvFormatRow:t9,tsvFormatRows:J7,tsvFormatValue:e9,tsvParse:D1,tsvParseRows:Z7,union:m5,unixDay:th,unixDays:KD,utcDay:Mo,utcDays:ZD,get utcFormat(){return su},utcFriday:lb,utcFridays:uL,utcHour:iu,utcHours:jD,utcMillisecond:Jr,utcMilliseconds:tb,utcMinute:nu,utcMinutes:qD,utcMonday:Po,utcMondays:iL,utcMonth:au,utcMonths:fL,get utcParse(){return ih},utcSaturday:fb,utcSaturdays:cL,utcSecond:an,utcSeconds:nb,utcSunday:ni,utcSundays:hb,utcThursday:or,utcThursdays:sL,utcTickInterval:gb,utcTicks:pb,utcTuesday:ub,utcTuesdays:oL,utcWednesday:cb,utcWednesdays:aL,utcWeek:ni,utcWeeks:hb,utcYear:Ye,utcYears:dL,variance:gg,window:Nc,xml:g9,zip:i5,zoom:s2,zoomIdentity:Mu,zoomTransform:o2},Symbol.toStringTag,{value:"Module"}));function u2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function DC(t,e){function n(i){var s;const o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+i+"</svg>";const a=document.createDocumentFragment();for(;a&&((s=o==null?void 0:o.firstChild)!=null&&s.firstChild);)a.appendChild(o.firstChild.firstChild);return a}const r=t.node();for(;r.hasChildNodes();)r.removeChild(r.firstChild);t.node().appendChild(n(e))}function ar(t){return t.substring(0,4)!=="ease"?ji:_h[t]??ji}function Tu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=qf().domain([0,1]).range([0,t/2]),a=o(n);return bv().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const wh=(t,e)=>e instanceof Function?e(t):eo(e)(t);function c2(t,e=10){var i;const n=document.createElement("canvas").getContext("2d");return(((i=n==null?void 0:n.measureText(t))==null?void 0:i.width)??0)*e/10}function LC(t){const e=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):e}function EC(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return LC(e)}function Et(t,e){const n=e.colors[e.colorScheme];return t==="series"?n.series[0]:t=="none"?"none":n[t]!=null?n[t]:n.primary}function $h({datum:t,colorType:e,fullChartParams:n}){return e==="series"?t.color?t.color:n.colors[n.colorScheme].series[0]:e=="none"?"none":n.colors[n.colorScheme][e]!=null?n.colors[n.colorScheme][e]:n.colors[n.colorScheme].primary}function ot(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function Sn(t,e){const r=Math.random().toString(36).substr(2,5);return ot(t,e,r)}const si=({selection:t,pluginName:e,clipPathID:n,existSeriesLabels$:r,gridContainer$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=ot(e,"series"),u=ot(e,"axes"),c=ot(e,"graphic"),l=r.pipe(O((p,g)=>t.selectAll(`g.${s}`).data(p,m=>m).join(m=>m.append("g").classed(s,!0).each((y,v,x)=>{V(x[v]).selectAll(`g.${u}`).data([v]).join(b=>b.append("g").classed(u,!0).attr("clip-path",`url(#${n})`).each((w,$,S)=>{V(S[$]).selectAll("defs").data([$]).join("defs"),V(S[$]).selectAll("g").data([$]).join("g").classed(c,!0)}),b=>b,b=>b.remove())}),m=>m,m=>m.remove())),B(p=>W({seriesSelection:li(p),gridContainer:i})),O(p=>(p.seriesSelection.transition().attr("transform",(g,m)=>{const y=p.gridContainer[m]??p.gridContainer[0],v=y.translate,x=y.scale;return`translate(${v[0]}, ${v[1]}) scale(${x[0]}, ${x[1]})`}),p.seriesSelection)),Le(1)),h=W({seriesSelection:l,gridAxesTransform:o}).pipe(B(async p=>p),O(p=>p.seriesSelection.select(`g.${u}`).style("transform",p.gridAxesTransform.value)),Le(1)),f=h.pipe(O(p=>p.select("defs")),Le(1)),d=W({axesSelection:h,gridGraphicTransform:a}).pipe(B(async p=>p),O(p=>{const g=p.axesSelection.select(`g.${c}`);return g.transition().duration(50).style("transform",p.gridGraphicTransform.value),g}),Le(1));return{seriesSelection$:l,axesSelection$:h,defsSelection$:f,graphicGSelection$:d}},Sh=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r})=>{const i=new nt,o=new lt(a=>{W({dataFormatter:t,computedData:n}).pipe(F(i),B(async s=>s)).subscribe(s=>{const c=s.computedData[0]?s.computedData[0].length-1:0,l=s.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-s.dataFormatter.grid.groupAxis.scalePadding:s.dataFormatter.grid.groupAxis.scaleDomain[0]-s.dataFormatter.grid.groupAxis.scalePadding,h=s.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?c+s.dataFormatter.grid.groupAxis.scalePadding:s.dataFormatter.grid.groupAxis.scaleDomain[1]+s.dataFormatter.grid.groupAxis.scalePadding,d=(s.dataFormatter.grid.gridData.seriesDirection==="row"?(s.computedData[0]??[]).map(p=>p.groupLabel):s.computedData.map(p=>p[0].groupLabel)).filter((p,g)=>g>=l&&g<=h);a.next(d)})});return new lt(a=>{W({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(F(i),B(async s=>s)).subscribe(s=>{const u=s.dataFormatter.grid.valueAxis.position==="right"||s.dataFormatter.grid.valueAxis.position==="bottom",c=pA({axisLabels:s.scaleRangeGroupLabels,axisWidth:s.axisSize.width,reverse:u}),l=f=>s.dataFormatter.grid.groupAxis.position==="bottom"||s.dataFormatter.grid.groupAxis.position==="top"?f.offsetX-s.fullChartParams.padding.left:f.offsetY-s.fullChartParams.padding.top,h=f=>{const d=l(f),p=c(d);return{groupIndex:p,groupLabel:s.scaleRangeGroupLabels[p]??""}};return a.next(h),function(){i.next(void 0)}})})};function kC(t="curveLinear"){return yu().x(e=>e.axisX).y(e=>e.axisY).curve(_h[t])}function CC(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function IC({selection:t,pathClassName:e,segmentData:n,linePath:r,params:i}){return t.selectAll("path").data(n,(a,s)=>a.length?`${a[0].id}_${a[a.length-1].id}`:s).join(a=>a.append("path").classed(e,!0).attr("fill","none").attr("pointer-events","visibleStroke").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),a=>a,a=>a.remove()).attr("stroke-width",i.lineWidth).attr("stroke",(a,s)=>a[0]&&a[0].color).attr("d",a=>r(a))}function RC({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function NC({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{V(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(ar(r)).tween("tween",(c,l,h)=>f=>{const d=c.width*f;u.attr("x",0).attr("y",0).attr("width",p=>d).attr("height",p=>p.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const l2=(t,{selection:e,computedData$:n,existSeriesLabels$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullDataFormatter$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridAxesSize$:h,gridHighlight$:f,gridContainer$:d,event$:p})=>{const g=new nt,m=Sn(t,"clipPath-box"),y=ot(t,"path"),{seriesSelection$:v,axesSelection$:x,defsSelection$:b,graphicGSelection$:w}=si({selection:e,pluginName:t,clipPathID:m,existSeriesLabels$:r,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),$=new lt(k=>{const T=a.pipe(F(g)).subscribe(C=>{if(!C)return;const M=kC(C.lineCurve);k.next(M)});return()=>{T.unsubscribe()}}),S=new lt(k=>{n.pipe(F(g),B(async T=>T)).subscribe(T=>{const C=T[0]&&T[0][0]?T.map(M=>M[0].seriesLabel):[];k.next(C)})}),_=u.pipe(O(k=>k.transitionDuration),ft()),D=u.pipe(O(k=>k.transitionEase),ft());W({defsSelection:b,seriesLabels:S,axisSize:h,transitionDuration:_,transitionEase:D}).pipe(F(g),B(async k=>k)).subscribe(k=>{const C=[{id:m,width:k.axisSize.width,height:k.axisSize.height}].concat(k.seriesLabels.map(M=>({id:`orbcharts__clipPath_${M}`,width:k.axisSize.width,height:k.axisSize.height})));NC({defsSelection:k.defsSelection,clipPathData:C,transitionDuration:k.transitionDuration,transitionEase:k.transitionEase})});const L=n.pipe(O(k=>{const T=new Map;return k.flat().forEach(C=>T.set(C.id,C)),T})),P=Sh({fullDataFormatter$:s,gridAxesSize$:h,computedData$:n,fullChartParams$:u}),I=u.pipe(F(g),O(k=>k.highlightTarget),ft());return W({graphicGSelection:w,seriesLabels:S,computedData:n,SeriesDataMap:i,GroupDataMap:o,linePath:$,params:a,highlightTarget:I,gridGroupPositionFn:P}).pipe(F(g),B(async k=>k)).subscribe(k=>{k.graphicGSelection.each((T,C,M)=>{const R=CC(k.computedData[C]??[]);IC({selection:V(M[C]),pathClassName:y,linePath:k.linePath,segmentData:R,params:k.params}).on("mouseover",(A,N)=>{A.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:E,groupLabel:Y}=k.gridGroupPositionFn(A),X=k.GroupDataMap.get(Y).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:k.highlightTarget,datum:X,gridIndex:X.gridIndex,series:k.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:k.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:A,data:k.computedData})}).on("mousemove",(A,N)=>{A.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:E,groupLabel:Y}=k.gridGroupPositionFn(A),X=k.GroupDataMap.get(Y).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:k.highlightTarget,datum:X,gridIndex:X.gridIndex,series:k.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:k.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:A,data:k.computedData})}).on("mouseout",(A,N)=>{A.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:E,groupLabel:Y}=k.gridGroupPositionFn(A),X=k.GroupDataMap.get(Y).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:k.highlightTarget,datum:X,gridIndex:X.gridIndex,series:k.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:k.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:A,data:k.computedData})}).on("click",(A,N)=>{A.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:E,groupLabel:Y}=k.gridGroupPositionFn(A),X=k.GroupDataMap.get(Y).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:k.highlightTarget,datum:X,gridIndex:X.gridIndex,series:k.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:k.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:A,data:k.computedData})})})}),u.pipe(F(g),fi(k=>k.highlightTarget==="series"),B(k=>W({graphicGSelection:w,gridHighlight:f,DataMap:L,fullChartParams:u}).pipe(F(g),B(async T=>T)))).subscribe(k=>{const T=k.gridHighlight[0]?k.gridHighlight[0].seriesLabel:null;RC({selection:k.graphicGSelection,seriesLabel:T,fullChartParams:k.fullChartParams})}),()=>{g.next(void 0)}},f2="Lines",FC=ae(f2,cr)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=l2(f2,{selection:t,computedData$:n.computedData$,existSeriesLabels$:n.existSeriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainer$:n.gridContainer$,event$:r.event$});return()=>{i.next(void 0),o()}});function GC(t="curveLinear",e){return lh().x(n=>n.axisX).y0(n=>e).y1(n=>n.axisY).curve(_h[t])}function zC(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function OC({selection:t,pathClassName:e,segmentData:n,areaPath:r,linearGradientIds:i,params:o}){return t.selectAll("path").data(n,(s,u)=>s.length?`${s[0].id}_${s[s.length-1].id}`:u).join(s=>s.append("path").classed(e,!0).attr("fill","none").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),s=>s,s=>s.remove()).attr("fill",(s,u)=>s[0]?`url(#${i[s[0].seriesIndex]})`:"").attr("d",s=>r(s))}function UC({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function BC({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
|
10
10
|
<stop offset="0%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[0]}"/>
|
11
11
|
<stop offset="100%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[1]}"/>
|
12
|
-
`})}function zC({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{V(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(ar(r)).tween("tween",(c,l,h)=>f=>{const d=c.width*f;u.attr("x",0).attr("y",0).attr("width",p=>d).attr("height",p=>p.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const OC=(t,{selection:e,computedData$:n,existSeriesLabels$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullDataFormatter$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridAxesSize$:h,gridHighlight$:f,gridContainer$:d,layout$:p,event$:g})=>{const m=new rt,y=$n(t,"clipPath-box"),v=ot(t,"path"),{seriesSelection$:x,axesSelection$:b,defsSelection$:w,graphicGSelection$:$}=si({selection:e,pluginName:t,clipPathID:y,existSeriesLabels$:r,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),A=l.pipe(F(m),U(S=>-S.translate[1]/S.scale[1])),_=new lt(S=>{const R=H({fullParams:a,valueAxisStart:A}).pipe(F(m)).subscribe(G=>{const M=IC(G.fullParams.lineCurve,G.valueAxisStart);S.next(M)});return()=>{R.unsubscribe()}}),L=new lt(S=>{n.pipe(F(m),B(async R=>R)).subscribe(R=>{const G=R[0]&&R[0][0]?R.map(M=>M[0].seriesLabel):[];S.next(G)})}),E=u.pipe(U(S=>S.transitionDuration),ft()),T=u.pipe(U(S=>S.transitionEase),ft());H({defsSelection:w,seriesLabels:L,axisSize:h,transitionDuration:E,transitionEase:T}).pipe(F(m),B(async S=>S)).subscribe(S=>{const G=[{id:y,width:S.axisSize.width,height:S.axisSize.height}].concat(S.seriesLabels.map(M=>({id:`orbcharts__clipPath_${M}`,width:S.axisSize.width,height:S.axisSize.height})));zC({defsSelection:S.defsSelection,clipPathData:G,transitionDuration:S.transitionDuration,transitionEase:S.transitionEase})});const I=n.pipe(U(S=>{const R=new Map;return S.flat().forEach(G=>R.set(G.id,G)),R})),P=Sh({fullDataFormatter$:s,gridAxesSize$:h,computedData$:n,fullChartParams$:u}),D=u.pipe(F(m),U(S=>S.highlightTarget),ft()),C=L.pipe(F(m),U(S=>S.map((R,G)=>$n(t,`lineargradient-${R}`))));return H({graphicGSelection:$,defsSelection:w,seriesLabels:L,computedData:n,linearGradientIds:C,SeriesDataMap:i,GroupDataMap:o,areaPath:_,params:a,highlightTarget:D,gridGroupPositionFn:P}).pipe(F(m),B(async S=>S)).subscribe(S=>{S.graphicGSelection.each((R,G,M)=>{const N=RC(S.computedData[G]??[]),z=NC({selection:V(M[G]),pathClassName:v,areaPath:S.areaPath,segmentData:N,linearGradientIds:S.linearGradientIds,params:S.params});GC({defsSelection:S.defsSelection,computedData:S.computedData,linearGradientIds:S.linearGradientIds,params:S.params}),z.on("mouseover",(k,Y)=>{k.stopPropagation();const j=Y[0]?Y[0].seriesLabel:"",{groupIndex:W,groupLabel:X}=S.gridGroupPositionFn(k),O=S.GroupDataMap.get(X).find(tt=>tt.seriesLabel===j)??Y[0];g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:S.highlightTarget,datum:O,gridIndex:O.gridIndex,series:S.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:S.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:k,data:S.computedData})}).on("mousemove",(k,Y)=>{k.stopPropagation();const j=Y[0]?Y[0].seriesLabel:"",{groupIndex:W,groupLabel:X}=S.gridGroupPositionFn(k),O=S.GroupDataMap.get(X).find(tt=>tt.seriesLabel===j)??Y[0];g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:S.highlightTarget,datum:O,gridIndex:O.gridIndex,series:S.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:S.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:k,data:S.computedData})}).on("mouseout",(k,Y)=>{k.stopPropagation();const j=Y[0]?Y[0].seriesLabel:"",{groupIndex:W,groupLabel:X}=S.gridGroupPositionFn(k),O=S.GroupDataMap.get(X).find(tt=>tt.seriesLabel===j)??Y[0];g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:S.highlightTarget,datum:O,gridIndex:O.gridIndex,series:S.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:S.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:k,data:S.computedData})}).on("click",(k,Y)=>{k.stopPropagation();const j=Y[0]?Y[0].seriesLabel:"",{groupIndex:W,groupLabel:X}=S.gridGroupPositionFn(k),O=S.GroupDataMap.get(X).find(tt=>tt.seriesLabel===j)??Y[0];g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:S.highlightTarget,datum:O,gridIndex:O.gridIndex,series:S.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:S.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:k,data:S.computedData})})})}),u.pipe(F(m),fi(S=>S.highlightTarget==="series"),B(S=>H({graphicGSelection:$,highlight:f,DataMap:I,fullChartParams:u}).pipe(F(m),B(async R=>R)))).subscribe(S=>{const R=S.DataMap.get(S.highlight[0]);FC({selection:S.graphicGSelection,seriesLabel:R&&R.seriesLabel?R.seriesLabel:null,fullChartParams:S.fullChartParams})}),()=>{m.next(void 0)}},f2="LineAreas",UC=ae(f2,Uh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=OC(f2,{selection:t,computedData$:n.computedData$,existSeriesLabels$:n.existSeriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainer$:n.gridContainer$,layout$:n.layout$,event$:r.event$});return()=>{i.next(void 0),o()}}),h2=.3;function d2({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function BC(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Yf().domain(e).range([-i/2+r,i/2-r])}function YC(t,e){return t<=1?0:e/(t-1)*h2}function WC(t,e){return t<=1?e:e*(1-h2)}function HC({graphicGSelection:t,rectClassName:e,computedData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:u,transformedBarRadius:c,delayGroup:l,transitionItem:h,isSeriesPositionSeprate:f}){const d=u/2;return t.each((g,m,y)=>{V(y[m]).selectAll(`rect.${e}`).data(n[m]??[],v=>v.id).join(v=>v.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",x=>0),v=>v,v=>v.remove()).attr("transform",(v,x)=>`translate(${(v?v.axisX:0)-d}, 0)`).attr("fill",v=>v.color).attr("y",v=>v.axisY<r[m]?v.axisY:r[m]).attr("x",v=>f?0:o(v.seriesLabel)).attr("width",u).attr("rx",c[m][0]??1).attr("ry",c[m][1]??1).transition().duration(h).ease(ar(s.transitionEase)).delay((v,x)=>v.groupIndex*l).attr("height",v=>Math.abs(v.axisYFromZero))}),t.selectAll(`rect.${e}`)}function qC({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function XC({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Ah=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridGraphicReverseScale$:h,gridAxesSize$:f,gridHighlight$:d,gridContainer$:p,isSeriesPositionSeprate$:g,event$:m})=>{const y=new rt,v=$n(t,"clipPath-box"),x=ot(t,"rect"),{seriesSelection$:b,axesSelection$:w,defsSelection$:$,graphicGSelection$:A}=si({selection:e,pluginName:t,clipPathID:v,existSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),_=r.pipe(F(y),U(M=>M.map(N=>N[0]?N[0].axisY-N[0].axisYFromZero:0)),ft()),L=H({computedData:n,visibleComputedData:r,params:s,gridAxesSize:f,isSeriesPositionSeprate:g}).pipe(F(y),B(async M=>M),U(M=>M.params.barWidth?M.params.barWidth:M.isSeriesPositionSeprate?d2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:1,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding}):d2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:M.visibleComputedData.length,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding})),ft()),E=H({computedData:n,barWidth:L,params:s,gridGraphicReverseScale:h}).pipe(F(y),B(async M=>M),U(M=>{const N=M.barWidth/2,z=M.params.barRadius===!0?N:M.params.barRadius===!1?0:typeof M.params.barRadius=="number"?M.params.barRadius:0;return M.computedData.map((k,Y)=>{const j=M.gridGraphicReverseScale[Y]??M.gridGraphicReverseScale[0];let W=z*j[0],X=z*j[1];if(W>N){const Q=N/W;W=W*Q,X=X*Q}return[W,X]})})),T=r.pipe(F(y),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(k=>{N.add(k.seriesLabel)})}),Array.from(N)})),I=r.pipe(F(y),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(k=>{N.add(k.groupLabel)})}),Array.from(N)})),P=H({seriesLabels:T,barWidth:L,params:s}).pipe(F(y),B(async M=>M),U(M=>BC(M.barWidth,M.seriesLabels,M.params))),D=u.pipe(F(y),U(M=>M.transitionDuration),ft()),C=new lt(M=>{H({groupLabels:I,transitionDuration:D}).pipe(B(async N=>N)).subscribe(N=>{const z=YC(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(y),ft()),S=new lt(M=>{H({groupLabels:I,transitionDuration:D}).pipe(B(async N=>N)).subscribe(N=>{const z=WC(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(y),ft());H({defsSelection:$,gridAxesSize:f}).pipe(F(y),B(async M=>M)).subscribe(M=>{const N=[{id:v,width:M.gridAxesSize.width,height:M.gridAxesSize.height}];qC({defsSelection:M.defsSelection,clipPathData:N})});const R=u.pipe(F(y),U(M=>M.highlightTarget),ft()),G=new rt;return H({graphicGSelection:A,computedData:n,zeroYArr:_,groupLabels:I,barScale:P,params:s,chartParams:u,highlightTarget:R,barWidth:L,transformedBarRadius:E,delayGroup:C,transitionItem:S,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:g}).pipe(F(y),B(async M=>M)).subscribe(M=>{const N=HC({graphicGSelection:M.graphicGSelection,rectClassName:x,computedData:M.computedData,zeroYArr:M.zeroYArr,groupLabels:M.groupLabels,barScale:M.barScale,params:M.params,chartParams:M.chartParams,barWidth:M.barWidth,transformedBarRadius:M.transformedBarRadius,delayGroup:M.delayGroup,transitionItem:M.transitionItem,isSeriesPositionSeprate:M.isSeriesPositionSeprate});N.on("mouseover",(z,k)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("mousemove",(z,k)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("mouseout",(z,k)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("click",(z,k)=>{z.stopPropagation(),m.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}),G.next(N)}),H({barSelection:G,highlight:d,fullChartParams:u}).pipe(F(y),B(async M=>M)).subscribe(M=>{XC({selection:M.barSelection,ids:M.highlight,fullChartParams:M.fullChartParams})}),()=>{y.next(void 0)}},p2="Bars",jC=ae(p2,Fo)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=Ah(p2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),g2="BarsDiverging",VC=ae(g2,Fo)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=Ah(g2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:li(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),m2=.3;function ZC({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function KC(t,e){return t<=1?0:e/(t-1)*m2}function QC(t,e){return t<=1?e:e*(1-m2)}function JC({graphicGSelection:t,rectClassName:e,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:u,delayGroup:c,transitionItem:l,isSeriesPositionSeprate:h}){const f=s/2;return t.each((p,g,m)=>{V(m[g]).selectAll(`rect.${e}`).data(n[g]??[],y=>y.id).join(y=>y.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",v=>0),y=>y,y=>y.remove()).attr("transform",(y,v)=>`translate(${(y?y.axisX:0)-f}, 0)`).attr("fill",y=>y.color).attr("y",y=>r).attr("x",y=>0).attr("width",s).attr("rx",u[g][0]??1).attr("ry",u[g][1]??1).transition().duration(l).ease(ar(a.transitionEase)).delay((y,v)=>y.groupIndex*c).attr("y",y=>y._barStartY).attr("height",y=>Math.abs(y._barHeight))}),t.selectAll(`rect.${e}`)}function tI({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function eI({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const y2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullDataFormatter$:u,fullChartParams$:c,gridAxesTransform$:l,gridGraphicTransform$:h,gridGraphicReverseScale$:f,gridAxesSize$:d,gridHighlight$:p,gridContainer$:g,isSeriesPositionSeprate$:m,event$:y})=>{const v=new rt,x=$n(t,"clipPath-box"),b=ot(t,"rect"),{seriesSelection$:w,axesSelection$:$,defsSelection$:A,graphicGSelection$:_}=si({selection:e,pluginName:t,clipPathID:x,existSeriesLabels$:i,gridContainer$:g,gridAxesTransform$:l,gridGraphicTransform$:h}),L=r.pipe(F(v),U(k=>k[0]&&k[0][0]?k[0][0].axisY-k[0][0].axisYFromZero:0),ft()),E=H({computedData:n,params:s,axisSize:d,isSeriesPositionSeprate:m}).pipe(F(v),B(async k=>k),U(k=>k.params.barWidth?k.params.barWidth:ZC({axisWidth:k.axisSize.width,groupAmount:k.computedData[0]?k.computedData[0].length:0,barGroupPadding:k.params.barGroupPadding})),ft()),T=H({computedData:n,barWidth:E,params:s,gridGraphicReverseScale:f}).pipe(F(v),B(async k=>k),U(k=>{const Y=k.barWidth/2,j=k.params.barRadius===!0?Y:k.params.barRadius===!1?0:typeof k.params.barRadius=="number"?k.params.barRadius:0;return k.computedData.map((W,X)=>{const Q=k.gridGraphicReverseScale[X]??k.gridGraphicReverseScale[0],ct=j*Q[0],O=j*Q[1];return[ct,O]})})),I=r.pipe(F(v),U(k=>{const Y=new Set;return k.forEach(j=>{j.forEach(W=>{Y.add(W.groupLabel)})}),Array.from(Y)})),P=c.pipe(F(v),U(k=>k.transitionDuration),ft()),D=new lt(k=>{H({groupLabels:I,transitionDuration:P}).pipe(B(async Y=>Y)).subscribe(Y=>{const j=KC(Y.groupLabels.length,Y.transitionDuration);k.next(j)})}).pipe(F(v),ft()),C=new lt(k=>{H({groupLabels:I,transitionDuration:P}).pipe(B(async Y=>Y)).subscribe(Y=>{const j=QC(Y.groupLabels.length,Y.transitionDuration);k.next(j)})}).pipe(F(v),ft()),S=H({computedData:n,dataFormatter:u}).pipe(F(v),B(async k=>k),U(k=>{const j=k.computedData[0]?k.computedData[0].length-1:0,W=k.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-k.dataFormatter.grid.groupAxis.scalePadding:k.dataFormatter.grid.groupAxis.scaleDomain[0]-k.dataFormatter.grid.groupAxis.scalePadding,X=k.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?j+k.dataFormatter.grid.groupAxis.scalePadding:k.dataFormatter.grid.groupAxis.scaleDomain[1]+k.dataFormatter.grid.groupAxis.scalePadding,Q=k.computedData.map(ct=>ct.filter((O,tt)=>O.groupIndex>=W&&O.groupIndex<=X));if(Q.length<=1)return 1;{const ct=Q.flat().map(q=>q.axisYFromZero),O=Math.max(...ct),tt=k.computedData[0]?k.computedData[0].map((q,xt)=>k.computedData.reduce((gt,Ft)=>gt+Ft[xt].axisYFromZero,0)):[],st=Math.max(...tt);return O/st}})),R=H({computedData:n,yRatio:S,zeroY:L}).pipe(F(v),U(k=>{let Y=k.computedData[0]?k.computedData[0].map(()=>k.zeroY):[];return k.computedData.map((j,W)=>j.map((X,Q)=>{const ct=Y[Q],O=X.axisYFromZero*k.yRatio;return Y[Q]=Y[Q]+O,{...X,_barStartY:ct,_barHeight:O}}))})),G=H({computedData:n,zeroY:L}).pipe(F(v),U(k=>k.computedData.map((Y,j)=>Y.map((W,X)=>({...W,_barStartY:k.zeroY,_barHeight:W.axisYFromZero}))))),M=m.pipe(B(k=>$d(()=>k,G,R)));H({defsSelection:A,gridAxesSize:d}).pipe(F(v),B(async k=>k)).subscribe(k=>{const Y=[{id:x,width:k.gridAxesSize.width,height:k.gridAxesSize.height}];tI({defsSelection:k.defsSelection,clipPathData:Y})});const N=c.pipe(F(v),U(k=>k.highlightTarget),ft()),z=new rt;return H({graphicGSelection:_,graphicData:M,zeroY:L,groupLabels:I,params:s,chartParams:c,highlightTarget:N,barWidth:E,transformedBarRadius:T,delayGroup:D,transitionItem:C,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:m}).pipe(F(v),B(async k=>k)).subscribe(k=>{const Y=JC({graphicGSelection:k.graphicGSelection,rectClassName:b,barData:k.graphicData,zeroY:k.zeroY,groupLabels:k.groupLabels,params:k.params,chartParams:k.chartParams,barWidth:k.barWidth,transformedBarRadius:k.transformedBarRadius,delayGroup:k.delayGroup,transitionItem:k.transitionItem,isSeriesPositionSeprate:k.isSeriesPositionSeprate});Y.on("mouseover",(j,W)=>{j.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:k.highlightTarget,datum:W,gridIndex:W.gridIndex,series:k.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:k.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:j,data:k.graphicData})}).on("mousemove",(j,W)=>{j.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:k.highlightTarget,datum:W,gridIndex:W.gridIndex,series:k.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:k.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:j,data:k.graphicData})}).on("mouseout",(j,W)=>{j.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:k.highlightTarget,datum:W,gridIndex:W.gridIndex,series:k.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:k.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:j,data:k.graphicData})}).on("click",(j,W)=>{j.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:k.highlightTarget,datum:W,gridIndex:W.gridIndex,series:k.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:k.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:j,data:k.graphicData})}),z.next(Y)}),H({barSelection:z,highlight:p,fullChartParams:c}).pipe(F(v),B(async k=>k)).subscribe(k=>{eI({selection:k.barSelection,ids:k.highlight,fullChartParams:k.fullChartParams})}),()=>{v.next(void 0)}},b2="BarStack",nI=ae(b2,Wh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=y2(b2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),v2=.3;function x2({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function rI(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Yf().domain(e).range([-i/2+r,i/2-r])}function iI(t,e){return t<=1?0:e/(t-1)*v2}function oI(t,e){return t<=1?e:e*(1-v2)}function aI({graphicGSelection:t,pathGClassName:e,pathClassName:n,computedData:r,linearGradientIds:i,zeroYArr:o,groupLabels:a,barScale:s,params:u,chartParams:c,barWidth:l,delayGroup:h,transitionItem:f,isSeriesPositionSeprate:d}){const p=l/2;return t.each((m,y,v)=>{V(v[y]).selectAll(`g.${e}`).data(r[y]??[]).join(b=>{const w=b.append("g").classed(e,!0).attr("cursor","pointer");return w.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",$=>{const A=-p,_=o[y],L=o[y];return`M${A},${_} L${A+l/2},${L} ${A+l},${_}`}),w},b=>b,b=>b.remove()).attr("transform",b=>`translate(${d?0:s(b.seriesLabel)}, 0)`).select(`path.${n}`).attr("height",b=>Math.abs(b.axisYFromZero)).attr("y",b=>b.axisY<o[y]?b.axisY:o[y]).attr("x",b=>d?0:s(b.seriesLabel)).style("fill",b=>`url(#${i[b.seriesIndex]})`).attr("stroke",b=>b.color).attr("transform",b=>`translate(${b?b.axisX:0}, 0)`).transition().duration(f).ease(ar(c.transitionEase)).delay((b,w)=>b.groupIndex*h).attr("d",b=>{const w=-p,$=o[y],A=b.axisY;return`M${w},${$} L${w+l/2},${A} ${w+l},${$}`})}),t.selectAll(`path.${n}`)}function sI({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
|
12
|
+
`})}function YC({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{V(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(ar(r)).tween("tween",(c,l,h)=>f=>{const d=c.width*f;u.attr("x",0).attr("y",0).attr("width",p=>d).attr("height",p=>p.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const h2=(t,{selection:e,computedData$:n,existSeriesLabels$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullDataFormatter$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridAxesSize$:h,gridHighlight$:f,gridContainer$:d,layout$:p,event$:g})=>{const m=new nt,y=Sn(t,"clipPath-box"),v=ot(t,"path"),{seriesSelection$:x,axesSelection$:b,defsSelection$:w,graphicGSelection$:$}=si({selection:e,pluginName:t,clipPathID:y,existSeriesLabels$:r,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),S=l.pipe(F(m),O(M=>-M.translate[1]/M.scale[1])),_=new lt(M=>{const R=W({fullParams:a,valueAxisStart:S}).pipe(F(m)).subscribe(G=>{const A=GC(G.fullParams.lineCurve,G.valueAxisStart);M.next(A)});return()=>{R.unsubscribe()}}),D=new lt(M=>{n.pipe(F(m),B(async R=>R)).subscribe(R=>{const G=R[0]&&R[0][0]?R.map(A=>A[0].seriesLabel):[];M.next(G)})}),L=u.pipe(O(M=>M.transitionDuration),ft()),P=u.pipe(O(M=>M.transitionEase),ft());W({defsSelection:w,seriesLabels:D,axisSize:h,transitionDuration:L,transitionEase:P}).pipe(F(m),B(async M=>M)).subscribe(M=>{const G=[{id:y,width:M.axisSize.width,height:M.axisSize.height}].concat(M.seriesLabels.map(A=>({id:`orbcharts__clipPath_${A}`,width:M.axisSize.width,height:M.axisSize.height})));YC({defsSelection:M.defsSelection,clipPathData:G,transitionDuration:M.transitionDuration,transitionEase:M.transitionEase})});const I=n.pipe(O(M=>{const R=new Map;return M.flat().forEach(G=>R.set(G.id,G)),R})),k=Sh({fullDataFormatter$:s,gridAxesSize$:h,computedData$:n,fullChartParams$:u}),T=u.pipe(F(m),O(M=>M.highlightTarget),ft()),C=D.pipe(F(m),O(M=>M.map((R,G)=>Sn(t,`lineargradient-${R}`))));return W({graphicGSelection:$,defsSelection:w,seriesLabels:D,computedData:n,linearGradientIds:C,SeriesDataMap:i,GroupDataMap:o,areaPath:_,params:a,highlightTarget:T,gridGroupPositionFn:k}).pipe(F(m),B(async M=>M)).subscribe(M=>{M.graphicGSelection.each((R,G,A)=>{const N=zC(M.computedData[G]??[]),z=OC({selection:V(A[G]),pathClassName:v,areaPath:M.areaPath,segmentData:N,linearGradientIds:M.linearGradientIds,params:M.params});BC({defsSelection:M.defsSelection,computedData:M.computedData,linearGradientIds:M.linearGradientIds,params:M.params}),z.on("mouseover",(E,Y)=>{E.stopPropagation();const j=Y[0]?Y[0].seriesLabel:"",{groupIndex:H,groupLabel:X}=M.gridGroupPositionFn(E),U=M.GroupDataMap.get(X).find(tt=>tt.seriesLabel===j)??Y[0];g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:U,gridIndex:U.gridIndex,series:M.SeriesDataMap.get(U.seriesLabel),seriesIndex:U.seriesIndex,seriesLabel:U.seriesLabel,groups:M.GroupDataMap.get(U.groupLabel),groupIndex:U.groupIndex,groupLabel:U.groupLabel,event:E,data:M.computedData})}).on("mousemove",(E,Y)=>{E.stopPropagation();const j=Y[0]?Y[0].seriesLabel:"",{groupIndex:H,groupLabel:X}=M.gridGroupPositionFn(E),U=M.GroupDataMap.get(X).find(tt=>tt.seriesLabel===j)??Y[0];g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:U,gridIndex:U.gridIndex,series:M.SeriesDataMap.get(U.seriesLabel),seriesIndex:U.seriesIndex,seriesLabel:U.seriesLabel,groups:M.GroupDataMap.get(U.groupLabel),groupIndex:U.groupIndex,groupLabel:U.groupLabel,event:E,data:M.computedData})}).on("mouseout",(E,Y)=>{E.stopPropagation();const j=Y[0]?Y[0].seriesLabel:"",{groupIndex:H,groupLabel:X}=M.gridGroupPositionFn(E),U=M.GroupDataMap.get(X).find(tt=>tt.seriesLabel===j)??Y[0];g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:U,gridIndex:U.gridIndex,series:M.SeriesDataMap.get(U.seriesLabel),seriesIndex:U.seriesIndex,seriesLabel:U.seriesLabel,groups:M.GroupDataMap.get(U.groupLabel),groupIndex:U.groupIndex,groupLabel:U.groupLabel,event:E,data:M.computedData})}).on("click",(E,Y)=>{E.stopPropagation();const j=Y[0]?Y[0].seriesLabel:"",{groupIndex:H,groupLabel:X}=M.gridGroupPositionFn(E),U=M.GroupDataMap.get(X).find(tt=>tt.seriesLabel===j)??Y[0];g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:U,gridIndex:U.gridIndex,series:M.SeriesDataMap.get(U.seriesLabel),seriesIndex:U.seriesIndex,seriesLabel:U.seriesLabel,groups:M.GroupDataMap.get(U.groupLabel),groupIndex:U.groupIndex,groupLabel:U.groupLabel,event:E,data:M.computedData})})})}),u.pipe(F(m),fi(M=>M.highlightTarget==="series"),B(M=>W({graphicGSelection:$,gridHighlight:f,DataMap:I,fullChartParams:u}).pipe(F(m),B(async R=>R)))).subscribe(M=>{const R=M.gridHighlight[0]?M.gridHighlight[0].seriesLabel:null;UC({selection:M.graphicGSelection,seriesLabel:R,fullChartParams:M.fullChartParams})}),()=>{m.next(void 0)}},d2="LineAreas",HC=ae(d2,Bh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=h2(d2,{selection:t,computedData$:n.computedData$,existSeriesLabels$:n.existSeriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainer$:n.gridContainer$,layout$:n.layout$,event$:r.event$});return()=>{i.next(void 0),o()}}),p2=.3;function g2({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function WC(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Yf().domain(e).range([-i/2+r,i/2-r])}function qC(t,e){return t<=1?0:e/(t-1)*p2}function XC(t,e){return t<=1?e:e*(1-p2)}function jC({graphicGSelection:t,rectClassName:e,computedData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:u,transformedBarRadius:c,delayGroup:l,transitionItem:h,isSeriesPositionSeprate:f}){const d=u/2;return t.each((g,m,y)=>{V(y[m]).selectAll(`rect.${e}`).data(n[m]??[],v=>v.id).join(v=>v.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",x=>0),v=>v,v=>v.remove()).attr("transform",(v,x)=>`translate(${(v?v.axisX:0)-d}, 0)`).attr("fill",v=>v.color).attr("y",v=>v.axisY<r[m]?v.axisY:r[m]).attr("x",v=>f?0:o(v.seriesLabel)).attr("width",u).attr("rx",c[m][0]??1).attr("ry",c[m][1]??1).transition().duration(h).ease(ar(s.transitionEase)).delay((v,x)=>v.groupIndex*l).attr("height",v=>Math.abs(v.axisYFromZero))}),t.selectAll(`rect.${e}`)}function VC({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function ZC({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Ah=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridGraphicReverseScale$:h,gridAxesSize$:f,gridHighlight$:d,gridContainer$:p,isSeriesPositionSeprate$:g,event$:m})=>{const y=new nt,v=Sn(t,"clipPath-box"),x=ot(t,"rect"),{seriesSelection$:b,axesSelection$:w,defsSelection$:$,graphicGSelection$:S}=si({selection:e,pluginName:t,clipPathID:v,existSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),_=r.pipe(F(y),O(A=>A.map(N=>N[0]?N[0].axisY-N[0].axisYFromZero:0)),ft()),D=W({computedData:n,visibleComputedData:r,params:s,gridAxesSize:f,isSeriesPositionSeprate:g}).pipe(F(y),B(async A=>A),O(A=>A.params.barWidth?A.params.barWidth:A.isSeriesPositionSeprate?g2({axisWidth:A.gridAxesSize.width,groupAmount:A.computedData[0]?A.computedData[0].length:0,barAmountOfGroup:1,barPadding:A.params.barPadding,barGroupPadding:A.params.barGroupPadding}):g2({axisWidth:A.gridAxesSize.width,groupAmount:A.computedData[0]?A.computedData[0].length:0,barAmountOfGroup:A.visibleComputedData.length,barPadding:A.params.barPadding,barGroupPadding:A.params.barGroupPadding})),ft()),L=W({computedData:n,barWidth:D,params:s,gridGraphicReverseScale:h}).pipe(F(y),B(async A=>A),O(A=>{const N=A.barWidth/2,z=A.params.barRadius===!0?N:A.params.barRadius===!1?0:typeof A.params.barRadius=="number"?A.params.barRadius:0;return A.computedData.map((E,Y)=>{const j=A.gridGraphicReverseScale[Y]??A.gridGraphicReverseScale[0];let H=z*j[0],X=z*j[1];if(H>N){const Q=N/H;H=H*Q,X=X*Q}return[H,X]})})),P=r.pipe(F(y),O(A=>{const N=new Set;return A.forEach(z=>{z.forEach(E=>{N.add(E.seriesLabel)})}),Array.from(N)})),I=r.pipe(F(y),O(A=>{const N=new Set;return A.forEach(z=>{z.forEach(E=>{N.add(E.groupLabel)})}),Array.from(N)})),k=W({seriesLabels:P,barWidth:D,params:s}).pipe(F(y),B(async A=>A),O(A=>WC(A.barWidth,A.seriesLabels,A.params))),T=u.pipe(F(y),O(A=>A.transitionDuration),ft()),C=new lt(A=>{W({groupLabels:I,transitionDuration:T}).pipe(B(async N=>N)).subscribe(N=>{const z=qC(N.groupLabels.length,N.transitionDuration);A.next(z)})}).pipe(F(y),ft()),M=new lt(A=>{W({groupLabels:I,transitionDuration:T}).pipe(B(async N=>N)).subscribe(N=>{const z=XC(N.groupLabels.length,N.transitionDuration);A.next(z)})}).pipe(F(y),ft());W({defsSelection:$,gridAxesSize:f}).pipe(F(y),B(async A=>A)).subscribe(A=>{const N=[{id:v,width:A.gridAxesSize.width,height:A.gridAxesSize.height}];VC({defsSelection:A.defsSelection,clipPathData:N})});const R=u.pipe(F(y),O(A=>A.highlightTarget),ft()),G=new nt;return W({graphicGSelection:S,computedData:n,zeroYArr:_,groupLabels:I,barScale:k,params:s,chartParams:u,highlightTarget:R,barWidth:D,transformedBarRadius:L,delayGroup:C,transitionItem:M,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:g}).pipe(F(y),B(async A=>A)).subscribe(A=>{const N=jC({graphicGSelection:A.graphicGSelection,rectClassName:x,computedData:A.computedData,zeroYArr:A.zeroYArr,groupLabels:A.groupLabels,barScale:A.barScale,params:A.params,chartParams:A.chartParams,barWidth:A.barWidth,transformedBarRadius:A.transformedBarRadius,delayGroup:A.delayGroup,transitionItem:A.transitionItem,isSeriesPositionSeprate:A.isSeriesPositionSeprate});N.on("mouseover",(z,E)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:A.highlightTarget,datum:E,gridIndex:E.gridIndex,series:A.SeriesDataMap.get(E.seriesLabel),seriesIndex:E.seriesIndex,seriesLabel:E.seriesLabel,groups:A.GroupDataMap.get(E.groupLabel),groupIndex:E.groupIndex,groupLabel:E.groupLabel,event:z,data:A.computedData})}).on("mousemove",(z,E)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:A.highlightTarget,datum:E,gridIndex:E.gridIndex,series:A.SeriesDataMap.get(E.seriesLabel),seriesIndex:E.seriesIndex,seriesLabel:E.seriesLabel,groups:A.GroupDataMap.get(E.groupLabel),groupIndex:E.groupIndex,groupLabel:E.groupLabel,event:z,data:A.computedData})}).on("mouseout",(z,E)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:A.highlightTarget,datum:E,gridIndex:E.gridIndex,series:A.SeriesDataMap.get(E.seriesLabel),seriesIndex:E.seriesIndex,seriesLabel:E.seriesLabel,groups:A.GroupDataMap.get(E.groupLabel),groupIndex:E.groupIndex,groupLabel:E.groupLabel,event:z,data:A.computedData})}).on("click",(z,E)=>{z.stopPropagation(),m.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:A.highlightTarget,datum:E,gridIndex:E.gridIndex,series:A.SeriesDataMap.get(E.seriesLabel),seriesIndex:E.seriesIndex,seriesLabel:E.seriesLabel,groups:A.GroupDataMap.get(E.groupLabel),groupIndex:E.groupIndex,groupLabel:E.groupLabel,event:z,data:A.computedData})}),G.next(N)}),W({barSelection:G,highlight:d.pipe(O(A=>A.map(N=>N.id))),fullChartParams:u}).pipe(F(y),B(async A=>A)).subscribe(A=>{ZC({selection:A.barSelection,ids:A.highlight,fullChartParams:A.fullChartParams})}),()=>{y.next(void 0)}},m2="Bars",KC=ae(m2,Fo)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=Ah(m2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),y2="BarsDiverging",QC=ae(y2,Fo)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=Ah(y2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:li(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),b2=.3;function JC({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function tI(t,e){return t<=1?0:e/(t-1)*b2}function eI(t,e){return t<=1?e:e*(1-b2)}function nI({graphicGSelection:t,rectClassName:e,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:u,delayGroup:c,transitionItem:l,isSeriesPositionSeprate:h}){const f=s/2;return t.each((p,g,m)=>{V(m[g]).selectAll(`rect.${e}`).data(n[g]??[],y=>y.id).join(y=>y.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",v=>0),y=>y,y=>y.remove()).attr("transform",(y,v)=>`translate(${(y?y.axisX:0)-f}, 0)`).attr("fill",y=>y.color).attr("y",y=>r).attr("x",y=>0).attr("width",s).attr("rx",u[g][0]??1).attr("ry",u[g][1]??1).transition().duration(l).ease(ar(a.transitionEase)).delay((y,v)=>y.groupIndex*c).attr("y",y=>y._barStartY).attr("height",y=>Math.abs(y._barHeight))}),t.selectAll(`rect.${e}`)}function rI({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function iI({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const v2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullDataFormatter$:u,fullChartParams$:c,gridAxesTransform$:l,gridGraphicTransform$:h,gridGraphicReverseScale$:f,gridAxesSize$:d,gridHighlight$:p,gridContainer$:g,isSeriesPositionSeprate$:m,event$:y})=>{const v=new nt,x=Sn(t,"clipPath-box"),b=ot(t,"rect"),{seriesSelection$:w,axesSelection$:$,defsSelection$:S,graphicGSelection$:_}=si({selection:e,pluginName:t,clipPathID:x,existSeriesLabels$:i,gridContainer$:g,gridAxesTransform$:l,gridGraphicTransform$:h}),D=r.pipe(F(v),O(E=>E[0]&&E[0][0]?E[0][0].axisY-E[0][0].axisYFromZero:0),ft()),L=W({computedData:n,params:s,axisSize:d,isSeriesPositionSeprate:m}).pipe(F(v),B(async E=>E),O(E=>E.params.barWidth?E.params.barWidth:JC({axisWidth:E.axisSize.width,groupAmount:E.computedData[0]?E.computedData[0].length:0,barGroupPadding:E.params.barGroupPadding})),ft()),P=W({computedData:n,barWidth:L,params:s,gridGraphicReverseScale:f}).pipe(F(v),B(async E=>E),O(E=>{const Y=E.barWidth/2,j=E.params.barRadius===!0?Y:E.params.barRadius===!1?0:typeof E.params.barRadius=="number"?E.params.barRadius:0;return E.computedData.map((H,X)=>{const Q=E.gridGraphicReverseScale[X]??E.gridGraphicReverseScale[0],ct=j*Q[0],U=j*Q[1];return[ct,U]})})),I=r.pipe(F(v),O(E=>{const Y=new Set;return E.forEach(j=>{j.forEach(H=>{Y.add(H.groupLabel)})}),Array.from(Y)})),k=c.pipe(F(v),O(E=>E.transitionDuration),ft()),T=new lt(E=>{W({groupLabels:I,transitionDuration:k}).pipe(B(async Y=>Y)).subscribe(Y=>{const j=tI(Y.groupLabels.length,Y.transitionDuration);E.next(j)})}).pipe(F(v),ft()),C=new lt(E=>{W({groupLabels:I,transitionDuration:k}).pipe(B(async Y=>Y)).subscribe(Y=>{const j=eI(Y.groupLabels.length,Y.transitionDuration);E.next(j)})}).pipe(F(v),ft()),M=W({computedData:n,dataFormatter:u}).pipe(F(v),B(async E=>E),O(E=>{const j=E.computedData[0]?E.computedData[0].length-1:0,H=E.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-E.dataFormatter.grid.groupAxis.scalePadding:E.dataFormatter.grid.groupAxis.scaleDomain[0]-E.dataFormatter.grid.groupAxis.scalePadding,X=E.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?j+E.dataFormatter.grid.groupAxis.scalePadding:E.dataFormatter.grid.groupAxis.scaleDomain[1]+E.dataFormatter.grid.groupAxis.scalePadding,Q=E.computedData.map(ct=>ct.filter((U,tt)=>U.groupIndex>=H&&U.groupIndex<=X));if(Q.length<=1)return 1;{const ct=Q.flat().map(q=>q.axisYFromZero),U=Math.max(...ct),tt=E.computedData[0]?E.computedData[0].map((q,xt)=>E.computedData.reduce((gt,Ft)=>gt+Ft[xt].axisYFromZero,0)):[],st=Math.max(...tt);return U/st}})),R=W({computedData:n,yRatio:M,zeroY:D}).pipe(F(v),O(E=>{let Y=E.computedData[0]?E.computedData[0].map(()=>E.zeroY):[];return E.computedData.map((j,H)=>j.map((X,Q)=>{const ct=Y[Q],U=X.axisYFromZero*E.yRatio;return Y[Q]=Y[Q]+U,{...X,_barStartY:ct,_barHeight:U}}))})),G=W({computedData:n,zeroY:D}).pipe(F(v),O(E=>E.computedData.map((Y,j)=>Y.map((H,X)=>({...H,_barStartY:E.zeroY,_barHeight:H.axisYFromZero}))))),A=m.pipe(B(E=>Sd(()=>E,G,R)));W({defsSelection:S,gridAxesSize:d}).pipe(F(v),B(async E=>E)).subscribe(E=>{const Y=[{id:x,width:E.gridAxesSize.width,height:E.gridAxesSize.height}];rI({defsSelection:E.defsSelection,clipPathData:Y})});const N=c.pipe(F(v),O(E=>E.highlightTarget),ft()),z=new nt;return W({graphicGSelection:_,graphicData:A,zeroY:D,groupLabels:I,params:s,chartParams:c,highlightTarget:N,barWidth:L,transformedBarRadius:P,delayGroup:T,transitionItem:C,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:m}).pipe(F(v),B(async E=>E)).subscribe(E=>{const Y=nI({graphicGSelection:E.graphicGSelection,rectClassName:b,barData:E.graphicData,zeroY:E.zeroY,groupLabels:E.groupLabels,params:E.params,chartParams:E.chartParams,barWidth:E.barWidth,transformedBarRadius:E.transformedBarRadius,delayGroup:E.delayGroup,transitionItem:E.transitionItem,isSeriesPositionSeprate:E.isSeriesPositionSeprate});Y.on("mouseover",(j,H)=>{j.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:E.highlightTarget,datum:H,gridIndex:H.gridIndex,series:E.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,groups:E.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:j,data:E.graphicData})}).on("mousemove",(j,H)=>{j.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:E.highlightTarget,datum:H,gridIndex:H.gridIndex,series:E.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,groups:E.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:j,data:E.graphicData})}).on("mouseout",(j,H)=>{j.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:E.highlightTarget,datum:H,gridIndex:H.gridIndex,series:E.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,groups:E.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:j,data:E.graphicData})}).on("click",(j,H)=>{j.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:E.highlightTarget,datum:H,gridIndex:H.gridIndex,series:E.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,groups:E.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:j,data:E.graphicData})}),z.next(Y)}),W({barSelection:z,highlight:p.pipe(O(E=>E.map(Y=>Y.id))),fullChartParams:c}).pipe(F(v),B(async E=>E)).subscribe(E=>{iI({selection:E.barSelection,ids:E.highlight,fullChartParams:E.fullChartParams})}),()=>{v.next(void 0)}},x2="BarStack",oI=ae(x2,Wh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=v2(x2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),_2=.3;function w2({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function aI(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Yf().domain(e).range([-i/2+r,i/2-r])}function sI(t,e){return t<=1?0:e/(t-1)*_2}function uI(t,e){return t<=1?e:e*(1-_2)}function cI({graphicGSelection:t,pathGClassName:e,pathClassName:n,computedData:r,linearGradientIds:i,zeroYArr:o,groupLabels:a,barScale:s,params:u,chartParams:c,barWidth:l,delayGroup:h,transitionItem:f,isSeriesPositionSeprate:d}){const p=l/2;return t.each((m,y,v)=>{V(v[y]).selectAll(`g.${e}`).data(r[y]??[]).join(b=>{const w=b.append("g").classed(e,!0).attr("cursor","pointer");return w.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",$=>{const S=-p,_=o[y],D=o[y];return`M${S},${_} L${S+l/2},${D} ${S+l},${_}`}),w},b=>b,b=>b.remove()).attr("transform",b=>`translate(${d?0:s(b.seriesLabel)}, 0)`).select(`path.${n}`).attr("height",b=>Math.abs(b.axisYFromZero)).attr("y",b=>b.axisY<o[y]?b.axisY:o[y]).attr("x",b=>d?0:s(b.seriesLabel)).style("fill",b=>`url(#${i[b.seriesIndex]})`).attr("stroke",b=>b.color).attr("transform",b=>`translate(${b?b.axisX:0}, 0)`).transition().duration(f).ease(ar(c.transitionEase)).delay((b,w)=>b.groupIndex*h).attr("d",b=>{const w=-p,$=o[y],S=b.axisY;return`M${w},${$} L${w+l/2},${S} ${w+l},${$}`})}),t.selectAll(`path.${n}`)}function lI({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
|
13
13
|
<stop offset="0%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[0]}"/>
|
14
14
|
<stop offset="100%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[1]}"/>
|
15
|
-
`})}function uI({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function cI({selection:t,ids:e,fullChartParams:n}){t.interrupt("highlight");const r=()=>{t.transition("highlight").duration(200).style("opacity",1)};if(!e.length){r();return}t.each((i,o,a)=>{e.includes(i.id)?V(a[o]).style("opacity",1):V(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const _2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridAxesSize$:h,gridHighlight$:f,gridContainer$:d,isSeriesPositionSeprate$:p,event$:g})=>{const m=new rt,y=$n(t,"clipPath-box"),v=ot(t,"pathG"),x=ot(t,"path"),{seriesSelection$:b,axesSelection$:w,defsSelection$:$,graphicGSelection$:A}=si({selection:e,pluginName:t,clipPathID:y,existSeriesLabels$:i,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l});l.pipe(F(m),U(M=>-M.translate[1]/M.scale[1]));const _=r.pipe(U(M=>M.map(N=>N[0]?N[0].axisY-N[0].axisYFromZero:0)),ft()),L=H({computedData:n,visibleComputedData:r,params:s,gridAxesSize:h,isSeriesPositionSeprate:p}).pipe(F(m),B(async M=>M),U(M=>M.params.barWidth?M.params.barWidth:M.isSeriesPositionSeprate?x2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:1,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding}):x2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:M.visibleComputedData.length,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding}))),E=r.pipe(F(m),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(k=>{N.add(k.seriesLabel)})}),Array.from(N)})),T=r.pipe(F(m),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(k=>{N.add(k.groupLabel)})}),Array.from(N)})),I=new lt(M=>{H({seriesLabels:E,barWidth:L,params:s}).pipe(F(m),B(async N=>N)).subscribe(N=>{const z=rI(N.barWidth,N.seriesLabels,N.params);M.next(z)})}),P=u.pipe(F(m),U(M=>M.transitionDuration),ft()),D=new lt(M=>{H({groupLabels:T,transitionDuration:P}).pipe(B(async N=>N)).subscribe(N=>{const z=iI(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(m),ft()),C=new lt(M=>{H({groupLabels:T,transitionDuration:P}).pipe(B(async N=>N)).subscribe(N=>{const z=oI(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(m),ft());H({defsSelection:$,gridAxesSize:h}).pipe(F(m),B(async M=>M)).subscribe(M=>{const N=[{id:y,width:M.gridAxesSize.width,height:M.gridAxesSize.height}];uI({defsSelection:M.defsSelection,clipPathData:N})});const S=u.pipe(F(m),U(M=>M.highlightTarget),ft()),R=new rt,G=E.pipe(F(m),U(M=>M.map((N,z)=>$n(t,`lineargradient-${N}`))));return H({graphicGSelection:A,defsSelection:$,computedData:n,linearGradientIds:G,zeroYArr:_,groupLabels:T,barScale:I,params:s,chartParams:u,highlightTarget:S,barWidth:L,delayGroup:D,transitionItem:C,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:p}).pipe(F(m),B(async M=>M)).subscribe(M=>{const N=aI({graphicGSelection:M.graphicGSelection,pathGClassName:v,pathClassName:x,computedData:M.computedData,linearGradientIds:M.linearGradientIds,zeroYArr:M.zeroYArr,groupLabels:M.groupLabels,barScale:M.barScale,params:M.params,chartParams:M.chartParams,barWidth:M.barWidth,delayGroup:M.delayGroup,transitionItem:M.transitionItem,isSeriesPositionSeprate:M.isSeriesPositionSeprate});sI({defsSelection:M.defsSelection,computedData:M.computedData,linearGradientIds:M.linearGradientIds,params:M.params}),N.on("mouseover",(z,k)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("mousemove",(z,k)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("mouseout",(z,k)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("click",(z,k)=>{z.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}),R.next(N)}),H({barSelection:R,highlight:f,fullChartParams:u}).pipe(F(m),B(async M=>M)).subscribe(M=>{cI({selection:M.barSelection,ids:M.highlight,fullChartParams:M.fullChartParams})}),()=>{m.next(void 0)}},w2="BarsTriangle",lI=ae(w2,Hh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=_2(w2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}});function fI({graphicGSelection:t,circleGClassName:e,circleClassName:n,data:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=l=>{const h=l.size();return o.transitionDuration/h};let u=0;return t.each((l,h,f)=>{V(f[h]).selectAll("g").data(r[h],d=>d.id).join(d=>(u=s(d),d.append("g").classed(e,!0)),d=>d,d=>d.remove()).attr("transform",d=>`translate(${d.axisX}, ${d.axisY})`).each((d,p,g)=>{V(g[p]).selectAll("circle").data([d]).join(m=>m.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((y,v)=>p*u).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,y)=>$h({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>$h({datum:m,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[h][0]??1}, ${a[h][1]??1})`)})}),t.selectAll(`circle.${n}`)}function hI({selection:t,ids:e,onlyShowHighlighted:n,fullChartParams:r}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}t.each((i,o,a)=>{e.includes(i.id)?V(a[o]).style("opacity",1).transition("highlight").duration(200):V(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function dI({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const $2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridGraphicReverseScale$:h,gridAxesSize$:f,gridHighlight$:d,gridContainer$:p,event$:g})=>{const m=new rt,y=$n(t,"clipPath-box"),v=ot(t,"circleG"),x=ot(t,"circle"),b=new rt,{seriesSelection$:w,axesSelection$:$,defsSelection$:A,graphicGSelection$:_}=si({selection:e,pluginName:t,clipPathID:y,existSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),L=H({computedData:n,gridGraphicReverseScale:h}).pipe(F(m),B(async P=>P),U(P=>P.computedData.map((D,C)=>P.gridGraphicReverseScale[C])));H({defsSelection:A,gridAxesSize:f}).pipe(F(m),B(async P=>P)).subscribe(P=>{const D=[{id:y,width:P.gridAxesSize.width,height:P.gridAxesSize.height}];dI({defsSelection:P.defsSelection,clipPathData:D})});const E=u.pipe(F(m),U(P=>P.highlightTarget),ft());H({graphicGSelection:_,computedData:n,visibleComputedData:r,SeriesDataMap:o,GroupDataMap:a,graphicReverseScale:L,fullChartParams:u,fullParams:s,highlightTarget:E}).pipe(F(m),B(async P=>P)).subscribe(P=>{const D=fI({graphicGSelection:P.graphicGSelection,circleGClassName:v,circleClassName:x,data:P.visibleComputedData,fullParams:P.fullParams,fullChartParams:P.fullChartParams,graphicReverseScale:P.graphicReverseScale});D.on("mouseover",(C,S)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:P.highlightTarget,datum:S,gridIndex:S.gridIndex,series:P.SeriesDataMap.get(S.seriesLabel),seriesIndex:S.seriesIndex,seriesLabel:S.seriesLabel,groups:P.GroupDataMap.get(S.groupLabel),groupIndex:S.groupIndex,groupLabel:S.groupLabel,event:C,data:P.computedData})}).on("mousemove",(C,S)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:P.highlightTarget,data:P.computedData,datum:S,gridIndex:S.gridIndex,series:P.SeriesDataMap.get(S.seriesLabel),seriesIndex:S.seriesIndex,seriesLabel:S.seriesLabel,groups:P.GroupDataMap.get(S.groupLabel),groupIndex:S.groupIndex,groupLabel:S.groupLabel,event:C})}).on("mouseout",(C,S)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:P.highlightTarget,datum:S,gridIndex:S.gridIndex,series:P.SeriesDataMap.get(S.seriesLabel),seriesIndex:S.seriesIndex,seriesLabel:S.seriesLabel,groups:P.GroupDataMap.get(S.groupLabel),groupIndex:S.groupIndex,groupLabel:S.groupLabel,event:C,data:P.computedData})}).on("click",(C,S)=>{C.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:P.highlightTarget,datum:S,gridIndex:S.gridIndex,series:P.SeriesDataMap.get(S.seriesLabel),seriesIndex:S.seriesIndex,seriesLabel:S.seriesLabel,groups:P.GroupDataMap.get(S.groupLabel),groupIndex:S.groupIndex,groupLabel:S.groupLabel,event:C,data:P.computedData})}),b.next(D)});const T=d.subscribe(),I=s.pipe(F(m),U(P=>P.onlyShowHighlighted),ft());return u.pipe(F(m),B(P=>H({graphicSelection:b,highlight:d,onlyShowHighlighted:I,fullChartParams:u}).pipe(F(m),B(async D=>D)))).subscribe(P=>{hI({selection:P.graphicSelection,ids:P.highlight,onlyShowHighlighted:P.onlyShowHighlighted,fullChartParams:P.fullChartParams})}),()=>{m.next(void 0),T.unsubscribe()}},S2="Dots",pI=ae(S2,Bh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=$2(S2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,event$:n.event$});return()=>{i.next(void 0),o()}}),gI={listRectWidth:14,listRectHeight:14,listRectRadius:0};function A2(t,e){const n=t<e.colors[e.colorScheme].series.length?t:t%e.colors[e.colorScheme].series.length;return e.colors[e.colorScheme].series[n]}const Pu=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o})=>{const a=ot(t,"root-position"),s=ot(t,"legend-card"),u=ot(t,"legend-list"),c=ot(t,"legend-item"),l=new rt,h=H({seriesLabels:n,fullChartParams:o}).pipe(F(l),B(async _=>_),U(_=>{const L=new Map;let E=0;return _.seriesLabels.forEach((T,I)=>{if(!L.has(T)){const P=A2(E,_.fullChartParams);L.set(T,P),E++}}),L})),f=n.pipe(F(l),U(_=>{const L=new Set;let E=[];return _.forEach(T=>{L.has(T)?E.push(!1):E.push(!0),L.add(T)}),E})),d=r.pipe(F(l),U(_=>_.position==="bottom"||_.position==="top"?"row":"column")),p=H({fullParams:r,layout:i}).pipe(F(l),B(async _=>_),U(_=>{const L=_.fullParams.padding*2+_.fullParams.gap*2;return _.fullParams.position==="bottom"||_.fullParams.position==="top"?_.layout.rootWidth-L:_.layout.rootHeight-L})),m=H({layout:i,fullParams:r}).pipe(F(l),B(async _=>_),U(_=>{let L=0,E=0;return _.fullParams.position==="bottom"?(E=_.layout.rootHeight,_.fullParams.justify==="start"?L=0:_.fullParams.justify==="center"?L=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(L=_.layout.rootWidth)):_.fullParams.position==="right"?(L=_.layout.rootWidth,_.fullParams.justify==="start"?E=0:_.fullParams.justify==="center"?E=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(E=_.layout.rootHeight)):_.fullParams.position==="top"?(E=0,_.fullParams.justify==="start"?L=0:_.fullParams.justify==="center"?L=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(L=_.layout.rootWidth)):_.fullParams.position==="left"&&(L=0,_.fullParams.justify==="start"?E=0:_.fullParams.justify==="center"?E=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(E=_.layout.rootHeight)),{x:L,y:E}})).pipe(F(l),U(_=>e.selectAll(`g.${a}`).data([_]).join(L=>L.append("g").classed(a,!0).attr("transform",E=>`translate(${E.x}, ${E.y})`),L=>L.transition().attr("transform",E=>`translate(${E.x}, ${E.y})`),L=>L.remove()))),y=r.pipe(F(l),U(_=>_.seriesList[0]?_.seriesList[0]:gI)),v=H({visibleList:f,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:d,lineMaxSize:p,defaultListStyle:y,SeriesLabelColorMap:h}).pipe(F(l),B(async _=>_),U(_=>_.seriesLabels.reduce((L,E,T)=>{if(!_.visibleList[T])return L;const I=u2(E,_.fullChartParams.styles.textSize),P=_.fullChartParams.styles.textSize*1.5+I,D=_.SeriesLabelColorMap.get(E),C=L[0]&&L[0][0]?L[L.length-1][L[L.length-1].length-1]:null,{translateX:S,translateY:R,lineIndex:G,itemIndex:M}=((z,k,Y)=>{let j=0,W=0,X=0,Q=0;if(z.lineDirection==="column"){let ct=Y?Y.translateY+z.fullChartParams.styles.textSize+z.fullParams.gap:0;if(ct+z.fullChartParams.styles.textSize>z.lineMaxSize){X=Y.lineIndex+1,Q=0,W=0;const O=k[k.length-1].reduce((tt,st)=>st.itemWidth>tt?st.itemWidth:tt,0);j=Y.translateX+O+z.fullParams.gap}else X=Y?Y.lineIndex:0,Q=Y?Y.itemIndex+1:0,W=ct,j=Y?Y.translateX:0}else{let ct=Y?Y.translateX+Y.itemWidth+z.fullParams.gap:0;ct+P>z.lineMaxSize?(X=Y.lineIndex+1,Q=0,j=0):(X=Y?Y.lineIndex:0,Q=Y?Y.itemIndex+1:0,j=ct),W=(z.fullChartParams.styles.textSize+z.fullParams.gap)*X}return{translateX:j,translateY:W,lineIndex:X,itemIndex:Q}})(_,L,C);L[G]||(L[G]=[]);const N=_.fullParams.seriesList[M]?_.fullParams.seriesList[M]:_.defaultListStyle;return L[G].push({id:E,seriesLabel:E,seriesIndex:T,lineIndex:G,itemIndex:M,text:E,itemWidth:P,translateX:S,translateY:R,color:D,listRectWidth:N.listRectWidth,listRectHeight:N.listRectHeight,listRectRadius:N.listRectRadius}),L},[])),Ye(1)),x=H({fullParams:r,fullChartParams:o,lineDirection:d,lengendItems:v}).pipe(F(l),B(async _=>_),U(_=>{const{width:L,height:E}=((T,I)=>{let P=0,D=0;if(!I.length||!I[0].length)return{width:P,height:D};const C=I[0][I[0].length-1];return T.lineDirection==="column"?(P=I.reduce((S,R)=>{const G=R.reduce((M,N)=>N.itemWidth>M?N.itemWidth:M,0);return S+G},0),P+=T.fullParams.gap*(I.length-1),D=C.translateY+T.fullChartParams.styles.textSize):(P=C.translateX+C.itemWidth,D=T.fullChartParams.styles.textSize*I.length+T.fullParams.gap*(I.length-1)),{width:P,height:D}})(_,_.lengendItems);return{direction:_.lineDirection,width:L,height:E,translateX:_.fullParams.gap,translateY:_.fullParams.gap}}),Ye(1)),b=H({fullParams:r,lengendList:x}).pipe(F(l),B(async _=>_),U(_=>{const L=_.lengendList.width+_.fullParams.gap*2,E=_.lengendList.height+_.fullParams.gap*2;let T=0,I=0;return _.fullParams.position==="left"?_.fullParams.justify==="start"?(T=_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(T=_.fullParams.padding,I=-E/2):_.fullParams.justify==="end"&&(T=_.fullParams.padding,I=-E-_.fullParams.padding):_.fullParams.position==="right"?_.fullParams.justify==="start"?(T=-L-_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(T=-L-_.fullParams.padding,I=-E/2):_.fullParams.justify==="end"&&(T=-L-_.fullParams.padding,I=-E-_.fullParams.padding):_.fullParams.position==="top"?_.fullParams.justify==="start"?(T=_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(T=-L/2,I=_.fullParams.padding):_.fullParams.justify==="end"&&(T=-L-_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="start"?(T=_.fullParams.padding,I=-E-_.fullParams.padding):_.fullParams.justify==="center"?(T=-L/2,I=-E-_.fullParams.padding):_.fullParams.justify==="end"&&(T=-L-_.fullParams.padding,I=-E-_.fullParams.padding),{width:L,height:E,translateX:T,translateY:I}})),w=H({rootPositionSelection:m,fullParams:r,fullChartParams:o,legendCard:b}).pipe(F(l),B(async _=>_),U(_=>_.rootPositionSelection.selectAll("g").data([_.legendCard]).join(L=>L.append("g").classed(s,!0).attr("transform",E=>`translate(${E.translateX}, ${E.translateY})`),L=>L.transition().attr("transform",E=>`translate(${E.translateX}, ${E.translateY})`),L=>L.remove()).each((L,E,T)=>{V(T[E]).selectAll("rect").data([L]).join("rect").attr("width",I=>I.width).attr("height",I=>I.height).attr("fill",Et(_.fullParams.backgroundFill,_.fullChartParams)).attr("stroke",Et(_.fullParams.backgroundStroke,_.fullChartParams))}))),$=H({lengendCardSelection:w,fullParams:r,lengendList:x}).pipe(F(l),B(async _=>_),U(_=>_.lengendCardSelection.selectAll("g").data([_.lengendList]).join(L=>L.append("g").classed(u,!0).attr("transform",E=>`translate(${E.translateX}, ${E.translateY})`),L=>L.transition().attr("transform",E=>`translate(${E.translateX}, ${E.translateY})`),L=>L.remove())));return H({lengendListSelection:$,fullParams:r,fullChartParams:o,lengendItems:v}).pipe(F(l),B(async _=>_),U(_=>{const L=_.lengendItems[0]?_.lengendItems.flat():[];return _.lengendListSelection.selectAll(`g.${c}`).data(L).join(E=>E.append("g").classed(c,!0).attr("cursor","default"),E=>E,E=>E.remove()).attr("transform",(E,T)=>`translate(${E.translateX}, ${E.translateY})`).each((E,T,I)=>{const P=_.fullChartParams.styles.textSize/2,D=-E.listRectWidth/2,C=-E.listRectHeight/2;V(I[T]).selectAll("rect").data([E]).join("rect").attr("x",P).attr("y",P).attr("width",S=>S.listRectWidth).attr("height",S=>S.listRectHeight).attr("transform",S=>`translate(${D}, ${C})`).attr("fill",S=>S.color).attr("rx",S=>S.listRectRadius),V(I[T]).selectAll("text").data([E]).join(S=>S.append("text").attr("dominant-baseline","hanging"),S=>S,S=>S.remove()).attr("x",_.fullChartParams.styles.textSize*1.5).attr("font-size",_.fullChartParams.styles.textSize).attr("fill",S=>_.fullParams.textColorType==="series"?A2(S.seriesIndex,_.fullChartParams):Et(_.fullParams.textColorType,_.fullChartParams)).text(S=>S.text)})})).subscribe(),()=>{l.next(void 0)}},M2="GridLegend",mI=ae(M2,Vh)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.SeriesDataMap$.pipe(F(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Pu(M2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),Mh=6;function yI({selection:t,xAxisClassName:e,groupingLabelClassName:n,params:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,chartParams:u,groupScale:c,textTransform:l}){const h=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((p,g,m)=>{V(m[g]).selectAll("text").data([p]).join(y=>y.append("text").style("font-weight","bold"),y=>y,y=>y.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).style("font-size",`${u.styles.textSize}px`).style("fill",Et(r.labelColorType,u)).style("transform",l).text(y=>s.grid.groupAxis.label)}).attr("transform",p=>`translate(${a.width+p.tickPadding+r.labelOffset[0]}, ${-p.tickPadding-Mh-r.labelOffset[1]})`);const f=Ng(c).scale(c).tickSize(r.tickFullLine==!0?-a.height:Mh).tickSizeOuter(0).tickFormat(p=>wh(p,r.tickFormat)).tickPadding(r.tickPadding),d=h.transition().duration(100).call(f);return d.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Et(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),d.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Et(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),h.selectAll("text").style("font-family","sans-serif").style("font-size",`${u.styles.textSize}px`).style("color",Et(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`0 -${r.tickPadding+Mh}`).style("transform",l),h}const T2=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new rt,f=ot(t,"container"),d=ot(t,"xAxisG"),p=ot(t,"xAxis"),g=ot(t,"groupingLabel"),m=H({computedData:n.pipe(ft(($,A)=>$.length===A.length)),isSeriesPositionSeprate:l}).pipe(F(h),B(async $=>$),U($=>$.isSeriesPositionSeprate?$.computedData:[$.computedData[0]]),U(($,A)=>e.selectAll(`g.${f}`).data($,_=>_[0]?_[0].seriesIndex:A).join("g").classed(f,!0))),y=m.pipe(F(h),U(($,A)=>$.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));H({containerSelection:m,gridContainer:c}).pipe(F(h),B(async $=>$)).subscribe($=>{$.containerSelection.attr("transform",(A,_)=>{const L=$.gridContainer[_]??$.gridContainer[0],E=L.translate,T=L.scale;return`translate(${E[0]}, ${E[1]}) scale(${T[0]}, ${T[1]})`})}),H({axisSelection:y,gridAxesTransform:a}).pipe(F(h),B(async $=>$)).subscribe($=>{$.axisSelection.style("transform",$.gridAxesTransform.value)});const v=H({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(F(h),B(async $=>$),U($=>{const A=`translate(${$.gridAxesReverseTransform.translate[0]}px, ${$.gridAxesReverseTransform.translate[1]}px)`,_=`rotate(${$.gridAxesReverseTransform.rotate}deg) rotateX(${$.gridAxesReverseTransform.rotateX}deg) rotateY(${$.gridAxesReverseTransform.rotateY}deg)`,L=`scale(${1/$.gridContainer[0].scale[0]}, ${1/$.gridContainer[0].scale[1]})`,T=`rotate(${$.fullDataFormatter.grid.groupAxis.position==="left"&&$.fullDataFormatter.grid.valueAxis.position==="top"||$.fullDataFormatter.grid.groupAxis.position==="right"&&$.fullDataFormatter.grid.valueAxis.position==="bottom"?$.fullParams.tickTextRotate+180:$.fullParams.tickTextRotate}deg)`;return`${A} ${_} ${L} ${T}`}),ft()),x=new lt($=>{H({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(F(h),B(async A=>A)).subscribe(A=>{const L=A.computedData[0]?A.computedData[0].length-1:0,E=A.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-A.fullDataFormatter.grid.groupAxis.scalePadding:A.fullDataFormatter.grid.groupAxis.scaleDomain[0]-A.fullDataFormatter.grid.groupAxis.scalePadding,T=A.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?L+A.fullDataFormatter.grid.groupAxis.scalePadding:A.fullDataFormatter.grid.groupAxis.scaleDomain[1]+A.fullDataFormatter.grid.groupAxis.scalePadding,I=A.computedData[0]?A.computedData[0].length:0;let P=(A.computedData[0]??[]).map(R=>R.groupLabel);const D=new Array(I).fill(0).map((R,G)=>P[G]!=null?P[G]:String(G)).filter((R,G)=>G>=E&&G<=T),C=A.fullDataFormatter.grid.groupAxis.scalePadding,S=ag({axisLabels:D,axisWidth:A.gridAxesSize.width,padding:C});$.next(S)})}),b=H({fullDataFormatter:i,fullParams:r}).pipe(F(h),B(async $=>$),U($=>{let A="middle",_="hanging";return $.fullDataFormatter.grid.groupAxis.position==="bottom"?(A=$.fullParams.tickTextRotate?"end":"middle",_="hanging"):$.fullDataFormatter.grid.groupAxis.position==="top"?(A=$.fullParams.tickTextRotate?"end":"middle",_="auto"):$.fullDataFormatter.grid.groupAxis.position==="left"?(A="end",_="middle"):$.fullDataFormatter.grid.groupAxis.position==="right"&&(A="start",_="middle"),{textAnchor:A,dominantBaseline:_}})),w=i.pipe(F(h),U($=>{let A="start",_="hanging";return $.grid.groupAxis.position==="bottom"?_="hanging":$.grid.groupAxis.position==="top"?_="auto":$.grid.groupAxis.position==="left"?A="end":$.grid.groupAxis.position==="right"&&(A="start"),$.grid.valueAxis.position==="left"?A="start":$.grid.valueAxis.position==="right"?A="end":$.grid.valueAxis.position==="bottom"?_="auto":$.grid.valueAxis.position==="top"&&(_="hanging"),{textAnchor:A,dominantBaseline:_}}));return H({axisSelection:y,params:r,tickTextAlign:b,axisLabelAlign:w,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:x,textTransform:v}).pipe(F(h),B(async $=>$)).subscribe($=>{yI({selection:$.axisSelection,xAxisClassName:p,groupingLabelClassName:g,params:$.params,tickTextAlign:$.tickTextAlign,axisLabelAlign:$.axisLabelAlign,gridAxesSize:$.gridAxesSize,fullDataFormatter:$.fullDataFormatter,chartParams:$.chartParams,groupScale:$.groupScale,textTransform:$.textTransform})}),()=>{h.next(void 0)}},P2="GroupAxis",bI=ae(P2,qh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=T2(P2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),o()}}),D2=6;function vI({selection:t,yAxisClassName:e,textClassName:n,fullParams:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,fullChartParams:u,valueScale:c,textTransform:l,minAndMax:h}){const f=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((y,v,x)=>{V(x[v]).selectAll("text").data([y]).join(b=>b.append("text").style("font-weight","bold"),b=>b,b=>b.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).style("font-size",`${u.styles.textSize}px`).style("fill",Et(r.labelColorType,u)).style("transform",l).text(b=>s.grid.valueAxis.label)}).attr("transform",y=>`translate(${-y.tickPadding+r.labelOffset[0]}, ${a.height+y.tickPadding+r.labelOffset[1]})`);const d=h[1]-h[0],p=Fg(c).scale(c).ticks(d>r.ticks?r.ticks:h[0]===0&&h[1]===0?1:Math.ceil(d)).tickFormat(y=>wh(y,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:D2).tickPadding(r.tickPadding),g=f.transition().duration(100).call(p);return g.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Et(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),g.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Et(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${u.styles.textSize}px`).style("color",Et(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`-${r.tickPadding+D2} 0`).style("transform",l),f}const Du=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new rt,f=ot(t,"container"),d=ot(t,"yAxisG"),p=ot(t,"yAxis"),g=ot(t,"text"),m=H({computedData:n.pipe(ft((A,_)=>A.length===_.length)),isSeriesPositionSeprate:l}).pipe(F(h),B(async A=>A),U(A=>A.isSeriesPositionSeprate?A.computedData:[A.computedData[0]]),U((A,_)=>e.selectAll(`g.${f}`).data(A,L=>L[0]?L[0].seriesIndex:_).join("g").classed(f,!0))),y=m.pipe(F(h),U((A,_)=>A.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));H({containerSelection:m,gridContainer:c}).pipe(F(h),B(async A=>A)).subscribe(A=>{A.containerSelection.attr("transform",(_,L)=>{const E=A.gridContainer[L]??A.gridContainer[0],T=E.translate,I=E.scale;return`translate(${T[0]}, ${T[1]}) scale(${I[0]}, ${I[1]})`})}),H({axisSelection:y,gridAxesTransform:a}).pipe(F(h),B(async A=>A)).subscribe(A=>{A.axisSelection.style("transform",A.gridAxesTransform.value)});const v=H({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(F(h),B(async A=>A),U(A=>{const _=`translate(${A.gridAxesReverseTransform.translate[0]}px, ${A.gridAxesReverseTransform.translate[1]}px)`,L=`rotate(${A.gridAxesReverseTransform.rotate}deg) rotateX(${A.gridAxesReverseTransform.rotateX}deg) rotateY(${A.gridAxesReverseTransform.rotateY}deg)`,E=`scale(${1/A.gridContainer[0].scale[0]}, ${1/A.gridContainer[0].scale[1]})`,I=`rotate(${A.fullDataFormatter.grid.groupAxis.position==="left"&&A.fullDataFormatter.grid.valueAxis.position==="top"||A.fullDataFormatter.grid.groupAxis.position==="right"&&A.fullDataFormatter.grid.valueAxis.position==="bottom"?A.fullParams.tickTextRotate+180:A.fullParams.tickTextRotate}deg)`;return`${_} ${L} ${E} ${I}`}),ft()),x=new lt(A=>{H({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(F(h),B(async _=>_)).subscribe(_=>{const E=_.computedData[0]?_.computedData[0].length-1:0,T=_.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-_.fullDataFormatter.grid.groupAxis.scalePadding:_.fullDataFormatter.grid.groupAxis.scaleDomain[0]-_.fullDataFormatter.grid.groupAxis.scalePadding,I=_.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?E+_.fullDataFormatter.grid.groupAxis.scalePadding:_.fullDataFormatter.grid.groupAxis.scaleDomain[1]+_.fullDataFormatter.grid.groupAxis.scalePadding,P=_.computedData.map((C,S)=>C.filter((R,G)=>G>=T&&G<=I)),D=TC(P.flat());A.next(D)})}),b=new lt(A=>{H({fullDataFormatter:i,gridAxesSize:u,minAndMax:x}).pipe(F(h),B(async _=>_)).subscribe(_=>{const L=og({maxValue:_.minAndMax[1],minValue:_.minAndMax[0],axisWidth:_.gridAxesSize.height,scaleDomain:_.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:_.fullDataFormatter.grid.valueAxis.scaleRange});A.next(L)})}),w=i.pipe(F(h),U(A=>{let _="start",L="hanging";return A.grid.valueAxis.position==="left"?(_="end",L="middle"):A.grid.valueAxis.position==="right"?(_="start",L="middle"):A.grid.valueAxis.position==="bottom"?(_="middle",L="hanging"):A.grid.valueAxis.position==="top"&&(_="middle",L="auto"),{textAnchor:_,dominantBaseline:L}})),$=i.pipe(F(h),U(A=>{let _="start",L="hanging";return A.grid.groupAxis.position==="bottom"?L="auto":A.grid.groupAxis.position==="top"?L="hanging":A.grid.groupAxis.position==="left"?_="start":A.grid.groupAxis.position==="right"&&(_="end"),A.grid.valueAxis.position==="left"?_="end":A.grid.valueAxis.position==="right"?_="start":A.grid.valueAxis.position==="bottom"?L="hanging":A.grid.valueAxis.position==="top"&&(L="auto"),{textAnchor:_,dominantBaseline:L}}));return H({axisSelection:y,fullParams:r,tickTextAlign:w,axisLabelAlign:$,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:b,textTransform:v,minAndMax:x}).pipe(F(h),B(async A=>A)).subscribe(A=>{vI({selection:A.axisSelection,yAxisClassName:p,textClassName:g,fullParams:A.fullParams,tickTextAlign:A.tickTextAlign,axisLabelAlign:A.axisLabelAlign,gridAxesSize:A.gridAxesSize,fullDataFormatter:A.fullDataFormatter,fullChartParams:A.fullChartParams,valueScale:A.valueScale,textTransform:A.textTransform,minAndMax:A.minAndMax})}),()=>{h.next(void 0)}},L2="ValueAxis",xI=ae(L2,Lu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=Du(L2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),o()}}),E2="ValueStackAxis",_I=ae(E2,Xh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=n.computedData$.pipe(F(i),U(s=>{const u=new Array(s[0]?s[0].length:0).fill(null).map((l,h)=>s.reduce((f,d)=>{if(d&&d[h]){const p=d[h].value==null||d[h].visible==!1?0:d[h].value;return f+p}return f},0));return s.map((l,h)=>l.map((f,d)=>({...f,value:u[d]})))})),a=Du(E2,{selection:t,computedData$:n.isSeriesPositionSeprate$.pipe(B(s=>$d(()=>s,n.computedData$,o))),fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),a()}}),k2="ScalingArea",wI=ot(k2,"rect"),$I=ae(k2,jh)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new rt,a=e.insert("rect","g").classed(wI,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(F(o)).subscribe(c=>{a.attr("width",c.width).attr("height",c.height).attr("x",c.left).attr("y",c.top)});const u=r.computedData$.pipe(U(c=>c[0]?c[0].length-1:0),ft());return H({initGroupAxis:r.fullDataFormatter$.pipe(U(c=>c.grid.groupAxis),hi()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(F(o),B(async c=>c)).subscribe(c=>{const h=c.groupMaxIndex,f=c.initGroupAxis.scaleDomain[0]==="auto"?0-c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[0]-c.initGroupAxis.scalePadding,d=c.initGroupAxis.scaleDomain[1]==="auto"?h+c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[1]+c.initGroupAxis.scalePadding,g=og({maxValue:c.groupMaxIndex,minValue:0,axisWidth:c.axisSize.width,scaleDomain:[f,d],scaleRange:[0,1]}).copy(),m=a2().on("zoom",function(v){const x=v.transform,b=A=>{const _=Math.round(A);return Math.min(h,Math.max(0,_))},w=c.fullDataFormatter.grid.groupAxis.position==="bottom"||c.fullDataFormatter.grid.groupAxis.position==="top"?x.rescaleX(g).domain().map(b):x.rescaleY(g).domain().map(b);w[0]<=0&&w[1]>=h?x.k<s.k&&(x.k=s.k,x.x=s.x,x.y=s.y):w[1]-w[0]<=1&&x.k>s.k&&(x.k=s.k,x.x=s.x,x.y=s.y),s.k=x.k,s.x=x.x,s.y=x.y;const $={...c.fullDataFormatter,grid:{...c.fullDataFormatter.grid,groupAxis:{...c.fullDataFormatter.grid.groupAxis,scaleDomain:w}}};i.dataFormatter$.next($)});e.call(m)}),()=>{o.next(void 0),a.remove()}});function SI(t,e){let n=new lt(()=>{});return t.each(function(){const r=Yu(this,e);n=Wu(n,r)}),n}const Th="GroupAux",Ph=ot(Th,"label-box");function AI({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function MI({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=ot(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",c=>Et(r.lineColorType,i)).style("stroke-width",1).style("stroke-dasharray",r.lineDashArray??"none").style("pointer-events","none"),u=a.merge(s);return a.exit().remove(),s.attr("x1",c=>c.x1).attr("y1",c=>c.y1).attr("x2",c=>c.x2).attr("y2",c=>c.y2),a.transition().duration(50).attr("x1",c=>c.x1).attr("y1",c=>c.y1).attr("x2",c=>c.x2).attr("y2",c=>c.y2),u}function TI(t){t.selectAll("line").data([]).exit().remove()}function PI({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:wh(t,n.labelTextFormat)}]:[]}function DI({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesReverseTransformValue:i}){const o=r.styles.textSize+4,a=t.selectAll(`g.${Ph}`).data(e),s=a.enter().append("g").classed(Ph,!0).style("cursor","pointer"),u=s.merge(a);return s.attr("transform",(c,l)=>`translate(${c.x}, ${c.y})`),a.transition().duration(50).attr("transform",(c,l)=>`translate(${c.x}, ${c.y})`),a.exit().remove(),u.each((c,l,h)=>{const f=u2(c.text,r.styles.textSize)+12,d=-f/2,p=V(h[l]).selectAll("rect").data([c]),g=p.enter().append("rect").attr("height",`${o}px`).attr("fill",v=>Et(n.labelColorType,r)).attr("x",d).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");p.merge(g).attr("width",v=>`${f}px`).style("transform",i),p.exit().remove();const m=V(h[l]).selectAll("text").data([c]),y=m.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");m.merge(y).text(v=>v.text).style("transform",i).attr("fill",v=>Et(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",d+6),m.exit().remove()}),u}function LI(t){t.selectAll(`g.${Ph}`).data([]).exit().remove()}const EI=ae(Th,Yh)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new rt,a=e.insert("rect","g").classed(ot(Th,"rect"),!0).attr("opacity",0),s=t.append("g");i.layout$.pipe(F(o)).subscribe(f=>{a.attr("width",f.rootWidth).attr("height",f.rootHeight)}),i.gridAxesTransform$.pipe(F(o),U(f=>f.value),ft()).subscribe(f=>{s.style("transform",f)});const u=new lt(f=>{H({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(F(o),B(async d=>d)).subscribe(d=>{const g=d.computedData[0]?d.computedData[0].length-1:0,m=d.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-d.fullDataFormatter.grid.groupAxis.scalePadding:d.fullDataFormatter.grid.groupAxis.scaleDomain[0]-d.fullDataFormatter.grid.groupAxis.scalePadding,y=d.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?g+d.fullDataFormatter.grid.groupAxis.scalePadding:d.fullDataFormatter.grid.groupAxis.scaleDomain[1]+d.fullDataFormatter.grid.groupAxis.scalePadding,v=d.computedData[0]?d.computedData[0].length:0;let x=d.fullDataFormatter.grid.gridData.seriesDirection==="row"?(d.computedData[0]??[]).map(A=>A.groupLabel):d.computedData.map(A=>A[0].groupLabel);const b=new Array(v).fill(0).map((A,_)=>x[_]!=null?x[_]:String(_)).filter((A,_)=>_>=m&&_<=y),w=d.fullDataFormatter.grid.groupAxis.scalePadding,$=ag({axisLabels:b,axisWidth:d.gridAxesSize.width,padding:w});f.next($)})}),c=Sh({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),l=i.fullChartParams$.pipe(F(o),U(f=>f.highlightTarget),ft());return H({computedData:i.computedData$,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:l,SeriesDataMap:i.SeriesDataMap$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:c,groupScale:u}).pipe(F(o),B(async f=>f)).subscribe(f=>{e.on("mouseover",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("mousemove",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("mouseout",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("click",(d,p)=>{d.stopPropagation();const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})})}),H({event:r.event$.pipe(fi(f=>f.eventName==="mouseover"||f.eventName==="mousemove")),computedData:i.computedData$,groupScale:u,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:l,gridAxesReverseTransform:i.gridAxesReverseTransform$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:c}).pipe(F(o),B(async f=>f)).subscribe(f=>{const d=f.groupScale(f.event.groupLabel)??0,p=AI({groupLabel:f.event.groupLabel,axisX:d,axisHeight:f.gridAxesSize.height,fullParams:f.fullParams});MI({selection:s,pluginName:n,lineData:p,fullParams:f.fullParams,fullChartParams:f.fullChartParams});const g=PI({groupLabel:f.event.groupLabel,axisX:d,fullParams:f.fullParams});DI({selection:s,labelData:g,fullParams:f.fullParams,fullChartParams:f.fullChartParams,gridAxesReverseTransformValue:f.gridAxesReverseTransform.value}).on("mouseover",(y,v)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})}).on("mousemove",(y,v)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})}).on("mouseout",(y,v)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})}).on("click",(y,v)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})})}),SI(a,"mouseout").pipe(F(o)).subscribe(f=>{console.log("rootMouseout"),TI(s),LI(s)}),()=>{o.next(void 0),a.remove()}}),C2={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,gridList:[{listRectWidth:14,listRectHeight:14,listRectRadius:0}],textColorType:"primary"},I2={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},R2={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},N2={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},F2={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},G2={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},z2={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},O2={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},U2={firstAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},secondAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},gridIndexes:[0,1]},B2="MultiGridLegend",kI=Xe(B2,C2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.multiGridEachDetail$.pipe(F(i),U(c=>c.map((h,f)=>h.SeriesDataMap$.pipe(U(d=>Array.from(d.keys()))))),B(c=>H(c)),U(c=>c.flat())),a=H({fullParams:n.fullParams$,multiGrid:n.multiGridEachDetail$,computedData:n.computedData$}).pipe(F(i),B(async c=>c),U(c=>c.computedData.map((l,h)=>{const f=fc(c.fullParams.gridList[h]??{},{listRectWidth:c.fullParams.listRectWidth,listRectHeight:c.fullParams.listRectHeight,listRectRadius:c.fullParams.listRectRadius});return l.map(d=>f)}).flat())),s=H({fullParams:n.fullParams$,seriesList:a}).pipe(F(i),B(async c=>c),U(c=>({...c.fullParams,seriesList:c.seriesList}))),u=Pu(B2,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),u()}}),Sn=t=>{const e=t.fullParams$.pipe(U(r=>r.gridIndexes),ft(),Ye(1)),n=new rt;return e.pipe(U(r=>r.map(i=>{n.next(void 0);const o=li(i).pipe(F(n),Ye(1)),a=H({computedData:t.computedData$,gridIndex:o}).pipe(F(n),U(w=>w.computedData[w.gridIndex]??w.computedData[0])),s=H({fullDataFormatter:t.fullDataFormatter$,gridIndex:o}).pipe(F(n),U(w=>{const $=w.fullDataFormatter.gridList[0];return{type:"grid",grid:{...w.fullDataFormatter.gridList[w.gridIndex]??$},container:{...w.fullDataFormatter.container}}})),u=H({multiGridEachDetail:t.multiGridEachDetail$,gridIndex:o}).pipe(F(n),B(async w=>w),U(w=>w.multiGridEachDetail[w.gridIndex]??w.multiGridEachDetail[0]),Ye(1)),c=u.pipe(B(w=>w.isSeriesPositionSeprate$)),l=u.pipe(B(w=>w.gridContainer$)),h=u.pipe(B(w=>w.gridAxesTransform$)),f=u.pipe(B(w=>w.gridAxesReverseTransform$)),d=u.pipe(B(w=>w.gridAxesSize$)),p=u.pipe(B(w=>w.gridGraphicTransform$)),g=u.pipe(B(w=>w.gridGraphicReverseScale$)),m=u.pipe(B(w=>w.gridHighlight$)),y=u.pipe(B(w=>w.existSeriesLabels$)),v=u.pipe(B(w=>w.SeriesDataMap$)),x=u.pipe(B(w=>w.GroupDataMap$)),b=u.pipe(B(w=>w.visibleComputedData$));return{gridComputedData$:a,gridDataFormatter$:s,gridAxesTransform$:h,gridGraphicTransform$:p,gridGraphicReverseScale$:g,gridAxesReverseTransform$:f,gridAxesSize$:d,gridHighlight$:m,existSeriesLabels$:y,SeriesDataMap$:v,GroupDataMap$:x,visibleComputedData$:b,isSeriesPositionSeprate$:c,gridContainer$:l}})))},Dh="MultiBars",Y2=ot(Dh,"grid"),CI=Xe(Dh,N2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Y2}`).data(s).join("g").attr("class",Y2).each((u,c,l)=>{const h=V(l[c]);o[c]=Ah(Dh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Lh="MultiBarStack",W2=ot(Lh,"grid"),II=Xe(Lh,F2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${W2}`).data(s).join("g").attr("class",W2).each((u,c,l)=>{const h=V(l[c]);o[c]=y2(Lh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Eh="MultiBarsTriangle",H2=ot(Eh,"grid"),RI=Xe(Eh,G2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${H2}`).data(s).join("g").attr("class",H2).each((u,c,l)=>{const h=V(l[c]);o[c]=_2(Eh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),kh="MultiLines",q2=ot(kh,"grid"),NI=Xe(kh,z2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${q2}`).data(s).join("g").attr("class",q2).each((u,c,l)=>{const h=V(l[c]);o[c]=c2(kh,{selection:h,computedData$:u.gridComputedData$,existSeriesLabels$:u.existSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullDataFormatter$:u.gridDataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ch="MultiDots",X2=ot(Ch,"grid"),FI=Xe(Ch,O2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${X2}`).data(s).join("g").attr("class",X2).each((u,c,l)=>{const h=V(l[c]);o[c]=$2(Ch,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ih="MultiGroupAxis",j2=ot(Ih,"grid"),GI=Xe(Ih,I2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${j2}`).data(s).join("g").attr("class",j2).each((u,c,l)=>{const h=V(l[c]);o[c]=T2(Ih,{selection:h,computedData$:u.gridComputedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Rh="MultiValueAxis",V2=ot(Rh,"grid"),zI=Xe(Rh,R2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${V2}`).data(s).join("g").attr("class",V2).each((u,c,l)=>{const h=V(l[c]);o[c]=Du(Rh,{selection:h,computedData$:u.gridComputedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(s=>s())}});function Z2(t,e,n,r){const{gap:i,rowAmount:o,columnAmount:a}=e,s=(t.width-i*(a-1))/a,u=(t.height-i*(o-1))/o,c=r*s+r*i,l=n*u+n*i,h=[c,l],f=[s/t.width,u/t.height];return{translate:h,scale:f}}const OI=({fullDataFormatter$:t,layout$:e})=>{const n=new rt;function r({xAxis:i,yAxis:o,width:a,height:s}){if(!i||!o)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let u=0,c=0,l=0,h=0,f=0;return i.position==="bottom"?o.position==="left"?(h=180,c=s):o.position==="right"?(h=180,f=180,u=a,c=s):(h=180,c=s):i.position==="top"?o.position==="left"||(o.position==="right"?(f=180,u=a):(h=180,c=s)):i.position==="left"?o.position==="bottom"?(l=-90,c=s):o.position==="top"?(l=-90,f=180):(h=180,c=s):i.position==="right"&&(o.position==="bottom"?(l=-90,h=180,c=s,u=a):o.position==="top"?(l=-90,h=180,f=180,u=a):(h=180,c=s)),{translate:[u,c],scale:[1,1],rotate:l,rotateX:h,rotateY:f,value:`translate(${u}px, ${c}px) rotate(${l}deg) rotateX(${h}deg) rotateY(${f}deg)`}}return new lt(i=>(H({fullDataFormatter:t,layout:e}).pipe(F(n),B(async o=>o)).subscribe(o=>{const a=r({xAxis:o.fullDataFormatter.grid.groupAxis,yAxis:o.fullDataFormatter.grid.valueAxis,width:o.layout.width,height:o.layout.height});i.next(a)}),function(){n.next(void 0)}))},UI=({gridAxesTransform$:t})=>t.pipe(U(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,o=e.rotateX*-1,a=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:o,rotateY:a,value:`translate(${n[0]}px, ${n[1]}px) rotate(${i}deg) rotateX(${o}deg) rotateY(${a}deg)`}})),BI=({computedData$:t,fullDataFormatter$:e,fullChartParams$:n,layout$:r})=>H({computedData:t,fullDataFormatter:e,fullChartParams:n,layout:r}).pipe(B(async o=>o),U(o=>{const a=o.fullDataFormatter.grid;if(!!(a.seriesSlotIndexes&&a.seriesSlotIndexes.length===o.computedData.length))return o.computedData.map((u,c)=>{const l=a.seriesSlotIndexes[c]%o.fullDataFormatter.container.columnAmount,h=Math.floor(a.seriesSlotIndexes[c]/o.fullDataFormatter.container.columnAmount),{translate:f,scale:d}=Z2(o.layout,o.fullDataFormatter.container,h,l);return{slotIndex:a.seriesSlotIndexes[c],rowIndex:h,columnIndex:l,translate:f,scale:d}});{const u=a.slotIndex%o.fullDataFormatter.container.columnAmount,c=Math.floor(a.slotIndex/o.fullDataFormatter.container.columnAmount);return o.computedData.map((l,h)=>{const{translate:f,scale:d}=Z2(o.layout,o.fullDataFormatter.container,c,u);return{slotIndex:a.slotIndex,rowIndex:c,columnIndex:u,translate:f,scale:d}})}})),Nh="OverlappingValueAxes",K2=ot(Nh,"grid"),YI=Xe(Nh,U2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[],a=r.fullParams$.pipe(F(i),U(l=>l.gridIndexes[0])),s=r.fullParams$.pipe(F(i),U(l=>l.gridIndexes[1])),u=H({firstGridIndex:a,secondGridIndex:s}).pipe(F(i),B(l=>r.fullDataFormatter$.pipe(F(i),U(h=>{h.gridList[l.secondGridIndex]||(h.gridList[l.secondGridIndex]=Object.assign({},h.gridList[l.firstGridIndex]));let f="";return h.gridList[l.firstGridIndex].valueAxis.position==="left"?f="right":h.gridList[l.firstGridIndex].valueAxis.position==="bottom"?f="top":h.gridList[l.firstGridIndex].valueAxis.position==="top"?f="bottom":h.gridList[l.firstGridIndex].valueAxis.position==="right"&&(f="left"),console.log("reversePosition",f),{type:"grid",grid:{...h.gridList[l.secondGridIndex],valueAxis:{...h.gridList[l.secondGridIndex].valueAxis,position:f}},container:{...h.container}}}))));return li(r).pipe(F(i),U(l=>({...l,fullParams$:l.fullParams$.pipe(U(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),B(l=>Sn(l)),U(l=>l.map((h,f)=>{if(f===0)return h;const d=OI({fullDataFormatter$:u,layout$:r.layout$}),p=UI({gridAxesTransform$:d}),g=BI({computedData$:h.gridComputedData$,fullDataFormatter$:u,fullChartParams$:r.fullChartParams$,layout$:r.layout$});return{...h,gridAxesTransform$:d,gridAxesReverseTransform$:p,gridContainer$:g}}))).subscribe(l=>{o.forEach(h=>h()),t.selectAll(`g.${K2}`).data(l).join("g").attr("class",K2).each((h,f,d)=>{if(f>1)return;const p=V(d[f]);o[f]=Du(Nh,{selection:p,computedData$:h.gridComputedData$,fullParams$:r.fullParams$.pipe(U(g=>f===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:h.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:h.gridAxesTransform$,gridAxesReverseTransform$:h.gridAxesReverseTransform$,gridAxesSize$:h.gridAxesSize$,gridContainer$:h.gridContainer$,isSeriesPositionSeprate$:h.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(l=>l())}}),Q2={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},J2={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:t=>{if(t.highlightTarget==="datum"&&t.datum)return[`${t.datum.label}: ${t.datum.value}`];if(t.highlightTarget==="series"){const e=t.seriesLabel,n=t.series.map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.series.map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="category"){const e=t.categoryLabel,n=t.category.map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}return[]},svgRenderFn:null},WI=sg("Container",Q2)(({selection:t})=>function(){}),Fh="Tooltip",tx=ot(Fh,"g"),HI=ot(Fh,"box");function qI(t,e){const n=e.textSize*1.5;return t.filter(r=>r!="").map((r,i)=>{const o=i*n;return`<text font-size="${e.textSize}" fill="${e.textColor}" x="0" y="${o}" style="dominant-baseline:text-before-edge">${r}</text>`}).join()}function XI({rootSelection:t,pluginName:e,rootWidth:n,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const s=5,u=i?[i]:[],c=i?[o]:[],h=t.selectAll(`g.${tx}`).data(u).join(b=>b.append("g").classed(tx,!0).attr("pointer-events","none"),b=>b,b=>b.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${HI}`).data(c).join(b=>b.append("g").classed(ot(e,"box"),!0)),f=h.selectAll("rect").data(c).join(b=>b.append("rect").attr("rx",s).attr("ry",s)).attr("fill",b=>b.backgroundColor).attr("stroke",b=>b.strokeColor).attr("opacity",b=>b.backgroundOpacity),d=h.selectAll("g").data(u).join(b=>b.append("g").classed(ot(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));u.length&&AC(d,u[0]);const p=d!=null&&d.node()?s2(d):{width:0,height:0};f.attr("width",p.width+o.padding*2).attr("height",p.height+o.padding*2);const g=h!=null&&h.node()?s2(h):{width:0,height:0},m=n-g.width,y=r-g.height,v=a.offsetX+o.offset[0]>m?m-a.offsetX:o.offset[0],x=a.offsetY+o.offset[1]>y?y-a.offsetY:o.offset[1];h.attr("transform",b=>`translate(${v}, ${x})`),h.attr("transform",b=>`translate(${v}, ${x})`)}const jI=sg(Fh,J2)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new rt,s=o.event$.pipe(F(a),fi(p=>p.eventName==="mouseover"||p.eventName==="mousemove")),u=o.event$.pipe(F(a),fi(p=>p.eventName==="mouseout")),c=H({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$}).pipe(F(a),B(async p=>p),U(p=>({backgroundColor:Et(p.fullParams.backgroundColorType,p.fullChartParams),backgroundOpacity:p.fullParams.backgroundOpacity,strokeColor:Et(p.fullParams.strokeColorType,p.fullChartParams),offset:p.fullParams.offset,padding:p.fullParams.padding,textSize:p.fullChartParams.styles.textSize,textColor:Et(p.fullParams.textColorType,p.fullChartParams)}))),l=H({fullParams:i.fullParams$,tooltipStyle:c}).pipe(F(a),B(async p=>p),U(p=>p.fullParams.svgRenderFn?p.fullParams.svgRenderFn:g=>{const m=p.fullParams.textRenderFn(g);return qI(m,p.tooltipStyle)})),h=H({event:s,contentRenderFn:l}).pipe(F(a),B(async p=>p),U(p=>p.contentRenderFn(p.event))),f=u.pipe(F(a),U(p=>"")),d=Wu(s,u).pipe(F(a),U(p=>p.event));return H({svgString:Wu(h,f),event:d,layout:i.layout$,tooltipStyle:c}).pipe(F(a),B(async p=>p)).subscribe(p=>{XI({rootSelection:e,pluginName:n,rootWidth:p.layout.rootWidth,rootHeight:p.layout.rootHeight,svgString:p.svgString,tooltipStyle:p.tooltipStyle,event:p.event})}),function(){a.next(void 0)}}),ex={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,bubbleScaleType:"area"},nx={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},rx={eventFn:(t,e,n)=>e==="mouseover"||e==="mousemove"?[String(t.datum.value)]:[String(Math.round(t.data.reduce((r,i)=>r+(i.value??0),0)*n))],textAttrs:[{transform:"translate(0, 0)"}],textStyles:[{"font-weight":"bold","text-anchor":"middle","pointer-events":"none","dominant-baseline":"middle","font-size":64,fill:"#000"}]},ix={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)},ox={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};function VI(t,{text:e,radius:n,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(t==null||e==null){console.error("selection or text is not defined");return}n==null&&(n=t.node().getBBox().width/2);function a(d){let p;return i?p=d.split(""):p=d.split(/\s+/g),p[p.length-1]||p.pop(),p[0]||p.shift(),p}function s(d,p){return d&&p&&d.length>p&&(d=d.substring(0,p)+"..."),d}function u(d){var g;const p=document.createElement("canvas").getContext("2d");return((g=p==null?void 0:p.measureText(d))==null?void 0:g.width)??0}function c(d){const p=u(d.trim());return Math.sqrt(p*r)}function l(d,p){let g={width:0,text:""},m=1/0;const y=[];let v=" ";i&&(v="");for(let x=0,b=d.length;x<b;++x){const w=(g.text?g.text+v:"")+d[x],$=u(w);(m+$)/2<p?(g.width=m=$,g.text=w):(m=u(d[x]),g={width:m,text:d[x]},y.push(g))}return y}function h(d){let p=0;for(let g=0,m=d.length;g<m;++g){const y=(Math.abs(g-m/2+.5)+.5)*r,v=d[g].width/2;p=Math.max(p,Math.sqrt(v**2+y**2))}return p}function f(d,p){o>0&&(p=s(p,o));const g=a(p),m=c(p),y=l(g,m),v=h(y);let x=d.select("text");x.size()||(x=d.append("text")),x.attr("transform",`translate(0,0) scale(${n/v})`);const b=x.selectAll("tspan").data(y),w=b.enter().append("tspan").attr("x",0).merge(b).attr("y",($,A)=>(A-y.length/2+.8)*r).text($=>$.text);return b.exit().remove(),b.merge(w)}return f(t,e)}let sr;function ZI(t,e){return R1().velocityDecay(e.force.velocityDecay).force("collision",k1().radius(n=>n.r+e.force.collisionSpacing)).force("charge",N1().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function KI({data:t,bubbleGroupR:e,maxValue:n,avgValue:r}){const i=e/Math.sqrt(t.length),a=i*i*Math.PI/r,s=n*a;return Math.pow(s/Math.PI,.5)*.75}function QI({data:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,scaleType:i}){const o=Math.min(n,r)/2,a=t.flat().filter(d=>d.value!=null&&d.visible!=!1),s=Math.max(...a.map(d=>d.value)),u=a.reduce((d,p)=>d+(p.value??0),0)/a.length,c=KI({data:a,bubbleGroupR:o,maxValue:s,avgValue:u}),l=i==="area"?.5:1,h=tu().domain([0,s]).range([0,c]).exponent(l);return a.map(d=>{const p=d,g=e.get(d.id);g?(p.x=g.x,p.y=g.y):(p.x=Math.random()*n,p.y=Math.random()*r);const m=h(p.value??0);return p.r=m,p._originR=m,p})}function ax({graphicSelection:t,bubblesData:e,fullParams:n}){let r=t.selectAll("g").data(e,a=>a.id),i=r.enter().append("g").attr("cursor","pointer");i.style("font-size",12).style("fill","#ffffff").attr("text-anchor","middle").attr("transform",a=>`translate(${a.x},${a.y})`),i.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",a=>a.color),i.append("text").style("opacity",.8).attr("pointer-events","none"),r.exit().remove();const o=r.merge(i);return o.select("circle").transition().duration(200).attr("r",a=>a.r).attr("fill",a=>a.color),o.each((a,s,u)=>{const c=V(u[s]);let l=!0;a.label.length<=n.bubbleText.lineLengthMin&&(l=!1),c.call(VI,{text:a.label,radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:l})}),o}function JI({data:t,highlightRIncrease:e,highlightIds:n}){if(e!=0){if(!n.length){t.forEach(r=>r.r=r._originR);return}t.forEach(r=>{n.includes(r.id)?r.r=r._originR+e:r.r=r._originR})}}function tR(){return Vg().on("start",(t,e)=>{t.active||sr.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||sr.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function sx({fullParams:t,graphicWidth:e,graphicHeight:n}){sr.force("x",F1().strength(t.force.strength).x(0)).force("y",G1().strength(t.force.strength).y(0)),sr.alpha(1).restart()}function eR({bubblesSelection:t,highlightIds:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1);return}t.each((r,i,o)=>{const a=V(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(Qa).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const nR=Di("Bubbles",ex)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=t.append("g"),a=new rt;let s=new Map;n.layout$.pipe(hi()).subscribe(h=>{t.attr("transform",`translate(${h.width/2}, ${h.height/2})`),n.layout$.pipe(F(i)).subscribe(f=>{t.transition().attr("transform",`translate(${f.width/2}, ${f.height/2})`)})});const u=n.fullParams$.pipe(F(i),U(h=>h.bubbleScaleType),ft()),c=new lt(h=>{H({layout:n.layout$,computedData:n.computedData$,scaleType:u}).pipe(F(i),B(async f=>f)).subscribe(f=>{const d=QI({data:f.computedData,LastBubbleDataMap:s,graphicWidth:f.layout.width,graphicHeight:f.layout.height,scaleType:f.scaleType});h.next(d)})});c.subscribe(h=>{s=new Map(h.map(f=>[f.id,f]))});const l=n.fullChartParams$.pipe(F(i),U(h=>h.highlightTarget),ft());return H({layout:n.layout$,computedData:n.computedData$,bubblesData:c,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:l}).pipe(F(i),B(async h=>h)).subscribe(h=>{const f=ax({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams});sr=ZI(f,h.fullParams),f.on("mouseover",(d,p)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("mousemove",(d,p)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("mouseout",(d,p)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("click",(d,p)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).call(tR()),sr.nodes(h.bubblesData),sx({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),a.next(f)}),H({bubblesSelection:a,bubblesData:c,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,layout:n.layout$}).pipe(F(i),B(async h=>h)).subscribe(h=>{eR({bubblesSelection:h.bubblesSelection,highlightIds:h.highlight,fullChartParams:h.fullChartParams}),h.fullParams.highlightRIncrease&&(JI({data:h.bubblesData,highlightRIncrease:h.fullParams.highlightRIncrease,highlightIds:h.highlight}),ax({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams})),sx({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),sr.nodes(h.bubblesData)}),()=>{i.next(void 0)}});function ux({computedDataSeries:t,startAngle:e,endAngle:n}){return vv().startAngle(e).endAngle(n).value(o=>o.visible==!1?0:o.value).sort((o,a)=>o.sortedIndex-a.sortedIndex)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}const cx="Pie",rR=ot(cx,"path");function iR({enter:t,exit:e,data:n,lastData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,u)=>{const c=r[u]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+c.startAngle*(1-o),endAngle:s.endAngle*o+c.endAngle*(1-o),value:s.value*o+c.value*(1-o)}});return Gh(a,i.startAngle,i.endAngle,1)}:o=>Gh(n,i.startAngle,i.endAngle,o)}function Gh(t,e,n,r){return t.map((i,o)=>{const a=e+(i.startAngle-e)*r,s=a+(i.endAngle-i.startAngle)*r;return{...i,startAngle:a,endAngle:s}})}function lx({selection:t,renderData:e,arc:n}){let r=t.selectAll("path").data(e,s=>s.id),i=r.enter().append("path").classed(rR,!0),o=r.exit();i.append("path");const a=r.merge(i);return a.style("cursor","pointer").attr("fill",(s,u)=>s.data.color).attr("d",(s,u)=>n(s)),o.remove(),a}function oR({pathSelection:t,ids:e,fullChartParams:n,arc:r,arcMouseover:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>r(o));return}t.each((o,a,s)=>{const u=V(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(Qa).duration(500).attr("d",c=>i(c)):u.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",c=>r(c))})}const aR=Di(cx,nx)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=t.append("g"),a=new rt;let s=[],u=[];n.layout$.pipe(hi()).subscribe(p=>{t.attr("transform",`translate(${p.width/2}, ${p.height/2})`),n.layout$.pipe(F(i)).subscribe(g=>{t.transition().attr("transform",`translate(${g.width/2}, ${g.height/2})`)})});const c=n.layout$.pipe(F(i),U(p=>p.width<p.height?p.width:p.height)),l=new lt(p=>{H({computedData:n.computedData$,fullParams:n.fullParams$}).pipe(F(i),B(async g=>g)).subscribe(g=>{const m=ux({computedDataSeries:g.computedData,startAngle:g.fullParams.startAngle,endAngle:g.fullParams.endAngle});p.next(m)})}),h=new lt(p=>{H({shorterSideWith:c,fullParams:n.fullParams$}).pipe(F(i),B(async g=>g)).subscribe(g=>{const m=Tu({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});p.next(m)})}),f=new lt(p=>{H({shorterSideWith:c,fullParams:n.fullParams$}).pipe(F(i),B(async g=>g)).subscribe(g=>{const m=Tu({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerMouseoverRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});p.next(m)})}),d=n.fullChartParams$.pipe(F(i),U(p=>p.highlightTarget),ft());return H({pieData:l,SeriesDataMap:n.SeriesDataMap$,arc:h,arcMouseover:f,computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:d}).pipe(F(i),B(async p=>p)).subscribe(p=>{o.interrupt("graphicMove");let g=t.selectAll("path").data(p.pieData,x=>x.data.id),m=g.enter(),y=g.exit();const v=iR({enter:m,exit:y,data:p.pieData,lastData:s,fullParams:p.fullParams});o.transition("graphicMove").duration(p.fullChartParams.transitionDuration).ease(ar(p.fullChartParams.transitionEase)).tween("move",(x,b)=>w=>{u=v(w),lx({selection:o,renderData:u,arc:p.arc}),r.event$.next({type:"series",pluginName:e,eventName:"transitionMove",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData})}).on("end",(x,b)=>{u=Gh(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const w=lx({selection:o,renderData:u,arc:p.arc});a.next(w),s=Object.assign([],p.pieData),r.event$.next({type:"series",pluginName:e,eventName:"transitionEnd",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData}),w.on("mouseover",($,A)=>{$.stopPropagation(),r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:p.highlightTarget,datum:A.data,series:p.SeriesDataMap.get(A.data.seriesLabel),seriesIndex:A.data.seriesIndex,seriesLabel:A.data.seriesLabel,event:$,data:p.computedData})}).on("mousemove",($,A)=>{$.stopPropagation(),r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:p.highlightTarget,datum:A.data,series:p.SeriesDataMap.get(A.data.seriesLabel),seriesIndex:A.data.seriesIndex,seriesLabel:A.data.seriesLabel,event:$,data:p.computedData})}).on("mouseout",($,A)=>{$.stopPropagation(),r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:p.highlightTarget,datum:A.data,series:p.SeriesDataMap.get(A.data.seriesLabel),seriesIndex:A.data.seriesIndex,seriesLabel:A.data.seriesLabel,event:$,data:p.computedData})}).on("click",($,A)=>{$.stopPropagation(),r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:p.highlightTarget,datum:A.data,series:p.SeriesDataMap.get(A.data.seriesLabel),seriesIndex:A.data.seriesIndex,seriesLabel:A.data.seriesLabel,event:$,data:p.computedData})})})}),H({pathSelection:a,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,arc:h,arcMouseover:f}).pipe(F(i),B(async p=>p)).subscribe(p=>{oR({pathSelection:p.pathSelection,ids:p.highlight,fullChartParams:p.fullChartParams,arc:p.arc,arcMouseover:p.arcMouseover})}),()=>{i.next(void 0)}}),fx="PieEventTexts",hx=ot(fx,"text");function zh(t,e){const n=t.selectAll(`text.${hx}`).data(e),r=n.enter().append("text").classed(hx,!0),i=n.merge(r);return i.each((o,a,s)=>{const u=V(s[a]).text(o.text);Object.keys(o.attr).forEach(c=>{u.attr(c,o.attr[c])}),Object.keys(o.style).forEach(c=>{u.style(c,o.style[c])})}),n.exit().remove(),i}function Oh({eventData:t,eventName:e,t:n,eventFn:r,textAttrs:i,textStyles:o}){return r(t,e,n).map((s,u)=>({text:s,attr:i[u],style:o[u]}))}const sR=Di(fx,rx)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=t.append("g");let a;n.layout$.pipe(hi()).subscribe(u=>{t.attr("transform",`translate(${u.width/2}, ${u.height/2})`),n.layout$.pipe(F(i)).subscribe(c=>{t.transition().attr("transform",`translate(${c.width/2}, ${c.height/2})`)})});const s=n.fullChartParams$.pipe(F(i),U(u=>u.highlightTarget),ft());return H({computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:s}).pipe(F(i),B(async u=>u)).subscribe(u=>{o.transition().duration(u.fullChartParams.transitionDuration).ease(ar(u.fullChartParams.transitionEase)).tween("move",(c,l)=>h=>{const f=Oh({eventData:{type:"series",pluginName:e,eventName:"transitionMove",event:c,highlightTarget:u.highlightTarget,data:u.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:h,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});zh(o,f)}).on("end",(c,l)=>{const h=Oh({eventData:{type:"series",pluginName:e,eventName:"transitionEnd",event:c,highlightTarget:u.highlightTarget,data:u.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:1,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});zh(o,h),a&&a.unsubscribe(),a=r.event$.subscribe(f=>{const d=Oh({eventData:f,eventName:f.eventName,t:1,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});zh(o,d)})})}),()=>{i.next(void 0)}}),dx="PieLabels",uR=ot(dx,"text");function cR(t,e,n,r){return t.map((i,o)=>{const[a,s]=e.centroid(i),[u,c]=n.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:s*r,mouseoverX:u*r,mouseoverY:c*r}}).filter(i=>i.pieDatum.data.visible)}function lR(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(uR,!0),a=i.exit();o.append("text");const s=i.merge(o);return s.attr("font-weight","bold").attr("text-anchor","middle").style("dominant-baseline","middle").style("cursor",u=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").text(u=>n.labelFn(u.pieDatum.data)).attr("font-size",r.styles.textSize).attr("fill",(u,c)=>$h({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function fR({labelSelection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition().duration(200).attr("transform",r=>"translate("+r.x+","+r.y+")").style("opacity",1);return}t.each((r,i,o)=>{const a=V(o[i]);e.includes(r.pieDatum.id)?a.style("opacity",1).transition().duration(200).attr("transform",s=>"translate("+s.mouseoverX+","+s.mouseoverY+")"):a.style("opacity",n.styles.unhighlightedOpacity).transition().duration(200).attr("transform",s=>"translate("+s.x+","+s.y+")")})}const hR=Di(dx,ix)(({selection:t,observer:e,subject:n})=>{const r=new rt,i=t.append("g");let o=new rt,a=[];return e.layout$.pipe(hi()).subscribe(s=>{t.attr("transform",`translate(${s.width/2}, ${s.height/2})`),e.layout$.pipe(F(r)).subscribe(u=>{t.transition().attr("transform",`translate(${u.width/2}, ${u.height/2})`)})}),H({layout:e.layout$,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(F(r),B(async s=>s)).subscribe(s=>{const u=s.layout.width<s.layout.height?s.layout.width:s.layout.height,c=Tu({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerRadius,padAngle:0,cornerRadius:0}),l=Tu({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),h=ux({computedDataSeries:s.computedData,startAngle:s.fullParams.startAngle,endAngle:s.fullParams.endAngle});a=cR(h,c,l,s.fullParams.labelCentroid);const f=lR(i,a,s.fullParams,s.fullChartParams);o.next(f)}),H({labelSelection:o,highlight:e.seriesHighlight$,fullChartParams:e.fullChartParams$}).pipe(F(r),B(async s=>s)).subscribe(s=>{fR({labelSelection:s.labelSelection,ids:s.highlight,fullChartParams:s.fullChartParams})}),()=>{r.next(void 0)}}),px="SeriesLegend",dR=Di(px,ox)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.SeriesDataMap$.pipe(F(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Pu(px,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),gx={paddingInner:2,paddingOuter:2,labelColorType:"primary",squarifyRatio:1.618034,sort:(t,e)=>e.value-t.value},mx={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},yx="TreeLegend",pR=ug(yx,mx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.CategoryDataMap$.pipe(F(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Pu(yx,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),ur="TreeMap",bx=ot(ur,"tree"),vx=ot(ur,"tile");function gR({selection:t,treeData:e,fullParams:n,fullChartParams:r}){const i=r.styles.textSize/2,o=t.selectAll(`g.${bx}`).data(e,a=>a.data.id).join("g").attr("class",bx);return o.attr("transform",a=>!a.x0||!a.y0?null:`translate(${a.x0},${a.y0})`).each((a,s,u)=>{const c=V(u[s]);c.selectAll(`rect.${vx}`).data([a],l=>l.data.id).join("rect").attr("id",l=>l.data.id).attr("class",vx).attr("cursor","pointer").attr("width",l=>l.x1-l.x0).attr("height",l=>l.y1-l.y0).attr("fill",l=>l.data.color).attr("data-name",l=>l.data.label).attr("data-category",l=>l.data.categoryLabel).attr("data-value",l=>l.data.value),c.selectAll("g").data([a]).join("g").each((l,h,f)=>{V(f[h]).selectAll("text").data([l]).join("text").text(p=>p.data.label).attr("dominant-baseline","hanging").attr("x",i).attr("y",i).attr("font-size",r.styles.textSize).each(function(p){const g=V(this),m=p.data.label.split(/\s+/).reverse();let y,v=[];const x=r.styles.textSize,b=g.attr("x");let w=g.attr("y"),$=0,A=g.text(null).append("tspan").attr("cursor","pointer").attr("fill",Et(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",b).attr("y",w);for(;y=m.pop();)v.push(y),A.text(v.join(" ")),A.node().getComputedTextLength()>p.x1-p.x0-i&&(v.pop(),A.text(v.join(" ")),v=[y],$+=x,A=g.append("tspan").attr("cursor","pointer").attr("fill",Et(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",b).attr("y",w).attr("dy",$+"px").text(y))})})}),o}function mR({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.data.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const yR=ug(ur,gx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=H({layout:r.layout$,visibleComputedData:r.visibleComputedData$,fullParams:r.fullParams$,fullDataFormatter:r.fullDataFormatter$,fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u),U(u=>{const c=Py().size([u.layout.width,u.layout.height]).paddingInner(u.fullParams.paddingInner).paddingOuter(u.fullParams.paddingOuter).round(!0).tile(Ff.ratio(u.fullParams.squarifyRatio)),l=qs(u.visibleComputedData).sum(f=>f.value).sort(u.fullParams.sort);return c(l),l.leaves()})),a=H({selection:li(t),treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u),U(u=>gR({selection:t,treeData:u.treeData,fullParams:u.fullParams,fullChartParams:u.fullChartParams}))),s=r.fullChartParams$.pipe(F(i),U(u=>u.highlightTarget),ft());return H({cellSelection:a,computedData:r.computedData$,treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,highlightTarget:s,CategoryDataMap:r.CategoryDataMap$}).pipe(F(i),B(async u=>u)).subscribe(u=>{u.cellSelection.on("mouseover",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseover",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("mousemove",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mousemove",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("mouseout",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseout",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("click",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"click",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})})}),H({cellSelection:a,highlight:r.treeHighlight$,fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u)).subscribe(u=>{mR({selection:u.cellSelection,ids:u.highlight,fullChartParams:u.fullChartParams})}),()=>{i.next(void 0)}});Z.BarStack=nI,Z.Bars=jC,Z.BarsDiverging=VC,Z.BarsTriangle=lI,Z.Bubbles=nR,Z.CONTAINER_PLUGIN_PARAMS=Q2,Z.Container=WI,Z.DEFAULT_BARS_DIVERGING_PARAMS=xx,Z.DEFAULT_BARS_PARAMS=Fo,Z.DEFAULT_BARS_TRIANGLE_PARAMS=Hh,Z.DEFAULT_BAR_STACK_PARAMS=Wh,Z.DEFAULT_BUBBLES_PARAMS=ex,Z.DEFAULT_DOTS_PARAMS=Bh,Z.DEFAULT_GRID_LEGEND_PARAMS=Vh,Z.DEFAULT_GROUP_AREA_PARAMS=Yh,Z.DEFAULT_GROUP_AXIS_PARAMS=qh,Z.DEFAULT_LINES_PARAMS=cr,Z.DEFAULT_LINE_AREAS_PARAMS=Uh,Z.DEFAULT_MULTI_BARS_PARAMS=N2,Z.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=G2,Z.DEFAULT_MULTI_BAR_STACK_PARAMS=F2,Z.DEFAULT_MULTI_DOTS_PARAMS=O2,Z.DEFAULT_MULTI_GRID_LEGEND_PARAMS=C2,Z.DEFAULT_MULTI_GROUP_AXIS_PARAMS=I2,Z.DEFAULT_MULTI_LINES_PARAMS=z2,Z.DEFAULT_MULTI_VALUE_AXIS_PARAMS=R2,Z.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=U2,Z.DEFAULT_PIE_EVENT_TEXTS_PARAMS=rx,Z.DEFAULT_PIE_LABELS_PARAMS=ix,Z.DEFAULT_PIE_PARAMS=nx,Z.DEFAULT_SCALING_AREA_PARAMS=jh,Z.DEFAULT_SERIES_LEGEND_PARAMS=ox,Z.DEFAULT_TREE_LEGEND_PARAMS=mx,Z.DEFAULT_TREE_MAP_PARAMS=gx,Z.DEFAULT_VALUE_AXIS_PARAMS=Lu,Z.DEFAULT_VALUE_STACK_AXIS_PARAMS=Xh,Z.Dots=pI,Z.GridLegend=mI,Z.GroupAux=EI,Z.GroupAxis=bI,Z.LineAreas=UC,Z.Lines=CC,Z.MultiBarStack=II,Z.MultiBars=CI,Z.MultiBarsTriangle=RI,Z.MultiDots=FI,Z.MultiGridLegend=kI,Z.MultiGroupAxis=GI,Z.MultiLines=NI,Z.MultiValueAxis=zI,Z.OverlappingValueAxes=YI,Z.Pie=aR,Z.PieEventTexts=sR,Z.PieLabels=hR,Z.ScalingArea=$I,Z.SeriesLegend=dR,Z.TOOLTIP_PARAMS=J2,Z.Tooltip=jI,Z.TreeLegend=pR,Z.TreeMap=yR,Z.ValueAxis=xI,Z.ValueStackAxis=_I,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
|
15
|
+
`})}function fI({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function hI({selection:t,ids:e,fullChartParams:n}){t.interrupt("highlight");const r=()=>{t.transition("highlight").duration(200).style("opacity",1)};if(!e.length){r();return}t.each((i,o,a)=>{e.includes(i.id)?V(a[o]).style("opacity",1):V(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const $2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridAxesSize$:h,gridHighlight$:f,gridContainer$:d,isSeriesPositionSeprate$:p,event$:g})=>{const m=new nt,y=Sn(t,"clipPath-box"),v=ot(t,"pathG"),x=ot(t,"path"),{seriesSelection$:b,axesSelection$:w,defsSelection$:$,graphicGSelection$:S}=si({selection:e,pluginName:t,clipPathID:y,existSeriesLabels$:i,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l});l.pipe(F(m),O(A=>-A.translate[1]/A.scale[1]));const _=r.pipe(O(A=>A.map(N=>N[0]?N[0].axisY-N[0].axisYFromZero:0)),ft()),D=W({computedData:n,visibleComputedData:r,params:s,gridAxesSize:h,isSeriesPositionSeprate:p}).pipe(F(m),B(async A=>A),O(A=>A.params.barWidth?A.params.barWidth:A.isSeriesPositionSeprate?w2({axisWidth:A.gridAxesSize.width,groupAmount:A.computedData[0]?A.computedData[0].length:0,barAmountOfGroup:1,barPadding:A.params.barPadding,barGroupPadding:A.params.barGroupPadding}):w2({axisWidth:A.gridAxesSize.width,groupAmount:A.computedData[0]?A.computedData[0].length:0,barAmountOfGroup:A.visibleComputedData.length,barPadding:A.params.barPadding,barGroupPadding:A.params.barGroupPadding}))),L=r.pipe(F(m),O(A=>{const N=new Set;return A.forEach(z=>{z.forEach(E=>{N.add(E.seriesLabel)})}),Array.from(N)})),P=r.pipe(F(m),O(A=>{const N=new Set;return A.forEach(z=>{z.forEach(E=>{N.add(E.groupLabel)})}),Array.from(N)})),I=new lt(A=>{W({seriesLabels:L,barWidth:D,params:s}).pipe(F(m),B(async N=>N)).subscribe(N=>{const z=aI(N.barWidth,N.seriesLabels,N.params);A.next(z)})}),k=u.pipe(F(m),O(A=>A.transitionDuration),ft()),T=new lt(A=>{W({groupLabels:P,transitionDuration:k}).pipe(B(async N=>N)).subscribe(N=>{const z=sI(N.groupLabels.length,N.transitionDuration);A.next(z)})}).pipe(F(m),ft()),C=new lt(A=>{W({groupLabels:P,transitionDuration:k}).pipe(B(async N=>N)).subscribe(N=>{const z=uI(N.groupLabels.length,N.transitionDuration);A.next(z)})}).pipe(F(m),ft());W({defsSelection:$,gridAxesSize:h}).pipe(F(m),B(async A=>A)).subscribe(A=>{const N=[{id:y,width:A.gridAxesSize.width,height:A.gridAxesSize.height}];fI({defsSelection:A.defsSelection,clipPathData:N})});const M=u.pipe(F(m),O(A=>A.highlightTarget),ft()),R=new nt,G=L.pipe(F(m),O(A=>A.map((N,z)=>Sn(t,`lineargradient-${N}`))));return W({graphicGSelection:S,defsSelection:$,computedData:n,linearGradientIds:G,zeroYArr:_,groupLabels:P,barScale:I,params:s,chartParams:u,highlightTarget:M,barWidth:D,delayGroup:T,transitionItem:C,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:p}).pipe(F(m),B(async A=>A)).subscribe(A=>{const N=cI({graphicGSelection:A.graphicGSelection,pathGClassName:v,pathClassName:x,computedData:A.computedData,linearGradientIds:A.linearGradientIds,zeroYArr:A.zeroYArr,groupLabels:A.groupLabels,barScale:A.barScale,params:A.params,chartParams:A.chartParams,barWidth:A.barWidth,delayGroup:A.delayGroup,transitionItem:A.transitionItem,isSeriesPositionSeprate:A.isSeriesPositionSeprate});lI({defsSelection:A.defsSelection,computedData:A.computedData,linearGradientIds:A.linearGradientIds,params:A.params}),N.on("mouseover",(z,E)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:A.highlightTarget,datum:E,gridIndex:E.gridIndex,series:A.SeriesDataMap.get(E.seriesLabel),seriesIndex:E.seriesIndex,seriesLabel:E.seriesLabel,groups:A.GroupDataMap.get(E.groupLabel),groupIndex:E.groupIndex,groupLabel:E.groupLabel,event:z,data:A.computedData})}).on("mousemove",(z,E)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:A.highlightTarget,datum:E,gridIndex:E.gridIndex,series:A.SeriesDataMap.get(E.seriesLabel),seriesIndex:E.seriesIndex,seriesLabel:E.seriesLabel,groups:A.GroupDataMap.get(E.groupLabel),groupIndex:E.groupIndex,groupLabel:E.groupLabel,event:z,data:A.computedData})}).on("mouseout",(z,E)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:A.highlightTarget,datum:E,gridIndex:E.gridIndex,series:A.SeriesDataMap.get(E.seriesLabel),seriesIndex:E.seriesIndex,seriesLabel:E.seriesLabel,groups:A.GroupDataMap.get(E.groupLabel),groupIndex:E.groupIndex,groupLabel:E.groupLabel,event:z,data:A.computedData})}).on("click",(z,E)=>{z.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:A.highlightTarget,datum:E,gridIndex:E.gridIndex,series:A.SeriesDataMap.get(E.seriesLabel),seriesIndex:E.seriesIndex,seriesLabel:E.seriesLabel,groups:A.GroupDataMap.get(E.groupLabel),groupIndex:E.groupIndex,groupLabel:E.groupLabel,event:z,data:A.computedData})}),R.next(N)}),W({barSelection:R,highlight:f.pipe(O(A=>A.map(N=>N.id))),fullChartParams:u}).pipe(F(m),B(async A=>A)).subscribe(A=>{hI({selection:A.barSelection,ids:A.highlight,fullChartParams:A.fullChartParams})}),()=>{m.next(void 0)}},S2="BarsTriangle",dI=ae(S2,qh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=$2(S2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}});function pI({graphicGSelection:t,circleGClassName:e,circleClassName:n,data:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=l=>{const h=l.size();return o.transitionDuration/h};let u=0;return t.each((l,h,f)=>{V(f[h]).selectAll("g").data(r[h],d=>d.id).join(d=>(u=s(d),d.append("g").classed(e,!0)),d=>d,d=>d.remove()).attr("transform",d=>`translate(${d.axisX}, ${d.axisY})`).each((d,p,g)=>{V(g[p]).selectAll("circle").data([d]).join(m=>m.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((y,v)=>p*u).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,y)=>$h({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>$h({datum:m,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[h][0]??1}, ${a[h][1]??1})`)})}),t.selectAll(`circle.${n}`)}function gI({selection:t,ids:e,onlyShowHighlighted:n,fullChartParams:r}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}t.each((i,o,a)=>{e.includes(i.id)?V(a[o]).style("opacity",1).transition("highlight").duration(200):V(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function mI({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const A2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridGraphicReverseScale$:h,gridAxesSize$:f,gridHighlight$:d,gridContainer$:p,event$:g})=>{const m=new nt,y=Sn(t,"clipPath-box"),v=ot(t,"circleG"),x=ot(t,"circle"),b=new nt,{seriesSelection$:w,axesSelection$:$,defsSelection$:S,graphicGSelection$:_}=si({selection:e,pluginName:t,clipPathID:y,existSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),D=W({computedData:n,gridGraphicReverseScale:h}).pipe(F(m),B(async I=>I),O(I=>I.computedData.map((k,T)=>I.gridGraphicReverseScale[T])));W({defsSelection:S,gridAxesSize:f}).pipe(F(m),B(async I=>I)).subscribe(I=>{const k=[{id:y,width:I.gridAxesSize.width,height:I.gridAxesSize.height}];mI({defsSelection:I.defsSelection,clipPathData:k})});const L=u.pipe(F(m),O(I=>I.highlightTarget),ft());W({graphicGSelection:_,computedData:n,visibleComputedData:r,SeriesDataMap:o,GroupDataMap:a,graphicReverseScale:D,fullChartParams:u,fullParams:s,highlightTarget:L}).pipe(F(m),B(async I=>I)).subscribe(I=>{const k=pI({graphicGSelection:I.graphicGSelection,circleGClassName:v,circleClassName:x,data:I.visibleComputedData,fullParams:I.fullParams,fullChartParams:I.fullChartParams,graphicReverseScale:I.graphicReverseScale});k.on("mouseover",(T,C)=>{T.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:I.highlightTarget,datum:C,gridIndex:C.gridIndex,series:I.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:I.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:T,data:I.computedData})}).on("mousemove",(T,C)=>{T.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:I.highlightTarget,data:I.computedData,datum:C,gridIndex:C.gridIndex,series:I.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:I.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:T})}).on("mouseout",(T,C)=>{T.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:I.highlightTarget,datum:C,gridIndex:C.gridIndex,series:I.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:I.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:T,data:I.computedData})}).on("click",(T,C)=>{T.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:I.highlightTarget,datum:C,gridIndex:C.gridIndex,series:I.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:I.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:T,data:I.computedData})}),b.next(k)});const P=s.pipe(F(m),O(I=>I.onlyShowHighlighted),ft());return u.pipe(F(m),B(I=>W({graphicSelection:b,highlight:d.pipe(O(k=>k.map(T=>T.id))),onlyShowHighlighted:P,fullChartParams:u}).pipe(F(m),B(async k=>k)))).subscribe(I=>{gI({selection:I.graphicSelection,ids:I.highlight,onlyShowHighlighted:I.onlyShowHighlighted,fullChartParams:I.fullChartParams})}),()=>{m.next(void 0)}},M2="Dots",yI=ae(M2,Yh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=A2(M2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,event$:n.event$});return()=>{i.next(void 0),o()}}),bI={listRectWidth:14,listRectHeight:14,listRectRadius:0};function T2(t,e){const n=t<e.colors[e.colorScheme].series.length?t:t%e.colors[e.colorScheme].series.length;return e.colors[e.colorScheme].series[n]}const Pu=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o})=>{const a=ot(t,"root-position"),s=ot(t,"legend-card"),u=ot(t,"legend-list"),c=ot(t,"legend-item"),l=new nt,h=W({seriesLabels:n,fullChartParams:o}).pipe(F(l),B(async _=>_),O(_=>{const D=new Map;let L=0;return _.seriesLabels.forEach((P,I)=>{if(!D.has(P)){const k=T2(L,_.fullChartParams);D.set(P,k),L++}}),D})),f=n.pipe(F(l),O(_=>{const D=new Set;let L=[];return _.forEach(P=>{D.has(P)?L.push(!1):L.push(!0),D.add(P)}),L})),d=r.pipe(F(l),O(_=>_.position==="bottom"||_.position==="top"?"row":"column")),p=W({fullParams:r,layout:i}).pipe(F(l),B(async _=>_),O(_=>{const D=_.fullParams.padding*2+_.fullParams.gap*2;return _.fullParams.position==="bottom"||_.fullParams.position==="top"?_.layout.rootWidth-D:_.layout.rootHeight-D})),m=W({layout:i,fullParams:r}).pipe(F(l),B(async _=>_),O(_=>{let D=0,L=0;return _.fullParams.position==="bottom"?(L=_.layout.rootHeight,_.fullParams.justify==="start"?D=0:_.fullParams.justify==="center"?D=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(D=_.layout.rootWidth)):_.fullParams.position==="right"?(D=_.layout.rootWidth,_.fullParams.justify==="start"?L=0:_.fullParams.justify==="center"?L=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(L=_.layout.rootHeight)):_.fullParams.position==="top"?(L=0,_.fullParams.justify==="start"?D=0:_.fullParams.justify==="center"?D=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(D=_.layout.rootWidth)):_.fullParams.position==="left"&&(D=0,_.fullParams.justify==="start"?L=0:_.fullParams.justify==="center"?L=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(L=_.layout.rootHeight)),{x:D,y:L}})).pipe(F(l),O(_=>e.selectAll(`g.${a}`).data([_]).join(D=>D.append("g").classed(a,!0).attr("transform",L=>`translate(${L.x}, ${L.y})`),D=>D.transition().attr("transform",L=>`translate(${L.x}, ${L.y})`),D=>D.remove()))),y=r.pipe(F(l),O(_=>_.seriesList[0]?_.seriesList[0]:bI)),v=W({visibleList:f,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:d,lineMaxSize:p,defaultListStyle:y,SeriesLabelColorMap:h}).pipe(F(l),B(async _=>_),O(_=>_.seriesLabels.reduce((D,L,P)=>{if(!_.visibleList[P])return D;const I=c2(L,_.fullChartParams.styles.textSize),k=_.fullChartParams.styles.textSize*1.5+I,T=_.SeriesLabelColorMap.get(L),C=D[0]&&D[0][0]?D[D.length-1][D[D.length-1].length-1]:null,{translateX:M,translateY:R,lineIndex:G,itemIndex:A}=((z,E,Y)=>{let j=0,H=0,X=0,Q=0;if(z.lineDirection==="column"){let ct=Y?Y.translateY+z.fullChartParams.styles.textSize+z.fullParams.gap:0;if(ct+z.fullChartParams.styles.textSize>z.lineMaxSize){X=Y.lineIndex+1,Q=0,H=0;const U=E[E.length-1].reduce((tt,st)=>st.itemWidth>tt?st.itemWidth:tt,0);j=Y.translateX+U+z.fullParams.gap}else X=Y?Y.lineIndex:0,Q=Y?Y.itemIndex+1:0,H=ct,j=Y?Y.translateX:0}else{let ct=Y?Y.translateX+Y.itemWidth+z.fullParams.gap:0;ct+k>z.lineMaxSize?(X=Y.lineIndex+1,Q=0,j=0):(X=Y?Y.lineIndex:0,Q=Y?Y.itemIndex+1:0,j=ct),H=(z.fullChartParams.styles.textSize+z.fullParams.gap)*X}return{translateX:j,translateY:H,lineIndex:X,itemIndex:Q}})(_,D,C);D[G]||(D[G]=[]);const N=_.fullParams.seriesList[A]?_.fullParams.seriesList[A]:_.defaultListStyle;return D[G].push({id:L,seriesLabel:L,seriesIndex:P,lineIndex:G,itemIndex:A,text:L,itemWidth:k,translateX:M,translateY:R,color:T,listRectWidth:N.listRectWidth,listRectHeight:N.listRectHeight,listRectRadius:N.listRectRadius}),D},[])),Le(1)),x=W({fullParams:r,fullChartParams:o,lineDirection:d,lengendItems:v}).pipe(F(l),B(async _=>_),O(_=>{const{width:D,height:L}=((P,I)=>{let k=0,T=0;if(!I.length||!I[0].length)return{width:k,height:T};const C=I[0][I[0].length-1];return P.lineDirection==="column"?(k=I.reduce((M,R)=>{const G=R.reduce((A,N)=>N.itemWidth>A?N.itemWidth:A,0);return M+G},0),k+=P.fullParams.gap*(I.length-1),T=C.translateY+P.fullChartParams.styles.textSize):(k=C.translateX+C.itemWidth,T=P.fullChartParams.styles.textSize*I.length+P.fullParams.gap*(I.length-1)),{width:k,height:T}})(_,_.lengendItems);return{direction:_.lineDirection,width:D,height:L,translateX:_.fullParams.gap,translateY:_.fullParams.gap}}),Le(1)),b=W({fullParams:r,lengendList:x}).pipe(F(l),B(async _=>_),O(_=>{const D=_.lengendList.width+_.fullParams.gap*2,L=_.lengendList.height+_.fullParams.gap*2;let P=0,I=0;return _.fullParams.position==="left"?_.fullParams.justify==="start"?(P=_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(P=_.fullParams.padding,I=-L/2):_.fullParams.justify==="end"&&(P=_.fullParams.padding,I=-L-_.fullParams.padding):_.fullParams.position==="right"?_.fullParams.justify==="start"?(P=-D-_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(P=-D-_.fullParams.padding,I=-L/2):_.fullParams.justify==="end"&&(P=-D-_.fullParams.padding,I=-L-_.fullParams.padding):_.fullParams.position==="top"?_.fullParams.justify==="start"?(P=_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(P=-D/2,I=_.fullParams.padding):_.fullParams.justify==="end"&&(P=-D-_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="start"?(P=_.fullParams.padding,I=-L-_.fullParams.padding):_.fullParams.justify==="center"?(P=-D/2,I=-L-_.fullParams.padding):_.fullParams.justify==="end"&&(P=-D-_.fullParams.padding,I=-L-_.fullParams.padding),{width:D,height:L,translateX:P,translateY:I}})),w=W({rootPositionSelection:m,fullParams:r,fullChartParams:o,legendCard:b}).pipe(F(l),B(async _=>_),O(_=>_.rootPositionSelection.selectAll("g").data([_.legendCard]).join(D=>D.append("g").classed(s,!0).attr("transform",L=>`translate(${L.translateX}, ${L.translateY})`),D=>D.transition().attr("transform",L=>`translate(${L.translateX}, ${L.translateY})`),D=>D.remove()).each((D,L,P)=>{V(P[L]).selectAll("rect").data([D]).join("rect").attr("width",I=>I.width).attr("height",I=>I.height).attr("fill",Et(_.fullParams.backgroundFill,_.fullChartParams)).attr("stroke",Et(_.fullParams.backgroundStroke,_.fullChartParams))}))),$=W({lengendCardSelection:w,fullParams:r,lengendList:x}).pipe(F(l),B(async _=>_),O(_=>_.lengendCardSelection.selectAll("g").data([_.lengendList]).join(D=>D.append("g").classed(u,!0).attr("transform",L=>`translate(${L.translateX}, ${L.translateY})`),D=>D.transition().attr("transform",L=>`translate(${L.translateX}, ${L.translateY})`),D=>D.remove())));return W({lengendListSelection:$,fullParams:r,fullChartParams:o,lengendItems:v}).pipe(F(l),B(async _=>_),O(_=>{const D=_.lengendItems[0]?_.lengendItems.flat():[];return _.lengendListSelection.selectAll(`g.${c}`).data(D).join(L=>L.append("g").classed(c,!0).attr("cursor","default"),L=>L,L=>L.remove()).attr("transform",(L,P)=>`translate(${L.translateX}, ${L.translateY})`).each((L,P,I)=>{const k=_.fullChartParams.styles.textSize/2,T=-L.listRectWidth/2,C=-L.listRectHeight/2;V(I[P]).selectAll("rect").data([L]).join("rect").attr("x",k).attr("y",k).attr("width",M=>M.listRectWidth).attr("height",M=>M.listRectHeight).attr("transform",M=>`translate(${T}, ${C})`).attr("fill",M=>M.color).attr("rx",M=>M.listRectRadius),V(I[P]).selectAll("text").data([L]).join(M=>M.append("text").attr("dominant-baseline","hanging"),M=>M,M=>M.remove()).attr("x",_.fullChartParams.styles.textSize*1.5).attr("font-size",_.fullChartParams.styles.textSize).attr("fill",M=>_.fullParams.textColorType==="series"?T2(M.seriesIndex,_.fullChartParams):Et(_.fullParams.textColorType,_.fullChartParams)).text(M=>M.text)})})).subscribe(),()=>{l.next(void 0)}},P2="GridLegend",vI=ae(P2,Zh)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,o=n.SeriesDataMap$.pipe(F(i),O(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),O(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Pu(P2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),Mh=6;function xI({selection:t,xAxisClassName:e,groupingLabelClassName:n,params:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,chartParams:u,groupScale:c,textTransform:l}){const h=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((p,g,m)=>{V(m[g]).selectAll("text").data([p]).join(y=>y.append("text").style("font-weight","bold"),y=>y,y=>y.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).style("font-size",`${u.styles.textSize}px`).style("fill",Et(r.labelColorType,u)).style("transform",l).text(y=>s.grid.groupAxis.label)}).attr("transform",p=>`translate(${a.width+p.tickPadding+r.labelOffset[0]}, ${-p.tickPadding-Mh-r.labelOffset[1]})`);const f=Fg(c).scale(c).tickSize(r.tickFullLine==!0?-a.height:Mh).tickSizeOuter(0).tickFormat(p=>wh(p,r.tickFormat)).tickPadding(r.tickPadding),d=h.transition().duration(100).call(f);return d.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Et(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),d.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Et(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),h.selectAll("text").style("font-family","sans-serif").style("font-size",`${u.styles.textSize}px`).style("color",Et(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`0 -${r.tickPadding+Mh}`).style("transform",l),h}const D2=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new nt,f=ot(t,"container"),d=ot(t,"xAxisG"),p=ot(t,"xAxis"),g=ot(t,"groupingLabel"),m=W({computedData:n.pipe(ft(($,S)=>$.length===S.length)),isSeriesPositionSeprate:l}).pipe(F(h),B(async $=>$),O($=>$.isSeriesPositionSeprate?$.computedData:[$.computedData[0]]),O(($,S)=>e.selectAll(`g.${f}`).data($,_=>_[0]?_[0].seriesIndex:S).join("g").classed(f,!0))),y=m.pipe(F(h),O(($,S)=>$.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));W({containerSelection:m,gridContainer:c}).pipe(F(h),B(async $=>$)).subscribe($=>{$.containerSelection.attr("transform",(S,_)=>{const D=$.gridContainer[_]??$.gridContainer[0],L=D.translate,P=D.scale;return`translate(${L[0]}, ${L[1]}) scale(${P[0]}, ${P[1]})`})}),W({axisSelection:y,gridAxesTransform:a}).pipe(F(h),B(async $=>$)).subscribe($=>{$.axisSelection.style("transform",$.gridAxesTransform.value)});const v=W({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(F(h),B(async $=>$),O($=>{const S=`translate(${$.gridAxesReverseTransform.translate[0]}px, ${$.gridAxesReverseTransform.translate[1]}px)`,_=`rotate(${$.gridAxesReverseTransform.rotate}deg) rotateX(${$.gridAxesReverseTransform.rotateX}deg) rotateY(${$.gridAxesReverseTransform.rotateY}deg)`,D=`scale(${1/$.gridContainer[0].scale[0]}, ${1/$.gridContainer[0].scale[1]})`,P=`rotate(${$.fullDataFormatter.grid.groupAxis.position==="left"&&$.fullDataFormatter.grid.valueAxis.position==="top"||$.fullDataFormatter.grid.groupAxis.position==="right"&&$.fullDataFormatter.grid.valueAxis.position==="bottom"?$.fullParams.tickTextRotate+180:$.fullParams.tickTextRotate}deg)`;return`${S} ${_} ${D} ${P}`}),ft()),x=new lt($=>{W({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(F(h),B(async S=>S)).subscribe(S=>{const D=S.computedData[0]?S.computedData[0].length-1:0,L=S.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-S.fullDataFormatter.grid.groupAxis.scalePadding:S.fullDataFormatter.grid.groupAxis.scaleDomain[0]-S.fullDataFormatter.grid.groupAxis.scalePadding,P=S.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?D+S.fullDataFormatter.grid.groupAxis.scalePadding:S.fullDataFormatter.grid.groupAxis.scaleDomain[1]+S.fullDataFormatter.grid.groupAxis.scalePadding,I=S.computedData[0]?S.computedData[0].length:0;let k=(S.computedData[0]??[]).map(R=>R.groupLabel);const T=new Array(I).fill(0).map((R,G)=>k[G]!=null?k[G]:String(G)).filter((R,G)=>G>=L&&G<=P),C=S.fullDataFormatter.grid.groupAxis.scalePadding,M=sg({axisLabels:T,axisWidth:S.gridAxesSize.width,padding:C});$.next(M)})}),b=W({fullDataFormatter:i,fullParams:r}).pipe(F(h),B(async $=>$),O($=>{let S="middle",_="hanging";return $.fullDataFormatter.grid.groupAxis.position==="bottom"?(S=$.fullParams.tickTextRotate?"end":"middle",_="hanging"):$.fullDataFormatter.grid.groupAxis.position==="top"?(S=$.fullParams.tickTextRotate?"end":"middle",_="auto"):$.fullDataFormatter.grid.groupAxis.position==="left"?(S="end",_="middle"):$.fullDataFormatter.grid.groupAxis.position==="right"&&(S="start",_="middle"),{textAnchor:S,dominantBaseline:_}})),w=i.pipe(F(h),O($=>{let S="start",_="hanging";return $.grid.groupAxis.position==="bottom"?_="hanging":$.grid.groupAxis.position==="top"?_="auto":$.grid.groupAxis.position==="left"?S="end":$.grid.groupAxis.position==="right"&&(S="start"),$.grid.valueAxis.position==="left"?S="start":$.grid.valueAxis.position==="right"?S="end":$.grid.valueAxis.position==="bottom"?_="auto":$.grid.valueAxis.position==="top"&&(_="hanging"),{textAnchor:S,dominantBaseline:_}}));return W({axisSelection:y,params:r,tickTextAlign:b,axisLabelAlign:w,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:x,textTransform:v}).pipe(F(h),B(async $=>$)).subscribe($=>{xI({selection:$.axisSelection,xAxisClassName:p,groupingLabelClassName:g,params:$.params,tickTextAlign:$.tickTextAlign,axisLabelAlign:$.axisLabelAlign,gridAxesSize:$.gridAxesSize,fullDataFormatter:$.fullDataFormatter,chartParams:$.chartParams,groupScale:$.groupScale,textTransform:$.textTransform})}),()=>{h.next(void 0)}},L2="GroupAxis",_I=ae(L2,Xh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=D2(L2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),o()}}),E2=6;function wI({selection:t,yAxisClassName:e,textClassName:n,fullParams:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,fullChartParams:u,valueScale:c,textTransform:l,minAndMax:h}){const f=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((y,v,x)=>{V(x[v]).selectAll("text").data([y]).join(b=>b.append("text").style("font-weight","bold"),b=>b,b=>b.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).style("font-size",`${u.styles.textSize}px`).style("fill",Et(r.labelColorType,u)).style("transform",l).text(b=>s.grid.valueAxis.label)}).attr("transform",y=>`translate(${-y.tickPadding+r.labelOffset[0]}, ${a.height+y.tickPadding+r.labelOffset[1]})`);const d=h[1]-h[0],p=Gg(c).scale(c).ticks(d>r.ticks?r.ticks:h[0]===0&&h[1]===0?1:Math.ceil(d)).tickFormat(y=>wh(y,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:E2).tickPadding(r.tickPadding),g=f.transition().duration(100).call(p);return g.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Et(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),g.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Et(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${u.styles.textSize}px`).style("color",Et(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`-${r.tickPadding+E2} 0`).style("transform",l),f}const Du=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new nt,f=ot(t,"container"),d=ot(t,"yAxisG"),p=ot(t,"yAxis"),g=ot(t,"text"),m=W({computedData:n.pipe(ft((S,_)=>S.length===_.length)),isSeriesPositionSeprate:l}).pipe(F(h),B(async S=>S),O(S=>S.isSeriesPositionSeprate?S.computedData:[S.computedData[0]]),O((S,_)=>e.selectAll(`g.${f}`).data(S,D=>D[0]?D[0].seriesIndex:_).join("g").classed(f,!0))),y=m.pipe(F(h),O((S,_)=>S.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));W({containerSelection:m,gridContainer:c}).pipe(F(h),B(async S=>S)).subscribe(S=>{S.containerSelection.attr("transform",(_,D)=>{const L=S.gridContainer[D]??S.gridContainer[0],P=L.translate,I=L.scale;return`translate(${P[0]}, ${P[1]}) scale(${I[0]}, ${I[1]})`})}),W({axisSelection:y,gridAxesTransform:a}).pipe(F(h),B(async S=>S)).subscribe(S=>{S.axisSelection.style("transform",S.gridAxesTransform.value)});const v=W({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(F(h),B(async S=>S),O(S=>{const _=`translate(${S.gridAxesReverseTransform.translate[0]}px, ${S.gridAxesReverseTransform.translate[1]}px)`,D=`rotate(${S.gridAxesReverseTransform.rotate}deg) rotateX(${S.gridAxesReverseTransform.rotateX}deg) rotateY(${S.gridAxesReverseTransform.rotateY}deg)`,L=`scale(${1/S.gridContainer[0].scale[0]}, ${1/S.gridContainer[0].scale[1]})`,I=`rotate(${S.fullDataFormatter.grid.groupAxis.position==="left"&&S.fullDataFormatter.grid.valueAxis.position==="top"||S.fullDataFormatter.grid.groupAxis.position==="right"&&S.fullDataFormatter.grid.valueAxis.position==="bottom"?S.fullParams.tickTextRotate+180:S.fullParams.tickTextRotate}deg)`;return`${_} ${D} ${L} ${I}`}),ft()),x=new lt(S=>{W({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(F(h),B(async _=>_)).subscribe(_=>{const L=_.computedData[0]?_.computedData[0].length-1:0,P=_.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-_.fullDataFormatter.grid.groupAxis.scalePadding:_.fullDataFormatter.grid.groupAxis.scaleDomain[0]-_.fullDataFormatter.grid.groupAxis.scalePadding,I=_.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?L+_.fullDataFormatter.grid.groupAxis.scalePadding:_.fullDataFormatter.grid.groupAxis.scaleDomain[1]+_.fullDataFormatter.grid.groupAxis.scalePadding,k=_.computedData.map((C,M)=>C.filter((R,G)=>G>=P&&G<=I)),T=EC(k.flat());S.next(T)})}),b=new lt(S=>{W({fullDataFormatter:i,gridAxesSize:u,minAndMax:x}).pipe(F(h),B(async _=>_)).subscribe(_=>{const D=ag({maxValue:_.minAndMax[1],minValue:_.minAndMax[0],axisWidth:_.gridAxesSize.height,scaleDomain:_.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:_.fullDataFormatter.grid.valueAxis.scaleRange});S.next(D)})}),w=i.pipe(F(h),O(S=>{let _="start",D="hanging";return S.grid.valueAxis.position==="left"?(_="end",D="middle"):S.grid.valueAxis.position==="right"?(_="start",D="middle"):S.grid.valueAxis.position==="bottom"?(_="middle",D="hanging"):S.grid.valueAxis.position==="top"&&(_="middle",D="auto"),{textAnchor:_,dominantBaseline:D}})),$=i.pipe(F(h),O(S=>{let _="start",D="hanging";return S.grid.groupAxis.position==="bottom"?D="auto":S.grid.groupAxis.position==="top"?D="hanging":S.grid.groupAxis.position==="left"?_="start":S.grid.groupAxis.position==="right"&&(_="end"),S.grid.valueAxis.position==="left"?_="end":S.grid.valueAxis.position==="right"?_="start":S.grid.valueAxis.position==="bottom"?D="hanging":S.grid.valueAxis.position==="top"&&(D="auto"),{textAnchor:_,dominantBaseline:D}}));return W({axisSelection:y,fullParams:r,tickTextAlign:w,axisLabelAlign:$,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:b,textTransform:v,minAndMax:x}).pipe(F(h),B(async S=>S)).subscribe(S=>{wI({selection:S.axisSelection,yAxisClassName:p,textClassName:g,fullParams:S.fullParams,tickTextAlign:S.tickTextAlign,axisLabelAlign:S.axisLabelAlign,gridAxesSize:S.gridAxesSize,fullDataFormatter:S.fullDataFormatter,fullChartParams:S.fullChartParams,valueScale:S.valueScale,textTransform:S.textTransform,minAndMax:S.minAndMax})}),()=>{h.next(void 0)}},k2="ValueAxis",$I=ae(k2,Lu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=Du(k2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),o()}}),C2="ValueStackAxis",SI=ae(C2,jh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=n.computedData$.pipe(F(i),O(s=>{const u=new Array(s[0]?s[0].length:0).fill(null).map((l,h)=>s.reduce((f,d)=>{if(d&&d[h]){const p=d[h].value==null||d[h].visible==!1?0:d[h].value;return f+p}return f},0));return s.map((l,h)=>l.map((f,d)=>({...f,value:u[d]})))})),a=Du(C2,{selection:t,computedData$:n.isSeriesPositionSeprate$.pipe(B(s=>Sd(()=>s,n.computedData$,o))),fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),a()}}),I2="ScalingArea",AI=ot(I2,"rect"),MI=ae(I2,Vh)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new nt,a=e.insert("rect","g").classed(AI,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(F(o)).subscribe(c=>{a.attr("width",c.width).attr("height",c.height).attr("x",c.left).attr("y",c.top)});const u=r.computedData$.pipe(O(c=>c[0]?c[0].length-1:0),ft());return W({initGroupAxis:r.fullDataFormatter$.pipe(O(c=>c.grid.groupAxis),hi()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(F(o),B(async c=>c)).subscribe(c=>{const h=c.groupMaxIndex,f=c.initGroupAxis.scaleDomain[0]==="auto"?0-c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[0]-c.initGroupAxis.scalePadding,d=c.initGroupAxis.scaleDomain[1]==="auto"?h+c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[1]+c.initGroupAxis.scalePadding,g=ag({maxValue:c.groupMaxIndex,minValue:0,axisWidth:c.axisSize.width,scaleDomain:[f,d],scaleRange:[0,1]}).copy(),m=s2().on("zoom",function(v){const x=v.transform,b=S=>{const _=Math.round(S);return Math.min(h,Math.max(0,_))},w=c.fullDataFormatter.grid.groupAxis.position==="bottom"||c.fullDataFormatter.grid.groupAxis.position==="top"?x.rescaleX(g).domain().map(b):x.rescaleY(g).domain().map(b);w[0]<=0&&w[1]>=h?x.k<s.k&&(x.k=s.k,x.x=s.x,x.y=s.y):w[1]-w[0]<=1&&x.k>s.k&&(x.k=s.k,x.x=s.x,x.y=s.y),s.k=x.k,s.x=x.x,s.y=x.y;const $={...c.fullDataFormatter,grid:{...c.fullDataFormatter.grid,groupAxis:{...c.fullDataFormatter.grid.groupAxis,scaleDomain:w}}};i.dataFormatter$.next($)});e.call(m)}),()=>{o.next(void 0),a.remove()}});function TI(t,e){let n=new lt(()=>{});return t.each(function(){const r=Yu(this,e);n=Hu(n,r)}),n}const Th="GroupAux",Ph=ot(Th,"label-box");function PI({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function DI({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=ot(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",c=>Et(r.lineColorType,i)).style("stroke-width",1).style("stroke-dasharray",r.lineDashArray??"none").style("pointer-events","none"),u=a.merge(s);return a.exit().remove(),s.attr("x1",c=>c.x1).attr("y1",c=>c.y1).attr("x2",c=>c.x2).attr("y2",c=>c.y2),a.transition().duration(50).attr("x1",c=>c.x1).attr("y1",c=>c.y1).attr("x2",c=>c.x2).attr("y2",c=>c.y2),u}function LI(t){t.selectAll("line").data([]).exit().remove()}function EI({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:wh(t,n.labelTextFormat)}]:[]}function kI({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesReverseTransformValue:i}){const o=r.styles.textSize+4,a=t.selectAll(`g.${Ph}`).data(e),s=a.enter().append("g").classed(Ph,!0).style("cursor","pointer"),u=s.merge(a);return s.attr("transform",(c,l)=>`translate(${c.x}, ${c.y})`),a.transition().duration(50).attr("transform",(c,l)=>`translate(${c.x}, ${c.y})`),a.exit().remove(),u.each((c,l,h)=>{const f=c2(c.text,r.styles.textSize)+12,d=-f/2,p=V(h[l]).selectAll("rect").data([c]),g=p.enter().append("rect").attr("height",`${o}px`).attr("fill",v=>Et(n.labelColorType,r)).attr("x",d).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");p.merge(g).attr("width",v=>`${f}px`).style("transform",i),p.exit().remove();const m=V(h[l]).selectAll("text").data([c]),y=m.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");m.merge(y).text(v=>v.text).style("transform",i).attr("fill",v=>Et(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",d+6),m.exit().remove()}),u}function CI(t){t.selectAll(`g.${Ph}`).data([]).exit().remove()}const II=ae(Th,Hh)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new nt,a=e.insert("rect","g").classed(ot(Th,"rect"),!0).attr("opacity",0),s=t.append("g");i.layout$.pipe(F(o)).subscribe(f=>{a.attr("width",f.rootWidth).attr("height",f.rootHeight)}),i.gridAxesTransform$.pipe(F(o),O(f=>f.value),ft()).subscribe(f=>{s.style("transform",f)});const u=new lt(f=>{W({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(F(o),B(async d=>d)).subscribe(d=>{const g=d.computedData[0]?d.computedData[0].length-1:0,m=d.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-d.fullDataFormatter.grid.groupAxis.scalePadding:d.fullDataFormatter.grid.groupAxis.scaleDomain[0]-d.fullDataFormatter.grid.groupAxis.scalePadding,y=d.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?g+d.fullDataFormatter.grid.groupAxis.scalePadding:d.fullDataFormatter.grid.groupAxis.scaleDomain[1]+d.fullDataFormatter.grid.groupAxis.scalePadding,v=d.computedData[0]?d.computedData[0].length:0;let x=d.fullDataFormatter.grid.gridData.seriesDirection==="row"?(d.computedData[0]??[]).map(S=>S.groupLabel):d.computedData.map(S=>S[0].groupLabel);const b=new Array(v).fill(0).map((S,_)=>x[_]!=null?x[_]:String(_)).filter((S,_)=>_>=m&&_<=y),w=d.fullDataFormatter.grid.groupAxis.scalePadding,$=sg({axisLabels:b,axisWidth:d.gridAxesSize.width,padding:w});f.next($)})}),c=Sh({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),l=i.fullChartParams$.pipe(F(o),O(f=>f.highlightTarget),ft());return W({computedData:i.computedData$,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:l,SeriesDataMap:i.SeriesDataMap$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:c,groupScale:u}).pipe(F(o),B(async f=>f)).subscribe(f=>{e.on("mouseover",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("mousemove",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("mouseout",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("click",(d,p)=>{d.stopPropagation();const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})})}),W({event:r.event$.pipe(fi(f=>f.eventName==="mouseover"||f.eventName==="mousemove")),computedData:i.computedData$,groupScale:u,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:l,gridAxesReverseTransform:i.gridAxesReverseTransform$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:c}).pipe(F(o),B(async f=>f)).subscribe(f=>{const d=f.groupScale(f.event.groupLabel)??0,p=PI({groupLabel:f.event.groupLabel,axisX:d,axisHeight:f.gridAxesSize.height,fullParams:f.fullParams});DI({selection:s,pluginName:n,lineData:p,fullParams:f.fullParams,fullChartParams:f.fullChartParams});const g=EI({groupLabel:f.event.groupLabel,axisX:d,fullParams:f.fullParams});kI({selection:s,labelData:g,fullParams:f.fullParams,fullChartParams:f.fullChartParams,gridAxesReverseTransformValue:f.gridAxesReverseTransform.value}).on("mouseover",(y,v)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})}).on("mousemove",(y,v)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})}).on("mouseout",(y,v)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})}).on("click",(y,v)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})})}),TI(a,"mouseout").pipe(F(o)).subscribe(f=>{console.log("rootMouseout"),LI(s),CI(s)}),()=>{o.next(void 0),a.remove()}}),R2={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,gridList:[{listRectWidth:14,listRectHeight:14,listRectRadius:0}],textColorType:"primary"},N2={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},F2={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},G2={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},z2={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},O2={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},U2={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},B2={lineCurve:"curveLinear",linearGradientOpacity:[1,0],gridIndexes:[1]},Y2={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},H2={firstAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},secondAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},gridIndexes:[0,1]},W2="MultiGridLegend",RI=Ce(W2,R2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,o=n.multiGridEachDetail$.pipe(F(i),O(c=>c.map((h,f)=>h.SeriesDataMap$.pipe(O(d=>Array.from(d.keys()))))),B(c=>W(c)),O(c=>c.flat())),a=W({fullParams:n.fullParams$,multiGrid:n.multiGridEachDetail$,computedData:n.computedData$}).pipe(F(i),B(async c=>c),O(c=>c.computedData.map((l,h)=>{const f=fc(c.fullParams.gridList[h]??{},{listRectWidth:c.fullParams.listRectWidth,listRectHeight:c.fullParams.listRectHeight,listRectRadius:c.fullParams.listRectRadius});return l.map(d=>f)}).flat())),s=W({fullParams:n.fullParams$,seriesList:a}).pipe(F(i),B(async c=>c),O(c=>({...c.fullParams,seriesList:c.seriesList}))),u=Pu(W2,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),u()}}),un=t=>{const e=t.fullParams$.pipe(O(i=>i.gridIndexes),ft(),Le(1)),n=new nt,r=t.multiGridEachDetail$.pipe(B(i=>W(i.map(o=>o.gridHighlight$))),O(i=>i.flat()),Le(1));return e.pipe(O(i=>i.map(o=>{n.next(void 0);const a=li(o).pipe(F(n),Le(1)),s=W({computedData:t.computedData$,gridIndex:a}).pipe(F(n),O(w=>w.computedData[w.gridIndex]??w.computedData[0])),u=W({fullDataFormatter:t.fullDataFormatter$,gridIndex:a}).pipe(F(n),O(w=>{const $=w.fullDataFormatter.gridList[0];return{type:"grid",grid:{...w.fullDataFormatter.gridList[w.gridIndex]??$},container:{...w.fullDataFormatter.container}}})),c=W({multiGridEachDetail:t.multiGridEachDetail$,gridIndex:a}).pipe(F(n),B(async w=>w),O(w=>w.multiGridEachDetail[w.gridIndex]??w.multiGridEachDetail[0]),Le(1)),l=c.pipe(B(w=>w.isSeriesPositionSeprate$)),h=c.pipe(B(w=>w.gridContainer$)),f=c.pipe(B(w=>w.gridAxesTransform$)),d=c.pipe(B(w=>w.gridAxesReverseTransform$)),p=c.pipe(B(w=>w.gridAxesSize$)),g=c.pipe(B(w=>w.gridGraphicTransform$)),m=c.pipe(B(w=>w.gridGraphicReverseScale$)),y=c.pipe(B(w=>w.existSeriesLabels$)),v=c.pipe(B(w=>w.SeriesDataMap$)),x=c.pipe(B(w=>w.GroupDataMap$)),b=c.pipe(B(w=>w.visibleComputedData$));return{gridComputedData$:s,gridDataFormatter$:u,gridAxesTransform$:f,gridGraphicTransform$:g,gridGraphicReverseScale$:m,gridAxesReverseTransform$:d,gridAxesSize$:p,gridHighlight$:r,existSeriesLabels$:y,SeriesDataMap$:v,GroupDataMap$:x,visibleComputedData$:b,isSeriesPositionSeprate$:l,gridContainer$:h}})))},Dh="MultiBars",q2=ot(Dh,"grid"),NI=Ce(Dh,G2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${q2}`).data(s).join("g").attr("class",q2).each((u,c,l)=>{const h=V(l[c]);o[c]=Ah(Dh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Lh="MultiBarStack",X2=ot(Lh,"grid"),FI=Ce(Lh,z2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${X2}`).data(s).join("g").attr("class",X2).each((u,c,l)=>{const h=V(l[c]);o[c]=v2(Lh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Eh="MultiBarsTriangle",j2=ot(Eh,"grid"),GI=Ce(Eh,O2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${j2}`).data(s).join("g").attr("class",j2).each((u,c,l)=>{const h=V(l[c]);o[c]=$2(Eh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),kh="MultiLines",V2=ot(kh,"grid"),zI=Ce(kh,U2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${V2}`).data(s).join("g").attr("class",V2).each((u,c,l)=>{const h=V(l[c]);o[c]=l2(kh,{selection:h,computedData$:u.gridComputedData$,existSeriesLabels$:u.existSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullDataFormatter$:u.gridDataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ch="MultiLineAreas",Z2=ot(Ch,"grid"),OI=Ce(Ch,B2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Z2}`).data(s).join("g").attr("class",Z2).each((u,c,l)=>{const h=V(l[c]);o[c]=h2(Ch,{selection:h,computedData$:u.gridComputedData$,existSeriesLabels$:u.existSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullDataFormatter$:u.gridDataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,layout$:r.layout$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ih="MultiDots",K2=ot(Ih,"grid"),UI=Ce(Ih,Y2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${K2}`).data(s).join("g").attr("class",K2).each((u,c,l)=>{const h=V(l[c]);o[c]=A2(Ih,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Rh="MultiGroupAxis",Q2=ot(Rh,"grid"),BI=Ce(Rh,N2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Q2}`).data(s).join("g").attr("class",Q2).each((u,c,l)=>{const h=V(l[c]);o[c]=D2(Rh,{selection:h,computedData$:u.gridComputedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Nh="MultiValueAxis",J2=ot(Nh,"grid"),YI=Ce(Nh,F2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${J2}`).data(s).join("g").attr("class",J2).each((u,c,l)=>{const h=V(l[c]);o[c]=Du(Nh,{selection:h,computedData$:u.gridComputedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(s=>s())}});function tx(t,e,n,r){const{gap:i,rowAmount:o,columnAmount:a}=e,s=(t.width-i*(a-1))/a,u=(t.height-i*(o-1))/o,c=r*s+r*i,l=n*u+n*i,h=[c,l],f=[s/t.width,u/t.height];return{translate:h,scale:f}}const HI=({fullDataFormatter$:t,layout$:e})=>{const n=new nt;function r({xAxis:i,yAxis:o,width:a,height:s}){if(!i||!o)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let u=0,c=0,l=0,h=0,f=0;return i.position==="bottom"?o.position==="left"?(h=180,c=s):o.position==="right"?(h=180,f=180,u=a,c=s):(h=180,c=s):i.position==="top"?o.position==="left"||(o.position==="right"?(f=180,u=a):(h=180,c=s)):i.position==="left"?o.position==="bottom"?(l=-90,c=s):o.position==="top"?(l=-90,f=180):(h=180,c=s):i.position==="right"&&(o.position==="bottom"?(l=-90,h=180,c=s,u=a):o.position==="top"?(l=-90,h=180,f=180,u=a):(h=180,c=s)),{translate:[u,c],scale:[1,1],rotate:l,rotateX:h,rotateY:f,value:`translate(${u}px, ${c}px) rotate(${l}deg) rotateX(${h}deg) rotateY(${f}deg)`}}return new lt(i=>(W({fullDataFormatter:t,layout:e}).pipe(F(n),B(async o=>o)).subscribe(o=>{const a=r({xAxis:o.fullDataFormatter.grid.groupAxis,yAxis:o.fullDataFormatter.grid.valueAxis,width:o.layout.width,height:o.layout.height});i.next(a)}),function(){n.next(void 0)}))},WI=({gridAxesTransform$:t})=>t.pipe(O(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,o=e.rotateX*-1,a=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:o,rotateY:a,value:`translate(${n[0]}px, ${n[1]}px) rotate(${i}deg) rotateX(${o}deg) rotateY(${a}deg)`}})),qI=({computedData$:t,fullDataFormatter$:e,fullChartParams$:n,layout$:r})=>W({computedData:t,fullDataFormatter:e,fullChartParams:n,layout:r}).pipe(B(async o=>o),O(o=>{const a=o.fullDataFormatter.grid;if(!!(a.seriesSlotIndexes&&a.seriesSlotIndexes.length===o.computedData.length))return o.computedData.map((u,c)=>{const l=a.seriesSlotIndexes[c]%o.fullDataFormatter.container.columnAmount,h=Math.floor(a.seriesSlotIndexes[c]/o.fullDataFormatter.container.columnAmount),{translate:f,scale:d}=tx(o.layout,o.fullDataFormatter.container,h,l);return{slotIndex:a.seriesSlotIndexes[c],rowIndex:h,columnIndex:l,translate:f,scale:d}});{const u=a.slotIndex%o.fullDataFormatter.container.columnAmount,c=Math.floor(a.slotIndex/o.fullDataFormatter.container.columnAmount);return o.computedData.map((l,h)=>{const{translate:f,scale:d}=tx(o.layout,o.fullDataFormatter.container,c,u);return{slotIndex:a.slotIndex,rowIndex:c,columnIndex:u,translate:f,scale:d}})}})),Fh="OverlappingValueAxes",ex=ot(Fh,"grid"),XI=Ce(Fh,H2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[],a=r.fullParams$.pipe(F(i),O(l=>l.gridIndexes[0])),s=r.fullParams$.pipe(F(i),O(l=>l.gridIndexes[1])),u=W({firstGridIndex:a,secondGridIndex:s}).pipe(F(i),B(l=>r.fullDataFormatter$.pipe(F(i),O(h=>{h.gridList[l.secondGridIndex]||(h.gridList[l.secondGridIndex]=Object.assign({},h.gridList[l.firstGridIndex]));let f="";return h.gridList[l.firstGridIndex].valueAxis.position==="left"?f="right":h.gridList[l.firstGridIndex].valueAxis.position==="bottom"?f="top":h.gridList[l.firstGridIndex].valueAxis.position==="top"?f="bottom":h.gridList[l.firstGridIndex].valueAxis.position==="right"&&(f="left"),{type:"grid",grid:{...h.gridList[l.secondGridIndex],valueAxis:{...h.gridList[l.secondGridIndex].valueAxis,position:f}},container:{...h.container}}}))));return li(r).pipe(F(i),O(l=>({...l,fullParams$:l.fullParams$.pipe(O(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),B(l=>un(l)),O(l=>l.map((h,f)=>{if(f===0)return h;const d=HI({fullDataFormatter$:u,layout$:r.layout$}),p=WI({gridAxesTransform$:d}),g=qI({computedData$:h.gridComputedData$,fullDataFormatter$:u,fullChartParams$:r.fullChartParams$,layout$:r.layout$});return{...h,gridAxesTransform$:d,gridAxesReverseTransform$:p,gridContainer$:g}}))).subscribe(l=>{o.forEach(h=>h()),t.selectAll(`g.${ex}`).data(l).join("g").attr("class",ex).each((h,f,d)=>{if(f>1)return;const p=V(d[f]);o[f]=Du(Fh,{selection:p,computedData$:h.gridComputedData$,fullParams$:r.fullParams$.pipe(O(g=>f===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:h.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:h.gridAxesTransform$,gridAxesReverseTransform$:h.gridAxesReverseTransform$,gridAxesSize$:h.gridAxesSize$,gridContainer$:h.gridContainer$,isSeriesPositionSeprate$:h.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(l=>l())}}),nx={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},rx={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:t=>{if(t.highlightTarget==="datum"&&t.datum)return[`${t.datum.label}: ${t.datum.value}`];if(t.highlightTarget==="series"){const e=t.seriesLabel,n=t.series.map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.series.map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="category"){const e=t.categoryLabel,n=t.category.map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}return[]},svgRenderFn:null},jI=ug("Container",nx)(({selection:t})=>function(){}),Gh="Tooltip",ix=ot(Gh,"g"),VI=ot(Gh,"box");function ZI(t,e){const n=e.textSize*1.5;return t.filter(r=>r!="").map((r,i)=>{const o=i*n;return`<text font-size="${e.textSize}" fill="${e.textColor}" x="0" y="${o}" style="dominant-baseline:text-before-edge">${r}</text>`}).join()}function KI({rootSelection:t,pluginName:e,rootWidth:n,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const s=5,u=i?[i]:[],c=i?[o]:[],h=t.selectAll(`g.${ix}`).data(u).join(b=>b.append("g").classed(ix,!0).attr("pointer-events","none"),b=>b,b=>b.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${VI}`).data(c).join(b=>b.append("g").classed(ot(e,"box"),!0)),f=h.selectAll("rect").data(c).join(b=>b.append("rect").attr("rx",s).attr("ry",s)).attr("fill",b=>b.backgroundColor).attr("stroke",b=>b.strokeColor).attr("opacity",b=>b.backgroundOpacity),d=h.selectAll("g").data(u).join(b=>b.append("g").classed(ot(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));u.length&&DC(d,u[0]);const p=d!=null&&d.node()?u2(d):{width:0,height:0};f.attr("width",p.width+o.padding*2).attr("height",p.height+o.padding*2);const g=h!=null&&h.node()?u2(h):{width:0,height:0},m=n-g.width,y=r-g.height,v=a.offsetX+o.offset[0]>m?m-a.offsetX:o.offset[0],x=a.offsetY+o.offset[1]>y?y-a.offsetY:o.offset[1];h.attr("transform",b=>`translate(${v}, ${x})`),h.attr("transform",b=>`translate(${v}, ${x})`)}const QI=ug(Gh,rx)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new nt,s=o.event$.pipe(F(a),fi(p=>p.eventName==="mouseover"||p.eventName==="mousemove")),u=o.event$.pipe(F(a),fi(p=>p.eventName==="mouseout")),c=W({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$}).pipe(F(a),B(async p=>p),O(p=>({backgroundColor:Et(p.fullParams.backgroundColorType,p.fullChartParams),backgroundOpacity:p.fullParams.backgroundOpacity,strokeColor:Et(p.fullParams.strokeColorType,p.fullChartParams),offset:p.fullParams.offset,padding:p.fullParams.padding,textSize:p.fullChartParams.styles.textSize,textColor:Et(p.fullParams.textColorType,p.fullChartParams)}))),l=W({fullParams:i.fullParams$,tooltipStyle:c}).pipe(F(a),B(async p=>p),O(p=>p.fullParams.svgRenderFn?p.fullParams.svgRenderFn:g=>{const m=p.fullParams.textRenderFn(g);return ZI(m,p.tooltipStyle)})),h=W({event:s,contentRenderFn:l}).pipe(F(a),B(async p=>p),O(p=>p.contentRenderFn(p.event))),f=u.pipe(F(a),O(p=>"")),d=Hu(s,u).pipe(F(a),O(p=>p.event));return W({svgString:Hu(h,f),event:d,layout:i.layout$,tooltipStyle:c}).pipe(F(a),B(async p=>p)).subscribe(p=>{KI({rootSelection:e,pluginName:n,rootWidth:p.layout.rootWidth,rootHeight:p.layout.rootHeight,svgString:p.svgString,tooltipStyle:p.tooltipStyle,event:p.event})}),function(){a.next(void 0)}}),ox={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,bubbleScaleType:"area"},ax={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},sx={eventFn:(t,e,n)=>e==="mouseover"||e==="mousemove"?[String(t.datum.value)]:[String(Math.round(t.data.reduce((r,i)=>r+(i.value??0),0)*n))],textAttrs:[{transform:"translate(0, 0)"}],textStyles:[{"font-weight":"bold","text-anchor":"middle","pointer-events":"none","dominant-baseline":"middle","font-size":64,fill:"#000"}]},ux={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)},cx={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};function JI(t,{text:e,radius:n,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(t==null||e==null){console.error("selection or text is not defined");return}n==null&&(n=t.node().getBBox().width/2);function a(d){let p;return i?p=d.split(""):p=d.split(/\s+/g),p[p.length-1]||p.pop(),p[0]||p.shift(),p}function s(d,p){return d&&p&&d.length>p&&(d=d.substring(0,p)+"..."),d}function u(d){var g;const p=document.createElement("canvas").getContext("2d");return((g=p==null?void 0:p.measureText(d))==null?void 0:g.width)??0}function c(d){const p=u(d.trim());return Math.sqrt(p*r)}function l(d,p){let g={width:0,text:""},m=1/0;const y=[];let v=" ";i&&(v="");for(let x=0,b=d.length;x<b;++x){const w=(g.text?g.text+v:"")+d[x],$=u(w);(m+$)/2<p?(g.width=m=$,g.text=w):(m=u(d[x]),g={width:m,text:d[x]},y.push(g))}return y}function h(d){let p=0;for(let g=0,m=d.length;g<m;++g){const y=(Math.abs(g-m/2+.5)+.5)*r,v=d[g].width/2;p=Math.max(p,Math.sqrt(v**2+y**2))}return p}function f(d,p){o>0&&(p=s(p,o));const g=a(p),m=c(p),y=l(g,m),v=h(y);let x=d.select("text");x.size()||(x=d.append("text")),x.attr("transform",`translate(0,0) scale(${n/v})`);const b=x.selectAll("tspan").data(y),w=b.enter().append("tspan").attr("x",0).merge(b).attr("y",($,S)=>(S-y.length/2+.8)*r).text($=>$.text);return b.exit().remove(),b.merge(w)}return f(t,e)}let sr;function tR(t,e){return N1().velocityDecay(e.force.velocityDecay).force("collision",C1().radius(n=>n.r+e.force.collisionSpacing)).force("charge",F1().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function eR({data:t,bubbleGroupR:e,maxValue:n,avgValue:r}){const i=e/Math.sqrt(t.length),a=i*i*Math.PI/r,s=n*a;return Math.pow(s/Math.PI,.5)*.75}function nR({data:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,scaleType:i}){const o=Math.min(n,r)/2,a=t.flat().filter(d=>d.value!=null&&d.visible!=!1),s=Math.max(...a.map(d=>d.value)),u=a.reduce((d,p)=>d+(p.value??0),0)/a.length,c=eR({data:a,bubbleGroupR:o,maxValue:s,avgValue:u}),l=i==="area"?.5:1,h=tu().domain([0,s]).range([0,c]).exponent(l);return a.map(d=>{const p=d,g=e.get(d.id);g?(p.x=g.x,p.y=g.y):(p.x=Math.random()*n,p.y=Math.random()*r);const m=h(p.value??0);return p.r=m,p._originR=m,p})}function lx({graphicSelection:t,bubblesData:e,fullParams:n}){let r=t.selectAll("g").data(e,a=>a.id),i=r.enter().append("g").attr("cursor","pointer");i.style("font-size",12).style("fill","#ffffff").attr("text-anchor","middle").attr("transform",a=>`translate(${a.x},${a.y})`),i.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",a=>a.color),i.append("text").style("opacity",.8).attr("pointer-events","none"),r.exit().remove();const o=r.merge(i);return o.select("circle").transition().duration(200).attr("r",a=>a.r).attr("fill",a=>a.color),o.each((a,s,u)=>{const c=V(u[s]);let l=!0;a.label.length<=n.bubbleText.lineLengthMin&&(l=!1),c.call(JI,{text:a.label,radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:l})}),o}function rR({data:t,highlightRIncrease:e,highlightIds:n}){if(e!=0){if(!n.length){t.forEach(r=>r.r=r._originR);return}t.forEach(r=>{n.includes(r.id)?r.r=r._originR+e:r.r=r._originR})}}function iR(){return Zg().on("start",(t,e)=>{t.active||sr.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||sr.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function fx({fullParams:t,graphicWidth:e,graphicHeight:n}){sr.force("x",G1().strength(t.force.strength).x(0)).force("y",z1().strength(t.force.strength).y(0)),sr.alpha(1).restart()}function oR({bubblesSelection:t,highlightIds:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1);return}t.each((r,i,o)=>{const a=V(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(Qa).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const aR=Di("Bubbles",ox)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=t.append("g"),a=new nt;let s=new Map;n.layout$.pipe(hi()).subscribe(h=>{t.attr("transform",`translate(${h.width/2}, ${h.height/2})`),n.layout$.pipe(F(i)).subscribe(f=>{t.transition().attr("transform",`translate(${f.width/2}, ${f.height/2})`)})});const u=n.fullParams$.pipe(F(i),O(h=>h.bubbleScaleType),ft()),c=new lt(h=>{W({layout:n.layout$,computedData:n.computedData$,scaleType:u}).pipe(F(i),B(async f=>f)).subscribe(f=>{const d=nR({data:f.computedData,LastBubbleDataMap:s,graphicWidth:f.layout.width,graphicHeight:f.layout.height,scaleType:f.scaleType});h.next(d)})});c.subscribe(h=>{s=new Map(h.map(f=>[f.id,f]))});const l=n.fullChartParams$.pipe(F(i),O(h=>h.highlightTarget),ft());return W({layout:n.layout$,computedData:n.computedData$,bubblesData:c,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:l}).pipe(F(i),B(async h=>h)).subscribe(h=>{const f=lx({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams});sr=tR(f,h.fullParams),f.on("mouseover",(d,p)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("mousemove",(d,p)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("mouseout",(d,p)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("click",(d,p)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).call(iR()),sr.nodes(h.bubblesData),fx({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),a.next(f)}),W({bubblesSelection:a,bubblesData:c,highlight:n.seriesHighlight$.pipe(O(h=>h.map(f=>f.id))),fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,layout:n.layout$}).pipe(F(i),B(async h=>h)).subscribe(h=>{oR({bubblesSelection:h.bubblesSelection,highlightIds:h.highlight,fullChartParams:h.fullChartParams}),h.fullParams.highlightRIncrease&&(rR({data:h.bubblesData,highlightRIncrease:h.fullParams.highlightRIncrease,highlightIds:h.highlight}),lx({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams})),fx({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),sr.nodes(h.bubblesData)}),()=>{i.next(void 0)}});function hx({computedDataSeries:t,startAngle:e,endAngle:n}){return xv().startAngle(e).endAngle(n).value(o=>o.visible==!1?0:o.value).sort((o,a)=>o.sortedIndex-a.sortedIndex)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}const dx="Pie",sR=ot(dx,"path");function uR({enter:t,exit:e,data:n,lastData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,u)=>{const c=r[u]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+c.startAngle*(1-o),endAngle:s.endAngle*o+c.endAngle*(1-o),value:s.value*o+c.value*(1-o)}});return zh(a,i.startAngle,i.endAngle,1)}:o=>zh(n,i.startAngle,i.endAngle,o)}function zh(t,e,n,r){return t.map((i,o)=>{const a=e+(i.startAngle-e)*r,s=a+(i.endAngle-i.startAngle)*r;return{...i,startAngle:a,endAngle:s}})}function px({selection:t,renderData:e,arc:n}){let r=t.selectAll("path").data(e,s=>s.id),i=r.enter().append("path").classed(sR,!0),o=r.exit();i.append("path");const a=r.merge(i);return a.style("cursor","pointer").attr("fill",(s,u)=>s.data.color).attr("d",(s,u)=>n(s)),o.remove(),a}function cR({pathSelection:t,ids:e,fullChartParams:n,arc:r,arcMouseover:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>r(o));return}t.each((o,a,s)=>{const u=V(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(Qa).duration(500).attr("d",c=>i(c)):u.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",c=>r(c))})}const lR=Di(dx,ax)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=t.append("g"),a=new nt;let s=[],u=[];n.layout$.pipe(hi()).subscribe(p=>{t.attr("transform",`translate(${p.width/2}, ${p.height/2})`),n.layout$.pipe(F(i)).subscribe(g=>{t.transition().attr("transform",`translate(${g.width/2}, ${g.height/2})`)})});const c=n.layout$.pipe(F(i),O(p=>p.width<p.height?p.width:p.height)),l=new lt(p=>{W({computedData:n.computedData$,fullParams:n.fullParams$}).pipe(F(i),B(async g=>g)).subscribe(g=>{const m=hx({computedDataSeries:g.computedData,startAngle:g.fullParams.startAngle,endAngle:g.fullParams.endAngle});p.next(m)})}),h=new lt(p=>{W({shorterSideWith:c,fullParams:n.fullParams$}).pipe(F(i),B(async g=>g)).subscribe(g=>{const m=Tu({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});p.next(m)})}),f=new lt(p=>{W({shorterSideWith:c,fullParams:n.fullParams$}).pipe(F(i),B(async g=>g)).subscribe(g=>{const m=Tu({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerMouseoverRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});p.next(m)})}),d=n.fullChartParams$.pipe(F(i),O(p=>p.highlightTarget),ft());return W({pieData:l,SeriesDataMap:n.SeriesDataMap$,arc:h,arcMouseover:f,computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:d}).pipe(F(i),B(async p=>p)).subscribe(p=>{o.interrupt("graphicMove");let g=t.selectAll("path").data(p.pieData,x=>x.data.id),m=g.enter(),y=g.exit();const v=uR({enter:m,exit:y,data:p.pieData,lastData:s,fullParams:p.fullParams});o.transition("graphicMove").duration(p.fullChartParams.transitionDuration).ease(ar(p.fullChartParams.transitionEase)).tween("move",(x,b)=>w=>{u=v(w),px({selection:o,renderData:u,arc:p.arc}),r.event$.next({type:"series",pluginName:e,eventName:"transitionMove",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData})}).on("end",(x,b)=>{u=zh(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const w=px({selection:o,renderData:u,arc:p.arc});a.next(w),s=Object.assign([],p.pieData),r.event$.next({type:"series",pluginName:e,eventName:"transitionEnd",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData}),w.on("mouseover",($,S)=>{$.stopPropagation(),r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:p.highlightTarget,datum:S.data,series:p.SeriesDataMap.get(S.data.seriesLabel),seriesIndex:S.data.seriesIndex,seriesLabel:S.data.seriesLabel,event:$,data:p.computedData})}).on("mousemove",($,S)=>{$.stopPropagation(),r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:p.highlightTarget,datum:S.data,series:p.SeriesDataMap.get(S.data.seriesLabel),seriesIndex:S.data.seriesIndex,seriesLabel:S.data.seriesLabel,event:$,data:p.computedData})}).on("mouseout",($,S)=>{$.stopPropagation(),r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:p.highlightTarget,datum:S.data,series:p.SeriesDataMap.get(S.data.seriesLabel),seriesIndex:S.data.seriesIndex,seriesLabel:S.data.seriesLabel,event:$,data:p.computedData})}).on("click",($,S)=>{$.stopPropagation(),r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:p.highlightTarget,datum:S.data,series:p.SeriesDataMap.get(S.data.seriesLabel),seriesIndex:S.data.seriesIndex,seriesLabel:S.data.seriesLabel,event:$,data:p.computedData})})})}),W({pathSelection:a,highlight:n.seriesHighlight$.pipe(O(p=>p.map(g=>g.id))),fullChartParams:n.fullChartParams$,arc:h,arcMouseover:f}).pipe(F(i),B(async p=>p)).subscribe(p=>{cR({pathSelection:p.pathSelection,ids:p.highlight,fullChartParams:p.fullChartParams,arc:p.arc,arcMouseover:p.arcMouseover})}),()=>{i.next(void 0)}}),gx="PieEventTexts",mx=ot(gx,"text");function Oh(t,e){const n=t.selectAll(`text.${mx}`).data(e),r=n.enter().append("text").classed(mx,!0),i=n.merge(r);return i.each((o,a,s)=>{const u=V(s[a]).text(o.text);Object.keys(o.attr).forEach(c=>{u.attr(c,o.attr[c])}),Object.keys(o.style).forEach(c=>{u.style(c,o.style[c])})}),n.exit().remove(),i}function Uh({eventData:t,eventName:e,t:n,eventFn:r,textAttrs:i,textStyles:o}){return r(t,e,n).map((s,u)=>({text:s,attr:i[u],style:o[u]}))}const fR=Di(gx,sx)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=t.append("g");let a;n.layout$.pipe(hi()).subscribe(u=>{t.attr("transform",`translate(${u.width/2}, ${u.height/2})`),n.layout$.pipe(F(i)).subscribe(c=>{t.transition().attr("transform",`translate(${c.width/2}, ${c.height/2})`)})});const s=n.fullChartParams$.pipe(F(i),O(u=>u.highlightTarget),ft());return W({computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:s}).pipe(F(i),B(async u=>u)).subscribe(u=>{o.transition().duration(u.fullChartParams.transitionDuration).ease(ar(u.fullChartParams.transitionEase)).tween("move",(c,l)=>h=>{const f=Uh({eventData:{type:"series",pluginName:e,eventName:"transitionMove",event:c,highlightTarget:u.highlightTarget,data:u.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:h,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});Oh(o,f)}).on("end",(c,l)=>{const h=Uh({eventData:{type:"series",pluginName:e,eventName:"transitionEnd",event:c,highlightTarget:u.highlightTarget,data:u.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:1,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});Oh(o,h),a&&a.unsubscribe(),a=r.event$.subscribe(f=>{const d=Uh({eventData:f,eventName:f.eventName,t:1,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});Oh(o,d)})})}),()=>{i.next(void 0)}}),yx="PieLabels",hR=ot(yx,"text");function dR(t,e,n,r){return t.map((i,o)=>{const[a,s]=e.centroid(i),[u,c]=n.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:s*r,mouseoverX:u*r,mouseoverY:c*r}}).filter(i=>i.pieDatum.data.visible)}function pR(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(hR,!0),a=i.exit();o.append("text");const s=i.merge(o);return s.attr("font-weight","bold").attr("text-anchor","middle").style("dominant-baseline","middle").style("cursor",u=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").text(u=>n.labelFn(u.pieDatum.data)).attr("font-size",r.styles.textSize).attr("fill",(u,c)=>$h({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function gR({labelSelection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition().duration(200).attr("transform",r=>"translate("+r.x+","+r.y+")").style("opacity",1);return}t.each((r,i,o)=>{const a=V(o[i]);e.includes(r.pieDatum.id)?a.style("opacity",1).transition().duration(200).attr("transform",s=>"translate("+s.mouseoverX+","+s.mouseoverY+")"):a.style("opacity",n.styles.unhighlightedOpacity).transition().duration(200).attr("transform",s=>"translate("+s.x+","+s.y+")")})}const mR=Di(yx,ux)(({selection:t,observer:e,subject:n})=>{const r=new nt,i=t.append("g");let o=new nt,a=[];return e.layout$.pipe(hi()).subscribe(s=>{t.attr("transform",`translate(${s.width/2}, ${s.height/2})`),e.layout$.pipe(F(r)).subscribe(u=>{t.transition().attr("transform",`translate(${u.width/2}, ${u.height/2})`)})}),W({layout:e.layout$,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(F(r),B(async s=>s)).subscribe(s=>{const u=s.layout.width<s.layout.height?s.layout.width:s.layout.height,c=Tu({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerRadius,padAngle:0,cornerRadius:0}),l=Tu({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),h=hx({computedDataSeries:s.computedData,startAngle:s.fullParams.startAngle,endAngle:s.fullParams.endAngle});a=dR(h,c,l,s.fullParams.labelCentroid);const f=pR(i,a,s.fullParams,s.fullChartParams);o.next(f)}),W({labelSelection:o,highlight:e.seriesHighlight$.pipe(O(s=>s.map(u=>u.id))),fullChartParams:e.fullChartParams$}).pipe(F(r),B(async s=>s)).subscribe(s=>{gR({labelSelection:s.labelSelection,ids:s.highlight,fullChartParams:s.fullChartParams})}),()=>{r.next(void 0)}}),bx="SeriesLegend",yR=Di(bx,cx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,o=n.SeriesDataMap$.pipe(F(i),O(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),O(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Pu(bx,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),vx={paddingInner:2,paddingOuter:2,labelColorType:"primary",squarifyRatio:1.618034,sort:(t,e)=>e.value-t.value},xx={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},_x="TreeLegend",bR=cg(_x,xx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,o=n.CategoryDataMap$.pipe(F(i),O(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),O(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Pu(_x,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),ur="TreeMap",wx=ot(ur,"tree"),$x=ot(ur,"tile");function vR({selection:t,treeData:e,fullParams:n,fullChartParams:r}){const i=r.styles.textSize/2,o=t.selectAll(`g.${wx}`).data(e,a=>a.data.id).join("g").attr("class",wx);return o.attr("transform",a=>!a.x0||!a.y0?null:`translate(${a.x0},${a.y0})`).each((a,s,u)=>{const c=V(u[s]);c.selectAll(`rect.${$x}`).data([a],l=>l.data.id).join("rect").attr("id",l=>l.data.id).attr("class",$x).attr("cursor","pointer").attr("width",l=>l.x1-l.x0).attr("height",l=>l.y1-l.y0).attr("fill",l=>l.data.color).attr("data-name",l=>l.data.label).attr("data-category",l=>l.data.categoryLabel).attr("data-value",l=>l.data.value),c.selectAll("g").data([a]).join("g").each((l,h,f)=>{V(f[h]).selectAll("text").data([l]).join("text").text(p=>p.data.label).attr("dominant-baseline","hanging").attr("x",i).attr("y",i).attr("font-size",r.styles.textSize).each(function(p){const g=V(this),m=p.data.label.split(/\s+/).reverse();let y,v=[];const x=r.styles.textSize,b=g.attr("x");let w=g.attr("y"),$=0,S=g.text(null).append("tspan").attr("cursor","pointer").attr("fill",Et(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",b).attr("y",w);for(;y=m.pop();)v.push(y),S.text(v.join(" ")),S.node().getComputedTextLength()>p.x1-p.x0-i&&(v.pop(),S.text(v.join(" ")),v=[y],$+=x,S=g.append("tspan").attr("cursor","pointer").attr("fill",Et(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",b).attr("y",w).attr("dy",$+"px").text(y))})})}),o}function xR({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.data.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const _R=cg(ur,vx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=W({layout:r.layout$,visibleComputedData:r.visibleComputedData$,fullParams:r.fullParams$,fullDataFormatter:r.fullDataFormatter$,fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u),O(u=>{const c=Dy().size([u.layout.width,u.layout.height]).paddingInner(u.fullParams.paddingInner).paddingOuter(u.fullParams.paddingOuter).round(!0).tile(Ff.ratio(u.fullParams.squarifyRatio)),l=qs(u.visibleComputedData).sum(f=>f.value).sort(u.fullParams.sort);return c(l),l.leaves()})),a=W({selection:li(t),treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u),O(u=>vR({selection:t,treeData:u.treeData,fullParams:u.fullParams,fullChartParams:u.fullChartParams}))),s=r.fullChartParams$.pipe(F(i),O(u=>u.highlightTarget),ft());return W({cellSelection:a,computedData:r.computedData$,treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,highlightTarget:s,CategoryDataMap:r.CategoryDataMap$}).pipe(F(i),B(async u=>u)).subscribe(u=>{u.cellSelection.on("mouseover",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseover",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("mousemove",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mousemove",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("mouseout",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseout",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("click",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"click",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})})}),W({cellSelection:a,highlight:r.treeHighlight$.pipe(O(u=>u.map(c=>c.id))),fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u)).subscribe(u=>{xR({selection:u.cellSelection,ids:u.highlight,fullChartParams:u.fullChartParams})}),()=>{i.next(void 0)}});Z.BarStack=oI,Z.Bars=KC,Z.BarsDiverging=QC,Z.BarsTriangle=dI,Z.Bubbles=aR,Z.CONTAINER_PLUGIN_PARAMS=nx,Z.Container=jI,Z.DEFAULT_BARS_DIVERGING_PARAMS=Sx,Z.DEFAULT_BARS_PARAMS=Fo,Z.DEFAULT_BARS_TRIANGLE_PARAMS=qh,Z.DEFAULT_BAR_STACK_PARAMS=Wh,Z.DEFAULT_BUBBLES_PARAMS=ox,Z.DEFAULT_DOTS_PARAMS=Yh,Z.DEFAULT_GRID_LEGEND_PARAMS=Zh,Z.DEFAULT_GROUP_AREA_PARAMS=Hh,Z.DEFAULT_GROUP_AXIS_PARAMS=Xh,Z.DEFAULT_LINES_PARAMS=cr,Z.DEFAULT_LINE_AREAS_PARAMS=Bh,Z.DEFAULT_MULTI_BARS_PARAMS=G2,Z.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=O2,Z.DEFAULT_MULTI_BAR_STACK_PARAMS=z2,Z.DEFAULT_MULTI_DOTS_PARAMS=Y2,Z.DEFAULT_MULTI_GRID_LEGEND_PARAMS=R2,Z.DEFAULT_MULTI_GROUP_AXIS_PARAMS=N2,Z.DEFAULT_MULTI_LINES_PARAMS=U2,Z.DEFAULT_MULTI_LINE_AREAS_PARAMS=B2,Z.DEFAULT_MULTI_VALUE_AXIS_PARAMS=F2,Z.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=H2,Z.DEFAULT_PIE_EVENT_TEXTS_PARAMS=sx,Z.DEFAULT_PIE_LABELS_PARAMS=ux,Z.DEFAULT_PIE_PARAMS=ax,Z.DEFAULT_SCALING_AREA_PARAMS=Vh,Z.DEFAULT_SERIES_LEGEND_PARAMS=cx,Z.DEFAULT_TREE_LEGEND_PARAMS=xx,Z.DEFAULT_TREE_MAP_PARAMS=vx,Z.DEFAULT_VALUE_AXIS_PARAMS=Lu,Z.DEFAULT_VALUE_STACK_AXIS_PARAMS=jh,Z.Dots=yI,Z.GridLegend=vI,Z.GroupAux=II,Z.GroupAxis=_I,Z.LineAreas=HC,Z.Lines=FC,Z.MultiBarStack=FI,Z.MultiBars=NI,Z.MultiBarsTriangle=GI,Z.MultiDots=UI,Z.MultiGridLegend=RI,Z.MultiGroupAxis=BI,Z.MultiLineAreas=OI,Z.MultiLines=zI,Z.MultiValueAxis=YI,Z.OverlappingValueAxes=XI,Z.Pie=lR,Z.PieEventTexts=fR,Z.PieLabels=mR,Z.ScalingArea=MI,Z.SeriesLegend=yR,Z.TOOLTIP_PARAMS=rx,Z.Tooltip=QI,Z.TreeLegend=bR,Z.TreeMap=_R,Z.ValueAxis=$I,Z.ValueStackAxis=SI,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
|