@orbcharts/plugins-basic 3.0.0-alpha.44 → 3.0.0-alpha.46

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. package/dist/orbcharts-plugins-basic.es.js +7770 -7580
  2. package/dist/orbcharts-plugins-basic.umd.js +8 -8
  3. package/dist/src/base/BaseBarStack.d.ts +6 -4
  4. package/dist/src/base/BaseBars.d.ts +6 -4
  5. package/dist/src/base/BaseBarsTriangle.d.ts +7 -4
  6. package/dist/src/base/BaseDots.d.ts +5 -3
  7. package/dist/src/base/BaseGroupAxis.d.ts +3 -3
  8. package/dist/src/base/BaseLineAreas.d.ts +6 -3
  9. package/dist/src/base/BaseLines.d.ts +6 -3
  10. package/dist/src/base/BaseValueAxis.d.ts +3 -3
  11. package/dist/src/grid/gridObservables.d.ts +4 -4
  12. package/dist/src/multiGrid/multiGridObservables.d.ts +2 -6
  13. package/dist/src/series/plugins/PieEventTexts.d.ts +3 -1
  14. package/dist/src/series/seriesObservables.d.ts +21 -0
  15. package/dist/src/series/seriesUtils.d.ts +3 -3
  16. package/package.json +2 -2
  17. package/src/base/BaseBarStack.ts +105 -208
  18. package/src/base/BaseBars.ts +78 -64
  19. package/src/base/BaseBarsTriangle.ts +76 -63
  20. package/src/base/BaseDots.ts +41 -178
  21. package/src/base/BaseGroupAxis.ts +13 -13
  22. package/src/base/BaseLineAreas.ts +85 -81
  23. package/src/base/BaseLines.ts +82 -75
  24. package/src/base/BaseValueAxis.ts +14 -15
  25. package/src/grid/gridObservables.ts +22 -38
  26. package/src/grid/plugins/BarStack.ts +16 -3
  27. package/src/grid/plugins/Bars.ts +18 -4
  28. package/src/grid/plugins/BarsDiverging.ts +6 -4
  29. package/src/grid/plugins/BarsTriangle.ts +20 -4
  30. package/src/grid/plugins/Dots.ts +4 -2
  31. package/src/grid/plugins/GroupAux.ts +1 -2
  32. package/src/grid/plugins/GroupAxis.ts +15 -3
  33. package/src/grid/plugins/LineAreas.ts +5 -2
  34. package/src/grid/plugins/Lines.ts +5 -2
  35. package/src/grid/plugins/ScalingArea.ts +0 -1
  36. package/src/grid/plugins/ValueAxis.ts +15 -3
  37. package/src/grid/plugins/ValueStackAxis.ts +14 -5
  38. package/src/multiGrid/multiGridObservables.ts +14 -261
  39. package/src/multiGrid/plugins/MultiBarStack.ts +22 -8
  40. package/src/multiGrid/plugins/MultiBars.ts +21 -7
  41. package/src/multiGrid/plugins/MultiBarsTriangle.ts +22 -7
  42. package/src/multiGrid/plugins/MultiDots.ts +7 -5
  43. package/src/multiGrid/plugins/MultiGridLegend.ts +1 -1
  44. package/src/multiGrid/plugins/MultiGroupAxis.ts +19 -7
  45. package/src/multiGrid/plugins/MultiLineAreas.ts +9 -6
  46. package/src/multiGrid/plugins/MultiLines.ts +9 -6
  47. package/src/multiGrid/plugins/MultiValueAxis.ts +19 -7
  48. package/src/multiGrid/plugins/OverlappingValueAxes.ts +52 -47
  49. package/src/noneData/defaults.ts +3 -0
  50. package/src/series/defaults.ts +13 -3
  51. package/src/series/plugins/Bubbles.ts +139 -88
  52. package/src/series/plugins/Pie.ts +307 -352
  53. package/src/series/plugins/PieEventTexts.ts +102 -38
  54. package/src/series/plugins/PieLabels.ts +95 -48
  55. package/src/series/seriesObservables.ts +145 -0
  56. package/src/series/seriesUtils.ts +4 -4
  57. package/tsconfig.json +1 -1
@@ -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},Hh={lineCurve:"curveLinear",linearGradientOpacity:[1,0]},Wh={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},qh={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},jh={barWidth:0,barGroupPadding:10,barRadius:!1},Xh={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},Vh={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"},Eu={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"},Zh=Eu,Kh={},Qh={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};var ku=function(t,e){return ku=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])},ku(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");ku(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 Jh(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.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 ci(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=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),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 Cu(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 Iu=Cu(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
1
+ (function(K,ur){typeof exports=="object"&&typeof module<"u"?ur(exports):typeof define=="function"&&define.amd?define(["exports"],ur):(K=typeof globalThis<"u"?globalThis:K||self,ur(K["orbcharts-plugins-basic"]={}))})(this,function(K){"use strict";const ur={lineCurve:"curveLinear",lineWidth:2},Xh={lineCurve:"curveLinear",linearGradientOpacity:[1,0]},Vh={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},Zh={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24},Io={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},Sx={...Io},Kh={barWidth:0,barGroupPadding:10,barRadius:!1},Qh={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},Jh={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"},Cu={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"},tp=Cu,ep={},np={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 cr(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 rp(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.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 lr(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 fr(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 ci(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 hr(t){return this instanceof hr?(this.v=t,this):new hr(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=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,h)}}function s(p,d){r[p]&&(i[p]=function(g){return new Promise(function(m,y){o.push([p,g,m,y])>1||u(p,g)})},d&&(i[p]=d(i[p])))}function u(p,d){try{c(r[p](d))}catch(g){f(o[0][3],g)}}function c(p){p.value instanceof hr?Promise.resolve(p.value.v).then(l,h):f(o[0][2],p)}function l(p){u("next",p)}function h(p){u("throw",p)}function f(p,d){p(d),o.shift(),o.length&&u(o[0][0],o[0][1])}}function Px(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 lr=="function"?lr(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 yt(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 Ru=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 Ru(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 Iu?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{nd(p)}catch(g){o=o??[],g instanceof Iu?o=ci(ci([],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 Iu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)nd(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)&&Ru(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Ru(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),td=Go.EMPTY;function ed(t){return t instanceof Go||t&&"closed"in t&&mt(t.remove)&&mt(t.add)&&mt(t.unsubscribe)}function nd(t){mt(t)?t():t.unsubscribe()}var rd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},id={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,ci([t,e],hr(n)))},clearTimeout:function(t){var e=id.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function od(t){id.setTimeout(function(){throw t})}function Nu(){}function zo(t){t()}var Fu=function(t){lr(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,ed(n)&&n.add(r)):r.destination=Ex,r}return e.create=function(n,r,i){return new li(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 Gu(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}(),li=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&&rd.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Gu(n.next,s),error:n.error&&Gu(n.error,s),complete:n.complete&&Gu(n.complete,s)}):a=n}return o.destination=new Dx(a),o}return e}(Fu);function Oo(t){od(t)}function Lx(t){throw t}var Ex={closed:!0,next:Nu,error:Lx,complete:Nu},zu=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 li(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=ad(n),new n(function(i,o){var a=new li({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[zu]=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=ad(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 ad(t){var e;return(e=t??rd.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 Fu||Cx(t)&&ed(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}(Fu),Fx=Cu(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 sd(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?td:(this.currentObservers=null,s.push(n),new Go(function(){r.currentObservers=null,Ru(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 sd(n,r)},e}(lt),sd=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:td},e}(nt),ud={now:function(){return(ud.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=ud);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),cd=new lt(function(t){return t.complete()});function zx(t){return t&&mt(t.schedule)}function Ou(t){return t[t.length-1]}function Ox(t){return mt(Ou(t))?t.pop():void 0}function Uu(t){return zx(Ou(t))?t.pop():void 0}function Ux(t,e){return typeof Ou(t)=="number"?t.pop():e}var Bu=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function ld(t){return mt(t==null?void 0:t.then)}function fd(t){return mt(t[zu])}function hd(t){return Symbol.asyncIterator&&mt(t==null?void 0:t[Symbol.asyncIterator])}function dd(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 pd=Bx();function gd(t){return mt(t==null?void 0:t[pd])}function md(t){return Mx(this,arguments,function(){var n,r,i,o;return Jh(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 yd(t){return mt(t==null?void 0:t.getReader)}function fe(t){if(t instanceof lt)return t;if(t!=null){if(fd(t))return Yx(t);if(Bu(t))return Hx(t);if(ld(t))return Wx(t);if(hd(t))return bd(t);if(gd(t))return qx(t);if(yd(t))return jx(t)}throw dd(t)}function Yx(t){return new lt(function(e){var n=t[zu]();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,od)})}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 bd(t){return new lt(function(e){Xx(t,e).catch(function(n){return e.error(n)})})}function jx(t){return bd(md(t))}function Xx(t,e){var n,r,i,o;return Ax(this,void 0,void 0,function(){var a,s;return Jh(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 vd(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 xd(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(xd(e),vd(e))}function Zx(t,e){return fe(t).pipe(xd(e),vd(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[pd](),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 _d(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 _d(md(t),e)}function t_(t,e){if(t!=null){if(fd(t))return Vx(t,e);if(Bu(t))return Kx(t,e);if(ld(t))return Zx(t,e);if(hd(t))return _d(t,e);if(gd(t))return Qx(t,e);if(yd(t))return Jx(t,e)}throw dd(t)}function Uo(t,e){return e?t_(t,e):fe(t)}function fi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Uu(t);return Uo(t,n)}var wd=Cu(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 e_=Array.isArray;function n_(t,e){return e_(e)?t.apply(void 0,ci([],hr(e))):t(e)}function $d(t){return U(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=Uu(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){Sd(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(l){Sd(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 Sd(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 x=u.shift();a||p(x)};u.length&&c<r;)y();f()}catch(x){e.error(x)}}))};return t.subscribe(oe(e,d,function(){h=!0,f()})),function(){}}function Yu(t,e,n){return n===void 0&&(n=1/0),mt(e)?Yu(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 f_(r,i,t,n)}))}function h_(t){return t===void 0&&(t=1/0),Yu(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 Hu(t,e,n,r){if(mt(n)&&(r=n,n=void 0),r)return Hu(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(Ad(t,e)):b_(t)?m_.map(Ad(t,e)):[],2),o=i[0],a=i[1];if(!o&&Bu(t))return Yu(function(s){return Hu(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 Ad(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 Md(t,e,n){return d_(function(){return t()?e:n})}function Wu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Uu(t),r=Ux(t,1/0),i=t;return i.length?i.length===1?fe(i[0]):h_(r)(Uo(i,n)):cd}function hi(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 cd}: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 wd}function di(t,e){var n=arguments.length>=2;return function(r){return r.pipe(pr,__(1),n?x_(e):$_(function(){return new wd}))}}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},x=function(){var v=l;y(),v==null||v.unsubscribe()};return le(function(v,b){d++,!g&&!p&&m();var _=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=qu(x,u))}),_.subscribe(b),!l&&d>0&&(l=new li({next:function(w){return _.next(w)},error:function(w){g=!0,m(),h=qu(y,i,w),_.error(w)},complete:function(){p=!0,m(),h=qu(y,a),_.complete()}}),fe(v).subscribe(l))})(c)}}function qu(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 li({next:function(){i.unsubscribe(),t()}});return fe(e.apply(void 0,ci([],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()},Nu)),!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 Td(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_=Td(Bo),Pd=D_.right;Td(P_).center;class Dd 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(Ld(this,e))}has(e){return super.has(Ld(this,e))}set(e,n){return super.set(L_(this,e),n)}delete(e){return super.delete(E_(this,e))}}function Ld({_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 ju(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?ju(e,t,n):ju(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 Ed(){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=Ed.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]=kd(n[i],t.name,e);else if(e==null)for(i in n)n[i]=kd(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 kd(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 Cd={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)),Cd.hasOwnProperty(e)?{space:Cd[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 Id(t){var e=Wo(t);return(e.local?Y_:B_)(e)}function H_(){}function Vu(t){return t==null?H_:function(){return this.querySelector(t)}}function W_(t){typeof t!="function"&&(t=Vu(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 j_(){return[]}function Rd(t){return t==null?j_:function(){return this.querySelectorAll(t)}}function X_(t){return function(){return q_(t.apply(this,arguments))}}function V_(t){typeof t=="function"?t=X_(t):t=Rd(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 Nd(t){return function(){return this.matches(t)}}function Fd(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:Fd(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:Fd(t)))}function iw(t){typeof t!="function"&&(t=Nd(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 Gd(t){return new Array(t.length)}function ow(){return new ve(this._enter||this._groups.map(Gd),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 x=0,v=0,b,_;x<p;++x)if(b=g[x]){for(x>=v&&(v=x+1);!(_=m[v])&&++v<p;);b._next=_||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(Gd),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 zd(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)||zd(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 Od(t){return t.trim().split(/^|\s+/)}function Zu(t){return t.classList||new Ud(t)}function Ud(t){this._node=t,this._names=Od(t.getAttribute("class")||"")}Ud.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 Bd(t,e){for(var n=Zu(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Yd(t,e){for(var n=Zu(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function zw(t){return function(){Bd(this,t)}}function Ow(t){return function(){Yd(this,t)}}function Uw(t,e){return function(){(e.apply(this,arguments)?Bd:Yd)(this,t)}}function Bw(t,e){var n=Od(t+"");if(arguments.length<2){for(var r=Zu(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 jw(){this.innerHTML=""}function Xw(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?jw:(typeof t=="function"?Vw:Xw)(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:Id(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:Id(t),r=e==null?n$:typeof e=="function"?e:Vu(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 Hd(t,e,n){var r=zd(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 Hd(this,t,e)}}function m$(t,e){return function(){return Hd(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 pi(){return new ve([[document.documentElement]],v$)}function x$(){return this}ve.prototype=pi.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 Ku(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Wd(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function gi(){}var mi=.7,jo=1/mi,yr="\\s*([+-]?\\d+)\\s*",yi="\\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},${yi}\\)$`),A$=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${yi}\\)$`),M$=new RegExp(`^hsl\\(${yi},${Ee},${Ee}\\)$`),T$=new RegExp(`^hsla\\(${yi},${Ee},${Ee},${yi}\\)$`),qd={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};Ku(gi,Tn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:jd,formatHex:jd,formatHex8:P$,formatHsl:D$,formatRgb:Xd,toString:Xd});function jd(){return this.rgb().formatHex()}function P$(){return this.rgb().formatHex8()}function D$(){return Jd(this).formatHsl()}function Xd(){return this.rgb().formatRgb()}function Tn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=_$.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Vd(e):n===3?new ee(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Xo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Xo(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))?Xo(e[1],e[2],e[3],e[4]):(e=A$.exec(t))?Xo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=M$.exec(t))?Qd(e[1],e[2]/100,e[3]/100,1):(e=T$.exec(t))?Qd(e[1],e[2]/100,e[3]/100,e[4]):qd.hasOwnProperty(t)?Vd(qd[t]):t==="transparent"?new ee(NaN,NaN,NaN,0):null}function Vd(t){return new ee(t>>16&255,t>>8&255,t&255,1)}function Xo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ee(t,e,n,r)}function L$(t){return t instanceof gi||(t=Tn(t)),t?(t=t.rgb(),new ee(t.r,t.g,t.b,t.opacity)):new ee}function Qu(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}Ku(ee,Qu,Wd(gi,{brighter(t){return t=t==null?jo:Math.pow(jo,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?mi:Math.pow(mi,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ee(Pn(this.r),Pn(this.g),Pn(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:Zd,formatHex:Zd,formatHex8:E$,formatRgb:Kd,toString:Kd}));function Zd(){return`#${Dn(this.r)}${Dn(this.g)}${Dn(this.b)}`}function E$(){return`#${Dn(this.r)}${Dn(this.g)}${Dn(this.b)}${Dn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Kd(){const t=Vo(this.opacity);return`${t===1?"rgb(":"rgba("}${Pn(this.r)}, ${Pn(this.g)}, ${Pn(this.b)}${t===1?")":`, ${t})`}`}function Vo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Pn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Dn(t){return t=Pn(t),(t<16?"0":"")+t.toString(16)}function Qd(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 Jd(t){if(t instanceof xe)return new xe(t.h,t.s,t.l,t.opacity);if(t instanceof gi||(t=Tn(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?Jd(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}Ku(xe,k$,Wd(gi,{brighter(t){return t=t==null?jo:Math.pow(jo,t),new xe(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?mi:Math.pow(mi,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(Ju(t>=240?t-240:t+120,i,r),Ju(t,i,r),Ju(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new xe(tp(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("}${tp(this.h)}, ${Zo(this.s)*100}%, ${Zo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function tp(t){return t=(t||0)%360,t<0?t+360:t}function Zo(t){return Math.max(0,Math.min(1,t||0))}function Ju(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 tc=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?ep:function(e,n){return n-e?I$(e,n,t):tc(isNaN(e)?n:e)}}function ep(t,e){var n=e-t;return n?C$(t,n):tc(isNaN(t)?e:t)}const Ko=function t(e){var n=R$(e);function r(i,o){var a=n((i=Qu(i)).r,(o=Qu(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=ep(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]=rc(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]=rc(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var ec=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nc=new RegExp(ec.source,"g");function U$(t){return function(){return t}}function B$(t){return function(e){return t(e)+""}}function np(t,e){var n=ec.lastIndex=nc.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=ec.exec(t))&&(i=nc.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=nc.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 rc(t,e){var n=typeof e,r;return e==null||n==="boolean"?tc(e):(n==="number"?_e:n==="string"?(r=Tn(e))?(e=r,Ko):np:e instanceof Tn?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 rp=180/Math.PI,ip={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function op(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)*rp,skewX:Math.atan(u)*rp,scaleX:a,scaleY:s}}var Qo;function H$(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ip:op(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()))?ip:(t=t.matrix,op(t.a,t.b,t.c,t.d,t.e,t.f))}function ap(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$=ap(H$,"px, ","px)","deg)"),j$=ap(W$,", ",")",")"),br=0,bi=0,vi=0,sp=1e3,Jo,xi,ta=0,Ln=0,ea=0,_i=typeof performance=="object"&&performance.now?performance:Date,up=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ic(){return Ln||(up(X$),Ln=_i.now()+ea)}function X$(){Ln=0}function na(){this._call=this._time=this._next=null}na.prototype=cp.prototype={constructor:na,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?ic():+n)+(e==null?0:+e),!this._next&&xi!==this&&(xi?xi._next=this:Jo=this,xi=this),this._call=t,this._time=n,oc()},stop:function(){this._call&&(this._call=null,this._time=1/0,oc())}};function cp(t,e,n){var r=new na;return r.restart(t,e,n),r}function V$(){ic(),++br;for(var t=Jo,e;t;)(e=Ln-t._time)>=0&&t._call.call(void 0,e),t=t._next;--br}function lp(){Ln=(ta=_i.now())+ea,br=bi=0;try{V$()}finally{br=0,K$(),Ln=0}}function Z$(){var t=_i.now(),e=t-ta;e>sp&&(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);xi=t,oc(r)}function oc(t){if(!br){bi&&(bi=clearTimeout(bi));var e=t-Ln;e>24?(t<1/0&&(bi=setTimeout(lp,t-_i.now()-ea)),vi&&(vi=clearInterval(vi))):(vi||(ta=_i.now(),vi=setInterval(Z$,sp)),br=1,up(lp))}}function fp(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$=Ed("start","end","cancel","interrupt"),J$=[],hp=0,dp=1,ac=2,ra=3,pp=4,sc=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:hp})}function uc(t,e){var n=we(t,e);if(n.state>hp)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=cp(o,0,n.time);function o(c){n.state=dp,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!==dp)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===ra)return fp(a);d.state===pp?(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(fp(function(){n.state===ra&&(n.state=pp,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=ac,n.on.call("start",t,t.__data__,n.index,n.group),n.state===ac){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=sc,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===sc&&(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>ac&&r.state<sc,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 cc(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 gp(t,e){var n;return(typeof e=="number"?_e:e instanceof Tn?Ko:(n=Tn(e))?(e=n,Ko):np)(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"?j$:gp;return this.attrTween(t,typeof e=="function"?(n.local?fS:lS)(n,r,cc(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(){uc(this,t).delay=+e.apply(this,arguments)}}function vS(t,e){return e=+e,function(){uc(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=Nd(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)?uc: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=Vu(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=Rd(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=pi.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 mp(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=mp(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$:gp;return e==null?this.styleTween(t,zS(t,r)).on("end.style."+t,mp(t)):typeof e=="function"?this.styleTween(t,US(t,r,cc(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 jS(t){return function(){this.textContent=t}}function XS(t){return function(){var e=t(this);this.textContent=e??""}}function VS(t){return this.tween("text",typeof t=="function"?XS(cc(this,"text",t)):jS(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=yp(),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 yp(){return++e3}var qe=pi.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=yp(),(n=r3).time=ic(),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)}pi.prototype.interrupt=nS,pi.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 lc({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=lc.prototype;function lc(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+""}lc.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 bp;function f3(t,e){var n=aa(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(bp=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 vp(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 xp={"%":(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)=>vp(t*100,e),r:vp,s:f3,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function _p(t){return t}var wp=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?_p:s3(wp.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?_p:u3(wp.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,x=h.comma,v=h.precision,b=h.trim,_=h.type;_==="n"?(x=!0,_="g"):xp[_]||(v===void 0&&(v=12),b=!0,_="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var w=g==="$"?n:g==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",S=g==="$"?r:/[%p]/.test(_)?a:"",k=xp[_],$=/[defgprs%]/.test(_);v=v===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function E(A){var I=w,D=S,T,C,P;if(_==="c")D=k(A)+D,A="";else{A=+A;var R=A<0||1/A<0;if(A=isNaN(A)?u:k(Math.abs(A),v),b&&(A=l3(A)),R&&+A==0&&p!=="+"&&(R=!1),I=(R?p==="("?p:s:p==="-"||p==="("?"":p)+I,D=(_==="s"?$p[8+bp/3]:"")+D+(R&&p==="("?")":""),$){for(T=-1,C=A.length;++T<C;)if(P=A.charCodeAt(T),48>P||P>57){D=(P===46?i+A.slice(T+1):A.slice(T))+D,A=A.slice(0,T);break}}}x&&!m&&(A=e(A,1/0));var G=I.length+A.length+D.length,M=G<y?new Array(y-G+1).join(f):"";switch(x&&m&&(A=e(M+A,M.length?y-D.length:1/0),M=""),d){case"<":A=I+A+D+M;break;case"=":A=I+M+A+D;break;case"^":A=M.slice(0,G=M.length>>1)+I+A+D+M.slice(G);break;default:A=M+I+A+D;break}return o(A)}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=$p[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var ua,Sp,Ap;d3({thousands:",",grouping:[3],currency:["$",""]});function d3(t){return ua=h3(t),Sp=ua.format,Ap=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 Mp=Symbol("implicit");function Tp(){var t=new Dd,e=[],n=[],r=Mp;function i(o){let a=t.get(o);if(a===void 0){if(r!==Mp)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 Dd;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 Tp(e,n).unknown(r)},ca.apply(i,arguments),i}function Pp(){var t=Tp().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 Pp(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},ca.apply(h(),arguments)}function Dp(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Dp(e())},t}function y3(){return Dp(Pp.apply(null,arguments).paddingInner(1))}function b3(t){return function(){return t}}function v3(t){return+t}var Lp=[0,1];function xr(t){return t}function fc(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=fc(i,r),o=n(a,o)):(r=fc(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]=fc(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=Pd(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=Lp,e=Lp,n=rc,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),Ap(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 Sp(r)}function Ep(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=ju(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 kp(){var t=A3();return t.copy=function(){return $3(t,kp())},ca.apply(t,arguments),Ep(t)}function Cp(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[Pd(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 Cp().domain([t,e]).range(i).unknown(o)},ca.apply(Ep(a),arguments)}function wi(t,e,n){this.k=t,this.x=e,this.y=n}wi.prototype={constructor:wi,scale:function(t){return t===1?this:new wi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new wi(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+")"}},wi.prototype;function la(t){return Object.prototype.toString.call(t)==="[object Object]"}function hc(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 dc=function(t,e){return dc=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])},dc(t,e)};function je(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");dc(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 Ip(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 $i(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 Si(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 pc(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 gc=pc(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 No=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=lr(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(yt(l))try{l()}catch(g){o=g instanceof Ru?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=lr(h),p=f.next();!p.done;p=f.next()){var d=p.value;try{ap(d)}catch(g){o=o??[],g instanceof Ru?o=ci(ci([],fr(o)),fr(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new Ru(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)ap(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}(),ip=No.EMPTY;function op(t){return t instanceof No||t&&"closed"in t&&yt(t.remove)&&yt(t.add)&&yt(t.unsubscribe)}function ap(t){yt(t)?t():t.unsubscribe()}var sp={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},up={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,ci([t,e],fr(n)))},clearTimeout:function(t){var e=up.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function cp(t){up.setTimeout(function(){throw t})}function Nu(){}function Fo(t){t()}var Fu=function(t){cr(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,op(n)&&n.add(r)):r.destination=Cx,r}return e.create=function(n,r,i){return new li(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}(No),Dx=Function.prototype.bind;function Gu(t,e){return Dx.call(t,e)}var Tx=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){Go(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Go(r)}else Go(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Go(n)}},t}(),li=function(t){cr(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(yt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&sp.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Gu(n.next,s),error:n.error&&Gu(n.error,s),complete:n.complete&&Gu(n.complete,s)}):a=n}return o.destination=new Tx(a),o}return e}(Fu);function Go(t){cp(t)}function Lx(t){throw t}var Cx={closed:!0,next:Nu,error:Lx,complete:Nu},zu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function pr(t){return t}function Ex(t){return t.length===0?pr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var ht=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=Rx(e)?e:new li(e,n,r);return Fo(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=lp(n),new n(function(i,o){var a=new li({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[zu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Ex(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=lp(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 lp(t){var e;return(e=t??sp.Promise)!==null&&e!==void 0?e:Promise}function kx(t){return t&&yt(t.next)&&yt(t.error)&&yt(t.complete)}function Rx(t){return t&&t instanceof Fu||kx(t)&&op(t)}function Ix(t){return yt(t==null?void 0:t.lift)}function fe(t){return function(e){if(Ix(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 ae(t,e,n,r,i){return new Nx(t,e,n,r,i)}var Nx=function(t){cr(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}(Fu),Fx=ku(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ot=function(t){cr(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 fp(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;Fo(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=lr(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;Fo(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;Fo(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?ip:(this.currentObservers=null,s.push(n),new No(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 ht;return n.source=this,n},e.create=function(n,r){return new fp(n,r)},e}(ht),fp=function(t){cr(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:ip},e}(ot),hp={now:function(){return(hp.delegate||Date).now()},delegate:void 0},Gx=function(t){cr(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=hp);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}(ot),pp=new ht(function(t){return t.complete()});function zx(t){return t&&yt(t.schedule)}function Ou(t){return t[t.length-1]}function Ox(t){return yt(Ou(t))?t.pop():void 0}function Uu(t){return zx(Ou(t))?t.pop():void 0}function Ux(t,e){return typeof Ou(t)=="number"?t.pop():e}var Bu=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function dp(t){return yt(t==null?void 0:t.then)}function gp(t){return yt(t[zu])}function mp(t){return Symbol.asyncIterator&&yt(t==null?void 0:t[Symbol.asyncIterator])}function yp(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 bp=Bx();function vp(t){return yt(t==null?void 0:t[bp])}function xp(t){return Mx(this,arguments,function(){var n,r,i,o;return rp(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,hr(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,hr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,hr(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 _p(t){return yt(t==null?void 0:t.getReader)}function he(t){if(t instanceof ht)return t;if(t!=null){if(gp(t))return Yx(t);if(Bu(t))return Hx(t);if(dp(t))return Wx(t);if(mp(t))return wp(t);if(vp(t))return qx(t);if(_p(t))return jx(t)}throw yp(t)}function Yx(t){return new ht(function(e){var n=t[zu]();if(yt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Hx(t){return new ht(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Wx(t){return new ht(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,cp)})}function qx(t){return new ht(function(e){var n,r;try{for(var i=lr(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 wp(t){return new ht(function(e){Xx(t,e).catch(function(n){return e.error(n)})})}function jx(t){return wp(xp(t))}function Xx(t,e){var n,r,i,o;return Ax(this,void 0,void 0,function(){var a,s;return rp(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=Px(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 $p(t,e){return e===void 0&&(e=0),fe(function(n,r){n.subscribe(ae(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 Sp(t,e){return e===void 0&&(e=0),fe(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Vx(t,e){return he(t).pipe(Sp(e),$p(e))}function Zx(t,e){return he(t).pipe(Sp(e),$p(e))}function Kx(t,e){return new ht(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 ht(function(n){var r;return cn(n,e,function(){r=t[bp](),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 yt(r==null?void 0:r.return)&&r.return()}})}function Ap(t,e){if(!t)throw new Error("Iterable cannot be null");return new ht(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 Ap(xp(t),e)}function t_(t,e){if(t!=null){if(gp(t))return Vx(t,e);if(Bu(t))return Kx(t,e);if(dp(t))return Zx(t,e);if(mp(t))return Ap(t,e);if(vp(t))return Qx(t,e);if(_p(t))return Jx(t,e)}throw yp(t)}function zo(t,e){return e?t_(t,e):he(t)}function Yu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Uu(t);return zo(t,n)}var Mp=ku(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function U(t,e){return fe(function(n,r){var i=0;n.subscribe(ae(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,ci([],fr(e))):t(e)}function Pp(t){return U(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 B(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Uu(t),r=Ox(t),i=s_(t),o=i.args,a=i.keys;if(o.length===0)return zo([],n);var s=new ht(l_(o,n,a?function(u){return c_(a,u)}:pr));return r?s.pipe(Pp(r)):s}function l_(t,e,n){return n===void 0&&(n=pr),function(r){Dp(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(l){Dp(e,function(){var h=zo(t[l],e),f=!1;h.subscribe(ae(r,function(p){o[l]=p,f||(f=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},c=0;c<i;c++)u(c)},r)}}function Dp(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()},p=function(g){return c<r?d(g):u.push(g)},d=function(g){c++;var m=!1;he(n(g,l++)).subscribe(ae(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var x=u.shift();a||d(x)};u.length&&c<r;)y();f()}catch(x){e.error(x)}}))};return t.subscribe(ae(e,p,function(){h=!0,f()})),function(){}}function Hu(t,e,n){return n===void 0&&(n=1/0),yt(e)?Hu(function(r,i){return U(function(o,a){return e(r,o,i,a)})(he(t(r,i)))},n):(typeof e=="number"&&(n=e),fe(function(r,i){return f_(r,i,t,n)}))}function h_(t){return t===void 0&&(t=1/0),Hu(pr,t)}function p_(t){return new ht(function(e){he(t()).subscribe(e)})}var d_=["addListener","removeListener"],g_=["addEventListener","removeEventListener"],m_=["on","off"];function Wu(t,e,n,r){if(yt(n)&&(r=n,n=void 0),r)return Wu(t,e,n).pipe(Pp(r));var i=fr(v_(t)?g_.map(function(s){return function(u){return t[s](e,u,n)}}):y_(t)?d_.map(Tp(t,e)):b_(t)?m_.map(Tp(t,e)):[],2),o=i[0],a=i[1];if(!o&&Bu(t))return Hu(function(s){return Wu(s,e,n)})(he(t));if(!o)throw new TypeError("Invalid event target");return new ht(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 Tp(t,e){return function(n){return function(r){return t[n](e,r)}}}function y_(t){return yt(t.addListener)&&yt(t.removeListener)}function b_(t){return yt(t.on)&&yt(t.off)}function v_(t){return yt(t.addEventListener)&&yt(t.removeEventListener)}function Lp(t,e,n){return p_(function(){return t()?e:n})}function qu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Uu(t),r=Ux(t,1/0),i=t;return i.length?i.length===1?he(i[0]):h_(r)(zo(i,n)):pp}function fi(t,e){return fe(function(n,r){var i=0;n.subscribe(ae(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function x_(t){return fe(function(e,n){var r=!1;e.subscribe(ae(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function __(t){return t<=0?function(){return pp}:fe(function(e,n){var r=0;e.subscribe(ae(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function it(t,e){return e===void 0&&(e=pr),t=t??w_,fe(function(n,r){var i,o=!0;n.subscribe(ae(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_),fe(function(e,n){var r=!1;e.subscribe(ae(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function S_(){return new Mp}function A_(t,e){var n=arguments.length>=2;return function(r){return r.pipe(pr,__(1),n?x_(e):$_(function(){return new Mp}))}}function M_(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new ot}: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,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,d=g=!1},x=function(){var v=l;y(),v==null||v.unsubscribe()};return fe(function(v,b){p++,!g&&!d&&m();var $=f=f??n();b.add(function(){p--,p===0&&!g&&!d&&(h=ju(x,u))}),$.subscribe(b),!l&&p>0&&(l=new li({next:function(_){return $.next(_)},error:function(_){g=!0,m(),h=ju(y,i,_),$.error(_)},complete:function(){d=!0,m(),h=ju(y,a),$.complete()}}),he(v).subscribe(l))})(c)}}function ju(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 li({next:function(){i.unsubscribe(),t()}});return he(e.apply(void 0,ci([],fr(n)))).subscribe(i)}}function Pt(t,e,n){var r,i=!1;return r=t,M_({connector:function(){return new Gx(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function Y(t,e){return fe(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(ae(r,function(u){i==null||i.unsubscribe();var c=0,l=o++;he(t(u,l)).subscribe(i=ae(r,function(h){return r.next(e?e(u,h,l,c++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function z(t){return fe(function(e,n){he(t).subscribe(ae(n,function(){return n.complete()},Nu)),!n.closed&&e.subscribe(n)})}const dr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Oo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function P_(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Cp(t){let e,n,r;t.length!==2?(e=Oo,n=(s,u)=>Oo(t(s),u),r=(s,u)=>t(s)-u):(e=t===Oo||t===P_?t:D_,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 D_(){return 0}function T_(t){return t===null?NaN:+t}const L_=Cp(Oo),Ep=L_.right;Cp(T_).center;class kp 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(Rp(this,e))}has(e){return super.has(Rp(this,e))}set(e,n){return super.set(C_(this,e),n)}delete(e){return super.delete(E_(this,e))}}function Rp({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function C_({_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 R_=Math.sqrt(50),I_=Math.sqrt(10),N_=Math.sqrt(2);function Uo(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>=R_?10:o>=I_?5:o>=N_?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?Uo(t,e,n*2):[s,u,c]}function F_(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?Uo(e,t,n):Uo(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 Xu(t,e,n){return e=+e,t=+t,n=+n,Uo(t,e,n)[2]}function G_(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Xu(e,t,n):Xu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function z_(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 O_={value:()=>{}};function Ip(){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 Bo(n)}function Bo(t){this._=t}function U_(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}})}Bo.prototype=Ip.prototype={constructor:Bo,on:function(t,e){var n=this._,r=U_(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=B_(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]=Np(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Np(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 Bo(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 B_(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Np(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=O_,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Vu="http://www.w3.org/1999/xhtml";const Fp={svg:"http://www.w3.org/2000/svg",xhtml:Vu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Yo(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Fp.hasOwnProperty(e)?{space:Fp[e],local:t}:t}function Y_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Vu&&e.documentElement.namespaceURI===Vu?e.createElement(t):e.createElementNS(n,t)}}function H_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Gp(t){var e=Yo(t);return(e.local?H_:Y_)(e)}function W_(){}function Zu(t){return t==null?W_:function(){return this.querySelector(t)}}function q_(t){typeof t!="function"&&(t=Zu(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 xe(r,this._parents)}function j_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function X_(){return[]}function zp(t){return t==null?X_:function(){return this.querySelectorAll(t)}}function V_(t){return function(){return j_(t.apply(this,arguments))}}function Z_(t){typeof t=="function"?t=V_(t):t=zp(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 xe(r,i)}function Op(t){return function(){return this.matches(t)}}function Up(t){return function(e){return e.matches(t)}}var K_=Array.prototype.find;function Q_(t){return function(){return K_.call(this.children,t)}}function J_(){return this.firstElementChild}function tw(t){return this.select(t==null?J_:Q_(typeof t=="function"?t:Up(t)))}var ew=Array.prototype.filter;function nw(){return Array.from(this.children)}function rw(t){return function(){return ew.call(this.children,t)}}function iw(t){return this.selectAll(t==null?nw:rw(typeof t=="function"?t:Up(t)))}function ow(t){typeof t!="function"&&(t=Op(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 xe(r,this._parents)}function Bp(t){return new Array(t.length)}function aw(){return new xe(this._enter||this._groups.map(Bp),this._parents)}function Ho(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ho.prototype={constructor:Ho,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 sw(t){return function(){return t}}function uw(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 Ho(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function cw(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),p;for(s=0;s<l;++s)(u=e[s])&&(f[s]=p=a.call(u,u.__data__,s,e)+"",c.has(p)?i[s]=u:c.set(p,u));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(u=c.get(p))?(r[s]=u,u.__data__=o[s],c.delete(p)):n[s]=new Ho(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function lw(t){return t.__data__}function fw(t,e){if(!arguments.length)return Array.from(this,lw);var n=e?cw:uw,r=this._parents,i=this._groups;typeof t!="function"&&(t=sw(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,p=hw(t.call(l,l&&l.__data__,c,r)),d=p.length,g=s[c]=new Array(d),m=a[c]=new Array(d),y=u[c]=new Array(f);n(l,h,g,m,y,p,e);for(var x=0,v=0,b,$;x<d;++x)if(b=g[x]){for(x>=v&&(v=x+1);!($=m[v])&&++v<d;);b._next=$||null}}return a=new xe(a,r),a._enter=s,a._exit=u,a}function hw(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function pw(){return new xe(this._exit||this._groups.map(Bp),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 gw(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),p,d=0;d<h;++d)(p=c[d]||l[d])&&(f[d]=p);for(;u<i;++u)s[u]=n[u];return new xe(s,this._parents)}function mw(){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 yw(t){t||(t=bw);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 xe(i,this._parents).order()}function bw(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function vw(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function xw(){return Array.from(this)}function _w(){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 ww(){let t=0;for(const e of this)++t;return t}function $w(){return!this.node()}function Sw(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 Aw(t){return function(){this.removeAttribute(t)}}function Mw(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Pw(t,e){return function(){this.setAttribute(t,e)}}function Dw(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Tw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Lw(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 Cw(t,e){var n=Yo(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?Mw:Aw:typeof e=="function"?n.local?Lw:Tw:n.local?Dw:Pw)(n,e))}function Yp(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 Rw(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"?Rw:kw)(t,e,n??"")):gr(this.node(),t)}function gr(t,e){return t.style.getPropertyValue(e)||Yp(t).getComputedStyle(t,null).getPropertyValue(e)}function Nw(t){return function(){delete this[t]}}function Fw(t,e){return function(){this[t]=e}}function Gw(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function zw(t,e){return arguments.length>1?this.each((e==null?Nw:typeof e=="function"?Gw:Fw)(t,e)):this.node()[t]}function Hp(t){return t.trim().split(/^|\s+/)}function Ku(t){return t.classList||new Wp(t)}function Wp(t){this._node=t,this._names=Hp(t.getAttribute("class")||"")}Wp.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 qp(t,e){for(var n=Ku(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function jp(t,e){for(var n=Ku(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Ow(t){return function(){qp(this,t)}}function Uw(t){return function(){jp(this,t)}}function Bw(t,e){return function(){(e.apply(this,arguments)?qp:jp)(this,t)}}function Yw(t,e){var n=Hp(t+"");if(arguments.length<2){for(var r=Ku(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Bw:e?Ow:Uw)(n,e))}function Hw(){this.textContent=""}function Ww(t){return function(){this.textContent=t}}function qw(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function jw(t){return arguments.length?this.each(t==null?Hw:(typeof t=="function"?qw:Ww)(t)):this.node().textContent}function Xw(){this.innerHTML=""}function Vw(t){return function(){this.innerHTML=t}}function Zw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Kw(t){return arguments.length?this.each(t==null?Xw:(typeof t=="function"?Zw:Vw)(t)):this.node().innerHTML}function Qw(){this.nextSibling&&this.parentNode.appendChild(this)}function Jw(){return this.each(Qw)}function t$(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function e$(){return this.each(t$)}function n$(t){var e=typeof t=="function"?t:Gp(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function r$(){return null}function i$(t,e){var n=typeof t=="function"?t:Gp(t),r=e==null?r$:typeof e=="function"?e:Zu(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function o$(){var t=this.parentNode;t&&t.removeChild(this)}function a$(){return this.each(o$)}function s$(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function u$(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function c$(t){return this.select(t?u$:s$)}function l$(t){return arguments.length?this.property("__data__",t):this.node().__data__}function f$(t){return function(e){t.call(this,e,this.__data__)}}function h$(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 p$(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=f$(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 g$(t,e,n){var r=h$(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$:p$,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Xp(t,e,n){var r=Yp(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 m$(t,e){return function(){return Xp(this,t,e)}}function y$(t,e){return function(){return Xp(this,t,e.apply(this,arguments))}}function b$(t,e){return this.each((typeof e=="function"?y$:m$)(t,e))}function*v$(){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 x$=[null];function xe(t,e){this._groups=t,this._parents=e}function hi(){return new xe([[document.documentElement]],x$)}function _$(){return this}xe.prototype=hi.prototype={constructor:xe,select:q_,selectAll:Z_,selectChild:tw,selectChildren:iw,filter:ow,data:fw,enter:aw,exit:pw,join:dw,merge:gw,selection:_$,order:mw,sort:yw,call:vw,nodes:xw,node:_w,size:ww,empty:$w,each:Sw,attr:Cw,style:Iw,property:zw,classed:Yw,text:jw,html:Kw,raise:Jw,lower:e$,append:n$,insert:i$,remove:a$,clone:c$,datum:l$,on:g$,dispatch:b$,[Symbol.iterator]:v$};function Qu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Vp(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function pi(){}var di=.7,Wo=1/di,mr="\\s*([+-]?\\d+)\\s*",gi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ce="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",w$=/^#([0-9a-f]{3,8})$/,$$=new RegExp(`^rgb\\(${mr},${mr},${mr}\\)$`),S$=new RegExp(`^rgb\\(${Ce},${Ce},${Ce}\\)$`),A$=new RegExp(`^rgba\\(${mr},${mr},${mr},${gi}\\)$`),M$=new RegExp(`^rgba\\(${Ce},${Ce},${Ce},${gi}\\)$`),P$=new RegExp(`^hsl\\(${gi},${Ce},${Ce}\\)$`),D$=new RegExp(`^hsla\\(${gi},${Ce},${Ce},${gi}\\)$`),Zp={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};Qu(pi,Pn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Kp,formatHex:Kp,formatHex8:T$,formatHsl:L$,formatRgb:Qp,toString:Qp});function Kp(){return this.rgb().formatHex()}function T$(){return this.rgb().formatHex8()}function L$(){return rd(this).formatHsl()}function Qp(){return this.rgb().formatRgb()}function Pn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=w$.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Jp(e):n===3?new ne(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?qo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?qo(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=$$.exec(t))?new ne(e[1],e[2],e[3],1):(e=S$.exec(t))?new ne(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=A$.exec(t))?qo(e[1],e[2],e[3],e[4]):(e=M$.exec(t))?qo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=P$.exec(t))?nd(e[1],e[2]/100,e[3]/100,1):(e=D$.exec(t))?nd(e[1],e[2]/100,e[3]/100,e[4]):Zp.hasOwnProperty(t)?Jp(Zp[t]):t==="transparent"?new ne(NaN,NaN,NaN,0):null}function Jp(t){return new ne(t>>16&255,t>>8&255,t&255,1)}function qo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ne(t,e,n,r)}function C$(t){return t instanceof pi||(t=Pn(t)),t?(t=t.rgb(),new ne(t.r,t.g,t.b,t.opacity)):new ne}function Ju(t,e,n,r){return arguments.length===1?C$(t):new ne(t,e,n,r??1)}function ne(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Qu(ne,Ju,Vp(pi,{brighter(t){return t=t==null?Wo:Math.pow(Wo,t),new ne(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?di:Math.pow(di,t),new ne(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ne(Dn(this.r),Dn(this.g),Dn(this.b),jo(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:td,formatHex:td,formatHex8:E$,formatRgb:ed,toString:ed}));function td(){return`#${Tn(this.r)}${Tn(this.g)}${Tn(this.b)}`}function E$(){return`#${Tn(this.r)}${Tn(this.g)}${Tn(this.b)}${Tn((isNaN(this.opacity)?1:this.opacity)*255)}`}function ed(){const t=jo(this.opacity);return`${t===1?"rgb(":"rgba("}${Dn(this.r)}, ${Dn(this.g)}, ${Dn(this.b)}${t===1?")":`, ${t})`}`}function jo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Dn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Tn(t){return t=Dn(t),(t<16?"0":"")+t.toString(16)}function nd(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new _e(t,e,n,r)}function rd(t){if(t instanceof _e)return new _e(t.h,t.s,t.l,t.opacity);if(t instanceof pi||(t=Pn(t)),!t)return new _e;if(t instanceof _e)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 _e(a,s,u,t.opacity)}function k$(t,e,n,r){return arguments.length===1?rd(t):new _e(t,e,n,r??1)}function _e(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Qu(_e,k$,Vp(pi,{brighter(t){return t=t==null?Wo:Math.pow(Wo,t),new _e(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?di:Math.pow(di,t),new _e(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 ne(tc(t>=240?t-240:t+120,i,r),tc(t,i,r),tc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new _e(id(this.h),Xo(this.s),Xo(this.l),jo(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=jo(this.opacity);return`${t===1?"hsl(":"hsla("}${id(this.h)}, ${Xo(this.s)*100}%, ${Xo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function id(t){return t=(t||0)%360,t<0?t+360:t}function Xo(t){return Math.max(0,Math.min(1,t||0))}function tc(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 ec=t=>()=>t;function R$(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 N$(t){return(t=+t)==1?od:function(e,n){return n-e?I$(e,n,t):ec(isNaN(e)?n:e)}}function od(t,e){var n=e-t;return n?R$(t,n):ec(isNaN(t)?e:t)}const Vo=function t(e){var n=N$(e);function r(i,o){var a=n((i=Ju(i)).r,(o=Ju(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=od(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 F$(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 G$(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function z$(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]=ic(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 O$(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function we(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function U$(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]=ic(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var nc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rc=new RegExp(nc.source,"g");function B$(t){return function(){return t}}function Y$(t){return function(e){return t(e)+""}}function ad(t,e){var n=nc.lastIndex=rc.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=nc.exec(t))&&(i=rc.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:we(r,i)})),n=rc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?Y$(u[0].x):B$(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 ic(t,e){var n=typeof e,r;return e==null||n==="boolean"?ec(e):(n==="number"?we:n==="string"?(r=Pn(e))?(e=r,Vo):ad:e instanceof Pn?Vo:e instanceof Date?O$:G$(e)?F$:Array.isArray(e)?z$:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?U$:we)(t,e)}function H$(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var sd=180/Math.PI,ud={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function cd(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)*sd,skewX:Math.atan(u)*sd,scaleX:a,scaleY:s}}var Zo;function W$(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ud:cd(e.a,e.b,e.c,e.d,e.e,e.f)}function q$(t){return t==null||(Zo||(Zo=document.createElementNS("http://www.w3.org/2000/svg","g")),Zo.setAttribute("transform",t),!(t=Zo.transform.baseVal.consolidate()))?ud:(t=t.matrix,cd(t.a,t.b,t.c,t.d,t.e,t.f))}function ld(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,p,d){if(c!==h||l!==f){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:we(c,h)},{i:g-2,x:we(l,f)})}else(h||f)&&p.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:we(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:we(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,p,d){if(c!==h||l!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:we(c,h)},{i:g-2,x:we(l,f)})}else(h!==1||f!==1)&&p.push(i(p)+"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(p){for(var d=-1,g=f.length,m;++d<g;)h[(m=f[d]).i]=m.x(p);return h.join("")}}}var j$=ld(W$,"px, ","px)","deg)"),X$=ld(q$,", ",")",")"),yr=0,mi=0,yi=0,fd=1e3,Ko,bi,Qo=0,Ln=0,Jo=0,vi=typeof performance=="object"&&performance.now?performance:Date,hd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function oc(){return Ln||(hd(V$),Ln=vi.now()+Jo)}function V$(){Ln=0}function ta(){this._call=this._time=this._next=null}ta.prototype=pd.prototype={constructor:ta,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?oc():+n)+(e==null?0:+e),!this._next&&bi!==this&&(bi?bi._next=this:Ko=this,bi=this),this._call=t,this._time=n,ac()},stop:function(){this._call&&(this._call=null,this._time=1/0,ac())}};function pd(t,e,n){var r=new ta;return r.restart(t,e,n),r}function Z$(){oc(),++yr;for(var t=Ko,e;t;)(e=Ln-t._time)>=0&&t._call.call(void 0,e),t=t._next;--yr}function dd(){Ln=(Qo=vi.now())+Jo,yr=mi=0;try{Z$()}finally{yr=0,Q$(),Ln=0}}function K$(){var t=vi.now(),e=t-Qo;e>fd&&(Jo-=e,Qo=t)}function Q$(){for(var t,e=Ko,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:Ko=n);bi=t,ac(r)}function ac(t){if(!yr){mi&&(mi=clearTimeout(mi));var e=t-Ln;e>24?(t<1/0&&(mi=setTimeout(dd,t-vi.now()-Jo)),yi&&(yi=clearInterval(yi))):(yi||(Qo=vi.now(),yi=setInterval(K$,fd)),yr=1,hd(dd))}}function gd(t,e,n){var r=new ta;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var J$=Ip("start","end","cancel","interrupt"),tS=[],md=0,yd=1,sc=2,ea=3,bd=4,uc=5,na=6;function ra(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;eS(t,n,{name:e,index:r,group:i,on:J$,tween:tS,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:md})}function cc(t,e){var n=$e(t,e);if(n.state>md)throw new Error("too late; already scheduled");return n}function Ee(t,e){var n=$e(t,e);if(n.state>ea)throw new Error("too late; already running");return n}function $e(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function eS(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=pd(o,0,n.time);function o(c){n.state=yd,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,p;if(n.state!==yd)return u();for(l in r)if(p=r[l],p.name===n.name){if(p.state===ea)return gd(a);p.state===bd?(p.state=na,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[l]):+l<e&&(p.state=na,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[l])}if(gd(function(){n.state===ea&&(n.state=bd,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=sc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===sc){for(n.state=ea,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(p=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);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=uc,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===uc&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=na,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function nS(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>sc&&r.state<uc,r.state=na,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function rS(t){return this.each(function(){nS(this,t)})}function iS(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 oS(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 aS(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=$e(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?iS:oS)(n,t,e))}function lc(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 $e(i,r).value[e]}}function vd(t,e){var n;return(typeof e=="number"?we:e instanceof Pn?Vo:(n=Pn(e))?(e=n,Vo):ad)(t,e)}function sS(t){return function(){this.removeAttribute(t)}}function uS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function cS(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 lS(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 fS(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 hS(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 pS(t,e){var n=Yo(t),r=n==="transform"?X$:vd;return this.attrTween(t,typeof e=="function"?(n.local?hS:fS)(n,r,lc(this,"attr."+t,e)):e==null?(n.local?uS:sS)(n):(n.local?lS:cS)(n,r,e))}function dS(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function gS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function mS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&gS(t,o)),n}return i._value=e,i}function yS(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 bS(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=Yo(t);return this.tween(n,(r.local?mS:yS)(r,e))}function vS(t,e){return function(){cc(this,t).delay=+e.apply(this,arguments)}}function xS(t,e){return e=+e,function(){cc(this,t).delay=e}}function _S(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?vS:xS)(e,t)):$e(this.node(),e).delay}function wS(t,e){return function(){Ee(this,t).duration=+e.apply(this,arguments)}}function $S(t,e){return e=+e,function(){Ee(this,t).duration=e}}function SS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?wS:$S)(e,t)):$e(this.node(),e).duration}function AS(t,e){if(typeof e!="function")throw new Error;return function(){Ee(this,t).ease=e}}function MS(t){var e=this._id;return arguments.length?this.each(AS(e,t)):$e(this.node(),e).ease}function PS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ee(this,t).ease=n}}function DS(t){if(typeof t!="function")throw new Error;return this.each(PS(this._id,t))}function TS(t){typeof t!="function"&&(t=Op(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 LS(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,p=0;p<l;++p)(f=u[p]||c[p])&&(h[p]=f);for(;s<r;++s)a[s]=e[s];return new We(a,this._parents,this._name,this._id)}function CS(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=CS(e)?cc:Ee;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?$e(this.node(),n).on.on(t):this.each(ES(n,t,e))}function RS(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",RS(this._id))}function NS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Zu(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,ra(c[f],e,n,f,c,$e(l,n)));return new We(o,this._parents,e,n)}function FS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=zp(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),p,d=$e(l,n),g=0,m=f.length;g<m;++g)(p=f[g])&&ra(p,e,n,g,f,d);o.push(f),a.push(l)}return new We(o,a,e,n)}var GS=hi.prototype.constructor;function zS(){return new GS(this._groups,this._parents)}function OS(t,e){var n,r,i;return function(){var o=gr(this,t),a=(this.style.removeProperty(t),gr(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function xd(t){return function(){this.style.removeProperty(t)}}function US(t,e,n){var r,i=n+"",o;return function(){var a=gr(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function BS(t,e,n){var r,i,o;return function(){var a=gr(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),gr(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function YS(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=xd(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function HS(t,e,n){var r=(t+="")=="transform"?j$:vd;return e==null?this.styleTween(t,OS(t,r)).on("end.style."+t,xd(t)):typeof e=="function"?this.styleTween(t,BS(t,r,lc(this,"style."+t,e))).each(YS(this._id,t)):this.styleTween(t,US(t,r,e),n).on("end.style."+t,null)}function WS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function qS(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&WS(t,a,n)),r}return o._value=e,o}function jS(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,qS(t,e,n??""))}function XS(t){return function(){this.textContent=t}}function VS(t){return function(){var e=t(this);this.textContent=e??""}}function ZS(t){return this.tween("text",typeof t=="function"?VS(lc(this,"text",t)):XS(t==null?"":t+""))}function KS(t){return function(e){this.textContent=t.call(this,e)}}function QS(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&KS(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,QS(t))}function t3(){for(var t=this._name,e=this._id,n=_d(),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=$e(u,e);ra(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 e3(){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 n3=0;function We(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function _d(){return++n3}var qe=hi.prototype;We.prototype={constructor:We,select:NS,selectAll:FS,selectChild:qe.selectChild,selectChildren:qe.selectChildren,filter:TS,merge:LS,selection:zS,transition:t3,call:qe.call,nodes:qe.nodes,node:qe.node,size:qe.size,empty:qe.empty,each:qe.each,on:kS,attr:pS,attrTween:bS,style:HS,styleTween:jS,text:ZS,textTween:JS,remove:IS,tween:aS,delay:_S,duration:SS,ease:MS,easeVarying:DS,end:e3,[Symbol.iterator]:qe[Symbol.iterator]};function r3(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var i3={time:null,delay:0,duration:250,ease:r3};function o3(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 a3(t){var e,n;t instanceof We?(e=t._id,t=t._name):(e=_d(),(n=i3).time=oc(),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])&&ra(u,t,e,c,a,n||o3(u,e));return new We(r,this._parents,t,e)}hi.prototype.interrupt=rS,hi.prototype.transition=a3;function s3(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ia(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 br(t){return t=ia(Math.abs(t)),t?t[1]:NaN}function u3(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 c3(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var l3=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function oa(t){if(!(e=l3.exec(t)))throw new Error("invalid format: "+t);var e;return new fc({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]})}oa.prototype=fc.prototype;function fc(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+""}fc.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 f3(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 wd;function h3(t,e){var n=ia(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(wd=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")+ia(t,Math.max(0,e+o-1))[0]}function $d(t,e){var n=ia(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 Sd={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:s3,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)=>$d(t*100,e),r:$d,s:h3,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ad(t){return t}var Md=Array.prototype.map,Pd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function p3(t){var e=t.grouping===void 0||t.thousands===void 0?Ad:u3(Md.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?Ad:c3(Md.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=oa(h);var f=h.fill,p=h.align,d=h.sign,g=h.symbol,m=h.zero,y=h.width,x=h.comma,v=h.precision,b=h.trim,$=h.type;$==="n"?(x=!0,$="g"):Sd[$]||(v===void 0&&(v=12),b=!0,$="g"),(m||f==="0"&&p==="=")&&(m=!0,f="0",p="=");var _=g==="$"?n:g==="#"&&/[boxX]/.test($)?"0"+$.toLowerCase():"",P=g==="$"?r:/[%p]/.test($)?a:"",T=Sd[$],w=/[defgprs%]/.test($);v=v===void 0?6:/[gprs]/.test($)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function D(S){var G=_,k=P,A,L,M;if($==="c")k=T(S)+k,S="";else{S=+S;var F=S<0||1/S<0;if(S=isNaN(S)?u:T(Math.abs(S),v),b&&(S=f3(S)),F&&+S==0&&d!=="+"&&(F=!1),G=(F?d==="("?d:s:d==="-"||d==="("?"":d)+G,k=($==="s"?Pd[8+wd/3]:"")+k+(F&&d==="("?")":""),w){for(A=-1,L=S.length;++A<L;)if(M=S.charCodeAt(A),48>M||M>57){k=(M===46?i+S.slice(A+1):S.slice(A))+k,S=S.slice(0,A);break}}}x&&!m&&(S=e(S,1/0));var O=G.length+S.length+k.length,E=O<y?new Array(y-O+1).join(f):"";switch(x&&m&&(S=e(E+S,E.length?y-k.length:1/0),E=""),p){case"<":S=G+S+k+E;break;case"=":S=G+E+S+k;break;case"^":S=E.slice(0,O=E.length>>1)+G+S+k+E.slice(O);break;default:S=E+G+S+k;break}return o(S)}return D.toString=function(){return h+""},D}function l(h,f){var p=c((h=oa(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(br(f)/3)))*3,g=Math.pow(10,-d),m=Pd[8+d/3];return function(y){return p(g*y)+m}}return{format:c,formatPrefix:l}}var aa,Dd,Td;d3({thousands:",",grouping:[3],currency:["$",""]});function d3(t){return aa=p3(t),Dd=aa.format,Td=aa.formatPrefix,aa}function g3(t){return Math.max(0,-br(Math.abs(t)))}function m3(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(br(e)/3)))*3-br(Math.abs(t)))}function y3(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,br(e)-br(t))+1}function sa(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const Ld=Symbol("implicit");function Cd(){var t=new kp,e=[],n=[],r=Ld;function i(o){let a=t.get(o);if(a===void 0){if(r!==Ld)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 kp;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 Cd(e,n).unknown(r)},sa.apply(i,arguments),i}function Ed(){var t=Cd().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,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),d+=(g-d-o*(f-u))*l,a=o*(1-u),s&&(d=Math.round(d),a=Math.round(a));var m=z_(f).map(function(y){return d+o*y});return n(p?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 Ed(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},sa.apply(h(),arguments)}function kd(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return kd(e())},t}function b3(){return kd(Ed.apply(null,arguments).paddingInner(1))}function v3(t){return function(){return t}}function x3(t){return+t}var Rd=[0,1];function vr(t){return t}function hc(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:v3(isNaN(e)?NaN:.5)}function _3(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function w3(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=hc(i,r),o=n(a,o)):(r=hc(r,i),o=n(o,a)),function(s){return o(r(s))}}function $3(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]=hc(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=Ep(t,s,1,r)-1;return o[u](i[u](s))}}function S3(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function A3(){var t=Rd,e=Rd,n=ic,r,i,o,a=vr,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==vr&&(a=_3(t[0],t[f-1])),s=f>2?$3:w3,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),we)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,x3),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=H$,l()},h.clamp=function(f){return arguments.length?(a=f?!0:vr,l()):a!==vr},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,p){return r=f,i=p,l()}}function M3(){return A3()(vr,vr)}function P3(t,e,n,r){var i=G_(t,e,n),o;switch(r=oa(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=m3(i,a))&&(r.precision=o),Td(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=y3(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=g3(i))&&(r.precision=o-(r.type==="%")*2);break}}return Dd(r)}function Id(t){var e=t.domain;return t.ticks=function(n){var r=e();return F_(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return P3(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=Xu(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 Nd(){var t=M3();return t.copy=function(){return S3(t,Nd())},sa.apply(t,arguments),Id(t)}function Fd(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[Ep(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 Fd().domain([t,e]).range(i).unknown(o)},sa.apply(Id(a),arguments)}function xi(t,e,n){this.k=t,this.x=e,this.y=n}xi.prototype={constructor:xi,scale:function(t){return t===1?this:new xi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new xi(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+")"}},xi.prototype;function ua(t){return Object.prototype.toString.call(t)==="[object Object]"}function pc(t,e){if(ua(t)===!1||ua(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;ua(r[a])&&ua(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var dc=function(t,e){return dc=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])},dc(t,e)};function je(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");dc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function D3(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 Gd(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.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 xr(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 _i(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 wi(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 _r(t){return this instanceof _r?(this.v=t,this):new _r(t)}function T3(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,h)}}function s(p,d){r[p]&&(i[p]=function(g){return new Promise(function(m,y){o.push([p,g,m,y])>1||u(p,g)})},d&&(i[p]=d(i[p])))}function u(p,d){try{c(r[p](d))}catch(g){f(o[0][3],g)}}function c(p){p.value instanceof _r?Promise.resolve(p.value.v).then(l,h):f(o[0][2],p)}function l(p){u("next",p)}function h(p){u("throw",p)}function f(p,d){p(d),o.shift(),o.length&&u(o[0][0],o[0][1])}}function L3(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 xr=="function"?xr(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 Tt(t){return typeof t=="function"}function gc(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 mc=gc(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 Ai=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 gc?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{Fp(p)}catch(g){o=o??[],g instanceof gc?o=Si(Si([],$i(o)),$i(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 gc(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Fp(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}(),Rp=Ai.EMPTY;function Np(t){return t instanceof Ai||t&&"closed"in t&&Pt(t.remove)&&Pt(t.add)&&Pt(t.unsubscribe)}function Fp(t){Pt(t)?t():t.unsubscribe()}var Gp={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,Si([t,e],$i(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function zp(t){L3.setTimeout(function(){throw t})}function mc(){}function ha(t){t()}var yc=function(t){je(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Np(n)&&n.add(r)):r.destination=I3,r}return e.create=function(n,r,i){return new Mi(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}(Ai),E3=Function.prototype.bind;function bc(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}(),Mi=function(t){je(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&&Gp.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&bc(n.next,s),error:n.error&&bc(n.error,s),complete:n.complete&&bc(n.complete,s)}):a=n}return o.destination=new k3(a),o}return e}(yc);function da(t){zp(t)}function C3(t){throw t}var I3={closed:!0,next:mc,error:C3,complete:mc},vc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function xc(t){return t}function R3(t){return t.length===0?xc: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 Mi(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=Op(n),new n(function(i,o){var a=new Mi({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[vc]=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=Op(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 Op(t){var e;return(e=t??Gp.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 yc||N3(t)&&Np(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 $r(t,e,n,r,i){return new z3(t,e,n,r,i)}var z3=function(t){je(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}(yc),O3=pc(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ti=function(t){je(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 Up(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?Rp:(this.currentObservers=null,s.push(n),new Ai(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 Up(n,r)},e}($e),Up=function(t){je(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:Rp},e}(Ti),_c={now:function(){return(_c.delegate||Date).now()},delegate:void 0},U3=function(t){je(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=_c);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){je(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(Ai),Bp={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Si([t,e],$i(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},Y3=function(t){je(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),Bp.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&&Bp.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),Yp=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=_c.now,t}(),H3=function(t){je(e,t);function e(n,r){r===void 0&&(r=Yp.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}(Yp);new H3(Y3);function W3(t){return t&&Pt(t.schedule)}function q3(t){return t[t.length-1]}function Hp(t){return W3(q3(t))?t.pop():void 0}var Wp=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function qp(t){return Pt(t==null?void 0:t.then)}function jp(t){return Pt(t[vc])}function Xp(t){return Symbol.asyncIterator&&Pt(t==null?void 0:t[Symbol.asyncIterator])}function Vp(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 j3(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Zp=j3();function Kp(t){return Pt(t==null?void 0:t[Zp])}function Qp(t){return P3(this,arguments,function(){var e,n,r,i;return Ip(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 Jp(t){return Pt(t==null?void 0:t.getReader)}function fn(t){if(t instanceof $e)return t;if(t!=null){if(jp(t))return X3(t);if(Wp(t))return V3(t);if(qp(t))return Z3(t);if(Xp(t))return tg(t);if(Kp(t))return K3(t);if(Jp(t))return Q3(t)}throw Vp(t)}function X3(t){return new $e(function(e){var n=t[vc]();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,zp)})}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 tg(t){return new $e(function(e){J3(t,e).catch(function(n){return e.error(n)})})}function Q3(t){return tg(Qp(t))}function J3(t,e){var n,r,i,o;return T3(this,void 0,void 0,function(){var a,s;return Ip(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 eg(t,e){return e===void 0&&(e=0),ln(function(n,r){n.subscribe($r(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 ng(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 fn(t).pipe(ng(e),eg(e))}function eA(t,e){return fn(t).pipe(ng(e),eg(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[Zp](),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 rg(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 rg(Qp(t),e)}function oA(t,e){if(t!=null){if(jp(t))return tA(t,e);if(Wp(t))return nA(t,e);if(qp(t))return eA(t,e);if(Xp(t))return rg(t,e);if(Kp(t))return rA(t,e);if(Jp(t))return iA(t,e)}throw Vp(t)}function aA(t,e){return e?oA(t,e):fn(t)}pc(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function pa(t,e){return ln(function(n,r){var i=0;n.subscribe($r(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;fn(n(g,l++)).subscribe($r(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var x=u.shift();a||p(x)};u.length&&c<r;)y();f()}catch(x){e.error(x)}}))};return t.subscribe($r(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 pa(function(o,a){return e(r,o,i,a)})(fn(t(r,i)))},n):(typeof e=="number"&&(n=e),ln(function(r,i){return sA(r,i,t,n)}))}function uA(t){return ig(xc,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,Hp(t)))}function lA(t,e){return e===void 0&&(e=xc),t=t??fA,ln(function(n,r){var i,o=!0;n.subscribe($r(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function fA(t,e){return t===e}function hA(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},x=function(){var v=l;y(),v==null||v.unsubscribe()};return ln(function(v,b){d++,!g&&!p&&m();var _=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=wc(x,u))}),_.subscribe(b),!l&&d>0&&(l=new Mi({next:function(w){return _.next(w)},error:function(w){g=!0,m(),h=wc(y,i,w),_.error(w)},complete:function(){p=!0,m(),h=wc(y,a),_.complete()}}),fn(v).subscribe(l))})(c)}}function wc(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 Mi({next:function(){i.unsubscribe(),t()}});return fn(e.apply(void 0,Si([],$i(n)))).subscribe(i)}}function dA(t,e,n){var r,i=!1;return r=t,hA({connector:function(){return new U3(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function pA(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Hp(t);return ln(function(r,i){(n?og(t,r,n):og(t,r)).subscribe(i)})}function gA(t){return ln(function(e,n){fn(t).subscribe($r(n,function(){return n.complete()},mc)),!n.closed&&e.subscribe(n)})}const mA=t=>t.pipe(pa(e=>e.styles.textSize),lA(),pa(e=>{let n=NaN;if(typeof e=="string")if(e.includes("rem")){const r=parseFloat(getComputedStyle(document.documentElement).fontSize);n=parseFloat(e)*r}else e.includes("px")&&(n=parseFloat(e));else if(typeof e=="number")return e;return n||14})),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 kp().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)},yA=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),Cp().domain([-0,e+0]).range(i)};function bA({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=hc(c,e)},setContext:c=>{s=c,s.observer.fullParams$=i.pipe(gA(r),pA({}),pa(l=>hc(l,u)),dA(1))}}}const Pi=()=>function(t,e){return function(n){return class{constructor(){const r=bA({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 ga(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:vA,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 vA(){return 0}function ma(t){return t===null?NaN:+t}function*xA(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=ga(_t),hg=fg.right,_A=fg.left,wA=ga(ma).center,kn=hg;function $A(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),SA=pg(AA);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?(Sr(s,c,i,o,a),Sr(s,i,c,o,a),Sr(s,c,i,o,a),Ar(u,i,c,o,a),Ar(u,c,i,o,a),Ar(u,i,c,o,a)):s?(Sr(s,i,c,o,a),Sr(s,c,i,o,a),Sr(s,i,c,o,a)):u&&(Ar(u,i,c,o,a),Ar(u,c,i,o,a),Ar(u,i,c,o,a)),e}}function Sr(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function Ar(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function AA(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 MA(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 MA(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 ya(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 TA(t){return t.length|0}function PA(t){return!(t>0)}function DA(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function LA(t){return e=>t(...e)}function EA(...t){const e=typeof t[t.length-1]=="function"&&LA(t.pop());t=t.map(DA);const n=t.map(TA),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(PA))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 kA(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 CA(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 IA(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(Sc(this,e))}has(e){return super.has(Sc(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(Sc(this,e))}add(e){return super.add(yg(this,e))}delete(e){return super.delete(bg(this,e))}}function Sc({_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 Mr(t){return t}function xg(t,...e){return Tr(t,Mr,Mr,e)}function _g(t,...e){return Tr(t,Array.from,Mr,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 RA(t,...e){return wg(_g(t,...e),e)}function NA(t,e,...n){return wg(Sg(t,e,...n),n)}function $g(t,e,...n){return Tr(t,Mr,e,n)}function Sg(t,e,...n){return Tr(t,Array.from,e,n)}function FA(t,...e){return Tr(t,Mr,Ag,e)}function GA(t,...e){return Tr(t,Array.from,Ag,e)}function Ag(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function Tr(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 Ac(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=Pr(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>Pr(n[i],n[o]))),Mg(t,r)}return t.sort(Mc(n))}function Mc(t=_t){if(t===_t)return Pr;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 Pr(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function zA(t,e,n){return(e.length!==2?Ac($g(t,e,n),([r,i],[o,a])=>_t(i,a)||_t(r,o)):Ac(xg(t,n),([r,i],[o,a])=>e(i,a)||_t(r,o))).map(([r])=>r)}var OA=Array.prototype,UA=OA.slice;function Tc(t){return()=>t}const BA=Math.sqrt(50),YA=Math.sqrt(10),HA=Math.sqrt(2);function ba(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>=BA?10:o>=YA?5:o>=HA?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?ba(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?ba(e,t,n):ba(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,ba(t,e,n)[2]}function va(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 Pc(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 Dc(t){return Math.max(1,Math.ceil(Math.log(ya(t))/Math.LN2)+1)}function Tg(){var t=Mr,e=Li,n=Dc;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 v=f,b=+d;if(e===Li&&([h,f]=Pc(h,f,b)),d=In(h,f,b),d[0]<=h&&(u=Rn(h,f,b)),d[d.length-1]>=f)if(v>=f&&e===Li){const _=Rn(h,f,b);isFinite(_)&&(_>0?f=(Math.floor(f/_)+1)*_:_<0&&(f=(Math.ceil(f*-_)+1)/-_))}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),x;for(o=0;o<=p;++o)x=y[o]=[],x.x0=o>0?d[o-1]:h,x.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 v=Math.floor((h-s)*u);y[Math.min(p,v+(d[v]<=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:Tc(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Tc([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Tc(Array.isArray(i)?UA.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 Lc(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){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 Ec(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 _a(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?Pr:Mc(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));_a(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(xA(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return xa(t);if(e>=1)return ki(t);var r,i=(r-1)*e,o=Math.floor(i),a=ki(_a(t,o).subarray(0,o+1)),s=xa(t.subarray(o+1));return a+(s-a)*(i-o)}}function Dg(t,e,n=ma){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=ma){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>ma(n(t[u],u,t))),e<=0)return Ec(r);if(e>=1)return Lc(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return _a(i,a,0,o,(s,u)=>Pr(r[s],r[u])),a=Pg(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function WA(t,e,n){const r=ya(t),i=Ii(t,.75)-Ii(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function qA(t,e,n){const r=ya(t),i=mg(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function jA(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 XA(t,e){return Ii(t,.5,e)}function VA(t,e){return Lg(t,.5,e)}function*ZA(t){for(const e of t)yield*e}function kc(t){return Array.from(ZA(t))}function KA(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 QA(t,e=JA){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function JA(t,e){return[t,e]}function hn(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 t5(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)=>Pr(n[s],n[u]):Mc(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 e5(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 Ec(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 n5(t,e=_t){if(e.length===1)return Lc(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 r5(t,e){const n=Eg(t,e);return n<0?void 0:n}const i5=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 o5(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=xa(t,a5),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 a5(t){return t.length}function s5(){return Cg(arguments)}function u5(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 c5(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 l5(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 f5(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 h5(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 d5(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function p5(t,...e){t=new Cn(t);for(const n of e)for(const r of n)t.delete(r);return t}function g5(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 m5(t,...e){t=new Cn(t),e=e.map(y5);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function y5(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 b5(t,e){return Ig(e,t)}function v5(...t){const e=new Cn;for(const n of t)for(const r of n)e.add(r);return e}function x5(t){return t}var wa=1,$a=2,Cc=3,Ri=4,Ng=1e-6;function _5(t){return"translate("+t+",0)"}function w5(t){return"translate(0,"+t+")"}function $5(t){return e=>+t(e)}function S5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function A5(){return!this.__axis}function Sa(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===wa||t===Ri?-1:1,l=t===Ri||t===$a?"x":"y",h=t===wa||t===Cc?_5:w5;function f(d){var p=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):x5),m=Math.max(o,0)+s,y=e.range(),x=+y[0]+u,v=+y[y.length-1]+u,b=(e.bandwidth?S5:$5)(e.copy(),u),_=d.selection?d.selection():d,w=_.selectAll(".domain").data([null]),S=_.selectAll(".tick").data(p,e).order(),k=S.exit(),$=S.enter().append("g").attr("class","tick"),E=S.select("line"),A=S.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge($),E=E.merge($.append("line").attr("stroke","currentColor").attr(l+"2",c*o)),A=A.merge($.append("text").attr("fill","currentColor").attr(l,c*m).attr("dy",t===wa?"0em":t===Cc?"0.71em":"0.32em")),d!==_&&(w=w.transition(d),S=S.transition(d),E=E.transition(d),A=A.transition(d),k=k.transition(d).attr("opacity",Ng).attr("transform",function(I){return isFinite(I=b(I))?h(I+u):this.getAttribute("transform")}),$.attr("opacity",Ng).attr("transform",function(I){var D=this.parentNode.__axis;return h((D&&isFinite(D=D(I))?D:b(I))+u)})),k.remove(),w.attr("d",t===Ri||t===$a?a?"M"+c*a+","+x+"H"+u+"V"+v+"H"+c*a:"M"+u+","+x+"V"+v:a?"M"+x+","+c*a+"V"+u+"H"+v+"V"+c*a:"M"+x+","+u+"H"+v),S.attr("opacity",1).attr("transform",function(I){return h(b(I)+u)}),E.attr(l+"2",c*o),A.attr(l,c*m).text(g),_.filter(A5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===$a?"start":t===Ri?"end":"middle"),_.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 Sa(wa,t)}function M5(t){return Sa($a,t)}function T5(t){return Sa(Cc,t)}function Gg(t){return Sa(Ri,t)}var P5={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 Aa(n)}function Aa(t){this._=t}function D5(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}})}Aa.prototype=Nn.prototype={constructor:Aa,on:function(t,e){var n=this._,r=D5(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=L5(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 Aa(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 L5(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]=P5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Ic="http://www.w3.org/1999/xhtml";const Rc={svg:"http://www.w3.org/2000/svg",xhtml:Ic,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)),Rc.hasOwnProperty(e)?{space:Rc[e],local:t}:t}function E5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ic&&e.documentElement.namespaceURI===Ic?e.createElement(t):e.createElementNS(n,t)}}function k5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ma(t){var e=Ni(t);return(e.local?k5:E5)(e)}function C5(){}function Ta(t){return t==null?C5:function(){return this.querySelector(t)}}function I5(t){typeof t!="function"&&(t=Ta(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 R5(){return[]}function Nc(t){return t==null?R5:function(){return this.querySelectorAll(t)}}function N5(t){return function(){return Og(t.apply(this,arguments))}}function F5(t){typeof t=="function"?t=N5(t):t=Nc(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 Fc(t){return function(){return this.matches(t)}}function Ug(t){return function(e){return e.matches(t)}}var G5=Array.prototype.find;function z5(t){return function(){return G5.call(this.children,t)}}function O5(){return this.firstElementChild}function U5(t){return this.select(t==null?O5:z5(typeof t=="function"?t:Ug(t)))}var B5=Array.prototype.filter;function Y5(){return Array.from(this.children)}function H5(t){return function(){return B5.call(this.children,t)}}function W5(t){return this.selectAll(t==null?Y5:H5(typeof t=="function"?t:Ug(t)))}function q5(t){typeof t!="function"&&(t=Fc(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 j5(){return new Yt(this._enter||this._groups.map(Bg),this._parents)}function Pa(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Pa.prototype={constructor:Pa,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 X5(t){return function(){return t}}function V5(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 Pa(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function Z5(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 Pa(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function K5(t){return t.__data__}function Q5(t,e){if(!arguments.length)return Array.from(this,K5);var n=e?Z5:V5,r=this._parents,i=this._groups;typeof t!="function"&&(t=X5(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=J5(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 x=0,v=0,b,_;x<p;++x)if(b=g[x]){for(x>=v&&(v=x+1);!(_=m[v])&&++v<p;);b._next=_||null}}return a=new Yt(a,r),a._enter=s,a._exit=u,a}function J5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function t6(){return new Yt(this._exit||this._groups.map(Bg),this._parents)}function e6(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 n6(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 r6(){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 i6(t){t||(t=o6);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 o6(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function a6(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function s6(){return Array.from(this)}function u6(){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 c6(){let t=0;for(const e of this)++t;return t}function l6(){return!this.node()}function f6(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 h6(t){return function(){this.removeAttribute(t)}}function d6(t){return function(){this.removeAttributeNS(t.space,t.local)}}function p6(t,e){return function(){this.setAttribute(t,e)}}function g6(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function m6(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function y6(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 b6(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?d6:h6:typeof e=="function"?n.local?y6:m6:n.local?g6:p6)(n,e))}function Gc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function v6(t){return function(){this.style.removeProperty(t)}}function x6(t,e,n){return function(){this.style.setProperty(t,e,n)}}function _6(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function w6(t,e,n){return arguments.length>1?this.each((e==null?v6:typeof e=="function"?_6:x6)(t,e,n??"")):Fn(this.node(),t)}function Fn(t,e){return t.style.getPropertyValue(e)||Gc(t).getComputedStyle(t,null).getPropertyValue(e)}function $6(t){return function(){delete this[t]}}function S6(t,e){return function(){this[t]=e}}function A6(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function M6(t,e){return arguments.length>1?this.each((e==null?$6:typeof e=="function"?A6:S6)(t,e)):this.node()[t]}function Yg(t){return t.trim().split(/^|\s+/)}function zc(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=zc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function qg(t,e){for(var n=zc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function T6(t){return function(){Wg(this,t)}}function P6(t){return function(){qg(this,t)}}function D6(t,e){return function(){(e.apply(this,arguments)?Wg:qg)(this,t)}}function L6(t,e){var n=Yg(t+"");if(arguments.length<2){for(var r=zc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?D6:e?T6:P6)(n,e))}function E6(){this.textContent=""}function k6(t){return function(){this.textContent=t}}function C6(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function I6(t){return arguments.length?this.each(t==null?E6:(typeof t=="function"?C6:k6)(t)):this.node().textContent}function R6(){this.innerHTML=""}function N6(t){return function(){this.innerHTML=t}}function F6(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function G6(t){return arguments.length?this.each(t==null?R6:(typeof t=="function"?F6:N6)(t)):this.node().innerHTML}function z6(){this.nextSibling&&this.parentNode.appendChild(this)}function O6(){return this.each(z6)}function U6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function B6(){return this.each(U6)}function Y6(t){var e=typeof t=="function"?t:Ma(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function H6(){return null}function W6(t,e){var n=typeof t=="function"?t:Ma(t),r=e==null?H6:typeof e=="function"?e:Ta(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function q6(){var t=this.parentNode;t&&t.removeChild(this)}function j6(){return this.each(q6)}function X6(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function V6(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Z6(t){return this.select(t?V6:X6)}function K6(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Q6(t){return function(e){t.call(this,e,this.__data__)}}function J6(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 t8(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 e8(t,e,n){return function(){var r=this.__on,i,o=Q6(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 n8(t,e,n){var r=J6(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?e8:t8,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function jg(t,e,n){var r=Gc(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 r8(t,e){return function(){return jg(this,t,e)}}function i8(t,e){return function(){return jg(this,t,e.apply(this,arguments))}}function o8(t,e){return this.each((typeof e=="function"?i8:r8)(t,e))}function*a8(){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 Oc=[null];function Yt(t,e){this._groups=t,this._parents=e}function Gn(){return new Yt([[document.documentElement]],Oc)}function s8(){return this}Yt.prototype=Gn.prototype={constructor:Yt,select:I5,selectAll:F5,selectChild:U5,selectChildren:W5,filter:q5,data:Q5,enter:j5,exit:t6,join:e6,merge:n6,selection:s8,order:r6,sort:i6,call:a6,nodes:s6,node:u6,size:c6,empty:l6,each:f6,attr:b6,style:w6,property:M6,classed:L6,text:I6,html:G6,raise:O6,lower:B6,append:Y6,insert:W6,remove:j6,clone:Z6,datum:K6,on:n8,dispatch:o8,[Symbol.iterator]:a8};function V(t){return typeof t=="string"?new Yt([[document.querySelector(t)]],[document.documentElement]):new Yt([[t]],Oc)}function u8(t){return V(Ma(t).call(document.documentElement))}var c8=0;function Xg(){return new Uc}function Uc(){this._="@"+(++c8).toString(36)}Uc.prototype=Xg.prototype={constructor:Uc,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 l8(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 f8(t){return typeof t=="string"?new Yt([document.querySelectorAll(t)],[document.documentElement]):new Yt([Og(t)],Oc)}const h8={passive:!1},Fi={capture:!0,passive:!1};function Bc(t){t.stopImmediatePropagation()}function Dr(t){t.preventDefault(),t.stopImmediatePropagation()}function Da(t){var e=t.document.documentElement,n=V(t).on("dragstart.drag",Dr,Fi);"onselectstart"in e?n.on("selectstart.drag",Dr,Fi):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function La(t,e){var n=t.document.documentElement,r=V(t).on("dragstart.drag",null);e&&(r.on("click.drag",Dr,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 Ea=t=>()=>t;function Yc(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}})}Yc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function d8(t){return!t.ctrlKey&&!t.button}function p8(){return this.parentNode}function g8(t,e){return e??{x:t.x,y:t.y}}function m8(){return navigator.maxTouchPoints||"ontouchstart"in this}function Zg(){var t=d8,e=p8,n=g8,r=m8,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,h8).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(b,_){if(!(l||!t.call(this,b,_))){var w=v(this,e.call(this,b,_),b,_,"mouse");w&&(V(b.view).on("mousemove.drag",p,Fi).on("mouseup.drag",g,Fi),Da(b.view),Bc(b),c=!1,s=b.clientX,u=b.clientY,w("start",b))}}function p(b){if(Dr(b),!c){var _=b.clientX-s,w=b.clientY-u;c=_*_+w*w>h}i.mouse("drag",b)}function g(b){V(b.view).on("mousemove.drag mouseup.drag",null),La(b.view,c),Dr(b),i.mouse("end",b)}function m(b,_){if(t.call(this,b,_)){var w=b.changedTouches,S=e.call(this,b,_),k=w.length,$,E;for($=0;$<k;++$)(E=v(this,S,b,_,w[$].identifier,w[$]))&&(Bc(b),E("start",b,w[$]))}}function y(b){var _=b.changedTouches,w=_.length,S,k;for(S=0;S<w;++S)(k=i[_[S].identifier])&&(Dr(b),k("drag",b,_[S]))}function x(b){var _=b.changedTouches,w=_.length,S,k;for(l&&clearTimeout(l),l=setTimeout(function(){l=null},500),S=0;S<w;++S)(k=i[_[S].identifier])&&(Bc(b),k("end",b,_[S]))}function v(b,_,w,S,k,$){var E=o.copy(),A=se($||w,_),I,D,T;if((T=n.call(b,new Yc("beforestart",{sourceEvent:w,target:f,identifier:k,active:a,x:A[0],y:A[1],dx:0,dy:0,dispatch:E}),S))!=null)return I=T.x-A[0]||0,D=T.y-A[1]||0,function C(P,R,G){var M=A,N;switch(P){case"start":i[k]=C,N=a++;break;case"end":delete i[k],--a;case"drag":A=se(G||R,_),N=a;break}E.call(P,b,new Yc(P,{sourceEvent:R,subject:T,target:f,identifier:k,active:N,x:A[0]+I,y:A[1]+D,dx:A[0]-M[0],dy:A[1]-M[1],dispatch:E}),S)}}return f.filter=function(b){return arguments.length?(t=typeof b=="function"?b:Ea(!!b),f):t},f.container=function(b){return arguments.length?(e=typeof b=="function"?b:Ea(b),f):e},f.subject=function(b){return arguments.length?(n=typeof b=="function"?b:Ea(b),f):n},f.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:Ea(!!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 Lr(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 dn(){}var zn=.7,Er=1/zn,kr="\\s*([+-]?\\d+)\\s*",zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",y8=/^#([0-9a-f]{3,8})$/,b8=new RegExp(`^rgb\\(${kr},${kr},${kr}\\)$`),v8=new RegExp(`^rgb\\(${Ie},${Ie},${Ie}\\)$`),x8=new RegExp(`^rgba\\(${kr},${kr},${kr},${zi}\\)$`),_8=new RegExp(`^rgba\\(${Ie},${Ie},${Ie},${zi}\\)$`),w8=new RegExp(`^hsl\\(${zi},${Ie},${Ie}\\)$`),$8=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};Lr(dn,pn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Qg,formatHex:Qg,formatHex8:S8,formatHsl:A8,formatRgb:Jg,toString:Jg});function Qg(){return this.rgb().formatHex()}function S8(){return this.rgb().formatHex8()}function A8(){return i0(this).formatHsl()}function Jg(){return this.rgb().formatRgb()}function pn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=y8.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?ka(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ka(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=b8.exec(t))?new kt(e[1],e[2],e[3],1):(e=v8.exec(t))?new kt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=x8.exec(t))?ka(e[1],e[2],e[3],e[4]):(e=_8.exec(t))?ka(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=w8.exec(t))?r0(e[1],e[2]/100,e[3]/100,1):(e=$8.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 ka(t,e,n,r){return r<=0&&(t=e=n=NaN),new kt(t,e,n,r)}function Hc(t){return t instanceof dn||(t=pn(t)),t?(t=t.rgb(),new kt(t.r,t.g,t.b,t.opacity)):new kt}function Cr(t,e,n,r){return arguments.length===1?Hc(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}Lr(kt,Cr,Gi(dn,{brighter(t){return t=t==null?Er:Math.pow(Er,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),Ca(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:M8,formatRgb:n0,toString:n0}));function e0(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}`}function M8(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}${Un((isNaN(this.opacity)?1:this.opacity)*255)}`}function n0(){const t=Ca(this.opacity);return`${t===1?"rgb(":"rgba("}${On(this.r)}, ${On(this.g)}, ${On(this.b)}${t===1?")":`, ${t})`}`}function Ca(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 dn||(t=pn(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 Ia(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}Lr(Se,Ia,Gi(dn,{brighter(t){return t=t==null?Er:Math.pow(Er,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(Wc(t>=240?t-240:t+120,i,r),Wc(t,i,r),Wc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Se(o0(this.h),Ra(this.s),Ra(this.l),Ca(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=Ca(this.opacity);return`${t===1?"hsl(":"hsla("}${o0(this.h)}, ${Ra(this.s)*100}%, ${Ra(this.l)*100}%${t===1?")":`, ${t})`}`}}));function o0(t){return t=(t||0)%360,t<0?t+360:t}function Ra(t){return Math.max(0,Math.min(1,t||0))}function Wc(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,Na=18,u0=.96422,c0=1,l0=.82521,f0=4/29,Ir=6/29,h0=3*Ir*Ir,T8=Ir*Ir*Ir;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=Hc(t));var e=Vc(t.r),n=Vc(t.g),r=Vc(t.b),i=qc((.2225045*e+.7168786*n+.0606169*r)/c0),o,a;return e===n&&n===r?o=a=i:(o=qc((.4360747*e+.3850649*n+.1430804*r)/u0),a=qc((.0139322*e+.0971045*n+.7141733*r)/l0)),new Ae(116*i-16,500*(o-i),200*(i-a),t.opacity)}function P8(t,e){return new Ae(t,0,0,e??1)}function Fa(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}Lr(Ae,Fa,Gi(dn,{brighter(t){return new Ae(this.l+Na*(t??1),this.a,this.b,this.opacity)},darker(t){return new Ae(this.l-Na*(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*jc(e),t=c0*jc(t),n=l0*jc(n),new kt(Xc(3.1338561*e-1.6168667*t-.4906146*n),Xc(-.9787684*e+1.9161415*t+.033454*n),Xc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function qc(t){return t>T8?Math.pow(t,1/3):t/h0+f0}function jc(t){return t>Ir?t*t*t:h0*(t-f0)}function Xc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Vc(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 D8(t,e,n,r){return arguments.length===1?p0(t):new Re(n,e,t,r??1)}function Ga(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)}Lr(Re,Ga,Gi(dn,{brighter(t){return new Re(this.h,this.c,this.l+Na*(t??1),this.opacity)},darker(t){return new Re(this.h,this.c,this.l-Na*(t??1),this.opacity)},rgb(){return g0(this).rgb()}}));var m0=-.14861,Zc=1.78277,Kc=-.29227,za=-.90649,Oi=1.97294,y0=Oi*za,b0=Oi*Zc,v0=Zc*Kc-za*m0;function L8(t){if(t instanceof Bn)return new Bn(t.h,t.s,t.l,t.opacity);t instanceof kt||(t=Hc(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)-Kc*o)/za,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?L8(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}Lr(Bn,Me,Gi(dn,{brighter(t){return t=t==null?Er:Math.pow(Er,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+Zc*i)),255*(e+n*(Kc*r+za*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 Oa=t=>()=>t;function $0(t,e){return function(n){return t+n*e}}function E8(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 Ua(t,e){var n=e-t;return n?$0(t,n>180||n<-180?n-360*Math.round(n/360):n):Oa(isNaN(t)?e:t)}function k8(t){return(t=+t)==1?Ct:function(e,n){return n-e?E8(e,n,t):Oa(isNaN(e)?n:e)}}function Ct(t,e){var n=e-t;return n?$0(t,n):Oa(isNaN(t)?e:t)}const Ui=function t(e){var n=k8(e);function r(i,o){var a=n((i=Cr(i)).r,(o=Cr(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=Cr(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),C8=S0(w0);function Qc(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 I8(t,e){return(M0(e)?Qc: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]=gn(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]=gn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Jc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tl=new RegExp(Jc.source,"g");function R8(t){return function(){return t}}function N8(t){return function(e){return t(e)+""}}function el(t,e){var n=Jc.lastIndex=tl.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=Jc.exec(t))&&(i=tl.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=tl.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?N8(u[0].x):R8(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 gn(t,e){var n=typeof e,r;return e==null||n==="boolean"?Oa(e):(n==="number"?he:n==="string"?(r=pn(e))?(e=r,Ui):el:e instanceof pn?Ui:e instanceof Date?P0:M0(e)?Qc:Array.isArray(e)?T0:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?D0:he)(t,e)}function F8(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function G8(t,e){var n=Ua(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ba(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var L0=180/Math.PI,nl={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 Ya;function z8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?nl:E0(e.a,e.b,e.c,e.d,e.e,e.f)}function O8(t){return t==null||(Ya||(Ya=document.createElementNS("http://www.w3.org/2000/svg","g")),Ya.setAttribute("transform",t),!(t=Ya.transform.baseVal.consolidate()))?nl:(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(z8,"px, ","px)","deg)"),I0=k0(O8,", ",")",")"),U8=1e-12;function R0(t){return((t=Math.exp(t))+1/t)/2}function B8(t){return((t=Math.exp(t))-1/t)/2}function Y8(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<U8)y=Math.log(f/c)/e,m=function(S){return[s+S*d,u+S*p,c*Math.exp(e*S*y)]};else{var x=Math.sqrt(g),v=(f*f-c*c+r*g)/(2*c*n*x),b=(f*f-c*c-r*g)/(2*f*n*x),_=Math.log(Math.sqrt(v*v+1)-v),w=Math.log(Math.sqrt(b*b+1)-b);y=(w-_)/e,m=function(S){var k=S*y,$=R0(_),E=c/(n*x)*($*Y8(e*k+_)-B8(_));return[s+E*d,u+E*p,c*$/R0(e*k+_)]}}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=Ia(e)).h,(n=Ia(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 H8=F0(Ua);var W8=F0(Ct);function q8(t,e){var n=Ct((t=Fa(t)).l,(e=Fa(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=Ga(e)).h,(n=Ga(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 j8=G0(Ua);var X8=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 V8=z0(Ua);var Ha=z0(Ct);function O0(t,e){e===void 0&&(e=t,t=gn);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 Z8(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Rr=0,Bi=0,Yi=0,U0=1e3,Wa,Hi,qa=0,Yn=0,ja=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(K8),Yn=Wi.now()+ja)}function K8(){Yn=0}function ji(){this._call=this._time=this._next=null}ji.prototype=Xa.prototype={constructor:ji,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:Wa=this,Hi=this),this._call=t,this._time=n,rl()},stop:function(){this._call&&(this._call=null,this._time=1/0,rl())}};function Xa(t,e,n){var r=new ji;return r.restart(t,e,n),r}function Y0(){qi(),++Rr;for(var t=Wa,e;t;)(e=Yn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Rr}function H0(){Yn=(qa=Wi.now())+ja,Rr=Bi=0;try{Y0()}finally{Rr=0,J8(),Yn=0}}function Q8(){var t=Wi.now(),e=t-qa;e>U0&&(ja-=e,qa=t)}function J8(){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);Hi=t,rl(r)}function rl(t){if(!Rr){Bi&&(Bi=clearTimeout(Bi));var e=t-Yn;e>24?(t<1/0&&(Bi=setTimeout(H0,t-Wi.now()-ja)),Yi&&(Yi=clearInterval(Yi))):(Yi||(qa=Wi.now(),Yi=setInterval(Q8,U0)),Rr=1,B0(H0))}}function il(t,e,n){var r=new ji;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function t4(t,e,n){var r=new ji,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 e4=Nn("start","end","cancel","interrupt"),n4=[],W0=0,ol=1,al=2,Va=3,q0=4,sl=5,Za=6;function Ka(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;r4(t,n,{name:e,index:r,group:i,on:e4,tween:n4,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:W0})}function ul(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>Va)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 r4(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Xa(o,0,n.time);function o(c){n.state=ol,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!==ol)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===Va)return il(a);d.state===q0?(d.state=Za,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=Za,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(il(function(){n.state===Va&&(n.state=q0,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=al,n.on.call("start",t,t.__data__,n.index,n.group),n.state===al){for(n.state=Va,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=sl,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===sl&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Za,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>al&&r.state<sl,r.state=Za,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function i4(t){return this.each(function(){Hn(this,t)})}function o4(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 a4(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 s4(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?o4:a4)(n,t,e))}function cl(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 j0(t,e){var n;return(typeof e=="number"?he:e instanceof pn?Ui:(n=pn(e))?(e=n,Ui):el)(t,e)}function u4(t){return function(){this.removeAttribute(t)}}function c4(t){return function(){this.removeAttributeNS(t.space,t.local)}}function l4(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 f4(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 h4(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 d4(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 p4(t,e){var n=Ni(t),r=n==="transform"?I0:j0;return this.attrTween(t,typeof e=="function"?(n.local?d4:h4)(n,r,cl(this,"attr."+t,e)):e==null?(n.local?c4:u4)(n):(n.local?f4:l4)(n,r,e))}function g4(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function m4(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function y4(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&m4(t,o)),n}return i._value=e,i}function b4(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&g4(t,o)),n}return i._value=e,i}function v4(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?y4:b4)(r,e))}function x4(t,e){return function(){ul(this,t).delay=+e.apply(this,arguments)}}function _4(t,e){return e=+e,function(){ul(this,t).delay=e}}function w4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?x4:_4)(e,t)):Te(this.node(),e).delay}function $4(t,e){return function(){Ne(this,t).duration=+e.apply(this,arguments)}}function S4(t,e){return e=+e,function(){Ne(this,t).duration=e}}function A4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?$4:S4)(e,t)):Te(this.node(),e).duration}function M4(t,e){if(typeof e!="function")throw new Error;return function(){Ne(this,t).ease=e}}function T4(t){var e=this._id;return arguments.length?this.each(M4(e,t)):Te(this.node(),e).ease}function P4(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ne(this,t).ease=n}}function D4(t){if(typeof t!="function")throw new Error;return this.each(P4(this._id,t))}function L4(t){typeof t!="function"&&(t=Fc(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 E4(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 k4(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 C4(t,e,n){var r,i,o=k4(e)?ul:Ne;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function I4(t,e){var n=this._id;return arguments.length<2?Te(this.node(),n).on.on(t):this.each(C4(n,t,e))}function R4(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function N4(){return this.on("end.remove",R4(this._id))}function F4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ta(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,Ka(c[f],e,n,f,c,Te(l,n)));return new Fe(o,this._parents,e,n)}function G4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Nc(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])&&Ka(d,e,n,g,f,p);o.push(f),a.push(l)}return new Fe(o,a,e,n)}var z4=Gn.prototype.constructor;function O4(){return new z4(this._groups,this._parents)}function U4(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 B4(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 Y4(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 H4(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=X0(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function W4(t,e,n){var r=(t+="")=="transform"?C0:j0;return e==null?this.styleTween(t,U4(t,r)).on("end.style."+t,X0(t)):typeof e=="function"?this.styleTween(t,Y4(t,r,cl(this,"style."+t,e))).each(H4(this._id,t)):this.styleTween(t,B4(t,r,e),n).on("end.style."+t,null)}function q4(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function j4(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&q4(t,a,n)),r}return o._value=e,o}function X4(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,j4(t,e,n??""))}function V4(t){return function(){this.textContent=t}}function Z4(t){return function(){var e=t(this);this.textContent=e??""}}function K4(t){return this.tween("text",typeof t=="function"?Z4(cl(this,"text",t)):V4(t==null?"":t+""))}function Q4(t){return function(e){this.textContent=t.call(this,e)}}function J4(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&Q4(i)),e}return r._value=t,r}function tM(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,J4(t))}function eM(){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);Ka(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 nM(){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 rM=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++rM}var Xe=Gn.prototype;Fe.prototype=V0.prototype={constructor:Fe,select:F4,selectAll:G4,selectChild:Xe.selectChild,selectChildren:Xe.selectChildren,filter:L4,merge:E4,selection:O4,transition:eM,call:Xe.call,nodes:Xe.nodes,node:Xe.node,size:Xe.size,empty:Xe.empty,each:Xe.each,on:I4,attr:p4,attrTween:v4,style:W4,styleTween:X4,text:K4,textTween:tM,remove:N4,tween:s4,delay:w4,duration:A4,ease:T4,easeVarying:D4,end:nM,[Symbol.iterator]:Xe[Symbol.iterator]};const iM=t=>+t;function oM(t){return t*t}function aM(t){return t*(2-t)}function K0(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function sM(t){return t*t*t}function uM(t){return--t*t*t+1}function Xi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ll=3,cM=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(ll),lM=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(ll),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}(ll),J0=Math.PI,t1=J0/2;function fM(t){return+t==1?1:1-Math.cos(t*t1)}function hM(t){return Math.sin(t*t1)}function e1(t){return(1-Math.cos(J0*t))/2}function mn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function dM(t){return mn(1-+t)}function pM(t){return 1-mn(t)}function n1(t){return((t*=2)<=1?mn(1-t):2-mn(t-1))/2}function gM(t){return 1-Math.sqrt(1-t*t)}function mM(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 fl=4/11,yM=6/11,bM=8/11,vM=3/4,xM=9/11,_M=10/11,wM=15/16,$M=21/22,SM=63/64,Qa=1/fl/fl;function AM(t){return 1-Vi(1-t)}function Vi(t){return(t=+t)<fl?Qa*t*t:t<bM?Qa*(t-=yM)*t+vM:t<_M?Qa*(t-=xM)*t+wM:Qa*(t-=$M)*t+SM}function MM(t){return((t*=2)<=1?1-Vi(1-t):Vi(t-1)+1)/2}var hl=1.70158,TM=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(hl),PM=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(hl),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}(hl),Nr=2*Math.PI,dl=1,pl=.3,DM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Nr);function i(o){return e*mn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Nr)},i.period=function(o){return t(e,o)},i}(dl,pl),Ja=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Nr);function i(o){return 1-e*mn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Nr)},i.period=function(o){return t(e,o)},i}(dl,pl),LM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Nr);function i(o){return((o=o*2-1)<0?e*mn(-o)*Math.sin((r-o)/n):2-e*mn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*Nr)},i.period=function(o){return t(e,o)},i}(dl,pl),EM={time:null,delay:0,duration:250,ease:Xi};function kM(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 CM(t){var e,n;t instanceof Fe?(e=t._id,t=t._name):(e=Z0(),(n=EM).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])&&Ka(u,t,e,c,a,n||kM(u,e));return new Fe(r,this._parents,t,e)}Gn.prototype.interrupt=i4,Gn.prototype.transition=CM;var IM=[null];function RM(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>ol&&r.name===e)return new Fe([[t]],IM,e,+i)}return null}const gl=t=>()=>t;function NM(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 FM(t){t.stopImmediatePropagation()}function ml(t){t.preventDefault(),t.stopImmediatePropagation()}var o1={name:"drag"},yl={name:"space"},Fr={name:"handle"},Gr={name:"center"};const{abs:a1,max:Gt,min:zt}=Math;function s1(t){return[+t[0],+t[1]]}function bl(t){return[s1(t[0]),s1(t[1])]}var ts={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]]}},es={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]]}},GM={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Zi),input:function(t){return t==null?null:bl(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"},zM={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},OM={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 UM(t){return!t.ctrlKey&&!t.button}function BM(){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 YM(){return navigator.maxTouchPoints||"ontouchstart"in this}function vl(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function HM(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function WM(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function qM(){return xl(ts)}function jM(){return xl(es)}function XM(){return xl(GM)}function xl(t){var e=BM,n=UM,r=YM,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 v=vl(this).extent;V(this).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[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 x=m.selectAll(".handle").data(t.handles,function(v){return v.type});x.exit().remove(),x.enter().append("rect").attr("class",function(v){return"handle handle--"+v.type}).attr("cursor",function(v){return Ve[v.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,x){m.tween?m.on("start.brush",function(v){l(this,arguments).beforestart().start(v)}).on("interrupt.brush end.brush",function(v){l(this,arguments).end(v)}).tween("brush",function(){var v=this,b=v.__brush,_=l(v,arguments),w=b.selection,S=t.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),k=gn(w,S);function $(E){b.selection=E===1&&S===null?null:k(E),c.call(v),_.brush()}return w!==null&&S!==null?$:$(1)}):m.each(function(){var v=this,b=arguments,_=v.__brush,w=t.input(typeof y=="function"?y.apply(v,b):y,_.extent),S=l(v,b).beforestart();Hn(v),_.selection=w===null?null:w,c.call(v),S.start(x).brush(x).end(x)})},u.clear=function(m,y){u.move(m,null,y)};function c(){var m=V(this),y=vl(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(x){return x.type[x.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(x){return x.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(x){return x.type==="e"||x.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,x){var v=m.__brush.emitter;return v&&(!x||!v.clean)?v:new h(m,y,x)}function h(m,y,x){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=x}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,x){var v=V(this.that).datum();o.call(m,this.that,new NM(m,{sourceEvent:y,target:u,selection:t.output(this.state.selection),mode:x,dispatch:o}),v)}};function f(m){if(s&&!m.touches||!n.apply(this,arguments))return;var y=this,x=m.target.__data__.type,v=(i&&m.metaKey?x="overlay":x)==="selection"?o1:i&&m.altKey?Gr:Fr,b=t===es?null:zM[x],_=t===ts?null:OM[x],w=vl(y),S=w.extent,k=w.selection,$=S[0][0],E,A,I=S[0][1],D,T,C=S[1][0],P,R,G=S[1][1],M,N,z=0,L=0,j,q=b&&_&&i&&m.shiftKey,Y,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(x==="overlay"){k&&(j=!0);const it=[Q[0],Q[1]||Q[0]];w.selection=k=[[E=t===es?$:zt(it[0][0],it[1][0]),D=t===ts?I:zt(it[0][1],it[1][1])],[P=t===es?C:Gt(it[0][0],it[1][0]),M=t===ts?G:Gt(it[0][1],it[1][1])]],Q.length>1&&xt(m)}else E=k[0][0],D=k[0][1],P=k[1][0],M=k[1][1];A=E,T=D,R=P,N=M;var O=V(y).attr("pointer-events","none"),tt=O.selectAll(".overlay").attr("cursor",Ve[x]);if(m.touches)ct.moved=H,ct.ended=gt;else{var st=V(m.view).on("mousemove.brush",H,!0).on("mouseup.brush",gt,!0);i&&st.on("keydown.brush",Ft,!0).on("keyup.brush",te,!0),Da(m.view)}c.call(y),ct.start(m,v.name);function H(it){for(const Mt of it.changedTouches||[it])for(const No of Q)No.identifier===Mt.identifier&&(No.cur=se(Mt,y));if(q&&!Y&&!X&&Q.length===1){const Mt=Q[0];a1(Mt.cur[0]-Mt[0])>a1(Mt.cur[1]-Mt[1])?X=!0:Y=!0}for(const Mt of Q)Mt.cur&&(Mt[0]=Mt.cur[0],Mt[1]=Mt.cur[1]);j=!0,ml(it),xt(it)}function xt(it){const Mt=Q[0],No=Mt.point0;var Mn;switch(z=Mt[0]-No[0],L=Mt[1]-No[1],v){case yl:case o1:{b&&(z=Gt($-E,zt(C-P,z)),A=E+z,R=P+z),_&&(L=Gt(I-D,zt(G-M,L)),T=D+L,N=M+L);break}case Fr:{Q[1]?(b&&(A=Gt($,zt(C,Q[0][0])),R=Gt($,zt(C,Q[1][0])),b=1),_&&(T=Gt(I,zt(G,Q[0][1])),N=Gt(I,zt(G,Q[1][1])),_=1)):(b<0?(z=Gt($-E,zt(C-E,z)),A=E+z,R=P):b>0&&(z=Gt($-P,zt(C-P,z)),A=E,R=P+z),_<0?(L=Gt(I-D,zt(G-D,L)),T=D+L,N=M):_>0&&(L=Gt(I-M,zt(G-M,L)),T=D,N=M+L));break}case Gr:{b&&(A=Gt($,zt(C,E-z*b)),R=Gt($,zt(C,P+z*b))),_&&(T=Gt(I,zt(G,D-L*_)),N=Gt(I,zt(G,M+L*_)));break}}R<A&&(b*=-1,Mn=E,E=P,P=Mn,Mn=A,A=R,R=Mn,x in u1&&tt.attr("cursor",Ve[x=u1[x]])),N<T&&(_*=-1,Mn=D,D=M,M=Mn,Mn=T,T=N,N=Mn,x in c1&&tt.attr("cursor",Ve[x=c1[x]])),w.selection&&(k=w.selection),Y&&(A=k[0][0],R=k[1][0]),X&&(T=k[0][1],N=k[1][1]),(k[0][0]!==A||k[0][1]!==T||k[1][0]!==R||k[1][1]!==N)&&(w.selection=[[A,T],[R,N]],c.call(y),ct.brush(it,v.name))}function gt(it){if(FM(it),it.touches){if(it.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else La(it.view,j),st.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);O.attr("pointer-events","all"),tt.attr("cursor",Ve.overlay),w.selection&&(k=w.selection),HM(k)&&(w.selection=null,c.call(y)),ct.end(it,v.name)}function Ft(it){switch(it.keyCode){case 16:{q=b&&_;break}case 18:{v===Fr&&(b&&(P=R-z*b,E=A+z*b),_&&(M=N-L*_,D=T+L*_),v=Gr,xt(it));break}case 32:{(v===Fr||v===Gr)&&(b<0?P=R-z:b>0&&(E=A-z),_<0?M=N-L:_>0&&(D=T-L),v=yl,tt.attr("cursor",Ve.selection),xt(it));break}default:return}ml(it)}function te(it){switch(it.keyCode){case 16:{q&&(Y=X=q=!1,xt(it));break}case 18:{v===Gr&&(b<0?P=R:b>0&&(E=A),_<0?M=N:_>0&&(D=T),v=Fr,xt(it));break}case 32:{v===yl&&(it.altKey?(b&&(P=R-z*b,E=A+z*b),_&&(M=N-L*_,D=T+L*_),v=Gr):(b<0?P=R:b>0&&(E=A),_<0?M=N:_>0&&(D=T),v=Fr),tt.attr("cursor",Ve[x]),xt(it));break}default:return}ml(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=bl(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:gl(bl(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:gl(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:gl(!!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,zr=Math.cos,Or=Math.sin,f1=Math.PI,ns=f1/2,h1=f1*2,d1=Math.max,_l=1e-12;function wl(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function VM(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function ZM(){return $l(!1,!1)}function KM(){return $l(!1,!0)}function QM(){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=wl(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 x=wl(~u+1,u).filter(v=>v<0?s[~v*u+m]:s[m*u+v]);i&&x.sort((v,b)=>i(v<0?-s[~v*u+m]:s[m*u+v],b<0?-s[~b*u+m]:s[m*u+b]));for(const v of x)if(v<0){const b=h[~v*u+m]||(h[~v*u+m]={source:null,target:null});b.target={index:m,startAngle:g,endAngle:g+=s[~v*u+m]*d,value:s[~v*u+m]}}else{const b=h[m*u+v]||(h[m*u+v]={source:null,target:null});b.source={index:m,startAngle:g,endAngle:g+=s[m*u+v]*d,value:s[m*u+v]}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}else{const x=wl(0,u).filter(v=>s[m*u+v]||s[v*u+m]);i&&x.sort((v,b)=>i(s[m*u+v],s[m*u+b]));for(const v of x){let b;if(m<v?(b=h[m*u+v]||(h[m*u+v]={source:null,target:null}),b.source={index:m,startAngle:g,endAngle:g+=s[m*u+v]*d,value:s[m*u+v]}):(b=h[v*u+m]||(h[v*u+m]={source:null,target:null}),b.target={index:m,startAngle:g,endAngle:g+=s[m*u+v]*d,value:s[m*u+v]},m===v&&(b.source=b.target)),b.source&&b.target&&b.source.value<b.target.value){const _=b.source;b.source=b.target,b.target=_}}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=VM(s))._=s,a):o&&o._},a}const Sl=Math.PI,Al=2*Sl,Wn=1e-6,JM=Al-Wn;function p1(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function t7(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:t7(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),x=Math.sqrt(f),v=o*Math.tan((Sl-Math.acos((g+f-m)/(2*y*x)))/2),b=v/x,_=v/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+_*u},${this._y1=n+_*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%Al+Al),f>JM?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>=Sl)},${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 Ml(){return new Ki}Ml.prototype=Ki.prototype;function e7(t=3){return new Ki(+t)}var n7=Array.prototype.slice;function qn(t){return function(){return t}}function r7(t){return t.source}function i7(t){return t.target}function g1(t){return t.radius}function o7(t){return t.startAngle}function a7(t){return t.endAngle}function s7(){return 0}function u7(){return 10}function m1(t){var e=r7,n=i7,r=g1,i=g1,o=o7,a=a7,s=s7,u=null;function c(){var l,h=e.apply(this,arguments),f=n.apply(this,arguments),d=s.apply(this,arguments)/2,p=n7.call(arguments),g=+r.apply(this,(p[0]=h,p)),m=o.apply(this,p)-ns,y=a.apply(this,p)-ns,x=+i.apply(this,(p[0]=f,p)),v=o.apply(this,p)-ns,b=a.apply(this,p)-ns;if(u||(u=l=Ml()),d>_l&&(l1(y-m)>d*2+_l?y>m?(m+=d,y-=d):(m-=d,y+=d):m=y=(m+y)/2,l1(b-v)>d*2+_l?b>v?(v+=d,b-=d):(v-=d,b+=d):v=b=(v+b)/2),u.moveTo(g*zr(m),g*Or(m)),u.arc(0,0,g,m,y),m!==v||y!==b)if(t){var _=+t.apply(this,arguments),w=x-_,S=(v+b)/2;u.quadraticCurveTo(0,0,w*zr(v),w*Or(v)),u.lineTo(x*zr(S),x*Or(S)),u.lineTo(w*zr(b),w*Or(b))}else u.quadraticCurveTo(0,0,x*zr(v),x*Or(v)),u.arc(0,0,x,v,b);if(u.quadraticCurveTo(0,0,g*zr(m),g*Or(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 c7(){return m1()}function l7(){return m1(u7)}var f7=Array.prototype,y1=f7.slice;function h7(t,e){return t-e}function d7(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 yn=t=>()=>t;function p7(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=g7(t,e[n]))return i;return 0}function g7(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(m7(u,h,e))return 0;l>r!=d>r&&n<(f-c)*(r-l)/(d-l)+c&&(i=-i)}return i}function m7(t,e,n){var r;return y7(t,e,n)&&b7(t[r=+(t[0]===e[0])],n[r],e[r])}function y7(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function b7(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function v7(){}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 Tl(){var t=1,e=1,n=Dc,r=u;function i(c){var l=n(c);if(Array.isArray(l))l=l.slice().sort(h7);else{const h=Li(c,x7);for(l=In(...Pc(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),d7(p)>0?f.push([p]):d.push(p)}),d.forEach(function(p){for(var g=0,m=f.length,y;g<m;++g)if(p7((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,x,v;for(p=g=-1,y=jn(c[0],l),Ze[y<<1].forEach(b);++p<t-1;)m=y,y=jn(c[p+1],l),Ze[m|y<<1].forEach(b);for(Ze[y<<0].forEach(b);++g<e-1;){for(p=-1,y=jn(c[g*t+t],l),x=jn(c[g*t],l),Ze[y<<1|x<<2].forEach(b);++p<t-1;)m=y,y=jn(c[g*t+t+p+1],l),v=x,x=jn(c[g*t+p+1],l),Ze[m|y<<1|x<<2|v<<3].forEach(b);Ze[y|x<<3].forEach(b)}for(p=-1,x=c[g*t]>=l,Ze[x<<2].forEach(b);++p<t-1;)v=x,x=jn(c[g*t+p+1],l),Ze[x<<2|v<<3].forEach(b);Ze[x<<3].forEach(b);function b(_){var w=[_[0][0]+p,_[0][1]+g],S=[_[1][0]+p,_[1][1]+g],k=s(w),$=s(S),E,A;(E=d[k])?(A=f[$])?(delete d[E.end],delete f[A.start],E===A?(E.ring.push(S),h(E.ring)):f[E.start]=d[A.end]={start:E.start,end:A.end,ring:E.ring.concat(A.ring)}):(delete d[E.end],E.ring.push(S),d[E.end=$]=E):(E=f[$])?(A=d[k])?(delete f[E.start],delete d[A.end],E===A?(E.ring.push(S),h(E.ring)):f[A.start]=d[E.end]={start:A.start,end:E.end,ring:A.ring.concat(E.ring)}):(delete f[E.start],E.ring.unshift(w),f[E.start=k]=E):f[k]=d[$]={start:k,end:$,ring:[w,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=Pl(l[m*t+g]);d>0&&d<t&&g===d&&(f[0]=b1(d,Pl(l[m*t+g-1]),y,h)),p>0&&p<e&&m===p&&(f[1]=b1(p,Pl(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)?yn(y1.call(c)):yn(c),i):n},i.smooth=function(c){return arguments.length?(r=c?u:v7,i):r===u},i}function x7(t){return isFinite(t)?t:NaN}function jn(t,e){return t==null?!1:+t>=e}function Pl(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 _7(t){return t[0]}function w7(t){return t[1]}function $7(){return 1}function S7(){var t=_7,e=w7,n=$7,r=960,i=500,o=20,a=2,s=o*3,u=r+s*2>>a,c=i+s*2>>a,l=yn(20);function h(x){var v=new Float32Array(u*c),b=Math.pow(2,-a),_=-1;for(const D of x){var w=(t(D,++_,x)+s)*b,S=(e(D,_,x)+s)*b,k=+n(D,_,x);if(k&&w>=0&&w<u&&S>=0&&S<c){var $=Math.floor(w),E=Math.floor(S),A=w-$-.5,I=S-E-.5;v[$+E*u]+=(1-A)*(1-I)*k,v[$+1+E*u]+=A*(1-I)*k,v[$+1+(E+1)*u]+=A*I*k,v[$+(E+1)*u]+=(1-A)*I*k}}return dg({data:v,width:u,height:c},o*b),v}function f(x){var v=h(x),b=l(v),_=Math.pow(2,2*a);return Array.isArray(b)||(b=In(Number.MIN_VALUE,ki(v)/_,b)),Tl().size([u,c]).thresholds(b.map(w=>w*_))(v).map((w,S)=>(w.value=+b[S],d(w)))}f.contours=function(x){var v=h(x),b=Tl().size([u,c]),_=Math.pow(2,2*a),w=S=>{S=+S;var k=d(b.contour(v,S*_));return k.value=S,k};return Object.defineProperty(w,"max",{get:()=>ki(v)/_}),w};function d(x){return x.coordinates.forEach(p),x}function p(x){x.forEach(g)}function g(x){x.forEach(m)}function m(x){x[0]=x[0]*Math.pow(2,a)-s,x[1]=x[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(x){return arguments.length?(t=typeof x=="function"?x:yn(+x),f):t},f.y=function(x){return arguments.length?(e=typeof x=="function"?x:yn(+x),f):e},f.weight=function(x){return arguments.length?(n=typeof x=="function"?x:yn(+x),f):n},f.size=function(x){if(!arguments.length)return[r,i];var v=+x[0],b=+x[1];if(!(v>=0&&b>=0))throw new Error("invalid size");return r=v,i=b,y()},f.cellSize=function(x){if(!arguments.length)return 1<<a;if(!((x=+x)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(x)/Math.LN2),y()},f.thresholds=function(x){return arguments.length?(l=typeof x=="function"?x:Array.isArray(x)?yn(y1.call(x)):yn(x),f):l},f.bandwidth=function(x){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((x=+x)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*x*x+1)-1)/2,y()},f}const Ke=11102230246251565e-32,Ot=134217729,A7=(3+8*Ke)*Ke;function Dl(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 M7(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 T7=(3+16*Ke)*Ke,P7=(2+12*Ke)*Ke,D7=(9+64*Ke)*Ke*Ke,Ur=Qi(4),v1=Qi(8),x1=Qi(12),_1=Qi(16),Ht=Qi(4);function L7(t,e,n,r,i,o,a){let s,u,c,l,h,f,d,p,g,m,y,x,v,b,_,w,S,k;const $=t-i,E=n-i,A=e-o,I=r-o;b=$*I,f=Ot*$,d=f-(f-$),p=$-d,f=Ot*I,g=f-(f-I),m=I-g,_=p*m-(b-d*g-p*g-d*m),w=A*E,f=Ot*A,d=f-(f-A),p=A-d,f=Ot*E,g=f-(f-E),m=E-g,S=p*m-(w-d*g-p*g-d*m),y=_-S,h=_-y,Ur[0]=_-(y+h)+(h-S),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-w,h=v-y,Ur[1]=v-(y+h)+(h-w),k=x+y,h=k-x,Ur[2]=x-(k-h)+(y-h),Ur[3]=k;let D=M7(4,Ur),T=P7*a;if(D>=T||-D>=T||(h=t-$,s=t-($+h)+(h-i),h=n-E,c=n-(E+h)+(h-i),h=e-A,u=e-(A+h)+(h-o),h=r-I,l=r-(I+h)+(h-o),s===0&&u===0&&c===0&&l===0)||(T=D7*a+A7*Math.abs(D),D+=$*l+I*s-(A*c+E*u),D>=T||-D>=T))return D;b=s*I,f=Ot*s,d=f-(f-s),p=s-d,f=Ot*I,g=f-(f-I),m=I-g,_=p*m-(b-d*g-p*g-d*m),w=u*E,f=Ot*u,d=f-(f-u),p=u-d,f=Ot*E,g=f-(f-E),m=E-g,S=p*m-(w-d*g-p*g-d*m),y=_-S,h=_-y,Ht[0]=_-(y+h)+(h-S),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-w,h=v-y,Ht[1]=v-(y+h)+(h-w),k=x+y,h=k-x,Ht[2]=x-(k-h)+(y-h),Ht[3]=k;const C=Dl(4,Ur,4,Ht,v1);b=$*l,f=Ot*$,d=f-(f-$),p=$-d,f=Ot*l,g=f-(f-l),m=l-g,_=p*m-(b-d*g-p*g-d*m),w=A*c,f=Ot*A,d=f-(f-A),p=A-d,f=Ot*c,g=f-(f-c),m=c-g,S=p*m-(w-d*g-p*g-d*m),y=_-S,h=_-y,Ht[0]=_-(y+h)+(h-S),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-w,h=v-y,Ht[1]=v-(y+h)+(h-w),k=x+y,h=k-x,Ht[2]=x-(k-h)+(y-h),Ht[3]=k;const P=Dl(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,_=p*m-(b-d*g-p*g-d*m),w=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-(w-d*g-p*g-d*m),y=_-S,h=_-y,Ht[0]=_-(y+h)+(h-S),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-w,h=v-y,Ht[1]=v-(y+h)+(h-w),k=x+y,h=k-x,Ht[2]=x-(k-h)+(y-h),Ht[3]=k;const R=Dl(P,x1,4,Ht,_1);return _1[R-1]}function rs(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)>=T7*c?u:-L7(t,e,n,r,i,o,c)}const w1=Math.pow(2,-52),is=new Uint32Array(512);class os{static from(e,n=R7,r=N7){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 os(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 $=0;$<a;$++){const E=e[2*$],A=e[2*$+1];E<s&&(s=E),A<u&&(u=A),E>c&&(c=E),A>l&&(l=A),this._ids[$]=$}const h=(s+c)/2,f=(u+l)/2;let d,p,g;for(let $=0,E=1/0;$<a;$++){const A=Ll(h,f,e[2*$],e[2*$+1]);A<E&&(d=$,E=A)}const m=e[2*d],y=e[2*d+1];for(let $=0,E=1/0;$<a;$++){if($===d)continue;const A=Ll(m,y,e[2*$],e[2*$+1]);A<E&&A>0&&(p=$,E=A)}let x=e[2*p],v=e[2*p+1],b=1/0;for(let $=0;$<a;$++){if($===d||$===p)continue;const E=C7(m,y,x,v,e[2*$],e[2*$+1]);E<b&&(g=$,b=E)}let _=e[2*g],w=e[2*g+1];if(b===1/0){for(let A=0;A<a;A++)this._dists[A]=e[2*A]-e[0]||e[2*A+1]-e[1];Br(this._ids,this._dists,0,a-1);const $=new Uint32Array(a);let E=0;for(let A=0,I=-1/0;A<a;A++){const D=this._ids[A],T=this._dists[D];T>I&&($[E++]=D,I=T)}this.hull=$.subarray(0,E),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(rs(m,y,x,v,_,w)<0){const $=p,E=x,A=v;p=g,x=_,v=w,g=$,_=E,w=A}const S=I7(m,y,x,v,_,w);this._cx=S.x,this._cy=S.y;for(let $=0;$<a;$++)this._dists[$]=Ll(e[2*$],e[2*$+1],S.x,S.y);Br(this._ids,this._dists,0,a-1),this._hullStart=d;let k=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(x,v)]=p,o[this._hashKey(_,w)]=g,this.trianglesLen=0,this._addTriangle(d,p,g,-1,-1,-1);for(let $=0,E,A;$<this._ids.length;$++){const I=this._ids[$],D=e[2*I],T=e[2*I+1];if($>0&&Math.abs(D-E)<=w1&&Math.abs(T-A)<=w1||(E=D,A=T,I===d||I===p||I===g))continue;let C=0;for(let N=0,z=this._hashKey(D,T);N<this._hashSize&&(C=o[(z+N)%this._hashSize],!(C!==-1&&C!==r[C]));N++);C=n[C];let P=C,R;for(;R=r[P],rs(D,T,e[2*P],e[2*P+1],e[2*R],e[2*R+1])>=0;)if(P=R,P===C){P=-1;break}if(P===-1)continue;let G=this._addTriangle(P,I,r[P],-1,-1,i[P]);i[I]=this._legalize(G+2),i[P]=G,k++;let M=r[P];for(;R=r[M],rs(D,T,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,k--,M=R;if(P===C)for(;R=n[P],rs(D,T,e[2*R],e[2*R+1],e[2*P],e[2*P+1])<0;)G=this._addTriangle(R,I,P,-1,i[P],i[R]),this._legalize(G+2),i[R]=G,r[P]=P,k--,P=R;this._hullStart=n[I]=P,r[P]=n[M]=I,r[I]=M,o[this._hashKey(D,T)]=I,o[this._hashKey(e[2*P],e[2*P+1])]=P}this.hull=new Uint32Array(k);for(let $=0,E=this._hullStart;$<k;$++)this.hull[$]=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(E7(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=is[--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(k7(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 v=this._hullStart;do{if(this._hullTri[v]===h){this._hullTri[v]=e;break}v=this._hullPrev[v]}while(v!==this._hullStart)}this._link(e,y),this._link(s,r[a]),this._link(a,h);const x=c+(s+1)%3;o<is.length&&(is[o++]=x)}else{if(o===0)break;e=is[--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 E7(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Ll(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function k7(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 C7(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 I7(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 Br(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?(Br(t,e,o,r),Br(t,e,n,a-1)):(Br(t,e,n,a-1),Br(t,e,o,r))}}function Ji(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function R7(t){return t[0]}function N7(t){return t[1]}const $1=1e-6;class Xn{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 El{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,x,v;g<y;g+=3,m+=2){const b=r[g]*2,_=r[g+1]*2,w=r[g+2]*2,S=e[b],k=e[b+1],$=e[_],E=e[_+1],A=e[w],I=e[w+1],D=$-S,T=E-k,C=A-S,P=I-k,R=(D*P-T*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-S)*P-(a-k)*C);x=(S+A)/2-G*P,v=(k+I)/2+G*C}else{const G=1/R,M=D*D+T*T,N=C*C+P*P;x=S+(P*M-T*N)*G,v=k+(D*N-C*M)*G}s[m]=x,s[m+1]=v}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 Xn: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],x=a[p+1];this._renderSegment(g,m,y,x,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 Xn: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 Xn: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 El;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,x;if(c===0){if((p=this._clipSegment(o,a,s,u,c,l))===null)continue;[g,m,y,x]=p}else{if((p=this._clipSegment(s,u,o,a,l,c))===null)continue;[y,x,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,x),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(y,x):i=[y,x]}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 F7=2*Math.PI,Yr=Math.pow;function G7(t){return t[0]}function z7(t){return t[1]}function O7(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 U7(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class kl{static from(e,n=G7,r=z7,i){return new kl("length"in e?B7(e,n,r,i):Float64Array.from(Y7(e,n,r,i)))}constructor(e){this._delaunator=new os(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&&O7(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=U7(n[2*f],n[2*f+1],h);n[2*f]=p[0],n[2*f+1]=p[1]}this._delaunator=new os(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=Yr(n-c[e*2],2)+Yr(r-c[e*2+1],2);const f=i[e];let d=f;do{let p=u[d];const g=Yr(n-c[p*2],2)+Yr(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&&Yr(n-c[d*2],2)+Yr(r-c[d*2+1],2)<h)return d;break}}while(d!==f);return l}render(e){const n=e==null?e=new Xn: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 Xn: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,F7)}return r&&r.value()}renderHull(e){const n=e==null?e=new Xn: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 El;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new Xn: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 El;return this.renderTriangle(e,n),n.value()}}function B7(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*Y7(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={},Cl={},Il=34,to=10,Rl=13;function M1(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function H7(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 W7(t){return t<0?"-"+ne(-t,6):t>9999?"+"+ne(t,6):ne(t,4)}function q7(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":W7(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 as(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?H7(m,f):M1(m)});return g.columns=p||[],g}function i(h,f){var d=[],p=h.length,g=0,m=0,y,x=p<=0,v=!1;h.charCodeAt(p-1)===to&&--p,h.charCodeAt(p-1)===Rl&&--p;function b(){if(x)return Cl;if(v)return v=!1,A1;var w,S=g,k;if(h.charCodeAt(S)===Il){for(;g++<p&&h.charCodeAt(g)!==Il||h.charCodeAt(++g)===Il;);return(w=g)>=p?x=!0:(k=h.charCodeAt(g++))===to?v=!0:k===Rl&&(v=!0,h.charCodeAt(g)===to&&++g),h.slice(S+1,w-1).replace(/""/g,'"')}for(;g<p;){if((k=h.charCodeAt(w=g++))===to)v=!0;else if(k===Rl)v=!0,h.charCodeAt(g)===to&&++g;else if(k!==n)continue;return h.slice(S,w)}return x=!0,h.slice(S,p)}for(;(y=b())!==Cl;){for(var _=[];y!==A1&&y!==Cl;)_.push(y),y=b();f&&(_=f(_,m++))==null||d.push(_)}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(`
5
+ `):"",this.name="UnsubscriptionError",this.errors=e}});function ca(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var $i=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=xr(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(Tt(l))try{l()}catch(g){o=g instanceof mc?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=xr(h),p=f.next();!p.done;p=f.next()){var d=p.value;try{Ud(d)}catch(g){o=o??[],g instanceof mc?o=wi(wi([],_i(o)),_i(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new mc(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Ud(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)&&ca(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&ca(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),zd=$i.EMPTY;function Od(t){return t instanceof $i||t&&"closed"in t&&Tt(t.remove)&&Tt(t.add)&&Tt(t.unsubscribe)}function Ud(t){Tt(t)?t():t.unsubscribe()}var Bd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},C3={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,wi([t,e],_i(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Yd(t){C3.setTimeout(function(){throw t})}function yc(){}function la(t){t()}var bc=function(t){je(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Od(n)&&n.add(r)):r.destination=I3,r}return e.create=function(n,r,i){return new Si(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}($i),E3=Function.prototype.bind;function vc(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){fa(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){fa(r)}else fa(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){fa(n)}},t}(),Si=function(t){je(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Tt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Bd.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&vc(n.next,s),error:n.error&&vc(n.error,s),complete:n.complete&&vc(n.complete,s)}):a=n}return o.destination=new k3(a),o}return e}(bc);function fa(t){Yd(t)}function R3(t){throw t}var I3={closed:!0,next:yc,error:R3,complete:yc},xc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function _c(t){return t}function N3(t){return t.length===0?_c:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var Se=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=G3(e)?e:new Si(e,n,r);return la(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=Hd(n),new n(function(i,o){var a=new Si({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[xc]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return N3(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Hd(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 Hd(t){var e;return(e=t??Bd.Promise)!==null&&e!==void 0?e:Promise}function F3(t){return t&&Tt(t.next)&&Tt(t.error)&&Tt(t.complete)}function G3(t){return t&&t instanceof bc||F3(t)&&Od(t)}function z3(t){return Tt(t==null?void 0:t.lift)}function ln(t){return function(e){if(z3(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 wr(t,e,n,r,i){return new O3(t,e,n,r,i)}var O3=function(t){je(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}(bc),U3=gc(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ai=function(t){je(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 Wd(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new U3},e.prototype.next=function(n){var r=this;la(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=xr(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;la(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;la(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?zd:(this.currentObservers=null,s.push(n),new $i(function(){r.currentObservers=null,ca(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 Se;return n.source=this,n},e.create=function(n,r){return new Wd(n,r)},e}(Se),Wd=function(t){je(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:zd},e}(Ai),wc={now:function(){return(wc.delegate||Date).now()},delegate:void 0},B3=function(t){je(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=wc);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}(Ai),Y3=function(t){je(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}($i),qd={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,wi([t,e],_i(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},H3=function(t){je(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),qd.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&&qd.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,ca(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(Y3),jd=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=wc.now,t}(),W3=function(t){je(e,t);function e(n,r){r===void 0&&(r=jd.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}(jd);new W3(H3);function q3(t){return t&&Tt(t.schedule)}function j3(t){return t[t.length-1]}function Xd(t){return q3(j3(t))?t.pop():void 0}var Vd=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Zd(t){return Tt(t==null?void 0:t.then)}function Kd(t){return Tt(t[xc])}function Qd(t){return Symbol.asyncIterator&&Tt(t==null?void 0:t[Symbol.asyncIterator])}function Jd(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 tg=X3();function eg(t){return Tt(t==null?void 0:t[tg])}function ng(t){return T3(this,arguments,function(){var e,n,r,i;return Gd(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,_r(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,_r(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,_r(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 rg(t){return Tt(t==null?void 0:t.getReader)}function fn(t){if(t instanceof Se)return t;if(t!=null){if(Kd(t))return V3(t);if(Vd(t))return Z3(t);if(Zd(t))return K3(t);if(Qd(t))return ig(t);if(eg(t))return Q3(t);if(rg(t))return J3(t)}throw Jd(t)}function V3(t){return new Se(function(e){var n=t[xc]();if(Tt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Z3(t){return new Se(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function K3(t){return new Se(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Yd)})}function Q3(t){return new Se(function(e){var n,r;try{for(var i=xr(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 ig(t){return new Se(function(e){tA(t,e).catch(function(n){return e.error(n)})})}function J3(t){return ig(ng(t))}function tA(t,e){var n,r,i,o;return D3(this,void 0,void 0,function(){var a,s;return Gd(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=L3(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 og(t,e){return e===void 0&&(e=0),ln(function(n,r){n.subscribe(wr(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 ag(t,e){return e===void 0&&(e=0),ln(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function eA(t,e){return fn(t).pipe(ag(e),og(e))}function nA(t,e){return fn(t).pipe(ag(e),og(e))}function rA(t,e){return new Se(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function iA(t,e){return new Se(function(n){var r;return Cn(n,e,function(){r=t[tg](),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 Tt(r==null?void 0:r.return)&&r.return()}})}function sg(t,e){if(!t)throw new Error("Iterable cannot be null");return new Se(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 oA(t,e){return sg(ng(t),e)}function aA(t,e){if(t!=null){if(Kd(t))return eA(t,e);if(Vd(t))return rA(t,e);if(Zd(t))return nA(t,e);if(Qd(t))return sg(t,e);if(eg(t))return iA(t,e);if(rg(t))return oA(t,e)}throw Jd(t)}function sA(t,e){return e?aA(t,e):fn(t)}gc(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function ha(t,e){return ln(function(n,r){var i=0;n.subscribe(wr(r,function(o){r.next(t.call(e,o,i++))}))})}function uA(t,e,n,r,i,o,a,s){var u=[],c=0,l=0,h=!1,f=function(){h&&!u.length&&!c&&e.complete()},p=function(g){return c<r?d(g):u.push(g)},d=function(g){c++;var m=!1;fn(n(g,l++)).subscribe(wr(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var x=u.shift();a||d(x)};u.length&&c<r;)y();f()}catch(x){e.error(x)}}))};return t.subscribe(wr(e,p,function(){h=!0,f()})),function(){}}function ug(t,e,n){return n===void 0&&(n=1/0),Tt(e)?ug(function(r,i){return ha(function(o,a){return e(r,o,i,a)})(fn(t(r,i)))},n):(typeof e=="number"&&(n=e),ln(function(r,i){return uA(r,i,t,n)}))}function cA(t){return ug(_c,t)}function lA(){return cA(1)}function cg(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return lA()(sA(t,Xd(t)))}function fA(t,e){return e===void 0&&(e=_c),t=t??hA,ln(function(n,r){var i,o=!0;n.subscribe(wr(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function hA(t,e){return t===e}function pA(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new Ai}: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,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,d=g=!1},x=function(){var v=l;y(),v==null||v.unsubscribe()};return ln(function(v,b){p++,!g&&!d&&m();var $=f=f??n();b.add(function(){p--,p===0&&!g&&!d&&(h=$c(x,u))}),$.subscribe(b),!l&&p>0&&(l=new Si({next:function(_){return $.next(_)},error:function(_){g=!0,m(),h=$c(y,i,_),$.error(_)},complete:function(){d=!0,m(),h=$c(y,a),$.complete()}}),fn(v).subscribe(l))})(c)}}function $c(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 Si({next:function(){i.unsubscribe(),t()}});return fn(e.apply(void 0,wi([],_i(n)))).subscribe(i)}}function dA(t,e,n){var r,i=!1;return r=t,pA({connector:function(){return new B3(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function gA(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Xd(t);return ln(function(r,i){(n?cg(t,r,n):cg(t,r)).subscribe(i)})}function mA(t){return ln(function(e,n){fn(t).subscribe(wr(n,function(){return n.complete()},yc)),!n.closed&&e.subscribe(n)})}const yA=t=>t.pipe(ha(e=>e.styles.textSize),fA(),ha(e=>{let n=NaN;if(typeof e=="string")if(e.includes("rem")){const r=parseFloat(getComputedStyle(document.documentElement).fontSize);n=parseFloat(e)*r}else e.includes("px")&&(n=parseFloat(e));else if(typeof e=="number")return e;return n||14})),lg=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=dr.scaleDomain,scaleRange:i=dr.scaleRange})=>{const o=r[0]??dr.scaleDomain[0],a=r[1]??dr.scaleDomain[1],s=i[0]??dr.scaleRange[0],u=i[1]??dr.scaleRange[1],c=o==="auto"?e:o,l=a==="auto"?t:a,h=t-(t-c)/(1-s),f=l/u;return Nd().domain([h,f]).range([0,n])},fg=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return b3().domain(t).range(r).padding(n)},bA=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),Fd().domain([-0,e+0]).range(i)};function vA({name:t,defaultParams:e,initFn:n}){const r=new Ai,i=new Ai,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=pc(c,e)},setContext:c=>{s=c,s.observer.fullParams$=i.pipe(mA(r),gA({}),ha(l=>pc(l,u)),dA(1))}}}const Mi=()=>function(t,e){return function(n){return class{constructor(){const r=vA({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}}}},Pi=Mi(),se=Mi(),ke=Mi(),hg=Mi(),pg=Mi();function _t(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function dg(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===dg?t:xA,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 xA(){return 0}function da(t){return t===null?NaN:+t}function*_A(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 gg=pa(_t),mg=gg.right,wA=gg.left,$A=pa(da).center,En=mg;function SA(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=Sc(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 yg=bg(Sc),AA=bg(MA);function bg(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 MA(t){const e=Sc(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 Sc(t){const e=Math.floor(t);if(e===t)return PA(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,p=a+l;f<p;f+=u)c+=o[Math.min(s,f)];for(let f=a,p=s;f<=p;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 PA(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 ga(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 DA(t){return t.length|0}function TA(t){return!(t>0)}function LA(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function CA(t){return e=>t(...e)}function EA(...t){const e=typeof t[t.length-1]=="function"&&CA(t.pop());t=t.map(LA);const n=t.map(DA),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(TA))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 kA(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 vg(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 xg(t,e){const n=vg(t,e);return n&&Math.sqrt(n)}function Di(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 Lt{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 RA(t,e){const n=new Lt;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 IA(t,e){const n=new Lt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class Ti extends Map{constructor(e,n=$g){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(Ac(this,e))}has(e){return super.has(Ac(this,e))}set(e,n){return super.set(_g(this,e),n)}delete(e){return super.delete(wg(this,e))}}class kn extends Set{constructor(e,n=$g){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(Ac(this,e))}add(e){return super.add(_g(this,e))}delete(e){return super.delete(wg(this,e))}}function Ac({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function _g({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function wg({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function $g(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Ar(t){return t}function Sg(t,...e){return Mr(t,Ar,Ar,e)}function Ag(t,...e){return Mr(t,Array.from,Ar,e)}function Mg(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 NA(t,...e){return Mg(Ag(t,...e),e)}function FA(t,e,...n){return Mg(Dg(t,e,...n),n)}function Pg(t,e,...n){return Mr(t,Ar,e,n)}function Dg(t,e,...n){return Mr(t,Array.from,e,n)}function GA(t,...e){return Mr(t,Ar,Tg,e)}function zA(t,...e){return Mr(t,Array.from,Tg,e)}function Tg(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 Ti,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 Lg(t,e){return Array.from(e,n=>t[n])}function Mc(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=Pr(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>Pr(n[i],n[o]))),Lg(t,r)}return t.sort(Pc(n))}function Pc(t=_t){if(t===_t)return Pr;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 Pr(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function OA(t,e,n){return(e.length!==2?Mc(Pg(t,e,n),([r,i],[o,a])=>_t(i,a)||_t(r,o)):Mc(Sg(t,n),([r,i],[o,a])=>e(i,a)||_t(r,o))).map(([r])=>r)}var UA=Array.prototype,BA=UA.slice;function Dc(t){return()=>t}const YA=Math.sqrt(50),HA=Math.sqrt(10),WA=Math.sqrt(2);function ma(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>=YA?10:o>=HA?5:o>=WA?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?ma(t,e,n*2):[s,u,c]}function Rn(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?ma(e,t,n):ma(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 In(t,e,n){return e=+e,t=+t,n=+n,ma(t,e,n)[2]}function ya(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?In(e,t,n):In(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Tc(t,e,n){let r;for(;;){const i=In(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 Lc(t){return Math.max(1,Math.ceil(Math.log(ga(t))/Math.LN2)+1)}function Cg(){var t=Ar,e=Di,n=Lc;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],p=n(c,h,f);if(!Array.isArray(p)){const v=f,b=+p;if(e===Di&&([h,f]=Tc(h,f,b)),p=Rn(h,f,b),p[0]<=h&&(u=In(h,f,b)),p[p.length-1]>=f)if(v>=f&&e===Di){const $=In(h,f,b);isFinite($)&&($>0?f=(Math.floor(f/$)+1)*$:$<0&&(f=(Math.ceil(f*-$)+1)/-$))}else p.pop()}for(var d=p.length,g=0,m=d;p[g]<=h;)++g;for(;p[m-1]>f;)--m;(g||m<d)&&(p=p.slice(g,m),d=m-g);var y=new Array(d+1),x;for(o=0;o<=d;++o)x=y[o]=[],x.x0=o>0?p[o-1]:h,x.x1=o<d?p[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(d,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 v=Math.floor((h-s)*u);y[Math.min(d,v+(p[v]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[En(p,s,0,d)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Dc(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Dc([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Dc(Array.isArray(i)?BA.call(i):i),r):n},r}function Li(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 Cc(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 ba(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 Ec(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,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?Pr:Pc(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),p=Math.max(n,Math.floor(e-c*h/u+f)),d=Math.min(r,Math.floor(e+(u-c)*h/u+f));va(t,e,p,d,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 Eg(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 Ei(t,e,n){if(t=Float64Array.from(_A(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return ba(t);if(e>=1)return Li(t);var r,i=(r-1)*e,o=Math.floor(i),a=Li(va(t,o).subarray(0,o+1)),s=ba(t.subarray(o+1));return a+(s-a)*(i-o)}}function kg(t,e,n=da){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 Rg(t,e,n=da){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>da(n(t[u],u,t))),e<=0)return Ec(r);if(e>=1)return Cc(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return va(i,a,0,o,(s,u)=>Pr(r[s],r[u])),a=Eg(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function qA(t,e,n){const r=ga(t),i=Ei(t,.75)-Ei(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function jA(t,e,n){const r=ga(t),i=xg(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function XA(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 VA(t,e){return Ei(t,.5,e)}function ZA(t,e){return Rg(t,.5,e)}function*KA(t){for(const e of t)yield*e}function kc(t){return Array.from(KA(t))}function QA(t,e){const n=new Ti;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 JA(t,e=t5){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function t5(t,e){return[t,e]}function hn(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 e5(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)=>Pr(n[s],n[u]):Pc(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 n5(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 Ig(t,e=_t){if(e.length===1)return Ec(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 r5(t,e=_t){if(e.length===1)return Cc(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 i5(t,e){const n=Ig(t,e);return n<0?void 0:n}const o5=Ng(Math.random);function Ng(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 a5(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 Fg(t){if(!(o=t.length))return[];for(var e=-1,n=ba(t,s5),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 s5(t){return t.length}function u5(){return Fg(arguments)}function c5(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 l5(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 f5(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 h5(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 p5(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 d5(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function g5(t,...e){t=new kn(t);for(const n of e)for(const r of n)t.delete(r);return t}function m5(t,e){const n=e[Symbol.iterator](),r=new kn;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 y5(t,...e){t=new kn(t),e=e.map(b5);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function b5(t){return t instanceof kn?t:new kn(t)}function Gg(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=zg(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const u=zg(a);if(r.add(u),Object.is(o,u))break}}return!0}function zg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function v5(t,e){return Gg(e,t)}function x5(...t){const e=new kn;for(const n of t)for(const r of n)e.add(r);return e}function _5(t){return t}var xa=1,_a=2,Rc=3,ki=4,Og=1e-6;function w5(t){return"translate("+t+",0)"}function $5(t){return"translate(0,"+t+")"}function S5(t){return e=>+t(e)}function A5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function M5(){return!this.__axis}function wa(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===xa||t===ki?-1:1,l=t===ki||t===_a?"x":"y",h=t===xa||t===Rc?w5:$5;function f(p){var d=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):_5),m=Math.max(o,0)+s,y=e.range(),x=+y[0]+u,v=+y[y.length-1]+u,b=(e.bandwidth?A5:S5)(e.copy(),u),$=p.selection?p.selection():p,_=$.selectAll(".domain").data([null]),P=$.selectAll(".tick").data(d,e).order(),T=P.exit(),w=P.enter().append("g").attr("class","tick"),D=P.select("line"),S=P.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),P=P.merge(w),D=D.merge(w.append("line").attr("stroke","currentColor").attr(l+"2",c*o)),S=S.merge(w.append("text").attr("fill","currentColor").attr(l,c*m).attr("dy",t===xa?"0em":t===Rc?"0.71em":"0.32em")),p!==$&&(_=_.transition(p),P=P.transition(p),D=D.transition(p),S=S.transition(p),T=T.transition(p).attr("opacity",Og).attr("transform",function(G){return isFinite(G=b(G))?h(G+u):this.getAttribute("transform")}),w.attr("opacity",Og).attr("transform",function(G){var k=this.parentNode.__axis;return h((k&&isFinite(k=k(G))?k:b(G))+u)})),T.remove(),_.attr("d",t===ki||t===_a?a?"M"+c*a+","+x+"H"+u+"V"+v+"H"+c*a:"M"+u+","+x+"V"+v:a?"M"+x+","+c*a+"V"+u+"H"+v+"V"+c*a:"M"+x+","+u+"H"+v),P.attr("opacity",1).attr("transform",function(G){return h(b(G)+u)}),D.attr(l+"2",c*o),S.attr(l,c*m).text(g),$.filter(M5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===_a?"start":t===ki?"end":"middle"),$.each(function(){this.__axis=b})}return f.scale=function(p){return arguments.length?(e=p,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),f):n.slice()},f.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),f):r&&r.slice()},f.tickFormat=function(p){return arguments.length?(i=p,f):i},f.tickSize=function(p){return arguments.length?(o=a=+p,f):o},f.tickSizeInner=function(p){return arguments.length?(o=+p,f):o},f.tickSizeOuter=function(p){return arguments.length?(a=+p,f):a},f.tickPadding=function(p){return arguments.length?(s=+p,f):s},f.offset=function(p){return arguments.length?(u=+p,f):u},f}function Ug(t){return wa(xa,t)}function P5(t){return wa(_a,t)}function D5(t){return wa(Rc,t)}function Bg(t){return wa(ki,t)}var T5={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 $a(n)}function $a(t){this._=t}function L5(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}})}$a.prototype=Nn.prototype={constructor:$a,on:function(t,e){var n=this._,r=L5(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=C5(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]=Yg(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Yg(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 $a(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 C5(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Yg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=T5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Ic="http://www.w3.org/1999/xhtml";const Nc={svg:"http://www.w3.org/2000/svg",xhtml:Ic,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ri(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Nc.hasOwnProperty(e)?{space:Nc[e],local:t}:t}function E5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ic&&e.documentElement.namespaceURI===Ic?e.createElement(t):e.createElementNS(n,t)}}function k5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Sa(t){var e=Ri(t);return(e.local?k5:E5)(e)}function R5(){}function Aa(t){return t==null?R5:function(){return this.querySelector(t)}}function I5(t){typeof t!="function"&&(t=Aa(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 Ht(r,this._parents)}function Hg(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function N5(){return[]}function Fc(t){return t==null?N5:function(){return this.querySelectorAll(t)}}function F5(t){return function(){return Hg(t.apply(this,arguments))}}function G5(t){typeof t=="function"?t=F5(t):t=Fc(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 Ht(r,i)}function Gc(t){return function(){return this.matches(t)}}function Wg(t){return function(e){return e.matches(t)}}var z5=Array.prototype.find;function O5(t){return function(){return z5.call(this.children,t)}}function U5(){return this.firstElementChild}function B5(t){return this.select(t==null?U5:O5(typeof t=="function"?t:Wg(t)))}var Y5=Array.prototype.filter;function H5(){return Array.from(this.children)}function W5(t){return function(){return Y5.call(this.children,t)}}function q5(t){return this.selectAll(t==null?H5:W5(typeof t=="function"?t:Wg(t)))}function j5(t){typeof t!="function"&&(t=Gc(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 Ht(r,this._parents)}function qg(t){return new Array(t.length)}function X5(){return new Ht(this._enter||this._groups.map(qg),this._parents)}function Ma(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ma.prototype={constructor:Ma,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 V5(t){return function(){return t}}function Z5(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 Ma(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function K5(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),p;for(s=0;s<l;++s)(u=e[s])&&(f[s]=p=a.call(u,u.__data__,s,e)+"",c.has(p)?i[s]=u:c.set(p,u));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(u=c.get(p))?(r[s]=u,u.__data__=o[s],c.delete(p)):n[s]=new Ma(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function Q5(t){return t.__data__}function J5(t,e){if(!arguments.length)return Array.from(this,Q5);var n=e?K5:Z5,r=this._parents,i=this._groups;typeof t!="function"&&(t=V5(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,p=t6(t.call(l,l&&l.__data__,c,r)),d=p.length,g=s[c]=new Array(d),m=a[c]=new Array(d),y=u[c]=new Array(f);n(l,h,g,m,y,p,e);for(var x=0,v=0,b,$;x<d;++x)if(b=g[x]){for(x>=v&&(v=x+1);!($=m[v])&&++v<d;);b._next=$||null}}return a=new Ht(a,r),a._enter=s,a._exit=u,a}function t6(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function e6(){return new Ht(this._exit||this._groups.map(qg),this._parents)}function n6(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 r6(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),p,d=0;d<h;++d)(p=c[d]||l[d])&&(f[d]=p);for(;u<i;++u)s[u]=n[u];return new Ht(s,this._parents)}function i6(){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 o6(t){t||(t=a6);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 Ht(i,this._parents).order()}function a6(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function s6(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function u6(){return Array.from(this)}function c6(){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 l6(){let t=0;for(const e of this)++t;return t}function f6(){return!this.node()}function h6(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 p6(t){return function(){this.removeAttribute(t)}}function d6(t){return function(){this.removeAttributeNS(t.space,t.local)}}function g6(t,e){return function(){this.setAttribute(t,e)}}function m6(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function y6(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function b6(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 v6(t,e){var n=Ri(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?d6:p6:typeof e=="function"?n.local?b6:y6:n.local?m6:g6)(n,e))}function zc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function x6(t){return function(){this.style.removeProperty(t)}}function _6(t,e,n){return function(){this.style.setProperty(t,e,n)}}function w6(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function $6(t,e,n){return arguments.length>1?this.each((e==null?x6:typeof e=="function"?w6:_6)(t,e,n??"")):Fn(this.node(),t)}function Fn(t,e){return t.style.getPropertyValue(e)||zc(t).getComputedStyle(t,null).getPropertyValue(e)}function S6(t){return function(){delete this[t]}}function A6(t,e){return function(){this[t]=e}}function M6(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function P6(t,e){return arguments.length>1?this.each((e==null?S6:typeof e=="function"?M6:A6)(t,e)):this.node()[t]}function jg(t){return t.trim().split(/^|\s+/)}function Oc(t){return t.classList||new Xg(t)}function Xg(t){this._node=t,this._names=jg(t.getAttribute("class")||"")}Xg.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 Vg(t,e){for(var n=Oc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Zg(t,e){for(var n=Oc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function D6(t){return function(){Vg(this,t)}}function T6(t){return function(){Zg(this,t)}}function L6(t,e){return function(){(e.apply(this,arguments)?Vg:Zg)(this,t)}}function C6(t,e){var n=jg(t+"");if(arguments.length<2){for(var r=Oc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?L6:e?D6:T6)(n,e))}function E6(){this.textContent=""}function k6(t){return function(){this.textContent=t}}function R6(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function I6(t){return arguments.length?this.each(t==null?E6:(typeof t=="function"?R6:k6)(t)):this.node().textContent}function N6(){this.innerHTML=""}function F6(t){return function(){this.innerHTML=t}}function G6(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function z6(t){return arguments.length?this.each(t==null?N6:(typeof t=="function"?G6:F6)(t)):this.node().innerHTML}function O6(){this.nextSibling&&this.parentNode.appendChild(this)}function U6(){return this.each(O6)}function B6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Y6(){return this.each(B6)}function H6(t){var e=typeof t=="function"?t:Sa(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function W6(){return null}function q6(t,e){var n=typeof t=="function"?t:Sa(t),r=e==null?W6:typeof e=="function"?e:Aa(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function j6(){var t=this.parentNode;t&&t.removeChild(this)}function X6(){return this.each(j6)}function V6(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Z6(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function K6(t){return this.select(t?Z6:V6)}function Q6(t){return arguments.length?this.property("__data__",t):this.node().__data__}function J6(t){return function(e){t.call(this,e,this.__data__)}}function t8(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 e8(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 n8(t,e,n){return function(){var r=this.__on,i,o=J6(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 r8(t,e,n){var r=t8(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?n8:e8,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Kg(t,e,n){var r=zc(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 i8(t,e){return function(){return Kg(this,t,e)}}function o8(t,e){return function(){return Kg(this,t,e.apply(this,arguments))}}function a8(t,e){return this.each((typeof e=="function"?o8:i8)(t,e))}function*s8(){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 Uc=[null];function Ht(t,e){this._groups=t,this._parents=e}function Gn(){return new Ht([[document.documentElement]],Uc)}function u8(){return this}Ht.prototype=Gn.prototype={constructor:Ht,select:I5,selectAll:G5,selectChild:B5,selectChildren:q5,filter:j5,data:J5,enter:X5,exit:e6,join:n6,merge:r6,selection:u8,order:i6,sort:o6,call:s6,nodes:u6,node:c6,size:l6,empty:f6,each:h6,attr:v6,style:$6,property:P6,classed:C6,text:I6,html:z6,raise:U6,lower:Y6,append:H6,insert:q6,remove:X6,clone:K6,datum:Q6,on:r8,dispatch:a8,[Symbol.iterator]:s8};function Z(t){return typeof t=="string"?new Ht([[document.querySelector(t)]],[document.documentElement]):new Ht([[t]],Uc)}function c8(t){return Z(Sa(t).call(document.documentElement))}var l8=0;function Qg(){return new Bc}function Bc(){this._="@"+(++l8).toString(36)}Bc.prototype=Qg.prototype={constructor:Bc,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 ue(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 f8(t,e){return t.target&&(t=Jg(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>ue(n,e))}function h8(t){return typeof t=="string"?new Ht([document.querySelectorAll(t)],[document.documentElement]):new Ht([Hg(t)],Uc)}const p8={passive:!1},Ii={capture:!0,passive:!1};function Yc(t){t.stopImmediatePropagation()}function Dr(t){t.preventDefault(),t.stopImmediatePropagation()}function Pa(t){var e=t.document.documentElement,n=Z(t).on("dragstart.drag",Dr,Ii);"onselectstart"in e?n.on("selectstart.drag",Dr,Ii):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Da(t,e){var n=t.document.documentElement,r=Z(t).on("dragstart.drag",null);e&&(r.on("click.drag",Dr,Ii),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 Ta=t=>()=>t;function Hc(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}})}Hc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function d8(t){return!t.ctrlKey&&!t.button}function g8(){return this.parentNode}function m8(t,e){return e??{x:t.x,y:t.y}}function y8(){return navigator.maxTouchPoints||"ontouchstart"in this}function t0(){var t=d8,e=g8,n=m8,r=y8,i={},o=Nn("start","drag","end"),a=0,s,u,c,l,h=0;function f(b){b.on("mousedown.drag",p).filter(r).on("touchstart.drag",m).on("touchmove.drag",y,p8).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(b,$){if(!(l||!t.call(this,b,$))){var _=v(this,e.call(this,b,$),b,$,"mouse");_&&(Z(b.view).on("mousemove.drag",d,Ii).on("mouseup.drag",g,Ii),Pa(b.view),Yc(b),c=!1,s=b.clientX,u=b.clientY,_("start",b))}}function d(b){if(Dr(b),!c){var $=b.clientX-s,_=b.clientY-u;c=$*$+_*_>h}i.mouse("drag",b)}function g(b){Z(b.view).on("mousemove.drag mouseup.drag",null),Da(b.view,c),Dr(b),i.mouse("end",b)}function m(b,$){if(t.call(this,b,$)){var _=b.changedTouches,P=e.call(this,b,$),T=_.length,w,D;for(w=0;w<T;++w)(D=v(this,P,b,$,_[w].identifier,_[w]))&&(Yc(b),D("start",b,_[w]))}}function y(b){var $=b.changedTouches,_=$.length,P,T;for(P=0;P<_;++P)(T=i[$[P].identifier])&&(Dr(b),T("drag",b,$[P]))}function x(b){var $=b.changedTouches,_=$.length,P,T;for(l&&clearTimeout(l),l=setTimeout(function(){l=null},500),P=0;P<_;++P)(T=i[$[P].identifier])&&(Yc(b),T("end",b,$[P]))}function v(b,$,_,P,T,w){var D=o.copy(),S=ue(w||_,$),G,k,A;if((A=n.call(b,new Hc("beforestart",{sourceEvent:_,target:f,identifier:T,active:a,x:S[0],y:S[1],dx:0,dy:0,dispatch:D}),P))!=null)return G=A.x-S[0]||0,k=A.y-S[1]||0,function L(M,F,O){var E=S,R;switch(M){case"start":i[T]=L,R=a++;break;case"end":delete i[T],--a;case"drag":S=ue(O||F,$),R=a;break}D.call(M,b,new Hc(M,{sourceEvent:F,subject:A,target:f,identifier:T,active:R,x:S[0]+G,y:S[1]+k,dx:S[0]-E[0],dy:S[1]-E[1],dispatch:D}),P)}}return f.filter=function(b){return arguments.length?(t=typeof b=="function"?b:Ta(!!b),f):t},f.container=function(b){return arguments.length?(e=typeof b=="function"?b:Ta(b),f):e},f.subject=function(b){return arguments.length?(n=typeof b=="function"?b:Ta(b),f):n},f.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:Ta(!!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 Tr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ni(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function pn(){}var zn=.7,Lr=1/zn,Cr="\\s*([+-]?\\d+)\\s*",Fi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",b8=/^#([0-9a-f]{3,8})$/,v8=new RegExp(`^rgb\\(${Cr},${Cr},${Cr}\\)$`),x8=new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`),_8=new RegExp(`^rgba\\(${Cr},${Cr},${Cr},${Fi}\\)$`),w8=new RegExp(`^rgba\\(${Re},${Re},${Re},${Fi}\\)$`),$8=new RegExp(`^hsl\\(${Fi},${Re},${Re}\\)$`),S8=new RegExp(`^hsla\\(${Fi},${Re},${Re},${Fi}\\)$`),e0={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};Tr(pn,dn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:n0,formatHex:n0,formatHex8:A8,formatHsl:M8,formatRgb:r0,toString:r0});function n0(){return this.rgb().formatHex()}function A8(){return this.rgb().formatHex8()}function M8(){return u0(this).formatHsl()}function r0(){return this.rgb().formatRgb()}function dn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=b8.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?i0(e):n===3?new kt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?La(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?La(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=v8.exec(t))?new kt(e[1],e[2],e[3],1):(e=x8.exec(t))?new kt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=_8.exec(t))?La(e[1],e[2],e[3],e[4]):(e=w8.exec(t))?La(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=$8.exec(t))?s0(e[1],e[2]/100,e[3]/100,1):(e=S8.exec(t))?s0(e[1],e[2]/100,e[3]/100,e[4]):e0.hasOwnProperty(t)?i0(e0[t]):t==="transparent"?new kt(NaN,NaN,NaN,0):null}function i0(t){return new kt(t>>16&255,t>>8&255,t&255,1)}function La(t,e,n,r){return r<=0&&(t=e=n=NaN),new kt(t,e,n,r)}function Wc(t){return t instanceof pn||(t=dn(t)),t?(t=t.rgb(),new kt(t.r,t.g,t.b,t.opacity)):new kt}function Er(t,e,n,r){return arguments.length===1?Wc(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}Tr(kt,Er,Ni(pn,{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),Ca(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:o0,formatHex:o0,formatHex8:P8,formatRgb:a0,toString:a0}));function o0(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}`}function P8(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}${Un((isNaN(this.opacity)?1:this.opacity)*255)}`}function a0(){const t=Ca(this.opacity);return`${t===1?"rgb(":"rgba("}${On(this.r)}, ${On(this.g)}, ${On(this.b)}${t===1?")":`, ${t})`}`}function Ca(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 s0(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ae(t,e,n,r)}function u0(t){if(t instanceof Ae)return new Ae(t.h,t.s,t.l,t.opacity);if(t instanceof pn||(t=dn(t)),!t)return new Ae;if(t instanceof Ae)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 Ae(a,s,u,t.opacity)}function Ea(t,e,n,r){return arguments.length===1?u0(t):new Ae(t,e,n,r??1)}function Ae(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Tr(Ae,Ea,Ni(pn,{brighter(t){return t=t==null?Lr:Math.pow(Lr,t),new Ae(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new Ae(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(qc(t>=240?t-240:t+120,i,r),qc(t,i,r),qc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ae(c0(this.h),ka(this.s),ka(this.l),Ca(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=Ca(this.opacity);return`${t===1?"hsl(":"hsla("}${c0(this.h)}, ${ka(this.s)*100}%, ${ka(this.l)*100}%${t===1?")":`, ${t})`}`}}));function c0(t){return t=(t||0)%360,t<0?t+360:t}function ka(t){return Math.max(0,Math.min(1,t||0))}function qc(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 l0=Math.PI/180,f0=180/Math.PI,Ra=18,h0=.96422,p0=1,d0=.82521,g0=4/29,kr=6/29,m0=3*kr*kr,D8=kr*kr*kr;function y0(t){if(t instanceof Me)return new Me(t.l,t.a,t.b,t.opacity);if(t instanceof Ie)return v0(t);t instanceof kt||(t=Wc(t));var e=Zc(t.r),n=Zc(t.g),r=Zc(t.b),i=jc((.2225045*e+.7168786*n+.0606169*r)/p0),o,a;return e===n&&n===r?o=a=i:(o=jc((.4360747*e+.3850649*n+.1430804*r)/h0),a=jc((.0139322*e+.0971045*n+.7141733*r)/d0)),new Me(116*i-16,500*(o-i),200*(i-a),t.opacity)}function T8(t,e){return new Me(t,0,0,e??1)}function Ia(t,e,n,r){return arguments.length===1?y0(t):new Me(t,e,n,r??1)}function Me(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Tr(Me,Ia,Ni(pn,{brighter(t){return new Me(this.l+Ra*(t??1),this.a,this.b,this.opacity)},darker(t){return new Me(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=h0*Xc(e),t=p0*Xc(t),n=d0*Xc(n),new kt(Vc(3.1338561*e-1.6168667*t-.4906146*n),Vc(-.9787684*e+1.9161415*t+.033454*n),Vc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function jc(t){return t>D8?Math.pow(t,1/3):t/m0+g0}function Xc(t){return t>kr?t*t*t:m0*(t-g0)}function Vc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Zc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function b0(t){if(t instanceof Ie)return new Ie(t.h,t.c,t.l,t.opacity);if(t instanceof Me||(t=y0(t)),t.a===0&&t.b===0)return new Ie(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*f0;return new Ie(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function L8(t,e,n,r){return arguments.length===1?b0(t):new Ie(n,e,t,r??1)}function Na(t,e,n,r){return arguments.length===1?b0(t):new Ie(t,e,n,r??1)}function Ie(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function v0(t){if(isNaN(t.h))return new Me(t.l,0,0,t.opacity);var e=t.h*l0;return new Me(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Tr(Ie,Na,Ni(pn,{brighter(t){return new Ie(this.h,this.c,this.l+Ra*(t??1),this.opacity)},darker(t){return new Ie(this.h,this.c,this.l-Ra*(t??1),this.opacity)},rgb(){return v0(this).rgb()}}));var x0=-.14861,Kc=1.78277,Qc=-.29227,Fa=-.90649,Gi=1.97294,_0=Gi*Fa,w0=Gi*Kc,$0=Kc*Qc-Fa*x0;function C8(t){if(t instanceof Bn)return new Bn(t.h,t.s,t.l,t.opacity);t instanceof kt||(t=Wc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=($0*r+_0*e-w0*n)/($0+_0-w0),o=r-i,a=(Gi*(n-i)-Qc*o)/Fa,s=Math.sqrt(a*a+o*o)/(Gi*i*(1-i)),u=s?Math.atan2(a,o)*f0-120:NaN;return new Bn(u<0?u+360:u,s,i,t.opacity)}function Pe(t,e,n,r){return arguments.length===1?C8(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}Tr(Bn,Pe,Ni(pn,{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)*l0,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*(x0*r+Kc*i)),255*(e+n*(Qc*r+Fa*i)),255*(e+n*(Gi*r)),this.opacity)}}));function S0(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 A0(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 S0((n-r/e)*e,a,i,o,s)}}function M0(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 S0((n-r/e)*e,i,o,a,s)}}const Ga=t=>()=>t;function P0(t,e){return function(n){return t+n*e}}function E8(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 za(t,e){var n=e-t;return n?P0(t,n>180||n<-180?n-360*Math.round(n/360):n):Ga(isNaN(t)?e:t)}function k8(t){return(t=+t)==1?Rt:function(e,n){return n-e?E8(e,n,t):Ga(isNaN(e)?n:e)}}function Rt(t,e){var n=e-t;return n?P0(t,n):Ga(isNaN(t)?e:t)}const zi=function t(e){var n=k8(e);function r(i,o){var a=n((i=Er(i)).r,(o=Er(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=Rt(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 D0(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=Er(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 T0=D0(A0),R8=D0(M0);function Jc(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 L0(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function I8(t,e){return(L0(e)?Jc:C0)(t,e)}function C0(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]=gn(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 E0(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function pe(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function k0(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]=gn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var tl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,el=new RegExp(tl.source,"g");function N8(t){return function(){return t}}function F8(t){return function(e){return t(e)+""}}function nl(t,e){var n=tl.lastIndex=el.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=tl.exec(t))&&(i=el.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:pe(r,i)})),n=el.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?F8(u[0].x):N8(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 gn(t,e){var n=typeof e,r;return e==null||n==="boolean"?Ga(e):(n==="number"?pe:n==="string"?(r=dn(e))?(e=r,zi):nl:e instanceof dn?zi:e instanceof Date?E0:L0(e)?Jc:Array.isArray(e)?C0:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?k0:pe)(t,e)}function G8(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function z8(t,e){var n=za(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Oa(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var R0=180/Math.PI,rl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function I0(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)*R0,skewX:Math.atan(u)*R0,scaleX:a,scaleY:s}}var Ua;function O8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?rl:I0(e.a,e.b,e.c,e.d,e.e,e.f)}function U8(t){return t==null||(Ua||(Ua=document.createElementNS("http://www.w3.org/2000/svg","g")),Ua.setAttribute("transform",t),!(t=Ua.transform.baseVal.consolidate()))?rl:(t=t.matrix,I0(t.a,t.b,t.c,t.d,t.e,t.f))}function N0(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,p,d){if(c!==h||l!==f){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:pe(c,h)},{i:g-2,x:pe(l,f)})}else(h||f)&&p.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:pe(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:pe(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,p,d){if(c!==h||l!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:pe(c,h)},{i:g-2,x:pe(l,f)})}else(h!==1||f!==1)&&p.push(i(p)+"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(p){for(var d=-1,g=f.length,m;++d<g;)h[(m=f[d]).i]=m.x(p);return h.join("")}}}var F0=N0(O8,"px, ","px)","deg)"),G0=N0(U8,", ",")",")"),B8=1e-12;function z0(t){return((t=Math.exp(t))+1/t)/2}function Y8(t){return((t=Math.exp(t))-1/t)/2}function H8(t){return((t=Math.exp(2*t))-1)/(t+1)}const O0=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],p=l-s,d=h-u,g=p*p+d*d,m,y;if(g<B8)y=Math.log(f/c)/e,m=function(P){return[s+P*p,u+P*d,c*Math.exp(e*P*y)]};else{var x=Math.sqrt(g),v=(f*f-c*c+r*g)/(2*c*n*x),b=(f*f-c*c-r*g)/(2*f*n*x),$=Math.log(Math.sqrt(v*v+1)-v),_=Math.log(Math.sqrt(b*b+1)-b);y=(_-$)/e,m=function(P){var T=P*y,w=z0($),D=c/(n*x)*(w*H8(e*T+$)-Y8($));return[s+D*p,u+D*d,c*w/z0(e*T+$)]}}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 U0(t){return function(e,n){var r=t((e=Ea(e)).h,(n=Ea(n)).h),i=Rt(e.s,n.s),o=Rt(e.l,n.l),a=Rt(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 W8=U0(za);var q8=U0(Rt);function j8(t,e){var n=Rt((t=Ia(t)).l,(e=Ia(e)).l),r=Rt(t.a,e.a),i=Rt(t.b,e.b),o=Rt(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 B0(t){return function(e,n){var r=t((e=Na(e)).h,(n=Na(n)).h),i=Rt(e.c,n.c),o=Rt(e.l,n.l),a=Rt(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 X8=B0(za);var V8=B0(Rt);function Y0(t){return function e(n){n=+n;function r(i,o){var a=t((i=Pe(i)).h,(o=Pe(o)).h),s=Rt(i.s,o.s),u=Rt(i.l,o.l),c=Rt(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 Z8=Y0(za);var Ba=Y0(Rt);function H0(t,e){e===void 0&&(e=t,t=gn);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 K8(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Rr=0,Oi=0,Ui=0,W0=1e3,Ya,Bi,Ha=0,Yn=0,Wa=0,Yi=typeof performance=="object"&&performance.now?performance:Date,q0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Hi(){return Yn||(q0(Q8),Yn=Yi.now()+Wa)}function Q8(){Yn=0}function Wi(){this._call=this._time=this._next=null}Wi.prototype=qa.prototype={constructor:Wi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Hi():+n)+(e==null?0:+e),!this._next&&Bi!==this&&(Bi?Bi._next=this:Ya=this,Bi=this),this._call=t,this._time=n,il()},stop:function(){this._call&&(this._call=null,this._time=1/0,il())}};function qa(t,e,n){var r=new Wi;return r.restart(t,e,n),r}function j0(){Hi(),++Rr;for(var t=Ya,e;t;)(e=Yn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Rr}function X0(){Yn=(Ha=Yi.now())+Wa,Rr=Oi=0;try{j0()}finally{Rr=0,tM(),Yn=0}}function J8(){var t=Yi.now(),e=t-Ha;e>W0&&(Wa-=e,Ha=t)}function tM(){for(var t,e=Ya,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:Ya=n);Bi=t,il(r)}function il(t){if(!Rr){Oi&&(Oi=clearTimeout(Oi));var e=t-Yn;e>24?(t<1/0&&(Oi=setTimeout(X0,t-Yi.now()-Wa)),Ui&&(Ui=clearInterval(Ui))):(Ui||(Ha=Yi.now(),Ui=setInterval(J8,W0)),Rr=1,q0(X0))}}function ol(t,e,n){var r=new Wi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function eM(t,e,n){var r=new Wi,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?Hi():+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 nM=Nn("start","end","cancel","interrupt"),rM=[],V0=0,al=1,sl=2,ja=3,Z0=4,ul=5,Xa=6;function Va(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;iM(t,n,{name:e,index:r,group:i,on:nM,tween:rM,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:V0})}function cl(t,e){var n=De(t,e);if(n.state>V0)throw new Error("too late; already scheduled");return n}function Ne(t,e){var n=De(t,e);if(n.state>ja)throw new Error("too late; already running");return n}function De(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function iM(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=qa(o,0,n.time);function o(c){n.state=al,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,p;if(n.state!==al)return u();for(l in r)if(p=r[l],p.name===n.name){if(p.state===ja)return ol(a);p.state===Z0?(p.state=Xa,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[l]):+l<e&&(p.state=Xa,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[l])}if(ol(function(){n.state===ja&&(n.state=Z0,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=sl,n.on.call("start",t,t.__data__,n.index,n.group),n.state===sl){for(n.state=ja,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(p=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);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=ul,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===ul&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Xa,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>sl&&r.state<ul,r.state=Xa,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function oM(t){return this.each(function(){Hn(this,t)})}function aM(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 sM(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 uM(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=De(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?aM:sM)(n,t,e))}function ll(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 De(i,r).value[e]}}function K0(t,e){var n;return(typeof e=="number"?pe:e instanceof dn?zi:(n=dn(e))?(e=n,zi):nl)(t,e)}function cM(t){return function(){this.removeAttribute(t)}}function lM(t){return function(){this.removeAttributeNS(t.space,t.local)}}function fM(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 hM(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 pM(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 dM(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 gM(t,e){var n=Ri(t),r=n==="transform"?G0:K0;return this.attrTween(t,typeof e=="function"?(n.local?dM:pM)(n,r,ll(this,"attr."+t,e)):e==null?(n.local?lM:cM)(n):(n.local?hM:fM)(n,r,e))}function mM(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function yM(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function bM(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&yM(t,o)),n}return i._value=e,i}function vM(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&mM(t,o)),n}return i._value=e,i}function xM(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=Ri(t);return this.tween(n,(r.local?bM:vM)(r,e))}function _M(t,e){return function(){cl(this,t).delay=+e.apply(this,arguments)}}function wM(t,e){return e=+e,function(){cl(this,t).delay=e}}function $M(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?_M:wM)(e,t)):De(this.node(),e).delay}function SM(t,e){return function(){Ne(this,t).duration=+e.apply(this,arguments)}}function AM(t,e){return e=+e,function(){Ne(this,t).duration=e}}function MM(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?SM:AM)(e,t)):De(this.node(),e).duration}function PM(t,e){if(typeof e!="function")throw new Error;return function(){Ne(this,t).ease=e}}function DM(t){var e=this._id;return arguments.length?this.each(PM(e,t)):De(this.node(),e).ease}function TM(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ne(this,t).ease=n}}function LM(t){if(typeof t!="function")throw new Error;return this.each(TM(this._id,t))}function CM(t){typeof t!="function"&&(t=Gc(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 EM(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,p=0;p<l;++p)(f=u[p]||c[p])&&(h[p]=f);for(;s<r;++s)a[s]=e[s];return new Fe(a,this._parents,this._name,this._id)}function kM(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 RM(t,e,n){var r,i,o=kM(e)?cl:Ne;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function IM(t,e){var n=this._id;return arguments.length<2?De(this.node(),n).on.on(t):this.each(RM(n,t,e))}function NM(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function FM(){return this.on("end.remove",NM(this._id))}function GM(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Aa(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,Va(c[f],e,n,f,c,De(l,n)));return new Fe(o,this._parents,e,n)}function zM(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Fc(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),p,d=De(l,n),g=0,m=f.length;g<m;++g)(p=f[g])&&Va(p,e,n,g,f,d);o.push(f),a.push(l)}return new Fe(o,a,e,n)}var OM=Gn.prototype.constructor;function UM(){return new OM(this._groups,this._parents)}function BM(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 Q0(t){return function(){this.style.removeProperty(t)}}function YM(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 HM(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 WM(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=Q0(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function qM(t,e,n){var r=(t+="")=="transform"?F0:K0;return e==null?this.styleTween(t,BM(t,r)).on("end.style."+t,Q0(t)):typeof e=="function"?this.styleTween(t,HM(t,r,ll(this,"style."+t,e))).each(WM(this._id,t)):this.styleTween(t,YM(t,r,e),n).on("end.style."+t,null)}function jM(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function XM(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&jM(t,a,n)),r}return o._value=e,o}function VM(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,XM(t,e,n??""))}function ZM(t){return function(){this.textContent=t}}function KM(t){return function(){var e=t(this);this.textContent=e??""}}function QM(t){return this.tween("text",typeof t=="function"?KM(ll(this,"text",t)):ZM(t==null?"":t+""))}function JM(t){return function(e){this.textContent=t.call(this,e)}}function t4(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&JM(i)),e}return r._value=t,r}function e4(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,t4(t))}function n4(){for(var t=this._name,e=this._id,n=tm(),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=De(u,e);Va(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 r4(){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 i4=0;function Fe(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function J0(t){return Gn().transition(t)}function tm(){return++i4}var Xe=Gn.prototype;Fe.prototype=J0.prototype={constructor:Fe,select:GM,selectAll:zM,selectChild:Xe.selectChild,selectChildren:Xe.selectChildren,filter:CM,merge:EM,selection:UM,transition:n4,call:Xe.call,nodes:Xe.nodes,node:Xe.node,size:Xe.size,empty:Xe.empty,each:Xe.each,on:IM,attr:gM,attrTween:xM,style:qM,styleTween:VM,text:QM,textTween:e4,remove:FM,tween:uM,delay:$M,duration:MM,ease:DM,easeVarying:LM,end:r4,[Symbol.iterator]:Xe[Symbol.iterator]};const o4=t=>+t;function a4(t){return t*t}function s4(t){return t*(2-t)}function em(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function u4(t){return t*t*t}function c4(t){return--t*t*t+1}function qi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var fl=3,l4=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(fl),f4=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(fl),nm=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}(fl),rm=Math.PI,im=rm/2;function h4(t){return+t==1?1:1-Math.cos(t*im)}function p4(t){return Math.sin(t*im)}function om(t){return(1-Math.cos(rm*t))/2}function mn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function d4(t){return mn(1-+t)}function g4(t){return 1-mn(t)}function am(t){return((t*=2)<=1?mn(1-t):2-mn(t-1))/2}function m4(t){return 1-Math.sqrt(1-t*t)}function y4(t){return Math.sqrt(1- --t*t)}function sm(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var hl=4/11,b4=6/11,v4=8/11,x4=3/4,_4=9/11,w4=10/11,$4=15/16,S4=21/22,A4=63/64,Za=1/hl/hl;function M4(t){return 1-ji(1-t)}function ji(t){return(t=+t)<hl?Za*t*t:t<v4?Za*(t-=b4)*t+x4:t<w4?Za*(t-=_4)*t+$4:Za*(t-=S4)*t+A4}function P4(t){return((t*=2)<=1?1-ji(1-t):ji(t-1)+1)/2}var pl=1.70158,D4=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(pl),T4=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(pl),um=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}(pl),Ir=2*Math.PI,dl=1,gl=.3,L4=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ir);function i(o){return e*mn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Ir)},i.period=function(o){return t(e,o)},i}(dl,gl),Ka=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ir);function i(o){return 1-e*mn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Ir)},i.period=function(o){return t(e,o)},i}(dl,gl),C4=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ir);function i(o){return((o=o*2-1)<0?e*mn(-o)*Math.sin((r-o)/n):2-e*mn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*Ir)},i.period=function(o){return t(e,o)},i}(dl,gl),E4={time:null,delay:0,duration:250,ease:qi};function k4(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 R4(t){var e,n;t instanceof Fe?(e=t._id,t=t._name):(e=tm(),(n=E4).time=Hi(),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])&&Va(u,t,e,c,a,n||k4(u,e));return new Fe(r,this._parents,t,e)}Gn.prototype.interrupt=oM,Gn.prototype.transition=R4;var I4=[null];function N4(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>al&&r.name===e)return new Fe([[t]],I4,e,+i)}return null}const ml=t=>()=>t;function F4(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 G4(t){t.stopImmediatePropagation()}function yl(t){t.preventDefault(),t.stopImmediatePropagation()}var cm={name:"drag"},bl={name:"space"},Nr={name:"handle"},Fr={name:"center"};const{abs:lm,max:Gt,min:zt}=Math;function fm(t){return[+t[0],+t[1]]}function vl(t){return[fm(t[0]),fm(t[1])]}var Qa={name:"x",handles:["w","e"].map(Xi),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]]}},Ja={name:"y",handles:["n","s"].map(Xi),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]]}},z4={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Xi),input:function(t){return t==null?null:vl(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"},hm={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},pm={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},O4={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},U4={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Xi(t){return{type:t}}function B4(t){return!t.ctrlKey&&!t.button}function Y4(){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 H4(){return navigator.maxTouchPoints||"ontouchstart"in this}function xl(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function W4(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function q4(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function j4(){return _l(Qa)}function X4(){return _l(Ja)}function V4(){return _l(z4)}function _l(t){var e=Y4,n=B4,r=H4,i=!0,o=Nn("start","brush","end"),a=6,s;function u(m){var y=m.property("__brush",g).selectAll(".overlay").data([Xi("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ve.overlay).merge(y).each(function(){var v=xl(this).extent;Z(this).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1])}),m.selectAll(".selection").data([Xi("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 x=m.selectAll(".handle").data(t.handles,function(v){return v.type});x.exit().remove(),x.enter().append("rect").attr("class",function(v){return"handle handle--"+v.type}).attr("cursor",function(v){return Ve[v.type]}),m.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(r).on("touchstart.brush",f).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}u.move=function(m,y,x){m.tween?m.on("start.brush",function(v){l(this,arguments).beforestart().start(v)}).on("interrupt.brush end.brush",function(v){l(this,arguments).end(v)}).tween("brush",function(){var v=this,b=v.__brush,$=l(v,arguments),_=b.selection,P=t.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),T=gn(_,P);function w(D){b.selection=D===1&&P===null?null:T(D),c.call(v),$.brush()}return _!==null&&P!==null?w:w(1)}):m.each(function(){var v=this,b=arguments,$=v.__brush,_=t.input(typeof y=="function"?y.apply(v,b):y,$.extent),P=l(v,b).beforestart();Hn(v),$.selection=_===null?null:_,c.call(v),P.start(x).brush(x).end(x)})},u.clear=function(m,y){u.move(m,null,y)};function c(){var m=Z(this),y=xl(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(x){return x.type[x.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(x){return x.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(x){return x.type==="e"||x.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,x){var v=m.__brush.emitter;return v&&(!x||!v.clean)?v:new h(m,y,x)}function h(m,y,x){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=x}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,x){var v=Z(this.that).datum();o.call(m,this.that,new F4(m,{sourceEvent:y,target:u,selection:t.output(this.state.selection),mode:x,dispatch:o}),v)}};function f(m){if(s&&!m.touches||!n.apply(this,arguments))return;var y=this,x=m.target.__data__.type,v=(i&&m.metaKey?x="overlay":x)==="selection"?cm:i&&m.altKey?Fr:Nr,b=t===Ja?null:O4[x],$=t===Qa?null:U4[x],_=xl(y),P=_.extent,T=_.selection,w=P[0][0],D,S,G=P[0][1],k,A,L=P[1][0],M,F,O=P[1][1],E,R,C=0,N=0,j,Q=b&&$&&i&&m.shiftKey,I,X,q=Array.from(m.touches||[m],at=>{const Mt=at.identifier;return at=ue(at,y),at.point0=at.slice(),at.identifier=Mt,at});Hn(y);var V=l(y,arguments,!0).beforestart();if(x==="overlay"){T&&(j=!0);const at=[q[0],q[1]||q[0]];_.selection=T=[[D=t===Ja?w:zt(at[0][0],at[1][0]),k=t===Qa?G:zt(at[0][1],at[1][1])],[M=t===Ja?L:Gt(at[0][0],at[1][0]),E=t===Qa?O:Gt(at[0][1],at[1][1])]],q.length>1&&mt(m)}else D=T[0][0],k=T[0][1],M=T[1][0],E=T[1][1];S=D,A=k,F=M,R=E;var W=Z(y).attr("pointer-events","none"),et=W.selectAll(".overlay").attr("cursor",Ve[x]);if(m.touches)V.moved=H,V.ended=pt;else{var ut=Z(m.view).on("mousemove.brush",H,!0).on("mouseup.brush",pt,!0);i&&ut.on("keydown.brush",Yt,!0).on("keyup.brush",ee,!0),Pa(m.view)}c.call(y),V.start(m,v.name);function H(at){for(const Mt of at.changedTouches||[at])for(const Ro of q)Ro.identifier===Mt.identifier&&(Ro.cur=ue(Mt,y));if(Q&&!I&&!X&&q.length===1){const Mt=q[0];lm(Mt.cur[0]-Mt[0])>lm(Mt.cur[1]-Mt[1])?X=!0:I=!0}for(const Mt of q)Mt.cur&&(Mt[0]=Mt.cur[0],Mt[1]=Mt.cur[1]);j=!0,yl(at),mt(at)}function mt(at){const Mt=q[0],Ro=Mt.point0;var Mn;switch(C=Mt[0]-Ro[0],N=Mt[1]-Ro[1],v){case bl:case cm:{b&&(C=Gt(w-D,zt(L-M,C)),S=D+C,F=M+C),$&&(N=Gt(G-k,zt(O-E,N)),A=k+N,R=E+N);break}case Nr:{q[1]?(b&&(S=Gt(w,zt(L,q[0][0])),F=Gt(w,zt(L,q[1][0])),b=1),$&&(A=Gt(G,zt(O,q[0][1])),R=Gt(G,zt(O,q[1][1])),$=1)):(b<0?(C=Gt(w-D,zt(L-D,C)),S=D+C,F=M):b>0&&(C=Gt(w-M,zt(L-M,C)),S=D,F=M+C),$<0?(N=Gt(G-k,zt(O-k,N)),A=k+N,R=E):$>0&&(N=Gt(G-E,zt(O-E,N)),A=k,R=E+N));break}case Fr:{b&&(S=Gt(w,zt(L,D-C*b)),F=Gt(w,zt(L,M+C*b))),$&&(A=Gt(G,zt(O,k-N*$)),R=Gt(G,zt(O,E+N*$)));break}}F<S&&(b*=-1,Mn=D,D=M,M=Mn,Mn=S,S=F,F=Mn,x in hm&&et.attr("cursor",Ve[x=hm[x]])),R<A&&($*=-1,Mn=k,k=E,E=Mn,Mn=A,A=R,R=Mn,x in pm&&et.attr("cursor",Ve[x=pm[x]])),_.selection&&(T=_.selection),I&&(S=T[0][0],F=T[1][0]),X&&(A=T[0][1],R=T[1][1]),(T[0][0]!==S||T[0][1]!==A||T[1][0]!==F||T[1][1]!==R)&&(_.selection=[[S,A],[F,R]],c.call(y),V.brush(at,v.name))}function pt(at){if(G4(at),at.touches){if(at.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Da(at.view,j),ut.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);W.attr("pointer-events","all"),et.attr("cursor",Ve.overlay),_.selection&&(T=_.selection),W4(T)&&(_.selection=null,c.call(y)),V.end(at,v.name)}function Yt(at){switch(at.keyCode){case 16:{Q=b&&$;break}case 18:{v===Nr&&(b&&(M=F-C*b,D=S+C*b),$&&(E=R-N*$,k=A+N*$),v=Fr,mt(at));break}case 32:{(v===Nr||v===Fr)&&(b<0?M=F-C:b>0&&(D=S-C),$<0?E=R-N:$>0&&(k=A-N),v=bl,et.attr("cursor",Ve.selection),mt(at));break}default:return}yl(at)}function ee(at){switch(at.keyCode){case 16:{Q&&(I=X=Q=!1,mt(at));break}case 18:{v===Fr&&(b<0?M=F:b>0&&(D=S),$<0?E=R:$>0&&(k=A),v=Nr,mt(at));break}case 32:{v===bl&&(at.altKey?(b&&(M=F-C*b,D=S+C*b),$&&(E=R-N*$,k=A+N*$),v=Fr):(b<0?M=F:b>0&&(D=S),$<0?E=R:$>0&&(k=A),v=Nr),et.attr("cursor",Ve[x]),mt(at));break}default:return}yl(at)}}function p(m){l(this,arguments).moved(m)}function d(m){l(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=vl(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:ml(vl(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:ml(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:ml(!!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 dm=Math.abs,Gr=Math.cos,zr=Math.sin,gm=Math.PI,ts=gm/2,mm=gm*2,ym=Math.max,wl=1e-12;function $l(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function Z4(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function K4(){return Sl(!1,!1)}function Q4(){return Sl(!1,!0)}function J4(){return Sl(!0,!1)}function Sl(t,e){var n=0,r=null,i=null,o=null;function a(s){var u=s.length,c=new Array(u),l=$l(0,u),h=new Array(u*u),f=new Array(u),p=0,d;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];p+=c[g]=m}p=ym(0,mm-n*u)/p,d=p?n:mm/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 x=$l(~u+1,u).filter(v=>v<0?s[~v*u+m]:s[m*u+v]);i&&x.sort((v,b)=>i(v<0?-s[~v*u+m]:s[m*u+v],b<0?-s[~b*u+m]:s[m*u+b]));for(const v of x)if(v<0){const b=h[~v*u+m]||(h[~v*u+m]={source:null,target:null});b.target={index:m,startAngle:g,endAngle:g+=s[~v*u+m]*p,value:s[~v*u+m]}}else{const b=h[m*u+v]||(h[m*u+v]={source:null,target:null});b.source={index:m,startAngle:g,endAngle:g+=s[m*u+v]*p,value:s[m*u+v]}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}else{const x=$l(0,u).filter(v=>s[m*u+v]||s[v*u+m]);i&&x.sort((v,b)=>i(s[m*u+v],s[m*u+b]));for(const v of x){let b;if(m<v?(b=h[m*u+v]||(h[m*u+v]={source:null,target:null}),b.source={index:m,startAngle:g,endAngle:g+=s[m*u+v]*p,value:s[m*u+v]}):(b=h[v*u+m]||(h[v*u+m]={source:null,target:null}),b.target={index:m,startAngle:g,endAngle:g+=s[m*u+v]*p,value:s[m*u+v]},m===v&&(b.source=b.target)),b.source&&b.target&&b.source.value<b.target.value){const $=b.source;b.source=b.target,b.target=$}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}g+=d}}return h=Object.values(h),h.groups=f,o?h.sort(o):h}return a.padAngle=function(s){return arguments.length?(n=ym(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=Z4(s))._=s,a):o&&o._},a}const Al=Math.PI,Ml=2*Al,Wn=1e-6,t7=Ml-Wn;function bm(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function e7(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return bm;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 Vi=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?bm:e7(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 p=r-a,d=i-s,g=u*u+c*c,m=p*p+d*d,y=Math.sqrt(g),x=Math.sqrt(f),v=o*Math.tan((Al-Math.acos((g+f-m)/(2*y*x)))/2),b=v/x,$=v/y;Math.abs(b-1)>Wn&&this._append`L${e+b*l},${n+b*h}`,this._append`A${o},${o},0,0,${+(h*p>l*d)},${this._x1=e+$*u},${this._y1=n+$*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%Ml+Ml),f>t7?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>=Al)},${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 Pl(){return new Vi}Pl.prototype=Vi.prototype;function n7(t=3){return new Vi(+t)}var r7=Array.prototype.slice;function qn(t){return function(){return t}}function i7(t){return t.source}function o7(t){return t.target}function vm(t){return t.radius}function a7(t){return t.startAngle}function s7(t){return t.endAngle}function u7(){return 0}function c7(){return 10}function xm(t){var e=i7,n=o7,r=vm,i=vm,o=a7,a=s7,s=u7,u=null;function c(){var l,h=e.apply(this,arguments),f=n.apply(this,arguments),p=s.apply(this,arguments)/2,d=r7.call(arguments),g=+r.apply(this,(d[0]=h,d)),m=o.apply(this,d)-ts,y=a.apply(this,d)-ts,x=+i.apply(this,(d[0]=f,d)),v=o.apply(this,d)-ts,b=a.apply(this,d)-ts;if(u||(u=l=Pl()),p>wl&&(dm(y-m)>p*2+wl?y>m?(m+=p,y-=p):(m-=p,y+=p):m=y=(m+y)/2,dm(b-v)>p*2+wl?b>v?(v+=p,b-=p):(v-=p,b+=p):v=b=(v+b)/2),u.moveTo(g*Gr(m),g*zr(m)),u.arc(0,0,g,m,y),m!==v||y!==b)if(t){var $=+t.apply(this,arguments),_=x-$,P=(v+b)/2;u.quadraticCurveTo(0,0,_*Gr(v),_*zr(v)),u.lineTo(x*Gr(P),x*zr(P)),u.lineTo(_*Gr(b),_*zr(b))}else u.quadraticCurveTo(0,0,x*Gr(v),x*zr(v)),u.arc(0,0,x,v,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 l7(){return xm()}function f7(){return xm(c7)}var h7=Array.prototype,_m=h7.slice;function p7(t,e){return t-e}function d7(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 yn=t=>()=>t;function g7(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=m7(t,e[n]))return i;return 0}function m7(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],p=h[1];if(y7(u,h,e))return 0;l>r!=p>r&&n<(f-c)*(r-l)/(p-l)+c&&(i=-i)}return i}function y7(t,e,n){var r;return b7(t,e,n)&&v7(t[r=+(t[0]===e[0])],n[r],e[r])}function b7(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function v7(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function x7(){}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 Dl(){var t=1,e=1,n=Lc,r=u;function i(c){var l=n(c);if(Array.isArray(l))l=l.slice().sort(p7);else{const h=Di(c,_7);for(l=Rn(...Tc(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=[],p=[];return a(c,h,function(d){r(d,c,h),d7(d)>0?f.push([d]):p.push(d)}),p.forEach(function(d){for(var g=0,m=f.length,y;g<m;++g)if(g7((y=f[g])[0],d)!==-1){y.push(d);return}}),{type:"MultiPolygon",value:l,coordinates:f}}function a(c,l,h){var f=new Array,p=new Array,d,g,m,y,x,v;for(d=g=-1,y=jn(c[0],l),Ze[y<<1].forEach(b);++d<t-1;)m=y,y=jn(c[d+1],l),Ze[m|y<<1].forEach(b);for(Ze[y<<0].forEach(b);++g<e-1;){for(d=-1,y=jn(c[g*t+t],l),x=jn(c[g*t],l),Ze[y<<1|x<<2].forEach(b);++d<t-1;)m=y,y=jn(c[g*t+t+d+1],l),v=x,x=jn(c[g*t+d+1],l),Ze[m|y<<1|x<<2|v<<3].forEach(b);Ze[y|x<<3].forEach(b)}for(d=-1,x=c[g*t]>=l,Ze[x<<2].forEach(b);++d<t-1;)v=x,x=jn(c[g*t+d+1],l),Ze[x<<2|v<<3].forEach(b);Ze[x<<3].forEach(b);function b($){var _=[$[0][0]+d,$[0][1]+g],P=[$[1][0]+d,$[1][1]+g],T=s(_),w=s(P),D,S;(D=p[T])?(S=f[w])?(delete p[D.end],delete f[S.start],D===S?(D.ring.push(P),h(D.ring)):f[D.start]=p[S.end]={start:D.start,end:S.end,ring:D.ring.concat(S.ring)}):(delete p[D.end],D.ring.push(P),p[D.end=w]=D):(D=f[w])?(S=p[T])?(delete f[D.start],delete p[S.end],D===S?(D.ring.push(P),h(D.ring)):f[S.start]=p[D.end]={start:S.start,end:D.end,ring:S.ring.concat(D.ring)}):(delete f[D.start],D.ring.unshift(_),f[D.start=T]=D):f[T]=p[w]={start:T,end:w,ring:[_,P]}}}function s(c){return c[0]*2+c[1]*(t+1)*4}function u(c,l,h){c.forEach(function(f){var p=f[0],d=f[1],g=p|0,m=d|0,y=Tl(l[m*t+g]);p>0&&p<t&&g===p&&(f[0]=wm(p,Tl(l[m*t+g-1]),y,h)),d>0&&d<e&&m===d&&(f[1]=wm(d,Tl(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)?yn(_m.call(c)):yn(c),i):n},i.smooth=function(c){return arguments.length?(r=c?u:x7,i):r===u},i}function _7(t){return isFinite(t)?t:NaN}function jn(t,e){return t==null?!1:+t>=e}function Tl(t){return t==null||isNaN(t=+t)?-1/0:t}function wm(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 w7(t){return t[0]}function $7(t){return t[1]}function S7(){return 1}function A7(){var t=w7,e=$7,n=S7,r=960,i=500,o=20,a=2,s=o*3,u=r+s*2>>a,c=i+s*2>>a,l=yn(20);function h(x){var v=new Float32Array(u*c),b=Math.pow(2,-a),$=-1;for(const k of x){var _=(t(k,++$,x)+s)*b,P=(e(k,$,x)+s)*b,T=+n(k,$,x);if(T&&_>=0&&_<u&&P>=0&&P<c){var w=Math.floor(_),D=Math.floor(P),S=_-w-.5,G=P-D-.5;v[w+D*u]+=(1-S)*(1-G)*T,v[w+1+D*u]+=S*(1-G)*T,v[w+1+(D+1)*u]+=S*G*T,v[w+(D+1)*u]+=(1-S)*G*T}}return yg({data:v,width:u,height:c},o*b),v}function f(x){var v=h(x),b=l(v),$=Math.pow(2,2*a);return Array.isArray(b)||(b=Rn(Number.MIN_VALUE,Li(v)/$,b)),Dl().size([u,c]).thresholds(b.map(_=>_*$))(v).map((_,P)=>(_.value=+b[P],p(_)))}f.contours=function(x){var v=h(x),b=Dl().size([u,c]),$=Math.pow(2,2*a),_=P=>{P=+P;var T=p(b.contour(v,P*$));return T.value=P,T};return Object.defineProperty(_,"max",{get:()=>Li(v)/$}),_};function p(x){return x.coordinates.forEach(d),x}function d(x){x.forEach(g)}function g(x){x.forEach(m)}function m(x){x[0]=x[0]*Math.pow(2,a)-s,x[1]=x[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(x){return arguments.length?(t=typeof x=="function"?x:yn(+x),f):t},f.y=function(x){return arguments.length?(e=typeof x=="function"?x:yn(+x),f):e},f.weight=function(x){return arguments.length?(n=typeof x=="function"?x:yn(+x),f):n},f.size=function(x){if(!arguments.length)return[r,i];var v=+x[0],b=+x[1];if(!(v>=0&&b>=0))throw new Error("invalid size");return r=v,i=b,y()},f.cellSize=function(x){if(!arguments.length)return 1<<a;if(!((x=+x)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(x)/Math.LN2),y()},f.thresholds=function(x){return arguments.length?(l=typeof x=="function"?x:Array.isArray(x)?yn(_m.call(x)):yn(x),f):l},f.bandwidth=function(x){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((x=+x)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*x*x+1)-1)/2,y()},f}const Ke=11102230246251565e-32,Ot=134217729,M7=(3+8*Ke)*Ke;function Ll(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 p=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[p++]=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[p++]=s);for(;h<t;)a=o+c,u=a-o,s=o-(a-u)+(c-u),c=e[++h],o=a,s!==0&&(i[p++]=s);for(;f<n;)a=o+l,u=a-o,s=o-(a-u)+(l-u),l=r[++f],o=a,s!==0&&(i[p++]=s);return(o!==0||p===0)&&(i[p++]=o),p}function P7(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function Zi(t){return new Float64Array(t)}const D7=(3+16*Ke)*Ke,T7=(2+12*Ke)*Ke,L7=(9+64*Ke)*Ke*Ke,Or=Zi(4),$m=Zi(8),Sm=Zi(12),Am=Zi(16),Wt=Zi(4);function C7(t,e,n,r,i,o,a){let s,u,c,l,h,f,p,d,g,m,y,x,v,b,$,_,P,T;const w=t-i,D=n-i,S=e-o,G=r-o;b=w*G,f=Ot*w,p=f-(f-w),d=w-p,f=Ot*G,g=f-(f-G),m=G-g,$=d*m-(b-p*g-d*g-p*m),_=S*D,f=Ot*S,p=f-(f-S),d=S-p,f=Ot*D,g=f-(f-D),m=D-g,P=d*m-(_-p*g-d*g-p*m),y=$-P,h=$-y,Or[0]=$-(y+h)+(h-P),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Or[1]=v-(y+h)+(h-_),T=x+y,h=T-x,Or[2]=x-(T-h)+(y-h),Or[3]=T;let k=P7(4,Or),A=T7*a;if(k>=A||-k>=A||(h=t-w,s=t-(w+h)+(h-i),h=n-D,c=n-(D+h)+(h-i),h=e-S,u=e-(S+h)+(h-o),h=r-G,l=r-(G+h)+(h-o),s===0&&u===0&&c===0&&l===0)||(A=L7*a+M7*Math.abs(k),k+=w*l+G*s-(S*c+D*u),k>=A||-k>=A))return k;b=s*G,f=Ot*s,p=f-(f-s),d=s-p,f=Ot*G,g=f-(f-G),m=G-g,$=d*m-(b-p*g-d*g-p*m),_=u*D,f=Ot*u,p=f-(f-u),d=u-p,f=Ot*D,g=f-(f-D),m=D-g,P=d*m-(_-p*g-d*g-p*m),y=$-P,h=$-y,Wt[0]=$-(y+h)+(h-P),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Wt[1]=v-(y+h)+(h-_),T=x+y,h=T-x,Wt[2]=x-(T-h)+(y-h),Wt[3]=T;const L=Ll(4,Or,4,Wt,$m);b=w*l,f=Ot*w,p=f-(f-w),d=w-p,f=Ot*l,g=f-(f-l),m=l-g,$=d*m-(b-p*g-d*g-p*m),_=S*c,f=Ot*S,p=f-(f-S),d=S-p,f=Ot*c,g=f-(f-c),m=c-g,P=d*m-(_-p*g-d*g-p*m),y=$-P,h=$-y,Wt[0]=$-(y+h)+(h-P),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Wt[1]=v-(y+h)+(h-_),T=x+y,h=T-x,Wt[2]=x-(T-h)+(y-h),Wt[3]=T;const M=Ll(L,$m,4,Wt,Sm);b=s*l,f=Ot*s,p=f-(f-s),d=s-p,f=Ot*l,g=f-(f-l),m=l-g,$=d*m-(b-p*g-d*g-p*m),_=u*c,f=Ot*u,p=f-(f-u),d=u-p,f=Ot*c,g=f-(f-c),m=c-g,P=d*m-(_-p*g-d*g-p*m),y=$-P,h=$-y,Wt[0]=$-(y+h)+(h-P),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-_,h=v-y,Wt[1]=v-(y+h)+(h-_),T=x+y,h=T-x,Wt[2]=x-(T-h)+(y-h),Wt[3]=T;const F=Ll(M,Sm,4,Wt,Am);return Am[F-1]}function es(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)>=D7*c?u:-C7(t,e,n,r,i,o,c)}const Mm=Math.pow(2,-52),ns=new Uint32Array(512);class rs{static from(e,n=N7,r=F7){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 rs(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 w=0;w<a;w++){const D=e[2*w],S=e[2*w+1];D<s&&(s=D),S<u&&(u=S),D>c&&(c=D),S>l&&(l=S),this._ids[w]=w}const h=(s+c)/2,f=(u+l)/2;let p,d,g;for(let w=0,D=1/0;w<a;w++){const S=Cl(h,f,e[2*w],e[2*w+1]);S<D&&(p=w,D=S)}const m=e[2*p],y=e[2*p+1];for(let w=0,D=1/0;w<a;w++){if(w===p)continue;const S=Cl(m,y,e[2*w],e[2*w+1]);S<D&&S>0&&(d=w,D=S)}let x=e[2*d],v=e[2*d+1],b=1/0;for(let w=0;w<a;w++){if(w===p||w===d)continue;const D=R7(m,y,x,v,e[2*w],e[2*w+1]);D<b&&(g=w,b=D)}let $=e[2*g],_=e[2*g+1];if(b===1/0){for(let S=0;S<a;S++)this._dists[S]=e[2*S]-e[0]||e[2*S+1]-e[1];Ur(this._ids,this._dists,0,a-1);const w=new Uint32Array(a);let D=0;for(let S=0,G=-1/0;S<a;S++){const k=this._ids[S],A=this._dists[k];A>G&&(w[D++]=k,G=A)}this.hull=w.subarray(0,D),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(es(m,y,x,v,$,_)<0){const w=d,D=x,S=v;d=g,x=$,v=_,g=w,$=D,_=S}const P=I7(m,y,x,v,$,_);this._cx=P.x,this._cy=P.y;for(let w=0;w<a;w++)this._dists[w]=Cl(e[2*w],e[2*w+1],P.x,P.y);Ur(this._ids,this._dists,0,a-1),this._hullStart=p;let T=3;r[p]=n[g]=d,r[d]=n[p]=g,r[g]=n[d]=p,i[p]=0,i[d]=1,i[g]=2,o.fill(-1),o[this._hashKey(m,y)]=p,o[this._hashKey(x,v)]=d,o[this._hashKey($,_)]=g,this.trianglesLen=0,this._addTriangle(p,d,g,-1,-1,-1);for(let w=0,D,S;w<this._ids.length;w++){const G=this._ids[w],k=e[2*G],A=e[2*G+1];if(w>0&&Math.abs(k-D)<=Mm&&Math.abs(A-S)<=Mm||(D=k,S=A,G===p||G===d||G===g))continue;let L=0;for(let R=0,C=this._hashKey(k,A);R<this._hashSize&&(L=o[(C+R)%this._hashSize],!(L!==-1&&L!==r[L]));R++);L=n[L];let M=L,F;for(;F=r[M],es(k,A,e[2*M],e[2*M+1],e[2*F],e[2*F+1])>=0;)if(M=F,M===L){M=-1;break}if(M===-1)continue;let O=this._addTriangle(M,G,r[M],-1,-1,i[M]);i[G]=this._legalize(O+2),i[M]=O,T++;let E=r[M];for(;F=r[E],es(k,A,e[2*E],e[2*E+1],e[2*F],e[2*F+1])<0;)O=this._addTriangle(E,G,F,i[G],-1,i[E]),i[G]=this._legalize(O+2),r[E]=E,T--,E=F;if(M===L)for(;F=n[M],es(k,A,e[2*F],e[2*F+1],e[2*M],e[2*M+1])<0;)O=this._addTriangle(F,G,M,-1,i[M],i[F]),this._legalize(O+2),i[F]=O,r[M]=M,T--,M=F;this._hullStart=n[G]=M,r[M]=n[E]=G,r[G]=E,o[this._hashKey(k,A)]=G,o[this._hashKey(e[2*M],e[2*M+1])]=M}this.hull=new Uint32Array(T);for(let w=0,D=this._hullStart;w<T;w++)this.hull[w]=D,D=r[D];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(E7(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=ns[--o];continue}const c=s-s%3,l=u+(e+1)%3,h=c+(s+2)%3,f=n[a],p=n[e],d=n[l],g=n[h];if(k7(i[2*f],i[2*f+1],i[2*p],i[2*p+1],i[2*d],i[2*d+1],i[2*g],i[2*g+1])){n[e]=g,n[s]=f;const y=r[h];if(y===-1){let v=this._hullStart;do{if(this._hullTri[v]===h){this._hullTri[v]=e;break}v=this._hullPrev[v]}while(v!==this._hullStart)}this._link(e,y),this._link(s,r[a]),this._link(a,h);const x=c+(s+1)%3;o<ns.length&&(ns[o++]=x)}else{if(o===0)break;e=ns[--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 E7(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Cl(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function k7(t,e,n,r,i,o,a,s){const u=t-a,c=e-s,l=n-a,h=r-s,f=i-a,p=o-s,d=u*u+c*c,g=l*l+h*h,m=f*f+p*p;return u*(h*m-g*p)-c*(l*m-g*f)+d*(l*p-h*f)<0}function R7(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),p=(c*l-s*h)*f,d=(a*h-u*l)*f;return p*p+d*d}function I7(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),p=t+(c*l-s*h)*f,d=e+(a*h-u*l)*f;return{x:p,y:d}}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;Ki(t,i,o),e[t[n]]>e[t[r]]&&Ki(t,n,r),e[t[o]]>e[t[r]]&&Ki(t,o,r),e[t[n]]>e[t[o]]&&Ki(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;Ki(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 Ki(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function N7(t){return t[0]}function F7(t){return t[1]}const Pm=1e-6;class Xn{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)>Pm||Math.abs(this._y1-o)>Pm)&&(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 El{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 Dm{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,x,v;g<y;g+=3,m+=2){const b=r[g]*2,$=r[g+1]*2,_=r[g+2]*2,P=e[b],T=e[b+1],w=e[$],D=e[$+1],S=e[_],G=e[_+1],k=w-P,A=D-T,L=S-P,M=G-T,F=(k*M-A*L)*2;if(Math.abs(F)<1e-9){if(o===void 0){o=a=0;for(const E of n)o+=e[E*2],a+=e[E*2+1];o/=n.length,a/=n.length}const O=1e9*Math.sign((o-P)*M-(a-T)*L);x=(P+S)/2-O*M,v=(T+G)/2+O*L}else{const O=1/F,E=k*k+A*A,R=L*L+M*M;x=P+(M*E-A*R)*O,v=T+(k*R-L*E)*O}s[m]=x,s[m+1]=v}let u=n[n.length-1],c,l=u*4,h,f=e[2*u],p,d=e[2*u+1];i.fill(0);for(let g=0;g<n.length;++g)u=n[g],c=l,h=f,p=d,l=u*4,f=e[2*u],d=e[2*u+1],i[c+2]=i[l]=p-d,i[c+3]=i[l+1]=f-h}render(e){const n=e==null?e=new Xn: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 p=Math.floor(l/3)*2,d=Math.floor(f/3)*2,g=a[p],m=a[p+1],y=a[d],x=a[d+1];this._renderSegment(g,m,y,x,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],p=a[h+1],d=u*4,g=this._project(f,p,s[d+2],s[d+3]);g&&this._renderSegment(f,p,g[0],g[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new Xn: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 Xn: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 El;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 p=0;p<r;p+=2)if(o=s,a=u,s=n[p],u=n[p+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 d,g,m,y,x;if(c===0){if((d=this._clipSegment(o,a,s,u,c,l))===null)continue;[g,m,y,x]=d}else{if((d=this._clipSegment(s,u,o,a,l,c))===null)continue;[y,x,g,m]=d,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,x),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(y,x):i=[y,x]}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 G7=2*Math.PI,Br=Math.pow;function z7(t){return t[0]}function O7(t){return t[1]}function U7(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 B7(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class kl{static from(e,n=z7,r=O7,i){return new kl("length"in e?Y7(e,n,r,i):Float64Array.from(H7(e,n,r,i)))}constructor(e){this._delaunator=new rs(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&&U7(e)){this.collinear=Int32Array.from({length:n.length/2},(f,p)=>p).sort((f,p)=>n[2*f]-n[2*p]||n[2*f+1]-n[2*p+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,p=n.length/2;f<p;++f){const d=B7(n[2*f],n[2*f+1],h);n[2*f]=d[0],n[2*f+1]=d[1]}this._delaunator=new rs(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 Dm(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 p=f;do{let d=u[p];const g=Br(n-c[d*2],2)+Br(r-c[d*2+1],2);if(g<h&&(h=g,l=d),p=p%3===2?p-2:p+1,u[p]!==e)break;if(p=s[p],p===-1){if(p=o[(a[e]+1)%o.length],p!==d&&Br(n-c[p*2],2)+Br(r-c[p*2+1],2)<h)return p;break}}while(p!==f);return l}render(e){const n=e==null?e=new Xn: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 Xn: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,G7)}return r&&r.value()}renderHull(e){const n=e==null?e=new Xn: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 El;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new Xn: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 El;return this.renderTriangle(e,n),n.value()}}function Y7(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*H7(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 Tm={},Rl={},Il=34,Qi=10,Nl=13;function Lm(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function W7(t,e){var n=Lm(t);return function(r,i){return e(n(r),i,t)}}function Cm(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 re(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function q7(t){return t<0?"-"+re(-t,6):t>9999?"+"+re(t,6):re(t,4)}function j7(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":q7(t.getUTCFullYear())+"-"+re(t.getUTCMonth()+1,2)+"-"+re(t.getUTCDate(),2)+(i?"T"+re(e,2)+":"+re(n,2)+":"+re(r,2)+"."+re(i,3)+"Z":r?"T"+re(e,2)+":"+re(n,2)+":"+re(r,2)+"Z":n||e?"T"+re(e,2)+":"+re(n,2)+"Z":"")}function is(t){var e=new RegExp('["'+t+`
6
+ \r]`),n=t.charCodeAt(0);function r(h,f){var p,d,g=i(h,function(m,y){if(p)return p(m,y-1);d=m,p=f?W7(m,f):Lm(m)});return g.columns=d||[],g}function i(h,f){var p=[],d=h.length,g=0,m=0,y,x=d<=0,v=!1;h.charCodeAt(d-1)===Qi&&--d,h.charCodeAt(d-1)===Nl&&--d;function b(){if(x)return Rl;if(v)return v=!1,Tm;var _,P=g,T;if(h.charCodeAt(P)===Il){for(;g++<d&&h.charCodeAt(g)!==Il||h.charCodeAt(++g)===Il;);return(_=g)>=d?x=!0:(T=h.charCodeAt(g++))===Qi?v=!0:T===Nl&&(v=!0,h.charCodeAt(g)===Qi&&++g),h.slice(P+1,_-1).replace(/""/g,'"')}for(;g<d;){if((T=h.charCodeAt(_=g++))===Qi)v=!0;else if(T===Nl)v=!0,h.charCodeAt(g)===Qi&&++g;else if(T!==n)continue;return h.slice(P,_)}return x=!0,h.slice(P,d)}for(;(y=b())!==Rl;){for(var $=[];y!==Tm&&y!==Rl;)$.push(y),y=b();f&&($=f($,m++))==null||p.push($)}return p}function o(h,f){return h.map(function(p){return f.map(function(d){return l(p[d])}).join(t)})}function a(h,f){return f==null&&(f=Cm(h)),[f.map(l).join(t)].concat(o(h,f)).join(`
7
+ `)}function s(h,f){return f==null&&(f=Cm(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?q7(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=as(","),P1=Vn.parse,j7=Vn.parseRows,X7=Vn.format,V7=Vn.formatBody,Z7=Vn.formatRows,K7=Vn.formatRow,Q7=Vn.formatValue,Zn=as(" "),D1=Zn.parse,J7=Zn.parseRows,t9=Zn.format,e9=Zn.formatBody,n9=Zn.formatRows,r9=Zn.formatRow,i9=Zn.formatValue;function o9(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})?)?$/))a9&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const a9=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function s9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function u9(t,e){return fetch(t,e).then(s9)}function c9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function l9(t,e){return fetch(t,e).then(c9)}function f9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function ss(t,e){return fetch(t,e).then(f9)}function L1(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),ss(e,n).then(function(i){return t(i,r)})}}function h9(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=as(t);return ss(e,n).then(function(o){return i.parse(o,r)})}var d9=L1(P1),p9=L1(D1);function g9(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 m9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function y9(t,e){return fetch(t,e).then(m9)}function Nl(t){return(e,n)=>ss(e,n).then(r=>new DOMParser().parseFromString(r,t))}const b9=Nl("application/xml");var v9=Nl("text/html"),x9=Nl("image/svg+xml");function _9(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 w9(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,x;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)===(x=(p>=f)<<1|d>=h));return i[x]=o,i[y]=a,t}function $9(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 S9(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 A9(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function M9(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 T9(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 x=t-+this._x.call(null,d.data),v=e-+this._y.call(null,d.data),b=x*x+v*v;if(b<n){var _=Math.sqrt(n=b);i=t-_,o=e-_,l=t+_,h=e+_,r=d.data}}return r}function P9(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 D9(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function L9(){return this._root}function E9(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function k9(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 C9(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 I9(t){return t[0]}function R9(t){return arguments.length?(this._x=t,this):this._x}function N9(t){return t[1]}function F9(t){return arguments.length?(this._y=t,this):this._y}function us(t,e,n){var r=new Fl(e??I9,n??N9,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Fl(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=us.prototype=Fl.prototype;qt.copy=function(){var t=new Fl(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=w9,qt.addAll=$9,qt.cover=S9,qt.data=A9,qt.extent=M9,qt.find=T9,qt.remove=P9,qt.removeAll=D9,qt.root=L9,qt.size=E9,qt.visit=k9,qt.visitAfter=C9,qt.x=R9,qt.y=F9;function Lt(t){return function(){return t}}function bn(t){return(t()-.5)*1e-6}function G9(t){return t.x+t.vx}function z9(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=us(e,G9,z9).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(x);function x(v,b,_,w,S){var k=v.data,$=v.r,E=g+$;if(k){if(k.index>f.index){var A=d-k.x-k.vx,I=p-k.y-k.vy,D=A*A+I*I;D<E*E&&(A===0&&(A=bn(r),D+=A*A),I===0&&(I=bn(r),D+=I*I),D=(E-(D=Math.sqrt(D)))/D*i,f.vx+=(A*=D)*(E=($*=$)/(m+$)),f.vy+=(I*=D)*E,k.vx-=A*(E=1-E),k.vy-=I*E)}return}return b>d+E||w<d-E||_>p+E||S<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 O9(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 U9(t){var e=O9,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,x=t.length;y<l;++y)for(var v=0,b,_,w,S,k,$,E;v<x;++v)b=t[v],_=b.source,w=b.target,S=w.x+w.vx-_.x-_.vx||bn(c),k=w.y+w.vy-_.y-_.vy||bn(c),$=Math.sqrt(S*S+k*k),$=($-o[v])/$*m*r[v],S*=$,k*=$,w.vx-=S*(E=u[v]),w.vy-=k*E,_.vx+=S*(E=1-E),_.vy+=k*E}function d(){if(a){var m,y=a.length,x=t.length,v=new Map(a.map((_,w)=>[e(_,w,a),_])),b;for(m=0,s=new Array(y);m<x;++m)b=t[m],b.index=m,typeof b.source!="object"&&(b.source=I1(v,b.source)),typeof b.target!="object"&&(b.target=I1(v,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(x);m<x;++m)b=t[m],u[m]=s[b.source.index]/(s[b.source.index]+s[b.target.index]);r=new Array(x),p(),o=new Array(x),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 B9=1664525,Y9=1013904223,R1=4294967296;function H9(){let t=1;return()=>(t=(B9*t+Y9)%R1)/R1}function W9(t){return t.x}function q9(t){return t.y}var j9=10,X9=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=H9();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,x;g===void 0&&(g=1);for(var v=0;v<g;++v)for(n+=(o-n)*i,s.forEach(function(b){b(n)}),m=0;m<y;++m)x=t[m],x.fx==null?x.x+=x.vx*=a:(x.x=x.fx,x.vx=0),x.fy==null?x.y+=x.vy*=a:(x.y=x.fy,x.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 x=j9*Math.sqrt(.5+g),v=g*X9;y.x=x*Math.cos(v),y.y=x*Math.sin(v)}(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 x=0,v=t.length,b,_,w,S,k;for(y==null?y=1/0:y*=y,x=0;x<v;++x)S=t[x],b=g-S.x,_=m-S.y,w=b*b+_*_,w<y&&(k=S,y=w);return k},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=us(t,W9,q9).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,x,v,b;if(d.length){for(x=v=b=0;b<4;++b)(g=d[b])&&(m=Math.abs(g.value))&&(p+=g.value,y+=m,x+=m*g.x,v+=m*g.y);d.x=x/y,d.y=v/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,x=d.y-e.y,v=m-p,b=y*y+x*x;if(v*v/u<b)return b<s&&(y===0&&(y=bn(n),b+=y*y),x===0&&(x=bn(n),b+=x*x),b<a&&(b=Math.sqrt(a*b)),e.vx+=y*d.value*r/b,e.vy+=x*d.value*r/b),!0;if(d.length||b>=s)return;(d.data!==e||d.next)&&(y===0&&(y=bn(n),b+=y*y),x===0&&(x=bn(n),b+=x*x),b<a&&(b=Math.sqrt(a*b)));do d.data!==e&&(v=o[d.data.index]*r/b,e.vx+=y*v,e.vy+=x*v);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 V9(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 Z9(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function cs(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 Hr(t){return t=cs(Math.abs(t)),t?t[1]:NaN}function K9(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 Q9(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var J9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wr(t){if(!(e=J9.exec(t)))throw new Error("invalid format: "+t);var e;return new ls({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=ls.prototype;function ls(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+""}ls.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 tT(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 eT(t,e){var n=cs(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")+cs(t,Math.max(0,e+o-1))[0]}function U1(t,e){var n=cs(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:Z9,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:eT,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:K9(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:Q9(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=Wr(h);var f=h.fill,d=h.align,p=h.sign,g=h.symbol,m=h.zero,y=h.width,x=h.comma,v=h.precision,b=h.trim,_=h.type;_==="n"?(x=!0,_="g"):B1[_]||(v===void 0&&(v=12),b=!0,_="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var w=g==="$"?n:g==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",S=g==="$"?r:/[%p]/.test(_)?a:"",k=B1[_],$=/[defgprs%]/.test(_);v=v===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function E(A){var I=w,D=S,T,C,P;if(_==="c")D=k(A)+D,A="";else{A=+A;var R=A<0||1/A<0;if(A=isNaN(A)?u:k(Math.abs(A),v),b&&(A=tT(A)),R&&+A==0&&p!=="+"&&(R=!1),I=(R?p==="("?p:s:p==="-"||p==="("?"":p)+I,D=(_==="s"?W1[8+O1/3]:"")+D+(R&&p==="("?")":""),$){for(T=-1,C=A.length;++T<C;)if(P=A.charCodeAt(T),48>P||P>57){D=(P===46?i+A.slice(T+1):A.slice(T))+D,A=A.slice(0,T);break}}}x&&!m&&(A=e(A,1/0));var G=I.length+A.length+D.length,M=G<y?new Array(y-G+1).join(f):"";switch(x&&m&&(A=e(M+A,M.length?y-D.length:1/0),M=""),d){case"<":A=I+A+D+M;break;case"=":A=I+M+A+D;break;case"^":A=M.slice(0,G=M.length>>1)+I+A+D+M.slice(G);break;default:A=M+I+A+D;break}return o(A)}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(Hr(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 fs,eo,Gl;j1({thousands:",",grouping:[3],currency:["$",""]});function j1(t){return fs=q1(t),eo=fs.format,Gl=fs.formatPrefix,fs}function X1(t){return Math.max(0,-Hr(Math.abs(t)))}function V1(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Hr(e)/3)))*3-Hr(Math.abs(t)))}function Z1(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Hr(e)-Hr(t))+1}var et=1e-6,no=1e-12,ht=Math.PI,St=ht/2,hs=ht/4,jt=ht*2,yt=180/ht,rt=ht/180,dt=Math.abs,qr=Math.atan,Xt=Math.atan2,J=Math.cos,ds=Math.ceil,K1=Math.exp,zl=Math.hypot,ps=Math.log,Ol=Math.pow,K=Math.sin,de=Math.sign||function(t){return t>0?1:t<0?-1:0},It=Math.sqrt,Ul=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 gs(t,e){t&&em.hasOwnProperty(t.type)&&em[t.type](t,e)}var tm={Feature:function(t,e){gs(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)gs(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){Bl(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Bl(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;)gs(n[r],e)}};function Bl(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;)Bl(t[n],e,1);e.polygonEnd()}function Pe(t,e){t&&tm.hasOwnProperty(t.type)?tm[t.type](t,e):gs(t,e)}var ms=new Dt,ys=new Dt,rm,im,Yl,Hl,Wl,Ge={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){ms=new Dt,Ge.lineStart=nT,Ge.lineEnd=rT},polygonEnd:function(){var t=+ms;ys.add(t<0?jt+t:t),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){ys.add(jt)}};function nT(){Ge.point=iT}function rT(){om(rm,im)}function iT(t,e){Ge.point=om,rm=t,im=e,t*=rt,e*=rt,Yl=t,Hl=J(e=e/2+hs),Wl=K(e)}function om(t,e){t*=rt,e*=rt,e=e/2+hs;var n=t-Yl,r=n>=0?1:-1,i=r*n,o=J(e),a=K(e),s=Wl*a,u=Hl*o+s*J(i),c=s*r*K(i);ms.add(Xt(c,u)),Yl=t,Hl=o,Wl=a}function oT(t){return ys=new Dt,Pe(t,Ge),ys*2}function bs(t){return[Xt(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 vs(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function jr(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 ql(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function xs(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function _s(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,vn,Qe,Je={point:jl,lineStart:cm,lineEnd:lm,polygonStart:function(){Je.point=fm,Je.lineStart=aT,Je.lineEnd=sT,ro=new Dt,Ge.polygonStart()},polygonEnd:function(){Ge.polygonEnd(),Je.point=jl,Je.lineStart=cm,Je.lineEnd=lm,ms<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 jl(t,e){vn.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=jr(Xr,n),i=[r[1],-r[0],0],o=jr(i,r);_s(o),o=bs(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 vn.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=jl,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 aT(){Ge.lineStart()}function sT(){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 uT(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 cT(t){var e,n,r,i,o,a,s;if(ue=At=-($t=re=1/0),vn=[],Pe(t,Je),n=vn.length){for(vn.sort(uT),e=1,r=vn[0],o=[r];e<n;++e)i=vn[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 vn=Qe=null,$t===1/0||re===1/0?[[NaN,NaN],[NaN,NaN]]:[[$t,re],[At,ue]]}var io,ws,$s,Ss,As,Ms,Ts,Ps,Xl,Vl,Zl,dm,pm,Zt,Kt,Qt,De={sphere:wt,point:Kl,lineStart:gm,lineEnd:mm,polygonStart:function(){De.lineStart=hT,De.lineEnd=dT},polygonEnd:function(){De.lineStart=gm,De.lineEnd=mm}};function Kl(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,$s+=(t-$s)/io,Ss+=(e-Ss)/io,As+=(n-As)/io}function gm(){De.point=lT}function lT(t,e){t*=rt,e*=rt;var n=J(e);Zt=n*J(t),Kt=n*K(t),Qt=K(e),De.point=fT,oo(Zt,Kt,Qt)}function fT(t,e){t*=rt,e*=rt;var n=J(e),r=n*J(t),i=n*K(t),o=K(e),a=Xt(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);ws+=a,Ms+=a*(Zt+(Zt=r)),Ts+=a*(Kt+(Kt=i)),Ps+=a*(Qt+(Qt=o)),oo(Zt,Kt,Qt)}function mm(){De.point=Kl}function hT(){De.point=pT}function dT(){ym(dm,pm),De.point=Kl}function pT(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=zl(a,s,u),l=Vt(c),h=c&&-l/c;Xl.add(h*a),Vl.add(h*s),Zl.add(h*u),ws+=l,Ms+=l*(Zt+(Zt=r)),Ts+=l*(Kt+(Kt=i)),Ps+=l*(Qt+(Qt=o)),oo(Zt,Kt,Qt)}function gT(t){io=ws=$s=Ss=As=Ms=Ts=Ps=0,Xl=new Dt,Vl=new Dt,Zl=new Dt,Pe(t,De);var e=+Xl,n=+Vl,r=+Zl,i=zl(e,n,r);return i<no&&(e=Ms,n=Ts,r=Ps,ws<et&&(e=$s,n=Ss,r=As),i=zl(e,n,r),i<no)?[NaN,NaN]:[Xt(n,e)*yt,Vt(r/i)*yt]}function Vr(t){return function(){return t}}function Ql(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 Jl(t,e){return dt(t)>ht&&(t-=Math.round(t/jt)*jt),[t,e]}Jl.invert=Jl;function tf(t,e,n){return(t%=jt)?e||n?Ql(vm(t),xm(e,n)):vm(t):e||n?xm(e,n):Jl}function bm(t){return function(e,n){return e+=t,dt(e)>ht&&(e-=Math.round(e/jt)*jt),[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[Xt(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[Xt(h*i+f*o,l*n+d*r),Vt(d*n-l*r)]},a}function _m(t){t=tf(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*jt,o=e-u/2):(i=$m(a,i),o=$m(a,o),(r>0?i<o:i>o)&&(i+=r*jt));for(var c,l=i;r>0?l>o:l<o;l-=u)c=bs([a,-s*J(l),-s*K(l)]),t.point(c[0],c[1])}}function $m(t,e){e=Kn(e),e[0]-=t,_s(e);var n=Q1(-e[1]);return((-e[2]<0?-n:n)+jt-et)%jt}function mT(){var t=Vr([0,0]),e=Vr(90),n=Vr(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=tf(-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:Vr([+u[0],+u[1]]),s):t},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Vr(+u),s):e},s.precision=function(u){return arguments.length?(n=typeof u=="function"?u:Vr(+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 Ds(t,e){return dt(t[0]-e[0])<et&&dt(t[1]-e[1])<et}function Ls(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],x;if(Ds(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(x=new Ls(m,p,null,!0)),a.push(x.o=new Ls(m,null,x,!1)),o.push(x=new Ls(y,p,null,!1)),a.push(x.o=new Ls(y,null,x,!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 ef(t){return dt(t[0])<=ht?t[0]:de(t[0])*((dt(t[0])+ht)%jt-ht)}function Tm(t,e){var n=ef(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=ef(d),g=d[1]/2+hs,m=K(g),y=J(g),x=0;x<f;++x,p=b,m=w,y=S,d=v){var v=h[x],b=ef(v),_=v[1]/2+hs,w=K(_),S=J(_),k=b-p,$=k>=0?1:-1,E=$*k,A=E>ht,I=m*w;if(u.add(Xt(I*$*K(E),y*S+I*J(E))),a+=A?k+$*jt:k,A^p>=n^b>=n){var D=jr(Kn(d),Kn(v));_s(D);var T=jr(o,D);_s(T);var C=(A^k>=0?-1:1)*Vt(T[2]);(r>C||r===C&&(D[0]||D[1]))&&(s+=A^k>=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=x,f.lineEnd=v,l=[],c=[]},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=m,l=kc(l);var b=Tm(c,r);l.length?(u||(i.polygonStart(),u=!0),Am(l,bT,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,_){t(b,_)&&i.point(b,_)}function p(b,_){o.point(b,_)}function g(){f.point=p,o.lineStart()}function m(){f.point=d,o.lineEnd()}function y(b,_){h.push([b,_]),s.point(b,_)}function x(){s.lineStart(),h=[]}function v(){y(h[0][0],h[0][1]),s.lineEnd();var b=s.clean(),_=a.result(),w,S=_.length,k,$,E;if(h.pop(),c.push(h),h=null,!!S){if(b&1){if($=_[0],(k=$.length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),w=0;w<k;++w)i.point((E=$[w])[0],E[1]);i.lineEnd()}return}S>1&&b&2&&_.push(_.pop().concat(_.shift())),l.push(_.filter(yT))}}return f}}function yT(t){return t.length>1}function bT(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 nf=Pm(function(){return!0},vT,_T,[-ht,-St]);function vT(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=xT(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 xT(t,e,n,r){var i,o,a=K(t-n);return dt(a)>et?qr((K(e)*(o=J(r))*K(n)-K(r)*(i=J(e))*K(t))/(i*o*a)):(e+r)/2}function _T(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 x=[m,y],v,b=a(m,y),_=r?b?0:c(m,y):b?c(m+(m<0?ht:-ht),y):0;if(!h&&(p=d=b)&&l.lineStart(),b!==d&&(v=u(h,x),(!v||Ds(h,v)||Ds(x,v))&&(x[2]=1)),b!==d)g=0,b?(l.lineStart(),v=u(x,h),l.point(v[0],v[1])):(v=u(h,x),l.point(v[0],v[1],2),l.lineEnd()),h=v;else if(i&&h&&r^b){var w;!(_&f)&&(w=u(x,h,!0))&&(g=0,r?(l.lineStart(),l.point(w[0][0],w[0][1]),l.point(w[1][0],w[1][1]),l.lineEnd()):(l.point(w[1][0],w[1][1]),l.lineEnd(),l.lineStart(),l.point(w[0][0],w[0][1],3)))}b&&(!h||!Ds(h,x))&&l.point(x[0],x[1]),h=x,d=b,f=_},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=jr(d,p),y=vs(m,m),x=m[0],v=y-x*x;if(!v)return!f&&l;var b=e*y/v,_=-e*x/v,w=jr(g,m),S=xs(g,b),k=xs(m,_);ql(S,k);var $=w,E=vs(S,$),A=vs($,$),I=E*E-A*(vs(S,S)-1);if(!(I<0)){var D=It(I),T=xs($,(-E-D)/A);if(ql(T,S),T=bs(T),!f)return T;var C=l[0],P=h[0],R=l[1],G=h[1],M;P<C&&(M=C,C=P,P=M);var N=P-C,z=dt(N-ht)<et,L=z||N<et;if(!z&&G<R&&(M=R,R=G,G=M),L?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]<=P)){var j=xs($,(-E+D)/A);return ql(j,S),[T,bs(j)]}}}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 wT(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,Es=-ao;function ks(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,x,v,b,_,w,S={point:k,lineStart:I,lineEnd:D,polygonStart:E,polygonEnd:A};function k(C,P){i(C,P)&&l.point(C,P)}function $(){for(var C=0,P=0,R=d.length;P<R;++P)for(var G=d[P],M=1,N=G.length,z=G[0],L,j,q=z[0],Y=z[1];M<N;++M)L=q,j=Y,z=G[M],q=z[0],Y=z[1],j<=r?Y>r&&(q-L)*(r-j)>(Y-j)*(t-L)&&++C:Y<=r&&(q-L)*(r-j)<(Y-j)*(t-L)&&--C;return C}function E(){l=h,f=[],d=[],w=!0}function A(){var C=$(),P=w&&C,R=(f=kc(f)).length;(P||R)&&(c.polygonStart(),P&&(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=[]),_=!0,b=!1,x=v=NaN}function D(){f&&(T(g,m),y&&b&&h.rejoin(),f.push(h.result())),S.point=k,b&&l.lineEnd()}function T(C,P){var R=i(C,P);if(d&&p.push([C,P]),_)g=C,m=P,y=R,_=!1,R&&(l.lineStart(),l.point(C,P));else if(R&&b)l.point(C,P);else{var G=[x=Math.max(Es,Math.min(ao,x)),v=Math.max(Es,Math.min(ao,v))],M=[C=Math.max(Es,Math.min(ao,C)),P=Math.max(Es,Math.min(ao,P))];wT(G,M,t,e,n,r)?(b||(l.lineStart(),l.point(G[0],G[1])),l.point(M[0],M[1]),R||l.lineEnd(),w=!1):R&&(l.lineStart(),l.point(C,P),w=!1)}x=C,v=P,b=R}return S}}function $T(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=ks(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 rf,of,Cs,Is,Zr={sphere:wt,point:wt,lineStart:ST,lineEnd:wt,polygonStart:wt,polygonEnd:wt};function ST(){Zr.point=MT,Zr.lineEnd=AT}function AT(){Zr.point=Zr.lineEnd=wt}function MT(t,e){t*=rt,e*=rt,of=t,Cs=K(e),Is=J(e),Zr.point=TT}function TT(t,e){t*=rt,e*=rt;var n=K(e),r=J(e),i=dt(t-of),o=J(i),a=K(i),s=r*a,u=Is*n-Cs*r*o,c=Cs*n+Is*r*o;rf.add(Xt(It(s*s+u*u),c)),of=t,Cs=n,Is=r}function Lm(t){return rf=new Dt,Pe(t,Zr),+rf}var af=[null,null],PT={type:"LineString",coordinates:af};function Rs(t,e){return af[0]=t,af[1]=e,Lm(PT)}var Em={Feature:function(t,e){return Ns(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Ns(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(Ns(n[r],e))return!0;return!1}};function Ns(t,e){return t&&km.hasOwnProperty(t.type)?km[t.type](t,e):!1}function Cm(t,e){return Rs(t,e)===0}function Im(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Rs(t[o],e),r===0||o>0&&(i=Rs(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(DT),Nm(e))}function DT(t){return t=t.map(Nm),t.pop(),t}function Nm(t){return[t[0]*rt,t[1]*rt]}function LT(t,e){return(t&&Em.hasOwnProperty(t.type)?Em[t.type]:Ns)(t,e)}function Fm(t,e,n){var r=hn(t,e-et,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function Gm(t,e,n){var r=hn(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:x()}}function x(){return hn(ds(r/l)*l,n,l).map(p).concat(hn(ds(s/h)*h,a,h).map(g)).concat(hn(ds(e/u)*u,t,u).filter(function(v){return dt(v%l)>et}).map(f)).concat(hn(ds(o/c)*c,i,c).filter(function(v){return dt(v%h)>et}).map(d))}return y.lines=function(){return x().map(function(v){return{type:"LineString",coordinates:v}})},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(v){return arguments.length?y.extentMajor(v).extentMinor(v):y.extentMinor()},y.extentMajor=function(v){return arguments.length?(r=+v[0][0],n=+v[1][0],s=+v[0][1],a=+v[1][1],r>n&&(v=r,r=n,n=v),s>a&&(v=s,s=a,a=v),y.precision(m)):[[r,s],[n,a]]},y.extentMinor=function(v){return arguments.length?(e=+v[0][0],t=+v[1][0],o=+v[0][1],i=+v[1][1],e>t&&(v=e,e=t,t=v),o>i&&(v=o,o=i,i=v),y.precision(m)):[[e,o],[t,i]]},y.step=function(v){return arguments.length?y.stepMajor(v).stepMinor(v):y.stepMinor()},y.stepMajor=function(v){return arguments.length?(l=+v[0],h=+v[1],y):[l,h]},y.stepMinor=function(v){return arguments.length?(u=+v[0],c=+v[1],y):[u,c]},y.precision=function(v){return arguments.length?(m=+v,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 ET(){return zm()()}function kT(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 x=K(y*=p)/g,v=K(p-y)/g,b=v*l+x*f,_=v*h+x*d,w=v*s+x*c;return[Xt(_,b)*yt,Xt(w,It(b*b+_*_))*yt]}:function(){return[n*yt,r*yt]};return m.distance=p,m}const so=t=>t;var sf=new Dt,uf=new Dt,Om,Um,cf,lf,tn={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){tn.lineStart=CT,tn.lineEnd=RT},polygonEnd:function(){tn.lineStart=tn.lineEnd=tn.point=wt,sf.add(dt(uf)),uf=new Dt},result:function(){var t=sf/2;return sf=new Dt,t}};function CT(){tn.point=IT}function IT(t,e){tn.point=Bm,Om=cf=t,Um=lf=e}function Bm(t,e){uf.add(lf*t-cf*e),cf=t,lf=e}function RT(){Bm(Om,Um)}var Kr=1/0,Fs=Kr,uo=-Kr,Gs=uo,zs={point:NT,lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var t=[[Kr,Fs],[uo,Gs]];return uo=Gs=-(Fs=Kr=1/0),t}};function NT(t,e){t<Kr&&(Kr=t),t>uo&&(uo=t),e<Fs&&(Fs=e),e>Gs&&(Gs=e)}var ff=0,hf=0,co=0,Os=0,Us=0,Qr=0,df=0,pf=0,lo=0,Ym,Hm,ze,Oe,pe={point:Jn,lineStart:Wm,lineEnd:qm,polygonStart:function(){pe.lineStart=zT,pe.lineEnd=OT},polygonEnd:function(){pe.point=Jn,pe.lineStart=Wm,pe.lineEnd=qm},result:function(){var t=lo?[df/lo,pf/lo]:Qr?[Os/Qr,Us/Qr]:co?[ff/co,hf/co]:[NaN,NaN];return ff=hf=co=Os=Us=Qr=df=pf=lo=0,t}};function Jn(t,e){ff+=t,hf+=e,++co}function Wm(){pe.point=FT}function FT(t,e){pe.point=GT,Jn(ze=t,Oe=e)}function GT(t,e){var n=t-ze,r=e-Oe,i=It(n*n+r*r);Os+=i*(ze+t)/2,Us+=i*(Oe+e)/2,Qr+=i,Jn(ze=t,Oe=e)}function qm(){pe.point=Jn}function zT(){pe.point=UT}function OT(){jm(Ym,Hm)}function UT(t,e){pe.point=jm,Jn(Ym=ze=t,Hm=Oe=e)}function jm(t,e){var n=t-ze,r=e-Oe,i=It(n*n+r*r);Os+=i*(ze+t)/2,Us+=i*(Oe+e)/2,Qr+=i,i=Oe*t-ze*e,df+=i*(ze+t),pf+=i*(Oe+e),lo+=i*3,Jn(ze=t,Oe=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,jt);break}}},result:wt};var gf=new Dt,mf,Vm,Zm,fo,ho,po={point:wt,lineStart:function(){po.point=BT},lineEnd:function(){mf&&Km(Vm,Zm),po.point=wt},polygonStart:function(){mf=!0},polygonEnd:function(){mf=null},result:function(){var t=+gf;return gf=new Dt,t}};function BT(t,e){po.point=Km,Vm=fo=t,Zm=ho=e}function Km(t,e){fo-=t,ho-=e,gf.add(It(fo*fo+ho*ho)),fo=t,ho=e}let Qm,Bs,Jm,ty;class ey{constructor(e){this._append=e==null?ny:YT(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!==Bs){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,Bs=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 YT(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,Bs=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 Bs}function HT(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(zs)),zs.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 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 ey(n)),a},a.projection(t).digits(n).context(e)}function WT(t){return{stream:go(t)}}function go(t){return function(e){var n=new yf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function yf(){}yf.prototype={constructor:yf,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 bf(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(zs)),e(zs.result()),r!=null&&t.clipExtent(r),t}function Ys(t,e,n){return bf(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 vf(t,e,n){return Ys(t,[[0,0],e],n)}function xf(t,e,n){return bf(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 _f(t,e,n){return bf(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,qT=J(30*rt);function iy(t,e){return+e?XT(t,e):jT(t)}function jT(t){return go({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function XT(t,e){function n(r,i,o,a,s,u,c,l,h,f,d,p,g,m){var y=c-r,x=l-i,v=y*y+x*x;if(v>4*e&&g--){var b=a+f,_=s+d,w=u+p,S=It(b*b+_*_+w*w),k=Vt(w/=S),$=dt(dt(w)-1)<et||dt(o-h)<et?(o+h)/2:Xt(_,b),E=t($,k),A=E[0],I=E[1],D=A-r,T=I-i,C=x*D-y*T;(C*C/v>e||dt((y*D+x*T)/v-.5)>.3||a*f+s*d+u*p<qT)&&(n(r,i,o,a,s,u,A,I,$,b/=S,_/=S,w,g,m),m.point(A,I),n(A,I,$,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:x,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=_},polygonEnd:function(){r.polygonEnd(),m.lineStart=x}};function y(k,$){k=t(k,$),r.point(k[0],k[1])}function x(){h=NaN,m.point=v,r.lineStart()}function v(k,$){var E=Kn([k,$]),A=t(k,$);n(h,f,l,d,p,g,h=A[0],f=A[1],l=k,d=E[0],p=E[1],g=E[2],ry,r),r.point(h,f)}function b(){m.point=y,r.lineEnd()}function _(){x(),m.point=w,m.lineEnd=S}function w(k,$){v(i=k,$),o=h,a=f,s=d,u=p,c=g,m.point=v}function S(){n(h,f,l,d,p,g,o,a,i,s,u,c,ry,r),m.lineEnd=b,b()}return m}}var VT=go({point:function(t,e){this.stream.point(t*rt,e*rt)}});function ZT(t){return go({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function KT(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 KT(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 wf(function(){return t})()}function wf(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=nf,m=null,y,x,v,b=so,_=.5,w,S,k,$,E;function A(C){return k(C[0]*rt,C[1]*rt)}function I(C){return C=k.invert(C[0],C[1]),C&&[C[0]*yt,C[1]*yt]}A.stream=function(C){return $&&E===C?$:$=VT(ZT(l)(g(w(b(E=C)))))},A.preclip=function(C){return arguments.length?(g=C,p=void 0,T()):g},A.postclip=function(C){return arguments.length?(b=C,m=y=x=v=null,T()):b},A.clipAngle=function(C){return arguments.length?(g=+C?Dm(p=C*rt):(p=null,nf),T()):p*yt},A.clipExtent=function(C){return arguments.length?(b=C==null?(m=y=x=v=null,so):ks(m=+C[0][0],y=+C[0][1],x=+C[1][0],v=+C[1][1]),T()):m==null?null:[[m,y],[x,v]]},A.scale=function(C){return arguments.length?(n=+C,D()):n},A.translate=function(C){return arguments.length?(r=+C[0],i=+C[1],D()):[r,i]},A.center=function(C){return arguments.length?(o=C[0]%360*rt,a=C[1]%360*rt,D()):[o*yt,a*yt]},A.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,D()):[s*yt,u*yt,c*yt]},A.angle=function(C){return arguments.length?(h=C%360*rt,D()):h*yt},A.reflectX=function(C){return arguments.length?(f=C?-1:1,D()):f<0},A.reflectY=function(C){return arguments.length?(d=C?-1:1,D()):d<0},A.precision=function(C){return arguments.length?(w=iy(S,_=C*C),T()):It(_)},A.fitExtent=function(C,P){return Ys(A,C,P)},A.fitSize=function(C,P){return vf(A,C,P)},A.fitWidth=function(C,P){return xf(A,C,P)},A.fitHeight=function(C,P){return _f(A,C,P)};function D(){var C=oy(n,0,0,f,d,h).apply(null,e(o,a)),P=oy(n,r-C[0],i-C[1],f,d,h);return l=tf(s,u,c),S=Ql(e,P),k=Ql(l,S),w=iy(S,_),T()}function T(){return $=E=null,A}return function(){return e=t.apply(this,arguments),A.invert=e.invert&&I,D()}}function $f(t){var e=0,n=ht/3,r=wf(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 QT(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 QT(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=Xt(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 Hs(){return $f(ay).scale(155.424).center([0,33.6442])}function sy(){return Hs().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function JT(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 tP(){var t,e,n=sy(),r,i=Hs().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Hs().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=JT([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 Ys(l,f,d)},l.fitSize=function(f,d){return vf(l,f,d)},l.fitWidth=function(f,d){return xf(l,f,d)},l.fitHeight=function(f,d){return _f(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[Xt(e*o,r*a),Vt(r&&n*o/r)]}}var Sf=uy(function(t){return It(2/(1+t))});Sf.invert=mo(function(t){return 2*Vt(t/2)});function eP(){return Ue(Sf).scale(124.75).clipAngle(180-.001)}var Af=uy(function(t){return(t=Q1(t))&&t/K(t)});Af.invert=mo(function(t){return t});function nP(){return Ue(Af).scale(79.4188).clipAngle(180-.001)}function yo(t,e){return[t,ps(Ul((St+e)/2))]}yo.invert=function(t,e){return[t,2*qr(K1(e))-St]};function rP(){return cy(yo).scale(961/jt)}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 Ws(t){return Ul((St+t)/2)}function ly(t,e){var n=J(t),r=t===e?K(t):ps(n/J(e))/ps(Ws(e)/Ws(t)),i=n*Ol(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/Ol(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=Xt(a,dt(u))*de(u);return u*r<0&&(l-=ht*de(a)*de(u)),[l/r,2*qr(Ol(i/c,1/r))-St]},o}function iP(){return $f(ly).scale(109.5).parallels([30,30])}function bo(t,e){return[t,e]}bo.invert=bo;function oP(){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=Xt(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 aP(){return $f(fy).scale(131.154).center([0,13.9389])}var vo=1.340264,xo=-.081106,_o=893e-6,wo=.003796,qs=It(3)/2,sP=12;function Mf(t,e){var n=Vt(qs*K(e)),r=n*n,i=r*r*r;return[t*J(n)/(qs*(vo+3*xo*r+i*(7*_o+9*wo*r))),n*(vo+xo*r+i*(_o+wo*r))]}Mf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<sP&&(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[qs*t*(vo+3*xo*r+i*(7*_o+9*wo*r))/J(n),Vt(K(n)/qs)]};function uP(){return Ue(Mf).scale(177.158)}function Tf(t,e){var n=J(e),r=J(t)*n;return[n*K(t)/r,K(e)/r]}Tf.invert=mo(qr);function cP(){return Ue(Tf).scale(144.049).clipAngle(60)}function lP(){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,_){var w=v([b,_]);this.stream.point(w[0],w[1])}}),g=so,m,y;function x(){return f=t*r,d=t*i,m=y=null,v}function v(b){var _=b[0]*f,w=b[1]*d;if(o){var S=w*a-_*s;_=_*a+w*s,w=S}return[_+e,w+n]}return v.invert=function(b){var _=b[0]-e,w=b[1]-n;if(o){var S=w*a+_*s;_=_*a-w*s,w=S}return[_/f,w/d]},v.stream=function(b){return m&&y===b?m:m=p(g(y=b))},v.postclip=function(b){return arguments.length?(g=b,u=c=l=h=null,x()):g},v.clipExtent=function(b){return arguments.length?(g=b==null?(u=c=l=h=null,so):ks(u=+b[0][0],c=+b[0][1],l=+b[1][0],h=+b[1][1]),x()):u==null?null:[[u,c],[l,h]]},v.scale=function(b){return arguments.length?(t=+b,x()):t},v.translate=function(b){return arguments.length?(e=+b[0],n=+b[1],x()):[e,n]},v.angle=function(b){return arguments.length?(o=b%360*rt,s=K(o),a=J(o),x()):o*yt},v.reflectX=function(b){return arguments.length?(r=b?-1:1,x()):r<0},v.reflectY=function(b){return arguments.length?(i=b?-1:1,x()):i<0},v.fitExtent=function(b,_){return Ys(v,b,_)},v.fitSize=function(b,_){return vf(v,b,_)},v.fitWidth=function(b,_){return xf(v,b,_)},v.fitHeight=function(b,_){return _f(v,b,_)},v}function Pf(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)))]}Pf.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 fP(){return Ue(Pf).scale(175.295)}function Df(t,e){return[J(e)*K(t),K(e)]}Df.invert=mo(Vt);function hP(){return Ue(Df).scale(249.5).clipAngle(90+et)}function Lf(t,e){var n=J(e),r=1+J(t)*n;return[n*K(t)/r,K(e)/r]}Lf.invert=mo(function(t){return 2*qr(t)});function dP(){return Ue(Lf).scale(250).clipAngle(142)}function Ef(t,e){return[ps(Ul((St+e)/2)),-t]}Ef.invert=function(t,e){return[-e,2*qr(K1(t))-St]};function pP(){var t=cy(Ef),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 gP(t,e){return t.parent===e.parent?1:2}function mP(t){return t.reduce(yP,0)/t.length}function yP(t,e){return t+e.x}function bP(t){return 1+t.reduce(vP,0)}function vP(t,e){return Math.max(t,e.y)}function xP(t){for(var e;e=t.children;)t=e[0];return t}function _P(t){for(var e;e=t.children;)t=e[e.length-1];return t}function wP(){var t=gP,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var d=f.children;d?(f.x=mP(d),f.y=bP(d)):(f.x=a?s+=t(f,a):0,f.y=0,a=f)});var u=xP(o),c=_P(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 $P(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 SP(){return this.eachAfter($P)}function AP(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function MP(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 TP(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 PP(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function DP(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 LP(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function EP(t){for(var e=this,n=kP(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 kP(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 CP(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function IP(){return Array.from(this)}function RP(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function NP(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*FP(){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 js(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=OP)):e===void 0&&(e=zP);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 GP(){return js(this).eachBefore(UP)}function zP(t){return t.children}function OP(t){return Array.isArray(t)?t[1]:null}function UP(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=js.prototype={constructor:tr,count:SP,each:AP,eachAfter:TP,eachBefore:MP,find:PP,sum:DP,sort:LP,path:EP,ancestors:CP,descendants:IP,leaves:RP,links:NP,copy:GP,[Symbol.iterator]:FP};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 Jr(t){return function(){return t}}const BP=1664525,YP=1013904223,py=4294967296;function kf(){let t=1;return()=>(t=(BP*t+YP)%py)/py}function HP(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function WP(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 qP(t){return gy(t,kf())}function gy(t,e){for(var n=0,r=(t=WP(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&my(a,o)?++n:(a=XP(i=jP(i,o)),n=0);return a}function jP(t,e){var n,r;if(Cf(e,t))return[e];for(n=0;n<t.length;++n)if(Vs(e,t[n])&&Cf($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(Vs($o(t[n],t[r]),e)&&Vs($o(t[n],e),t[r])&&Vs($o(t[r],e),t[n])&&Cf(yy(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Vs(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 Cf(t,e){for(var n=0;n<e.length;++n)if(!my(t,e[n]))return!1;return!0}function XP(t){switch(t.length){case 1:return VP(t[0]);case 2:return $o(t[0],t[1]);case 3:return yy(t[0],t[1],t[2])}}function VP(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,x=r*r+i*i-o*o,v=x-a*a-s*s+u*u,b=x-c*c-l*l+h*h,_=d*p-f*g,w=(p*b-g*v)/(_*2)-r,S=(g*m-p*y)/_,k=(d*v-f*b)/(_*2)-i,$=(f*y-d*m)/_,E=S*S+$*$-1,A=2*(o+w*S+k*$),I=w*w+k*k-o*o,D=-(Math.abs(E)>1e-6?(A+Math.sqrt(A*A-4*E*I))/(2*E):I/A);return{x:r+w+S*D,y:i+k+$*D,r:D}}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 Zs(t){this._=t,this.next=null,this.previous=null}function _y(t,e){if(!(o=(t=HP(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 Zs(n),r=new Zs(r),i=new Zs(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 Zs(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 ZP(t){return _y(t,kf()),t}function KP(t){return Math.sqrt(t.value)}function QP(){var t=null,e=1,n=1,r=er;function i(o){const a=kf();return o.x=e/2,o.y=n/2,t?o.eachBefore(wy(t)).eachAfter(If(r,.5,a)).eachBefore($y(1)):o.eachBefore(wy(KP)).eachAfter(If(er,1,a)).eachAfter(If(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:Jr(+o),i):r},i}function wy(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function If(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 JP(){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 tD={depth:-1},Ay={},Rf={};function eD(t){return t.id}function nD(t){return t.parentId}function rD(){var t=eD,e=nD,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,_)=>iD(n(b,_,i))),x=y.map(My),v=new Set(y).add("");for(const b of x)v.has(b)||(v.add(b),y.push(b),x.push(My(b)),o.push(Rf));a=(b,_)=>y[_],s=(b,_)=>x[_]}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===Rf&&h.children.length===1;)h=h.children[0],--u;for(let y=o.length-1;y>=0&&(d=o[y],d.data===Rf);--y)d.data=null}if(h.parent=tD,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 iD(t){t=`${t}`;let e=t.length;return Nf(t,e-1)&&!Nf(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&&!Nf(t,e););return t.slice(0,e)}function Nf(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function oD(t,e){return t.parent===e.parent?1:2}function Ff(t){var e=t.children;return e?e[0]:t.t}function Gf(t){var e=t.children;return e?e[e.length-1]:t.t}function aD(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 sD(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 uD(t,e,n){return t.a.parent===e.parent?t.a:n}function Ks(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}Ks.prototype=Object.create(tr.prototype);function cD(t){for(var e=new Ks(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 Ks(o[a],a)),i.parent=n;return(e.parent=new Ks(null,0)).children=[e],e}function lD(){var t=oD,e=1,n=1,r=null;function i(c){var l=cD(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(x){x.x<h.x&&(h=x),x.x>f.x&&(f=x),x.depth>d.depth&&(d=x)});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(x){x.x=(x.x+g)*m,x.y=x.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){sD(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,x=p.m,v=g.m,b;p=Gf(p),f=Ff(f),p&&f;)g=Ff(g),d=Gf(d),d.a=c,b=p.z+x-f.z-m+t(p._,f._),b>0&&(aD(uD(p,c,h),c,b),m+=b,y+=b),x+=p.m,m+=f.m,v+=g.m,y+=d.m;p&&!Gf(d)&&(d.t=p,d.m+=x-y),f&&!Ff(g)&&(g.t=f,g.m+=m-v,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 Qs(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,x,v,b,_,w;l<f;){d=i-n,p=o-r;do m=s[h++].value;while(!m&&h<f);for(y=x=m,_=Math.max(p/d,d/p)/(g*t),w=m*m*_,b=Math.max(x/w,w/y);h<f;++h){if(m+=c=s[h].value,c<y&&(y=c),c>x&&(x=c),w=m*m*_,v=Math.max(x/w,w/y),v>b){m-=c;break}b=v}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):Qs(u,n,r,g?n+=d*m/g:i,o),g-=m,l=h}return a}const zf=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=zf,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:Jr(+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:Jr(+f),l):a},l.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Jr(+f),l):s},l.paddingBottom=function(f){return arguments.length?(u=typeof f=="function"?f:Jr(+f),l):u},l.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:Jr(+f),l):c},l}function fD(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 x=o[h];x.x0=p,x.y0=g,x.x1=m,x.y1=y;return}for(var v=c[h],b=d/2+v,_=h+1,w=f-1;_<w;){var S=_+w>>>1;c[S]<b?_=S+1:w=S}b-c[_-1]<c[_]-b&&h+1<_&&--_;var k=c[_]-v,$=d-k;if(m-p>y-g){var E=d?(p*$+m*k)/d:m;l(h,_,k,p,g,E,y),l(_,f,$,E,g,m,y)}else{var A=d?(g*$+y*k)/d:y;l(h,_,k,p,g,m,A),l(_,f,$,p,A,m,y)}}}function hD(t,e,n,r,i){(t.depth&1?Qs:So)(t,e,n,r,i)}const dD=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):Qs(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 pD(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 gD(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 mD(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function yD(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&&mD(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function bD(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(yD),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 vD(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 xD(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,_D=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),wD=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),Of=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),$D=function t(e){var n=Of.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),SD=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),AD=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Nt),MD=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),TD=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),Uf=function t(e){var n=Of.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=Uf.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),PD=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),DD=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),LD=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),ED=function t(e){var n=Uf.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),kD=1664525,CD=1013904223,Ry=1/4294967296;function ID(t=Math.random()){let e=(0<=t&&t<1?t/Ry:Math.abs(t))|0;return()=>(e=kD*e+CD|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 Bf=Symbol("implicit");function Yf(){var t=new Ei,e=[],n=[],r=Bf;function i(o){let a=t.get(o);if(a===void 0){if(r!==Bf)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 Yf(e,n).unknown(r)},ge.apply(i,arguments),i}function Hf(){var t=Yf().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=hn(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 Hf(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 Wf(){return Ny(Hf.apply(null,arguments).paddingInner(1))}function RD(t){return function(){return t}}function Js(t){return+t}var Fy=[0,1];function Jt(t){return t}function qf(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:RD(isNaN(e)?NaN:.5)}function ND(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function FD(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=qf(i,r),o=n(a,o)):(r=qf(r,i),o=n(o,a)),function(s){return o(r(s))}}function GD(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]=qf(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 tu(){var t=Fy,e=Fy,n=gn,r,i,o,a=Jt,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==Jt&&(a=ND(t[0],t[f-1])),s=f>2?GD:FD,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,Js),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=Ba,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 jf(){return tu()(Jt,Jt)}function Gy(t,e,n,r){var i=va(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=V1(i,a))&&(r.precision=o),Gl(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=X1(i))&&(r.precision=o-(r.type==="%")*2);break}}return eo(r)}function xn(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 Xf(){var t=jf();return t.copy=function(){return Ao(t,Xf())},ge.apply(t,arguments),xn(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,Js),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,Js):[0,1],xn(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 zD(t){return-Math.log(-t)}function OD(t){return-Math.exp(-t)}function UD(t){return isFinite(t)?+("1e"+t):t<0?0:t}function BD(t){return t===10?UD:t===Math.E?Math.exp:e=>Math.pow(t,e)}function YD(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 Vf(t){const e=t(Uy,By),n=e.domain;let r=10,i,o;function a(){return i=YD(r),o=BD(r),n()[0]<0?(i=Yy(i),o=Yy(o),t(zD,OD)):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=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(Oy(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function Hy(){const t=Vf(tu()).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 Zf(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},xn(n)}function jy(){var t=Zf(tu());return t.copy=function(){return Ao(t,jy()).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 HD(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function WD(t){return t<0?-t*t:t*t}function Kf(t){var e=t(Jt,Jt),n=1;function r(){return n===1?t(Jt,Jt):n===.5?t(HD,WD):t(Xy(n),Xy(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},xn(e)}function eu(){var t=Kf(tu());return t.copy=function(){return Ao(t,eu()).exponent(t.exponent())},ge.apply(t,arguments),t}function qD(){return eu.apply(null,arguments).exponent(.5)}function Vy(t){return Math.sign(t)*t*t}function jD(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Zy(){var t=jf(),e=[0,1],n=!1,r;function i(o){var a=jD(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,Js)).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),xn(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(xn(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 Qf=new Date,Jf=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)=>(Qf.setTime(+o),Jf.setTime(+a),t(Qf),t(Jf),Math.floor(n(Qf,Jf))),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 ti=Tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);ti.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):ti);const tb=ti.range,nn=1e3,me=nn*60,rn=me*60,on=rn*24,th=on*7,eb=on*30,eh=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,nu=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()),XD=nu.range,ru=Tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*me)},(t,e)=>(e-t)/me,t=>t.getUTCMinutes()),VD=ru.range,iu=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()),ZD=iu.range,ou=Tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getUTCHours()),KD=ou.range,ei=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),QD=ei.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),JD=Mo.range,nh=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)),tL=nh.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)/th)}const ni=nr(0),To=nr(1),rb=nr(2),ib=nr(3),rr=nr(4),ob=nr(5),ab=nr(6),sb=ni.range,eL=To.range,nL=rb.range,rL=ib.range,iL=rr.range,oL=ob.range,aL=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)/th)}const ri=ir(0),Po=ir(1),ub=ir(2),cb=ir(3),or=ir(4),lb=ir(5),fb=ir(6),hb=ri.range,sL=Po.range,uL=ub.range,cL=cb.range,lL=or.range,fL=lb.range,hL=fb.range,au=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()),dL=au.range,su=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()),pL=su.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 gL=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 mL=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,th],[e,1,eb],[e,3,3*eb],[t,1,eh]];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=ga(([,,m])=>m).right(a,f);if(d===a.length)return t.every(va(c/eh,l/eh,h));if(d===0)return ti.every(Math.max(va(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,su,ri,nh,ou,ru),[mb,yb]=db(Be,au,ni,ei,iu,nu);function rh(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 ih(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),x=Eo(u),v={a:R,A:G,b:M,B:N,c:null,d:Sb,e:Sb,f:zL,g:VL,G:KL,H:NL,I:FL,j:GL,L:Ab,m:OL,M:UL,p:z,q:L,Q:Eb,s:kb,S:BL,u:YL,U:HL,V:WL,w:qL,W:jL,x:null,X:null,y:XL,Y:ZL,Z:QL,"%":Lb},b={a:j,A:q,b:Y,B:X,c:null,d:Tb,e:Tb,f:nE,g:hE,G:pE,H:JL,I:tE,j:eE,L:Pb,m:rE,M:iE,p:Q,q:ct,Q:Eb,s:kb,S:oE,u:aE,U:sE,V:uE,w:cE,W:lE,x:null,X:null,y:fE,Y:dE,Z:gE,"%":Lb},_={a:E,A,b:I,B:D,c:T,d:wb,e:wb,f:kL,g:_b,G:xb,H:$b,I:$b,j:PL,L:EL,m:TL,M:DL,p:$,q:ML,Q:IL,s:RL,S:LL,u:_L,U:wL,V:$L,w:xL,W:SL,x:C,X:P,y:_b,Y:xb,Z:AL,"%":CL};v.x=w(n,v),v.X=w(r,v),v.c=w(e,v),b.x=w(n,b),b.X=w(r,b),b.c=w(e,b);function w(O,tt){return function(st){var H=[],xt=-1,gt=0,Ft=O.length,te,it,Mt;for(st instanceof Date||(st=new Date(+st));++xt<Ft;)O.charCodeAt(xt)===37&&(H.push(O.slice(gt,xt)),(it=vb[te=O.charAt(++xt)])!=null?te=O.charAt(++xt):it=te==="e"?" ":"0",(Mt=tt[te])&&(te=Mt(st,it)),H.push(te),gt=xt+1);return H.push(O.slice(gt,xt)),H.join("")}}function S(O,tt){return function(st){var H=Do(1900,void 0,1),xt=k(H,O,st+="",0),gt,Ft;if(xt!=st.length)return null;if("Q"in H)return new Date(H.Q);if("s"in H)return new Date(H.s*1e3+("L"in H?H.L:0));if(tt&&!("Z"in H)&&(H.Z=0),"p"in H&&(H.H=H.H%12+H.p*12),H.m===void 0&&(H.m="q"in H?H.q:0),"V"in H){if(H.V<1||H.V>53)return null;"w"in H||(H.w=1),"Z"in H?(gt=ih(Do(H.y,0,1)),Ft=gt.getUTCDay(),gt=Ft>4||Ft===0?Po.ceil(gt):Po(gt),gt=Mo.offset(gt,(H.V-1)*7),H.y=gt.getUTCFullYear(),H.m=gt.getUTCMonth(),H.d=gt.getUTCDate()+(H.w+6)%7):(gt=rh(Do(H.y,0,1)),Ft=gt.getDay(),gt=Ft>4||Ft===0?To.ceil(gt):To(gt),gt=ei.offset(gt,(H.V-1)*7),H.y=gt.getFullYear(),H.m=gt.getMonth(),H.d=gt.getDate()+(H.w+6)%7)}else("W"in H||"U"in H)&&("w"in H||(H.w="u"in H?H.u%7:"W"in H?1:0),Ft="Z"in H?ih(Do(H.y,0,1)).getUTCDay():rh(Do(H.y,0,1)).getDay(),H.m=0,H.d="W"in H?(H.w+6)%7+H.W*7-(Ft+5)%7:H.w+H.U*7-(Ft+6)%7);return"Z"in H?(H.H+=H.Z/100|0,H.M+=H.Z%100,ih(H)):rh(H)}}function k(O,tt,st,H){for(var xt=0,gt=tt.length,Ft=st.length,te,it;xt<gt;){if(H>=Ft)return-1;if(te=tt.charCodeAt(xt++),te===37){if(te=tt.charAt(xt++),it=_[te in vb?tt.charAt(xt++):te],!it||(H=it(O,st,H))<0)return-1}else if(te!=st.charCodeAt(H++))return-1}return H}function $(O,tt,st){var H=c.exec(tt.slice(st));return H?(O.p=l.get(H[0].toLowerCase()),st+H[0].length):-1}function E(O,tt,st){var H=d.exec(tt.slice(st));return H?(O.w=p.get(H[0].toLowerCase()),st+H[0].length):-1}function A(O,tt,st){var H=h.exec(tt.slice(st));return H?(O.w=f.get(H[0].toLowerCase()),st+H[0].length):-1}function I(O,tt,st){var H=y.exec(tt.slice(st));return H?(O.m=x.get(H[0].toLowerCase()),st+H[0].length):-1}function D(O,tt,st){var H=g.exec(tt.slice(st));return H?(O.m=m.get(H[0].toLowerCase()),st+H[0].length):-1}function T(O,tt,st){return k(O,e,tt,st)}function C(O,tt,st){return k(O,n,tt,st)}function P(O,tt,st){return k(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 L(O){return 1+~~(O.getMonth()/3)}function j(O){return a[O.getUTCDay()]}function q(O){return o[O.getUTCDay()]}function Y(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=w(O+="",v);return tt.toString=function(){return O},tt},parse:function(O){var tt=S(O+="",!1);return tt.toString=function(){return O},tt},utcFormat:function(O){var tt=w(O+="",b);return tt.toString=function(){return O},tt},utcParse:function(O){var tt=S(O+="",!0);return tt.toString=function(){return O},tt}}}var vb={"-":"",_:" ",0:"0"},Rt=/^\s*\d+/,yL=/^%/,bL=/[\\^$*+?|[\]().{}]/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 vL(t){return t.replace(bL,"\\$&")}function Lo(t){return new RegExp("^(?:"+t.map(vL).join("|")+")","i")}function Eo(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function xL(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function _L(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function wL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function $L(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function SL(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 AL(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 ML(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 TL(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 PL(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 DL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function LL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function EL(t,e,n){var r=Rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function kL(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 CL(t,e,n){var r=yL.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function IL(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function RL(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 NL(t,e){return pt(t.getHours(),e,2)}function FL(t,e){return pt(t.getHours()%12||12,e,2)}function GL(t,e){return pt(1+ei.count(Be(t),t),e,3)}function Ab(t,e){return pt(t.getMilliseconds(),e,3)}function zL(t,e){return Ab(t,e)+"000"}function OL(t,e){return pt(t.getMonth()+1,e,2)}function UL(t,e){return pt(t.getMinutes(),e,2)}function BL(t,e){return pt(t.getSeconds(),e,2)}function YL(t){var e=t.getDay();return e===0?7:e}function HL(t,e){return pt(ni.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 WL(t,e){return t=Mb(t),pt(rr.count(Be(t),t)+(Be(t).getDay()===4),e,2)}function qL(t){return t.getDay()}function jL(t,e){return pt(To.count(Be(t)-1,t),e,2)}function XL(t,e){return pt(t.getFullYear()%100,e,2)}function VL(t,e){return t=Mb(t),pt(t.getFullYear()%100,e,2)}function ZL(t,e){return pt(t.getFullYear()%1e4,e,4)}function KL(t,e){var n=t.getDay();return t=n>=4||n===0?rr(t):rr.ceil(t),pt(t.getFullYear()%1e4,e,4)}function QL(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 JL(t,e){return pt(t.getUTCHours(),e,2)}function tE(t,e){return pt(t.getUTCHours()%12||12,e,2)}function eE(t,e){return pt(1+Mo.count(Ye(t),t),e,3)}function Pb(t,e){return pt(t.getUTCMilliseconds(),e,3)}function nE(t,e){return Pb(t,e)+"000"}function rE(t,e){return pt(t.getUTCMonth()+1,e,2)}function iE(t,e){return pt(t.getUTCMinutes(),e,2)}function oE(t,e){return pt(t.getUTCSeconds(),e,2)}function aE(t){var e=t.getUTCDay();return e===0?7:e}function sE(t,e){return pt(ri.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 uE(t,e){return t=Db(t),pt(or.count(Ye(t),t)+(Ye(t).getUTCDay()===4),e,2)}function cE(t){return t.getUTCDay()}function lE(t,e){return pt(Po.count(Ye(t)-1,t),e,2)}function fE(t,e){return pt(t.getUTCFullYear()%100,e,2)}function hE(t,e){return t=Db(t),pt(t.getUTCFullYear()%100,e,2)}function dE(t,e){return pt(t.getUTCFullYear()%1e4,e,4)}function pE(t,e){var n=t.getUTCDay();return t=n>=4||n===0?or(t):or.ceil(t),pt(t.getUTCFullYear()%1e4,e,4)}function gE(){return"+0000"}function Lb(){return"%"}function Eb(t){return+t}function kb(t){return Math.floor(+t/1e3)}var ii,oh,Cb,uu,ah;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 ii=bb(t),oh=ii.format,Cb=ii.parse,uu=ii.utcFormat,ah=ii.utcParse,ii}var Rb="%Y-%m-%dT%H:%M:%S.%LZ";function mE(t){return t.toISOString()}var yE=Date.prototype.toISOString?mE:uu(Rb);const bE=yE;function vE(t){var e=new Date(t);return isNaN(e)?null:e}var xE=+new Date("2000-01-01T00:00:00.000Z")?vE:ah(Rb);const _E=xE;function wE(t){return new Date(t)}function $E(t){return t instanceof Date?+t:+new Date(+t)}function sh(t,e,n,r,i,o,a,s,u,c){var l=jf(),h=l.invert,f=l.domain,d=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),x=c("%b %d"),v=c("%B"),b=c("%Y");function _(w){return(u(w)<w?d:s(w)<w?p:a(w)<w?g:o(w)<w?m:r(w)<w?i(w)<w?y:x:n(w)<w?v:b)(w)}return l.invert=function(w){return new Date(h(w))},l.domain=function(w){return arguments.length?f(Array.from(w,$E)):f().map(wE)},l.ticks=function(w){var S=f();return t(S[0],S[S.length-1],w??10)},l.tickFormat=function(w,S){return S==null?_:c(S)},l.nice=function(w){var S=f();return(!w||typeof w.range!="function")&&(w=e(S[0],S[S.length-1],w??10)),w?f(Oy(S,w)):l},l.copy=function(){return Ao(l,sh(t,e,n,r,i,o,a,s,u,c))},l}function SE(){return ge.apply(sh(mb,yb,Be,au,ni,ei,iu,nu,an,oh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function AE(){return ge.apply(sh(pb,gb,Ye,su,ri,Mo,ou,ru,an,uu).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function cu(){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(gn),c.rangeRound=l(Ba),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 _n(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Nb(){var t=xn(cu()(Jt));return t.copy=function(){return _n(t,Nb())},en.apply(t,arguments)}function Fb(){var t=Vf(cu()).domain([1,10]);return t.copy=function(){return _n(t,Fb()).base(t.base())},en.apply(t,arguments)}function Gb(){var t=Zf(cu());return t.copy=function(){return _n(t,Gb()).constant(t.constant())},en.apply(t,arguments)}function uh(){var t=Kf(cu());return t.copy=function(){return _n(t,uh()).exponent(t.exponent())},en.apply(t,arguments)}function ME(){return uh.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 lu(){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,x,v;return arguments.length?([y,x,v]=m,c=O0(g,[y,x,v]),d):[c(0),c(.5),c(1)]}}return d.range=p(gn),d.rangeRound=p(Ba),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=xn(lu()(Jt));return t.copy=function(){return _n(t,Ob())},en.apply(t,arguments)}function Ub(){var t=Vf(lu()).domain([.1,1,10]);return t.copy=function(){return _n(t,Ub()).base(t.base())},en.apply(t,arguments)}function Bb(){var t=Zf(lu());return t.copy=function(){return _n(t,Bb()).constant(t.constant())},en.apply(t,arguments)}function ch(){var t=Kf(lu());return t.copy=function(){return _n(t,ch()).exponent(t.exponent())},en.apply(t,arguments)}function TE(){return ch.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 PE=ut("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),DE=ut("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),LE=ut("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),EE=ut("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),kE=ut("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),CE=ut("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),IE=ut("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),RE=ut("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),NE=ut("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),FE=ut("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),GE=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 zE=bt(Yb);var Hb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ut);const OE=bt(Hb);var Wb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ut);const UE=bt(Wb);var qb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ut);const BE=bt(qb);var jb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ut);const YE=bt(jb);var Xb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ut);const HE=bt(Xb);var Vb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ut);const WE=bt(Vb);var Zb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ut);const qE=bt(Zb);var Kb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ut);const jE=bt(Kb);var Qb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ut);const XE=bt(Qb);var Jb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ut);const VE=bt(Jb);var tv=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ut);const ZE=bt(tv);var ev=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ut);const KE=bt(ev);var nv=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ut);const QE=bt(nv);var rv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ut);const JE=bt(rv);var iv=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ut);const tk=bt(iv);var ov=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ut);const ek=bt(ov);var av=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ut);const nk=bt(av);var sv=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ut);const rk=bt(sv);var uv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ut);const ik=bt(uv);var cv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ut);const ok=bt(cv);var lv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ut);const ak=bt(lv);var fv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ut);const sk=bt(fv);var hv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ut);const uk=bt(hv);var dv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ut);const ck=bt(dv);var pv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ut);const lk=bt(pv);var gv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ut);const fk=bt(gv);function hk(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 dk=Ha(Me(300,.5,0),Me(-240,.5,1));var pk=Ha(Me(-100,.75,.35),Me(80,1.5,.8)),gk=Ha(Me(260,.75,.35),Me(80,1.5,.8)),fu=Me();function mk(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return fu.h=360*t-100,fu.s=1.5-1.5*e,fu.l=.8-.9*e,fu+""}var hu=Cr(),yk=Math.PI/3,bk=Math.PI*2/3;function vk(t){var e;return t=(.5-t)*Math.PI,hu.r=255*(e=Math.sin(t))*e,hu.g=255*(e=Math.sin(t+yk))*e,hu.b=255*(e=Math.sin(t+bk))*e,hu+""}function xk(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 du(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const _k=du(ut("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var wk=du(ut("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),$k=du(ut("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Sk=du(ut("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function at(t){return function(){return t}}const mv=Math.abs,Ut=Math.atan2,sn=Math.cos,Ak=Math.max,oi=Math.min,ie=Math.sin,vt=Math.sqrt,Bt=1e-12,wn=Math.PI,pu=wn/2,$n=2*wn;function Mk(t){return t>1?0:t<-1?wn:Math.acos(t)}function yv(t){return t>=1?pu:t<=-1?-pu: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 Tk(t){return t.innerRadius}function Pk(t){return t.outerRadius}function Dk(t){return t.startAngle}function Lk(t){return t.endAngle}function Ek(t){return t&&t.padAngle}function kk(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 gu(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,x=p-f,v=g-d,b=x*x+v*v,_=i-o,w=f*g-p*d,S=(v<0?-1:1)*vt(Ak(0,_*_*b-w*w)),k=(w*v-x*S)/b,$=(-w*x-v*S)/b,E=(w*v+x*S)/b,A=(-w*x+v*S)/b,I=k-m,D=$-y,T=E-m,C=A-y;return I*I+D*D>T*T+C*C&&(k=E,$=A),{cx:k,cy:$,x01:-l,y01:-h,x11:k*(i/_-1),y11:$*(i/_-1)}}function bv(){var t=Tk,e=Pk,n=at(0),r=null,i=Dk,o=Lk,a=Ek,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)-pu,g=o.apply(this,arguments)-pu,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>$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 x=p,v=g,b=p,_=g,w=m,S=m,k=a.apply(this,arguments)/2,$=k>Bt&&(r?+r.apply(this,arguments):vt(f*f+d*d)),E=oi(mv(d-f)/2,+n.apply(this,arguments)),A=E,I=E,D,T;if($>Bt){var C=yv($/f*ie(k)),P=yv($/d*ie(k));(w-=C*2)>Bt?(C*=y?1:-1,b+=C,_-=C):(w=0,b=_=(p+g)/2),(S-=P*2)>Bt?(P*=y?1:-1,x+=P,v-=P):(S=0,x=v=(p+g)/2)}var R=d*sn(x),G=d*ie(x),M=f*sn(_),N=f*ie(_);if(E>Bt){var z=d*sn(v),L=d*ie(v),j=f*sn(b),q=f*ie(b),Y;if(m<wn)if(Y=kk(R,G,j,q,z,L,M,N)){var X=R-Y[0],Q=G-Y[1],ct=z-Y[0],O=L-Y[1],tt=1/ie(Mk((X*ct+Q*O)/(vt(X*X+Q*Q)*vt(ct*ct+O*O)))/2),st=vt(Y[0]*Y[0]+Y[1]*Y[1]);A=oi(E,(f-st)/(tt-1)),I=oi(E,(d-st)/(tt+1))}else A=I=0}S>Bt?I>Bt?(D=gu(j,q,R,G,d,I,y),T=gu(z,L,M,N,d,I,y),s.moveTo(D.cx+D.x01,D.cy+D.y01),I<E?s.arc(D.cx,D.cy,I,Ut(D.y01,D.x01),Ut(T.y01,T.x01),!y):(s.arc(D.cx,D.cy,I,Ut(D.y01,D.x01),Ut(D.y11,D.x11),!y),s.arc(0,0,d,Ut(D.cy+D.y11,D.cx+D.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,x,v,!y)):s.moveTo(R,G),!(f>Bt)||!(w>Bt)?s.lineTo(M,N):A>Bt?(D=gu(M,N,z,L,f,-A,y),T=gu(R,G,j,q,f,-A,y),s.lineTo(D.cx+D.x01,D.cy+D.y01),A<E?s.arc(D.cx,D.cy,A,Ut(D.y01,D.x01),Ut(T.y01,T.x01),!y):(s.arc(D.cx,D.cy,A,Ut(D.y01,D.x01),Ut(D.y11,D.x11),!y),s.arc(0,0,f,Ut(D.cy+D.y11,D.cx+D.x11),Ut(T.cy+T.y11,T.cx+T.x11),y),s.arc(T.cx,T.cy,A,Ut(T.y11,T.x11),Ut(T.y01,T.x01),!y))):s.arc(0,0,f,_,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-wn/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 Ck=Array.prototype.slice;function mu(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 yu(t){return new vv(t)}function lh(t){return t[0]}function fh(t){return t[1]}function bu(t,e){var n=at(!0),r=null,i=yu,o=null,a=ko(s);t=typeof t=="function"?t:t===void 0?lh:at(t),e=typeof e=="function"?e:e===void 0?fh:at(e);function s(u){var c,l=(u=mu(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 hh(t,e,n){var r=null,i=at(!0),o=null,a=yu,s=null,u=ko(c);t=typeof t=="function"?t:t===void 0?lh:at(+t),e=typeof e=="function"?e:at(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?fh:at(+n);function c(h){var f,d,p,g=(h=mu(h)).length,m,y=!1,x,v=new Array(g),b=new Array(g);for(o==null&&(s=a(x=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(v[p],b[p]);s.lineEnd(),s.areaEnd()}y&&(v[f]=+t(m,f,h),b[f]=+e(m,f,h),s.point(r?+r(m,f,h):v[f],n?+n(m,f,h):b[f]))}if(x)return s=null,x+""||null}function l(){return bu().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 Ik(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Rk(t){return t}function xv(){var t=Rk,e=Ik,n=null,r=at(0),i=at($n),o=at(0);function a(s){var u,c=(s=mu(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,x=Math.min(Math.abs(m)/c,o.apply(this,arguments)),v=x*(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[_],p[w])}):n!=null&&d.sort(function(_,w){return n(s[_],s[w])}),u=0,h=f?(m-c*v)/f:0;u<c;++u,g=y)l=d[u],b=p[l],y=g+(b>0?b*h:0)+v,p[l]={data:s[l],index:u,value:b,startAngle:g,endAngle:y,padAngle:x};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=dh(yu);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 dh(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(dh(n)):e()._curve},t}function $v(){return Co(bu().curve(_v))}function Sv(){var t=hh().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(dh(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 Nk{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 Fk(t){return new Nk(t)}function Gk(t){return t.source}function zk(t){return t.target}function vu(t){let e=Gk,n=zk,r=lh,i=fh,o=null,a=null,s=ko(u);function u(){let c;const l=Ck.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 Ok(){return vu(Mv)}function Uk(){return vu(Tv)}function Bk(){const t=vu(Fk);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const Yk=vt(3),Pv={draw(t,e){const n=vt(e+oi(e/28,.75))*.59436,r=n/2,i=r*Yk;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},xu={draw(t,e){const n=vt(e/wn);t.moveTo(n,0),t.arc(0,0,n,0,$n)}},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),Hk=Lv*2,Ev={draw(t,e){const n=vt(e/Hk),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-oi(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()}},Wk=.8908130915292852,Nv=ie(wn/10)/ie(7*wn/10),qk=ie($n/10)*Nv,jk=-sn($n/10)*Nv,Fv={draw(t,e){const n=vt(e*Wk),r=qk*n,i=jk*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()}},ph=vt(3),Gv={draw(t,e){const n=-vt(e/(ph*3));t.moveTo(0,n*2),t.lineTo(-ph*n,-n),t.lineTo(ph*n,-n),t.closePath()}},Xk=vt(3),zv={draw(t,e){const n=vt(e)*.6824,r=n/2,i=n*Xk/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},ye=-.5,be=vt(3)/2,gh=1/vt(12),Vk=(gh/2+1)*3,Ov={draw(t,e){const n=vt(e/Vk),r=n/2,i=n*gh,o=r,a=n*gh+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()}},mh={draw(t,e){const n=vt(e-oi(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},Uv=[xu,Dv,Ev,Iv,Fv,Gv,Ov],Zk=[xu,Cv,mh,zv,Pv,Rv,kv];function Kk(t,e){let n=null,r=ko(i);t=typeof t=="function"?t:at(t||xu),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 Sn(){}function _u(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 wu(t){this._context=t}wu.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:_u(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:_u(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Qk(t){return new wu(t)}function Bv(t){this._context=t}Bv.prototype={areaStart:Sn,areaEnd:Sn,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:_u(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Jk(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:_u(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function tC(t){return new Yv(t)}function Hv(t,e){this._basis=new wu(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 eC=function t(e){function n(r){return e===1?new wu(r):new Hv(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function $u(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 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(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:$u(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:$u(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 nC=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){this._context=t,this._k=(1-e)/6}bh.prototype={areaStart:Sn,areaEnd:Sn,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:$u(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 rC=function t(e){function n(r){return new bh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function vh(t,e){this._context=t,this._k=(1-e)/6}vh.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:$u(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 iC=function t(e){function n(r){return new vh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function xh(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:xh(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 oC=function t(e){function n(r){return e?new Wv(r,e):new yh(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:Sn,areaEnd:Sn,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:xh(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 aC=function t(e){function n(r){return e?new qv(r,e):new bh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function jv(t,e){this._context=t,this._alpha=e}jv.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:xh(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 sC=function t(e){function n(r){return e?new jv(r,e):new vh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Xv(t){this._context=t}Xv.prototype={areaStart:Sn,areaEnd:Sn,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 uC(t){return new Xv(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 _h(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 Su(t){this._context=t}Su.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:_h(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,_h(this,Kv(this,n=Zv(this,t,e)),n);break;default:_h(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(Su.prototype)).point=function(t,e){Su.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 cC(t){return new Su(t)}function lC(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 fC(t){return new t2(t)}function Au(t,e){this._context=t,this._t=e}Au.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 hC(t){return new Au(t,.5)}function dC(t){return new Au(t,0)}function pC(t){return new Au(t,1)}function ai(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 si(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function gC(t,e){return t[e]}function mC(t){const e=[];return e.key=t,e}function yC(){var t=at([]),e=si,n=ai,r=gC;function i(o){var a=Array.from(t.apply(this,arguments),mC),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=mu(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?si:typeof o=="function"?o:at(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??ai,i):n},i}function bC(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}ai(t,e)}}function vC(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 xC(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}ai(t,e)}}function _C(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,ai(t,e)}}function n2(t){var e=t.map(wC);return si(t).sort(function(n,r){return e[n]-e[r]})}function wC(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 si(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 $C(t){return r2(t).reverse()}function SC(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 AC(t){return si(t).reverse()}const Mu=t=>()=>t;function MC(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 Tu=new He(1,0,0);o2.prototype=He.prototype;function o2(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Tu;return t.__zoom}function wh(t){t.stopImmediatePropagation()}function Ro(t){t.preventDefault(),t.stopImmediatePropagation()}function TC(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function PC(){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||Tu}function DC(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function LC(){return navigator.maxTouchPoints||"ontouchstart"in this}function EC(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=TC,e=PC,n=EC,r=DC,i=LC,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",k,{passive:!1}).on("mousedown.zoom",$).on("dblclick.zoom",E).filter(i).on("touchstart.zoom",A).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",D).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(T,C,P,R){var G=T.selection?T.selection():T;G.property("__zoom",a2),T!==G?_(T,C,P,R):G.interrupt().each(function(){w(this,arguments).event(R).start().zoom(null,typeof C=="function"?C.apply(this,arguments):C).end()})},y.scaleBy=function(T,C,P,R){y.scaleTo(T,function(){var G=this.__zoom.k,M=typeof C=="function"?C.apply(this,arguments):C;return G*M},P,R)},y.scaleTo=function(T,C,P,R){y.transform(T,function(){var G=e.apply(this,arguments),M=this.__zoom,N=P==null?b(G):typeof P=="function"?P.apply(this,arguments):P,z=M.invert(N),L=typeof C=="function"?C.apply(this,arguments):C;return n(v(x(M,L),N,z),G,a)},P,R)},y.translateBy=function(T,C,P,R){y.transform(T,function(){return n(this.__zoom.translate(typeof C=="function"?C.apply(this,arguments):C,typeof P=="function"?P.apply(this,arguments):P),e.apply(this,arguments),a)},null,R)},y.translateTo=function(T,C,P,R,G){y.transform(T,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(Tu.translate(z[0],z[1]).scale(N.k).translate(typeof C=="function"?-C.apply(this,arguments):-C,typeof P=="function"?-P.apply(this,arguments):-P),M,a)},R,G)};function x(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 v(T,C,P){var R=C[0]-P[0]*T.k,G=C[1]-P[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 _(T,C,P,R){T.on("start.zoom",function(){w(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){w(this,arguments).event(R).end()}).tween("zoom",function(){var G=this,M=arguments,N=w(G,M).event(R),z=e.apply(G,M),L=P==null?b(z):typeof P=="function"?P.apply(G,M):P,j=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),q=G.__zoom,Y=typeof C=="function"?C.apply(G,M):C,X=u(q.invert(L).concat(j/q.k),Y.invert(L).concat(j/Y.k));return function(Q){if(Q===1)Q=Y;else{var ct=X(Q),O=j/ct[2];Q=new He(O,L[0]-ct[0]*O,L[1]-ct[1]*O)}N.zoom(null,Q)}})}function w(T,C,P){return!P&&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 MC(T,{sourceEvent:this.sourceEvent,target:y,type:T,transform:this.that.__zoom,dispatch:c}),C)}};function k(T,...C){if(!t.apply(this,arguments))return;var P=w(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)))),M=se(T);if(P.wheel)(P.mouse[0][0]!==M[0]||P.mouse[0][1]!==M[1])&&(P.mouse[1]=R.invert(P.mouse[0]=M)),clearTimeout(P.wheel);else{if(R.k===G)return;P.mouse=[M,R.invert(M)],Hn(this),P.start()}Ro(T),P.wheel=setTimeout(N,p),P.zoom("mouse",n(v(x(R,G),P.mouse[0],P.mouse[1]),P.extent,a));function N(){P.wheel=null,P.end()}}function $(T,...C){if(f||!t.apply(this,arguments))return;var P=T.currentTarget,R=w(this,C,!0).event(T),G=V(T.view).on("mousemove.zoom",L,!0).on("mouseup.zoom",j,!0),M=se(T,P),N=T.clientX,z=T.clientY;Da(T.view),wh(T),R.mouse=[M,this.__zoom.invert(M)],Hn(this),R.start();function L(q){if(Ro(q),!R.moved){var Y=q.clientX-N,X=q.clientY-z;R.moved=Y*Y+X*X>g}R.event(q).zoom("mouse",n(v(R.that.__zoom,R.mouse[0]=se(q,P),R.mouse[1]),R.extent,a))}function j(q){G.on("mousemove.zoom mouseup.zoom",null),La(q.view,R.moved),Ro(q),R.event(q).end()}}function E(T,...C){if(t.apply(this,arguments)){var P=this.__zoom,R=se(T.changedTouches?T.changedTouches[0]:T,this),G=P.invert(R),M=P.k*(T.shiftKey?.5:2),N=n(v(x(P,M),R,G),e.apply(this,C),a);Ro(T),s>0?V(this).transition().duration(s).call(_,N,R,T):V(this).call(y.transform,N,R,T)}}function A(T,...C){if(t.apply(this,arguments)){var P=T.touches,R=P.length,G=w(this,C,T.changedTouches.length===R).event(T),M,N,z,L;for(wh(T),N=0;N<R;++N)z=P[N],L=se(z,this),L=[L,this.__zoom.invert(L),z.identifier],G.touch0?!G.touch1&&G.touch0[2]!==L[2]&&(G.touch1=L,G.taps=0):(G.touch0=L,M=!0,G.taps=1+!!l);l&&(l=clearTimeout(l)),M&&(G.taps<2&&(h=L[0],l=setTimeout(function(){l=null},d)),Hn(this),G.start())}}function I(T,...C){if(this.__zooming){var P=w(this,C).event(T),R=T.changedTouches,G=R.length,M,N,z,L;for(Ro(T),M=0;M<G;++M)N=R[M],z=se(N,this),P.touch0&&P.touch0[2]===N.identifier?P.touch0[0]=z:P.touch1&&P.touch1[2]===N.identifier&&(P.touch1[0]=z);if(N=P.that.__zoom,P.touch1){var j=P.touch0[0],q=P.touch0[1],Y=P.touch1[0],X=P.touch1[1],Q=(Q=Y[0]-j[0])*Q+(Q=Y[1]-j[1])*Q,ct=(ct=X[0]-q[0])*ct+(ct=X[1]-q[1])*ct;N=x(N,Math.sqrt(Q/ct)),z=[(j[0]+Y[0])/2,(j[1]+Y[1])/2],L=[(q[0]+X[0])/2,(q[1]+X[1])/2]}else if(P.touch0)z=P.touch0[0],L=P.touch0[1];else return;P.zoom("touch",n(v(N,z,L),P.extent,a))}}function D(T,...C){if(this.__zooming){var P=w(this,C).event(T),R=T.changedTouches,G=R.length,M,N;for(wh(T),f&&clearTimeout(f),f=setTimeout(function(){f=null},d),M=0;M<G;++M)N=R[M],P.touch0&&P.touch0[2]===N.identifier?delete P.touch0:P.touch1&&P.touch1[2]===N.identifier&&delete P.touch1;if(P.touch1&&!P.touch0&&(P.touch0=P.touch1,delete P.touch1),P.touch0)P.touch0[1]=this.__zoom.invert(P.touch0[0]);else if(P.end(),P.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:Mu(+T),y):r},y.filter=function(T){return arguments.length?(t=typeof T=="function"?T:Mu(!!T),y):t},y.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:Mu(!!T),y):i},y.extent=function(T){return arguments.length?(e=typeof T=="function"?T:Mu([[+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:kl,FormatSpecifier:ls,InternMap:Ei,InternSet:Cn,Node:tr,Path:Ki,Voronoi:S1,ZoomTransform:He,active:RM,arc:bv,area:hh,areaRadial:Sv,ascending:_t,autoType:o9,axisBottom:T5,axisLeft:Gg,axisRight:M5,axisTop:Fg,bin:Tg,bisect:kn,bisectCenter:wA,bisectLeft:_A,bisectRight:hg,bisector:ga,blob:u9,blur:$A,blur2:dg,blurImage:SA,brush:XM,brushSelection:WM,brushX:qM,brushY:jM,buffer:l9,chord:ZM,chordDirected:QM,chordTranspose:KM,cluster:wP,color:pn,contourDensity:S7,contours:Tl,count:ya,create:u8,creator:Ma,cross:EA,csv:d9,csvFormat:X7,csvFormatBody:V7,csvFormatRow:K7,csvFormatRows:Z7,csvFormatValue:Q7,csvParse:P1,csvParseRows:j7,cubehelix:Me,cumsum:kA,curveBasis:Qk,curveBasisClosed:Jk,curveBasisOpen:tC,curveBumpX:Mv,curveBumpY:Tv,curveBundle:eC,curveCardinal:nC,curveCardinalClosed:rC,curveCardinalOpen:iC,curveCatmullRom:oC,curveCatmullRomClosed:aC,curveCatmullRomOpen:sC,curveLinear:yu,curveLinearClosed:uC,curveMonotoneX:cC,curveMonotoneY:lC,curveNatural:fC,curveStep:hC,curveStepAfter:pC,curveStepBefore:dC,descending:lg,deviation:mg,difference:p5,disjoint:g5,dispatch:Nn,drag:Zg,dragDisable:Da,dragEnable:La,dsv:h9,dsvFormat:as,easeBack:i1,easeBackIn:TM,easeBackInOut:i1,easeBackOut:PM,easeBounce:Vi,easeBounceIn:AM,easeBounceInOut:MM,easeBounceOut:Vi,easeCircle:r1,easeCircleIn:gM,easeCircleInOut:r1,easeCircleOut:mM,easeCubic:Xi,easeCubicIn:sM,easeCubicInOut:Xi,easeCubicOut:uM,easeElastic:Ja,easeElasticIn:DM,easeElasticInOut:LM,easeElasticOut:Ja,easeExp:n1,easeExpIn:dM,easeExpInOut:n1,easeExpOut:pM,easeLinear:iM,easePoly:Q0,easePolyIn:cM,easePolyInOut:Q0,easePolyOut:lM,easeQuad:K0,easeQuadIn:oM,easeQuadInOut:K0,easeQuadOut:aM,easeSin:e1,easeSinIn:fM,easeSinInOut:e1,easeSinOut:hM,every:u5,extent:Li,fcumsum:IA,filter:l5,flatGroup:RA,flatRollup:NA,forceCenter:_9,forceCollide:C1,forceLink:U9,forceManyBody:F1,forceRadial:V9,forceSimulation:N1,forceX:G1,forceY:z1,get format(){return eo},formatDefaultLocale:j1,formatLocale:q1,get formatPrefix(){return Gl},formatSpecifier:Wr,fsum:CA,geoAlbers:sy,geoAlbersUsa:tP,geoArea:oT,geoAzimuthalEqualArea:eP,geoAzimuthalEqualAreaRaw:Sf,geoAzimuthalEquidistant:nP,geoAzimuthalEquidistantRaw:Af,geoBounds:cT,geoCentroid:gT,geoCircle:mT,geoClipAntimeridian:nf,geoClipCircle:Dm,geoClipExtent:$T,geoClipRectangle:ks,geoConicConformal:iP,geoConicConformalRaw:ly,geoConicEqualArea:Hs,geoConicEqualAreaRaw:ay,geoConicEquidistant:aP,geoConicEquidistantRaw:fy,geoContains:LT,geoDistance:Rs,geoEqualEarth:uP,geoEqualEarthRaw:Mf,geoEquirectangular:oP,geoEquirectangularRaw:bo,geoGnomonic:cP,geoGnomonicRaw:Tf,geoGraticule:zm,geoGraticule10:ET,geoIdentity:lP,geoInterpolate:kT,geoLength:Lm,geoMercator:rP,geoMercatorRaw:yo,geoNaturalEarth1:fP,geoNaturalEarth1Raw:Pf,geoOrthographic:hP,geoOrthographicRaw:Df,geoPath:HT,geoProjection:Ue,geoProjectionMutator:wf,geoRotation:_m,geoStereographic:dP,geoStereographicRaw:Lf,geoStream:Pe,geoTransform:WT,geoTransverseMercator:pP,geoTransverseMercatorRaw:Ef,gray:P8,greatest:Pg,greatestIndex:n5,group:xg,groupSort:zA,groups:_g,hcl:Ga,hierarchy:js,histogram:Tg,hsl:Ia,html:v9,image:g9,index:FA,indexes:GA,interpolate:gn,interpolateArray:I8,interpolateBasis:_0,interpolateBasisClosed:w0,interpolateBlues:ak,interpolateBrBG:zE,interpolateBuGn:XE,interpolateBuPu:VE,interpolateCividis:hk,interpolateCool:gk,interpolateCubehelix:V8,interpolateCubehelixDefault:dk,interpolateCubehelixLong:Ha,interpolateDate:P0,interpolateDiscrete:F8,interpolateGnBu:ZE,interpolateGreens:sk,interpolateGreys:uk,interpolateHcl:j8,interpolateHclLong:X8,interpolateHsl:H8,interpolateHslLong:W8,interpolateHue:G8,interpolateInferno:$k,interpolateLab:q8,interpolateMagma:wk,interpolateNumber:he,interpolateNumberArray:Qc,interpolateObject:D0,interpolateOrRd:KE,interpolateOranges:fk,interpolatePRGn:OE,interpolatePiYG:UE,interpolatePlasma:Sk,interpolatePuBu:JE,interpolatePuBuGn:QE,interpolatePuOr:BE,interpolatePuRd:tk,interpolatePurples:ck,interpolateRainbow:mk,interpolateRdBu:YE,interpolateRdGy:HE,interpolateRdPu:ek,interpolateRdYlBu:WE,interpolateRdYlGn:qE,interpolateReds:lk,interpolateRgb:Ui,interpolateRgbBasis:A0,interpolateRgbBasisClosed:C8,interpolateRound:Ba,interpolateSinebow:vk,interpolateSpectral:jE,interpolateString:el,interpolateTransformCss:C0,interpolateTransformSvg:I0,interpolateTurbo:xk,interpolateViridis:_k,interpolateWarm:pk,interpolateYlGn:rk,interpolateYlGnBu:nk,interpolateYlOrBr:ik,interpolateYlOrRd:ok,interpolateZoom:N0,interrupt:Hn,intersection:m5,interval:t4,isoFormat:bE,isoParse:_E,json:y9,lab:Fa,lch:D8,least:e5,leastIndex:Eg,line:bu,lineRadial:$v,link:vu,linkHorizontal:Ok,linkRadial:Bk,linkVertical:Uk,local:Xg,map:f5,matcher:Fc,max:ki,maxIndex:Lc,mean:jA,median:XA,medianIndex:VA,merge:kc,min:xa,minIndex:Ec,mode:KA,namespace:Ni,namespaces:Rc,nice:Pc,now:qi,pack:QP,packEnclose:qP,packSiblings:ZP,pairs:QA,partition:JP,path:Ml,pathRound:e7,permute:Mg,pie:xv,piecewise:O0,pointRadial:Io,pointer:se,pointers:l8,polygonArea:pD,polygonCentroid:gD,polygonContains:vD,polygonHull:bD,polygonLength:xD,precisionFixed:X1,precisionPrefix:V1,precisionRound:Z1,quadtree:us,quantile:Ii,quantileIndex:Lg,quantileSorted:Dg,quantize:Z8,quickselect:_a,radialArea:Sv,radialLine:$v,randomBates:SD,randomBernoulli:TD,randomBeta:Cy,randomBinomial:Iy,randomCauchy:DD,randomExponential:AD,randomGamma:Uf,randomGeometric:ky,randomInt:wD,randomIrwinHall:Ey,randomLcg:ID,randomLogNormal:$D,randomLogistic:LD,randomNormal:Of,randomPareto:MD,randomPoisson:ED,randomUniform:_D,randomWeibull:PD,range:hn,rank:t5,reduce:h5,reverse:d5,rgb:Cr,ribbon:c7,ribbonArrow:l7,rollup:$g,rollups:Sg,scaleBand:Hf,scaleDiverging:Ob,scaleDivergingLog:Ub,scaleDivergingPow:ch,scaleDivergingSqrt:TE,scaleDivergingSymlog:Bb,scaleIdentity:zy,scaleImplicit:Bf,scaleLinear:Xf,scaleLog:Hy,scaleOrdinal:Yf,scalePoint:Wf,scalePow:eu,scaleQuantile:Ky,scaleQuantize:Qy,scaleRadial:Zy,scaleSequential:Nb,scaleSequentialLog:Fb,scaleSequentialPow:uh,scaleSequentialQuantile:zb,scaleSequentialSqrt:ME,scaleSequentialSymlog:Gb,scaleSqrt:qD,scaleSymlog:jy,scaleThreshold:Jy,scaleTime:SE,scaleUtc:AE,scan:r5,schemeAccent:DE,schemeBlues:lv,schemeBrBG:Yb,schemeBuGn:Qb,schemeBuPu:Jb,schemeCategory10:PE,schemeDark2:LE,schemeGnBu:tv,schemeGreens:fv,schemeGreys:hv,schemeObservable10:EE,schemeOrRd:ev,schemeOranges:gv,schemePRGn:Hb,schemePaired:kE,schemePastel1:CE,schemePastel2:IE,schemePiYG:Wb,schemePuBu:rv,schemePuBuGn:nv,schemePuOr:qb,schemePuRd:iv,schemePurples:dv,schemeRdBu:jb,schemeRdGy:Xb,schemeRdPu:ov,schemeRdYlBu:Vb,schemeRdYlGn:Zb,schemeReds:pv,schemeSet1:RE,schemeSet2:NE,schemeSet3:FE,schemeSpectral:Kb,schemeTableau10:GE,schemeYlGn:sv,schemeYlGnBu:av,schemeYlOrBr:uv,schemeYlOrRd:cv,select:V,selectAll:f8,selection:Gn,selector:Ta,selectorAll:Nc,shuffle:i5,shuffler:kg,some:c5,sort:Ac,stack:yC,stackOffsetDiverging:vC,stackOffsetExpand:bC,stackOffsetNone:ai,stackOffsetSilhouette:xC,stackOffsetWiggle:_C,stackOrderAppearance:n2,stackOrderAscending:r2,stackOrderDescending:$C,stackOrderInsideOut:SC,stackOrderNone:si,stackOrderReverse:AC,stratify:rD,style:Fn,subset:b5,sum:o5,superset:Ig,svg:x9,symbol:Kk,symbolAsterisk:Pv,symbolCircle:xu,symbolCross:Dv,symbolDiamond:Ev,symbolDiamond2:kv,symbolPlus:Cv,symbolSquare:Iv,symbolSquare2:Rv,symbolStar:Fv,symbolTimes:mh,symbolTriangle:Gv,symbolTriangle2:zv,symbolWye:Ov,symbolX:mh,symbols:Uv,symbolsFill:Uv,symbolsStroke:Zk,text:ss,thresholdFreedmanDiaconis:WA,thresholdScott:qA,thresholdSturges:Dc,tickFormat:Gy,tickIncrement:Rn,tickStep:va,ticks:In,timeDay:ei,timeDays:QD,get timeFormat(){return oh},timeFormatDefaultLocale:Ib,timeFormatLocale:bb,timeFriday:ob,timeFridays:oL,timeHour:iu,timeHours:ZD,timeInterval:Tt,timeMillisecond:ti,timeMilliseconds:tb,timeMinute:nu,timeMinutes:XD,timeMonday:To,timeMondays:eL,timeMonth:au,timeMonths:dL,get timeParse(){return Cb},timeSaturday:ab,timeSaturdays:aL,timeSecond:an,timeSeconds:nb,timeSunday:ni,timeSundays:sb,timeThursday:rr,timeThursdays:iL,timeTickInterval:yb,timeTicks:mb,timeTuesday:rb,timeTuesdays:nL,timeWednesday:ib,timeWednesdays:rL,timeWeek:ni,timeWeeks:sb,timeYear:Be,timeYears:gL,timeout:il,timer:Xa,timerFlush:Y0,transition:V0,transpose:Cg,tree:lD,treemap:Dy,treemapBinary:fD,treemapDice:So,treemapResquarify:dD,treemapSlice:Qs,treemapSliceDice:hD,treemapSquarify:zf,tsv:p9,tsvFormat:t9,tsvFormatBody:e9,tsvFormatRow:r9,tsvFormatRows:n9,tsvFormatValue:i9,tsvParse:D1,tsvParseRows:J7,union:v5,unixDay:nh,unixDays:tL,utcDay:Mo,utcDays:JD,get utcFormat(){return uu},utcFriday:lb,utcFridays:fL,utcHour:ou,utcHours:KD,utcMillisecond:ti,utcMilliseconds:tb,utcMinute:ru,utcMinutes:VD,utcMonday:Po,utcMondays:sL,utcMonth:su,utcMonths:pL,get utcParse(){return ah},utcSaturday:fb,utcSaturdays:hL,utcSecond:an,utcSeconds:nb,utcSunday:ri,utcSundays:hb,utcThursday:or,utcThursdays:lL,utcTickInterval:gb,utcTicks:pb,utcTuesday:ub,utcTuesdays:uL,utcWednesday:cb,utcWednesdays:cL,utcWeek:ri,utcWeeks:hb,utcYear:Ye,utcYears:mL,variance:gg,window:Gc,xml:b9,zip:s5,zoom:s2,zoomIdentity:Tu,zoomTransform:o2},Symbol.toStringTag,{value:"Module"}));function u2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function kC(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"?Xi:$h[t]??Xi}function Pu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=Xf().domain([0,1]).range([0,t/2]),a=o(n);return bv().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const Sh=(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 CC(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 IC(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return CC(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 Ah({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 An(t,e){const r=Math.random().toString(36).substr(2,5);return ot(t,e,r)}const ui=({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,x,v)=>{V(v[x]).selectAll(`g.${u}`).data([x]).join(b=>b.append("g").classed(u,!0).attr("clip-path",`url(#${n})`).each((_,w,S)=>{V(S[w]).selectAll("defs").data([w]).join("defs"),V(S[w]).selectAll("g").data([w]).join("g").classed(c,!0)}),b=>b,b=>b.remove())}),m=>m,m=>m.remove())),B(p=>W({seriesSelection:fi(p),gridContainer:i})),U(p=>(p.seriesSelection.transition().attr("transform",(g,m)=>{const y=p.gridContainer[m]??p.gridContainer[0],x=y.translate,v=y.scale;return`translate(${x[0]}, ${x[1]}) scale(${v[0]}, ${v[1]})`}),p.seriesSelection)),Le(1)),h=W({seriesSelection:l,gridAxesTransform:o}).pipe(B(async p=>p),U(p=>p.seriesSelection.select(`g.${u}`).style("transform",p.gridAxesTransform.value)),Le(1)),f=h.pipe(U(p=>p.select("defs")),Le(1)),d=W({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}),Le(1));return{seriesSelection$:l,axesSelection$:h,defsSelection$:f,graphicGSelection$:d}},Mh=({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=yA({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 RC(t="curveLinear"){return bu().x(e=>e.axisX).y(e=>e.axisY).curve($h[t])}function NC(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 FC({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 GC({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 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 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=An(t,"clipPath-box"),y=ot(t,"path"),{seriesSelection$:x,axesSelection$:v,defsSelection$:b,graphicGSelection$:_}=ui({selection:e,pluginName:t,clipPathID:m,existSeriesLabels$:r,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),w=new lt(D=>{const T=a.pipe(F(g)).subscribe(C=>{if(!C)return;const P=RC(C.lineCurve);D.next(P)});return()=>{T.unsubscribe()}}),S=new lt(D=>{n.pipe(F(g),B(async T=>T)).subscribe(T=>{const C=T[0]&&T[0][0]?T.map(P=>P[0].seriesLabel):[];D.next(C)})}),k=u.pipe(U(D=>D.transitionDuration),ft()),$=u.pipe(U(D=>D.transitionEase),ft());W({defsSelection:b,seriesLabels:S,axisSize:h,transitionDuration:k,transitionEase:$}).pipe(F(g),B(async D=>D)).subscribe(D=>{const C=[{id:m,width:D.axisSize.width,height:D.axisSize.height}].concat(D.seriesLabels.map(P=>({id:`orbcharts__clipPath_${P}`,width:D.axisSize.width,height:D.axisSize.height})));zC({defsSelection:D.defsSelection,clipPathData:C,transitionDuration:D.transitionDuration,transitionEase:D.transitionEase})});const E=n.pipe(U(D=>{const T=new Map;return D.flat().forEach(C=>T.set(C.id,C)),T})),A=Mh({fullDataFormatter$:s,gridAxesSize$:h,computedData$:n,fullChartParams$:u}),I=u.pipe(F(g),U(D=>D.highlightTarget),ft());return W({graphicGSelection:_,seriesLabels:S,computedData:n,SeriesDataMap:i,GroupDataMap:o,linePath:w,params:a,highlightTarget:I,gridGroupPositionFn:A}).pipe(F(g),B(async D=>D)).subscribe(D=>{D.graphicGSelection.each((T,C,P)=>{const R=NC(D.computedData[C]??[]);FC({selection:V(P[C]),pathClassName:y,linePath:D.linePath,segmentData:R,params:D.params}).on("mouseover",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:L,groupLabel:j}=D.gridGroupPositionFn(M),X=D.GroupDataMap.get(j).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:D.highlightTarget,datum:X,gridIndex:X.gridIndex,series:D.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:D.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:D.computedData})}).on("mousemove",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:L,groupLabel:j}=D.gridGroupPositionFn(M),X=D.GroupDataMap.get(j).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:D.highlightTarget,datum:X,gridIndex:X.gridIndex,series:D.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:D.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:D.computedData})}).on("mouseout",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:L,groupLabel:j}=D.gridGroupPositionFn(M),X=D.GroupDataMap.get(j).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:D.highlightTarget,datum:X,gridIndex:X.gridIndex,series:D.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:D.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:D.computedData})}).on("click",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:L,groupLabel:j}=D.gridGroupPositionFn(M),X=D.GroupDataMap.get(j).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:D.highlightTarget,datum:X,gridIndex:X.gridIndex,series:D.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:D.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:D.computedData})})})}),u.pipe(F(g),hi(D=>D.highlightTarget==="series"),B(D=>W({graphicGSelection:_,gridHighlight:f,DataMap:E,fullChartParams:u}).pipe(F(g),B(async T=>T)))).subscribe(D=>{const T=D.gridHighlight[0]?D.gridHighlight[0].seriesLabel:null;GC({selection:D.graphicGSelection,seriesLabel:T,fullChartParams:D.fullChartParams})}),()=>{g.next(void 0)}},f2="Lines",OC=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 UC(t="curveLinear",e){return hh().x(n=>n.axisX).y0(n=>e).y1(n=>n.axisY).curve($h[t])}function BC(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 YC({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 HC({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 WC({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?j7(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=is(","),Em=Vn.parse,X7=Vn.parseRows,V7=Vn.format,Z7=Vn.formatBody,K7=Vn.formatRows,Q7=Vn.formatRow,J7=Vn.formatValue,Zn=is(" "),km=Zn.parse,tP=Zn.parseRows,eP=Zn.format,nP=Zn.formatBody,rP=Zn.formatRows,iP=Zn.formatRow,oP=Zn.formatValue;function aP(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})?)?$/))sP&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const sP=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function uP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function cP(t,e){return fetch(t,e).then(uP)}function lP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function fP(t,e){return fetch(t,e).then(lP)}function hP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function os(t,e){return fetch(t,e).then(hP)}function Rm(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),os(e,n).then(function(i){return t(i,r)})}}function pP(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=is(t);return os(e,n).then(function(o){return i.parse(o,r)})}var dP=Rm(Em),gP=Rm(km);function mP(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 yP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function bP(t,e){return fetch(t,e).then(yP)}function Fl(t){return(e,n)=>os(e,n).then(r=>new DOMParser().parseFromString(r,t))}const vP=Fl("application/xml");var xP=Fl("text/html"),_P=Fl("image/svg+xml");function wP(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 $P(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Im(this.cover(e,n),e,n,t)}function Im(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,p,d,g,m,y,x;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(p=+t._x.call(null,o.data),d=+t._y.call(null,o.data),e===p&&n===d)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)===(x=(d>=f)<<1|p>=h));return i[x]=o,i[y]=a,t}function SP(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)Im(this,a[n],s[n],t[n]);return this}function AP(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 MP(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function PP(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 qt(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function DP(t,e,n){var r,i=this._x0,o=this._y0,a,s,u,c,l=this._x1,h=this._y1,f=[],p=this._root,d,g;for(p&&f.push(new qt(p,i,o,l,h)),n==null?n=1/0:(i=t-n,o=e-n,l=t+n,h=e+n,n*=n);d=f.pop();)if(!(!(p=d.node)||(a=d.x0)>l||(s=d.y0)>h||(u=d.x1)<i||(c=d.y1)<o))if(p.length){var m=(a+u)/2,y=(s+c)/2;f.push(new qt(p[3],m,y,u,c),new qt(p[2],a,y,m,c),new qt(p[1],m,s,u,y),new qt(p[0],a,s,m,y)),(g=(e>=y)<<1|t>=m)&&(d=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=d)}else{var x=t-+this._x.call(null,p.data),v=e-+this._y.call(null,p.data),b=x*x+v*v;if(b<n){var $=Math.sqrt(n=b);i=t-$,o=e-$,l=t+$,h=e+$,r=p.data}}return r}function TP(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,p,d,g,m,y;if(!n)return this;if(n.length)for(;;){if((d=l>=(f=(a+u)/2))?a=f:u=f,(g=h>=(p=(s+c)/2))?s=p:c=p,e=n,!(n=n[m=g<<1|d]))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 LP(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function CP(){return this._root}function EP(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function kP(t){var e=[],n,r=this._root,i,o,a,s,u;for(r&&e.push(new qt(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 qt(i,c,l,s,u)),(i=r[2])&&e.push(new qt(i,o,l,c,u)),(i=r[1])&&e.push(new qt(i,c,a,s,l)),(i=r[0])&&e.push(new qt(i,o,a,c,l))}return this}function RP(t){var e=[],n=[],r;for(this._root&&e.push(new qt(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 qt(o,a,s,l,h)),(o=i[1])&&e.push(new qt(o,l,s,u,h)),(o=i[2])&&e.push(new qt(o,a,h,l,c)),(o=i[3])&&e.push(new qt(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 IP(t){return t[0]}function NP(t){return arguments.length?(this._x=t,this):this._x}function FP(t){return t[1]}function GP(t){return arguments.length?(this._y=t,this):this._y}function as(t,e,n){var r=new Gl(e??IP,n??FP,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Gl(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 Nm(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var jt=as.prototype=Gl.prototype;jt.copy=function(){var t=new Gl(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=Nm(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]=Nm(r));return t},jt.add=$P,jt.addAll=SP,jt.cover=AP,jt.data=MP,jt.extent=PP,jt.find=DP,jt.remove=TP,jt.removeAll=LP,jt.root=CP,jt.size=EP,jt.visit=kP,jt.visitAfter=RP,jt.x=NP,jt.y=GP;function Ct(t){return function(){return t}}function bn(t){return(t()-.5)*1e-6}function zP(t){return t.x+t.vx}function OP(t){return t.y+t.vy}function Fm(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Ct(t==null?1:+t));function a(){for(var c,l=e.length,h,f,p,d,g,m,y=0;y<o;++y)for(h=as(e,zP,OP).visitAfter(s),c=0;c<l;++c)f=e[c],g=n[f.index],m=g*g,p=f.x+f.vx,d=f.y+f.vy,h.visit(x);function x(v,b,$,_,P){var T=v.data,w=v.r,D=g+w;if(T){if(T.index>f.index){var S=p-T.x-T.vx,G=d-T.y-T.vy,k=S*S+G*G;k<D*D&&(S===0&&(S=bn(r),k+=S*S),G===0&&(G=bn(r),k+=G*G),k=(D-(k=Math.sqrt(k)))/k*i,f.vx+=(S*=k)*(D=(w*=w)/(m+w)),f.vy+=(G*=k)*D,T.vx-=S*(D=1-D),T.vy-=G*D)}return}return b>p+D||_<p-D||$>d+D||P<d-D}}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:Ct(+c),u(),a):t},a}function UP(t){return t.index}function Gm(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function BP(t){var e=UP,n=h,r,i=Ct(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,x=t.length;y<l;++y)for(var v=0,b,$,_,P,T,w,D;v<x;++v)b=t[v],$=b.source,_=b.target,P=_.x+_.vx-$.x-$.vx||bn(c),T=_.y+_.vy-$.y-$.vy||bn(c),w=Math.sqrt(P*P+T*T),w=(w-o[v])/w*m*r[v],P*=w,T*=w,_.vx-=P*(D=u[v]),_.vy-=T*D,$.vx+=P*(D=1-D),$.vy+=T*D}function p(){if(a){var m,y=a.length,x=t.length,v=new Map(a.map(($,_)=>[e($,_,a),$])),b;for(m=0,s=new Array(y);m<x;++m)b=t[m],b.index=m,typeof b.source!="object"&&(b.source=Gm(v,b.source)),typeof b.target!="object"&&(b.target=Gm(v,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(x);m<x;++m)b=t[m],u[m]=s[b.source.index]/(s[b.source.index]+s[b.target.index]);r=new Array(x),d(),o=new Array(x),g()}}function d(){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,p()},f.links=function(m){return arguments.length?(t=m,p(),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:Ct(+m),d(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Ct(+m),g(),f):i},f}const YP=1664525,HP=1013904223,zm=4294967296;function WP(){let t=1;return()=>(t=(YP*t+HP)%zm)/zm}function qP(t){return t.x}function jP(t){return t.y}var XP=10,VP=Math.PI*(3-Math.sqrt(5));function Om(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=qa(h),c=Nn("tick","end"),l=WP();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,x;g===void 0&&(g=1);for(var v=0;v<g;++v)for(n+=(o-n)*i,s.forEach(function(b){b(n)}),m=0;m<y;++m)x=t[m],x.fx==null?x.x+=x.vx*=a:(x.x=x.fx,x.vx=0),x.fy==null?x.y+=x.vy*=a:(x.y=x.fy,x.vy=0);return e}function p(){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 x=XP*Math.sqrt(.5+g),v=g*VP;y.x=x*Math.cos(v),y.y=x*Math.sin(v)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function d(g){return g.initialize&&g.initialize(t,l),g}return p(),e={tick:f,restart:function(){return u.restart(h),e},stop:function(){return u.stop(),e},nodes:function(g){return arguments.length?(t=g,p(),s.forEach(d),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(d),e):l},force:function(g,m){return arguments.length>1?(m==null?s.delete(g):s.set(g,d(m)),e):s.get(g)},find:function(g,m,y){var x=0,v=t.length,b,$,_,P,T;for(y==null?y=1/0:y*=y,x=0;x<v;++x)P=t[x],b=g-P.x,$=m-P.y,_=b*b+$*$,_<y&&(T=P,y=_);return T},on:function(g,m){return arguments.length>1?(c.on(g,m),e):c.on(g)}}}function Um(){var t,e,n,r,i=Ct(-30),o,a=1,s=1/0,u=.81;function c(p){var d,g=t.length,m=as(t,qP,jP).visitAfter(h);for(r=p,d=0;d<g;++d)e=t[d],m.visit(f)}function l(){if(t){var p,d=t.length,g;for(o=new Array(d),p=0;p<d;++p)g=t[p],o[g.index]=+i(g,p,t)}}function h(p){var d=0,g,m,y=0,x,v,b;if(p.length){for(x=v=b=0;b<4;++b)(g=p[b])&&(m=Math.abs(g.value))&&(d+=g.value,y+=m,x+=m*g.x,v+=m*g.y);p.x=x/y,p.y=v/y}else{g=p,g.x=g.data.x,g.y=g.data.y;do d+=o[g.data.index];while(g=g.next)}p.value=d}function f(p,d,g,m){if(!p.value)return!0;var y=p.x-e.x,x=p.y-e.y,v=m-d,b=y*y+x*x;if(v*v/u<b)return b<s&&(y===0&&(y=bn(n),b+=y*y),x===0&&(x=bn(n),b+=x*x),b<a&&(b=Math.sqrt(a*b)),e.vx+=y*p.value*r/b,e.vy+=x*p.value*r/b),!0;if(p.length||b>=s)return;(p.data!==e||p.next)&&(y===0&&(y=bn(n),b+=y*y),x===0&&(x=bn(n),b+=x*x),b<a&&(b=Math.sqrt(a*b)));do p.data!==e&&(v=o[p.data.index]*r/b,e.vx+=y*v,e.vy+=x*v);while(p=p.next)}return c.initialize=function(p,d){t=p,n=d,l()},c.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Ct(+p),l(),c):i},c.distanceMin=function(p){return arguments.length?(a=p*p,c):Math.sqrt(a)},c.distanceMax=function(p){return arguments.length?(s=p*p,c):Math.sqrt(s)},c.theta=function(p){return arguments.length?(u=p*p,c):Math.sqrt(u)},c}function ZP(t,e,n){var r,i=Ct(.1),o,a;typeof t!="function"&&(t=Ct(+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],p=f.x-e||1e-6,d=f.y-n||1e-6,g=Math.sqrt(p*p+d*d),m=(a[l]-g)*o[l]*c/g;f.vx+=p*m,f.vy+=d*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:Ct(+c),u(),s):i},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Ct(+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 Bm(t){var e=Ct(.1),n,r,i;typeof t!="function"&&(t=Ct(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:Ct(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Ct(+s),a(),o):t},o}function Ym(t){var e=Ct(.1),n,r,i;typeof t!="function"&&(t=Ct(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:Ct(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Ct(+s),a(),o):t},o}function KP(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ss(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=ss(Math.abs(t)),t?t[1]:NaN}function QP(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 JP(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var tD=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Hr(t){if(!(e=tD.exec(t)))throw new Error("invalid format: "+t);var e;return new us({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=us.prototype;function us(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+""}us.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 eD(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 Hm;function nD(t,e){var n=ss(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Hm=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")+ss(t,Math.max(0,e+o-1))[0]}function Wm(t,e){var n=ss(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 qm={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:KP,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)=>Wm(t*100,e),r:Wm,s:nD,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function jm(t){return t}var Xm=Array.prototype.map,Vm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Zm(t){var e=t.grouping===void 0||t.thousands===void 0?jm:QP(Xm.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?jm:JP(Xm.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,p=h.align,d=h.sign,g=h.symbol,m=h.zero,y=h.width,x=h.comma,v=h.precision,b=h.trim,$=h.type;$==="n"?(x=!0,$="g"):qm[$]||(v===void 0&&(v=12),b=!0,$="g"),(m||f==="0"&&p==="=")&&(m=!0,f="0",p="=");var _=g==="$"?n:g==="#"&&/[boxX]/.test($)?"0"+$.toLowerCase():"",P=g==="$"?r:/[%p]/.test($)?a:"",T=qm[$],w=/[defgprs%]/.test($);v=v===void 0?6:/[gprs]/.test($)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function D(S){var G=_,k=P,A,L,M;if($==="c")k=T(S)+k,S="";else{S=+S;var F=S<0||1/S<0;if(S=isNaN(S)?u:T(Math.abs(S),v),b&&(S=eD(S)),F&&+S==0&&d!=="+"&&(F=!1),G=(F?d==="("?d:s:d==="-"||d==="("?"":d)+G,k=($==="s"?Vm[8+Hm/3]:"")+k+(F&&d==="("?")":""),w){for(A=-1,L=S.length;++A<L;)if(M=S.charCodeAt(A),48>M||M>57){k=(M===46?i+S.slice(A+1):S.slice(A))+k,S=S.slice(0,A);break}}}x&&!m&&(S=e(S,1/0));var O=G.length+S.length+k.length,E=O<y?new Array(y-O+1).join(f):"";switch(x&&m&&(S=e(E+S,E.length?y-k.length:1/0),E=""),p){case"<":S=G+S+k+E;break;case"=":S=G+E+S+k;break;case"^":S=E.slice(0,O=E.length>>1)+G+S+k+E.slice(O);break;default:S=E+G+S+k;break}return o(S)}return D.toString=function(){return h+""},D}function l(h,f){var p=c((h=Hr(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(Yr(f)/3)))*3,g=Math.pow(10,-d),m=Vm[8+d/3];return function(y){return p(g*y)+m}}return{format:c,formatPrefix:l}}var cs,Ji,zl;Km({thousands:",",grouping:[3],currency:["$",""]});function Km(t){return cs=Zm(t),Ji=cs.format,zl=cs.formatPrefix,cs}function Qm(t){return Math.max(0,-Yr(Math.abs(t)))}function Jm(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Yr(e)/3)))*3-Yr(Math.abs(t)))}function t1(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Yr(e)-Yr(t))+1}var nt=1e-6,to=1e-12,ft=Math.PI,St=ft/2,ls=ft/4,Xt=ft*2,bt=180/ft,rt=ft/180,dt=Math.abs,Wr=Math.atan,Vt=Math.atan2,tt=Math.cos,fs=Math.ceil,e1=Math.exp,Ol=Math.hypot,hs=Math.log,Ul=Math.pow,J=Math.sin,de=Math.sign||function(t){return t>0?1:t<0?-1:0},It=Math.sqrt,Bl=Math.tan;function n1(t){return t>1?0:t<-1?ft:Math.acos(t)}function Zt(t){return t>1?St:t<-1?-St:Math.asin(t)}function r1(t){return(t=J(t/2))*t}function wt(){}function ps(t,e){t&&o1.hasOwnProperty(t.type)&&o1[t.type](t,e)}var i1={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)}},o1={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){Yl(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Yl(n[r],e,0)},Polygon:function(t,e){a1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)a1(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ps(n[r],e)}};function Yl(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 a1(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Yl(t[n],e,1);e.polygonEnd()}function Te(t,e){t&&i1.hasOwnProperty(t.type)?i1[t.type](t,e):ps(t,e)}var ds=new Lt,gs=new Lt,s1,u1,Hl,Wl,ql,Ge={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){ds=new Lt,Ge.lineStart=rD,Ge.lineEnd=iD},polygonEnd:function(){var t=+ds;gs.add(t<0?Xt+t:t),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){gs.add(Xt)}};function rD(){Ge.point=oD}function iD(){c1(s1,u1)}function oD(t,e){Ge.point=c1,s1=t,u1=e,t*=rt,e*=rt,Hl=t,Wl=tt(e=e/2+ls),ql=J(e)}function c1(t,e){t*=rt,e*=rt,e=e/2+ls;var n=t-Hl,r=n>=0?1:-1,i=r*n,o=tt(e),a=J(e),s=ql*a,u=Wl*o+s*tt(i),c=s*r*J(i);ds.add(Vt(c,u)),Hl=t,Wl=o,ql=a}function aD(t){return gs=new Lt,Te(t,Ge),gs*2}function ms(t){return[Vt(t[1],t[0]),Zt(t[2])]}function Kn(t){var e=t[0],n=t[1],r=tt(n);return[r*tt(e),r*J(e),J(n)]}function ys(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 jl(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function bs(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function vs(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,ie,At,ce,Qn,l1,f1,jr,eo,vn,Qe,Je={point:Xl,lineStart:p1,lineEnd:d1,polygonStart:function(){Je.point=g1,Je.lineStart=sD,Je.lineEnd=uD,eo=new Lt,Ge.polygonStart()},polygonEnd:function(){Ge.polygonEnd(),Je.point=Xl,Je.lineStart=p1,Je.lineEnd=d1,ds<0?($t=-(At=180),ie=-(ce=90)):eo>nt?ce=90:eo<-nt&&(ie=-90),Qe[0]=$t,Qe[1]=At},sphere:function(){$t=-(At=180),ie=-(ce=90)}};function Xl(t,e){vn.push(Qe=[$t=t,At=t]),e<ie&&(ie=e),e>ce&&(ce=e)}function h1(t,e){var n=Kn([t*rt,e*rt]);if(jr){var r=qr(jr,n),i=[r[1],-r[0],0],o=qr(i,r);vs(o),o=ms(o);var a=t-Qn,s=a>0?1:-1,u=o[0]*bt*s,c,l=dt(a)>180;l^(s*Qn<u&&u<s*t)?(c=o[1]*bt,c>ce&&(ce=c)):(u=(u+360)%360-180,l^(s*Qn<u&&u<s*t)?(c=-o[1]*bt,c<ie&&(ie=c)):(e<ie&&(ie=e),e>ce&&(ce=e))),l?t<Qn?le($t,t)>le($t,At)&&(At=t):le(t,At)>le($t,At)&&($t=t):At>=$t?(t<$t&&($t=t),t>At&&(At=t)):t>Qn?le($t,t)>le($t,At)&&(At=t):le(t,At)>le($t,At)&&($t=t)}else vn.push(Qe=[$t=t,At=t]);e<ie&&(ie=e),e>ce&&(ce=e),jr=n,Qn=t}function p1(){Je.point=h1}function d1(){Qe[0]=$t,Qe[1]=At,Je.point=Xl,jr=null}function g1(t,e){if(jr){var n=t-Qn;eo.add(dt(n)>180?n+(n>0?360:-360):n)}else l1=t,f1=e;Ge.point(t,e),h1(t,e)}function sD(){Ge.lineStart()}function uD(){g1(l1,f1),Ge.lineEnd(),dt(eo)>nt&&($t=-(At=180)),Qe[0]=$t,Qe[1]=At,jr=null}function le(t,e){return(e-=t)<0?e+360:e}function cD(t,e){return t[0]-e[0]}function m1(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function lD(t){var e,n,r,i,o,a,s;if(ce=At=-($t=ie=1/0),vn=[],Te(t,Je),n=vn.length){for(vn.sort(cD),e=1,r=vn[0],o=[r];e<n;++e)i=vn[e],m1(r,i[0])||m1(r,i[1])?(le(r[0],i[1])>le(r[0],r[1])&&(r[1]=i[1]),le(i[0],r[1])>le(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=le(r[1],i[0]))>a&&(a=s,$t=i[0],At=r[1])}return vn=Qe=null,$t===1/0||ie===1/0?[[NaN,NaN],[NaN,NaN]]:[[$t,ie],[At,ce]]}var no,xs,_s,ws,$s,Ss,As,Ms,Vl,Zl,Kl,y1,b1,Kt,Qt,Jt,Le={sphere:wt,point:Ql,lineStart:v1,lineEnd:x1,polygonStart:function(){Le.lineStart=pD,Le.lineEnd=dD},polygonEnd:function(){Le.lineStart=v1,Le.lineEnd=x1}};function Ql(t,e){t*=rt,e*=rt;var n=tt(e);ro(n*tt(t),n*J(t),J(e))}function ro(t,e,n){++no,_s+=(t-_s)/no,ws+=(e-ws)/no,$s+=(n-$s)/no}function v1(){Le.point=fD}function fD(t,e){t*=rt,e*=rt;var n=tt(e);Kt=n*tt(t),Qt=n*J(t),Jt=J(e),Le.point=hD,ro(Kt,Qt,Jt)}function hD(t,e){t*=rt,e*=rt;var n=tt(e),r=n*tt(t),i=n*J(t),o=J(e),a=Vt(It((a=Qt*o-Jt*i)*a+(a=Jt*r-Kt*o)*a+(a=Kt*i-Qt*r)*a),Kt*r+Qt*i+Jt*o);xs+=a,Ss+=a*(Kt+(Kt=r)),As+=a*(Qt+(Qt=i)),Ms+=a*(Jt+(Jt=o)),ro(Kt,Qt,Jt)}function x1(){Le.point=Ql}function pD(){Le.point=gD}function dD(){_1(y1,b1),Le.point=Ql}function gD(t,e){y1=t,b1=e,t*=rt,e*=rt,Le.point=_1;var n=tt(e);Kt=n*tt(t),Qt=n*J(t),Jt=J(e),ro(Kt,Qt,Jt)}function _1(t,e){t*=rt,e*=rt;var n=tt(e),r=n*tt(t),i=n*J(t),o=J(e),a=Qt*o-Jt*i,s=Jt*r-Kt*o,u=Kt*i-Qt*r,c=Ol(a,s,u),l=Zt(c),h=c&&-l/c;Vl.add(h*a),Zl.add(h*s),Kl.add(h*u),xs+=l,Ss+=l*(Kt+(Kt=r)),As+=l*(Qt+(Qt=i)),Ms+=l*(Jt+(Jt=o)),ro(Kt,Qt,Jt)}function mD(t){no=xs=_s=ws=$s=Ss=As=Ms=0,Vl=new Lt,Zl=new Lt,Kl=new Lt,Te(t,Le);var e=+Vl,n=+Zl,r=+Kl,i=Ol(e,n,r);return i<to&&(e=Ss,n=As,r=Ms,xs<nt&&(e=_s,n=ws,r=$s),i=Ol(e,n,r),i<to)?[NaN,NaN]:[Vt(n,e)*bt,Zt(r/i)*bt]}function Xr(t){return function(){return t}}function Jl(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 tf(t,e){return dt(t)>ft&&(t-=Math.round(t/Xt)*Xt),[t,e]}tf.invert=tf;function ef(t,e,n){return(t%=Xt)?e||n?Jl($1(t),S1(e,n)):$1(t):e||n?S1(e,n):tf}function w1(t){return function(e,n){return e+=t,dt(e)>ft&&(e-=Math.round(e/Xt)*Xt),[e,n]}}function $1(t){var e=w1(t);return e.invert=w1(-t),e}function S1(t,e){var n=tt(t),r=J(t),i=tt(e),o=J(e);function a(s,u){var c=tt(u),l=tt(s)*c,h=J(s)*c,f=J(u),p=f*n+l*r;return[Vt(h*i-p*o,l*n-f*r),Zt(p*i+h*o)]}return a.invert=function(s,u){var c=tt(u),l=tt(s)*c,h=J(s)*c,f=J(u),p=f*i-h*o;return[Vt(h*i+f*o,l*n+p*r),Zt(p*n-l*r)]},a}function A1(t){t=ef(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]*=bt,n[1]*=bt,n}return e.invert=function(n){return n=t.invert(n[0]*rt,n[1]*rt),n[0]*=bt,n[1]*=bt,n},e}function M1(t,e,n,r,i,o){if(n){var a=tt(e),s=J(e),u=r*n;i==null?(i=e+r*Xt,o=e-u/2):(i=P1(a,i),o=P1(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=ms([a,-s*tt(l),-s*J(l)]),t.point(c[0],c[1])}}function P1(t,e){e=Kn(e),e[0]-=t,vs(e);var n=n1(-e[1]);return((-e[2]<0?-n:n)+Xt-nt)%Xt}function yD(){var t=Xr([0,0]),e=Xr(90),n=Xr(2),r,i,o={point:a};function a(u,c){r.push(u=i(u,c)),u[0]*=bt,u[1]*=bt}function s(){var u=t.apply(this,arguments),c=e.apply(this,arguments)*rt,l=n.apply(this,arguments)*rt;return r=[],i=ef(-u[0]*rt,-u[1]*rt,0).invert,M1(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:Xr([+u[0],+u[1]]),s):t},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Xr(+u),s):e},s.precision=function(u){return arguments.length?(n=typeof u=="function"?u:Xr(+u),s):n},s}function D1(){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])<nt&&dt(t[1]-e[1])<nt}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 T1(t,e,n,r,i){var o=[],a=[],s,u;if(t.forEach(function(d){if(!((g=d.length-1)<=0)){var g,m=d[0],y=d[g],x;if(Ps(m,y)){if(!m[2]&&!y[2]){for(i.lineStart(),s=0;s<g;++s)i.point((m=d[s])[0],m[1]);i.lineEnd();return}y[0]+=2*nt}o.push(x=new Ds(m,d,null,!0)),a.push(x.o=new Ds(m,null,x,!1)),o.push(x=new Ds(y,d,null,!1)),a.push(x.o=new Ds(y,null,x,!0))}}),!!o.length){for(a.sort(e),L1(o),L1(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,p=!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(p)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(p)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,p=!p}while(!f.v);i.lineEnd()}}}function L1(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 nf(t){return dt(t[0])<=ft?t[0]:de(t[0])*((dt(t[0])+ft)%Xt-ft)}function C1(t,e){var n=nf(e),r=e[1],i=J(r),o=[J(n),-tt(n),0],a=0,s=0,u=new Lt;i===1?r=St+nt:i===-1&&(r=-St-nt);for(var c=0,l=t.length;c<l;++c)if(f=(h=t[c]).length)for(var h,f,p=h[f-1],d=nf(p),g=p[1]/2+ls,m=J(g),y=tt(g),x=0;x<f;++x,d=b,m=_,y=P,p=v){var v=h[x],b=nf(v),$=v[1]/2+ls,_=J($),P=tt($),T=b-d,w=T>=0?1:-1,D=w*T,S=D>ft,G=m*_;if(u.add(Vt(G*w*J(D),y*P+G*tt(D))),a+=S?T+w*Xt:T,S^d>=n^b>=n){var k=qr(Kn(p),Kn(v));vs(k);var A=qr(o,k);vs(A);var L=(S^T>=0?-1:1)*Zt(A[2]);(r>L||r===L&&(k[0]||k[1]))&&(s+=S^T>=0?1:-1)}}return(a<-nt||a<nt&&u<-to)^s&1}function E1(t,e,n,r){return function(i){var o=e(i),a=D1(),s=e(a),u=!1,c,l,h,f={point:p,lineStart:g,lineEnd:m,polygonStart:function(){f.point=y,f.lineStart=x,f.lineEnd=v,l=[],c=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=m,l=kc(l);var b=C1(c,r);l.length?(u||(i.polygonStart(),u=!0),T1(l,vD,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 p(b,$){t(b,$)&&i.point(b,$)}function d(b,$){o.point(b,$)}function g(){f.point=d,o.lineStart()}function m(){f.point=p,o.lineEnd()}function y(b,$){h.push([b,$]),s.point(b,$)}function x(){s.lineStart(),h=[]}function v(){y(h[0][0],h[0][1]),s.lineEnd();var b=s.clean(),$=a.result(),_,P=$.length,T,w,D;if(h.pop(),c.push(h),h=null,!!P){if(b&1){if(w=$[0],(T=w.length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),_=0;_<T;++_)i.point((D=w[_])[0],D[1]);i.lineEnd()}return}P>1&&b&2&&$.push($.pop().concat($.shift())),l.push($.filter(bD))}}return f}}function bD(t){return t.length>1}function vD(t,e){return((t=t.x)[0]<0?t[1]-St-nt:St-t[1])-((e=e.x)[0]<0?e[1]-St-nt:St-e[1])}const rf=E1(function(){return!0},xD,wD,[-ft,-St]);function xD(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?ft:-ft,u=dt(o-e);dt(u-ft)<nt?(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>=ft&&(dt(e-r)<nt&&(e-=r*nt),dt(o-s)<nt&&(o-=s*nt),n=_D(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 _D(t,e,n,r){var i,o,a=J(t-n);return dt(a)>nt?Wr((J(e)*(o=tt(r))*J(n)-J(r)*(i=tt(e))*J(t))/(i*o*a)):(e+r)/2}function wD(t,e,n,r){var i;if(t==null)i=n*St,r.point(-ft,i),r.point(0,i),r.point(ft,i),r.point(ft,0),r.point(ft,-i),r.point(0,-i),r.point(-ft,-i),r.point(-ft,0),r.point(-ft,i);else if(dt(t[0]-e[0])>nt){var o=t[0]<e[0]?ft:-ft;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function k1(t){var e=tt(t),n=2*rt,r=e>0,i=dt(e)>nt;function o(l,h,f,p){M1(p,t,n,f,l,h)}function a(l,h){return tt(l)*tt(h)>e}function s(l){var h,f,p,d,g;return{lineStart:function(){d=p=!1,g=1},point:function(m,y){var x=[m,y],v,b=a(m,y),$=r?b?0:c(m,y):b?c(m+(m<0?ft:-ft),y):0;if(!h&&(d=p=b)&&l.lineStart(),b!==p&&(v=u(h,x),(!v||Ps(h,v)||Ps(x,v))&&(x[2]=1)),b!==p)g=0,b?(l.lineStart(),v=u(x,h),l.point(v[0],v[1])):(v=u(h,x),l.point(v[0],v[1],2),l.lineEnd()),h=v;else if(i&&h&&r^b){var _;!($&f)&&(_=u(x,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,x))&&l.point(x[0],x[1]),h=x,p=b,f=$},lineEnd:function(){p&&l.lineEnd(),h=null},clean:function(){return g|(d&&p)<<1}}}function u(l,h,f){var p=Kn(l),d=Kn(h),g=[1,0,0],m=qr(p,d),y=ys(m,m),x=m[0],v=y-x*x;if(!v)return!f&&l;var b=e*y/v,$=-e*x/v,_=qr(g,m),P=bs(g,b),T=bs(m,$);jl(P,T);var w=_,D=ys(P,w),S=ys(w,w),G=D*D-S*(ys(P,P)-1);if(!(G<0)){var k=It(G),A=bs(w,(-D-k)/S);if(jl(A,P),A=ms(A),!f)return A;var L=l[0],M=h[0],F=l[1],O=h[1],E;M<L&&(E=L,L=M,M=E);var R=M-L,C=dt(R-ft)<nt,N=C||R<nt;if(!C&&O<F&&(E=F,F=O,O=E),N?C?F+O>0^A[1]<(dt(A[0]-L)<nt?F:O):F<=A[1]&&A[1]<=O:R>ft^(L<=A[0]&&A[0]<=M)){var j=bs(w,(-D+k)/S);return jl(j,P),[A,ms(j)]}}}function c(l,h){var f=r?t:ft-t,p=0;return l<-f?p|=1:l>f&&(p|=2),h<-f?p|=4:h>f&&(p|=8),p}return E1(a,s,o,r?[0,-t]:[-ft,t-ft])}function $D(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,p=c-s,d;if(d=n-a,!(!f&&d>0)){if(d/=f,f<0){if(d<l)return;d<h&&(h=d)}else if(f>0){if(d>h)return;d>l&&(l=d)}if(d=i-a,!(!f&&d<0)){if(d/=f,f<0){if(d>h)return;d>l&&(l=d)}else if(f>0){if(d<l)return;d<h&&(h=d)}if(d=r-s,!(!p&&d>0)){if(d/=p,p<0){if(d<l)return;d<h&&(h=d)}else if(p>0){if(d>h)return;d>l&&(l=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>h)return;d>l&&(l=d)}else if(p>0){if(d<l)return;d<h&&(h=d)}return l>0&&(t[0]=a+l*f,t[1]=s+l*p),h<1&&(e[0]=a+h*f,e[1]=s+h*p),!0}}}}}var io=1e9,Ts=-io;function Ls(t,e,n,r){function i(c,l){return t<=c&&c<=n&&e<=l&&l<=r}function o(c,l,h,f){var p=0,d=0;if(c==null||(p=a(c,h))!==(d=a(l,h))||u(c,l)<0^h>0)do f.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+h+4)%4)!==d);else f.point(l[0],l[1])}function a(c,l){return dt(c[0]-t)<nt?l>0?0:3:dt(c[0]-n)<nt?l>0?2:1:dt(c[1]-e)<nt?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=D1(),f,p,d,g,m,y,x,v,b,$,_,P={point:T,lineStart:G,lineEnd:k,polygonStart:D,polygonEnd:S};function T(L,M){i(L,M)&&l.point(L,M)}function w(){for(var L=0,M=0,F=p.length;M<F;++M)for(var O=p[M],E=1,R=O.length,C=O[0],N,j,Q=C[0],I=C[1];E<R;++E)N=Q,j=I,C=O[E],Q=C[0],I=C[1],j<=r?I>r&&(Q-N)*(r-j)>(I-j)*(t-N)&&++L:I<=r&&(Q-N)*(r-j)<(I-j)*(t-N)&&--L;return L}function D(){l=h,f=[],p=[],_=!0}function S(){var L=w(),M=_&&L,F=(f=kc(f)).length;(M||F)&&(c.polygonStart(),M&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),F&&T1(f,s,L,o,c),c.polygonEnd()),l=c,f=p=d=null}function G(){P.point=A,p&&p.push(d=[]),$=!0,b=!1,x=v=NaN}function k(){f&&(A(g,m),y&&b&&h.rejoin(),f.push(h.result())),P.point=T,b&&l.lineEnd()}function A(L,M){var F=i(L,M);if(p&&d.push([L,M]),$)g=L,m=M,y=F,$=!1,F&&(l.lineStart(),l.point(L,M));else if(F&&b)l.point(L,M);else{var O=[x=Math.max(Ts,Math.min(io,x)),v=Math.max(Ts,Math.min(io,v))],E=[L=Math.max(Ts,Math.min(io,L)),M=Math.max(Ts,Math.min(io,M))];$D(O,E,t,e,n,r)?(b||(l.lineStart(),l.point(O[0],O[1])),l.point(E[0],E[1]),F||l.lineEnd(),_=!1):F&&(l.lineStart(),l.point(L,M),_=!1)}x=L,v=M,b=F}return P}}function SD(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Ls(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 of,af,Cs,Es,Vr={sphere:wt,point:wt,lineStart:AD,lineEnd:wt,polygonStart:wt,polygonEnd:wt};function AD(){Vr.point=PD,Vr.lineEnd=MD}function MD(){Vr.point=Vr.lineEnd=wt}function PD(t,e){t*=rt,e*=rt,af=t,Cs=J(e),Es=tt(e),Vr.point=DD}function DD(t,e){t*=rt,e*=rt;var n=J(e),r=tt(e),i=dt(t-af),o=tt(i),a=J(i),s=r*a,u=Es*n-Cs*r*o,c=Cs*n+Es*r*o;of.add(Vt(It(s*s+u*u),c)),af=t,Cs=n,Es=r}function R1(t){return of=new Lt,Te(t,Vr),+of}var sf=[null,null],TD={type:"LineString",coordinates:sf};function ks(t,e){return sf[0]=t,sf[1]=e,R1(TD)}var I1={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}},N1={Sphere:function(){return!0},Point:function(t,e){return F1(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(F1(n[r],e))return!0;return!1},LineString:function(t,e){return G1(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(G1(n[r],e))return!0;return!1},Polygon:function(t,e){return z1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(z1(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&&N1.hasOwnProperty(t.type)?N1[t.type](t,e):!1}function F1(t,e){return ks(t,e)===0}function G1(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=ks(t[o],e),r===0||o>0&&(i=ks(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<to*i))return!0;n=r}return!1}function z1(t,e){return!!C1(t.map(LD),O1(e))}function LD(t){return t=t.map(O1),t.pop(),t}function O1(t){return[t[0]*rt,t[1]*rt]}function CD(t,e){return(t&&I1.hasOwnProperty(t.type)?I1[t.type]:Rs)(t,e)}function U1(t,e,n){var r=hn(t,e-nt,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function B1(t,e,n){var r=hn(t,e-nt,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function Y1(){var t,e,n,r,i,o,a,s,u=10,c=u,l=90,h=360,f,p,d,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:x()}}function x(){return hn(fs(r/l)*l,n,l).map(d).concat(hn(fs(s/h)*h,a,h).map(g)).concat(hn(fs(e/u)*u,t,u).filter(function(v){return dt(v%l)>nt}).map(f)).concat(hn(fs(o/c)*c,i,c).filter(function(v){return dt(v%h)>nt}).map(p))}return y.lines=function(){return x().map(function(v){return{type:"LineString",coordinates:v}})},y.outline=function(){return{type:"Polygon",coordinates:[d(r).concat(g(a).slice(1),d(n).reverse().slice(1),g(s).reverse().slice(1))]}},y.extent=function(v){return arguments.length?y.extentMajor(v).extentMinor(v):y.extentMinor()},y.extentMajor=function(v){return arguments.length?(r=+v[0][0],n=+v[1][0],s=+v[0][1],a=+v[1][1],r>n&&(v=r,r=n,n=v),s>a&&(v=s,s=a,a=v),y.precision(m)):[[r,s],[n,a]]},y.extentMinor=function(v){return arguments.length?(e=+v[0][0],t=+v[1][0],o=+v[0][1],i=+v[1][1],e>t&&(v=e,e=t,t=v),o>i&&(v=o,o=i,i=v),y.precision(m)):[[e,o],[t,i]]},y.step=function(v){return arguments.length?y.stepMajor(v).stepMinor(v):y.stepMinor()},y.stepMajor=function(v){return arguments.length?(l=+v[0],h=+v[1],y):[l,h]},y.stepMinor=function(v){return arguments.length?(u=+v[0],c=+v[1],y):[u,c]},y.precision=function(v){return arguments.length?(m=+v,f=U1(o,i,90),p=B1(e,t,m),d=U1(s,a,90),g=B1(r,n,m),y):m},y.extentMajor([[-180,-90+nt],[180,90-nt]]).extentMinor([[-180,-80-nt],[180,80+nt]])}function ED(){return Y1()()}function kD(t,e){var n=t[0]*rt,r=t[1]*rt,i=e[0]*rt,o=e[1]*rt,a=tt(r),s=J(r),u=tt(o),c=J(o),l=a*tt(n),h=a*J(n),f=u*tt(i),p=u*J(i),d=2*Zt(It(r1(o-r)+a*u*r1(i-n))),g=J(d),m=d?function(y){var x=J(y*=d)/g,v=J(d-y)/g,b=v*l+x*f,$=v*h+x*p,_=v*s+x*c;return[Vt($,b)*bt,Vt(_,It(b*b+$*$))*bt]}:function(){return[n*bt,r*bt]};return m.distance=d,m}const oo=t=>t;var uf=new Lt,cf=new Lt,H1,W1,lf,ff,tn={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){tn.lineStart=RD,tn.lineEnd=ND},polygonEnd:function(){tn.lineStart=tn.lineEnd=tn.point=wt,uf.add(dt(cf)),cf=new Lt},result:function(){var t=uf/2;return uf=new Lt,t}};function RD(){tn.point=ID}function ID(t,e){tn.point=q1,H1=lf=t,W1=ff=e}function q1(t,e){cf.add(ff*t-lf*e),lf=t,ff=e}function ND(){q1(H1,W1)}var Zr=1/0,Is=Zr,ao=-Zr,Ns=ao,Fs={point:FD,lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var t=[[Zr,Is],[ao,Ns]];return ao=Ns=-(Is=Zr=1/0),t}};function FD(t,e){t<Zr&&(Zr=t),t>ao&&(ao=t),e<Is&&(Is=e),e>Ns&&(Ns=e)}var hf=0,pf=0,so=0,Gs=0,zs=0,Kr=0,df=0,gf=0,uo=0,j1,X1,ze,Oe,ge={point:Jn,lineStart:V1,lineEnd:Z1,polygonStart:function(){ge.lineStart=OD,ge.lineEnd=UD},polygonEnd:function(){ge.point=Jn,ge.lineStart=V1,ge.lineEnd=Z1},result:function(){var t=uo?[df/uo,gf/uo]:Kr?[Gs/Kr,zs/Kr]:so?[hf/so,pf/so]:[NaN,NaN];return hf=pf=so=Gs=zs=Kr=df=gf=uo=0,t}};function Jn(t,e){hf+=t,pf+=e,++so}function V1(){ge.point=GD}function GD(t,e){ge.point=zD,Jn(ze=t,Oe=e)}function zD(t,e){var n=t-ze,r=e-Oe,i=It(n*n+r*r);Gs+=i*(ze+t)/2,zs+=i*(Oe+e)/2,Kr+=i,Jn(ze=t,Oe=e)}function Z1(){ge.point=Jn}function OD(){ge.point=BD}function UD(){K1(j1,X1)}function BD(t,e){ge.point=K1,Jn(j1=ze=t,X1=Oe=e)}function K1(t,e){var n=t-ze,r=e-Oe,i=It(n*n+r*r);Gs+=i*(ze+t)/2,zs+=i*(Oe+e)/2,Kr+=i,i=Oe*t-ze*e,df+=i*(ze+t),gf+=i*(Oe+e),uo+=i*3,Jn(ze=t,Oe=e)}function Q1(t){this._context=t}Q1.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 mf=new Lt,yf,J1,ty,co,lo,fo={point:wt,lineStart:function(){fo.point=YD},lineEnd:function(){yf&&ey(J1,ty),fo.point=wt},polygonStart:function(){yf=!0},polygonEnd:function(){yf=null},result:function(){var t=+mf;return mf=new Lt,t}};function YD(t,e){fo.point=ey,J1=co=t,ty=lo=e}function ey(t,e){co-=t,lo-=e,mf.add(It(co*co+lo*lo)),co=t,lo=e}let ny,Os,ry,iy;class oy{constructor(e){this._append=e==null?ay:HD(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!==ry||this._append!==Os){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`,ry=r,Os=this._append,iy=this._,this._=i}this._+=iy;break}}}result(){const e=this._;return this._="",e.length?e:null}}function ay(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function HD(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return ay;if(e!==ny){const n=10**e;ny=e,Os=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 Os}function WD(t,e){let n=3,r=4.5,i,o;function a(s){return s&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),Te(s,i(o))),o.result()}return a.area=function(s){return Te(s,i(tn)),tn.result()},a.measure=function(s){return Te(s,i(fo)),fo.result()},a.bounds=function(s){return Te(s,i(Fs)),Fs.result()},a.centroid=function(s){return Te(s,i(ge)),ge.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,oo):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new oy(n)):new Q1(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 oy(n)),a},a.projection(t).digits(n).context(e)}function qD(t){return{stream:ho(t)}}function ho(t){return function(e){var n=new bf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function bf(){}bf.prototype={constructor:bf,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 vf(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Te(n,t.stream(Fs)),e(Fs.result()),r!=null&&t.clipExtent(r),t}function Us(t,e,n){return vf(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 xf(t,e,n){return Us(t,[[0,0],e],n)}function _f(t,e,n){return vf(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 wf(t,e,n){return vf(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 sy=16,jD=tt(30*rt);function uy(t,e){return+e?VD(t,e):XD(t)}function XD(t){return ho({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function VD(t,e){function n(r,i,o,a,s,u,c,l,h,f,p,d,g,m){var y=c-r,x=l-i,v=y*y+x*x;if(v>4*e&&g--){var b=a+f,$=s+p,_=u+d,P=It(b*b+$*$+_*_),T=Zt(_/=P),w=dt(dt(_)-1)<nt||dt(o-h)<nt?(o+h)/2:Vt($,b),D=t(w,T),S=D[0],G=D[1],k=S-r,A=G-i,L=x*k-y*A;(L*L/v>e||dt((y*k+x*A)/v-.5)>.3||a*f+s*p+u*d<jD)&&(n(r,i,o,a,s,u,S,G,w,b/=P,$/=P,_,g,m),m.point(S,G),n(S,G,w,b,$,_,c,l,h,f,p,d,g,m))}}return function(r){var i,o,a,s,u,c,l,h,f,p,d,g,m={point:y,lineStart:x,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=$},polygonEnd:function(){r.polygonEnd(),m.lineStart=x}};function y(T,w){T=t(T,w),r.point(T[0],T[1])}function x(){h=NaN,m.point=v,r.lineStart()}function v(T,w){var D=Kn([T,w]),S=t(T,w);n(h,f,l,p,d,g,h=S[0],f=S[1],l=T,p=D[0],d=D[1],g=D[2],sy,r),r.point(h,f)}function b(){m.point=y,r.lineEnd()}function $(){x(),m.point=_,m.lineEnd=P}function _(T,w){v(i=T,w),o=h,a=f,s=p,u=d,c=g,m.point=v}function P(){n(h,f,l,p,d,g,o,a,i,s,u,c,sy,r),m.lineEnd=b,b()}return m}}var ZD=ho({point:function(t,e){this.stream.point(t*rt,e*rt)}});function KD(t){return ho({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function QD(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 cy(t,e,n,r,i,o){if(!o)return QD(t,e,n,r,i);var a=tt(o),s=J(o),u=a*t,c=s*t,l=a/t,h=s/t,f=(s*n-a*e)/t,p=(s*e+a*n)/t;function d(g,m){return g*=r,m*=i,[u*g-c*m+e,n-c*g-u*m]}return d.invert=function(g,m){return[r*(l*g-h*m+f),i*(p-h*g-l*m)]},d}function Ue(t){return $f(function(){return t})()}function $f(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,u=0,c=0,l,h=0,f=1,p=1,d=null,g=rf,m=null,y,x,v,b=oo,$=.5,_,P,T,w,D;function S(L){return T(L[0]*rt,L[1]*rt)}function G(L){return L=T.invert(L[0],L[1]),L&&[L[0]*bt,L[1]*bt]}S.stream=function(L){return w&&D===L?w:w=ZD(KD(l)(g(_(b(D=L)))))},S.preclip=function(L){return arguments.length?(g=L,d=void 0,A()):g},S.postclip=function(L){return arguments.length?(b=L,m=y=x=v=null,A()):b},S.clipAngle=function(L){return arguments.length?(g=+L?k1(d=L*rt):(d=null,rf),A()):d*bt},S.clipExtent=function(L){return arguments.length?(b=L==null?(m=y=x=v=null,oo):Ls(m=+L[0][0],y=+L[0][1],x=+L[1][0],v=+L[1][1]),A()):m==null?null:[[m,y],[x,v]]},S.scale=function(L){return arguments.length?(n=+L,k()):n},S.translate=function(L){return arguments.length?(r=+L[0],i=+L[1],k()):[r,i]},S.center=function(L){return arguments.length?(o=L[0]%360*rt,a=L[1]%360*rt,k()):[o*bt,a*bt]},S.rotate=function(L){return arguments.length?(s=L[0]%360*rt,u=L[1]%360*rt,c=L.length>2?L[2]%360*rt:0,k()):[s*bt,u*bt,c*bt]},S.angle=function(L){return arguments.length?(h=L%360*rt,k()):h*bt},S.reflectX=function(L){return arguments.length?(f=L?-1:1,k()):f<0},S.reflectY=function(L){return arguments.length?(p=L?-1:1,k()):p<0},S.precision=function(L){return arguments.length?(_=uy(P,$=L*L),A()):It($)},S.fitExtent=function(L,M){return Us(S,L,M)},S.fitSize=function(L,M){return xf(S,L,M)},S.fitWidth=function(L,M){return _f(S,L,M)},S.fitHeight=function(L,M){return wf(S,L,M)};function k(){var L=cy(n,0,0,f,p,h).apply(null,e(o,a)),M=cy(n,r-L[0],i-L[1],f,p,h);return l=ef(s,u,c),P=Jl(e,M),T=Jl(l,P),_=uy(P,$),A()}function A(){return w=D=null,S}return function(){return e=t.apply(this,arguments),S.invert=e.invert&&G,k()}}function Sf(t){var e=0,n=ft/3,r=$f(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*rt,n=o[1]*rt):[e*bt,n*bt]},i}function JD(t){var e=tt(t);function n(r,i){return[r*e,J(i)/e]}return n.invert=function(r,i){return[r/e,Zt(i*e)]},n}function ly(t,e){var n=J(t),r=(n+J(e))/2;if(dt(r)<nt)return JD(t);var i=1+n*(2*r-n),o=It(i)/r;function a(s,u){var c=It(i-2*r*J(u))/r;return[c*J(s*=r),o-c*tt(s)]}return a.invert=function(s,u){var c=o-u,l=Vt(s,dt(c))*de(c);return c*r<0&&(l-=ft*de(s)*de(c)),[l/r,Zt((i-(s*s+c*c)*r*r)/(2*r))]},a}function Bs(){return Sf(ly).scale(155.424).center([0,33.6442])}function fy(){return Bs().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function t9(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 e9(){var t,e,n=fy(),r,i=Bs().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Bs().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,u,c={point:function(f,p){u=[f,p]}};function l(f){var p=f[0],d=f[1];return u=null,r.point(p,d),u||(o.point(p,d),u)||(s.point(p,d),u)}l.invert=function(f){var p=n.scale(),d=n.translate(),g=(f[0]-d[0])/p,m=(f[1]-d[1])/p;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=t9([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 p=n.scale(),d=+f[0],g=+f[1];return r=n.translate(f).clipExtent([[d-.455*p,g-.238*p],[d+.455*p,g+.238*p]]).stream(c),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+nt,g+.12*p+nt],[d-.214*p-nt,g+.234*p-nt]]).stream(c),s=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+nt,g+.166*p+nt],[d-.115*p-nt,g+.234*p-nt]]).stream(c),h()},l.fitExtent=function(f,p){return Us(l,f,p)},l.fitSize=function(f,p){return xf(l,f,p)},l.fitWidth=function(f,p){return _f(l,f,p)},l.fitHeight=function(f,p){return wf(l,f,p)};function h(){return t=e=null,l}return l.scale(1070)}function hy(t){return function(e,n){var r=tt(e),i=tt(n),o=t(r*i);return o===1/0?[2,0]:[o*i*J(e),o*J(n)]}}function po(t){return function(e,n){var r=It(e*e+n*n),i=t(r),o=J(i),a=tt(i);return[Vt(e*o,r*a),Zt(r&&n*o/r)]}}var Af=hy(function(t){return It(2/(1+t))});Af.invert=po(function(t){return 2*Zt(t/2)});function n9(){return Ue(Af).scale(124.75).clipAngle(180-.001)}var Mf=hy(function(t){return(t=n1(t))&&t/J(t)});Mf.invert=po(function(t){return t});function r9(){return Ue(Mf).scale(79.4188).clipAngle(180-.001)}function go(t,e){return[t,hs(Bl((St+e)/2))]}go.invert=function(t,e){return[t,2*Wr(e1(e))-St]};function i9(){return py(go).scale(961/Xt)}function py(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=ft*r(),f=e(A1(e.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:t===go?[[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 Ys(t){return Bl((St+t)/2)}function dy(t,e){var n=tt(t),r=t===e?J(t):hs(n/tt(e))/hs(Ys(e)/Ys(t)),i=n*Ul(Ys(t),r)/r;if(!r)return go;function o(a,s){i>0?s<-St+nt&&(s=-St+nt):s>St-nt&&(s=St-nt);var u=i/Ul(Ys(s),r);return[u*J(r*a),i-u*tt(r*a)]}return o.invert=function(a,s){var u=i-s,c=de(r)*It(a*a+u*u),l=Vt(a,dt(u))*de(u);return u*r<0&&(l-=ft*de(a)*de(u)),[l/r,2*Wr(Ul(i/c,1/r))-St]},o}function o9(){return Sf(dy).scale(109.5).parallels([30,30])}function mo(t,e){return[t,e]}mo.invert=mo;function a9(){return Ue(mo).scale(152.63)}function gy(t,e){var n=tt(t),r=t===e?J(t):(n-tt(e))/(e-t),i=n/r+t;if(dt(r)<nt)return mo;function o(a,s){var u=i-s,c=r*a;return[u*J(c),i-u*tt(c)]}return o.invert=function(a,s){var u=i-s,c=Vt(a,dt(u))*de(u);return u*r<0&&(c-=ft*de(a)*de(u)),[c/r,i-de(r)*It(a*a+u*u)]},o}function s9(){return Sf(gy).scale(131.154).center([0,13.9389])}var yo=1.340264,bo=-.081106,vo=893e-6,xo=.003796,Hs=It(3)/2,u9=12;function Pf(t,e){var n=Zt(Hs*J(e)),r=n*n,i=r*r*r;return[t*tt(n)/(Hs*(yo+3*bo*r+i*(7*vo+9*xo*r))),n*(yo+bo*r+i*(vo+xo*r))]}Pf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<u9&&(s=n*(yo+bo*r+i*(vo+xo*r))-e,u=yo+3*bo*r+i*(7*vo+9*xo*r),n-=a=s/u,r=n*n,i=r*r*r,!(dt(a)<to));++o);return[Hs*t*(yo+3*bo*r+i*(7*vo+9*xo*r))/tt(n),Zt(J(n)/Hs)]};function c9(){return Ue(Pf).scale(177.158)}function Df(t,e){var n=tt(e),r=tt(t)*n;return[n*J(t)/r,J(e)/r]}Df.invert=po(Wr);function l9(){return Ue(Df).scale(144.049).clipAngle(60)}function f9(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,u=null,c,l,h,f=1,p=1,d=ho({point:function(b,$){var _=v([b,$]);this.stream.point(_[0],_[1])}}),g=oo,m,y;function x(){return f=t*r,p=t*i,m=y=null,v}function v(b){var $=b[0]*f,_=b[1]*p;if(o){var P=_*a-$*s;$=$*a+_*s,_=P}return[$+e,_+n]}return v.invert=function(b){var $=b[0]-e,_=b[1]-n;if(o){var P=_*a+$*s;$=$*a-_*s,_=P}return[$/f,_/p]},v.stream=function(b){return m&&y===b?m:m=d(g(y=b))},v.postclip=function(b){return arguments.length?(g=b,u=c=l=h=null,x()):g},v.clipExtent=function(b){return arguments.length?(g=b==null?(u=c=l=h=null,oo):Ls(u=+b[0][0],c=+b[0][1],l=+b[1][0],h=+b[1][1]),x()):u==null?null:[[u,c],[l,h]]},v.scale=function(b){return arguments.length?(t=+b,x()):t},v.translate=function(b){return arguments.length?(e=+b[0],n=+b[1],x()):[e,n]},v.angle=function(b){return arguments.length?(o=b%360*rt,s=J(o),a=tt(o),x()):o*bt},v.reflectX=function(b){return arguments.length?(r=b?-1:1,x()):r<0},v.reflectY=function(b){return arguments.length?(i=b?-1:1,x()):i<0},v.fitExtent=function(b,$){return Us(v,b,$)},v.fitSize=function(b,$){return xf(v,b,$)},v.fitWidth=function(b,$){return _f(v,b,$)},v.fitHeight=function(b,$){return wf(v,b,$)},v}function Tf(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)))]}Tf.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)>nt&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function h9(){return Ue(Tf).scale(175.295)}function Lf(t,e){return[tt(e)*J(t),J(e)]}Lf.invert=po(Zt);function p9(){return Ue(Lf).scale(249.5).clipAngle(90+nt)}function Cf(t,e){var n=tt(e),r=1+tt(t)*n;return[n*J(t)/r,J(e)/r]}Cf.invert=po(function(t){return 2*Wr(t)});function d9(){return Ue(Cf).scale(250).clipAngle(142)}function Ef(t,e){return[hs(Bl((St+e)/2)),-t]}Ef.invert=function(t,e){return[-e,2*Wr(e1(t))-St]};function g9(){var t=py(Ef),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 m9(t,e){return t.parent===e.parent?1:2}function y9(t){return t.reduce(b9,0)/t.length}function b9(t,e){return t+e.x}function v9(t){return 1+t.reduce(x9,0)}function x9(t,e){return Math.max(t,e.y)}function _9(t){for(var e;e=t.children;)t=e[0];return t}function w9(t){for(var e;e=t.children;)t=e[e.length-1];return t}function $9(){var t=m9,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var p=f.children;p?(f.x=y9(p),f.y=v9(p)):(f.x=a?s+=t(f,a):0,f.y=0,a=f)});var u=_9(o),c=w9(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 S9(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 A9(){return this.eachAfter(S9)}function M9(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function P9(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 D9(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 T9(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function L9(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 C9(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function E9(t){for(var e=this,n=k9(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 k9(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 R9(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function I9(){return Array.from(this)}function N9(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function F9(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*G9(){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 Ws(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=U9)):e===void 0&&(e=O9);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(my)}function z9(){return Ws(this).eachBefore(B9)}function O9(t){return t.children}function U9(t){return Array.isArray(t)?t[1]:null}function B9(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function my(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=Ws.prototype={constructor:tr,count:A9,each:M9,eachAfter:D9,eachBefore:P9,find:T9,sum:L9,sort:C9,path:E9,ancestors:R9,descendants:I9,leaves:N9,links:F9,copy:z9,[Symbol.iterator]:G9};function qs(t){return t==null?null:yy(t)}function yy(t){if(typeof t!="function")throw new Error;return t}function er(){return 0}function Qr(t){return function(){return t}}const Y9=1664525,H9=1013904223,by=4294967296;function kf(){let t=1;return()=>(t=(Y9*t+H9)%by)/by}function W9(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function q9(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 j9(t){return vy(t,kf())}function vy(t,e){for(var n=0,r=(t=q9(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&xy(a,o)?++n:(a=V9(i=X9(i,o)),n=0);return a}function X9(t,e){var n,r;if(Rf(e,t))return[e];for(n=0;n<t.length;++n)if(js(e,t[n])&&Rf(_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])&&Rf(_y(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 xy(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 Rf(t,e){for(var n=0;n<e.length;++n)if(!xy(t,e[n]))return!1;return!0}function V9(t){switch(t.length){case 1:return Z9(t[0]);case 2:return _o(t[0],t[1]);case 3:return _y(t[0],t[1],t[2])}}function Z9(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 _y(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,p=r-c,d=i-s,g=i-l,m=u-o,y=h-o,x=r*r+i*i-o*o,v=x-a*a-s*s+u*u,b=x-c*c-l*l+h*h,$=p*d-f*g,_=(d*b-g*v)/($*2)-r,P=(g*m-d*y)/$,T=(p*v-f*b)/($*2)-i,w=(f*y-p*m)/$,D=P*P+w*w-1,S=2*(o+_*P+T*w),G=_*_+T*T-o*o,k=-(Math.abs(D)>1e-6?(S+Math.sqrt(S*S-4*D*G))/(2*D):G/S);return{x:r+_+P*k,y:i+T+w*k,r:k}}function wy(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 $y(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 Sy(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 Xs(t){this._=t,this.next=null,this.previous=null}function Ay(t,e){if(!(o=(t=W9(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;wy(r,n,i=t[2]),n=new Xs(n),r=new Xs(r),i=new Xs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;u<o;++u){wy(n._,r._,i=t[u]),i=new Xs(i),c=r.next,l=n.previous,h=r._.r,f=n._.r;do if(h<=f){if($y(c._,i._)){r=c,n.next=r,r.previous=n,--u;continue t}h+=c._.r,c=c.next}else{if($y(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=Sy(n);(i=i.next)!==r;)(s=Sy(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=vy(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function K9(t){return Ay(t,kf()),t}function Q9(t){return Math.sqrt(t.value)}function J9(){var t=null,e=1,n=1,r=er;function i(o){const a=kf();return o.x=e/2,o.y=n/2,t?o.eachBefore(My(t)).eachAfter(If(r,.5,a)).eachBefore(Py(1)):o.eachBefore(My(Q9)).eachAfter(If(er,1,a)).eachAfter(If(r,o.r/Math.min(e,n),a)).eachBefore(Py(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=qs(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 My(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function If(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=Ay(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=u+s}}}function Py(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 Dy(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 wo(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 tT(){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(Dy),a}function o(a,s){return function(u){u.children&&wo(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 eT={depth:-1},Ty={},Nf={};function nT(t){return t.id}function rT(t){return t.parentId}function iT(){var t=nT,e=rT,n;function r(i){var o=Array.from(i),a=t,s=e,u,c,l,h,f,p,d,g,m=new Map;if(n!=null){const y=o.map((b,$)=>oT(n(b,$,i))),x=y.map(Ly),v=new Set(y).add("");for(const b of x)v.has(b)||(v.add(b),y.push(b),x.push(Ly(b)),o.push(Nf));a=(b,$)=>y[$],s=(b,$)=>x[$]}for(l=0,u=o.length;l<u;++l)c=o[l],p=o[l]=new tr(c),(d=a(c,l,i))!=null&&(d+="")&&(g=p.id=d,m.set(g,m.has(g)?Ty:p)),(d=s(c,l,i))!=null&&(d+="")&&(p.parent=d);for(l=0;l<u;++l)if(p=o[l],d=p.parent){if(f=m.get(d),!f)throw new Error("missing: "+d);if(f===Ty)throw new Error("ambiguous: "+d);f.children?f.children.push(p):f.children=[p],p.parent=f}else{if(h)throw new Error("multiple roots");h=p}if(!h)throw new Error("no root");if(n!=null){for(;h.data===Nf&&h.children.length===1;)h=h.children[0],--u;for(let y=o.length-1;y>=0&&(p=o[y],p.data===Nf);--y)p.data=null}if(h.parent=eT,h.eachBefore(function(y){y.depth=y.parent.depth+1,--u}).eachBefore(my),h.parent=null,u>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=qs(i),r):t},r.parentId=function(i){return arguments.length?(e=qs(i),r):e},r.path=function(i){return arguments.length?(n=qs(i),r):n},r}function oT(t){t=`${t}`;let e=t.length;return Ff(t,e-1)&&!Ff(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function Ly(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Ff(t,e););return t.slice(0,e)}function Ff(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function aT(t,e){return t.parent===e.parent?1:2}function Gf(t){var e=t.children;return e?e[0]:t.t}function zf(t){var e=t.children;return e?e[e.length-1]:t.t}function sT(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 uT(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 cT(t,e,n){return t.a.parent===e.parent?t.a:n}function Vs(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}Vs.prototype=Object.create(tr.prototype);function lT(t){for(var e=new Vs(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 Vs(o[a],a)),i.parent=n;return(e.parent=new Vs(null,0)).children=[e],e}function fT(){var t=aT,e=1,n=1,r=null;function i(c){var l=lT(c);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),r)c.eachBefore(u);else{var h=c,f=c,p=c;c.eachBefore(function(x){x.x<h.x&&(h=x),x.x>f.x&&(f=x),x.depth>p.depth&&(p=x)});var d=h===f?1:t(h,f)/2,g=d-h.x,m=e/(f.x+d+g),y=n/(p.depth||1);c.eachBefore(function(x){x.x=(x.x+g)*m,x.y=x.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){uT(c);var p=(l[0].z+l[l.length-1].z)/2;f?(c.z=f.z+t(c._,f._),c.m=c.z-p):c.z=p}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,p=c,d=l,g=f.parent.children[0],m=f.m,y=p.m,x=d.m,v=g.m,b;d=zf(d),f=Gf(f),d&&f;)g=Gf(g),p=zf(p),p.a=c,b=d.z+x-f.z-m+t(d._,f._),b>0&&(sT(cT(d,c,h),c,b),m+=b,y+=b),x+=d.m,m+=f.m,v+=g.m,y+=p.m;d&&!zf(p)&&(p.t=d,p.m+=x-y),f&&!Gf(g)&&(g.t=f,g.m+=m-v,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 Zs(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 Cy=(1+Math.sqrt(5))/2;function Ey(t,e,n,r,i,o){for(var a=[],s=e.children,u,c,l=0,h=0,f=s.length,p,d,g=e.value,m,y,x,v,b,$,_;l<f;){p=i-n,d=o-r;do m=s[h++].value;while(!m&&h<f);for(y=x=m,$=Math.max(d/p,p/d)/(g*t),_=m*m*$,b=Math.max(x/_,_/y);h<f;++h){if(m+=c=s[h].value,c<y&&(y=c),c>x&&(x=c),_=m*m*$,v=Math.max(x/_,_/y),v>b){m-=c;break}b=v}a.push(u={value:m,dice:p<d,children:s.slice(l,h)}),u.dice?wo(u,n,r,i,g?r+=d*m/g:o):Zs(u,n,r,g?n+=p*m/g:i,o),g-=m,l=h}return a}const Of=function t(e){function n(r,i,o,a,s){Ey(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Cy);function ky(){var t=Of,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(Dy),f}function h(f){var p=i[f.depth],d=f.x0+p,g=f.y0+p,m=f.x1-p,y=f.y1-p;m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),f.x0=d,f.y0=g,f.x1=m,f.y1=y,f.children&&(p=i[f.depth+1]=o(f)/2,d+=c(f)-p,g+=a(f)-p,m-=s(f)-p,y-=u(f)-p,m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),t(f,d,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=yy(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 hT(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,p,d,g,m,y){if(h>=f-1){var x=o[h];x.x0=d,x.y0=g,x.x1=m,x.y1=y;return}for(var v=c[h],b=p/2+v,$=h+1,_=f-1;$<_;){var P=$+_>>>1;c[P]<b?$=P+1:_=P}b-c[$-1]<c[$]-b&&h+1<$&&--$;var T=c[$]-v,w=p-T;if(m-d>y-g){var D=p?(d*w+m*T)/p:m;l(h,$,T,d,g,D,y),l($,f,w,D,g,m,y)}else{var S=p?(g*w+y*T)/p:y;l(h,$,T,d,g,m,S),l($,f,w,d,S,m,y)}}}function pT(t,e,n,r,i){(t.depth&1?Zs:wo)(t,e,n,r,i)}const dT=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,p,d=u.length,g=r.value;++f<d;){for(c=u[f],l=c.children,h=c.value=0,p=l.length;h<p;++h)c.value+=l[h].value;c.dice?wo(c,i,o,a,g?o+=(s-o)*c.value/g:s):Zs(c,i,o,g?i+=(a-i)*c.value/g:a,s),g-=c.value}else r._squarify=u=Ey(e,r,i,o,a,s),u.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Cy);function gT(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 mT(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 yT(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function bT(t,e){return t[0]-e[0]||t[1]-e[1]}function Ry(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&yT(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function vT(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(bT),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=Ry(r),a=Ry(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 xT(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 _T(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 Ft=Math.random,wT=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}(Ft),$T=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}(Ft),Uf=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}(Ft),ST=function t(e){var n=Uf.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Ft),Iy=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}(Ft),AT=function t(e){var n=Iy.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}(Ft),MT=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Ft),PT=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}(Ft),DT=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}(Ft),Ny=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}(Ft),Bf=function t(e){var n=Uf.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}(Ft),Fy=function t(e){var n=Bf.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}(Ft),Gy=function t(e){var n=Ny.source(e),r=Fy.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,p=f?c:1-c,d=n(p),g=d(),m=0;g<=u;++m)g+=d();return s+(f?m:u-m)}}return i.source=t,i}(Ft),TT=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}(Ft),LT=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}(Ft),CT=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}(Ft),ET=function t(e){var n=Bf.source(e),r=Gy.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}(Ft),kT=1664525,RT=1013904223,zy=1/4294967296;function IT(t=Math.random()){let e=(0<=t&&t<1?t/zy:Math.abs(t))|0;return()=>(e=kT*e+RT|0,zy*(e>>>0))}function me(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 Yf=Symbol("implicit");function Hf(){var t=new Ti,e=[],n=[],r=Yf;function i(o){let a=t.get(o);if(a===void 0){if(r!==Yf)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 Ti;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 Hf(e,n).unknown(r)},me.apply(i,arguments),i}function Wf(){var t=Hf().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,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),d+=(g-d-o*(f-u))*l,a=o*(1-u),s&&(d=Math.round(d),a=Math.round(a));var m=hn(f).map(function(y){return d+o*y});return n(p?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 Wf(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},me.apply(h(),arguments)}function Oy(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Oy(e())},t}function qf(){return Oy(Wf.apply(null,arguments).paddingInner(1))}function NT(t){return function(){return t}}function Ks(t){return+t}var Uy=[0,1];function te(t){return t}function jf(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:NT(isNaN(e)?NaN:.5)}function FT(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function GT(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=jf(i,r),o=n(a,o)):(r=jf(r,i),o=n(o,a)),function(s){return o(r(s))}}function zT(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]=jf(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=En(t,s,1,r)-1;return o[u](i[u](s))}}function $o(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Qs(){var t=Uy,e=Uy,n=gn,r,i,o,a=te,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==te&&(a=FT(t[0],t[f-1])),s=f>2?zT:GT,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),pe)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,Ks),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=Oa,l()},h.clamp=function(f){return arguments.length?(a=f?!0:te,l()):a!==te},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,p){return r=f,i=p,l()}}function Xf(){return Qs()(te,te)}function By(t,e,n,r){var i=ya(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=Jm(i,a))&&(r.precision=o),zl(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=t1(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Qm(i))&&(r.precision=o-(r.type==="%")*2);break}}return Ji(r)}function xn(t){var e=t.domain;return t.ticks=function(n){var r=e();return Rn(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return By(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=In(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 Vf(){var t=Xf();return t.copy=function(){return $o(t,Vf())},me.apply(t,arguments),xn(t)}function Yy(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,Ks),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Yy(t).unknown(e)},t=arguments.length?Array.from(t,Ks):[0,1],xn(n)}function Hy(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 Wy(t){return Math.log(t)}function qy(t){return Math.exp(t)}function OT(t){return-Math.log(-t)}function UT(t){return-Math.exp(-t)}function BT(t){return isFinite(t)?+("1e"+t):t<0?0:t}function YT(t){return t===10?BT:t===Math.E?Math.exp:e=>Math.pow(t,e)}function HT(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 jy(t){return(e,n)=>-t(-e,n)}function Zf(t){const e=t(Wy,qy),n=e.domain;let r=10,i,o;function a(){return i=HT(r),o=YT(r),n()[0]<0?(i=jy(i),o=jy(o),t(OT,UT)):t(Wy,qy),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),p=i(l),d,g;const m=s==null?10:+s;let y=[];if(!(r%1)&&p-f<m){if(f=Math.floor(f),p=Math.ceil(p),c>0){for(;f<=p;++f)for(d=1;d<r;++d)if(g=f<0?d/o(-f):d*o(f),!(g<c)){if(g>l)break;y.push(g)}}else for(;f<=p;++f)for(d=r-1;d>=1;--d)if(g=f>0?d/o(-f):d*o(f),!(g<c)){if(g>l)break;y.push(g)}y.length*2<m&&(y=Rn(c,l,m))}else y=Rn(f,p,Math.min(p-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=Ji(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(Hy(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function Xy(){const t=Zf(Qs()).domain([1,10]);return t.copy=()=>$o(t,Xy()).base(t.base()),me.apply(t,arguments),t}function Vy(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Zy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Kf(t){var e=1,n=t(Vy(e),Zy(e));return n.constant=function(r){return arguments.length?t(Vy(e=+r),Zy(e)):e},xn(n)}function Ky(){var t=Kf(Qs());return t.copy=function(){return $o(t,Ky()).constant(t.constant())},me.apply(t,arguments)}function Qy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function WT(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function qT(t){return t<0?-t*t:t*t}function Qf(t){var e=t(te,te),n=1;function r(){return n===1?t(te,te):n===.5?t(WT,qT):t(Qy(n),Qy(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},xn(e)}function Js(){var t=Qf(Qs());return t.copy=function(){return $o(t,Js()).exponent(t.exponent())},me.apply(t,arguments),t}function jT(){return Js.apply(null,arguments).exponent(.5)}function Jy(t){return Math.sign(t)*t*t}function XT(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function tb(){var t=Xf(),e=[0,1],n=!1,r;function i(o){var a=XT(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,Ks)).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 tb(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},me.apply(i,arguments),xn(i)}function eb(){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]=kg(t,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:e[En(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 eb().domain(t).range(e).unknown(r)},me.apply(o,arguments)}function nb(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[En(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 nb().domain([t,e]).range(i).unknown(o)},me.apply(xn(a),arguments)}function rb(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[En(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 rb().domain(t).range(e).unknown(n)},me.apply(i,arguments)}const Jf=new Date,th=new Date;function Dt(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=>Dt(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)=>(Jf.setTime(+o),th.setTime(+a),t(Jf),t(th),Math.floor(n(Jf,th))),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=Dt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Jr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Dt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Jr);const ib=Jr.range,nn=1e3,ye=nn*60,rn=ye*60,on=rn*24,eh=on*7,ob=on*30,nh=on*365,an=Dt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*nn)},(t,e)=>(e-t)/nn,t=>t.getUTCSeconds()),ab=an.range,tu=Dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn)},(t,e)=>{t.setTime(+t+e*ye)},(t,e)=>(e-t)/ye,t=>t.getMinutes()),VT=tu.range,eu=Dt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ye)},(t,e)=>(e-t)/ye,t=>t.getUTCMinutes()),ZT=eu.range,nu=Dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn-t.getMinutes()*ye)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getHours()),KT=nu.range,ru=Dt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getUTCHours()),QT=ru.range,ti=Dt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ye)/on,t=>t.getDate()-1),JT=ti.range,So=Dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>t.getUTCDate()-1),tL=So.range,rh=Dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>Math.floor(t/on)),eL=rh.range;function nr(t){return Dt(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())*ye)/eh)}const ei=nr(0),Ao=nr(1),sb=nr(2),ub=nr(3),rr=nr(4),cb=nr(5),lb=nr(6),fb=ei.range,nL=Ao.range,rL=sb.range,iL=ub.range,oL=rr.range,aL=cb.range,sL=lb.range;function ir(t){return Dt(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)/eh)}const ni=ir(0),Mo=ir(1),hb=ir(2),pb=ir(3),or=ir(4),db=ir(5),gb=ir(6),mb=ni.range,uL=Mo.range,cL=hb.range,lL=pb.range,fL=or.range,hL=db.range,pL=gb.range,iu=Dt(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()),dL=iu.range,ou=Dt(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()),gL=ou.range,Be=Dt(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:Dt(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 mL=Be.range,Ye=Dt(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:Dt(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 yL=Ye.range;function yb(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,ye],[o,5,5*ye],[o,15,15*ye],[o,30,30*ye],[i,1,rn],[i,3,3*rn],[i,6,6*rn],[i,12,12*rn],[r,1,on],[r,2,2*on],[n,1,eh],[e,1,ob],[e,3,3*ob],[t,1,nh]];function s(c,l,h){const f=l<c;f&&([c,l]=[l,c]);const p=h&&typeof h.range=="function"?h:u(c,l,h),d=p?p.range(c,+l+1):[];return f?d.reverse():d}function u(c,l,h){const f=Math.abs(l-c)/h,p=pa(([,,m])=>m).right(a,f);if(p===a.length)return t.every(ya(c/nh,l/nh,h));if(p===0)return Jr.every(Math.max(ya(c,l,h),1));const[d,g]=a[f/a[p-1][2]<a[p][2]/f?p-1:p];return d.every(g)}return[s,u]}const[bb,vb]=yb(Ye,ou,ni,rh,ru,eu),[xb,_b]=yb(Be,iu,ei,ti,nu,tu);function ih(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 oh(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 Po(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function wb(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=Do(i),l=To(i),h=Do(o),f=To(o),p=Do(a),d=To(a),g=Do(s),m=To(s),y=Do(u),x=To(u),v={a:F,A:O,b:E,B:R,c:null,d:Db,e:Db,f:OL,g:ZL,G:QL,H:FL,I:GL,j:zL,L:Tb,m:UL,M:BL,p:C,q:N,Q:Ib,s:Nb,S:YL,u:HL,U:WL,V:qL,w:jL,W:XL,x:null,X:null,y:VL,Y:KL,Z:JL,"%":Rb},b={a:j,A:Q,b:I,B:X,c:null,d:Cb,e:Cb,f:rC,g:pC,G:gC,H:tC,I:eC,j:nC,L:Eb,m:iC,M:oC,p:q,q:V,Q:Ib,s:Nb,S:aC,u:sC,U:uC,V:cC,w:lC,W:fC,x:null,X:null,y:hC,Y:dC,Z:mC,"%":Rb},$={a:D,A:S,b:G,B:k,c:A,d:Mb,e:Mb,f:kL,g:Ab,G:Sb,H:Pb,I:Pb,j:TL,L:EL,m:DL,M:LL,p:w,q:PL,Q:IL,s:NL,S:CL,u:wL,U:$L,V:SL,w:_L,W:AL,x:L,X:M,y:Ab,Y:Sb,Z:ML,"%":RL};v.x=_(n,v),v.X=_(r,v),v.c=_(e,v),b.x=_(n,b),b.X=_(r,b),b.c=_(e,b);function _(W,et){return function(ut){var H=[],mt=-1,pt=0,Yt=W.length,ee,at,Mt;for(ut instanceof Date||(ut=new Date(+ut));++mt<Yt;)W.charCodeAt(mt)===37&&(H.push(W.slice(pt,mt)),(at=$b[ee=W.charAt(++mt)])!=null?ee=W.charAt(++mt):at=ee==="e"?" ":"0",(Mt=et[ee])&&(ee=Mt(ut,at)),H.push(ee),pt=mt+1);return H.push(W.slice(pt,mt)),H.join("")}}function P(W,et){return function(ut){var H=Po(1900,void 0,1),mt=T(H,W,ut+="",0),pt,Yt;if(mt!=ut.length)return null;if("Q"in H)return new Date(H.Q);if("s"in H)return new Date(H.s*1e3+("L"in H?H.L:0));if(et&&!("Z"in H)&&(H.Z=0),"p"in H&&(H.H=H.H%12+H.p*12),H.m===void 0&&(H.m="q"in H?H.q:0),"V"in H){if(H.V<1||H.V>53)return null;"w"in H||(H.w=1),"Z"in H?(pt=oh(Po(H.y,0,1)),Yt=pt.getUTCDay(),pt=Yt>4||Yt===0?Mo.ceil(pt):Mo(pt),pt=So.offset(pt,(H.V-1)*7),H.y=pt.getUTCFullYear(),H.m=pt.getUTCMonth(),H.d=pt.getUTCDate()+(H.w+6)%7):(pt=ih(Po(H.y,0,1)),Yt=pt.getDay(),pt=Yt>4||Yt===0?Ao.ceil(pt):Ao(pt),pt=ti.offset(pt,(H.V-1)*7),H.y=pt.getFullYear(),H.m=pt.getMonth(),H.d=pt.getDate()+(H.w+6)%7)}else("W"in H||"U"in H)&&("w"in H||(H.w="u"in H?H.u%7:"W"in H?1:0),Yt="Z"in H?oh(Po(H.y,0,1)).getUTCDay():ih(Po(H.y,0,1)).getDay(),H.m=0,H.d="W"in H?(H.w+6)%7+H.W*7-(Yt+5)%7:H.w+H.U*7-(Yt+6)%7);return"Z"in H?(H.H+=H.Z/100|0,H.M+=H.Z%100,oh(H)):ih(H)}}function T(W,et,ut,H){for(var mt=0,pt=et.length,Yt=ut.length,ee,at;mt<pt;){if(H>=Yt)return-1;if(ee=et.charCodeAt(mt++),ee===37){if(ee=et.charAt(mt++),at=$[ee in $b?et.charAt(mt++):ee],!at||(H=at(W,ut,H))<0)return-1}else if(ee!=ut.charCodeAt(H++))return-1}return H}function w(W,et,ut){var H=c.exec(et.slice(ut));return H?(W.p=l.get(H[0].toLowerCase()),ut+H[0].length):-1}function D(W,et,ut){var H=p.exec(et.slice(ut));return H?(W.w=d.get(H[0].toLowerCase()),ut+H[0].length):-1}function S(W,et,ut){var H=h.exec(et.slice(ut));return H?(W.w=f.get(H[0].toLowerCase()),ut+H[0].length):-1}function G(W,et,ut){var H=y.exec(et.slice(ut));return H?(W.m=x.get(H[0].toLowerCase()),ut+H[0].length):-1}function k(W,et,ut){var H=g.exec(et.slice(ut));return H?(W.m=m.get(H[0].toLowerCase()),ut+H[0].length):-1}function A(W,et,ut){return T(W,e,et,ut)}function L(W,et,ut){return T(W,n,et,ut)}function M(W,et,ut){return T(W,r,et,ut)}function F(W){return a[W.getDay()]}function O(W){return o[W.getDay()]}function E(W){return u[W.getMonth()]}function R(W){return s[W.getMonth()]}function C(W){return i[+(W.getHours()>=12)]}function N(W){return 1+~~(W.getMonth()/3)}function j(W){return a[W.getUTCDay()]}function Q(W){return o[W.getUTCDay()]}function I(W){return u[W.getUTCMonth()]}function X(W){return s[W.getUTCMonth()]}function q(W){return i[+(W.getUTCHours()>=12)]}function V(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var et=_(W+="",v);return et.toString=function(){return W},et},parse:function(W){var et=P(W+="",!1);return et.toString=function(){return W},et},utcFormat:function(W){var et=_(W+="",b);return et.toString=function(){return W},et},utcParse:function(W){var et=P(W+="",!0);return et.toString=function(){return W},et}}}var $b={"-":"",_:" ",0:"0"},Nt=/^\s*\d+/,bL=/^%/,vL=/[\\^$*+?|[\]().{}]/g;function gt(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 xL(t){return t.replace(vL,"\\$&")}function Do(t){return new RegExp("^(?:"+t.map(xL).join("|")+")","i")}function To(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function _L(t,e,n){var r=Nt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function wL(t,e,n){var r=Nt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $L(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function SL(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function AL(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Sb(t,e,n){var r=Nt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Ab(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ML(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 PL(t,e,n){var r=Nt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function DL(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Mb(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function TL(t,e,n){var r=Nt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Pb(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function LL(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function CL(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function EL(t,e,n){var r=Nt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function kL(t,e,n){var r=Nt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function RL(t,e,n){var r=bL.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function IL(t,e,n){var r=Nt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function NL(t,e,n){var r=Nt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Db(t,e){return gt(t.getDate(),e,2)}function FL(t,e){return gt(t.getHours(),e,2)}function GL(t,e){return gt(t.getHours()%12||12,e,2)}function zL(t,e){return gt(1+ti.count(Be(t),t),e,3)}function Tb(t,e){return gt(t.getMilliseconds(),e,3)}function OL(t,e){return Tb(t,e)+"000"}function UL(t,e){return gt(t.getMonth()+1,e,2)}function BL(t,e){return gt(t.getMinutes(),e,2)}function YL(t,e){return gt(t.getSeconds(),e,2)}function HL(t){var e=t.getDay();return e===0?7:e}function WL(t,e){return gt(ei.count(Be(t)-1,t),e,2)}function Lb(t){var e=t.getDay();return e>=4||e===0?rr(t):rr.ceil(t)}function qL(t,e){return t=Lb(t),gt(rr.count(Be(t),t)+(Be(t).getDay()===4),e,2)}function jL(t){return t.getDay()}function XL(t,e){return gt(Ao.count(Be(t)-1,t),e,2)}function VL(t,e){return gt(t.getFullYear()%100,e,2)}function ZL(t,e){return t=Lb(t),gt(t.getFullYear()%100,e,2)}function KL(t,e){return gt(t.getFullYear()%1e4,e,4)}function QL(t,e){var n=t.getDay();return t=n>=4||n===0?rr(t):rr.ceil(t),gt(t.getFullYear()%1e4,e,4)}function JL(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+gt(e/60|0,"0",2)+gt(e%60,"0",2)}function Cb(t,e){return gt(t.getUTCDate(),e,2)}function tC(t,e){return gt(t.getUTCHours(),e,2)}function eC(t,e){return gt(t.getUTCHours()%12||12,e,2)}function nC(t,e){return gt(1+So.count(Ye(t),t),e,3)}function Eb(t,e){return gt(t.getUTCMilliseconds(),e,3)}function rC(t,e){return Eb(t,e)+"000"}function iC(t,e){return gt(t.getUTCMonth()+1,e,2)}function oC(t,e){return gt(t.getUTCMinutes(),e,2)}function aC(t,e){return gt(t.getUTCSeconds(),e,2)}function sC(t){var e=t.getUTCDay();return e===0?7:e}function uC(t,e){return gt(ni.count(Ye(t)-1,t),e,2)}function kb(t){var e=t.getUTCDay();return e>=4||e===0?or(t):or.ceil(t)}function cC(t,e){return t=kb(t),gt(or.count(Ye(t),t)+(Ye(t).getUTCDay()===4),e,2)}function lC(t){return t.getUTCDay()}function fC(t,e){return gt(Mo.count(Ye(t)-1,t),e,2)}function hC(t,e){return gt(t.getUTCFullYear()%100,e,2)}function pC(t,e){return t=kb(t),gt(t.getUTCFullYear()%100,e,2)}function dC(t,e){return gt(t.getUTCFullYear()%1e4,e,4)}function gC(t,e){var n=t.getUTCDay();return t=n>=4||n===0?or(t):or.ceil(t),gt(t.getUTCFullYear()%1e4,e,4)}function mC(){return"+0000"}function Rb(){return"%"}function Ib(t){return+t}function Nb(t){return Math.floor(+t/1e3)}var ri,ah,Fb,au,sh;Gb({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 Gb(t){return ri=wb(t),ah=ri.format,Fb=ri.parse,au=ri.utcFormat,sh=ri.utcParse,ri}var zb="%Y-%m-%dT%H:%M:%S.%LZ";function yC(t){return t.toISOString()}var bC=Date.prototype.toISOString?yC:au(zb);const vC=bC;function xC(t){var e=new Date(t);return isNaN(e)?null:e}var _C=+new Date("2000-01-01T00:00:00.000Z")?xC:sh(zb);const wC=_C;function $C(t){return new Date(t)}function SC(t){return t instanceof Date?+t:+new Date(+t)}function uh(t,e,n,r,i,o,a,s,u,c){var l=Xf(),h=l.invert,f=l.domain,p=c(".%L"),d=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),x=c("%b %d"),v=c("%B"),b=c("%Y");function $(_){return(u(_)<_?p:s(_)<_?d:a(_)<_?g:o(_)<_?m:r(_)<_?i(_)<_?y:x:n(_)<_?v:b)(_)}return l.invert=function(_){return new Date(h(_))},l.domain=function(_){return arguments.length?f(Array.from(_,SC)):f().map($C)},l.ticks=function(_){var P=f();return t(P[0],P[P.length-1],_??10)},l.tickFormat=function(_,P){return P==null?$:c(P)},l.nice=function(_){var P=f();return(!_||typeof _.range!="function")&&(_=e(P[0],P[P.length-1],_??10)),_?f(Hy(P,_)):l},l.copy=function(){return $o(l,uh(t,e,n,r,i,o,a,s,u,c))},l}function AC(){return me.apply(uh(xb,_b,Be,iu,ei,ti,nu,tu,an,ah).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function MC(){return me.apply(uh(bb,vb,Ye,ou,ni,So,ru,eu,an,au).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function su(){var t=0,e=1,n,r,i,o,a=te,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 p,d;return arguments.length?([p,d]=f,a=h(p,d),c):[a(0),a(1)]}}return c.range=l(gn),c.rangeRound=l(Oa),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 _n(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Ob(){var t=xn(su()(te));return t.copy=function(){return _n(t,Ob())},en.apply(t,arguments)}function Ub(){var t=Zf(su()).domain([1,10]);return t.copy=function(){return _n(t,Ub()).base(t.base())},en.apply(t,arguments)}function Bb(){var t=Kf(su());return t.copy=function(){return _n(t,Bb()).constant(t.constant())},en.apply(t,arguments)}function ch(){var t=Qf(su());return t.copy=function(){return _n(t,ch()).exponent(t.exponent())},en.apply(t,arguments)}function PC(){return ch.apply(null,arguments).exponent(.5)}function Yb(){var t=[],e=te;function n(r){if(r!=null&&!isNaN(r=+r))return e((En(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)=>Ei(t,o/r))},n.copy=function(){return Yb(e).domain(t)},en.apply(n,arguments)}function uu(){var t=0,e=.5,n=1,r=1,i,o,a,s,u,c=te,l,h=!1,f;function p(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))}p.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,p):[t,e,n]},p.clamp=function(g){return arguments.length?(h=!!g,p):h},p.interpolator=function(g){return arguments.length?(c=g,p):c};function d(g){return function(m){var y,x,v;return arguments.length?([y,x,v]=m,c=H0(g,[y,x,v]),p):[c(0),c(.5),c(1)]}}return p.range=d(gn),p.rangeRound=d(Oa),p.unknown=function(g){return arguments.length?(f=g,p):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,p}}function Hb(){var t=xn(uu()(te));return t.copy=function(){return _n(t,Hb())},en.apply(t,arguments)}function Wb(){var t=Zf(uu()).domain([.1,1,10]);return t.copy=function(){return _n(t,Wb()).base(t.base())},en.apply(t,arguments)}function qb(){var t=Kf(uu());return t.copy=function(){return _n(t,qb()).constant(t.constant())},en.apply(t,arguments)}function lh(){var t=Qf(uu());return t.copy=function(){return _n(t,lh()).exponent(t.exponent())},en.apply(t,arguments)}function DC(){return lh.apply(null,arguments).exponent(.5)}function lt(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 TC=lt("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),LC=lt("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),CC=lt("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),EC=lt("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),kC=lt("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),RC=lt("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),IC=lt("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),NC=lt("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),FC=lt("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),GC=lt("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),zC=lt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),vt=t=>T0(t[t.length-1]);var jb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(lt);const OC=vt(jb);var Xb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(lt);const UC=vt(Xb);var Vb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(lt);const BC=vt(Vb);var Zb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(lt);const YC=vt(Zb);var Kb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(lt);const HC=vt(Kb);var Qb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(lt);const WC=vt(Qb);var Jb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(lt);const qC=vt(Jb);var tv=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(lt);const jC=vt(tv);var ev=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(lt);const XC=vt(ev);var nv=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(lt);const VC=vt(nv);var rv=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(lt);const ZC=vt(rv);var iv=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(lt);const KC=vt(iv);var ov=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(lt);const QC=vt(ov);var av=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(lt);const JC=vt(av);var sv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(lt);const tE=vt(sv);var uv=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(lt);const eE=vt(uv);var cv=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(lt);const nE=vt(cv);var lv=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(lt);const rE=vt(lv);var fv=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(lt);const iE=vt(fv);var hv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(lt);const oE=vt(hv);var pv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(lt);const aE=vt(pv);var dv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(lt);const sE=vt(dv);var gv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(lt);const uE=vt(gv);var mv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(lt);const cE=vt(mv);var yv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(lt);const lE=vt(yv);var bv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(lt);const fE=vt(bv);var vv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(lt);const hE=vt(vv);function pE(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 dE=Ba(Pe(300,.5,0),Pe(-240,.5,1));var gE=Ba(Pe(-100,.75,.35),Pe(80,1.5,.8)),mE=Ba(Pe(260,.75,.35),Pe(80,1.5,.8)),cu=Pe();function yE(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return cu.h=360*t-100,cu.s=1.5-1.5*e,cu.l=.8-.9*e,cu+""}var lu=Er(),bE=Math.PI/3,vE=Math.PI*2/3;function xE(t){var e;return t=(.5-t)*Math.PI,lu.r=255*(e=Math.sin(t))*e,lu.g=255*(e=Math.sin(t+bE))*e,lu.b=255*(e=Math.sin(t+vE))*e,lu+""}function _E(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 fu(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const wE=fu(lt("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var $E=fu(lt("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),SE=fu(lt("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),AE=fu(lt("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ct(t){return function(){return t}}const xv=Math.abs,Ut=Math.atan2,sn=Math.cos,ME=Math.max,ii=Math.min,oe=Math.sin,xt=Math.sqrt,Bt=1e-12,wn=Math.PI,hu=wn/2,$n=2*wn;function PE(t){return t>1?0:t<-1?wn:Math.acos(t)}function _v(t){return t>=1?hu:t<=-1?-hu:Math.asin(t)}function Lo(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 Vi(e)}function DE(t){return t.innerRadius}function TE(t){return t.outerRadius}function LE(t){return t.startAngle}function CE(t){return t.endAngle}function EE(t){return t&&t.padAngle}function kE(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)/xt(s*s+u*u),l=c*u,h=-c*s,f=t+l,p=e+h,d=n+l,g=r+h,m=(f+d)/2,y=(p+g)/2,x=d-f,v=g-p,b=x*x+v*v,$=i-o,_=f*g-d*p,P=(v<0?-1:1)*xt(ME(0,$*$*b-_*_)),T=(_*v-x*P)/b,w=(-_*x-v*P)/b,D=(_*v+x*P)/b,S=(-_*x+v*P)/b,G=T-m,k=w-y,A=D-m,L=S-y;return G*G+k*k>A*A+L*L&&(T=D,w=S),{cx:T,cy:w,x01:-l,y01:-h,x11:T*(i/$-1),y11:w*(i/$-1)}}function wv(){var t=DE,e=TE,n=ct(0),r=null,i=LE,o=CE,a=EE,s=null,u=Lo(c);function c(){var l,h,f=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-hu,g=o.apply(this,arguments)-hu,m=xv(g-d),y=g>d;if(s||(s=l=u()),p<f&&(h=p,p=f,f=h),!(p>Bt))s.moveTo(0,0);else if(m>$n-Bt)s.moveTo(p*sn(d),p*oe(d)),s.arc(0,0,p,d,g,!y),f>Bt&&(s.moveTo(f*sn(g),f*oe(g)),s.arc(0,0,f,g,d,y));else{var x=d,v=g,b=d,$=g,_=m,P=m,T=a.apply(this,arguments)/2,w=T>Bt&&(r?+r.apply(this,arguments):xt(f*f+p*p)),D=ii(xv(p-f)/2,+n.apply(this,arguments)),S=D,G=D,k,A;if(w>Bt){var L=_v(w/f*oe(T)),M=_v(w/p*oe(T));(_-=L*2)>Bt?(L*=y?1:-1,b+=L,$-=L):(_=0,b=$=(d+g)/2),(P-=M*2)>Bt?(M*=y?1:-1,x+=M,v-=M):(P=0,x=v=(d+g)/2)}var F=p*sn(x),O=p*oe(x),E=f*sn($),R=f*oe($);if(D>Bt){var C=p*sn(v),N=p*oe(v),j=f*sn(b),Q=f*oe(b),I;if(m<wn)if(I=kE(F,O,j,Q,C,N,E,R)){var X=F-I[0],q=O-I[1],V=C-I[0],W=N-I[1],et=1/oe(PE((X*V+q*W)/(xt(X*X+q*q)*xt(V*V+W*W)))/2),ut=xt(I[0]*I[0]+I[1]*I[1]);S=ii(D,(f-ut)/(et-1)),G=ii(D,(p-ut)/(et+1))}else S=G=0}P>Bt?G>Bt?(k=pu(j,Q,F,O,p,G,y),A=pu(C,N,E,R,p,G,y),s.moveTo(k.cx+k.x01,k.cy+k.y01),G<D?s.arc(k.cx,k.cy,G,Ut(k.y01,k.x01),Ut(A.y01,A.x01),!y):(s.arc(k.cx,k.cy,G,Ut(k.y01,k.x01),Ut(k.y11,k.x11),!y),s.arc(0,0,p,Ut(k.cy+k.y11,k.cx+k.x11),Ut(A.cy+A.y11,A.cx+A.x11),!y),s.arc(A.cx,A.cy,G,Ut(A.y11,A.x11),Ut(A.y01,A.x01),!y))):(s.moveTo(F,O),s.arc(0,0,p,x,v,!y)):s.moveTo(F,O),!(f>Bt)||!(_>Bt)?s.lineTo(E,R):S>Bt?(k=pu(E,R,C,N,f,-S,y),A=pu(F,O,j,Q,f,-S,y),s.lineTo(k.cx+k.x01,k.cy+k.y01),S<D?s.arc(k.cx,k.cy,S,Ut(k.y01,k.x01),Ut(A.y01,A.x01),!y):(s.arc(k.cx,k.cy,S,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(A.cy+A.y11,A.cx+A.x11),y),s.arc(A.cx,A.cy,S,Ut(A.y11,A.x11),Ut(A.y01,A.x01),!y))):s.arc(0,0,f,$,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-wn/2;return[sn(h)*l,oe(h)*l]},c.innerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:ct(+l),c):t},c.outerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:ct(+l),c):e},c.cornerRadius=function(l){return arguments.length?(n=typeof l=="function"?l:ct(+l),c):n},c.padRadius=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:ct(+l),c):r},c.startAngle=function(l){return arguments.length?(i=typeof l=="function"?l:ct(+l),c):i},c.endAngle=function(l){return arguments.length?(o=typeof l=="function"?l:ct(+l),c):o},c.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:ct(+l),c):a},c.context=function(l){return arguments.length?(s=l??null,c):s},c}var RE=Array.prototype.slice;function du(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function $v(t){this._context=t}$v.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 gu(t){return new $v(t)}function fh(t){return t[0]}function hh(t){return t[1]}function mu(t,e){var n=ct(!0),r=null,i=gu,o=null,a=Lo(s);t=typeof t=="function"?t:t===void 0?fh:ct(t),e=typeof e=="function"?e:e===void 0?hh:ct(e);function s(u){var c,l=(u=du(u)).length,h,f=!1,p;for(r==null&&(o=i(p=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(p)return o=null,p+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:ct(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:ct(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:ct(!!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 ph(t,e,n){var r=null,i=ct(!0),o=null,a=gu,s=null,u=Lo(c);t=typeof t=="function"?t:t===void 0?fh:ct(+t),e=typeof e=="function"?e:ct(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?hh:ct(+n);function c(h){var f,p,d,g=(h=du(h)).length,m,y=!1,x,v=new Array(g),b=new Array(g);for(o==null&&(s=a(x=u())),f=0;f<=g;++f){if(!(f<g&&i(m=h[f],f,h))===y)if(y=!y)p=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=f-1;d>=p;--d)s.point(v[d],b[d]);s.lineEnd(),s.areaEnd()}y&&(v[f]=+t(m,f,h),b[f]=+e(m,f,h),s.point(r?+r(m,f,h):v[f],n?+n(m,f,h):b[f]))}if(x)return s=null,x+""||null}function l(){return mu().defined(i).curve(a).context(o)}return c.x=function(h){return arguments.length?(t=typeof h=="function"?h:ct(+h),r=null,c):t},c.x0=function(h){return arguments.length?(t=typeof h=="function"?h:ct(+h),c):t},c.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:ct(+h),c):r},c.y=function(h){return arguments.length?(e=typeof h=="function"?h:ct(+h),n=null,c):e},c.y0=function(h){return arguments.length?(e=typeof h=="function"?h:ct(+h),c):e},c.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:ct(+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:ct(!!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 IE(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function NE(t){return t}function Sv(){var t=NE,e=IE,n=null,r=ct(0),i=ct($n),o=ct(0);function a(s){var u,c=(s=du(s)).length,l,h,f=0,p=new Array(c),d=new Array(c),g=+r.apply(this,arguments),m=Math.min($n,Math.max(-$n,i.apply(this,arguments)-g)),y,x=Math.min(Math.abs(m)/c,o.apply(this,arguments)),v=x*(m<0?-1:1),b;for(u=0;u<c;++u)(b=d[p[u]=u]=+t(s[u],u,s))>0&&(f+=b);for(e!=null?p.sort(function($,_){return e(d[$],d[_])}):n!=null&&p.sort(function($,_){return n(s[$],s[_])}),u=0,h=f?(m-c*v)/f:0;u<c;++u,g=y)l=p[u],b=d[l],y=g+(b>0?b*h:0)+v,d[l]={data:s[l],index:u,value:b,startAngle:g,endAngle:y,padAngle:x};return d}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:ct(+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:ct(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:ct(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:ct(+s),a):o},a}var Av=dh(gu);function Mv(t){this._curve=t}Mv.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 dh(t){function e(n){return new Mv(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(dh(n)):e()._curve},t}function Pv(){return Co(mu().curve(Av))}function Dv(){var t=ph().curve(Av),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(dh(a)):e()._curve},t}function Eo(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class Tv{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 FE{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=Eo(this._x0,this._y0),i=Eo(this._x0,this._y0=(this._y0+n)/2),o=Eo(e,this._y0),a=Eo(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function Lv(t){return new Tv(t,!0)}function Cv(t){return new Tv(t,!1)}function GE(t){return new FE(t)}function zE(t){return t.source}function OE(t){return t.target}function yu(t){let e=zE,n=OE,r=fh,i=hh,o=null,a=null,s=Lo(u);function u(){let c;const l=RE.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:ct(+c),u):r},u.y=function(c){return arguments.length?(i=typeof c=="function"?c:ct(+c),u):i},u.context=function(c){return arguments.length?(c==null?o=a=null:a=t(o=c),u):o},u}function UE(){return yu(Lv)}function BE(){return yu(Cv)}function YE(){const t=yu(GE);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const HE=xt(3),Ev={draw(t,e){const n=xt(e+ii(e/28,.75))*.59436,r=n/2,i=r*HE;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},bu={draw(t,e){const n=xt(e/wn);t.moveTo(n,0),t.arc(0,0,n,0,$n)}},kv={draw(t,e){const n=xt(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()}},Rv=xt(1/3),WE=Rv*2,Iv={draw(t,e){const n=xt(e/WE),r=n*Rv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Nv={draw(t,e){const n=xt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},Fv={draw(t,e){const n=xt(e-ii(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},Gv={draw(t,e){const n=xt(e),r=-n/2;t.rect(r,r,n,n)}},zv={draw(t,e){const n=xt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},qE=.8908130915292852,Ov=oe(wn/10)/oe(7*wn/10),jE=oe($n/10)*Ov,XE=-sn($n/10)*Ov,Uv={draw(t,e){const n=xt(e*qE),r=jE*n,i=XE*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=oe(a);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},gh=xt(3),Bv={draw(t,e){const n=-xt(e/(gh*3));t.moveTo(0,n*2),t.lineTo(-gh*n,-n),t.lineTo(gh*n,-n),t.closePath()}},VE=xt(3),Yv={draw(t,e){const n=xt(e)*.6824,r=n/2,i=n*VE/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},be=-.5,ve=xt(3)/2,mh=1/xt(12),ZE=(mh/2+1)*3,Hv={draw(t,e){const n=xt(e/ZE),r=n/2,i=n*mh,o=r,a=n*mh+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(be*r-ve*i,ve*r+be*i),t.lineTo(be*o-ve*a,ve*o+be*a),t.lineTo(be*s-ve*u,ve*s+be*u),t.lineTo(be*r+ve*i,be*i-ve*r),t.lineTo(be*o+ve*a,be*a-ve*o),t.lineTo(be*s+ve*u,be*u-ve*s),t.closePath()}},yh={draw(t,e){const n=xt(e-ii(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},Wv=[bu,kv,Iv,Gv,Uv,Bv,Hv],KE=[bu,Fv,yh,Yv,Ev,zv,Nv];function QE(t,e){let n=null,r=Lo(i);t=typeof t=="function"?t:ct(t||bu),e=typeof e=="function"?e:ct(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:ct(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:ct(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Sn(){}function vu(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 xu(t){this._context=t}xu.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:vu(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:vu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function JE(t){return new xu(t)}function qv(t){this._context=t}qv.prototype={areaStart:Sn,areaEnd:Sn,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:vu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function tk(t){return new qv(t)}function jv(t){this._context=t}jv.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:vu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function ek(t){return new jv(t)}function Xv(t,e){this._basis=new xu(t),this._beta=e}Xv.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 nk=function t(e){function n(r){return e===1?new xu(r):new Xv(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function _u(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 bh(t,e){this._context=t,this._k=(1-e)/6}bh.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:_u(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:_u(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 rk=function t(e){function n(r){return new bh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function vh(t,e){this._context=t,this._k=(1-e)/6}vh.prototype={areaStart:Sn,areaEnd:Sn,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:_u(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 ik=function t(e){function n(r){return new vh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function xh(t,e){this._context=t,this._k=(1-e)/6}xh.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:_u(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 ok=function t(e){function n(r){return new xh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function _h(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 Vv(t,e){this._context=t,this._alpha=e}Vv.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:_h(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 ak=function t(e){function n(r){return e?new Vv(r,e):new bh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Zv(t,e){this._context=t,this._alpha=e}Zv.prototype={areaStart:Sn,areaEnd:Sn,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:_h(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 sk=function t(e){function n(r){return e?new Zv(r,e):new vh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Kv(t,e){this._context=t,this._alpha=e}Kv.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:_h(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 uk=function t(e){function n(r){return e?new Kv(r,e):new xh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Qv(t){this._context=t}Qv.prototype={areaStart:Sn,areaEnd:Sn,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 ck(t){return new Qv(t)}function Jv(t){return t<0?-1:1}function t2(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 e2(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function wh(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 wu(t){this._context=t}wu.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:wh(this,this._t0,e2(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,wh(this,e2(this,n=t2(this,t,e)),n);break;default:wh(this,this._t0,n=t2(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function n2(t){this._context=new r2(t)}(n2.prototype=Object.create(wu.prototype)).point=function(t,e){wu.prototype.point.call(this,e,t)};function r2(t){this._context=t}r2.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 lk(t){return new wu(t)}function fk(t){return new n2(t)}function i2(t){this._context=t}i2.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=o2(t),i=o2(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 o2(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 hk(t){return new i2(t)}function $u(t,e){this._context=t,this._t=e}$u.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 pk(t){return new $u(t,.5)}function dk(t){return new $u(t,0)}function gk(t){return new $u(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 mk(t,e){return t[e]}function yk(t){const e=[];return e.key=t,e}function bk(){var t=ct([]),e=ai,n=oi,r=mk;function i(o){var a=Array.from(t.apply(this,arguments),yk),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=du(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:ct(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:ct(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?ai:typeof o=="function"?o:ct(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??oi,i):n},i}function vk(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 xk(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 _k(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 wk(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,p=(h-f)/2,d=0;d<s;++d){var g=t[e[d]],m=g[r][1]||0,y=g[r-1][1]||0;p+=m-y}u+=h,c+=p*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 a2(t){var e=t.map($k);return ai(t).sort(function(n,r){return e[n]-e[r]})}function $k(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 s2(t){var e=t.map(u2);return ai(t).sort(function(n,r){return e[n]-e[r]})}function u2(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function Sk(t){return s2(t).reverse()}function Ak(t){var e=t.length,n,r,i=t.map(u2),o=a2(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 Mk(t){return ai(t).reverse()}const Su=t=>()=>t;function Pk(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 Au=new He(1,0,0);c2.prototype=He.prototype;function c2(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Au;return t.__zoom}function $h(t){t.stopImmediatePropagation()}function ko(t){t.preventDefault(),t.stopImmediatePropagation()}function Dk(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Tk(){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 l2(){return this.__zoom||Au}function Lk(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Ck(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ek(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 f2(){var t=Dk,e=Tk,n=Ek,r=Lk,i=Ck,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=O0,c=Nn("start","zoom","end"),l,h,f,p=500,d=150,g=0,m=10;function y(A){A.property("__zoom",l2).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",w).on("dblclick.zoom",D).filter(i).on("touchstart.zoom",S).on("touchmove.zoom",G).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(A,L,M,F){var O=A.selection?A.selection():A;O.property("__zoom",l2),A!==O?$(A,L,M,F):O.interrupt().each(function(){_(this,arguments).event(F).start().zoom(null,typeof L=="function"?L.apply(this,arguments):L).end()})},y.scaleBy=function(A,L,M,F){y.scaleTo(A,function(){var O=this.__zoom.k,E=typeof L=="function"?L.apply(this,arguments):L;return O*E},M,F)},y.scaleTo=function(A,L,M,F){y.transform(A,function(){var O=e.apply(this,arguments),E=this.__zoom,R=M==null?b(O):typeof M=="function"?M.apply(this,arguments):M,C=E.invert(R),N=typeof L=="function"?L.apply(this,arguments):L;return n(v(x(E,N),R,C),O,a)},M,F)},y.translateBy=function(A,L,M,F){y.transform(A,function(){return n(this.__zoom.translate(typeof L=="function"?L.apply(this,arguments):L,typeof M=="function"?M.apply(this,arguments):M),e.apply(this,arguments),a)},null,F)},y.translateTo=function(A,L,M,F,O){y.transform(A,function(){var E=e.apply(this,arguments),R=this.__zoom,C=F==null?b(E):typeof F=="function"?F.apply(this,arguments):F;return n(Au.translate(C[0],C[1]).scale(R.k).translate(typeof L=="function"?-L.apply(this,arguments):-L,typeof M=="function"?-M.apply(this,arguments):-M),E,a)},F,O)};function x(A,L){return L=Math.max(o[0],Math.min(o[1],L)),L===A.k?A:new He(L,A.x,A.y)}function v(A,L,M){var F=L[0]-M[0]*A.k,O=L[1]-M[1]*A.k;return F===A.x&&O===A.y?A:new He(A.k,F,O)}function b(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function $(A,L,M,F){A.on("start.zoom",function(){_(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(F).end()}).tween("zoom",function(){var O=this,E=arguments,R=_(O,E).event(F),C=e.apply(O,E),N=M==null?b(C):typeof M=="function"?M.apply(O,E):M,j=Math.max(C[1][0]-C[0][0],C[1][1]-C[0][1]),Q=O.__zoom,I=typeof L=="function"?L.apply(O,E):L,X=u(Q.invert(N).concat(j/Q.k),I.invert(N).concat(j/I.k));return function(q){if(q===1)q=I;else{var V=X(q),W=j/V[2];q=new He(W,N[0]-V[0]*W,N[1]-V[1]*W)}R.zoom(null,q)}})}function _(A,L,M){return!M&&A.__zooming||new P(A,L)}function P(A,L){this.that=A,this.args=L,this.active=0,this.sourceEvent=null,this.extent=e.apply(A,L),this.taps=0}P.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,L){return this.mouse&&A!=="mouse"&&(this.mouse[1]=L.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=L.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=L.invert(this.touch1[0])),this.that.__zoom=L,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var L=Z(this.that).datum();c.call(A,this.that,new Pk(A,{sourceEvent:this.sourceEvent,target:y,type:A,transform:this.that.__zoom,dispatch:c}),L)}};function T(A,...L){if(!t.apply(this,arguments))return;var M=_(this,L).event(A),F=this.__zoom,O=Math.max(o[0],Math.min(o[1],F.k*Math.pow(2,r.apply(this,arguments)))),E=ue(A);if(M.wheel)(M.mouse[0][0]!==E[0]||M.mouse[0][1]!==E[1])&&(M.mouse[1]=F.invert(M.mouse[0]=E)),clearTimeout(M.wheel);else{if(F.k===O)return;M.mouse=[E,F.invert(E)],Hn(this),M.start()}ko(A),M.wheel=setTimeout(R,d),M.zoom("mouse",n(v(x(F,O),M.mouse[0],M.mouse[1]),M.extent,a));function R(){M.wheel=null,M.end()}}function w(A,...L){if(f||!t.apply(this,arguments))return;var M=A.currentTarget,F=_(this,L,!0).event(A),O=Z(A.view).on("mousemove.zoom",N,!0).on("mouseup.zoom",j,!0),E=ue(A,M),R=A.clientX,C=A.clientY;Pa(A.view),$h(A),F.mouse=[E,this.__zoom.invert(E)],Hn(this),F.start();function N(Q){if(ko(Q),!F.moved){var I=Q.clientX-R,X=Q.clientY-C;F.moved=I*I+X*X>g}F.event(Q).zoom("mouse",n(v(F.that.__zoom,F.mouse[0]=ue(Q,M),F.mouse[1]),F.extent,a))}function j(Q){O.on("mousemove.zoom mouseup.zoom",null),Da(Q.view,F.moved),ko(Q),F.event(Q).end()}}function D(A,...L){if(t.apply(this,arguments)){var M=this.__zoom,F=ue(A.changedTouches?A.changedTouches[0]:A,this),O=M.invert(F),E=M.k*(A.shiftKey?.5:2),R=n(v(x(M,E),F,O),e.apply(this,L),a);ko(A),s>0?Z(this).transition().duration(s).call($,R,F,A):Z(this).call(y.transform,R,F,A)}}function S(A,...L){if(t.apply(this,arguments)){var M=A.touches,F=M.length,O=_(this,L,A.changedTouches.length===F).event(A),E,R,C,N;for($h(A),R=0;R<F;++R)C=M[R],N=ue(C,this),N=[N,this.__zoom.invert(N),C.identifier],O.touch0?!O.touch1&&O.touch0[2]!==N[2]&&(O.touch1=N,O.taps=0):(O.touch0=N,E=!0,O.taps=1+!!l);l&&(l=clearTimeout(l)),E&&(O.taps<2&&(h=N[0],l=setTimeout(function(){l=null},p)),Hn(this),O.start())}}function G(A,...L){if(this.__zooming){var M=_(this,L).event(A),F=A.changedTouches,O=F.length,E,R,C,N;for(ko(A),E=0;E<O;++E)R=F[E],C=ue(R,this),M.touch0&&M.touch0[2]===R.identifier?M.touch0[0]=C:M.touch1&&M.touch1[2]===R.identifier&&(M.touch1[0]=C);if(R=M.that.__zoom,M.touch1){var j=M.touch0[0],Q=M.touch0[1],I=M.touch1[0],X=M.touch1[1],q=(q=I[0]-j[0])*q+(q=I[1]-j[1])*q,V=(V=X[0]-Q[0])*V+(V=X[1]-Q[1])*V;R=x(R,Math.sqrt(q/V)),C=[(j[0]+I[0])/2,(j[1]+I[1])/2],N=[(Q[0]+X[0])/2,(Q[1]+X[1])/2]}else if(M.touch0)C=M.touch0[0],N=M.touch0[1];else return;M.zoom("touch",n(v(R,C,N),M.extent,a))}}function k(A,...L){if(this.__zooming){var M=_(this,L).event(A),F=A.changedTouches,O=F.length,E,R;for($h(A),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),E=0;E<O;++E)R=F[E],M.touch0&&M.touch0[2]===R.identifier?delete M.touch0:M.touch1&&M.touch1[2]===R.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&&(R=ue(R,this),Math.hypot(h[0]-R[0],h[1]-R[1])<m)){var C=Z(this).on("dblclick.zoom");C&&C.apply(this,arguments)}}}return y.wheelDelta=function(A){return arguments.length?(r=typeof A=="function"?A:Su(+A),y):r},y.filter=function(A){return arguments.length?(t=typeof A=="function"?A:Su(!!A),y):t},y.touchable=function(A){return arguments.length?(i=typeof A=="function"?A:Su(!!A),y):i},y.extent=function(A){return arguments.length?(e=typeof A=="function"?A:Su([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),y):e},y.scaleExtent=function(A){return arguments.length?(o[0]=+A[0],o[1]=+A[1],y):[o[0],o[1]]},y.translateExtent=function(A){return arguments.length?(a[0][0]=+A[0][0],a[1][0]=+A[1][0],a[0][1]=+A[0][1],a[1][1]=+A[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(A){return arguments.length?(n=A,y):n},y.duration=function(A){return arguments.length?(s=+A,y):s},y.interpolate=function(A){return arguments.length?(u=A,y):u},y.on=function(){var A=c.on.apply(c,arguments);return A===c?y:A},y.clickDistance=function(A){return arguments.length?(g=(A=+A)*A,y):Math.sqrt(g)},y.tapDistance=function(A){return arguments.length?(m=+A,y):m},y}const Sh=Object.freeze(Object.defineProperty({__proto__:null,Adder:Lt,Delaunay:kl,FormatSpecifier:us,InternMap:Ti,InternSet:kn,Node:tr,Path:Vi,Voronoi:Dm,ZoomTransform:He,active:N4,arc:wv,area:ph,areaRadial:Dv,ascending:_t,autoType:aP,axisBottom:D5,axisLeft:Bg,axisRight:P5,axisTop:Ug,bin:Cg,bisect:En,bisectCenter:$A,bisectLeft:wA,bisectRight:mg,bisector:pa,blob:cP,blur:SA,blur2:yg,blurImage:AA,brush:V4,brushSelection:q4,brushX:j4,brushY:X4,buffer:fP,chord:K4,chordDirected:J4,chordTranspose:Q4,cluster:$9,color:dn,contourDensity:A7,contours:Dl,count:ga,create:c8,creator:Sa,cross:EA,csv:dP,csvFormat:V7,csvFormatBody:Z7,csvFormatRow:Q7,csvFormatRows:K7,csvFormatValue:J7,csvParse:Em,csvParseRows:X7,cubehelix:Pe,cumsum:kA,curveBasis:JE,curveBasisClosed:tk,curveBasisOpen:ek,curveBumpX:Lv,curveBumpY:Cv,curveBundle:nk,curveCardinal:rk,curveCardinalClosed:ik,curveCardinalOpen:ok,curveCatmullRom:ak,curveCatmullRomClosed:sk,curveCatmullRomOpen:uk,curveLinear:gu,curveLinearClosed:ck,curveMonotoneX:lk,curveMonotoneY:fk,curveNatural:hk,curveStep:pk,curveStepAfter:gk,curveStepBefore:dk,descending:dg,deviation:xg,difference:g5,disjoint:m5,dispatch:Nn,drag:t0,dragDisable:Pa,dragEnable:Da,dsv:pP,dsvFormat:is,easeBack:um,easeBackIn:D4,easeBackInOut:um,easeBackOut:T4,easeBounce:ji,easeBounceIn:M4,easeBounceInOut:P4,easeBounceOut:ji,easeCircle:sm,easeCircleIn:m4,easeCircleInOut:sm,easeCircleOut:y4,easeCubic:qi,easeCubicIn:u4,easeCubicInOut:qi,easeCubicOut:c4,easeElastic:Ka,easeElasticIn:L4,easeElasticInOut:C4,easeElasticOut:Ka,easeExp:am,easeExpIn:d4,easeExpInOut:am,easeExpOut:g4,easeLinear:o4,easePoly:nm,easePolyIn:l4,easePolyInOut:nm,easePolyOut:f4,easeQuad:em,easeQuadIn:a4,easeQuadInOut:em,easeQuadOut:s4,easeSin:om,easeSinIn:h4,easeSinInOut:om,easeSinOut:p4,every:c5,extent:Di,fcumsum:IA,filter:f5,flatGroup:NA,flatRollup:FA,forceCenter:wP,forceCollide:Fm,forceLink:BP,forceManyBody:Um,forceRadial:ZP,forceSimulation:Om,forceX:Bm,forceY:Ym,get format(){return Ji},formatDefaultLocale:Km,formatLocale:Zm,get formatPrefix(){return zl},formatSpecifier:Hr,fsum:RA,geoAlbers:fy,geoAlbersUsa:e9,geoArea:aD,geoAzimuthalEqualArea:n9,geoAzimuthalEqualAreaRaw:Af,geoAzimuthalEquidistant:r9,geoAzimuthalEquidistantRaw:Mf,geoBounds:lD,geoCentroid:mD,geoCircle:yD,geoClipAntimeridian:rf,geoClipCircle:k1,geoClipExtent:SD,geoClipRectangle:Ls,geoConicConformal:o9,geoConicConformalRaw:dy,geoConicEqualArea:Bs,geoConicEqualAreaRaw:ly,geoConicEquidistant:s9,geoConicEquidistantRaw:gy,geoContains:CD,geoDistance:ks,geoEqualEarth:c9,geoEqualEarthRaw:Pf,geoEquirectangular:a9,geoEquirectangularRaw:mo,geoGnomonic:l9,geoGnomonicRaw:Df,geoGraticule:Y1,geoGraticule10:ED,geoIdentity:f9,geoInterpolate:kD,geoLength:R1,geoMercator:i9,geoMercatorRaw:go,geoNaturalEarth1:h9,geoNaturalEarth1Raw:Tf,geoOrthographic:p9,geoOrthographicRaw:Lf,geoPath:WD,geoProjection:Ue,geoProjectionMutator:$f,geoRotation:A1,geoStereographic:d9,geoStereographicRaw:Cf,geoStream:Te,geoTransform:qD,geoTransverseMercator:g9,geoTransverseMercatorRaw:Ef,gray:T8,greatest:Eg,greatestIndex:r5,group:Sg,groupSort:OA,groups:Ag,hcl:Na,hierarchy:Ws,histogram:Cg,hsl:Ea,html:xP,image:mP,index:GA,indexes:zA,interpolate:gn,interpolateArray:I8,interpolateBasis:A0,interpolateBasisClosed:M0,interpolateBlues:sE,interpolateBrBG:OC,interpolateBuGn:VC,interpolateBuPu:ZC,interpolateCividis:pE,interpolateCool:mE,interpolateCubehelix:Z8,interpolateCubehelixDefault:dE,interpolateCubehelixLong:Ba,interpolateDate:E0,interpolateDiscrete:G8,interpolateGnBu:KC,interpolateGreens:uE,interpolateGreys:cE,interpolateHcl:X8,interpolateHclLong:V8,interpolateHsl:W8,interpolateHslLong:q8,interpolateHue:z8,interpolateInferno:SE,interpolateLab:j8,interpolateMagma:$E,interpolateNumber:pe,interpolateNumberArray:Jc,interpolateObject:k0,interpolateOrRd:QC,interpolateOranges:hE,interpolatePRGn:UC,interpolatePiYG:BC,interpolatePlasma:AE,interpolatePuBu:tE,interpolatePuBuGn:JC,interpolatePuOr:YC,interpolatePuRd:eE,interpolatePurples:lE,interpolateRainbow:yE,interpolateRdBu:HC,interpolateRdGy:WC,interpolateRdPu:nE,interpolateRdYlBu:qC,interpolateRdYlGn:jC,interpolateReds:fE,interpolateRgb:zi,interpolateRgbBasis:T0,interpolateRgbBasisClosed:R8,interpolateRound:Oa,interpolateSinebow:xE,interpolateSpectral:XC,interpolateString:nl,interpolateTransformCss:F0,interpolateTransformSvg:G0,interpolateTurbo:_E,interpolateViridis:wE,interpolateWarm:gE,interpolateYlGn:iE,interpolateYlGnBu:rE,interpolateYlOrBr:oE,interpolateYlOrRd:aE,interpolateZoom:O0,interrupt:Hn,intersection:y5,interval:eM,isoFormat:vC,isoParse:wC,json:bP,lab:Ia,lch:L8,least:n5,leastIndex:Ig,line:mu,lineRadial:Pv,link:yu,linkHorizontal:UE,linkRadial:YE,linkVertical:BE,local:Qg,map:h5,matcher:Gc,max:Li,maxIndex:Cc,mean:XA,median:VA,medianIndex:ZA,merge:kc,min:ba,minIndex:Ec,mode:QA,namespace:Ri,namespaces:Nc,nice:Tc,now:Hi,pack:J9,packEnclose:j9,packSiblings:K9,pairs:JA,partition:tT,path:Pl,pathRound:n7,permute:Lg,pie:Sv,piecewise:H0,pointRadial:Eo,pointer:ue,pointers:f8,polygonArea:gT,polygonCentroid:mT,polygonContains:xT,polygonHull:vT,polygonLength:_T,precisionFixed:Qm,precisionPrefix:Jm,precisionRound:t1,quadtree:as,quantile:Ei,quantileIndex:Rg,quantileSorted:kg,quantize:K8,quickselect:va,radialArea:Dv,radialLine:Pv,randomBates:AT,randomBernoulli:DT,randomBeta:Fy,randomBinomial:Gy,randomCauchy:LT,randomExponential:MT,randomGamma:Bf,randomGeometric:Ny,randomInt:$T,randomIrwinHall:Iy,randomLcg:IT,randomLogNormal:ST,randomLogistic:CT,randomNormal:Uf,randomPareto:PT,randomPoisson:ET,randomUniform:wT,randomWeibull:TT,range:hn,rank:e5,reduce:p5,reverse:d5,rgb:Er,ribbon:l7,ribbonArrow:f7,rollup:Pg,rollups:Dg,scaleBand:Wf,scaleDiverging:Hb,scaleDivergingLog:Wb,scaleDivergingPow:lh,scaleDivergingSqrt:DC,scaleDivergingSymlog:qb,scaleIdentity:Yy,scaleImplicit:Yf,scaleLinear:Vf,scaleLog:Xy,scaleOrdinal:Hf,scalePoint:qf,scalePow:Js,scaleQuantile:eb,scaleQuantize:nb,scaleRadial:tb,scaleSequential:Ob,scaleSequentialLog:Ub,scaleSequentialPow:ch,scaleSequentialQuantile:Yb,scaleSequentialSqrt:PC,scaleSequentialSymlog:Bb,scaleSqrt:jT,scaleSymlog:Ky,scaleThreshold:rb,scaleTime:AC,scaleUtc:MC,scan:i5,schemeAccent:LC,schemeBlues:dv,schemeBrBG:jb,schemeBuGn:nv,schemeBuPu:rv,schemeCategory10:TC,schemeDark2:CC,schemeGnBu:iv,schemeGreens:gv,schemeGreys:mv,schemeObservable10:EC,schemeOrRd:ov,schemeOranges:vv,schemePRGn:Xb,schemePaired:kC,schemePastel1:RC,schemePastel2:IC,schemePiYG:Vb,schemePuBu:sv,schemePuBuGn:av,schemePuOr:Zb,schemePuRd:uv,schemePurples:yv,schemeRdBu:Kb,schemeRdGy:Qb,schemeRdPu:cv,schemeRdYlBu:Jb,schemeRdYlGn:tv,schemeReds:bv,schemeSet1:NC,schemeSet2:FC,schemeSet3:GC,schemeSpectral:ev,schemeTableau10:zC,schemeYlGn:fv,schemeYlGnBu:lv,schemeYlOrBr:hv,schemeYlOrRd:pv,select:Z,selectAll:h8,selection:Gn,selector:Aa,selectorAll:Fc,shuffle:o5,shuffler:Ng,some:l5,sort:Mc,stack:bk,stackOffsetDiverging:xk,stackOffsetExpand:vk,stackOffsetNone:oi,stackOffsetSilhouette:_k,stackOffsetWiggle:wk,stackOrderAppearance:a2,stackOrderAscending:s2,stackOrderDescending:Sk,stackOrderInsideOut:Ak,stackOrderNone:ai,stackOrderReverse:Mk,stratify:iT,style:Fn,subset:v5,sum:a5,superset:Gg,svg:_P,symbol:QE,symbolAsterisk:Ev,symbolCircle:bu,symbolCross:kv,symbolDiamond:Iv,symbolDiamond2:Nv,symbolPlus:Fv,symbolSquare:Gv,symbolSquare2:zv,symbolStar:Uv,symbolTimes:yh,symbolTriangle:Bv,symbolTriangle2:Yv,symbolWye:Hv,symbolX:yh,symbols:Wv,symbolsFill:Wv,symbolsStroke:KE,text:os,thresholdFreedmanDiaconis:qA,thresholdScott:jA,thresholdSturges:Lc,tickFormat:By,tickIncrement:In,tickStep:ya,ticks:Rn,timeDay:ti,timeDays:JT,get timeFormat(){return ah},timeFormatDefaultLocale:Gb,timeFormatLocale:wb,timeFriday:cb,timeFridays:aL,timeHour:nu,timeHours:KT,timeInterval:Dt,timeMillisecond:Jr,timeMilliseconds:ib,timeMinute:tu,timeMinutes:VT,timeMonday:Ao,timeMondays:nL,timeMonth:iu,timeMonths:dL,get timeParse(){return Fb},timeSaturday:lb,timeSaturdays:sL,timeSecond:an,timeSeconds:ab,timeSunday:ei,timeSundays:fb,timeThursday:rr,timeThursdays:oL,timeTickInterval:_b,timeTicks:xb,timeTuesday:sb,timeTuesdays:rL,timeWednesday:ub,timeWednesdays:iL,timeWeek:ei,timeWeeks:fb,timeYear:Be,timeYears:mL,timeout:ol,timer:qa,timerFlush:j0,transition:J0,transpose:Fg,tree:fT,treemap:ky,treemapBinary:hT,treemapDice:wo,treemapResquarify:dT,treemapSlice:Zs,treemapSliceDice:pT,treemapSquarify:Of,tsv:gP,tsvFormat:eP,tsvFormatBody:nP,tsvFormatRow:iP,tsvFormatRows:rP,tsvFormatValue:oP,tsvParse:km,tsvParseRows:tP,union:x5,unixDay:rh,unixDays:eL,utcDay:So,utcDays:tL,get utcFormat(){return au},utcFriday:db,utcFridays:hL,utcHour:ru,utcHours:QT,utcMillisecond:Jr,utcMilliseconds:ib,utcMinute:eu,utcMinutes:ZT,utcMonday:Mo,utcMondays:uL,utcMonth:ou,utcMonths:gL,get utcParse(){return sh},utcSaturday:gb,utcSaturdays:pL,utcSecond:an,utcSeconds:ab,utcSunday:ni,utcSundays:mb,utcThursday:or,utcThursdays:fL,utcTickInterval:vb,utcTicks:bb,utcTuesday:hb,utcTuesdays:cL,utcWednesday:pb,utcWednesdays:lL,utcWeek:ni,utcWeeks:mb,utcYear:Ye,utcYears:yL,variance:vg,window:zc,xml:vP,zip:u5,zoom:f2,zoomIdentity:Au,zoomTransform:c2},Symbol.toStringTag,{value:"Module"}));function h2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function kk(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 si(t){return t.substring(0,4)!=="ease"?qi:Sh[t]??qi}function Mu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=Vf().domain([0,1]).range([0,t/2]),a=o(n);return wv().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const Ah=(t,e)=>e instanceof Function?e(t):Ji(e)(t);function p2(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 Rk(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 Ik(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return Rk(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 Mh({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 st(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function An(t,e){const r=Math.random().toString(36).substr(2,5);return st(t,e,r)}const ui=({selection:t,pluginName:e,clipPathID:n,seriesLabels$:r,gridContainerPosition$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=st(e,"series"),u=st(e,"axes"),c=st(e,"graphic"),l=r.pipe(U((d,g)=>t.selectAll(`g.${s}`).data(d,m=>m).join(m=>m.append("g").classed(s,!0).each((y,x,v)=>{Z(v[x]).selectAll(`g.${u}`).data([x]).join(b=>b.append("g").classed(u,!0).attr("clip-path",`url(#${n})`).each(($,_,P)=>{Z(P[_]).selectAll("defs").data([_]).join("defs"),Z(P[_]).selectAll("g").data([_]).join("g").classed(c,!0)}),b=>b,b=>b.remove())}),m=>m,m=>m.remove())),Pt(1));B({seriesSelection:l,gridContainerPosition:i}).pipe(Y(async d=>d)).subscribe(d=>{d.seriesSelection.transition().attr("transform",(g,m)=>{const y=d.gridContainerPosition[m]??d.gridContainerPosition[0],x=y.translate,v=y.scale;return`translate(${x[0]}, ${x[1]}) scale(${v[0]}, ${v[1]})`})});const h=B({seriesSelection:l,gridAxesTransform:o}).pipe(Y(async d=>d),U(d=>d.seriesSelection.select(`g.${u}`).style("transform",d.gridAxesTransform.value)),Pt(1)),f=h.pipe(U(d=>d.select("defs")),Pt(1)),p=B({axesSelection:h,gridGraphicTransform:a}).pipe(Y(async d=>d),U(d=>{const g=d.axesSelection.select(`g.${c}`);return g.transition().duration(50).style("transform",d.gridGraphicTransform.value),g}),Pt(1));return{seriesSelection$:l,axesSelection$:h,defsSelection$:f,graphicGSelection$:p}},Ph=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r})=>{const i=new ot,o=new ht(a=>{B({dataFormatter:t,computedData:n}).pipe(z(i),Y(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,p=(s.dataFormatter.grid.seriesDirection==="row"?(s.computedData[0]??[]).map(d=>d.groupLabel):s.computedData.map(d=>d[0].groupLabel)).filter((d,g)=>g>=l&&g<=h);a.next(p)})});return new ht(a=>{B({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(z(i),Y(async s=>s)).subscribe(s=>{const u=s.dataFormatter.grid.valueAxis.position==="right"||s.dataFormatter.grid.valueAxis.position==="bottom",c=bA({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 p=l(f),d=c(p);return{groupIndex:d,groupLabel:s.scaleRangeGroupLabels[d]??""}};return a.next(h),function(){i.next(void 0)}})})};function Nk(t="curveLinear"){return mu().x(e=>e.axisX).y(e=>e.axisY).curve(Sh[t])}function Fk(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 Gk({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 zk({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?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function Ok({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)=>{Z(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(si(r)).tween("tween",(c,l,h)=>f=>{const p=c.width*f;u.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const d2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:c,fullDataFormatter$:l,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,event$:y})=>{const x=new ot,v=An(t,"clipPath-box"),b=st(t,"path"),{seriesSelection$:$,axesSelection$:_,defsSelection$:P,graphicGSelection$:T}=ui({selection:e,pluginName:t,clipPathID:v,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p}),w=new ht(M=>{const F=c.pipe(z(x)).subscribe(O=>{if(!O)return;const E=Nk(O.lineCurve);M.next(E)});return()=>{F.unsubscribe()}}),D=h.pipe(U(M=>M.transitionDuration),it()),S=h.pipe(U(M=>M.transitionEase),it());B({defsSelection:P,seriesLabels:a,axisSize:d,transitionDuration:D,transitionEase:S}).pipe(z(x),Y(async M=>M)).subscribe(M=>{const O=[{id:v,width:M.axisSize.width,height:M.axisSize.height}].concat(M.seriesLabels.map(E=>({id:`orbcharts__clipPath_${E}`,width:M.axisSize.width,height:M.axisSize.height})));Ok({defsSelection:M.defsSelection,clipPathData:O,transitionDuration:M.transitionDuration,transitionEase:M.transitionEase})});const G=n.pipe(U(M=>{const F=new Map;return M.flat().forEach(O=>F.set(O.id,O)),F})),k=Ph({fullDataFormatter$:l,gridAxesSize$:d,computedData$:n,fullChartParams$:h}),A=h.pipe(z(x),U(M=>M.highlightTarget),it()),L=B({graphicGSelection:T,visibleComputedLayoutData:o,linePath:w,params:c}).pipe(z(x),Y(async M=>M),U(M=>{let F=[];return M.graphicGSelection.each((O,E,R)=>{const C=Fk(M.visibleComputedLayoutData[E]??[]);F[E]=Gk({selection:Z(R[E]),pathClassName:b,linePath:M.linePath,segmentData:C,params:M.params})}),F}));return B({pathSelectionArr:L,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:A,gridGroupPositionFn:k}).pipe(z(x),Y(async M=>M)).subscribe(M=>{M.pathSelectionArr.forEach(F=>{F.on("mouseover",(O,E)=>{O.stopPropagation();const R=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:N}=M.gridGroupPositionFn(O),I=M.GroupDataMap.get(N).find(X=>X.seriesLabel===R)??E[0];y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:I,gridIndex:I.gridIndex,series:M.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:M.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:O,data:M.computedData})}).on("mousemove",(O,E)=>{O.stopPropagation();const R=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:N}=M.gridGroupPositionFn(O),I=M.GroupDataMap.get(N).find(X=>X.seriesLabel===R)??E[0];y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:I,gridIndex:I.gridIndex,series:M.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:M.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:O,data:M.computedData})}).on("mouseout",(O,E)=>{O.stopPropagation();const R=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:N}=M.gridGroupPositionFn(O),I=M.GroupDataMap.get(N).find(X=>X.seriesLabel===R)??E[0];y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:I,gridIndex:I.gridIndex,series:M.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:M.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:O,data:M.computedData})}).on("click",(O,E)=>{O.stopPropagation();const R=E[0]?E[0].seriesLabel:"",{groupIndex:C,groupLabel:N}=M.gridGroupPositionFn(O),I=M.GroupDataMap.get(N).find(X=>X.seriesLabel===R)??E[0];y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:I,gridIndex:I.gridIndex,series:M.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:M.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:O,data:M.computedData})})})}),h.pipe(z(x),fi(M=>M.highlightTarget==="series"),Y(M=>B({graphicGSelection:T,gridHighlight:g,DataMap:G,fullChartParams:h}).pipe(z(x),Y(async F=>F)))).subscribe(M=>{const F=M.gridHighlight[0]?M.gridHighlight[0].seriesLabel:null;zk({selection:M.graphicGSelection,seriesLabel:F,fullChartParams:M.fullChartParams})}),()=>{x.next(void 0)}},g2="Lines",Uk=se(g2,ur)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=d2(g2,{selection:t,computedData$:n.computedData$,computedLayoutData$:n.computedLayoutData$,visibleComputedData$:n.visibleComputedData$,visibleComputedLayoutData$:n.visibleComputedLayoutData$,seriesLabels$:n.seriesLabels$,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$,gridContainerPosition$:n.gridContainerPosition$,event$:r.event$});return()=>{i.next(void 0),o()}});function Bk(t="curveLinear",e){return ph().x(n=>n.axisX).y0(n=>e).y1(n=>n.axisY).curve(Sh[t])}function Yk(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 Hk({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 Wk({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?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function qk({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 qC({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=An(t,"clipPath-box"),x=ot(t,"path"),{seriesSelection$:v,axesSelection$:b,defsSelection$:_,graphicGSelection$:w}=ui({selection:e,pluginName:t,clipPathID:y,existSeriesLabels$:r,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),S=l.pipe(F(m),U(P=>-P.translate[1]/P.scale[1])),k=new lt(P=>{const R=W({fullParams:a,valueAxisStart:S}).pipe(F(m)).subscribe(G=>{const M=UC(G.fullParams.lineCurve,G.valueAxisStart);P.next(M)});return()=>{R.unsubscribe()}}),$=new lt(P=>{n.pipe(F(m),B(async R=>R)).subscribe(R=>{const G=R[0]&&R[0][0]?R.map(M=>M[0].seriesLabel):[];P.next(G)})}),E=u.pipe(U(P=>P.transitionDuration),ft()),A=u.pipe(U(P=>P.transitionEase),ft());W({defsSelection:_,seriesLabels:$,axisSize:h,transitionDuration:E,transitionEase:A}).pipe(F(m),B(async P=>P)).subscribe(P=>{const G=[{id:y,width:P.axisSize.width,height:P.axisSize.height}].concat(P.seriesLabels.map(M=>({id:`orbcharts__clipPath_${M}`,width:P.axisSize.width,height:P.axisSize.height})));qC({defsSelection:P.defsSelection,clipPathData:G,transitionDuration:P.transitionDuration,transitionEase:P.transitionEase})});const I=n.pipe(U(P=>{const R=new Map;return P.flat().forEach(G=>R.set(G.id,G)),R})),D=Mh({fullDataFormatter$:s,gridAxesSize$:h,computedData$:n,fullChartParams$:u}),T=u.pipe(F(m),U(P=>P.highlightTarget),ft()),C=$.pipe(F(m),U(P=>P.map((R,G)=>An(t,`lineargradient-${R}`))));return W({graphicGSelection:w,defsSelection:_,seriesLabels:$,computedData:n,linearGradientIds:C,SeriesDataMap:i,GroupDataMap:o,areaPath:k,params:a,highlightTarget:T,gridGroupPositionFn:D}).pipe(F(m),B(async P=>P)).subscribe(P=>{P.graphicGSelection.each((R,G,M)=>{const N=BC(P.computedData[G]??[]),z=YC({selection:V(M[G]),pathClassName:x,areaPath:P.areaPath,segmentData:N,linearGradientIds:P.linearGradientIds,params:P.params});WC({defsSelection:P.defsSelection,computedData:P.computedData,linearGradientIds:P.linearGradientIds,params:P.params}),z.on("mouseover",(L,j)=>{L.stopPropagation();const q=j[0]?j[0].seriesLabel:"",{groupIndex:Y,groupLabel:X}=P.gridGroupPositionFn(L),O=P.GroupDataMap.get(X).find(tt=>tt.seriesLabel===q)??j[0];g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:P.highlightTarget,datum:O,gridIndex:O.gridIndex,series:P.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:P.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:L,data:P.computedData})}).on("mousemove",(L,j)=>{L.stopPropagation();const q=j[0]?j[0].seriesLabel:"",{groupIndex:Y,groupLabel:X}=P.gridGroupPositionFn(L),O=P.GroupDataMap.get(X).find(tt=>tt.seriesLabel===q)??j[0];g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:P.highlightTarget,datum:O,gridIndex:O.gridIndex,series:P.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:P.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:L,data:P.computedData})}).on("mouseout",(L,j)=>{L.stopPropagation();const q=j[0]?j[0].seriesLabel:"",{groupIndex:Y,groupLabel:X}=P.gridGroupPositionFn(L),O=P.GroupDataMap.get(X).find(tt=>tt.seriesLabel===q)??j[0];g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:P.highlightTarget,datum:O,gridIndex:O.gridIndex,series:P.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:P.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:L,data:P.computedData})}).on("click",(L,j)=>{L.stopPropagation();const q=j[0]?j[0].seriesLabel:"",{groupIndex:Y,groupLabel:X}=P.gridGroupPositionFn(L),O=P.GroupDataMap.get(X).find(tt=>tt.seriesLabel===q)??j[0];g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:P.highlightTarget,datum:O,gridIndex:O.gridIndex,series:P.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:P.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:L,data:P.computedData})})})}),u.pipe(F(m),hi(P=>P.highlightTarget==="series"),B(P=>W({graphicGSelection:w,gridHighlight:f,DataMap:I,fullChartParams:u}).pipe(F(m),B(async R=>R)))).subscribe(P=>{const R=P.gridHighlight[0]?P.gridHighlight[0].seriesLabel:null;HC({selection:P.graphicGSelection,seriesLabel:R,fullChartParams:P.fullChartParams})}),()=>{m.next(void 0)}},d2="LineAreas",jC=ae(d2,Hh)(({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 XC(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Wf().domain(e).range([-i/2+r,i/2-r])}function VC(t,e){return t<=1?0:e/(t-1)*p2}function ZC(t,e){return t<=1?e:e*(1-p2)}function KC({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]??[],x=>x.id).join(x=>x.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",v=>0),x=>x,x=>x.remove()).attr("transform",(x,v)=>`translate(${(x?x.axisX:0)-d}, 0)`).attr("fill",x=>x.color).attr("y",x=>x.axisY<r[m]?x.axisY:r[m]).attr("x",x=>f?0:o(x.seriesLabel)).attr("width",u).attr("rx",c[m][0]??1).attr("ry",c[m][1]??1).transition().duration(h).ease(ar(s.transitionEase)).delay((x,v)=>x.groupIndex*l).attr("height",x=>Math.abs(x.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 JC({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 Th=(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,x=An(t,"clipPath-box"),v=ot(t,"rect"),{seriesSelection$:b,axesSelection$:_,defsSelection$:w,graphicGSelection$:S}=ui({selection:e,pluginName:t,clipPathID:x,existSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),k=r.pipe(F(y),U(M=>M.map(N=>N[0]?N[0].axisY-N[0].axisYFromZero:0)),ft()),$=W({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?g2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:1,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding}):g2({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=W({computedData:n,barWidth:$,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((L,j)=>{const q=M.gridGraphicReverseScale[j]??M.gridGraphicReverseScale[0];let Y=z*q[0],X=z*q[1];if(Y>N){const Q=N/Y;Y=Y*Q,X=X*Q}return[Y,X]})})),A=r.pipe(F(y),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(L=>{N.add(L.seriesLabel)})}),Array.from(N)})),I=r.pipe(F(y),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(L=>{N.add(L.groupLabel)})}),Array.from(N)})),D=W({seriesLabels:A,barWidth:$,params:s}).pipe(F(y),B(async M=>M),U(M=>XC(M.barWidth,M.seriesLabels,M.params))),T=u.pipe(F(y),U(M=>M.transitionDuration),ft()),C=new lt(M=>{W({groupLabels:I,transitionDuration:T}).pipe(B(async N=>N)).subscribe(N=>{const z=VC(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(y),ft()),P=new lt(M=>{W({groupLabels:I,transitionDuration:T}).pipe(B(async N=>N)).subscribe(N=>{const z=ZC(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(y),ft());W({defsSelection:w,gridAxesSize:f}).pipe(F(y),B(async M=>M)).subscribe(M=>{const N=[{id:x,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 nt;return W({graphicGSelection:S,computedData:n,zeroYArr:k,groupLabels:I,barScale:D,params:s,chartParams:u,highlightTarget:R,barWidth:$,transformedBarRadius:E,delayGroup:C,transitionItem:P,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:g}).pipe(F(y),B(async M=>M)).subscribe(M=>{const N=KC({graphicGSelection:M.graphicGSelection,rectClassName:v,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,L)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:L,gridIndex:L.gridIndex,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:z,data:M.computedData})}).on("mousemove",(z,L)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:L,gridIndex:L.gridIndex,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:z,data:M.computedData})}).on("mouseout",(z,L)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:L,gridIndex:L.gridIndex,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:z,data:M.computedData})}).on("click",(z,L)=>{z.stopPropagation(),m.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:L,gridIndex:L.gridIndex,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:z,data:M.computedData})}),G.next(N)}),W({barSelection:G,highlight:d.pipe(U(M=>M.map(N=>N.id))),fullChartParams:u}).pipe(F(y),B(async M=>M)).subscribe(M=>{JC({selection:M.barSelection,ids:M.highlight,fullChartParams:M.fullChartParams})}),()=>{y.next(void 0)}},m2="Bars",tI=ae(m2,Fo)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=Th(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",eI=ae(y2,Fo)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=Th(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$:fi(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),b2=.3;function nI({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function rI(t,e){return t<=1?0:e/(t-1)*b2}function iI(t,e){return t<=1?e:e*(1-b2)}function oI({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",x=>0),y=>y,y=>y.remove()).attr("transform",(y,x)=>`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,x)=>y.groupIndex*c).attr("y",y=>y._barStartY).attr("height",y=>Math.abs(y._barHeight))}),t.selectAll(`rect.${e}`)}function aI({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 sI({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 x=new nt,v=An(t,"clipPath-box"),b=ot(t,"rect"),{seriesSelection$:_,axesSelection$:w,defsSelection$:S,graphicGSelection$:k}=ui({selection:e,pluginName:t,clipPathID:v,existSeriesLabels$:i,gridContainer$:g,gridAxesTransform$:l,gridGraphicTransform$:h}),$=r.pipe(F(x),U(L=>L[0]&&L[0][0]?L[0][0].axisY-L[0][0].axisYFromZero:0),ft()),E=W({computedData:n,params:s,axisSize:d,isSeriesPositionSeprate:m}).pipe(F(x),B(async L=>L),U(L=>L.params.barWidth?L.params.barWidth:nI({axisWidth:L.axisSize.width,groupAmount:L.computedData[0]?L.computedData[0].length:0,barGroupPadding:L.params.barGroupPadding})),ft()),A=W({computedData:n,barWidth:E,params:s,gridGraphicReverseScale:f}).pipe(F(x),B(async L=>L),U(L=>{const j=L.barWidth/2,q=L.params.barRadius===!0?j:L.params.barRadius===!1?0:typeof L.params.barRadius=="number"?L.params.barRadius:0;return L.computedData.map((Y,X)=>{const Q=L.gridGraphicReverseScale[X]??L.gridGraphicReverseScale[0],ct=q*Q[0],O=q*Q[1];return[ct,O]})})),I=r.pipe(F(x),U(L=>{const j=new Set;return L.forEach(q=>{q.forEach(Y=>{j.add(Y.groupLabel)})}),Array.from(j)})),D=c.pipe(F(x),U(L=>L.transitionDuration),ft()),T=new lt(L=>{W({groupLabels:I,transitionDuration:D}).pipe(B(async j=>j)).subscribe(j=>{const q=rI(j.groupLabels.length,j.transitionDuration);L.next(q)})}).pipe(F(x),ft()),C=new lt(L=>{W({groupLabels:I,transitionDuration:D}).pipe(B(async j=>j)).subscribe(j=>{const q=iI(j.groupLabels.length,j.transitionDuration);L.next(q)})}).pipe(F(x),ft()),P=W({computedData:n,dataFormatter:u}).pipe(F(x),B(async L=>L),U(L=>{const q=L.computedData[0]?L.computedData[0].length-1:0,Y=L.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-L.dataFormatter.grid.groupAxis.scalePadding:L.dataFormatter.grid.groupAxis.scaleDomain[0]-L.dataFormatter.grid.groupAxis.scalePadding,X=L.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?q+L.dataFormatter.grid.groupAxis.scalePadding:L.dataFormatter.grid.groupAxis.scaleDomain[1]+L.dataFormatter.grid.groupAxis.scalePadding,Q=L.computedData.map(ct=>ct.filter((O,tt)=>O.groupIndex>=Y&&O.groupIndex<=X));if(Q.length<=1)return 1;{const ct=Q.flat().map(H=>H.axisYFromZero),O=Math.max(...ct),tt=L.computedData[0]?L.computedData[0].map((H,xt)=>L.computedData.reduce((gt,Ft)=>gt+Ft[xt].axisYFromZero,0)):[],st=Math.max(...tt);return O/st}})),R=W({computedData:n,yRatio:P,zeroY:$}).pipe(F(x),U(L=>{let j=L.computedData[0]?L.computedData[0].map(()=>L.zeroY):[];return L.computedData.map((q,Y)=>q.map((X,Q)=>{const ct=j[Q],O=X.axisYFromZero*L.yRatio;return j[Q]=j[Q]+O,{...X,_barStartY:ct,_barHeight:O}}))})),G=W({computedData:n,zeroY:$}).pipe(F(x),U(L=>L.computedData.map((j,q)=>j.map((Y,X)=>({...Y,_barStartY:L.zeroY,_barHeight:Y.axisYFromZero}))))),M=m.pipe(B(L=>Md(()=>L,G,R)));W({defsSelection:S,gridAxesSize:d}).pipe(F(x),B(async L=>L)).subscribe(L=>{const j=[{id:v,width:L.gridAxesSize.width,height:L.gridAxesSize.height}];aI({defsSelection:L.defsSelection,clipPathData:j})});const N=c.pipe(F(x),U(L=>L.highlightTarget),ft()),z=new nt;return W({graphicGSelection:k,graphicData:M,zeroY:$,groupLabels:I,params:s,chartParams:c,highlightTarget:N,barWidth:E,transformedBarRadius:A,delayGroup:T,transitionItem:C,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:m}).pipe(F(x),B(async L=>L)).subscribe(L=>{const j=oI({graphicGSelection:L.graphicGSelection,rectClassName:b,barData:L.graphicData,zeroY:L.zeroY,groupLabels:L.groupLabels,params:L.params,chartParams:L.chartParams,barWidth:L.barWidth,transformedBarRadius:L.transformedBarRadius,delayGroup:L.delayGroup,transitionItem:L.transitionItem,isSeriesPositionSeprate:L.isSeriesPositionSeprate});j.on("mouseover",(q,Y)=>{q.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:L.highlightTarget,datum:Y,gridIndex:Y.gridIndex,series:L.SeriesDataMap.get(Y.seriesLabel),seriesIndex:Y.seriesIndex,seriesLabel:Y.seriesLabel,groups:L.GroupDataMap.get(Y.groupLabel),groupIndex:Y.groupIndex,groupLabel:Y.groupLabel,event:q,data:L.graphicData})}).on("mousemove",(q,Y)=>{q.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:L.highlightTarget,datum:Y,gridIndex:Y.gridIndex,series:L.SeriesDataMap.get(Y.seriesLabel),seriesIndex:Y.seriesIndex,seriesLabel:Y.seriesLabel,groups:L.GroupDataMap.get(Y.groupLabel),groupIndex:Y.groupIndex,groupLabel:Y.groupLabel,event:q,data:L.graphicData})}).on("mouseout",(q,Y)=>{q.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:L.highlightTarget,datum:Y,gridIndex:Y.gridIndex,series:L.SeriesDataMap.get(Y.seriesLabel),seriesIndex:Y.seriesIndex,seriesLabel:Y.seriesLabel,groups:L.GroupDataMap.get(Y.groupLabel),groupIndex:Y.groupIndex,groupLabel:Y.groupLabel,event:q,data:L.graphicData})}).on("click",(q,Y)=>{q.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:L.highlightTarget,datum:Y,gridIndex:Y.gridIndex,series:L.SeriesDataMap.get(Y.seriesLabel),seriesIndex:Y.seriesIndex,seriesLabel:Y.seriesLabel,groups:L.GroupDataMap.get(Y.groupLabel),groupIndex:Y.groupIndex,groupLabel:Y.groupLabel,event:q,data:L.graphicData})}),z.next(j)}),W({barSelection:z,highlight:p.pipe(U(L=>L.map(j=>j.id))),fullChartParams:c}).pipe(F(x),B(async L=>L)).subscribe(L=>{sI({selection:L.barSelection,ids:L.highlight,fullChartParams:L.fullChartParams})}),()=>{x.next(void 0)}},x2="BarStack",uI=ae(x2,jh)(({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 cI(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Wf().domain(e).range([-i/2+r,i/2-r])}function lI(t,e){return t<=1?0:e/(t-1)*_2}function fI(t,e){return t<=1?e:e*(1-_2)}function hI({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,x)=>{V(x[y]).selectAll(`g.${e}`).data(r[y]??[]).join(b=>{const _=b.append("g").classed(e,!0).attr("cursor","pointer");return _.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",w=>{const S=-p,k=o[y],$=o[y];return`M${S},${k} L${S+l/2},${$} ${S+l},${k}`}),_},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,_)=>b.groupIndex*h).attr("d",b=>{const _=-p,w=o[y],S=b.axisY;return`M${_},${w} L${_+l/2},${S} ${_+l},${w}`})}),t.selectAll(`path.${n}`)}function dI({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 jk({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)=>{Z(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(si(r)).tween("tween",(c,l,h)=>f=>{const p=c.width*f;u.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const m2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:c,fullDataFormatter$:l,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,layout$:y,event$:x})=>{const v=new ot,b=An(t,"clipPath-box"),$=st(t,"path"),{seriesSelection$:_,axesSelection$:P,defsSelection$:T,graphicGSelection$:w}=ui({selection:e,pluginName:t,clipPathID:b,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p}),D=p.pipe(z(v),U(E=>-E.translate[1]/E.scale[1])),S=new ht(E=>{const R=B({fullParams:c,valueAxisStart:D}).pipe(z(v)).subscribe(C=>{const N=Bk(C.fullParams.lineCurve,C.valueAxisStart);E.next(N)});return()=>{R.unsubscribe()}}),G=h.pipe(U(E=>E.transitionDuration),it()),k=h.pipe(U(E=>E.transitionEase),it());B({defsSelection:T,seriesLabels:a,axisSize:d,transitionDuration:G,transitionEase:k}).pipe(z(v),Y(async E=>E)).subscribe(E=>{const C=[{id:b,width:E.axisSize.width,height:E.axisSize.height}].concat(E.seriesLabels.map(N=>({id:`orbcharts__clipPath_${N}`,width:E.axisSize.width,height:E.axisSize.height})));jk({defsSelection:E.defsSelection,clipPathData:C,transitionDuration:E.transitionDuration,transitionEase:E.transitionEase})});const A=n.pipe(U(E=>{const R=new Map;return E.flat().forEach(C=>R.set(C.id,C)),R})),L=Ph({fullDataFormatter$:l,gridAxesSize$:d,computedData$:n,fullChartParams$:h}),M=h.pipe(z(v),U(E=>E.highlightTarget),it()),F=a.pipe(z(v),U(E=>E.map((R,C)=>An(t,`lineargradient-${R}`)))),O=B({graphicGSelection:w,defsSelection:T,visibleComputedLayoutData:o,linearGradientIds:F,areaPath:S,params:c}).pipe(z(v),Y(async E=>E),U(E=>{let R=[];return E.graphicGSelection.each((C,N,j)=>{const Q=Yk(E.visibleComputedLayoutData[N]??[]);R[N]=Hk({selection:Z(j[N]),pathClassName:$,areaPath:E.areaPath,segmentData:Q,linearGradientIds:E.linearGradientIds,params:E.params}),qk({defsSelection:E.defsSelection,computedData:E.visibleComputedLayoutData,linearGradientIds:E.linearGradientIds,params:E.params})}),R}));return B({pathSelectionArr:O,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:M,gridGroupPositionFn:L}).pipe(z(v),Y(async E=>E)).subscribe(E=>{E.pathSelectionArr.forEach(R=>{R.on("mouseover",(C,N)=>{C.stopPropagation();const j=N[0]?N[0].seriesLabel:"",{groupIndex:Q,groupLabel:I}=E.gridGroupPositionFn(C),V=E.GroupDataMap.get(I).find(W=>W.seriesLabel===j)??N[0];x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:E.highlightTarget,datum:V,gridIndex:V.gridIndex,series:E.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:E.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:C,data:E.computedData})}).on("mousemove",(C,N)=>{C.stopPropagation();const j=N[0]?N[0].seriesLabel:"",{groupIndex:Q,groupLabel:I}=E.gridGroupPositionFn(C),V=E.GroupDataMap.get(I).find(W=>W.seriesLabel===j)??N[0];x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:E.highlightTarget,datum:V,gridIndex:V.gridIndex,series:E.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:E.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:C,data:E.computedData})}).on("mouseout",(C,N)=>{C.stopPropagation();const j=N[0]?N[0].seriesLabel:"",{groupIndex:Q,groupLabel:I}=E.gridGroupPositionFn(C),V=E.GroupDataMap.get(I).find(W=>W.seriesLabel===j)??N[0];x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:E.highlightTarget,datum:V,gridIndex:V.gridIndex,series:E.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:E.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:C,data:E.computedData})}).on("click",(C,N)=>{C.stopPropagation();const j=N[0]?N[0].seriesLabel:"",{groupIndex:Q,groupLabel:I}=E.gridGroupPositionFn(C),V=E.GroupDataMap.get(I).find(W=>W.seriesLabel===j)??N[0];x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:E.highlightTarget,datum:V,gridIndex:V.gridIndex,series:E.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:E.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:C,data:E.computedData})})})}),h.pipe(z(v),fi(E=>E.highlightTarget==="series"),Y(E=>B({graphicGSelection:w,gridHighlight:g,DataMap:A,fullChartParams:h}).pipe(z(v),Y(async R=>R)))).subscribe(E=>{const R=E.gridHighlight[0]?E.gridHighlight[0].seriesLabel:null;Wk({selection:E.graphicGSelection,seriesLabel:R,fullChartParams:E.fullChartParams})}),()=>{v.next(void 0)}},y2="LineAreas",Xk=se(y2,Xh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=m2(y2,{selection:t,computedData$:n.computedData$,visibleComputedData$:n.visibleComputedData$,computedLayoutData$:n.computedLayoutData$,visibleComputedLayoutData$:n.visibleComputedLayoutData$,seriesLabels$:n.seriesLabels$,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$,gridContainerPosition$:n.gridContainerPosition$,layout$:n.layout$,event$:r.event$});return()=>{i.next(void 0),o()}}),b2=.3;function v2({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=((e>1?t/(e-1):t)-i)/n-r;return a>1?a:1}function Vk(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return qf().domain(e).range([-i/2+r,i/2-r])}function Zk(t,e){return t<=1?0:e/(t-1)*b2}function Kk(t,e){return t<=1?e:e*(1-b2)}function Qk({graphicGSelection:t,rectClassName:e,visibleComputedLayoutData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:u,transformedBarRadius:c,delayGroup:l,transitionItem:h,isSeriesSeprate:f}){const p=u/2;return t.each((g,m,y)=>{Z(y[m]).selectAll(`rect.${e}`).data(n[m]??[],x=>x.id).join(x=>x.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",v=>0),x=>x,x=>x.remove()).attr("transform",(x,v)=>`translate(${(x?x.axisX:0)-p}, 0)`).attr("fill",x=>x.color).attr("y",x=>x.axisY<r[m]?x.axisY:r[m]).attr("x",x=>f?0:o(x.seriesLabel)).attr("width",u).attr("rx",c[m][0]??1).attr("ry",c[m][1]??1).transition().duration(h).ease(si(s.transitionEase)).delay((x,v)=>x.groupIndex*l).attr("height",x=>Math.abs(x.axisYFromZero))}),t.selectAll(`rect.${e}`)}function Jk({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)=>{Z(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 tR({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)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Dh=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:c,fullChartParams$:l,gridAxesTransform$:h,gridGraphicTransform$:f,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:y,event$:x})=>{const v=new ot,b=An(t,"clipPath-box"),$=st(t,"rect"),{seriesSelection$:_,axesSelection$:P,defsSelection$:T,graphicGSelection$:w}=ui({selection:e,pluginName:t,clipPathID:b,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:f}),D=o.pipe(z(v),U(R=>R.map(C=>C[0]?C[0].axisY-C[0].axisYFromZero:0)),it()),S=B({computedData:n,visibleComputedData:i,params:c,gridAxesSize:d,isSeriesSeprate:y}).pipe(z(v),Y(async R=>R),U(R=>R.params.barWidth?R.params.barWidth:R.isSeriesSeprate?v2({axisWidth:R.gridAxesSize.width,groupAmount:R.computedData[0]?R.computedData[0].length:0,barAmountOfGroup:1,barPadding:R.params.barPadding,barGroupPadding:R.params.barGroupPadding}):v2({axisWidth:R.gridAxesSize.width,groupAmount:R.computedData[0]?R.computedData[0].length:0,barAmountOfGroup:R.visibleComputedData.length,barPadding:R.params.barPadding,barGroupPadding:R.params.barGroupPadding})),it()),G=B({computedData:n,barWidth:S,params:c,gridGraphicReverseScale:p}).pipe(z(v),Y(async R=>R),U(R=>{const C=R.barWidth/2,N=R.params.barRadius===!0?C:R.params.barRadius===!1?0:typeof R.params.barRadius=="number"?R.params.barRadius:0;return R.computedData.map((j,Q)=>{const I=R.gridGraphicReverseScale[Q]??R.gridGraphicReverseScale[0];let X=N*I[0],q=N*I[1];if(X>C){const V=C/X;X=X*V,q=q*V}return[X,q]})})),k=i.pipe(z(v),U(R=>{const C=new Set;return R.forEach(N=>{N.forEach(j=>{C.add(j.groupLabel)})}),Array.from(C)})),A=B({seriesLabels:a,barWidth:S,params:c}).pipe(z(v),Y(async R=>R),U(R=>Vk(R.barWidth,R.seriesLabels,R.params))),L=l.pipe(z(v),U(R=>R.transitionDuration),it()),M=new ht(R=>{B({groupLabels:k,transitionDuration:L}).pipe(Y(async C=>C)).subscribe(C=>{const N=Zk(C.groupLabels.length,C.transitionDuration);R.next(N)})}).pipe(z(v),it()),F=new ht(R=>{B({groupLabels:k,transitionDuration:L}).pipe(Y(async C=>C)).subscribe(C=>{const N=Kk(C.groupLabels.length,C.transitionDuration);R.next(N)})}).pipe(z(v),it());B({defsSelection:T,gridAxesSize:d}).pipe(z(v),Y(async R=>R)).subscribe(R=>{const C=[{id:b,width:R.gridAxesSize.width,height:R.gridAxesSize.height}];Jk({defsSelection:R.defsSelection,clipPathData:C})});const O=l.pipe(z(v),U(R=>R.highlightTarget),it()),E=B({graphicGSelection:w,visibleComputedLayoutData:o,zeroYArr:D,groupLabels:k,barScale:A,params:c,chartParams:l,highlightTarget:O,barWidth:S,transformedBarRadius:G,delayGroup:M,transitionItem:F,isSeriesSeprate:y}).pipe(z(v),Y(async R=>R),U(R=>Qk({graphicGSelection:R.graphicGSelection,rectClassName:$,visibleComputedLayoutData:R.visibleComputedLayoutData,zeroYArr:R.zeroYArr,groupLabels:R.groupLabels,barScale:R.barScale,params:R.params,chartParams:R.chartParams,barWidth:R.barWidth,transformedBarRadius:R.transformedBarRadius,delayGroup:R.delayGroup,transitionItem:R.transitionItem,isSeriesSeprate:R.isSeriesSeprate})));return B({barSelection:E,computedData:n,highlightTarget:O,SeriesDataMap:s,GroupDataMap:u}).pipe(z(v),Y(async R=>R)).subscribe(R=>{R.barSelection.on("mouseover",(C,N)=>{C.stopPropagation(),x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:R.highlightTarget,datum:N,gridIndex:N.gridIndex,series:R.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:R.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:C,data:R.computedData})}).on("mousemove",(C,N)=>{C.stopPropagation(),x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:R.highlightTarget,datum:N,gridIndex:N.gridIndex,series:R.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:R.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:C,data:R.computedData})}).on("mouseout",(C,N)=>{C.stopPropagation(),x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:R.highlightTarget,datum:N,gridIndex:N.gridIndex,series:R.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:R.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:C,data:R.computedData})}).on("click",(C,N)=>{C.stopPropagation(),x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:R.highlightTarget,datum:N,gridIndex:N.gridIndex,series:R.SeriesDataMap.get(N.seriesLabel),seriesIndex:N.seriesIndex,seriesLabel:N.seriesLabel,groups:R.GroupDataMap.get(N.groupLabel),groupIndex:N.groupIndex,groupLabel:N.groupLabel,event:C,data:R.computedData})})}),B({barSelection:E,highlight:g.pipe(U(R=>R.map(C=>C.id))),fullChartParams:l}).pipe(z(v),Y(async R=>R)).subscribe(R=>{tR({selection:R.barSelection,ids:R.highlight,fullChartParams:R.fullChartParams})}),()=>{v.next(void 0)}},x2="Bars",eR=se(x2,Io)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=r.fullDataFormatter$.pipe(z(i),U(s=>s.grid.separateSeries),it(),Pt(1)),a=Dh(x2,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,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$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:o,event$:n.event$});return()=>{i.next(void 0),a()}}),_2="BarsDiverging",nR=se(_2,Io)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=Dh(_2,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,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$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:Yu(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),w2=.3;function rR({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function iR(t,e){return t<=1?0:e/(t-1)*w2}function oR(t,e){return t<=1?e:e*(1-w2)}function aR({graphicGSelection:t,rectClassName:e,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:u,delayGroup:c,transitionItem:l,isSeriesSeprate:h}){const f=s/2;return t.each((d,g,m)=>{Z(m[g]).selectAll(`rect.${e}`).data(n[g]??[],y=>y.id).join(y=>y.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",x=>0),y=>y,y=>y.remove()).attr("transform",(y,x)=>`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(si(a.transitionEase)).delay((y,x)=>y.groupIndex*c).attr("y",y=>y._barStartY).attr("height",y=>Math.abs(y._barHeight))}),t.selectAll(`rect.${e}`)}function sR({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)=>{Z(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 uR({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)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const $2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:c,fullDataFormatter$:l,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridGraphicReverseScale$:d,gridAxesSize$:g,gridHighlight$:m,gridContainerPosition$:y,isSeriesSeprate$:x,event$:v})=>{const b=new ot,$=An(t,"clipPath-box"),_=st(t,"rect"),{seriesSelection$:P,axesSelection$:T,defsSelection$:w,graphicGSelection$:D}=ui({selection:e,pluginName:t,clipPathID:$,seriesLabels$:a,gridContainerPosition$:y,gridAxesTransform$:f,gridGraphicTransform$:p}),S=o.pipe(z(b),U(I=>I[0]&&I[0][0]?I[0][0].axisY-I[0][0].axisYFromZero:0),it()),G=B({computedData:n,params:c,axisSize:g,isSeriesSeprate:x}).pipe(z(b),Y(async I=>I),U(I=>I.params.barWidth?I.params.barWidth:rR({axisWidth:I.axisSize.width,groupAmount:I.computedData[0]?I.computedData[0].length:0,barGroupPadding:I.params.barGroupPadding})),it()),k=B({computedData:n,barWidth:G,params:c,gridGraphicReverseScale:d}).pipe(z(b),Y(async I=>I),U(I=>{const X=I.barWidth/2,q=I.params.barRadius===!0?X:I.params.barRadius===!1?0:typeof I.params.barRadius=="number"?I.params.barRadius:0;return I.computedData.map((V,W)=>{const et=I.gridGraphicReverseScale[W]??I.gridGraphicReverseScale[0],ut=q*et[0],H=q*et[1];return[ut,H]})})),A=i.pipe(z(b),U(I=>{const X=new Set;return I.forEach(q=>{q.forEach(V=>{X.add(V.groupLabel)})}),Array.from(X)}),Pt(1)),L=h.pipe(z(b),U(I=>I.transitionDuration),it()),M=new ht(I=>{B({groupLabels:A,transitionDuration:L}).pipe(Y(async X=>X)).subscribe(X=>{const q=iR(X.groupLabels.length,X.transitionDuration);I.next(q)})}).pipe(z(b),it()),F=new ht(I=>{B({groupLabels:A,transitionDuration:L}).pipe(Y(async X=>X)).subscribe(X=>{const q=oR(X.groupLabels.length,X.transitionDuration);I.next(q)})}).pipe(z(b),it()),O=B({computedData:n,dataFormatter:l}).pipe(z(b),Y(async I=>I),U(I=>{const q=I.computedData[0]?I.computedData[0].length-1:0,V=I.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0:I.dataFormatter.grid.groupAxis.scaleDomain[0],W=I.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?q:I.dataFormatter.grid.groupAxis.scaleDomain[1];return[V,W]})),E=B({visibleComputedLayoutData:o,groupScaleDomain:O}).pipe(z(b),Y(async I=>I),U(I=>{const X=I.groupScaleDomain[0],q=I.groupScaleDomain[1],W=I.visibleComputedLayoutData.map(mt=>mt.filter((pt,Yt)=>pt.groupIndex>=X&&pt.groupIndex<=q)).flat();if(W.length<=1)return 1;const et=W.reduce((mt,pt)=>pt.value>mt.value?pt:mt,W[0]),ut=et.groupIndex,H=W.filter(mt=>mt.groupIndex===ut).reduce((mt,pt)=>mt+pt.value,0);return et.value/H})),R=B({computedLayoutData:r,yRatio:E,zeroY:S}).pipe(z(b),U(I=>{let X=I.computedLayoutData[0]?I.computedLayoutData[0].map(()=>I.zeroY):[];return I.computedLayoutData.map((q,V)=>q.map((W,et)=>{const ut=X[et];let H=0;return W.visible&&(H=W.axisYFromZero*I.yRatio,X[et]=X[et]+H),{...W,_barStartY:ut,_barHeight:H}}))})),C=B({computedLayoutData:r,zeroY:S}).pipe(z(b),U(I=>I.computedLayoutData.map((X,q)=>X.map((V,W)=>({...V,_barStartY:I.zeroY,_barHeight:V.axisYFromZero}))))),N=x.pipe(Y(I=>Lp(()=>I,C,R)));B({defsSelection:w,gridAxesSize:g}).pipe(z(b),Y(async I=>I)).subscribe(I=>{const X=[{id:$,width:I.gridAxesSize.width,height:I.gridAxesSize.height}];sR({defsSelection:I.defsSelection,clipPathData:X})});const j=h.pipe(z(b),U(I=>I.highlightTarget),it()),Q=B({graphicGSelection:D,graphicData:N,zeroY:S,groupLabels:A,params:c,chartParams:h,highlightTarget:j,barWidth:G,transformedBarRadius:k,delayGroup:M,transitionItem:F,isSeriesSeprate:x}).pipe(z(b),Y(async I=>I),U(I=>aR({graphicGSelection:I.graphicGSelection,rectClassName:_,barData:I.graphicData,zeroY:I.zeroY,groupLabels:I.groupLabels,params:I.params,chartParams:I.chartParams,barWidth:I.barWidth,transformedBarRadius:I.transformedBarRadius,delayGroup:I.delayGroup,transitionItem:I.transitionItem,isSeriesSeprate:I.isSeriesSeprate})));return B({barSelection:Q,computedData:n,highlightTarget:j,SeriesDataMap:s,GroupDataMap:u}).subscribe(I=>{I.barSelection.on("mouseover",(X,q)=>{X.stopPropagation(),v.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:I.highlightTarget,datum:q,gridIndex:q.gridIndex,series:I.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:I.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:X,data:I.computedData})}).on("mousemove",(X,q)=>{X.stopPropagation(),v.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:I.highlightTarget,datum:q,gridIndex:q.gridIndex,series:I.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:I.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:X,data:I.computedData})}).on("mouseout",(X,q)=>{X.stopPropagation(),v.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:I.highlightTarget,datum:q,gridIndex:q.gridIndex,series:I.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:I.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:X,data:I.computedData})}).on("click",(X,q)=>{X.stopPropagation(),v.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:I.highlightTarget,datum:q,gridIndex:q.gridIndex,series:I.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:I.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:X,data:I.computedData})})}),B({barSelection:Q,highlight:m.pipe(U(I=>I.map(X=>X.id))),fullChartParams:h}).pipe(z(b),Y(async I=>I)).subscribe(I=>{uR({selection:I.barSelection,ids:I.highlight,fullChartParams:I.fullChartParams})}),()=>{b.next(void 0)}},S2="BarStack",cR=se(S2,Kh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=r.fullDataFormatter$.pipe(z(i),U(s=>s.grid.separateSeries),it(),Pt(1)),a=$2(S2,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,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$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:o,event$:n.event$});return()=>{i.next(void 0),a()}}),A2=.3;function M2({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 lR(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return qf().domain(e).range([-i/2+r,i/2-r])}function fR(t,e){return t<=1?0:e/(t-1)*A2}function hR(t,e){return t<=1?e:e*(1-A2)}function pR({graphicGSelection:t,pathGClassName:e,pathClassName:n,visibleComputedLayoutData:r,linearGradientIds:i,zeroYArr:o,groupLabels:a,barScale:s,params:u,chartParams:c,barWidth:l,delayGroup:h,transitionItem:f,isSeriesSeprate:p}){const d=l/2;return t.each((m,y,x)=>{Z(x[y]).selectAll(`g.${e}`).data(r[y]??[]).join(b=>{const $=b.append("g").classed(e,!0).attr("cursor","pointer");return $.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",_=>{const P=-d,T=o[y],w=o[y];return`M${P},${T} L${P+l/2},${w} ${P+l},${T}`}),$},b=>b,b=>b.remove()).attr("transform",b=>`translate(${p?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=>p?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(si(c.transitionEase)).delay((b,$)=>b.groupIndex*h).attr("d",b=>{const $=-d,_=o[y],P=b.axisY;return`M${$},${_} L${$+l/2},${P} ${$+l},${_}`})}),t.selectAll(`path.${n}`)}function dR({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 pI({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 gI({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=An(t,"clipPath-box"),x=ot(t,"pathG"),v=ot(t,"path"),{seriesSelection$:b,axesSelection$:_,defsSelection$:w,graphicGSelection$:S}=ui({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 k=r.pipe(U(M=>M.map(N=>N[0]?N[0].axisY-N[0].axisYFromZero:0)),ft()),$=W({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?w2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:1,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding}):w2({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(L=>{N.add(L.seriesLabel)})}),Array.from(N)})),A=r.pipe(F(m),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(L=>{N.add(L.groupLabel)})}),Array.from(N)})),I=new lt(M=>{W({seriesLabels:E,barWidth:$,params:s}).pipe(F(m),B(async N=>N)).subscribe(N=>{const z=cI(N.barWidth,N.seriesLabels,N.params);M.next(z)})}),D=u.pipe(F(m),U(M=>M.transitionDuration),ft()),T=new lt(M=>{W({groupLabels:A,transitionDuration:D}).pipe(B(async N=>N)).subscribe(N=>{const z=lI(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(m),ft()),C=new lt(M=>{W({groupLabels:A,transitionDuration:D}).pipe(B(async N=>N)).subscribe(N=>{const z=fI(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(m),ft());W({defsSelection:w,gridAxesSize:h}).pipe(F(m),B(async M=>M)).subscribe(M=>{const N=[{id:y,width:M.gridAxesSize.width,height:M.gridAxesSize.height}];pI({defsSelection:M.defsSelection,clipPathData:N})});const P=u.pipe(F(m),U(M=>M.highlightTarget),ft()),R=new nt,G=E.pipe(F(m),U(M=>M.map((N,z)=>An(t,`lineargradient-${N}`))));return W({graphicGSelection:S,defsSelection:w,computedData:n,linearGradientIds:G,zeroYArr:k,groupLabels:A,barScale:I,params:s,chartParams:u,highlightTarget:P,barWidth:$,delayGroup:T,transitionItem:C,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:p}).pipe(F(m),B(async M=>M)).subscribe(M=>{const N=hI({graphicGSelection:M.graphicGSelection,pathGClassName:x,pathClassName:v,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});dI({defsSelection:M.defsSelection,computedData:M.computedData,linearGradientIds:M.linearGradientIds,params:M.params}),N.on("mouseover",(z,L)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:L,gridIndex:L.gridIndex,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:z,data:M.computedData})}).on("mousemove",(z,L)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:L,gridIndex:L.gridIndex,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:z,data:M.computedData})}).on("mouseout",(z,L)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:L,gridIndex:L.gridIndex,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:z,data:M.computedData})}).on("click",(z,L)=>{z.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:L,gridIndex:L.gridIndex,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:z,data:M.computedData})}),R.next(N)}),W({barSelection:R,highlight:f.pipe(U(M=>M.map(N=>N.id))),fullChartParams:u}).pipe(F(m),B(async M=>M)).subscribe(M=>{gI({selection:M.barSelection,ids:M.highlight,fullChartParams:M.fullChartParams})}),()=>{m.next(void 0)}},S2="BarsTriangle",mI=ae(S2,Xh)(({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 yI({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,x)=>p*u).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,y)=>Ah({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>Ah({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 bI({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 vI({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=An(t,"clipPath-box"),x=ot(t,"circleG"),v=ot(t,"circle"),b=new nt,{seriesSelection$:_,axesSelection$:w,defsSelection$:S,graphicGSelection$:k}=ui({selection:e,pluginName:t,clipPathID:y,existSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),$=W({computedData:n,gridGraphicReverseScale:h}).pipe(F(m),B(async I=>I),U(I=>I.computedData.map((D,T)=>I.gridGraphicReverseScale[T])));W({defsSelection:S,gridAxesSize:f}).pipe(F(m),B(async I=>I)).subscribe(I=>{const D=[{id:y,width:I.gridAxesSize.width,height:I.gridAxesSize.height}];vI({defsSelection:I.defsSelection,clipPathData:D})});const E=u.pipe(F(m),U(I=>I.highlightTarget),ft());W({graphicGSelection:k,computedData:n,visibleComputedData:r,SeriesDataMap:o,GroupDataMap:a,graphicReverseScale:$,fullChartParams:u,fullParams:s,highlightTarget:E}).pipe(F(m),B(async I=>I)).subscribe(I=>{const D=yI({graphicGSelection:I.graphicGSelection,circleGClassName:x,circleClassName:v,data:I.visibleComputedData,fullParams:I.fullParams,fullChartParams:I.fullChartParams,graphicReverseScale:I.graphicReverseScale});D.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(D)});const A=s.pipe(F(m),U(I=>I.onlyShowHighlighted),ft());return u.pipe(F(m),B(I=>W({graphicSelection:b,highlight:d.pipe(U(D=>D.map(T=>T.id))),onlyShowHighlighted:A,fullChartParams:u}).pipe(F(m),B(async D=>D)))).subscribe(I=>{bI({selection:I.graphicSelection,ids:I.highlight,onlyShowHighlighted:I.onlyShowHighlighted,fullChartParams:I.fullChartParams})}),()=>{m.next(void 0)}},M2="Dots",xI=ae(M2,Wh)(({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()}}),_I={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 Du=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o,textSizePx$:a})=>{const s=ot(t,"root-position"),u=ot(t,"legend-card"),c=ot(t,"legend-list"),l=ot(t,"legend-item"),h=new nt,f=W({seriesLabels:n,fullChartParams:o}).pipe(F(h),B(async $=>$),U($=>{const E=new Map;let A=0;return $.seriesLabels.forEach((I,D)=>{if(!E.has(I)){const T=T2(A,$.fullChartParams);E.set(I,T),A++}}),E})),d=n.pipe(F(h),U($=>{const E=new Set;let A=[];return $.forEach(I=>{E.has(I)?A.push(!1):A.push(!0),E.add(I)}),A})),p=r.pipe(F(h),U($=>$.position==="bottom"||$.position==="top"?"row":"column")),g=W({fullParams:r,layout:i}).pipe(F(h),B(async $=>$),U($=>{const E=$.fullParams.padding*2+$.fullParams.gap*2;return $.fullParams.position==="bottom"||$.fullParams.position==="top"?$.layout.rootWidth-E:$.layout.rootHeight-E})),y=W({layout:i,fullParams:r}).pipe(F(h),B(async $=>$),U($=>{let E=0,A=0;return $.fullParams.position==="bottom"?(A=$.layout.rootHeight,$.fullParams.justify==="start"?E=0:$.fullParams.justify==="center"?E=$.layout.rootWidth/2:$.fullParams.justify==="end"&&(E=$.layout.rootWidth)):$.fullParams.position==="right"?(E=$.layout.rootWidth,$.fullParams.justify==="start"?A=0:$.fullParams.justify==="center"?A=$.layout.rootHeight/2:$.fullParams.justify==="end"&&(A=$.layout.rootHeight)):$.fullParams.position==="top"?(A=0,$.fullParams.justify==="start"?E=0:$.fullParams.justify==="center"?E=$.layout.rootWidth/2:$.fullParams.justify==="end"&&(E=$.layout.rootWidth)):$.fullParams.position==="left"&&(E=0,$.fullParams.justify==="start"?A=0:$.fullParams.justify==="center"?A=$.layout.rootHeight/2:$.fullParams.justify==="end"&&(A=$.layout.rootHeight)),{x:E,y:A}})).pipe(F(h),U($=>e.selectAll(`g.${s}`).data([$]).join(E=>E.append("g").classed(s,!0).attr("transform",A=>`translate(${A.x}, ${A.y})`),E=>E.transition().attr("transform",A=>`translate(${A.x}, ${A.y})`),E=>E.remove()))),x=r.pipe(F(h),U($=>$.seriesList[0]?$.seriesList[0]:_I)),v=W({visibleList:d,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:p,lineMaxSize:g,defaultListStyle:x,SeriesLabelColorMap:f,textSizePx:a}).pipe(F(h),B(async $=>$),U($=>$.seriesLabels.reduce((E,A,I)=>{if(!$.visibleList[I])return E;const D=c2(A,$.textSizePx),T=$.textSizePx*1.5+D,C=$.SeriesLabelColorMap.get(A),P=E[0]&&E[0][0]?E[E.length-1][E[E.length-1].length-1]:null,{translateX:R,translateY:G,lineIndex:M,itemIndex:N}=((L,j,q)=>{let Y=0,X=0,Q=0,ct=0;if(L.lineDirection==="column"){let O=q?q.translateY+L.textSizePx+L.fullParams.gap:0;if(O+L.textSizePx>L.lineMaxSize){Q=q.lineIndex+1,ct=0,X=0;const tt=j[j.length-1].reduce((st,H)=>H.itemWidth>st?H.itemWidth:st,0);Y=q.translateX+tt+L.fullParams.gap}else Q=q?q.lineIndex:0,ct=q?q.itemIndex+1:0,X=O,Y=q?q.translateX:0}else{let O=q?q.translateX+q.itemWidth+L.fullParams.gap:0;O+T>L.lineMaxSize?(Q=q.lineIndex+1,ct=0,Y=0):(Q=q?q.lineIndex:0,ct=q?q.itemIndex+1:0,Y=O),X=(L.textSizePx+L.fullParams.gap)*Q}return{translateX:Y,translateY:X,lineIndex:Q,itemIndex:ct}})($,E,P);E[M]||(E[M]=[]);const z=$.fullParams.seriesList[N]?$.fullParams.seriesList[N]:$.defaultListStyle;return E[M].push({id:A,seriesLabel:A,seriesIndex:I,lineIndex:M,itemIndex:N,text:A,itemWidth:T,translateX:R,translateY:G,color:C,listRectWidth:z.listRectWidth,listRectHeight:z.listRectHeight,listRectRadius:z.listRectRadius}),E},[])),Le(1)),b=W({fullParams:r,fullChartParams:o,lineDirection:p,lengendItems:v,textSizePx:a}).pipe(F(h),B(async $=>$),U($=>{const{width:E,height:A}=((I,D)=>{let T=0,C=0;if(!D.length||!D[0].length)return{width:T,height:C};const P=D[0][D[0].length-1];return I.lineDirection==="column"?(T=D.reduce((R,G)=>{const M=G.reduce((N,z)=>z.itemWidth>N?z.itemWidth:N,0);return R+M},0),T+=I.fullParams.gap*(D.length-1),C=P.translateY+I.textSizePx):(T=P.translateX+P.itemWidth,C=I.textSizePx*D.length+I.fullParams.gap*(D.length-1)),{width:T,height:C}})($,$.lengendItems);return{direction:$.lineDirection,width:E,height:A,translateX:$.fullParams.gap,translateY:$.fullParams.gap}}),Le(1)),_=W({fullParams:r,lengendList:b}).pipe(F(h),B(async $=>$),U($=>{const E=$.lengendList.width+$.fullParams.gap*2,A=$.lengendList.height+$.fullParams.gap*2;let I=0,D=0;return $.fullParams.position==="left"?$.fullParams.justify==="start"?(I=$.fullParams.padding,D=$.fullParams.padding):$.fullParams.justify==="center"?(I=$.fullParams.padding,D=-A/2):$.fullParams.justify==="end"&&(I=$.fullParams.padding,D=-A-$.fullParams.padding):$.fullParams.position==="right"?$.fullParams.justify==="start"?(I=-E-$.fullParams.padding,D=$.fullParams.padding):$.fullParams.justify==="center"?(I=-E-$.fullParams.padding,D=-A/2):$.fullParams.justify==="end"&&(I=-E-$.fullParams.padding,D=-A-$.fullParams.padding):$.fullParams.position==="top"?$.fullParams.justify==="start"?(I=$.fullParams.padding,D=$.fullParams.padding):$.fullParams.justify==="center"?(I=-E/2,D=$.fullParams.padding):$.fullParams.justify==="end"&&(I=-E-$.fullParams.padding,D=$.fullParams.padding):$.fullParams.justify==="start"?(I=$.fullParams.padding,D=-A-$.fullParams.padding):$.fullParams.justify==="center"?(I=-E/2,D=-A-$.fullParams.padding):$.fullParams.justify==="end"&&(I=-E-$.fullParams.padding,D=-A-$.fullParams.padding),{width:E,height:A,translateX:I,translateY:D}})),w=W({rootPositionSelection:y,fullParams:r,fullChartParams:o,legendCard:_}).pipe(F(h),B(async $=>$),U($=>$.rootPositionSelection.selectAll("g").data([$.legendCard]).join(E=>E.append("g").classed(u,!0).attr("transform",A=>`translate(${A.translateX}, ${A.translateY})`),E=>E.transition().attr("transform",A=>`translate(${A.translateX}, ${A.translateY})`),E=>E.remove()).each((E,A,I)=>{V(I[A]).selectAll("rect").data([E]).join("rect").attr("width",D=>D.width).attr("height",D=>D.height).attr("fill",Et($.fullParams.backgroundFill,$.fullChartParams)).attr("stroke",Et($.fullParams.backgroundStroke,$.fullChartParams))}))),S=W({lengendCardSelection:w,fullParams:r,lengendList:b}).pipe(F(h),B(async $=>$),U($=>$.lengendCardSelection.selectAll("g").data([$.lengendList]).join(E=>E.append("g").classed(c,!0).attr("transform",A=>`translate(${A.translateX}, ${A.translateY})`),E=>E.transition().attr("transform",A=>`translate(${A.translateX}, ${A.translateY})`),E=>E.remove())));return W({lengendListSelection:S,fullParams:r,fullChartParams:o,lengendItems:v,textSizePx:a}).pipe(F(h),B(async $=>$),U($=>{const E=$.lengendItems[0]?$.lengendItems.flat():[];return $.lengendListSelection.selectAll(`g.${l}`).data(E).join(A=>A.append("g").classed(l,!0).attr("cursor","default"),A=>A,A=>A.remove()).attr("transform",(A,I)=>`translate(${A.translateX}, ${A.translateY})`).each((A,I,D)=>{const T=$.textSizePx/2,C=-A.listRectWidth/2,P=-A.listRectHeight/2;V(D[I]).selectAll("rect").data([A]).join("rect").attr("x",T).attr("y",T).attr("width",R=>R.listRectWidth).attr("height",R=>R.listRectHeight).attr("transform",R=>`translate(${C}, ${P})`).attr("fill",R=>R.color).attr("rx",R=>R.listRectRadius),V(D[I]).selectAll("text").data([A]).join(R=>R.append("text").attr("dominant-baseline","hanging"),R=>R,R=>R.remove()).attr("x",$.textSizePx*1.5).attr("font-size",$.fullChartParams.styles.textSize).attr("fill",R=>$.fullParams.textColorType==="series"?T2(R.seriesIndex,$.fullChartParams):Et($.fullParams.textColorType,$.fullChartParams)).text(R=>R.text)})})).subscribe(),()=>{h.next(void 0)}},P2="GridLegend",wI=ae(P2,Qh)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,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=Du(P2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),Ph=6;function $I({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).attr("font-size",u.styles.textSize).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-Ph-r.labelOffset[1]})`);const f=Fg(c).scale(c).tickSize(r.tickFullLine==!0?-a.height:Ph).tickSizeOuter(0).tickFormat(p=>Sh(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").attr("font-size",u.styles.textSize).style("color",Et(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`0 -${r.tickPadding+Ph}`).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((w,S)=>w.length===S.length)),isSeriesPositionSeprate:l}).pipe(F(h),B(async w=>w),U(w=>w.isSeriesPositionSeprate?w.computedData:[w.computedData[0]]),U((w,S)=>e.selectAll(`g.${f}`).data(w,k=>k[0]?k[0].seriesIndex:S).join("g").classed(f,!0))),y=m.pipe(F(h),U((w,S)=>w.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));W({containerSelection:m,gridContainer:c}).pipe(F(h),B(async w=>w)).subscribe(w=>{w.containerSelection.attr("transform",(S,k)=>{const $=w.gridContainer[k]??w.gridContainer[0],E=$.translate,A=$.scale;return`translate(${E[0]}, ${E[1]}) scale(${A[0]}, ${A[1]})`})}),W({axisSelection:y,gridAxesTransform:a}).pipe(F(h),B(async w=>w)).subscribe(w=>{w.axisSelection.style("transform",w.gridAxesTransform.value)});const x=W({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(F(h),B(async w=>w),U(w=>{const S=`translate(${w.gridAxesReverseTransform.translate[0]}px, ${w.gridAxesReverseTransform.translate[1]}px)`,k=`rotate(${w.gridAxesReverseTransform.rotate}deg) rotateX(${w.gridAxesReverseTransform.rotateX}deg) rotateY(${w.gridAxesReverseTransform.rotateY}deg)`,$=`scale(${1/w.gridContainer[0].scale[0]}, ${1/w.gridContainer[0].scale[1]})`,A=`rotate(${w.fullDataFormatter.grid.groupAxis.position==="left"&&w.fullDataFormatter.grid.valueAxis.position==="top"||w.fullDataFormatter.grid.groupAxis.position==="right"&&w.fullDataFormatter.grid.valueAxis.position==="bottom"?w.fullParams.tickTextRotate+180:w.fullParams.tickTextRotate}deg)`;return`${S} ${k} ${$} ${A}`}),ft()),v=new lt(w=>{W({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(F(h),B(async S=>S)).subscribe(S=>{const $=S.computedData[0]?S.computedData[0].length-1:0,E=S.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-S.fullDataFormatter.grid.groupAxis.scalePadding:S.fullDataFormatter.grid.groupAxis.scaleDomain[0]-S.fullDataFormatter.grid.groupAxis.scalePadding,A=S.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?$+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 D=(S.computedData[0]??[]).map(R=>R.groupLabel);const T=new Array(I).fill(0).map((R,G)=>D[G]!=null?D[G]:String(G)).filter((R,G)=>G>=E&&G<=A),C=S.fullDataFormatter.grid.groupAxis.scalePadding,P=sg({axisLabels:T,axisWidth:S.gridAxesSize.width,padding:C});w.next(P)})}),b=W({fullDataFormatter:i,fullParams:r}).pipe(F(h),B(async w=>w),U(w=>{let S="middle",k="hanging";return w.fullDataFormatter.grid.groupAxis.position==="bottom"?(S=w.fullParams.tickTextRotate?"end":"middle",k="hanging"):w.fullDataFormatter.grid.groupAxis.position==="top"?(S=w.fullParams.tickTextRotate?"end":"middle",k="auto"):w.fullDataFormatter.grid.groupAxis.position==="left"?(S="end",k="middle"):w.fullDataFormatter.grid.groupAxis.position==="right"&&(S="start",k="middle"),{textAnchor:S,dominantBaseline:k}})),_=i.pipe(F(h),U(w=>{let S="start",k="hanging";return w.grid.groupAxis.position==="bottom"?k="hanging":w.grid.groupAxis.position==="top"?k="auto":w.grid.groupAxis.position==="left"?S="end":w.grid.groupAxis.position==="right"&&(S="start"),w.grid.valueAxis.position==="left"?S="start":w.grid.valueAxis.position==="right"?S="end":w.grid.valueAxis.position==="bottom"?k="auto":w.grid.valueAxis.position==="top"&&(k="hanging"),{textAnchor:S,dominantBaseline:k}}));return W({axisSelection:y,params:r,tickTextAlign:b,axisLabelAlign:_,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:v,textTransform:x}).pipe(F(h),B(async w=>w)).subscribe(w=>{$I({selection:w.axisSelection,xAxisClassName:p,groupingLabelClassName:g,params:w.params,tickTextAlign:w.tickTextAlign,axisLabelAlign:w.axisLabelAlign,gridAxesSize:w.gridAxesSize,fullDataFormatter:w.fullDataFormatter,chartParams:w.chartParams,groupScale:w.groupScale,textTransform:w.textTransform})}),()=>{h.next(void 0)}},L2="GroupAxis",SI=ae(L2,Vh)(({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 AI({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,x,v)=>{V(v[x]).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).attr("font-size",u.styles.textSize).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=>Sh(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").attr("font-size",u.styles.textSize).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 Lu=(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,k)=>S.length===k.length)),isSeriesPositionSeprate:l}).pipe(F(h),B(async S=>S),U(S=>S.isSeriesPositionSeprate?S.computedData:[S.computedData[0]]),U((S,k)=>e.selectAll(`g.${f}`).data(S,$=>$[0]?$[0].seriesIndex:k).join("g").classed(f,!0))),y=m.pipe(F(h),U((S,k)=>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",(k,$)=>{const E=S.gridContainer[$]??S.gridContainer[0],A=E.translate,I=E.scale;return`translate(${A[0]}, ${A[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 x=W({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(F(h),B(async S=>S),U(S=>{const k=`translate(${S.gridAxesReverseTransform.translate[0]}px, ${S.gridAxesReverseTransform.translate[1]}px)`,$=`rotate(${S.gridAxesReverseTransform.rotate}deg) rotateX(${S.gridAxesReverseTransform.rotateX}deg) rotateY(${S.gridAxesReverseTransform.rotateY}deg)`,E=`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`${k} ${$} ${E} ${I}`}),ft()),v=new lt(S=>{W({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(F(h),B(async k=>k)).subscribe(k=>{const E=k.computedData[0]?k.computedData[0].length-1:0,A=k.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-k.fullDataFormatter.grid.groupAxis.scalePadding:k.fullDataFormatter.grid.groupAxis.scaleDomain[0]-k.fullDataFormatter.grid.groupAxis.scalePadding,I=k.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?E+k.fullDataFormatter.grid.groupAxis.scalePadding:k.fullDataFormatter.grid.groupAxis.scaleDomain[1]+k.fullDataFormatter.grid.groupAxis.scalePadding,D=k.computedData.map((C,P)=>C.filter((R,G)=>G>=A&&G<=I)),T=IC(D.flat());S.next(T)})}),b=new lt(S=>{W({fullDataFormatter:i,gridAxesSize:u,minAndMax:v}).pipe(F(h),B(async k=>k)).subscribe(k=>{const $=ag({maxValue:k.minAndMax[1],minValue:k.minAndMax[0],axisWidth:k.gridAxesSize.height,scaleDomain:k.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:k.fullDataFormatter.grid.valueAxis.scaleRange});S.next($)})}),_=i.pipe(F(h),U(S=>{let k="start",$="hanging";return S.grid.valueAxis.position==="left"?(k="end",$="middle"):S.grid.valueAxis.position==="right"?(k="start",$="middle"):S.grid.valueAxis.position==="bottom"?(k="middle",$="hanging"):S.grid.valueAxis.position==="top"&&(k="middle",$="auto"),{textAnchor:k,dominantBaseline:$}})),w=i.pipe(F(h),U(S=>{let k="start",$="hanging";return S.grid.groupAxis.position==="bottom"?$="auto":S.grid.groupAxis.position==="top"?$="hanging":S.grid.groupAxis.position==="left"?k="start":S.grid.groupAxis.position==="right"&&(k="end"),S.grid.valueAxis.position==="left"?k="end":S.grid.valueAxis.position==="right"?k="start":S.grid.valueAxis.position==="bottom"?$="hanging":S.grid.valueAxis.position==="top"&&($="auto"),{textAnchor:k,dominantBaseline:$}}));return W({axisSelection:y,fullParams:r,tickTextAlign:_,axisLabelAlign:w,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:b,textTransform:x,minAndMax:v}).pipe(F(h),B(async S=>S)).subscribe(S=>{AI({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",MI=ae(k2,Eu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=Lu(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",TI=ae(C2,Zh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,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=Lu(C2,{selection:t,computedData$:n.isSeriesPositionSeprate$.pipe(B(s=>Md(()=>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",PI=ot(I2,"rect"),DI=ae(I2,Kh)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new nt,a=e.insert("rect","g").classed(PI,!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 W({initGroupAxis:r.fullDataFormatter$.pipe(U(c=>c.grid.groupAxis),di()),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(x){const v=x.transform,b=S=>{const k=Math.round(S);return Math.min(h,Math.max(0,k))},_=c.fullDataFormatter.grid.groupAxis.position==="bottom"||c.fullDataFormatter.grid.groupAxis.position==="top"?v.rescaleX(g).domain().map(b):v.rescaleY(g).domain().map(b);_[0]<=0&&_[1]>=h?v.k<s.k&&(v.k=s.k,v.x=s.x,v.y=s.y):_[1]-_[0]<=1&&v.k>s.k&&(v.k=s.k,v.x=s.x,v.y=s.y),s.k=v.k,s.x=v.x,s.y=v.y;const w={...c.fullDataFormatter,grid:{...c.fullDataFormatter.grid,groupAxis:{...c.fullDataFormatter.grid.groupAxis,scaleDomain:_}}};i.dataFormatter$.next(w)});e.call(m)}),()=>{o.next(void 0),a.remove()}});function LI(t,e){let n=new lt(()=>{});return t.each(function(){const r=Hu(this,e);n=Wu(n,r)}),n}const Dh="GroupAux",Lh=ot(Dh,"label-box");function EI({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function kI({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 CI(t){t.selectAll("line").data([]).exit().remove()}function II({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:Sh(t,n.labelTextFormat)}]:[]}function RI({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesReverseTransformValue:i,textSizePx:o}){const a=o+4,s=t.selectAll(`g.${Lh}`).data(e),u=s.enter().append("g").classed(Lh,!0).style("cursor","pointer"),c=u.merge(s);return u.attr("transform",(l,h)=>`translate(${l.x}, ${l.y})`),s.transition().duration(50).attr("transform",(l,h)=>`translate(${l.x}, ${l.y})`),s.exit().remove(),c.each((l,h,f)=>{const d=c2(l.text,o)+12,p=-d/2,g=V(f[h]).selectAll("rect").data([l]),m=g.enter().append("rect").attr("height",`${a}px`).attr("fill",v=>Et(n.labelColorType,r)).attr("x",p).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");g.merge(m).attr("width",v=>`${d}px`).style("transform",i),g.exit().remove();const y=V(f[h]).selectAll("text").data([l]),x=y.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");y.merge(x).text(v=>v.text).style("transform",i).attr("fill",v=>Et(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",p+6),y.exit().remove()}),c}function NI(t){t.selectAll(`g.${Lh}`).data([]).exit().remove()}const FI=ae(Dh,qh)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new nt,a=e.insert("rect","g").classed(ot(Dh,"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=>{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,x=d.computedData[0]?d.computedData[0].length:0;let v=d.fullDataFormatter.grid.gridData.seriesDirection==="row"?(d.computedData[0]??[]).map(S=>S.groupLabel):d.computedData.map(S=>S[0].groupLabel);const b=new Array(x).fill(0).map((S,k)=>v[k]!=null?v[k]:String(k)).filter((S,k)=>k>=m&&k<=y),_=d.fullDataFormatter.grid.groupAxis.scalePadding,w=sg({axisLabels:b,axisWidth:d.gridAxesSize.width,padding:_});f.next(w)})}),c=Mh({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),l=i.fullChartParams$.pipe(F(o),U(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(hi(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,textSizePx:i.textSizePx$}).pipe(F(o),B(async f=>f)).subscribe(f=>{const d=f.groupScale(f.event.groupLabel)??0,p=EI({groupLabel:f.event.groupLabel,axisX:d,axisHeight:f.gridAxesSize.height,fullParams:f.fullParams});kI({selection:s,pluginName:n,lineData:p,fullParams:f.fullParams,fullChartParams:f.fullChartParams});const g=II({groupLabel:f.event.groupLabel,axisX:d,fullParams:f.fullParams});RI({selection:s,labelData:g,fullParams:f.fullParams,fullChartParams:f.fullChartParams,gridAxesReverseTransformValue:f.gridAxesReverseTransform.value,textSizePx:f.textSizePx}).on("mouseover",(y,x)=>{const{groupIndex:v,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:v,groupLabel:b,event:y,data:f.computedData})}).on("mousemove",(y,x)=>{const{groupIndex:v,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:v,groupLabel:b,event:y,data:f.computedData})}).on("mouseout",(y,x)=>{const{groupIndex:v,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:v,groupLabel:b,event:y,data:f.computedData})}).on("click",(y,x)=>{const{groupIndex:v,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:v,groupLabel:b,event:y,data:f.computedData})})}),LI(a,"mouseout").pipe(F(o)).subscribe(f=>{console.log("rootMouseout"),CI(s),NI(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",GI=Ce(W2,R2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,o=n.multiGridEachDetail$.pipe(F(i),U(c=>c.map((h,f)=>h.SeriesDataMap$.pipe(U(d=>Array.from(d.keys()))))),B(c=>W(c)),U(c=>c.flat())),a=W({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=hc(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),U(c=>({...c.fullParams,seriesList:c.seriesList}))),u=Du(W2,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),u()}}),un=t=>{const e=t.fullParams$.pipe(U(i=>i.gridIndexes),ft(),Le(1)),n=new nt,r=t.multiGridEachDetail$.pipe(B(i=>W(i.map(o=>o.gridHighlight$))),U(i=>i.flat()),Le(1));return e.pipe(U(i=>i.map(o=>{n.next(void 0);const a=fi(o).pipe(F(n),Le(1)),s=W({computedData:t.computedData$,gridIndex:a}).pipe(F(n),U(_=>_.computedData[_.gridIndex]??_.computedData[0])),u=W({fullDataFormatter:t.fullDataFormatter$,gridIndex:a}).pipe(F(n),U(_=>{const w=_.fullDataFormatter.gridList[0];return{type:"grid",grid:{..._.fullDataFormatter.gridList[_.gridIndex]??w},container:{..._.fullDataFormatter.container}}})),c=W({multiGridEachDetail:t.multiGridEachDetail$,gridIndex:a}).pipe(F(n),B(async _=>_),U(_=>_.multiGridEachDetail[_.gridIndex]??_.multiGridEachDetail[0]),Le(1)),l=c.pipe(B(_=>_.isSeriesPositionSeprate$)),h=c.pipe(B(_=>_.gridContainer$)),f=c.pipe(B(_=>_.gridAxesTransform$)),d=c.pipe(B(_=>_.gridAxesReverseTransform$)),p=c.pipe(B(_=>_.gridAxesSize$)),g=c.pipe(B(_=>_.gridGraphicTransform$)),m=c.pipe(B(_=>_.gridGraphicReverseScale$)),y=c.pipe(B(_=>_.existSeriesLabels$)),x=c.pipe(B(_=>_.SeriesDataMap$)),v=c.pipe(B(_=>_.GroupDataMap$)),b=c.pipe(B(_=>_.visibleComputedData$));return{gridComputedData$:s,gridDataFormatter$:u,gridAxesTransform$:f,gridGraphicTransform$:g,gridGraphicReverseScale$:m,gridAxesReverseTransform$:d,gridAxesSize$:p,gridHighlight$:r,existSeriesLabels$:y,SeriesDataMap$:x,GroupDataMap$:v,visibleComputedData$:b,isSeriesPositionSeprate$:l,gridContainer$:h}})))},Eh="MultiBars",q2=ot(Eh,"grid"),zI=Ce(Eh,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]=Th(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$,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())}}),kh="MultiBarStack",j2=ot(kh,"grid"),OI=Ce(kh,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.${j2}`).data(s).join("g").attr("class",j2).each((u,c,l)=>{const h=V(l[c]);o[c]=v2(kh,{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())}}),Ch="MultiBarsTriangle",X2=ot(Ch,"grid"),UI=Ce(Ch,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.${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$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ih="MultiLines",V2=ot(Ih,"grid"),BI=Ce(Ih,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(Ih,{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())}}),Rh="MultiLineAreas",Z2=ot(Rh,"grid"),YI=Ce(Rh,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(Rh,{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())}}),Nh="MultiDots",K2=ot(Nh,"grid"),HI=Ce(Nh,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(Nh,{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())}}),Fh="MultiGroupAxis",Q2=ot(Fh,"grid"),WI=Ce(Fh,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(Fh,{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())}}),Gh="MultiValueAxis",J2=ot(Gh,"grid"),qI=Ce(Gh,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]=Lu(Gh,{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 jI=({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)}))},XI=({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)`}})),VI=({computedData$:t,fullDataFormatter$:e,fullChartParams$:n,layout$:r})=>W({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}=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}})}})),zh="OverlappingValueAxes",ex=ot(zh,"grid"),ZI=Ce(zh,H2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[],a=r.fullParams$.pipe(F(i),U(l=>l.gridIndexes[0])),s=r.fullParams$.pipe(F(i),U(l=>l.gridIndexes[1])),u=W({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"),{type:"grid",grid:{...h.gridList[l.secondGridIndex],valueAxis:{...h.gridList[l.secondGridIndex].valueAxis,position:f}},container:{...h.container}}}))));return fi(r).pipe(F(i),U(l=>({...l,fullParams$:l.fullParams$.pipe(U(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),B(l=>un(l)),U(l=>l.map((h,f)=>{if(f===0)return h;const d=jI({fullDataFormatter$:u,layout$:r.layout$}),p=XI({gridAxesTransform$:d}),g=VI({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]=Lu(zh,{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())}}),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},KI=ug("Container",nx)(({selection:t})=>function(){}),Oh="Tooltip",ix=ot(Oh,"g"),QI=ot(Oh,"box");function JI(t,e){const n=e.textSizePx*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 tR({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.${QI}`).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&&kC(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,x=a.offsetX+o.offset[0]>m?m-a.offsetX:o.offset[0],v=a.offsetY+o.offset[1]>y?y-a.offsetY:o.offset[1];h.attr("transform",b=>`translate(${x}, ${v})`),h.attr("transform",b=>`translate(${x}, ${v})`)}const eR=ug(Oh,rx)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new nt,s=o.event$.pipe(F(a),hi(g=>g.eventName==="mouseover"||g.eventName==="mousemove")),u=o.event$.pipe(F(a),hi(g=>g.eventName==="mouseout")),c=mA(i.fullChartParams$),l=W({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$,textSizePx:c}).pipe(F(a),B(async g=>g),U(g=>({backgroundColor:Et(g.fullParams.backgroundColorType,g.fullChartParams),backgroundOpacity:g.fullParams.backgroundOpacity,strokeColor:Et(g.fullParams.strokeColorType,g.fullChartParams),offset:g.fullParams.offset,padding:g.fullParams.padding,textSize:g.fullChartParams.styles.textSize,textSizePx:g.textSizePx,textColor:Et(g.fullParams.textColorType,g.fullChartParams)}))),h=W({fullParams:i.fullParams$,tooltipStyle:l}).pipe(F(a),B(async g=>g),U(g=>g.fullParams.svgRenderFn?g.fullParams.svgRenderFn:m=>{const y=g.fullParams.textRenderFn(m);return JI(y,g.tooltipStyle)})),f=W({event:s,contentRenderFn:h}).pipe(F(a),B(async g=>g),U(g=>g.contentRenderFn(g.event))),d=u.pipe(F(a),U(g=>"")),p=Wu(s,u).pipe(F(a),U(g=>g.event));return W({svgString:Wu(f,d),event:p,layout:i.layout$,tooltipStyle:l}).pipe(F(a),B(async g=>g)).subscribe(g=>{tR({rootSelection:e,pluginName:n,rootWidth:g.layout.rootWidth,rootHeight:g.layout.rootHeight,svgString:g.svgString,tooltipStyle:g.tooltipStyle,event:g.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 nR(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 x=" ";i&&(x="");for(let v=0,b=d.length;v<b;++v){const _=(g.text?g.text+x:"")+d[v],w=u(_);(m+w)/2<p?(g.width=m=w,g.text=_):(m=u(d[v]),g={width:m,text:d[v]},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,x=d[g].width/2;p=Math.max(p,Math.sqrt(x**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),x=h(y);let v=d.select("text");v.size()||(v=d.append("text")),v.attr("transform",`translate(0,0) scale(${n/x})`);const b=v.selectAll("tspan").data(y),_=b.enter().append("tspan").attr("x",0).merge(b).attr("y",(w,S)=>(S-y.length/2+.8)*r).text(w=>w.text);return b.exit().remove(),b.merge(_)}return f(t,e)}let sr;function rR(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 iR({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 oR({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=iR({data:a,bubbleGroupR:o,maxValue:s,avgValue:u}),l=i==="area"?.5:1,h=eu().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.attr("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(nR,{text:a.label,radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:l})}),o}function aR({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 sR(){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 uR({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(Ja).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const cR=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(di()).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=>{W({layout:n.layout$,computedData:n.computedData$,scaleType:u}).pipe(F(i),B(async f=>f)).subscribe(f=>{const d=oR({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 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=rR(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(sR()),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(U(h=>h.map(f=>f.id))),fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,layout:n.layout$}).pipe(F(i),B(async h=>h)).subscribe(h=>{uR({bubblesSelection:h.bubblesSelection,highlightIds:h.highlight,fullChartParams:h.fullChartParams}),h.fullParams.highlightRIncrease&&(aR({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",lR=ot(dx,"path");function fR({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 Uh(a,i.startAngle,i.endAngle,1)}:o=>Uh(n,i.startAngle,i.endAngle,o)}function Uh(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(lR,!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 hR({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(Ja).duration(500).attr("d",c=>i(c)):u.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",c=>r(c))})}const dR=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(di()).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=>{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=Pu({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=Pu({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 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,v=>v.data.id),m=g.enter(),y=g.exit();const x=fR({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",(v,b)=>_=>{u=x(_),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",(v,b)=>{u=Uh(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const _=px({selection:o,renderData:u,arc:p.arc});a.next(_),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}),_.on("mouseover",(w,S)=>{w.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:w,data:p.computedData})}).on("mousemove",(w,S)=>{w.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:w,data:p.computedData})}).on("mouseout",(w,S)=>{w.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:w,data:p.computedData})}).on("click",(w,S)=>{w.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:w,data:p.computedData})})})}),W({pathSelection:a,highlight:n.seriesHighlight$.pipe(U(p=>p.map(g=>g.id))),fullChartParams:n.fullChartParams$,arc:h,arcMouseover:f}).pipe(F(i),B(async p=>p)).subscribe(p=>{hR({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 Bh(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 Yh({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 pR=Di(gx,sx)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=t.append("g");let a;n.layout$.pipe(di()).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 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=Yh({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});Bh(o,f)}).on("end",(c,l)=>{const h=Yh({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});Bh(o,h),a&&a.unsubscribe(),a=r.event$.subscribe(f=>{const d=Yh({eventData:f,eventName:f.eventName,t:1,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});Bh(o,d)})})}),()=>{i.next(void 0)}}),yx="PieLabels",gR=ot(yx,"text");function mR(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 yR(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(gR,!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)=>Ah({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function bR({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 vR=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(di()).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=Pu({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerRadius,padAngle:0,cornerRadius:0}),l=Pu({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=mR(h,c,l,s.fullParams.labelCentroid);const f=yR(i,a,s.fullParams,s.fullChartParams);o.next(f)}),W({labelSelection:o,highlight:e.seriesHighlight$.pipe(U(s=>s.map(u=>u.id))),fullChartParams:e.fullChartParams$}).pipe(F(r),B(async s=>s)).subscribe(s=>{bR({labelSelection:s.labelSelection,ids:s.highlight,fullChartParams:s.fullChartParams})}),()=>{r.next(void 0)}}),bx="SeriesLegend",xR=Di(bx,cx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,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=Du(bx,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});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",_R=cg(_x,xx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,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=Du(_x,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),ur="TreeMap",wx=ot(ur,"tree"),$x=ot(ur,"tile");function wR({selection:t,treeData:e,fullParams:n,fullChartParams:r,textSizePx:i}){const o=i/2,a=i,s=t.selectAll(`g.${wx}`).data(e,u=>u.data.id).join("g").attr("class",wx);return s.attr("transform",u=>!u.x0||!u.y0?null:`translate(${u.x0},${u.y0})`).each((u,c,l)=>{const h=V(l[c]);h.selectAll(`rect.${$x}`).data([u],f=>f.data.id).join("rect").attr("id",f=>f.data.id).attr("class",$x).attr("cursor","pointer").attr("width",f=>f.x1-f.x0).attr("height",f=>f.y1-f.y0).attr("fill",f=>f.data.color).attr("data-name",f=>f.data.label).attr("data-category",f=>f.data.categoryLabel).attr("data-value",f=>f.data.value),h.selectAll("g").data([u]).join("g").each((f,d,p)=>{V(p[d]).selectAll("text").data([f]).join("text").text(m=>m.data.label).attr("dominant-baseline","hanging").attr("x",o).attr("y",o).attr("font-size",r.styles.textSize).each(function(m){const y=V(this),x=m.data.label.split(/\s+/).reverse();let v,b=[];const _=y.attr("x");let w=y.attr("y"),S=0,k=y.text(null).append("tspan").attr("cursor","pointer").attr("fill",Et(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",_).attr("y",w);for(;v=x.pop();)b.push(v),k.text(b.join(" ")),k.node().getComputedTextLength()>m.x1-m.x0-o&&(b.pop(),k.text(b.join(" ")),b=[v],S+=a,k=y.append("tspan").attr("cursor","pointer").attr("fill",Et(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",_).attr("y",w).attr("dy",S+"px").text(v))})})}),s}function $R({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 SR=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),U(u=>{const c=Dy().size([u.layout.width,u.layout.height]).paddingInner(u.fullParams.paddingInner).paddingOuter(u.fullParams.paddingOuter).round(!0).tile(zf.ratio(u.fullParams.squarifyRatio)),l=js(u.visibleComputedData).sum(f=>f.value).sort(u.fullParams.sort);return c(l),l.leaves()})),a=W({selection:fi(t),treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,textSizePx:r.textSizePx$}).pipe(F(i),B(async u=>u),U(u=>wR({selection:t,treeData:u.treeData,fullParams:u.fullParams,fullChartParams:u.fullChartParams,textSizePx:u.textSizePx}))),s=r.fullChartParams$.pipe(F(i),U(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(U(u=>u.map(c=>c.id))),fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u)).subscribe(u=>{$R({selection:u.cellSelection,ids:u.highlight,fullChartParams:u.fullChartParams})}),()=>{i.next(void 0)}});Z.BarStack=uI,Z.Bars=tI,Z.BarsDiverging=eI,Z.BarsTriangle=mI,Z.Bubbles=cR,Z.CONTAINER_PLUGIN_PARAMS=nx,Z.Container=KI,Z.DEFAULT_BARS_DIVERGING_PARAMS=Sx,Z.DEFAULT_BARS_PARAMS=Fo,Z.DEFAULT_BARS_TRIANGLE_PARAMS=Xh,Z.DEFAULT_BAR_STACK_PARAMS=jh,Z.DEFAULT_BUBBLES_PARAMS=ox,Z.DEFAULT_DOTS_PARAMS=Wh,Z.DEFAULT_GRID_LEGEND_PARAMS=Qh,Z.DEFAULT_GROUP_AREA_PARAMS=qh,Z.DEFAULT_GROUP_AXIS_PARAMS=Vh,Z.DEFAULT_LINES_PARAMS=cr,Z.DEFAULT_LINE_AREAS_PARAMS=Hh,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=Kh,Z.DEFAULT_SERIES_LEGEND_PARAMS=cx,Z.DEFAULT_TREE_LEGEND_PARAMS=xx,Z.DEFAULT_TREE_MAP_PARAMS=vx,Z.DEFAULT_VALUE_AXIS_PARAMS=Eu,Z.DEFAULT_VALUE_STACK_AXIS_PARAMS=Zh,Z.Dots=xI,Z.GridLegend=wI,Z.GroupAux=FI,Z.GroupAxis=SI,Z.LineAreas=jC,Z.Lines=OC,Z.MultiBarStack=OI,Z.MultiBars=zI,Z.MultiBarsTriangle=UI,Z.MultiDots=HI,Z.MultiGridLegend=GI,Z.MultiGroupAxis=WI,Z.MultiLineAreas=YI,Z.MultiLines=BI,Z.MultiValueAxis=qI,Z.OverlappingValueAxes=ZI,Z.Pie=dR,Z.PieEventTexts=pR,Z.PieLabels=vR,Z.ScalingArea=DI,Z.SeriesLegend=xR,Z.TOOLTIP_PARAMS=rx,Z.Tooltip=eR,Z.TreeLegend=_R,Z.TreeMap=SR,Z.ValueAxis=MI,Z.ValueStackAxis=TI,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
15
+ `})}function gR({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)=>{Z(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 mR({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)?Z(a[o]).style("opacity",1):Z(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const P2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,fullDataFormatter$:a,seriesLabels$:s,SeriesDataMap$:u,GroupDataMap$:c,fullParams$:l,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:y,event$:x})=>{const v=new ot,b=An(t,"clipPath-box"),$=st(t,"pathG"),_=st(t,"path"),{seriesSelection$:P,axesSelection$:T,defsSelection$:w,graphicGSelection$:D}=ui({selection:e,pluginName:t,clipPathID:b,seriesLabels$:s,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p});p.pipe(z(v),U(C=>-C.translate[1]/C.scale[1]));const S=o.pipe(U(C=>C.map(N=>N[0]?N[0].axisY-N[0].axisYFromZero:0)),it()),G=B({computedData:n,visibleComputedData:i,params:l,gridAxesSize:d,isSeriesSeprate:y}).pipe(z(v),Y(async C=>C),U(C=>C.params.barWidth?C.params.barWidth:C.isSeriesSeprate?M2({axisWidth:C.gridAxesSize.width,groupAmount:C.computedData[0]?C.computedData[0].length:0,barAmountOfGroup:1,barPadding:C.params.barPadding,barGroupPadding:C.params.barGroupPadding}):M2({axisWidth:C.gridAxesSize.width,groupAmount:C.computedData[0]?C.computedData[0].length:0,barAmountOfGroup:C.visibleComputedData.length,barPadding:C.params.barPadding,barGroupPadding:C.params.barGroupPadding}))),k=i.pipe(z(v),U(C=>{const N=new Set;return C.forEach(j=>{j.forEach(Q=>{N.add(Q.groupLabel)})}),Array.from(N)})),A=new ht(C=>{B({seriesLabels:s,barWidth:G,params:l}).pipe(z(v),Y(async N=>N)).subscribe(N=>{const j=lR(N.barWidth,N.seriesLabels,N.params);C.next(j)})}),L=h.pipe(z(v),U(C=>C.transitionDuration),it()),M=new ht(C=>{B({groupLabels:k,transitionDuration:L}).pipe(Y(async N=>N)).subscribe(N=>{const j=fR(N.groupLabels.length,N.transitionDuration);C.next(j)})}).pipe(z(v),it()),F=new ht(C=>{B({groupLabels:k,transitionDuration:L}).pipe(Y(async N=>N)).subscribe(N=>{const j=hR(N.groupLabels.length,N.transitionDuration);C.next(j)})}).pipe(z(v),it());B({defsSelection:w,gridAxesSize:d}).pipe(z(v),Y(async C=>C)).subscribe(C=>{const N=[{id:b,width:C.gridAxesSize.width,height:C.gridAxesSize.height}];gR({defsSelection:C.defsSelection,clipPathData:N})});const O=h.pipe(z(v),U(C=>C.highlightTarget),it()),E=s.pipe(z(v),U(C=>C.map((N,j)=>An(t,`lineargradient-${N}`)))),R=B({graphicGSelection:D,defsSelection:w,computedData:n,visibleComputedLayoutData:o,linearGradientIds:E,zeroYArr:S,groupLabels:k,barScale:A,params:l,chartParams:h,barWidth:G,delayGroup:M,transitionItem:F,isSeriesSeprate:y}).pipe(z(v),Y(async C=>C),U(C=>(dR({defsSelection:C.defsSelection,computedData:C.computedData,linearGradientIds:C.linearGradientIds,params:C.params}),pR({graphicGSelection:C.graphicGSelection,pathGClassName:$,pathClassName:_,visibleComputedLayoutData:C.visibleComputedLayoutData,linearGradientIds:C.linearGradientIds,zeroYArr:C.zeroYArr,groupLabels:C.groupLabels,barScale:C.barScale,params:C.params,chartParams:C.chartParams,barWidth:C.barWidth,delayGroup:C.delayGroup,transitionItem:C.transitionItem,isSeriesSeprate:C.isSeriesSeprate}))));return B({barSelection:R,computedData:n,highlightTarget:O,SeriesDataMap:u,GroupDataMap:c}).subscribe(C=>{C.barSelection.on("mouseover",(N,j)=>{N.stopPropagation(),x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:C.highlightTarget,datum:j,gridIndex:j.gridIndex,series:C.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:C.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:N,data:C.computedData})}).on("mousemove",(N,j)=>{N.stopPropagation(),x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:C.highlightTarget,datum:j,gridIndex:j.gridIndex,series:C.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:C.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:N,data:C.computedData})}).on("mouseout",(N,j)=>{N.stopPropagation(),x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:C.highlightTarget,datum:j,gridIndex:j.gridIndex,series:C.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:C.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:N,data:C.computedData})}).on("click",(N,j)=>{N.stopPropagation(),x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:C.highlightTarget,datum:j,gridIndex:j.gridIndex,series:C.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:C.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:N,data:C.computedData})})}),B({barSelection:R,highlight:g.pipe(U(C=>C.map(N=>N.id))),fullChartParams:h}).pipe(z(v),Y(async C=>C)).subscribe(C=>{mR({selection:C.barSelection,ids:C.highlight,fullChartParams:C.fullChartParams})}),()=>{v.next(void 0)}},D2="BarsTriangle",yR=se(D2,Qh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=r.fullDataFormatter$.pipe(z(i),U(s=>s.grid.separateSeries),it(),Pt(1)),a=P2(D2,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,fullDataFormatter$:r.fullDataFormatter$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:o,event$:n.event$});return()=>{i.next(void 0),a()}});function bR({graphicGSelection:t,circleGClassName:e,circleClassName:n,visibleComputedLayoutData: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)=>{Z(f[h]).selectAll("g").data(r[h],p=>p.id).join(p=>(u=s(p),p.append("g").classed(e,!0)),p=>p,p=>p.remove()).attr("transform",p=>`translate(${p.axisX}, ${p.axisY})`).each((p,d,g)=>{Z(g[d]).selectAll("circle").data([p]).join(m=>m.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((y,x)=>d*u).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,y)=>Mh({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>Mh({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 vR({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)?Z(a[o]).style("opacity",1).transition("highlight").duration(200):Z(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function xR({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)=>{Z(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 T2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:c,fullChartParams$:l,gridAxesTransform$:h,gridGraphicTransform$:f,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,event$:y})=>{const x=new ot,v=An(t,"clipPath-box"),b=st(t,"circleG"),$=st(t,"circle"),{seriesSelection$:_,axesSelection$:P,defsSelection$:T,graphicGSelection$:w}=ui({selection:e,pluginName:t,clipPathID:v,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:f}),D=B({computedData:n,gridGraphicReverseScale:p}).pipe(z(x),Y(async A=>A),U(A=>A.computedData.map((L,M)=>A.gridGraphicReverseScale[M])));B({defsSelection:T,gridAxesSize:d}).pipe(z(x),Y(async A=>A)).subscribe(A=>{const L=[{id:v,width:A.gridAxesSize.width,height:A.gridAxesSize.height}];xR({defsSelection:A.defsSelection,clipPathData:L})});const S=l.pipe(z(x),U(A=>A.highlightTarget),it()),G=B({graphicGSelection:w,visibleComputedLayoutData:o,graphicReverseScale:D,fullChartParams:l,fullParams:c}).pipe(z(x),Y(async A=>A),U(A=>bR({graphicGSelection:A.graphicGSelection,circleGClassName:b,circleClassName:$,visibleComputedLayoutData:A.visibleComputedLayoutData,fullParams:A.fullParams,fullChartParams:A.fullChartParams,graphicReverseScale:A.graphicReverseScale})));B({graphicSelection:G,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:S}).pipe(z(x),Y(async A=>A)).subscribe(A=>{A.graphicSelection.on("mouseover",(L,M)=>{L.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:A.highlightTarget,datum:M,gridIndex:M.gridIndex,series:A.SeriesDataMap.get(M.seriesLabel),seriesIndex:M.seriesIndex,seriesLabel:M.seriesLabel,groups:A.GroupDataMap.get(M.groupLabel),groupIndex:M.groupIndex,groupLabel:M.groupLabel,event:L,data:A.computedData})}).on("mousemove",(L,M)=>{L.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:A.highlightTarget,data:A.computedData,datum:M,gridIndex:M.gridIndex,series:A.SeriesDataMap.get(M.seriesLabel),seriesIndex:M.seriesIndex,seriesLabel:M.seriesLabel,groups:A.GroupDataMap.get(M.groupLabel),groupIndex:M.groupIndex,groupLabel:M.groupLabel,event:L})}).on("mouseout",(L,M)=>{L.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:A.highlightTarget,datum:M,gridIndex:M.gridIndex,series:A.SeriesDataMap.get(M.seriesLabel),seriesIndex:M.seriesIndex,seriesLabel:M.seriesLabel,groups:A.GroupDataMap.get(M.groupLabel),groupIndex:M.groupIndex,groupLabel:M.groupLabel,event:L,data:A.computedData})}).on("click",(L,M)=>{L.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:A.highlightTarget,datum:M,gridIndex:M.gridIndex,series:A.SeriesDataMap.get(M.seriesLabel),seriesIndex:M.seriesIndex,seriesLabel:M.seriesLabel,groups:A.GroupDataMap.get(M.groupLabel),groupIndex:M.groupIndex,groupLabel:M.groupLabel,event:L,data:A.computedData})})});const k=c.pipe(z(x),U(A=>A.onlyShowHighlighted),it());return l.pipe(z(x),Y(A=>B({graphicSelection:G,highlight:g.pipe(U(L=>L.map(M=>M.id))),onlyShowHighlighted:k,fullChartParams:l}).pipe(z(x),Y(async L=>L)))).subscribe(A=>{vR({selection:A.graphicSelection,ids:A.highlight,onlyShowHighlighted:A.onlyShowHighlighted,fullChartParams:A.fullChartParams})}),()=>{x.next(void 0)}},L2="Dots",_R=se(L2,Vh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=T2(L2,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,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$,gridContainerPosition$:r.gridContainerPosition$,event$:n.event$});return()=>{i.next(void 0),o()}}),wR={listRectWidth:14,listRectHeight:14,listRectRadius:0};function C2(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,textSizePx$:a})=>{const s=st(t,"root-position"),u=st(t,"legend-card"),c=st(t,"legend-list"),l=st(t,"legend-item"),h=new ot,f=B({seriesLabels:n,fullChartParams:o}).pipe(z(h),Y(async w=>w),U(w=>{const D=new Map;let S=0;return w.seriesLabels.forEach((G,k)=>{if(!D.has(G)){const A=C2(S,w.fullChartParams);D.set(G,A),S++}}),D})),p=n.pipe(z(h),U(w=>{const D=new Set;let S=[];return w.forEach(G=>{D.has(G)?S.push(!1):S.push(!0),D.add(G)}),S})),d=r.pipe(z(h),U(w=>w.position==="bottom"||w.position==="top"?"row":"column")),g=B({fullParams:r,layout:i}).pipe(z(h),Y(async w=>w),U(w=>{const D=w.fullParams.padding*2+w.fullParams.gap*2;return w.fullParams.position==="bottom"||w.fullParams.position==="top"?w.layout.rootWidth-D:w.layout.rootHeight-D})),y=B({layout:i,fullParams:r}).pipe(z(h),Y(async w=>w),U(w=>{let D=0,S=0;return w.fullParams.position==="bottom"?(S=w.layout.rootHeight,w.fullParams.justify==="start"?D=0:w.fullParams.justify==="center"?D=w.layout.rootWidth/2:w.fullParams.justify==="end"&&(D=w.layout.rootWidth)):w.fullParams.position==="right"?(D=w.layout.rootWidth,w.fullParams.justify==="start"?S=0:w.fullParams.justify==="center"?S=w.layout.rootHeight/2:w.fullParams.justify==="end"&&(S=w.layout.rootHeight)):w.fullParams.position==="top"?(S=0,w.fullParams.justify==="start"?D=0:w.fullParams.justify==="center"?D=w.layout.rootWidth/2:w.fullParams.justify==="end"&&(D=w.layout.rootWidth)):w.fullParams.position==="left"&&(D=0,w.fullParams.justify==="start"?S=0:w.fullParams.justify==="center"?S=w.layout.rootHeight/2:w.fullParams.justify==="end"&&(S=w.layout.rootHeight)),{x:D,y:S}})).pipe(z(h),U(w=>e.selectAll(`g.${s}`).data([w]).join(D=>D.append("g").classed(s,!0).attr("transform",S=>`translate(${S.x}, ${S.y})`),D=>D.transition().attr("transform",S=>`translate(${S.x}, ${S.y})`),D=>D.remove()))),x=r.pipe(z(h),U(w=>w.seriesList[0]?w.seriesList[0]:wR)),v=B({visibleList:p,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:d,lineMaxSize:g,defaultListStyle:x,SeriesLabelColorMap:f,textSizePx:a}).pipe(z(h),Y(async w=>w),U(w=>w.seriesLabels.reduce((D,S,G)=>{if(!w.visibleList[G])return D;const k=p2(S,w.textSizePx),A=w.textSizePx*1.5+k,L=w.SeriesLabelColorMap.get(S),M=D[0]&&D[0][0]?D[D.length-1][D[D.length-1].length-1]:null,{translateX:F,translateY:O,lineIndex:E,itemIndex:R}=((N,j,Q)=>{let I=0,X=0,q=0,V=0;if(N.lineDirection==="column"){let W=Q?Q.translateY+N.textSizePx+N.fullParams.gap:0;if(W+N.textSizePx>N.lineMaxSize){q=Q.lineIndex+1,V=0,X=0;const et=j[j.length-1].reduce((ut,H)=>H.itemWidth>ut?H.itemWidth:ut,0);I=Q.translateX+et+N.fullParams.gap}else q=Q?Q.lineIndex:0,V=Q?Q.itemIndex+1:0,X=W,I=Q?Q.translateX:0}else{let W=Q?Q.translateX+Q.itemWidth+N.fullParams.gap:0;W+A>N.lineMaxSize?(q=Q.lineIndex+1,V=0,I=0):(q=Q?Q.lineIndex:0,V=Q?Q.itemIndex+1:0,I=W),X=(N.textSizePx+N.fullParams.gap)*q}return{translateX:I,translateY:X,lineIndex:q,itemIndex:V}})(w,D,M);D[E]||(D[E]=[]);const C=w.fullParams.seriesList[R]?w.fullParams.seriesList[R]:w.defaultListStyle;return D[E].push({id:S,seriesLabel:S,seriesIndex:G,lineIndex:E,itemIndex:R,text:S,itemWidth:A,translateX:F,translateY:O,color:L,listRectWidth:C.listRectWidth,listRectHeight:C.listRectHeight,listRectRadius:C.listRectRadius}),D},[])),Pt(1)),b=B({fullParams:r,fullChartParams:o,lineDirection:d,lengendItems:v,textSizePx:a}).pipe(z(h),Y(async w=>w),U(w=>{const{width:D,height:S}=((G,k)=>{let A=0,L=0;if(!k.length||!k[0].length)return{width:A,height:L};const M=k[0][k[0].length-1];return G.lineDirection==="column"?(A=k.reduce((F,O)=>{const E=O.reduce((R,C)=>C.itemWidth>R?C.itemWidth:R,0);return F+E},0),A+=G.fullParams.gap*(k.length-1),L=M.translateY+G.textSizePx):(A=M.translateX+M.itemWidth,L=G.textSizePx*k.length+G.fullParams.gap*(k.length-1)),{width:A,height:L}})(w,w.lengendItems);return{direction:w.lineDirection,width:D,height:S,translateX:w.fullParams.gap,translateY:w.fullParams.gap}}),Pt(1)),$=B({fullParams:r,lengendList:b}).pipe(z(h),Y(async w=>w),U(w=>{const D=w.lengendList.width+w.fullParams.gap*2,S=w.lengendList.height+w.fullParams.gap*2;let G=0,k=0;return w.fullParams.position==="left"?w.fullParams.justify==="start"?(G=w.fullParams.padding,k=w.fullParams.padding):w.fullParams.justify==="center"?(G=w.fullParams.padding,k=-S/2):w.fullParams.justify==="end"&&(G=w.fullParams.padding,k=-S-w.fullParams.padding):w.fullParams.position==="right"?w.fullParams.justify==="start"?(G=-D-w.fullParams.padding,k=w.fullParams.padding):w.fullParams.justify==="center"?(G=-D-w.fullParams.padding,k=-S/2):w.fullParams.justify==="end"&&(G=-D-w.fullParams.padding,k=-S-w.fullParams.padding):w.fullParams.position==="top"?w.fullParams.justify==="start"?(G=w.fullParams.padding,k=w.fullParams.padding):w.fullParams.justify==="center"?(G=-D/2,k=w.fullParams.padding):w.fullParams.justify==="end"&&(G=-D-w.fullParams.padding,k=w.fullParams.padding):w.fullParams.justify==="start"?(G=w.fullParams.padding,k=-S-w.fullParams.padding):w.fullParams.justify==="center"?(G=-D/2,k=-S-w.fullParams.padding):w.fullParams.justify==="end"&&(G=-D-w.fullParams.padding,k=-S-w.fullParams.padding),{width:D,height:S,translateX:G,translateY:k}})),_=B({rootPositionSelection:y,fullParams:r,fullChartParams:o,legendCard:$}).pipe(z(h),Y(async w=>w),U(w=>w.rootPositionSelection.selectAll("g").data([w.legendCard]).join(D=>D.append("g").classed(u,!0).attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),D=>D.transition().attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),D=>D.remove()).each((D,S,G)=>{Z(G[S]).selectAll("rect").data([D]).join("rect").attr("width",k=>k.width).attr("height",k=>k.height).attr("fill",Et(w.fullParams.backgroundFill,w.fullChartParams)).attr("stroke",Et(w.fullParams.backgroundStroke,w.fullChartParams))}))),P=B({lengendCardSelection:_,fullParams:r,lengendList:b}).pipe(z(h),Y(async w=>w),U(w=>w.lengendCardSelection.selectAll("g").data([w.lengendList]).join(D=>D.append("g").classed(c,!0).attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),D=>D.transition().attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),D=>D.remove())));return B({lengendListSelection:P,fullParams:r,fullChartParams:o,lengendItems:v,textSizePx:a}).pipe(z(h),Y(async w=>w),U(w=>{const D=w.lengendItems[0]?w.lengendItems.flat():[];return w.lengendListSelection.selectAll(`g.${l}`).data(D).join(S=>S.append("g").classed(l,!0).attr("cursor","default"),S=>S,S=>S.remove()).attr("transform",(S,G)=>`translate(${S.translateX}, ${S.translateY})`).each((S,G,k)=>{const A=w.textSizePx/2,L=-S.listRectWidth/2,M=-S.listRectHeight/2;Z(k[G]).selectAll("rect").data([S]).join("rect").attr("x",A).attr("y",A).attr("width",F=>F.listRectWidth).attr("height",F=>F.listRectHeight).attr("transform",F=>`translate(${L}, ${M})`).attr("fill",F=>F.color).attr("rx",F=>F.listRectRadius),Z(k[G]).selectAll("text").data([S]).join(F=>F.append("text").attr("dominant-baseline","hanging"),F=>F,F=>F.remove()).attr("x",w.textSizePx*1.5).attr("font-size",w.fullChartParams.styles.textSize).attr("fill",F=>w.fullParams.textColorType==="series"?C2(F.seriesIndex,w.fullChartParams):Et(w.fullParams.textColorType,w.fullChartParams)).text(F=>F.text)})})).subscribe(),()=>{h.next(void 0)}},E2="GridLegend",$R=se(E2,np)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new ot,o=n.SeriesDataMap$.pipe(z(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(z(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Pu(E2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),Th=6;function SR({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((d,g,m)=>{Z(m[g]).selectAll("text").data([d]).join(y=>y.append("text").style("font-weight","bold"),y=>y,y=>y.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).attr("font-size",u.styles.textSize).style("fill",Et(r.labelColorType,u)).style("transform",l).text(y=>s.grid.groupAxis.label)}).attr("transform",d=>`translate(${a.width+d.tickPadding+r.labelOffset[0]}, ${-d.tickPadding-Th-r.labelOffset[1]})`);const f=Ug(c).scale(c).tickSize(r.tickFullLine==!0?-a.height:Th).tickSizeOuter(0).tickFormat(d=>Ah(d,r.tickFormat)).tickPadding(r.tickPadding),p=h.transition().duration(100).call(f);return p.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Et(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),p.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Et(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),h.selectAll("text").attr("font-size",u.styles.textSize).style("color",Et(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`0 -${r.tickPadding+Th}`).style("transform",l),h}const k2=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:c,isSeriesSeprate$:l})=>{const h=new ot,f=st(t,"container"),p=st(t,"xAxisG"),d=st(t,"xAxis"),g=st(t,"groupingLabel"),m=B({computedData:n.pipe(it((_,P)=>_.length===P.length)),isSeriesSeprate:l}).pipe(z(h),Y(async _=>_),U(_=>_.isSeriesSeprate?_.computedData:[_.computedData[0]]),U((_,P)=>e.selectAll(`g.${f}`).data(_,T=>T[0]?T[0].seriesIndex:P).join("g").classed(f,!0))),y=m.pipe(z(h),U((_,P)=>_.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));B({containerSelection:m,gridContainerPosition:c}).pipe(z(h),Y(async _=>_)).subscribe(_=>{_.containerSelection.attr("transform",(P,T)=>{const w=_.gridContainerPosition[T]??_.gridContainerPosition[0],D=w.translate,S=w.scale;return`translate(${D[0]}, ${D[1]}) scale(${S[0]}, ${S[1]})`})}),B({axisSelection:y,gridAxesTransform:a}).pipe(z(h),Y(async _=>_)).subscribe(_=>{_.axisSelection.style("transform",_.gridAxesTransform.value)});const x=B({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:c}).pipe(z(h),Y(async _=>_),U(_=>{const P=`translate(${_.gridAxesReverseTransform.translate[0]}px, ${_.gridAxesReverseTransform.translate[1]}px)`,T=`rotate(${_.gridAxesReverseTransform.rotate}deg) rotateX(${_.gridAxesReverseTransform.rotateX}deg) rotateY(${_.gridAxesReverseTransform.rotateY}deg)`,w=`scale(${1/_.gridContainerPosition[0].scale[0]}, ${1/_.gridContainerPosition[0].scale[1]})`,S=`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`${P} ${T} ${w} ${S}`}),it()),v=new ht(_=>{B({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(z(h),Y(async P=>P)).subscribe(P=>{const w=P.computedData[0]?P.computedData[0].length-1:0,D=P.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-P.fullDataFormatter.grid.groupAxis.scalePadding:P.fullDataFormatter.grid.groupAxis.scaleDomain[0]-P.fullDataFormatter.grid.groupAxis.scalePadding,S=P.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?w+P.fullDataFormatter.grid.groupAxis.scalePadding:P.fullDataFormatter.grid.groupAxis.scaleDomain[1]+P.fullDataFormatter.grid.groupAxis.scalePadding,G=P.computedData[0]?P.computedData[0].length:0;let k=(P.computedData[0]??[]).map(F=>F.groupLabel);const A=new Array(G).fill(0).map((F,O)=>k[O]!=null?k[O]:String(O)).filter((F,O)=>O>=D&&O<=S),L=P.fullDataFormatter.grid.groupAxis.scalePadding,M=fg({axisLabels:A,axisWidth:P.gridAxesSize.width,padding:L});_.next(M)})}),b=B({fullDataFormatter:i,fullParams:r}).pipe(z(h),Y(async _=>_),U(_=>{let P="middle",T="hanging";return _.fullDataFormatter.grid.groupAxis.position==="bottom"?(P=_.fullParams.tickTextRotate?"end":"middle",T="hanging"):_.fullDataFormatter.grid.groupAxis.position==="top"?(P=_.fullParams.tickTextRotate?"end":"middle",T="auto"):_.fullDataFormatter.grid.groupAxis.position==="left"?(P="end",T="middle"):_.fullDataFormatter.grid.groupAxis.position==="right"&&(P="start",T="middle"),{textAnchor:P,dominantBaseline:T}})),$=i.pipe(z(h),U(_=>{let P="start",T="hanging";return _.grid.groupAxis.position==="bottom"?T="hanging":_.grid.groupAxis.position==="top"?T="auto":_.grid.groupAxis.position==="left"?P="end":_.grid.groupAxis.position==="right"&&(P="start"),_.grid.valueAxis.position==="left"?P="start":_.grid.valueAxis.position==="right"?P="end":_.grid.valueAxis.position==="bottom"?T="auto":_.grid.valueAxis.position==="top"&&(T="hanging"),{textAnchor:P,dominantBaseline:T}}));return B({axisSelection:y,params:r,tickTextAlign:b,axisLabelAlign:$,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:v,textTransform:x}).pipe(z(h),Y(async _=>_)).subscribe(_=>{SR({selection:_.axisSelection,xAxisClassName:d,groupingLabelClassName:g,params:_.params,tickTextAlign:_.tickTextAlign,axisLabelAlign:_.axisLabelAlign,gridAxesSize:_.gridAxesSize,fullDataFormatter:_.fullDataFormatter,chartParams:_.chartParams,groupScale:_.groupScale,textTransform:_.textTransform})}),()=>{h.next(void 0)}},R2="GroupAxis",AR=se(R2,Jh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=n.fullDataFormatter$.pipe(z(i),U(s=>s.grid.separateSeries),it(),Pt(1)),a=k2(R2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:o});return()=>{i.next(void 0),a()}}),I2=6;function MR({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,x,v)=>{Z(v[x]).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).attr("font-size",u.styles.textSize).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 p=h[1]-h[0],d=Bg(c).scale(c).ticks(p>r.ticks?r.ticks:h[0]===0&&h[1]===0?1:Math.ceil(p)).tickFormat(y=>Ah(y,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:I2).tickPadding(r.tickPadding),g=f.transition().duration(100).call(d);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").attr("font-size",u.styles.textSize).style("color",Et(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`-${r.tickPadding+I2} 0`).style("transform",l),f}const Du=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:c,isSeriesSeprate$:l})=>{const h=new ot,f=st(t,"container"),p=st(t,"yAxisG"),d=st(t,"yAxis"),g=st(t,"text"),m=B({computedData:n.pipe(it((P,T)=>P.length===T.length)),isSeriesSeprate:l}).pipe(z(h),Y(async P=>P),U(P=>P.isSeriesSeprate?P.computedData:[P.computedData[0]]),U((P,T)=>e.selectAll(`g.${f}`).data(P,w=>w[0]?w[0].seriesIndex:T).join("g").classed(f,!0))),y=m.pipe(z(h),U((P,T)=>P.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));B({containerSelection:m,gridContainerPosition:c}).pipe(z(h),Y(async P=>P)).subscribe(P=>{P.containerSelection.attr("transform",(T,w)=>{const D=P.gridContainerPosition[w]??P.gridContainerPosition[0],S=D.translate,G=D.scale;return`translate(${S[0]}, ${S[1]}) scale(${G[0]}, ${G[1]})`})}),B({axisSelection:y,gridAxesTransform:a}).pipe(z(h),Y(async P=>P)).subscribe(P=>{P.axisSelection.style("transform",P.gridAxesTransform.value)});const x=B({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:c}).pipe(z(h),Y(async P=>P),U(P=>{const T=`translate(${P.gridAxesReverseTransform.translate[0]}px, ${P.gridAxesReverseTransform.translate[1]}px)`,w=`rotate(${P.gridAxesReverseTransform.rotate}deg) rotateX(${P.gridAxesReverseTransform.rotateX}deg) rotateY(${P.gridAxesReverseTransform.rotateY}deg)`,D=`scale(${1/P.gridContainerPosition[0].scale[0]}, ${1/P.gridContainerPosition[0].scale[1]})`,G=`rotate(${P.fullDataFormatter.grid.groupAxis.position==="left"&&P.fullDataFormatter.grid.valueAxis.position==="top"||P.fullDataFormatter.grid.groupAxis.position==="right"&&P.fullDataFormatter.grid.valueAxis.position==="bottom"?P.fullParams.tickTextRotate+180:P.fullParams.tickTextRotate}deg)`;return`${T} ${w} ${D} ${G}`}),it()),v=new ht(P=>{B({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(z(h),Y(async T=>T)).subscribe(T=>{const D=T.computedData[0]?T.computedData[0].length-1:0,S=T.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-T.fullDataFormatter.grid.groupAxis.scalePadding:T.fullDataFormatter.grid.groupAxis.scaleDomain[0]-T.fullDataFormatter.grid.groupAxis.scalePadding,G=T.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?D+T.fullDataFormatter.grid.groupAxis.scalePadding:T.fullDataFormatter.grid.groupAxis.scaleDomain[1]+T.fullDataFormatter.grid.groupAxis.scalePadding,k=T.computedData.map((L,M)=>L.filter((F,O)=>O>=S&&O<=G)),A=Ik(k.flat());P.next(A)})}),b=new ht(P=>{B({fullDataFormatter:i,gridAxesSize:u,minAndMax:v}).pipe(z(h),Y(async T=>T)).subscribe(T=>{const w=lg({maxValue:T.minAndMax[1],minValue:T.minAndMax[0],axisWidth:T.gridAxesSize.height,scaleDomain:T.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:T.fullDataFormatter.grid.valueAxis.scaleRange});P.next(w)})}),$=i.pipe(z(h),U(P=>{let T="start",w="hanging";return P.grid.valueAxis.position==="left"?(T="end",w="middle"):P.grid.valueAxis.position==="right"?(T="start",w="middle"):P.grid.valueAxis.position==="bottom"?(T="middle",w="hanging"):P.grid.valueAxis.position==="top"&&(T="middle",w="auto"),{textAnchor:T,dominantBaseline:w}})),_=i.pipe(z(h),U(P=>{let T="start",w="hanging";return P.grid.groupAxis.position==="bottom"?w="auto":P.grid.groupAxis.position==="top"?w="hanging":P.grid.groupAxis.position==="left"?T="start":P.grid.groupAxis.position==="right"&&(T="end"),P.grid.valueAxis.position==="left"?T="end":P.grid.valueAxis.position==="right"?T="start":P.grid.valueAxis.position==="bottom"?w="hanging":P.grid.valueAxis.position==="top"&&(w="auto"),{textAnchor:T,dominantBaseline:w}}));return B({axisSelection:y,fullParams:r,tickTextAlign:$,axisLabelAlign:_,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:b,textTransform:x,minAndMax:v}).pipe(z(h),Y(async P=>P)).subscribe(P=>{MR({selection:P.axisSelection,yAxisClassName:d,textClassName:g,fullParams:P.fullParams,tickTextAlign:P.tickTextAlign,axisLabelAlign:P.axisLabelAlign,gridAxesSize:P.gridAxesSize,fullDataFormatter:P.fullDataFormatter,fullChartParams:P.fullChartParams,valueScale:P.valueScale,textTransform:P.textTransform,minAndMax:P.minAndMax})}),()=>{h.next(void 0)}},N2="ValueAxis",PR=se(N2,Cu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=n.fullDataFormatter$.pipe(z(i),U(s=>s.grid.separateSeries),it(),Pt(1)),a=Du(N2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:o});return()=>{i.next(void 0),a()}}),F2="ValueStackAxis",DR=se(F2,tp)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=n.computedData$.pipe(z(i),U(u=>{const c=new Array(u[0]?u[0].length:0).fill(null).map((h,f)=>u.reduce((p,d)=>{if(d&&d[f]){const g=d[f].value==null||d[f].visible==!1?0:d[f].value;return p+g}return p},0));return u.map((h,f)=>h.map((p,d)=>({...p,value:c[d]})))})),a=n.fullDataFormatter$.pipe(z(i),U(u=>u.grid.separateSeries),it(),Pt(1)),s=Du(F2,{selection:t,computedData$:a.pipe(Y(u=>Lp(()=>u,n.computedData$,o))),fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:a});return()=>{i.next(void 0),s()}}),G2="ScalingArea",TR=st(G2,"rect"),LR=se(G2,ep)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new ot,a=e.insert("rect","g").classed(TR,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(z(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),it());return B({initGroupAxis:r.fullDataFormatter$.pipe(U(c=>c.grid.groupAxis),A_()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(z(o),Y(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,p=c.initGroupAxis.scaleDomain[1]==="auto"?h+c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[1]+c.initGroupAxis.scalePadding,g=lg({maxValue:c.groupMaxIndex,minValue:0,axisWidth:c.axisSize.width,scaleDomain:[f,p],scaleRange:[0,1]}).copy(),m=f2().on("zoom",function(x){const v=x.transform,b=P=>{const T=Math.round(P);return Math.min(h,Math.max(0,T))},$=c.fullDataFormatter.grid.groupAxis.position==="bottom"||c.fullDataFormatter.grid.groupAxis.position==="top"?v.rescaleX(g).domain().map(b):v.rescaleY(g).domain().map(b);$[0]<=0&&$[1]>=h?v.k<s.k&&(v.k=s.k,v.x=s.x,v.y=s.y):$[1]-$[0]<=1&&v.k>s.k&&(v.k=s.k,v.x=s.x,v.y=s.y),s.k=v.k,s.x=v.x,s.y=v.y;const _={...c.fullDataFormatter,grid:{...c.fullDataFormatter.grid,groupAxis:{...c.fullDataFormatter.grid.groupAxis,scaleDomain:$}}};i.dataFormatter$.next(_)});e.call(m)}),()=>{o.next(void 0),a.remove()}});function CR(t,e){let n=new ht(()=>{});return t.each(function(){const r=Wu(this,e);n=qu(n,r)}),n}const Lh="GroupAux",Ch=st(Lh,"label-box");function ER({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function kR({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=st(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 RR(t){t.selectAll("line").data([]).exit().remove()}function IR({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:Ah(t,n.labelTextFormat)}]:[]}function NR({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesReverseTransformValue:i,textSizePx:o}){const a=o+4,s=t.selectAll(`g.${Ch}`).data(e),u=s.enter().append("g").classed(Ch,!0).style("cursor","pointer"),c=u.merge(s);return u.attr("transform",(l,h)=>`translate(${l.x}, ${l.y})`),s.transition().duration(50).attr("transform",(l,h)=>`translate(${l.x}, ${l.y})`),s.exit().remove(),c.each((l,h,f)=>{const p=p2(l.text,o)+12,d=-p/2,g=Z(f[h]).selectAll("rect").data([l]),m=g.enter().append("rect").attr("height",`${a}px`).attr("fill",v=>Et(n.labelColorType,r)).attr("x",d).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");g.merge(m).attr("width",v=>`${p}px`).style("transform",i),g.exit().remove();const y=Z(f[h]).selectAll("text").data([l]),x=y.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");y.merge(x).text(v=>v.text).style("transform",i).attr("fill",v=>Et(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",d+6),y.exit().remove()}),c}function FR(t){t.selectAll(`g.${Ch}`).data([]).exit().remove()}const GR=se(Lh,Zh)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new ot,a=e.insert("rect","g").classed(st(Lh,"rect"),!0).attr("opacity",0),s=t.append("g");i.layout$.pipe(z(o)).subscribe(f=>{a.attr("width",f.rootWidth).attr("height",f.rootHeight)}),i.gridAxesTransform$.pipe(z(o),U(f=>f.value),it()).subscribe(f=>{s.style("transform",f)});const u=new ht(f=>{B({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(z(o),Y(async p=>p)).subscribe(p=>{const g=p.computedData[0]?p.computedData[0].length-1:0,m=p.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-p.fullDataFormatter.grid.groupAxis.scalePadding:p.fullDataFormatter.grid.groupAxis.scaleDomain[0]-p.fullDataFormatter.grid.groupAxis.scalePadding,y=p.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?g+p.fullDataFormatter.grid.groupAxis.scalePadding:p.fullDataFormatter.grid.groupAxis.scaleDomain[1]+p.fullDataFormatter.grid.groupAxis.scalePadding,x=p.computedData[0]?p.computedData[0].length:0;let v=p.fullDataFormatter.grid.seriesDirection==="row"?(p.computedData[0]??[]).map(P=>P.groupLabel):p.computedData.map(P=>P[0].groupLabel);const b=new Array(x).fill(0).map((P,T)=>v[T]!=null?v[T]:String(T)).filter((P,T)=>T>=m&&T<=y),$=p.fullDataFormatter.grid.groupAxis.scalePadding,_=fg({axisLabels:b,axisWidth:p.gridAxesSize.width,padding:$});f.next(_)})}),c=Ph({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),l=i.fullChartParams$.pipe(z(o),U(f=>f.highlightTarget),it());return B({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(z(o),Y(async f=>f)).subscribe(f=>{e.on("mouseover",(p,d)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(p);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:p,data:f.computedData})}).on("mousemove",(p,d)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(p);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:p,data:f.computedData})}).on("mouseout",(p,d)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(p);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:p,data:f.computedData})}).on("click",(p,d)=>{p.stopPropagation();const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(p);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:p,data:f.computedData})})}),B({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,textSizePx:i.textSizePx$}).pipe(z(o),Y(async f=>f)).subscribe(f=>{const p=f.groupScale(f.event.groupLabel)??0,d=ER({groupLabel:f.event.groupLabel,axisX:p,axisHeight:f.gridAxesSize.height,fullParams:f.fullParams});kR({selection:s,pluginName:n,lineData:d,fullParams:f.fullParams,fullChartParams:f.fullChartParams});const g=IR({groupLabel:f.event.groupLabel,axisX:p,fullParams:f.fullParams});NR({selection:s,labelData:g,fullParams:f.fullParams,fullChartParams:f.fullChartParams,gridAxesReverseTransformValue:f.gridAxesReverseTransform.value,textSizePx:f.textSizePx}).on("mouseover",(y,x)=>{const{groupIndex:v,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:v,groupLabel:b,event:y,data:f.computedData})}).on("mousemove",(y,x)=>{const{groupIndex:v,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:v,groupLabel:b,event:y,data:f.computedData})}).on("mouseout",(y,x)=>{const{groupIndex:v,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:v,groupLabel:b,event:y,data:f.computedData})}).on("click",(y,x)=>{const{groupIndex:v,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:v,groupLabel:b,event:y,data:f.computedData})})}),CR(a,"mouseout").pipe(z(o)).subscribe(f=>{console.log("rootMouseout"),RR(s),FR(s)}),()=>{o.next(void 0),a.remove()}}),z2={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"},O2={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]},U2={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]},B2={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},Y2={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},H2={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},W2={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},q2={lineCurve:"curveLinear",linearGradientOpacity:[1,0],gridIndexes:[1]},j2={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},X2={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]},V2="MultiGridLegend",zR=ke(V2,z2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new ot,o=n.multiGridEachDetail$.pipe(z(i),U(c=>c.map((h,f)=>h.SeriesDataMap$.pipe(U(p=>Array.from(p.keys()))))),Y(c=>B(c)),U(c=>c.flat())),a=B({fullParams:n.fullParams$,computedData:n.computedData$}).pipe(z(i),Y(async c=>c),U(c=>c.computedData.map((l,h)=>{const f=pc(c.fullParams.gridList[h]??{},{listRectWidth:c.fullParams.listRectWidth,listRectHeight:c.fullParams.listRectHeight,listRectRadius:c.fullParams.listRectRadius});return l.map(p=>f)}).flat())),s=B({fullParams:n.fullParams$,seriesList:a}).pipe(z(i),Y(async c=>c),U(c=>({...c.fullParams,seriesList:c.seriesList}))),u=Pu(V2,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),u()}}),un=t=>{const e=t.fullParams$.pipe(U(n=>n.gridIndexes),it(),Pt(1));return B({multiGridEachDetail:t.multiGridEachDetail$,gridIndexes:e}).pipe(U(n=>n.gridIndexes.map(r=>n.multiGridEachDetail[r]??n.multiGridEachDetail[0])))},Eh="MultiBars",Z2=st(Eh,"grid"),OR=ke(Eh,B2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,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=Z(l[c]),f=u.dataFormatter$.pipe(z(i),U(p=>p.grid.separateSeries),it(),Pt(1));o[c]=Dh(Eh,{selection:h,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,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$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:f,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),kh="MultiBarStack",K2=st(kh,"grid"),UR=ke(kh,Y2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,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=Z(l[c]),f=u.dataFormatter$.pipe(z(i),U(p=>p.grid.separateSeries),it(),Pt(1));o[c]=$2(kh,{selection:h,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:f,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Rh="MultiBarsTriangle",Q2=st(Rh,"grid"),BR=ke(Rh,H2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,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=Z(l[c]),f=u.dataFormatter$.pipe(z(i),U(p=>p.grid.separateSeries),it(),Pt(1));o[c]=P2(Rh,{selection:h,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,fullDataFormatter$:u.dataFormatter$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:f,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ih="MultiLines",J2=st(Ih,"grid"),YR=ke(Ih,W2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,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=Z(l[c]);o[c]=d2(Ih,{selection:h,computedData$:u.computedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedData$:u.visibleComputedData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullDataFormatter$:u.dataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Nh="MultiLineAreas",tx=st(Nh,"grid"),HR=ke(Nh,q2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${tx}`).data(s).join("g").attr("class",tx).each((u,c,l)=>{const h=Z(l[c]);o[c]=m2(Nh,{selection:h,computedData$:u.computedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedData$:u.visibleComputedData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullDataFormatter$:u.dataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,layout$:r.layout$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Fh="MultiDots",ex=st(Fh,"grid"),WR=ke(Fh,j2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${ex}`).data(s).join("g").attr("class",ex).each((u,c,l)=>{const h=Z(l[c]);o[c]=T2(Fh,{selection:h,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,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$,gridContainerPosition$:u.gridContainerPosition$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Gh="MultiGroupAxis",nx=st(Gh,"grid"),qR=ke(Gh,O2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${nx}`).data(s).join("g").attr("class",nx).each((u,c,l)=>{const h=Z(l[c]),f=u.dataFormatter$.pipe(z(i),U(p=>p.grid.separateSeries),it(),Pt(1));o[c]=k2(Gh,{selection:h,computedData$:u.computedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:f})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),zh="MultiValueAxis",rx=st(zh,"grid"),jR=ke(zh,U2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${rx}`).data(s).join("g").attr("class",rx).each((u,c,l)=>{const h=Z(l[c]),f=u.dataFormatter$.pipe(z(i),U(p=>p.grid.separateSeries),it(),Pt(1));o[c]=Du(zh,{selection:h,computedData$:u.computedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:f})})}),()=>{i.next(void 0),o.forEach(s=>s())}});function XR(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function ix(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:o}=e.rowAmount*e.columnAmount>=n?e:XR(n);return new Array(n).fill(null).map((a,s)=>{const u=s%o,c=Math.floor(s/o),l=(t.width-r*(o-1))/o,h=(t.height-r*(i-1))/i,f=u*l+u*r,p=c*h+c*r,d=[f,p],g=[l/t.width,h/t.height];return{slotIndex:s,rowIndex:c,columnIndex:u,translate:d,scale:g}})}const VR=({fullDataFormatter$:t,layout$:e})=>{const n=new ot;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 ht(i=>(B({fullDataFormatter:t,layout:e}).pipe(z(n),Y(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)}))},ZR=({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)`}})),KR=({computedData$:t,fullDataFormatter$:e,layout$:n})=>B({computedData:t,fullDataFormatter:e,layout:n}).pipe(Y(async i=>i),U(i=>i.fullDataFormatter.grid.separateSeries?ix(i.layout,i.fullDataFormatter.container,i.computedData.length):ix(i.layout,i.fullDataFormatter.container,1))),Oh="OverlappingValueAxes",ox=st(Oh,"grid"),QR=ke(Oh,X2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=[],a=r.fullParams$.pipe(z(i),U(l=>l.gridIndexes[0])),s=r.fullParams$.pipe(z(i),U(l=>l.gridIndexes[1])),u=B({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(z(i),Y(async l=>l),U(l=>{l.fullDataFormatter.gridList[l.secondGridIndex]||(l.fullDataFormatter.gridList[l.secondGridIndex]=Object.assign({},l.fullDataFormatter.gridList[l.firstGridIndex]));let h="";return l.fullDataFormatter.gridList[l.firstGridIndex].valueAxis.position==="left"?h="right":l.fullDataFormatter.gridList[l.firstGridIndex].valueAxis.position==="bottom"?h="top":l.fullDataFormatter.gridList[l.firstGridIndex].valueAxis.position==="top"?h="bottom":l.fullDataFormatter.gridList[l.firstGridIndex].valueAxis.position==="right"&&(h="left"),{type:"grid",visibleFilter:l.fullDataFormatter.visibleFilter,grid:{...l.fullDataFormatter.gridList[l.secondGridIndex],valueAxis:{...l.fullDataFormatter.gridList[l.secondGridIndex].valueAxis,position:h}},container:{...l.fullDataFormatter.container}}}));return Yu(r).pipe(z(i),U(l=>({...l,fullParams$:l.fullParams$.pipe(U(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),Y(l=>un(l)),U(l=>l.map((h,f)=>{if(f===0)return h;const p=VR({fullDataFormatter$:u,layout$:r.layout$}),d=ZR({gridAxesTransform$:p}),g=KR({computedData$:h.computedData$,fullDataFormatter$:u,layout$:r.layout$});return{...h,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).subscribe(l=>{o.forEach(h=>h()),t.selectAll(`g.${ox}`).data(l).join("g").attr("class",ox).each((h,f,p)=>{if(f>1)return;const d=Z(p[f]),g=h.dataFormatter$.pipe(z(i),U(m=>m.grid.separateSeries),it(),Pt(1));o[f]=Du(Oh,{selection:d,computedData$:h.computedData$,fullParams$:r.fullParams$.pipe(U(m=>f===0?m.firstAxis:m.secondAxis)),fullDataFormatter$:h.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:h.gridAxesTransform$,gridAxesReverseTransform$:h.gridAxesReverseTransform$,gridAxesSize$:h.gridAxesSize$,gridContainerPosition$:h.gridContainerPosition$,isSeriesSeprate$:g})})}),()=>{i.next(void 0),o.forEach(l=>l())}}),ax={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},sx={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.filter(i=>i.visible==!0).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.filter(i=>i.visible==!0).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.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}return[]},svgRenderFn:null},JR=hg("Container",ax)(({selection:t})=>function(){}),Uh="Tooltip",ux=st(Uh,"g"),tI=st(Uh,"box");function eI(t,e){const n=e.textSizePx*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 nI({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.${ux}`).data(u).join(b=>b.append("g").classed(ux,!0).attr("pointer-events","none"),b=>b,b=>b.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${tI}`).data(c).join(b=>b.append("g").classed(st(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),p=h.selectAll("g").data(u).join(b=>b.append("g").classed(st(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));u.length&&kk(p,u[0]);const d=p!=null&&p.node()?h2(p):{width:0,height:0};f.attr("width",d.width+o.padding*2).attr("height",d.height+o.padding*2);const g=h!=null&&h.node()?h2(h):{width:0,height:0},m=n-g.width,y=r-g.height,x=a.offsetX+o.offset[0]>m?m-a.offsetX:o.offset[0],v=a.offsetY+o.offset[1]>y?y-a.offsetY:o.offset[1];h.attr("transform",b=>`translate(${x}, ${v})`),h.attr("transform",b=>`translate(${x}, ${v})`)}const rI=hg(Uh,sx)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new ot,s=o.event$.pipe(z(a),fi(g=>g.eventName==="mouseover"||g.eventName==="mousemove")),u=o.event$.pipe(z(a),fi(g=>g.eventName==="mouseout")),c=yA(i.fullChartParams$),l=B({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$,textSizePx:c}).pipe(z(a),Y(async g=>g),U(g=>({backgroundColor:Et(g.fullParams.backgroundColorType,g.fullChartParams),backgroundOpacity:g.fullParams.backgroundOpacity,strokeColor:Et(g.fullParams.strokeColorType,g.fullChartParams),offset:g.fullParams.offset,padding:g.fullParams.padding,textSize:g.fullChartParams.styles.textSize,textSizePx:g.textSizePx,textColor:Et(g.fullParams.textColorType,g.fullChartParams)}))),h=B({fullParams:i.fullParams$,tooltipStyle:l}).pipe(z(a),Y(async g=>g),U(g=>g.fullParams.svgRenderFn?g.fullParams.svgRenderFn:m=>{const y=g.fullParams.textRenderFn(m);return eI(y,g.tooltipStyle)})),f=B({event:s,contentRenderFn:h}).pipe(z(a),Y(async g=>g),U(g=>g.contentRenderFn(g.event))),p=u.pipe(z(a),U(g=>"")),d=qu(s,u).pipe(z(a),U(g=>g.event));return B({svgString:qu(f,p),event:d,layout:i.layout$,tooltipStyle:l}).pipe(z(a),Y(async g=>g)).subscribe(g=>{nI({rootSelection:e,pluginName:n,rootWidth:g.layout.rootWidth,rootHeight:g.layout.rootHeight,svgString:g.svgString,tooltipStyle:g.tooltipStyle,event:g.event})}),function(){a.next(void 0)}}),cx={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,bubbleScaleType:"area"},lx={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},fx={eventFn:(t,e,n)=>e==="mouseover"||e==="mousemove"?[String(t.datum.value)]:[String(Math.round(t.data.reduce((r,i)=>r+i.reduce((o,a)=>o+(a.value??0),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"}]},hx={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)},px={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};function iI(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(p){let d;return i?d=p.split(""):d=p.split(/\s+/g),d[d.length-1]||d.pop(),d[0]||d.shift(),d}function s(p,d){return p&&d&&p.length>d&&(p=p.substring(0,d)+"..."),p}function u(p){var g;const d=document.createElement("canvas").getContext("2d");return((g=d==null?void 0:d.measureText(p))==null?void 0:g.width)??0}function c(p){const d=u(p.trim());return Math.sqrt(d*r)}function l(p,d){let g={width:0,text:""},m=1/0;const y=[];let x=" ";i&&(x="");for(let v=0,b=p.length;v<b;++v){const $=(g.text?g.text+x:"")+p[v],_=u($);(m+_)/2<d?(g.width=m=_,g.text=$):(m=u(p[v]),g={width:m,text:p[v]},y.push(g))}return y}function h(p){let d=0;for(let g=0,m=p.length;g<m;++g){const y=(Math.abs(g-m/2+.5)+.5)*r,x=p[g].width/2;d=Math.max(d,Math.sqrt(x**2+y**2))}return d}function f(p,d){o>0&&(d=s(d,o));const g=a(d),m=c(d),y=l(g,m),x=h(y);let v=p.select("text");v.size()||(v=p.append("text")),v.attr("transform",`translate(0,0) scale(${n/x})`);const b=v.selectAll("tspan").data(y),$=b.enter().append("tspan").attr("x",0).merge(b).attr("y",(_,P)=>(P-y.length/2+.8)*r).text(_=>_.text);return b.exit().remove(),b.merge($)}return f(t,e)}let ar;function oI(t,e){return Om().velocityDecay(e.force.velocityDecay).force("collision",Fm().radius(n=>n.r+e.force.collisionSpacing)).force("charge",Um().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function aI({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 sI({data:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,SeriesContainerPositionMap:i,scaleType:o}){const a=Math.min(n,r)/2,s=t.flat().filter(d=>d.value!=null&&d.visible!=!1),u=Math.max(...s.map(d=>d.value)),c=s.reduce((d,g)=>d+(g.value??0),0)/s.length,l=aI({data:s,bubbleGroupR:a,maxValue:u,avgValue:c}),h=o==="area"?.5:1,f=Js().domain([0,u]).range([0,l]).exponent(h);return s.map(d=>{const g=d,m=e.get(d.id);if(m)g.x=m.x,g.y=m.y;else{const x=i.get(g.seriesLabel);g.x=Math.random()*x.width,g.y=Math.random()*x.height}const y=f(g.value??0);return g.r=y,g._originR=y,g})}function dx({graphicSelection:t,bubblesData:e,fullParams:n,sumSeries:r}){const i=t.selectAll("g").data(e,a=>a.id).join(a=>{const s=a.append("g").attr("cursor","pointer").attr("font-size",12).style("fill","#ffffff").attr("text-anchor","middle");return s.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",u=>u.color),s.append("text").style("opacity",.8).attr("pointer-events","none"),s},a=>a,a=>a.remove()).attr("transform",a=>`translate(${a.x},${a.y})`),o=r?"seriesLabel":"label";return i.select("circle").transition().duration(200).attr("r",a=>a.r).attr("fill",a=>a.color),i.each((a,s,u)=>{const c=Z(u[s]);let l=!0;a[o].length<=n.bubbleText.lineLengthMin&&(l=!1),c.call(iI,{text:a[o],radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:l})}),i}function uI({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 cI(){return t0().on("start",(t,e)=>{t.active||ar.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||ar.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function gx({fullParams:t,SeriesContainerPositionMap:e}){ar.force("x",Bm().strength(t.force.strength).x(n=>e.get(n.seriesLabel).centerX)).force("y",Ym().strength(t.force.strength).y(n=>e.get(n.seriesLabel).centerY)),ar.alpha(1).restart()}function lI({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=Z(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(Ka).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const fI=Pi("Bubbles",cx)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,o=t.append("g");let a=new Map;const s=n.fullDataFormatter$.pipe(U(f=>f.sumSeries),it()),u=n.fullParams$.pipe(z(i),U(f=>f.bubbleScaleType),it()),c=new ht(f=>{B({layout:n.layout$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,visibleComputedLayoutData:n.visibleComputedLayoutData$,scaleType:u}).pipe(z(i),Y(async p=>p)).subscribe(p=>{const d=sI({data:p.visibleComputedLayoutData,LastBubbleDataMap:a,graphicWidth:p.layout.width,graphicHeight:p.layout.height,SeriesContainerPositionMap:p.SeriesContainerPositionMap,scaleType:p.scaleType});f.next(d)})});c.subscribe(f=>{a=new Map(f.map(p=>[p.id,p]))});const l=n.fullChartParams$.pipe(z(i),U(f=>f.highlightTarget),it()),h=B({bubblesData:c,fullParams:n.fullParams$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,sumSeries:s}).pipe(z(i),Y(async f=>f),U(f=>{const p=dx({graphicSelection:o,bubblesData:f.bubblesData,fullParams:f.fullParams,sumSeries:f.sumSeries});return ar=oI(p,f.fullParams),ar.nodes(f.bubblesData),gx({fullParams:f.fullParams,SeriesContainerPositionMap:f.SeriesContainerPositionMap}),p}));return B({bubblesSelection:h,layout:n.layout$,computedData:n.computedData$,bubblesData:c,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:l,SeriesContainerPositionMap:n.SeriesContainerPositionMap$}).pipe(z(i),Y(async f=>f)).subscribe(f=>{f.bubblesSelection.on("mouseover",(p,d)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:f.highlightTarget,datum:d,series:f.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:f.computedData})}).on("mousemove",(p,d)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:f.highlightTarget,datum:d,series:f.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:f.computedData})}).on("mouseout",(p,d)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:f.highlightTarget,datum:d,series:f.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:f.computedData})}).on("click",(p,d)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:f.highlightTarget,datum:d,series:f.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:f.computedData})}).call(cI())}),B({bubblesSelection:h,bubblesData:c,highlight:n.seriesHighlight$.pipe(U(f=>f.map(p=>p.id))),fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,sumSeries:s,SeriesContainerPositionMap:n.SeriesContainerPositionMap$}).pipe(z(i),Y(async f=>f)).subscribe(f=>{lI({bubblesSelection:f.bubblesSelection,highlightIds:f.highlight,fullChartParams:f.fullChartParams}),f.fullParams.highlightRIncrease&&(uI({data:f.bubblesData,highlightRIncrease:f.fullParams.highlightRIncrease,highlightIds:f.highlight}),dx({graphicSelection:o,bubblesData:f.bubblesData,fullParams:f.fullParams,sumSeries:f.sumSeries})),gx({fullParams:f.fullParams,SeriesContainerPositionMap:f.SeriesContainerPositionMap}),ar.nodes(f.bubblesData)}),()=>{i.next(void 0)}});function mx({data:t,startAngle:e,endAngle:n}){return Sv().startAngle(e).endAngle(n).value(o=>o.visible==!1?0:o.value).sort((o,a)=>o.seq-a.seq)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}function hI({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r}){const i=st(e,"series");return B({seriesLabels:r,separateSeries:n}).pipe(Y(async o=>o),U((o,a)=>{const s=o.separateSeries?o.seriesLabels:[o.seriesLabels.join("")];return t.selectAll(`g.${i}`).data(s,u=>u).join(u=>u.append("g").classed(i,!0),u=>u,u=>u.remove())}),Pt(1))}const Bh=({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r,seriesContainerPosition$:i})=>{const o=hI({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r});return B({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(Y(async a=>a),it((a,s)=>a.seriesContainerPosition.length===s.seriesContainerPosition.length)).subscribe(a=>{a.seriesCenterSelection.attr("transform",(s,u)=>{const c=a.seriesContainerPosition[u]??a.seriesContainerPosition[0];return`translate(${c.centerX}, ${c.centerY})`})}),B({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(Y(async a=>a)).subscribe(a=>{a.seriesCenterSelection.transition().attr("transform",(s,u)=>{const c=a.seriesContainerPosition[u]??a.seriesContainerPosition[0];return`translate(${c.centerX}, ${c.centerY})`})}),{seriesCenterSelection$:o}},Yh="Pie";function pI({enter:t,exit:e,data:n,lastTweenData: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 Hh(a,i.startAngle,i.endAngle,1)}:o=>Hh(n,i.startAngle,i.endAngle,o)}function Hh(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 Wh({selection:t,data:e,arc:n,pathClassName:r}){return t.selectAll("path").data(e,o=>o.id).join("path").classed(r,!0).style("cursor","pointer").attr("fill",(o,a)=>o.data.color).attr("d",(o,a)=>n(o))}function dI({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=Z(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(Ka).duration(500).attr("d",c=>i(c)):u.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",c=>r(c))})}function gI(t,e){const n=new ot,r=st(t,"path");let i=[],o=[];const a=e.seriesContainerPosition$.pipe(z(n),U(f=>f.width<f.height?f.width:f.height)),s=new ht(f=>{B({containerComputedLayoutData:e.containerComputedLayoutData$,fullParams:e.fullParams$}).pipe(z(n),Y(async p=>p)).subscribe(p=>{const d=mx({data:p.containerComputedLayoutData,startAngle:p.fullParams.startAngle,endAngle:p.fullParams.endAngle});f.next(d)})}),u=new ht(f=>{B({shorterSideWith:a,fullParams:e.fullParams$}).pipe(z(n),Y(async p=>p)).subscribe(p=>{const d=Mu({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerRadius,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});f.next(d)})}),c=new ht(f=>{B({shorterSideWith:a,fullParams:e.fullParams$}).pipe(z(n),Y(async p=>p)).subscribe(p=>{const d=Mu({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerMouseoverRadius,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});f.next(d)})}),l=e.fullChartParams$.pipe(z(n),U(f=>f.highlightTarget),it()),h=new ht(f=>{B({pieData:s,arc:u,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:l}).pipe(z(n),Y(async p=>p)).subscribe(p=>{e.containerSelection.interrupt("graphicMove");let d=e.containerSelection.selectAll("path").data(p.pieData,x=>x.id),g=d.enter(),m=d.exit();const y=pI({enter:g,exit:m,data:p.pieData,lastTweenData:i,fullParams:p.fullParams});if(g.transition("graphicMove").duration(p.fullChartParams.transitionDuration).ease(si(p.fullChartParams.transitionEase)).tween("move",(x,v)=>b=>{o=y(b),Wh({selection:e.containerSelection,data:o,arc:p.arc,pathClassName:r}),e.event$.next({type:"series",pluginName:t,eventName:"transitionMove",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData})}).on("end",(x,v)=>{o=Hh(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const b=Wh({selection:e.containerSelection,data:o,arc:p.arc,pathClassName:r});f.next(b),i=Object.assign([],p.pieData),e.event$.next({type:"series",pluginName:t,eventName:"transitionEnd",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData})}),!g.size()&&d.size()>0){const x=Wh({selection:e.containerSelection,data:p.pieData,arc:p.arc,pathClassName:r});f.next(x)}})});return B({pathSelection:h,SeriesDataMap:e.SeriesDataMap$,computedData:e.computedData$,highlightTarget:l}).pipe(z(n),Y(async f=>f)).subscribe(f=>{f.pathSelection.on("mouseover",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mouseover",pluginName:t,highlightTarget:f.highlightTarget,datum:d.data,series:f.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:f.computedData})}).on("mousemove",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mousemove",pluginName:t,highlightTarget:f.highlightTarget,datum:d.data,series:f.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:f.computedData})}).on("mouseout",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mouseout",pluginName:t,highlightTarget:f.highlightTarget,datum:d.data,series:f.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:f.computedData})}).on("click",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"click",pluginName:t,highlightTarget:f.highlightTarget,datum:d.data,series:f.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:f.computedData})})}),B({pathSelection:h,highlight:e.seriesHighlight$.pipe(U(f=>f.map(p=>p.id))),fullChartParams:e.fullChartParams$,arc:u,arcMouseover:c}).pipe(z(n),Y(async f=>f)).subscribe(f=>{dI({pathSelection:f.pathSelection,ids:f.highlight,fullChartParams:f.fullChartParams,arc:f.arc,arcMouseover:f.arcMouseover})}),()=>{n.next(void 0)}}const mI=Pi(Yh,lx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,{seriesCenterSelection$:o}=Bh({selection:t,pluginName:Yh,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return r.fullParams$.subscribe(),o.subscribe(s=>{a.forEach(u=>u()),s.each((u,c,l)=>{const h=Z(l[c]),f=r.computedLayoutData$.pipe(z(i),U(d=>d[c]??d[0])),p=r.seriesContainerPosition$.pipe(z(i),U(d=>d[c]??d[0]));a[c]=gI(Yh,{containerSelection:h,computedData$:r.computedData$,containerComputedLayoutData$:f,SeriesDataMap$:r.SeriesDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,seriesHighlight$:r.seriesHighlight$,seriesContainerPosition$:p,event$:n.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),Tu="PieEventTexts",yx=st(Tu,"text");function qh(t,e){const n=t.selectAll(`text.${yx}`).data(e),r=n.enter().append("text").classed(yx,!0),i=n.merge(r);return i.each((o,a,s)=>{const u=Z(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 jh({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]}))}function yI(t,e){const n=new ot;let r;const i=e.fullChartParams$.pipe(z(n),U(o=>o.highlightTarget),it());return B({computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:i}).pipe(z(n),Y(async o=>o)).subscribe(o=>{e.containerSelection.transition("move").duration(o.fullChartParams.transitionDuration).tween("move",(a,s)=>u=>{const c=jh({eventData:{type:"series",pluginName:t,eventName:"transitionMove",event:a,highlightTarget:o.highlightTarget,data:o.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:u,eventFn:o.fullParams.eventFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});qh(e.containerSelection,c)}).on("end",(a,s)=>{const u=jh({eventData:{type:"series",pluginName:t,eventName:"transitionEnd",event:a,highlightTarget:o.highlightTarget,data:o.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:1,eventFn:o.fullParams.eventFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});qh(e.containerSelection,u),r&&r.unsubscribe(),r=e.event$.subscribe(c=>{const l=jh({eventData:c,eventName:c.eventName,t:1,eventFn:o.fullParams.eventFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});qh(e.containerSelection,l)})})}),()=>{n.next(void 0)}}const bI=Pi(Tu,fx)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ot,{seriesCenterSelection$:o}=Bh({selection:t,pluginName:Tu,separateSeries$:n.separateSeries$,seriesLabels$:n.seriesLabels$,seriesContainerPosition$:n.seriesContainerPosition$}),a=[];return o.subscribe(s=>{a.forEach(u=>u()),s.each((u,c,l)=>{const h=Z(l[c]),f=n.computedLayoutData$.pipe(z(i),U(d=>d[c]??d[0])),p=n.seriesContainerPosition$.pipe(z(i),U(d=>d[c]??d[0]));a[c]=yI(Tu,{containerSelection:h,computedData$:n.computedData$,containerComputedLayoutData$:f,SeriesDataMap$:n.SeriesDataMap$,fullParams$:n.fullParams$,fullChartParams$:n.fullChartParams$,seriesHighlight$:n.seriesHighlight$,seriesContainerPosition$:p,event$:r.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),Lu="PieLabels",vI=st(Lu,"text");function xI(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 _I(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(vI,!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)=>Mh({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function wI({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=Z(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+")")})}function $I(t,e){const n=new ot;let r=new ot,i=[];return B({layout:e.seriesContainerPosition$,containerComputedLayoutData:e.containerComputedLayoutData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(z(n),Y(async o=>o)).subscribe(o=>{const a=o.layout.width<o.layout.height?o.layout.width:o.layout.height,s=Mu({axisWidth:a,innerRadius:0,outerRadius:o.fullParams.outerRadius,padAngle:0,cornerRadius:0}),u=Mu({axisWidth:a,innerRadius:0,outerRadius:o.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),c=mx({data:o.containerComputedLayoutData,startAngle:o.fullParams.startAngle,endAngle:o.fullParams.endAngle});i=xI(c,s,u,o.fullParams.labelCentroid);const l=_I(e.containerSelection,i,o.fullParams,o.fullChartParams);r.next(l)}),B({labelSelection:r,highlight:e.seriesHighlight$.pipe(U(o=>o.map(a=>a.id))),fullChartParams:e.fullChartParams$}).pipe(z(n),Y(async o=>o)).subscribe(o=>{wI({labelSelection:o.labelSelection,ids:o.highlight,fullChartParams:o.fullChartParams})}),()=>{n.next(void 0)}}const SI=Pi(Lu,hx)(({selection:t,observer:e,subject:n})=>{const r=new ot,{seriesCenterSelection$:i}=Bh({selection:t,pluginName:Lu,separateSeries$:e.separateSeries$,seriesLabels$:e.seriesLabels$,seriesContainerPosition$:e.seriesContainerPosition$}),o=[];return i.subscribe(a=>{o.forEach(s=>s()),a.each((s,u,c)=>{const l=Z(c[u]),h=e.computedLayoutData$.pipe(z(r),U(p=>p[u]??p[0])),f=e.seriesContainerPosition$.pipe(z(r),U(p=>p[u]??p[0]));o[u]=$I(Lu,{containerSelection:l,containerComputedLayoutData$:h,fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,seriesHighlight$:e.seriesHighlight$,seriesContainerPosition$:f,event$:n.event$})})}),()=>{r.next(void 0)}}),bx="SeriesLegend",AI=Pi(bx,px)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new ot,o=n.SeriesDataMap$.pipe(z(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(z(i),U(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$,textSizePx$:n.textSizePx$});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",MI=pg(_x,xx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new ot,o=n.CategoryDataMap$.pipe(z(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(z(i),U(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$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),sr="TreeMap",wx=st(sr,"tree"),$x=st(sr,"tile");function PI({selection:t,treeData:e,fullParams:n,fullChartParams:r,textSizePx:i}){const o=i/2,a=i,s=t.selectAll(`g.${wx}`).data(e,u=>u.data.id).join("g").attr("class",wx);return s.attr("transform",u=>!u.x0||!u.y0?null:`translate(${u.x0},${u.y0})`).each((u,c,l)=>{const h=Z(l[c]);h.selectAll(`rect.${$x}`).data([u],f=>f.data.id).join("rect").attr("id",f=>f.data.id).attr("class",$x).attr("cursor","pointer").attr("width",f=>f.x1-f.x0).attr("height",f=>f.y1-f.y0).attr("fill",f=>f.data.color).attr("data-name",f=>f.data.label).attr("data-category",f=>f.data.categoryLabel).attr("data-value",f=>f.data.value),h.selectAll("g").data([u]).join("g").each((f,p,d)=>{Z(d[p]).selectAll("text").data([f]).join("text").text(m=>m.data.label).attr("dominant-baseline","hanging").attr("x",o).attr("y",o).attr("font-size",r.styles.textSize).each(function(m){const y=Z(this),x=m.data.label.split(/\s+/).reverse();let v,b=[];const $=y.attr("x");let _=y.attr("y"),P=0,T=y.text(null).append("tspan").attr("cursor","pointer").attr("fill",Et(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",$).attr("y",_);for(;v=x.pop();)b.push(v),T.text(b.join(" ")),T.node().getComputedTextLength()>m.x1-m.x0-o&&(b.pop(),T.text(b.join(" ")),b=[v],P+=a,T=y.append("tspan").attr("cursor","pointer").attr("fill",Et(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",$).attr("y",_).attr("dy",P+"px").text(v))})})}),s}function DI({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)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const TI=pg(sr,vx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ot,o=B({layout:r.layout$,visibleComputedData:r.visibleComputedData$,fullParams:r.fullParams$,fullDataFormatter:r.fullDataFormatter$,fullChartParams:r.fullChartParams$}).pipe(z(i),Y(async u=>u),U(u=>{const c=ky().size([u.layout.width,u.layout.height]).paddingInner(u.fullParams.paddingInner).paddingOuter(u.fullParams.paddingOuter).round(!0).tile(Of.ratio(u.fullParams.squarifyRatio)),l=Ws(u.visibleComputedData).sum(f=>f.value).sort(u.fullParams.sort);return c(l),l.leaves()})),a=B({selection:Yu(t),treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,textSizePx:r.textSizePx$}).pipe(z(i),Y(async u=>u),U(u=>PI({selection:t,treeData:u.treeData,fullParams:u.fullParams,fullChartParams:u.fullChartParams,textSizePx:u.textSizePx}))),s=r.fullChartParams$.pipe(z(i),U(u=>u.highlightTarget),it());return B({cellSelection:a,computedData:r.computedData$,treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,highlightTarget:s,CategoryDataMap:r.CategoryDataMap$}).pipe(z(i),Y(async u=>u)).subscribe(u=>{u.cellSelection.on("mouseover",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseover",pluginName:sr,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:sr,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:sr,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:sr,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})})}),B({cellSelection:a,highlight:r.treeHighlight$.pipe(U(u=>u.map(c=>c.id))),fullChartParams:r.fullChartParams$}).pipe(z(i),Y(async u=>u)).subscribe(u=>{DI({selection:u.cellSelection,ids:u.highlight,fullChartParams:u.fullChartParams})}),()=>{i.next(void 0)}});K.BarStack=cR,K.Bars=eR,K.BarsDiverging=nR,K.BarsTriangle=yR,K.Bubbles=fI,K.CONTAINER_PLUGIN_PARAMS=ax,K.Container=JR,K.DEFAULT_BARS_DIVERGING_PARAMS=Sx,K.DEFAULT_BARS_PARAMS=Io,K.DEFAULT_BARS_TRIANGLE_PARAMS=Qh,K.DEFAULT_BAR_STACK_PARAMS=Kh,K.DEFAULT_BUBBLES_PARAMS=cx,K.DEFAULT_DOTS_PARAMS=Vh,K.DEFAULT_GRID_LEGEND_PARAMS=np,K.DEFAULT_GROUP_AREA_PARAMS=Zh,K.DEFAULT_GROUP_AXIS_PARAMS=Jh,K.DEFAULT_LINES_PARAMS=ur,K.DEFAULT_LINE_AREAS_PARAMS=Xh,K.DEFAULT_MULTI_BARS_PARAMS=B2,K.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=H2,K.DEFAULT_MULTI_BAR_STACK_PARAMS=Y2,K.DEFAULT_MULTI_DOTS_PARAMS=j2,K.DEFAULT_MULTI_GRID_LEGEND_PARAMS=z2,K.DEFAULT_MULTI_GROUP_AXIS_PARAMS=O2,K.DEFAULT_MULTI_LINES_PARAMS=W2,K.DEFAULT_MULTI_LINE_AREAS_PARAMS=q2,K.DEFAULT_MULTI_VALUE_AXIS_PARAMS=U2,K.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=X2,K.DEFAULT_PIE_EVENT_TEXTS_PARAMS=fx,K.DEFAULT_PIE_LABELS_PARAMS=hx,K.DEFAULT_PIE_PARAMS=lx,K.DEFAULT_SCALING_AREA_PARAMS=ep,K.DEFAULT_SERIES_LEGEND_PARAMS=px,K.DEFAULT_TREE_LEGEND_PARAMS=xx,K.DEFAULT_TREE_MAP_PARAMS=vx,K.DEFAULT_VALUE_AXIS_PARAMS=Cu,K.DEFAULT_VALUE_STACK_AXIS_PARAMS=tp,K.Dots=_R,K.GridLegend=$R,K.GroupAux=GR,K.GroupAxis=AR,K.LineAreas=Xk,K.Lines=Uk,K.MultiBarStack=UR,K.MultiBars=OR,K.MultiBarsTriangle=BR,K.MultiDots=WR,K.MultiGridLegend=zR,K.MultiGroupAxis=qR,K.MultiLineAreas=HR,K.MultiLines=YR,K.MultiValueAxis=jR,K.OverlappingValueAxes=QR,K.Pie=mI,K.PieEventTexts=bI,K.PieLabels=SI,K.ScalingArea=LR,K.SeriesLegend=AI,K.TOOLTIP_PARAMS=sx,K.Tooltip=rI,K.TreeLegend=MI,K.TreeMap=TI,K.ValueAxis=PR,K.ValueStackAxis=DR,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});